1 # SOME DESCRIPTIVE TITLE.
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
10 "POT-Creation-Date: 2011-01-11 21:54+0000\n"
11 "PO-Revision-Date: 2010-09-02 14:46+0100\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
21 #: ../src/guestfs.pod:3 ../fish/guestfish.pod:3
22 #: ../test-tool/libguestfs-test-tool.pod:3 ../fuse/guestmount.pod:3
23 #: ../tools/virt-edit.pl:32 ../tools/virt-win-reg.pl:35
24 #: ../tools/virt-resize.pl:40 ../tools/virt-list-filesystems.pl:30
25 #: ../tools/virt-tar.pl:31 ../tools/virt-make-fs.pl:35
26 #: ../tools/virt-list-partitions.pl:30
32 #: ../src/guestfs.pod:5
33 msgid "guestfs - Library for accessing and modifying virtual machine images"
38 #: ../src/guestfs.pod:7 ../fish/guestfish.pod:7
39 #: ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7
40 #: ../tools/virt-edit.pl:36 ../tools/virt-win-reg.pl:39
41 #: ../tools/virt-resize.pl:44 ../tools/virt-list-filesystems.pl:34
42 #: ../tools/virt-tar.pl:35 ../tools/virt-make-fs.pl:39
43 #: ../tools/virt-list-partitions.pl:34
49 #: ../src/guestfs.pod:9
52 " #include <guestfs.h>\n"
58 #: ../src/guestfs.pod:11
61 " guestfs_h *g = guestfs_create ();\n"
62 " guestfs_add_drive (g, \"guest.img\");\n"
63 " guestfs_launch (g);\n"
64 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
65 " guestfs_touch (g, \"/hello\");\n"
66 " guestfs_umount (g, \"/\");\n"
67 " guestfs_close (g);\n"
73 #: ../src/guestfs.pod:19
76 " cc prog.c -o prog -lguestfs\n"
78 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
84 #: ../src/guestfs.pod:23 ../fish/guestfish.pod:30
85 #: ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:20
86 #: ../tools/virt-edit.pl:50 ../tools/virt-win-reg.pl:63
87 #: ../tools/virt-resize.pl:50 ../tools/virt-list-filesystems.pl:40
88 #: ../tools/virt-tar.pl:77 ../tools/virt-make-fs.pl:47
89 #: ../tools/virt-list-partitions.pl:40
95 #: ../src/guestfs.pod:25
97 "Libguestfs is a library for accessing and modifying guest disk images. "
98 "Amongst the things this is good for: making batch configuration changes to "
99 "guests, getting disk used/free statistics (see also: virt-df), migrating "
100 "between virtualization systems (see also: virt-p2v), performing partial "
101 "backups, performing partial guest clones, cloning guests and changing "
102 "registry/UUID/hostname info, and much else besides."
107 #: ../src/guestfs.pod:33
109 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
110 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
111 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
117 #: ../src/guestfs.pod:38
119 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
120 "what filesystem is in each LV, etc.). It can also run commands in the "
121 "context of the guest. Also you can access filesystems over FUSE."
126 #: ../src/guestfs.pod:43
128 "Libguestfs is a library that can be linked with C and C++ management "
129 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
130 "PHP, Haskell or C#). You can also use it from shell scripts or the command "
136 #: ../src/guestfs.pod:48
138 "You don't need to be root to use libguestfs, although obviously you do need "
139 "enough permissions to access the disk images."
144 #: ../src/guestfs.pod:51
146 "Libguestfs is a large API because it can do many things. For a gentle "
147 "introduction, please read the L</API OVERVIEW> section next."
152 #: ../src/guestfs.pod:54
154 "There are also some example programs in the L<guestfs-examples(3)> manual "
160 #: ../src/guestfs.pod:57
166 #: ../src/guestfs.pod:59
168 "This section provides a gentler overview of the libguestfs API. We also try "
169 "to group API calls together, where that may not be obvious from reading "
170 "about the individual calls in the main section of this manual."
175 #: ../src/guestfs.pod:64
181 #: ../src/guestfs.pod:66
183 "Before you can use libguestfs calls, you have to create a handle. Then you "
184 "must add at least one disk image to the handle, followed by launching the "
185 "handle, then performing whatever operations you want, and finally closing "
186 "the handle. By convention we use the single letter C<g> for the name of the "
187 "handle variable, although of course you can use any name you want."
192 #: ../src/guestfs.pod:73
193 msgid "The general structure of all libguestfs-using programs looks like this:"
198 #: ../src/guestfs.pod:76
201 " guestfs_h *g = guestfs_create ();\n"
207 #: ../src/guestfs.pod:78
210 " /* Call guestfs_add_drive additional times if there are\n"
211 " * multiple disk images.\n"
213 " guestfs_add_drive (g, \"guest.img\");\n"
219 #: ../src/guestfs.pod:83
222 " /* Most manipulation calls won't work until you've launched\n"
223 " * the handle 'g'. You have to do this _after_ adding drives\n"
224 " * and _before_ other commands.\n"
226 " guestfs_launch (g);\n"
232 #: ../src/guestfs.pod:89
235 " /* Now you can examine what partitions, LVs etc are available.\n"
237 " char **partitions = guestfs_list_partitions (g);\n"
238 " char **logvols = guestfs_lvs (g);\n"
244 #: ../src/guestfs.pod:94
247 " /* To access a filesystem in the image, you must mount it.\n"
249 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
255 #: ../src/guestfs.pod:98
258 " /* Now you can perform filesystem actions on the guest\n"
261 " guestfs_touch (g, \"/hello\");\n"
267 #: ../src/guestfs.pod:103
270 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
271 " * it is done automatically when you close the handle. See\n"
272 " * discussion of autosync in this page.\n"
274 " guestfs_sync (g);\n"
280 #: ../src/guestfs.pod:109
283 " /* Close the handle 'g'. */\n"
284 " guestfs_close (g);\n"
290 #: ../src/guestfs.pod:112
292 "The code above doesn't include any error checking. In real code you should "
293 "check return values carefully for errors. In general all functions that "
294 "return integers return C<-1> on error, and all functions that return "
295 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
296 "how to handle errors, and consult the documentation for each function call "
297 "below to see precisely how they return error indications. See L<guestfs-"
298 "examples(3)> for fully worked examples."
303 #: ../src/guestfs.pod:121
309 #: ../src/guestfs.pod:123
311 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
312 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
313 "actual block device, or simply an empty file of zeroes that you have created "
314 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
320 #: ../src/guestfs.pod:129
322 "The call you should use in modern code for adding drives is L</"
323 "guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
324 "specifying that the format is raw, do:"
329 #: ../src/guestfs.pod:133
332 " guestfs_add_drive_opts (g, filename,\n"
333 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
340 #: ../src/guestfs.pod:137
341 msgid "You can add a disk read-only using:"
346 #: ../src/guestfs.pod:139
349 " guestfs_add_drive_opts (g, filename,\n"
350 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
351 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
358 #: ../src/guestfs.pod:144
360 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
361 "libguestfs won't modify the file."
366 #: ../src/guestfs.pod:147
368 "Be extremely cautious if the disk image is in use, eg. if it is being used "
369 "by a virtual machine. Adding it read-write will almost certainly cause disk "
370 "corruption, but adding it read-only is safe."
375 #: ../src/guestfs.pod:151
377 "You must add at least one disk image, and you may add multiple disk images. "
378 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
379 "first one you added), C</dev/sdb> (for the second one you added), etc."
384 #: ../src/guestfs.pod:156
386 "Once L</guestfs_launch> has been called you cannot add any more images. You "
387 "can call L</guestfs_list_devices> to get a list of the device names, in the "
388 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
393 #: ../src/guestfs.pod:161
398 #: ../src/guestfs.pod:163
400 "Before you can read or write files, create directories and so on in a disk "
401 "image that contains filesystems, you have to mount those filesystems using "
402 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
403 "a disk image contains (for example) one partition with a filesystem on that "
404 "partition, then you can mount it directly:"
408 #: ../src/guestfs.pod:170
411 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
416 #: ../src/guestfs.pod:172
418 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
419 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
420 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
421 "that these are libguestfs virtual devices, and are nothing to do with host "
426 #: ../src/guestfs.pod:178
428 "If you are given a disk image and you don't know what it contains then you "
429 "have to find out. Libguestfs can do that too: use L</"
430 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
431 "LVs, and either try mounting each to see what is mountable, or else examine "
432 "them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
433 "filesystems, use L</guestfs_list_filesystems>."
437 #: ../src/guestfs.pod:186
439 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
440 "L</INSPECTION> below). But you might find it easier to look at higher level "
441 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
445 #: ../src/guestfs.pod:191
447 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
448 "several other variations of the C<guestfs_mount_*> call."
453 #: ../src/guestfs.pod:194
454 msgid "FILESYSTEM ACCESS AND MODIFICATION"
459 #: ../src/guestfs.pod:196
461 "The majority of the libguestfs API consists of fairly low-level calls for "
462 "accessing and modifying the files, directories, symlinks etc on mounted "
463 "filesystems. There are over a hundred such calls which you can find listed "
464 "in detail below in this man page, and we don't even pretend to cover them "
465 "all in this overview."
470 #: ../src/guestfs.pod:202
472 "Specify filenames as full paths, starting with C<\"/\"> and including the "
478 #: ../src/guestfs.pod:205
480 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
481 "the file called C<\"etc/passwd\"> then you could do:"
486 #: ../src/guestfs.pod:208
489 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
495 #: ../src/guestfs.pod:210
497 "This would return C<data> as a newly allocated buffer containing the full "
498 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
499 "or C<NULL> if there was an error."
504 #: ../src/guestfs.pod:214
506 "As another example, to create a top-level directory on that filesystem "
507 "called C<\"var\"> you would do:"
512 #: ../src/guestfs.pod:217
515 " guestfs_mkdir (g, \"/var\");\n"
521 #: ../src/guestfs.pod:219
522 msgid "To create a symlink you could do:"
527 #: ../src/guestfs.pod:221
530 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
531 " \"/etc/rc3.d/S30portmap\");\n"
537 #: ../src/guestfs.pod:224
539 "Libguestfs will reject attempts to use relative paths and there is no "
540 "concept of a current working directory."
545 #: ../src/guestfs.pod:227
547 "Libguestfs can return errors in many situations: for example if the "
548 "filesystem isn't writable, or if a file or directory that you requested "
549 "doesn't exist. If you are using the C API (documented here) you have to "
550 "check for those error conditions after each call. (Other language bindings "
551 "turn these errors into exceptions)."
556 #: ../src/guestfs.pod:233
558 "File writes are affected by the per-handle umask, set by calling L</"
559 "guestfs_umask> and defaulting to 022. See L</UMASK>."
564 #: ../src/guestfs.pod:236
570 #: ../src/guestfs.pod:238
572 "Libguestfs contains API calls to read, create and modify partition tables on "
578 #: ../src/guestfs.pod:241
580 "In the common case where you want to create a single partition covering the "
581 "whole disk, you should use the L</guestfs_part_disk> call:"
586 #: ../src/guestfs.pod:245
589 " const char *parttype = \"mbr\";\n"
590 " if (disk_is_larger_than_2TB)\n"
591 " parttype = \"gpt\";\n"
592 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
598 #: ../src/guestfs.pod:250
600 "Obviously this effectively wipes anything that was on that disk image before."
605 #: ../src/guestfs.pod:253
611 #: ../src/guestfs.pod:255
613 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
614 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
615 "you familiarize yourself with the concepts of physical volumes, volume "
616 "groups and logical volumes."
621 #: ../src/guestfs.pod:260
623 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
624 "tldp.org/HOWTO/LVM-HOWTO/>."
629 #: ../src/guestfs.pod:263
634 #: ../src/guestfs.pod:265
636 "Use L</guestfs_cat> to download small, text only files. This call is "
637 "limited to files which are less than 2 MB and which cannot contain any ASCII "
638 "NUL (C<\\0>) characters. However the API is very simple to use."
643 #: ../src/guestfs.pod:269
645 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
646 "bit data, since it returns a (pointer, size) pair. However it is still "
647 "limited to \"small\" files, less than 2 MB."
652 #: ../src/guestfs.pod:273
654 "L</guestfs_download> can be used to download any file, with no limits on "
655 "content or size (even files larger than 4 GB)."
660 #: ../src/guestfs.pod:276
662 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
667 #: ../src/guestfs.pod:279
673 #: ../src/guestfs.pod:281
675 "It's often the case that you want to write a file or files to the disk image."
680 #: ../src/guestfs.pod:284
682 "To write a small file with fixed content, use L</guestfs_write>. To create "
683 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
684 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
685 "of other functions for creating test files, for example L</guestfs_fill> and "
686 "L</guestfs_fill_pattern>."
691 #: ../src/guestfs.pod:290
693 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
694 "file content or size (even files larger than 4 GB)."
699 #: ../src/guestfs.pod:293
701 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
706 #: ../src/guestfs.pod:295
708 "However the fastest way to upload I<large numbers of arbitrary files> is to "
709 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
710 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
711 "in a predictable way (eg. adding it last after all other drives) then you "
712 "can get the device name from L</guestfs_list_devices> and mount it directly "
713 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
714 "portable between kernel versions, and they don't support labels or UUIDs. "
715 "If you want to pre-build an image or you need to mount it using a label or "
716 "UUID, use an ISO image instead."
721 #: ../src/guestfs.pod:306
727 #: ../src/guestfs.pod:308
729 "There are various different commands for copying between files and devices "
730 "and in and out of the guest filesystem. These are summarised in the table "
736 #: ../src/guestfs.pod:314
737 msgid "B<file> to B<file>"
742 #: ../src/guestfs.pod:316
744 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
745 "directories recursively."
750 #: ../src/guestfs.pod:319
751 msgid "B<file or device> to B<file or device>"
756 #: ../src/guestfs.pod:321
758 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
759 "devices in the guest."
764 #: ../src/guestfs.pod:324
765 msgid "Example: duplicate the contents of an LV:"
770 #: ../src/guestfs.pod:326
773 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
779 #: ../src/guestfs.pod:328
781 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
782 "(C</dev/VG/Original>). To copy less than the whole source device, use L</"
783 "guestfs_copy_size>."
788 #: ../src/guestfs.pod:332
789 msgid "B<file on the host> to B<file or device>"
794 #: ../src/guestfs.pod:334
795 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
800 #: ../src/guestfs.pod:336
801 msgid "B<file or device> to B<file on the host>"
806 #: ../src/guestfs.pod:338
807 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
812 #: ../src/guestfs.pod:342
813 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
818 #: ../src/guestfs.pod:344
820 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, L</"
821 "guestfs_tar_out> etc appear to only take filenames as arguments, so it "
822 "appears you can only upload and download to files. However many Un*x-like "
823 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, C</"
824 "dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, stderr, "
825 "and arbitrary file descriptor N."
830 #: ../src/guestfs.pod:352
831 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
835 #: ../src/guestfs.pod:355
838 " guestfs_download (g, filename, \"/dev/stdout\");\n"
844 #: ../src/guestfs.pod:357
845 msgid "and you can write tar output to a pipe C<fd> by doing:"
849 #: ../src/guestfs.pod:359
853 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
854 " guestfs_tar_out (g, \"/\", devfd);\n"
860 #: ../src/guestfs.pod:363
861 msgid "LISTING FILES"
866 #: ../src/guestfs.pod:365
868 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
869 "L<guestfish(1)>-equivalent command C<ll>)."
874 #: ../src/guestfs.pod:368
876 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
877 "programs, as a flat list of strings."
882 #: ../src/guestfs.pod:371
884 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
885 "directory, plus additional information about each one. It is more "
886 "equivalent to using the L<readdir(3)> call on a local filesystem."
891 #: ../src/guestfs.pod:375
893 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
898 #: ../src/guestfs.pod:378
899 msgid "RUNNING COMMANDS"
904 #: ../src/guestfs.pod:380
906 "Although libguestfs is primarily an API for manipulating files inside guest "
907 "images, we also provide some limited facilities for running commands inside "
913 #: ../src/guestfs.pod:384
914 msgid "There are many limitations to this:"
919 #: ../src/guestfs.pod:388 ../src/guestfs.pod:393 ../src/guestfs.pod:398
920 #: ../src/guestfs.pod:402 ../src/guestfs.pod:407 ../src/guestfs.pod:411
921 #: ../src/guestfs.pod:416 ../src/guestfs.pod:421 ../src/guestfs.pod:1011
922 #: ../src/guestfs.pod:1015 ../src/guestfs.pod:1019 ../src/guestfs.pod:1024
923 #: ../src/guestfs.pod:1032 ../src/guestfs.pod:1051 ../src/guestfs.pod:1059
924 #: ../src/guestfs.pod:1081 ../src/guestfs.pod:1085 ../src/guestfs.pod:1089
925 #: ../src/guestfs.pod:1093 ../src/guestfs.pod:1097 ../src/guestfs.pod:1101
926 #: ../src/guestfs.pod:1583 ../src/guestfs.pod:1588 ../src/guestfs.pod:1592
927 #: ../src/guestfs.pod:1702 ../src/guestfs.pod:1707 ../src/guestfs.pod:1711
928 #: ../src/guestfs.pod:2063 ../src/guestfs.pod:2069 ../src/guestfs.pod:2074
929 #: ../src/guestfs.pod:2080 ../src/guestfs.pod:2544 ../src/guestfs.pod:2548
930 #: ../src/guestfs.pod:2552 ../src/guestfs.pod:2556
931 #: ../src/guestfs-actions.pod:15 ../src/guestfs-actions.pod:22
932 #: ../src/guestfs-actions.pod:569 ../src/guestfs-actions.pod:577
933 #: ../src/guestfs-actions.pod:584 ../src/guestfs-actions.pod:591
934 #: ../src/guestfs-actions.pod:1587 ../src/guestfs-actions.pod:1591
935 #: ../src/guestfs-actions.pod:1595 ../src/guestfs-actions.pod:1599
936 #: ../src/guestfs-actions.pod:1607 ../src/guestfs-actions.pod:1611
937 #: ../src/guestfs-actions.pod:1615 ../src/guestfs-actions.pod:1625
938 #: ../src/guestfs-actions.pod:1629 ../src/guestfs-actions.pod:1633
939 #: ../src/guestfs-actions.pod:1771 ../src/guestfs-actions.pod:1775
940 #: ../src/guestfs-actions.pod:1780 ../src/guestfs-actions.pod:1785
941 #: ../src/guestfs-actions.pod:1846 ../src/guestfs-actions.pod:1850
942 #: ../src/guestfs-actions.pod:1855 ../fish/guestfish.pod:427
943 #: ../fish/guestfish.pod:431 ../fish/guestfish.pod:435
944 #: ../fish/guestfish.pod:439 ../fish/guestfish-actions.pod:13
945 #: ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:373
946 #: ../fish/guestfish-actions.pod:381 ../fish/guestfish-actions.pod:388
947 #: ../fish/guestfish-actions.pod:395 ../fish/guestfish-actions.pod:1065
948 #: ../fish/guestfish-actions.pod:1069 ../fish/guestfish-actions.pod:1073
949 #: ../fish/guestfish-actions.pod:1077 ../fish/guestfish-actions.pod:1085
950 #: ../fish/guestfish-actions.pod:1089 ../fish/guestfish-actions.pod:1093
951 #: ../fish/guestfish-actions.pod:1103 ../fish/guestfish-actions.pod:1107
952 #: ../fish/guestfish-actions.pod:1111 ../fish/guestfish-actions.pod:1201
953 #: ../fish/guestfish-actions.pod:1205 ../fish/guestfish-actions.pod:1210
954 #: ../fish/guestfish-actions.pod:1215 ../fish/guestfish-actions.pod:1257
955 #: ../fish/guestfish-actions.pod:1261 ../fish/guestfish-actions.pod:1266
956 #: ../tools/virt-win-reg.pl:536 ../tools/virt-win-reg.pl:542
957 #: ../tools/virt-win-reg.pl:548 ../tools/virt-resize.pl:345
958 #: ../tools/virt-resize.pl:350 ../tools/virt-resize.pl:360
964 #: ../src/guestfs.pod:390
966 "The kernel version that the command runs under will be different from what "
972 #: ../src/guestfs.pod:395
974 "If the command needs to communicate with daemons, then most likely they "
980 #: ../src/guestfs.pod:400
981 msgid "The command will be running in limited memory."
986 #: ../src/guestfs.pod:404
988 "The network may not be available unless you enable it (see L</"
989 "guestfs_set_network>)."
994 #: ../src/guestfs.pod:409
995 msgid "Only supports Linux guests (not Windows, BSD, etc)."
1000 #: ../src/guestfs.pod:413
1002 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
1007 #: ../src/guestfs.pod:418
1009 "For SELinux guests, you may need to enable SELinux and load policy first. "
1010 "See L</SELINUX> in this manpage."
1015 #: ../src/guestfs.pod:423
1017 "I<Security:> It is not safe to run commands from untrusted, possibly "
1018 "malicious guests. These commands may attempt to exploit your program by "
1019 "sending unexpected output. They could also try to exploit the Linux kernel "
1020 "or qemu provided by the libguestfs appliance. They could use the network "
1021 "provided by the libguestfs appliance to bypass ordinary network partitions "
1022 "and firewalls. They could use the elevated privileges or different SELinux "
1023 "context of your program to their advantage."
1028 #: ../src/guestfs.pod:432
1030 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
1031 "(a script which runs when the guest next boots normally), and to have this "
1032 "script run the commands you want in the normal context of the running guest, "
1033 "network security and so on. For information about other security issues, "
1039 #: ../src/guestfs.pod:440
1041 "The two main API calls to run commands are L</guestfs_command> and L</"
1042 "guestfs_sh> (there are also variations)."
1047 #: ../src/guestfs.pod:443
1049 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
1050 "shell globs, redirections, etc will work."
1055 #: ../src/guestfs.pod:446
1056 msgid "CONFIGURATION FILES"
1061 #: ../src/guestfs.pod:448
1063 "To read and write configuration files in Linux guest filesystems, we "
1064 "strongly recommend using Augeas. For example, Augeas understands how to "
1065 "read and write, say, a Linux shadow password file or X.org configuration "
1066 "file, and so avoids you having to write that code."
1071 #: ../src/guestfs.pod:453
1073 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
1074 "document Augeas itself here because there is excellent documentation on the "
1075 "L<http://augeas.net/> website."
1080 #: ../src/guestfs.pod:457
1082 "If you don't want to use Augeas (you fool!) then try calling L</"
1083 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
1089 #: ../src/guestfs.pod:461
1095 #: ../src/guestfs.pod:463
1097 "We support SELinux guests. To ensure that labeling happens correctly in "
1098 "SELinux guests, you need to enable SELinux and load the guest's policy:"
1103 #: ../src/guestfs.pod:469 ../src/guestfs.pod:1204 ../src/guestfs.pod:1335
1104 #: ../src/guestfs.pod:2108
1110 #: ../src/guestfs.pod:471
1111 msgid "Before launching, do:"
1116 #: ../src/guestfs.pod:473
1119 " guestfs_set_selinux (g, 1);\n"
1125 #: ../src/guestfs.pod:475 ../src/guestfs.pod:1208 ../src/guestfs.pod:1339
1126 #: ../src/guestfs.pod:2133
1132 #: ../src/guestfs.pod:477
1134 "After mounting the guest's filesystem(s), load the policy. This is best "
1135 "done by running the L<load_policy(8)> command in the guest itself:"
1140 #: ../src/guestfs.pod:481
1143 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
1149 #: ../src/guestfs.pod:483
1151 "(Older versions of C<load_policy> require you to specify the name of the "
1157 #: ../src/guestfs.pod:486 ../src/guestfs.pod:1345
1163 #: ../src/guestfs.pod:488
1165 "Optionally, set the security context for the API. The correct security "
1166 "context to use can only be known by inspecting the guest. As an example:"
1171 #: ../src/guestfs.pod:492
1174 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
1180 #: ../src/guestfs.pod:496
1181 msgid "This will work for running commands and editing existing files."
1186 #: ../src/guestfs.pod:498
1188 "When new files are created, you may need to label them explicitly, for "
1189 "example by running the external command C<restorecon pathname>."
1194 #: ../src/guestfs.pod:502
1200 #: ../src/guestfs.pod:504
1202 "Certain calls are affected by the current file mode creation mask (the "
1203 "\"umask\"). In particular ones which create files or directories, such as "
1204 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
1205 "either the default mode that the file is created with or modifies the mode "
1211 #: ../src/guestfs.pod:510
1213 "The default umask is C<022>, so files are created with modes such as C<0644> "
1214 "and directories with C<0755>."
1219 #: ../src/guestfs.pod:513
1221 "There are two ways to avoid being affected by umask. Either set umask to 0 "
1222 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
1223 "guestfs_chmod> after creating each file or directory."
1228 #: ../src/guestfs.pod:517
1229 msgid "For more information about umask, see L<umask(2)>."
1234 #: ../src/guestfs.pod:519 ../fish/guestfish.pod:720
1235 msgid "ENCRYPTED DISKS"
1240 #: ../src/guestfs.pod:521
1242 "Libguestfs allows you to access Linux guests which have been encrypted using "
1243 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1244 "standard. This includes nearly all whole disk encryption systems used by "
1245 "modern Linux guests."
1250 #: ../src/guestfs.pod:527
1252 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1253 "returns the string C<crypto_LUKS>)."
1258 #: ../src/guestfs.pod:530
1260 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1261 "will require the passphrase!"
1266 #: ../src/guestfs.pod:533
1268 "Opening a LUKS device creates a new device mapper device called C</dev/"
1269 "mapper/mapname> (where C<mapname> is the string you supply to L</"
1270 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
1271 "from and encrypted to the underlying block device respectively."
1276 #: ../src/guestfs.pod:539
1278 "LVM volume groups on the device can be made visible by calling L</"
1279 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
1280 "(s) can now be mounted in the usual way."
1285 #: ../src/guestfs.pod:543
1287 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1288 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1289 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
1290 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1291 "underlying encrypted block device)."
1296 #: ../src/guestfs.pod:550
1302 #: ../src/guestfs.pod:552
1304 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1305 "contains operating systems. (These APIs used to be in a separate Perl-only "
1306 "library called L<Sys::Guestfs::Lib(3)> but since version 1.5.3 the most "
1307 "frequently used part of this library has been rewritten in C and moved into "
1313 #: ../src/guestfs.pod:558
1315 "Add all disks belonging to the unknown virtual machine and call L</"
1316 "guestfs_launch> in the usual way."
1321 #: ../src/guestfs.pod:561
1323 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1324 "and certain heuristics, and returns a list of operating systems that were "
1325 "found. An empty list means none were found. A single element is the root "
1326 "filesystem of the operating system. For dual- or multi-boot guests, "
1327 "multiple roots can be returned, each one corresponding to a separate "
1328 "operating system. (Multi-boot virtual machines are extremely rare in the "
1329 "world of virtualization, but since this scenario can happen, we have built "
1330 "libguestfs to deal with it.)"
1335 #: ../src/guestfs.pod:570
1337 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1338 "to get additional details about that operating system. For example, call L</"
1339 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1340 "Windows and Linux-based operating systems respectively."
1345 #: ../src/guestfs.pod:576
1347 "Un*x-like and Linux-based operating systems usually consist of several "
1348 "filesystems which are mounted at boot time (for example, a separate boot "
1349 "partition mounted on C</boot>). The inspection rules are able to detect how "
1350 "filesystems correspond to mount points. Call "
1351 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1352 "hash table like this example:"
1357 #: ../src/guestfs.pod:583
1360 " /boot => /dev/sda1\n"
1361 " / => /dev/vg_guest/lv_root\n"
1362 " /usr => /dev/vg_guest/lv_usr\n"
1368 #: ../src/guestfs.pod:587
1370 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1371 "filesystems as suggested."
1376 #: ../src/guestfs.pod:590
1378 "Be careful to mount filesystems in the right order (eg. C</> before C</"
1379 "usr>). Sorting the keys of the hash by length, shortest first, should work."
1384 #: ../src/guestfs.pod:594
1386 "Inspection currently only works for some common operating systems. "
1387 "Contributors are welcome to send patches for other operating systems that we "
1388 "currently cannot detect."
1393 #: ../src/guestfs.pod:598
1395 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1396 "for more details. The L</guestfs_inspect_os> function just ignores any "
1397 "encrypted devices."
1402 #: ../src/guestfs.pod:602
1404 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1405 "inspection and caches the results in the guest handle. Subsequent calls to "
1406 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
1407 "read the disks. If you change the content of the guest disks, you can redo "
1408 "inspection by calling L</guestfs_inspect_os> again. (L</"
1409 "guestfs_inspect_list_applications> works a little differently from the other "
1410 "calls and does read the disks. See documentation for that function for "
1416 #: ../src/guestfs.pod:611
1417 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1422 #: ../src/guestfs.pod:613
1424 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
1425 "ntfs-3g.org/> driver."
1430 #: ../src/guestfs.pod:616
1431 msgid "DRIVE LETTERS AND PATHS"
1436 #: ../src/guestfs.pod:618
1438 "DOS and Windows still use drive letters, and the filesystems are always "
1439 "treated as case insensitive by Windows itself, and therefore you might find "
1440 "a Windows configuration file referring to a path like C<c:\\windows"
1441 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
1442 "might be referred to as C</WINDOWS/System32>."
1447 #: ../src/guestfs.pod:624
1449 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1450 "libguestfs to read the appropriate Windows Registry and configuration files, "
1451 "to determine yourself how drives are mapped (see also L<hivex(3)> and L<virt-"
1457 #: ../src/guestfs.pod:629
1459 "Replacing backslash characters with forward slash characters is also outside "
1460 "the scope of libguestfs, but something that you can easily do."
1465 #: ../src/guestfs.pod:632
1467 "Where we can help is in resolving the case insensitivity of paths. For "
1468 "this, call L</guestfs_case_sensitive_path>."
1473 #: ../src/guestfs.pod:635
1474 msgid "ACCESSING THE WINDOWS REGISTRY"
1479 #: ../src/guestfs.pod:637
1481 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1482 "files, through the library C<hivex> which is part of the libguestfs project "
1483 "although ships as a separate tarball. You have to locate and download the "
1484 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1485 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
1486 "reg(1)> for more help on this issue."
1491 #: ../src/guestfs.pod:645
1492 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
1497 #: ../src/guestfs.pod:647
1499 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
1500 "provide something which looks like a Linux symlink. The way it tries to do "
1501 "the rewriting is described here:"
1506 #: ../src/guestfs.pod:651
1508 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
1514 #: ../src/guestfs.pod:653
1516 "The essential problem is that ntfs-3g simply does not have enough "
1517 "information to do a correct job. NTFS links can contain drive letters and "
1518 "references to external device GUIDs that ntfs-3g has no way of resolving. "
1519 "It is almost certainly the case that libguestfs callers should ignore what "
1520 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
1525 #: ../src/guestfs.pod:660
1527 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L</"
1528 "guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
1529 "attribute, and read the raw reparse data from that (you can find the format "
1530 "documented in various places around the web)."
1535 #: ../src/guestfs.pod:665
1536 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
1541 #: ../src/guestfs.pod:667
1543 "There are other useful extended attributes that can be read from ntfs-3g "
1544 "filesystems (using L</guestfs_getxattr>). See:"
1549 #: ../src/guestfs.pod:670
1551 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
1556 #: ../src/guestfs.pod:672
1557 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1562 #: ../src/guestfs.pod:674
1564 "Although we don't want to discourage you from using the C API, we will "
1565 "mention here that the same API is also available in other languages."
1569 #: ../src/guestfs.pod:677
1571 "The API is broadly identical in all supported languages. This means that "
1572 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
1573 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
1574 "OCaml. In other words, a straightforward, predictable isomorphism between "
1580 #: ../src/guestfs.pod:683
1582 "Error messages are automatically transformed into exceptions if the language "
1588 #: ../src/guestfs.pod:686
1590 "We don't try to \"object orientify\" parts of the API in OO languages, "
1591 "although contributors are welcome to write higher level APIs above what we "
1592 "provide in their favourite languages if they wish."
1597 #: ../src/guestfs.pod:692
1603 #: ../src/guestfs.pod:694
1605 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1606 "identical to the C API. C++ classes and exceptions are not used."
1611 #: ../src/guestfs.pod:698
1617 #: ../src/guestfs.pod:700
1619 "The C# bindings are highly experimental. Please read the warnings at the "
1620 "top of C<csharp/Libguestfs.cs>."
1625 #: ../src/guestfs.pod:703
1631 #: ../src/guestfs.pod:705
1633 "This is the only language binding that is working but incomplete. Only "
1634 "calls which return simple integers have been bound in Haskell, and we are "
1635 "looking for help to complete this binding."
1640 #: ../src/guestfs.pod:709
1646 #: ../src/guestfs.pod:711
1648 "Full documentation is contained in the Javadoc which is distributed with "
1654 #: ../src/guestfs.pod:714
1659 #: ../src/guestfs.pod:716
1660 msgid "See L<guestfs-ocaml(3)>."
1665 #: ../src/guestfs.pod:718
1670 #: ../src/guestfs.pod:720
1671 msgid "See L<Sys::Guestfs(3)>."
1676 #: ../src/guestfs.pod:722
1682 #: ../src/guestfs.pod:724
1684 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1685 "the php-libguestfs package for your distribution."
1690 #: ../src/guestfs.pod:727
1691 msgid "The PHP binding only works correctly on 64 bit machines."
1696 #: ../src/guestfs.pod:729
1701 #: ../src/guestfs.pod:731
1702 msgid "See L<guestfs-python(3)>."
1707 #: ../src/guestfs.pod:733
1712 #: ../src/guestfs.pod:735
1713 msgid "See L<guestfs-ruby(3)>."
1718 #: ../src/guestfs.pod:737
1719 msgid "B<shell scripts>"
1723 #: ../src/guestfs.pod:739
1724 msgid "See L<guestfish(1)>."
1729 #: ../src/guestfs.pod:743
1730 msgid "LIBGUESTFS GOTCHAS"
1735 #: ../src/guestfs.pod:745
1737 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1738 "system [...] that works in the way it is documented but is counterintuitive "
1739 "and almost invites mistakes.\""
1744 #: ../src/guestfs.pod:749
1746 "Since we developed libguestfs and the associated tools, there are several "
1747 "things we would have designed differently, but are now stuck with for "
1748 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1749 "release, you can expect these to change. Beware of them."
1754 #: ../src/guestfs.pod:757
1755 msgid "Autosync / forgetting to sync."
1760 #: ../src/guestfs.pod:759
1762 "When modifying a filesystem from C or another language, you B<must> unmount "
1763 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1764 "libguestfs handle. You can also call:"
1769 #: ../src/guestfs.pod:763
1772 " guestfs_set_autosync (g, 1);\n"
1778 #: ../src/guestfs.pod:765
1780 "to have the unmount/sync done automatically for you when the handle 'g' is "
1781 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
1786 #: ../src/guestfs.pod:769
1788 "If you forget to do this, then it is entirely possible that your changes "
1789 "won't be written out, or will be partially written, or (very rarely) that "
1790 "you'll get disk corruption."
1795 #: ../src/guestfs.pod:773
1797 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1798 "guestfish scripts that forget to sync will work just fine, which can make "
1799 "this very puzzling if you are trying to debug a problem."
1804 #: ../src/guestfs.pod:777
1806 "Update: Autosync is enabled by default for all API users starting from "
1807 "libguestfs 1.5.24."
1812 #: ../src/guestfs.pod:780
1813 msgid "Mount option C<-o sync> should not be the default."
1818 #: ../src/guestfs.pod:782
1820 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1821 "However C<-o sync> does not add any reliability benefit, but does have a "
1822 "very large performance impact."
1827 #: ../src/guestfs.pod:786
1829 "The work around is to use L</guestfs_mount_options> and set the mount "
1830 "options that you actually want to use."
1835 #: ../src/guestfs.pod:789
1836 msgid "Read-only should be the default."
1841 #: ../src/guestfs.pod:791
1843 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1844 "specify I<--rw> if you want to make changes to the image."
1849 #: ../src/guestfs.pod:794
1850 msgid "This would reduce the potential to corrupt live VM images."
1855 #: ../src/guestfs.pod:796
1857 "Note that many filesystems change the disk when you just mount and unmount, "
1858 "even if you didn't perform any writes. You need to use L</"
1859 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
1864 #: ../src/guestfs.pod:800
1865 msgid "guestfish command line is hard to use."
1870 #: ../src/guestfs.pod:802
1872 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1873 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1874 "exist, so it fails. In earlier versions of guestfish the error message was "
1875 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1876 "we should have used C<guestfish -c command> to run commands."
1881 #: ../src/guestfs.pod:809
1882 msgid "guestfish megabyte modifiers don't work right on all commands"
1887 #: ../src/guestfs.pod:811
1889 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1890 "other modifiers). What guestfish actually does is to multiply the number "
1891 "part by the modifier part and pass the result to the C API. However this "
1892 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1893 "expecting some other unit (eg. megabytes)."
1898 #: ../src/guestfs.pod:818
1899 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1904 #: ../src/guestfs.pod:820
1907 " lvcreate LV VG 100M\n"
1913 #: ../src/guestfs.pod:822
1915 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1916 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1917 "megabytes * megabytes) logical volume. The error message you get from this "
1918 "is also a little obscure."
1923 #: ../src/guestfs.pod:827
1925 "This could be fixed in the generator by specially marking parameters and "
1926 "return values which take bytes or other units."
1931 #: ../src/guestfs.pod:830
1932 msgid "Ambiguity between devices and paths"
1937 #: ../src/guestfs.pod:832
1939 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
1940 "sdb2>) and a similar pathname. A file might just happen to be called "
1941 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1946 #: ../src/guestfs.pod:837
1948 "In the current API we usually resolve this ambiguity by having two separate "
1949 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1950 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1951 "detecting if the path supplied begins with C</dev/>."
1956 #: ../src/guestfs.pod:843
1958 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1959 "make paths/devices into structured names. One way to do this would be to "
1960 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1961 "aspect of grub. Another way would be to use a structured type, equivalent "
1962 "to this OCaml type:"
1967 #: ../src/guestfs.pod:849
1970 " type path = Path of string | Device of int | Partition of int * int\n"
1976 #: ../src/guestfs.pod:851
1977 msgid "which would allow you to pass arguments like:"
1982 #: ../src/guestfs.pod:853
1985 " Path \"/foo/bar\"\n"
1986 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
1987 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
1988 " Path \"/dev/sdb2\" (* not a device *)\n"
1994 #: ../src/guestfs.pod:858
1996 "As you can see there are still problems to resolve even with this "
1997 "representation. Also consider how it might work in guestfish."
2002 #: ../src/guestfs.pod:863
2003 msgid "PROTOCOL LIMITS"
2008 #: ../src/guestfs.pod:865
2010 "Internally libguestfs uses a message-based protocol to pass API calls and "
2011 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
2012 "plenty more detail about this). The maximum message size used by the "
2013 "protocol is slightly less than 4 MB. For some API calls you may need to be "
2014 "aware of this limit. The API calls which may be affected are individually "
2015 "documented, with a link back to this section of the documentation."
2020 #: ../src/guestfs.pod:873
2022 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
2023 "a simple string. Because this string is at some point internally encoded as "
2024 "a message, the maximum size that it can return is slightly under 4 MB. If "
2025 "the requested file is larger than this then you will get an error."
2030 #: ../src/guestfs.pod:879
2032 "In order to transfer large files into and out of the guest filesystem, you "
2033 "need to use particular calls that support this. The sections L</UPLOADING> "
2034 "and L</DOWNLOADING> document how to do this."
2039 #: ../src/guestfs.pod:883
2041 "You might also consider mounting the disk image using our FUSE filesystem "
2042 "support (L<guestmount(1)>)."
2047 #: ../src/guestfs.pod:886
2048 msgid "KEYS AND PASSPHRASES"
2053 #: ../src/guestfs.pod:888
2055 "Certain libguestfs calls take a parameter that contains sensitive key "
2056 "material, passed in as a C string."
2061 #: ../src/guestfs.pod:891
2063 "In the future we would hope to change the libguestfs implementation so that "
2064 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
2065 "swap. However this is I<not> done at the moment, because of the complexity "
2066 "of such an implementation."
2071 #: ../src/guestfs.pod:896
2073 "Therefore you should be aware that any key parameter you pass to libguestfs "
2074 "might end up being written out to the swap partition. If this is a concern, "
2075 "scrub the swap partition or don't use libguestfs on encrypted devices."
2080 #: ../src/guestfs.pod:901
2081 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
2086 #: ../src/guestfs.pod:903
2088 "All high-level libguestfs actions are synchronous. If you want to use "
2089 "libguestfs asynchronously then you must create a thread."
2094 #: ../src/guestfs.pod:906
2096 "Only use the handle from a single thread. Either use the handle exclusively "
2097 "from one thread, or provide your own mutex so that two threads cannot issue "
2098 "calls on the same handle at the same time."
2103 #: ../src/guestfs.pod:910
2105 "See the graphical program guestfs-browser for one possible architecture for "
2106 "multithreaded programs using libvirt and libguestfs."
2111 #: ../src/guestfs.pod:913
2117 #: ../src/guestfs.pod:915
2119 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
2125 #: ../src/guestfs.pod:918
2127 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
2128 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
2133 #: ../src/guestfs.pod:921
2135 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
2136 "to change the directories that libguestfs will search in. The value is a "
2137 "colon-separated list of paths. The current directory is I<not> searched "
2138 "unless the path contains an empty element or C<.>. For example "
2139 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
2140 "then C</usr/lib/guestfs>."
2145 #: ../src/guestfs.pod:928
2146 msgid "QEMU WRAPPERS"
2151 #: ../src/guestfs.pod:930
2153 "If you want to compile your own qemu, run qemu from a non-standard location, "
2154 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
2160 #: ../src/guestfs.pod:934
2162 "There is one important rule to remember: you I<must C<exec qemu>> as the "
2163 "last command in the shell script (so that qemu replaces the shell and "
2164 "becomes the direct child of the libguestfs-using program). If you don't do "
2165 "this, then the qemu process won't be cleaned up correctly."
2170 #: ../src/guestfs.pod:939
2172 "Here is an example of a wrapper, where I have built my own copy of qemu from "
2178 #: ../src/guestfs.pod:942
2182 " qemudir=/home/rjones/d/qemu\n"
2183 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
2189 #: ../src/guestfs.pod:946
2191 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
2192 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
2198 #: ../src/guestfs.pod:950
2201 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
2207 #: ../src/guestfs.pod:952
2209 "Note that libguestfs also calls qemu with the -help and -version options in "
2210 "order to determine features."
2215 #: ../src/guestfs.pod:955
2216 msgid "ABI GUARANTEE"
2221 #: ../src/guestfs.pod:957
2223 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
2224 "actions as outlined in this section. Although we will deprecate some "
2225 "actions, for example if they get replaced by newer calls, we will keep the "
2226 "old actions forever. This allows you the developer to program in confidence "
2227 "against the libguestfs API."
2232 #: ../src/guestfs.pod:963
2233 msgid "BLOCK DEVICE NAMING"
2238 #: ../src/guestfs.pod:965
2240 "In the kernel there is now quite a profusion of schemata for naming block "
2241 "devices (in this context, by I<block device> I mean a physical or virtual "
2242 "hard drive). The original Linux IDE driver used names starting with C</dev/"
2243 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
2244 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
2245 "for the old IDE driver (particularly for SATA devices) those devices also "
2246 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
2247 "paravirtualized drivers. This has created several different naming systems, "
2248 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
2253 #: ../src/guestfs.pod:977
2255 "As discussed above, libguestfs uses a qemu appliance running an embedded "
2256 "Linux kernel to access block devices. We can run a variety of appliances "
2257 "based on a variety of Linux kernels."
2262 #: ../src/guestfs.pod:981
2264 "This causes a problem for libguestfs because many API calls use device or "
2265 "partition names. Working scripts and the recipe (example) scripts that we "
2266 "make available over the internet could fail if the naming scheme changes."
2271 #: ../src/guestfs.pod:986
2273 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2274 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2275 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2276 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2281 #: ../src/guestfs.pod:992
2283 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2284 "L</guestfs_list_partitions> and similar calls return the true names of the "
2285 "devices and partitions as known to the appliance."
2290 #: ../src/guestfs.pod:997
2291 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2296 #: ../src/guestfs.pod:999
2298 "Usually this translation is transparent. However in some (very rare) cases "
2299 "you may need to know the exact algorithm. Such cases include where you use "
2300 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
2301 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
2306 #: ../src/guestfs.pod:1005
2308 "The algorithm is applied only to I<parameters> which are known to be either "
2309 "device or partition names. Return values from functions such as L</"
2310 "guestfs_list_devices> are never changed."
2315 #: ../src/guestfs.pod:1013
2316 msgid "Is the string a parameter which is a device or partition name?"
2321 #: ../src/guestfs.pod:1017
2322 msgid "Does the string begin with C</dev/sd>?"
2327 #: ../src/guestfs.pod:1021
2329 "Does the named device exist? If so, we use that device. However if I<not> "
2330 "then we continue with this algorithm."
2335 #: ../src/guestfs.pod:1026
2336 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2341 #: ../src/guestfs.pod:1028
2342 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2347 #: ../src/guestfs.pod:1030
2348 msgid "If that named device exists, use it. If not, continue."
2353 #: ../src/guestfs.pod:1034
2354 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2359 #: ../src/guestfs.pod:1036
2360 msgid "If that named device exists, use it. If not, return an error."
2365 #: ../src/guestfs.pod:1040
2366 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
2371 #: ../src/guestfs.pod:1042
2373 "Although the standard naming scheme and automatic translation is useful for "
2374 "simple programs and guestfish scripts, for larger programs it is best not to "
2375 "rely on this mechanism."
2380 #: ../src/guestfs.pod:1046
2382 "Where possible for maximum future portability programs using libguestfs "
2383 "should use these future-proof techniques:"
2388 #: ../src/guestfs.pod:1053
2390 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2391 "device names, and then use those names directly."
2396 #: ../src/guestfs.pod:1056
2398 "Since those device names exist by definition, they will never be translated."
2403 #: ../src/guestfs.pod:1061
2405 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2406 "filesystem labels."
2411 #: ../src/guestfs.pod:1066
2417 #: ../src/guestfs.pod:1068
2419 "This section discusses security implications of using libguestfs, "
2420 "particularly with untrusted or malicious guests or disk images."
2425 #: ../src/guestfs.pod:1071
2426 msgid "GENERAL SECURITY CONSIDERATIONS"
2431 #: ../src/guestfs.pod:1073
2433 "Be careful with any files or data that you download from a guest (by "
2434 "\"download\" we mean not just the L</guestfs_download> command but any "
2435 "command that reads files, filenames, directories or anything else from a "
2436 "disk image). An attacker could manipulate the data to fool your program "
2437 "into doing the wrong thing. Consider cases such as:"
2442 #: ../src/guestfs.pod:1083
2443 msgid "the data (file etc) not being present"
2448 #: ../src/guestfs.pod:1087
2449 msgid "being present but empty"
2454 #: ../src/guestfs.pod:1091
2455 msgid "being much larger than normal"
2460 #: ../src/guestfs.pod:1095
2461 msgid "containing arbitrary 8 bit data"
2466 #: ../src/guestfs.pod:1099
2467 msgid "being in an unexpected character encoding"
2472 #: ../src/guestfs.pod:1103
2473 msgid "containing homoglyphs."
2478 #: ../src/guestfs.pod:1107
2479 msgid "SECURITY OF MOUNTING FILESYSTEMS"
2484 #: ../src/guestfs.pod:1109
2486 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
2487 "(VFS) module can sometimes be escalated into exploits by deliberately "
2488 "creating a malicious, malformed filesystem. These exploits are very severe "
2489 "for two reasons. Firstly there are very many filesystem drivers in the "
2490 "kernel, and many of them are infrequently used and not much developer "
2491 "attention has been paid to the code. Linux userspace helps potential "
2492 "crackers by detecting the filesystem type and automatically choosing the "
2493 "right VFS driver, even if that filesystem type is obscure or unexpected for "
2494 "the administrator. Secondly, a kernel-level exploit is like a local root "
2495 "exploit (worse in some ways), giving immediate and total access to the "
2496 "system right down to the hardware level."
2501 #: ../src/guestfs.pod:1122
2503 "That explains why you should never mount a filesystem from an untrusted "
2504 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
2505 "inside a qemu virtual machine, usually running as a non-root user. The "
2506 "attacker would need to write a filesystem which first exploited the kernel, "
2507 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
2508 "the libguestfs protocol, and finally to be as serious as the host kernel "
2509 "exploit it would need to escalate its privileges to root. This multi-step "
2510 "escalation, performed by a static piece of data, is thought to be extremely "
2511 "hard to do, although we never say 'never' about security issues."
2516 #: ../src/guestfs.pod:1133
2518 "In any case callers can reduce the attack surface by forcing the filesystem "
2519 "type when mounting (use L</guestfs_mount_vfs>)."
2524 #: ../src/guestfs.pod:1136
2525 msgid "PROTOCOL SECURITY"
2530 #: ../src/guestfs.pod:1138
2532 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
2533 "defined upper message size. However a program that uses libguestfs must "
2534 "also take care - for example you can write a program that downloads a binary "
2535 "from a disk image and executes it locally, and no amount of protocol "
2536 "security will save you from the consequences."
2541 #: ../src/guestfs.pod:1144
2542 msgid "INSPECTION SECURITY"
2547 #: ../src/guestfs.pod:1146
2549 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
2550 "directly from the guest, and these could contain any 8 bit data. Callers "
2551 "should be careful to escape these before printing them to a structured file "
2552 "(for example, use HTML escaping if creating a web page)."
2557 #: ../src/guestfs.pod:1152
2559 "Guest configuration may be altered in unusual ways by the administrator of "
2560 "the virtual machine, and may not reflect reality (particularly for untrusted "
2561 "or actively malicious guests). For example we parse the hostname from "
2562 "configuration files like C</etc/sysconfig/network> that we find in the "
2563 "guest, but the guest administrator can easily manipulate these files to "
2564 "provide the wrong hostname."
2569 #: ../src/guestfs.pod:1160
2571 "The inspection API parses guest configuration using two external libraries: "
2572 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
2573 "designed to be robust in the face of malicious data, although denial of "
2574 "service attacks are still possible, for example with oversized configuration "
2580 #: ../src/guestfs.pod:1166
2581 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
2586 #: ../src/guestfs.pod:1168
2588 "Be very cautious about running commands from the guest. By running a "
2589 "command in the guest, you are giving CPU time to a binary that you do not "
2590 "control, under the same user account as the library, albeit wrapped in qemu "
2591 "virtualization. More information and alternatives can be found in the "
2592 "section L</RUNNING COMMANDS>."
2597 #: ../src/guestfs.pod:1174
2598 msgid "CVE-2010-3851"
2603 #: ../src/guestfs.pod:1176
2604 msgid "https://bugzilla.redhat.com/642934"
2609 #: ../src/guestfs.pod:1178
2611 "This security bug concerns the automatic disk format detection that qemu "
2612 "does on disk images."
2617 #: ../src/guestfs.pod:1181
2619 "A raw disk image is just the raw bytes, there is no header. Other disk "
2620 "images like qcow2 contain a special header. Qemu deals with this by looking "
2621 "for one of the known headers, and if none is found then assuming the disk "
2622 "image must be raw."
2627 #: ../src/guestfs.pod:1186
2629 "This allows a guest which has been given a raw disk image to write some "
2630 "other header. At next boot (or when the disk image is accessed by "
2631 "libguestfs) qemu would do autodetection and think the disk image format was, "
2632 "say, qcow2 based on the header written by the guest."
2637 #: ../src/guestfs.pod:1191
2639 "This in itself would not be a problem, but qcow2 offers many features, one "
2640 "of which is to allow a disk image to refer to another image (called the "
2641 "\"backing disk\"). It does this by placing the path to the backing disk "
2642 "into the qcow2 header. This path is not validated and could point to any "
2643 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
2644 "\"holes\" in the qcow2 disk image, which of course is completely under the "
2645 "control of the attacker."
2650 #: ../src/guestfs.pod:1199
2652 "In libguestfs this is rather hard to exploit except under two circumstances:"
2657 #: ../src/guestfs.pod:1206
2658 msgid "You have enabled the network or have opened the disk in write mode."
2663 #: ../src/guestfs.pod:1210
2665 "You are also running untrusted code from the guest (see L</RUNNING "
2671 #: ../src/guestfs.pod:1215
2673 "The way to avoid this is to specify the expected disk format when adding "
2674 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
2675 "should always do this if the disk is raw format, and it's a good idea for "
2681 #: ../src/guestfs.pod:1220
2683 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
2684 "format is fetched from libvirt and passed through."
2689 #: ../src/guestfs.pod:1223
2691 "For libguestfs tools, use the I<--format> command line parameter as "
2697 #: ../src/guestfs.pod:1226
2698 msgid "CONNECTION MANAGEMENT"
2703 #: ../src/guestfs.pod:1228
2709 #: ../src/guestfs.pod:1230
2711 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
2712 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
2713 "handle and release all resources used."
2718 #: ../src/guestfs.pod:1234
2720 "For information on using multiple handles and threads, see the section L</"
2721 "MULTIPLE HANDLES AND MULTIPLE THREADS> below."
2726 #: ../src/guestfs.pod:1237
2727 msgid "guestfs_create"
2732 #: ../src/guestfs.pod:1239
2735 " guestfs_h *guestfs_create (void);\n"
2741 #: ../src/guestfs.pod:1241
2742 msgid "Create a connection handle."
2747 #: ../src/guestfs.pod:1243
2749 "You have to call L</guestfs_add_drive_opts> (or one of the equivalent calls) "
2750 "on the handle at least once."
2755 #: ../src/guestfs.pod:1246
2757 "This function returns a non-NULL pointer to a handle on success or NULL on "
2763 #: ../src/guestfs.pod:1249
2764 msgid "After configuring the handle, you have to call L</guestfs_launch>."
2769 #: ../src/guestfs.pod:1251
2771 "You may also want to configure error handling for the handle. See L</ERROR "
2772 "HANDLING> section below."
2777 #: ../src/guestfs.pod:1254
2778 msgid "guestfs_close"
2783 #: ../src/guestfs.pod:1256
2786 " void guestfs_close (guestfs_h *g);\n"
2792 #: ../src/guestfs.pod:1258
2793 msgid "This closes the connection handle and frees up all resources used."
2798 #: ../src/guestfs.pod:1260
2799 msgid "ERROR HANDLING"
2804 #: ../src/guestfs.pod:1262
2806 "API functions can return errors. For example, almost all functions that "
2807 "return C<int> will return C<-1> to indicate an error."
2812 #: ../src/guestfs.pod:1265
2814 "Additional information is available for errors: an error message string and "
2815 "optionally an error number (errno) if the thing that failed was a system "
2821 #: ../src/guestfs.pod:1269
2823 "You can get at the additional information about the last error on the handle "
2824 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
2825 "up an error handler with L</guestfs_set_error_handler>."
2830 #: ../src/guestfs.pod:1274
2832 "When the handle is created, a default error handler is installed which "
2833 "prints the error message string to C<stderr>. For small short-running "
2834 "command line programs it is sufficient to do:"
2839 #: ../src/guestfs.pod:1278
2842 " if (guestfs_launch (g) == -1)\n"
2843 " exit (EXIT_FAILURE);\n"
2849 #: ../src/guestfs.pod:1281
2851 "since the default error handler will ensure that an error message has been "
2852 "printed to C<stderr> before the program exits."
2857 #: ../src/guestfs.pod:1284
2859 "For other programs the caller will almost certainly want to install an "
2860 "alternate error handler or do error handling in-line like this:"
2865 #: ../src/guestfs.pod:1287
2868 " g = guestfs_create ();\n"
2874 #: ../src/guestfs.pod:1289
2877 " /* This disables the default behaviour of printing errors\n"
2879 " guestfs_set_error_handler (g, NULL, NULL);\n"
2885 #: ../src/guestfs.pod:1293
2888 " if (guestfs_launch (g) == -1) {\n"
2889 " /* Examine the error message and print it etc. */\n"
2890 " char *msg = guestfs_last_error (g);\n"
2891 " int errnum = guestfs_last_errno (g);\n"
2892 " fprintf (stderr, \"%s\\n\", msg);\n"
2900 #: ../src/guestfs.pod:1301
2902 "Out of memory errors are handled differently. The default action is to call "
2903 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
2904 "guestfs_set_out_of_memory_handler>."
2909 #: ../src/guestfs.pod:1305
2911 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
2912 "because there is no handle if this happens there is no way to get additional "
2913 "error information. However L</guestfs_create> is supposed to be a "
2914 "lightweight operation which can only fail because of insufficient memory (it "
2915 "returns NULL in this case)."
2920 #: ../src/guestfs.pod:1311
2921 msgid "guestfs_last_error"
2926 #: ../src/guestfs.pod:1313
2929 " const char *guestfs_last_error (guestfs_h *g);\n"
2935 #: ../src/guestfs.pod:1315
2937 "This returns the last error message that happened on C<g>. If there has not "
2938 "been an error since the handle was created, then this returns C<NULL>."
2943 #: ../src/guestfs.pod:1319
2945 "The lifetime of the returned string is until the next error occurs, or L</"
2946 "guestfs_close> is called."
2951 #: ../src/guestfs.pod:1322
2952 msgid "guestfs_last_errno"
2957 #: ../src/guestfs.pod:1324
2960 " int guestfs_last_errno (guestfs_h *g);\n"
2966 #: ../src/guestfs.pod:1326
2967 msgid "This returns the last error number (errno) that happened on C<g>."
2972 #: ../src/guestfs.pod:1328
2973 msgid "If successful, an errno integer not equal to zero is returned."
2978 #: ../src/guestfs.pod:1330
2980 "If no error, this returns 0. This call can return 0 in three situations:"
2985 #: ../src/guestfs.pod:1337
2986 msgid "There has not been any error on the handle."
2991 #: ../src/guestfs.pod:1341
2993 "There has been an error but the errno was meaningless. This corresponds to "
2994 "the case where the error did not come from a failed system call, but for "
2995 "some other reason."
3000 #: ../src/guestfs.pod:1347
3002 "There was an error from a failed system call, but for some reason the errno "
3003 "was not captured and returned. This usually indicates a bug in libguestfs."
3008 #: ../src/guestfs.pod:1353
3010 "Libguestfs tries to convert the errno from inside the applicance into a "
3011 "corresponding errno for the caller (not entirely trivial: the appliance "
3012 "might be running a completely different operating system from the library "
3013 "and error numbers are not standardized across Un*xen). If this could not be "
3014 "done, then the error is translated to C<EINVAL>. In practice this should "
3015 "only happen in very rare circumstances."
3020 #: ../src/guestfs.pod:1361
3021 msgid "guestfs_set_error_handler"
3026 #: ../src/guestfs.pod:1363
3029 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
3031 " const char *msg);\n"
3032 " void guestfs_set_error_handler (guestfs_h *g,\n"
3033 " guestfs_error_handler_cb cb,\n"
3040 #: ../src/guestfs.pod:1370
3042 "The callback C<cb> will be called if there is an error. The parameters "
3043 "passed to the callback are an opaque data pointer and the error message "
3049 #: ../src/guestfs.pod:1374
3051 "C<errno> is not passed to the callback. To get that the callback must call "
3052 "L</guestfs_last_errno>."
3057 #: ../src/guestfs.pod:1377
3059 "Note that the message string C<msg> is freed as soon as the callback "
3060 "function returns, so if you want to stash it somewhere you must make your "
3066 #: ../src/guestfs.pod:1381
3067 msgid "The default handler prints messages on C<stderr>."
3072 #: ../src/guestfs.pod:1383
3073 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
3078 #: ../src/guestfs.pod:1385
3079 msgid "guestfs_get_error_handler"
3084 #: ../src/guestfs.pod:1387
3087 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
3088 " void **opaque_rtn);\n"
3094 #: ../src/guestfs.pod:1390
3095 msgid "Returns the current error handler callback."
3100 #: ../src/guestfs.pod:1392
3101 msgid "guestfs_set_out_of_memory_handler"
3106 #: ../src/guestfs.pod:1394
3109 " typedef void (*guestfs_abort_cb) (void);\n"
3110 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
3111 " guestfs_abort_cb);\n"
3117 #: ../src/guestfs.pod:1398
3119 "The callback C<cb> will be called if there is an out of memory situation. "
3120 "I<Note this callback must not return>."
3125 #: ../src/guestfs.pod:1401
3126 msgid "The default is to call L<abort(3)>."
3131 #: ../src/guestfs.pod:1403
3133 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
3138 #: ../src/guestfs.pod:1406
3139 msgid "guestfs_get_out_of_memory_handler"
3144 #: ../src/guestfs.pod:1408
3147 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
3153 #: ../src/guestfs.pod:1410
3154 msgid "This returns the current out of memory handler."
3159 #: ../src/guestfs.pod:1412
3165 #: ../src/guestfs.pod:1414 ../fish/guestfish.pod:958
3171 #: ../src/guestfs.pod:1416
3177 #: ../src/guestfs.pod:1418
3183 #: ../src/guestfs.pod:1420
3184 msgid "AVAILABILITY"
3189 #: ../src/guestfs.pod:1422
3190 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
3195 #: ../src/guestfs.pod:1424
3197 "Using L</guestfs_available> you can test availability of the following "
3198 "groups of functions. This test queries the appliance to see if the "
3199 "appliance you are currently using supports the functionality."
3204 #: ../src/guestfs.pod:1429
3205 msgid "@AVAILABILITY@"
3210 #: ../src/guestfs.pod:1431
3211 msgid "GUESTFISH supported COMMAND"
3216 #: ../src/guestfs.pod:1433
3218 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
3219 "prints out the available groups and whether they are supported by this build "
3220 "of libguestfs. Note however that you have to do C<run> first."
3225 #: ../src/guestfs.pod:1438
3226 msgid "SINGLE CALLS AT COMPILE TIME"
3231 #: ../src/guestfs.pod:1440
3233 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
3234 "function, such as:"
3239 #: ../src/guestfs.pod:1443
3242 " #define LIBGUESTFS_HAVE_DD 1\n"
3248 #: ../src/guestfs.pod:1445
3249 msgid "if L</guestfs_dd> is available."
3254 #: ../src/guestfs.pod:1447
3256 "Before version 1.5.8, if you needed to test whether a single libguestfs "
3257 "function is available at compile time, we recommended using build tools such "
3258 "as autoconf or cmake. For example in autotools you could use:"
3263 #: ../src/guestfs.pod:1452
3266 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
3267 " AC_CHECK_FUNCS([guestfs_dd])\n"
3273 #: ../src/guestfs.pod:1455
3275 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
3281 #: ../src/guestfs.pod:1458
3282 msgid "SINGLE CALLS AT RUN TIME"
3287 #: ../src/guestfs.pod:1460
3289 "Testing at compile time doesn't guarantee that a function really exists in "
3290 "the library. The reason is that you might be dynamically linked against a "
3291 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
3292 "This situation unfortunately results in a segmentation fault, which is a "
3293 "shortcoming of the C dynamic linking system itself."
3298 #: ../src/guestfs.pod:1467
3300 "You can use L<dlopen(3)> to test if a function is available at run time, as "
3301 "in this example program (note that you still need the compile time check as "
3307 #: ../src/guestfs.pod:1471
3310 " #include <stdio.h>\n"
3311 " #include <stdlib.h>\n"
3312 " #include <unistd.h>\n"
3313 " #include <dlfcn.h>\n"
3314 " #include <guestfs.h>\n"
3320 #: ../src/guestfs.pod:1477
3325 " #ifdef LIBGUESTFS_HAVE_DD\n"
3327 " int has_function;\n"
3333 #: ../src/guestfs.pod:1483
3336 " /* Test if the function guestfs_dd is really available. */\n"
3337 " dl = dlopen (NULL, RTLD_LAZY);\n"
3339 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
3340 " exit (EXIT_FAILURE);\n"
3342 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
3349 #: ../src/guestfs.pod:1492
3352 " if (!has_function)\n"
3353 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
3355 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
3356 " /* Now it's safe to call\n"
3357 " guestfs_dd (g, \"foo\", \"bar\");\n"
3361 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
3369 #: ../src/guestfs.pod:1505
3371 "You may think the above is an awful lot of hassle, and it is. There are "
3372 "other ways outside of the C linking system to ensure that this kind of "
3373 "incompatibility never arises, such as using package versioning:"
3378 #: ../src/guestfs.pod:1510
3381 " Requires: libguestfs >= 1.0.80\n"
3387 #: ../src/guestfs.pod:1512
3388 msgid "CALLS WITH OPTIONAL ARGUMENTS"
3393 #: ../src/guestfs.pod:1514
3395 "A recent feature of the API is the introduction of calls which take optional "
3396 "arguments. In C these are declared 3 ways. The main way is as a call which "
3397 "takes variable arguments (ie. C<...>), as in this example:"
3402 #: ../src/guestfs.pod:1519
3405 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
3411 #: ../src/guestfs.pod:1521
3413 "Call this with a list of optional arguments, terminated by C<-1>. So to "
3414 "call with no optional arguments specified:"
3419 #: ../src/guestfs.pod:1524
3422 " guestfs_add_drive_opts (g, filename, -1);\n"
3428 #: ../src/guestfs.pod:1526
3429 msgid "With a single optional argument:"
3434 #: ../src/guestfs.pod:1528
3437 " guestfs_add_drive_opts (g, filename,\n"
3438 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3445 #: ../src/guestfs.pod:1532
3451 #: ../src/guestfs.pod:1534
3454 " guestfs_add_drive_opts (g, filename,\n"
3455 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3456 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
3463 #: ../src/guestfs.pod:1539
3465 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
3471 #: ../src/guestfs.pod:1542
3472 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
3477 #: ../src/guestfs.pod:1544
3479 "The second variant has the same name with the suffix C<_va>, which works the "
3480 "same way but takes a C<va_list>. See the C manual for details. For the "
3481 "example function, this is declared:"
3486 #: ../src/guestfs.pod:1548
3489 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
3496 #: ../src/guestfs.pod:1551
3497 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
3502 #: ../src/guestfs.pod:1553
3504 "The third variant is useful where you need to construct these calls. You "
3505 "pass in a structure where you fill in the optional fields. The structure "
3506 "has a bitmask as the first element which you must set to indicate which "
3507 "fields you have filled in. For our example function the structure and call "
3513 #: ../src/guestfs.pod:1559
3516 " struct guestfs_add_drive_opts_argv {\n"
3517 " uint64_t bitmask;\n"
3519 " const char *format;\n"
3522 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
3523 " const struct guestfs_add_drive_opts_argv *optargs);\n"
3529 #: ../src/guestfs.pod:1568
3530 msgid "You could call it like this:"
3535 #: ../src/guestfs.pod:1570
3538 " struct guestfs_add_drive_opts_argv optargs = {\n"
3539 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
3540 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
3542 " .format = \"qcow2\"\n"
3549 #: ../src/guestfs.pod:1577
3552 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
3558 #: ../src/guestfs.pod:1579 ../src/guestfs-actions.pod:11
3559 #: ../src/guestfs-actions.pod:1842 ../fish/guestfish-actions.pod:9
3560 #: ../fish/guestfish-actions.pod:1253 ../tools/virt-win-reg.pl:532
3566 #: ../src/guestfs.pod:1585
3567 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
3572 #: ../src/guestfs.pod:1590
3573 msgid "You do not need to fill in all fields of the structure."
3578 #: ../src/guestfs.pod:1594
3580 "There must be a one-to-one correspondence between fields of the structure "
3581 "that are filled in, and bits set in the bitmask."
3586 #: ../src/guestfs.pod:1599
3587 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
3592 #: ../src/guestfs.pod:1601
3594 "In other languages, optional arguments are expressed in the way that is "
3595 "natural for that language. We refer you to the language-specific "
3596 "documentation for more details on that."
3601 #: ../src/guestfs.pod:1605
3602 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
3607 #: ../src/guestfs.pod:1607
3608 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
3613 #: ../src/guestfs.pod:1609
3615 "The child process generates events in some situations. Current events "
3616 "include: receiving a log message, the child process exits."
3621 #: ../src/guestfs.pod:1612
3623 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
3629 #: ../src/guestfs.pod:1615
3631 "Only I<one callback of each type> can be registered for each handle. "
3632 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
3633 "that type. Cancel all callbacks of this type by calling this function with "
3634 "C<cb> set to C<NULL>."
3639 #: ../src/guestfs.pod:1620
3640 msgid "guestfs_set_log_message_callback"
3645 #: ../src/guestfs.pod:1622
3648 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
3649 " char *buf, int len);\n"
3650 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
3651 " guestfs_log_message_cb cb,\n"
3658 #: ../src/guestfs.pod:1628
3660 "The callback function C<cb> will be called whenever qemu or the guest writes "
3661 "anything to the console."
3666 #: ../src/guestfs.pod:1631
3667 msgid "Use this function to capture kernel messages and similar."
3672 #: ../src/guestfs.pod:1633
3674 "Normally there is no log message handler, and log messages are just "
3680 #: ../src/guestfs.pod:1636
3681 msgid "guestfs_set_subprocess_quit_callback"
3686 #: ../src/guestfs.pod:1638
3689 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
3690 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
3691 " guestfs_subprocess_quit_cb cb,\n"
3698 #: ../src/guestfs.pod:1643
3700 "The callback function C<cb> will be called when the child process quits, "
3701 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
3702 "corresponds to a transition from any state to the CONFIG state)."
3707 #: ../src/guestfs.pod:1648
3708 msgid "guestfs_set_launch_done_callback"
3713 #: ../src/guestfs.pod:1650
3716 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
3717 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
3718 " guestfs_launch_done_cb cb,\n"
3725 #: ../src/guestfs.pod:1655
3727 "The callback function C<cb> will be called when the child process becomes "
3728 "ready first time after it has been launched. (This corresponds to a "
3729 "transition from LAUNCHING to the READY state)."
3734 #: ../src/guestfs.pod:1659
3735 msgid "guestfs_set_close_callback"
3740 #: ../src/guestfs.pod:1661
3743 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
3744 " void guestfs_set_close_callback (guestfs_h *g,\n"
3745 " guestfs_close_cb cb,\n"
3752 #: ../src/guestfs.pod:1666
3754 "The callback function C<cb> will be called while the handle is being closed "
3755 "(synchronously from L</guestfs_close>)."
3760 #: ../src/guestfs.pod:1669
3762 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
3763 "handles that are open when the program exits. This means that this callback "
3764 "might be called indirectly from L<exit(3)>, which can cause unexpected "
3765 "problems in higher-level languages (eg. if your HLL interpreter has already "
3766 "been cleaned up by the time this is called, and if your callback then jumps "
3767 "into some HLL function)."
3772 #: ../src/guestfs.pod:1677
3773 msgid "guestfs_set_progress_callback"
3778 #: ../src/guestfs.pod:1679
3781 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
3782 " int proc_nr, int serial,\n"
3783 " uint64_t position, uint64_t total);\n"
3784 " void guestfs_set_progress_callback (guestfs_h *g,\n"
3785 " guestfs_progress_cb cb,\n"
3792 #: ../src/guestfs.pod:1686
3794 "Some long-running operations can generate progress messages. If this "
3795 "callback is registered, then it will be called each time a progress message "
3796 "is generated (usually two seconds after the operation started, and three "
3797 "times per second thereafter until it completes, although the frequency may "
3798 "change in future versions)."
3803 #: ../src/guestfs.pod:1692
3805 "The callback receives two numbers: C<position> and C<total>. The units of "
3806 "C<total> are not defined, although for some operations C<total> may relate "
3807 "in some way to the amount of data to be transferred (eg. in bytes or "
3808 "megabytes), and C<position> may be the portion which has been transferred."
3813 #: ../src/guestfs.pod:1698
3814 msgid "The only defined and stable parts of the API are:"
3819 #: ../src/guestfs.pod:1704
3821 "The callback can display to the user some type of progress bar or indicator "
3822 "which shows the ratio of C<position>:C<total>."
3827 #: ../src/guestfs.pod:1709
3828 msgid "0 E<lt>= C<position> E<lt>= C<total>"
3833 #: ../src/guestfs.pod:1713
3835 "If any progress notification is sent during a call, then a final progress "
3836 "notification is always sent when C<position> = C<total>."
3841 #: ../src/guestfs.pod:1716
3843 "This is to simplify caller code, so callers can easily set the progress "
3844 "indicator to \"100%\" at the end of the operation, without requiring special "
3845 "code to detect this case."
3850 #: ../src/guestfs.pod:1722
3852 "The callback also receives the procedure number and serial number of the "
3853 "call. These are only useful for debugging protocol issues, and the callback "
3854 "can normally ignore them. The callback may want to print these numbers in "
3855 "error messages or debugging messages."
3860 #: ../src/guestfs.pod:1727
3861 msgid "PRIVATE DATA AREA"
3866 #: ../src/guestfs.pod:1729
3868 "You can attach named pieces of private data to the libguestfs handle, and "
3869 "fetch them by name for the lifetime of the handle. This is called the "
3870 "private data area and is only available from the C API."
3875 #: ../src/guestfs.pod:1733
3876 msgid "To attach a named piece of data, use the following call:"
3881 #: ../src/guestfs.pod:1735
3884 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
3890 #: ../src/guestfs.pod:1737
3892 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
3893 "pointer (which can be C<NULL>). Any previous item with the same name is "
3899 #: ../src/guestfs.pod:1741
3901 "You can use any C<key> you want, but names beginning with an underscore "
3902 "character are reserved for internal libguestfs purposes (for implementing "
3903 "language bindings). It is recommended to prefix the name with some unique "
3904 "string to avoid collisions with other users."
3909 #: ../src/guestfs.pod:1746
3910 msgid "To retrieve the pointer, use:"
3915 #: ../src/guestfs.pod:1748
3918 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
3924 #: ../src/guestfs.pod:1750
3926 "This function returns C<NULL> if either no data is found associated with "
3927 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
3933 #: ../src/guestfs.pod:1754
3935 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
3936 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
3937 "all. In particular, libguestfs does I<not> try to free the data when the "
3938 "handle is closed. If the data must be freed, then the caller must either "
3939 "free it before calling L</guestfs_close> or must set up a close callback to "
3940 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
3941 "can be registered for a handle)."
3946 #: ../src/guestfs.pod:1762
3948 "The private data area is implemented using a hash table, and should be "
3949 "reasonably efficient for moderate numbers of keys."
3954 #: ../src/guestfs.pod:1765 ../src/guestfs.pod:1770
3960 #: ../src/guestfs.pod:1767
3962 "<!-- old anchor for the next section --> <a name="
3963 "\"state_machine_and_low_level_event_api\"/>"
3968 #: ../src/guestfs.pod:1772
3969 msgid "ARCHITECTURE"
3974 #: ../src/guestfs.pod:1774
3976 "Internally, libguestfs is implemented by running an appliance (a special "
3977 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
3978 "process of the main program."
3983 #: ../src/guestfs.pod:1778
3986 " ___________________\n"
3988 " | main program |\n"
3990 " | | child process / appliance\n"
3991 " | | __________________________\n"
3993 " +-------------------+ RPC | +-----------------+ |\n"
3994 " | libguestfs <--------------------> guestfsd | |\n"
3995 " | | | +-----------------+ |\n"
3996 " \\___________________/ | | Linux kernel | |\n"
3997 " | +--^--------------+ |\n"
3998 " \\_________|________________/\n"
4004 " \\______________/\n"
4010 #: ../src/guestfs.pod:1798
4012 "The library, linked to the main program, creates the child process and hence "
4013 "the appliance in the L</guestfs_launch> function."
4018 #: ../src/guestfs.pod:1801
4020 "Inside the appliance is a Linux kernel and a complete stack of userspace "
4021 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
4022 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
4023 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
4024 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
4025 "attached to the qemu process which translates device access by the "
4026 "appliance's Linux kernel into accesses to the image."
4031 #: ../src/guestfs.pod:1810
4033 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
4034 "Although the disk image you are attached to might also be used by some "
4035 "virtual machine, libguestfs doesn't know or care about this. (But you will "
4036 "care if both libguestfs's qemu process and your virtual machine are trying "
4037 "to update the disk image at the same time, since these usually results in "
4038 "massive disk corruption)."
4043 #: ../src/guestfs.pod:1817
4044 msgid "STATE MACHINE"
4049 #: ../src/guestfs.pod:1819
4050 msgid "libguestfs uses a state machine to model the child process:"
4055 #: ../src/guestfs.pod:1821
4067 " / | \\ \\ guestfs_launch\n"
4068 " / | _\\__V______\n"
4070 " / | | LAUNCHING |\n"
4071 " / | \\___________/\n"
4073 " / | guestfs_launch\n"
4075 " ______ / __|____V\n"
4076 " / \\ ------> / \\\n"
4077 " | BUSY | | READY |\n"
4078 " \\______/ <------ \\________/\n"
4084 #: ../src/guestfs.pod:1843
4086 "The normal transitions are (1) CONFIG (when the handle is created, but there "
4087 "is no child process), (2) LAUNCHING (when the child process is booting up), "
4088 "(3) alternating between READY and BUSY as commands are issued to, and "
4089 "carried out by, the child process."
4094 #: ../src/guestfs.pod:1848
4096 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
4097 "asynchronously at any time (eg. due to some internal error), and that causes "
4098 "the state to transition back to CONFIG."
4103 #: ../src/guestfs.pod:1852
4105 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
4106 "issued when in the CONFIG state."
4111 #: ../src/guestfs.pod:1855
4113 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
4114 "L</guestfs_launch> blocks until the child process is READY to accept "
4115 "commands (or until some failure or timeout). L</guestfs_launch> internally "
4116 "moves the state from CONFIG to LAUNCHING while it is running."
4121 #: ../src/guestfs.pod:1861
4123 "API actions such as L</guestfs_mount> can only be issued when in the READY "
4124 "state. These API calls block waiting for the command to be carried out (ie. "
4125 "the state to transition to BUSY and then back to READY). There are no non-"
4126 "blocking versions, and no way to issue more than one command per handle at "
4132 #: ../src/guestfs.pod:1867
4134 "Finally, the child process sends asynchronous messages back to the main "
4135 "program, such as kernel log messages. You can register a callback to "
4136 "receive these messages."
4141 #: ../src/guestfs.pod:1871
4147 #: ../src/guestfs.pod:1873
4148 msgid "COMMUNICATION PROTOCOL"
4153 #: ../src/guestfs.pod:1875
4155 "Don't rely on using this protocol directly. This section documents how it "
4156 "currently works, but it may change at any time."
4161 #: ../src/guestfs.pod:1878
4163 "The protocol used to talk between the library and the daemon running inside "
4164 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
4165 "1014, RFC 1832, RFC 4506)."
4170 #: ../src/guestfs.pod:1882
4172 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
4173 "this file is automatically generated)."
4178 #: ../src/guestfs.pod:1885
4180 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
4181 "and C<FileOut> parameters, which are handled with very simple request/reply "
4182 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
4183 "parameters, which use the same request and reply messages, but they may also "
4184 "be followed by files sent using a chunked encoding."
4189 #: ../src/guestfs.pod:1892
4190 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
4195 #: ../src/guestfs.pod:1894
4196 msgid "For ordinary functions, the request message is:"
4201 #: ../src/guestfs.pod:1896
4204 " total length (header + arguments,\n"
4205 " but not including the length word itself)\n"
4206 " struct guestfs_message_header (encoded as XDR)\n"
4207 " struct guestfs_<foo>_args (encoded as XDR)\n"
4213 #: ../src/guestfs.pod:1901
4215 "The total length field allows the daemon to allocate a fixed size buffer "
4216 "into which it slurps the rest of the message. As a result, the total length "
4217 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
4218 "effective size of any request is limited to somewhere under this size."
4223 #: ../src/guestfs.pod:1907
4225 "Note also that many functions don't take any arguments, in which case the "
4226 "C<guestfs_I<foo>_args> is completely omitted."
4231 #: ../src/guestfs.pod:1910
4233 "The header contains the procedure number (C<guestfs_proc>) which is how the "
4234 "receiver knows what type of args structure to expect, or none at all."
4239 #: ../src/guestfs.pod:1914
4241 "For functions that take optional arguments, the optional arguments are "
4242 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
4243 "arguments. A bitmask in the header indicates which optional arguments are "
4244 "meaningful. The bitmask is also checked to see if it contains bits set "
4245 "which the daemon does not know about (eg. if more optional arguments were "
4246 "added in a later version of the library), and this causes the call to be "
4252 #: ../src/guestfs.pod:1922
4253 msgid "The reply message for ordinary functions is:"
4258 #: ../src/guestfs.pod:1924
4261 " total length (header + ret,\n"
4262 " but not including the length word itself)\n"
4263 " struct guestfs_message_header (encoded as XDR)\n"
4264 " struct guestfs_<foo>_ret (encoded as XDR)\n"
4270 #: ../src/guestfs.pod:1929
4272 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
4273 "functions that return no formal return values."
4278 #: ../src/guestfs.pod:1932
4280 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
4285 #: ../src/guestfs.pod:1935
4287 "In the case of an error, a flag is set in the header, and the reply message "
4288 "is slightly changed:"
4293 #: ../src/guestfs.pod:1938
4296 " total length (header + error,\n"
4297 " but not including the length word itself)\n"
4298 " struct guestfs_message_header (encoded as XDR)\n"
4299 " struct guestfs_message_error (encoded as XDR)\n"
4305 #: ../src/guestfs.pod:1943
4307 "The C<guestfs_message_error> structure contains the error message as a "
4313 #: ../src/guestfs.pod:1946
4314 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
4319 #: ../src/guestfs.pod:1948
4321 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
4322 "The normal request message is sent (see above). However this is followed by "
4323 "a sequence of file chunks."
4328 #: ../src/guestfs.pod:1952
4331 " total length (header + arguments,\n"
4332 " but not including the length word itself,\n"
4333 " and not including the chunks)\n"
4334 " struct guestfs_message_header (encoded as XDR)\n"
4335 " struct guestfs_<foo>_args (encoded as XDR)\n"
4336 " sequence of chunks for FileIn param #0\n"
4337 " sequence of chunks for FileIn param #1 etc.\n"
4343 #: ../src/guestfs.pod:1960
4344 msgid "The \"sequence of chunks\" is:"
4349 #: ../src/guestfs.pod:1962
4352 " length of chunk (not including length word itself)\n"
4353 " struct guestfs_chunk (encoded as XDR)\n"
4354 " length of chunk\n"
4355 " struct guestfs_chunk (encoded as XDR)\n"
4357 " length of chunk\n"
4358 " struct guestfs_chunk (with data.data_len == 0)\n"
4364 #: ../src/guestfs.pod:1970
4366 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
4367 "is set in the final chunk to indicate either successful completion or early "
4373 #: ../src/guestfs.pod:1974
4375 "At time of writing there are no functions that have more than one FileIn "
4376 "parameter. However this is (theoretically) supported, by sending the "
4377 "sequence of chunks for each FileIn parameter one after another (from left to "
4383 #: ../src/guestfs.pod:1979
4385 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
4386 "transfer. The library does this by sending a chunk with a special flag set "
4387 "to indicate cancellation. When the daemon sees this, it cancels the whole "
4388 "RPC, does I<not> send any reply, and goes back to reading the next request."
4393 #: ../src/guestfs.pod:1985
4395 "The daemon may also cancel. It does this by writing a special word "
4396 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
4397 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
4398 "cancel chunk). The special word is chosen so that even if cancellation "
4399 "happens right at the end of the transfer (after the library has finished "
4400 "writing and has started listening for the reply), the \"spurious\" cancel "
4401 "flag will not be confused with the reply message."
4406 #: ../src/guestfs.pod:1994
4408 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
4409 "limit), and also files where the size is not known in advance (eg. from "
4410 "pipes or sockets). However the chunks are rather small "
4411 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
4412 "to keep much in memory."
4417 #: ../src/guestfs.pod:2000
4418 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
4423 #: ../src/guestfs.pod:2002
4425 "The protocol for FileOut parameters is exactly the same as for FileIn "
4426 "parameters, but with the roles of daemon and library reversed."
4431 #: ../src/guestfs.pod:2005
4434 " total length (header + ret,\n"
4435 " but not including the length word itself,\n"
4436 " and not including the chunks)\n"
4437 " struct guestfs_message_header (encoded as XDR)\n"
4438 " struct guestfs_<foo>_ret (encoded as XDR)\n"
4439 " sequence of chunks for FileOut param #0\n"
4440 " sequence of chunks for FileOut param #1 etc.\n"
4446 #: ../src/guestfs.pod:2013
4447 msgid "INITIAL MESSAGE"
4452 #: ../src/guestfs.pod:2015
4454 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
4455 "which indicates that the guest and daemon is alive. This is what L</"
4456 "guestfs_launch> waits for."
4461 #: ../src/guestfs.pod:2019
4462 msgid "PROGRESS NOTIFICATION MESSAGES"
4467 #: ../src/guestfs.pod:2021
4469 "The daemon may send progress notification messages at any time. These are "
4470 "distinguished by the normal length word being replaced by "
4471 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
4476 #: ../src/guestfs.pod:2025
4478 "The library turns them into progress callbacks (see "
4479 "C<guestfs_set_progress_callback>) if there is a callback registered, or "
4480 "discards them if not."
4485 #: ../src/guestfs.pod:2029
4487 "The daemon self-limits the frequency of progress messages it sends (see "
4488 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
4494 #: ../src/guestfs.pod:2033
4495 msgid "LIBGUESTFS VERSION NUMBERS"
4500 #: ../src/guestfs.pod:2035
4502 "Since April 2010, libguestfs has started to make separate development and "
4503 "stable releases, along with corresponding branches in our git repository. "
4504 "These separate releases can be identified by version number:"
4509 #: ../src/guestfs.pod:2040
4512 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
4513 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
4519 " | `-------- sub-version\n"
4521 " `------ always '1' because we don't change the ABI\n"
4527 #: ../src/guestfs.pod:2051
4528 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
4533 #: ../src/guestfs.pod:2053
4535 "As time passes we cherry pick fixes from the development branch and backport "
4536 "those into the stable branch, the effect being that the stable branch should "
4537 "get more stable and less buggy over time. So the stable releases are ideal "
4538 "for people who don't need new features but would just like the software to "
4544 #: ../src/guestfs.pod:2059
4545 msgid "Our criteria for backporting changes are:"
4550 #: ../src/guestfs.pod:2065
4552 "Documentation changes which don't affect any code are backported unless the "
4553 "documentation refers to a future feature which is not in stable."
4558 #: ../src/guestfs.pod:2071
4560 "Bug fixes which are not controversial, fix obvious problems, and have been "
4561 "well tested are backported."
4566 #: ../src/guestfs.pod:2076
4568 "Simple rearrangements of code which shouldn't affect how it works get "
4569 "backported. This is so that the code in the two branches doesn't get too "
4570 "far out of step, allowing us to backport future fixes more easily."
4575 #: ../src/guestfs.pod:2082
4577 "We I<don't> backport new features, new APIs, new tools etc, except in one "
4578 "exceptional case: the new feature is required in order to implement an "
4579 "important bug fix."
4584 #: ../src/guestfs.pod:2088
4586 "A new stable branch starts when we think the new features in development are "
4587 "substantial and compelling enough over the current stable branch to warrant "
4588 "it. When that happens we create new stable and development versions 1.N.0 "
4589 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
4590 "stable at this point, but by backporting fixes from development, that branch "
4591 "will stabilize over time."
4595 #: ../src/guestfs.pod:2096
4596 msgid "EXTENDING LIBGUESTFS"
4600 #: ../src/guestfs.pod:2098
4601 msgid "ADDING A NEW API ACTION"
4605 #: ../src/guestfs.pod:2100
4607 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
4608 "documentation) are generated, and this makes it easy to extend the "
4613 #: ../src/guestfs.pod:2104
4614 msgid "To add a new API action there are two changes:"
4618 #: ../src/guestfs.pod:2110
4620 "You need to add a description of the call (name, parameters, return type, "
4621 "tests, documentation) to C<generator/generator_actions.ml>."
4625 #: ../src/guestfs.pod:2113
4627 "There are two sorts of API action, depending on whether the call goes "
4628 "through to the daemon in the appliance, or is serviced entirely by the "
4629 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
4630 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
4631 "an example of the latter, since a trace flag is maintained in the handle and "
4632 "all tracing is done on the library side."
4636 #: ../src/guestfs.pod:2121
4638 "Most new actions are of the first type, and get added to the "
4639 "C<daemon_functions> list. Each function has a unique procedure number used "
4640 "in the RPC protocol which is assigned to that action when we publish "
4641 "libguestfs and cannot be reused. Take the latest procedure number and "
4646 #: ../src/guestfs.pod:2127
4648 "For library-only actions of the second type, add to the "
4649 "C<non_daemon_functions> list. Since these functions are serviced by the "
4650 "library and do not travel over the RPC mechanism to the daemon, these "
4651 "functions do not need a procedure number, and so the procedure number is set "
4656 #: ../src/guestfs.pod:2135
4657 msgid "Implement the action (in C):"
4661 #: ../src/guestfs.pod:2137
4663 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
4664 "C<daemon/> directory."
4668 #: ../src/guestfs.pod:2140
4670 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
4671 "(note: double underscore) in the C<src/> directory."
4675 #: ../src/guestfs.pod:2143
4676 msgid "In either case, use another function as an example of what to do."
4680 #: ../src/guestfs.pod:2147
4681 msgid "After making these changes, use C<make> to compile."
4685 #: ../src/guestfs.pod:2149
4687 "Note that you don't need to implement the RPC, language bindings, manual "
4688 "pages or anything else. It's all automatically generated from the OCaml "
4693 #: ../src/guestfs.pod:2153
4694 msgid "ADDING TESTS FOR AN API ACTION"
4698 #: ../src/guestfs.pod:2155
4700 "You can supply zero or as many tests as you want per API call. The tests "
4701 "can either be added as part of the API description (C<generator/"
4702 "generator_actions.ml>), or in some rarer cases you may want to drop a script "
4703 "into C<regressions/>. Note that adding a script to C<regressions/> is "
4704 "slower, so if possible use the first method."
4708 #: ../src/guestfs.pod:2161
4710 "The following describes the test environment used when you add an API test "
4711 "in C<generator_actions.ml>."
4715 #: ../src/guestfs.pod:2164
4716 msgid "The test environment has 4 block devices:"
4720 #: ../src/guestfs.pod:2168
4721 msgid "C</dev/sda> 500MB"
4725 #: ../src/guestfs.pod:2170
4726 msgid "General block device for testing."
4730 #: ../src/guestfs.pod:2172
4731 msgid "C</dev/sdb> 50MB"
4735 #: ../src/guestfs.pod:2174
4737 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
4742 #: ../src/guestfs.pod:2177
4743 msgid "C</dev/sdc> 10MB"
4747 #: ../src/guestfs.pod:2179
4748 msgid "Used in a few tests where two block devices are needed."
4752 #: ../src/guestfs.pod:2181
4757 #: ../src/guestfs.pod:2183
4758 msgid "ISO with fixed content (see C<images/test.iso>)."
4762 #: ../src/guestfs.pod:2187
4764 "To be able to run the tests in a reasonable amount of time, the libguestfs "
4765 "appliance and block devices are reused between tests. So don't try testing "
4766 "L</guestfs_kill_subprocess> :-x"
4770 #: ../src/guestfs.pod:2191
4772 "Each test starts with an initial scenario, selected using one of the "
4773 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
4774 "initialize the disks mentioned above in a particular way as documented in "
4775 "C<generator_types.ml>. You should not assume anything about the previous "
4776 "contents of other disks that are not initialized."
4780 #: ../src/guestfs.pod:2197
4782 "You can add a prerequisite clause to any individual test. This is a run-"
4783 "time check, which, if it fails, causes the test to be skipped. Useful if "
4784 "testing a command which might not work on all variations of libguestfs "
4785 "builds. A test that has prerequisite of C<Always> means to run "
4790 #: ../src/guestfs.pod:2203
4792 "In addition, packagers can skip individual tests by setting environment "
4793 "variables before running C<make check>."
4797 #: ../src/guestfs.pod:2206
4800 " SKIP_TEST_<CMD>_<NUM>=1\n"
4805 #: ../src/guestfs.pod:2208
4806 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
4810 #: ../src/guestfs.pod:2210
4815 #: ../src/guestfs.pod:2212
4818 " SKIP_TEST_<CMD>=1\n"
4823 #: ../src/guestfs.pod:2214
4824 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
4828 #: ../src/guestfs.pod:2216
4829 msgid "Packagers can run only certain tests by setting for example:"
4833 #: ../src/guestfs.pod:2218
4836 " TEST_ONLY=\"vfs_type zerofree\"\n"
4841 #: ../src/guestfs.pod:2220
4843 "See C<capitests/tests.c> for more details of how these environment variables "
4848 #: ../src/guestfs.pod:2223
4849 msgid "DEBUGGING NEW API ACTIONS"
4853 #: ../src/guestfs.pod:2225
4854 msgid "Test new actions work before submitting them."
4858 #: ../src/guestfs.pod:2227
4859 msgid "You can use guestfish to try out new commands."
4863 #: ../src/guestfs.pod:2229
4865 "Debugging the daemon is a problem because it runs inside a minimal "
4866 "environment. However you can fprintf messages in the daemon to stderr, and "
4867 "they will show up if you use C<guestfish -v>."
4871 #: ../src/guestfs.pod:2233
4872 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
4876 #: ../src/guestfs.pod:2235
4878 "Our C source code generally adheres to some basic code-formatting "
4879 "conventions. The existing code base is not totally consistent on this "
4880 "front, but we do prefer that contributed code be formatted similarly. In "
4881 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
4882 "indentation level, and other than that, follow the K&R style."
4886 #: ../src/guestfs.pod:2241
4888 "If you use Emacs, add the following to one of one of your start-up files (e."
4889 "g., ~/.emacs), to help ensure that you get indentation right:"
4893 #: ../src/guestfs.pod:2244
4896 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
4897 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
4898 " (add-hook 'find-file-hook\n"
4899 " '(lambda () (if (and buffer-file-name\n"
4900 " (string-match \"/libguestfs\\\\>\"\n"
4901 " (buffer-file-name))\n"
4902 " (not (string-equal mode-name \"Change Log\"))\n"
4903 " (not (string-equal mode-name \"Makefile\")))\n"
4904 " (setq indent-tabs-mode nil))))\n"
4909 #: ../src/guestfs.pod:2254
4912 " ;;; When editing C sources in libguestfs, use this style.\n"
4913 " (defun libguestfs-c-mode ()\n"
4914 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
4916 " (c-set-style \"K&R\")\n"
4917 " (setq c-indent-level 2)\n"
4918 " (setq c-basic-offset 2))\n"
4919 " (add-hook 'c-mode-hook\n"
4920 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
4921 " (buffer-file-name))\n"
4922 " (libguestfs-c-mode))))\n"
4927 #: ../src/guestfs.pod:2266
4928 msgid "Enable warnings when compiling (and fix any problems this finds):"
4932 #: ../src/guestfs.pod:2269
4935 " ./configure --enable-gcc-warnings\n"
4940 #: ../src/guestfs.pod:2271
4941 msgid "Useful targets are:"
4945 #: ../src/guestfs.pod:2273
4948 " make syntax-check # checks the syntax of the C code\n"
4949 " make check # runs the test suite\n"
4954 #: ../src/guestfs.pod:2276
4955 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
4959 #: ../src/guestfs.pod:2278
4961 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
4962 "which are used to do shell quoting."
4966 #: ../src/guestfs.pod:2283
4971 #: ../src/guestfs.pod:2285
4973 "Simple shell quoted string. Any spaces or other shell characters are "
4978 #: ../src/guestfs.pod:2288
4983 #: ../src/guestfs.pod:2290
4985 "Same as C<%Q> except the string is treated as a path which is prefixed by "
4991 #: ../src/guestfs.pod:2295 ../fish/guestfish.pod:240 ../fish/guestfish.pod:594
4992 msgid "For example:"
4996 #: ../src/guestfs.pod:2297
4999 " asprintf (&cmd, \"cat %R\", path);\n"
5004 #: ../src/guestfs.pod:2299
5005 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
5009 #: ../src/guestfs.pod:2301
5011 "I<Note:> Do I<not> use these when you are passing parameters to the C<command"
5012 "{,r,v,rv}()> functions. These parameters do NOT need to be quoted because "
5013 "they are not passed via the shell (instead, straight to exec). You probably "
5014 "want to use the C<sysroot_path()> function however."
5018 #: ../src/guestfs.pod:2307
5019 msgid "SUBMITTING YOUR NEW API ACTIONS"
5023 #: ../src/guestfs.pod:2309
5025 "Submit patches to the mailing list: L<http://www.redhat.com/mailman/listinfo/"
5026 "libguestfs> and CC to L<rjones@redhat.com>."
5030 #: ../src/guestfs.pod:2313
5031 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
5035 #: ../src/guestfs.pod:2315
5036 msgid "We support i18n (gettext anyhow) in the library."
5040 #: ../src/guestfs.pod:2317
5042 "However many messages come from the daemon, and we don't translate those at "
5043 "the moment. One reason is that the appliance generally has all locale files "
5044 "removed from it, because they take up a lot of space. So we'd have to readd "
5045 "some of those, as well as copying our PO files into the appliance."
5049 #: ../src/guestfs.pod:2323
5051 "Debugging messages are never translated, since they are intended for the "
5056 #: ../src/guestfs.pod:2326
5057 msgid "SOURCE CODE SUBDIRECTORIES"
5061 #: ../src/guestfs.pod:2330
5062 msgid "C<appliance>"
5066 #: ../src/guestfs.pod:2332
5067 msgid "The libguestfs appliance, build scripts and so on."
5071 #: ../src/guestfs.pod:2334
5072 msgid "C<capitests>"
5076 #: ../src/guestfs.pod:2336
5077 msgid "Automated tests of the C API."
5081 #: ../src/guestfs.pod:2338
5086 #: ../src/guestfs.pod:2340
5088 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
5093 #: ../src/guestfs.pod:2343
5098 #: ../src/guestfs.pod:2345
5099 msgid "Outside contributions, experimental parts."
5103 #: ../src/guestfs.pod:2347
5108 #: ../src/guestfs.pod:2349
5110 "The daemon that runs inside the libguestfs appliance and carries out actions."
5114 #: ../src/guestfs.pod:2352
5119 #: ../src/guestfs.pod:2354
5120 msgid "L<virt-df(1)> command and documentation."
5124 #: ../src/guestfs.pod:2356
5129 #: ../src/guestfs.pod:2358
5130 msgid "C API example code."
5134 #: ../src/guestfs.pod:2360
5139 #: ../src/guestfs.pod:2362
5141 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
5142 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
5143 "L<virt-tar-out(1)>."
5147 #: ../src/guestfs.pod:2366
5152 #: ../src/guestfs.pod:2368
5154 "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
5158 #: ../src/guestfs.pod:2370
5159 msgid "C<generator>"
5163 #: ../src/guestfs.pod:2372
5165 "The crucially important generator, used to automatically generate large "
5166 "amounts of boilerplate C code for things like RPC and bindings."
5170 #: ../src/guestfs.pod:2375
5175 #: ../src/guestfs.pod:2377
5176 msgid "Files used by the test suite."
5180 #: ../src/guestfs.pod:2379
5181 msgid "Some \"phony\" guest images which we test against."
5185 #: ../src/guestfs.pod:2381
5186 msgid "C<inspector>"
5190 #: ../src/guestfs.pod:2383
5191 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
5195 #: ../src/guestfs.pod:2385
5200 #: ../src/guestfs.pod:2387
5201 msgid "Logo used on the website. The fish is called Arthur by the way."
5205 #: ../src/guestfs.pod:2389
5210 #: ../src/guestfs.pod:2391
5211 msgid "M4 macros used by autoconf."
5215 #: ../src/guestfs.pod:2393
5220 #: ../src/guestfs.pod:2395
5221 msgid "Translations of simple gettext strings."
5225 #: ../src/guestfs.pod:2397
5230 #: ../src/guestfs.pod:2399
5232 "The build infrastructure and PO files for translations of manpages and POD "
5233 "files. Eventually this will be combined with the C<po> directory, but that "
5234 "is rather complicated."
5238 #: ../src/guestfs.pod:2403
5239 msgid "C<regressions>"
5243 #: ../src/guestfs.pod:2405
5244 msgid "Regression tests."
5248 #: ../src/guestfs.pod:2407
5253 #: ../src/guestfs.pod:2409
5254 msgid "L<virt-rescue(1)> command and documentation."
5258 #: ../src/guestfs.pod:2411
5263 #: ../src/guestfs.pod:2413
5264 msgid "Source code to the C library."
5268 #: ../src/guestfs.pod:2415
5273 #: ../src/guestfs.pod:2417
5274 msgid "Command line tools written in Perl (L<virt-resize(1)> and many others)."
5278 #: ../src/guestfs.pod:2419
5279 msgid "C<test-tool>"
5283 #: ../src/guestfs.pod:2421
5285 "Test tool for end users to test if their qemu/kernel combination will work "
5290 #: ../src/guestfs.pod:2424
5295 #: ../src/guestfs.pod:2426
5300 #: ../src/guestfs.pod:2428
5305 #: ../src/guestfs.pod:2430
5310 #: ../src/guestfs.pod:2432
5315 #: ../src/guestfs.pod:2434
5320 #: ../src/guestfs.pod:2436
5325 #: ../src/guestfs.pod:2438
5330 #: ../src/guestfs.pod:2440
5331 msgid "Language bindings."
5336 #: ../src/guestfs.pod:2444 ../fish/guestfish.pod:965
5337 #: ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:330
5338 msgid "ENVIRONMENT VARIABLES"
5343 #: ../src/guestfs.pod:2448 ../fish/guestfish.pod:991
5344 msgid "LIBGUESTFS_APPEND"
5349 #: ../src/guestfs.pod:2450 ../fish/guestfish.pod:993
5350 msgid "Pass additional options to the guest kernel."
5355 #: ../src/guestfs.pod:2452 ../fish/guestfish.pod:995
5356 msgid "LIBGUESTFS_DEBUG"
5361 #: ../src/guestfs.pod:2454
5363 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
5364 "effect as calling C<guestfs_set_verbose (g, 1)>."
5369 #: ../src/guestfs.pod:2457 ../fish/guestfish.pod:1000
5370 msgid "LIBGUESTFS_MEMSIZE"
5375 #: ../src/guestfs.pod:2459 ../fish/guestfish.pod:1002
5377 "Set the memory allocated to the qemu process, in megabytes. For example:"
5382 #: ../src/guestfs.pod:2462 ../fish/guestfish.pod:1005
5385 " LIBGUESTFS_MEMSIZE=700\n"
5391 #: ../src/guestfs.pod:2464 ../fish/guestfish.pod:1007
5392 msgid "LIBGUESTFS_PATH"
5397 #: ../src/guestfs.pod:2466
5399 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
5400 "the discussion of paths in section PATH above."
5405 #: ../src/guestfs.pod:2469 ../fish/guestfish.pod:1012
5406 msgid "LIBGUESTFS_QEMU"
5411 #: ../src/guestfs.pod:2471 ../fish/guestfish.pod:1014
5413 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
5414 "which was found at compile time by the configure script is used."
5419 #: ../src/guestfs.pod:2475
5420 msgid "See also L</QEMU WRAPPERS> above."
5425 #: ../src/guestfs.pod:2477 ../fish/guestfish.pod:1018
5426 msgid "LIBGUESTFS_TRACE"
5431 #: ../src/guestfs.pod:2479
5433 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
5434 "effect as calling C<guestfs_set_trace (g, 1)>."
5439 #: ../src/guestfs.pod:2482 ../fish/guestfish.pod:1027
5445 #: ../src/guestfs.pod:2484 ../fish/guestfish.pod:1029
5446 msgid "Location of temporary directory, defaults to C</tmp>."
5451 #: ../src/guestfs.pod:2486 ../fish/guestfish.pod:1031
5453 "If libguestfs was compiled to use the supermin appliance then the real "
5454 "appliance is cached in this directory, shared between all handles belonging "
5455 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
5456 "use in case C</tmp> is not large enough."
5461 #: ../src/guestfs.pod:2494 ../fish/guestfish.pod:1089
5462 #: ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:233
5463 #: ../tools/virt-edit.pl:350 ../tools/virt-win-reg.pl:572
5464 #: ../tools/virt-resize.pl:1483 ../tools/virt-list-filesystems.pl:189
5465 #: ../tools/virt-tar.pl:286 ../tools/virt-make-fs.pl:534
5466 #: ../tools/virt-list-partitions.pl:257
5471 #: ../src/guestfs.pod:2496
5473 "L<guestfs-examples(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, L<guestfs-"
5474 "ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-copy-in"
5475 "(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems"
5476 "(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-"
5477 "partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-"
5478 "tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<qemu(1)"
5479 ">, L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
5484 #: ../src/guestfs.pod:2523
5486 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
5487 "(8)>, L<disktype(1)>."
5492 #: ../src/guestfs.pod:2530 ../tools/virt-win-reg.pl:587
5493 #: ../tools/virt-make-fs.pl:548
5499 #: ../src/guestfs.pod:2532
5500 msgid "To get a list of bugs against libguestfs use this link:"
5505 #: ../src/guestfs.pod:2534
5507 "L<https://bugzilla.redhat.com/buglist.cgi?"
5508 "component=libguestfs&product=Virtualization+Tools>"
5513 #: ../src/guestfs.pod:2536
5514 msgid "To report a new bug against libguestfs use this link:"
5519 #: ../src/guestfs.pod:2538
5521 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
5522 "component=libguestfs&product=Virtualization+Tools>"
5527 #: ../src/guestfs.pod:2540
5528 msgid "When reporting a bug, please check:"
5533 #: ../src/guestfs.pod:2546
5534 msgid "That the bug hasn't been reported already."
5539 #: ../src/guestfs.pod:2550
5540 msgid "That you are testing a recent version."
5545 #: ../src/guestfs.pod:2554
5546 msgid "Describe the bug accurately, and give a way to reproduce it."
5551 #: ../src/guestfs.pod:2558
5553 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
5559 #: ../src/guestfs.pod:2563 ../fish/guestfish.pod:1112
5560 #: ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:244
5566 #: ../src/guestfs.pod:2565 ../fish/guestfish.pod:1114
5567 #: ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:246
5568 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
5573 #: ../src/guestfs.pod:2567 ../fish/guestfish.pod:1116
5574 #: ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:248
5575 #: ../tools/virt-edit.pl:368 ../tools/virt-win-reg.pl:602
5576 #: ../tools/virt-resize.pl:1508 ../tools/virt-list-filesystems.pl:206
5577 #: ../tools/virt-tar.pl:305 ../tools/virt-make-fs.pl:563
5578 #: ../tools/virt-list-partitions.pl:273
5584 #: ../src/guestfs.pod:2569 ../fish/guestfish.pod:1118
5585 #: ../fuse/guestmount.pod:250
5586 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
5591 #: ../src/guestfs.pod:2572
5593 "This library is free software; you can redistribute it and/or modify it "
5594 "under the terms of the GNU Lesser General Public License as published by the "
5595 "Free Software Foundation; either version 2 of the License, or (at your "
5596 "option) any later version."
5601 #: ../src/guestfs.pod:2577
5603 "This library is distributed in the hope that it will be useful, but WITHOUT "
5604 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
5605 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
5611 #: ../src/guestfs.pod:2582
5613 "You should have received a copy of the GNU Lesser General Public License "
5614 "along with this library; if not, write to the Free Software Foundation, "
5615 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
5620 #: ../src/guestfs-actions.pod:1
5621 msgid "guestfs_add_cdrom"
5626 #: ../src/guestfs-actions.pod:3
5630 " guestfs_add_cdrom (guestfs_h *g,\n"
5631 " const char *filename);\n"
5637 #: ../src/guestfs-actions.pod:7 ../fish/guestfish-actions.pod:5
5638 msgid "This function adds a virtual CD-ROM disk image to the guest."
5643 #: ../src/guestfs-actions.pod:9 ../fish/guestfish-actions.pod:7
5644 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
5649 #: ../src/guestfs-actions.pod:17
5651 "This call checks for the existence of C<filename>. This stops you from "
5652 "specifying other types of drive which are supported by qemu such as C<nbd:> "
5653 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
5659 #: ../src/guestfs-actions.pod:24
5661 "If you just want to add an ISO file (often you use this as an efficient way "
5662 "to transfer large files into the guest), then you should probably use "
5663 "C<guestfs_add_drive_ro> instead."
5668 #: ../src/guestfs-actions.pod:30 ../src/guestfs-actions.pod:126
5669 #: ../src/guestfs-actions.pod:187 ../src/guestfs-actions.pod:224
5670 #: ../src/guestfs-actions.pod:238 ../src/guestfs-actions.pod:259
5671 #: ../src/guestfs-actions.pod:279 ../src/guestfs-actions.pod:293
5672 #: ../src/guestfs-actions.pod:408 ../src/guestfs-actions.pod:428
5673 #: ../src/guestfs-actions.pod:442 ../src/guestfs-actions.pod:487
5674 #: ../src/guestfs-actions.pod:515 ../src/guestfs-actions.pod:533
5675 #: ../src/guestfs-actions.pod:600 ../src/guestfs-actions.pod:633
5676 #: ../src/guestfs-actions.pod:647 ../src/guestfs-actions.pod:662
5677 #: ../src/guestfs-actions.pod:761 ../src/guestfs-actions.pod:779
5678 #: ../src/guestfs-actions.pod:793 ../src/guestfs-actions.pod:807
5679 #: ../src/guestfs-actions.pod:968 ../src/guestfs-actions.pod:988
5680 #: ../src/guestfs-actions.pod:1006 ../src/guestfs-actions.pod:1090
5681 #: ../src/guestfs-actions.pod:1108 ../src/guestfs-actions.pod:1127
5682 #: ../src/guestfs-actions.pod:1141 ../src/guestfs-actions.pod:1161
5683 #: ../src/guestfs-actions.pod:1231 ../src/guestfs-actions.pod:1262
5684 #: ../src/guestfs-actions.pod:1287 ../src/guestfs-actions.pod:1324
5685 #: ../src/guestfs-actions.pod:1430 ../src/guestfs-actions.pod:1464
5686 #: ../src/guestfs-actions.pod:1682 ../src/guestfs-actions.pod:1704
5687 #: ../src/guestfs-actions.pod:1791 ../src/guestfs-actions.pod:2243
5688 #: ../src/guestfs-actions.pod:2387 ../src/guestfs-actions.pod:2448
5689 #: ../src/guestfs-actions.pod:2483 ../src/guestfs-actions.pod:3226
5690 #: ../src/guestfs-actions.pod:3241 ../src/guestfs-actions.pod:3261
5691 #: ../src/guestfs-actions.pod:3416 ../src/guestfs-actions.pod:3430
5692 #: ../src/guestfs-actions.pod:3443 ../src/guestfs-actions.pod:3457
5693 #: ../src/guestfs-actions.pod:3472 ../src/guestfs-actions.pod:3508
5694 #: ../src/guestfs-actions.pod:3580 ../src/guestfs-actions.pod:3600
5695 #: ../src/guestfs-actions.pod:3617 ../src/guestfs-actions.pod:3640
5696 #: ../src/guestfs-actions.pod:3663 ../src/guestfs-actions.pod:3695
5697 #: ../src/guestfs-actions.pod:3714 ../src/guestfs-actions.pod:3733
5698 #: ../src/guestfs-actions.pod:3768 ../src/guestfs-actions.pod:3780
5699 #: ../src/guestfs-actions.pod:3816 ../src/guestfs-actions.pod:3832
5700 #: ../src/guestfs-actions.pod:3845 ../src/guestfs-actions.pod:3860
5701 #: ../src/guestfs-actions.pod:3877 ../src/guestfs-actions.pod:3970
5702 #: ../src/guestfs-actions.pod:3990 ../src/guestfs-actions.pod:4003
5703 #: ../src/guestfs-actions.pod:4054 ../src/guestfs-actions.pod:4072
5704 #: ../src/guestfs-actions.pod:4090 ../src/guestfs-actions.pod:4106
5705 #: ../src/guestfs-actions.pod:4120 ../src/guestfs-actions.pod:4134
5706 #: ../src/guestfs-actions.pod:4151 ../src/guestfs-actions.pod:4166
5707 #: ../src/guestfs-actions.pod:4186 ../src/guestfs-actions.pod:4230
5708 #: ../src/guestfs-actions.pod:4303 ../src/guestfs-actions.pod:4334
5709 #: ../src/guestfs-actions.pod:4353 ../src/guestfs-actions.pod:4372
5710 #: ../src/guestfs-actions.pod:4384 ../src/guestfs-actions.pod:4401
5711 #: ../src/guestfs-actions.pod:4414 ../src/guestfs-actions.pod:4429
5712 #: ../src/guestfs-actions.pod:4444 ../src/guestfs-actions.pod:4479
5713 #: ../src/guestfs-actions.pod:4494 ../src/guestfs-actions.pod:4514
5714 #: ../src/guestfs-actions.pod:4528 ../src/guestfs-actions.pod:4545
5715 #: ../src/guestfs-actions.pod:4594 ../src/guestfs-actions.pod:4631
5716 #: ../src/guestfs-actions.pod:4645 ../src/guestfs-actions.pod:4673
5717 #: ../src/guestfs-actions.pod:4690 ../src/guestfs-actions.pod:4708
5718 #: ../src/guestfs-actions.pod:4842 ../src/guestfs-actions.pod:4899
5719 #: ../src/guestfs-actions.pod:4921 ../src/guestfs-actions.pod:4939
5720 #: ../src/guestfs-actions.pod:4971 ../src/guestfs-actions.pod:5037
5721 #: ../src/guestfs-actions.pod:5054 ../src/guestfs-actions.pod:5067
5722 #: ../src/guestfs-actions.pod:5081 ../src/guestfs-actions.pod:5370
5723 #: ../src/guestfs-actions.pod:5389 ../src/guestfs-actions.pod:5403
5724 #: ../src/guestfs-actions.pod:5415 ../src/guestfs-actions.pod:5429
5725 #: ../src/guestfs-actions.pod:5441 ../src/guestfs-actions.pod:5455
5726 #: ../src/guestfs-actions.pod:5471 ../src/guestfs-actions.pod:5492
5727 #: ../src/guestfs-actions.pod:5511 ../src/guestfs-actions.pod:5530
5728 #: ../src/guestfs-actions.pod:5548 ../src/guestfs-actions.pod:5571
5729 #: ../src/guestfs-actions.pod:5589 ../src/guestfs-actions.pod:5608
5730 #: ../src/guestfs-actions.pod:5629 ../src/guestfs-actions.pod:5648
5731 #: ../src/guestfs-actions.pod:5665 ../src/guestfs-actions.pod:5693
5732 #: ../src/guestfs-actions.pod:5717 ../src/guestfs-actions.pod:5736
5733 #: ../src/guestfs-actions.pod:5760 ../src/guestfs-actions.pod:5775
5734 #: ../src/guestfs-actions.pod:5790 ../src/guestfs-actions.pod:5809
5735 #: ../src/guestfs-actions.pod:5846 ../src/guestfs-actions.pod:5869
5736 #: ../src/guestfs-actions.pod:5895 ../src/guestfs-actions.pod:6003
5737 #: ../src/guestfs-actions.pod:6124 ../src/guestfs-actions.pod:6136
5738 #: ../src/guestfs-actions.pod:6149 ../src/guestfs-actions.pod:6162
5739 #: ../src/guestfs-actions.pod:6184 ../src/guestfs-actions.pod:6197
5740 #: ../src/guestfs-actions.pod:6210 ../src/guestfs-actions.pod:6223
5741 #: ../src/guestfs-actions.pod:6238 ../src/guestfs-actions.pod:6297
5742 #: ../src/guestfs-actions.pod:6314 ../src/guestfs-actions.pod:6330
5743 #: ../src/guestfs-actions.pod:6346 ../src/guestfs-actions.pod:6363
5744 #: ../src/guestfs-actions.pod:6376 ../src/guestfs-actions.pod:6396
5745 #: ../src/guestfs-actions.pod:6432 ../src/guestfs-actions.pod:6446
5746 #: ../src/guestfs-actions.pod:6487 ../src/guestfs-actions.pod:6500
5747 #: ../src/guestfs-actions.pod:6518 ../src/guestfs-actions.pod:6552
5748 #: ../src/guestfs-actions.pod:6588 ../src/guestfs-actions.pod:6707
5749 #: ../src/guestfs-actions.pod:6725 ../src/guestfs-actions.pod:6739
5750 #: ../src/guestfs-actions.pod:6794 ../src/guestfs-actions.pod:6807
5751 #: ../src/guestfs-actions.pod:6852 ../src/guestfs-actions.pod:6885
5752 #: ../src/guestfs-actions.pod:6939 ../src/guestfs-actions.pod:6965
5753 #: ../src/guestfs-actions.pod:7031 ../src/guestfs-actions.pod:7050
5754 #: ../src/guestfs-actions.pod:7079
5755 msgid "This function returns 0 on success or -1 on error."
5760 #: ../src/guestfs-actions.pod:32 ../src/guestfs-actions.pod:240
5761 #: ../src/guestfs-actions.pod:261 ../fish/guestfish-actions.pod:28
5762 #: ../fish/guestfish-actions.pod:151 ../fish/guestfish-actions.pod:165
5764 "This function is deprecated. In new code, use the C<add_drive_opts> call "
5770 #: ../src/guestfs-actions.pod:35 ../src/guestfs-actions.pod:243
5771 #: ../src/guestfs-actions.pod:264 ../src/guestfs-actions.pod:1435
5772 #: ../src/guestfs-actions.pod:1921 ../src/guestfs-actions.pod:1942
5773 #: ../src/guestfs-actions.pod:4191 ../src/guestfs-actions.pod:6973
5774 #: ../src/guestfs-actions.pod:7142 ../fish/guestfish-actions.pod:31
5775 #: ../fish/guestfish-actions.pod:154 ../fish/guestfish-actions.pod:168
5776 #: ../fish/guestfish-actions.pod:949 ../fish/guestfish-actions.pod:1306
5777 #: ../fish/guestfish-actions.pod:1320 ../fish/guestfish-actions.pod:2820
5778 #: ../fish/guestfish-actions.pod:4622 ../fish/guestfish-actions.pod:4719
5780 "Deprecated functions will not be removed from the API, but the fact that "
5781 "they are deprecated indicates that there are problems with correct use of "
5787 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:128
5788 #: ../src/guestfs-actions.pod:1092 ../src/guestfs-actions.pod:1893
5789 #: ../src/guestfs-actions.pod:1991 ../src/guestfs-actions.pod:2094
5790 #: ../src/guestfs-actions.pod:3228 ../src/guestfs-actions.pod:3243
5791 #: ../src/guestfs-actions.pod:4481 ../src/guestfs-actions.pod:5550
5792 #: ../src/guestfs-actions.pod:5667 ../src/guestfs-actions.pod:5777
5793 #: ../src/guestfs-actions.pod:6240 ../src/guestfs-actions.pod:6365
5794 #: ../src/guestfs-actions.pod:6887
5795 msgid "(Added in 0.3)"
5800 #: ../src/guestfs-actions.pod:41
5801 msgid "guestfs_add_domain"
5806 #: ../src/guestfs-actions.pod:43
5810 " guestfs_add_domain (guestfs_h *g,\n"
5811 " const char *dom,\n"
5818 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:137
5819 #: ../src/guestfs-actions.pod:4205
5821 "You may supply a list of optional arguments to this call. Use zero or more "
5822 "of the following pairs of parameters, and terminate the list with C<-1> on "
5823 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
5828 #: ../src/guestfs-actions.pod:53
5831 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
5832 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
5833 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
5839 #: ../src/guestfs-actions.pod:57
5841 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
5842 "It works by connecting to libvirt, requesting the domain and domain XML from "
5843 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
5849 #: ../src/guestfs-actions.pod:62 ../fish/guestfish-actions.pod:46
5851 "The number of disks added is returned. This operation is atomic: if an "
5852 "error is returned, then no disks are added."
5857 #: ../src/guestfs-actions.pod:65 ../fish/guestfish-actions.pod:49
5859 "This function does some minimal checks to make sure the libvirt domain is "
5860 "not running (unless C<readonly> is true). In a future version we will try "
5861 "to acquire the libvirt lock on each disk."
5866 #: ../src/guestfs-actions.pod:69 ../fish/guestfish-actions.pod:53
5868 "Disks must be accessible locally. This often means that adding disks from a "
5869 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
5870 "unless those disks are accessible via the same device path locally too."
5874 #: ../src/guestfs-actions.pod:74 ../fish/guestfish-actions.pod:58
5876 "The optional C<libvirturi> parameter sets the libvirt URI (see L<http://"
5877 "libvirt.org/uri.html>). If this is not set then we connect to the default "
5878 "libvirt URI (or one set through an environment variable, see the libvirt "
5879 "documentation for full details)."
5884 #: ../src/guestfs-actions.pod:80
5886 "The other optional parameters are passed directly through to "
5887 "C<guestfs_add_drive_opts>."
5892 #: ../src/guestfs-actions.pod:83 ../src/guestfs-actions.pod:336
5893 #: ../src/guestfs-actions.pod:501 ../src/guestfs-actions.pod:679
5894 #: ../src/guestfs-actions.pod:710 ../src/guestfs-actions.pod:728
5895 #: ../src/guestfs-actions.pod:747 ../src/guestfs-actions.pod:1307
5896 #: ../src/guestfs-actions.pod:1661 ../src/guestfs-actions.pod:1864
5897 #: ../src/guestfs-actions.pod:1963 ../src/guestfs-actions.pod:2003
5898 #: ../src/guestfs-actions.pod:2058 ../src/guestfs-actions.pod:2081
5899 #: ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:2662
5900 #: ../src/guestfs-actions.pod:2683 ../src/guestfs-actions.pod:4617
5901 #: ../src/guestfs-actions.pod:4745 ../src/guestfs-actions.pod:5151
5902 #: ../src/guestfs-actions.pod:5177 ../src/guestfs-actions.pod:6473
5903 #: ../src/guestfs-actions.pod:6898 ../src/guestfs-actions.pod:6911
5904 #: ../src/guestfs-actions.pod:6924
5905 msgid "On error this function returns -1."
5910 #: ../src/guestfs-actions.pod:85
5911 msgid "(Added in 1.7.4)"
5916 #: ../src/guestfs-actions.pod:87
5917 msgid "guestfs_add_domain_va"
5922 #: ../src/guestfs-actions.pod:89
5926 " guestfs_add_domain_va (guestfs_h *g,\n"
5927 " const char *dom,\n"
5934 #: ../src/guestfs-actions.pod:94
5935 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
5940 #: ../src/guestfs-actions.pod:96 ../src/guestfs-actions.pod:107
5941 #: ../src/guestfs-actions.pod:200 ../src/guestfs-actions.pod:211
5942 #: ../src/guestfs-actions.pod:4244 ../src/guestfs-actions.pod:4256
5943 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
5948 #: ../src/guestfs-actions.pod:98
5949 msgid "guestfs_add_domain_argv"
5954 #: ../src/guestfs-actions.pod:100
5958 " guestfs_add_domain_argv (guestfs_h *g,\n"
5959 " const char *dom,\n"
5960 " const struct guestfs_add_domain_argv *optargs);\n"
5966 #: ../src/guestfs-actions.pod:105
5967 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
5972 #: ../src/guestfs-actions.pod:109
5973 msgid "guestfs_add_drive"
5978 #: ../src/guestfs-actions.pod:111
5982 " guestfs_add_drive (guestfs_h *g,\n"
5983 " const char *filename);\n"
5989 #: ../src/guestfs-actions.pod:115
5991 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
5992 "optional parameters, so the disk is added writable, with the format being "
5993 "detected automatically."
5998 #: ../src/guestfs-actions.pod:119
6000 "Automatic detection of the format opens you up to a potential security hole "
6001 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6002 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
6003 "you should think about replacing calls to this function with calls to "
6004 "C<guestfs_add_drive_opts>, and specifying the format."
6009 #: ../src/guestfs-actions.pod:130
6010 msgid "guestfs_add_drive_opts"
6015 #: ../src/guestfs-actions.pod:132
6019 " guestfs_add_drive_opts (guestfs_h *g,\n"
6020 " const char *filename,\n"
6027 #: ../src/guestfs-actions.pod:142
6030 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
6031 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
6032 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
6038 #: ../src/guestfs-actions.pod:146 ../fish/guestfish-actions.pod:90
6040 "This function adds a virtual machine disk image C<filename> to libguestfs. "
6041 "The first time you call this function, the disk appears as C</dev/sda>, the "
6042 "second time as C</dev/sdb>, and so on."
6047 #: ../src/guestfs-actions.pod:151 ../fish/guestfish-actions.pod:95
6049 "You don't necessarily need to be root when using libguestfs. However you "
6050 "obviously do need sufficient permissions to access the filename for whatever "
6051 "operations you want to perform (ie. read access if you just want to read the "
6052 "image or write access if you want to modify the image)."
6057 #: ../src/guestfs-actions.pod:157 ../fish/guestfish-actions.pod:101
6058 msgid "This call checks that C<filename> exists."
6063 #: ../src/guestfs-actions.pod:159 ../src/guestfs-actions.pod:4215
6064 #: ../fish/guestfish-actions.pod:103 ../fish/guestfish-actions.pod:2831
6065 msgid "The optional arguments are:"
6070 #: ../src/guestfs-actions.pod:163 ../fish/guestfish-actions.pod:107
6076 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:109
6078 "If true then the image is treated as read-only. Writes are still allowed, "
6079 "but they are stored in a temporary snapshot overlay which is discarded at "
6080 "the end. The disk that you add is not modified."
6085 #: ../src/guestfs-actions.pod:169 ../fish/guestfish-actions.pod:113
6091 #: ../src/guestfs-actions.pod:171
6093 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
6094 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
6095 "Possible formats include C<raw> and C<qcow2>."
6100 #: ../src/guestfs-actions.pod:175 ../fish/guestfish-actions.pod:119
6102 "Automatic detection of the format opens you up to a potential security hole "
6103 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6104 "RHBZ#642934. Specifying the format closes this security hole."
6109 #: ../src/guestfs-actions.pod:180 ../fish/guestfish-actions.pod:124
6115 #: ../src/guestfs-actions.pod:182
6117 "This rarely-used option lets you emulate the behaviour of the deprecated "
6118 "C<guestfs_add_drive_with_if> call (q.v.)"
6123 #: ../src/guestfs-actions.pod:189
6124 msgid "(Added in 1.5.23)"
6129 #: ../src/guestfs-actions.pod:191
6130 msgid "guestfs_add_drive_opts_va"
6135 #: ../src/guestfs-actions.pod:193
6139 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
6140 " const char *filename,\n"
6147 #: ../src/guestfs-actions.pod:198
6148 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
6153 #: ../src/guestfs-actions.pod:202
6154 msgid "guestfs_add_drive_opts_argv"
6159 #: ../src/guestfs-actions.pod:204
6163 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
6164 " const char *filename,\n"
6165 " const struct guestfs_add_drive_opts_argv *optargs);\n"
6171 #: ../src/guestfs-actions.pod:209
6172 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
6177 #: ../src/guestfs-actions.pod:213
6178 msgid "guestfs_add_drive_ro"
6183 #: ../src/guestfs-actions.pod:215
6187 " guestfs_add_drive_ro (guestfs_h *g,\n"
6188 " const char *filename);\n"
6194 #: ../src/guestfs-actions.pod:219
6196 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
6197 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
6198 "disk is added read-only, with the format being detected automatically."
6203 #: ../src/guestfs-actions.pod:226
6204 msgid "(Added in 1.0.38)"
6209 #: ../src/guestfs-actions.pod:228
6210 msgid "guestfs_add_drive_ro_with_if"
6215 #: ../src/guestfs-actions.pod:230
6219 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
6220 " const char *filename,\n"
6221 " const char *iface);\n"
6227 #: ../src/guestfs-actions.pod:235
6229 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
6230 "QEMU interface emulation to use at run time."
6235 #: ../src/guestfs-actions.pod:247 ../src/guestfs-actions.pod:268
6236 #: ../src/guestfs-actions.pod:2333
6237 msgid "(Added in 1.0.84)"
6242 #: ../src/guestfs-actions.pod:249
6243 msgid "guestfs_add_drive_with_if"
6248 #: ../src/guestfs-actions.pod:251
6252 " guestfs_add_drive_with_if (guestfs_h *g,\n"
6253 " const char *filename,\n"
6254 " const char *iface);\n"
6260 #: ../src/guestfs-actions.pod:256
6262 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
6263 "QEMU interface emulation to use at run time."
6268 #: ../src/guestfs-actions.pod:270
6269 msgid "guestfs_aug_clear"
6274 #: ../src/guestfs-actions.pod:272
6278 " guestfs_aug_clear (guestfs_h *g,\n"
6279 " const char *augpath);\n"
6285 #: ../src/guestfs-actions.pod:276 ../fish/guestfish-actions.pod:176
6287 "Set the value associated with C<path> to C<NULL>. This is the same as the "
6288 "L<augtool(1)> C<clear> command."
6293 #: ../src/guestfs-actions.pod:281 ../src/guestfs-actions.pod:2083
6294 msgid "(Added in 1.3.4)"
6299 #: ../src/guestfs-actions.pod:283
6300 msgid "guestfs_aug_close"
6305 #: ../src/guestfs-actions.pod:285
6309 " guestfs_aug_close (guestfs_h *g);\n"
6315 #: ../src/guestfs-actions.pod:288
6317 "Close the current Augeas handle and free up any resources used by it. After "
6318 "calling this, you have to call C<guestfs_aug_init> again before you can use "
6319 "any other Augeas functions."
6324 #: ../src/guestfs-actions.pod:295 ../src/guestfs-actions.pod:320
6325 #: ../src/guestfs-actions.pod:338 ../src/guestfs-actions.pod:352
6326 #: ../src/guestfs-actions.pod:410 ../src/guestfs-actions.pod:430
6327 #: ../src/guestfs-actions.pod:444 ../src/guestfs-actions.pod:475
6328 #: ../src/guestfs-actions.pod:489 ../src/guestfs-actions.pod:503
6329 #: ../src/guestfs-actions.pod:517 ../src/guestfs-actions.pod:535
6330 #: ../src/guestfs-actions.pod:5228
6331 msgid "(Added in 0.7)"
6336 #: ../src/guestfs-actions.pod:297
6337 msgid "guestfs_aug_defnode"
6342 #: ../src/guestfs-actions.pod:299
6345 " struct guestfs_int_bool *\n"
6346 " guestfs_aug_defnode (guestfs_h *g,\n"
6347 " const char *name,\n"
6348 " const char *expr,\n"
6349 " const char *val);\n"
6355 #: ../src/guestfs-actions.pod:305 ../fish/guestfish-actions.pod:192
6357 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
6362 #: ../src/guestfs-actions.pod:308
6364 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
6365 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
6366 "containing that single node."
6371 #: ../src/guestfs-actions.pod:312 ../fish/guestfish-actions.pod:199
6373 "On success this returns a pair containing the number of nodes in the "
6374 "nodeset, and a boolean flag if a node was created."
6379 #: ../src/guestfs-actions.pod:316
6381 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
6382 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
6387 #: ../src/guestfs-actions.pod:322
6388 msgid "guestfs_aug_defvar"
6393 #: ../src/guestfs-actions.pod:324
6397 " guestfs_aug_defvar (guestfs_h *g,\n"
6398 " const char *name,\n"
6399 " const char *expr);\n"
6405 #: ../src/guestfs-actions.pod:329 ../fish/guestfish-actions.pod:207
6407 "Defines an Augeas variable C<name> whose value is the result of evaluating "
6408 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
6413 #: ../src/guestfs-actions.pod:333 ../fish/guestfish-actions.pod:211
6415 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
6416 "evaluates to something which is not a nodeset."
6421 #: ../src/guestfs-actions.pod:340
6422 msgid "guestfs_aug_get"
6427 #: ../src/guestfs-actions.pod:342
6431 " guestfs_aug_get (guestfs_h *g,\n"
6432 " const char *augpath);\n"
6438 #: ../src/guestfs-actions.pod:346 ../fish/guestfish-actions.pod:218
6440 "Look up the value associated with C<path>. If C<path> matches exactly one "
6441 "node, the C<value> is returned."
6446 #: ../src/guestfs-actions.pod:349 ../src/guestfs-actions.pod:849
6447 #: ../src/guestfs-actions.pod:867 ../src/guestfs-actions.pod:927
6448 #: ../src/guestfs-actions.pod:943 ../src/guestfs-actions.pod:1046
6449 #: ../src/guestfs-actions.pod:1176 ../src/guestfs-actions.pod:1193
6450 #: ../src/guestfs-actions.pod:1212 ../src/guestfs-actions.pod:1341
6451 #: ../src/guestfs-actions.pod:1532 ../src/guestfs-actions.pod:1644
6452 #: ../src/guestfs-actions.pod:1807 ../src/guestfs-actions.pod:1824
6453 #: ../src/guestfs-actions.pod:1915 ../src/guestfs-actions.pod:1936
6454 #: ../src/guestfs-actions.pod:2106 ../src/guestfs-actions.pod:2298
6455 #: ../src/guestfs-actions.pod:2505 ../src/guestfs-actions.pod:2586
6456 #: ../src/guestfs-actions.pod:2634 ../src/guestfs-actions.pod:2748
6457 #: ../src/guestfs-actions.pod:2779 ../src/guestfs-actions.pod:2803
6458 #: ../src/guestfs-actions.pod:2865 ../src/guestfs-actions.pod:2888
6459 #: ../src/guestfs-actions.pod:3402 ../src/guestfs-actions.pod:3752
6460 #: ../src/guestfs-actions.pod:3922 ../src/guestfs-actions.pod:4032
6461 #: ../src/guestfs-actions.pod:4763 ../src/guestfs-actions.pod:4956
6462 #: ../src/guestfs-actions.pod:5126 ../src/guestfs-actions.pod:5304
6463 #: ../src/guestfs-actions.pod:5353 ../src/guestfs-actions.pod:5916
6464 #: ../src/guestfs-actions.pod:5932 ../src/guestfs-actions.pod:5949
6465 #: ../src/guestfs-actions.pod:5973 ../src/guestfs-actions.pod:6647
6466 #: ../src/guestfs-actions.pod:6666 ../src/guestfs-actions.pod:6684
6467 #: ../src/guestfs-actions.pod:6864 ../src/guestfs-actions.pod:7136
6469 "This function returns a string, or NULL on error. I<The caller must free "
6470 "the returned string after use>."
6475 #: ../src/guestfs-actions.pod:354
6476 msgid "guestfs_aug_init"
6481 #: ../src/guestfs-actions.pod:356
6485 " guestfs_aug_init (guestfs_h *g,\n"
6486 " const char *root,\n"
6493 #: ../src/guestfs-actions.pod:361 ../fish/guestfish-actions.pod:225
6495 "Create a new Augeas handle for editing configuration files. If there was "
6496 "any previous Augeas handle associated with this guestfs session, then it is "
6502 #: ../src/guestfs-actions.pod:365
6503 msgid "You must call this before using any other C<guestfs_aug_*> commands."
6508 #: ../src/guestfs-actions.pod:368 ../fish/guestfish-actions.pod:232
6510 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
6515 #: ../src/guestfs-actions.pod:371 ../fish/guestfish-actions.pod:235
6517 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
6518 "logical I<or> of the following integers:"
6523 #: ../src/guestfs-actions.pod:377 ../fish/guestfish-actions.pod:241
6524 msgid "C<AUG_SAVE_BACKUP> = 1"
6529 #: ../src/guestfs-actions.pod:379 ../fish/guestfish-actions.pod:243
6530 msgid "Keep the original file with a C<.augsave> extension."
6535 #: ../src/guestfs-actions.pod:381 ../fish/guestfish-actions.pod:245
6536 msgid "C<AUG_SAVE_NEWFILE> = 2"
6541 #: ../src/guestfs-actions.pod:383 ../fish/guestfish-actions.pod:247
6543 "Save changes into a file with extension C<.augnew>, and do not overwrite "
6544 "original. Overrides C<AUG_SAVE_BACKUP>."
6549 #: ../src/guestfs-actions.pod:386 ../fish/guestfish-actions.pod:250
6550 msgid "C<AUG_TYPE_CHECK> = 4"
6555 #: ../src/guestfs-actions.pod:388 ../fish/guestfish-actions.pod:252
6556 msgid "Typecheck lenses (can be expensive)."
6561 #: ../src/guestfs-actions.pod:390 ../fish/guestfish-actions.pod:254
6562 msgid "C<AUG_NO_STDINC> = 8"
6567 #: ../src/guestfs-actions.pod:392 ../fish/guestfish-actions.pod:256
6568 msgid "Do not use standard load path for modules."
6573 #: ../src/guestfs-actions.pod:394 ../fish/guestfish-actions.pod:258
6574 msgid "C<AUG_SAVE_NOOP> = 16"
6579 #: ../src/guestfs-actions.pod:396 ../fish/guestfish-actions.pod:260
6580 msgid "Make save a no-op, just record what would have been changed."
6585 #: ../src/guestfs-actions.pod:398 ../fish/guestfish-actions.pod:262
6586 msgid "C<AUG_NO_LOAD> = 32"
6591 #: ../src/guestfs-actions.pod:400
6592 msgid "Do not load the tree in C<guestfs_aug_init>."
6597 #: ../src/guestfs-actions.pod:404
6598 msgid "To close the handle, you can call C<guestfs_aug_close>."
6603 #: ../src/guestfs-actions.pod:406 ../fish/guestfish-actions.pod:270
6604 msgid "To find out more about Augeas, see L<http://augeas.net/>."
6609 #: ../src/guestfs-actions.pod:412
6610 msgid "guestfs_aug_insert"
6615 #: ../src/guestfs-actions.pod:414
6619 " guestfs_aug_insert (guestfs_h *g,\n"
6620 " const char *augpath,\n"
6621 " const char *label,\n"
6628 #: ../src/guestfs-actions.pod:420 ../fish/guestfish-actions.pod:276
6630 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
6631 "or after C<path> (depending on the boolean flag C<before>)."
6636 #: ../src/guestfs-actions.pod:424 ../fish/guestfish-actions.pod:280
6638 "C<path> must match exactly one existing node in the tree, and C<label> must "
6639 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
6644 #: ../src/guestfs-actions.pod:432
6645 msgid "guestfs_aug_load"
6650 #: ../src/guestfs-actions.pod:434
6654 " guestfs_aug_load (guestfs_h *g);\n"
6660 #: ../src/guestfs-actions.pod:437 ../fish/guestfish-actions.pod:288
6661 msgid "Load files into the tree."
6666 #: ../src/guestfs-actions.pod:439 ../fish/guestfish-actions.pod:290
6667 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
6672 #: ../src/guestfs-actions.pod:446
6673 msgid "guestfs_aug_ls"
6678 #: ../src/guestfs-actions.pod:448
6682 " guestfs_aug_ls (guestfs_h *g,\n"
6683 " const char *augpath);\n"
6689 #: ../src/guestfs-actions.pod:452
6691 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
6692 "sorting the resulting nodes into alphabetical order."
6697 #: ../src/guestfs-actions.pod:455 ../src/guestfs-actions.pod:471
6698 #: ../src/guestfs-actions.pod:617 ../src/guestfs-actions.pod:1065
6699 #: ../src/guestfs-actions.pod:1356 ../src/guestfs-actions.pod:1375
6700 #: ../src/guestfs-actions.pod:1478 ../src/guestfs-actions.pod:1497
6701 #: ../src/guestfs-actions.pod:1746 ../src/guestfs-actions.pod:2178
6702 #: ../src/guestfs-actions.pod:2194 ../src/guestfs-actions.pod:2213
6703 #: ../src/guestfs-actions.pod:2256 ../src/guestfs-actions.pod:2280
6704 #: ../src/guestfs-actions.pod:2351 ../src/guestfs-actions.pod:2400
6705 #: ../src/guestfs-actions.pod:2611 ../src/guestfs-actions.pod:2822
6706 #: ../src/guestfs-actions.pod:3037 ../src/guestfs-actions.pod:3322
6707 #: ../src/guestfs-actions.pod:3384 ../src/guestfs-actions.pod:3489
6708 #: ../src/guestfs-actions.pod:3894 ../src/guestfs-actions.pod:4578
6709 #: ../src/guestfs-actions.pod:5098 ../src/guestfs-actions.pod:5224
6710 #: ../src/guestfs-actions.pod:5338 ../src/guestfs-actions.pod:5989
6711 #: ../src/guestfs-actions.pod:6050 ../src/guestfs-actions.pod:6105
6712 #: ../src/guestfs-actions.pod:6251 ../src/guestfs-actions.pod:6275
6713 #: ../src/guestfs-actions.pod:6757 ../src/guestfs-actions.pod:6777
6714 #: ../src/guestfs-actions.pod:6824 ../src/guestfs-actions.pod:6989
6715 #: ../src/guestfs-actions.pod:7008 ../src/guestfs-actions.pod:7093
6716 #: ../src/guestfs-actions.pod:7112 ../src/guestfs-actions.pod:7158
6717 #: ../src/guestfs-actions.pod:7177
6719 "This function returns a NULL-terminated array of strings (like L<environ(3)"
6720 ">), or NULL if there was an error. I<The caller must free the strings and "
6721 "the array after use>."
6726 #: ../src/guestfs-actions.pod:459 ../src/guestfs-actions.pod:990
6727 #: ../src/guestfs-actions.pod:1008 ../src/guestfs-actions.pod:1413
6728 #: ../src/guestfs-actions.pod:3115 ../src/guestfs-actions.pod:3146
6729 #: ../src/guestfs-actions.pod:3735 ../src/guestfs-actions.pod:3785
6730 #: ../src/guestfs-actions.pod:3972 ../src/guestfs-actions.pod:4005
6731 #: ../src/guestfs-actions.pod:4168 ../src/guestfs-actions.pod:4582
6732 #: ../src/guestfs-actions.pod:5039 ../src/guestfs-actions.pod:5417
6733 #: ../src/guestfs-actions.pod:5431 ../src/guestfs-actions.pod:5443
6734 #: ../src/guestfs-actions.pod:5851 ../src/guestfs-actions.pod:6489
6735 #: ../src/guestfs-actions.pod:6502 ../src/guestfs-actions.pod:6741
6736 #: ../src/guestfs-actions.pod:6977
6737 msgid "(Added in 0.8)"
6742 #: ../src/guestfs-actions.pod:461
6743 msgid "guestfs_aug_match"
6748 #: ../src/guestfs-actions.pod:463
6752 " guestfs_aug_match (guestfs_h *g,\n"
6753 " const char *augpath);\n"
6759 #: ../src/guestfs-actions.pod:467 ../fish/guestfish-actions.pod:304
6761 "Returns a list of paths which match the path expression C<path>. The "
6762 "returned paths are sufficiently qualified so that they match exactly one "
6763 "node in the current tree."
6768 #: ../src/guestfs-actions.pod:477
6769 msgid "guestfs_aug_mv"
6774 #: ../src/guestfs-actions.pod:479
6778 " guestfs_aug_mv (guestfs_h *g,\n"
6779 " const char *src,\n"
6780 " const char *dest);\n"
6786 #: ../src/guestfs-actions.pod:484 ../fish/guestfish-actions.pod:312
6788 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
6789 "C<dest> is overwritten if it exists."
6794 #: ../src/guestfs-actions.pod:491
6795 msgid "guestfs_aug_rm"
6800 #: ../src/guestfs-actions.pod:493
6804 " guestfs_aug_rm (guestfs_h *g,\n"
6805 " const char *augpath);\n"
6811 #: ../src/guestfs-actions.pod:497 ../fish/guestfish-actions.pod:319
6812 msgid "Remove C<path> and all of its children."
6817 #: ../src/guestfs-actions.pod:499 ../fish/guestfish-actions.pod:321
6818 msgid "On success this returns the number of entries which were removed."
6823 #: ../src/guestfs-actions.pod:505
6824 msgid "guestfs_aug_save"
6829 #: ../src/guestfs-actions.pod:507
6833 " guestfs_aug_save (guestfs_h *g);\n"
6839 #: ../src/guestfs-actions.pod:510 ../fish/guestfish-actions.pod:327
6840 msgid "This writes all pending changes to disk."
6845 #: ../src/guestfs-actions.pod:512
6847 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
6853 #: ../src/guestfs-actions.pod:519
6854 msgid "guestfs_aug_set"
6859 #: ../src/guestfs-actions.pod:521
6863 " guestfs_aug_set (guestfs_h *g,\n"
6864 " const char *augpath,\n"
6865 " const char *val);\n"
6871 #: ../src/guestfs-actions.pod:526 ../fish/guestfish-actions.pod:336
6872 msgid "Set the value associated with C<path> to C<val>."
6877 #: ../src/guestfs-actions.pod:528
6879 "In the Augeas API, it is possible to clear a node by setting the value to "
6880 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
6881 "this call. Instead you must use the C<guestfs_aug_clear> call."
6886 #: ../src/guestfs-actions.pod:537
6887 msgid "guestfs_available"
6892 #: ../src/guestfs-actions.pod:539
6896 " guestfs_available (guestfs_h *g,\n"
6897 " char *const *groups);\n"
6903 #: ../src/guestfs-actions.pod:543 ../fish/guestfish-actions.pod:347
6905 "This command is used to check the availability of some groups of "
6906 "functionality in the appliance, which not all builds of the libguestfs "
6907 "appliance will be able to provide."
6912 #: ../src/guestfs-actions.pod:547
6914 "The libguestfs groups, and the functions that those groups correspond to, "
6915 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
6916 "runtime by calling C<guestfs_available_all_groups>."
6921 #: ../src/guestfs-actions.pod:552 ../fish/guestfish-actions.pod:356
6923 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
6924 "\"]> would check for the availability of the Linux inotify functions and "
6925 "Augeas (configuration file editing) functions."
6930 #: ../src/guestfs-actions.pod:557 ../fish/guestfish-actions.pod:361
6931 msgid "The command returns no error if I<all> requested groups are available."
6936 #: ../src/guestfs-actions.pod:559 ../fish/guestfish-actions.pod:363
6938 "It fails with an error if one or more of the requested groups is unavailable "
6944 #: ../src/guestfs-actions.pod:562 ../fish/guestfish-actions.pod:366
6946 "If an unknown group name is included in the list of groups then an error is "
6952 #: ../src/guestfs-actions.pod:565 ../fish/guestfish-actions.pod:369
6958 #: ../src/guestfs-actions.pod:571
6959 msgid "You must call C<guestfs_launch> before calling this function."
6964 #: ../src/guestfs-actions.pod:573 ../fish/guestfish-actions.pod:377
6966 "The reason is because we don't know what groups are supported by the "
6967 "appliance/daemon until it is running and can be queried."
6972 #: ../src/guestfs-actions.pod:579 ../fish/guestfish-actions.pod:383
6974 "If a group of functions is available, this does not necessarily mean that "
6975 "they will work. You still have to check for errors when calling individual "
6976 "API functions even if they are available."
6981 #: ../src/guestfs-actions.pod:586 ../fish/guestfish-actions.pod:390
6983 "It is usually the job of distro packagers to build complete functionality "
6984 "into the libguestfs appliance. Upstream libguestfs, if built from source "
6985 "with all requirements satisfied, will support everything."
6990 #: ../src/guestfs-actions.pod:593
6992 "This call was added in version C<1.0.80>. In previous versions of "
6993 "libguestfs all you could do would be to speculatively execute a command to "
6994 "find out if the daemon implemented it. See also C<guestfs_version>."
6999 #: ../src/guestfs-actions.pod:602 ../src/guestfs-actions.pod:1163
7000 msgid "(Added in 1.0.80)"
7005 #: ../src/guestfs-actions.pod:604
7006 msgid "guestfs_available_all_groups"
7011 #: ../src/guestfs-actions.pod:606
7015 " guestfs_available_all_groups (guestfs_h *g);\n"
7021 #: ../src/guestfs-actions.pod:609
7023 "This command returns a list of all optional groups that this daemon knows "
7024 "about. Note this returns both supported and unsupported groups. To find "
7025 "out which ones the daemon can actually support you have to call "
7026 "C<guestfs_available> on each member of the returned list."
7031 #: ../src/guestfs-actions.pod:615
7032 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
7037 #: ../src/guestfs-actions.pod:621
7038 msgid "(Added in 1.3.15)"
7043 #: ../src/guestfs-actions.pod:623
7044 msgid "guestfs_base64_in"
7049 #: ../src/guestfs-actions.pod:625
7053 " guestfs_base64_in (guestfs_h *g,\n"
7054 " const char *base64file,\n"
7055 " const char *filename);\n"
7061 #: ../src/guestfs-actions.pod:630 ../fish/guestfish-actions.pod:420
7063 "This command uploads base64-encoded data from C<base64file> to C<filename>."
7068 #: ../src/guestfs-actions.pod:635 ../src/guestfs-actions.pod:649
7069 msgid "(Added in 1.3.5)"
7074 #: ../src/guestfs-actions.pod:637
7075 msgid "guestfs_base64_out"
7080 #: ../src/guestfs-actions.pod:639
7084 " guestfs_base64_out (guestfs_h *g,\n"
7085 " const char *filename,\n"
7086 " const char *base64file);\n"
7092 #: ../src/guestfs-actions.pod:644 ../fish/guestfish-actions.pod:429
7094 "This command downloads the contents of C<filename>, writing it out to local "
7095 "file C<base64file> encoded as base64."
7100 #: ../src/guestfs-actions.pod:651
7101 msgid "guestfs_blockdev_flushbufs"
7106 #: ../src/guestfs-actions.pod:653
7110 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
7111 " const char *device);\n"
7117 #: ../src/guestfs-actions.pod:657 ../fish/guestfish-actions.pod:438
7119 "This tells the kernel to flush internal buffers associated with C<device>."
7124 #: ../src/guestfs-actions.pod:660 ../src/guestfs-actions.pod:677
7125 #: ../src/guestfs-actions.pod:692 ../src/guestfs-actions.pod:708
7126 #: ../src/guestfs-actions.pod:726 ../src/guestfs-actions.pod:745
7127 #: ../src/guestfs-actions.pod:759 ../src/guestfs-actions.pod:777
7128 #: ../src/guestfs-actions.pod:791 ../src/guestfs-actions.pod:805
7129 #: ../fish/guestfish-actions.pod:441 ../fish/guestfish-actions.pod:452
7130 #: ../fish/guestfish-actions.pod:461 ../fish/guestfish-actions.pod:471
7131 #: ../fish/guestfish-actions.pod:483 ../fish/guestfish-actions.pod:496
7132 #: ../fish/guestfish-actions.pod:504 ../fish/guestfish-actions.pod:515
7133 #: ../fish/guestfish-actions.pod:523 ../fish/guestfish-actions.pod:531
7134 msgid "This uses the L<blockdev(8)> command."
7139 #: ../src/guestfs-actions.pod:664 ../src/guestfs-actions.pod:681
7140 #: ../src/guestfs-actions.pod:696 ../src/guestfs-actions.pod:712
7141 #: ../src/guestfs-actions.pod:730 ../src/guestfs-actions.pod:749
7142 #: ../src/guestfs-actions.pod:763 ../src/guestfs-actions.pod:781
7143 #: ../src/guestfs-actions.pod:795 ../src/guestfs-actions.pod:809
7144 msgid "(Added in 0.9.3)"
7149 #: ../src/guestfs-actions.pod:666
7150 msgid "guestfs_blockdev_getbsz"
7155 #: ../src/guestfs-actions.pod:668
7159 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
7160 " const char *device);\n"
7166 #: ../src/guestfs-actions.pod:672 ../fish/guestfish-actions.pod:447
7167 msgid "This returns the block size of a device."
7172 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:774
7173 #: ../fish/guestfish-actions.pod:449 ../fish/guestfish-actions.pod:512
7175 "(Note this is different from both I<size in blocks> and I<filesystem block "
7181 #: ../src/guestfs-actions.pod:683
7182 msgid "guestfs_blockdev_getro"
7187 #: ../src/guestfs-actions.pod:685
7191 " guestfs_blockdev_getro (guestfs_h *g,\n"
7192 " const char *device);\n"
7198 #: ../src/guestfs-actions.pod:689 ../fish/guestfish-actions.pod:458
7200 "Returns a boolean indicating if the block device is read-only (true if read-"
7201 "only, false if not)."
7206 #: ../src/guestfs-actions.pod:694 ../src/guestfs-actions.pod:1396
7207 #: ../src/guestfs-actions.pod:1411 ../src/guestfs-actions.pod:1891
7208 #: ../src/guestfs-actions.pod:1902 ../src/guestfs-actions.pod:1974
7209 #: ../src/guestfs-actions.pod:2029 ../src/guestfs-actions.pod:2044
7210 #: ../src/guestfs-actions.pod:2069 ../src/guestfs-actions.pod:2092
7211 #: ../src/guestfs-actions.pod:3054 ../src/guestfs-actions.pod:3068
7212 #: ../src/guestfs-actions.pod:3083 ../src/guestfs-actions.pod:3097
7213 #: ../src/guestfs-actions.pod:3113 ../src/guestfs-actions.pod:3128
7214 #: ../src/guestfs-actions.pod:3144 ../src/guestfs-actions.pod:3158
7215 #: ../src/guestfs-actions.pod:3171 ../src/guestfs-actions.pod:3185
7216 #: ../src/guestfs-actions.pod:3200 ../src/guestfs-actions.pod:3215
7217 #: ../src/guestfs-actions.pod:4727
7218 msgid "This function returns a C truth value on success or -1 on error."
7223 #: ../src/guestfs-actions.pod:698
7224 msgid "guestfs_blockdev_getsize64"
7229 #: ../src/guestfs-actions.pod:700
7233 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
7234 " const char *device);\n"
7240 #: ../src/guestfs-actions.pod:704 ../fish/guestfish-actions.pod:467
7241 msgid "This returns the size of the device in bytes."
7246 #: ../src/guestfs-actions.pod:706
7247 msgid "See also C<guestfs_blockdev_getsz>."
7252 #: ../src/guestfs-actions.pod:714
7253 msgid "guestfs_blockdev_getss"
7258 #: ../src/guestfs-actions.pod:716
7262 " guestfs_blockdev_getss (guestfs_h *g,\n"
7263 " const char *device);\n"
7269 #: ../src/guestfs-actions.pod:720 ../fish/guestfish-actions.pod:477
7271 "This returns the size of sectors on a block device. Usually 512, but can be "
7272 "larger for modern devices."
7277 #: ../src/guestfs-actions.pod:723
7279 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
7285 #: ../src/guestfs-actions.pod:732
7286 msgid "guestfs_blockdev_getsz"
7291 #: ../src/guestfs-actions.pod:734
7295 " guestfs_blockdev_getsz (guestfs_h *g,\n"
7296 " const char *device);\n"
7302 #: ../src/guestfs-actions.pod:738 ../fish/guestfish-actions.pod:489
7304 "This returns the size of the device in units of 512-byte sectors (even if "
7305 "the sectorsize isn't 512 bytes ... weird)."
7310 #: ../src/guestfs-actions.pod:741
7312 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
7313 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
7318 #: ../src/guestfs-actions.pod:751
7319 msgid "guestfs_blockdev_rereadpt"
7324 #: ../src/guestfs-actions.pod:753
7328 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
7329 " const char *device);\n"
7335 #: ../src/guestfs-actions.pod:757 ../fish/guestfish-actions.pod:502
7336 msgid "Reread the partition table on C<device>."
7341 #: ../src/guestfs-actions.pod:765
7342 msgid "guestfs_blockdev_setbsz"
7347 #: ../src/guestfs-actions.pod:767
7351 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
7352 " const char *device,\n"
7353 " int blocksize);\n"
7359 #: ../src/guestfs-actions.pod:772 ../fish/guestfish-actions.pod:510
7360 msgid "This sets the block size of a device."
7365 #: ../src/guestfs-actions.pod:783
7366 msgid "guestfs_blockdev_setro"
7371 #: ../src/guestfs-actions.pod:785
7375 " guestfs_blockdev_setro (guestfs_h *g,\n"
7376 " const char *device);\n"
7382 #: ../src/guestfs-actions.pod:789 ../fish/guestfish-actions.pod:521
7383 msgid "Sets the block device named C<device> to read-only."
7388 #: ../src/guestfs-actions.pod:797
7389 msgid "guestfs_blockdev_setrw"
7394 #: ../src/guestfs-actions.pod:799
7398 " guestfs_blockdev_setrw (guestfs_h *g,\n"
7399 " const char *device);\n"
7405 #: ../src/guestfs-actions.pod:803 ../fish/guestfish-actions.pod:529
7406 msgid "Sets the block device named C<device> to read-write."
7411 #: ../src/guestfs-actions.pod:811
7412 msgid "guestfs_case_sensitive_path"
7417 #: ../src/guestfs-actions.pod:813
7421 " guestfs_case_sensitive_path (guestfs_h *g,\n"
7422 " const char *path);\n"
7428 #: ../src/guestfs-actions.pod:817 ../fish/guestfish-actions.pod:537
7430 "This can be used to resolve case insensitive paths on a filesystem which is "
7431 "case sensitive. The use case is to resolve paths which you have read from "
7432 "Windows configuration files or the Windows Registry, to the true path."
7437 #: ../src/guestfs-actions.pod:822 ../fish/guestfish-actions.pod:542
7439 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
7440 "(and probably others), which is that although the underlying filesystem is "
7441 "case-insensitive, the driver exports the filesystem to Linux as case-"
7447 #: ../src/guestfs-actions.pod:827 ../fish/guestfish-actions.pod:547
7449 "One consequence of this is that special directories such as C<c:\\windows> "
7450 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
7451 "precise details of how they were created. In Windows itself this would not "
7457 #: ../src/guestfs-actions.pod:833 ../fish/guestfish-actions.pod:553
7459 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
7465 #: ../src/guestfs-actions.pod:836 ../fish/guestfish-actions.pod:556
7467 "This function resolves the true case of each element in the path and returns "
7468 "the case-sensitive path."
7473 #: ../src/guestfs-actions.pod:839
7475 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
7476 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
7477 "how the directories were originally created under Windows)."
7482 #: ../src/guestfs-actions.pod:844 ../fish/guestfish-actions.pod:564
7483 msgid "I<Note>: This function does not handle drive names, backslashes etc."
7488 #: ../src/guestfs-actions.pod:847
7489 msgid "See also C<guestfs_realpath>."
7494 #: ../src/guestfs-actions.pod:852 ../src/guestfs-actions.pod:6669
7495 msgid "(Added in 1.0.75)"
7500 #: ../src/guestfs-actions.pod:854
7506 #: ../src/guestfs-actions.pod:856
7510 " guestfs_cat (guestfs_h *g,\n"
7511 " const char *path);\n"
7517 #: ../src/guestfs-actions.pod:860 ../src/guestfs-actions.pod:5214
7518 #: ../fish/guestfish-actions.pod:573 ../fish/guestfish-actions.pod:3466
7519 msgid "Return the contents of the file named C<path>."
7524 #: ../src/guestfs-actions.pod:862
7526 "Note that this function cannot correctly handle binary files (specifically, "
7527 "files containing C<\\0> character which is treated as end of string). For "
7528 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
7529 "functions which have a more complex interface."
7534 #: ../src/guestfs-actions.pod:870 ../src/guestfs-actions.pod:1049
7535 #: ../src/guestfs-actions.pod:1069 ../src/guestfs-actions.pod:1360
7536 #: ../src/guestfs-actions.pod:1379 ../src/guestfs-actions.pod:1482
7537 #: ../src/guestfs-actions.pod:1501 ../src/guestfs-actions.pod:1750
7538 #: ../src/guestfs-actions.pod:2198 ../src/guestfs-actions.pod:2217
7539 #: ../src/guestfs-actions.pod:2260 ../src/guestfs-actions.pod:2284
7540 #: ../src/guestfs-actions.pod:2301 ../src/guestfs-actions.pod:2330
7541 #: ../src/guestfs-actions.pod:4996 ../src/guestfs-actions.pod:5022
7542 #: ../src/guestfs-actions.pod:5153 ../src/guestfs-actions.pod:5179
7543 #: ../src/guestfs-actions.pod:5203 ../src/guestfs-actions.pod:6054
7544 #: ../src/guestfs-actions.pod:6109 ../src/guestfs-actions.pod:6255
7545 #: ../src/guestfs-actions.pod:6279 ../src/guestfs-actions.pod:6941
7546 #: ../src/guestfs-actions.pod:6967 ../src/guestfs-actions.pod:6993
7547 #: ../src/guestfs-actions.pod:7012 ../src/guestfs-actions.pod:7097
7548 #: ../src/guestfs-actions.pod:7116 ../src/guestfs-actions.pod:7162
7549 #: ../src/guestfs-actions.pod:7181 ../fish/guestfish-actions.pod:580
7550 #: ../fish/guestfish-actions.pod:715 ../fish/guestfish-actions.pod:727
7551 #: ../fish/guestfish-actions.pod:903 ../fish/guestfish-actions.pod:913
7552 #: ../fish/guestfish-actions.pod:980 ../fish/guestfish-actions.pod:990
7553 #: ../fish/guestfish-actions.pod:1185 ../fish/guestfish-actions.pod:1480
7554 #: ../fish/guestfish-actions.pod:1490 ../fish/guestfish-actions.pod:1518
7555 #: ../fish/guestfish-actions.pod:1533 ../fish/guestfish-actions.pod:1543
7556 #: ../fish/guestfish-actions.pod:1562 ../fish/guestfish-actions.pod:3336
7557 #: ../fish/guestfish-actions.pod:3351 ../fish/guestfish-actions.pod:3427
7558 #: ../fish/guestfish-actions.pod:3444 ../fish/guestfish-actions.pod:3459
7559 #: ../fish/guestfish-actions.pod:4042 ../fish/guestfish-actions.pod:4088
7560 #: ../fish/guestfish-actions.pod:4173 ../fish/guestfish-actions.pod:4188
7561 #: ../fish/guestfish-actions.pod:4598 ../fish/guestfish-actions.pod:4616
7562 #: ../fish/guestfish-actions.pod:4633 ../fish/guestfish-actions.pod:4643
7563 #: ../fish/guestfish-actions.pod:4691 ../fish/guestfish-actions.pod:4701
7564 #: ../fish/guestfish-actions.pod:4730 ../fish/guestfish-actions.pod:4740
7566 "Because of the message protocol, there is a transfer limit of somewhere "
7567 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
7572 #: ../src/guestfs-actions.pod:873 ../src/guestfs-actions.pod:3326
7573 #: ../src/guestfs-actions.pod:3388 ../src/guestfs-actions.pod:3405
7574 #: ../src/guestfs-actions.pod:3493 ../src/guestfs-actions.pod:3898
7575 #: ../src/guestfs-actions.pod:3912 ../src/guestfs-actions.pod:5102
7576 #: ../src/guestfs-actions.pod:5116 ../src/guestfs-actions.pod:6828
7577 #: ../src/guestfs-actions.pod:6842
7578 msgid "(Added in 0.4)"
7583 #: ../src/guestfs-actions.pod:875
7584 msgid "guestfs_checksum"
7589 #: ../src/guestfs-actions.pod:877
7593 " guestfs_checksum (guestfs_h *g,\n"
7594 " const char *csumtype,\n"
7595 " const char *path);\n"
7601 #: ../src/guestfs-actions.pod:882 ../fish/guestfish-actions.pod:587
7603 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
7608 #: ../src/guestfs-actions.pod:885 ../fish/guestfish-actions.pod:590
7610 "The type of checksum to compute is given by the C<csumtype> parameter which "
7611 "must have one of the following values:"
7616 #: ../src/guestfs-actions.pod:890 ../fish/guestfish-actions.pod:595
7622 #: ../src/guestfs-actions.pod:892 ../fish/guestfish-actions.pod:597
7624 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
7630 #: ../src/guestfs-actions.pod:895 ../fish/guestfish-actions.pod:600
7636 #: ../src/guestfs-actions.pod:897 ../fish/guestfish-actions.pod:602
7637 msgid "Compute the MD5 hash (using the C<md5sum> program)."
7642 #: ../src/guestfs-actions.pod:899 ../fish/guestfish-actions.pod:604
7648 #: ../src/guestfs-actions.pod:901 ../fish/guestfish-actions.pod:606
7649 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
7654 #: ../src/guestfs-actions.pod:903 ../fish/guestfish-actions.pod:608
7660 #: ../src/guestfs-actions.pod:905 ../fish/guestfish-actions.pod:610
7661 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
7666 #: ../src/guestfs-actions.pod:907 ../fish/guestfish-actions.pod:612
7672 #: ../src/guestfs-actions.pod:909 ../fish/guestfish-actions.pod:614
7673 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
7678 #: ../src/guestfs-actions.pod:911 ../fish/guestfish-actions.pod:616
7684 #: ../src/guestfs-actions.pod:913 ../fish/guestfish-actions.pod:618
7685 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
7690 #: ../src/guestfs-actions.pod:915 ../fish/guestfish-actions.pod:620
7696 #: ../src/guestfs-actions.pod:917 ../fish/guestfish-actions.pod:622
7697 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
7702 #: ../src/guestfs-actions.pod:921 ../fish/guestfish-actions.pod:626
7703 msgid "The checksum is returned as a printable string."
7708 #: ../src/guestfs-actions.pod:923
7709 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
7714 #: ../src/guestfs-actions.pod:925
7715 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
7720 #: ../src/guestfs-actions.pod:930 ../src/guestfs-actions.pod:1238
7721 #: ../src/guestfs-actions.pod:2060 ../src/guestfs-actions.pod:3070
7722 #: ../src/guestfs-actions.pod:3099 ../src/guestfs-actions.pod:3160
7723 #: ../src/guestfs-actions.pod:3187 ../src/guestfs-actions.pod:6525
7724 msgid "(Added in 1.0.2)"
7729 #: ../src/guestfs-actions.pod:932
7730 msgid "guestfs_checksum_device"
7735 #: ../src/guestfs-actions.pod:934
7739 " guestfs_checksum_device (guestfs_h *g,\n"
7740 " const char *csumtype,\n"
7741 " const char *device);\n"
7747 #: ../src/guestfs-actions.pod:939
7749 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
7750 "device named C<device>. For the types of checksums supported see the "
7751 "C<guestfs_checksum> command."
7756 #: ../src/guestfs-actions.pod:946 ../src/guestfs-actions.pod:4633
7757 #: ../src/guestfs-actions.pod:4692 ../src/guestfs-actions.pod:4729
7758 #: ../src/guestfs-actions.pod:4747 ../src/guestfs-actions.pod:4923
7759 #: ../src/guestfs-actions.pod:6434 ../src/guestfs-actions.pod:6448
7760 #: ../src/guestfs-actions.pod:6854
7761 msgid "(Added in 1.3.2)"
7766 #: ../src/guestfs-actions.pod:948
7767 msgid "guestfs_checksums_out"
7772 #: ../src/guestfs-actions.pod:950
7776 " guestfs_checksums_out (guestfs_h *g,\n"
7777 " const char *csumtype,\n"
7778 " const char *directory,\n"
7779 " const char *sumsfile);\n"
7785 #: ../src/guestfs-actions.pod:956 ../fish/guestfish-actions.pod:644
7787 "This command computes the checksums of all regular files in C<directory> and "
7788 "then emits a list of those checksums to the local output file C<sumsfile>."
7793 #: ../src/guestfs-actions.pod:960 ../fish/guestfish-actions.pod:648
7795 "This can be used for verifying the integrity of a virtual machine. However "
7796 "to be properly secure you should pay attention to the output of the checksum "
7797 "command (it uses the ones from GNU coreutils). In particular when the "
7798 "filename is not printable, coreutils uses a special backslash syntax. For "
7799 "more information, see the GNU coreutils info file."
7804 #: ../src/guestfs-actions.pod:970
7805 msgid "(Added in 1.3.7)"
7810 #: ../src/guestfs-actions.pod:972
7811 msgid "guestfs_chmod"
7816 #: ../src/guestfs-actions.pod:974
7820 " guestfs_chmod (guestfs_h *g,\n"
7822 " const char *path);\n"
7828 #: ../src/guestfs-actions.pod:979 ../fish/guestfish-actions.pod:662
7830 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
7836 #: ../src/guestfs-actions.pod:982 ../fish/guestfish-actions.pod:665
7838 "I<Note>: When using this command from guestfish, C<mode> by default would be "
7839 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
7845 #: ../src/guestfs-actions.pod:986 ../src/guestfs-actions.pod:4149
7846 #: ../src/guestfs-actions.pod:4332 ../src/guestfs-actions.pod:4351
7847 #: ../src/guestfs-actions.pod:4370 ../fish/guestfish-actions.pod:669
7848 #: ../fish/guestfish-actions.pod:2795 ../fish/guestfish-actions.pod:2911
7849 #: ../fish/guestfish-actions.pod:2921 ../fish/guestfish-actions.pod:2931
7850 msgid "The mode actually set is affected by the umask."
7855 #: ../src/guestfs-actions.pod:992
7856 msgid "guestfs_chown"
7861 #: ../src/guestfs-actions.pod:994
7865 " guestfs_chown (guestfs_h *g,\n"
7868 " const char *path);\n"
7874 #: ../src/guestfs-actions.pod:1000 ../fish/guestfish-actions.pod:675
7875 msgid "Change the file owner to C<owner> and group to C<group>."
7880 #: ../src/guestfs-actions.pod:1002 ../src/guestfs-actions.pod:3257
7881 #: ../fish/guestfish-actions.pod:677 ../fish/guestfish-actions.pod:2253
7883 "Only numeric uid and gid are supported. If you want to use names, you will "
7884 "need to locate and parse the password file yourself (Augeas support makes "
7885 "this relatively easy)."
7890 #: ../src/guestfs-actions.pod:1010
7891 msgid "guestfs_command"
7896 #: ../src/guestfs-actions.pod:1012
7900 " guestfs_command (guestfs_h *g,\n"
7901 " char *const *arguments);\n"
7907 #: ../src/guestfs-actions.pod:1016 ../fish/guestfish-actions.pod:685
7909 "This call runs a command from the guest filesystem. The filesystem must be "
7910 "mounted, and must contain a compatible operating system (ie. something "
7911 "Linux, with the same or compatible processor architecture)."
7916 #: ../src/guestfs-actions.pod:1021
7918 "The single parameter is an argv-style list of arguments. The first element "
7919 "is the name of the program to run. Subsequent elements are parameters. The "
7920 "list must be non-empty (ie. must contain a program name). Note that the "
7921 "command runs directly, and is I<not> invoked via the shell (see "
7927 #: ../src/guestfs-actions.pod:1028 ../fish/guestfish-actions.pod:697
7928 msgid "The return value is anything printed to I<stdout> by the command."
7933 #: ../src/guestfs-actions.pod:1031 ../fish/guestfish-actions.pod:700
7935 "If the command returns a non-zero exit status, then this function returns an "
7936 "error message. The error message string is the content of I<stderr> from "
7942 #: ../src/guestfs-actions.pod:1035 ../fish/guestfish-actions.pod:704
7944 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
7945 "bin>. If you require a program from another location, you should provide "
7946 "the full path in the first parameter."
7951 #: ../src/guestfs-actions.pod:1040 ../fish/guestfish-actions.pod:709
7953 "Shared libraries and data files required by the program must be available on "
7954 "filesystems which are mounted in the correct places. It is the caller's "
7955 "responsibility to ensure all filesystems that are needed are mounted at the "
7961 #: ../src/guestfs-actions.pod:1052 ../src/guestfs-actions.pod:1072
7962 #: ../src/guestfs-actions.pod:1535
7963 msgid "(Added in 0.9.1)"
7968 #: ../src/guestfs-actions.pod:1054
7969 msgid "guestfs_command_lines"
7974 #: ../src/guestfs-actions.pod:1056
7978 " guestfs_command_lines (guestfs_h *g,\n"
7979 " char *const *arguments);\n"
7985 #: ../src/guestfs-actions.pod:1060
7987 "This is the same as C<guestfs_command>, but splits the result into a list of "
7993 #: ../src/guestfs-actions.pod:1063
7994 msgid "See also: C<guestfs_sh_lines>"
7999 #: ../src/guestfs-actions.pod:1074
8000 msgid "guestfs_config"
8005 #: ../src/guestfs-actions.pod:1076
8009 " guestfs_config (guestfs_h *g,\n"
8010 " const char *qemuparam,\n"
8011 " const char *qemuvalue);\n"
8017 #: ../src/guestfs-actions.pod:1081 ../fish/guestfish-actions.pod:734
8019 "This can be used to add arbitrary qemu command line parameters of the form "
8020 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
8021 "setting some parameters which would interfere with parameters that we use."
8026 #: ../src/guestfs-actions.pod:1086 ../fish/guestfish-actions.pod:739
8027 msgid "The first character of C<param> string must be a C<-> (dash)."
8032 #: ../src/guestfs-actions.pod:1088 ../fish/guestfish-actions.pod:741
8033 msgid "C<value> can be NULL."
8038 #: ../src/guestfs-actions.pod:1094
8039 msgid "guestfs_copy_size"
8044 #: ../src/guestfs-actions.pod:1096
8048 " guestfs_copy_size (guestfs_h *g,\n"
8049 " const char *src,\n"
8050 " const char *dest,\n"
8057 #: ../src/guestfs-actions.pod:1102 ../fish/guestfish-actions.pod:747
8059 "This command copies exactly C<size> bytes from one source device or file "
8060 "C<src> to another destination device or file C<dest>."
8065 #: ../src/guestfs-actions.pod:1105 ../fish/guestfish-actions.pod:750
8067 "Note this will fail if the source is too short or if the destination is not "
8073 #: ../src/guestfs-actions.pod:1110 ../src/guestfs-actions.pod:1233
8074 #: ../src/guestfs-actions.pod:1264 ../src/guestfs-actions.pod:1684
8075 #: ../src/guestfs-actions.pod:1706 ../src/guestfs-actions.pod:6520
8076 #: ../src/guestfs-actions.pod:6554 ../src/guestfs-actions.pod:7033
8077 #: ../src/guestfs-actions.pod:7052
8079 "This long-running command can generate progress notification messages so "
8080 "that the caller can display a progress bar or indicator. To receive these "
8081 "messages, the caller must register a progress callback. See L<guestfs(3)/"
8082 "guestfs_set_progress_callback>."
8087 #: ../src/guestfs-actions.pod:1115 ../src/guestfs-actions.pod:3925
8088 #: ../src/guestfs-actions.pod:5129 ../src/guestfs-actions.pod:6761
8089 #: ../src/guestfs-actions.pod:6781 ../src/guestfs-actions.pod:6867
8090 msgid "(Added in 1.0.87)"
8095 #: ../src/guestfs-actions.pod:1117
8101 #: ../src/guestfs-actions.pod:1119
8105 " guestfs_cp (guestfs_h *g,\n"
8106 " const char *src,\n"
8107 " const char *dest);\n"
8113 #: ../src/guestfs-actions.pod:1124 ../fish/guestfish-actions.pod:757
8115 "This copies a file from C<src> to C<dest> where C<dest> is either a "
8116 "destination filename or destination directory."
8121 #: ../src/guestfs-actions.pod:1129 ../src/guestfs-actions.pod:1143
8122 #: ../src/guestfs-actions.pod:1215 ../src/guestfs-actions.pod:1289
8123 #: ../src/guestfs-actions.pod:1398 ../src/guestfs-actions.pod:4596
8124 #: ../src/guestfs-actions.pod:4973
8125 msgid "(Added in 1.0.18)"
8130 #: ../src/guestfs-actions.pod:1131
8131 msgid "guestfs_cp_a"
8136 #: ../src/guestfs-actions.pod:1133
8140 " guestfs_cp_a (guestfs_h *g,\n"
8141 " const char *src,\n"
8142 " const char *dest);\n"
8148 #: ../src/guestfs-actions.pod:1138 ../fish/guestfish-actions.pod:764
8150 "This copies a file or directory from C<src> to C<dest> recursively using the "
8156 #: ../src/guestfs-actions.pod:1145
8162 #: ../src/guestfs-actions.pod:1147
8166 " guestfs_dd (guestfs_h *g,\n"
8167 " const char *src,\n"
8168 " const char *dest);\n"
8174 #: ../src/guestfs-actions.pod:1152 ../fish/guestfish-actions.pod:771
8176 "This command copies from one source device or file C<src> to another "
8177 "destination device or file C<dest>. Normally you would use this to copy to "
8178 "or from a device or partition, for example to duplicate a filesystem."
8183 #: ../src/guestfs-actions.pod:1157
8185 "If the destination is a device, it must be as large or larger than the "
8186 "source file or device, otherwise the copy will fail. This command cannot do "
8187 "partial copies (see C<guestfs_copy_size>)."
8192 #: ../src/guestfs-actions.pod:1165
8198 #: ../src/guestfs-actions.pod:1167
8202 " guestfs_df (guestfs_h *g);\n"
8208 #: ../src/guestfs-actions.pod:1170 ../fish/guestfish-actions.pod:784
8209 msgid "This command runs the C<df> command to report disk space used."
8214 #: ../src/guestfs-actions.pod:1172 ../src/guestfs-actions.pod:1189
8216 "This command is mostly useful for interactive sessions. It is I<not> "
8217 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
8223 #: ../src/guestfs-actions.pod:1179 ../src/guestfs-actions.pod:1196
8224 #: ../src/guestfs-actions.pod:1309 ../src/guestfs-actions.pod:2263
8225 #: ../src/guestfs-actions.pod:2287 ../src/guestfs-actions.pod:2355
8226 #: ../src/guestfs-actions.pod:4035 ../src/guestfs-actions.pod:4496
8227 #: ../src/guestfs-actions.pod:6258 ../src/guestfs-actions.pod:6282
8228 #: ../src/guestfs-actions.pod:6900 ../src/guestfs-actions.pod:6913
8229 #: ../src/guestfs-actions.pod:6926
8230 msgid "(Added in 1.0.54)"
8235 #: ../src/guestfs-actions.pod:1181
8236 msgid "guestfs_df_h"
8241 #: ../src/guestfs-actions.pod:1183
8245 " guestfs_df_h (guestfs_h *g);\n"
8251 #: ../src/guestfs-actions.pod:1186 ../fish/guestfish-actions.pod:794
8253 "This command runs the C<df -h> command to report disk space used in human-"
8259 #: ../src/guestfs-actions.pod:1198
8260 msgid "guestfs_dmesg"
8265 #: ../src/guestfs-actions.pod:1200
8269 " guestfs_dmesg (guestfs_h *g);\n"
8275 #: ../src/guestfs-actions.pod:1203 ../fish/guestfish-actions.pod:805
8277 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
8278 "This is sometimes useful for extended debugging of problems."
8283 #: ../src/guestfs-actions.pod:1207
8285 "Another way to get the same information is to enable verbose messages with "
8286 "C<guestfs_set_verbose> or by setting the environment variable "
8287 "C<LIBGUESTFS_DEBUG=1> before running the program."
8292 #: ../src/guestfs-actions.pod:1217
8293 msgid "guestfs_download"
8298 #: ../src/guestfs-actions.pod:1219
8302 " guestfs_download (guestfs_h *g,\n"
8303 " const char *remotefilename,\n"
8304 " const char *filename);\n"
8310 #: ../src/guestfs-actions.pod:1224 ../src/guestfs-actions.pod:1249
8311 #: ../fish/guestfish-actions.pod:818 ../fish/guestfish-actions.pod:831
8313 "Download file C<remotefilename> and save it as C<filename> on the local "
8319 #: ../src/guestfs-actions.pod:1227 ../src/guestfs-actions.pod:6514
8320 #: ../fish/guestfish-actions.pod:821 ../fish/guestfish-actions.pod:4346
8321 msgid "C<filename> can also be a named pipe."
8326 #: ../src/guestfs-actions.pod:1229
8327 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
8332 #: ../src/guestfs-actions.pod:1240
8333 msgid "guestfs_download_offset"
8338 #: ../src/guestfs-actions.pod:1242
8342 " guestfs_download_offset (guestfs_h *g,\n"
8343 " const char *remotefilename,\n"
8344 " const char *filename,\n"
8345 " int64_t offset,\n"
8352 #: ../src/guestfs-actions.pod:1252 ../fish/guestfish-actions.pod:834
8354 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
8355 "region must be within the file or device)."
8360 #: ../src/guestfs-actions.pod:1255
8362 "Note that there is no limit on the amount of data that can be downloaded "
8363 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
8364 "full amount unless an error occurs."
8369 #: ../src/guestfs-actions.pod:1260
8370 msgid "See also C<guestfs_download>, C<guestfs_pread>."
8375 #: ../src/guestfs-actions.pod:1269 ../src/guestfs-actions.pod:6559
8376 msgid "(Added in 1.5.17)"
8381 #: ../src/guestfs-actions.pod:1271
8382 msgid "guestfs_drop_caches"
8387 #: ../src/guestfs-actions.pod:1273
8391 " guestfs_drop_caches (guestfs_h *g,\n"
8392 " int whattodrop);\n"
8398 #: ../src/guestfs-actions.pod:1277 ../fish/guestfish-actions.pod:850
8400 "This instructs the guest kernel to drop its page cache, and/or dentries and "
8401 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
8402 "to drop, see L<http://linux-mm.org/Drop_Caches>"
8407 #: ../src/guestfs-actions.pod:1282 ../fish/guestfish-actions.pod:855
8408 msgid "Setting C<whattodrop> to 3 should drop everything."
8413 #: ../src/guestfs-actions.pod:1284 ../fish/guestfish-actions.pod:857
8415 "This automatically calls L<sync(2)> before the operation, so that the "
8416 "maximum guest memory is freed."
8421 #: ../src/guestfs-actions.pod:1291
8427 #: ../src/guestfs-actions.pod:1293
8431 " guestfs_du (guestfs_h *g,\n"
8432 " const char *path);\n"
8438 #: ../src/guestfs-actions.pod:1297 ../fish/guestfish-actions.pod:864
8440 "This command runs the C<du -s> command to estimate file space usage for "
8446 #: ../src/guestfs-actions.pod:1300 ../fish/guestfish-actions.pod:867
8448 "C<path> can be a file or a directory. If C<path> is a directory then the "
8449 "estimate includes the contents of the directory and all subdirectories "
8455 #: ../src/guestfs-actions.pod:1304 ../fish/guestfish-actions.pod:871
8457 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
8462 #: ../src/guestfs-actions.pod:1311
8463 msgid "guestfs_e2fsck_f"
8468 #: ../src/guestfs-actions.pod:1313
8472 " guestfs_e2fsck_f (guestfs_h *g,\n"
8473 " const char *device);\n"
8479 #: ../src/guestfs-actions.pod:1317 ../fish/guestfish-actions.pod:878
8481 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
8482 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
8488 #: ../src/guestfs-actions.pod:1321
8490 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
8491 "Normally you should use C<guestfs_fsck>."
8496 #: ../src/guestfs-actions.pod:1326
8497 msgid "(Added in 1.0.29)"
8502 #: ../src/guestfs-actions.pod:1328
8503 msgid "guestfs_echo_daemon"
8508 #: ../src/guestfs-actions.pod:1330
8512 " guestfs_echo_daemon (guestfs_h *g,\n"
8513 " char *const *words);\n"
8519 #: ../src/guestfs-actions.pod:1334 ../fish/guestfish-actions.pod:889
8521 "This command concatenates the list of C<words> passed with single spaces "
8522 "between them and returns the resulting string."
8527 #: ../src/guestfs-actions.pod:1337 ../fish/guestfish-actions.pod:892
8528 msgid "You can use this command to test the connection through to the daemon."
8533 #: ../src/guestfs-actions.pod:1339
8534 msgid "See also C<guestfs_ping_daemon>."
8539 #: ../src/guestfs-actions.pod:1344 ../src/guestfs-actions.pod:2071
8540 #: ../src/guestfs-actions.pod:5762
8541 msgid "(Added in 1.0.69)"
8546 #: ../src/guestfs-actions.pod:1346
8547 msgid "guestfs_egrep"
8552 #: ../src/guestfs-actions.pod:1348
8556 " guestfs_egrep (guestfs_h *g,\n"
8557 " const char *regex,\n"
8558 " const char *path);\n"
8564 #: ../src/guestfs-actions.pod:1353 ../fish/guestfish-actions.pod:900
8566 "This calls the external C<egrep> program and returns the matching lines."
8571 #: ../src/guestfs-actions.pod:1363 ../src/guestfs-actions.pod:1382
8572 #: ../src/guestfs-actions.pod:1439 ../src/guestfs-actions.pod:1485
8573 #: ../src/guestfs-actions.pod:1504 ../src/guestfs-actions.pod:2201
8574 #: ../src/guestfs-actions.pod:2220 ../src/guestfs-actions.pod:2376
8575 #: ../src/guestfs-actions.pod:2389 ../src/guestfs-actions.pod:2404
8576 #: ../src/guestfs-actions.pod:2450 ../src/guestfs-actions.pod:2472
8577 #: ../src/guestfs-actions.pod:2485 ../src/guestfs-actions.pod:3418
8578 #: ../src/guestfs-actions.pod:3432 ../src/guestfs-actions.pod:3445
8579 #: ../src/guestfs-actions.pod:3459 ../src/guestfs-actions.pod:4431
8580 #: ../src/guestfs-actions.pod:5307 ../src/guestfs-actions.pod:5356
8581 #: ../src/guestfs-actions.pod:6126 ../src/guestfs-actions.pod:6138
8582 #: ../src/guestfs-actions.pod:6151 ../src/guestfs-actions.pod:6164
8583 #: ../src/guestfs-actions.pod:6186 ../src/guestfs-actions.pod:6199
8584 #: ../src/guestfs-actions.pod:6212 ../src/guestfs-actions.pod:6225
8585 #: ../src/guestfs-actions.pod:6996 ../src/guestfs-actions.pod:7015
8586 #: ../src/guestfs-actions.pod:7100 ../src/guestfs-actions.pod:7119
8587 #: ../src/guestfs-actions.pod:7165 ../src/guestfs-actions.pod:7184
8588 msgid "(Added in 1.0.66)"
8593 #: ../src/guestfs-actions.pod:1365
8594 msgid "guestfs_egrepi"
8599 #: ../src/guestfs-actions.pod:1367
8603 " guestfs_egrepi (guestfs_h *g,\n"
8604 " const char *regex,\n"
8605 " const char *path);\n"
8611 #: ../src/guestfs-actions.pod:1372 ../fish/guestfish-actions.pod:910
8613 "This calls the external C<egrep -i> program and returns the matching lines."
8618 #: ../src/guestfs-actions.pod:1384
8619 msgid "guestfs_equal"
8624 #: ../src/guestfs-actions.pod:1386
8628 " guestfs_equal (guestfs_h *g,\n"
8629 " const char *file1,\n"
8630 " const char *file2);\n"
8636 #: ../src/guestfs-actions.pod:1391 ../fish/guestfish-actions.pod:920
8638 "This compares the two files C<file1> and C<file2> and returns true if their "
8639 "content is exactly equal, or false otherwise."
8644 #: ../src/guestfs-actions.pod:1394 ../fish/guestfish-actions.pod:923
8645 msgid "The external L<cmp(1)> program is used for the comparison."
8650 #: ../src/guestfs-actions.pod:1400
8651 msgid "guestfs_exists"
8656 #: ../src/guestfs-actions.pod:1402
8660 " guestfs_exists (guestfs_h *g,\n"
8661 " const char *path);\n"
8667 #: ../src/guestfs-actions.pod:1406 ../fish/guestfish-actions.pod:929
8669 "This returns C<true> if and only if there is a file, directory (or anything) "
8670 "with the given C<path> name."
8675 #: ../src/guestfs-actions.pod:1409
8676 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
8681 #: ../src/guestfs-actions.pod:1415
8682 msgid "guestfs_fallocate"
8687 #: ../src/guestfs-actions.pod:1417
8691 " guestfs_fallocate (guestfs_h *g,\n"
8692 " const char *path,\n"
8699 #: ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:1448
8700 #: ../fish/guestfish-actions.pod:938 ../fish/guestfish-actions.pod:957
8702 "This command preallocates a file (containing zero bytes) named C<path> of "
8703 "size C<len> bytes. If the file exists already, it is overwritten."
8708 #: ../src/guestfs-actions.pod:1426 ../fish/guestfish-actions.pod:942
8710 "Do not confuse this with the guestfish-specific C<alloc> command which "
8711 "allocates a file in the host and attaches it as a device."
8716 #: ../src/guestfs-actions.pod:1432 ../fish/guestfish-actions.pod:946
8718 "This function is deprecated. In new code, use the C<fallocate64> call "
8724 #: ../src/guestfs-actions.pod:1441
8725 msgid "guestfs_fallocate64"
8730 #: ../src/guestfs-actions.pod:1443
8734 " guestfs_fallocate64 (guestfs_h *g,\n"
8735 " const char *path,\n"
8742 #: ../src/guestfs-actions.pod:1452
8744 "Note that this call allocates disk blocks for the file. To create a sparse "
8745 "file use C<guestfs_truncate_size> instead."
8750 #: ../src/guestfs-actions.pod:1455
8752 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
8753 "oversight it only allowed 30 bit lengths to be specified, effectively "
8754 "limiting the maximum size of files created through that call to 1GB."
8759 #: ../src/guestfs-actions.pod:1460 ../fish/guestfish-actions.pod:969
8761 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
8762 "commands which create a file in the host and attach it as a device."
8767 #: ../src/guestfs-actions.pod:1466
8768 msgid "(Added in 1.3.17)"
8773 #: ../src/guestfs-actions.pod:1468
8774 msgid "guestfs_fgrep"
8779 #: ../src/guestfs-actions.pod:1470
8783 " guestfs_fgrep (guestfs_h *g,\n"
8784 " const char *pattern,\n"
8785 " const char *path);\n"
8791 #: ../src/guestfs-actions.pod:1475 ../fish/guestfish-actions.pod:977
8793 "This calls the external C<fgrep> program and returns the matching lines."
8798 #: ../src/guestfs-actions.pod:1487
8799 msgid "guestfs_fgrepi"
8804 #: ../src/guestfs-actions.pod:1489
8808 " guestfs_fgrepi (guestfs_h *g,\n"
8809 " const char *pattern,\n"
8810 " const char *path);\n"
8816 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:987
8818 "This calls the external C<fgrep -i> program and returns the matching lines."
8823 #: ../src/guestfs-actions.pod:1506
8824 msgid "guestfs_file"
8829 #: ../src/guestfs-actions.pod:1508
8833 " guestfs_file (guestfs_h *g,\n"
8834 " const char *path);\n"
8840 #: ../src/guestfs-actions.pod:1512 ../fish/guestfish-actions.pod:997
8842 "This call uses the standard L<file(1)> command to determine the type or "
8843 "contents of the file."
8848 #: ../src/guestfs-actions.pod:1515 ../fish/guestfish-actions.pod:1000
8850 "This call will also transparently look inside various types of compressed "
8856 #: ../src/guestfs-actions.pod:1518 ../fish/guestfish-actions.pod:1003
8858 "The exact command which runs is C<file -zb path>. Note in particular that "
8859 "the filename is not prepended to the output (the C<-b> option)."
8864 #: ../src/guestfs-actions.pod:1522
8866 "This command can also be used on C</dev/> devices (and partitions, LV "
8867 "names). You can for example use this to determine if a device contains a "
8868 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
8873 #: ../src/guestfs-actions.pod:1527 ../fish/guestfish-actions.pod:1012
8875 "If the C<path> does not begin with C</dev/> then this command only works for "
8876 "the content of regular files. For other file types (directory, symbolic "
8877 "link etc) it will just return the string C<directory> etc."
8882 #: ../src/guestfs-actions.pod:1537
8883 msgid "guestfs_file_architecture"
8888 #: ../src/guestfs-actions.pod:1539
8892 " guestfs_file_architecture (guestfs_h *g,\n"
8893 " const char *filename);\n"
8899 #: ../src/guestfs-actions.pod:1543 ../fish/guestfish-actions.pod:1021
8901 "This detects the architecture of the binary C<filename>, and returns it if "
8907 #: ../src/guestfs-actions.pod:1546 ../fish/guestfish-actions.pod:1024
8908 msgid "Currently defined architectures are:"
8913 #: ../src/guestfs-actions.pod:1550 ../fish/guestfish-actions.pod:1028
8919 #: ../src/guestfs-actions.pod:1552 ../fish/guestfish-actions.pod:1030
8921 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
8922 "irrespective of the precise processor requirements of the binary."
8927 #: ../src/guestfs-actions.pod:1555 ../fish/guestfish-actions.pod:1033
8933 #: ../src/guestfs-actions.pod:1557 ../fish/guestfish-actions.pod:1035
8934 msgid "64 bit x86-64."
8939 #: ../src/guestfs-actions.pod:1559 ../fish/guestfish-actions.pod:1037
8945 #: ../src/guestfs-actions.pod:1561 ../fish/guestfish-actions.pod:1039
8946 msgid "32 bit SPARC."
8951 #: ../src/guestfs-actions.pod:1563 ../fish/guestfish-actions.pod:1041
8957 #: ../src/guestfs-actions.pod:1565 ../fish/guestfish-actions.pod:1043
8958 msgid "64 bit SPARC V9 and above."
8963 #: ../src/guestfs-actions.pod:1567 ../fish/guestfish-actions.pod:1045
8969 #: ../src/guestfs-actions.pod:1569 ../fish/guestfish-actions.pod:1047
8970 msgid "Intel Itanium."
8975 #: ../src/guestfs-actions.pod:1571 ../fish/guestfish-actions.pod:1049
8981 #: ../src/guestfs-actions.pod:1573 ../fish/guestfish-actions.pod:1051
8982 msgid "32 bit Power PC."
8987 #: ../src/guestfs-actions.pod:1575 ../fish/guestfish-actions.pod:1053
8993 #: ../src/guestfs-actions.pod:1577 ../fish/guestfish-actions.pod:1055
8994 msgid "64 bit Power PC."
8999 #: ../src/guestfs-actions.pod:1581 ../fish/guestfish-actions.pod:1059
9000 msgid "Libguestfs may return other architecture strings in future."
9005 #: ../src/guestfs-actions.pod:1583 ../fish/guestfish-actions.pod:1061
9006 msgid "The function works on at least the following types of files:"
9011 #: ../src/guestfs-actions.pod:1589 ../fish/guestfish-actions.pod:1067
9012 msgid "many types of Un*x and Linux binary"
9017 #: ../src/guestfs-actions.pod:1593 ../fish/guestfish-actions.pod:1071
9018 msgid "many types of Un*x and Linux shared library"
9023 #: ../src/guestfs-actions.pod:1597 ../fish/guestfish-actions.pod:1075
9024 msgid "Windows Win32 and Win64 binaries"
9029 #: ../src/guestfs-actions.pod:1601 ../fish/guestfish-actions.pod:1079
9030 msgid "Windows Win32 and Win64 DLLs"
9035 #: ../src/guestfs-actions.pod:1603 ../fish/guestfish-actions.pod:1081
9036 msgid "Win32 binaries and DLLs return C<i386>."
9041 #: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1083
9042 msgid "Win64 binaries and DLLs return C<x86_64>."
9047 #: ../src/guestfs-actions.pod:1609 ../fish/guestfish-actions.pod:1087
9048 msgid "Linux kernel modules"
9053 #: ../src/guestfs-actions.pod:1613 ../fish/guestfish-actions.pod:1091
9054 msgid "Linux new-style initrd images"
9059 #: ../src/guestfs-actions.pod:1617 ../fish/guestfish-actions.pod:1095
9060 msgid "some non-x86 Linux vmlinuz kernels"
9065 #: ../src/guestfs-actions.pod:1621 ../fish/guestfish-actions.pod:1099
9066 msgid "What it can't do currently:"
9071 #: ../src/guestfs-actions.pod:1627 ../fish/guestfish-actions.pod:1105
9072 msgid "static libraries (libfoo.a)"
9077 #: ../src/guestfs-actions.pod:1631 ../fish/guestfish-actions.pod:1109
9078 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
9083 #: ../src/guestfs-actions.pod:1635 ../fish/guestfish-actions.pod:1113
9084 msgid "x86 Linux vmlinuz kernels"
9089 #: ../src/guestfs-actions.pod:1637 ../fish/guestfish-actions.pod:1115
9091 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
9092 "compressed code, and are horribly hard to unpack. If you want to find the "
9093 "architecture of a kernel, use the architecture of the associated initrd or "
9094 "kernel module(s) instead."
9099 #: ../src/guestfs-actions.pod:1647 ../src/guestfs-actions.pod:1810
9100 #: ../src/guestfs-actions.pod:1827 ../src/guestfs-actions.pod:2508
9101 #: ../src/guestfs-actions.pod:2589 ../src/guestfs-actions.pod:2615
9102 #: ../src/guestfs-actions.pod:2664 ../src/guestfs-actions.pod:2685
9103 #: ../src/guestfs-actions.pod:2722 ../src/guestfs-actions.pod:2806
9104 #: ../src/guestfs-actions.pod:2868 ../src/guestfs-actions.pod:3041
9105 #: ../src/guestfs-actions.pod:3173
9106 msgid "(Added in 1.5.3)"
9111 #: ../src/guestfs-actions.pod:1649
9112 msgid "guestfs_filesize"
9117 #: ../src/guestfs-actions.pod:1651
9121 " guestfs_filesize (guestfs_h *g,\n"
9122 " const char *file);\n"
9128 #: ../src/guestfs-actions.pod:1655 ../fish/guestfish-actions.pod:1126
9129 msgid "This command returns the size of C<file> in bytes."
9134 #: ../src/guestfs-actions.pod:1657
9136 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
9137 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
9138 "devices, use C<guestfs_blockdev_getsize64>."
9143 #: ../src/guestfs-actions.pod:1663
9144 msgid "(Added in 1.0.82)"
9149 #: ../src/guestfs-actions.pod:1665
9150 msgid "guestfs_fill"
9155 #: ../src/guestfs-actions.pod:1667
9159 " guestfs_fill (guestfs_h *g,\n"
9162 " const char *path);\n"
9168 #: ../src/guestfs-actions.pod:1673 ../fish/guestfish-actions.pod:1136
9170 "This command creates a new file called C<path>. The initial content of the "
9171 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
9177 #: ../src/guestfs-actions.pod:1677
9179 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
9180 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
9181 "bytes use C<guestfs_fill_pattern>."
9186 #: ../src/guestfs-actions.pod:1689
9187 msgid "(Added in 1.0.79)"
9192 #: ../src/guestfs-actions.pod:1691
9193 msgid "guestfs_fill_pattern"
9198 #: ../src/guestfs-actions.pod:1693
9202 " guestfs_fill_pattern (guestfs_h *g,\n"
9203 " const char *pattern,\n"
9205 " const char *path);\n"
9211 #: ../src/guestfs-actions.pod:1699
9213 "This function is like C<guestfs_fill> except that it creates a new file of "
9214 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
9215 "pattern is truncated if necessary to ensure the length of the file is "
9216 "exactly C<len> bytes."
9221 #: ../src/guestfs-actions.pod:1711
9222 msgid "(Added in 1.3.12)"
9227 #: ../src/guestfs-actions.pod:1713
9228 msgid "guestfs_find"
9233 #: ../src/guestfs-actions.pod:1715
9237 " guestfs_find (guestfs_h *g,\n"
9238 " const char *directory);\n"
9244 #: ../src/guestfs-actions.pod:1719 ../fish/guestfish-actions.pod:1158
9246 "This command lists out all files and directories, recursively, starting at "
9247 "C<directory>. It is essentially equivalent to running the shell command "
9248 "C<find directory -print> but some post-processing happens on the output, "
9254 #: ../src/guestfs-actions.pod:1724 ../fish/guestfish-actions.pod:1163
9256 "This returns a list of strings I<without any prefix>. Thus if the directory "
9262 #: ../src/guestfs-actions.pod:1727 ../fish/guestfish-actions.pod:1166
9273 #: ../src/guestfs-actions.pod:1731
9275 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
9280 #: ../src/guestfs-actions.pod:1734 ../fish/guestfish-actions.pod:1173
9292 #: ../src/guestfs-actions.pod:1739 ../fish/guestfish-actions.pod:1178
9293 msgid "If C<directory> is not a directory, then this command returns an error."
9298 #: ../src/guestfs-actions.pod:1742 ../fish/guestfish-actions.pod:1181
9299 msgid "The returned list is sorted."
9304 #: ../src/guestfs-actions.pod:1744
9305 msgid "See also C<guestfs_find0>."
9310 #: ../src/guestfs-actions.pod:1753 ../src/guestfs-actions.pod:3862
9311 #: ../src/guestfs-actions.pod:5391
9312 msgid "(Added in 1.0.27)"
9317 #: ../src/guestfs-actions.pod:1755
9318 msgid "guestfs_find0"
9323 #: ../src/guestfs-actions.pod:1757
9327 " guestfs_find0 (guestfs_h *g,\n"
9328 " const char *directory,\n"
9329 " const char *files);\n"
9335 #: ../src/guestfs-actions.pod:1762 ../fish/guestfish-actions.pod:1192
9337 "This command lists out all files and directories, recursively, starting at "
9338 "C<directory>, placing the resulting list in the external file called "
9344 #: ../src/guestfs-actions.pod:1766
9346 "This command works the same way as C<guestfs_find> with the following "
9352 #: ../src/guestfs-actions.pod:1773 ../fish/guestfish-actions.pod:1203
9353 msgid "The resulting list is written to an external file."
9358 #: ../src/guestfs-actions.pod:1777 ../fish/guestfish-actions.pod:1207
9360 "Items (filenames) in the result are separated by C<\\0> characters. See "
9361 "L<find(1)> option I<-print0>."
9366 #: ../src/guestfs-actions.pod:1782 ../fish/guestfish-actions.pod:1212
9367 msgid "This command is not limited in the number of names that it can return."
9372 #: ../src/guestfs-actions.pod:1787 ../fish/guestfish-actions.pod:1217
9373 msgid "The result list is not sorted."
9378 #: ../src/guestfs-actions.pod:1793
9379 msgid "(Added in 1.0.74)"
9384 #: ../src/guestfs-actions.pod:1795
9385 msgid "guestfs_findfs_label"
9390 #: ../src/guestfs-actions.pod:1797
9394 " guestfs_findfs_label (guestfs_h *g,\n"
9395 " const char *label);\n"
9401 #: ../src/guestfs-actions.pod:1801 ../fish/guestfish-actions.pod:1227
9403 "This command searches the filesystems and returns the one which has the "
9404 "given label. An error is returned if no such filesystem can be found."
9409 #: ../src/guestfs-actions.pod:1805
9410 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
9415 #: ../src/guestfs-actions.pod:1812
9416 msgid "guestfs_findfs_uuid"
9421 #: ../src/guestfs-actions.pod:1814
9425 " guestfs_findfs_uuid (guestfs_h *g,\n"
9426 " const char *uuid);\n"
9432 #: ../src/guestfs-actions.pod:1818 ../fish/guestfish-actions.pod:1237
9434 "This command searches the filesystems and returns the one which has the "
9435 "given UUID. An error is returned if no such filesystem can be found."
9440 #: ../src/guestfs-actions.pod:1822
9441 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
9446 #: ../src/guestfs-actions.pod:1829
9447 msgid "guestfs_fsck"
9452 #: ../src/guestfs-actions.pod:1831
9456 " guestfs_fsck (guestfs_h *g,\n"
9457 " const char *fstype,\n"
9458 " const char *device);\n"
9464 #: ../src/guestfs-actions.pod:1836 ../fish/guestfish-actions.pod:1247
9466 "This runs the filesystem checker (fsck) on C<device> which should have "
9467 "filesystem type C<fstype>."
9472 #: ../src/guestfs-actions.pod:1839 ../fish/guestfish-actions.pod:1250
9474 "The returned integer is the status. See L<fsck(8)> for the list of status "
9475 "codes from C<fsck>."
9480 #: ../src/guestfs-actions.pod:1848 ../fish/guestfish-actions.pod:1259
9481 msgid "Multiple status codes can be summed together."
9486 #: ../src/guestfs-actions.pod:1852 ../fish/guestfish-actions.pod:1263
9488 "A non-zero return code can mean \"success\", for example if errors have been "
9489 "corrected on the filesystem."
9494 #: ../src/guestfs-actions.pod:1857 ../fish/guestfish-actions.pod:1268
9495 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
9500 #: ../src/guestfs-actions.pod:1862 ../fish/guestfish-actions.pod:1273
9502 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
9507 #: ../src/guestfs-actions.pod:1866 ../src/guestfs-actions.pod:7038
9508 msgid "(Added in 1.0.16)"
9513 #: ../src/guestfs-actions.pod:1868
9514 msgid "guestfs_get_append"
9519 #: ../src/guestfs-actions.pod:1870
9523 " guestfs_get_append (guestfs_h *g);\n"
9529 #: ../src/guestfs-actions.pod:1873 ../fish/guestfish-actions.pod:1279
9531 "Return the additional kernel options which are added to the guest kernel "
9537 #: ../src/guestfs-actions.pod:1876 ../fish/guestfish-actions.pod:1282
9538 msgid "If C<NULL> then no options are added."
9543 #: ../src/guestfs-actions.pod:1878
9545 "This function returns a string which may be NULL. There is no way to return "
9546 "an error from this function. The string is owned by the guest handle and "
9547 "must I<not> be freed."
9552 #: ../src/guestfs-actions.pod:1882 ../src/guestfs-actions.pod:5069
9553 #: ../src/guestfs-actions.pod:5532 ../src/guestfs-actions.pod:5900
9554 #: ../src/guestfs-actions.pod:5919 ../src/guestfs-actions.pod:5935
9555 #: ../src/guestfs-actions.pod:5952 ../src/guestfs-actions.pod:6709
9556 #: ../src/guestfs-actions.pod:6727 ../src/guestfs-actions.pod:7081
9557 msgid "(Added in 1.0.26)"
9562 #: ../src/guestfs-actions.pod:1884
9563 msgid "guestfs_get_autosync"
9568 #: ../src/guestfs-actions.pod:1886
9572 " guestfs_get_autosync (guestfs_h *g);\n"
9578 #: ../src/guestfs-actions.pod:1889 ../fish/guestfish-actions.pod:1288
9579 msgid "Get the autosync flag."
9584 #: ../src/guestfs-actions.pod:1895
9585 msgid "guestfs_get_direct"
9590 #: ../src/guestfs-actions.pod:1897
9594 " guestfs_get_direct (guestfs_h *g);\n"
9600 #: ../src/guestfs-actions.pod:1900 ../fish/guestfish-actions.pod:1294
9601 msgid "Return the direct appliance mode flag."
9606 #: ../src/guestfs-actions.pod:1904 ../src/guestfs-actions.pod:5573
9607 msgid "(Added in 1.0.72)"
9612 #: ../src/guestfs-actions.pod:1906
9613 msgid "guestfs_get_e2label"
9618 #: ../src/guestfs-actions.pod:1908
9622 " guestfs_get_e2label (guestfs_h *g,\n"
9623 " const char *device);\n"
9629 #: ../src/guestfs-actions.pod:1912 ../fish/guestfish-actions.pod:1300
9631 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
9636 #: ../src/guestfs-actions.pod:1918 ../fish/guestfish-actions.pod:1303
9638 "This function is deprecated. In new code, use the C<vfs_label> call instead."
9643 #: ../src/guestfs-actions.pod:1925 ../src/guestfs-actions.pod:1946
9644 #: ../src/guestfs-actions.pod:5591 ../src/guestfs-actions.pod:5610
9645 msgid "(Added in 1.0.15)"
9650 #: ../src/guestfs-actions.pod:1927
9651 msgid "guestfs_get_e2uuid"
9656 #: ../src/guestfs-actions.pod:1929
9660 " guestfs_get_e2uuid (guestfs_h *g,\n"
9661 " const char *device);\n"
9667 #: ../src/guestfs-actions.pod:1933 ../fish/guestfish-actions.pod:1314
9669 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
9674 #: ../src/guestfs-actions.pod:1939 ../fish/guestfish-actions.pod:1317
9676 "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
9681 #: ../src/guestfs-actions.pod:1948
9682 msgid "guestfs_get_memsize"
9687 #: ../src/guestfs-actions.pod:1950
9691 " guestfs_get_memsize (guestfs_h *g);\n"
9697 #: ../src/guestfs-actions.pod:1953 ../fish/guestfish-actions.pod:1328
9699 "This gets the memory size in megabytes allocated to the qemu subprocess."
9704 #: ../src/guestfs-actions.pod:1956
9706 "If C<guestfs_set_memsize> was not called on this handle, and if "
9707 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
9708 "value for memsize."
9713 #: ../src/guestfs-actions.pod:1960 ../src/guestfs-actions.pod:2041
9714 #: ../src/guestfs-actions.pod:5626 ../src/guestfs-actions.pod:5733
9715 #: ../fish/guestfish-actions.pod:1335 ../fish/guestfish-actions.pod:1386
9716 #: ../fish/guestfish-actions.pod:3753 ../fish/guestfish-actions.pod:3840
9718 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
9723 #: ../src/guestfs-actions.pod:1965 ../src/guestfs-actions.pod:4153
9724 #: ../src/guestfs-actions.pod:4336 ../src/guestfs-actions.pod:4355
9725 #: ../src/guestfs-actions.pod:4374 ../src/guestfs-actions.pod:4386
9726 #: ../src/guestfs-actions.pod:4403 ../src/guestfs-actions.pod:4416
9727 #: ../src/guestfs-actions.pod:5294 ../src/guestfs-actions.pod:5631
9728 #: ../src/guestfs-actions.pod:5874 ../src/guestfs-actions.pod:6475
9729 msgid "(Added in 1.0.55)"
9734 #: ../src/guestfs-actions.pod:1967
9735 msgid "guestfs_get_network"
9740 #: ../src/guestfs-actions.pod:1969
9744 " guestfs_get_network (guestfs_h *g);\n"
9750 #: ../src/guestfs-actions.pod:1972 ../fish/guestfish-actions.pod:1342
9751 msgid "This returns the enable network flag."
9756 #: ../src/guestfs-actions.pod:1976 ../src/guestfs-actions.pod:5650
9757 msgid "(Added in 1.5.4)"
9762 #: ../src/guestfs-actions.pod:1978
9763 msgid "guestfs_get_path"
9768 #: ../src/guestfs-actions.pod:1980
9772 " guestfs_get_path (guestfs_h *g);\n"
9778 #: ../src/guestfs-actions.pod:1983 ../fish/guestfish-actions.pod:1348
9779 msgid "Return the current search path."
9784 #: ../src/guestfs-actions.pod:1985 ../fish/guestfish-actions.pod:1350
9786 "This is always non-NULL. If it wasn't set already, then this will return "
9792 #: ../src/guestfs-actions.pod:1988 ../src/guestfs-actions.pod:2017
9794 "This function returns a string, or NULL on error. The string is owned by "
9795 "the guest handle and must I<not> be freed."
9800 #: ../src/guestfs-actions.pod:1993
9801 msgid "guestfs_get_pid"
9806 #: ../src/guestfs-actions.pod:1995
9810 " guestfs_get_pid (guestfs_h *g);\n"
9816 #: ../src/guestfs-actions.pod:1998 ../fish/guestfish-actions.pod:1359
9818 "Return the process ID of the qemu subprocess. If there is no qemu "
9819 "subprocess, then this will return an error."
9824 #: ../src/guestfs-actions.pod:2001 ../fish/guestfish-actions.pod:1362
9825 msgid "This is an internal call used for debugging and testing."
9830 #: ../src/guestfs-actions.pod:2005
9831 msgid "(Added in 1.0.56)"
9836 #: ../src/guestfs-actions.pod:2007
9837 msgid "guestfs_get_qemu"
9842 #: ../src/guestfs-actions.pod:2009
9846 " guestfs_get_qemu (guestfs_h *g);\n"
9852 #: ../src/guestfs-actions.pod:2012 ../fish/guestfish-actions.pod:1368
9853 msgid "Return the current qemu binary."
9858 #: ../src/guestfs-actions.pod:2014 ../fish/guestfish-actions.pod:1370
9860 "This is always non-NULL. If it wasn't set already, then this will return "
9861 "the default qemu binary name."
9866 #: ../src/guestfs-actions.pod:2020 ../src/guestfs-actions.pod:5695
9867 msgid "(Added in 1.0.6)"
9872 #: ../src/guestfs-actions.pod:2022
9873 msgid "guestfs_get_recovery_proc"
9878 #: ../src/guestfs-actions.pod:2024
9882 " guestfs_get_recovery_proc (guestfs_h *g);\n"
9888 #: ../src/guestfs-actions.pod:2027 ../fish/guestfish-actions.pod:1377
9889 msgid "Return the recovery process enabled flag."
9894 #: ../src/guestfs-actions.pod:2031 ../src/guestfs-actions.pod:3263
9895 #: ../src/guestfs-actions.pod:3560 ../src/guestfs-actions.pod:3960
9896 #: ../src/guestfs-actions.pod:3992 ../src/guestfs-actions.pod:4999
9897 #: ../src/guestfs-actions.pod:5342 ../src/guestfs-actions.pod:5719
9898 #: ../src/guestfs-actions.pod:6378 ../src/guestfs-actions.pod:6398
9899 #: ../src/guestfs-actions.pod:6590
9900 msgid "(Added in 1.0.77)"
9905 #: ../src/guestfs-actions.pod:2033
9906 msgid "guestfs_get_selinux"
9911 #: ../src/guestfs-actions.pod:2035
9915 " guestfs_get_selinux (guestfs_h *g);\n"
9921 #: ../src/guestfs-actions.pod:2038
9923 "This returns the current setting of the selinux flag which is passed to the "
9924 "appliance at boot time. See C<guestfs_set_selinux>."
9929 #: ../src/guestfs-actions.pod:2046 ../src/guestfs-actions.pod:2109
9930 #: ../src/guestfs-actions.pod:5738 ../src/guestfs-actions.pod:5792
9931 msgid "(Added in 1.0.67)"
9936 #: ../src/guestfs-actions.pod:2048
9937 msgid "guestfs_get_state"
9942 #: ../src/guestfs-actions.pod:2050
9946 " guestfs_get_state (guestfs_h *g);\n"
9952 #: ../src/guestfs-actions.pod:2053 ../fish/guestfish-actions.pod:1393
9954 "This returns the current state as an opaque integer. This is only useful "
9955 "for printing debug and internal error messages."
9960 #: ../src/guestfs-actions.pod:2056 ../src/guestfs-actions.pod:3066
9961 #: ../src/guestfs-actions.pod:3095 ../src/guestfs-actions.pod:3156
9962 #: ../src/guestfs-actions.pod:3183 ../fish/guestfish-actions.pod:1396
9963 #: ../fish/guestfish-actions.pod:2135 ../fish/guestfish-actions.pod:2153
9964 #: ../fish/guestfish-actions.pod:2191 ../fish/guestfish-actions.pod:2207
9965 msgid "For more information on states, see L<guestfs(3)>."
9970 #: ../src/guestfs-actions.pod:2062
9971 msgid "guestfs_get_trace"
9976 #: ../src/guestfs-actions.pod:2064
9980 " guestfs_get_trace (guestfs_h *g);\n"
9986 #: ../src/guestfs-actions.pod:2067 ../fish/guestfish-actions.pod:1402
9987 msgid "Return the command trace flag."
9992 #: ../src/guestfs-actions.pod:2073
9993 msgid "guestfs_get_umask"
9998 #: ../src/guestfs-actions.pod:2075
10002 " guestfs_get_umask (guestfs_h *g);\n"
10008 #: ../src/guestfs-actions.pod:2078
10010 "Return the current umask. By default the umask is C<022> unless it has been "
10011 "set by calling C<guestfs_umask>."
10016 #: ../src/guestfs-actions.pod:2085
10017 msgid "guestfs_get_verbose"
10022 #: ../src/guestfs-actions.pod:2087
10026 " guestfs_get_verbose (guestfs_h *g);\n"
10032 #: ../src/guestfs-actions.pod:2090 ../fish/guestfish-actions.pod:1415
10033 msgid "This returns the verbose messages flag."
10038 #: ../src/guestfs-actions.pod:2096
10039 msgid "guestfs_getcon"
10044 #: ../src/guestfs-actions.pod:2098
10048 " guestfs_getcon (guestfs_h *g);\n"
10054 #: ../src/guestfs-actions.pod:2101 ../fish/guestfish-actions.pod:1421
10055 msgid "This gets the SELinux security context of the daemon."
10060 #: ../src/guestfs-actions.pod:2103
10062 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
10067 #: ../src/guestfs-actions.pod:2111
10068 msgid "guestfs_getxattr"
10073 #: ../src/guestfs-actions.pod:2113
10077 " guestfs_getxattr (guestfs_h *g,\n"
10078 " const char *path,\n"
10079 " const char *name,\n"
10080 " size_t *size_r);\n"
10086 #: ../src/guestfs-actions.pod:2119
10088 "Get a single extended attribute from file C<path> named C<name>. This call "
10089 "follows symlinks. If you want to lookup an extended attribute for the "
10090 "symlink itself, use C<guestfs_lgetxattr>."
10095 #: ../src/guestfs-actions.pod:2123 ../src/guestfs-actions.pod:3277
10097 "Normally it is better to get all extended attributes from a file in one go "
10098 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
10099 "implementations are buggy and do not provide a way to list out attributes. "
10100 "For these filesystems (notably ntfs-3g) you have to know the names of the "
10101 "extended attributes you want in advance and call this function."
10106 #: ../src/guestfs-actions.pod:2130 ../src/guestfs-actions.pod:3284
10107 #: ../fish/guestfish-actions.pod:1441 ../fish/guestfish-actions.pod:2272
10109 "Extended attribute values are blobs of binary data. If there is no extended "
10110 "attribute named C<name>, this returns an error."
10115 #: ../src/guestfs-actions.pod:2133
10116 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
10121 #: ../src/guestfs-actions.pod:2135 ../src/guestfs-actions.pod:2326
10122 #: ../src/guestfs-actions.pod:3289 ../src/guestfs-actions.pod:4992
10123 #: ../src/guestfs-actions.pod:5018 ../src/guestfs-actions.pod:5199
10125 "This function returns a buffer, or NULL on error. The size of the returned "
10126 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
10131 #: ../src/guestfs-actions.pod:2139 ../src/guestfs-actions.pod:3293
10132 msgid "(Added in 1.7.24)"
10137 #: ../src/guestfs-actions.pod:2141
10138 msgid "guestfs_getxattrs"
10143 #: ../src/guestfs-actions.pod:2143
10146 " struct guestfs_xattr_list *\n"
10147 " guestfs_getxattrs (guestfs_h *g,\n"
10148 " const char *path);\n"
10154 #: ../src/guestfs-actions.pod:2147 ../fish/guestfish-actions.pod:1450
10156 "This call lists the extended attributes of the file or directory C<path>."
10161 #: ../src/guestfs-actions.pod:2150 ../fish/guestfish-actions.pod:1453
10163 "At the system call level, this is a combination of the L<listxattr(2)> and "
10164 "L<getxattr(2)> calls."
10169 #: ../src/guestfs-actions.pod:2153
10170 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
10175 #: ../src/guestfs-actions.pod:2155 ../src/guestfs-actions.pod:3305
10176 #: ../src/guestfs-actions.pod:3956
10178 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
10179 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
10184 #: ../src/guestfs-actions.pod:2159 ../src/guestfs-actions.pod:3309
10185 #: ../src/guestfs-actions.pod:3474 ../src/guestfs-actions.pod:3510
10186 #: ../src/guestfs-actions.pod:5372 ../src/guestfs-actions.pod:5811
10187 #: ../src/guestfs-actions.pod:7146
10188 msgid "(Added in 1.0.59)"
10193 #: ../src/guestfs-actions.pod:2161
10194 msgid "guestfs_glob_expand"
10199 #: ../src/guestfs-actions.pod:2163
10203 " guestfs_glob_expand (guestfs_h *g,\n"
10204 " const char *pattern);\n"
10210 #: ../src/guestfs-actions.pod:2167 ../fish/guestfish-actions.pod:1462
10212 "This command searches for all the pathnames matching C<pattern> according to "
10213 "the wildcard expansion rules used by the shell."
10218 #: ../src/guestfs-actions.pod:2171 ../fish/guestfish-actions.pod:1466
10220 "If no paths match, then this returns an empty list (note: not an error)."
10225 #: ../src/guestfs-actions.pod:2174 ../fish/guestfish-actions.pod:1469
10227 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
10228 "GLOB_BRACE>. See that manual page for more details."
10233 #: ../src/guestfs-actions.pod:2182 ../src/guestfs-actions.pod:5976
10234 #: ../src/guestfs-actions.pod:5993
10235 msgid "(Added in 1.0.50)"
10240 #: ../src/guestfs-actions.pod:2184
10241 msgid "guestfs_grep"
10246 #: ../src/guestfs-actions.pod:2186
10250 " guestfs_grep (guestfs_h *g,\n"
10251 " const char *regex,\n"
10252 " const char *path);\n"
10258 #: ../src/guestfs-actions.pod:2191 ../fish/guestfish-actions.pod:1477
10259 msgid "This calls the external C<grep> program and returns the matching lines."
10264 #: ../src/guestfs-actions.pod:2203
10265 msgid "guestfs_grepi"
10270 #: ../src/guestfs-actions.pod:2205
10274 " guestfs_grepi (guestfs_h *g,\n"
10275 " const char *regex,\n"
10276 " const char *path);\n"
10282 #: ../src/guestfs-actions.pod:2210 ../fish/guestfish-actions.pod:1487
10284 "This calls the external C<grep -i> program and returns the matching lines."
10289 #: ../src/guestfs-actions.pod:2222
10290 msgid "guestfs_grub_install"
10295 #: ../src/guestfs-actions.pod:2224
10299 " guestfs_grub_install (guestfs_h *g,\n"
10300 " const char *root,\n"
10301 " const char *device);\n"
10307 #: ../src/guestfs-actions.pod:2229 ../fish/guestfish-actions.pod:1497
10309 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
10310 "the root directory being C<root>."
10315 #: ../src/guestfs-actions.pod:2232 ../fish/guestfish-actions.pod:1500
10317 "Note: If grub-install reports the error \"No suitable drive was found in the "
10318 "generated device map.\" it may be that you need to create a C</boot/grub/"
10319 "device.map> file first that contains the mapping between grub device names "
10320 "and Linux device names. It is usually sufficient to create a file "
10326 #: ../src/guestfs-actions.pod:2239 ../fish/guestfish-actions.pod:1507
10329 " (hd0) /dev/vda\n"
10335 #: ../src/guestfs-actions.pod:2241 ../fish/guestfish-actions.pod:1509
10336 msgid "replacing C</dev/vda> with the name of the installation device."
10341 #: ../src/guestfs-actions.pod:2245
10342 msgid "(Added in 1.0.17)"
10347 #: ../src/guestfs-actions.pod:2247
10348 msgid "guestfs_head"
10353 #: ../src/guestfs-actions.pod:2249
10357 " guestfs_head (guestfs_h *g,\n"
10358 " const char *path);\n"
10364 #: ../src/guestfs-actions.pod:2253 ../fish/guestfish-actions.pod:1515
10366 "This command returns up to the first 10 lines of a file as a list of strings."
10371 #: ../src/guestfs-actions.pod:2265
10372 msgid "guestfs_head_n"
10377 #: ../src/guestfs-actions.pod:2267
10381 " guestfs_head_n (guestfs_h *g,\n"
10383 " const char *path);\n"
10389 #: ../src/guestfs-actions.pod:2272 ../fish/guestfish-actions.pod:1525
10391 "If the parameter C<nrlines> is a positive number, this returns the first "
10392 "C<nrlines> lines of the file C<path>."
10397 #: ../src/guestfs-actions.pod:2275 ../fish/guestfish-actions.pod:1528
10399 "If the parameter C<nrlines> is a negative number, this returns lines from "
10400 "the file C<path>, excluding the last C<nrlines> lines."
10405 #: ../src/guestfs-actions.pod:2278 ../src/guestfs-actions.pod:6273
10406 #: ../fish/guestfish-actions.pod:1531 ../fish/guestfish-actions.pod:4186
10407 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
10412 #: ../src/guestfs-actions.pod:2289
10413 msgid "guestfs_hexdump"
10418 #: ../src/guestfs-actions.pod:2291
10422 " guestfs_hexdump (guestfs_h *g,\n"
10423 " const char *path);\n"
10429 #: ../src/guestfs-actions.pod:2295 ../fish/guestfish-actions.pod:1540
10431 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
10432 "readable, canonical hex dump of the file."
10437 #: ../src/guestfs-actions.pod:2304 ../src/guestfs-actions.pod:6057
10438 #: ../src/guestfs-actions.pod:6112
10439 msgid "(Added in 1.0.22)"
10444 #: ../src/guestfs-actions.pod:2306
10445 msgid "guestfs_initrd_cat"
10450 #: ../src/guestfs-actions.pod:2308
10454 " guestfs_initrd_cat (guestfs_h *g,\n"
10455 " const char *initrdpath,\n"
10456 " const char *filename,\n"
10457 " size_t *size_r);\n"
10463 #: ../src/guestfs-actions.pod:2314 ../fish/guestfish-actions.pod:1550
10465 "This command unpacks the file C<filename> from the initrd file called "
10466 "C<initrdpath>. The filename must be given I<without> the initial C</> "
10472 #: ../src/guestfs-actions.pod:2318 ../fish/guestfish-actions.pod:1554
10474 "For example, in guestfish you could use the following command to examine the "
10475 "boot script (usually called C</init>) contained in a Linux initrd or "
10481 #: ../src/guestfs-actions.pod:2322 ../fish/guestfish-actions.pod:1558
10484 " initrd-cat /boot/initrd-<version>.img init\n"
10490 #: ../src/guestfs-actions.pod:2324
10491 msgid "See also C<guestfs_initrd_list>."
10496 #: ../src/guestfs-actions.pod:2335
10497 msgid "guestfs_initrd_list"
10502 #: ../src/guestfs-actions.pod:2337
10506 " guestfs_initrd_list (guestfs_h *g,\n"
10507 " const char *path);\n"
10513 #: ../src/guestfs-actions.pod:2341 ../fish/guestfish-actions.pod:1569
10514 msgid "This command lists out files contained in an initrd."
10519 #: ../src/guestfs-actions.pod:2343 ../fish/guestfish-actions.pod:1571
10521 "The files are listed without any initial C</> character. The files are "
10522 "listed in the order they appear (not necessarily alphabetical). Directory "
10523 "names are listed as separate items."
10528 #: ../src/guestfs-actions.pod:2347 ../fish/guestfish-actions.pod:1575
10530 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
10531 "initrd. We I<only> support the newer initramfs format (compressed cpio "
10537 #: ../src/guestfs-actions.pod:2357
10538 msgid "guestfs_inotify_add_watch"
10543 #: ../src/guestfs-actions.pod:2359
10547 " guestfs_inotify_add_watch (guestfs_h *g,\n"
10548 " const char *path,\n"
10555 #: ../src/guestfs-actions.pod:2364 ../fish/guestfish-actions.pod:1583
10556 msgid "Watch C<path> for the events listed in C<mask>."
10561 #: ../src/guestfs-actions.pod:2366 ../fish/guestfish-actions.pod:1585
10563 "Note that if C<path> is a directory then events within that directory are "
10564 "watched, but this does I<not> happen recursively (in subdirectories)."
10569 #: ../src/guestfs-actions.pod:2370 ../fish/guestfish-actions.pod:1589
10571 "Note for non-C or non-Linux callers: the inotify events are defined by the "
10572 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
10577 #: ../src/guestfs-actions.pod:2378
10578 msgid "guestfs_inotify_close"
10583 #: ../src/guestfs-actions.pod:2380
10587 " guestfs_inotify_close (guestfs_h *g);\n"
10593 #: ../src/guestfs-actions.pod:2383 ../fish/guestfish-actions.pod:1597
10595 "This closes the inotify handle which was previously opened by inotify_init. "
10596 "It removes all watches, throws away any pending events, and deallocates all "
10602 #: ../src/guestfs-actions.pod:2391
10603 msgid "guestfs_inotify_files"
10608 #: ../src/guestfs-actions.pod:2393
10612 " guestfs_inotify_files (guestfs_h *g);\n"
10618 #: ../src/guestfs-actions.pod:2396
10620 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
10621 "returns a list of pathnames of objects that were touched. The returned "
10622 "pathnames are sorted and deduplicated."
10627 #: ../src/guestfs-actions.pod:2406
10628 msgid "guestfs_inotify_init"
10633 #: ../src/guestfs-actions.pod:2408
10637 " guestfs_inotify_init (guestfs_h *g,\n"
10638 " int maxevents);\n"
10644 #: ../src/guestfs-actions.pod:2412 ../fish/guestfish-actions.pod:1613
10646 "This command creates a new inotify handle. The inotify subsystem can be "
10647 "used to notify events which happen to objects in the guest filesystem."
10652 #: ../src/guestfs-actions.pod:2416
10654 "C<maxevents> is the maximum number of events which will be queued up between "
10655 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
10656 "passed as C<0>, then the kernel (or previously set) default is used. For "
10657 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
10658 "throws away events, but records the fact that it threw them away by setting "
10659 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
10660 "C<guestfs_inotify_read>)."
10665 #: ../src/guestfs-actions.pod:2426
10667 "Before any events are generated, you have to add some watches to the "
10668 "internal watch list. See: C<guestfs_inotify_add_watch>, "
10669 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
10674 #: ../src/guestfs-actions.pod:2432
10676 "Queued up events should be read periodically by calling "
10677 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
10678 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
10679 "often enough then you risk the internal queue overflowing."
10684 #: ../src/guestfs-actions.pod:2439
10686 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
10687 "This also removes any watches automatically."
10692 #: ../src/guestfs-actions.pod:2443 ../fish/guestfish-actions.pod:1644
10694 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
10695 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
10696 "that there is one global inotify handle per libguestfs instance."
10701 #: ../src/guestfs-actions.pod:2452
10702 msgid "guestfs_inotify_read"
10707 #: ../src/guestfs-actions.pod:2454
10710 " struct guestfs_inotify_event_list *\n"
10711 " guestfs_inotify_read (guestfs_h *g);\n"
10717 #: ../src/guestfs-actions.pod:2457 ../fish/guestfish-actions.pod:1653
10719 "Return the complete queue of events that have happened since the previous "
10725 #: ../src/guestfs-actions.pod:2460 ../fish/guestfish-actions.pod:1656
10726 msgid "If no events have happened, this returns an empty list."
10731 #: ../src/guestfs-actions.pod:2462 ../fish/guestfish-actions.pod:1658
10733 "I<Note>: In order to make sure that all events have been read, you must call "
10734 "this function repeatedly until it returns an empty list. The reason is that "
10735 "the call will read events up to the maximum appliance-to-host message size "
10736 "and leave remaining events in the queue."
10741 #: ../src/guestfs-actions.pod:2468
10743 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
10744 "there was an error. I<The caller must call "
10745 "C<guestfs_free_inotify_event_list> after use>."
10750 #: ../src/guestfs-actions.pod:2474
10751 msgid "guestfs_inotify_rm_watch"
10756 #: ../src/guestfs-actions.pod:2476
10760 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
10767 #: ../src/guestfs-actions.pod:2480
10769 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
10774 #: ../src/guestfs-actions.pod:2487
10775 msgid "guestfs_inspect_get_arch"
10780 #: ../src/guestfs-actions.pod:2489
10784 " guestfs_inspect_get_arch (guestfs_h *g,\n"
10785 " const char *root);\n"
10791 #: ../src/guestfs-actions.pod:2493 ../src/guestfs-actions.pod:2516
10792 #: ../src/guestfs-actions.pod:2597 ../src/guestfs-actions.pod:2623
10793 #: ../src/guestfs-actions.pod:2645 ../src/guestfs-actions.pod:2672
10794 #: ../src/guestfs-actions.pod:2693 ../src/guestfs-actions.pod:2730
10795 #: ../src/guestfs-actions.pod:2759 ../src/guestfs-actions.pod:2790
10796 #: ../src/guestfs-actions.pod:2834 ../src/guestfs-actions.pod:2876
10797 #: ../src/guestfs-actions.pod:2899
10799 "This function should only be called with a root device string as returned by "
10800 "C<guestfs_inspect_os>."
10805 #: ../src/guestfs-actions.pod:2496
10807 "This returns the architecture of the inspected operating system. The "
10808 "possible return values are listed under C<guestfs_file_architecture>."
10813 #: ../src/guestfs-actions.pod:2500 ../fish/guestfish-actions.pod:1682
10815 "If the architecture could not be determined, then the string C<unknown> is "
10821 #: ../src/guestfs-actions.pod:2503 ../src/guestfs-actions.pod:2584
10822 #: ../src/guestfs-actions.pod:2632 ../src/guestfs-actions.pod:2660
10823 #: ../src/guestfs-actions.pod:2746 ../src/guestfs-actions.pod:2777
10824 #: ../src/guestfs-actions.pod:2801 ../src/guestfs-actions.pod:2820
10825 #: ../src/guestfs-actions.pod:2863 ../src/guestfs-actions.pod:2886
10826 #: ../src/guestfs-actions.pod:2992 ../src/guestfs-actions.pod:3033
10827 #: ../fish/guestfish-actions.pod:1685 ../fish/guestfish-actions.pod:1759
10828 #: ../fish/guestfish-actions.pod:1792 ../fish/guestfish-actions.pod:1813
10829 #: ../fish/guestfish-actions.pod:1877 ../fish/guestfish-actions.pod:1901
10830 #: ../fish/guestfish-actions.pod:1918 ../fish/guestfish-actions.pod:1931
10831 #: ../fish/guestfish-actions.pod:1966 ../fish/guestfish-actions.pod:1982
10832 #: ../fish/guestfish-actions.pod:2081 ../fish/guestfish-actions.pod:2115
10833 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
10838 #: ../src/guestfs-actions.pod:2510
10839 msgid "guestfs_inspect_get_distro"
10844 #: ../src/guestfs-actions.pod:2512
10848 " guestfs_inspect_get_distro (guestfs_h *g,\n"
10849 " const char *root);\n"
10855 #: ../src/guestfs-actions.pod:2519 ../fish/guestfish-actions.pod:1694
10857 "This returns the distro (distribution) of the inspected operating system."
10862 #: ../src/guestfs-actions.pod:2522 ../fish/guestfish-actions.pod:1697
10863 msgid "Currently defined distros are:"
10868 #: ../src/guestfs-actions.pod:2526 ../fish/guestfish-actions.pod:1701
10869 msgid "\"archlinux\""
10874 #: ../src/guestfs-actions.pod:2528 ../fish/guestfish-actions.pod:1703
10875 msgid "Arch Linux."
10880 #: ../src/guestfs-actions.pod:2530 ../fish/guestfish-actions.pod:1705
10886 #: ../src/guestfs-actions.pod:2532 ../fish/guestfish-actions.pod:1707
10892 #: ../src/guestfs-actions.pod:2534 ../fish/guestfish-actions.pod:1709
10898 #: ../src/guestfs-actions.pod:2536 ../fish/guestfish-actions.pod:1711
10904 #: ../src/guestfs-actions.pod:2538 ../fish/guestfish-actions.pod:1713
10910 #: ../src/guestfs-actions.pod:2540 ../fish/guestfish-actions.pod:1715
10916 #: ../src/guestfs-actions.pod:2542 ../fish/guestfish-actions.pod:1717
10917 msgid "\"linuxmint\""
10922 #: ../src/guestfs-actions.pod:2544 ../fish/guestfish-actions.pod:1719
10923 msgid "Linux Mint."
10928 #: ../src/guestfs-actions.pod:2546 ../fish/guestfish-actions.pod:1721
10929 msgid "\"mandriva\""
10934 #: ../src/guestfs-actions.pod:2548 ../fish/guestfish-actions.pod:1723
10940 #: ../src/guestfs-actions.pod:2550 ../fish/guestfish-actions.pod:1725
10946 #: ../src/guestfs-actions.pod:2552 ../fish/guestfish-actions.pod:1727
10952 #: ../src/guestfs-actions.pod:2554 ../fish/guestfish-actions.pod:1729
10958 #: ../src/guestfs-actions.pod:2556 ../fish/guestfish-actions.pod:1731
10964 #: ../src/guestfs-actions.pod:2558 ../fish/guestfish-actions.pod:1733
10965 msgid "\"redhat-based\""
10970 #: ../src/guestfs-actions.pod:2560 ../fish/guestfish-actions.pod:1735
10971 msgid "Some Red Hat-derived distro."
10976 #: ../src/guestfs-actions.pod:2562 ../fish/guestfish-actions.pod:1737
10982 #: ../src/guestfs-actions.pod:2564 ../fish/guestfish-actions.pod:1739
10983 msgid "Red Hat Enterprise Linux and some derivatives."
10988 #: ../src/guestfs-actions.pod:2566 ../fish/guestfish-actions.pod:1741
10994 #: ../src/guestfs-actions.pod:2568 ../fish/guestfish-actions.pod:1743
11000 #: ../src/guestfs-actions.pod:2570 ../src/guestfs-actions.pod:2854
11001 #: ../fish/guestfish-actions.pod:1745 ../fish/guestfish-actions.pod:1957
11002 msgid "\"unknown\""
11007 #: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:1747
11008 msgid "The distro could not be determined."
11013 #: ../src/guestfs-actions.pod:2574 ../src/guestfs-actions.pod:2846
11014 #: ../fish/guestfish-actions.pod:1749 ../fish/guestfish-actions.pod:1949
11015 msgid "\"windows\""
11020 #: ../src/guestfs-actions.pod:2576 ../fish/guestfish-actions.pod:1751
11022 "Windows does not have distributions. This string is returned if the OS type "
11028 #: ../src/guestfs-actions.pod:2581 ../src/guestfs-actions.pod:2860
11029 #: ../fish/guestfish-actions.pod:1756 ../fish/guestfish-actions.pod:1963
11031 "Future versions of libguestfs may return other strings here. The caller "
11032 "should be prepared to handle any string."
11037 #: ../src/guestfs-actions.pod:2591
11038 msgid "guestfs_inspect_get_filesystems"
11043 #: ../src/guestfs-actions.pod:2593
11047 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
11048 " const char *root);\n"
11054 #: ../src/guestfs-actions.pod:2600 ../fish/guestfish-actions.pod:1768
11056 "This returns a list of all the filesystems that we think are associated with "
11057 "this operating system. This includes the root filesystem, other ordinary "
11058 "filesystems, and non-mounted devices like swap partitions."
11063 #: ../src/guestfs-actions.pod:2605 ../fish/guestfish-actions.pod:1773
11065 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
11066 "to be shared between operating systems."
11071 #: ../src/guestfs-actions.pod:2608
11073 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11074 "C<guestfs_inspect_get_mountpoints>."
11079 #: ../src/guestfs-actions.pod:2617
11080 msgid "guestfs_inspect_get_hostname"
11085 #: ../src/guestfs-actions.pod:2619
11089 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
11090 " const char *root);\n"
11096 #: ../src/guestfs-actions.pod:2626 ../fish/guestfish-actions.pod:1786
11098 "This function returns the hostname of the operating system as found by "
11099 "inspection of the guest's configuration files."
11104 #: ../src/guestfs-actions.pod:2629 ../fish/guestfish-actions.pod:1789
11106 "If the hostname could not be determined, then the string C<unknown> is "
11112 #: ../src/guestfs-actions.pod:2637
11113 msgid "(Added in 1.7.9)"
11118 #: ../src/guestfs-actions.pod:2639
11119 msgid "guestfs_inspect_get_major_version"
11124 #: ../src/guestfs-actions.pod:2641
11128 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
11129 " const char *root);\n"
11135 #: ../src/guestfs-actions.pod:2648 ../fish/guestfish-actions.pod:1801
11137 "This returns the major version number of the inspected operating system."
11142 #: ../src/guestfs-actions.pod:2651 ../fish/guestfish-actions.pod:1804
11144 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
11145 "popular public names used by the operating system. Notably the operating "
11146 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
11147 "1). You can find out the real versions corresponding to releases of Windows "
11148 "by consulting Wikipedia or MSDN."
11153 #: ../src/guestfs-actions.pod:2658 ../src/guestfs-actions.pod:2678
11154 #: ../fish/guestfish-actions.pod:1811 ../fish/guestfish-actions.pod:1825
11155 msgid "If the version could not be determined, then C<0> is returned."
11160 #: ../src/guestfs-actions.pod:2666
11161 msgid "guestfs_inspect_get_minor_version"
11166 #: ../src/guestfs-actions.pod:2668
11170 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
11171 " const char *root);\n"
11177 #: ../src/guestfs-actions.pod:2675 ../fish/guestfish-actions.pod:1822
11179 "This returns the minor version number of the inspected operating system."
11184 #: ../src/guestfs-actions.pod:2680
11186 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11187 "C<guestfs_inspect_get_major_version>."
11192 #: ../src/guestfs-actions.pod:2687
11193 msgid "guestfs_inspect_get_mountpoints"
11198 #: ../src/guestfs-actions.pod:2689
11202 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
11203 " const char *root);\n"
11208 #: ../src/guestfs-actions.pod:2696 ../fish/guestfish-actions.pod:1837
11210 "This returns a hash of where we think the filesystems associated with this "
11211 "operating system should be mounted. Callers should note that this is at "
11212 "best an educated guess made by reading configuration files such as C</etc/"
11213 "fstab>. I<In particular note> that this may return filesystems which are "
11214 "non-existent or not mountable and callers should be prepared to handle or "
11215 "ignore failures if they try to mount them."
11220 #: ../src/guestfs-actions.pod:2705 ../fish/guestfish-actions.pod:1846
11222 "Each element in the returned hashtable has a key which is the path of the "
11223 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
11224 "mounted there (eg. C</dev/sda1>)."
11229 #: ../src/guestfs-actions.pod:2710 ../fish/guestfish-actions.pod:1851
11231 "Non-mounted devices such as swap devices are I<not> returned in this list."
11236 #: ../src/guestfs-actions.pod:2713
11238 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11239 "C<guestfs_inspect_get_filesystems>."
11244 #: ../src/guestfs-actions.pod:2716 ../src/guestfs-actions.pod:3362
11245 #: ../src/guestfs-actions.pod:4558 ../src/guestfs-actions.pod:6414
11247 "This function returns a NULL-terminated array of strings, or NULL if there "
11248 "was an error. The array of strings will always have length C<2n+1>, where "
11249 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
11250 "caller must free the strings and the array after use>."
11255 #: ../src/guestfs-actions.pod:2724
11256 msgid "guestfs_inspect_get_package_format"
11261 #: ../src/guestfs-actions.pod:2726
11265 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
11266 " const char *root);\n"
11272 #: ../src/guestfs-actions.pod:2733
11274 "This function and C<guestfs_inspect_get_package_management> return the "
11275 "package format and package management tool used by the inspected operating "
11276 "system. For example for Fedora these functions would return C<rpm> (package "
11277 "format) and C<yum> (package management)."
11282 #: ../src/guestfs-actions.pod:2739 ../fish/guestfish-actions.pod:1870
11284 "This returns the string C<unknown> if we could not determine the package "
11285 "format I<or> if the operating system does not have a real packaging system "
11291 #: ../src/guestfs-actions.pod:2743 ../fish/guestfish-actions.pod:1874
11293 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>. "
11294 "Future versions of libguestfs may return other strings."
11299 #: ../src/guestfs-actions.pod:2751 ../src/guestfs-actions.pod:2782
11300 msgid "(Added in 1.7.5)"
11305 #: ../src/guestfs-actions.pod:2753
11306 msgid "guestfs_inspect_get_package_management"
11311 #: ../src/guestfs-actions.pod:2755
11315 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
11316 " const char *root);\n"
11322 #: ../src/guestfs-actions.pod:2762
11324 "C<guestfs_inspect_get_package_format> and this function return the package "
11325 "format and package management tool used by the inspected operating system. "
11326 "For example for Fedora these functions would return C<rpm> (package format) "
11327 "and C<yum> (package management)."
11332 #: ../src/guestfs-actions.pod:2768 ../fish/guestfish-actions.pod:1892
11334 "This returns the string C<unknown> if we could not determine the package "
11335 "management tool I<or> if the operating system does not have a real packaging "
11336 "system (eg. Windows)."
11341 #: ../src/guestfs-actions.pod:2772 ../fish/guestfish-actions.pod:1896
11343 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
11344 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>. Future versions of "
11345 "libguestfs may return other strings."
11350 #: ../src/guestfs-actions.pod:2784
11351 msgid "guestfs_inspect_get_product_name"
11356 #: ../src/guestfs-actions.pod:2786
11360 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
11361 " const char *root);\n"
11367 #: ../src/guestfs-actions.pod:2793 ../fish/guestfish-actions.pod:1910
11369 "This returns the product name of the inspected operating system. The "
11370 "product name is generally some freeform string which can be displayed to the "
11371 "user, but should not be parsed by programs."
11376 #: ../src/guestfs-actions.pod:2798 ../fish/guestfish-actions.pod:1915
11378 "If the product name could not be determined, then the string C<unknown> is "
11384 #: ../src/guestfs-actions.pod:2808
11385 msgid "guestfs_inspect_get_roots"
11390 #: ../src/guestfs-actions.pod:2810
11394 " guestfs_inspect_get_roots (guestfs_h *g);\n"
11400 #: ../src/guestfs-actions.pod:2813
11402 "This function is a convenient way to get the list of root devices, as "
11403 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
11404 "the whole inspection process."
11409 #: ../src/guestfs-actions.pod:2817
11411 "This returns an empty list if either no root devices were found or the "
11412 "caller has not called C<guestfs_inspect_os>."
11417 #: ../src/guestfs-actions.pod:2826
11418 msgid "(Added in 1.7.3)"
11423 #: ../src/guestfs-actions.pod:2828
11424 msgid "guestfs_inspect_get_type"
11429 #: ../src/guestfs-actions.pod:2830
11433 " guestfs_inspect_get_type (guestfs_h *g,\n"
11434 " const char *root);\n"
11440 #: ../src/guestfs-actions.pod:2837 ../fish/guestfish-actions.pod:1940
11442 "This returns the type of the inspected operating system. Currently defined "
11448 #: ../src/guestfs-actions.pod:2842 ../fish/guestfish-actions.pod:1945
11454 #: ../src/guestfs-actions.pod:2844 ../fish/guestfish-actions.pod:1947
11455 msgid "Any Linux-based operating system."
11460 #: ../src/guestfs-actions.pod:2848 ../fish/guestfish-actions.pod:1951
11461 msgid "Any Microsoft Windows operating system."
11466 #: ../src/guestfs-actions.pod:2850 ../fish/guestfish-actions.pod:1953
11467 msgid "\"freebsd\""
11472 #: ../src/guestfs-actions.pod:2852 ../fish/guestfish-actions.pod:1955
11478 #: ../src/guestfs-actions.pod:2856 ../fish/guestfish-actions.pod:1959
11479 msgid "The operating system type could not be determined."
11484 #: ../src/guestfs-actions.pod:2870
11485 msgid "guestfs_inspect_get_windows_systemroot"
11490 #: ../src/guestfs-actions.pod:2872
11494 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
11495 " const char *root);\n"
11501 #: ../src/guestfs-actions.pod:2879 ../fish/guestfish-actions.pod:1975
11503 "This returns the Windows systemroot of the inspected guest. The systemroot "
11504 "is a directory path such as C</WINDOWS>."
11509 #: ../src/guestfs-actions.pod:2882 ../fish/guestfish-actions.pod:1978
11511 "This call assumes that the guest is Windows and that the systemroot could be "
11512 "determined by inspection. If this is not the case then an error is returned."
11517 #: ../src/guestfs-actions.pod:2891
11518 msgid "(Added in 1.5.25)"
11523 #: ../src/guestfs-actions.pod:2893
11524 msgid "guestfs_inspect_list_applications"
11529 #: ../src/guestfs-actions.pod:2895
11532 " struct guestfs_application_list *\n"
11533 " guestfs_inspect_list_applications (guestfs_h *g,\n"
11534 " const char *root);\n"
11540 #: ../src/guestfs-actions.pod:2902 ../fish/guestfish-actions.pod:1991
11541 msgid "Return the list of applications installed in the operating system."
11546 #: ../src/guestfs-actions.pod:2904
11548 "I<Note:> This call works differently from other parts of the inspection "
11549 "API. You have to call C<guestfs_inspect_os>, then "
11550 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
11551 "this. Listing applications is a significantly more difficult operation "
11552 "which requires access to the full filesystem. Also note that unlike the "
11553 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
11554 "the libguestfs handle, this call actually reads parts of the mounted "
11555 "filesystems during the call."
11560 #: ../src/guestfs-actions.pod:2914 ../fish/guestfish-actions.pod:2003
11562 "This returns an empty list if the inspection code was not able to determine "
11563 "the list of applications."
11568 #: ../src/guestfs-actions.pod:2917 ../fish/guestfish-actions.pod:2006
11569 msgid "The application structure contains the following fields:"
11574 #: ../src/guestfs-actions.pod:2921 ../fish/guestfish-actions.pod:2010
11575 msgid "C<app_name>"
11580 #: ../src/guestfs-actions.pod:2923 ../fish/guestfish-actions.pod:2012
11582 "The name of the application. For Red Hat-derived and Debian-derived Linux "
11583 "guests, this is the package name."
11588 #: ../src/guestfs-actions.pod:2926 ../fish/guestfish-actions.pod:2015
11589 msgid "C<app_display_name>"
11594 #: ../src/guestfs-actions.pod:2928 ../fish/guestfish-actions.pod:2017
11596 "The display name of the application, sometimes localized to the install "
11597 "language of the guest operating system."
11602 #: ../src/guestfs-actions.pod:2931 ../fish/guestfish-actions.pod:2020
11604 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
11605 "to display something can use C<app_name> instead."
11610 #: ../src/guestfs-actions.pod:2934 ../fish/guestfish-actions.pod:2023
11611 msgid "C<app_epoch>"
11616 #: ../src/guestfs-actions.pod:2936 ../fish/guestfish-actions.pod:2025
11618 "For package managers which use epochs, this contains the epoch of the "
11619 "package (an integer). If unavailable, this is returned as C<0>."
11624 #: ../src/guestfs-actions.pod:2939 ../fish/guestfish-actions.pod:2028
11625 msgid "C<app_version>"
11630 #: ../src/guestfs-actions.pod:2941 ../fish/guestfish-actions.pod:2030
11632 "The version string of the application or package. If unavailable this is "
11633 "returned as an empty string C<\"\">."
11638 #: ../src/guestfs-actions.pod:2944 ../fish/guestfish-actions.pod:2033
11639 msgid "C<app_release>"
11644 #: ../src/guestfs-actions.pod:2946 ../fish/guestfish-actions.pod:2035
11646 "The release string of the application or package, for package managers that "
11647 "use this. If unavailable this is returned as an empty string C<\"\">."
11652 #: ../src/guestfs-actions.pod:2950 ../fish/guestfish-actions.pod:2039
11653 msgid "C<app_install_path>"
11658 #: ../src/guestfs-actions.pod:2952 ../fish/guestfish-actions.pod:2041
11660 "The installation path of the application (on operating systems such as "
11661 "Windows which use installation paths). This path is in the format used by "
11662 "the guest operating system, it is not a libguestfs path."
11667 #: ../src/guestfs-actions.pod:2957 ../fish/guestfish-actions.pod:2046
11668 msgid "If unavailable this is returned as an empty string C<\"\">."
11673 #: ../src/guestfs-actions.pod:2959 ../fish/guestfish-actions.pod:2048
11674 msgid "C<app_trans_path>"
11679 #: ../src/guestfs-actions.pod:2961 ../fish/guestfish-actions.pod:2050
11681 "The install path translated into a libguestfs path. If unavailable this is "
11682 "returned as an empty string C<\"\">."
11687 #: ../src/guestfs-actions.pod:2964 ../fish/guestfish-actions.pod:2053
11688 msgid "C<app_publisher>"
11693 #: ../src/guestfs-actions.pod:2966 ../fish/guestfish-actions.pod:2055
11695 "The name of the publisher of the application, for package managers that use "
11696 "this. If unavailable this is returned as an empty string C<\"\">."
11701 #: ../src/guestfs-actions.pod:2970 ../fish/guestfish-actions.pod:2059
11707 #: ../src/guestfs-actions.pod:2972 ../fish/guestfish-actions.pod:2061
11709 "The URL (eg. upstream URL) of the application. If unavailable this is "
11710 "returned as an empty string C<\"\">."
11715 #: ../src/guestfs-actions.pod:2975 ../fish/guestfish-actions.pod:2064
11716 msgid "C<app_source_package>"
11721 #: ../src/guestfs-actions.pod:2977 ../fish/guestfish-actions.pod:2066
11723 "For packaging systems which support this, the name of the source package. "
11724 "If unavailable this is returned as an empty string C<\"\">."
11729 #: ../src/guestfs-actions.pod:2980 ../fish/guestfish-actions.pod:2069
11730 msgid "C<app_summary>"
11735 #: ../src/guestfs-actions.pod:2982 ../fish/guestfish-actions.pod:2071
11737 "A short (usually one line) description of the application or package. If "
11738 "unavailable this is returned as an empty string C<\"\">."
11743 #: ../src/guestfs-actions.pod:2985 ../fish/guestfish-actions.pod:2074
11744 msgid "C<app_description>"
11749 #: ../src/guestfs-actions.pod:2987 ../fish/guestfish-actions.pod:2076
11751 "A longer description of the application or package. If unavailable this is "
11752 "returned as an empty string C<\"\">."
11757 #: ../src/guestfs-actions.pod:2994
11759 "This function returns a C<struct guestfs_application_list *>, or NULL if "
11760 "there was an error. I<The caller must call C<guestfs_free_application_list> "
11766 #: ../src/guestfs-actions.pod:2998
11767 msgid "(Added in 1.7.8)"
11772 #: ../src/guestfs-actions.pod:3000
11773 msgid "guestfs_inspect_os"
11778 #: ../src/guestfs-actions.pod:3002
11782 " guestfs_inspect_os (guestfs_h *g);\n"
11788 #: ../src/guestfs-actions.pod:3005 ../fish/guestfish-actions.pod:2087
11790 "This function uses other libguestfs functions and certain heuristics to "
11791 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
11792 "for operating systems."
11797 #: ../src/guestfs-actions.pod:3009 ../fish/guestfish-actions.pod:2091
11798 msgid "The list returned is empty if no operating systems were found."
11803 #: ../src/guestfs-actions.pod:3011 ../fish/guestfish-actions.pod:2093
11805 "If one operating system was found, then this returns a list with a single "
11806 "element, which is the name of the root filesystem of this operating system. "
11807 "It is also possible for this function to return a list containing more than "
11808 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
11809 "element being the root filesystem of one of the operating systems."
11814 #: ../src/guestfs-actions.pod:3018
11816 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
11817 "functions in order to query further information about each operating system, "
11818 "such as the name and version."
11823 #: ../src/guestfs-actions.pod:3023
11825 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
11826 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
11827 "the contents. This should be called with no disks currently mounted. The "
11828 "function may also use Augeas, so any existing Augeas handle will be closed."
11833 #: ../src/guestfs-actions.pod:3029 ../fish/guestfish-actions.pod:2111
11835 "This function cannot decrypt encrypted disks. The caller must do that first "
11836 "(supplying the necessary keys) if the disk is encrypted."
11841 #: ../src/guestfs-actions.pod:3035 ../src/guestfs-actions.pod:3320
11842 #: ../src/guestfs-actions.pod:3382
11843 msgid "See also C<guestfs_list_filesystems>."
11848 #: ../src/guestfs-actions.pod:3043
11849 msgid "guestfs_is_blockdev"
11854 #: ../src/guestfs-actions.pod:3045
11858 " guestfs_is_blockdev (guestfs_h *g,\n"
11859 " const char *path);\n"
11865 #: ../src/guestfs-actions.pod:3049 ../fish/guestfish-actions.pod:2123
11867 "This returns C<true> if and only if there is a block device with the given "
11873 #: ../src/guestfs-actions.pod:3052 ../src/guestfs-actions.pod:3081
11874 #: ../src/guestfs-actions.pod:3111 ../src/guestfs-actions.pod:3126
11875 #: ../src/guestfs-actions.pod:3142 ../src/guestfs-actions.pod:3198
11876 #: ../src/guestfs-actions.pod:3213
11877 msgid "See also C<guestfs_stat>."
11882 #: ../src/guestfs-actions.pod:3056 ../src/guestfs-actions.pod:3085
11883 #: ../src/guestfs-actions.pod:3130 ../src/guestfs-actions.pod:3202
11884 #: ../src/guestfs-actions.pod:3217
11885 msgid "(Added in 1.5.10)"
11890 #: ../src/guestfs-actions.pod:3058
11891 msgid "guestfs_is_busy"
11896 #: ../src/guestfs-actions.pod:3060
11900 " guestfs_is_busy (guestfs_h *g);\n"
11906 #: ../src/guestfs-actions.pod:3063 ../fish/guestfish-actions.pod:2132
11908 "This returns true iff this handle is busy processing a command (in the "
11914 #: ../src/guestfs-actions.pod:3072
11915 msgid "guestfs_is_chardev"
11920 #: ../src/guestfs-actions.pod:3074
11924 " guestfs_is_chardev (guestfs_h *g,\n"
11925 " const char *path);\n"
11931 #: ../src/guestfs-actions.pod:3078 ../fish/guestfish-actions.pod:2141
11933 "This returns C<true> if and only if there is a character device with the "
11934 "given C<path> name."
11939 #: ../src/guestfs-actions.pod:3087
11940 msgid "guestfs_is_config"
11945 #: ../src/guestfs-actions.pod:3089
11949 " guestfs_is_config (guestfs_h *g);\n"
11955 #: ../src/guestfs-actions.pod:3092 ../fish/guestfish-actions.pod:2150
11957 "This returns true iff this handle is being configured (in the C<CONFIG> "
11963 #: ../src/guestfs-actions.pod:3101
11964 msgid "guestfs_is_dir"
11969 #: ../src/guestfs-actions.pod:3103
11973 " guestfs_is_dir (guestfs_h *g,\n"
11974 " const char *path);\n"
11980 #: ../src/guestfs-actions.pod:3107 ../fish/guestfish-actions.pod:2159
11982 "This returns C<true> if and only if there is a directory with the given "
11983 "C<path> name. Note that it returns false for other objects like files."
11988 #: ../src/guestfs-actions.pod:3117
11989 msgid "guestfs_is_fifo"
11994 #: ../src/guestfs-actions.pod:3119
11998 " guestfs_is_fifo (guestfs_h *g,\n"
11999 " const char *path);\n"
12005 #: ../src/guestfs-actions.pod:3123 ../fish/guestfish-actions.pod:2169
12007 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
12008 "given C<path> name."
12013 #: ../src/guestfs-actions.pod:3132
12014 msgid "guestfs_is_file"
12019 #: ../src/guestfs-actions.pod:3134
12023 " guestfs_is_file (guestfs_h *g,\n"
12024 " const char *path);\n"
12030 #: ../src/guestfs-actions.pod:3138 ../fish/guestfish-actions.pod:2178
12032 "This returns C<true> if and only if there is a regular file with the given "
12033 "C<path> name. Note that it returns false for other objects like directories."
12038 #: ../src/guestfs-actions.pod:3148
12039 msgid "guestfs_is_launching"
12044 #: ../src/guestfs-actions.pod:3150
12048 " guestfs_is_launching (guestfs_h *g);\n"
12054 #: ../src/guestfs-actions.pod:3153 ../fish/guestfish-actions.pod:2188
12056 "This returns true iff this handle is launching the subprocess (in the "
12057 "C<LAUNCHING> state)."
12062 #: ../src/guestfs-actions.pod:3162
12063 msgid "guestfs_is_lv"
12068 #: ../src/guestfs-actions.pod:3164
12072 " guestfs_is_lv (guestfs_h *g,\n"
12073 " const char *device);\n"
12079 #: ../src/guestfs-actions.pod:3168 ../fish/guestfish-actions.pod:2197
12081 "This command tests whether C<device> is a logical volume, and returns true "
12082 "iff this is the case."
12087 #: ../src/guestfs-actions.pod:3175
12088 msgid "guestfs_is_ready"
12093 #: ../src/guestfs-actions.pod:3177
12097 " guestfs_is_ready (guestfs_h *g);\n"
12103 #: ../src/guestfs-actions.pod:3180 ../fish/guestfish-actions.pod:2204
12105 "This returns true iff this handle is ready to accept commands (in the "
12111 #: ../src/guestfs-actions.pod:3189
12112 msgid "guestfs_is_socket"
12117 #: ../src/guestfs-actions.pod:3191
12121 " guestfs_is_socket (guestfs_h *g,\n"
12122 " const char *path);\n"
12128 #: ../src/guestfs-actions.pod:3195 ../fish/guestfish-actions.pod:2213
12130 "This returns C<true> if and only if there is a Unix domain socket with the "
12131 "given C<path> name."
12136 #: ../src/guestfs-actions.pod:3204
12137 msgid "guestfs_is_symlink"
12142 #: ../src/guestfs-actions.pod:3206
12146 " guestfs_is_symlink (guestfs_h *g,\n"
12147 " const char *path);\n"
12153 #: ../src/guestfs-actions.pod:3210 ../fish/guestfish-actions.pod:2222
12155 "This returns C<true> if and only if there is a symbolic link with the given "
12161 #: ../src/guestfs-actions.pod:3219
12162 msgid "guestfs_kill_subprocess"
12167 #: ../src/guestfs-actions.pod:3221
12171 " guestfs_kill_subprocess (guestfs_h *g);\n"
12177 #: ../src/guestfs-actions.pod:3224 ../fish/guestfish-actions.pod:2231
12178 msgid "This kills the qemu subprocess. You should never need to call this."
12183 #: ../src/guestfs-actions.pod:3230
12184 msgid "guestfs_launch"
12189 #: ../src/guestfs-actions.pod:3232
12193 " guestfs_launch (guestfs_h *g);\n"
12199 #: ../src/guestfs-actions.pod:3235 ../fish/guestfish-actions.pod:2239
12201 "Internally libguestfs is implemented by running a virtual machine using "
12207 #: ../src/guestfs-actions.pod:3238 ../fish/guestfish-actions.pod:2242
12209 "You should call this after configuring the handle (eg. adding drives) but "
12210 "before performing any actions."
12215 #: ../src/guestfs-actions.pod:3245
12216 msgid "guestfs_lchown"
12221 #: ../src/guestfs-actions.pod:3247
12225 " guestfs_lchown (guestfs_h *g,\n"
12228 " const char *path);\n"
12234 #: ../src/guestfs-actions.pod:3253
12236 "Change the file owner to C<owner> and group to C<group>. This is like "
12237 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
12238 "changed, not the target."
12243 #: ../src/guestfs-actions.pod:3265
12244 msgid "guestfs_lgetxattr"
12249 #: ../src/guestfs-actions.pod:3267
12253 " guestfs_lgetxattr (guestfs_h *g,\n"
12254 " const char *path,\n"
12255 " const char *name,\n"
12256 " size_t *size_r);\n"
12262 #: ../src/guestfs-actions.pod:3273 ../fish/guestfish-actions.pod:2261
12264 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
12265 "is a symlink, then this call returns an extended attribute from the symlink."
12270 #: ../src/guestfs-actions.pod:3287
12271 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
12276 #: ../src/guestfs-actions.pod:3295
12277 msgid "guestfs_lgetxattrs"
12282 #: ../src/guestfs-actions.pod:3297
12285 " struct guestfs_xattr_list *\n"
12286 " guestfs_lgetxattrs (guestfs_h *g,\n"
12287 " const char *path);\n"
12293 #: ../src/guestfs-actions.pod:3301
12295 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
12296 "then it returns the extended attributes of the link itself."
12301 #: ../src/guestfs-actions.pod:3311
12302 msgid "guestfs_list_devices"
12307 #: ../src/guestfs-actions.pod:3313
12311 " guestfs_list_devices (guestfs_h *g);\n"
12317 #: ../src/guestfs-actions.pod:3316 ../fish/guestfish-actions.pod:2289
12318 msgid "List all the block devices."
12323 #: ../src/guestfs-actions.pod:3318 ../fish/guestfish-actions.pod:2291
12324 msgid "The full block device names are returned, eg. C</dev/sda>."
12329 #: ../src/guestfs-actions.pod:3328
12330 msgid "guestfs_list_filesystems"
12335 #: ../src/guestfs-actions.pod:3330
12339 " guestfs_list_filesystems (guestfs_h *g);\n"
12345 #: ../src/guestfs-actions.pod:3333 ../fish/guestfish-actions.pod:2299
12347 "This inspection command looks for filesystems on partitions, block devices "
12348 "and logical volumes, returning a list of devices containing filesystems and "
12354 #: ../src/guestfs-actions.pod:3337 ../fish/guestfish-actions.pod:2303
12356 "The return value is a hash, where the keys are the devices containing "
12357 "filesystems, and the values are the filesystem types. For example:"
12362 #: ../src/guestfs-actions.pod:3341 ../fish/guestfish-actions.pod:2307
12365 " \"/dev/sda1\" => \"ntfs\"\n"
12366 " \"/dev/sda2\" => \"ext2\"\n"
12367 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
12368 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
12374 #: ../src/guestfs-actions.pod:3346 ../fish/guestfish-actions.pod:2312
12376 "The value can have the special value \"unknown\", meaning the content of the "
12377 "device is undetermined or empty. \"swap\" means a Linux swap partition."
12382 #: ../src/guestfs-actions.pod:3350
12384 "This command runs other libguestfs commands, which might include "
12385 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
12386 "soon after launch and only when nothing is mounted."
12391 #: ../src/guestfs-actions.pod:3354
12393 "Not all of the filesystems returned will be mountable. In particular, swap "
12394 "partitions are returned in the list. Also this command does not check that "
12395 "each filesystem found is valid and mountable, and some filesystems might be "
12396 "mountable but require special options. Filesystems may not all belong to a "
12397 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
12402 #: ../src/guestfs-actions.pod:3368 ../src/guestfs-actions.pod:4959
12403 msgid "(Added in 1.5.15)"
12408 #: ../src/guestfs-actions.pod:3370
12409 msgid "guestfs_list_partitions"
12414 #: ../src/guestfs-actions.pod:3372
12418 " guestfs_list_partitions (guestfs_h *g);\n"
12424 #: ../src/guestfs-actions.pod:3375 ../fish/guestfish-actions.pod:2332
12425 msgid "List all the partitions detected on all block devices."
12430 #: ../src/guestfs-actions.pod:3377 ../fish/guestfish-actions.pod:2334
12431 msgid "The full partition device names are returned, eg. C</dev/sda1>"
12436 #: ../src/guestfs-actions.pod:3379
12438 "This does not return logical volumes. For that you will need to call "
12444 #: ../src/guestfs-actions.pod:3390
12450 #: ../src/guestfs-actions.pod:3392
12454 " guestfs_ll (guestfs_h *g,\n"
12455 " const char *directory);\n"
12461 #: ../src/guestfs-actions.pod:3396 ../fish/guestfish-actions.pod:2345
12463 "List the files in C<directory> (relative to the root directory, there is no "
12464 "cwd) in the format of 'ls -la'."
12469 #: ../src/guestfs-actions.pod:3399 ../fish/guestfish-actions.pod:2348
12471 "This command is mostly useful for interactive sessions. It is I<not> "
12472 "intended that you try to parse the output string."
12477 #: ../src/guestfs-actions.pod:3407
12483 #: ../src/guestfs-actions.pod:3409
12487 " guestfs_ln (guestfs_h *g,\n"
12488 " const char *target,\n"
12489 " const char *linkname);\n"
12495 #: ../src/guestfs-actions.pod:3414 ../fish/guestfish-actions.pod:2355
12496 msgid "This command creates a hard link using the C<ln> command."
12501 #: ../src/guestfs-actions.pod:3420
12502 msgid "guestfs_ln_f"
12507 #: ../src/guestfs-actions.pod:3422
12511 " guestfs_ln_f (guestfs_h *g,\n"
12512 " const char *target,\n"
12513 " const char *linkname);\n"
12519 #: ../src/guestfs-actions.pod:3427 ../fish/guestfish-actions.pod:2361
12521 "This command creates a hard link using the C<ln -f> command. The C<-f> "
12522 "option removes the link (C<linkname>) if it exists already."
12527 #: ../src/guestfs-actions.pod:3434
12528 msgid "guestfs_ln_s"
12533 #: ../src/guestfs-actions.pod:3436
12537 " guestfs_ln_s (guestfs_h *g,\n"
12538 " const char *target,\n"
12539 " const char *linkname);\n"
12545 #: ../src/guestfs-actions.pod:3441 ../fish/guestfish-actions.pod:2368
12546 msgid "This command creates a symbolic link using the C<ln -s> command."
12551 #: ../src/guestfs-actions.pod:3447
12552 msgid "guestfs_ln_sf"
12557 #: ../src/guestfs-actions.pod:3449
12561 " guestfs_ln_sf (guestfs_h *g,\n"
12562 " const char *target,\n"
12563 " const char *linkname);\n"
12569 #: ../src/guestfs-actions.pod:3454 ../fish/guestfish-actions.pod:2374
12571 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
12572 "option removes the link (C<linkname>) if it exists already."
12577 #: ../src/guestfs-actions.pod:3461
12578 msgid "guestfs_lremovexattr"
12583 #: ../src/guestfs-actions.pod:3463
12587 " guestfs_lremovexattr (guestfs_h *g,\n"
12588 " const char *xattr,\n"
12589 " const char *path);\n"
12595 #: ../src/guestfs-actions.pod:3468
12597 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
12598 "link, then it removes an extended attribute of the link itself."
12603 #: ../src/guestfs-actions.pod:3476
12609 #: ../src/guestfs-actions.pod:3478
12613 " guestfs_ls (guestfs_h *g,\n"
12614 " const char *directory);\n"
12620 #: ../src/guestfs-actions.pod:3482 ../fish/guestfish-actions.pod:2389
12622 "List the files in C<directory> (relative to the root directory, there is no "
12623 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
12628 #: ../src/guestfs-actions.pod:3486
12630 "This command is mostly useful for interactive sessions. Programs should "
12631 "probably use C<guestfs_readdir> instead."
12636 #: ../src/guestfs-actions.pod:3495
12637 msgid "guestfs_lsetxattr"
12642 #: ../src/guestfs-actions.pod:3497
12646 " guestfs_lsetxattr (guestfs_h *g,\n"
12647 " const char *xattr,\n"
12648 " const char *val,\n"
12650 " const char *path);\n"
12656 #: ../src/guestfs-actions.pod:3504
12658 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
12659 "then it sets an extended attribute of the link itself."
12664 #: ../src/guestfs-actions.pod:3512
12665 msgid "guestfs_lstat"
12670 #: ../src/guestfs-actions.pod:3514
12673 " struct guestfs_stat *\n"
12674 " guestfs_lstat (guestfs_h *g,\n"
12675 " const char *path);\n"
12681 #: ../src/guestfs-actions.pod:3518 ../src/guestfs-actions.pod:6013
12682 #: ../fish/guestfish-actions.pod:2408 ../fish/guestfish-actions.pod:4021
12683 msgid "Returns file information for the given C<path>."
12688 #: ../src/guestfs-actions.pod:3520
12690 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
12691 "link, then the link is stat-ed, not the file it refers to."
12696 #: ../src/guestfs-actions.pod:3524 ../fish/guestfish-actions.pod:2414
12697 msgid "This is the same as the C<lstat(2)> system call."
12702 #: ../src/guestfs-actions.pod:3526 ../src/guestfs-actions.pod:6017
12704 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
12705 "error. I<The caller must call C<guestfs_free_stat> after use>."
12710 #: ../src/guestfs-actions.pod:3530 ../src/guestfs-actions.pod:6021
12711 #: ../src/guestfs-actions.pod:6039 ../src/guestfs-actions.pod:6420
12712 msgid "(Added in 0.9.2)"
12717 #: ../src/guestfs-actions.pod:3532
12718 msgid "guestfs_lstatlist"
12723 #: ../src/guestfs-actions.pod:3534
12726 " struct guestfs_stat_list *\n"
12727 " guestfs_lstatlist (guestfs_h *g,\n"
12728 " const char *path,\n"
12729 " char *const *names);\n"
12735 #: ../src/guestfs-actions.pod:3539
12737 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
12738 "files, where all files are in the directory C<path>. C<names> is the list "
12739 "of files from this directory."
12744 #: ../src/guestfs-actions.pod:3543 ../fish/guestfish-actions.pod:2424
12746 "On return you get a list of stat structs, with a one-to-one correspondence "
12747 "to the C<names> list. If any name did not exist or could not be lstat'd, "
12748 "then the C<ino> field of that structure is set to C<-1>."
12753 #: ../src/guestfs-actions.pod:3548
12755 "This call is intended for programs that want to efficiently list a directory "
12756 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
12757 "for a similarly efficient call for getting extended attributes. Very long "
12758 "directory listings might cause the protocol message size to be exceeded, "
12759 "causing this call to fail. The caller must split up such requests into "
12760 "smaller groups of names."
12765 #: ../src/guestfs-actions.pod:3556
12767 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
12768 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
12773 #: ../src/guestfs-actions.pod:3562
12774 msgid "guestfs_luks_add_key"
12779 #: ../src/guestfs-actions.pod:3564
12783 " guestfs_luks_add_key (guestfs_h *g,\n"
12784 " const char *device,\n"
12785 " const char *key,\n"
12786 " const char *newkey,\n"
12793 #: ../src/guestfs-actions.pod:3571 ../fish/guestfish-actions.pod:2441
12795 "This command adds a new key on LUKS device C<device>. C<key> is any "
12796 "existing key, and is used to access the device. C<newkey> is the new key to "
12797 "add. C<keyslot> is the key slot that will be replaced."
12802 #: ../src/guestfs-actions.pod:3576
12804 "Note that if C<keyslot> already contains a key, then this command will "
12805 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
12810 #: ../src/guestfs-actions.pod:3582 ../src/guestfs-actions.pod:3622
12811 #: ../src/guestfs-actions.pod:3645 ../src/guestfs-actions.pod:3665
12812 #: ../src/guestfs-actions.pod:3697 ../src/guestfs-actions.pod:3716
12814 "This function takes a key or passphrase parameter which could contain "
12815 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
12821 #: ../src/guestfs-actions.pod:3586 ../src/guestfs-actions.pod:3626
12822 #: ../src/guestfs-actions.pod:3649 ../src/guestfs-actions.pod:3669
12823 msgid "(Added in 1.5.2)"
12828 #: ../src/guestfs-actions.pod:3588
12829 msgid "guestfs_luks_close"
12834 #: ../src/guestfs-actions.pod:3590
12838 " guestfs_luks_close (guestfs_h *g,\n"
12839 " const char *device);\n"
12845 #: ../src/guestfs-actions.pod:3594
12847 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
12848 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
12849 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
12850 "underlying block device."
12855 #: ../src/guestfs-actions.pod:3602 ../src/guestfs-actions.pod:3701
12856 #: ../src/guestfs-actions.pod:3720 ../src/guestfs-actions.pod:3770
12857 #: ../src/guestfs-actions.pod:3818
12858 msgid "(Added in 1.5.1)"
12863 #: ../src/guestfs-actions.pod:3604
12864 msgid "guestfs_luks_format"
12869 #: ../src/guestfs-actions.pod:3606
12873 " guestfs_luks_format (guestfs_h *g,\n"
12874 " const char *device,\n"
12875 " const char *key,\n"
12882 #: ../src/guestfs-actions.pod:3612 ../fish/guestfish-actions.pod:2467
12884 "This command erases existing data on C<device> and formats the device as a "
12885 "LUKS encrypted device. C<key> is the initial key, which is added to key "
12886 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
12891 #: ../src/guestfs-actions.pod:3619 ../src/guestfs-actions.pod:3642
12892 #: ../src/guestfs-actions.pod:3782 ../src/guestfs-actions.pod:4710
12893 #: ../src/guestfs-actions.pod:5473 ../src/guestfs-actions.pod:5848
12894 #: ../src/guestfs-actions.pod:5871 ../src/guestfs-actions.pod:5897
12895 #: ../src/guestfs-actions.pod:7057 ../fish/guestfish-actions.pod:2475
12896 #: ../fish/guestfish-actions.pod:2488 ../fish/guestfish-actions.pod:2572
12897 #: ../fish/guestfish-actions.pod:3133 ../fish/guestfish-actions.pod:3640
12898 #: ../fish/guestfish-actions.pod:3920 ../fish/guestfish-actions.pod:3936
12899 #: ../fish/guestfish-actions.pod:3951 ../fish/guestfish-actions.pod:4666
12901 "B<This command is dangerous. Without careful use you can easily destroy all "
12907 #: ../src/guestfs-actions.pod:3628
12908 msgid "guestfs_luks_format_cipher"
12913 #: ../src/guestfs-actions.pod:3630
12917 " guestfs_luks_format_cipher (guestfs_h *g,\n"
12918 " const char *device,\n"
12919 " const char *key,\n"
12921 " const char *cipher);\n"
12927 #: ../src/guestfs-actions.pod:3637
12929 "This command is the same as C<guestfs_luks_format> but it also allows you to "
12930 "set the C<cipher> used."
12935 #: ../src/guestfs-actions.pod:3651
12936 msgid "guestfs_luks_kill_slot"
12941 #: ../src/guestfs-actions.pod:3653
12945 " guestfs_luks_kill_slot (guestfs_h *g,\n"
12946 " const char *device,\n"
12947 " const char *key,\n"
12954 #: ../src/guestfs-actions.pod:3659 ../fish/guestfish-actions.pod:2495
12956 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
12957 "device C<device>. C<key> must be one of the I<other> keys."
12962 #: ../src/guestfs-actions.pod:3671
12963 msgid "guestfs_luks_open"
12968 #: ../src/guestfs-actions.pod:3673
12972 " guestfs_luks_open (guestfs_h *g,\n"
12973 " const char *device,\n"
12974 " const char *key,\n"
12975 " const char *mapname);\n"
12981 #: ../src/guestfs-actions.pod:3679 ../fish/guestfish-actions.pod:2506
12983 "This command opens a block device which has been encrypted according to the "
12984 "Linux Unified Key Setup (LUKS) standard."
12989 #: ../src/guestfs-actions.pod:3682 ../fish/guestfish-actions.pod:2509
12990 msgid "C<device> is the encrypted block device or partition."
12995 #: ../src/guestfs-actions.pod:3684 ../fish/guestfish-actions.pod:2511
12997 "The caller must supply one of the keys associated with the LUKS block "
12998 "device, in the C<key> parameter."
13003 #: ../src/guestfs-actions.pod:3687 ../fish/guestfish-actions.pod:2514
13005 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
13006 "writes to this block device are decrypted from and encrypted to the "
13007 "underlying C<device> respectively."
13012 #: ../src/guestfs-actions.pod:3691
13014 "If this block device contains LVM volume groups, then calling "
13015 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
13021 #: ../src/guestfs-actions.pod:3703
13022 msgid "guestfs_luks_open_ro"
13027 #: ../src/guestfs-actions.pod:3705
13031 " guestfs_luks_open_ro (guestfs_h *g,\n"
13032 " const char *device,\n"
13033 " const char *key,\n"
13034 " const char *mapname);\n"
13040 #: ../src/guestfs-actions.pod:3711
13042 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
13048 #: ../src/guestfs-actions.pod:3722
13049 msgid "guestfs_lvcreate"
13054 #: ../src/guestfs-actions.pod:3724
13058 " guestfs_lvcreate (guestfs_h *g,\n"
13059 " const char *logvol,\n"
13060 " const char *volgroup,\n"
13067 #: ../src/guestfs-actions.pod:3730 ../fish/guestfish-actions.pod:2539
13069 "This creates an LVM logical volume called C<logvol> on the volume group "
13070 "C<volgroup>, with C<size> megabytes."
13075 #: ../src/guestfs-actions.pod:3737
13076 msgid "guestfs_lvm_canonical_lv_name"
13081 #: ../src/guestfs-actions.pod:3739
13085 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
13086 " const char *lvname);\n"
13092 #: ../src/guestfs-actions.pod:3743 ../fish/guestfish-actions.pod:2546
13094 "This converts alternative naming schemes for LVs that you might find to the "
13095 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
13101 #: ../src/guestfs-actions.pod:3747 ../fish/guestfish-actions.pod:2550
13103 "This command returns an error if the C<lvname> parameter does not refer to a "
13109 #: ../src/guestfs-actions.pod:3750
13110 msgid "See also C<guestfs_is_lv>."
13115 #: ../src/guestfs-actions.pod:3755
13116 msgid "(Added in 1.5.24)"
13121 #: ../src/guestfs-actions.pod:3757
13122 msgid "guestfs_lvm_clear_filter"
13127 #: ../src/guestfs-actions.pod:3759
13131 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
13137 #: ../src/guestfs-actions.pod:3762
13139 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
13140 "see every block device."
13145 #: ../src/guestfs-actions.pod:3765 ../src/guestfs-actions.pod:3807
13146 #: ../fish/guestfish-actions.pod:2562 ../fish/guestfish-actions.pod:2593
13148 "This command also clears the LVM cache and performs a volume group scan."
13153 #: ../src/guestfs-actions.pod:3772
13154 msgid "guestfs_lvm_remove_all"
13159 #: ../src/guestfs-actions.pod:3774
13163 " guestfs_lvm_remove_all (guestfs_h *g);\n"
13169 #: ../src/guestfs-actions.pod:3777 ../fish/guestfish-actions.pod:2569
13171 "This command removes all LVM logical volumes, volume groups and physical "
13177 #: ../src/guestfs-actions.pod:3787
13178 msgid "guestfs_lvm_set_filter"
13183 #: ../src/guestfs-actions.pod:3789
13187 " guestfs_lvm_set_filter (guestfs_h *g,\n"
13188 " char *const *devices);\n"
13194 #: ../src/guestfs-actions.pod:3793 ../fish/guestfish-actions.pod:2579
13196 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
13197 "block devices in the list C<devices>, and will ignore all other attached "
13203 #: ../src/guestfs-actions.pod:3797 ../fish/guestfish-actions.pod:2583
13205 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
13206 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
13207 "there are two types of duplication possible: either cloned PVs/VGs which "
13208 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
13209 "same name. In normal operation you cannot create this situation, but you "
13210 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
13211 "inside the LVM metadata."
13216 #: ../src/guestfs-actions.pod:3810 ../fish/guestfish-actions.pod:2596
13217 msgid "You can filter whole block devices or individual partitions."
13222 #: ../src/guestfs-actions.pod:3812 ../fish/guestfish-actions.pod:2598
13224 "You cannot use this if any VG is currently in use (eg. contains a mounted "
13225 "filesystem), even if you are not filtering out that VG."
13230 #: ../src/guestfs-actions.pod:3820
13231 msgid "guestfs_lvremove"
13236 #: ../src/guestfs-actions.pod:3822
13240 " guestfs_lvremove (guestfs_h *g,\n"
13241 " const char *device);\n"
13247 #: ../src/guestfs-actions.pod:3826 ../fish/guestfish-actions.pod:2606
13249 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
13250 "LV, such as C</dev/VG/LV>."
13255 #: ../src/guestfs-actions.pod:3829 ../fish/guestfish-actions.pod:2609
13257 "You can also remove all LVs in a volume group by specifying the VG name, C</"
13263 #: ../src/guestfs-actions.pod:3834 ../src/guestfs-actions.pod:5056
13264 #: ../src/guestfs-actions.pod:6796
13265 msgid "(Added in 1.0.13)"
13270 #: ../src/guestfs-actions.pod:3836
13271 msgid "guestfs_lvrename"
13276 #: ../src/guestfs-actions.pod:3838
13280 " guestfs_lvrename (guestfs_h *g,\n"
13281 " const char *logvol,\n"
13282 " const char *newlogvol);\n"
13288 #: ../src/guestfs-actions.pod:3843 ../fish/guestfish-actions.pod:2616
13289 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
13294 #: ../src/guestfs-actions.pod:3847 ../src/guestfs-actions.pod:6809
13295 msgid "(Added in 1.0.83)"
13300 #: ../src/guestfs-actions.pod:3849
13301 msgid "guestfs_lvresize"
13306 #: ../src/guestfs-actions.pod:3851
13310 " guestfs_lvresize (guestfs_h *g,\n"
13311 " const char *device,\n"
13318 #: ../src/guestfs-actions.pod:3856 ../fish/guestfish-actions.pod:2622
13320 "This resizes (expands or shrinks) an existing LVM logical volume to "
13321 "C<mbytes>. When reducing, data in the reduced part is lost."
13326 #: ../src/guestfs-actions.pod:3864
13327 msgid "guestfs_lvresize_free"
13332 #: ../src/guestfs-actions.pod:3866
13336 " guestfs_lvresize_free (guestfs_h *g,\n"
13337 " const char *lv,\n"
13344 #: ../src/guestfs-actions.pod:3871 ../fish/guestfish-actions.pod:2630
13346 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
13347 "remaining free space in the volume group. Commonly you would call this with "
13348 "pc = 100 which expands the logical volume as much as possible, using all "
13349 "remaining free space in the volume group."
13354 #: ../src/guestfs-actions.pod:3879
13355 msgid "(Added in 1.3.3)"
13360 #: ../src/guestfs-actions.pod:3881
13361 msgid "guestfs_lvs"
13366 #: ../src/guestfs-actions.pod:3883
13370 " guestfs_lvs (guestfs_h *g);\n"
13376 #: ../src/guestfs-actions.pod:3886 ../fish/guestfish-actions.pod:2640
13378 "List all the logical volumes detected. This is the equivalent of the L<lvs"
13384 #: ../src/guestfs-actions.pod:3889 ../fish/guestfish-actions.pod:2643
13386 "This returns a list of the logical volume device names (eg. C</dev/"
13387 "VolGroup00/LogVol00>)."
13392 #: ../src/guestfs-actions.pod:3892
13393 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
13398 #: ../src/guestfs-actions.pod:3900
13399 msgid "guestfs_lvs_full"
13404 #: ../src/guestfs-actions.pod:3902
13407 " struct guestfs_lvm_lv_list *\n"
13408 " guestfs_lvs_full (guestfs_h *g);\n"
13414 #: ../src/guestfs-actions.pod:3905 ../fish/guestfish-actions.pod:2652
13416 "List all the logical volumes detected. This is the equivalent of the L<lvs"
13417 "(8)> command. The \"full\" version includes all fields."
13422 #: ../src/guestfs-actions.pod:3908
13424 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
13425 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
13430 #: ../src/guestfs-actions.pod:3914
13431 msgid "guestfs_lvuuid"
13436 #: ../src/guestfs-actions.pod:3916
13440 " guestfs_lvuuid (guestfs_h *g,\n"
13441 " const char *device);\n"
13447 #: ../src/guestfs-actions.pod:3920 ../fish/guestfish-actions.pod:2659
13448 msgid "This command returns the UUID of the LVM LV C<device>."
13453 #: ../src/guestfs-actions.pod:3927
13454 msgid "guestfs_lxattrlist"
13459 #: ../src/guestfs-actions.pod:3929
13462 " struct guestfs_xattr_list *\n"
13463 " guestfs_lxattrlist (guestfs_h *g,\n"
13464 " const char *path,\n"
13465 " char *const *names);\n"
13471 #: ../src/guestfs-actions.pod:3934 ../fish/guestfish-actions.pod:2665
13473 "This call allows you to get the extended attributes of multiple files, where "
13474 "all files are in the directory C<path>. C<names> is the list of files from "
13480 #: ../src/guestfs-actions.pod:3938 ../fish/guestfish-actions.pod:2669
13482 "On return you get a flat list of xattr structs which must be interpreted "
13483 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
13484 "C<attrval> in this struct is zero-length to indicate there was an error "
13485 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
13486 "number (the number of following attributes for this file, which could be C<"
13487 "\"0\">). Then after the first xattr struct are the zero or more attributes "
13488 "for the first named file. This repeats for the second and subsequent files."
13493 #: ../src/guestfs-actions.pod:3948
13495 "This call is intended for programs that want to efficiently list a directory "
13496 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
13497 "a similarly efficient call for getting standard stats. Very long directory "
13498 "listings might cause the protocol message size to be exceeded, causing this "
13499 "call to fail. The caller must split up such requests into smaller groups of "
13505 #: ../src/guestfs-actions.pod:3962
13506 msgid "guestfs_mkdir"
13511 #: ../src/guestfs-actions.pod:3964
13515 " guestfs_mkdir (guestfs_h *g,\n"
13516 " const char *path);\n"
13522 #: ../src/guestfs-actions.pod:3968 ../fish/guestfish-actions.pod:2691
13523 msgid "Create a directory named C<path>."
13528 #: ../src/guestfs-actions.pod:3974
13529 msgid "guestfs_mkdir_mode"
13534 #: ../src/guestfs-actions.pod:3976
13538 " guestfs_mkdir_mode (guestfs_h *g,\n"
13539 " const char *path,\n"
13546 #: ../src/guestfs-actions.pod:3981 ../fish/guestfish-actions.pod:2697
13548 "This command creates a directory, setting the initial permissions of the "
13549 "directory to C<mode>."
13554 #: ../src/guestfs-actions.pod:3984 ../fish/guestfish-actions.pod:2700
13556 "For common Linux filesystems, the actual mode which is set will be C<mode & "
13557 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
13563 #: ../src/guestfs-actions.pod:3988
13564 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
13569 #: ../src/guestfs-actions.pod:3994
13570 msgid "guestfs_mkdir_p"
13575 #: ../src/guestfs-actions.pod:3996
13579 " guestfs_mkdir_p (guestfs_h *g,\n"
13580 " const char *path);\n"
13586 #: ../src/guestfs-actions.pod:4000 ../fish/guestfish-actions.pod:2710
13588 "Create a directory named C<path>, creating any parent directories as "
13589 "necessary. This is like the C<mkdir -p> shell command."
13594 #: ../src/guestfs-actions.pod:4007
13595 msgid "guestfs_mkdtemp"
13600 #: ../src/guestfs-actions.pod:4009
13604 " guestfs_mkdtemp (guestfs_h *g,\n"
13605 " const char *template);\n"
13611 #: ../src/guestfs-actions.pod:4013 ../fish/guestfish-actions.pod:2717
13613 "This command creates a temporary directory. The C<template> parameter "
13614 "should be a full pathname for the temporary directory name with the final "
13615 "six characters being \"XXXXXX\"."
13620 #: ../src/guestfs-actions.pod:4018 ../fish/guestfish-actions.pod:2722
13622 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
13623 "being suitable for Windows filesystems."
13628 #: ../src/guestfs-actions.pod:4021 ../fish/guestfish-actions.pod:2725
13629 msgid "The name of the temporary directory that was created is returned."
13634 #: ../src/guestfs-actions.pod:4024 ../fish/guestfish-actions.pod:2728
13635 msgid "The temporary directory is created with mode 0700 and is owned by root."
13640 #: ../src/guestfs-actions.pod:4027 ../fish/guestfish-actions.pod:2731
13642 "The caller is responsible for deleting the temporary directory and its "
13643 "contents after use."
13648 #: ../src/guestfs-actions.pod:4030 ../fish/guestfish-actions.pod:2734
13649 msgid "See also: L<mkdtemp(3)>"
13654 #: ../src/guestfs-actions.pod:4037
13655 msgid "guestfs_mke2fs_J"
13660 #: ../src/guestfs-actions.pod:4039
13664 " guestfs_mke2fs_J (guestfs_h *g,\n"
13665 " const char *fstype,\n"
13666 " int blocksize,\n"
13667 " const char *device,\n"
13668 " const char *journal);\n"
13674 #: ../src/guestfs-actions.pod:4046 ../fish/guestfish-actions.pod:2740
13676 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13677 "C<journal>. It is equivalent to the command:"
13682 #: ../src/guestfs-actions.pod:4050 ../fish/guestfish-actions.pod:2744
13685 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
13691 #: ../src/guestfs-actions.pod:4052
13692 msgid "See also C<guestfs_mke2journal>."
13697 #: ../src/guestfs-actions.pod:4056 ../src/guestfs-actions.pod:4074
13698 #: ../src/guestfs-actions.pod:4092 ../src/guestfs-actions.pod:4108
13699 #: ../src/guestfs-actions.pod:4122 ../src/guestfs-actions.pod:4136
13700 #: ../src/guestfs-actions.pod:4195 ../src/guestfs-actions.pod:4446
13701 msgid "(Added in 1.0.68)"
13706 #: ../src/guestfs-actions.pod:4058
13707 msgid "guestfs_mke2fs_JL"
13712 #: ../src/guestfs-actions.pod:4060
13716 " guestfs_mke2fs_JL (guestfs_h *g,\n"
13717 " const char *fstype,\n"
13718 " int blocksize,\n"
13719 " const char *device,\n"
13720 " const char *label);\n"
13726 #: ../src/guestfs-actions.pod:4067 ../fish/guestfish-actions.pod:2752
13728 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13729 "the journal labeled C<label>."
13734 #: ../src/guestfs-actions.pod:4070
13735 msgid "See also C<guestfs_mke2journal_L>."
13740 #: ../src/guestfs-actions.pod:4076
13741 msgid "guestfs_mke2fs_JU"
13746 #: ../src/guestfs-actions.pod:4078
13750 " guestfs_mke2fs_JU (guestfs_h *g,\n"
13751 " const char *fstype,\n"
13752 " int blocksize,\n"
13753 " const char *device,\n"
13754 " const char *uuid);\n"
13760 #: ../src/guestfs-actions.pod:4085 ../fish/guestfish-actions.pod:2761
13762 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13763 "the journal with UUID C<uuid>."
13768 #: ../src/guestfs-actions.pod:4088
13769 msgid "See also C<guestfs_mke2journal_U>."
13774 #: ../src/guestfs-actions.pod:4094
13775 msgid "guestfs_mke2journal"
13780 #: ../src/guestfs-actions.pod:4096
13784 " guestfs_mke2journal (guestfs_h *g,\n"
13785 " int blocksize,\n"
13786 " const char *device);\n"
13792 #: ../src/guestfs-actions.pod:4101 ../fish/guestfish-actions.pod:2770
13794 "This creates an ext2 external journal on C<device>. It is equivalent to the "
13800 #: ../src/guestfs-actions.pod:4104 ../fish/guestfish-actions.pod:2773
13803 " mke2fs -O journal_dev -b blocksize device\n"
13809 #: ../src/guestfs-actions.pod:4110
13810 msgid "guestfs_mke2journal_L"
13815 #: ../src/guestfs-actions.pod:4112
13819 " guestfs_mke2journal_L (guestfs_h *g,\n"
13820 " int blocksize,\n"
13821 " const char *label,\n"
13822 " const char *device);\n"
13828 #: ../src/guestfs-actions.pod:4118 ../fish/guestfish-actions.pod:2779
13829 msgid "This creates an ext2 external journal on C<device> with label C<label>."
13834 #: ../src/guestfs-actions.pod:4124
13835 msgid "guestfs_mke2journal_U"
13840 #: ../src/guestfs-actions.pod:4126
13844 " guestfs_mke2journal_U (guestfs_h *g,\n"
13845 " int blocksize,\n"
13846 " const char *uuid,\n"
13847 " const char *device);\n"
13853 #: ../src/guestfs-actions.pod:4132 ../fish/guestfish-actions.pod:2785
13854 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
13859 #: ../src/guestfs-actions.pod:4138
13860 msgid "guestfs_mkfifo"
13865 #: ../src/guestfs-actions.pod:4140
13869 " guestfs_mkfifo (guestfs_h *g,\n"
13871 " const char *path);\n"
13877 #: ../src/guestfs-actions.pod:4145
13879 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
13880 "is just a convenient wrapper around C<guestfs_mknod>."
13885 #: ../src/guestfs-actions.pod:4155
13886 msgid "guestfs_mkfs"
13891 #: ../src/guestfs-actions.pod:4157
13895 " guestfs_mkfs (guestfs_h *g,\n"
13896 " const char *fstype,\n"
13897 " const char *device);\n"
13903 #: ../src/guestfs-actions.pod:4162 ../fish/guestfish-actions.pod:2801
13905 "This creates a filesystem on C<device> (usually a partition or LVM logical "
13906 "volume). The filesystem type is C<fstype>, for example C<ext3>."
13911 #: ../src/guestfs-actions.pod:4170
13912 msgid "guestfs_mkfs_b"
13917 #: ../src/guestfs-actions.pod:4172
13921 " guestfs_mkfs_b (guestfs_h *g,\n"
13922 " const char *fstype,\n"
13923 " int blocksize,\n"
13924 " const char *device);\n"
13930 #: ../src/guestfs-actions.pod:4178
13932 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
13933 "block size of the resulting filesystem. Supported block sizes depend on the "
13934 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
13939 #: ../src/guestfs-actions.pod:4183 ../src/guestfs-actions.pod:4225
13940 #: ../fish/guestfish-actions.pod:2814 ../fish/guestfish-actions.pod:2841
13942 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
13948 #: ../src/guestfs-actions.pod:4188 ../fish/guestfish-actions.pod:2817
13950 "This function is deprecated. In new code, use the C<mkfs_opts> call instead."
13955 #: ../src/guestfs-actions.pod:4197
13956 msgid "guestfs_mkfs_opts"
13961 #: ../src/guestfs-actions.pod:4199
13965 " guestfs_mkfs_opts (guestfs_h *g,\n"
13966 " const char *fstype,\n"
13967 " const char *device,\n"
13974 #: ../src/guestfs-actions.pod:4210
13977 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
13983 #: ../src/guestfs-actions.pod:4212 ../fish/guestfish-actions.pod:2828
13985 "This function creates a filesystem on C<device>. The filesystem type is "
13986 "C<fstype>, for example C<ext3>."
13991 #: ../src/guestfs-actions.pod:4219 ../fish/guestfish-actions.pod:2835
13992 msgid "C<blocksize>"
13997 #: ../src/guestfs-actions.pod:4221 ../fish/guestfish-actions.pod:2837
13999 "The filesystem block size. Supported block sizes depend on the filesystem "
14000 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
14005 #: ../src/guestfs-actions.pod:4232
14006 msgid "(Added in 1.7.19)"
14011 #: ../src/guestfs-actions.pod:4234
14012 msgid "guestfs_mkfs_opts_va"
14017 #: ../src/guestfs-actions.pod:4236
14021 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
14022 " const char *fstype,\n"
14023 " const char *device,\n"
14024 " va_list args);\n"
14030 #: ../src/guestfs-actions.pod:4242
14031 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
14036 #: ../src/guestfs-actions.pod:4246
14037 msgid "guestfs_mkfs_opts_argv"
14042 #: ../src/guestfs-actions.pod:4248
14046 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
14047 " const char *fstype,\n"
14048 " const char *device,\n"
14049 " const struct guestfs_mkfs_opts_argv *optargs);\n"
14055 #: ../src/guestfs-actions.pod:4254
14056 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
14061 #: ../src/guestfs-actions.pod:4258
14062 msgid "guestfs_mkmountpoint"
14067 #: ../src/guestfs-actions.pod:4260
14071 " guestfs_mkmountpoint (guestfs_h *g,\n"
14072 " const char *exemptpath);\n"
14078 #: ../src/guestfs-actions.pod:4264
14080 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
14081 "that can be used to create extra mountpoints before mounting the first "
14087 #: ../src/guestfs-actions.pod:4268 ../fish/guestfish-actions.pod:2856
14089 "These calls are I<only> necessary in some very limited circumstances, mainly "
14090 "the case where you want to mount a mix of unrelated and/or read-only "
14091 "filesystems together."
14096 #: ../src/guestfs-actions.pod:4272 ../fish/guestfish-actions.pod:2860
14098 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
14099 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
14100 "inside that. You can unpack this as follows in guestfish:"
14105 #: ../src/guestfs-actions.pod:4277 ../fish/guestfish-actions.pod:2865
14108 " add-ro Fedora-11-i686-Live.iso\n"
14110 " mkmountpoint /cd\n"
14111 " mkmountpoint /sqsh\n"
14112 " mkmountpoint /ext3fs\n"
14113 " mount /dev/sda /cd\n"
14114 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
14115 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
14121 #: ../src/guestfs-actions.pod:4286 ../fish/guestfish-actions.pod:2874
14122 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
14127 #: ../src/guestfs-actions.pod:4288
14129 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
14130 "may get unexpected errors if you try to mix these calls. It is safest to "
14131 "manually unmount filesystems and remove mountpoints after use."
14136 #: ../src/guestfs-actions.pod:4292
14138 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
14139 "first, so for this to work for manual mountpoints, you must ensure that the "
14140 "innermost mountpoints have the longest pathnames, as in the example code "
14146 #: ../src/guestfs-actions.pod:4297 ../fish/guestfish-actions.pod:2885
14148 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
14153 #: ../src/guestfs-actions.pod:4299
14155 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
14156 "means that C<guestfs_umount_all> is called when the handle is closed which "
14157 "can also trigger these issues."
14162 #: ../src/guestfs-actions.pod:4305 ../src/guestfs-actions.pod:4564
14163 #: ../src/guestfs-actions.pod:5457
14164 msgid "(Added in 1.0.62)"
14169 #: ../src/guestfs-actions.pod:4307
14170 msgid "guestfs_mknod"
14175 #: ../src/guestfs-actions.pod:4309
14179 " guestfs_mknod (guestfs_h *g,\n"
14183 " const char *path);\n"
14189 #: ../src/guestfs-actions.pod:4316 ../fish/guestfish-actions.pod:2895
14191 "This call creates block or character special devices, or named pipes (FIFOs)."
14196 #: ../src/guestfs-actions.pod:4319 ../fish/guestfish-actions.pod:2898
14198 "The C<mode> parameter should be the mode, using the standard constants. "
14199 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
14200 "used when creating block and character special devices."
14205 #: ../src/guestfs-actions.pod:4324
14207 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
14208 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
14209 "regular file). These constants are available in the standard Linux header "
14210 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
14211 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
14212 "the appropriate constant for you."
14217 #: ../src/guestfs-actions.pod:4338
14218 msgid "guestfs_mknod_b"
14223 #: ../src/guestfs-actions.pod:4340
14227 " guestfs_mknod_b (guestfs_h *g,\n"
14231 " const char *path);\n"
14237 #: ../src/guestfs-actions.pod:4347
14239 "This call creates a block device node called C<path> with mode C<mode> and "
14240 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
14241 "wrapper around C<guestfs_mknod>."
14246 #: ../src/guestfs-actions.pod:4357
14247 msgid "guestfs_mknod_c"
14252 #: ../src/guestfs-actions.pod:4359
14256 " guestfs_mknod_c (guestfs_h *g,\n"
14260 " const char *path);\n"
14266 #: ../src/guestfs-actions.pod:4366
14268 "This call creates a char device node called C<path> with mode C<mode> and "
14269 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
14270 "wrapper around C<guestfs_mknod>."
14275 #: ../src/guestfs-actions.pod:4376
14276 msgid "guestfs_mkswap"
14281 #: ../src/guestfs-actions.pod:4378
14285 " guestfs_mkswap (guestfs_h *g,\n"
14286 " const char *device);\n"
14292 #: ../src/guestfs-actions.pod:4382 ../fish/guestfish-actions.pod:2937
14293 msgid "Create a swap partition on C<device>."
14298 #: ../src/guestfs-actions.pod:4388
14299 msgid "guestfs_mkswap_L"
14304 #: ../src/guestfs-actions.pod:4390
14308 " guestfs_mkswap_L (guestfs_h *g,\n"
14309 " const char *label,\n"
14310 " const char *device);\n"
14316 #: ../src/guestfs-actions.pod:4395 ../fish/guestfish-actions.pod:2943
14317 msgid "Create a swap partition on C<device> with label C<label>."
14322 #: ../src/guestfs-actions.pod:4397 ../fish/guestfish-actions.pod:2945
14324 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
14325 "sda>), just to a partition. This appears to be a limitation of the kernel "
14331 #: ../src/guestfs-actions.pod:4405
14332 msgid "guestfs_mkswap_U"
14337 #: ../src/guestfs-actions.pod:4407
14341 " guestfs_mkswap_U (guestfs_h *g,\n"
14342 " const char *uuid,\n"
14343 " const char *device);\n"
14349 #: ../src/guestfs-actions.pod:4412 ../fish/guestfish-actions.pod:2953
14350 msgid "Create a swap partition on C<device> with UUID C<uuid>."
14355 #: ../src/guestfs-actions.pod:4418
14356 msgid "guestfs_mkswap_file"
14361 #: ../src/guestfs-actions.pod:4420
14365 " guestfs_mkswap_file (guestfs_h *g,\n"
14366 " const char *path);\n"
14372 #: ../src/guestfs-actions.pod:4424 ../fish/guestfish-actions.pod:2959
14373 msgid "Create a swap file."
14378 #: ../src/guestfs-actions.pod:4426
14380 "This command just writes a swap file signature to an existing file. To "
14381 "create the file itself, use something like C<guestfs_fallocate>."
14386 #: ../src/guestfs-actions.pod:4433
14387 msgid "guestfs_modprobe"
14392 #: ../src/guestfs-actions.pod:4435
14396 " guestfs_modprobe (guestfs_h *g,\n"
14397 " const char *modulename);\n"
14403 #: ../src/guestfs-actions.pod:4439 ../fish/guestfish-actions.pod:2968
14404 msgid "This loads a kernel module in the appliance."
14409 #: ../src/guestfs-actions.pod:4441 ../fish/guestfish-actions.pod:2970
14411 "The kernel module must have been whitelisted when libguestfs was built (see "
14412 "C<appliance/kmod.whitelist.in> in the source)."
14417 #: ../src/guestfs-actions.pod:4448
14418 msgid "guestfs_mount"
14423 #: ../src/guestfs-actions.pod:4450
14427 " guestfs_mount (guestfs_h *g,\n"
14428 " const char *device,\n"
14429 " const char *mountpoint);\n"
14435 #: ../src/guestfs-actions.pod:4455 ../fish/guestfish-actions.pod:2977
14437 "Mount a guest disk at a position in the filesystem. Block devices are named "
14438 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
14439 "those block devices contain partitions, they will have the usual names (eg. "
14440 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
14445 #: ../src/guestfs-actions.pod:4461 ../fish/guestfish-actions.pod:2983
14447 "The rules are the same as for L<mount(2)>: A filesystem must first be "
14448 "mounted on C</> before others can be mounted. Other filesystems can only be "
14449 "mounted on directories which already exist."
14454 #: ../src/guestfs-actions.pod:4466 ../fish/guestfish-actions.pod:2988
14456 "The mounted filesystem is writable, if we have sufficient permissions on the "
14457 "underlying device."
14462 #: ../src/guestfs-actions.pod:4469
14464 "B<Important note:> When you use this call, the filesystem options C<sync> "
14465 "and C<noatime> are set implicitly. This was originally done because we "
14466 "thought it would improve reliability, but it turns out that I<-o sync> has a "
14467 "very large negative performance impact and negligible effect on "
14468 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
14469 "in any code that needs performance, and instead use C<guestfs_mount_options> "
14470 "(use an empty string for the first parameter if you don't want any options)."
14475 #: ../src/guestfs-actions.pod:4483
14476 msgid "guestfs_mount_loop"
14481 #: ../src/guestfs-actions.pod:4485
14485 " guestfs_mount_loop (guestfs_h *g,\n"
14486 " const char *file,\n"
14487 " const char *mountpoint);\n"
14493 #: ../src/guestfs-actions.pod:4490 ../fish/guestfish-actions.pod:3005
14495 "This command lets you mount C<file> (a filesystem image in a file) on a "
14496 "mount point. It is entirely equivalent to the command C<mount -o loop file "
14502 #: ../src/guestfs-actions.pod:4498
14503 msgid "guestfs_mount_options"
14508 #: ../src/guestfs-actions.pod:4500
14512 " guestfs_mount_options (guestfs_h *g,\n"
14513 " const char *options,\n"
14514 " const char *device,\n"
14515 " const char *mountpoint);\n"
14521 #: ../src/guestfs-actions.pod:4506
14523 "This is the same as the C<guestfs_mount> command, but it allows you to set "
14524 "the mount options as for the L<mount(8)> I<-o> flag."
14529 #: ../src/guestfs-actions.pod:4510 ../fish/guestfish-actions.pod:3017
14531 "If the C<options> parameter is an empty string, then no options are passed "
14532 "(all options default to whatever the filesystem uses)."
14537 #: ../src/guestfs-actions.pod:4516 ../src/guestfs-actions.pod:4530
14538 #: ../src/guestfs-actions.pod:4547
14539 msgid "(Added in 1.0.10)"
14544 #: ../src/guestfs-actions.pod:4518
14545 msgid "guestfs_mount_ro"
14550 #: ../src/guestfs-actions.pod:4520
14554 " guestfs_mount_ro (guestfs_h *g,\n"
14555 " const char *device,\n"
14556 " const char *mountpoint);\n"
14562 #: ../src/guestfs-actions.pod:4525
14564 "This is the same as the C<guestfs_mount> command, but it mounts the "
14565 "filesystem with the read-only (I<-o ro>) flag."
14570 #: ../src/guestfs-actions.pod:4532
14571 msgid "guestfs_mount_vfs"
14576 #: ../src/guestfs-actions.pod:4534
14580 " guestfs_mount_vfs (guestfs_h *g,\n"
14581 " const char *options,\n"
14582 " const char *vfstype,\n"
14583 " const char *device,\n"
14584 " const char *mountpoint);\n"
14590 #: ../src/guestfs-actions.pod:4541
14592 "This is the same as the C<guestfs_mount> command, but it allows you to set "
14593 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
14599 #: ../src/guestfs-actions.pod:4549
14600 msgid "guestfs_mountpoints"
14605 #: ../src/guestfs-actions.pod:4551
14609 " guestfs_mountpoints (guestfs_h *g);\n"
14615 #: ../src/guestfs-actions.pod:4554
14617 "This call is similar to C<guestfs_mounts>. That call returns a list of "
14618 "devices. This one returns a hash table (map) of device name to directory "
14619 "where the device is mounted."
14624 #: ../src/guestfs-actions.pod:4566
14625 msgid "guestfs_mounts"
14630 #: ../src/guestfs-actions.pod:4568
14634 " guestfs_mounts (guestfs_h *g);\n"
14640 #: ../src/guestfs-actions.pod:4571 ../fish/guestfish-actions.pod:3048
14642 "This returns the list of currently mounted filesystems. It returns the list "
14643 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
14648 #: ../src/guestfs-actions.pod:4574 ../fish/guestfish-actions.pod:3051
14649 msgid "Some internal mounts are not shown."
14654 #: ../src/guestfs-actions.pod:4576
14655 msgid "See also: C<guestfs_mountpoints>"
14660 #: ../src/guestfs-actions.pod:4584
14666 #: ../src/guestfs-actions.pod:4586
14670 " guestfs_mv (guestfs_h *g,\n"
14671 " const char *src,\n"
14672 " const char *dest);\n"
14678 #: ../src/guestfs-actions.pod:4591 ../fish/guestfish-actions.pod:3059
14680 "This moves a file from C<src> to C<dest> where C<dest> is either a "
14681 "destination filename or destination directory."
14686 #: ../src/guestfs-actions.pod:4598
14687 msgid "guestfs_ntfs_3g_probe"
14692 #: ../src/guestfs-actions.pod:4600
14696 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
14698 " const char *device);\n"
14704 #: ../src/guestfs-actions.pod:4605 ../fish/guestfish-actions.pod:3066
14706 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
14707 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
14708 "write, and some cannot be mounted at all)."
14713 #: ../src/guestfs-actions.pod:4609 ../fish/guestfish-actions.pod:3070
14715 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
14716 "can be mounted read-write. Set it to false if you want to test if the "
14717 "volume can be mounted read-only."
14722 #: ../src/guestfs-actions.pod:4613 ../fish/guestfish-actions.pod:3074
14724 "The return value is an integer which C<0> if the operation would succeed, or "
14725 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
14730 #: ../src/guestfs-actions.pod:4619
14731 msgid "(Added in 1.0.43)"
14736 #: ../src/guestfs-actions.pod:4621
14737 msgid "guestfs_ntfsresize"
14742 #: ../src/guestfs-actions.pod:4623
14746 " guestfs_ntfsresize (guestfs_h *g,\n"
14747 " const char *device);\n"
14753 #: ../src/guestfs-actions.pod:4627 ../fish/guestfish-actions.pod:3082
14755 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
14756 "size of the underlying device. See also L<ntfsresize(8)>."
14761 #: ../src/guestfs-actions.pod:4635
14762 msgid "guestfs_ntfsresize_size"
14767 #: ../src/guestfs-actions.pod:4637
14771 " guestfs_ntfsresize_size (guestfs_h *g,\n"
14772 " const char *device,\n"
14773 " int64_t size);\n"
14779 #: ../src/guestfs-actions.pod:4642
14781 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
14782 "to specify the new size (in bytes) explicitly."
14787 #: ../src/guestfs-actions.pod:4647 ../src/guestfs-actions.pod:5083
14788 #: ../src/guestfs-actions.pod:5156 ../src/guestfs-actions.pod:5405
14789 #: ../src/guestfs-actions.pod:6944
14790 msgid "(Added in 1.3.14)"
14795 #: ../src/guestfs-actions.pod:4649
14796 msgid "guestfs_part_add"
14801 #: ../src/guestfs-actions.pod:4651
14805 " guestfs_part_add (guestfs_h *g,\n"
14806 " const char *device,\n"
14807 " const char *prlogex,\n"
14808 " int64_t startsect,\n"
14809 " int64_t endsect);\n"
14815 #: ../src/guestfs-actions.pod:4658
14817 "This command adds a partition to C<device>. If there is no partition table "
14818 "on the device, call C<guestfs_part_init> first."
14823 #: ../src/guestfs-actions.pod:4661 ../fish/guestfish-actions.pod:3100
14825 "The C<prlogex> parameter is the type of partition. Normally you should pass "
14826 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
14827 "C<logical>) and C<e> (or C<extended>) partition types."
14832 #: ../src/guestfs-actions.pod:4666 ../fish/guestfish-actions.pod:3105
14834 "C<startsect> and C<endsect> are the start and end of the partition in "
14835 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
14836 "from the end of the disk (C<-1> is the last sector)."
14841 #: ../src/guestfs-actions.pod:4670
14843 "Creating a partition which covers the whole disk is not so easy. Use "
14844 "C<guestfs_part_disk> to do that."
14849 #: ../src/guestfs-actions.pod:4675 ../src/guestfs-actions.pod:4713
14850 #: ../src/guestfs-actions.pod:4766 ../src/guestfs-actions.pod:4844
14851 #: ../src/guestfs-actions.pod:4882 ../src/guestfs-actions.pod:4901
14852 #: ../src/guestfs-actions.pod:4941
14853 msgid "(Added in 1.0.78)"
14858 #: ../src/guestfs-actions.pod:4677
14859 msgid "guestfs_part_del"
14864 #: ../src/guestfs-actions.pod:4679
14868 " guestfs_part_del (guestfs_h *g,\n"
14869 " const char *device,\n"
14876 #: ../src/guestfs-actions.pod:4684 ../fish/guestfish-actions.pod:3116
14877 msgid "This command deletes the partition numbered C<partnum> on C<device>."
14882 #: ../src/guestfs-actions.pod:4686 ../fish/guestfish-actions.pod:3118
14884 "Note that in the case of MBR partitioning, deleting an extended partition "
14885 "also deletes any logical partitions it contains."
14890 #: ../src/guestfs-actions.pod:4694
14891 msgid "guestfs_part_disk"
14896 #: ../src/guestfs-actions.pod:4696
14900 " guestfs_part_disk (guestfs_h *g,\n"
14901 " const char *device,\n"
14902 " const char *parttype);\n"
14908 #: ../src/guestfs-actions.pod:4701
14910 "This command is simply a combination of C<guestfs_part_init> followed by "
14911 "C<guestfs_part_add> to create a single primary partition covering the whole "
14917 #: ../src/guestfs-actions.pod:4705
14919 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
14920 "possible values are described in C<guestfs_part_init>."
14925 #: ../src/guestfs-actions.pod:4715
14926 msgid "guestfs_part_get_bootable"
14931 #: ../src/guestfs-actions.pod:4717
14935 " guestfs_part_get_bootable (guestfs_h *g,\n"
14936 " const char *device,\n"
14943 #: ../src/guestfs-actions.pod:4722 ../fish/guestfish-actions.pod:3140
14945 "This command returns true if the partition C<partnum> on C<device> has the "
14946 "bootable flag set."
14951 #: ../src/guestfs-actions.pod:4725
14952 msgid "See also C<guestfs_part_set_bootable>."
14957 #: ../src/guestfs-actions.pod:4731
14958 msgid "guestfs_part_get_mbr_id"
14963 #: ../src/guestfs-actions.pod:4733
14967 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
14968 " const char *device,\n"
14975 #: ../src/guestfs-actions.pod:4738 ../fish/guestfish-actions.pod:3149
14977 "Returns the MBR type byte (also known as the ID byte) from the numbered "
14978 "partition C<partnum>."
14983 #: ../src/guestfs-actions.pod:4741 ../src/guestfs-actions.pod:4917
14985 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
14986 "undefined results for other partition table types (see "
14987 "C<guestfs_part_get_parttype>)."
14992 #: ../src/guestfs-actions.pod:4749
14993 msgid "guestfs_part_get_parttype"
14998 #: ../src/guestfs-actions.pod:4751
15002 " guestfs_part_get_parttype (guestfs_h *g,\n"
15003 " const char *device);\n"
15009 #: ../src/guestfs-actions.pod:4755 ../fish/guestfish-actions.pod:3160
15011 "This command examines the partition table on C<device> and returns the "
15012 "partition table type (format) being used."
15017 #: ../src/guestfs-actions.pod:4758
15019 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
15020 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
15021 "possible, although unusual. See C<guestfs_part_init> for a full list."
15026 #: ../src/guestfs-actions.pod:4768
15027 msgid "guestfs_part_init"
15032 #: ../src/guestfs-actions.pod:4770
15036 " guestfs_part_init (guestfs_h *g,\n"
15037 " const char *device,\n"
15038 " const char *parttype);\n"
15044 #: ../src/guestfs-actions.pod:4775 ../fish/guestfish-actions.pod:3172
15046 "This creates an empty partition table on C<device> of one of the partition "
15047 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
15048 "(for large disks)."
15053 #: ../src/guestfs-actions.pod:4779
15055 "Initially there are no partitions. Following this, you should call "
15056 "C<guestfs_part_add> for each partition required."
15061 #: ../src/guestfs-actions.pod:4782 ../fish/guestfish-actions.pod:3179
15062 msgid "Possible values for C<parttype> are:"
15067 #: ../src/guestfs-actions.pod:4786 ../fish/guestfish-actions.pod:3183
15068 msgid "B<efi> | B<gpt>"
15073 #: ../src/guestfs-actions.pod:4788 ../fish/guestfish-actions.pod:3185
15074 msgid "Intel EFI / GPT partition table."
15079 #: ../src/guestfs-actions.pod:4790 ../fish/guestfish-actions.pod:3187
15081 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
15082 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
15083 "the C<mbr> format."
15088 #: ../src/guestfs-actions.pod:4794 ../fish/guestfish-actions.pod:3191
15089 msgid "B<mbr> | B<msdos>"
15094 #: ../src/guestfs-actions.pod:4796 ../fish/guestfish-actions.pod:3193
15096 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
15097 "Windows. This partition type will B<only> work for device sizes up to 2 "
15098 "TB. For large disks we recommend using C<gpt>."
15103 #: ../src/guestfs-actions.pod:4803 ../fish/guestfish-actions.pod:3200
15105 "Other partition table types that may work but are not supported include:"
15110 #: ../src/guestfs-actions.pod:4808 ../fish/guestfish-actions.pod:3205
15116 #: ../src/guestfs-actions.pod:4810 ../fish/guestfish-actions.pod:3207
15117 msgid "AIX disk labels."
15122 #: ../src/guestfs-actions.pod:4812 ../fish/guestfish-actions.pod:3209
15123 msgid "B<amiga> | B<rdb>"
15128 #: ../src/guestfs-actions.pod:4814 ../fish/guestfish-actions.pod:3211
15129 msgid "Amiga \"Rigid Disk Block\" format."
15134 #: ../src/guestfs-actions.pod:4816 ../fish/guestfish-actions.pod:3213
15140 #: ../src/guestfs-actions.pod:4818 ../fish/guestfish-actions.pod:3215
15141 msgid "BSD disk labels."
15146 #: ../src/guestfs-actions.pod:4820 ../fish/guestfish-actions.pod:3217
15152 #: ../src/guestfs-actions.pod:4822 ../fish/guestfish-actions.pod:3219
15153 msgid "DASD, used on IBM mainframes."
15158 #: ../src/guestfs-actions.pod:4824 ../fish/guestfish-actions.pod:3221
15164 #: ../src/guestfs-actions.pod:4826 ../fish/guestfish-actions.pod:3223
15165 msgid "MIPS/SGI volumes."
15170 #: ../src/guestfs-actions.pod:4828 ../fish/guestfish-actions.pod:3225
15176 #: ../src/guestfs-actions.pod:4830 ../fish/guestfish-actions.pod:3227
15177 msgid "Old Mac partition format. Modern Macs use C<gpt>."
15182 #: ../src/guestfs-actions.pod:4832 ../fish/guestfish-actions.pod:3229
15188 #: ../src/guestfs-actions.pod:4834 ../fish/guestfish-actions.pod:3231
15189 msgid "NEC PC-98 format, common in Japan apparently."
15194 #: ../src/guestfs-actions.pod:4836 ../fish/guestfish-actions.pod:3233
15200 #: ../src/guestfs-actions.pod:4838 ../fish/guestfish-actions.pod:3235
15201 msgid "Sun disk labels."
15206 #: ../src/guestfs-actions.pod:4846
15207 msgid "guestfs_part_list"
15212 #: ../src/guestfs-actions.pod:4848
15215 " struct guestfs_partition_list *\n"
15216 " guestfs_part_list (guestfs_h *g,\n"
15217 " const char *device);\n"
15223 #: ../src/guestfs-actions.pod:4852 ../fish/guestfish-actions.pod:3243
15225 "This command parses the partition table on C<device> and returns the list of "
15226 "partitions found."
15231 #: ../src/guestfs-actions.pod:4855 ../fish/guestfish-actions.pod:3246
15232 msgid "The fields in the returned structure are:"
15237 #: ../src/guestfs-actions.pod:4859 ../fish/guestfish-actions.pod:3250
15238 msgid "B<part_num>"
15243 #: ../src/guestfs-actions.pod:4861 ../fish/guestfish-actions.pod:3252
15244 msgid "Partition number, counting from 1."
15249 #: ../src/guestfs-actions.pod:4863 ../fish/guestfish-actions.pod:3254
15250 msgid "B<part_start>"
15255 #: ../src/guestfs-actions.pod:4865
15257 "Start of the partition I<in bytes>. To get sectors you have to divide by "
15258 "the device's sector size, see C<guestfs_blockdev_getss>."
15263 #: ../src/guestfs-actions.pod:4868 ../fish/guestfish-actions.pod:3259
15264 msgid "B<part_end>"
15269 #: ../src/guestfs-actions.pod:4870 ../fish/guestfish-actions.pod:3261
15270 msgid "End of the partition in bytes."
15275 #: ../src/guestfs-actions.pod:4872 ../fish/guestfish-actions.pod:3263
15276 msgid "B<part_size>"
15281 #: ../src/guestfs-actions.pod:4874 ../fish/guestfish-actions.pod:3265
15282 msgid "Size of the partition in bytes."
15287 #: ../src/guestfs-actions.pod:4878
15289 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
15290 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
15296 #: ../src/guestfs-actions.pod:4884
15297 msgid "guestfs_part_set_bootable"
15302 #: ../src/guestfs-actions.pod:4886
15306 " guestfs_part_set_bootable (guestfs_h *g,\n"
15307 " const char *device,\n"
15309 " int bootable);\n"
15315 #: ../src/guestfs-actions.pod:4892 ../fish/guestfish-actions.pod:3273
15317 "This sets the bootable flag on partition numbered C<partnum> on device "
15318 "C<device>. Note that partitions are numbered from 1."
15323 #: ../src/guestfs-actions.pod:4895 ../fish/guestfish-actions.pod:3276
15325 "The bootable flag is used by some operating systems (notably Windows) to "
15326 "determine which partition to boot from. It is by no means universally "
15332 #: ../src/guestfs-actions.pod:4903
15333 msgid "guestfs_part_set_mbr_id"
15338 #: ../src/guestfs-actions.pod:4905
15342 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
15343 " const char *device,\n"
15351 #: ../src/guestfs-actions.pod:4911 ../fish/guestfish-actions.pod:3284
15353 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
15354 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
15355 "documentation are in fact hexadecimal numbers, but usually documented "
15356 "without any leading \"0x\" which might be confusing."
15361 #: ../src/guestfs-actions.pod:4925
15362 msgid "guestfs_part_set_name"
15367 #: ../src/guestfs-actions.pod:4927
15371 " guestfs_part_set_name (guestfs_h *g,\n"
15372 " const char *device,\n"
15374 " const char *name);\n"
15380 #: ../src/guestfs-actions.pod:4933 ../fish/guestfish-actions.pod:3298
15382 "This sets the partition name on partition numbered C<partnum> on device "
15383 "C<device>. Note that partitions are numbered from 1."
15388 #: ../src/guestfs-actions.pod:4936 ../fish/guestfish-actions.pod:3301
15390 "The partition name can only be set on certain types of partition table. "
15391 "This works on C<gpt> but not on C<mbr> partitions."
15396 #: ../src/guestfs-actions.pod:4943
15397 msgid "guestfs_part_to_dev"
15402 #: ../src/guestfs-actions.pod:4945
15406 " guestfs_part_to_dev (guestfs_h *g,\n"
15407 " const char *partition);\n"
15413 #: ../src/guestfs-actions.pod:4949 ../fish/guestfish-actions.pod:3308
15415 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
15416 "partition number, returning the device name (eg. \"/dev/sdb\")."
15421 #: ../src/guestfs-actions.pod:4953
15423 "The named partition must exist, for example as a string returned from "
15424 "C<guestfs_list_partitions>."
15429 #: ../src/guestfs-actions.pod:4961
15430 msgid "guestfs_ping_daemon"
15435 #: ../src/guestfs-actions.pod:4963
15439 " guestfs_ping_daemon (guestfs_h *g);\n"
15445 #: ../src/guestfs-actions.pod:4966 ../fish/guestfish-actions.pod:3319
15447 "This is a test probe into the guestfs daemon running inside the qemu "
15448 "subprocess. Calling this function checks that the daemon responds to the "
15449 "ping message, without affecting the daemon or attached block device(s) in "
15455 #: ../src/guestfs-actions.pod:4975
15456 msgid "guestfs_pread"
15461 #: ../src/guestfs-actions.pod:4977
15465 " guestfs_pread (guestfs_h *g,\n"
15466 " const char *path,\n"
15468 " int64_t offset,\n"
15469 " size_t *size_r);\n"
15475 #: ../src/guestfs-actions.pod:4984 ../fish/guestfish-actions.pod:3328
15477 "This command lets you read part of a file. It reads C<count> bytes of the "
15478 "file, starting at C<offset>, from file C<path>."
15483 #: ../src/guestfs-actions.pod:4987 ../src/guestfs-actions.pod:5013
15484 #: ../fish/guestfish-actions.pod:3331 ../fish/guestfish-actions.pod:3346
15486 "This may read fewer bytes than requested. For further details see the "
15487 "L<pread(2)> system call."
15492 #: ../src/guestfs-actions.pod:4990
15493 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
15498 #: ../src/guestfs-actions.pod:5001
15499 msgid "guestfs_pread_device"
15504 #: ../src/guestfs-actions.pod:5003
15508 " guestfs_pread_device (guestfs_h *g,\n"
15509 " const char *device,\n"
15511 " int64_t offset,\n"
15512 " size_t *size_r);\n"
15518 #: ../src/guestfs-actions.pod:5010 ../fish/guestfish-actions.pod:3343
15520 "This command lets you read part of a file. It reads C<count> bytes of "
15521 "C<device>, starting at C<offset>."
15526 #: ../src/guestfs-actions.pod:5016
15527 msgid "See also C<guestfs_pread>."
15532 #: ../src/guestfs-actions.pod:5025
15533 msgid "(Added in 1.5.21)"
15538 #: ../src/guestfs-actions.pod:5027
15539 msgid "guestfs_pvcreate"
15544 #: ../src/guestfs-actions.pod:5029
15548 " guestfs_pvcreate (guestfs_h *g,\n"
15549 " const char *device);\n"
15555 #: ../src/guestfs-actions.pod:5033 ../fish/guestfish-actions.pod:3358
15557 "This creates an LVM physical volume on the named C<device>, where C<device> "
15558 "should usually be a partition name such as C</dev/sda1>."
15563 #: ../src/guestfs-actions.pod:5041
15564 msgid "guestfs_pvremove"
15569 #: ../src/guestfs-actions.pod:5043
15573 " guestfs_pvremove (guestfs_h *g,\n"
15574 " const char *device);\n"
15580 #: ../src/guestfs-actions.pod:5047 ../fish/guestfish-actions.pod:3366
15582 "This wipes a physical volume C<device> so that LVM will no longer recognise "
15588 #: ../src/guestfs-actions.pod:5050 ../fish/guestfish-actions.pod:3369
15590 "The implementation uses the C<pvremove> command which refuses to wipe "
15591 "physical volumes that contain any volume groups, so you have to remove those "
15597 #: ../src/guestfs-actions.pod:5058
15598 msgid "guestfs_pvresize"
15603 #: ../src/guestfs-actions.pod:5060
15607 " guestfs_pvresize (guestfs_h *g,\n"
15608 " const char *device);\n"
15614 #: ../src/guestfs-actions.pod:5064 ../fish/guestfish-actions.pod:3377
15616 "This resizes (expands or shrinks) an existing LVM physical volume to match "
15617 "the new size of the underlying device."
15622 #: ../src/guestfs-actions.pod:5071
15623 msgid "guestfs_pvresize_size"
15628 #: ../src/guestfs-actions.pod:5073
15632 " guestfs_pvresize_size (guestfs_h *g,\n"
15633 " const char *device,\n"
15634 " int64_t size);\n"
15640 #: ../src/guestfs-actions.pod:5078
15642 "This command is the same as C<guestfs_pvresize> except that it allows you to "
15643 "specify the new size (in bytes) explicitly."
15648 #: ../src/guestfs-actions.pod:5085
15649 msgid "guestfs_pvs"
15654 #: ../src/guestfs-actions.pod:5087
15658 " guestfs_pvs (guestfs_h *g);\n"
15664 #: ../src/guestfs-actions.pod:5090 ../fish/guestfish-actions.pod:3391
15666 "List all the physical volumes detected. This is the equivalent of the L<pvs"
15672 #: ../src/guestfs-actions.pod:5093 ../fish/guestfish-actions.pod:3394
15674 "This returns a list of just the device names that contain PVs (eg. C</dev/"
15680 #: ../src/guestfs-actions.pod:5096
15681 msgid "See also C<guestfs_pvs_full>."
15686 #: ../src/guestfs-actions.pod:5104
15687 msgid "guestfs_pvs_full"
15692 #: ../src/guestfs-actions.pod:5106
15695 " struct guestfs_lvm_pv_list *\n"
15696 " guestfs_pvs_full (guestfs_h *g);\n"
15702 #: ../src/guestfs-actions.pod:5109 ../fish/guestfish-actions.pod:3403
15704 "List all the physical volumes detected. This is the equivalent of the L<pvs"
15705 "(8)> command. The \"full\" version includes all fields."
15710 #: ../src/guestfs-actions.pod:5112
15712 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
15713 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
15718 #: ../src/guestfs-actions.pod:5118
15719 msgid "guestfs_pvuuid"
15724 #: ../src/guestfs-actions.pod:5120
15728 " guestfs_pvuuid (guestfs_h *g,\n"
15729 " const char *device);\n"
15735 #: ../src/guestfs-actions.pod:5124 ../fish/guestfish-actions.pod:3410
15736 msgid "This command returns the UUID of the LVM PV C<device>."
15741 #: ../src/guestfs-actions.pod:5131
15742 msgid "guestfs_pwrite"
15747 #: ../src/guestfs-actions.pod:5133
15751 " guestfs_pwrite (guestfs_h *g,\n"
15752 " const char *path,\n"
15753 " const char *content,\n"
15754 " size_t content_size,\n"
15755 " int64_t offset);\n"
15761 #: ../src/guestfs-actions.pod:5140 ../fish/guestfish-actions.pod:3416
15763 "This command writes to part of a file. It writes the data buffer C<content> "
15764 "to the file C<path> starting at offset C<offset>."
15769 #: ../src/guestfs-actions.pod:5143 ../fish/guestfish-actions.pod:3419
15771 "This command implements the L<pwrite(2)> system call, and like that system "
15772 "call it may not write the full data requested. The return value is the "
15773 "number of bytes that were actually written to the file. This could even be "
15774 "0, although short writes are unlikely for regular files in ordinary "
15780 #: ../src/guestfs-actions.pod:5149
15781 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
15786 #: ../src/guestfs-actions.pod:5158
15787 msgid "guestfs_pwrite_device"
15792 #: ../src/guestfs-actions.pod:5160
15796 " guestfs_pwrite_device (guestfs_h *g,\n"
15797 " const char *device,\n"
15798 " const char *content,\n"
15799 " size_t content_size,\n"
15800 " int64_t offset);\n"
15806 #: ../src/guestfs-actions.pod:5167 ../fish/guestfish-actions.pod:3434
15808 "This command writes to part of a device. It writes the data buffer "
15809 "C<content> to C<device> starting at offset C<offset>."
15814 #: ../src/guestfs-actions.pod:5170 ../fish/guestfish-actions.pod:3437
15816 "This command implements the L<pwrite(2)> system call, and like that system "
15817 "call it may not write the full data requested (although short writes to disk "
15818 "devices and partitions are probably impossible with standard Linux kernels)."
15823 #: ../src/guestfs-actions.pod:5175
15824 msgid "See also C<guestfs_pwrite>."
15829 #: ../src/guestfs-actions.pod:5182
15830 msgid "(Added in 1.5.20)"
15835 #: ../src/guestfs-actions.pod:5184
15836 msgid "guestfs_read_file"
15841 #: ../src/guestfs-actions.pod:5186
15845 " guestfs_read_file (guestfs_h *g,\n"
15846 " const char *path,\n"
15847 " size_t *size_r);\n"
15853 #: ../src/guestfs-actions.pod:5191 ../fish/guestfish-actions.pod:3451
15854 msgid "This calls returns the contents of the file C<path> as a buffer."
15859 #: ../src/guestfs-actions.pod:5194
15861 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
15862 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
15863 "function is limited in the total size of file that can be handled."
15868 #: ../src/guestfs-actions.pod:5206
15869 msgid "(Added in 1.0.63)"
15874 #: ../src/guestfs-actions.pod:5208
15875 msgid "guestfs_read_lines"
15880 #: ../src/guestfs-actions.pod:5210
15884 " guestfs_read_lines (guestfs_h *g,\n"
15885 " const char *path);\n"
15891 #: ../src/guestfs-actions.pod:5216 ../fish/guestfish-actions.pod:3468
15893 "The file contents are returned as a list of lines. Trailing C<LF> and "
15894 "C<CRLF> character sequences are I<not> returned."
15899 #: ../src/guestfs-actions.pod:5219
15901 "Note that this function cannot correctly handle binary files (specifically, "
15902 "files containing C<\\0> character which is treated as end of line). For "
15903 "those you need to use the C<guestfs_read_file> function which has a more "
15904 "complex interface."
15909 #: ../src/guestfs-actions.pod:5230
15910 msgid "guestfs_readdir"
15915 #: ../src/guestfs-actions.pod:5232
15918 " struct guestfs_dirent_list *\n"
15919 " guestfs_readdir (guestfs_h *g,\n"
15920 " const char *dir);\n"
15926 #: ../src/guestfs-actions.pod:5236 ../fish/guestfish-actions.pod:3480
15927 msgid "This returns the list of directory entries in directory C<dir>."
15932 #: ../src/guestfs-actions.pod:5238 ../fish/guestfish-actions.pod:3482
15934 "All entries in the directory are returned, including C<.> and C<..>. The "
15935 "entries are I<not> sorted, but returned in the same order as the underlying "
15941 #: ../src/guestfs-actions.pod:5242 ../fish/guestfish-actions.pod:3486
15943 "Also this call returns basic file type information about each file. The "
15944 "C<ftyp> field will contain one of the following characters:"
15949 #: ../src/guestfs-actions.pod:5247 ../fish/guestfish-actions.pod:3491
15955 #: ../src/guestfs-actions.pod:5249 ../fish/guestfish-actions.pod:3493
15956 msgid "Block special"
15961 #: ../src/guestfs-actions.pod:5251 ../fish/guestfish-actions.pod:3495
15967 #: ../src/guestfs-actions.pod:5253 ../fish/guestfish-actions.pod:3497
15968 msgid "Char special"
15973 #: ../src/guestfs-actions.pod:5255 ../fish/guestfish-actions.pod:3499
15979 #: ../src/guestfs-actions.pod:5257 ../fish/guestfish-actions.pod:3501
15985 #: ../src/guestfs-actions.pod:5259 ../fish/guestfish-actions.pod:3503
15991 #: ../src/guestfs-actions.pod:5261 ../fish/guestfish-actions.pod:3505
15992 msgid "FIFO (named pipe)"
15997 #: ../src/guestfs-actions.pod:5263 ../fish/guestfish-actions.pod:3507
16003 #: ../src/guestfs-actions.pod:5265 ../fish/guestfish-actions.pod:3509
16004 msgid "Symbolic link"
16009 #: ../src/guestfs-actions.pod:5267 ../fish/guestfish-actions.pod:3511
16015 #: ../src/guestfs-actions.pod:5269 ../fish/guestfish-actions.pod:3513
16016 msgid "Regular file"
16021 #: ../src/guestfs-actions.pod:5271 ../fish/guestfish-actions.pod:3515
16027 #: ../src/guestfs-actions.pod:5273 ../fish/guestfish-actions.pod:3517
16033 #: ../src/guestfs-actions.pod:5275 ../fish/guestfish-actions.pod:3519
16039 #: ../src/guestfs-actions.pod:5277 ../fish/guestfish-actions.pod:3521
16040 msgid "Unknown file type"
16045 #: ../src/guestfs-actions.pod:5279 ../fish/guestfish-actions.pod:3523
16051 #: ../src/guestfs-actions.pod:5281 ../fish/guestfish-actions.pod:3525
16053 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
16058 #: ../src/guestfs-actions.pod:5286
16060 "This function is primarily intended for use by programs. To get a simple "
16061 "list of names, use C<guestfs_ls>. To get a printable directory for human "
16062 "consumption, use C<guestfs_ll>."
16067 #: ../src/guestfs-actions.pod:5290
16069 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
16070 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
16075 #: ../src/guestfs-actions.pod:5296
16076 msgid "guestfs_readlink"
16081 #: ../src/guestfs-actions.pod:5298
16085 " guestfs_readlink (guestfs_h *g,\n"
16086 " const char *path);\n"
16092 #: ../src/guestfs-actions.pod:5302 ../fish/guestfish-actions.pod:3538
16093 msgid "This command reads the target of a symbolic link."
16098 #: ../src/guestfs-actions.pod:5309
16099 msgid "guestfs_readlinklist"
16104 #: ../src/guestfs-actions.pod:5311
16108 " guestfs_readlinklist (guestfs_h *g,\n"
16109 " const char *path,\n"
16110 " char *const *names);\n"
16116 #: ../src/guestfs-actions.pod:5316 ../fish/guestfish-actions.pod:3544
16118 "This call allows you to do a C<readlink> operation on multiple files, where "
16119 "all files are in the directory C<path>. C<names> is the list of files from "
16125 #: ../src/guestfs-actions.pod:5320 ../fish/guestfish-actions.pod:3548
16127 "On return you get a list of strings, with a one-to-one correspondence to the "
16128 "C<names> list. Each string is the value of the symbolic link."
16133 #: ../src/guestfs-actions.pod:5324 ../fish/guestfish-actions.pod:3552
16135 "If the C<readlink(2)> operation fails on any name, then the corresponding "
16136 "result string is the empty string C<\"\">. However the whole operation is "
16137 "completed even if there were C<readlink(2)> errors, and so you can call this "
16138 "function with names where you don't know if they are symbolic links already "
16139 "(albeit slightly less efficient)."
16144 #: ../src/guestfs-actions.pod:5331 ../fish/guestfish-actions.pod:3559
16146 "This call is intended for programs that want to efficiently list a directory "
16147 "contents without making many round-trips. Very long directory listings "
16148 "might cause the protocol message size to be exceeded, causing this call to "
16149 "fail. The caller must split up such requests into smaller groups of names."
16154 #: ../src/guestfs-actions.pod:5344
16155 msgid "guestfs_realpath"
16160 #: ../src/guestfs-actions.pod:5346
16164 " guestfs_realpath (guestfs_h *g,\n"
16165 " const char *path);\n"
16171 #: ../src/guestfs-actions.pod:5350 ../fish/guestfish-actions.pod:3570
16173 "Return the canonicalized absolute pathname of C<path>. The returned path "
16174 "has no C<.>, C<..> or symbolic link path elements."
16179 #: ../src/guestfs-actions.pod:5358
16180 msgid "guestfs_removexattr"
16185 #: ../src/guestfs-actions.pod:5360
16189 " guestfs_removexattr (guestfs_h *g,\n"
16190 " const char *xattr,\n"
16191 " const char *path);\n"
16197 #: ../src/guestfs-actions.pod:5365 ../fish/guestfish-actions.pod:3577
16199 "This call removes the extended attribute named C<xattr> of the file C<path>."
16204 #: ../src/guestfs-actions.pod:5368
16205 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
16210 #: ../src/guestfs-actions.pod:5374
16211 msgid "guestfs_resize2fs"
16216 #: ../src/guestfs-actions.pod:5376
16220 " guestfs_resize2fs (guestfs_h *g,\n"
16221 " const char *device);\n"
16227 #: ../src/guestfs-actions.pod:5380 ../fish/guestfish-actions.pod:3586
16229 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
16230 "underlying device."
16235 #: ../src/guestfs-actions.pod:5383
16237 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
16238 "C<device> before calling this command. For unknown reasons C<resize2fs> "
16239 "sometimes gives an error about this and sometimes not. In any case, it is "
16240 "always safe to call C<guestfs_e2fsck_f> before calling this function."
16245 #: ../src/guestfs-actions.pod:5393
16246 msgid "guestfs_resize2fs_size"
16251 #: ../src/guestfs-actions.pod:5395
16255 " guestfs_resize2fs_size (guestfs_h *g,\n"
16256 " const char *device,\n"
16257 " int64_t size);\n"
16263 #: ../src/guestfs-actions.pod:5400
16265 "This command is the same as C<guestfs_resize2fs> except that it allows you "
16266 "to specify the new size (in bytes) explicitly."
16271 #: ../src/guestfs-actions.pod:5407
16277 #: ../src/guestfs-actions.pod:5409
16281 " guestfs_rm (guestfs_h *g,\n"
16282 " const char *path);\n"
16288 #: ../src/guestfs-actions.pod:5413 ../fish/guestfish-actions.pod:3606
16289 msgid "Remove the single file C<path>."
16294 #: ../src/guestfs-actions.pod:5419
16295 msgid "guestfs_rm_rf"
16300 #: ../src/guestfs-actions.pod:5421
16304 " guestfs_rm_rf (guestfs_h *g,\n"
16305 " const char *path);\n"
16311 #: ../src/guestfs-actions.pod:5425 ../fish/guestfish-actions.pod:3612
16313 "Remove the file or directory C<path>, recursively removing the contents if "
16314 "its a directory. This is like the C<rm -rf> shell command."
16319 #: ../src/guestfs-actions.pod:5433
16320 msgid "guestfs_rmdir"
16325 #: ../src/guestfs-actions.pod:5435
16329 " guestfs_rmdir (guestfs_h *g,\n"
16330 " const char *path);\n"
16336 #: ../src/guestfs-actions.pod:5439 ../fish/guestfish-actions.pod:3620
16337 msgid "Remove the single directory C<path>."
16342 #: ../src/guestfs-actions.pod:5445
16343 msgid "guestfs_rmmountpoint"
16348 #: ../src/guestfs-actions.pod:5447
16352 " guestfs_rmmountpoint (guestfs_h *g,\n"
16353 " const char *exemptpath);\n"
16359 #: ../src/guestfs-actions.pod:5451
16361 "This calls removes a mountpoint that was previously created with "
16362 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
16367 #: ../src/guestfs-actions.pod:5459
16368 msgid "guestfs_scrub_device"
16373 #: ../src/guestfs-actions.pod:5461
16377 " guestfs_scrub_device (guestfs_h *g,\n"
16378 " const char *device);\n"
16384 #: ../src/guestfs-actions.pod:5465 ../fish/guestfish-actions.pod:3634
16386 "This command writes patterns over C<device> to make data retrieval more "
16392 #: ../src/guestfs-actions.pod:5468 ../src/guestfs-actions.pod:5489
16393 #: ../src/guestfs-actions.pod:5508 ../fish/guestfish-actions.pod:3637
16394 #: ../fish/guestfish-actions.pod:3652 ../fish/guestfish-actions.pod:3665
16396 "It is an interface to the L<scrub(1)> program. See that manual page for "
16402 #: ../src/guestfs-actions.pod:5476 ../src/guestfs-actions.pod:5494
16403 #: ../src/guestfs-actions.pod:5513
16404 msgid "(Added in 1.0.52)"
16409 #: ../src/guestfs-actions.pod:5478
16410 msgid "guestfs_scrub_file"
16415 #: ../src/guestfs-actions.pod:5480
16419 " guestfs_scrub_file (guestfs_h *g,\n"
16420 " const char *file);\n"
16426 #: ../src/guestfs-actions.pod:5484 ../fish/guestfish-actions.pod:3647
16428 "This command writes patterns over a file to make data retrieval more "
16434 #: ../src/guestfs-actions.pod:5487 ../fish/guestfish-actions.pod:3650
16435 msgid "The file is I<removed> after scrubbing."
16440 #: ../src/guestfs-actions.pod:5496
16441 msgid "guestfs_scrub_freespace"
16446 #: ../src/guestfs-actions.pod:5498
16450 " guestfs_scrub_freespace (guestfs_h *g,\n"
16451 " const char *dir);\n"
16457 #: ../src/guestfs-actions.pod:5502
16459 "This command creates the directory C<dir> and then fills it with files until "
16460 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
16461 "and deletes them. The intention is to scrub any free space on the partition "
16462 "containing C<dir>."
16467 #: ../src/guestfs-actions.pod:5515
16468 msgid "guestfs_set_append"
16473 #: ../src/guestfs-actions.pod:5517
16477 " guestfs_set_append (guestfs_h *g,\n"
16478 " const char *append);\n"
16484 #: ../src/guestfs-actions.pod:5521 ../fish/guestfish-actions.pod:3674
16486 "This function is used to add additional options to the guest kernel command "
16492 #: ../src/guestfs-actions.pod:5524 ../fish/guestfish-actions.pod:3677
16494 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
16495 "environment variable."
16500 #: ../src/guestfs-actions.pod:5527 ../fish/guestfish-actions.pod:3680
16502 "Setting C<append> to C<NULL> means I<no> additional options are passed "
16503 "(libguestfs always adds a few of its own)."
16508 #: ../src/guestfs-actions.pod:5534
16509 msgid "guestfs_set_autosync"
16514 #: ../src/guestfs-actions.pod:5536
16518 " guestfs_set_autosync (guestfs_h *g,\n"
16519 " int autosync);\n"
16525 #: ../src/guestfs-actions.pod:5540
16527 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
16528 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
16529 "the handle is closed (also if the program exits without closing handles)."
16534 #: ../src/guestfs-actions.pod:5545 ../fish/guestfish-actions.pod:3694
16536 "This is enabled by default (since libguestfs 1.5.24, previously it was "
16537 "disabled by default)."
16542 #: ../src/guestfs-actions.pod:5552
16543 msgid "guestfs_set_direct"
16548 #: ../src/guestfs-actions.pod:5554
16552 " guestfs_set_direct (guestfs_h *g,\n"
16559 #: ../src/guestfs-actions.pod:5558 ../fish/guestfish-actions.pod:3703
16561 "If the direct appliance mode flag is enabled, then stdin and stdout are "
16562 "passed directly through to the appliance once it is launched."
16567 #: ../src/guestfs-actions.pod:5562
16569 "One consequence of this is that log messages aren't caught by the library "
16570 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
16576 #: ../src/guestfs-actions.pod:5566 ../fish/guestfish-actions.pod:3711
16577 msgid "You probably don't want to use this unless you know what you are doing."
16582 #: ../src/guestfs-actions.pod:5569 ../fish/guestfish-actions.pod:3714
16583 msgid "The default is disabled."
16588 #: ../src/guestfs-actions.pod:5575
16589 msgid "guestfs_set_e2label"
16594 #: ../src/guestfs-actions.pod:5577
16598 " guestfs_set_e2label (guestfs_h *g,\n"
16599 " const char *device,\n"
16600 " const char *label);\n"
16606 #: ../src/guestfs-actions.pod:5582 ../fish/guestfish-actions.pod:3720
16608 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
16609 "C<label>. Filesystem labels are limited to 16 characters."
16614 #: ../src/guestfs-actions.pod:5586
16616 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
16617 "the existing label on a filesystem."
16622 #: ../src/guestfs-actions.pod:5593
16623 msgid "guestfs_set_e2uuid"
16628 #: ../src/guestfs-actions.pod:5595
16632 " guestfs_set_e2uuid (guestfs_h *g,\n"
16633 " const char *device,\n"
16634 " const char *uuid);\n"
16640 #: ../src/guestfs-actions.pod:5600 ../fish/guestfish-actions.pod:3731
16642 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
16643 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
16644 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
16649 #: ../src/guestfs-actions.pod:5605
16651 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
16652 "the existing UUID of a filesystem."
16657 #: ../src/guestfs-actions.pod:5612
16658 msgid "guestfs_set_memsize"
16663 #: ../src/guestfs-actions.pod:5614
16667 " guestfs_set_memsize (guestfs_h *g,\n"
16674 #: ../src/guestfs-actions.pod:5618
16676 "This sets the memory size in megabytes allocated to the qemu subprocess. "
16677 "This only has any effect if called before C<guestfs_launch>."
16682 #: ../src/guestfs-actions.pod:5622 ../fish/guestfish-actions.pod:3749
16684 "You can also change this by setting the environment variable "
16685 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
16690 #: ../src/guestfs-actions.pod:5633
16691 msgid "guestfs_set_network"
16696 #: ../src/guestfs-actions.pod:5635
16700 " guestfs_set_network (guestfs_h *g,\n"
16707 #: ../src/guestfs-actions.pod:5639 ../fish/guestfish-actions.pod:3762
16709 "If C<network> is true, then the network is enabled in the libguestfs "
16710 "appliance. The default is false."
16715 #: ../src/guestfs-actions.pod:5642 ../fish/guestfish-actions.pod:3765
16717 "This affects whether commands are able to access the network (see L<guestfs"
16718 "(3)/RUNNING COMMANDS>)."
16723 #: ../src/guestfs-actions.pod:5645
16725 "You must call this before calling C<guestfs_launch>, otherwise it has no "
16731 #: ../src/guestfs-actions.pod:5652
16732 msgid "guestfs_set_path"
16737 #: ../src/guestfs-actions.pod:5654
16741 " guestfs_set_path (guestfs_h *g,\n"
16742 " const char *searchpath);\n"
16748 #: ../src/guestfs-actions.pod:5658 ../fish/guestfish-actions.pod:3777
16749 msgid "Set the path that libguestfs searches for kernel and initrd.img."
16754 #: ../src/guestfs-actions.pod:5660 ../fish/guestfish-actions.pod:3779
16756 "The default is C<$libdir/guestfs> unless overridden by setting "
16757 "C<LIBGUESTFS_PATH> environment variable."
16762 #: ../src/guestfs-actions.pod:5663 ../fish/guestfish-actions.pod:3782
16763 msgid "Setting C<path> to C<NULL> restores the default path."
16768 #: ../src/guestfs-actions.pod:5669
16769 msgid "guestfs_set_qemu"
16774 #: ../src/guestfs-actions.pod:5671
16778 " guestfs_set_qemu (guestfs_h *g,\n"
16779 " const char *qemu);\n"
16785 #: ../src/guestfs-actions.pod:5675 ../fish/guestfish-actions.pod:3790
16786 msgid "Set the qemu binary that we will use."
16791 #: ../src/guestfs-actions.pod:5677 ../fish/guestfish-actions.pod:3792
16793 "The default is chosen when the library was compiled by the configure script."
16798 #: ../src/guestfs-actions.pod:5680 ../fish/guestfish-actions.pod:3795
16800 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
16806 #: ../src/guestfs-actions.pod:5683 ../fish/guestfish-actions.pod:3798
16807 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
16812 #: ../src/guestfs-actions.pod:5685 ../fish/guestfish-actions.pod:3800
16814 "Note that you should call this function as early as possible after creating "
16815 "the handle. This is because some pre-launch operations depend on testing "
16816 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
16817 "don't retest features, and so you might see inconsistent results. Using the "
16818 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
16819 "the qemu binary at the same time as the handle is created."
16824 #: ../src/guestfs-actions.pod:5697
16825 msgid "guestfs_set_recovery_proc"
16830 #: ../src/guestfs-actions.pod:5699
16834 " guestfs_set_recovery_proc (guestfs_h *g,\n"
16835 " int recoveryproc);\n"
16841 #: ../src/guestfs-actions.pod:5703
16843 "If this is called with the parameter C<false> then C<guestfs_launch> does "
16844 "not create a recovery process. The purpose of the recovery process is to "
16845 "stop runaway qemu processes in the case where the main program aborts "
16851 #: ../src/guestfs-actions.pod:5708
16853 "This only has any effect if called before C<guestfs_launch>, and the default "
16859 #: ../src/guestfs-actions.pod:5711 ../fish/guestfish-actions.pod:3822
16861 "About the only time when you would want to disable this is if the main "
16862 "process will fork itself into the background (\"daemonize\" itself). In "
16863 "this case the recovery process thinks that the main program has disappeared "
16864 "and so kills qemu, which is not very helpful."
16869 #: ../src/guestfs-actions.pod:5721
16870 msgid "guestfs_set_selinux"
16875 #: ../src/guestfs-actions.pod:5723
16879 " guestfs_set_selinux (guestfs_h *g,\n"
16886 #: ../src/guestfs-actions.pod:5727 ../fish/guestfish-actions.pod:3834
16888 "This sets the selinux flag that is passed to the appliance at boot time. "
16889 "The default is C<selinux=0> (disabled)."
16894 #: ../src/guestfs-actions.pod:5730 ../fish/guestfish-actions.pod:3837
16896 "Note that if SELinux is enabled, it is always in Permissive mode "
16897 "(C<enforcing=0>)."
16902 #: ../src/guestfs-actions.pod:5740
16903 msgid "guestfs_set_trace"
16908 #: ../src/guestfs-actions.pod:5742
16912 " guestfs_set_trace (guestfs_h *g,\n"
16919 #: ../src/guestfs-actions.pod:5746 ../fish/guestfish-actions.pod:3849
16921 "If the command trace flag is set to 1, then commands are printed on stderr "
16922 "before they are executed in a format which is very similar to the one used "
16923 "by guestfish. In other words, you can run a program with this enabled, and "
16924 "you will get out a script which you can feed to guestfish to perform the "
16925 "same set of actions."
16930 #: ../src/guestfs-actions.pod:5753 ../fish/guestfish-actions.pod:3856
16932 "If you want to trace C API calls into libguestfs (and other libraries) then "
16933 "possibly a better way is to use the external ltrace(1) command."
16938 #: ../src/guestfs-actions.pod:5757 ../fish/guestfish-actions.pod:3860
16940 "Command traces are disabled unless the environment variable "
16941 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
16946 #: ../src/guestfs-actions.pod:5764
16947 msgid "guestfs_set_verbose"
16952 #: ../src/guestfs-actions.pod:5766
16956 " guestfs_set_verbose (guestfs_h *g,\n"
16963 #: ../src/guestfs-actions.pod:5770 ../fish/guestfish-actions.pod:3869
16964 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
16969 #: ../src/guestfs-actions.pod:5772 ../fish/guestfish-actions.pod:3871
16971 "Verbose messages are disabled unless the environment variable "
16972 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
16977 #: ../src/guestfs-actions.pod:5779
16978 msgid "guestfs_setcon"
16983 #: ../src/guestfs-actions.pod:5781
16987 " guestfs_setcon (guestfs_h *g,\n"
16988 " const char *context);\n"
16994 #: ../src/guestfs-actions.pod:5785 ../fish/guestfish-actions.pod:3878
16996 "This sets the SELinux security context of the daemon to the string "
17002 #: ../src/guestfs-actions.pod:5788 ../fish/guestfish-actions.pod:3881
17003 msgid "See the documentation about SELINUX in L<guestfs(3)>."
17008 #: ../src/guestfs-actions.pod:5794
17009 msgid "guestfs_setxattr"
17014 #: ../src/guestfs-actions.pod:5796
17018 " guestfs_setxattr (guestfs_h *g,\n"
17019 " const char *xattr,\n"
17020 " const char *val,\n"
17022 " const char *path);\n"
17028 #: ../src/guestfs-actions.pod:5803 ../fish/guestfish-actions.pod:3887
17030 "This call sets the extended attribute named C<xattr> of the file C<path> to "
17031 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
17036 #: ../src/guestfs-actions.pod:5807
17037 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
17042 #: ../src/guestfs-actions.pod:5813
17043 msgid "guestfs_sfdisk"
17048 #: ../src/guestfs-actions.pod:5815
17052 " guestfs_sfdisk (guestfs_h *g,\n"
17053 " const char *device,\n"
17057 " char *const *lines);\n"
17063 #: ../src/guestfs-actions.pod:5823 ../fish/guestfish-actions.pod:3897
17065 "This is a direct interface to the L<sfdisk(8)> program for creating "
17066 "partitions on block devices."
17071 #: ../src/guestfs-actions.pod:5826 ../fish/guestfish-actions.pod:3900
17072 msgid "C<device> should be a block device, for example C</dev/sda>."
17077 #: ../src/guestfs-actions.pod:5828 ../fish/guestfish-actions.pod:3902
17079 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
17080 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
17081 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
17082 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
17083 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
17084 "the kernel) cannot work out the right geometry and you will need to tell it."
17089 #: ../src/guestfs-actions.pod:5836 ../fish/guestfish-actions.pod:3910
17091 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
17092 "refer to the L<sfdisk(8)> manpage."
17097 #: ../src/guestfs-actions.pod:5839 ../fish/guestfish-actions.pod:3913
17099 "To create a single partition occupying the whole disk, you would pass "
17100 "C<lines> as a single element list, when the single element being the string "
17106 #: ../src/guestfs-actions.pod:5843
17108 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
17113 #: ../src/guestfs-actions.pod:5853
17114 msgid "guestfs_sfdiskM"
17119 #: ../src/guestfs-actions.pod:5855
17123 " guestfs_sfdiskM (guestfs_h *g,\n"
17124 " const char *device,\n"
17125 " char *const *lines);\n"
17131 #: ../src/guestfs-actions.pod:5860
17133 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
17134 "partition sizes are specified in megabytes only (rounded to the nearest "
17135 "cylinder) and you don't need to specify the cyls, heads and sectors "
17136 "parameters which were rarely if ever used anyway."
17141 #: ../src/guestfs-actions.pod:5866
17143 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
17144 "C<guestfs_part_disk>"
17149 #: ../src/guestfs-actions.pod:5876
17150 msgid "guestfs_sfdisk_N"
17155 #: ../src/guestfs-actions.pod:5878
17159 " guestfs_sfdisk_N (guestfs_h *g,\n"
17160 " const char *device,\n"
17165 " const char *line);\n"
17171 #: ../src/guestfs-actions.pod:5887 ../fish/guestfish-actions.pod:3943
17173 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
17174 "(note: C<n> counts from 1)."
17179 #: ../src/guestfs-actions.pod:5890
17181 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
17182 "for the cyls/heads/sectors parameters."
17187 #: ../src/guestfs-actions.pod:5893
17188 msgid "See also: C<guestfs_part_add>"
17193 #: ../src/guestfs-actions.pod:5902
17194 msgid "guestfs_sfdisk_disk_geometry"
17199 #: ../src/guestfs-actions.pod:5904
17203 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
17204 " const char *device);\n"
17210 #: ../src/guestfs-actions.pod:5908
17212 "This displays the disk geometry of C<device> read from the partition table. "
17213 "Especially in the case where the underlying block device has been resized, "
17214 "this can be different from the kernel's idea of the geometry (see "
17215 "C<guestfs_sfdisk_kernel_geometry>)."
17220 #: ../src/guestfs-actions.pod:5913 ../src/guestfs-actions.pod:5929
17221 #: ../fish/guestfish-actions.pod:3963 ../fish/guestfish-actions.pod:3972
17222 msgid "The result is in human-readable format, and not designed to be parsed."
17227 #: ../src/guestfs-actions.pod:5921
17228 msgid "guestfs_sfdisk_kernel_geometry"
17233 #: ../src/guestfs-actions.pod:5923
17237 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
17238 " const char *device);\n"
17244 #: ../src/guestfs-actions.pod:5927 ../fish/guestfish-actions.pod:3970
17245 msgid "This displays the kernel's idea of the geometry of C<device>."
17250 #: ../src/guestfs-actions.pod:5937
17251 msgid "guestfs_sfdisk_l"
17256 #: ../src/guestfs-actions.pod:5939
17260 " guestfs_sfdisk_l (guestfs_h *g,\n"
17261 " const char *device);\n"
17267 #: ../src/guestfs-actions.pod:5943 ../fish/guestfish-actions.pod:3979
17269 "This displays the partition table on C<device>, in the human-readable output "
17270 "of the L<sfdisk(8)> command. It is not intended to be parsed."
17275 #: ../src/guestfs-actions.pod:5947
17276 msgid "See also: C<guestfs_part_list>"
17281 #: ../src/guestfs-actions.pod:5954
17287 #: ../src/guestfs-actions.pod:5956
17291 " guestfs_sh (guestfs_h *g,\n"
17292 " const char *command);\n"
17298 #: ../src/guestfs-actions.pod:5960 ../fish/guestfish-actions.pod:3989
17300 "This call runs a command from the guest filesystem via the guest's C</bin/"
17306 #: ../src/guestfs-actions.pod:5963
17307 msgid "This is like C<guestfs_command>, but passes the command to:"
17312 #: ../src/guestfs-actions.pod:5965 ../fish/guestfish-actions.pod:3994
17315 " /bin/sh -c \"command\"\n"
17321 #: ../src/guestfs-actions.pod:5967 ../fish/guestfish-actions.pod:3996
17323 "Depending on the guest's shell, this usually results in wildcards being "
17324 "expanded, shell expressions being interpolated and so on."
17329 #: ../src/guestfs-actions.pod:5971
17330 msgid "All the provisos about C<guestfs_command> apply to this call."
17335 #: ../src/guestfs-actions.pod:5978
17336 msgid "guestfs_sh_lines"
17341 #: ../src/guestfs-actions.pod:5980
17345 " guestfs_sh_lines (guestfs_h *g,\n"
17346 " const char *command);\n"
17352 #: ../src/guestfs-actions.pod:5984
17354 "This is the same as C<guestfs_sh>, but splits the result into a list of "
17360 #: ../src/guestfs-actions.pod:5987
17361 msgid "See also: C<guestfs_command_lines>"
17366 #: ../src/guestfs-actions.pod:5995
17367 msgid "guestfs_sleep"
17372 #: ../src/guestfs-actions.pod:5997
17376 " guestfs_sleep (guestfs_h *g,\n"
17383 #: ../src/guestfs-actions.pod:6001 ../fish/guestfish-actions.pod:4015
17384 msgid "Sleep for C<secs> seconds."
17389 #: ../src/guestfs-actions.pod:6005
17390 msgid "(Added in 1.0.41)"
17395 #: ../src/guestfs-actions.pod:6007 ../src/guestfs-structs.pod:109
17396 msgid "guestfs_stat"
17401 #: ../src/guestfs-actions.pod:6009
17404 " struct guestfs_stat *\n"
17405 " guestfs_stat (guestfs_h *g,\n"
17406 " const char *path);\n"
17412 #: ../src/guestfs-actions.pod:6015 ../fish/guestfish-actions.pod:4023
17413 msgid "This is the same as the C<stat(2)> system call."
17418 #: ../src/guestfs-actions.pod:6023 ../src/guestfs-structs.pod:135
17419 msgid "guestfs_statvfs"
17424 #: ../src/guestfs-actions.pod:6025
17427 " struct guestfs_statvfs *\n"
17428 " guestfs_statvfs (guestfs_h *g,\n"
17429 " const char *path);\n"
17435 #: ../src/guestfs-actions.pod:6029 ../fish/guestfish-actions.pod:4029
17437 "Returns file system statistics for any mounted file system. C<path> should "
17438 "be a file or directory in the mounted file system (typically it is the mount "
17439 "point itself, but it doesn't need to be)."
17444 #: ../src/guestfs-actions.pod:6033 ../fish/guestfish-actions.pod:4033
17445 msgid "This is the same as the C<statvfs(2)> system call."
17450 #: ../src/guestfs-actions.pod:6035
17452 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
17453 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
17458 #: ../src/guestfs-actions.pod:6041
17459 msgid "guestfs_strings"
17464 #: ../src/guestfs-actions.pod:6043
17468 " guestfs_strings (guestfs_h *g,\n"
17469 " const char *path);\n"
17475 #: ../src/guestfs-actions.pod:6047 ../fish/guestfish-actions.pod:4039
17477 "This runs the L<strings(1)> command on a file and returns the list of "
17478 "printable strings found."
17483 #: ../src/guestfs-actions.pod:6059
17484 msgid "guestfs_strings_e"
17489 #: ../src/guestfs-actions.pod:6061
17493 " guestfs_strings_e (guestfs_h *g,\n"
17494 " const char *encoding,\n"
17495 " const char *path);\n"
17501 #: ../src/guestfs-actions.pod:6066
17503 "This is like the C<guestfs_strings> command, but allows you to specify the "
17504 "encoding of strings that are looked for in the source file C<path>."
17509 #: ../src/guestfs-actions.pod:6070 ../fish/guestfish-actions.pod:4053
17510 msgid "Allowed encodings are:"
17515 #: ../src/guestfs-actions.pod:6074 ../fish/guestfish-actions.pod:4057
17521 #: ../src/guestfs-actions.pod:6076
17523 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
17524 "ISO-8859-X (this is what C<guestfs_strings> uses)."
17529 #: ../src/guestfs-actions.pod:6079 ../fish/guestfish-actions.pod:4062
17535 #: ../src/guestfs-actions.pod:6081 ../fish/guestfish-actions.pod:4064
17536 msgid "Single 8-bit-byte characters."
17541 #: ../src/guestfs-actions.pod:6083 ../fish/guestfish-actions.pod:4066
17547 #: ../src/guestfs-actions.pod:6085 ../fish/guestfish-actions.pod:4068
17548 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
17553 #: ../src/guestfs-actions.pod:6088 ../fish/guestfish-actions.pod:4071
17554 msgid "l (lower case letter L)"
17559 #: ../src/guestfs-actions.pod:6090 ../fish/guestfish-actions.pod:4073
17561 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
17562 "examining binaries in Windows guests."
17567 #: ../src/guestfs-actions.pod:6093 ../fish/guestfish-actions.pod:4076
17573 #: ../src/guestfs-actions.pod:6095 ../fish/guestfish-actions.pod:4078
17574 msgid "32-bit big endian such as UCS-4BE."
17579 #: ../src/guestfs-actions.pod:6097 ../fish/guestfish-actions.pod:4080
17585 #: ../src/guestfs-actions.pod:6099 ../fish/guestfish-actions.pod:4082
17586 msgid "32-bit little endian such as UCS-4LE."
17591 #: ../src/guestfs-actions.pod:6103 ../fish/guestfish-actions.pod:4086
17592 msgid "The returned strings are transcoded to UTF-8."
17597 #: ../src/guestfs-actions.pod:6114
17598 msgid "guestfs_swapoff_device"
17603 #: ../src/guestfs-actions.pod:6116
17607 " guestfs_swapoff_device (guestfs_h *g,\n"
17608 " const char *device);\n"
17614 #: ../src/guestfs-actions.pod:6120
17616 "This command disables the libguestfs appliance swap device or partition "
17617 "named C<device>. See C<guestfs_swapon_device>."
17622 #: ../src/guestfs-actions.pod:6128
17623 msgid "guestfs_swapoff_file"
17628 #: ../src/guestfs-actions.pod:6130
17632 " guestfs_swapoff_file (guestfs_h *g,\n"
17633 " const char *file);\n"
17639 #: ../src/guestfs-actions.pod:6134 ../fish/guestfish-actions.pod:4103
17640 msgid "This command disables the libguestfs appliance swap on file."
17645 #: ../src/guestfs-actions.pod:6140
17646 msgid "guestfs_swapoff_label"
17651 #: ../src/guestfs-actions.pod:6142
17655 " guestfs_swapoff_label (guestfs_h *g,\n"
17656 " const char *label);\n"
17662 #: ../src/guestfs-actions.pod:6146 ../fish/guestfish-actions.pod:4109
17664 "This command disables the libguestfs appliance swap on labeled swap "
17670 #: ../src/guestfs-actions.pod:6153
17671 msgid "guestfs_swapoff_uuid"
17676 #: ../src/guestfs-actions.pod:6155
17680 " guestfs_swapoff_uuid (guestfs_h *g,\n"
17681 " const char *uuid);\n"
17687 #: ../src/guestfs-actions.pod:6159 ../fish/guestfish-actions.pod:4116
17689 "This command disables the libguestfs appliance swap partition with the given "
17695 #: ../src/guestfs-actions.pod:6166
17696 msgid "guestfs_swapon_device"
17701 #: ../src/guestfs-actions.pod:6168
17705 " guestfs_swapon_device (guestfs_h *g,\n"
17706 " const char *device);\n"
17712 #: ../src/guestfs-actions.pod:6172
17714 "This command enables the libguestfs appliance to use the swap device or "
17715 "partition named C<device>. The increased memory is made available for all "
17716 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
17721 #: ../src/guestfs-actions.pod:6177 ../fish/guestfish-actions.pod:4128
17723 "Note that you should not swap to existing guest swap partitions unless you "
17724 "know what you are doing. They may contain hibernation information, or other "
17725 "information that the guest doesn't want you to trash. You also risk leaking "
17726 "information about the host to the guest this way. Instead, attach a new "
17727 "host device to the guest and swap on that."
17732 #: ../src/guestfs-actions.pod:6188
17733 msgid "guestfs_swapon_file"
17738 #: ../src/guestfs-actions.pod:6190
17742 " guestfs_swapon_file (guestfs_h *g,\n"
17743 " const char *file);\n"
17749 #: ../src/guestfs-actions.pod:6194
17751 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
17757 #: ../src/guestfs-actions.pod:6201
17758 msgid "guestfs_swapon_label"
17763 #: ../src/guestfs-actions.pod:6203
17767 " guestfs_swapon_label (guestfs_h *g,\n"
17768 " const char *label);\n"
17774 #: ../src/guestfs-actions.pod:6207
17776 "This command enables swap to a labeled swap partition. See "
17777 "C<guestfs_swapon_device> for other notes."
17782 #: ../src/guestfs-actions.pod:6214
17783 msgid "guestfs_swapon_uuid"
17788 #: ../src/guestfs-actions.pod:6216
17792 " guestfs_swapon_uuid (guestfs_h *g,\n"
17793 " const char *uuid);\n"
17799 #: ../src/guestfs-actions.pod:6220
17801 "This command enables swap to a swap partition with the given UUID. See "
17802 "C<guestfs_swapon_device> for other notes."
17807 #: ../src/guestfs-actions.pod:6227
17808 msgid "guestfs_sync"
17813 #: ../src/guestfs-actions.pod:6229
17817 " guestfs_sync (guestfs_h *g);\n"
17823 #: ../src/guestfs-actions.pod:6232 ../fish/guestfish-actions.pod:4160
17825 "This syncs the disk, so that any writes are flushed through to the "
17826 "underlying disk image."
17831 #: ../src/guestfs-actions.pod:6235 ../fish/guestfish-actions.pod:4163
17833 "You should always call this if you have modified a disk image, before "
17834 "closing the handle."
17839 #: ../src/guestfs-actions.pod:6242
17840 msgid "guestfs_tail"
17845 #: ../src/guestfs-actions.pod:6244
17849 " guestfs_tail (guestfs_h *g,\n"
17850 " const char *path);\n"
17856 #: ../src/guestfs-actions.pod:6248 ../fish/guestfish-actions.pod:4170
17858 "This command returns up to the last 10 lines of a file as a list of strings."
17863 #: ../src/guestfs-actions.pod:6260
17864 msgid "guestfs_tail_n"
17869 #: ../src/guestfs-actions.pod:6262
17873 " guestfs_tail_n (guestfs_h *g,\n"
17875 " const char *path);\n"
17881 #: ../src/guestfs-actions.pod:6267 ../fish/guestfish-actions.pod:4180
17883 "If the parameter C<nrlines> is a positive number, this returns the last "
17884 "C<nrlines> lines of the file C<path>."
17889 #: ../src/guestfs-actions.pod:6270 ../fish/guestfish-actions.pod:4183
17891 "If the parameter C<nrlines> is a negative number, this returns lines from "
17892 "the file C<path>, starting with the C<-nrlines>th line."
17897 #: ../src/guestfs-actions.pod:6284
17898 msgid "guestfs_tar_in"
17903 #: ../src/guestfs-actions.pod:6286
17907 " guestfs_tar_in (guestfs_h *g,\n"
17908 " const char *tarfile,\n"
17909 " const char *directory);\n"
17915 #: ../src/guestfs-actions.pod:6291 ../fish/guestfish-actions.pod:4195
17917 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
17918 "tar file) into C<directory>."
17923 #: ../src/guestfs-actions.pod:6294
17925 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
17930 #: ../src/guestfs-actions.pod:6299 ../src/guestfs-actions.pod:6316
17931 #: ../src/guestfs-actions.pod:6332 ../src/guestfs-actions.pod:6348
17932 msgid "(Added in 1.0.3)"
17937 #: ../src/guestfs-actions.pod:6301
17938 msgid "guestfs_tar_out"
17943 #: ../src/guestfs-actions.pod:6303
17947 " guestfs_tar_out (guestfs_h *g,\n"
17948 " const char *directory,\n"
17949 " const char *tarfile);\n"
17955 #: ../src/guestfs-actions.pod:6308 ../fish/guestfish-actions.pod:4207
17957 "This command packs the contents of C<directory> and downloads it to local "
17963 #: ../src/guestfs-actions.pod:6311
17965 "To download a compressed tarball, use C<guestfs_tgz_out> or "
17966 "C<guestfs_txz_out>."
17971 #: ../src/guestfs-actions.pod:6318
17972 msgid "guestfs_tgz_in"
17977 #: ../src/guestfs-actions.pod:6320
17981 " guestfs_tgz_in (guestfs_h *g,\n"
17982 " const char *tarball,\n"
17983 " const char *directory);\n"
17989 #: ../src/guestfs-actions.pod:6325 ../fish/guestfish-actions.pod:4219
17991 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
17992 "tar file) into C<directory>."
17997 #: ../src/guestfs-actions.pod:6328
17998 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
18003 #: ../src/guestfs-actions.pod:6334
18004 msgid "guestfs_tgz_out"
18009 #: ../src/guestfs-actions.pod:6336
18013 " guestfs_tgz_out (guestfs_h *g,\n"
18014 " const char *directory,\n"
18015 " const char *tarball);\n"
18021 #: ../src/guestfs-actions.pod:6341 ../fish/guestfish-actions.pod:4230
18023 "This command packs the contents of C<directory> and downloads it to local "
18029 #: ../src/guestfs-actions.pod:6344
18030 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
18035 #: ../src/guestfs-actions.pod:6350
18036 msgid "guestfs_touch"
18041 #: ../src/guestfs-actions.pod:6352
18045 " guestfs_touch (guestfs_h *g,\n"
18046 " const char *path);\n"
18052 #: ../src/guestfs-actions.pod:6356 ../fish/guestfish-actions.pod:4241
18054 "Touch acts like the L<touch(1)> command. It can be used to update the "
18055 "timestamps on a file, or, if the file does not exist, to create a new zero-"
18061 #: ../src/guestfs-actions.pod:6360 ../fish/guestfish-actions.pod:4245
18063 "This command only works on regular files, and will fail on other file types "
18064 "such as directories, symbolic links, block special etc."
18069 #: ../src/guestfs-actions.pod:6367
18070 msgid "guestfs_truncate"
18075 #: ../src/guestfs-actions.pod:6369
18079 " guestfs_truncate (guestfs_h *g,\n"
18080 " const char *path);\n"
18086 #: ../src/guestfs-actions.pod:6373 ../fish/guestfish-actions.pod:4252
18088 "This command truncates C<path> to a zero-length file. The file must exist "
18094 #: ../src/guestfs-actions.pod:6380
18095 msgid "guestfs_truncate_size"
18100 #: ../src/guestfs-actions.pod:6382
18104 " guestfs_truncate_size (guestfs_h *g,\n"
18105 " const char *path,\n"
18106 " int64_t size);\n"
18112 #: ../src/guestfs-actions.pod:6387 ../fish/guestfish-actions.pod:4259
18114 "This command truncates C<path> to size C<size> bytes. The file must exist "
18120 #: ../src/guestfs-actions.pod:6390
18122 "If the current file size is less than C<size> then the file is extended to "
18123 "the required size with zero bytes. This creates a sparse file (ie. disk "
18124 "blocks are not allocated for the file until you write to it). To create a "
18125 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
18130 #: ../src/guestfs-actions.pod:6400
18131 msgid "guestfs_tune2fs_l"
18136 #: ../src/guestfs-actions.pod:6402
18140 " guestfs_tune2fs_l (guestfs_h *g,\n"
18141 " const char *device);\n"
18147 #: ../src/guestfs-actions.pod:6406 ../fish/guestfish-actions.pod:4272
18149 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
18155 #: ../src/guestfs-actions.pod:6409 ../fish/guestfish-actions.pod:4275
18157 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
18158 "for more details. The list of fields returned isn't clearly defined, and "
18159 "depends on both the version of C<tune2fs> that libguestfs was built against, "
18160 "and the filesystem itself."
18165 #: ../src/guestfs-actions.pod:6422
18166 msgid "guestfs_txz_in"
18171 #: ../src/guestfs-actions.pod:6424
18175 " guestfs_txz_in (guestfs_h *g,\n"
18176 " const char *tarball,\n"
18177 " const char *directory);\n"
18183 #: ../src/guestfs-actions.pod:6429 ../fish/guestfish-actions.pod:4284
18185 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
18186 "tar file) into C<directory>."
18191 #: ../src/guestfs-actions.pod:6436
18192 msgid "guestfs_txz_out"
18197 #: ../src/guestfs-actions.pod:6438
18201 " guestfs_txz_out (guestfs_h *g,\n"
18202 " const char *directory,\n"
18203 " const char *tarball);\n"
18209 #: ../src/guestfs-actions.pod:6443 ../fish/guestfish-actions.pod:4293
18211 "This command packs the contents of C<directory> and downloads it to local "
18212 "file C<tarball> (as an xz compressed tar archive)."
18217 #: ../src/guestfs-actions.pod:6450
18218 msgid "guestfs_umask"
18223 #: ../src/guestfs-actions.pod:6452
18227 " guestfs_umask (guestfs_h *g,\n"
18234 #: ../src/guestfs-actions.pod:6456 ../fish/guestfish-actions.pod:4302
18236 "This function sets the mask used for creating new files and device nodes to "
18242 #: ../src/guestfs-actions.pod:6459 ../fish/guestfish-actions.pod:4305
18244 "Typical umask values would be C<022> which creates new files with "
18245 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
18246 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
18251 #: ../src/guestfs-actions.pod:6464 ../fish/guestfish-actions.pod:4310
18253 "The default umask is C<022>. This is important because it means that "
18254 "directories and device nodes will be created with C<0644> or C<0755> mode "
18255 "even if you specify C<0777>."
18260 #: ../src/guestfs-actions.pod:6468
18262 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
18263 "C<guestfs_mkdir>."
18268 #: ../src/guestfs-actions.pod:6471 ../fish/guestfish-actions.pod:4317
18269 msgid "This call returns the previous umask."
18274 #: ../src/guestfs-actions.pod:6477
18275 msgid "guestfs_umount"
18280 #: ../src/guestfs-actions.pod:6479
18284 " guestfs_umount (guestfs_h *g,\n"
18285 " const char *pathordevice);\n"
18291 #: ../src/guestfs-actions.pod:6483 ../fish/guestfish-actions.pod:4325
18293 "This unmounts the given filesystem. The filesystem may be specified either "
18294 "by its mountpoint (path) or the device which contains the filesystem."
18299 #: ../src/guestfs-actions.pod:6491
18300 msgid "guestfs_umount_all"
18305 #: ../src/guestfs-actions.pod:6493
18309 " guestfs_umount_all (guestfs_h *g);\n"
18315 #: ../src/guestfs-actions.pod:6496 ../fish/guestfish-actions.pod:4335
18316 msgid "This unmounts all mounted filesystems."
18321 #: ../src/guestfs-actions.pod:6498 ../fish/guestfish-actions.pod:4337
18322 msgid "Some internal mounts are not unmounted by this call."
18327 #: ../src/guestfs-actions.pod:6504
18328 msgid "guestfs_upload"
18333 #: ../src/guestfs-actions.pod:6506
18337 " guestfs_upload (guestfs_h *g,\n"
18338 " const char *filename,\n"
18339 " const char *remotefilename);\n"
18345 #: ../src/guestfs-actions.pod:6511 ../src/guestfs-actions.pod:6535
18346 #: ../fish/guestfish-actions.pod:4343 ../fish/guestfish-actions.pod:4356
18347 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
18352 #: ../src/guestfs-actions.pod:6516
18353 msgid "See also C<guestfs_download>."
18358 #: ../src/guestfs-actions.pod:6527
18359 msgid "guestfs_upload_offset"
18364 #: ../src/guestfs-actions.pod:6529
18368 " guestfs_upload_offset (guestfs_h *g,\n"
18369 " const char *filename,\n"
18370 " const char *remotefilename,\n"
18371 " int64_t offset);\n"
18377 #: ../src/guestfs-actions.pod:6538 ../fish/guestfish-actions.pod:4359
18379 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
18380 "The intention is to overwrite parts of existing files or devices, although "
18381 "if a non-existant file is specified then it is created with a \"hole\" "
18382 "before C<offset>. The size of the data written is implicit in the size of "
18383 "the source C<filename>."
18388 #: ../src/guestfs-actions.pod:6545
18390 "Note that there is no limit on the amount of data that can be uploaded with "
18391 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
18392 "full amount unless an error occurs."
18397 #: ../src/guestfs-actions.pod:6550
18398 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
18403 #: ../src/guestfs-actions.pod:6561
18404 msgid "guestfs_utimens"
18409 #: ../src/guestfs-actions.pod:6563
18413 " guestfs_utimens (guestfs_h *g,\n"
18414 " const char *path,\n"
18415 " int64_t atsecs,\n"
18416 " int64_t atnsecs,\n"
18417 " int64_t mtsecs,\n"
18418 " int64_t mtnsecs);\n"
18424 #: ../src/guestfs-actions.pod:6571 ../fish/guestfish-actions.pod:4379
18425 msgid "This command sets the timestamps of a file with nanosecond precision."
18430 #: ../src/guestfs-actions.pod:6574 ../fish/guestfish-actions.pod:4382
18432 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
18438 #: ../src/guestfs-actions.pod:6577 ../fish/guestfish-actions.pod:4385
18440 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
18441 "nanoseconds from the epoch."
18446 #: ../src/guestfs-actions.pod:6580 ../fish/guestfish-actions.pod:4388
18448 "If the C<*nsecs> field contains the special value C<-1> then the "
18449 "corresponding timestamp is set to the current time. (The C<*secs> field is "
18450 "ignored in this case)."
18455 #: ../src/guestfs-actions.pod:6584 ../fish/guestfish-actions.pod:4392
18457 "If the C<*nsecs> field contains the special value C<-2> then the "
18458 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
18464 #: ../src/guestfs-actions.pod:6592 ../src/guestfs-structs.pod:175
18465 msgid "guestfs_version"
18470 #: ../src/guestfs-actions.pod:6594
18473 " struct guestfs_version *\n"
18474 " guestfs_version (guestfs_h *g);\n"
18480 #: ../src/guestfs-actions.pod:6597 ../fish/guestfish-actions.pod:4400
18482 "Return the libguestfs version number that the program is linked against."
18487 #: ../src/guestfs-actions.pod:6600 ../fish/guestfish-actions.pod:4403
18489 "Note that because of dynamic linking this is not necessarily the version of "
18490 "libguestfs that you compiled against. You can compile the program, and then "
18491 "at runtime dynamically link against a completely different C<libguestfs.so> "
18497 #: ../src/guestfs-actions.pod:6605 ../fish/guestfish-actions.pod:4408
18499 "This call was added in version C<1.0.58>. In previous versions of "
18500 "libguestfs there was no way to get the version number. From C code you can "
18501 "use dynamic linker functions to find out if this symbol exists (if it "
18502 "doesn't, then it's an earlier version)."
18507 #: ../src/guestfs-actions.pod:6611 ../fish/guestfish-actions.pod:4414
18509 "The call returns a structure with four elements. The first three (C<major>, "
18510 "C<minor> and C<release>) are numbers and correspond to the usual version "
18511 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
18512 "but may be used for distro-specific information."
18517 #: ../src/guestfs-actions.pod:6617 ../fish/guestfish-actions.pod:4420
18519 "To construct the original version string: C<$major.$minor.$release$extra>"
18524 #: ../src/guestfs-actions.pod:6620 ../fish/guestfish-actions.pod:4423
18525 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
18530 #: ../src/guestfs-actions.pod:6622
18532 "I<Note:> Don't use this call to test for availability of features. In "
18533 "enterprise distributions we backport features from later versions into "
18534 "earlier versions, making this an unreliable way to test for features. Use "
18535 "C<guestfs_available> instead."
18540 #: ../src/guestfs-actions.pod:6628
18542 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
18543 "error. I<The caller must call C<guestfs_free_version> after use>."
18548 #: ../src/guestfs-actions.pod:6632
18549 msgid "(Added in 1.0.58)"
18554 #: ../src/guestfs-actions.pod:6634
18555 msgid "guestfs_vfs_label"
18560 #: ../src/guestfs-actions.pod:6636
18564 " guestfs_vfs_label (guestfs_h *g,\n"
18565 " const char *device);\n"
18571 #: ../src/guestfs-actions.pod:6640 ../fish/guestfish-actions.pod:4435
18572 msgid "This returns the filesystem label of the filesystem on C<device>."
18577 #: ../src/guestfs-actions.pod:6643 ../fish/guestfish-actions.pod:4438
18578 msgid "If the filesystem is unlabeled, this returns the empty string."
18583 #: ../src/guestfs-actions.pod:6645
18584 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
18589 #: ../src/guestfs-actions.pod:6650 ../src/guestfs-actions.pod:6687
18590 msgid "(Added in 1.3.18)"
18595 #: ../src/guestfs-actions.pod:6652
18596 msgid "guestfs_vfs_type"
18601 #: ../src/guestfs-actions.pod:6654
18605 " guestfs_vfs_type (guestfs_h *g,\n"
18606 " const char *device);\n"
18612 #: ../src/guestfs-actions.pod:6658 ../fish/guestfish-actions.pod:4446
18614 "This command gets the filesystem type corresponding to the filesystem on "
18620 #: ../src/guestfs-actions.pod:6661 ../fish/guestfish-actions.pod:4449
18622 "For most filesystems, the result is the name of the Linux VFS module which "
18623 "would be used to mount this filesystem if you mounted it without specifying "
18624 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
18629 #: ../src/guestfs-actions.pod:6671
18630 msgid "guestfs_vfs_uuid"
18635 #: ../src/guestfs-actions.pod:6673
18639 " guestfs_vfs_uuid (guestfs_h *g,\n"
18640 " const char *device);\n"
18646 #: ../src/guestfs-actions.pod:6677 ../fish/guestfish-actions.pod:4458
18647 msgid "This returns the filesystem UUID of the filesystem on C<device>."
18652 #: ../src/guestfs-actions.pod:6680 ../fish/guestfish-actions.pod:4461
18653 msgid "If the filesystem does not have a UUID, this returns the empty string."
18658 #: ../src/guestfs-actions.pod:6682
18659 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
18664 #: ../src/guestfs-actions.pod:6689
18665 msgid "guestfs_vg_activate"
18670 #: ../src/guestfs-actions.pod:6691
18674 " guestfs_vg_activate (guestfs_h *g,\n"
18676 " char *const *volgroups);\n"
18682 #: ../src/guestfs-actions.pod:6696 ../fish/guestfish-actions.pod:4469
18684 "This command activates or (if C<activate> is false) deactivates all logical "
18685 "volumes in the listed volume groups C<volgroups>. If activated, then they "
18686 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
18687 "deactivated, then those devices disappear."
18692 #: ../src/guestfs-actions.pod:6702 ../fish/guestfish-actions.pod:4475
18693 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
18698 #: ../src/guestfs-actions.pod:6704 ../fish/guestfish-actions.pod:4477
18700 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
18701 "activated or deactivated."
18706 #: ../src/guestfs-actions.pod:6711
18707 msgid "guestfs_vg_activate_all"
18712 #: ../src/guestfs-actions.pod:6713
18716 " guestfs_vg_activate_all (guestfs_h *g,\n"
18717 " int activate);\n"
18723 #: ../src/guestfs-actions.pod:6717 ../fish/guestfish-actions.pod:4484
18725 "This command activates or (if C<activate> is false) deactivates all logical "
18726 "volumes in all volume groups. If activated, then they are made known to the "
18727 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
18728 "those devices disappear."
18733 #: ../src/guestfs-actions.pod:6723 ../fish/guestfish-actions.pod:4490
18734 msgid "This command is the same as running C<vgchange -a y|n>"
18739 #: ../src/guestfs-actions.pod:6729
18740 msgid "guestfs_vgcreate"
18745 #: ../src/guestfs-actions.pod:6731
18749 " guestfs_vgcreate (guestfs_h *g,\n"
18750 " const char *volgroup,\n"
18751 " char *const *physvols);\n"
18757 #: ../src/guestfs-actions.pod:6736 ../fish/guestfish-actions.pod:4496
18759 "This creates an LVM volume group called C<volgroup> from the non-empty list "
18760 "of physical volumes C<physvols>."
18765 #: ../src/guestfs-actions.pod:6743
18766 msgid "guestfs_vglvuuids"
18771 #: ../src/guestfs-actions.pod:6745
18775 " guestfs_vglvuuids (guestfs_h *g,\n"
18776 " const char *vgname);\n"
18782 #: ../src/guestfs-actions.pod:6749 ../fish/guestfish-actions.pod:4503
18784 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
18785 "volumes created in this volume group."
18790 #: ../src/guestfs-actions.pod:6752
18792 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
18793 "associate logical volumes and volume groups."
18798 #: ../src/guestfs-actions.pod:6755
18799 msgid "See also C<guestfs_vgpvuuids>."
18804 #: ../src/guestfs-actions.pod:6763
18805 msgid "guestfs_vgpvuuids"
18810 #: ../src/guestfs-actions.pod:6765
18814 " guestfs_vgpvuuids (guestfs_h *g,\n"
18815 " const char *vgname);\n"
18821 #: ../src/guestfs-actions.pod:6769 ../fish/guestfish-actions.pod:4515
18823 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
18824 "volumes that this volume group resides on."
18829 #: ../src/guestfs-actions.pod:6772
18831 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
18832 "associate physical volumes and volume groups."
18837 #: ../src/guestfs-actions.pod:6775
18838 msgid "See also C<guestfs_vglvuuids>."
18843 #: ../src/guestfs-actions.pod:6783
18844 msgid "guestfs_vgremove"
18849 #: ../src/guestfs-actions.pod:6785
18853 " guestfs_vgremove (guestfs_h *g,\n"
18854 " const char *vgname);\n"
18860 #: ../src/guestfs-actions.pod:6789 ../fish/guestfish-actions.pod:4527
18861 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
18866 #: ../src/guestfs-actions.pod:6791 ../fish/guestfish-actions.pod:4529
18868 "This also forcibly removes all logical volumes in the volume group (if any)."
18873 #: ../src/guestfs-actions.pod:6798
18874 msgid "guestfs_vgrename"
18879 #: ../src/guestfs-actions.pod:6800
18883 " guestfs_vgrename (guestfs_h *g,\n"
18884 " const char *volgroup,\n"
18885 " const char *newvolgroup);\n"
18891 #: ../src/guestfs-actions.pod:6805 ../fish/guestfish-actions.pod:4536
18892 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
18897 #: ../src/guestfs-actions.pod:6811
18898 msgid "guestfs_vgs"
18903 #: ../src/guestfs-actions.pod:6813
18907 " guestfs_vgs (guestfs_h *g);\n"
18913 #: ../src/guestfs-actions.pod:6816 ../fish/guestfish-actions.pod:4542
18915 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
18921 #: ../src/guestfs-actions.pod:6819 ../fish/guestfish-actions.pod:4545
18923 "This returns a list of just the volume group names that were detected (eg. "
18929 #: ../src/guestfs-actions.pod:6822
18930 msgid "See also C<guestfs_vgs_full>."
18935 #: ../src/guestfs-actions.pod:6830
18936 msgid "guestfs_vgs_full"
18941 #: ../src/guestfs-actions.pod:6832
18944 " struct guestfs_lvm_vg_list *\n"
18945 " guestfs_vgs_full (guestfs_h *g);\n"
18951 #: ../src/guestfs-actions.pod:6835 ../fish/guestfish-actions.pod:4554
18953 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
18954 "> command. The \"full\" version includes all fields."
18959 #: ../src/guestfs-actions.pod:6838
18961 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
18962 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
18967 #: ../src/guestfs-actions.pod:6844
18968 msgid "guestfs_vgscan"
18973 #: ../src/guestfs-actions.pod:6846
18977 " guestfs_vgscan (guestfs_h *g);\n"
18983 #: ../src/guestfs-actions.pod:6849 ../fish/guestfish-actions.pod:4561
18985 "This rescans all block devices and rebuilds the list of LVM physical "
18986 "volumes, volume groups and logical volumes."
18991 #: ../src/guestfs-actions.pod:6856
18992 msgid "guestfs_vguuid"
18997 #: ../src/guestfs-actions.pod:6858
19001 " guestfs_vguuid (guestfs_h *g,\n"
19002 " const char *vgname);\n"
19008 #: ../src/guestfs-actions.pod:6862 ../fish/guestfish-actions.pod:4568
19009 msgid "This command returns the UUID of the LVM VG named C<vgname>."
19014 #: ../src/guestfs-actions.pod:6869
19015 msgid "guestfs_wait_ready"
19020 #: ../src/guestfs-actions.pod:6871
19024 " guestfs_wait_ready (guestfs_h *g);\n"
19030 #: ../src/guestfs-actions.pod:6874
19031 msgid "This function is a no op."
19036 #: ../src/guestfs-actions.pod:6876
19038 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
19039 "calling C<guestfs_launch> to wait for the launch to complete. However this "
19040 "is no longer necessary because C<guestfs_launch> now does the waiting."
19045 #: ../src/guestfs-actions.pod:6881
19047 "If you see any calls to this function in code then you can just remove them, "
19048 "unless you want to retain compatibility with older versions of the API."
19053 #: ../src/guestfs-actions.pod:6889
19054 msgid "guestfs_wc_c"
19059 #: ../src/guestfs-actions.pod:6891
19063 " guestfs_wc_c (guestfs_h *g,\n"
19064 " const char *path);\n"
19070 #: ../src/guestfs-actions.pod:6895 ../fish/guestfish-actions.pod:4574
19072 "This command counts the characters in a file, using the C<wc -c> external "
19078 #: ../src/guestfs-actions.pod:6902
19079 msgid "guestfs_wc_l"
19084 #: ../src/guestfs-actions.pod:6904
19088 " guestfs_wc_l (guestfs_h *g,\n"
19089 " const char *path);\n"
19095 #: ../src/guestfs-actions.pod:6908 ../fish/guestfish-actions.pod:4581
19097 "This command counts the lines in a file, using the C<wc -l> external command."
19102 #: ../src/guestfs-actions.pod:6915
19103 msgid "guestfs_wc_w"
19108 #: ../src/guestfs-actions.pod:6917
19112 " guestfs_wc_w (guestfs_h *g,\n"
19113 " const char *path);\n"
19119 #: ../src/guestfs-actions.pod:6921 ../fish/guestfish-actions.pod:4588
19121 "This command counts the words in a file, using the C<wc -w> external command."
19126 #: ../src/guestfs-actions.pod:6928
19127 msgid "guestfs_write"
19132 #: ../src/guestfs-actions.pod:6930
19136 " guestfs_write (guestfs_h *g,\n"
19137 " const char *path,\n"
19138 " const char *content,\n"
19139 " size_t content_size);\n"
19145 #: ../src/guestfs-actions.pod:6936 ../fish/guestfish-actions.pod:4595
19147 "This call creates a file called C<path>. The content of the file is the "
19148 "string C<content> (which can contain any 8 bit data)."
19153 #: ../src/guestfs-actions.pod:6946
19154 msgid "guestfs_write_file"
19159 #: ../src/guestfs-actions.pod:6948
19163 " guestfs_write_file (guestfs_h *g,\n"
19164 " const char *path,\n"
19165 " const char *content,\n"
19172 #: ../src/guestfs-actions.pod:6954 ../fish/guestfish-actions.pod:4605
19174 "This call creates a file called C<path>. The contents of the file is the "
19175 "string C<content> (which can contain any 8 bit data), with length C<size>."
19180 #: ../src/guestfs-actions.pod:6958 ../fish/guestfish-actions.pod:4609
19182 "As a special case, if C<size> is C<0> then the length is calculated using "
19183 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
19188 #: ../src/guestfs-actions.pod:6962 ../fish/guestfish-actions.pod:4613
19190 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
19191 "I<not> work, even if the length is specified."
19196 #: ../src/guestfs-actions.pod:6970 ../fish/guestfish-actions.pod:4619
19198 "This function is deprecated. In new code, use the C<write> call instead."
19203 #: ../src/guestfs-actions.pod:6979
19204 msgid "guestfs_zegrep"
19209 #: ../src/guestfs-actions.pod:6981
19213 " guestfs_zegrep (guestfs_h *g,\n"
19214 " const char *regex,\n"
19215 " const char *path);\n"
19221 #: ../src/guestfs-actions.pod:6986 ../fish/guestfish-actions.pod:4630
19223 "This calls the external C<zegrep> program and returns the matching lines."
19228 #: ../src/guestfs-actions.pod:6998
19229 msgid "guestfs_zegrepi"
19234 #: ../src/guestfs-actions.pod:7000
19238 " guestfs_zegrepi (guestfs_h *g,\n"
19239 " const char *regex,\n"
19240 " const char *path);\n"
19246 #: ../src/guestfs-actions.pod:7005 ../fish/guestfish-actions.pod:4640
19248 "This calls the external C<zegrep -i> program and returns the matching lines."
19253 #: ../src/guestfs-actions.pod:7017
19254 msgid "guestfs_zero"
19259 #: ../src/guestfs-actions.pod:7019
19263 " guestfs_zero (guestfs_h *g,\n"
19264 " const char *device);\n"
19270 #: ../src/guestfs-actions.pod:7023 ../fish/guestfish-actions.pod:4650
19271 msgid "This command writes zeroes over the first few blocks of C<device>."
19276 #: ../src/guestfs-actions.pod:7025 ../fish/guestfish-actions.pod:4652
19278 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
19279 "securely wipe the device). It should be sufficient to remove any partition "
19280 "tables, filesystem superblocks and so on."
19285 #: ../src/guestfs-actions.pod:7029
19286 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
19291 #: ../src/guestfs-actions.pod:7040
19292 msgid "guestfs_zero_device"
19297 #: ../src/guestfs-actions.pod:7042
19301 " guestfs_zero_device (guestfs_h *g,\n"
19302 " const char *device);\n"
19308 #: ../src/guestfs-actions.pod:7046
19310 "This command writes zeroes over the entire C<device>. Compare with "
19311 "C<guestfs_zero> which just zeroes the first few blocks of a device."
19316 #: ../src/guestfs-actions.pod:7060
19317 msgid "(Added in 1.3.1)"
19322 #: ../src/guestfs-actions.pod:7062
19323 msgid "guestfs_zerofree"
19328 #: ../src/guestfs-actions.pod:7064
19332 " guestfs_zerofree (guestfs_h *g,\n"
19333 " const char *device);\n"
19339 #: ../src/guestfs-actions.pod:7068 ../fish/guestfish-actions.pod:4673
19341 "This runs the I<zerofree> program on C<device>. This program claims to zero "
19342 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
19343 "possible to compress the filesystem more effectively."
19348 #: ../src/guestfs-actions.pod:7073 ../fish/guestfish-actions.pod:4678
19349 msgid "You should B<not> run this program if the filesystem is mounted."
19354 #: ../src/guestfs-actions.pod:7076 ../fish/guestfish-actions.pod:4681
19356 "It is possible that using this program can damage the filesystem or data on "
19362 #: ../src/guestfs-actions.pod:7083
19363 msgid "guestfs_zfgrep"
19368 #: ../src/guestfs-actions.pod:7085
19372 " guestfs_zfgrep (guestfs_h *g,\n"
19373 " const char *pattern,\n"
19374 " const char *path);\n"
19380 #: ../src/guestfs-actions.pod:7090 ../fish/guestfish-actions.pod:4688
19382 "This calls the external C<zfgrep> program and returns the matching lines."
19387 #: ../src/guestfs-actions.pod:7102
19388 msgid "guestfs_zfgrepi"
19393 #: ../src/guestfs-actions.pod:7104
19397 " guestfs_zfgrepi (guestfs_h *g,\n"
19398 " const char *pattern,\n"
19399 " const char *path);\n"
19405 #: ../src/guestfs-actions.pod:7109 ../fish/guestfish-actions.pod:4698
19407 "This calls the external C<zfgrep -i> program and returns the matching lines."
19412 #: ../src/guestfs-actions.pod:7121
19413 msgid "guestfs_zfile"
19418 #: ../src/guestfs-actions.pod:7123
19422 " guestfs_zfile (guestfs_h *g,\n"
19423 " const char *meth,\n"
19424 " const char *path);\n"
19430 #: ../src/guestfs-actions.pod:7128 ../fish/guestfish-actions.pod:4708
19432 "This command runs C<file> after first decompressing C<path> using C<method>."
19437 #: ../src/guestfs-actions.pod:7131 ../fish/guestfish-actions.pod:4711
19438 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
19443 #: ../src/guestfs-actions.pod:7133
19445 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
19451 #: ../src/guestfs-actions.pod:7139 ../fish/guestfish-actions.pod:4716
19453 "This function is deprecated. In new code, use the C<file> call instead."
19458 #: ../src/guestfs-actions.pod:7148
19459 msgid "guestfs_zgrep"
19464 #: ../src/guestfs-actions.pod:7150
19468 " guestfs_zgrep (guestfs_h *g,\n"
19469 " const char *regex,\n"
19470 " const char *path);\n"
19476 #: ../src/guestfs-actions.pod:7155 ../fish/guestfish-actions.pod:4727
19478 "This calls the external C<zgrep> program and returns the matching lines."
19483 #: ../src/guestfs-actions.pod:7167
19484 msgid "guestfs_zgrepi"
19489 #: ../src/guestfs-actions.pod:7169
19493 " guestfs_zgrepi (guestfs_h *g,\n"
19494 " const char *regex,\n"
19495 " const char *path);\n"
19501 #: ../src/guestfs-actions.pod:7174 ../fish/guestfish-actions.pod:4737
19503 "This calls the external C<zgrep -i> program and returns the matching lines."
19508 #: ../src/guestfs-availability.pod:3
19514 #: ../src/guestfs-availability.pod:5
19516 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
19517 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
19518 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
19519 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
19520 "L</guestfs_aug_save> L</guestfs_aug_set>"
19525 #: ../src/guestfs-availability.pod:21
19531 #: ../src/guestfs-availability.pod:23
19533 "The following functions: L</guestfs_inotify_add_watch> L</"
19534 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
19535 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
19540 #: ../src/guestfs-availability.pod:31
19541 msgid "B<linuxfsuuid>"
19546 #: ../src/guestfs-availability.pod:33
19548 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
19549 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
19554 #: ../src/guestfs-availability.pod:40
19555 msgid "B<linuxmodules>"
19560 #: ../src/guestfs-availability.pod:42
19561 msgid "The following functions: L</guestfs_modprobe>"
19566 #: ../src/guestfs-availability.pod:45
19567 msgid "B<linuxxattrs>"
19572 #: ../src/guestfs-availability.pod:47
19574 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
19575 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
19576 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
19577 "guestfs_setxattr>"
19582 #: ../src/guestfs-availability.pod:58
19588 #: ../src/guestfs-availability.pod:60
19590 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
19591 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
19592 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
19597 #: ../src/guestfs-availability.pod:69
19603 #: ../src/guestfs-availability.pod:71
19605 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
19606 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
19607 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
19608 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
19609 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
19610 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
19611 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
19616 #: ../src/guestfs-availability.pod:94
19622 #: ../src/guestfs-availability.pod:96
19624 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
19625 "guestfs_mknod_b> L</guestfs_mknod_c>"
19630 #: ../src/guestfs-availability.pod:102
19636 #: ../src/guestfs-availability.pod:104
19637 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
19642 #: ../src/guestfs-availability.pod:107
19643 msgid "B<ntfsprogs>"
19648 #: ../src/guestfs-availability.pod:109
19650 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
19655 #: ../src/guestfs-availability.pod:113
19656 msgid "B<realpath>"
19661 #: ../src/guestfs-availability.pod:115
19662 msgid "The following functions: L</guestfs_realpath>"
19667 #: ../src/guestfs-availability.pod:118
19673 #: ../src/guestfs-availability.pod:120
19675 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
19676 "guestfs_scrub_freespace>"
19681 #: ../src/guestfs-availability.pod:125
19687 #: ../src/guestfs-availability.pod:127
19688 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
19693 #: ../src/guestfs-availability.pod:131
19699 #: ../src/guestfs-availability.pod:133
19700 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
19705 #: ../src/guestfs-availability.pod:137
19706 msgid "B<zerofree>"
19711 #: ../src/guestfs-availability.pod:139
19712 msgid "The following functions: L</guestfs_zerofree>"
19717 #: ../src/guestfs-structs.pod:1
19718 msgid "guestfs_int_bool"
19723 #: ../src/guestfs-structs.pod:3
19726 " struct guestfs_int_bool {\n"
19735 #: ../src/guestfs-structs.pod:8
19738 " struct guestfs_int_bool_list {\n"
19739 " uint32_t len; /* Number of elements in list. */\n"
19740 " struct guestfs_int_bool *val; /* Elements. */\n"
19747 #: ../src/guestfs-structs.pod:13
19750 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
19751 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
19757 #: ../src/guestfs-structs.pod:16
19758 msgid "guestfs_lvm_pv"
19763 #: ../src/guestfs-structs.pod:18
19766 " struct guestfs_lvm_pv {\n"
19767 " char *pv_name;\n"
19768 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
19769 " char pv_uuid[32];\n"
19771 " uint64_t pv_size;\n"
19772 " uint64_t dev_size;\n"
19773 " uint64_t pv_free;\n"
19774 " uint64_t pv_used;\n"
19775 " char *pv_attr;\n"
19776 " int64_t pv_pe_count;\n"
19777 " int64_t pv_pe_alloc_count;\n"
19778 " char *pv_tags;\n"
19779 " uint64_t pe_start;\n"
19780 " int64_t pv_mda_count;\n"
19781 " uint64_t pv_mda_free;\n"
19788 #: ../src/guestfs-structs.pod:36
19791 " struct guestfs_lvm_pv_list {\n"
19792 " uint32_t len; /* Number of elements in list. */\n"
19793 " struct guestfs_lvm_pv *val; /* Elements. */\n"
19800 #: ../src/guestfs-structs.pod:41
19803 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
19804 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
19810 #: ../src/guestfs-structs.pod:44
19811 msgid "guestfs_lvm_vg"
19816 #: ../src/guestfs-structs.pod:46
19819 " struct guestfs_lvm_vg {\n"
19820 " char *vg_name;\n"
19821 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
19822 " char vg_uuid[32];\n"
19824 " char *vg_attr;\n"
19825 " uint64_t vg_size;\n"
19826 " uint64_t vg_free;\n"
19827 " char *vg_sysid;\n"
19828 " uint64_t vg_extent_size;\n"
19829 " int64_t vg_extent_count;\n"
19830 " int64_t vg_free_count;\n"
19831 " int64_t max_lv;\n"
19832 " int64_t max_pv;\n"
19833 " int64_t pv_count;\n"
19834 " int64_t lv_count;\n"
19835 " int64_t snap_count;\n"
19836 " int64_t vg_seqno;\n"
19837 " char *vg_tags;\n"
19838 " int64_t vg_mda_count;\n"
19839 " uint64_t vg_mda_free;\n"
19846 #: ../src/guestfs-structs.pod:69
19849 " struct guestfs_lvm_vg_list {\n"
19850 " uint32_t len; /* Number of elements in list. */\n"
19851 " struct guestfs_lvm_vg *val; /* Elements. */\n"
19858 #: ../src/guestfs-structs.pod:74
19861 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
19862 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
19868 #: ../src/guestfs-structs.pod:77
19869 msgid "guestfs_lvm_lv"
19874 #: ../src/guestfs-structs.pod:79
19877 " struct guestfs_lvm_lv {\n"
19878 " char *lv_name;\n"
19879 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
19880 " char lv_uuid[32];\n"
19881 " char *lv_attr;\n"
19882 " int64_t lv_major;\n"
19883 " int64_t lv_minor;\n"
19884 " int64_t lv_kernel_major;\n"
19885 " int64_t lv_kernel_minor;\n"
19886 " uint64_t lv_size;\n"
19887 " int64_t seg_count;\n"
19889 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
19890 " float snap_percent;\n"
19891 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
19892 " float copy_percent;\n"
19893 " char *move_pv;\n"
19894 " char *lv_tags;\n"
19895 " char *mirror_log;\n"
19896 " char *modules;\n"
19903 #: ../src/guestfs-structs.pod:101
19906 " struct guestfs_lvm_lv_list {\n"
19907 " uint32_t len; /* Number of elements in list. */\n"
19908 " struct guestfs_lvm_lv *val; /* Elements. */\n"
19915 #: ../src/guestfs-structs.pod:106
19918 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
19919 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
19925 #: ../src/guestfs-structs.pod:111
19928 " struct guestfs_stat {\n"
19932 " int64_t nlink;\n"
19937 " int64_t blksize;\n"
19938 " int64_t blocks;\n"
19939 " int64_t atime;\n"
19940 " int64_t mtime;\n"
19941 " int64_t ctime;\n"
19948 #: ../src/guestfs-structs.pod:127
19951 " struct guestfs_stat_list {\n"
19952 " uint32_t len; /* Number of elements in list. */\n"
19953 " struct guestfs_stat *val; /* Elements. */\n"
19960 #: ../src/guestfs-structs.pod:132
19963 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
19964 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
19970 #: ../src/guestfs-structs.pod:137
19973 " struct guestfs_statvfs {\n"
19974 " int64_t bsize;\n"
19975 " int64_t frsize;\n"
19976 " int64_t blocks;\n"
19977 " int64_t bfree;\n"
19978 " int64_t bavail;\n"
19979 " int64_t files;\n"
19980 " int64_t ffree;\n"
19981 " int64_t favail;\n"
19984 " int64_t namemax;\n"
19991 #: ../src/guestfs-structs.pod:151
19994 " struct guestfs_statvfs_list {\n"
19995 " uint32_t len; /* Number of elements in list. */\n"
19996 " struct guestfs_statvfs *val; /* Elements. */\n"
20003 #: ../src/guestfs-structs.pod:156
20006 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
20007 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
20013 #: ../src/guestfs-structs.pod:159
20014 msgid "guestfs_dirent"
20019 #: ../src/guestfs-structs.pod:161
20022 " struct guestfs_dirent {\n"
20032 #: ../src/guestfs-structs.pod:167
20035 " struct guestfs_dirent_list {\n"
20036 " uint32_t len; /* Number of elements in list. */\n"
20037 " struct guestfs_dirent *val; /* Elements. */\n"
20044 #: ../src/guestfs-structs.pod:172
20047 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
20048 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
20054 #: ../src/guestfs-structs.pod:177
20057 " struct guestfs_version {\n"
20058 " int64_t major;\n"
20059 " int64_t minor;\n"
20060 " int64_t release;\n"
20068 #: ../src/guestfs-structs.pod:184
20071 " struct guestfs_version_list {\n"
20072 " uint32_t len; /* Number of elements in list. */\n"
20073 " struct guestfs_version *val; /* Elements. */\n"
20080 #: ../src/guestfs-structs.pod:189
20083 " void guestfs_free_version (struct guestfs_free_version *);\n"
20084 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
20090 #: ../src/guestfs-structs.pod:192
20091 msgid "guestfs_xattr"
20096 #: ../src/guestfs-structs.pod:194
20099 " struct guestfs_xattr {\n"
20100 " char *attrname;\n"
20101 " /* The next two fields describe a byte array. */\n"
20102 " uint32_t attrval_len;\n"
20103 " char *attrval;\n"
20110 #: ../src/guestfs-structs.pod:201
20113 " struct guestfs_xattr_list {\n"
20114 " uint32_t len; /* Number of elements in list. */\n"
20115 " struct guestfs_xattr *val; /* Elements. */\n"
20122 #: ../src/guestfs-structs.pod:206
20125 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
20126 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
20132 #: ../src/guestfs-structs.pod:209
20133 msgid "guestfs_inotify_event"
20138 #: ../src/guestfs-structs.pod:211
20141 " struct guestfs_inotify_event {\n"
20142 " int64_t in_wd;\n"
20143 " uint32_t in_mask;\n"
20144 " uint32_t in_cookie;\n"
20145 " char *in_name;\n"
20152 #: ../src/guestfs-structs.pod:218
20155 " struct guestfs_inotify_event_list {\n"
20156 " uint32_t len; /* Number of elements in list. */\n"
20157 " struct guestfs_inotify_event *val; /* Elements. */\n"
20164 #: ../src/guestfs-structs.pod:223
20167 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
20168 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
20174 #: ../src/guestfs-structs.pod:226
20175 msgid "guestfs_partition"
20180 #: ../src/guestfs-structs.pod:228
20183 " struct guestfs_partition {\n"
20184 " int32_t part_num;\n"
20185 " uint64_t part_start;\n"
20186 " uint64_t part_end;\n"
20187 " uint64_t part_size;\n"
20194 #: ../src/guestfs-structs.pod:235
20197 " struct guestfs_partition_list {\n"
20198 " uint32_t len; /* Number of elements in list. */\n"
20199 " struct guestfs_partition *val; /* Elements. */\n"
20206 #: ../src/guestfs-structs.pod:240
20209 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
20210 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
20216 #: ../src/guestfs-structs.pod:243
20217 msgid "guestfs_application"
20222 #: ../src/guestfs-structs.pod:245
20225 " struct guestfs_application {\n"
20226 " char *app_name;\n"
20227 " char *app_display_name;\n"
20228 " int32_t app_epoch;\n"
20229 " char *app_version;\n"
20230 " char *app_release;\n"
20231 " char *app_install_path;\n"
20232 " char *app_trans_path;\n"
20233 " char *app_publisher;\n"
20234 " char *app_url;\n"
20235 " char *app_source_package;\n"
20236 " char *app_summary;\n"
20237 " char *app_description;\n"
20244 #: ../src/guestfs-structs.pod:260
20247 " struct guestfs_application_list {\n"
20248 " uint32_t len; /* Number of elements in list. */\n"
20249 " struct guestfs_application *val; /* Elements. */\n"
20256 #: ../src/guestfs-structs.pod:265
20259 " void guestfs_free_application (struct guestfs_free_application *);\n"
20260 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
20266 #: ../fish/guestfish.pod:5
20267 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
20272 #: ../fish/guestfish.pod:9
20275 " guestfish [--options] [commands]\n"
20281 #: ../fish/guestfish.pod:11
20290 #: ../fish/guestfish.pod:13
20293 " guestfish [--ro|--rw] -a disk.img\n"
20299 #: ../fish/guestfish.pod:15
20302 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
20308 #: ../fish/guestfish.pod:17
20311 " guestfish -d libvirt-domain\n"
20317 #: ../fish/guestfish.pod:19
20320 " guestfish [--ro|--rw] -a disk.img -i\n"
20326 #: ../fish/guestfish.pod:21
20329 " guestfish -d libvirt-domain -i\n"
20335 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15 ../tools/virt-edit.pl:44
20336 #: ../tools/virt-win-reg.pl:51 ../tools/virt-tar.pl:64
20342 #: ../fish/guestfish.pod:25
20344 "Using guestfish in read/write mode on live virtual machines can be "
20345 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
20346 "option to use guestfish safely if the disk image or virtual machine might be "
20352 #: ../fish/guestfish.pod:32
20354 "Guestfish is a shell and command-line tool for examining and modifying "
20355 "virtual machine filesystems. It uses libguestfs and exposes all of the "
20356 "functionality of the guestfs API, see L<guestfs(3)>."
20361 #: ../fish/guestfish.pod:36
20363 "Guestfish gives you structured access to the libguestfs API, from shell "
20364 "scripts or the command line or interactively. If you want to rescue a "
20365 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
20371 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:897
20372 #: ../fuse/guestmount.pod:39 ../tools/virt-edit.pl:58
20373 #: ../tools/virt-resize.pl:64 ../tools/virt-tar.pl:50
20379 #: ../fish/guestfish.pod:43
20380 msgid "As an interactive shell"
20385 #: ../fish/guestfish.pod:45
20394 #: ../fish/guestfish.pod:47
20397 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
20398 " editing virtual machine filesystems.\n"
20404 #: ../fish/guestfish.pod:50
20407 " Type: 'help' for a list of commands\n"
20408 " 'man' to read the manual\n"
20409 " 'quit' to quit the shell\n"
20415 #: ../fish/guestfish.pod:54
20418 " ><fs> add-ro disk.img\n"
20420 " ><fs> list-filesystems\n"
20421 " /dev/sda1: ext4\n"
20422 " /dev/vg_guest/lv_root: ext4\n"
20423 " /dev/vg_guest/lv_swap: swap\n"
20424 " ><fs> mount /dev/vg_guest/lv_root /\n"
20425 " ><fs> cat /etc/fstab\n"
20427 " # Created by anaconda\n"
20435 #: ../fish/guestfish.pod:67
20436 msgid "From shell scripts"
20441 #: ../fish/guestfish.pod:69
20442 msgid "Create a new C</etc/motd> file in a guest or disk image:"
20447 #: ../fish/guestfish.pod:71
20450 " guestfish <<_EOF_\n"
20453 " mount /dev/vg_guest/lv_root /\n"
20454 " write /etc/motd \"Welcome, new users\"\n"
20461 #: ../fish/guestfish.pod:78
20462 msgid "List the LVM logical volumes in a disk image:"
20467 #: ../fish/guestfish.pod:80
20470 " guestfish -a disk.img --ro <<_EOF_\n"
20479 #: ../fish/guestfish.pod:85
20480 msgid "List all the filesystems in a disk image:"
20485 #: ../fish/guestfish.pod:87
20488 " guestfish -a disk.img --ro <<_EOF_\n"
20490 " list-filesystems\n"
20497 #: ../fish/guestfish.pod:92
20498 msgid "On one command line"
20503 #: ../fish/guestfish.pod:94
20504 msgid "Update C</etc/resolv.conf> in a guest:"
20509 #: ../fish/guestfish.pod:96
20513 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
20514 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
20520 #: ../fish/guestfish.pod:100
20521 msgid "Edit C</boot/grub/grub.conf> interactively:"
20526 #: ../fish/guestfish.pod:102
20529 " guestfish --rw --add disk.img \\\n"
20530 " --mount /dev/vg_guest/lv_root \\\n"
20531 " --mount /dev/sda1:/boot \\\n"
20532 " edit /boot/grub/grub.conf\n"
20538 #: ../fish/guestfish.pod:107
20539 msgid "Mount disks automatically"
20544 #: ../fish/guestfish.pod:109
20546 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
20551 #: ../fish/guestfish.pod:112
20554 " guestfish --ro -a disk.img -i cat /etc/group\n"
20560 #: ../fish/guestfish.pod:114
20563 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
20569 #: ../fish/guestfish.pod:116
20570 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
20575 #: ../fish/guestfish.pod:118
20578 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
20584 #: ../fish/guestfish.pod:120
20585 msgid "As a script interpreter"
20590 #: ../fish/guestfish.pod:122
20591 msgid "Create a 100MB disk containing an ext2-formatted partition:"
20596 #: ../fish/guestfish.pod:124
20599 " #!/usr/bin/guestfish -f\n"
20600 " sparse test1.img 100M\n"
20602 " part-disk /dev/sda mbr\n"
20603 " mkfs ext2 /dev/sda1\n"
20609 #: ../fish/guestfish.pod:130
20610 msgid "Start with a prepared disk"
20615 #: ../fish/guestfish.pod:132
20617 "An alternate way to create a 100MB disk called C<test1.img> containing a "
20618 "single ext2-formatted partition:"
20623 #: ../fish/guestfish.pod:135
20626 " guestfish -N fs\n"
20632 #: ../fish/guestfish.pod:137
20633 msgid "To list what is available do:"
20638 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:888
20641 " guestfish -N help | less\n"
20647 #: ../fish/guestfish.pod:141
20648 msgid "Remote control"
20653 #: ../fish/guestfish.pod:143
20656 " eval \"`guestfish --listen`\"\n"
20657 " guestfish --remote add-ro disk.img\n"
20658 " guestfish --remote run\n"
20659 " guestfish --remote lvs\n"
20665 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37
20666 #: ../fuse/guestmount.pod:73 ../tools/virt-edit.pl:72
20667 #: ../tools/virt-win-reg.pl:96 ../tools/virt-resize.pl:254
20668 #: ../tools/virt-list-filesystems.pl:53 ../tools/virt-tar.pl:103
20669 #: ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:54
20675 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:131
20676 #: ../tools/virt-edit.pl:80 ../tools/virt-win-reg.pl:104
20677 #: ../tools/virt-resize.pl:262 ../tools/virt-list-filesystems.pl:61
20678 #: ../tools/virt-tar.pl:111 ../tools/virt-make-fs.pl:161
20679 #: ../tools/virt-list-partitions.pl:62
20685 #: ../fish/guestfish.pod:154
20686 msgid "Displays general help on options."
20691 #: ../fish/guestfish.pod:156
20697 #: ../fish/guestfish.pod:158
20698 msgid "B<--cmd-help>"
20703 #: ../fish/guestfish.pod:160
20704 msgid "Lists all available guestfish commands."
20709 #: ../fish/guestfish.pod:162
20715 #: ../fish/guestfish.pod:164
20716 msgid "B<--cmd-help cmd>"
20721 #: ../fish/guestfish.pod:166
20722 msgid "Displays detailed help on a single command C<cmd>."
20727 #: ../fish/guestfish.pod:168
20728 msgid "B<-a image>"
20733 #: ../fish/guestfish.pod:170
20734 msgid "B<--add image>"
20739 #: ../fish/guestfish.pod:172
20740 msgid "Add a block device or virtual machine image to the shell."
20745 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:81
20747 "The format of the disk image is auto-detected. To override this and force a "
20748 "particular format use the I<--format=..> option."
20753 #: ../fish/guestfish.pod:177
20755 "Using this flag is mostly equivalent to using the C<add> command, with "
20756 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
20757 "the I<--format:...> flag was given."
20762 #: ../fish/guestfish.pod:181
20768 #: ../fish/guestfish.pod:183
20769 msgid "B<--connect URI>"
20774 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:86
20776 "When used in conjunction with the I<-d> option, this specifies the libvirt "
20777 "URI to use. The default is to use the default libvirt connection."
20782 #: ../fish/guestfish.pod:189
20788 #: ../fish/guestfish.pod:191
20790 "If using the I<--listen> option and a csh-like shell, use this option. See "
20791 "section L</REMOTE CONTROL AND CSH> below."
20796 #: ../fish/guestfish.pod:194
20797 msgid "B<-d libvirt-domain>"
20802 #: ../fish/guestfish.pod:196
20803 msgid "B<--domain libvirt-domain>"
20808 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:92
20810 "Add disks from the named libvirt domain. If the I<--ro> option is also "
20811 "used, then any libvirt domain can be used. However in write mode, only "
20812 "libvirt domains which are shut down can be named here."
20817 #: ../fish/guestfish.pod:202
20819 "Using this flag is mostly equivalent to using the C<add-domain> command, "
20820 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
20821 "if the I<--format:...> flag was given."
20826 #: ../fish/guestfish.pod:206
20832 #: ../fish/guestfish.pod:208
20833 msgid "B<--no-dest-paths>"
20838 #: ../fish/guestfish.pod:210
20840 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
20841 "to hit the tab key to complete paths on the guest filesystem, but this "
20842 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
20843 "allow this feature to be disabled."
20848 #: ../fish/guestfish.pod:215 ../fuse/guestmount.pod:108
20849 msgid "B<--echo-keys>"
20854 #: ../fish/guestfish.pod:217 ../fuse/guestmount.pod:110
20856 "When prompting for keys and passphrases, guestfish normally turns echoing "
20857 "off so you cannot see what you are typing. If you are not worried about "
20858 "Tempest attacks and there is no one else in the room you can specify this "
20859 "flag to see what you are typing."
20864 #: ../fish/guestfish.pod:222
20870 #: ../fish/guestfish.pod:224
20871 msgid "B<--file file>"
20876 #: ../fish/guestfish.pod:226
20877 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
20882 #: ../fish/guestfish.pod:229
20885 " #!/usr/bin/guestfish -f\n"
20891 #: ../fish/guestfish.pod:231
20892 msgid "B<--format=raw|qcow2|..>"
20897 #: ../fish/guestfish.pod:233
20898 msgid "B<--format>"
20903 #: ../fish/guestfish.pod:235 ../fuse/guestmount.pod:117
20905 "The default for the I<-a> option is to auto-detect the format of the disk "
20906 "image. Using this forces the disk format for I<-a> options which follow on "
20907 "the command line. Using I<--format> with no argument switches back to auto-"
20908 "detection for subsequent I<-a> options."
20913 #: ../fish/guestfish.pod:242
20916 " guestfish --format=raw -a disk.img\n"
20922 #: ../fish/guestfish.pod:244
20923 msgid "forces raw format (no auto-detection) for C<disk.img>."
20928 #: ../fish/guestfish.pod:246
20931 " guestfish --format=raw -a disk.img --format -a another.img\n"
20937 #: ../fish/guestfish.pod:248
20939 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
20940 "detection for C<another.img>."
20945 #: ../fish/guestfish.pod:251
20947 "If you have untrusted raw-format guest disk images, you should use this "
20948 "option to specify the disk format. This avoids a possible security problem "
20949 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
20954 #: ../fish/guestfish.pod:256
20960 #: ../fish/guestfish.pod:258
20961 msgid "B<--inspector>"
20966 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:137
20968 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
20969 "system and mount filesystems as they would be mounted on the real virtual "
20975 #: ../fish/guestfish.pod:264
20976 msgid "Typical usage is either:"
20981 #: ../fish/guestfish.pod:266
20984 " guestfish -d myguest -i\n"
20990 #: ../fish/guestfish.pod:268
20991 msgid "(for an inactive libvirt domain called I<myguest>), or:"
20996 #: ../fish/guestfish.pod:270
20999 " guestfish --ro -d myguest -i\n"
21005 #: ../fish/guestfish.pod:272
21006 msgid "(for active domains, readonly), or specify the block device directly:"
21011 #: ../fish/guestfish.pod:274
21014 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
21020 #: ../fish/guestfish.pod:276
21022 "Note that the command line syntax changed slightly over older versions of "
21023 "guestfish. You can still use the old syntax:"
21028 #: ../fish/guestfish.pod:279
21031 " guestfish [--ro] -i disk.img\n"
21037 #: ../fish/guestfish.pod:281
21040 " guestfish [--ro] -i libvirt-domain\n"
21046 #: ../fish/guestfish.pod:283
21048 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
21049 "then using other commands to mount the filesystems that were found."
21054 #: ../fish/guestfish.pod:287 ../fuse/guestmount.pod:141
21055 msgid "B<--keys-from-stdin>"
21060 #: ../fish/guestfish.pod:289 ../fuse/guestmount.pod:143
21062 "Read key or passphrase parameters from stdin. The default is to try to read "
21063 "passphrases from the user by opening C</dev/tty>."
21068 #: ../fish/guestfish.pod:292
21069 msgid "B<--listen>"
21074 #: ../fish/guestfish.pod:294
21076 "Fork into the background and listen for remote commands. See section L</"
21077 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
21082 #: ../fish/guestfish.pod:297
21083 msgid "B<-m dev[:mountpoint]>"
21088 #: ../fish/guestfish.pod:299
21089 msgid "B<--mount dev[:mountpoint]>"
21094 #: ../fish/guestfish.pod:301
21095 msgid "Mount the named partition or logical volume on the given mountpoint."
21100 #: ../fish/guestfish.pod:303
21101 msgid "If the mountpoint is omitted, it defaults to C</>."
21106 #: ../fish/guestfish.pod:305
21107 msgid "You have to mount something on C</> before most commands will work."
21112 #: ../fish/guestfish.pod:307
21114 "If any I<-m> or I<--mount> options are given, the guest is automatically "
21120 #: ../fish/guestfish.pod:310
21122 "If you don't know what filesystems a disk image contains, you can either run "
21123 "guestfish without this option, then list the partitions, filesystems and LVs "
21124 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
21125 "commands), or you can use the L<virt-filesystems(1)> program."
21130 #: ../fish/guestfish.pod:316
21132 "Using this flag is mostly equivalent to using the C<mount-options> command "
21133 "or the C<mount-ro> command if the I<--ro> flag was given."
21138 #: ../fish/guestfish.pod:319
21144 #: ../fish/guestfish.pod:321
21145 msgid "B<--no-sync>"
21150 #: ../fish/guestfish.pod:323
21152 "Disable autosync. This is enabled by default. See the discussion of "
21153 "autosync in the L<guestfs(3)> manpage."
21158 #: ../fish/guestfish.pod:326
21164 #: ../fish/guestfish.pod:328
21165 msgid "B<--new type>"
21170 #: ../fish/guestfish.pod:330
21176 #: ../fish/guestfish.pod:332
21178 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
21179 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
21180 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
21186 #: ../fish/guestfish.pod:337
21187 msgid "B<--progress-bars>"
21192 #: ../fish/guestfish.pod:339
21193 msgid "Enable progress bars, even when guestfish is used non-interactively."
21198 #: ../fish/guestfish.pod:341
21200 "Progress bars are enabled by default when guestfish is used as an "
21201 "interactive shell."
21206 #: ../fish/guestfish.pod:344
21207 msgid "B<--no-progress-bars>"
21212 #: ../fish/guestfish.pod:346
21213 msgid "Disable progress bars."
21218 #: ../fish/guestfish.pod:348
21219 msgid "B<--remote[=pid]>"
21224 #: ../fish/guestfish.pod:350
21226 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
21227 "CONTROL GUESTFISH OVER A SOCKET> below."
21232 #: ../fish/guestfish.pod:353
21238 #: ../fish/guestfish.pod:355
21244 #: ../fish/guestfish.pod:357
21246 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
21247 "mounts are done read-only."
21252 #: ../fish/guestfish.pod:360
21254 "The option must always be used if the disk image or virtual machine might be "
21255 "running, and is generally recommended in cases where you don't need write "
21256 "access to the disk."
21261 #: ../fish/guestfish.pod:364
21263 "Note that prepared disk images created with I<-N> are not affected by this "
21264 "option. Also commands like C<add> are not affected - you have to specify "
21265 "the C<readonly:true> option explicitly if you need it."
21270 #: ../fish/guestfish.pod:368
21271 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
21276 #: ../fish/guestfish.pod:370 ../fuse/guestmount.pod:208
21277 msgid "B<--selinux>"
21282 #: ../fish/guestfish.pod:372
21283 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
21288 #: ../fish/guestfish.pod:374
21294 #: ../fish/guestfish.pod:376
21295 msgid "B<--verbose>"
21300 #: ../fish/guestfish.pod:378
21302 "Enable very verbose messages. This is particularly useful if you find a bug."
21307 #: ../fish/guestfish.pod:381
21313 #: ../fish/guestfish.pod:383 ../tools/virt-edit.pl:88
21314 #: ../tools/virt-win-reg.pl:112 ../tools/virt-resize.pl:270
21315 #: ../tools/virt-list-filesystems.pl:69 ../tools/virt-tar.pl:119
21316 #: ../tools/virt-make-fs.pl:169 ../tools/virt-list-partitions.pl:70
21317 msgid "B<--version>"
21322 #: ../fish/guestfish.pod:385
21323 msgid "Display the guestfish / libguestfs version number and exit."
21328 #: ../fish/guestfish.pod:387
21334 #: ../fish/guestfish.pod:389
21340 #: ../fish/guestfish.pod:391
21342 "This option does nothing at the moment. See L</OPENING DISKS FOR READ AND "
21348 #: ../fish/guestfish.pod:394
21354 #: ../fish/guestfish.pod:396
21355 msgid "Echo each command before executing it."
21360 #: ../fish/guestfish.pod:400
21361 msgid "COMMANDS ON COMMAND LINE"
21366 #: ../fish/guestfish.pod:402
21368 "Any additional (non-option) arguments are treated as commands to execute."
21373 #: ../fish/guestfish.pod:405
21375 "Commands to execute should be separated by a colon (C<:>), where the colon "
21376 "is a separate parameter. Thus:"
21381 #: ../fish/guestfish.pod:408
21384 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
21390 #: ../fish/guestfish.pod:410
21392 "If there are no additional arguments, then we enter a shell, either an "
21393 "interactive shell with a prompt (if the input is a terminal) or a non-"
21394 "interactive shell."
21399 #: ../fish/guestfish.pod:414
21401 "In either command line mode or non-interactive shell, the first command that "
21402 "gives an error causes the whole shell to exit. In interactive mode (with a "
21403 "prompt) if a command fails, you can continue to enter commands."
21408 #: ../fish/guestfish.pod:419
21409 msgid "USING launch (OR run)"
21414 #: ../fish/guestfish.pod:421
21416 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
21417 "then launch it, then mount any disks you need, and finally issue actions/"
21418 "commands. So the general order of the day is:"
21423 #: ../fish/guestfish.pod:429
21424 msgid "add or -a/--add"
21429 #: ../fish/guestfish.pod:433
21430 msgid "launch (aka run)"
21435 #: ../fish/guestfish.pod:437
21436 msgid "mount or -m/--mount"
21441 #: ../fish/guestfish.pod:441
21442 msgid "any other commands"
21447 #: ../fish/guestfish.pod:445
21449 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
21450 "guest before mounting or performing any other commands."
21455 #: ../fish/guestfish.pod:448
21457 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
21458 "I<--new> options were given then C<run> is done automatically, simply "
21459 "because guestfish can't perform the action you asked for without doing this."
21464 #: ../fish/guestfish.pod:453
21465 msgid "OPENING DISKS FOR READ AND WRITE"
21470 #: ../fish/guestfish.pod:455
21472 "The guestfish (and L<guestmount(1)>) options I<--ro> and I<--rw> affect "
21473 "whether the other command line options I<-a>, I<-c>, I<-d>, I<-i> and I<-m> "
21474 "open disk images read-only or for writing."
21479 #: ../fish/guestfish.pod:459
21481 "In libguestfs E<lt> 1.6.2, guestfish and guestmount defaulted to opening "
21482 "disk images supplied on the command line for write. To open a disk image "
21483 "read-only you have to do I<-a image --ro>."
21488 #: ../fish/guestfish.pod:463
21490 "This matters: If you accidentally open a live VM disk image writable then "
21491 "you will cause irreversible disk corruption."
21495 #: ../fish/guestfish.pod:466
21497 "By libguestfs 1.10 we intend to change the default the other way. Disk "
21498 "images will be opened read-only. You will have to either specify "
21499 "I<guestfish --rw> or change a configuration file in order to get write "
21500 "access for disk images specified by those other command line options."
21505 #: ../fish/guestfish.pod:471
21507 "This version of guestfish has a I<--rw> option which does nothing (it is "
21508 "already the default). However it is highly recommended that you use this "
21509 "option to indicate that guestfish needs write access, and to prepare your "
21510 "scripts for the day when this option will be required for write access."
21515 #: ../fish/guestfish.pod:477
21517 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
21518 "other libguestfs program apart from guestfish and guestmount."
21523 #: ../fish/guestfish.pod:480
21529 #: ../fish/guestfish.pod:482
21531 "You can quote ordinary parameters using either single or double quotes. For "
21537 #: ../fish/guestfish.pod:485
21540 " add \"file with a space.img\"\n"
21546 #: ../fish/guestfish.pod:487
21549 " rm '/file name'\n"
21555 #: ../fish/guestfish.pod:489
21564 #: ../fish/guestfish.pod:491
21566 "A few commands require a list of strings to be passed. For these, use a "
21567 "whitespace-separated list, enclosed in quotes. Strings containing "
21568 "whitespace to be passed through must be enclosed in single quotes. A "
21569 "literal single quote must be escaped with a backslash."
21574 #: ../fish/guestfish.pod:496
21577 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
21578 " command \"/bin/echo 'foo bar'\"\n"
21579 " command \"/bin/echo \\'foo\\'\"\n"
21585 #: ../fish/guestfish.pod:500
21586 msgid "OPTIONAL ARGUMENTS"
21591 #: ../fish/guestfish.pod:502
21593 "Some commands take optional arguments. These arguments appear in this "
21594 "documentation as C<[argname:..]>. You can use them as in these examples:"
21599 #: ../fish/guestfish.pod:506
21602 " add-drive-opts filename\n"
21608 #: ../fish/guestfish.pod:508
21611 " add-drive-opts filename readonly:true\n"
21617 #: ../fish/guestfish.pod:510
21620 " add-drive-opts filename format:qcow2 readonly:false\n"
21626 #: ../fish/guestfish.pod:512
21628 "Each optional argument can appear at most once. All optional arguments must "
21629 "appear after the required ones."
21634 #: ../fish/guestfish.pod:515
21640 #: ../fish/guestfish.pod:517
21642 "This section applies to all commands which can take integers as parameters."
21647 #: ../fish/guestfish.pod:520
21648 msgid "SIZE SUFFIX"
21653 #: ../fish/guestfish.pod:522
21655 "When the command takes a parameter measured in bytes, you can use one of the "
21656 "following suffixes to specify kilobytes, megabytes and larger sizes:"
21661 #: ../fish/guestfish.pod:528
21662 msgid "B<k> or B<K> or B<KiB>"
21667 #: ../fish/guestfish.pod:530
21668 msgid "The size in kilobytes (multiplied by 1024)."
21673 #: ../fish/guestfish.pod:532
21679 #: ../fish/guestfish.pod:534
21680 msgid "The size in SI 1000 byte units."
21685 #: ../fish/guestfish.pod:536
21686 msgid "B<M> or B<MiB>"
21691 #: ../fish/guestfish.pod:538
21692 msgid "The size in megabytes (multiplied by 1048576)."
21697 #: ../fish/guestfish.pod:540
21703 #: ../fish/guestfish.pod:542
21704 msgid "The size in SI 1000000 byte units."
21709 #: ../fish/guestfish.pod:544
21710 msgid "B<G> or B<GiB>"
21715 #: ../fish/guestfish.pod:546
21716 msgid "The size in gigabytes (multiplied by 2**30)."
21721 #: ../fish/guestfish.pod:548
21727 #: ../fish/guestfish.pod:550
21728 msgid "The size in SI 10**9 byte units."
21733 #: ../fish/guestfish.pod:552
21734 msgid "B<T> or B<TiB>"
21739 #: ../fish/guestfish.pod:554
21740 msgid "The size in terabytes (multiplied by 2**40)."
21745 #: ../fish/guestfish.pod:556
21751 #: ../fish/guestfish.pod:558
21752 msgid "The size in SI 10**12 byte units."
21757 #: ../fish/guestfish.pod:560
21758 msgid "B<P> or B<PiB>"
21763 #: ../fish/guestfish.pod:562
21764 msgid "The size in petabytes (multiplied by 2**50)."
21769 #: ../fish/guestfish.pod:564
21775 #: ../fish/guestfish.pod:566
21776 msgid "The size in SI 10**15 byte units."
21781 #: ../fish/guestfish.pod:568
21782 msgid "B<E> or B<EiB>"
21787 #: ../fish/guestfish.pod:570
21788 msgid "The size in exabytes (multiplied by 2**60)."
21793 #: ../fish/guestfish.pod:572
21799 #: ../fish/guestfish.pod:574
21800 msgid "The size in SI 10**18 byte units."
21805 #: ../fish/guestfish.pod:576
21806 msgid "B<Z> or B<ZiB>"
21811 #: ../fish/guestfish.pod:578
21812 msgid "The size in zettabytes (multiplied by 2**70)."
21817 #: ../fish/guestfish.pod:580
21823 #: ../fish/guestfish.pod:582
21824 msgid "The size in SI 10**21 byte units."
21829 #: ../fish/guestfish.pod:584
21830 msgid "B<Y> or B<YiB>"
21835 #: ../fish/guestfish.pod:586
21836 msgid "The size in yottabytes (multiplied by 2**80)."
21841 #: ../fish/guestfish.pod:588
21847 #: ../fish/guestfish.pod:590
21848 msgid "The size in SI 10**24 byte units."
21853 #: ../fish/guestfish.pod:596
21856 " truncate-size /file 1G\n"
21862 #: ../fish/guestfish.pod:598
21863 msgid "would truncate the file to 1 gigabyte."
21868 #: ../fish/guestfish.pod:600
21870 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
21871 "the parameter to L</memsize> is specified in megabytes already). Adding a "
21872 "suffix will probably not do what you expect."
21877 #: ../fish/guestfish.pod:604
21878 msgid "OCTAL AND HEXADECIMAL NUMBERS"
21883 #: ../fish/guestfish.pod:606
21885 "For specifying the radix (base) use the C convention: C<0> to prefix an "
21886 "octal number or C<0x> to prefix a hexadecimal number. For example:"
21891 #: ../fish/guestfish.pod:609
21894 " 1234 decimal number 1234\n"
21895 " 02322 octal number, equivalent to decimal 1234\n"
21896 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
21902 #: ../fish/guestfish.pod:613
21904 "When using the C<chmod> command, you almost always want to specify an octal "
21905 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
21906 "L<chmod(1)> program):"
21911 #: ../fish/guestfish.pod:617
21914 " chmod 0777 /public # OK\n"
21915 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
21921 #: ../fish/guestfish.pod:620
21923 "Commands that return numbers usually print them in decimal, but some "
21924 "commands print numbers in other radices (eg. C<umask> prints the mode in "
21925 "octal, preceeded by C<0>)."
21930 #: ../fish/guestfish.pod:624
21931 msgid "WILDCARDS AND GLOBBING"
21936 #: ../fish/guestfish.pod:626
21938 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
21939 "(globbing) by default. So for example the following will not do what you "
21945 #: ../fish/guestfish.pod:630
21954 #: ../fish/guestfish.pod:632
21956 "Assuming you don't have a directory called literally C</home/*> then the "
21957 "above command will return an error."
21962 #: ../fish/guestfish.pod:635
21963 msgid "To perform wildcard expansion, use the C<glob> command."
21968 #: ../fish/guestfish.pod:637
21971 " glob rm-rf /home/*\n"
21977 #: ../fish/guestfish.pod:639
21979 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
21980 "many times), equivalent to:"
21985 #: ../fish/guestfish.pod:642
21988 " rm-rf /home/jim\n"
21989 " rm-rf /home/joe\n"
21990 " rm-rf /home/mary\n"
21996 #: ../fish/guestfish.pod:646
21997 msgid "C<glob> only works on simple guest paths and not on device names."
22002 #: ../fish/guestfish.pod:648
22004 "If you have several parameters, each containing a wildcard, then glob will "
22005 "perform a Cartesian product."
22010 #: ../fish/guestfish.pod:651
22016 #: ../fish/guestfish.pod:653
22018 "Any line which starts with a I<#> character is treated as a comment and "
22019 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
22020 "a command. For example:"
22025 #: ../fish/guestfish.pod:657
22028 " # this is a comment\n"
22029 " # this is a comment\n"
22030 " foo # NOT a comment\n"
22036 #: ../fish/guestfish.pod:661
22037 msgid "Blank lines are also ignored."
22042 #: ../fish/guestfish.pod:663
22043 msgid "RUNNING COMMANDS LOCALLY"
22048 #: ../fish/guestfish.pod:665
22050 "Any line which starts with a I<!> character is treated as a command sent to "
22051 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
22056 #: ../fish/guestfish.pod:669
22060 " tgz-out /remote local/remote-data.tar.gz\n"
22066 #: ../fish/guestfish.pod:672
22068 "will create a directory C<local> on the host, and then export the contents "
22069 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
22070 "(See C<tgz-out>)."
22075 #: ../fish/guestfish.pod:676
22077 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
22078 "effect, due to the way that subprocesses work in Unix."
22083 #: ../fish/guestfish.pod:679
22089 #: ../fish/guestfish.pod:681
22091 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
22092 "command (a guestfish command) to the second command (any host command). For "
22098 #: ../fish/guestfish.pod:685
22101 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
22107 #: ../fish/guestfish.pod:687
22109 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
22110 "program). The above command would list all accounts in the guest filesystem "
22111 "which have UID 0, ie. root accounts including backdoors. Other examples:"
22116 #: ../fish/guestfish.pod:692
22119 " hexdump /bin/ls | head\n"
22120 " list-devices | tail -1\n"
22121 " tgz-out / - | tar ztf -\n"
22127 #: ../fish/guestfish.pod:696
22129 "The space before the pipe symbol is required, any space after the pipe "
22130 "symbol is optional. Everything after the pipe symbol is just passed "
22131 "straight to the host shell, so it can contain redirections, globs and "
22132 "anything else that makes sense on the host side."
22137 #: ../fish/guestfish.pod:701
22139 "To use a literal argument which begins with a pipe symbol, you have to quote "
22145 #: ../fish/guestfish.pod:704
22154 #: ../fish/guestfish.pod:706
22155 msgid "HOME DIRECTORIES"
22160 #: ../fish/guestfish.pod:708
22162 "If a parameter starts with the character C<~> then the tilde may be expanded "
22163 "as a home directory path (either C<~> for the current user's home directory, "
22164 "or C<~user> for another user)."
22169 #: ../fish/guestfish.pod:712
22171 "Note that home directory expansion happens for users known I<on the host>, "
22172 "not in the guest filesystem."
22177 #: ../fish/guestfish.pod:715
22179 "To use a literal argument which begins with a tilde, you have to quote it, "
22185 #: ../fish/guestfish.pod:718
22194 #: ../fish/guestfish.pod:722
22196 "Libguestfs has some support for Linux guests encrypted according to the "
22197 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
22198 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
22199 "LUKS is supported."
22204 #: ../fish/guestfish.pod:727
22205 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
22210 #: ../fish/guestfish.pod:729
22213 " ><fs> vfs-type /dev/sda2\n"
22220 #: ../fish/guestfish.pod:732
22222 "Then open those devices using L</luks-open>. This creates a device-mapper "
22223 "device called C</dev/mapper/luksdev>."
22228 #: ../fish/guestfish.pod:735
22231 " ><fs> luks-open /dev/sda2 luksdev\n"
22232 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
22238 #: ../fish/guestfish.pod:738
22240 "Finally you have to tell LVM to scan for volume groups on the newly created "
22246 #: ../fish/guestfish.pod:741
22250 " vg-activate-all true\n"
22256 #: ../fish/guestfish.pod:744
22257 msgid "The logical volume(s) can now be mounted in the usual way."
22262 #: ../fish/guestfish.pod:746
22264 "Before closing a LUKS device you must unmount any logical volumes on it and "
22265 "deactivate the volume groups by calling C<vg-activate false VG> on each "
22266 "one. Then you can close the mapper device:"
22271 #: ../fish/guestfish.pod:750
22274 " vg-activate false /dev/VG\n"
22275 " luks-close /dev/mapper/luksdev\n"
22281 #: ../fish/guestfish.pod:753
22282 msgid "WINDOWS PATHS"
22287 #: ../fish/guestfish.pod:755
22289 "If a path is prefixed with C<win:> then you can use Windows-style paths "
22290 "(with some limitations). The following commands are equivalent:"
22295 #: ../fish/guestfish.pod:758
22298 " file /WINDOWS/system32/config/system.LOG\n"
22304 #: ../fish/guestfish.pod:760
22307 " file win:/windows/system32/config/system.log\n"
22313 #: ../fish/guestfish.pod:762
22316 " file win:\\windows\\system32\\config\\system.log\n"
22322 #: ../fish/guestfish.pod:764
22325 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
22331 #: ../fish/guestfish.pod:766
22333 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
22334 "handles case insensitivity like Windows would. This only works in argument "
22335 "positions that expect a path."
22340 #: ../fish/guestfish.pod:770
22341 msgid "UPLOADING AND DOWNLOADING FILES"
22346 #: ../fish/guestfish.pod:772
22348 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
22349 "others which upload from or download to a local file, you can use the "
22350 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
22355 #: ../fish/guestfish.pod:776
22364 #: ../fish/guestfish.pod:778
22366 "reads stdin and creates from that a file C</foo> in the disk image, and:"
22371 #: ../fish/guestfish.pod:781
22374 " tar-out /etc - | tar tf -\n"
22380 #: ../fish/guestfish.pod:783
22382 "writes the tarball to stdout and then pipes that into the external \"tar\" "
22383 "command (see L</PIPES>)."
22388 #: ../fish/guestfish.pod:786
22390 "When using C<-> to read from stdin, the input is read up to the end of "
22391 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
22392 "some arbitrary end marker:"
22397 #: ../fish/guestfish.pod:790
22400 " upload -<<END /foo\n"
22410 #: ../fish/guestfish.pod:796
22412 "Any string of characters can be used instead of C<END>. The end marker must "
22413 "appear on a line of its own, without any preceeding or following characters "
22414 "(not even spaces)."
22419 #: ../fish/guestfish.pod:800
22421 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
22422 "upload local files (so-called \"FileIn\" parameters in the generator)."
22427 #: ../fish/guestfish.pod:803
22428 msgid "EXIT ON ERROR BEHAVIOUR"
22433 #: ../fish/guestfish.pod:805
22435 "By default, guestfish will ignore any errors when in interactive mode (ie. "
22436 "taking commands from a human over a tty), and will exit on the first error "
22437 "in non-interactive mode (scripts, commands given on the command line)."
22442 #: ../fish/guestfish.pod:810
22444 "If you prefix a command with a I<-> character, then that command will not "
22445 "cause guestfish to exit, even if that (one) command returns an error."
22450 #: ../fish/guestfish.pod:814
22451 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
22456 #: ../fish/guestfish.pod:816
22458 "Guestfish can be remote-controlled over a socket. This is useful "
22459 "particularly in shell scripts where you want to make several different "
22460 "changes to a filesystem, but you don't want the overhead of starting up a "
22461 "guestfish process each time."
22466 #: ../fish/guestfish.pod:821
22467 msgid "Start a guestfish server process using:"
22472 #: ../fish/guestfish.pod:823
22475 " eval \"`guestfish --listen`\"\n"
22481 #: ../fish/guestfish.pod:825
22482 msgid "and then send it commands by doing:"
22487 #: ../fish/guestfish.pod:827
22490 " guestfish --remote cmd [...]\n"
22496 #: ../fish/guestfish.pod:829
22497 msgid "To cause the server to exit, send it the exit command:"
22502 #: ../fish/guestfish.pod:831
22505 " guestfish --remote exit\n"
22511 #: ../fish/guestfish.pod:833
22513 "Note that the server will normally exit if there is an error in a command. "
22514 "You can change this in the usual way. See section L</EXIT ON ERROR "
22520 #: ../fish/guestfish.pod:837
22521 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
22526 #: ../fish/guestfish.pod:839
22528 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
22529 "is how the I<--remote> option knows where to send the commands. You can "
22530 "have several guestfish listener processes running using:"
22535 #: ../fish/guestfish.pod:843
22538 " eval \"`guestfish --listen`\"\n"
22539 " pid1=$GUESTFISH_PID\n"
22540 " eval \"`guestfish --listen`\"\n"
22541 " pid2=$GUESTFISH_PID\n"
22543 " guestfish --remote=$pid1 cmd\n"
22544 " guestfish --remote=$pid2 cmd\n"
22550 #: ../fish/guestfish.pod:851
22551 msgid "REMOTE CONTROL AND CSH"
22556 #: ../fish/guestfish.pod:853
22558 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
22564 #: ../fish/guestfish.pod:856
22567 " eval \"`guestfish --listen --csh`\"\n"
22573 #: ../fish/guestfish.pod:858
22574 msgid "REMOTE CONTROL DETAILS"
22579 #: ../fish/guestfish.pod:860
22581 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
22582 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
22583 "and C<$PID> is the process ID of the server."
22588 #: ../fish/guestfish.pod:864
22589 msgid "Guestfish client and server versions must match exactly."
22594 #: ../fish/guestfish.pod:866
22595 msgid "PREPARED DISK IMAGES"
22600 #: ../fish/guestfish.pod:868
22602 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
22603 "preformatted disk images that guestfish can make for you to save typing. "
22604 "This is particularly useful for testing purposes. This option is used "
22605 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
22606 "can be mixed with I<-a>)."
22611 #: ../fish/guestfish.pod:874
22613 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
22614 "the second and so on. Existing files in the current directory are "
22620 #: ../fish/guestfish.pod:878
22622 "The type briefly describes how the disk should be sized, partitioned, how "
22623 "filesystem(s) should be created, and how content should be added. "
22624 "Optionally the type can be followed by extra parameters, separated by C<:> "
22625 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
22626 "allocated disk, containing a single partition, with the partition formatted "
22627 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
22633 #: ../fish/guestfish.pod:886
22634 msgid "To list the available types and any extra parameters they take, run:"
22639 #: ../fish/guestfish.pod:890
22641 "Note that the prepared filesystem is not mounted. You would usually have to "
22642 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
22647 #: ../fish/guestfish.pod:894
22649 "If any I<-N> or I<--new> options are given, the guest is automatically "
22655 #: ../fish/guestfish.pod:899
22656 msgid "Create a 100MB disk with an ext4-formatted partition:"
22661 #: ../fish/guestfish.pod:901
22664 " guestfish -N fs:ext4\n"
22670 #: ../fish/guestfish.pod:903
22671 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
22676 #: ../fish/guestfish.pod:905
22679 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
22685 #: ../fish/guestfish.pod:907
22686 msgid "Create a blank 200MB disk:"
22691 #: ../fish/guestfish.pod:909
22694 " guestfish -N disk:200M\n"
22700 #: ../fish/guestfish.pod:911
22701 msgid "PROGRESS BARS"
22706 #: ../fish/guestfish.pod:913
22708 "Some (not all) long-running commands send progress notification messages as "
22709 "they are running. Guestfish turns these messages into progress bars."
22714 #: ../fish/guestfish.pod:917
22716 "When a command that supports progress bars takes longer than two seconds to "
22717 "run, and if progress bars are enabled, then you will see one appearing below "
22723 #: ../fish/guestfish.pod:921
22726 " ><fs> copy-size /large-file /another-file 2048M\n"
22727 " / 10% [#####-----------------------------------------] 00:30\n"
22733 #: ../fish/guestfish.pod:924
22735 "The spinner on the left hand side moves round once for every progress "
22736 "notification received from the backend. This is a (reasonably) golden "
22737 "assurance that the command is \"doing something\" even if the progress bar "
22738 "is not moving, because the command is able to send the progress "
22739 "notifications. When the bar reaches 100% and the command finishes, the "
22740 "spinner disappears."
22745 #: ../fish/guestfish.pod:931
22747 "Progress bars are enabled by default when guestfish is used interactively. "
22748 "You can enable them even for non-interactive modes using I<--progress-bars>, "
22749 "and you can disable them completely using I<--no-progress-bars>."
22754 #: ../fish/guestfish.pod:936
22755 msgid "GUESTFISH COMMANDS"
22760 #: ../fish/guestfish.pod:938
22762 "The commands in this section are guestfish convenience commands, in other "
22763 "words, they are not part of the L<guestfs(3)> API."
22768 #: ../fish/guestfish.pod:941
22774 #: ../fish/guestfish.pod:943
22784 #: ../fish/guestfish.pod:946
22785 msgid "Without any parameter, this provides general help."
22790 #: ../fish/guestfish.pod:948
22791 msgid "With a C<cmd> parameter, this displays detailed help for that command."
22796 #: ../fish/guestfish.pod:950
22797 msgid "quit | exit"
22802 #: ../fish/guestfish.pod:952
22803 msgid "This exits guestfish. You can also use C<^D> key."
22808 #: ../fish/guestfish.pod:954
22809 msgid "@FISH_COMMANDS@"
22814 #: ../fish/guestfish.pod:956
22820 #: ../fish/guestfish.pod:960 ../test-tool/libguestfs-test-tool.pod:83
22826 #: ../fish/guestfish.pod:962
22828 "guestfish returns 0 if the commands completed without error, or 1 if there "
22834 #: ../fish/guestfish.pod:969
22840 #: ../fish/guestfish.pod:971
22842 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
22848 #: ../fish/guestfish.pod:974
22849 msgid "GUESTFISH_PID"
22854 #: ../fish/guestfish.pod:976
22856 "Used with the I<--remote> option to specify the remote guestfish process to "
22857 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
22862 #: ../fish/guestfish.pod:980
22868 #: ../fish/guestfish.pod:982
22870 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
22871 "not specified, the external L<hexedit(1)> program is used."
22876 #: ../fish/guestfish.pod:986
22882 #: ../fish/guestfish.pod:988
22884 "If compiled with GNU readline support, various files in the home directory "
22885 "can be used. See L</FILES>."
22890 #: ../fish/guestfish.pod:997
22892 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
22893 "effect as using the B<-v> option."
22898 #: ../fish/guestfish.pod:1009
22900 "Set the path that guestfish uses to search for kernel and initrd.img. See "
22901 "the discussion of paths in L<guestfs(3)>."
22906 #: ../fish/guestfish.pod:1020
22907 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
22912 #: ../fish/guestfish.pod:1022
22918 #: ../fish/guestfish.pod:1024
22920 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
22926 #: ../fish/guestfish.pod:1039 ../test-tool/libguestfs-test-tool.pod:88
22932 #: ../fish/guestfish.pod:1043
22933 msgid "$HOME/.guestfish"
22938 #: ../fish/guestfish.pod:1045
22940 "If compiled with GNU readline support, then the command history is saved in "
22946 #: ../fish/guestfish.pod:1048
22947 msgid "$HOME/.inputrc"
22952 #: ../fish/guestfish.pod:1050
22953 msgid "/etc/inputrc"
22958 #: ../fish/guestfish.pod:1052
22960 "If compiled with GNU readline support, then these files can be used to "
22961 "configure readline. For further information, please see L<readline(3)/"
22962 "INITIALIZATION FILE>."
22967 #: ../fish/guestfish.pod:1056
22968 msgid "To write rules which only apply to guestfish, use:"
22973 #: ../fish/guestfish.pod:1058
22984 #: ../fish/guestfish.pod:1062
22986 "Variables that you can set in inputrc that change the behaviour of guestfish "
22987 "in useful ways include:"
22992 #: ../fish/guestfish.pod:1067
22993 msgid "completion-ignore-case (default: on)"
22998 #: ../fish/guestfish.pod:1069
23000 "By default, guestfish will ignore case when tab-completing paths on the "
23006 #: ../fish/guestfish.pod:1072
23009 " set completion-ignore-case off\n"
23015 #: ../fish/guestfish.pod:1074
23016 msgid "to make guestfish case sensitive."
23021 #: ../fish/guestfish.pod:1078
23027 #: ../fish/guestfish.pod:1080
23028 msgid "test2.img (etc)"
23033 #: ../fish/guestfish.pod:1082
23035 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
23036 "will be created in the file C<test1.img> in the current directory. The "
23037 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
23038 "the same name will be overwritten."
23042 #: ../fish/guestfish.pod:1091
23044 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-copy-in(1)"
23045 ">, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)"
23046 ">, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions"
23047 "(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)"
23048 ">, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)"
23049 ">, L<hexedit(1)>."
23054 #: ../fish/guestfish.pod:1121 ../test-tool/libguestfs-test-tool.pod:124
23055 #: ../fuse/guestmount.pod:253 ../tools/virt-edit.pl:372
23056 #: ../tools/virt-win-reg.pl:606 ../tools/virt-resize.pl:1512
23057 #: ../tools/virt-list-filesystems.pl:210 ../tools/virt-tar.pl:309
23058 #: ../tools/virt-make-fs.pl:567 ../tools/virt-list-partitions.pl:277
23060 "This program is free software; you can redistribute it and/or modify it "
23061 "under the terms of the GNU General Public License as published by the Free "
23062 "Software Foundation; either version 2 of the License, or (at your option) "
23063 "any later version."
23068 #: ../fish/guestfish.pod:1126 ../test-tool/libguestfs-test-tool.pod:129
23069 #: ../fuse/guestmount.pod:258 ../tools/virt-edit.pl:377
23070 #: ../tools/virt-win-reg.pl:611 ../tools/virt-resize.pl:1517
23071 #: ../tools/virt-list-filesystems.pl:215 ../tools/virt-tar.pl:314
23072 #: ../tools/virt-make-fs.pl:572 ../tools/virt-list-partitions.pl:282
23074 "This program is distributed in the hope that it will be useful, but WITHOUT "
23075 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
23076 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
23082 #: ../fish/guestfish.pod:1131 ../test-tool/libguestfs-test-tool.pod:134
23083 #: ../fuse/guestmount.pod:263 ../tools/virt-edit.pl:382
23084 #: ../tools/virt-win-reg.pl:616 ../tools/virt-resize.pl:1522
23085 #: ../tools/virt-list-filesystems.pl:220 ../tools/virt-tar.pl:319
23086 #: ../tools/virt-make-fs.pl:577 ../tools/virt-list-partitions.pl:287
23088 "You should have received a copy of the GNU General Public License along with "
23089 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
23090 "Ave, Cambridge, MA 02139, USA."
23095 #: ../fish/guestfish-actions.pod:1
23101 #: ../fish/guestfish-actions.pod:3
23104 " add-cdrom filename\n"
23110 #: ../fish/guestfish-actions.pod:15
23112 "This call checks for the existence of C<filename>. This stops you from "
23113 "specifying other types of drive which are supported by qemu such as C<nbd:> "
23114 "and C<http:> URLs. To specify those, use the general L</config> call "
23120 #: ../fish/guestfish-actions.pod:22
23122 "If you just want to add an ISO file (often you use this as an efficient way "
23123 "to transfer large files into the guest), then you should probably use L</add-"
23124 "drive-ro> instead."
23129 #: ../fish/guestfish-actions.pod:35
23135 #: ../fish/guestfish-actions.pod:37
23141 #: ../fish/guestfish-actions.pod:39
23144 " add-domain dom [libvirturi:..] [readonly:..] [iface:..]\n"
23150 #: ../fish/guestfish-actions.pod:41
23152 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
23153 "It works by connecting to libvirt, requesting the domain and domain XML from "
23154 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
23159 #: ../fish/guestfish-actions.pod:64
23161 "The other optional parameters are passed directly through to L</add-drive-"
23167 #: ../fish/guestfish-actions.pod:67 ../fish/guestfish-actions.pod:131
23168 #: ../fish/guestfish-actions.pod:2846
23170 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
23175 #: ../fish/guestfish-actions.pod:69
23181 #: ../fish/guestfish-actions.pod:71
23184 " add-drive filename\n"
23190 #: ../fish/guestfish-actions.pod:73
23192 "This function is the equivalent of calling L</add-drive-opts> with no "
23193 "optional parameters, so the disk is added writable, with the format being "
23194 "detected automatically."
23199 #: ../fish/guestfish-actions.pod:77
23201 "Automatic detection of the format opens you up to a potential security hole "
23202 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
23203 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
23204 "you should think about replacing calls to this function with calls to L</add-"
23205 "drive-opts>, and specifying the format."
23210 #: ../fish/guestfish-actions.pod:84
23211 msgid "add-drive-opts"
23216 #: ../fish/guestfish-actions.pod:86
23222 #: ../fish/guestfish-actions.pod:88
23225 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
23231 #: ../fish/guestfish-actions.pod:115
23233 "This forces the image format. If you omit this (or use L</add-drive> or L</"
23234 "add-drive-ro>) then the format is automatically detected. Possible formats "
23235 "include C<raw> and C<qcow2>."
23240 #: ../fish/guestfish-actions.pod:126
23242 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
23243 "add-drive-with-if> call (q.v.)"
23248 #: ../fish/guestfish-actions.pod:133
23249 msgid "add-drive-ro"
23254 #: ../fish/guestfish-actions.pod:135
23260 #: ../fish/guestfish-actions.pod:137
23263 " add-drive-ro filename\n"
23269 #: ../fish/guestfish-actions.pod:139
23271 "This function is the equivalent of calling L</add-drive-opts> with the "
23272 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
23273 "is added read-only, with the format being detected automatically."
23278 #: ../fish/guestfish-actions.pod:144
23279 msgid "add-drive-ro-with-if"
23284 #: ../fish/guestfish-actions.pod:146
23287 " add-drive-ro-with-if filename iface\n"
23293 #: ../fish/guestfish-actions.pod:148
23295 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
23296 "interface emulation to use at run time."
23301 #: ../fish/guestfish-actions.pod:158
23302 msgid "add-drive-with-if"
23307 #: ../fish/guestfish-actions.pod:160
23310 " add-drive-with-if filename iface\n"
23316 #: ../fish/guestfish-actions.pod:162
23318 "This is the same as L</add-drive> but it allows you to specify the QEMU "
23319 "interface emulation to use at run time."
23324 #: ../fish/guestfish-actions.pod:172
23330 #: ../fish/guestfish-actions.pod:174
23333 " aug-clear augpath\n"
23339 #: ../fish/guestfish-actions.pod:179
23345 #: ../fish/guestfish-actions.pod:181
23354 #: ../fish/guestfish-actions.pod:183
23356 "Close the current Augeas handle and free up any resources used by it. After "
23357 "calling this, you have to call L</aug-init> again before you can use any "
23358 "other Augeas functions."
23363 #: ../fish/guestfish-actions.pod:188
23364 msgid "aug-defnode"
23369 #: ../fish/guestfish-actions.pod:190
23372 " aug-defnode name expr val\n"
23378 #: ../fish/guestfish-actions.pod:195
23380 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
23381 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
23382 "containing that single node."
23387 #: ../fish/guestfish-actions.pod:203
23393 #: ../fish/guestfish-actions.pod:205
23396 " aug-defvar name expr\n"
23402 #: ../fish/guestfish-actions.pod:214
23408 #: ../fish/guestfish-actions.pod:216
23411 " aug-get augpath\n"
23417 #: ../fish/guestfish-actions.pod:221
23423 #: ../fish/guestfish-actions.pod:223
23426 " aug-init root flags\n"
23432 #: ../fish/guestfish-actions.pod:229
23433 msgid "You must call this before using any other L</aug-*> commands."
23438 #: ../fish/guestfish-actions.pod:264
23439 msgid "Do not load the tree in L</aug-init>."
23444 #: ../fish/guestfish-actions.pod:268
23445 msgid "To close the handle, you can call L</aug-close>."
23450 #: ../fish/guestfish-actions.pod:272
23456 #: ../fish/guestfish-actions.pod:274
23459 " aug-insert augpath label true|false\n"
23465 #: ../fish/guestfish-actions.pod:284
23471 #: ../fish/guestfish-actions.pod:286
23480 #: ../fish/guestfish-actions.pod:293
23486 #: ../fish/guestfish-actions.pod:295
23489 " aug-ls augpath\n"
23495 #: ../fish/guestfish-actions.pod:297
23497 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
23498 "resulting nodes into alphabetical order."
23503 #: ../fish/guestfish-actions.pod:300
23509 #: ../fish/guestfish-actions.pod:302
23512 " aug-match augpath\n"
23518 #: ../fish/guestfish-actions.pod:308
23524 #: ../fish/guestfish-actions.pod:310
23527 " aug-mv src dest\n"
23533 #: ../fish/guestfish-actions.pod:315
23539 #: ../fish/guestfish-actions.pod:317
23542 " aug-rm augpath\n"
23548 #: ../fish/guestfish-actions.pod:323
23554 #: ../fish/guestfish-actions.pod:325
23563 #: ../fish/guestfish-actions.pod:329
23565 "The flags which were passed to L</aug-init> affect exactly how files are "
23571 #: ../fish/guestfish-actions.pod:332
23577 #: ../fish/guestfish-actions.pod:334
23580 " aug-set augpath val\n"
23586 #: ../fish/guestfish-actions.pod:338
23588 "In the Augeas API, it is possible to clear a node by setting the value to "
23589 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
23590 "this call. Instead you must use the L</aug-clear> call."
23595 #: ../fish/guestfish-actions.pod:343
23601 #: ../fish/guestfish-actions.pod:345
23604 " available 'groups ...'\n"
23610 #: ../fish/guestfish-actions.pod:351
23612 "The libguestfs groups, and the functions that those groups correspond to, "
23613 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
23614 "runtime by calling L</available-all-groups>."
23619 #: ../fish/guestfish-actions.pod:375
23620 msgid "You must call L</launch> before calling this function."
23625 #: ../fish/guestfish-actions.pod:397
23627 "This call was added in version C<1.0.80>. In previous versions of "
23628 "libguestfs all you could do would be to speculatively execute a command to "
23629 "find out if the daemon implemented it. See also L</version>."
23634 #: ../fish/guestfish-actions.pod:404
23635 msgid "available-all-groups"
23640 #: ../fish/guestfish-actions.pod:406
23643 " available-all-groups\n"
23649 #: ../fish/guestfish-actions.pod:408
23651 "This command returns a list of all optional groups that this daemon knows "
23652 "about. Note this returns both supported and unsupported groups. To find "
23653 "out which ones the daemon can actually support you have to call L</"
23654 "available> on each member of the returned list."
23659 #: ../fish/guestfish-actions.pod:414
23660 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
23665 #: ../fish/guestfish-actions.pod:416
23671 #: ../fish/guestfish-actions.pod:418
23674 " base64-in (base64file|-) filename\n"
23680 #: ../fish/guestfish-actions.pod:423 ../fish/guestfish-actions.pod:432
23681 #: ../fish/guestfish-actions.pod:656 ../fish/guestfish-actions.pod:825
23682 #: ../fish/guestfish-actions.pod:844 ../fish/guestfish-actions.pod:1221
23683 #: ../fish/guestfish-actions.pod:4201 ../fish/guestfish-actions.pod:4213
23684 #: ../fish/guestfish-actions.pod:4224 ../fish/guestfish-actions.pod:4235
23685 #: ../fish/guestfish-actions.pod:4287 ../fish/guestfish-actions.pod:4296
23686 #: ../fish/guestfish-actions.pod:4350 ../fish/guestfish-actions.pod:4373
23687 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
23692 #: ../fish/guestfish-actions.pod:425
23698 #: ../fish/guestfish-actions.pod:427
23701 " base64-out filename (base64file|-)\n"
23707 #: ../fish/guestfish-actions.pod:434
23708 msgid "blockdev-flushbufs"
23713 #: ../fish/guestfish-actions.pod:436
23716 " blockdev-flushbufs device\n"
23722 #: ../fish/guestfish-actions.pod:443
23723 msgid "blockdev-getbsz"
23728 #: ../fish/guestfish-actions.pod:445
23731 " blockdev-getbsz device\n"
23737 #: ../fish/guestfish-actions.pod:454
23738 msgid "blockdev-getro"
23743 #: ../fish/guestfish-actions.pod:456
23746 " blockdev-getro device\n"
23752 #: ../fish/guestfish-actions.pod:463
23753 msgid "blockdev-getsize64"
23758 #: ../fish/guestfish-actions.pod:465
23761 " blockdev-getsize64 device\n"
23767 #: ../fish/guestfish-actions.pod:469
23768 msgid "See also L</blockdev-getsz>."
23773 #: ../fish/guestfish-actions.pod:473
23774 msgid "blockdev-getss"
23779 #: ../fish/guestfish-actions.pod:475
23782 " blockdev-getss device\n"
23788 #: ../fish/guestfish-actions.pod:480
23790 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
23795 #: ../fish/guestfish-actions.pod:485
23796 msgid "blockdev-getsz"
23801 #: ../fish/guestfish-actions.pod:487
23804 " blockdev-getsz device\n"
23810 #: ../fish/guestfish-actions.pod:492
23812 "See also L</blockdev-getss> for the real sector size of the device, and L</"
23813 "blockdev-getsize64> for the more useful I<size in bytes>."
23818 #: ../fish/guestfish-actions.pod:498
23819 msgid "blockdev-rereadpt"
23824 #: ../fish/guestfish-actions.pod:500
23827 " blockdev-rereadpt device\n"
23833 #: ../fish/guestfish-actions.pod:506
23834 msgid "blockdev-setbsz"
23839 #: ../fish/guestfish-actions.pod:508
23842 " blockdev-setbsz device blocksize\n"
23848 #: ../fish/guestfish-actions.pod:517
23849 msgid "blockdev-setro"
23854 #: ../fish/guestfish-actions.pod:519
23857 " blockdev-setro device\n"
23863 #: ../fish/guestfish-actions.pod:525
23864 msgid "blockdev-setrw"
23869 #: ../fish/guestfish-actions.pod:527
23872 " blockdev-setrw device\n"
23878 #: ../fish/guestfish-actions.pod:533
23879 msgid "case-sensitive-path"
23884 #: ../fish/guestfish-actions.pod:535
23887 " case-sensitive-path path\n"
23893 #: ../fish/guestfish-actions.pod:559
23895 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
23896 "WINDOWS/system32\"> (the exact return value would depend on details of how "
23897 "the directories were originally created under Windows)."
23902 #: ../fish/guestfish-actions.pod:567
23903 msgid "See also L</realpath>."
23908 #: ../fish/guestfish-actions.pod:569
23914 #: ../fish/guestfish-actions.pod:571
23923 #: ../fish/guestfish-actions.pod:575
23925 "Note that this function cannot correctly handle binary files (specifically, "
23926 "files containing C<\\0> character which is treated as end of string). For "
23927 "those you need to use the L</read-file> or L</download> functions which have "
23928 "a more complex interface."
23933 #: ../fish/guestfish-actions.pod:583
23939 #: ../fish/guestfish-actions.pod:585
23942 " checksum csumtype path\n"
23948 #: ../fish/guestfish-actions.pod:628
23949 msgid "To get the checksum for a device, use L</checksum-device>."
23954 #: ../fish/guestfish-actions.pod:630
23955 msgid "To get the checksums for many files, use L</checksums-out>."
23960 #: ../fish/guestfish-actions.pod:632
23961 msgid "checksum-device"
23966 #: ../fish/guestfish-actions.pod:634
23969 " checksum-device csumtype device\n"
23975 #: ../fish/guestfish-actions.pod:636
23977 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
23978 "device named C<device>. For the types of checksums supported see the L</"
23979 "checksum> command."
23984 #: ../fish/guestfish-actions.pod:640
23985 msgid "checksums-out"
23990 #: ../fish/guestfish-actions.pod:642
23993 " checksums-out csumtype directory (sumsfile|-)\n"
23999 #: ../fish/guestfish-actions.pod:658
24005 #: ../fish/guestfish-actions.pod:660
24008 " chmod mode path\n"
24014 #: ../fish/guestfish-actions.pod:671
24020 #: ../fish/guestfish-actions.pod:673
24023 " chown owner group path\n"
24029 #: ../fish/guestfish-actions.pod:681
24035 #: ../fish/guestfish-actions.pod:683
24038 " command 'arguments ...'\n"
24044 #: ../fish/guestfish-actions.pod:690
24046 "The single parameter is an argv-style list of arguments. The first element "
24047 "is the name of the program to run. Subsequent elements are parameters. The "
24048 "list must be non-empty (ie. must contain a program name). Note that the "
24049 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
24054 #: ../fish/guestfish-actions.pod:718
24055 msgid "command-lines"
24060 #: ../fish/guestfish-actions.pod:720
24063 " command-lines 'arguments ...'\n"
24069 #: ../fish/guestfish-actions.pod:722
24071 "This is the same as L</command>, but splits the result into a list of lines."
24076 #: ../fish/guestfish-actions.pod:725
24077 msgid "See also: L</sh-lines>"
24082 #: ../fish/guestfish-actions.pod:730
24088 #: ../fish/guestfish-actions.pod:732
24091 " config qemuparam qemuvalue\n"
24097 #: ../fish/guestfish-actions.pod:743
24103 #: ../fish/guestfish-actions.pod:745
24106 " copy-size src dest size\n"
24112 #: ../fish/guestfish-actions.pod:753
24118 #: ../fish/guestfish-actions.pod:755
24127 #: ../fish/guestfish-actions.pod:760
24133 #: ../fish/guestfish-actions.pod:762
24142 #: ../fish/guestfish-actions.pod:767
24148 #: ../fish/guestfish-actions.pod:769
24157 #: ../fish/guestfish-actions.pod:776
24159 "If the destination is a device, it must be as large or larger than the "
24160 "source file or device, otherwise the copy will fail. This command cannot do "
24161 "partial copies (see L</copy-size>)."
24166 #: ../fish/guestfish-actions.pod:780
24172 #: ../fish/guestfish-actions.pod:782
24181 #: ../fish/guestfish-actions.pod:786 ../fish/guestfish-actions.pod:797
24183 "This command is mostly useful for interactive sessions. It is I<not> "
24184 "intended that you try to parse the output string. Use L</statvfs> from "
24190 #: ../fish/guestfish-actions.pod:790
24196 #: ../fish/guestfish-actions.pod:792
24205 #: ../fish/guestfish-actions.pod:801
24211 #: ../fish/guestfish-actions.pod:803
24220 #: ../fish/guestfish-actions.pod:809
24222 "Another way to get the same information is to enable verbose messages with "
24223 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
24224 "before running the program."
24229 #: ../fish/guestfish-actions.pod:814
24235 #: ../fish/guestfish-actions.pod:816
24238 " download remotefilename (filename|-)\n"
24244 #: ../fish/guestfish-actions.pod:823
24245 msgid "See also L</upload>, L</cat>."
24250 #: ../fish/guestfish-actions.pod:827
24251 msgid "download-offset"
24256 #: ../fish/guestfish-actions.pod:829
24259 " download-offset remotefilename (filename|-) offset size\n"
24265 #: ../fish/guestfish-actions.pod:837
24267 "Note that there is no limit on the amount of data that can be downloaded "
24268 "with this call, unlike with L</pread>, and this call always reads the full "
24269 "amount unless an error occurs."
24274 #: ../fish/guestfish-actions.pod:842
24275 msgid "See also L</download>, L</pread>."
24280 #: ../fish/guestfish-actions.pod:846
24281 msgid "drop-caches"
24286 #: ../fish/guestfish-actions.pod:848
24289 " drop-caches whattodrop\n"
24295 #: ../fish/guestfish-actions.pod:860
24301 #: ../fish/guestfish-actions.pod:862
24310 #: ../fish/guestfish-actions.pod:874
24316 #: ../fish/guestfish-actions.pod:876
24319 " e2fsck-f device\n"
24325 #: ../fish/guestfish-actions.pod:882
24327 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
24328 "should use L</fsck>."
24333 #: ../fish/guestfish-actions.pod:885
24334 msgid "echo-daemon"
24339 #: ../fish/guestfish-actions.pod:887
24342 " echo-daemon 'words ...'\n"
24348 #: ../fish/guestfish-actions.pod:894
24349 msgid "See also L</ping-daemon>."
24354 #: ../fish/guestfish-actions.pod:896
24360 #: ../fish/guestfish-actions.pod:898
24363 " egrep regex path\n"
24369 #: ../fish/guestfish-actions.pod:906
24375 #: ../fish/guestfish-actions.pod:908
24378 " egrepi regex path\n"
24384 #: ../fish/guestfish-actions.pod:916
24390 #: ../fish/guestfish-actions.pod:918
24393 " equal file1 file2\n"
24399 #: ../fish/guestfish-actions.pod:925
24405 #: ../fish/guestfish-actions.pod:927
24414 #: ../fish/guestfish-actions.pod:932
24415 msgid "See also L</is-file>, L</is-dir>, L</stat>."
24420 #: ../fish/guestfish-actions.pod:934
24426 #: ../fish/guestfish-actions.pod:936
24429 " fallocate path len\n"
24435 #: ../fish/guestfish-actions.pod:953
24436 msgid "fallocate64"
24441 #: ../fish/guestfish-actions.pod:955
24444 " fallocate64 path len\n"
24450 #: ../fish/guestfish-actions.pod:961
24452 "Note that this call allocates disk blocks for the file. To create a sparse "
24453 "file use L</truncate-size> instead."
24458 #: ../fish/guestfish-actions.pod:964
24460 "The deprecated call L</fallocate> does the same, but owing to an oversight "
24461 "it only allowed 30 bit lengths to be specified, effectively limiting the "
24462 "maximum size of files created through that call to 1GB."
24467 #: ../fish/guestfish-actions.pod:973
24473 #: ../fish/guestfish-actions.pod:975
24476 " fgrep pattern path\n"
24482 #: ../fish/guestfish-actions.pod:983
24488 #: ../fish/guestfish-actions.pod:985
24491 " fgrepi pattern path\n"
24497 #: ../fish/guestfish-actions.pod:993
24503 #: ../fish/guestfish-actions.pod:995
24512 #: ../fish/guestfish-actions.pod:1007
24514 "This command can also be used on C</dev/> devices (and partitions, LV "
24515 "names). You can for example use this to determine if a device contains a "
24516 "filesystem, although it's usually better to use L</vfs-type>."
24521 #: ../fish/guestfish-actions.pod:1017
24522 msgid "file-architecture"
24527 #: ../fish/guestfish-actions.pod:1019
24530 " file-architecture filename\n"
24536 #: ../fish/guestfish-actions.pod:1122
24542 #: ../fish/guestfish-actions.pod:1124
24551 #: ../fish/guestfish-actions.pod:1128
24553 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
24554 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
24559 #: ../fish/guestfish-actions.pod:1132
24565 #: ../fish/guestfish-actions.pod:1134
24568 " fill c len path\n"
24574 #: ../fish/guestfish-actions.pod:1140
24576 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
24577 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
24578 "L</fill-pattern>."
24583 #: ../fish/guestfish-actions.pod:1145
24584 msgid "fill-pattern"
24589 #: ../fish/guestfish-actions.pod:1147
24592 " fill-pattern pattern len path\n"
24598 #: ../fish/guestfish-actions.pod:1149
24600 "This function is like L</fill> except that it creates a new file of length "
24601 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
24602 "is truncated if necessary to ensure the length of the file is exactly C<len> "
24608 #: ../fish/guestfish-actions.pod:1154
24614 #: ../fish/guestfish-actions.pod:1156
24617 " find directory\n"
24623 #: ../fish/guestfish-actions.pod:1170
24624 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
24629 #: ../fish/guestfish-actions.pod:1183
24630 msgid "See also L</find0>."
24635 #: ../fish/guestfish-actions.pod:1188
24641 #: ../fish/guestfish-actions.pod:1190
24644 " find0 directory (files|-)\n"
24650 #: ../fish/guestfish-actions.pod:1196
24652 "This command works the same way as L</find> with the following exceptions:"
24657 #: ../fish/guestfish-actions.pod:1223
24658 msgid "findfs-label"
24663 #: ../fish/guestfish-actions.pod:1225
24666 " findfs-label label\n"
24672 #: ../fish/guestfish-actions.pod:1231
24673 msgid "To find the label of a filesystem, use L</vfs-label>."
24678 #: ../fish/guestfish-actions.pod:1233
24679 msgid "findfs-uuid"
24684 #: ../fish/guestfish-actions.pod:1235
24687 " findfs-uuid uuid\n"
24693 #: ../fish/guestfish-actions.pod:1241
24694 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
24699 #: ../fish/guestfish-actions.pod:1243
24705 #: ../fish/guestfish-actions.pod:1245
24708 " fsck fstype device\n"
24714 #: ../fish/guestfish-actions.pod:1275
24720 #: ../fish/guestfish-actions.pod:1277
24729 #: ../fish/guestfish-actions.pod:1284
24730 msgid "get-autosync"
24735 #: ../fish/guestfish-actions.pod:1286
24744 #: ../fish/guestfish-actions.pod:1290
24750 #: ../fish/guestfish-actions.pod:1292
24759 #: ../fish/guestfish-actions.pod:1296
24760 msgid "get-e2label"
24765 #: ../fish/guestfish-actions.pod:1298
24768 " get-e2label device\n"
24774 #: ../fish/guestfish-actions.pod:1310
24780 #: ../fish/guestfish-actions.pod:1312
24783 " get-e2uuid device\n"
24789 #: ../fish/guestfish-actions.pod:1324
24790 msgid "get-memsize"
24795 #: ../fish/guestfish-actions.pod:1326
24804 #: ../fish/guestfish-actions.pod:1331
24806 "If L</set-memsize> was not called on this handle, and if "
24807 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
24808 "value for memsize."
24813 #: ../fish/guestfish-actions.pod:1338
24814 msgid "get-network"
24819 #: ../fish/guestfish-actions.pod:1340
24828 #: ../fish/guestfish-actions.pod:1344
24834 #: ../fish/guestfish-actions.pod:1346
24843 #: ../fish/guestfish-actions.pod:1353
24849 #: ../fish/guestfish-actions.pod:1355
24855 #: ../fish/guestfish-actions.pod:1357
24864 #: ../fish/guestfish-actions.pod:1364
24870 #: ../fish/guestfish-actions.pod:1366
24879 #: ../fish/guestfish-actions.pod:1373
24880 msgid "get-recovery-proc"
24885 #: ../fish/guestfish-actions.pod:1375
24888 " get-recovery-proc\n"
24894 #: ../fish/guestfish-actions.pod:1379
24895 msgid "get-selinux"
24900 #: ../fish/guestfish-actions.pod:1381
24909 #: ../fish/guestfish-actions.pod:1383
24911 "This returns the current setting of the selinux flag which is passed to the "
24912 "appliance at boot time. See L</set-selinux>."
24917 #: ../fish/guestfish-actions.pod:1389
24923 #: ../fish/guestfish-actions.pod:1391
24932 #: ../fish/guestfish-actions.pod:1398
24938 #: ../fish/guestfish-actions.pod:1400
24947 #: ../fish/guestfish-actions.pod:1404
24953 #: ../fish/guestfish-actions.pod:1406
24962 #: ../fish/guestfish-actions.pod:1408
24964 "Return the current umask. By default the umask is C<022> unless it has been "
24965 "set by calling L</umask>."
24970 #: ../fish/guestfish-actions.pod:1411
24971 msgid "get-verbose"
24976 #: ../fish/guestfish-actions.pod:1413
24985 #: ../fish/guestfish-actions.pod:1417
24991 #: ../fish/guestfish-actions.pod:1419
25000 #: ../fish/guestfish-actions.pod:1423
25001 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
25006 #: ../fish/guestfish-actions.pod:1426
25012 #: ../fish/guestfish-actions.pod:1428
25015 " getxattr path name\n"
25021 #: ../fish/guestfish-actions.pod:1430
25023 "Get a single extended attribute from file C<path> named C<name>. This call "
25024 "follows symlinks. If you want to lookup an extended attribute for the "
25025 "symlink itself, use L</lgetxattr>."
25030 #: ../fish/guestfish-actions.pod:1434 ../fish/guestfish-actions.pod:2265
25032 "Normally it is better to get all extended attributes from a file in one go "
25033 "by calling L</getxattrs>. However some Linux filesystem implementations are "
25034 "buggy and do not provide a way to list out attributes. For these "
25035 "filesystems (notably ntfs-3g) you have to know the names of the extended "
25036 "attributes you want in advance and call this function."
25041 #: ../fish/guestfish-actions.pod:1444
25042 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
25047 #: ../fish/guestfish-actions.pod:1446
25053 #: ../fish/guestfish-actions.pod:1448
25056 " getxattrs path\n"
25062 #: ../fish/guestfish-actions.pod:1456
25063 msgid "See also: L</lgetxattrs>, L<attr(5)>."
25068 #: ../fish/guestfish-actions.pod:1458
25069 msgid "glob-expand"
25074 #: ../fish/guestfish-actions.pod:1460
25077 " glob-expand pattern\n"
25083 #: ../fish/guestfish-actions.pod:1473
25089 #: ../fish/guestfish-actions.pod:1475
25092 " grep regex path\n"
25098 #: ../fish/guestfish-actions.pod:1483
25104 #: ../fish/guestfish-actions.pod:1485
25107 " grepi regex path\n"
25113 #: ../fish/guestfish-actions.pod:1493
25114 msgid "grub-install"
25119 #: ../fish/guestfish-actions.pod:1495
25122 " grub-install root device\n"
25128 #: ../fish/guestfish-actions.pod:1511
25134 #: ../fish/guestfish-actions.pod:1513
25143 #: ../fish/guestfish-actions.pod:1521
25149 #: ../fish/guestfish-actions.pod:1523
25152 " head-n nrlines path\n"
25158 #: ../fish/guestfish-actions.pod:1536
25164 #: ../fish/guestfish-actions.pod:1538
25173 #: ../fish/guestfish-actions.pod:1546
25179 #: ../fish/guestfish-actions.pod:1548
25182 " initrd-cat initrdpath filename\n"
25188 #: ../fish/guestfish-actions.pod:1560
25189 msgid "See also L</initrd-list>."
25194 #: ../fish/guestfish-actions.pod:1565
25195 msgid "initrd-list"
25200 #: ../fish/guestfish-actions.pod:1567
25203 " initrd-list path\n"
25209 #: ../fish/guestfish-actions.pod:1579
25210 msgid "inotify-add-watch"
25215 #: ../fish/guestfish-actions.pod:1581
25218 " inotify-add-watch path mask\n"
25224 #: ../fish/guestfish-actions.pod:1593
25225 msgid "inotify-close"
25230 #: ../fish/guestfish-actions.pod:1595
25239 #: ../fish/guestfish-actions.pod:1601
25240 msgid "inotify-files"
25245 #: ../fish/guestfish-actions.pod:1603
25254 #: ../fish/guestfish-actions.pod:1605
25256 "This function is a helpful wrapper around L</inotify-read> which just "
25257 "returns a list of pathnames of objects that were touched. The returned "
25258 "pathnames are sorted and deduplicated."
25263 #: ../fish/guestfish-actions.pod:1609
25264 msgid "inotify-init"
25269 #: ../fish/guestfish-actions.pod:1611
25272 " inotify-init maxevents\n"
25278 #: ../fish/guestfish-actions.pod:1617
25280 "C<maxevents> is the maximum number of events which will be queued up between "
25281 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
25282 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
25283 "default was 16384 events. Beyond this limit, the kernel throws away events, "
25284 "but records the fact that it threw them away by setting a flag "
25285 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
25290 #: ../fish/guestfish-actions.pod:1627
25292 "Before any events are generated, you have to add some watches to the "
25293 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
25294 "L</inotify-watch-all>."
25299 #: ../fish/guestfish-actions.pod:1633
25301 "Queued up events should be read periodically by calling L</inotify-read> (or "
25302 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
25303 "If you don't read the events out often enough then you risk the internal "
25304 "queue overflowing."
25309 #: ../fish/guestfish-actions.pod:1640
25311 "The handle should be closed after use by calling L</inotify-close>. This "
25312 "also removes any watches automatically."
25317 #: ../fish/guestfish-actions.pod:1649
25318 msgid "inotify-read"
25323 #: ../fish/guestfish-actions.pod:1651
25332 #: ../fish/guestfish-actions.pod:1664
25333 msgid "inotify-rm-watch"
25338 #: ../fish/guestfish-actions.pod:1666
25341 " inotify-rm-watch wd\n"
25347 #: ../fish/guestfish-actions.pod:1668
25348 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
25353 #: ../fish/guestfish-actions.pod:1671
25354 msgid "inspect-get-arch"
25359 #: ../fish/guestfish-actions.pod:1673
25362 " inspect-get-arch root\n"
25368 #: ../fish/guestfish-actions.pod:1675 ../fish/guestfish-actions.pod:1691
25369 #: ../fish/guestfish-actions.pod:1765 ../fish/guestfish-actions.pod:1783
25370 #: ../fish/guestfish-actions.pod:1798 ../fish/guestfish-actions.pod:1819
25371 #: ../fish/guestfish-actions.pod:1834 ../fish/guestfish-actions.pod:1861
25372 #: ../fish/guestfish-actions.pod:1883 ../fish/guestfish-actions.pod:1907
25373 #: ../fish/guestfish-actions.pod:1937 ../fish/guestfish-actions.pod:1972
25374 #: ../fish/guestfish-actions.pod:1988
25376 "This function should only be called with a root device string as returned by "
25382 #: ../fish/guestfish-actions.pod:1678
25384 "This returns the architecture of the inspected operating system. The "
25385 "possible return values are listed under L</file-architecture>."
25390 #: ../fish/guestfish-actions.pod:1687
25391 msgid "inspect-get-distro"
25396 #: ../fish/guestfish-actions.pod:1689
25399 " inspect-get-distro root\n"
25405 #: ../fish/guestfish-actions.pod:1761
25406 msgid "inspect-get-filesystems"
25411 #: ../fish/guestfish-actions.pod:1763
25414 " inspect-get-filesystems root\n"
25420 #: ../fish/guestfish-actions.pod:1776
25422 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
25423 "get-mountpoints>."
25428 #: ../fish/guestfish-actions.pod:1779
25429 msgid "inspect-get-hostname"
25434 #: ../fish/guestfish-actions.pod:1781
25437 " inspect-get-hostname root\n"
25443 #: ../fish/guestfish-actions.pod:1794
25444 msgid "inspect-get-major-version"
25449 #: ../fish/guestfish-actions.pod:1796
25452 " inspect-get-major-version root\n"
25458 #: ../fish/guestfish-actions.pod:1815
25459 msgid "inspect-get-minor-version"
25464 #: ../fish/guestfish-actions.pod:1817
25467 " inspect-get-minor-version root\n"
25473 #: ../fish/guestfish-actions.pod:1827
25475 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
25476 "get-major-version>."
25481 #: ../fish/guestfish-actions.pod:1830
25482 msgid "inspect-get-mountpoints"
25487 #: ../fish/guestfish-actions.pod:1832
25490 " inspect-get-mountpoints root\n"
25496 #: ../fish/guestfish-actions.pod:1854
25498 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
25499 "get-filesystems>."
25504 #: ../fish/guestfish-actions.pod:1857
25505 msgid "inspect-get-package-format"
25510 #: ../fish/guestfish-actions.pod:1859
25513 " inspect-get-package-format root\n"
25519 #: ../fish/guestfish-actions.pod:1864
25521 "This function and L</inspect-get-package-management> return the package "
25522 "format and package management tool used by the inspected operating system. "
25523 "For example for Fedora these functions would return C<rpm> (package format) "
25524 "and C<yum> (package management)."
25529 #: ../fish/guestfish-actions.pod:1879
25530 msgid "inspect-get-package-management"
25535 #: ../fish/guestfish-actions.pod:1881
25538 " inspect-get-package-management root\n"
25544 #: ../fish/guestfish-actions.pod:1886
25546 "L</inspect-get-package-format> and this function return the package format "
25547 "and package management tool used by the inspected operating system. For "
25548 "example for Fedora these functions would return C<rpm> (package format) and "
25549 "C<yum> (package management)."
25554 #: ../fish/guestfish-actions.pod:1903
25555 msgid "inspect-get-product-name"
25560 #: ../fish/guestfish-actions.pod:1905
25563 " inspect-get-product-name root\n"
25569 #: ../fish/guestfish-actions.pod:1920
25570 msgid "inspect-get-roots"
25575 #: ../fish/guestfish-actions.pod:1922
25578 " inspect-get-roots\n"
25584 #: ../fish/guestfish-actions.pod:1924
25586 "This function is a convenient way to get the list of root devices, as "
25587 "returned from a previous call to L</inspect-os>, but without redoing the "
25588 "whole inspection process."
25593 #: ../fish/guestfish-actions.pod:1928
25595 "This returns an empty list if either no root devices were found or the "
25596 "caller has not called L</inspect-os>."
25601 #: ../fish/guestfish-actions.pod:1933
25602 msgid "inspect-get-type"
25607 #: ../fish/guestfish-actions.pod:1935
25610 " inspect-get-type root\n"
25616 #: ../fish/guestfish-actions.pod:1968
25617 msgid "inspect-get-windows-systemroot"
25622 #: ../fish/guestfish-actions.pod:1970
25625 " inspect-get-windows-systemroot root\n"
25631 #: ../fish/guestfish-actions.pod:1984
25632 msgid "inspect-list-applications"
25637 #: ../fish/guestfish-actions.pod:1986
25640 " inspect-list-applications root\n"
25646 #: ../fish/guestfish-actions.pod:1993
25648 "I<Note:> This call works differently from other parts of the inspection "
25649 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
25650 "then mount up the disks, before calling this. Listing applications is a "
25651 "significantly more difficult operation which requires access to the full "
25652 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
25653 "are just returning data cached in the libguestfs handle, this call actually "
25654 "reads parts of the mounted filesystems during the call."
25659 #: ../fish/guestfish-actions.pod:2083
25665 #: ../fish/guestfish-actions.pod:2085
25674 #: ../fish/guestfish-actions.pod:2100
25676 "You can pass the root string(s) returned to other L</inspect-get-*> "
25677 "functions in order to query further information about each operating system, "
25678 "such as the name and version."
25683 #: ../fish/guestfish-actions.pod:2105
25685 "This function uses other libguestfs features such as L</mount-ro> and L</"
25686 "umount-all> in order to mount and unmount filesystems and look at the "
25687 "contents. This should be called with no disks currently mounted. The "
25688 "function may also use Augeas, so any existing Augeas handle will be closed."
25693 #: ../fish/guestfish-actions.pod:2117 ../fish/guestfish-actions.pod:2293
25694 #: ../fish/guestfish-actions.pod:2339
25695 msgid "See also L</list-filesystems>."
25700 #: ../fish/guestfish-actions.pod:2119
25701 msgid "is-blockdev"
25706 #: ../fish/guestfish-actions.pod:2121
25709 " is-blockdev path\n"
25715 #: ../fish/guestfish-actions.pod:2126 ../fish/guestfish-actions.pod:2144
25716 #: ../fish/guestfish-actions.pod:2163 ../fish/guestfish-actions.pod:2172
25717 #: ../fish/guestfish-actions.pod:2182 ../fish/guestfish-actions.pod:2216
25718 #: ../fish/guestfish-actions.pod:2225
25719 msgid "See also L</stat>."
25724 #: ../fish/guestfish-actions.pod:2128
25730 #: ../fish/guestfish-actions.pod:2130
25739 #: ../fish/guestfish-actions.pod:2137
25745 #: ../fish/guestfish-actions.pod:2139
25748 " is-chardev path\n"
25754 #: ../fish/guestfish-actions.pod:2146
25760 #: ../fish/guestfish-actions.pod:2148
25769 #: ../fish/guestfish-actions.pod:2155
25775 #: ../fish/guestfish-actions.pod:2157
25784 #: ../fish/guestfish-actions.pod:2165
25790 #: ../fish/guestfish-actions.pod:2167
25799 #: ../fish/guestfish-actions.pod:2174
25805 #: ../fish/guestfish-actions.pod:2176
25814 #: ../fish/guestfish-actions.pod:2184
25815 msgid "is-launching"
25820 #: ../fish/guestfish-actions.pod:2186
25829 #: ../fish/guestfish-actions.pod:2193
25835 #: ../fish/guestfish-actions.pod:2195
25844 #: ../fish/guestfish-actions.pod:2200
25850 #: ../fish/guestfish-actions.pod:2202
25859 #: ../fish/guestfish-actions.pod:2209
25865 #: ../fish/guestfish-actions.pod:2211
25868 " is-socket path\n"
25874 #: ../fish/guestfish-actions.pod:2218
25880 #: ../fish/guestfish-actions.pod:2220
25883 " is-symlink path\n"
25889 #: ../fish/guestfish-actions.pod:2227
25890 msgid "kill-subprocess"
25895 #: ../fish/guestfish-actions.pod:2229
25898 " kill-subprocess\n"
25904 #: ../fish/guestfish-actions.pod:2233
25910 #: ../fish/guestfish-actions.pod:2235
25916 #: ../fish/guestfish-actions.pod:2237
25925 #: ../fish/guestfish-actions.pod:2245
25931 #: ../fish/guestfish-actions.pod:2247
25934 " lchown owner group path\n"
25940 #: ../fish/guestfish-actions.pod:2249
25942 "Change the file owner to C<owner> and group to C<group>. This is like L</"
25943 "chown> but if C<path> is a symlink then the link itself is changed, not the "
25949 #: ../fish/guestfish-actions.pod:2257
25955 #: ../fish/guestfish-actions.pod:2259
25958 " lgetxattr path name\n"
25964 #: ../fish/guestfish-actions.pod:2275
25965 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
25970 #: ../fish/guestfish-actions.pod:2277
25976 #: ../fish/guestfish-actions.pod:2279
25979 " lgetxattrs path\n"
25985 #: ../fish/guestfish-actions.pod:2281
25987 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
25988 "it returns the extended attributes of the link itself."
25993 #: ../fish/guestfish-actions.pod:2285
25994 msgid "list-devices"
25999 #: ../fish/guestfish-actions.pod:2287
26008 #: ../fish/guestfish-actions.pod:2295
26009 msgid "list-filesystems"
26014 #: ../fish/guestfish-actions.pod:2297
26017 " list-filesystems\n"
26023 #: ../fish/guestfish-actions.pod:2316
26025 "This command runs other libguestfs commands, which might include L</mount> "
26026 "and L</umount>, and therefore you should use this soon after launch and only "
26027 "when nothing is mounted."
26032 #: ../fish/guestfish-actions.pod:2320
26034 "Not all of the filesystems returned will be mountable. In particular, swap "
26035 "partitions are returned in the list. Also this command does not check that "
26036 "each filesystem found is valid and mountable, and some filesystems might be "
26037 "mountable but require special options. Filesystems may not all belong to a "
26038 "single logical operating system (use L</inspect-os> to look for OSes)."
26043 #: ../fish/guestfish-actions.pod:2328
26044 msgid "list-partitions"
26049 #: ../fish/guestfish-actions.pod:2330
26052 " list-partitions\n"
26058 #: ../fish/guestfish-actions.pod:2336
26060 "This does not return logical volumes. For that you will need to call L</"
26066 #: ../fish/guestfish-actions.pod:2341
26072 #: ../fish/guestfish-actions.pod:2343
26081 #: ../fish/guestfish-actions.pod:2351
26087 #: ../fish/guestfish-actions.pod:2353
26090 " ln target linkname\n"
26096 #: ../fish/guestfish-actions.pod:2357
26102 #: ../fish/guestfish-actions.pod:2359
26105 " ln-f target linkname\n"
26111 #: ../fish/guestfish-actions.pod:2364
26117 #: ../fish/guestfish-actions.pod:2366
26120 " ln-s target linkname\n"
26126 #: ../fish/guestfish-actions.pod:2370
26132 #: ../fish/guestfish-actions.pod:2372
26135 " ln-sf target linkname\n"
26141 #: ../fish/guestfish-actions.pod:2377
26142 msgid "lremovexattr"
26147 #: ../fish/guestfish-actions.pod:2379
26150 " lremovexattr xattr path\n"
26156 #: ../fish/guestfish-actions.pod:2381
26158 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
26159 "it removes an extended attribute of the link itself."
26164 #: ../fish/guestfish-actions.pod:2385
26170 #: ../fish/guestfish-actions.pod:2387
26179 #: ../fish/guestfish-actions.pod:2393
26181 "This command is mostly useful for interactive sessions. Programs should "
26182 "probably use L</readdir> instead."
26187 #: ../fish/guestfish-actions.pod:2396
26193 #: ../fish/guestfish-actions.pod:2398
26196 " lsetxattr xattr val vallen path\n"
26202 #: ../fish/guestfish-actions.pod:2400
26204 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
26205 "sets an extended attribute of the link itself."
26210 #: ../fish/guestfish-actions.pod:2404
26216 #: ../fish/guestfish-actions.pod:2406
26225 #: ../fish/guestfish-actions.pod:2410
26227 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
26228 "the link is stat-ed, not the file it refers to."
26233 #: ../fish/guestfish-actions.pod:2416
26239 #: ../fish/guestfish-actions.pod:2418
26242 " lstatlist path 'names ...'\n"
26248 #: ../fish/guestfish-actions.pod:2420
26250 "This call allows you to perform the L</lstat> operation on multiple files, "
26251 "where all files are in the directory C<path>. C<names> is the list of files "
26252 "from this directory."
26257 #: ../fish/guestfish-actions.pod:2429
26259 "This call is intended for programs that want to efficiently list a directory "
26260 "contents without making many round-trips. See also L</lxattrlist> for a "
26261 "similarly efficient call for getting extended attributes. Very long "
26262 "directory listings might cause the protocol message size to be exceeded, "
26263 "causing this call to fail. The caller must split up such requests into "
26264 "smaller groups of names."
26269 #: ../fish/guestfish-actions.pod:2437
26270 msgid "luks-add-key"
26275 #: ../fish/guestfish-actions.pod:2439
26278 " luks-add-key device keyslot\n"
26284 #: ../fish/guestfish-actions.pod:2446
26286 "Note that if C<keyslot> already contains a key, then this command will "
26287 "fail. You have to use L</luks-kill-slot> first to remove that key."
26292 #: ../fish/guestfish-actions.pod:2450 ../fish/guestfish-actions.pod:2472
26293 #: ../fish/guestfish-actions.pod:2485 ../fish/guestfish-actions.pod:2499
26294 #: ../fish/guestfish-actions.pod:2522 ../fish/guestfish-actions.pod:2532
26296 "This command has one or more key or passphrase parameters. Guestfish will "
26297 "prompt for these separately."
26302 #: ../fish/guestfish-actions.pod:2453
26308 #: ../fish/guestfish-actions.pod:2455
26311 " luks-close device\n"
26317 #: ../fish/guestfish-actions.pod:2457
26319 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
26320 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
26321 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
26327 #: ../fish/guestfish-actions.pod:2463
26328 msgid "luks-format"
26333 #: ../fish/guestfish-actions.pod:2465
26336 " luks-format device keyslot\n"
26342 #: ../fish/guestfish-actions.pod:2478
26343 msgid "luks-format-cipher"
26348 #: ../fish/guestfish-actions.pod:2480
26351 " luks-format-cipher device keyslot cipher\n"
26357 #: ../fish/guestfish-actions.pod:2482
26359 "This command is the same as L</luks-format> but it also allows you to set "
26360 "the C<cipher> used."
26365 #: ../fish/guestfish-actions.pod:2491
26366 msgid "luks-kill-slot"
26371 #: ../fish/guestfish-actions.pod:2493
26374 " luks-kill-slot device keyslot\n"
26380 #: ../fish/guestfish-actions.pod:2502
26386 #: ../fish/guestfish-actions.pod:2504
26389 " luks-open device mapname\n"
26395 #: ../fish/guestfish-actions.pod:2518
26397 "If this block device contains LVM volume groups, then calling L</vgscan> "
26398 "followed by L</vg-activate-all> will make them visible."
26403 #: ../fish/guestfish-actions.pod:2525
26404 msgid "luks-open-ro"
26409 #: ../fish/guestfish-actions.pod:2527
26412 " luks-open-ro device mapname\n"
26418 #: ../fish/guestfish-actions.pod:2529
26420 "This is the same as L</luks-open> except that a read-only mapping is created."
26425 #: ../fish/guestfish-actions.pod:2535
26431 #: ../fish/guestfish-actions.pod:2537
26434 " lvcreate logvol volgroup mbytes\n"
26440 #: ../fish/guestfish-actions.pod:2542
26441 msgid "lvm-canonical-lv-name"
26446 #: ../fish/guestfish-actions.pod:2544
26449 " lvm-canonical-lv-name lvname\n"
26455 #: ../fish/guestfish-actions.pod:2553
26456 msgid "See also L</is-lv>."
26461 #: ../fish/guestfish-actions.pod:2555
26462 msgid "lvm-clear-filter"
26467 #: ../fish/guestfish-actions.pod:2557
26470 " lvm-clear-filter\n"
26476 #: ../fish/guestfish-actions.pod:2559
26478 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
26484 #: ../fish/guestfish-actions.pod:2565
26485 msgid "lvm-remove-all"
26490 #: ../fish/guestfish-actions.pod:2567
26493 " lvm-remove-all\n"
26499 #: ../fish/guestfish-actions.pod:2575
26500 msgid "lvm-set-filter"
26505 #: ../fish/guestfish-actions.pod:2577
26508 " lvm-set-filter 'devices ...'\n"
26514 #: ../fish/guestfish-actions.pod:2602
26520 #: ../fish/guestfish-actions.pod:2604
26523 " lvremove device\n"
26529 #: ../fish/guestfish-actions.pod:2612
26535 #: ../fish/guestfish-actions.pod:2614
26538 " lvrename logvol newlogvol\n"
26544 #: ../fish/guestfish-actions.pod:2618
26550 #: ../fish/guestfish-actions.pod:2620
26553 " lvresize device mbytes\n"
26559 #: ../fish/guestfish-actions.pod:2626
26560 msgid "lvresize-free"
26565 #: ../fish/guestfish-actions.pod:2628
26568 " lvresize-free lv percent\n"
26574 #: ../fish/guestfish-actions.pod:2636
26580 #: ../fish/guestfish-actions.pod:2638
26589 #: ../fish/guestfish-actions.pod:2646
26590 msgid "See also L</lvs-full>, L</list-filesystems>."
26595 #: ../fish/guestfish-actions.pod:2648
26601 #: ../fish/guestfish-actions.pod:2650
26610 #: ../fish/guestfish-actions.pod:2655
26616 #: ../fish/guestfish-actions.pod:2657
26625 #: ../fish/guestfish-actions.pod:2661
26631 #: ../fish/guestfish-actions.pod:2663
26634 " lxattrlist path 'names ...'\n"
26640 #: ../fish/guestfish-actions.pod:2679
26642 "This call is intended for programs that want to efficiently list a directory "
26643 "contents without making many round-trips. See also L</lstatlist> for a "
26644 "similarly efficient call for getting standard stats. Very long directory "
26645 "listings might cause the protocol message size to be exceeded, causing this "
26646 "call to fail. The caller must split up such requests into smaller groups of "
26652 #: ../fish/guestfish-actions.pod:2687
26658 #: ../fish/guestfish-actions.pod:2689
26667 #: ../fish/guestfish-actions.pod:2693
26673 #: ../fish/guestfish-actions.pod:2695
26676 " mkdir-mode path mode\n"
26682 #: ../fish/guestfish-actions.pod:2704
26683 msgid "See also L</mkdir>, L</umask>"
26688 #: ../fish/guestfish-actions.pod:2706
26694 #: ../fish/guestfish-actions.pod:2708
26703 #: ../fish/guestfish-actions.pod:2713
26709 #: ../fish/guestfish-actions.pod:2715
26712 " mkdtemp template\n"
26718 #: ../fish/guestfish-actions.pod:2736
26724 #: ../fish/guestfish-actions.pod:2738
26727 " mke2fs-J fstype blocksize device journal\n"
26733 #: ../fish/guestfish-actions.pod:2746
26734 msgid "See also L</mke2journal>."
26739 #: ../fish/guestfish-actions.pod:2748
26745 #: ../fish/guestfish-actions.pod:2750
26748 " mke2fs-JL fstype blocksize device label\n"
26754 #: ../fish/guestfish-actions.pod:2755
26755 msgid "See also L</mke2journal-L>."
26760 #: ../fish/guestfish-actions.pod:2757
26766 #: ../fish/guestfish-actions.pod:2759
26769 " mke2fs-JU fstype blocksize device uuid\n"
26775 #: ../fish/guestfish-actions.pod:2764
26776 msgid "See also L</mke2journal-U>."
26781 #: ../fish/guestfish-actions.pod:2766
26782 msgid "mke2journal"
26787 #: ../fish/guestfish-actions.pod:2768
26790 " mke2journal blocksize device\n"
26796 #: ../fish/guestfish-actions.pod:2775
26797 msgid "mke2journal-L"
26802 #: ../fish/guestfish-actions.pod:2777
26805 " mke2journal-L blocksize label device\n"
26811 #: ../fish/guestfish-actions.pod:2781
26812 msgid "mke2journal-U"
26817 #: ../fish/guestfish-actions.pod:2783
26820 " mke2journal-U blocksize uuid device\n"
26826 #: ../fish/guestfish-actions.pod:2787
26832 #: ../fish/guestfish-actions.pod:2789
26835 " mkfifo mode path\n"
26841 #: ../fish/guestfish-actions.pod:2791
26843 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
26844 "is just a convenient wrapper around L</mknod>."
26849 #: ../fish/guestfish-actions.pod:2797
26855 #: ../fish/guestfish-actions.pod:2799
26858 " mkfs fstype device\n"
26864 #: ../fish/guestfish-actions.pod:2805
26870 #: ../fish/guestfish-actions.pod:2807
26873 " mkfs-b fstype blocksize device\n"
26879 #: ../fish/guestfish-actions.pod:2809
26881 "This call is similar to L</mkfs>, but it allows you to control the block "
26882 "size of the resulting filesystem. Supported block sizes depend on the "
26883 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
26888 #: ../fish/guestfish-actions.pod:2824
26894 #: ../fish/guestfish-actions.pod:2826
26897 " mkfs-opts fstype device [blocksize:..]\n"
26903 #: ../fish/guestfish-actions.pod:2848
26904 msgid "mkmountpoint"
26909 #: ../fish/guestfish-actions.pod:2850
26912 " mkmountpoint exemptpath\n"
26918 #: ../fish/guestfish-actions.pod:2852
26920 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
26921 "to create extra mountpoints before mounting the first filesystem."
26926 #: ../fish/guestfish-actions.pod:2876
26928 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
26929 "unexpected errors if you try to mix these calls. It is safest to manually "
26930 "unmount filesystems and remove mountpoints after use."
26935 #: ../fish/guestfish-actions.pod:2880
26937 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
26938 "for this to work for manual mountpoints, you must ensure that the innermost "
26939 "mountpoints have the longest pathnames, as in the example code above."
26944 #: ../fish/guestfish-actions.pod:2887
26946 "Autosync [see L</set-autosync>, this is set by default on handles] means "
26947 "that L</umount-all> is called when the handle is closed which can also "
26948 "trigger these issues."
26953 #: ../fish/guestfish-actions.pod:2891
26959 #: ../fish/guestfish-actions.pod:2893
26962 " mknod mode devmajor devminor path\n"
26968 #: ../fish/guestfish-actions.pod:2903
26970 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
26971 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
26972 "regular file). These constants are available in the standard Linux header "
26973 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
26974 "wrappers around this command which bitwise OR in the appropriate constant "
26980 #: ../fish/guestfish-actions.pod:2913
26986 #: ../fish/guestfish-actions.pod:2915
26989 " mknod-b mode devmajor devminor path\n"
26995 #: ../fish/guestfish-actions.pod:2917
26997 "This call creates a block device node called C<path> with mode C<mode> and "
26998 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
26999 "wrapper around L</mknod>."
27004 #: ../fish/guestfish-actions.pod:2923
27010 #: ../fish/guestfish-actions.pod:2925
27013 " mknod-c mode devmajor devminor path\n"
27019 #: ../fish/guestfish-actions.pod:2927
27021 "This call creates a char device node called C<path> with mode C<mode> and "
27022 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
27023 "wrapper around L</mknod>."
27028 #: ../fish/guestfish-actions.pod:2933
27034 #: ../fish/guestfish-actions.pod:2935
27043 #: ../fish/guestfish-actions.pod:2939
27049 #: ../fish/guestfish-actions.pod:2941
27052 " mkswap-L label device\n"
27058 #: ../fish/guestfish-actions.pod:2949
27064 #: ../fish/guestfish-actions.pod:2951
27067 " mkswap-U uuid device\n"
27073 #: ../fish/guestfish-actions.pod:2955
27074 msgid "mkswap-file"
27079 #: ../fish/guestfish-actions.pod:2957
27082 " mkswap-file path\n"
27088 #: ../fish/guestfish-actions.pod:2961
27090 "This command just writes a swap file signature to an existing file. To "
27091 "create the file itself, use something like L</fallocate>."
27096 #: ../fish/guestfish-actions.pod:2964
27102 #: ../fish/guestfish-actions.pod:2966
27105 " modprobe modulename\n"
27111 #: ../fish/guestfish-actions.pod:2973
27117 #: ../fish/guestfish-actions.pod:2975
27120 " mount device mountpoint\n"
27126 #: ../fish/guestfish-actions.pod:2991
27128 "B<Important note:> When you use this call, the filesystem options C<sync> "
27129 "and C<noatime> are set implicitly. This was originally done because we "
27130 "thought it would improve reliability, but it turns out that I<-o sync> has a "
27131 "very large negative performance impact and negligible effect on "
27132 "reliability. Therefore we recommend that you avoid using L</mount> in any "
27133 "code that needs performance, and instead use L</mount-options> (use an empty "
27134 "string for the first parameter if you don't want any options)."
27139 #: ../fish/guestfish-actions.pod:3001
27145 #: ../fish/guestfish-actions.pod:3003
27148 " mount-loop file mountpoint\n"
27154 #: ../fish/guestfish-actions.pod:3009
27155 msgid "mount-options"
27160 #: ../fish/guestfish-actions.pod:3011
27163 " mount-options options device mountpoint\n"
27169 #: ../fish/guestfish-actions.pod:3013
27171 "This is the same as the L</mount> command, but it allows you to set the "
27172 "mount options as for the L<mount(8)> I<-o> flag."
27177 #: ../fish/guestfish-actions.pod:3021
27183 #: ../fish/guestfish-actions.pod:3023
27186 " mount-ro device mountpoint\n"
27192 #: ../fish/guestfish-actions.pod:3025
27194 "This is the same as the L</mount> command, but it mounts the filesystem with "
27195 "the read-only (I<-o ro>) flag."
27200 #: ../fish/guestfish-actions.pod:3028
27206 #: ../fish/guestfish-actions.pod:3030
27209 " mount-vfs options vfstype device mountpoint\n"
27215 #: ../fish/guestfish-actions.pod:3032
27217 "This is the same as the L</mount> command, but it allows you to set both the "
27218 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
27223 #: ../fish/guestfish-actions.pod:3036
27224 msgid "mountpoints"
27229 #: ../fish/guestfish-actions.pod:3038
27238 #: ../fish/guestfish-actions.pod:3040
27240 "This call is similar to L</mounts>. That call returns a list of devices. "
27241 "This one returns a hash table (map) of device name to directory where the "
27242 "device is mounted."
27247 #: ../fish/guestfish-actions.pod:3044
27253 #: ../fish/guestfish-actions.pod:3046
27262 #: ../fish/guestfish-actions.pod:3053
27263 msgid "See also: L</mountpoints>"
27268 #: ../fish/guestfish-actions.pod:3055
27274 #: ../fish/guestfish-actions.pod:3057
27283 #: ../fish/guestfish-actions.pod:3062
27284 msgid "ntfs-3g-probe"
27289 #: ../fish/guestfish-actions.pod:3064
27292 " ntfs-3g-probe true|false device\n"
27298 #: ../fish/guestfish-actions.pod:3078
27304 #: ../fish/guestfish-actions.pod:3080
27307 " ntfsresize device\n"
27313 #: ../fish/guestfish-actions.pod:3086
27314 msgid "ntfsresize-size"
27319 #: ../fish/guestfish-actions.pod:3088
27322 " ntfsresize-size device size\n"
27328 #: ../fish/guestfish-actions.pod:3090
27330 "This command is the same as L</ntfsresize> except that it allows you to "
27331 "specify the new size (in bytes) explicitly."
27336 #: ../fish/guestfish-actions.pod:3093
27342 #: ../fish/guestfish-actions.pod:3095
27345 " part-add device prlogex startsect endsect\n"
27351 #: ../fish/guestfish-actions.pod:3097
27353 "This command adds a partition to C<device>. If there is no partition table "
27354 "on the device, call L</part-init> first."
27359 #: ../fish/guestfish-actions.pod:3109
27361 "Creating a partition which covers the whole disk is not so easy. Use L</"
27362 "part-disk> to do that."
27367 #: ../fish/guestfish-actions.pod:3112
27373 #: ../fish/guestfish-actions.pod:3114
27376 " part-del device partnum\n"
27382 #: ../fish/guestfish-actions.pod:3122
27388 #: ../fish/guestfish-actions.pod:3124
27391 " part-disk device parttype\n"
27397 #: ../fish/guestfish-actions.pod:3126
27399 "This command is simply a combination of L</part-init> followed by L</part-"
27400 "add> to create a single primary partition covering the whole disk."
27405 #: ../fish/guestfish-actions.pod:3130
27407 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
27408 "possible values are described in L</part-init>."
27413 #: ../fish/guestfish-actions.pod:3136
27414 msgid "part-get-bootable"
27419 #: ../fish/guestfish-actions.pod:3138
27422 " part-get-bootable device partnum\n"
27428 #: ../fish/guestfish-actions.pod:3143
27429 msgid "See also L</part-set-bootable>."
27434 #: ../fish/guestfish-actions.pod:3145
27435 msgid "part-get-mbr-id"
27440 #: ../fish/guestfish-actions.pod:3147
27443 " part-get-mbr-id device partnum\n"
27449 #: ../fish/guestfish-actions.pod:3152 ../fish/guestfish-actions.pod:3290
27451 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
27452 "undefined results for other partition table types (see L</part-get-"
27458 #: ../fish/guestfish-actions.pod:3156
27459 msgid "part-get-parttype"
27464 #: ../fish/guestfish-actions.pod:3158
27467 " part-get-parttype device\n"
27473 #: ../fish/guestfish-actions.pod:3163
27475 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
27476 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
27477 "possible, although unusual. See L</part-init> for a full list."
27482 #: ../fish/guestfish-actions.pod:3168
27488 #: ../fish/guestfish-actions.pod:3170
27491 " part-init device parttype\n"
27497 #: ../fish/guestfish-actions.pod:3176
27499 "Initially there are no partitions. Following this, you should call L</part-"
27500 "add> for each partition required."
27505 #: ../fish/guestfish-actions.pod:3239
27511 #: ../fish/guestfish-actions.pod:3241
27514 " part-list device\n"
27520 #: ../fish/guestfish-actions.pod:3256
27522 "Start of the partition I<in bytes>. To get sectors you have to divide by "
27523 "the device's sector size, see L</blockdev-getss>."
27528 #: ../fish/guestfish-actions.pod:3269
27529 msgid "part-set-bootable"
27534 #: ../fish/guestfish-actions.pod:3271
27537 " part-set-bootable device partnum true|false\n"
27543 #: ../fish/guestfish-actions.pod:3280
27544 msgid "part-set-mbr-id"
27549 #: ../fish/guestfish-actions.pod:3282
27552 " part-set-mbr-id device partnum idbyte\n"
27558 #: ../fish/guestfish-actions.pod:3294
27559 msgid "part-set-name"
27564 #: ../fish/guestfish-actions.pod:3296
27567 " part-set-name device partnum name\n"
27573 #: ../fish/guestfish-actions.pod:3304
27574 msgid "part-to-dev"
27579 #: ../fish/guestfish-actions.pod:3306
27582 " part-to-dev partition\n"
27588 #: ../fish/guestfish-actions.pod:3312
27590 "The named partition must exist, for example as a string returned from L</"
27591 "list-partitions>."
27596 #: ../fish/guestfish-actions.pod:3315
27597 msgid "ping-daemon"
27602 #: ../fish/guestfish-actions.pod:3317
27611 #: ../fish/guestfish-actions.pod:3324
27617 #: ../fish/guestfish-actions.pod:3326
27620 " pread path count offset\n"
27626 #: ../fish/guestfish-actions.pod:3334
27627 msgid "See also L</pwrite>, L</pread-device>."
27632 #: ../fish/guestfish-actions.pod:3339
27633 msgid "pread-device"
27638 #: ../fish/guestfish-actions.pod:3341
27641 " pread-device device count offset\n"
27647 #: ../fish/guestfish-actions.pod:3349
27648 msgid "See also L</pread>."
27653 #: ../fish/guestfish-actions.pod:3354
27659 #: ../fish/guestfish-actions.pod:3356
27662 " pvcreate device\n"
27668 #: ../fish/guestfish-actions.pod:3362
27674 #: ../fish/guestfish-actions.pod:3364
27677 " pvremove device\n"
27683 #: ../fish/guestfish-actions.pod:3373
27689 #: ../fish/guestfish-actions.pod:3375
27692 " pvresize device\n"
27698 #: ../fish/guestfish-actions.pod:3380
27699 msgid "pvresize-size"
27704 #: ../fish/guestfish-actions.pod:3382
27707 " pvresize-size device size\n"
27713 #: ../fish/guestfish-actions.pod:3384
27715 "This command is the same as L</pvresize> except that it allows you to "
27716 "specify the new size (in bytes) explicitly."
27721 #: ../fish/guestfish-actions.pod:3387
27727 #: ../fish/guestfish-actions.pod:3389
27736 #: ../fish/guestfish-actions.pod:3397
27737 msgid "See also L</pvs-full>."
27742 #: ../fish/guestfish-actions.pod:3399
27748 #: ../fish/guestfish-actions.pod:3401
27757 #: ../fish/guestfish-actions.pod:3406
27763 #: ../fish/guestfish-actions.pod:3408
27772 #: ../fish/guestfish-actions.pod:3412
27778 #: ../fish/guestfish-actions.pod:3414
27781 " pwrite path content offset\n"
27787 #: ../fish/guestfish-actions.pod:3425
27788 msgid "See also L</pread>, L</pwrite-device>."
27793 #: ../fish/guestfish-actions.pod:3430
27794 msgid "pwrite-device"
27799 #: ../fish/guestfish-actions.pod:3432
27802 " pwrite-device device content offset\n"
27808 #: ../fish/guestfish-actions.pod:3442
27809 msgid "See also L</pwrite>."
27814 #: ../fish/guestfish-actions.pod:3447
27820 #: ../fish/guestfish-actions.pod:3449
27823 " read-file path\n"
27829 #: ../fish/guestfish-actions.pod:3454
27831 "Unlike L</cat>, this function can correctly handle files that contain "
27832 "embedded ASCII NUL characters. However unlike L</download>, this function "
27833 "is limited in the total size of file that can be handled."
27838 #: ../fish/guestfish-actions.pod:3462
27844 #: ../fish/guestfish-actions.pod:3464
27847 " read-lines path\n"
27853 #: ../fish/guestfish-actions.pod:3471
27855 "Note that this function cannot correctly handle binary files (specifically, "
27856 "files containing C<\\0> character which is treated as end of line). For "
27857 "those you need to use the L</read-file> function which has a more complex "
27863 #: ../fish/guestfish-actions.pod:3476
27869 #: ../fish/guestfish-actions.pod:3478
27878 #: ../fish/guestfish-actions.pod:3530
27880 "This function is primarily intended for use by programs. To get a simple "
27881 "list of names, use L</ls>. To get a printable directory for human "
27882 "consumption, use L</ll>."
27887 #: ../fish/guestfish-actions.pod:3534
27893 #: ../fish/guestfish-actions.pod:3536
27902 #: ../fish/guestfish-actions.pod:3540
27903 msgid "readlinklist"
27908 #: ../fish/guestfish-actions.pod:3542
27911 " readlinklist path 'names ...'\n"
27917 #: ../fish/guestfish-actions.pod:3566
27923 #: ../fish/guestfish-actions.pod:3568
27932 #: ../fish/guestfish-actions.pod:3573
27933 msgid "removexattr"
27938 #: ../fish/guestfish-actions.pod:3575
27941 " removexattr xattr path\n"
27947 #: ../fish/guestfish-actions.pod:3580
27948 msgid "See also: L</lremovexattr>, L<attr(5)>."
27953 #: ../fish/guestfish-actions.pod:3582
27959 #: ../fish/guestfish-actions.pod:3584
27962 " resize2fs device\n"
27968 #: ../fish/guestfish-actions.pod:3589
27970 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
27971 "before calling this command. For unknown reasons C<resize2fs> sometimes "
27972 "gives an error about this and sometimes not. In any case, it is always safe "
27973 "to call L</e2fsck-f> before calling this function."
27978 #: ../fish/guestfish-actions.pod:3595
27979 msgid "resize2fs-size"
27984 #: ../fish/guestfish-actions.pod:3597
27987 " resize2fs-size device size\n"
27993 #: ../fish/guestfish-actions.pod:3599
27995 "This command is the same as L</resize2fs> except that it allows you to "
27996 "specify the new size (in bytes) explicitly."
28001 #: ../fish/guestfish-actions.pod:3602
28007 #: ../fish/guestfish-actions.pod:3604
28016 #: ../fish/guestfish-actions.pod:3608
28022 #: ../fish/guestfish-actions.pod:3610
28031 #: ../fish/guestfish-actions.pod:3616
28037 #: ../fish/guestfish-actions.pod:3618
28046 #: ../fish/guestfish-actions.pod:3622
28047 msgid "rmmountpoint"
28052 #: ../fish/guestfish-actions.pod:3624
28055 " rmmountpoint exemptpath\n"
28061 #: ../fish/guestfish-actions.pod:3626
28063 "This calls removes a mountpoint that was previously created with L</"
28064 "mkmountpoint>. See L</mkmountpoint> for full details."
28069 #: ../fish/guestfish-actions.pod:3630
28070 msgid "scrub-device"
28075 #: ../fish/guestfish-actions.pod:3632
28078 " scrub-device device\n"
28084 #: ../fish/guestfish-actions.pod:3643
28090 #: ../fish/guestfish-actions.pod:3645
28093 " scrub-file file\n"
28099 #: ../fish/guestfish-actions.pod:3655
28100 msgid "scrub-freespace"
28105 #: ../fish/guestfish-actions.pod:3657
28108 " scrub-freespace dir\n"
28114 #: ../fish/guestfish-actions.pod:3659
28116 "This command creates the directory C<dir> and then fills it with files until "
28117 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
28118 "deletes them. The intention is to scrub any free space on the partition "
28119 "containing C<dir>."
28124 #: ../fish/guestfish-actions.pod:3668
28130 #: ../fish/guestfish-actions.pod:3670
28136 #: ../fish/guestfish-actions.pod:3672
28139 " set-append append\n"
28145 #: ../fish/guestfish-actions.pod:3683
28146 msgid "set-autosync"
28151 #: ../fish/guestfish-actions.pod:3685
28157 #: ../fish/guestfish-actions.pod:3687
28160 " set-autosync true|false\n"
28166 #: ../fish/guestfish-actions.pod:3689
28168 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
28169 "effort attempt to run L</umount-all> followed by L</sync> when the handle is "
28170 "closed (also if the program exits without closing handles)."
28175 #: ../fish/guestfish-actions.pod:3697
28181 #: ../fish/guestfish-actions.pod:3699
28187 #: ../fish/guestfish-actions.pod:3701
28190 " set-direct true|false\n"
28196 #: ../fish/guestfish-actions.pod:3707
28198 "One consequence of this is that log messages aren't caught by the library "
28199 "and handled by L</set-log-message-callback>, but go straight to stdout."
28204 #: ../fish/guestfish-actions.pod:3716
28205 msgid "set-e2label"
28210 #: ../fish/guestfish-actions.pod:3718
28213 " set-e2label device label\n"
28219 #: ../fish/guestfish-actions.pod:3724
28221 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
28222 "label on a filesystem."
28227 #: ../fish/guestfish-actions.pod:3727
28233 #: ../fish/guestfish-actions.pod:3729
28236 " set-e2uuid device uuid\n"
28242 #: ../fish/guestfish-actions.pod:3736
28244 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
28245 "UUID of a filesystem."
28250 #: ../fish/guestfish-actions.pod:3739
28251 msgid "set-memsize"
28256 #: ../fish/guestfish-actions.pod:3741
28262 #: ../fish/guestfish-actions.pod:3743
28265 " set-memsize memsize\n"
28271 #: ../fish/guestfish-actions.pod:3745
28273 "This sets the memory size in megabytes allocated to the qemu subprocess. "
28274 "This only has any effect if called before L</launch>."
28279 #: ../fish/guestfish-actions.pod:3756
28280 msgid "set-network"
28285 #: ../fish/guestfish-actions.pod:3758
28291 #: ../fish/guestfish-actions.pod:3760
28294 " set-network true|false\n"
28300 #: ../fish/guestfish-actions.pod:3768
28302 "You must call this before calling L</launch>, otherwise it has no effect."
28307 #: ../fish/guestfish-actions.pod:3771
28313 #: ../fish/guestfish-actions.pod:3773
28319 #: ../fish/guestfish-actions.pod:3775
28322 " set-path searchpath\n"
28328 #: ../fish/guestfish-actions.pod:3784
28334 #: ../fish/guestfish-actions.pod:3786
28340 #: ../fish/guestfish-actions.pod:3788
28349 #: ../fish/guestfish-actions.pod:3808
28350 msgid "set-recovery-proc"
28355 #: ../fish/guestfish-actions.pod:3810
28356 msgid "recovery-proc"
28361 #: ../fish/guestfish-actions.pod:3812
28364 " set-recovery-proc true|false\n"
28370 #: ../fish/guestfish-actions.pod:3814
28372 "If this is called with the parameter C<false> then L</launch> does not "
28373 "create a recovery process. The purpose of the recovery process is to stop "
28374 "runaway qemu processes in the case where the main program aborts abruptly."
28379 #: ../fish/guestfish-actions.pod:3819
28381 "This only has any effect if called before L</launch>, and the default is "
28387 #: ../fish/guestfish-actions.pod:3828
28388 msgid "set-selinux"
28393 #: ../fish/guestfish-actions.pod:3830
28399 #: ../fish/guestfish-actions.pod:3832
28402 " set-selinux true|false\n"
28408 #: ../fish/guestfish-actions.pod:3843
28414 #: ../fish/guestfish-actions.pod:3845
28420 #: ../fish/guestfish-actions.pod:3847
28423 " set-trace true|false\n"
28429 #: ../fish/guestfish-actions.pod:3863
28430 msgid "set-verbose"
28435 #: ../fish/guestfish-actions.pod:3865
28441 #: ../fish/guestfish-actions.pod:3867
28444 " set-verbose true|false\n"
28450 #: ../fish/guestfish-actions.pod:3874
28456 #: ../fish/guestfish-actions.pod:3876
28459 " setcon context\n"
28465 #: ../fish/guestfish-actions.pod:3883
28471 #: ../fish/guestfish-actions.pod:3885
28474 " setxattr xattr val vallen path\n"
28480 #: ../fish/guestfish-actions.pod:3891
28481 msgid "See also: L</lsetxattr>, L<attr(5)>."
28486 #: ../fish/guestfish-actions.pod:3893
28492 #: ../fish/guestfish-actions.pod:3895
28495 " sfdisk device cyls heads sectors 'lines ...'\n"
28501 #: ../fish/guestfish-actions.pod:3917
28502 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
28507 #: ../fish/guestfish-actions.pod:3923
28513 #: ../fish/guestfish-actions.pod:3925
28516 " sfdiskM device 'lines ...'\n"
28522 #: ../fish/guestfish-actions.pod:3927
28524 "This is a simplified interface to the L</sfdisk> command, where partition "
28525 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
28526 "you don't need to specify the cyls, heads and sectors parameters which were "
28527 "rarely if ever used anyway."
28532 #: ../fish/guestfish-actions.pod:3933
28533 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
28538 #: ../fish/guestfish-actions.pod:3939
28544 #: ../fish/guestfish-actions.pod:3941
28547 " sfdisk-N device partnum cyls heads sectors line\n"
28553 #: ../fish/guestfish-actions.pod:3946
28555 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
28556 "cyls/heads/sectors parameters."
28561 #: ../fish/guestfish-actions.pod:3949
28562 msgid "See also: L</part-add>"
28567 #: ../fish/guestfish-actions.pod:3954
28568 msgid "sfdisk-disk-geometry"
28573 #: ../fish/guestfish-actions.pod:3956
28576 " sfdisk-disk-geometry device\n"
28582 #: ../fish/guestfish-actions.pod:3958
28584 "This displays the disk geometry of C<device> read from the partition table. "
28585 "Especially in the case where the underlying block device has been resized, "
28586 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
28587 "kernel-geometry>)."
28592 #: ../fish/guestfish-actions.pod:3966
28593 msgid "sfdisk-kernel-geometry"
28598 #: ../fish/guestfish-actions.pod:3968
28601 " sfdisk-kernel-geometry device\n"
28607 #: ../fish/guestfish-actions.pod:3975
28613 #: ../fish/guestfish-actions.pod:3977
28616 " sfdisk-l device\n"
28622 #: ../fish/guestfish-actions.pod:3983
28623 msgid "See also: L</part-list>"
28628 #: ../fish/guestfish-actions.pod:3985
28634 #: ../fish/guestfish-actions.pod:3987
28643 #: ../fish/guestfish-actions.pod:3992
28644 msgid "This is like L</command>, but passes the command to:"
28649 #: ../fish/guestfish-actions.pod:4000
28650 msgid "All the provisos about L</command> apply to this call."
28655 #: ../fish/guestfish-actions.pod:4002
28661 #: ../fish/guestfish-actions.pod:4004
28664 " sh-lines command\n"
28670 #: ../fish/guestfish-actions.pod:4006
28671 msgid "This is the same as L</sh>, but splits the result into a list of lines."
28676 #: ../fish/guestfish-actions.pod:4009
28677 msgid "See also: L</command-lines>"
28682 #: ../fish/guestfish-actions.pod:4011
28688 #: ../fish/guestfish-actions.pod:4013
28697 #: ../fish/guestfish-actions.pod:4017
28703 #: ../fish/guestfish-actions.pod:4019
28712 #: ../fish/guestfish-actions.pod:4025
28718 #: ../fish/guestfish-actions.pod:4027
28727 #: ../fish/guestfish-actions.pod:4035
28733 #: ../fish/guestfish-actions.pod:4037
28742 #: ../fish/guestfish-actions.pod:4045
28748 #: ../fish/guestfish-actions.pod:4047
28751 " strings-e encoding path\n"
28757 #: ../fish/guestfish-actions.pod:4049
28759 "This is like the L</strings> command, but allows you to specify the encoding "
28760 "of strings that are looked for in the source file C<path>."
28765 #: ../fish/guestfish-actions.pod:4059
28767 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
28768 "ISO-8859-X (this is what L</strings> uses)."
28773 #: ../fish/guestfish-actions.pod:4091
28774 msgid "swapoff-device"
28779 #: ../fish/guestfish-actions.pod:4093
28782 " swapoff-device device\n"
28788 #: ../fish/guestfish-actions.pod:4095
28790 "This command disables the libguestfs appliance swap device or partition "
28791 "named C<device>. See L</swapon-device>."
28796 #: ../fish/guestfish-actions.pod:4099
28797 msgid "swapoff-file"
28802 #: ../fish/guestfish-actions.pod:4101
28805 " swapoff-file file\n"
28811 #: ../fish/guestfish-actions.pod:4105
28812 msgid "swapoff-label"
28817 #: ../fish/guestfish-actions.pod:4107
28820 " swapoff-label label\n"
28826 #: ../fish/guestfish-actions.pod:4112
28827 msgid "swapoff-uuid"
28832 #: ../fish/guestfish-actions.pod:4114
28835 " swapoff-uuid uuid\n"
28841 #: ../fish/guestfish-actions.pod:4119
28842 msgid "swapon-device"
28847 #: ../fish/guestfish-actions.pod:4121
28850 " swapon-device device\n"
28856 #: ../fish/guestfish-actions.pod:4123
28858 "This command enables the libguestfs appliance to use the swap device or "
28859 "partition named C<device>. The increased memory is made available for all "
28860 "commands, for example those run using L</command> or L</sh>."
28865 #: ../fish/guestfish-actions.pod:4135
28866 msgid "swapon-file"
28871 #: ../fish/guestfish-actions.pod:4137
28874 " swapon-file file\n"
28880 #: ../fish/guestfish-actions.pod:4139
28882 "This command enables swap to a file. See L</swapon-device> for other notes."
28887 #: ../fish/guestfish-actions.pod:4142
28888 msgid "swapon-label"
28893 #: ../fish/guestfish-actions.pod:4144
28896 " swapon-label label\n"
28902 #: ../fish/guestfish-actions.pod:4146
28904 "This command enables swap to a labeled swap partition. See L</swapon-"
28905 "device> for other notes."
28910 #: ../fish/guestfish-actions.pod:4149
28911 msgid "swapon-uuid"
28916 #: ../fish/guestfish-actions.pod:4151
28919 " swapon-uuid uuid\n"
28925 #: ../fish/guestfish-actions.pod:4153
28927 "This command enables swap to a swap partition with the given UUID. See L</"
28928 "swapon-device> for other notes."
28933 #: ../fish/guestfish-actions.pod:4156
28939 #: ../fish/guestfish-actions.pod:4158
28948 #: ../fish/guestfish-actions.pod:4166
28954 #: ../fish/guestfish-actions.pod:4168
28963 #: ../fish/guestfish-actions.pod:4176
28969 #: ../fish/guestfish-actions.pod:4178
28972 " tail-n nrlines path\n"
28978 #: ../fish/guestfish-actions.pod:4191
28984 #: ../fish/guestfish-actions.pod:4193
28987 " tar-in (tarfile|-) directory\n"
28993 #: ../fish/guestfish-actions.pod:4198
28994 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
28999 #: ../fish/guestfish-actions.pod:4203
29005 #: ../fish/guestfish-actions.pod:4205
29008 " tar-out directory (tarfile|-)\n"
29014 #: ../fish/guestfish-actions.pod:4210
29015 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
29020 #: ../fish/guestfish-actions.pod:4215
29026 #: ../fish/guestfish-actions.pod:4217
29029 " tgz-in (tarball|-) directory\n"
29035 #: ../fish/guestfish-actions.pod:4222
29036 msgid "To upload an uncompressed tarball, use L</tar-in>."
29041 #: ../fish/guestfish-actions.pod:4226
29047 #: ../fish/guestfish-actions.pod:4228
29050 " tgz-out directory (tarball|-)\n"
29056 #: ../fish/guestfish-actions.pod:4233
29057 msgid "To download an uncompressed tarball, use L</tar-out>."
29062 #: ../fish/guestfish-actions.pod:4237
29068 #: ../fish/guestfish-actions.pod:4239
29077 #: ../fish/guestfish-actions.pod:4248
29083 #: ../fish/guestfish-actions.pod:4250
29092 #: ../fish/guestfish-actions.pod:4255
29093 msgid "truncate-size"
29098 #: ../fish/guestfish-actions.pod:4257
29101 " truncate-size path size\n"
29107 #: ../fish/guestfish-actions.pod:4262
29109 "If the current file size is less than C<size> then the file is extended to "
29110 "the required size with zero bytes. This creates a sparse file (ie. disk "
29111 "blocks are not allocated for the file until you write to it). To create a "
29112 "non-sparse file of zeroes, use L</fallocate64> instead."
29117 #: ../fish/guestfish-actions.pod:4268
29123 #: ../fish/guestfish-actions.pod:4270
29126 " tune2fs-l device\n"
29132 #: ../fish/guestfish-actions.pod:4280
29138 #: ../fish/guestfish-actions.pod:4282
29141 " txz-in (tarball|-) directory\n"
29147 #: ../fish/guestfish-actions.pod:4289
29153 #: ../fish/guestfish-actions.pod:4291
29156 " txz-out directory (tarball|-)\n"
29162 #: ../fish/guestfish-actions.pod:4298
29168 #: ../fish/guestfish-actions.pod:4300
29177 #: ../fish/guestfish-actions.pod:4314
29178 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
29183 #: ../fish/guestfish-actions.pod:4319
29189 #: ../fish/guestfish-actions.pod:4321
29195 #: ../fish/guestfish-actions.pod:4323
29198 " umount pathordevice\n"
29204 #: ../fish/guestfish-actions.pod:4329
29210 #: ../fish/guestfish-actions.pod:4331
29211 msgid "unmount-all"
29216 #: ../fish/guestfish-actions.pod:4333
29225 #: ../fish/guestfish-actions.pod:4339
29231 #: ../fish/guestfish-actions.pod:4341
29234 " upload (filename|-) remotefilename\n"
29240 #: ../fish/guestfish-actions.pod:4348
29241 msgid "See also L</download>."
29246 #: ../fish/guestfish-actions.pod:4352
29247 msgid "upload-offset"
29252 #: ../fish/guestfish-actions.pod:4354
29255 " upload-offset (filename|-) remotefilename offset\n"
29261 #: ../fish/guestfish-actions.pod:4366
29263 "Note that there is no limit on the amount of data that can be uploaded with "
29264 "this call, unlike with L</pwrite>, and this call always writes the full "
29265 "amount unless an error occurs."
29270 #: ../fish/guestfish-actions.pod:4371
29271 msgid "See also L</upload>, L</pwrite>."
29276 #: ../fish/guestfish-actions.pod:4375
29282 #: ../fish/guestfish-actions.pod:4377
29285 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
29291 #: ../fish/guestfish-actions.pod:4396
29297 #: ../fish/guestfish-actions.pod:4398
29306 #: ../fish/guestfish-actions.pod:4425
29308 "I<Note:> Don't use this call to test for availability of features. In "
29309 "enterprise distributions we backport features from later versions into "
29310 "earlier versions, making this an unreliable way to test for features. Use "
29311 "L</available> instead."
29316 #: ../fish/guestfish-actions.pod:4431
29322 #: ../fish/guestfish-actions.pod:4433
29325 " vfs-label device\n"
29331 #: ../fish/guestfish-actions.pod:4440
29332 msgid "To find a filesystem from the label, use L</findfs-label>."
29337 #: ../fish/guestfish-actions.pod:4442
29343 #: ../fish/guestfish-actions.pod:4444
29346 " vfs-type device\n"
29352 #: ../fish/guestfish-actions.pod:4454
29358 #: ../fish/guestfish-actions.pod:4456
29361 " vfs-uuid device\n"
29367 #: ../fish/guestfish-actions.pod:4463
29368 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
29373 #: ../fish/guestfish-actions.pod:4465
29374 msgid "vg-activate"
29379 #: ../fish/guestfish-actions.pod:4467
29382 " vg-activate true|false 'volgroups ...'\n"
29388 #: ../fish/guestfish-actions.pod:4480
29389 msgid "vg-activate-all"
29394 #: ../fish/guestfish-actions.pod:4482
29397 " vg-activate-all true|false\n"
29403 #: ../fish/guestfish-actions.pod:4492
29409 #: ../fish/guestfish-actions.pod:4494
29412 " vgcreate volgroup 'physvols ...'\n"
29418 #: ../fish/guestfish-actions.pod:4499
29424 #: ../fish/guestfish-actions.pod:4501
29427 " vglvuuids vgname\n"
29433 #: ../fish/guestfish-actions.pod:4506
29435 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
29436 "logical volumes and volume groups."
29441 #: ../fish/guestfish-actions.pod:4509
29442 msgid "See also L</vgpvuuids>."
29447 #: ../fish/guestfish-actions.pod:4511
29453 #: ../fish/guestfish-actions.pod:4513
29456 " vgpvuuids vgname\n"
29462 #: ../fish/guestfish-actions.pod:4518
29464 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
29465 "physical volumes and volume groups."
29470 #: ../fish/guestfish-actions.pod:4521
29471 msgid "See also L</vglvuuids>."
29476 #: ../fish/guestfish-actions.pod:4523
29482 #: ../fish/guestfish-actions.pod:4525
29485 " vgremove vgname\n"
29491 #: ../fish/guestfish-actions.pod:4532
29497 #: ../fish/guestfish-actions.pod:4534
29500 " vgrename volgroup newvolgroup\n"
29506 #: ../fish/guestfish-actions.pod:4538
29512 #: ../fish/guestfish-actions.pod:4540
29521 #: ../fish/guestfish-actions.pod:4548
29522 msgid "See also L</vgs-full>."
29527 #: ../fish/guestfish-actions.pod:4550
29533 #: ../fish/guestfish-actions.pod:4552
29542 #: ../fish/guestfish-actions.pod:4557
29548 #: ../fish/guestfish-actions.pod:4559
29557 #: ../fish/guestfish-actions.pod:4564
29563 #: ../fish/guestfish-actions.pod:4566
29572 #: ../fish/guestfish-actions.pod:4570
29578 #: ../fish/guestfish-actions.pod:4572
29587 #: ../fish/guestfish-actions.pod:4577
29593 #: ../fish/guestfish-actions.pod:4579
29602 #: ../fish/guestfish-actions.pod:4584
29608 #: ../fish/guestfish-actions.pod:4586
29617 #: ../fish/guestfish-actions.pod:4591
29623 #: ../fish/guestfish-actions.pod:4593
29626 " write path content\n"
29632 #: ../fish/guestfish-actions.pod:4601
29638 #: ../fish/guestfish-actions.pod:4603
29641 " write-file path content size\n"
29647 #: ../fish/guestfish-actions.pod:4626
29653 #: ../fish/guestfish-actions.pod:4628
29656 " zegrep regex path\n"
29662 #: ../fish/guestfish-actions.pod:4636
29668 #: ../fish/guestfish-actions.pod:4638
29671 " zegrepi regex path\n"
29677 #: ../fish/guestfish-actions.pod:4646
29683 #: ../fish/guestfish-actions.pod:4648
29692 #: ../fish/guestfish-actions.pod:4656
29693 msgid "See also: L</zero-device>, L</scrub-device>."
29698 #: ../fish/guestfish-actions.pod:4658
29699 msgid "zero-device"
29704 #: ../fish/guestfish-actions.pod:4660
29707 " zero-device device\n"
29713 #: ../fish/guestfish-actions.pod:4662
29715 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
29716 "which just zeroes the first few blocks of a device."
29721 #: ../fish/guestfish-actions.pod:4669
29727 #: ../fish/guestfish-actions.pod:4671
29730 " zerofree device\n"
29736 #: ../fish/guestfish-actions.pod:4684
29742 #: ../fish/guestfish-actions.pod:4686
29745 " zfgrep pattern path\n"
29751 #: ../fish/guestfish-actions.pod:4694
29757 #: ../fish/guestfish-actions.pod:4696
29760 " zfgrepi pattern path\n"
29766 #: ../fish/guestfish-actions.pod:4704
29772 #: ../fish/guestfish-actions.pod:4706
29775 " zfile meth path\n"
29781 #: ../fish/guestfish-actions.pod:4713
29783 "Since 1.0.63, use L</file> instead which can now process compressed files."
29788 #: ../fish/guestfish-actions.pod:4723
29794 #: ../fish/guestfish-actions.pod:4725
29797 " zgrep regex path\n"
29803 #: ../fish/guestfish-actions.pod:4733
29809 #: ../fish/guestfish-actions.pod:4735
29812 " zgrepi regex path\n"
29818 #: ../fish/guestfish-commands.pod:1
29824 #: ../fish/guestfish-commands.pod:3
29830 #: ../fish/guestfish-commands.pod:5
29833 " alloc filename size\n"
29839 #: ../fish/guestfish-commands.pod:7
29841 "This creates an empty (zeroed) file of the given size, and then adds so it "
29842 "can be further examined."
29847 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
29848 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
29853 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
29854 msgid "Size can be specified using standard suffixes, eg. C<1M>."
29859 #: ../fish/guestfish-commands.pod:14
29861 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
29862 "image, see L</PREPARED DISK IMAGES>."
29867 #: ../fish/guestfish-commands.pod:17
29873 #: ../fish/guestfish-commands.pod:19
29876 " copy-in local [local ...] /remotedir\n"
29882 #: ../fish/guestfish-commands.pod:21
29884 "C<copy-in> copies local files or directories recursively into the disk "
29885 "image, placing them in the directory called C</remotedir> (which must "
29886 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
29887 "other commands as necessary."
29892 #: ../fish/guestfish-commands.pod:26
29894 "Multiple local files and directories can be specified, but the last "
29895 "parameter must always be a remote directory. Wildcards cannot be used."
29900 #: ../fish/guestfish-commands.pod:30
29906 #: ../fish/guestfish-commands.pod:32
29909 " copy-out remote [remote ...] localdir\n"
29915 #: ../fish/guestfish-commands.pod:34
29917 "C<copy-out> copies remote files or directories recursively out of the disk "
29918 "image, placing them on the host disk in a local directory called C<localdir> "
29919 "(which must exist). This guestfish meta-command turns into a sequence of L</"
29920 "download>, L</tar-out> and other commands as necessary."
29925 #: ../fish/guestfish-commands.pod:40
29927 "Multiple remote files and directories can be specified, but the last "
29928 "parameter must always be a local directory. To download to the current "
29929 "directory, use C<.> as in:"
29934 #: ../fish/guestfish-commands.pod:44
29937 " copy-out /home .\n"
29943 #: ../fish/guestfish-commands.pod:46
29945 "Wildcards cannot be used in the ordinary command, but you can use them with "
29946 "the help of L</glob> like this:"
29951 #: ../fish/guestfish-commands.pod:49
29954 " glob copy-out /home/* .\n"
29960 #: ../fish/guestfish-commands.pod:51
29966 #: ../fish/guestfish-commands.pod:53
29969 " echo [params ...]\n"
29975 #: ../fish/guestfish-commands.pod:55
29976 msgid "This echos the parameters to the terminal."
29981 #: ../fish/guestfish-commands.pod:57
29987 #: ../fish/guestfish-commands.pod:59
29993 #: ../fish/guestfish-commands.pod:61
29999 #: ../fish/guestfish-commands.pod:63
30008 #: ../fish/guestfish-commands.pod:65
30010 "This is used to edit a file. It downloads the file, edits it locally using "
30011 "your editor, then uploads the result."
30016 #: ../fish/guestfish-commands.pod:68
30018 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
30019 "or C<emacs> you will get those corresponding editors."
30024 #: ../fish/guestfish-commands.pod:72
30030 #: ../fish/guestfish-commands.pod:74
30033 " glob command args...\n"
30039 #: ../fish/guestfish-commands.pod:76
30041 "Expand wildcards in any paths in the args list, and run C<command> "
30042 "repeatedly on each matching path."
30047 #: ../fish/guestfish-commands.pod:79
30048 msgid "See L</WILDCARDS AND GLOBBING>."
30053 #: ../fish/guestfish-commands.pod:81
30059 #: ../fish/guestfish-commands.pod:83
30062 " hexedit <filename|device>\n"
30063 " hexedit <filename|device> <max>\n"
30064 " hexedit <filename|device> <start> <max>\n"
30070 #: ../fish/guestfish-commands.pod:87
30072 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
30078 #: ../fish/guestfish-commands.pod:90
30080 "This command works by downloading potentially the whole file or device, "
30081 "editing it locally, then uploading it. If the file or device is large, you "
30082 "have to specify which part you wish to edit by using C<max> and/or C<start> "
30083 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
30084 "usual modifiers allowed such as C<1M> (1 megabyte)."
30089 #: ../fish/guestfish-commands.pod:97
30090 msgid "For example to edit the first few sectors of a disk you might do:"
30095 #: ../fish/guestfish-commands.pod:100
30098 " hexedit /dev/sda 1M\n"
30104 #: ../fish/guestfish-commands.pod:102
30106 "which would allow you to edit anywhere within the first megabyte of the disk."
30111 #: ../fish/guestfish-commands.pod:105
30112 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
30117 #: ../fish/guestfish-commands.pod:107
30120 " hexedit /dev/sda1 0x400 0x400\n"
30126 #: ../fish/guestfish-commands.pod:109
30127 msgid "(assuming the superblock is in the standard location)."
30132 #: ../fish/guestfish-commands.pod:111
30134 "This command requires the external L<hexedit(1)> program. You can specify "
30135 "another program to use by setting the C<HEXEDITOR> environment variable."
30140 #: ../fish/guestfish-commands.pod:115
30141 msgid "See also L</hexdump>."
30146 #: ../fish/guestfish-commands.pod:117
30152 #: ../fish/guestfish-commands.pod:119
30161 #: ../fish/guestfish-commands.pod:121
30163 "Change the local directory, ie. the current directory of guestfish itself."
30168 #: ../fish/guestfish-commands.pod:124
30169 msgid "Note that C<!cd> won't do what you might expect."
30174 #: ../fish/guestfish-commands.pod:126
30180 #: ../fish/guestfish-commands.pod:128
30186 #: ../fish/guestfish-commands.pod:130
30195 #: ../fish/guestfish-commands.pod:132
30196 msgid "Opens the manual page for guestfish."
30201 #: ../fish/guestfish-commands.pod:134
30207 #: ../fish/guestfish-commands.pod:136
30213 #: ../fish/guestfish-commands.pod:138
30222 #: ../fish/guestfish-commands.pod:140
30231 #: ../fish/guestfish-commands.pod:142
30232 msgid "This is used to view a file."
30237 #: ../fish/guestfish-commands.pod:144
30239 "The default viewer is C<$PAGER>. However if you use the alternate command "
30240 "C<less> you will get the C<less> command specifically."
30245 #: ../fish/guestfish-commands.pod:147
30251 #: ../fish/guestfish-commands.pod:149
30260 #: ../fish/guestfish-commands.pod:151
30262 "Close and reopen the libguestfs handle. It is not necessary to use this "
30263 "normally, because the handle is closed properly when guestfish exits. "
30264 "However this is occasionally useful for testing."
30269 #: ../fish/guestfish-commands.pod:155
30275 #: ../fish/guestfish-commands.pod:157
30278 " sparse filename size\n"
30284 #: ../fish/guestfish-commands.pod:159
30286 "This creates an empty sparse file of the given size, and then adds so it can "
30287 "be further examined."
30292 #: ../fish/guestfish-commands.pod:162
30294 "In all respects it works the same as the L</alloc> command, except that the "
30295 "image file is allocated sparsely, which means that disk blocks are not "
30296 "assigned to the file until they are needed. Sparse disk files only use "
30297 "space when written to, but they are slower and there is a danger you could "
30298 "run out of real disk space during a write operation."
30303 #: ../fish/guestfish-commands.pod:172
30309 #: ../fish/guestfish-commands.pod:174
30318 #: ../fish/guestfish-commands.pod:176
30320 "This command returns a list of the optional groups known to the daemon, and "
30321 "indicates which ones are supported by this build of the libguestfs appliance."
30326 #: ../fish/guestfish-commands.pod:180
30327 msgid "See also L<guestfs(3)/AVAILABILITY>."
30332 #: ../fish/guestfish-commands.pod:182
30338 #: ../fish/guestfish-commands.pod:184
30341 " time command args...\n"
30347 #: ../fish/guestfish-commands.pod:186
30349 "Run the command as usual, but print the elapsed time afterwards. This can "
30350 "be useful for benchmarking operations."
30355 #: ../test-tool/libguestfs-test-tool.pod:5
30356 msgid "libguestfs-test-tool - End user tests for libguestfs"
30361 #: ../test-tool/libguestfs-test-tool.pod:9
30364 " libguestfs-test-tool [--options]\n"
30370 #: ../test-tool/libguestfs-test-tool.pod:13
30372 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
30373 "and developers, to allow them to check basic libguestfs functionality is "
30374 "working. This is needed because libguestfs occasionally breaks for reasons "
30375 "beyond our control: usually because of changes in the underlying qemu or "
30376 "kernel packages, or the host environment."
30381 #: ../test-tool/libguestfs-test-tool.pod:20
30382 msgid "If you suspect a problem in libguestfs, then just run:"
30387 #: ../test-tool/libguestfs-test-tool.pod:22
30390 " libguestfs-test-tool\n"
30396 #: ../test-tool/libguestfs-test-tool.pod:24
30397 msgid "It will print lots of diagnostic messages."
30402 #: ../test-tool/libguestfs-test-tool.pod:26
30403 msgid "If it runs to completion successfully, you will see this near the end:"
30408 #: ../test-tool/libguestfs-test-tool.pod:28
30411 " ===== TEST FINISHED OK =====\n"
30417 #: ../test-tool/libguestfs-test-tool.pod:30
30418 msgid "and the test tool will exit with code 0."
30423 #: ../test-tool/libguestfs-test-tool.pod:32
30425 "If it fails (and/or exits with non-zero error code), please paste the "
30426 "B<complete, unedited> output of the test tool into a bug report. More "
30427 "information about reporting bugs can be found on the L<http://libguestfs.org/"
30433 #: ../test-tool/libguestfs-test-tool.pod:41
30439 #: ../test-tool/libguestfs-test-tool.pod:43
30440 msgid "Display short usage information and exit."
30445 #: ../test-tool/libguestfs-test-tool.pod:45
30446 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
30451 #: ../test-tool/libguestfs-test-tool.pod:47
30453 "Pass an alternate name for the helper program. libguestfs-test-tool will "
30454 "normally look in the C<$libexec> directory that was configured when the tool "
30460 #: ../test-tool/libguestfs-test-tool.pod:51
30461 msgid "I<--qemu qemu_binary>"
30466 #: ../test-tool/libguestfs-test-tool.pod:53
30468 "If you have downloaded another qemu binary, point this option at the full "
30469 "path of the binary to try it."
30474 #: ../test-tool/libguestfs-test-tool.pod:56
30475 msgid "I<--qemudir qemu_source_dir>"
30480 #: ../test-tool/libguestfs-test-tool.pod:58
30482 "If you have compiled qemu from source, point this option at the source "
30483 "directory to try it."
30488 #: ../test-tool/libguestfs-test-tool.pod:61
30489 msgid "I<--timeout N>"
30494 #: ../test-tool/libguestfs-test-tool.pod:63
30496 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
30497 "does not usually need to be adjusted unless your machine is very slow."
30502 #: ../test-tool/libguestfs-test-tool.pod:69
30503 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
30508 #: ../test-tool/libguestfs-test-tool.pod:71
30510 "If you have compiled another version of qemu from source and would like to "
30511 "try that, then you can use the I<--qemudir> option to point to the qemu "
30512 "source directory."
30517 #: ../test-tool/libguestfs-test-tool.pod:75
30519 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
30520 "option to point to the binary."
30525 #: ../test-tool/libguestfs-test-tool.pod:78
30527 "When using an alternate qemu with libguestfs, usually you would need to "
30528 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in L<guestfs(3)"
30529 ">). libguestfs-test-tool writes a temporary qemu wrapper script when you "
30530 "use either of the I<--qemudir> or I<--qemu> options."
30535 #: ../test-tool/libguestfs-test-tool.pod:85
30537 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
30538 "I<1> if there was an error."
30543 #: ../test-tool/libguestfs-test-tool.pod:92
30544 msgid "/usr/libexec/libguestfs-test-tool-helper"
30549 #: ../test-tool/libguestfs-test-tool.pod:94
30551 "This helper program is run inside the appliance and provides additional "
30557 #: ../test-tool/libguestfs-test-tool.pod:97
30558 msgid "/usr/bin/mkisofs"
30563 #: ../test-tool/libguestfs-test-tool.pod:99
30565 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
30566 "which is used as part of the tests."
30571 #: ../test-tool/libguestfs-test-tool.pod:106
30573 "For the full list of environment variables which may affect libguestfs, "
30574 "please see the L<guestfs(3)> manual page."
30579 #: ../test-tool/libguestfs-test-tool.pod:111
30580 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
30585 #: ../test-tool/libguestfs-test-tool.pod:121
30586 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
30591 #: ../fuse/guestmount.pod:5
30593 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
30598 #: ../fuse/guestmount.pod:9
30601 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
30607 #: ../fuse/guestmount.pod:11
30610 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
30616 #: ../fuse/guestmount.pod:13
30619 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
30625 #: ../fuse/guestmount.pod:17
30627 "You must I<not> use C<guestmount> in read-write mode on live virtual "
30628 "machines. If you do this, you risk disk corruption in the VM."
30633 #: ../fuse/guestmount.pod:22
30635 "The guestmount program can be used to mount virtual machine filesystems and "
30636 "other disk images on the host. It uses libguestfs for access to the guest "
30637 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
30638 "a mountable device."
30643 #: ../fuse/guestmount.pod:27
30645 "Along with other options, you have to give at least one device (I<-a> "
30646 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
30647 "option) or use the I<-i> inspection option. How this works is better "
30648 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
30654 #: ../fuse/guestmount.pod:33
30656 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
30657 "by you, and the filesystem will not be visible to any other users unless you "
30658 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
30659 "the filesystem, use the C<fusermount -u> command."
30664 #: ../fuse/guestmount.pod:41
30666 "For a typical Windows guest which has its main filesystem on the first "
30672 #: ../fuse/guestmount.pod:44
30675 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
30681 #: ../fuse/guestmount.pod:46
30683 "For a typical Linux guest which has a /boot filesystem on the first "
30684 "partition, and the root filesystem on a logical volume:"
30689 #: ../fuse/guestmount.pod:49
30692 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
30698 #: ../fuse/guestmount.pod:51
30699 msgid "To get libguestfs to detect guest mountpoints for you:"
30704 #: ../fuse/guestmount.pod:53
30707 " guestmount -a guest.img -i --ro /mnt\n"
30713 #: ../fuse/guestmount.pod:55
30714 msgid "For a libvirt guest called \"Guest\" you could do:"
30719 #: ../fuse/guestmount.pod:57
30722 " guestmount -d Guest -i --ro /mnt\n"
30728 #: ../fuse/guestmount.pod:59
30730 "If you don't know what filesystems are contained in a guest or disk image, "
30731 "use L<virt-filesystems(1)> first:"
30736 #: ../fuse/guestmount.pod:62
30739 " virt-filesystems MyGuest\n"
30745 #: ../fuse/guestmount.pod:64
30747 "If you want to trace the libguestfs calls but without excessive debugging "
30748 "information, we recommend:"
30753 #: ../fuse/guestmount.pod:67
30756 " guestmount [...] --trace /mnt\n"
30762 #: ../fuse/guestmount.pod:69
30763 msgid "If you want to debug the program, we recommend:"
30768 #: ../fuse/guestmount.pod:71
30771 " guestmount [...] --trace --verbose /mnt\n"
30777 #: ../fuse/guestmount.pod:77
30778 msgid "B<-a image> | B<--add image>"
30783 #: ../fuse/guestmount.pod:79
30784 msgid "Add a block device or virtual machine image."
30789 #: ../fuse/guestmount.pod:84
30790 msgid "B<-c URI> | B<--connect URI>"
30795 #: ../fuse/guestmount.pod:90
30796 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
30801 #: ../fuse/guestmount.pod:96
30802 msgid "B<--dir-cache-timeout N>"
30807 #: ../fuse/guestmount.pod:98
30809 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
30810 "seconds. The readdir cache [actually, there are several semi-independent "
30811 "caches] is populated after a readdir(2) call with the stat and extended "
30812 "attributes of the files in the directory, in anticipation that they will be "
30813 "requested soon after."
30818 #: ../fuse/guestmount.pod:104
30820 "There is also a different attribute cache implemented by FUSE (see the FUSE "
30821 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
30822 "requests, only cache existing ones."
30827 #: ../fuse/guestmount.pod:115
30828 msgid "B<--format=raw|qcow2|..> | B<--format>"
30833 #: ../fuse/guestmount.pod:122
30835 "If you have untrusted raw-format guest disk images, you should use this "
30836 "option to specify the disk format. This avoids a possible security problem "
30837 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
30838 "guestfs_add_drive_opts>."
30843 #: ../fuse/guestmount.pod:127
30844 msgid "B<--fuse-help>"
30849 #: ../fuse/guestmount.pod:129
30850 msgid "Display help on special FUSE options (see I<-o> below)."
30855 #: ../fuse/guestmount.pod:133
30856 msgid "Display brief help and exit."
30861 #: ../fuse/guestmount.pod:135
30862 msgid "B<-i> | B<--inspector>"
30867 #: ../fuse/guestmount.pod:146
30868 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
30873 #: ../fuse/guestmount.pod:148
30875 "Mount the named partition or logical volume on the given mountpoint B<in the "
30876 "guest> (this has nothing to do with mountpoints in the host)."
30881 #: ../fuse/guestmount.pod:151
30883 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
30884 "something on C</>."
30889 #: ../fuse/guestmount.pod:154
30890 msgid "B<-n> | B<--no-sync>"
30895 #: ../fuse/guestmount.pod:156
30897 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
30898 "unmounted. If you specify this option, then we don't attempt to sync the "
30899 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
30904 #: ../fuse/guestmount.pod:161
30905 msgid "B<-o option> | B<--option option>"
30910 #: ../fuse/guestmount.pod:163
30911 msgid "Pass extra options to FUSE."
30916 #: ../fuse/guestmount.pod:165
30918 "To get a list of all the extra options supported by FUSE, use the command "
30919 "below. Note that only the FUSE I<-o> options can be passed, and only some "
30920 "of them are a good idea."
30925 #: ../fuse/guestmount.pod:169
30928 " guestmount --fuse-help\n"
30934 #: ../fuse/guestmount.pod:171
30935 msgid "Some potentially useful FUSE options:"
30940 #: ../fuse/guestmount.pod:175
30941 msgid "B<-o allow_other>"
30946 #: ../fuse/guestmount.pod:177
30947 msgid "Allow other users to see the filesystem."
30952 #: ../fuse/guestmount.pod:179
30953 msgid "B<-o attr_timeout=N>"
30958 #: ../fuse/guestmount.pod:181
30959 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
30964 #: ../fuse/guestmount.pod:183
30965 msgid "B<-o kernel_cache>"
30970 #: ../fuse/guestmount.pod:185
30972 "Allow the kernel to cache files (reduces the number of reads that have to go "
30973 "through the L<guestfs(3)> API). This is generally a good idea if you can "
30974 "afford the extra memory usage."
30979 #: ../fuse/guestmount.pod:189
30980 msgid "B<-o uid=N> B<-o gid=N>"
30985 #: ../fuse/guestmount.pod:191
30987 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
30988 "the chosen values."
30993 #: ../fuse/guestmount.pod:196
30994 msgid "B<-r> | B<--ro>"
30999 #: ../fuse/guestmount.pod:198
31001 "Add devices and mount everything read-only. Also disallow writes and make "
31002 "the disk appear read-only to FUSE."
31007 #: ../fuse/guestmount.pod:201
31009 "This is highly recommended if you are not going to edit the guest disk. If "
31010 "the guest is running and this option is I<not> supplied, then there is a "
31011 "strong risk of disk corruption in the guest. We try to prevent this from "
31012 "happening, but it is not always possible."
31017 #: ../fuse/guestmount.pod:206
31018 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
31023 #: ../fuse/guestmount.pod:210
31024 msgid "Enable SELinux support for the guest."
31029 #: ../fuse/guestmount.pod:212
31030 msgid "B<-v> | B<--verbose>"
31035 #: ../fuse/guestmount.pod:214
31036 msgid "Enable verbose messages from underlying libguestfs."
31041 #: ../fuse/guestmount.pod:216
31042 msgid "B<-V> | B<--version>"
31047 #: ../fuse/guestmount.pod:218
31048 msgid "Display the program version and exit."
31053 #: ../fuse/guestmount.pod:220
31054 msgid "B<-w> | B<--rw>"
31059 #: ../fuse/guestmount.pod:222
31061 "This option does nothing at the moment. See L<guestfish(1)/OPENING DISKS "
31062 "FOR READ AND WRITE>."
31067 #: ../fuse/guestmount.pod:225
31068 msgid "B<-x> | B<--trace>"
31073 #: ../fuse/guestmount.pod:227
31074 msgid "Trace libguestfs calls and entry into each FUSE function."
31079 #: ../fuse/guestmount.pod:229
31080 msgid "This also stops the daemon from forking into the background."
31085 #: ../fuse/guestmount.pod:235
31087 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
31088 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
31094 #: ../tools/virt-edit.pl:34
31095 msgid "virt-edit - Edit a file in a virtual machine"
31100 #: ../tools/virt-edit.pl:38
31103 " virt-edit [--options] domname file\n"
31109 #: ../tools/virt-edit.pl:40
31112 " virt-edit [--options] disk.img [disk.img ...] file\n"
31118 #: ../tools/virt-edit.pl:42
31121 " virt-edit [domname|disk.img] file -e 'expr'\n"
31127 #: ../tools/virt-edit.pl:46
31129 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
31130 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
31131 "doing this, but doesn't catch all cases."
31136 #: ../tools/virt-edit.pl:52
31138 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
31139 "the named virtual machine (or disk image)."
31144 #: ../tools/virt-edit.pl:55
31146 "If you want to just view a file, use L<virt-cat(1)>. For more complex cases "
31147 "you should look at the L<guestfish(1)> tool."
31152 #: ../tools/virt-edit.pl:60
31153 msgid "Edit the named files interactively:"
31158 #: ../tools/virt-edit.pl:62
31161 " virt-edit mydomain /boot/grub/grub.conf\n"
31167 #: ../tools/virt-edit.pl:64
31170 " virt-edit mydomain /etc/passwd\n"
31176 #: ../tools/virt-edit.pl:66
31178 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
31179 "below). To change the init default level to 5:"
31184 #: ../tools/virt-edit.pl:70
31187 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
31193 #: ../tools/virt-edit.pl:82 ../tools/virt-win-reg.pl:106
31194 #: ../tools/virt-list-filesystems.pl:63 ../tools/virt-tar.pl:113
31195 #: ../tools/virt-make-fs.pl:163 ../tools/virt-list-partitions.pl:64
31196 msgid "Display brief help."
31201 #: ../tools/virt-edit.pl:90 ../tools/virt-win-reg.pl:114
31202 #: ../tools/virt-resize.pl:272 ../tools/virt-list-filesystems.pl:71
31203 #: ../tools/virt-tar.pl:121 ../tools/virt-make-fs.pl:171
31204 #: ../tools/virt-list-partitions.pl:72
31205 msgid "Display version number and exit."
31210 #: ../tools/virt-edit.pl:96
31211 msgid "B<--backup extension> | B<-b extension>"
31216 #: ../tools/virt-edit.pl:98
31218 "Create a backup of the original file I<in the guest disk image>. The backup "
31219 "has the original filename with C<extension> added."
31224 #: ../tools/virt-edit.pl:101
31226 "Usually the first character of C<extension> would be a dot C<.> so you would "
31232 #: ../tools/virt-edit.pl:104
31235 " virt-edit -b .orig [etc]\n"
31241 #: ../tools/virt-edit.pl:106
31242 msgid "By default, no backup file is made."
31247 #: ../tools/virt-edit.pl:112 ../tools/virt-win-reg.pl:128
31248 #: ../tools/virt-list-filesystems.pl:77 ../tools/virt-tar.pl:127
31249 #: ../tools/virt-list-partitions.pl:78
31250 msgid "B<--connect URI> | B<-c URI>"
31255 #: ../tools/virt-edit.pl:114 ../tools/virt-win-reg.pl:130
31256 #: ../tools/virt-list-filesystems.pl:79 ../tools/virt-tar.pl:129
31257 #: ../tools/virt-list-partitions.pl:80
31259 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
31260 "to the default libvirt hypervisor."
31265 #: ../tools/virt-edit.pl:117 ../tools/virt-win-reg.pl:133
31266 #: ../tools/virt-list-filesystems.pl:82 ../tools/virt-tar.pl:132
31267 #: ../tools/virt-list-partitions.pl:83
31269 "If you specify guest block devices directly, then libvirt is not used at all."
31274 #: ../tools/virt-edit.pl:124 ../tools/virt-win-reg.pl:140
31275 #: ../tools/virt-resize.pl:520 ../tools/virt-list-filesystems.pl:89
31276 #: ../tools/virt-tar.pl:139 ../tools/virt-list-partitions.pl:90
31277 msgid "B<--format> raw"
31282 #: ../tools/virt-edit.pl:126 ../tools/virt-win-reg.pl:142
31283 #: ../tools/virt-list-filesystems.pl:91 ../tools/virt-tar.pl:141
31284 #: ../tools/virt-list-partitions.pl:92
31286 "Specify the format of disk images given on the command line. If this is "
31287 "omitted then the format is autodetected from the content of the disk image."
31292 #: ../tools/virt-edit.pl:130 ../tools/virt-win-reg.pl:146
31293 #: ../tools/virt-list-filesystems.pl:95 ../tools/virt-tar.pl:145
31294 #: ../tools/virt-list-partitions.pl:96
31296 "If disk images are requested from libvirt, then this program asks libvirt "
31297 "for this information. In this case, the value of the format parameter is "
31303 #: ../tools/virt-edit.pl:134 ../tools/virt-win-reg.pl:150
31304 #: ../tools/virt-resize.pl:525 ../tools/virt-resize.pl:540
31305 #: ../tools/virt-list-filesystems.pl:99 ../tools/virt-tar.pl:149
31306 #: ../tools/virt-list-partitions.pl:100
31308 "If working with untrusted raw-format guest disk images, you should ensure "
31309 "the format is always specified."
31314 #: ../tools/virt-edit.pl:141
31315 msgid "B<--expr EXPR> | B<-e EXPR>"
31320 #: ../tools/virt-edit.pl:143
31322 "Instead of launching the external editor, non-interactively apply the Perl "
31323 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
31329 #: ../tools/virt-edit.pl:147
31331 "Be careful to properly quote the expression to prevent it from being altered "
31337 #: ../tools/virt-edit.pl:268
31338 msgid "NON-INTERACTIVE EDITING"
31343 #: ../tools/virt-edit.pl:270
31345 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
31346 "administrator can interactively edit the file."
31351 #: ../tools/virt-edit.pl:273
31353 "There are two ways also to use C<virt-edit> from scripts in order to make "
31354 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
31355 "like this, it's less error-prone to write scripts directly using the "
31356 "libguestfs API and Augeas for configuration file editing.)"
31361 #: ../tools/virt-edit.pl:279
31363 "The first method is to temporarily set C<$EDITOR> to any script or program "
31364 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
31365 "update C<tmpfile> in place however it likes."
31370 #: ../tools/virt-edit.pl:283
31372 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
31373 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
31374 "instances of C<foo> with C<bar> in a file:"
31379 #: ../tools/virt-edit.pl:287
31382 " virt-edit domname filename -e 's/foo/bar/'\n"
31388 #: ../tools/virt-edit.pl:289
31390 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
31391 "For example to delete root's password you could do:"
31396 #: ../tools/virt-edit.pl:292
31399 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
31405 #: ../tools/virt-edit.pl:294
31407 "What really happens is that the snippet is evaluated as a Perl expression "
31408 "for each line of the file. The line, including the final C<\\n>, is passed "
31409 "in C<$_> and the expression should update C<$_> or leave it unchanged."
31414 #: ../tools/virt-edit.pl:299
31416 "To delete a line, set C<$_> to the empty string. For example, to delete the "
31417 "C<apache> user account from the password file you can do:"
31422 #: ../tools/virt-edit.pl:302
31425 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
31431 #: ../tools/virt-edit.pl:304
31433 "To insert a line, prepend or append it to C<$_>. However appending lines to "
31434 "the end of the file is rather difficult this way since there is no concept "
31435 "of \"last line of the file\" - your expression just doesn't get called "
31436 "again. You might want to use the first method (setting C<$EDITOR>) if you "
31442 #: ../tools/virt-edit.pl:310
31444 "The variable C<$lineno> contains the current line number. As is "
31445 "traditional, the first line in the file is number C<1>."
31450 #: ../tools/virt-edit.pl:313
31452 "The return value from the expression is ignored, but the expression may call "
31453 "C<die> in order to abort the whole program, leaving the original file "
31459 #: ../tools/virt-edit.pl:317
31461 "Remember when matching the end of a line that C<$_> may contain the final C<"
31462 "\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
31463 "newline then neither of these. Thus to match or substitute some text at the "
31464 "end of a line, use this regular expression:"
31469 #: ../tools/virt-edit.pl:322
31472 " /some text(\\r?\\n)?$/\n"
31478 #: ../tools/virt-edit.pl:324
31480 "Alternately, use the perl C<chomp> function, being careful not to chomp C<"
31481 "$_> itself (since that would remove all newlines from the file):"
31486 #: ../tools/virt-edit.pl:328
31489 " my $m = $_; chomp $m; $m =~ /some text$/\n"
31495 #: ../tools/virt-edit.pl:334
31501 #: ../tools/virt-edit.pl:336
31503 "If set, this string is used as the editor. It may contain arguments, eg. C<"
31509 #: ../tools/virt-edit.pl:339
31510 msgid "If not set, C<vi> is used."
31515 #: ../tools/virt-edit.pl:343 ../tools/virt-win-reg.pl:559
31516 #: ../tools/virt-resize.pl:1476 ../tools/virt-list-filesystems.pl:182
31517 #: ../tools/virt-tar.pl:279 ../tools/virt-make-fs.pl:527
31518 #: ../tools/virt-list-partitions.pl:250
31519 msgid "SHELL QUOTING"
31524 #: ../tools/virt-edit.pl:345 ../tools/virt-win-reg.pl:567
31525 #: ../tools/virt-resize.pl:1478 ../tools/virt-list-filesystems.pl:184
31526 #: ../tools/virt-tar.pl:281 ../tools/virt-make-fs.pl:529
31527 #: ../tools/virt-list-partitions.pl:252
31529 "Libvirt guest names can contain arbitrary characters, some of which have "
31530 "meaning to the shell such as C<#> and space. You may need to quote or "
31531 "escape these characters on the command line. See the shell manual page L<sh"
31532 "(1)> for details."
31536 #: ../tools/virt-edit.pl:352
31538 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, L<virt-"
31539 "tar-in(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
31540 "L<http://libguestfs.org/>, L<perl(1)>, L<perlre(1)>."
31545 #: ../tools/virt-edit.pl:364 ../tools/virt-win-reg.pl:598
31546 #: ../tools/virt-resize.pl:1504 ../tools/virt-list-filesystems.pl:202
31547 #: ../tools/virt-tar.pl:301 ../tools/virt-make-fs.pl:559
31548 #: ../tools/virt-list-partitions.pl:269
31554 #: ../tools/virt-edit.pl:366 ../tools/virt-win-reg.pl:600
31555 #: ../tools/virt-resize.pl:1506 ../tools/virt-list-filesystems.pl:204
31556 #: ../tools/virt-tar.pl:303 ../tools/virt-make-fs.pl:561
31557 #: ../tools/virt-list-partitions.pl:271
31558 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
31563 #: ../tools/virt-edit.pl:370 ../tools/virt-list-partitions.pl:275
31564 msgid "Copyright (C) 2009-2010 Red Hat Inc."
31569 #: ../tools/virt-win-reg.pl:37
31571 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
31576 #: ../tools/virt-win-reg.pl:41
31579 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
31585 #: ../tools/virt-win-reg.pl:43
31588 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
31594 #: ../tools/virt-win-reg.pl:45
31597 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
31603 #: ../tools/virt-win-reg.pl:47
31606 " virt-win-reg --merge domname [input.reg ...]\n"
31612 #: ../tools/virt-win-reg.pl:49
31615 " virt-win-reg [--options] disk.img ... # instead of domname\n"
31621 #: ../tools/virt-win-reg.pl:53
31623 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
31624 "virtual machines. If you do this, you I<will> get irreversible disk "
31625 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
31626 "but doesn't catch all cases."
31631 #: ../tools/virt-win-reg.pl:58
31633 "Modifying the Windows Registry is an inherently risky operation. The format "
31634 "is deliberately obscure and undocumented, and Registry changes can leave the "
31635 "system unbootable. Therefore when using the C<--merge> option, make sure "
31636 "you have a reliable backup first."
31641 #: ../tools/virt-win-reg.pl:65
31643 "This program can export and merge Windows Registry entries from a Windows "
31649 #: ../tools/virt-win-reg.pl:68
31651 "The first parameter is the libvirt guest name or the raw disk image of a "
31657 #: ../tools/virt-win-reg.pl:71
31659 "If C<--merge> is I<not> specified, then the chosen registry key is displayed/"
31660 "exported (recursively). For example:"
31665 #: ../tools/virt-win-reg.pl:74
31668 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
31674 #: ../tools/virt-win-reg.pl:76
31676 "You can also display single values from within registry keys, for example:"
31681 #: ../tools/virt-win-reg.pl:79
31684 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
31685 " $ virt-win-reg Windows7 $cvkey ProductName\n"
31686 " Windows 7 Enterprise\n"
31692 #: ../tools/virt-win-reg.pl:83
31694 "With C<--merge>, you can merge a textual regedit file into the Windows "
31700 #: ../tools/virt-win-reg.pl:86
31703 " $ virt-win-reg --merge Windows7 changes.reg\n"
31709 #: ../tools/virt-win-reg.pl:88 ../tools/virt-tar.pl:45
31715 #: ../tools/virt-win-reg.pl:90
31717 "This program is only meant for simple access to the registry. If you want "
31718 "to do complicated things with the registry, we suggest you download the "
31719 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
31720 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
31721 "L<hivexregedit(1)>."
31726 #: ../tools/virt-win-reg.pl:120 ../tools/virt-make-fs.pl:177
31732 #: ../tools/virt-win-reg.pl:122 ../tools/virt-resize.pl:498
31733 msgid "Enable debugging messages."
31738 #: ../tools/virt-win-reg.pl:157
31744 #: ../tools/virt-win-reg.pl:159
31746 "In merge mode, this merges a textual regedit file into the Windows Registry "
31747 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
31748 "displays or exports Registry entries instead."
31753 #: ../tools/virt-win-reg.pl:163
31755 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
31756 "result in disk corruption. However exporting (without this flag) is always "
31762 #: ../tools/virt-win-reg.pl:171
31763 msgid "B<--encoding> UTF-16LE|ASCII"
31768 #: ../tools/virt-win-reg.pl:173
31770 "When merging (only), you may need to specify the encoding for strings to be "
31771 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
31772 "(3)/ENCODING STRINGS>."
31777 #: ../tools/virt-win-reg.pl:177
31779 "The default is to use UTF-16LE, which should work with recent versions of "
31785 #: ../tools/virt-win-reg.pl:402
31786 msgid "SUPPORTED SYSTEMS"
31791 #: ../tools/virt-win-reg.pl:404
31793 "The program currently supports Windows NT-derived guests starting with "
31794 "Windows XP through to at least Windows 7."
31799 #: ../tools/virt-win-reg.pl:407
31801 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, C<HKEY_LOCAL_MACHINE"
31802 "\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, C<HKEY_LOCAL_MACHINE\\SYSTEM> "
31803 "and C<HKEY_USERS\\.DEFAULT>."
31808 #: ../tools/virt-win-reg.pl:411
31810 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
31816 #: ../tools/virt-win-reg.pl:414
31818 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
31824 #: ../tools/virt-win-reg.pl:417
31830 #: ../tools/virt-win-reg.pl:419
31832 "C<virt-win-reg> expects that regedit files have already been reencoded in "
31833 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
31834 "style line endings. Since Windows regedit files are often in UTF-16LE with "
31835 "Windows-style line endings, you may need to reencode the whole file before "
31836 "or after processing."
31841 #: ../tools/virt-win-reg.pl:425
31843 "To reencode a file from Windows format to Linux (before processing it with "
31844 "the C<--merge> option), you would do something like this:"
31849 #: ../tools/virt-win-reg.pl:428
31852 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
31858 #: ../tools/virt-win-reg.pl:430
31860 "To go in the opposite direction, after exporting and before sending the file "
31861 "to a Windows user, do something like this:"
31866 #: ../tools/virt-win-reg.pl:433
31869 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
31875 #: ../tools/virt-win-reg.pl:435
31876 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
31881 #: ../tools/virt-win-reg.pl:437
31883 "If you are unsure about the current encoding, use the L<file(1)> command. "
31884 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
31885 "style (CRLF) line endings, like this:"
31890 #: ../tools/virt-win-reg.pl:441
31893 " $ file software.reg\n"
31894 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
31895 " with CRLF line terminators\n"
31901 #: ../tools/virt-win-reg.pl:445
31902 msgid "This file would need conversion before you could C<--merge> it."
31907 #: ../tools/virt-win-reg.pl:447
31908 msgid "CurrentControlSet etc."
31913 #: ../tools/virt-win-reg.pl:449
31915 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
31916 "Registry at the level of the hive file, and therefore you cannot modify "
31922 #: ../tools/virt-win-reg.pl:453
31924 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
31925 "circumstances it might refer to another control set. The way to find out is "
31926 "to look at the C<HKLM\\SYSTEM\\Select> key:"
31931 #: ../tools/virt-win-reg.pl:457
31934 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
31935 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
31936 " \"Current\"=dword:00000001\n"
31937 " \"Default\"=dword:00000001\n"
31938 " \"Failed\"=dword:00000000\n"
31939 " \"LastKnownGood\"=dword:00000002\n"
31945 #: ../tools/virt-win-reg.pl:464
31946 msgid "\"Current\" is the one which Windows will choose when it boots."
31951 #: ../tools/virt-win-reg.pl:466
31953 "Similarly, other C<Current...> keys in the path may need to be replaced."
31958 #: ../tools/virt-win-reg.pl:469
31959 msgid "WINDOWS TIPS"
31964 #: ../tools/virt-win-reg.pl:471
31966 "Note that some of these tips modify the guest disk image. The guest I<must> "
31967 "be shut off, else you will get disk corruption."
31972 #: ../tools/virt-win-reg.pl:474
31973 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
31978 #: ../tools/virt-win-reg.pl:476
31980 "Prepare a DOS batch script, VBScript or executable. Upload this using "
31981 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
31982 "is uploaded into C<C:\\>:"
31987 #: ../tools/virt-win-reg.pl:480
31990 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
31996 #: ../tools/virt-win-reg.pl:482
31997 msgid "Prepare a regedit file containing the registry change:"
32002 #: ../tools/virt-win-reg.pl:484
32005 " cat > test.reg <<'EOF'\n"
32006 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
32007 " \"Test\"=\"c:\\\\test.bat\"\n"
32014 #: ../tools/virt-win-reg.pl:489
32016 "In this example we use the key C<RunOnce> which means that the script will "
32017 "run precisely once when the first user logs in. If you want it to run every "
32018 "time a user logs in, replace C<RunOnce> with C<Run>."
32023 #: ../tools/virt-win-reg.pl:493
32024 msgid "Now update the registry:"
32029 #: ../tools/virt-win-reg.pl:495
32032 " virt-win-reg --merge WindowsGuest test.reg\n"
32038 #: ../tools/virt-win-reg.pl:497
32039 msgid "INSTALLING A SERVICE"
32044 #: ../tools/virt-win-reg.pl:499
32046 "This section assumes you are familiar with Windows services, and you either "
32047 "have a program which handles the Windows Service Control Protocol directly "
32048 "or you want to run any program using a service wrapper like SrvAny or the "
32054 #: ../tools/virt-win-reg.pl:504
32056 "First upload the program and optionally the service wrapper. In this case "
32057 "the test program is called C<test.exe> and we are using the RHSrvAny wrapper:"
32062 #: ../tools/virt-win-reg.pl:508
32065 " guestfish -i -d WindowsGuest <<EOF\n"
32066 " upload rhsrvany.exe /rhsrvany.exe\n"
32067 " upload test.exe /test.exe\n"
32074 #: ../tools/virt-win-reg.pl:513
32076 "Prepare a regedit file containing the registry changes. In this example, "
32077 "the first registry change is needed for the service itself or the service "
32078 "wrapper (if used). The second registry change is only needed because I am "
32079 "using the RHSrvAny service wrapper."
32084 #: ../tools/virt-win-reg.pl:518
32087 " cat > service.reg <<'EOF'\n"
32088 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
32089 " \"Type\"=dword:00000010\n"
32090 " \"Start\"=dword:00000002\n"
32091 " \"ErrorControl\"=dword:00000001\n"
32092 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
32093 " \"DisplayName\"=\"RHSrvAny\"\n"
32094 " \"ObjectName\"=\"NetworkService\"\n"
32100 #: ../tools/virt-win-reg.pl:527
32103 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
32104 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
32105 " \"PWD\"=\"c:\\\\Temp\"\n"
32112 #: ../tools/virt-win-reg.pl:538
32114 "For use of C<ControlSet001> see the section above in this manual page. You "
32115 "may need to adjust this according to the control set that is in use by the "
32121 #: ../tools/virt-win-reg.pl:544
32123 "C<\"ObjectName\"> controls the privileges that the service will have. An "
32124 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
32125 "privileged account."
32130 #: ../tools/virt-win-reg.pl:550
32132 "For the meaning of the magic numbers, see this Microsoft KB article: "
32133 "L<http://support.microsoft.com/kb/103000>."
32138 #: ../tools/virt-win-reg.pl:555
32139 msgid "Update the registry:"
32144 #: ../tools/virt-win-reg.pl:557
32147 " virt-win-reg --merge WindowsGuest service.reg\n"
32153 #: ../tools/virt-win-reg.pl:561
32155 "Be careful when passing parameters containing C<\\> (backslash) in the "
32156 "shell. Usually you will have to use 'single quotes' or double backslashes "
32157 "(but not both) to protect them from the shell."
32162 #: ../tools/virt-win-reg.pl:565
32163 msgid "Paths and value names are case-insensitive."
32168 #: ../tools/virt-win-reg.pl:574
32170 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
32171 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
32172 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
32177 #: ../tools/virt-win-reg.pl:589 ../tools/virt-make-fs.pl:550
32179 "When reporting bugs, please enable debugging and capture the I<complete> "
32185 #: ../tools/virt-win-reg.pl:592
32188 " export LIBGUESTFS_DEBUG=1\n"
32189 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
32195 #: ../tools/virt-win-reg.pl:595
32197 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."
32203 #: ../tools/virt-win-reg.pl:604 ../tools/virt-resize.pl:1510
32204 #: ../tools/virt-make-fs.pl:565
32205 msgid "Copyright (C) 2010 Red Hat Inc."
32210 #: ../tools/virt-resize.pl:42
32211 msgid "virt-resize - Resize a virtual machine disk"
32216 #: ../tools/virt-resize.pl:46
32219 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
32220 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
32221 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
32227 #: ../tools/virt-resize.pl:52
32229 "Virt-resize is a tool which can resize a virtual machine disk, making it "
32230 "larger or smaller overall, and resizing or deleting any partitions contained "
32236 #: ../tools/virt-resize.pl:56
32238 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
32239 "not> be used on live virtual machines - for consistent results, shut the "
32240 "virtual machine down before resizing it."
32245 #: ../tools/virt-resize.pl:60
32247 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
32248 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
32253 #: ../tools/virt-resize.pl:66
32255 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
32256 "fill the extra 5GB of space."
32260 #: ../tools/virt-resize.pl:69
32263 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
32264 " virt-filesystems --long -h --all -a olddisk\n"
32265 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
32266 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
32272 #: ../tools/virt-resize.pl:74
32274 "As above, but make the /boot partition 200MB bigger, while giving the "
32275 "remaining space to /dev/sda2:"
32280 #: ../tools/virt-resize.pl:77
32283 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
32289 #: ../tools/virt-resize.pl:79
32290 msgid "As above, but the output format will be uncompressed qcow2:"
32295 #: ../tools/virt-resize.pl:81
32298 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
32299 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
32305 #: ../tools/virt-resize.pl:84
32306 msgid "DETAILED USAGE"
32311 #: ../tools/virt-resize.pl:86
32312 msgid "EXPANDING A VIRTUAL MACHINE DISK"
32317 #: ../tools/virt-resize.pl:90
32318 msgid "1. Shut down the virtual machine"
32323 #: ../tools/virt-resize.pl:92
32324 msgid "2. Locate input disk image"
32329 #: ../tools/virt-resize.pl:94
32331 "Locate the input disk image (ie. the file or device on the host containing "
32332 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
32333 "dumpxml> like this to find the disk image name:"
32338 #: ../tools/virt-resize.pl:98
32341 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
32342 " Found 1 nodes:\n"
32344 " <source dev=\"/dev/vg/lv_guest\" />\n"
32350 #: ../tools/virt-resize.pl:103
32351 msgid "3. Look at current sizing"
32356 #: ../tools/virt-resize.pl:105
32357 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
32362 #: ../tools/virt-resize.pl:108
32365 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
32366 " Name Type Size Parent\n"
32367 " /dev/sda1 partition 101M /dev/sda\n"
32368 " /dev/sda2 partition 7.9G /dev/sda\n"
32369 " /dev/sda device 8.0G -\n"
32375 #: ../tools/virt-resize.pl:114
32377 "(This example is a virtual machine with an 8 GB disk which we would like to "
32378 "expand up to 10 GB)."
32383 #: ../tools/virt-resize.pl:117
32384 msgid "4. Create output disk"
32389 #: ../tools/virt-resize.pl:119
32391 "Virt-resize cannot do in-place disk modifications. You have to have space "
32392 "to store the resized output disk."
32397 #: ../tools/virt-resize.pl:122
32399 "To store the resized disk image in a file, create a file of a suitable size:"
32404 #: ../tools/virt-resize.pl:125
32407 " # rm -f outdisk\n"
32408 " # truncate -s 10G outdisk\n"
32414 #: ../tools/virt-resize.pl:128
32415 msgid "Or use L<lvcreate(1)> to create a logical volume:"
32420 #: ../tools/virt-resize.pl:130
32423 " # lvcreate -L 10G -n lv_name vg_name\n"
32429 #: ../tools/virt-resize.pl:132
32430 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
32435 #: ../tools/virt-resize.pl:134
32438 " # virsh pool-list\n"
32439 " # virsh vol-create-as poolname newvol 10G\n"
32445 #: ../tools/virt-resize.pl:137
32451 #: ../tools/virt-resize.pl:139
32453 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
32454 "file) and the output disk. The output disk is the one created in the "
32460 #: ../tools/virt-resize.pl:143
32463 " # virt-resize indisk outdisk\n"
32469 #: ../tools/virt-resize.pl:145
32471 "This command just copies disk image C<indisk> to disk image C<outdisk> "
32472 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
32473 "larger, then an extra, empty partition is created at the end of the disk "
32474 "covering the extra space. If C<outdisk> is smaller, then it will give an "
32480 #: ../tools/virt-resize.pl:151
32482 "More realistically you'd want to expand existing partitions in the disk "
32483 "image by passing extra options (for the full list see the L</OPTIONS> "
32489 #: ../tools/virt-resize.pl:155
32491 "L</--expand> is the most useful option. It expands the named partition "
32492 "within the disk to fill any extra space:"
32497 #: ../tools/virt-resize.pl:158
32500 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
32506 #: ../tools/virt-resize.pl:160
32508 "(In this case, an extra partition is I<not> created at the end of the disk, "
32509 "because there will be no unused space)."
32514 #: ../tools/virt-resize.pl:163
32516 "L</--resize> is the other commonly used option. The following would "
32517 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
32518 "rest of the available space:"
32523 #: ../tools/virt-resize.pl:167
32526 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
32527 " indisk outdisk\n"
32533 #: ../tools/virt-resize.pl:170
32535 "If the expanded partition in the image contains a filesystem or LVM PV, then "
32536 "if virt-resize knows how, it will resize the contents, the equivalent of "
32537 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or L<ntfsresize(8)"
32538 ">. However virt-resize does not know how to resize some filesystems, so you "
32539 "would have to online resize them after booting the guest."
32544 #: ../tools/virt-resize.pl:177
32545 msgid "Other options are covered below."
32550 #: ../tools/virt-resize.pl:179
32556 #: ../tools/virt-resize.pl:181
32557 msgid "Thoroughly test the new disk image I<before> discarding the old one."
32562 #: ../tools/virt-resize.pl:183
32563 msgid "If you are using libvirt, edit the XML to point at the new disk:"
32568 #: ../tools/virt-resize.pl:185
32571 " # virsh edit guestname\n"
32577 #: ../tools/virt-resize.pl:187
32579 "Change E<lt>source ...E<gt>, see L<http://libvirt.org/formatdomain."
32580 "html#elementsDisks>"
32585 #: ../tools/virt-resize.pl:190
32586 msgid "Then start up the domain with the new, resized disk:"
32591 #: ../tools/virt-resize.pl:192
32594 " # virsh start guestname\n"
32600 #: ../tools/virt-resize.pl:194
32602 "and check that it still works. See also the L</NOTES> section below for "
32603 "additional information."
32608 #: ../tools/virt-resize.pl:197
32609 msgid "7. Resize LVs etc inside the guest"
32614 #: ../tools/virt-resize.pl:199
32615 msgid "(This can also be done offline using L<guestfish(1)>)"
32620 #: ../tools/virt-resize.pl:201
32622 "Once the guest has booted you should see the new space available, at least "
32623 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
32624 "may need to resize LVs inside PVs, and also resize filesystem types that "
32625 "virt-resize does not know how to expand."
32630 #: ../tools/virt-resize.pl:208
32631 msgid "SHRINKING A VIRTUAL MACHINE DISK"
32636 #: ../tools/virt-resize.pl:210
32638 "Shrinking is somewhat more complex than expanding, and only an overview is "
32644 #: ../tools/virt-resize.pl:213
32646 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
32647 "filesystems). The user has to shrink content before passing the disk image "
32648 "to virt-resize, and virt-resize will check that the content has been shrunk "
32654 #: ../tools/virt-resize.pl:218
32655 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
32660 #: ../tools/virt-resize.pl:220
32662 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
32663 "steps 3 and 4 above to allocate a new disk image."
32668 #: ../tools/virt-resize.pl:223
32670 "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
32675 #: ../tools/virt-resize.pl:226
32676 msgid "IGNORING OR DELETING PARTITIONS"
32681 #: ../tools/virt-resize.pl:228
32683 "virt-resize also gives a convenient way to ignore or delete partitions when "
32684 "copying from the input disk to the output disk. Ignoring a partition speeds "
32685 "up the copy where you don't care about the existing contents of a "
32686 "partition. Deleting a partition removes it completely, but note that it "
32687 "also renumbers any partitions after the one which is deleted, which can "
32688 "leave some guests unbootable."
32693 #: ../tools/virt-resize.pl:235
32694 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
32699 #: ../tools/virt-resize.pl:237
32701 "If the input disk is in qcow2 format, then you may prefer that the output is "
32702 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
32703 "the fly. The output format is simply determined by the format of the empty "
32704 "output container that you provide. Thus to create qcow2 output, use:"
32709 #: ../tools/virt-resize.pl:243
32712 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
32718 #: ../tools/virt-resize.pl:245
32719 msgid "instead of the truncate command (use C<-c> for a compressed disk)."
32724 #: ../tools/virt-resize.pl:247
32725 msgid "Similarly, to get non-sparse raw output use:"
32730 #: ../tools/virt-resize.pl:249
32733 " fallocate -l size outdisk\n"
32739 #: ../tools/virt-resize.pl:251
32741 "(on older systems that don't have the L<fallocate(1)> command use C<dd if=/"
32742 "dev/zero of=outdisk bs=1M count=..>)"
32747 #: ../tools/virt-resize.pl:264
32748 msgid "Display help."
32753 #: ../tools/virt-resize.pl:278
32754 msgid "B<--resize part=size>"
32759 #: ../tools/virt-resize.pl:280
32761 "Resize the named partition (expanding or shrinking it) so that it has the "
32767 #: ../tools/virt-resize.pl:283
32769 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
32770 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
32771 "Exabytes; or as a percentage of the current size; or as a relative number or "
32772 "percentage. For example:"
32777 #: ../tools/virt-resize.pl:288
32780 " --resize /dev/sda2=10G\n"
32786 #: ../tools/virt-resize.pl:290
32789 " --resize /dev/sda4=90%\n"
32795 #: ../tools/virt-resize.pl:292
32798 " --resize /dev/sda2=+1G\n"
32804 #: ../tools/virt-resize.pl:294
32807 " --resize /dev/sda2=-200M\n"
32813 #: ../tools/virt-resize.pl:296
32816 " --resize /dev/sda1=+128K\n"
32822 #: ../tools/virt-resize.pl:298
32825 " --resize /dev/sda1=+10%\n"
32831 #: ../tools/virt-resize.pl:300
32834 " --resize /dev/sda1=-10%\n"
32840 #: ../tools/virt-resize.pl:302
32842 "You can increase the size of any partition. Virt-resize will expand the "
32843 "direct content of the partition if it knows how (see C<--expand> below)."
32848 #: ../tools/virt-resize.pl:306
32850 "You can only I<decrease> the size of partitions that contain filesystems or "
32851 "PVs which have already been shrunk. Virt-resize will check this has been "
32852 "done before proceeding, or else will print an error (see also C<--resize-"
32858 #: ../tools/virt-resize.pl:311 ../tools/virt-resize.pl:403
32859 #: ../tools/virt-resize.pl:420
32860 msgid "You can give this option multiple times."
32865 #: ../tools/virt-resize.pl:317
32866 msgid "B<--resize-force part=size>"
32871 #: ../tools/virt-resize.pl:319
32873 "This is the same as C<--resize> except that it will let you decrease the "
32874 "size of any partition. Generally this means you will lose any data which "
32875 "was at the end of the partition you shrink, but you may not care about that "
32876 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
32877 "as a swap partition)."
32882 #: ../tools/virt-resize.pl:325
32883 msgid "See also the C<--ignore> option."
32888 #: ../tools/virt-resize.pl:331
32889 msgid "B<--expand part>"
32894 #: ../tools/virt-resize.pl:333
32896 "Expand the named partition so it uses up all extra space (space left over "
32897 "after any other resize changes that you request have been done)."
32902 #: ../tools/virt-resize.pl:336
32904 "If virt-resize knows how, it will expand the direct content of the "
32905 "partition. For example, if the partition is an LVM PV, it will expand the "
32906 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
32907 "content it doesn't know about alone."
32912 #: ../tools/virt-resize.pl:341
32913 msgid "Currently virt-resize can resize:"
32918 #: ../tools/virt-resize.pl:347
32920 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
32926 #: ../tools/virt-resize.pl:352
32928 "NTFS filesystems contained directly in a partition, if libguestfs was "
32929 "compiled with support for NTFS."
32934 #: ../tools/virt-resize.pl:355
32936 "The filesystem must have been shut down consistently last time it was used. "
32937 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
32938 "consistency check, so at the first boot after resizing Windows will check "
32944 #: ../tools/virt-resize.pl:362
32946 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
32947 "inside the PV, but see the C<--LV-expand> option. The user could also "
32948 "resize LVs as desired after boot."
32953 #: ../tools/virt-resize.pl:368 ../tools/virt-resize.pl:390
32954 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
32959 #: ../tools/virt-resize.pl:374
32960 msgid "B<--shrink part>"
32965 #: ../tools/virt-resize.pl:376
32967 "Shrink the named partition until the overall disk image fits in the "
32968 "destination. The named partition B<must> contain a filesystem or PV which "
32969 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
32970 "online tools). Virt-resize will check this and give an error if it has not "
32976 #: ../tools/virt-resize.pl:382
32978 "The amount by which the overall disk must be shrunk (after carrying out all "
32979 "other operations requested by the user) is called the \"deficit\". For "
32980 "example, a straight copy (assume no other operations) from a 5GB disk image "
32981 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
32982 "would give an error unless the user specified a partition to shrink and that "
32983 "partition had more than a gigabyte of free space."
32988 #: ../tools/virt-resize.pl:396
32989 msgid "B<--ignore part>"
32994 #: ../tools/virt-resize.pl:398
32996 "Ignore the named partition. Effectively this means the partition is "
32997 "allocated on the destination disk, but the content is not copied across from "
32998 "the source disk. The content of the partition will be blank (all zero "
33004 #: ../tools/virt-resize.pl:409
33005 msgid "B<--delete part>"
33010 #: ../tools/virt-resize.pl:411
33012 "Delete the named partition. It would be more accurate to describe this as "
33013 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
33014 "the original disk image is left intact."
33019 #: ../tools/virt-resize.pl:415
33021 "Note that when you delete a partition, then anything contained in the "
33022 "partition is also deleted. Furthermore, this causes any partitions that "
33023 "come after to be I<renumbered>, which can easily make your guest unbootable."
33028 #: ../tools/virt-resize.pl:426
33029 msgid "B<--LV-expand logvol>"
33034 #: ../tools/virt-resize.pl:428
33036 "This takes the logical volume and, as a final step, expands it to fill all "
33037 "the space available in its volume group. A typical usage, assuming a Linux "
33038 "guest with a single PV C</dev/sda2> and a root device called C</dev/vg_guest/"
33039 "lv_root> would be:"
33044 #: ../tools/virt-resize.pl:433
33047 " virt-resize indisk outdisk \\\n"
33048 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
33054 #: ../tools/virt-resize.pl:436
33056 "This would first expand the partition (and PV), and then expand the root "
33057 "device to fill the extra space in the PV."
33062 #: ../tools/virt-resize.pl:439
33064 "The contents of the LV are also resized if virt-resize knows how to do "
33065 "that. You can stop virt-resize from trying to expand the content by using "
33066 "the option C<--no-expand-content>."
33071 #: ../tools/virt-resize.pl:443
33072 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
33077 #: ../tools/virt-resize.pl:446
33079 "You can give this option multiple times, I<but> it doesn't make sense to do "
33080 "this unless the logical volumes you specify are all in different volume "
33086 #: ../tools/virt-resize.pl:454
33087 msgid "B<--no-copy-boot-loader>"
33092 #: ../tools/virt-resize.pl:456
33094 "By default, virt-resize copies over some sectors at the start of the disk "
33095 "(up to the beginning of the first partition). Commonly these sectors "
33096 "contain the Master Boot Record (MBR) and the boot loader, and are required "
33097 "in order for the guest to boot correctly."
33102 #: ../tools/virt-resize.pl:461
33104 "If you specify this flag, then this initial copy is not done. You may need "
33105 "to reinstall the boot loader in this case."
33110 #: ../tools/virt-resize.pl:469
33111 msgid "B<--no-extra-partition>"
33116 #: ../tools/virt-resize.pl:471
33118 "By default, virt-resize creates an extra partition if there is any extra, "
33119 "unused space after all resizing has happened. Use this option to prevent "
33120 "the extra partition from being created. If you do this then the extra space "
33121 "will be inaccessible until you run fdisk, parted, or some other partitioning "
33122 "tool in the guest."
33127 #: ../tools/virt-resize.pl:477
33129 "Note that if the surplus space is smaller than 10 MB, no extra partition "
33135 #: ../tools/virt-resize.pl:484
33136 msgid "B<--no-expand-content>"
33141 #: ../tools/virt-resize.pl:486
33143 "By default, virt-resize will try to expand the direct contents of "
33144 "partitions, if it knows how (see C<--expand> option above)."
33149 #: ../tools/virt-resize.pl:489
33151 "If you give the C<--no-expand-content> option then virt-resize will not "
33157 #: ../tools/virt-resize.pl:496
33158 msgid "B<-d> | B<--debug>"
33163 #: ../tools/virt-resize.pl:504
33164 msgid "B<-n> | B<--dryrun>"
33169 #: ../tools/virt-resize.pl:506
33170 msgid "Print a summary of what would be done, but don't do anything."
33175 #: ../tools/virt-resize.pl:512
33176 msgid "B<-q> | B<--quiet>"
33181 #: ../tools/virt-resize.pl:514
33182 msgid "Don't print the summary."
33187 #: ../tools/virt-resize.pl:522
33189 "Specify the format of the input disk image. If this flag is not given then "
33190 "it is auto-detected from the image itself."
33195 #: ../tools/virt-resize.pl:528
33197 "Note that this option I<does not> affect the output format. See L</QCOW2 "
33198 "AND NON-SPARSE RAW FORMATS>."
33203 #: ../tools/virt-resize.pl:535
33204 msgid "B<--output-format> raw"
33209 #: ../tools/virt-resize.pl:537
33211 "Specify the format of the output disk image. If this flag is not given then "
33212 "it is auto-detected from the image itself."
33217 #: ../tools/virt-resize.pl:543
33219 "Note that you still need to create the output disk with the right format. "
33220 "See L</QCOW2 AND NON-SPARSE RAW FORMATS>."
33225 #: ../tools/virt-resize.pl:1419
33231 #: ../tools/virt-resize.pl:1421
33232 msgid "\"Partition 1 does not end on cylinder boundary.\""
33237 #: ../tools/virt-resize.pl:1423
33239 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
33240 "means the partitions will not be aligned to the ancient CHS geometry. "
33241 "However CHS geometry is meaningless for disks manufactured since the early "
33242 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
33243 "cylinders is not required by any modern operating system."
33248 #: ../tools/virt-resize.pl:1430
33249 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
33254 #: ../tools/virt-resize.pl:1432
33256 "In Windows Vista and later versions, Microsoft switched to using a separate "
33257 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
33258 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
33259 "the boot partition. Doing so seems to break the guest completely. However "
33260 "expanding the second partition (ie. C: drive) should work."
33265 #: ../tools/virt-resize.pl:1439
33267 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
33268 "NTFS partitions have been expanded. This is just a safety check and (unless "
33269 "it find errors) is nothing to worry about."
33274 #: ../tools/virt-resize.pl:1443
33275 msgid "GUEST BOOT STUCK AT \"GRUB\""
33280 #: ../tools/virt-resize.pl:1445
33282 "If a Linux guest does not boot after resizing, and the boot is stuck after "
33283 "printing C<GRUB> on the console, try reinstalling grub. This sometimes "
33284 "happens on older (RHEL 5-era) guests, for reasons we don't fully understand, "
33285 "although we think is to do with partition alignment."
33290 #: ../tools/virt-resize.pl:1450
33293 " guestfish -i -a newdisk\n"
33294 " ><fs> cat /boot/grub/device.map\n"
33295 " # check the contents of this file are sensible or\n"
33296 " # edit the file if necessary\n"
33297 " ><fs> grub-install / /dev/vda\n"
33304 #: ../tools/virt-resize.pl:1457
33306 "For more flexible guest reconfiguration, including if you need to specify "
33307 "other parameters to grub-install, use L<virt-rescue(1)>."
33312 #: ../tools/virt-resize.pl:1460
33313 msgid "ALTERNATIVE TOOLS"
33318 #: ../tools/virt-resize.pl:1462
33320 "There are several proprietary tools for resizing partitions. We won't "
33321 "mention any here."
33326 #: ../tools/virt-resize.pl:1465
33328 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
33329 "operations on disk images. They can resize and move partitions, but I don't "
33330 "think they can do anything with the contents, and they certainly don't "
33336 #: ../tools/virt-resize.pl:1470
33338 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
33339 "but at a much lower level. You will probably end up hand-calculating sector "
33340 "offsets, which is something that virt-resize was designed to avoid. If you "
33341 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
33347 #: ../tools/virt-resize.pl:1485
33349 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, L<lvm"
33350 "(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, L<ntfsresize(8)>, "
33351 "L<virsh(1)>, L<parted(8)>, L<truncate(1)>, L<fallocate(1)>, L<grub(8)>, "
33352 "L<grub-install(8)>, L<virt-rescue(1)>, L<Sys::Guestfs(3)>, L<http://"
33353 "libguestfs.org/>."
33358 #: ../tools/virt-list-filesystems.pl:32
33360 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
33365 #: ../tools/virt-list-filesystems.pl:36
33368 " virt-list-filesystems [--options] domname\n"
33374 #: ../tools/virt-list-filesystems.pl:38
33377 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
33383 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
33385 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
33391 #: ../tools/virt-list-filesystems.pl:45
33393 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
33394 "are contained in a virtual machine or disk image."
33399 #: ../tools/virt-list-filesystems.pl:49
33401 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
33402 "functionality. For more complex cases you should look at the L<guestfish(1)"
33408 #: ../tools/virt-list-filesystems.pl:106 ../tools/virt-list-partitions.pl:115
33409 msgid "B<-l> | B<--long>"
33414 #: ../tools/virt-list-filesystems.pl:108
33416 "With this option, C<virt-list-filesystems> displays the type of each "
33417 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
33422 #: ../tools/virt-list-filesystems.pl:115
33423 msgid "B<-a> | B<--all>"
33428 #: ../tools/virt-list-filesystems.pl:117
33430 "Normally we only show mountable filesystems. If this option is given then "
33431 "swap devices are shown too."
33436 #: ../tools/virt-list-filesystems.pl:191
33438 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
33439 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::"
33440 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
33445 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-tar.pl:307
33446 msgid "Copyright (C) 2009 Red Hat Inc."
33451 #: ../tools/virt-tar.pl:33
33452 msgid "virt-tar - Extract or upload files to a virtual machine"
33457 #: ../tools/virt-tar.pl:37
33460 " virt-tar [--options] -x domname directory tarball\n"
33466 #: ../tools/virt-tar.pl:39
33469 " virt-tar [--options] -u domname tarball directory\n"
33475 #: ../tools/virt-tar.pl:41
33478 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
33484 #: ../tools/virt-tar.pl:43
33487 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
33492 #: ../tools/virt-tar.pl:47
33494 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-"
33495 "tar-in(1)>, L<virt-tar-out(1)> as replacements."
33500 #: ../tools/virt-tar.pl:52
33501 msgid "Download C</home> from the VM into a local tarball:"
33506 #: ../tools/virt-tar.pl:54
33509 " virt-tar -x domname /home home.tar\n"
33515 #: ../tools/virt-tar.pl:56
33518 " virt-tar -zx domname /home home.tar.gz\n"
33524 #: ../tools/virt-tar.pl:58
33525 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
33530 #: ../tools/virt-tar.pl:60
33533 " virt-tar -u domname uploadstuff.tar /tmp\n"
33539 #: ../tools/virt-tar.pl:62
33542 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
33548 #: ../tools/virt-tar.pl:66
33550 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
33551 "virtual machines. If you do this, you risk disk corruption in the VM. "
33552 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
33557 #: ../tools/virt-tar.pl:71
33559 "You can use C<-x> (extract) on live virtual machines, but you might get "
33560 "inconsistent results or errors if there is filesystem activity inside the "
33561 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
33562 "work, but the only way to guarantee consistent results is if the virtual "
33563 "machine is shut down."
33568 #: ../tools/virt-tar.pl:79
33570 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
33571 "parts of a guest filesystem. There are many possibilities: making backups, "
33572 "uploading data files, snooping on guest activity, fixing or customizing "
33578 #: ../tools/virt-tar.pl:84
33580 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
33581 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
33582 "should look at the L<guestfish(1)> tool."
33587 #: ../tools/virt-tar.pl:88
33589 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
33590 "its contents (recursively) from the virtual machine into a local tarball. "
33591 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
33592 "virtual machine. You cannot use these two options together."
33597 #: ../tools/virt-tar.pl:94
33599 "In addition, you may need to use the C<-z> (gZip) option to enable "
33600 "compression. When uploading, you have to specify C<-z> if the upload file "
33601 "is compressed because virt-tar won't detect this on its own."
33606 #: ../tools/virt-tar.pl:98
33608 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
33609 "example it cannot do PKZip files or bzip2 compression. If you want that "
33610 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
33611 "the L<libguestfs(3)> API)."
33616 #: ../tools/virt-tar.pl:156
33617 msgid "B<-x> | B<--extract> | B<--download>"
33622 #: ../tools/virt-tar.pl:158
33623 msgid "B<-u> | B<--upload>"
33628 #: ../tools/virt-tar.pl:160
33630 "Use C<-x> to extract (download) a directory from a virtual machine to a "
33636 #: ../tools/virt-tar.pl:163
33638 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
33639 "Please read the L</WARNING> section above before using this option."
33644 #: ../tools/virt-tar.pl:167
33645 msgid "You must specify exactly one of these options."
33650 #: ../tools/virt-tar.pl:173
33651 msgid "B<-z> | B<--gzip>"
33656 #: ../tools/virt-tar.pl:175
33657 msgid "Specify that the input or output tarball is gzip-compressed."
33661 #: ../tools/virt-tar.pl:288
33663 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-copy-"
33664 "in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<Sys::"
33665 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
33671 #: ../tools/virt-make-fs.pl:37
33672 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
33677 #: ../tools/virt-make-fs.pl:41
33680 " virt-make-fs [--options] input.tar output.img\n"
33686 #: ../tools/virt-make-fs.pl:43
33689 " virt-make-fs [--options] input.tar.gz output.img\n"
33695 #: ../tools/virt-make-fs.pl:45
33698 " virt-make-fs [--options] directory output.img\n"
33704 #: ../tools/virt-make-fs.pl:49
33706 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
33707 "archive or some files in a directory. It is similar to tools like L<mkisofs"
33708 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
33709 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
33710 "you want to attach these filesystems to existing virtual machines (eg. to "
33711 "import large amounts of read-only data to a VM)."
33716 #: ../tools/virt-make-fs.pl:57
33717 msgid "Basic usage is:"
33722 #: ../tools/virt-make-fs.pl:59
33725 " virt-make-fs input output\n"
33731 #: ../tools/virt-make-fs.pl:61
33733 "where C<input> is either a directory containing files that you want to add, "
33734 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
33735 "C<output> is a disk image. The input type is detected automatically. The "
33736 "output disk image defaults to a raw ext2 image unless you specify extra "
33737 "flags (see L</OPTIONS> below)."
33742 #: ../tools/virt-make-fs.pl:67
33743 msgid "EXTRA SPACE"
33748 #: ../tools/virt-make-fs.pl:69
33750 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
33751 "the files that it contains, but might have extra space. Depending on how "
33752 "you are going to use the output, you might think this extra space is wasted "
33753 "and want to minimize it, or you might want to leave space so that more files "
33754 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
33755 "but you can use the C<--size> flag to leave space in the filesystem if you "
33761 #: ../tools/virt-make-fs.pl:77
33763 "An alternative way to leave extra space but not make the output image any "
33764 "bigger is to use an alternative disk image format (instead of the default "
33765 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
33766 "image format (check your hypervisor supports this before using it). This "
33767 "allows you to choose a large C<--size> but the extra space won't actually be "
33768 "allocated in the image until you try to store something in it."
33773 #: ../tools/virt-make-fs.pl:85
33775 "Don't forget that you can also use local commands including L<resize2fs(8)> "
33776 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-"
33777 "resize to build another image from scratch."
33782 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
33783 #: ../tools/virt-make-fs.pl:142
33789 #: ../tools/virt-make-fs.pl:91
33792 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
33798 #: ../tools/virt-make-fs.pl:93
33799 msgid "FILESYSTEM TYPE"
33804 #: ../tools/virt-make-fs.pl:95
33806 "The default filesystem type is C<ext2>. Just about any filesystem type that "
33807 "libguestfs supports can be used (but I<not> read-only formats like "
33808 "ISO9660). Here are some of the more common choices:"
33813 #: ../tools/virt-make-fs.pl:101
33819 #: ../tools/virt-make-fs.pl:103
33821 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
33822 "you are not going to use the filesystem in a way that requires the journal, "
33823 "then this is just wasted overhead."
33828 #: ../tools/virt-make-fs.pl:107
33829 msgid "I<ntfs> or I<vfat>"
33834 #: ../tools/virt-make-fs.pl:109
33835 msgid "Useful if exporting data to a Windows guest."
33840 #: ../tools/virt-make-fs.pl:111
33842 "I<Note for vfat>: The tar archive or local directory must only contain files "
33843 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
33844 "program running within libguestfs is unable to change the ownership of non-"
33845 "root files, since vfat itself does not support this."
33850 #: ../tools/virt-make-fs.pl:116
33856 #: ../tools/virt-make-fs.pl:118
33858 "Lower overhead than C<ext2>, but certain limitations on filename length and "
33859 "total filesystem size."
33864 #: ../tools/virt-make-fs.pl:125
33867 " virt-make-fs --type=minix input minixfs.img\n"
33873 #: ../tools/virt-make-fs.pl:127
33874 msgid "TO PARTITION OR NOT TO PARTITION"
33879 #: ../tools/virt-make-fs.pl:129
33880 msgid "Optionally virt-make-fs can add a partition table to the output disk."
33885 #: ../tools/virt-make-fs.pl:131
33887 "Adding a partition can make the disk image more compatible with certain "
33888 "virtualized operating systems which don't expect to see a filesystem "
33889 "directly located on a block device (Linux doesn't care and will happily "
33890 "handle both types)."
33895 #: ../tools/virt-make-fs.pl:136
33897 "On the other hand, if you have a partition table then the output image is no "
33898 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
33899 "directly on a partitioned disk image. (However libguestfs tools such as "
33900 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
33905 #: ../tools/virt-make-fs.pl:144
33906 msgid "Add an MBR partition:"
33911 #: ../tools/virt-make-fs.pl:146
33914 " virt-make-fs --partition -- input disk.img\n"
33920 #: ../tools/virt-make-fs.pl:148
33922 "If the output disk image could be terabyte-sized or larger, it's better to "
33923 "use an EFI/GPT-compatible partition table:"
33928 #: ../tools/virt-make-fs.pl:151
33931 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
33937 #: ../tools/virt-make-fs.pl:179
33938 msgid "Enable debugging information."
33943 #: ../tools/virt-make-fs.pl:185
33944 msgid "B<--size=E<lt>NE<gt>>"
33949 #: ../tools/virt-make-fs.pl:187
33950 msgid "B<--size=+E<lt>NE<gt>>"
33955 #: ../tools/virt-make-fs.pl:189
33956 msgid "B<-s E<lt>NE<gt>>"
33961 #: ../tools/virt-make-fs.pl:191
33962 msgid "B<-s +E<lt>NE<gt>>"
33967 #: ../tools/virt-make-fs.pl:193
33969 "Use the C<--size> (or C<-s>) option to choose the size of the output image."
33974 #: ../tools/virt-make-fs.pl:196
33976 "If this option is I<not> given, then the output image will be just large "
33977 "enough to contain all the files, with not much wasted space."
33982 #: ../tools/virt-make-fs.pl:199
33984 "To choose a fixed size output disk, specify an absolute number followed by b/"
33985 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
33986 "Petabytes or Exabytes. This must be large enough to contain all the input "
33987 "files, else you will get an error."
33992 #: ../tools/virt-make-fs.pl:204
33994 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
33995 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
33996 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
33997 "the input files, and (approximately) an extra 200 MB free space."
34002 #: ../tools/virt-make-fs.pl:210
34004 "Note that virt-make-fs estimates free space, and therefore will not produce "
34005 "filesystems containing precisely the free space requested. (It is much more "
34006 "expensive and time-consuming to produce a filesystem which has precisely the "
34007 "desired free space)."
34012 #: ../tools/virt-make-fs.pl:219
34013 msgid "B<--format=E<lt>fmtE<gt>>"
34018 #: ../tools/virt-make-fs.pl:221
34019 msgid "B<-F E<lt>fmtE<gt>>"
34024 #: ../tools/virt-make-fs.pl:223
34025 msgid "Choose the output disk image format."
34030 #: ../tools/virt-make-fs.pl:225
34031 msgid "The default is C<raw> (raw disk image)."
34036 #: ../tools/virt-make-fs.pl:227
34038 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
34039 "that would really make sense here is C<qcow2>."
34044 #: ../tools/virt-make-fs.pl:234
34045 msgid "B<--type=E<lt>fsE<gt>>"
34050 #: ../tools/virt-make-fs.pl:236
34051 msgid "B<-t E<lt>fsE<gt>>"
34056 #: ../tools/virt-make-fs.pl:238
34057 msgid "Choose the output filesystem type."
34062 #: ../tools/virt-make-fs.pl:240
34063 msgid "The default is C<ext2>."
34068 #: ../tools/virt-make-fs.pl:242
34070 "Any filesystem which is supported read-write by libguestfs can be used here."
34075 #: ../tools/virt-make-fs.pl:249
34076 msgid "B<--partition>"
34081 #: ../tools/virt-make-fs.pl:251
34082 msgid "B<--partition=E<lt>parttypeE<gt>>"
34087 #: ../tools/virt-make-fs.pl:253
34089 "If specified, this flag adds an MBR partition table to the output disk image."
34094 #: ../tools/virt-make-fs.pl:256
34096 "You can change the partition table type, eg. C<--partition=gpt> for large "
34102 #: ../tools/virt-make-fs.pl:259
34104 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
34105 "might consider the next parameter to be the partition type. For example:"
34110 #: ../tools/virt-make-fs.pl:263
34113 " virt-make-fs --partition input.tar ...\n"
34119 #: ../tools/virt-make-fs.pl:265
34121 "would cause virt-make-fs to think you wanted to use a partition type of "
34122 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
34123 "dash) between options and the input file argument:"
34128 #: ../tools/virt-make-fs.pl:269
34131 " virt-make-fs --partition -- input.tar ...\n"
34136 #: ../tools/virt-make-fs.pl:536
34138 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
34139 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
34140 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
34145 #: ../tools/virt-make-fs.pl:553
34148 " export LIBGUESTFS_DEBUG=1\n"
34149 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
34155 #: ../tools/virt-make-fs.pl:556
34157 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
34163 #: ../tools/virt-list-partitions.pl:32
34165 "virt-list-partitions - List partitions in a virtual machine or disk image"
34170 #: ../tools/virt-list-partitions.pl:36
34173 " virt-list-partitions [--options] domname\n"
34179 #: ../tools/virt-list-partitions.pl:38
34182 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
34188 #: ../tools/virt-list-partitions.pl:45
34190 "C<virt-list-partitions> is a command line tool to list the partitions that "
34191 "are contained in a virtual machine or disk image. It is mainly useful as a "
34192 "first step to using L<virt-resize(1)>."
34197 #: ../tools/virt-list-partitions.pl:50
34199 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
34200 "functionality. For more complex cases you should look at the L<guestfish(1)"
34206 #: ../tools/virt-list-partitions.pl:107
34207 msgid "B<-h> | B<--human-readable>"
34212 #: ../tools/virt-list-partitions.pl:109
34213 msgid "Show sizes in human-readable form (eg. \"1G\")."
34218 #: ../tools/virt-list-partitions.pl:117
34220 "With this option, C<virt-list-partitions> displays the type and size of each "
34221 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
34226 #: ../tools/virt-list-partitions.pl:124
34227 msgid "B<-t> | B<--total>"
34232 #: ../tools/virt-list-partitions.pl:126
34234 "Display the total size of each block device (as a separate row or rows)."
34239 #: ../tools/virt-list-partitions.pl:259
34241 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
34242 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib"
34243 "(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."