1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Red Hat Inc.
3 # This file is distributed under the same license as the libguestfs package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: libguestfs 1.8.0\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2010-12-19 15:52+0000\n"
12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=utf-8\n"
17 "Content-Transfer-Encoding: ENCODING"
20 #: ../src/guestfs.pod:1 ../fish/guestfish.pod:1 ../test-tool/libguestfs-test-tool.pod:1 ../fuse/guestmount.pod:1
25 #: ../src/guestfs.pod:3 ../fish/guestfish.pod:3 ../test-tool/libguestfs-test-tool.pod:3 ../fuse/guestmount.pod:3
30 #: ../src/guestfs.pod:5
31 msgid "guestfs - Library for accessing and modifying virtual machine images"
35 #: ../src/guestfs.pod:7 ../fish/guestfish.pod:7 ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7
40 #: ../src/guestfs.pod:9
43 " #include <guestfs.h>\n"
48 #: ../src/guestfs.pod:11
51 " guestfs_h *g = guestfs_create ();\n"
52 " guestfs_add_drive (g, \"guest.img\");\n"
53 " guestfs_launch (g);\n"
54 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
55 " guestfs_touch (g, \"/hello\");\n"
56 " guestfs_umount (g, \"/\");\n"
57 " guestfs_close (g);\n"
62 #: ../src/guestfs.pod:19
65 " cc prog.c -o prog -lguestfs\n"
67 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
72 #: ../src/guestfs.pod:23 ../fish/guestfish.pod:30 ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:20
77 #: ../src/guestfs.pod:25
79 "Libguestfs is a library for accessing and modifying guest disk images. "
80 "Amongst the things this is good for: making batch configuration changes to "
81 "guests, getting disk used/free statistics (see also: virt-df), migrating "
82 "between virtualization systems (see also: virt-p2v), performing partial "
83 "backups, performing partial guest clones, cloning guests and changing "
84 "registry/UUID/hostname info, and much else besides."
88 #: ../src/guestfs.pod:33
90 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
91 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
92 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
97 #: ../src/guestfs.pod:38
99 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
100 "what filesystem is in each LV, etc.). It can also run commands in the "
101 "context of the guest. Also you can access filesystems over FUSE."
105 #: ../src/guestfs.pod:43
107 "Libguestfs is a library that can be linked with C and C++ management "
108 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
109 "PHP, Haskell or C#). You can also use it from shell scripts or the command "
114 #: ../src/guestfs.pod:48
116 "You don't need to be root to use libguestfs, although obviously you do need "
117 "enough permissions to access the disk images."
121 #: ../src/guestfs.pod:51
123 "Libguestfs is a large API because it can do many things. For a gentle "
124 "introduction, please read the L</API OVERVIEW> section next."
128 #: ../src/guestfs.pod:54
130 "There are also some example programs in the L<guestfs-examples(3)> manual "
135 #: ../src/guestfs.pod:57
140 #: ../src/guestfs.pod:59
142 "This section provides a gentler overview of the libguestfs API. We also try "
143 "to group API calls together, where that may not be obvious from reading "
144 "about the individual calls in the main section of this manual."
148 #: ../src/guestfs.pod:64
153 #: ../src/guestfs.pod:66
155 "Before you can use libguestfs calls, you have to create a handle. Then you "
156 "must add at least one disk image to the handle, followed by launching the "
157 "handle, then performing whatever operations you want, and finally closing "
158 "the handle. By convention we use the single letter C<g> for the name of the "
159 "handle variable, although of course you can use any name you want."
163 #: ../src/guestfs.pod:73
164 msgid "The general structure of all libguestfs-using programs looks like this:"
168 #: ../src/guestfs.pod:76
171 " guestfs_h *g = guestfs_create ();\n"
176 #: ../src/guestfs.pod:78
179 " /* Call guestfs_add_drive additional times if there are\n"
180 " * multiple disk images.\n"
182 " guestfs_add_drive (g, \"guest.img\");\n"
187 #: ../src/guestfs.pod:83
190 " /* Most manipulation calls won't work until you've launched\n"
191 " * the handle 'g'. You have to do this _after_ adding drives\n"
192 " * and _before_ other commands.\n"
194 " guestfs_launch (g);\n"
199 #: ../src/guestfs.pod:89
202 " /* Now you can examine what partitions, LVs etc are available.\n"
204 " char **partitions = guestfs_list_partitions (g);\n"
205 " char **logvols = guestfs_lvs (g);\n"
210 #: ../src/guestfs.pod:94
213 " /* To access a filesystem in the image, you must mount it.\n"
215 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
220 #: ../src/guestfs.pod:98
223 " /* Now you can perform filesystem actions on the guest\n"
226 " guestfs_touch (g, \"/hello\");\n"
231 #: ../src/guestfs.pod:103
234 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
235 " * it is done automatically when you close the handle. See\n"
236 " * discussion of autosync in this page.\n"
238 " guestfs_sync (g);\n"
243 #: ../src/guestfs.pod:109
246 " /* Close the handle 'g'. */\n"
247 " guestfs_close (g);\n"
252 #: ../src/guestfs.pod:112
254 "The code above doesn't include any error checking. In real code you should "
255 "check return values carefully for errors. In general all functions that "
256 "return integers return C<-1> on error, and all functions that return "
257 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
258 "how to handle errors, and consult the documentation for each function call "
259 "below to see precisely how they return error indications. See "
260 "L<guestfs-examples(3)> for fully worked examples."
264 #: ../src/guestfs.pod:121
269 #: ../src/guestfs.pod:123
271 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
272 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
273 "actual block device, or simply an empty file of zeroes that you have created "
274 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
279 #: ../src/guestfs.pod:129
281 "The call you should use in modern code for adding drives is "
282 "L</guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
283 "specifying that the format is raw, do:"
287 #: ../src/guestfs.pod:133
290 " guestfs_add_drive_opts (g, filename,\n"
291 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
297 #: ../src/guestfs.pod:137
298 msgid "You can add a disk read-only using:"
302 #: ../src/guestfs.pod:139
305 " guestfs_add_drive_opts (g, filename,\n"
306 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
307 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
313 #: ../src/guestfs.pod:144
315 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
316 "libguestfs won't modify the file."
320 #: ../src/guestfs.pod:147
322 "Be extremely cautious if the disk image is in use, eg. if it is being used "
323 "by a virtual machine. Adding it read-write will almost certainly cause disk "
324 "corruption, but adding it read-only is safe."
328 #: ../src/guestfs.pod:151
330 "You must add at least one disk image, and you may add multiple disk images. "
331 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
332 "first one you added), C</dev/sdb> (for the second one you added), etc."
336 #: ../src/guestfs.pod:156
338 "Once L</guestfs_launch> has been called you cannot add any more images. You "
339 "can call L</guestfs_list_devices> to get a list of the device names, in the "
340 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
344 #: ../src/guestfs.pod:161
349 #: ../src/guestfs.pod:163
351 "Before you can read or write files, create directories and so on in a disk "
352 "image that contains filesystems, you have to mount those filesystems using "
353 "L</guestfs_mount>. If you already know that a disk image contains (for "
354 "example) one partition with a filesystem on that partition, then you can "
359 #: ../src/guestfs.pod:169
362 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
367 #: ../src/guestfs.pod:171
369 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
370 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
371 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>)."
375 #: ../src/guestfs.pod:175
377 "If you are given a disk image and you don't know what it contains then you "
378 "have to find out. Libguestfs can do that too: use "
379 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
380 "and LVs, and either try mounting each to see what is mountable, or else "
381 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. Libguestfs also "
382 "has a set of APIs for inspection of disk images (see L</INSPECTION> below). "
383 "But you might find it easier to look at higher level programs built on top "
384 "of libguestfs, in particular L<virt-inspector(1)>."
388 #: ../src/guestfs.pod:185
390 "To mount a disk image read-only, use L</guestfs_mount_ro>. There are "
391 "several other variations of the C<guestfs_mount_*> call."
395 #: ../src/guestfs.pod:188
396 msgid "FILESYSTEM ACCESS AND MODIFICATION"
400 #: ../src/guestfs.pod:190
402 "The majority of the libguestfs API consists of fairly low-level calls for "
403 "accessing and modifying the files, directories, symlinks etc on mounted "
404 "filesystems. There are over a hundred such calls which you can find listed "
405 "in detail below in this man page, and we don't even pretend to cover them "
406 "all in this overview."
410 #: ../src/guestfs.pod:196
412 "Specify filenames as full paths, starting with C<\"/\"> and including the "
417 #: ../src/guestfs.pod:199
419 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
420 "the file called C<\"etc/passwd\"> then you could do:"
424 #: ../src/guestfs.pod:202
427 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
432 #: ../src/guestfs.pod:204
434 "This would return C<data> as a newly allocated buffer containing the full "
435 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
436 "or C<NULL> if there was an error."
440 #: ../src/guestfs.pod:208
442 "As another example, to create a top-level directory on that filesystem "
443 "called C<\"var\"> you would do:"
447 #: ../src/guestfs.pod:211
450 " guestfs_mkdir (g, \"/var\");\n"
455 #: ../src/guestfs.pod:213
456 msgid "To create a symlink you could do:"
460 #: ../src/guestfs.pod:215
463 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
464 " \"/etc/rc3.d/S30portmap\");\n"
469 #: ../src/guestfs.pod:218
471 "Libguestfs will reject attempts to use relative paths and there is no "
472 "concept of a current working directory."
476 #: ../src/guestfs.pod:221
478 "Libguestfs can return errors in many situations: for example if the "
479 "filesystem isn't writable, or if a file or directory that you requested "
480 "doesn't exist. If you are using the C API (documented here) you have to "
481 "check for those error conditions after each call. (Other language bindings "
482 "turn these errors into exceptions)."
486 #: ../src/guestfs.pod:227
488 "File writes are affected by the per-handle umask, set by calling "
489 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
493 #: ../src/guestfs.pod:230
498 #: ../src/guestfs.pod:232
500 "Libguestfs contains API calls to read, create and modify partition tables on "
505 #: ../src/guestfs.pod:235
507 "In the common case where you want to create a single partition covering the "
508 "whole disk, you should use the L</guestfs_part_disk> call:"
512 #: ../src/guestfs.pod:239
515 " const char *parttype = \"mbr\";\n"
516 " if (disk_is_larger_than_2TB)\n"
517 " parttype = \"gpt\";\n"
518 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
523 #: ../src/guestfs.pod:244
525 "Obviously this effectively wipes anything that was on that disk image "
530 #: ../src/guestfs.pod:247
535 #: ../src/guestfs.pod:249
537 "Libguestfs provides access to a large part of the LVM2 API, such as "
538 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
539 "unless you familiarize yourself with the concepts of physical volumes, "
540 "volume groups and logical volumes."
544 #: ../src/guestfs.pod:254
546 "This author strongly recommends reading the LVM HOWTO, online at "
547 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
551 #: ../src/guestfs.pod:257
556 #: ../src/guestfs.pod:259
558 "Use L</guestfs_cat> to download small, text only files. This call is "
559 "limited to files which are less than 2 MB and which cannot contain any ASCII "
560 "NUL (C<\\0>) characters. However it has a very simple to use API."
564 #: ../src/guestfs.pod:264
566 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
567 "bit data, since it returns a (pointer, size) pair. However it is still "
568 "limited to \"small\" files, less than 2 MB."
572 #: ../src/guestfs.pod:268
574 "L</guestfs_download> can be used to download any file, with no limits on "
575 "content or size (even files larger than 4 GB)."
579 #: ../src/guestfs.pod:271
580 msgid "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
584 #: ../src/guestfs.pod:274
589 #: ../src/guestfs.pod:276
591 "It's often the case that you want to write a file or files to the disk "
596 #: ../src/guestfs.pod:279
598 "To write a small file with fixed content, use L</guestfs_write>. To create "
599 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
600 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
601 "variety of other functions for creating test files, for example "
602 "L</guestfs_fill> and L</guestfs_fill_pattern>."
606 #: ../src/guestfs.pod:285
608 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
609 "file content or size (even files larger than 4 GB)."
613 #: ../src/guestfs.pod:288
614 msgid "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
618 #: ../src/guestfs.pod:290
620 "However the fastest way to upload I<large numbers of arbitrary files> is to "
621 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
622 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add "
623 "the drive in a predictable way (eg. adding it last after all other drives) "
624 "then you can get the device name from L</guestfs_list_devices> and mount it "
625 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
626 "sometimes non-portable between kernel versions, and they don't support "
627 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
628 "using a label or UUID, use an ISO image instead."
632 #: ../src/guestfs.pod:301
637 #: ../src/guestfs.pod:303
639 "There are various different commands for copying between files and devices "
640 "and in and out of the guest filesystem. These are summarised in the table "
645 #: ../src/guestfs.pod:309
646 msgid "B<file> to B<file>"
650 #: ../src/guestfs.pod:311
652 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
653 "directories recursively."
657 #: ../src/guestfs.pod:314
658 msgid "B<file or device> to B<file or device>"
662 #: ../src/guestfs.pod:316
664 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
665 "devices in the guest."
669 #: ../src/guestfs.pod:319
670 msgid "Example: duplicate the contents of an LV:"
674 #: ../src/guestfs.pod:321
677 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
682 #: ../src/guestfs.pod:323
684 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
685 "(C</dev/VG/Original>). To copy less than the whole source device, use "
686 "L</guestfs_copy_size>."
690 #: ../src/guestfs.pod:327
691 msgid "B<file on the host> to B<file or device>"
695 #: ../src/guestfs.pod:329
696 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
700 #: ../src/guestfs.pod:331
701 msgid "B<file or device> to B<file on the host>"
705 #: ../src/guestfs.pod:333
706 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
710 #: ../src/guestfs.pod:337
711 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
715 #: ../src/guestfs.pod:339
717 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, "
718 "L</guestfs_tar_out> etc appear to only take filenames as arguments, so it "
719 "appears you can only upload and download to files. However many Un*x-like "
720 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, "
721 "C</dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, "
722 "stderr, and arbitrary file descriptor N."
726 #: ../src/guestfs.pod:347
727 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
731 #: ../src/guestfs.pod:350
734 " guestfs_download (filename, \"/dev/stdout\");\n"
739 #: ../src/guestfs.pod:352
740 msgid "and you can write tar output to a pipe C<fd> by doing:"
744 #: ../src/guestfs.pod:354
748 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
749 " guestfs_tar_out (\"/\", devfd);\n"
754 #: ../src/guestfs.pod:358
755 msgid "LISTING FILES"
759 #: ../src/guestfs.pod:360
761 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
762 "L<guestfish(1)>-equivalent command C<ll>)."
766 #: ../src/guestfs.pod:363
768 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
769 "programs, as a flat list of strings."
773 #: ../src/guestfs.pod:366
775 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
776 "directory, plus additional information about each one. It is more "
777 "equivalent to using the L<readdir(3)> call on a local filesystem."
781 #: ../src/guestfs.pod:370
783 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
788 #: ../src/guestfs.pod:373
789 msgid "RUNNING COMMANDS"
793 #: ../src/guestfs.pod:375
795 "Although libguestfs is primarily an API for manipulating files inside guest "
796 "images, we also provide some limited facilities for running commands inside "
801 #: ../src/guestfs.pod:379
802 msgid "There are many limitations to this:"
806 #: ../src/guestfs.pod:383 ../src/guestfs.pod:388 ../src/guestfs.pod:393 ../src/guestfs.pod:397 ../src/guestfs.pod:402 ../src/guestfs.pod:406 ../src/guestfs.pod:411 ../src/guestfs.pod:416 ../src/guestfs.pod:1006 ../src/guestfs.pod:1010 ../src/guestfs.pod:1014 ../src/guestfs.pod:1019 ../src/guestfs.pod:1027 ../src/guestfs.pod:1046 ../src/guestfs.pod:1054 ../src/guestfs.pod:1076 ../src/guestfs.pod:1080 ../src/guestfs.pod:1084 ../src/guestfs.pod:1088 ../src/guestfs.pod:1092 ../src/guestfs.pod:1096 ../src/guestfs.pod:1578 ../src/guestfs.pod:1583 ../src/guestfs.pod:1587 ../src/guestfs.pod:1697 ../src/guestfs.pod:1702 ../src/guestfs.pod:1706 ../src/guestfs.pod:2058 ../src/guestfs.pod:2064 ../src/guestfs.pod:2069 ../src/guestfs.pod:2075 ../src/guestfs.pod:2187 ../src/guestfs.pod:2191 ../src/guestfs.pod:2195 ../src/guestfs.pod:2199 ../src/guestfs-actions.pod:15 ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:571 ../src/guestfs-actions.pod:579 ../src/guestfs-actions.pod:586 ../src/guestfs-actions.pod:593 ../src/guestfs-actions.pod:1589 ../src/guestfs-actions.pod:1593 ../src/guestfs-actions.pod:1597 ../src/guestfs-actions.pod:1601 ../src/guestfs-actions.pod:1609 ../src/guestfs-actions.pod:1613 ../src/guestfs-actions.pod:1617 ../src/guestfs-actions.pod:1627 ../src/guestfs-actions.pod:1631 ../src/guestfs-actions.pod:1635 ../src/guestfs-actions.pod:1773 ../src/guestfs-actions.pod:1777 ../src/guestfs-actions.pod:1782 ../src/guestfs-actions.pod:1787 ../src/guestfs-actions.pod:1848 ../src/guestfs-actions.pod:1852 ../src/guestfs-actions.pod:1857 ../fish/guestfish.pod:427 ../fish/guestfish.pod:431 ../fish/guestfish.pod:435 ../fish/guestfish.pod:439 ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:375 ../fish/guestfish-actions.pod:383 ../fish/guestfish-actions.pod:390 ../fish/guestfish-actions.pod:397 ../fish/guestfish-actions.pod:1067 ../fish/guestfish-actions.pod:1071 ../fish/guestfish-actions.pod:1075 ../fish/guestfish-actions.pod:1079 ../fish/guestfish-actions.pod:1087 ../fish/guestfish-actions.pod:1091 ../fish/guestfish-actions.pod:1095 ../fish/guestfish-actions.pod:1105 ../fish/guestfish-actions.pod:1109 ../fish/guestfish-actions.pod:1113 ../fish/guestfish-actions.pod:1203 ../fish/guestfish-actions.pod:1207 ../fish/guestfish-actions.pod:1212 ../fish/guestfish-actions.pod:1217 ../fish/guestfish-actions.pod:1259 ../fish/guestfish-actions.pod:1263 ../fish/guestfish-actions.pod:1268
811 #: ../src/guestfs.pod:385
813 "The kernel version that the command runs under will be different from what "
818 #: ../src/guestfs.pod:390
820 "If the command needs to communicate with daemons, then most likely they "
825 #: ../src/guestfs.pod:395
826 msgid "The command will be running in limited memory."
830 #: ../src/guestfs.pod:399
832 "The network may not be available unless you enable it (see "
833 "L</guestfs_set_network>)."
837 #: ../src/guestfs.pod:404
838 msgid "Only supports Linux guests (not Windows, BSD, etc)."
842 #: ../src/guestfs.pod:408
843 msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
847 #: ../src/guestfs.pod:413
849 "For SELinux guests, you may need to enable SELinux and load policy first. "
850 "See L</SELINUX> in this manpage."
854 #: ../src/guestfs.pod:418
856 "I<Security:> It is not safe to run commands from untrusted, possibly "
857 "malicious guests. These commands may attempt to exploit your program by "
858 "sending unexpected output. They could also try to exploit the Linux kernel "
859 "or qemu provided by the libguestfs appliance. They could use the network "
860 "provided by the libguestfs appliance to bypass ordinary network partitions "
861 "and firewalls. They could use the elevated privileges or different SELinux "
862 "context of your program to their advantage."
866 #: ../src/guestfs.pod:427
868 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
869 "(a script which runs when the guest next boots normally), and to have this "
870 "script run the commands you want in the normal context of the running guest, "
871 "network security and so on. For information about other security issues, "
876 #: ../src/guestfs.pod:435
878 "The two main API calls to run commands are L</guestfs_command> and "
879 "L</guestfs_sh> (there are also variations)."
883 #: ../src/guestfs.pod:438
885 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
886 "shell globs, redirections, etc will work."
890 #: ../src/guestfs.pod:441
891 msgid "CONFIGURATION FILES"
895 #: ../src/guestfs.pod:443
897 "To read and write configuration files in Linux guest filesystems, we "
898 "strongly recommend using Augeas. For example, Augeas understands how to "
899 "read and write, say, a Linux shadow password file or X.org configuration "
900 "file, and so avoids you having to write that code."
904 #: ../src/guestfs.pod:448
906 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
907 "document Augeas itself here because there is excellent documentation on the "
908 "L<http://augeas.net/> website."
912 #: ../src/guestfs.pod:452
914 "If you don't want to use Augeas (you fool!) then try calling "
915 "L</guestfs_read_lines> to get the file as a list of lines which you can "
920 #: ../src/guestfs.pod:456
925 #: ../src/guestfs.pod:458
927 "We support SELinux guests. To ensure that labeling happens correctly in "
928 "SELinux guests, you need to enable SELinux and load the guest's policy:"
932 #: ../src/guestfs.pod:464 ../src/guestfs.pod:1199 ../src/guestfs.pod:1330
937 #: ../src/guestfs.pod:466
938 msgid "Before launching, do:"
942 #: ../src/guestfs.pod:468
945 " guestfs_set_selinux (g, 1);\n"
950 #: ../src/guestfs.pod:470 ../src/guestfs.pod:1203 ../src/guestfs.pod:1334
955 #: ../src/guestfs.pod:472
957 "After mounting the guest's filesystem(s), load the policy. This is best "
958 "done by running the L<load_policy(8)> command in the guest itself:"
962 #: ../src/guestfs.pod:476
965 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
970 #: ../src/guestfs.pod:478
972 "(Older versions of C<load_policy> require you to specify the name of the "
977 #: ../src/guestfs.pod:481 ../src/guestfs.pod:1340
982 #: ../src/guestfs.pod:483
984 "Optionally, set the security context for the API. The correct security "
985 "context to use can only be known by inspecting the guest. As an example:"
989 #: ../src/guestfs.pod:487
992 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
997 #: ../src/guestfs.pod:491
998 msgid "This will work for running commands and editing existing files."
1002 #: ../src/guestfs.pod:493
1004 "When new files are created, you may need to label them explicitly, for "
1005 "example by running the external command C<restorecon pathname>."
1009 #: ../src/guestfs.pod:497
1014 #: ../src/guestfs.pod:499
1016 "Certain calls are affected by the current file mode creation mask (the "
1017 "\"umask\"). In particular ones which create files or directories, such as "
1018 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
1019 "either the default mode that the file is created with or modifies the mode "
1024 #: ../src/guestfs.pod:505
1026 "The default umask is C<022>, so files are created with modes such as C<0644> "
1027 "and directories with C<0755>."
1031 #: ../src/guestfs.pod:508
1033 "There are two ways to avoid being affected by umask. Either set umask to 0 "
1034 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
1035 "L</guestfs_chmod> after creating each file or directory."
1039 #: ../src/guestfs.pod:512
1040 msgid "For more information about umask, see L<umask(2)>."
1044 #: ../src/guestfs.pod:514 ../fish/guestfish.pod:720
1045 msgid "ENCRYPTED DISKS"
1049 #: ../src/guestfs.pod:516
1051 "Libguestfs allows you to access Linux guests which have been encrypted using "
1052 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1053 "standard. This includes nearly all whole disk encryption systems used by "
1054 "modern Linux guests."
1058 #: ../src/guestfs.pod:522
1060 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1061 "returns the string C<crypto_LUKS>)."
1065 #: ../src/guestfs.pod:525
1067 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1068 "will require the passphrase!"
1072 #: ../src/guestfs.pod:528
1074 "Opening a LUKS device creates a new device mapper device called "
1075 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
1076 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
1077 "decrypted from and encrypted to the underlying block device respectively."
1081 #: ../src/guestfs.pod:534
1083 "LVM volume groups on the device can be made visible by calling "
1084 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
1085 "volume(s) can now be mounted in the usual way."
1089 #: ../src/guestfs.pod:538
1091 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1092 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1093 "[\"/dev/VG\"])>. Then close the mapper device by calling "
1094 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1095 "underlying encrypted block device)."
1099 #: ../src/guestfs.pod:545
1104 #: ../src/guestfs.pod:547
1106 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1107 "contains operating systems. (These APIs used to be in a separate Perl-only "
1108 "library called L<Sys::Guestfs::Lib(3)> but since version 1.5.3 the most "
1109 "frequently used part of this library has been rewritten in C and moved into "
1114 #: ../src/guestfs.pod:553
1116 "Add all disks belonging to the unknown virtual machine and call "
1117 "L</guestfs_launch> in the usual way."
1121 #: ../src/guestfs.pod:556
1123 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1124 "and certain heuristics, and returns a list of operating systems that were "
1125 "found. An empty list means none were found. A single element is the root "
1126 "filesystem of the operating system. For dual- or multi-boot guests, "
1127 "multiple roots can be returned, each one corresponding to a separate "
1128 "operating system. (Multi-boot virtual machines are extremely rare in the "
1129 "world of virtualization, but since this scenario can happen, we have built "
1130 "libguestfs to deal with it.)"
1134 #: ../src/guestfs.pod:565
1136 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1137 "to get additional details about that operating system. For example, call "
1138 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1139 "Windows and Linux-based operating systems respectively."
1143 #: ../src/guestfs.pod:571
1145 "Un*x-like and Linux-based operating systems usually consist of several "
1146 "filesystems which are mounted at boot time (for example, a separate boot "
1147 "partition mounted on C</boot>). The inspection rules are able to detect how "
1148 "filesystems correspond to mount points. Call "
1149 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1150 "hash table like this example:"
1154 #: ../src/guestfs.pod:578
1157 " /boot => /dev/sda1\n"
1158 " / => /dev/vg_guest/lv_root\n"
1159 " /usr => /dev/vg_guest/lv_usr\n"
1164 #: ../src/guestfs.pod:582
1166 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1167 "filesystems as suggested."
1171 #: ../src/guestfs.pod:585
1173 "Be careful to mount filesystems in the right order (eg. C</> before "
1174 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
1179 #: ../src/guestfs.pod:589
1181 "Inspection currently only works for some common operating systems. "
1182 "Contributors are welcome to send patches for other operating systems that we "
1183 "currently cannot detect."
1187 #: ../src/guestfs.pod:593
1189 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1190 "for more details. The L</guestfs_inspect_os> function just ignores any "
1191 "encrypted devices."
1195 #: ../src/guestfs.pod:597
1197 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1198 "inspection and caches the results in the guest handle. Subsequent calls to "
1199 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
1200 "re-read the disks. If you change the content of the guest disks, you can "
1201 "redo inspection by calling L</guestfs_inspect_os> again. "
1202 "(L</guestfs_inspect_list_applications> works a little differently from the "
1203 "other calls and does read the disks. See documentation for that function "
1208 #: ../src/guestfs.pod:606
1209 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1213 #: ../src/guestfs.pod:608
1215 "Libguestfs can mount NTFS partitions. It does this using the "
1216 "L<http://www.ntfs-3g.org/> driver."
1220 #: ../src/guestfs.pod:611
1221 msgid "DRIVE LETTERS AND PATHS"
1225 #: ../src/guestfs.pod:613
1227 "DOS and Windows still use drive letters, and the filesystems are always "
1228 "treated as case insensitive by Windows itself, and therefore you might find "
1229 "a Windows configuration file referring to a path like "
1230 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
1231 "that directory might be referred to as C</WINDOWS/System32>."
1235 #: ../src/guestfs.pod:619
1237 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1238 "libguestfs to read the appropriate Windows Registry and configuration files, "
1239 "to determine yourself how drives are mapped (see also L<hivex(3)> and "
1240 "L<virt-inspector(1)>)."
1244 #: ../src/guestfs.pod:624
1246 "Replacing backslash characters with forward slash characters is also outside "
1247 "the scope of libguestfs, but something that you can easily do."
1251 #: ../src/guestfs.pod:627
1253 "Where we can help is in resolving the case insensitivity of paths. For "
1254 "this, call L</guestfs_case_sensitive_path>."
1258 #: ../src/guestfs.pod:630
1259 msgid "ACCESSING THE WINDOWS REGISTRY"
1263 #: ../src/guestfs.pod:632
1265 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1266 "files, through the library C<hivex> which is part of the libguestfs project "
1267 "although ships as a separate tarball. You have to locate and download the "
1268 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1269 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
1270 "L<virt-win-reg(1)> for more help on this issue."
1274 #: ../src/guestfs.pod:640
1275 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
1279 #: ../src/guestfs.pod:642
1281 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
1282 "provide something which looks like a Linux symlink. The way it tries to do "
1283 "the rewriting is described here:"
1287 #: ../src/guestfs.pod:646
1288 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-symbolic-links/>"
1292 #: ../src/guestfs.pod:648
1294 "The essential problem is that ntfs-3g simply does not have enough "
1295 "information to do a correct job. NTFS links can contain drive letters and "
1296 "references to external device GUIDs that ntfs-3g has no way of resolving. "
1297 "It is almost certainly the case that libguestfs callers should ignore what "
1298 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
1302 #: ../src/guestfs.pod:655
1304 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use "
1305 "L</guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
1306 "attribute, and read the raw reparse data from that (you can find the format "
1307 "documented in various places around the web)."
1311 #: ../src/guestfs.pod:660
1312 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
1316 #: ../src/guestfs.pod:662
1318 "There are other useful extended attributes that can be read from ntfs-3g "
1319 "filesystems (using L</guestfs_getxattr>). See:"
1323 #: ../src/guestfs.pod:665
1324 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
1328 #: ../src/guestfs.pod:667
1329 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1333 #: ../src/guestfs.pod:669
1335 "Although we don't want to discourage you from using the C API, we will "
1336 "mention here that the same API is also available in other languages."
1340 #: ../src/guestfs.pod:672
1342 "The API is broadly identical in all supported languages. This means that "
1343 "the C call C<guestfs_mount(g,path)> is C<$g-E<gt>mount($path)> in Perl, "
1344 "C<g.mount(path)> in Python, and C<Guestfs.mount g path> in OCaml. In other "
1345 "words, a straightforward, predictable isomorphism between each language."
1349 #: ../src/guestfs.pod:678
1351 "Error messages are automatically transformed into exceptions if the language "
1356 #: ../src/guestfs.pod:681
1358 "We don't try to \"object orientify\" parts of the API in OO languages, "
1359 "although contributors are welcome to write higher level APIs above what we "
1360 "provide in their favourite languages if they wish."
1364 #: ../src/guestfs.pod:687
1369 #: ../src/guestfs.pod:689
1371 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1372 "identical to the C API. C++ classes and exceptions are not used."
1376 #: ../src/guestfs.pod:693
1381 #: ../src/guestfs.pod:695
1383 "The C# bindings are highly experimental. Please read the warnings at the "
1384 "top of C<csharp/Libguestfs.cs>."
1388 #: ../src/guestfs.pod:698
1393 #: ../src/guestfs.pod:700
1395 "This is the only language binding that is working but incomplete. Only "
1396 "calls which return simple integers have been bound in Haskell, and we are "
1397 "looking for help to complete this binding."
1401 #: ../src/guestfs.pod:704
1406 #: ../src/guestfs.pod:706
1408 "Full documentation is contained in the Javadoc which is distributed with "
1413 #: ../src/guestfs.pod:709
1418 #: ../src/guestfs.pod:711
1419 msgid "For documentation see L<guestfs-ocaml(3)>."
1423 #: ../src/guestfs.pod:713
1428 #: ../src/guestfs.pod:715
1429 msgid "For documentation see L<Sys::Guestfs(3)>."
1433 #: ../src/guestfs.pod:717
1438 #: ../src/guestfs.pod:719
1440 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1441 "the php-libguestfs package for your distribution."
1445 #: ../src/guestfs.pod:722
1446 msgid "The PHP binding only works correctly on 64 bit machines."
1450 #: ../src/guestfs.pod:724
1455 #: ../src/guestfs.pod:726
1456 msgid "For documentation see L<guestfs-python(3)>."
1460 #: ../src/guestfs.pod:728
1465 #: ../src/guestfs.pod:730
1466 msgid "For documentation see L<guestfs-ruby(3)>."
1470 #: ../src/guestfs.pod:732
1471 msgid "B<shell scripts>"
1475 #: ../src/guestfs.pod:734
1476 msgid "For documentation see L<guestfish(1)>."
1480 #: ../src/guestfs.pod:738
1481 msgid "LIBGUESTFS GOTCHAS"
1485 #: ../src/guestfs.pod:740
1487 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1488 "system [...] that works in the way it is documented but is counterintuitive "
1489 "and almost invites mistakes.\""
1493 #: ../src/guestfs.pod:744
1495 "Since we developed libguestfs and the associated tools, there are several "
1496 "things we would have designed differently, but are now stuck with for "
1497 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1498 "release, you can expect these to change. Beware of them."
1502 #: ../src/guestfs.pod:752
1503 msgid "Autosync / forgetting to sync."
1507 #: ../src/guestfs.pod:754
1509 "When modifying a filesystem from C or another language, you B<must> unmount "
1510 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1511 "libguestfs handle. You can also call:"
1515 #: ../src/guestfs.pod:758
1518 " guestfs_set_autosync (g, 1);\n"
1523 #: ../src/guestfs.pod:760
1525 "to have the unmount/sync done automatically for you when the handle 'g' is "
1526 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
1531 #: ../src/guestfs.pod:764
1533 "If you forget to do this, then it is entirely possible that your changes "
1534 "won't be written out, or will be partially written, or (very rarely) that "
1535 "you'll get disk corruption."
1539 #: ../src/guestfs.pod:768
1541 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1542 "guestfish scripts that forget to sync will work just fine, which can make "
1543 "this very puzzling if you are trying to debug a problem."
1547 #: ../src/guestfs.pod:772
1549 "Update: Autosync is enabled by default for all API users starting from "
1550 "libguestfs 1.5.24."
1554 #: ../src/guestfs.pod:775
1555 msgid "Mount option C<-o sync> should not be the default."
1559 #: ../src/guestfs.pod:777
1561 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1562 "However C<-o sync> does not add any reliability benefit, but does have a "
1563 "very large performance impact."
1567 #: ../src/guestfs.pod:781
1569 "The work around is to use L</guestfs_mount_options> and set the mount "
1570 "options that you actually want to use."
1574 #: ../src/guestfs.pod:784
1575 msgid "Read-only should be the default."
1579 #: ../src/guestfs.pod:786
1581 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1582 "specify I<--rw> if you want to make changes to the image."
1586 #: ../src/guestfs.pod:789
1587 msgid "This would reduce the potential to corrupt live VM images."
1591 #: ../src/guestfs.pod:791
1593 "Note that many filesystems change the disk when you just mount and unmount, "
1594 "even if you didn't perform any writes. You need to use "
1595 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
1599 #: ../src/guestfs.pod:795
1600 msgid "guestfish command line is hard to use."
1604 #: ../src/guestfs.pod:797
1606 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1607 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1608 "exist, so it fails. In earlier versions of guestfish the error message was "
1609 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1610 "we should have used C<guestfish -c command> to run commands."
1614 #: ../src/guestfs.pod:804
1615 msgid "guestfish megabyte modifiers don't work right on all commands"
1619 #: ../src/guestfs.pod:806
1621 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1622 "other modifiers). What guestfish actually does is to multiply the number "
1623 "part by the modifier part and pass the result to the C API. However this "
1624 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1625 "expecting some other unit (eg. megabytes)."
1629 #: ../src/guestfs.pod:813
1630 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1634 #: ../src/guestfs.pod:815
1637 " lvcreate LV VG 100M\n"
1642 #: ../src/guestfs.pod:817
1644 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1645 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1646 "megabytes * megabytes) logical volume. The error message you get from this "
1647 "is also a little obscure."
1651 #: ../src/guestfs.pod:822
1653 "This could be fixed in the generator by specially marking parameters and "
1654 "return values which take bytes or other units."
1658 #: ../src/guestfs.pod:825
1659 msgid "Ambiguity between devices and paths"
1663 #: ../src/guestfs.pod:827
1665 "There is a subtle ambiguity in the API between a device name "
1666 "(eg. C</dev/sdb2>) and a similar pathname. A file might just happen to be "
1667 "called C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1671 #: ../src/guestfs.pod:832
1673 "In the current API we usually resolve this ambiguity by having two separate "
1674 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1675 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1676 "detecting if the path supplied begins with C</dev/>."
1680 #: ../src/guestfs.pod:838
1682 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1683 "make paths/devices into structured names. One way to do this would be to "
1684 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1685 "aspect of grub. Another way would be to use a structured type, equivalent "
1686 "to this OCaml type:"
1690 #: ../src/guestfs.pod:844
1693 " type path = Path of string | Device of int | Partition of int * int\n"
1698 #: ../src/guestfs.pod:846
1699 msgid "which would allow you to pass arguments like:"
1703 #: ../src/guestfs.pod:848
1706 " Path \"/foo/bar\"\n"
1707 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
1708 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
1709 " Path \"/dev/sdb2\" (* not a device *)\n"
1714 #: ../src/guestfs.pod:853
1716 "As you can see there are still problems to resolve even with this "
1717 "representation. Also consider how it might work in guestfish."
1721 #: ../src/guestfs.pod:858
1722 msgid "PROTOCOL LIMITS"
1726 #: ../src/guestfs.pod:860
1728 "Internally libguestfs uses a message-based protocol to pass API calls and "
1729 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1730 "plenty more detail about this). The maximum message size used by the "
1731 "protocol is slightly less than 4 MB. For some API calls you may need to be "
1732 "aware of this limit. The API calls which may be affected are individually "
1733 "documented, with a link back to this section of the documentation."
1737 #: ../src/guestfs.pod:868
1739 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1740 "a simple string. Because this string is at some point internally encoded as "
1741 "a message, the maximum size that it can return is slightly under 4 MB. If "
1742 "the requested file is larger than this then you will get an error."
1746 #: ../src/guestfs.pod:874
1748 "In order to transfer large files into and out of the guest filesystem, you "
1749 "need to use particular calls that support this. The sections L</UPLOADING> "
1750 "and L</DOWNLOADING> document how to do this."
1754 #: ../src/guestfs.pod:878
1756 "You might also consider mounting the disk image using our FUSE filesystem "
1757 "support (L<guestmount(1)>)."
1761 #: ../src/guestfs.pod:881
1762 msgid "KEYS AND PASSPHRASES"
1766 #: ../src/guestfs.pod:883
1768 "Certain libguestfs calls take a parameter that contains sensitive key "
1769 "material, passed in as a C string."
1773 #: ../src/guestfs.pod:886
1775 "In the future we would hope to change the libguestfs implementation so that "
1776 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1777 "swap. However this is I<not> done at the moment, because of the complexity "
1778 "of such an implementation."
1782 #: ../src/guestfs.pod:891
1784 "Therefore you should be aware that any key parameter you pass to libguestfs "
1785 "might end up being written out to the swap partition. If this is a concern, "
1786 "scrub the swap partition or don't use libguestfs on encrypted devices."
1790 #: ../src/guestfs.pod:896
1791 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
1795 #: ../src/guestfs.pod:898
1797 "All high-level libguestfs actions are synchronous. If you want to use "
1798 "libguestfs asynchronously then you must create a thread."
1802 #: ../src/guestfs.pod:901
1804 "Only use the handle from a single thread. Either use the handle exclusively "
1805 "from one thread, or provide your own mutex so that two threads cannot issue "
1806 "calls on the same handle at the same time."
1810 #: ../src/guestfs.pod:905
1812 "See the graphical program guestfs-browser for one possible architecture for "
1813 "multithreaded programs using libvirt and libguestfs."
1817 #: ../src/guestfs.pod:908
1822 #: ../src/guestfs.pod:910
1824 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
1829 #: ../src/guestfs.pod:913
1831 "By default it looks for these in the directory C<$libdir/guestfs> "
1832 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
1836 #: ../src/guestfs.pod:916
1838 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
1839 "to change the directories that libguestfs will search in. The value is a "
1840 "colon-separated list of paths. The current directory is I<not> searched "
1841 "unless the path contains an empty element or C<.>. For example "
1842 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
1843 "then C</usr/lib/guestfs>."
1847 #: ../src/guestfs.pod:923
1848 msgid "QEMU WRAPPERS"
1852 #: ../src/guestfs.pod:925
1854 "If you want to compile your own qemu, run qemu from a non-standard location, "
1855 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
1860 #: ../src/guestfs.pod:929
1862 "There is one important rule to remember: you I<must C<exec qemu>> as the "
1863 "last command in the shell script (so that qemu replaces the shell and "
1864 "becomes the direct child of the libguestfs-using program). If you don't do "
1865 "this, then the qemu process won't be cleaned up correctly."
1869 #: ../src/guestfs.pod:934
1871 "Here is an example of a wrapper, where I have built my own copy of qemu from "
1876 #: ../src/guestfs.pod:937
1880 " qemudir=/home/rjones/d/qemu\n"
1881 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
1887 #: ../src/guestfs.pod:941
1889 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
1890 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
1895 #: ../src/guestfs.pod:945
1898 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
1903 #: ../src/guestfs.pod:947
1905 "Note that libguestfs also calls qemu with the -help and -version options in "
1906 "order to determine features."
1910 #: ../src/guestfs.pod:950
1911 msgid "ABI GUARANTEE"
1915 #: ../src/guestfs.pod:952
1917 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
1918 "actions as outlined in this section. Although we will deprecate some "
1919 "actions, for example if they get replaced by newer calls, we will keep the "
1920 "old actions forever. This allows you the developer to program in confidence "
1921 "against the libguestfs API."
1925 #: ../src/guestfs.pod:958
1926 msgid "BLOCK DEVICE NAMING"
1930 #: ../src/guestfs.pod:960
1932 "In the kernel there is now quite a profusion of schemata for naming block "
1933 "devices (in this context, by I<block device> I mean a physical or virtual "
1934 "hard drive). The original Linux IDE driver used names starting with "
1935 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
1936 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
1937 "replacement for the old IDE driver (particularly for SATA devices) those "
1938 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
1939 "machines with paravirtualized drivers. This has created several different "
1940 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
1945 #: ../src/guestfs.pod:972
1947 "As discussed above, libguestfs uses a qemu appliance running an embedded "
1948 "Linux kernel to access block devices. We can run a variety of appliances "
1949 "based on a variety of Linux kernels."
1953 #: ../src/guestfs.pod:976
1955 "This causes a problem for libguestfs because many API calls use device or "
1956 "partition names. Working scripts and the recipe (example) scripts that we "
1957 "make available over the internet could fail if the naming scheme changes."
1961 #: ../src/guestfs.pod:981
1963 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
1964 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
1965 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
1966 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
1970 #: ../src/guestfs.pod:987
1972 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
1973 "L</guestfs_list_partitions> and similar calls return the true names of the "
1974 "devices and partitions as known to the appliance."
1978 #: ../src/guestfs.pod:992
1979 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
1983 #: ../src/guestfs.pod:994
1985 "Usually this translation is transparent. However in some (very rare) cases "
1986 "you may need to know the exact algorithm. Such cases include where you use "
1987 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
1988 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
1993 #: ../src/guestfs.pod:1000
1995 "The algorithm is applied only to I<parameters> which are known to be either "
1996 "device or partition names. Return values from functions such as "
1997 "L</guestfs_list_devices> are never changed."
2001 #: ../src/guestfs.pod:1008
2002 msgid "Is the string a parameter which is a device or partition name?"
2006 #: ../src/guestfs.pod:1012
2007 msgid "Does the string begin with C</dev/sd>?"
2011 #: ../src/guestfs.pod:1016
2013 "Does the named device exist? If so, we use that device. However if I<not> "
2014 "then we continue with this algorithm."
2018 #: ../src/guestfs.pod:1021
2019 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2023 #: ../src/guestfs.pod:1023
2024 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2028 #: ../src/guestfs.pod:1025
2029 msgid "If that named device exists, use it. If not, continue."
2033 #: ../src/guestfs.pod:1029
2034 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2038 #: ../src/guestfs.pod:1031
2039 msgid "If that named device exists, use it. If not, return an error."
2043 #: ../src/guestfs.pod:1035
2044 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
2048 #: ../src/guestfs.pod:1037
2050 "Although the standard naming scheme and automatic translation is useful for "
2051 "simple programs and guestfish scripts, for larger programs it is best not to "
2052 "rely on this mechanism."
2056 #: ../src/guestfs.pod:1041
2058 "Where possible for maximum future portability programs using libguestfs "
2059 "should use these future-proof techniques:"
2063 #: ../src/guestfs.pod:1048
2065 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2066 "device names, and then use those names directly."
2070 #: ../src/guestfs.pod:1051
2071 msgid "Since those device names exist by definition, they will never be translated."
2075 #: ../src/guestfs.pod:1056
2077 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2078 "filesystem labels."
2082 #: ../src/guestfs.pod:1061
2087 #: ../src/guestfs.pod:1063
2089 "This section discusses security implications of using libguestfs, "
2090 "particularly with untrusted or malicious guests or disk images."
2094 #: ../src/guestfs.pod:1066
2095 msgid "GENERAL SECURITY CONSIDERATIONS"
2099 #: ../src/guestfs.pod:1068
2101 "Be careful with any files or data that you download from a guest (by "
2102 "\"download\" we mean not just the L</guestfs_download> command but any "
2103 "command that reads files, filenames, directories or anything else from a "
2104 "disk image). An attacker could manipulate the data to fool your program "
2105 "into doing the wrong thing. Consider cases such as:"
2109 #: ../src/guestfs.pod:1078
2110 msgid "the data (file etc) not being present"
2114 #: ../src/guestfs.pod:1082
2115 msgid "being present but empty"
2119 #: ../src/guestfs.pod:1086
2120 msgid "being much larger than normal"
2124 #: ../src/guestfs.pod:1090
2125 msgid "containing arbitrary 8 bit data"
2129 #: ../src/guestfs.pod:1094
2130 msgid "being in an unexpected character encoding"
2134 #: ../src/guestfs.pod:1098
2135 msgid "containing homoglyphs."
2139 #: ../src/guestfs.pod:1102
2140 msgid "SECURITY OF MOUNTING FILESYSTEMS"
2144 #: ../src/guestfs.pod:1104
2146 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
2147 "(VFS) module can sometimes be escalated into exploits by deliberately "
2148 "creating a malicious, malformed filesystem. These exploits are very severe "
2149 "for two reasons. Firstly there are very many filesystem drivers in the "
2150 "kernel, and many of them are infrequently used and not much developer "
2151 "attention has been paid to the code. Linux userspace helps potential "
2152 "crackers by detecting the filesystem type and automatically choosing the "
2153 "right VFS driver, even if that filesystem type is obscure or unexpected for "
2154 "the administrator. Secondly, a kernel-level exploit is like a local root "
2155 "exploit (worse in some ways), giving immediate and total access to the "
2156 "system right down to the hardware level."
2160 #: ../src/guestfs.pod:1117
2162 "That explains why you should never mount a filesystem from an untrusted "
2163 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
2164 "inside a qemu virtual machine, usually running as a non-root user. The "
2165 "attacker would need to write a filesystem which first exploited the kernel, "
2166 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
2167 "the libguestfs protocol, and finally to be as serious as the host kernel "
2168 "exploit it would need to escalate its privileges to root. This multi-step "
2169 "escalation, performed by a static piece of data, is thought to be extremely "
2170 "hard to do, although we never say 'never' about security issues."
2174 #: ../src/guestfs.pod:1128
2176 "In any case callers can reduce the attack surface by forcing the filesystem "
2177 "type when mounting (use L</guestfs_mount_vfs>)."
2181 #: ../src/guestfs.pod:1131
2182 msgid "PROTOCOL SECURITY"
2186 #: ../src/guestfs.pod:1133
2188 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
2189 "defined upper message size. However a program that uses libguestfs must "
2190 "also take care - for example you can write a program that downloads a binary "
2191 "from a disk image and executes it locally, and no amount of protocol "
2192 "security will save you from the consequences."
2196 #: ../src/guestfs.pod:1139
2197 msgid "INSPECTION SECURITY"
2201 #: ../src/guestfs.pod:1141
2203 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
2204 "directly from the guest, and these could contain any 8 bit data. Callers "
2205 "should be careful to escape these before printing them to a structured file "
2206 "(for example, use HTML escaping if creating a web page)."
2210 #: ../src/guestfs.pod:1147
2212 "Guest configuration may be altered in unusual ways by the administrator of "
2213 "the virtual machine, and may not reflect reality (particularly for untrusted "
2214 "or actively malicious guests). For example we parse the hostname from "
2215 "configuration files like C</etc/sysconfig/network> that we find in the "
2216 "guest, but the guest administrator can easily manipulate these files to "
2217 "provide the wrong hostname."
2221 #: ../src/guestfs.pod:1155
2223 "The inspection API parses guest configuration using two external libraries: "
2224 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
2225 "designed to be robust in the face of malicious data, although denial of "
2226 "service attacks are still possible, for example with oversized configuration "
2231 #: ../src/guestfs.pod:1161
2232 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
2236 #: ../src/guestfs.pod:1163
2238 "Be very cautious about running commands from the guest. By running a "
2239 "command in the guest, you are giving CPU time to a binary that you do not "
2240 "control, under the same user account as the library, albeit wrapped in qemu "
2241 "virtualization. More information and alternatives can be found in the "
2242 "section L</RUNNING COMMANDS>."
2246 #: ../src/guestfs.pod:1169
2247 msgid "CVE-2010-3851"
2251 #: ../src/guestfs.pod:1171
2252 msgid "https://bugzilla.redhat.com/642934"
2256 #: ../src/guestfs.pod:1173
2258 "This security bug concerns the automatic disk format detection that qemu "
2259 "does on disk images."
2263 #: ../src/guestfs.pod:1176
2265 "A raw disk image is just the raw bytes, there is no header. Other disk "
2266 "images like qcow2 contain a special header. Qemu deals with this by looking "
2267 "for one of the known headers, and if none is found then assuming the disk "
2268 "image must be raw."
2272 #: ../src/guestfs.pod:1181
2274 "This allows a guest which has been given a raw disk image to write some "
2275 "other header. At next boot (or when the disk image is accessed by "
2276 "libguestfs) qemu would do autodetection and think the disk image format was, "
2277 "say, qcow2 based on the header written by the guest."
2281 #: ../src/guestfs.pod:1186
2283 "This in itself would not be a problem, but qcow2 offers many features, one "
2284 "of which is to allow a disk image to refer to another image (called the "
2285 "\"backing disk\"). It does this by placing the path to the backing disk "
2286 "into the qcow2 header. This path is not validated and could point to any "
2287 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
2288 "\"holes\" in the qcow2 disk image, which of course is completely under the "
2289 "control of the attacker."
2293 #: ../src/guestfs.pod:1194
2294 msgid "In libguestfs this is rather hard to exploit except under two circumstances:"
2298 #: ../src/guestfs.pod:1201
2299 msgid "You have enabled the network or have opened the disk in write mode."
2303 #: ../src/guestfs.pod:1205
2305 "You are also running untrusted code from the guest (see L</RUNNING "
2310 #: ../src/guestfs.pod:1210
2312 "The way to avoid this is to specify the expected disk format when adding "
2313 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
2314 "should always do this if the disk is raw format, and it's a good idea for "
2319 #: ../src/guestfs.pod:1215
2321 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
2322 "format is fetched from libvirt and passed through."
2326 #: ../src/guestfs.pod:1218
2328 "For libguestfs tools, use the I<--format> command line parameter as "
2333 #: ../src/guestfs.pod:1221
2334 msgid "CONNECTION MANAGEMENT"
2338 #: ../src/guestfs.pod:1223
2343 #: ../src/guestfs.pod:1225
2345 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
2346 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
2347 "handle and release all resources used."
2351 #: ../src/guestfs.pod:1229
2353 "For information on using multiple handles and threads, see the section "
2354 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> below."
2358 #: ../src/guestfs.pod:1232
2359 msgid "guestfs_create"
2363 #: ../src/guestfs.pod:1234
2366 " guestfs_h *guestfs_create (void);\n"
2371 #: ../src/guestfs.pod:1236
2372 msgid "Create a connection handle."
2376 #: ../src/guestfs.pod:1238
2378 "You have to call L</guestfs_add_drive_opts> (or one of the equivalent calls) "
2379 "on the handle at least once."
2383 #: ../src/guestfs.pod:1241
2385 "This function returns a non-NULL pointer to a handle on success or NULL on "
2390 #: ../src/guestfs.pod:1244
2391 msgid "After configuring the handle, you have to call L</guestfs_launch>."
2395 #: ../src/guestfs.pod:1246
2397 "You may also want to configure error handling for the handle. See L</ERROR "
2398 "HANDLING> section below."
2402 #: ../src/guestfs.pod:1249
2403 msgid "guestfs_close"
2407 #: ../src/guestfs.pod:1251
2410 " void guestfs_close (guestfs_h *g);\n"
2415 #: ../src/guestfs.pod:1253
2416 msgid "This closes the connection handle and frees up all resources used."
2420 #: ../src/guestfs.pod:1255
2421 msgid "ERROR HANDLING"
2425 #: ../src/guestfs.pod:1257
2427 "API functions can return errors. For example, almost all functions that "
2428 "return C<int> will return C<-1> to indicate an error."
2432 #: ../src/guestfs.pod:1260
2434 "Additional information is available for errors: an error message string and "
2435 "optionally an error number (errno) if the thing that failed was a system "
2440 #: ../src/guestfs.pod:1264
2442 "You can get at the additional information about the last error on the handle "
2443 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
2444 "up an error handler with L</guestfs_set_error_handler>."
2448 #: ../src/guestfs.pod:1269
2450 "When the handle is created, a default error handler is installed which "
2451 "prints the error message string to C<stderr>. For small short-running "
2452 "command line programs it is sufficient to do:"
2456 #: ../src/guestfs.pod:1273
2459 " if (guestfs_launch (g) == -1)\n"
2460 " exit (EXIT_FAILURE);\n"
2465 #: ../src/guestfs.pod:1276
2467 "since the default error handler will ensure that an error message has been "
2468 "printed to C<stderr> before the program exits."
2472 #: ../src/guestfs.pod:1279
2474 "For other programs the caller will almost certainly want to install an "
2475 "alternate error handler or do error handling in-line like this:"
2479 #: ../src/guestfs.pod:1282
2482 " g = guestfs_create ();\n"
2487 #: ../src/guestfs.pod:1284
2490 " /* This disables the default behaviour of printing errors\n"
2492 " guestfs_set_error_handler (g, NULL, NULL);\n"
2497 #: ../src/guestfs.pod:1288
2500 " if (guestfs_launch (g) == -1) {\n"
2501 " /* Examine the error message and print it etc. */\n"
2502 " char *msg = guestfs_last_error (g);\n"
2503 " int errnum = guestfs_last_errno (g);\n"
2504 " fprintf (stderr, \"%s\\n\", msg);\n"
2511 #: ../src/guestfs.pod:1296
2513 "Out of memory errors are handled differently. The default action is to call "
2514 "L<abort(3)>. If this is undesirable, then you can set a handler using "
2515 "L</guestfs_set_out_of_memory_handler>."
2519 #: ../src/guestfs.pod:1300
2521 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
2522 "because there is no handle if this happens there is no way to get additional "
2523 "error information. However L</guestfs_create> is supposed to be a "
2524 "lightweight operation which can only fail because of insufficient memory (it "
2525 "returns NULL in this case)."
2529 #: ../src/guestfs.pod:1306
2530 msgid "guestfs_last_error"
2534 #: ../src/guestfs.pod:1308
2537 " const char *guestfs_last_error (guestfs_h *g);\n"
2542 #: ../src/guestfs.pod:1310
2544 "This returns the last error message that happened on C<g>. If there has not "
2545 "been an error since the handle was created, then this returns C<NULL>."
2549 #: ../src/guestfs.pod:1314
2551 "The lifetime of the returned string is until the next error occurs, or "
2552 "L</guestfs_close> is called."
2556 #: ../src/guestfs.pod:1317
2557 msgid "guestfs_last_errno"
2561 #: ../src/guestfs.pod:1319
2564 " int guestfs_last_errno (guestfs_h *g);\n"
2569 #: ../src/guestfs.pod:1321
2570 msgid "This returns the last error number (errno) that happened on C<g>."
2574 #: ../src/guestfs.pod:1323
2575 msgid "If successful, an errno integer not equal to zero is returned."
2579 #: ../src/guestfs.pod:1325
2580 msgid "If no error, this returns 0. This call can return 0 in three situations:"
2584 #: ../src/guestfs.pod:1332
2585 msgid "There has not been any error on the handle."
2589 #: ../src/guestfs.pod:1336
2591 "There has been an error but the errno was meaningless. This corresponds to "
2592 "the case where the error did not come from a failed system call, but for "
2593 "some other reason."
2597 #: ../src/guestfs.pod:1342
2599 "There was an error from a failed system call, but for some reason the errno "
2600 "was not captured and returned. This usually indicates a bug in libguestfs."
2604 #: ../src/guestfs.pod:1348
2606 "Libguestfs tries to convert the errno from inside the applicance into a "
2607 "corresponding errno for the caller (not entirely trivial: the appliance "
2608 "might be running a completely different operating system from the library "
2609 "and error numbers are not standardized across Un*xen). If this could not be "
2610 "done, then the error is translated to C<EINVAL>. In practice this should "
2611 "only happen in very rare circumstances."
2615 #: ../src/guestfs.pod:1356
2616 msgid "guestfs_set_error_handler"
2620 #: ../src/guestfs.pod:1358
2623 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
2625 " const char *msg);\n"
2626 " void guestfs_set_error_handler (guestfs_h *g,\n"
2627 " guestfs_error_handler_cb cb,\n"
2633 #: ../src/guestfs.pod:1365
2635 "The callback C<cb> will be called if there is an error. The parameters "
2636 "passed to the callback are an opaque data pointer and the error message "
2641 #: ../src/guestfs.pod:1369
2643 "C<errno> is not passed to the callback. To get that the callback must call "
2644 "L</guestfs_last_errno>."
2648 #: ../src/guestfs.pod:1372
2650 "Note that the message string C<msg> is freed as soon as the callback "
2651 "function returns, so if you want to stash it somewhere you must make your "
2656 #: ../src/guestfs.pod:1376
2657 msgid "The default handler prints messages on C<stderr>."
2661 #: ../src/guestfs.pod:1378
2662 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
2666 #: ../src/guestfs.pod:1380
2667 msgid "guestfs_get_error_handler"
2671 #: ../src/guestfs.pod:1382
2674 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
2675 " void **opaque_rtn);\n"
2680 #: ../src/guestfs.pod:1385
2681 msgid "Returns the current error handler callback."
2685 #: ../src/guestfs.pod:1387
2686 msgid "guestfs_set_out_of_memory_handler"
2690 #: ../src/guestfs.pod:1389
2693 " typedef void (*guestfs_abort_cb) (void);\n"
2694 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
2695 " guestfs_abort_cb);\n"
2700 #: ../src/guestfs.pod:1393
2702 "The callback C<cb> will be called if there is an out of memory situation. "
2703 "I<Note this callback must not return>."
2707 #: ../src/guestfs.pod:1396
2708 msgid "The default is to call L<abort(3)>."
2712 #: ../src/guestfs.pod:1398
2713 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
2717 #: ../src/guestfs.pod:1401
2718 msgid "guestfs_get_out_of_memory_handler"
2722 #: ../src/guestfs.pod:1403
2725 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
2730 #: ../src/guestfs.pod:1405
2731 msgid "This returns the current out of memory handler."
2735 #: ../src/guestfs.pod:1407
2740 #: ../src/guestfs.pod:1409 ../fish/guestfish.pod:958
2745 #: ../src/guestfs.pod:1411
2750 #: ../src/guestfs.pod:1413
2755 #: ../src/guestfs.pod:1415
2756 msgid "AVAILABILITY"
2760 #: ../src/guestfs.pod:1417
2761 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
2765 #: ../src/guestfs.pod:1419
2767 "Using L</guestfs_available> you can test availability of the following "
2768 "groups of functions. This test queries the appliance to see if the "
2769 "appliance you are currently using supports the functionality."
2773 #: ../src/guestfs.pod:1424
2774 msgid "@AVAILABILITY@"
2778 #: ../src/guestfs.pod:1426
2779 msgid "GUESTFISH supported COMMAND"
2783 #: ../src/guestfs.pod:1428
2785 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
2786 "prints out the available groups and whether they are supported by this build "
2787 "of libguestfs. Note however that you have to do C<run> first."
2791 #: ../src/guestfs.pod:1433
2792 msgid "SINGLE CALLS AT COMPILE TIME"
2796 #: ../src/guestfs.pod:1435
2798 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
2799 "function, such as:"
2803 #: ../src/guestfs.pod:1438
2806 " #define LIBGUESTFS_HAVE_DD 1\n"
2811 #: ../src/guestfs.pod:1440
2812 msgid "if L</guestfs_dd> is available."
2816 #: ../src/guestfs.pod:1442
2818 "Before version 1.5.8, if you needed to test whether a single libguestfs "
2819 "function is available at compile time, we recommended using build tools such "
2820 "as autoconf or cmake. For example in autotools you could use:"
2824 #: ../src/guestfs.pod:1447
2827 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
2828 " AC_CHECK_FUNCS([guestfs_dd])\n"
2833 #: ../src/guestfs.pod:1450
2835 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
2840 #: ../src/guestfs.pod:1453
2841 msgid "SINGLE CALLS AT RUN TIME"
2845 #: ../src/guestfs.pod:1455
2847 "Testing at compile time doesn't guarantee that a function really exists in "
2848 "the library. The reason is that you might be dynamically linked against a "
2849 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
2850 "This situation unfortunately results in a segmentation fault, which is a "
2851 "shortcoming of the C dynamic linking system itself."
2855 #: ../src/guestfs.pod:1462
2857 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2858 "in this example program (note that you still need the compile time check as "
2863 #: ../src/guestfs.pod:1466
2866 " #include <stdio.h>\n"
2867 " #include <stdlib.h>\n"
2868 " #include <unistd.h>\n"
2869 " #include <dlfcn.h>\n"
2870 " #include <guestfs.h>\n"
2875 #: ../src/guestfs.pod:1472
2880 " #ifdef LIBGUESTFS_HAVE_DD\n"
2882 " int has_function;\n"
2887 #: ../src/guestfs.pod:1478
2890 " /* Test if the function guestfs_dd is really available. */\n"
2891 " dl = dlopen (NULL, RTLD_LAZY);\n"
2893 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2894 " exit (EXIT_FAILURE);\n"
2896 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2902 #: ../src/guestfs.pod:1487
2905 " if (!has_function)\n"
2906 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2908 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2909 " /* Now it's safe to call\n"
2910 " guestfs_dd (g, \"foo\", \"bar\");\n"
2914 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2921 #: ../src/guestfs.pod:1500
2923 "You may think the above is an awful lot of hassle, and it is. There are "
2924 "other ways outside of the C linking system to ensure that this kind of "
2925 "incompatibility never arises, such as using package versioning:"
2929 #: ../src/guestfs.pod:1505
2932 " Requires: libguestfs >= 1.0.80\n"
2937 #: ../src/guestfs.pod:1507
2938 msgid "CALLS WITH OPTIONAL ARGUMENTS"
2942 #: ../src/guestfs.pod:1509
2944 "A recent feature of the API is the introduction of calls which take optional "
2945 "arguments. In C these are declared 3 ways. The main way is as a call which "
2946 "takes variable arguments (ie. C<...>), as in this example:"
2950 #: ../src/guestfs.pod:1514
2953 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
2958 #: ../src/guestfs.pod:1516
2960 "Call this with a list of optional arguments, terminated by C<-1>. So to "
2961 "call with no optional arguments specified:"
2965 #: ../src/guestfs.pod:1519
2968 " guestfs_add_drive_opts (g, filename, -1);\n"
2973 #: ../src/guestfs.pod:1521
2974 msgid "With a single optional argument:"
2978 #: ../src/guestfs.pod:1523
2981 " guestfs_add_drive_opts (g, filename,\n"
2982 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2988 #: ../src/guestfs.pod:1527
2993 #: ../src/guestfs.pod:1529
2996 " guestfs_add_drive_opts (g, filename,\n"
2997 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2998 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
3004 #: ../src/guestfs.pod:1534
3006 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
3011 #: ../src/guestfs.pod:1537
3012 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
3016 #: ../src/guestfs.pod:1539
3018 "The second variant has the same name with the suffix C<_va>, which works the "
3019 "same way but takes a C<va_list>. See the C manual for details. For the "
3020 "example function, this is declared:"
3024 #: ../src/guestfs.pod:1543
3027 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
3033 #: ../src/guestfs.pod:1546
3034 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
3038 #: ../src/guestfs.pod:1548
3040 "The third variant is useful where you need to construct these calls. You "
3041 "pass in a structure where you fill in the optional fields. The structure "
3042 "has a bitmask as the first element which you must set to indicate which "
3043 "fields you have filled in. For our example function the structure and call "
3048 #: ../src/guestfs.pod:1554
3051 " struct guestfs_add_drive_opts_argv {\n"
3052 " uint64_t bitmask;\n"
3054 " const char *format;\n"
3057 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
3058 " const struct guestfs_add_drive_opts_argv *optargs);\n"
3063 #: ../src/guestfs.pod:1563
3064 msgid "You could call it like this:"
3068 #: ../src/guestfs.pod:1565
3071 " struct guestfs_add_drive_opts_argv optargs = {\n"
3072 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
3073 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
3075 " .format = \"qcow2\"\n"
3081 #: ../src/guestfs.pod:1572
3084 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
3089 #: ../src/guestfs.pod:1574 ../src/guestfs-actions.pod:11 ../src/guestfs-actions.pod:1844 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1255
3094 #: ../src/guestfs.pod:1580
3095 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
3099 #: ../src/guestfs.pod:1585
3100 msgid "You do not need to fill in all fields of the structure."
3104 #: ../src/guestfs.pod:1589
3106 "There must be a one-to-one correspondence between fields of the structure "
3107 "that are filled in, and bits set in the bitmask."
3111 #: ../src/guestfs.pod:1594
3112 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
3116 #: ../src/guestfs.pod:1596
3118 "In other languages, optional arguments are expressed in the way that is "
3119 "natural for that language. We refer you to the language-specific "
3120 "documentation for more details on that."
3124 #: ../src/guestfs.pod:1600
3125 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
3129 #: ../src/guestfs.pod:1602
3130 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
3134 #: ../src/guestfs.pod:1604
3136 "The child process generates events in some situations. Current events "
3137 "include: receiving a log message, the child process exits."
3141 #: ../src/guestfs.pod:1607
3143 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
3148 #: ../src/guestfs.pod:1610
3150 "Only I<one callback of each type> can be registered for each handle. "
3151 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
3152 "that type. Cancel all callbacks of this type by calling this function with "
3153 "C<cb> set to C<NULL>."
3157 #: ../src/guestfs.pod:1615
3158 msgid "guestfs_set_log_message_callback"
3162 #: ../src/guestfs.pod:1617
3165 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
3166 " char *buf, int len);\n"
3167 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
3168 " guestfs_log_message_cb cb,\n"
3174 #: ../src/guestfs.pod:1623
3176 "The callback function C<cb> will be called whenever qemu or the guest writes "
3177 "anything to the console."
3181 #: ../src/guestfs.pod:1626
3182 msgid "Use this function to capture kernel messages and similar."
3186 #: ../src/guestfs.pod:1628
3188 "Normally there is no log message handler, and log messages are just "
3193 #: ../src/guestfs.pod:1631
3194 msgid "guestfs_set_subprocess_quit_callback"
3198 #: ../src/guestfs.pod:1633
3201 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
3202 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
3203 " guestfs_subprocess_quit_cb cb,\n"
3209 #: ../src/guestfs.pod:1638
3211 "The callback function C<cb> will be called when the child process quits, "
3212 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
3213 "corresponds to a transition from any state to the CONFIG state)."
3217 #: ../src/guestfs.pod:1643
3218 msgid "guestfs_set_launch_done_callback"
3222 #: ../src/guestfs.pod:1645
3225 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
3226 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
3227 " guestfs_launch_done_cb cb,\n"
3233 #: ../src/guestfs.pod:1650
3235 "The callback function C<cb> will be called when the child process becomes "
3236 "ready first time after it has been launched. (This corresponds to a "
3237 "transition from LAUNCHING to the READY state)."
3241 #: ../src/guestfs.pod:1654
3242 msgid "guestfs_set_close_callback"
3246 #: ../src/guestfs.pod:1656
3249 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
3250 " void guestfs_set_close_callback (guestfs_h *g,\n"
3251 " guestfs_close_cb cb,\n"
3257 #: ../src/guestfs.pod:1661
3259 "The callback function C<cb> will be called while the handle is being closed "
3260 "(synchronously from L</guestfs_close>)."
3264 #: ../src/guestfs.pod:1664
3266 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
3267 "handles that are open when the program exits. This means that this callback "
3268 "might be called indirectly from L<exit(3)>, which can cause unexpected "
3269 "problems in higher-level languages (eg. if your HLL interpreter has already "
3270 "been cleaned up by the time this is called, and if your callback then jumps "
3271 "into some HLL function)."
3275 #: ../src/guestfs.pod:1672
3276 msgid "guestfs_set_progress_callback"
3280 #: ../src/guestfs.pod:1674
3283 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
3284 " int proc_nr, int serial,\n"
3285 " uint64_t position, uint64_t total);\n"
3286 " void guestfs_set_progress_callback (guestfs_h *g,\n"
3287 " guestfs_progress_cb cb,\n"
3293 #: ../src/guestfs.pod:1681
3295 "Some long-running operations can generate progress messages. If this "
3296 "callback is registered, then it will be called each time a progress message "
3297 "is generated (usually two seconds after the operation started, and three "
3298 "times per second thereafter until it completes, although the frequency may "
3299 "change in future versions)."
3303 #: ../src/guestfs.pod:1687
3305 "The callback receives two numbers: C<position> and C<total>. The units of "
3306 "C<total> are not defined, although for some operations C<total> may relate "
3307 "in some way to the amount of data to be transferred (eg. in bytes or "
3308 "megabytes), and C<position> may be the portion which has been transferred."
3312 #: ../src/guestfs.pod:1693
3313 msgid "The only defined and stable parts of the API are:"
3317 #: ../src/guestfs.pod:1699
3319 "The callback can display to the user some type of progress bar or indicator "
3320 "which shows the ratio of C<position>:C<total>."
3324 #: ../src/guestfs.pod:1704
3325 msgid "0 E<lt>= C<position> E<lt>= C<total>"
3329 #: ../src/guestfs.pod:1708
3331 "If any progress notification is sent during a call, then a final progress "
3332 "notification is always sent when C<position> = C<total>."
3336 #: ../src/guestfs.pod:1711
3338 "This is to simplify caller code, so callers can easily set the progress "
3339 "indicator to \"100%\" at the end of the operation, without requiring special "
3340 "code to detect this case."
3344 #: ../src/guestfs.pod:1717
3346 "The callback also receives the procedure number and serial number of the "
3347 "call. These are only useful for debugging protocol issues, and the callback "
3348 "can normally ignore them. The callback may want to print these numbers in "
3349 "error messages or debugging messages."
3353 #: ../src/guestfs.pod:1722
3354 msgid "PRIVATE DATA AREA"
3358 #: ../src/guestfs.pod:1724
3360 "You can attach named pieces of private data to the libguestfs handle, and "
3361 "fetch them by name for the lifetime of the handle. This is called the "
3362 "private data area and is only available from the C API."
3366 #: ../src/guestfs.pod:1728
3367 msgid "To attach a named piece of data, use the following call:"
3371 #: ../src/guestfs.pod:1730
3374 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
3379 #: ../src/guestfs.pod:1732
3381 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
3382 "pointer (which can be C<NULL>). Any previous item with the same name is "
3387 #: ../src/guestfs.pod:1736
3389 "You can use any C<key> you want, but names beginning with an underscore "
3390 "character are reserved for internal libguestfs purposes (for implementing "
3391 "language bindings). It is recommended to prefix the name with some unique "
3392 "string to avoid collisions with other users."
3396 #: ../src/guestfs.pod:1741
3397 msgid "To retrieve the pointer, use:"
3401 #: ../src/guestfs.pod:1743
3404 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
3409 #: ../src/guestfs.pod:1745
3411 "This function returns C<NULL> if either no data is found associated with "
3412 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
3417 #: ../src/guestfs.pod:1749
3419 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
3420 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
3421 "all. In particular, libguestfs does I<not> try to free the data when the "
3422 "handle is closed. If the data must be freed, then the caller must either "
3423 "free it before calling L</guestfs_close> or must set up a close callback to "
3424 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
3425 "can be registered for a handle)."
3429 #: ../src/guestfs.pod:1757
3431 "The private data area is implemented using a hash table, and should be "
3432 "reasonably efficient for moderate numbers of keys."
3436 #: ../src/guestfs.pod:1760 ../src/guestfs.pod:1765
3441 #: ../src/guestfs.pod:1762
3443 "<!-- old anchor for the next section --> <a "
3444 "name=\"state_machine_and_low_level_event_api\"/>"
3448 #: ../src/guestfs.pod:1767
3449 msgid "ARCHITECTURE"
3453 #: ../src/guestfs.pod:1769
3455 "Internally, libguestfs is implemented by running an appliance (a special "
3456 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
3457 "process of the main program."
3461 #: ../src/guestfs.pod:1773
3464 " ___________________\n"
3466 " | main program |\n"
3468 " | | child process / appliance\n"
3469 " | | __________________________\n"
3471 " +-------------------+ RPC | +-----------------+ |\n"
3472 " | libguestfs <--------------------> guestfsd | |\n"
3473 " | | | +-----------------+ |\n"
3474 " \\___________________/ | | Linux kernel | |\n"
3475 " | +--^--------------+ |\n"
3476 " \\_________|________________/\n"
3482 " \\______________/\n"
3487 #: ../src/guestfs.pod:1793
3489 "The library, linked to the main program, creates the child process and hence "
3490 "the appliance in the L</guestfs_launch> function."
3494 #: ../src/guestfs.pod:1796
3496 "Inside the appliance is a Linux kernel and a complete stack of userspace "
3497 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
3498 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
3499 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
3500 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
3501 "attached to the qemu process which translates device access by the "
3502 "appliance's Linux kernel into accesses to the image."
3506 #: ../src/guestfs.pod:1805
3508 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
3509 "Although the disk image you are attached to might also be used by some "
3510 "virtual machine, libguestfs doesn't know or care about this. (But you will "
3511 "care if both libguestfs's qemu process and your virtual machine are trying "
3512 "to update the disk image at the same time, since these usually results in "
3513 "massive disk corruption)."
3517 #: ../src/guestfs.pod:1812
3518 msgid "STATE MACHINE"
3522 #: ../src/guestfs.pod:1814
3523 msgid "libguestfs uses a state machine to model the child process:"
3527 #: ../src/guestfs.pod:1816
3539 " / | \\ \\ guestfs_launch\n"
3540 " / | _\\__V______\n"
3542 " / | | LAUNCHING |\n"
3543 " / | \\___________/\n"
3545 " / | guestfs_launch\n"
3547 " ______ / __|____V\n"
3548 " / \\ ------> / \\\n"
3549 " | BUSY | | READY |\n"
3550 " \\______/ <------ \\________/\n"
3555 #: ../src/guestfs.pod:1838
3557 "The normal transitions are (1) CONFIG (when the handle is created, but there "
3558 "is no child process), (2) LAUNCHING (when the child process is booting up), "
3559 "(3) alternating between READY and BUSY as commands are issued to, and "
3560 "carried out by, the child process."
3564 #: ../src/guestfs.pod:1843
3566 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
3567 "asynchronously at any time (eg. due to some internal error), and that causes "
3568 "the state to transition back to CONFIG."
3572 #: ../src/guestfs.pod:1847
3574 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
3575 "issued when in the CONFIG state."
3579 #: ../src/guestfs.pod:1850
3581 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
3582 "L</guestfs_launch> blocks until the child process is READY to accept "
3583 "commands (or until some failure or timeout). L</guestfs_launch> internally "
3584 "moves the state from CONFIG to LAUNCHING while it is running."
3588 #: ../src/guestfs.pod:1856
3590 "API actions such as L</guestfs_mount> can only be issued when in the READY "
3591 "state. These API calls block waiting for the command to be carried out "
3592 "(ie. the state to transition to BUSY and then back to READY). There are no "
3593 "non-blocking versions, and no way to issue more than one command per handle "
3598 #: ../src/guestfs.pod:1862
3600 "Finally, the child process sends asynchronous messages back to the main "
3601 "program, such as kernel log messages. You can register a callback to "
3602 "receive these messages."
3606 #: ../src/guestfs.pod:1866
3611 #: ../src/guestfs.pod:1868
3612 msgid "COMMUNICATION PROTOCOL"
3616 #: ../src/guestfs.pod:1870
3618 "Don't rely on using this protocol directly. This section documents how it "
3619 "currently works, but it may change at any time."
3623 #: ../src/guestfs.pod:1873
3625 "The protocol used to talk between the library and the daemon running inside "
3626 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
3627 "1014, RFC 1832, RFC 4506)."
3631 #: ../src/guestfs.pod:1877
3633 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
3634 "this file is automatically generated)."
3638 #: ../src/guestfs.pod:1880
3640 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
3641 "and C<FileOut> parameters, which are handled with very simple request/reply "
3642 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
3643 "parameters, which use the same request and reply messages, but they may also "
3644 "be followed by files sent using a chunked encoding."
3648 #: ../src/guestfs.pod:1887
3649 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
3653 #: ../src/guestfs.pod:1889
3654 msgid "For ordinary functions, the request message is:"
3658 #: ../src/guestfs.pod:1891
3661 " total length (header + arguments,\n"
3662 " but not including the length word itself)\n"
3663 " struct guestfs_message_header (encoded as XDR)\n"
3664 " struct guestfs_<foo>_args (encoded as XDR)\n"
3669 #: ../src/guestfs.pod:1896
3671 "The total length field allows the daemon to allocate a fixed size buffer "
3672 "into which it slurps the rest of the message. As a result, the total length "
3673 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
3674 "effective size of any request is limited to somewhere under this size."
3678 #: ../src/guestfs.pod:1902
3680 "Note also that many functions don't take any arguments, in which case the "
3681 "C<guestfs_I<foo>_args> is completely omitted."
3685 #: ../src/guestfs.pod:1905
3687 "The header contains the procedure number (C<guestfs_proc>) which is how the "
3688 "receiver knows what type of args structure to expect, or none at all."
3692 #: ../src/guestfs.pod:1909
3694 "For functions that take optional arguments, the optional arguments are "
3695 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
3696 "arguments. A bitmask in the header indicates which optional arguments are "
3697 "meaningful. The bitmask is also checked to see if it contains bits set "
3698 "which the daemon does not know about (eg. if more optional arguments were "
3699 "added in a later version of the library), and this causes the call to be "
3704 #: ../src/guestfs.pod:1917
3705 msgid "The reply message for ordinary functions is:"
3709 #: ../src/guestfs.pod:1919
3712 " total length (header + ret,\n"
3713 " but not including the length word itself)\n"
3714 " struct guestfs_message_header (encoded as XDR)\n"
3715 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3720 #: ../src/guestfs.pod:1924
3722 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
3723 "functions that return no formal return values."
3727 #: ../src/guestfs.pod:1927
3728 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
3732 #: ../src/guestfs.pod:1930
3734 "In the case of an error, a flag is set in the header, and the reply message "
3735 "is slightly changed:"
3739 #: ../src/guestfs.pod:1933
3742 " total length (header + error,\n"
3743 " but not including the length word itself)\n"
3744 " struct guestfs_message_header (encoded as XDR)\n"
3745 " struct guestfs_message_error (encoded as XDR)\n"
3750 #: ../src/guestfs.pod:1938
3752 "The C<guestfs_message_error> structure contains the error message as a "
3757 #: ../src/guestfs.pod:1941
3758 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
3762 #: ../src/guestfs.pod:1943
3764 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
3765 "The normal request message is sent (see above). However this is followed by "
3766 "a sequence of file chunks."
3770 #: ../src/guestfs.pod:1947
3773 " total length (header + arguments,\n"
3774 " but not including the length word itself,\n"
3775 " and not including the chunks)\n"
3776 " struct guestfs_message_header (encoded as XDR)\n"
3777 " struct guestfs_<foo>_args (encoded as XDR)\n"
3778 " sequence of chunks for FileIn param #0\n"
3779 " sequence of chunks for FileIn param #1 etc.\n"
3784 #: ../src/guestfs.pod:1955
3785 msgid "The \"sequence of chunks\" is:"
3789 #: ../src/guestfs.pod:1957
3792 " length of chunk (not including length word itself)\n"
3793 " struct guestfs_chunk (encoded as XDR)\n"
3794 " length of chunk\n"
3795 " struct guestfs_chunk (encoded as XDR)\n"
3797 " length of chunk\n"
3798 " struct guestfs_chunk (with data.data_len == 0)\n"
3803 #: ../src/guestfs.pod:1965
3805 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
3806 "is set in the final chunk to indicate either successful completion or early "
3811 #: ../src/guestfs.pod:1969
3813 "At time of writing there are no functions that have more than one FileIn "
3814 "parameter. However this is (theoretically) supported, by sending the "
3815 "sequence of chunks for each FileIn parameter one after another (from left to "
3820 #: ../src/guestfs.pod:1974
3822 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
3823 "transfer. The library does this by sending a chunk with a special flag set "
3824 "to indicate cancellation. When the daemon sees this, it cancels the whole "
3825 "RPC, does I<not> send any reply, and goes back to reading the next request."
3829 #: ../src/guestfs.pod:1980
3831 "The daemon may also cancel. It does this by writing a special word "
3832 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
3833 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
3834 "cancel chunk). The special word is chosen so that even if cancellation "
3835 "happens right at the end of the transfer (after the library has finished "
3836 "writing and has started listening for the reply), the \"spurious\" cancel "
3837 "flag will not be confused with the reply message."
3841 #: ../src/guestfs.pod:1989
3843 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
3844 "limit), and also files where the size is not known in advance (eg. from "
3845 "pipes or sockets). However the chunks are rather small "
3846 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
3847 "to keep much in memory."
3851 #: ../src/guestfs.pod:1995
3852 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
3856 #: ../src/guestfs.pod:1997
3858 "The protocol for FileOut parameters is exactly the same as for FileIn "
3859 "parameters, but with the roles of daemon and library reversed."
3863 #: ../src/guestfs.pod:2000
3866 " total length (header + ret,\n"
3867 " but not including the length word itself,\n"
3868 " and not including the chunks)\n"
3869 " struct guestfs_message_header (encoded as XDR)\n"
3870 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3871 " sequence of chunks for FileOut param #0\n"
3872 " sequence of chunks for FileOut param #1 etc.\n"
3877 #: ../src/guestfs.pod:2008
3878 msgid "INITIAL MESSAGE"
3882 #: ../src/guestfs.pod:2010
3884 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
3885 "which indicates that the guest and daemon is alive. This is what "
3886 "L</guestfs_launch> waits for."
3890 #: ../src/guestfs.pod:2014
3891 msgid "PROGRESS NOTIFICATION MESSAGES"
3895 #: ../src/guestfs.pod:2016
3897 "The daemon may send progress notification messages at any time. These are "
3898 "distinguished by the normal length word being replaced by "
3899 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
3903 #: ../src/guestfs.pod:2020
3905 "The library turns them into progress callbacks (see "
3906 "C<guestfs_set_progress_callback>) if there is a callback registered, or "
3907 "discards them if not."
3911 #: ../src/guestfs.pod:2024
3913 "The daemon self-limits the frequency of progress messages it sends (see "
3914 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
3919 #: ../src/guestfs.pod:2028
3920 msgid "LIBGUESTFS VERSION NUMBERS"
3924 #: ../src/guestfs.pod:2030
3926 "Since April 2010, libguestfs has started to make separate development and "
3927 "stable releases, along with corresponding branches in our git repository. "
3928 "These separate releases can be identified by version number:"
3932 #: ../src/guestfs.pod:2035
3935 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3936 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3942 " | `-------- sub-version\n"
3944 " `------ always '1' because we don't change the ABI\n"
3949 #: ../src/guestfs.pod:2046
3950 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3954 #: ../src/guestfs.pod:2048
3956 "As time passes we cherry pick fixes from the development branch and backport "
3957 "those into the stable branch, the effect being that the stable branch should "
3958 "get more stable and less buggy over time. So the stable releases are ideal "
3959 "for people who don't need new features but would just like the software to "
3964 #: ../src/guestfs.pod:2054
3965 msgid "Our criteria for backporting changes are:"
3969 #: ../src/guestfs.pod:2060
3971 "Documentation changes which don't affect any code are backported unless the "
3972 "documentation refers to a future feature which is not in stable."
3976 #: ../src/guestfs.pod:2066
3978 "Bug fixes which are not controversial, fix obvious problems, and have been "
3979 "well tested are backported."
3983 #: ../src/guestfs.pod:2071
3985 "Simple rearrangements of code which shouldn't affect how it works get "
3986 "backported. This is so that the code in the two branches doesn't get too "
3987 "far out of step, allowing us to backport future fixes more easily."
3991 #: ../src/guestfs.pod:2077
3993 "We I<don't> backport new features, new APIs, new tools etc, except in one "
3994 "exceptional case: the new feature is required in order to implement an "
3995 "important bug fix."
3999 #: ../src/guestfs.pod:2083
4001 "A new stable branch starts when we think the new features in development are "
4002 "substantial and compelling enough over the current stable branch to warrant "
4003 "it. When that happens we create new stable and development versions 1.N.0 "
4004 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
4005 "stable at this point, but by backporting fixes from development, that branch "
4006 "will stabilize over time."
4010 #: ../src/guestfs.pod:2091 ../fish/guestfish.pod:965 ../test-tool/libguestfs-test-tool.pod:104
4011 msgid "ENVIRONMENT VARIABLES"
4015 #: ../src/guestfs.pod:2095 ../fish/guestfish.pod:991
4016 msgid "LIBGUESTFS_APPEND"
4020 #: ../src/guestfs.pod:2097 ../fish/guestfish.pod:993
4021 msgid "Pass additional options to the guest kernel."
4025 #: ../src/guestfs.pod:2099 ../fish/guestfish.pod:995
4026 msgid "LIBGUESTFS_DEBUG"
4030 #: ../src/guestfs.pod:2101
4032 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
4033 "effect as calling C<guestfs_set_verbose (g, 1)>."
4037 #: ../src/guestfs.pod:2104 ../fish/guestfish.pod:1000
4038 msgid "LIBGUESTFS_MEMSIZE"
4042 #: ../src/guestfs.pod:2106 ../fish/guestfish.pod:1002
4043 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
4047 #: ../src/guestfs.pod:2109 ../fish/guestfish.pod:1005
4050 " LIBGUESTFS_MEMSIZE=700\n"
4055 #: ../src/guestfs.pod:2111 ../fish/guestfish.pod:1007
4056 msgid "LIBGUESTFS_PATH"
4060 #: ../src/guestfs.pod:2113
4062 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
4063 "the discussion of paths in section PATH above."
4067 #: ../src/guestfs.pod:2116 ../fish/guestfish.pod:1012
4068 msgid "LIBGUESTFS_QEMU"
4072 #: ../src/guestfs.pod:2118 ../fish/guestfish.pod:1014
4074 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
4075 "which was found at compile time by the configure script is used."
4079 #: ../src/guestfs.pod:2122
4080 msgid "See also L</QEMU WRAPPERS> above."
4084 #: ../src/guestfs.pod:2124 ../fish/guestfish.pod:1018
4085 msgid "LIBGUESTFS_TRACE"
4089 #: ../src/guestfs.pod:2126
4091 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
4092 "effect as calling C<guestfs_set_trace (g, 1)>."
4096 #: ../src/guestfs.pod:2129 ../fish/guestfish.pod:1027
4101 #: ../src/guestfs.pod:2131 ../fish/guestfish.pod:1029
4102 msgid "Location of temporary directory, defaults to C</tmp>."
4106 #: ../src/guestfs.pod:2133 ../fish/guestfish.pod:1031
4108 "If libguestfs was compiled to use the supermin appliance then the real "
4109 "appliance is cached in this directory, shared between all handles belonging "
4110 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
4111 "use in case C</tmp> is not large enough."
4115 #: ../src/guestfs.pod:2141 ../fish/guestfish.pod:1089 ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:233
4120 #: ../src/guestfs.pod:2143
4122 "L<guestfs-examples(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, "
4123 "L<guestfs-ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, "
4124 "L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)>, "
4125 "L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
4126 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
4127 "L<virt-rescue(1)>, L<virt-tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
4128 "L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
4132 #: ../src/guestfs.pod:2166
4134 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
4135 "L<lvm(8)>, L<disktype(1)>."
4139 #: ../src/guestfs.pod:2173
4144 #: ../src/guestfs.pod:2175
4145 msgid "To get a list of bugs against libguestfs use this link:"
4149 #: ../src/guestfs.pod:2177
4150 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
4154 #: ../src/guestfs.pod:2179
4155 msgid "To report a new bug against libguestfs use this link:"
4159 #: ../src/guestfs.pod:2181
4160 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
4164 #: ../src/guestfs.pod:2183
4165 msgid "When reporting a bug, please check:"
4169 #: ../src/guestfs.pod:2189
4170 msgid "That the bug hasn't been reported already."
4174 #: ../src/guestfs.pod:2193
4175 msgid "That you are testing a recent version."
4179 #: ../src/guestfs.pod:2197
4180 msgid "Describe the bug accurately, and give a way to reproduce it."
4184 #: ../src/guestfs.pod:2201
4186 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
4191 #: ../src/guestfs.pod:2206 ../fish/guestfish.pod:1108 ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:244
4196 #: ../src/guestfs.pod:2208 ../fish/guestfish.pod:1110 ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:246
4197 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4201 #: ../src/guestfs.pod:2210 ../fish/guestfish.pod:1112 ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:248
4206 #: ../src/guestfs.pod:2212 ../fish/guestfish.pod:1114 ../fuse/guestmount.pod:250
4207 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
4211 #: ../src/guestfs.pod:2215
4213 "This library is free software; you can redistribute it and/or modify it "
4214 "under the terms of the GNU Lesser General Public License as published by the "
4215 "Free Software Foundation; either version 2 of the License, or (at your "
4216 "option) any later version."
4220 #: ../src/guestfs.pod:2220
4222 "This library is distributed in the hope that it will be useful, but WITHOUT "
4223 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
4224 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
4229 #: ../src/guestfs.pod:2225
4231 "You should have received a copy of the GNU Lesser General Public License "
4232 "along with this library; if not, write to the Free Software Foundation, "
4233 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
4237 #: ../src/guestfs-actions.pod:1
4238 msgid "guestfs_add_cdrom"
4242 #: ../src/guestfs-actions.pod:3
4246 " guestfs_add_cdrom (guestfs_h *g,\n"
4247 " const char *filename);\n"
4252 #: ../src/guestfs-actions.pod:7 ../fish/guestfish-actions.pod:5
4253 msgid "This function adds a virtual CD-ROM disk image to the guest."
4257 #: ../src/guestfs-actions.pod:9 ../fish/guestfish-actions.pod:7
4258 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
4262 #: ../src/guestfs-actions.pod:17
4264 "This call checks for the existence of C<filename>. This stops you from "
4265 "specifying other types of drive which are supported by qemu such as C<nbd:> "
4266 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
4271 #: ../src/guestfs-actions.pod:24
4273 "If you just want to add an ISO file (often you use this as an efficient way "
4274 "to transfer large files into the guest), then you should probably use "
4275 "C<guestfs_add_drive_ro> instead."
4279 #: ../src/guestfs-actions.pod:30 ../src/guestfs-actions.pod:128 ../src/guestfs-actions.pod:189 ../src/guestfs-actions.pod:226 ../src/guestfs-actions.pod:240 ../src/guestfs-actions.pod:261 ../src/guestfs-actions.pod:281 ../src/guestfs-actions.pod:295 ../src/guestfs-actions.pod:410 ../src/guestfs-actions.pod:430 ../src/guestfs-actions.pod:444 ../src/guestfs-actions.pod:489 ../src/guestfs-actions.pod:517 ../src/guestfs-actions.pod:535 ../src/guestfs-actions.pod:602 ../src/guestfs-actions.pod:635 ../src/guestfs-actions.pod:649 ../src/guestfs-actions.pod:664 ../src/guestfs-actions.pod:763 ../src/guestfs-actions.pod:781 ../src/guestfs-actions.pod:795 ../src/guestfs-actions.pod:809 ../src/guestfs-actions.pod:970 ../src/guestfs-actions.pod:990 ../src/guestfs-actions.pod:1008 ../src/guestfs-actions.pod:1092 ../src/guestfs-actions.pod:1110 ../src/guestfs-actions.pod:1129 ../src/guestfs-actions.pod:1143 ../src/guestfs-actions.pod:1163 ../src/guestfs-actions.pod:1233 ../src/guestfs-actions.pod:1264 ../src/guestfs-actions.pod:1289 ../src/guestfs-actions.pod:1326 ../src/guestfs-actions.pod:1432 ../src/guestfs-actions.pod:1466 ../src/guestfs-actions.pod:1684 ../src/guestfs-actions.pod:1706 ../src/guestfs-actions.pod:1793 ../src/guestfs-actions.pod:2243 ../src/guestfs-actions.pod:2387 ../src/guestfs-actions.pod:2448 ../src/guestfs-actions.pod:2483 ../src/guestfs-actions.pod:3222 ../src/guestfs-actions.pod:3237 ../src/guestfs-actions.pod:3257 ../src/guestfs-actions.pod:3410 ../src/guestfs-actions.pod:3424 ../src/guestfs-actions.pod:3437 ../src/guestfs-actions.pod:3451 ../src/guestfs-actions.pod:3466 ../src/guestfs-actions.pod:3502 ../src/guestfs-actions.pod:3574 ../src/guestfs-actions.pod:3594 ../src/guestfs-actions.pod:3611 ../src/guestfs-actions.pod:3634 ../src/guestfs-actions.pod:3657 ../src/guestfs-actions.pod:3689 ../src/guestfs-actions.pod:3708 ../src/guestfs-actions.pod:3727 ../src/guestfs-actions.pod:3762 ../src/guestfs-actions.pod:3774 ../src/guestfs-actions.pod:3810 ../src/guestfs-actions.pod:3826 ../src/guestfs-actions.pod:3839 ../src/guestfs-actions.pod:3854 ../src/guestfs-actions.pod:3871 ../src/guestfs-actions.pod:3964 ../src/guestfs-actions.pod:3984 ../src/guestfs-actions.pod:3997 ../src/guestfs-actions.pod:4048 ../src/guestfs-actions.pod:4066 ../src/guestfs-actions.pod:4084 ../src/guestfs-actions.pod:4100 ../src/guestfs-actions.pod:4114 ../src/guestfs-actions.pod:4128 ../src/guestfs-actions.pod:4145 ../src/guestfs-actions.pod:4160 ../src/guestfs-actions.pod:4180 ../src/guestfs-actions.pod:4224 ../src/guestfs-actions.pod:4295 ../src/guestfs-actions.pod:4326 ../src/guestfs-actions.pod:4345 ../src/guestfs-actions.pod:4364 ../src/guestfs-actions.pod:4376 ../src/guestfs-actions.pod:4393 ../src/guestfs-actions.pod:4406 ../src/guestfs-actions.pod:4421 ../src/guestfs-actions.pod:4436 ../src/guestfs-actions.pod:4471 ../src/guestfs-actions.pod:4486 ../src/guestfs-actions.pod:4506 ../src/guestfs-actions.pod:4520 ../src/guestfs-actions.pod:4537 ../src/guestfs-actions.pod:4586 ../src/guestfs-actions.pod:4623 ../src/guestfs-actions.pod:4637 ../src/guestfs-actions.pod:4665 ../src/guestfs-actions.pod:4682 ../src/guestfs-actions.pod:4700 ../src/guestfs-actions.pod:4834 ../src/guestfs-actions.pod:4891 ../src/guestfs-actions.pod:4913 ../src/guestfs-actions.pod:4931 ../src/guestfs-actions.pod:4963 ../src/guestfs-actions.pod:5029 ../src/guestfs-actions.pod:5046 ../src/guestfs-actions.pod:5059 ../src/guestfs-actions.pod:5073 ../src/guestfs-actions.pod:5362 ../src/guestfs-actions.pod:5381 ../src/guestfs-actions.pod:5395 ../src/guestfs-actions.pod:5407 ../src/guestfs-actions.pod:5421 ../src/guestfs-actions.pod:5433 ../src/guestfs-actions.pod:5447 ../src/guestfs-actions.pod:5463 ../src/guestfs-actions.pod:5484 ../src/guestfs-actions.pod:5503 ../src/guestfs-actions.pod:5522 ../src/guestfs-actions.pod:5540 ../src/guestfs-actions.pod:5563 ../src/guestfs-actions.pod:5581 ../src/guestfs-actions.pod:5600 ../src/guestfs-actions.pod:5621 ../src/guestfs-actions.pod:5640 ../src/guestfs-actions.pod:5657 ../src/guestfs-actions.pod:5685 ../src/guestfs-actions.pod:5709 ../src/guestfs-actions.pod:5728 ../src/guestfs-actions.pod:5752 ../src/guestfs-actions.pod:5767 ../src/guestfs-actions.pod:5782 ../src/guestfs-actions.pod:5801 ../src/guestfs-actions.pod:5838 ../src/guestfs-actions.pod:5861 ../src/guestfs-actions.pod:5887 ../src/guestfs-actions.pod:5995 ../src/guestfs-actions.pod:6116 ../src/guestfs-actions.pod:6128 ../src/guestfs-actions.pod:6141 ../src/guestfs-actions.pod:6154 ../src/guestfs-actions.pod:6176 ../src/guestfs-actions.pod:6189 ../src/guestfs-actions.pod:6202 ../src/guestfs-actions.pod:6215 ../src/guestfs-actions.pod:6230 ../src/guestfs-actions.pod:6289 ../src/guestfs-actions.pod:6306 ../src/guestfs-actions.pod:6322 ../src/guestfs-actions.pod:6338 ../src/guestfs-actions.pod:6355 ../src/guestfs-actions.pod:6368 ../src/guestfs-actions.pod:6388 ../src/guestfs-actions.pod:6424 ../src/guestfs-actions.pod:6438 ../src/guestfs-actions.pod:6479 ../src/guestfs-actions.pod:6492 ../src/guestfs-actions.pod:6510 ../src/guestfs-actions.pod:6544 ../src/guestfs-actions.pod:6580 ../src/guestfs-actions.pod:6699 ../src/guestfs-actions.pod:6717 ../src/guestfs-actions.pod:6731 ../src/guestfs-actions.pod:6786 ../src/guestfs-actions.pod:6799 ../src/guestfs-actions.pod:6844 ../src/guestfs-actions.pod:6877 ../src/guestfs-actions.pod:6931 ../src/guestfs-actions.pod:6957 ../src/guestfs-actions.pod:7023 ../src/guestfs-actions.pod:7042 ../src/guestfs-actions.pod:7071
4280 msgid "This function returns 0 on success or -1 on error."
4284 #: ../src/guestfs-actions.pod:32 ../src/guestfs-actions.pod:242 ../src/guestfs-actions.pod:263 ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:153 ../fish/guestfish-actions.pod:167
4286 "This function is deprecated. In new code, use the C<add_drive_opts> call "
4291 #: ../src/guestfs-actions.pod:35 ../src/guestfs-actions.pod:245 ../src/guestfs-actions.pod:266 ../src/guestfs-actions.pod:1437 ../src/guestfs-actions.pod:1923 ../src/guestfs-actions.pod:1944 ../src/guestfs-actions.pod:4185 ../src/guestfs-actions.pod:6965 ../src/guestfs-actions.pod:7134 ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:156 ../fish/guestfish-actions.pod:170 ../fish/guestfish-actions.pod:951 ../fish/guestfish-actions.pod:1308 ../fish/guestfish-actions.pod:1322 ../fish/guestfish-actions.pod:2818 ../fish/guestfish-actions.pod:4620 ../fish/guestfish-actions.pod:4717
4293 "Deprecated functions will not be removed from the API, but the fact that "
4294 "they are deprecated indicates that there are problems with correct use of "
4299 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:130 ../src/guestfs-actions.pod:1094 ../src/guestfs-actions.pod:1895 ../src/guestfs-actions.pod:1993 ../src/guestfs-actions.pod:2096 ../src/guestfs-actions.pod:3224 ../src/guestfs-actions.pod:3239 ../src/guestfs-actions.pod:4473 ../src/guestfs-actions.pod:5542 ../src/guestfs-actions.pod:5659 ../src/guestfs-actions.pod:5769 ../src/guestfs-actions.pod:6232 ../src/guestfs-actions.pod:6357 ../src/guestfs-actions.pod:6879
4300 msgid "(Added in 0.3)"
4304 #: ../src/guestfs-actions.pod:41
4305 msgid "guestfs_add_domain"
4309 #: ../src/guestfs-actions.pod:43
4313 " guestfs_add_domain (guestfs_h *g,\n"
4314 " const char *dom,\n"
4320 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:139 ../src/guestfs-actions.pod:4199
4322 "You may supply a list of optional arguments to this call. Use zero or more "
4323 "of the following pairs of parameters, and terminate the list with C<-1> on "
4324 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
4328 #: ../src/guestfs-actions.pod:53
4331 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
4332 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
4333 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
4338 #: ../src/guestfs-actions.pod:57
4340 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
4341 "It works by connecting to libvirt, requesting the domain and domain XML from "
4342 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
4347 #: ../src/guestfs-actions.pod:62 ../fish/guestfish-actions.pod:46
4349 "The number of disks added is returned. This operation is atomic: if an "
4350 "error is returned, then no disks are added."
4354 #: ../src/guestfs-actions.pod:65 ../fish/guestfish-actions.pod:49
4356 "This function does some minimal checks to make sure the libvirt domain is "
4357 "not running (unless C<readonly> is true). In a future version we will try "
4358 "to acquire the libvirt lock on each disk."
4362 #: ../src/guestfs-actions.pod:69 ../fish/guestfish-actions.pod:53
4364 "Disks must be accessible locally. This often means that adding disks from a "
4365 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
4366 "unless those disks are accessible via the same device path locally too."
4370 #: ../src/guestfs-actions.pod:74
4372 "The optional C<libvirturi> parameter sets the libvirt URI (see "
4373 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
4374 "default libvirt URI (or one set through an environment variable, see the "
4375 "libvirt documentation for full details). If you are using the C API "
4376 "directly then it is more flexible to create the libvirt connection object "
4377 "yourself, get the domain object, and call C<guestfs_add_libvirt_dom>."
4381 #: ../src/guestfs-actions.pod:82
4383 "The other optional parameters are passed directly through to "
4384 "C<guestfs_add_drive_opts>."
4388 #: ../src/guestfs-actions.pod:85 ../src/guestfs-actions.pod:338 ../src/guestfs-actions.pod:503 ../src/guestfs-actions.pod:681 ../src/guestfs-actions.pod:712 ../src/guestfs-actions.pod:730 ../src/guestfs-actions.pod:749 ../src/guestfs-actions.pod:1309 ../src/guestfs-actions.pod:1663 ../src/guestfs-actions.pod:1866 ../src/guestfs-actions.pod:1965 ../src/guestfs-actions.pod:2005 ../src/guestfs-actions.pod:2060 ../src/guestfs-actions.pod:2083 ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:2662 ../src/guestfs-actions.pod:2683 ../src/guestfs-actions.pod:4609 ../src/guestfs-actions.pod:4737 ../src/guestfs-actions.pod:5143 ../src/guestfs-actions.pod:5169 ../src/guestfs-actions.pod:6465 ../src/guestfs-actions.pod:6890 ../src/guestfs-actions.pod:6903 ../src/guestfs-actions.pod:6916
4389 msgid "On error this function returns -1."
4393 #: ../src/guestfs-actions.pod:87
4394 msgid "(Added in 1.7.4)"
4398 #: ../src/guestfs-actions.pod:89
4399 msgid "guestfs_add_domain_va"
4403 #: ../src/guestfs-actions.pod:91
4407 " guestfs_add_domain_va (guestfs_h *g,\n"
4408 " const char *dom,\n"
4414 #: ../src/guestfs-actions.pod:96
4415 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
4419 #: ../src/guestfs-actions.pod:98 ../src/guestfs-actions.pod:109 ../src/guestfs-actions.pod:202 ../src/guestfs-actions.pod:213 ../src/guestfs-actions.pod:4236 ../src/guestfs-actions.pod:4248
4420 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
4424 #: ../src/guestfs-actions.pod:100
4425 msgid "guestfs_add_domain_argv"
4429 #: ../src/guestfs-actions.pod:102
4433 " guestfs_add_domain_argv (guestfs_h *g,\n"
4434 " const char *dom,\n"
4435 " const struct guestfs_add_domain_argv *optargs);\n"
4440 #: ../src/guestfs-actions.pod:107
4441 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
4445 #: ../src/guestfs-actions.pod:111
4446 msgid "guestfs_add_drive"
4450 #: ../src/guestfs-actions.pod:113
4454 " guestfs_add_drive (guestfs_h *g,\n"
4455 " const char *filename);\n"
4460 #: ../src/guestfs-actions.pod:117
4462 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
4463 "optional parameters, so the disk is added writable, with the format being "
4464 "detected automatically."
4468 #: ../src/guestfs-actions.pod:121
4470 "Automatic detection of the format opens you up to a potential security hole "
4471 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4472 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
4473 "you should think about replacing calls to this function with calls to "
4474 "C<guestfs_add_drive_opts>, and specifying the format."
4478 #: ../src/guestfs-actions.pod:132
4479 msgid "guestfs_add_drive_opts"
4483 #: ../src/guestfs-actions.pod:134
4487 " guestfs_add_drive_opts (guestfs_h *g,\n"
4488 " const char *filename,\n"
4494 #: ../src/guestfs-actions.pod:144
4497 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
4498 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
4499 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
4504 #: ../src/guestfs-actions.pod:148 ../fish/guestfish-actions.pod:92
4506 "This function adds a virtual machine disk image C<filename> to libguestfs. "
4507 "The first time you call this function, the disk appears as C</dev/sda>, the "
4508 "second time as C</dev/sdb>, and so on."
4512 #: ../src/guestfs-actions.pod:153 ../fish/guestfish-actions.pod:97
4514 "You don't necessarily need to be root when using libguestfs. However you "
4515 "obviously do need sufficient permissions to access the filename for whatever "
4516 "operations you want to perform (ie. read access if you just want to read the "
4517 "image or write access if you want to modify the image)."
4521 #: ../src/guestfs-actions.pod:159 ../fish/guestfish-actions.pod:103
4522 msgid "This call checks that C<filename> exists."
4526 #: ../src/guestfs-actions.pod:161 ../src/guestfs-actions.pod:4209 ../fish/guestfish-actions.pod:105 ../fish/guestfish-actions.pod:2829
4527 msgid "The optional arguments are:"
4531 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:109
4536 #: ../src/guestfs-actions.pod:167 ../fish/guestfish-actions.pod:111
4538 "If true then the image is treated as read-only. Writes are still allowed, "
4539 "but they are stored in a temporary snapshot overlay which is discarded at "
4540 "the end. The disk that you add is not modified."
4544 #: ../src/guestfs-actions.pod:171 ../fish/guestfish-actions.pod:115
4549 #: ../src/guestfs-actions.pod:173
4551 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
4552 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
4553 "Possible formats include C<raw> and C<qcow2>."
4557 #: ../src/guestfs-actions.pod:177 ../fish/guestfish-actions.pod:121
4559 "Automatic detection of the format opens you up to a potential security hole "
4560 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4561 "RHBZ#642934. Specifying the format closes this security hole."
4565 #: ../src/guestfs-actions.pod:182 ../fish/guestfish-actions.pod:126
4570 #: ../src/guestfs-actions.pod:184
4572 "This rarely-used option lets you emulate the behaviour of the deprecated "
4573 "C<guestfs_add_drive_with_if> call (q.v.)"
4577 #: ../src/guestfs-actions.pod:191
4578 msgid "(Added in 1.5.23)"
4582 #: ../src/guestfs-actions.pod:193
4583 msgid "guestfs_add_drive_opts_va"
4587 #: ../src/guestfs-actions.pod:195
4591 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
4592 " const char *filename,\n"
4598 #: ../src/guestfs-actions.pod:200
4599 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
4603 #: ../src/guestfs-actions.pod:204
4604 msgid "guestfs_add_drive_opts_argv"
4608 #: ../src/guestfs-actions.pod:206
4612 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
4613 " const char *filename,\n"
4614 " const struct guestfs_add_drive_opts_argv "
4620 #: ../src/guestfs-actions.pod:211
4621 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
4625 #: ../src/guestfs-actions.pod:215
4626 msgid "guestfs_add_drive_ro"
4630 #: ../src/guestfs-actions.pod:217
4634 " guestfs_add_drive_ro (guestfs_h *g,\n"
4635 " const char *filename);\n"
4640 #: ../src/guestfs-actions.pod:221
4642 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
4643 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
4644 "disk is added read-only, with the format being detected automatically."
4648 #: ../src/guestfs-actions.pod:228
4649 msgid "(Added in 1.0.38)"
4653 #: ../src/guestfs-actions.pod:230
4654 msgid "guestfs_add_drive_ro_with_if"
4658 #: ../src/guestfs-actions.pod:232
4662 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
4663 " const char *filename,\n"
4664 " const char *iface);\n"
4669 #: ../src/guestfs-actions.pod:237
4671 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
4672 "QEMU interface emulation to use at run time."
4676 #: ../src/guestfs-actions.pod:249 ../src/guestfs-actions.pod:270 ../src/guestfs-actions.pod:2333
4677 msgid "(Added in 1.0.84)"
4681 #: ../src/guestfs-actions.pod:251
4682 msgid "guestfs_add_drive_with_if"
4686 #: ../src/guestfs-actions.pod:253
4690 " guestfs_add_drive_with_if (guestfs_h *g,\n"
4691 " const char *filename,\n"
4692 " const char *iface);\n"
4697 #: ../src/guestfs-actions.pod:258
4699 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
4700 "QEMU interface emulation to use at run time."
4704 #: ../src/guestfs-actions.pod:272
4705 msgid "guestfs_aug_clear"
4709 #: ../src/guestfs-actions.pod:274
4713 " guestfs_aug_clear (guestfs_h *g,\n"
4714 " const char *augpath);\n"
4719 #: ../src/guestfs-actions.pod:278 ../fish/guestfish-actions.pod:178
4721 "Set the value associated with C<path> to C<NULL>. This is the same as the "
4722 "L<augtool(1)> C<clear> command."
4726 #: ../src/guestfs-actions.pod:283 ../src/guestfs-actions.pod:2085
4727 msgid "(Added in 1.3.4)"
4731 #: ../src/guestfs-actions.pod:285
4732 msgid "guestfs_aug_close"
4736 #: ../src/guestfs-actions.pod:287
4740 " guestfs_aug_close (guestfs_h *g);\n"
4745 #: ../src/guestfs-actions.pod:290
4747 "Close the current Augeas handle and free up any resources used by it. After "
4748 "calling this, you have to call C<guestfs_aug_init> again before you can use "
4749 "any other Augeas functions."
4753 #: ../src/guestfs-actions.pod:297 ../src/guestfs-actions.pod:322 ../src/guestfs-actions.pod:340 ../src/guestfs-actions.pod:354 ../src/guestfs-actions.pod:412 ../src/guestfs-actions.pod:432 ../src/guestfs-actions.pod:446 ../src/guestfs-actions.pod:477 ../src/guestfs-actions.pod:491 ../src/guestfs-actions.pod:505 ../src/guestfs-actions.pod:519 ../src/guestfs-actions.pod:537 ../src/guestfs-actions.pod:5220
4754 msgid "(Added in 0.7)"
4758 #: ../src/guestfs-actions.pod:299
4759 msgid "guestfs_aug_defnode"
4763 #: ../src/guestfs-actions.pod:301
4766 " struct guestfs_int_bool *\n"
4767 " guestfs_aug_defnode (guestfs_h *g,\n"
4768 " const char *name,\n"
4769 " const char *expr,\n"
4770 " const char *val);\n"
4775 #: ../src/guestfs-actions.pod:307 ../fish/guestfish-actions.pod:194
4776 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
4780 #: ../src/guestfs-actions.pod:310
4782 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
4783 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
4784 "containing that single node."
4788 #: ../src/guestfs-actions.pod:314 ../fish/guestfish-actions.pod:201
4790 "On success this returns a pair containing the number of nodes in the "
4791 "nodeset, and a boolean flag if a node was created."
4795 #: ../src/guestfs-actions.pod:318
4797 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
4798 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
4802 #: ../src/guestfs-actions.pod:324
4803 msgid "guestfs_aug_defvar"
4807 #: ../src/guestfs-actions.pod:326
4811 " guestfs_aug_defvar (guestfs_h *g,\n"
4812 " const char *name,\n"
4813 " const char *expr);\n"
4818 #: ../src/guestfs-actions.pod:331 ../fish/guestfish-actions.pod:209
4820 "Defines an Augeas variable C<name> whose value is the result of evaluating "
4821 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
4825 #: ../src/guestfs-actions.pod:335 ../fish/guestfish-actions.pod:213
4827 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
4828 "evaluates to something which is not a nodeset."
4832 #: ../src/guestfs-actions.pod:342
4833 msgid "guestfs_aug_get"
4837 #: ../src/guestfs-actions.pod:344
4841 " guestfs_aug_get (guestfs_h *g,\n"
4842 " const char *augpath);\n"
4847 #: ../src/guestfs-actions.pod:348 ../fish/guestfish-actions.pod:220
4849 "Look up the value associated with C<path>. If C<path> matches exactly one "
4850 "node, the C<value> is returned."
4854 #: ../src/guestfs-actions.pod:351 ../src/guestfs-actions.pod:851 ../src/guestfs-actions.pod:869 ../src/guestfs-actions.pod:929 ../src/guestfs-actions.pod:945 ../src/guestfs-actions.pod:1048 ../src/guestfs-actions.pod:1178 ../src/guestfs-actions.pod:1195 ../src/guestfs-actions.pod:1214 ../src/guestfs-actions.pod:1343 ../src/guestfs-actions.pod:1534 ../src/guestfs-actions.pod:1646 ../src/guestfs-actions.pod:1809 ../src/guestfs-actions.pod:1826 ../src/guestfs-actions.pod:1917 ../src/guestfs-actions.pod:1938 ../src/guestfs-actions.pod:2108 ../src/guestfs-actions.pod:2298 ../src/guestfs-actions.pod:2505 ../src/guestfs-actions.pod:2586 ../src/guestfs-actions.pod:2634 ../src/guestfs-actions.pod:2744 ../src/guestfs-actions.pod:2775 ../src/guestfs-actions.pod:2799 ../src/guestfs-actions.pod:2861 ../src/guestfs-actions.pod:2884 ../src/guestfs-actions.pod:3396 ../src/guestfs-actions.pod:3746 ../src/guestfs-actions.pod:3916 ../src/guestfs-actions.pod:4026 ../src/guestfs-actions.pod:4755 ../src/guestfs-actions.pod:4948 ../src/guestfs-actions.pod:5118 ../src/guestfs-actions.pod:5296 ../src/guestfs-actions.pod:5345 ../src/guestfs-actions.pod:5908 ../src/guestfs-actions.pod:5924 ../src/guestfs-actions.pod:5941 ../src/guestfs-actions.pod:5965 ../src/guestfs-actions.pod:6639 ../src/guestfs-actions.pod:6658 ../src/guestfs-actions.pod:6676 ../src/guestfs-actions.pod:6856 ../src/guestfs-actions.pod:7128
4856 "This function returns a string, or NULL on error. I<The caller must free "
4857 "the returned string after use>."
4861 #: ../src/guestfs-actions.pod:356
4862 msgid "guestfs_aug_init"
4866 #: ../src/guestfs-actions.pod:358
4870 " guestfs_aug_init (guestfs_h *g,\n"
4871 " const char *root,\n"
4877 #: ../src/guestfs-actions.pod:363 ../fish/guestfish-actions.pod:227
4879 "Create a new Augeas handle for editing configuration files. If there was "
4880 "any previous Augeas handle associated with this guestfs session, then it is "
4885 #: ../src/guestfs-actions.pod:367
4886 msgid "You must call this before using any other C<guestfs_aug_*> commands."
4890 #: ../src/guestfs-actions.pod:370 ../fish/guestfish-actions.pod:234
4891 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
4895 #: ../src/guestfs-actions.pod:373 ../fish/guestfish-actions.pod:237
4897 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
4898 "logical I<or> of the following integers:"
4902 #: ../src/guestfs-actions.pod:379 ../fish/guestfish-actions.pod:243
4903 msgid "C<AUG_SAVE_BACKUP> = 1"
4907 #: ../src/guestfs-actions.pod:381 ../fish/guestfish-actions.pod:245
4908 msgid "Keep the original file with a C<.augsave> extension."
4912 #: ../src/guestfs-actions.pod:383 ../fish/guestfish-actions.pod:247
4913 msgid "C<AUG_SAVE_NEWFILE> = 2"
4917 #: ../src/guestfs-actions.pod:385 ../fish/guestfish-actions.pod:249
4919 "Save changes into a file with extension C<.augnew>, and do not overwrite "
4920 "original. Overrides C<AUG_SAVE_BACKUP>."
4924 #: ../src/guestfs-actions.pod:388 ../fish/guestfish-actions.pod:252
4925 msgid "C<AUG_TYPE_CHECK> = 4"
4929 #: ../src/guestfs-actions.pod:390 ../fish/guestfish-actions.pod:254
4930 msgid "Typecheck lenses (can be expensive)."
4934 #: ../src/guestfs-actions.pod:392 ../fish/guestfish-actions.pod:256
4935 msgid "C<AUG_NO_STDINC> = 8"
4939 #: ../src/guestfs-actions.pod:394 ../fish/guestfish-actions.pod:258
4940 msgid "Do not use standard load path for modules."
4944 #: ../src/guestfs-actions.pod:396 ../fish/guestfish-actions.pod:260
4945 msgid "C<AUG_SAVE_NOOP> = 16"
4949 #: ../src/guestfs-actions.pod:398 ../fish/guestfish-actions.pod:262
4950 msgid "Make save a no-op, just record what would have been changed."
4954 #: ../src/guestfs-actions.pod:400 ../fish/guestfish-actions.pod:264
4955 msgid "C<AUG_NO_LOAD> = 32"
4959 #: ../src/guestfs-actions.pod:402
4960 msgid "Do not load the tree in C<guestfs_aug_init>."
4964 #: ../src/guestfs-actions.pod:406
4965 msgid "To close the handle, you can call C<guestfs_aug_close>."
4969 #: ../src/guestfs-actions.pod:408 ../fish/guestfish-actions.pod:272
4970 msgid "To find out more about Augeas, see L<http://augeas.net/>."
4974 #: ../src/guestfs-actions.pod:414
4975 msgid "guestfs_aug_insert"
4979 #: ../src/guestfs-actions.pod:416
4983 " guestfs_aug_insert (guestfs_h *g,\n"
4984 " const char *augpath,\n"
4985 " const char *label,\n"
4991 #: ../src/guestfs-actions.pod:422 ../fish/guestfish-actions.pod:278
4993 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
4994 "or after C<path> (depending on the boolean flag C<before>)."
4998 #: ../src/guestfs-actions.pod:426 ../fish/guestfish-actions.pod:282
5000 "C<path> must match exactly one existing node in the tree, and C<label> must "
5001 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
5005 #: ../src/guestfs-actions.pod:434
5006 msgid "guestfs_aug_load"
5010 #: ../src/guestfs-actions.pod:436
5014 " guestfs_aug_load (guestfs_h *g);\n"
5019 #: ../src/guestfs-actions.pod:439 ../fish/guestfish-actions.pod:290
5020 msgid "Load files into the tree."
5024 #: ../src/guestfs-actions.pod:441 ../fish/guestfish-actions.pod:292
5025 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
5029 #: ../src/guestfs-actions.pod:448
5030 msgid "guestfs_aug_ls"
5034 #: ../src/guestfs-actions.pod:450
5038 " guestfs_aug_ls (guestfs_h *g,\n"
5039 " const char *augpath);\n"
5044 #: ../src/guestfs-actions.pod:454
5046 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
5047 "sorting the resulting nodes into alphabetical order."
5051 #: ../src/guestfs-actions.pod:457 ../src/guestfs-actions.pod:473 ../src/guestfs-actions.pod:619 ../src/guestfs-actions.pod:1067 ../src/guestfs-actions.pod:1358 ../src/guestfs-actions.pod:1377 ../src/guestfs-actions.pod:1480 ../src/guestfs-actions.pod:1499 ../src/guestfs-actions.pod:1748 ../src/guestfs-actions.pod:2178 ../src/guestfs-actions.pod:2194 ../src/guestfs-actions.pod:2213 ../src/guestfs-actions.pod:2256 ../src/guestfs-actions.pod:2280 ../src/guestfs-actions.pod:2351 ../src/guestfs-actions.pod:2400 ../src/guestfs-actions.pod:2611 ../src/guestfs-actions.pod:2818 ../src/guestfs-actions.pod:3033 ../src/guestfs-actions.pod:3316 ../src/guestfs-actions.pod:3378 ../src/guestfs-actions.pod:3483 ../src/guestfs-actions.pod:3888 ../src/guestfs-actions.pod:4570 ../src/guestfs-actions.pod:5090 ../src/guestfs-actions.pod:5216 ../src/guestfs-actions.pod:5330 ../src/guestfs-actions.pod:5981 ../src/guestfs-actions.pod:6042 ../src/guestfs-actions.pod:6097 ../src/guestfs-actions.pod:6243 ../src/guestfs-actions.pod:6267 ../src/guestfs-actions.pod:6749 ../src/guestfs-actions.pod:6769 ../src/guestfs-actions.pod:6816 ../src/guestfs-actions.pod:6981 ../src/guestfs-actions.pod:7000 ../src/guestfs-actions.pod:7085 ../src/guestfs-actions.pod:7104 ../src/guestfs-actions.pod:7150 ../src/guestfs-actions.pod:7169
5053 "This function returns a NULL-terminated array of strings (like "
5054 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
5055 "strings and the array after use>."
5059 #: ../src/guestfs-actions.pod:461 ../src/guestfs-actions.pod:992 ../src/guestfs-actions.pod:1010 ../src/guestfs-actions.pod:1415 ../src/guestfs-actions.pod:3111 ../src/guestfs-actions.pod:3142 ../src/guestfs-actions.pod:3729 ../src/guestfs-actions.pod:3779 ../src/guestfs-actions.pod:3966 ../src/guestfs-actions.pod:3999 ../src/guestfs-actions.pod:4162 ../src/guestfs-actions.pod:4574 ../src/guestfs-actions.pod:5031 ../src/guestfs-actions.pod:5409 ../src/guestfs-actions.pod:5423 ../src/guestfs-actions.pod:5435 ../src/guestfs-actions.pod:5843 ../src/guestfs-actions.pod:6481 ../src/guestfs-actions.pod:6494 ../src/guestfs-actions.pod:6733 ../src/guestfs-actions.pod:6936 ../src/guestfs-actions.pod:6969
5060 msgid "(Added in 0.8)"
5064 #: ../src/guestfs-actions.pod:463
5065 msgid "guestfs_aug_match"
5069 #: ../src/guestfs-actions.pod:465
5073 " guestfs_aug_match (guestfs_h *g,\n"
5074 " const char *augpath);\n"
5079 #: ../src/guestfs-actions.pod:469 ../fish/guestfish-actions.pod:306
5081 "Returns a list of paths which match the path expression C<path>. The "
5082 "returned paths are sufficiently qualified so that they match exactly one "
5083 "node in the current tree."
5087 #: ../src/guestfs-actions.pod:479
5088 msgid "guestfs_aug_mv"
5092 #: ../src/guestfs-actions.pod:481
5096 " guestfs_aug_mv (guestfs_h *g,\n"
5097 " const char *src,\n"
5098 " const char *dest);\n"
5103 #: ../src/guestfs-actions.pod:486 ../fish/guestfish-actions.pod:314
5105 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
5106 "C<dest> is overwritten if it exists."
5110 #: ../src/guestfs-actions.pod:493
5111 msgid "guestfs_aug_rm"
5115 #: ../src/guestfs-actions.pod:495
5119 " guestfs_aug_rm (guestfs_h *g,\n"
5120 " const char *augpath);\n"
5125 #: ../src/guestfs-actions.pod:499 ../fish/guestfish-actions.pod:321
5126 msgid "Remove C<path> and all of its children."
5130 #: ../src/guestfs-actions.pod:501 ../fish/guestfish-actions.pod:323
5131 msgid "On success this returns the number of entries which were removed."
5135 #: ../src/guestfs-actions.pod:507
5136 msgid "guestfs_aug_save"
5140 #: ../src/guestfs-actions.pod:509
5144 " guestfs_aug_save (guestfs_h *g);\n"
5149 #: ../src/guestfs-actions.pod:512 ../fish/guestfish-actions.pod:329
5150 msgid "This writes all pending changes to disk."
5154 #: ../src/guestfs-actions.pod:514
5156 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
5161 #: ../src/guestfs-actions.pod:521
5162 msgid "guestfs_aug_set"
5166 #: ../src/guestfs-actions.pod:523
5170 " guestfs_aug_set (guestfs_h *g,\n"
5171 " const char *augpath,\n"
5172 " const char *val);\n"
5177 #: ../src/guestfs-actions.pod:528 ../fish/guestfish-actions.pod:338
5178 msgid "Set the value associated with C<path> to C<val>."
5182 #: ../src/guestfs-actions.pod:530
5184 "In the Augeas API, it is possible to clear a node by setting the value to "
5185 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
5186 "this call. Instead you must use the C<guestfs_aug_clear> call."
5190 #: ../src/guestfs-actions.pod:539
5191 msgid "guestfs_available"
5195 #: ../src/guestfs-actions.pod:541
5199 " guestfs_available (guestfs_h *g,\n"
5200 " char *const *groups);\n"
5205 #: ../src/guestfs-actions.pod:545 ../fish/guestfish-actions.pod:349
5207 "This command is used to check the availability of some groups of "
5208 "functionality in the appliance, which not all builds of the libguestfs "
5209 "appliance will be able to provide."
5213 #: ../src/guestfs-actions.pod:549
5215 "The libguestfs groups, and the functions that those groups correspond to, "
5216 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
5217 "runtime by calling C<guestfs_available_all_groups>."
5221 #: ../src/guestfs-actions.pod:554 ../fish/guestfish-actions.pod:358
5223 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
5224 "\"augeas\"]> would check for the availability of the Linux inotify functions "
5225 "and Augeas (configuration file editing) functions."
5229 #: ../src/guestfs-actions.pod:559 ../fish/guestfish-actions.pod:363
5230 msgid "The command returns no error if I<all> requested groups are available."
5234 #: ../src/guestfs-actions.pod:561 ../fish/guestfish-actions.pod:365
5236 "It fails with an error if one or more of the requested groups is unavailable "
5241 #: ../src/guestfs-actions.pod:564 ../fish/guestfish-actions.pod:368
5243 "If an unknown group name is included in the list of groups then an error is "
5248 #: ../src/guestfs-actions.pod:567 ../fish/guestfish-actions.pod:371
5253 #: ../src/guestfs-actions.pod:573
5254 msgid "You must call C<guestfs_launch> before calling this function."
5258 #: ../src/guestfs-actions.pod:575 ../fish/guestfish-actions.pod:379
5260 "The reason is because we don't know what groups are supported by the "
5261 "appliance/daemon until it is running and can be queried."
5265 #: ../src/guestfs-actions.pod:581 ../fish/guestfish-actions.pod:385
5267 "If a group of functions is available, this does not necessarily mean that "
5268 "they will work. You still have to check for errors when calling individual "
5269 "API functions even if they are available."
5273 #: ../src/guestfs-actions.pod:588 ../fish/guestfish-actions.pod:392
5275 "It is usually the job of distro packagers to build complete functionality "
5276 "into the libguestfs appliance. Upstream libguestfs, if built from source "
5277 "with all requirements satisfied, will support everything."
5281 #: ../src/guestfs-actions.pod:595
5283 "This call was added in version C<1.0.80>. In previous versions of "
5284 "libguestfs all you could do would be to speculatively execute a command to "
5285 "find out if the daemon implemented it. See also C<guestfs_version>."
5289 #: ../src/guestfs-actions.pod:604 ../src/guestfs-actions.pod:1165
5290 msgid "(Added in 1.0.80)"
5294 #: ../src/guestfs-actions.pod:606
5295 msgid "guestfs_available_all_groups"
5299 #: ../src/guestfs-actions.pod:608
5303 " guestfs_available_all_groups (guestfs_h *g);\n"
5308 #: ../src/guestfs-actions.pod:611
5310 "This command returns a list of all optional groups that this daemon knows "
5311 "about. Note this returns both supported and unsupported groups. To find "
5312 "out which ones the daemon can actually support you have to call "
5313 "C<guestfs_available> on each member of the returned list."
5317 #: ../src/guestfs-actions.pod:617
5318 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
5322 #: ../src/guestfs-actions.pod:623
5323 msgid "(Added in 1.3.15)"
5327 #: ../src/guestfs-actions.pod:625
5328 msgid "guestfs_base64_in"
5332 #: ../src/guestfs-actions.pod:627
5336 " guestfs_base64_in (guestfs_h *g,\n"
5337 " const char *base64file,\n"
5338 " const char *filename);\n"
5343 #: ../src/guestfs-actions.pod:632 ../fish/guestfish-actions.pod:422
5344 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
5348 #: ../src/guestfs-actions.pod:637 ../src/guestfs-actions.pod:651
5349 msgid "(Added in 1.3.5)"
5353 #: ../src/guestfs-actions.pod:639
5354 msgid "guestfs_base64_out"
5358 #: ../src/guestfs-actions.pod:641
5362 " guestfs_base64_out (guestfs_h *g,\n"
5363 " const char *filename,\n"
5364 " const char *base64file);\n"
5369 #: ../src/guestfs-actions.pod:646 ../fish/guestfish-actions.pod:431
5371 "This command downloads the contents of C<filename>, writing it out to local "
5372 "file C<base64file> encoded as base64."
5376 #: ../src/guestfs-actions.pod:653
5377 msgid "guestfs_blockdev_flushbufs"
5381 #: ../src/guestfs-actions.pod:655
5385 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
5386 " const char *device);\n"
5391 #: ../src/guestfs-actions.pod:659 ../fish/guestfish-actions.pod:440
5392 msgid "This tells the kernel to flush internal buffers associated with C<device>."
5396 #: ../src/guestfs-actions.pod:662 ../src/guestfs-actions.pod:679 ../src/guestfs-actions.pod:694 ../src/guestfs-actions.pod:710 ../src/guestfs-actions.pod:728 ../src/guestfs-actions.pod:747 ../src/guestfs-actions.pod:761 ../src/guestfs-actions.pod:779 ../src/guestfs-actions.pod:793 ../src/guestfs-actions.pod:807 ../fish/guestfish-actions.pod:443 ../fish/guestfish-actions.pod:454 ../fish/guestfish-actions.pod:463 ../fish/guestfish-actions.pod:473 ../fish/guestfish-actions.pod:485 ../fish/guestfish-actions.pod:498 ../fish/guestfish-actions.pod:506 ../fish/guestfish-actions.pod:517 ../fish/guestfish-actions.pod:525 ../fish/guestfish-actions.pod:533
5397 msgid "This uses the L<blockdev(8)> command."
5401 #: ../src/guestfs-actions.pod:666 ../src/guestfs-actions.pod:683 ../src/guestfs-actions.pod:698 ../src/guestfs-actions.pod:714 ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:751 ../src/guestfs-actions.pod:765 ../src/guestfs-actions.pod:783 ../src/guestfs-actions.pod:797 ../src/guestfs-actions.pod:811
5402 msgid "(Added in 0.9.3)"
5406 #: ../src/guestfs-actions.pod:668
5407 msgid "guestfs_blockdev_getbsz"
5411 #: ../src/guestfs-actions.pod:670
5415 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
5416 " const char *device);\n"
5421 #: ../src/guestfs-actions.pod:674 ../fish/guestfish-actions.pod:449
5422 msgid "This returns the block size of a device."
5426 #: ../src/guestfs-actions.pod:676 ../src/guestfs-actions.pod:776 ../fish/guestfish-actions.pod:451 ../fish/guestfish-actions.pod:514
5428 "(Note this is different from both I<size in blocks> and I<filesystem block "
5433 #: ../src/guestfs-actions.pod:685
5434 msgid "guestfs_blockdev_getro"
5438 #: ../src/guestfs-actions.pod:687
5442 " guestfs_blockdev_getro (guestfs_h *g,\n"
5443 " const char *device);\n"
5448 #: ../src/guestfs-actions.pod:691 ../fish/guestfish-actions.pod:460
5450 "Returns a boolean indicating if the block device is read-only (true if "
5451 "read-only, false if not)."
5455 #: ../src/guestfs-actions.pod:696 ../src/guestfs-actions.pod:1398 ../src/guestfs-actions.pod:1413 ../src/guestfs-actions.pod:1893 ../src/guestfs-actions.pod:1904 ../src/guestfs-actions.pod:1976 ../src/guestfs-actions.pod:2031 ../src/guestfs-actions.pod:2046 ../src/guestfs-actions.pod:2071 ../src/guestfs-actions.pod:2094 ../src/guestfs-actions.pod:3050 ../src/guestfs-actions.pod:3064 ../src/guestfs-actions.pod:3079 ../src/guestfs-actions.pod:3093 ../src/guestfs-actions.pod:3109 ../src/guestfs-actions.pod:3124 ../src/guestfs-actions.pod:3140 ../src/guestfs-actions.pod:3154 ../src/guestfs-actions.pod:3167 ../src/guestfs-actions.pod:3181 ../src/guestfs-actions.pod:3196 ../src/guestfs-actions.pod:3211 ../src/guestfs-actions.pod:4719
5456 msgid "This function returns a C truth value on success or -1 on error."
5460 #: ../src/guestfs-actions.pod:700
5461 msgid "guestfs_blockdev_getsize64"
5465 #: ../src/guestfs-actions.pod:702
5469 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
5470 " const char *device);\n"
5475 #: ../src/guestfs-actions.pod:706 ../fish/guestfish-actions.pod:469
5476 msgid "This returns the size of the device in bytes."
5480 #: ../src/guestfs-actions.pod:708
5481 msgid "See also C<guestfs_blockdev_getsz>."
5485 #: ../src/guestfs-actions.pod:716
5486 msgid "guestfs_blockdev_getss"
5490 #: ../src/guestfs-actions.pod:718
5494 " guestfs_blockdev_getss (guestfs_h *g,\n"
5495 " const char *device);\n"
5500 #: ../src/guestfs-actions.pod:722 ../fish/guestfish-actions.pod:479
5502 "This returns the size of sectors on a block device. Usually 512, but can be "
5503 "larger for modern devices."
5507 #: ../src/guestfs-actions.pod:725
5509 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
5514 #: ../src/guestfs-actions.pod:734
5515 msgid "guestfs_blockdev_getsz"
5519 #: ../src/guestfs-actions.pod:736
5523 " guestfs_blockdev_getsz (guestfs_h *g,\n"
5524 " const char *device);\n"
5529 #: ../src/guestfs-actions.pod:740 ../fish/guestfish-actions.pod:491
5531 "This returns the size of the device in units of 512-byte sectors (even if "
5532 "the sectorsize isn't 512 bytes ... weird)."
5536 #: ../src/guestfs-actions.pod:743
5538 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
5539 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
5543 #: ../src/guestfs-actions.pod:753
5544 msgid "guestfs_blockdev_rereadpt"
5548 #: ../src/guestfs-actions.pod:755
5552 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
5553 " const char *device);\n"
5558 #: ../src/guestfs-actions.pod:759 ../fish/guestfish-actions.pod:504
5559 msgid "Reread the partition table on C<device>."
5563 #: ../src/guestfs-actions.pod:767
5564 msgid "guestfs_blockdev_setbsz"
5568 #: ../src/guestfs-actions.pod:769
5572 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
5573 " const char *device,\n"
5574 " int blocksize);\n"
5579 #: ../src/guestfs-actions.pod:774 ../fish/guestfish-actions.pod:512
5580 msgid "This sets the block size of a device."
5584 #: ../src/guestfs-actions.pod:785
5585 msgid "guestfs_blockdev_setro"
5589 #: ../src/guestfs-actions.pod:787
5593 " guestfs_blockdev_setro (guestfs_h *g,\n"
5594 " const char *device);\n"
5599 #: ../src/guestfs-actions.pod:791 ../fish/guestfish-actions.pod:523
5600 msgid "Sets the block device named C<device> to read-only."
5604 #: ../src/guestfs-actions.pod:799
5605 msgid "guestfs_blockdev_setrw"
5609 #: ../src/guestfs-actions.pod:801
5613 " guestfs_blockdev_setrw (guestfs_h *g,\n"
5614 " const char *device);\n"
5619 #: ../src/guestfs-actions.pod:805 ../fish/guestfish-actions.pod:531
5620 msgid "Sets the block device named C<device> to read-write."
5624 #: ../src/guestfs-actions.pod:813
5625 msgid "guestfs_case_sensitive_path"
5629 #: ../src/guestfs-actions.pod:815
5633 " guestfs_case_sensitive_path (guestfs_h *g,\n"
5634 " const char *path);\n"
5639 #: ../src/guestfs-actions.pod:819 ../fish/guestfish-actions.pod:539
5641 "This can be used to resolve case insensitive paths on a filesystem which is "
5642 "case sensitive. The use case is to resolve paths which you have read from "
5643 "Windows configuration files or the Windows Registry, to the true path."
5647 #: ../src/guestfs-actions.pod:824 ../fish/guestfish-actions.pod:544
5649 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
5650 "(and probably others), which is that although the underlying filesystem is "
5651 "case-insensitive, the driver exports the filesystem to Linux as "
5656 #: ../src/guestfs-actions.pod:829 ../fish/guestfish-actions.pod:549
5658 "One consequence of this is that special directories such as C<c:\\windows> "
5659 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
5660 "precise details of how they were created. In Windows itself this would not "
5665 #: ../src/guestfs-actions.pod:835 ../fish/guestfish-actions.pod:555
5667 "Bug or feature? You decide: "
5668 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
5672 #: ../src/guestfs-actions.pod:838 ../fish/guestfish-actions.pod:558
5674 "This function resolves the true case of each element in the path and returns "
5675 "the case-sensitive path."
5679 #: ../src/guestfs-actions.pod:841
5681 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
5682 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
5683 "how the directories were originally created under Windows)."
5687 #: ../src/guestfs-actions.pod:846 ../fish/guestfish-actions.pod:566
5688 msgid "I<Note>: This function does not handle drive names, backslashes etc."
5692 #: ../src/guestfs-actions.pod:849
5693 msgid "See also C<guestfs_realpath>."
5697 #: ../src/guestfs-actions.pod:854 ../src/guestfs-actions.pod:6661
5698 msgid "(Added in 1.0.75)"
5702 #: ../src/guestfs-actions.pod:856
5707 #: ../src/guestfs-actions.pod:858
5711 " guestfs_cat (guestfs_h *g,\n"
5712 " const char *path);\n"
5717 #: ../src/guestfs-actions.pod:862 ../src/guestfs-actions.pod:5206 ../fish/guestfish-actions.pod:575 ../fish/guestfish-actions.pod:3464
5718 msgid "Return the contents of the file named C<path>."
5722 #: ../src/guestfs-actions.pod:864
5724 "Note that this function cannot correctly handle binary files (specifically, "
5725 "files containing C<\\0> character which is treated as end of string). For "
5726 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
5727 "functions which have a more complex interface."
5731 #: ../src/guestfs-actions.pod:872 ../src/guestfs-actions.pod:1051 ../src/guestfs-actions.pod:1071 ../src/guestfs-actions.pod:1362 ../src/guestfs-actions.pod:1381 ../src/guestfs-actions.pod:1484 ../src/guestfs-actions.pod:1503 ../src/guestfs-actions.pod:1752 ../src/guestfs-actions.pod:2198 ../src/guestfs-actions.pod:2217 ../src/guestfs-actions.pod:2260 ../src/guestfs-actions.pod:2284 ../src/guestfs-actions.pod:2301 ../src/guestfs-actions.pod:2330 ../src/guestfs-actions.pod:4988 ../src/guestfs-actions.pod:5014 ../src/guestfs-actions.pod:5145 ../src/guestfs-actions.pod:5171 ../src/guestfs-actions.pod:5195 ../src/guestfs-actions.pod:6046 ../src/guestfs-actions.pod:6101 ../src/guestfs-actions.pod:6247 ../src/guestfs-actions.pod:6271 ../src/guestfs-actions.pod:6933 ../src/guestfs-actions.pod:6959 ../src/guestfs-actions.pod:6985 ../src/guestfs-actions.pod:7004 ../src/guestfs-actions.pod:7089 ../src/guestfs-actions.pod:7108 ../src/guestfs-actions.pod:7154 ../src/guestfs-actions.pod:7173 ../fish/guestfish-actions.pod:582 ../fish/guestfish-actions.pod:717 ../fish/guestfish-actions.pod:729 ../fish/guestfish-actions.pod:905 ../fish/guestfish-actions.pod:915 ../fish/guestfish-actions.pod:982 ../fish/guestfish-actions.pod:992 ../fish/guestfish-actions.pod:1187 ../fish/guestfish-actions.pod:1482 ../fish/guestfish-actions.pod:1492 ../fish/guestfish-actions.pod:1520 ../fish/guestfish-actions.pod:1535 ../fish/guestfish-actions.pod:1545 ../fish/guestfish-actions.pod:1564 ../fish/guestfish-actions.pod:3334 ../fish/guestfish-actions.pod:3349 ../fish/guestfish-actions.pod:3425 ../fish/guestfish-actions.pod:3442 ../fish/guestfish-actions.pod:3457 ../fish/guestfish-actions.pod:4040 ../fish/guestfish-actions.pod:4086 ../fish/guestfish-actions.pod:4171 ../fish/guestfish-actions.pod:4186 ../fish/guestfish-actions.pod:4596 ../fish/guestfish-actions.pod:4614 ../fish/guestfish-actions.pod:4631 ../fish/guestfish-actions.pod:4641 ../fish/guestfish-actions.pod:4689 ../fish/guestfish-actions.pod:4699 ../fish/guestfish-actions.pod:4728 ../fish/guestfish-actions.pod:4738
5733 "Because of the message protocol, there is a transfer limit of somewhere "
5734 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
5738 #: ../src/guestfs-actions.pod:875 ../src/guestfs-actions.pod:3320 ../src/guestfs-actions.pod:3382 ../src/guestfs-actions.pod:3399 ../src/guestfs-actions.pod:3487 ../src/guestfs-actions.pod:3892 ../src/guestfs-actions.pod:3906 ../src/guestfs-actions.pod:5094 ../src/guestfs-actions.pod:5108 ../src/guestfs-actions.pod:6820 ../src/guestfs-actions.pod:6834
5739 msgid "(Added in 0.4)"
5743 #: ../src/guestfs-actions.pod:877
5744 msgid "guestfs_checksum"
5748 #: ../src/guestfs-actions.pod:879
5752 " guestfs_checksum (guestfs_h *g,\n"
5753 " const char *csumtype,\n"
5754 " const char *path);\n"
5759 #: ../src/guestfs-actions.pod:884 ../fish/guestfish-actions.pod:589
5760 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
5764 #: ../src/guestfs-actions.pod:887 ../fish/guestfish-actions.pod:592
5766 "The type of checksum to compute is given by the C<csumtype> parameter which "
5767 "must have one of the following values:"
5771 #: ../src/guestfs-actions.pod:892 ../fish/guestfish-actions.pod:597
5776 #: ../src/guestfs-actions.pod:894 ../fish/guestfish-actions.pod:599
5778 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
5783 #: ../src/guestfs-actions.pod:897 ../fish/guestfish-actions.pod:602
5788 #: ../src/guestfs-actions.pod:899 ../fish/guestfish-actions.pod:604
5789 msgid "Compute the MD5 hash (using the C<md5sum> program)."
5793 #: ../src/guestfs-actions.pod:901 ../fish/guestfish-actions.pod:606
5798 #: ../src/guestfs-actions.pod:903 ../fish/guestfish-actions.pod:608
5799 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
5803 #: ../src/guestfs-actions.pod:905 ../fish/guestfish-actions.pod:610
5808 #: ../src/guestfs-actions.pod:907 ../fish/guestfish-actions.pod:612
5809 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
5813 #: ../src/guestfs-actions.pod:909 ../fish/guestfish-actions.pod:614
5818 #: ../src/guestfs-actions.pod:911 ../fish/guestfish-actions.pod:616
5819 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
5823 #: ../src/guestfs-actions.pod:913 ../fish/guestfish-actions.pod:618
5828 #: ../src/guestfs-actions.pod:915 ../fish/guestfish-actions.pod:620
5829 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
5833 #: ../src/guestfs-actions.pod:917 ../fish/guestfish-actions.pod:622
5838 #: ../src/guestfs-actions.pod:919 ../fish/guestfish-actions.pod:624
5839 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
5843 #: ../src/guestfs-actions.pod:923 ../fish/guestfish-actions.pod:628
5844 msgid "The checksum is returned as a printable string."
5848 #: ../src/guestfs-actions.pod:925
5849 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
5853 #: ../src/guestfs-actions.pod:927
5854 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
5858 #: ../src/guestfs-actions.pod:932 ../src/guestfs-actions.pod:1240 ../src/guestfs-actions.pod:2062 ../src/guestfs-actions.pod:3066 ../src/guestfs-actions.pod:3095 ../src/guestfs-actions.pod:3156 ../src/guestfs-actions.pod:3183 ../src/guestfs-actions.pod:6517
5859 msgid "(Added in 1.0.2)"
5863 #: ../src/guestfs-actions.pod:934
5864 msgid "guestfs_checksum_device"
5868 #: ../src/guestfs-actions.pod:936
5872 " guestfs_checksum_device (guestfs_h *g,\n"
5873 " const char *csumtype,\n"
5874 " const char *device);\n"
5879 #: ../src/guestfs-actions.pod:941
5881 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
5882 "device named C<device>. For the types of checksums supported see the "
5883 "C<guestfs_checksum> command."
5887 #: ../src/guestfs-actions.pod:948 ../src/guestfs-actions.pod:4625 ../src/guestfs-actions.pod:4684 ../src/guestfs-actions.pod:4721 ../src/guestfs-actions.pod:4739 ../src/guestfs-actions.pod:4915 ../src/guestfs-actions.pod:6426 ../src/guestfs-actions.pod:6440 ../src/guestfs-actions.pod:6846
5888 msgid "(Added in 1.3.2)"
5892 #: ../src/guestfs-actions.pod:950
5893 msgid "guestfs_checksums_out"
5897 #: ../src/guestfs-actions.pod:952
5901 " guestfs_checksums_out (guestfs_h *g,\n"
5902 " const char *csumtype,\n"
5903 " const char *directory,\n"
5904 " const char *sumsfile);\n"
5909 #: ../src/guestfs-actions.pod:958 ../fish/guestfish-actions.pod:646
5911 "This command computes the checksums of all regular files in C<directory> and "
5912 "then emits a list of those checksums to the local output file C<sumsfile>."
5916 #: ../src/guestfs-actions.pod:962 ../fish/guestfish-actions.pod:650
5918 "This can be used for verifying the integrity of a virtual machine. However "
5919 "to be properly secure you should pay attention to the output of the checksum "
5920 "command (it uses the ones from GNU coreutils). In particular when the "
5921 "filename is not printable, coreutils uses a special backslash syntax. For "
5922 "more information, see the GNU coreutils info file."
5926 #: ../src/guestfs-actions.pod:972
5927 msgid "(Added in 1.3.7)"
5931 #: ../src/guestfs-actions.pod:974
5932 msgid "guestfs_chmod"
5936 #: ../src/guestfs-actions.pod:976
5940 " guestfs_chmod (guestfs_h *g,\n"
5942 " const char *path);\n"
5947 #: ../src/guestfs-actions.pod:981 ../fish/guestfish-actions.pod:664
5949 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
5954 #: ../src/guestfs-actions.pod:984 ../fish/guestfish-actions.pod:667
5956 "I<Note>: When using this command from guestfish, C<mode> by default would be "
5957 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
5962 #: ../src/guestfs-actions.pod:988 ../src/guestfs-actions.pod:4143 ../src/guestfs-actions.pod:4324 ../src/guestfs-actions.pod:4343 ../src/guestfs-actions.pod:4362 ../fish/guestfish-actions.pod:671 ../fish/guestfish-actions.pod:2793 ../fish/guestfish-actions.pod:2909 ../fish/guestfish-actions.pod:2919 ../fish/guestfish-actions.pod:2929
5963 msgid "The mode actually set is affected by the umask."
5967 #: ../src/guestfs-actions.pod:994
5968 msgid "guestfs_chown"
5972 #: ../src/guestfs-actions.pod:996
5976 " guestfs_chown (guestfs_h *g,\n"
5979 " const char *path);\n"
5984 #: ../src/guestfs-actions.pod:1002 ../fish/guestfish-actions.pod:677
5985 msgid "Change the file owner to C<owner> and group to C<group>."
5989 #: ../src/guestfs-actions.pod:1004 ../src/guestfs-actions.pod:3253 ../fish/guestfish-actions.pod:679 ../fish/guestfish-actions.pod:2251
5991 "Only numeric uid and gid are supported. If you want to use names, you will "
5992 "need to locate and parse the password file yourself (Augeas support makes "
5993 "this relatively easy)."
5997 #: ../src/guestfs-actions.pod:1012
5998 msgid "guestfs_command"
6002 #: ../src/guestfs-actions.pod:1014
6006 " guestfs_command (guestfs_h *g,\n"
6007 " char *const *arguments);\n"
6012 #: ../src/guestfs-actions.pod:1018 ../fish/guestfish-actions.pod:687
6014 "This call runs a command from the guest filesystem. The filesystem must be "
6015 "mounted, and must contain a compatible operating system (ie. something "
6016 "Linux, with the same or compatible processor architecture)."
6020 #: ../src/guestfs-actions.pod:1023
6022 "The single parameter is an argv-style list of arguments. The first element "
6023 "is the name of the program to run. Subsequent elements are parameters. The "
6024 "list must be non-empty (ie. must contain a program name). Note that the "
6025 "command runs directly, and is I<not> invoked via the shell (see "
6030 #: ../src/guestfs-actions.pod:1030 ../fish/guestfish-actions.pod:699
6031 msgid "The return value is anything printed to I<stdout> by the command."
6035 #: ../src/guestfs-actions.pod:1033 ../fish/guestfish-actions.pod:702
6037 "If the command returns a non-zero exit status, then this function returns an "
6038 "error message. The error message string is the content of I<stderr> from "
6043 #: ../src/guestfs-actions.pod:1037 ../fish/guestfish-actions.pod:706
6045 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
6046 "C</bin>. If you require a program from another location, you should provide "
6047 "the full path in the first parameter."
6051 #: ../src/guestfs-actions.pod:1042 ../fish/guestfish-actions.pod:711
6053 "Shared libraries and data files required by the program must be available on "
6054 "filesystems which are mounted in the correct places. It is the caller's "
6055 "responsibility to ensure all filesystems that are needed are mounted at the "
6060 #: ../src/guestfs-actions.pod:1054 ../src/guestfs-actions.pod:1074 ../src/guestfs-actions.pod:1537
6061 msgid "(Added in 0.9.1)"
6065 #: ../src/guestfs-actions.pod:1056
6066 msgid "guestfs_command_lines"
6070 #: ../src/guestfs-actions.pod:1058
6074 " guestfs_command_lines (guestfs_h *g,\n"
6075 " char *const *arguments);\n"
6080 #: ../src/guestfs-actions.pod:1062
6082 "This is the same as C<guestfs_command>, but splits the result into a list of "
6087 #: ../src/guestfs-actions.pod:1065
6088 msgid "See also: C<guestfs_sh_lines>"
6092 #: ../src/guestfs-actions.pod:1076
6093 msgid "guestfs_config"
6097 #: ../src/guestfs-actions.pod:1078
6101 " guestfs_config (guestfs_h *g,\n"
6102 " const char *qemuparam,\n"
6103 " const char *qemuvalue);\n"
6108 #: ../src/guestfs-actions.pod:1083 ../fish/guestfish-actions.pod:736
6110 "This can be used to add arbitrary qemu command line parameters of the form "
6111 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
6112 "setting some parameters which would interfere with parameters that we use."
6116 #: ../src/guestfs-actions.pod:1088 ../fish/guestfish-actions.pod:741
6117 msgid "The first character of C<param> string must be a C<-> (dash)."
6121 #: ../src/guestfs-actions.pod:1090 ../fish/guestfish-actions.pod:743
6122 msgid "C<value> can be NULL."
6126 #: ../src/guestfs-actions.pod:1096
6127 msgid "guestfs_copy_size"
6131 #: ../src/guestfs-actions.pod:1098
6135 " guestfs_copy_size (guestfs_h *g,\n"
6136 " const char *src,\n"
6137 " const char *dest,\n"
6143 #: ../src/guestfs-actions.pod:1104 ../fish/guestfish-actions.pod:749
6145 "This command copies exactly C<size> bytes from one source device or file "
6146 "C<src> to another destination device or file C<dest>."
6150 #: ../src/guestfs-actions.pod:1107 ../fish/guestfish-actions.pod:752
6152 "Note this will fail if the source is too short or if the destination is not "
6157 #: ../src/guestfs-actions.pod:1112 ../src/guestfs-actions.pod:1235 ../src/guestfs-actions.pod:1266 ../src/guestfs-actions.pod:1686 ../src/guestfs-actions.pod:1708 ../src/guestfs-actions.pod:6512 ../src/guestfs-actions.pod:6546 ../src/guestfs-actions.pod:7025 ../src/guestfs-actions.pod:7044
6159 "This long-running command can generate progress notification messages so "
6160 "that the caller can display a progress bar or indicator. To receive these "
6161 "messages, the caller must register a progress callback. See "
6162 "L<guestfs(3)/guestfs_set_progress_callback>."
6166 #: ../src/guestfs-actions.pod:1117 ../src/guestfs-actions.pod:3919 ../src/guestfs-actions.pod:5121 ../src/guestfs-actions.pod:6753 ../src/guestfs-actions.pod:6773 ../src/guestfs-actions.pod:6859
6167 msgid "(Added in 1.0.87)"
6171 #: ../src/guestfs-actions.pod:1119
6176 #: ../src/guestfs-actions.pod:1121
6180 " guestfs_cp (guestfs_h *g,\n"
6181 " const char *src,\n"
6182 " const char *dest);\n"
6187 #: ../src/guestfs-actions.pod:1126 ../fish/guestfish-actions.pod:759
6189 "This copies a file from C<src> to C<dest> where C<dest> is either a "
6190 "destination filename or destination directory."
6194 #: ../src/guestfs-actions.pod:1131 ../src/guestfs-actions.pod:1145 ../src/guestfs-actions.pod:1217 ../src/guestfs-actions.pod:1291 ../src/guestfs-actions.pod:1400 ../src/guestfs-actions.pod:4588 ../src/guestfs-actions.pod:4965
6195 msgid "(Added in 1.0.18)"
6199 #: ../src/guestfs-actions.pod:1133
6200 msgid "guestfs_cp_a"
6204 #: ../src/guestfs-actions.pod:1135
6208 " guestfs_cp_a (guestfs_h *g,\n"
6209 " const char *src,\n"
6210 " const char *dest);\n"
6215 #: ../src/guestfs-actions.pod:1140 ../fish/guestfish-actions.pod:766
6217 "This copies a file or directory from C<src> to C<dest> recursively using the "
6222 #: ../src/guestfs-actions.pod:1147
6227 #: ../src/guestfs-actions.pod:1149
6231 " guestfs_dd (guestfs_h *g,\n"
6232 " const char *src,\n"
6233 " const char *dest);\n"
6238 #: ../src/guestfs-actions.pod:1154 ../fish/guestfish-actions.pod:773
6240 "This command copies from one source device or file C<src> to another "
6241 "destination device or file C<dest>. Normally you would use this to copy to "
6242 "or from a device or partition, for example to duplicate a filesystem."
6246 #: ../src/guestfs-actions.pod:1159
6248 "If the destination is a device, it must be as large or larger than the "
6249 "source file or device, otherwise the copy will fail. This command cannot do "
6250 "partial copies (see C<guestfs_copy_size>)."
6254 #: ../src/guestfs-actions.pod:1167
6259 #: ../src/guestfs-actions.pod:1169
6263 " guestfs_df (guestfs_h *g);\n"
6268 #: ../src/guestfs-actions.pod:1172 ../fish/guestfish-actions.pod:786
6269 msgid "This command runs the C<df> command to report disk space used."
6273 #: ../src/guestfs-actions.pod:1174 ../src/guestfs-actions.pod:1191
6275 "This command is mostly useful for interactive sessions. It is I<not> "
6276 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
6281 #: ../src/guestfs-actions.pod:1181 ../src/guestfs-actions.pod:1198 ../src/guestfs-actions.pod:1311 ../src/guestfs-actions.pod:2263 ../src/guestfs-actions.pod:2287 ../src/guestfs-actions.pod:2355 ../src/guestfs-actions.pod:4029 ../src/guestfs-actions.pod:4488 ../src/guestfs-actions.pod:6250 ../src/guestfs-actions.pod:6274 ../src/guestfs-actions.pod:6892 ../src/guestfs-actions.pod:6905 ../src/guestfs-actions.pod:6918
6282 msgid "(Added in 1.0.54)"
6286 #: ../src/guestfs-actions.pod:1183
6287 msgid "guestfs_df_h"
6291 #: ../src/guestfs-actions.pod:1185
6295 " guestfs_df_h (guestfs_h *g);\n"
6300 #: ../src/guestfs-actions.pod:1188 ../fish/guestfish-actions.pod:796
6302 "This command runs the C<df -h> command to report disk space used in "
6303 "human-readable format."
6307 #: ../src/guestfs-actions.pod:1200
6308 msgid "guestfs_dmesg"
6312 #: ../src/guestfs-actions.pod:1202
6316 " guestfs_dmesg (guestfs_h *g);\n"
6321 #: ../src/guestfs-actions.pod:1205 ../fish/guestfish-actions.pod:807
6323 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
6324 "This is sometimes useful for extended debugging of problems."
6328 #: ../src/guestfs-actions.pod:1209
6330 "Another way to get the same information is to enable verbose messages with "
6331 "C<guestfs_set_verbose> or by setting the environment variable "
6332 "C<LIBGUESTFS_DEBUG=1> before running the program."
6336 #: ../src/guestfs-actions.pod:1219
6337 msgid "guestfs_download"
6341 #: ../src/guestfs-actions.pod:1221
6345 " guestfs_download (guestfs_h *g,\n"
6346 " const char *remotefilename,\n"
6347 " const char *filename);\n"
6352 #: ../src/guestfs-actions.pod:1226 ../src/guestfs-actions.pod:1251 ../fish/guestfish-actions.pod:820 ../fish/guestfish-actions.pod:833
6354 "Download file C<remotefilename> and save it as C<filename> on the local "
6359 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:6506 ../fish/guestfish-actions.pod:823 ../fish/guestfish-actions.pod:4344
6360 msgid "C<filename> can also be a named pipe."
6364 #: ../src/guestfs-actions.pod:1231
6365 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
6369 #: ../src/guestfs-actions.pod:1242
6370 msgid "guestfs_download_offset"
6374 #: ../src/guestfs-actions.pod:1244
6378 " guestfs_download_offset (guestfs_h *g,\n"
6379 " const char *remotefilename,\n"
6380 " const char *filename,\n"
6381 " int64_t offset,\n"
6387 #: ../src/guestfs-actions.pod:1254 ../fish/guestfish-actions.pod:836
6389 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
6390 "region must be within the file or device)."
6394 #: ../src/guestfs-actions.pod:1257
6396 "Note that there is no limit on the amount of data that can be downloaded "
6397 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
6398 "full amount unless an error occurs."
6402 #: ../src/guestfs-actions.pod:1262
6403 msgid "See also C<guestfs_download>, C<guestfs_pread>."
6407 #: ../src/guestfs-actions.pod:1271 ../src/guestfs-actions.pod:6551
6408 msgid "(Added in 1.5.17)"
6412 #: ../src/guestfs-actions.pod:1273
6413 msgid "guestfs_drop_caches"
6417 #: ../src/guestfs-actions.pod:1275
6421 " guestfs_drop_caches (guestfs_h *g,\n"
6422 " int whattodrop);\n"
6427 #: ../src/guestfs-actions.pod:1279 ../fish/guestfish-actions.pod:852
6429 "This instructs the guest kernel to drop its page cache, and/or dentries and "
6430 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
6431 "to drop, see L<http://linux-mm.org/Drop_Caches>"
6435 #: ../src/guestfs-actions.pod:1284 ../fish/guestfish-actions.pod:857
6436 msgid "Setting C<whattodrop> to 3 should drop everything."
6440 #: ../src/guestfs-actions.pod:1286 ../fish/guestfish-actions.pod:859
6442 "This automatically calls L<sync(2)> before the operation, so that the "
6443 "maximum guest memory is freed."
6447 #: ../src/guestfs-actions.pod:1293
6452 #: ../src/guestfs-actions.pod:1295
6456 " guestfs_du (guestfs_h *g,\n"
6457 " const char *path);\n"
6462 #: ../src/guestfs-actions.pod:1299 ../fish/guestfish-actions.pod:866
6464 "This command runs the C<du -s> command to estimate file space usage for "
6469 #: ../src/guestfs-actions.pod:1302 ../fish/guestfish-actions.pod:869
6471 "C<path> can be a file or a directory. If C<path> is a directory then the "
6472 "estimate includes the contents of the directory and all subdirectories "
6477 #: ../src/guestfs-actions.pod:1306 ../fish/guestfish-actions.pod:873
6478 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
6482 #: ../src/guestfs-actions.pod:1313
6483 msgid "guestfs_e2fsck_f"
6487 #: ../src/guestfs-actions.pod:1315
6491 " guestfs_e2fsck_f (guestfs_h *g,\n"
6492 " const char *device);\n"
6497 #: ../src/guestfs-actions.pod:1319 ../fish/guestfish-actions.pod:880
6499 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
6500 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
6505 #: ../src/guestfs-actions.pod:1323
6507 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
6508 "Normally you should use C<guestfs_fsck>."
6512 #: ../src/guestfs-actions.pod:1328
6513 msgid "(Added in 1.0.29)"
6517 #: ../src/guestfs-actions.pod:1330
6518 msgid "guestfs_echo_daemon"
6522 #: ../src/guestfs-actions.pod:1332
6526 " guestfs_echo_daemon (guestfs_h *g,\n"
6527 " char *const *words);\n"
6532 #: ../src/guestfs-actions.pod:1336 ../fish/guestfish-actions.pod:891
6534 "This command concatenates the list of C<words> passed with single spaces "
6535 "between them and returns the resulting string."
6539 #: ../src/guestfs-actions.pod:1339 ../fish/guestfish-actions.pod:894
6540 msgid "You can use this command to test the connection through to the daemon."
6544 #: ../src/guestfs-actions.pod:1341
6545 msgid "See also C<guestfs_ping_daemon>."
6549 #: ../src/guestfs-actions.pod:1346 ../src/guestfs-actions.pod:2073 ../src/guestfs-actions.pod:5754
6550 msgid "(Added in 1.0.69)"
6554 #: ../src/guestfs-actions.pod:1348
6555 msgid "guestfs_egrep"
6559 #: ../src/guestfs-actions.pod:1350
6563 " guestfs_egrep (guestfs_h *g,\n"
6564 " const char *regex,\n"
6565 " const char *path);\n"
6570 #: ../src/guestfs-actions.pod:1355 ../fish/guestfish-actions.pod:902
6571 msgid "This calls the external C<egrep> program and returns the matching lines."
6575 #: ../src/guestfs-actions.pod:1365 ../src/guestfs-actions.pod:1384 ../src/guestfs-actions.pod:1441 ../src/guestfs-actions.pod:1487 ../src/guestfs-actions.pod:1506 ../src/guestfs-actions.pod:2201 ../src/guestfs-actions.pod:2220 ../src/guestfs-actions.pod:2376 ../src/guestfs-actions.pod:2389 ../src/guestfs-actions.pod:2404 ../src/guestfs-actions.pod:2450 ../src/guestfs-actions.pod:2472 ../src/guestfs-actions.pod:2485 ../src/guestfs-actions.pod:3412 ../src/guestfs-actions.pod:3426 ../src/guestfs-actions.pod:3439 ../src/guestfs-actions.pod:3453 ../src/guestfs-actions.pod:4423 ../src/guestfs-actions.pod:5299 ../src/guestfs-actions.pod:5348 ../src/guestfs-actions.pod:6118 ../src/guestfs-actions.pod:6130 ../src/guestfs-actions.pod:6143 ../src/guestfs-actions.pod:6156 ../src/guestfs-actions.pod:6178 ../src/guestfs-actions.pod:6191 ../src/guestfs-actions.pod:6204 ../src/guestfs-actions.pod:6217 ../src/guestfs-actions.pod:6988 ../src/guestfs-actions.pod:7007 ../src/guestfs-actions.pod:7092 ../src/guestfs-actions.pod:7111 ../src/guestfs-actions.pod:7157 ../src/guestfs-actions.pod:7176
6576 msgid "(Added in 1.0.66)"
6580 #: ../src/guestfs-actions.pod:1367
6581 msgid "guestfs_egrepi"
6585 #: ../src/guestfs-actions.pod:1369
6589 " guestfs_egrepi (guestfs_h *g,\n"
6590 " const char *regex,\n"
6591 " const char *path);\n"
6596 #: ../src/guestfs-actions.pod:1374 ../fish/guestfish-actions.pod:912
6597 msgid "This calls the external C<egrep -i> program and returns the matching lines."
6601 #: ../src/guestfs-actions.pod:1386
6602 msgid "guestfs_equal"
6606 #: ../src/guestfs-actions.pod:1388
6610 " guestfs_equal (guestfs_h *g,\n"
6611 " const char *file1,\n"
6612 " const char *file2);\n"
6617 #: ../src/guestfs-actions.pod:1393 ../fish/guestfish-actions.pod:922
6619 "This compares the two files C<file1> and C<file2> and returns true if their "
6620 "content is exactly equal, or false otherwise."
6624 #: ../src/guestfs-actions.pod:1396 ../fish/guestfish-actions.pod:925
6625 msgid "The external L<cmp(1)> program is used for the comparison."
6629 #: ../src/guestfs-actions.pod:1402
6630 msgid "guestfs_exists"
6634 #: ../src/guestfs-actions.pod:1404
6638 " guestfs_exists (guestfs_h *g,\n"
6639 " const char *path);\n"
6644 #: ../src/guestfs-actions.pod:1408 ../fish/guestfish-actions.pod:931
6646 "This returns C<true> if and only if there is a file, directory (or anything) "
6647 "with the given C<path> name."
6651 #: ../src/guestfs-actions.pod:1411
6652 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
6656 #: ../src/guestfs-actions.pod:1417
6657 msgid "guestfs_fallocate"
6661 #: ../src/guestfs-actions.pod:1419
6665 " guestfs_fallocate (guestfs_h *g,\n"
6666 " const char *path,\n"
6672 #: ../src/guestfs-actions.pod:1424 ../src/guestfs-actions.pod:1450 ../fish/guestfish-actions.pod:940 ../fish/guestfish-actions.pod:959
6674 "This command preallocates a file (containing zero bytes) named C<path> of "
6675 "size C<len> bytes. If the file exists already, it is overwritten."
6679 #: ../src/guestfs-actions.pod:1428 ../fish/guestfish-actions.pod:944
6681 "Do not confuse this with the guestfish-specific C<alloc> command which "
6682 "allocates a file in the host and attaches it as a device."
6686 #: ../src/guestfs-actions.pod:1434 ../fish/guestfish-actions.pod:948
6688 "This function is deprecated. In new code, use the C<fallocate64> call "
6693 #: ../src/guestfs-actions.pod:1443
6694 msgid "guestfs_fallocate64"
6698 #: ../src/guestfs-actions.pod:1445
6702 " guestfs_fallocate64 (guestfs_h *g,\n"
6703 " const char *path,\n"
6709 #: ../src/guestfs-actions.pod:1454
6711 "Note that this call allocates disk blocks for the file. To create a sparse "
6712 "file use C<guestfs_truncate_size> instead."
6716 #: ../src/guestfs-actions.pod:1457
6718 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
6719 "oversight it only allowed 30 bit lengths to be specified, effectively "
6720 "limiting the maximum size of files created through that call to 1GB."
6724 #: ../src/guestfs-actions.pod:1462 ../fish/guestfish-actions.pod:971
6726 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
6727 "commands which create a file in the host and attach it as a device."
6731 #: ../src/guestfs-actions.pod:1468
6732 msgid "(Added in 1.3.17)"
6736 #: ../src/guestfs-actions.pod:1470
6737 msgid "guestfs_fgrep"
6741 #: ../src/guestfs-actions.pod:1472
6745 " guestfs_fgrep (guestfs_h *g,\n"
6746 " const char *pattern,\n"
6747 " const char *path);\n"
6752 #: ../src/guestfs-actions.pod:1477 ../fish/guestfish-actions.pod:979
6753 msgid "This calls the external C<fgrep> program and returns the matching lines."
6757 #: ../src/guestfs-actions.pod:1489
6758 msgid "guestfs_fgrepi"
6762 #: ../src/guestfs-actions.pod:1491
6766 " guestfs_fgrepi (guestfs_h *g,\n"
6767 " const char *pattern,\n"
6768 " const char *path);\n"
6773 #: ../src/guestfs-actions.pod:1496 ../fish/guestfish-actions.pod:989
6774 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
6778 #: ../src/guestfs-actions.pod:1508
6779 msgid "guestfs_file"
6783 #: ../src/guestfs-actions.pod:1510
6787 " guestfs_file (guestfs_h *g,\n"
6788 " const char *path);\n"
6793 #: ../src/guestfs-actions.pod:1514 ../fish/guestfish-actions.pod:999
6795 "This call uses the standard L<file(1)> command to determine the type or "
6796 "contents of the file."
6800 #: ../src/guestfs-actions.pod:1517 ../fish/guestfish-actions.pod:1002
6802 "This call will also transparently look inside various types of compressed "
6807 #: ../src/guestfs-actions.pod:1520 ../fish/guestfish-actions.pod:1005
6809 "The exact command which runs is C<file -zb path>. Note in particular that "
6810 "the filename is not prepended to the output (the C<-b> option)."
6814 #: ../src/guestfs-actions.pod:1524
6816 "This command can also be used on C</dev/> devices (and partitions, LV "
6817 "names). You can for example use this to determine if a device contains a "
6818 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
6822 #: ../src/guestfs-actions.pod:1529 ../fish/guestfish-actions.pod:1014
6824 "If the C<path> does not begin with C</dev/> then this command only works for "
6825 "the content of regular files. For other file types (directory, symbolic "
6826 "link etc) it will just return the string C<directory> etc."
6830 #: ../src/guestfs-actions.pod:1539
6831 msgid "guestfs_file_architecture"
6835 #: ../src/guestfs-actions.pod:1541
6839 " guestfs_file_architecture (guestfs_h *g,\n"
6840 " const char *filename);\n"
6845 #: ../src/guestfs-actions.pod:1545 ../fish/guestfish-actions.pod:1023
6847 "This detects the architecture of the binary C<filename>, and returns it if "
6852 #: ../src/guestfs-actions.pod:1548 ../fish/guestfish-actions.pod:1026
6853 msgid "Currently defined architectures are:"
6857 #: ../src/guestfs-actions.pod:1552 ../fish/guestfish-actions.pod:1030
6862 #: ../src/guestfs-actions.pod:1554 ../fish/guestfish-actions.pod:1032
6864 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
6865 "irrespective of the precise processor requirements of the binary."
6869 #: ../src/guestfs-actions.pod:1557 ../fish/guestfish-actions.pod:1035
6874 #: ../src/guestfs-actions.pod:1559 ../fish/guestfish-actions.pod:1037
6875 msgid "64 bit x86-64."
6879 #: ../src/guestfs-actions.pod:1561 ../fish/guestfish-actions.pod:1039
6884 #: ../src/guestfs-actions.pod:1563 ../fish/guestfish-actions.pod:1041
6885 msgid "32 bit SPARC."
6889 #: ../src/guestfs-actions.pod:1565 ../fish/guestfish-actions.pod:1043
6894 #: ../src/guestfs-actions.pod:1567 ../fish/guestfish-actions.pod:1045
6895 msgid "64 bit SPARC V9 and above."
6899 #: ../src/guestfs-actions.pod:1569 ../fish/guestfish-actions.pod:1047
6904 #: ../src/guestfs-actions.pod:1571 ../fish/guestfish-actions.pod:1049
6905 msgid "Intel Itanium."
6909 #: ../src/guestfs-actions.pod:1573 ../fish/guestfish-actions.pod:1051
6914 #: ../src/guestfs-actions.pod:1575 ../fish/guestfish-actions.pod:1053
6915 msgid "32 bit Power PC."
6919 #: ../src/guestfs-actions.pod:1577 ../fish/guestfish-actions.pod:1055
6924 #: ../src/guestfs-actions.pod:1579 ../fish/guestfish-actions.pod:1057
6925 msgid "64 bit Power PC."
6929 #: ../src/guestfs-actions.pod:1583 ../fish/guestfish-actions.pod:1061
6930 msgid "Libguestfs may return other architecture strings in future."
6934 #: ../src/guestfs-actions.pod:1585 ../fish/guestfish-actions.pod:1063
6935 msgid "The function works on at least the following types of files:"
6939 #: ../src/guestfs-actions.pod:1591 ../fish/guestfish-actions.pod:1069
6940 msgid "many types of Un*x and Linux binary"
6944 #: ../src/guestfs-actions.pod:1595 ../fish/guestfish-actions.pod:1073
6945 msgid "many types of Un*x and Linux shared library"
6949 #: ../src/guestfs-actions.pod:1599 ../fish/guestfish-actions.pod:1077
6950 msgid "Windows Win32 and Win64 binaries"
6954 #: ../src/guestfs-actions.pod:1603 ../fish/guestfish-actions.pod:1081
6955 msgid "Windows Win32 and Win64 DLLs"
6959 #: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1083
6960 msgid "Win32 binaries and DLLs return C<i386>."
6964 #: ../src/guestfs-actions.pod:1607 ../fish/guestfish-actions.pod:1085
6965 msgid "Win64 binaries and DLLs return C<x86_64>."
6969 #: ../src/guestfs-actions.pod:1611 ../fish/guestfish-actions.pod:1089
6970 msgid "Linux kernel modules"
6974 #: ../src/guestfs-actions.pod:1615 ../fish/guestfish-actions.pod:1093
6975 msgid "Linux new-style initrd images"
6979 #: ../src/guestfs-actions.pod:1619 ../fish/guestfish-actions.pod:1097
6980 msgid "some non-x86 Linux vmlinuz kernels"
6984 #: ../src/guestfs-actions.pod:1623 ../fish/guestfish-actions.pod:1101
6985 msgid "What it can't do currently:"
6989 #: ../src/guestfs-actions.pod:1629 ../fish/guestfish-actions.pod:1107
6990 msgid "static libraries (libfoo.a)"
6994 #: ../src/guestfs-actions.pod:1633 ../fish/guestfish-actions.pod:1111
6995 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
6999 #: ../src/guestfs-actions.pod:1637 ../fish/guestfish-actions.pod:1115
7000 msgid "x86 Linux vmlinuz kernels"
7004 #: ../src/guestfs-actions.pod:1639 ../fish/guestfish-actions.pod:1117
7006 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
7007 "compressed code, and are horribly hard to unpack. If you want to find the "
7008 "architecture of a kernel, use the architecture of the associated initrd or "
7009 "kernel module(s) instead."
7013 #: ../src/guestfs-actions.pod:1649 ../src/guestfs-actions.pod:1812 ../src/guestfs-actions.pod:1829 ../src/guestfs-actions.pod:2508 ../src/guestfs-actions.pod:2589 ../src/guestfs-actions.pod:2615 ../src/guestfs-actions.pod:2664 ../src/guestfs-actions.pod:2685 ../src/guestfs-actions.pod:2718 ../src/guestfs-actions.pod:2802 ../src/guestfs-actions.pod:2864 ../src/guestfs-actions.pod:3037 ../src/guestfs-actions.pod:3169
7014 msgid "(Added in 1.5.3)"
7018 #: ../src/guestfs-actions.pod:1651
7019 msgid "guestfs_filesize"
7023 #: ../src/guestfs-actions.pod:1653
7027 " guestfs_filesize (guestfs_h *g,\n"
7028 " const char *file);\n"
7033 #: ../src/guestfs-actions.pod:1657 ../fish/guestfish-actions.pod:1128
7034 msgid "This command returns the size of C<file> in bytes."
7038 #: ../src/guestfs-actions.pod:1659
7040 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
7041 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
7042 "devices, use C<guestfs_blockdev_getsize64>."
7046 #: ../src/guestfs-actions.pod:1665
7047 msgid "(Added in 1.0.82)"
7051 #: ../src/guestfs-actions.pod:1667
7052 msgid "guestfs_fill"
7056 #: ../src/guestfs-actions.pod:1669
7060 " guestfs_fill (guestfs_h *g,\n"
7063 " const char *path);\n"
7068 #: ../src/guestfs-actions.pod:1675 ../fish/guestfish-actions.pod:1138
7070 "This command creates a new file called C<path>. The initial content of the "
7071 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
7076 #: ../src/guestfs-actions.pod:1679
7078 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
7079 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
7080 "bytes use C<guestfs_fill_pattern>."
7084 #: ../src/guestfs-actions.pod:1691
7085 msgid "(Added in 1.0.79)"
7089 #: ../src/guestfs-actions.pod:1693
7090 msgid "guestfs_fill_pattern"
7094 #: ../src/guestfs-actions.pod:1695
7098 " guestfs_fill_pattern (guestfs_h *g,\n"
7099 " const char *pattern,\n"
7101 " const char *path);\n"
7106 #: ../src/guestfs-actions.pod:1701
7108 "This function is like C<guestfs_fill> except that it creates a new file of "
7109 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
7110 "pattern is truncated if necessary to ensure the length of the file is "
7111 "exactly C<len> bytes."
7115 #: ../src/guestfs-actions.pod:1713
7116 msgid "(Added in 1.3.12)"
7120 #: ../src/guestfs-actions.pod:1715
7121 msgid "guestfs_find"
7125 #: ../src/guestfs-actions.pod:1717
7129 " guestfs_find (guestfs_h *g,\n"
7130 " const char *directory);\n"
7135 #: ../src/guestfs-actions.pod:1721 ../fish/guestfish-actions.pod:1160
7137 "This command lists out all files and directories, recursively, starting at "
7138 "C<directory>. It is essentially equivalent to running the shell command "
7139 "C<find directory -print> but some post-processing happens on the output, "
7144 #: ../src/guestfs-actions.pod:1726 ../fish/guestfish-actions.pod:1165
7146 "This returns a list of strings I<without any prefix>. Thus if the directory "
7151 #: ../src/guestfs-actions.pod:1729 ../fish/guestfish-actions.pod:1168
7161 #: ../src/guestfs-actions.pod:1733
7162 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
7166 #: ../src/guestfs-actions.pod:1736 ../fish/guestfish-actions.pod:1175
7177 #: ../src/guestfs-actions.pod:1741 ../fish/guestfish-actions.pod:1180
7178 msgid "If C<directory> is not a directory, then this command returns an error."
7182 #: ../src/guestfs-actions.pod:1744 ../fish/guestfish-actions.pod:1183
7183 msgid "The returned list is sorted."
7187 #: ../src/guestfs-actions.pod:1746
7188 msgid "See also C<guestfs_find0>."
7192 #: ../src/guestfs-actions.pod:1755 ../src/guestfs-actions.pod:3856 ../src/guestfs-actions.pod:5383
7193 msgid "(Added in 1.0.27)"
7197 #: ../src/guestfs-actions.pod:1757
7198 msgid "guestfs_find0"
7202 #: ../src/guestfs-actions.pod:1759
7206 " guestfs_find0 (guestfs_h *g,\n"
7207 " const char *directory,\n"
7208 " const char *files);\n"
7213 #: ../src/guestfs-actions.pod:1764 ../fish/guestfish-actions.pod:1194
7215 "This command lists out all files and directories, recursively, starting at "
7216 "C<directory>, placing the resulting list in the external file called "
7221 #: ../src/guestfs-actions.pod:1768
7223 "This command works the same way as C<guestfs_find> with the following "
7228 #: ../src/guestfs-actions.pod:1775 ../fish/guestfish-actions.pod:1205
7229 msgid "The resulting list is written to an external file."
7233 #: ../src/guestfs-actions.pod:1779 ../fish/guestfish-actions.pod:1209
7235 "Items (filenames) in the result are separated by C<\\0> characters. See "
7236 "L<find(1)> option I<-print0>."
7240 #: ../src/guestfs-actions.pod:1784 ../fish/guestfish-actions.pod:1214
7241 msgid "This command is not limited in the number of names that it can return."
7245 #: ../src/guestfs-actions.pod:1789 ../fish/guestfish-actions.pod:1219
7246 msgid "The result list is not sorted."
7250 #: ../src/guestfs-actions.pod:1795
7251 msgid "(Added in 1.0.74)"
7255 #: ../src/guestfs-actions.pod:1797
7256 msgid "guestfs_findfs_label"
7260 #: ../src/guestfs-actions.pod:1799
7264 " guestfs_findfs_label (guestfs_h *g,\n"
7265 " const char *label);\n"
7270 #: ../src/guestfs-actions.pod:1803 ../fish/guestfish-actions.pod:1229
7272 "This command searches the filesystems and returns the one which has the "
7273 "given label. An error is returned if no such filesystem can be found."
7277 #: ../src/guestfs-actions.pod:1807
7278 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
7282 #: ../src/guestfs-actions.pod:1814
7283 msgid "guestfs_findfs_uuid"
7287 #: ../src/guestfs-actions.pod:1816
7291 " guestfs_findfs_uuid (guestfs_h *g,\n"
7292 " const char *uuid);\n"
7297 #: ../src/guestfs-actions.pod:1820 ../fish/guestfish-actions.pod:1239
7299 "This command searches the filesystems and returns the one which has the "
7300 "given UUID. An error is returned if no such filesystem can be found."
7304 #: ../src/guestfs-actions.pod:1824
7305 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
7309 #: ../src/guestfs-actions.pod:1831
7310 msgid "guestfs_fsck"
7314 #: ../src/guestfs-actions.pod:1833
7318 " guestfs_fsck (guestfs_h *g,\n"
7319 " const char *fstype,\n"
7320 " const char *device);\n"
7325 #: ../src/guestfs-actions.pod:1838 ../fish/guestfish-actions.pod:1249
7327 "This runs the filesystem checker (fsck) on C<device> which should have "
7328 "filesystem type C<fstype>."
7332 #: ../src/guestfs-actions.pod:1841 ../fish/guestfish-actions.pod:1252
7334 "The returned integer is the status. See L<fsck(8)> for the list of status "
7335 "codes from C<fsck>."
7339 #: ../src/guestfs-actions.pod:1850 ../fish/guestfish-actions.pod:1261
7340 msgid "Multiple status codes can be summed together."
7344 #: ../src/guestfs-actions.pod:1854 ../fish/guestfish-actions.pod:1265
7346 "A non-zero return code can mean \"success\", for example if errors have been "
7347 "corrected on the filesystem."
7351 #: ../src/guestfs-actions.pod:1859 ../fish/guestfish-actions.pod:1270
7352 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
7356 #: ../src/guestfs-actions.pod:1864 ../fish/guestfish-actions.pod:1275
7357 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
7361 #: ../src/guestfs-actions.pod:1868 ../src/guestfs-actions.pod:7030
7362 msgid "(Added in 1.0.16)"
7366 #: ../src/guestfs-actions.pod:1870
7367 msgid "guestfs_get_append"
7371 #: ../src/guestfs-actions.pod:1872
7375 " guestfs_get_append (guestfs_h *g);\n"
7380 #: ../src/guestfs-actions.pod:1875 ../fish/guestfish-actions.pod:1281
7382 "Return the additional kernel options which are added to the guest kernel "
7387 #: ../src/guestfs-actions.pod:1878 ../fish/guestfish-actions.pod:1284
7388 msgid "If C<NULL> then no options are added."
7392 #: ../src/guestfs-actions.pod:1880
7394 "This function returns a string which may be NULL. There is no way to return "
7395 "an error from this function. The string is owned by the guest handle and "
7396 "must I<not> be freed."
7400 #: ../src/guestfs-actions.pod:1884 ../src/guestfs-actions.pod:5061 ../src/guestfs-actions.pod:5524 ../src/guestfs-actions.pod:5892 ../src/guestfs-actions.pod:5911 ../src/guestfs-actions.pod:5927 ../src/guestfs-actions.pod:5944 ../src/guestfs-actions.pod:6701 ../src/guestfs-actions.pod:6719 ../src/guestfs-actions.pod:7073
7401 msgid "(Added in 1.0.26)"
7405 #: ../src/guestfs-actions.pod:1886
7406 msgid "guestfs_get_autosync"
7410 #: ../src/guestfs-actions.pod:1888
7414 " guestfs_get_autosync (guestfs_h *g);\n"
7419 #: ../src/guestfs-actions.pod:1891 ../fish/guestfish-actions.pod:1290
7420 msgid "Get the autosync flag."
7424 #: ../src/guestfs-actions.pod:1897
7425 msgid "guestfs_get_direct"
7429 #: ../src/guestfs-actions.pod:1899
7433 " guestfs_get_direct (guestfs_h *g);\n"
7438 #: ../src/guestfs-actions.pod:1902 ../fish/guestfish-actions.pod:1296
7439 msgid "Return the direct appliance mode flag."
7443 #: ../src/guestfs-actions.pod:1906 ../src/guestfs-actions.pod:5565
7444 msgid "(Added in 1.0.72)"
7448 #: ../src/guestfs-actions.pod:1908
7449 msgid "guestfs_get_e2label"
7453 #: ../src/guestfs-actions.pod:1910
7457 " guestfs_get_e2label (guestfs_h *g,\n"
7458 " const char *device);\n"
7463 #: ../src/guestfs-actions.pod:1914 ../fish/guestfish-actions.pod:1302
7464 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
7468 #: ../src/guestfs-actions.pod:1920 ../fish/guestfish-actions.pod:1305
7470 "This function is deprecated. In new code, use the C<vfs_label> call "
7475 #: ../src/guestfs-actions.pod:1927 ../src/guestfs-actions.pod:1948 ../src/guestfs-actions.pod:5583 ../src/guestfs-actions.pod:5602
7476 msgid "(Added in 1.0.15)"
7480 #: ../src/guestfs-actions.pod:1929
7481 msgid "guestfs_get_e2uuid"
7485 #: ../src/guestfs-actions.pod:1931
7489 " guestfs_get_e2uuid (guestfs_h *g,\n"
7490 " const char *device);\n"
7495 #: ../src/guestfs-actions.pod:1935 ../fish/guestfish-actions.pod:1316
7496 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
7500 #: ../src/guestfs-actions.pod:1941 ../fish/guestfish-actions.pod:1319
7501 msgid "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
7505 #: ../src/guestfs-actions.pod:1950
7506 msgid "guestfs_get_memsize"
7510 #: ../src/guestfs-actions.pod:1952
7514 " guestfs_get_memsize (guestfs_h *g);\n"
7519 #: ../src/guestfs-actions.pod:1955 ../fish/guestfish-actions.pod:1330
7520 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
7524 #: ../src/guestfs-actions.pod:1958
7526 "If C<guestfs_set_memsize> was not called on this handle, and if "
7527 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
7528 "value for memsize."
7532 #: ../src/guestfs-actions.pod:1962 ../src/guestfs-actions.pod:2043 ../src/guestfs-actions.pod:5618 ../src/guestfs-actions.pod:5725 ../fish/guestfish-actions.pod:1337 ../fish/guestfish-actions.pod:1388 ../fish/guestfish-actions.pod:3751 ../fish/guestfish-actions.pod:3838
7533 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
7537 #: ../src/guestfs-actions.pod:1967 ../src/guestfs-actions.pod:4147 ../src/guestfs-actions.pod:4328 ../src/guestfs-actions.pod:4347 ../src/guestfs-actions.pod:4366 ../src/guestfs-actions.pod:4378 ../src/guestfs-actions.pod:4395 ../src/guestfs-actions.pod:4408 ../src/guestfs-actions.pod:5286 ../src/guestfs-actions.pod:5623 ../src/guestfs-actions.pod:5866 ../src/guestfs-actions.pod:6467
7538 msgid "(Added in 1.0.55)"
7542 #: ../src/guestfs-actions.pod:1969
7543 msgid "guestfs_get_network"
7547 #: ../src/guestfs-actions.pod:1971
7551 " guestfs_get_network (guestfs_h *g);\n"
7556 #: ../src/guestfs-actions.pod:1974 ../fish/guestfish-actions.pod:1344
7557 msgid "This returns the enable network flag."
7561 #: ../src/guestfs-actions.pod:1978 ../src/guestfs-actions.pod:5642
7562 msgid "(Added in 1.5.4)"
7566 #: ../src/guestfs-actions.pod:1980
7567 msgid "guestfs_get_path"
7571 #: ../src/guestfs-actions.pod:1982
7575 " guestfs_get_path (guestfs_h *g);\n"
7580 #: ../src/guestfs-actions.pod:1985 ../fish/guestfish-actions.pod:1350
7581 msgid "Return the current search path."
7585 #: ../src/guestfs-actions.pod:1987 ../fish/guestfish-actions.pod:1352
7587 "This is always non-NULL. If it wasn't set already, then this will return "
7592 #: ../src/guestfs-actions.pod:1990 ../src/guestfs-actions.pod:2019
7594 "This function returns a string, or NULL on error. The string is owned by "
7595 "the guest handle and must I<not> be freed."
7599 #: ../src/guestfs-actions.pod:1995
7600 msgid "guestfs_get_pid"
7604 #: ../src/guestfs-actions.pod:1997
7608 " guestfs_get_pid (guestfs_h *g);\n"
7613 #: ../src/guestfs-actions.pod:2000 ../fish/guestfish-actions.pod:1361
7615 "Return the process ID of the qemu subprocess. If there is no qemu "
7616 "subprocess, then this will return an error."
7620 #: ../src/guestfs-actions.pod:2003 ../fish/guestfish-actions.pod:1364
7621 msgid "This is an internal call used for debugging and testing."
7625 #: ../src/guestfs-actions.pod:2007
7626 msgid "(Added in 1.0.56)"
7630 #: ../src/guestfs-actions.pod:2009
7631 msgid "guestfs_get_qemu"
7635 #: ../src/guestfs-actions.pod:2011
7639 " guestfs_get_qemu (guestfs_h *g);\n"
7644 #: ../src/guestfs-actions.pod:2014 ../fish/guestfish-actions.pod:1370
7645 msgid "Return the current qemu binary."
7649 #: ../src/guestfs-actions.pod:2016 ../fish/guestfish-actions.pod:1372
7651 "This is always non-NULL. If it wasn't set already, then this will return "
7652 "the default qemu binary name."
7656 #: ../src/guestfs-actions.pod:2022 ../src/guestfs-actions.pod:5687
7657 msgid "(Added in 1.0.6)"
7661 #: ../src/guestfs-actions.pod:2024
7662 msgid "guestfs_get_recovery_proc"
7666 #: ../src/guestfs-actions.pod:2026
7670 " guestfs_get_recovery_proc (guestfs_h *g);\n"
7675 #: ../src/guestfs-actions.pod:2029 ../fish/guestfish-actions.pod:1379
7676 msgid "Return the recovery process enabled flag."
7680 #: ../src/guestfs-actions.pod:2033 ../src/guestfs-actions.pod:3259 ../src/guestfs-actions.pod:3554 ../src/guestfs-actions.pod:3954 ../src/guestfs-actions.pod:3986 ../src/guestfs-actions.pod:4991 ../src/guestfs-actions.pod:5334 ../src/guestfs-actions.pod:5711 ../src/guestfs-actions.pod:6370 ../src/guestfs-actions.pod:6390 ../src/guestfs-actions.pod:6582
7681 msgid "(Added in 1.0.77)"
7685 #: ../src/guestfs-actions.pod:2035
7686 msgid "guestfs_get_selinux"
7690 #: ../src/guestfs-actions.pod:2037
7694 " guestfs_get_selinux (guestfs_h *g);\n"
7699 #: ../src/guestfs-actions.pod:2040
7701 "This returns the current setting of the selinux flag which is passed to the "
7702 "appliance at boot time. See C<guestfs_set_selinux>."
7706 #: ../src/guestfs-actions.pod:2048 ../src/guestfs-actions.pod:2111 ../src/guestfs-actions.pod:5730 ../src/guestfs-actions.pod:5784
7707 msgid "(Added in 1.0.67)"
7711 #: ../src/guestfs-actions.pod:2050
7712 msgid "guestfs_get_state"
7716 #: ../src/guestfs-actions.pod:2052
7720 " guestfs_get_state (guestfs_h *g);\n"
7725 #: ../src/guestfs-actions.pod:2055 ../fish/guestfish-actions.pod:1395
7727 "This returns the current state as an opaque integer. This is only useful "
7728 "for printing debug and internal error messages."
7732 #: ../src/guestfs-actions.pod:2058 ../src/guestfs-actions.pod:3062 ../src/guestfs-actions.pod:3091 ../src/guestfs-actions.pod:3152 ../src/guestfs-actions.pod:3179 ../fish/guestfish-actions.pod:1398 ../fish/guestfish-actions.pod:2133 ../fish/guestfish-actions.pod:2151 ../fish/guestfish-actions.pod:2189 ../fish/guestfish-actions.pod:2205
7733 msgid "For more information on states, see L<guestfs(3)>."
7737 #: ../src/guestfs-actions.pod:2064
7738 msgid "guestfs_get_trace"
7742 #: ../src/guestfs-actions.pod:2066
7746 " guestfs_get_trace (guestfs_h *g);\n"
7751 #: ../src/guestfs-actions.pod:2069 ../fish/guestfish-actions.pod:1404
7752 msgid "Return the command trace flag."
7756 #: ../src/guestfs-actions.pod:2075
7757 msgid "guestfs_get_umask"
7761 #: ../src/guestfs-actions.pod:2077
7765 " guestfs_get_umask (guestfs_h *g);\n"
7770 #: ../src/guestfs-actions.pod:2080
7772 "Return the current umask. By default the umask is C<022> unless it has been "
7773 "set by calling C<guestfs_umask>."
7777 #: ../src/guestfs-actions.pod:2087
7778 msgid "guestfs_get_verbose"
7782 #: ../src/guestfs-actions.pod:2089
7786 " guestfs_get_verbose (guestfs_h *g);\n"
7791 #: ../src/guestfs-actions.pod:2092 ../fish/guestfish-actions.pod:1417
7792 msgid "This returns the verbose messages flag."
7796 #: ../src/guestfs-actions.pod:2098
7797 msgid "guestfs_getcon"
7801 #: ../src/guestfs-actions.pod:2100
7805 " guestfs_getcon (guestfs_h *g);\n"
7810 #: ../src/guestfs-actions.pod:2103 ../fish/guestfish-actions.pod:1423
7811 msgid "This gets the SELinux security context of the daemon."
7815 #: ../src/guestfs-actions.pod:2105
7816 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
7820 #: ../src/guestfs-actions.pod:2113
7821 msgid "guestfs_getxattr"
7825 #: ../src/guestfs-actions.pod:2115
7829 " guestfs_getxattr (guestfs_h *g,\n"
7830 " const char *path,\n"
7831 " const char *name,\n"
7832 " size_t *size_r);\n"
7837 #: ../src/guestfs-actions.pod:2121
7839 "Get a single extended attribute from file C<path> named C<name>. This call "
7840 "follows symlinks. If you want to lookup an extended attribute for the "
7841 "symlink itself, use C<guestfs_lgetxattr>."
7845 #: ../src/guestfs-actions.pod:2125 ../src/guestfs-actions.pod:3273
7847 "Normally it is better to get all extended attributes from a file in one go "
7848 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
7849 "implementations are buggy and do not provide a way to list out attributes. "
7850 "For these filesystems (notably ntfs-3g) you have to know the names of the "
7851 "extended attributes you want in advance and call this function."
7855 #: ../src/guestfs-actions.pod:2132 ../src/guestfs-actions.pod:3280 ../fish/guestfish-actions.pod:1443 ../fish/guestfish-actions.pod:2270
7857 "Extended attribute values are blobs of binary data. If there is no extended "
7858 "attribute named C<name>, this returns an error."
7862 #: ../src/guestfs-actions.pod:2135
7863 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
7867 #: ../src/guestfs-actions.pod:2137 ../src/guestfs-actions.pod:2326 ../src/guestfs-actions.pod:3285 ../src/guestfs-actions.pod:4984 ../src/guestfs-actions.pod:5010 ../src/guestfs-actions.pod:5191
7869 "This function returns a buffer, or NULL on error. The size of the returned "
7870 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
7875 #: ../src/guestfs-actions.pod:2141
7876 msgid "guestfs_getxattrs"
7880 #: ../src/guestfs-actions.pod:2143
7883 " struct guestfs_xattr_list *\n"
7884 " guestfs_getxattrs (guestfs_h *g,\n"
7885 " const char *path);\n"
7890 #: ../src/guestfs-actions.pod:2147 ../fish/guestfish-actions.pod:1452
7891 msgid "This call lists the extended attributes of the file or directory C<path>."
7895 #: ../src/guestfs-actions.pod:2150 ../fish/guestfish-actions.pod:1455
7897 "At the system call level, this is a combination of the L<listxattr(2)> and "
7898 "L<getxattr(2)> calls."
7902 #: ../src/guestfs-actions.pod:2153
7903 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
7907 #: ../src/guestfs-actions.pod:2155 ../src/guestfs-actions.pod:3299 ../src/guestfs-actions.pod:3950
7909 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
7910 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
7914 #: ../src/guestfs-actions.pod:2159 ../src/guestfs-actions.pod:3303 ../src/guestfs-actions.pod:3468 ../src/guestfs-actions.pod:3504 ../src/guestfs-actions.pod:5364 ../src/guestfs-actions.pod:5803 ../src/guestfs-actions.pod:7138
7915 msgid "(Added in 1.0.59)"
7919 #: ../src/guestfs-actions.pod:2161
7920 msgid "guestfs_glob_expand"
7924 #: ../src/guestfs-actions.pod:2163
7928 " guestfs_glob_expand (guestfs_h *g,\n"
7929 " const char *pattern);\n"
7934 #: ../src/guestfs-actions.pod:2167 ../fish/guestfish-actions.pod:1464
7936 "This command searches for all the pathnames matching C<pattern> according to "
7937 "the wildcard expansion rules used by the shell."
7941 #: ../src/guestfs-actions.pod:2171 ../fish/guestfish-actions.pod:1468
7942 msgid "If no paths match, then this returns an empty list (note: not an error)."
7946 #: ../src/guestfs-actions.pod:2174 ../fish/guestfish-actions.pod:1471
7948 "It is just a wrapper around the C L<glob(3)> function with flags "
7949 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
7953 #: ../src/guestfs-actions.pod:2182 ../src/guestfs-actions.pod:5968 ../src/guestfs-actions.pod:5985
7954 msgid "(Added in 1.0.50)"
7958 #: ../src/guestfs-actions.pod:2184
7959 msgid "guestfs_grep"
7963 #: ../src/guestfs-actions.pod:2186
7967 " guestfs_grep (guestfs_h *g,\n"
7968 " const char *regex,\n"
7969 " const char *path);\n"
7974 #: ../src/guestfs-actions.pod:2191 ../fish/guestfish-actions.pod:1479
7975 msgid "This calls the external C<grep> program and returns the matching lines."
7979 #: ../src/guestfs-actions.pod:2203
7980 msgid "guestfs_grepi"
7984 #: ../src/guestfs-actions.pod:2205
7988 " guestfs_grepi (guestfs_h *g,\n"
7989 " const char *regex,\n"
7990 " const char *path);\n"
7995 #: ../src/guestfs-actions.pod:2210 ../fish/guestfish-actions.pod:1489
7996 msgid "This calls the external C<grep -i> program and returns the matching lines."
8000 #: ../src/guestfs-actions.pod:2222
8001 msgid "guestfs_grub_install"
8005 #: ../src/guestfs-actions.pod:2224
8009 " guestfs_grub_install (guestfs_h *g,\n"
8010 " const char *root,\n"
8011 " const char *device);\n"
8016 #: ../src/guestfs-actions.pod:2229 ../fish/guestfish-actions.pod:1499
8018 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
8019 "the root directory being C<root>."
8023 #: ../src/guestfs-actions.pod:2232 ../fish/guestfish-actions.pod:1502
8025 "Note: If grub-install reports the error \"No suitable drive was found in the "
8026 "generated device map.\" it may be that you need to create a "
8027 "C</boot/grub/device.map> file first that contains the mapping between grub "
8028 "device names and Linux device names. It is usually sufficient to create a "
8033 #: ../src/guestfs-actions.pod:2239 ../fish/guestfish-actions.pod:1509
8041 #: ../src/guestfs-actions.pod:2241 ../fish/guestfish-actions.pod:1511
8042 msgid "replacing C</dev/vda> with the name of the installation device."
8046 #: ../src/guestfs-actions.pod:2245
8047 msgid "(Added in 1.0.17)"
8051 #: ../src/guestfs-actions.pod:2247
8052 msgid "guestfs_head"
8056 #: ../src/guestfs-actions.pod:2249
8060 " guestfs_head (guestfs_h *g,\n"
8061 " const char *path);\n"
8066 #: ../src/guestfs-actions.pod:2253 ../fish/guestfish-actions.pod:1517
8068 "This command returns up to the first 10 lines of a file as a list of "
8073 #: ../src/guestfs-actions.pod:2265
8074 msgid "guestfs_head_n"
8078 #: ../src/guestfs-actions.pod:2267
8082 " guestfs_head_n (guestfs_h *g,\n"
8084 " const char *path);\n"
8089 #: ../src/guestfs-actions.pod:2272 ../fish/guestfish-actions.pod:1527
8091 "If the parameter C<nrlines> is a positive number, this returns the first "
8092 "C<nrlines> lines of the file C<path>."
8096 #: ../src/guestfs-actions.pod:2275 ../fish/guestfish-actions.pod:1530
8098 "If the parameter C<nrlines> is a negative number, this returns lines from "
8099 "the file C<path>, excluding the last C<nrlines> lines."
8103 #: ../src/guestfs-actions.pod:2278 ../src/guestfs-actions.pod:6265 ../fish/guestfish-actions.pod:1533 ../fish/guestfish-actions.pod:4184
8104 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
8108 #: ../src/guestfs-actions.pod:2289
8109 msgid "guestfs_hexdump"
8113 #: ../src/guestfs-actions.pod:2291
8117 " guestfs_hexdump (guestfs_h *g,\n"
8118 " const char *path);\n"
8123 #: ../src/guestfs-actions.pod:2295 ../fish/guestfish-actions.pod:1542
8125 "This runs C<hexdump -C> on the given C<path>. The result is the "
8126 "human-readable, canonical hex dump of the file."
8130 #: ../src/guestfs-actions.pod:2304 ../src/guestfs-actions.pod:6049 ../src/guestfs-actions.pod:6104
8131 msgid "(Added in 1.0.22)"
8135 #: ../src/guestfs-actions.pod:2306
8136 msgid "guestfs_initrd_cat"
8140 #: ../src/guestfs-actions.pod:2308
8144 " guestfs_initrd_cat (guestfs_h *g,\n"
8145 " const char *initrdpath,\n"
8146 " const char *filename,\n"
8147 " size_t *size_r);\n"
8152 #: ../src/guestfs-actions.pod:2314 ../fish/guestfish-actions.pod:1552
8154 "This command unpacks the file C<filename> from the initrd file called "
8155 "C<initrdpath>. The filename must be given I<without> the initial C</> "
8160 #: ../src/guestfs-actions.pod:2318 ../fish/guestfish-actions.pod:1556
8162 "For example, in guestfish you could use the following command to examine the "
8163 "boot script (usually called C</init>) contained in a Linux initrd or "
8168 #: ../src/guestfs-actions.pod:2322 ../fish/guestfish-actions.pod:1560
8171 " initrd-cat /boot/initrd-<version>.img init\n"
8176 #: ../src/guestfs-actions.pod:2324
8177 msgid "See also C<guestfs_initrd_list>."
8181 #: ../src/guestfs-actions.pod:2335
8182 msgid "guestfs_initrd_list"
8186 #: ../src/guestfs-actions.pod:2337
8190 " guestfs_initrd_list (guestfs_h *g,\n"
8191 " const char *path);\n"
8196 #: ../src/guestfs-actions.pod:2341 ../fish/guestfish-actions.pod:1571
8197 msgid "This command lists out files contained in an initrd."
8201 #: ../src/guestfs-actions.pod:2343 ../fish/guestfish-actions.pod:1573
8203 "The files are listed without any initial C</> character. The files are "
8204 "listed in the order they appear (not necessarily alphabetical). Directory "
8205 "names are listed as separate items."
8209 #: ../src/guestfs-actions.pod:2347 ../fish/guestfish-actions.pod:1577
8211 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
8212 "initrd. We I<only> support the newer initramfs format (compressed cpio "
8217 #: ../src/guestfs-actions.pod:2357
8218 msgid "guestfs_inotify_add_watch"
8222 #: ../src/guestfs-actions.pod:2359
8226 " guestfs_inotify_add_watch (guestfs_h *g,\n"
8227 " const char *path,\n"
8233 #: ../src/guestfs-actions.pod:2364 ../fish/guestfish-actions.pod:1585
8234 msgid "Watch C<path> for the events listed in C<mask>."
8238 #: ../src/guestfs-actions.pod:2366 ../fish/guestfish-actions.pod:1587
8240 "Note that if C<path> is a directory then events within that directory are "
8241 "watched, but this does I<not> happen recursively (in subdirectories)."
8245 #: ../src/guestfs-actions.pod:2370 ../fish/guestfish-actions.pod:1591
8247 "Note for non-C or non-Linux callers: the inotify events are defined by the "
8248 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
8252 #: ../src/guestfs-actions.pod:2378
8253 msgid "guestfs_inotify_close"
8257 #: ../src/guestfs-actions.pod:2380
8261 " guestfs_inotify_close (guestfs_h *g);\n"
8266 #: ../src/guestfs-actions.pod:2383 ../fish/guestfish-actions.pod:1599
8268 "This closes the inotify handle which was previously opened by inotify_init. "
8269 "It removes all watches, throws away any pending events, and deallocates all "
8274 #: ../src/guestfs-actions.pod:2391
8275 msgid "guestfs_inotify_files"
8279 #: ../src/guestfs-actions.pod:2393
8283 " guestfs_inotify_files (guestfs_h *g);\n"
8288 #: ../src/guestfs-actions.pod:2396
8290 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
8291 "returns a list of pathnames of objects that were touched. The returned "
8292 "pathnames are sorted and deduplicated."
8296 #: ../src/guestfs-actions.pod:2406
8297 msgid "guestfs_inotify_init"
8301 #: ../src/guestfs-actions.pod:2408
8305 " guestfs_inotify_init (guestfs_h *g,\n"
8306 " int maxevents);\n"
8311 #: ../src/guestfs-actions.pod:2412 ../fish/guestfish-actions.pod:1615
8313 "This command creates a new inotify handle. The inotify subsystem can be "
8314 "used to notify events which happen to objects in the guest filesystem."
8318 #: ../src/guestfs-actions.pod:2416
8320 "C<maxevents> is the maximum number of events which will be queued up between "
8321 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
8322 "passed as C<0>, then the kernel (or previously set) default is used. For "
8323 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
8324 "throws away events, but records the fact that it threw them away by setting "
8325 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
8326 "C<guestfs_inotify_read>)."
8330 #: ../src/guestfs-actions.pod:2426
8332 "Before any events are generated, you have to add some watches to the "
8333 "internal watch list. See: C<guestfs_inotify_add_watch>, "
8334 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
8338 #: ../src/guestfs-actions.pod:2432
8340 "Queued up events should be read periodically by calling "
8341 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
8342 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
8343 "often enough then you risk the internal queue overflowing."
8347 #: ../src/guestfs-actions.pod:2439
8349 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
8350 "This also removes any watches automatically."
8354 #: ../src/guestfs-actions.pod:2443 ../fish/guestfish-actions.pod:1646
8356 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
8357 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
8358 "that there is one global inotify handle per libguestfs instance."
8362 #: ../src/guestfs-actions.pod:2452
8363 msgid "guestfs_inotify_read"
8367 #: ../src/guestfs-actions.pod:2454
8370 " struct guestfs_inotify_event_list *\n"
8371 " guestfs_inotify_read (guestfs_h *g);\n"
8376 #: ../src/guestfs-actions.pod:2457 ../fish/guestfish-actions.pod:1655
8378 "Return the complete queue of events that have happened since the previous "
8383 #: ../src/guestfs-actions.pod:2460 ../fish/guestfish-actions.pod:1658
8384 msgid "If no events have happened, this returns an empty list."
8388 #: ../src/guestfs-actions.pod:2462 ../fish/guestfish-actions.pod:1660
8390 "I<Note>: In order to make sure that all events have been read, you must call "
8391 "this function repeatedly until it returns an empty list. The reason is that "
8392 "the call will read events up to the maximum appliance-to-host message size "
8393 "and leave remaining events in the queue."
8397 #: ../src/guestfs-actions.pod:2468
8399 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
8400 "there was an error. I<The caller must call "
8401 "C<guestfs_free_inotify_event_list> after use>."
8405 #: ../src/guestfs-actions.pod:2474
8406 msgid "guestfs_inotify_rm_watch"
8410 #: ../src/guestfs-actions.pod:2476
8414 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
8420 #: ../src/guestfs-actions.pod:2480
8422 "Remove a previously defined inotify watch. See "
8423 "C<guestfs_inotify_add_watch>."
8427 #: ../src/guestfs-actions.pod:2487
8428 msgid "guestfs_inspect_get_arch"
8432 #: ../src/guestfs-actions.pod:2489
8436 " guestfs_inspect_get_arch (guestfs_h *g,\n"
8437 " const char *root);\n"
8442 #: ../src/guestfs-actions.pod:2493 ../src/guestfs-actions.pod:2516 ../src/guestfs-actions.pod:2597 ../src/guestfs-actions.pod:2623 ../src/guestfs-actions.pod:2645 ../src/guestfs-actions.pod:2672 ../src/guestfs-actions.pod:2693 ../src/guestfs-actions.pod:2726 ../src/guestfs-actions.pod:2755 ../src/guestfs-actions.pod:2786 ../src/guestfs-actions.pod:2830 ../src/guestfs-actions.pod:2872 ../src/guestfs-actions.pod:2895
8444 "This function should only be called with a root device string as returned by "
8445 "C<guestfs_inspect_os>."
8449 #: ../src/guestfs-actions.pod:2496
8451 "This returns the architecture of the inspected operating system. The "
8452 "possible return values are listed under C<guestfs_file_architecture>."
8456 #: ../src/guestfs-actions.pod:2500 ../fish/guestfish-actions.pod:1684
8458 "If the architecture could not be determined, then the string C<unknown> is "
8463 #: ../src/guestfs-actions.pod:2503 ../src/guestfs-actions.pod:2584 ../src/guestfs-actions.pod:2632 ../src/guestfs-actions.pod:2660 ../src/guestfs-actions.pod:2742 ../src/guestfs-actions.pod:2773 ../src/guestfs-actions.pod:2797 ../src/guestfs-actions.pod:2816 ../src/guestfs-actions.pod:2859 ../src/guestfs-actions.pod:2882 ../src/guestfs-actions.pod:2988 ../src/guestfs-actions.pod:3029 ../fish/guestfish-actions.pod:1687 ../fish/guestfish-actions.pod:1761 ../fish/guestfish-actions.pod:1794 ../fish/guestfish-actions.pod:1815 ../fish/guestfish-actions.pod:1875 ../fish/guestfish-actions.pod:1899 ../fish/guestfish-actions.pod:1916 ../fish/guestfish-actions.pod:1929 ../fish/guestfish-actions.pod:1964 ../fish/guestfish-actions.pod:1980 ../fish/guestfish-actions.pod:2079 ../fish/guestfish-actions.pod:2113
8464 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
8468 #: ../src/guestfs-actions.pod:2510
8469 msgid "guestfs_inspect_get_distro"
8473 #: ../src/guestfs-actions.pod:2512
8477 " guestfs_inspect_get_distro (guestfs_h *g,\n"
8478 " const char *root);\n"
8483 #: ../src/guestfs-actions.pod:2519 ../fish/guestfish-actions.pod:1696
8484 msgid "This returns the distro (distribution) of the inspected operating system."
8488 #: ../src/guestfs-actions.pod:2522 ../fish/guestfish-actions.pod:1699
8489 msgid "Currently defined distros are:"
8493 #: ../src/guestfs-actions.pod:2526 ../fish/guestfish-actions.pod:1703
8494 msgid "\"archlinux\""
8498 #: ../src/guestfs-actions.pod:2528 ../fish/guestfish-actions.pod:1705
8503 #: ../src/guestfs-actions.pod:2530 ../fish/guestfish-actions.pod:1707
8508 #: ../src/guestfs-actions.pod:2532 ../fish/guestfish-actions.pod:1709
8513 #: ../src/guestfs-actions.pod:2534 ../fish/guestfish-actions.pod:1711
8518 #: ../src/guestfs-actions.pod:2536 ../fish/guestfish-actions.pod:1713
8523 #: ../src/guestfs-actions.pod:2538 ../fish/guestfish-actions.pod:1715
8528 #: ../src/guestfs-actions.pod:2540 ../fish/guestfish-actions.pod:1717
8533 #: ../src/guestfs-actions.pod:2542 ../fish/guestfish-actions.pod:1719
8534 msgid "\"linuxmint\""
8538 #: ../src/guestfs-actions.pod:2544 ../fish/guestfish-actions.pod:1721
8543 #: ../src/guestfs-actions.pod:2546 ../fish/guestfish-actions.pod:1723
8544 msgid "\"mandriva\""
8548 #: ../src/guestfs-actions.pod:2548 ../fish/guestfish-actions.pod:1725
8553 #: ../src/guestfs-actions.pod:2550 ../fish/guestfish-actions.pod:1727
8558 #: ../src/guestfs-actions.pod:2552 ../fish/guestfish-actions.pod:1729
8563 #: ../src/guestfs-actions.pod:2554 ../fish/guestfish-actions.pod:1731
8568 #: ../src/guestfs-actions.pod:2556 ../fish/guestfish-actions.pod:1733
8573 #: ../src/guestfs-actions.pod:2558 ../fish/guestfish-actions.pod:1735
8574 msgid "\"redhat-based\""
8578 #: ../src/guestfs-actions.pod:2560 ../fish/guestfish-actions.pod:1737
8579 msgid "Some Red Hat-derived distro."
8583 #: ../src/guestfs-actions.pod:2562 ../fish/guestfish-actions.pod:1739
8588 #: ../src/guestfs-actions.pod:2564 ../fish/guestfish-actions.pod:1741
8589 msgid "Red Hat Enterprise Linux and some derivatives."
8593 #: ../src/guestfs-actions.pod:2566 ../fish/guestfish-actions.pod:1743
8598 #: ../src/guestfs-actions.pod:2568 ../fish/guestfish-actions.pod:1745
8603 #: ../src/guestfs-actions.pod:2570 ../src/guestfs-actions.pod:2850 ../fish/guestfish-actions.pod:1747 ../fish/guestfish-actions.pod:1955
8608 #: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:1749
8609 msgid "The distro could not be determined."
8613 #: ../src/guestfs-actions.pod:2574 ../src/guestfs-actions.pod:2842 ../fish/guestfish-actions.pod:1751 ../fish/guestfish-actions.pod:1947
8618 #: ../src/guestfs-actions.pod:2576 ../fish/guestfish-actions.pod:1753
8620 "Windows does not have distributions. This string is returned if the OS type "
8625 #: ../src/guestfs-actions.pod:2581 ../src/guestfs-actions.pod:2856 ../fish/guestfish-actions.pod:1758 ../fish/guestfish-actions.pod:1961
8627 "Future versions of libguestfs may return other strings here. The caller "
8628 "should be prepared to handle any string."
8632 #: ../src/guestfs-actions.pod:2591
8633 msgid "guestfs_inspect_get_filesystems"
8637 #: ../src/guestfs-actions.pod:2593
8641 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
8642 " const char *root);\n"
8647 #: ../src/guestfs-actions.pod:2600 ../fish/guestfish-actions.pod:1770
8649 "This returns a list of all the filesystems that we think are associated with "
8650 "this operating system. This includes the root filesystem, other ordinary "
8651 "filesystems, and non-mounted devices like swap partitions."
8655 #: ../src/guestfs-actions.pod:2605 ../fish/guestfish-actions.pod:1775
8657 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
8658 "to be shared between operating systems."
8662 #: ../src/guestfs-actions.pod:2608
8664 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8665 "C<guestfs_inspect_get_mountpoints>."
8669 #: ../src/guestfs-actions.pod:2617
8670 msgid "guestfs_inspect_get_hostname"
8674 #: ../src/guestfs-actions.pod:2619
8678 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
8679 " const char *root);\n"
8684 #: ../src/guestfs-actions.pod:2626 ../fish/guestfish-actions.pod:1788
8686 "This function returns the hostname of the operating system as found by "
8687 "inspection of the guest's configuration files."
8691 #: ../src/guestfs-actions.pod:2629 ../fish/guestfish-actions.pod:1791
8693 "If the hostname could not be determined, then the string C<unknown> is "
8698 #: ../src/guestfs-actions.pod:2637
8699 msgid "(Added in 1.7.9)"
8703 #: ../src/guestfs-actions.pod:2639
8704 msgid "guestfs_inspect_get_major_version"
8708 #: ../src/guestfs-actions.pod:2641
8712 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
8713 " const char *root);\n"
8718 #: ../src/guestfs-actions.pod:2648 ../fish/guestfish-actions.pod:1803
8719 msgid "This returns the major version number of the inspected operating system."
8723 #: ../src/guestfs-actions.pod:2651 ../fish/guestfish-actions.pod:1806
8725 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
8726 "popular public names used by the operating system. Notably the operating "
8727 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
8728 "1). You can find out the real versions corresponding to releases of Windows "
8729 "by consulting Wikipedia or MSDN."
8733 #: ../src/guestfs-actions.pod:2658 ../src/guestfs-actions.pod:2678 ../fish/guestfish-actions.pod:1813 ../fish/guestfish-actions.pod:1827
8734 msgid "If the version could not be determined, then C<0> is returned."
8738 #: ../src/guestfs-actions.pod:2666
8739 msgid "guestfs_inspect_get_minor_version"
8743 #: ../src/guestfs-actions.pod:2668
8747 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
8748 " const char *root);\n"
8753 #: ../src/guestfs-actions.pod:2675 ../fish/guestfish-actions.pod:1824
8754 msgid "This returns the minor version number of the inspected operating system."
8758 #: ../src/guestfs-actions.pod:2680
8760 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8761 "C<guestfs_inspect_get_major_version>."
8765 #: ../src/guestfs-actions.pod:2687
8766 msgid "guestfs_inspect_get_mountpoints"
8770 #: ../src/guestfs-actions.pod:2689
8774 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
8775 " const char *root);\n"
8780 #: ../src/guestfs-actions.pod:2696 ../fish/guestfish-actions.pod:1839
8782 "This returns a hash of where we think the filesystems associated with this "
8783 "operating system should be mounted. Callers should note that this is at "
8784 "best an educated guess made by reading configuration files such as "
8789 #: ../src/guestfs-actions.pod:2701 ../fish/guestfish-actions.pod:1844
8791 "Each element in the returned hashtable has a key which is the path of the "
8792 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
8793 "mounted there (eg. C</dev/sda1>)."
8797 #: ../src/guestfs-actions.pod:2706 ../fish/guestfish-actions.pod:1849
8798 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
8802 #: ../src/guestfs-actions.pod:2709
8804 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8805 "C<guestfs_inspect_get_filesystems>."
8809 #: ../src/guestfs-actions.pod:2712 ../src/guestfs-actions.pod:3356 ../src/guestfs-actions.pod:4550 ../src/guestfs-actions.pod:6406
8811 "This function returns a NULL-terminated array of strings, or NULL if there "
8812 "was an error. The array of strings will always have length C<2n+1>, where "
8813 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
8814 "caller must free the strings and the array after use>."
8818 #: ../src/guestfs-actions.pod:2720
8819 msgid "guestfs_inspect_get_package_format"
8823 #: ../src/guestfs-actions.pod:2722
8827 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
8828 " const char *root);\n"
8833 #: ../src/guestfs-actions.pod:2729
8835 "This function and C<guestfs_inspect_get_package_management> return the "
8836 "package format and package management tool used by the inspected operating "
8837 "system. For example for Fedora these functions would return C<rpm> (package "
8838 "format) and C<yum> (package management)."
8842 #: ../src/guestfs-actions.pod:2735 ../fish/guestfish-actions.pod:1868
8844 "This returns the string C<unknown> if we could not determine the package "
8845 "format I<or> if the operating system does not have a real packaging system "
8850 #: ../src/guestfs-actions.pod:2739 ../fish/guestfish-actions.pod:1872
8852 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>. "
8853 "Future versions of libguestfs may return other strings."
8857 #: ../src/guestfs-actions.pod:2747 ../src/guestfs-actions.pod:2778
8858 msgid "(Added in 1.7.5)"
8862 #: ../src/guestfs-actions.pod:2749
8863 msgid "guestfs_inspect_get_package_management"
8867 #: ../src/guestfs-actions.pod:2751
8871 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
8872 " const char *root);\n"
8877 #: ../src/guestfs-actions.pod:2758
8879 "C<guestfs_inspect_get_package_format> and this function return the package "
8880 "format and package management tool used by the inspected operating system. "
8881 "For example for Fedora these functions would return C<rpm> (package format) "
8882 "and C<yum> (package management)."
8886 #: ../src/guestfs-actions.pod:2764 ../fish/guestfish-actions.pod:1890
8888 "This returns the string C<unknown> if we could not determine the package "
8889 "management tool I<or> if the operating system does not have a real packaging "
8890 "system (eg. Windows)."
8894 #: ../src/guestfs-actions.pod:2768 ../fish/guestfish-actions.pod:1894
8896 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
8897 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>. Future versions of "
8898 "libguestfs may return other strings."
8902 #: ../src/guestfs-actions.pod:2780
8903 msgid "guestfs_inspect_get_product_name"
8907 #: ../src/guestfs-actions.pod:2782
8911 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
8912 " const char *root);\n"
8917 #: ../src/guestfs-actions.pod:2789 ../fish/guestfish-actions.pod:1908
8919 "This returns the product name of the inspected operating system. The "
8920 "product name is generally some freeform string which can be displayed to the "
8921 "user, but should not be parsed by programs."
8925 #: ../src/guestfs-actions.pod:2794 ../fish/guestfish-actions.pod:1913
8927 "If the product name could not be determined, then the string C<unknown> is "
8932 #: ../src/guestfs-actions.pod:2804
8933 msgid "guestfs_inspect_get_roots"
8937 #: ../src/guestfs-actions.pod:2806
8941 " guestfs_inspect_get_roots (guestfs_h *g);\n"
8946 #: ../src/guestfs-actions.pod:2809
8948 "This function is a convenient way to get the list of root devices, as "
8949 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
8950 "the whole inspection process."
8954 #: ../src/guestfs-actions.pod:2813
8956 "This returns an empty list if either no root devices were found or the "
8957 "caller has not called C<guestfs_inspect_os>."
8961 #: ../src/guestfs-actions.pod:2822
8962 msgid "(Added in 1.7.3)"
8966 #: ../src/guestfs-actions.pod:2824
8967 msgid "guestfs_inspect_get_type"
8971 #: ../src/guestfs-actions.pod:2826
8975 " guestfs_inspect_get_type (guestfs_h *g,\n"
8976 " const char *root);\n"
8981 #: ../src/guestfs-actions.pod:2833 ../fish/guestfish-actions.pod:1938
8983 "This returns the type of the inspected operating system. Currently defined "
8988 #: ../src/guestfs-actions.pod:2838 ../fish/guestfish-actions.pod:1943
8993 #: ../src/guestfs-actions.pod:2840 ../fish/guestfish-actions.pod:1945
8994 msgid "Any Linux-based operating system."
8998 #: ../src/guestfs-actions.pod:2844 ../fish/guestfish-actions.pod:1949
8999 msgid "Any Microsoft Windows operating system."
9003 #: ../src/guestfs-actions.pod:2846 ../fish/guestfish-actions.pod:1951
9008 #: ../src/guestfs-actions.pod:2848 ../fish/guestfish-actions.pod:1953
9013 #: ../src/guestfs-actions.pod:2852 ../fish/guestfish-actions.pod:1957
9014 msgid "The operating system type could not be determined."
9018 #: ../src/guestfs-actions.pod:2866
9019 msgid "guestfs_inspect_get_windows_systemroot"
9023 #: ../src/guestfs-actions.pod:2868
9027 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
9028 " const char *root);\n"
9033 #: ../src/guestfs-actions.pod:2875 ../fish/guestfish-actions.pod:1973
9035 "This returns the Windows systemroot of the inspected guest. The systemroot "
9036 "is a directory path such as C</WINDOWS>."
9040 #: ../src/guestfs-actions.pod:2878 ../fish/guestfish-actions.pod:1976
9042 "This call assumes that the guest is Windows and that the systemroot could be "
9043 "determined by inspection. If this is not the case then an error is "
9048 #: ../src/guestfs-actions.pod:2887
9049 msgid "(Added in 1.5.25)"
9053 #: ../src/guestfs-actions.pod:2889
9054 msgid "guestfs_inspect_list_applications"
9058 #: ../src/guestfs-actions.pod:2891
9061 " struct guestfs_application_list *\n"
9062 " guestfs_inspect_list_applications (guestfs_h *g,\n"
9063 " const char *root);\n"
9068 #: ../src/guestfs-actions.pod:2898 ../fish/guestfish-actions.pod:1989
9069 msgid "Return the list of applications installed in the operating system."
9073 #: ../src/guestfs-actions.pod:2900
9075 "I<Note:> This call works differently from other parts of the inspection "
9076 "API. You have to call C<guestfs_inspect_os>, then "
9077 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
9078 "this. Listing applications is a significantly more difficult operation "
9079 "which requires access to the full filesystem. Also note that unlike the "
9080 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
9081 "the libguestfs handle, this call actually reads parts of the mounted "
9082 "filesystems during the call."
9086 #: ../src/guestfs-actions.pod:2910 ../fish/guestfish-actions.pod:2001
9088 "This returns an empty list if the inspection code was not able to determine "
9089 "the list of applications."
9093 #: ../src/guestfs-actions.pod:2913 ../fish/guestfish-actions.pod:2004
9094 msgid "The application structure contains the following fields:"
9098 #: ../src/guestfs-actions.pod:2917 ../fish/guestfish-actions.pod:2008
9103 #: ../src/guestfs-actions.pod:2919 ../fish/guestfish-actions.pod:2010
9105 "The name of the application. For Red Hat-derived and Debian-derived Linux "
9106 "guests, this is the package name."
9110 #: ../src/guestfs-actions.pod:2922 ../fish/guestfish-actions.pod:2013
9111 msgid "C<app_display_name>"
9115 #: ../src/guestfs-actions.pod:2924 ../fish/guestfish-actions.pod:2015
9117 "The display name of the application, sometimes localized to the install "
9118 "language of the guest operating system."
9122 #: ../src/guestfs-actions.pod:2927 ../fish/guestfish-actions.pod:2018
9124 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
9125 "to display something can use C<app_name> instead."
9129 #: ../src/guestfs-actions.pod:2930 ../fish/guestfish-actions.pod:2021
9130 msgid "C<app_epoch>"
9134 #: ../src/guestfs-actions.pod:2932 ../fish/guestfish-actions.pod:2023
9136 "For package managers which use epochs, this contains the epoch of the "
9137 "package (an integer). If unavailable, this is returned as C<0>."
9141 #: ../src/guestfs-actions.pod:2935 ../fish/guestfish-actions.pod:2026
9142 msgid "C<app_version>"
9146 #: ../src/guestfs-actions.pod:2937 ../fish/guestfish-actions.pod:2028
9148 "The version string of the application or package. If unavailable this is "
9149 "returned as an empty string C<\"\">."
9153 #: ../src/guestfs-actions.pod:2940 ../fish/guestfish-actions.pod:2031
9154 msgid "C<app_release>"
9158 #: ../src/guestfs-actions.pod:2942 ../fish/guestfish-actions.pod:2033
9160 "The release string of the application or package, for package managers that "
9161 "use this. If unavailable this is returned as an empty string C<\"\">."
9165 #: ../src/guestfs-actions.pod:2946 ../fish/guestfish-actions.pod:2037
9166 msgid "C<app_install_path>"
9170 #: ../src/guestfs-actions.pod:2948 ../fish/guestfish-actions.pod:2039
9172 "The installation path of the application (on operating systems such as "
9173 "Windows which use installation paths). This path is in the format used by "
9174 "the guest operating system, it is not a libguestfs path."
9178 #: ../src/guestfs-actions.pod:2953 ../fish/guestfish-actions.pod:2044
9179 msgid "If unavailable this is returned as an empty string C<\"\">."
9183 #: ../src/guestfs-actions.pod:2955 ../fish/guestfish-actions.pod:2046
9184 msgid "C<app_trans_path>"
9188 #: ../src/guestfs-actions.pod:2957 ../fish/guestfish-actions.pod:2048
9190 "The install path translated into a libguestfs path. If unavailable this is "
9191 "returned as an empty string C<\"\">."
9195 #: ../src/guestfs-actions.pod:2960 ../fish/guestfish-actions.pod:2051
9196 msgid "C<app_publisher>"
9200 #: ../src/guestfs-actions.pod:2962 ../fish/guestfish-actions.pod:2053
9202 "The name of the publisher of the application, for package managers that use "
9203 "this. If unavailable this is returned as an empty string C<\"\">."
9207 #: ../src/guestfs-actions.pod:2966 ../fish/guestfish-actions.pod:2057
9212 #: ../src/guestfs-actions.pod:2968 ../fish/guestfish-actions.pod:2059
9214 "The URL (eg. upstream URL) of the application. If unavailable this is "
9215 "returned as an empty string C<\"\">."
9219 #: ../src/guestfs-actions.pod:2971 ../fish/guestfish-actions.pod:2062
9220 msgid "C<app_source_package>"
9224 #: ../src/guestfs-actions.pod:2973 ../fish/guestfish-actions.pod:2064
9226 "For packaging systems which support this, the name of the source package. "
9227 "If unavailable this is returned as an empty string C<\"\">."
9231 #: ../src/guestfs-actions.pod:2976 ../fish/guestfish-actions.pod:2067
9232 msgid "C<app_summary>"
9236 #: ../src/guestfs-actions.pod:2978 ../fish/guestfish-actions.pod:2069
9238 "A short (usually one line) description of the application or package. If "
9239 "unavailable this is returned as an empty string C<\"\">."
9243 #: ../src/guestfs-actions.pod:2981 ../fish/guestfish-actions.pod:2072
9244 msgid "C<app_description>"
9248 #: ../src/guestfs-actions.pod:2983 ../fish/guestfish-actions.pod:2074
9250 "A longer description of the application or package. If unavailable this is "
9251 "returned as an empty string C<\"\">."
9255 #: ../src/guestfs-actions.pod:2990
9257 "This function returns a C<struct guestfs_application_list *>, or NULL if "
9258 "there was an error. I<The caller must call C<guestfs_free_application_list> "
9263 #: ../src/guestfs-actions.pod:2994
9264 msgid "(Added in 1.7.8)"
9268 #: ../src/guestfs-actions.pod:2996
9269 msgid "guestfs_inspect_os"
9273 #: ../src/guestfs-actions.pod:2998
9277 " guestfs_inspect_os (guestfs_h *g);\n"
9282 #: ../src/guestfs-actions.pod:3001 ../fish/guestfish-actions.pod:2085
9284 "This function uses other libguestfs functions and certain heuristics to "
9285 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
9286 "for operating systems."
9290 #: ../src/guestfs-actions.pod:3005 ../fish/guestfish-actions.pod:2089
9291 msgid "The list returned is empty if no operating systems were found."
9295 #: ../src/guestfs-actions.pod:3007 ../fish/guestfish-actions.pod:2091
9297 "If one operating system was found, then this returns a list with a single "
9298 "element, which is the name of the root filesystem of this operating system. "
9299 "It is also possible for this function to return a list containing more than "
9300 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
9301 "element being the root filesystem of one of the operating systems."
9305 #: ../src/guestfs-actions.pod:3014
9307 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
9308 "functions in order to query further information about each operating system, "
9309 "such as the name and version."
9313 #: ../src/guestfs-actions.pod:3019
9315 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
9316 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
9317 "the contents. This should be called with no disks currently mounted. The "
9318 "function may also use Augeas, so any existing Augeas handle will be closed."
9322 #: ../src/guestfs-actions.pod:3025 ../fish/guestfish-actions.pod:2109
9324 "This function cannot decrypt encrypted disks. The caller must do that first "
9325 "(supplying the necessary keys) if the disk is encrypted."
9329 #: ../src/guestfs-actions.pod:3031 ../src/guestfs-actions.pod:3314 ../src/guestfs-actions.pod:3376
9330 msgid "See also C<guestfs_list_filesystems>."
9334 #: ../src/guestfs-actions.pod:3039
9335 msgid "guestfs_is_blockdev"
9339 #: ../src/guestfs-actions.pod:3041
9343 " guestfs_is_blockdev (guestfs_h *g,\n"
9344 " const char *path);\n"
9349 #: ../src/guestfs-actions.pod:3045 ../fish/guestfish-actions.pod:2121
9351 "This returns C<true> if and only if there is a block device with the given "
9356 #: ../src/guestfs-actions.pod:3048 ../src/guestfs-actions.pod:3077 ../src/guestfs-actions.pod:3107 ../src/guestfs-actions.pod:3122 ../src/guestfs-actions.pod:3138 ../src/guestfs-actions.pod:3194 ../src/guestfs-actions.pod:3209
9357 msgid "See also C<guestfs_stat>."
9361 #: ../src/guestfs-actions.pod:3052 ../src/guestfs-actions.pod:3081 ../src/guestfs-actions.pod:3126 ../src/guestfs-actions.pod:3198 ../src/guestfs-actions.pod:3213
9362 msgid "(Added in 1.5.10)"
9366 #: ../src/guestfs-actions.pod:3054
9367 msgid "guestfs_is_busy"
9371 #: ../src/guestfs-actions.pod:3056
9375 " guestfs_is_busy (guestfs_h *g);\n"
9380 #: ../src/guestfs-actions.pod:3059 ../fish/guestfish-actions.pod:2130
9382 "This returns true iff this handle is busy processing a command (in the "
9387 #: ../src/guestfs-actions.pod:3068
9388 msgid "guestfs_is_chardev"
9392 #: ../src/guestfs-actions.pod:3070
9396 " guestfs_is_chardev (guestfs_h *g,\n"
9397 " const char *path);\n"
9402 #: ../src/guestfs-actions.pod:3074 ../fish/guestfish-actions.pod:2139
9404 "This returns C<true> if and only if there is a character device with the "
9405 "given C<path> name."
9409 #: ../src/guestfs-actions.pod:3083
9410 msgid "guestfs_is_config"
9414 #: ../src/guestfs-actions.pod:3085
9418 " guestfs_is_config (guestfs_h *g);\n"
9423 #: ../src/guestfs-actions.pod:3088 ../fish/guestfish-actions.pod:2148
9425 "This returns true iff this handle is being configured (in the C<CONFIG> "
9430 #: ../src/guestfs-actions.pod:3097
9431 msgid "guestfs_is_dir"
9435 #: ../src/guestfs-actions.pod:3099
9439 " guestfs_is_dir (guestfs_h *g,\n"
9440 " const char *path);\n"
9445 #: ../src/guestfs-actions.pod:3103 ../fish/guestfish-actions.pod:2157
9447 "This returns C<true> if and only if there is a directory with the given "
9448 "C<path> name. Note that it returns false for other objects like files."
9452 #: ../src/guestfs-actions.pod:3113
9453 msgid "guestfs_is_fifo"
9457 #: ../src/guestfs-actions.pod:3115
9461 " guestfs_is_fifo (guestfs_h *g,\n"
9462 " const char *path);\n"
9467 #: ../src/guestfs-actions.pod:3119 ../fish/guestfish-actions.pod:2167
9469 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
9470 "given C<path> name."
9474 #: ../src/guestfs-actions.pod:3128
9475 msgid "guestfs_is_file"
9479 #: ../src/guestfs-actions.pod:3130
9483 " guestfs_is_file (guestfs_h *g,\n"
9484 " const char *path);\n"
9489 #: ../src/guestfs-actions.pod:3134 ../fish/guestfish-actions.pod:2176
9491 "This returns C<true> if and only if there is a regular file with the given "
9492 "C<path> name. Note that it returns false for other objects like "
9497 #: ../src/guestfs-actions.pod:3144
9498 msgid "guestfs_is_launching"
9502 #: ../src/guestfs-actions.pod:3146
9506 " guestfs_is_launching (guestfs_h *g);\n"
9511 #: ../src/guestfs-actions.pod:3149 ../fish/guestfish-actions.pod:2186
9513 "This returns true iff this handle is launching the subprocess (in the "
9514 "C<LAUNCHING> state)."
9518 #: ../src/guestfs-actions.pod:3158
9519 msgid "guestfs_is_lv"
9523 #: ../src/guestfs-actions.pod:3160
9527 " guestfs_is_lv (guestfs_h *g,\n"
9528 " const char *device);\n"
9533 #: ../src/guestfs-actions.pod:3164 ../fish/guestfish-actions.pod:2195
9535 "This command tests whether C<device> is a logical volume, and returns true "
9536 "iff this is the case."
9540 #: ../src/guestfs-actions.pod:3171
9541 msgid "guestfs_is_ready"
9545 #: ../src/guestfs-actions.pod:3173
9549 " guestfs_is_ready (guestfs_h *g);\n"
9554 #: ../src/guestfs-actions.pod:3176 ../fish/guestfish-actions.pod:2202
9556 "This returns true iff this handle is ready to accept commands (in the "
9561 #: ../src/guestfs-actions.pod:3185
9562 msgid "guestfs_is_socket"
9566 #: ../src/guestfs-actions.pod:3187
9570 " guestfs_is_socket (guestfs_h *g,\n"
9571 " const char *path);\n"
9576 #: ../src/guestfs-actions.pod:3191 ../fish/guestfish-actions.pod:2211
9578 "This returns C<true> if and only if there is a Unix domain socket with the "
9579 "given C<path> name."
9583 #: ../src/guestfs-actions.pod:3200
9584 msgid "guestfs_is_symlink"
9588 #: ../src/guestfs-actions.pod:3202
9592 " guestfs_is_symlink (guestfs_h *g,\n"
9593 " const char *path);\n"
9598 #: ../src/guestfs-actions.pod:3206 ../fish/guestfish-actions.pod:2220
9600 "This returns C<true> if and only if there is a symbolic link with the given "
9605 #: ../src/guestfs-actions.pod:3215
9606 msgid "guestfs_kill_subprocess"
9610 #: ../src/guestfs-actions.pod:3217
9614 " guestfs_kill_subprocess (guestfs_h *g);\n"
9619 #: ../src/guestfs-actions.pod:3220 ../fish/guestfish-actions.pod:2229
9620 msgid "This kills the qemu subprocess. You should never need to call this."
9624 #: ../src/guestfs-actions.pod:3226
9625 msgid "guestfs_launch"
9629 #: ../src/guestfs-actions.pod:3228
9633 " guestfs_launch (guestfs_h *g);\n"
9638 #: ../src/guestfs-actions.pod:3231 ../fish/guestfish-actions.pod:2237
9640 "Internally libguestfs is implemented by running a virtual machine using "
9645 #: ../src/guestfs-actions.pod:3234 ../fish/guestfish-actions.pod:2240
9647 "You should call this after configuring the handle (eg. adding drives) but "
9648 "before performing any actions."
9652 #: ../src/guestfs-actions.pod:3241
9653 msgid "guestfs_lchown"
9657 #: ../src/guestfs-actions.pod:3243
9661 " guestfs_lchown (guestfs_h *g,\n"
9664 " const char *path);\n"
9669 #: ../src/guestfs-actions.pod:3249
9671 "Change the file owner to C<owner> and group to C<group>. This is like "
9672 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
9673 "changed, not the target."
9677 #: ../src/guestfs-actions.pod:3261
9678 msgid "guestfs_lgetxattr"
9682 #: ../src/guestfs-actions.pod:3263
9686 " guestfs_lgetxattr (guestfs_h *g,\n"
9687 " const char *path,\n"
9688 " const char *name,\n"
9689 " size_t *size_r);\n"
9694 #: ../src/guestfs-actions.pod:3269 ../fish/guestfish-actions.pod:2259
9696 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
9697 "is a symlink, then this call returns an extended attribute from the symlink."
9701 #: ../src/guestfs-actions.pod:3283
9702 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
9706 #: ../src/guestfs-actions.pod:3289
9707 msgid "guestfs_lgetxattrs"
9711 #: ../src/guestfs-actions.pod:3291
9714 " struct guestfs_xattr_list *\n"
9715 " guestfs_lgetxattrs (guestfs_h *g,\n"
9716 " const char *path);\n"
9721 #: ../src/guestfs-actions.pod:3295
9723 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
9724 "then it returns the extended attributes of the link itself."
9728 #: ../src/guestfs-actions.pod:3305
9729 msgid "guestfs_list_devices"
9733 #: ../src/guestfs-actions.pod:3307
9737 " guestfs_list_devices (guestfs_h *g);\n"
9742 #: ../src/guestfs-actions.pod:3310 ../fish/guestfish-actions.pod:2287
9743 msgid "List all the block devices."
9747 #: ../src/guestfs-actions.pod:3312 ../fish/guestfish-actions.pod:2289
9748 msgid "The full block device names are returned, eg. C</dev/sda>."
9752 #: ../src/guestfs-actions.pod:3322
9753 msgid "guestfs_list_filesystems"
9757 #: ../src/guestfs-actions.pod:3324
9761 " guestfs_list_filesystems (guestfs_h *g);\n"
9766 #: ../src/guestfs-actions.pod:3327 ../fish/guestfish-actions.pod:2297
9768 "This inspection command looks for filesystems on partitions, block devices "
9769 "and logical volumes, returning a list of devices containing filesystems and "
9774 #: ../src/guestfs-actions.pod:3331 ../fish/guestfish-actions.pod:2301
9776 "The return value is a hash, where the keys are the devices containing "
9777 "filesystems, and the values are the filesystem types. For example:"
9781 #: ../src/guestfs-actions.pod:3335 ../fish/guestfish-actions.pod:2305
9784 " \"/dev/sda1\" => \"ntfs\"\n"
9785 " \"/dev/sda2\" => \"ext2\"\n"
9786 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
9787 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
9792 #: ../src/guestfs-actions.pod:3340 ../fish/guestfish-actions.pod:2310
9794 "The value can have the special value \"unknown\", meaning the content of the "
9795 "device is undetermined or empty. \"swap\" means a Linux swap partition."
9799 #: ../src/guestfs-actions.pod:3344
9801 "This command runs other libguestfs commands, which might include "
9802 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
9803 "soon after launch and only when nothing is mounted."
9807 #: ../src/guestfs-actions.pod:3348
9809 "Not all of the filesystems returned will be mountable. In particular, swap "
9810 "partitions are returned in the list. Also this command does not check that "
9811 "each filesystem found is valid and mountable, and some filesystems might be "
9812 "mountable but require special options. Filesystems may not all belong to a "
9813 "single logical operating system (use C<guestfs_inspect_os> to look for "
9818 #: ../src/guestfs-actions.pod:3362 ../src/guestfs-actions.pod:4951
9819 msgid "(Added in 1.5.15)"
9823 #: ../src/guestfs-actions.pod:3364
9824 msgid "guestfs_list_partitions"
9828 #: ../src/guestfs-actions.pod:3366
9832 " guestfs_list_partitions (guestfs_h *g);\n"
9837 #: ../src/guestfs-actions.pod:3369 ../fish/guestfish-actions.pod:2330
9838 msgid "List all the partitions detected on all block devices."
9842 #: ../src/guestfs-actions.pod:3371 ../fish/guestfish-actions.pod:2332
9843 msgid "The full partition device names are returned, eg. C</dev/sda1>"
9847 #: ../src/guestfs-actions.pod:3373
9849 "This does not return logical volumes. For that you will need to call "
9854 #: ../src/guestfs-actions.pod:3384
9859 #: ../src/guestfs-actions.pod:3386
9863 " guestfs_ll (guestfs_h *g,\n"
9864 " const char *directory);\n"
9869 #: ../src/guestfs-actions.pod:3390 ../fish/guestfish-actions.pod:2343
9871 "List the files in C<directory> (relative to the root directory, there is no "
9872 "cwd) in the format of 'ls -la'."
9876 #: ../src/guestfs-actions.pod:3393 ../fish/guestfish-actions.pod:2346
9878 "This command is mostly useful for interactive sessions. It is I<not> "
9879 "intended that you try to parse the output string."
9883 #: ../src/guestfs-actions.pod:3401
9888 #: ../src/guestfs-actions.pod:3403
9892 " guestfs_ln (guestfs_h *g,\n"
9893 " const char *target,\n"
9894 " const char *linkname);\n"
9899 #: ../src/guestfs-actions.pod:3408 ../fish/guestfish-actions.pod:2353
9900 msgid "This command creates a hard link using the C<ln> command."
9904 #: ../src/guestfs-actions.pod:3414
9905 msgid "guestfs_ln_f"
9909 #: ../src/guestfs-actions.pod:3416
9913 " guestfs_ln_f (guestfs_h *g,\n"
9914 " const char *target,\n"
9915 " const char *linkname);\n"
9920 #: ../src/guestfs-actions.pod:3421 ../fish/guestfish-actions.pod:2359
9922 "This command creates a hard link using the C<ln -f> command. The C<-f> "
9923 "option removes the link (C<linkname>) if it exists already."
9927 #: ../src/guestfs-actions.pod:3428
9928 msgid "guestfs_ln_s"
9932 #: ../src/guestfs-actions.pod:3430
9936 " guestfs_ln_s (guestfs_h *g,\n"
9937 " const char *target,\n"
9938 " const char *linkname);\n"
9943 #: ../src/guestfs-actions.pod:3435 ../fish/guestfish-actions.pod:2366
9944 msgid "This command creates a symbolic link using the C<ln -s> command."
9948 #: ../src/guestfs-actions.pod:3441
9949 msgid "guestfs_ln_sf"
9953 #: ../src/guestfs-actions.pod:3443
9957 " guestfs_ln_sf (guestfs_h *g,\n"
9958 " const char *target,\n"
9959 " const char *linkname);\n"
9964 #: ../src/guestfs-actions.pod:3448 ../fish/guestfish-actions.pod:2372
9966 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
9967 "option removes the link (C<linkname>) if it exists already."
9971 #: ../src/guestfs-actions.pod:3455
9972 msgid "guestfs_lremovexattr"
9976 #: ../src/guestfs-actions.pod:3457
9980 " guestfs_lremovexattr (guestfs_h *g,\n"
9981 " const char *xattr,\n"
9982 " const char *path);\n"
9987 #: ../src/guestfs-actions.pod:3462
9989 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
9990 "link, then it removes an extended attribute of the link itself."
9994 #: ../src/guestfs-actions.pod:3470
9999 #: ../src/guestfs-actions.pod:3472
10003 " guestfs_ls (guestfs_h *g,\n"
10004 " const char *directory);\n"
10009 #: ../src/guestfs-actions.pod:3476 ../fish/guestfish-actions.pod:2387
10011 "List the files in C<directory> (relative to the root directory, there is no "
10012 "cwd). The '.' and '..' entries are not returned, but hidden files are "
10017 #: ../src/guestfs-actions.pod:3480
10019 "This command is mostly useful for interactive sessions. Programs should "
10020 "probably use C<guestfs_readdir> instead."
10024 #: ../src/guestfs-actions.pod:3489
10025 msgid "guestfs_lsetxattr"
10029 #: ../src/guestfs-actions.pod:3491
10033 " guestfs_lsetxattr (guestfs_h *g,\n"
10034 " const char *xattr,\n"
10035 " const char *val,\n"
10037 " const char *path);\n"
10042 #: ../src/guestfs-actions.pod:3498
10044 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
10045 "then it sets an extended attribute of the link itself."
10049 #: ../src/guestfs-actions.pod:3506
10050 msgid "guestfs_lstat"
10054 #: ../src/guestfs-actions.pod:3508
10057 " struct guestfs_stat *\n"
10058 " guestfs_lstat (guestfs_h *g,\n"
10059 " const char *path);\n"
10064 #: ../src/guestfs-actions.pod:3512 ../src/guestfs-actions.pod:6005 ../fish/guestfish-actions.pod:2406 ../fish/guestfish-actions.pod:4019
10065 msgid "Returns file information for the given C<path>."
10069 #: ../src/guestfs-actions.pod:3514
10071 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
10072 "link, then the link is stat-ed, not the file it refers to."
10076 #: ../src/guestfs-actions.pod:3518 ../fish/guestfish-actions.pod:2412
10077 msgid "This is the same as the C<lstat(2)> system call."
10081 #: ../src/guestfs-actions.pod:3520 ../src/guestfs-actions.pod:6009
10083 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
10084 "error. I<The caller must call C<guestfs_free_stat> after use>."
10088 #: ../src/guestfs-actions.pod:3524 ../src/guestfs-actions.pod:6013 ../src/guestfs-actions.pod:6031 ../src/guestfs-actions.pod:6412
10089 msgid "(Added in 0.9.2)"
10093 #: ../src/guestfs-actions.pod:3526
10094 msgid "guestfs_lstatlist"
10098 #: ../src/guestfs-actions.pod:3528
10101 " struct guestfs_stat_list *\n"
10102 " guestfs_lstatlist (guestfs_h *g,\n"
10103 " const char *path,\n"
10104 " char *const *names);\n"
10109 #: ../src/guestfs-actions.pod:3533
10111 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
10112 "files, where all files are in the directory C<path>. C<names> is the list "
10113 "of files from this directory."
10117 #: ../src/guestfs-actions.pod:3537 ../fish/guestfish-actions.pod:2422
10119 "On return you get a list of stat structs, with a one-to-one correspondence "
10120 "to the C<names> list. If any name did not exist or could not be lstat'd, "
10121 "then the C<ino> field of that structure is set to C<-1>."
10125 #: ../src/guestfs-actions.pod:3542
10127 "This call is intended for programs that want to efficiently list a directory "
10128 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
10129 "for a similarly efficient call for getting extended attributes. Very long "
10130 "directory listings might cause the protocol message size to be exceeded, "
10131 "causing this call to fail. The caller must split up such requests into "
10132 "smaller groups of names."
10136 #: ../src/guestfs-actions.pod:3550
10138 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
10139 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
10143 #: ../src/guestfs-actions.pod:3556
10144 msgid "guestfs_luks_add_key"
10148 #: ../src/guestfs-actions.pod:3558
10152 " guestfs_luks_add_key (guestfs_h *g,\n"
10153 " const char *device,\n"
10154 " const char *key,\n"
10155 " const char *newkey,\n"
10161 #: ../src/guestfs-actions.pod:3565 ../fish/guestfish-actions.pod:2439
10163 "This command adds a new key on LUKS device C<device>. C<key> is any "
10164 "existing key, and is used to access the device. C<newkey> is the new key to "
10165 "add. C<keyslot> is the key slot that will be replaced."
10169 #: ../src/guestfs-actions.pod:3570
10171 "Note that if C<keyslot> already contains a key, then this command will "
10172 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
10176 #: ../src/guestfs-actions.pod:3576 ../src/guestfs-actions.pod:3616 ../src/guestfs-actions.pod:3639 ../src/guestfs-actions.pod:3659 ../src/guestfs-actions.pod:3691 ../src/guestfs-actions.pod:3710
10178 "This function takes a key or passphrase parameter which could contain "
10179 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
10184 #: ../src/guestfs-actions.pod:3580 ../src/guestfs-actions.pod:3620 ../src/guestfs-actions.pod:3643 ../src/guestfs-actions.pod:3663
10185 msgid "(Added in 1.5.2)"
10189 #: ../src/guestfs-actions.pod:3582
10190 msgid "guestfs_luks_close"
10194 #: ../src/guestfs-actions.pod:3584
10198 " guestfs_luks_close (guestfs_h *g,\n"
10199 " const char *device);\n"
10204 #: ../src/guestfs-actions.pod:3588
10206 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
10207 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
10208 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
10209 "underlying block device."
10213 #: ../src/guestfs-actions.pod:3596 ../src/guestfs-actions.pod:3695 ../src/guestfs-actions.pod:3714 ../src/guestfs-actions.pod:3764 ../src/guestfs-actions.pod:3812
10214 msgid "(Added in 1.5.1)"
10218 #: ../src/guestfs-actions.pod:3598
10219 msgid "guestfs_luks_format"
10223 #: ../src/guestfs-actions.pod:3600
10227 " guestfs_luks_format (guestfs_h *g,\n"
10228 " const char *device,\n"
10229 " const char *key,\n"
10235 #: ../src/guestfs-actions.pod:3606 ../fish/guestfish-actions.pod:2465
10237 "This command erases existing data on C<device> and formats the device as a "
10238 "LUKS encrypted device. C<key> is the initial key, which is added to key "
10239 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
10243 #: ../src/guestfs-actions.pod:3613 ../src/guestfs-actions.pod:3636 ../src/guestfs-actions.pod:3776 ../src/guestfs-actions.pod:4702 ../src/guestfs-actions.pod:5465 ../src/guestfs-actions.pod:5840 ../src/guestfs-actions.pod:5863 ../src/guestfs-actions.pod:5889 ../src/guestfs-actions.pod:7049 ../fish/guestfish-actions.pod:2473 ../fish/guestfish-actions.pod:2486 ../fish/guestfish-actions.pod:2570 ../fish/guestfish-actions.pod:3131 ../fish/guestfish-actions.pod:3638 ../fish/guestfish-actions.pod:3918 ../fish/guestfish-actions.pod:3934 ../fish/guestfish-actions.pod:3949 ../fish/guestfish-actions.pod:4664
10245 "B<This command is dangerous. Without careful use you can easily destroy all "
10250 #: ../src/guestfs-actions.pod:3622
10251 msgid "guestfs_luks_format_cipher"
10255 #: ../src/guestfs-actions.pod:3624
10259 " guestfs_luks_format_cipher (guestfs_h *g,\n"
10260 " const char *device,\n"
10261 " const char *key,\n"
10263 " const char *cipher);\n"
10268 #: ../src/guestfs-actions.pod:3631
10270 "This command is the same as C<guestfs_luks_format> but it also allows you to "
10271 "set the C<cipher> used."
10275 #: ../src/guestfs-actions.pod:3645
10276 msgid "guestfs_luks_kill_slot"
10280 #: ../src/guestfs-actions.pod:3647
10284 " guestfs_luks_kill_slot (guestfs_h *g,\n"
10285 " const char *device,\n"
10286 " const char *key,\n"
10292 #: ../src/guestfs-actions.pod:3653 ../fish/guestfish-actions.pod:2493
10294 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
10295 "device C<device>. C<key> must be one of the I<other> keys."
10299 #: ../src/guestfs-actions.pod:3665
10300 msgid "guestfs_luks_open"
10304 #: ../src/guestfs-actions.pod:3667
10308 " guestfs_luks_open (guestfs_h *g,\n"
10309 " const char *device,\n"
10310 " const char *key,\n"
10311 " const char *mapname);\n"
10316 #: ../src/guestfs-actions.pod:3673 ../fish/guestfish-actions.pod:2504
10318 "This command opens a block device which has been encrypted according to the "
10319 "Linux Unified Key Setup (LUKS) standard."
10323 #: ../src/guestfs-actions.pod:3676 ../fish/guestfish-actions.pod:2507
10324 msgid "C<device> is the encrypted block device or partition."
10328 #: ../src/guestfs-actions.pod:3678 ../fish/guestfish-actions.pod:2509
10330 "The caller must supply one of the keys associated with the LUKS block "
10331 "device, in the C<key> parameter."
10335 #: ../src/guestfs-actions.pod:3681 ../fish/guestfish-actions.pod:2512
10337 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
10338 "writes to this block device are decrypted from and encrypted to the "
10339 "underlying C<device> respectively."
10343 #: ../src/guestfs-actions.pod:3685
10345 "If this block device contains LVM volume groups, then calling "
10346 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
10351 #: ../src/guestfs-actions.pod:3697
10352 msgid "guestfs_luks_open_ro"
10356 #: ../src/guestfs-actions.pod:3699
10360 " guestfs_luks_open_ro (guestfs_h *g,\n"
10361 " const char *device,\n"
10362 " const char *key,\n"
10363 " const char *mapname);\n"
10368 #: ../src/guestfs-actions.pod:3705
10370 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
10375 #: ../src/guestfs-actions.pod:3716
10376 msgid "guestfs_lvcreate"
10380 #: ../src/guestfs-actions.pod:3718
10384 " guestfs_lvcreate (guestfs_h *g,\n"
10385 " const char *logvol,\n"
10386 " const char *volgroup,\n"
10392 #: ../src/guestfs-actions.pod:3724 ../fish/guestfish-actions.pod:2537
10394 "This creates an LVM logical volume called C<logvol> on the volume group "
10395 "C<volgroup>, with C<size> megabytes."
10399 #: ../src/guestfs-actions.pod:3731
10400 msgid "guestfs_lvm_canonical_lv_name"
10404 #: ../src/guestfs-actions.pod:3733
10408 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
10409 " const char *lvname);\n"
10414 #: ../src/guestfs-actions.pod:3737 ../fish/guestfish-actions.pod:2544
10416 "This converts alternative naming schemes for LVs that you might find to the "
10417 "canonical name. For example, C</dev/mapper/VG-LV> is converted to "
10422 #: ../src/guestfs-actions.pod:3741 ../fish/guestfish-actions.pod:2548
10424 "This command returns an error if the C<lvname> parameter does not refer to a "
10429 #: ../src/guestfs-actions.pod:3744
10430 msgid "See also C<guestfs_is_lv>."
10434 #: ../src/guestfs-actions.pod:3749
10435 msgid "(Added in 1.5.24)"
10439 #: ../src/guestfs-actions.pod:3751
10440 msgid "guestfs_lvm_clear_filter"
10444 #: ../src/guestfs-actions.pod:3753
10448 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
10453 #: ../src/guestfs-actions.pod:3756
10455 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
10456 "see every block device."
10460 #: ../src/guestfs-actions.pod:3759 ../src/guestfs-actions.pod:3801 ../fish/guestfish-actions.pod:2560 ../fish/guestfish-actions.pod:2591
10461 msgid "This command also clears the LVM cache and performs a volume group scan."
10465 #: ../src/guestfs-actions.pod:3766
10466 msgid "guestfs_lvm_remove_all"
10470 #: ../src/guestfs-actions.pod:3768
10474 " guestfs_lvm_remove_all (guestfs_h *g);\n"
10479 #: ../src/guestfs-actions.pod:3771 ../fish/guestfish-actions.pod:2567
10481 "This command removes all LVM logical volumes, volume groups and physical "
10486 #: ../src/guestfs-actions.pod:3781
10487 msgid "guestfs_lvm_set_filter"
10491 #: ../src/guestfs-actions.pod:3783
10495 " guestfs_lvm_set_filter (guestfs_h *g,\n"
10496 " char *const *devices);\n"
10501 #: ../src/guestfs-actions.pod:3787 ../fish/guestfish-actions.pod:2577
10503 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
10504 "block devices in the list C<devices>, and will ignore all other attached "
10509 #: ../src/guestfs-actions.pod:3791 ../fish/guestfish-actions.pod:2581
10511 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
10512 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
10513 "there are two types of duplication possible: either cloned PVs/VGs which "
10514 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
10515 "same name. In normal operation you cannot create this situation, but you "
10516 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
10517 "inside the LVM metadata."
10521 #: ../src/guestfs-actions.pod:3804 ../fish/guestfish-actions.pod:2594
10522 msgid "You can filter whole block devices or individual partitions."
10526 #: ../src/guestfs-actions.pod:3806 ../fish/guestfish-actions.pod:2596
10528 "You cannot use this if any VG is currently in use (eg. contains a mounted "
10529 "filesystem), even if you are not filtering out that VG."
10533 #: ../src/guestfs-actions.pod:3814
10534 msgid "guestfs_lvremove"
10538 #: ../src/guestfs-actions.pod:3816
10542 " guestfs_lvremove (guestfs_h *g,\n"
10543 " const char *device);\n"
10548 #: ../src/guestfs-actions.pod:3820 ../fish/guestfish-actions.pod:2604
10550 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
10551 "LV, such as C</dev/VG/LV>."
10555 #: ../src/guestfs-actions.pod:3823 ../fish/guestfish-actions.pod:2607
10557 "You can also remove all LVs in a volume group by specifying the VG name, "
10562 #: ../src/guestfs-actions.pod:3828 ../src/guestfs-actions.pod:5048 ../src/guestfs-actions.pod:6788
10563 msgid "(Added in 1.0.13)"
10567 #: ../src/guestfs-actions.pod:3830
10568 msgid "guestfs_lvrename"
10572 #: ../src/guestfs-actions.pod:3832
10576 " guestfs_lvrename (guestfs_h *g,\n"
10577 " const char *logvol,\n"
10578 " const char *newlogvol);\n"
10583 #: ../src/guestfs-actions.pod:3837 ../fish/guestfish-actions.pod:2614
10584 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
10588 #: ../src/guestfs-actions.pod:3841 ../src/guestfs-actions.pod:6801
10589 msgid "(Added in 1.0.83)"
10593 #: ../src/guestfs-actions.pod:3843
10594 msgid "guestfs_lvresize"
10598 #: ../src/guestfs-actions.pod:3845
10602 " guestfs_lvresize (guestfs_h *g,\n"
10603 " const char *device,\n"
10609 #: ../src/guestfs-actions.pod:3850 ../fish/guestfish-actions.pod:2620
10611 "This resizes (expands or shrinks) an existing LVM logical volume to "
10612 "C<mbytes>. When reducing, data in the reduced part is lost."
10616 #: ../src/guestfs-actions.pod:3858
10617 msgid "guestfs_lvresize_free"
10621 #: ../src/guestfs-actions.pod:3860
10625 " guestfs_lvresize_free (guestfs_h *g,\n"
10626 " const char *lv,\n"
10632 #: ../src/guestfs-actions.pod:3865 ../fish/guestfish-actions.pod:2628
10634 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
10635 "remaining free space in the volume group. Commonly you would call this with "
10636 "pc = 100 which expands the logical volume as much as possible, using all "
10637 "remaining free space in the volume group."
10641 #: ../src/guestfs-actions.pod:3873
10642 msgid "(Added in 1.3.3)"
10646 #: ../src/guestfs-actions.pod:3875
10647 msgid "guestfs_lvs"
10651 #: ../src/guestfs-actions.pod:3877
10655 " guestfs_lvs (guestfs_h *g);\n"
10660 #: ../src/guestfs-actions.pod:3880 ../fish/guestfish-actions.pod:2638
10662 "List all the logical volumes detected. This is the equivalent of the "
10663 "L<lvs(8)> command."
10667 #: ../src/guestfs-actions.pod:3883 ../fish/guestfish-actions.pod:2641
10669 "This returns a list of the logical volume device names "
10670 "(eg. C</dev/VolGroup00/LogVol00>)."
10674 #: ../src/guestfs-actions.pod:3886
10675 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
10679 #: ../src/guestfs-actions.pod:3894
10680 msgid "guestfs_lvs_full"
10684 #: ../src/guestfs-actions.pod:3896
10687 " struct guestfs_lvm_lv_list *\n"
10688 " guestfs_lvs_full (guestfs_h *g);\n"
10693 #: ../src/guestfs-actions.pod:3899 ../fish/guestfish-actions.pod:2650
10695 "List all the logical volumes detected. This is the equivalent of the "
10696 "L<lvs(8)> command. The \"full\" version includes all fields."
10700 #: ../src/guestfs-actions.pod:3902
10702 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
10703 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after "
10708 #: ../src/guestfs-actions.pod:3908
10709 msgid "guestfs_lvuuid"
10713 #: ../src/guestfs-actions.pod:3910
10717 " guestfs_lvuuid (guestfs_h *g,\n"
10718 " const char *device);\n"
10723 #: ../src/guestfs-actions.pod:3914 ../fish/guestfish-actions.pod:2657
10724 msgid "This command returns the UUID of the LVM LV C<device>."
10728 #: ../src/guestfs-actions.pod:3921
10729 msgid "guestfs_lxattrlist"
10733 #: ../src/guestfs-actions.pod:3923
10736 " struct guestfs_xattr_list *\n"
10737 " guestfs_lxattrlist (guestfs_h *g,\n"
10738 " const char *path,\n"
10739 " char *const *names);\n"
10744 #: ../src/guestfs-actions.pod:3928 ../fish/guestfish-actions.pod:2663
10746 "This call allows you to get the extended attributes of multiple files, where "
10747 "all files are in the directory C<path>. C<names> is the list of files from "
10752 #: ../src/guestfs-actions.pod:3932 ../fish/guestfish-actions.pod:2667
10754 "On return you get a flat list of xattr structs which must be interpreted "
10755 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
10756 "C<attrval> in this struct is zero-length to indicate there was an error "
10757 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
10758 "number (the number of following attributes for this file, which could be "
10759 "C<\"0\">). Then after the first xattr struct are the zero or more "
10760 "attributes for the first named file. This repeats for the second and "
10761 "subsequent files."
10765 #: ../src/guestfs-actions.pod:3942
10767 "This call is intended for programs that want to efficiently list a directory "
10768 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
10769 "a similarly efficient call for getting standard stats. Very long directory "
10770 "listings might cause the protocol message size to be exceeded, causing this "
10771 "call to fail. The caller must split up such requests into smaller groups of "
10776 #: ../src/guestfs-actions.pod:3956
10777 msgid "guestfs_mkdir"
10781 #: ../src/guestfs-actions.pod:3958
10785 " guestfs_mkdir (guestfs_h *g,\n"
10786 " const char *path);\n"
10791 #: ../src/guestfs-actions.pod:3962 ../fish/guestfish-actions.pod:2689
10792 msgid "Create a directory named C<path>."
10796 #: ../src/guestfs-actions.pod:3968
10797 msgid "guestfs_mkdir_mode"
10801 #: ../src/guestfs-actions.pod:3970
10805 " guestfs_mkdir_mode (guestfs_h *g,\n"
10806 " const char *path,\n"
10812 #: ../src/guestfs-actions.pod:3975 ../fish/guestfish-actions.pod:2695
10814 "This command creates a directory, setting the initial permissions of the "
10815 "directory to C<mode>."
10819 #: ../src/guestfs-actions.pod:3978 ../fish/guestfish-actions.pod:2698
10821 "For common Linux filesystems, the actual mode which is set will be C<mode & "
10822 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
10827 #: ../src/guestfs-actions.pod:3982
10828 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
10832 #: ../src/guestfs-actions.pod:3988
10833 msgid "guestfs_mkdir_p"
10837 #: ../src/guestfs-actions.pod:3990
10841 " guestfs_mkdir_p (guestfs_h *g,\n"
10842 " const char *path);\n"
10847 #: ../src/guestfs-actions.pod:3994 ../fish/guestfish-actions.pod:2708
10849 "Create a directory named C<path>, creating any parent directories as "
10850 "necessary. This is like the C<mkdir -p> shell command."
10854 #: ../src/guestfs-actions.pod:4001
10855 msgid "guestfs_mkdtemp"
10859 #: ../src/guestfs-actions.pod:4003
10863 " guestfs_mkdtemp (guestfs_h *g,\n"
10864 " const char *template);\n"
10869 #: ../src/guestfs-actions.pod:4007 ../fish/guestfish-actions.pod:2715
10871 "This command creates a temporary directory. The C<template> parameter "
10872 "should be a full pathname for the temporary directory name with the final "
10873 "six characters being \"XXXXXX\"."
10877 #: ../src/guestfs-actions.pod:4012 ../fish/guestfish-actions.pod:2720
10879 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
10880 "being suitable for Windows filesystems."
10884 #: ../src/guestfs-actions.pod:4015 ../fish/guestfish-actions.pod:2723
10885 msgid "The name of the temporary directory that was created is returned."
10889 #: ../src/guestfs-actions.pod:4018 ../fish/guestfish-actions.pod:2726
10890 msgid "The temporary directory is created with mode 0700 and is owned by root."
10894 #: ../src/guestfs-actions.pod:4021 ../fish/guestfish-actions.pod:2729
10896 "The caller is responsible for deleting the temporary directory and its "
10897 "contents after use."
10901 #: ../src/guestfs-actions.pod:4024 ../fish/guestfish-actions.pod:2732
10902 msgid "See also: L<mkdtemp(3)>"
10906 #: ../src/guestfs-actions.pod:4031
10907 msgid "guestfs_mke2fs_J"
10911 #: ../src/guestfs-actions.pod:4033
10915 " guestfs_mke2fs_J (guestfs_h *g,\n"
10916 " const char *fstype,\n"
10917 " int blocksize,\n"
10918 " const char *device,\n"
10919 " const char *journal);\n"
10924 #: ../src/guestfs-actions.pod:4040 ../fish/guestfish-actions.pod:2738
10926 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10927 "C<journal>. It is equivalent to the command:"
10931 #: ../src/guestfs-actions.pod:4044 ../fish/guestfish-actions.pod:2742
10934 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
10939 #: ../src/guestfs-actions.pod:4046
10940 msgid "See also C<guestfs_mke2journal>."
10944 #: ../src/guestfs-actions.pod:4050 ../src/guestfs-actions.pod:4068 ../src/guestfs-actions.pod:4086 ../src/guestfs-actions.pod:4102 ../src/guestfs-actions.pod:4116 ../src/guestfs-actions.pod:4130 ../src/guestfs-actions.pod:4189 ../src/guestfs-actions.pod:4438
10945 msgid "(Added in 1.0.68)"
10949 #: ../src/guestfs-actions.pod:4052
10950 msgid "guestfs_mke2fs_JL"
10954 #: ../src/guestfs-actions.pod:4054
10958 " guestfs_mke2fs_JL (guestfs_h *g,\n"
10959 " const char *fstype,\n"
10960 " int blocksize,\n"
10961 " const char *device,\n"
10962 " const char *label);\n"
10967 #: ../src/guestfs-actions.pod:4061 ../fish/guestfish-actions.pod:2750
10969 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10970 "the journal labeled C<label>."
10974 #: ../src/guestfs-actions.pod:4064
10975 msgid "See also C<guestfs_mke2journal_L>."
10979 #: ../src/guestfs-actions.pod:4070
10980 msgid "guestfs_mke2fs_JU"
10984 #: ../src/guestfs-actions.pod:4072
10988 " guestfs_mke2fs_JU (guestfs_h *g,\n"
10989 " const char *fstype,\n"
10990 " int blocksize,\n"
10991 " const char *device,\n"
10992 " const char *uuid);\n"
10997 #: ../src/guestfs-actions.pod:4079 ../fish/guestfish-actions.pod:2759
10999 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
11000 "the journal with UUID C<uuid>."
11004 #: ../src/guestfs-actions.pod:4082
11005 msgid "See also C<guestfs_mke2journal_U>."
11009 #: ../src/guestfs-actions.pod:4088
11010 msgid "guestfs_mke2journal"
11014 #: ../src/guestfs-actions.pod:4090
11018 " guestfs_mke2journal (guestfs_h *g,\n"
11019 " int blocksize,\n"
11020 " const char *device);\n"
11025 #: ../src/guestfs-actions.pod:4095 ../fish/guestfish-actions.pod:2768
11027 "This creates an ext2 external journal on C<device>. It is equivalent to the "
11032 #: ../src/guestfs-actions.pod:4098 ../fish/guestfish-actions.pod:2771
11035 " mke2fs -O journal_dev -b blocksize device\n"
11040 #: ../src/guestfs-actions.pod:4104
11041 msgid "guestfs_mke2journal_L"
11045 #: ../src/guestfs-actions.pod:4106
11049 " guestfs_mke2journal_L (guestfs_h *g,\n"
11050 " int blocksize,\n"
11051 " const char *label,\n"
11052 " const char *device);\n"
11057 #: ../src/guestfs-actions.pod:4112 ../fish/guestfish-actions.pod:2777
11058 msgid "This creates an ext2 external journal on C<device> with label C<label>."
11062 #: ../src/guestfs-actions.pod:4118
11063 msgid "guestfs_mke2journal_U"
11067 #: ../src/guestfs-actions.pod:4120
11071 " guestfs_mke2journal_U (guestfs_h *g,\n"
11072 " int blocksize,\n"
11073 " const char *uuid,\n"
11074 " const char *device);\n"
11079 #: ../src/guestfs-actions.pod:4126 ../fish/guestfish-actions.pod:2783
11080 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
11084 #: ../src/guestfs-actions.pod:4132
11085 msgid "guestfs_mkfifo"
11089 #: ../src/guestfs-actions.pod:4134
11093 " guestfs_mkfifo (guestfs_h *g,\n"
11095 " const char *path);\n"
11100 #: ../src/guestfs-actions.pod:4139
11102 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
11103 "is just a convenient wrapper around C<guestfs_mknod>."
11107 #: ../src/guestfs-actions.pod:4149
11108 msgid "guestfs_mkfs"
11112 #: ../src/guestfs-actions.pod:4151
11116 " guestfs_mkfs (guestfs_h *g,\n"
11117 " const char *fstype,\n"
11118 " const char *device);\n"
11123 #: ../src/guestfs-actions.pod:4156 ../fish/guestfish-actions.pod:2799
11125 "This creates a filesystem on C<device> (usually a partition or LVM logical "
11126 "volume). The filesystem type is C<fstype>, for example C<ext3>."
11130 #: ../src/guestfs-actions.pod:4164
11131 msgid "guestfs_mkfs_b"
11135 #: ../src/guestfs-actions.pod:4166
11139 " guestfs_mkfs_b (guestfs_h *g,\n"
11140 " const char *fstype,\n"
11141 " int blocksize,\n"
11142 " const char *device);\n"
11147 #: ../src/guestfs-actions.pod:4172
11149 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
11150 "block size of the resulting filesystem. Supported block sizes depend on the "
11151 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
11155 #: ../src/guestfs-actions.pod:4177 ../src/guestfs-actions.pod:4219 ../fish/guestfish-actions.pod:2812 ../fish/guestfish-actions.pod:2839
11157 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
11162 #: ../src/guestfs-actions.pod:4182 ../fish/guestfish-actions.pod:2815
11164 "This function is deprecated. In new code, use the C<mkfs_opts> call "
11169 #: ../src/guestfs-actions.pod:4191
11170 msgid "guestfs_mkfs_opts"
11174 #: ../src/guestfs-actions.pod:4193
11178 " guestfs_mkfs_opts (guestfs_h *g,\n"
11179 " const char *fstype,\n"
11180 " const char *device,\n"
11186 #: ../src/guestfs-actions.pod:4204
11189 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
11194 #: ../src/guestfs-actions.pod:4206 ../fish/guestfish-actions.pod:2826
11196 "This function creates a filesystem on C<device>. The filesystem type is "
11197 "C<fstype>, for example C<ext3>."
11201 #: ../src/guestfs-actions.pod:4213 ../fish/guestfish-actions.pod:2833
11202 msgid "C<blocksize>"
11206 #: ../src/guestfs-actions.pod:4215 ../fish/guestfish-actions.pod:2835
11208 "The filesystem block size. Supported block sizes depend on the filesystem "
11209 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
11214 #: ../src/guestfs-actions.pod:4226
11215 msgid "guestfs_mkfs_opts_va"
11219 #: ../src/guestfs-actions.pod:4228
11223 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
11224 " const char *fstype,\n"
11225 " const char *device,\n"
11226 " va_list args);\n"
11231 #: ../src/guestfs-actions.pod:4234
11232 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
11236 #: ../src/guestfs-actions.pod:4238
11237 msgid "guestfs_mkfs_opts_argv"
11241 #: ../src/guestfs-actions.pod:4240
11245 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
11246 " const char *fstype,\n"
11247 " const char *device,\n"
11248 " const struct guestfs_mkfs_opts_argv *optargs);\n"
11253 #: ../src/guestfs-actions.pod:4246
11254 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
11258 #: ../src/guestfs-actions.pod:4250
11259 msgid "guestfs_mkmountpoint"
11263 #: ../src/guestfs-actions.pod:4252
11267 " guestfs_mkmountpoint (guestfs_h *g,\n"
11268 " const char *exemptpath);\n"
11273 #: ../src/guestfs-actions.pod:4256
11275 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
11276 "that can be used to create extra mountpoints before mounting the first "
11281 #: ../src/guestfs-actions.pod:4260 ../fish/guestfish-actions.pod:2854
11283 "These calls are I<only> necessary in some very limited circumstances, mainly "
11284 "the case where you want to mount a mix of unrelated and/or read-only "
11285 "filesystems together."
11289 #: ../src/guestfs-actions.pod:4264 ../fish/guestfish-actions.pod:2858
11291 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
11292 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
11293 "inside that. You can unpack this as follows in guestfish:"
11297 #: ../src/guestfs-actions.pod:4269 ../fish/guestfish-actions.pod:2863
11300 " add-ro Fedora-11-i686-Live.iso\n"
11302 " mkmountpoint /cd\n"
11303 " mkmountpoint /sqsh\n"
11304 " mkmountpoint /ext3fs\n"
11305 " mount /dev/sda /cd\n"
11306 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
11307 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
11312 #: ../src/guestfs-actions.pod:4278 ../fish/guestfish-actions.pod:2872
11313 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
11317 #: ../src/guestfs-actions.pod:4280
11319 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
11320 "may get unexpected errors if you try to mix these calls. It is safest to "
11321 "manually unmount filesystems and remove mountpoints after use."
11325 #: ../src/guestfs-actions.pod:4284
11327 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
11328 "first, so for this to work for manual mountpoints, you must ensure that the "
11329 "innermost mountpoints have the longest pathnames, as in the example code "
11334 #: ../src/guestfs-actions.pod:4289 ../fish/guestfish-actions.pod:2883
11335 msgid "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
11339 #: ../src/guestfs-actions.pod:4291
11341 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
11342 "means that C<guestfs_umount_all> is called when the handle is closed which "
11343 "can also trigger these issues."
11347 #: ../src/guestfs-actions.pod:4297 ../src/guestfs-actions.pod:4556 ../src/guestfs-actions.pod:5449
11348 msgid "(Added in 1.0.62)"
11352 #: ../src/guestfs-actions.pod:4299
11353 msgid "guestfs_mknod"
11357 #: ../src/guestfs-actions.pod:4301
11361 " guestfs_mknod (guestfs_h *g,\n"
11365 " const char *path);\n"
11370 #: ../src/guestfs-actions.pod:4308 ../fish/guestfish-actions.pod:2893
11372 "This call creates block or character special devices, or named pipes "
11377 #: ../src/guestfs-actions.pod:4311 ../fish/guestfish-actions.pod:2896
11379 "The C<mode> parameter should be the mode, using the standard constants. "
11380 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
11381 "used when creating block and character special devices."
11385 #: ../src/guestfs-actions.pod:4316
11387 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
11388 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
11389 "regular file). These constants are available in the standard Linux header "
11390 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
11391 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
11392 "the appropriate constant for you."
11396 #: ../src/guestfs-actions.pod:4330
11397 msgid "guestfs_mknod_b"
11401 #: ../src/guestfs-actions.pod:4332
11405 " guestfs_mknod_b (guestfs_h *g,\n"
11409 " const char *path);\n"
11414 #: ../src/guestfs-actions.pod:4339
11416 "This call creates a block device node called C<path> with mode C<mode> and "
11417 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
11418 "wrapper around C<guestfs_mknod>."
11422 #: ../src/guestfs-actions.pod:4349
11423 msgid "guestfs_mknod_c"
11427 #: ../src/guestfs-actions.pod:4351
11431 " guestfs_mknod_c (guestfs_h *g,\n"
11435 " const char *path);\n"
11440 #: ../src/guestfs-actions.pod:4358
11442 "This call creates a char device node called C<path> with mode C<mode> and "
11443 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
11444 "wrapper around C<guestfs_mknod>."
11448 #: ../src/guestfs-actions.pod:4368
11449 msgid "guestfs_mkswap"
11453 #: ../src/guestfs-actions.pod:4370
11457 " guestfs_mkswap (guestfs_h *g,\n"
11458 " const char *device);\n"
11463 #: ../src/guestfs-actions.pod:4374 ../fish/guestfish-actions.pod:2935
11464 msgid "Create a swap partition on C<device>."
11468 #: ../src/guestfs-actions.pod:4380
11469 msgid "guestfs_mkswap_L"
11473 #: ../src/guestfs-actions.pod:4382
11477 " guestfs_mkswap_L (guestfs_h *g,\n"
11478 " const char *label,\n"
11479 " const char *device);\n"
11484 #: ../src/guestfs-actions.pod:4387 ../fish/guestfish-actions.pod:2941
11485 msgid "Create a swap partition on C<device> with label C<label>."
11489 #: ../src/guestfs-actions.pod:4389 ../fish/guestfish-actions.pod:2943
11491 "Note that you cannot attach a swap label to a block device "
11492 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
11493 "the kernel or swap tools."
11497 #: ../src/guestfs-actions.pod:4397
11498 msgid "guestfs_mkswap_U"
11502 #: ../src/guestfs-actions.pod:4399
11506 " guestfs_mkswap_U (guestfs_h *g,\n"
11507 " const char *uuid,\n"
11508 " const char *device);\n"
11513 #: ../src/guestfs-actions.pod:4404 ../fish/guestfish-actions.pod:2951
11514 msgid "Create a swap partition on C<device> with UUID C<uuid>."
11518 #: ../src/guestfs-actions.pod:4410
11519 msgid "guestfs_mkswap_file"
11523 #: ../src/guestfs-actions.pod:4412
11527 " guestfs_mkswap_file (guestfs_h *g,\n"
11528 " const char *path);\n"
11533 #: ../src/guestfs-actions.pod:4416 ../fish/guestfish-actions.pod:2957
11534 msgid "Create a swap file."
11538 #: ../src/guestfs-actions.pod:4418
11540 "This command just writes a swap file signature to an existing file. To "
11541 "create the file itself, use something like C<guestfs_fallocate>."
11545 #: ../src/guestfs-actions.pod:4425
11546 msgid "guestfs_modprobe"
11550 #: ../src/guestfs-actions.pod:4427
11554 " guestfs_modprobe (guestfs_h *g,\n"
11555 " const char *modulename);\n"
11560 #: ../src/guestfs-actions.pod:4431 ../fish/guestfish-actions.pod:2966
11561 msgid "This loads a kernel module in the appliance."
11565 #: ../src/guestfs-actions.pod:4433 ../fish/guestfish-actions.pod:2968
11567 "The kernel module must have been whitelisted when libguestfs was built (see "
11568 "C<appliance/kmod.whitelist.in> in the source)."
11572 #: ../src/guestfs-actions.pod:4440
11573 msgid "guestfs_mount"
11577 #: ../src/guestfs-actions.pod:4442
11581 " guestfs_mount (guestfs_h *g,\n"
11582 " const char *device,\n"
11583 " const char *mountpoint);\n"
11588 #: ../src/guestfs-actions.pod:4447 ../fish/guestfish-actions.pod:2975
11590 "Mount a guest disk at a position in the filesystem. Block devices are named "
11591 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
11592 "those block devices contain partitions, they will have the usual names "
11593 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
11597 #: ../src/guestfs-actions.pod:4453 ../fish/guestfish-actions.pod:2981
11599 "The rules are the same as for L<mount(2)>: A filesystem must first be "
11600 "mounted on C</> before others can be mounted. Other filesystems can only be "
11601 "mounted on directories which already exist."
11605 #: ../src/guestfs-actions.pod:4458 ../fish/guestfish-actions.pod:2986
11607 "The mounted filesystem is writable, if we have sufficient permissions on the "
11608 "underlying device."
11612 #: ../src/guestfs-actions.pod:4461
11614 "B<Important note:> When you use this call, the filesystem options C<sync> "
11615 "and C<noatime> are set implicitly. This was originally done because we "
11616 "thought it would improve reliability, but it turns out that I<-o sync> has a "
11617 "very large negative performance impact and negligible effect on "
11618 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
11619 "in any code that needs performance, and instead use C<guestfs_mount_options> "
11620 "(use an empty string for the first parameter if you don't want any options)."
11624 #: ../src/guestfs-actions.pod:4475
11625 msgid "guestfs_mount_loop"
11629 #: ../src/guestfs-actions.pod:4477
11633 " guestfs_mount_loop (guestfs_h *g,\n"
11634 " const char *file,\n"
11635 " const char *mountpoint);\n"
11640 #: ../src/guestfs-actions.pod:4482 ../fish/guestfish-actions.pod:3003
11642 "This command lets you mount C<file> (a filesystem image in a file) on a "
11643 "mount point. It is entirely equivalent to the command C<mount -o loop file "
11648 #: ../src/guestfs-actions.pod:4490
11649 msgid "guestfs_mount_options"
11653 #: ../src/guestfs-actions.pod:4492
11657 " guestfs_mount_options (guestfs_h *g,\n"
11658 " const char *options,\n"
11659 " const char *device,\n"
11660 " const char *mountpoint);\n"
11665 #: ../src/guestfs-actions.pod:4498
11667 "This is the same as the C<guestfs_mount> command, but it allows you to set "
11668 "the mount options as for the L<mount(8)> I<-o> flag."
11672 #: ../src/guestfs-actions.pod:4502 ../fish/guestfish-actions.pod:3015
11674 "If the C<options> parameter is an empty string, then no options are passed "
11675 "(all options default to whatever the filesystem uses)."
11679 #: ../src/guestfs-actions.pod:4508 ../src/guestfs-actions.pod:4522 ../src/guestfs-actions.pod:4539
11680 msgid "(Added in 1.0.10)"
11684 #: ../src/guestfs-actions.pod:4510
11685 msgid "guestfs_mount_ro"
11689 #: ../src/guestfs-actions.pod:4512
11693 " guestfs_mount_ro (guestfs_h *g,\n"
11694 " const char *device,\n"
11695 " const char *mountpoint);\n"
11700 #: ../src/guestfs-actions.pod:4517
11702 "This is the same as the C<guestfs_mount> command, but it mounts the "
11703 "filesystem with the read-only (I<-o ro>) flag."
11707 #: ../src/guestfs-actions.pod:4524
11708 msgid "guestfs_mount_vfs"
11712 #: ../src/guestfs-actions.pod:4526
11716 " guestfs_mount_vfs (guestfs_h *g,\n"
11717 " const char *options,\n"
11718 " const char *vfstype,\n"
11719 " const char *device,\n"
11720 " const char *mountpoint);\n"
11725 #: ../src/guestfs-actions.pod:4533
11727 "This is the same as the C<guestfs_mount> command, but it allows you to set "
11728 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
11733 #: ../src/guestfs-actions.pod:4541
11734 msgid "guestfs_mountpoints"
11738 #: ../src/guestfs-actions.pod:4543
11742 " guestfs_mountpoints (guestfs_h *g);\n"
11747 #: ../src/guestfs-actions.pod:4546
11749 "This call is similar to C<guestfs_mounts>. That call returns a list of "
11750 "devices. This one returns a hash table (map) of device name to directory "
11751 "where the device is mounted."
11755 #: ../src/guestfs-actions.pod:4558
11756 msgid "guestfs_mounts"
11760 #: ../src/guestfs-actions.pod:4560
11764 " guestfs_mounts (guestfs_h *g);\n"
11769 #: ../src/guestfs-actions.pod:4563 ../fish/guestfish-actions.pod:3046
11771 "This returns the list of currently mounted filesystems. It returns the list "
11772 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
11776 #: ../src/guestfs-actions.pod:4566 ../fish/guestfish-actions.pod:3049
11777 msgid "Some internal mounts are not shown."
11781 #: ../src/guestfs-actions.pod:4568
11782 msgid "See also: C<guestfs_mountpoints>"
11786 #: ../src/guestfs-actions.pod:4576
11791 #: ../src/guestfs-actions.pod:4578
11795 " guestfs_mv (guestfs_h *g,\n"
11796 " const char *src,\n"
11797 " const char *dest);\n"
11802 #: ../src/guestfs-actions.pod:4583 ../fish/guestfish-actions.pod:3057
11804 "This moves a file from C<src> to C<dest> where C<dest> is either a "
11805 "destination filename or destination directory."
11809 #: ../src/guestfs-actions.pod:4590
11810 msgid "guestfs_ntfs_3g_probe"
11814 #: ../src/guestfs-actions.pod:4592
11818 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
11820 " const char *device);\n"
11825 #: ../src/guestfs-actions.pod:4597 ../fish/guestfish-actions.pod:3064
11827 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
11828 "C<device> for mountability. (Not all NTFS volumes can be mounted "
11829 "read-write, and some cannot be mounted at all)."
11833 #: ../src/guestfs-actions.pod:4601 ../fish/guestfish-actions.pod:3068
11835 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
11836 "can be mounted read-write. Set it to false if you want to test if the "
11837 "volume can be mounted read-only."
11841 #: ../src/guestfs-actions.pod:4605 ../fish/guestfish-actions.pod:3072
11843 "The return value is an integer which C<0> if the operation would succeed, or "
11844 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
11848 #: ../src/guestfs-actions.pod:4611
11849 msgid "(Added in 1.0.43)"
11853 #: ../src/guestfs-actions.pod:4613
11854 msgid "guestfs_ntfsresize"
11858 #: ../src/guestfs-actions.pod:4615
11862 " guestfs_ntfsresize (guestfs_h *g,\n"
11863 " const char *device);\n"
11868 #: ../src/guestfs-actions.pod:4619 ../fish/guestfish-actions.pod:3080
11870 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
11871 "size of the underlying device. See also L<ntfsresize(8)>."
11875 #: ../src/guestfs-actions.pod:4627
11876 msgid "guestfs_ntfsresize_size"
11880 #: ../src/guestfs-actions.pod:4629
11884 " guestfs_ntfsresize_size (guestfs_h *g,\n"
11885 " const char *device,\n"
11886 " int64_t size);\n"
11891 #: ../src/guestfs-actions.pod:4634
11893 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
11894 "to specify the new size (in bytes) explicitly."
11898 #: ../src/guestfs-actions.pod:4639 ../src/guestfs-actions.pod:5075 ../src/guestfs-actions.pod:5148 ../src/guestfs-actions.pod:5397
11899 msgid "(Added in 1.3.14)"
11903 #: ../src/guestfs-actions.pod:4641
11904 msgid "guestfs_part_add"
11908 #: ../src/guestfs-actions.pod:4643
11912 " guestfs_part_add (guestfs_h *g,\n"
11913 " const char *device,\n"
11914 " const char *prlogex,\n"
11915 " int64_t startsect,\n"
11916 " int64_t endsect);\n"
11921 #: ../src/guestfs-actions.pod:4650
11923 "This command adds a partition to C<device>. If there is no partition table "
11924 "on the device, call C<guestfs_part_init> first."
11928 #: ../src/guestfs-actions.pod:4653 ../fish/guestfish-actions.pod:3098
11930 "The C<prlogex> parameter is the type of partition. Normally you should pass "
11931 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
11932 "C<logical>) and C<e> (or C<extended>) partition types."
11936 #: ../src/guestfs-actions.pod:4658 ../fish/guestfish-actions.pod:3103
11938 "C<startsect> and C<endsect> are the start and end of the partition in "
11939 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
11940 "from the end of the disk (C<-1> is the last sector)."
11944 #: ../src/guestfs-actions.pod:4662
11946 "Creating a partition which covers the whole disk is not so easy. Use "
11947 "C<guestfs_part_disk> to do that."
11951 #: ../src/guestfs-actions.pod:4667 ../src/guestfs-actions.pod:4705 ../src/guestfs-actions.pod:4758 ../src/guestfs-actions.pod:4836 ../src/guestfs-actions.pod:4874 ../src/guestfs-actions.pod:4893 ../src/guestfs-actions.pod:4933
11952 msgid "(Added in 1.0.78)"
11956 #: ../src/guestfs-actions.pod:4669
11957 msgid "guestfs_part_del"
11961 #: ../src/guestfs-actions.pod:4671
11965 " guestfs_part_del (guestfs_h *g,\n"
11966 " const char *device,\n"
11972 #: ../src/guestfs-actions.pod:4676 ../fish/guestfish-actions.pod:3114
11973 msgid "This command deletes the partition numbered C<partnum> on C<device>."
11977 #: ../src/guestfs-actions.pod:4678 ../fish/guestfish-actions.pod:3116
11979 "Note that in the case of MBR partitioning, deleting an extended partition "
11980 "also deletes any logical partitions it contains."
11984 #: ../src/guestfs-actions.pod:4686
11985 msgid "guestfs_part_disk"
11989 #: ../src/guestfs-actions.pod:4688
11993 " guestfs_part_disk (guestfs_h *g,\n"
11994 " const char *device,\n"
11995 " const char *parttype);\n"
12000 #: ../src/guestfs-actions.pod:4693
12002 "This command is simply a combination of C<guestfs_part_init> followed by "
12003 "C<guestfs_part_add> to create a single primary partition covering the whole "
12008 #: ../src/guestfs-actions.pod:4697
12010 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
12011 "possible values are described in C<guestfs_part_init>."
12015 #: ../src/guestfs-actions.pod:4707
12016 msgid "guestfs_part_get_bootable"
12020 #: ../src/guestfs-actions.pod:4709
12024 " guestfs_part_get_bootable (guestfs_h *g,\n"
12025 " const char *device,\n"
12031 #: ../src/guestfs-actions.pod:4714 ../fish/guestfish-actions.pod:3138
12033 "This command returns true if the partition C<partnum> on C<device> has the "
12034 "bootable flag set."
12038 #: ../src/guestfs-actions.pod:4717
12039 msgid "See also C<guestfs_part_set_bootable>."
12043 #: ../src/guestfs-actions.pod:4723
12044 msgid "guestfs_part_get_mbr_id"
12048 #: ../src/guestfs-actions.pod:4725
12052 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
12053 " const char *device,\n"
12059 #: ../src/guestfs-actions.pod:4730 ../fish/guestfish-actions.pod:3147
12061 "Returns the MBR type byte (also known as the ID byte) from the numbered "
12062 "partition C<partnum>."
12066 #: ../src/guestfs-actions.pod:4733 ../src/guestfs-actions.pod:4909
12068 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
12069 "undefined results for other partition table types (see "
12070 "C<guestfs_part_get_parttype>)."
12074 #: ../src/guestfs-actions.pod:4741
12075 msgid "guestfs_part_get_parttype"
12079 #: ../src/guestfs-actions.pod:4743
12083 " guestfs_part_get_parttype (guestfs_h *g,\n"
12084 " const char *device);\n"
12089 #: ../src/guestfs-actions.pod:4747 ../fish/guestfish-actions.pod:3158
12091 "This command examines the partition table on C<device> and returns the "
12092 "partition table type (format) being used."
12096 #: ../src/guestfs-actions.pod:4750
12098 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
12099 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
12100 "possible, although unusual. See C<guestfs_part_init> for a full list."
12104 #: ../src/guestfs-actions.pod:4760
12105 msgid "guestfs_part_init"
12109 #: ../src/guestfs-actions.pod:4762
12113 " guestfs_part_init (guestfs_h *g,\n"
12114 " const char *device,\n"
12115 " const char *parttype);\n"
12120 #: ../src/guestfs-actions.pod:4767 ../fish/guestfish-actions.pod:3170
12122 "This creates an empty partition table on C<device> of one of the partition "
12123 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
12124 "(for large disks)."
12128 #: ../src/guestfs-actions.pod:4771
12130 "Initially there are no partitions. Following this, you should call "
12131 "C<guestfs_part_add> for each partition required."
12135 #: ../src/guestfs-actions.pod:4774 ../fish/guestfish-actions.pod:3177
12136 msgid "Possible values for C<parttype> are:"
12140 #: ../src/guestfs-actions.pod:4778 ../fish/guestfish-actions.pod:3181
12141 msgid "B<efi> | B<gpt>"
12145 #: ../src/guestfs-actions.pod:4780 ../fish/guestfish-actions.pod:3183
12146 msgid "Intel EFI / GPT partition table."
12150 #: ../src/guestfs-actions.pod:4782 ../fish/guestfish-actions.pod:3185
12152 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
12153 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
12154 "the C<mbr> format."
12158 #: ../src/guestfs-actions.pod:4786 ../fish/guestfish-actions.pod:3189
12159 msgid "B<mbr> | B<msdos>"
12163 #: ../src/guestfs-actions.pod:4788 ../fish/guestfish-actions.pod:3191
12165 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
12166 "Windows. This partition type will B<only> work for device sizes up to 2 "
12167 "TB. For large disks we recommend using C<gpt>."
12171 #: ../src/guestfs-actions.pod:4795 ../fish/guestfish-actions.pod:3198
12172 msgid "Other partition table types that may work but are not supported include:"
12176 #: ../src/guestfs-actions.pod:4800 ../fish/guestfish-actions.pod:3203
12181 #: ../src/guestfs-actions.pod:4802 ../fish/guestfish-actions.pod:3205
12182 msgid "AIX disk labels."
12186 #: ../src/guestfs-actions.pod:4804 ../fish/guestfish-actions.pod:3207
12187 msgid "B<amiga> | B<rdb>"
12191 #: ../src/guestfs-actions.pod:4806 ../fish/guestfish-actions.pod:3209
12192 msgid "Amiga \"Rigid Disk Block\" format."
12196 #: ../src/guestfs-actions.pod:4808 ../fish/guestfish-actions.pod:3211
12201 #: ../src/guestfs-actions.pod:4810 ../fish/guestfish-actions.pod:3213
12202 msgid "BSD disk labels."
12206 #: ../src/guestfs-actions.pod:4812 ../fish/guestfish-actions.pod:3215
12211 #: ../src/guestfs-actions.pod:4814 ../fish/guestfish-actions.pod:3217
12212 msgid "DASD, used on IBM mainframes."
12216 #: ../src/guestfs-actions.pod:4816 ../fish/guestfish-actions.pod:3219
12221 #: ../src/guestfs-actions.pod:4818 ../fish/guestfish-actions.pod:3221
12222 msgid "MIPS/SGI volumes."
12226 #: ../src/guestfs-actions.pod:4820 ../fish/guestfish-actions.pod:3223
12231 #: ../src/guestfs-actions.pod:4822 ../fish/guestfish-actions.pod:3225
12232 msgid "Old Mac partition format. Modern Macs use C<gpt>."
12236 #: ../src/guestfs-actions.pod:4824 ../fish/guestfish-actions.pod:3227
12241 #: ../src/guestfs-actions.pod:4826 ../fish/guestfish-actions.pod:3229
12242 msgid "NEC PC-98 format, common in Japan apparently."
12246 #: ../src/guestfs-actions.pod:4828 ../fish/guestfish-actions.pod:3231
12251 #: ../src/guestfs-actions.pod:4830 ../fish/guestfish-actions.pod:3233
12252 msgid "Sun disk labels."
12256 #: ../src/guestfs-actions.pod:4838
12257 msgid "guestfs_part_list"
12261 #: ../src/guestfs-actions.pod:4840
12264 " struct guestfs_partition_list *\n"
12265 " guestfs_part_list (guestfs_h *g,\n"
12266 " const char *device);\n"
12271 #: ../src/guestfs-actions.pod:4844 ../fish/guestfish-actions.pod:3241
12273 "This command parses the partition table on C<device> and returns the list of "
12274 "partitions found."
12278 #: ../src/guestfs-actions.pod:4847 ../fish/guestfish-actions.pod:3244
12279 msgid "The fields in the returned structure are:"
12283 #: ../src/guestfs-actions.pod:4851 ../fish/guestfish-actions.pod:3248
12284 msgid "B<part_num>"
12288 #: ../src/guestfs-actions.pod:4853 ../fish/guestfish-actions.pod:3250
12289 msgid "Partition number, counting from 1."
12293 #: ../src/guestfs-actions.pod:4855 ../fish/guestfish-actions.pod:3252
12294 msgid "B<part_start>"
12298 #: ../src/guestfs-actions.pod:4857
12300 "Start of the partition I<in bytes>. To get sectors you have to divide by "
12301 "the device's sector size, see C<guestfs_blockdev_getss>."
12305 #: ../src/guestfs-actions.pod:4860 ../fish/guestfish-actions.pod:3257
12306 msgid "B<part_end>"
12310 #: ../src/guestfs-actions.pod:4862 ../fish/guestfish-actions.pod:3259
12311 msgid "End of the partition in bytes."
12315 #: ../src/guestfs-actions.pod:4864 ../fish/guestfish-actions.pod:3261
12316 msgid "B<part_size>"
12320 #: ../src/guestfs-actions.pod:4866 ../fish/guestfish-actions.pod:3263
12321 msgid "Size of the partition in bytes."
12325 #: ../src/guestfs-actions.pod:4870
12327 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
12328 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
12333 #: ../src/guestfs-actions.pod:4876
12334 msgid "guestfs_part_set_bootable"
12338 #: ../src/guestfs-actions.pod:4878
12342 " guestfs_part_set_bootable (guestfs_h *g,\n"
12343 " const char *device,\n"
12345 " int bootable);\n"
12350 #: ../src/guestfs-actions.pod:4884 ../fish/guestfish-actions.pod:3271
12352 "This sets the bootable flag on partition numbered C<partnum> on device "
12353 "C<device>. Note that partitions are numbered from 1."
12357 #: ../src/guestfs-actions.pod:4887 ../fish/guestfish-actions.pod:3274
12359 "The bootable flag is used by some operating systems (notably Windows) to "
12360 "determine which partition to boot from. It is by no means universally "
12365 #: ../src/guestfs-actions.pod:4895
12366 msgid "guestfs_part_set_mbr_id"
12370 #: ../src/guestfs-actions.pod:4897
12374 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
12375 " const char *device,\n"
12382 #: ../src/guestfs-actions.pod:4903 ../fish/guestfish-actions.pod:3282
12384 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
12385 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
12386 "documentation are in fact hexadecimal numbers, but usually documented "
12387 "without any leading \"0x\" which might be confusing."
12391 #: ../src/guestfs-actions.pod:4917
12392 msgid "guestfs_part_set_name"
12396 #: ../src/guestfs-actions.pod:4919
12400 " guestfs_part_set_name (guestfs_h *g,\n"
12401 " const char *device,\n"
12403 " const char *name);\n"
12408 #: ../src/guestfs-actions.pod:4925 ../fish/guestfish-actions.pod:3296
12410 "This sets the partition name on partition numbered C<partnum> on device "
12411 "C<device>. Note that partitions are numbered from 1."
12415 #: ../src/guestfs-actions.pod:4928 ../fish/guestfish-actions.pod:3299
12417 "The partition name can only be set on certain types of partition table. "
12418 "This works on C<gpt> but not on C<mbr> partitions."
12422 #: ../src/guestfs-actions.pod:4935
12423 msgid "guestfs_part_to_dev"
12427 #: ../src/guestfs-actions.pod:4937
12431 " guestfs_part_to_dev (guestfs_h *g,\n"
12432 " const char *partition);\n"
12437 #: ../src/guestfs-actions.pod:4941 ../fish/guestfish-actions.pod:3306
12439 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
12440 "partition number, returning the device name (eg. \"/dev/sdb\")."
12444 #: ../src/guestfs-actions.pod:4945
12446 "The named partition must exist, for example as a string returned from "
12447 "C<guestfs_list_partitions>."
12451 #: ../src/guestfs-actions.pod:4953
12452 msgid "guestfs_ping_daemon"
12456 #: ../src/guestfs-actions.pod:4955
12460 " guestfs_ping_daemon (guestfs_h *g);\n"
12465 #: ../src/guestfs-actions.pod:4958 ../fish/guestfish-actions.pod:3317
12467 "This is a test probe into the guestfs daemon running inside the qemu "
12468 "subprocess. Calling this function checks that the daemon responds to the "
12469 "ping message, without affecting the daemon or attached block device(s) in "
12474 #: ../src/guestfs-actions.pod:4967
12475 msgid "guestfs_pread"
12479 #: ../src/guestfs-actions.pod:4969
12483 " guestfs_pread (guestfs_h *g,\n"
12484 " const char *path,\n"
12486 " int64_t offset,\n"
12487 " size_t *size_r);\n"
12492 #: ../src/guestfs-actions.pod:4976 ../fish/guestfish-actions.pod:3326
12494 "This command lets you read part of a file. It reads C<count> bytes of the "
12495 "file, starting at C<offset>, from file C<path>."
12499 #: ../src/guestfs-actions.pod:4979 ../src/guestfs-actions.pod:5005 ../fish/guestfish-actions.pod:3329 ../fish/guestfish-actions.pod:3344
12501 "This may read fewer bytes than requested. For further details see the "
12502 "L<pread(2)> system call."
12506 #: ../src/guestfs-actions.pod:4982
12507 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
12511 #: ../src/guestfs-actions.pod:4993
12512 msgid "guestfs_pread_device"
12516 #: ../src/guestfs-actions.pod:4995
12520 " guestfs_pread_device (guestfs_h *g,\n"
12521 " const char *device,\n"
12523 " int64_t offset,\n"
12524 " size_t *size_r);\n"
12529 #: ../src/guestfs-actions.pod:5002 ../fish/guestfish-actions.pod:3341
12531 "This command lets you read part of a file. It reads C<count> bytes of "
12532 "C<device>, starting at C<offset>."
12536 #: ../src/guestfs-actions.pod:5008
12537 msgid "See also C<guestfs_pread>."
12541 #: ../src/guestfs-actions.pod:5017
12542 msgid "(Added in 1.5.21)"
12546 #: ../src/guestfs-actions.pod:5019
12547 msgid "guestfs_pvcreate"
12551 #: ../src/guestfs-actions.pod:5021
12555 " guestfs_pvcreate (guestfs_h *g,\n"
12556 " const char *device);\n"
12561 #: ../src/guestfs-actions.pod:5025 ../fish/guestfish-actions.pod:3356
12563 "This creates an LVM physical volume on the named C<device>, where C<device> "
12564 "should usually be a partition name such as C</dev/sda1>."
12568 #: ../src/guestfs-actions.pod:5033
12569 msgid "guestfs_pvremove"
12573 #: ../src/guestfs-actions.pod:5035
12577 " guestfs_pvremove (guestfs_h *g,\n"
12578 " const char *device);\n"
12583 #: ../src/guestfs-actions.pod:5039 ../fish/guestfish-actions.pod:3364
12585 "This wipes a physical volume C<device> so that LVM will no longer recognise "
12590 #: ../src/guestfs-actions.pod:5042 ../fish/guestfish-actions.pod:3367
12592 "The implementation uses the C<pvremove> command which refuses to wipe "
12593 "physical volumes that contain any volume groups, so you have to remove those "
12598 #: ../src/guestfs-actions.pod:5050
12599 msgid "guestfs_pvresize"
12603 #: ../src/guestfs-actions.pod:5052
12607 " guestfs_pvresize (guestfs_h *g,\n"
12608 " const char *device);\n"
12613 #: ../src/guestfs-actions.pod:5056 ../fish/guestfish-actions.pod:3375
12615 "This resizes (expands or shrinks) an existing LVM physical volume to match "
12616 "the new size of the underlying device."
12620 #: ../src/guestfs-actions.pod:5063
12621 msgid "guestfs_pvresize_size"
12625 #: ../src/guestfs-actions.pod:5065
12629 " guestfs_pvresize_size (guestfs_h *g,\n"
12630 " const char *device,\n"
12631 " int64_t size);\n"
12636 #: ../src/guestfs-actions.pod:5070
12638 "This command is the same as C<guestfs_pvresize> except that it allows you to "
12639 "specify the new size (in bytes) explicitly."
12643 #: ../src/guestfs-actions.pod:5077
12644 msgid "guestfs_pvs"
12648 #: ../src/guestfs-actions.pod:5079
12652 " guestfs_pvs (guestfs_h *g);\n"
12657 #: ../src/guestfs-actions.pod:5082 ../fish/guestfish-actions.pod:3389
12659 "List all the physical volumes detected. This is the equivalent of the "
12660 "L<pvs(8)> command."
12664 #: ../src/guestfs-actions.pod:5085 ../fish/guestfish-actions.pod:3392
12666 "This returns a list of just the device names that contain PVs "
12667 "(eg. C</dev/sda2>)."
12671 #: ../src/guestfs-actions.pod:5088
12672 msgid "See also C<guestfs_pvs_full>."
12676 #: ../src/guestfs-actions.pod:5096
12677 msgid "guestfs_pvs_full"
12681 #: ../src/guestfs-actions.pod:5098
12684 " struct guestfs_lvm_pv_list *\n"
12685 " guestfs_pvs_full (guestfs_h *g);\n"
12690 #: ../src/guestfs-actions.pod:5101 ../fish/guestfish-actions.pod:3401
12692 "List all the physical volumes detected. This is the equivalent of the "
12693 "L<pvs(8)> command. The \"full\" version includes all fields."
12697 #: ../src/guestfs-actions.pod:5104
12699 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
12700 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after "
12705 #: ../src/guestfs-actions.pod:5110
12706 msgid "guestfs_pvuuid"
12710 #: ../src/guestfs-actions.pod:5112
12714 " guestfs_pvuuid (guestfs_h *g,\n"
12715 " const char *device);\n"
12720 #: ../src/guestfs-actions.pod:5116 ../fish/guestfish-actions.pod:3408
12721 msgid "This command returns the UUID of the LVM PV C<device>."
12725 #: ../src/guestfs-actions.pod:5123
12726 msgid "guestfs_pwrite"
12730 #: ../src/guestfs-actions.pod:5125
12734 " guestfs_pwrite (guestfs_h *g,\n"
12735 " const char *path,\n"
12736 " const char *content,\n"
12737 " size_t content_size,\n"
12738 " int64_t offset);\n"
12743 #: ../src/guestfs-actions.pod:5132 ../fish/guestfish-actions.pod:3414
12745 "This command writes to part of a file. It writes the data buffer C<content> "
12746 "to the file C<path> starting at offset C<offset>."
12750 #: ../src/guestfs-actions.pod:5135 ../fish/guestfish-actions.pod:3417
12752 "This command implements the L<pwrite(2)> system call, and like that system "
12753 "call it may not write the full data requested. The return value is the "
12754 "number of bytes that were actually written to the file. This could even be "
12755 "0, although short writes are unlikely for regular files in ordinary "
12760 #: ../src/guestfs-actions.pod:5141
12761 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
12765 #: ../src/guestfs-actions.pod:5150
12766 msgid "guestfs_pwrite_device"
12770 #: ../src/guestfs-actions.pod:5152
12774 " guestfs_pwrite_device (guestfs_h *g,\n"
12775 " const char *device,\n"
12776 " const char *content,\n"
12777 " size_t content_size,\n"
12778 " int64_t offset);\n"
12783 #: ../src/guestfs-actions.pod:5159 ../fish/guestfish-actions.pod:3432
12785 "This command writes to part of a device. It writes the data buffer "
12786 "C<content> to C<device> starting at offset C<offset>."
12790 #: ../src/guestfs-actions.pod:5162 ../fish/guestfish-actions.pod:3435
12792 "This command implements the L<pwrite(2)> system call, and like that system "
12793 "call it may not write the full data requested (although short writes to disk "
12794 "devices and partitions are probably impossible with standard Linux kernels)."
12798 #: ../src/guestfs-actions.pod:5167
12799 msgid "See also C<guestfs_pwrite>."
12803 #: ../src/guestfs-actions.pod:5174
12804 msgid "(Added in 1.5.20)"
12808 #: ../src/guestfs-actions.pod:5176
12809 msgid "guestfs_read_file"
12813 #: ../src/guestfs-actions.pod:5178
12817 " guestfs_read_file (guestfs_h *g,\n"
12818 " const char *path,\n"
12819 " size_t *size_r);\n"
12824 #: ../src/guestfs-actions.pod:5183 ../fish/guestfish-actions.pod:3449
12825 msgid "This calls returns the contents of the file C<path> as a buffer."
12829 #: ../src/guestfs-actions.pod:5186
12831 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
12832 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
12833 "function is limited in the total size of file that can be handled."
12837 #: ../src/guestfs-actions.pod:5198
12838 msgid "(Added in 1.0.63)"
12842 #: ../src/guestfs-actions.pod:5200
12843 msgid "guestfs_read_lines"
12847 #: ../src/guestfs-actions.pod:5202
12851 " guestfs_read_lines (guestfs_h *g,\n"
12852 " const char *path);\n"
12857 #: ../src/guestfs-actions.pod:5208 ../fish/guestfish-actions.pod:3466
12859 "The file contents are returned as a list of lines. Trailing C<LF> and "
12860 "C<CRLF> character sequences are I<not> returned."
12864 #: ../src/guestfs-actions.pod:5211
12866 "Note that this function cannot correctly handle binary files (specifically, "
12867 "files containing C<\\0> character which is treated as end of line). For "
12868 "those you need to use the C<guestfs_read_file> function which has a more "
12869 "complex interface."
12873 #: ../src/guestfs-actions.pod:5222
12874 msgid "guestfs_readdir"
12878 #: ../src/guestfs-actions.pod:5224
12881 " struct guestfs_dirent_list *\n"
12882 " guestfs_readdir (guestfs_h *g,\n"
12883 " const char *dir);\n"
12888 #: ../src/guestfs-actions.pod:5228 ../fish/guestfish-actions.pod:3478
12889 msgid "This returns the list of directory entries in directory C<dir>."
12893 #: ../src/guestfs-actions.pod:5230 ../fish/guestfish-actions.pod:3480
12895 "All entries in the directory are returned, including C<.> and C<..>. The "
12896 "entries are I<not> sorted, but returned in the same order as the underlying "
12901 #: ../src/guestfs-actions.pod:5234 ../fish/guestfish-actions.pod:3484
12903 "Also this call returns basic file type information about each file. The "
12904 "C<ftyp> field will contain one of the following characters:"
12908 #: ../src/guestfs-actions.pod:5239 ../fish/guestfish-actions.pod:3489
12913 #: ../src/guestfs-actions.pod:5241 ../fish/guestfish-actions.pod:3491
12914 msgid "Block special"
12918 #: ../src/guestfs-actions.pod:5243 ../fish/guestfish-actions.pod:3493
12923 #: ../src/guestfs-actions.pod:5245 ../fish/guestfish-actions.pod:3495
12924 msgid "Char special"
12928 #: ../src/guestfs-actions.pod:5247 ../fish/guestfish-actions.pod:3497
12933 #: ../src/guestfs-actions.pod:5249 ../fish/guestfish-actions.pod:3499
12938 #: ../src/guestfs-actions.pod:5251 ../fish/guestfish-actions.pod:3501
12943 #: ../src/guestfs-actions.pod:5253 ../fish/guestfish-actions.pod:3503
12944 msgid "FIFO (named pipe)"
12948 #: ../src/guestfs-actions.pod:5255 ../fish/guestfish-actions.pod:3505
12953 #: ../src/guestfs-actions.pod:5257 ../fish/guestfish-actions.pod:3507
12954 msgid "Symbolic link"
12958 #: ../src/guestfs-actions.pod:5259 ../fish/guestfish-actions.pod:3509
12963 #: ../src/guestfs-actions.pod:5261 ../fish/guestfish-actions.pod:3511
12964 msgid "Regular file"
12968 #: ../src/guestfs-actions.pod:5263 ../fish/guestfish-actions.pod:3513
12973 #: ../src/guestfs-actions.pod:5265 ../fish/guestfish-actions.pod:3515
12978 #: ../src/guestfs-actions.pod:5267 ../fish/guestfish-actions.pod:3517
12983 #: ../src/guestfs-actions.pod:5269 ../fish/guestfish-actions.pod:3519
12984 msgid "Unknown file type"
12988 #: ../src/guestfs-actions.pod:5271 ../fish/guestfish-actions.pod:3521
12993 #: ../src/guestfs-actions.pod:5273 ../fish/guestfish-actions.pod:3523
12994 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
12998 #: ../src/guestfs-actions.pod:5278
13000 "This function is primarily intended for use by programs. To get a simple "
13001 "list of names, use C<guestfs_ls>. To get a printable directory for human "
13002 "consumption, use C<guestfs_ll>."
13006 #: ../src/guestfs-actions.pod:5282
13008 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
13009 "was an error. I<The caller must call C<guestfs_free_dirent_list> after "
13014 #: ../src/guestfs-actions.pod:5288
13015 msgid "guestfs_readlink"
13019 #: ../src/guestfs-actions.pod:5290
13023 " guestfs_readlink (guestfs_h *g,\n"
13024 " const char *path);\n"
13029 #: ../src/guestfs-actions.pod:5294 ../fish/guestfish-actions.pod:3536
13030 msgid "This command reads the target of a symbolic link."
13034 #: ../src/guestfs-actions.pod:5301
13035 msgid "guestfs_readlinklist"
13039 #: ../src/guestfs-actions.pod:5303
13043 " guestfs_readlinklist (guestfs_h *g,\n"
13044 " const char *path,\n"
13045 " char *const *names);\n"
13050 #: ../src/guestfs-actions.pod:5308 ../fish/guestfish-actions.pod:3542
13052 "This call allows you to do a C<readlink> operation on multiple files, where "
13053 "all files are in the directory C<path>. C<names> is the list of files from "
13058 #: ../src/guestfs-actions.pod:5312 ../fish/guestfish-actions.pod:3546
13060 "On return you get a list of strings, with a one-to-one correspondence to the "
13061 "C<names> list. Each string is the value of the symbolic link."
13065 #: ../src/guestfs-actions.pod:5316 ../fish/guestfish-actions.pod:3550
13067 "If the C<readlink(2)> operation fails on any name, then the corresponding "
13068 "result string is the empty string C<\"\">. However the whole operation is "
13069 "completed even if there were C<readlink(2)> errors, and so you can call this "
13070 "function with names where you don't know if they are symbolic links already "
13071 "(albeit slightly less efficient)."
13075 #: ../src/guestfs-actions.pod:5323 ../fish/guestfish-actions.pod:3557
13077 "This call is intended for programs that want to efficiently list a directory "
13078 "contents without making many round-trips. Very long directory listings "
13079 "might cause the protocol message size to be exceeded, causing this call to "
13080 "fail. The caller must split up such requests into smaller groups of names."
13084 #: ../src/guestfs-actions.pod:5336
13085 msgid "guestfs_realpath"
13089 #: ../src/guestfs-actions.pod:5338
13093 " guestfs_realpath (guestfs_h *g,\n"
13094 " const char *path);\n"
13099 #: ../src/guestfs-actions.pod:5342 ../fish/guestfish-actions.pod:3568
13101 "Return the canonicalized absolute pathname of C<path>. The returned path "
13102 "has no C<.>, C<..> or symbolic link path elements."
13106 #: ../src/guestfs-actions.pod:5350
13107 msgid "guestfs_removexattr"
13111 #: ../src/guestfs-actions.pod:5352
13115 " guestfs_removexattr (guestfs_h *g,\n"
13116 " const char *xattr,\n"
13117 " const char *path);\n"
13122 #: ../src/guestfs-actions.pod:5357 ../fish/guestfish-actions.pod:3575
13123 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
13127 #: ../src/guestfs-actions.pod:5360
13128 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
13132 #: ../src/guestfs-actions.pod:5366
13133 msgid "guestfs_resize2fs"
13137 #: ../src/guestfs-actions.pod:5368
13141 " guestfs_resize2fs (guestfs_h *g,\n"
13142 " const char *device);\n"
13147 #: ../src/guestfs-actions.pod:5372 ../fish/guestfish-actions.pod:3584
13149 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
13150 "underlying device."
13154 #: ../src/guestfs-actions.pod:5375
13156 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
13157 "C<device> before calling this command. For unknown reasons C<resize2fs> "
13158 "sometimes gives an error about this and sometimes not. In any case, it is "
13159 "always safe to call C<guestfs_e2fsck_f> before calling this function."
13163 #: ../src/guestfs-actions.pod:5385
13164 msgid "guestfs_resize2fs_size"
13168 #: ../src/guestfs-actions.pod:5387
13172 " guestfs_resize2fs_size (guestfs_h *g,\n"
13173 " const char *device,\n"
13174 " int64_t size);\n"
13179 #: ../src/guestfs-actions.pod:5392
13181 "This command is the same as C<guestfs_resize2fs> except that it allows you "
13182 "to specify the new size (in bytes) explicitly."
13186 #: ../src/guestfs-actions.pod:5399
13191 #: ../src/guestfs-actions.pod:5401
13195 " guestfs_rm (guestfs_h *g,\n"
13196 " const char *path);\n"
13201 #: ../src/guestfs-actions.pod:5405 ../fish/guestfish-actions.pod:3604
13202 msgid "Remove the single file C<path>."
13206 #: ../src/guestfs-actions.pod:5411
13207 msgid "guestfs_rm_rf"
13211 #: ../src/guestfs-actions.pod:5413
13215 " guestfs_rm_rf (guestfs_h *g,\n"
13216 " const char *path);\n"
13221 #: ../src/guestfs-actions.pod:5417 ../fish/guestfish-actions.pod:3610
13223 "Remove the file or directory C<path>, recursively removing the contents if "
13224 "its a directory. This is like the C<rm -rf> shell command."
13228 #: ../src/guestfs-actions.pod:5425
13229 msgid "guestfs_rmdir"
13233 #: ../src/guestfs-actions.pod:5427
13237 " guestfs_rmdir (guestfs_h *g,\n"
13238 " const char *path);\n"
13243 #: ../src/guestfs-actions.pod:5431 ../fish/guestfish-actions.pod:3618
13244 msgid "Remove the single directory C<path>."
13248 #: ../src/guestfs-actions.pod:5437
13249 msgid "guestfs_rmmountpoint"
13253 #: ../src/guestfs-actions.pod:5439
13257 " guestfs_rmmountpoint (guestfs_h *g,\n"
13258 " const char *exemptpath);\n"
13263 #: ../src/guestfs-actions.pod:5443
13265 "This calls removes a mountpoint that was previously created with "
13266 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
13270 #: ../src/guestfs-actions.pod:5451
13271 msgid "guestfs_scrub_device"
13275 #: ../src/guestfs-actions.pod:5453
13279 " guestfs_scrub_device (guestfs_h *g,\n"
13280 " const char *device);\n"
13285 #: ../src/guestfs-actions.pod:5457 ../fish/guestfish-actions.pod:3632
13287 "This command writes patterns over C<device> to make data retrieval more "
13292 #: ../src/guestfs-actions.pod:5460 ../src/guestfs-actions.pod:5481 ../src/guestfs-actions.pod:5500 ../fish/guestfish-actions.pod:3635 ../fish/guestfish-actions.pod:3650 ../fish/guestfish-actions.pod:3663
13294 "It is an interface to the L<scrub(1)> program. See that manual page for "
13299 #: ../src/guestfs-actions.pod:5468 ../src/guestfs-actions.pod:5486 ../src/guestfs-actions.pod:5505
13300 msgid "(Added in 1.0.52)"
13304 #: ../src/guestfs-actions.pod:5470
13305 msgid "guestfs_scrub_file"
13309 #: ../src/guestfs-actions.pod:5472
13313 " guestfs_scrub_file (guestfs_h *g,\n"
13314 " const char *file);\n"
13319 #: ../src/guestfs-actions.pod:5476 ../fish/guestfish-actions.pod:3645
13321 "This command writes patterns over a file to make data retrieval more "
13326 #: ../src/guestfs-actions.pod:5479 ../fish/guestfish-actions.pod:3648
13327 msgid "The file is I<removed> after scrubbing."
13331 #: ../src/guestfs-actions.pod:5488
13332 msgid "guestfs_scrub_freespace"
13336 #: ../src/guestfs-actions.pod:5490
13340 " guestfs_scrub_freespace (guestfs_h *g,\n"
13341 " const char *dir);\n"
13346 #: ../src/guestfs-actions.pod:5494
13348 "This command creates the directory C<dir> and then fills it with files until "
13349 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
13350 "and deletes them. The intention is to scrub any free space on the partition "
13351 "containing C<dir>."
13355 #: ../src/guestfs-actions.pod:5507
13356 msgid "guestfs_set_append"
13360 #: ../src/guestfs-actions.pod:5509
13364 " guestfs_set_append (guestfs_h *g,\n"
13365 " const char *append);\n"
13370 #: ../src/guestfs-actions.pod:5513 ../fish/guestfish-actions.pod:3672
13372 "This function is used to add additional options to the guest kernel command "
13377 #: ../src/guestfs-actions.pod:5516 ../fish/guestfish-actions.pod:3675
13379 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
13380 "environment variable."
13384 #: ../src/guestfs-actions.pod:5519 ../fish/guestfish-actions.pod:3678
13386 "Setting C<append> to C<NULL> means I<no> additional options are passed "
13387 "(libguestfs always adds a few of its own)."
13391 #: ../src/guestfs-actions.pod:5526
13392 msgid "guestfs_set_autosync"
13396 #: ../src/guestfs-actions.pod:5528
13400 " guestfs_set_autosync (guestfs_h *g,\n"
13401 " int autosync);\n"
13406 #: ../src/guestfs-actions.pod:5532
13408 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
13409 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
13410 "the handle is closed (also if the program exits without closing handles)."
13414 #: ../src/guestfs-actions.pod:5537 ../fish/guestfish-actions.pod:3692
13416 "This is enabled by default (since libguestfs 1.5.24, previously it was "
13417 "disabled by default)."
13421 #: ../src/guestfs-actions.pod:5544
13422 msgid "guestfs_set_direct"
13426 #: ../src/guestfs-actions.pod:5546
13430 " guestfs_set_direct (guestfs_h *g,\n"
13436 #: ../src/guestfs-actions.pod:5550 ../fish/guestfish-actions.pod:3701
13438 "If the direct appliance mode flag is enabled, then stdin and stdout are "
13439 "passed directly through to the appliance once it is launched."
13443 #: ../src/guestfs-actions.pod:5554
13445 "One consequence of this is that log messages aren't caught by the library "
13446 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
13451 #: ../src/guestfs-actions.pod:5558 ../fish/guestfish-actions.pod:3709
13452 msgid "You probably don't want to use this unless you know what you are doing."
13456 #: ../src/guestfs-actions.pod:5561 ../fish/guestfish-actions.pod:3712
13457 msgid "The default is disabled."
13461 #: ../src/guestfs-actions.pod:5567
13462 msgid "guestfs_set_e2label"
13466 #: ../src/guestfs-actions.pod:5569
13470 " guestfs_set_e2label (guestfs_h *g,\n"
13471 " const char *device,\n"
13472 " const char *label);\n"
13477 #: ../src/guestfs-actions.pod:5574 ../fish/guestfish-actions.pod:3718
13479 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
13480 "C<label>. Filesystem labels are limited to 16 characters."
13484 #: ../src/guestfs-actions.pod:5578
13486 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
13487 "the existing label on a filesystem."
13491 #: ../src/guestfs-actions.pod:5585
13492 msgid "guestfs_set_e2uuid"
13496 #: ../src/guestfs-actions.pod:5587
13500 " guestfs_set_e2uuid (guestfs_h *g,\n"
13501 " const char *device,\n"
13502 " const char *uuid);\n"
13507 #: ../src/guestfs-actions.pod:5592 ../fish/guestfish-actions.pod:3729
13509 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
13510 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
13511 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
13515 #: ../src/guestfs-actions.pod:5597
13517 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
13518 "the existing UUID of a filesystem."
13522 #: ../src/guestfs-actions.pod:5604
13523 msgid "guestfs_set_memsize"
13527 #: ../src/guestfs-actions.pod:5606
13531 " guestfs_set_memsize (guestfs_h *g,\n"
13537 #: ../src/guestfs-actions.pod:5610
13539 "This sets the memory size in megabytes allocated to the qemu subprocess. "
13540 "This only has any effect if called before C<guestfs_launch>."
13544 #: ../src/guestfs-actions.pod:5614 ../fish/guestfish-actions.pod:3747
13546 "You can also change this by setting the environment variable "
13547 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
13551 #: ../src/guestfs-actions.pod:5625
13552 msgid "guestfs_set_network"
13556 #: ../src/guestfs-actions.pod:5627
13560 " guestfs_set_network (guestfs_h *g,\n"
13566 #: ../src/guestfs-actions.pod:5631 ../fish/guestfish-actions.pod:3760
13568 "If C<network> is true, then the network is enabled in the libguestfs "
13569 "appliance. The default is false."
13573 #: ../src/guestfs-actions.pod:5634 ../fish/guestfish-actions.pod:3763
13575 "This affects whether commands are able to access the network (see "
13576 "L<guestfs(3)/RUNNING COMMANDS>)."
13580 #: ../src/guestfs-actions.pod:5637
13582 "You must call this before calling C<guestfs_launch>, otherwise it has no "
13587 #: ../src/guestfs-actions.pod:5644
13588 msgid "guestfs_set_path"
13592 #: ../src/guestfs-actions.pod:5646
13596 " guestfs_set_path (guestfs_h *g,\n"
13597 " const char *searchpath);\n"
13602 #: ../src/guestfs-actions.pod:5650 ../fish/guestfish-actions.pod:3775
13603 msgid "Set the path that libguestfs searches for kernel and initrd.img."
13607 #: ../src/guestfs-actions.pod:5652 ../fish/guestfish-actions.pod:3777
13609 "The default is C<$libdir/guestfs> unless overridden by setting "
13610 "C<LIBGUESTFS_PATH> environment variable."
13614 #: ../src/guestfs-actions.pod:5655 ../fish/guestfish-actions.pod:3780
13615 msgid "Setting C<path> to C<NULL> restores the default path."
13619 #: ../src/guestfs-actions.pod:5661
13620 msgid "guestfs_set_qemu"
13624 #: ../src/guestfs-actions.pod:5663
13628 " guestfs_set_qemu (guestfs_h *g,\n"
13629 " const char *qemu);\n"
13634 #: ../src/guestfs-actions.pod:5667 ../fish/guestfish-actions.pod:3788
13635 msgid "Set the qemu binary that we will use."
13639 #: ../src/guestfs-actions.pod:5669 ../fish/guestfish-actions.pod:3790
13640 msgid "The default is chosen when the library was compiled by the configure script."
13644 #: ../src/guestfs-actions.pod:5672 ../fish/guestfish-actions.pod:3793
13646 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
13651 #: ../src/guestfs-actions.pod:5675 ../fish/guestfish-actions.pod:3796
13652 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
13656 #: ../src/guestfs-actions.pod:5677 ../fish/guestfish-actions.pod:3798
13658 "Note that you should call this function as early as possible after creating "
13659 "the handle. This is because some pre-launch operations depend on testing "
13660 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
13661 "don't retest features, and so you might see inconsistent results. Using the "
13662 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
13663 "the qemu binary at the same time as the handle is created."
13667 #: ../src/guestfs-actions.pod:5689
13668 msgid "guestfs_set_recovery_proc"
13672 #: ../src/guestfs-actions.pod:5691
13676 " guestfs_set_recovery_proc (guestfs_h *g,\n"
13677 " int recoveryproc);\n"
13682 #: ../src/guestfs-actions.pod:5695
13684 "If this is called with the parameter C<false> then C<guestfs_launch> does "
13685 "not create a recovery process. The purpose of the recovery process is to "
13686 "stop runaway qemu processes in the case where the main program aborts "
13691 #: ../src/guestfs-actions.pod:5700
13693 "This only has any effect if called before C<guestfs_launch>, and the default "
13698 #: ../src/guestfs-actions.pod:5703 ../fish/guestfish-actions.pod:3820
13700 "About the only time when you would want to disable this is if the main "
13701 "process will fork itself into the background (\"daemonize\" itself). In "
13702 "this case the recovery process thinks that the main program has disappeared "
13703 "and so kills qemu, which is not very helpful."
13707 #: ../src/guestfs-actions.pod:5713
13708 msgid "guestfs_set_selinux"
13712 #: ../src/guestfs-actions.pod:5715
13716 " guestfs_set_selinux (guestfs_h *g,\n"
13722 #: ../src/guestfs-actions.pod:5719 ../fish/guestfish-actions.pod:3832
13724 "This sets the selinux flag that is passed to the appliance at boot time. "
13725 "The default is C<selinux=0> (disabled)."
13729 #: ../src/guestfs-actions.pod:5722 ../fish/guestfish-actions.pod:3835
13731 "Note that if SELinux is enabled, it is always in Permissive mode "
13732 "(C<enforcing=0>)."
13736 #: ../src/guestfs-actions.pod:5732
13737 msgid "guestfs_set_trace"
13741 #: ../src/guestfs-actions.pod:5734
13745 " guestfs_set_trace (guestfs_h *g,\n"
13751 #: ../src/guestfs-actions.pod:5738 ../fish/guestfish-actions.pod:3847
13753 "If the command trace flag is set to 1, then commands are printed on stderr "
13754 "before they are executed in a format which is very similar to the one used "
13755 "by guestfish. In other words, you can run a program with this enabled, and "
13756 "you will get out a script which you can feed to guestfish to perform the "
13757 "same set of actions."
13761 #: ../src/guestfs-actions.pod:5745 ../fish/guestfish-actions.pod:3854
13763 "If you want to trace C API calls into libguestfs (and other libraries) then "
13764 "possibly a better way is to use the external ltrace(1) command."
13768 #: ../src/guestfs-actions.pod:5749 ../fish/guestfish-actions.pod:3858
13770 "Command traces are disabled unless the environment variable "
13771 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
13775 #: ../src/guestfs-actions.pod:5756
13776 msgid "guestfs_set_verbose"
13780 #: ../src/guestfs-actions.pod:5758
13784 " guestfs_set_verbose (guestfs_h *g,\n"
13790 #: ../src/guestfs-actions.pod:5762 ../fish/guestfish-actions.pod:3867
13791 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
13795 #: ../src/guestfs-actions.pod:5764 ../fish/guestfish-actions.pod:3869
13797 "Verbose messages are disabled unless the environment variable "
13798 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
13802 #: ../src/guestfs-actions.pod:5771
13803 msgid "guestfs_setcon"
13807 #: ../src/guestfs-actions.pod:5773
13811 " guestfs_setcon (guestfs_h *g,\n"
13812 " const char *context);\n"
13817 #: ../src/guestfs-actions.pod:5777 ../fish/guestfish-actions.pod:3876
13819 "This sets the SELinux security context of the daemon to the string "
13824 #: ../src/guestfs-actions.pod:5780 ../fish/guestfish-actions.pod:3879
13825 msgid "See the documentation about SELINUX in L<guestfs(3)>."
13829 #: ../src/guestfs-actions.pod:5786
13830 msgid "guestfs_setxattr"
13834 #: ../src/guestfs-actions.pod:5788
13838 " guestfs_setxattr (guestfs_h *g,\n"
13839 " const char *xattr,\n"
13840 " const char *val,\n"
13842 " const char *path);\n"
13847 #: ../src/guestfs-actions.pod:5795 ../fish/guestfish-actions.pod:3885
13849 "This call sets the extended attribute named C<xattr> of the file C<path> to "
13850 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
13854 #: ../src/guestfs-actions.pod:5799
13855 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
13859 #: ../src/guestfs-actions.pod:5805
13860 msgid "guestfs_sfdisk"
13864 #: ../src/guestfs-actions.pod:5807
13868 " guestfs_sfdisk (guestfs_h *g,\n"
13869 " const char *device,\n"
13873 " char *const *lines);\n"
13878 #: ../src/guestfs-actions.pod:5815 ../fish/guestfish-actions.pod:3895
13880 "This is a direct interface to the L<sfdisk(8)> program for creating "
13881 "partitions on block devices."
13885 #: ../src/guestfs-actions.pod:5818 ../fish/guestfish-actions.pod:3898
13886 msgid "C<device> should be a block device, for example C</dev/sda>."
13890 #: ../src/guestfs-actions.pod:5820 ../fish/guestfish-actions.pod:3900
13892 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
13893 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
13894 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
13895 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
13896 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
13897 "the kernel) cannot work out the right geometry and you will need to tell it."
13901 #: ../src/guestfs-actions.pod:5828 ../fish/guestfish-actions.pod:3908
13903 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
13904 "refer to the L<sfdisk(8)> manpage."
13908 #: ../src/guestfs-actions.pod:5831 ../fish/guestfish-actions.pod:3911
13910 "To create a single partition occupying the whole disk, you would pass "
13911 "C<lines> as a single element list, when the single element being the string "
13916 #: ../src/guestfs-actions.pod:5835
13917 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
13921 #: ../src/guestfs-actions.pod:5845
13922 msgid "guestfs_sfdiskM"
13926 #: ../src/guestfs-actions.pod:5847
13930 " guestfs_sfdiskM (guestfs_h *g,\n"
13931 " const char *device,\n"
13932 " char *const *lines);\n"
13937 #: ../src/guestfs-actions.pod:5852
13939 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
13940 "partition sizes are specified in megabytes only (rounded to the nearest "
13941 "cylinder) and you don't need to specify the cyls, heads and sectors "
13942 "parameters which were rarely if ever used anyway."
13946 #: ../src/guestfs-actions.pod:5858
13948 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
13949 "C<guestfs_part_disk>"
13953 #: ../src/guestfs-actions.pod:5868
13954 msgid "guestfs_sfdisk_N"
13958 #: ../src/guestfs-actions.pod:5870
13962 " guestfs_sfdisk_N (guestfs_h *g,\n"
13963 " const char *device,\n"
13968 " const char *line);\n"
13973 #: ../src/guestfs-actions.pod:5879 ../fish/guestfish-actions.pod:3941
13975 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
13976 "(note: C<n> counts from 1)."
13980 #: ../src/guestfs-actions.pod:5882
13982 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
13983 "for the cyls/heads/sectors parameters."
13987 #: ../src/guestfs-actions.pod:5885
13988 msgid "See also: C<guestfs_part_add>"
13992 #: ../src/guestfs-actions.pod:5894
13993 msgid "guestfs_sfdisk_disk_geometry"
13997 #: ../src/guestfs-actions.pod:5896
14001 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
14002 " const char *device);\n"
14007 #: ../src/guestfs-actions.pod:5900
14009 "This displays the disk geometry of C<device> read from the partition table. "
14010 "Especially in the case where the underlying block device has been resized, "
14011 "this can be different from the kernel's idea of the geometry (see "
14012 "C<guestfs_sfdisk_kernel_geometry>)."
14016 #: ../src/guestfs-actions.pod:5905 ../src/guestfs-actions.pod:5921 ../fish/guestfish-actions.pod:3961 ../fish/guestfish-actions.pod:3970
14017 msgid "The result is in human-readable format, and not designed to be parsed."
14021 #: ../src/guestfs-actions.pod:5913
14022 msgid "guestfs_sfdisk_kernel_geometry"
14026 #: ../src/guestfs-actions.pod:5915
14030 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
14031 " const char *device);\n"
14036 #: ../src/guestfs-actions.pod:5919 ../fish/guestfish-actions.pod:3968
14037 msgid "This displays the kernel's idea of the geometry of C<device>."
14041 #: ../src/guestfs-actions.pod:5929
14042 msgid "guestfs_sfdisk_l"
14046 #: ../src/guestfs-actions.pod:5931
14050 " guestfs_sfdisk_l (guestfs_h *g,\n"
14051 " const char *device);\n"
14056 #: ../src/guestfs-actions.pod:5935 ../fish/guestfish-actions.pod:3977
14058 "This displays the partition table on C<device>, in the human-readable output "
14059 "of the L<sfdisk(8)> command. It is not intended to be parsed."
14063 #: ../src/guestfs-actions.pod:5939
14064 msgid "See also: C<guestfs_part_list>"
14068 #: ../src/guestfs-actions.pod:5946
14073 #: ../src/guestfs-actions.pod:5948
14077 " guestfs_sh (guestfs_h *g,\n"
14078 " const char *command);\n"
14083 #: ../src/guestfs-actions.pod:5952 ../fish/guestfish-actions.pod:3987
14085 "This call runs a command from the guest filesystem via the guest's "
14090 #: ../src/guestfs-actions.pod:5955
14091 msgid "This is like C<guestfs_command>, but passes the command to:"
14095 #: ../src/guestfs-actions.pod:5957 ../fish/guestfish-actions.pod:3992
14098 " /bin/sh -c \"command\"\n"
14103 #: ../src/guestfs-actions.pod:5959 ../fish/guestfish-actions.pod:3994
14105 "Depending on the guest's shell, this usually results in wildcards being "
14106 "expanded, shell expressions being interpolated and so on."
14110 #: ../src/guestfs-actions.pod:5963
14111 msgid "All the provisos about C<guestfs_command> apply to this call."
14115 #: ../src/guestfs-actions.pod:5970
14116 msgid "guestfs_sh_lines"
14120 #: ../src/guestfs-actions.pod:5972
14124 " guestfs_sh_lines (guestfs_h *g,\n"
14125 " const char *command);\n"
14130 #: ../src/guestfs-actions.pod:5976
14132 "This is the same as C<guestfs_sh>, but splits the result into a list of "
14137 #: ../src/guestfs-actions.pod:5979
14138 msgid "See also: C<guestfs_command_lines>"
14142 #: ../src/guestfs-actions.pod:5987
14143 msgid "guestfs_sleep"
14147 #: ../src/guestfs-actions.pod:5989
14151 " guestfs_sleep (guestfs_h *g,\n"
14157 #: ../src/guestfs-actions.pod:5993 ../fish/guestfish-actions.pod:4013
14158 msgid "Sleep for C<secs> seconds."
14162 #: ../src/guestfs-actions.pod:5997
14163 msgid "(Added in 1.0.41)"
14167 #: ../src/guestfs-actions.pod:5999 ../src/guestfs-structs.pod:109
14168 msgid "guestfs_stat"
14172 #: ../src/guestfs-actions.pod:6001
14175 " struct guestfs_stat *\n"
14176 " guestfs_stat (guestfs_h *g,\n"
14177 " const char *path);\n"
14182 #: ../src/guestfs-actions.pod:6007 ../fish/guestfish-actions.pod:4021
14183 msgid "This is the same as the C<stat(2)> system call."
14187 #: ../src/guestfs-actions.pod:6015 ../src/guestfs-structs.pod:135
14188 msgid "guestfs_statvfs"
14192 #: ../src/guestfs-actions.pod:6017
14195 " struct guestfs_statvfs *\n"
14196 " guestfs_statvfs (guestfs_h *g,\n"
14197 " const char *path);\n"
14202 #: ../src/guestfs-actions.pod:6021 ../fish/guestfish-actions.pod:4027
14204 "Returns file system statistics for any mounted file system. C<path> should "
14205 "be a file or directory in the mounted file system (typically it is the mount "
14206 "point itself, but it doesn't need to be)."
14210 #: ../src/guestfs-actions.pod:6025 ../fish/guestfish-actions.pod:4031
14211 msgid "This is the same as the C<statvfs(2)> system call."
14215 #: ../src/guestfs-actions.pod:6027
14217 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
14218 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
14222 #: ../src/guestfs-actions.pod:6033
14223 msgid "guestfs_strings"
14227 #: ../src/guestfs-actions.pod:6035
14231 " guestfs_strings (guestfs_h *g,\n"
14232 " const char *path);\n"
14237 #: ../src/guestfs-actions.pod:6039 ../fish/guestfish-actions.pod:4037
14239 "This runs the L<strings(1)> command on a file and returns the list of "
14240 "printable strings found."
14244 #: ../src/guestfs-actions.pod:6051
14245 msgid "guestfs_strings_e"
14249 #: ../src/guestfs-actions.pod:6053
14253 " guestfs_strings_e (guestfs_h *g,\n"
14254 " const char *encoding,\n"
14255 " const char *path);\n"
14260 #: ../src/guestfs-actions.pod:6058
14262 "This is like the C<guestfs_strings> command, but allows you to specify the "
14263 "encoding of strings that are looked for in the source file C<path>."
14267 #: ../src/guestfs-actions.pod:6062 ../fish/guestfish-actions.pod:4051
14268 msgid "Allowed encodings are:"
14272 #: ../src/guestfs-actions.pod:6066 ../fish/guestfish-actions.pod:4055
14277 #: ../src/guestfs-actions.pod:6068
14279 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
14280 "ISO-8859-X (this is what C<guestfs_strings> uses)."
14284 #: ../src/guestfs-actions.pod:6071 ../fish/guestfish-actions.pod:4060
14289 #: ../src/guestfs-actions.pod:6073 ../fish/guestfish-actions.pod:4062
14290 msgid "Single 8-bit-byte characters."
14294 #: ../src/guestfs-actions.pod:6075 ../fish/guestfish-actions.pod:4064
14299 #: ../src/guestfs-actions.pod:6077 ../fish/guestfish-actions.pod:4066
14300 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
14304 #: ../src/guestfs-actions.pod:6080 ../fish/guestfish-actions.pod:4069
14305 msgid "l (lower case letter L)"
14309 #: ../src/guestfs-actions.pod:6082 ../fish/guestfish-actions.pod:4071
14311 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
14312 "examining binaries in Windows guests."
14316 #: ../src/guestfs-actions.pod:6085 ../fish/guestfish-actions.pod:4074
14321 #: ../src/guestfs-actions.pod:6087 ../fish/guestfish-actions.pod:4076
14322 msgid "32-bit big endian such as UCS-4BE."
14326 #: ../src/guestfs-actions.pod:6089 ../fish/guestfish-actions.pod:4078
14331 #: ../src/guestfs-actions.pod:6091 ../fish/guestfish-actions.pod:4080
14332 msgid "32-bit little endian such as UCS-4LE."
14336 #: ../src/guestfs-actions.pod:6095 ../fish/guestfish-actions.pod:4084
14337 msgid "The returned strings are transcoded to UTF-8."
14341 #: ../src/guestfs-actions.pod:6106
14342 msgid "guestfs_swapoff_device"
14346 #: ../src/guestfs-actions.pod:6108
14350 " guestfs_swapoff_device (guestfs_h *g,\n"
14351 " const char *device);\n"
14356 #: ../src/guestfs-actions.pod:6112
14358 "This command disables the libguestfs appliance swap device or partition "
14359 "named C<device>. See C<guestfs_swapon_device>."
14363 #: ../src/guestfs-actions.pod:6120
14364 msgid "guestfs_swapoff_file"
14368 #: ../src/guestfs-actions.pod:6122
14372 " guestfs_swapoff_file (guestfs_h *g,\n"
14373 " const char *file);\n"
14378 #: ../src/guestfs-actions.pod:6126 ../fish/guestfish-actions.pod:4101
14379 msgid "This command disables the libguestfs appliance swap on file."
14383 #: ../src/guestfs-actions.pod:6132
14384 msgid "guestfs_swapoff_label"
14388 #: ../src/guestfs-actions.pod:6134
14392 " guestfs_swapoff_label (guestfs_h *g,\n"
14393 " const char *label);\n"
14398 #: ../src/guestfs-actions.pod:6138 ../fish/guestfish-actions.pod:4107
14400 "This command disables the libguestfs appliance swap on labeled swap "
14405 #: ../src/guestfs-actions.pod:6145
14406 msgid "guestfs_swapoff_uuid"
14410 #: ../src/guestfs-actions.pod:6147
14414 " guestfs_swapoff_uuid (guestfs_h *g,\n"
14415 " const char *uuid);\n"
14420 #: ../src/guestfs-actions.pod:6151 ../fish/guestfish-actions.pod:4114
14422 "This command disables the libguestfs appliance swap partition with the given "
14427 #: ../src/guestfs-actions.pod:6158
14428 msgid "guestfs_swapon_device"
14432 #: ../src/guestfs-actions.pod:6160
14436 " guestfs_swapon_device (guestfs_h *g,\n"
14437 " const char *device);\n"
14442 #: ../src/guestfs-actions.pod:6164
14444 "This command enables the libguestfs appliance to use the swap device or "
14445 "partition named C<device>. The increased memory is made available for all "
14446 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
14450 #: ../src/guestfs-actions.pod:6169 ../fish/guestfish-actions.pod:4126
14452 "Note that you should not swap to existing guest swap partitions unless you "
14453 "know what you are doing. They may contain hibernation information, or other "
14454 "information that the guest doesn't want you to trash. You also risk leaking "
14455 "information about the host to the guest this way. Instead, attach a new "
14456 "host device to the guest and swap on that."
14460 #: ../src/guestfs-actions.pod:6180
14461 msgid "guestfs_swapon_file"
14465 #: ../src/guestfs-actions.pod:6182
14469 " guestfs_swapon_file (guestfs_h *g,\n"
14470 " const char *file);\n"
14475 #: ../src/guestfs-actions.pod:6186
14477 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
14482 #: ../src/guestfs-actions.pod:6193
14483 msgid "guestfs_swapon_label"
14487 #: ../src/guestfs-actions.pod:6195
14491 " guestfs_swapon_label (guestfs_h *g,\n"
14492 " const char *label);\n"
14497 #: ../src/guestfs-actions.pod:6199
14499 "This command enables swap to a labeled swap partition. See "
14500 "C<guestfs_swapon_device> for other notes."
14504 #: ../src/guestfs-actions.pod:6206
14505 msgid "guestfs_swapon_uuid"
14509 #: ../src/guestfs-actions.pod:6208
14513 " guestfs_swapon_uuid (guestfs_h *g,\n"
14514 " const char *uuid);\n"
14519 #: ../src/guestfs-actions.pod:6212
14521 "This command enables swap to a swap partition with the given UUID. See "
14522 "C<guestfs_swapon_device> for other notes."
14526 #: ../src/guestfs-actions.pod:6219
14527 msgid "guestfs_sync"
14531 #: ../src/guestfs-actions.pod:6221
14535 " guestfs_sync (guestfs_h *g);\n"
14540 #: ../src/guestfs-actions.pod:6224 ../fish/guestfish-actions.pod:4158
14542 "This syncs the disk, so that any writes are flushed through to the "
14543 "underlying disk image."
14547 #: ../src/guestfs-actions.pod:6227 ../fish/guestfish-actions.pod:4161
14549 "You should always call this if you have modified a disk image, before "
14550 "closing the handle."
14554 #: ../src/guestfs-actions.pod:6234
14555 msgid "guestfs_tail"
14559 #: ../src/guestfs-actions.pod:6236
14563 " guestfs_tail (guestfs_h *g,\n"
14564 " const char *path);\n"
14569 #: ../src/guestfs-actions.pod:6240 ../fish/guestfish-actions.pod:4168
14570 msgid "This command returns up to the last 10 lines of a file as a list of strings."
14574 #: ../src/guestfs-actions.pod:6252
14575 msgid "guestfs_tail_n"
14579 #: ../src/guestfs-actions.pod:6254
14583 " guestfs_tail_n (guestfs_h *g,\n"
14585 " const char *path);\n"
14590 #: ../src/guestfs-actions.pod:6259 ../fish/guestfish-actions.pod:4178
14592 "If the parameter C<nrlines> is a positive number, this returns the last "
14593 "C<nrlines> lines of the file C<path>."
14597 #: ../src/guestfs-actions.pod:6262 ../fish/guestfish-actions.pod:4181
14599 "If the parameter C<nrlines> is a negative number, this returns lines from "
14600 "the file C<path>, starting with the C<-nrlines>th line."
14604 #: ../src/guestfs-actions.pod:6276
14605 msgid "guestfs_tar_in"
14609 #: ../src/guestfs-actions.pod:6278
14613 " guestfs_tar_in (guestfs_h *g,\n"
14614 " const char *tarfile,\n"
14615 " const char *directory);\n"
14620 #: ../src/guestfs-actions.pod:6283 ../fish/guestfish-actions.pod:4193
14622 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
14623 "tar file) into C<directory>."
14627 #: ../src/guestfs-actions.pod:6286
14628 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
14632 #: ../src/guestfs-actions.pod:6291 ../src/guestfs-actions.pod:6308 ../src/guestfs-actions.pod:6324 ../src/guestfs-actions.pod:6340
14633 msgid "(Added in 1.0.3)"
14637 #: ../src/guestfs-actions.pod:6293
14638 msgid "guestfs_tar_out"
14642 #: ../src/guestfs-actions.pod:6295
14646 " guestfs_tar_out (guestfs_h *g,\n"
14647 " const char *directory,\n"
14648 " const char *tarfile);\n"
14653 #: ../src/guestfs-actions.pod:6300 ../fish/guestfish-actions.pod:4205
14655 "This command packs the contents of C<directory> and downloads it to local "
14660 #: ../src/guestfs-actions.pod:6303
14662 "To download a compressed tarball, use C<guestfs_tgz_out> or "
14663 "C<guestfs_txz_out>."
14667 #: ../src/guestfs-actions.pod:6310
14668 msgid "guestfs_tgz_in"
14672 #: ../src/guestfs-actions.pod:6312
14676 " guestfs_tgz_in (guestfs_h *g,\n"
14677 " const char *tarball,\n"
14678 " const char *directory);\n"
14683 #: ../src/guestfs-actions.pod:6317 ../fish/guestfish-actions.pod:4217
14685 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
14686 "tar file) into C<directory>."
14690 #: ../src/guestfs-actions.pod:6320
14691 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
14695 #: ../src/guestfs-actions.pod:6326
14696 msgid "guestfs_tgz_out"
14700 #: ../src/guestfs-actions.pod:6328
14704 " guestfs_tgz_out (guestfs_h *g,\n"
14705 " const char *directory,\n"
14706 " const char *tarball);\n"
14711 #: ../src/guestfs-actions.pod:6333 ../fish/guestfish-actions.pod:4228
14713 "This command packs the contents of C<directory> and downloads it to local "
14718 #: ../src/guestfs-actions.pod:6336
14719 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
14723 #: ../src/guestfs-actions.pod:6342
14724 msgid "guestfs_touch"
14728 #: ../src/guestfs-actions.pod:6344
14732 " guestfs_touch (guestfs_h *g,\n"
14733 " const char *path);\n"
14738 #: ../src/guestfs-actions.pod:6348 ../fish/guestfish-actions.pod:4239
14740 "Touch acts like the L<touch(1)> command. It can be used to update the "
14741 "timestamps on a file, or, if the file does not exist, to create a new "
14742 "zero-length file."
14746 #: ../src/guestfs-actions.pod:6352 ../fish/guestfish-actions.pod:4243
14748 "This command only works on regular files, and will fail on other file types "
14749 "such as directories, symbolic links, block special etc."
14753 #: ../src/guestfs-actions.pod:6359
14754 msgid "guestfs_truncate"
14758 #: ../src/guestfs-actions.pod:6361
14762 " guestfs_truncate (guestfs_h *g,\n"
14763 " const char *path);\n"
14768 #: ../src/guestfs-actions.pod:6365 ../fish/guestfish-actions.pod:4250
14770 "This command truncates C<path> to a zero-length file. The file must exist "
14775 #: ../src/guestfs-actions.pod:6372
14776 msgid "guestfs_truncate_size"
14780 #: ../src/guestfs-actions.pod:6374
14784 " guestfs_truncate_size (guestfs_h *g,\n"
14785 " const char *path,\n"
14786 " int64_t size);\n"
14791 #: ../src/guestfs-actions.pod:6379 ../fish/guestfish-actions.pod:4257
14793 "This command truncates C<path> to size C<size> bytes. The file must exist "
14798 #: ../src/guestfs-actions.pod:6382
14800 "If the current file size is less than C<size> then the file is extended to "
14801 "the required size with zero bytes. This creates a sparse file (ie. disk "
14802 "blocks are not allocated for the file until you write to it). To create a "
14803 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
14807 #: ../src/guestfs-actions.pod:6392
14808 msgid "guestfs_tune2fs_l"
14812 #: ../src/guestfs-actions.pod:6394
14816 " guestfs_tune2fs_l (guestfs_h *g,\n"
14817 " const char *device);\n"
14822 #: ../src/guestfs-actions.pod:6398 ../fish/guestfish-actions.pod:4270
14824 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
14829 #: ../src/guestfs-actions.pod:6401 ../fish/guestfish-actions.pod:4273
14831 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
14832 "for more details. The list of fields returned isn't clearly defined, and "
14833 "depends on both the version of C<tune2fs> that libguestfs was built against, "
14834 "and the filesystem itself."
14838 #: ../src/guestfs-actions.pod:6414
14839 msgid "guestfs_txz_in"
14843 #: ../src/guestfs-actions.pod:6416
14847 " guestfs_txz_in (guestfs_h *g,\n"
14848 " const char *tarball,\n"
14849 " const char *directory);\n"
14854 #: ../src/guestfs-actions.pod:6421 ../fish/guestfish-actions.pod:4282
14856 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
14857 "tar file) into C<directory>."
14861 #: ../src/guestfs-actions.pod:6428
14862 msgid "guestfs_txz_out"
14866 #: ../src/guestfs-actions.pod:6430
14870 " guestfs_txz_out (guestfs_h *g,\n"
14871 " const char *directory,\n"
14872 " const char *tarball);\n"
14877 #: ../src/guestfs-actions.pod:6435 ../fish/guestfish-actions.pod:4291
14879 "This command packs the contents of C<directory> and downloads it to local "
14880 "file C<tarball> (as an xz compressed tar archive)."
14884 #: ../src/guestfs-actions.pod:6442
14885 msgid "guestfs_umask"
14889 #: ../src/guestfs-actions.pod:6444
14893 " guestfs_umask (guestfs_h *g,\n"
14899 #: ../src/guestfs-actions.pod:6448 ../fish/guestfish-actions.pod:4300
14901 "This function sets the mask used for creating new files and device nodes to "
14906 #: ../src/guestfs-actions.pod:6451 ../fish/guestfish-actions.pod:4303
14908 "Typical umask values would be C<022> which creates new files with "
14909 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
14910 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
14914 #: ../src/guestfs-actions.pod:6456 ../fish/guestfish-actions.pod:4308
14916 "The default umask is C<022>. This is important because it means that "
14917 "directories and device nodes will be created with C<0644> or C<0755> mode "
14918 "even if you specify C<0777>."
14922 #: ../src/guestfs-actions.pod:6460
14924 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
14925 "C<guestfs_mkdir>."
14929 #: ../src/guestfs-actions.pod:6463 ../fish/guestfish-actions.pod:4315
14930 msgid "This call returns the previous umask."
14934 #: ../src/guestfs-actions.pod:6469
14935 msgid "guestfs_umount"
14939 #: ../src/guestfs-actions.pod:6471
14943 " guestfs_umount (guestfs_h *g,\n"
14944 " const char *pathordevice);\n"
14949 #: ../src/guestfs-actions.pod:6475 ../fish/guestfish-actions.pod:4323
14951 "This unmounts the given filesystem. The filesystem may be specified either "
14952 "by its mountpoint (path) or the device which contains the filesystem."
14956 #: ../src/guestfs-actions.pod:6483
14957 msgid "guestfs_umount_all"
14961 #: ../src/guestfs-actions.pod:6485
14965 " guestfs_umount_all (guestfs_h *g);\n"
14970 #: ../src/guestfs-actions.pod:6488 ../fish/guestfish-actions.pod:4333
14971 msgid "This unmounts all mounted filesystems."
14975 #: ../src/guestfs-actions.pod:6490 ../fish/guestfish-actions.pod:4335
14976 msgid "Some internal mounts are not unmounted by this call."
14980 #: ../src/guestfs-actions.pod:6496
14981 msgid "guestfs_upload"
14985 #: ../src/guestfs-actions.pod:6498
14989 " guestfs_upload (guestfs_h *g,\n"
14990 " const char *filename,\n"
14991 " const char *remotefilename);\n"
14996 #: ../src/guestfs-actions.pod:6503 ../src/guestfs-actions.pod:6527 ../fish/guestfish-actions.pod:4341 ../fish/guestfish-actions.pod:4354
14997 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
15001 #: ../src/guestfs-actions.pod:6508
15002 msgid "See also C<guestfs_download>."
15006 #: ../src/guestfs-actions.pod:6519
15007 msgid "guestfs_upload_offset"
15011 #: ../src/guestfs-actions.pod:6521
15015 " guestfs_upload_offset (guestfs_h *g,\n"
15016 " const char *filename,\n"
15017 " const char *remotefilename,\n"
15018 " int64_t offset);\n"
15023 #: ../src/guestfs-actions.pod:6530 ../fish/guestfish-actions.pod:4357
15025 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
15026 "The intention is to overwrite parts of existing files or devices, although "
15027 "if a non-existant file is specified then it is created with a \"hole\" "
15028 "before C<offset>. The size of the data written is implicit in the size of "
15029 "the source C<filename>."
15033 #: ../src/guestfs-actions.pod:6537
15035 "Note that there is no limit on the amount of data that can be uploaded with "
15036 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
15037 "full amount unless an error occurs."
15041 #: ../src/guestfs-actions.pod:6542
15042 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
15046 #: ../src/guestfs-actions.pod:6553
15047 msgid "guestfs_utimens"
15051 #: ../src/guestfs-actions.pod:6555
15055 " guestfs_utimens (guestfs_h *g,\n"
15056 " const char *path,\n"
15057 " int64_t atsecs,\n"
15058 " int64_t atnsecs,\n"
15059 " int64_t mtsecs,\n"
15060 " int64_t mtnsecs);\n"
15065 #: ../src/guestfs-actions.pod:6563 ../fish/guestfish-actions.pod:4377
15066 msgid "This command sets the timestamps of a file with nanosecond precision."
15070 #: ../src/guestfs-actions.pod:6566 ../fish/guestfish-actions.pod:4380
15072 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
15077 #: ../src/guestfs-actions.pod:6569 ../fish/guestfish-actions.pod:4383
15079 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
15080 "nanoseconds from the epoch."
15084 #: ../src/guestfs-actions.pod:6572 ../fish/guestfish-actions.pod:4386
15086 "If the C<*nsecs> field contains the special value C<-1> then the "
15087 "corresponding timestamp is set to the current time. (The C<*secs> field is "
15088 "ignored in this case)."
15092 #: ../src/guestfs-actions.pod:6576 ../fish/guestfish-actions.pod:4390
15094 "If the C<*nsecs> field contains the special value C<-2> then the "
15095 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
15100 #: ../src/guestfs-actions.pod:6584 ../src/guestfs-structs.pod:175
15101 msgid "guestfs_version"
15105 #: ../src/guestfs-actions.pod:6586
15108 " struct guestfs_version *\n"
15109 " guestfs_version (guestfs_h *g);\n"
15114 #: ../src/guestfs-actions.pod:6589 ../fish/guestfish-actions.pod:4398
15115 msgid "Return the libguestfs version number that the program is linked against."
15119 #: ../src/guestfs-actions.pod:6592 ../fish/guestfish-actions.pod:4401
15121 "Note that because of dynamic linking this is not necessarily the version of "
15122 "libguestfs that you compiled against. You can compile the program, and then "
15123 "at runtime dynamically link against a completely different C<libguestfs.so> "
15128 #: ../src/guestfs-actions.pod:6597 ../fish/guestfish-actions.pod:4406
15130 "This call was added in version C<1.0.58>. In previous versions of "
15131 "libguestfs there was no way to get the version number. From C code you can "
15132 "use dynamic linker functions to find out if this symbol exists (if it "
15133 "doesn't, then it's an earlier version)."
15137 #: ../src/guestfs-actions.pod:6603 ../fish/guestfish-actions.pod:4412
15139 "The call returns a structure with four elements. The first three (C<major>, "
15140 "C<minor> and C<release>) are numbers and correspond to the usual version "
15141 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
15142 "but may be used for distro-specific information."
15146 #: ../src/guestfs-actions.pod:6609 ../fish/guestfish-actions.pod:4418
15147 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
15151 #: ../src/guestfs-actions.pod:6612 ../fish/guestfish-actions.pod:4421
15152 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
15156 #: ../src/guestfs-actions.pod:6614
15158 "I<Note:> Don't use this call to test for availability of features. In "
15159 "enterprise distributions we backport features from later versions into "
15160 "earlier versions, making this an unreliable way to test for features. Use "
15161 "C<guestfs_available> instead."
15165 #: ../src/guestfs-actions.pod:6620
15167 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
15168 "error. I<The caller must call C<guestfs_free_version> after use>."
15172 #: ../src/guestfs-actions.pod:6624
15173 msgid "(Added in 1.0.58)"
15177 #: ../src/guestfs-actions.pod:6626
15178 msgid "guestfs_vfs_label"
15182 #: ../src/guestfs-actions.pod:6628
15186 " guestfs_vfs_label (guestfs_h *g,\n"
15187 " const char *device);\n"
15192 #: ../src/guestfs-actions.pod:6632 ../fish/guestfish-actions.pod:4433
15193 msgid "This returns the filesystem label of the filesystem on C<device>."
15197 #: ../src/guestfs-actions.pod:6635 ../fish/guestfish-actions.pod:4436
15198 msgid "If the filesystem is unlabeled, this returns the empty string."
15202 #: ../src/guestfs-actions.pod:6637
15203 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
15207 #: ../src/guestfs-actions.pod:6642 ../src/guestfs-actions.pod:6679
15208 msgid "(Added in 1.3.18)"
15212 #: ../src/guestfs-actions.pod:6644
15213 msgid "guestfs_vfs_type"
15217 #: ../src/guestfs-actions.pod:6646
15221 " guestfs_vfs_type (guestfs_h *g,\n"
15222 " const char *device);\n"
15227 #: ../src/guestfs-actions.pod:6650 ../fish/guestfish-actions.pod:4444
15229 "This command gets the filesystem type corresponding to the filesystem on "
15234 #: ../src/guestfs-actions.pod:6653 ../fish/guestfish-actions.pod:4447
15236 "For most filesystems, the result is the name of the Linux VFS module which "
15237 "would be used to mount this filesystem if you mounted it without specifying "
15238 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
15242 #: ../src/guestfs-actions.pod:6663
15243 msgid "guestfs_vfs_uuid"
15247 #: ../src/guestfs-actions.pod:6665
15251 " guestfs_vfs_uuid (guestfs_h *g,\n"
15252 " const char *device);\n"
15257 #: ../src/guestfs-actions.pod:6669 ../fish/guestfish-actions.pod:4456
15258 msgid "This returns the filesystem UUID of the filesystem on C<device>."
15262 #: ../src/guestfs-actions.pod:6672 ../fish/guestfish-actions.pod:4459
15263 msgid "If the filesystem does not have a UUID, this returns the empty string."
15267 #: ../src/guestfs-actions.pod:6674
15268 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
15272 #: ../src/guestfs-actions.pod:6681
15273 msgid "guestfs_vg_activate"
15277 #: ../src/guestfs-actions.pod:6683
15281 " guestfs_vg_activate (guestfs_h *g,\n"
15283 " char *const *volgroups);\n"
15288 #: ../src/guestfs-actions.pod:6688 ../fish/guestfish-actions.pod:4467
15290 "This command activates or (if C<activate> is false) deactivates all logical "
15291 "volumes in the listed volume groups C<volgroups>. If activated, then they "
15292 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
15293 "deactivated, then those devices disappear."
15297 #: ../src/guestfs-actions.pod:6694 ../fish/guestfish-actions.pod:4473
15298 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
15302 #: ../src/guestfs-actions.pod:6696 ../fish/guestfish-actions.pod:4475
15304 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
15305 "activated or deactivated."
15309 #: ../src/guestfs-actions.pod:6703
15310 msgid "guestfs_vg_activate_all"
15314 #: ../src/guestfs-actions.pod:6705
15318 " guestfs_vg_activate_all (guestfs_h *g,\n"
15319 " int activate);\n"
15324 #: ../src/guestfs-actions.pod:6709 ../fish/guestfish-actions.pod:4482
15326 "This command activates or (if C<activate> is false) deactivates all logical "
15327 "volumes in all volume groups. If activated, then they are made known to the "
15328 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
15329 "those devices disappear."
15333 #: ../src/guestfs-actions.pod:6715 ../fish/guestfish-actions.pod:4488
15334 msgid "This command is the same as running C<vgchange -a y|n>"
15338 #: ../src/guestfs-actions.pod:6721
15339 msgid "guestfs_vgcreate"
15343 #: ../src/guestfs-actions.pod:6723
15347 " guestfs_vgcreate (guestfs_h *g,\n"
15348 " const char *volgroup,\n"
15349 " char *const *physvols);\n"
15354 #: ../src/guestfs-actions.pod:6728 ../fish/guestfish-actions.pod:4494
15356 "This creates an LVM volume group called C<volgroup> from the non-empty list "
15357 "of physical volumes C<physvols>."
15361 #: ../src/guestfs-actions.pod:6735
15362 msgid "guestfs_vglvuuids"
15366 #: ../src/guestfs-actions.pod:6737
15370 " guestfs_vglvuuids (guestfs_h *g,\n"
15371 " const char *vgname);\n"
15376 #: ../src/guestfs-actions.pod:6741 ../fish/guestfish-actions.pod:4501
15378 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
15379 "volumes created in this volume group."
15383 #: ../src/guestfs-actions.pod:6744
15385 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
15386 "associate logical volumes and volume groups."
15390 #: ../src/guestfs-actions.pod:6747
15391 msgid "See also C<guestfs_vgpvuuids>."
15395 #: ../src/guestfs-actions.pod:6755
15396 msgid "guestfs_vgpvuuids"
15400 #: ../src/guestfs-actions.pod:6757
15404 " guestfs_vgpvuuids (guestfs_h *g,\n"
15405 " const char *vgname);\n"
15410 #: ../src/guestfs-actions.pod:6761 ../fish/guestfish-actions.pod:4513
15412 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
15413 "volumes that this volume group resides on."
15417 #: ../src/guestfs-actions.pod:6764
15419 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
15420 "associate physical volumes and volume groups."
15424 #: ../src/guestfs-actions.pod:6767
15425 msgid "See also C<guestfs_vglvuuids>."
15429 #: ../src/guestfs-actions.pod:6775
15430 msgid "guestfs_vgremove"
15434 #: ../src/guestfs-actions.pod:6777
15438 " guestfs_vgremove (guestfs_h *g,\n"
15439 " const char *vgname);\n"
15444 #: ../src/guestfs-actions.pod:6781 ../fish/guestfish-actions.pod:4525
15445 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
15449 #: ../src/guestfs-actions.pod:6783 ../fish/guestfish-actions.pod:4527
15450 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
15454 #: ../src/guestfs-actions.pod:6790
15455 msgid "guestfs_vgrename"
15459 #: ../src/guestfs-actions.pod:6792
15463 " guestfs_vgrename (guestfs_h *g,\n"
15464 " const char *volgroup,\n"
15465 " const char *newvolgroup);\n"
15470 #: ../src/guestfs-actions.pod:6797 ../fish/guestfish-actions.pod:4534
15471 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
15475 #: ../src/guestfs-actions.pod:6803
15476 msgid "guestfs_vgs"
15480 #: ../src/guestfs-actions.pod:6805
15484 " guestfs_vgs (guestfs_h *g);\n"
15489 #: ../src/guestfs-actions.pod:6808 ../fish/guestfish-actions.pod:4540
15491 "List all the volumes groups detected. This is the equivalent of the "
15492 "L<vgs(8)> command."
15496 #: ../src/guestfs-actions.pod:6811 ../fish/guestfish-actions.pod:4543
15498 "This returns a list of just the volume group names that were detected "
15499 "(eg. C<VolGroup00>)."
15503 #: ../src/guestfs-actions.pod:6814
15504 msgid "See also C<guestfs_vgs_full>."
15508 #: ../src/guestfs-actions.pod:6822
15509 msgid "guestfs_vgs_full"
15513 #: ../src/guestfs-actions.pod:6824
15516 " struct guestfs_lvm_vg_list *\n"
15517 " guestfs_vgs_full (guestfs_h *g);\n"
15522 #: ../src/guestfs-actions.pod:6827 ../fish/guestfish-actions.pod:4552
15524 "List all the volumes groups detected. This is the equivalent of the "
15525 "L<vgs(8)> command. The \"full\" version includes all fields."
15529 #: ../src/guestfs-actions.pod:6830
15531 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
15532 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after "
15537 #: ../src/guestfs-actions.pod:6836
15538 msgid "guestfs_vgscan"
15542 #: ../src/guestfs-actions.pod:6838
15546 " guestfs_vgscan (guestfs_h *g);\n"
15551 #: ../src/guestfs-actions.pod:6841 ../fish/guestfish-actions.pod:4559
15553 "This rescans all block devices and rebuilds the list of LVM physical "
15554 "volumes, volume groups and logical volumes."
15558 #: ../src/guestfs-actions.pod:6848
15559 msgid "guestfs_vguuid"
15563 #: ../src/guestfs-actions.pod:6850
15567 " guestfs_vguuid (guestfs_h *g,\n"
15568 " const char *vgname);\n"
15573 #: ../src/guestfs-actions.pod:6854 ../fish/guestfish-actions.pod:4566
15574 msgid "This command returns the UUID of the LVM VG named C<vgname>."
15578 #: ../src/guestfs-actions.pod:6861
15579 msgid "guestfs_wait_ready"
15583 #: ../src/guestfs-actions.pod:6863
15587 " guestfs_wait_ready (guestfs_h *g);\n"
15592 #: ../src/guestfs-actions.pod:6866
15593 msgid "This function is a no op."
15597 #: ../src/guestfs-actions.pod:6868
15599 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
15600 "calling C<guestfs_launch> to wait for the launch to complete. However this "
15601 "is no longer necessary because C<guestfs_launch> now does the waiting."
15605 #: ../src/guestfs-actions.pod:6873
15607 "If you see any calls to this function in code then you can just remove them, "
15608 "unless you want to retain compatibility with older versions of the API."
15612 #: ../src/guestfs-actions.pod:6881
15613 msgid "guestfs_wc_c"
15617 #: ../src/guestfs-actions.pod:6883
15621 " guestfs_wc_c (guestfs_h *g,\n"
15622 " const char *path);\n"
15627 #: ../src/guestfs-actions.pod:6887 ../fish/guestfish-actions.pod:4572
15629 "This command counts the characters in a file, using the C<wc -c> external "
15634 #: ../src/guestfs-actions.pod:6894
15635 msgid "guestfs_wc_l"
15639 #: ../src/guestfs-actions.pod:6896
15643 " guestfs_wc_l (guestfs_h *g,\n"
15644 " const char *path);\n"
15649 #: ../src/guestfs-actions.pod:6900 ../fish/guestfish-actions.pod:4579
15651 "This command counts the lines in a file, using the C<wc -l> external "
15656 #: ../src/guestfs-actions.pod:6907
15657 msgid "guestfs_wc_w"
15661 #: ../src/guestfs-actions.pod:6909
15665 " guestfs_wc_w (guestfs_h *g,\n"
15666 " const char *path);\n"
15671 #: ../src/guestfs-actions.pod:6913 ../fish/guestfish-actions.pod:4586
15673 "This command counts the words in a file, using the C<wc -w> external "
15678 #: ../src/guestfs-actions.pod:6920
15679 msgid "guestfs_write"
15683 #: ../src/guestfs-actions.pod:6922
15687 " guestfs_write (guestfs_h *g,\n"
15688 " const char *path,\n"
15689 " const char *content,\n"
15690 " size_t content_size);\n"
15695 #: ../src/guestfs-actions.pod:6928 ../fish/guestfish-actions.pod:4593
15697 "This call creates a file called C<path>. The content of the file is the "
15698 "string C<content> (which can contain any 8 bit data)."
15702 #: ../src/guestfs-actions.pod:6938
15703 msgid "guestfs_write_file"
15707 #: ../src/guestfs-actions.pod:6940
15711 " guestfs_write_file (guestfs_h *g,\n"
15712 " const char *path,\n"
15713 " const char *content,\n"
15719 #: ../src/guestfs-actions.pod:6946 ../fish/guestfish-actions.pod:4603
15721 "This call creates a file called C<path>. The contents of the file is the "
15722 "string C<content> (which can contain any 8 bit data), with length C<size>."
15726 #: ../src/guestfs-actions.pod:6950 ../fish/guestfish-actions.pod:4607
15728 "As a special case, if C<size> is C<0> then the length is calculated using "
15729 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
15733 #: ../src/guestfs-actions.pod:6954 ../fish/guestfish-actions.pod:4611
15735 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
15736 "I<not> work, even if the length is specified."
15740 #: ../src/guestfs-actions.pod:6962 ../fish/guestfish-actions.pod:4617
15741 msgid "This function is deprecated. In new code, use the C<write> call instead."
15745 #: ../src/guestfs-actions.pod:6971
15746 msgid "guestfs_zegrep"
15750 #: ../src/guestfs-actions.pod:6973
15754 " guestfs_zegrep (guestfs_h *g,\n"
15755 " const char *regex,\n"
15756 " const char *path);\n"
15761 #: ../src/guestfs-actions.pod:6978 ../fish/guestfish-actions.pod:4628
15762 msgid "This calls the external C<zegrep> program and returns the matching lines."
15766 #: ../src/guestfs-actions.pod:6990
15767 msgid "guestfs_zegrepi"
15771 #: ../src/guestfs-actions.pod:6992
15775 " guestfs_zegrepi (guestfs_h *g,\n"
15776 " const char *regex,\n"
15777 " const char *path);\n"
15782 #: ../src/guestfs-actions.pod:6997 ../fish/guestfish-actions.pod:4638
15783 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
15787 #: ../src/guestfs-actions.pod:7009
15788 msgid "guestfs_zero"
15792 #: ../src/guestfs-actions.pod:7011
15796 " guestfs_zero (guestfs_h *g,\n"
15797 " const char *device);\n"
15802 #: ../src/guestfs-actions.pod:7015 ../fish/guestfish-actions.pod:4648
15803 msgid "This command writes zeroes over the first few blocks of C<device>."
15807 #: ../src/guestfs-actions.pod:7017 ../fish/guestfish-actions.pod:4650
15809 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
15810 "securely wipe the device). It should be sufficient to remove any partition "
15811 "tables, filesystem superblocks and so on."
15815 #: ../src/guestfs-actions.pod:7021
15816 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
15820 #: ../src/guestfs-actions.pod:7032
15821 msgid "guestfs_zero_device"
15825 #: ../src/guestfs-actions.pod:7034
15829 " guestfs_zero_device (guestfs_h *g,\n"
15830 " const char *device);\n"
15835 #: ../src/guestfs-actions.pod:7038
15837 "This command writes zeroes over the entire C<device>. Compare with "
15838 "C<guestfs_zero> which just zeroes the first few blocks of a device."
15842 #: ../src/guestfs-actions.pod:7052
15843 msgid "(Added in 1.3.1)"
15847 #: ../src/guestfs-actions.pod:7054
15848 msgid "guestfs_zerofree"
15852 #: ../src/guestfs-actions.pod:7056
15856 " guestfs_zerofree (guestfs_h *g,\n"
15857 " const char *device);\n"
15862 #: ../src/guestfs-actions.pod:7060 ../fish/guestfish-actions.pod:4671
15864 "This runs the I<zerofree> program on C<device>. This program claims to zero "
15865 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
15866 "possible to compress the filesystem more effectively."
15870 #: ../src/guestfs-actions.pod:7065 ../fish/guestfish-actions.pod:4676
15871 msgid "You should B<not> run this program if the filesystem is mounted."
15875 #: ../src/guestfs-actions.pod:7068 ../fish/guestfish-actions.pod:4679
15877 "It is possible that using this program can damage the filesystem or data on "
15882 #: ../src/guestfs-actions.pod:7075
15883 msgid "guestfs_zfgrep"
15887 #: ../src/guestfs-actions.pod:7077
15891 " guestfs_zfgrep (guestfs_h *g,\n"
15892 " const char *pattern,\n"
15893 " const char *path);\n"
15898 #: ../src/guestfs-actions.pod:7082 ../fish/guestfish-actions.pod:4686
15899 msgid "This calls the external C<zfgrep> program and returns the matching lines."
15903 #: ../src/guestfs-actions.pod:7094
15904 msgid "guestfs_zfgrepi"
15908 #: ../src/guestfs-actions.pod:7096
15912 " guestfs_zfgrepi (guestfs_h *g,\n"
15913 " const char *pattern,\n"
15914 " const char *path);\n"
15919 #: ../src/guestfs-actions.pod:7101 ../fish/guestfish-actions.pod:4696
15920 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
15924 #: ../src/guestfs-actions.pod:7113
15925 msgid "guestfs_zfile"
15929 #: ../src/guestfs-actions.pod:7115
15933 " guestfs_zfile (guestfs_h *g,\n"
15934 " const char *meth,\n"
15935 " const char *path);\n"
15940 #: ../src/guestfs-actions.pod:7120 ../fish/guestfish-actions.pod:4706
15941 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
15945 #: ../src/guestfs-actions.pod:7123 ../fish/guestfish-actions.pod:4709
15946 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
15950 #: ../src/guestfs-actions.pod:7125
15952 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
15957 #: ../src/guestfs-actions.pod:7131 ../fish/guestfish-actions.pod:4714
15958 msgid "This function is deprecated. In new code, use the C<file> call instead."
15962 #: ../src/guestfs-actions.pod:7140
15963 msgid "guestfs_zgrep"
15967 #: ../src/guestfs-actions.pod:7142
15971 " guestfs_zgrep (guestfs_h *g,\n"
15972 " const char *regex,\n"
15973 " const char *path);\n"
15978 #: ../src/guestfs-actions.pod:7147 ../fish/guestfish-actions.pod:4725
15979 msgid "This calls the external C<zgrep> program and returns the matching lines."
15983 #: ../src/guestfs-actions.pod:7159
15984 msgid "guestfs_zgrepi"
15988 #: ../src/guestfs-actions.pod:7161
15992 " guestfs_zgrepi (guestfs_h *g,\n"
15993 " const char *regex,\n"
15994 " const char *path);\n"
15999 #: ../src/guestfs-actions.pod:7166 ../fish/guestfish-actions.pod:4735
16000 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
16004 #: ../src/guestfs-availability.pod:3
16009 #: ../src/guestfs-availability.pod:5
16011 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
16012 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
16013 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
16014 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
16015 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
16019 #: ../src/guestfs-availability.pod:21
16024 #: ../src/guestfs-availability.pod:23
16026 "The following functions: L</guestfs_inotify_add_watch> "
16027 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
16028 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
16032 #: ../src/guestfs-availability.pod:31
16033 msgid "B<linuxfsuuid>"
16037 #: ../src/guestfs-availability.pod:33
16039 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
16040 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
16044 #: ../src/guestfs-availability.pod:40
16045 msgid "B<linuxmodules>"
16049 #: ../src/guestfs-availability.pod:42
16050 msgid "The following functions: L</guestfs_modprobe>"
16054 #: ../src/guestfs-availability.pod:45
16055 msgid "B<linuxxattrs>"
16059 #: ../src/guestfs-availability.pod:47
16061 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> "
16062 "L</guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> "
16063 "L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> "
16064 "L</guestfs_setxattr>"
16068 #: ../src/guestfs-availability.pod:58
16073 #: ../src/guestfs-availability.pod:60
16075 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
16076 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
16077 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
16081 #: ../src/guestfs-availability.pod:69
16086 #: ../src/guestfs-availability.pod:71
16088 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
16089 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
16090 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
16091 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
16092 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
16093 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
16094 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
16095 "L</guestfs_vgs_full>"
16099 #: ../src/guestfs-availability.pod:94
16104 #: ../src/guestfs-availability.pod:96
16106 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
16107 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
16111 #: ../src/guestfs-availability.pod:102
16116 #: ../src/guestfs-availability.pod:104
16117 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
16121 #: ../src/guestfs-availability.pod:107
16122 msgid "B<ntfsprogs>"
16126 #: ../src/guestfs-availability.pod:109
16127 msgid "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
16131 #: ../src/guestfs-availability.pod:113
16132 msgid "B<realpath>"
16136 #: ../src/guestfs-availability.pod:115
16137 msgid "The following functions: L</guestfs_realpath>"
16141 #: ../src/guestfs-availability.pod:118
16146 #: ../src/guestfs-availability.pod:120
16148 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
16149 "L</guestfs_scrub_freespace>"
16153 #: ../src/guestfs-availability.pod:125
16158 #: ../src/guestfs-availability.pod:127
16159 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
16163 #: ../src/guestfs-availability.pod:131
16168 #: ../src/guestfs-availability.pod:133
16169 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
16173 #: ../src/guestfs-availability.pod:137
16174 msgid "B<zerofree>"
16178 #: ../src/guestfs-availability.pod:139
16179 msgid "The following functions: L</guestfs_zerofree>"
16183 #: ../src/guestfs-structs.pod:1
16184 msgid "guestfs_int_bool"
16188 #: ../src/guestfs-structs.pod:3
16191 " struct guestfs_int_bool {\n"
16199 #: ../src/guestfs-structs.pod:8
16202 " struct guestfs_int_bool_list {\n"
16203 " uint32_t len; /* Number of elements in list. */\n"
16204 " struct guestfs_int_bool *val; /* Elements. */\n"
16210 #: ../src/guestfs-structs.pod:13
16213 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
16214 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
16219 #: ../src/guestfs-structs.pod:16
16220 msgid "guestfs_lvm_pv"
16224 #: ../src/guestfs-structs.pod:18
16227 " struct guestfs_lvm_pv {\n"
16228 " char *pv_name;\n"
16229 " /* The next field is NOT nul-terminated, be careful when printing it: "
16231 " char pv_uuid[32];\n"
16233 " uint64_t pv_size;\n"
16234 " uint64_t dev_size;\n"
16235 " uint64_t pv_free;\n"
16236 " uint64_t pv_used;\n"
16237 " char *pv_attr;\n"
16238 " int64_t pv_pe_count;\n"
16239 " int64_t pv_pe_alloc_count;\n"
16240 " char *pv_tags;\n"
16241 " uint64_t pe_start;\n"
16242 " int64_t pv_mda_count;\n"
16243 " uint64_t pv_mda_free;\n"
16249 #: ../src/guestfs-structs.pod:36
16252 " struct guestfs_lvm_pv_list {\n"
16253 " uint32_t len; /* Number of elements in list. */\n"
16254 " struct guestfs_lvm_pv *val; /* Elements. */\n"
16260 #: ../src/guestfs-structs.pod:41
16263 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
16264 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
16269 #: ../src/guestfs-structs.pod:44
16270 msgid "guestfs_lvm_vg"
16274 #: ../src/guestfs-structs.pod:46
16277 " struct guestfs_lvm_vg {\n"
16278 " char *vg_name;\n"
16279 " /* The next field is NOT nul-terminated, be careful when printing it: "
16281 " char vg_uuid[32];\n"
16283 " char *vg_attr;\n"
16284 " uint64_t vg_size;\n"
16285 " uint64_t vg_free;\n"
16286 " char *vg_sysid;\n"
16287 " uint64_t vg_extent_size;\n"
16288 " int64_t vg_extent_count;\n"
16289 " int64_t vg_free_count;\n"
16290 " int64_t max_lv;\n"
16291 " int64_t max_pv;\n"
16292 " int64_t pv_count;\n"
16293 " int64_t lv_count;\n"
16294 " int64_t snap_count;\n"
16295 " int64_t vg_seqno;\n"
16296 " char *vg_tags;\n"
16297 " int64_t vg_mda_count;\n"
16298 " uint64_t vg_mda_free;\n"
16304 #: ../src/guestfs-structs.pod:69
16307 " struct guestfs_lvm_vg_list {\n"
16308 " uint32_t len; /* Number of elements in list. */\n"
16309 " struct guestfs_lvm_vg *val; /* Elements. */\n"
16315 #: ../src/guestfs-structs.pod:74
16318 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
16319 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
16324 #: ../src/guestfs-structs.pod:77
16325 msgid "guestfs_lvm_lv"
16329 #: ../src/guestfs-structs.pod:79
16332 " struct guestfs_lvm_lv {\n"
16333 " char *lv_name;\n"
16334 " /* The next field is NOT nul-terminated, be careful when printing it: "
16336 " char lv_uuid[32];\n"
16337 " char *lv_attr;\n"
16338 " int64_t lv_major;\n"
16339 " int64_t lv_minor;\n"
16340 " int64_t lv_kernel_major;\n"
16341 " int64_t lv_kernel_minor;\n"
16342 " uint64_t lv_size;\n"
16343 " int64_t seg_count;\n"
16345 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
16346 " float snap_percent;\n"
16347 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
16348 " float copy_percent;\n"
16349 " char *move_pv;\n"
16350 " char *lv_tags;\n"
16351 " char *mirror_log;\n"
16352 " char *modules;\n"
16358 #: ../src/guestfs-structs.pod:101
16361 " struct guestfs_lvm_lv_list {\n"
16362 " uint32_t len; /* Number of elements in list. */\n"
16363 " struct guestfs_lvm_lv *val; /* Elements. */\n"
16369 #: ../src/guestfs-structs.pod:106
16372 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
16373 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
16378 #: ../src/guestfs-structs.pod:111
16381 " struct guestfs_stat {\n"
16385 " int64_t nlink;\n"
16390 " int64_t blksize;\n"
16391 " int64_t blocks;\n"
16392 " int64_t atime;\n"
16393 " int64_t mtime;\n"
16394 " int64_t ctime;\n"
16400 #: ../src/guestfs-structs.pod:127
16403 " struct guestfs_stat_list {\n"
16404 " uint32_t len; /* Number of elements in list. */\n"
16405 " struct guestfs_stat *val; /* Elements. */\n"
16411 #: ../src/guestfs-structs.pod:132
16414 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
16415 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
16420 #: ../src/guestfs-structs.pod:137
16423 " struct guestfs_statvfs {\n"
16424 " int64_t bsize;\n"
16425 " int64_t frsize;\n"
16426 " int64_t blocks;\n"
16427 " int64_t bfree;\n"
16428 " int64_t bavail;\n"
16429 " int64_t files;\n"
16430 " int64_t ffree;\n"
16431 " int64_t favail;\n"
16434 " int64_t namemax;\n"
16440 #: ../src/guestfs-structs.pod:151
16443 " struct guestfs_statvfs_list {\n"
16444 " uint32_t len; /* Number of elements in list. */\n"
16445 " struct guestfs_statvfs *val; /* Elements. */\n"
16451 #: ../src/guestfs-structs.pod:156
16454 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
16455 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
16460 #: ../src/guestfs-structs.pod:159
16461 msgid "guestfs_dirent"
16465 #: ../src/guestfs-structs.pod:161
16468 " struct guestfs_dirent {\n"
16477 #: ../src/guestfs-structs.pod:167
16480 " struct guestfs_dirent_list {\n"
16481 " uint32_t len; /* Number of elements in list. */\n"
16482 " struct guestfs_dirent *val; /* Elements. */\n"
16488 #: ../src/guestfs-structs.pod:172
16491 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
16492 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
16497 #: ../src/guestfs-structs.pod:177
16500 " struct guestfs_version {\n"
16501 " int64_t major;\n"
16502 " int64_t minor;\n"
16503 " int64_t release;\n"
16510 #: ../src/guestfs-structs.pod:184
16513 " struct guestfs_version_list {\n"
16514 " uint32_t len; /* Number of elements in list. */\n"
16515 " struct guestfs_version *val; /* Elements. */\n"
16521 #: ../src/guestfs-structs.pod:189
16524 " void guestfs_free_version (struct guestfs_free_version *);\n"
16525 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
16530 #: ../src/guestfs-structs.pod:192
16531 msgid "guestfs_xattr"
16535 #: ../src/guestfs-structs.pod:194
16538 " struct guestfs_xattr {\n"
16539 " char *attrname;\n"
16540 " /* The next two fields describe a byte array. */\n"
16541 " uint32_t attrval_len;\n"
16542 " char *attrval;\n"
16548 #: ../src/guestfs-structs.pod:201
16551 " struct guestfs_xattr_list {\n"
16552 " uint32_t len; /* Number of elements in list. */\n"
16553 " struct guestfs_xattr *val; /* Elements. */\n"
16559 #: ../src/guestfs-structs.pod:206
16562 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
16563 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
16568 #: ../src/guestfs-structs.pod:209
16569 msgid "guestfs_inotify_event"
16573 #: ../src/guestfs-structs.pod:211
16576 " struct guestfs_inotify_event {\n"
16577 " int64_t in_wd;\n"
16578 " uint32_t in_mask;\n"
16579 " uint32_t in_cookie;\n"
16580 " char *in_name;\n"
16586 #: ../src/guestfs-structs.pod:218
16589 " struct guestfs_inotify_event_list {\n"
16590 " uint32_t len; /* Number of elements in list. */\n"
16591 " struct guestfs_inotify_event *val; /* Elements. */\n"
16597 #: ../src/guestfs-structs.pod:223
16600 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
16601 " void guestfs_free_inotify_event_list (struct "
16602 "guestfs_free_inotify_event_list *);\n"
16607 #: ../src/guestfs-structs.pod:226
16608 msgid "guestfs_partition"
16612 #: ../src/guestfs-structs.pod:228
16615 " struct guestfs_partition {\n"
16616 " int32_t part_num;\n"
16617 " uint64_t part_start;\n"
16618 " uint64_t part_end;\n"
16619 " uint64_t part_size;\n"
16625 #: ../src/guestfs-structs.pod:235
16628 " struct guestfs_partition_list {\n"
16629 " uint32_t len; /* Number of elements in list. */\n"
16630 " struct guestfs_partition *val; /* Elements. */\n"
16636 #: ../src/guestfs-structs.pod:240
16639 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
16640 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
16645 #: ../src/guestfs-structs.pod:243
16646 msgid "guestfs_application"
16650 #: ../src/guestfs-structs.pod:245
16653 " struct guestfs_application {\n"
16654 " char *app_name;\n"
16655 " char *app_display_name;\n"
16656 " int32_t app_epoch;\n"
16657 " char *app_version;\n"
16658 " char *app_release;\n"
16659 " char *app_install_path;\n"
16660 " char *app_trans_path;\n"
16661 " char *app_publisher;\n"
16662 " char *app_url;\n"
16663 " char *app_source_package;\n"
16664 " char *app_summary;\n"
16665 " char *app_description;\n"
16671 #: ../src/guestfs-structs.pod:260
16674 " struct guestfs_application_list {\n"
16675 " uint32_t len; /* Number of elements in list. */\n"
16676 " struct guestfs_application *val; /* Elements. */\n"
16682 #: ../src/guestfs-structs.pod:265
16685 " void guestfs_free_application (struct guestfs_free_application *);\n"
16686 " void guestfs_free_application_list (struct guestfs_free_application_list "
16692 #: ../fish/guestfish.pod:5
16693 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
16697 #: ../fish/guestfish.pod:9
16700 " guestfish [--options] [commands]\n"
16705 #: ../fish/guestfish.pod:11
16713 #: ../fish/guestfish.pod:13
16716 " guestfish [--ro|--rw] -a disk.img\n"
16721 #: ../fish/guestfish.pod:15
16724 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
16729 #: ../fish/guestfish.pod:17
16732 " guestfish -d libvirt-domain\n"
16737 #: ../fish/guestfish.pod:19
16740 " guestfish [--ro|--rw] -a disk.img -i\n"
16745 #: ../fish/guestfish.pod:21
16748 " guestfish -d libvirt-domain -i\n"
16753 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15
16758 #: ../fish/guestfish.pod:25
16760 "Using guestfish in read/write mode on live virtual machines can be "
16761 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
16762 "option to use guestfish safely if the disk image or virtual machine might be "
16767 #: ../fish/guestfish.pod:32
16769 "Guestfish is a shell and command-line tool for examining and modifying "
16770 "virtual machine filesystems. It uses libguestfs and exposes all of the "
16771 "functionality of the guestfs API, see L<guestfs(3)>."
16775 #: ../fish/guestfish.pod:36
16777 "Guestfish gives you structured access to the libguestfs API, from shell "
16778 "scripts or the command line or interactively. If you want to rescue a "
16779 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
16784 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:897 ../fuse/guestmount.pod:39
16789 #: ../fish/guestfish.pod:43
16790 msgid "As an interactive shell"
16794 #: ../fish/guestfish.pod:45
16802 #: ../fish/guestfish.pod:47
16805 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
16806 " editing virtual machine filesystems.\n"
16811 #: ../fish/guestfish.pod:50
16814 " Type: 'help' for a list of commands\n"
16815 " 'man' to read the manual\n"
16816 " 'quit' to quit the shell\n"
16821 #: ../fish/guestfish.pod:54
16824 " ><fs> add-ro disk.img\n"
16826 " ><fs> list-filesystems\n"
16827 " /dev/sda1: ext4\n"
16828 " /dev/vg_guest/lv_root: ext4\n"
16829 " /dev/vg_guest/lv_swap: swap\n"
16830 " ><fs> mount /dev/vg_guest/lv_root /\n"
16831 " ><fs> cat /etc/fstab\n"
16833 " # Created by anaconda\n"
16840 #: ../fish/guestfish.pod:67
16841 msgid "From shell scripts"
16845 #: ../fish/guestfish.pod:69
16846 msgid "Create a new C</etc/motd> file in a guest or disk image:"
16850 #: ../fish/guestfish.pod:71
16853 " guestfish <<_EOF_\n"
16856 " mount /dev/vg_guest/lv_root /\n"
16857 " write /etc/motd \"Welcome, new users\"\n"
16863 #: ../fish/guestfish.pod:78
16864 msgid "List the LVM logical volumes in a disk image:"
16868 #: ../fish/guestfish.pod:80
16871 " guestfish -a disk.img --ro <<_EOF_\n"
16879 #: ../fish/guestfish.pod:85
16880 msgid "List all the filesystems in a disk image:"
16884 #: ../fish/guestfish.pod:87
16887 " guestfish -a disk.img --ro <<_EOF_\n"
16889 " list-filesystems\n"
16895 #: ../fish/guestfish.pod:92
16896 msgid "On one command line"
16900 #: ../fish/guestfish.pod:94
16901 msgid "Update C</etc/resolv.conf> in a guest:"
16905 #: ../fish/guestfish.pod:96
16909 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
16910 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
16915 #: ../fish/guestfish.pod:100
16916 msgid "Edit C</boot/grub/grub.conf> interactively:"
16920 #: ../fish/guestfish.pod:102
16923 " guestfish --rw --add disk.img \\\n"
16924 " --mount /dev/vg_guest/lv_root \\\n"
16925 " --mount /dev/sda1:/boot \\\n"
16926 " edit /boot/grub/grub.conf\n"
16931 #: ../fish/guestfish.pod:107
16932 msgid "Mount disks automatically"
16936 #: ../fish/guestfish.pod:109
16938 "Use the I<-i> option to automatically mount the disks from a virtual "
16943 #: ../fish/guestfish.pod:112
16946 " guestfish --ro -a disk.img -i cat /etc/group\n"
16951 #: ../fish/guestfish.pod:114
16954 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
16959 #: ../fish/guestfish.pod:116
16960 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
16964 #: ../fish/guestfish.pod:118
16967 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
16972 #: ../fish/guestfish.pod:120
16973 msgid "As a script interpreter"
16977 #: ../fish/guestfish.pod:122
16978 msgid "Create a 100MB disk containing an ext2-formatted partition:"
16982 #: ../fish/guestfish.pod:124
16985 " #!/usr/bin/guestfish -f\n"
16986 " sparse test1.img 100M\n"
16988 " part-disk /dev/sda mbr\n"
16989 " mkfs ext2 /dev/sda1\n"
16994 #: ../fish/guestfish.pod:130
16995 msgid "Start with a prepared disk"
16999 #: ../fish/guestfish.pod:132
17001 "An alternate way to create a 100MB disk called C<test1.img> containing a "
17002 "single ext2-formatted partition:"
17006 #: ../fish/guestfish.pod:135
17009 " guestfish -N fs\n"
17014 #: ../fish/guestfish.pod:137
17015 msgid "To list what is available do:"
17019 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:888
17022 " guestfish -N help | less\n"
17027 #: ../fish/guestfish.pod:141
17028 msgid "Remote control"
17032 #: ../fish/guestfish.pod:143
17035 " eval \"`guestfish --listen`\"\n"
17036 " guestfish --remote add-ro disk.img\n"
17037 " guestfish --remote run\n"
17038 " guestfish --remote lvs\n"
17043 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37 ../fuse/guestmount.pod:73
17048 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:131
17053 #: ../fish/guestfish.pod:154
17054 msgid "Displays general help on options."
17058 #: ../fish/guestfish.pod:156
17063 #: ../fish/guestfish.pod:158
17064 msgid "B<--cmd-help>"
17068 #: ../fish/guestfish.pod:160
17069 msgid "Lists all available guestfish commands."
17073 #: ../fish/guestfish.pod:162
17078 #: ../fish/guestfish.pod:164
17079 msgid "B<--cmd-help cmd>"
17083 #: ../fish/guestfish.pod:166
17084 msgid "Displays detailed help on a single command C<cmd>."
17088 #: ../fish/guestfish.pod:168
17089 msgid "B<-a image>"
17093 #: ../fish/guestfish.pod:170
17094 msgid "B<--add image>"
17098 #: ../fish/guestfish.pod:172
17099 msgid "Add a block device or virtual machine image to the shell."
17103 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:81
17105 "The format of the disk image is auto-detected. To override this and force a "
17106 "particular format use the I<--format=..> option."
17110 #: ../fish/guestfish.pod:177
17112 "Using this flag is mostly equivalent to using the C<add> command, with "
17113 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
17114 "the I<--format:...> flag was given."
17118 #: ../fish/guestfish.pod:181
17123 #: ../fish/guestfish.pod:183
17124 msgid "B<--connect URI>"
17128 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:86
17130 "When used in conjunction with the I<-d> option, this specifies the libvirt "
17131 "URI to use. The default is to use the default libvirt connection."
17135 #: ../fish/guestfish.pod:189
17140 #: ../fish/guestfish.pod:191
17142 "If using the I<--listen> option and a csh-like shell, use this option. See "
17143 "section L</REMOTE CONTROL AND CSH> below."
17147 #: ../fish/guestfish.pod:194
17148 msgid "B<-d libvirt-domain>"
17152 #: ../fish/guestfish.pod:196
17153 msgid "B<--domain libvirt-domain>"
17157 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:92
17159 "Add disks from the named libvirt domain. If the I<--ro> option is also "
17160 "used, then any libvirt domain can be used. However in write mode, only "
17161 "libvirt domains which are shut down can be named here."
17165 #: ../fish/guestfish.pod:202
17167 "Using this flag is mostly equivalent to using the C<add-domain> command, "
17168 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
17169 "if the I<--format:...> flag was given."
17173 #: ../fish/guestfish.pod:206
17178 #: ../fish/guestfish.pod:208
17179 msgid "B<--no-dest-paths>"
17183 #: ../fish/guestfish.pod:210
17185 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
17186 "to hit the tab key to complete paths on the guest filesystem, but this "
17187 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
17188 "allow this feature to be disabled."
17192 #: ../fish/guestfish.pod:215 ../fuse/guestmount.pod:108
17193 msgid "B<--echo-keys>"
17197 #: ../fish/guestfish.pod:217 ../fuse/guestmount.pod:110
17199 "When prompting for keys and passphrases, guestfish normally turns echoing "
17200 "off so you cannot see what you are typing. If you are not worried about "
17201 "Tempest attacks and there is no one else in the room you can specify this "
17202 "flag to see what you are typing."
17206 #: ../fish/guestfish.pod:222
17211 #: ../fish/guestfish.pod:224
17212 msgid "B<--file file>"
17216 #: ../fish/guestfish.pod:226
17217 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
17221 #: ../fish/guestfish.pod:229
17224 " #!/usr/bin/guestfish -f\n"
17229 #: ../fish/guestfish.pod:231
17230 msgid "B<--format=raw|qcow2|..>"
17234 #: ../fish/guestfish.pod:233
17235 msgid "B<--format>"
17239 #: ../fish/guestfish.pod:235 ../fuse/guestmount.pod:117
17241 "The default for the I<-a> option is to auto-detect the format of the disk "
17242 "image. Using this forces the disk format for I<-a> options which follow on "
17243 "the command line. Using I<--format> with no argument switches back to "
17244 "auto-detection for subsequent I<-a> options."
17248 #: ../fish/guestfish.pod:240 ../fish/guestfish.pod:594
17249 msgid "For example:"
17253 #: ../fish/guestfish.pod:242
17256 " guestfish --format=raw -a disk.img\n"
17261 #: ../fish/guestfish.pod:244
17262 msgid "forces raw format (no auto-detection) for C<disk.img>."
17266 #: ../fish/guestfish.pod:246
17269 " guestfish --format=raw -a disk.img --format -a another.img\n"
17274 #: ../fish/guestfish.pod:248
17276 "forces raw format (no auto-detection) for C<disk.img> and reverts to "
17277 "auto-detection for C<another.img>."
17281 #: ../fish/guestfish.pod:251
17283 "If you have untrusted raw-format guest disk images, you should use this "
17284 "option to specify the disk format. This avoids a possible security problem "
17285 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
17289 #: ../fish/guestfish.pod:256
17294 #: ../fish/guestfish.pod:258
17295 msgid "B<--inspector>"
17299 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:137
17301 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
17302 "system and mount filesystems as they would be mounted on the real virtual "
17307 #: ../fish/guestfish.pod:264
17308 msgid "Typical usage is either:"
17312 #: ../fish/guestfish.pod:266
17315 " guestfish -d myguest -i\n"
17320 #: ../fish/guestfish.pod:268
17321 msgid "(for an inactive libvirt domain called I<myguest>), or:"
17325 #: ../fish/guestfish.pod:270
17328 " guestfish --ro -d myguest -i\n"
17333 #: ../fish/guestfish.pod:272
17334 msgid "(for active domains, readonly), or specify the block device directly:"
17338 #: ../fish/guestfish.pod:274
17341 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
17346 #: ../fish/guestfish.pod:276
17348 "Note that the command line syntax changed slightly over older versions of "
17349 "guestfish. You can still use the old syntax:"
17353 #: ../fish/guestfish.pod:279
17356 " guestfish [--ro] -i disk.img\n"
17361 #: ../fish/guestfish.pod:281
17364 " guestfish [--ro] -i libvirt-domain\n"
17369 #: ../fish/guestfish.pod:283
17371 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
17372 "then using other commands to mount the filesystems that were found."
17376 #: ../fish/guestfish.pod:287 ../fuse/guestmount.pod:141
17377 msgid "B<--keys-from-stdin>"
17381 #: ../fish/guestfish.pod:289 ../fuse/guestmount.pod:143
17383 "Read key or passphrase parameters from stdin. The default is to try to read "
17384 "passphrases from the user by opening C</dev/tty>."
17388 #: ../fish/guestfish.pod:292
17389 msgid "B<--listen>"
17393 #: ../fish/guestfish.pod:294
17395 "Fork into the background and listen for remote commands. See section "
17396 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
17400 #: ../fish/guestfish.pod:297
17401 msgid "B<-m dev[:mountpoint]>"
17405 #: ../fish/guestfish.pod:299
17406 msgid "B<--mount dev[:mountpoint]>"
17410 #: ../fish/guestfish.pod:301
17411 msgid "Mount the named partition or logical volume on the given mountpoint."
17415 #: ../fish/guestfish.pod:303
17416 msgid "If the mountpoint is omitted, it defaults to C</>."
17420 #: ../fish/guestfish.pod:305
17421 msgid "You have to mount something on C</> before most commands will work."
17425 #: ../fish/guestfish.pod:307
17427 "If any I<-m> or I<--mount> options are given, the guest is automatically "
17432 #: ../fish/guestfish.pod:310
17434 "If you don't know what filesystems a disk image contains, you can either run "
17435 "guestfish without this option, then list the partitions, filesystems and LVs "
17436 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
17437 "commands), or you can use the L<virt-filesystems(1)> program."
17441 #: ../fish/guestfish.pod:316
17443 "Using this flag is mostly equivalent to using the C<mount-options> command "
17444 "or the C<mount-ro> command if the I<--ro> flag was given."
17448 #: ../fish/guestfish.pod:319
17453 #: ../fish/guestfish.pod:321
17454 msgid "B<--no-sync>"
17458 #: ../fish/guestfish.pod:323
17460 "Disable autosync. This is enabled by default. See the discussion of "
17461 "autosync in the L<guestfs(3)> manpage."
17465 #: ../fish/guestfish.pod:326
17470 #: ../fish/guestfish.pod:328
17471 msgid "B<--new type>"
17475 #: ../fish/guestfish.pod:330
17480 #: ../fish/guestfish.pod:332
17482 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
17483 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
17484 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
17489 #: ../fish/guestfish.pod:337
17490 msgid "B<--progress-bars>"
17494 #: ../fish/guestfish.pod:339
17495 msgid "Enable progress bars, even when guestfish is used non-interactively."
17499 #: ../fish/guestfish.pod:341
17501 "Progress bars are enabled by default when guestfish is used as an "
17502 "interactive shell."
17506 #: ../fish/guestfish.pod:344
17507 msgid "B<--no-progress-bars>"
17511 #: ../fish/guestfish.pod:346
17512 msgid "Disable progress bars."
17516 #: ../fish/guestfish.pod:348
17517 msgid "B<--remote[=pid]>"
17521 #: ../fish/guestfish.pod:350
17523 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
17524 "CONTROL GUESTFISH OVER A SOCKET> below."
17528 #: ../fish/guestfish.pod:353
17533 #: ../fish/guestfish.pod:355
17538 #: ../fish/guestfish.pod:357
17540 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
17541 "mounts are done read-only."
17545 #: ../fish/guestfish.pod:360
17547 "The option must always be used if the disk image or virtual machine might be "
17548 "running, and is generally recommended in cases where you don't need write "
17549 "access to the disk."
17553 #: ../fish/guestfish.pod:364
17555 "Note that prepared disk images created with I<-N> are not affected by this "
17556 "option. Also commands like C<add> are not affected - you have to specify "
17557 "the C<readonly:true> option explicitly if you need it."
17561 #: ../fish/guestfish.pod:368
17562 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
17566 #: ../fish/guestfish.pod:370 ../fuse/guestmount.pod:208
17567 msgid "B<--selinux>"
17571 #: ../fish/guestfish.pod:372
17572 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
17576 #: ../fish/guestfish.pod:374
17581 #: ../fish/guestfish.pod:376
17582 msgid "B<--verbose>"
17586 #: ../fish/guestfish.pod:378
17588 "Enable very verbose messages. This is particularly useful if you find a "
17593 #: ../fish/guestfish.pod:381
17598 #: ../fish/guestfish.pod:383
17599 msgid "B<--version>"
17603 #: ../fish/guestfish.pod:385
17604 msgid "Display the guestfish / libguestfs version number and exit."
17608 #: ../fish/guestfish.pod:387
17613 #: ../fish/guestfish.pod:389
17618 #: ../fish/guestfish.pod:391
17620 "This option does nothing at the moment. See L</OPENING DISKS FOR READ AND "
17625 #: ../fish/guestfish.pod:394
17630 #: ../fish/guestfish.pod:396
17631 msgid "Echo each command before executing it."
17635 #: ../fish/guestfish.pod:400
17636 msgid "COMMANDS ON COMMAND LINE"
17640 #: ../fish/guestfish.pod:402
17641 msgid "Any additional (non-option) arguments are treated as commands to execute."
17645 #: ../fish/guestfish.pod:405
17647 "Commands to execute should be separated by a colon (C<:>), where the colon "
17648 "is a separate parameter. Thus:"
17652 #: ../fish/guestfish.pod:408
17655 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
17660 #: ../fish/guestfish.pod:410
17662 "If there are no additional arguments, then we enter a shell, either an "
17663 "interactive shell with a prompt (if the input is a terminal) or a "
17664 "non-interactive shell."
17668 #: ../fish/guestfish.pod:414
17670 "In either command line mode or non-interactive shell, the first command that "
17671 "gives an error causes the whole shell to exit. In interactive mode (with a "
17672 "prompt) if a command fails, you can continue to enter commands."
17676 #: ../fish/guestfish.pod:419
17677 msgid "USING launch (OR run)"
17681 #: ../fish/guestfish.pod:421
17683 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
17684 "then launch it, then mount any disks you need, and finally issue "
17685 "actions/commands. So the general order of the day is:"
17689 #: ../fish/guestfish.pod:429
17690 msgid "add or -a/--add"
17694 #: ../fish/guestfish.pod:433
17695 msgid "launch (aka run)"
17699 #: ../fish/guestfish.pod:437
17700 msgid "mount or -m/--mount"
17704 #: ../fish/guestfish.pod:441
17705 msgid "any other commands"
17709 #: ../fish/guestfish.pod:445
17711 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
17712 "guest before mounting or performing any other commands."
17716 #: ../fish/guestfish.pod:448
17718 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
17719 "I<--new> options were given then C<run> is done automatically, simply "
17720 "because guestfish can't perform the action you asked for without doing this."
17724 #: ../fish/guestfish.pod:453
17725 msgid "OPENING DISKS FOR READ AND WRITE"
17729 #: ../fish/guestfish.pod:455
17731 "The guestfish (and L<guestmount(1)>) options I<--ro> and I<--rw> affect "
17732 "whether the other command line options I<-a>, I<-c>, I<-d>, I<-i> and I<-m> "
17733 "open disk images read-only or for writing."
17737 #: ../fish/guestfish.pod:459
17739 "In libguestfs E<lt> 1.6.2, guestfish and guestmount defaulted to opening "
17740 "disk images supplied on the command line for write. To open a disk image "
17741 "read-only you have to do I<-a image --ro>."
17745 #: ../fish/guestfish.pod:463
17747 "This matters: If you accidentally open a live VM disk image writable then "
17748 "you will cause irreversible disk corruption."
17752 #: ../fish/guestfish.pod:466
17754 "By libguestfs 1.8 we intend to change the default the other way. Disk "
17755 "images will be opened read-only. You will have to either specify "
17756 "I<guestfish --rw> or change a configuration file in order to get write "
17757 "access for disk images specified by those other command line options."
17761 #: ../fish/guestfish.pod:471
17763 "This version of guestfish has a I<--rw> option which does nothing (it is "
17764 "already the default). However it is highly recommended that you use this "
17765 "option to indicate that guestfish needs write access, and to prepare your "
17766 "scripts for the day when this option will be required for write access."
17770 #: ../fish/guestfish.pod:477
17772 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
17773 "other libguestfs program apart from guestfish and guestmount."
17777 #: ../fish/guestfish.pod:480
17782 #: ../fish/guestfish.pod:482
17784 "You can quote ordinary parameters using either single or double quotes. For "
17789 #: ../fish/guestfish.pod:485
17792 " add \"file with a space.img\"\n"
17797 #: ../fish/guestfish.pod:487
17800 " rm '/file name'\n"
17805 #: ../fish/guestfish.pod:489
17813 #: ../fish/guestfish.pod:491
17815 "A few commands require a list of strings to be passed. For these, use a "
17816 "whitespace-separated list, enclosed in quotes. Strings containing "
17817 "whitespace to be passed through must be enclosed in single quotes. A "
17818 "literal single quote must be escaped with a backslash."
17822 #: ../fish/guestfish.pod:496
17825 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
17826 " command \"/bin/echo 'foo bar'\"\n"
17827 " command \"/bin/echo \\'foo\\'\"\n"
17832 #: ../fish/guestfish.pod:500
17833 msgid "OPTIONAL ARGUMENTS"
17837 #: ../fish/guestfish.pod:502
17839 "Some commands take optional arguments. These arguments appear in this "
17840 "documentation as C<[argname:..]>. You can use them as in these examples:"
17844 #: ../fish/guestfish.pod:506
17847 " add-drive-opts filename\n"
17852 #: ../fish/guestfish.pod:508
17855 " add-drive-opts filename readonly:true\n"
17860 #: ../fish/guestfish.pod:510
17863 " add-drive-opts filename format:qcow2 readonly:false\n"
17868 #: ../fish/guestfish.pod:512
17870 "Each optional argument can appear at most once. All optional arguments must "
17871 "appear after the required ones."
17875 #: ../fish/guestfish.pod:515
17880 #: ../fish/guestfish.pod:517
17881 msgid "This section applies to all commands which can take integers as parameters."
17885 #: ../fish/guestfish.pod:520
17886 msgid "SIZE SUFFIX"
17890 #: ../fish/guestfish.pod:522
17892 "When the command takes a parameter measured in bytes, you can use one of the "
17893 "following suffixes to specify kilobytes, megabytes and larger sizes:"
17897 #: ../fish/guestfish.pod:528
17898 msgid "B<k> or B<K> or B<KiB>"
17902 #: ../fish/guestfish.pod:530
17903 msgid "The size in kilobytes (multiplied by 1024)."
17907 #: ../fish/guestfish.pod:532
17912 #: ../fish/guestfish.pod:534
17913 msgid "The size in SI 1000 byte units."
17917 #: ../fish/guestfish.pod:536
17918 msgid "B<M> or B<MiB>"
17922 #: ../fish/guestfish.pod:538
17923 msgid "The size in megabytes (multiplied by 1048576)."
17927 #: ../fish/guestfish.pod:540
17932 #: ../fish/guestfish.pod:542
17933 msgid "The size in SI 1000000 byte units."
17937 #: ../fish/guestfish.pod:544
17938 msgid "B<G> or B<GiB>"
17942 #: ../fish/guestfish.pod:546
17943 msgid "The size in gigabytes (multiplied by 2**30)."
17947 #: ../fish/guestfish.pod:548
17952 #: ../fish/guestfish.pod:550
17953 msgid "The size in SI 10**9 byte units."
17957 #: ../fish/guestfish.pod:552
17958 msgid "B<T> or B<TiB>"
17962 #: ../fish/guestfish.pod:554
17963 msgid "The size in terabytes (multiplied by 2**40)."
17967 #: ../fish/guestfish.pod:556
17972 #: ../fish/guestfish.pod:558
17973 msgid "The size in SI 10**12 byte units."
17977 #: ../fish/guestfish.pod:560
17978 msgid "B<P> or B<PiB>"
17982 #: ../fish/guestfish.pod:562
17983 msgid "The size in petabytes (multiplied by 2**50)."
17987 #: ../fish/guestfish.pod:564
17992 #: ../fish/guestfish.pod:566
17993 msgid "The size in SI 10**15 byte units."
17997 #: ../fish/guestfish.pod:568
17998 msgid "B<E> or B<EiB>"
18002 #: ../fish/guestfish.pod:570
18003 msgid "The size in exabytes (multiplied by 2**60)."
18007 #: ../fish/guestfish.pod:572
18012 #: ../fish/guestfish.pod:574
18013 msgid "The size in SI 10**18 byte units."
18017 #: ../fish/guestfish.pod:576
18018 msgid "B<Z> or B<ZiB>"
18022 #: ../fish/guestfish.pod:578
18023 msgid "The size in zettabytes (multiplied by 2**70)."
18027 #: ../fish/guestfish.pod:580
18032 #: ../fish/guestfish.pod:582
18033 msgid "The size in SI 10**21 byte units."
18037 #: ../fish/guestfish.pod:584
18038 msgid "B<Y> or B<YiB>"
18042 #: ../fish/guestfish.pod:586
18043 msgid "The size in yottabytes (multiplied by 2**80)."
18047 #: ../fish/guestfish.pod:588
18052 #: ../fish/guestfish.pod:590
18053 msgid "The size in SI 10**24 byte units."
18057 #: ../fish/guestfish.pod:596
18060 " truncate-size /file 1G\n"
18065 #: ../fish/guestfish.pod:598
18066 msgid "would truncate the file to 1 gigabyte."
18070 #: ../fish/guestfish.pod:600
18072 "Be careful because a few commands take sizes in kilobytes or megabytes "
18073 "(eg. the parameter to L</memsize> is specified in megabytes already). "
18074 "Adding a suffix will probably not do what you expect."
18078 #: ../fish/guestfish.pod:604
18079 msgid "OCTAL AND HEXADECIMAL NUMBERS"
18083 #: ../fish/guestfish.pod:606
18085 "For specifying the radix (base) use the C convention: C<0> to prefix an "
18086 "octal number or C<0x> to prefix a hexadecimal number. For example:"
18090 #: ../fish/guestfish.pod:609
18093 " 1234 decimal number 1234\n"
18094 " 02322 octal number, equivalent to decimal 1234\n"
18095 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
18100 #: ../fish/guestfish.pod:613
18102 "When using the C<chmod> command, you almost always want to specify an octal "
18103 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
18104 "L<chmod(1)> program):"
18108 #: ../fish/guestfish.pod:617
18111 " chmod 0777 /public # OK\n"
18112 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
18117 #: ../fish/guestfish.pod:620
18119 "Commands that return numbers usually print them in decimal, but some "
18120 "commands print numbers in other radices (eg. C<umask> prints the mode in "
18121 "octal, preceeded by C<0>)."
18125 #: ../fish/guestfish.pod:624
18126 msgid "WILDCARDS AND GLOBBING"
18130 #: ../fish/guestfish.pod:626
18132 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
18133 "(globbing) by default. So for example the following will not do what you "
18138 #: ../fish/guestfish.pod:630
18146 #: ../fish/guestfish.pod:632
18148 "Assuming you don't have a directory called literally C</home/*> then the "
18149 "above command will return an error."
18153 #: ../fish/guestfish.pod:635
18154 msgid "To perform wildcard expansion, use the C<glob> command."
18158 #: ../fish/guestfish.pod:637
18161 " glob rm-rf /home/*\n"
18166 #: ../fish/guestfish.pod:639
18168 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
18169 "many times), equivalent to:"
18173 #: ../fish/guestfish.pod:642
18176 " rm-rf /home/jim\n"
18177 " rm-rf /home/joe\n"
18178 " rm-rf /home/mary\n"
18183 #: ../fish/guestfish.pod:646
18184 msgid "C<glob> only works on simple guest paths and not on device names."
18188 #: ../fish/guestfish.pod:648
18190 "If you have several parameters, each containing a wildcard, then glob will "
18191 "perform a Cartesian product."
18195 #: ../fish/guestfish.pod:651
18200 #: ../fish/guestfish.pod:653
18202 "Any line which starts with a I<#> character is treated as a comment and "
18203 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
18204 "a command. For example:"
18208 #: ../fish/guestfish.pod:657
18211 " # this is a comment\n"
18212 " # this is a comment\n"
18213 " foo # NOT a comment\n"
18218 #: ../fish/guestfish.pod:661
18219 msgid "Blank lines are also ignored."
18223 #: ../fish/guestfish.pod:663
18224 msgid "RUNNING COMMANDS LOCALLY"
18228 #: ../fish/guestfish.pod:665
18230 "Any line which starts with a I<!> character is treated as a command sent to "
18231 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
18235 #: ../fish/guestfish.pod:669
18239 " tgz-out /remote local/remote-data.tar.gz\n"
18244 #: ../fish/guestfish.pod:672
18246 "will create a directory C<local> on the host, and then export the contents "
18247 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
18248 "(See C<tgz-out>)."
18252 #: ../fish/guestfish.pod:676
18254 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
18255 "effect, due to the way that subprocesses work in Unix."
18259 #: ../fish/guestfish.pod:679
18264 #: ../fish/guestfish.pod:681
18266 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
18267 "command (a guestfish command) to the second command (any host command). For "
18272 #: ../fish/guestfish.pod:685
18275 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
18280 #: ../fish/guestfish.pod:687
18282 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
18283 "program). The above command would list all accounts in the guest filesystem "
18284 "which have UID 0, ie. root accounts including backdoors. Other examples:"
18288 #: ../fish/guestfish.pod:692
18291 " hexdump /bin/ls | head\n"
18292 " list-devices | tail -1\n"
18293 " tgz-out / - | tar ztf -\n"
18298 #: ../fish/guestfish.pod:696
18300 "The space before the pipe symbol is required, any space after the pipe "
18301 "symbol is optional. Everything after the pipe symbol is just passed "
18302 "straight to the host shell, so it can contain redirections, globs and "
18303 "anything else that makes sense on the host side."
18307 #: ../fish/guestfish.pod:701
18309 "To use a literal argument which begins with a pipe symbol, you have to quote "
18314 #: ../fish/guestfish.pod:704
18322 #: ../fish/guestfish.pod:706
18323 msgid "HOME DIRECTORIES"
18327 #: ../fish/guestfish.pod:708
18329 "If a parameter starts with the character C<~> then the tilde may be expanded "
18330 "as a home directory path (either C<~> for the current user's home directory, "
18331 "or C<~user> for another user)."
18335 #: ../fish/guestfish.pod:712
18337 "Note that home directory expansion happens for users known I<on the host>, "
18338 "not in the guest filesystem."
18342 #: ../fish/guestfish.pod:715
18344 "To use a literal argument which begins with a tilde, you have to quote it, "
18349 #: ../fish/guestfish.pod:718
18357 #: ../fish/guestfish.pod:722
18359 "Libguestfs has some support for Linux guests encrypted according to the "
18360 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
18361 "disk encryption systems used by modern Linux guests. Currently only "
18362 "LVM-on-LUKS is supported."
18366 #: ../fish/guestfish.pod:727
18367 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
18371 #: ../fish/guestfish.pod:729
18374 " ><fs> vfs-type /dev/sda2\n"
18380 #: ../fish/guestfish.pod:732
18382 "Then open those devices using L</luks-open>. This creates a device-mapper "
18383 "device called C</dev/mapper/luksdev>."
18387 #: ../fish/guestfish.pod:735
18390 " ><fs> luks-open /dev/sda2 luksdev\n"
18391 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
18396 #: ../fish/guestfish.pod:738
18398 "Finally you have to tell LVM to scan for volume groups on the newly created "
18403 #: ../fish/guestfish.pod:741
18407 " vg-activate-all true\n"
18412 #: ../fish/guestfish.pod:744
18413 msgid "The logical volume(s) can now be mounted in the usual way."
18417 #: ../fish/guestfish.pod:746
18419 "Before closing a LUKS device you must unmount any logical volumes on it and "
18420 "deactivate the volume groups by calling C<vg-activate false VG> on each "
18421 "one. Then you can close the mapper device:"
18425 #: ../fish/guestfish.pod:750
18428 " vg-activate false /dev/VG\n"
18429 " luks-close /dev/mapper/luksdev\n"
18434 #: ../fish/guestfish.pod:753
18435 msgid "WINDOWS PATHS"
18439 #: ../fish/guestfish.pod:755
18441 "If a path is prefixed with C<win:> then you can use Windows-style paths "
18442 "(with some limitations). The following commands are equivalent:"
18446 #: ../fish/guestfish.pod:758
18449 " file /WINDOWS/system32/config/system.LOG\n"
18454 #: ../fish/guestfish.pod:760
18457 " file win:/windows/system32/config/system.log\n"
18462 #: ../fish/guestfish.pod:762
18465 " file win:\\windows\\system32\\config\\system.log\n"
18470 #: ../fish/guestfish.pod:764
18473 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
18478 #: ../fish/guestfish.pod:766
18480 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
18481 "handles case insensitivity like Windows would. This only works in argument "
18482 "positions that expect a path."
18486 #: ../fish/guestfish.pod:770
18487 msgid "UPLOADING AND DOWNLOADING FILES"
18491 #: ../fish/guestfish.pod:772
18493 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
18494 "others which upload from or download to a local file, you can use the "
18495 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
18499 #: ../fish/guestfish.pod:776
18507 #: ../fish/guestfish.pod:778
18508 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
18512 #: ../fish/guestfish.pod:781
18515 " tar-out /etc - | tar tf -\n"
18520 #: ../fish/guestfish.pod:783
18522 "writes the tarball to stdout and then pipes that into the external \"tar\" "
18523 "command (see L</PIPES>)."
18527 #: ../fish/guestfish.pod:786
18529 "When using C<-> to read from stdin, the input is read up to the end of "
18530 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
18531 "some arbitrary end marker:"
18535 #: ../fish/guestfish.pod:790
18538 " upload -<<END /foo\n"
18547 #: ../fish/guestfish.pod:796
18549 "Any string of characters can be used instead of C<END>. The end marker must "
18550 "appear on a line of its own, without any preceeding or following characters "
18551 "(not even spaces)."
18555 #: ../fish/guestfish.pod:800
18557 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
18558 "upload local files (so-called \"FileIn\" parameters in the generator)."
18562 #: ../fish/guestfish.pod:803
18563 msgid "EXIT ON ERROR BEHAVIOUR"
18567 #: ../fish/guestfish.pod:805
18569 "By default, guestfish will ignore any errors when in interactive mode "
18570 "(ie. taking commands from a human over a tty), and will exit on the first "
18571 "error in non-interactive mode (scripts, commands given on the command line)."
18575 #: ../fish/guestfish.pod:810
18577 "If you prefix a command with a I<-> character, then that command will not "
18578 "cause guestfish to exit, even if that (one) command returns an error."
18582 #: ../fish/guestfish.pod:814
18583 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
18587 #: ../fish/guestfish.pod:816
18589 "Guestfish can be remote-controlled over a socket. This is useful "
18590 "particularly in shell scripts where you want to make several different "
18591 "changes to a filesystem, but you don't want the overhead of starting up a "
18592 "guestfish process each time."
18596 #: ../fish/guestfish.pod:821
18597 msgid "Start a guestfish server process using:"
18601 #: ../fish/guestfish.pod:823
18604 " eval \"`guestfish --listen`\"\n"
18609 #: ../fish/guestfish.pod:825
18610 msgid "and then send it commands by doing:"
18614 #: ../fish/guestfish.pod:827
18617 " guestfish --remote cmd [...]\n"
18622 #: ../fish/guestfish.pod:829
18623 msgid "To cause the server to exit, send it the exit command:"
18627 #: ../fish/guestfish.pod:831
18630 " guestfish --remote exit\n"
18635 #: ../fish/guestfish.pod:833
18637 "Note that the server will normally exit if there is an error in a command. "
18638 "You can change this in the usual way. See section L</EXIT ON ERROR "
18643 #: ../fish/guestfish.pod:837
18644 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
18648 #: ../fish/guestfish.pod:839
18650 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
18651 "is how the I<--remote> option knows where to send the commands. You can "
18652 "have several guestfish listener processes running using:"
18656 #: ../fish/guestfish.pod:843
18659 " eval \"`guestfish --listen`\"\n"
18660 " pid1=$GUESTFISH_PID\n"
18661 " eval \"`guestfish --listen`\"\n"
18662 " pid2=$GUESTFISH_PID\n"
18664 " guestfish --remote=$pid1 cmd\n"
18665 " guestfish --remote=$pid2 cmd\n"
18670 #: ../fish/guestfish.pod:851
18671 msgid "REMOTE CONTROL AND CSH"
18675 #: ../fish/guestfish.pod:853
18677 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
18682 #: ../fish/guestfish.pod:856
18685 " eval \"`guestfish --listen --csh`\"\n"
18690 #: ../fish/guestfish.pod:858
18691 msgid "REMOTE CONTROL DETAILS"
18695 #: ../fish/guestfish.pod:860
18697 "Remote control happens over a Unix domain socket called "
18698 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
18699 "of the process, and C<$PID> is the process ID of the server."
18703 #: ../fish/guestfish.pod:864
18704 msgid "Guestfish client and server versions must match exactly."
18708 #: ../fish/guestfish.pod:866
18709 msgid "PREPARED DISK IMAGES"
18713 #: ../fish/guestfish.pod:868
18715 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
18716 "preformatted disk images that guestfish can make for you to save typing. "
18717 "This is particularly useful for testing purposes. This option is used "
18718 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
18719 "can be mixed with I<-a>)."
18723 #: ../fish/guestfish.pod:874
18725 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
18726 "the second and so on. Existing files in the current directory are "
18731 #: ../fish/guestfish.pod:878
18733 "The type briefly describes how the disk should be sized, partitioned, how "
18734 "filesystem(s) should be created, and how content should be added. "
18735 "Optionally the type can be followed by extra parameters, separated by C<:> "
18736 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
18737 "sparsely-allocated disk, containing a single partition, with the partition "
18738 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
18739 "on a 1GB disk instead."
18743 #: ../fish/guestfish.pod:886
18744 msgid "To list the available types and any extra parameters they take, run:"
18748 #: ../fish/guestfish.pod:890
18750 "Note that the prepared filesystem is not mounted. You would usually have to "
18751 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
18755 #: ../fish/guestfish.pod:894
18757 "If any I<-N> or I<--new> options are given, the guest is automatically "
18762 #: ../fish/guestfish.pod:899
18763 msgid "Create a 100MB disk with an ext4-formatted partition:"
18767 #: ../fish/guestfish.pod:901
18770 " guestfish -N fs:ext4\n"
18775 #: ../fish/guestfish.pod:903
18776 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
18780 #: ../fish/guestfish.pod:905
18783 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
18788 #: ../fish/guestfish.pod:907
18789 msgid "Create a blank 200MB disk:"
18793 #: ../fish/guestfish.pod:909
18796 " guestfish -N disk:200M\n"
18801 #: ../fish/guestfish.pod:911
18802 msgid "PROGRESS BARS"
18806 #: ../fish/guestfish.pod:913
18808 "Some (not all) long-running commands send progress notification messages as "
18809 "they are running. Guestfish turns these messages into progress bars."
18813 #: ../fish/guestfish.pod:917
18815 "When a command that supports progress bars takes longer than two seconds to "
18816 "run, and if progress bars are enabled, then you will see one appearing below "
18821 #: ../fish/guestfish.pod:921
18824 " ><fs> copy-size /large-file /another-file 2048M\n"
18825 " / 10% [#####-----------------------------------------] 00:30\n"
18830 #: ../fish/guestfish.pod:924
18832 "The spinner on the left hand side moves round once for every progress "
18833 "notification received from the backend. This is a (reasonably) golden "
18834 "assurance that the command is \"doing something\" even if the progress bar "
18835 "is not moving, because the command is able to send the progress "
18836 "notifications. When the bar reaches 100% and the command finishes, the "
18837 "spinner disappears."
18841 #: ../fish/guestfish.pod:931
18843 "Progress bars are enabled by default when guestfish is used interactively. "
18844 "You can enable them even for non-interactive modes using I<--progress-bars>, "
18845 "and you can disable them completely using I<--no-progress-bars>."
18849 #: ../fish/guestfish.pod:936
18850 msgid "GUESTFISH COMMANDS"
18854 #: ../fish/guestfish.pod:938
18856 "The commands in this section are guestfish convenience commands, in other "
18857 "words, they are not part of the L<guestfs(3)> API."
18861 #: ../fish/guestfish.pod:941
18866 #: ../fish/guestfish.pod:943
18875 #: ../fish/guestfish.pod:946
18876 msgid "Without any parameter, this provides general help."
18880 #: ../fish/guestfish.pod:948
18881 msgid "With a C<cmd> parameter, this displays detailed help for that command."
18885 #: ../fish/guestfish.pod:950
18886 msgid "quit | exit"
18890 #: ../fish/guestfish.pod:952
18891 msgid "This exits guestfish. You can also use C<^D> key."
18895 #: ../fish/guestfish.pod:954
18896 msgid "@FISH_COMMANDS@"
18900 #: ../fish/guestfish.pod:956
18905 #: ../fish/guestfish.pod:960 ../test-tool/libguestfs-test-tool.pod:83
18910 #: ../fish/guestfish.pod:962
18912 "guestfish returns 0 if the commands completed without error, or 1 if there "
18917 #: ../fish/guestfish.pod:969
18922 #: ../fish/guestfish.pod:971
18924 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
18929 #: ../fish/guestfish.pod:974
18930 msgid "GUESTFISH_PID"
18934 #: ../fish/guestfish.pod:976
18936 "Used with the I<--remote> option to specify the remote guestfish process to "
18937 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
18941 #: ../fish/guestfish.pod:980
18946 #: ../fish/guestfish.pod:982
18948 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
18949 "not specified, the external L<hexedit(1)> program is used."
18953 #: ../fish/guestfish.pod:986
18958 #: ../fish/guestfish.pod:988
18960 "If compiled with GNU readline support, various files in the home directory "
18961 "can be used. See L</FILES>."
18965 #: ../fish/guestfish.pod:997
18967 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
18968 "effect as using the B<-v> option."
18972 #: ../fish/guestfish.pod:1009
18974 "Set the path that guestfish uses to search for kernel and initrd.img. See "
18975 "the discussion of paths in L<guestfs(3)>."
18979 #: ../fish/guestfish.pod:1020
18980 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
18984 #: ../fish/guestfish.pod:1022
18989 #: ../fish/guestfish.pod:1024
18991 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
18996 #: ../fish/guestfish.pod:1039 ../test-tool/libguestfs-test-tool.pod:88
19001 #: ../fish/guestfish.pod:1043
19002 msgid "$HOME/.guestfish"
19006 #: ../fish/guestfish.pod:1045
19008 "If compiled with GNU readline support, then the command history is saved in "
19013 #: ../fish/guestfish.pod:1048
19014 msgid "$HOME/.inputrc"
19018 #: ../fish/guestfish.pod:1050
19019 msgid "/etc/inputrc"
19023 #: ../fish/guestfish.pod:1052
19025 "If compiled with GNU readline support, then these files can be used to "
19026 "configure readline. For further information, please see "
19027 "L<readline(3)/INITIALIZATION FILE>."
19031 #: ../fish/guestfish.pod:1056
19032 msgid "To write rules which only apply to guestfish, use:"
19036 #: ../fish/guestfish.pod:1058
19046 #: ../fish/guestfish.pod:1062
19048 "Variables that you can set in inputrc that change the behaviour of guestfish "
19049 "in useful ways include:"
19053 #: ../fish/guestfish.pod:1067
19054 msgid "completion-ignore-case (default: on)"
19058 #: ../fish/guestfish.pod:1069
19060 "By default, guestfish will ignore case when tab-completing paths on the "
19065 #: ../fish/guestfish.pod:1072
19068 " set completion-ignore-case off\n"
19073 #: ../fish/guestfish.pod:1074
19074 msgid "to make guestfish case sensitive."
19078 #: ../fish/guestfish.pod:1078
19083 #: ../fish/guestfish.pod:1080
19084 msgid "test2.img (etc)"
19088 #: ../fish/guestfish.pod:1082
19090 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
19091 "will be created in the file C<test1.img> in the current directory. The "
19092 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
19093 "the same name will be overwritten."
19097 #: ../fish/guestfish.pod:1091
19099 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
19100 "L<virt-edit(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, "
19101 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, "
19102 "L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, L<virt-tar(1)>, "
19103 "L<virt-win-reg(1)>, L<hexedit(1)>."
19107 #: ../fish/guestfish.pod:1117 ../test-tool/libguestfs-test-tool.pod:124 ../fuse/guestmount.pod:253
19109 "This program is free software; you can redistribute it and/or modify it "
19110 "under the terms of the GNU General Public License as published by the Free "
19111 "Software Foundation; either version 2 of the License, or (at your option) "
19112 "any later version."
19116 #: ../fish/guestfish.pod:1122 ../test-tool/libguestfs-test-tool.pod:129 ../fuse/guestmount.pod:258
19118 "This program is distributed in the hope that it will be useful, but WITHOUT "
19119 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
19120 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
19125 #: ../fish/guestfish.pod:1127 ../test-tool/libguestfs-test-tool.pod:134 ../fuse/guestmount.pod:263
19127 "You should have received a copy of the GNU General Public License along with "
19128 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
19129 "Ave, Cambridge, MA 02139, USA."
19133 #: ../fish/guestfish-actions.pod:1
19138 #: ../fish/guestfish-actions.pod:3
19141 " add-cdrom filename\n"
19146 #: ../fish/guestfish-actions.pod:15
19148 "This call checks for the existence of C<filename>. This stops you from "
19149 "specifying other types of drive which are supported by qemu such as C<nbd:> "
19150 "and C<http:> URLs. To specify those, use the general L</config> call "
19155 #: ../fish/guestfish-actions.pod:22
19157 "If you just want to add an ISO file (often you use this as an efficient way "
19158 "to transfer large files into the guest), then you should probably use "
19159 "L</add-drive-ro> instead."
19163 #: ../fish/guestfish-actions.pod:35
19168 #: ../fish/guestfish-actions.pod:37
19173 #: ../fish/guestfish-actions.pod:39
19176 " add-domain dom [libvirturi:..] [readonly:..] [iface:..]\n"
19181 #: ../fish/guestfish-actions.pod:41
19183 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
19184 "It works by connecting to libvirt, requesting the domain and domain XML from "
19185 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
19189 #: ../fish/guestfish-actions.pod:58
19191 "The optional C<libvirturi> parameter sets the libvirt URI (see "
19192 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
19193 "default libvirt URI (or one set through an environment variable, see the "
19194 "libvirt documentation for full details). If you are using the C API "
19195 "directly then it is more flexible to create the libvirt connection object "
19196 "yourself, get the domain object, and call L</add-libvirt-dom>."
19200 #: ../fish/guestfish-actions.pod:66
19202 "The other optional parameters are passed directly through to "
19203 "L</add-drive-opts>."
19207 #: ../fish/guestfish-actions.pod:69 ../fish/guestfish-actions.pod:133 ../fish/guestfish-actions.pod:2844
19209 "This command has one or more optional arguments. See L</OPTIONAL "
19214 #: ../fish/guestfish-actions.pod:71
19219 #: ../fish/guestfish-actions.pod:73
19222 " add-drive filename\n"
19227 #: ../fish/guestfish-actions.pod:75
19229 "This function is the equivalent of calling L</add-drive-opts> with no "
19230 "optional parameters, so the disk is added writable, with the format being "
19231 "detected automatically."
19235 #: ../fish/guestfish-actions.pod:79
19237 "Automatic detection of the format opens you up to a potential security hole "
19238 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
19239 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
19240 "you should think about replacing calls to this function with calls to "
19241 "L</add-drive-opts>, and specifying the format."
19245 #: ../fish/guestfish-actions.pod:86
19246 msgid "add-drive-opts"
19250 #: ../fish/guestfish-actions.pod:88
19255 #: ../fish/guestfish-actions.pod:90
19258 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
19263 #: ../fish/guestfish-actions.pod:117
19265 "This forces the image format. If you omit this (or use L</add-drive> or "
19266 "L</add-drive-ro>) then the format is automatically detected. Possible "
19267 "formats include C<raw> and C<qcow2>."
19271 #: ../fish/guestfish-actions.pod:128
19273 "This rarely-used option lets you emulate the behaviour of the deprecated "
19274 "L</add-drive-with-if> call (q.v.)"
19278 #: ../fish/guestfish-actions.pod:135
19279 msgid "add-drive-ro"
19283 #: ../fish/guestfish-actions.pod:137
19288 #: ../fish/guestfish-actions.pod:139
19291 " add-drive-ro filename\n"
19296 #: ../fish/guestfish-actions.pod:141
19298 "This function is the equivalent of calling L</add-drive-opts> with the "
19299 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
19300 "is added read-only, with the format being detected automatically."
19304 #: ../fish/guestfish-actions.pod:146
19305 msgid "add-drive-ro-with-if"
19309 #: ../fish/guestfish-actions.pod:148
19312 " add-drive-ro-with-if filename iface\n"
19317 #: ../fish/guestfish-actions.pod:150
19319 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
19320 "interface emulation to use at run time."
19324 #: ../fish/guestfish-actions.pod:160
19325 msgid "add-drive-with-if"
19329 #: ../fish/guestfish-actions.pod:162
19332 " add-drive-with-if filename iface\n"
19337 #: ../fish/guestfish-actions.pod:164
19339 "This is the same as L</add-drive> but it allows you to specify the QEMU "
19340 "interface emulation to use at run time."
19344 #: ../fish/guestfish-actions.pod:174
19349 #: ../fish/guestfish-actions.pod:176
19352 " aug-clear augpath\n"
19357 #: ../fish/guestfish-actions.pod:181
19362 #: ../fish/guestfish-actions.pod:183
19370 #: ../fish/guestfish-actions.pod:185
19372 "Close the current Augeas handle and free up any resources used by it. After "
19373 "calling this, you have to call L</aug-init> again before you can use any "
19374 "other Augeas functions."
19378 #: ../fish/guestfish-actions.pod:190
19379 msgid "aug-defnode"
19383 #: ../fish/guestfish-actions.pod:192
19386 " aug-defnode name expr val\n"
19391 #: ../fish/guestfish-actions.pod:197
19393 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
19394 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
19395 "containing that single node."
19399 #: ../fish/guestfish-actions.pod:205
19404 #: ../fish/guestfish-actions.pod:207
19407 " aug-defvar name expr\n"
19412 #: ../fish/guestfish-actions.pod:216
19417 #: ../fish/guestfish-actions.pod:218
19420 " aug-get augpath\n"
19425 #: ../fish/guestfish-actions.pod:223
19430 #: ../fish/guestfish-actions.pod:225
19433 " aug-init root flags\n"
19438 #: ../fish/guestfish-actions.pod:231
19439 msgid "You must call this before using any other L</aug-*> commands."
19443 #: ../fish/guestfish-actions.pod:266
19444 msgid "Do not load the tree in L</aug-init>."
19448 #: ../fish/guestfish-actions.pod:270
19449 msgid "To close the handle, you can call L</aug-close>."
19453 #: ../fish/guestfish-actions.pod:274
19458 #: ../fish/guestfish-actions.pod:276
19461 " aug-insert augpath label true|false\n"
19466 #: ../fish/guestfish-actions.pod:286
19471 #: ../fish/guestfish-actions.pod:288
19479 #: ../fish/guestfish-actions.pod:295
19484 #: ../fish/guestfish-actions.pod:297
19487 " aug-ls augpath\n"
19492 #: ../fish/guestfish-actions.pod:299
19494 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
19495 "resulting nodes into alphabetical order."
19499 #: ../fish/guestfish-actions.pod:302
19504 #: ../fish/guestfish-actions.pod:304
19507 " aug-match augpath\n"
19512 #: ../fish/guestfish-actions.pod:310
19517 #: ../fish/guestfish-actions.pod:312
19520 " aug-mv src dest\n"
19525 #: ../fish/guestfish-actions.pod:317
19530 #: ../fish/guestfish-actions.pod:319
19533 " aug-rm augpath\n"
19538 #: ../fish/guestfish-actions.pod:325
19543 #: ../fish/guestfish-actions.pod:327
19551 #: ../fish/guestfish-actions.pod:331
19553 "The flags which were passed to L</aug-init> affect exactly how files are "
19558 #: ../fish/guestfish-actions.pod:334
19563 #: ../fish/guestfish-actions.pod:336
19566 " aug-set augpath val\n"
19571 #: ../fish/guestfish-actions.pod:340
19573 "In the Augeas API, it is possible to clear a node by setting the value to "
19574 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
19575 "this call. Instead you must use the L</aug-clear> call."
19579 #: ../fish/guestfish-actions.pod:345
19584 #: ../fish/guestfish-actions.pod:347
19587 " available 'groups ...'\n"
19592 #: ../fish/guestfish-actions.pod:353
19594 "The libguestfs groups, and the functions that those groups correspond to, "
19595 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
19596 "runtime by calling L</available-all-groups>."
19600 #: ../fish/guestfish-actions.pod:377
19601 msgid "You must call L</launch> before calling this function."
19605 #: ../fish/guestfish-actions.pod:399
19607 "This call was added in version C<1.0.80>. In previous versions of "
19608 "libguestfs all you could do would be to speculatively execute a command to "
19609 "find out if the daemon implemented it. See also L</version>."
19613 #: ../fish/guestfish-actions.pod:406
19614 msgid "available-all-groups"
19618 #: ../fish/guestfish-actions.pod:408
19621 " available-all-groups\n"
19626 #: ../fish/guestfish-actions.pod:410
19628 "This command returns a list of all optional groups that this daemon knows "
19629 "about. Note this returns both supported and unsupported groups. To find "
19630 "out which ones the daemon can actually support you have to call "
19631 "L</available> on each member of the returned list."
19635 #: ../fish/guestfish-actions.pod:416
19636 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
19640 #: ../fish/guestfish-actions.pod:418
19645 #: ../fish/guestfish-actions.pod:420
19648 " base64-in (base64file|-) filename\n"
19653 #: ../fish/guestfish-actions.pod:425 ../fish/guestfish-actions.pod:434 ../fish/guestfish-actions.pod:658 ../fish/guestfish-actions.pod:827 ../fish/guestfish-actions.pod:846 ../fish/guestfish-actions.pod:1223 ../fish/guestfish-actions.pod:4199 ../fish/guestfish-actions.pod:4211 ../fish/guestfish-actions.pod:4222 ../fish/guestfish-actions.pod:4233 ../fish/guestfish-actions.pod:4285 ../fish/guestfish-actions.pod:4294 ../fish/guestfish-actions.pod:4348 ../fish/guestfish-actions.pod:4371
19654 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
19658 #: ../fish/guestfish-actions.pod:427
19663 #: ../fish/guestfish-actions.pod:429
19666 " base64-out filename (base64file|-)\n"
19671 #: ../fish/guestfish-actions.pod:436
19672 msgid "blockdev-flushbufs"
19676 #: ../fish/guestfish-actions.pod:438
19679 " blockdev-flushbufs device\n"
19684 #: ../fish/guestfish-actions.pod:445
19685 msgid "blockdev-getbsz"
19689 #: ../fish/guestfish-actions.pod:447
19692 " blockdev-getbsz device\n"
19697 #: ../fish/guestfish-actions.pod:456
19698 msgid "blockdev-getro"
19702 #: ../fish/guestfish-actions.pod:458
19705 " blockdev-getro device\n"
19710 #: ../fish/guestfish-actions.pod:465
19711 msgid "blockdev-getsize64"
19715 #: ../fish/guestfish-actions.pod:467
19718 " blockdev-getsize64 device\n"
19723 #: ../fish/guestfish-actions.pod:471
19724 msgid "See also L</blockdev-getsz>."
19728 #: ../fish/guestfish-actions.pod:475
19729 msgid "blockdev-getss"
19733 #: ../fish/guestfish-actions.pod:477
19736 " blockdev-getss device\n"
19741 #: ../fish/guestfish-actions.pod:482
19742 msgid "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
19746 #: ../fish/guestfish-actions.pod:487
19747 msgid "blockdev-getsz"
19751 #: ../fish/guestfish-actions.pod:489
19754 " blockdev-getsz device\n"
19759 #: ../fish/guestfish-actions.pod:494
19761 "See also L</blockdev-getss> for the real sector size of the device, and "
19762 "L</blockdev-getsize64> for the more useful I<size in bytes>."
19766 #: ../fish/guestfish-actions.pod:500
19767 msgid "blockdev-rereadpt"
19771 #: ../fish/guestfish-actions.pod:502
19774 " blockdev-rereadpt device\n"
19779 #: ../fish/guestfish-actions.pod:508
19780 msgid "blockdev-setbsz"
19784 #: ../fish/guestfish-actions.pod:510
19787 " blockdev-setbsz device blocksize\n"
19792 #: ../fish/guestfish-actions.pod:519
19793 msgid "blockdev-setro"
19797 #: ../fish/guestfish-actions.pod:521
19800 " blockdev-setro device\n"
19805 #: ../fish/guestfish-actions.pod:527
19806 msgid "blockdev-setrw"
19810 #: ../fish/guestfish-actions.pod:529
19813 " blockdev-setrw device\n"
19818 #: ../fish/guestfish-actions.pod:535
19819 msgid "case-sensitive-path"
19823 #: ../fish/guestfish-actions.pod:537
19826 " case-sensitive-path path\n"
19831 #: ../fish/guestfish-actions.pod:561
19833 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return "
19834 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
19835 "how the directories were originally created under Windows)."
19839 #: ../fish/guestfish-actions.pod:569
19840 msgid "See also L</realpath>."
19844 #: ../fish/guestfish-actions.pod:571
19849 #: ../fish/guestfish-actions.pod:573
19857 #: ../fish/guestfish-actions.pod:577
19859 "Note that this function cannot correctly handle binary files (specifically, "
19860 "files containing C<\\0> character which is treated as end of string). For "
19861 "those you need to use the L</read-file> or L</download> functions which have "
19862 "a more complex interface."
19866 #: ../fish/guestfish-actions.pod:585
19871 #: ../fish/guestfish-actions.pod:587
19874 " checksum csumtype path\n"
19879 #: ../fish/guestfish-actions.pod:630
19880 msgid "To get the checksum for a device, use L</checksum-device>."
19884 #: ../fish/guestfish-actions.pod:632
19885 msgid "To get the checksums for many files, use L</checksums-out>."
19889 #: ../fish/guestfish-actions.pod:634
19890 msgid "checksum-device"
19894 #: ../fish/guestfish-actions.pod:636
19897 " checksum-device csumtype device\n"
19902 #: ../fish/guestfish-actions.pod:638
19904 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
19905 "device named C<device>. For the types of checksums supported see the "
19906 "L</checksum> command."
19910 #: ../fish/guestfish-actions.pod:642
19911 msgid "checksums-out"
19915 #: ../fish/guestfish-actions.pod:644
19918 " checksums-out csumtype directory (sumsfile|-)\n"
19923 #: ../fish/guestfish-actions.pod:660
19928 #: ../fish/guestfish-actions.pod:662
19931 " chmod mode path\n"
19936 #: ../fish/guestfish-actions.pod:673
19941 #: ../fish/guestfish-actions.pod:675
19944 " chown owner group path\n"
19949 #: ../fish/guestfish-actions.pod:683
19954 #: ../fish/guestfish-actions.pod:685
19957 " command 'arguments ...'\n"
19962 #: ../fish/guestfish-actions.pod:692
19964 "The single parameter is an argv-style list of arguments. The first element "
19965 "is the name of the program to run. Subsequent elements are parameters. The "
19966 "list must be non-empty (ie. must contain a program name). Note that the "
19967 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
19971 #: ../fish/guestfish-actions.pod:720
19972 msgid "command-lines"
19976 #: ../fish/guestfish-actions.pod:722
19979 " command-lines 'arguments ...'\n"
19984 #: ../fish/guestfish-actions.pod:724
19985 msgid "This is the same as L</command>, but splits the result into a list of lines."
19989 #: ../fish/guestfish-actions.pod:727
19990 msgid "See also: L</sh-lines>"
19994 #: ../fish/guestfish-actions.pod:732
19999 #: ../fish/guestfish-actions.pod:734
20002 " config qemuparam qemuvalue\n"
20007 #: ../fish/guestfish-actions.pod:745
20012 #: ../fish/guestfish-actions.pod:747
20015 " copy-size src dest size\n"
20020 #: ../fish/guestfish-actions.pod:755
20025 #: ../fish/guestfish-actions.pod:757
20033 #: ../fish/guestfish-actions.pod:762
20038 #: ../fish/guestfish-actions.pod:764
20046 #: ../fish/guestfish-actions.pod:769
20051 #: ../fish/guestfish-actions.pod:771
20059 #: ../fish/guestfish-actions.pod:778
20061 "If the destination is a device, it must be as large or larger than the "
20062 "source file or device, otherwise the copy will fail. This command cannot do "
20063 "partial copies (see L</copy-size>)."
20067 #: ../fish/guestfish-actions.pod:782
20072 #: ../fish/guestfish-actions.pod:784
20080 #: ../fish/guestfish-actions.pod:788 ../fish/guestfish-actions.pod:799
20082 "This command is mostly useful for interactive sessions. It is I<not> "
20083 "intended that you try to parse the output string. Use L</statvfs> from "
20088 #: ../fish/guestfish-actions.pod:792
20093 #: ../fish/guestfish-actions.pod:794
20101 #: ../fish/guestfish-actions.pod:803
20106 #: ../fish/guestfish-actions.pod:805
20114 #: ../fish/guestfish-actions.pod:811
20116 "Another way to get the same information is to enable verbose messages with "
20117 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
20118 "before running the program."
20122 #: ../fish/guestfish-actions.pod:816
20127 #: ../fish/guestfish-actions.pod:818
20130 " download remotefilename (filename|-)\n"
20135 #: ../fish/guestfish-actions.pod:825
20136 msgid "See also L</upload>, L</cat>."
20140 #: ../fish/guestfish-actions.pod:829
20141 msgid "download-offset"
20145 #: ../fish/guestfish-actions.pod:831
20148 " download-offset remotefilename (filename|-) offset size\n"
20153 #: ../fish/guestfish-actions.pod:839
20155 "Note that there is no limit on the amount of data that can be downloaded "
20156 "with this call, unlike with L</pread>, and this call always reads the full "
20157 "amount unless an error occurs."
20161 #: ../fish/guestfish-actions.pod:844
20162 msgid "See also L</download>, L</pread>."
20166 #: ../fish/guestfish-actions.pod:848
20167 msgid "drop-caches"
20171 #: ../fish/guestfish-actions.pod:850
20174 " drop-caches whattodrop\n"
20179 #: ../fish/guestfish-actions.pod:862
20184 #: ../fish/guestfish-actions.pod:864
20192 #: ../fish/guestfish-actions.pod:876
20197 #: ../fish/guestfish-actions.pod:878
20200 " e2fsck-f device\n"
20205 #: ../fish/guestfish-actions.pod:884
20207 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
20208 "should use L</fsck>."
20212 #: ../fish/guestfish-actions.pod:887
20213 msgid "echo-daemon"
20217 #: ../fish/guestfish-actions.pod:889
20220 " echo-daemon 'words ...'\n"
20225 #: ../fish/guestfish-actions.pod:896
20226 msgid "See also L</ping-daemon>."
20230 #: ../fish/guestfish-actions.pod:898
20235 #: ../fish/guestfish-actions.pod:900
20238 " egrep regex path\n"
20243 #: ../fish/guestfish-actions.pod:908
20248 #: ../fish/guestfish-actions.pod:910
20251 " egrepi regex path\n"
20256 #: ../fish/guestfish-actions.pod:918
20261 #: ../fish/guestfish-actions.pod:920
20264 " equal file1 file2\n"
20269 #: ../fish/guestfish-actions.pod:927
20274 #: ../fish/guestfish-actions.pod:929
20282 #: ../fish/guestfish-actions.pod:934
20283 msgid "See also L</is-file>, L</is-dir>, L</stat>."
20287 #: ../fish/guestfish-actions.pod:936
20292 #: ../fish/guestfish-actions.pod:938
20295 " fallocate path len\n"
20300 #: ../fish/guestfish-actions.pod:955
20301 msgid "fallocate64"
20305 #: ../fish/guestfish-actions.pod:957
20308 " fallocate64 path len\n"
20313 #: ../fish/guestfish-actions.pod:963
20315 "Note that this call allocates disk blocks for the file. To create a sparse "
20316 "file use L</truncate-size> instead."
20320 #: ../fish/guestfish-actions.pod:966
20322 "The deprecated call L</fallocate> does the same, but owing to an oversight "
20323 "it only allowed 30 bit lengths to be specified, effectively limiting the "
20324 "maximum size of files created through that call to 1GB."
20328 #: ../fish/guestfish-actions.pod:975
20333 #: ../fish/guestfish-actions.pod:977
20336 " fgrep pattern path\n"
20341 #: ../fish/guestfish-actions.pod:985
20346 #: ../fish/guestfish-actions.pod:987
20349 " fgrepi pattern path\n"
20354 #: ../fish/guestfish-actions.pod:995
20359 #: ../fish/guestfish-actions.pod:997
20367 #: ../fish/guestfish-actions.pod:1009
20369 "This command can also be used on C</dev/> devices (and partitions, LV "
20370 "names). You can for example use this to determine if a device contains a "
20371 "filesystem, although it's usually better to use L</vfs-type>."
20375 #: ../fish/guestfish-actions.pod:1019
20376 msgid "file-architecture"
20380 #: ../fish/guestfish-actions.pod:1021
20383 " file-architecture filename\n"
20388 #: ../fish/guestfish-actions.pod:1124
20393 #: ../fish/guestfish-actions.pod:1126
20401 #: ../fish/guestfish-actions.pod:1130
20403 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, "
20404 "L</is-file> etc. To get the size of block devices, use "
20405 "L</blockdev-getsize64>."
20409 #: ../fish/guestfish-actions.pod:1134
20414 #: ../fish/guestfish-actions.pod:1136
20417 " fill c len path\n"
20422 #: ../fish/guestfish-actions.pod:1142
20424 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
20425 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
20426 "L</fill-pattern>."
20430 #: ../fish/guestfish-actions.pod:1147
20431 msgid "fill-pattern"
20435 #: ../fish/guestfish-actions.pod:1149
20438 " fill-pattern pattern len path\n"
20443 #: ../fish/guestfish-actions.pod:1151
20445 "This function is like L</fill> except that it creates a new file of length "
20446 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
20447 "is truncated if necessary to ensure the length of the file is exactly C<len> "
20452 #: ../fish/guestfish-actions.pod:1156
20457 #: ../fish/guestfish-actions.pod:1158
20460 " find directory\n"
20465 #: ../fish/guestfish-actions.pod:1172
20466 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
20470 #: ../fish/guestfish-actions.pod:1185
20471 msgid "See also L</find0>."
20475 #: ../fish/guestfish-actions.pod:1190
20480 #: ../fish/guestfish-actions.pod:1192
20483 " find0 directory (files|-)\n"
20488 #: ../fish/guestfish-actions.pod:1198
20489 msgid "This command works the same way as L</find> with the following exceptions:"
20493 #: ../fish/guestfish-actions.pod:1225
20494 msgid "findfs-label"
20498 #: ../fish/guestfish-actions.pod:1227
20501 " findfs-label label\n"
20506 #: ../fish/guestfish-actions.pod:1233
20507 msgid "To find the label of a filesystem, use L</vfs-label>."
20511 #: ../fish/guestfish-actions.pod:1235
20512 msgid "findfs-uuid"
20516 #: ../fish/guestfish-actions.pod:1237
20519 " findfs-uuid uuid\n"
20524 #: ../fish/guestfish-actions.pod:1243
20525 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
20529 #: ../fish/guestfish-actions.pod:1245
20534 #: ../fish/guestfish-actions.pod:1247
20537 " fsck fstype device\n"
20542 #: ../fish/guestfish-actions.pod:1277
20547 #: ../fish/guestfish-actions.pod:1279
20555 #: ../fish/guestfish-actions.pod:1286
20556 msgid "get-autosync"
20560 #: ../fish/guestfish-actions.pod:1288
20568 #: ../fish/guestfish-actions.pod:1292
20573 #: ../fish/guestfish-actions.pod:1294
20581 #: ../fish/guestfish-actions.pod:1298
20582 msgid "get-e2label"
20586 #: ../fish/guestfish-actions.pod:1300
20589 " get-e2label device\n"
20594 #: ../fish/guestfish-actions.pod:1312
20599 #: ../fish/guestfish-actions.pod:1314
20602 " get-e2uuid device\n"
20607 #: ../fish/guestfish-actions.pod:1326
20608 msgid "get-memsize"
20612 #: ../fish/guestfish-actions.pod:1328
20620 #: ../fish/guestfish-actions.pod:1333
20622 "If L</set-memsize> was not called on this handle, and if "
20623 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
20624 "value for memsize."
20628 #: ../fish/guestfish-actions.pod:1340
20629 msgid "get-network"
20633 #: ../fish/guestfish-actions.pod:1342
20641 #: ../fish/guestfish-actions.pod:1346
20646 #: ../fish/guestfish-actions.pod:1348
20654 #: ../fish/guestfish-actions.pod:1355
20659 #: ../fish/guestfish-actions.pod:1357
20664 #: ../fish/guestfish-actions.pod:1359
20672 #: ../fish/guestfish-actions.pod:1366
20677 #: ../fish/guestfish-actions.pod:1368
20685 #: ../fish/guestfish-actions.pod:1375
20686 msgid "get-recovery-proc"
20690 #: ../fish/guestfish-actions.pod:1377
20693 " get-recovery-proc\n"
20698 #: ../fish/guestfish-actions.pod:1381
20699 msgid "get-selinux"
20703 #: ../fish/guestfish-actions.pod:1383
20711 #: ../fish/guestfish-actions.pod:1385
20713 "This returns the current setting of the selinux flag which is passed to the "
20714 "appliance at boot time. See L</set-selinux>."
20718 #: ../fish/guestfish-actions.pod:1391
20723 #: ../fish/guestfish-actions.pod:1393
20731 #: ../fish/guestfish-actions.pod:1400
20736 #: ../fish/guestfish-actions.pod:1402
20744 #: ../fish/guestfish-actions.pod:1406
20749 #: ../fish/guestfish-actions.pod:1408
20757 #: ../fish/guestfish-actions.pod:1410
20759 "Return the current umask. By default the umask is C<022> unless it has been "
20760 "set by calling L</umask>."
20764 #: ../fish/guestfish-actions.pod:1413
20765 msgid "get-verbose"
20769 #: ../fish/guestfish-actions.pod:1415
20777 #: ../fish/guestfish-actions.pod:1419
20782 #: ../fish/guestfish-actions.pod:1421
20790 #: ../fish/guestfish-actions.pod:1425
20791 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
20795 #: ../fish/guestfish-actions.pod:1428
20800 #: ../fish/guestfish-actions.pod:1430
20803 " getxattr path name\n"
20808 #: ../fish/guestfish-actions.pod:1432
20810 "Get a single extended attribute from file C<path> named C<name>. This call "
20811 "follows symlinks. If you want to lookup an extended attribute for the "
20812 "symlink itself, use L</lgetxattr>."
20816 #: ../fish/guestfish-actions.pod:1436 ../fish/guestfish-actions.pod:2263
20818 "Normally it is better to get all extended attributes from a file in one go "
20819 "by calling L</getxattrs>. However some Linux filesystem implementations are "
20820 "buggy and do not provide a way to list out attributes. For these "
20821 "filesystems (notably ntfs-3g) you have to know the names of the extended "
20822 "attributes you want in advance and call this function."
20826 #: ../fish/guestfish-actions.pod:1446
20827 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
20831 #: ../fish/guestfish-actions.pod:1448
20836 #: ../fish/guestfish-actions.pod:1450
20839 " getxattrs path\n"
20844 #: ../fish/guestfish-actions.pod:1458
20845 msgid "See also: L</lgetxattrs>, L<attr(5)>."
20849 #: ../fish/guestfish-actions.pod:1460
20850 msgid "glob-expand"
20854 #: ../fish/guestfish-actions.pod:1462
20857 " glob-expand pattern\n"
20862 #: ../fish/guestfish-actions.pod:1475
20867 #: ../fish/guestfish-actions.pod:1477
20870 " grep regex path\n"
20875 #: ../fish/guestfish-actions.pod:1485
20880 #: ../fish/guestfish-actions.pod:1487
20883 " grepi regex path\n"
20888 #: ../fish/guestfish-actions.pod:1495
20889 msgid "grub-install"
20893 #: ../fish/guestfish-actions.pod:1497
20896 " grub-install root device\n"
20901 #: ../fish/guestfish-actions.pod:1513
20906 #: ../fish/guestfish-actions.pod:1515
20914 #: ../fish/guestfish-actions.pod:1523
20919 #: ../fish/guestfish-actions.pod:1525
20922 " head-n nrlines path\n"
20927 #: ../fish/guestfish-actions.pod:1538
20932 #: ../fish/guestfish-actions.pod:1540
20940 #: ../fish/guestfish-actions.pod:1548
20945 #: ../fish/guestfish-actions.pod:1550
20948 " initrd-cat initrdpath filename\n"
20953 #: ../fish/guestfish-actions.pod:1562
20954 msgid "See also L</initrd-list>."
20958 #: ../fish/guestfish-actions.pod:1567
20959 msgid "initrd-list"
20963 #: ../fish/guestfish-actions.pod:1569
20966 " initrd-list path\n"
20971 #: ../fish/guestfish-actions.pod:1581
20972 msgid "inotify-add-watch"
20976 #: ../fish/guestfish-actions.pod:1583
20979 " inotify-add-watch path mask\n"
20984 #: ../fish/guestfish-actions.pod:1595
20985 msgid "inotify-close"
20989 #: ../fish/guestfish-actions.pod:1597
20997 #: ../fish/guestfish-actions.pod:1603
20998 msgid "inotify-files"
21002 #: ../fish/guestfish-actions.pod:1605
21010 #: ../fish/guestfish-actions.pod:1607
21012 "This function is a helpful wrapper around L</inotify-read> which just "
21013 "returns a list of pathnames of objects that were touched. The returned "
21014 "pathnames are sorted and deduplicated."
21018 #: ../fish/guestfish-actions.pod:1611
21019 msgid "inotify-init"
21023 #: ../fish/guestfish-actions.pod:1613
21026 " inotify-init maxevents\n"
21031 #: ../fish/guestfish-actions.pod:1619
21033 "C<maxevents> is the maximum number of events which will be queued up between "
21034 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
21035 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
21036 "default was 16384 events. Beyond this limit, the kernel throws away events, "
21037 "but records the fact that it threw them away by setting a flag "
21038 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
21042 #: ../fish/guestfish-actions.pod:1629
21044 "Before any events are generated, you have to add some watches to the "
21045 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
21046 "L</inotify-watch-all>."
21050 #: ../fish/guestfish-actions.pod:1635
21052 "Queued up events should be read periodically by calling L</inotify-read> (or "
21053 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
21054 "If you don't read the events out often enough then you risk the internal "
21055 "queue overflowing."
21059 #: ../fish/guestfish-actions.pod:1642
21061 "The handle should be closed after use by calling L</inotify-close>. This "
21062 "also removes any watches automatically."
21066 #: ../fish/guestfish-actions.pod:1651
21067 msgid "inotify-read"
21071 #: ../fish/guestfish-actions.pod:1653
21079 #: ../fish/guestfish-actions.pod:1666
21080 msgid "inotify-rm-watch"
21084 #: ../fish/guestfish-actions.pod:1668
21087 " inotify-rm-watch wd\n"
21092 #: ../fish/guestfish-actions.pod:1670
21093 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
21097 #: ../fish/guestfish-actions.pod:1673
21098 msgid "inspect-get-arch"
21102 #: ../fish/guestfish-actions.pod:1675
21105 " inspect-get-arch root\n"
21110 #: ../fish/guestfish-actions.pod:1677 ../fish/guestfish-actions.pod:1693 ../fish/guestfish-actions.pod:1767 ../fish/guestfish-actions.pod:1785 ../fish/guestfish-actions.pod:1800 ../fish/guestfish-actions.pod:1821 ../fish/guestfish-actions.pod:1836 ../fish/guestfish-actions.pod:1859 ../fish/guestfish-actions.pod:1881 ../fish/guestfish-actions.pod:1905 ../fish/guestfish-actions.pod:1935 ../fish/guestfish-actions.pod:1970 ../fish/guestfish-actions.pod:1986
21112 "This function should only be called with a root device string as returned by "
21117 #: ../fish/guestfish-actions.pod:1680
21119 "This returns the architecture of the inspected operating system. The "
21120 "possible return values are listed under L</file-architecture>."
21124 #: ../fish/guestfish-actions.pod:1689
21125 msgid "inspect-get-distro"
21129 #: ../fish/guestfish-actions.pod:1691
21132 " inspect-get-distro root\n"
21137 #: ../fish/guestfish-actions.pod:1763
21138 msgid "inspect-get-filesystems"
21142 #: ../fish/guestfish-actions.pod:1765
21145 " inspect-get-filesystems root\n"
21150 #: ../fish/guestfish-actions.pod:1778
21152 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
21153 "L</inspect-get-mountpoints>."
21157 #: ../fish/guestfish-actions.pod:1781
21158 msgid "inspect-get-hostname"
21162 #: ../fish/guestfish-actions.pod:1783
21165 " inspect-get-hostname root\n"
21170 #: ../fish/guestfish-actions.pod:1796
21171 msgid "inspect-get-major-version"
21175 #: ../fish/guestfish-actions.pod:1798
21178 " inspect-get-major-version root\n"
21183 #: ../fish/guestfish-actions.pod:1817
21184 msgid "inspect-get-minor-version"
21188 #: ../fish/guestfish-actions.pod:1819
21191 " inspect-get-minor-version root\n"
21196 #: ../fish/guestfish-actions.pod:1829
21198 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
21199 "L</inspect-get-major-version>."
21203 #: ../fish/guestfish-actions.pod:1832
21204 msgid "inspect-get-mountpoints"
21208 #: ../fish/guestfish-actions.pod:1834
21211 " inspect-get-mountpoints root\n"
21216 #: ../fish/guestfish-actions.pod:1852
21218 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
21219 "L</inspect-get-filesystems>."
21223 #: ../fish/guestfish-actions.pod:1855
21224 msgid "inspect-get-package-format"
21228 #: ../fish/guestfish-actions.pod:1857
21231 " inspect-get-package-format root\n"
21236 #: ../fish/guestfish-actions.pod:1862
21238 "This function and L</inspect-get-package-management> return the package "
21239 "format and package management tool used by the inspected operating system. "
21240 "For example for Fedora these functions would return C<rpm> (package format) "
21241 "and C<yum> (package management)."
21245 #: ../fish/guestfish-actions.pod:1877
21246 msgid "inspect-get-package-management"
21250 #: ../fish/guestfish-actions.pod:1879
21253 " inspect-get-package-management root\n"
21258 #: ../fish/guestfish-actions.pod:1884
21260 "L</inspect-get-package-format> and this function return the package format "
21261 "and package management tool used by the inspected operating system. For "
21262 "example for Fedora these functions would return C<rpm> (package format) and "
21263 "C<yum> (package management)."
21267 #: ../fish/guestfish-actions.pod:1901
21268 msgid "inspect-get-product-name"
21272 #: ../fish/guestfish-actions.pod:1903
21275 " inspect-get-product-name root\n"
21280 #: ../fish/guestfish-actions.pod:1918
21281 msgid "inspect-get-roots"
21285 #: ../fish/guestfish-actions.pod:1920
21288 " inspect-get-roots\n"
21293 #: ../fish/guestfish-actions.pod:1922
21295 "This function is a convenient way to get the list of root devices, as "
21296 "returned from a previous call to L</inspect-os>, but without redoing the "
21297 "whole inspection process."
21301 #: ../fish/guestfish-actions.pod:1926
21303 "This returns an empty list if either no root devices were found or the "
21304 "caller has not called L</inspect-os>."
21308 #: ../fish/guestfish-actions.pod:1931
21309 msgid "inspect-get-type"
21313 #: ../fish/guestfish-actions.pod:1933
21316 " inspect-get-type root\n"
21321 #: ../fish/guestfish-actions.pod:1966
21322 msgid "inspect-get-windows-systemroot"
21326 #: ../fish/guestfish-actions.pod:1968
21329 " inspect-get-windows-systemroot root\n"
21334 #: ../fish/guestfish-actions.pod:1982
21335 msgid "inspect-list-applications"
21339 #: ../fish/guestfish-actions.pod:1984
21342 " inspect-list-applications root\n"
21347 #: ../fish/guestfish-actions.pod:1991
21349 "I<Note:> This call works differently from other parts of the inspection "
21350 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
21351 "then mount up the disks, before calling this. Listing applications is a "
21352 "significantly more difficult operation which requires access to the full "
21353 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
21354 "are just returning data cached in the libguestfs handle, this call actually "
21355 "reads parts of the mounted filesystems during the call."
21359 #: ../fish/guestfish-actions.pod:2081
21364 #: ../fish/guestfish-actions.pod:2083
21372 #: ../fish/guestfish-actions.pod:2098
21374 "You can pass the root string(s) returned to other L</inspect-get-*> "
21375 "functions in order to query further information about each operating system, "
21376 "such as the name and version."
21380 #: ../fish/guestfish-actions.pod:2103
21382 "This function uses other libguestfs features such as L</mount-ro> and "
21383 "L</umount-all> in order to mount and unmount filesystems and look at the "
21384 "contents. This should be called with no disks currently mounted. The "
21385 "function may also use Augeas, so any existing Augeas handle will be closed."
21389 #: ../fish/guestfish-actions.pod:2115 ../fish/guestfish-actions.pod:2291 ../fish/guestfish-actions.pod:2337
21390 msgid "See also L</list-filesystems>."
21394 #: ../fish/guestfish-actions.pod:2117
21395 msgid "is-blockdev"
21399 #: ../fish/guestfish-actions.pod:2119
21402 " is-blockdev path\n"
21407 #: ../fish/guestfish-actions.pod:2124 ../fish/guestfish-actions.pod:2142 ../fish/guestfish-actions.pod:2161 ../fish/guestfish-actions.pod:2170 ../fish/guestfish-actions.pod:2180 ../fish/guestfish-actions.pod:2214 ../fish/guestfish-actions.pod:2223
21408 msgid "See also L</stat>."
21412 #: ../fish/guestfish-actions.pod:2126
21417 #: ../fish/guestfish-actions.pod:2128
21425 #: ../fish/guestfish-actions.pod:2135
21430 #: ../fish/guestfish-actions.pod:2137
21433 " is-chardev path\n"
21438 #: ../fish/guestfish-actions.pod:2144
21443 #: ../fish/guestfish-actions.pod:2146
21451 #: ../fish/guestfish-actions.pod:2153
21456 #: ../fish/guestfish-actions.pod:2155
21464 #: ../fish/guestfish-actions.pod:2163
21469 #: ../fish/guestfish-actions.pod:2165
21477 #: ../fish/guestfish-actions.pod:2172
21482 #: ../fish/guestfish-actions.pod:2174
21490 #: ../fish/guestfish-actions.pod:2182
21491 msgid "is-launching"
21495 #: ../fish/guestfish-actions.pod:2184
21503 #: ../fish/guestfish-actions.pod:2191
21508 #: ../fish/guestfish-actions.pod:2193
21516 #: ../fish/guestfish-actions.pod:2198
21521 #: ../fish/guestfish-actions.pod:2200
21529 #: ../fish/guestfish-actions.pod:2207
21534 #: ../fish/guestfish-actions.pod:2209
21537 " is-socket path\n"
21542 #: ../fish/guestfish-actions.pod:2216
21547 #: ../fish/guestfish-actions.pod:2218
21550 " is-symlink path\n"
21555 #: ../fish/guestfish-actions.pod:2225
21556 msgid "kill-subprocess"
21560 #: ../fish/guestfish-actions.pod:2227
21563 " kill-subprocess\n"
21568 #: ../fish/guestfish-actions.pod:2231
21573 #: ../fish/guestfish-actions.pod:2233
21578 #: ../fish/guestfish-actions.pod:2235
21586 #: ../fish/guestfish-actions.pod:2243
21591 #: ../fish/guestfish-actions.pod:2245
21594 " lchown owner group path\n"
21599 #: ../fish/guestfish-actions.pod:2247
21601 "Change the file owner to C<owner> and group to C<group>. This is like "
21602 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
21607 #: ../fish/guestfish-actions.pod:2255
21612 #: ../fish/guestfish-actions.pod:2257
21615 " lgetxattr path name\n"
21620 #: ../fish/guestfish-actions.pod:2273
21621 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
21625 #: ../fish/guestfish-actions.pod:2275
21630 #: ../fish/guestfish-actions.pod:2277
21633 " lgetxattrs path\n"
21638 #: ../fish/guestfish-actions.pod:2279
21640 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
21641 "it returns the extended attributes of the link itself."
21645 #: ../fish/guestfish-actions.pod:2283
21646 msgid "list-devices"
21650 #: ../fish/guestfish-actions.pod:2285
21658 #: ../fish/guestfish-actions.pod:2293
21659 msgid "list-filesystems"
21663 #: ../fish/guestfish-actions.pod:2295
21666 " list-filesystems\n"
21671 #: ../fish/guestfish-actions.pod:2314
21673 "This command runs other libguestfs commands, which might include L</mount> "
21674 "and L</umount>, and therefore you should use this soon after launch and only "
21675 "when nothing is mounted."
21679 #: ../fish/guestfish-actions.pod:2318
21681 "Not all of the filesystems returned will be mountable. In particular, swap "
21682 "partitions are returned in the list. Also this command does not check that "
21683 "each filesystem found is valid and mountable, and some filesystems might be "
21684 "mountable but require special options. Filesystems may not all belong to a "
21685 "single logical operating system (use L</inspect-os> to look for OSes)."
21689 #: ../fish/guestfish-actions.pod:2326
21690 msgid "list-partitions"
21694 #: ../fish/guestfish-actions.pod:2328
21697 " list-partitions\n"
21702 #: ../fish/guestfish-actions.pod:2334
21704 "This does not return logical volumes. For that you will need to call "
21709 #: ../fish/guestfish-actions.pod:2339
21714 #: ../fish/guestfish-actions.pod:2341
21722 #: ../fish/guestfish-actions.pod:2349
21727 #: ../fish/guestfish-actions.pod:2351
21730 " ln target linkname\n"
21735 #: ../fish/guestfish-actions.pod:2355
21740 #: ../fish/guestfish-actions.pod:2357
21743 " ln-f target linkname\n"
21748 #: ../fish/guestfish-actions.pod:2362
21753 #: ../fish/guestfish-actions.pod:2364
21756 " ln-s target linkname\n"
21761 #: ../fish/guestfish-actions.pod:2368
21766 #: ../fish/guestfish-actions.pod:2370
21769 " ln-sf target linkname\n"
21774 #: ../fish/guestfish-actions.pod:2375
21775 msgid "lremovexattr"
21779 #: ../fish/guestfish-actions.pod:2377
21782 " lremovexattr xattr path\n"
21787 #: ../fish/guestfish-actions.pod:2379
21789 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
21790 "it removes an extended attribute of the link itself."
21794 #: ../fish/guestfish-actions.pod:2383
21799 #: ../fish/guestfish-actions.pod:2385
21807 #: ../fish/guestfish-actions.pod:2391
21809 "This command is mostly useful for interactive sessions. Programs should "
21810 "probably use L</readdir> instead."
21814 #: ../fish/guestfish-actions.pod:2394
21819 #: ../fish/guestfish-actions.pod:2396
21822 " lsetxattr xattr val vallen path\n"
21827 #: ../fish/guestfish-actions.pod:2398
21829 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
21830 "sets an extended attribute of the link itself."
21834 #: ../fish/guestfish-actions.pod:2402
21839 #: ../fish/guestfish-actions.pod:2404
21847 #: ../fish/guestfish-actions.pod:2408
21849 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
21850 "the link is stat-ed, not the file it refers to."
21854 #: ../fish/guestfish-actions.pod:2414
21859 #: ../fish/guestfish-actions.pod:2416
21862 " lstatlist path 'names ...'\n"
21867 #: ../fish/guestfish-actions.pod:2418
21869 "This call allows you to perform the L</lstat> operation on multiple files, "
21870 "where all files are in the directory C<path>. C<names> is the list of files "
21871 "from this directory."
21875 #: ../fish/guestfish-actions.pod:2427
21877 "This call is intended for programs that want to efficiently list a directory "
21878 "contents without making many round-trips. See also L</lxattrlist> for a "
21879 "similarly efficient call for getting extended attributes. Very long "
21880 "directory listings might cause the protocol message size to be exceeded, "
21881 "causing this call to fail. The caller must split up such requests into "
21882 "smaller groups of names."
21886 #: ../fish/guestfish-actions.pod:2435
21887 msgid "luks-add-key"
21891 #: ../fish/guestfish-actions.pod:2437
21894 " luks-add-key device keyslot\n"
21899 #: ../fish/guestfish-actions.pod:2444
21901 "Note that if C<keyslot> already contains a key, then this command will "
21902 "fail. You have to use L</luks-kill-slot> first to remove that key."
21906 #: ../fish/guestfish-actions.pod:2448 ../fish/guestfish-actions.pod:2470 ../fish/guestfish-actions.pod:2483 ../fish/guestfish-actions.pod:2497 ../fish/guestfish-actions.pod:2520 ../fish/guestfish-actions.pod:2530
21908 "This command has one or more key or passphrase parameters. Guestfish will "
21909 "prompt for these separately."
21913 #: ../fish/guestfish-actions.pod:2451
21918 #: ../fish/guestfish-actions.pod:2453
21921 " luks-close device\n"
21926 #: ../fish/guestfish-actions.pod:2455
21928 "This closes a LUKS device that was created earlier by L</luks-open> or "
21929 "L</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
21930 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
21931 "underlying block device."
21935 #: ../fish/guestfish-actions.pod:2461
21936 msgid "luks-format"
21940 #: ../fish/guestfish-actions.pod:2463
21943 " luks-format device keyslot\n"
21948 #: ../fish/guestfish-actions.pod:2476
21949 msgid "luks-format-cipher"
21953 #: ../fish/guestfish-actions.pod:2478
21956 " luks-format-cipher device keyslot cipher\n"
21961 #: ../fish/guestfish-actions.pod:2480
21963 "This command is the same as L</luks-format> but it also allows you to set "
21964 "the C<cipher> used."
21968 #: ../fish/guestfish-actions.pod:2489
21969 msgid "luks-kill-slot"
21973 #: ../fish/guestfish-actions.pod:2491
21976 " luks-kill-slot device keyslot\n"
21981 #: ../fish/guestfish-actions.pod:2500
21986 #: ../fish/guestfish-actions.pod:2502
21989 " luks-open device mapname\n"
21994 #: ../fish/guestfish-actions.pod:2516
21996 "If this block device contains LVM volume groups, then calling L</vgscan> "
21997 "followed by L</vg-activate-all> will make them visible."
22001 #: ../fish/guestfish-actions.pod:2523
22002 msgid "luks-open-ro"
22006 #: ../fish/guestfish-actions.pod:2525
22009 " luks-open-ro device mapname\n"
22014 #: ../fish/guestfish-actions.pod:2527
22016 "This is the same as L</luks-open> except that a read-only mapping is "
22021 #: ../fish/guestfish-actions.pod:2533
22026 #: ../fish/guestfish-actions.pod:2535
22029 " lvcreate logvol volgroup mbytes\n"
22034 #: ../fish/guestfish-actions.pod:2540
22035 msgid "lvm-canonical-lv-name"
22039 #: ../fish/guestfish-actions.pod:2542
22042 " lvm-canonical-lv-name lvname\n"
22047 #: ../fish/guestfish-actions.pod:2551
22048 msgid "See also L</is-lv>."
22052 #: ../fish/guestfish-actions.pod:2553
22053 msgid "lvm-clear-filter"
22057 #: ../fish/guestfish-actions.pod:2555
22060 " lvm-clear-filter\n"
22065 #: ../fish/guestfish-actions.pod:2557
22067 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
22072 #: ../fish/guestfish-actions.pod:2563
22073 msgid "lvm-remove-all"
22077 #: ../fish/guestfish-actions.pod:2565
22080 " lvm-remove-all\n"
22085 #: ../fish/guestfish-actions.pod:2573
22086 msgid "lvm-set-filter"
22090 #: ../fish/guestfish-actions.pod:2575
22093 " lvm-set-filter 'devices ...'\n"
22098 #: ../fish/guestfish-actions.pod:2600
22103 #: ../fish/guestfish-actions.pod:2602
22106 " lvremove device\n"
22111 #: ../fish/guestfish-actions.pod:2610
22116 #: ../fish/guestfish-actions.pod:2612
22119 " lvrename logvol newlogvol\n"
22124 #: ../fish/guestfish-actions.pod:2616
22129 #: ../fish/guestfish-actions.pod:2618
22132 " lvresize device mbytes\n"
22137 #: ../fish/guestfish-actions.pod:2624
22138 msgid "lvresize-free"
22142 #: ../fish/guestfish-actions.pod:2626
22145 " lvresize-free lv percent\n"
22150 #: ../fish/guestfish-actions.pod:2634
22155 #: ../fish/guestfish-actions.pod:2636
22163 #: ../fish/guestfish-actions.pod:2644
22164 msgid "See also L</lvs-full>, L</list-filesystems>."
22168 #: ../fish/guestfish-actions.pod:2646
22173 #: ../fish/guestfish-actions.pod:2648
22181 #: ../fish/guestfish-actions.pod:2653
22186 #: ../fish/guestfish-actions.pod:2655
22194 #: ../fish/guestfish-actions.pod:2659
22199 #: ../fish/guestfish-actions.pod:2661
22202 " lxattrlist path 'names ...'\n"
22207 #: ../fish/guestfish-actions.pod:2677
22209 "This call is intended for programs that want to efficiently list a directory "
22210 "contents without making many round-trips. See also L</lstatlist> for a "
22211 "similarly efficient call for getting standard stats. Very long directory "
22212 "listings might cause the protocol message size to be exceeded, causing this "
22213 "call to fail. The caller must split up such requests into smaller groups of "
22218 #: ../fish/guestfish-actions.pod:2685
22223 #: ../fish/guestfish-actions.pod:2687
22231 #: ../fish/guestfish-actions.pod:2691
22236 #: ../fish/guestfish-actions.pod:2693
22239 " mkdir-mode path mode\n"
22244 #: ../fish/guestfish-actions.pod:2702
22245 msgid "See also L</mkdir>, L</umask>"
22249 #: ../fish/guestfish-actions.pod:2704
22254 #: ../fish/guestfish-actions.pod:2706
22262 #: ../fish/guestfish-actions.pod:2711
22267 #: ../fish/guestfish-actions.pod:2713
22270 " mkdtemp template\n"
22275 #: ../fish/guestfish-actions.pod:2734
22280 #: ../fish/guestfish-actions.pod:2736
22283 " mke2fs-J fstype blocksize device journal\n"
22288 #: ../fish/guestfish-actions.pod:2744
22289 msgid "See also L</mke2journal>."
22293 #: ../fish/guestfish-actions.pod:2746
22298 #: ../fish/guestfish-actions.pod:2748
22301 " mke2fs-JL fstype blocksize device label\n"
22306 #: ../fish/guestfish-actions.pod:2753
22307 msgid "See also L</mke2journal-L>."
22311 #: ../fish/guestfish-actions.pod:2755
22316 #: ../fish/guestfish-actions.pod:2757
22319 " mke2fs-JU fstype blocksize device uuid\n"
22324 #: ../fish/guestfish-actions.pod:2762
22325 msgid "See also L</mke2journal-U>."
22329 #: ../fish/guestfish-actions.pod:2764
22330 msgid "mke2journal"
22334 #: ../fish/guestfish-actions.pod:2766
22337 " mke2journal blocksize device\n"
22342 #: ../fish/guestfish-actions.pod:2773
22343 msgid "mke2journal-L"
22347 #: ../fish/guestfish-actions.pod:2775
22350 " mke2journal-L blocksize label device\n"
22355 #: ../fish/guestfish-actions.pod:2779
22356 msgid "mke2journal-U"
22360 #: ../fish/guestfish-actions.pod:2781
22363 " mke2journal-U blocksize uuid device\n"
22368 #: ../fish/guestfish-actions.pod:2785
22373 #: ../fish/guestfish-actions.pod:2787
22376 " mkfifo mode path\n"
22381 #: ../fish/guestfish-actions.pod:2789
22383 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
22384 "is just a convenient wrapper around L</mknod>."
22388 #: ../fish/guestfish-actions.pod:2795
22393 #: ../fish/guestfish-actions.pod:2797
22396 " mkfs fstype device\n"
22401 #: ../fish/guestfish-actions.pod:2803
22406 #: ../fish/guestfish-actions.pod:2805
22409 " mkfs-b fstype blocksize device\n"
22414 #: ../fish/guestfish-actions.pod:2807
22416 "This call is similar to L</mkfs>, but it allows you to control the block "
22417 "size of the resulting filesystem. Supported block sizes depend on the "
22418 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
22422 #: ../fish/guestfish-actions.pod:2822
22427 #: ../fish/guestfish-actions.pod:2824
22430 " mkfs-opts fstype device [blocksize:..]\n"
22435 #: ../fish/guestfish-actions.pod:2846
22436 msgid "mkmountpoint"
22440 #: ../fish/guestfish-actions.pod:2848
22443 " mkmountpoint exemptpath\n"
22448 #: ../fish/guestfish-actions.pod:2850
22450 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
22451 "to create extra mountpoints before mounting the first filesystem."
22455 #: ../fish/guestfish-actions.pod:2874
22457 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
22458 "unexpected errors if you try to mix these calls. It is safest to manually "
22459 "unmount filesystems and remove mountpoints after use."
22463 #: ../fish/guestfish-actions.pod:2878
22465 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
22466 "for this to work for manual mountpoints, you must ensure that the innermost "
22467 "mountpoints have the longest pathnames, as in the example code above."
22471 #: ../fish/guestfish-actions.pod:2885
22473 "Autosync [see L</set-autosync>, this is set by default on handles] means "
22474 "that L</umount-all> is called when the handle is closed which can also "
22475 "trigger these issues."
22479 #: ../fish/guestfish-actions.pod:2889
22484 #: ../fish/guestfish-actions.pod:2891
22487 " mknod mode devmajor devminor path\n"
22492 #: ../fish/guestfish-actions.pod:2901
22494 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
22495 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
22496 "regular file). These constants are available in the standard Linux header "
22497 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
22498 "wrappers around this command which bitwise OR in the appropriate constant "
22503 #: ../fish/guestfish-actions.pod:2911
22508 #: ../fish/guestfish-actions.pod:2913
22511 " mknod-b mode devmajor devminor path\n"
22516 #: ../fish/guestfish-actions.pod:2915
22518 "This call creates a block device node called C<path> with mode C<mode> and "
22519 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
22520 "wrapper around L</mknod>."
22524 #: ../fish/guestfish-actions.pod:2921
22529 #: ../fish/guestfish-actions.pod:2923
22532 " mknod-c mode devmajor devminor path\n"
22537 #: ../fish/guestfish-actions.pod:2925
22539 "This call creates a char device node called C<path> with mode C<mode> and "
22540 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
22541 "wrapper around L</mknod>."
22545 #: ../fish/guestfish-actions.pod:2931
22550 #: ../fish/guestfish-actions.pod:2933
22558 #: ../fish/guestfish-actions.pod:2937
22563 #: ../fish/guestfish-actions.pod:2939
22566 " mkswap-L label device\n"
22571 #: ../fish/guestfish-actions.pod:2947
22576 #: ../fish/guestfish-actions.pod:2949
22579 " mkswap-U uuid device\n"
22584 #: ../fish/guestfish-actions.pod:2953
22585 msgid "mkswap-file"
22589 #: ../fish/guestfish-actions.pod:2955
22592 " mkswap-file path\n"
22597 #: ../fish/guestfish-actions.pod:2959
22599 "This command just writes a swap file signature to an existing file. To "
22600 "create the file itself, use something like L</fallocate>."
22604 #: ../fish/guestfish-actions.pod:2962
22609 #: ../fish/guestfish-actions.pod:2964
22612 " modprobe modulename\n"
22617 #: ../fish/guestfish-actions.pod:2971
22622 #: ../fish/guestfish-actions.pod:2973
22625 " mount device mountpoint\n"
22630 #: ../fish/guestfish-actions.pod:2989
22632 "B<Important note:> When you use this call, the filesystem options C<sync> "
22633 "and C<noatime> are set implicitly. This was originally done because we "
22634 "thought it would improve reliability, but it turns out that I<-o sync> has a "
22635 "very large negative performance impact and negligible effect on "
22636 "reliability. Therefore we recommend that you avoid using L</mount> in any "
22637 "code that needs performance, and instead use L</mount-options> (use an empty "
22638 "string for the first parameter if you don't want any options)."
22642 #: ../fish/guestfish-actions.pod:2999
22647 #: ../fish/guestfish-actions.pod:3001
22650 " mount-loop file mountpoint\n"
22655 #: ../fish/guestfish-actions.pod:3007
22656 msgid "mount-options"
22660 #: ../fish/guestfish-actions.pod:3009
22663 " mount-options options device mountpoint\n"
22668 #: ../fish/guestfish-actions.pod:3011
22670 "This is the same as the L</mount> command, but it allows you to set the "
22671 "mount options as for the L<mount(8)> I<-o> flag."
22675 #: ../fish/guestfish-actions.pod:3019
22680 #: ../fish/guestfish-actions.pod:3021
22683 " mount-ro device mountpoint\n"
22688 #: ../fish/guestfish-actions.pod:3023
22690 "This is the same as the L</mount> command, but it mounts the filesystem with "
22691 "the read-only (I<-o ro>) flag."
22695 #: ../fish/guestfish-actions.pod:3026
22700 #: ../fish/guestfish-actions.pod:3028
22703 " mount-vfs options vfstype device mountpoint\n"
22708 #: ../fish/guestfish-actions.pod:3030
22710 "This is the same as the L</mount> command, but it allows you to set both the "
22711 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
22715 #: ../fish/guestfish-actions.pod:3034
22716 msgid "mountpoints"
22720 #: ../fish/guestfish-actions.pod:3036
22728 #: ../fish/guestfish-actions.pod:3038
22730 "This call is similar to L</mounts>. That call returns a list of devices. "
22731 "This one returns a hash table (map) of device name to directory where the "
22732 "device is mounted."
22736 #: ../fish/guestfish-actions.pod:3042
22741 #: ../fish/guestfish-actions.pod:3044
22749 #: ../fish/guestfish-actions.pod:3051
22750 msgid "See also: L</mountpoints>"
22754 #: ../fish/guestfish-actions.pod:3053
22759 #: ../fish/guestfish-actions.pod:3055
22767 #: ../fish/guestfish-actions.pod:3060
22768 msgid "ntfs-3g-probe"
22772 #: ../fish/guestfish-actions.pod:3062
22775 " ntfs-3g-probe true|false device\n"
22780 #: ../fish/guestfish-actions.pod:3076
22785 #: ../fish/guestfish-actions.pod:3078
22788 " ntfsresize device\n"
22793 #: ../fish/guestfish-actions.pod:3084
22794 msgid "ntfsresize-size"
22798 #: ../fish/guestfish-actions.pod:3086
22801 " ntfsresize-size device size\n"
22806 #: ../fish/guestfish-actions.pod:3088
22808 "This command is the same as L</ntfsresize> except that it allows you to "
22809 "specify the new size (in bytes) explicitly."
22813 #: ../fish/guestfish-actions.pod:3091
22818 #: ../fish/guestfish-actions.pod:3093
22821 " part-add device prlogex startsect endsect\n"
22826 #: ../fish/guestfish-actions.pod:3095
22828 "This command adds a partition to C<device>. If there is no partition table "
22829 "on the device, call L</part-init> first."
22833 #: ../fish/guestfish-actions.pod:3107
22835 "Creating a partition which covers the whole disk is not so easy. Use "
22836 "L</part-disk> to do that."
22840 #: ../fish/guestfish-actions.pod:3110
22845 #: ../fish/guestfish-actions.pod:3112
22848 " part-del device partnum\n"
22853 #: ../fish/guestfish-actions.pod:3120
22858 #: ../fish/guestfish-actions.pod:3122
22861 " part-disk device parttype\n"
22866 #: ../fish/guestfish-actions.pod:3124
22868 "This command is simply a combination of L</part-init> followed by "
22869 "L</part-add> to create a single primary partition covering the whole disk."
22873 #: ../fish/guestfish-actions.pod:3128
22875 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
22876 "possible values are described in L</part-init>."
22880 #: ../fish/guestfish-actions.pod:3134
22881 msgid "part-get-bootable"
22885 #: ../fish/guestfish-actions.pod:3136
22888 " part-get-bootable device partnum\n"
22893 #: ../fish/guestfish-actions.pod:3141
22894 msgid "See also L</part-set-bootable>."
22898 #: ../fish/guestfish-actions.pod:3143
22899 msgid "part-get-mbr-id"
22903 #: ../fish/guestfish-actions.pod:3145
22906 " part-get-mbr-id device partnum\n"
22911 #: ../fish/guestfish-actions.pod:3150 ../fish/guestfish-actions.pod:3288
22913 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
22914 "undefined results for other partition table types (see "
22915 "L</part-get-parttype>)."
22919 #: ../fish/guestfish-actions.pod:3154
22920 msgid "part-get-parttype"
22924 #: ../fish/guestfish-actions.pod:3156
22927 " part-get-parttype device\n"
22932 #: ../fish/guestfish-actions.pod:3161
22934 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
22935 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
22936 "possible, although unusual. See L</part-init> for a full list."
22940 #: ../fish/guestfish-actions.pod:3166
22945 #: ../fish/guestfish-actions.pod:3168
22948 " part-init device parttype\n"
22953 #: ../fish/guestfish-actions.pod:3174
22955 "Initially there are no partitions. Following this, you should call "
22956 "L</part-add> for each partition required."
22960 #: ../fish/guestfish-actions.pod:3237
22965 #: ../fish/guestfish-actions.pod:3239
22968 " part-list device\n"
22973 #: ../fish/guestfish-actions.pod:3254
22975 "Start of the partition I<in bytes>. To get sectors you have to divide by "
22976 "the device's sector size, see L</blockdev-getss>."
22980 #: ../fish/guestfish-actions.pod:3267
22981 msgid "part-set-bootable"
22985 #: ../fish/guestfish-actions.pod:3269
22988 " part-set-bootable device partnum true|false\n"
22993 #: ../fish/guestfish-actions.pod:3278
22994 msgid "part-set-mbr-id"
22998 #: ../fish/guestfish-actions.pod:3280
23001 " part-set-mbr-id device partnum idbyte\n"
23006 #: ../fish/guestfish-actions.pod:3292
23007 msgid "part-set-name"
23011 #: ../fish/guestfish-actions.pod:3294
23014 " part-set-name device partnum name\n"
23019 #: ../fish/guestfish-actions.pod:3302
23020 msgid "part-to-dev"
23024 #: ../fish/guestfish-actions.pod:3304
23027 " part-to-dev partition\n"
23032 #: ../fish/guestfish-actions.pod:3310
23034 "The named partition must exist, for example as a string returned from "
23035 "L</list-partitions>."
23039 #: ../fish/guestfish-actions.pod:3313
23040 msgid "ping-daemon"
23044 #: ../fish/guestfish-actions.pod:3315
23052 #: ../fish/guestfish-actions.pod:3322
23057 #: ../fish/guestfish-actions.pod:3324
23060 " pread path count offset\n"
23065 #: ../fish/guestfish-actions.pod:3332
23066 msgid "See also L</pwrite>, L</pread-device>."
23070 #: ../fish/guestfish-actions.pod:3337
23071 msgid "pread-device"
23075 #: ../fish/guestfish-actions.pod:3339
23078 " pread-device device count offset\n"
23083 #: ../fish/guestfish-actions.pod:3347
23084 msgid "See also L</pread>."
23088 #: ../fish/guestfish-actions.pod:3352
23093 #: ../fish/guestfish-actions.pod:3354
23096 " pvcreate device\n"
23101 #: ../fish/guestfish-actions.pod:3360
23106 #: ../fish/guestfish-actions.pod:3362
23109 " pvremove device\n"
23114 #: ../fish/guestfish-actions.pod:3371
23119 #: ../fish/guestfish-actions.pod:3373
23122 " pvresize device\n"
23127 #: ../fish/guestfish-actions.pod:3378
23128 msgid "pvresize-size"
23132 #: ../fish/guestfish-actions.pod:3380
23135 " pvresize-size device size\n"
23140 #: ../fish/guestfish-actions.pod:3382
23142 "This command is the same as L</pvresize> except that it allows you to "
23143 "specify the new size (in bytes) explicitly."
23147 #: ../fish/guestfish-actions.pod:3385
23152 #: ../fish/guestfish-actions.pod:3387
23160 #: ../fish/guestfish-actions.pod:3395
23161 msgid "See also L</pvs-full>."
23165 #: ../fish/guestfish-actions.pod:3397
23170 #: ../fish/guestfish-actions.pod:3399
23178 #: ../fish/guestfish-actions.pod:3404
23183 #: ../fish/guestfish-actions.pod:3406
23191 #: ../fish/guestfish-actions.pod:3410
23196 #: ../fish/guestfish-actions.pod:3412
23199 " pwrite path content offset\n"
23204 #: ../fish/guestfish-actions.pod:3423
23205 msgid "See also L</pread>, L</pwrite-device>."
23209 #: ../fish/guestfish-actions.pod:3428
23210 msgid "pwrite-device"
23214 #: ../fish/guestfish-actions.pod:3430
23217 " pwrite-device device content offset\n"
23222 #: ../fish/guestfish-actions.pod:3440
23223 msgid "See also L</pwrite>."
23227 #: ../fish/guestfish-actions.pod:3445
23232 #: ../fish/guestfish-actions.pod:3447
23235 " read-file path\n"
23240 #: ../fish/guestfish-actions.pod:3452
23242 "Unlike L</cat>, this function can correctly handle files that contain "
23243 "embedded ASCII NUL characters. However unlike L</download>, this function "
23244 "is limited in the total size of file that can be handled."
23248 #: ../fish/guestfish-actions.pod:3460
23253 #: ../fish/guestfish-actions.pod:3462
23256 " read-lines path\n"
23261 #: ../fish/guestfish-actions.pod:3469
23263 "Note that this function cannot correctly handle binary files (specifically, "
23264 "files containing C<\\0> character which is treated as end of line). For "
23265 "those you need to use the L</read-file> function which has a more complex "
23270 #: ../fish/guestfish-actions.pod:3474
23275 #: ../fish/guestfish-actions.pod:3476
23283 #: ../fish/guestfish-actions.pod:3528
23285 "This function is primarily intended for use by programs. To get a simple "
23286 "list of names, use L</ls>. To get a printable directory for human "
23287 "consumption, use L</ll>."
23291 #: ../fish/guestfish-actions.pod:3532
23296 #: ../fish/guestfish-actions.pod:3534
23304 #: ../fish/guestfish-actions.pod:3538
23305 msgid "readlinklist"
23309 #: ../fish/guestfish-actions.pod:3540
23312 " readlinklist path 'names ...'\n"
23317 #: ../fish/guestfish-actions.pod:3564
23322 #: ../fish/guestfish-actions.pod:3566
23330 #: ../fish/guestfish-actions.pod:3571
23331 msgid "removexattr"
23335 #: ../fish/guestfish-actions.pod:3573
23338 " removexattr xattr path\n"
23343 #: ../fish/guestfish-actions.pod:3578
23344 msgid "See also: L</lremovexattr>, L<attr(5)>."
23348 #: ../fish/guestfish-actions.pod:3580
23353 #: ../fish/guestfish-actions.pod:3582
23356 " resize2fs device\n"
23361 #: ../fish/guestfish-actions.pod:3587
23363 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
23364 "before calling this command. For unknown reasons C<resize2fs> sometimes "
23365 "gives an error about this and sometimes not. In any case, it is always safe "
23366 "to call L</e2fsck-f> before calling this function."
23370 #: ../fish/guestfish-actions.pod:3593
23371 msgid "resize2fs-size"
23375 #: ../fish/guestfish-actions.pod:3595
23378 " resize2fs-size device size\n"
23383 #: ../fish/guestfish-actions.pod:3597
23385 "This command is the same as L</resize2fs> except that it allows you to "
23386 "specify the new size (in bytes) explicitly."
23390 #: ../fish/guestfish-actions.pod:3600
23395 #: ../fish/guestfish-actions.pod:3602
23403 #: ../fish/guestfish-actions.pod:3606
23408 #: ../fish/guestfish-actions.pod:3608
23416 #: ../fish/guestfish-actions.pod:3614
23421 #: ../fish/guestfish-actions.pod:3616
23429 #: ../fish/guestfish-actions.pod:3620
23430 msgid "rmmountpoint"
23434 #: ../fish/guestfish-actions.pod:3622
23437 " rmmountpoint exemptpath\n"
23442 #: ../fish/guestfish-actions.pod:3624
23444 "This calls removes a mountpoint that was previously created with "
23445 "L</mkmountpoint>. See L</mkmountpoint> for full details."
23449 #: ../fish/guestfish-actions.pod:3628
23450 msgid "scrub-device"
23454 #: ../fish/guestfish-actions.pod:3630
23457 " scrub-device device\n"
23462 #: ../fish/guestfish-actions.pod:3641
23467 #: ../fish/guestfish-actions.pod:3643
23470 " scrub-file file\n"
23475 #: ../fish/guestfish-actions.pod:3653
23476 msgid "scrub-freespace"
23480 #: ../fish/guestfish-actions.pod:3655
23483 " scrub-freespace dir\n"
23488 #: ../fish/guestfish-actions.pod:3657
23490 "This command creates the directory C<dir> and then fills it with files until "
23491 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
23492 "deletes them. The intention is to scrub any free space on the partition "
23493 "containing C<dir>."
23497 #: ../fish/guestfish-actions.pod:3666
23502 #: ../fish/guestfish-actions.pod:3668
23507 #: ../fish/guestfish-actions.pod:3670
23510 " set-append append\n"
23515 #: ../fish/guestfish-actions.pod:3681
23516 msgid "set-autosync"
23520 #: ../fish/guestfish-actions.pod:3683
23525 #: ../fish/guestfish-actions.pod:3685
23528 " set-autosync true|false\n"
23533 #: ../fish/guestfish-actions.pod:3687
23535 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
23536 "effort attempt to run L</umount-all> followed by L</sync> when the handle is "
23537 "closed (also if the program exits without closing handles)."
23541 #: ../fish/guestfish-actions.pod:3695
23546 #: ../fish/guestfish-actions.pod:3697
23551 #: ../fish/guestfish-actions.pod:3699
23554 " set-direct true|false\n"
23559 #: ../fish/guestfish-actions.pod:3705
23561 "One consequence of this is that log messages aren't caught by the library "
23562 "and handled by L</set-log-message-callback>, but go straight to stdout."
23566 #: ../fish/guestfish-actions.pod:3714
23567 msgid "set-e2label"
23571 #: ../fish/guestfish-actions.pod:3716
23574 " set-e2label device label\n"
23579 #: ../fish/guestfish-actions.pod:3722
23581 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
23582 "label on a filesystem."
23586 #: ../fish/guestfish-actions.pod:3725
23591 #: ../fish/guestfish-actions.pod:3727
23594 " set-e2uuid device uuid\n"
23599 #: ../fish/guestfish-actions.pod:3734
23601 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
23602 "UUID of a filesystem."
23606 #: ../fish/guestfish-actions.pod:3737
23607 msgid "set-memsize"
23611 #: ../fish/guestfish-actions.pod:3739
23616 #: ../fish/guestfish-actions.pod:3741
23619 " set-memsize memsize\n"
23624 #: ../fish/guestfish-actions.pod:3743
23626 "This sets the memory size in megabytes allocated to the qemu subprocess. "
23627 "This only has any effect if called before L</launch>."
23631 #: ../fish/guestfish-actions.pod:3754
23632 msgid "set-network"
23636 #: ../fish/guestfish-actions.pod:3756
23641 #: ../fish/guestfish-actions.pod:3758
23644 " set-network true|false\n"
23649 #: ../fish/guestfish-actions.pod:3766
23650 msgid "You must call this before calling L</launch>, otherwise it has no effect."
23654 #: ../fish/guestfish-actions.pod:3769
23659 #: ../fish/guestfish-actions.pod:3771
23664 #: ../fish/guestfish-actions.pod:3773
23667 " set-path searchpath\n"
23672 #: ../fish/guestfish-actions.pod:3782
23677 #: ../fish/guestfish-actions.pod:3784
23682 #: ../fish/guestfish-actions.pod:3786
23690 #: ../fish/guestfish-actions.pod:3806
23691 msgid "set-recovery-proc"
23695 #: ../fish/guestfish-actions.pod:3808
23696 msgid "recovery-proc"
23700 #: ../fish/guestfish-actions.pod:3810
23703 " set-recovery-proc true|false\n"
23708 #: ../fish/guestfish-actions.pod:3812
23710 "If this is called with the parameter C<false> then L</launch> does not "
23711 "create a recovery process. The purpose of the recovery process is to stop "
23712 "runaway qemu processes in the case where the main program aborts abruptly."
23716 #: ../fish/guestfish-actions.pod:3817
23718 "This only has any effect if called before L</launch>, and the default is "
23723 #: ../fish/guestfish-actions.pod:3826
23724 msgid "set-selinux"
23728 #: ../fish/guestfish-actions.pod:3828
23733 #: ../fish/guestfish-actions.pod:3830
23736 " set-selinux true|false\n"
23741 #: ../fish/guestfish-actions.pod:3841
23746 #: ../fish/guestfish-actions.pod:3843
23751 #: ../fish/guestfish-actions.pod:3845
23754 " set-trace true|false\n"
23759 #: ../fish/guestfish-actions.pod:3861
23760 msgid "set-verbose"
23764 #: ../fish/guestfish-actions.pod:3863
23769 #: ../fish/guestfish-actions.pod:3865
23772 " set-verbose true|false\n"
23777 #: ../fish/guestfish-actions.pod:3872
23782 #: ../fish/guestfish-actions.pod:3874
23785 " setcon context\n"
23790 #: ../fish/guestfish-actions.pod:3881
23795 #: ../fish/guestfish-actions.pod:3883
23798 " setxattr xattr val vallen path\n"
23803 #: ../fish/guestfish-actions.pod:3889
23804 msgid "See also: L</lsetxattr>, L<attr(5)>."
23808 #: ../fish/guestfish-actions.pod:3891
23813 #: ../fish/guestfish-actions.pod:3893
23816 " sfdisk device cyls heads sectors 'lines ...'\n"
23821 #: ../fish/guestfish-actions.pod:3915
23822 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
23826 #: ../fish/guestfish-actions.pod:3921
23831 #: ../fish/guestfish-actions.pod:3923
23834 " sfdiskM device 'lines ...'\n"
23839 #: ../fish/guestfish-actions.pod:3925
23841 "This is a simplified interface to the L</sfdisk> command, where partition "
23842 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
23843 "you don't need to specify the cyls, heads and sectors parameters which were "
23844 "rarely if ever used anyway."
23848 #: ../fish/guestfish-actions.pod:3931
23849 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
23853 #: ../fish/guestfish-actions.pod:3937
23858 #: ../fish/guestfish-actions.pod:3939
23861 " sfdisk-N device partnum cyls heads sectors line\n"
23866 #: ../fish/guestfish-actions.pod:3944
23868 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
23869 "cyls/heads/sectors parameters."
23873 #: ../fish/guestfish-actions.pod:3947
23874 msgid "See also: L</part-add>"
23878 #: ../fish/guestfish-actions.pod:3952
23879 msgid "sfdisk-disk-geometry"
23883 #: ../fish/guestfish-actions.pod:3954
23886 " sfdisk-disk-geometry device\n"
23891 #: ../fish/guestfish-actions.pod:3956
23893 "This displays the disk geometry of C<device> read from the partition table. "
23894 "Especially in the case where the underlying block device has been resized, "
23895 "this can be different from the kernel's idea of the geometry (see "
23896 "L</sfdisk-kernel-geometry>)."
23900 #: ../fish/guestfish-actions.pod:3964
23901 msgid "sfdisk-kernel-geometry"
23905 #: ../fish/guestfish-actions.pod:3966
23908 " sfdisk-kernel-geometry device\n"
23913 #: ../fish/guestfish-actions.pod:3973
23918 #: ../fish/guestfish-actions.pod:3975
23921 " sfdisk-l device\n"
23926 #: ../fish/guestfish-actions.pod:3981
23927 msgid "See also: L</part-list>"
23931 #: ../fish/guestfish-actions.pod:3983
23936 #: ../fish/guestfish-actions.pod:3985
23944 #: ../fish/guestfish-actions.pod:3990
23945 msgid "This is like L</command>, but passes the command to:"
23949 #: ../fish/guestfish-actions.pod:3998
23950 msgid "All the provisos about L</command> apply to this call."
23954 #: ../fish/guestfish-actions.pod:4000
23959 #: ../fish/guestfish-actions.pod:4002
23962 " sh-lines command\n"
23967 #: ../fish/guestfish-actions.pod:4004
23968 msgid "This is the same as L</sh>, but splits the result into a list of lines."
23972 #: ../fish/guestfish-actions.pod:4007
23973 msgid "See also: L</command-lines>"
23977 #: ../fish/guestfish-actions.pod:4009
23982 #: ../fish/guestfish-actions.pod:4011
23990 #: ../fish/guestfish-actions.pod:4015
23995 #: ../fish/guestfish-actions.pod:4017
24003 #: ../fish/guestfish-actions.pod:4023
24008 #: ../fish/guestfish-actions.pod:4025
24016 #: ../fish/guestfish-actions.pod:4033
24021 #: ../fish/guestfish-actions.pod:4035
24029 #: ../fish/guestfish-actions.pod:4043
24034 #: ../fish/guestfish-actions.pod:4045
24037 " strings-e encoding path\n"
24042 #: ../fish/guestfish-actions.pod:4047
24044 "This is like the L</strings> command, but allows you to specify the encoding "
24045 "of strings that are looked for in the source file C<path>."
24049 #: ../fish/guestfish-actions.pod:4057
24051 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
24052 "ISO-8859-X (this is what L</strings> uses)."
24056 #: ../fish/guestfish-actions.pod:4089
24057 msgid "swapoff-device"
24061 #: ../fish/guestfish-actions.pod:4091
24064 " swapoff-device device\n"
24069 #: ../fish/guestfish-actions.pod:4093
24071 "This command disables the libguestfs appliance swap device or partition "
24072 "named C<device>. See L</swapon-device>."
24076 #: ../fish/guestfish-actions.pod:4097
24077 msgid "swapoff-file"
24081 #: ../fish/guestfish-actions.pod:4099
24084 " swapoff-file file\n"
24089 #: ../fish/guestfish-actions.pod:4103
24090 msgid "swapoff-label"
24094 #: ../fish/guestfish-actions.pod:4105
24097 " swapoff-label label\n"
24102 #: ../fish/guestfish-actions.pod:4110
24103 msgid "swapoff-uuid"
24107 #: ../fish/guestfish-actions.pod:4112
24110 " swapoff-uuid uuid\n"
24115 #: ../fish/guestfish-actions.pod:4117
24116 msgid "swapon-device"
24120 #: ../fish/guestfish-actions.pod:4119
24123 " swapon-device device\n"
24128 #: ../fish/guestfish-actions.pod:4121
24130 "This command enables the libguestfs appliance to use the swap device or "
24131 "partition named C<device>. The increased memory is made available for all "
24132 "commands, for example those run using L</command> or L</sh>."
24136 #: ../fish/guestfish-actions.pod:4133
24137 msgid "swapon-file"
24141 #: ../fish/guestfish-actions.pod:4135
24144 " swapon-file file\n"
24149 #: ../fish/guestfish-actions.pod:4137
24150 msgid "This command enables swap to a file. See L</swapon-device> for other notes."
24154 #: ../fish/guestfish-actions.pod:4140
24155 msgid "swapon-label"
24159 #: ../fish/guestfish-actions.pod:4142
24162 " swapon-label label\n"
24167 #: ../fish/guestfish-actions.pod:4144
24169 "This command enables swap to a labeled swap partition. See "
24170 "L</swapon-device> for other notes."
24174 #: ../fish/guestfish-actions.pod:4147
24175 msgid "swapon-uuid"
24179 #: ../fish/guestfish-actions.pod:4149
24182 " swapon-uuid uuid\n"
24187 #: ../fish/guestfish-actions.pod:4151
24189 "This command enables swap to a swap partition with the given UUID. See "
24190 "L</swapon-device> for other notes."
24194 #: ../fish/guestfish-actions.pod:4154
24199 #: ../fish/guestfish-actions.pod:4156
24207 #: ../fish/guestfish-actions.pod:4164
24212 #: ../fish/guestfish-actions.pod:4166
24220 #: ../fish/guestfish-actions.pod:4174
24225 #: ../fish/guestfish-actions.pod:4176
24228 " tail-n nrlines path\n"
24233 #: ../fish/guestfish-actions.pod:4189
24238 #: ../fish/guestfish-actions.pod:4191
24241 " tar-in (tarfile|-) directory\n"
24246 #: ../fish/guestfish-actions.pod:4196
24247 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
24251 #: ../fish/guestfish-actions.pod:4201
24256 #: ../fish/guestfish-actions.pod:4203
24259 " tar-out directory (tarfile|-)\n"
24264 #: ../fish/guestfish-actions.pod:4208
24265 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
24269 #: ../fish/guestfish-actions.pod:4213
24274 #: ../fish/guestfish-actions.pod:4215
24277 " tgz-in (tarball|-) directory\n"
24282 #: ../fish/guestfish-actions.pod:4220
24283 msgid "To upload an uncompressed tarball, use L</tar-in>."
24287 #: ../fish/guestfish-actions.pod:4224
24292 #: ../fish/guestfish-actions.pod:4226
24295 " tgz-out directory (tarball|-)\n"
24300 #: ../fish/guestfish-actions.pod:4231
24301 msgid "To download an uncompressed tarball, use L</tar-out>."
24305 #: ../fish/guestfish-actions.pod:4235
24310 #: ../fish/guestfish-actions.pod:4237
24318 #: ../fish/guestfish-actions.pod:4246
24323 #: ../fish/guestfish-actions.pod:4248
24331 #: ../fish/guestfish-actions.pod:4253
24332 msgid "truncate-size"
24336 #: ../fish/guestfish-actions.pod:4255
24339 " truncate-size path size\n"
24344 #: ../fish/guestfish-actions.pod:4260
24346 "If the current file size is less than C<size> then the file is extended to "
24347 "the required size with zero bytes. This creates a sparse file (ie. disk "
24348 "blocks are not allocated for the file until you write to it). To create a "
24349 "non-sparse file of zeroes, use L</fallocate64> instead."
24353 #: ../fish/guestfish-actions.pod:4266
24358 #: ../fish/guestfish-actions.pod:4268
24361 " tune2fs-l device\n"
24366 #: ../fish/guestfish-actions.pod:4278
24371 #: ../fish/guestfish-actions.pod:4280
24374 " txz-in (tarball|-) directory\n"
24379 #: ../fish/guestfish-actions.pod:4287
24384 #: ../fish/guestfish-actions.pod:4289
24387 " txz-out directory (tarball|-)\n"
24392 #: ../fish/guestfish-actions.pod:4296
24397 #: ../fish/guestfish-actions.pod:4298
24405 #: ../fish/guestfish-actions.pod:4312
24406 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
24410 #: ../fish/guestfish-actions.pod:4317
24415 #: ../fish/guestfish-actions.pod:4319
24420 #: ../fish/guestfish-actions.pod:4321
24423 " umount pathordevice\n"
24428 #: ../fish/guestfish-actions.pod:4327
24433 #: ../fish/guestfish-actions.pod:4329
24434 msgid "unmount-all"
24438 #: ../fish/guestfish-actions.pod:4331
24446 #: ../fish/guestfish-actions.pod:4337
24451 #: ../fish/guestfish-actions.pod:4339
24454 " upload (filename|-) remotefilename\n"
24459 #: ../fish/guestfish-actions.pod:4346
24460 msgid "See also L</download>."
24464 #: ../fish/guestfish-actions.pod:4350
24465 msgid "upload-offset"
24469 #: ../fish/guestfish-actions.pod:4352
24472 " upload-offset (filename|-) remotefilename offset\n"
24477 #: ../fish/guestfish-actions.pod:4364
24479 "Note that there is no limit on the amount of data that can be uploaded with "
24480 "this call, unlike with L</pwrite>, and this call always writes the full "
24481 "amount unless an error occurs."
24485 #: ../fish/guestfish-actions.pod:4369
24486 msgid "See also L</upload>, L</pwrite>."
24490 #: ../fish/guestfish-actions.pod:4373
24495 #: ../fish/guestfish-actions.pod:4375
24498 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
24503 #: ../fish/guestfish-actions.pod:4394
24508 #: ../fish/guestfish-actions.pod:4396
24516 #: ../fish/guestfish-actions.pod:4423
24518 "I<Note:> Don't use this call to test for availability of features. In "
24519 "enterprise distributions we backport features from later versions into "
24520 "earlier versions, making this an unreliable way to test for features. Use "
24521 "L</available> instead."
24525 #: ../fish/guestfish-actions.pod:4429
24530 #: ../fish/guestfish-actions.pod:4431
24533 " vfs-label device\n"
24538 #: ../fish/guestfish-actions.pod:4438
24539 msgid "To find a filesystem from the label, use L</findfs-label>."
24543 #: ../fish/guestfish-actions.pod:4440
24548 #: ../fish/guestfish-actions.pod:4442
24551 " vfs-type device\n"
24556 #: ../fish/guestfish-actions.pod:4452
24561 #: ../fish/guestfish-actions.pod:4454
24564 " vfs-uuid device\n"
24569 #: ../fish/guestfish-actions.pod:4461
24570 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
24574 #: ../fish/guestfish-actions.pod:4463
24575 msgid "vg-activate"
24579 #: ../fish/guestfish-actions.pod:4465
24582 " vg-activate true|false 'volgroups ...'\n"
24587 #: ../fish/guestfish-actions.pod:4478
24588 msgid "vg-activate-all"
24592 #: ../fish/guestfish-actions.pod:4480
24595 " vg-activate-all true|false\n"
24600 #: ../fish/guestfish-actions.pod:4490
24605 #: ../fish/guestfish-actions.pod:4492
24608 " vgcreate volgroup 'physvols ...'\n"
24613 #: ../fish/guestfish-actions.pod:4497
24618 #: ../fish/guestfish-actions.pod:4499
24621 " vglvuuids vgname\n"
24626 #: ../fish/guestfish-actions.pod:4504
24628 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
24629 "logical volumes and volume groups."
24633 #: ../fish/guestfish-actions.pod:4507
24634 msgid "See also L</vgpvuuids>."
24638 #: ../fish/guestfish-actions.pod:4509
24643 #: ../fish/guestfish-actions.pod:4511
24646 " vgpvuuids vgname\n"
24651 #: ../fish/guestfish-actions.pod:4516
24653 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
24654 "physical volumes and volume groups."
24658 #: ../fish/guestfish-actions.pod:4519
24659 msgid "See also L</vglvuuids>."
24663 #: ../fish/guestfish-actions.pod:4521
24668 #: ../fish/guestfish-actions.pod:4523
24671 " vgremove vgname\n"
24676 #: ../fish/guestfish-actions.pod:4530
24681 #: ../fish/guestfish-actions.pod:4532
24684 " vgrename volgroup newvolgroup\n"
24689 #: ../fish/guestfish-actions.pod:4536
24694 #: ../fish/guestfish-actions.pod:4538
24702 #: ../fish/guestfish-actions.pod:4546
24703 msgid "See also L</vgs-full>."
24707 #: ../fish/guestfish-actions.pod:4548
24712 #: ../fish/guestfish-actions.pod:4550
24720 #: ../fish/guestfish-actions.pod:4555
24725 #: ../fish/guestfish-actions.pod:4557
24733 #: ../fish/guestfish-actions.pod:4562
24738 #: ../fish/guestfish-actions.pod:4564
24746 #: ../fish/guestfish-actions.pod:4568
24751 #: ../fish/guestfish-actions.pod:4570
24759 #: ../fish/guestfish-actions.pod:4575
24764 #: ../fish/guestfish-actions.pod:4577
24772 #: ../fish/guestfish-actions.pod:4582
24777 #: ../fish/guestfish-actions.pod:4584
24785 #: ../fish/guestfish-actions.pod:4589
24790 #: ../fish/guestfish-actions.pod:4591
24793 " write path content\n"
24798 #: ../fish/guestfish-actions.pod:4599
24803 #: ../fish/guestfish-actions.pod:4601
24806 " write-file path content size\n"
24811 #: ../fish/guestfish-actions.pod:4624
24816 #: ../fish/guestfish-actions.pod:4626
24819 " zegrep regex path\n"
24824 #: ../fish/guestfish-actions.pod:4634
24829 #: ../fish/guestfish-actions.pod:4636
24832 " zegrepi regex path\n"
24837 #: ../fish/guestfish-actions.pod:4644
24842 #: ../fish/guestfish-actions.pod:4646
24850 #: ../fish/guestfish-actions.pod:4654
24851 msgid "See also: L</zero-device>, L</scrub-device>."
24855 #: ../fish/guestfish-actions.pod:4656
24856 msgid "zero-device"
24860 #: ../fish/guestfish-actions.pod:4658
24863 " zero-device device\n"
24868 #: ../fish/guestfish-actions.pod:4660
24870 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
24871 "which just zeroes the first few blocks of a device."
24875 #: ../fish/guestfish-actions.pod:4667
24880 #: ../fish/guestfish-actions.pod:4669
24883 " zerofree device\n"
24888 #: ../fish/guestfish-actions.pod:4682
24893 #: ../fish/guestfish-actions.pod:4684
24896 " zfgrep pattern path\n"
24901 #: ../fish/guestfish-actions.pod:4692
24906 #: ../fish/guestfish-actions.pod:4694
24909 " zfgrepi pattern path\n"
24914 #: ../fish/guestfish-actions.pod:4702
24919 #: ../fish/guestfish-actions.pod:4704
24922 " zfile meth path\n"
24927 #: ../fish/guestfish-actions.pod:4711
24928 msgid "Since 1.0.63, use L</file> instead which can now process compressed files."
24932 #: ../fish/guestfish-actions.pod:4721
24937 #: ../fish/guestfish-actions.pod:4723
24940 " zgrep regex path\n"
24945 #: ../fish/guestfish-actions.pod:4731
24950 #: ../fish/guestfish-actions.pod:4733
24953 " zgrepi regex path\n"
24958 #: ../fish/guestfish-commands.pod:1
24963 #: ../fish/guestfish-commands.pod:3
24968 #: ../fish/guestfish-commands.pod:5
24971 " alloc filename size\n"
24976 #: ../fish/guestfish-commands.pod:7
24978 "This creates an empty (zeroed) file of the given size, and then adds so it "
24979 "can be further examined."
24983 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
24984 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
24988 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
24989 msgid "Size can be specified using standard suffixes, eg. C<1M>."
24993 #: ../fish/guestfish-commands.pod:14
24995 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
24996 "image, see L</PREPARED DISK IMAGES>."
25000 #: ../fish/guestfish-commands.pod:17
25005 #: ../fish/guestfish-commands.pod:19
25008 " copy-in local [local ...] /remotedir\n"
25013 #: ../fish/guestfish-commands.pod:21
25015 "C<copy-in> copies local files or directories recursively into the disk "
25016 "image, placing them in the directory called C</remotedir> (which must "
25017 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
25018 "other commands as necessary."
25022 #: ../fish/guestfish-commands.pod:26
25024 "Multiple local files and directories can be specified, but the last "
25025 "parameter must always be a remote directory. Wildcards cannot be used."
25029 #: ../fish/guestfish-commands.pod:30
25034 #: ../fish/guestfish-commands.pod:32
25037 " copy-out remote [remote ...] localdir\n"
25042 #: ../fish/guestfish-commands.pod:34
25044 "C<copy-out> copies remote files or directories recursively out of the disk "
25045 "image, placing them on the host disk in a local directory called C<localdir> "
25046 "(which must exist). This guestfish meta-command turns into a sequence of "
25047 "L</download>, L</tar-out> and other commands as necessary."
25051 #: ../fish/guestfish-commands.pod:40
25053 "Multiple remote files and directories can be specified, but the last "
25054 "parameter must always be a local directory. To download to the current "
25055 "directory, use C<.> as in:"
25059 #: ../fish/guestfish-commands.pod:44
25062 " copy-out /home .\n"
25067 #: ../fish/guestfish-commands.pod:46
25069 "Wildcards cannot be used in the ordinary command, but you can use them with "
25070 "the help of L</glob> like this:"
25074 #: ../fish/guestfish-commands.pod:49
25077 " glob copy-out /home/* .\n"
25082 #: ../fish/guestfish-commands.pod:51
25087 #: ../fish/guestfish-commands.pod:53
25090 " echo [params ...]\n"
25095 #: ../fish/guestfish-commands.pod:55
25096 msgid "This echos the parameters to the terminal."
25100 #: ../fish/guestfish-commands.pod:57
25105 #: ../fish/guestfish-commands.pod:59
25110 #: ../fish/guestfish-commands.pod:61
25115 #: ../fish/guestfish-commands.pod:63
25123 #: ../fish/guestfish-commands.pod:65
25125 "This is used to edit a file. It downloads the file, edits it locally using "
25126 "your editor, then uploads the result."
25130 #: ../fish/guestfish-commands.pod:68
25132 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
25133 "or C<emacs> you will get those corresponding editors."
25137 #: ../fish/guestfish-commands.pod:72
25142 #: ../fish/guestfish-commands.pod:74
25145 " glob command args...\n"
25150 #: ../fish/guestfish-commands.pod:76
25152 "Expand wildcards in any paths in the args list, and run C<command> "
25153 "repeatedly on each matching path."
25157 #: ../fish/guestfish-commands.pod:79
25158 msgid "See L</WILDCARDS AND GLOBBING>."
25162 #: ../fish/guestfish-commands.pod:81
25167 #: ../fish/guestfish-commands.pod:83
25170 " hexedit <filename|device>\n"
25171 " hexedit <filename|device> <max>\n"
25172 " hexedit <filename|device> <start> <max>\n"
25177 #: ../fish/guestfish-commands.pod:87
25179 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
25184 #: ../fish/guestfish-commands.pod:90
25186 "This command works by downloading potentially the whole file or device, "
25187 "editing it locally, then uploading it. If the file or device is large, you "
25188 "have to specify which part you wish to edit by using C<max> and/or C<start> "
25189 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
25190 "usual modifiers allowed such as C<1M> (1 megabyte)."
25194 #: ../fish/guestfish-commands.pod:97
25195 msgid "For example to edit the first few sectors of a disk you might do:"
25199 #: ../fish/guestfish-commands.pod:100
25202 " hexedit /dev/sda 1M\n"
25207 #: ../fish/guestfish-commands.pod:102
25209 "which would allow you to edit anywhere within the first megabyte of the "
25214 #: ../fish/guestfish-commands.pod:105
25215 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
25219 #: ../fish/guestfish-commands.pod:107
25222 " hexedit /dev/sda1 0x400 0x400\n"
25227 #: ../fish/guestfish-commands.pod:109
25228 msgid "(assuming the superblock is in the standard location)."
25232 #: ../fish/guestfish-commands.pod:111
25234 "This command requires the external L<hexedit(1)> program. You can specify "
25235 "another program to use by setting the C<HEXEDITOR> environment variable."
25239 #: ../fish/guestfish-commands.pod:115
25240 msgid "See also L</hexdump>."
25244 #: ../fish/guestfish-commands.pod:117
25249 #: ../fish/guestfish-commands.pod:119
25257 #: ../fish/guestfish-commands.pod:121
25258 msgid "Change the local directory, ie. the current directory of guestfish itself."
25262 #: ../fish/guestfish-commands.pod:124
25263 msgid "Note that C<!cd> won't do what you might expect."
25267 #: ../fish/guestfish-commands.pod:126
25272 #: ../fish/guestfish-commands.pod:128
25277 #: ../fish/guestfish-commands.pod:130
25285 #: ../fish/guestfish-commands.pod:132
25286 msgid "Opens the manual page for guestfish."
25290 #: ../fish/guestfish-commands.pod:134
25295 #: ../fish/guestfish-commands.pod:136
25300 #: ../fish/guestfish-commands.pod:138
25308 #: ../fish/guestfish-commands.pod:140
25316 #: ../fish/guestfish-commands.pod:142
25317 msgid "This is used to view a file."
25321 #: ../fish/guestfish-commands.pod:144
25323 "The default viewer is C<$PAGER>. However if you use the alternate command "
25324 "C<less> you will get the C<less> command specifically."
25328 #: ../fish/guestfish-commands.pod:147
25333 #: ../fish/guestfish-commands.pod:149
25341 #: ../fish/guestfish-commands.pod:151
25343 "Close and reopen the libguestfs handle. It is not necessary to use this "
25344 "normally, because the handle is closed properly when guestfish exits. "
25345 "However this is occasionally useful for testing."
25349 #: ../fish/guestfish-commands.pod:155
25354 #: ../fish/guestfish-commands.pod:157
25357 " sparse filename size\n"
25362 #: ../fish/guestfish-commands.pod:159
25364 "This creates an empty sparse file of the given size, and then adds so it can "
25365 "be further examined."
25369 #: ../fish/guestfish-commands.pod:162
25371 "In all respects it works the same as the L</alloc> command, except that the "
25372 "image file is allocated sparsely, which means that disk blocks are not "
25373 "assigned to the file until they are needed. Sparse disk files only use "
25374 "space when written to, but they are slower and there is a danger you could "
25375 "run out of real disk space during a write operation."
25379 #: ../fish/guestfish-commands.pod:172
25384 #: ../fish/guestfish-commands.pod:174
25392 #: ../fish/guestfish-commands.pod:176
25394 "This command returns a list of the optional groups known to the daemon, and "
25395 "indicates which ones are supported by this build of the libguestfs "
25400 #: ../fish/guestfish-commands.pod:180
25401 msgid "See also L<guestfs(3)/AVAILABILITY>."
25405 #: ../fish/guestfish-commands.pod:182
25410 #: ../fish/guestfish-commands.pod:184
25413 " time command args...\n"
25418 #: ../fish/guestfish-commands.pod:186
25420 "Run the command as usual, but print the elapsed time afterwards. This can "
25421 "be useful for benchmarking operations."
25425 #: ../test-tool/libguestfs-test-tool.pod:5
25426 msgid "libguestfs-test-tool - End user tests for libguestfs"
25430 #: ../test-tool/libguestfs-test-tool.pod:9
25433 " libguestfs-test-tool [--options]\n"
25438 #: ../test-tool/libguestfs-test-tool.pod:13
25440 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
25441 "and developers, to allow them to check basic libguestfs functionality is "
25442 "working. This is needed because libguestfs occasionally breaks for reasons "
25443 "beyond our control: usually because of changes in the underlying qemu or "
25444 "kernel packages, or the host environment."
25448 #: ../test-tool/libguestfs-test-tool.pod:20
25449 msgid "If you suspect a problem in libguestfs, then just run:"
25453 #: ../test-tool/libguestfs-test-tool.pod:22
25456 " libguestfs-test-tool\n"
25461 #: ../test-tool/libguestfs-test-tool.pod:24
25462 msgid "It will print lots of diagnostic messages."
25466 #: ../test-tool/libguestfs-test-tool.pod:26
25467 msgid "If it runs to completion successfully, you will see this near the end:"
25471 #: ../test-tool/libguestfs-test-tool.pod:28
25474 " ===== TEST FINISHED OK =====\n"
25479 #: ../test-tool/libguestfs-test-tool.pod:30
25480 msgid "and the test tool will exit with code 0."
25484 #: ../test-tool/libguestfs-test-tool.pod:32
25486 "If it fails (and/or exits with non-zero error code), please paste the "
25487 "B<complete, unedited> output of the test tool into a bug report. More "
25488 "information about reporting bugs can be found on the "
25489 "L<http://libguestfs.org/> website."
25493 #: ../test-tool/libguestfs-test-tool.pod:41
25498 #: ../test-tool/libguestfs-test-tool.pod:43
25499 msgid "Display short usage information and exit."
25503 #: ../test-tool/libguestfs-test-tool.pod:45
25504 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
25508 #: ../test-tool/libguestfs-test-tool.pod:47
25510 "Pass an alternate name for the helper program. libguestfs-test-tool will "
25511 "normally look in the C<$libexec> directory that was configured when the tool "
25516 #: ../test-tool/libguestfs-test-tool.pod:51
25517 msgid "I<--qemu qemu_binary>"
25521 #: ../test-tool/libguestfs-test-tool.pod:53
25523 "If you have downloaded another qemu binary, point this option at the full "
25524 "path of the binary to try it."
25528 #: ../test-tool/libguestfs-test-tool.pod:56
25529 msgid "I<--qemudir qemu_source_dir>"
25533 #: ../test-tool/libguestfs-test-tool.pod:58
25535 "If you have compiled qemu from source, point this option at the source "
25536 "directory to try it."
25540 #: ../test-tool/libguestfs-test-tool.pod:61
25541 msgid "I<--timeout N>"
25545 #: ../test-tool/libguestfs-test-tool.pod:63
25547 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
25548 "does not usually need to be adjusted unless your machine is very slow."
25552 #: ../test-tool/libguestfs-test-tool.pod:69
25553 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
25557 #: ../test-tool/libguestfs-test-tool.pod:71
25559 "If you have compiled another version of qemu from source and would like to "
25560 "try that, then you can use the I<--qemudir> option to point to the qemu "
25561 "source directory."
25565 #: ../test-tool/libguestfs-test-tool.pod:75
25567 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
25568 "option to point to the binary."
25572 #: ../test-tool/libguestfs-test-tool.pod:78
25574 "When using an alternate qemu with libguestfs, usually you would need to "
25575 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in "
25576 "L<guestfs(3)>). libguestfs-test-tool writes a temporary qemu wrapper script "
25577 "when you use either of the I<--qemudir> or I<--qemu> options."
25581 #: ../test-tool/libguestfs-test-tool.pod:85
25583 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
25584 "I<1> if there was an error."
25588 #: ../test-tool/libguestfs-test-tool.pod:92
25589 msgid "/usr/libexec/libguestfs-test-tool-helper"
25593 #: ../test-tool/libguestfs-test-tool.pod:94
25595 "This helper program is run inside the appliance and provides additional "
25600 #: ../test-tool/libguestfs-test-tool.pod:97
25601 msgid "/usr/bin/mkisofs"
25605 #: ../test-tool/libguestfs-test-tool.pod:99
25607 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
25608 "which is used as part of the tests."
25612 #: ../test-tool/libguestfs-test-tool.pod:106
25614 "For the full list of environment variables which may affect libguestfs, "
25615 "please see the L<guestfs(3)> manual page."
25619 #: ../test-tool/libguestfs-test-tool.pod:111
25620 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
25624 #: ../test-tool/libguestfs-test-tool.pod:121
25625 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
25629 #: ../fuse/guestmount.pod:5
25630 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
25634 #: ../fuse/guestmount.pod:9
25637 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
25642 #: ../fuse/guestmount.pod:11
25645 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
25650 #: ../fuse/guestmount.pod:13
25653 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
25658 #: ../fuse/guestmount.pod:17
25660 "You must I<not> use C<guestmount> in read-write mode on live virtual "
25661 "machines. If you do this, you risk disk corruption in the VM."
25665 #: ../fuse/guestmount.pod:22
25667 "The guestmount program can be used to mount virtual machine filesystems and "
25668 "other disk images on the host. It uses libguestfs for access to the guest "
25669 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
25670 "a mountable device."
25674 #: ../fuse/guestmount.pod:27
25676 "Along with other options, you have to give at least one device (I<-a> "
25677 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
25678 "option) or use the I<-i> inspection option. How this works is better "
25679 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
25684 #: ../fuse/guestmount.pod:33
25686 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
25687 "by you, and the filesystem will not be visible to any other users unless you "
25688 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
25689 "the filesystem, use the C<fusermount -u> command."
25693 #: ../fuse/guestmount.pod:41
25695 "For a typical Windows guest which has its main filesystem on the first "
25700 #: ../fuse/guestmount.pod:44
25703 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
25708 #: ../fuse/guestmount.pod:46
25710 "For a typical Linux guest which has a /boot filesystem on the first "
25711 "partition, and the root filesystem on a logical volume:"
25715 #: ../fuse/guestmount.pod:49
25718 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
25723 #: ../fuse/guestmount.pod:51
25724 msgid "To get libguestfs to detect guest mountpoints for you:"
25728 #: ../fuse/guestmount.pod:53
25731 " guestmount -a guest.img -i --ro /mnt\n"
25736 #: ../fuse/guestmount.pod:55
25737 msgid "For a libvirt guest called \"Guest\" you could do:"
25741 #: ../fuse/guestmount.pod:57
25744 " guestmount -d Guest -i --ro /mnt\n"
25749 #: ../fuse/guestmount.pod:59
25751 "If you don't know what filesystems are contained in a guest or disk image, "
25752 "use L<virt-filesystems(1)> first:"
25756 #: ../fuse/guestmount.pod:62
25759 " virt-filesystems MyGuest\n"
25764 #: ../fuse/guestmount.pod:64
25766 "If you want to trace the libguestfs calls but without excessive debugging "
25767 "information, we recommend:"
25771 #: ../fuse/guestmount.pod:67
25774 " guestmount [...] --trace /mnt\n"
25779 #: ../fuse/guestmount.pod:69
25780 msgid "If you want to debug the program, we recommend:"
25784 #: ../fuse/guestmount.pod:71
25787 " guestmount [...] --trace --verbose /mnt\n"
25792 #: ../fuse/guestmount.pod:77
25793 msgid "B<-a image> | B<--add image>"
25797 #: ../fuse/guestmount.pod:79
25798 msgid "Add a block device or virtual machine image."
25802 #: ../fuse/guestmount.pod:84
25803 msgid "B<-c URI> | B<--connect URI>"
25807 #: ../fuse/guestmount.pod:90
25808 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
25812 #: ../fuse/guestmount.pod:96
25813 msgid "B<--dir-cache-timeout N>"
25817 #: ../fuse/guestmount.pod:98
25819 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
25820 "seconds. The readdir cache [actually, there are several semi-independent "
25821 "caches] is populated after a readdir(2) call with the stat and extended "
25822 "attributes of the files in the directory, in anticipation that they will be "
25823 "requested soon after."
25827 #: ../fuse/guestmount.pod:104
25829 "There is also a different attribute cache implemented by FUSE (see the FUSE "
25830 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
25831 "requests, only cache existing ones."
25835 #: ../fuse/guestmount.pod:115
25836 msgid "B<--format=raw|qcow2|..> | B<--format>"
25840 #: ../fuse/guestmount.pod:122
25842 "If you have untrusted raw-format guest disk images, you should use this "
25843 "option to specify the disk format. This avoids a possible security problem "
25844 "with malicious guests (CVE-2010-3851). See also "
25845 "L<guestfs(3)/guestfs_add_drive_opts>."
25849 #: ../fuse/guestmount.pod:127
25850 msgid "B<--fuse-help>"
25854 #: ../fuse/guestmount.pod:129
25855 msgid "Display help on special FUSE options (see I<-o> below)."
25859 #: ../fuse/guestmount.pod:133
25860 msgid "Display brief help and exit."
25864 #: ../fuse/guestmount.pod:135
25865 msgid "B<-i> | B<--inspector>"
25869 #: ../fuse/guestmount.pod:146
25870 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
25874 #: ../fuse/guestmount.pod:148
25876 "Mount the named partition or logical volume on the given mountpoint B<in the "
25877 "guest> (this has nothing to do with mountpoints in the host)."
25881 #: ../fuse/guestmount.pod:151
25883 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
25884 "something on C</>."
25888 #: ../fuse/guestmount.pod:154
25889 msgid "B<-n> | B<--no-sync>"
25893 #: ../fuse/guestmount.pod:156
25895 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
25896 "unmounted. If you specify this option, then we don't attempt to sync the "
25897 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
25901 #: ../fuse/guestmount.pod:161
25902 msgid "B<-o option> | B<--option option>"
25906 #: ../fuse/guestmount.pod:163
25907 msgid "Pass extra options to FUSE."
25911 #: ../fuse/guestmount.pod:165
25913 "To get a list of all the extra options supported by FUSE, use the command "
25914 "below. Note that only the FUSE I<-o> options can be passed, and only some "
25915 "of them are a good idea."
25919 #: ../fuse/guestmount.pod:169
25922 " guestmount --fuse-help\n"
25927 #: ../fuse/guestmount.pod:171
25928 msgid "Some potentially useful FUSE options:"
25932 #: ../fuse/guestmount.pod:175
25933 msgid "B<-o allow_other>"
25937 #: ../fuse/guestmount.pod:177
25938 msgid "Allow other users to see the filesystem."
25942 #: ../fuse/guestmount.pod:179
25943 msgid "B<-o attr_timeout=N>"
25947 #: ../fuse/guestmount.pod:181
25948 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
25952 #: ../fuse/guestmount.pod:183
25953 msgid "B<-o kernel_cache>"
25957 #: ../fuse/guestmount.pod:185
25959 "Allow the kernel to cache files (reduces the number of reads that have to go "
25960 "through the L<guestfs(3)> API). This is generally a good idea if you can "
25961 "afford the extra memory usage."
25965 #: ../fuse/guestmount.pod:189
25966 msgid "B<-o uid=N> B<-o gid=N>"
25970 #: ../fuse/guestmount.pod:191
25972 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
25973 "the chosen values."
25977 #: ../fuse/guestmount.pod:196
25978 msgid "B<-r> | B<--ro>"
25982 #: ../fuse/guestmount.pod:198
25984 "Add devices and mount everything read-only. Also disallow writes and make "
25985 "the disk appear read-only to FUSE."
25989 #: ../fuse/guestmount.pod:201
25991 "This is highly recommended if you are not going to edit the guest disk. If "
25992 "the guest is running and this option is I<not> supplied, then there is a "
25993 "strong risk of disk corruption in the guest. We try to prevent this from "
25994 "happening, but it is not always possible."
25998 #: ../fuse/guestmount.pod:206
25999 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
26003 #: ../fuse/guestmount.pod:210
26004 msgid "Enable SELinux support for the guest."
26008 #: ../fuse/guestmount.pod:212
26009 msgid "B<-v> | B<--verbose>"
26013 #: ../fuse/guestmount.pod:214
26014 msgid "Enable verbose messages from underlying libguestfs."
26018 #: ../fuse/guestmount.pod:216
26019 msgid "B<-V> | B<--version>"
26023 #: ../fuse/guestmount.pod:218
26024 msgid "Display the program version and exit."
26028 #: ../fuse/guestmount.pod:220
26029 msgid "B<-w> | B<--rw>"
26033 #: ../fuse/guestmount.pod:222
26035 "This option does nothing at the moment. See L<guestfish(1)/OPENING DISKS "
26036 "FOR READ AND WRITE>."
26040 #: ../fuse/guestmount.pod:225
26041 msgid "B<-x> | B<--trace>"
26045 #: ../fuse/guestmount.pod:227
26046 msgid "Trace libguestfs calls and entry into each FUSE function."
26050 #: ../fuse/guestmount.pod:229
26051 msgid "This also stops the daemon from forking into the background."
26055 #: ../fuse/guestmount.pod:235
26057 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
26058 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
26059 "L<http://fuse.sf.net/>."