1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Red Hat Inc.
3 # This file is distributed under the same license as the libguestfs package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: libguestfs 1.9.5\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2011-01-18 13:31+0000\n"
12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 "Language-Team: LANGUAGE <LL@li.org>\n"
17 "Content-Type: text/plain; charset=UTF-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
21 #: ../src/guestfs.pod:3 ../fish/guestfish.pod:3 ../test-tool/libguestfs-test-tool.pod:3 ../fuse/guestmount.pod:3 ../tools/virt-edit.pl:32 ../tools/virt-win-reg.pl:35 ../tools/virt-resize.pl:40 ../tools/virt-list-filesystems.pl:30 ../tools/virt-tar.pl:31 ../tools/virt-make-fs.pl:35 ../tools/virt-list-partitions.pl:30
26 #: ../src/guestfs.pod:5
27 msgid "guestfs - Library for accessing and modifying virtual machine images"
31 #: ../src/guestfs.pod:7 ../fish/guestfish.pod:7 ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7 ../tools/virt-edit.pl:36 ../tools/virt-win-reg.pl:39 ../tools/virt-resize.pl:44 ../tools/virt-list-filesystems.pl:34 ../tools/virt-tar.pl:35 ../tools/virt-make-fs.pl:39 ../tools/virt-list-partitions.pl:34
36 #: ../src/guestfs.pod:9
39 " #include <guestfs.h>\n"
44 #: ../src/guestfs.pod:11
47 " guestfs_h *g = guestfs_create ();\n"
48 " guestfs_add_drive (g, \"guest.img\");\n"
49 " guestfs_launch (g);\n"
50 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
51 " guestfs_touch (g, \"/hello\");\n"
52 " guestfs_umount (g, \"/\");\n"
53 " guestfs_close (g);\n"
58 #: ../src/guestfs.pod:19
61 " cc prog.c -o prog -lguestfs\n"
63 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
68 #: ../src/guestfs.pod:23 ../fish/guestfish.pod:30 ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:20 ../tools/virt-edit.pl:50 ../tools/virt-win-reg.pl:63 ../tools/virt-resize.pl:50 ../tools/virt-list-filesystems.pl:40 ../tools/virt-tar.pl:77 ../tools/virt-make-fs.pl:47 ../tools/virt-list-partitions.pl:40
73 #: ../src/guestfs.pod:25
75 "Libguestfs is a library for accessing and modifying guest disk images. "
76 "Amongst the things this is good for: making batch configuration changes to "
77 "guests, getting disk used/free statistics (see also: virt-df), migrating "
78 "between virtualization systems (see also: virt-p2v), performing partial "
79 "backups, performing partial guest clones, cloning guests and changing "
80 "registry/UUID/hostname info, and much else besides."
84 #: ../src/guestfs.pod:33
86 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
87 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
88 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
93 #: ../src/guestfs.pod:38
95 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
96 "what filesystem is in each LV, etc.). It can also run commands in the "
97 "context of the guest. Also you can access filesystems over FUSE."
101 #: ../src/guestfs.pod:43
103 "Libguestfs is a library that can be linked with C and C++ management "
104 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
105 "PHP, Haskell or C#). You can also use it from shell scripts or the command "
110 #: ../src/guestfs.pod:48
112 "You don't need to be root to use libguestfs, although obviously you do need "
113 "enough permissions to access the disk images."
117 #: ../src/guestfs.pod:51
119 "Libguestfs is a large API because it can do many things. For a gentle "
120 "introduction, please read the L</API OVERVIEW> section next."
124 #: ../src/guestfs.pod:54
126 "There are also some example programs in the L<guestfs-examples(3)> manual "
131 #: ../src/guestfs.pod:57
136 #: ../src/guestfs.pod:59
138 "This section provides a gentler overview of the libguestfs API. We also try "
139 "to group API calls together, where that may not be obvious from reading "
140 "about the individual calls in the main section of this manual."
144 #: ../src/guestfs.pod:64
149 #: ../src/guestfs.pod:66
151 "Before you can use libguestfs calls, you have to create a handle. Then you "
152 "must add at least one disk image to the handle, followed by launching the "
153 "handle, then performing whatever operations you want, and finally closing "
154 "the handle. By convention we use the single letter C<g> for the name of the "
155 "handle variable, although of course you can use any name you want."
159 #: ../src/guestfs.pod:73
160 msgid "The general structure of all libguestfs-using programs looks like this:"
164 #: ../src/guestfs.pod:76
167 " guestfs_h *g = guestfs_create ();\n"
172 #: ../src/guestfs.pod:78
175 " /* Call guestfs_add_drive additional times if there are\n"
176 " * multiple disk images.\n"
178 " guestfs_add_drive (g, \"guest.img\");\n"
183 #: ../src/guestfs.pod:83
186 " /* Most manipulation calls won't work until you've launched\n"
187 " * the handle 'g'. You have to do this _after_ adding drives\n"
188 " * and _before_ other commands.\n"
190 " guestfs_launch (g);\n"
195 #: ../src/guestfs.pod:89
198 " /* Now you can examine what partitions, LVs etc are available.\n"
200 " char **partitions = guestfs_list_partitions (g);\n"
201 " char **logvols = guestfs_lvs (g);\n"
206 #: ../src/guestfs.pod:94
209 " /* To access a filesystem in the image, you must mount it.\n"
211 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
216 #: ../src/guestfs.pod:98
219 " /* Now you can perform filesystem actions on the guest\n"
222 " guestfs_touch (g, \"/hello\");\n"
227 #: ../src/guestfs.pod:103
230 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
231 " * it is done automatically when you close the handle. See\n"
232 " * discussion of autosync in this page.\n"
234 " guestfs_sync (g);\n"
239 #: ../src/guestfs.pod:109
242 " /* Close the handle 'g'. */\n"
243 " guestfs_close (g);\n"
248 #: ../src/guestfs.pod:112
250 "The code above doesn't include any error checking. In real code you should "
251 "check return values carefully for errors. In general all functions that "
252 "return integers return C<-1> on error, and all functions that return "
253 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
254 "how to handle errors, and consult the documentation for each function call "
255 "below to see precisely how they return error indications. See "
256 "L<guestfs-examples(3)> for fully worked examples."
260 #: ../src/guestfs.pod:121
265 #: ../src/guestfs.pod:123
267 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
268 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
269 "actual block device, or simply an empty file of zeroes that you have created "
270 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
275 #: ../src/guestfs.pod:129
277 "The call you should use in modern code for adding drives is "
278 "L</guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
279 "specifying that the format is raw, do:"
283 #: ../src/guestfs.pod:133
286 " guestfs_add_drive_opts (g, filename,\n"
287 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
293 #: ../src/guestfs.pod:137
294 msgid "You can add a disk read-only using:"
298 #: ../src/guestfs.pod:139
301 " guestfs_add_drive_opts (g, filename,\n"
302 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
303 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
309 #: ../src/guestfs.pod:144
311 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
312 "libguestfs won't modify the file."
316 #: ../src/guestfs.pod:147
318 "Be extremely cautious if the disk image is in use, eg. if it is being used "
319 "by a virtual machine. Adding it read-write will almost certainly cause disk "
320 "corruption, but adding it read-only is safe."
324 #: ../src/guestfs.pod:151
326 "You must add at least one disk image, and you may add multiple disk images. "
327 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
328 "first one you added), C</dev/sdb> (for the second one you added), etc."
332 #: ../src/guestfs.pod:156
334 "Once L</guestfs_launch> has been called you cannot add any more images. You "
335 "can call L</guestfs_list_devices> to get a list of the device names, in the "
336 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
340 #: ../src/guestfs.pod:161
345 #: ../src/guestfs.pod:163
347 "Before you can read or write files, create directories and so on in a disk "
348 "image that contains filesystems, you have to mount those filesystems using "
349 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
350 "a disk image contains (for example) one partition with a filesystem on that "
351 "partition, then you can mount it directly:"
355 #: ../src/guestfs.pod:170
358 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
363 #: ../src/guestfs.pod:172
365 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
366 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
367 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
368 "that these are libguestfs virtual devices, and are nothing to do with host "
373 #: ../src/guestfs.pod:178
375 "If you are given a disk image and you don't know what it contains then you "
376 "have to find out. Libguestfs can do that too: use "
377 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
378 "and LVs, and either try mounting each to see what is mountable, or else "
379 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
380 "filesystems, use L</guestfs_list_filesystems>."
384 #: ../src/guestfs.pod:186
386 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
387 "L</INSPECTION> below). But you might find it easier to look at higher level "
388 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
392 #: ../src/guestfs.pod:191
394 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
395 "several other variations of the C<guestfs_mount_*> call."
399 #: ../src/guestfs.pod:194
400 msgid "FILESYSTEM ACCESS AND MODIFICATION"
404 #: ../src/guestfs.pod:196
406 "The majority of the libguestfs API consists of fairly low-level calls for "
407 "accessing and modifying the files, directories, symlinks etc on mounted "
408 "filesystems. There are over a hundred such calls which you can find listed "
409 "in detail below in this man page, and we don't even pretend to cover them "
410 "all in this overview."
414 #: ../src/guestfs.pod:202
416 "Specify filenames as full paths, starting with C<\"/\"> and including the "
421 #: ../src/guestfs.pod:205
423 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
424 "the file called C<\"etc/passwd\"> then you could do:"
428 #: ../src/guestfs.pod:208
431 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
436 #: ../src/guestfs.pod:210
438 "This would return C<data> as a newly allocated buffer containing the full "
439 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
440 "or C<NULL> if there was an error."
444 #: ../src/guestfs.pod:214
446 "As another example, to create a top-level directory on that filesystem "
447 "called C<\"var\"> you would do:"
451 #: ../src/guestfs.pod:217
454 " guestfs_mkdir (g, \"/var\");\n"
459 #: ../src/guestfs.pod:219
460 msgid "To create a symlink you could do:"
464 #: ../src/guestfs.pod:221
467 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
468 " \"/etc/rc3.d/S30portmap\");\n"
473 #: ../src/guestfs.pod:224
475 "Libguestfs will reject attempts to use relative paths and there is no "
476 "concept of a current working directory."
480 #: ../src/guestfs.pod:227
482 "Libguestfs can return errors in many situations: for example if the "
483 "filesystem isn't writable, or if a file or directory that you requested "
484 "doesn't exist. If you are using the C API (documented here) you have to "
485 "check for those error conditions after each call. (Other language bindings "
486 "turn these errors into exceptions)."
490 #: ../src/guestfs.pod:233
492 "File writes are affected by the per-handle umask, set by calling "
493 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
497 #: ../src/guestfs.pod:236
502 #: ../src/guestfs.pod:238
504 "Libguestfs contains API calls to read, create and modify partition tables on "
509 #: ../src/guestfs.pod:241
511 "In the common case where you want to create a single partition covering the "
512 "whole disk, you should use the L</guestfs_part_disk> call:"
516 #: ../src/guestfs.pod:245
519 " const char *parttype = \"mbr\";\n"
520 " if (disk_is_larger_than_2TB)\n"
521 " parttype = \"gpt\";\n"
522 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
527 #: ../src/guestfs.pod:250
529 "Obviously this effectively wipes anything that was on that disk image "
534 #: ../src/guestfs.pod:253
539 #: ../src/guestfs.pod:255
541 "Libguestfs provides access to a large part of the LVM2 API, such as "
542 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
543 "unless you familiarize yourself with the concepts of physical volumes, "
544 "volume groups and logical volumes."
548 #: ../src/guestfs.pod:260
550 "This author strongly recommends reading the LVM HOWTO, online at "
551 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
555 #: ../src/guestfs.pod:263
560 #: ../src/guestfs.pod:265
562 "Use L</guestfs_cat> to download small, text only files. This call is "
563 "limited to files which are less than 2 MB and which cannot contain any ASCII "
564 "NUL (C<\\0>) characters. However the API is very simple to use."
568 #: ../src/guestfs.pod:269
570 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
571 "bit data, since it returns a (pointer, size) pair. However it is still "
572 "limited to \"small\" files, less than 2 MB."
576 #: ../src/guestfs.pod:273
578 "L</guestfs_download> can be used to download any file, with no limits on "
579 "content or size (even files larger than 4 GB)."
583 #: ../src/guestfs.pod:276
584 msgid "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
588 #: ../src/guestfs.pod:279
593 #: ../src/guestfs.pod:281
595 "It's often the case that you want to write a file or files to the disk "
600 #: ../src/guestfs.pod:284
602 "To write a small file with fixed content, use L</guestfs_write>. To create "
603 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
604 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
605 "variety of other functions for creating test files, for example "
606 "L</guestfs_fill> and L</guestfs_fill_pattern>."
610 #: ../src/guestfs.pod:290
612 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
613 "file content or size (even files larger than 4 GB)."
617 #: ../src/guestfs.pod:293
618 msgid "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
622 #: ../src/guestfs.pod:295
624 "However the fastest way to upload I<large numbers of arbitrary files> is to "
625 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
626 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add "
627 "the drive in a predictable way (eg. adding it last after all other drives) "
628 "then you can get the device name from L</guestfs_list_devices> and mount it "
629 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
630 "sometimes non-portable between kernel versions, and they don't support "
631 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
632 "using a label or UUID, use an ISO image instead."
636 #: ../src/guestfs.pod:306
641 #: ../src/guestfs.pod:308
643 "There are various different commands for copying between files and devices "
644 "and in and out of the guest filesystem. These are summarised in the table "
649 #: ../src/guestfs.pod:314
650 msgid "B<file> to B<file>"
654 #: ../src/guestfs.pod:316
656 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
657 "directories recursively."
661 #: ../src/guestfs.pod:319
662 msgid "B<file or device> to B<file or device>"
666 #: ../src/guestfs.pod:321
668 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
669 "devices in the guest."
673 #: ../src/guestfs.pod:324
674 msgid "Example: duplicate the contents of an LV:"
678 #: ../src/guestfs.pod:326
681 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
686 #: ../src/guestfs.pod:328
688 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
689 "(C</dev/VG/Original>). To copy less than the whole source device, use "
690 "L</guestfs_copy_size>."
694 #: ../src/guestfs.pod:332
695 msgid "B<file on the host> to B<file or device>"
699 #: ../src/guestfs.pod:334
700 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
704 #: ../src/guestfs.pod:336
705 msgid "B<file or device> to B<file on the host>"
709 #: ../src/guestfs.pod:338
710 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
714 #: ../src/guestfs.pod:342
715 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
719 #: ../src/guestfs.pod:344
721 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, "
722 "L</guestfs_tar_out> etc appear to only take filenames as arguments, so it "
723 "appears you can only upload and download to files. However many Un*x-like "
724 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, "
725 "C</dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, "
726 "stderr, and arbitrary file descriptor N."
730 #: ../src/guestfs.pod:352
731 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
735 #: ../src/guestfs.pod:355
738 " guestfs_download (g, filename, \"/dev/stdout\");\n"
743 #: ../src/guestfs.pod:357
744 msgid "and you can write tar output to a pipe C<fd> by doing:"
748 #: ../src/guestfs.pod:359
752 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
753 " guestfs_tar_out (g, \"/\", devfd);\n"
758 #: ../src/guestfs.pod:363
759 msgid "LISTING FILES"
763 #: ../src/guestfs.pod:365
765 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
766 "L<guestfish(1)>-equivalent command C<ll>)."
770 #: ../src/guestfs.pod:368
772 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
773 "programs, as a flat list of strings."
777 #: ../src/guestfs.pod:371
779 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
780 "directory, plus additional information about each one. It is more "
781 "equivalent to using the L<readdir(3)> call on a local filesystem."
785 #: ../src/guestfs.pod:375
787 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
792 #: ../src/guestfs.pod:378
793 msgid "RUNNING COMMANDS"
797 #: ../src/guestfs.pod:380
799 "Although libguestfs is primarily an API for manipulating files inside guest "
800 "images, we also provide some limited facilities for running commands inside "
805 #: ../src/guestfs.pod:384
806 msgid "There are many limitations to this:"
810 #: ../src/guestfs.pod:388 ../src/guestfs.pod:393 ../src/guestfs.pod:398 ../src/guestfs.pod:402 ../src/guestfs.pod:407 ../src/guestfs.pod:411 ../src/guestfs.pod:416 ../src/guestfs.pod:421 ../src/guestfs.pod:1031 ../src/guestfs.pod:1035 ../src/guestfs.pod:1039 ../src/guestfs.pod:1044 ../src/guestfs.pod:1052 ../src/guestfs.pod:1071 ../src/guestfs.pod:1079 ../src/guestfs.pod:1101 ../src/guestfs.pod:1105 ../src/guestfs.pod:1109 ../src/guestfs.pod:1113 ../src/guestfs.pod:1117 ../src/guestfs.pod:1121 ../src/guestfs.pod:1603 ../src/guestfs.pod:1608 ../src/guestfs.pod:1612 ../src/guestfs.pod:1722 ../src/guestfs.pod:1727 ../src/guestfs.pod:1731 ../src/guestfs.pod:2083 ../src/guestfs.pod:2089 ../src/guestfs.pod:2094 ../src/guestfs.pod:2100 ../src/guestfs.pod:2564 ../src/guestfs.pod:2568 ../src/guestfs.pod:2572 ../src/guestfs.pod:2576 ../src/guestfs-actions.pod:15 ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:569 ../src/guestfs-actions.pod:577 ../src/guestfs-actions.pod:584 ../src/guestfs-actions.pod:591 ../src/guestfs-actions.pod:1587 ../src/guestfs-actions.pod:1591 ../src/guestfs-actions.pod:1595 ../src/guestfs-actions.pod:1599 ../src/guestfs-actions.pod:1607 ../src/guestfs-actions.pod:1611 ../src/guestfs-actions.pod:1615 ../src/guestfs-actions.pod:1625 ../src/guestfs-actions.pod:1629 ../src/guestfs-actions.pod:1633 ../src/guestfs-actions.pod:1771 ../src/guestfs-actions.pod:1775 ../src/guestfs-actions.pod:1780 ../src/guestfs-actions.pod:1785 ../src/guestfs-actions.pod:1846 ../src/guestfs-actions.pod:1850 ../src/guestfs-actions.pod:1855 ../fish/guestfish.pod:427 ../fish/guestfish.pod:431 ../fish/guestfish.pod:435 ../fish/guestfish.pod:439 ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:373 ../fish/guestfish-actions.pod:381 ../fish/guestfish-actions.pod:388 ../fish/guestfish-actions.pod:395 ../fish/guestfish-actions.pod:1065 ../fish/guestfish-actions.pod:1069 ../fish/guestfish-actions.pod:1073 ../fish/guestfish-actions.pod:1077 ../fish/guestfish-actions.pod:1085 ../fish/guestfish-actions.pod:1089 ../fish/guestfish-actions.pod:1093 ../fish/guestfish-actions.pod:1103 ../fish/guestfish-actions.pod:1107 ../fish/guestfish-actions.pod:1111 ../fish/guestfish-actions.pod:1201 ../fish/guestfish-actions.pod:1205 ../fish/guestfish-actions.pod:1210 ../fish/guestfish-actions.pod:1215 ../fish/guestfish-actions.pod:1257 ../fish/guestfish-actions.pod:1261 ../fish/guestfish-actions.pod:1266 ../tools/virt-win-reg.pl:536 ../tools/virt-win-reg.pl:542 ../tools/virt-win-reg.pl:548 ../tools/virt-resize.pl:345 ../tools/virt-resize.pl:350 ../tools/virt-resize.pl:360
815 #: ../src/guestfs.pod:390
817 "The kernel version that the command runs under will be different from what "
822 #: ../src/guestfs.pod:395
824 "If the command needs to communicate with daemons, then most likely they "
829 #: ../src/guestfs.pod:400
830 msgid "The command will be running in limited memory."
834 #: ../src/guestfs.pod:404
836 "The network may not be available unless you enable it (see "
837 "L</guestfs_set_network>)."
841 #: ../src/guestfs.pod:409
842 msgid "Only supports Linux guests (not Windows, BSD, etc)."
846 #: ../src/guestfs.pod:413
847 msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
851 #: ../src/guestfs.pod:418
853 "For SELinux guests, you may need to enable SELinux and load policy first. "
854 "See L</SELINUX> in this manpage."
858 #: ../src/guestfs.pod:423
860 "I<Security:> It is not safe to run commands from untrusted, possibly "
861 "malicious guests. These commands may attempt to exploit your program by "
862 "sending unexpected output. They could also try to exploit the Linux kernel "
863 "or qemu provided by the libguestfs appliance. They could use the network "
864 "provided by the libguestfs appliance to bypass ordinary network partitions "
865 "and firewalls. They could use the elevated privileges or different SELinux "
866 "context of your program to their advantage."
870 #: ../src/guestfs.pod:432
872 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
873 "(a script which runs when the guest next boots normally), and to have this "
874 "script run the commands you want in the normal context of the running guest, "
875 "network security and so on. For information about other security issues, "
880 #: ../src/guestfs.pod:440
882 "The two main API calls to run commands are L</guestfs_command> and "
883 "L</guestfs_sh> (there are also variations)."
887 #: ../src/guestfs.pod:443
889 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
890 "shell globs, redirections, etc will work."
894 #: ../src/guestfs.pod:446
895 msgid "CONFIGURATION FILES"
899 #: ../src/guestfs.pod:448
901 "To read and write configuration files in Linux guest filesystems, we "
902 "strongly recommend using Augeas. For example, Augeas understands how to "
903 "read and write, say, a Linux shadow password file or X.org configuration "
904 "file, and so avoids you having to write that code."
908 #: ../src/guestfs.pod:453
910 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
911 "document Augeas itself here because there is excellent documentation on the "
912 "L<http://augeas.net/> website."
916 #: ../src/guestfs.pod:457
918 "If you don't want to use Augeas (you fool!) then try calling "
919 "L</guestfs_read_lines> to get the file as a list of lines which you can "
924 #: ../src/guestfs.pod:461
929 #: ../src/guestfs.pod:463
931 "We support SELinux guests. To ensure that labeling happens correctly in "
932 "SELinux guests, you need to enable SELinux and load the guest's policy:"
936 #: ../src/guestfs.pod:469 ../src/guestfs.pod:1224 ../src/guestfs.pod:1355 ../src/guestfs.pod:2128
941 #: ../src/guestfs.pod:471
942 msgid "Before launching, do:"
946 #: ../src/guestfs.pod:473
949 " guestfs_set_selinux (g, 1);\n"
954 #: ../src/guestfs.pod:475 ../src/guestfs.pod:1228 ../src/guestfs.pod:1359 ../src/guestfs.pod:2153
959 #: ../src/guestfs.pod:477
961 "After mounting the guest's filesystem(s), load the policy. This is best "
962 "done by running the L<load_policy(8)> command in the guest itself:"
966 #: ../src/guestfs.pod:481
969 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
974 #: ../src/guestfs.pod:483
976 "(Older versions of C<load_policy> require you to specify the name of the "
981 #: ../src/guestfs.pod:486 ../src/guestfs.pod:1365
986 #: ../src/guestfs.pod:488
988 "Optionally, set the security context for the API. The correct security "
989 "context to use can only be known by inspecting the guest. As an example:"
993 #: ../src/guestfs.pod:492
996 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
1001 #: ../src/guestfs.pod:496
1002 msgid "This will work for running commands and editing existing files."
1006 #: ../src/guestfs.pod:498
1008 "When new files are created, you may need to label them explicitly, for "
1009 "example by running the external command C<restorecon pathname>."
1013 #: ../src/guestfs.pod:502
1018 #: ../src/guestfs.pod:504
1020 "Certain calls are affected by the current file mode creation mask (the "
1021 "\"umask\"). In particular ones which create files or directories, such as "
1022 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
1023 "either the default mode that the file is created with or modifies the mode "
1028 #: ../src/guestfs.pod:510
1030 "The default umask is C<022>, so files are created with modes such as C<0644> "
1031 "and directories with C<0755>."
1035 #: ../src/guestfs.pod:513
1037 "There are two ways to avoid being affected by umask. Either set umask to 0 "
1038 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
1039 "L</guestfs_chmod> after creating each file or directory."
1043 #: ../src/guestfs.pod:517
1044 msgid "For more information about umask, see L<umask(2)>."
1048 #: ../src/guestfs.pod:519 ../fish/guestfish.pod:746
1049 msgid "ENCRYPTED DISKS"
1053 #: ../src/guestfs.pod:521
1055 "Libguestfs allows you to access Linux guests which have been encrypted using "
1056 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1057 "standard. This includes nearly all whole disk encryption systems used by "
1058 "modern Linux guests."
1062 #: ../src/guestfs.pod:527
1064 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1065 "returns the string C<crypto_LUKS>)."
1069 #: ../src/guestfs.pod:530
1071 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1072 "will require the passphrase!"
1076 #: ../src/guestfs.pod:533
1078 "Opening a LUKS device creates a new device mapper device called "
1079 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
1080 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
1081 "decrypted from and encrypted to the underlying block device respectively."
1085 #: ../src/guestfs.pod:539
1087 "LVM volume groups on the device can be made visible by calling "
1088 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
1089 "volume(s) can now be mounted in the usual way."
1093 #: ../src/guestfs.pod:543
1095 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1096 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1097 "[\"/dev/VG\"])>. Then close the mapper device by calling "
1098 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1099 "underlying encrypted block device)."
1103 #: ../src/guestfs.pod:550
1108 #: ../src/guestfs.pod:552
1110 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1111 "contains operating systems, an install CD or a live CD. (These APIs used to "
1112 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
1113 "version 1.5.3 the most frequently used part of this library has been "
1114 "rewritten in C and moved into the core code)."
1118 #: ../src/guestfs.pod:559
1120 "Add all disks belonging to the unknown virtual machine and call "
1121 "L</guestfs_launch> in the usual way."
1125 #: ../src/guestfs.pod:562
1127 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1128 "and certain heuristics, and returns a list of operating systems that were "
1129 "found. An empty list means none were found. A single element is the root "
1130 "filesystem of the operating system. For dual- or multi-boot guests, "
1131 "multiple roots can be returned, each one corresponding to a separate "
1132 "operating system. (Multi-boot virtual machines are extremely rare in the "
1133 "world of virtualization, but since this scenario can happen, we have built "
1134 "libguestfs to deal with it.)"
1138 #: ../src/guestfs.pod:571
1140 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1141 "to get additional details about that operating system. For example, call "
1142 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1143 "Windows and Linux-based operating systems respectively."
1147 #: ../src/guestfs.pod:577
1149 "Un*x-like and Linux-based operating systems usually consist of several "
1150 "filesystems which are mounted at boot time (for example, a separate boot "
1151 "partition mounted on C</boot>). The inspection rules are able to detect how "
1152 "filesystems correspond to mount points. Call "
1153 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1154 "hash table like this example:"
1158 #: ../src/guestfs.pod:584
1161 " /boot => /dev/sda1\n"
1162 " / => /dev/vg_guest/lv_root\n"
1163 " /usr => /dev/vg_guest/lv_usr\n"
1168 #: ../src/guestfs.pod:588
1170 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1171 "filesystems as suggested."
1175 #: ../src/guestfs.pod:591
1177 "Be careful to mount filesystems in the right order (eg. C</> before "
1178 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
1183 #: ../src/guestfs.pod:595
1185 "Inspection currently only works for some common operating systems. "
1186 "Contributors are welcome to send patches for other operating systems that we "
1187 "currently cannot detect."
1191 #: ../src/guestfs.pod:599
1193 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1194 "for more details. The L</guestfs_inspect_os> function just ignores any "
1195 "encrypted devices."
1199 #: ../src/guestfs.pod:603
1201 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1202 "inspection and caches the results in the guest handle. Subsequent calls to "
1203 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
1204 "re-read the disks. If you change the content of the guest disks, you can "
1205 "redo inspection by calling L</guestfs_inspect_os> again. "
1206 "(L</guestfs_inspect_list_applications> works a little differently from the "
1207 "other calls and does read the disks. See documentation for that function "
1212 #: ../src/guestfs.pod:612
1213 msgid "INSPECTING INSTALL DISKS"
1217 #: ../src/guestfs.pod:614
1219 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
1224 #: ../src/guestfs.pod:617
1226 "Call L</guestfs_inspect_get_format> to return the format of the operating "
1227 "system, which currently can be C<installed> (a regular operating system) or "
1228 "C<installer> (some sort of install disk)."
1232 #: ../src/guestfs.pod:621
1234 "Further information is available about the operating system that can be "
1235 "installed using the regular inspection APIs like "
1236 "L</guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> "
1241 #: ../src/guestfs.pod:626
1243 "Some additional information specific to installer disks is also available "
1244 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and "
1245 "L</guestfs_inspect_is_multipart> calls."
1249 #: ../src/guestfs.pod:631
1250 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1254 #: ../src/guestfs.pod:633
1256 "Libguestfs can mount NTFS partitions. It does this using the "
1257 "L<http://www.ntfs-3g.org/> driver."
1261 #: ../src/guestfs.pod:636
1262 msgid "DRIVE LETTERS AND PATHS"
1266 #: ../src/guestfs.pod:638
1268 "DOS and Windows still use drive letters, and the filesystems are always "
1269 "treated as case insensitive by Windows itself, and therefore you might find "
1270 "a Windows configuration file referring to a path like "
1271 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
1272 "that directory might be referred to as C</WINDOWS/System32>."
1276 #: ../src/guestfs.pod:644
1278 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1279 "libguestfs to read the appropriate Windows Registry and configuration files, "
1280 "to determine yourself how drives are mapped (see also L<hivex(3)> and "
1281 "L<virt-inspector(1)>)."
1285 #: ../src/guestfs.pod:649
1287 "Replacing backslash characters with forward slash characters is also outside "
1288 "the scope of libguestfs, but something that you can easily do."
1292 #: ../src/guestfs.pod:652
1294 "Where we can help is in resolving the case insensitivity of paths. For "
1295 "this, call L</guestfs_case_sensitive_path>."
1299 #: ../src/guestfs.pod:655
1300 msgid "ACCESSING THE WINDOWS REGISTRY"
1304 #: ../src/guestfs.pod:657
1306 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1307 "files, through the library C<hivex> which is part of the libguestfs project "
1308 "although ships as a separate tarball. You have to locate and download the "
1309 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1310 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
1311 "L<virt-win-reg(1)> for more help on this issue."
1315 #: ../src/guestfs.pod:665
1316 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
1320 #: ../src/guestfs.pod:667
1322 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
1323 "provide something which looks like a Linux symlink. The way it tries to do "
1324 "the rewriting is described here:"
1328 #: ../src/guestfs.pod:671
1329 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-symbolic-links/>"
1333 #: ../src/guestfs.pod:673
1335 "The essential problem is that ntfs-3g simply does not have enough "
1336 "information to do a correct job. NTFS links can contain drive letters and "
1337 "references to external device GUIDs that ntfs-3g has no way of resolving. "
1338 "It is almost certainly the case that libguestfs callers should ignore what "
1339 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
1343 #: ../src/guestfs.pod:680
1345 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use "
1346 "L</guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
1347 "attribute, and read the raw reparse data from that (you can find the format "
1348 "documented in various places around the web)."
1352 #: ../src/guestfs.pod:685
1353 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
1357 #: ../src/guestfs.pod:687
1359 "There are other useful extended attributes that can be read from ntfs-3g "
1360 "filesystems (using L</guestfs_getxattr>). See:"
1364 #: ../src/guestfs.pod:690
1365 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
1369 #: ../src/guestfs.pod:692
1370 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1374 #: ../src/guestfs.pod:694
1376 "Although we don't want to discourage you from using the C API, we will "
1377 "mention here that the same API is also available in other languages."
1381 #: ../src/guestfs.pod:697
1383 "The API is broadly identical in all supported languages. This means that "
1384 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
1385 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
1386 "OCaml. In other words, a straightforward, predictable isomorphism between "
1391 #: ../src/guestfs.pod:703
1393 "Error messages are automatically transformed into exceptions if the language "
1398 #: ../src/guestfs.pod:706
1400 "We don't try to \"object orientify\" parts of the API in OO languages, "
1401 "although contributors are welcome to write higher level APIs above what we "
1402 "provide in their favourite languages if they wish."
1406 #: ../src/guestfs.pod:712
1411 #: ../src/guestfs.pod:714
1413 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1414 "identical to the C API. C++ classes and exceptions are not used."
1418 #: ../src/guestfs.pod:718
1423 #: ../src/guestfs.pod:720
1425 "The C# bindings are highly experimental. Please read the warnings at the "
1426 "top of C<csharp/Libguestfs.cs>."
1430 #: ../src/guestfs.pod:723
1435 #: ../src/guestfs.pod:725
1437 "This is the only language binding that is working but incomplete. Only "
1438 "calls which return simple integers have been bound in Haskell, and we are "
1439 "looking for help to complete this binding."
1443 #: ../src/guestfs.pod:729
1448 #: ../src/guestfs.pod:731
1450 "Full documentation is contained in the Javadoc which is distributed with "
1455 #: ../src/guestfs.pod:734
1460 #: ../src/guestfs.pod:736
1461 msgid "See L<guestfs-ocaml(3)>."
1465 #: ../src/guestfs.pod:738
1470 #: ../src/guestfs.pod:740
1471 msgid "See L<Sys::Guestfs(3)>."
1475 #: ../src/guestfs.pod:742
1480 #: ../src/guestfs.pod:744
1482 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1483 "the php-libguestfs package for your distribution."
1487 #: ../src/guestfs.pod:747
1488 msgid "The PHP binding only works correctly on 64 bit machines."
1492 #: ../src/guestfs.pod:749
1497 #: ../src/guestfs.pod:751
1498 msgid "See L<guestfs-python(3)>."
1502 #: ../src/guestfs.pod:753
1507 #: ../src/guestfs.pod:755
1508 msgid "See L<guestfs-ruby(3)>."
1512 #: ../src/guestfs.pod:757
1513 msgid "B<shell scripts>"
1517 #: ../src/guestfs.pod:759
1518 msgid "See L<guestfish(1)>."
1522 #: ../src/guestfs.pod:763
1523 msgid "LIBGUESTFS GOTCHAS"
1527 #: ../src/guestfs.pod:765
1529 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1530 "system [...] that works in the way it is documented but is counterintuitive "
1531 "and almost invites mistakes.\""
1535 #: ../src/guestfs.pod:769
1537 "Since we developed libguestfs and the associated tools, there are several "
1538 "things we would have designed differently, but are now stuck with for "
1539 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1540 "release, you can expect these to change. Beware of them."
1544 #: ../src/guestfs.pod:777
1545 msgid "Autosync / forgetting to sync."
1549 #: ../src/guestfs.pod:779
1551 "When modifying a filesystem from C or another language, you B<must> unmount "
1552 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1553 "libguestfs handle. You can also call:"
1557 #: ../src/guestfs.pod:783
1560 " guestfs_set_autosync (g, 1);\n"
1565 #: ../src/guestfs.pod:785
1567 "to have the unmount/sync done automatically for you when the handle 'g' is "
1568 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
1573 #: ../src/guestfs.pod:789
1575 "If you forget to do this, then it is entirely possible that your changes "
1576 "won't be written out, or will be partially written, or (very rarely) that "
1577 "you'll get disk corruption."
1581 #: ../src/guestfs.pod:793
1583 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1584 "guestfish scripts that forget to sync will work just fine, which can make "
1585 "this very puzzling if you are trying to debug a problem."
1589 #: ../src/guestfs.pod:797
1591 "Update: Autosync is enabled by default for all API users starting from "
1592 "libguestfs 1.5.24."
1596 #: ../src/guestfs.pod:800
1597 msgid "Mount option C<-o sync> should not be the default."
1601 #: ../src/guestfs.pod:802
1603 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1604 "However C<-o sync> does not add any reliability benefit, but does have a "
1605 "very large performance impact."
1609 #: ../src/guestfs.pod:806
1611 "The work around is to use L</guestfs_mount_options> and set the mount "
1612 "options that you actually want to use."
1616 #: ../src/guestfs.pod:809
1617 msgid "Read-only should be the default."
1621 #: ../src/guestfs.pod:811
1623 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1624 "specify I<--rw> if you want to make changes to the image."
1628 #: ../src/guestfs.pod:814
1629 msgid "This would reduce the potential to corrupt live VM images."
1633 #: ../src/guestfs.pod:816
1635 "Note that many filesystems change the disk when you just mount and unmount, "
1636 "even if you didn't perform any writes. You need to use "
1637 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
1641 #: ../src/guestfs.pod:820
1642 msgid "guestfish command line is hard to use."
1646 #: ../src/guestfs.pod:822
1648 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1649 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1650 "exist, so it fails. In earlier versions of guestfish the error message was "
1651 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1652 "we should have used C<guestfish -c command> to run commands."
1656 #: ../src/guestfs.pod:829
1657 msgid "guestfish megabyte modifiers don't work right on all commands"
1661 #: ../src/guestfs.pod:831
1663 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1664 "other modifiers). What guestfish actually does is to multiply the number "
1665 "part by the modifier part and pass the result to the C API. However this "
1666 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1667 "expecting some other unit (eg. megabytes)."
1671 #: ../src/guestfs.pod:838
1672 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1676 #: ../src/guestfs.pod:840
1679 " lvcreate LV VG 100M\n"
1684 #: ../src/guestfs.pod:842
1686 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1687 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1688 "megabytes * megabytes) logical volume. The error message you get from this "
1689 "is also a little obscure."
1693 #: ../src/guestfs.pod:847
1695 "This could be fixed in the generator by specially marking parameters and "
1696 "return values which take bytes or other units."
1700 #: ../src/guestfs.pod:850
1701 msgid "Ambiguity between devices and paths"
1705 #: ../src/guestfs.pod:852
1707 "There is a subtle ambiguity in the API between a device name "
1708 "(eg. C</dev/sdb2>) and a similar pathname. A file might just happen to be "
1709 "called C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1713 #: ../src/guestfs.pod:857
1715 "In the current API we usually resolve this ambiguity by having two separate "
1716 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1717 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1718 "detecting if the path supplied begins with C</dev/>."
1722 #: ../src/guestfs.pod:863
1724 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1725 "make paths/devices into structured names. One way to do this would be to "
1726 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1727 "aspect of grub. Another way would be to use a structured type, equivalent "
1728 "to this OCaml type:"
1732 #: ../src/guestfs.pod:869
1735 " type path = Path of string | Device of int | Partition of int * int\n"
1740 #: ../src/guestfs.pod:871
1741 msgid "which would allow you to pass arguments like:"
1745 #: ../src/guestfs.pod:873
1748 " Path \"/foo/bar\"\n"
1749 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
1750 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
1751 " Path \"/dev/sdb2\" (* not a device *)\n"
1756 #: ../src/guestfs.pod:878
1758 "As you can see there are still problems to resolve even with this "
1759 "representation. Also consider how it might work in guestfish."
1763 #: ../src/guestfs.pod:883
1764 msgid "PROTOCOL LIMITS"
1768 #: ../src/guestfs.pod:885
1770 "Internally libguestfs uses a message-based protocol to pass API calls and "
1771 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1772 "plenty more detail about this). The maximum message size used by the "
1773 "protocol is slightly less than 4 MB. For some API calls you may need to be "
1774 "aware of this limit. The API calls which may be affected are individually "
1775 "documented, with a link back to this section of the documentation."
1779 #: ../src/guestfs.pod:893
1781 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1782 "a simple string. Because this string is at some point internally encoded as "
1783 "a message, the maximum size that it can return is slightly under 4 MB. If "
1784 "the requested file is larger than this then you will get an error."
1788 #: ../src/guestfs.pod:899
1790 "In order to transfer large files into and out of the guest filesystem, you "
1791 "need to use particular calls that support this. The sections L</UPLOADING> "
1792 "and L</DOWNLOADING> document how to do this."
1796 #: ../src/guestfs.pod:903
1798 "You might also consider mounting the disk image using our FUSE filesystem "
1799 "support (L<guestmount(1)>)."
1803 #: ../src/guestfs.pod:906
1804 msgid "KEYS AND PASSPHRASES"
1808 #: ../src/guestfs.pod:908
1810 "Certain libguestfs calls take a parameter that contains sensitive key "
1811 "material, passed in as a C string."
1815 #: ../src/guestfs.pod:911
1817 "In the future we would hope to change the libguestfs implementation so that "
1818 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1819 "swap. However this is I<not> done at the moment, because of the complexity "
1820 "of such an implementation."
1824 #: ../src/guestfs.pod:916
1826 "Therefore you should be aware that any key parameter you pass to libguestfs "
1827 "might end up being written out to the swap partition. If this is a concern, "
1828 "scrub the swap partition or don't use libguestfs on encrypted devices."
1832 #: ../src/guestfs.pod:921
1833 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
1837 #: ../src/guestfs.pod:923
1839 "All high-level libguestfs actions are synchronous. If you want to use "
1840 "libguestfs asynchronously then you must create a thread."
1844 #: ../src/guestfs.pod:926
1846 "Only use the handle from a single thread. Either use the handle exclusively "
1847 "from one thread, or provide your own mutex so that two threads cannot issue "
1848 "calls on the same handle at the same time."
1852 #: ../src/guestfs.pod:930
1854 "See the graphical program guestfs-browser for one possible architecture for "
1855 "multithreaded programs using libvirt and libguestfs."
1859 #: ../src/guestfs.pod:933
1864 #: ../src/guestfs.pod:935
1866 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
1871 #: ../src/guestfs.pod:938
1873 "By default it looks for these in the directory C<$libdir/guestfs> "
1874 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
1878 #: ../src/guestfs.pod:941
1880 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
1881 "to change the directories that libguestfs will search in. The value is a "
1882 "colon-separated list of paths. The current directory is I<not> searched "
1883 "unless the path contains an empty element or C<.>. For example "
1884 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
1885 "then C</usr/lib/guestfs>."
1889 #: ../src/guestfs.pod:948
1890 msgid "QEMU WRAPPERS"
1894 #: ../src/guestfs.pod:950
1896 "If you want to compile your own qemu, run qemu from a non-standard location, "
1897 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
1902 #: ../src/guestfs.pod:954
1904 "There is one important rule to remember: you I<must C<exec qemu>> as the "
1905 "last command in the shell script (so that qemu replaces the shell and "
1906 "becomes the direct child of the libguestfs-using program). If you don't do "
1907 "this, then the qemu process won't be cleaned up correctly."
1911 #: ../src/guestfs.pod:959
1913 "Here is an example of a wrapper, where I have built my own copy of qemu from "
1918 #: ../src/guestfs.pod:962
1922 " qemudir=/home/rjones/d/qemu\n"
1923 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
1929 #: ../src/guestfs.pod:966
1931 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
1932 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
1937 #: ../src/guestfs.pod:970
1940 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
1945 #: ../src/guestfs.pod:972
1947 "Note that libguestfs also calls qemu with the -help and -version options in "
1948 "order to determine features."
1952 #: ../src/guestfs.pod:975
1953 msgid "ABI GUARANTEE"
1957 #: ../src/guestfs.pod:977
1959 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
1960 "actions as outlined in this section. Although we will deprecate some "
1961 "actions, for example if they get replaced by newer calls, we will keep the "
1962 "old actions forever. This allows you the developer to program in confidence "
1963 "against the libguestfs API."
1967 #: ../src/guestfs.pod:983
1968 msgid "BLOCK DEVICE NAMING"
1972 #: ../src/guestfs.pod:985
1974 "In the kernel there is now quite a profusion of schemata for naming block "
1975 "devices (in this context, by I<block device> I mean a physical or virtual "
1976 "hard drive). The original Linux IDE driver used names starting with "
1977 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
1978 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
1979 "replacement for the old IDE driver (particularly for SATA devices) those "
1980 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
1981 "machines with paravirtualized drivers. This has created several different "
1982 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
1987 #: ../src/guestfs.pod:997
1989 "As discussed above, libguestfs uses a qemu appliance running an embedded "
1990 "Linux kernel to access block devices. We can run a variety of appliances "
1991 "based on a variety of Linux kernels."
1995 #: ../src/guestfs.pod:1001
1997 "This causes a problem for libguestfs because many API calls use device or "
1998 "partition names. Working scripts and the recipe (example) scripts that we "
1999 "make available over the internet could fail if the naming scheme changes."
2003 #: ../src/guestfs.pod:1006
2005 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2006 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2007 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2008 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2012 #: ../src/guestfs.pod:1012
2014 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2015 "L</guestfs_list_partitions> and similar calls return the true names of the "
2016 "devices and partitions as known to the appliance."
2020 #: ../src/guestfs.pod:1017
2021 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2025 #: ../src/guestfs.pod:1019
2027 "Usually this translation is transparent. However in some (very rare) cases "
2028 "you may need to know the exact algorithm. Such cases include where you use "
2029 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
2030 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
2035 #: ../src/guestfs.pod:1025
2037 "The algorithm is applied only to I<parameters> which are known to be either "
2038 "device or partition names. Return values from functions such as "
2039 "L</guestfs_list_devices> are never changed."
2043 #: ../src/guestfs.pod:1033
2044 msgid "Is the string a parameter which is a device or partition name?"
2048 #: ../src/guestfs.pod:1037
2049 msgid "Does the string begin with C</dev/sd>?"
2053 #: ../src/guestfs.pod:1041
2055 "Does the named device exist? If so, we use that device. However if I<not> "
2056 "then we continue with this algorithm."
2060 #: ../src/guestfs.pod:1046
2061 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2065 #: ../src/guestfs.pod:1048
2066 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2070 #: ../src/guestfs.pod:1050
2071 msgid "If that named device exists, use it. If not, continue."
2075 #: ../src/guestfs.pod:1054
2076 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2080 #: ../src/guestfs.pod:1056
2081 msgid "If that named device exists, use it. If not, return an error."
2085 #: ../src/guestfs.pod:1060
2086 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
2090 #: ../src/guestfs.pod:1062
2092 "Although the standard naming scheme and automatic translation is useful for "
2093 "simple programs and guestfish scripts, for larger programs it is best not to "
2094 "rely on this mechanism."
2098 #: ../src/guestfs.pod:1066
2100 "Where possible for maximum future portability programs using libguestfs "
2101 "should use these future-proof techniques:"
2105 #: ../src/guestfs.pod:1073
2107 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2108 "device names, and then use those names directly."
2112 #: ../src/guestfs.pod:1076
2113 msgid "Since those device names exist by definition, they will never be translated."
2117 #: ../src/guestfs.pod:1081
2119 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2120 "filesystem labels."
2124 #: ../src/guestfs.pod:1086
2129 #: ../src/guestfs.pod:1088
2131 "This section discusses security implications of using libguestfs, "
2132 "particularly with untrusted or malicious guests or disk images."
2136 #: ../src/guestfs.pod:1091
2137 msgid "GENERAL SECURITY CONSIDERATIONS"
2141 #: ../src/guestfs.pod:1093
2143 "Be careful with any files or data that you download from a guest (by "
2144 "\"download\" we mean not just the L</guestfs_download> command but any "
2145 "command that reads files, filenames, directories or anything else from a "
2146 "disk image). An attacker could manipulate the data to fool your program "
2147 "into doing the wrong thing. Consider cases such as:"
2151 #: ../src/guestfs.pod:1103
2152 msgid "the data (file etc) not being present"
2156 #: ../src/guestfs.pod:1107
2157 msgid "being present but empty"
2161 #: ../src/guestfs.pod:1111
2162 msgid "being much larger than normal"
2166 #: ../src/guestfs.pod:1115
2167 msgid "containing arbitrary 8 bit data"
2171 #: ../src/guestfs.pod:1119
2172 msgid "being in an unexpected character encoding"
2176 #: ../src/guestfs.pod:1123
2177 msgid "containing homoglyphs."
2181 #: ../src/guestfs.pod:1127
2182 msgid "SECURITY OF MOUNTING FILESYSTEMS"
2186 #: ../src/guestfs.pod:1129
2188 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
2189 "(VFS) module can sometimes be escalated into exploits by deliberately "
2190 "creating a malicious, malformed filesystem. These exploits are very severe "
2191 "for two reasons. Firstly there are very many filesystem drivers in the "
2192 "kernel, and many of them are infrequently used and not much developer "
2193 "attention has been paid to the code. Linux userspace helps potential "
2194 "crackers by detecting the filesystem type and automatically choosing the "
2195 "right VFS driver, even if that filesystem type is obscure or unexpected for "
2196 "the administrator. Secondly, a kernel-level exploit is like a local root "
2197 "exploit (worse in some ways), giving immediate and total access to the "
2198 "system right down to the hardware level."
2202 #: ../src/guestfs.pod:1142
2204 "That explains why you should never mount a filesystem from an untrusted "
2205 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
2206 "inside a qemu virtual machine, usually running as a non-root user. The "
2207 "attacker would need to write a filesystem which first exploited the kernel, "
2208 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
2209 "the libguestfs protocol, and finally to be as serious as the host kernel "
2210 "exploit it would need to escalate its privileges to root. This multi-step "
2211 "escalation, performed by a static piece of data, is thought to be extremely "
2212 "hard to do, although we never say 'never' about security issues."
2216 #: ../src/guestfs.pod:1153
2218 "In any case callers can reduce the attack surface by forcing the filesystem "
2219 "type when mounting (use L</guestfs_mount_vfs>)."
2223 #: ../src/guestfs.pod:1156
2224 msgid "PROTOCOL SECURITY"
2228 #: ../src/guestfs.pod:1158
2230 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
2231 "defined upper message size. However a program that uses libguestfs must "
2232 "also take care - for example you can write a program that downloads a binary "
2233 "from a disk image and executes it locally, and no amount of protocol "
2234 "security will save you from the consequences."
2238 #: ../src/guestfs.pod:1164
2239 msgid "INSPECTION SECURITY"
2243 #: ../src/guestfs.pod:1166
2245 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
2246 "directly from the guest, and these could contain any 8 bit data. Callers "
2247 "should be careful to escape these before printing them to a structured file "
2248 "(for example, use HTML escaping if creating a web page)."
2252 #: ../src/guestfs.pod:1172
2254 "Guest configuration may be altered in unusual ways by the administrator of "
2255 "the virtual machine, and may not reflect reality (particularly for untrusted "
2256 "or actively malicious guests). For example we parse the hostname from "
2257 "configuration files like C</etc/sysconfig/network> that we find in the "
2258 "guest, but the guest administrator can easily manipulate these files to "
2259 "provide the wrong hostname."
2263 #: ../src/guestfs.pod:1180
2265 "The inspection API parses guest configuration using two external libraries: "
2266 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
2267 "designed to be robust in the face of malicious data, although denial of "
2268 "service attacks are still possible, for example with oversized configuration "
2273 #: ../src/guestfs.pod:1186
2274 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
2278 #: ../src/guestfs.pod:1188
2280 "Be very cautious about running commands from the guest. By running a "
2281 "command in the guest, you are giving CPU time to a binary that you do not "
2282 "control, under the same user account as the library, albeit wrapped in qemu "
2283 "virtualization. More information and alternatives can be found in the "
2284 "section L</RUNNING COMMANDS>."
2288 #: ../src/guestfs.pod:1194
2289 msgid "CVE-2010-3851"
2293 #: ../src/guestfs.pod:1196
2294 msgid "https://bugzilla.redhat.com/642934"
2298 #: ../src/guestfs.pod:1198
2300 "This security bug concerns the automatic disk format detection that qemu "
2301 "does on disk images."
2305 #: ../src/guestfs.pod:1201
2307 "A raw disk image is just the raw bytes, there is no header. Other disk "
2308 "images like qcow2 contain a special header. Qemu deals with this by looking "
2309 "for one of the known headers, and if none is found then assuming the disk "
2310 "image must be raw."
2314 #: ../src/guestfs.pod:1206
2316 "This allows a guest which has been given a raw disk image to write some "
2317 "other header. At next boot (or when the disk image is accessed by "
2318 "libguestfs) qemu would do autodetection and think the disk image format was, "
2319 "say, qcow2 based on the header written by the guest."
2323 #: ../src/guestfs.pod:1211
2325 "This in itself would not be a problem, but qcow2 offers many features, one "
2326 "of which is to allow a disk image to refer to another image (called the "
2327 "\"backing disk\"). It does this by placing the path to the backing disk "
2328 "into the qcow2 header. This path is not validated and could point to any "
2329 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
2330 "\"holes\" in the qcow2 disk image, which of course is completely under the "
2331 "control of the attacker."
2335 #: ../src/guestfs.pod:1219
2336 msgid "In libguestfs this is rather hard to exploit except under two circumstances:"
2340 #: ../src/guestfs.pod:1226
2341 msgid "You have enabled the network or have opened the disk in write mode."
2345 #: ../src/guestfs.pod:1230
2347 "You are also running untrusted code from the guest (see L</RUNNING "
2352 #: ../src/guestfs.pod:1235
2354 "The way to avoid this is to specify the expected disk format when adding "
2355 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
2356 "should always do this if the disk is raw format, and it's a good idea for "
2361 #: ../src/guestfs.pod:1240
2363 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
2364 "format is fetched from libvirt and passed through."
2368 #: ../src/guestfs.pod:1243
2370 "For libguestfs tools, use the I<--format> command line parameter as "
2375 #: ../src/guestfs.pod:1246
2376 msgid "CONNECTION MANAGEMENT"
2380 #: ../src/guestfs.pod:1248
2385 #: ../src/guestfs.pod:1250
2387 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
2388 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
2389 "handle and release all resources used."
2393 #: ../src/guestfs.pod:1254
2395 "For information on using multiple handles and threads, see the section "
2396 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> below."
2400 #: ../src/guestfs.pod:1257
2401 msgid "guestfs_create"
2405 #: ../src/guestfs.pod:1259
2408 " guestfs_h *guestfs_create (void);\n"
2413 #: ../src/guestfs.pod:1261
2414 msgid "Create a connection handle."
2418 #: ../src/guestfs.pod:1263
2420 "You have to call L</guestfs_add_drive_opts> (or one of the equivalent calls) "
2421 "on the handle at least once."
2425 #: ../src/guestfs.pod:1266
2427 "This function returns a non-NULL pointer to a handle on success or NULL on "
2432 #: ../src/guestfs.pod:1269
2433 msgid "After configuring the handle, you have to call L</guestfs_launch>."
2437 #: ../src/guestfs.pod:1271
2439 "You may also want to configure error handling for the handle. See L</ERROR "
2440 "HANDLING> section below."
2444 #: ../src/guestfs.pod:1274
2445 msgid "guestfs_close"
2449 #: ../src/guestfs.pod:1276
2452 " void guestfs_close (guestfs_h *g);\n"
2457 #: ../src/guestfs.pod:1278
2458 msgid "This closes the connection handle and frees up all resources used."
2462 #: ../src/guestfs.pod:1280
2463 msgid "ERROR HANDLING"
2467 #: ../src/guestfs.pod:1282
2469 "API functions can return errors. For example, almost all functions that "
2470 "return C<int> will return C<-1> to indicate an error."
2474 #: ../src/guestfs.pod:1285
2476 "Additional information is available for errors: an error message string and "
2477 "optionally an error number (errno) if the thing that failed was a system "
2482 #: ../src/guestfs.pod:1289
2484 "You can get at the additional information about the last error on the handle "
2485 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
2486 "up an error handler with L</guestfs_set_error_handler>."
2490 #: ../src/guestfs.pod:1294
2492 "When the handle is created, a default error handler is installed which "
2493 "prints the error message string to C<stderr>. For small short-running "
2494 "command line programs it is sufficient to do:"
2498 #: ../src/guestfs.pod:1298
2501 " if (guestfs_launch (g) == -1)\n"
2502 " exit (EXIT_FAILURE);\n"
2507 #: ../src/guestfs.pod:1301
2509 "since the default error handler will ensure that an error message has been "
2510 "printed to C<stderr> before the program exits."
2514 #: ../src/guestfs.pod:1304
2516 "For other programs the caller will almost certainly want to install an "
2517 "alternate error handler or do error handling in-line like this:"
2521 #: ../src/guestfs.pod:1307
2524 " g = guestfs_create ();\n"
2529 #: ../src/guestfs.pod:1309
2532 " /* This disables the default behaviour of printing errors\n"
2534 " guestfs_set_error_handler (g, NULL, NULL);\n"
2539 #: ../src/guestfs.pod:1313
2542 " if (guestfs_launch (g) == -1) {\n"
2543 " /* Examine the error message and print it etc. */\n"
2544 " char *msg = guestfs_last_error (g);\n"
2545 " int errnum = guestfs_last_errno (g);\n"
2546 " fprintf (stderr, \"%s\\n\", msg);\n"
2553 #: ../src/guestfs.pod:1321
2555 "Out of memory errors are handled differently. The default action is to call "
2556 "L<abort(3)>. If this is undesirable, then you can set a handler using "
2557 "L</guestfs_set_out_of_memory_handler>."
2561 #: ../src/guestfs.pod:1325
2563 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
2564 "because there is no handle if this happens there is no way to get additional "
2565 "error information. However L</guestfs_create> is supposed to be a "
2566 "lightweight operation which can only fail because of insufficient memory (it "
2567 "returns NULL in this case)."
2571 #: ../src/guestfs.pod:1331
2572 msgid "guestfs_last_error"
2576 #: ../src/guestfs.pod:1333
2579 " const char *guestfs_last_error (guestfs_h *g);\n"
2584 #: ../src/guestfs.pod:1335
2586 "This returns the last error message that happened on C<g>. If there has not "
2587 "been an error since the handle was created, then this returns C<NULL>."
2591 #: ../src/guestfs.pod:1339
2593 "The lifetime of the returned string is until the next error occurs, or "
2594 "L</guestfs_close> is called."
2598 #: ../src/guestfs.pod:1342
2599 msgid "guestfs_last_errno"
2603 #: ../src/guestfs.pod:1344
2606 " int guestfs_last_errno (guestfs_h *g);\n"
2611 #: ../src/guestfs.pod:1346
2612 msgid "This returns the last error number (errno) that happened on C<g>."
2616 #: ../src/guestfs.pod:1348
2617 msgid "If successful, an errno integer not equal to zero is returned."
2621 #: ../src/guestfs.pod:1350
2622 msgid "If no error, this returns 0. This call can return 0 in three situations:"
2626 #: ../src/guestfs.pod:1357
2627 msgid "There has not been any error on the handle."
2631 #: ../src/guestfs.pod:1361
2633 "There has been an error but the errno was meaningless. This corresponds to "
2634 "the case where the error did not come from a failed system call, but for "
2635 "some other reason."
2639 #: ../src/guestfs.pod:1367
2641 "There was an error from a failed system call, but for some reason the errno "
2642 "was not captured and returned. This usually indicates a bug in libguestfs."
2646 #: ../src/guestfs.pod:1373
2648 "Libguestfs tries to convert the errno from inside the applicance into a "
2649 "corresponding errno for the caller (not entirely trivial: the appliance "
2650 "might be running a completely different operating system from the library "
2651 "and error numbers are not standardized across Un*xen). If this could not be "
2652 "done, then the error is translated to C<EINVAL>. In practice this should "
2653 "only happen in very rare circumstances."
2657 #: ../src/guestfs.pod:1381
2658 msgid "guestfs_set_error_handler"
2662 #: ../src/guestfs.pod:1383
2665 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
2667 " const char *msg);\n"
2668 " void guestfs_set_error_handler (guestfs_h *g,\n"
2669 " guestfs_error_handler_cb cb,\n"
2675 #: ../src/guestfs.pod:1390
2677 "The callback C<cb> will be called if there is an error. The parameters "
2678 "passed to the callback are an opaque data pointer and the error message "
2683 #: ../src/guestfs.pod:1394
2685 "C<errno> is not passed to the callback. To get that the callback must call "
2686 "L</guestfs_last_errno>."
2690 #: ../src/guestfs.pod:1397
2692 "Note that the message string C<msg> is freed as soon as the callback "
2693 "function returns, so if you want to stash it somewhere you must make your "
2698 #: ../src/guestfs.pod:1401
2699 msgid "The default handler prints messages on C<stderr>."
2703 #: ../src/guestfs.pod:1403
2704 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
2708 #: ../src/guestfs.pod:1405
2709 msgid "guestfs_get_error_handler"
2713 #: ../src/guestfs.pod:1407
2716 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
2717 " void **opaque_rtn);\n"
2722 #: ../src/guestfs.pod:1410
2723 msgid "Returns the current error handler callback."
2727 #: ../src/guestfs.pod:1412
2728 msgid "guestfs_set_out_of_memory_handler"
2732 #: ../src/guestfs.pod:1414
2735 " typedef void (*guestfs_abort_cb) (void);\n"
2736 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
2737 " guestfs_abort_cb);\n"
2742 #: ../src/guestfs.pod:1418
2744 "The callback C<cb> will be called if there is an out of memory situation. "
2745 "I<Note this callback must not return>."
2749 #: ../src/guestfs.pod:1421
2750 msgid "The default is to call L<abort(3)>."
2754 #: ../src/guestfs.pod:1423
2755 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
2759 #: ../src/guestfs.pod:1426
2760 msgid "guestfs_get_out_of_memory_handler"
2764 #: ../src/guestfs.pod:1428
2767 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
2772 #: ../src/guestfs.pod:1430
2773 msgid "This returns the current out of memory handler."
2777 #: ../src/guestfs.pod:1432
2782 #: ../src/guestfs.pod:1434 ../fish/guestfish.pod:984
2787 #: ../src/guestfs.pod:1436
2792 #: ../src/guestfs.pod:1438
2797 #: ../src/guestfs.pod:1440
2798 msgid "AVAILABILITY"
2802 #: ../src/guestfs.pod:1442
2803 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
2807 #: ../src/guestfs.pod:1444
2809 "Using L</guestfs_available> you can test availability of the following "
2810 "groups of functions. This test queries the appliance to see if the "
2811 "appliance you are currently using supports the functionality."
2815 #: ../src/guestfs.pod:1449
2816 msgid "@AVAILABILITY@"
2820 #: ../src/guestfs.pod:1451
2821 msgid "GUESTFISH supported COMMAND"
2825 #: ../src/guestfs.pod:1453
2827 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
2828 "prints out the available groups and whether they are supported by this build "
2829 "of libguestfs. Note however that you have to do C<run> first."
2833 #: ../src/guestfs.pod:1458
2834 msgid "SINGLE CALLS AT COMPILE TIME"
2838 #: ../src/guestfs.pod:1460
2840 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
2841 "function, such as:"
2845 #: ../src/guestfs.pod:1463
2848 " #define LIBGUESTFS_HAVE_DD 1\n"
2853 #: ../src/guestfs.pod:1465
2854 msgid "if L</guestfs_dd> is available."
2858 #: ../src/guestfs.pod:1467
2860 "Before version 1.5.8, if you needed to test whether a single libguestfs "
2861 "function is available at compile time, we recommended using build tools such "
2862 "as autoconf or cmake. For example in autotools you could use:"
2866 #: ../src/guestfs.pod:1472
2869 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
2870 " AC_CHECK_FUNCS([guestfs_dd])\n"
2875 #: ../src/guestfs.pod:1475
2877 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
2882 #: ../src/guestfs.pod:1478
2883 msgid "SINGLE CALLS AT RUN TIME"
2887 #: ../src/guestfs.pod:1480
2889 "Testing at compile time doesn't guarantee that a function really exists in "
2890 "the library. The reason is that you might be dynamically linked against a "
2891 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
2892 "This situation unfortunately results in a segmentation fault, which is a "
2893 "shortcoming of the C dynamic linking system itself."
2897 #: ../src/guestfs.pod:1487
2899 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2900 "in this example program (note that you still need the compile time check as "
2905 #: ../src/guestfs.pod:1491
2908 " #include <stdio.h>\n"
2909 " #include <stdlib.h>\n"
2910 " #include <unistd.h>\n"
2911 " #include <dlfcn.h>\n"
2912 " #include <guestfs.h>\n"
2917 #: ../src/guestfs.pod:1497
2922 " #ifdef LIBGUESTFS_HAVE_DD\n"
2924 " int has_function;\n"
2929 #: ../src/guestfs.pod:1503
2932 " /* Test if the function guestfs_dd is really available. */\n"
2933 " dl = dlopen (NULL, RTLD_LAZY);\n"
2935 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2936 " exit (EXIT_FAILURE);\n"
2938 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2944 #: ../src/guestfs.pod:1512
2947 " if (!has_function)\n"
2948 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2950 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2951 " /* Now it's safe to call\n"
2952 " guestfs_dd (g, \"foo\", \"bar\");\n"
2956 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2963 #: ../src/guestfs.pod:1525
2965 "You may think the above is an awful lot of hassle, and it is. There are "
2966 "other ways outside of the C linking system to ensure that this kind of "
2967 "incompatibility never arises, such as using package versioning:"
2971 #: ../src/guestfs.pod:1530
2974 " Requires: libguestfs >= 1.0.80\n"
2979 #: ../src/guestfs.pod:1532
2980 msgid "CALLS WITH OPTIONAL ARGUMENTS"
2984 #: ../src/guestfs.pod:1534
2986 "A recent feature of the API is the introduction of calls which take optional "
2987 "arguments. In C these are declared 3 ways. The main way is as a call which "
2988 "takes variable arguments (ie. C<...>), as in this example:"
2992 #: ../src/guestfs.pod:1539
2995 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
3000 #: ../src/guestfs.pod:1541
3002 "Call this with a list of optional arguments, terminated by C<-1>. So to "
3003 "call with no optional arguments specified:"
3007 #: ../src/guestfs.pod:1544
3010 " guestfs_add_drive_opts (g, filename, -1);\n"
3015 #: ../src/guestfs.pod:1546
3016 msgid "With a single optional argument:"
3020 #: ../src/guestfs.pod:1548
3023 " guestfs_add_drive_opts (g, filename,\n"
3024 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3030 #: ../src/guestfs.pod:1552
3035 #: ../src/guestfs.pod:1554
3038 " guestfs_add_drive_opts (g, filename,\n"
3039 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3040 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
3046 #: ../src/guestfs.pod:1559
3048 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
3053 #: ../src/guestfs.pod:1562
3054 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
3058 #: ../src/guestfs.pod:1564
3060 "The second variant has the same name with the suffix C<_va>, which works the "
3061 "same way but takes a C<va_list>. See the C manual for details. For the "
3062 "example function, this is declared:"
3066 #: ../src/guestfs.pod:1568
3069 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
3075 #: ../src/guestfs.pod:1571
3076 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
3080 #: ../src/guestfs.pod:1573
3082 "The third variant is useful where you need to construct these calls. You "
3083 "pass in a structure where you fill in the optional fields. The structure "
3084 "has a bitmask as the first element which you must set to indicate which "
3085 "fields you have filled in. For our example function the structure and call "
3090 #: ../src/guestfs.pod:1579
3093 " struct guestfs_add_drive_opts_argv {\n"
3094 " uint64_t bitmask;\n"
3096 " const char *format;\n"
3099 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
3100 " const struct guestfs_add_drive_opts_argv *optargs);\n"
3105 #: ../src/guestfs.pod:1588
3106 msgid "You could call it like this:"
3110 #: ../src/guestfs.pod:1590
3113 " struct guestfs_add_drive_opts_argv optargs = {\n"
3114 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
3115 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
3117 " .format = \"qcow2\"\n"
3123 #: ../src/guestfs.pod:1597
3126 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
3131 #: ../src/guestfs.pod:1599 ../src/guestfs-actions.pod:11 ../src/guestfs-actions.pod:1842 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1253 ../tools/virt-win-reg.pl:532
3136 #: ../src/guestfs.pod:1605
3137 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
3141 #: ../src/guestfs.pod:1610
3142 msgid "You do not need to fill in all fields of the structure."
3146 #: ../src/guestfs.pod:1614
3148 "There must be a one-to-one correspondence between fields of the structure "
3149 "that are filled in, and bits set in the bitmask."
3153 #: ../src/guestfs.pod:1619
3154 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
3158 #: ../src/guestfs.pod:1621
3160 "In other languages, optional arguments are expressed in the way that is "
3161 "natural for that language. We refer you to the language-specific "
3162 "documentation for more details on that."
3166 #: ../src/guestfs.pod:1625
3167 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
3171 #: ../src/guestfs.pod:1627
3172 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
3176 #: ../src/guestfs.pod:1629
3178 "The child process generates events in some situations. Current events "
3179 "include: receiving a log message, the child process exits."
3183 #: ../src/guestfs.pod:1632
3185 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
3190 #: ../src/guestfs.pod:1635
3192 "Only I<one callback of each type> can be registered for each handle. "
3193 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
3194 "that type. Cancel all callbacks of this type by calling this function with "
3195 "C<cb> set to C<NULL>."
3199 #: ../src/guestfs.pod:1640
3200 msgid "guestfs_set_log_message_callback"
3204 #: ../src/guestfs.pod:1642
3207 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
3208 " char *buf, int len);\n"
3209 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
3210 " guestfs_log_message_cb cb,\n"
3216 #: ../src/guestfs.pod:1648
3218 "The callback function C<cb> will be called whenever qemu or the guest writes "
3219 "anything to the console."
3223 #: ../src/guestfs.pod:1651
3224 msgid "Use this function to capture kernel messages and similar."
3228 #: ../src/guestfs.pod:1653
3230 "Normally there is no log message handler, and log messages are just "
3235 #: ../src/guestfs.pod:1656
3236 msgid "guestfs_set_subprocess_quit_callback"
3240 #: ../src/guestfs.pod:1658
3243 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
3244 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
3245 " guestfs_subprocess_quit_cb cb,\n"
3251 #: ../src/guestfs.pod:1663
3253 "The callback function C<cb> will be called when the child process quits, "
3254 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
3255 "corresponds to a transition from any state to the CONFIG state)."
3259 #: ../src/guestfs.pod:1668
3260 msgid "guestfs_set_launch_done_callback"
3264 #: ../src/guestfs.pod:1670
3267 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
3268 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
3269 " guestfs_launch_done_cb cb,\n"
3275 #: ../src/guestfs.pod:1675
3277 "The callback function C<cb> will be called when the child process becomes "
3278 "ready first time after it has been launched. (This corresponds to a "
3279 "transition from LAUNCHING to the READY state)."
3283 #: ../src/guestfs.pod:1679
3284 msgid "guestfs_set_close_callback"
3288 #: ../src/guestfs.pod:1681
3291 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
3292 " void guestfs_set_close_callback (guestfs_h *g,\n"
3293 " guestfs_close_cb cb,\n"
3299 #: ../src/guestfs.pod:1686
3301 "The callback function C<cb> will be called while the handle is being closed "
3302 "(synchronously from L</guestfs_close>)."
3306 #: ../src/guestfs.pod:1689
3308 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
3309 "handles that are open when the program exits. This means that this callback "
3310 "might be called indirectly from L<exit(3)>, which can cause unexpected "
3311 "problems in higher-level languages (eg. if your HLL interpreter has already "
3312 "been cleaned up by the time this is called, and if your callback then jumps "
3313 "into some HLL function)."
3317 #: ../src/guestfs.pod:1697
3318 msgid "guestfs_set_progress_callback"
3322 #: ../src/guestfs.pod:1699
3325 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
3326 " int proc_nr, int serial,\n"
3327 " uint64_t position, uint64_t total);\n"
3328 " void guestfs_set_progress_callback (guestfs_h *g,\n"
3329 " guestfs_progress_cb cb,\n"
3335 #: ../src/guestfs.pod:1706
3337 "Some long-running operations can generate progress messages. If this "
3338 "callback is registered, then it will be called each time a progress message "
3339 "is generated (usually two seconds after the operation started, and three "
3340 "times per second thereafter until it completes, although the frequency may "
3341 "change in future versions)."
3345 #: ../src/guestfs.pod:1712
3347 "The callback receives two numbers: C<position> and C<total>. The units of "
3348 "C<total> are not defined, although for some operations C<total> may relate "
3349 "in some way to the amount of data to be transferred (eg. in bytes or "
3350 "megabytes), and C<position> may be the portion which has been transferred."
3354 #: ../src/guestfs.pod:1718
3355 msgid "The only defined and stable parts of the API are:"
3359 #: ../src/guestfs.pod:1724
3361 "The callback can display to the user some type of progress bar or indicator "
3362 "which shows the ratio of C<position>:C<total>."
3366 #: ../src/guestfs.pod:1729
3367 msgid "0 E<lt>= C<position> E<lt>= C<total>"
3371 #: ../src/guestfs.pod:1733
3373 "If any progress notification is sent during a call, then a final progress "
3374 "notification is always sent when C<position> = C<total>."
3378 #: ../src/guestfs.pod:1736
3380 "This is to simplify caller code, so callers can easily set the progress "
3381 "indicator to \"100%\" at the end of the operation, without requiring special "
3382 "code to detect this case."
3386 #: ../src/guestfs.pod:1742
3388 "The callback also receives the procedure number and serial number of the "
3389 "call. These are only useful for debugging protocol issues, and the callback "
3390 "can normally ignore them. The callback may want to print these numbers in "
3391 "error messages or debugging messages."
3395 #: ../src/guestfs.pod:1747
3396 msgid "PRIVATE DATA AREA"
3400 #: ../src/guestfs.pod:1749
3402 "You can attach named pieces of private data to the libguestfs handle, and "
3403 "fetch them by name for the lifetime of the handle. This is called the "
3404 "private data area and is only available from the C API."
3408 #: ../src/guestfs.pod:1753
3409 msgid "To attach a named piece of data, use the following call:"
3413 #: ../src/guestfs.pod:1755
3416 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
3421 #: ../src/guestfs.pod:1757
3423 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
3424 "pointer (which can be C<NULL>). Any previous item with the same name is "
3429 #: ../src/guestfs.pod:1761
3431 "You can use any C<key> you want, but names beginning with an underscore "
3432 "character are reserved for internal libguestfs purposes (for implementing "
3433 "language bindings). It is recommended to prefix the name with some unique "
3434 "string to avoid collisions with other users."
3438 #: ../src/guestfs.pod:1766
3439 msgid "To retrieve the pointer, use:"
3443 #: ../src/guestfs.pod:1768
3446 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
3451 #: ../src/guestfs.pod:1770
3453 "This function returns C<NULL> if either no data is found associated with "
3454 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
3459 #: ../src/guestfs.pod:1774
3461 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
3462 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
3463 "all. In particular, libguestfs does I<not> try to free the data when the "
3464 "handle is closed. If the data must be freed, then the caller must either "
3465 "free it before calling L</guestfs_close> or must set up a close callback to "
3466 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
3467 "can be registered for a handle)."
3471 #: ../src/guestfs.pod:1782
3473 "The private data area is implemented using a hash table, and should be "
3474 "reasonably efficient for moderate numbers of keys."
3478 #: ../src/guestfs.pod:1785 ../src/guestfs.pod:1790
3483 #: ../src/guestfs.pod:1787
3485 "<!-- old anchor for the next section --> <a "
3486 "name=\"state_machine_and_low_level_event_api\"/>"
3490 #: ../src/guestfs.pod:1792
3491 msgid "ARCHITECTURE"
3495 #: ../src/guestfs.pod:1794
3497 "Internally, libguestfs is implemented by running an appliance (a special "
3498 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
3499 "process of the main program."
3503 #: ../src/guestfs.pod:1798
3506 " ___________________\n"
3508 " | main program |\n"
3510 " | | child process / appliance\n"
3511 " | | __________________________\n"
3513 " +-------------------+ RPC | +-----------------+ |\n"
3514 " | libguestfs <--------------------> guestfsd | |\n"
3515 " | | | +-----------------+ |\n"
3516 " \\___________________/ | | Linux kernel | |\n"
3517 " | +--^--------------+ |\n"
3518 " \\_________|________________/\n"
3524 " \\______________/\n"
3529 #: ../src/guestfs.pod:1818
3531 "The library, linked to the main program, creates the child process and hence "
3532 "the appliance in the L</guestfs_launch> function."
3536 #: ../src/guestfs.pod:1821
3538 "Inside the appliance is a Linux kernel and a complete stack of userspace "
3539 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
3540 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
3541 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
3542 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
3543 "attached to the qemu process which translates device access by the "
3544 "appliance's Linux kernel into accesses to the image."
3548 #: ../src/guestfs.pod:1830
3550 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
3551 "Although the disk image you are attached to might also be used by some "
3552 "virtual machine, libguestfs doesn't know or care about this. (But you will "
3553 "care if both libguestfs's qemu process and your virtual machine are trying "
3554 "to update the disk image at the same time, since these usually results in "
3555 "massive disk corruption)."
3559 #: ../src/guestfs.pod:1837
3560 msgid "STATE MACHINE"
3564 #: ../src/guestfs.pod:1839
3565 msgid "libguestfs uses a state machine to model the child process:"
3569 #: ../src/guestfs.pod:1841
3581 " / | \\ \\ guestfs_launch\n"
3582 " / | _\\__V______\n"
3584 " / | | LAUNCHING |\n"
3585 " / | \\___________/\n"
3587 " / | guestfs_launch\n"
3589 " ______ / __|____V\n"
3590 " / \\ ------> / \\\n"
3591 " | BUSY | | READY |\n"
3592 " \\______/ <------ \\________/\n"
3597 #: ../src/guestfs.pod:1863
3599 "The normal transitions are (1) CONFIG (when the handle is created, but there "
3600 "is no child process), (2) LAUNCHING (when the child process is booting up), "
3601 "(3) alternating between READY and BUSY as commands are issued to, and "
3602 "carried out by, the child process."
3606 #: ../src/guestfs.pod:1868
3608 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
3609 "asynchronously at any time (eg. due to some internal error), and that causes "
3610 "the state to transition back to CONFIG."
3614 #: ../src/guestfs.pod:1872
3616 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
3617 "issued when in the CONFIG state."
3621 #: ../src/guestfs.pod:1875
3623 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
3624 "L</guestfs_launch> blocks until the child process is READY to accept "
3625 "commands (or until some failure or timeout). L</guestfs_launch> internally "
3626 "moves the state from CONFIG to LAUNCHING while it is running."
3630 #: ../src/guestfs.pod:1881
3632 "API actions such as L</guestfs_mount> can only be issued when in the READY "
3633 "state. These API calls block waiting for the command to be carried out "
3634 "(ie. the state to transition to BUSY and then back to READY). There are no "
3635 "non-blocking versions, and no way to issue more than one command per handle "
3640 #: ../src/guestfs.pod:1887
3642 "Finally, the child process sends asynchronous messages back to the main "
3643 "program, such as kernel log messages. You can register a callback to "
3644 "receive these messages."
3648 #: ../src/guestfs.pod:1891
3653 #: ../src/guestfs.pod:1893
3654 msgid "COMMUNICATION PROTOCOL"
3658 #: ../src/guestfs.pod:1895
3660 "Don't rely on using this protocol directly. This section documents how it "
3661 "currently works, but it may change at any time."
3665 #: ../src/guestfs.pod:1898
3667 "The protocol used to talk between the library and the daemon running inside "
3668 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
3669 "1014, RFC 1832, RFC 4506)."
3673 #: ../src/guestfs.pod:1902
3675 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
3676 "this file is automatically generated)."
3680 #: ../src/guestfs.pod:1905
3682 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
3683 "and C<FileOut> parameters, which are handled with very simple request/reply "
3684 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
3685 "parameters, which use the same request and reply messages, but they may also "
3686 "be followed by files sent using a chunked encoding."
3690 #: ../src/guestfs.pod:1912
3691 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
3695 #: ../src/guestfs.pod:1914
3696 msgid "For ordinary functions, the request message is:"
3700 #: ../src/guestfs.pod:1916
3703 " total length (header + arguments,\n"
3704 " but not including the length word itself)\n"
3705 " struct guestfs_message_header (encoded as XDR)\n"
3706 " struct guestfs_<foo>_args (encoded as XDR)\n"
3711 #: ../src/guestfs.pod:1921
3713 "The total length field allows the daemon to allocate a fixed size buffer "
3714 "into which it slurps the rest of the message. As a result, the total length "
3715 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
3716 "effective size of any request is limited to somewhere under this size."
3720 #: ../src/guestfs.pod:1927
3722 "Note also that many functions don't take any arguments, in which case the "
3723 "C<guestfs_I<foo>_args> is completely omitted."
3727 #: ../src/guestfs.pod:1930
3729 "The header contains the procedure number (C<guestfs_proc>) which is how the "
3730 "receiver knows what type of args structure to expect, or none at all."
3734 #: ../src/guestfs.pod:1934
3736 "For functions that take optional arguments, the optional arguments are "
3737 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
3738 "arguments. A bitmask in the header indicates which optional arguments are "
3739 "meaningful. The bitmask is also checked to see if it contains bits set "
3740 "which the daemon does not know about (eg. if more optional arguments were "
3741 "added in a later version of the library), and this causes the call to be "
3746 #: ../src/guestfs.pod:1942
3747 msgid "The reply message for ordinary functions is:"
3751 #: ../src/guestfs.pod:1944
3754 " total length (header + ret,\n"
3755 " but not including the length word itself)\n"
3756 " struct guestfs_message_header (encoded as XDR)\n"
3757 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3762 #: ../src/guestfs.pod:1949
3764 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
3765 "functions that return no formal return values."
3769 #: ../src/guestfs.pod:1952
3770 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
3774 #: ../src/guestfs.pod:1955
3776 "In the case of an error, a flag is set in the header, and the reply message "
3777 "is slightly changed:"
3781 #: ../src/guestfs.pod:1958
3784 " total length (header + error,\n"
3785 " but not including the length word itself)\n"
3786 " struct guestfs_message_header (encoded as XDR)\n"
3787 " struct guestfs_message_error (encoded as XDR)\n"
3792 #: ../src/guestfs.pod:1963
3794 "The C<guestfs_message_error> structure contains the error message as a "
3799 #: ../src/guestfs.pod:1966
3800 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
3804 #: ../src/guestfs.pod:1968
3806 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
3807 "The normal request message is sent (see above). However this is followed by "
3808 "a sequence of file chunks."
3812 #: ../src/guestfs.pod:1972
3815 " total length (header + arguments,\n"
3816 " but not including the length word itself,\n"
3817 " and not including the chunks)\n"
3818 " struct guestfs_message_header (encoded as XDR)\n"
3819 " struct guestfs_<foo>_args (encoded as XDR)\n"
3820 " sequence of chunks for FileIn param #0\n"
3821 " sequence of chunks for FileIn param #1 etc.\n"
3826 #: ../src/guestfs.pod:1980
3827 msgid "The \"sequence of chunks\" is:"
3831 #: ../src/guestfs.pod:1982
3834 " length of chunk (not including length word itself)\n"
3835 " struct guestfs_chunk (encoded as XDR)\n"
3836 " length of chunk\n"
3837 " struct guestfs_chunk (encoded as XDR)\n"
3839 " length of chunk\n"
3840 " struct guestfs_chunk (with data.data_len == 0)\n"
3845 #: ../src/guestfs.pod:1990
3847 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
3848 "is set in the final chunk to indicate either successful completion or early "
3853 #: ../src/guestfs.pod:1994
3855 "At time of writing there are no functions that have more than one FileIn "
3856 "parameter. However this is (theoretically) supported, by sending the "
3857 "sequence of chunks for each FileIn parameter one after another (from left to "
3862 #: ../src/guestfs.pod:1999
3864 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
3865 "transfer. The library does this by sending a chunk with a special flag set "
3866 "to indicate cancellation. When the daemon sees this, it cancels the whole "
3867 "RPC, does I<not> send any reply, and goes back to reading the next request."
3871 #: ../src/guestfs.pod:2005
3873 "The daemon may also cancel. It does this by writing a special word "
3874 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
3875 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
3876 "cancel chunk). The special word is chosen so that even if cancellation "
3877 "happens right at the end of the transfer (after the library has finished "
3878 "writing and has started listening for the reply), the \"spurious\" cancel "
3879 "flag will not be confused with the reply message."
3883 #: ../src/guestfs.pod:2014
3885 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
3886 "limit), and also files where the size is not known in advance (eg. from "
3887 "pipes or sockets). However the chunks are rather small "
3888 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
3889 "to keep much in memory."
3893 #: ../src/guestfs.pod:2020
3894 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
3898 #: ../src/guestfs.pod:2022
3900 "The protocol for FileOut parameters is exactly the same as for FileIn "
3901 "parameters, but with the roles of daemon and library reversed."
3905 #: ../src/guestfs.pod:2025
3908 " total length (header + ret,\n"
3909 " but not including the length word itself,\n"
3910 " and not including the chunks)\n"
3911 " struct guestfs_message_header (encoded as XDR)\n"
3912 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3913 " sequence of chunks for FileOut param #0\n"
3914 " sequence of chunks for FileOut param #1 etc.\n"
3919 #: ../src/guestfs.pod:2033
3920 msgid "INITIAL MESSAGE"
3924 #: ../src/guestfs.pod:2035
3926 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
3927 "which indicates that the guest and daemon is alive. This is what "
3928 "L</guestfs_launch> waits for."
3932 #: ../src/guestfs.pod:2039
3933 msgid "PROGRESS NOTIFICATION MESSAGES"
3937 #: ../src/guestfs.pod:2041
3939 "The daemon may send progress notification messages at any time. These are "
3940 "distinguished by the normal length word being replaced by "
3941 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
3945 #: ../src/guestfs.pod:2045
3947 "The library turns them into progress callbacks (see "
3948 "C<guestfs_set_progress_callback>) if there is a callback registered, or "
3949 "discards them if not."
3953 #: ../src/guestfs.pod:2049
3955 "The daemon self-limits the frequency of progress messages it sends (see "
3956 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
3961 #: ../src/guestfs.pod:2053
3962 msgid "LIBGUESTFS VERSION NUMBERS"
3966 #: ../src/guestfs.pod:2055
3968 "Since April 2010, libguestfs has started to make separate development and "
3969 "stable releases, along with corresponding branches in our git repository. "
3970 "These separate releases can be identified by version number:"
3974 #: ../src/guestfs.pod:2060
3977 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3978 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3984 " | `-------- sub-version\n"
3986 " `------ always '1' because we don't change the ABI\n"
3991 #: ../src/guestfs.pod:2071
3992 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3996 #: ../src/guestfs.pod:2073
3998 "As time passes we cherry pick fixes from the development branch and backport "
3999 "those into the stable branch, the effect being that the stable branch should "
4000 "get more stable and less buggy over time. So the stable releases are ideal "
4001 "for people who don't need new features but would just like the software to "
4006 #: ../src/guestfs.pod:2079
4007 msgid "Our criteria for backporting changes are:"
4011 #: ../src/guestfs.pod:2085
4013 "Documentation changes which don't affect any code are backported unless the "
4014 "documentation refers to a future feature which is not in stable."
4018 #: ../src/guestfs.pod:2091
4020 "Bug fixes which are not controversial, fix obvious problems, and have been "
4021 "well tested are backported."
4025 #: ../src/guestfs.pod:2096
4027 "Simple rearrangements of code which shouldn't affect how it works get "
4028 "backported. This is so that the code in the two branches doesn't get too "
4029 "far out of step, allowing us to backport future fixes more easily."
4033 #: ../src/guestfs.pod:2102
4035 "We I<don't> backport new features, new APIs, new tools etc, except in one "
4036 "exceptional case: the new feature is required in order to implement an "
4037 "important bug fix."
4041 #: ../src/guestfs.pod:2108
4043 "A new stable branch starts when we think the new features in development are "
4044 "substantial and compelling enough over the current stable branch to warrant "
4045 "it. When that happens we create new stable and development versions 1.N.0 "
4046 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
4047 "stable at this point, but by backporting fixes from development, that branch "
4048 "will stabilize over time."
4052 #: ../src/guestfs.pod:2116
4053 msgid "EXTENDING LIBGUESTFS"
4057 #: ../src/guestfs.pod:2118
4058 msgid "ADDING A NEW API ACTION"
4062 #: ../src/guestfs.pod:2120
4064 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
4065 "documentation) are generated, and this makes it easy to extend the "
4070 #: ../src/guestfs.pod:2124
4071 msgid "To add a new API action there are two changes:"
4075 #: ../src/guestfs.pod:2130
4077 "You need to add a description of the call (name, parameters, return type, "
4078 "tests, documentation) to C<generator/generator_actions.ml>."
4082 #: ../src/guestfs.pod:2133
4084 "There are two sorts of API action, depending on whether the call goes "
4085 "through to the daemon in the appliance, or is serviced entirely by the "
4086 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
4087 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
4088 "an example of the latter, since a trace flag is maintained in the handle and "
4089 "all tracing is done on the library side."
4093 #: ../src/guestfs.pod:2141
4095 "Most new actions are of the first type, and get added to the "
4096 "C<daemon_functions> list. Each function has a unique procedure number used "
4097 "in the RPC protocol which is assigned to that action when we publish "
4098 "libguestfs and cannot be reused. Take the latest procedure number and "
4103 #: ../src/guestfs.pod:2147
4105 "For library-only actions of the second type, add to the "
4106 "C<non_daemon_functions> list. Since these functions are serviced by the "
4107 "library and do not travel over the RPC mechanism to the daemon, these "
4108 "functions do not need a procedure number, and so the procedure number is set "
4113 #: ../src/guestfs.pod:2155
4114 msgid "Implement the action (in C):"
4118 #: ../src/guestfs.pod:2157
4120 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
4121 "C<daemon/> directory."
4125 #: ../src/guestfs.pod:2160
4127 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
4128 "(note: double underscore) in the C<src/> directory."
4132 #: ../src/guestfs.pod:2163
4133 msgid "In either case, use another function as an example of what to do."
4137 #: ../src/guestfs.pod:2167
4138 msgid "After making these changes, use C<make> to compile."
4142 #: ../src/guestfs.pod:2169
4144 "Note that you don't need to implement the RPC, language bindings, manual "
4145 "pages or anything else. It's all automatically generated from the OCaml "
4150 #: ../src/guestfs.pod:2173
4151 msgid "ADDING TESTS FOR AN API ACTION"
4155 #: ../src/guestfs.pod:2175
4157 "You can supply zero or as many tests as you want per API call. The tests "
4158 "can either be added as part of the API description "
4159 "(C<generator/generator_actions.ml>), or in some rarer cases you may want to "
4160 "drop a script into C<regressions/>. Note that adding a script to "
4161 "C<regressions/> is slower, so if possible use the first method."
4165 #: ../src/guestfs.pod:2181
4167 "The following describes the test environment used when you add an API test "
4168 "in C<generator_actions.ml>."
4172 #: ../src/guestfs.pod:2184
4173 msgid "The test environment has 4 block devices:"
4177 #: ../src/guestfs.pod:2188
4178 msgid "C</dev/sda> 500MB"
4182 #: ../src/guestfs.pod:2190
4183 msgid "General block device for testing."
4187 #: ../src/guestfs.pod:2192
4188 msgid "C</dev/sdb> 50MB"
4192 #: ../src/guestfs.pod:2194
4194 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
4199 #: ../src/guestfs.pod:2197
4200 msgid "C</dev/sdc> 10MB"
4204 #: ../src/guestfs.pod:2199
4205 msgid "Used in a few tests where two block devices are needed."
4209 #: ../src/guestfs.pod:2201
4214 #: ../src/guestfs.pod:2203
4215 msgid "ISO with fixed content (see C<images/test.iso>)."
4219 #: ../src/guestfs.pod:2207
4221 "To be able to run the tests in a reasonable amount of time, the libguestfs "
4222 "appliance and block devices are reused between tests. So don't try testing "
4223 "L</guestfs_kill_subprocess> :-x"
4227 #: ../src/guestfs.pod:2211
4229 "Each test starts with an initial scenario, selected using one of the "
4230 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
4231 "initialize the disks mentioned above in a particular way as documented in "
4232 "C<generator_types.ml>. You should not assume anything about the previous "
4233 "contents of other disks that are not initialized."
4237 #: ../src/guestfs.pod:2217
4239 "You can add a prerequisite clause to any individual test. This is a "
4240 "run-time check, which, if it fails, causes the test to be skipped. Useful "
4241 "if testing a command which might not work on all variations of libguestfs "
4242 "builds. A test that has prerequisite of C<Always> means to run "
4247 #: ../src/guestfs.pod:2223
4249 "In addition, packagers can skip individual tests by setting environment "
4250 "variables before running C<make check>."
4254 #: ../src/guestfs.pod:2226
4257 " SKIP_TEST_<CMD>_<NUM>=1\n"
4262 #: ../src/guestfs.pod:2228
4263 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
4267 #: ../src/guestfs.pod:2230
4272 #: ../src/guestfs.pod:2232
4275 " SKIP_TEST_<CMD>=1\n"
4280 #: ../src/guestfs.pod:2234
4281 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
4285 #: ../src/guestfs.pod:2236
4286 msgid "Packagers can run only certain tests by setting for example:"
4290 #: ../src/guestfs.pod:2238
4293 " TEST_ONLY=\"vfs_type zerofree\"\n"
4298 #: ../src/guestfs.pod:2240
4300 "See C<capitests/tests.c> for more details of how these environment variables "
4305 #: ../src/guestfs.pod:2243
4306 msgid "DEBUGGING NEW API ACTIONS"
4310 #: ../src/guestfs.pod:2245
4311 msgid "Test new actions work before submitting them."
4315 #: ../src/guestfs.pod:2247
4316 msgid "You can use guestfish to try out new commands."
4320 #: ../src/guestfs.pod:2249
4322 "Debugging the daemon is a problem because it runs inside a minimal "
4323 "environment. However you can fprintf messages in the daemon to stderr, and "
4324 "they will show up if you use C<guestfish -v>."
4328 #: ../src/guestfs.pod:2253
4329 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
4333 #: ../src/guestfs.pod:2255
4335 "Our C source code generally adheres to some basic code-formatting "
4336 "conventions. The existing code base is not totally consistent on this "
4337 "front, but we do prefer that contributed code be formatted similarly. In "
4338 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
4339 "indentation level, and other than that, follow the K&R style."
4343 #: ../src/guestfs.pod:2261
4345 "If you use Emacs, add the following to one of one of your start-up files "
4346 "(e.g., ~/.emacs), to help ensure that you get indentation right:"
4350 #: ../src/guestfs.pod:2264
4353 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
4354 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
4355 " (add-hook 'find-file-hook\n"
4356 " '(lambda () (if (and buffer-file-name\n"
4357 " (string-match \"/libguestfs\\\\>\"\n"
4358 " (buffer-file-name))\n"
4359 " (not (string-equal mode-name \"Change Log\"))\n"
4360 " (not (string-equal mode-name \"Makefile\")))\n"
4361 " (setq indent-tabs-mode nil))))\n"
4366 #: ../src/guestfs.pod:2274
4369 " ;;; When editing C sources in libguestfs, use this style.\n"
4370 " (defun libguestfs-c-mode ()\n"
4371 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
4373 " (c-set-style \"K&R\")\n"
4374 " (setq c-indent-level 2)\n"
4375 " (setq c-basic-offset 2))\n"
4376 " (add-hook 'c-mode-hook\n"
4377 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
4378 " (buffer-file-name))\n"
4379 " (libguestfs-c-mode))))\n"
4384 #: ../src/guestfs.pod:2286
4385 msgid "Enable warnings when compiling (and fix any problems this finds):"
4389 #: ../src/guestfs.pod:2289
4392 " ./configure --enable-gcc-warnings\n"
4397 #: ../src/guestfs.pod:2291
4398 msgid "Useful targets are:"
4402 #: ../src/guestfs.pod:2293
4405 " make syntax-check # checks the syntax of the C code\n"
4406 " make check # runs the test suite\n"
4411 #: ../src/guestfs.pod:2296
4412 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
4416 #: ../src/guestfs.pod:2298
4418 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
4419 "which are used to do shell quoting."
4423 #: ../src/guestfs.pod:2303
4428 #: ../src/guestfs.pod:2305
4430 "Simple shell quoted string. Any spaces or other shell characters are "
4435 #: ../src/guestfs.pod:2308
4440 #: ../src/guestfs.pod:2310
4442 "Same as C<%Q> except the string is treated as a path which is prefixed by "
4447 #: ../src/guestfs.pod:2315 ../fish/guestfish.pod:240 ../fish/guestfish.pod:594
4448 msgid "For example:"
4452 #: ../src/guestfs.pod:2317
4455 " asprintf (&cmd, \"cat %R\", path);\n"
4460 #: ../src/guestfs.pod:2319
4461 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
4465 #: ../src/guestfs.pod:2321
4467 "I<Note:> Do I<not> use these when you are passing parameters to the "
4468 "C<command{,r,v,rv}()> functions. These parameters do NOT need to be quoted "
4469 "because they are not passed via the shell (instead, straight to exec). You "
4470 "probably want to use the C<sysroot_path()> function however."
4474 #: ../src/guestfs.pod:2327
4475 msgid "SUBMITTING YOUR NEW API ACTIONS"
4479 #: ../src/guestfs.pod:2329
4481 "Submit patches to the mailing list: "
4482 "L<http://www.redhat.com/mailman/listinfo/libguestfs> and CC to "
4483 "L<rjones@redhat.com>."
4487 #: ../src/guestfs.pod:2333
4488 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
4492 #: ../src/guestfs.pod:2335
4493 msgid "We support i18n (gettext anyhow) in the library."
4497 #: ../src/guestfs.pod:2337
4499 "However many messages come from the daemon, and we don't translate those at "
4500 "the moment. One reason is that the appliance generally has all locale files "
4501 "removed from it, because they take up a lot of space. So we'd have to readd "
4502 "some of those, as well as copying our PO files into the appliance."
4506 #: ../src/guestfs.pod:2343
4508 "Debugging messages are never translated, since they are intended for the "
4513 #: ../src/guestfs.pod:2346
4514 msgid "SOURCE CODE SUBDIRECTORIES"
4518 #: ../src/guestfs.pod:2350
4519 msgid "C<appliance>"
4523 #: ../src/guestfs.pod:2352
4524 msgid "The libguestfs appliance, build scripts and so on."
4528 #: ../src/guestfs.pod:2354
4529 msgid "C<capitests>"
4533 #: ../src/guestfs.pod:2356
4534 msgid "Automated tests of the C API."
4538 #: ../src/guestfs.pod:2358
4543 #: ../src/guestfs.pod:2360
4545 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
4550 #: ../src/guestfs.pod:2363
4555 #: ../src/guestfs.pod:2365
4556 msgid "Outside contributions, experimental parts."
4560 #: ../src/guestfs.pod:2367
4565 #: ../src/guestfs.pod:2369
4567 "The daemon that runs inside the libguestfs appliance and carries out "
4572 #: ../src/guestfs.pod:2372
4577 #: ../src/guestfs.pod:2374
4578 msgid "L<virt-df(1)> command and documentation."
4582 #: ../src/guestfs.pod:2376
4587 #: ../src/guestfs.pod:2378
4588 msgid "C API example code."
4592 #: ../src/guestfs.pod:2380
4597 #: ../src/guestfs.pod:2382
4599 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
4600 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
4601 "L<virt-tar-out(1)>."
4605 #: ../src/guestfs.pod:2386
4610 #: ../src/guestfs.pod:2388
4611 msgid "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
4615 #: ../src/guestfs.pod:2390
4616 msgid "C<generator>"
4620 #: ../src/guestfs.pod:2392
4622 "The crucially important generator, used to automatically generate large "
4623 "amounts of boilerplate C code for things like RPC and bindings."
4627 #: ../src/guestfs.pod:2395
4632 #: ../src/guestfs.pod:2397
4633 msgid "Files used by the test suite."
4637 #: ../src/guestfs.pod:2399
4638 msgid "Some \"phony\" guest images which we test against."
4642 #: ../src/guestfs.pod:2401
4643 msgid "C<inspector>"
4647 #: ../src/guestfs.pod:2403
4648 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
4652 #: ../src/guestfs.pod:2405
4657 #: ../src/guestfs.pod:2407
4658 msgid "Logo used on the website. The fish is called Arthur by the way."
4662 #: ../src/guestfs.pod:2409
4667 #: ../src/guestfs.pod:2411
4668 msgid "M4 macros used by autoconf."
4672 #: ../src/guestfs.pod:2413
4677 #: ../src/guestfs.pod:2415
4678 msgid "Translations of simple gettext strings."
4682 #: ../src/guestfs.pod:2417
4687 #: ../src/guestfs.pod:2419
4689 "The build infrastructure and PO files for translations of manpages and POD "
4690 "files. Eventually this will be combined with the C<po> directory, but that "
4691 "is rather complicated."
4695 #: ../src/guestfs.pod:2423
4696 msgid "C<regressions>"
4700 #: ../src/guestfs.pod:2425
4701 msgid "Regression tests."
4705 #: ../src/guestfs.pod:2427
4710 #: ../src/guestfs.pod:2429
4711 msgid "L<virt-rescue(1)> command and documentation."
4715 #: ../src/guestfs.pod:2431
4720 #: ../src/guestfs.pod:2433
4721 msgid "Source code to the C library."
4725 #: ../src/guestfs.pod:2435
4730 #: ../src/guestfs.pod:2437
4731 msgid "Command line tools written in Perl (L<virt-resize(1)> and many others)."
4735 #: ../src/guestfs.pod:2439
4736 msgid "C<test-tool>"
4740 #: ../src/guestfs.pod:2441
4742 "Test tool for end users to test if their qemu/kernel combination will work "
4747 #: ../src/guestfs.pod:2444
4752 #: ../src/guestfs.pod:2446
4757 #: ../src/guestfs.pod:2448
4762 #: ../src/guestfs.pod:2450
4767 #: ../src/guestfs.pod:2452
4772 #: ../src/guestfs.pod:2454
4777 #: ../src/guestfs.pod:2456
4782 #: ../src/guestfs.pod:2458
4787 #: ../src/guestfs.pod:2460
4788 msgid "Language bindings."
4792 #: ../src/guestfs.pod:2464 ../fish/guestfish.pod:991 ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:330
4793 msgid "ENVIRONMENT VARIABLES"
4797 #: ../src/guestfs.pod:2468 ../fish/guestfish.pod:1017
4798 msgid "LIBGUESTFS_APPEND"
4802 #: ../src/guestfs.pod:2470 ../fish/guestfish.pod:1019
4803 msgid "Pass additional options to the guest kernel."
4807 #: ../src/guestfs.pod:2472 ../fish/guestfish.pod:1021
4808 msgid "LIBGUESTFS_DEBUG"
4812 #: ../src/guestfs.pod:2474
4814 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
4815 "effect as calling C<guestfs_set_verbose (g, 1)>."
4819 #: ../src/guestfs.pod:2477 ../fish/guestfish.pod:1026
4820 msgid "LIBGUESTFS_MEMSIZE"
4824 #: ../src/guestfs.pod:2479 ../fish/guestfish.pod:1028
4825 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
4829 #: ../src/guestfs.pod:2482 ../fish/guestfish.pod:1031
4832 " LIBGUESTFS_MEMSIZE=700\n"
4837 #: ../src/guestfs.pod:2484 ../fish/guestfish.pod:1033
4838 msgid "LIBGUESTFS_PATH"
4842 #: ../src/guestfs.pod:2486
4844 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
4845 "the discussion of paths in section PATH above."
4849 #: ../src/guestfs.pod:2489 ../fish/guestfish.pod:1038
4850 msgid "LIBGUESTFS_QEMU"
4854 #: ../src/guestfs.pod:2491 ../fish/guestfish.pod:1040
4856 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
4857 "which was found at compile time by the configure script is used."
4861 #: ../src/guestfs.pod:2495
4862 msgid "See also L</QEMU WRAPPERS> above."
4866 #: ../src/guestfs.pod:2497 ../fish/guestfish.pod:1044
4867 msgid "LIBGUESTFS_TRACE"
4871 #: ../src/guestfs.pod:2499
4873 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
4874 "effect as calling C<guestfs_set_trace (g, 1)>."
4878 #: ../src/guestfs.pod:2502 ../fish/guestfish.pod:1053
4883 #: ../src/guestfs.pod:2504 ../fish/guestfish.pod:1055
4884 msgid "Location of temporary directory, defaults to C</tmp>."
4888 #: ../src/guestfs.pod:2506 ../fish/guestfish.pod:1057
4890 "If libguestfs was compiled to use the supermin appliance then the real "
4891 "appliance is cached in this directory, shared between all handles belonging "
4892 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
4893 "use in case C</tmp> is not large enough."
4897 #: ../src/guestfs.pod:2514 ../fish/guestfish.pod:1115 ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:233 ../tools/virt-edit.pl:350 ../tools/virt-win-reg.pl:572 ../tools/virt-resize.pl:1483 ../tools/virt-list-filesystems.pl:189 ../tools/virt-tar.pl:286 ../tools/virt-make-fs.pl:534 ../tools/virt-list-partitions.pl:257
4902 #: ../src/guestfs.pod:2516
4904 "L<guestfs-examples(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, "
4905 "L<guestfs-ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, "
4906 "L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, "
4907 "L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
4908 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
4909 "L<virt-rescue(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, "
4910 "L<virt-win-reg(1)>, L<qemu(1)>, L<febootstrap(1)>, L<hivex(3)>, "
4911 "L<http://libguestfs.org/>."
4915 #: ../src/guestfs.pod:2543
4917 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
4918 "L<lvm(8)>, L<disktype(1)>."
4922 #: ../src/guestfs.pod:2550 ../tools/virt-win-reg.pl:587 ../tools/virt-make-fs.pl:548
4927 #: ../src/guestfs.pod:2552
4928 msgid "To get a list of bugs against libguestfs use this link:"
4932 #: ../src/guestfs.pod:2554
4933 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
4937 #: ../src/guestfs.pod:2556
4938 msgid "To report a new bug against libguestfs use this link:"
4942 #: ../src/guestfs.pod:2558
4943 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
4947 #: ../src/guestfs.pod:2560
4948 msgid "When reporting a bug, please check:"
4952 #: ../src/guestfs.pod:2566
4953 msgid "That the bug hasn't been reported already."
4957 #: ../src/guestfs.pod:2570
4958 msgid "That you are testing a recent version."
4962 #: ../src/guestfs.pod:2574
4963 msgid "Describe the bug accurately, and give a way to reproduce it."
4967 #: ../src/guestfs.pod:2578
4969 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
4974 #: ../src/guestfs.pod:2583 ../fish/guestfish.pod:1138 ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:244
4979 #: ../src/guestfs.pod:2585 ../fish/guestfish.pod:1140 ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:246
4980 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4984 #: ../src/guestfs.pod:2587 ../fish/guestfish.pod:1142 ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:248 ../tools/virt-edit.pl:368 ../tools/virt-win-reg.pl:602 ../tools/virt-resize.pl:1508 ../tools/virt-list-filesystems.pl:206 ../tools/virt-tar.pl:305 ../tools/virt-make-fs.pl:563 ../tools/virt-list-partitions.pl:273
4989 #: ../src/guestfs.pod:2589 ../fish/guestfish.pod:1144 ../fuse/guestmount.pod:250
4990 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
4994 #: ../src/guestfs.pod:2592
4996 "This library is free software; you can redistribute it and/or modify it "
4997 "under the terms of the GNU Lesser General Public License as published by the "
4998 "Free Software Foundation; either version 2 of the License, or (at your "
4999 "option) any later version."
5003 #: ../src/guestfs.pod:2597
5005 "This library is distributed in the hope that it will be useful, but WITHOUT "
5006 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
5007 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
5012 #: ../src/guestfs.pod:2602
5014 "You should have received a copy of the GNU Lesser General Public License "
5015 "along with this library; if not, write to the Free Software Foundation, "
5016 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
5020 #: ../src/guestfs-actions.pod:1
5021 msgid "guestfs_add_cdrom"
5025 #: ../src/guestfs-actions.pod:3
5029 " guestfs_add_cdrom (guestfs_h *g,\n"
5030 " const char *filename);\n"
5035 #: ../src/guestfs-actions.pod:7 ../fish/guestfish-actions.pod:5
5036 msgid "This function adds a virtual CD-ROM disk image to the guest."
5040 #: ../src/guestfs-actions.pod:9 ../fish/guestfish-actions.pod:7
5041 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
5045 #: ../src/guestfs-actions.pod:17
5047 "This call checks for the existence of C<filename>. This stops you from "
5048 "specifying other types of drive which are supported by qemu such as C<nbd:> "
5049 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
5054 #: ../src/guestfs-actions.pod:24
5056 "If you just want to add an ISO file (often you use this as an efficient way "
5057 "to transfer large files into the guest), then you should probably use "
5058 "C<guestfs_add_drive_ro> instead."
5062 #: ../src/guestfs-actions.pod:30 ../src/guestfs-actions.pod:126 ../src/guestfs-actions.pod:187 ../src/guestfs-actions.pod:224 ../src/guestfs-actions.pod:238 ../src/guestfs-actions.pod:259 ../src/guestfs-actions.pod:279 ../src/guestfs-actions.pod:293 ../src/guestfs-actions.pod:408 ../src/guestfs-actions.pod:428 ../src/guestfs-actions.pod:442 ../src/guestfs-actions.pod:487 ../src/guestfs-actions.pod:515 ../src/guestfs-actions.pod:533 ../src/guestfs-actions.pod:600 ../src/guestfs-actions.pod:633 ../src/guestfs-actions.pod:647 ../src/guestfs-actions.pod:662 ../src/guestfs-actions.pod:761 ../src/guestfs-actions.pod:779 ../src/guestfs-actions.pod:793 ../src/guestfs-actions.pod:807 ../src/guestfs-actions.pod:968 ../src/guestfs-actions.pod:988 ../src/guestfs-actions.pod:1006 ../src/guestfs-actions.pod:1090 ../src/guestfs-actions.pod:1108 ../src/guestfs-actions.pod:1127 ../src/guestfs-actions.pod:1141 ../src/guestfs-actions.pod:1161 ../src/guestfs-actions.pod:1231 ../src/guestfs-actions.pod:1262 ../src/guestfs-actions.pod:1287 ../src/guestfs-actions.pod:1324 ../src/guestfs-actions.pod:1430 ../src/guestfs-actions.pod:1464 ../src/guestfs-actions.pod:1682 ../src/guestfs-actions.pod:1704 ../src/guestfs-actions.pod:1791 ../src/guestfs-actions.pod:2243 ../src/guestfs-actions.pod:2387 ../src/guestfs-actions.pod:2448 ../src/guestfs-actions.pod:2483 ../src/guestfs-actions.pod:3318 ../src/guestfs-actions.pod:3333 ../src/guestfs-actions.pod:3353 ../src/guestfs-actions.pod:3508 ../src/guestfs-actions.pod:3522 ../src/guestfs-actions.pod:3535 ../src/guestfs-actions.pod:3549 ../src/guestfs-actions.pod:3564 ../src/guestfs-actions.pod:3600 ../src/guestfs-actions.pod:3672 ../src/guestfs-actions.pod:3692 ../src/guestfs-actions.pod:3709 ../src/guestfs-actions.pod:3732 ../src/guestfs-actions.pod:3755 ../src/guestfs-actions.pod:3787 ../src/guestfs-actions.pod:3806 ../src/guestfs-actions.pod:3825 ../src/guestfs-actions.pod:3860 ../src/guestfs-actions.pod:3872 ../src/guestfs-actions.pod:3908 ../src/guestfs-actions.pod:3924 ../src/guestfs-actions.pod:3937 ../src/guestfs-actions.pod:3952 ../src/guestfs-actions.pod:3969 ../src/guestfs-actions.pod:4062 ../src/guestfs-actions.pod:4082 ../src/guestfs-actions.pod:4095 ../src/guestfs-actions.pod:4146 ../src/guestfs-actions.pod:4164 ../src/guestfs-actions.pod:4182 ../src/guestfs-actions.pod:4198 ../src/guestfs-actions.pod:4212 ../src/guestfs-actions.pod:4226 ../src/guestfs-actions.pod:4243 ../src/guestfs-actions.pod:4258 ../src/guestfs-actions.pod:4278 ../src/guestfs-actions.pod:4322 ../src/guestfs-actions.pod:4395 ../src/guestfs-actions.pod:4426 ../src/guestfs-actions.pod:4445 ../src/guestfs-actions.pod:4464 ../src/guestfs-actions.pod:4476 ../src/guestfs-actions.pod:4493 ../src/guestfs-actions.pod:4506 ../src/guestfs-actions.pod:4521 ../src/guestfs-actions.pod:4536 ../src/guestfs-actions.pod:4571 ../src/guestfs-actions.pod:4586 ../src/guestfs-actions.pod:4606 ../src/guestfs-actions.pod:4620 ../src/guestfs-actions.pod:4637 ../src/guestfs-actions.pod:4686 ../src/guestfs-actions.pod:4723 ../src/guestfs-actions.pod:4737 ../src/guestfs-actions.pod:4765 ../src/guestfs-actions.pod:4782 ../src/guestfs-actions.pod:4800 ../src/guestfs-actions.pod:4934 ../src/guestfs-actions.pod:4991 ../src/guestfs-actions.pod:5013 ../src/guestfs-actions.pod:5031 ../src/guestfs-actions.pod:5063 ../src/guestfs-actions.pod:5129 ../src/guestfs-actions.pod:5146 ../src/guestfs-actions.pod:5159 ../src/guestfs-actions.pod:5173 ../src/guestfs-actions.pod:5462 ../src/guestfs-actions.pod:5481 ../src/guestfs-actions.pod:5500 ../src/guestfs-actions.pod:5512 ../src/guestfs-actions.pod:5524 ../src/guestfs-actions.pod:5538 ../src/guestfs-actions.pod:5550 ../src/guestfs-actions.pod:5564 ../src/guestfs-actions.pod:5580 ../src/guestfs-actions.pod:5601 ../src/guestfs-actions.pod:5620 ../src/guestfs-actions.pod:5639 ../src/guestfs-actions.pod:5657 ../src/guestfs-actions.pod:5680 ../src/guestfs-actions.pod:5698 ../src/guestfs-actions.pod:5717 ../src/guestfs-actions.pod:5738 ../src/guestfs-actions.pod:5757 ../src/guestfs-actions.pod:5774 ../src/guestfs-actions.pod:5802 ../src/guestfs-actions.pod:5826 ../src/guestfs-actions.pod:5845 ../src/guestfs-actions.pod:5869 ../src/guestfs-actions.pod:5884 ../src/guestfs-actions.pod:5899 ../src/guestfs-actions.pod:5918 ../src/guestfs-actions.pod:5955 ../src/guestfs-actions.pod:5978 ../src/guestfs-actions.pod:6004 ../src/guestfs-actions.pod:6112 ../src/guestfs-actions.pod:6233 ../src/guestfs-actions.pod:6245 ../src/guestfs-actions.pod:6258 ../src/guestfs-actions.pod:6271 ../src/guestfs-actions.pod:6293 ../src/guestfs-actions.pod:6306 ../src/guestfs-actions.pod:6319 ../src/guestfs-actions.pod:6332 ../src/guestfs-actions.pod:6347 ../src/guestfs-actions.pod:6406 ../src/guestfs-actions.pod:6423 ../src/guestfs-actions.pod:6439 ../src/guestfs-actions.pod:6455 ../src/guestfs-actions.pod:6472 ../src/guestfs-actions.pod:6485 ../src/guestfs-actions.pod:6505 ../src/guestfs-actions.pod:6541 ../src/guestfs-actions.pod:6555 ../src/guestfs-actions.pod:6596 ../src/guestfs-actions.pod:6609 ../src/guestfs-actions.pod:6627 ../src/guestfs-actions.pod:6661 ../src/guestfs-actions.pod:6697 ../src/guestfs-actions.pod:6816 ../src/guestfs-actions.pod:6834 ../src/guestfs-actions.pod:6848 ../src/guestfs-actions.pod:6903 ../src/guestfs-actions.pod:6916 ../src/guestfs-actions.pod:6961 ../src/guestfs-actions.pod:6994 ../src/guestfs-actions.pod:7048 ../src/guestfs-actions.pod:7074 ../src/guestfs-actions.pod:7140 ../src/guestfs-actions.pod:7159 ../src/guestfs-actions.pod:7188
5063 msgid "This function returns 0 on success or -1 on error."
5067 #: ../src/guestfs-actions.pod:32 ../src/guestfs-actions.pod:240 ../src/guestfs-actions.pod:261 ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:151 ../fish/guestfish-actions.pod:165
5069 "This function is deprecated. In new code, use the C<add_drive_opts> call "
5074 #: ../src/guestfs-actions.pod:35 ../src/guestfs-actions.pod:243 ../src/guestfs-actions.pod:264 ../src/guestfs-actions.pod:1435 ../src/guestfs-actions.pod:1921 ../src/guestfs-actions.pod:1942 ../src/guestfs-actions.pod:4283 ../src/guestfs-actions.pod:7082 ../src/guestfs-actions.pod:7251 ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:154 ../fish/guestfish-actions.pod:168 ../fish/guestfish-actions.pod:949 ../fish/guestfish-actions.pod:1306 ../fish/guestfish-actions.pod:1320 ../fish/guestfish-actions.pod:2895 ../fish/guestfish-actions.pod:4710 ../fish/guestfish-actions.pod:4807
5076 "Deprecated functions will not be removed from the API, but the fact that "
5077 "they are deprecated indicates that there are problems with correct use of "
5082 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:128 ../src/guestfs-actions.pod:1092 ../src/guestfs-actions.pod:1893 ../src/guestfs-actions.pod:1991 ../src/guestfs-actions.pod:2094 ../src/guestfs-actions.pod:3320 ../src/guestfs-actions.pod:3335 ../src/guestfs-actions.pod:4573 ../src/guestfs-actions.pod:5659 ../src/guestfs-actions.pod:5776 ../src/guestfs-actions.pod:5886 ../src/guestfs-actions.pod:6349 ../src/guestfs-actions.pod:6474 ../src/guestfs-actions.pod:6996
5083 msgid "(Added in 0.3)"
5087 #: ../src/guestfs-actions.pod:41
5088 msgid "guestfs_add_domain"
5092 #: ../src/guestfs-actions.pod:43
5096 " guestfs_add_domain (guestfs_h *g,\n"
5097 " const char *dom,\n"
5103 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:137 ../src/guestfs-actions.pod:4297
5105 "You may supply a list of optional arguments to this call. Use zero or more "
5106 "of the following pairs of parameters, and terminate the list with C<-1> on "
5107 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
5111 #: ../src/guestfs-actions.pod:53
5114 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
5115 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
5116 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
5121 #: ../src/guestfs-actions.pod:57
5123 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
5124 "It works by connecting to libvirt, requesting the domain and domain XML from "
5125 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
5130 #: ../src/guestfs-actions.pod:62 ../fish/guestfish-actions.pod:46
5132 "The number of disks added is returned. This operation is atomic: if an "
5133 "error is returned, then no disks are added."
5137 #: ../src/guestfs-actions.pod:65 ../fish/guestfish-actions.pod:49
5139 "This function does some minimal checks to make sure the libvirt domain is "
5140 "not running (unless C<readonly> is true). In a future version we will try "
5141 "to acquire the libvirt lock on each disk."
5145 #: ../src/guestfs-actions.pod:69 ../fish/guestfish-actions.pod:53
5147 "Disks must be accessible locally. This often means that adding disks from a "
5148 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
5149 "unless those disks are accessible via the same device path locally too."
5153 #: ../src/guestfs-actions.pod:74 ../fish/guestfish-actions.pod:58
5155 "The optional C<libvirturi> parameter sets the libvirt URI (see "
5156 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
5157 "default libvirt URI (or one set through an environment variable, see the "
5158 "libvirt documentation for full details)."
5162 #: ../src/guestfs-actions.pod:80
5164 "The other optional parameters are passed directly through to "
5165 "C<guestfs_add_drive_opts>."
5169 #: ../src/guestfs-actions.pod:83 ../src/guestfs-actions.pod:336 ../src/guestfs-actions.pod:501 ../src/guestfs-actions.pod:679 ../src/guestfs-actions.pod:710 ../src/guestfs-actions.pod:728 ../src/guestfs-actions.pod:747 ../src/guestfs-actions.pod:1307 ../src/guestfs-actions.pod:1661 ../src/guestfs-actions.pod:1864 ../src/guestfs-actions.pod:1963 ../src/guestfs-actions.pod:2003 ../src/guestfs-actions.pod:2058 ../src/guestfs-actions.pod:2081 ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:2701 ../src/guestfs-actions.pod:2722 ../src/guestfs-actions.pod:4709 ../src/guestfs-actions.pod:4837 ../src/guestfs-actions.pod:5243 ../src/guestfs-actions.pod:5269 ../src/guestfs-actions.pod:6582 ../src/guestfs-actions.pod:7007 ../src/guestfs-actions.pod:7020 ../src/guestfs-actions.pod:7033
5170 msgid "On error this function returns -1."
5174 #: ../src/guestfs-actions.pod:85
5175 msgid "(Added in 1.7.4)"
5179 #: ../src/guestfs-actions.pod:87
5180 msgid "guestfs_add_domain_va"
5184 #: ../src/guestfs-actions.pod:89
5188 " guestfs_add_domain_va (guestfs_h *g,\n"
5189 " const char *dom,\n"
5195 #: ../src/guestfs-actions.pod:94
5196 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
5200 #: ../src/guestfs-actions.pod:96 ../src/guestfs-actions.pod:107 ../src/guestfs-actions.pod:200 ../src/guestfs-actions.pod:211 ../src/guestfs-actions.pod:4336 ../src/guestfs-actions.pod:4348
5201 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
5205 #: ../src/guestfs-actions.pod:98
5206 msgid "guestfs_add_domain_argv"
5210 #: ../src/guestfs-actions.pod:100
5214 " guestfs_add_domain_argv (guestfs_h *g,\n"
5215 " const char *dom,\n"
5216 " const struct guestfs_add_domain_argv *optargs);\n"
5221 #: ../src/guestfs-actions.pod:105
5222 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
5226 #: ../src/guestfs-actions.pod:109
5227 msgid "guestfs_add_drive"
5231 #: ../src/guestfs-actions.pod:111
5235 " guestfs_add_drive (guestfs_h *g,\n"
5236 " const char *filename);\n"
5241 #: ../src/guestfs-actions.pod:115
5243 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
5244 "optional parameters, so the disk is added writable, with the format being "
5245 "detected automatically."
5249 #: ../src/guestfs-actions.pod:119
5251 "Automatic detection of the format opens you up to a potential security hole "
5252 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
5253 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
5254 "you should think about replacing calls to this function with calls to "
5255 "C<guestfs_add_drive_opts>, and specifying the format."
5259 #: ../src/guestfs-actions.pod:130
5260 msgid "guestfs_add_drive_opts"
5264 #: ../src/guestfs-actions.pod:132
5268 " guestfs_add_drive_opts (guestfs_h *g,\n"
5269 " const char *filename,\n"
5275 #: ../src/guestfs-actions.pod:142
5278 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
5279 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
5280 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
5285 #: ../src/guestfs-actions.pod:146 ../fish/guestfish-actions.pod:90
5287 "This function adds a virtual machine disk image C<filename> to libguestfs. "
5288 "The first time you call this function, the disk appears as C</dev/sda>, the "
5289 "second time as C</dev/sdb>, and so on."
5293 #: ../src/guestfs-actions.pod:151 ../fish/guestfish-actions.pod:95
5295 "You don't necessarily need to be root when using libguestfs. However you "
5296 "obviously do need sufficient permissions to access the filename for whatever "
5297 "operations you want to perform (ie. read access if you just want to read the "
5298 "image or write access if you want to modify the image)."
5302 #: ../src/guestfs-actions.pod:157 ../fish/guestfish-actions.pod:101
5303 msgid "This call checks that C<filename> exists."
5307 #: ../src/guestfs-actions.pod:159 ../src/guestfs-actions.pod:4307 ../fish/guestfish-actions.pod:103 ../fish/guestfish-actions.pod:2906
5308 msgid "The optional arguments are:"
5312 #: ../src/guestfs-actions.pod:163 ../fish/guestfish-actions.pod:107
5317 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:109
5319 "If true then the image is treated as read-only. Writes are still allowed, "
5320 "but they are stored in a temporary snapshot overlay which is discarded at "
5321 "the end. The disk that you add is not modified."
5325 #: ../src/guestfs-actions.pod:169 ../fish/guestfish-actions.pod:113
5330 #: ../src/guestfs-actions.pod:171
5332 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
5333 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
5334 "Possible formats include C<raw> and C<qcow2>."
5338 #: ../src/guestfs-actions.pod:175 ../fish/guestfish-actions.pod:119
5340 "Automatic detection of the format opens you up to a potential security hole "
5341 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
5342 "RHBZ#642934. Specifying the format closes this security hole."
5346 #: ../src/guestfs-actions.pod:180 ../fish/guestfish-actions.pod:124
5351 #: ../src/guestfs-actions.pod:182
5353 "This rarely-used option lets you emulate the behaviour of the deprecated "
5354 "C<guestfs_add_drive_with_if> call (q.v.)"
5358 #: ../src/guestfs-actions.pod:189
5359 msgid "(Added in 1.5.23)"
5363 #: ../src/guestfs-actions.pod:191
5364 msgid "guestfs_add_drive_opts_va"
5368 #: ../src/guestfs-actions.pod:193
5372 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
5373 " const char *filename,\n"
5379 #: ../src/guestfs-actions.pod:198
5380 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
5384 #: ../src/guestfs-actions.pod:202
5385 msgid "guestfs_add_drive_opts_argv"
5389 #: ../src/guestfs-actions.pod:204
5393 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
5394 " const char *filename,\n"
5395 " const struct guestfs_add_drive_opts_argv "
5401 #: ../src/guestfs-actions.pod:209
5402 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
5406 #: ../src/guestfs-actions.pod:213
5407 msgid "guestfs_add_drive_ro"
5411 #: ../src/guestfs-actions.pod:215
5415 " guestfs_add_drive_ro (guestfs_h *g,\n"
5416 " const char *filename);\n"
5421 #: ../src/guestfs-actions.pod:219
5423 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
5424 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
5425 "disk is added read-only, with the format being detected automatically."
5429 #: ../src/guestfs-actions.pod:226
5430 msgid "(Added in 1.0.38)"
5434 #: ../src/guestfs-actions.pod:228
5435 msgid "guestfs_add_drive_ro_with_if"
5439 #: ../src/guestfs-actions.pod:230
5443 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
5444 " const char *filename,\n"
5445 " const char *iface);\n"
5450 #: ../src/guestfs-actions.pod:235
5452 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
5453 "QEMU interface emulation to use at run time."
5457 #: ../src/guestfs-actions.pod:247 ../src/guestfs-actions.pod:268 ../src/guestfs-actions.pod:2333
5458 msgid "(Added in 1.0.84)"
5462 #: ../src/guestfs-actions.pod:249
5463 msgid "guestfs_add_drive_with_if"
5467 #: ../src/guestfs-actions.pod:251
5471 " guestfs_add_drive_with_if (guestfs_h *g,\n"
5472 " const char *filename,\n"
5473 " const char *iface);\n"
5478 #: ../src/guestfs-actions.pod:256
5480 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
5481 "QEMU interface emulation to use at run time."
5485 #: ../src/guestfs-actions.pod:270
5486 msgid "guestfs_aug_clear"
5490 #: ../src/guestfs-actions.pod:272
5494 " guestfs_aug_clear (guestfs_h *g,\n"
5495 " const char *augpath);\n"
5500 #: ../src/guestfs-actions.pod:276 ../fish/guestfish-actions.pod:176
5502 "Set the value associated with C<path> to C<NULL>. This is the same as the "
5503 "L<augtool(1)> C<clear> command."
5507 #: ../src/guestfs-actions.pod:281 ../src/guestfs-actions.pod:2083
5508 msgid "(Added in 1.3.4)"
5512 #: ../src/guestfs-actions.pod:283
5513 msgid "guestfs_aug_close"
5517 #: ../src/guestfs-actions.pod:285
5521 " guestfs_aug_close (guestfs_h *g);\n"
5526 #: ../src/guestfs-actions.pod:288
5528 "Close the current Augeas handle and free up any resources used by it. After "
5529 "calling this, you have to call C<guestfs_aug_init> again before you can use "
5530 "any other Augeas functions."
5534 #: ../src/guestfs-actions.pod:295 ../src/guestfs-actions.pod:320 ../src/guestfs-actions.pod:338 ../src/guestfs-actions.pod:352 ../src/guestfs-actions.pod:410 ../src/guestfs-actions.pod:430 ../src/guestfs-actions.pod:444 ../src/guestfs-actions.pod:475 ../src/guestfs-actions.pod:489 ../src/guestfs-actions.pod:503 ../src/guestfs-actions.pod:517 ../src/guestfs-actions.pod:535 ../src/guestfs-actions.pod:5320
5535 msgid "(Added in 0.7)"
5539 #: ../src/guestfs-actions.pod:297
5540 msgid "guestfs_aug_defnode"
5544 #: ../src/guestfs-actions.pod:299
5547 " struct guestfs_int_bool *\n"
5548 " guestfs_aug_defnode (guestfs_h *g,\n"
5549 " const char *name,\n"
5550 " const char *expr,\n"
5551 " const char *val);\n"
5556 #: ../src/guestfs-actions.pod:305 ../fish/guestfish-actions.pod:192
5557 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
5561 #: ../src/guestfs-actions.pod:308
5563 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
5564 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
5565 "containing that single node."
5569 #: ../src/guestfs-actions.pod:312 ../fish/guestfish-actions.pod:199
5571 "On success this returns a pair containing the number of nodes in the "
5572 "nodeset, and a boolean flag if a node was created."
5576 #: ../src/guestfs-actions.pod:316
5578 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
5579 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
5583 #: ../src/guestfs-actions.pod:322
5584 msgid "guestfs_aug_defvar"
5588 #: ../src/guestfs-actions.pod:324
5592 " guestfs_aug_defvar (guestfs_h *g,\n"
5593 " const char *name,\n"
5594 " const char *expr);\n"
5599 #: ../src/guestfs-actions.pod:329 ../fish/guestfish-actions.pod:207
5601 "Defines an Augeas variable C<name> whose value is the result of evaluating "
5602 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
5606 #: ../src/guestfs-actions.pod:333 ../fish/guestfish-actions.pod:211
5608 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
5609 "evaluates to something which is not a nodeset."
5613 #: ../src/guestfs-actions.pod:340
5614 msgid "guestfs_aug_get"
5618 #: ../src/guestfs-actions.pod:342
5622 " guestfs_aug_get (guestfs_h *g,\n"
5623 " const char *augpath);\n"
5628 #: ../src/guestfs-actions.pod:346 ../fish/guestfish-actions.pod:218
5630 "Look up the value associated with C<path>. If C<path> matches exactly one "
5631 "node, the C<value> is returned."
5635 #: ../src/guestfs-actions.pod:349 ../src/guestfs-actions.pod:849 ../src/guestfs-actions.pod:867 ../src/guestfs-actions.pod:927 ../src/guestfs-actions.pod:943 ../src/guestfs-actions.pod:1046 ../src/guestfs-actions.pod:1176 ../src/guestfs-actions.pod:1193 ../src/guestfs-actions.pod:1212 ../src/guestfs-actions.pod:1341 ../src/guestfs-actions.pod:1532 ../src/guestfs-actions.pod:1644 ../src/guestfs-actions.pod:1807 ../src/guestfs-actions.pod:1824 ../src/guestfs-actions.pod:1915 ../src/guestfs-actions.pod:1936 ../src/guestfs-actions.pod:2106 ../src/guestfs-actions.pod:2298 ../src/guestfs-actions.pod:2505 ../src/guestfs-actions.pod:2586 ../src/guestfs-actions.pod:2653 ../src/guestfs-actions.pod:2673 ../src/guestfs-actions.pod:2787 ../src/guestfs-actions.pod:2818 ../src/guestfs-actions.pod:2842 ../src/guestfs-actions.pod:2904 ../src/guestfs-actions.pod:2927 ../src/guestfs-actions.pod:3494 ../src/guestfs-actions.pod:3844 ../src/guestfs-actions.pod:4014 ../src/guestfs-actions.pod:4124 ../src/guestfs-actions.pod:4855 ../src/guestfs-actions.pod:5048 ../src/guestfs-actions.pod:5218 ../src/guestfs-actions.pod:5396 ../src/guestfs-actions.pod:5445 ../src/guestfs-actions.pod:6025 ../src/guestfs-actions.pod:6041 ../src/guestfs-actions.pod:6058 ../src/guestfs-actions.pod:6082 ../src/guestfs-actions.pod:6756 ../src/guestfs-actions.pod:6775 ../src/guestfs-actions.pod:6793 ../src/guestfs-actions.pod:6973 ../src/guestfs-actions.pod:7245
5637 "This function returns a string, or NULL on error. I<The caller must free "
5638 "the returned string after use>."
5642 #: ../src/guestfs-actions.pod:354
5643 msgid "guestfs_aug_init"
5647 #: ../src/guestfs-actions.pod:356
5651 " guestfs_aug_init (guestfs_h *g,\n"
5652 " const char *root,\n"
5658 #: ../src/guestfs-actions.pod:361 ../fish/guestfish-actions.pod:225
5660 "Create a new Augeas handle for editing configuration files. If there was "
5661 "any previous Augeas handle associated with this guestfs session, then it is "
5666 #: ../src/guestfs-actions.pod:365
5667 msgid "You must call this before using any other C<guestfs_aug_*> commands."
5671 #: ../src/guestfs-actions.pod:368 ../fish/guestfish-actions.pod:232
5672 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
5676 #: ../src/guestfs-actions.pod:371 ../fish/guestfish-actions.pod:235
5678 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
5679 "logical I<or> of the following integers:"
5683 #: ../src/guestfs-actions.pod:377 ../fish/guestfish-actions.pod:241
5684 msgid "C<AUG_SAVE_BACKUP> = 1"
5688 #: ../src/guestfs-actions.pod:379 ../fish/guestfish-actions.pod:243
5689 msgid "Keep the original file with a C<.augsave> extension."
5693 #: ../src/guestfs-actions.pod:381 ../fish/guestfish-actions.pod:245
5694 msgid "C<AUG_SAVE_NEWFILE> = 2"
5698 #: ../src/guestfs-actions.pod:383 ../fish/guestfish-actions.pod:247
5700 "Save changes into a file with extension C<.augnew>, and do not overwrite "
5701 "original. Overrides C<AUG_SAVE_BACKUP>."
5705 #: ../src/guestfs-actions.pod:386 ../fish/guestfish-actions.pod:250
5706 msgid "C<AUG_TYPE_CHECK> = 4"
5710 #: ../src/guestfs-actions.pod:388 ../fish/guestfish-actions.pod:252
5711 msgid "Typecheck lenses (can be expensive)."
5715 #: ../src/guestfs-actions.pod:390 ../fish/guestfish-actions.pod:254
5716 msgid "C<AUG_NO_STDINC> = 8"
5720 #: ../src/guestfs-actions.pod:392 ../fish/guestfish-actions.pod:256
5721 msgid "Do not use standard load path for modules."
5725 #: ../src/guestfs-actions.pod:394 ../fish/guestfish-actions.pod:258
5726 msgid "C<AUG_SAVE_NOOP> = 16"
5730 #: ../src/guestfs-actions.pod:396 ../fish/guestfish-actions.pod:260
5731 msgid "Make save a no-op, just record what would have been changed."
5735 #: ../src/guestfs-actions.pod:398 ../fish/guestfish-actions.pod:262
5736 msgid "C<AUG_NO_LOAD> = 32"
5740 #: ../src/guestfs-actions.pod:400
5741 msgid "Do not load the tree in C<guestfs_aug_init>."
5745 #: ../src/guestfs-actions.pod:404
5746 msgid "To close the handle, you can call C<guestfs_aug_close>."
5750 #: ../src/guestfs-actions.pod:406 ../fish/guestfish-actions.pod:270
5751 msgid "To find out more about Augeas, see L<http://augeas.net/>."
5755 #: ../src/guestfs-actions.pod:412
5756 msgid "guestfs_aug_insert"
5760 #: ../src/guestfs-actions.pod:414
5764 " guestfs_aug_insert (guestfs_h *g,\n"
5765 " const char *augpath,\n"
5766 " const char *label,\n"
5772 #: ../src/guestfs-actions.pod:420 ../fish/guestfish-actions.pod:276
5774 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
5775 "or after C<path> (depending on the boolean flag C<before>)."
5779 #: ../src/guestfs-actions.pod:424 ../fish/guestfish-actions.pod:280
5781 "C<path> must match exactly one existing node in the tree, and C<label> must "
5782 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
5786 #: ../src/guestfs-actions.pod:432
5787 msgid "guestfs_aug_load"
5791 #: ../src/guestfs-actions.pod:434
5795 " guestfs_aug_load (guestfs_h *g);\n"
5800 #: ../src/guestfs-actions.pod:437 ../fish/guestfish-actions.pod:288
5801 msgid "Load files into the tree."
5805 #: ../src/guestfs-actions.pod:439 ../fish/guestfish-actions.pod:290
5806 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
5810 #: ../src/guestfs-actions.pod:446
5811 msgid "guestfs_aug_ls"
5815 #: ../src/guestfs-actions.pod:448
5819 " guestfs_aug_ls (guestfs_h *g,\n"
5820 " const char *augpath);\n"
5825 #: ../src/guestfs-actions.pod:452
5827 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
5828 "sorting the resulting nodes into alphabetical order."
5832 #: ../src/guestfs-actions.pod:455 ../src/guestfs-actions.pod:471 ../src/guestfs-actions.pod:617 ../src/guestfs-actions.pod:1065 ../src/guestfs-actions.pod:1356 ../src/guestfs-actions.pod:1375 ../src/guestfs-actions.pod:1478 ../src/guestfs-actions.pod:1497 ../src/guestfs-actions.pod:1746 ../src/guestfs-actions.pod:2178 ../src/guestfs-actions.pod:2194 ../src/guestfs-actions.pod:2213 ../src/guestfs-actions.pod:2256 ../src/guestfs-actions.pod:2280 ../src/guestfs-actions.pod:2351 ../src/guestfs-actions.pod:2400 ../src/guestfs-actions.pod:2611 ../src/guestfs-actions.pod:2861 ../src/guestfs-actions.pod:3129 ../src/guestfs-actions.pod:3414 ../src/guestfs-actions.pod:3476 ../src/guestfs-actions.pod:3581 ../src/guestfs-actions.pod:3986 ../src/guestfs-actions.pod:4670 ../src/guestfs-actions.pod:5190 ../src/guestfs-actions.pod:5316 ../src/guestfs-actions.pod:5430 ../src/guestfs-actions.pod:6098 ../src/guestfs-actions.pod:6159 ../src/guestfs-actions.pod:6214 ../src/guestfs-actions.pod:6360 ../src/guestfs-actions.pod:6384 ../src/guestfs-actions.pod:6866 ../src/guestfs-actions.pod:6886 ../src/guestfs-actions.pod:6933 ../src/guestfs-actions.pod:7098 ../src/guestfs-actions.pod:7117 ../src/guestfs-actions.pod:7202 ../src/guestfs-actions.pod:7221 ../src/guestfs-actions.pod:7267 ../src/guestfs-actions.pod:7286
5834 "This function returns a NULL-terminated array of strings (like "
5835 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
5836 "strings and the array after use>."
5840 #: ../src/guestfs-actions.pod:459 ../src/guestfs-actions.pod:990 ../src/guestfs-actions.pod:1008 ../src/guestfs-actions.pod:1413 ../src/guestfs-actions.pod:3207 ../src/guestfs-actions.pod:3238 ../src/guestfs-actions.pod:3827 ../src/guestfs-actions.pod:3877 ../src/guestfs-actions.pod:4064 ../src/guestfs-actions.pod:4097 ../src/guestfs-actions.pod:4260 ../src/guestfs-actions.pod:4674 ../src/guestfs-actions.pod:5131 ../src/guestfs-actions.pod:5526 ../src/guestfs-actions.pod:5540 ../src/guestfs-actions.pod:5552 ../src/guestfs-actions.pod:5960 ../src/guestfs-actions.pod:6598 ../src/guestfs-actions.pod:6611 ../src/guestfs-actions.pod:6850 ../src/guestfs-actions.pod:7086
5841 msgid "(Added in 0.8)"
5845 #: ../src/guestfs-actions.pod:461
5846 msgid "guestfs_aug_match"
5850 #: ../src/guestfs-actions.pod:463
5854 " guestfs_aug_match (guestfs_h *g,\n"
5855 " const char *augpath);\n"
5860 #: ../src/guestfs-actions.pod:467 ../fish/guestfish-actions.pod:304
5862 "Returns a list of paths which match the path expression C<path>. The "
5863 "returned paths are sufficiently qualified so that they match exactly one "
5864 "node in the current tree."
5868 #: ../src/guestfs-actions.pod:477
5869 msgid "guestfs_aug_mv"
5873 #: ../src/guestfs-actions.pod:479
5877 " guestfs_aug_mv (guestfs_h *g,\n"
5878 " const char *src,\n"
5879 " const char *dest);\n"
5884 #: ../src/guestfs-actions.pod:484 ../fish/guestfish-actions.pod:312
5886 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
5887 "C<dest> is overwritten if it exists."
5891 #: ../src/guestfs-actions.pod:491
5892 msgid "guestfs_aug_rm"
5896 #: ../src/guestfs-actions.pod:493
5900 " guestfs_aug_rm (guestfs_h *g,\n"
5901 " const char *augpath);\n"
5906 #: ../src/guestfs-actions.pod:497 ../fish/guestfish-actions.pod:319
5907 msgid "Remove C<path> and all of its children."
5911 #: ../src/guestfs-actions.pod:499 ../fish/guestfish-actions.pod:321
5912 msgid "On success this returns the number of entries which were removed."
5916 #: ../src/guestfs-actions.pod:505
5917 msgid "guestfs_aug_save"
5921 #: ../src/guestfs-actions.pod:507
5925 " guestfs_aug_save (guestfs_h *g);\n"
5930 #: ../src/guestfs-actions.pod:510 ../fish/guestfish-actions.pod:327
5931 msgid "This writes all pending changes to disk."
5935 #: ../src/guestfs-actions.pod:512
5937 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
5942 #: ../src/guestfs-actions.pod:519
5943 msgid "guestfs_aug_set"
5947 #: ../src/guestfs-actions.pod:521
5951 " guestfs_aug_set (guestfs_h *g,\n"
5952 " const char *augpath,\n"
5953 " const char *val);\n"
5958 #: ../src/guestfs-actions.pod:526 ../fish/guestfish-actions.pod:336
5959 msgid "Set the value associated with C<path> to C<val>."
5963 #: ../src/guestfs-actions.pod:528
5965 "In the Augeas API, it is possible to clear a node by setting the value to "
5966 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
5967 "this call. Instead you must use the C<guestfs_aug_clear> call."
5971 #: ../src/guestfs-actions.pod:537
5972 msgid "guestfs_available"
5976 #: ../src/guestfs-actions.pod:539
5980 " guestfs_available (guestfs_h *g,\n"
5981 " char *const *groups);\n"
5986 #: ../src/guestfs-actions.pod:543 ../fish/guestfish-actions.pod:347
5988 "This command is used to check the availability of some groups of "
5989 "functionality in the appliance, which not all builds of the libguestfs "
5990 "appliance will be able to provide."
5994 #: ../src/guestfs-actions.pod:547
5996 "The libguestfs groups, and the functions that those groups correspond to, "
5997 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
5998 "runtime by calling C<guestfs_available_all_groups>."
6002 #: ../src/guestfs-actions.pod:552 ../fish/guestfish-actions.pod:356
6004 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
6005 "\"augeas\"]> would check for the availability of the Linux inotify functions "
6006 "and Augeas (configuration file editing) functions."
6010 #: ../src/guestfs-actions.pod:557 ../fish/guestfish-actions.pod:361
6011 msgid "The command returns no error if I<all> requested groups are available."
6015 #: ../src/guestfs-actions.pod:559 ../fish/guestfish-actions.pod:363
6017 "It fails with an error if one or more of the requested groups is unavailable "
6022 #: ../src/guestfs-actions.pod:562 ../fish/guestfish-actions.pod:366
6024 "If an unknown group name is included in the list of groups then an error is "
6029 #: ../src/guestfs-actions.pod:565 ../fish/guestfish-actions.pod:369
6034 #: ../src/guestfs-actions.pod:571
6035 msgid "You must call C<guestfs_launch> before calling this function."
6039 #: ../src/guestfs-actions.pod:573 ../fish/guestfish-actions.pod:377
6041 "The reason is because we don't know what groups are supported by the "
6042 "appliance/daemon until it is running and can be queried."
6046 #: ../src/guestfs-actions.pod:579 ../fish/guestfish-actions.pod:383
6048 "If a group of functions is available, this does not necessarily mean that "
6049 "they will work. You still have to check for errors when calling individual "
6050 "API functions even if they are available."
6054 #: ../src/guestfs-actions.pod:586 ../fish/guestfish-actions.pod:390
6056 "It is usually the job of distro packagers to build complete functionality "
6057 "into the libguestfs appliance. Upstream libguestfs, if built from source "
6058 "with all requirements satisfied, will support everything."
6062 #: ../src/guestfs-actions.pod:593
6064 "This call was added in version C<1.0.80>. In previous versions of "
6065 "libguestfs all you could do would be to speculatively execute a command to "
6066 "find out if the daemon implemented it. See also C<guestfs_version>."
6070 #: ../src/guestfs-actions.pod:602 ../src/guestfs-actions.pod:1163
6071 msgid "(Added in 1.0.80)"
6075 #: ../src/guestfs-actions.pod:604
6076 msgid "guestfs_available_all_groups"
6080 #: ../src/guestfs-actions.pod:606
6084 " guestfs_available_all_groups (guestfs_h *g);\n"
6089 #: ../src/guestfs-actions.pod:609
6091 "This command returns a list of all optional groups that this daemon knows "
6092 "about. Note this returns both supported and unsupported groups. To find "
6093 "out which ones the daemon can actually support you have to call "
6094 "C<guestfs_available> on each member of the returned list."
6098 #: ../src/guestfs-actions.pod:615
6099 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
6103 #: ../src/guestfs-actions.pod:621
6104 msgid "(Added in 1.3.15)"
6108 #: ../src/guestfs-actions.pod:623
6109 msgid "guestfs_base64_in"
6113 #: ../src/guestfs-actions.pod:625
6117 " guestfs_base64_in (guestfs_h *g,\n"
6118 " const char *base64file,\n"
6119 " const char *filename);\n"
6124 #: ../src/guestfs-actions.pod:630 ../fish/guestfish-actions.pod:420
6125 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
6129 #: ../src/guestfs-actions.pod:635 ../src/guestfs-actions.pod:649
6130 msgid "(Added in 1.3.5)"
6134 #: ../src/guestfs-actions.pod:637
6135 msgid "guestfs_base64_out"
6139 #: ../src/guestfs-actions.pod:639
6143 " guestfs_base64_out (guestfs_h *g,\n"
6144 " const char *filename,\n"
6145 " const char *base64file);\n"
6150 #: ../src/guestfs-actions.pod:644 ../fish/guestfish-actions.pod:429
6152 "This command downloads the contents of C<filename>, writing it out to local "
6153 "file C<base64file> encoded as base64."
6157 #: ../src/guestfs-actions.pod:651
6158 msgid "guestfs_blockdev_flushbufs"
6162 #: ../src/guestfs-actions.pod:653
6166 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
6167 " const char *device);\n"
6172 #: ../src/guestfs-actions.pod:657 ../fish/guestfish-actions.pod:438
6173 msgid "This tells the kernel to flush internal buffers associated with C<device>."
6177 #: ../src/guestfs-actions.pod:660 ../src/guestfs-actions.pod:677 ../src/guestfs-actions.pod:692 ../src/guestfs-actions.pod:708 ../src/guestfs-actions.pod:726 ../src/guestfs-actions.pod:745 ../src/guestfs-actions.pod:759 ../src/guestfs-actions.pod:777 ../src/guestfs-actions.pod:791 ../src/guestfs-actions.pod:805 ../fish/guestfish-actions.pod:441 ../fish/guestfish-actions.pod:452 ../fish/guestfish-actions.pod:461 ../fish/guestfish-actions.pod:471 ../fish/guestfish-actions.pod:483 ../fish/guestfish-actions.pod:496 ../fish/guestfish-actions.pod:504 ../fish/guestfish-actions.pod:515 ../fish/guestfish-actions.pod:523 ../fish/guestfish-actions.pod:531
6178 msgid "This uses the L<blockdev(8)> command."
6182 #: ../src/guestfs-actions.pod:664 ../src/guestfs-actions.pod:681 ../src/guestfs-actions.pod:696 ../src/guestfs-actions.pod:712 ../src/guestfs-actions.pod:730 ../src/guestfs-actions.pod:749 ../src/guestfs-actions.pod:763 ../src/guestfs-actions.pod:781 ../src/guestfs-actions.pod:795 ../src/guestfs-actions.pod:809
6183 msgid "(Added in 0.9.3)"
6187 #: ../src/guestfs-actions.pod:666
6188 msgid "guestfs_blockdev_getbsz"
6192 #: ../src/guestfs-actions.pod:668
6196 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
6197 " const char *device);\n"
6202 #: ../src/guestfs-actions.pod:672 ../fish/guestfish-actions.pod:447
6203 msgid "This returns the block size of a device."
6207 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:774 ../fish/guestfish-actions.pod:449 ../fish/guestfish-actions.pod:512
6209 "(Note this is different from both I<size in blocks> and I<filesystem block "
6214 #: ../src/guestfs-actions.pod:683
6215 msgid "guestfs_blockdev_getro"
6219 #: ../src/guestfs-actions.pod:685
6223 " guestfs_blockdev_getro (guestfs_h *g,\n"
6224 " const char *device);\n"
6229 #: ../src/guestfs-actions.pod:689 ../fish/guestfish-actions.pod:458
6231 "Returns a boolean indicating if the block device is read-only (true if "
6232 "read-only, false if not)."
6236 #: ../src/guestfs-actions.pod:694 ../src/guestfs-actions.pod:1396 ../src/guestfs-actions.pod:1411 ../src/guestfs-actions.pod:1891 ../src/guestfs-actions.pod:1902 ../src/guestfs-actions.pod:1974 ../src/guestfs-actions.pod:2029 ../src/guestfs-actions.pod:2044 ../src/guestfs-actions.pod:2069 ../src/guestfs-actions.pod:2092 ../src/guestfs-actions.pod:2947 ../src/guestfs-actions.pod:2964 ../src/guestfs-actions.pod:2983 ../src/guestfs-actions.pod:3146 ../src/guestfs-actions.pod:3160 ../src/guestfs-actions.pod:3175 ../src/guestfs-actions.pod:3189 ../src/guestfs-actions.pod:3205 ../src/guestfs-actions.pod:3220 ../src/guestfs-actions.pod:3236 ../src/guestfs-actions.pod:3250 ../src/guestfs-actions.pod:3263 ../src/guestfs-actions.pod:3277 ../src/guestfs-actions.pod:3292 ../src/guestfs-actions.pod:3307 ../src/guestfs-actions.pod:4819
6237 msgid "This function returns a C truth value on success or -1 on error."
6241 #: ../src/guestfs-actions.pod:698
6242 msgid "guestfs_blockdev_getsize64"
6246 #: ../src/guestfs-actions.pod:700
6250 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
6251 " const char *device);\n"
6256 #: ../src/guestfs-actions.pod:704 ../fish/guestfish-actions.pod:467
6257 msgid "This returns the size of the device in bytes."
6261 #: ../src/guestfs-actions.pod:706
6262 msgid "See also C<guestfs_blockdev_getsz>."
6266 #: ../src/guestfs-actions.pod:714
6267 msgid "guestfs_blockdev_getss"
6271 #: ../src/guestfs-actions.pod:716
6275 " guestfs_blockdev_getss (guestfs_h *g,\n"
6276 " const char *device);\n"
6281 #: ../src/guestfs-actions.pod:720 ../fish/guestfish-actions.pod:477
6283 "This returns the size of sectors on a block device. Usually 512, but can be "
6284 "larger for modern devices."
6288 #: ../src/guestfs-actions.pod:723
6290 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
6295 #: ../src/guestfs-actions.pod:732
6296 msgid "guestfs_blockdev_getsz"
6300 #: ../src/guestfs-actions.pod:734
6304 " guestfs_blockdev_getsz (guestfs_h *g,\n"
6305 " const char *device);\n"
6310 #: ../src/guestfs-actions.pod:738 ../fish/guestfish-actions.pod:489
6312 "This returns the size of the device in units of 512-byte sectors (even if "
6313 "the sectorsize isn't 512 bytes ... weird)."
6317 #: ../src/guestfs-actions.pod:741
6319 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
6320 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
6324 #: ../src/guestfs-actions.pod:751
6325 msgid "guestfs_blockdev_rereadpt"
6329 #: ../src/guestfs-actions.pod:753
6333 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
6334 " const char *device);\n"
6339 #: ../src/guestfs-actions.pod:757 ../fish/guestfish-actions.pod:502
6340 msgid "Reread the partition table on C<device>."
6344 #: ../src/guestfs-actions.pod:765
6345 msgid "guestfs_blockdev_setbsz"
6349 #: ../src/guestfs-actions.pod:767
6353 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
6354 " const char *device,\n"
6355 " int blocksize);\n"
6360 #: ../src/guestfs-actions.pod:772 ../fish/guestfish-actions.pod:510
6361 msgid "This sets the block size of a device."
6365 #: ../src/guestfs-actions.pod:783
6366 msgid "guestfs_blockdev_setro"
6370 #: ../src/guestfs-actions.pod:785
6374 " guestfs_blockdev_setro (guestfs_h *g,\n"
6375 " const char *device);\n"
6380 #: ../src/guestfs-actions.pod:789 ../fish/guestfish-actions.pod:521
6381 msgid "Sets the block device named C<device> to read-only."
6385 #: ../src/guestfs-actions.pod:797
6386 msgid "guestfs_blockdev_setrw"
6390 #: ../src/guestfs-actions.pod:799
6394 " guestfs_blockdev_setrw (guestfs_h *g,\n"
6395 " const char *device);\n"
6400 #: ../src/guestfs-actions.pod:803 ../fish/guestfish-actions.pod:529
6401 msgid "Sets the block device named C<device> to read-write."
6405 #: ../src/guestfs-actions.pod:811
6406 msgid "guestfs_case_sensitive_path"
6410 #: ../src/guestfs-actions.pod:813
6414 " guestfs_case_sensitive_path (guestfs_h *g,\n"
6415 " const char *path);\n"
6420 #: ../src/guestfs-actions.pod:817 ../fish/guestfish-actions.pod:537
6422 "This can be used to resolve case insensitive paths on a filesystem which is "
6423 "case sensitive. The use case is to resolve paths which you have read from "
6424 "Windows configuration files or the Windows Registry, to the true path."
6428 #: ../src/guestfs-actions.pod:822 ../fish/guestfish-actions.pod:542
6430 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
6431 "(and probably others), which is that although the underlying filesystem is "
6432 "case-insensitive, the driver exports the filesystem to Linux as "
6437 #: ../src/guestfs-actions.pod:827 ../fish/guestfish-actions.pod:547
6439 "One consequence of this is that special directories such as C<c:\\windows> "
6440 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
6441 "precise details of how they were created. In Windows itself this would not "
6446 #: ../src/guestfs-actions.pod:833 ../fish/guestfish-actions.pod:553
6448 "Bug or feature? You decide: "
6449 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
6453 #: ../src/guestfs-actions.pod:836 ../fish/guestfish-actions.pod:556
6455 "This function resolves the true case of each element in the path and returns "
6456 "the case-sensitive path."
6460 #: ../src/guestfs-actions.pod:839
6462 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
6463 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
6464 "how the directories were originally created under Windows)."
6468 #: ../src/guestfs-actions.pod:844 ../fish/guestfish-actions.pod:564
6469 msgid "I<Note>: This function does not handle drive names, backslashes etc."
6473 #: ../src/guestfs-actions.pod:847
6474 msgid "See also C<guestfs_realpath>."
6478 #: ../src/guestfs-actions.pod:852 ../src/guestfs-actions.pod:6778
6479 msgid "(Added in 1.0.75)"
6483 #: ../src/guestfs-actions.pod:854
6488 #: ../src/guestfs-actions.pod:856
6492 " guestfs_cat (guestfs_h *g,\n"
6493 " const char *path);\n"
6498 #: ../src/guestfs-actions.pod:860 ../src/guestfs-actions.pod:5306 ../fish/guestfish-actions.pod:573 ../fish/guestfish-actions.pod:3541
6499 msgid "Return the contents of the file named C<path>."
6503 #: ../src/guestfs-actions.pod:862
6505 "Note that this function cannot correctly handle binary files (specifically, "
6506 "files containing C<\\0> character which is treated as end of string). For "
6507 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
6508 "functions which have a more complex interface."
6512 #: ../src/guestfs-actions.pod:870 ../src/guestfs-actions.pod:1049 ../src/guestfs-actions.pod:1069 ../src/guestfs-actions.pod:1360 ../src/guestfs-actions.pod:1379 ../src/guestfs-actions.pod:1482 ../src/guestfs-actions.pod:1501 ../src/guestfs-actions.pod:1750 ../src/guestfs-actions.pod:2198 ../src/guestfs-actions.pod:2217 ../src/guestfs-actions.pod:2260 ../src/guestfs-actions.pod:2284 ../src/guestfs-actions.pod:2301 ../src/guestfs-actions.pod:2330 ../src/guestfs-actions.pod:5088 ../src/guestfs-actions.pod:5114 ../src/guestfs-actions.pod:5245 ../src/guestfs-actions.pod:5271 ../src/guestfs-actions.pod:5295 ../src/guestfs-actions.pod:6163 ../src/guestfs-actions.pod:6218 ../src/guestfs-actions.pod:6364 ../src/guestfs-actions.pod:6388 ../src/guestfs-actions.pod:7050 ../src/guestfs-actions.pod:7076 ../src/guestfs-actions.pod:7102 ../src/guestfs-actions.pod:7121 ../src/guestfs-actions.pod:7206 ../src/guestfs-actions.pod:7225 ../src/guestfs-actions.pod:7271 ../src/guestfs-actions.pod:7290 ../fish/guestfish-actions.pod:580 ../fish/guestfish-actions.pod:715 ../fish/guestfish-actions.pod:727 ../fish/guestfish-actions.pod:903 ../fish/guestfish-actions.pod:913 ../fish/guestfish-actions.pod:980 ../fish/guestfish-actions.pod:990 ../fish/guestfish-actions.pod:1185 ../fish/guestfish-actions.pod:1480 ../fish/guestfish-actions.pod:1490 ../fish/guestfish-actions.pod:1518 ../fish/guestfish-actions.pod:1533 ../fish/guestfish-actions.pod:1543 ../fish/guestfish-actions.pod:1562 ../fish/guestfish-actions.pod:3411 ../fish/guestfish-actions.pod:3426 ../fish/guestfish-actions.pod:3502 ../fish/guestfish-actions.pod:3519 ../fish/guestfish-actions.pod:3534 ../fish/guestfish-actions.pod:4130 ../fish/guestfish-actions.pod:4176 ../fish/guestfish-actions.pod:4261 ../fish/guestfish-actions.pod:4276 ../fish/guestfish-actions.pod:4686 ../fish/guestfish-actions.pod:4704 ../fish/guestfish-actions.pod:4721 ../fish/guestfish-actions.pod:4731 ../fish/guestfish-actions.pod:4779 ../fish/guestfish-actions.pod:4789 ../fish/guestfish-actions.pod:4818 ../fish/guestfish-actions.pod:4828
6514 "Because of the message protocol, there is a transfer limit of somewhere "
6515 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
6519 #: ../src/guestfs-actions.pod:873 ../src/guestfs-actions.pod:3418 ../src/guestfs-actions.pod:3480 ../src/guestfs-actions.pod:3497 ../src/guestfs-actions.pod:3585 ../src/guestfs-actions.pod:3990 ../src/guestfs-actions.pod:4004 ../src/guestfs-actions.pod:5194 ../src/guestfs-actions.pod:5208 ../src/guestfs-actions.pod:6937 ../src/guestfs-actions.pod:6951
6520 msgid "(Added in 0.4)"
6524 #: ../src/guestfs-actions.pod:875
6525 msgid "guestfs_checksum"
6529 #: ../src/guestfs-actions.pod:877
6533 " guestfs_checksum (guestfs_h *g,\n"
6534 " const char *csumtype,\n"
6535 " const char *path);\n"
6540 #: ../src/guestfs-actions.pod:882 ../fish/guestfish-actions.pod:587
6541 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
6545 #: ../src/guestfs-actions.pod:885 ../fish/guestfish-actions.pod:590
6547 "The type of checksum to compute is given by the C<csumtype> parameter which "
6548 "must have one of the following values:"
6552 #: ../src/guestfs-actions.pod:890 ../fish/guestfish-actions.pod:595
6557 #: ../src/guestfs-actions.pod:892 ../fish/guestfish-actions.pod:597
6559 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
6564 #: ../src/guestfs-actions.pod:895 ../fish/guestfish-actions.pod:600
6569 #: ../src/guestfs-actions.pod:897 ../fish/guestfish-actions.pod:602
6570 msgid "Compute the MD5 hash (using the C<md5sum> program)."
6574 #: ../src/guestfs-actions.pod:899 ../fish/guestfish-actions.pod:604
6579 #: ../src/guestfs-actions.pod:901 ../fish/guestfish-actions.pod:606
6580 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
6584 #: ../src/guestfs-actions.pod:903 ../fish/guestfish-actions.pod:608
6589 #: ../src/guestfs-actions.pod:905 ../fish/guestfish-actions.pod:610
6590 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
6594 #: ../src/guestfs-actions.pod:907 ../fish/guestfish-actions.pod:612
6599 #: ../src/guestfs-actions.pod:909 ../fish/guestfish-actions.pod:614
6600 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
6604 #: ../src/guestfs-actions.pod:911 ../fish/guestfish-actions.pod:616
6609 #: ../src/guestfs-actions.pod:913 ../fish/guestfish-actions.pod:618
6610 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
6614 #: ../src/guestfs-actions.pod:915 ../fish/guestfish-actions.pod:620
6619 #: ../src/guestfs-actions.pod:917 ../fish/guestfish-actions.pod:622
6620 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
6624 #: ../src/guestfs-actions.pod:921 ../fish/guestfish-actions.pod:626
6625 msgid "The checksum is returned as a printable string."
6629 #: ../src/guestfs-actions.pod:923
6630 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
6634 #: ../src/guestfs-actions.pod:925
6635 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
6639 #: ../src/guestfs-actions.pod:930 ../src/guestfs-actions.pod:1238 ../src/guestfs-actions.pod:2060 ../src/guestfs-actions.pod:3162 ../src/guestfs-actions.pod:3191 ../src/guestfs-actions.pod:3252 ../src/guestfs-actions.pod:3279 ../src/guestfs-actions.pod:6634
6640 msgid "(Added in 1.0.2)"
6644 #: ../src/guestfs-actions.pod:932
6645 msgid "guestfs_checksum_device"
6649 #: ../src/guestfs-actions.pod:934
6653 " guestfs_checksum_device (guestfs_h *g,\n"
6654 " const char *csumtype,\n"
6655 " const char *device);\n"
6660 #: ../src/guestfs-actions.pod:939
6662 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
6663 "device named C<device>. For the types of checksums supported see the "
6664 "C<guestfs_checksum> command."
6668 #: ../src/guestfs-actions.pod:946 ../src/guestfs-actions.pod:4725 ../src/guestfs-actions.pod:4784 ../src/guestfs-actions.pod:4821 ../src/guestfs-actions.pod:4839 ../src/guestfs-actions.pod:5015 ../src/guestfs-actions.pod:6543 ../src/guestfs-actions.pod:6557 ../src/guestfs-actions.pod:6963
6669 msgid "(Added in 1.3.2)"
6673 #: ../src/guestfs-actions.pod:948
6674 msgid "guestfs_checksums_out"
6678 #: ../src/guestfs-actions.pod:950
6682 " guestfs_checksums_out (guestfs_h *g,\n"
6683 " const char *csumtype,\n"
6684 " const char *directory,\n"
6685 " const char *sumsfile);\n"
6690 #: ../src/guestfs-actions.pod:956 ../fish/guestfish-actions.pod:644
6692 "This command computes the checksums of all regular files in C<directory> and "
6693 "then emits a list of those checksums to the local output file C<sumsfile>."
6697 #: ../src/guestfs-actions.pod:960 ../fish/guestfish-actions.pod:648
6699 "This can be used for verifying the integrity of a virtual machine. However "
6700 "to be properly secure you should pay attention to the output of the checksum "
6701 "command (it uses the ones from GNU coreutils). In particular when the "
6702 "filename is not printable, coreutils uses a special backslash syntax. For "
6703 "more information, see the GNU coreutils info file."
6707 #: ../src/guestfs-actions.pod:970
6708 msgid "(Added in 1.3.7)"
6712 #: ../src/guestfs-actions.pod:972
6713 msgid "guestfs_chmod"
6717 #: ../src/guestfs-actions.pod:974
6721 " guestfs_chmod (guestfs_h *g,\n"
6723 " const char *path);\n"
6728 #: ../src/guestfs-actions.pod:979 ../fish/guestfish-actions.pod:662
6730 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
6735 #: ../src/guestfs-actions.pod:982 ../fish/guestfish-actions.pod:665
6737 "I<Note>: When using this command from guestfish, C<mode> by default would be "
6738 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
6743 #: ../src/guestfs-actions.pod:986 ../src/guestfs-actions.pod:4241 ../src/guestfs-actions.pod:4424 ../src/guestfs-actions.pod:4443 ../src/guestfs-actions.pod:4462 ../fish/guestfish-actions.pod:669 ../fish/guestfish-actions.pod:2870 ../fish/guestfish-actions.pod:2986 ../fish/guestfish-actions.pod:2996 ../fish/guestfish-actions.pod:3006
6744 msgid "The mode actually set is affected by the umask."
6748 #: ../src/guestfs-actions.pod:992
6749 msgid "guestfs_chown"
6753 #: ../src/guestfs-actions.pod:994
6757 " guestfs_chown (guestfs_h *g,\n"
6760 " const char *path);\n"
6765 #: ../src/guestfs-actions.pod:1000 ../fish/guestfish-actions.pod:675
6766 msgid "Change the file owner to C<owner> and group to C<group>."
6770 #: ../src/guestfs-actions.pod:1002 ../src/guestfs-actions.pod:3349 ../fish/guestfish-actions.pod:677 ../fish/guestfish-actions.pod:2328
6772 "Only numeric uid and gid are supported. If you want to use names, you will "
6773 "need to locate and parse the password file yourself (Augeas support makes "
6774 "this relatively easy)."
6778 #: ../src/guestfs-actions.pod:1010
6779 msgid "guestfs_command"
6783 #: ../src/guestfs-actions.pod:1012
6787 " guestfs_command (guestfs_h *g,\n"
6788 " char *const *arguments);\n"
6793 #: ../src/guestfs-actions.pod:1016 ../fish/guestfish-actions.pod:685
6795 "This call runs a command from the guest filesystem. The filesystem must be "
6796 "mounted, and must contain a compatible operating system (ie. something "
6797 "Linux, with the same or compatible processor architecture)."
6801 #: ../src/guestfs-actions.pod:1021
6803 "The single parameter is an argv-style list of arguments. The first element "
6804 "is the name of the program to run. Subsequent elements are parameters. The "
6805 "list must be non-empty (ie. must contain a program name). Note that the "
6806 "command runs directly, and is I<not> invoked via the shell (see "
6811 #: ../src/guestfs-actions.pod:1028 ../fish/guestfish-actions.pod:697
6812 msgid "The return value is anything printed to I<stdout> by the command."
6816 #: ../src/guestfs-actions.pod:1031 ../fish/guestfish-actions.pod:700
6818 "If the command returns a non-zero exit status, then this function returns an "
6819 "error message. The error message string is the content of I<stderr> from "
6824 #: ../src/guestfs-actions.pod:1035 ../fish/guestfish-actions.pod:704
6826 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
6827 "C</bin>. If you require a program from another location, you should provide "
6828 "the full path in the first parameter."
6832 #: ../src/guestfs-actions.pod:1040 ../fish/guestfish-actions.pod:709
6834 "Shared libraries and data files required by the program must be available on "
6835 "filesystems which are mounted in the correct places. It is the caller's "
6836 "responsibility to ensure all filesystems that are needed are mounted at the "
6841 #: ../src/guestfs-actions.pod:1052 ../src/guestfs-actions.pod:1072 ../src/guestfs-actions.pod:1535
6842 msgid "(Added in 0.9.1)"
6846 #: ../src/guestfs-actions.pod:1054
6847 msgid "guestfs_command_lines"
6851 #: ../src/guestfs-actions.pod:1056
6855 " guestfs_command_lines (guestfs_h *g,\n"
6856 " char *const *arguments);\n"
6861 #: ../src/guestfs-actions.pod:1060
6863 "This is the same as C<guestfs_command>, but splits the result into a list of "
6868 #: ../src/guestfs-actions.pod:1063
6869 msgid "See also: C<guestfs_sh_lines>"
6873 #: ../src/guestfs-actions.pod:1074
6874 msgid "guestfs_config"
6878 #: ../src/guestfs-actions.pod:1076
6882 " guestfs_config (guestfs_h *g,\n"
6883 " const char *qemuparam,\n"
6884 " const char *qemuvalue);\n"
6889 #: ../src/guestfs-actions.pod:1081 ../fish/guestfish-actions.pod:734
6891 "This can be used to add arbitrary qemu command line parameters of the form "
6892 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
6893 "setting some parameters which would interfere with parameters that we use."
6897 #: ../src/guestfs-actions.pod:1086 ../fish/guestfish-actions.pod:739
6898 msgid "The first character of C<param> string must be a C<-> (dash)."
6902 #: ../src/guestfs-actions.pod:1088 ../fish/guestfish-actions.pod:741
6903 msgid "C<value> can be NULL."
6907 #: ../src/guestfs-actions.pod:1094
6908 msgid "guestfs_copy_size"
6912 #: ../src/guestfs-actions.pod:1096
6916 " guestfs_copy_size (guestfs_h *g,\n"
6917 " const char *src,\n"
6918 " const char *dest,\n"
6924 #: ../src/guestfs-actions.pod:1102 ../fish/guestfish-actions.pod:747
6926 "This command copies exactly C<size> bytes from one source device or file "
6927 "C<src> to another destination device or file C<dest>."
6931 #: ../src/guestfs-actions.pod:1105 ../fish/guestfish-actions.pod:750
6933 "Note this will fail if the source is too short or if the destination is not "
6938 #: ../src/guestfs-actions.pod:1110 ../src/guestfs-actions.pod:1233 ../src/guestfs-actions.pod:1264 ../src/guestfs-actions.pod:1684 ../src/guestfs-actions.pod:1706 ../src/guestfs-actions.pod:6629 ../src/guestfs-actions.pod:6663 ../src/guestfs-actions.pod:7142 ../src/guestfs-actions.pod:7161
6940 "This long-running command can generate progress notification messages so "
6941 "that the caller can display a progress bar or indicator. To receive these "
6942 "messages, the caller must register a progress callback. See "
6943 "L<guestfs(3)/guestfs_set_progress_callback>."
6947 #: ../src/guestfs-actions.pod:1115 ../src/guestfs-actions.pod:4017 ../src/guestfs-actions.pod:5221 ../src/guestfs-actions.pod:6870 ../src/guestfs-actions.pod:6890 ../src/guestfs-actions.pod:6976
6948 msgid "(Added in 1.0.87)"
6952 #: ../src/guestfs-actions.pod:1117
6957 #: ../src/guestfs-actions.pod:1119
6961 " guestfs_cp (guestfs_h *g,\n"
6962 " const char *src,\n"
6963 " const char *dest);\n"
6968 #: ../src/guestfs-actions.pod:1124 ../fish/guestfish-actions.pod:757
6970 "This copies a file from C<src> to C<dest> where C<dest> is either a "
6971 "destination filename or destination directory."
6975 #: ../src/guestfs-actions.pod:1129 ../src/guestfs-actions.pod:1143 ../src/guestfs-actions.pod:1215 ../src/guestfs-actions.pod:1289 ../src/guestfs-actions.pod:1398 ../src/guestfs-actions.pod:4688 ../src/guestfs-actions.pod:5065
6976 msgid "(Added in 1.0.18)"
6980 #: ../src/guestfs-actions.pod:1131
6981 msgid "guestfs_cp_a"
6985 #: ../src/guestfs-actions.pod:1133
6989 " guestfs_cp_a (guestfs_h *g,\n"
6990 " const char *src,\n"
6991 " const char *dest);\n"
6996 #: ../src/guestfs-actions.pod:1138 ../fish/guestfish-actions.pod:764
6998 "This copies a file or directory from C<src> to C<dest> recursively using the "
7003 #: ../src/guestfs-actions.pod:1145
7008 #: ../src/guestfs-actions.pod:1147
7012 " guestfs_dd (guestfs_h *g,\n"
7013 " const char *src,\n"
7014 " const char *dest);\n"
7019 #: ../src/guestfs-actions.pod:1152 ../fish/guestfish-actions.pod:771
7021 "This command copies from one source device or file C<src> to another "
7022 "destination device or file C<dest>. Normally you would use this to copy to "
7023 "or from a device or partition, for example to duplicate a filesystem."
7027 #: ../src/guestfs-actions.pod:1157
7029 "If the destination is a device, it must be as large or larger than the "
7030 "source file or device, otherwise the copy will fail. This command cannot do "
7031 "partial copies (see C<guestfs_copy_size>)."
7035 #: ../src/guestfs-actions.pod:1165
7040 #: ../src/guestfs-actions.pod:1167
7044 " guestfs_df (guestfs_h *g);\n"
7049 #: ../src/guestfs-actions.pod:1170 ../fish/guestfish-actions.pod:784
7050 msgid "This command runs the C<df> command to report disk space used."
7054 #: ../src/guestfs-actions.pod:1172 ../src/guestfs-actions.pod:1189
7056 "This command is mostly useful for interactive sessions. It is I<not> "
7057 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
7062 #: ../src/guestfs-actions.pod:1179 ../src/guestfs-actions.pod:1196 ../src/guestfs-actions.pod:1309 ../src/guestfs-actions.pod:2263 ../src/guestfs-actions.pod:2287 ../src/guestfs-actions.pod:2355 ../src/guestfs-actions.pod:4127 ../src/guestfs-actions.pod:4588 ../src/guestfs-actions.pod:6367 ../src/guestfs-actions.pod:6391 ../src/guestfs-actions.pod:7009 ../src/guestfs-actions.pod:7022 ../src/guestfs-actions.pod:7035
7063 msgid "(Added in 1.0.54)"
7067 #: ../src/guestfs-actions.pod:1181
7068 msgid "guestfs_df_h"
7072 #: ../src/guestfs-actions.pod:1183
7076 " guestfs_df_h (guestfs_h *g);\n"
7081 #: ../src/guestfs-actions.pod:1186 ../fish/guestfish-actions.pod:794
7083 "This command runs the C<df -h> command to report disk space used in "
7084 "human-readable format."
7088 #: ../src/guestfs-actions.pod:1198
7089 msgid "guestfs_dmesg"
7093 #: ../src/guestfs-actions.pod:1200
7097 " guestfs_dmesg (guestfs_h *g);\n"
7102 #: ../src/guestfs-actions.pod:1203 ../fish/guestfish-actions.pod:805
7104 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
7105 "This is sometimes useful for extended debugging of problems."
7109 #: ../src/guestfs-actions.pod:1207
7111 "Another way to get the same information is to enable verbose messages with "
7112 "C<guestfs_set_verbose> or by setting the environment variable "
7113 "C<LIBGUESTFS_DEBUG=1> before running the program."
7117 #: ../src/guestfs-actions.pod:1217
7118 msgid "guestfs_download"
7122 #: ../src/guestfs-actions.pod:1219
7126 " guestfs_download (guestfs_h *g,\n"
7127 " const char *remotefilename,\n"
7128 " const char *filename);\n"
7133 #: ../src/guestfs-actions.pod:1224 ../src/guestfs-actions.pod:1249 ../fish/guestfish-actions.pod:818 ../fish/guestfish-actions.pod:831
7135 "Download file C<remotefilename> and save it as C<filename> on the local "
7140 #: ../src/guestfs-actions.pod:1227 ../src/guestfs-actions.pod:6623 ../fish/guestfish-actions.pod:821 ../fish/guestfish-actions.pod:4434
7141 msgid "C<filename> can also be a named pipe."
7145 #: ../src/guestfs-actions.pod:1229
7146 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
7150 #: ../src/guestfs-actions.pod:1240
7151 msgid "guestfs_download_offset"
7155 #: ../src/guestfs-actions.pod:1242
7159 " guestfs_download_offset (guestfs_h *g,\n"
7160 " const char *remotefilename,\n"
7161 " const char *filename,\n"
7162 " int64_t offset,\n"
7168 #: ../src/guestfs-actions.pod:1252 ../fish/guestfish-actions.pod:834
7170 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
7171 "region must be within the file or device)."
7175 #: ../src/guestfs-actions.pod:1255
7177 "Note that there is no limit on the amount of data that can be downloaded "
7178 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
7179 "full amount unless an error occurs."
7183 #: ../src/guestfs-actions.pod:1260
7184 msgid "See also C<guestfs_download>, C<guestfs_pread>."
7188 #: ../src/guestfs-actions.pod:1269 ../src/guestfs-actions.pod:6668
7189 msgid "(Added in 1.5.17)"
7193 #: ../src/guestfs-actions.pod:1271
7194 msgid "guestfs_drop_caches"
7198 #: ../src/guestfs-actions.pod:1273
7202 " guestfs_drop_caches (guestfs_h *g,\n"
7203 " int whattodrop);\n"
7208 #: ../src/guestfs-actions.pod:1277 ../fish/guestfish-actions.pod:850
7210 "This instructs the guest kernel to drop its page cache, and/or dentries and "
7211 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
7212 "to drop, see L<http://linux-mm.org/Drop_Caches>"
7216 #: ../src/guestfs-actions.pod:1282 ../fish/guestfish-actions.pod:855
7217 msgid "Setting C<whattodrop> to 3 should drop everything."
7221 #: ../src/guestfs-actions.pod:1284 ../fish/guestfish-actions.pod:857
7223 "This automatically calls L<sync(2)> before the operation, so that the "
7224 "maximum guest memory is freed."
7228 #: ../src/guestfs-actions.pod:1291
7233 #: ../src/guestfs-actions.pod:1293
7237 " guestfs_du (guestfs_h *g,\n"
7238 " const char *path);\n"
7243 #: ../src/guestfs-actions.pod:1297 ../fish/guestfish-actions.pod:864
7245 "This command runs the C<du -s> command to estimate file space usage for "
7250 #: ../src/guestfs-actions.pod:1300 ../fish/guestfish-actions.pod:867
7252 "C<path> can be a file or a directory. If C<path> is a directory then the "
7253 "estimate includes the contents of the directory and all subdirectories "
7258 #: ../src/guestfs-actions.pod:1304 ../fish/guestfish-actions.pod:871
7259 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
7263 #: ../src/guestfs-actions.pod:1311
7264 msgid "guestfs_e2fsck_f"
7268 #: ../src/guestfs-actions.pod:1313
7272 " guestfs_e2fsck_f (guestfs_h *g,\n"
7273 " const char *device);\n"
7278 #: ../src/guestfs-actions.pod:1317 ../fish/guestfish-actions.pod:878
7280 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
7281 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
7286 #: ../src/guestfs-actions.pod:1321
7288 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
7289 "Normally you should use C<guestfs_fsck>."
7293 #: ../src/guestfs-actions.pod:1326
7294 msgid "(Added in 1.0.29)"
7298 #: ../src/guestfs-actions.pod:1328
7299 msgid "guestfs_echo_daemon"
7303 #: ../src/guestfs-actions.pod:1330
7307 " guestfs_echo_daemon (guestfs_h *g,\n"
7308 " char *const *words);\n"
7313 #: ../src/guestfs-actions.pod:1334 ../fish/guestfish-actions.pod:889
7315 "This command concatenates the list of C<words> passed with single spaces "
7316 "between them and returns the resulting string."
7320 #: ../src/guestfs-actions.pod:1337 ../fish/guestfish-actions.pod:892
7321 msgid "You can use this command to test the connection through to the daemon."
7325 #: ../src/guestfs-actions.pod:1339
7326 msgid "See also C<guestfs_ping_daemon>."
7330 #: ../src/guestfs-actions.pod:1344 ../src/guestfs-actions.pod:2071 ../src/guestfs-actions.pod:5871
7331 msgid "(Added in 1.0.69)"
7335 #: ../src/guestfs-actions.pod:1346
7336 msgid "guestfs_egrep"
7340 #: ../src/guestfs-actions.pod:1348
7344 " guestfs_egrep (guestfs_h *g,\n"
7345 " const char *regex,\n"
7346 " const char *path);\n"
7351 #: ../src/guestfs-actions.pod:1353 ../fish/guestfish-actions.pod:900
7352 msgid "This calls the external C<egrep> program and returns the matching lines."
7356 #: ../src/guestfs-actions.pod:1363 ../src/guestfs-actions.pod:1382 ../src/guestfs-actions.pod:1439 ../src/guestfs-actions.pod:1485 ../src/guestfs-actions.pod:1504 ../src/guestfs-actions.pod:2201 ../src/guestfs-actions.pod:2220 ../src/guestfs-actions.pod:2376 ../src/guestfs-actions.pod:2389 ../src/guestfs-actions.pod:2404 ../src/guestfs-actions.pod:2450 ../src/guestfs-actions.pod:2472 ../src/guestfs-actions.pod:2485 ../src/guestfs-actions.pod:3510 ../src/guestfs-actions.pod:3524 ../src/guestfs-actions.pod:3537 ../src/guestfs-actions.pod:3551 ../src/guestfs-actions.pod:4523 ../src/guestfs-actions.pod:5399 ../src/guestfs-actions.pod:5448 ../src/guestfs-actions.pod:6235 ../src/guestfs-actions.pod:6247 ../src/guestfs-actions.pod:6260 ../src/guestfs-actions.pod:6273 ../src/guestfs-actions.pod:6295 ../src/guestfs-actions.pod:6308 ../src/guestfs-actions.pod:6321 ../src/guestfs-actions.pod:6334 ../src/guestfs-actions.pod:7105 ../src/guestfs-actions.pod:7124 ../src/guestfs-actions.pod:7209 ../src/guestfs-actions.pod:7228 ../src/guestfs-actions.pod:7274 ../src/guestfs-actions.pod:7293
7357 msgid "(Added in 1.0.66)"
7361 #: ../src/guestfs-actions.pod:1365
7362 msgid "guestfs_egrepi"
7366 #: ../src/guestfs-actions.pod:1367
7370 " guestfs_egrepi (guestfs_h *g,\n"
7371 " const char *regex,\n"
7372 " const char *path);\n"
7377 #: ../src/guestfs-actions.pod:1372 ../fish/guestfish-actions.pod:910
7378 msgid "This calls the external C<egrep -i> program and returns the matching lines."
7382 #: ../src/guestfs-actions.pod:1384
7383 msgid "guestfs_equal"
7387 #: ../src/guestfs-actions.pod:1386
7391 " guestfs_equal (guestfs_h *g,\n"
7392 " const char *file1,\n"
7393 " const char *file2);\n"
7398 #: ../src/guestfs-actions.pod:1391 ../fish/guestfish-actions.pod:920
7400 "This compares the two files C<file1> and C<file2> and returns true if their "
7401 "content is exactly equal, or false otherwise."
7405 #: ../src/guestfs-actions.pod:1394 ../fish/guestfish-actions.pod:923
7406 msgid "The external L<cmp(1)> program is used for the comparison."
7410 #: ../src/guestfs-actions.pod:1400
7411 msgid "guestfs_exists"
7415 #: ../src/guestfs-actions.pod:1402
7419 " guestfs_exists (guestfs_h *g,\n"
7420 " const char *path);\n"
7425 #: ../src/guestfs-actions.pod:1406 ../fish/guestfish-actions.pod:929
7427 "This returns C<true> if and only if there is a file, directory (or anything) "
7428 "with the given C<path> name."
7432 #: ../src/guestfs-actions.pod:1409
7433 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
7437 #: ../src/guestfs-actions.pod:1415
7438 msgid "guestfs_fallocate"
7442 #: ../src/guestfs-actions.pod:1417
7446 " guestfs_fallocate (guestfs_h *g,\n"
7447 " const char *path,\n"
7453 #: ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:1448 ../fish/guestfish-actions.pod:938 ../fish/guestfish-actions.pod:957
7455 "This command preallocates a file (containing zero bytes) named C<path> of "
7456 "size C<len> bytes. If the file exists already, it is overwritten."
7460 #: ../src/guestfs-actions.pod:1426 ../fish/guestfish-actions.pod:942
7462 "Do not confuse this with the guestfish-specific C<alloc> command which "
7463 "allocates a file in the host and attaches it as a device."
7467 #: ../src/guestfs-actions.pod:1432 ../fish/guestfish-actions.pod:946
7469 "This function is deprecated. In new code, use the C<fallocate64> call "
7474 #: ../src/guestfs-actions.pod:1441
7475 msgid "guestfs_fallocate64"
7479 #: ../src/guestfs-actions.pod:1443
7483 " guestfs_fallocate64 (guestfs_h *g,\n"
7484 " const char *path,\n"
7490 #: ../src/guestfs-actions.pod:1452
7492 "Note that this call allocates disk blocks for the file. To create a sparse "
7493 "file use C<guestfs_truncate_size> instead."
7497 #: ../src/guestfs-actions.pod:1455
7499 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
7500 "oversight it only allowed 30 bit lengths to be specified, effectively "
7501 "limiting the maximum size of files created through that call to 1GB."
7505 #: ../src/guestfs-actions.pod:1460 ../fish/guestfish-actions.pod:969
7507 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
7508 "commands which create a file in the host and attach it as a device."
7512 #: ../src/guestfs-actions.pod:1466
7513 msgid "(Added in 1.3.17)"
7517 #: ../src/guestfs-actions.pod:1468
7518 msgid "guestfs_fgrep"
7522 #: ../src/guestfs-actions.pod:1470
7526 " guestfs_fgrep (guestfs_h *g,\n"
7527 " const char *pattern,\n"
7528 " const char *path);\n"
7533 #: ../src/guestfs-actions.pod:1475 ../fish/guestfish-actions.pod:977
7534 msgid "This calls the external C<fgrep> program and returns the matching lines."
7538 #: ../src/guestfs-actions.pod:1487
7539 msgid "guestfs_fgrepi"
7543 #: ../src/guestfs-actions.pod:1489
7547 " guestfs_fgrepi (guestfs_h *g,\n"
7548 " const char *pattern,\n"
7549 " const char *path);\n"
7554 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:987
7555 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
7559 #: ../src/guestfs-actions.pod:1506
7560 msgid "guestfs_file"
7564 #: ../src/guestfs-actions.pod:1508
7568 " guestfs_file (guestfs_h *g,\n"
7569 " const char *path);\n"
7574 #: ../src/guestfs-actions.pod:1512 ../fish/guestfish-actions.pod:997
7576 "This call uses the standard L<file(1)> command to determine the type or "
7577 "contents of the file."
7581 #: ../src/guestfs-actions.pod:1515 ../fish/guestfish-actions.pod:1000
7583 "This call will also transparently look inside various types of compressed "
7588 #: ../src/guestfs-actions.pod:1518 ../fish/guestfish-actions.pod:1003
7590 "The exact command which runs is C<file -zb path>. Note in particular that "
7591 "the filename is not prepended to the output (the C<-b> option)."
7595 #: ../src/guestfs-actions.pod:1522
7597 "This command can also be used on C</dev/> devices (and partitions, LV "
7598 "names). You can for example use this to determine if a device contains a "
7599 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
7603 #: ../src/guestfs-actions.pod:1527 ../fish/guestfish-actions.pod:1012
7605 "If the C<path> does not begin with C</dev/> then this command only works for "
7606 "the content of regular files. For other file types (directory, symbolic "
7607 "link etc) it will just return the string C<directory> etc."
7611 #: ../src/guestfs-actions.pod:1537
7612 msgid "guestfs_file_architecture"
7616 #: ../src/guestfs-actions.pod:1539
7620 " guestfs_file_architecture (guestfs_h *g,\n"
7621 " const char *filename);\n"
7626 #: ../src/guestfs-actions.pod:1543 ../fish/guestfish-actions.pod:1021
7628 "This detects the architecture of the binary C<filename>, and returns it if "
7633 #: ../src/guestfs-actions.pod:1546 ../fish/guestfish-actions.pod:1024
7634 msgid "Currently defined architectures are:"
7638 #: ../src/guestfs-actions.pod:1550 ../fish/guestfish-actions.pod:1028
7643 #: ../src/guestfs-actions.pod:1552 ../fish/guestfish-actions.pod:1030
7645 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
7646 "irrespective of the precise processor requirements of the binary."
7650 #: ../src/guestfs-actions.pod:1555 ../fish/guestfish-actions.pod:1033
7655 #: ../src/guestfs-actions.pod:1557 ../fish/guestfish-actions.pod:1035
7656 msgid "64 bit x86-64."
7660 #: ../src/guestfs-actions.pod:1559 ../fish/guestfish-actions.pod:1037
7665 #: ../src/guestfs-actions.pod:1561 ../fish/guestfish-actions.pod:1039
7666 msgid "32 bit SPARC."
7670 #: ../src/guestfs-actions.pod:1563 ../fish/guestfish-actions.pod:1041
7675 #: ../src/guestfs-actions.pod:1565 ../fish/guestfish-actions.pod:1043
7676 msgid "64 bit SPARC V9 and above."
7680 #: ../src/guestfs-actions.pod:1567 ../fish/guestfish-actions.pod:1045
7685 #: ../src/guestfs-actions.pod:1569 ../fish/guestfish-actions.pod:1047
7686 msgid "Intel Itanium."
7690 #: ../src/guestfs-actions.pod:1571 ../fish/guestfish-actions.pod:1049
7695 #: ../src/guestfs-actions.pod:1573 ../fish/guestfish-actions.pod:1051
7696 msgid "32 bit Power PC."
7700 #: ../src/guestfs-actions.pod:1575 ../fish/guestfish-actions.pod:1053
7705 #: ../src/guestfs-actions.pod:1577 ../fish/guestfish-actions.pod:1055
7706 msgid "64 bit Power PC."
7710 #: ../src/guestfs-actions.pod:1581 ../fish/guestfish-actions.pod:1059
7711 msgid "Libguestfs may return other architecture strings in future."
7715 #: ../src/guestfs-actions.pod:1583 ../fish/guestfish-actions.pod:1061
7716 msgid "The function works on at least the following types of files:"
7720 #: ../src/guestfs-actions.pod:1589 ../fish/guestfish-actions.pod:1067
7721 msgid "many types of Un*x and Linux binary"
7725 #: ../src/guestfs-actions.pod:1593 ../fish/guestfish-actions.pod:1071
7726 msgid "many types of Un*x and Linux shared library"
7730 #: ../src/guestfs-actions.pod:1597 ../fish/guestfish-actions.pod:1075
7731 msgid "Windows Win32 and Win64 binaries"
7735 #: ../src/guestfs-actions.pod:1601 ../fish/guestfish-actions.pod:1079
7736 msgid "Windows Win32 and Win64 DLLs"
7740 #: ../src/guestfs-actions.pod:1603 ../fish/guestfish-actions.pod:1081
7741 msgid "Win32 binaries and DLLs return C<i386>."
7745 #: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1083
7746 msgid "Win64 binaries and DLLs return C<x86_64>."
7750 #: ../src/guestfs-actions.pod:1609 ../fish/guestfish-actions.pod:1087
7751 msgid "Linux kernel modules"
7755 #: ../src/guestfs-actions.pod:1613 ../fish/guestfish-actions.pod:1091
7756 msgid "Linux new-style initrd images"
7760 #: ../src/guestfs-actions.pod:1617 ../fish/guestfish-actions.pod:1095
7761 msgid "some non-x86 Linux vmlinuz kernels"
7765 #: ../src/guestfs-actions.pod:1621 ../fish/guestfish-actions.pod:1099
7766 msgid "What it can't do currently:"
7770 #: ../src/guestfs-actions.pod:1627 ../fish/guestfish-actions.pod:1105
7771 msgid "static libraries (libfoo.a)"
7775 #: ../src/guestfs-actions.pod:1631 ../fish/guestfish-actions.pod:1109
7776 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
7780 #: ../src/guestfs-actions.pod:1635 ../fish/guestfish-actions.pod:1113
7781 msgid "x86 Linux vmlinuz kernels"
7785 #: ../src/guestfs-actions.pod:1637 ../fish/guestfish-actions.pod:1115
7787 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
7788 "compressed code, and are horribly hard to unpack. If you want to find the "
7789 "architecture of a kernel, use the architecture of the associated initrd or "
7790 "kernel module(s) instead."
7794 #: ../src/guestfs-actions.pod:1647 ../src/guestfs-actions.pod:1810 ../src/guestfs-actions.pod:1827 ../src/guestfs-actions.pod:2508 ../src/guestfs-actions.pod:2589 ../src/guestfs-actions.pod:2615 ../src/guestfs-actions.pod:2703 ../src/guestfs-actions.pod:2724 ../src/guestfs-actions.pod:2761 ../src/guestfs-actions.pod:2845 ../src/guestfs-actions.pod:2907 ../src/guestfs-actions.pod:3133 ../src/guestfs-actions.pod:3265
7795 msgid "(Added in 1.5.3)"
7799 #: ../src/guestfs-actions.pod:1649
7800 msgid "guestfs_filesize"
7804 #: ../src/guestfs-actions.pod:1651
7808 " guestfs_filesize (guestfs_h *g,\n"
7809 " const char *file);\n"
7814 #: ../src/guestfs-actions.pod:1655 ../fish/guestfish-actions.pod:1126
7815 msgid "This command returns the size of C<file> in bytes."
7819 #: ../src/guestfs-actions.pod:1657
7821 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
7822 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
7823 "devices, use C<guestfs_blockdev_getsize64>."
7827 #: ../src/guestfs-actions.pod:1663
7828 msgid "(Added in 1.0.82)"
7832 #: ../src/guestfs-actions.pod:1665
7833 msgid "guestfs_fill"
7837 #: ../src/guestfs-actions.pod:1667
7841 " guestfs_fill (guestfs_h *g,\n"
7844 " const char *path);\n"
7849 #: ../src/guestfs-actions.pod:1673 ../fish/guestfish-actions.pod:1136
7851 "This command creates a new file called C<path>. The initial content of the "
7852 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
7857 #: ../src/guestfs-actions.pod:1677
7859 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
7860 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
7861 "bytes use C<guestfs_fill_pattern>."
7865 #: ../src/guestfs-actions.pod:1689
7866 msgid "(Added in 1.0.79)"
7870 #: ../src/guestfs-actions.pod:1691
7871 msgid "guestfs_fill_pattern"
7875 #: ../src/guestfs-actions.pod:1693
7879 " guestfs_fill_pattern (guestfs_h *g,\n"
7880 " const char *pattern,\n"
7882 " const char *path);\n"
7887 #: ../src/guestfs-actions.pod:1699
7889 "This function is like C<guestfs_fill> except that it creates a new file of "
7890 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
7891 "pattern is truncated if necessary to ensure the length of the file is "
7892 "exactly C<len> bytes."
7896 #: ../src/guestfs-actions.pod:1711
7897 msgid "(Added in 1.3.12)"
7901 #: ../src/guestfs-actions.pod:1713
7902 msgid "guestfs_find"
7906 #: ../src/guestfs-actions.pod:1715
7910 " guestfs_find (guestfs_h *g,\n"
7911 " const char *directory);\n"
7916 #: ../src/guestfs-actions.pod:1719 ../fish/guestfish-actions.pod:1158
7918 "This command lists out all files and directories, recursively, starting at "
7919 "C<directory>. It is essentially equivalent to running the shell command "
7920 "C<find directory -print> but some post-processing happens on the output, "
7925 #: ../src/guestfs-actions.pod:1724 ../fish/guestfish-actions.pod:1163
7927 "This returns a list of strings I<without any prefix>. Thus if the directory "
7932 #: ../src/guestfs-actions.pod:1727 ../fish/guestfish-actions.pod:1166
7942 #: ../src/guestfs-actions.pod:1731
7943 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
7947 #: ../src/guestfs-actions.pod:1734 ../fish/guestfish-actions.pod:1173
7958 #: ../src/guestfs-actions.pod:1739 ../fish/guestfish-actions.pod:1178
7959 msgid "If C<directory> is not a directory, then this command returns an error."
7963 #: ../src/guestfs-actions.pod:1742 ../fish/guestfish-actions.pod:1181
7964 msgid "The returned list is sorted."
7968 #: ../src/guestfs-actions.pod:1744
7969 msgid "See also C<guestfs_find0>."
7973 #: ../src/guestfs-actions.pod:1753 ../src/guestfs-actions.pod:3954 ../src/guestfs-actions.pod:5483
7974 msgid "(Added in 1.0.27)"
7978 #: ../src/guestfs-actions.pod:1755
7979 msgid "guestfs_find0"
7983 #: ../src/guestfs-actions.pod:1757
7987 " guestfs_find0 (guestfs_h *g,\n"
7988 " const char *directory,\n"
7989 " const char *files);\n"
7994 #: ../src/guestfs-actions.pod:1762 ../fish/guestfish-actions.pod:1192
7996 "This command lists out all files and directories, recursively, starting at "
7997 "C<directory>, placing the resulting list in the external file called "
8002 #: ../src/guestfs-actions.pod:1766
8004 "This command works the same way as C<guestfs_find> with the following "
8009 #: ../src/guestfs-actions.pod:1773 ../fish/guestfish-actions.pod:1203
8010 msgid "The resulting list is written to an external file."
8014 #: ../src/guestfs-actions.pod:1777 ../fish/guestfish-actions.pod:1207
8016 "Items (filenames) in the result are separated by C<\\0> characters. See "
8017 "L<find(1)> option I<-print0>."
8021 #: ../src/guestfs-actions.pod:1782 ../fish/guestfish-actions.pod:1212
8022 msgid "This command is not limited in the number of names that it can return."
8026 #: ../src/guestfs-actions.pod:1787 ../fish/guestfish-actions.pod:1217
8027 msgid "The result list is not sorted."
8031 #: ../src/guestfs-actions.pod:1793
8032 msgid "(Added in 1.0.74)"
8036 #: ../src/guestfs-actions.pod:1795
8037 msgid "guestfs_findfs_label"
8041 #: ../src/guestfs-actions.pod:1797
8045 " guestfs_findfs_label (guestfs_h *g,\n"
8046 " const char *label);\n"
8051 #: ../src/guestfs-actions.pod:1801 ../fish/guestfish-actions.pod:1227
8053 "This command searches the filesystems and returns the one which has the "
8054 "given label. An error is returned if no such filesystem can be found."
8058 #: ../src/guestfs-actions.pod:1805
8059 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
8063 #: ../src/guestfs-actions.pod:1812
8064 msgid "guestfs_findfs_uuid"
8068 #: ../src/guestfs-actions.pod:1814
8072 " guestfs_findfs_uuid (guestfs_h *g,\n"
8073 " const char *uuid);\n"
8078 #: ../src/guestfs-actions.pod:1818 ../fish/guestfish-actions.pod:1237
8080 "This command searches the filesystems and returns the one which has the "
8081 "given UUID. An error is returned if no such filesystem can be found."
8085 #: ../src/guestfs-actions.pod:1822
8086 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
8090 #: ../src/guestfs-actions.pod:1829
8091 msgid "guestfs_fsck"
8095 #: ../src/guestfs-actions.pod:1831
8099 " guestfs_fsck (guestfs_h *g,\n"
8100 " const char *fstype,\n"
8101 " const char *device);\n"
8106 #: ../src/guestfs-actions.pod:1836 ../fish/guestfish-actions.pod:1247
8108 "This runs the filesystem checker (fsck) on C<device> which should have "
8109 "filesystem type C<fstype>."
8113 #: ../src/guestfs-actions.pod:1839 ../fish/guestfish-actions.pod:1250
8115 "The returned integer is the status. See L<fsck(8)> for the list of status "
8116 "codes from C<fsck>."
8120 #: ../src/guestfs-actions.pod:1848 ../fish/guestfish-actions.pod:1259
8121 msgid "Multiple status codes can be summed together."
8125 #: ../src/guestfs-actions.pod:1852 ../fish/guestfish-actions.pod:1263
8127 "A non-zero return code can mean \"success\", for example if errors have been "
8128 "corrected on the filesystem."
8132 #: ../src/guestfs-actions.pod:1857 ../fish/guestfish-actions.pod:1268
8133 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
8137 #: ../src/guestfs-actions.pod:1862 ../fish/guestfish-actions.pod:1273
8138 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
8142 #: ../src/guestfs-actions.pod:1866 ../src/guestfs-actions.pod:7147
8143 msgid "(Added in 1.0.16)"
8147 #: ../src/guestfs-actions.pod:1868
8148 msgid "guestfs_get_append"
8152 #: ../src/guestfs-actions.pod:1870
8156 " guestfs_get_append (guestfs_h *g);\n"
8161 #: ../src/guestfs-actions.pod:1873 ../fish/guestfish-actions.pod:1279
8163 "Return the additional kernel options which are added to the guest kernel "
8168 #: ../src/guestfs-actions.pod:1876 ../fish/guestfish-actions.pod:1282
8169 msgid "If C<NULL> then no options are added."
8173 #: ../src/guestfs-actions.pod:1878
8175 "This function returns a string which may be NULL. There is no way to return "
8176 "an error from this function. The string is owned by the guest handle and "
8177 "must I<not> be freed."
8181 #: ../src/guestfs-actions.pod:1882 ../src/guestfs-actions.pod:5161 ../src/guestfs-actions.pod:5641 ../src/guestfs-actions.pod:6009 ../src/guestfs-actions.pod:6028 ../src/guestfs-actions.pod:6044 ../src/guestfs-actions.pod:6061 ../src/guestfs-actions.pod:6818 ../src/guestfs-actions.pod:6836 ../src/guestfs-actions.pod:7190
8182 msgid "(Added in 1.0.26)"
8186 #: ../src/guestfs-actions.pod:1884
8187 msgid "guestfs_get_autosync"
8191 #: ../src/guestfs-actions.pod:1886
8195 " guestfs_get_autosync (guestfs_h *g);\n"
8200 #: ../src/guestfs-actions.pod:1889 ../fish/guestfish-actions.pod:1288
8201 msgid "Get the autosync flag."
8205 #: ../src/guestfs-actions.pod:1895
8206 msgid "guestfs_get_direct"
8210 #: ../src/guestfs-actions.pod:1897
8214 " guestfs_get_direct (guestfs_h *g);\n"
8219 #: ../src/guestfs-actions.pod:1900 ../fish/guestfish-actions.pod:1294
8220 msgid "Return the direct appliance mode flag."
8224 #: ../src/guestfs-actions.pod:1904 ../src/guestfs-actions.pod:5682
8225 msgid "(Added in 1.0.72)"
8229 #: ../src/guestfs-actions.pod:1906
8230 msgid "guestfs_get_e2label"
8234 #: ../src/guestfs-actions.pod:1908
8238 " guestfs_get_e2label (guestfs_h *g,\n"
8239 " const char *device);\n"
8244 #: ../src/guestfs-actions.pod:1912 ../fish/guestfish-actions.pod:1300
8245 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
8249 #: ../src/guestfs-actions.pod:1918 ../fish/guestfish-actions.pod:1303
8251 "This function is deprecated. In new code, use the C<vfs_label> call "
8256 #: ../src/guestfs-actions.pod:1925 ../src/guestfs-actions.pod:1946 ../src/guestfs-actions.pod:5700 ../src/guestfs-actions.pod:5719
8257 msgid "(Added in 1.0.15)"
8261 #: ../src/guestfs-actions.pod:1927
8262 msgid "guestfs_get_e2uuid"
8266 #: ../src/guestfs-actions.pod:1929
8270 " guestfs_get_e2uuid (guestfs_h *g,\n"
8271 " const char *device);\n"
8276 #: ../src/guestfs-actions.pod:1933 ../fish/guestfish-actions.pod:1314
8277 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
8281 #: ../src/guestfs-actions.pod:1939 ../fish/guestfish-actions.pod:1317
8282 msgid "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
8286 #: ../src/guestfs-actions.pod:1948
8287 msgid "guestfs_get_memsize"
8291 #: ../src/guestfs-actions.pod:1950
8295 " guestfs_get_memsize (guestfs_h *g);\n"
8300 #: ../src/guestfs-actions.pod:1953 ../fish/guestfish-actions.pod:1328
8301 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
8305 #: ../src/guestfs-actions.pod:1956
8307 "If C<guestfs_set_memsize> was not called on this handle, and if "
8308 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
8309 "value for memsize."
8313 #: ../src/guestfs-actions.pod:1960 ../src/guestfs-actions.pod:2041 ../src/guestfs-actions.pod:5735 ../src/guestfs-actions.pod:5842 ../fish/guestfish-actions.pod:1335 ../fish/guestfish-actions.pod:1386 ../fish/guestfish-actions.pod:3841 ../fish/guestfish-actions.pod:3928
8314 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
8318 #: ../src/guestfs-actions.pod:1965 ../src/guestfs-actions.pod:4245 ../src/guestfs-actions.pod:4428 ../src/guestfs-actions.pod:4447 ../src/guestfs-actions.pod:4466 ../src/guestfs-actions.pod:4478 ../src/guestfs-actions.pod:4495 ../src/guestfs-actions.pod:4508 ../src/guestfs-actions.pod:5386 ../src/guestfs-actions.pod:5740 ../src/guestfs-actions.pod:5983 ../src/guestfs-actions.pod:6584
8319 msgid "(Added in 1.0.55)"
8323 #: ../src/guestfs-actions.pod:1967
8324 msgid "guestfs_get_network"
8328 #: ../src/guestfs-actions.pod:1969
8332 " guestfs_get_network (guestfs_h *g);\n"
8337 #: ../src/guestfs-actions.pod:1972 ../fish/guestfish-actions.pod:1342
8338 msgid "This returns the enable network flag."
8342 #: ../src/guestfs-actions.pod:1976 ../src/guestfs-actions.pod:5759
8343 msgid "(Added in 1.5.4)"
8347 #: ../src/guestfs-actions.pod:1978
8348 msgid "guestfs_get_path"
8352 #: ../src/guestfs-actions.pod:1980
8356 " guestfs_get_path (guestfs_h *g);\n"
8361 #: ../src/guestfs-actions.pod:1983 ../fish/guestfish-actions.pod:1348
8362 msgid "Return the current search path."
8366 #: ../src/guestfs-actions.pod:1985 ../fish/guestfish-actions.pod:1350
8368 "This is always non-NULL. If it wasn't set already, then this will return "
8373 #: ../src/guestfs-actions.pod:1988 ../src/guestfs-actions.pod:2017
8375 "This function returns a string, or NULL on error. The string is owned by "
8376 "the guest handle and must I<not> be freed."
8380 #: ../src/guestfs-actions.pod:1993
8381 msgid "guestfs_get_pid"
8385 #: ../src/guestfs-actions.pod:1995
8389 " guestfs_get_pid (guestfs_h *g);\n"
8394 #: ../src/guestfs-actions.pod:1998 ../fish/guestfish-actions.pod:1359
8396 "Return the process ID of the qemu subprocess. If there is no qemu "
8397 "subprocess, then this will return an error."
8401 #: ../src/guestfs-actions.pod:2001 ../fish/guestfish-actions.pod:1362
8402 msgid "This is an internal call used for debugging and testing."
8406 #: ../src/guestfs-actions.pod:2005
8407 msgid "(Added in 1.0.56)"
8411 #: ../src/guestfs-actions.pod:2007
8412 msgid "guestfs_get_qemu"
8416 #: ../src/guestfs-actions.pod:2009
8420 " guestfs_get_qemu (guestfs_h *g);\n"
8425 #: ../src/guestfs-actions.pod:2012 ../fish/guestfish-actions.pod:1368
8426 msgid "Return the current qemu binary."
8430 #: ../src/guestfs-actions.pod:2014 ../fish/guestfish-actions.pod:1370
8432 "This is always non-NULL. If it wasn't set already, then this will return "
8433 "the default qemu binary name."
8437 #: ../src/guestfs-actions.pod:2020 ../src/guestfs-actions.pod:5804
8438 msgid "(Added in 1.0.6)"
8442 #: ../src/guestfs-actions.pod:2022
8443 msgid "guestfs_get_recovery_proc"
8447 #: ../src/guestfs-actions.pod:2024
8451 " guestfs_get_recovery_proc (guestfs_h *g);\n"
8456 #: ../src/guestfs-actions.pod:2027 ../fish/guestfish-actions.pod:1377
8457 msgid "Return the recovery process enabled flag."
8461 #: ../src/guestfs-actions.pod:2031 ../src/guestfs-actions.pod:3355 ../src/guestfs-actions.pod:3652 ../src/guestfs-actions.pod:4052 ../src/guestfs-actions.pod:4084 ../src/guestfs-actions.pod:5091 ../src/guestfs-actions.pod:5434 ../src/guestfs-actions.pod:5828 ../src/guestfs-actions.pod:6487 ../src/guestfs-actions.pod:6507 ../src/guestfs-actions.pod:6699
8462 msgid "(Added in 1.0.77)"
8466 #: ../src/guestfs-actions.pod:2033
8467 msgid "guestfs_get_selinux"
8471 #: ../src/guestfs-actions.pod:2035
8475 " guestfs_get_selinux (guestfs_h *g);\n"
8480 #: ../src/guestfs-actions.pod:2038
8482 "This returns the current setting of the selinux flag which is passed to the "
8483 "appliance at boot time. See C<guestfs_set_selinux>."
8487 #: ../src/guestfs-actions.pod:2046 ../src/guestfs-actions.pod:2109 ../src/guestfs-actions.pod:5847 ../src/guestfs-actions.pod:5901
8488 msgid "(Added in 1.0.67)"
8492 #: ../src/guestfs-actions.pod:2048
8493 msgid "guestfs_get_state"
8497 #: ../src/guestfs-actions.pod:2050
8501 " guestfs_get_state (guestfs_h *g);\n"
8506 #: ../src/guestfs-actions.pod:2053 ../fish/guestfish-actions.pod:1393
8508 "This returns the current state as an opaque integer. This is only useful "
8509 "for printing debug and internal error messages."
8513 #: ../src/guestfs-actions.pod:2056 ../src/guestfs-actions.pod:3158 ../src/guestfs-actions.pod:3187 ../src/guestfs-actions.pod:3248 ../src/guestfs-actions.pod:3275 ../fish/guestfish-actions.pod:1396 ../fish/guestfish-actions.pod:2210 ../fish/guestfish-actions.pod:2228 ../fish/guestfish-actions.pod:2266 ../fish/guestfish-actions.pod:2282
8514 msgid "For more information on states, see L<guestfs(3)>."
8518 #: ../src/guestfs-actions.pod:2062
8519 msgid "guestfs_get_trace"
8523 #: ../src/guestfs-actions.pod:2064
8527 " guestfs_get_trace (guestfs_h *g);\n"
8532 #: ../src/guestfs-actions.pod:2067 ../fish/guestfish-actions.pod:1402
8533 msgid "Return the command trace flag."
8537 #: ../src/guestfs-actions.pod:2073
8538 msgid "guestfs_get_umask"
8542 #: ../src/guestfs-actions.pod:2075
8546 " guestfs_get_umask (guestfs_h *g);\n"
8551 #: ../src/guestfs-actions.pod:2078
8553 "Return the current umask. By default the umask is C<022> unless it has been "
8554 "set by calling C<guestfs_umask>."
8558 #: ../src/guestfs-actions.pod:2085
8559 msgid "guestfs_get_verbose"
8563 #: ../src/guestfs-actions.pod:2087
8567 " guestfs_get_verbose (guestfs_h *g);\n"
8572 #: ../src/guestfs-actions.pod:2090 ../fish/guestfish-actions.pod:1415
8573 msgid "This returns the verbose messages flag."
8577 #: ../src/guestfs-actions.pod:2096
8578 msgid "guestfs_getcon"
8582 #: ../src/guestfs-actions.pod:2098
8586 " guestfs_getcon (guestfs_h *g);\n"
8591 #: ../src/guestfs-actions.pod:2101 ../fish/guestfish-actions.pod:1421
8592 msgid "This gets the SELinux security context of the daemon."
8596 #: ../src/guestfs-actions.pod:2103
8597 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
8601 #: ../src/guestfs-actions.pod:2111
8602 msgid "guestfs_getxattr"
8606 #: ../src/guestfs-actions.pod:2113
8610 " guestfs_getxattr (guestfs_h *g,\n"
8611 " const char *path,\n"
8612 " const char *name,\n"
8613 " size_t *size_r);\n"
8618 #: ../src/guestfs-actions.pod:2119
8620 "Get a single extended attribute from file C<path> named C<name>. This call "
8621 "follows symlinks. If you want to lookup an extended attribute for the "
8622 "symlink itself, use C<guestfs_lgetxattr>."
8626 #: ../src/guestfs-actions.pod:2123 ../src/guestfs-actions.pod:3369
8628 "Normally it is better to get all extended attributes from a file in one go "
8629 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
8630 "implementations are buggy and do not provide a way to list out attributes. "
8631 "For these filesystems (notably ntfs-3g) you have to know the names of the "
8632 "extended attributes you want in advance and call this function."
8636 #: ../src/guestfs-actions.pod:2130 ../src/guestfs-actions.pod:3376 ../fish/guestfish-actions.pod:1441 ../fish/guestfish-actions.pod:2347
8638 "Extended attribute values are blobs of binary data. If there is no extended "
8639 "attribute named C<name>, this returns an error."
8643 #: ../src/guestfs-actions.pod:2133
8644 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
8648 #: ../src/guestfs-actions.pod:2135 ../src/guestfs-actions.pod:2326 ../src/guestfs-actions.pod:3381 ../src/guestfs-actions.pod:5084 ../src/guestfs-actions.pod:5110 ../src/guestfs-actions.pod:5291
8650 "This function returns a buffer, or NULL on error. The size of the returned "
8651 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
8656 #: ../src/guestfs-actions.pod:2139 ../src/guestfs-actions.pod:3385
8657 msgid "(Added in 1.7.24)"
8661 #: ../src/guestfs-actions.pod:2141
8662 msgid "guestfs_getxattrs"
8666 #: ../src/guestfs-actions.pod:2143
8669 " struct guestfs_xattr_list *\n"
8670 " guestfs_getxattrs (guestfs_h *g,\n"
8671 " const char *path);\n"
8676 #: ../src/guestfs-actions.pod:2147 ../fish/guestfish-actions.pod:1450
8677 msgid "This call lists the extended attributes of the file or directory C<path>."
8681 #: ../src/guestfs-actions.pod:2150 ../fish/guestfish-actions.pod:1453
8683 "At the system call level, this is a combination of the L<listxattr(2)> and "
8684 "L<getxattr(2)> calls."
8688 #: ../src/guestfs-actions.pod:2153
8689 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
8693 #: ../src/guestfs-actions.pod:2155 ../src/guestfs-actions.pod:3397 ../src/guestfs-actions.pod:4048
8695 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
8696 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
8700 #: ../src/guestfs-actions.pod:2159 ../src/guestfs-actions.pod:3401 ../src/guestfs-actions.pod:3566 ../src/guestfs-actions.pod:3602 ../src/guestfs-actions.pod:5464 ../src/guestfs-actions.pod:5920 ../src/guestfs-actions.pod:7255
8701 msgid "(Added in 1.0.59)"
8705 #: ../src/guestfs-actions.pod:2161
8706 msgid "guestfs_glob_expand"
8710 #: ../src/guestfs-actions.pod:2163
8714 " guestfs_glob_expand (guestfs_h *g,\n"
8715 " const char *pattern);\n"
8720 #: ../src/guestfs-actions.pod:2167 ../fish/guestfish-actions.pod:1462
8722 "This command searches for all the pathnames matching C<pattern> according to "
8723 "the wildcard expansion rules used by the shell."
8727 #: ../src/guestfs-actions.pod:2171 ../fish/guestfish-actions.pod:1466
8728 msgid "If no paths match, then this returns an empty list (note: not an error)."
8732 #: ../src/guestfs-actions.pod:2174 ../fish/guestfish-actions.pod:1469
8734 "It is just a wrapper around the C L<glob(3)> function with flags "
8735 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
8739 #: ../src/guestfs-actions.pod:2182 ../src/guestfs-actions.pod:6085 ../src/guestfs-actions.pod:6102
8740 msgid "(Added in 1.0.50)"
8744 #: ../src/guestfs-actions.pod:2184
8745 msgid "guestfs_grep"
8749 #: ../src/guestfs-actions.pod:2186
8753 " guestfs_grep (guestfs_h *g,\n"
8754 " const char *regex,\n"
8755 " const char *path);\n"
8760 #: ../src/guestfs-actions.pod:2191 ../fish/guestfish-actions.pod:1477
8761 msgid "This calls the external C<grep> program and returns the matching lines."
8765 #: ../src/guestfs-actions.pod:2203
8766 msgid "guestfs_grepi"
8770 #: ../src/guestfs-actions.pod:2205
8774 " guestfs_grepi (guestfs_h *g,\n"
8775 " const char *regex,\n"
8776 " const char *path);\n"
8781 #: ../src/guestfs-actions.pod:2210 ../fish/guestfish-actions.pod:1487
8782 msgid "This calls the external C<grep -i> program and returns the matching lines."
8786 #: ../src/guestfs-actions.pod:2222
8787 msgid "guestfs_grub_install"
8791 #: ../src/guestfs-actions.pod:2224
8795 " guestfs_grub_install (guestfs_h *g,\n"
8796 " const char *root,\n"
8797 " const char *device);\n"
8802 #: ../src/guestfs-actions.pod:2229 ../fish/guestfish-actions.pod:1497
8804 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
8805 "the root directory being C<root>."
8809 #: ../src/guestfs-actions.pod:2232 ../fish/guestfish-actions.pod:1500
8811 "Note: If grub-install reports the error \"No suitable drive was found in the "
8812 "generated device map.\" it may be that you need to create a "
8813 "C</boot/grub/device.map> file first that contains the mapping between grub "
8814 "device names and Linux device names. It is usually sufficient to create a "
8819 #: ../src/guestfs-actions.pod:2239 ../fish/guestfish-actions.pod:1507
8827 #: ../src/guestfs-actions.pod:2241 ../fish/guestfish-actions.pod:1509
8828 msgid "replacing C</dev/vda> with the name of the installation device."
8832 #: ../src/guestfs-actions.pod:2245
8833 msgid "(Added in 1.0.17)"
8837 #: ../src/guestfs-actions.pod:2247
8838 msgid "guestfs_head"
8842 #: ../src/guestfs-actions.pod:2249
8846 " guestfs_head (guestfs_h *g,\n"
8847 " const char *path);\n"
8852 #: ../src/guestfs-actions.pod:2253 ../fish/guestfish-actions.pod:1515
8854 "This command returns up to the first 10 lines of a file as a list of "
8859 #: ../src/guestfs-actions.pod:2265
8860 msgid "guestfs_head_n"
8864 #: ../src/guestfs-actions.pod:2267
8868 " guestfs_head_n (guestfs_h *g,\n"
8870 " const char *path);\n"
8875 #: ../src/guestfs-actions.pod:2272 ../fish/guestfish-actions.pod:1525
8877 "If the parameter C<nrlines> is a positive number, this returns the first "
8878 "C<nrlines> lines of the file C<path>."
8882 #: ../src/guestfs-actions.pod:2275 ../fish/guestfish-actions.pod:1528
8884 "If the parameter C<nrlines> is a negative number, this returns lines from "
8885 "the file C<path>, excluding the last C<nrlines> lines."
8889 #: ../src/guestfs-actions.pod:2278 ../src/guestfs-actions.pod:6382 ../fish/guestfish-actions.pod:1531 ../fish/guestfish-actions.pod:4274
8890 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
8894 #: ../src/guestfs-actions.pod:2289
8895 msgid "guestfs_hexdump"
8899 #: ../src/guestfs-actions.pod:2291
8903 " guestfs_hexdump (guestfs_h *g,\n"
8904 " const char *path);\n"
8909 #: ../src/guestfs-actions.pod:2295 ../fish/guestfish-actions.pod:1540
8911 "This runs C<hexdump -C> on the given C<path>. The result is the "
8912 "human-readable, canonical hex dump of the file."
8916 #: ../src/guestfs-actions.pod:2304 ../src/guestfs-actions.pod:6166 ../src/guestfs-actions.pod:6221
8917 msgid "(Added in 1.0.22)"
8921 #: ../src/guestfs-actions.pod:2306
8922 msgid "guestfs_initrd_cat"
8926 #: ../src/guestfs-actions.pod:2308
8930 " guestfs_initrd_cat (guestfs_h *g,\n"
8931 " const char *initrdpath,\n"
8932 " const char *filename,\n"
8933 " size_t *size_r);\n"
8938 #: ../src/guestfs-actions.pod:2314 ../fish/guestfish-actions.pod:1550
8940 "This command unpacks the file C<filename> from the initrd file called "
8941 "C<initrdpath>. The filename must be given I<without> the initial C</> "
8946 #: ../src/guestfs-actions.pod:2318 ../fish/guestfish-actions.pod:1554
8948 "For example, in guestfish you could use the following command to examine the "
8949 "boot script (usually called C</init>) contained in a Linux initrd or "
8954 #: ../src/guestfs-actions.pod:2322 ../fish/guestfish-actions.pod:1558
8957 " initrd-cat /boot/initrd-<version>.img init\n"
8962 #: ../src/guestfs-actions.pod:2324
8963 msgid "See also C<guestfs_initrd_list>."
8967 #: ../src/guestfs-actions.pod:2335
8968 msgid "guestfs_initrd_list"
8972 #: ../src/guestfs-actions.pod:2337
8976 " guestfs_initrd_list (guestfs_h *g,\n"
8977 " const char *path);\n"
8982 #: ../src/guestfs-actions.pod:2341 ../fish/guestfish-actions.pod:1569
8983 msgid "This command lists out files contained in an initrd."
8987 #: ../src/guestfs-actions.pod:2343 ../fish/guestfish-actions.pod:1571
8989 "The files are listed without any initial C</> character. The files are "
8990 "listed in the order they appear (not necessarily alphabetical). Directory "
8991 "names are listed as separate items."
8995 #: ../src/guestfs-actions.pod:2347 ../fish/guestfish-actions.pod:1575
8997 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
8998 "initrd. We I<only> support the newer initramfs format (compressed cpio "
9003 #: ../src/guestfs-actions.pod:2357
9004 msgid "guestfs_inotify_add_watch"
9008 #: ../src/guestfs-actions.pod:2359
9012 " guestfs_inotify_add_watch (guestfs_h *g,\n"
9013 " const char *path,\n"
9019 #: ../src/guestfs-actions.pod:2364 ../fish/guestfish-actions.pod:1583
9020 msgid "Watch C<path> for the events listed in C<mask>."
9024 #: ../src/guestfs-actions.pod:2366 ../fish/guestfish-actions.pod:1585
9026 "Note that if C<path> is a directory then events within that directory are "
9027 "watched, but this does I<not> happen recursively (in subdirectories)."
9031 #: ../src/guestfs-actions.pod:2370 ../fish/guestfish-actions.pod:1589
9033 "Note for non-C or non-Linux callers: the inotify events are defined by the "
9034 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
9038 #: ../src/guestfs-actions.pod:2378
9039 msgid "guestfs_inotify_close"
9043 #: ../src/guestfs-actions.pod:2380
9047 " guestfs_inotify_close (guestfs_h *g);\n"
9052 #: ../src/guestfs-actions.pod:2383 ../fish/guestfish-actions.pod:1597
9054 "This closes the inotify handle which was previously opened by inotify_init. "
9055 "It removes all watches, throws away any pending events, and deallocates all "
9060 #: ../src/guestfs-actions.pod:2391
9061 msgid "guestfs_inotify_files"
9065 #: ../src/guestfs-actions.pod:2393
9069 " guestfs_inotify_files (guestfs_h *g);\n"
9074 #: ../src/guestfs-actions.pod:2396
9076 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
9077 "returns a list of pathnames of objects that were touched. The returned "
9078 "pathnames are sorted and deduplicated."
9082 #: ../src/guestfs-actions.pod:2406
9083 msgid "guestfs_inotify_init"
9087 #: ../src/guestfs-actions.pod:2408
9091 " guestfs_inotify_init (guestfs_h *g,\n"
9092 " int maxevents);\n"
9097 #: ../src/guestfs-actions.pod:2412 ../fish/guestfish-actions.pod:1613
9099 "This command creates a new inotify handle. The inotify subsystem can be "
9100 "used to notify events which happen to objects in the guest filesystem."
9104 #: ../src/guestfs-actions.pod:2416
9106 "C<maxevents> is the maximum number of events which will be queued up between "
9107 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
9108 "passed as C<0>, then the kernel (or previously set) default is used. For "
9109 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
9110 "throws away events, but records the fact that it threw them away by setting "
9111 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
9112 "C<guestfs_inotify_read>)."
9116 #: ../src/guestfs-actions.pod:2426
9118 "Before any events are generated, you have to add some watches to the "
9119 "internal watch list. See: C<guestfs_inotify_add_watch>, "
9120 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
9124 #: ../src/guestfs-actions.pod:2432
9126 "Queued up events should be read periodically by calling "
9127 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
9128 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
9129 "often enough then you risk the internal queue overflowing."
9133 #: ../src/guestfs-actions.pod:2439
9135 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
9136 "This also removes any watches automatically."
9140 #: ../src/guestfs-actions.pod:2443 ../fish/guestfish-actions.pod:1644
9142 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
9143 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
9144 "that there is one global inotify handle per libguestfs instance."
9148 #: ../src/guestfs-actions.pod:2452
9149 msgid "guestfs_inotify_read"
9153 #: ../src/guestfs-actions.pod:2454
9156 " struct guestfs_inotify_event_list *\n"
9157 " guestfs_inotify_read (guestfs_h *g);\n"
9162 #: ../src/guestfs-actions.pod:2457 ../fish/guestfish-actions.pod:1653
9164 "Return the complete queue of events that have happened since the previous "
9169 #: ../src/guestfs-actions.pod:2460 ../fish/guestfish-actions.pod:1656
9170 msgid "If no events have happened, this returns an empty list."
9174 #: ../src/guestfs-actions.pod:2462 ../fish/guestfish-actions.pod:1658
9176 "I<Note>: In order to make sure that all events have been read, you must call "
9177 "this function repeatedly until it returns an empty list. The reason is that "
9178 "the call will read events up to the maximum appliance-to-host message size "
9179 "and leave remaining events in the queue."
9183 #: ../src/guestfs-actions.pod:2468
9185 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
9186 "there was an error. I<The caller must call "
9187 "C<guestfs_free_inotify_event_list> after use>."
9191 #: ../src/guestfs-actions.pod:2474
9192 msgid "guestfs_inotify_rm_watch"
9196 #: ../src/guestfs-actions.pod:2476
9200 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
9206 #: ../src/guestfs-actions.pod:2480
9208 "Remove a previously defined inotify watch. See "
9209 "C<guestfs_inotify_add_watch>."
9213 #: ../src/guestfs-actions.pod:2487
9214 msgid "guestfs_inspect_get_arch"
9218 #: ../src/guestfs-actions.pod:2489
9222 " guestfs_inspect_get_arch (guestfs_h *g,\n"
9223 " const char *root);\n"
9228 #: ../src/guestfs-actions.pod:2493 ../src/guestfs-actions.pod:2516 ../src/guestfs-actions.pod:2597 ../src/guestfs-actions.pod:2623 ../src/guestfs-actions.pod:2662 ../src/guestfs-actions.pod:2684 ../src/guestfs-actions.pod:2711 ../src/guestfs-actions.pod:2732 ../src/guestfs-actions.pod:2769 ../src/guestfs-actions.pod:2798 ../src/guestfs-actions.pod:2829 ../src/guestfs-actions.pod:2873 ../src/guestfs-actions.pod:2915 ../src/guestfs-actions.pod:2938 ../src/guestfs-actions.pod:2955 ../src/guestfs-actions.pod:2972 ../src/guestfs-actions.pod:2991
9230 "This function should only be called with a root device string as returned by "
9231 "C<guestfs_inspect_os>."
9235 #: ../src/guestfs-actions.pod:2496
9237 "This returns the architecture of the inspected operating system. The "
9238 "possible return values are listed under C<guestfs_file_architecture>."
9242 #: ../src/guestfs-actions.pod:2500 ../fish/guestfish-actions.pod:1682
9244 "If the architecture could not be determined, then the string C<unknown> is "
9249 #: ../src/guestfs-actions.pod:2503 ../src/guestfs-actions.pod:2584 ../src/guestfs-actions.pod:2651 ../src/guestfs-actions.pod:2671 ../src/guestfs-actions.pod:2699 ../src/guestfs-actions.pod:2785 ../src/guestfs-actions.pod:2816 ../src/guestfs-actions.pod:2840 ../src/guestfs-actions.pod:2859 ../src/guestfs-actions.pod:2902 ../src/guestfs-actions.pod:2925 ../src/guestfs-actions.pod:2945 ../src/guestfs-actions.pod:2962 ../src/guestfs-actions.pod:2981 ../src/guestfs-actions.pod:3084 ../src/guestfs-actions.pod:3125 ../fish/guestfish-actions.pod:1685 ../fish/guestfish-actions.pod:1759 ../fish/guestfish-actions.pod:1811 ../fish/guestfish-actions.pod:1826 ../fish/guestfish-actions.pod:1847 ../fish/guestfish-actions.pod:1911 ../fish/guestfish-actions.pod:1935 ../fish/guestfish-actions.pod:1952 ../fish/guestfish-actions.pod:1965 ../fish/guestfish-actions.pod:2000 ../fish/guestfish-actions.pod:2016 ../fish/guestfish-actions.pod:2029 ../fish/guestfish-actions.pod:2042 ../fish/guestfish-actions.pod:2057 ../fish/guestfish-actions.pod:2156 ../fish/guestfish-actions.pod:2190
9250 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
9254 #: ../src/guestfs-actions.pod:2510
9255 msgid "guestfs_inspect_get_distro"
9259 #: ../src/guestfs-actions.pod:2512
9263 " guestfs_inspect_get_distro (guestfs_h *g,\n"
9264 " const char *root);\n"
9269 #: ../src/guestfs-actions.pod:2519 ../fish/guestfish-actions.pod:1694
9270 msgid "This returns the distro (distribution) of the inspected operating system."
9274 #: ../src/guestfs-actions.pod:2522 ../fish/guestfish-actions.pod:1697
9275 msgid "Currently defined distros are:"
9279 #: ../src/guestfs-actions.pod:2526 ../fish/guestfish-actions.pod:1701
9280 msgid "\"archlinux\""
9284 #: ../src/guestfs-actions.pod:2528 ../fish/guestfish-actions.pod:1703
9289 #: ../src/guestfs-actions.pod:2530 ../fish/guestfish-actions.pod:1705
9294 #: ../src/guestfs-actions.pod:2532 ../fish/guestfish-actions.pod:1707
9299 #: ../src/guestfs-actions.pod:2534 ../fish/guestfish-actions.pod:1709
9304 #: ../src/guestfs-actions.pod:2536 ../fish/guestfish-actions.pod:1711
9309 #: ../src/guestfs-actions.pod:2538 ../fish/guestfish-actions.pod:1713
9314 #: ../src/guestfs-actions.pod:2540 ../fish/guestfish-actions.pod:1715
9319 #: ../src/guestfs-actions.pod:2542 ../fish/guestfish-actions.pod:1717
9320 msgid "\"linuxmint\""
9324 #: ../src/guestfs-actions.pod:2544 ../fish/guestfish-actions.pod:1719
9329 #: ../src/guestfs-actions.pod:2546 ../fish/guestfish-actions.pod:1721
9330 msgid "\"mandriva\""
9334 #: ../src/guestfs-actions.pod:2548 ../fish/guestfish-actions.pod:1723
9339 #: ../src/guestfs-actions.pod:2550 ../fish/guestfish-actions.pod:1725
9344 #: ../src/guestfs-actions.pod:2552 ../fish/guestfish-actions.pod:1727
9349 #: ../src/guestfs-actions.pod:2554 ../fish/guestfish-actions.pod:1729
9354 #: ../src/guestfs-actions.pod:2556 ../fish/guestfish-actions.pod:1731
9359 #: ../src/guestfs-actions.pod:2558 ../fish/guestfish-actions.pod:1733
9360 msgid "\"redhat-based\""
9364 #: ../src/guestfs-actions.pod:2560 ../fish/guestfish-actions.pod:1735
9365 msgid "Some Red Hat-derived distro."
9369 #: ../src/guestfs-actions.pod:2562 ../fish/guestfish-actions.pod:1737
9374 #: ../src/guestfs-actions.pod:2564 ../fish/guestfish-actions.pod:1739
9375 msgid "Red Hat Enterprise Linux and some derivatives."
9379 #: ../src/guestfs-actions.pod:2566 ../fish/guestfish-actions.pod:1741
9384 #: ../src/guestfs-actions.pod:2568 ../fish/guestfish-actions.pod:1743
9389 #: ../src/guestfs-actions.pod:2570 ../src/guestfs-actions.pod:2642 ../src/guestfs-actions.pod:2893 ../fish/guestfish-actions.pod:1745 ../fish/guestfish-actions.pod:1802 ../fish/guestfish-actions.pod:1991
9394 #: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:1747
9395 msgid "The distro could not be determined."
9399 #: ../src/guestfs-actions.pod:2574 ../src/guestfs-actions.pod:2885 ../fish/guestfish-actions.pod:1749 ../fish/guestfish-actions.pod:1983
9404 #: ../src/guestfs-actions.pod:2576 ../fish/guestfish-actions.pod:1751
9406 "Windows does not have distributions. This string is returned if the OS type "
9411 #: ../src/guestfs-actions.pod:2581 ../src/guestfs-actions.pod:2648 ../src/guestfs-actions.pod:2899 ../fish/guestfish-actions.pod:1756 ../fish/guestfish-actions.pod:1808 ../fish/guestfish-actions.pod:1997
9413 "Future versions of libguestfs may return other strings here. The caller "
9414 "should be prepared to handle any string."
9418 #: ../src/guestfs-actions.pod:2591
9419 msgid "guestfs_inspect_get_filesystems"
9423 #: ../src/guestfs-actions.pod:2593
9427 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
9428 " const char *root);\n"
9433 #: ../src/guestfs-actions.pod:2600 ../fish/guestfish-actions.pod:1768
9435 "This returns a list of all the filesystems that we think are associated with "
9436 "this operating system. This includes the root filesystem, other ordinary "
9437 "filesystems, and non-mounted devices like swap partitions."
9441 #: ../src/guestfs-actions.pod:2605 ../fish/guestfish-actions.pod:1773
9443 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
9444 "to be shared between operating systems."
9448 #: ../src/guestfs-actions.pod:2608
9450 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
9451 "C<guestfs_inspect_get_mountpoints>."
9455 #: ../src/guestfs-actions.pod:2617
9456 msgid "guestfs_inspect_get_format"
9460 #: ../src/guestfs-actions.pod:2619
9464 " guestfs_inspect_get_format (guestfs_h *g,\n"
9465 " const char *root);\n"
9470 #: ../src/guestfs-actions.pod:2626 ../fish/guestfish-actions.pod:1786
9472 "This returns the format of the inspected operating system. You can use it "
9473 "to detect install images, live CDs and similar."
9477 #: ../src/guestfs-actions.pod:2629 ../fish/guestfish-actions.pod:1789
9478 msgid "Currently defined formats are:"
9482 #: ../src/guestfs-actions.pod:2633 ../fish/guestfish-actions.pod:1793
9483 msgid "\"installed\""
9487 #: ../src/guestfs-actions.pod:2635 ../fish/guestfish-actions.pod:1795
9488 msgid "This is an installed operating system."
9492 #: ../src/guestfs-actions.pod:2637 ../fish/guestfish-actions.pod:1797
9493 msgid "\"installer\""
9497 #: ../src/guestfs-actions.pod:2639 ../fish/guestfish-actions.pod:1799
9499 "The disk image being inspected is not an installed operating system, but a "
9500 "I<bootable> install disk, live CD, or similar."
9504 #: ../src/guestfs-actions.pod:2644 ../fish/guestfish-actions.pod:1804
9505 msgid "The format of this disk image is not known."
9509 #: ../src/guestfs-actions.pod:2656
9510 msgid "guestfs_inspect_get_hostname"
9514 #: ../src/guestfs-actions.pod:2658
9518 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
9519 " const char *root);\n"
9524 #: ../src/guestfs-actions.pod:2665 ../fish/guestfish-actions.pod:1820
9526 "This function returns the hostname of the operating system as found by "
9527 "inspection of the guest's configuration files."
9531 #: ../src/guestfs-actions.pod:2668 ../fish/guestfish-actions.pod:1823
9533 "If the hostname could not be determined, then the string C<unknown> is "
9538 #: ../src/guestfs-actions.pod:2676
9539 msgid "(Added in 1.7.9)"
9543 #: ../src/guestfs-actions.pod:2678
9544 msgid "guestfs_inspect_get_major_version"
9548 #: ../src/guestfs-actions.pod:2680
9552 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
9553 " const char *root);\n"
9558 #: ../src/guestfs-actions.pod:2687 ../fish/guestfish-actions.pod:1835
9559 msgid "This returns the major version number of the inspected operating system."
9563 #: ../src/guestfs-actions.pod:2690 ../fish/guestfish-actions.pod:1838
9565 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
9566 "popular public names used by the operating system. Notably the operating "
9567 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
9568 "1). You can find out the real versions corresponding to releases of Windows "
9569 "by consulting Wikipedia or MSDN."
9573 #: ../src/guestfs-actions.pod:2697 ../src/guestfs-actions.pod:2717 ../fish/guestfish-actions.pod:1845 ../fish/guestfish-actions.pod:1859
9574 msgid "If the version could not be determined, then C<0> is returned."
9578 #: ../src/guestfs-actions.pod:2705
9579 msgid "guestfs_inspect_get_minor_version"
9583 #: ../src/guestfs-actions.pod:2707
9587 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
9588 " const char *root);\n"
9593 #: ../src/guestfs-actions.pod:2714 ../fish/guestfish-actions.pod:1856
9594 msgid "This returns the minor version number of the inspected operating system."
9598 #: ../src/guestfs-actions.pod:2719
9600 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
9601 "C<guestfs_inspect_get_major_version>."
9605 #: ../src/guestfs-actions.pod:2726
9606 msgid "guestfs_inspect_get_mountpoints"
9610 #: ../src/guestfs-actions.pod:2728
9614 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
9615 " const char *root);\n"
9620 #: ../src/guestfs-actions.pod:2735 ../fish/guestfish-actions.pod:1871
9622 "This returns a hash of where we think the filesystems associated with this "
9623 "operating system should be mounted. Callers should note that this is at "
9624 "best an educated guess made by reading configuration files such as "
9625 "C</etc/fstab>. I<In particular note> that this may return filesystems which "
9626 "are non-existent or not mountable and callers should be prepared to handle "
9627 "or ignore failures if they try to mount them."
9631 #: ../src/guestfs-actions.pod:2744 ../fish/guestfish-actions.pod:1880
9633 "Each element in the returned hashtable has a key which is the path of the "
9634 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
9635 "mounted there (eg. C</dev/sda1>)."
9639 #: ../src/guestfs-actions.pod:2749 ../fish/guestfish-actions.pod:1885
9640 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
9644 #: ../src/guestfs-actions.pod:2752
9646 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
9647 "C<guestfs_inspect_get_filesystems>."
9651 #: ../src/guestfs-actions.pod:2755 ../src/guestfs-actions.pod:3454 ../src/guestfs-actions.pod:4650 ../src/guestfs-actions.pod:6523
9653 "This function returns a NULL-terminated array of strings, or NULL if there "
9654 "was an error. The array of strings will always have length C<2n+1>, where "
9655 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
9656 "caller must free the strings and the array after use>."
9660 #: ../src/guestfs-actions.pod:2763
9661 msgid "guestfs_inspect_get_package_format"
9665 #: ../src/guestfs-actions.pod:2765
9669 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
9670 " const char *root);\n"
9675 #: ../src/guestfs-actions.pod:2772
9677 "This function and C<guestfs_inspect_get_package_management> return the "
9678 "package format and package management tool used by the inspected operating "
9679 "system. For example for Fedora these functions would return C<rpm> (package "
9680 "format) and C<yum> (package management)."
9684 #: ../src/guestfs-actions.pod:2778 ../fish/guestfish-actions.pod:1904
9686 "This returns the string C<unknown> if we could not determine the package "
9687 "format I<or> if the operating system does not have a real packaging system "
9692 #: ../src/guestfs-actions.pod:2782 ../fish/guestfish-actions.pod:1908
9694 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>. "
9695 "Future versions of libguestfs may return other strings."
9699 #: ../src/guestfs-actions.pod:2790 ../src/guestfs-actions.pod:2821
9700 msgid "(Added in 1.7.5)"
9704 #: ../src/guestfs-actions.pod:2792
9705 msgid "guestfs_inspect_get_package_management"
9709 #: ../src/guestfs-actions.pod:2794
9713 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
9714 " const char *root);\n"
9719 #: ../src/guestfs-actions.pod:2801
9721 "C<guestfs_inspect_get_package_format> and this function return the package "
9722 "format and package management tool used by the inspected operating system. "
9723 "For example for Fedora these functions would return C<rpm> (package format) "
9724 "and C<yum> (package management)."
9728 #: ../src/guestfs-actions.pod:2807 ../fish/guestfish-actions.pod:1926
9730 "This returns the string C<unknown> if we could not determine the package "
9731 "management tool I<or> if the operating system does not have a real packaging "
9732 "system (eg. Windows)."
9736 #: ../src/guestfs-actions.pod:2811 ../fish/guestfish-actions.pod:1930
9738 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
9739 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>. Future versions of "
9740 "libguestfs may return other strings."
9744 #: ../src/guestfs-actions.pod:2823
9745 msgid "guestfs_inspect_get_product_name"
9749 #: ../src/guestfs-actions.pod:2825
9753 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
9754 " const char *root);\n"
9759 #: ../src/guestfs-actions.pod:2832 ../fish/guestfish-actions.pod:1944
9761 "This returns the product name of the inspected operating system. The "
9762 "product name is generally some freeform string which can be displayed to the "
9763 "user, but should not be parsed by programs."
9767 #: ../src/guestfs-actions.pod:2837 ../fish/guestfish-actions.pod:1949
9769 "If the product name could not be determined, then the string C<unknown> is "
9774 #: ../src/guestfs-actions.pod:2847
9775 msgid "guestfs_inspect_get_roots"
9779 #: ../src/guestfs-actions.pod:2849
9783 " guestfs_inspect_get_roots (guestfs_h *g);\n"
9788 #: ../src/guestfs-actions.pod:2852
9790 "This function is a convenient way to get the list of root devices, as "
9791 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
9792 "the whole inspection process."
9796 #: ../src/guestfs-actions.pod:2856
9798 "This returns an empty list if either no root devices were found or the "
9799 "caller has not called C<guestfs_inspect_os>."
9803 #: ../src/guestfs-actions.pod:2865
9804 msgid "(Added in 1.7.3)"
9808 #: ../src/guestfs-actions.pod:2867
9809 msgid "guestfs_inspect_get_type"
9813 #: ../src/guestfs-actions.pod:2869
9817 " guestfs_inspect_get_type (guestfs_h *g,\n"
9818 " const char *root);\n"
9823 #: ../src/guestfs-actions.pod:2876 ../fish/guestfish-actions.pod:1974
9825 "This returns the type of the inspected operating system. Currently defined "
9830 #: ../src/guestfs-actions.pod:2881 ../fish/guestfish-actions.pod:1979
9835 #: ../src/guestfs-actions.pod:2883 ../fish/guestfish-actions.pod:1981
9836 msgid "Any Linux-based operating system."
9840 #: ../src/guestfs-actions.pod:2887 ../fish/guestfish-actions.pod:1985
9841 msgid "Any Microsoft Windows operating system."
9845 #: ../src/guestfs-actions.pod:2889 ../fish/guestfish-actions.pod:1987
9850 #: ../src/guestfs-actions.pod:2891 ../fish/guestfish-actions.pod:1989
9855 #: ../src/guestfs-actions.pod:2895 ../fish/guestfish-actions.pod:1993
9856 msgid "The operating system type could not be determined."
9860 #: ../src/guestfs-actions.pod:2909
9861 msgid "guestfs_inspect_get_windows_systemroot"
9865 #: ../src/guestfs-actions.pod:2911
9869 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
9870 " const char *root);\n"
9875 #: ../src/guestfs-actions.pod:2918 ../fish/guestfish-actions.pod:2009
9877 "This returns the Windows systemroot of the inspected guest. The systemroot "
9878 "is a directory path such as C</WINDOWS>."
9882 #: ../src/guestfs-actions.pod:2921 ../fish/guestfish-actions.pod:2012
9884 "This call assumes that the guest is Windows and that the systemroot could be "
9885 "determined by inspection. If this is not the case then an error is "
9890 #: ../src/guestfs-actions.pod:2930
9891 msgid "(Added in 1.5.25)"
9895 #: ../src/guestfs-actions.pod:2932
9896 msgid "guestfs_inspect_is_live"
9900 #: ../src/guestfs-actions.pod:2934
9904 " guestfs_inspect_is_live (guestfs_h *g,\n"
9905 " const char *root);\n"
9910 #: ../src/guestfs-actions.pod:2941
9912 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
9913 "disk), then this returns true if a live image was detected on the disk."
9917 #: ../src/guestfs-actions.pod:2949
9918 msgid "guestfs_inspect_is_multipart"
9922 #: ../src/guestfs-actions.pod:2951
9926 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
9927 " const char *root);\n"
9932 #: ../src/guestfs-actions.pod:2958
9934 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
9935 "disk), then this returns true if the disk is part of a set."
9939 #: ../src/guestfs-actions.pod:2966
9940 msgid "guestfs_inspect_is_netinst"
9944 #: ../src/guestfs-actions.pod:2968
9948 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
9949 " const char *root);\n"
9954 #: ../src/guestfs-actions.pod:2975
9956 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
9957 "disk), then this returns true if the disk is a network installer, ie. not a "
9958 "self-contained install CD but one which is likely to require network access "
9959 "to complete the install."
9963 #: ../src/guestfs-actions.pod:2985
9964 msgid "guestfs_inspect_list_applications"
9968 #: ../src/guestfs-actions.pod:2987
9971 " struct guestfs_application_list *\n"
9972 " guestfs_inspect_list_applications (guestfs_h *g,\n"
9973 " const char *root);\n"
9978 #: ../src/guestfs-actions.pod:2994 ../fish/guestfish-actions.pod:2066
9979 msgid "Return the list of applications installed in the operating system."
9983 #: ../src/guestfs-actions.pod:2996
9985 "I<Note:> This call works differently from other parts of the inspection "
9986 "API. You have to call C<guestfs_inspect_os>, then "
9987 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
9988 "this. Listing applications is a significantly more difficult operation "
9989 "which requires access to the full filesystem. Also note that unlike the "
9990 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
9991 "the libguestfs handle, this call actually reads parts of the mounted "
9992 "filesystems during the call."
9996 #: ../src/guestfs-actions.pod:3006 ../fish/guestfish-actions.pod:2078
9998 "This returns an empty list if the inspection code was not able to determine "
9999 "the list of applications."
10003 #: ../src/guestfs-actions.pod:3009 ../fish/guestfish-actions.pod:2081
10004 msgid "The application structure contains the following fields:"
10008 #: ../src/guestfs-actions.pod:3013 ../fish/guestfish-actions.pod:2085
10009 msgid "C<app_name>"
10013 #: ../src/guestfs-actions.pod:3015 ../fish/guestfish-actions.pod:2087
10015 "The name of the application. For Red Hat-derived and Debian-derived Linux "
10016 "guests, this is the package name."
10020 #: ../src/guestfs-actions.pod:3018 ../fish/guestfish-actions.pod:2090
10021 msgid "C<app_display_name>"
10025 #: ../src/guestfs-actions.pod:3020 ../fish/guestfish-actions.pod:2092
10027 "The display name of the application, sometimes localized to the install "
10028 "language of the guest operating system."
10032 #: ../src/guestfs-actions.pod:3023 ../fish/guestfish-actions.pod:2095
10034 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
10035 "to display something can use C<app_name> instead."
10039 #: ../src/guestfs-actions.pod:3026 ../fish/guestfish-actions.pod:2098
10040 msgid "C<app_epoch>"
10044 #: ../src/guestfs-actions.pod:3028 ../fish/guestfish-actions.pod:2100
10046 "For package managers which use epochs, this contains the epoch of the "
10047 "package (an integer). If unavailable, this is returned as C<0>."
10051 #: ../src/guestfs-actions.pod:3031 ../fish/guestfish-actions.pod:2103
10052 msgid "C<app_version>"
10056 #: ../src/guestfs-actions.pod:3033 ../fish/guestfish-actions.pod:2105
10058 "The version string of the application or package. If unavailable this is "
10059 "returned as an empty string C<\"\">."
10063 #: ../src/guestfs-actions.pod:3036 ../fish/guestfish-actions.pod:2108
10064 msgid "C<app_release>"
10068 #: ../src/guestfs-actions.pod:3038 ../fish/guestfish-actions.pod:2110
10070 "The release string of the application or package, for package managers that "
10071 "use this. If unavailable this is returned as an empty string C<\"\">."
10075 #: ../src/guestfs-actions.pod:3042 ../fish/guestfish-actions.pod:2114
10076 msgid "C<app_install_path>"
10080 #: ../src/guestfs-actions.pod:3044 ../fish/guestfish-actions.pod:2116
10082 "The installation path of the application (on operating systems such as "
10083 "Windows which use installation paths). This path is in the format used by "
10084 "the guest operating system, it is not a libguestfs path."
10088 #: ../src/guestfs-actions.pod:3049 ../fish/guestfish-actions.pod:2121
10089 msgid "If unavailable this is returned as an empty string C<\"\">."
10093 #: ../src/guestfs-actions.pod:3051 ../fish/guestfish-actions.pod:2123
10094 msgid "C<app_trans_path>"
10098 #: ../src/guestfs-actions.pod:3053 ../fish/guestfish-actions.pod:2125
10100 "The install path translated into a libguestfs path. If unavailable this is "
10101 "returned as an empty string C<\"\">."
10105 #: ../src/guestfs-actions.pod:3056 ../fish/guestfish-actions.pod:2128
10106 msgid "C<app_publisher>"
10110 #: ../src/guestfs-actions.pod:3058 ../fish/guestfish-actions.pod:2130
10112 "The name of the publisher of the application, for package managers that use "
10113 "this. If unavailable this is returned as an empty string C<\"\">."
10117 #: ../src/guestfs-actions.pod:3062 ../fish/guestfish-actions.pod:2134
10122 #: ../src/guestfs-actions.pod:3064 ../fish/guestfish-actions.pod:2136
10124 "The URL (eg. upstream URL) of the application. If unavailable this is "
10125 "returned as an empty string C<\"\">."
10129 #: ../src/guestfs-actions.pod:3067 ../fish/guestfish-actions.pod:2139
10130 msgid "C<app_source_package>"
10134 #: ../src/guestfs-actions.pod:3069 ../fish/guestfish-actions.pod:2141
10136 "For packaging systems which support this, the name of the source package. "
10137 "If unavailable this is returned as an empty string C<\"\">."
10141 #: ../src/guestfs-actions.pod:3072 ../fish/guestfish-actions.pod:2144
10142 msgid "C<app_summary>"
10146 #: ../src/guestfs-actions.pod:3074 ../fish/guestfish-actions.pod:2146
10148 "A short (usually one line) description of the application or package. If "
10149 "unavailable this is returned as an empty string C<\"\">."
10153 #: ../src/guestfs-actions.pod:3077 ../fish/guestfish-actions.pod:2149
10154 msgid "C<app_description>"
10158 #: ../src/guestfs-actions.pod:3079 ../fish/guestfish-actions.pod:2151
10160 "A longer description of the application or package. If unavailable this is "
10161 "returned as an empty string C<\"\">."
10165 #: ../src/guestfs-actions.pod:3086
10167 "This function returns a C<struct guestfs_application_list *>, or NULL if "
10168 "there was an error. I<The caller must call C<guestfs_free_application_list> "
10173 #: ../src/guestfs-actions.pod:3090
10174 msgid "(Added in 1.7.8)"
10178 #: ../src/guestfs-actions.pod:3092
10179 msgid "guestfs_inspect_os"
10183 #: ../src/guestfs-actions.pod:3094
10187 " guestfs_inspect_os (guestfs_h *g);\n"
10192 #: ../src/guestfs-actions.pod:3097 ../fish/guestfish-actions.pod:2162
10194 "This function uses other libguestfs functions and certain heuristics to "
10195 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
10196 "for operating systems."
10200 #: ../src/guestfs-actions.pod:3101 ../fish/guestfish-actions.pod:2166
10201 msgid "The list returned is empty if no operating systems were found."
10205 #: ../src/guestfs-actions.pod:3103 ../fish/guestfish-actions.pod:2168
10207 "If one operating system was found, then this returns a list with a single "
10208 "element, which is the name of the root filesystem of this operating system. "
10209 "It is also possible for this function to return a list containing more than "
10210 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
10211 "element being the root filesystem of one of the operating systems."
10215 #: ../src/guestfs-actions.pod:3110
10217 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
10218 "functions in order to query further information about each operating system, "
10219 "such as the name and version."
10223 #: ../src/guestfs-actions.pod:3115
10225 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
10226 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
10227 "the contents. This should be called with no disks currently mounted. The "
10228 "function may also use Augeas, so any existing Augeas handle will be closed."
10232 #: ../src/guestfs-actions.pod:3121 ../fish/guestfish-actions.pod:2186
10234 "This function cannot decrypt encrypted disks. The caller must do that first "
10235 "(supplying the necessary keys) if the disk is encrypted."
10239 #: ../src/guestfs-actions.pod:3127 ../src/guestfs-actions.pod:3412 ../src/guestfs-actions.pod:3474
10240 msgid "See also C<guestfs_list_filesystems>."
10244 #: ../src/guestfs-actions.pod:3135
10245 msgid "guestfs_is_blockdev"
10249 #: ../src/guestfs-actions.pod:3137
10253 " guestfs_is_blockdev (guestfs_h *g,\n"
10254 " const char *path);\n"
10259 #: ../src/guestfs-actions.pod:3141 ../fish/guestfish-actions.pod:2198
10261 "This returns C<true> if and only if there is a block device with the given "
10266 #: ../src/guestfs-actions.pod:3144 ../src/guestfs-actions.pod:3173 ../src/guestfs-actions.pod:3203 ../src/guestfs-actions.pod:3218 ../src/guestfs-actions.pod:3234 ../src/guestfs-actions.pod:3290 ../src/guestfs-actions.pod:3305
10267 msgid "See also C<guestfs_stat>."
10271 #: ../src/guestfs-actions.pod:3148 ../src/guestfs-actions.pod:3177 ../src/guestfs-actions.pod:3222 ../src/guestfs-actions.pod:3294 ../src/guestfs-actions.pod:3309
10272 msgid "(Added in 1.5.10)"
10276 #: ../src/guestfs-actions.pod:3150
10277 msgid "guestfs_is_busy"
10281 #: ../src/guestfs-actions.pod:3152
10285 " guestfs_is_busy (guestfs_h *g);\n"
10290 #: ../src/guestfs-actions.pod:3155 ../fish/guestfish-actions.pod:2207
10292 "This returns true iff this handle is busy processing a command (in the "
10297 #: ../src/guestfs-actions.pod:3164
10298 msgid "guestfs_is_chardev"
10302 #: ../src/guestfs-actions.pod:3166
10306 " guestfs_is_chardev (guestfs_h *g,\n"
10307 " const char *path);\n"
10312 #: ../src/guestfs-actions.pod:3170 ../fish/guestfish-actions.pod:2216
10314 "This returns C<true> if and only if there is a character device with the "
10315 "given C<path> name."
10319 #: ../src/guestfs-actions.pod:3179
10320 msgid "guestfs_is_config"
10324 #: ../src/guestfs-actions.pod:3181
10328 " guestfs_is_config (guestfs_h *g);\n"
10333 #: ../src/guestfs-actions.pod:3184 ../fish/guestfish-actions.pod:2225
10335 "This returns true iff this handle is being configured (in the C<CONFIG> "
10340 #: ../src/guestfs-actions.pod:3193
10341 msgid "guestfs_is_dir"
10345 #: ../src/guestfs-actions.pod:3195
10349 " guestfs_is_dir (guestfs_h *g,\n"
10350 " const char *path);\n"
10355 #: ../src/guestfs-actions.pod:3199 ../fish/guestfish-actions.pod:2234
10357 "This returns C<true> if and only if there is a directory with the given "
10358 "C<path> name. Note that it returns false for other objects like files."
10362 #: ../src/guestfs-actions.pod:3209
10363 msgid "guestfs_is_fifo"
10367 #: ../src/guestfs-actions.pod:3211
10371 " guestfs_is_fifo (guestfs_h *g,\n"
10372 " const char *path);\n"
10377 #: ../src/guestfs-actions.pod:3215 ../fish/guestfish-actions.pod:2244
10379 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
10380 "given C<path> name."
10384 #: ../src/guestfs-actions.pod:3224
10385 msgid "guestfs_is_file"
10389 #: ../src/guestfs-actions.pod:3226
10393 " guestfs_is_file (guestfs_h *g,\n"
10394 " const char *path);\n"
10399 #: ../src/guestfs-actions.pod:3230 ../fish/guestfish-actions.pod:2253
10401 "This returns C<true> if and only if there is a regular file with the given "
10402 "C<path> name. Note that it returns false for other objects like "
10407 #: ../src/guestfs-actions.pod:3240
10408 msgid "guestfs_is_launching"
10412 #: ../src/guestfs-actions.pod:3242
10416 " guestfs_is_launching (guestfs_h *g);\n"
10421 #: ../src/guestfs-actions.pod:3245 ../fish/guestfish-actions.pod:2263
10423 "This returns true iff this handle is launching the subprocess (in the "
10424 "C<LAUNCHING> state)."
10428 #: ../src/guestfs-actions.pod:3254
10429 msgid "guestfs_is_lv"
10433 #: ../src/guestfs-actions.pod:3256
10437 " guestfs_is_lv (guestfs_h *g,\n"
10438 " const char *device);\n"
10443 #: ../src/guestfs-actions.pod:3260 ../fish/guestfish-actions.pod:2272
10445 "This command tests whether C<device> is a logical volume, and returns true "
10446 "iff this is the case."
10450 #: ../src/guestfs-actions.pod:3267
10451 msgid "guestfs_is_ready"
10455 #: ../src/guestfs-actions.pod:3269
10459 " guestfs_is_ready (guestfs_h *g);\n"
10464 #: ../src/guestfs-actions.pod:3272 ../fish/guestfish-actions.pod:2279
10466 "This returns true iff this handle is ready to accept commands (in the "
10471 #: ../src/guestfs-actions.pod:3281
10472 msgid "guestfs_is_socket"
10476 #: ../src/guestfs-actions.pod:3283
10480 " guestfs_is_socket (guestfs_h *g,\n"
10481 " const char *path);\n"
10486 #: ../src/guestfs-actions.pod:3287 ../fish/guestfish-actions.pod:2288
10488 "This returns C<true> if and only if there is a Unix domain socket with the "
10489 "given C<path> name."
10493 #: ../src/guestfs-actions.pod:3296
10494 msgid "guestfs_is_symlink"
10498 #: ../src/guestfs-actions.pod:3298
10502 " guestfs_is_symlink (guestfs_h *g,\n"
10503 " const char *path);\n"
10508 #: ../src/guestfs-actions.pod:3302 ../fish/guestfish-actions.pod:2297
10510 "This returns C<true> if and only if there is a symbolic link with the given "
10515 #: ../src/guestfs-actions.pod:3311
10516 msgid "guestfs_kill_subprocess"
10520 #: ../src/guestfs-actions.pod:3313
10524 " guestfs_kill_subprocess (guestfs_h *g);\n"
10529 #: ../src/guestfs-actions.pod:3316 ../fish/guestfish-actions.pod:2306
10530 msgid "This kills the qemu subprocess. You should never need to call this."
10534 #: ../src/guestfs-actions.pod:3322
10535 msgid "guestfs_launch"
10539 #: ../src/guestfs-actions.pod:3324
10543 " guestfs_launch (guestfs_h *g);\n"
10548 #: ../src/guestfs-actions.pod:3327 ../fish/guestfish-actions.pod:2314
10550 "Internally libguestfs is implemented by running a virtual machine using "
10555 #: ../src/guestfs-actions.pod:3330 ../fish/guestfish-actions.pod:2317
10557 "You should call this after configuring the handle (eg. adding drives) but "
10558 "before performing any actions."
10562 #: ../src/guestfs-actions.pod:3337
10563 msgid "guestfs_lchown"
10567 #: ../src/guestfs-actions.pod:3339
10571 " guestfs_lchown (guestfs_h *g,\n"
10574 " const char *path);\n"
10579 #: ../src/guestfs-actions.pod:3345
10581 "Change the file owner to C<owner> and group to C<group>. This is like "
10582 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
10583 "changed, not the target."
10587 #: ../src/guestfs-actions.pod:3357
10588 msgid "guestfs_lgetxattr"
10592 #: ../src/guestfs-actions.pod:3359
10596 " guestfs_lgetxattr (guestfs_h *g,\n"
10597 " const char *path,\n"
10598 " const char *name,\n"
10599 " size_t *size_r);\n"
10604 #: ../src/guestfs-actions.pod:3365 ../fish/guestfish-actions.pod:2336
10606 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
10607 "is a symlink, then this call returns an extended attribute from the symlink."
10611 #: ../src/guestfs-actions.pod:3379
10612 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
10616 #: ../src/guestfs-actions.pod:3387
10617 msgid "guestfs_lgetxattrs"
10621 #: ../src/guestfs-actions.pod:3389
10624 " struct guestfs_xattr_list *\n"
10625 " guestfs_lgetxattrs (guestfs_h *g,\n"
10626 " const char *path);\n"
10631 #: ../src/guestfs-actions.pod:3393
10633 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
10634 "then it returns the extended attributes of the link itself."
10638 #: ../src/guestfs-actions.pod:3403
10639 msgid "guestfs_list_devices"
10643 #: ../src/guestfs-actions.pod:3405
10647 " guestfs_list_devices (guestfs_h *g);\n"
10652 #: ../src/guestfs-actions.pod:3408 ../fish/guestfish-actions.pod:2364
10653 msgid "List all the block devices."
10657 #: ../src/guestfs-actions.pod:3410 ../fish/guestfish-actions.pod:2366
10658 msgid "The full block device names are returned, eg. C</dev/sda>."
10662 #: ../src/guestfs-actions.pod:3420
10663 msgid "guestfs_list_filesystems"
10667 #: ../src/guestfs-actions.pod:3422
10671 " guestfs_list_filesystems (guestfs_h *g);\n"
10676 #: ../src/guestfs-actions.pod:3425 ../fish/guestfish-actions.pod:2374
10678 "This inspection command looks for filesystems on partitions, block devices "
10679 "and logical volumes, returning a list of devices containing filesystems and "
10684 #: ../src/guestfs-actions.pod:3429 ../fish/guestfish-actions.pod:2378
10686 "The return value is a hash, where the keys are the devices containing "
10687 "filesystems, and the values are the filesystem types. For example:"
10691 #: ../src/guestfs-actions.pod:3433 ../fish/guestfish-actions.pod:2382
10694 " \"/dev/sda1\" => \"ntfs\"\n"
10695 " \"/dev/sda2\" => \"ext2\"\n"
10696 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
10697 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
10702 #: ../src/guestfs-actions.pod:3438 ../fish/guestfish-actions.pod:2387
10704 "The value can have the special value \"unknown\", meaning the content of the "
10705 "device is undetermined or empty. \"swap\" means a Linux swap partition."
10709 #: ../src/guestfs-actions.pod:3442
10711 "This command runs other libguestfs commands, which might include "
10712 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
10713 "soon after launch and only when nothing is mounted."
10717 #: ../src/guestfs-actions.pod:3446
10719 "Not all of the filesystems returned will be mountable. In particular, swap "
10720 "partitions are returned in the list. Also this command does not check that "
10721 "each filesystem found is valid and mountable, and some filesystems might be "
10722 "mountable but require special options. Filesystems may not all belong to a "
10723 "single logical operating system (use C<guestfs_inspect_os> to look for "
10728 #: ../src/guestfs-actions.pod:3460 ../src/guestfs-actions.pod:5051
10729 msgid "(Added in 1.5.15)"
10733 #: ../src/guestfs-actions.pod:3462
10734 msgid "guestfs_list_partitions"
10738 #: ../src/guestfs-actions.pod:3464
10742 " guestfs_list_partitions (guestfs_h *g);\n"
10747 #: ../src/guestfs-actions.pod:3467 ../fish/guestfish-actions.pod:2407
10748 msgid "List all the partitions detected on all block devices."
10752 #: ../src/guestfs-actions.pod:3469 ../fish/guestfish-actions.pod:2409
10753 msgid "The full partition device names are returned, eg. C</dev/sda1>"
10757 #: ../src/guestfs-actions.pod:3471
10759 "This does not return logical volumes. For that you will need to call "
10764 #: ../src/guestfs-actions.pod:3482
10769 #: ../src/guestfs-actions.pod:3484
10773 " guestfs_ll (guestfs_h *g,\n"
10774 " const char *directory);\n"
10779 #: ../src/guestfs-actions.pod:3488 ../fish/guestfish-actions.pod:2420
10781 "List the files in C<directory> (relative to the root directory, there is no "
10782 "cwd) in the format of 'ls -la'."
10786 #: ../src/guestfs-actions.pod:3491 ../fish/guestfish-actions.pod:2423
10788 "This command is mostly useful for interactive sessions. It is I<not> "
10789 "intended that you try to parse the output string."
10793 #: ../src/guestfs-actions.pod:3499
10798 #: ../src/guestfs-actions.pod:3501
10802 " guestfs_ln (guestfs_h *g,\n"
10803 " const char *target,\n"
10804 " const char *linkname);\n"
10809 #: ../src/guestfs-actions.pod:3506 ../fish/guestfish-actions.pod:2430
10810 msgid "This command creates a hard link using the C<ln> command."
10814 #: ../src/guestfs-actions.pod:3512
10815 msgid "guestfs_ln_f"
10819 #: ../src/guestfs-actions.pod:3514
10823 " guestfs_ln_f (guestfs_h *g,\n"
10824 " const char *target,\n"
10825 " const char *linkname);\n"
10830 #: ../src/guestfs-actions.pod:3519 ../fish/guestfish-actions.pod:2436
10832 "This command creates a hard link using the C<ln -f> command. The C<-f> "
10833 "option removes the link (C<linkname>) if it exists already."
10837 #: ../src/guestfs-actions.pod:3526
10838 msgid "guestfs_ln_s"
10842 #: ../src/guestfs-actions.pod:3528
10846 " guestfs_ln_s (guestfs_h *g,\n"
10847 " const char *target,\n"
10848 " const char *linkname);\n"
10853 #: ../src/guestfs-actions.pod:3533 ../fish/guestfish-actions.pod:2443
10854 msgid "This command creates a symbolic link using the C<ln -s> command."
10858 #: ../src/guestfs-actions.pod:3539
10859 msgid "guestfs_ln_sf"
10863 #: ../src/guestfs-actions.pod:3541
10867 " guestfs_ln_sf (guestfs_h *g,\n"
10868 " const char *target,\n"
10869 " const char *linkname);\n"
10874 #: ../src/guestfs-actions.pod:3546 ../fish/guestfish-actions.pod:2449
10876 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
10877 "option removes the link (C<linkname>) if it exists already."
10881 #: ../src/guestfs-actions.pod:3553
10882 msgid "guestfs_lremovexattr"
10886 #: ../src/guestfs-actions.pod:3555
10890 " guestfs_lremovexattr (guestfs_h *g,\n"
10891 " const char *xattr,\n"
10892 " const char *path);\n"
10897 #: ../src/guestfs-actions.pod:3560
10899 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
10900 "link, then it removes an extended attribute of the link itself."
10904 #: ../src/guestfs-actions.pod:3568
10909 #: ../src/guestfs-actions.pod:3570
10913 " guestfs_ls (guestfs_h *g,\n"
10914 " const char *directory);\n"
10919 #: ../src/guestfs-actions.pod:3574 ../fish/guestfish-actions.pod:2464
10921 "List the files in C<directory> (relative to the root directory, there is no "
10922 "cwd). The '.' and '..' entries are not returned, but hidden files are "
10927 #: ../src/guestfs-actions.pod:3578
10929 "This command is mostly useful for interactive sessions. Programs should "
10930 "probably use C<guestfs_readdir> instead."
10934 #: ../src/guestfs-actions.pod:3587
10935 msgid "guestfs_lsetxattr"
10939 #: ../src/guestfs-actions.pod:3589
10943 " guestfs_lsetxattr (guestfs_h *g,\n"
10944 " const char *xattr,\n"
10945 " const char *val,\n"
10947 " const char *path);\n"
10952 #: ../src/guestfs-actions.pod:3596
10954 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
10955 "then it sets an extended attribute of the link itself."
10959 #: ../src/guestfs-actions.pod:3604
10960 msgid "guestfs_lstat"
10964 #: ../src/guestfs-actions.pod:3606
10967 " struct guestfs_stat *\n"
10968 " guestfs_lstat (guestfs_h *g,\n"
10969 " const char *path);\n"
10974 #: ../src/guestfs-actions.pod:3610 ../src/guestfs-actions.pod:6122 ../fish/guestfish-actions.pod:2483 ../fish/guestfish-actions.pod:4109
10975 msgid "Returns file information for the given C<path>."
10979 #: ../src/guestfs-actions.pod:3612
10981 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
10982 "link, then the link is stat-ed, not the file it refers to."
10986 #: ../src/guestfs-actions.pod:3616 ../fish/guestfish-actions.pod:2489
10987 msgid "This is the same as the C<lstat(2)> system call."
10991 #: ../src/guestfs-actions.pod:3618 ../src/guestfs-actions.pod:6126
10993 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
10994 "error. I<The caller must call C<guestfs_free_stat> after use>."
10998 #: ../src/guestfs-actions.pod:3622 ../src/guestfs-actions.pod:6130 ../src/guestfs-actions.pod:6148 ../src/guestfs-actions.pod:6529
10999 msgid "(Added in 0.9.2)"
11003 #: ../src/guestfs-actions.pod:3624
11004 msgid "guestfs_lstatlist"
11008 #: ../src/guestfs-actions.pod:3626
11011 " struct guestfs_stat_list *\n"
11012 " guestfs_lstatlist (guestfs_h *g,\n"
11013 " const char *path,\n"
11014 " char *const *names);\n"
11019 #: ../src/guestfs-actions.pod:3631
11021 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
11022 "files, where all files are in the directory C<path>. C<names> is the list "
11023 "of files from this directory."
11027 #: ../src/guestfs-actions.pod:3635 ../fish/guestfish-actions.pod:2499
11029 "On return you get a list of stat structs, with a one-to-one correspondence "
11030 "to the C<names> list. If any name did not exist or could not be lstat'd, "
11031 "then the C<ino> field of that structure is set to C<-1>."
11035 #: ../src/guestfs-actions.pod:3640
11037 "This call is intended for programs that want to efficiently list a directory "
11038 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
11039 "for a similarly efficient call for getting extended attributes. Very long "
11040 "directory listings might cause the protocol message size to be exceeded, "
11041 "causing this call to fail. The caller must split up such requests into "
11042 "smaller groups of names."
11046 #: ../src/guestfs-actions.pod:3648
11048 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
11049 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
11053 #: ../src/guestfs-actions.pod:3654
11054 msgid "guestfs_luks_add_key"
11058 #: ../src/guestfs-actions.pod:3656
11062 " guestfs_luks_add_key (guestfs_h *g,\n"
11063 " const char *device,\n"
11064 " const char *key,\n"
11065 " const char *newkey,\n"
11071 #: ../src/guestfs-actions.pod:3663 ../fish/guestfish-actions.pod:2516
11073 "This command adds a new key on LUKS device C<device>. C<key> is any "
11074 "existing key, and is used to access the device. C<newkey> is the new key to "
11075 "add. C<keyslot> is the key slot that will be replaced."
11079 #: ../src/guestfs-actions.pod:3668
11081 "Note that if C<keyslot> already contains a key, then this command will "
11082 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
11086 #: ../src/guestfs-actions.pod:3674 ../src/guestfs-actions.pod:3714 ../src/guestfs-actions.pod:3737 ../src/guestfs-actions.pod:3757 ../src/guestfs-actions.pod:3789 ../src/guestfs-actions.pod:3808
11088 "This function takes a key or passphrase parameter which could contain "
11089 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
11094 #: ../src/guestfs-actions.pod:3678 ../src/guestfs-actions.pod:3718 ../src/guestfs-actions.pod:3741 ../src/guestfs-actions.pod:3761
11095 msgid "(Added in 1.5.2)"
11099 #: ../src/guestfs-actions.pod:3680
11100 msgid "guestfs_luks_close"
11104 #: ../src/guestfs-actions.pod:3682
11108 " guestfs_luks_close (guestfs_h *g,\n"
11109 " const char *device);\n"
11114 #: ../src/guestfs-actions.pod:3686
11116 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
11117 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
11118 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
11119 "underlying block device."
11123 #: ../src/guestfs-actions.pod:3694 ../src/guestfs-actions.pod:3793 ../src/guestfs-actions.pod:3812 ../src/guestfs-actions.pod:3862 ../src/guestfs-actions.pod:3910
11124 msgid "(Added in 1.5.1)"
11128 #: ../src/guestfs-actions.pod:3696
11129 msgid "guestfs_luks_format"
11133 #: ../src/guestfs-actions.pod:3698
11137 " guestfs_luks_format (guestfs_h *g,\n"
11138 " const char *device,\n"
11139 " const char *key,\n"
11145 #: ../src/guestfs-actions.pod:3704 ../fish/guestfish-actions.pod:2542
11147 "This command erases existing data on C<device> and formats the device as a "
11148 "LUKS encrypted device. C<key> is the initial key, which is added to key "
11149 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
11153 #: ../src/guestfs-actions.pod:3711 ../src/guestfs-actions.pod:3734 ../src/guestfs-actions.pod:3874 ../src/guestfs-actions.pod:4802 ../src/guestfs-actions.pod:5582 ../src/guestfs-actions.pod:5957 ../src/guestfs-actions.pod:5980 ../src/guestfs-actions.pod:6006 ../src/guestfs-actions.pod:7166 ../fish/guestfish-actions.pod:2550 ../fish/guestfish-actions.pod:2563 ../fish/guestfish-actions.pod:2647 ../fish/guestfish-actions.pod:3208 ../fish/guestfish-actions.pod:3728 ../fish/guestfish-actions.pod:4008 ../fish/guestfish-actions.pod:4024 ../fish/guestfish-actions.pod:4039 ../fish/guestfish-actions.pod:4754
11155 "B<This command is dangerous. Without careful use you can easily destroy all "
11160 #: ../src/guestfs-actions.pod:3720
11161 msgid "guestfs_luks_format_cipher"
11165 #: ../src/guestfs-actions.pod:3722
11169 " guestfs_luks_format_cipher (guestfs_h *g,\n"
11170 " const char *device,\n"
11171 " const char *key,\n"
11173 " const char *cipher);\n"
11178 #: ../src/guestfs-actions.pod:3729
11180 "This command is the same as C<guestfs_luks_format> but it also allows you to "
11181 "set the C<cipher> used."
11185 #: ../src/guestfs-actions.pod:3743
11186 msgid "guestfs_luks_kill_slot"
11190 #: ../src/guestfs-actions.pod:3745
11194 " guestfs_luks_kill_slot (guestfs_h *g,\n"
11195 " const char *device,\n"
11196 " const char *key,\n"
11202 #: ../src/guestfs-actions.pod:3751 ../fish/guestfish-actions.pod:2570
11204 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
11205 "device C<device>. C<key> must be one of the I<other> keys."
11209 #: ../src/guestfs-actions.pod:3763
11210 msgid "guestfs_luks_open"
11214 #: ../src/guestfs-actions.pod:3765
11218 " guestfs_luks_open (guestfs_h *g,\n"
11219 " const char *device,\n"
11220 " const char *key,\n"
11221 " const char *mapname);\n"
11226 #: ../src/guestfs-actions.pod:3771 ../fish/guestfish-actions.pod:2581
11228 "This command opens a block device which has been encrypted according to the "
11229 "Linux Unified Key Setup (LUKS) standard."
11233 #: ../src/guestfs-actions.pod:3774 ../fish/guestfish-actions.pod:2584
11234 msgid "C<device> is the encrypted block device or partition."
11238 #: ../src/guestfs-actions.pod:3776 ../fish/guestfish-actions.pod:2586
11240 "The caller must supply one of the keys associated with the LUKS block "
11241 "device, in the C<key> parameter."
11245 #: ../src/guestfs-actions.pod:3779 ../fish/guestfish-actions.pod:2589
11247 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
11248 "writes to this block device are decrypted from and encrypted to the "
11249 "underlying C<device> respectively."
11253 #: ../src/guestfs-actions.pod:3783
11255 "If this block device contains LVM volume groups, then calling "
11256 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
11261 #: ../src/guestfs-actions.pod:3795
11262 msgid "guestfs_luks_open_ro"
11266 #: ../src/guestfs-actions.pod:3797
11270 " guestfs_luks_open_ro (guestfs_h *g,\n"
11271 " const char *device,\n"
11272 " const char *key,\n"
11273 " const char *mapname);\n"
11278 #: ../src/guestfs-actions.pod:3803
11280 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
11285 #: ../src/guestfs-actions.pod:3814
11286 msgid "guestfs_lvcreate"
11290 #: ../src/guestfs-actions.pod:3816
11294 " guestfs_lvcreate (guestfs_h *g,\n"
11295 " const char *logvol,\n"
11296 " const char *volgroup,\n"
11302 #: ../src/guestfs-actions.pod:3822 ../fish/guestfish-actions.pod:2614
11304 "This creates an LVM logical volume called C<logvol> on the volume group "
11305 "C<volgroup>, with C<size> megabytes."
11309 #: ../src/guestfs-actions.pod:3829
11310 msgid "guestfs_lvm_canonical_lv_name"
11314 #: ../src/guestfs-actions.pod:3831
11318 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
11319 " const char *lvname);\n"
11324 #: ../src/guestfs-actions.pod:3835 ../fish/guestfish-actions.pod:2621
11326 "This converts alternative naming schemes for LVs that you might find to the "
11327 "canonical name. For example, C</dev/mapper/VG-LV> is converted to "
11332 #: ../src/guestfs-actions.pod:3839 ../fish/guestfish-actions.pod:2625
11334 "This command returns an error if the C<lvname> parameter does not refer to a "
11339 #: ../src/guestfs-actions.pod:3842
11340 msgid "See also C<guestfs_is_lv>."
11344 #: ../src/guestfs-actions.pod:3847
11345 msgid "(Added in 1.5.24)"
11349 #: ../src/guestfs-actions.pod:3849
11350 msgid "guestfs_lvm_clear_filter"
11354 #: ../src/guestfs-actions.pod:3851
11358 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
11363 #: ../src/guestfs-actions.pod:3854
11365 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
11366 "see every block device."
11370 #: ../src/guestfs-actions.pod:3857 ../src/guestfs-actions.pod:3899 ../fish/guestfish-actions.pod:2637 ../fish/guestfish-actions.pod:2668
11371 msgid "This command also clears the LVM cache and performs a volume group scan."
11375 #: ../src/guestfs-actions.pod:3864
11376 msgid "guestfs_lvm_remove_all"
11380 #: ../src/guestfs-actions.pod:3866
11384 " guestfs_lvm_remove_all (guestfs_h *g);\n"
11389 #: ../src/guestfs-actions.pod:3869 ../fish/guestfish-actions.pod:2644
11391 "This command removes all LVM logical volumes, volume groups and physical "
11396 #: ../src/guestfs-actions.pod:3879
11397 msgid "guestfs_lvm_set_filter"
11401 #: ../src/guestfs-actions.pod:3881
11405 " guestfs_lvm_set_filter (guestfs_h *g,\n"
11406 " char *const *devices);\n"
11411 #: ../src/guestfs-actions.pod:3885 ../fish/guestfish-actions.pod:2654
11413 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
11414 "block devices in the list C<devices>, and will ignore all other attached "
11419 #: ../src/guestfs-actions.pod:3889 ../fish/guestfish-actions.pod:2658
11421 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
11422 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
11423 "there are two types of duplication possible: either cloned PVs/VGs which "
11424 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
11425 "same name. In normal operation you cannot create this situation, but you "
11426 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
11427 "inside the LVM metadata."
11431 #: ../src/guestfs-actions.pod:3902 ../fish/guestfish-actions.pod:2671
11432 msgid "You can filter whole block devices or individual partitions."
11436 #: ../src/guestfs-actions.pod:3904 ../fish/guestfish-actions.pod:2673
11438 "You cannot use this if any VG is currently in use (eg. contains a mounted "
11439 "filesystem), even if you are not filtering out that VG."
11443 #: ../src/guestfs-actions.pod:3912
11444 msgid "guestfs_lvremove"
11448 #: ../src/guestfs-actions.pod:3914
11452 " guestfs_lvremove (guestfs_h *g,\n"
11453 " const char *device);\n"
11458 #: ../src/guestfs-actions.pod:3918 ../fish/guestfish-actions.pod:2681
11460 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
11461 "LV, such as C</dev/VG/LV>."
11465 #: ../src/guestfs-actions.pod:3921 ../fish/guestfish-actions.pod:2684
11467 "You can also remove all LVs in a volume group by specifying the VG name, "
11472 #: ../src/guestfs-actions.pod:3926 ../src/guestfs-actions.pod:5148 ../src/guestfs-actions.pod:6905
11473 msgid "(Added in 1.0.13)"
11477 #: ../src/guestfs-actions.pod:3928
11478 msgid "guestfs_lvrename"
11482 #: ../src/guestfs-actions.pod:3930
11486 " guestfs_lvrename (guestfs_h *g,\n"
11487 " const char *logvol,\n"
11488 " const char *newlogvol);\n"
11493 #: ../src/guestfs-actions.pod:3935 ../fish/guestfish-actions.pod:2691
11494 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
11498 #: ../src/guestfs-actions.pod:3939 ../src/guestfs-actions.pod:6918
11499 msgid "(Added in 1.0.83)"
11503 #: ../src/guestfs-actions.pod:3941
11504 msgid "guestfs_lvresize"
11508 #: ../src/guestfs-actions.pod:3943
11512 " guestfs_lvresize (guestfs_h *g,\n"
11513 " const char *device,\n"
11519 #: ../src/guestfs-actions.pod:3948 ../fish/guestfish-actions.pod:2697
11521 "This resizes (expands or shrinks) an existing LVM logical volume to "
11522 "C<mbytes>. When reducing, data in the reduced part is lost."
11526 #: ../src/guestfs-actions.pod:3956
11527 msgid "guestfs_lvresize_free"
11531 #: ../src/guestfs-actions.pod:3958
11535 " guestfs_lvresize_free (guestfs_h *g,\n"
11536 " const char *lv,\n"
11542 #: ../src/guestfs-actions.pod:3963 ../fish/guestfish-actions.pod:2705
11544 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
11545 "remaining free space in the volume group. Commonly you would call this with "
11546 "pc = 100 which expands the logical volume as much as possible, using all "
11547 "remaining free space in the volume group."
11551 #: ../src/guestfs-actions.pod:3971
11552 msgid "(Added in 1.3.3)"
11556 #: ../src/guestfs-actions.pod:3973
11557 msgid "guestfs_lvs"
11561 #: ../src/guestfs-actions.pod:3975
11565 " guestfs_lvs (guestfs_h *g);\n"
11570 #: ../src/guestfs-actions.pod:3978 ../fish/guestfish-actions.pod:2715
11572 "List all the logical volumes detected. This is the equivalent of the "
11573 "L<lvs(8)> command."
11577 #: ../src/guestfs-actions.pod:3981 ../fish/guestfish-actions.pod:2718
11579 "This returns a list of the logical volume device names "
11580 "(eg. C</dev/VolGroup00/LogVol00>)."
11584 #: ../src/guestfs-actions.pod:3984
11585 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
11589 #: ../src/guestfs-actions.pod:3992
11590 msgid "guestfs_lvs_full"
11594 #: ../src/guestfs-actions.pod:3994
11597 " struct guestfs_lvm_lv_list *\n"
11598 " guestfs_lvs_full (guestfs_h *g);\n"
11603 #: ../src/guestfs-actions.pod:3997 ../fish/guestfish-actions.pod:2727
11605 "List all the logical volumes detected. This is the equivalent of the "
11606 "L<lvs(8)> command. The \"full\" version includes all fields."
11610 #: ../src/guestfs-actions.pod:4000
11612 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
11613 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after "
11618 #: ../src/guestfs-actions.pod:4006
11619 msgid "guestfs_lvuuid"
11623 #: ../src/guestfs-actions.pod:4008
11627 " guestfs_lvuuid (guestfs_h *g,\n"
11628 " const char *device);\n"
11633 #: ../src/guestfs-actions.pod:4012 ../fish/guestfish-actions.pod:2734
11634 msgid "This command returns the UUID of the LVM LV C<device>."
11638 #: ../src/guestfs-actions.pod:4019
11639 msgid "guestfs_lxattrlist"
11643 #: ../src/guestfs-actions.pod:4021
11646 " struct guestfs_xattr_list *\n"
11647 " guestfs_lxattrlist (guestfs_h *g,\n"
11648 " const char *path,\n"
11649 " char *const *names);\n"
11654 #: ../src/guestfs-actions.pod:4026 ../fish/guestfish-actions.pod:2740
11656 "This call allows you to get the extended attributes of multiple files, where "
11657 "all files are in the directory C<path>. C<names> is the list of files from "
11662 #: ../src/guestfs-actions.pod:4030 ../fish/guestfish-actions.pod:2744
11664 "On return you get a flat list of xattr structs which must be interpreted "
11665 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
11666 "C<attrval> in this struct is zero-length to indicate there was an error "
11667 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
11668 "number (the number of following attributes for this file, which could be "
11669 "C<\"0\">). Then after the first xattr struct are the zero or more "
11670 "attributes for the first named file. This repeats for the second and "
11671 "subsequent files."
11675 #: ../src/guestfs-actions.pod:4040
11677 "This call is intended for programs that want to efficiently list a directory "
11678 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
11679 "a similarly efficient call for getting standard stats. Very long directory "
11680 "listings might cause the protocol message size to be exceeded, causing this "
11681 "call to fail. The caller must split up such requests into smaller groups of "
11686 #: ../src/guestfs-actions.pod:4054
11687 msgid "guestfs_mkdir"
11691 #: ../src/guestfs-actions.pod:4056
11695 " guestfs_mkdir (guestfs_h *g,\n"
11696 " const char *path);\n"
11701 #: ../src/guestfs-actions.pod:4060 ../fish/guestfish-actions.pod:2766
11702 msgid "Create a directory named C<path>."
11706 #: ../src/guestfs-actions.pod:4066
11707 msgid "guestfs_mkdir_mode"
11711 #: ../src/guestfs-actions.pod:4068
11715 " guestfs_mkdir_mode (guestfs_h *g,\n"
11716 " const char *path,\n"
11722 #: ../src/guestfs-actions.pod:4073 ../fish/guestfish-actions.pod:2772
11724 "This command creates a directory, setting the initial permissions of the "
11725 "directory to C<mode>."
11729 #: ../src/guestfs-actions.pod:4076 ../fish/guestfish-actions.pod:2775
11731 "For common Linux filesystems, the actual mode which is set will be C<mode & "
11732 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
11737 #: ../src/guestfs-actions.pod:4080
11738 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
11742 #: ../src/guestfs-actions.pod:4086
11743 msgid "guestfs_mkdir_p"
11747 #: ../src/guestfs-actions.pod:4088
11751 " guestfs_mkdir_p (guestfs_h *g,\n"
11752 " const char *path);\n"
11757 #: ../src/guestfs-actions.pod:4092 ../fish/guestfish-actions.pod:2785
11759 "Create a directory named C<path>, creating any parent directories as "
11760 "necessary. This is like the C<mkdir -p> shell command."
11764 #: ../src/guestfs-actions.pod:4099
11765 msgid "guestfs_mkdtemp"
11769 #: ../src/guestfs-actions.pod:4101
11773 " guestfs_mkdtemp (guestfs_h *g,\n"
11774 " const char *template);\n"
11779 #: ../src/guestfs-actions.pod:4105 ../fish/guestfish-actions.pod:2792
11781 "This command creates a temporary directory. The C<template> parameter "
11782 "should be a full pathname for the temporary directory name with the final "
11783 "six characters being \"XXXXXX\"."
11787 #: ../src/guestfs-actions.pod:4110 ../fish/guestfish-actions.pod:2797
11789 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
11790 "being suitable for Windows filesystems."
11794 #: ../src/guestfs-actions.pod:4113 ../fish/guestfish-actions.pod:2800
11795 msgid "The name of the temporary directory that was created is returned."
11799 #: ../src/guestfs-actions.pod:4116 ../fish/guestfish-actions.pod:2803
11800 msgid "The temporary directory is created with mode 0700 and is owned by root."
11804 #: ../src/guestfs-actions.pod:4119 ../fish/guestfish-actions.pod:2806
11806 "The caller is responsible for deleting the temporary directory and its "
11807 "contents after use."
11811 #: ../src/guestfs-actions.pod:4122 ../fish/guestfish-actions.pod:2809
11812 msgid "See also: L<mkdtemp(3)>"
11816 #: ../src/guestfs-actions.pod:4129
11817 msgid "guestfs_mke2fs_J"
11821 #: ../src/guestfs-actions.pod:4131
11825 " guestfs_mke2fs_J (guestfs_h *g,\n"
11826 " const char *fstype,\n"
11827 " int blocksize,\n"
11828 " const char *device,\n"
11829 " const char *journal);\n"
11834 #: ../src/guestfs-actions.pod:4138 ../fish/guestfish-actions.pod:2815
11836 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
11837 "C<journal>. It is equivalent to the command:"
11841 #: ../src/guestfs-actions.pod:4142 ../fish/guestfish-actions.pod:2819
11844 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
11849 #: ../src/guestfs-actions.pod:4144
11850 msgid "See also C<guestfs_mke2journal>."
11854 #: ../src/guestfs-actions.pod:4148 ../src/guestfs-actions.pod:4166 ../src/guestfs-actions.pod:4184 ../src/guestfs-actions.pod:4200 ../src/guestfs-actions.pod:4214 ../src/guestfs-actions.pod:4228 ../src/guestfs-actions.pod:4287 ../src/guestfs-actions.pod:4538
11855 msgid "(Added in 1.0.68)"
11859 #: ../src/guestfs-actions.pod:4150
11860 msgid "guestfs_mke2fs_JL"
11864 #: ../src/guestfs-actions.pod:4152
11868 " guestfs_mke2fs_JL (guestfs_h *g,\n"
11869 " const char *fstype,\n"
11870 " int blocksize,\n"
11871 " const char *device,\n"
11872 " const char *label);\n"
11877 #: ../src/guestfs-actions.pod:4159 ../fish/guestfish-actions.pod:2827
11879 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
11880 "the journal labeled C<label>."
11884 #: ../src/guestfs-actions.pod:4162
11885 msgid "See also C<guestfs_mke2journal_L>."
11889 #: ../src/guestfs-actions.pod:4168
11890 msgid "guestfs_mke2fs_JU"
11894 #: ../src/guestfs-actions.pod:4170
11898 " guestfs_mke2fs_JU (guestfs_h *g,\n"
11899 " const char *fstype,\n"
11900 " int blocksize,\n"
11901 " const char *device,\n"
11902 " const char *uuid);\n"
11907 #: ../src/guestfs-actions.pod:4177 ../fish/guestfish-actions.pod:2836
11909 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
11910 "the journal with UUID C<uuid>."
11914 #: ../src/guestfs-actions.pod:4180
11915 msgid "See also C<guestfs_mke2journal_U>."
11919 #: ../src/guestfs-actions.pod:4186
11920 msgid "guestfs_mke2journal"
11924 #: ../src/guestfs-actions.pod:4188
11928 " guestfs_mke2journal (guestfs_h *g,\n"
11929 " int blocksize,\n"
11930 " const char *device);\n"
11935 #: ../src/guestfs-actions.pod:4193 ../fish/guestfish-actions.pod:2845
11937 "This creates an ext2 external journal on C<device>. It is equivalent to the "
11942 #: ../src/guestfs-actions.pod:4196 ../fish/guestfish-actions.pod:2848
11945 " mke2fs -O journal_dev -b blocksize device\n"
11950 #: ../src/guestfs-actions.pod:4202
11951 msgid "guestfs_mke2journal_L"
11955 #: ../src/guestfs-actions.pod:4204
11959 " guestfs_mke2journal_L (guestfs_h *g,\n"
11960 " int blocksize,\n"
11961 " const char *label,\n"
11962 " const char *device);\n"
11967 #: ../src/guestfs-actions.pod:4210 ../fish/guestfish-actions.pod:2854
11968 msgid "This creates an ext2 external journal on C<device> with label C<label>."
11972 #: ../src/guestfs-actions.pod:4216
11973 msgid "guestfs_mke2journal_U"
11977 #: ../src/guestfs-actions.pod:4218
11981 " guestfs_mke2journal_U (guestfs_h *g,\n"
11982 " int blocksize,\n"
11983 " const char *uuid,\n"
11984 " const char *device);\n"
11989 #: ../src/guestfs-actions.pod:4224 ../fish/guestfish-actions.pod:2860
11990 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
11994 #: ../src/guestfs-actions.pod:4230
11995 msgid "guestfs_mkfifo"
11999 #: ../src/guestfs-actions.pod:4232
12003 " guestfs_mkfifo (guestfs_h *g,\n"
12005 " const char *path);\n"
12010 #: ../src/guestfs-actions.pod:4237
12012 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
12013 "is just a convenient wrapper around C<guestfs_mknod>."
12017 #: ../src/guestfs-actions.pod:4247
12018 msgid "guestfs_mkfs"
12022 #: ../src/guestfs-actions.pod:4249
12026 " guestfs_mkfs (guestfs_h *g,\n"
12027 " const char *fstype,\n"
12028 " const char *device);\n"
12033 #: ../src/guestfs-actions.pod:4254 ../fish/guestfish-actions.pod:2876
12035 "This creates a filesystem on C<device> (usually a partition or LVM logical "
12036 "volume). The filesystem type is C<fstype>, for example C<ext3>."
12040 #: ../src/guestfs-actions.pod:4262
12041 msgid "guestfs_mkfs_b"
12045 #: ../src/guestfs-actions.pod:4264
12049 " guestfs_mkfs_b (guestfs_h *g,\n"
12050 " const char *fstype,\n"
12051 " int blocksize,\n"
12052 " const char *device);\n"
12057 #: ../src/guestfs-actions.pod:4270
12059 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
12060 "block size of the resulting filesystem. Supported block sizes depend on the "
12061 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
12065 #: ../src/guestfs-actions.pod:4275 ../src/guestfs-actions.pod:4317 ../fish/guestfish-actions.pod:2889 ../fish/guestfish-actions.pod:2916
12067 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
12072 #: ../src/guestfs-actions.pod:4280 ../fish/guestfish-actions.pod:2892
12074 "This function is deprecated. In new code, use the C<mkfs_opts> call "
12079 #: ../src/guestfs-actions.pod:4289
12080 msgid "guestfs_mkfs_opts"
12084 #: ../src/guestfs-actions.pod:4291
12088 " guestfs_mkfs_opts (guestfs_h *g,\n"
12089 " const char *fstype,\n"
12090 " const char *device,\n"
12096 #: ../src/guestfs-actions.pod:4302
12099 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
12104 #: ../src/guestfs-actions.pod:4304 ../fish/guestfish-actions.pod:2903
12106 "This function creates a filesystem on C<device>. The filesystem type is "
12107 "C<fstype>, for example C<ext3>."
12111 #: ../src/guestfs-actions.pod:4311 ../fish/guestfish-actions.pod:2910
12112 msgid "C<blocksize>"
12116 #: ../src/guestfs-actions.pod:4313 ../fish/guestfish-actions.pod:2912
12118 "The filesystem block size. Supported block sizes depend on the filesystem "
12119 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
12124 #: ../src/guestfs-actions.pod:4324
12125 msgid "(Added in 1.7.19)"
12129 #: ../src/guestfs-actions.pod:4326
12130 msgid "guestfs_mkfs_opts_va"
12134 #: ../src/guestfs-actions.pod:4328
12138 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
12139 " const char *fstype,\n"
12140 " const char *device,\n"
12141 " va_list args);\n"
12146 #: ../src/guestfs-actions.pod:4334
12147 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
12151 #: ../src/guestfs-actions.pod:4338
12152 msgid "guestfs_mkfs_opts_argv"
12156 #: ../src/guestfs-actions.pod:4340
12160 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
12161 " const char *fstype,\n"
12162 " const char *device,\n"
12163 " const struct guestfs_mkfs_opts_argv *optargs);\n"
12168 #: ../src/guestfs-actions.pod:4346
12169 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
12173 #: ../src/guestfs-actions.pod:4350
12174 msgid "guestfs_mkmountpoint"
12178 #: ../src/guestfs-actions.pod:4352
12182 " guestfs_mkmountpoint (guestfs_h *g,\n"
12183 " const char *exemptpath);\n"
12188 #: ../src/guestfs-actions.pod:4356
12190 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
12191 "that can be used to create extra mountpoints before mounting the first "
12196 #: ../src/guestfs-actions.pod:4360 ../fish/guestfish-actions.pod:2931
12198 "These calls are I<only> necessary in some very limited circumstances, mainly "
12199 "the case where you want to mount a mix of unrelated and/or read-only "
12200 "filesystems together."
12204 #: ../src/guestfs-actions.pod:4364 ../fish/guestfish-actions.pod:2935
12206 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
12207 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
12208 "inside that. You can unpack this as follows in guestfish:"
12212 #: ../src/guestfs-actions.pod:4369 ../fish/guestfish-actions.pod:2940
12215 " add-ro Fedora-11-i686-Live.iso\n"
12217 " mkmountpoint /cd\n"
12218 " mkmountpoint /sqsh\n"
12219 " mkmountpoint /ext3fs\n"
12220 " mount /dev/sda /cd\n"
12221 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
12222 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
12227 #: ../src/guestfs-actions.pod:4378 ../fish/guestfish-actions.pod:2949
12228 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
12232 #: ../src/guestfs-actions.pod:4380
12234 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
12235 "may get unexpected errors if you try to mix these calls. It is safest to "
12236 "manually unmount filesystems and remove mountpoints after use."
12240 #: ../src/guestfs-actions.pod:4384
12242 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
12243 "first, so for this to work for manual mountpoints, you must ensure that the "
12244 "innermost mountpoints have the longest pathnames, as in the example code "
12249 #: ../src/guestfs-actions.pod:4389 ../fish/guestfish-actions.pod:2960
12250 msgid "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
12254 #: ../src/guestfs-actions.pod:4391
12256 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
12257 "means that C<guestfs_umount_all> is called when the handle is closed which "
12258 "can also trigger these issues."
12262 #: ../src/guestfs-actions.pod:4397 ../src/guestfs-actions.pod:4656 ../src/guestfs-actions.pod:5566
12263 msgid "(Added in 1.0.62)"
12267 #: ../src/guestfs-actions.pod:4399
12268 msgid "guestfs_mknod"
12272 #: ../src/guestfs-actions.pod:4401
12276 " guestfs_mknod (guestfs_h *g,\n"
12280 " const char *path);\n"
12285 #: ../src/guestfs-actions.pod:4408 ../fish/guestfish-actions.pod:2970
12287 "This call creates block or character special devices, or named pipes "
12292 #: ../src/guestfs-actions.pod:4411 ../fish/guestfish-actions.pod:2973
12294 "The C<mode> parameter should be the mode, using the standard constants. "
12295 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
12296 "used when creating block and character special devices."
12300 #: ../src/guestfs-actions.pod:4416
12302 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
12303 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
12304 "regular file). These constants are available in the standard Linux header "
12305 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
12306 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
12307 "the appropriate constant for you."
12311 #: ../src/guestfs-actions.pod:4430
12312 msgid "guestfs_mknod_b"
12316 #: ../src/guestfs-actions.pod:4432
12320 " guestfs_mknod_b (guestfs_h *g,\n"
12324 " const char *path);\n"
12329 #: ../src/guestfs-actions.pod:4439
12331 "This call creates a block device node called C<path> with mode C<mode> and "
12332 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
12333 "wrapper around C<guestfs_mknod>."
12337 #: ../src/guestfs-actions.pod:4449
12338 msgid "guestfs_mknod_c"
12342 #: ../src/guestfs-actions.pod:4451
12346 " guestfs_mknod_c (guestfs_h *g,\n"
12350 " const char *path);\n"
12355 #: ../src/guestfs-actions.pod:4458
12357 "This call creates a char device node called C<path> with mode C<mode> and "
12358 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
12359 "wrapper around C<guestfs_mknod>."
12363 #: ../src/guestfs-actions.pod:4468
12364 msgid "guestfs_mkswap"
12368 #: ../src/guestfs-actions.pod:4470
12372 " guestfs_mkswap (guestfs_h *g,\n"
12373 " const char *device);\n"
12378 #: ../src/guestfs-actions.pod:4474 ../fish/guestfish-actions.pod:3012
12379 msgid "Create a swap partition on C<device>."
12383 #: ../src/guestfs-actions.pod:4480
12384 msgid "guestfs_mkswap_L"
12388 #: ../src/guestfs-actions.pod:4482
12392 " guestfs_mkswap_L (guestfs_h *g,\n"
12393 " const char *label,\n"
12394 " const char *device);\n"
12399 #: ../src/guestfs-actions.pod:4487 ../fish/guestfish-actions.pod:3018
12400 msgid "Create a swap partition on C<device> with label C<label>."
12404 #: ../src/guestfs-actions.pod:4489 ../fish/guestfish-actions.pod:3020
12406 "Note that you cannot attach a swap label to a block device "
12407 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
12408 "the kernel or swap tools."
12412 #: ../src/guestfs-actions.pod:4497
12413 msgid "guestfs_mkswap_U"
12417 #: ../src/guestfs-actions.pod:4499
12421 " guestfs_mkswap_U (guestfs_h *g,\n"
12422 " const char *uuid,\n"
12423 " const char *device);\n"
12428 #: ../src/guestfs-actions.pod:4504 ../fish/guestfish-actions.pod:3028
12429 msgid "Create a swap partition on C<device> with UUID C<uuid>."
12433 #: ../src/guestfs-actions.pod:4510
12434 msgid "guestfs_mkswap_file"
12438 #: ../src/guestfs-actions.pod:4512
12442 " guestfs_mkswap_file (guestfs_h *g,\n"
12443 " const char *path);\n"
12448 #: ../src/guestfs-actions.pod:4516 ../fish/guestfish-actions.pod:3034
12449 msgid "Create a swap file."
12453 #: ../src/guestfs-actions.pod:4518
12455 "This command just writes a swap file signature to an existing file. To "
12456 "create the file itself, use something like C<guestfs_fallocate>."
12460 #: ../src/guestfs-actions.pod:4525
12461 msgid "guestfs_modprobe"
12465 #: ../src/guestfs-actions.pod:4527
12469 " guestfs_modprobe (guestfs_h *g,\n"
12470 " const char *modulename);\n"
12475 #: ../src/guestfs-actions.pod:4531 ../fish/guestfish-actions.pod:3043
12476 msgid "This loads a kernel module in the appliance."
12480 #: ../src/guestfs-actions.pod:4533 ../fish/guestfish-actions.pod:3045
12482 "The kernel module must have been whitelisted when libguestfs was built (see "
12483 "C<appliance/kmod.whitelist.in> in the source)."
12487 #: ../src/guestfs-actions.pod:4540
12488 msgid "guestfs_mount"
12492 #: ../src/guestfs-actions.pod:4542
12496 " guestfs_mount (guestfs_h *g,\n"
12497 " const char *device,\n"
12498 " const char *mountpoint);\n"
12503 #: ../src/guestfs-actions.pod:4547 ../fish/guestfish-actions.pod:3052
12505 "Mount a guest disk at a position in the filesystem. Block devices are named "
12506 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
12507 "those block devices contain partitions, they will have the usual names "
12508 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
12512 #: ../src/guestfs-actions.pod:4553 ../fish/guestfish-actions.pod:3058
12514 "The rules are the same as for L<mount(2)>: A filesystem must first be "
12515 "mounted on C</> before others can be mounted. Other filesystems can only be "
12516 "mounted on directories which already exist."
12520 #: ../src/guestfs-actions.pod:4558 ../fish/guestfish-actions.pod:3063
12522 "The mounted filesystem is writable, if we have sufficient permissions on the "
12523 "underlying device."
12527 #: ../src/guestfs-actions.pod:4561
12529 "B<Important note:> When you use this call, the filesystem options C<sync> "
12530 "and C<noatime> are set implicitly. This was originally done because we "
12531 "thought it would improve reliability, but it turns out that I<-o sync> has a "
12532 "very large negative performance impact and negligible effect on "
12533 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
12534 "in any code that needs performance, and instead use C<guestfs_mount_options> "
12535 "(use an empty string for the first parameter if you don't want any options)."
12539 #: ../src/guestfs-actions.pod:4575
12540 msgid "guestfs_mount_loop"
12544 #: ../src/guestfs-actions.pod:4577
12548 " guestfs_mount_loop (guestfs_h *g,\n"
12549 " const char *file,\n"
12550 " const char *mountpoint);\n"
12555 #: ../src/guestfs-actions.pod:4582 ../fish/guestfish-actions.pod:3080
12557 "This command lets you mount C<file> (a filesystem image in a file) on a "
12558 "mount point. It is entirely equivalent to the command C<mount -o loop file "
12563 #: ../src/guestfs-actions.pod:4590
12564 msgid "guestfs_mount_options"
12568 #: ../src/guestfs-actions.pod:4592
12572 " guestfs_mount_options (guestfs_h *g,\n"
12573 " const char *options,\n"
12574 " const char *device,\n"
12575 " const char *mountpoint);\n"
12580 #: ../src/guestfs-actions.pod:4598
12582 "This is the same as the C<guestfs_mount> command, but it allows you to set "
12583 "the mount options as for the L<mount(8)> I<-o> flag."
12587 #: ../src/guestfs-actions.pod:4602 ../fish/guestfish-actions.pod:3092
12589 "If the C<options> parameter is an empty string, then no options are passed "
12590 "(all options default to whatever the filesystem uses)."
12594 #: ../src/guestfs-actions.pod:4608 ../src/guestfs-actions.pod:4622 ../src/guestfs-actions.pod:4639
12595 msgid "(Added in 1.0.10)"
12599 #: ../src/guestfs-actions.pod:4610
12600 msgid "guestfs_mount_ro"
12604 #: ../src/guestfs-actions.pod:4612
12608 " guestfs_mount_ro (guestfs_h *g,\n"
12609 " const char *device,\n"
12610 " const char *mountpoint);\n"
12615 #: ../src/guestfs-actions.pod:4617
12617 "This is the same as the C<guestfs_mount> command, but it mounts the "
12618 "filesystem with the read-only (I<-o ro>) flag."
12622 #: ../src/guestfs-actions.pod:4624
12623 msgid "guestfs_mount_vfs"
12627 #: ../src/guestfs-actions.pod:4626
12631 " guestfs_mount_vfs (guestfs_h *g,\n"
12632 " const char *options,\n"
12633 " const char *vfstype,\n"
12634 " const char *device,\n"
12635 " const char *mountpoint);\n"
12640 #: ../src/guestfs-actions.pod:4633
12642 "This is the same as the C<guestfs_mount> command, but it allows you to set "
12643 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
12648 #: ../src/guestfs-actions.pod:4641
12649 msgid "guestfs_mountpoints"
12653 #: ../src/guestfs-actions.pod:4643
12657 " guestfs_mountpoints (guestfs_h *g);\n"
12662 #: ../src/guestfs-actions.pod:4646
12664 "This call is similar to C<guestfs_mounts>. That call returns a list of "
12665 "devices. This one returns a hash table (map) of device name to directory "
12666 "where the device is mounted."
12670 #: ../src/guestfs-actions.pod:4658
12671 msgid "guestfs_mounts"
12675 #: ../src/guestfs-actions.pod:4660
12679 " guestfs_mounts (guestfs_h *g);\n"
12684 #: ../src/guestfs-actions.pod:4663 ../fish/guestfish-actions.pod:3123
12686 "This returns the list of currently mounted filesystems. It returns the list "
12687 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
12691 #: ../src/guestfs-actions.pod:4666 ../fish/guestfish-actions.pod:3126
12692 msgid "Some internal mounts are not shown."
12696 #: ../src/guestfs-actions.pod:4668
12697 msgid "See also: C<guestfs_mountpoints>"
12701 #: ../src/guestfs-actions.pod:4676
12706 #: ../src/guestfs-actions.pod:4678
12710 " guestfs_mv (guestfs_h *g,\n"
12711 " const char *src,\n"
12712 " const char *dest);\n"
12717 #: ../src/guestfs-actions.pod:4683 ../fish/guestfish-actions.pod:3134
12719 "This moves a file from C<src> to C<dest> where C<dest> is either a "
12720 "destination filename or destination directory."
12724 #: ../src/guestfs-actions.pod:4690
12725 msgid "guestfs_ntfs_3g_probe"
12729 #: ../src/guestfs-actions.pod:4692
12733 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
12735 " const char *device);\n"
12740 #: ../src/guestfs-actions.pod:4697 ../fish/guestfish-actions.pod:3141
12742 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
12743 "C<device> for mountability. (Not all NTFS volumes can be mounted "
12744 "read-write, and some cannot be mounted at all)."
12748 #: ../src/guestfs-actions.pod:4701 ../fish/guestfish-actions.pod:3145
12750 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
12751 "can be mounted read-write. Set it to false if you want to test if the "
12752 "volume can be mounted read-only."
12756 #: ../src/guestfs-actions.pod:4705 ../fish/guestfish-actions.pod:3149
12758 "The return value is an integer which C<0> if the operation would succeed, or "
12759 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
12763 #: ../src/guestfs-actions.pod:4711
12764 msgid "(Added in 1.0.43)"
12768 #: ../src/guestfs-actions.pod:4713
12769 msgid "guestfs_ntfsresize"
12773 #: ../src/guestfs-actions.pod:4715
12777 " guestfs_ntfsresize (guestfs_h *g,\n"
12778 " const char *device);\n"
12783 #: ../src/guestfs-actions.pod:4719 ../fish/guestfish-actions.pod:3157
12785 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
12786 "size of the underlying device. See also L<ntfsresize(8)>."
12790 #: ../src/guestfs-actions.pod:4727
12791 msgid "guestfs_ntfsresize_size"
12795 #: ../src/guestfs-actions.pod:4729
12799 " guestfs_ntfsresize_size (guestfs_h *g,\n"
12800 " const char *device,\n"
12801 " int64_t size);\n"
12806 #: ../src/guestfs-actions.pod:4734
12808 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
12809 "to specify the new size (in bytes) explicitly."
12813 #: ../src/guestfs-actions.pod:4739 ../src/guestfs-actions.pod:5175 ../src/guestfs-actions.pod:5248 ../src/guestfs-actions.pod:5514 ../src/guestfs-actions.pod:7053
12814 msgid "(Added in 1.3.14)"
12818 #: ../src/guestfs-actions.pod:4741
12819 msgid "guestfs_part_add"
12823 #: ../src/guestfs-actions.pod:4743
12827 " guestfs_part_add (guestfs_h *g,\n"
12828 " const char *device,\n"
12829 " const char *prlogex,\n"
12830 " int64_t startsect,\n"
12831 " int64_t endsect);\n"
12836 #: ../src/guestfs-actions.pod:4750
12838 "This command adds a partition to C<device>. If there is no partition table "
12839 "on the device, call C<guestfs_part_init> first."
12843 #: ../src/guestfs-actions.pod:4753 ../fish/guestfish-actions.pod:3175
12845 "The C<prlogex> parameter is the type of partition. Normally you should pass "
12846 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
12847 "C<logical>) and C<e> (or C<extended>) partition types."
12851 #: ../src/guestfs-actions.pod:4758 ../fish/guestfish-actions.pod:3180
12853 "C<startsect> and C<endsect> are the start and end of the partition in "
12854 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
12855 "from the end of the disk (C<-1> is the last sector)."
12859 #: ../src/guestfs-actions.pod:4762
12861 "Creating a partition which covers the whole disk is not so easy. Use "
12862 "C<guestfs_part_disk> to do that."
12866 #: ../src/guestfs-actions.pod:4767 ../src/guestfs-actions.pod:4805 ../src/guestfs-actions.pod:4858 ../src/guestfs-actions.pod:4936 ../src/guestfs-actions.pod:4974 ../src/guestfs-actions.pod:4993 ../src/guestfs-actions.pod:5033
12867 msgid "(Added in 1.0.78)"
12871 #: ../src/guestfs-actions.pod:4769
12872 msgid "guestfs_part_del"
12876 #: ../src/guestfs-actions.pod:4771
12880 " guestfs_part_del (guestfs_h *g,\n"
12881 " const char *device,\n"
12887 #: ../src/guestfs-actions.pod:4776 ../fish/guestfish-actions.pod:3191
12888 msgid "This command deletes the partition numbered C<partnum> on C<device>."
12892 #: ../src/guestfs-actions.pod:4778 ../fish/guestfish-actions.pod:3193
12894 "Note that in the case of MBR partitioning, deleting an extended partition "
12895 "also deletes any logical partitions it contains."
12899 #: ../src/guestfs-actions.pod:4786
12900 msgid "guestfs_part_disk"
12904 #: ../src/guestfs-actions.pod:4788
12908 " guestfs_part_disk (guestfs_h *g,\n"
12909 " const char *device,\n"
12910 " const char *parttype);\n"
12915 #: ../src/guestfs-actions.pod:4793
12917 "This command is simply a combination of C<guestfs_part_init> followed by "
12918 "C<guestfs_part_add> to create a single primary partition covering the whole "
12923 #: ../src/guestfs-actions.pod:4797
12925 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
12926 "possible values are described in C<guestfs_part_init>."
12930 #: ../src/guestfs-actions.pod:4807
12931 msgid "guestfs_part_get_bootable"
12935 #: ../src/guestfs-actions.pod:4809
12939 " guestfs_part_get_bootable (guestfs_h *g,\n"
12940 " const char *device,\n"
12946 #: ../src/guestfs-actions.pod:4814 ../fish/guestfish-actions.pod:3215
12948 "This command returns true if the partition C<partnum> on C<device> has the "
12949 "bootable flag set."
12953 #: ../src/guestfs-actions.pod:4817
12954 msgid "See also C<guestfs_part_set_bootable>."
12958 #: ../src/guestfs-actions.pod:4823
12959 msgid "guestfs_part_get_mbr_id"
12963 #: ../src/guestfs-actions.pod:4825
12967 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
12968 " const char *device,\n"
12974 #: ../src/guestfs-actions.pod:4830 ../fish/guestfish-actions.pod:3224
12976 "Returns the MBR type byte (also known as the ID byte) from the numbered "
12977 "partition C<partnum>."
12981 #: ../src/guestfs-actions.pod:4833 ../src/guestfs-actions.pod:5009
12983 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
12984 "undefined results for other partition table types (see "
12985 "C<guestfs_part_get_parttype>)."
12989 #: ../src/guestfs-actions.pod:4841
12990 msgid "guestfs_part_get_parttype"
12994 #: ../src/guestfs-actions.pod:4843
12998 " guestfs_part_get_parttype (guestfs_h *g,\n"
12999 " const char *device);\n"
13004 #: ../src/guestfs-actions.pod:4847 ../fish/guestfish-actions.pod:3235
13006 "This command examines the partition table on C<device> and returns the "
13007 "partition table type (format) being used."
13011 #: ../src/guestfs-actions.pod:4850
13013 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
13014 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
13015 "possible, although unusual. See C<guestfs_part_init> for a full list."
13019 #: ../src/guestfs-actions.pod:4860
13020 msgid "guestfs_part_init"
13024 #: ../src/guestfs-actions.pod:4862
13028 " guestfs_part_init (guestfs_h *g,\n"
13029 " const char *device,\n"
13030 " const char *parttype);\n"
13035 #: ../src/guestfs-actions.pod:4867 ../fish/guestfish-actions.pod:3247
13037 "This creates an empty partition table on C<device> of one of the partition "
13038 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
13039 "(for large disks)."
13043 #: ../src/guestfs-actions.pod:4871
13045 "Initially there are no partitions. Following this, you should call "
13046 "C<guestfs_part_add> for each partition required."
13050 #: ../src/guestfs-actions.pod:4874 ../fish/guestfish-actions.pod:3254
13051 msgid "Possible values for C<parttype> are:"
13055 #: ../src/guestfs-actions.pod:4878 ../fish/guestfish-actions.pod:3258
13056 msgid "B<efi> | B<gpt>"
13060 #: ../src/guestfs-actions.pod:4880 ../fish/guestfish-actions.pod:3260
13061 msgid "Intel EFI / GPT partition table."
13065 #: ../src/guestfs-actions.pod:4882 ../fish/guestfish-actions.pod:3262
13067 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
13068 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
13069 "the C<mbr> format."
13073 #: ../src/guestfs-actions.pod:4886 ../fish/guestfish-actions.pod:3266
13074 msgid "B<mbr> | B<msdos>"
13078 #: ../src/guestfs-actions.pod:4888 ../fish/guestfish-actions.pod:3268
13080 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
13081 "Windows. This partition type will B<only> work for device sizes up to 2 "
13082 "TB. For large disks we recommend using C<gpt>."
13086 #: ../src/guestfs-actions.pod:4895 ../fish/guestfish-actions.pod:3275
13087 msgid "Other partition table types that may work but are not supported include:"
13091 #: ../src/guestfs-actions.pod:4900 ../fish/guestfish-actions.pod:3280
13096 #: ../src/guestfs-actions.pod:4902 ../fish/guestfish-actions.pod:3282
13097 msgid "AIX disk labels."
13101 #: ../src/guestfs-actions.pod:4904 ../fish/guestfish-actions.pod:3284
13102 msgid "B<amiga> | B<rdb>"
13106 #: ../src/guestfs-actions.pod:4906 ../fish/guestfish-actions.pod:3286
13107 msgid "Amiga \"Rigid Disk Block\" format."
13111 #: ../src/guestfs-actions.pod:4908 ../fish/guestfish-actions.pod:3288
13116 #: ../src/guestfs-actions.pod:4910 ../fish/guestfish-actions.pod:3290
13117 msgid "BSD disk labels."
13121 #: ../src/guestfs-actions.pod:4912 ../fish/guestfish-actions.pod:3292
13126 #: ../src/guestfs-actions.pod:4914 ../fish/guestfish-actions.pod:3294
13127 msgid "DASD, used on IBM mainframes."
13131 #: ../src/guestfs-actions.pod:4916 ../fish/guestfish-actions.pod:3296
13136 #: ../src/guestfs-actions.pod:4918 ../fish/guestfish-actions.pod:3298
13137 msgid "MIPS/SGI volumes."
13141 #: ../src/guestfs-actions.pod:4920 ../fish/guestfish-actions.pod:3300
13146 #: ../src/guestfs-actions.pod:4922 ../fish/guestfish-actions.pod:3302
13147 msgid "Old Mac partition format. Modern Macs use C<gpt>."
13151 #: ../src/guestfs-actions.pod:4924 ../fish/guestfish-actions.pod:3304
13156 #: ../src/guestfs-actions.pod:4926 ../fish/guestfish-actions.pod:3306
13157 msgid "NEC PC-98 format, common in Japan apparently."
13161 #: ../src/guestfs-actions.pod:4928 ../fish/guestfish-actions.pod:3308
13166 #: ../src/guestfs-actions.pod:4930 ../fish/guestfish-actions.pod:3310
13167 msgid "Sun disk labels."
13171 #: ../src/guestfs-actions.pod:4938
13172 msgid "guestfs_part_list"
13176 #: ../src/guestfs-actions.pod:4940
13179 " struct guestfs_partition_list *\n"
13180 " guestfs_part_list (guestfs_h *g,\n"
13181 " const char *device);\n"
13186 #: ../src/guestfs-actions.pod:4944 ../fish/guestfish-actions.pod:3318
13188 "This command parses the partition table on C<device> and returns the list of "
13189 "partitions found."
13193 #: ../src/guestfs-actions.pod:4947 ../fish/guestfish-actions.pod:3321
13194 msgid "The fields in the returned structure are:"
13198 #: ../src/guestfs-actions.pod:4951 ../fish/guestfish-actions.pod:3325
13199 msgid "B<part_num>"
13203 #: ../src/guestfs-actions.pod:4953 ../fish/guestfish-actions.pod:3327
13204 msgid "Partition number, counting from 1."
13208 #: ../src/guestfs-actions.pod:4955 ../fish/guestfish-actions.pod:3329
13209 msgid "B<part_start>"
13213 #: ../src/guestfs-actions.pod:4957
13215 "Start of the partition I<in bytes>. To get sectors you have to divide by "
13216 "the device's sector size, see C<guestfs_blockdev_getss>."
13220 #: ../src/guestfs-actions.pod:4960 ../fish/guestfish-actions.pod:3334
13221 msgid "B<part_end>"
13225 #: ../src/guestfs-actions.pod:4962 ../fish/guestfish-actions.pod:3336
13226 msgid "End of the partition in bytes."
13230 #: ../src/guestfs-actions.pod:4964 ../fish/guestfish-actions.pod:3338
13231 msgid "B<part_size>"
13235 #: ../src/guestfs-actions.pod:4966 ../fish/guestfish-actions.pod:3340
13236 msgid "Size of the partition in bytes."
13240 #: ../src/guestfs-actions.pod:4970
13242 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
13243 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
13248 #: ../src/guestfs-actions.pod:4976
13249 msgid "guestfs_part_set_bootable"
13253 #: ../src/guestfs-actions.pod:4978
13257 " guestfs_part_set_bootable (guestfs_h *g,\n"
13258 " const char *device,\n"
13260 " int bootable);\n"
13265 #: ../src/guestfs-actions.pod:4984 ../fish/guestfish-actions.pod:3348
13267 "This sets the bootable flag on partition numbered C<partnum> on device "
13268 "C<device>. Note that partitions are numbered from 1."
13272 #: ../src/guestfs-actions.pod:4987 ../fish/guestfish-actions.pod:3351
13274 "The bootable flag is used by some operating systems (notably Windows) to "
13275 "determine which partition to boot from. It is by no means universally "
13280 #: ../src/guestfs-actions.pod:4995
13281 msgid "guestfs_part_set_mbr_id"
13285 #: ../src/guestfs-actions.pod:4997
13289 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
13290 " const char *device,\n"
13297 #: ../src/guestfs-actions.pod:5003 ../fish/guestfish-actions.pod:3359
13299 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
13300 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
13301 "documentation are in fact hexadecimal numbers, but usually documented "
13302 "without any leading \"0x\" which might be confusing."
13306 #: ../src/guestfs-actions.pod:5017
13307 msgid "guestfs_part_set_name"
13311 #: ../src/guestfs-actions.pod:5019
13315 " guestfs_part_set_name (guestfs_h *g,\n"
13316 " const char *device,\n"
13318 " const char *name);\n"
13323 #: ../src/guestfs-actions.pod:5025 ../fish/guestfish-actions.pod:3373
13325 "This sets the partition name on partition numbered C<partnum> on device "
13326 "C<device>. Note that partitions are numbered from 1."
13330 #: ../src/guestfs-actions.pod:5028 ../fish/guestfish-actions.pod:3376
13332 "The partition name can only be set on certain types of partition table. "
13333 "This works on C<gpt> but not on C<mbr> partitions."
13337 #: ../src/guestfs-actions.pod:5035
13338 msgid "guestfs_part_to_dev"
13342 #: ../src/guestfs-actions.pod:5037
13346 " guestfs_part_to_dev (guestfs_h *g,\n"
13347 " const char *partition);\n"
13352 #: ../src/guestfs-actions.pod:5041 ../fish/guestfish-actions.pod:3383
13354 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
13355 "partition number, returning the device name (eg. \"/dev/sdb\")."
13359 #: ../src/guestfs-actions.pod:5045
13361 "The named partition must exist, for example as a string returned from "
13362 "C<guestfs_list_partitions>."
13366 #: ../src/guestfs-actions.pod:5053
13367 msgid "guestfs_ping_daemon"
13371 #: ../src/guestfs-actions.pod:5055
13375 " guestfs_ping_daemon (guestfs_h *g);\n"
13380 #: ../src/guestfs-actions.pod:5058 ../fish/guestfish-actions.pod:3394
13382 "This is a test probe into the guestfs daemon running inside the qemu "
13383 "subprocess. Calling this function checks that the daemon responds to the "
13384 "ping message, without affecting the daemon or attached block device(s) in "
13389 #: ../src/guestfs-actions.pod:5067
13390 msgid "guestfs_pread"
13394 #: ../src/guestfs-actions.pod:5069
13398 " guestfs_pread (guestfs_h *g,\n"
13399 " const char *path,\n"
13401 " int64_t offset,\n"
13402 " size_t *size_r);\n"
13407 #: ../src/guestfs-actions.pod:5076 ../fish/guestfish-actions.pod:3403
13409 "This command lets you read part of a file. It reads C<count> bytes of the "
13410 "file, starting at C<offset>, from file C<path>."
13414 #: ../src/guestfs-actions.pod:5079 ../src/guestfs-actions.pod:5105 ../fish/guestfish-actions.pod:3406 ../fish/guestfish-actions.pod:3421
13416 "This may read fewer bytes than requested. For further details see the "
13417 "L<pread(2)> system call."
13421 #: ../src/guestfs-actions.pod:5082
13422 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
13426 #: ../src/guestfs-actions.pod:5093
13427 msgid "guestfs_pread_device"
13431 #: ../src/guestfs-actions.pod:5095
13435 " guestfs_pread_device (guestfs_h *g,\n"
13436 " const char *device,\n"
13438 " int64_t offset,\n"
13439 " size_t *size_r);\n"
13444 #: ../src/guestfs-actions.pod:5102 ../fish/guestfish-actions.pod:3418
13446 "This command lets you read part of a file. It reads C<count> bytes of "
13447 "C<device>, starting at C<offset>."
13451 #: ../src/guestfs-actions.pod:5108
13452 msgid "See also C<guestfs_pread>."
13456 #: ../src/guestfs-actions.pod:5117
13457 msgid "(Added in 1.5.21)"
13461 #: ../src/guestfs-actions.pod:5119
13462 msgid "guestfs_pvcreate"
13466 #: ../src/guestfs-actions.pod:5121
13470 " guestfs_pvcreate (guestfs_h *g,\n"
13471 " const char *device);\n"
13476 #: ../src/guestfs-actions.pod:5125 ../fish/guestfish-actions.pod:3433
13478 "This creates an LVM physical volume on the named C<device>, where C<device> "
13479 "should usually be a partition name such as C</dev/sda1>."
13483 #: ../src/guestfs-actions.pod:5133
13484 msgid "guestfs_pvremove"
13488 #: ../src/guestfs-actions.pod:5135
13492 " guestfs_pvremove (guestfs_h *g,\n"
13493 " const char *device);\n"
13498 #: ../src/guestfs-actions.pod:5139 ../fish/guestfish-actions.pod:3441
13500 "This wipes a physical volume C<device> so that LVM will no longer recognise "
13505 #: ../src/guestfs-actions.pod:5142 ../fish/guestfish-actions.pod:3444
13507 "The implementation uses the C<pvremove> command which refuses to wipe "
13508 "physical volumes that contain any volume groups, so you have to remove those "
13513 #: ../src/guestfs-actions.pod:5150
13514 msgid "guestfs_pvresize"
13518 #: ../src/guestfs-actions.pod:5152
13522 " guestfs_pvresize (guestfs_h *g,\n"
13523 " const char *device);\n"
13528 #: ../src/guestfs-actions.pod:5156 ../fish/guestfish-actions.pod:3452
13530 "This resizes (expands or shrinks) an existing LVM physical volume to match "
13531 "the new size of the underlying device."
13535 #: ../src/guestfs-actions.pod:5163
13536 msgid "guestfs_pvresize_size"
13540 #: ../src/guestfs-actions.pod:5165
13544 " guestfs_pvresize_size (guestfs_h *g,\n"
13545 " const char *device,\n"
13546 " int64_t size);\n"
13551 #: ../src/guestfs-actions.pod:5170
13553 "This command is the same as C<guestfs_pvresize> except that it allows you to "
13554 "specify the new size (in bytes) explicitly."
13558 #: ../src/guestfs-actions.pod:5177
13559 msgid "guestfs_pvs"
13563 #: ../src/guestfs-actions.pod:5179
13567 " guestfs_pvs (guestfs_h *g);\n"
13572 #: ../src/guestfs-actions.pod:5182 ../fish/guestfish-actions.pod:3466
13574 "List all the physical volumes detected. This is the equivalent of the "
13575 "L<pvs(8)> command."
13579 #: ../src/guestfs-actions.pod:5185 ../fish/guestfish-actions.pod:3469
13581 "This returns a list of just the device names that contain PVs "
13582 "(eg. C</dev/sda2>)."
13586 #: ../src/guestfs-actions.pod:5188
13587 msgid "See also C<guestfs_pvs_full>."
13591 #: ../src/guestfs-actions.pod:5196
13592 msgid "guestfs_pvs_full"
13596 #: ../src/guestfs-actions.pod:5198
13599 " struct guestfs_lvm_pv_list *\n"
13600 " guestfs_pvs_full (guestfs_h *g);\n"
13605 #: ../src/guestfs-actions.pod:5201 ../fish/guestfish-actions.pod:3478
13607 "List all the physical volumes detected. This is the equivalent of the "
13608 "L<pvs(8)> command. The \"full\" version includes all fields."
13612 #: ../src/guestfs-actions.pod:5204
13614 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
13615 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after "
13620 #: ../src/guestfs-actions.pod:5210
13621 msgid "guestfs_pvuuid"
13625 #: ../src/guestfs-actions.pod:5212
13629 " guestfs_pvuuid (guestfs_h *g,\n"
13630 " const char *device);\n"
13635 #: ../src/guestfs-actions.pod:5216 ../fish/guestfish-actions.pod:3485
13636 msgid "This command returns the UUID of the LVM PV C<device>."
13640 #: ../src/guestfs-actions.pod:5223
13641 msgid "guestfs_pwrite"
13645 #: ../src/guestfs-actions.pod:5225
13649 " guestfs_pwrite (guestfs_h *g,\n"
13650 " const char *path,\n"
13651 " const char *content,\n"
13652 " size_t content_size,\n"
13653 " int64_t offset);\n"
13658 #: ../src/guestfs-actions.pod:5232 ../fish/guestfish-actions.pod:3491
13660 "This command writes to part of a file. It writes the data buffer C<content> "
13661 "to the file C<path> starting at offset C<offset>."
13665 #: ../src/guestfs-actions.pod:5235 ../fish/guestfish-actions.pod:3494
13667 "This command implements the L<pwrite(2)> system call, and like that system "
13668 "call it may not write the full data requested. The return value is the "
13669 "number of bytes that were actually written to the file. This could even be "
13670 "0, although short writes are unlikely for regular files in ordinary "
13675 #: ../src/guestfs-actions.pod:5241
13676 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
13680 #: ../src/guestfs-actions.pod:5250
13681 msgid "guestfs_pwrite_device"
13685 #: ../src/guestfs-actions.pod:5252
13689 " guestfs_pwrite_device (guestfs_h *g,\n"
13690 " const char *device,\n"
13691 " const char *content,\n"
13692 " size_t content_size,\n"
13693 " int64_t offset);\n"
13698 #: ../src/guestfs-actions.pod:5259 ../fish/guestfish-actions.pod:3509
13700 "This command writes to part of a device. It writes the data buffer "
13701 "C<content> to C<device> starting at offset C<offset>."
13705 #: ../src/guestfs-actions.pod:5262 ../fish/guestfish-actions.pod:3512
13707 "This command implements the L<pwrite(2)> system call, and like that system "
13708 "call it may not write the full data requested (although short writes to disk "
13709 "devices and partitions are probably impossible with standard Linux kernels)."
13713 #: ../src/guestfs-actions.pod:5267
13714 msgid "See also C<guestfs_pwrite>."
13718 #: ../src/guestfs-actions.pod:5274
13719 msgid "(Added in 1.5.20)"
13723 #: ../src/guestfs-actions.pod:5276
13724 msgid "guestfs_read_file"
13728 #: ../src/guestfs-actions.pod:5278
13732 " guestfs_read_file (guestfs_h *g,\n"
13733 " const char *path,\n"
13734 " size_t *size_r);\n"
13739 #: ../src/guestfs-actions.pod:5283 ../fish/guestfish-actions.pod:3526
13740 msgid "This calls returns the contents of the file C<path> as a buffer."
13744 #: ../src/guestfs-actions.pod:5286
13746 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
13747 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
13748 "function is limited in the total size of file that can be handled."
13752 #: ../src/guestfs-actions.pod:5298
13753 msgid "(Added in 1.0.63)"
13757 #: ../src/guestfs-actions.pod:5300
13758 msgid "guestfs_read_lines"
13762 #: ../src/guestfs-actions.pod:5302
13766 " guestfs_read_lines (guestfs_h *g,\n"
13767 " const char *path);\n"
13772 #: ../src/guestfs-actions.pod:5308 ../fish/guestfish-actions.pod:3543
13774 "The file contents are returned as a list of lines. Trailing C<LF> and "
13775 "C<CRLF> character sequences are I<not> returned."
13779 #: ../src/guestfs-actions.pod:5311
13781 "Note that this function cannot correctly handle binary files (specifically, "
13782 "files containing C<\\0> character which is treated as end of line). For "
13783 "those you need to use the C<guestfs_read_file> function which has a more "
13784 "complex interface."
13788 #: ../src/guestfs-actions.pod:5322
13789 msgid "guestfs_readdir"
13793 #: ../src/guestfs-actions.pod:5324
13796 " struct guestfs_dirent_list *\n"
13797 " guestfs_readdir (guestfs_h *g,\n"
13798 " const char *dir);\n"
13803 #: ../src/guestfs-actions.pod:5328 ../fish/guestfish-actions.pod:3555
13804 msgid "This returns the list of directory entries in directory C<dir>."
13808 #: ../src/guestfs-actions.pod:5330 ../fish/guestfish-actions.pod:3557
13810 "All entries in the directory are returned, including C<.> and C<..>. The "
13811 "entries are I<not> sorted, but returned in the same order as the underlying "
13816 #: ../src/guestfs-actions.pod:5334 ../fish/guestfish-actions.pod:3561
13818 "Also this call returns basic file type information about each file. The "
13819 "C<ftyp> field will contain one of the following characters:"
13823 #: ../src/guestfs-actions.pod:5339 ../fish/guestfish-actions.pod:3566
13828 #: ../src/guestfs-actions.pod:5341 ../fish/guestfish-actions.pod:3568
13829 msgid "Block special"
13833 #: ../src/guestfs-actions.pod:5343 ../fish/guestfish-actions.pod:3570
13838 #: ../src/guestfs-actions.pod:5345 ../fish/guestfish-actions.pod:3572
13839 msgid "Char special"
13843 #: ../src/guestfs-actions.pod:5347 ../fish/guestfish-actions.pod:3574
13848 #: ../src/guestfs-actions.pod:5349 ../fish/guestfish-actions.pod:3576
13853 #: ../src/guestfs-actions.pod:5351 ../fish/guestfish-actions.pod:3578
13858 #: ../src/guestfs-actions.pod:5353 ../fish/guestfish-actions.pod:3580
13859 msgid "FIFO (named pipe)"
13863 #: ../src/guestfs-actions.pod:5355 ../fish/guestfish-actions.pod:3582
13868 #: ../src/guestfs-actions.pod:5357 ../fish/guestfish-actions.pod:3584
13869 msgid "Symbolic link"
13873 #: ../src/guestfs-actions.pod:5359 ../fish/guestfish-actions.pod:3586
13878 #: ../src/guestfs-actions.pod:5361 ../fish/guestfish-actions.pod:3588
13879 msgid "Regular file"
13883 #: ../src/guestfs-actions.pod:5363 ../fish/guestfish-actions.pod:3590
13888 #: ../src/guestfs-actions.pod:5365 ../fish/guestfish-actions.pod:3592
13893 #: ../src/guestfs-actions.pod:5367 ../fish/guestfish-actions.pod:3594
13898 #: ../src/guestfs-actions.pod:5369 ../fish/guestfish-actions.pod:3596
13899 msgid "Unknown file type"
13903 #: ../src/guestfs-actions.pod:5371 ../fish/guestfish-actions.pod:3598
13908 #: ../src/guestfs-actions.pod:5373 ../fish/guestfish-actions.pod:3600
13909 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
13913 #: ../src/guestfs-actions.pod:5378
13915 "This function is primarily intended for use by programs. To get a simple "
13916 "list of names, use C<guestfs_ls>. To get a printable directory for human "
13917 "consumption, use C<guestfs_ll>."
13921 #: ../src/guestfs-actions.pod:5382
13923 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
13924 "was an error. I<The caller must call C<guestfs_free_dirent_list> after "
13929 #: ../src/guestfs-actions.pod:5388
13930 msgid "guestfs_readlink"
13934 #: ../src/guestfs-actions.pod:5390
13938 " guestfs_readlink (guestfs_h *g,\n"
13939 " const char *path);\n"
13944 #: ../src/guestfs-actions.pod:5394 ../fish/guestfish-actions.pod:3613
13945 msgid "This command reads the target of a symbolic link."
13949 #: ../src/guestfs-actions.pod:5401
13950 msgid "guestfs_readlinklist"
13954 #: ../src/guestfs-actions.pod:5403
13958 " guestfs_readlinklist (guestfs_h *g,\n"
13959 " const char *path,\n"
13960 " char *const *names);\n"
13965 #: ../src/guestfs-actions.pod:5408 ../fish/guestfish-actions.pod:3619
13967 "This call allows you to do a C<readlink> operation on multiple files, where "
13968 "all files are in the directory C<path>. C<names> is the list of files from "
13973 #: ../src/guestfs-actions.pod:5412 ../fish/guestfish-actions.pod:3623
13975 "On return you get a list of strings, with a one-to-one correspondence to the "
13976 "C<names> list. Each string is the value of the symbolic link."
13980 #: ../src/guestfs-actions.pod:5416 ../fish/guestfish-actions.pod:3627
13982 "If the C<readlink(2)> operation fails on any name, then the corresponding "
13983 "result string is the empty string C<\"\">. However the whole operation is "
13984 "completed even if there were C<readlink(2)> errors, and so you can call this "
13985 "function with names where you don't know if they are symbolic links already "
13986 "(albeit slightly less efficient)."
13990 #: ../src/guestfs-actions.pod:5423 ../fish/guestfish-actions.pod:3634
13992 "This call is intended for programs that want to efficiently list a directory "
13993 "contents without making many round-trips. Very long directory listings "
13994 "might cause the protocol message size to be exceeded, causing this call to "
13995 "fail. The caller must split up such requests into smaller groups of names."
13999 #: ../src/guestfs-actions.pod:5436
14000 msgid "guestfs_realpath"
14004 #: ../src/guestfs-actions.pod:5438
14008 " guestfs_realpath (guestfs_h *g,\n"
14009 " const char *path);\n"
14014 #: ../src/guestfs-actions.pod:5442 ../fish/guestfish-actions.pod:3645
14016 "Return the canonicalized absolute pathname of C<path>. The returned path "
14017 "has no C<.>, C<..> or symbolic link path elements."
14021 #: ../src/guestfs-actions.pod:5450
14022 msgid "guestfs_removexattr"
14026 #: ../src/guestfs-actions.pod:5452
14030 " guestfs_removexattr (guestfs_h *g,\n"
14031 " const char *xattr,\n"
14032 " const char *path);\n"
14037 #: ../src/guestfs-actions.pod:5457 ../fish/guestfish-actions.pod:3652
14038 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
14042 #: ../src/guestfs-actions.pod:5460
14043 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
14047 #: ../src/guestfs-actions.pod:5466
14048 msgid "guestfs_resize2fs"
14052 #: ../src/guestfs-actions.pod:5468
14056 " guestfs_resize2fs (guestfs_h *g,\n"
14057 " const char *device);\n"
14062 #: ../src/guestfs-actions.pod:5472 ../fish/guestfish-actions.pod:3661
14064 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
14065 "underlying device."
14069 #: ../src/guestfs-actions.pod:5475
14071 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
14072 "C<device> before calling this command. For unknown reasons C<resize2fs> "
14073 "sometimes gives an error about this and sometimes not. In any case, it is "
14074 "always safe to call C<guestfs_e2fsck_f> before calling this function."
14078 #: ../src/guestfs-actions.pod:5485
14079 msgid "guestfs_resize2fs_M"
14083 #: ../src/guestfs-actions.pod:5487
14087 " guestfs_resize2fs_M (guestfs_h *g,\n"
14088 " const char *device);\n"
14093 #: ../src/guestfs-actions.pod:5491
14095 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
14096 "resized to its minimum size. This works like the C<-M> option to the "
14097 "C<resize2fs> command."
14101 #: ../src/guestfs-actions.pod:5495
14103 "To get the resulting size of the filesystem you should call "
14104 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
14105 "These two numbers, multiplied together, give the resulting size of the "
14106 "minimal filesystem in bytes."
14110 #: ../src/guestfs-actions.pod:5502
14111 msgid "guestfs_resize2fs_size"
14115 #: ../src/guestfs-actions.pod:5504
14119 " guestfs_resize2fs_size (guestfs_h *g,\n"
14120 " const char *device,\n"
14121 " int64_t size);\n"
14126 #: ../src/guestfs-actions.pod:5509
14128 "This command is the same as C<guestfs_resize2fs> except that it allows you "
14129 "to specify the new size (in bytes) explicitly."
14133 #: ../src/guestfs-actions.pod:5516
14138 #: ../src/guestfs-actions.pod:5518
14142 " guestfs_rm (guestfs_h *g,\n"
14143 " const char *path);\n"
14148 #: ../src/guestfs-actions.pod:5522 ../fish/guestfish-actions.pod:3694
14149 msgid "Remove the single file C<path>."
14153 #: ../src/guestfs-actions.pod:5528
14154 msgid "guestfs_rm_rf"
14158 #: ../src/guestfs-actions.pod:5530
14162 " guestfs_rm_rf (guestfs_h *g,\n"
14163 " const char *path);\n"
14168 #: ../src/guestfs-actions.pod:5534 ../fish/guestfish-actions.pod:3700
14170 "Remove the file or directory C<path>, recursively removing the contents if "
14171 "its a directory. This is like the C<rm -rf> shell command."
14175 #: ../src/guestfs-actions.pod:5542
14176 msgid "guestfs_rmdir"
14180 #: ../src/guestfs-actions.pod:5544
14184 " guestfs_rmdir (guestfs_h *g,\n"
14185 " const char *path);\n"
14190 #: ../src/guestfs-actions.pod:5548 ../fish/guestfish-actions.pod:3708
14191 msgid "Remove the single directory C<path>."
14195 #: ../src/guestfs-actions.pod:5554
14196 msgid "guestfs_rmmountpoint"
14200 #: ../src/guestfs-actions.pod:5556
14204 " guestfs_rmmountpoint (guestfs_h *g,\n"
14205 " const char *exemptpath);\n"
14210 #: ../src/guestfs-actions.pod:5560
14212 "This calls removes a mountpoint that was previously created with "
14213 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
14217 #: ../src/guestfs-actions.pod:5568
14218 msgid "guestfs_scrub_device"
14222 #: ../src/guestfs-actions.pod:5570
14226 " guestfs_scrub_device (guestfs_h *g,\n"
14227 " const char *device);\n"
14232 #: ../src/guestfs-actions.pod:5574 ../fish/guestfish-actions.pod:3722
14234 "This command writes patterns over C<device> to make data retrieval more "
14239 #: ../src/guestfs-actions.pod:5577 ../src/guestfs-actions.pod:5598 ../src/guestfs-actions.pod:5617 ../fish/guestfish-actions.pod:3725 ../fish/guestfish-actions.pod:3740 ../fish/guestfish-actions.pod:3753
14241 "It is an interface to the L<scrub(1)> program. See that manual page for "
14246 #: ../src/guestfs-actions.pod:5585 ../src/guestfs-actions.pod:5603 ../src/guestfs-actions.pod:5622
14247 msgid "(Added in 1.0.52)"
14251 #: ../src/guestfs-actions.pod:5587
14252 msgid "guestfs_scrub_file"
14256 #: ../src/guestfs-actions.pod:5589
14260 " guestfs_scrub_file (guestfs_h *g,\n"
14261 " const char *file);\n"
14266 #: ../src/guestfs-actions.pod:5593 ../fish/guestfish-actions.pod:3735
14268 "This command writes patterns over a file to make data retrieval more "
14273 #: ../src/guestfs-actions.pod:5596 ../fish/guestfish-actions.pod:3738
14274 msgid "The file is I<removed> after scrubbing."
14278 #: ../src/guestfs-actions.pod:5605
14279 msgid "guestfs_scrub_freespace"
14283 #: ../src/guestfs-actions.pod:5607
14287 " guestfs_scrub_freespace (guestfs_h *g,\n"
14288 " const char *dir);\n"
14293 #: ../src/guestfs-actions.pod:5611
14295 "This command creates the directory C<dir> and then fills it with files until "
14296 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
14297 "and deletes them. The intention is to scrub any free space on the partition "
14298 "containing C<dir>."
14302 #: ../src/guestfs-actions.pod:5624
14303 msgid "guestfs_set_append"
14307 #: ../src/guestfs-actions.pod:5626
14311 " guestfs_set_append (guestfs_h *g,\n"
14312 " const char *append);\n"
14317 #: ../src/guestfs-actions.pod:5630 ../fish/guestfish-actions.pod:3762
14319 "This function is used to add additional options to the guest kernel command "
14324 #: ../src/guestfs-actions.pod:5633 ../fish/guestfish-actions.pod:3765
14326 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
14327 "environment variable."
14331 #: ../src/guestfs-actions.pod:5636 ../fish/guestfish-actions.pod:3768
14333 "Setting C<append> to C<NULL> means I<no> additional options are passed "
14334 "(libguestfs always adds a few of its own)."
14338 #: ../src/guestfs-actions.pod:5643
14339 msgid "guestfs_set_autosync"
14343 #: ../src/guestfs-actions.pod:5645
14347 " guestfs_set_autosync (guestfs_h *g,\n"
14348 " int autosync);\n"
14353 #: ../src/guestfs-actions.pod:5649
14355 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
14356 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
14357 "the handle is closed (also if the program exits without closing handles)."
14361 #: ../src/guestfs-actions.pod:5654 ../fish/guestfish-actions.pod:3782
14363 "This is enabled by default (since libguestfs 1.5.24, previously it was "
14364 "disabled by default)."
14368 #: ../src/guestfs-actions.pod:5661
14369 msgid "guestfs_set_direct"
14373 #: ../src/guestfs-actions.pod:5663
14377 " guestfs_set_direct (guestfs_h *g,\n"
14383 #: ../src/guestfs-actions.pod:5667 ../fish/guestfish-actions.pod:3791
14385 "If the direct appliance mode flag is enabled, then stdin and stdout are "
14386 "passed directly through to the appliance once it is launched."
14390 #: ../src/guestfs-actions.pod:5671
14392 "One consequence of this is that log messages aren't caught by the library "
14393 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
14398 #: ../src/guestfs-actions.pod:5675 ../fish/guestfish-actions.pod:3799
14399 msgid "You probably don't want to use this unless you know what you are doing."
14403 #: ../src/guestfs-actions.pod:5678 ../fish/guestfish-actions.pod:3802
14404 msgid "The default is disabled."
14408 #: ../src/guestfs-actions.pod:5684
14409 msgid "guestfs_set_e2label"
14413 #: ../src/guestfs-actions.pod:5686
14417 " guestfs_set_e2label (guestfs_h *g,\n"
14418 " const char *device,\n"
14419 " const char *label);\n"
14424 #: ../src/guestfs-actions.pod:5691 ../fish/guestfish-actions.pod:3808
14426 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
14427 "C<label>. Filesystem labels are limited to 16 characters."
14431 #: ../src/guestfs-actions.pod:5695
14433 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
14434 "the existing label on a filesystem."
14438 #: ../src/guestfs-actions.pod:5702
14439 msgid "guestfs_set_e2uuid"
14443 #: ../src/guestfs-actions.pod:5704
14447 " guestfs_set_e2uuid (guestfs_h *g,\n"
14448 " const char *device,\n"
14449 " const char *uuid);\n"
14454 #: ../src/guestfs-actions.pod:5709 ../fish/guestfish-actions.pod:3819
14456 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
14457 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
14458 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
14462 #: ../src/guestfs-actions.pod:5714
14464 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
14465 "the existing UUID of a filesystem."
14469 #: ../src/guestfs-actions.pod:5721
14470 msgid "guestfs_set_memsize"
14474 #: ../src/guestfs-actions.pod:5723
14478 " guestfs_set_memsize (guestfs_h *g,\n"
14484 #: ../src/guestfs-actions.pod:5727
14486 "This sets the memory size in megabytes allocated to the qemu subprocess. "
14487 "This only has any effect if called before C<guestfs_launch>."
14491 #: ../src/guestfs-actions.pod:5731 ../fish/guestfish-actions.pod:3837
14493 "You can also change this by setting the environment variable "
14494 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
14498 #: ../src/guestfs-actions.pod:5742
14499 msgid "guestfs_set_network"
14503 #: ../src/guestfs-actions.pod:5744
14507 " guestfs_set_network (guestfs_h *g,\n"
14513 #: ../src/guestfs-actions.pod:5748 ../fish/guestfish-actions.pod:3850
14515 "If C<network> is true, then the network is enabled in the libguestfs "
14516 "appliance. The default is false."
14520 #: ../src/guestfs-actions.pod:5751 ../fish/guestfish-actions.pod:3853
14522 "This affects whether commands are able to access the network (see "
14523 "L<guestfs(3)/RUNNING COMMANDS>)."
14527 #: ../src/guestfs-actions.pod:5754
14529 "You must call this before calling C<guestfs_launch>, otherwise it has no "
14534 #: ../src/guestfs-actions.pod:5761
14535 msgid "guestfs_set_path"
14539 #: ../src/guestfs-actions.pod:5763
14543 " guestfs_set_path (guestfs_h *g,\n"
14544 " const char *searchpath);\n"
14549 #: ../src/guestfs-actions.pod:5767 ../fish/guestfish-actions.pod:3865
14550 msgid "Set the path that libguestfs searches for kernel and initrd.img."
14554 #: ../src/guestfs-actions.pod:5769 ../fish/guestfish-actions.pod:3867
14556 "The default is C<$libdir/guestfs> unless overridden by setting "
14557 "C<LIBGUESTFS_PATH> environment variable."
14561 #: ../src/guestfs-actions.pod:5772 ../fish/guestfish-actions.pod:3870
14562 msgid "Setting C<path> to C<NULL> restores the default path."
14566 #: ../src/guestfs-actions.pod:5778
14567 msgid "guestfs_set_qemu"
14571 #: ../src/guestfs-actions.pod:5780
14575 " guestfs_set_qemu (guestfs_h *g,\n"
14576 " const char *qemu);\n"
14581 #: ../src/guestfs-actions.pod:5784 ../fish/guestfish-actions.pod:3878
14582 msgid "Set the qemu binary that we will use."
14586 #: ../src/guestfs-actions.pod:5786 ../fish/guestfish-actions.pod:3880
14587 msgid "The default is chosen when the library was compiled by the configure script."
14591 #: ../src/guestfs-actions.pod:5789 ../fish/guestfish-actions.pod:3883
14593 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
14598 #: ../src/guestfs-actions.pod:5792 ../fish/guestfish-actions.pod:3886
14599 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
14603 #: ../src/guestfs-actions.pod:5794 ../fish/guestfish-actions.pod:3888
14605 "Note that you should call this function as early as possible after creating "
14606 "the handle. This is because some pre-launch operations depend on testing "
14607 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
14608 "don't retest features, and so you might see inconsistent results. Using the "
14609 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
14610 "the qemu binary at the same time as the handle is created."
14614 #: ../src/guestfs-actions.pod:5806
14615 msgid "guestfs_set_recovery_proc"
14619 #: ../src/guestfs-actions.pod:5808
14623 " guestfs_set_recovery_proc (guestfs_h *g,\n"
14624 " int recoveryproc);\n"
14629 #: ../src/guestfs-actions.pod:5812
14631 "If this is called with the parameter C<false> then C<guestfs_launch> does "
14632 "not create a recovery process. The purpose of the recovery process is to "
14633 "stop runaway qemu processes in the case where the main program aborts "
14638 #: ../src/guestfs-actions.pod:5817
14640 "This only has any effect if called before C<guestfs_launch>, and the default "
14645 #: ../src/guestfs-actions.pod:5820 ../fish/guestfish-actions.pod:3910
14647 "About the only time when you would want to disable this is if the main "
14648 "process will fork itself into the background (\"daemonize\" itself). In "
14649 "this case the recovery process thinks that the main program has disappeared "
14650 "and so kills qemu, which is not very helpful."
14654 #: ../src/guestfs-actions.pod:5830
14655 msgid "guestfs_set_selinux"
14659 #: ../src/guestfs-actions.pod:5832
14663 " guestfs_set_selinux (guestfs_h *g,\n"
14669 #: ../src/guestfs-actions.pod:5836 ../fish/guestfish-actions.pod:3922
14671 "This sets the selinux flag that is passed to the appliance at boot time. "
14672 "The default is C<selinux=0> (disabled)."
14676 #: ../src/guestfs-actions.pod:5839 ../fish/guestfish-actions.pod:3925
14678 "Note that if SELinux is enabled, it is always in Permissive mode "
14679 "(C<enforcing=0>)."
14683 #: ../src/guestfs-actions.pod:5849
14684 msgid "guestfs_set_trace"
14688 #: ../src/guestfs-actions.pod:5851
14692 " guestfs_set_trace (guestfs_h *g,\n"
14698 #: ../src/guestfs-actions.pod:5855 ../fish/guestfish-actions.pod:3937
14700 "If the command trace flag is set to 1, then commands are printed on stderr "
14701 "before they are executed in a format which is very similar to the one used "
14702 "by guestfish. In other words, you can run a program with this enabled, and "
14703 "you will get out a script which you can feed to guestfish to perform the "
14704 "same set of actions."
14708 #: ../src/guestfs-actions.pod:5862 ../fish/guestfish-actions.pod:3944
14710 "If you want to trace C API calls into libguestfs (and other libraries) then "
14711 "possibly a better way is to use the external ltrace(1) command."
14715 #: ../src/guestfs-actions.pod:5866 ../fish/guestfish-actions.pod:3948
14717 "Command traces are disabled unless the environment variable "
14718 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
14722 #: ../src/guestfs-actions.pod:5873
14723 msgid "guestfs_set_verbose"
14727 #: ../src/guestfs-actions.pod:5875
14731 " guestfs_set_verbose (guestfs_h *g,\n"
14737 #: ../src/guestfs-actions.pod:5879 ../fish/guestfish-actions.pod:3957
14738 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
14742 #: ../src/guestfs-actions.pod:5881 ../fish/guestfish-actions.pod:3959
14744 "Verbose messages are disabled unless the environment variable "
14745 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
14749 #: ../src/guestfs-actions.pod:5888
14750 msgid "guestfs_setcon"
14754 #: ../src/guestfs-actions.pod:5890
14758 " guestfs_setcon (guestfs_h *g,\n"
14759 " const char *context);\n"
14764 #: ../src/guestfs-actions.pod:5894 ../fish/guestfish-actions.pod:3966
14766 "This sets the SELinux security context of the daemon to the string "
14771 #: ../src/guestfs-actions.pod:5897 ../fish/guestfish-actions.pod:3969
14772 msgid "See the documentation about SELINUX in L<guestfs(3)>."
14776 #: ../src/guestfs-actions.pod:5903
14777 msgid "guestfs_setxattr"
14781 #: ../src/guestfs-actions.pod:5905
14785 " guestfs_setxattr (guestfs_h *g,\n"
14786 " const char *xattr,\n"
14787 " const char *val,\n"
14789 " const char *path);\n"
14794 #: ../src/guestfs-actions.pod:5912 ../fish/guestfish-actions.pod:3975
14796 "This call sets the extended attribute named C<xattr> of the file C<path> to "
14797 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
14801 #: ../src/guestfs-actions.pod:5916
14802 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
14806 #: ../src/guestfs-actions.pod:5922
14807 msgid "guestfs_sfdisk"
14811 #: ../src/guestfs-actions.pod:5924
14815 " guestfs_sfdisk (guestfs_h *g,\n"
14816 " const char *device,\n"
14820 " char *const *lines);\n"
14825 #: ../src/guestfs-actions.pod:5932 ../fish/guestfish-actions.pod:3985
14827 "This is a direct interface to the L<sfdisk(8)> program for creating "
14828 "partitions on block devices."
14832 #: ../src/guestfs-actions.pod:5935 ../fish/guestfish-actions.pod:3988
14833 msgid "C<device> should be a block device, for example C</dev/sda>."
14837 #: ../src/guestfs-actions.pod:5937 ../fish/guestfish-actions.pod:3990
14839 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
14840 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
14841 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
14842 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
14843 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
14844 "the kernel) cannot work out the right geometry and you will need to tell it."
14848 #: ../src/guestfs-actions.pod:5945 ../fish/guestfish-actions.pod:3998
14850 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
14851 "refer to the L<sfdisk(8)> manpage."
14855 #: ../src/guestfs-actions.pod:5948 ../fish/guestfish-actions.pod:4001
14857 "To create a single partition occupying the whole disk, you would pass "
14858 "C<lines> as a single element list, when the single element being the string "
14863 #: ../src/guestfs-actions.pod:5952
14864 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
14868 #: ../src/guestfs-actions.pod:5962
14869 msgid "guestfs_sfdiskM"
14873 #: ../src/guestfs-actions.pod:5964
14877 " guestfs_sfdiskM (guestfs_h *g,\n"
14878 " const char *device,\n"
14879 " char *const *lines);\n"
14884 #: ../src/guestfs-actions.pod:5969
14886 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
14887 "partition sizes are specified in megabytes only (rounded to the nearest "
14888 "cylinder) and you don't need to specify the cyls, heads and sectors "
14889 "parameters which were rarely if ever used anyway."
14893 #: ../src/guestfs-actions.pod:5975
14895 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
14896 "C<guestfs_part_disk>"
14900 #: ../src/guestfs-actions.pod:5985
14901 msgid "guestfs_sfdisk_N"
14905 #: ../src/guestfs-actions.pod:5987
14909 " guestfs_sfdisk_N (guestfs_h *g,\n"
14910 " const char *device,\n"
14915 " const char *line);\n"
14920 #: ../src/guestfs-actions.pod:5996 ../fish/guestfish-actions.pod:4031
14922 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
14923 "(note: C<n> counts from 1)."
14927 #: ../src/guestfs-actions.pod:5999
14929 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
14930 "for the cyls/heads/sectors parameters."
14934 #: ../src/guestfs-actions.pod:6002
14935 msgid "See also: C<guestfs_part_add>"
14939 #: ../src/guestfs-actions.pod:6011
14940 msgid "guestfs_sfdisk_disk_geometry"
14944 #: ../src/guestfs-actions.pod:6013
14948 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
14949 " const char *device);\n"
14954 #: ../src/guestfs-actions.pod:6017
14956 "This displays the disk geometry of C<device> read from the partition table. "
14957 "Especially in the case where the underlying block device has been resized, "
14958 "this can be different from the kernel's idea of the geometry (see "
14959 "C<guestfs_sfdisk_kernel_geometry>)."
14963 #: ../src/guestfs-actions.pod:6022 ../src/guestfs-actions.pod:6038 ../fish/guestfish-actions.pod:4051 ../fish/guestfish-actions.pod:4060
14964 msgid "The result is in human-readable format, and not designed to be parsed."
14968 #: ../src/guestfs-actions.pod:6030
14969 msgid "guestfs_sfdisk_kernel_geometry"
14973 #: ../src/guestfs-actions.pod:6032
14977 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
14978 " const char *device);\n"
14983 #: ../src/guestfs-actions.pod:6036 ../fish/guestfish-actions.pod:4058
14984 msgid "This displays the kernel's idea of the geometry of C<device>."
14988 #: ../src/guestfs-actions.pod:6046
14989 msgid "guestfs_sfdisk_l"
14993 #: ../src/guestfs-actions.pod:6048
14997 " guestfs_sfdisk_l (guestfs_h *g,\n"
14998 " const char *device);\n"
15003 #: ../src/guestfs-actions.pod:6052 ../fish/guestfish-actions.pod:4067
15005 "This displays the partition table on C<device>, in the human-readable output "
15006 "of the L<sfdisk(8)> command. It is not intended to be parsed."
15010 #: ../src/guestfs-actions.pod:6056
15011 msgid "See also: C<guestfs_part_list>"
15015 #: ../src/guestfs-actions.pod:6063
15020 #: ../src/guestfs-actions.pod:6065
15024 " guestfs_sh (guestfs_h *g,\n"
15025 " const char *command);\n"
15030 #: ../src/guestfs-actions.pod:6069 ../fish/guestfish-actions.pod:4077
15032 "This call runs a command from the guest filesystem via the guest's "
15037 #: ../src/guestfs-actions.pod:6072
15038 msgid "This is like C<guestfs_command>, but passes the command to:"
15042 #: ../src/guestfs-actions.pod:6074 ../fish/guestfish-actions.pod:4082
15045 " /bin/sh -c \"command\"\n"
15050 #: ../src/guestfs-actions.pod:6076 ../fish/guestfish-actions.pod:4084
15052 "Depending on the guest's shell, this usually results in wildcards being "
15053 "expanded, shell expressions being interpolated and so on."
15057 #: ../src/guestfs-actions.pod:6080
15058 msgid "All the provisos about C<guestfs_command> apply to this call."
15062 #: ../src/guestfs-actions.pod:6087
15063 msgid "guestfs_sh_lines"
15067 #: ../src/guestfs-actions.pod:6089
15071 " guestfs_sh_lines (guestfs_h *g,\n"
15072 " const char *command);\n"
15077 #: ../src/guestfs-actions.pod:6093
15079 "This is the same as C<guestfs_sh>, but splits the result into a list of "
15084 #: ../src/guestfs-actions.pod:6096
15085 msgid "See also: C<guestfs_command_lines>"
15089 #: ../src/guestfs-actions.pod:6104
15090 msgid "guestfs_sleep"
15094 #: ../src/guestfs-actions.pod:6106
15098 " guestfs_sleep (guestfs_h *g,\n"
15104 #: ../src/guestfs-actions.pod:6110 ../fish/guestfish-actions.pod:4103
15105 msgid "Sleep for C<secs> seconds."
15109 #: ../src/guestfs-actions.pod:6114
15110 msgid "(Added in 1.0.41)"
15114 #: ../src/guestfs-actions.pod:6116 ../src/guestfs-structs.pod:109
15115 msgid "guestfs_stat"
15119 #: ../src/guestfs-actions.pod:6118
15122 " struct guestfs_stat *\n"
15123 " guestfs_stat (guestfs_h *g,\n"
15124 " const char *path);\n"
15129 #: ../src/guestfs-actions.pod:6124 ../fish/guestfish-actions.pod:4111
15130 msgid "This is the same as the C<stat(2)> system call."
15134 #: ../src/guestfs-actions.pod:6132 ../src/guestfs-structs.pod:135
15135 msgid "guestfs_statvfs"
15139 #: ../src/guestfs-actions.pod:6134
15142 " struct guestfs_statvfs *\n"
15143 " guestfs_statvfs (guestfs_h *g,\n"
15144 " const char *path);\n"
15149 #: ../src/guestfs-actions.pod:6138 ../fish/guestfish-actions.pod:4117
15151 "Returns file system statistics for any mounted file system. C<path> should "
15152 "be a file or directory in the mounted file system (typically it is the mount "
15153 "point itself, but it doesn't need to be)."
15157 #: ../src/guestfs-actions.pod:6142 ../fish/guestfish-actions.pod:4121
15158 msgid "This is the same as the C<statvfs(2)> system call."
15162 #: ../src/guestfs-actions.pod:6144
15164 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
15165 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
15169 #: ../src/guestfs-actions.pod:6150
15170 msgid "guestfs_strings"
15174 #: ../src/guestfs-actions.pod:6152
15178 " guestfs_strings (guestfs_h *g,\n"
15179 " const char *path);\n"
15184 #: ../src/guestfs-actions.pod:6156 ../fish/guestfish-actions.pod:4127
15186 "This runs the L<strings(1)> command on a file and returns the list of "
15187 "printable strings found."
15191 #: ../src/guestfs-actions.pod:6168
15192 msgid "guestfs_strings_e"
15196 #: ../src/guestfs-actions.pod:6170
15200 " guestfs_strings_e (guestfs_h *g,\n"
15201 " const char *encoding,\n"
15202 " const char *path);\n"
15207 #: ../src/guestfs-actions.pod:6175
15209 "This is like the C<guestfs_strings> command, but allows you to specify the "
15210 "encoding of strings that are looked for in the source file C<path>."
15214 #: ../src/guestfs-actions.pod:6179 ../fish/guestfish-actions.pod:4141
15215 msgid "Allowed encodings are:"
15219 #: ../src/guestfs-actions.pod:6183 ../fish/guestfish-actions.pod:4145
15224 #: ../src/guestfs-actions.pod:6185
15226 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
15227 "ISO-8859-X (this is what C<guestfs_strings> uses)."
15231 #: ../src/guestfs-actions.pod:6188 ../fish/guestfish-actions.pod:4150
15236 #: ../src/guestfs-actions.pod:6190 ../fish/guestfish-actions.pod:4152
15237 msgid "Single 8-bit-byte characters."
15241 #: ../src/guestfs-actions.pod:6192 ../fish/guestfish-actions.pod:4154
15246 #: ../src/guestfs-actions.pod:6194 ../fish/guestfish-actions.pod:4156
15247 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
15251 #: ../src/guestfs-actions.pod:6197 ../fish/guestfish-actions.pod:4159
15252 msgid "l (lower case letter L)"
15256 #: ../src/guestfs-actions.pod:6199 ../fish/guestfish-actions.pod:4161
15258 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
15259 "examining binaries in Windows guests."
15263 #: ../src/guestfs-actions.pod:6202 ../fish/guestfish-actions.pod:4164
15268 #: ../src/guestfs-actions.pod:6204 ../fish/guestfish-actions.pod:4166
15269 msgid "32-bit big endian such as UCS-4BE."
15273 #: ../src/guestfs-actions.pod:6206 ../fish/guestfish-actions.pod:4168
15278 #: ../src/guestfs-actions.pod:6208 ../fish/guestfish-actions.pod:4170
15279 msgid "32-bit little endian such as UCS-4LE."
15283 #: ../src/guestfs-actions.pod:6212 ../fish/guestfish-actions.pod:4174
15284 msgid "The returned strings are transcoded to UTF-8."
15288 #: ../src/guestfs-actions.pod:6223
15289 msgid "guestfs_swapoff_device"
15293 #: ../src/guestfs-actions.pod:6225
15297 " guestfs_swapoff_device (guestfs_h *g,\n"
15298 " const char *device);\n"
15303 #: ../src/guestfs-actions.pod:6229
15305 "This command disables the libguestfs appliance swap device or partition "
15306 "named C<device>. See C<guestfs_swapon_device>."
15310 #: ../src/guestfs-actions.pod:6237
15311 msgid "guestfs_swapoff_file"
15315 #: ../src/guestfs-actions.pod:6239
15319 " guestfs_swapoff_file (guestfs_h *g,\n"
15320 " const char *file);\n"
15325 #: ../src/guestfs-actions.pod:6243 ../fish/guestfish-actions.pod:4191
15326 msgid "This command disables the libguestfs appliance swap on file."
15330 #: ../src/guestfs-actions.pod:6249
15331 msgid "guestfs_swapoff_label"
15335 #: ../src/guestfs-actions.pod:6251
15339 " guestfs_swapoff_label (guestfs_h *g,\n"
15340 " const char *label);\n"
15345 #: ../src/guestfs-actions.pod:6255 ../fish/guestfish-actions.pod:4197
15347 "This command disables the libguestfs appliance swap on labeled swap "
15352 #: ../src/guestfs-actions.pod:6262
15353 msgid "guestfs_swapoff_uuid"
15357 #: ../src/guestfs-actions.pod:6264
15361 " guestfs_swapoff_uuid (guestfs_h *g,\n"
15362 " const char *uuid);\n"
15367 #: ../src/guestfs-actions.pod:6268 ../fish/guestfish-actions.pod:4204
15369 "This command disables the libguestfs appliance swap partition with the given "
15374 #: ../src/guestfs-actions.pod:6275
15375 msgid "guestfs_swapon_device"
15379 #: ../src/guestfs-actions.pod:6277
15383 " guestfs_swapon_device (guestfs_h *g,\n"
15384 " const char *device);\n"
15389 #: ../src/guestfs-actions.pod:6281
15391 "This command enables the libguestfs appliance to use the swap device or "
15392 "partition named C<device>. The increased memory is made available for all "
15393 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
15397 #: ../src/guestfs-actions.pod:6286 ../fish/guestfish-actions.pod:4216
15399 "Note that you should not swap to existing guest swap partitions unless you "
15400 "know what you are doing. They may contain hibernation information, or other "
15401 "information that the guest doesn't want you to trash. You also risk leaking "
15402 "information about the host to the guest this way. Instead, attach a new "
15403 "host device to the guest and swap on that."
15407 #: ../src/guestfs-actions.pod:6297
15408 msgid "guestfs_swapon_file"
15412 #: ../src/guestfs-actions.pod:6299
15416 " guestfs_swapon_file (guestfs_h *g,\n"
15417 " const char *file);\n"
15422 #: ../src/guestfs-actions.pod:6303
15424 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
15429 #: ../src/guestfs-actions.pod:6310
15430 msgid "guestfs_swapon_label"
15434 #: ../src/guestfs-actions.pod:6312
15438 " guestfs_swapon_label (guestfs_h *g,\n"
15439 " const char *label);\n"
15444 #: ../src/guestfs-actions.pod:6316
15446 "This command enables swap to a labeled swap partition. See "
15447 "C<guestfs_swapon_device> for other notes."
15451 #: ../src/guestfs-actions.pod:6323
15452 msgid "guestfs_swapon_uuid"
15456 #: ../src/guestfs-actions.pod:6325
15460 " guestfs_swapon_uuid (guestfs_h *g,\n"
15461 " const char *uuid);\n"
15466 #: ../src/guestfs-actions.pod:6329
15468 "This command enables swap to a swap partition with the given UUID. See "
15469 "C<guestfs_swapon_device> for other notes."
15473 #: ../src/guestfs-actions.pod:6336
15474 msgid "guestfs_sync"
15478 #: ../src/guestfs-actions.pod:6338
15482 " guestfs_sync (guestfs_h *g);\n"
15487 #: ../src/guestfs-actions.pod:6341 ../fish/guestfish-actions.pod:4248
15489 "This syncs the disk, so that any writes are flushed through to the "
15490 "underlying disk image."
15494 #: ../src/guestfs-actions.pod:6344 ../fish/guestfish-actions.pod:4251
15496 "You should always call this if you have modified a disk image, before "
15497 "closing the handle."
15501 #: ../src/guestfs-actions.pod:6351
15502 msgid "guestfs_tail"
15506 #: ../src/guestfs-actions.pod:6353
15510 " guestfs_tail (guestfs_h *g,\n"
15511 " const char *path);\n"
15516 #: ../src/guestfs-actions.pod:6357 ../fish/guestfish-actions.pod:4258
15517 msgid "This command returns up to the last 10 lines of a file as a list of strings."
15521 #: ../src/guestfs-actions.pod:6369
15522 msgid "guestfs_tail_n"
15526 #: ../src/guestfs-actions.pod:6371
15530 " guestfs_tail_n (guestfs_h *g,\n"
15532 " const char *path);\n"
15537 #: ../src/guestfs-actions.pod:6376 ../fish/guestfish-actions.pod:4268
15539 "If the parameter C<nrlines> is a positive number, this returns the last "
15540 "C<nrlines> lines of the file C<path>."
15544 #: ../src/guestfs-actions.pod:6379 ../fish/guestfish-actions.pod:4271
15546 "If the parameter C<nrlines> is a negative number, this returns lines from "
15547 "the file C<path>, starting with the C<-nrlines>th line."
15551 #: ../src/guestfs-actions.pod:6393
15552 msgid "guestfs_tar_in"
15556 #: ../src/guestfs-actions.pod:6395
15560 " guestfs_tar_in (guestfs_h *g,\n"
15561 " const char *tarfile,\n"
15562 " const char *directory);\n"
15567 #: ../src/guestfs-actions.pod:6400 ../fish/guestfish-actions.pod:4283
15569 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
15570 "tar file) into C<directory>."
15574 #: ../src/guestfs-actions.pod:6403
15575 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
15579 #: ../src/guestfs-actions.pod:6408 ../src/guestfs-actions.pod:6425 ../src/guestfs-actions.pod:6441 ../src/guestfs-actions.pod:6457
15580 msgid "(Added in 1.0.3)"
15584 #: ../src/guestfs-actions.pod:6410
15585 msgid "guestfs_tar_out"
15589 #: ../src/guestfs-actions.pod:6412
15593 " guestfs_tar_out (guestfs_h *g,\n"
15594 " const char *directory,\n"
15595 " const char *tarfile);\n"
15600 #: ../src/guestfs-actions.pod:6417 ../fish/guestfish-actions.pod:4295
15602 "This command packs the contents of C<directory> and downloads it to local "
15607 #: ../src/guestfs-actions.pod:6420
15609 "To download a compressed tarball, use C<guestfs_tgz_out> or "
15610 "C<guestfs_txz_out>."
15614 #: ../src/guestfs-actions.pod:6427
15615 msgid "guestfs_tgz_in"
15619 #: ../src/guestfs-actions.pod:6429
15623 " guestfs_tgz_in (guestfs_h *g,\n"
15624 " const char *tarball,\n"
15625 " const char *directory);\n"
15630 #: ../src/guestfs-actions.pod:6434 ../fish/guestfish-actions.pod:4307
15632 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
15633 "tar file) into C<directory>."
15637 #: ../src/guestfs-actions.pod:6437
15638 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
15642 #: ../src/guestfs-actions.pod:6443
15643 msgid "guestfs_tgz_out"
15647 #: ../src/guestfs-actions.pod:6445
15651 " guestfs_tgz_out (guestfs_h *g,\n"
15652 " const char *directory,\n"
15653 " const char *tarball);\n"
15658 #: ../src/guestfs-actions.pod:6450 ../fish/guestfish-actions.pod:4318
15660 "This command packs the contents of C<directory> and downloads it to local "
15665 #: ../src/guestfs-actions.pod:6453
15666 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
15670 #: ../src/guestfs-actions.pod:6459
15671 msgid "guestfs_touch"
15675 #: ../src/guestfs-actions.pod:6461
15679 " guestfs_touch (guestfs_h *g,\n"
15680 " const char *path);\n"
15685 #: ../src/guestfs-actions.pod:6465 ../fish/guestfish-actions.pod:4329
15687 "Touch acts like the L<touch(1)> command. It can be used to update the "
15688 "timestamps on a file, or, if the file does not exist, to create a new "
15689 "zero-length file."
15693 #: ../src/guestfs-actions.pod:6469 ../fish/guestfish-actions.pod:4333
15695 "This command only works on regular files, and will fail on other file types "
15696 "such as directories, symbolic links, block special etc."
15700 #: ../src/guestfs-actions.pod:6476
15701 msgid "guestfs_truncate"
15705 #: ../src/guestfs-actions.pod:6478
15709 " guestfs_truncate (guestfs_h *g,\n"
15710 " const char *path);\n"
15715 #: ../src/guestfs-actions.pod:6482 ../fish/guestfish-actions.pod:4340
15717 "This command truncates C<path> to a zero-length file. The file must exist "
15722 #: ../src/guestfs-actions.pod:6489
15723 msgid "guestfs_truncate_size"
15727 #: ../src/guestfs-actions.pod:6491
15731 " guestfs_truncate_size (guestfs_h *g,\n"
15732 " const char *path,\n"
15733 " int64_t size);\n"
15738 #: ../src/guestfs-actions.pod:6496 ../fish/guestfish-actions.pod:4347
15740 "This command truncates C<path> to size C<size> bytes. The file must exist "
15745 #: ../src/guestfs-actions.pod:6499
15747 "If the current file size is less than C<size> then the file is extended to "
15748 "the required size with zero bytes. This creates a sparse file (ie. disk "
15749 "blocks are not allocated for the file until you write to it). To create a "
15750 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
15754 #: ../src/guestfs-actions.pod:6509
15755 msgid "guestfs_tune2fs_l"
15759 #: ../src/guestfs-actions.pod:6511
15763 " guestfs_tune2fs_l (guestfs_h *g,\n"
15764 " const char *device);\n"
15769 #: ../src/guestfs-actions.pod:6515 ../fish/guestfish-actions.pod:4360
15771 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
15776 #: ../src/guestfs-actions.pod:6518 ../fish/guestfish-actions.pod:4363
15778 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
15779 "for more details. The list of fields returned isn't clearly defined, and "
15780 "depends on both the version of C<tune2fs> that libguestfs was built against, "
15781 "and the filesystem itself."
15785 #: ../src/guestfs-actions.pod:6531
15786 msgid "guestfs_txz_in"
15790 #: ../src/guestfs-actions.pod:6533
15794 " guestfs_txz_in (guestfs_h *g,\n"
15795 " const char *tarball,\n"
15796 " const char *directory);\n"
15801 #: ../src/guestfs-actions.pod:6538 ../fish/guestfish-actions.pod:4372
15803 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
15804 "tar file) into C<directory>."
15808 #: ../src/guestfs-actions.pod:6545
15809 msgid "guestfs_txz_out"
15813 #: ../src/guestfs-actions.pod:6547
15817 " guestfs_txz_out (guestfs_h *g,\n"
15818 " const char *directory,\n"
15819 " const char *tarball);\n"
15824 #: ../src/guestfs-actions.pod:6552 ../fish/guestfish-actions.pod:4381
15826 "This command packs the contents of C<directory> and downloads it to local "
15827 "file C<tarball> (as an xz compressed tar archive)."
15831 #: ../src/guestfs-actions.pod:6559
15832 msgid "guestfs_umask"
15836 #: ../src/guestfs-actions.pod:6561
15840 " guestfs_umask (guestfs_h *g,\n"
15846 #: ../src/guestfs-actions.pod:6565 ../fish/guestfish-actions.pod:4390
15848 "This function sets the mask used for creating new files and device nodes to "
15853 #: ../src/guestfs-actions.pod:6568 ../fish/guestfish-actions.pod:4393
15855 "Typical umask values would be C<022> which creates new files with "
15856 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
15857 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
15861 #: ../src/guestfs-actions.pod:6573 ../fish/guestfish-actions.pod:4398
15863 "The default umask is C<022>. This is important because it means that "
15864 "directories and device nodes will be created with C<0644> or C<0755> mode "
15865 "even if you specify C<0777>."
15869 #: ../src/guestfs-actions.pod:6577
15871 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
15872 "C<guestfs_mkdir>."
15876 #: ../src/guestfs-actions.pod:6580 ../fish/guestfish-actions.pod:4405
15877 msgid "This call returns the previous umask."
15881 #: ../src/guestfs-actions.pod:6586
15882 msgid "guestfs_umount"
15886 #: ../src/guestfs-actions.pod:6588
15890 " guestfs_umount (guestfs_h *g,\n"
15891 " const char *pathordevice);\n"
15896 #: ../src/guestfs-actions.pod:6592 ../fish/guestfish-actions.pod:4413
15898 "This unmounts the given filesystem. The filesystem may be specified either "
15899 "by its mountpoint (path) or the device which contains the filesystem."
15903 #: ../src/guestfs-actions.pod:6600
15904 msgid "guestfs_umount_all"
15908 #: ../src/guestfs-actions.pod:6602
15912 " guestfs_umount_all (guestfs_h *g);\n"
15917 #: ../src/guestfs-actions.pod:6605 ../fish/guestfish-actions.pod:4423
15918 msgid "This unmounts all mounted filesystems."
15922 #: ../src/guestfs-actions.pod:6607 ../fish/guestfish-actions.pod:4425
15923 msgid "Some internal mounts are not unmounted by this call."
15927 #: ../src/guestfs-actions.pod:6613
15928 msgid "guestfs_upload"
15932 #: ../src/guestfs-actions.pod:6615
15936 " guestfs_upload (guestfs_h *g,\n"
15937 " const char *filename,\n"
15938 " const char *remotefilename);\n"
15943 #: ../src/guestfs-actions.pod:6620 ../src/guestfs-actions.pod:6644 ../fish/guestfish-actions.pod:4431 ../fish/guestfish-actions.pod:4444
15944 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
15948 #: ../src/guestfs-actions.pod:6625
15949 msgid "See also C<guestfs_download>."
15953 #: ../src/guestfs-actions.pod:6636
15954 msgid "guestfs_upload_offset"
15958 #: ../src/guestfs-actions.pod:6638
15962 " guestfs_upload_offset (guestfs_h *g,\n"
15963 " const char *filename,\n"
15964 " const char *remotefilename,\n"
15965 " int64_t offset);\n"
15970 #: ../src/guestfs-actions.pod:6647 ../fish/guestfish-actions.pod:4447
15972 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
15973 "The intention is to overwrite parts of existing files or devices, although "
15974 "if a non-existant file is specified then it is created with a \"hole\" "
15975 "before C<offset>. The size of the data written is implicit in the size of "
15976 "the source C<filename>."
15980 #: ../src/guestfs-actions.pod:6654
15982 "Note that there is no limit on the amount of data that can be uploaded with "
15983 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
15984 "full amount unless an error occurs."
15988 #: ../src/guestfs-actions.pod:6659
15989 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
15993 #: ../src/guestfs-actions.pod:6670
15994 msgid "guestfs_utimens"
15998 #: ../src/guestfs-actions.pod:6672
16002 " guestfs_utimens (guestfs_h *g,\n"
16003 " const char *path,\n"
16004 " int64_t atsecs,\n"
16005 " int64_t atnsecs,\n"
16006 " int64_t mtsecs,\n"
16007 " int64_t mtnsecs);\n"
16012 #: ../src/guestfs-actions.pod:6680 ../fish/guestfish-actions.pod:4467
16013 msgid "This command sets the timestamps of a file with nanosecond precision."
16017 #: ../src/guestfs-actions.pod:6683 ../fish/guestfish-actions.pod:4470
16019 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
16024 #: ../src/guestfs-actions.pod:6686 ../fish/guestfish-actions.pod:4473
16026 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
16027 "nanoseconds from the epoch."
16031 #: ../src/guestfs-actions.pod:6689 ../fish/guestfish-actions.pod:4476
16033 "If the C<*nsecs> field contains the special value C<-1> then the "
16034 "corresponding timestamp is set to the current time. (The C<*secs> field is "
16035 "ignored in this case)."
16039 #: ../src/guestfs-actions.pod:6693 ../fish/guestfish-actions.pod:4480
16041 "If the C<*nsecs> field contains the special value C<-2> then the "
16042 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
16047 #: ../src/guestfs-actions.pod:6701 ../src/guestfs-structs.pod:175
16048 msgid "guestfs_version"
16052 #: ../src/guestfs-actions.pod:6703
16055 " struct guestfs_version *\n"
16056 " guestfs_version (guestfs_h *g);\n"
16061 #: ../src/guestfs-actions.pod:6706 ../fish/guestfish-actions.pod:4488
16062 msgid "Return the libguestfs version number that the program is linked against."
16066 #: ../src/guestfs-actions.pod:6709 ../fish/guestfish-actions.pod:4491
16068 "Note that because of dynamic linking this is not necessarily the version of "
16069 "libguestfs that you compiled against. You can compile the program, and then "
16070 "at runtime dynamically link against a completely different C<libguestfs.so> "
16075 #: ../src/guestfs-actions.pod:6714 ../fish/guestfish-actions.pod:4496
16077 "This call was added in version C<1.0.58>. In previous versions of "
16078 "libguestfs there was no way to get the version number. From C code you can "
16079 "use dynamic linker functions to find out if this symbol exists (if it "
16080 "doesn't, then it's an earlier version)."
16084 #: ../src/guestfs-actions.pod:6720 ../fish/guestfish-actions.pod:4502
16086 "The call returns a structure with four elements. The first three (C<major>, "
16087 "C<minor> and C<release>) are numbers and correspond to the usual version "
16088 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
16089 "but may be used for distro-specific information."
16093 #: ../src/guestfs-actions.pod:6726 ../fish/guestfish-actions.pod:4508
16094 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
16098 #: ../src/guestfs-actions.pod:6729 ../fish/guestfish-actions.pod:4511
16099 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
16103 #: ../src/guestfs-actions.pod:6731
16105 "I<Note:> Don't use this call to test for availability of features. In "
16106 "enterprise distributions we backport features from later versions into "
16107 "earlier versions, making this an unreliable way to test for features. Use "
16108 "C<guestfs_available> instead."
16112 #: ../src/guestfs-actions.pod:6737
16114 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
16115 "error. I<The caller must call C<guestfs_free_version> after use>."
16119 #: ../src/guestfs-actions.pod:6741
16120 msgid "(Added in 1.0.58)"
16124 #: ../src/guestfs-actions.pod:6743
16125 msgid "guestfs_vfs_label"
16129 #: ../src/guestfs-actions.pod:6745
16133 " guestfs_vfs_label (guestfs_h *g,\n"
16134 " const char *device);\n"
16139 #: ../src/guestfs-actions.pod:6749 ../fish/guestfish-actions.pod:4523
16140 msgid "This returns the filesystem label of the filesystem on C<device>."
16144 #: ../src/guestfs-actions.pod:6752 ../fish/guestfish-actions.pod:4526
16145 msgid "If the filesystem is unlabeled, this returns the empty string."
16149 #: ../src/guestfs-actions.pod:6754
16150 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
16154 #: ../src/guestfs-actions.pod:6759 ../src/guestfs-actions.pod:6796
16155 msgid "(Added in 1.3.18)"
16159 #: ../src/guestfs-actions.pod:6761
16160 msgid "guestfs_vfs_type"
16164 #: ../src/guestfs-actions.pod:6763
16168 " guestfs_vfs_type (guestfs_h *g,\n"
16169 " const char *device);\n"
16174 #: ../src/guestfs-actions.pod:6767 ../fish/guestfish-actions.pod:4534
16176 "This command gets the filesystem type corresponding to the filesystem on "
16181 #: ../src/guestfs-actions.pod:6770 ../fish/guestfish-actions.pod:4537
16183 "For most filesystems, the result is the name of the Linux VFS module which "
16184 "would be used to mount this filesystem if you mounted it without specifying "
16185 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
16189 #: ../src/guestfs-actions.pod:6780
16190 msgid "guestfs_vfs_uuid"
16194 #: ../src/guestfs-actions.pod:6782
16198 " guestfs_vfs_uuid (guestfs_h *g,\n"
16199 " const char *device);\n"
16204 #: ../src/guestfs-actions.pod:6786 ../fish/guestfish-actions.pod:4546
16205 msgid "This returns the filesystem UUID of the filesystem on C<device>."
16209 #: ../src/guestfs-actions.pod:6789 ../fish/guestfish-actions.pod:4549
16210 msgid "If the filesystem does not have a UUID, this returns the empty string."
16214 #: ../src/guestfs-actions.pod:6791
16215 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
16219 #: ../src/guestfs-actions.pod:6798
16220 msgid "guestfs_vg_activate"
16224 #: ../src/guestfs-actions.pod:6800
16228 " guestfs_vg_activate (guestfs_h *g,\n"
16230 " char *const *volgroups);\n"
16235 #: ../src/guestfs-actions.pod:6805 ../fish/guestfish-actions.pod:4557
16237 "This command activates or (if C<activate> is false) deactivates all logical "
16238 "volumes in the listed volume groups C<volgroups>. If activated, then they "
16239 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
16240 "deactivated, then those devices disappear."
16244 #: ../src/guestfs-actions.pod:6811 ../fish/guestfish-actions.pod:4563
16245 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
16249 #: ../src/guestfs-actions.pod:6813 ../fish/guestfish-actions.pod:4565
16251 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
16252 "activated or deactivated."
16256 #: ../src/guestfs-actions.pod:6820
16257 msgid "guestfs_vg_activate_all"
16261 #: ../src/guestfs-actions.pod:6822
16265 " guestfs_vg_activate_all (guestfs_h *g,\n"
16266 " int activate);\n"
16271 #: ../src/guestfs-actions.pod:6826 ../fish/guestfish-actions.pod:4572
16273 "This command activates or (if C<activate> is false) deactivates all logical "
16274 "volumes in all volume groups. If activated, then they are made known to the "
16275 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
16276 "those devices disappear."
16280 #: ../src/guestfs-actions.pod:6832 ../fish/guestfish-actions.pod:4578
16281 msgid "This command is the same as running C<vgchange -a y|n>"
16285 #: ../src/guestfs-actions.pod:6838
16286 msgid "guestfs_vgcreate"
16290 #: ../src/guestfs-actions.pod:6840
16294 " guestfs_vgcreate (guestfs_h *g,\n"
16295 " const char *volgroup,\n"
16296 " char *const *physvols);\n"
16301 #: ../src/guestfs-actions.pod:6845 ../fish/guestfish-actions.pod:4584
16303 "This creates an LVM volume group called C<volgroup> from the non-empty list "
16304 "of physical volumes C<physvols>."
16308 #: ../src/guestfs-actions.pod:6852
16309 msgid "guestfs_vglvuuids"
16313 #: ../src/guestfs-actions.pod:6854
16317 " guestfs_vglvuuids (guestfs_h *g,\n"
16318 " const char *vgname);\n"
16323 #: ../src/guestfs-actions.pod:6858 ../fish/guestfish-actions.pod:4591
16325 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
16326 "volumes created in this volume group."
16330 #: ../src/guestfs-actions.pod:6861
16332 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
16333 "associate logical volumes and volume groups."
16337 #: ../src/guestfs-actions.pod:6864
16338 msgid "See also C<guestfs_vgpvuuids>."
16342 #: ../src/guestfs-actions.pod:6872
16343 msgid "guestfs_vgpvuuids"
16347 #: ../src/guestfs-actions.pod:6874
16351 " guestfs_vgpvuuids (guestfs_h *g,\n"
16352 " const char *vgname);\n"
16357 #: ../src/guestfs-actions.pod:6878 ../fish/guestfish-actions.pod:4603
16359 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
16360 "volumes that this volume group resides on."
16364 #: ../src/guestfs-actions.pod:6881
16366 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
16367 "associate physical volumes and volume groups."
16371 #: ../src/guestfs-actions.pod:6884
16372 msgid "See also C<guestfs_vglvuuids>."
16376 #: ../src/guestfs-actions.pod:6892
16377 msgid "guestfs_vgremove"
16381 #: ../src/guestfs-actions.pod:6894
16385 " guestfs_vgremove (guestfs_h *g,\n"
16386 " const char *vgname);\n"
16391 #: ../src/guestfs-actions.pod:6898 ../fish/guestfish-actions.pod:4615
16392 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
16396 #: ../src/guestfs-actions.pod:6900 ../fish/guestfish-actions.pod:4617
16397 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
16401 #: ../src/guestfs-actions.pod:6907
16402 msgid "guestfs_vgrename"
16406 #: ../src/guestfs-actions.pod:6909
16410 " guestfs_vgrename (guestfs_h *g,\n"
16411 " const char *volgroup,\n"
16412 " const char *newvolgroup);\n"
16417 #: ../src/guestfs-actions.pod:6914 ../fish/guestfish-actions.pod:4624
16418 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
16422 #: ../src/guestfs-actions.pod:6920
16423 msgid "guestfs_vgs"
16427 #: ../src/guestfs-actions.pod:6922
16431 " guestfs_vgs (guestfs_h *g);\n"
16436 #: ../src/guestfs-actions.pod:6925 ../fish/guestfish-actions.pod:4630
16438 "List all the volumes groups detected. This is the equivalent of the "
16439 "L<vgs(8)> command."
16443 #: ../src/guestfs-actions.pod:6928 ../fish/guestfish-actions.pod:4633
16445 "This returns a list of just the volume group names that were detected "
16446 "(eg. C<VolGroup00>)."
16450 #: ../src/guestfs-actions.pod:6931
16451 msgid "See also C<guestfs_vgs_full>."
16455 #: ../src/guestfs-actions.pod:6939
16456 msgid "guestfs_vgs_full"
16460 #: ../src/guestfs-actions.pod:6941
16463 " struct guestfs_lvm_vg_list *\n"
16464 " guestfs_vgs_full (guestfs_h *g);\n"
16469 #: ../src/guestfs-actions.pod:6944 ../fish/guestfish-actions.pod:4642
16471 "List all the volumes groups detected. This is the equivalent of the "
16472 "L<vgs(8)> command. The \"full\" version includes all fields."
16476 #: ../src/guestfs-actions.pod:6947
16478 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
16479 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after "
16484 #: ../src/guestfs-actions.pod:6953
16485 msgid "guestfs_vgscan"
16489 #: ../src/guestfs-actions.pod:6955
16493 " guestfs_vgscan (guestfs_h *g);\n"
16498 #: ../src/guestfs-actions.pod:6958 ../fish/guestfish-actions.pod:4649
16500 "This rescans all block devices and rebuilds the list of LVM physical "
16501 "volumes, volume groups and logical volumes."
16505 #: ../src/guestfs-actions.pod:6965
16506 msgid "guestfs_vguuid"
16510 #: ../src/guestfs-actions.pod:6967
16514 " guestfs_vguuid (guestfs_h *g,\n"
16515 " const char *vgname);\n"
16520 #: ../src/guestfs-actions.pod:6971 ../fish/guestfish-actions.pod:4656
16521 msgid "This command returns the UUID of the LVM VG named C<vgname>."
16525 #: ../src/guestfs-actions.pod:6978
16526 msgid "guestfs_wait_ready"
16530 #: ../src/guestfs-actions.pod:6980
16534 " guestfs_wait_ready (guestfs_h *g);\n"
16539 #: ../src/guestfs-actions.pod:6983
16540 msgid "This function is a no op."
16544 #: ../src/guestfs-actions.pod:6985
16546 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
16547 "calling C<guestfs_launch> to wait for the launch to complete. However this "
16548 "is no longer necessary because C<guestfs_launch> now does the waiting."
16552 #: ../src/guestfs-actions.pod:6990
16554 "If you see any calls to this function in code then you can just remove them, "
16555 "unless you want to retain compatibility with older versions of the API."
16559 #: ../src/guestfs-actions.pod:6998
16560 msgid "guestfs_wc_c"
16564 #: ../src/guestfs-actions.pod:7000
16568 " guestfs_wc_c (guestfs_h *g,\n"
16569 " const char *path);\n"
16574 #: ../src/guestfs-actions.pod:7004 ../fish/guestfish-actions.pod:4662
16576 "This command counts the characters in a file, using the C<wc -c> external "
16581 #: ../src/guestfs-actions.pod:7011
16582 msgid "guestfs_wc_l"
16586 #: ../src/guestfs-actions.pod:7013
16590 " guestfs_wc_l (guestfs_h *g,\n"
16591 " const char *path);\n"
16596 #: ../src/guestfs-actions.pod:7017 ../fish/guestfish-actions.pod:4669
16598 "This command counts the lines in a file, using the C<wc -l> external "
16603 #: ../src/guestfs-actions.pod:7024
16604 msgid "guestfs_wc_w"
16608 #: ../src/guestfs-actions.pod:7026
16612 " guestfs_wc_w (guestfs_h *g,\n"
16613 " const char *path);\n"
16618 #: ../src/guestfs-actions.pod:7030 ../fish/guestfish-actions.pod:4676
16620 "This command counts the words in a file, using the C<wc -w> external "
16625 #: ../src/guestfs-actions.pod:7037
16626 msgid "guestfs_write"
16630 #: ../src/guestfs-actions.pod:7039
16634 " guestfs_write (guestfs_h *g,\n"
16635 " const char *path,\n"
16636 " const char *content,\n"
16637 " size_t content_size);\n"
16642 #: ../src/guestfs-actions.pod:7045 ../fish/guestfish-actions.pod:4683
16644 "This call creates a file called C<path>. The content of the file is the "
16645 "string C<content> (which can contain any 8 bit data)."
16649 #: ../src/guestfs-actions.pod:7055
16650 msgid "guestfs_write_file"
16654 #: ../src/guestfs-actions.pod:7057
16658 " guestfs_write_file (guestfs_h *g,\n"
16659 " const char *path,\n"
16660 " const char *content,\n"
16666 #: ../src/guestfs-actions.pod:7063 ../fish/guestfish-actions.pod:4693
16668 "This call creates a file called C<path>. The contents of the file is the "
16669 "string C<content> (which can contain any 8 bit data), with length C<size>."
16673 #: ../src/guestfs-actions.pod:7067 ../fish/guestfish-actions.pod:4697
16675 "As a special case, if C<size> is C<0> then the length is calculated using "
16676 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
16680 #: ../src/guestfs-actions.pod:7071 ../fish/guestfish-actions.pod:4701
16682 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
16683 "I<not> work, even if the length is specified."
16687 #: ../src/guestfs-actions.pod:7079 ../fish/guestfish-actions.pod:4707
16688 msgid "This function is deprecated. In new code, use the C<write> call instead."
16692 #: ../src/guestfs-actions.pod:7088
16693 msgid "guestfs_zegrep"
16697 #: ../src/guestfs-actions.pod:7090
16701 " guestfs_zegrep (guestfs_h *g,\n"
16702 " const char *regex,\n"
16703 " const char *path);\n"
16708 #: ../src/guestfs-actions.pod:7095 ../fish/guestfish-actions.pod:4718
16709 msgid "This calls the external C<zegrep> program and returns the matching lines."
16713 #: ../src/guestfs-actions.pod:7107
16714 msgid "guestfs_zegrepi"
16718 #: ../src/guestfs-actions.pod:7109
16722 " guestfs_zegrepi (guestfs_h *g,\n"
16723 " const char *regex,\n"
16724 " const char *path);\n"
16729 #: ../src/guestfs-actions.pod:7114 ../fish/guestfish-actions.pod:4728
16730 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
16734 #: ../src/guestfs-actions.pod:7126
16735 msgid "guestfs_zero"
16739 #: ../src/guestfs-actions.pod:7128
16743 " guestfs_zero (guestfs_h *g,\n"
16744 " const char *device);\n"
16749 #: ../src/guestfs-actions.pod:7132 ../fish/guestfish-actions.pod:4738
16750 msgid "This command writes zeroes over the first few blocks of C<device>."
16754 #: ../src/guestfs-actions.pod:7134 ../fish/guestfish-actions.pod:4740
16756 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
16757 "securely wipe the device). It should be sufficient to remove any partition "
16758 "tables, filesystem superblocks and so on."
16762 #: ../src/guestfs-actions.pod:7138
16763 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
16767 #: ../src/guestfs-actions.pod:7149
16768 msgid "guestfs_zero_device"
16772 #: ../src/guestfs-actions.pod:7151
16776 " guestfs_zero_device (guestfs_h *g,\n"
16777 " const char *device);\n"
16782 #: ../src/guestfs-actions.pod:7155
16784 "This command writes zeroes over the entire C<device>. Compare with "
16785 "C<guestfs_zero> which just zeroes the first few blocks of a device."
16789 #: ../src/guestfs-actions.pod:7169
16790 msgid "(Added in 1.3.1)"
16794 #: ../src/guestfs-actions.pod:7171
16795 msgid "guestfs_zerofree"
16799 #: ../src/guestfs-actions.pod:7173
16803 " guestfs_zerofree (guestfs_h *g,\n"
16804 " const char *device);\n"
16809 #: ../src/guestfs-actions.pod:7177 ../fish/guestfish-actions.pod:4761
16811 "This runs the I<zerofree> program on C<device>. This program claims to zero "
16812 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
16813 "possible to compress the filesystem more effectively."
16817 #: ../src/guestfs-actions.pod:7182 ../fish/guestfish-actions.pod:4766
16818 msgid "You should B<not> run this program if the filesystem is mounted."
16822 #: ../src/guestfs-actions.pod:7185 ../fish/guestfish-actions.pod:4769
16824 "It is possible that using this program can damage the filesystem or data on "
16829 #: ../src/guestfs-actions.pod:7192
16830 msgid "guestfs_zfgrep"
16834 #: ../src/guestfs-actions.pod:7194
16838 " guestfs_zfgrep (guestfs_h *g,\n"
16839 " const char *pattern,\n"
16840 " const char *path);\n"
16845 #: ../src/guestfs-actions.pod:7199 ../fish/guestfish-actions.pod:4776
16846 msgid "This calls the external C<zfgrep> program and returns the matching lines."
16850 #: ../src/guestfs-actions.pod:7211
16851 msgid "guestfs_zfgrepi"
16855 #: ../src/guestfs-actions.pod:7213
16859 " guestfs_zfgrepi (guestfs_h *g,\n"
16860 " const char *pattern,\n"
16861 " const char *path);\n"
16866 #: ../src/guestfs-actions.pod:7218 ../fish/guestfish-actions.pod:4786
16867 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
16871 #: ../src/guestfs-actions.pod:7230
16872 msgid "guestfs_zfile"
16876 #: ../src/guestfs-actions.pod:7232
16880 " guestfs_zfile (guestfs_h *g,\n"
16881 " const char *meth,\n"
16882 " const char *path);\n"
16887 #: ../src/guestfs-actions.pod:7237 ../fish/guestfish-actions.pod:4796
16888 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
16892 #: ../src/guestfs-actions.pod:7240 ../fish/guestfish-actions.pod:4799
16893 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
16897 #: ../src/guestfs-actions.pod:7242
16899 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
16904 #: ../src/guestfs-actions.pod:7248 ../fish/guestfish-actions.pod:4804
16905 msgid "This function is deprecated. In new code, use the C<file> call instead."
16909 #: ../src/guestfs-actions.pod:7257
16910 msgid "guestfs_zgrep"
16914 #: ../src/guestfs-actions.pod:7259
16918 " guestfs_zgrep (guestfs_h *g,\n"
16919 " const char *regex,\n"
16920 " const char *path);\n"
16925 #: ../src/guestfs-actions.pod:7264 ../fish/guestfish-actions.pod:4815
16926 msgid "This calls the external C<zgrep> program and returns the matching lines."
16930 #: ../src/guestfs-actions.pod:7276
16931 msgid "guestfs_zgrepi"
16935 #: ../src/guestfs-actions.pod:7278
16939 " guestfs_zgrepi (guestfs_h *g,\n"
16940 " const char *regex,\n"
16941 " const char *path);\n"
16946 #: ../src/guestfs-actions.pod:7283 ../fish/guestfish-actions.pod:4825
16947 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
16951 #: ../src/guestfs-availability.pod:3
16956 #: ../src/guestfs-availability.pod:5
16958 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
16959 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
16960 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
16961 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
16962 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
16966 #: ../src/guestfs-availability.pod:21
16971 #: ../src/guestfs-availability.pod:23
16973 "The following functions: L</guestfs_inotify_add_watch> "
16974 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
16975 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
16979 #: ../src/guestfs-availability.pod:31
16980 msgid "B<linuxfsuuid>"
16984 #: ../src/guestfs-availability.pod:33
16986 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
16987 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
16991 #: ../src/guestfs-availability.pod:40
16992 msgid "B<linuxmodules>"
16996 #: ../src/guestfs-availability.pod:42
16997 msgid "The following functions: L</guestfs_modprobe>"
17001 #: ../src/guestfs-availability.pod:45
17002 msgid "B<linuxxattrs>"
17006 #: ../src/guestfs-availability.pod:47
17008 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> "
17009 "L</guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> "
17010 "L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> "
17011 "L</guestfs_setxattr>"
17015 #: ../src/guestfs-availability.pod:58
17020 #: ../src/guestfs-availability.pod:60
17022 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
17023 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
17024 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
17028 #: ../src/guestfs-availability.pod:69
17033 #: ../src/guestfs-availability.pod:71
17035 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
17036 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
17037 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
17038 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
17039 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
17040 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
17041 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
17042 "L</guestfs_vgs_full>"
17046 #: ../src/guestfs-availability.pod:94
17051 #: ../src/guestfs-availability.pod:96
17053 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
17054 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
17058 #: ../src/guestfs-availability.pod:102
17063 #: ../src/guestfs-availability.pod:104
17064 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
17068 #: ../src/guestfs-availability.pod:107
17069 msgid "B<ntfsprogs>"
17073 #: ../src/guestfs-availability.pod:109
17074 msgid "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
17078 #: ../src/guestfs-availability.pod:113
17079 msgid "B<realpath>"
17083 #: ../src/guestfs-availability.pod:115
17084 msgid "The following functions: L</guestfs_realpath>"
17088 #: ../src/guestfs-availability.pod:118
17093 #: ../src/guestfs-availability.pod:120
17095 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
17096 "L</guestfs_scrub_freespace>"
17100 #: ../src/guestfs-availability.pod:125
17105 #: ../src/guestfs-availability.pod:127
17106 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
17110 #: ../src/guestfs-availability.pod:131
17115 #: ../src/guestfs-availability.pod:133
17116 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
17120 #: ../src/guestfs-availability.pod:137
17121 msgid "B<zerofree>"
17125 #: ../src/guestfs-availability.pod:139
17126 msgid "The following functions: L</guestfs_zerofree>"
17130 #: ../src/guestfs-structs.pod:1
17131 msgid "guestfs_int_bool"
17135 #: ../src/guestfs-structs.pod:3
17138 " struct guestfs_int_bool {\n"
17146 #: ../src/guestfs-structs.pod:8
17149 " struct guestfs_int_bool_list {\n"
17150 " uint32_t len; /* Number of elements in list. */\n"
17151 " struct guestfs_int_bool *val; /* Elements. */\n"
17157 #: ../src/guestfs-structs.pod:13
17160 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
17161 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
17166 #: ../src/guestfs-structs.pod:16
17167 msgid "guestfs_lvm_pv"
17171 #: ../src/guestfs-structs.pod:18
17174 " struct guestfs_lvm_pv {\n"
17175 " char *pv_name;\n"
17176 " /* The next field is NOT nul-terminated, be careful when printing it: "
17178 " char pv_uuid[32];\n"
17180 " uint64_t pv_size;\n"
17181 " uint64_t dev_size;\n"
17182 " uint64_t pv_free;\n"
17183 " uint64_t pv_used;\n"
17184 " char *pv_attr;\n"
17185 " int64_t pv_pe_count;\n"
17186 " int64_t pv_pe_alloc_count;\n"
17187 " char *pv_tags;\n"
17188 " uint64_t pe_start;\n"
17189 " int64_t pv_mda_count;\n"
17190 " uint64_t pv_mda_free;\n"
17196 #: ../src/guestfs-structs.pod:36
17199 " struct guestfs_lvm_pv_list {\n"
17200 " uint32_t len; /* Number of elements in list. */\n"
17201 " struct guestfs_lvm_pv *val; /* Elements. */\n"
17207 #: ../src/guestfs-structs.pod:41
17210 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
17211 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
17216 #: ../src/guestfs-structs.pod:44
17217 msgid "guestfs_lvm_vg"
17221 #: ../src/guestfs-structs.pod:46
17224 " struct guestfs_lvm_vg {\n"
17225 " char *vg_name;\n"
17226 " /* The next field is NOT nul-terminated, be careful when printing it: "
17228 " char vg_uuid[32];\n"
17230 " char *vg_attr;\n"
17231 " uint64_t vg_size;\n"
17232 " uint64_t vg_free;\n"
17233 " char *vg_sysid;\n"
17234 " uint64_t vg_extent_size;\n"
17235 " int64_t vg_extent_count;\n"
17236 " int64_t vg_free_count;\n"
17237 " int64_t max_lv;\n"
17238 " int64_t max_pv;\n"
17239 " int64_t pv_count;\n"
17240 " int64_t lv_count;\n"
17241 " int64_t snap_count;\n"
17242 " int64_t vg_seqno;\n"
17243 " char *vg_tags;\n"
17244 " int64_t vg_mda_count;\n"
17245 " uint64_t vg_mda_free;\n"
17251 #: ../src/guestfs-structs.pod:69
17254 " struct guestfs_lvm_vg_list {\n"
17255 " uint32_t len; /* Number of elements in list. */\n"
17256 " struct guestfs_lvm_vg *val; /* Elements. */\n"
17262 #: ../src/guestfs-structs.pod:74
17265 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
17266 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
17271 #: ../src/guestfs-structs.pod:77
17272 msgid "guestfs_lvm_lv"
17276 #: ../src/guestfs-structs.pod:79
17279 " struct guestfs_lvm_lv {\n"
17280 " char *lv_name;\n"
17281 " /* The next field is NOT nul-terminated, be careful when printing it: "
17283 " char lv_uuid[32];\n"
17284 " char *lv_attr;\n"
17285 " int64_t lv_major;\n"
17286 " int64_t lv_minor;\n"
17287 " int64_t lv_kernel_major;\n"
17288 " int64_t lv_kernel_minor;\n"
17289 " uint64_t lv_size;\n"
17290 " int64_t seg_count;\n"
17292 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
17293 " float snap_percent;\n"
17294 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
17295 " float copy_percent;\n"
17296 " char *move_pv;\n"
17297 " char *lv_tags;\n"
17298 " char *mirror_log;\n"
17299 " char *modules;\n"
17305 #: ../src/guestfs-structs.pod:101
17308 " struct guestfs_lvm_lv_list {\n"
17309 " uint32_t len; /* Number of elements in list. */\n"
17310 " struct guestfs_lvm_lv *val; /* Elements. */\n"
17316 #: ../src/guestfs-structs.pod:106
17319 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
17320 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
17325 #: ../src/guestfs-structs.pod:111
17328 " struct guestfs_stat {\n"
17332 " int64_t nlink;\n"
17337 " int64_t blksize;\n"
17338 " int64_t blocks;\n"
17339 " int64_t atime;\n"
17340 " int64_t mtime;\n"
17341 " int64_t ctime;\n"
17347 #: ../src/guestfs-structs.pod:127
17350 " struct guestfs_stat_list {\n"
17351 " uint32_t len; /* Number of elements in list. */\n"
17352 " struct guestfs_stat *val; /* Elements. */\n"
17358 #: ../src/guestfs-structs.pod:132
17361 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
17362 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
17367 #: ../src/guestfs-structs.pod:137
17370 " struct guestfs_statvfs {\n"
17371 " int64_t bsize;\n"
17372 " int64_t frsize;\n"
17373 " int64_t blocks;\n"
17374 " int64_t bfree;\n"
17375 " int64_t bavail;\n"
17376 " int64_t files;\n"
17377 " int64_t ffree;\n"
17378 " int64_t favail;\n"
17381 " int64_t namemax;\n"
17387 #: ../src/guestfs-structs.pod:151
17390 " struct guestfs_statvfs_list {\n"
17391 " uint32_t len; /* Number of elements in list. */\n"
17392 " struct guestfs_statvfs *val; /* Elements. */\n"
17398 #: ../src/guestfs-structs.pod:156
17401 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
17402 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
17407 #: ../src/guestfs-structs.pod:159
17408 msgid "guestfs_dirent"
17412 #: ../src/guestfs-structs.pod:161
17415 " struct guestfs_dirent {\n"
17424 #: ../src/guestfs-structs.pod:167
17427 " struct guestfs_dirent_list {\n"
17428 " uint32_t len; /* Number of elements in list. */\n"
17429 " struct guestfs_dirent *val; /* Elements. */\n"
17435 #: ../src/guestfs-structs.pod:172
17438 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
17439 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
17444 #: ../src/guestfs-structs.pod:177
17447 " struct guestfs_version {\n"
17448 " int64_t major;\n"
17449 " int64_t minor;\n"
17450 " int64_t release;\n"
17457 #: ../src/guestfs-structs.pod:184
17460 " struct guestfs_version_list {\n"
17461 " uint32_t len; /* Number of elements in list. */\n"
17462 " struct guestfs_version *val; /* Elements. */\n"
17468 #: ../src/guestfs-structs.pod:189
17471 " void guestfs_free_version (struct guestfs_free_version *);\n"
17472 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
17477 #: ../src/guestfs-structs.pod:192
17478 msgid "guestfs_xattr"
17482 #: ../src/guestfs-structs.pod:194
17485 " struct guestfs_xattr {\n"
17486 " char *attrname;\n"
17487 " /* The next two fields describe a byte array. */\n"
17488 " uint32_t attrval_len;\n"
17489 " char *attrval;\n"
17495 #: ../src/guestfs-structs.pod:201
17498 " struct guestfs_xattr_list {\n"
17499 " uint32_t len; /* Number of elements in list. */\n"
17500 " struct guestfs_xattr *val; /* Elements. */\n"
17506 #: ../src/guestfs-structs.pod:206
17509 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
17510 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
17515 #: ../src/guestfs-structs.pod:209
17516 msgid "guestfs_inotify_event"
17520 #: ../src/guestfs-structs.pod:211
17523 " struct guestfs_inotify_event {\n"
17524 " int64_t in_wd;\n"
17525 " uint32_t in_mask;\n"
17526 " uint32_t in_cookie;\n"
17527 " char *in_name;\n"
17533 #: ../src/guestfs-structs.pod:218
17536 " struct guestfs_inotify_event_list {\n"
17537 " uint32_t len; /* Number of elements in list. */\n"
17538 " struct guestfs_inotify_event *val; /* Elements. */\n"
17544 #: ../src/guestfs-structs.pod:223
17547 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
17548 " void guestfs_free_inotify_event_list (struct "
17549 "guestfs_free_inotify_event_list *);\n"
17554 #: ../src/guestfs-structs.pod:226
17555 msgid "guestfs_partition"
17559 #: ../src/guestfs-structs.pod:228
17562 " struct guestfs_partition {\n"
17563 " int32_t part_num;\n"
17564 " uint64_t part_start;\n"
17565 " uint64_t part_end;\n"
17566 " uint64_t part_size;\n"
17572 #: ../src/guestfs-structs.pod:235
17575 " struct guestfs_partition_list {\n"
17576 " uint32_t len; /* Number of elements in list. */\n"
17577 " struct guestfs_partition *val; /* Elements. */\n"
17583 #: ../src/guestfs-structs.pod:240
17586 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
17587 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
17592 #: ../src/guestfs-structs.pod:243
17593 msgid "guestfs_application"
17597 #: ../src/guestfs-structs.pod:245
17600 " struct guestfs_application {\n"
17601 " char *app_name;\n"
17602 " char *app_display_name;\n"
17603 " int32_t app_epoch;\n"
17604 " char *app_version;\n"
17605 " char *app_release;\n"
17606 " char *app_install_path;\n"
17607 " char *app_trans_path;\n"
17608 " char *app_publisher;\n"
17609 " char *app_url;\n"
17610 " char *app_source_package;\n"
17611 " char *app_summary;\n"
17612 " char *app_description;\n"
17618 #: ../src/guestfs-structs.pod:260
17621 " struct guestfs_application_list {\n"
17622 " uint32_t len; /* Number of elements in list. */\n"
17623 " struct guestfs_application *val; /* Elements. */\n"
17629 #: ../src/guestfs-structs.pod:265
17632 " void guestfs_free_application (struct guestfs_free_application *);\n"
17633 " void guestfs_free_application_list (struct guestfs_free_application_list "
17639 #: ../fish/guestfish.pod:5
17640 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
17644 #: ../fish/guestfish.pod:9
17647 " guestfish [--options] [commands]\n"
17652 #: ../fish/guestfish.pod:11
17660 #: ../fish/guestfish.pod:13
17663 " guestfish [--ro|--rw] -a disk.img\n"
17668 #: ../fish/guestfish.pod:15
17671 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
17676 #: ../fish/guestfish.pod:17
17679 " guestfish -d libvirt-domain\n"
17684 #: ../fish/guestfish.pod:19
17687 " guestfish [--ro|--rw] -a disk.img -i\n"
17692 #: ../fish/guestfish.pod:21
17695 " guestfish -d libvirt-domain -i\n"
17700 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15 ../tools/virt-edit.pl:44 ../tools/virt-win-reg.pl:51 ../tools/virt-tar.pl:64
17705 #: ../fish/guestfish.pod:25
17707 "Using guestfish in read/write mode on live virtual machines can be "
17708 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
17709 "option to use guestfish safely if the disk image or virtual machine might be "
17714 #: ../fish/guestfish.pod:32
17716 "Guestfish is a shell and command-line tool for examining and modifying "
17717 "virtual machine filesystems. It uses libguestfs and exposes all of the "
17718 "functionality of the guestfs API, see L<guestfs(3)>."
17722 #: ../fish/guestfish.pod:36
17724 "Guestfish gives you structured access to the libguestfs API, from shell "
17725 "scripts or the command line or interactively. If you want to rescue a "
17726 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
17731 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:923 ../fuse/guestmount.pod:39 ../tools/virt-edit.pl:58 ../tools/virt-resize.pl:64 ../tools/virt-tar.pl:50
17736 #: ../fish/guestfish.pod:43
17737 msgid "As an interactive shell"
17741 #: ../fish/guestfish.pod:45
17749 #: ../fish/guestfish.pod:47
17752 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
17753 " editing virtual machine filesystems.\n"
17758 #: ../fish/guestfish.pod:50
17761 " Type: 'help' for a list of commands\n"
17762 " 'man' to read the manual\n"
17763 " 'quit' to quit the shell\n"
17768 #: ../fish/guestfish.pod:54
17771 " ><fs> add-ro disk.img\n"
17773 " ><fs> list-filesystems\n"
17774 " /dev/sda1: ext4\n"
17775 " /dev/vg_guest/lv_root: ext4\n"
17776 " /dev/vg_guest/lv_swap: swap\n"
17777 " ><fs> mount /dev/vg_guest/lv_root /\n"
17778 " ><fs> cat /etc/fstab\n"
17780 " # Created by anaconda\n"
17787 #: ../fish/guestfish.pod:67
17788 msgid "From shell scripts"
17792 #: ../fish/guestfish.pod:69
17793 msgid "Create a new C</etc/motd> file in a guest or disk image:"
17797 #: ../fish/guestfish.pod:71
17800 " guestfish <<_EOF_\n"
17803 " mount /dev/vg_guest/lv_root /\n"
17804 " write /etc/motd \"Welcome, new users\"\n"
17810 #: ../fish/guestfish.pod:78
17811 msgid "List the LVM logical volumes in a disk image:"
17815 #: ../fish/guestfish.pod:80
17818 " guestfish -a disk.img --ro <<_EOF_\n"
17826 #: ../fish/guestfish.pod:85
17827 msgid "List all the filesystems in a disk image:"
17831 #: ../fish/guestfish.pod:87
17834 " guestfish -a disk.img --ro <<_EOF_\n"
17836 " list-filesystems\n"
17842 #: ../fish/guestfish.pod:92
17843 msgid "On one command line"
17847 #: ../fish/guestfish.pod:94
17848 msgid "Update C</etc/resolv.conf> in a guest:"
17852 #: ../fish/guestfish.pod:96
17856 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
17857 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
17862 #: ../fish/guestfish.pod:100
17863 msgid "Edit C</boot/grub/grub.conf> interactively:"
17867 #: ../fish/guestfish.pod:102
17870 " guestfish --rw --add disk.img \\\n"
17871 " --mount /dev/vg_guest/lv_root \\\n"
17872 " --mount /dev/sda1:/boot \\\n"
17873 " edit /boot/grub/grub.conf\n"
17878 #: ../fish/guestfish.pod:107
17879 msgid "Mount disks automatically"
17883 #: ../fish/guestfish.pod:109
17885 "Use the I<-i> option to automatically mount the disks from a virtual "
17890 #: ../fish/guestfish.pod:112
17893 " guestfish --ro -a disk.img -i cat /etc/group\n"
17898 #: ../fish/guestfish.pod:114
17901 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
17906 #: ../fish/guestfish.pod:116
17907 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
17911 #: ../fish/guestfish.pod:118
17914 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
17919 #: ../fish/guestfish.pod:120
17920 msgid "As a script interpreter"
17924 #: ../fish/guestfish.pod:122
17925 msgid "Create a 100MB disk containing an ext2-formatted partition:"
17929 #: ../fish/guestfish.pod:124
17932 " #!/usr/bin/guestfish -f\n"
17933 " sparse test1.img 100M\n"
17935 " part-disk /dev/sda mbr\n"
17936 " mkfs ext2 /dev/sda1\n"
17941 #: ../fish/guestfish.pod:130
17942 msgid "Start with a prepared disk"
17946 #: ../fish/guestfish.pod:132
17948 "An alternate way to create a 100MB disk called C<test1.img> containing a "
17949 "single ext2-formatted partition:"
17953 #: ../fish/guestfish.pod:135
17956 " guestfish -N fs\n"
17961 #: ../fish/guestfish.pod:137
17962 msgid "To list what is available do:"
17966 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:914
17969 " guestfish -N help | less\n"
17974 #: ../fish/guestfish.pod:141
17975 msgid "Remote control"
17979 #: ../fish/guestfish.pod:143
17982 " eval \"`guestfish --listen`\"\n"
17983 " guestfish --remote add-ro disk.img\n"
17984 " guestfish --remote run\n"
17985 " guestfish --remote lvs\n"
17990 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37 ../fuse/guestmount.pod:73 ../tools/virt-edit.pl:72 ../tools/virt-win-reg.pl:96 ../tools/virt-resize.pl:254 ../tools/virt-list-filesystems.pl:53 ../tools/virt-tar.pl:103 ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:54
17995 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:131 ../tools/virt-edit.pl:80 ../tools/virt-win-reg.pl:104 ../tools/virt-resize.pl:262 ../tools/virt-list-filesystems.pl:61 ../tools/virt-tar.pl:111 ../tools/virt-make-fs.pl:161 ../tools/virt-list-partitions.pl:62
18000 #: ../fish/guestfish.pod:154
18001 msgid "Displays general help on options."
18005 #: ../fish/guestfish.pod:156
18010 #: ../fish/guestfish.pod:158
18011 msgid "B<--cmd-help>"
18015 #: ../fish/guestfish.pod:160
18016 msgid "Lists all available guestfish commands."
18020 #: ../fish/guestfish.pod:162
18025 #: ../fish/guestfish.pod:164
18026 msgid "B<--cmd-help cmd>"
18030 #: ../fish/guestfish.pod:166
18031 msgid "Displays detailed help on a single command C<cmd>."
18035 #: ../fish/guestfish.pod:168
18036 msgid "B<-a image>"
18040 #: ../fish/guestfish.pod:170
18041 msgid "B<--add image>"
18045 #: ../fish/guestfish.pod:172
18046 msgid "Add a block device or virtual machine image to the shell."
18050 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:81
18052 "The format of the disk image is auto-detected. To override this and force a "
18053 "particular format use the I<--format=..> option."
18057 #: ../fish/guestfish.pod:177
18059 "Using this flag is mostly equivalent to using the C<add> command, with "
18060 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
18061 "the I<--format:...> flag was given."
18065 #: ../fish/guestfish.pod:181
18070 #: ../fish/guestfish.pod:183
18071 msgid "B<--connect URI>"
18075 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:86
18077 "When used in conjunction with the I<-d> option, this specifies the libvirt "
18078 "URI to use. The default is to use the default libvirt connection."
18082 #: ../fish/guestfish.pod:189
18087 #: ../fish/guestfish.pod:191
18089 "If using the I<--listen> option and a csh-like shell, use this option. See "
18090 "section L</REMOTE CONTROL AND CSH> below."
18094 #: ../fish/guestfish.pod:194
18095 msgid "B<-d libvirt-domain>"
18099 #: ../fish/guestfish.pod:196
18100 msgid "B<--domain libvirt-domain>"
18104 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:92
18106 "Add disks from the named libvirt domain. If the I<--ro> option is also "
18107 "used, then any libvirt domain can be used. However in write mode, only "
18108 "libvirt domains which are shut down can be named here."
18112 #: ../fish/guestfish.pod:202
18114 "Using this flag is mostly equivalent to using the C<add-domain> command, "
18115 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
18116 "if the I<--format:...> flag was given."
18120 #: ../fish/guestfish.pod:206
18125 #: ../fish/guestfish.pod:208
18126 msgid "B<--no-dest-paths>"
18130 #: ../fish/guestfish.pod:210
18132 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
18133 "to hit the tab key to complete paths on the guest filesystem, but this "
18134 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
18135 "allow this feature to be disabled."
18139 #: ../fish/guestfish.pod:215 ../fuse/guestmount.pod:108
18140 msgid "B<--echo-keys>"
18144 #: ../fish/guestfish.pod:217 ../fuse/guestmount.pod:110
18146 "When prompting for keys and passphrases, guestfish normally turns echoing "
18147 "off so you cannot see what you are typing. If you are not worried about "
18148 "Tempest attacks and there is no one else in the room you can specify this "
18149 "flag to see what you are typing."
18153 #: ../fish/guestfish.pod:222
18158 #: ../fish/guestfish.pod:224
18159 msgid "B<--file file>"
18163 #: ../fish/guestfish.pod:226
18164 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
18168 #: ../fish/guestfish.pod:229
18171 " #!/usr/bin/guestfish -f\n"
18176 #: ../fish/guestfish.pod:231
18177 msgid "B<--format=raw|qcow2|..>"
18181 #: ../fish/guestfish.pod:233
18182 msgid "B<--format>"
18186 #: ../fish/guestfish.pod:235 ../fuse/guestmount.pod:117
18188 "The default for the I<-a> option is to auto-detect the format of the disk "
18189 "image. Using this forces the disk format for I<-a> options which follow on "
18190 "the command line. Using I<--format> with no argument switches back to "
18191 "auto-detection for subsequent I<-a> options."
18195 #: ../fish/guestfish.pod:242
18198 " guestfish --format=raw -a disk.img\n"
18203 #: ../fish/guestfish.pod:244
18204 msgid "forces raw format (no auto-detection) for C<disk.img>."
18208 #: ../fish/guestfish.pod:246
18211 " guestfish --format=raw -a disk.img --format -a another.img\n"
18216 #: ../fish/guestfish.pod:248
18218 "forces raw format (no auto-detection) for C<disk.img> and reverts to "
18219 "auto-detection for C<another.img>."
18223 #: ../fish/guestfish.pod:251
18225 "If you have untrusted raw-format guest disk images, you should use this "
18226 "option to specify the disk format. This avoids a possible security problem "
18227 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
18231 #: ../fish/guestfish.pod:256
18236 #: ../fish/guestfish.pod:258
18237 msgid "B<--inspector>"
18241 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:137
18243 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
18244 "system and mount filesystems as they would be mounted on the real virtual "
18249 #: ../fish/guestfish.pod:264
18250 msgid "Typical usage is either:"
18254 #: ../fish/guestfish.pod:266
18257 " guestfish -d myguest -i\n"
18262 #: ../fish/guestfish.pod:268
18263 msgid "(for an inactive libvirt domain called I<myguest>), or:"
18267 #: ../fish/guestfish.pod:270
18270 " guestfish --ro -d myguest -i\n"
18275 #: ../fish/guestfish.pod:272
18276 msgid "(for active domains, readonly), or specify the block device directly:"
18280 #: ../fish/guestfish.pod:274
18283 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
18288 #: ../fish/guestfish.pod:276
18290 "Note that the command line syntax changed slightly over older versions of "
18291 "guestfish. You can still use the old syntax:"
18295 #: ../fish/guestfish.pod:279
18298 " guestfish [--ro] -i disk.img\n"
18303 #: ../fish/guestfish.pod:281
18306 " guestfish [--ro] -i libvirt-domain\n"
18311 #: ../fish/guestfish.pod:283
18313 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
18314 "then using other commands to mount the filesystems that were found."
18318 #: ../fish/guestfish.pod:287 ../fuse/guestmount.pod:141
18319 msgid "B<--keys-from-stdin>"
18323 #: ../fish/guestfish.pod:289 ../fuse/guestmount.pod:143
18325 "Read key or passphrase parameters from stdin. The default is to try to read "
18326 "passphrases from the user by opening C</dev/tty>."
18330 #: ../fish/guestfish.pod:292
18331 msgid "B<--listen>"
18335 #: ../fish/guestfish.pod:294
18337 "Fork into the background and listen for remote commands. See section "
18338 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
18342 #: ../fish/guestfish.pod:297
18343 msgid "B<-m dev[:mountpoint]>"
18347 #: ../fish/guestfish.pod:299
18348 msgid "B<--mount dev[:mountpoint]>"
18352 #: ../fish/guestfish.pod:301
18353 msgid "Mount the named partition or logical volume on the given mountpoint."
18357 #: ../fish/guestfish.pod:303
18358 msgid "If the mountpoint is omitted, it defaults to C</>."
18362 #: ../fish/guestfish.pod:305
18363 msgid "You have to mount something on C</> before most commands will work."
18367 #: ../fish/guestfish.pod:307
18369 "If any I<-m> or I<--mount> options are given, the guest is automatically "
18374 #: ../fish/guestfish.pod:310
18376 "If you don't know what filesystems a disk image contains, you can either run "
18377 "guestfish without this option, then list the partitions, filesystems and LVs "
18378 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
18379 "commands), or you can use the L<virt-filesystems(1)> program."
18383 #: ../fish/guestfish.pod:316
18385 "Using this flag is mostly equivalent to using the C<mount-options> command "
18386 "or the C<mount-ro> command if the I<--ro> flag was given."
18390 #: ../fish/guestfish.pod:319
18395 #: ../fish/guestfish.pod:321
18396 msgid "B<--no-sync>"
18400 #: ../fish/guestfish.pod:323
18402 "Disable autosync. This is enabled by default. See the discussion of "
18403 "autosync in the L<guestfs(3)> manpage."
18407 #: ../fish/guestfish.pod:326
18412 #: ../fish/guestfish.pod:328
18413 msgid "B<--new type>"
18417 #: ../fish/guestfish.pod:330
18422 #: ../fish/guestfish.pod:332
18424 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
18425 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
18426 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
18431 #: ../fish/guestfish.pod:337
18432 msgid "B<--progress-bars>"
18436 #: ../fish/guestfish.pod:339
18437 msgid "Enable progress bars, even when guestfish is used non-interactively."
18441 #: ../fish/guestfish.pod:341
18443 "Progress bars are enabled by default when guestfish is used as an "
18444 "interactive shell."
18448 #: ../fish/guestfish.pod:344
18449 msgid "B<--no-progress-bars>"
18453 #: ../fish/guestfish.pod:346
18454 msgid "Disable progress bars."
18458 #: ../fish/guestfish.pod:348
18459 msgid "B<--remote[=pid]>"
18463 #: ../fish/guestfish.pod:350
18465 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
18466 "CONTROL GUESTFISH OVER A SOCKET> below."
18470 #: ../fish/guestfish.pod:353
18475 #: ../fish/guestfish.pod:355
18480 #: ../fish/guestfish.pod:357
18482 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
18483 "mounts are done read-only."
18487 #: ../fish/guestfish.pod:360
18489 "The option must always be used if the disk image or virtual machine might be "
18490 "running, and is generally recommended in cases where you don't need write "
18491 "access to the disk."
18495 #: ../fish/guestfish.pod:364
18497 "Note that prepared disk images created with I<-N> are not affected by this "
18498 "option. Also commands like C<add> are not affected - you have to specify "
18499 "the C<readonly:true> option explicitly if you need it."
18503 #: ../fish/guestfish.pod:368
18504 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
18508 #: ../fish/guestfish.pod:370 ../fuse/guestmount.pod:208
18509 msgid "B<--selinux>"
18513 #: ../fish/guestfish.pod:372
18514 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
18518 #: ../fish/guestfish.pod:374
18523 #: ../fish/guestfish.pod:376
18524 msgid "B<--verbose>"
18528 #: ../fish/guestfish.pod:378
18530 "Enable very verbose messages. This is particularly useful if you find a "
18535 #: ../fish/guestfish.pod:381
18540 #: ../fish/guestfish.pod:383 ../tools/virt-edit.pl:88 ../tools/virt-win-reg.pl:112 ../tools/virt-resize.pl:270 ../tools/virt-list-filesystems.pl:69 ../tools/virt-tar.pl:119 ../tools/virt-make-fs.pl:169 ../tools/virt-list-partitions.pl:70
18541 msgid "B<--version>"
18545 #: ../fish/guestfish.pod:385
18546 msgid "Display the guestfish / libguestfs version number and exit."
18550 #: ../fish/guestfish.pod:387
18555 #: ../fish/guestfish.pod:389
18560 #: ../fish/guestfish.pod:391
18562 "This option does nothing at the moment. See L</OPENING DISKS FOR READ AND "
18567 #: ../fish/guestfish.pod:394
18572 #: ../fish/guestfish.pod:396
18573 msgid "Echo each command before executing it."
18577 #: ../fish/guestfish.pod:400
18578 msgid "COMMANDS ON COMMAND LINE"
18582 #: ../fish/guestfish.pod:402
18583 msgid "Any additional (non-option) arguments are treated as commands to execute."
18587 #: ../fish/guestfish.pod:405
18589 "Commands to execute should be separated by a colon (C<:>), where the colon "
18590 "is a separate parameter. Thus:"
18594 #: ../fish/guestfish.pod:408
18597 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
18602 #: ../fish/guestfish.pod:410
18604 "If there are no additional arguments, then we enter a shell, either an "
18605 "interactive shell with a prompt (if the input is a terminal) or a "
18606 "non-interactive shell."
18610 #: ../fish/guestfish.pod:414
18612 "In either command line mode or non-interactive shell, the first command that "
18613 "gives an error causes the whole shell to exit. In interactive mode (with a "
18614 "prompt) if a command fails, you can continue to enter commands."
18618 #: ../fish/guestfish.pod:419
18619 msgid "USING launch (OR run)"
18623 #: ../fish/guestfish.pod:421
18625 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
18626 "then launch it, then mount any disks you need, and finally issue "
18627 "actions/commands. So the general order of the day is:"
18631 #: ../fish/guestfish.pod:429
18632 msgid "add or -a/--add"
18636 #: ../fish/guestfish.pod:433
18637 msgid "launch (aka run)"
18641 #: ../fish/guestfish.pod:437
18642 msgid "mount or -m/--mount"
18646 #: ../fish/guestfish.pod:441
18647 msgid "any other commands"
18651 #: ../fish/guestfish.pod:445
18653 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
18654 "guest before mounting or performing any other commands."
18658 #: ../fish/guestfish.pod:448
18660 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
18661 "I<--new> options were given then C<run> is done automatically, simply "
18662 "because guestfish can't perform the action you asked for without doing this."
18666 #: ../fish/guestfish.pod:453
18667 msgid "OPENING DISKS FOR READ AND WRITE"
18671 #: ../fish/guestfish.pod:455
18673 "The guestfish (and L<guestmount(1)>) options I<--ro> and I<--rw> affect "
18674 "whether the other command line options I<-a>, I<-c>, I<-d>, I<-i> and I<-m> "
18675 "open disk images read-only or for writing."
18679 #: ../fish/guestfish.pod:459
18681 "In libguestfs E<lt> 1.6.2, guestfish and guestmount defaulted to opening "
18682 "disk images supplied on the command line for write. To open a disk image "
18683 "read-only you have to do I<-a image --ro>."
18687 #: ../fish/guestfish.pod:463
18689 "This matters: If you accidentally open a live VM disk image writable then "
18690 "you will cause irreversible disk corruption."
18694 #: ../fish/guestfish.pod:466
18696 "By libguestfs 1.10 we intend to change the default the other way. Disk "
18697 "images will be opened read-only. You will have to either specify "
18698 "I<guestfish --rw> or change a configuration file in order to get write "
18699 "access for disk images specified by those other command line options."
18703 #: ../fish/guestfish.pod:471
18705 "This version of guestfish has a I<--rw> option which does nothing (it is "
18706 "already the default). However it is highly recommended that you use this "
18707 "option to indicate that guestfish needs write access, and to prepare your "
18708 "scripts for the day when this option will be required for write access."
18712 #: ../fish/guestfish.pod:477
18714 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
18715 "other libguestfs program apart from guestfish and guestmount."
18719 #: ../fish/guestfish.pod:480
18724 #: ../fish/guestfish.pod:482
18726 "You can quote ordinary parameters using either single or double quotes. For "
18731 #: ../fish/guestfish.pod:485
18734 " add \"file with a space.img\"\n"
18739 #: ../fish/guestfish.pod:487
18742 " rm '/file name'\n"
18747 #: ../fish/guestfish.pod:489
18755 #: ../fish/guestfish.pod:491
18757 "A few commands require a list of strings to be passed. For these, use a "
18758 "whitespace-separated list, enclosed in quotes. Strings containing "
18759 "whitespace to be passed through must be enclosed in single quotes. A "
18760 "literal single quote must be escaped with a backslash."
18764 #: ../fish/guestfish.pod:496
18767 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
18768 " command \"/bin/echo 'foo bar'\"\n"
18769 " command \"/bin/echo \\'foo\\'\"\n"
18774 #: ../fish/guestfish.pod:500
18775 msgid "OPTIONAL ARGUMENTS"
18779 #: ../fish/guestfish.pod:502
18781 "Some commands take optional arguments. These arguments appear in this "
18782 "documentation as C<[argname:..]>. You can use them as in these examples:"
18786 #: ../fish/guestfish.pod:506
18789 " add-drive-opts filename\n"
18794 #: ../fish/guestfish.pod:508
18797 " add-drive-opts filename readonly:true\n"
18802 #: ../fish/guestfish.pod:510
18805 " add-drive-opts filename format:qcow2 readonly:false\n"
18810 #: ../fish/guestfish.pod:512
18812 "Each optional argument can appear at most once. All optional arguments must "
18813 "appear after the required ones."
18817 #: ../fish/guestfish.pod:515
18822 #: ../fish/guestfish.pod:517
18823 msgid "This section applies to all commands which can take integers as parameters."
18827 #: ../fish/guestfish.pod:520
18828 msgid "SIZE SUFFIX"
18832 #: ../fish/guestfish.pod:522
18834 "When the command takes a parameter measured in bytes, you can use one of the "
18835 "following suffixes to specify kilobytes, megabytes and larger sizes:"
18839 #: ../fish/guestfish.pod:528
18840 msgid "B<k> or B<K> or B<KiB>"
18844 #: ../fish/guestfish.pod:530
18845 msgid "The size in kilobytes (multiplied by 1024)."
18849 #: ../fish/guestfish.pod:532
18854 #: ../fish/guestfish.pod:534
18855 msgid "The size in SI 1000 byte units."
18859 #: ../fish/guestfish.pod:536
18860 msgid "B<M> or B<MiB>"
18864 #: ../fish/guestfish.pod:538
18865 msgid "The size in megabytes (multiplied by 1048576)."
18869 #: ../fish/guestfish.pod:540
18874 #: ../fish/guestfish.pod:542
18875 msgid "The size in SI 1000000 byte units."
18879 #: ../fish/guestfish.pod:544
18880 msgid "B<G> or B<GiB>"
18884 #: ../fish/guestfish.pod:546
18885 msgid "The size in gigabytes (multiplied by 2**30)."
18889 #: ../fish/guestfish.pod:548
18894 #: ../fish/guestfish.pod:550
18895 msgid "The size in SI 10**9 byte units."
18899 #: ../fish/guestfish.pod:552
18900 msgid "B<T> or B<TiB>"
18904 #: ../fish/guestfish.pod:554
18905 msgid "The size in terabytes (multiplied by 2**40)."
18909 #: ../fish/guestfish.pod:556
18914 #: ../fish/guestfish.pod:558
18915 msgid "The size in SI 10**12 byte units."
18919 #: ../fish/guestfish.pod:560
18920 msgid "B<P> or B<PiB>"
18924 #: ../fish/guestfish.pod:562
18925 msgid "The size in petabytes (multiplied by 2**50)."
18929 #: ../fish/guestfish.pod:564
18934 #: ../fish/guestfish.pod:566
18935 msgid "The size in SI 10**15 byte units."
18939 #: ../fish/guestfish.pod:568
18940 msgid "B<E> or B<EiB>"
18944 #: ../fish/guestfish.pod:570
18945 msgid "The size in exabytes (multiplied by 2**60)."
18949 #: ../fish/guestfish.pod:572
18954 #: ../fish/guestfish.pod:574
18955 msgid "The size in SI 10**18 byte units."
18959 #: ../fish/guestfish.pod:576
18960 msgid "B<Z> or B<ZiB>"
18964 #: ../fish/guestfish.pod:578
18965 msgid "The size in zettabytes (multiplied by 2**70)."
18969 #: ../fish/guestfish.pod:580
18974 #: ../fish/guestfish.pod:582
18975 msgid "The size in SI 10**21 byte units."
18979 #: ../fish/guestfish.pod:584
18980 msgid "B<Y> or B<YiB>"
18984 #: ../fish/guestfish.pod:586
18985 msgid "The size in yottabytes (multiplied by 2**80)."
18989 #: ../fish/guestfish.pod:588
18994 #: ../fish/guestfish.pod:590
18995 msgid "The size in SI 10**24 byte units."
18999 #: ../fish/guestfish.pod:596
19002 " truncate-size /file 1G\n"
19007 #: ../fish/guestfish.pod:598
19008 msgid "would truncate the file to 1 gigabyte."
19012 #: ../fish/guestfish.pod:600
19014 "Be careful because a few commands take sizes in kilobytes or megabytes "
19015 "(eg. the parameter to L</memsize> is specified in megabytes already). "
19016 "Adding a suffix will probably not do what you expect."
19020 #: ../fish/guestfish.pod:604
19021 msgid "OCTAL AND HEXADECIMAL NUMBERS"
19025 #: ../fish/guestfish.pod:606
19027 "For specifying the radix (base) use the C convention: C<0> to prefix an "
19028 "octal number or C<0x> to prefix a hexadecimal number. For example:"
19032 #: ../fish/guestfish.pod:609
19035 " 1234 decimal number 1234\n"
19036 " 02322 octal number, equivalent to decimal 1234\n"
19037 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
19042 #: ../fish/guestfish.pod:613
19044 "When using the C<chmod> command, you almost always want to specify an octal "
19045 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
19046 "L<chmod(1)> program):"
19050 #: ../fish/guestfish.pod:617
19053 " chmod 0777 /public # OK\n"
19054 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
19059 #: ../fish/guestfish.pod:620
19061 "Commands that return numbers usually print them in decimal, but some "
19062 "commands print numbers in other radices (eg. C<umask> prints the mode in "
19063 "octal, preceeded by C<0>)."
19067 #: ../fish/guestfish.pod:624
19068 msgid "WILDCARDS AND GLOBBING"
19072 #: ../fish/guestfish.pod:626
19074 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
19075 "(globbing) by default. So for example the following will not do what you "
19080 #: ../fish/guestfish.pod:630
19088 #: ../fish/guestfish.pod:632
19090 "Assuming you don't have a directory called literally C</home/*> then the "
19091 "above command will return an error."
19095 #: ../fish/guestfish.pod:635
19096 msgid "To perform wildcard expansion, use the C<glob> command."
19100 #: ../fish/guestfish.pod:637
19103 " glob rm-rf /home/*\n"
19108 #: ../fish/guestfish.pod:639
19110 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
19111 "many times), equivalent to:"
19115 #: ../fish/guestfish.pod:642
19118 " rm-rf /home/jim\n"
19119 " rm-rf /home/joe\n"
19120 " rm-rf /home/mary\n"
19125 #: ../fish/guestfish.pod:646
19126 msgid "C<glob> only works on simple guest paths and not on device names."
19130 #: ../fish/guestfish.pod:648
19132 "If you have several parameters, each containing a wildcard, then glob will "
19133 "perform a Cartesian product."
19137 #: ../fish/guestfish.pod:651
19142 #: ../fish/guestfish.pod:653
19144 "Any line which starts with a I<#> character is treated as a comment and "
19145 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
19146 "a command. For example:"
19150 #: ../fish/guestfish.pod:657
19153 " # this is a comment\n"
19154 " # this is a comment\n"
19155 " foo # NOT a comment\n"
19160 #: ../fish/guestfish.pod:661
19161 msgid "Blank lines are also ignored."
19165 #: ../fish/guestfish.pod:663
19166 msgid "RUNNING COMMANDS LOCALLY"
19170 #: ../fish/guestfish.pod:665
19172 "Any line which starts with a I<!> character is treated as a command sent to "
19173 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
19177 #: ../fish/guestfish.pod:669
19181 " tgz-out /remote local/remote-data.tar.gz\n"
19186 #: ../fish/guestfish.pod:672
19188 "will create a directory C<local> on the host, and then export the contents "
19189 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
19190 "(See C<tgz-out>)."
19194 #: ../fish/guestfish.pod:676
19196 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
19197 "effect, due to the way that subprocesses work in Unix."
19201 #: ../fish/guestfish.pod:679
19202 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
19206 #: ../fish/guestfish.pod:681
19208 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
19209 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
19210 "and executed as guestfish commands."
19214 #: ../fish/guestfish.pod:685
19216 "Thus you can use shell script to construct arbitrary guestfish commands "
19217 "which are then parsed by guestfish."
19221 #: ../fish/guestfish.pod:688
19223 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
19224 "through C</foo.100>) using guestfish commands alone. However this is simple "
19225 "if we use a shell script to create the guestfish commands for us:"
19229 #: ../fish/guestfish.pod:693
19232 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
19237 #: ../fish/guestfish.pod:695
19238 msgid "or with names like C</foo.001>:"
19242 #: ../fish/guestfish.pod:697
19245 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
19250 #: ../fish/guestfish.pod:699
19252 "When using guestfish interactively it can be helpful to just run the shell "
19253 "script first (ie. remove the initial C<E<lt>> character so it is just an "
19254 "ordinary I<!> local command), see what guestfish commands it would run, and "
19255 "when you are happy with those prepend the C<E<lt>> character to run the "
19256 "guestfish commands for real."
19260 #: ../fish/guestfish.pod:705
19265 #: ../fish/guestfish.pod:707
19267 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
19268 "command (a guestfish command) to the second command (any host command). For "
19273 #: ../fish/guestfish.pod:711
19276 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
19281 #: ../fish/guestfish.pod:713
19283 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
19284 "program). The above command would list all accounts in the guest filesystem "
19285 "which have UID 0, ie. root accounts including backdoors. Other examples:"
19289 #: ../fish/guestfish.pod:718
19292 " hexdump /bin/ls | head\n"
19293 " list-devices | tail -1\n"
19294 " tgz-out / - | tar ztf -\n"
19299 #: ../fish/guestfish.pod:722
19301 "The space before the pipe symbol is required, any space after the pipe "
19302 "symbol is optional. Everything after the pipe symbol is just passed "
19303 "straight to the host shell, so it can contain redirections, globs and "
19304 "anything else that makes sense on the host side."
19308 #: ../fish/guestfish.pod:727
19310 "To use a literal argument which begins with a pipe symbol, you have to quote "
19315 #: ../fish/guestfish.pod:730
19323 #: ../fish/guestfish.pod:732
19324 msgid "HOME DIRECTORIES"
19328 #: ../fish/guestfish.pod:734
19330 "If a parameter starts with the character C<~> then the tilde may be expanded "
19331 "as a home directory path (either C<~> for the current user's home directory, "
19332 "or C<~user> for another user)."
19336 #: ../fish/guestfish.pod:738
19338 "Note that home directory expansion happens for users known I<on the host>, "
19339 "not in the guest filesystem."
19343 #: ../fish/guestfish.pod:741
19345 "To use a literal argument which begins with a tilde, you have to quote it, "
19350 #: ../fish/guestfish.pod:744
19358 #: ../fish/guestfish.pod:748
19360 "Libguestfs has some support for Linux guests encrypted according to the "
19361 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
19362 "disk encryption systems used by modern Linux guests. Currently only "
19363 "LVM-on-LUKS is supported."
19367 #: ../fish/guestfish.pod:753
19368 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
19372 #: ../fish/guestfish.pod:755
19375 " ><fs> vfs-type /dev/sda2\n"
19381 #: ../fish/guestfish.pod:758
19383 "Then open those devices using L</luks-open>. This creates a device-mapper "
19384 "device called C</dev/mapper/luksdev>."
19388 #: ../fish/guestfish.pod:761
19391 " ><fs> luks-open /dev/sda2 luksdev\n"
19392 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
19397 #: ../fish/guestfish.pod:764
19399 "Finally you have to tell LVM to scan for volume groups on the newly created "
19404 #: ../fish/guestfish.pod:767
19408 " vg-activate-all true\n"
19413 #: ../fish/guestfish.pod:770
19414 msgid "The logical volume(s) can now be mounted in the usual way."
19418 #: ../fish/guestfish.pod:772
19420 "Before closing a LUKS device you must unmount any logical volumes on it and "
19421 "deactivate the volume groups by calling C<vg-activate false VG> on each "
19422 "one. Then you can close the mapper device:"
19426 #: ../fish/guestfish.pod:776
19429 " vg-activate false /dev/VG\n"
19430 " luks-close /dev/mapper/luksdev\n"
19435 #: ../fish/guestfish.pod:779
19436 msgid "WINDOWS PATHS"
19440 #: ../fish/guestfish.pod:781
19442 "If a path is prefixed with C<win:> then you can use Windows-style paths "
19443 "(with some limitations). The following commands are equivalent:"
19447 #: ../fish/guestfish.pod:784
19450 " file /WINDOWS/system32/config/system.LOG\n"
19455 #: ../fish/guestfish.pod:786
19458 " file win:/windows/system32/config/system.log\n"
19463 #: ../fish/guestfish.pod:788
19466 " file win:\\windows\\system32\\config\\system.log\n"
19471 #: ../fish/guestfish.pod:790
19474 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
19479 #: ../fish/guestfish.pod:792
19481 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
19482 "handles case insensitivity like Windows would. This only works in argument "
19483 "positions that expect a path."
19487 #: ../fish/guestfish.pod:796
19488 msgid "UPLOADING AND DOWNLOADING FILES"
19492 #: ../fish/guestfish.pod:798
19494 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
19495 "others which upload from or download to a local file, you can use the "
19496 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
19500 #: ../fish/guestfish.pod:802
19508 #: ../fish/guestfish.pod:804
19509 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
19513 #: ../fish/guestfish.pod:807
19516 " tar-out /etc - | tar tf -\n"
19521 #: ../fish/guestfish.pod:809
19523 "writes the tarball to stdout and then pipes that into the external \"tar\" "
19524 "command (see L</PIPES>)."
19528 #: ../fish/guestfish.pod:812
19530 "When using C<-> to read from stdin, the input is read up to the end of "
19531 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
19532 "some arbitrary end marker:"
19536 #: ../fish/guestfish.pod:816
19539 " upload -<<END /foo\n"
19548 #: ../fish/guestfish.pod:822
19550 "Any string of characters can be used instead of C<END>. The end marker must "
19551 "appear on a line of its own, without any preceeding or following characters "
19552 "(not even spaces)."
19556 #: ../fish/guestfish.pod:826
19558 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
19559 "upload local files (so-called \"FileIn\" parameters in the generator)."
19563 #: ../fish/guestfish.pod:829
19564 msgid "EXIT ON ERROR BEHAVIOUR"
19568 #: ../fish/guestfish.pod:831
19570 "By default, guestfish will ignore any errors when in interactive mode "
19571 "(ie. taking commands from a human over a tty), and will exit on the first "
19572 "error in non-interactive mode (scripts, commands given on the command line)."
19576 #: ../fish/guestfish.pod:836
19578 "If you prefix a command with a I<-> character, then that command will not "
19579 "cause guestfish to exit, even if that (one) command returns an error."
19583 #: ../fish/guestfish.pod:840
19584 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
19588 #: ../fish/guestfish.pod:842
19590 "Guestfish can be remote-controlled over a socket. This is useful "
19591 "particularly in shell scripts where you want to make several different "
19592 "changes to a filesystem, but you don't want the overhead of starting up a "
19593 "guestfish process each time."
19597 #: ../fish/guestfish.pod:847
19598 msgid "Start a guestfish server process using:"
19602 #: ../fish/guestfish.pod:849
19605 " eval \"`guestfish --listen`\"\n"
19610 #: ../fish/guestfish.pod:851
19611 msgid "and then send it commands by doing:"
19615 #: ../fish/guestfish.pod:853
19618 " guestfish --remote cmd [...]\n"
19623 #: ../fish/guestfish.pod:855
19624 msgid "To cause the server to exit, send it the exit command:"
19628 #: ../fish/guestfish.pod:857
19631 " guestfish --remote exit\n"
19636 #: ../fish/guestfish.pod:859
19638 "Note that the server will normally exit if there is an error in a command. "
19639 "You can change this in the usual way. See section L</EXIT ON ERROR "
19644 #: ../fish/guestfish.pod:863
19645 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
19649 #: ../fish/guestfish.pod:865
19651 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
19652 "is how the I<--remote> option knows where to send the commands. You can "
19653 "have several guestfish listener processes running using:"
19657 #: ../fish/guestfish.pod:869
19660 " eval \"`guestfish --listen`\"\n"
19661 " pid1=$GUESTFISH_PID\n"
19662 " eval \"`guestfish --listen`\"\n"
19663 " pid2=$GUESTFISH_PID\n"
19665 " guestfish --remote=$pid1 cmd\n"
19666 " guestfish --remote=$pid2 cmd\n"
19671 #: ../fish/guestfish.pod:877
19672 msgid "REMOTE CONTROL AND CSH"
19676 #: ../fish/guestfish.pod:879
19678 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
19683 #: ../fish/guestfish.pod:882
19686 " eval \"`guestfish --listen --csh`\"\n"
19691 #: ../fish/guestfish.pod:884
19692 msgid "REMOTE CONTROL DETAILS"
19696 #: ../fish/guestfish.pod:886
19698 "Remote control happens over a Unix domain socket called "
19699 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
19700 "of the process, and C<$PID> is the process ID of the server."
19704 #: ../fish/guestfish.pod:890
19705 msgid "Guestfish client and server versions must match exactly."
19709 #: ../fish/guestfish.pod:892
19710 msgid "PREPARED DISK IMAGES"
19714 #: ../fish/guestfish.pod:894
19716 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
19717 "preformatted disk images that guestfish can make for you to save typing. "
19718 "This is particularly useful for testing purposes. This option is used "
19719 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
19720 "can be mixed with I<-a>)."
19724 #: ../fish/guestfish.pod:900
19726 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
19727 "the second and so on. Existing files in the current directory are "
19732 #: ../fish/guestfish.pod:904
19734 "The type briefly describes how the disk should be sized, partitioned, how "
19735 "filesystem(s) should be created, and how content should be added. "
19736 "Optionally the type can be followed by extra parameters, separated by C<:> "
19737 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
19738 "sparsely-allocated disk, containing a single partition, with the partition "
19739 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
19740 "on a 1GB disk instead."
19744 #: ../fish/guestfish.pod:912
19745 msgid "To list the available types and any extra parameters they take, run:"
19749 #: ../fish/guestfish.pod:916
19751 "Note that the prepared filesystem is not mounted. You would usually have to "
19752 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
19756 #: ../fish/guestfish.pod:920
19758 "If any I<-N> or I<--new> options are given, the guest is automatically "
19763 #: ../fish/guestfish.pod:925
19764 msgid "Create a 100MB disk with an ext4-formatted partition:"
19768 #: ../fish/guestfish.pod:927
19771 " guestfish -N fs:ext4\n"
19776 #: ../fish/guestfish.pod:929
19777 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
19781 #: ../fish/guestfish.pod:931
19784 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
19789 #: ../fish/guestfish.pod:933
19790 msgid "Create a blank 200MB disk:"
19794 #: ../fish/guestfish.pod:935
19797 " guestfish -N disk:200M\n"
19802 #: ../fish/guestfish.pod:937
19803 msgid "PROGRESS BARS"
19807 #: ../fish/guestfish.pod:939
19809 "Some (not all) long-running commands send progress notification messages as "
19810 "they are running. Guestfish turns these messages into progress bars."
19814 #: ../fish/guestfish.pod:943
19816 "When a command that supports progress bars takes longer than two seconds to "
19817 "run, and if progress bars are enabled, then you will see one appearing below "
19822 #: ../fish/guestfish.pod:947
19825 " ><fs> copy-size /large-file /another-file 2048M\n"
19826 " / 10% [#####-----------------------------------------] 00:30\n"
19831 #: ../fish/guestfish.pod:950
19833 "The spinner on the left hand side moves round once for every progress "
19834 "notification received from the backend. This is a (reasonably) golden "
19835 "assurance that the command is \"doing something\" even if the progress bar "
19836 "is not moving, because the command is able to send the progress "
19837 "notifications. When the bar reaches 100% and the command finishes, the "
19838 "spinner disappears."
19842 #: ../fish/guestfish.pod:957
19844 "Progress bars are enabled by default when guestfish is used interactively. "
19845 "You can enable them even for non-interactive modes using I<--progress-bars>, "
19846 "and you can disable them completely using I<--no-progress-bars>."
19850 #: ../fish/guestfish.pod:962
19851 msgid "GUESTFISH COMMANDS"
19855 #: ../fish/guestfish.pod:964
19857 "The commands in this section are guestfish convenience commands, in other "
19858 "words, they are not part of the L<guestfs(3)> API."
19862 #: ../fish/guestfish.pod:967
19867 #: ../fish/guestfish.pod:969
19876 #: ../fish/guestfish.pod:972
19877 msgid "Without any parameter, this provides general help."
19881 #: ../fish/guestfish.pod:974
19882 msgid "With a C<cmd> parameter, this displays detailed help for that command."
19886 #: ../fish/guestfish.pod:976
19887 msgid "quit | exit"
19891 #: ../fish/guestfish.pod:978
19892 msgid "This exits guestfish. You can also use C<^D> key."
19896 #: ../fish/guestfish.pod:980
19897 msgid "@FISH_COMMANDS@"
19901 #: ../fish/guestfish.pod:982
19906 #: ../fish/guestfish.pod:986 ../test-tool/libguestfs-test-tool.pod:83
19911 #: ../fish/guestfish.pod:988
19913 "guestfish returns 0 if the commands completed without error, or 1 if there "
19918 #: ../fish/guestfish.pod:995
19923 #: ../fish/guestfish.pod:997
19925 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
19930 #: ../fish/guestfish.pod:1000
19931 msgid "GUESTFISH_PID"
19935 #: ../fish/guestfish.pod:1002
19937 "Used with the I<--remote> option to specify the remote guestfish process to "
19938 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
19942 #: ../fish/guestfish.pod:1006
19947 #: ../fish/guestfish.pod:1008
19949 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
19950 "not specified, the external L<hexedit(1)> program is used."
19954 #: ../fish/guestfish.pod:1012
19959 #: ../fish/guestfish.pod:1014
19961 "If compiled with GNU readline support, various files in the home directory "
19962 "can be used. See L</FILES>."
19966 #: ../fish/guestfish.pod:1023
19968 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
19969 "effect as using the B<-v> option."
19973 #: ../fish/guestfish.pod:1035
19975 "Set the path that guestfish uses to search for kernel and initrd.img. See "
19976 "the discussion of paths in L<guestfs(3)>."
19980 #: ../fish/guestfish.pod:1046
19981 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
19985 #: ../fish/guestfish.pod:1048
19990 #: ../fish/guestfish.pod:1050
19992 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
19997 #: ../fish/guestfish.pod:1065 ../test-tool/libguestfs-test-tool.pod:88
20002 #: ../fish/guestfish.pod:1069
20003 msgid "$HOME/.guestfish"
20007 #: ../fish/guestfish.pod:1071
20009 "If compiled with GNU readline support, then the command history is saved in "
20014 #: ../fish/guestfish.pod:1074
20015 msgid "$HOME/.inputrc"
20019 #: ../fish/guestfish.pod:1076
20020 msgid "/etc/inputrc"
20024 #: ../fish/guestfish.pod:1078
20026 "If compiled with GNU readline support, then these files can be used to "
20027 "configure readline. For further information, please see "
20028 "L<readline(3)/INITIALIZATION FILE>."
20032 #: ../fish/guestfish.pod:1082
20033 msgid "To write rules which only apply to guestfish, use:"
20037 #: ../fish/guestfish.pod:1084
20047 #: ../fish/guestfish.pod:1088
20049 "Variables that you can set in inputrc that change the behaviour of guestfish "
20050 "in useful ways include:"
20054 #: ../fish/guestfish.pod:1093
20055 msgid "completion-ignore-case (default: on)"
20059 #: ../fish/guestfish.pod:1095
20061 "By default, guestfish will ignore case when tab-completing paths on the "
20066 #: ../fish/guestfish.pod:1098
20069 " set completion-ignore-case off\n"
20074 #: ../fish/guestfish.pod:1100
20075 msgid "to make guestfish case sensitive."
20079 #: ../fish/guestfish.pod:1104
20084 #: ../fish/guestfish.pod:1106
20085 msgid "test2.img (etc)"
20089 #: ../fish/guestfish.pod:1108
20091 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
20092 "will be created in the file C<test1.img> in the current directory. The "
20093 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
20094 "the same name will be overwritten."
20098 #: ../fish/guestfish.pod:1117
20100 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, "
20101 "L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, "
20102 "L<virt-filesystems(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
20103 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
20104 "L<virt-rescue(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<virt-tar-in(1)>, "
20105 "L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<hexedit(1)>."
20109 #: ../fish/guestfish.pod:1147 ../test-tool/libguestfs-test-tool.pod:124 ../fuse/guestmount.pod:253 ../tools/virt-edit.pl:372 ../tools/virt-win-reg.pl:606 ../tools/virt-resize.pl:1512 ../tools/virt-list-filesystems.pl:210 ../tools/virt-tar.pl:309 ../tools/virt-make-fs.pl:567 ../tools/virt-list-partitions.pl:277
20111 "This program is free software; you can redistribute it and/or modify it "
20112 "under the terms of the GNU General Public License as published by the Free "
20113 "Software Foundation; either version 2 of the License, or (at your option) "
20114 "any later version."
20118 #: ../fish/guestfish.pod:1152 ../test-tool/libguestfs-test-tool.pod:129 ../fuse/guestmount.pod:258 ../tools/virt-edit.pl:377 ../tools/virt-win-reg.pl:611 ../tools/virt-resize.pl:1517 ../tools/virt-list-filesystems.pl:215 ../tools/virt-tar.pl:314 ../tools/virt-make-fs.pl:572 ../tools/virt-list-partitions.pl:282
20120 "This program is distributed in the hope that it will be useful, but WITHOUT "
20121 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
20122 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
20127 #: ../fish/guestfish.pod:1157 ../test-tool/libguestfs-test-tool.pod:134 ../fuse/guestmount.pod:263 ../tools/virt-edit.pl:382 ../tools/virt-win-reg.pl:616 ../tools/virt-resize.pl:1522 ../tools/virt-list-filesystems.pl:220 ../tools/virt-tar.pl:319 ../tools/virt-make-fs.pl:577 ../tools/virt-list-partitions.pl:287
20129 "You should have received a copy of the GNU General Public License along with "
20130 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
20131 "Ave, Cambridge, MA 02139, USA."
20135 #: ../fish/guestfish-actions.pod:1
20140 #: ../fish/guestfish-actions.pod:3
20143 " add-cdrom filename\n"
20148 #: ../fish/guestfish-actions.pod:15
20150 "This call checks for the existence of C<filename>. This stops you from "
20151 "specifying other types of drive which are supported by qemu such as C<nbd:> "
20152 "and C<http:> URLs. To specify those, use the general L</config> call "
20157 #: ../fish/guestfish-actions.pod:22
20159 "If you just want to add an ISO file (often you use this as an efficient way "
20160 "to transfer large files into the guest), then you should probably use "
20161 "L</add-drive-ro> instead."
20165 #: ../fish/guestfish-actions.pod:35
20170 #: ../fish/guestfish-actions.pod:37
20175 #: ../fish/guestfish-actions.pod:39
20178 " add-domain dom [libvirturi:..] [readonly:..] [iface:..]\n"
20183 #: ../fish/guestfish-actions.pod:41
20185 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
20186 "It works by connecting to libvirt, requesting the domain and domain XML from "
20187 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
20191 #: ../fish/guestfish-actions.pod:64
20193 "The other optional parameters are passed directly through to "
20194 "L</add-drive-opts>."
20198 #: ../fish/guestfish-actions.pod:67 ../fish/guestfish-actions.pod:131 ../fish/guestfish-actions.pod:2921
20200 "This command has one or more optional arguments. See L</OPTIONAL "
20205 #: ../fish/guestfish-actions.pod:69
20210 #: ../fish/guestfish-actions.pod:71
20213 " add-drive filename\n"
20218 #: ../fish/guestfish-actions.pod:73
20220 "This function is the equivalent of calling L</add-drive-opts> with no "
20221 "optional parameters, so the disk is added writable, with the format being "
20222 "detected automatically."
20226 #: ../fish/guestfish-actions.pod:77
20228 "Automatic detection of the format opens you up to a potential security hole "
20229 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
20230 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
20231 "you should think about replacing calls to this function with calls to "
20232 "L</add-drive-opts>, and specifying the format."
20236 #: ../fish/guestfish-actions.pod:84
20237 msgid "add-drive-opts"
20241 #: ../fish/guestfish-actions.pod:86
20246 #: ../fish/guestfish-actions.pod:88
20249 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
20254 #: ../fish/guestfish-actions.pod:115
20256 "This forces the image format. If you omit this (or use L</add-drive> or "
20257 "L</add-drive-ro>) then the format is automatically detected. Possible "
20258 "formats include C<raw> and C<qcow2>."
20262 #: ../fish/guestfish-actions.pod:126
20264 "This rarely-used option lets you emulate the behaviour of the deprecated "
20265 "L</add-drive-with-if> call (q.v.)"
20269 #: ../fish/guestfish-actions.pod:133
20270 msgid "add-drive-ro"
20274 #: ../fish/guestfish-actions.pod:135
20279 #: ../fish/guestfish-actions.pod:137
20282 " add-drive-ro filename\n"
20287 #: ../fish/guestfish-actions.pod:139
20289 "This function is the equivalent of calling L</add-drive-opts> with the "
20290 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
20291 "is added read-only, with the format being detected automatically."
20295 #: ../fish/guestfish-actions.pod:144
20296 msgid "add-drive-ro-with-if"
20300 #: ../fish/guestfish-actions.pod:146
20303 " add-drive-ro-with-if filename iface\n"
20308 #: ../fish/guestfish-actions.pod:148
20310 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
20311 "interface emulation to use at run time."
20315 #: ../fish/guestfish-actions.pod:158
20316 msgid "add-drive-with-if"
20320 #: ../fish/guestfish-actions.pod:160
20323 " add-drive-with-if filename iface\n"
20328 #: ../fish/guestfish-actions.pod:162
20330 "This is the same as L</add-drive> but it allows you to specify the QEMU "
20331 "interface emulation to use at run time."
20335 #: ../fish/guestfish-actions.pod:172
20340 #: ../fish/guestfish-actions.pod:174
20343 " aug-clear augpath\n"
20348 #: ../fish/guestfish-actions.pod:179
20353 #: ../fish/guestfish-actions.pod:181
20361 #: ../fish/guestfish-actions.pod:183
20363 "Close the current Augeas handle and free up any resources used by it. After "
20364 "calling this, you have to call L</aug-init> again before you can use any "
20365 "other Augeas functions."
20369 #: ../fish/guestfish-actions.pod:188
20370 msgid "aug-defnode"
20374 #: ../fish/guestfish-actions.pod:190
20377 " aug-defnode name expr val\n"
20382 #: ../fish/guestfish-actions.pod:195
20384 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
20385 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
20386 "containing that single node."
20390 #: ../fish/guestfish-actions.pod:203
20395 #: ../fish/guestfish-actions.pod:205
20398 " aug-defvar name expr\n"
20403 #: ../fish/guestfish-actions.pod:214
20408 #: ../fish/guestfish-actions.pod:216
20411 " aug-get augpath\n"
20416 #: ../fish/guestfish-actions.pod:221
20421 #: ../fish/guestfish-actions.pod:223
20424 " aug-init root flags\n"
20429 #: ../fish/guestfish-actions.pod:229
20430 msgid "You must call this before using any other L</aug-*> commands."
20434 #: ../fish/guestfish-actions.pod:264
20435 msgid "Do not load the tree in L</aug-init>."
20439 #: ../fish/guestfish-actions.pod:268
20440 msgid "To close the handle, you can call L</aug-close>."
20444 #: ../fish/guestfish-actions.pod:272
20449 #: ../fish/guestfish-actions.pod:274
20452 " aug-insert augpath label true|false\n"
20457 #: ../fish/guestfish-actions.pod:284
20462 #: ../fish/guestfish-actions.pod:286
20470 #: ../fish/guestfish-actions.pod:293
20475 #: ../fish/guestfish-actions.pod:295
20478 " aug-ls augpath\n"
20483 #: ../fish/guestfish-actions.pod:297
20485 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
20486 "resulting nodes into alphabetical order."
20490 #: ../fish/guestfish-actions.pod:300
20495 #: ../fish/guestfish-actions.pod:302
20498 " aug-match augpath\n"
20503 #: ../fish/guestfish-actions.pod:308
20508 #: ../fish/guestfish-actions.pod:310
20511 " aug-mv src dest\n"
20516 #: ../fish/guestfish-actions.pod:315
20521 #: ../fish/guestfish-actions.pod:317
20524 " aug-rm augpath\n"
20529 #: ../fish/guestfish-actions.pod:323
20534 #: ../fish/guestfish-actions.pod:325
20542 #: ../fish/guestfish-actions.pod:329
20544 "The flags which were passed to L</aug-init> affect exactly how files are "
20549 #: ../fish/guestfish-actions.pod:332
20554 #: ../fish/guestfish-actions.pod:334
20557 " aug-set augpath val\n"
20562 #: ../fish/guestfish-actions.pod:338
20564 "In the Augeas API, it is possible to clear a node by setting the value to "
20565 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
20566 "this call. Instead you must use the L</aug-clear> call."
20570 #: ../fish/guestfish-actions.pod:343
20575 #: ../fish/guestfish-actions.pod:345
20578 " available 'groups ...'\n"
20583 #: ../fish/guestfish-actions.pod:351
20585 "The libguestfs groups, and the functions that those groups correspond to, "
20586 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
20587 "runtime by calling L</available-all-groups>."
20591 #: ../fish/guestfish-actions.pod:375
20592 msgid "You must call L</launch> before calling this function."
20596 #: ../fish/guestfish-actions.pod:397
20598 "This call was added in version C<1.0.80>. In previous versions of "
20599 "libguestfs all you could do would be to speculatively execute a command to "
20600 "find out if the daemon implemented it. See also L</version>."
20604 #: ../fish/guestfish-actions.pod:404
20605 msgid "available-all-groups"
20609 #: ../fish/guestfish-actions.pod:406
20612 " available-all-groups\n"
20617 #: ../fish/guestfish-actions.pod:408
20619 "This command returns a list of all optional groups that this daemon knows "
20620 "about. Note this returns both supported and unsupported groups. To find "
20621 "out which ones the daemon can actually support you have to call "
20622 "L</available> on each member of the returned list."
20626 #: ../fish/guestfish-actions.pod:414
20627 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
20631 #: ../fish/guestfish-actions.pod:416
20636 #: ../fish/guestfish-actions.pod:418
20639 " base64-in (base64file|-) filename\n"
20644 #: ../fish/guestfish-actions.pod:423 ../fish/guestfish-actions.pod:432 ../fish/guestfish-actions.pod:656 ../fish/guestfish-actions.pod:825 ../fish/guestfish-actions.pod:844 ../fish/guestfish-actions.pod:1221 ../fish/guestfish-actions.pod:4289 ../fish/guestfish-actions.pod:4301 ../fish/guestfish-actions.pod:4312 ../fish/guestfish-actions.pod:4323 ../fish/guestfish-actions.pod:4375 ../fish/guestfish-actions.pod:4384 ../fish/guestfish-actions.pod:4438 ../fish/guestfish-actions.pod:4461
20645 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
20649 #: ../fish/guestfish-actions.pod:425
20654 #: ../fish/guestfish-actions.pod:427
20657 " base64-out filename (base64file|-)\n"
20662 #: ../fish/guestfish-actions.pod:434
20663 msgid "blockdev-flushbufs"
20667 #: ../fish/guestfish-actions.pod:436
20670 " blockdev-flushbufs device\n"
20675 #: ../fish/guestfish-actions.pod:443
20676 msgid "blockdev-getbsz"
20680 #: ../fish/guestfish-actions.pod:445
20683 " blockdev-getbsz device\n"
20688 #: ../fish/guestfish-actions.pod:454
20689 msgid "blockdev-getro"
20693 #: ../fish/guestfish-actions.pod:456
20696 " blockdev-getro device\n"
20701 #: ../fish/guestfish-actions.pod:463
20702 msgid "blockdev-getsize64"
20706 #: ../fish/guestfish-actions.pod:465
20709 " blockdev-getsize64 device\n"
20714 #: ../fish/guestfish-actions.pod:469
20715 msgid "See also L</blockdev-getsz>."
20719 #: ../fish/guestfish-actions.pod:473
20720 msgid "blockdev-getss"
20724 #: ../fish/guestfish-actions.pod:475
20727 " blockdev-getss device\n"
20732 #: ../fish/guestfish-actions.pod:480
20733 msgid "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
20737 #: ../fish/guestfish-actions.pod:485
20738 msgid "blockdev-getsz"
20742 #: ../fish/guestfish-actions.pod:487
20745 " blockdev-getsz device\n"
20750 #: ../fish/guestfish-actions.pod:492
20752 "See also L</blockdev-getss> for the real sector size of the device, and "
20753 "L</blockdev-getsize64> for the more useful I<size in bytes>."
20757 #: ../fish/guestfish-actions.pod:498
20758 msgid "blockdev-rereadpt"
20762 #: ../fish/guestfish-actions.pod:500
20765 " blockdev-rereadpt device\n"
20770 #: ../fish/guestfish-actions.pod:506
20771 msgid "blockdev-setbsz"
20775 #: ../fish/guestfish-actions.pod:508
20778 " blockdev-setbsz device blocksize\n"
20783 #: ../fish/guestfish-actions.pod:517
20784 msgid "blockdev-setro"
20788 #: ../fish/guestfish-actions.pod:519
20791 " blockdev-setro device\n"
20796 #: ../fish/guestfish-actions.pod:525
20797 msgid "blockdev-setrw"
20801 #: ../fish/guestfish-actions.pod:527
20804 " blockdev-setrw device\n"
20809 #: ../fish/guestfish-actions.pod:533
20810 msgid "case-sensitive-path"
20814 #: ../fish/guestfish-actions.pod:535
20817 " case-sensitive-path path\n"
20822 #: ../fish/guestfish-actions.pod:559
20824 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return "
20825 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
20826 "how the directories were originally created under Windows)."
20830 #: ../fish/guestfish-actions.pod:567
20831 msgid "See also L</realpath>."
20835 #: ../fish/guestfish-actions.pod:569
20840 #: ../fish/guestfish-actions.pod:571
20848 #: ../fish/guestfish-actions.pod:575
20850 "Note that this function cannot correctly handle binary files (specifically, "
20851 "files containing C<\\0> character which is treated as end of string). For "
20852 "those you need to use the L</read-file> or L</download> functions which have "
20853 "a more complex interface."
20857 #: ../fish/guestfish-actions.pod:583
20862 #: ../fish/guestfish-actions.pod:585
20865 " checksum csumtype path\n"
20870 #: ../fish/guestfish-actions.pod:628
20871 msgid "To get the checksum for a device, use L</checksum-device>."
20875 #: ../fish/guestfish-actions.pod:630
20876 msgid "To get the checksums for many files, use L</checksums-out>."
20880 #: ../fish/guestfish-actions.pod:632
20881 msgid "checksum-device"
20885 #: ../fish/guestfish-actions.pod:634
20888 " checksum-device csumtype device\n"
20893 #: ../fish/guestfish-actions.pod:636
20895 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
20896 "device named C<device>. For the types of checksums supported see the "
20897 "L</checksum> command."
20901 #: ../fish/guestfish-actions.pod:640
20902 msgid "checksums-out"
20906 #: ../fish/guestfish-actions.pod:642
20909 " checksums-out csumtype directory (sumsfile|-)\n"
20914 #: ../fish/guestfish-actions.pod:658
20919 #: ../fish/guestfish-actions.pod:660
20922 " chmod mode path\n"
20927 #: ../fish/guestfish-actions.pod:671
20932 #: ../fish/guestfish-actions.pod:673
20935 " chown owner group path\n"
20940 #: ../fish/guestfish-actions.pod:681
20945 #: ../fish/guestfish-actions.pod:683
20948 " command 'arguments ...'\n"
20953 #: ../fish/guestfish-actions.pod:690
20955 "The single parameter is an argv-style list of arguments. The first element "
20956 "is the name of the program to run. Subsequent elements are parameters. The "
20957 "list must be non-empty (ie. must contain a program name). Note that the "
20958 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
20962 #: ../fish/guestfish-actions.pod:718
20963 msgid "command-lines"
20967 #: ../fish/guestfish-actions.pod:720
20970 " command-lines 'arguments ...'\n"
20975 #: ../fish/guestfish-actions.pod:722
20976 msgid "This is the same as L</command>, but splits the result into a list of lines."
20980 #: ../fish/guestfish-actions.pod:725
20981 msgid "See also: L</sh-lines>"
20985 #: ../fish/guestfish-actions.pod:730
20990 #: ../fish/guestfish-actions.pod:732
20993 " config qemuparam qemuvalue\n"
20998 #: ../fish/guestfish-actions.pod:743
21003 #: ../fish/guestfish-actions.pod:745
21006 " copy-size src dest size\n"
21011 #: ../fish/guestfish-actions.pod:753
21016 #: ../fish/guestfish-actions.pod:755
21024 #: ../fish/guestfish-actions.pod:760
21029 #: ../fish/guestfish-actions.pod:762
21037 #: ../fish/guestfish-actions.pod:767
21042 #: ../fish/guestfish-actions.pod:769
21050 #: ../fish/guestfish-actions.pod:776
21052 "If the destination is a device, it must be as large or larger than the "
21053 "source file or device, otherwise the copy will fail. This command cannot do "
21054 "partial copies (see L</copy-size>)."
21058 #: ../fish/guestfish-actions.pod:780
21063 #: ../fish/guestfish-actions.pod:782
21071 #: ../fish/guestfish-actions.pod:786 ../fish/guestfish-actions.pod:797
21073 "This command is mostly useful for interactive sessions. It is I<not> "
21074 "intended that you try to parse the output string. Use L</statvfs> from "
21079 #: ../fish/guestfish-actions.pod:790
21084 #: ../fish/guestfish-actions.pod:792
21092 #: ../fish/guestfish-actions.pod:801
21097 #: ../fish/guestfish-actions.pod:803
21105 #: ../fish/guestfish-actions.pod:809
21107 "Another way to get the same information is to enable verbose messages with "
21108 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
21109 "before running the program."
21113 #: ../fish/guestfish-actions.pod:814
21118 #: ../fish/guestfish-actions.pod:816
21121 " download remotefilename (filename|-)\n"
21126 #: ../fish/guestfish-actions.pod:823
21127 msgid "See also L</upload>, L</cat>."
21131 #: ../fish/guestfish-actions.pod:827
21132 msgid "download-offset"
21136 #: ../fish/guestfish-actions.pod:829
21139 " download-offset remotefilename (filename|-) offset size\n"
21144 #: ../fish/guestfish-actions.pod:837
21146 "Note that there is no limit on the amount of data that can be downloaded "
21147 "with this call, unlike with L</pread>, and this call always reads the full "
21148 "amount unless an error occurs."
21152 #: ../fish/guestfish-actions.pod:842
21153 msgid "See also L</download>, L</pread>."
21157 #: ../fish/guestfish-actions.pod:846
21158 msgid "drop-caches"
21162 #: ../fish/guestfish-actions.pod:848
21165 " drop-caches whattodrop\n"
21170 #: ../fish/guestfish-actions.pod:860
21175 #: ../fish/guestfish-actions.pod:862
21183 #: ../fish/guestfish-actions.pod:874
21188 #: ../fish/guestfish-actions.pod:876
21191 " e2fsck-f device\n"
21196 #: ../fish/guestfish-actions.pod:882
21198 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
21199 "should use L</fsck>."
21203 #: ../fish/guestfish-actions.pod:885
21204 msgid "echo-daemon"
21208 #: ../fish/guestfish-actions.pod:887
21211 " echo-daemon 'words ...'\n"
21216 #: ../fish/guestfish-actions.pod:894
21217 msgid "See also L</ping-daemon>."
21221 #: ../fish/guestfish-actions.pod:896
21226 #: ../fish/guestfish-actions.pod:898
21229 " egrep regex path\n"
21234 #: ../fish/guestfish-actions.pod:906
21239 #: ../fish/guestfish-actions.pod:908
21242 " egrepi regex path\n"
21247 #: ../fish/guestfish-actions.pod:916
21252 #: ../fish/guestfish-actions.pod:918
21255 " equal file1 file2\n"
21260 #: ../fish/guestfish-actions.pod:925
21265 #: ../fish/guestfish-actions.pod:927
21273 #: ../fish/guestfish-actions.pod:932
21274 msgid "See also L</is-file>, L</is-dir>, L</stat>."
21278 #: ../fish/guestfish-actions.pod:934
21283 #: ../fish/guestfish-actions.pod:936
21286 " fallocate path len\n"
21291 #: ../fish/guestfish-actions.pod:953
21292 msgid "fallocate64"
21296 #: ../fish/guestfish-actions.pod:955
21299 " fallocate64 path len\n"
21304 #: ../fish/guestfish-actions.pod:961
21306 "Note that this call allocates disk blocks for the file. To create a sparse "
21307 "file use L</truncate-size> instead."
21311 #: ../fish/guestfish-actions.pod:964
21313 "The deprecated call L</fallocate> does the same, but owing to an oversight "
21314 "it only allowed 30 bit lengths to be specified, effectively limiting the "
21315 "maximum size of files created through that call to 1GB."
21319 #: ../fish/guestfish-actions.pod:973
21324 #: ../fish/guestfish-actions.pod:975
21327 " fgrep pattern path\n"
21332 #: ../fish/guestfish-actions.pod:983
21337 #: ../fish/guestfish-actions.pod:985
21340 " fgrepi pattern path\n"
21345 #: ../fish/guestfish-actions.pod:993
21350 #: ../fish/guestfish-actions.pod:995
21358 #: ../fish/guestfish-actions.pod:1007
21360 "This command can also be used on C</dev/> devices (and partitions, LV "
21361 "names). You can for example use this to determine if a device contains a "
21362 "filesystem, although it's usually better to use L</vfs-type>."
21366 #: ../fish/guestfish-actions.pod:1017
21367 msgid "file-architecture"
21371 #: ../fish/guestfish-actions.pod:1019
21374 " file-architecture filename\n"
21379 #: ../fish/guestfish-actions.pod:1122
21384 #: ../fish/guestfish-actions.pod:1124
21392 #: ../fish/guestfish-actions.pod:1128
21394 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, "
21395 "L</is-file> etc. To get the size of block devices, use "
21396 "L</blockdev-getsize64>."
21400 #: ../fish/guestfish-actions.pod:1132
21405 #: ../fish/guestfish-actions.pod:1134
21408 " fill c len path\n"
21413 #: ../fish/guestfish-actions.pod:1140
21415 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
21416 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
21417 "L</fill-pattern>."
21421 #: ../fish/guestfish-actions.pod:1145
21422 msgid "fill-pattern"
21426 #: ../fish/guestfish-actions.pod:1147
21429 " fill-pattern pattern len path\n"
21434 #: ../fish/guestfish-actions.pod:1149
21436 "This function is like L</fill> except that it creates a new file of length "
21437 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
21438 "is truncated if necessary to ensure the length of the file is exactly C<len> "
21443 #: ../fish/guestfish-actions.pod:1154
21448 #: ../fish/guestfish-actions.pod:1156
21451 " find directory\n"
21456 #: ../fish/guestfish-actions.pod:1170
21457 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
21461 #: ../fish/guestfish-actions.pod:1183
21462 msgid "See also L</find0>."
21466 #: ../fish/guestfish-actions.pod:1188
21471 #: ../fish/guestfish-actions.pod:1190
21474 " find0 directory (files|-)\n"
21479 #: ../fish/guestfish-actions.pod:1196
21480 msgid "This command works the same way as L</find> with the following exceptions:"
21484 #: ../fish/guestfish-actions.pod:1223
21485 msgid "findfs-label"
21489 #: ../fish/guestfish-actions.pod:1225
21492 " findfs-label label\n"
21497 #: ../fish/guestfish-actions.pod:1231
21498 msgid "To find the label of a filesystem, use L</vfs-label>."
21502 #: ../fish/guestfish-actions.pod:1233
21503 msgid "findfs-uuid"
21507 #: ../fish/guestfish-actions.pod:1235
21510 " findfs-uuid uuid\n"
21515 #: ../fish/guestfish-actions.pod:1241
21516 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
21520 #: ../fish/guestfish-actions.pod:1243
21525 #: ../fish/guestfish-actions.pod:1245
21528 " fsck fstype device\n"
21533 #: ../fish/guestfish-actions.pod:1275
21538 #: ../fish/guestfish-actions.pod:1277
21546 #: ../fish/guestfish-actions.pod:1284
21547 msgid "get-autosync"
21551 #: ../fish/guestfish-actions.pod:1286
21559 #: ../fish/guestfish-actions.pod:1290
21564 #: ../fish/guestfish-actions.pod:1292
21572 #: ../fish/guestfish-actions.pod:1296
21573 msgid "get-e2label"
21577 #: ../fish/guestfish-actions.pod:1298
21580 " get-e2label device\n"
21585 #: ../fish/guestfish-actions.pod:1310
21590 #: ../fish/guestfish-actions.pod:1312
21593 " get-e2uuid device\n"
21598 #: ../fish/guestfish-actions.pod:1324
21599 msgid "get-memsize"
21603 #: ../fish/guestfish-actions.pod:1326
21611 #: ../fish/guestfish-actions.pod:1331
21613 "If L</set-memsize> was not called on this handle, and if "
21614 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
21615 "value for memsize."
21619 #: ../fish/guestfish-actions.pod:1338
21620 msgid "get-network"
21624 #: ../fish/guestfish-actions.pod:1340
21632 #: ../fish/guestfish-actions.pod:1344
21637 #: ../fish/guestfish-actions.pod:1346
21645 #: ../fish/guestfish-actions.pod:1353
21650 #: ../fish/guestfish-actions.pod:1355
21655 #: ../fish/guestfish-actions.pod:1357
21663 #: ../fish/guestfish-actions.pod:1364
21668 #: ../fish/guestfish-actions.pod:1366
21676 #: ../fish/guestfish-actions.pod:1373
21677 msgid "get-recovery-proc"
21681 #: ../fish/guestfish-actions.pod:1375
21684 " get-recovery-proc\n"
21689 #: ../fish/guestfish-actions.pod:1379
21690 msgid "get-selinux"
21694 #: ../fish/guestfish-actions.pod:1381
21702 #: ../fish/guestfish-actions.pod:1383
21704 "This returns the current setting of the selinux flag which is passed to the "
21705 "appliance at boot time. See L</set-selinux>."
21709 #: ../fish/guestfish-actions.pod:1389
21714 #: ../fish/guestfish-actions.pod:1391
21722 #: ../fish/guestfish-actions.pod:1398
21727 #: ../fish/guestfish-actions.pod:1400
21735 #: ../fish/guestfish-actions.pod:1404
21740 #: ../fish/guestfish-actions.pod:1406
21748 #: ../fish/guestfish-actions.pod:1408
21750 "Return the current umask. By default the umask is C<022> unless it has been "
21751 "set by calling L</umask>."
21755 #: ../fish/guestfish-actions.pod:1411
21756 msgid "get-verbose"
21760 #: ../fish/guestfish-actions.pod:1413
21768 #: ../fish/guestfish-actions.pod:1417
21773 #: ../fish/guestfish-actions.pod:1419
21781 #: ../fish/guestfish-actions.pod:1423
21782 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
21786 #: ../fish/guestfish-actions.pod:1426
21791 #: ../fish/guestfish-actions.pod:1428
21794 " getxattr path name\n"
21799 #: ../fish/guestfish-actions.pod:1430
21801 "Get a single extended attribute from file C<path> named C<name>. This call "
21802 "follows symlinks. If you want to lookup an extended attribute for the "
21803 "symlink itself, use L</lgetxattr>."
21807 #: ../fish/guestfish-actions.pod:1434 ../fish/guestfish-actions.pod:2340
21809 "Normally it is better to get all extended attributes from a file in one go "
21810 "by calling L</getxattrs>. However some Linux filesystem implementations are "
21811 "buggy and do not provide a way to list out attributes. For these "
21812 "filesystems (notably ntfs-3g) you have to know the names of the extended "
21813 "attributes you want in advance and call this function."
21817 #: ../fish/guestfish-actions.pod:1444
21818 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
21822 #: ../fish/guestfish-actions.pod:1446
21827 #: ../fish/guestfish-actions.pod:1448
21830 " getxattrs path\n"
21835 #: ../fish/guestfish-actions.pod:1456
21836 msgid "See also: L</lgetxattrs>, L<attr(5)>."
21840 #: ../fish/guestfish-actions.pod:1458
21841 msgid "glob-expand"
21845 #: ../fish/guestfish-actions.pod:1460
21848 " glob-expand pattern\n"
21853 #: ../fish/guestfish-actions.pod:1473
21858 #: ../fish/guestfish-actions.pod:1475
21861 " grep regex path\n"
21866 #: ../fish/guestfish-actions.pod:1483
21871 #: ../fish/guestfish-actions.pod:1485
21874 " grepi regex path\n"
21879 #: ../fish/guestfish-actions.pod:1493
21880 msgid "grub-install"
21884 #: ../fish/guestfish-actions.pod:1495
21887 " grub-install root device\n"
21892 #: ../fish/guestfish-actions.pod:1511
21897 #: ../fish/guestfish-actions.pod:1513
21905 #: ../fish/guestfish-actions.pod:1521
21910 #: ../fish/guestfish-actions.pod:1523
21913 " head-n nrlines path\n"
21918 #: ../fish/guestfish-actions.pod:1536
21923 #: ../fish/guestfish-actions.pod:1538
21931 #: ../fish/guestfish-actions.pod:1546
21936 #: ../fish/guestfish-actions.pod:1548
21939 " initrd-cat initrdpath filename\n"
21944 #: ../fish/guestfish-actions.pod:1560
21945 msgid "See also L</initrd-list>."
21949 #: ../fish/guestfish-actions.pod:1565
21950 msgid "initrd-list"
21954 #: ../fish/guestfish-actions.pod:1567
21957 " initrd-list path\n"
21962 #: ../fish/guestfish-actions.pod:1579
21963 msgid "inotify-add-watch"
21967 #: ../fish/guestfish-actions.pod:1581
21970 " inotify-add-watch path mask\n"
21975 #: ../fish/guestfish-actions.pod:1593
21976 msgid "inotify-close"
21980 #: ../fish/guestfish-actions.pod:1595
21988 #: ../fish/guestfish-actions.pod:1601
21989 msgid "inotify-files"
21993 #: ../fish/guestfish-actions.pod:1603
22001 #: ../fish/guestfish-actions.pod:1605
22003 "This function is a helpful wrapper around L</inotify-read> which just "
22004 "returns a list of pathnames of objects that were touched. The returned "
22005 "pathnames are sorted and deduplicated."
22009 #: ../fish/guestfish-actions.pod:1609
22010 msgid "inotify-init"
22014 #: ../fish/guestfish-actions.pod:1611
22017 " inotify-init maxevents\n"
22022 #: ../fish/guestfish-actions.pod:1617
22024 "C<maxevents> is the maximum number of events which will be queued up between "
22025 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
22026 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
22027 "default was 16384 events. Beyond this limit, the kernel throws away events, "
22028 "but records the fact that it threw them away by setting a flag "
22029 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
22033 #: ../fish/guestfish-actions.pod:1627
22035 "Before any events are generated, you have to add some watches to the "
22036 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
22037 "L</inotify-watch-all>."
22041 #: ../fish/guestfish-actions.pod:1633
22043 "Queued up events should be read periodically by calling L</inotify-read> (or "
22044 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
22045 "If you don't read the events out often enough then you risk the internal "
22046 "queue overflowing."
22050 #: ../fish/guestfish-actions.pod:1640
22052 "The handle should be closed after use by calling L</inotify-close>. This "
22053 "also removes any watches automatically."
22057 #: ../fish/guestfish-actions.pod:1649
22058 msgid "inotify-read"
22062 #: ../fish/guestfish-actions.pod:1651
22070 #: ../fish/guestfish-actions.pod:1664
22071 msgid "inotify-rm-watch"
22075 #: ../fish/guestfish-actions.pod:1666
22078 " inotify-rm-watch wd\n"
22083 #: ../fish/guestfish-actions.pod:1668
22084 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
22088 #: ../fish/guestfish-actions.pod:1671
22089 msgid "inspect-get-arch"
22093 #: ../fish/guestfish-actions.pod:1673
22096 " inspect-get-arch root\n"
22101 #: ../fish/guestfish-actions.pod:1675 ../fish/guestfish-actions.pod:1691 ../fish/guestfish-actions.pod:1765 ../fish/guestfish-actions.pod:1783 ../fish/guestfish-actions.pod:1817 ../fish/guestfish-actions.pod:1832 ../fish/guestfish-actions.pod:1853 ../fish/guestfish-actions.pod:1868 ../fish/guestfish-actions.pod:1895 ../fish/guestfish-actions.pod:1917 ../fish/guestfish-actions.pod:1941 ../fish/guestfish-actions.pod:1971 ../fish/guestfish-actions.pod:2006 ../fish/guestfish-actions.pod:2022 ../fish/guestfish-actions.pod:2035 ../fish/guestfish-actions.pod:2048 ../fish/guestfish-actions.pod:2063
22103 "This function should only be called with a root device string as returned by "
22108 #: ../fish/guestfish-actions.pod:1678
22110 "This returns the architecture of the inspected operating system. The "
22111 "possible return values are listed under L</file-architecture>."
22115 #: ../fish/guestfish-actions.pod:1687
22116 msgid "inspect-get-distro"
22120 #: ../fish/guestfish-actions.pod:1689
22123 " inspect-get-distro root\n"
22128 #: ../fish/guestfish-actions.pod:1761
22129 msgid "inspect-get-filesystems"
22133 #: ../fish/guestfish-actions.pod:1763
22136 " inspect-get-filesystems root\n"
22141 #: ../fish/guestfish-actions.pod:1776
22143 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
22144 "L</inspect-get-mountpoints>."
22148 #: ../fish/guestfish-actions.pod:1779
22149 msgid "inspect-get-format"
22153 #: ../fish/guestfish-actions.pod:1781
22156 " inspect-get-format root\n"
22161 #: ../fish/guestfish-actions.pod:1813
22162 msgid "inspect-get-hostname"
22166 #: ../fish/guestfish-actions.pod:1815
22169 " inspect-get-hostname root\n"
22174 #: ../fish/guestfish-actions.pod:1828
22175 msgid "inspect-get-major-version"
22179 #: ../fish/guestfish-actions.pod:1830
22182 " inspect-get-major-version root\n"
22187 #: ../fish/guestfish-actions.pod:1849
22188 msgid "inspect-get-minor-version"
22192 #: ../fish/guestfish-actions.pod:1851
22195 " inspect-get-minor-version root\n"
22200 #: ../fish/guestfish-actions.pod:1861
22202 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
22203 "L</inspect-get-major-version>."
22207 #: ../fish/guestfish-actions.pod:1864
22208 msgid "inspect-get-mountpoints"
22212 #: ../fish/guestfish-actions.pod:1866
22215 " inspect-get-mountpoints root\n"
22220 #: ../fish/guestfish-actions.pod:1888
22222 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
22223 "L</inspect-get-filesystems>."
22227 #: ../fish/guestfish-actions.pod:1891
22228 msgid "inspect-get-package-format"
22232 #: ../fish/guestfish-actions.pod:1893
22235 " inspect-get-package-format root\n"
22240 #: ../fish/guestfish-actions.pod:1898
22242 "This function and L</inspect-get-package-management> return the package "
22243 "format and package management tool used by the inspected operating system. "
22244 "For example for Fedora these functions would return C<rpm> (package format) "
22245 "and C<yum> (package management)."
22249 #: ../fish/guestfish-actions.pod:1913
22250 msgid "inspect-get-package-management"
22254 #: ../fish/guestfish-actions.pod:1915
22257 " inspect-get-package-management root\n"
22262 #: ../fish/guestfish-actions.pod:1920
22264 "L</inspect-get-package-format> and this function return the package format "
22265 "and package management tool used by the inspected operating system. For "
22266 "example for Fedora these functions would return C<rpm> (package format) and "
22267 "C<yum> (package management)."
22271 #: ../fish/guestfish-actions.pod:1937
22272 msgid "inspect-get-product-name"
22276 #: ../fish/guestfish-actions.pod:1939
22279 " inspect-get-product-name root\n"
22284 #: ../fish/guestfish-actions.pod:1954
22285 msgid "inspect-get-roots"
22289 #: ../fish/guestfish-actions.pod:1956
22292 " inspect-get-roots\n"
22297 #: ../fish/guestfish-actions.pod:1958
22299 "This function is a convenient way to get the list of root devices, as "
22300 "returned from a previous call to L</inspect-os>, but without redoing the "
22301 "whole inspection process."
22305 #: ../fish/guestfish-actions.pod:1962
22307 "This returns an empty list if either no root devices were found or the "
22308 "caller has not called L</inspect-os>."
22312 #: ../fish/guestfish-actions.pod:1967
22313 msgid "inspect-get-type"
22317 #: ../fish/guestfish-actions.pod:1969
22320 " inspect-get-type root\n"
22325 #: ../fish/guestfish-actions.pod:2002
22326 msgid "inspect-get-windows-systemroot"
22330 #: ../fish/guestfish-actions.pod:2004
22333 " inspect-get-windows-systemroot root\n"
22338 #: ../fish/guestfish-actions.pod:2018
22339 msgid "inspect-is-live"
22343 #: ../fish/guestfish-actions.pod:2020
22346 " inspect-is-live root\n"
22351 #: ../fish/guestfish-actions.pod:2025
22353 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
22354 "then this returns true if a live image was detected on the disk."
22358 #: ../fish/guestfish-actions.pod:2031
22359 msgid "inspect-is-multipart"
22363 #: ../fish/guestfish-actions.pod:2033
22366 " inspect-is-multipart root\n"
22371 #: ../fish/guestfish-actions.pod:2038
22373 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
22374 "then this returns true if the disk is part of a set."
22378 #: ../fish/guestfish-actions.pod:2044
22379 msgid "inspect-is-netinst"
22383 #: ../fish/guestfish-actions.pod:2046
22386 " inspect-is-netinst root\n"
22391 #: ../fish/guestfish-actions.pod:2051
22393 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
22394 "then this returns true if the disk is a network installer, ie. not a "
22395 "self-contained install CD but one which is likely to require network access "
22396 "to complete the install."
22400 #: ../fish/guestfish-actions.pod:2059
22401 msgid "inspect-list-applications"
22405 #: ../fish/guestfish-actions.pod:2061
22408 " inspect-list-applications root\n"
22413 #: ../fish/guestfish-actions.pod:2068
22415 "I<Note:> This call works differently from other parts of the inspection "
22416 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
22417 "then mount up the disks, before calling this. Listing applications is a "
22418 "significantly more difficult operation which requires access to the full "
22419 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
22420 "are just returning data cached in the libguestfs handle, this call actually "
22421 "reads parts of the mounted filesystems during the call."
22425 #: ../fish/guestfish-actions.pod:2158
22430 #: ../fish/guestfish-actions.pod:2160
22438 #: ../fish/guestfish-actions.pod:2175
22440 "You can pass the root string(s) returned to other L</inspect-get-*> "
22441 "functions in order to query further information about each operating system, "
22442 "such as the name and version."
22446 #: ../fish/guestfish-actions.pod:2180
22448 "This function uses other libguestfs features such as L</mount-ro> and "
22449 "L</umount-all> in order to mount and unmount filesystems and look at the "
22450 "contents. This should be called with no disks currently mounted. The "
22451 "function may also use Augeas, so any existing Augeas handle will be closed."
22455 #: ../fish/guestfish-actions.pod:2192 ../fish/guestfish-actions.pod:2368 ../fish/guestfish-actions.pod:2414
22456 msgid "See also L</list-filesystems>."
22460 #: ../fish/guestfish-actions.pod:2194
22461 msgid "is-blockdev"
22465 #: ../fish/guestfish-actions.pod:2196
22468 " is-blockdev path\n"
22473 #: ../fish/guestfish-actions.pod:2201 ../fish/guestfish-actions.pod:2219 ../fish/guestfish-actions.pod:2238 ../fish/guestfish-actions.pod:2247 ../fish/guestfish-actions.pod:2257 ../fish/guestfish-actions.pod:2291 ../fish/guestfish-actions.pod:2300
22474 msgid "See also L</stat>."
22478 #: ../fish/guestfish-actions.pod:2203
22483 #: ../fish/guestfish-actions.pod:2205
22491 #: ../fish/guestfish-actions.pod:2212
22496 #: ../fish/guestfish-actions.pod:2214
22499 " is-chardev path\n"
22504 #: ../fish/guestfish-actions.pod:2221
22509 #: ../fish/guestfish-actions.pod:2223
22517 #: ../fish/guestfish-actions.pod:2230
22522 #: ../fish/guestfish-actions.pod:2232
22530 #: ../fish/guestfish-actions.pod:2240
22535 #: ../fish/guestfish-actions.pod:2242
22543 #: ../fish/guestfish-actions.pod:2249
22548 #: ../fish/guestfish-actions.pod:2251
22556 #: ../fish/guestfish-actions.pod:2259
22557 msgid "is-launching"
22561 #: ../fish/guestfish-actions.pod:2261
22569 #: ../fish/guestfish-actions.pod:2268
22574 #: ../fish/guestfish-actions.pod:2270
22582 #: ../fish/guestfish-actions.pod:2275
22587 #: ../fish/guestfish-actions.pod:2277
22595 #: ../fish/guestfish-actions.pod:2284
22600 #: ../fish/guestfish-actions.pod:2286
22603 " is-socket path\n"
22608 #: ../fish/guestfish-actions.pod:2293
22613 #: ../fish/guestfish-actions.pod:2295
22616 " is-symlink path\n"
22621 #: ../fish/guestfish-actions.pod:2302
22622 msgid "kill-subprocess"
22626 #: ../fish/guestfish-actions.pod:2304
22629 " kill-subprocess\n"
22634 #: ../fish/guestfish-actions.pod:2308
22639 #: ../fish/guestfish-actions.pod:2310
22644 #: ../fish/guestfish-actions.pod:2312
22652 #: ../fish/guestfish-actions.pod:2320
22657 #: ../fish/guestfish-actions.pod:2322
22660 " lchown owner group path\n"
22665 #: ../fish/guestfish-actions.pod:2324
22667 "Change the file owner to C<owner> and group to C<group>. This is like "
22668 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
22673 #: ../fish/guestfish-actions.pod:2332
22678 #: ../fish/guestfish-actions.pod:2334
22681 " lgetxattr path name\n"
22686 #: ../fish/guestfish-actions.pod:2350
22687 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
22691 #: ../fish/guestfish-actions.pod:2352
22696 #: ../fish/guestfish-actions.pod:2354
22699 " lgetxattrs path\n"
22704 #: ../fish/guestfish-actions.pod:2356
22706 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
22707 "it returns the extended attributes of the link itself."
22711 #: ../fish/guestfish-actions.pod:2360
22712 msgid "list-devices"
22716 #: ../fish/guestfish-actions.pod:2362
22724 #: ../fish/guestfish-actions.pod:2370
22725 msgid "list-filesystems"
22729 #: ../fish/guestfish-actions.pod:2372
22732 " list-filesystems\n"
22737 #: ../fish/guestfish-actions.pod:2391
22739 "This command runs other libguestfs commands, which might include L</mount> "
22740 "and L</umount>, and therefore you should use this soon after launch and only "
22741 "when nothing is mounted."
22745 #: ../fish/guestfish-actions.pod:2395
22747 "Not all of the filesystems returned will be mountable. In particular, swap "
22748 "partitions are returned in the list. Also this command does not check that "
22749 "each filesystem found is valid and mountable, and some filesystems might be "
22750 "mountable but require special options. Filesystems may not all belong to a "
22751 "single logical operating system (use L</inspect-os> to look for OSes)."
22755 #: ../fish/guestfish-actions.pod:2403
22756 msgid "list-partitions"
22760 #: ../fish/guestfish-actions.pod:2405
22763 " list-partitions\n"
22768 #: ../fish/guestfish-actions.pod:2411
22770 "This does not return logical volumes. For that you will need to call "
22775 #: ../fish/guestfish-actions.pod:2416
22780 #: ../fish/guestfish-actions.pod:2418
22788 #: ../fish/guestfish-actions.pod:2426
22793 #: ../fish/guestfish-actions.pod:2428
22796 " ln target linkname\n"
22801 #: ../fish/guestfish-actions.pod:2432
22806 #: ../fish/guestfish-actions.pod:2434
22809 " ln-f target linkname\n"
22814 #: ../fish/guestfish-actions.pod:2439
22819 #: ../fish/guestfish-actions.pod:2441
22822 " ln-s target linkname\n"
22827 #: ../fish/guestfish-actions.pod:2445
22832 #: ../fish/guestfish-actions.pod:2447
22835 " ln-sf target linkname\n"
22840 #: ../fish/guestfish-actions.pod:2452
22841 msgid "lremovexattr"
22845 #: ../fish/guestfish-actions.pod:2454
22848 " lremovexattr xattr path\n"
22853 #: ../fish/guestfish-actions.pod:2456
22855 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
22856 "it removes an extended attribute of the link itself."
22860 #: ../fish/guestfish-actions.pod:2460
22865 #: ../fish/guestfish-actions.pod:2462
22873 #: ../fish/guestfish-actions.pod:2468
22875 "This command is mostly useful for interactive sessions. Programs should "
22876 "probably use L</readdir> instead."
22880 #: ../fish/guestfish-actions.pod:2471
22885 #: ../fish/guestfish-actions.pod:2473
22888 " lsetxattr xattr val vallen path\n"
22893 #: ../fish/guestfish-actions.pod:2475
22895 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
22896 "sets an extended attribute of the link itself."
22900 #: ../fish/guestfish-actions.pod:2479
22905 #: ../fish/guestfish-actions.pod:2481
22913 #: ../fish/guestfish-actions.pod:2485
22915 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
22916 "the link is stat-ed, not the file it refers to."
22920 #: ../fish/guestfish-actions.pod:2491
22925 #: ../fish/guestfish-actions.pod:2493
22928 " lstatlist path 'names ...'\n"
22933 #: ../fish/guestfish-actions.pod:2495
22935 "This call allows you to perform the L</lstat> operation on multiple files, "
22936 "where all files are in the directory C<path>. C<names> is the list of files "
22937 "from this directory."
22941 #: ../fish/guestfish-actions.pod:2504
22943 "This call is intended for programs that want to efficiently list a directory "
22944 "contents without making many round-trips. See also L</lxattrlist> for a "
22945 "similarly efficient call for getting extended attributes. Very long "
22946 "directory listings might cause the protocol message size to be exceeded, "
22947 "causing this call to fail. The caller must split up such requests into "
22948 "smaller groups of names."
22952 #: ../fish/guestfish-actions.pod:2512
22953 msgid "luks-add-key"
22957 #: ../fish/guestfish-actions.pod:2514
22960 " luks-add-key device keyslot\n"
22965 #: ../fish/guestfish-actions.pod:2521
22967 "Note that if C<keyslot> already contains a key, then this command will "
22968 "fail. You have to use L</luks-kill-slot> first to remove that key."
22972 #: ../fish/guestfish-actions.pod:2525 ../fish/guestfish-actions.pod:2547 ../fish/guestfish-actions.pod:2560 ../fish/guestfish-actions.pod:2574 ../fish/guestfish-actions.pod:2597 ../fish/guestfish-actions.pod:2607
22974 "This command has one or more key or passphrase parameters. Guestfish will "
22975 "prompt for these separately."
22979 #: ../fish/guestfish-actions.pod:2528
22984 #: ../fish/guestfish-actions.pod:2530
22987 " luks-close device\n"
22992 #: ../fish/guestfish-actions.pod:2532
22994 "This closes a LUKS device that was created earlier by L</luks-open> or "
22995 "L</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
22996 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
22997 "underlying block device."
23001 #: ../fish/guestfish-actions.pod:2538
23002 msgid "luks-format"
23006 #: ../fish/guestfish-actions.pod:2540
23009 " luks-format device keyslot\n"
23014 #: ../fish/guestfish-actions.pod:2553
23015 msgid "luks-format-cipher"
23019 #: ../fish/guestfish-actions.pod:2555
23022 " luks-format-cipher device keyslot cipher\n"
23027 #: ../fish/guestfish-actions.pod:2557
23029 "This command is the same as L</luks-format> but it also allows you to set "
23030 "the C<cipher> used."
23034 #: ../fish/guestfish-actions.pod:2566
23035 msgid "luks-kill-slot"
23039 #: ../fish/guestfish-actions.pod:2568
23042 " luks-kill-slot device keyslot\n"
23047 #: ../fish/guestfish-actions.pod:2577
23052 #: ../fish/guestfish-actions.pod:2579
23055 " luks-open device mapname\n"
23060 #: ../fish/guestfish-actions.pod:2593
23062 "If this block device contains LVM volume groups, then calling L</vgscan> "
23063 "followed by L</vg-activate-all> will make them visible."
23067 #: ../fish/guestfish-actions.pod:2600
23068 msgid "luks-open-ro"
23072 #: ../fish/guestfish-actions.pod:2602
23075 " luks-open-ro device mapname\n"
23080 #: ../fish/guestfish-actions.pod:2604
23082 "This is the same as L</luks-open> except that a read-only mapping is "
23087 #: ../fish/guestfish-actions.pod:2610
23092 #: ../fish/guestfish-actions.pod:2612
23095 " lvcreate logvol volgroup mbytes\n"
23100 #: ../fish/guestfish-actions.pod:2617
23101 msgid "lvm-canonical-lv-name"
23105 #: ../fish/guestfish-actions.pod:2619
23108 " lvm-canonical-lv-name lvname\n"
23113 #: ../fish/guestfish-actions.pod:2628
23114 msgid "See also L</is-lv>."
23118 #: ../fish/guestfish-actions.pod:2630
23119 msgid "lvm-clear-filter"
23123 #: ../fish/guestfish-actions.pod:2632
23126 " lvm-clear-filter\n"
23131 #: ../fish/guestfish-actions.pod:2634
23133 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
23138 #: ../fish/guestfish-actions.pod:2640
23139 msgid "lvm-remove-all"
23143 #: ../fish/guestfish-actions.pod:2642
23146 " lvm-remove-all\n"
23151 #: ../fish/guestfish-actions.pod:2650
23152 msgid "lvm-set-filter"
23156 #: ../fish/guestfish-actions.pod:2652
23159 " lvm-set-filter 'devices ...'\n"
23164 #: ../fish/guestfish-actions.pod:2677
23169 #: ../fish/guestfish-actions.pod:2679
23172 " lvremove device\n"
23177 #: ../fish/guestfish-actions.pod:2687
23182 #: ../fish/guestfish-actions.pod:2689
23185 " lvrename logvol newlogvol\n"
23190 #: ../fish/guestfish-actions.pod:2693
23195 #: ../fish/guestfish-actions.pod:2695
23198 " lvresize device mbytes\n"
23203 #: ../fish/guestfish-actions.pod:2701
23204 msgid "lvresize-free"
23208 #: ../fish/guestfish-actions.pod:2703
23211 " lvresize-free lv percent\n"
23216 #: ../fish/guestfish-actions.pod:2711
23221 #: ../fish/guestfish-actions.pod:2713
23229 #: ../fish/guestfish-actions.pod:2721
23230 msgid "See also L</lvs-full>, L</list-filesystems>."
23234 #: ../fish/guestfish-actions.pod:2723
23239 #: ../fish/guestfish-actions.pod:2725
23247 #: ../fish/guestfish-actions.pod:2730
23252 #: ../fish/guestfish-actions.pod:2732
23260 #: ../fish/guestfish-actions.pod:2736
23265 #: ../fish/guestfish-actions.pod:2738
23268 " lxattrlist path 'names ...'\n"
23273 #: ../fish/guestfish-actions.pod:2754
23275 "This call is intended for programs that want to efficiently list a directory "
23276 "contents without making many round-trips. See also L</lstatlist> for a "
23277 "similarly efficient call for getting standard stats. Very long directory "
23278 "listings might cause the protocol message size to be exceeded, causing this "
23279 "call to fail. The caller must split up such requests into smaller groups of "
23284 #: ../fish/guestfish-actions.pod:2762
23289 #: ../fish/guestfish-actions.pod:2764
23297 #: ../fish/guestfish-actions.pod:2768
23302 #: ../fish/guestfish-actions.pod:2770
23305 " mkdir-mode path mode\n"
23310 #: ../fish/guestfish-actions.pod:2779
23311 msgid "See also L</mkdir>, L</umask>"
23315 #: ../fish/guestfish-actions.pod:2781
23320 #: ../fish/guestfish-actions.pod:2783
23328 #: ../fish/guestfish-actions.pod:2788
23333 #: ../fish/guestfish-actions.pod:2790
23336 " mkdtemp template\n"
23341 #: ../fish/guestfish-actions.pod:2811
23346 #: ../fish/guestfish-actions.pod:2813
23349 " mke2fs-J fstype blocksize device journal\n"
23354 #: ../fish/guestfish-actions.pod:2821
23355 msgid "See also L</mke2journal>."
23359 #: ../fish/guestfish-actions.pod:2823
23364 #: ../fish/guestfish-actions.pod:2825
23367 " mke2fs-JL fstype blocksize device label\n"
23372 #: ../fish/guestfish-actions.pod:2830
23373 msgid "See also L</mke2journal-L>."
23377 #: ../fish/guestfish-actions.pod:2832
23382 #: ../fish/guestfish-actions.pod:2834
23385 " mke2fs-JU fstype blocksize device uuid\n"
23390 #: ../fish/guestfish-actions.pod:2839
23391 msgid "See also L</mke2journal-U>."
23395 #: ../fish/guestfish-actions.pod:2841
23396 msgid "mke2journal"
23400 #: ../fish/guestfish-actions.pod:2843
23403 " mke2journal blocksize device\n"
23408 #: ../fish/guestfish-actions.pod:2850
23409 msgid "mke2journal-L"
23413 #: ../fish/guestfish-actions.pod:2852
23416 " mke2journal-L blocksize label device\n"
23421 #: ../fish/guestfish-actions.pod:2856
23422 msgid "mke2journal-U"
23426 #: ../fish/guestfish-actions.pod:2858
23429 " mke2journal-U blocksize uuid device\n"
23434 #: ../fish/guestfish-actions.pod:2862
23439 #: ../fish/guestfish-actions.pod:2864
23442 " mkfifo mode path\n"
23447 #: ../fish/guestfish-actions.pod:2866
23449 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
23450 "is just a convenient wrapper around L</mknod>."
23454 #: ../fish/guestfish-actions.pod:2872
23459 #: ../fish/guestfish-actions.pod:2874
23462 " mkfs fstype device\n"
23467 #: ../fish/guestfish-actions.pod:2880
23472 #: ../fish/guestfish-actions.pod:2882
23475 " mkfs-b fstype blocksize device\n"
23480 #: ../fish/guestfish-actions.pod:2884
23482 "This call is similar to L</mkfs>, but it allows you to control the block "
23483 "size of the resulting filesystem. Supported block sizes depend on the "
23484 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
23488 #: ../fish/guestfish-actions.pod:2899
23493 #: ../fish/guestfish-actions.pod:2901
23496 " mkfs-opts fstype device [blocksize:..]\n"
23501 #: ../fish/guestfish-actions.pod:2923
23502 msgid "mkmountpoint"
23506 #: ../fish/guestfish-actions.pod:2925
23509 " mkmountpoint exemptpath\n"
23514 #: ../fish/guestfish-actions.pod:2927
23516 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
23517 "to create extra mountpoints before mounting the first filesystem."
23521 #: ../fish/guestfish-actions.pod:2951
23523 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
23524 "unexpected errors if you try to mix these calls. It is safest to manually "
23525 "unmount filesystems and remove mountpoints after use."
23529 #: ../fish/guestfish-actions.pod:2955
23531 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
23532 "for this to work for manual mountpoints, you must ensure that the innermost "
23533 "mountpoints have the longest pathnames, as in the example code above."
23537 #: ../fish/guestfish-actions.pod:2962
23539 "Autosync [see L</set-autosync>, this is set by default on handles] means "
23540 "that L</umount-all> is called when the handle is closed which can also "
23541 "trigger these issues."
23545 #: ../fish/guestfish-actions.pod:2966
23550 #: ../fish/guestfish-actions.pod:2968
23553 " mknod mode devmajor devminor path\n"
23558 #: ../fish/guestfish-actions.pod:2978
23560 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
23561 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
23562 "regular file). These constants are available in the standard Linux header "
23563 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
23564 "wrappers around this command which bitwise OR in the appropriate constant "
23569 #: ../fish/guestfish-actions.pod:2988
23574 #: ../fish/guestfish-actions.pod:2990
23577 " mknod-b mode devmajor devminor path\n"
23582 #: ../fish/guestfish-actions.pod:2992
23584 "This call creates a block device node called C<path> with mode C<mode> and "
23585 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
23586 "wrapper around L</mknod>."
23590 #: ../fish/guestfish-actions.pod:2998
23595 #: ../fish/guestfish-actions.pod:3000
23598 " mknod-c mode devmajor devminor path\n"
23603 #: ../fish/guestfish-actions.pod:3002
23605 "This call creates a char device node called C<path> with mode C<mode> and "
23606 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
23607 "wrapper around L</mknod>."
23611 #: ../fish/guestfish-actions.pod:3008
23616 #: ../fish/guestfish-actions.pod:3010
23624 #: ../fish/guestfish-actions.pod:3014
23629 #: ../fish/guestfish-actions.pod:3016
23632 " mkswap-L label device\n"
23637 #: ../fish/guestfish-actions.pod:3024
23642 #: ../fish/guestfish-actions.pod:3026
23645 " mkswap-U uuid device\n"
23650 #: ../fish/guestfish-actions.pod:3030
23651 msgid "mkswap-file"
23655 #: ../fish/guestfish-actions.pod:3032
23658 " mkswap-file path\n"
23663 #: ../fish/guestfish-actions.pod:3036
23665 "This command just writes a swap file signature to an existing file. To "
23666 "create the file itself, use something like L</fallocate>."
23670 #: ../fish/guestfish-actions.pod:3039
23675 #: ../fish/guestfish-actions.pod:3041
23678 " modprobe modulename\n"
23683 #: ../fish/guestfish-actions.pod:3048
23688 #: ../fish/guestfish-actions.pod:3050
23691 " mount device mountpoint\n"
23696 #: ../fish/guestfish-actions.pod:3066
23698 "B<Important note:> When you use this call, the filesystem options C<sync> "
23699 "and C<noatime> are set implicitly. This was originally done because we "
23700 "thought it would improve reliability, but it turns out that I<-o sync> has a "
23701 "very large negative performance impact and negligible effect on "
23702 "reliability. Therefore we recommend that you avoid using L</mount> in any "
23703 "code that needs performance, and instead use L</mount-options> (use an empty "
23704 "string for the first parameter if you don't want any options)."
23708 #: ../fish/guestfish-actions.pod:3076
23713 #: ../fish/guestfish-actions.pod:3078
23716 " mount-loop file mountpoint\n"
23721 #: ../fish/guestfish-actions.pod:3084
23722 msgid "mount-options"
23726 #: ../fish/guestfish-actions.pod:3086
23729 " mount-options options device mountpoint\n"
23734 #: ../fish/guestfish-actions.pod:3088
23736 "This is the same as the L</mount> command, but it allows you to set the "
23737 "mount options as for the L<mount(8)> I<-o> flag."
23741 #: ../fish/guestfish-actions.pod:3096
23746 #: ../fish/guestfish-actions.pod:3098
23749 " mount-ro device mountpoint\n"
23754 #: ../fish/guestfish-actions.pod:3100
23756 "This is the same as the L</mount> command, but it mounts the filesystem with "
23757 "the read-only (I<-o ro>) flag."
23761 #: ../fish/guestfish-actions.pod:3103
23766 #: ../fish/guestfish-actions.pod:3105
23769 " mount-vfs options vfstype device mountpoint\n"
23774 #: ../fish/guestfish-actions.pod:3107
23776 "This is the same as the L</mount> command, but it allows you to set both the "
23777 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
23781 #: ../fish/guestfish-actions.pod:3111
23782 msgid "mountpoints"
23786 #: ../fish/guestfish-actions.pod:3113
23794 #: ../fish/guestfish-actions.pod:3115
23796 "This call is similar to L</mounts>. That call returns a list of devices. "
23797 "This one returns a hash table (map) of device name to directory where the "
23798 "device is mounted."
23802 #: ../fish/guestfish-actions.pod:3119
23807 #: ../fish/guestfish-actions.pod:3121
23815 #: ../fish/guestfish-actions.pod:3128
23816 msgid "See also: L</mountpoints>"
23820 #: ../fish/guestfish-actions.pod:3130
23825 #: ../fish/guestfish-actions.pod:3132
23833 #: ../fish/guestfish-actions.pod:3137
23834 msgid "ntfs-3g-probe"
23838 #: ../fish/guestfish-actions.pod:3139
23841 " ntfs-3g-probe true|false device\n"
23846 #: ../fish/guestfish-actions.pod:3153
23851 #: ../fish/guestfish-actions.pod:3155
23854 " ntfsresize device\n"
23859 #: ../fish/guestfish-actions.pod:3161
23860 msgid "ntfsresize-size"
23864 #: ../fish/guestfish-actions.pod:3163
23867 " ntfsresize-size device size\n"
23872 #: ../fish/guestfish-actions.pod:3165
23874 "This command is the same as L</ntfsresize> except that it allows you to "
23875 "specify the new size (in bytes) explicitly."
23879 #: ../fish/guestfish-actions.pod:3168
23884 #: ../fish/guestfish-actions.pod:3170
23887 " part-add device prlogex startsect endsect\n"
23892 #: ../fish/guestfish-actions.pod:3172
23894 "This command adds a partition to C<device>. If there is no partition table "
23895 "on the device, call L</part-init> first."
23899 #: ../fish/guestfish-actions.pod:3184
23901 "Creating a partition which covers the whole disk is not so easy. Use "
23902 "L</part-disk> to do that."
23906 #: ../fish/guestfish-actions.pod:3187
23911 #: ../fish/guestfish-actions.pod:3189
23914 " part-del device partnum\n"
23919 #: ../fish/guestfish-actions.pod:3197
23924 #: ../fish/guestfish-actions.pod:3199
23927 " part-disk device parttype\n"
23932 #: ../fish/guestfish-actions.pod:3201
23934 "This command is simply a combination of L</part-init> followed by "
23935 "L</part-add> to create a single primary partition covering the whole disk."
23939 #: ../fish/guestfish-actions.pod:3205
23941 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
23942 "possible values are described in L</part-init>."
23946 #: ../fish/guestfish-actions.pod:3211
23947 msgid "part-get-bootable"
23951 #: ../fish/guestfish-actions.pod:3213
23954 " part-get-bootable device partnum\n"
23959 #: ../fish/guestfish-actions.pod:3218
23960 msgid "See also L</part-set-bootable>."
23964 #: ../fish/guestfish-actions.pod:3220
23965 msgid "part-get-mbr-id"
23969 #: ../fish/guestfish-actions.pod:3222
23972 " part-get-mbr-id device partnum\n"
23977 #: ../fish/guestfish-actions.pod:3227 ../fish/guestfish-actions.pod:3365
23979 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
23980 "undefined results for other partition table types (see "
23981 "L</part-get-parttype>)."
23985 #: ../fish/guestfish-actions.pod:3231
23986 msgid "part-get-parttype"
23990 #: ../fish/guestfish-actions.pod:3233
23993 " part-get-parttype device\n"
23998 #: ../fish/guestfish-actions.pod:3238
24000 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
24001 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
24002 "possible, although unusual. See L</part-init> for a full list."
24006 #: ../fish/guestfish-actions.pod:3243
24011 #: ../fish/guestfish-actions.pod:3245
24014 " part-init device parttype\n"
24019 #: ../fish/guestfish-actions.pod:3251
24021 "Initially there are no partitions. Following this, you should call "
24022 "L</part-add> for each partition required."
24026 #: ../fish/guestfish-actions.pod:3314
24031 #: ../fish/guestfish-actions.pod:3316
24034 " part-list device\n"
24039 #: ../fish/guestfish-actions.pod:3331
24041 "Start of the partition I<in bytes>. To get sectors you have to divide by "
24042 "the device's sector size, see L</blockdev-getss>."
24046 #: ../fish/guestfish-actions.pod:3344
24047 msgid "part-set-bootable"
24051 #: ../fish/guestfish-actions.pod:3346
24054 " part-set-bootable device partnum true|false\n"
24059 #: ../fish/guestfish-actions.pod:3355
24060 msgid "part-set-mbr-id"
24064 #: ../fish/guestfish-actions.pod:3357
24067 " part-set-mbr-id device partnum idbyte\n"
24072 #: ../fish/guestfish-actions.pod:3369
24073 msgid "part-set-name"
24077 #: ../fish/guestfish-actions.pod:3371
24080 " part-set-name device partnum name\n"
24085 #: ../fish/guestfish-actions.pod:3379
24086 msgid "part-to-dev"
24090 #: ../fish/guestfish-actions.pod:3381
24093 " part-to-dev partition\n"
24098 #: ../fish/guestfish-actions.pod:3387
24100 "The named partition must exist, for example as a string returned from "
24101 "L</list-partitions>."
24105 #: ../fish/guestfish-actions.pod:3390
24106 msgid "ping-daemon"
24110 #: ../fish/guestfish-actions.pod:3392
24118 #: ../fish/guestfish-actions.pod:3399
24123 #: ../fish/guestfish-actions.pod:3401
24126 " pread path count offset\n"
24131 #: ../fish/guestfish-actions.pod:3409
24132 msgid "See also L</pwrite>, L</pread-device>."
24136 #: ../fish/guestfish-actions.pod:3414
24137 msgid "pread-device"
24141 #: ../fish/guestfish-actions.pod:3416
24144 " pread-device device count offset\n"
24149 #: ../fish/guestfish-actions.pod:3424
24150 msgid "See also L</pread>."
24154 #: ../fish/guestfish-actions.pod:3429
24159 #: ../fish/guestfish-actions.pod:3431
24162 " pvcreate device\n"
24167 #: ../fish/guestfish-actions.pod:3437
24172 #: ../fish/guestfish-actions.pod:3439
24175 " pvremove device\n"
24180 #: ../fish/guestfish-actions.pod:3448
24185 #: ../fish/guestfish-actions.pod:3450
24188 " pvresize device\n"
24193 #: ../fish/guestfish-actions.pod:3455
24194 msgid "pvresize-size"
24198 #: ../fish/guestfish-actions.pod:3457
24201 " pvresize-size device size\n"
24206 #: ../fish/guestfish-actions.pod:3459
24208 "This command is the same as L</pvresize> except that it allows you to "
24209 "specify the new size (in bytes) explicitly."
24213 #: ../fish/guestfish-actions.pod:3462
24218 #: ../fish/guestfish-actions.pod:3464
24226 #: ../fish/guestfish-actions.pod:3472
24227 msgid "See also L</pvs-full>."
24231 #: ../fish/guestfish-actions.pod:3474
24236 #: ../fish/guestfish-actions.pod:3476
24244 #: ../fish/guestfish-actions.pod:3481
24249 #: ../fish/guestfish-actions.pod:3483
24257 #: ../fish/guestfish-actions.pod:3487
24262 #: ../fish/guestfish-actions.pod:3489
24265 " pwrite path content offset\n"
24270 #: ../fish/guestfish-actions.pod:3500
24271 msgid "See also L</pread>, L</pwrite-device>."
24275 #: ../fish/guestfish-actions.pod:3505
24276 msgid "pwrite-device"
24280 #: ../fish/guestfish-actions.pod:3507
24283 " pwrite-device device content offset\n"
24288 #: ../fish/guestfish-actions.pod:3517
24289 msgid "See also L</pwrite>."
24293 #: ../fish/guestfish-actions.pod:3522
24298 #: ../fish/guestfish-actions.pod:3524
24301 " read-file path\n"
24306 #: ../fish/guestfish-actions.pod:3529
24308 "Unlike L</cat>, this function can correctly handle files that contain "
24309 "embedded ASCII NUL characters. However unlike L</download>, this function "
24310 "is limited in the total size of file that can be handled."
24314 #: ../fish/guestfish-actions.pod:3537
24319 #: ../fish/guestfish-actions.pod:3539
24322 " read-lines path\n"
24327 #: ../fish/guestfish-actions.pod:3546
24329 "Note that this function cannot correctly handle binary files (specifically, "
24330 "files containing C<\\0> character which is treated as end of line). For "
24331 "those you need to use the L</read-file> function which has a more complex "
24336 #: ../fish/guestfish-actions.pod:3551
24341 #: ../fish/guestfish-actions.pod:3553
24349 #: ../fish/guestfish-actions.pod:3605
24351 "This function is primarily intended for use by programs. To get a simple "
24352 "list of names, use L</ls>. To get a printable directory for human "
24353 "consumption, use L</ll>."
24357 #: ../fish/guestfish-actions.pod:3609
24362 #: ../fish/guestfish-actions.pod:3611
24370 #: ../fish/guestfish-actions.pod:3615
24371 msgid "readlinklist"
24375 #: ../fish/guestfish-actions.pod:3617
24378 " readlinklist path 'names ...'\n"
24383 #: ../fish/guestfish-actions.pod:3641
24388 #: ../fish/guestfish-actions.pod:3643
24396 #: ../fish/guestfish-actions.pod:3648
24397 msgid "removexattr"
24401 #: ../fish/guestfish-actions.pod:3650
24404 " removexattr xattr path\n"
24409 #: ../fish/guestfish-actions.pod:3655
24410 msgid "See also: L</lremovexattr>, L<attr(5)>."
24414 #: ../fish/guestfish-actions.pod:3657
24419 #: ../fish/guestfish-actions.pod:3659
24422 " resize2fs device\n"
24427 #: ../fish/guestfish-actions.pod:3664
24429 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
24430 "before calling this command. For unknown reasons C<resize2fs> sometimes "
24431 "gives an error about this and sometimes not. In any case, it is always safe "
24432 "to call L</e2fsck-f> before calling this function."
24436 #: ../fish/guestfish-actions.pod:3670
24437 msgid "resize2fs-M"
24441 #: ../fish/guestfish-actions.pod:3672
24444 " resize2fs-M device\n"
24449 #: ../fish/guestfish-actions.pod:3674
24451 "This command is the same as L</resize2fs>, but the filesystem is resized to "
24452 "its minimum size. This works like the C<-M> option to the C<resize2fs> "
24457 #: ../fish/guestfish-actions.pod:3678
24459 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
24460 "and read the C<Block size> and C<Block count> values. These two numbers, "
24461 "multiplied together, give the resulting size of the minimal filesystem in "
24466 #: ../fish/guestfish-actions.pod:3683
24467 msgid "resize2fs-size"
24471 #: ../fish/guestfish-actions.pod:3685
24474 " resize2fs-size device size\n"
24479 #: ../fish/guestfish-actions.pod:3687
24481 "This command is the same as L</resize2fs> except that it allows you to "
24482 "specify the new size (in bytes) explicitly."
24486 #: ../fish/guestfish-actions.pod:3690
24491 #: ../fish/guestfish-actions.pod:3692
24499 #: ../fish/guestfish-actions.pod:3696
24504 #: ../fish/guestfish-actions.pod:3698
24512 #: ../fish/guestfish-actions.pod:3704
24517 #: ../fish/guestfish-actions.pod:3706
24525 #: ../fish/guestfish-actions.pod:3710
24526 msgid "rmmountpoint"
24530 #: ../fish/guestfish-actions.pod:3712
24533 " rmmountpoint exemptpath\n"
24538 #: ../fish/guestfish-actions.pod:3714
24540 "This calls removes a mountpoint that was previously created with "
24541 "L</mkmountpoint>. See L</mkmountpoint> for full details."
24545 #: ../fish/guestfish-actions.pod:3718
24546 msgid "scrub-device"
24550 #: ../fish/guestfish-actions.pod:3720
24553 " scrub-device device\n"
24558 #: ../fish/guestfish-actions.pod:3731
24563 #: ../fish/guestfish-actions.pod:3733
24566 " scrub-file file\n"
24571 #: ../fish/guestfish-actions.pod:3743
24572 msgid "scrub-freespace"
24576 #: ../fish/guestfish-actions.pod:3745
24579 " scrub-freespace dir\n"
24584 #: ../fish/guestfish-actions.pod:3747
24586 "This command creates the directory C<dir> and then fills it with files until "
24587 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
24588 "deletes them. The intention is to scrub any free space on the partition "
24589 "containing C<dir>."
24593 #: ../fish/guestfish-actions.pod:3756
24598 #: ../fish/guestfish-actions.pod:3758
24603 #: ../fish/guestfish-actions.pod:3760
24606 " set-append append\n"
24611 #: ../fish/guestfish-actions.pod:3771
24612 msgid "set-autosync"
24616 #: ../fish/guestfish-actions.pod:3773
24621 #: ../fish/guestfish-actions.pod:3775
24624 " set-autosync true|false\n"
24629 #: ../fish/guestfish-actions.pod:3777
24631 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
24632 "effort attempt to run L</umount-all> followed by L</sync> when the handle is "
24633 "closed (also if the program exits without closing handles)."
24637 #: ../fish/guestfish-actions.pod:3785
24642 #: ../fish/guestfish-actions.pod:3787
24647 #: ../fish/guestfish-actions.pod:3789
24650 " set-direct true|false\n"
24655 #: ../fish/guestfish-actions.pod:3795
24657 "One consequence of this is that log messages aren't caught by the library "
24658 "and handled by L</set-log-message-callback>, but go straight to stdout."
24662 #: ../fish/guestfish-actions.pod:3804
24663 msgid "set-e2label"
24667 #: ../fish/guestfish-actions.pod:3806
24670 " set-e2label device label\n"
24675 #: ../fish/guestfish-actions.pod:3812
24677 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
24678 "label on a filesystem."
24682 #: ../fish/guestfish-actions.pod:3815
24687 #: ../fish/guestfish-actions.pod:3817
24690 " set-e2uuid device uuid\n"
24695 #: ../fish/guestfish-actions.pod:3824
24697 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
24698 "UUID of a filesystem."
24702 #: ../fish/guestfish-actions.pod:3827
24703 msgid "set-memsize"
24707 #: ../fish/guestfish-actions.pod:3829
24712 #: ../fish/guestfish-actions.pod:3831
24715 " set-memsize memsize\n"
24720 #: ../fish/guestfish-actions.pod:3833
24722 "This sets the memory size in megabytes allocated to the qemu subprocess. "
24723 "This only has any effect if called before L</launch>."
24727 #: ../fish/guestfish-actions.pod:3844
24728 msgid "set-network"
24732 #: ../fish/guestfish-actions.pod:3846
24737 #: ../fish/guestfish-actions.pod:3848
24740 " set-network true|false\n"
24745 #: ../fish/guestfish-actions.pod:3856
24746 msgid "You must call this before calling L</launch>, otherwise it has no effect."
24750 #: ../fish/guestfish-actions.pod:3859
24755 #: ../fish/guestfish-actions.pod:3861
24760 #: ../fish/guestfish-actions.pod:3863
24763 " set-path searchpath\n"
24768 #: ../fish/guestfish-actions.pod:3872
24773 #: ../fish/guestfish-actions.pod:3874
24778 #: ../fish/guestfish-actions.pod:3876
24786 #: ../fish/guestfish-actions.pod:3896
24787 msgid "set-recovery-proc"
24791 #: ../fish/guestfish-actions.pod:3898
24792 msgid "recovery-proc"
24796 #: ../fish/guestfish-actions.pod:3900
24799 " set-recovery-proc true|false\n"
24804 #: ../fish/guestfish-actions.pod:3902
24806 "If this is called with the parameter C<false> then L</launch> does not "
24807 "create a recovery process. The purpose of the recovery process is to stop "
24808 "runaway qemu processes in the case where the main program aborts abruptly."
24812 #: ../fish/guestfish-actions.pod:3907
24814 "This only has any effect if called before L</launch>, and the default is "
24819 #: ../fish/guestfish-actions.pod:3916
24820 msgid "set-selinux"
24824 #: ../fish/guestfish-actions.pod:3918
24829 #: ../fish/guestfish-actions.pod:3920
24832 " set-selinux true|false\n"
24837 #: ../fish/guestfish-actions.pod:3931
24842 #: ../fish/guestfish-actions.pod:3933
24847 #: ../fish/guestfish-actions.pod:3935
24850 " set-trace true|false\n"
24855 #: ../fish/guestfish-actions.pod:3951
24856 msgid "set-verbose"
24860 #: ../fish/guestfish-actions.pod:3953
24865 #: ../fish/guestfish-actions.pod:3955
24868 " set-verbose true|false\n"
24873 #: ../fish/guestfish-actions.pod:3962
24878 #: ../fish/guestfish-actions.pod:3964
24881 " setcon context\n"
24886 #: ../fish/guestfish-actions.pod:3971
24891 #: ../fish/guestfish-actions.pod:3973
24894 " setxattr xattr val vallen path\n"
24899 #: ../fish/guestfish-actions.pod:3979
24900 msgid "See also: L</lsetxattr>, L<attr(5)>."
24904 #: ../fish/guestfish-actions.pod:3981
24909 #: ../fish/guestfish-actions.pod:3983
24912 " sfdisk device cyls heads sectors 'lines ...'\n"
24917 #: ../fish/guestfish-actions.pod:4005
24918 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
24922 #: ../fish/guestfish-actions.pod:4011
24927 #: ../fish/guestfish-actions.pod:4013
24930 " sfdiskM device 'lines ...'\n"
24935 #: ../fish/guestfish-actions.pod:4015
24937 "This is a simplified interface to the L</sfdisk> command, where partition "
24938 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
24939 "you don't need to specify the cyls, heads and sectors parameters which were "
24940 "rarely if ever used anyway."
24944 #: ../fish/guestfish-actions.pod:4021
24945 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
24949 #: ../fish/guestfish-actions.pod:4027
24954 #: ../fish/guestfish-actions.pod:4029
24957 " sfdisk-N device partnum cyls heads sectors line\n"
24962 #: ../fish/guestfish-actions.pod:4034
24964 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
24965 "cyls/heads/sectors parameters."
24969 #: ../fish/guestfish-actions.pod:4037
24970 msgid "See also: L</part-add>"
24974 #: ../fish/guestfish-actions.pod:4042
24975 msgid "sfdisk-disk-geometry"
24979 #: ../fish/guestfish-actions.pod:4044
24982 " sfdisk-disk-geometry device\n"
24987 #: ../fish/guestfish-actions.pod:4046
24989 "This displays the disk geometry of C<device> read from the partition table. "
24990 "Especially in the case where the underlying block device has been resized, "
24991 "this can be different from the kernel's idea of the geometry (see "
24992 "L</sfdisk-kernel-geometry>)."
24996 #: ../fish/guestfish-actions.pod:4054
24997 msgid "sfdisk-kernel-geometry"
25001 #: ../fish/guestfish-actions.pod:4056
25004 " sfdisk-kernel-geometry device\n"
25009 #: ../fish/guestfish-actions.pod:4063
25014 #: ../fish/guestfish-actions.pod:4065
25017 " sfdisk-l device\n"
25022 #: ../fish/guestfish-actions.pod:4071
25023 msgid "See also: L</part-list>"
25027 #: ../fish/guestfish-actions.pod:4073
25032 #: ../fish/guestfish-actions.pod:4075
25040 #: ../fish/guestfish-actions.pod:4080
25041 msgid "This is like L</command>, but passes the command to:"
25045 #: ../fish/guestfish-actions.pod:4088
25046 msgid "All the provisos about L</command> apply to this call."
25050 #: ../fish/guestfish-actions.pod:4090
25055 #: ../fish/guestfish-actions.pod:4092
25058 " sh-lines command\n"
25063 #: ../fish/guestfish-actions.pod:4094
25064 msgid "This is the same as L</sh>, but splits the result into a list of lines."
25068 #: ../fish/guestfish-actions.pod:4097
25069 msgid "See also: L</command-lines>"
25073 #: ../fish/guestfish-actions.pod:4099
25078 #: ../fish/guestfish-actions.pod:4101
25086 #: ../fish/guestfish-actions.pod:4105
25091 #: ../fish/guestfish-actions.pod:4107
25099 #: ../fish/guestfish-actions.pod:4113
25104 #: ../fish/guestfish-actions.pod:4115
25112 #: ../fish/guestfish-actions.pod:4123
25117 #: ../fish/guestfish-actions.pod:4125
25125 #: ../fish/guestfish-actions.pod:4133
25130 #: ../fish/guestfish-actions.pod:4135
25133 " strings-e encoding path\n"
25138 #: ../fish/guestfish-actions.pod:4137
25140 "This is like the L</strings> command, but allows you to specify the encoding "
25141 "of strings that are looked for in the source file C<path>."
25145 #: ../fish/guestfish-actions.pod:4147
25147 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
25148 "ISO-8859-X (this is what L</strings> uses)."
25152 #: ../fish/guestfish-actions.pod:4179
25153 msgid "swapoff-device"
25157 #: ../fish/guestfish-actions.pod:4181
25160 " swapoff-device device\n"
25165 #: ../fish/guestfish-actions.pod:4183
25167 "This command disables the libguestfs appliance swap device or partition "
25168 "named C<device>. See L</swapon-device>."
25172 #: ../fish/guestfish-actions.pod:4187
25173 msgid "swapoff-file"
25177 #: ../fish/guestfish-actions.pod:4189
25180 " swapoff-file file\n"
25185 #: ../fish/guestfish-actions.pod:4193
25186 msgid "swapoff-label"
25190 #: ../fish/guestfish-actions.pod:4195
25193 " swapoff-label label\n"
25198 #: ../fish/guestfish-actions.pod:4200
25199 msgid "swapoff-uuid"
25203 #: ../fish/guestfish-actions.pod:4202
25206 " swapoff-uuid uuid\n"
25211 #: ../fish/guestfish-actions.pod:4207
25212 msgid "swapon-device"
25216 #: ../fish/guestfish-actions.pod:4209
25219 " swapon-device device\n"
25224 #: ../fish/guestfish-actions.pod:4211
25226 "This command enables the libguestfs appliance to use the swap device or "
25227 "partition named C<device>. The increased memory is made available for all "
25228 "commands, for example those run using L</command> or L</sh>."
25232 #: ../fish/guestfish-actions.pod:4223
25233 msgid "swapon-file"
25237 #: ../fish/guestfish-actions.pod:4225
25240 " swapon-file file\n"
25245 #: ../fish/guestfish-actions.pod:4227
25246 msgid "This command enables swap to a file. See L</swapon-device> for other notes."
25250 #: ../fish/guestfish-actions.pod:4230
25251 msgid "swapon-label"
25255 #: ../fish/guestfish-actions.pod:4232
25258 " swapon-label label\n"
25263 #: ../fish/guestfish-actions.pod:4234
25265 "This command enables swap to a labeled swap partition. See "
25266 "L</swapon-device> for other notes."
25270 #: ../fish/guestfish-actions.pod:4237
25271 msgid "swapon-uuid"
25275 #: ../fish/guestfish-actions.pod:4239
25278 " swapon-uuid uuid\n"
25283 #: ../fish/guestfish-actions.pod:4241
25285 "This command enables swap to a swap partition with the given UUID. See "
25286 "L</swapon-device> for other notes."
25290 #: ../fish/guestfish-actions.pod:4244
25295 #: ../fish/guestfish-actions.pod:4246
25303 #: ../fish/guestfish-actions.pod:4254
25308 #: ../fish/guestfish-actions.pod:4256
25316 #: ../fish/guestfish-actions.pod:4264
25321 #: ../fish/guestfish-actions.pod:4266
25324 " tail-n nrlines path\n"
25329 #: ../fish/guestfish-actions.pod:4279
25334 #: ../fish/guestfish-actions.pod:4281
25337 " tar-in (tarfile|-) directory\n"
25342 #: ../fish/guestfish-actions.pod:4286
25343 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
25347 #: ../fish/guestfish-actions.pod:4291
25352 #: ../fish/guestfish-actions.pod:4293
25355 " tar-out directory (tarfile|-)\n"
25360 #: ../fish/guestfish-actions.pod:4298
25361 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
25365 #: ../fish/guestfish-actions.pod:4303
25370 #: ../fish/guestfish-actions.pod:4305
25373 " tgz-in (tarball|-) directory\n"
25378 #: ../fish/guestfish-actions.pod:4310
25379 msgid "To upload an uncompressed tarball, use L</tar-in>."
25383 #: ../fish/guestfish-actions.pod:4314
25388 #: ../fish/guestfish-actions.pod:4316
25391 " tgz-out directory (tarball|-)\n"
25396 #: ../fish/guestfish-actions.pod:4321
25397 msgid "To download an uncompressed tarball, use L</tar-out>."
25401 #: ../fish/guestfish-actions.pod:4325
25406 #: ../fish/guestfish-actions.pod:4327
25414 #: ../fish/guestfish-actions.pod:4336
25419 #: ../fish/guestfish-actions.pod:4338
25427 #: ../fish/guestfish-actions.pod:4343
25428 msgid "truncate-size"
25432 #: ../fish/guestfish-actions.pod:4345
25435 " truncate-size path size\n"
25440 #: ../fish/guestfish-actions.pod:4350
25442 "If the current file size is less than C<size> then the file is extended to "
25443 "the required size with zero bytes. This creates a sparse file (ie. disk "
25444 "blocks are not allocated for the file until you write to it). To create a "
25445 "non-sparse file of zeroes, use L</fallocate64> instead."
25449 #: ../fish/guestfish-actions.pod:4356
25454 #: ../fish/guestfish-actions.pod:4358
25457 " tune2fs-l device\n"
25462 #: ../fish/guestfish-actions.pod:4368
25467 #: ../fish/guestfish-actions.pod:4370
25470 " txz-in (tarball|-) directory\n"
25475 #: ../fish/guestfish-actions.pod:4377
25480 #: ../fish/guestfish-actions.pod:4379
25483 " txz-out directory (tarball|-)\n"
25488 #: ../fish/guestfish-actions.pod:4386
25493 #: ../fish/guestfish-actions.pod:4388
25501 #: ../fish/guestfish-actions.pod:4402
25502 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
25506 #: ../fish/guestfish-actions.pod:4407
25511 #: ../fish/guestfish-actions.pod:4409
25516 #: ../fish/guestfish-actions.pod:4411
25519 " umount pathordevice\n"
25524 #: ../fish/guestfish-actions.pod:4417
25529 #: ../fish/guestfish-actions.pod:4419
25530 msgid "unmount-all"
25534 #: ../fish/guestfish-actions.pod:4421
25542 #: ../fish/guestfish-actions.pod:4427
25547 #: ../fish/guestfish-actions.pod:4429
25550 " upload (filename|-) remotefilename\n"
25555 #: ../fish/guestfish-actions.pod:4436
25556 msgid "See also L</download>."
25560 #: ../fish/guestfish-actions.pod:4440
25561 msgid "upload-offset"
25565 #: ../fish/guestfish-actions.pod:4442
25568 " upload-offset (filename|-) remotefilename offset\n"
25573 #: ../fish/guestfish-actions.pod:4454
25575 "Note that there is no limit on the amount of data that can be uploaded with "
25576 "this call, unlike with L</pwrite>, and this call always writes the full "
25577 "amount unless an error occurs."
25581 #: ../fish/guestfish-actions.pod:4459
25582 msgid "See also L</upload>, L</pwrite>."
25586 #: ../fish/guestfish-actions.pod:4463
25591 #: ../fish/guestfish-actions.pod:4465
25594 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
25599 #: ../fish/guestfish-actions.pod:4484
25604 #: ../fish/guestfish-actions.pod:4486
25612 #: ../fish/guestfish-actions.pod:4513
25614 "I<Note:> Don't use this call to test for availability of features. In "
25615 "enterprise distributions we backport features from later versions into "
25616 "earlier versions, making this an unreliable way to test for features. Use "
25617 "L</available> instead."
25621 #: ../fish/guestfish-actions.pod:4519
25626 #: ../fish/guestfish-actions.pod:4521
25629 " vfs-label device\n"
25634 #: ../fish/guestfish-actions.pod:4528
25635 msgid "To find a filesystem from the label, use L</findfs-label>."
25639 #: ../fish/guestfish-actions.pod:4530
25644 #: ../fish/guestfish-actions.pod:4532
25647 " vfs-type device\n"
25652 #: ../fish/guestfish-actions.pod:4542
25657 #: ../fish/guestfish-actions.pod:4544
25660 " vfs-uuid device\n"
25665 #: ../fish/guestfish-actions.pod:4551
25666 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
25670 #: ../fish/guestfish-actions.pod:4553
25671 msgid "vg-activate"
25675 #: ../fish/guestfish-actions.pod:4555
25678 " vg-activate true|false 'volgroups ...'\n"
25683 #: ../fish/guestfish-actions.pod:4568
25684 msgid "vg-activate-all"
25688 #: ../fish/guestfish-actions.pod:4570
25691 " vg-activate-all true|false\n"
25696 #: ../fish/guestfish-actions.pod:4580
25701 #: ../fish/guestfish-actions.pod:4582
25704 " vgcreate volgroup 'physvols ...'\n"
25709 #: ../fish/guestfish-actions.pod:4587
25714 #: ../fish/guestfish-actions.pod:4589
25717 " vglvuuids vgname\n"
25722 #: ../fish/guestfish-actions.pod:4594
25724 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
25725 "logical volumes and volume groups."
25729 #: ../fish/guestfish-actions.pod:4597
25730 msgid "See also L</vgpvuuids>."
25734 #: ../fish/guestfish-actions.pod:4599
25739 #: ../fish/guestfish-actions.pod:4601
25742 " vgpvuuids vgname\n"
25747 #: ../fish/guestfish-actions.pod:4606
25749 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
25750 "physical volumes and volume groups."
25754 #: ../fish/guestfish-actions.pod:4609
25755 msgid "See also L</vglvuuids>."
25759 #: ../fish/guestfish-actions.pod:4611
25764 #: ../fish/guestfish-actions.pod:4613
25767 " vgremove vgname\n"
25772 #: ../fish/guestfish-actions.pod:4620
25777 #: ../fish/guestfish-actions.pod:4622
25780 " vgrename volgroup newvolgroup\n"
25785 #: ../fish/guestfish-actions.pod:4626
25790 #: ../fish/guestfish-actions.pod:4628
25798 #: ../fish/guestfish-actions.pod:4636
25799 msgid "See also L</vgs-full>."
25803 #: ../fish/guestfish-actions.pod:4638
25808 #: ../fish/guestfish-actions.pod:4640
25816 #: ../fish/guestfish-actions.pod:4645
25821 #: ../fish/guestfish-actions.pod:4647
25829 #: ../fish/guestfish-actions.pod:4652
25834 #: ../fish/guestfish-actions.pod:4654
25842 #: ../fish/guestfish-actions.pod:4658
25847 #: ../fish/guestfish-actions.pod:4660
25855 #: ../fish/guestfish-actions.pod:4665
25860 #: ../fish/guestfish-actions.pod:4667
25868 #: ../fish/guestfish-actions.pod:4672
25873 #: ../fish/guestfish-actions.pod:4674
25881 #: ../fish/guestfish-actions.pod:4679
25886 #: ../fish/guestfish-actions.pod:4681
25889 " write path content\n"
25894 #: ../fish/guestfish-actions.pod:4689
25899 #: ../fish/guestfish-actions.pod:4691
25902 " write-file path content size\n"
25907 #: ../fish/guestfish-actions.pod:4714
25912 #: ../fish/guestfish-actions.pod:4716
25915 " zegrep regex path\n"
25920 #: ../fish/guestfish-actions.pod:4724
25925 #: ../fish/guestfish-actions.pod:4726
25928 " zegrepi regex path\n"
25933 #: ../fish/guestfish-actions.pod:4734
25938 #: ../fish/guestfish-actions.pod:4736
25946 #: ../fish/guestfish-actions.pod:4744
25947 msgid "See also: L</zero-device>, L</scrub-device>."
25951 #: ../fish/guestfish-actions.pod:4746
25952 msgid "zero-device"
25956 #: ../fish/guestfish-actions.pod:4748
25959 " zero-device device\n"
25964 #: ../fish/guestfish-actions.pod:4750
25966 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
25967 "which just zeroes the first few blocks of a device."
25971 #: ../fish/guestfish-actions.pod:4757
25976 #: ../fish/guestfish-actions.pod:4759
25979 " zerofree device\n"
25984 #: ../fish/guestfish-actions.pod:4772
25989 #: ../fish/guestfish-actions.pod:4774
25992 " zfgrep pattern path\n"
25997 #: ../fish/guestfish-actions.pod:4782
26002 #: ../fish/guestfish-actions.pod:4784
26005 " zfgrepi pattern path\n"
26010 #: ../fish/guestfish-actions.pod:4792
26015 #: ../fish/guestfish-actions.pod:4794
26018 " zfile meth path\n"
26023 #: ../fish/guestfish-actions.pod:4801
26024 msgid "Since 1.0.63, use L</file> instead which can now process compressed files."
26028 #: ../fish/guestfish-actions.pod:4811
26033 #: ../fish/guestfish-actions.pod:4813
26036 " zgrep regex path\n"
26041 #: ../fish/guestfish-actions.pod:4821
26046 #: ../fish/guestfish-actions.pod:4823
26049 " zgrepi regex path\n"
26054 #: ../fish/guestfish-commands.pod:1
26059 #: ../fish/guestfish-commands.pod:3
26064 #: ../fish/guestfish-commands.pod:5
26067 " alloc filename size\n"
26072 #: ../fish/guestfish-commands.pod:7
26074 "This creates an empty (zeroed) file of the given size, and then adds so it "
26075 "can be further examined."
26079 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
26080 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
26084 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
26085 msgid "Size can be specified using standard suffixes, eg. C<1M>."
26089 #: ../fish/guestfish-commands.pod:14
26091 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
26092 "image, see L</PREPARED DISK IMAGES>."
26096 #: ../fish/guestfish-commands.pod:17
26101 #: ../fish/guestfish-commands.pod:19
26104 " copy-in local [local ...] /remotedir\n"
26109 #: ../fish/guestfish-commands.pod:21
26111 "C<copy-in> copies local files or directories recursively into the disk "
26112 "image, placing them in the directory called C</remotedir> (which must "
26113 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
26114 "other commands as necessary."
26118 #: ../fish/guestfish-commands.pod:26
26120 "Multiple local files and directories can be specified, but the last "
26121 "parameter must always be a remote directory. Wildcards cannot be used."
26125 #: ../fish/guestfish-commands.pod:30
26130 #: ../fish/guestfish-commands.pod:32
26133 " copy-out remote [remote ...] localdir\n"
26138 #: ../fish/guestfish-commands.pod:34
26140 "C<copy-out> copies remote files or directories recursively out of the disk "
26141 "image, placing them on the host disk in a local directory called C<localdir> "
26142 "(which must exist). This guestfish meta-command turns into a sequence of "
26143 "L</download>, L</tar-out> and other commands as necessary."
26147 #: ../fish/guestfish-commands.pod:40
26149 "Multiple remote files and directories can be specified, but the last "
26150 "parameter must always be a local directory. To download to the current "
26151 "directory, use C<.> as in:"
26155 #: ../fish/guestfish-commands.pod:44
26158 " copy-out /home .\n"
26163 #: ../fish/guestfish-commands.pod:46
26165 "Wildcards cannot be used in the ordinary command, but you can use them with "
26166 "the help of L</glob> like this:"
26170 #: ../fish/guestfish-commands.pod:49
26173 " glob copy-out /home/* .\n"
26178 #: ../fish/guestfish-commands.pod:51
26183 #: ../fish/guestfish-commands.pod:53
26186 " echo [params ...]\n"
26191 #: ../fish/guestfish-commands.pod:55
26192 msgid "This echos the parameters to the terminal."
26196 #: ../fish/guestfish-commands.pod:57
26201 #: ../fish/guestfish-commands.pod:59
26206 #: ../fish/guestfish-commands.pod:61
26211 #: ../fish/guestfish-commands.pod:63
26219 #: ../fish/guestfish-commands.pod:65
26221 "This is used to edit a file. It downloads the file, edits it locally using "
26222 "your editor, then uploads the result."
26226 #: ../fish/guestfish-commands.pod:68
26228 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
26229 "or C<emacs> you will get those corresponding editors."
26233 #: ../fish/guestfish-commands.pod:72
26238 #: ../fish/guestfish-commands.pod:74
26241 " glob command args...\n"
26246 #: ../fish/guestfish-commands.pod:76
26248 "Expand wildcards in any paths in the args list, and run C<command> "
26249 "repeatedly on each matching path."
26253 #: ../fish/guestfish-commands.pod:79
26254 msgid "See L</WILDCARDS AND GLOBBING>."
26258 #: ../fish/guestfish-commands.pod:81
26263 #: ../fish/guestfish-commands.pod:83
26266 " hexedit <filename|device>\n"
26267 " hexedit <filename|device> <max>\n"
26268 " hexedit <filename|device> <start> <max>\n"
26273 #: ../fish/guestfish-commands.pod:87
26275 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
26280 #: ../fish/guestfish-commands.pod:90
26282 "This command works by downloading potentially the whole file or device, "
26283 "editing it locally, then uploading it. If the file or device is large, you "
26284 "have to specify which part you wish to edit by using C<max> and/or C<start> "
26285 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
26286 "usual modifiers allowed such as C<1M> (1 megabyte)."
26290 #: ../fish/guestfish-commands.pod:97
26291 msgid "For example to edit the first few sectors of a disk you might do:"
26295 #: ../fish/guestfish-commands.pod:100
26298 " hexedit /dev/sda 1M\n"
26303 #: ../fish/guestfish-commands.pod:102
26305 "which would allow you to edit anywhere within the first megabyte of the "
26310 #: ../fish/guestfish-commands.pod:105
26311 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
26315 #: ../fish/guestfish-commands.pod:107
26318 " hexedit /dev/sda1 0x400 0x400\n"
26323 #: ../fish/guestfish-commands.pod:109
26324 msgid "(assuming the superblock is in the standard location)."
26328 #: ../fish/guestfish-commands.pod:111
26330 "This command requires the external L<hexedit(1)> program. You can specify "
26331 "another program to use by setting the C<HEXEDITOR> environment variable."
26335 #: ../fish/guestfish-commands.pod:115
26336 msgid "See also L</hexdump>."
26340 #: ../fish/guestfish-commands.pod:117
26345 #: ../fish/guestfish-commands.pod:119
26353 #: ../fish/guestfish-commands.pod:121
26354 msgid "Change the local directory, ie. the current directory of guestfish itself."
26358 #: ../fish/guestfish-commands.pod:124
26359 msgid "Note that C<!cd> won't do what you might expect."
26363 #: ../fish/guestfish-commands.pod:126
26368 #: ../fish/guestfish-commands.pod:128
26373 #: ../fish/guestfish-commands.pod:130
26381 #: ../fish/guestfish-commands.pod:132
26382 msgid "Opens the manual page for guestfish."
26386 #: ../fish/guestfish-commands.pod:134
26391 #: ../fish/guestfish-commands.pod:136
26396 #: ../fish/guestfish-commands.pod:138
26404 #: ../fish/guestfish-commands.pod:140
26412 #: ../fish/guestfish-commands.pod:142
26413 msgid "This is used to view a file."
26417 #: ../fish/guestfish-commands.pod:144
26419 "The default viewer is C<$PAGER>. However if you use the alternate command "
26420 "C<less> you will get the C<less> command specifically."
26424 #: ../fish/guestfish-commands.pod:147
26429 #: ../fish/guestfish-commands.pod:149
26437 #: ../fish/guestfish-commands.pod:151
26439 "Close and reopen the libguestfs handle. It is not necessary to use this "
26440 "normally, because the handle is closed properly when guestfish exits. "
26441 "However this is occasionally useful for testing."
26445 #: ../fish/guestfish-commands.pod:155
26450 #: ../fish/guestfish-commands.pod:157
26453 " sparse filename size\n"
26458 #: ../fish/guestfish-commands.pod:159
26460 "This creates an empty sparse file of the given size, and then adds so it can "
26461 "be further examined."
26465 #: ../fish/guestfish-commands.pod:162
26467 "In all respects it works the same as the L</alloc> command, except that the "
26468 "image file is allocated sparsely, which means that disk blocks are not "
26469 "assigned to the file until they are needed. Sparse disk files only use "
26470 "space when written to, but they are slower and there is a danger you could "
26471 "run out of real disk space during a write operation."
26475 #: ../fish/guestfish-commands.pod:172
26480 #: ../fish/guestfish-commands.pod:174
26488 #: ../fish/guestfish-commands.pod:176
26490 "This command returns a list of the optional groups known to the daemon, and "
26491 "indicates which ones are supported by this build of the libguestfs "
26496 #: ../fish/guestfish-commands.pod:180
26497 msgid "See also L<guestfs(3)/AVAILABILITY>."
26501 #: ../fish/guestfish-commands.pod:182
26506 #: ../fish/guestfish-commands.pod:184
26509 " time command args...\n"
26514 #: ../fish/guestfish-commands.pod:186
26516 "Run the command as usual, but print the elapsed time afterwards. This can "
26517 "be useful for benchmarking operations."
26521 #: ../test-tool/libguestfs-test-tool.pod:5
26522 msgid "libguestfs-test-tool - End user tests for libguestfs"
26526 #: ../test-tool/libguestfs-test-tool.pod:9
26529 " libguestfs-test-tool [--options]\n"
26534 #: ../test-tool/libguestfs-test-tool.pod:13
26536 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
26537 "and developers, to allow them to check basic libguestfs functionality is "
26538 "working. This is needed because libguestfs occasionally breaks for reasons "
26539 "beyond our control: usually because of changes in the underlying qemu or "
26540 "kernel packages, or the host environment."
26544 #: ../test-tool/libguestfs-test-tool.pod:20
26545 msgid "If you suspect a problem in libguestfs, then just run:"
26549 #: ../test-tool/libguestfs-test-tool.pod:22
26552 " libguestfs-test-tool\n"
26557 #: ../test-tool/libguestfs-test-tool.pod:24
26558 msgid "It will print lots of diagnostic messages."
26562 #: ../test-tool/libguestfs-test-tool.pod:26
26563 msgid "If it runs to completion successfully, you will see this near the end:"
26567 #: ../test-tool/libguestfs-test-tool.pod:28
26570 " ===== TEST FINISHED OK =====\n"
26575 #: ../test-tool/libguestfs-test-tool.pod:30
26576 msgid "and the test tool will exit with code 0."
26580 #: ../test-tool/libguestfs-test-tool.pod:32
26582 "If it fails (and/or exits with non-zero error code), please paste the "
26583 "B<complete, unedited> output of the test tool into a bug report. More "
26584 "information about reporting bugs can be found on the "
26585 "L<http://libguestfs.org/> website."
26589 #: ../test-tool/libguestfs-test-tool.pod:41
26594 #: ../test-tool/libguestfs-test-tool.pod:43
26595 msgid "Display short usage information and exit."
26599 #: ../test-tool/libguestfs-test-tool.pod:45
26600 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
26604 #: ../test-tool/libguestfs-test-tool.pod:47
26606 "Pass an alternate name for the helper program. libguestfs-test-tool will "
26607 "normally look in the C<$libexec> directory that was configured when the tool "
26612 #: ../test-tool/libguestfs-test-tool.pod:51
26613 msgid "I<--qemu qemu_binary>"
26617 #: ../test-tool/libguestfs-test-tool.pod:53
26619 "If you have downloaded another qemu binary, point this option at the full "
26620 "path of the binary to try it."
26624 #: ../test-tool/libguestfs-test-tool.pod:56
26625 msgid "I<--qemudir qemu_source_dir>"
26629 #: ../test-tool/libguestfs-test-tool.pod:58
26631 "If you have compiled qemu from source, point this option at the source "
26632 "directory to try it."
26636 #: ../test-tool/libguestfs-test-tool.pod:61
26637 msgid "I<--timeout N>"
26641 #: ../test-tool/libguestfs-test-tool.pod:63
26643 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
26644 "does not usually need to be adjusted unless your machine is very slow."
26648 #: ../test-tool/libguestfs-test-tool.pod:69
26649 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
26653 #: ../test-tool/libguestfs-test-tool.pod:71
26655 "If you have compiled another version of qemu from source and would like to "
26656 "try that, then you can use the I<--qemudir> option to point to the qemu "
26657 "source directory."
26661 #: ../test-tool/libguestfs-test-tool.pod:75
26663 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
26664 "option to point to the binary."
26668 #: ../test-tool/libguestfs-test-tool.pod:78
26670 "When using an alternate qemu with libguestfs, usually you would need to "
26671 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in "
26672 "L<guestfs(3)>). libguestfs-test-tool writes a temporary qemu wrapper script "
26673 "when you use either of the I<--qemudir> or I<--qemu> options."
26677 #: ../test-tool/libguestfs-test-tool.pod:85
26679 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
26680 "I<1> if there was an error."
26684 #: ../test-tool/libguestfs-test-tool.pod:92
26685 msgid "/usr/libexec/libguestfs-test-tool-helper"
26689 #: ../test-tool/libguestfs-test-tool.pod:94
26691 "This helper program is run inside the appliance and provides additional "
26696 #: ../test-tool/libguestfs-test-tool.pod:97
26697 msgid "/usr/bin/mkisofs"
26701 #: ../test-tool/libguestfs-test-tool.pod:99
26703 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
26704 "which is used as part of the tests."
26708 #: ../test-tool/libguestfs-test-tool.pod:106
26710 "For the full list of environment variables which may affect libguestfs, "
26711 "please see the L<guestfs(3)> manual page."
26715 #: ../test-tool/libguestfs-test-tool.pod:111
26716 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
26720 #: ../test-tool/libguestfs-test-tool.pod:121
26721 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
26725 #: ../fuse/guestmount.pod:5
26726 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
26730 #: ../fuse/guestmount.pod:9
26733 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
26738 #: ../fuse/guestmount.pod:11
26741 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
26746 #: ../fuse/guestmount.pod:13
26749 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
26754 #: ../fuse/guestmount.pod:17
26756 "You must I<not> use C<guestmount> in read-write mode on live virtual "
26757 "machines. If you do this, you risk disk corruption in the VM."
26761 #: ../fuse/guestmount.pod:22
26763 "The guestmount program can be used to mount virtual machine filesystems and "
26764 "other disk images on the host. It uses libguestfs for access to the guest "
26765 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
26766 "a mountable device."
26770 #: ../fuse/guestmount.pod:27
26772 "Along with other options, you have to give at least one device (I<-a> "
26773 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
26774 "option) or use the I<-i> inspection option. How this works is better "
26775 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
26780 #: ../fuse/guestmount.pod:33
26782 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
26783 "by you, and the filesystem will not be visible to any other users unless you "
26784 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
26785 "the filesystem, use the C<fusermount -u> command."
26789 #: ../fuse/guestmount.pod:41
26791 "For a typical Windows guest which has its main filesystem on the first "
26796 #: ../fuse/guestmount.pod:44
26799 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
26804 #: ../fuse/guestmount.pod:46
26806 "For a typical Linux guest which has a /boot filesystem on the first "
26807 "partition, and the root filesystem on a logical volume:"
26811 #: ../fuse/guestmount.pod:49
26814 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
26819 #: ../fuse/guestmount.pod:51
26820 msgid "To get libguestfs to detect guest mountpoints for you:"
26824 #: ../fuse/guestmount.pod:53
26827 " guestmount -a guest.img -i --ro /mnt\n"
26832 #: ../fuse/guestmount.pod:55
26833 msgid "For a libvirt guest called \"Guest\" you could do:"
26837 #: ../fuse/guestmount.pod:57
26840 " guestmount -d Guest -i --ro /mnt\n"
26845 #: ../fuse/guestmount.pod:59
26847 "If you don't know what filesystems are contained in a guest or disk image, "
26848 "use L<virt-filesystems(1)> first:"
26852 #: ../fuse/guestmount.pod:62
26855 " virt-filesystems MyGuest\n"
26860 #: ../fuse/guestmount.pod:64
26862 "If you want to trace the libguestfs calls but without excessive debugging "
26863 "information, we recommend:"
26867 #: ../fuse/guestmount.pod:67
26870 " guestmount [...] --trace /mnt\n"
26875 #: ../fuse/guestmount.pod:69
26876 msgid "If you want to debug the program, we recommend:"
26880 #: ../fuse/guestmount.pod:71
26883 " guestmount [...] --trace --verbose /mnt\n"
26888 #: ../fuse/guestmount.pod:77
26889 msgid "B<-a image> | B<--add image>"
26893 #: ../fuse/guestmount.pod:79
26894 msgid "Add a block device or virtual machine image."
26898 #: ../fuse/guestmount.pod:84
26899 msgid "B<-c URI> | B<--connect URI>"
26903 #: ../fuse/guestmount.pod:90
26904 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
26908 #: ../fuse/guestmount.pod:96
26909 msgid "B<--dir-cache-timeout N>"
26913 #: ../fuse/guestmount.pod:98
26915 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
26916 "seconds. The readdir cache [actually, there are several semi-independent "
26917 "caches] is populated after a readdir(2) call with the stat and extended "
26918 "attributes of the files in the directory, in anticipation that they will be "
26919 "requested soon after."
26923 #: ../fuse/guestmount.pod:104
26925 "There is also a different attribute cache implemented by FUSE (see the FUSE "
26926 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
26927 "requests, only cache existing ones."
26931 #: ../fuse/guestmount.pod:115
26932 msgid "B<--format=raw|qcow2|..> | B<--format>"
26936 #: ../fuse/guestmount.pod:122
26938 "If you have untrusted raw-format guest disk images, you should use this "
26939 "option to specify the disk format. This avoids a possible security problem "
26940 "with malicious guests (CVE-2010-3851). See also "
26941 "L<guestfs(3)/guestfs_add_drive_opts>."
26945 #: ../fuse/guestmount.pod:127
26946 msgid "B<--fuse-help>"
26950 #: ../fuse/guestmount.pod:129
26951 msgid "Display help on special FUSE options (see I<-o> below)."
26955 #: ../fuse/guestmount.pod:133
26956 msgid "Display brief help and exit."
26960 #: ../fuse/guestmount.pod:135
26961 msgid "B<-i> | B<--inspector>"
26965 #: ../fuse/guestmount.pod:146
26966 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
26970 #: ../fuse/guestmount.pod:148
26972 "Mount the named partition or logical volume on the given mountpoint B<in the "
26973 "guest> (this has nothing to do with mountpoints in the host)."
26977 #: ../fuse/guestmount.pod:151
26979 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
26980 "something on C</>."
26984 #: ../fuse/guestmount.pod:154
26985 msgid "B<-n> | B<--no-sync>"
26989 #: ../fuse/guestmount.pod:156
26991 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
26992 "unmounted. If you specify this option, then we don't attempt to sync the "
26993 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
26997 #: ../fuse/guestmount.pod:161
26998 msgid "B<-o option> | B<--option option>"
27002 #: ../fuse/guestmount.pod:163
27003 msgid "Pass extra options to FUSE."
27007 #: ../fuse/guestmount.pod:165
27009 "To get a list of all the extra options supported by FUSE, use the command "
27010 "below. Note that only the FUSE I<-o> options can be passed, and only some "
27011 "of them are a good idea."
27015 #: ../fuse/guestmount.pod:169
27018 " guestmount --fuse-help\n"
27023 #: ../fuse/guestmount.pod:171
27024 msgid "Some potentially useful FUSE options:"
27028 #: ../fuse/guestmount.pod:175
27029 msgid "B<-o allow_other>"
27033 #: ../fuse/guestmount.pod:177
27034 msgid "Allow other users to see the filesystem."
27038 #: ../fuse/guestmount.pod:179
27039 msgid "B<-o attr_timeout=N>"
27043 #: ../fuse/guestmount.pod:181
27044 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
27048 #: ../fuse/guestmount.pod:183
27049 msgid "B<-o kernel_cache>"
27053 #: ../fuse/guestmount.pod:185
27055 "Allow the kernel to cache files (reduces the number of reads that have to go "
27056 "through the L<guestfs(3)> API). This is generally a good idea if you can "
27057 "afford the extra memory usage."
27061 #: ../fuse/guestmount.pod:189
27062 msgid "B<-o uid=N> B<-o gid=N>"
27066 #: ../fuse/guestmount.pod:191
27068 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
27069 "the chosen values."
27073 #: ../fuse/guestmount.pod:196
27074 msgid "B<-r> | B<--ro>"
27078 #: ../fuse/guestmount.pod:198
27080 "Add devices and mount everything read-only. Also disallow writes and make "
27081 "the disk appear read-only to FUSE."
27085 #: ../fuse/guestmount.pod:201
27087 "This is highly recommended if you are not going to edit the guest disk. If "
27088 "the guest is running and this option is I<not> supplied, then there is a "
27089 "strong risk of disk corruption in the guest. We try to prevent this from "
27090 "happening, but it is not always possible."
27094 #: ../fuse/guestmount.pod:206
27095 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
27099 #: ../fuse/guestmount.pod:210
27100 msgid "Enable SELinux support for the guest."
27104 #: ../fuse/guestmount.pod:212
27105 msgid "B<-v> | B<--verbose>"
27109 #: ../fuse/guestmount.pod:214
27110 msgid "Enable verbose messages from underlying libguestfs."
27114 #: ../fuse/guestmount.pod:216
27115 msgid "B<-V> | B<--version>"
27119 #: ../fuse/guestmount.pod:218
27120 msgid "Display the program version and exit."
27124 #: ../fuse/guestmount.pod:220
27125 msgid "B<-w> | B<--rw>"
27129 #: ../fuse/guestmount.pod:222
27131 "This option does nothing at the moment. See L<guestfish(1)/OPENING DISKS "
27132 "FOR READ AND WRITE>."
27136 #: ../fuse/guestmount.pod:225
27137 msgid "B<-x> | B<--trace>"
27141 #: ../fuse/guestmount.pod:227
27142 msgid "Trace libguestfs calls and entry into each FUSE function."
27146 #: ../fuse/guestmount.pod:229
27147 msgid "This also stops the daemon from forking into the background."
27151 #: ../fuse/guestmount.pod:235
27153 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
27154 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
27155 "L<http://fuse.sf.net/>."
27159 #: ../tools/virt-edit.pl:34
27160 msgid "virt-edit - Edit a file in a virtual machine"
27164 #: ../tools/virt-edit.pl:38
27167 " virt-edit [--options] domname file\n"
27172 #: ../tools/virt-edit.pl:40
27175 " virt-edit [--options] disk.img [disk.img ...] file\n"
27180 #: ../tools/virt-edit.pl:42
27183 " virt-edit [domname|disk.img] file -e 'expr'\n"
27188 #: ../tools/virt-edit.pl:46
27190 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
27191 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
27192 "doing this, but doesn't catch all cases."
27196 #: ../tools/virt-edit.pl:52
27198 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
27199 "the named virtual machine (or disk image)."
27203 #: ../tools/virt-edit.pl:55
27205 "If you want to just view a file, use L<virt-cat(1)>. For more complex cases "
27206 "you should look at the L<guestfish(1)> tool."
27210 #: ../tools/virt-edit.pl:60
27211 msgid "Edit the named files interactively:"
27215 #: ../tools/virt-edit.pl:62
27218 " virt-edit mydomain /boot/grub/grub.conf\n"
27223 #: ../tools/virt-edit.pl:64
27226 " virt-edit mydomain /etc/passwd\n"
27231 #: ../tools/virt-edit.pl:66
27233 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
27234 "below). To change the init default level to 5:"
27238 #: ../tools/virt-edit.pl:70
27241 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
27246 #: ../tools/virt-edit.pl:82 ../tools/virt-win-reg.pl:106 ../tools/virt-list-filesystems.pl:63 ../tools/virt-tar.pl:113 ../tools/virt-make-fs.pl:163 ../tools/virt-list-partitions.pl:64
27247 msgid "Display brief help."
27251 #: ../tools/virt-edit.pl:90 ../tools/virt-win-reg.pl:114 ../tools/virt-resize.pl:272 ../tools/virt-list-filesystems.pl:71 ../tools/virt-tar.pl:121 ../tools/virt-make-fs.pl:171 ../tools/virt-list-partitions.pl:72
27252 msgid "Display version number and exit."
27256 #: ../tools/virt-edit.pl:96
27257 msgid "B<--backup extension> | B<-b extension>"
27261 #: ../tools/virt-edit.pl:98
27263 "Create a backup of the original file I<in the guest disk image>. The backup "
27264 "has the original filename with C<extension> added."
27268 #: ../tools/virt-edit.pl:101
27270 "Usually the first character of C<extension> would be a dot C<.> so you would "
27275 #: ../tools/virt-edit.pl:104
27278 " virt-edit -b .orig [etc]\n"
27283 #: ../tools/virt-edit.pl:106
27284 msgid "By default, no backup file is made."
27288 #: ../tools/virt-edit.pl:112 ../tools/virt-win-reg.pl:128 ../tools/virt-list-filesystems.pl:77 ../tools/virt-tar.pl:127 ../tools/virt-list-partitions.pl:78
27289 msgid "B<--connect URI> | B<-c URI>"
27293 #: ../tools/virt-edit.pl:114 ../tools/virt-win-reg.pl:130 ../tools/virt-list-filesystems.pl:79 ../tools/virt-tar.pl:129 ../tools/virt-list-partitions.pl:80
27295 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
27296 "to the default libvirt hypervisor."
27300 #: ../tools/virt-edit.pl:117 ../tools/virt-win-reg.pl:133 ../tools/virt-list-filesystems.pl:82 ../tools/virt-tar.pl:132 ../tools/virt-list-partitions.pl:83
27302 "If you specify guest block devices directly, then libvirt is not used at "
27307 #: ../tools/virt-edit.pl:124 ../tools/virt-win-reg.pl:140 ../tools/virt-resize.pl:520 ../tools/virt-list-filesystems.pl:89 ../tools/virt-tar.pl:139 ../tools/virt-list-partitions.pl:90
27308 msgid "B<--format> raw"
27312 #: ../tools/virt-edit.pl:126 ../tools/virt-win-reg.pl:142 ../tools/virt-list-filesystems.pl:91 ../tools/virt-tar.pl:141 ../tools/virt-list-partitions.pl:92
27314 "Specify the format of disk images given on the command line. If this is "
27315 "omitted then the format is autodetected from the content of the disk image."
27319 #: ../tools/virt-edit.pl:130 ../tools/virt-win-reg.pl:146 ../tools/virt-list-filesystems.pl:95 ../tools/virt-tar.pl:145 ../tools/virt-list-partitions.pl:96
27321 "If disk images are requested from libvirt, then this program asks libvirt "
27322 "for this information. In this case, the value of the format parameter is "
27327 #: ../tools/virt-edit.pl:134 ../tools/virt-win-reg.pl:150 ../tools/virt-resize.pl:525 ../tools/virt-resize.pl:540 ../tools/virt-list-filesystems.pl:99 ../tools/virt-tar.pl:149 ../tools/virt-list-partitions.pl:100
27329 "If working with untrusted raw-format guest disk images, you should ensure "
27330 "the format is always specified."
27334 #: ../tools/virt-edit.pl:141
27335 msgid "B<--expr EXPR> | B<-e EXPR>"
27339 #: ../tools/virt-edit.pl:143
27341 "Instead of launching the external editor, non-interactively apply the Perl "
27342 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
27347 #: ../tools/virt-edit.pl:147
27349 "Be careful to properly quote the expression to prevent it from being altered "
27354 #: ../tools/virt-edit.pl:268
27355 msgid "NON-INTERACTIVE EDITING"
27359 #: ../tools/virt-edit.pl:270
27361 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
27362 "administrator can interactively edit the file."
27366 #: ../tools/virt-edit.pl:273
27368 "There are two ways also to use C<virt-edit> from scripts in order to make "
27369 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
27370 "like this, it's less error-prone to write scripts directly using the "
27371 "libguestfs API and Augeas for configuration file editing.)"
27375 #: ../tools/virt-edit.pl:279
27377 "The first method is to temporarily set C<$EDITOR> to any script or program "
27378 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
27379 "update C<tmpfile> in place however it likes."
27383 #: ../tools/virt-edit.pl:283
27385 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
27386 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
27387 "instances of C<foo> with C<bar> in a file:"
27391 #: ../tools/virt-edit.pl:287
27394 " virt-edit domname filename -e 's/foo/bar/'\n"
27399 #: ../tools/virt-edit.pl:289
27401 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
27402 "For example to delete root's password you could do:"
27406 #: ../tools/virt-edit.pl:292
27409 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
27414 #: ../tools/virt-edit.pl:294
27416 "What really happens is that the snippet is evaluated as a Perl expression "
27417 "for each line of the file. The line, including the final C<\\n>, is passed "
27418 "in C<$_> and the expression should update C<$_> or leave it unchanged."
27422 #: ../tools/virt-edit.pl:299
27424 "To delete a line, set C<$_> to the empty string. For example, to delete the "
27425 "C<apache> user account from the password file you can do:"
27429 #: ../tools/virt-edit.pl:302
27432 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
27437 #: ../tools/virt-edit.pl:304
27439 "To insert a line, prepend or append it to C<$_>. However appending lines to "
27440 "the end of the file is rather difficult this way since there is no concept "
27441 "of \"last line of the file\" - your expression just doesn't get called "
27442 "again. You might want to use the first method (setting C<$EDITOR>) if you "
27447 #: ../tools/virt-edit.pl:310
27449 "The variable C<$lineno> contains the current line number. As is "
27450 "traditional, the first line in the file is number C<1>."
27454 #: ../tools/virt-edit.pl:313
27456 "The return value from the expression is ignored, but the expression may call "
27457 "C<die> in order to abort the whole program, leaving the original file "
27462 #: ../tools/virt-edit.pl:317
27464 "Remember when matching the end of a line that C<$_> may contain the final "
27465 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
27466 "newline then neither of these. Thus to match or substitute some text at the "
27467 "end of a line, use this regular expression:"
27471 #: ../tools/virt-edit.pl:322
27474 " /some text(\\r?\\n)?$/\n"
27479 #: ../tools/virt-edit.pl:324
27481 "Alternately, use the perl C<chomp> function, being careful not to chomp "
27482 "C<$_> itself (since that would remove all newlines from the file):"
27486 #: ../tools/virt-edit.pl:328
27489 " my $m = $_; chomp $m; $m =~ /some text$/\n"
27494 #: ../tools/virt-edit.pl:334
27499 #: ../tools/virt-edit.pl:336
27501 "If set, this string is used as the editor. It may contain arguments, "
27502 "eg. C<\"emacs -nw\">"
27506 #: ../tools/virt-edit.pl:339
27507 msgid "If not set, C<vi> is used."
27511 #: ../tools/virt-edit.pl:343 ../tools/virt-win-reg.pl:559 ../tools/virt-resize.pl:1476 ../tools/virt-list-filesystems.pl:182 ../tools/virt-tar.pl:279 ../tools/virt-make-fs.pl:527 ../tools/virt-list-partitions.pl:250
27512 msgid "SHELL QUOTING"
27516 #: ../tools/virt-edit.pl:345 ../tools/virt-win-reg.pl:567 ../tools/virt-resize.pl:1478 ../tools/virt-list-filesystems.pl:184 ../tools/virt-tar.pl:281 ../tools/virt-make-fs.pl:529 ../tools/virt-list-partitions.pl:252
27518 "Libvirt guest names can contain arbitrary characters, some of which have "
27519 "meaning to the shell such as C<#> and space. You may need to quote or "
27520 "escape these characters on the command line. See the shell manual page "
27521 "L<sh(1)> for details."
27525 #: ../tools/virt-edit.pl:352
27527 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-copy-in(1)>, "
27528 "L<virt-tar-in(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
27529 "L<Sys::Virt(3)>, L<http://libguestfs.org/>, L<perl(1)>, L<perlre(1)>."
27533 #: ../tools/virt-edit.pl:364 ../tools/virt-win-reg.pl:598 ../tools/virt-resize.pl:1504 ../tools/virt-list-filesystems.pl:202 ../tools/virt-tar.pl:301 ../tools/virt-make-fs.pl:559 ../tools/virt-list-partitions.pl:269
27538 #: ../tools/virt-edit.pl:366 ../tools/virt-win-reg.pl:600 ../tools/virt-resize.pl:1506 ../tools/virt-list-filesystems.pl:204 ../tools/virt-tar.pl:303 ../tools/virt-make-fs.pl:561 ../tools/virt-list-partitions.pl:271
27539 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
27543 #: ../tools/virt-edit.pl:370 ../tools/virt-list-partitions.pl:275
27544 msgid "Copyright (C) 2009-2010 Red Hat Inc."
27548 #: ../tools/virt-win-reg.pl:37
27550 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
27555 #: ../tools/virt-win-reg.pl:41
27558 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
27563 #: ../tools/virt-win-reg.pl:43
27566 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
27571 #: ../tools/virt-win-reg.pl:45
27574 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
27579 #: ../tools/virt-win-reg.pl:47
27582 " virt-win-reg --merge domname [input.reg ...]\n"
27587 #: ../tools/virt-win-reg.pl:49
27590 " virt-win-reg [--options] disk.img ... # instead of domname\n"
27595 #: ../tools/virt-win-reg.pl:53
27597 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
27598 "virtual machines. If you do this, you I<will> get irreversible disk "
27599 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
27600 "but doesn't catch all cases."
27604 #: ../tools/virt-win-reg.pl:58
27606 "Modifying the Windows Registry is an inherently risky operation. The format "
27607 "is deliberately obscure and undocumented, and Registry changes can leave the "
27608 "system unbootable. Therefore when using the C<--merge> option, make sure "
27609 "you have a reliable backup first."
27613 #: ../tools/virt-win-reg.pl:65
27615 "This program can export and merge Windows Registry entries from a Windows "
27620 #: ../tools/virt-win-reg.pl:68
27622 "The first parameter is the libvirt guest name or the raw disk image of a "
27627 #: ../tools/virt-win-reg.pl:71
27629 "If C<--merge> is I<not> specified, then the chosen registry key is "
27630 "displayed/exported (recursively). For example:"
27634 #: ../tools/virt-win-reg.pl:74
27637 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
27642 #: ../tools/virt-win-reg.pl:76
27643 msgid "You can also display single values from within registry keys, for example:"
27647 #: ../tools/virt-win-reg.pl:79
27650 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
27651 " $ virt-win-reg Windows7 $cvkey ProductName\n"
27652 " Windows 7 Enterprise\n"
27657 #: ../tools/virt-win-reg.pl:83
27659 "With C<--merge>, you can merge a textual regedit file into the Windows "
27664 #: ../tools/virt-win-reg.pl:86
27667 " $ virt-win-reg --merge Windows7 changes.reg\n"
27672 #: ../tools/virt-win-reg.pl:88 ../tools/virt-tar.pl:45
27677 #: ../tools/virt-win-reg.pl:90
27679 "This program is only meant for simple access to the registry. If you want "
27680 "to do complicated things with the registry, we suggest you download the "
27681 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
27682 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
27683 "L<hivexregedit(1)>."
27687 #: ../tools/virt-win-reg.pl:120 ../tools/virt-make-fs.pl:177
27692 #: ../tools/virt-win-reg.pl:122 ../tools/virt-resize.pl:498
27693 msgid "Enable debugging messages."
27697 #: ../tools/virt-win-reg.pl:157
27702 #: ../tools/virt-win-reg.pl:159
27704 "In merge mode, this merges a textual regedit file into the Windows Registry "
27705 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
27706 "displays or exports Registry entries instead."
27710 #: ../tools/virt-win-reg.pl:163
27712 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
27713 "result in disk corruption. However exporting (without this flag) is always "
27718 #: ../tools/virt-win-reg.pl:171
27719 msgid "B<--encoding> UTF-16LE|ASCII"
27723 #: ../tools/virt-win-reg.pl:173
27725 "When merging (only), you may need to specify the encoding for strings to be "
27726 "used in the hive file. This is explained in detail in "
27727 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
27731 #: ../tools/virt-win-reg.pl:177
27733 "The default is to use UTF-16LE, which should work with recent versions of "
27738 #: ../tools/virt-win-reg.pl:402
27739 msgid "SUPPORTED SYSTEMS"
27743 #: ../tools/virt-win-reg.pl:404
27745 "The program currently supports Windows NT-derived guests starting with "
27746 "Windows XP through to at least Windows 7."
27750 #: ../tools/virt-win-reg.pl:407
27752 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, "
27753 "C<HKEY_LOCAL_MACHINE\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, "
27754 "C<HKEY_LOCAL_MACHINE\\SYSTEM> and C<HKEY_USERS\\.DEFAULT>."
27758 #: ../tools/virt-win-reg.pl:411
27760 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
27765 #: ../tools/virt-win-reg.pl:414
27767 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
27772 #: ../tools/virt-win-reg.pl:417
27777 #: ../tools/virt-win-reg.pl:419
27779 "C<virt-win-reg> expects that regedit files have already been reencoded in "
27780 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
27781 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
27782 "with Windows-style line endings, you may need to reencode the whole file "
27783 "before or after processing."
27787 #: ../tools/virt-win-reg.pl:425
27789 "To reencode a file from Windows format to Linux (before processing it with "
27790 "the C<--merge> option), you would do something like this:"
27794 #: ../tools/virt-win-reg.pl:428
27797 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
27802 #: ../tools/virt-win-reg.pl:430
27804 "To go in the opposite direction, after exporting and before sending the file "
27805 "to a Windows user, do something like this:"
27809 #: ../tools/virt-win-reg.pl:433
27812 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
27817 #: ../tools/virt-win-reg.pl:435
27818 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
27822 #: ../tools/virt-win-reg.pl:437
27824 "If you are unsure about the current encoding, use the L<file(1)> command. "
27825 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
27826 "Windows-style (CRLF) line endings, like this:"
27830 #: ../tools/virt-win-reg.pl:441
27833 " $ file software.reg\n"
27834 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
27835 " with CRLF line terminators\n"
27840 #: ../tools/virt-win-reg.pl:445
27841 msgid "This file would need conversion before you could C<--merge> it."
27845 #: ../tools/virt-win-reg.pl:447
27846 msgid "CurrentControlSet etc."
27850 #: ../tools/virt-win-reg.pl:449
27852 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
27853 "Registry at the level of the hive file, and therefore you cannot modify "
27858 #: ../tools/virt-win-reg.pl:453
27860 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
27861 "circumstances it might refer to another control set. The way to find out is "
27862 "to look at the C<HKLM\\SYSTEM\\Select> key:"
27866 #: ../tools/virt-win-reg.pl:457
27869 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
27870 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
27871 " \"Current\"=dword:00000001\n"
27872 " \"Default\"=dword:00000001\n"
27873 " \"Failed\"=dword:00000000\n"
27874 " \"LastKnownGood\"=dword:00000002\n"
27879 #: ../tools/virt-win-reg.pl:464
27880 msgid "\"Current\" is the one which Windows will choose when it boots."
27884 #: ../tools/virt-win-reg.pl:466
27885 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
27889 #: ../tools/virt-win-reg.pl:469
27890 msgid "WINDOWS TIPS"
27894 #: ../tools/virt-win-reg.pl:471
27896 "Note that some of these tips modify the guest disk image. The guest I<must> "
27897 "be shut off, else you will get disk corruption."
27901 #: ../tools/virt-win-reg.pl:474
27902 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
27906 #: ../tools/virt-win-reg.pl:476
27908 "Prepare a DOS batch script, VBScript or executable. Upload this using "
27909 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
27910 "is uploaded into C<C:\\>:"
27914 #: ../tools/virt-win-reg.pl:480
27917 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
27922 #: ../tools/virt-win-reg.pl:482
27923 msgid "Prepare a regedit file containing the registry change:"
27927 #: ../tools/virt-win-reg.pl:484
27930 " cat > test.reg <<'EOF'\n"
27931 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
27932 " \"Test\"=\"c:\\\\test.bat\"\n"
27938 #: ../tools/virt-win-reg.pl:489
27940 "In this example we use the key C<RunOnce> which means that the script will "
27941 "run precisely once when the first user logs in. If you want it to run every "
27942 "time a user logs in, replace C<RunOnce> with C<Run>."
27946 #: ../tools/virt-win-reg.pl:493
27947 msgid "Now update the registry:"
27951 #: ../tools/virt-win-reg.pl:495
27954 " virt-win-reg --merge WindowsGuest test.reg\n"
27959 #: ../tools/virt-win-reg.pl:497
27960 msgid "INSTALLING A SERVICE"
27964 #: ../tools/virt-win-reg.pl:499
27966 "This section assumes you are familiar with Windows services, and you either "
27967 "have a program which handles the Windows Service Control Protocol directly "
27968 "or you want to run any program using a service wrapper like SrvAny or the "
27973 #: ../tools/virt-win-reg.pl:504
27975 "First upload the program and optionally the service wrapper. In this case "
27976 "the test program is called C<test.exe> and we are using the RHSrvAny "
27981 #: ../tools/virt-win-reg.pl:508
27984 " guestfish -i -d WindowsGuest <<EOF\n"
27985 " upload rhsrvany.exe /rhsrvany.exe\n"
27986 " upload test.exe /test.exe\n"
27992 #: ../tools/virt-win-reg.pl:513
27994 "Prepare a regedit file containing the registry changes. In this example, "
27995 "the first registry change is needed for the service itself or the service "
27996 "wrapper (if used). The second registry change is only needed because I am "
27997 "using the RHSrvAny service wrapper."
28001 #: ../tools/virt-win-reg.pl:518
28004 " cat > service.reg <<'EOF'\n"
28005 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
28006 " \"Type\"=dword:00000010\n"
28007 " \"Start\"=dword:00000002\n"
28008 " \"ErrorControl\"=dword:00000001\n"
28009 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
28010 " \"DisplayName\"=\"RHSrvAny\"\n"
28011 " \"ObjectName\"=\"NetworkService\"\n"
28016 #: ../tools/virt-win-reg.pl:527
28019 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
28020 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
28021 " \"PWD\"=\"c:\\\\Temp\"\n"
28027 #: ../tools/virt-win-reg.pl:538
28029 "For use of C<ControlSet001> see the section above in this manual page. You "
28030 "may need to adjust this according to the control set that is in use by the "
28035 #: ../tools/virt-win-reg.pl:544
28037 "C<\"ObjectName\"> controls the privileges that the service will have. An "
28038 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
28039 "privileged account."
28043 #: ../tools/virt-win-reg.pl:550
28045 "For the meaning of the magic numbers, see this Microsoft KB article: "
28046 "L<http://support.microsoft.com/kb/103000>."
28050 #: ../tools/virt-win-reg.pl:555
28051 msgid "Update the registry:"
28055 #: ../tools/virt-win-reg.pl:557
28058 " virt-win-reg --merge WindowsGuest service.reg\n"
28063 #: ../tools/virt-win-reg.pl:561
28065 "Be careful when passing parameters containing C<\\> (backslash) in the "
28066 "shell. Usually you will have to use 'single quotes' or double backslashes "
28067 "(but not both) to protect them from the shell."
28071 #: ../tools/virt-win-reg.pl:565
28072 msgid "Paths and value names are case-insensitive."
28076 #: ../tools/virt-win-reg.pl:574
28078 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
28079 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
28080 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
28081 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
28085 #: ../tools/virt-win-reg.pl:589 ../tools/virt-make-fs.pl:550
28087 "When reporting bugs, please enable debugging and capture the I<complete> "
28092 #: ../tools/virt-win-reg.pl:592
28095 " export LIBGUESTFS_DEBUG=1\n"
28096 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
28101 #: ../tools/virt-win-reg.pl:595
28103 "Attach /tmp/virt-win-reg.log to a new bug report at "
28104 "L<https://bugzilla.redhat.com/>"
28108 #: ../tools/virt-win-reg.pl:604 ../tools/virt-resize.pl:1510 ../tools/virt-make-fs.pl:565
28109 msgid "Copyright (C) 2010 Red Hat Inc."
28113 #: ../tools/virt-resize.pl:42
28114 msgid "virt-resize - Resize a virtual machine disk"
28118 #: ../tools/virt-resize.pl:46
28121 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
28122 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
28123 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
28128 #: ../tools/virt-resize.pl:52
28130 "Virt-resize is a tool which can resize a virtual machine disk, making it "
28131 "larger or smaller overall, and resizing or deleting any partitions contained "
28136 #: ../tools/virt-resize.pl:56
28138 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
28139 "not> be used on live virtual machines - for consistent results, shut the "
28140 "virtual machine down before resizing it."
28144 #: ../tools/virt-resize.pl:60
28146 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
28147 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
28151 #: ../tools/virt-resize.pl:66
28153 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
28154 "fill the extra 5GB of space."
28158 #: ../tools/virt-resize.pl:69
28161 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
28162 " virt-filesystems --long -h --all -a olddisk\n"
28163 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
28164 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
28169 #: ../tools/virt-resize.pl:74
28171 "As above, but make the /boot partition 200MB bigger, while giving the "
28172 "remaining space to /dev/sda2:"
28176 #: ../tools/virt-resize.pl:77
28179 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
28184 #: ../tools/virt-resize.pl:79
28185 msgid "As above, but the output format will be uncompressed qcow2:"
28189 #: ../tools/virt-resize.pl:81
28192 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
28193 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
28198 #: ../tools/virt-resize.pl:84
28199 msgid "DETAILED USAGE"
28203 #: ../tools/virt-resize.pl:86
28204 msgid "EXPANDING A VIRTUAL MACHINE DISK"
28208 #: ../tools/virt-resize.pl:90
28209 msgid "1. Shut down the virtual machine"
28213 #: ../tools/virt-resize.pl:92
28214 msgid "2. Locate input disk image"
28218 #: ../tools/virt-resize.pl:94
28220 "Locate the input disk image (ie. the file or device on the host containing "
28221 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
28222 "dumpxml> like this to find the disk image name:"
28226 #: ../tools/virt-resize.pl:98
28229 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
28230 " Found 1 nodes:\n"
28232 " <source dev=\"/dev/vg/lv_guest\" />\n"
28237 #: ../tools/virt-resize.pl:103
28238 msgid "3. Look at current sizing"
28242 #: ../tools/virt-resize.pl:105
28243 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
28247 #: ../tools/virt-resize.pl:108
28250 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
28251 " Name Type Size Parent\n"
28252 " /dev/sda1 partition 101M /dev/sda\n"
28253 " /dev/sda2 partition 7.9G /dev/sda\n"
28254 " /dev/sda device 8.0G -\n"
28259 #: ../tools/virt-resize.pl:114
28261 "(This example is a virtual machine with an 8 GB disk which we would like to "
28262 "expand up to 10 GB)."
28266 #: ../tools/virt-resize.pl:117
28267 msgid "4. Create output disk"
28271 #: ../tools/virt-resize.pl:119
28273 "Virt-resize cannot do in-place disk modifications. You have to have space "
28274 "to store the resized output disk."
28278 #: ../tools/virt-resize.pl:122
28279 msgid "To store the resized disk image in a file, create a file of a suitable size:"
28283 #: ../tools/virt-resize.pl:125
28286 " # rm -f outdisk\n"
28287 " # truncate -s 10G outdisk\n"
28292 #: ../tools/virt-resize.pl:128
28293 msgid "Or use L<lvcreate(1)> to create a logical volume:"
28297 #: ../tools/virt-resize.pl:130
28300 " # lvcreate -L 10G -n lv_name vg_name\n"
28305 #: ../tools/virt-resize.pl:132
28306 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
28310 #: ../tools/virt-resize.pl:134
28313 " # virsh pool-list\n"
28314 " # virsh vol-create-as poolname newvol 10G\n"
28319 #: ../tools/virt-resize.pl:137
28324 #: ../tools/virt-resize.pl:139
28326 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
28327 "file) and the output disk. The output disk is the one created in the "
28332 #: ../tools/virt-resize.pl:143
28335 " # virt-resize indisk outdisk\n"
28340 #: ../tools/virt-resize.pl:145
28342 "This command just copies disk image C<indisk> to disk image C<outdisk> "
28343 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
28344 "larger, then an extra, empty partition is created at the end of the disk "
28345 "covering the extra space. If C<outdisk> is smaller, then it will give an "
28350 #: ../tools/virt-resize.pl:151
28352 "More realistically you'd want to expand existing partitions in the disk "
28353 "image by passing extra options (for the full list see the L</OPTIONS> "
28358 #: ../tools/virt-resize.pl:155
28360 "L</--expand> is the most useful option. It expands the named partition "
28361 "within the disk to fill any extra space:"
28365 #: ../tools/virt-resize.pl:158
28368 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
28373 #: ../tools/virt-resize.pl:160
28375 "(In this case, an extra partition is I<not> created at the end of the disk, "
28376 "because there will be no unused space)."
28380 #: ../tools/virt-resize.pl:163
28382 "L</--resize> is the other commonly used option. The following would "
28383 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
28384 "rest of the available space:"
28388 #: ../tools/virt-resize.pl:167
28391 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
28392 " indisk outdisk\n"
28397 #: ../tools/virt-resize.pl:170
28399 "If the expanded partition in the image contains a filesystem or LVM PV, then "
28400 "if virt-resize knows how, it will resize the contents, the equivalent of "
28401 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or "
28402 "L<ntfsresize(8)>. However virt-resize does not know how to resize some "
28403 "filesystems, so you would have to online resize them after booting the "
28408 #: ../tools/virt-resize.pl:177
28409 msgid "Other options are covered below."
28413 #: ../tools/virt-resize.pl:179
28418 #: ../tools/virt-resize.pl:181
28419 msgid "Thoroughly test the new disk image I<before> discarding the old one."
28423 #: ../tools/virt-resize.pl:183
28424 msgid "If you are using libvirt, edit the XML to point at the new disk:"
28428 #: ../tools/virt-resize.pl:185
28431 " # virsh edit guestname\n"
28436 #: ../tools/virt-resize.pl:187
28438 "Change E<lt>source ...E<gt>, see "
28439 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
28443 #: ../tools/virt-resize.pl:190
28444 msgid "Then start up the domain with the new, resized disk:"
28448 #: ../tools/virt-resize.pl:192
28451 " # virsh start guestname\n"
28456 #: ../tools/virt-resize.pl:194
28458 "and check that it still works. See also the L</NOTES> section below for "
28459 "additional information."
28463 #: ../tools/virt-resize.pl:197
28464 msgid "7. Resize LVs etc inside the guest"
28468 #: ../tools/virt-resize.pl:199
28469 msgid "(This can also be done offline using L<guestfish(1)>)"
28473 #: ../tools/virt-resize.pl:201
28475 "Once the guest has booted you should see the new space available, at least "
28476 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
28477 "may need to resize LVs inside PVs, and also resize filesystem types that "
28478 "virt-resize does not know how to expand."
28482 #: ../tools/virt-resize.pl:208
28483 msgid "SHRINKING A VIRTUAL MACHINE DISK"
28487 #: ../tools/virt-resize.pl:210
28489 "Shrinking is somewhat more complex than expanding, and only an overview is "
28494 #: ../tools/virt-resize.pl:213
28496 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
28497 "filesystems). The user has to shrink content before passing the disk image "
28498 "to virt-resize, and virt-resize will check that the content has been shrunk "
28503 #: ../tools/virt-resize.pl:218
28504 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
28508 #: ../tools/virt-resize.pl:220
28510 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
28511 "steps 3 and 4 above to allocate a new disk image."
28515 #: ../tools/virt-resize.pl:223
28516 msgid "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
28520 #: ../tools/virt-resize.pl:226
28521 msgid "IGNORING OR DELETING PARTITIONS"
28525 #: ../tools/virt-resize.pl:228
28527 "virt-resize also gives a convenient way to ignore or delete partitions when "
28528 "copying from the input disk to the output disk. Ignoring a partition speeds "
28529 "up the copy where you don't care about the existing contents of a "
28530 "partition. Deleting a partition removes it completely, but note that it "
28531 "also renumbers any partitions after the one which is deleted, which can "
28532 "leave some guests unbootable."
28536 #: ../tools/virt-resize.pl:235
28537 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
28541 #: ../tools/virt-resize.pl:237
28543 "If the input disk is in qcow2 format, then you may prefer that the output is "
28544 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
28545 "the fly. The output format is simply determined by the format of the empty "
28546 "output container that you provide. Thus to create qcow2 output, use:"
28550 #: ../tools/virt-resize.pl:243
28553 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
28558 #: ../tools/virt-resize.pl:245
28559 msgid "instead of the truncate command (use C<-c> for a compressed disk)."
28563 #: ../tools/virt-resize.pl:247
28564 msgid "Similarly, to get non-sparse raw output use:"
28568 #: ../tools/virt-resize.pl:249
28571 " fallocate -l size outdisk\n"
28576 #: ../tools/virt-resize.pl:251
28578 "(on older systems that don't have the L<fallocate(1)> command use C<dd "
28579 "if=/dev/zero of=outdisk bs=1M count=..>)"
28583 #: ../tools/virt-resize.pl:264
28584 msgid "Display help."
28588 #: ../tools/virt-resize.pl:278
28589 msgid "B<--resize part=size>"
28593 #: ../tools/virt-resize.pl:280
28595 "Resize the named partition (expanding or shrinking it) so that it has the "
28600 #: ../tools/virt-resize.pl:283
28602 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
28603 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
28604 "Exabytes; or as a percentage of the current size; or as a relative number or "
28605 "percentage. For example:"
28609 #: ../tools/virt-resize.pl:288
28612 " --resize /dev/sda2=10G\n"
28617 #: ../tools/virt-resize.pl:290
28620 " --resize /dev/sda4=90%\n"
28625 #: ../tools/virt-resize.pl:292
28628 " --resize /dev/sda2=+1G\n"
28633 #: ../tools/virt-resize.pl:294
28636 " --resize /dev/sda2=-200M\n"
28641 #: ../tools/virt-resize.pl:296
28644 " --resize /dev/sda1=+128K\n"
28649 #: ../tools/virt-resize.pl:298
28652 " --resize /dev/sda1=+10%\n"
28657 #: ../tools/virt-resize.pl:300
28660 " --resize /dev/sda1=-10%\n"
28665 #: ../tools/virt-resize.pl:302
28667 "You can increase the size of any partition. Virt-resize will expand the "
28668 "direct content of the partition if it knows how (see C<--expand> below)."
28672 #: ../tools/virt-resize.pl:306
28674 "You can only I<decrease> the size of partitions that contain filesystems or "
28675 "PVs which have already been shrunk. Virt-resize will check this has been "
28676 "done before proceeding, or else will print an error (see also "
28677 "C<--resize-force>)."
28681 #: ../tools/virt-resize.pl:311 ../tools/virt-resize.pl:403 ../tools/virt-resize.pl:420
28682 msgid "You can give this option multiple times."
28686 #: ../tools/virt-resize.pl:317
28687 msgid "B<--resize-force part=size>"
28691 #: ../tools/virt-resize.pl:319
28693 "This is the same as C<--resize> except that it will let you decrease the "
28694 "size of any partition. Generally this means you will lose any data which "
28695 "was at the end of the partition you shrink, but you may not care about that "
28696 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
28697 "as a swap partition)."
28701 #: ../tools/virt-resize.pl:325
28702 msgid "See also the C<--ignore> option."
28706 #: ../tools/virt-resize.pl:331
28707 msgid "B<--expand part>"
28711 #: ../tools/virt-resize.pl:333
28713 "Expand the named partition so it uses up all extra space (space left over "
28714 "after any other resize changes that you request have been done)."
28718 #: ../tools/virt-resize.pl:336
28720 "If virt-resize knows how, it will expand the direct content of the "
28721 "partition. For example, if the partition is an LVM PV, it will expand the "
28722 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
28723 "content it doesn't know about alone."
28727 #: ../tools/virt-resize.pl:341
28728 msgid "Currently virt-resize can resize:"
28732 #: ../tools/virt-resize.pl:347
28734 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
28739 #: ../tools/virt-resize.pl:352
28741 "NTFS filesystems contained directly in a partition, if libguestfs was "
28742 "compiled with support for NTFS."
28746 #: ../tools/virt-resize.pl:355
28748 "The filesystem must have been shut down consistently last time it was used. "
28749 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
28750 "consistency check, so at the first boot after resizing Windows will check "
28755 #: ../tools/virt-resize.pl:362
28757 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
28758 "inside the PV, but see the C<--LV-expand> option. The user could also "
28759 "resize LVs as desired after boot."
28763 #: ../tools/virt-resize.pl:368 ../tools/virt-resize.pl:390
28764 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
28768 #: ../tools/virt-resize.pl:374
28769 msgid "B<--shrink part>"
28773 #: ../tools/virt-resize.pl:376
28775 "Shrink the named partition until the overall disk image fits in the "
28776 "destination. The named partition B<must> contain a filesystem or PV which "
28777 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
28778 "online tools). Virt-resize will check this and give an error if it has not "
28783 #: ../tools/virt-resize.pl:382
28785 "The amount by which the overall disk must be shrunk (after carrying out all "
28786 "other operations requested by the user) is called the \"deficit\". For "
28787 "example, a straight copy (assume no other operations) from a 5GB disk image "
28788 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
28789 "would give an error unless the user specified a partition to shrink and that "
28790 "partition had more than a gigabyte of free space."
28794 #: ../tools/virt-resize.pl:396
28795 msgid "B<--ignore part>"
28799 #: ../tools/virt-resize.pl:398
28801 "Ignore the named partition. Effectively this means the partition is "
28802 "allocated on the destination disk, but the content is not copied across from "
28803 "the source disk. The content of the partition will be blank (all zero "
28808 #: ../tools/virt-resize.pl:409
28809 msgid "B<--delete part>"
28813 #: ../tools/virt-resize.pl:411
28815 "Delete the named partition. It would be more accurate to describe this as "
28816 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
28817 "the original disk image is left intact."
28821 #: ../tools/virt-resize.pl:415
28823 "Note that when you delete a partition, then anything contained in the "
28824 "partition is also deleted. Furthermore, this causes any partitions that "
28825 "come after to be I<renumbered>, which can easily make your guest unbootable."
28829 #: ../tools/virt-resize.pl:426
28830 msgid "B<--LV-expand logvol>"
28834 #: ../tools/virt-resize.pl:428
28836 "This takes the logical volume and, as a final step, expands it to fill all "
28837 "the space available in its volume group. A typical usage, assuming a Linux "
28838 "guest with a single PV C</dev/sda2> and a root device called "
28839 "C</dev/vg_guest/lv_root> would be:"
28843 #: ../tools/virt-resize.pl:433
28846 " virt-resize indisk outdisk \\\n"
28847 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
28852 #: ../tools/virt-resize.pl:436
28854 "This would first expand the partition (and PV), and then expand the root "
28855 "device to fill the extra space in the PV."
28859 #: ../tools/virt-resize.pl:439
28861 "The contents of the LV are also resized if virt-resize knows how to do "
28862 "that. You can stop virt-resize from trying to expand the content by using "
28863 "the option C<--no-expand-content>."
28867 #: ../tools/virt-resize.pl:443
28868 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
28872 #: ../tools/virt-resize.pl:446
28874 "You can give this option multiple times, I<but> it doesn't make sense to do "
28875 "this unless the logical volumes you specify are all in different volume "
28880 #: ../tools/virt-resize.pl:454
28881 msgid "B<--no-copy-boot-loader>"
28885 #: ../tools/virt-resize.pl:456
28887 "By default, virt-resize copies over some sectors at the start of the disk "
28888 "(up to the beginning of the first partition). Commonly these sectors "
28889 "contain the Master Boot Record (MBR) and the boot loader, and are required "
28890 "in order for the guest to boot correctly."
28894 #: ../tools/virt-resize.pl:461
28896 "If you specify this flag, then this initial copy is not done. You may need "
28897 "to reinstall the boot loader in this case."
28901 #: ../tools/virt-resize.pl:469
28902 msgid "B<--no-extra-partition>"
28906 #: ../tools/virt-resize.pl:471
28908 "By default, virt-resize creates an extra partition if there is any extra, "
28909 "unused space after all resizing has happened. Use this option to prevent "
28910 "the extra partition from being created. If you do this then the extra space "
28911 "will be inaccessible until you run fdisk, parted, or some other partitioning "
28912 "tool in the guest."
28916 #: ../tools/virt-resize.pl:477
28918 "Note that if the surplus space is smaller than 10 MB, no extra partition "
28923 #: ../tools/virt-resize.pl:484
28924 msgid "B<--no-expand-content>"
28928 #: ../tools/virt-resize.pl:486
28930 "By default, virt-resize will try to expand the direct contents of "
28931 "partitions, if it knows how (see C<--expand> option above)."
28935 #: ../tools/virt-resize.pl:489
28937 "If you give the C<--no-expand-content> option then virt-resize will not "
28942 #: ../tools/virt-resize.pl:496
28943 msgid "B<-d> | B<--debug>"
28947 #: ../tools/virt-resize.pl:504
28948 msgid "B<-n> | B<--dryrun>"
28952 #: ../tools/virt-resize.pl:506
28953 msgid "Print a summary of what would be done, but don't do anything."
28957 #: ../tools/virt-resize.pl:512
28958 msgid "B<-q> | B<--quiet>"
28962 #: ../tools/virt-resize.pl:514
28963 msgid "Don't print the summary."
28967 #: ../tools/virt-resize.pl:522
28969 "Specify the format of the input disk image. If this flag is not given then "
28970 "it is auto-detected from the image itself."
28974 #: ../tools/virt-resize.pl:528
28976 "Note that this option I<does not> affect the output format. See L</QCOW2 "
28977 "AND NON-SPARSE RAW FORMATS>."
28981 #: ../tools/virt-resize.pl:535
28982 msgid "B<--output-format> raw"
28986 #: ../tools/virt-resize.pl:537
28988 "Specify the format of the output disk image. If this flag is not given then "
28989 "it is auto-detected from the image itself."
28993 #: ../tools/virt-resize.pl:543
28995 "Note that you still need to create the output disk with the right format. "
28996 "See L</QCOW2 AND NON-SPARSE RAW FORMATS>."
29000 #: ../tools/virt-resize.pl:1419
29005 #: ../tools/virt-resize.pl:1421
29006 msgid "\"Partition 1 does not end on cylinder boundary.\""
29010 #: ../tools/virt-resize.pl:1423
29012 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
29013 "means the partitions will not be aligned to the ancient CHS geometry. "
29014 "However CHS geometry is meaningless for disks manufactured since the early "
29015 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
29016 "cylinders is not required by any modern operating system."
29020 #: ../tools/virt-resize.pl:1430
29021 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
29025 #: ../tools/virt-resize.pl:1432
29027 "In Windows Vista and later versions, Microsoft switched to using a separate "
29028 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
29029 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
29030 "the boot partition. Doing so seems to break the guest completely. However "
29031 "expanding the second partition (ie. C: drive) should work."
29035 #: ../tools/virt-resize.pl:1439
29037 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
29038 "NTFS partitions have been expanded. This is just a safety check and (unless "
29039 "it find errors) is nothing to worry about."
29043 #: ../tools/virt-resize.pl:1443
29044 msgid "GUEST BOOT STUCK AT \"GRUB\""
29048 #: ../tools/virt-resize.pl:1445
29050 "If a Linux guest does not boot after resizing, and the boot is stuck after "
29051 "printing C<GRUB> on the console, try reinstalling grub. This sometimes "
29052 "happens on older (RHEL 5-era) guests, for reasons we don't fully understand, "
29053 "although we think is to do with partition alignment."
29057 #: ../tools/virt-resize.pl:1450
29060 " guestfish -i -a newdisk\n"
29061 " ><fs> cat /boot/grub/device.map\n"
29062 " # check the contents of this file are sensible or\n"
29063 " # edit the file if necessary\n"
29064 " ><fs> grub-install / /dev/vda\n"
29070 #: ../tools/virt-resize.pl:1457
29072 "For more flexible guest reconfiguration, including if you need to specify "
29073 "other parameters to grub-install, use L<virt-rescue(1)>."
29077 #: ../tools/virt-resize.pl:1460
29078 msgid "ALTERNATIVE TOOLS"
29082 #: ../tools/virt-resize.pl:1462
29084 "There are several proprietary tools for resizing partitions. We won't "
29085 "mention any here."
29089 #: ../tools/virt-resize.pl:1465
29091 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
29092 "operations on disk images. They can resize and move partitions, but I don't "
29093 "think they can do anything with the contents, and they certainly don't "
29098 #: ../tools/virt-resize.pl:1470
29100 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
29101 "but at a much lower level. You will probably end up hand-calculating sector "
29102 "offsets, which is something that virt-resize was designed to avoid. If you "
29103 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
29108 #: ../tools/virt-resize.pl:1485
29110 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, "
29111 "L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, "
29112 "L<ntfsresize(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, "
29113 "L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, "
29114 "L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
29118 #: ../tools/virt-list-filesystems.pl:32
29119 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
29123 #: ../tools/virt-list-filesystems.pl:36
29126 " virt-list-filesystems [--options] domname\n"
29131 #: ../tools/virt-list-filesystems.pl:38
29134 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
29139 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
29141 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
29146 #: ../tools/virt-list-filesystems.pl:45
29148 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
29149 "are contained in a virtual machine or disk image."
29153 #: ../tools/virt-list-filesystems.pl:49
29155 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
29156 "functionality. For more complex cases you should look at the "
29157 "L<guestfish(1)> tool."
29161 #: ../tools/virt-list-filesystems.pl:106 ../tools/virt-list-partitions.pl:115
29162 msgid "B<-l> | B<--long>"
29166 #: ../tools/virt-list-filesystems.pl:108
29168 "With this option, C<virt-list-filesystems> displays the type of each "
29169 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
29173 #: ../tools/virt-list-filesystems.pl:115
29174 msgid "B<-a> | B<--all>"
29178 #: ../tools/virt-list-filesystems.pl:117
29180 "Normally we only show mountable filesystems. If this option is given then "
29181 "swap devices are shown too."
29185 #: ../tools/virt-list-filesystems.pl:191
29187 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
29188 "L<virt-filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, "
29189 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
29193 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-tar.pl:307
29194 msgid "Copyright (C) 2009 Red Hat Inc."
29198 #: ../tools/virt-tar.pl:33
29199 msgid "virt-tar - Extract or upload files to a virtual machine"
29203 #: ../tools/virt-tar.pl:37
29206 " virt-tar [--options] -x domname directory tarball\n"
29211 #: ../tools/virt-tar.pl:39
29214 " virt-tar [--options] -u domname tarball directory\n"
29219 #: ../tools/virt-tar.pl:41
29222 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
29227 #: ../tools/virt-tar.pl:43
29230 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
29235 #: ../tools/virt-tar.pl:47
29237 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, "
29238 "L<virt-tar-in(1)>, L<virt-tar-out(1)> as replacements."
29242 #: ../tools/virt-tar.pl:52
29243 msgid "Download C</home> from the VM into a local tarball:"
29247 #: ../tools/virt-tar.pl:54
29250 " virt-tar -x domname /home home.tar\n"
29255 #: ../tools/virt-tar.pl:56
29258 " virt-tar -zx domname /home home.tar.gz\n"
29263 #: ../tools/virt-tar.pl:58
29264 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
29268 #: ../tools/virt-tar.pl:60
29271 " virt-tar -u domname uploadstuff.tar /tmp\n"
29276 #: ../tools/virt-tar.pl:62
29279 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
29284 #: ../tools/virt-tar.pl:66
29286 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
29287 "virtual machines. If you do this, you risk disk corruption in the VM. "
29288 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
29292 #: ../tools/virt-tar.pl:71
29294 "You can use C<-x> (extract) on live virtual machines, but you might get "
29295 "inconsistent results or errors if there is filesystem activity inside the "
29296 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
29297 "work, but the only way to guarantee consistent results is if the virtual "
29298 "machine is shut down."
29302 #: ../tools/virt-tar.pl:79
29304 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
29305 "parts of a guest filesystem. There are many possibilities: making backups, "
29306 "uploading data files, snooping on guest activity, fixing or customizing "
29311 #: ../tools/virt-tar.pl:84
29313 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
29314 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
29315 "should look at the L<guestfish(1)> tool."
29319 #: ../tools/virt-tar.pl:88
29321 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
29322 "its contents (recursively) from the virtual machine into a local tarball. "
29323 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
29324 "virtual machine. You cannot use these two options together."
29328 #: ../tools/virt-tar.pl:94
29330 "In addition, you may need to use the C<-z> (gZip) option to enable "
29331 "compression. When uploading, you have to specify C<-z> if the upload file "
29332 "is compressed because virt-tar won't detect this on its own."
29336 #: ../tools/virt-tar.pl:98
29338 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
29339 "example it cannot do PKZip files or bzip2 compression. If you want that "
29340 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
29341 "the L<libguestfs(3)> API)."
29345 #: ../tools/virt-tar.pl:156
29346 msgid "B<-x> | B<--extract> | B<--download>"
29350 #: ../tools/virt-tar.pl:158
29351 msgid "B<-u> | B<--upload>"
29355 #: ../tools/virt-tar.pl:160
29357 "Use C<-x> to extract (download) a directory from a virtual machine to a "
29362 #: ../tools/virt-tar.pl:163
29364 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
29365 "Please read the L</WARNING> section above before using this option."
29369 #: ../tools/virt-tar.pl:167
29370 msgid "You must specify exactly one of these options."
29374 #: ../tools/virt-tar.pl:173
29375 msgid "B<-z> | B<--gzip>"
29379 #: ../tools/virt-tar.pl:175
29380 msgid "Specify that the input or output tarball is gzip-compressed."
29384 #: ../tools/virt-tar.pl:288
29386 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
29387 "L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
29388 "L<virt-tar-out(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
29389 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
29393 #: ../tools/virt-make-fs.pl:37
29394 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
29398 #: ../tools/virt-make-fs.pl:41
29401 " virt-make-fs [--options] input.tar output.img\n"
29406 #: ../tools/virt-make-fs.pl:43
29409 " virt-make-fs [--options] input.tar.gz output.img\n"
29414 #: ../tools/virt-make-fs.pl:45
29417 " virt-make-fs [--options] directory output.img\n"
29422 #: ../tools/virt-make-fs.pl:49
29424 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
29425 "archive or some files in a directory. It is similar to tools like "
29426 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
29427 "it can create common filesystem types like ext2/3 or NTFS, which can be "
29428 "useful if you want to attach these filesystems to existing virtual machines "
29429 "(eg. to import large amounts of read-only data to a VM)."
29433 #: ../tools/virt-make-fs.pl:57
29434 msgid "Basic usage is:"
29438 #: ../tools/virt-make-fs.pl:59
29441 " virt-make-fs input output\n"
29446 #: ../tools/virt-make-fs.pl:61
29448 "where C<input> is either a directory containing files that you want to add, "
29449 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
29450 "C<output> is a disk image. The input type is detected automatically. The "
29451 "output disk image defaults to a raw ext2 image unless you specify extra "
29452 "flags (see L</OPTIONS> below)."
29456 #: ../tools/virt-make-fs.pl:67
29457 msgid "EXTRA SPACE"
29461 #: ../tools/virt-make-fs.pl:69
29463 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
29464 "the files that it contains, but might have extra space. Depending on how "
29465 "you are going to use the output, you might think this extra space is wasted "
29466 "and want to minimize it, or you might want to leave space so that more files "
29467 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
29468 "but you can use the C<--size> flag to leave space in the filesystem if you "
29473 #: ../tools/virt-make-fs.pl:77
29475 "An alternative way to leave extra space but not make the output image any "
29476 "bigger is to use an alternative disk image format (instead of the default "
29477 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
29478 "image format (check your hypervisor supports this before using it). This "
29479 "allows you to choose a large C<--size> but the extra space won't actually be "
29480 "allocated in the image until you try to store something in it."
29484 #: ../tools/virt-make-fs.pl:85
29486 "Don't forget that you can also use local commands including L<resize2fs(8)> "
29487 "and L<virt-resize(1)> to resize existing filesystems, or rerun "
29488 "virt-make-resize to build another image from scratch."
29492 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123 ../tools/virt-make-fs.pl:142
29497 #: ../tools/virt-make-fs.pl:91
29500 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
29505 #: ../tools/virt-make-fs.pl:93
29506 msgid "FILESYSTEM TYPE"
29510 #: ../tools/virt-make-fs.pl:95
29512 "The default filesystem type is C<ext2>. Just about any filesystem type that "
29513 "libguestfs supports can be used (but I<not> read-only formats like "
29514 "ISO9660). Here are some of the more common choices:"
29518 #: ../tools/virt-make-fs.pl:101
29523 #: ../tools/virt-make-fs.pl:103
29525 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
29526 "you are not going to use the filesystem in a way that requires the journal, "
29527 "then this is just wasted overhead."
29531 #: ../tools/virt-make-fs.pl:107
29532 msgid "I<ntfs> or I<vfat>"
29536 #: ../tools/virt-make-fs.pl:109
29537 msgid "Useful if exporting data to a Windows guest."
29541 #: ../tools/virt-make-fs.pl:111
29543 "I<Note for vfat>: The tar archive or local directory must only contain files "
29544 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
29545 "program running within libguestfs is unable to change the ownership of "
29546 "non-root files, since vfat itself does not support this."
29550 #: ../tools/virt-make-fs.pl:116
29555 #: ../tools/virt-make-fs.pl:118
29557 "Lower overhead than C<ext2>, but certain limitations on filename length and "
29558 "total filesystem size."
29562 #: ../tools/virt-make-fs.pl:125
29565 " virt-make-fs --type=minix input minixfs.img\n"
29570 #: ../tools/virt-make-fs.pl:127
29571 msgid "TO PARTITION OR NOT TO PARTITION"
29575 #: ../tools/virt-make-fs.pl:129
29576 msgid "Optionally virt-make-fs can add a partition table to the output disk."
29580 #: ../tools/virt-make-fs.pl:131
29582 "Adding a partition can make the disk image more compatible with certain "
29583 "virtualized operating systems which don't expect to see a filesystem "
29584 "directly located on a block device (Linux doesn't care and will happily "
29585 "handle both types)."
29589 #: ../tools/virt-make-fs.pl:136
29591 "On the other hand, if you have a partition table then the output image is no "
29592 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
29593 "directly on a partitioned disk image. (However libguestfs tools such as "
29594 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
29598 #: ../tools/virt-make-fs.pl:144
29599 msgid "Add an MBR partition:"
29603 #: ../tools/virt-make-fs.pl:146
29606 " virt-make-fs --partition -- input disk.img\n"
29611 #: ../tools/virt-make-fs.pl:148
29613 "If the output disk image could be terabyte-sized or larger, it's better to "
29614 "use an EFI/GPT-compatible partition table:"
29618 #: ../tools/virt-make-fs.pl:151
29621 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
29626 #: ../tools/virt-make-fs.pl:179
29627 msgid "Enable debugging information."
29631 #: ../tools/virt-make-fs.pl:185
29632 msgid "B<--size=E<lt>NE<gt>>"
29636 #: ../tools/virt-make-fs.pl:187
29637 msgid "B<--size=+E<lt>NE<gt>>"
29641 #: ../tools/virt-make-fs.pl:189
29642 msgid "B<-s E<lt>NE<gt>>"
29646 #: ../tools/virt-make-fs.pl:191
29647 msgid "B<-s +E<lt>NE<gt>>"
29651 #: ../tools/virt-make-fs.pl:193
29652 msgid "Use the C<--size> (or C<-s>) option to choose the size of the output image."
29656 #: ../tools/virt-make-fs.pl:196
29658 "If this option is I<not> given, then the output image will be just large "
29659 "enough to contain all the files, with not much wasted space."
29663 #: ../tools/virt-make-fs.pl:199
29665 "To choose a fixed size output disk, specify an absolute number followed by "
29666 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
29667 "Petabytes or Exabytes. This must be large enough to contain all the input "
29668 "files, else you will get an error."
29672 #: ../tools/virt-make-fs.pl:204
29674 "To leave extra space, specify C<+> (plus sign) and a number followed by "
29675 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
29676 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
29677 "the input files, and (approximately) an extra 200 MB free space."
29681 #: ../tools/virt-make-fs.pl:210
29683 "Note that virt-make-fs estimates free space, and therefore will not produce "
29684 "filesystems containing precisely the free space requested. (It is much more "
29685 "expensive and time-consuming to produce a filesystem which has precisely the "
29686 "desired free space)."
29690 #: ../tools/virt-make-fs.pl:219
29691 msgid "B<--format=E<lt>fmtE<gt>>"
29695 #: ../tools/virt-make-fs.pl:221
29696 msgid "B<-F E<lt>fmtE<gt>>"
29700 #: ../tools/virt-make-fs.pl:223
29701 msgid "Choose the output disk image format."
29705 #: ../tools/virt-make-fs.pl:225
29706 msgid "The default is C<raw> (raw disk image)."
29710 #: ../tools/virt-make-fs.pl:227
29712 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
29713 "that would really make sense here is C<qcow2>."
29717 #: ../tools/virt-make-fs.pl:234
29718 msgid "B<--type=E<lt>fsE<gt>>"
29722 #: ../tools/virt-make-fs.pl:236
29723 msgid "B<-t E<lt>fsE<gt>>"
29727 #: ../tools/virt-make-fs.pl:238
29728 msgid "Choose the output filesystem type."
29732 #: ../tools/virt-make-fs.pl:240
29733 msgid "The default is C<ext2>."
29737 #: ../tools/virt-make-fs.pl:242
29738 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
29742 #: ../tools/virt-make-fs.pl:249
29743 msgid "B<--partition>"
29747 #: ../tools/virt-make-fs.pl:251
29748 msgid "B<--partition=E<lt>parttypeE<gt>>"
29752 #: ../tools/virt-make-fs.pl:253
29754 "If specified, this flag adds an MBR partition table to the output disk "
29759 #: ../tools/virt-make-fs.pl:256
29761 "You can change the partition table type, eg. C<--partition=gpt> for large "
29766 #: ../tools/virt-make-fs.pl:259
29768 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
29769 "might consider the next parameter to be the partition type. For example:"
29773 #: ../tools/virt-make-fs.pl:263
29776 " virt-make-fs --partition input.tar ...\n"
29781 #: ../tools/virt-make-fs.pl:265
29783 "would cause virt-make-fs to think you wanted to use a partition type of "
29784 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
29785 "dash) between options and the input file argument:"
29789 #: ../tools/virt-make-fs.pl:269
29792 " virt-make-fs --partition -- input.tar ...\n"
29797 #: ../tools/virt-make-fs.pl:536
29799 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
29800 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
29801 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
29805 #: ../tools/virt-make-fs.pl:553
29808 " export LIBGUESTFS_DEBUG=1\n"
29809 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
29814 #: ../tools/virt-make-fs.pl:556
29816 "Attach /tmp/virt-make-fs.log to a new bug report at "
29817 "L<https://bugzilla.redhat.com/>"
29821 #: ../tools/virt-list-partitions.pl:32
29822 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
29826 #: ../tools/virt-list-partitions.pl:36
29829 " virt-list-partitions [--options] domname\n"
29834 #: ../tools/virt-list-partitions.pl:38
29837 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
29842 #: ../tools/virt-list-partitions.pl:45
29844 "C<virt-list-partitions> is a command line tool to list the partitions that "
29845 "are contained in a virtual machine or disk image. It is mainly useful as a "
29846 "first step to using L<virt-resize(1)>."
29850 #: ../tools/virt-list-partitions.pl:50
29852 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
29853 "functionality. For more complex cases you should look at the "
29854 "L<guestfish(1)> tool."
29858 #: ../tools/virt-list-partitions.pl:107
29859 msgid "B<-h> | B<--human-readable>"
29863 #: ../tools/virt-list-partitions.pl:109
29864 msgid "Show sizes in human-readable form (eg. \"1G\")."
29868 #: ../tools/virt-list-partitions.pl:117
29870 "With this option, C<virt-list-partitions> displays the type and size of each "
29871 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
29875 #: ../tools/virt-list-partitions.pl:124
29876 msgid "B<-t> | B<--total>"
29880 #: ../tools/virt-list-partitions.pl:126
29881 msgid "Display the total size of each block device (as a separate row or rows)."
29885 #: ../tools/virt-list-partitions.pl:259
29887 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
29888 "L<virt-list-filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, "
29889 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."