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.7.24\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2010-12-16 23:16+0000\n"
12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=utf-8\n"
17 "Content-Transfer-Encoding: ENCODING"
20 #: ../src/guestfs.pod:1 ../fish/guestfish.pod:1 ../test-tool/libguestfs-test-tool.pod:1 ../fuse/guestmount.pod:1 ../tools/virt-edit.pl:30 ../tools/virt-win-reg.pl:33 ../tools/virt-resize.pl:38 ../tools/virt-list-filesystems.pl:28 ../tools/virt-tar.pl:29 ../tools/virt-make-fs.pl:33 ../tools/virt-list-partitions.pl:28
25 #: ../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
30 #: ../src/guestfs.pod:5
31 msgid "guestfs - Library for accessing and modifying virtual machine images"
35 #: ../src/guestfs.pod:7 ../fish/guestfish.pod:7 ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7 ../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
40 #: ../src/guestfs.pod:9
43 " #include <guestfs.h>\n"
48 #: ../src/guestfs.pod:11
51 " guestfs_h *g = guestfs_create ();\n"
52 " guestfs_add_drive (g, \"guest.img\");\n"
53 " guestfs_launch (g);\n"
54 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
55 " guestfs_touch (g, \"/hello\");\n"
56 " guestfs_umount (g, \"/\");\n"
57 " guestfs_close (g);\n"
62 #: ../src/guestfs.pod:19
65 " cc prog.c -o prog -lguestfs\n"
67 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
72 #: ../src/guestfs.pod:23 ../fish/guestfish.pod:30 ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:20 ../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:72 ../tools/virt-make-fs.pl:47 ../tools/virt-list-partitions.pl:40
77 #: ../src/guestfs.pod:25
79 "Libguestfs is a library for accessing and modifying guest disk images. "
80 "Amongst the things this is good for: making batch configuration changes to "
81 "guests, getting disk used/free statistics (see also: virt-df), migrating "
82 "between virtualization systems (see also: virt-p2v), performing partial "
83 "backups, performing partial guest clones, cloning guests and changing "
84 "registry/UUID/hostname info, and much else besides."
88 #: ../src/guestfs.pod:33
90 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
91 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
92 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
97 #: ../src/guestfs.pod:38
99 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
100 "what filesystem is in each LV, etc.). It can also run commands in the "
101 "context of the guest. Also you can access filesystems over FUSE."
105 #: ../src/guestfs.pod:43
107 "Libguestfs is a library that can be linked with C and C++ management "
108 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
109 "PHP, Haskell or C#). You can also use it from shell scripts or the command "
114 #: ../src/guestfs.pod:48
116 "You don't need to be root to use libguestfs, although obviously you do need "
117 "enough permissions to access the disk images."
121 #: ../src/guestfs.pod:51
123 "Libguestfs is a large API because it can do many things. For a gentle "
124 "introduction, please read the L</API OVERVIEW> section next."
128 #: ../src/guestfs.pod:54
130 "There are also some example programs in the L<guestfs-examples(3)> manual "
135 #: ../src/guestfs.pod:57
140 #: ../src/guestfs.pod:59
142 "This section provides a gentler overview of the libguestfs API. We also try "
143 "to group API calls together, where that may not be obvious from reading "
144 "about the individual calls in the main section of this manual."
148 #: ../src/guestfs.pod:64
153 #: ../src/guestfs.pod:66
155 "Before you can use libguestfs calls, you have to create a handle. Then you "
156 "must add at least one disk image to the handle, followed by launching the "
157 "handle, then performing whatever operations you want, and finally closing "
158 "the handle. By convention we use the single letter C<g> for the name of the "
159 "handle variable, although of course you can use any name you want."
163 #: ../src/guestfs.pod:73
164 msgid "The general structure of all libguestfs-using programs looks like this:"
168 #: ../src/guestfs.pod:76
171 " guestfs_h *g = guestfs_create ();\n"
176 #: ../src/guestfs.pod:78
179 " /* Call guestfs_add_drive additional times if there are\n"
180 " * multiple disk images.\n"
182 " guestfs_add_drive (g, \"guest.img\");\n"
187 #: ../src/guestfs.pod:83
190 " /* Most manipulation calls won't work until you've launched\n"
191 " * the handle 'g'. You have to do this _after_ adding drives\n"
192 " * and _before_ other commands.\n"
194 " guestfs_launch (g);\n"
199 #: ../src/guestfs.pod:89
202 " /* Now you can examine what partitions, LVs etc are available.\n"
204 " char **partitions = guestfs_list_partitions (g);\n"
205 " char **logvols = guestfs_lvs (g);\n"
210 #: ../src/guestfs.pod:94
213 " /* To access a filesystem in the image, you must mount it.\n"
215 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
220 #: ../src/guestfs.pod:98
223 " /* Now you can perform filesystem actions on the guest\n"
226 " guestfs_touch (g, \"/hello\");\n"
231 #: ../src/guestfs.pod:103
234 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
235 " * it is done automatically when you close the handle. See\n"
236 " * discussion of autosync in this page.\n"
238 " guestfs_sync (g);\n"
243 #: ../src/guestfs.pod:109
246 " /* Close the handle 'g'. */\n"
247 " guestfs_close (g);\n"
252 #: ../src/guestfs.pod:112
254 "The code above doesn't include any error checking. In real code you should "
255 "check return values carefully for errors. In general all functions that "
256 "return integers return C<-1> on error, and all functions that return "
257 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
258 "how to handle errors, and consult the documentation for each function call "
259 "below to see precisely how they return error indications. See "
260 "L<guestfs-examples(3)> for fully worked examples."
264 #: ../src/guestfs.pod:121
269 #: ../src/guestfs.pod:123
271 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
272 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
273 "actual block device, or simply an empty file of zeroes that you have created "
274 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
279 #: ../src/guestfs.pod:129
281 "The call you should use in modern code for adding drives is "
282 "L</guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
283 "specifying that the format is raw, do:"
287 #: ../src/guestfs.pod:133
290 " guestfs_add_drive_opts (g, filename,\n"
291 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
297 #: ../src/guestfs.pod:137
298 msgid "You can add a disk read-only using:"
302 #: ../src/guestfs.pod:139
305 " guestfs_add_drive_opts (g, filename,\n"
306 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
307 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
313 #: ../src/guestfs.pod:144
315 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
316 "libguestfs won't modify the file."
320 #: ../src/guestfs.pod:147
322 "Be extremely cautious if the disk image is in use, eg. if it is being used "
323 "by a virtual machine. Adding it read-write will almost certainly cause disk "
324 "corruption, but adding it read-only is safe."
328 #: ../src/guestfs.pod:151
330 "You must add at least one disk image, and you may add multiple disk images. "
331 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
332 "first one you added), C</dev/sdb> (for the second one you added), etc."
336 #: ../src/guestfs.pod:156
338 "Once L</guestfs_launch> has been called you cannot add any more images. You "
339 "can call L</guestfs_list_devices> to get a list of the device names, in the "
340 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
344 #: ../src/guestfs.pod:161
349 #: ../src/guestfs.pod:163
351 "Before you can read or write files, create directories and so on in a disk "
352 "image that contains filesystems, you have to mount those filesystems using "
353 "L</guestfs_mount>. If you already know that a disk image contains (for "
354 "example) one partition with a filesystem on that partition, then you can "
359 #: ../src/guestfs.pod:169
362 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
367 #: ../src/guestfs.pod:171
369 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
370 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
371 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>)."
375 #: ../src/guestfs.pod:175
377 "If you are given a disk image and you don't know what it contains then you "
378 "have to find out. Libguestfs can do that too: use "
379 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
380 "and LVs, and either try mounting each to see what is mountable, or else "
381 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. Libguestfs also "
382 "has a set of APIs for inspection of disk images (see L</INSPECTION> below). "
383 "But you might find it easier to look at higher level programs built on top "
384 "of libguestfs, in particular L<virt-inspector(1)>."
388 #: ../src/guestfs.pod:185
390 "To mount a disk image read-only, use L</guestfs_mount_ro>. There are "
391 "several other variations of the C<guestfs_mount_*> call."
395 #: ../src/guestfs.pod:188
396 msgid "FILESYSTEM ACCESS AND MODIFICATION"
400 #: ../src/guestfs.pod:190
402 "The majority of the libguestfs API consists of fairly low-level calls for "
403 "accessing and modifying the files, directories, symlinks etc on mounted "
404 "filesystems. There are over a hundred such calls which you can find listed "
405 "in detail below in this man page, and we don't even pretend to cover them "
406 "all in this overview."
410 #: ../src/guestfs.pod:196
412 "Specify filenames as full paths, starting with C<\"/\"> and including the "
417 #: ../src/guestfs.pod:199
419 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
420 "the file called C<\"etc/passwd\"> then you could do:"
424 #: ../src/guestfs.pod:202
427 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
432 #: ../src/guestfs.pod:204
434 "This would return C<data> as a newly allocated buffer containing the full "
435 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
436 "or C<NULL> if there was an error."
440 #: ../src/guestfs.pod:208
442 "As another example, to create a top-level directory on that filesystem "
443 "called C<\"var\"> you would do:"
447 #: ../src/guestfs.pod:211
450 " guestfs_mkdir (g, \"/var\");\n"
455 #: ../src/guestfs.pod:213
456 msgid "To create a symlink you could do:"
460 #: ../src/guestfs.pod:215
463 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
464 " \"/etc/rc3.d/S30portmap\");\n"
469 #: ../src/guestfs.pod:218
471 "Libguestfs will reject attempts to use relative paths and there is no "
472 "concept of a current working directory."
476 #: ../src/guestfs.pod:221
478 "Libguestfs can return errors in many situations: for example if the "
479 "filesystem isn't writable, or if a file or directory that you requested "
480 "doesn't exist. If you are using the C API (documented here) you have to "
481 "check for those error conditions after each call. (Other language bindings "
482 "turn these errors into exceptions)."
486 #: ../src/guestfs.pod:227
488 "File writes are affected by the per-handle umask, set by calling "
489 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
493 #: ../src/guestfs.pod:230
498 #: ../src/guestfs.pod:232
500 "Libguestfs contains API calls to read, create and modify partition tables on "
505 #: ../src/guestfs.pod:235
507 "In the common case where you want to create a single partition covering the "
508 "whole disk, you should use the L</guestfs_part_disk> call:"
512 #: ../src/guestfs.pod:239
515 " const char *parttype = \"mbr\";\n"
516 " if (disk_is_larger_than_2TB)\n"
517 " parttype = \"gpt\";\n"
518 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
523 #: ../src/guestfs.pod:244
525 "Obviously this effectively wipes anything that was on that disk image "
530 #: ../src/guestfs.pod:247
535 #: ../src/guestfs.pod:249
537 "Libguestfs provides access to a large part of the LVM2 API, such as "
538 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
539 "unless you familiarize yourself with the concepts of physical volumes, "
540 "volume groups and logical volumes."
544 #: ../src/guestfs.pod:254
546 "This author strongly recommends reading the LVM HOWTO, online at "
547 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
551 #: ../src/guestfs.pod:257
556 #: ../src/guestfs.pod:259
558 "Use L</guestfs_cat> to download small, text only files. This call is "
559 "limited to files which are less than 2 MB and which cannot contain any ASCII "
560 "NUL (C<\\0>) characters. However it has a very simple to use API."
564 #: ../src/guestfs.pod:264
566 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
567 "bit data, since it returns a (pointer, size) pair. However it is still "
568 "limited to \"small\" files, less than 2 MB."
572 #: ../src/guestfs.pod:268
574 "L</guestfs_download> can be used to download any file, with no limits on "
575 "content or size (even files larger than 4 GB)."
579 #: ../src/guestfs.pod:271
580 msgid "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
584 #: ../src/guestfs.pod:274
589 #: ../src/guestfs.pod:276
591 "It's often the case that you want to write a file or files to the disk "
596 #: ../src/guestfs.pod:279
598 "To write a small file with fixed content, use L</guestfs_write>. To create "
599 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
600 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
601 "variety of other functions for creating test files, for example "
602 "L</guestfs_fill> and L</guestfs_fill_pattern>."
606 #: ../src/guestfs.pod:285
608 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
609 "file content or size (even files larger than 4 GB)."
613 #: ../src/guestfs.pod:288
614 msgid "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
618 #: ../src/guestfs.pod:290
620 "However the fastest way to upload I<large numbers of arbitrary files> is to "
621 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
622 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add "
623 "the drive in a predictable way (eg. adding it last after all other drives) "
624 "then you can get the device name from L</guestfs_list_devices> and mount it "
625 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
626 "sometimes non-portable between kernel versions, and they don't support "
627 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
628 "using a label or UUID, use an ISO image instead."
632 #: ../src/guestfs.pod:301
637 #: ../src/guestfs.pod:303
639 "There are various different commands for copying between files and devices "
640 "and in and out of the guest filesystem. These are summarised in the table "
645 #: ../src/guestfs.pod:309
646 msgid "B<file> to B<file>"
650 #: ../src/guestfs.pod:311
652 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
653 "directories recursively."
657 #: ../src/guestfs.pod:314
658 msgid "B<file or device> to B<file or device>"
662 #: ../src/guestfs.pod:316
664 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
665 "devices in the guest."
669 #: ../src/guestfs.pod:319
670 msgid "Example: duplicate the contents of an LV:"
674 #: ../src/guestfs.pod:321
677 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
682 #: ../src/guestfs.pod:323
684 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
685 "(C</dev/VG/Original>). To copy less than the whole source device, use "
686 "L</guestfs_copy_size>."
690 #: ../src/guestfs.pod:327
691 msgid "B<file on the host> to B<file or device>"
695 #: ../src/guestfs.pod:329
696 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
700 #: ../src/guestfs.pod:331
701 msgid "B<file or device> to B<file on the host>"
705 #: ../src/guestfs.pod:333
706 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
710 #: ../src/guestfs.pod:337
711 msgid "LISTING FILES"
715 #: ../src/guestfs.pod:339
717 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
718 "L<guestfish(1)>-equivalent command C<ll>)."
722 #: ../src/guestfs.pod:342
724 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
725 "programs, as a flat list of strings."
729 #: ../src/guestfs.pod:345
731 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
732 "directory, plus additional information about each one. It is more "
733 "equivalent to using the L<readdir(3)> call on a local filesystem."
737 #: ../src/guestfs.pod:349
739 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
744 #: ../src/guestfs.pod:352
745 msgid "RUNNING COMMANDS"
749 #: ../src/guestfs.pod:354
751 "Although libguestfs is primarily an API for manipulating files inside guest "
752 "images, we also provide some limited facilities for running commands inside "
757 #: ../src/guestfs.pod:358
758 msgid "There are many limitations to this:"
762 #: ../src/guestfs.pod:362 ../src/guestfs.pod:367 ../src/guestfs.pod:372 ../src/guestfs.pod:376 ../src/guestfs.pod:381 ../src/guestfs.pod:385 ../src/guestfs.pod:390 ../src/guestfs.pod:395 ../src/guestfs.pod:985 ../src/guestfs.pod:989 ../src/guestfs.pod:993 ../src/guestfs.pod:998 ../src/guestfs.pod:1006 ../src/guestfs.pod:1025 ../src/guestfs.pod:1033 ../src/guestfs.pod:1055 ../src/guestfs.pod:1059 ../src/guestfs.pod:1063 ../src/guestfs.pod:1067 ../src/guestfs.pod:1071 ../src/guestfs.pod:1075 ../src/guestfs.pod:1557 ../src/guestfs.pod:1562 ../src/guestfs.pod:1566 ../src/guestfs.pod:1676 ../src/guestfs.pod:1681 ../src/guestfs.pod:1685 ../src/guestfs.pod:2037 ../src/guestfs.pod:2043 ../src/guestfs.pod:2048 ../src/guestfs.pod:2054 ../src/guestfs.pod:2166 ../src/guestfs.pod:2170 ../src/guestfs.pod:2174 ../src/guestfs.pod:2178 ../src/guestfs-actions.pod:15 ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:571 ../src/guestfs-actions.pod:579 ../src/guestfs-actions.pod:586 ../src/guestfs-actions.pod:593 ../src/guestfs-actions.pod:1589 ../src/guestfs-actions.pod:1593 ../src/guestfs-actions.pod:1597 ../src/guestfs-actions.pod:1601 ../src/guestfs-actions.pod:1609 ../src/guestfs-actions.pod:1613 ../src/guestfs-actions.pod:1617 ../src/guestfs-actions.pod:1627 ../src/guestfs-actions.pod:1631 ../src/guestfs-actions.pod:1635 ../src/guestfs-actions.pod:1773 ../src/guestfs-actions.pod:1777 ../src/guestfs-actions.pod:1782 ../src/guestfs-actions.pod:1787 ../src/guestfs-actions.pod:1848 ../src/guestfs-actions.pod:1852 ../src/guestfs-actions.pod:1857 ../fish/guestfish.pod:427 ../fish/guestfish.pod:431 ../fish/guestfish.pod:435 ../fish/guestfish.pod:439 ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:375 ../fish/guestfish-actions.pod:383 ../fish/guestfish-actions.pod:390 ../fish/guestfish-actions.pod:397 ../fish/guestfish-actions.pod:1067 ../fish/guestfish-actions.pod:1071 ../fish/guestfish-actions.pod:1075 ../fish/guestfish-actions.pod:1079 ../fish/guestfish-actions.pod:1087 ../fish/guestfish-actions.pod:1091 ../fish/guestfish-actions.pod:1095 ../fish/guestfish-actions.pod:1105 ../fish/guestfish-actions.pod:1109 ../fish/guestfish-actions.pod:1113 ../fish/guestfish-actions.pod:1203 ../fish/guestfish-actions.pod:1207 ../fish/guestfish-actions.pod:1212 ../fish/guestfish-actions.pod:1217 ../fish/guestfish-actions.pod:1259 ../fish/guestfish-actions.pod:1263 ../fish/guestfish-actions.pod:1268 ../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
767 #: ../src/guestfs.pod:364
769 "The kernel version that the command runs under will be different from what "
774 #: ../src/guestfs.pod:369
776 "If the command needs to communicate with daemons, then most likely they "
781 #: ../src/guestfs.pod:374
782 msgid "The command will be running in limited memory."
786 #: ../src/guestfs.pod:378
788 "The network may not be available unless you enable it (see "
789 "L</guestfs_set_network>)."
793 #: ../src/guestfs.pod:383
794 msgid "Only supports Linux guests (not Windows, BSD, etc)."
798 #: ../src/guestfs.pod:387
799 msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
803 #: ../src/guestfs.pod:392
805 "For SELinux guests, you may need to enable SELinux and load policy first. "
806 "See L</SELINUX> in this manpage."
810 #: ../src/guestfs.pod:397
812 "I<Security:> It is not safe to run commands from untrusted, possibly "
813 "malicious guests. These commands may attempt to exploit your program by "
814 "sending unexpected output. They could also try to exploit the Linux kernel "
815 "or qemu provided by the libguestfs appliance. They could use the network "
816 "provided by the libguestfs appliance to bypass ordinary network partitions "
817 "and firewalls. They could use the elevated privileges or different SELinux "
818 "context of your program to their advantage."
822 #: ../src/guestfs.pod:406
824 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
825 "(a script which runs when the guest next boots normally), and to have this "
826 "script run the commands you want in the normal context of the running guest, "
827 "network security and so on. For information about other security issues, "
832 #: ../src/guestfs.pod:414
834 "The two main API calls to run commands are L</guestfs_command> and "
835 "L</guestfs_sh> (there are also variations)."
839 #: ../src/guestfs.pod:417
841 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
842 "shell globs, redirections, etc will work."
846 #: ../src/guestfs.pod:420
847 msgid "CONFIGURATION FILES"
851 #: ../src/guestfs.pod:422
853 "To read and write configuration files in Linux guest filesystems, we "
854 "strongly recommend using Augeas. For example, Augeas understands how to "
855 "read and write, say, a Linux shadow password file or X.org configuration "
856 "file, and so avoids you having to write that code."
860 #: ../src/guestfs.pod:427
862 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
863 "document Augeas itself here because there is excellent documentation on the "
864 "L<http://augeas.net/> website."
868 #: ../src/guestfs.pod:431
870 "If you don't want to use Augeas (you fool!) then try calling "
871 "L</guestfs_read_lines> to get the file as a list of lines which you can "
876 #: ../src/guestfs.pod:435
881 #: ../src/guestfs.pod:437
883 "We support SELinux guests. To ensure that labeling happens correctly in "
884 "SELinux guests, you need to enable SELinux and load the guest's policy:"
888 #: ../src/guestfs.pod:443 ../src/guestfs.pod:1178 ../src/guestfs.pod:1309
893 #: ../src/guestfs.pod:445
894 msgid "Before launching, do:"
898 #: ../src/guestfs.pod:447
901 " guestfs_set_selinux (g, 1);\n"
906 #: ../src/guestfs.pod:449 ../src/guestfs.pod:1182 ../src/guestfs.pod:1313
911 #: ../src/guestfs.pod:451
913 "After mounting the guest's filesystem(s), load the policy. This is best "
914 "done by running the L<load_policy(8)> command in the guest itself:"
918 #: ../src/guestfs.pod:455
921 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
926 #: ../src/guestfs.pod:457
928 "(Older versions of C<load_policy> require you to specify the name of the "
933 #: ../src/guestfs.pod:460 ../src/guestfs.pod:1319
938 #: ../src/guestfs.pod:462
940 "Optionally, set the security context for the API. The correct security "
941 "context to use can only be known by inspecting the guest. As an example:"
945 #: ../src/guestfs.pod:466
948 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
953 #: ../src/guestfs.pod:470
954 msgid "This will work for running commands and editing existing files."
958 #: ../src/guestfs.pod:472
960 "When new files are created, you may need to label them explicitly, for "
961 "example by running the external command C<restorecon pathname>."
965 #: ../src/guestfs.pod:476
970 #: ../src/guestfs.pod:478
972 "Certain calls are affected by the current file mode creation mask (the "
973 "\"umask\"). In particular ones which create files or directories, such as "
974 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
975 "either the default mode that the file is created with or modifies the mode "
980 #: ../src/guestfs.pod:484
982 "The default umask is C<022>, so files are created with modes such as C<0644> "
983 "and directories with C<0755>."
987 #: ../src/guestfs.pod:487
989 "There are two ways to avoid being affected by umask. Either set umask to 0 "
990 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
991 "L</guestfs_chmod> after creating each file or directory."
995 #: ../src/guestfs.pod:491
996 msgid "For more information about umask, see L<umask(2)>."
1000 #: ../src/guestfs.pod:493 ../fish/guestfish.pod:720
1001 msgid "ENCRYPTED DISKS"
1005 #: ../src/guestfs.pod:495
1007 "Libguestfs allows you to access Linux guests which have been encrypted using "
1008 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1009 "standard. This includes nearly all whole disk encryption systems used by "
1010 "modern Linux guests."
1014 #: ../src/guestfs.pod:501
1016 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1017 "returns the string C<crypto_LUKS>)."
1021 #: ../src/guestfs.pod:504
1023 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1024 "will require the passphrase!"
1028 #: ../src/guestfs.pod:507
1030 "Opening a LUKS device creates a new device mapper device called "
1031 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
1032 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
1033 "decrypted from and encrypted to the underlying block device respectively."
1037 #: ../src/guestfs.pod:513
1039 "LVM volume groups on the device can be made visible by calling "
1040 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
1041 "volume(s) can now be mounted in the usual way."
1045 #: ../src/guestfs.pod:517
1047 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1048 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1049 "[\"/dev/VG\"])>. Then close the mapper device by calling "
1050 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1051 "underlying encrypted block device)."
1055 #: ../src/guestfs.pod:524
1060 #: ../src/guestfs.pod:526
1062 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1063 "contains operating systems. (These APIs used to be in a separate Perl-only "
1064 "library called L<Sys::Guestfs::Lib(3)> but since version 1.5.3 the most "
1065 "frequently used part of this library has been rewritten in C and moved into "
1070 #: ../src/guestfs.pod:532
1072 "Add all disks belonging to the unknown virtual machine and call "
1073 "L</guestfs_launch> in the usual way."
1077 #: ../src/guestfs.pod:535
1079 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1080 "and certain heuristics, and returns a list of operating systems that were "
1081 "found. An empty list means none were found. A single element is the root "
1082 "filesystem of the operating system. For dual- or multi-boot guests, "
1083 "multiple roots can be returned, each one corresponding to a separate "
1084 "operating system. (Multi-boot virtual machines are extremely rare in the "
1085 "world of virtualization, but since this scenario can happen, we have built "
1086 "libguestfs to deal with it.)"
1090 #: ../src/guestfs.pod:544
1092 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1093 "to get additional details about that operating system. For example, call "
1094 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1095 "Windows and Linux-based operating systems respectively."
1099 #: ../src/guestfs.pod:550
1101 "Un*x-like and Linux-based operating systems usually consist of several "
1102 "filesystems which are mounted at boot time (for example, a separate boot "
1103 "partition mounted on C</boot>). The inspection rules are able to detect how "
1104 "filesystems correspond to mount points. Call "
1105 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1106 "hash table like this example:"
1110 #: ../src/guestfs.pod:557
1113 " /boot => /dev/sda1\n"
1114 " / => /dev/vg_guest/lv_root\n"
1115 " /usr => /dev/vg_guest/lv_usr\n"
1120 #: ../src/guestfs.pod:561
1122 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1123 "filesystems as suggested."
1127 #: ../src/guestfs.pod:564
1129 "Be careful to mount filesystems in the right order (eg. C</> before "
1130 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
1135 #: ../src/guestfs.pod:568
1137 "Inspection currently only works for some common operating systems. "
1138 "Contributors are welcome to send patches for other operating systems that we "
1139 "currently cannot detect."
1143 #: ../src/guestfs.pod:572
1145 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1146 "for more details. The L</guestfs_inspect_os> function just ignores any "
1147 "encrypted devices."
1151 #: ../src/guestfs.pod:576
1153 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1154 "inspection and caches the results in the guest handle. Subsequent calls to "
1155 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
1156 "re-read the disks. If you change the content of the guest disks, you can "
1157 "redo inspection by calling L</guestfs_inspect_os> again. "
1158 "(L</guestfs_inspect_list_applications> works a little differently from the "
1159 "other calls and does read the disks. See documentation for that function "
1164 #: ../src/guestfs.pod:585
1165 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1169 #: ../src/guestfs.pod:587
1171 "Libguestfs can mount NTFS partitions. It does this using the "
1172 "L<http://www.ntfs-3g.org/> driver."
1176 #: ../src/guestfs.pod:590
1177 msgid "DRIVE LETTERS AND PATHS"
1181 #: ../src/guestfs.pod:592
1183 "DOS and Windows still use drive letters, and the filesystems are always "
1184 "treated as case insensitive by Windows itself, and therefore you might find "
1185 "a Windows configuration file referring to a path like "
1186 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
1187 "that directory might be referred to as C</WINDOWS/System32>."
1191 #: ../src/guestfs.pod:598
1193 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1194 "libguestfs to read the appropriate Windows Registry and configuration files, "
1195 "to determine yourself how drives are mapped (see also L<hivex(3)> and "
1196 "L<virt-inspector(1)>)."
1200 #: ../src/guestfs.pod:603
1202 "Replacing backslash characters with forward slash characters is also outside "
1203 "the scope of libguestfs, but something that you can easily do."
1207 #: ../src/guestfs.pod:606
1209 "Where we can help is in resolving the case insensitivity of paths. For "
1210 "this, call L</guestfs_case_sensitive_path>."
1214 #: ../src/guestfs.pod:609
1215 msgid "ACCESSING THE WINDOWS REGISTRY"
1219 #: ../src/guestfs.pod:611
1221 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1222 "files, through the library C<hivex> which is part of the libguestfs project "
1223 "although ships as a separate tarball. You have to locate and download the "
1224 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1225 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
1226 "L<virt-win-reg(1)> for more help on this issue."
1230 #: ../src/guestfs.pod:619
1231 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
1235 #: ../src/guestfs.pod:621
1237 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
1238 "provide something which looks like a Linux symlink. The way it tries to do "
1239 "the rewriting is described here:"
1243 #: ../src/guestfs.pod:625
1244 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-symbolic-links/>"
1248 #: ../src/guestfs.pod:627
1250 "The essential problem is that ntfs-3g simply does not have enough "
1251 "information to do a correct job. NTFS links can contain drive letters and "
1252 "references to external device GUIDs that ntfs-3g has no way of resolving. "
1253 "It is almost certainly the case that libguestfs callers should ignore what "
1254 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
1258 #: ../src/guestfs.pod:634
1260 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use "
1261 "L</guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
1262 "attribute, and read the raw reparse data from that (you can find the format "
1263 "documented in various places around the web)."
1267 #: ../src/guestfs.pod:639
1268 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
1272 #: ../src/guestfs.pod:641
1274 "There are other useful extended attributes that can be read from ntfs-3g "
1275 "filesystems (using L</guestfs_getxattr>). See:"
1279 #: ../src/guestfs.pod:644
1280 msgid "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
1284 #: ../src/guestfs.pod:646
1285 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1289 #: ../src/guestfs.pod:648
1291 "Although we don't want to discourage you from using the C API, we will "
1292 "mention here that the same API is also available in other languages."
1296 #: ../src/guestfs.pod:651
1298 "The API is broadly identical in all supported languages. This means that "
1299 "the C call C<guestfs_mount(g,path)> is C<$g-E<gt>mount($path)> in Perl, "
1300 "C<g.mount(path)> in Python, and C<Guestfs.mount g path> in OCaml. In other "
1301 "words, a straightforward, predictable isomorphism between each language."
1305 #: ../src/guestfs.pod:657
1307 "Error messages are automatically transformed into exceptions if the language "
1312 #: ../src/guestfs.pod:660
1314 "We don't try to \"object orientify\" parts of the API in OO languages, "
1315 "although contributors are welcome to write higher level APIs above what we "
1316 "provide in their favourite languages if they wish."
1320 #: ../src/guestfs.pod:666
1325 #: ../src/guestfs.pod:668
1327 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1328 "identical to the C API. C++ classes and exceptions are not used."
1332 #: ../src/guestfs.pod:672
1337 #: ../src/guestfs.pod:674
1339 "The C# bindings are highly experimental. Please read the warnings at the "
1340 "top of C<csharp/Libguestfs.cs>."
1344 #: ../src/guestfs.pod:677
1349 #: ../src/guestfs.pod:679
1351 "This is the only language binding that is working but incomplete. Only "
1352 "calls which return simple integers have been bound in Haskell, and we are "
1353 "looking for help to complete this binding."
1357 #: ../src/guestfs.pod:683
1362 #: ../src/guestfs.pod:685
1364 "Full documentation is contained in the Javadoc which is distributed with "
1369 #: ../src/guestfs.pod:688
1374 #: ../src/guestfs.pod:690
1375 msgid "For documentation see L<guestfs-ocaml(3)>."
1379 #: ../src/guestfs.pod:692
1384 #: ../src/guestfs.pod:694
1385 msgid "For documentation see L<Sys::Guestfs(3)>."
1389 #: ../src/guestfs.pod:696
1394 #: ../src/guestfs.pod:698
1396 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1397 "the php-libguestfs package for your distribution."
1401 #: ../src/guestfs.pod:701
1402 msgid "The PHP binding only works correctly on 64 bit machines."
1406 #: ../src/guestfs.pod:703
1411 #: ../src/guestfs.pod:705
1412 msgid "For documentation see L<guestfs-python(3)>."
1416 #: ../src/guestfs.pod:707
1421 #: ../src/guestfs.pod:709
1422 msgid "For documentation see L<guestfs-ruby(3)>."
1426 #: ../src/guestfs.pod:711
1427 msgid "B<shell scripts>"
1431 #: ../src/guestfs.pod:713
1432 msgid "For documentation see L<guestfish(1)>."
1436 #: ../src/guestfs.pod:717
1437 msgid "LIBGUESTFS GOTCHAS"
1441 #: ../src/guestfs.pod:719
1443 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1444 "system [...] that works in the way it is documented but is counterintuitive "
1445 "and almost invites mistakes.\""
1449 #: ../src/guestfs.pod:723
1451 "Since we developed libguestfs and the associated tools, there are several "
1452 "things we would have designed differently, but are now stuck with for "
1453 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1454 "release, you can expect these to change. Beware of them."
1458 #: ../src/guestfs.pod:731
1459 msgid "Autosync / forgetting to sync."
1463 #: ../src/guestfs.pod:733
1465 "When modifying a filesystem from C or another language, you B<must> unmount "
1466 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1467 "libguestfs handle. You can also call:"
1471 #: ../src/guestfs.pod:737
1474 " guestfs_set_autosync (g, 1);\n"
1479 #: ../src/guestfs.pod:739
1481 "to have the unmount/sync done automatically for you when the handle 'g' is "
1482 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
1487 #: ../src/guestfs.pod:743
1489 "If you forget to do this, then it is entirely possible that your changes "
1490 "won't be written out, or will be partially written, or (very rarely) that "
1491 "you'll get disk corruption."
1495 #: ../src/guestfs.pod:747
1497 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1498 "guestfish scripts that forget to sync will work just fine, which can make "
1499 "this very puzzling if you are trying to debug a problem."
1503 #: ../src/guestfs.pod:751
1505 "Update: Autosync is enabled by default for all API users starting from "
1506 "libguestfs 1.5.24."
1510 #: ../src/guestfs.pod:754
1511 msgid "Mount option C<-o sync> should not be the default."
1515 #: ../src/guestfs.pod:756
1517 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1518 "However C<-o sync> does not add any reliability benefit, but does have a "
1519 "very large performance impact."
1523 #: ../src/guestfs.pod:760
1525 "The work around is to use L</guestfs_mount_options> and set the mount "
1526 "options that you actually want to use."
1530 #: ../src/guestfs.pod:763
1531 msgid "Read-only should be the default."
1535 #: ../src/guestfs.pod:765
1537 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1538 "specify I<--rw> if you want to make changes to the image."
1542 #: ../src/guestfs.pod:768
1543 msgid "This would reduce the potential to corrupt live VM images."
1547 #: ../src/guestfs.pod:770
1549 "Note that many filesystems change the disk when you just mount and unmount, "
1550 "even if you didn't perform any writes. You need to use "
1551 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
1555 #: ../src/guestfs.pod:774
1556 msgid "guestfish command line is hard to use."
1560 #: ../src/guestfs.pod:776
1562 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1563 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1564 "exist, so it fails. In earlier versions of guestfish the error message was "
1565 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1566 "we should have used C<guestfish -c command> to run commands."
1570 #: ../src/guestfs.pod:783
1571 msgid "guestfish megabyte modifiers don't work right on all commands"
1575 #: ../src/guestfs.pod:785
1577 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1578 "other modifiers). What guestfish actually does is to multiply the number "
1579 "part by the modifier part and pass the result to the C API. However this "
1580 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1581 "expecting some other unit (eg. megabytes)."
1585 #: ../src/guestfs.pod:792
1586 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1590 #: ../src/guestfs.pod:794
1593 " lvcreate LV VG 100M\n"
1598 #: ../src/guestfs.pod:796
1600 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1601 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1602 "megabytes * megabytes) logical volume. The error message you get from this "
1603 "is also a little obscure."
1607 #: ../src/guestfs.pod:801
1609 "This could be fixed in the generator by specially marking parameters and "
1610 "return values which take bytes or other units."
1614 #: ../src/guestfs.pod:804
1615 msgid "Ambiguity between devices and paths"
1619 #: ../src/guestfs.pod:806
1621 "There is a subtle ambiguity in the API between a device name "
1622 "(eg. C</dev/sdb2>) and a similar pathname. A file might just happen to be "
1623 "called C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1627 #: ../src/guestfs.pod:811
1629 "In the current API we usually resolve this ambiguity by having two separate "
1630 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1631 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1632 "detecting if the path supplied begins with C</dev/>."
1636 #: ../src/guestfs.pod:817
1638 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1639 "make paths/devices into structured names. One way to do this would be to "
1640 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1641 "aspect of grub. Another way would be to use a structured type, equivalent "
1642 "to this OCaml type:"
1646 #: ../src/guestfs.pod:823
1649 " type path = Path of string | Device of int | Partition of int * int\n"
1654 #: ../src/guestfs.pod:825
1655 msgid "which would allow you to pass arguments like:"
1659 #: ../src/guestfs.pod:827
1662 " Path \"/foo/bar\"\n"
1663 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
1664 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
1665 " Path \"/dev/sdb2\" (* not a device *)\n"
1670 #: ../src/guestfs.pod:832
1672 "As you can see there are still problems to resolve even with this "
1673 "representation. Also consider how it might work in guestfish."
1677 #: ../src/guestfs.pod:837
1678 msgid "PROTOCOL LIMITS"
1682 #: ../src/guestfs.pod:839
1684 "Internally libguestfs uses a message-based protocol to pass API calls and "
1685 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1686 "plenty more detail about this). The maximum message size used by the "
1687 "protocol is slightly less than 4 MB. For some API calls you may need to be "
1688 "aware of this limit. The API calls which may be affected are individually "
1689 "documented, with a link back to this section of the documentation."
1693 #: ../src/guestfs.pod:847
1695 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1696 "a simple string. Because this string is at some point internally encoded as "
1697 "a message, the maximum size that it can return is slightly under 4 MB. If "
1698 "the requested file is larger than this then you will get an error."
1702 #: ../src/guestfs.pod:853
1704 "In order to transfer large files into and out of the guest filesystem, you "
1705 "need to use particular calls that support this. The sections L</UPLOADING> "
1706 "and L</DOWNLOADING> document how to do this."
1710 #: ../src/guestfs.pod:857
1712 "You might also consider mounting the disk image using our FUSE filesystem "
1713 "support (L<guestmount(1)>)."
1717 #: ../src/guestfs.pod:860
1718 msgid "KEYS AND PASSPHRASES"
1722 #: ../src/guestfs.pod:862
1724 "Certain libguestfs calls take a parameter that contains sensitive key "
1725 "material, passed in as a C string."
1729 #: ../src/guestfs.pod:865
1731 "In the future we would hope to change the libguestfs implementation so that "
1732 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1733 "swap. However this is I<not> done at the moment, because of the complexity "
1734 "of such an implementation."
1738 #: ../src/guestfs.pod:870
1740 "Therefore you should be aware that any key parameter you pass to libguestfs "
1741 "might end up being written out to the swap partition. If this is a concern, "
1742 "scrub the swap partition or don't use libguestfs on encrypted devices."
1746 #: ../src/guestfs.pod:875
1747 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
1751 #: ../src/guestfs.pod:877
1753 "All high-level libguestfs actions are synchronous. If you want to use "
1754 "libguestfs asynchronously then you must create a thread."
1758 #: ../src/guestfs.pod:880
1760 "Only use the handle from a single thread. Either use the handle exclusively "
1761 "from one thread, or provide your own mutex so that two threads cannot issue "
1762 "calls on the same handle at the same time."
1766 #: ../src/guestfs.pod:884
1768 "See the graphical program guestfs-browser for one possible architecture for "
1769 "multithreaded programs using libvirt and libguestfs."
1773 #: ../src/guestfs.pod:887
1778 #: ../src/guestfs.pod:889
1780 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
1785 #: ../src/guestfs.pod:892
1787 "By default it looks for these in the directory C<$libdir/guestfs> "
1788 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
1792 #: ../src/guestfs.pod:895
1794 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
1795 "to change the directories that libguestfs will search in. The value is a "
1796 "colon-separated list of paths. The current directory is I<not> searched "
1797 "unless the path contains an empty element or C<.>. For example "
1798 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
1799 "then C</usr/lib/guestfs>."
1803 #: ../src/guestfs.pod:902
1804 msgid "QEMU WRAPPERS"
1808 #: ../src/guestfs.pod:904
1810 "If you want to compile your own qemu, run qemu from a non-standard location, "
1811 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
1816 #: ../src/guestfs.pod:908
1818 "There is one important rule to remember: you I<must C<exec qemu>> as the "
1819 "last command in the shell script (so that qemu replaces the shell and "
1820 "becomes the direct child of the libguestfs-using program). If you don't do "
1821 "this, then the qemu process won't be cleaned up correctly."
1825 #: ../src/guestfs.pod:913
1827 "Here is an example of a wrapper, where I have built my own copy of qemu from "
1832 #: ../src/guestfs.pod:916
1836 " qemudir=/home/rjones/d/qemu\n"
1837 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
1843 #: ../src/guestfs.pod:920
1845 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
1846 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
1851 #: ../src/guestfs.pod:924
1854 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
1859 #: ../src/guestfs.pod:926
1861 "Note that libguestfs also calls qemu with the -help and -version options in "
1862 "order to determine features."
1866 #: ../src/guestfs.pod:929
1867 msgid "ABI GUARANTEE"
1871 #: ../src/guestfs.pod:931
1873 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
1874 "actions as outlined in this section. Although we will deprecate some "
1875 "actions, for example if they get replaced by newer calls, we will keep the "
1876 "old actions forever. This allows you the developer to program in confidence "
1877 "against the libguestfs API."
1881 #: ../src/guestfs.pod:937
1882 msgid "BLOCK DEVICE NAMING"
1886 #: ../src/guestfs.pod:939
1888 "In the kernel there is now quite a profusion of schemata for naming block "
1889 "devices (in this context, by I<block device> I mean a physical or virtual "
1890 "hard drive). The original Linux IDE driver used names starting with "
1891 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
1892 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
1893 "replacement for the old IDE driver (particularly for SATA devices) those "
1894 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
1895 "machines with paravirtualized drivers. This has created several different "
1896 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
1901 #: ../src/guestfs.pod:951
1903 "As discussed above, libguestfs uses a qemu appliance running an embedded "
1904 "Linux kernel to access block devices. We can run a variety of appliances "
1905 "based on a variety of Linux kernels."
1909 #: ../src/guestfs.pod:955
1911 "This causes a problem for libguestfs because many API calls use device or "
1912 "partition names. Working scripts and the recipe (example) scripts that we "
1913 "make available over the internet could fail if the naming scheme changes."
1917 #: ../src/guestfs.pod:960
1919 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
1920 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
1921 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
1922 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
1926 #: ../src/guestfs.pod:966
1928 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
1929 "L</guestfs_list_partitions> and similar calls return the true names of the "
1930 "devices and partitions as known to the appliance."
1934 #: ../src/guestfs.pod:971
1935 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
1939 #: ../src/guestfs.pod:973
1941 "Usually this translation is transparent. However in some (very rare) cases "
1942 "you may need to know the exact algorithm. Such cases include where you use "
1943 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
1944 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
1949 #: ../src/guestfs.pod:979
1951 "The algorithm is applied only to I<parameters> which are known to be either "
1952 "device or partition names. Return values from functions such as "
1953 "L</guestfs_list_devices> are never changed."
1957 #: ../src/guestfs.pod:987
1958 msgid "Is the string a parameter which is a device or partition name?"
1962 #: ../src/guestfs.pod:991
1963 msgid "Does the string begin with C</dev/sd>?"
1967 #: ../src/guestfs.pod:995
1969 "Does the named device exist? If so, we use that device. However if I<not> "
1970 "then we continue with this algorithm."
1974 #: ../src/guestfs.pod:1000
1975 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
1979 #: ../src/guestfs.pod:1002
1980 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
1984 #: ../src/guestfs.pod:1004
1985 msgid "If that named device exists, use it. If not, continue."
1989 #: ../src/guestfs.pod:1008
1990 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
1994 #: ../src/guestfs.pod:1010
1995 msgid "If that named device exists, use it. If not, return an error."
1999 #: ../src/guestfs.pod:1014
2000 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
2004 #: ../src/guestfs.pod:1016
2006 "Although the standard naming scheme and automatic translation is useful for "
2007 "simple programs and guestfish scripts, for larger programs it is best not to "
2008 "rely on this mechanism."
2012 #: ../src/guestfs.pod:1020
2014 "Where possible for maximum future portability programs using libguestfs "
2015 "should use these future-proof techniques:"
2019 #: ../src/guestfs.pod:1027
2021 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2022 "device names, and then use those names directly."
2026 #: ../src/guestfs.pod:1030
2027 msgid "Since those device names exist by definition, they will never be translated."
2031 #: ../src/guestfs.pod:1035
2033 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2034 "filesystem labels."
2038 #: ../src/guestfs.pod:1040
2043 #: ../src/guestfs.pod:1042
2045 "This section discusses security implications of using libguestfs, "
2046 "particularly with untrusted or malicious guests or disk images."
2050 #: ../src/guestfs.pod:1045
2051 msgid "GENERAL SECURITY CONSIDERATIONS"
2055 #: ../src/guestfs.pod:1047
2057 "Be careful with any files or data that you download from a guest (by "
2058 "\"download\" we mean not just the L</guestfs_download> command but any "
2059 "command that reads files, filenames, directories or anything else from a "
2060 "disk image). An attacker could manipulate the data to fool your program "
2061 "into doing the wrong thing. Consider cases such as:"
2065 #: ../src/guestfs.pod:1057
2066 msgid "the data (file etc) not being present"
2070 #: ../src/guestfs.pod:1061
2071 msgid "being present but empty"
2075 #: ../src/guestfs.pod:1065
2076 msgid "being much larger than normal"
2080 #: ../src/guestfs.pod:1069
2081 msgid "containing arbitrary 8 bit data"
2085 #: ../src/guestfs.pod:1073
2086 msgid "being in an unexpected character encoding"
2090 #: ../src/guestfs.pod:1077
2091 msgid "containing homoglyphs."
2095 #: ../src/guestfs.pod:1081
2096 msgid "SECURITY OF MOUNTING FILESYSTEMS"
2100 #: ../src/guestfs.pod:1083
2102 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
2103 "(VFS) module can sometimes be escalated into exploits by deliberately "
2104 "creating a malicious, malformed filesystem. These exploits are very severe "
2105 "for two reasons. Firstly there are very many filesystem drivers in the "
2106 "kernel, and many of them are infrequently used and not much developer "
2107 "attention has been paid to the code. Linux userspace helps potential "
2108 "crackers by detecting the filesystem type and automatically choosing the "
2109 "right VFS driver, even if that filesystem type is obscure or unexpected for "
2110 "the administrator. Secondly, a kernel-level exploit is like a local root "
2111 "exploit (worse in some ways), giving immediate and total access to the "
2112 "system right down to the hardware level."
2116 #: ../src/guestfs.pod:1096
2118 "That explains why you should never mount a filesystem from an untrusted "
2119 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
2120 "inside a qemu virtual machine, usually running as a non-root user. The "
2121 "attacker would need to write a filesystem which first exploited the kernel, "
2122 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
2123 "the libguestfs protocol, and finally to be as serious as the host kernel "
2124 "exploit it would need to escalate its privileges to root. This multi-step "
2125 "escalation, performed by a static piece of data, is thought to be extremely "
2126 "hard to do, although we never say 'never' about security issues."
2130 #: ../src/guestfs.pod:1107
2132 "In any case callers can reduce the attack surface by forcing the filesystem "
2133 "type when mounting (use L</guestfs_mount_vfs>)."
2137 #: ../src/guestfs.pod:1110
2138 msgid "PROTOCOL SECURITY"
2142 #: ../src/guestfs.pod:1112
2144 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
2145 "defined upper message size. However a program that uses libguestfs must "
2146 "also take care - for example you can write a program that downloads a binary "
2147 "from a disk image and executes it locally, and no amount of protocol "
2148 "security will save you from the consequences."
2152 #: ../src/guestfs.pod:1118
2153 msgid "INSPECTION SECURITY"
2157 #: ../src/guestfs.pod:1120
2159 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
2160 "directly from the guest, and these could contain any 8 bit data. Callers "
2161 "should be careful to escape these before printing them to a structured file "
2162 "(for example, use HTML escaping if creating a web page)."
2166 #: ../src/guestfs.pod:1126
2168 "Guest configuration may be altered in unusual ways by the administrator of "
2169 "the virtual machine, and may not reflect reality (particularly for untrusted "
2170 "or actively malicious guests). For example we parse the hostname from "
2171 "configuration files like C</etc/sysconfig/network> that we find in the "
2172 "guest, but the guest administrator can easily manipulate these files to "
2173 "provide the wrong hostname."
2177 #: ../src/guestfs.pod:1134
2179 "The inspection API parses guest configuration using two external libraries: "
2180 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
2181 "designed to be robust in the face of malicious data, although denial of "
2182 "service attacks are still possible, for example with oversized configuration "
2187 #: ../src/guestfs.pod:1140
2188 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
2192 #: ../src/guestfs.pod:1142
2194 "Be very cautious about running commands from the guest. By running a "
2195 "command in the guest, you are giving CPU time to a binary that you do not "
2196 "control, under the same user account as the library, albeit wrapped in qemu "
2197 "virtualization. More information and alternatives can be found in the "
2198 "section L</RUNNING COMMANDS>."
2202 #: ../src/guestfs.pod:1148
2203 msgid "CVE-2010-3851"
2207 #: ../src/guestfs.pod:1150
2208 msgid "https://bugzilla.redhat.com/642934"
2212 #: ../src/guestfs.pod:1152
2214 "This security bug concerns the automatic disk format detection that qemu "
2215 "does on disk images."
2219 #: ../src/guestfs.pod:1155
2221 "A raw disk image is just the raw bytes, there is no header. Other disk "
2222 "images like qcow2 contain a special header. Qemu deals with this by looking "
2223 "for one of the known headers, and if none is found then assuming the disk "
2224 "image must be raw."
2228 #: ../src/guestfs.pod:1160
2230 "This allows a guest which has been given a raw disk image to write some "
2231 "other header. At next boot (or when the disk image is accessed by "
2232 "libguestfs) qemu would do autodetection and think the disk image format was, "
2233 "say, qcow2 based on the header written by the guest."
2237 #: ../src/guestfs.pod:1165
2239 "This in itself would not be a problem, but qcow2 offers many features, one "
2240 "of which is to allow a disk image to refer to another image (called the "
2241 "\"backing disk\"). It does this by placing the path to the backing disk "
2242 "into the qcow2 header. This path is not validated and could point to any "
2243 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
2244 "\"holes\" in the qcow2 disk image, which of course is completely under the "
2245 "control of the attacker."
2249 #: ../src/guestfs.pod:1173
2250 msgid "In libguestfs this is rather hard to exploit except under two circumstances:"
2254 #: ../src/guestfs.pod:1180
2255 msgid "You have enabled the network or have opened the disk in write mode."
2259 #: ../src/guestfs.pod:1184
2261 "You are also running untrusted code from the guest (see L</RUNNING "
2266 #: ../src/guestfs.pod:1189
2268 "The way to avoid this is to specify the expected disk format when adding "
2269 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
2270 "should always do this if the disk is raw format, and it's a good idea for "
2275 #: ../src/guestfs.pod:1194
2277 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
2278 "format is fetched from libvirt and passed through."
2282 #: ../src/guestfs.pod:1197
2284 "For libguestfs tools, use the I<--format> command line parameter as "
2289 #: ../src/guestfs.pod:1200
2290 msgid "CONNECTION MANAGEMENT"
2294 #: ../src/guestfs.pod:1202
2299 #: ../src/guestfs.pod:1204
2301 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
2302 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
2303 "handle and release all resources used."
2307 #: ../src/guestfs.pod:1208
2309 "For information on using multiple handles and threads, see the section "
2310 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> below."
2314 #: ../src/guestfs.pod:1211
2315 msgid "guestfs_create"
2319 #: ../src/guestfs.pod:1213
2322 " guestfs_h *guestfs_create (void);\n"
2327 #: ../src/guestfs.pod:1215
2328 msgid "Create a connection handle."
2332 #: ../src/guestfs.pod:1217
2334 "You have to call L</guestfs_add_drive_opts> (or one of the equivalent calls) "
2335 "on the handle at least once."
2339 #: ../src/guestfs.pod:1220
2341 "This function returns a non-NULL pointer to a handle on success or NULL on "
2346 #: ../src/guestfs.pod:1223
2347 msgid "After configuring the handle, you have to call L</guestfs_launch>."
2351 #: ../src/guestfs.pod:1225
2353 "You may also want to configure error handling for the handle. See L</ERROR "
2354 "HANDLING> section below."
2358 #: ../src/guestfs.pod:1228
2359 msgid "guestfs_close"
2363 #: ../src/guestfs.pod:1230
2366 " void guestfs_close (guestfs_h *g);\n"
2371 #: ../src/guestfs.pod:1232
2372 msgid "This closes the connection handle and frees up all resources used."
2376 #: ../src/guestfs.pod:1234
2377 msgid "ERROR HANDLING"
2381 #: ../src/guestfs.pod:1236
2383 "API functions can return errors. For example, almost all functions that "
2384 "return C<int> will return C<-1> to indicate an error."
2388 #: ../src/guestfs.pod:1239
2390 "Additional information is available for errors: an error message string and "
2391 "optionally an error number (errno) if the thing that failed was a system "
2396 #: ../src/guestfs.pod:1243
2398 "You can get at the additional information about the last error on the handle "
2399 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
2400 "up an error handler with L</guestfs_set_error_handler>."
2404 #: ../src/guestfs.pod:1248
2406 "When the handle is created, a default error handler is installed which "
2407 "prints the error message string to C<stderr>. For small short-running "
2408 "command line programs it is sufficient to do:"
2412 #: ../src/guestfs.pod:1252
2415 " if (guestfs_launch (g) == -1)\n"
2416 " exit (EXIT_FAILURE);\n"
2421 #: ../src/guestfs.pod:1255
2423 "since the default error handler will ensure that an error message has been "
2424 "printed to C<stderr> before the program exits."
2428 #: ../src/guestfs.pod:1258
2430 "For other programs the caller will almost certainly want to install an "
2431 "alternate error handler or do error handling in-line like this:"
2435 #: ../src/guestfs.pod:1261
2438 " g = guestfs_create ();\n"
2443 #: ../src/guestfs.pod:1263
2446 " /* This disables the default behaviour of printing errors\n"
2448 " guestfs_set_error_handler (g, NULL, NULL);\n"
2453 #: ../src/guestfs.pod:1267
2456 " if (guestfs_launch (g) == -1) {\n"
2457 " /* Examine the error message and print it etc. */\n"
2458 " char *msg = guestfs_last_error (g);\n"
2459 " int errnum = guestfs_last_errno (g);\n"
2460 " fprintf (stderr, \"%s\\n\", msg);\n"
2467 #: ../src/guestfs.pod:1275
2469 "Out of memory errors are handled differently. The default action is to call "
2470 "L<abort(3)>. If this is undesirable, then you can set a handler using "
2471 "L</guestfs_set_out_of_memory_handler>."
2475 #: ../src/guestfs.pod:1279
2477 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
2478 "because there is no handle if this happens there is no way to get additional "
2479 "error information. However L</guestfs_create> is supposed to be a "
2480 "lightweight operation which can only fail because of insufficient memory (it "
2481 "returns NULL in this case)."
2485 #: ../src/guestfs.pod:1285
2486 msgid "guestfs_last_error"
2490 #: ../src/guestfs.pod:1287
2493 " const char *guestfs_last_error (guestfs_h *g);\n"
2498 #: ../src/guestfs.pod:1289
2500 "This returns the last error message that happened on C<g>. If there has not "
2501 "been an error since the handle was created, then this returns C<NULL>."
2505 #: ../src/guestfs.pod:1293
2507 "The lifetime of the returned string is until the next error occurs, or "
2508 "L</guestfs_close> is called."
2512 #: ../src/guestfs.pod:1296
2513 msgid "guestfs_last_errno"
2517 #: ../src/guestfs.pod:1298
2520 " int guestfs_last_errno (guestfs_h *g);\n"
2525 #: ../src/guestfs.pod:1300
2526 msgid "This returns the last error number (errno) that happened on C<g>."
2530 #: ../src/guestfs.pod:1302
2531 msgid "If successful, an errno integer not equal to zero is returned."
2535 #: ../src/guestfs.pod:1304
2536 msgid "If no error, this returns 0. This call can return 0 in three situations:"
2540 #: ../src/guestfs.pod:1311
2541 msgid "There has not been any error on the handle."
2545 #: ../src/guestfs.pod:1315
2547 "There has been an error but the errno was meaningless. This corresponds to "
2548 "the case where the error did not come from a failed system call, but for "
2549 "some other reason."
2553 #: ../src/guestfs.pod:1321
2555 "There was an error from a failed system call, but for some reason the errno "
2556 "was not captured and returned. This usually indicates a bug in libguestfs."
2560 #: ../src/guestfs.pod:1327
2562 "Libguestfs tries to convert the errno from inside the applicance into a "
2563 "corresponding errno for the caller (not entirely trivial: the appliance "
2564 "might be running a completely different operating system from the library "
2565 "and error numbers are not standardized across Un*xen). If this could not be "
2566 "done, then the error is translated to C<EINVAL>. In practice this should "
2567 "only happen in very rare circumstances."
2571 #: ../src/guestfs.pod:1335
2572 msgid "guestfs_set_error_handler"
2576 #: ../src/guestfs.pod:1337
2579 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
2581 " const char *msg);\n"
2582 " void guestfs_set_error_handler (guestfs_h *g,\n"
2583 " guestfs_error_handler_cb cb,\n"
2589 #: ../src/guestfs.pod:1344
2591 "The callback C<cb> will be called if there is an error. The parameters "
2592 "passed to the callback are an opaque data pointer and the error message "
2597 #: ../src/guestfs.pod:1348
2599 "C<errno> is not passed to the callback. To get that the callback must call "
2600 "L</guestfs_last_errno>."
2604 #: ../src/guestfs.pod:1351
2606 "Note that the message string C<msg> is freed as soon as the callback "
2607 "function returns, so if you want to stash it somewhere you must make your "
2612 #: ../src/guestfs.pod:1355
2613 msgid "The default handler prints messages on C<stderr>."
2617 #: ../src/guestfs.pod:1357
2618 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
2622 #: ../src/guestfs.pod:1359
2623 msgid "guestfs_get_error_handler"
2627 #: ../src/guestfs.pod:1361
2630 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
2631 " void **opaque_rtn);\n"
2636 #: ../src/guestfs.pod:1364
2637 msgid "Returns the current error handler callback."
2641 #: ../src/guestfs.pod:1366
2642 msgid "guestfs_set_out_of_memory_handler"
2646 #: ../src/guestfs.pod:1368
2649 " typedef void (*guestfs_abort_cb) (void);\n"
2650 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
2651 " guestfs_abort_cb);\n"
2656 #: ../src/guestfs.pod:1372
2658 "The callback C<cb> will be called if there is an out of memory situation. "
2659 "I<Note this callback must not return>."
2663 #: ../src/guestfs.pod:1375
2664 msgid "The default is to call L<abort(3)>."
2668 #: ../src/guestfs.pod:1377
2669 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
2673 #: ../src/guestfs.pod:1380
2674 msgid "guestfs_get_out_of_memory_handler"
2678 #: ../src/guestfs.pod:1382
2681 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
2686 #: ../src/guestfs.pod:1384
2687 msgid "This returns the current out of memory handler."
2691 #: ../src/guestfs.pod:1386
2696 #: ../src/guestfs.pod:1388 ../fish/guestfish.pod:958
2701 #: ../src/guestfs.pod:1390
2706 #: ../src/guestfs.pod:1392
2711 #: ../src/guestfs.pod:1394
2712 msgid "AVAILABILITY"
2716 #: ../src/guestfs.pod:1396
2717 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
2721 #: ../src/guestfs.pod:1398
2723 "Using L</guestfs_available> you can test availability of the following "
2724 "groups of functions. This test queries the appliance to see if the "
2725 "appliance you are currently using supports the functionality."
2729 #: ../src/guestfs.pod:1403
2730 msgid "@AVAILABILITY@"
2734 #: ../src/guestfs.pod:1405
2735 msgid "GUESTFISH supported COMMAND"
2739 #: ../src/guestfs.pod:1407
2741 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
2742 "prints out the available groups and whether they are supported by this build "
2743 "of libguestfs. Note however that you have to do C<run> first."
2747 #: ../src/guestfs.pod:1412
2748 msgid "SINGLE CALLS AT COMPILE TIME"
2752 #: ../src/guestfs.pod:1414
2754 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
2755 "function, such as:"
2759 #: ../src/guestfs.pod:1417
2762 " #define LIBGUESTFS_HAVE_DD 1\n"
2767 #: ../src/guestfs.pod:1419
2768 msgid "if L</guestfs_dd> is available."
2772 #: ../src/guestfs.pod:1421
2774 "Before version 1.5.8, if you needed to test whether a single libguestfs "
2775 "function is available at compile time, we recommended using build tools such "
2776 "as autoconf or cmake. For example in autotools you could use:"
2780 #: ../src/guestfs.pod:1426
2783 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
2784 " AC_CHECK_FUNCS([guestfs_dd])\n"
2789 #: ../src/guestfs.pod:1429
2791 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
2796 #: ../src/guestfs.pod:1432
2797 msgid "SINGLE CALLS AT RUN TIME"
2801 #: ../src/guestfs.pod:1434
2803 "Testing at compile time doesn't guarantee that a function really exists in "
2804 "the library. The reason is that you might be dynamically linked against a "
2805 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
2806 "This situation unfortunately results in a segmentation fault, which is a "
2807 "shortcoming of the C dynamic linking system itself."
2811 #: ../src/guestfs.pod:1441
2813 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2814 "in this example program (note that you still need the compile time check as "
2819 #: ../src/guestfs.pod:1445
2822 " #include <stdio.h>\n"
2823 " #include <stdlib.h>\n"
2824 " #include <unistd.h>\n"
2825 " #include <dlfcn.h>\n"
2826 " #include <guestfs.h>\n"
2831 #: ../src/guestfs.pod:1451
2836 " #ifdef LIBGUESTFS_HAVE_DD\n"
2838 " int has_function;\n"
2843 #: ../src/guestfs.pod:1457
2846 " /* Test if the function guestfs_dd is really available. */\n"
2847 " dl = dlopen (NULL, RTLD_LAZY);\n"
2849 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2850 " exit (EXIT_FAILURE);\n"
2852 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2858 #: ../src/guestfs.pod:1466
2861 " if (!has_function)\n"
2862 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2864 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2865 " /* Now it's safe to call\n"
2866 " guestfs_dd (g, \"foo\", \"bar\");\n"
2870 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2877 #: ../src/guestfs.pod:1479
2879 "You may think the above is an awful lot of hassle, and it is. There are "
2880 "other ways outside of the C linking system to ensure that this kind of "
2881 "incompatibility never arises, such as using package versioning:"
2885 #: ../src/guestfs.pod:1484
2888 " Requires: libguestfs >= 1.0.80\n"
2893 #: ../src/guestfs.pod:1486
2894 msgid "CALLS WITH OPTIONAL ARGUMENTS"
2898 #: ../src/guestfs.pod:1488
2900 "A recent feature of the API is the introduction of calls which take optional "
2901 "arguments. In C these are declared 3 ways. The main way is as a call which "
2902 "takes variable arguments (ie. C<...>), as in this example:"
2906 #: ../src/guestfs.pod:1493
2909 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
2914 #: ../src/guestfs.pod:1495
2916 "Call this with a list of optional arguments, terminated by C<-1>. So to "
2917 "call with no optional arguments specified:"
2921 #: ../src/guestfs.pod:1498
2924 " guestfs_add_drive_opts (g, filename, -1);\n"
2929 #: ../src/guestfs.pod:1500
2930 msgid "With a single optional argument:"
2934 #: ../src/guestfs.pod:1502
2937 " guestfs_add_drive_opts (g, filename,\n"
2938 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2944 #: ../src/guestfs.pod:1506
2949 #: ../src/guestfs.pod:1508
2952 " guestfs_add_drive_opts (g, filename,\n"
2953 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2954 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
2960 #: ../src/guestfs.pod:1513
2962 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
2967 #: ../src/guestfs.pod:1516
2968 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
2972 #: ../src/guestfs.pod:1518
2974 "The second variant has the same name with the suffix C<_va>, which works the "
2975 "same way but takes a C<va_list>. See the C manual for details. For the "
2976 "example function, this is declared:"
2980 #: ../src/guestfs.pod:1522
2983 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
2989 #: ../src/guestfs.pod:1525
2990 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
2994 #: ../src/guestfs.pod:1527
2996 "The third variant is useful where you need to construct these calls. You "
2997 "pass in a structure where you fill in the optional fields. The structure "
2998 "has a bitmask as the first element which you must set to indicate which "
2999 "fields you have filled in. For our example function the structure and call "
3004 #: ../src/guestfs.pod:1533
3007 " struct guestfs_add_drive_opts_argv {\n"
3008 " uint64_t bitmask;\n"
3010 " const char *format;\n"
3013 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
3014 " const struct guestfs_add_drive_opts_argv *optargs);\n"
3019 #: ../src/guestfs.pod:1542
3020 msgid "You could call it like this:"
3024 #: ../src/guestfs.pod:1544
3027 " struct guestfs_add_drive_opts_argv optargs = {\n"
3028 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
3029 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
3031 " .format = \"qcow2\"\n"
3037 #: ../src/guestfs.pod:1551
3040 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
3045 #: ../src/guestfs.pod:1553 ../src/guestfs-actions.pod:11 ../src/guestfs-actions.pod:1844 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1255 ../tools/virt-win-reg.pl:532
3050 #: ../src/guestfs.pod:1559
3051 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
3055 #: ../src/guestfs.pod:1564
3056 msgid "You do not need to fill in all fields of the structure."
3060 #: ../src/guestfs.pod:1568
3062 "There must be a one-to-one correspondence between fields of the structure "
3063 "that are filled in, and bits set in the bitmask."
3067 #: ../src/guestfs.pod:1573
3068 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
3072 #: ../src/guestfs.pod:1575
3074 "In other languages, optional arguments are expressed in the way that is "
3075 "natural for that language. We refer you to the language-specific "
3076 "documentation for more details on that."
3080 #: ../src/guestfs.pod:1579
3081 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
3085 #: ../src/guestfs.pod:1581
3086 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
3090 #: ../src/guestfs.pod:1583
3092 "The child process generates events in some situations. Current events "
3093 "include: receiving a log message, the child process exits."
3097 #: ../src/guestfs.pod:1586
3099 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
3104 #: ../src/guestfs.pod:1589
3106 "Only I<one callback of each type> can be registered for each handle. "
3107 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
3108 "that type. Cancel all callbacks of this type by calling this function with "
3109 "C<cb> set to C<NULL>."
3113 #: ../src/guestfs.pod:1594
3114 msgid "guestfs_set_log_message_callback"
3118 #: ../src/guestfs.pod:1596
3121 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
3122 " char *buf, int len);\n"
3123 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
3124 " guestfs_log_message_cb cb,\n"
3130 #: ../src/guestfs.pod:1602
3132 "The callback function C<cb> will be called whenever qemu or the guest writes "
3133 "anything to the console."
3137 #: ../src/guestfs.pod:1605
3138 msgid "Use this function to capture kernel messages and similar."
3142 #: ../src/guestfs.pod:1607
3144 "Normally there is no log message handler, and log messages are just "
3149 #: ../src/guestfs.pod:1610
3150 msgid "guestfs_set_subprocess_quit_callback"
3154 #: ../src/guestfs.pod:1612
3157 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
3158 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
3159 " guestfs_subprocess_quit_cb cb,\n"
3165 #: ../src/guestfs.pod:1617
3167 "The callback function C<cb> will be called when the child process quits, "
3168 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
3169 "corresponds to a transition from any state to the CONFIG state)."
3173 #: ../src/guestfs.pod:1622
3174 msgid "guestfs_set_launch_done_callback"
3178 #: ../src/guestfs.pod:1624
3181 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
3182 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
3183 " guestfs_launch_done_cb cb,\n"
3189 #: ../src/guestfs.pod:1629
3191 "The callback function C<cb> will be called when the child process becomes "
3192 "ready first time after it has been launched. (This corresponds to a "
3193 "transition from LAUNCHING to the READY state)."
3197 #: ../src/guestfs.pod:1633
3198 msgid "guestfs_set_close_callback"
3202 #: ../src/guestfs.pod:1635
3205 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
3206 " void guestfs_set_close_callback (guestfs_h *g,\n"
3207 " guestfs_close_cb cb,\n"
3213 #: ../src/guestfs.pod:1640
3215 "The callback function C<cb> will be called while the handle is being closed "
3216 "(synchronously from L</guestfs_close>)."
3220 #: ../src/guestfs.pod:1643
3222 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
3223 "handles that are open when the program exits. This means that this callback "
3224 "might be called indirectly from L<exit(3)>, which can cause unexpected "
3225 "problems in higher-level languages (eg. if your HLL interpreter has already "
3226 "been cleaned up by the time this is called, and if your callback then jumps "
3227 "into some HLL function)."
3231 #: ../src/guestfs.pod:1651
3232 msgid "guestfs_set_progress_callback"
3236 #: ../src/guestfs.pod:1653
3239 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
3240 " int proc_nr, int serial,\n"
3241 " uint64_t position, uint64_t total);\n"
3242 " void guestfs_set_progress_callback (guestfs_h *g,\n"
3243 " guestfs_progress_cb cb,\n"
3249 #: ../src/guestfs.pod:1660
3251 "Some long-running operations can generate progress messages. If this "
3252 "callback is registered, then it will be called each time a progress message "
3253 "is generated (usually two seconds after the operation started, and three "
3254 "times per second thereafter until it completes, although the frequency may "
3255 "change in future versions)."
3259 #: ../src/guestfs.pod:1666
3261 "The callback receives two numbers: C<position> and C<total>. The units of "
3262 "C<total> are not defined, although for some operations C<total> may relate "
3263 "in some way to the amount of data to be transferred (eg. in bytes or "
3264 "megabytes), and C<position> may be the portion which has been transferred."
3268 #: ../src/guestfs.pod:1672
3269 msgid "The only defined and stable parts of the API are:"
3273 #: ../src/guestfs.pod:1678
3275 "The callback can display to the user some type of progress bar or indicator "
3276 "which shows the ratio of C<position>:C<total>."
3280 #: ../src/guestfs.pod:1683
3281 msgid "0 E<lt>= C<position> E<lt>= C<total>"
3285 #: ../src/guestfs.pod:1687
3287 "If any progress notification is sent during a call, then a final progress "
3288 "notification is always sent when C<position> = C<total>."
3292 #: ../src/guestfs.pod:1690
3294 "This is to simplify caller code, so callers can easily set the progress "
3295 "indicator to \"100%\" at the end of the operation, without requiring special "
3296 "code to detect this case."
3300 #: ../src/guestfs.pod:1696
3302 "The callback also receives the procedure number and serial number of the "
3303 "call. These are only useful for debugging protocol issues, and the callback "
3304 "can normally ignore them. The callback may want to print these numbers in "
3305 "error messages or debugging messages."
3309 #: ../src/guestfs.pod:1701
3310 msgid "PRIVATE DATA AREA"
3314 #: ../src/guestfs.pod:1703
3316 "You can attach named pieces of private data to the libguestfs handle, and "
3317 "fetch them by name for the lifetime of the handle. This is called the "
3318 "private data area and is only available from the C API."
3322 #: ../src/guestfs.pod:1707
3323 msgid "To attach a named piece of data, use the following call:"
3327 #: ../src/guestfs.pod:1709
3330 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
3335 #: ../src/guestfs.pod:1711
3337 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
3338 "pointer (which can be C<NULL>). Any previous item with the same name is "
3343 #: ../src/guestfs.pod:1715
3345 "You can use any C<key> you want, but names beginning with an underscore "
3346 "character are reserved for internal libguestfs purposes (for implementing "
3347 "language bindings). It is recommended to prefix the name with some unique "
3348 "string to avoid collisions with other users."
3352 #: ../src/guestfs.pod:1720
3353 msgid "To retrieve the pointer, use:"
3357 #: ../src/guestfs.pod:1722
3360 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
3365 #: ../src/guestfs.pod:1724
3367 "This function returns C<NULL> if either no data is found associated with "
3368 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
3373 #: ../src/guestfs.pod:1728
3375 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
3376 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
3377 "all. In particular, libguestfs does I<not> try to free the data when the "
3378 "handle is closed. If the data must be freed, then the caller must either "
3379 "free it before calling L</guestfs_close> or must set up a close callback to "
3380 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
3381 "can be registered for a handle)."
3385 #: ../src/guestfs.pod:1736
3387 "The private data area is implemented using a hash table, and should be "
3388 "reasonably efficient for moderate numbers of keys."
3392 #: ../src/guestfs.pod:1739 ../src/guestfs.pod:1744
3397 #: ../src/guestfs.pod:1741
3399 "<!-- old anchor for the next section --> <a "
3400 "name=\"state_machine_and_low_level_event_api\"/>"
3404 #: ../src/guestfs.pod:1746
3405 msgid "ARCHITECTURE"
3409 #: ../src/guestfs.pod:1748
3411 "Internally, libguestfs is implemented by running an appliance (a special "
3412 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
3413 "process of the main program."
3417 #: ../src/guestfs.pod:1752
3420 " ___________________\n"
3422 " | main program |\n"
3424 " | | child process / appliance\n"
3425 " | | __________________________\n"
3427 " +-------------------+ RPC | +-----------------+ |\n"
3428 " | libguestfs <--------------------> guestfsd | |\n"
3429 " | | | +-----------------+ |\n"
3430 " \\___________________/ | | Linux kernel | |\n"
3431 " | +--^--------------+ |\n"
3432 " \\_________|________________/\n"
3438 " \\______________/\n"
3443 #: ../src/guestfs.pod:1772
3445 "The library, linked to the main program, creates the child process and hence "
3446 "the appliance in the L</guestfs_launch> function."
3450 #: ../src/guestfs.pod:1775
3452 "Inside the appliance is a Linux kernel and a complete stack of userspace "
3453 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
3454 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
3455 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
3456 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
3457 "attached to the qemu process which translates device access by the "
3458 "appliance's Linux kernel into accesses to the image."
3462 #: ../src/guestfs.pod:1784
3464 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
3465 "Although the disk image you are attached to might also be used by some "
3466 "virtual machine, libguestfs doesn't know or care about this. (But you will "
3467 "care if both libguestfs's qemu process and your virtual machine are trying "
3468 "to update the disk image at the same time, since these usually results in "
3469 "massive disk corruption)."
3473 #: ../src/guestfs.pod:1791
3474 msgid "STATE MACHINE"
3478 #: ../src/guestfs.pod:1793
3479 msgid "libguestfs uses a state machine to model the child process:"
3483 #: ../src/guestfs.pod:1795
3495 " / | \\ \\ guestfs_launch\n"
3496 " / | _\\__V______\n"
3498 " / | | LAUNCHING |\n"
3499 " / | \\___________/\n"
3501 " / | guestfs_launch\n"
3503 " ______ / __|____V\n"
3504 " / \\ ------> / \\\n"
3505 " | BUSY | | READY |\n"
3506 " \\______/ <------ \\________/\n"
3511 #: ../src/guestfs.pod:1817
3513 "The normal transitions are (1) CONFIG (when the handle is created, but there "
3514 "is no child process), (2) LAUNCHING (when the child process is booting up), "
3515 "(3) alternating between READY and BUSY as commands are issued to, and "
3516 "carried out by, the child process."
3520 #: ../src/guestfs.pod:1822
3522 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
3523 "asynchronously at any time (eg. due to some internal error), and that causes "
3524 "the state to transition back to CONFIG."
3528 #: ../src/guestfs.pod:1826
3530 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
3531 "issued when in the CONFIG state."
3535 #: ../src/guestfs.pod:1829
3537 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
3538 "L</guestfs_launch> blocks until the child process is READY to accept "
3539 "commands (or until some failure or timeout). L</guestfs_launch> internally "
3540 "moves the state from CONFIG to LAUNCHING while it is running."
3544 #: ../src/guestfs.pod:1835
3546 "API actions such as L</guestfs_mount> can only be issued when in the READY "
3547 "state. These API calls block waiting for the command to be carried out "
3548 "(ie. the state to transition to BUSY and then back to READY). There are no "
3549 "non-blocking versions, and no way to issue more than one command per handle "
3554 #: ../src/guestfs.pod:1841
3556 "Finally, the child process sends asynchronous messages back to the main "
3557 "program, such as kernel log messages. You can register a callback to "
3558 "receive these messages."
3562 #: ../src/guestfs.pod:1845
3567 #: ../src/guestfs.pod:1847
3568 msgid "COMMUNICATION PROTOCOL"
3572 #: ../src/guestfs.pod:1849
3574 "Don't rely on using this protocol directly. This section documents how it "
3575 "currently works, but it may change at any time."
3579 #: ../src/guestfs.pod:1852
3581 "The protocol used to talk between the library and the daemon running inside "
3582 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
3583 "1014, RFC 1832, RFC 4506)."
3587 #: ../src/guestfs.pod:1856
3589 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
3590 "this file is automatically generated)."
3594 #: ../src/guestfs.pod:1859
3596 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
3597 "and C<FileOut> parameters, which are handled with very simple request/reply "
3598 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
3599 "parameters, which use the same request and reply messages, but they may also "
3600 "be followed by files sent using a chunked encoding."
3604 #: ../src/guestfs.pod:1866
3605 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
3609 #: ../src/guestfs.pod:1868
3610 msgid "For ordinary functions, the request message is:"
3614 #: ../src/guestfs.pod:1870
3617 " total length (header + arguments,\n"
3618 " but not including the length word itself)\n"
3619 " struct guestfs_message_header (encoded as XDR)\n"
3620 " struct guestfs_<foo>_args (encoded as XDR)\n"
3625 #: ../src/guestfs.pod:1875
3627 "The total length field allows the daemon to allocate a fixed size buffer "
3628 "into which it slurps the rest of the message. As a result, the total length "
3629 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
3630 "effective size of any request is limited to somewhere under this size."
3634 #: ../src/guestfs.pod:1881
3636 "Note also that many functions don't take any arguments, in which case the "
3637 "C<guestfs_I<foo>_args> is completely omitted."
3641 #: ../src/guestfs.pod:1884
3643 "The header contains the procedure number (C<guestfs_proc>) which is how the "
3644 "receiver knows what type of args structure to expect, or none at all."
3648 #: ../src/guestfs.pod:1888
3650 "For functions that take optional arguments, the optional arguments are "
3651 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
3652 "arguments. A bitmask in the header indicates which optional arguments are "
3653 "meaningful. The bitmask is also checked to see if it contains bits set "
3654 "which the daemon does not know about (eg. if more optional arguments were "
3655 "added in a later version of the library), and this causes the call to be "
3660 #: ../src/guestfs.pod:1896
3661 msgid "The reply message for ordinary functions is:"
3665 #: ../src/guestfs.pod:1898
3668 " total length (header + ret,\n"
3669 " but not including the length word itself)\n"
3670 " struct guestfs_message_header (encoded as XDR)\n"
3671 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3676 #: ../src/guestfs.pod:1903
3678 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
3679 "functions that return no formal return values."
3683 #: ../src/guestfs.pod:1906
3684 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
3688 #: ../src/guestfs.pod:1909
3690 "In the case of an error, a flag is set in the header, and the reply message "
3691 "is slightly changed:"
3695 #: ../src/guestfs.pod:1912
3698 " total length (header + error,\n"
3699 " but not including the length word itself)\n"
3700 " struct guestfs_message_header (encoded as XDR)\n"
3701 " struct guestfs_message_error (encoded as XDR)\n"
3706 #: ../src/guestfs.pod:1917
3708 "The C<guestfs_message_error> structure contains the error message as a "
3713 #: ../src/guestfs.pod:1920
3714 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
3718 #: ../src/guestfs.pod:1922
3720 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
3721 "The normal request message is sent (see above). However this is followed by "
3722 "a sequence of file chunks."
3726 #: ../src/guestfs.pod:1926
3729 " total length (header + arguments,\n"
3730 " but not including the length word itself,\n"
3731 " and not including the chunks)\n"
3732 " struct guestfs_message_header (encoded as XDR)\n"
3733 " struct guestfs_<foo>_args (encoded as XDR)\n"
3734 " sequence of chunks for FileIn param #0\n"
3735 " sequence of chunks for FileIn param #1 etc.\n"
3740 #: ../src/guestfs.pod:1934
3741 msgid "The \"sequence of chunks\" is:"
3745 #: ../src/guestfs.pod:1936
3748 " length of chunk (not including length word itself)\n"
3749 " struct guestfs_chunk (encoded as XDR)\n"
3750 " length of chunk\n"
3751 " struct guestfs_chunk (encoded as XDR)\n"
3753 " length of chunk\n"
3754 " struct guestfs_chunk (with data.data_len == 0)\n"
3759 #: ../src/guestfs.pod:1944
3761 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
3762 "is set in the final chunk to indicate either successful completion or early "
3767 #: ../src/guestfs.pod:1948
3769 "At time of writing there are no functions that have more than one FileIn "
3770 "parameter. However this is (theoretically) supported, by sending the "
3771 "sequence of chunks for each FileIn parameter one after another (from left to "
3776 #: ../src/guestfs.pod:1953
3778 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
3779 "transfer. The library does this by sending a chunk with a special flag set "
3780 "to indicate cancellation. When the daemon sees this, it cancels the whole "
3781 "RPC, does I<not> send any reply, and goes back to reading the next request."
3785 #: ../src/guestfs.pod:1959
3787 "The daemon may also cancel. It does this by writing a special word "
3788 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
3789 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
3790 "cancel chunk). The special word is chosen so that even if cancellation "
3791 "happens right at the end of the transfer (after the library has finished "
3792 "writing and has started listening for the reply), the \"spurious\" cancel "
3793 "flag will not be confused with the reply message."
3797 #: ../src/guestfs.pod:1968
3799 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
3800 "limit), and also files where the size is not known in advance (eg. from "
3801 "pipes or sockets). However the chunks are rather small "
3802 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
3803 "to keep much in memory."
3807 #: ../src/guestfs.pod:1974
3808 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
3812 #: ../src/guestfs.pod:1976
3814 "The protocol for FileOut parameters is exactly the same as for FileIn "
3815 "parameters, but with the roles of daemon and library reversed."
3819 #: ../src/guestfs.pod:1979
3822 " total length (header + ret,\n"
3823 " but not including the length word itself,\n"
3824 " and not including the chunks)\n"
3825 " struct guestfs_message_header (encoded as XDR)\n"
3826 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3827 " sequence of chunks for FileOut param #0\n"
3828 " sequence of chunks for FileOut param #1 etc.\n"
3833 #: ../src/guestfs.pod:1987
3834 msgid "INITIAL MESSAGE"
3838 #: ../src/guestfs.pod:1989
3840 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
3841 "which indicates that the guest and daemon is alive. This is what "
3842 "L</guestfs_launch> waits for."
3846 #: ../src/guestfs.pod:1993
3847 msgid "PROGRESS NOTIFICATION MESSAGES"
3851 #: ../src/guestfs.pod:1995
3853 "The daemon may send progress notification messages at any time. These are "
3854 "distinguished by the normal length word being replaced by "
3855 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
3859 #: ../src/guestfs.pod:1999
3861 "The library turns them into progress callbacks (see "
3862 "C<guestfs_set_progress_callback>) if there is a callback registered, or "
3863 "discards them if not."
3867 #: ../src/guestfs.pod:2003
3869 "The daemon self-limits the frequency of progress messages it sends (see "
3870 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
3875 #: ../src/guestfs.pod:2007
3876 msgid "LIBGUESTFS VERSION NUMBERS"
3880 #: ../src/guestfs.pod:2009
3882 "Since April 2010, libguestfs has started to make separate development and "
3883 "stable releases, along with corresponding branches in our git repository. "
3884 "These separate releases can be identified by version number:"
3888 #: ../src/guestfs.pod:2014
3891 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3892 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3898 " | `-------- sub-version\n"
3900 " `------ always '1' because we don't change the ABI\n"
3905 #: ../src/guestfs.pod:2025
3906 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3910 #: ../src/guestfs.pod:2027
3912 "As time passes we cherry pick fixes from the development branch and backport "
3913 "those into the stable branch, the effect being that the stable branch should "
3914 "get more stable and less buggy over time. So the stable releases are ideal "
3915 "for people who don't need new features but would just like the software to "
3920 #: ../src/guestfs.pod:2033
3921 msgid "Our criteria for backporting changes are:"
3925 #: ../src/guestfs.pod:2039
3927 "Documentation changes which don't affect any code are backported unless the "
3928 "documentation refers to a future feature which is not in stable."
3932 #: ../src/guestfs.pod:2045
3934 "Bug fixes which are not controversial, fix obvious problems, and have been "
3935 "well tested are backported."
3939 #: ../src/guestfs.pod:2050
3941 "Simple rearrangements of code which shouldn't affect how it works get "
3942 "backported. This is so that the code in the two branches doesn't get too "
3943 "far out of step, allowing us to backport future fixes more easily."
3947 #: ../src/guestfs.pod:2056
3949 "We I<don't> backport new features, new APIs, new tools etc, except in one "
3950 "exceptional case: the new feature is required in order to implement an "
3951 "important bug fix."
3955 #: ../src/guestfs.pod:2062
3957 "A new stable branch starts when we think the new features in development are "
3958 "substantial and compelling enough over the current stable branch to warrant "
3959 "it. When that happens we create new stable and development versions 1.N.0 "
3960 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
3961 "stable at this point, but by backporting fixes from development, that branch "
3962 "will stabilize over time."
3966 #: ../src/guestfs.pod:2070 ../fish/guestfish.pod:965 ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:330
3967 msgid "ENVIRONMENT VARIABLES"
3971 #: ../src/guestfs.pod:2074 ../fish/guestfish.pod:991
3972 msgid "LIBGUESTFS_APPEND"
3976 #: ../src/guestfs.pod:2076 ../fish/guestfish.pod:993
3977 msgid "Pass additional options to the guest kernel."
3981 #: ../src/guestfs.pod:2078 ../fish/guestfish.pod:995
3982 msgid "LIBGUESTFS_DEBUG"
3986 #: ../src/guestfs.pod:2080
3988 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
3989 "effect as calling C<guestfs_set_verbose (g, 1)>."
3993 #: ../src/guestfs.pod:2083 ../fish/guestfish.pod:1000
3994 msgid "LIBGUESTFS_MEMSIZE"
3998 #: ../src/guestfs.pod:2085 ../fish/guestfish.pod:1002
3999 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
4003 #: ../src/guestfs.pod:2088 ../fish/guestfish.pod:1005
4006 " LIBGUESTFS_MEMSIZE=700\n"
4011 #: ../src/guestfs.pod:2090 ../fish/guestfish.pod:1007
4012 msgid "LIBGUESTFS_PATH"
4016 #: ../src/guestfs.pod:2092
4018 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
4019 "the discussion of paths in section PATH above."
4023 #: ../src/guestfs.pod:2095 ../fish/guestfish.pod:1012
4024 msgid "LIBGUESTFS_QEMU"
4028 #: ../src/guestfs.pod:2097 ../fish/guestfish.pod:1014
4030 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
4031 "which was found at compile time by the configure script is used."
4035 #: ../src/guestfs.pod:2101
4036 msgid "See also L</QEMU WRAPPERS> above."
4040 #: ../src/guestfs.pod:2103 ../fish/guestfish.pod:1018
4041 msgid "LIBGUESTFS_TRACE"
4045 #: ../src/guestfs.pod:2105
4047 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
4048 "effect as calling C<guestfs_set_trace (g, 1)>."
4052 #: ../src/guestfs.pod:2108 ../fish/guestfish.pod:1027
4057 #: ../src/guestfs.pod:2110 ../fish/guestfish.pod:1029
4058 msgid "Location of temporary directory, defaults to C</tmp>."
4062 #: ../src/guestfs.pod:2112 ../fish/guestfish.pod:1031
4064 "If libguestfs was compiled to use the supermin appliance then the real "
4065 "appliance is cached in this directory, shared between all handles belonging "
4066 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
4067 "use in case C</tmp> is not large enough."
4071 #: ../src/guestfs.pod:2120 ../fish/guestfish.pod:1089 ../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:281 ../tools/virt-make-fs.pl:534 ../tools/virt-list-partitions.pl:257
4076 #: ../src/guestfs.pod:2122
4078 "L<guestfs-examples(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, "
4079 "L<guestfs-ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, "
4080 "L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)>, "
4081 "L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
4082 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
4083 "L<virt-rescue(1)>, L<virt-tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
4084 "L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
4088 #: ../src/guestfs.pod:2145
4090 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
4091 "L<lvm(8)>, L<disktype(1)>."
4095 #: ../src/guestfs.pod:2152 ../tools/virt-win-reg.pl:587 ../tools/virt-make-fs.pl:548
4100 #: ../src/guestfs.pod:2154
4101 msgid "To get a list of bugs against libguestfs use this link:"
4105 #: ../src/guestfs.pod:2156
4106 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
4110 #: ../src/guestfs.pod:2158
4111 msgid "To report a new bug against libguestfs use this link:"
4115 #: ../src/guestfs.pod:2160
4116 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
4120 #: ../src/guestfs.pod:2162
4121 msgid "When reporting a bug, please check:"
4125 #: ../src/guestfs.pod:2168
4126 msgid "That the bug hasn't been reported already."
4130 #: ../src/guestfs.pod:2172
4131 msgid "That you are testing a recent version."
4135 #: ../src/guestfs.pod:2176
4136 msgid "Describe the bug accurately, and give a way to reproduce it."
4140 #: ../src/guestfs.pod:2180
4142 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
4147 #: ../src/guestfs.pod:2185 ../fish/guestfish.pod:1108 ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:244
4152 #: ../src/guestfs.pod:2187 ../fish/guestfish.pod:1110 ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:246
4153 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4157 #: ../src/guestfs.pod:2189 ../fish/guestfish.pod:1112 ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:248 ../tools/virt-edit.pl:366 ../tools/virt-win-reg.pl:602 ../tools/virt-resize.pl:1508 ../tools/virt-list-filesystems.pl:206 ../tools/virt-tar.pl:296 ../tools/virt-make-fs.pl:563 ../tools/virt-list-partitions.pl:273
4162 #: ../src/guestfs.pod:2191 ../fish/guestfish.pod:1114 ../fuse/guestmount.pod:250
4163 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
4167 #: ../src/guestfs.pod:2194
4169 "This library is free software; you can redistribute it and/or modify it "
4170 "under the terms of the GNU Lesser General Public License as published by the "
4171 "Free Software Foundation; either version 2 of the License, or (at your "
4172 "option) any later version."
4176 #: ../src/guestfs.pod:2199
4178 "This library is distributed in the hope that it will be useful, but WITHOUT "
4179 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
4180 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
4185 #: ../src/guestfs.pod:2204
4187 "You should have received a copy of the GNU Lesser General Public License "
4188 "along with this library; if not, write to the Free Software Foundation, "
4189 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
4193 #: ../src/guestfs-actions.pod:1
4194 msgid "guestfs_add_cdrom"
4198 #: ../src/guestfs-actions.pod:3
4202 " guestfs_add_cdrom (guestfs_h *g,\n"
4203 " const char *filename);\n"
4208 #: ../src/guestfs-actions.pod:7 ../fish/guestfish-actions.pod:5
4209 msgid "This function adds a virtual CD-ROM disk image to the guest."
4213 #: ../src/guestfs-actions.pod:9 ../fish/guestfish-actions.pod:7
4214 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
4218 #: ../src/guestfs-actions.pod:17
4220 "This call checks for the existence of C<filename>. This stops you from "
4221 "specifying other types of drive which are supported by qemu such as C<nbd:> "
4222 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
4227 #: ../src/guestfs-actions.pod:24
4229 "If you just want to add an ISO file (often you use this as an efficient way "
4230 "to transfer large files into the guest), then you should probably use "
4231 "C<guestfs_add_drive_ro> instead."
4235 #: ../src/guestfs-actions.pod:30 ../src/guestfs-actions.pod:128 ../src/guestfs-actions.pod:189 ../src/guestfs-actions.pod:226 ../src/guestfs-actions.pod:240 ../src/guestfs-actions.pod:261 ../src/guestfs-actions.pod:281 ../src/guestfs-actions.pod:295 ../src/guestfs-actions.pod:410 ../src/guestfs-actions.pod:430 ../src/guestfs-actions.pod:444 ../src/guestfs-actions.pod:489 ../src/guestfs-actions.pod:517 ../src/guestfs-actions.pod:535 ../src/guestfs-actions.pod:602 ../src/guestfs-actions.pod:635 ../src/guestfs-actions.pod:649 ../src/guestfs-actions.pod:664 ../src/guestfs-actions.pod:763 ../src/guestfs-actions.pod:781 ../src/guestfs-actions.pod:795 ../src/guestfs-actions.pod:809 ../src/guestfs-actions.pod:970 ../src/guestfs-actions.pod:990 ../src/guestfs-actions.pod:1008 ../src/guestfs-actions.pod:1092 ../src/guestfs-actions.pod:1110 ../src/guestfs-actions.pod:1129 ../src/guestfs-actions.pod:1143 ../src/guestfs-actions.pod:1163 ../src/guestfs-actions.pod:1233 ../src/guestfs-actions.pod:1264 ../src/guestfs-actions.pod:1289 ../src/guestfs-actions.pod:1326 ../src/guestfs-actions.pod:1432 ../src/guestfs-actions.pod:1466 ../src/guestfs-actions.pod:1684 ../src/guestfs-actions.pod:1706 ../src/guestfs-actions.pod:1793 ../src/guestfs-actions.pod:2243 ../src/guestfs-actions.pod:2387 ../src/guestfs-actions.pod:2448 ../src/guestfs-actions.pod:2483 ../src/guestfs-actions.pod:3222 ../src/guestfs-actions.pod:3237 ../src/guestfs-actions.pod:3257 ../src/guestfs-actions.pod:3410 ../src/guestfs-actions.pod:3424 ../src/guestfs-actions.pod:3437 ../src/guestfs-actions.pod:3451 ../src/guestfs-actions.pod:3466 ../src/guestfs-actions.pod:3502 ../src/guestfs-actions.pod:3574 ../src/guestfs-actions.pod:3594 ../src/guestfs-actions.pod:3611 ../src/guestfs-actions.pod:3634 ../src/guestfs-actions.pod:3657 ../src/guestfs-actions.pod:3689 ../src/guestfs-actions.pod:3708 ../src/guestfs-actions.pod:3727 ../src/guestfs-actions.pod:3762 ../src/guestfs-actions.pod:3774 ../src/guestfs-actions.pod:3810 ../src/guestfs-actions.pod:3826 ../src/guestfs-actions.pod:3839 ../src/guestfs-actions.pod:3854 ../src/guestfs-actions.pod:3871 ../src/guestfs-actions.pod:3964 ../src/guestfs-actions.pod:3984 ../src/guestfs-actions.pod:3997 ../src/guestfs-actions.pod:4048 ../src/guestfs-actions.pod:4066 ../src/guestfs-actions.pod:4084 ../src/guestfs-actions.pod:4100 ../src/guestfs-actions.pod:4114 ../src/guestfs-actions.pod:4128 ../src/guestfs-actions.pod:4145 ../src/guestfs-actions.pod:4160 ../src/guestfs-actions.pod:4180 ../src/guestfs-actions.pod:4224 ../src/guestfs-actions.pod:4295 ../src/guestfs-actions.pod:4326 ../src/guestfs-actions.pod:4345 ../src/guestfs-actions.pod:4364 ../src/guestfs-actions.pod:4376 ../src/guestfs-actions.pod:4393 ../src/guestfs-actions.pod:4406 ../src/guestfs-actions.pod:4421 ../src/guestfs-actions.pod:4436 ../src/guestfs-actions.pod:4471 ../src/guestfs-actions.pod:4486 ../src/guestfs-actions.pod:4506 ../src/guestfs-actions.pod:4520 ../src/guestfs-actions.pod:4537 ../src/guestfs-actions.pod:4586 ../src/guestfs-actions.pod:4623 ../src/guestfs-actions.pod:4637 ../src/guestfs-actions.pod:4665 ../src/guestfs-actions.pod:4682 ../src/guestfs-actions.pod:4700 ../src/guestfs-actions.pod:4834 ../src/guestfs-actions.pod:4891 ../src/guestfs-actions.pod:4913 ../src/guestfs-actions.pod:4931 ../src/guestfs-actions.pod:4963 ../src/guestfs-actions.pod:5029 ../src/guestfs-actions.pod:5046 ../src/guestfs-actions.pod:5059 ../src/guestfs-actions.pod:5073 ../src/guestfs-actions.pod:5362 ../src/guestfs-actions.pod:5381 ../src/guestfs-actions.pod:5395 ../src/guestfs-actions.pod:5407 ../src/guestfs-actions.pod:5421 ../src/guestfs-actions.pod:5433 ../src/guestfs-actions.pod:5447 ../src/guestfs-actions.pod:5463 ../src/guestfs-actions.pod:5484 ../src/guestfs-actions.pod:5503 ../src/guestfs-actions.pod:5522 ../src/guestfs-actions.pod:5540 ../src/guestfs-actions.pod:5563 ../src/guestfs-actions.pod:5581 ../src/guestfs-actions.pod:5600 ../src/guestfs-actions.pod:5621 ../src/guestfs-actions.pod:5640 ../src/guestfs-actions.pod:5657 ../src/guestfs-actions.pod:5685 ../src/guestfs-actions.pod:5709 ../src/guestfs-actions.pod:5728 ../src/guestfs-actions.pod:5752 ../src/guestfs-actions.pod:5767 ../src/guestfs-actions.pod:5782 ../src/guestfs-actions.pod:5801 ../src/guestfs-actions.pod:5838 ../src/guestfs-actions.pod:5861 ../src/guestfs-actions.pod:5887 ../src/guestfs-actions.pod:5995 ../src/guestfs-actions.pod:6116 ../src/guestfs-actions.pod:6128 ../src/guestfs-actions.pod:6141 ../src/guestfs-actions.pod:6154 ../src/guestfs-actions.pod:6176 ../src/guestfs-actions.pod:6189 ../src/guestfs-actions.pod:6202 ../src/guestfs-actions.pod:6215 ../src/guestfs-actions.pod:6230 ../src/guestfs-actions.pod:6289 ../src/guestfs-actions.pod:6306 ../src/guestfs-actions.pod:6322 ../src/guestfs-actions.pod:6338 ../src/guestfs-actions.pod:6355 ../src/guestfs-actions.pod:6368 ../src/guestfs-actions.pod:6388 ../src/guestfs-actions.pod:6424 ../src/guestfs-actions.pod:6438 ../src/guestfs-actions.pod:6479 ../src/guestfs-actions.pod:6492 ../src/guestfs-actions.pod:6510 ../src/guestfs-actions.pod:6544 ../src/guestfs-actions.pod:6580 ../src/guestfs-actions.pod:6699 ../src/guestfs-actions.pod:6717 ../src/guestfs-actions.pod:6731 ../src/guestfs-actions.pod:6786 ../src/guestfs-actions.pod:6799 ../src/guestfs-actions.pod:6844 ../src/guestfs-actions.pod:6877 ../src/guestfs-actions.pod:6931 ../src/guestfs-actions.pod:6957 ../src/guestfs-actions.pod:7023 ../src/guestfs-actions.pod:7042 ../src/guestfs-actions.pod:7071
4236 msgid "This function returns 0 on success or -1 on error."
4240 #: ../src/guestfs-actions.pod:32 ../src/guestfs-actions.pod:242 ../src/guestfs-actions.pod:263 ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:153 ../fish/guestfish-actions.pod:167
4242 "This function is deprecated. In new code, use the C<add_drive_opts> call "
4247 #: ../src/guestfs-actions.pod:35 ../src/guestfs-actions.pod:245 ../src/guestfs-actions.pod:266 ../src/guestfs-actions.pod:1437 ../src/guestfs-actions.pod:1923 ../src/guestfs-actions.pod:1944 ../src/guestfs-actions.pod:4185 ../src/guestfs-actions.pod:6965 ../src/guestfs-actions.pod:7134 ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:156 ../fish/guestfish-actions.pod:170 ../fish/guestfish-actions.pod:951 ../fish/guestfish-actions.pod:1308 ../fish/guestfish-actions.pod:1322 ../fish/guestfish-actions.pod:2818 ../fish/guestfish-actions.pod:4620 ../fish/guestfish-actions.pod:4717
4249 "Deprecated functions will not be removed from the API, but the fact that "
4250 "they are deprecated indicates that there are problems with correct use of "
4255 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:130 ../src/guestfs-actions.pod:1094 ../src/guestfs-actions.pod:1895 ../src/guestfs-actions.pod:1993 ../src/guestfs-actions.pod:2096 ../src/guestfs-actions.pod:3224 ../src/guestfs-actions.pod:3239 ../src/guestfs-actions.pod:4473 ../src/guestfs-actions.pod:5542 ../src/guestfs-actions.pod:5659 ../src/guestfs-actions.pod:5769 ../src/guestfs-actions.pod:6232 ../src/guestfs-actions.pod:6357 ../src/guestfs-actions.pod:6879
4256 msgid "(Added in 0.3)"
4260 #: ../src/guestfs-actions.pod:41
4261 msgid "guestfs_add_domain"
4265 #: ../src/guestfs-actions.pod:43
4269 " guestfs_add_domain (guestfs_h *g,\n"
4270 " const char *dom,\n"
4276 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:139 ../src/guestfs-actions.pod:4199
4278 "You may supply a list of optional arguments to this call. Use zero or more "
4279 "of the following pairs of parameters, and terminate the list with C<-1> on "
4280 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
4284 #: ../src/guestfs-actions.pod:53
4287 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
4288 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
4289 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
4294 #: ../src/guestfs-actions.pod:57
4296 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
4297 "It works by connecting to libvirt, requesting the domain and domain XML from "
4298 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
4303 #: ../src/guestfs-actions.pod:62 ../fish/guestfish-actions.pod:46
4305 "The number of disks added is returned. This operation is atomic: if an "
4306 "error is returned, then no disks are added."
4310 #: ../src/guestfs-actions.pod:65 ../fish/guestfish-actions.pod:49
4312 "This function does some minimal checks to make sure the libvirt domain is "
4313 "not running (unless C<readonly> is true). In a future version we will try "
4314 "to acquire the libvirt lock on each disk."
4318 #: ../src/guestfs-actions.pod:69 ../fish/guestfish-actions.pod:53
4320 "Disks must be accessible locally. This often means that adding disks from a "
4321 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
4322 "unless those disks are accessible via the same device path locally too."
4326 #: ../src/guestfs-actions.pod:74
4328 "The optional C<libvirturi> parameter sets the libvirt URI (see "
4329 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
4330 "default libvirt URI (or one set through an environment variable, see the "
4331 "libvirt documentation for full details). If you are using the C API "
4332 "directly then it is more flexible to create the libvirt connection object "
4333 "yourself, get the domain object, and call C<guestfs_add_libvirt_dom>."
4337 #: ../src/guestfs-actions.pod:82
4339 "The other optional parameters are passed directly through to "
4340 "C<guestfs_add_drive_opts>."
4344 #: ../src/guestfs-actions.pod:85 ../src/guestfs-actions.pod:338 ../src/guestfs-actions.pod:503 ../src/guestfs-actions.pod:681 ../src/guestfs-actions.pod:712 ../src/guestfs-actions.pod:730 ../src/guestfs-actions.pod:749 ../src/guestfs-actions.pod:1309 ../src/guestfs-actions.pod:1663 ../src/guestfs-actions.pod:1866 ../src/guestfs-actions.pod:1965 ../src/guestfs-actions.pod:2005 ../src/guestfs-actions.pod:2060 ../src/guestfs-actions.pod:2083 ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:2662 ../src/guestfs-actions.pod:2683 ../src/guestfs-actions.pod:4609 ../src/guestfs-actions.pod:4737 ../src/guestfs-actions.pod:5143 ../src/guestfs-actions.pod:5169 ../src/guestfs-actions.pod:6465 ../src/guestfs-actions.pod:6890 ../src/guestfs-actions.pod:6903 ../src/guestfs-actions.pod:6916
4345 msgid "On error this function returns -1."
4349 #: ../src/guestfs-actions.pod:87
4350 msgid "(Added in 1.7.4)"
4354 #: ../src/guestfs-actions.pod:89
4355 msgid "guestfs_add_domain_va"
4359 #: ../src/guestfs-actions.pod:91
4363 " guestfs_add_domain_va (guestfs_h *g,\n"
4364 " const char *dom,\n"
4370 #: ../src/guestfs-actions.pod:96
4371 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
4375 #: ../src/guestfs-actions.pod:98 ../src/guestfs-actions.pod:109 ../src/guestfs-actions.pod:202 ../src/guestfs-actions.pod:213 ../src/guestfs-actions.pod:4236 ../src/guestfs-actions.pod:4248
4376 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
4380 #: ../src/guestfs-actions.pod:100
4381 msgid "guestfs_add_domain_argv"
4385 #: ../src/guestfs-actions.pod:102
4389 " guestfs_add_domain_argv (guestfs_h *g,\n"
4390 " const char *dom,\n"
4391 " const struct guestfs_add_domain_argv *optargs);\n"
4396 #: ../src/guestfs-actions.pod:107
4397 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
4401 #: ../src/guestfs-actions.pod:111
4402 msgid "guestfs_add_drive"
4406 #: ../src/guestfs-actions.pod:113
4410 " guestfs_add_drive (guestfs_h *g,\n"
4411 " const char *filename);\n"
4416 #: ../src/guestfs-actions.pod:117
4418 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
4419 "optional parameters, so the disk is added writable, with the format being "
4420 "detected automatically."
4424 #: ../src/guestfs-actions.pod:121
4426 "Automatic detection of the format opens you up to a potential security hole "
4427 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4428 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
4429 "you should think about replacing calls to this function with calls to "
4430 "C<guestfs_add_drive_opts>, and specifying the format."
4434 #: ../src/guestfs-actions.pod:132
4435 msgid "guestfs_add_drive_opts"
4439 #: ../src/guestfs-actions.pod:134
4443 " guestfs_add_drive_opts (guestfs_h *g,\n"
4444 " const char *filename,\n"
4450 #: ../src/guestfs-actions.pod:144
4453 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
4454 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
4455 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
4460 #: ../src/guestfs-actions.pod:148 ../fish/guestfish-actions.pod:92
4462 "This function adds a virtual machine disk image C<filename> to libguestfs. "
4463 "The first time you call this function, the disk appears as C</dev/sda>, the "
4464 "second time as C</dev/sdb>, and so on."
4468 #: ../src/guestfs-actions.pod:153 ../fish/guestfish-actions.pod:97
4470 "You don't necessarily need to be root when using libguestfs. However you "
4471 "obviously do need sufficient permissions to access the filename for whatever "
4472 "operations you want to perform (ie. read access if you just want to read the "
4473 "image or write access if you want to modify the image)."
4477 #: ../src/guestfs-actions.pod:159 ../fish/guestfish-actions.pod:103
4478 msgid "This call checks that C<filename> exists."
4482 #: ../src/guestfs-actions.pod:161 ../src/guestfs-actions.pod:4209 ../fish/guestfish-actions.pod:105 ../fish/guestfish-actions.pod:2829
4483 msgid "The optional arguments are:"
4487 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:109
4492 #: ../src/guestfs-actions.pod:167 ../fish/guestfish-actions.pod:111
4494 "If true then the image is treated as read-only. Writes are still allowed, "
4495 "but they are stored in a temporary snapshot overlay which is discarded at "
4496 "the end. The disk that you add is not modified."
4500 #: ../src/guestfs-actions.pod:171 ../fish/guestfish-actions.pod:115
4505 #: ../src/guestfs-actions.pod:173
4507 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
4508 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
4509 "Possible formats include C<raw> and C<qcow2>."
4513 #: ../src/guestfs-actions.pod:177 ../fish/guestfish-actions.pod:121
4515 "Automatic detection of the format opens you up to a potential security hole "
4516 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4517 "RHBZ#642934. Specifying the format closes this security hole."
4521 #: ../src/guestfs-actions.pod:182 ../fish/guestfish-actions.pod:126
4526 #: ../src/guestfs-actions.pod:184
4528 "This rarely-used option lets you emulate the behaviour of the deprecated "
4529 "C<guestfs_add_drive_with_if> call (q.v.)"
4533 #: ../src/guestfs-actions.pod:191
4534 msgid "(Added in 1.5.23)"
4538 #: ../src/guestfs-actions.pod:193
4539 msgid "guestfs_add_drive_opts_va"
4543 #: ../src/guestfs-actions.pod:195
4547 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
4548 " const char *filename,\n"
4554 #: ../src/guestfs-actions.pod:200
4555 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
4559 #: ../src/guestfs-actions.pod:204
4560 msgid "guestfs_add_drive_opts_argv"
4564 #: ../src/guestfs-actions.pod:206
4568 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
4569 " const char *filename,\n"
4570 " const struct guestfs_add_drive_opts_argv "
4576 #: ../src/guestfs-actions.pod:211
4577 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
4581 #: ../src/guestfs-actions.pod:215
4582 msgid "guestfs_add_drive_ro"
4586 #: ../src/guestfs-actions.pod:217
4590 " guestfs_add_drive_ro (guestfs_h *g,\n"
4591 " const char *filename);\n"
4596 #: ../src/guestfs-actions.pod:221
4598 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
4599 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
4600 "disk is added read-only, with the format being detected automatically."
4604 #: ../src/guestfs-actions.pod:228
4605 msgid "(Added in 1.0.38)"
4609 #: ../src/guestfs-actions.pod:230
4610 msgid "guestfs_add_drive_ro_with_if"
4614 #: ../src/guestfs-actions.pod:232
4618 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
4619 " const char *filename,\n"
4620 " const char *iface);\n"
4625 #: ../src/guestfs-actions.pod:237
4627 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
4628 "QEMU interface emulation to use at run time."
4632 #: ../src/guestfs-actions.pod:249 ../src/guestfs-actions.pod:270 ../src/guestfs-actions.pod:2333
4633 msgid "(Added in 1.0.84)"
4637 #: ../src/guestfs-actions.pod:251
4638 msgid "guestfs_add_drive_with_if"
4642 #: ../src/guestfs-actions.pod:253
4646 " guestfs_add_drive_with_if (guestfs_h *g,\n"
4647 " const char *filename,\n"
4648 " const char *iface);\n"
4653 #: ../src/guestfs-actions.pod:258
4655 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
4656 "QEMU interface emulation to use at run time."
4660 #: ../src/guestfs-actions.pod:272
4661 msgid "guestfs_aug_clear"
4665 #: ../src/guestfs-actions.pod:274
4669 " guestfs_aug_clear (guestfs_h *g,\n"
4670 " const char *augpath);\n"
4675 #: ../src/guestfs-actions.pod:278 ../fish/guestfish-actions.pod:178
4677 "Set the value associated with C<path> to C<NULL>. This is the same as the "
4678 "L<augtool(1)> C<clear> command."
4682 #: ../src/guestfs-actions.pod:283 ../src/guestfs-actions.pod:2085
4683 msgid "(Added in 1.3.4)"
4687 #: ../src/guestfs-actions.pod:285
4688 msgid "guestfs_aug_close"
4692 #: ../src/guestfs-actions.pod:287
4696 " guestfs_aug_close (guestfs_h *g);\n"
4701 #: ../src/guestfs-actions.pod:290
4703 "Close the current Augeas handle and free up any resources used by it. After "
4704 "calling this, you have to call C<guestfs_aug_init> again before you can use "
4705 "any other Augeas functions."
4709 #: ../src/guestfs-actions.pod:297 ../src/guestfs-actions.pod:322 ../src/guestfs-actions.pod:340 ../src/guestfs-actions.pod:354 ../src/guestfs-actions.pod:412 ../src/guestfs-actions.pod:432 ../src/guestfs-actions.pod:446 ../src/guestfs-actions.pod:477 ../src/guestfs-actions.pod:491 ../src/guestfs-actions.pod:505 ../src/guestfs-actions.pod:519 ../src/guestfs-actions.pod:537 ../src/guestfs-actions.pod:5220
4710 msgid "(Added in 0.7)"
4714 #: ../src/guestfs-actions.pod:299
4715 msgid "guestfs_aug_defnode"
4719 #: ../src/guestfs-actions.pod:301
4722 " struct guestfs_int_bool *\n"
4723 " guestfs_aug_defnode (guestfs_h *g,\n"
4724 " const char *name,\n"
4725 " const char *expr,\n"
4726 " const char *val);\n"
4731 #: ../src/guestfs-actions.pod:307 ../fish/guestfish-actions.pod:194
4732 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
4736 #: ../src/guestfs-actions.pod:310
4738 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
4739 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
4740 "containing that single node."
4744 #: ../src/guestfs-actions.pod:314 ../fish/guestfish-actions.pod:201
4746 "On success this returns a pair containing the number of nodes in the "
4747 "nodeset, and a boolean flag if a node was created."
4751 #: ../src/guestfs-actions.pod:318
4753 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
4754 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
4758 #: ../src/guestfs-actions.pod:324
4759 msgid "guestfs_aug_defvar"
4763 #: ../src/guestfs-actions.pod:326
4767 " guestfs_aug_defvar (guestfs_h *g,\n"
4768 " const char *name,\n"
4769 " const char *expr);\n"
4774 #: ../src/guestfs-actions.pod:331 ../fish/guestfish-actions.pod:209
4776 "Defines an Augeas variable C<name> whose value is the result of evaluating "
4777 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
4781 #: ../src/guestfs-actions.pod:335 ../fish/guestfish-actions.pod:213
4783 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
4784 "evaluates to something which is not a nodeset."
4788 #: ../src/guestfs-actions.pod:342
4789 msgid "guestfs_aug_get"
4793 #: ../src/guestfs-actions.pod:344
4797 " guestfs_aug_get (guestfs_h *g,\n"
4798 " const char *augpath);\n"
4803 #: ../src/guestfs-actions.pod:348 ../fish/guestfish-actions.pod:220
4805 "Look up the value associated with C<path>. If C<path> matches exactly one "
4806 "node, the C<value> is returned."
4810 #: ../src/guestfs-actions.pod:351 ../src/guestfs-actions.pod:851 ../src/guestfs-actions.pod:869 ../src/guestfs-actions.pod:929 ../src/guestfs-actions.pod:945 ../src/guestfs-actions.pod:1048 ../src/guestfs-actions.pod:1178 ../src/guestfs-actions.pod:1195 ../src/guestfs-actions.pod:1214 ../src/guestfs-actions.pod:1343 ../src/guestfs-actions.pod:1534 ../src/guestfs-actions.pod:1646 ../src/guestfs-actions.pod:1809 ../src/guestfs-actions.pod:1826 ../src/guestfs-actions.pod:1917 ../src/guestfs-actions.pod:1938 ../src/guestfs-actions.pod:2108 ../src/guestfs-actions.pod:2298 ../src/guestfs-actions.pod:2505 ../src/guestfs-actions.pod:2586 ../src/guestfs-actions.pod:2634 ../src/guestfs-actions.pod:2744 ../src/guestfs-actions.pod:2775 ../src/guestfs-actions.pod:2799 ../src/guestfs-actions.pod:2861 ../src/guestfs-actions.pod:2884 ../src/guestfs-actions.pod:3396 ../src/guestfs-actions.pod:3746 ../src/guestfs-actions.pod:3916 ../src/guestfs-actions.pod:4026 ../src/guestfs-actions.pod:4755 ../src/guestfs-actions.pod:4948 ../src/guestfs-actions.pod:5118 ../src/guestfs-actions.pod:5296 ../src/guestfs-actions.pod:5345 ../src/guestfs-actions.pod:5908 ../src/guestfs-actions.pod:5924 ../src/guestfs-actions.pod:5941 ../src/guestfs-actions.pod:5965 ../src/guestfs-actions.pod:6639 ../src/guestfs-actions.pod:6658 ../src/guestfs-actions.pod:6676 ../src/guestfs-actions.pod:6856 ../src/guestfs-actions.pod:7128
4812 "This function returns a string, or NULL on error. I<The caller must free "
4813 "the returned string after use>."
4817 #: ../src/guestfs-actions.pod:356
4818 msgid "guestfs_aug_init"
4822 #: ../src/guestfs-actions.pod:358
4826 " guestfs_aug_init (guestfs_h *g,\n"
4827 " const char *root,\n"
4833 #: ../src/guestfs-actions.pod:363 ../fish/guestfish-actions.pod:227
4835 "Create a new Augeas handle for editing configuration files. If there was "
4836 "any previous Augeas handle associated with this guestfs session, then it is "
4841 #: ../src/guestfs-actions.pod:367
4842 msgid "You must call this before using any other C<guestfs_aug_*> commands."
4846 #: ../src/guestfs-actions.pod:370 ../fish/guestfish-actions.pod:234
4847 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
4851 #: ../src/guestfs-actions.pod:373 ../fish/guestfish-actions.pod:237
4853 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
4854 "logical I<or> of the following integers:"
4858 #: ../src/guestfs-actions.pod:379 ../fish/guestfish-actions.pod:243
4859 msgid "C<AUG_SAVE_BACKUP> = 1"
4863 #: ../src/guestfs-actions.pod:381 ../fish/guestfish-actions.pod:245
4864 msgid "Keep the original file with a C<.augsave> extension."
4868 #: ../src/guestfs-actions.pod:383 ../fish/guestfish-actions.pod:247
4869 msgid "C<AUG_SAVE_NEWFILE> = 2"
4873 #: ../src/guestfs-actions.pod:385 ../fish/guestfish-actions.pod:249
4875 "Save changes into a file with extension C<.augnew>, and do not overwrite "
4876 "original. Overrides C<AUG_SAVE_BACKUP>."
4880 #: ../src/guestfs-actions.pod:388 ../fish/guestfish-actions.pod:252
4881 msgid "C<AUG_TYPE_CHECK> = 4"
4885 #: ../src/guestfs-actions.pod:390 ../fish/guestfish-actions.pod:254
4886 msgid "Typecheck lenses (can be expensive)."
4890 #: ../src/guestfs-actions.pod:392 ../fish/guestfish-actions.pod:256
4891 msgid "C<AUG_NO_STDINC> = 8"
4895 #: ../src/guestfs-actions.pod:394 ../fish/guestfish-actions.pod:258
4896 msgid "Do not use standard load path for modules."
4900 #: ../src/guestfs-actions.pod:396 ../fish/guestfish-actions.pod:260
4901 msgid "C<AUG_SAVE_NOOP> = 16"
4905 #: ../src/guestfs-actions.pod:398 ../fish/guestfish-actions.pod:262
4906 msgid "Make save a no-op, just record what would have been changed."
4910 #: ../src/guestfs-actions.pod:400 ../fish/guestfish-actions.pod:264
4911 msgid "C<AUG_NO_LOAD> = 32"
4915 #: ../src/guestfs-actions.pod:402
4916 msgid "Do not load the tree in C<guestfs_aug_init>."
4920 #: ../src/guestfs-actions.pod:406
4921 msgid "To close the handle, you can call C<guestfs_aug_close>."
4925 #: ../src/guestfs-actions.pod:408 ../fish/guestfish-actions.pod:272
4926 msgid "To find out more about Augeas, see L<http://augeas.net/>."
4930 #: ../src/guestfs-actions.pod:414
4931 msgid "guestfs_aug_insert"
4935 #: ../src/guestfs-actions.pod:416
4939 " guestfs_aug_insert (guestfs_h *g,\n"
4940 " const char *augpath,\n"
4941 " const char *label,\n"
4947 #: ../src/guestfs-actions.pod:422 ../fish/guestfish-actions.pod:278
4949 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
4950 "or after C<path> (depending on the boolean flag C<before>)."
4954 #: ../src/guestfs-actions.pod:426 ../fish/guestfish-actions.pod:282
4956 "C<path> must match exactly one existing node in the tree, and C<label> must "
4957 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
4961 #: ../src/guestfs-actions.pod:434
4962 msgid "guestfs_aug_load"
4966 #: ../src/guestfs-actions.pod:436
4970 " guestfs_aug_load (guestfs_h *g);\n"
4975 #: ../src/guestfs-actions.pod:439 ../fish/guestfish-actions.pod:290
4976 msgid "Load files into the tree."
4980 #: ../src/guestfs-actions.pod:441 ../fish/guestfish-actions.pod:292
4981 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
4985 #: ../src/guestfs-actions.pod:448
4986 msgid "guestfs_aug_ls"
4990 #: ../src/guestfs-actions.pod:450
4994 " guestfs_aug_ls (guestfs_h *g,\n"
4995 " const char *augpath);\n"
5000 #: ../src/guestfs-actions.pod:454
5002 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
5003 "sorting the resulting nodes into alphabetical order."
5007 #: ../src/guestfs-actions.pod:457 ../src/guestfs-actions.pod:473 ../src/guestfs-actions.pod:619 ../src/guestfs-actions.pod:1067 ../src/guestfs-actions.pod:1358 ../src/guestfs-actions.pod:1377 ../src/guestfs-actions.pod:1480 ../src/guestfs-actions.pod:1499 ../src/guestfs-actions.pod:1748 ../src/guestfs-actions.pod:2178 ../src/guestfs-actions.pod:2194 ../src/guestfs-actions.pod:2213 ../src/guestfs-actions.pod:2256 ../src/guestfs-actions.pod:2280 ../src/guestfs-actions.pod:2351 ../src/guestfs-actions.pod:2400 ../src/guestfs-actions.pod:2611 ../src/guestfs-actions.pod:2818 ../src/guestfs-actions.pod:3033 ../src/guestfs-actions.pod:3316 ../src/guestfs-actions.pod:3378 ../src/guestfs-actions.pod:3483 ../src/guestfs-actions.pod:3888 ../src/guestfs-actions.pod:4570 ../src/guestfs-actions.pod:5090 ../src/guestfs-actions.pod:5216 ../src/guestfs-actions.pod:5330 ../src/guestfs-actions.pod:5981 ../src/guestfs-actions.pod:6042 ../src/guestfs-actions.pod:6097 ../src/guestfs-actions.pod:6243 ../src/guestfs-actions.pod:6267 ../src/guestfs-actions.pod:6749 ../src/guestfs-actions.pod:6769 ../src/guestfs-actions.pod:6816 ../src/guestfs-actions.pod:6981 ../src/guestfs-actions.pod:7000 ../src/guestfs-actions.pod:7085 ../src/guestfs-actions.pod:7104 ../src/guestfs-actions.pod:7150 ../src/guestfs-actions.pod:7169
5009 "This function returns a NULL-terminated array of strings (like "
5010 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
5011 "strings and the array after use>."
5015 #: ../src/guestfs-actions.pod:461 ../src/guestfs-actions.pod:992 ../src/guestfs-actions.pod:1010 ../src/guestfs-actions.pod:1415 ../src/guestfs-actions.pod:3111 ../src/guestfs-actions.pod:3142 ../src/guestfs-actions.pod:3729 ../src/guestfs-actions.pod:3779 ../src/guestfs-actions.pod:3966 ../src/guestfs-actions.pod:3999 ../src/guestfs-actions.pod:4162 ../src/guestfs-actions.pod:4574 ../src/guestfs-actions.pod:5031 ../src/guestfs-actions.pod:5409 ../src/guestfs-actions.pod:5423 ../src/guestfs-actions.pod:5435 ../src/guestfs-actions.pod:5843 ../src/guestfs-actions.pod:6481 ../src/guestfs-actions.pod:6494 ../src/guestfs-actions.pod:6733 ../src/guestfs-actions.pod:6936 ../src/guestfs-actions.pod:6969
5016 msgid "(Added in 0.8)"
5020 #: ../src/guestfs-actions.pod:463
5021 msgid "guestfs_aug_match"
5025 #: ../src/guestfs-actions.pod:465
5029 " guestfs_aug_match (guestfs_h *g,\n"
5030 " const char *augpath);\n"
5035 #: ../src/guestfs-actions.pod:469 ../fish/guestfish-actions.pod:306
5037 "Returns a list of paths which match the path expression C<path>. The "
5038 "returned paths are sufficiently qualified so that they match exactly one "
5039 "node in the current tree."
5043 #: ../src/guestfs-actions.pod:479
5044 msgid "guestfs_aug_mv"
5048 #: ../src/guestfs-actions.pod:481
5052 " guestfs_aug_mv (guestfs_h *g,\n"
5053 " const char *src,\n"
5054 " const char *dest);\n"
5059 #: ../src/guestfs-actions.pod:486 ../fish/guestfish-actions.pod:314
5061 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
5062 "C<dest> is overwritten if it exists."
5066 #: ../src/guestfs-actions.pod:493
5067 msgid "guestfs_aug_rm"
5071 #: ../src/guestfs-actions.pod:495
5075 " guestfs_aug_rm (guestfs_h *g,\n"
5076 " const char *augpath);\n"
5081 #: ../src/guestfs-actions.pod:499 ../fish/guestfish-actions.pod:321
5082 msgid "Remove C<path> and all of its children."
5086 #: ../src/guestfs-actions.pod:501 ../fish/guestfish-actions.pod:323
5087 msgid "On success this returns the number of entries which were removed."
5091 #: ../src/guestfs-actions.pod:507
5092 msgid "guestfs_aug_save"
5096 #: ../src/guestfs-actions.pod:509
5100 " guestfs_aug_save (guestfs_h *g);\n"
5105 #: ../src/guestfs-actions.pod:512 ../fish/guestfish-actions.pod:329
5106 msgid "This writes all pending changes to disk."
5110 #: ../src/guestfs-actions.pod:514
5112 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
5117 #: ../src/guestfs-actions.pod:521
5118 msgid "guestfs_aug_set"
5122 #: ../src/guestfs-actions.pod:523
5126 " guestfs_aug_set (guestfs_h *g,\n"
5127 " const char *augpath,\n"
5128 " const char *val);\n"
5133 #: ../src/guestfs-actions.pod:528 ../fish/guestfish-actions.pod:338
5134 msgid "Set the value associated with C<path> to C<val>."
5138 #: ../src/guestfs-actions.pod:530
5140 "In the Augeas API, it is possible to clear a node by setting the value to "
5141 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
5142 "this call. Instead you must use the C<guestfs_aug_clear> call."
5146 #: ../src/guestfs-actions.pod:539
5147 msgid "guestfs_available"
5151 #: ../src/guestfs-actions.pod:541
5155 " guestfs_available (guestfs_h *g,\n"
5156 " char *const *groups);\n"
5161 #: ../src/guestfs-actions.pod:545 ../fish/guestfish-actions.pod:349
5163 "This command is used to check the availability of some groups of "
5164 "functionality in the appliance, which not all builds of the libguestfs "
5165 "appliance will be able to provide."
5169 #: ../src/guestfs-actions.pod:549
5171 "The libguestfs groups, and the functions that those groups correspond to, "
5172 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
5173 "runtime by calling C<guestfs_available_all_groups>."
5177 #: ../src/guestfs-actions.pod:554 ../fish/guestfish-actions.pod:358
5179 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
5180 "\"augeas\"]> would check for the availability of the Linux inotify functions "
5181 "and Augeas (configuration file editing) functions."
5185 #: ../src/guestfs-actions.pod:559 ../fish/guestfish-actions.pod:363
5186 msgid "The command returns no error if I<all> requested groups are available."
5190 #: ../src/guestfs-actions.pod:561 ../fish/guestfish-actions.pod:365
5192 "It fails with an error if one or more of the requested groups is unavailable "
5197 #: ../src/guestfs-actions.pod:564 ../fish/guestfish-actions.pod:368
5199 "If an unknown group name is included in the list of groups then an error is "
5204 #: ../src/guestfs-actions.pod:567 ../fish/guestfish-actions.pod:371
5209 #: ../src/guestfs-actions.pod:573
5210 msgid "You must call C<guestfs_launch> before calling this function."
5214 #: ../src/guestfs-actions.pod:575 ../fish/guestfish-actions.pod:379
5216 "The reason is because we don't know what groups are supported by the "
5217 "appliance/daemon until it is running and can be queried."
5221 #: ../src/guestfs-actions.pod:581 ../fish/guestfish-actions.pod:385
5223 "If a group of functions is available, this does not necessarily mean that "
5224 "they will work. You still have to check for errors when calling individual "
5225 "API functions even if they are available."
5229 #: ../src/guestfs-actions.pod:588 ../fish/guestfish-actions.pod:392
5231 "It is usually the job of distro packagers to build complete functionality "
5232 "into the libguestfs appliance. Upstream libguestfs, if built from source "
5233 "with all requirements satisfied, will support everything."
5237 #: ../src/guestfs-actions.pod:595
5239 "This call was added in version C<1.0.80>. In previous versions of "
5240 "libguestfs all you could do would be to speculatively execute a command to "
5241 "find out if the daemon implemented it. See also C<guestfs_version>."
5245 #: ../src/guestfs-actions.pod:604 ../src/guestfs-actions.pod:1165
5246 msgid "(Added in 1.0.80)"
5250 #: ../src/guestfs-actions.pod:606
5251 msgid "guestfs_available_all_groups"
5255 #: ../src/guestfs-actions.pod:608
5259 " guestfs_available_all_groups (guestfs_h *g);\n"
5264 #: ../src/guestfs-actions.pod:611
5266 "This command returns a list of all optional groups that this daemon knows "
5267 "about. Note this returns both supported and unsupported groups. To find "
5268 "out which ones the daemon can actually support you have to call "
5269 "C<guestfs_available> on each member of the returned list."
5273 #: ../src/guestfs-actions.pod:617
5274 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
5278 #: ../src/guestfs-actions.pod:623
5279 msgid "(Added in 1.3.15)"
5283 #: ../src/guestfs-actions.pod:625
5284 msgid "guestfs_base64_in"
5288 #: ../src/guestfs-actions.pod:627
5292 " guestfs_base64_in (guestfs_h *g,\n"
5293 " const char *base64file,\n"
5294 " const char *filename);\n"
5299 #: ../src/guestfs-actions.pod:632 ../fish/guestfish-actions.pod:422
5300 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
5304 #: ../src/guestfs-actions.pod:637 ../src/guestfs-actions.pod:651
5305 msgid "(Added in 1.3.5)"
5309 #: ../src/guestfs-actions.pod:639
5310 msgid "guestfs_base64_out"
5314 #: ../src/guestfs-actions.pod:641
5318 " guestfs_base64_out (guestfs_h *g,\n"
5319 " const char *filename,\n"
5320 " const char *base64file);\n"
5325 #: ../src/guestfs-actions.pod:646 ../fish/guestfish-actions.pod:431
5327 "This command downloads the contents of C<filename>, writing it out to local "
5328 "file C<base64file> encoded as base64."
5332 #: ../src/guestfs-actions.pod:653
5333 msgid "guestfs_blockdev_flushbufs"
5337 #: ../src/guestfs-actions.pod:655
5341 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
5342 " const char *device);\n"
5347 #: ../src/guestfs-actions.pod:659 ../fish/guestfish-actions.pod:440
5348 msgid "This tells the kernel to flush internal buffers associated with C<device>."
5352 #: ../src/guestfs-actions.pod:662 ../src/guestfs-actions.pod:679 ../src/guestfs-actions.pod:694 ../src/guestfs-actions.pod:710 ../src/guestfs-actions.pod:728 ../src/guestfs-actions.pod:747 ../src/guestfs-actions.pod:761 ../src/guestfs-actions.pod:779 ../src/guestfs-actions.pod:793 ../src/guestfs-actions.pod:807 ../fish/guestfish-actions.pod:443 ../fish/guestfish-actions.pod:454 ../fish/guestfish-actions.pod:463 ../fish/guestfish-actions.pod:473 ../fish/guestfish-actions.pod:485 ../fish/guestfish-actions.pod:498 ../fish/guestfish-actions.pod:506 ../fish/guestfish-actions.pod:517 ../fish/guestfish-actions.pod:525 ../fish/guestfish-actions.pod:533
5353 msgid "This uses the L<blockdev(8)> command."
5357 #: ../src/guestfs-actions.pod:666 ../src/guestfs-actions.pod:683 ../src/guestfs-actions.pod:698 ../src/guestfs-actions.pod:714 ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:751 ../src/guestfs-actions.pod:765 ../src/guestfs-actions.pod:783 ../src/guestfs-actions.pod:797 ../src/guestfs-actions.pod:811
5358 msgid "(Added in 0.9.3)"
5362 #: ../src/guestfs-actions.pod:668
5363 msgid "guestfs_blockdev_getbsz"
5367 #: ../src/guestfs-actions.pod:670
5371 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
5372 " const char *device);\n"
5377 #: ../src/guestfs-actions.pod:674 ../fish/guestfish-actions.pod:449
5378 msgid "This returns the block size of a device."
5382 #: ../src/guestfs-actions.pod:676 ../src/guestfs-actions.pod:776 ../fish/guestfish-actions.pod:451 ../fish/guestfish-actions.pod:514
5384 "(Note this is different from both I<size in blocks> and I<filesystem block "
5389 #: ../src/guestfs-actions.pod:685
5390 msgid "guestfs_blockdev_getro"
5394 #: ../src/guestfs-actions.pod:687
5398 " guestfs_blockdev_getro (guestfs_h *g,\n"
5399 " const char *device);\n"
5404 #: ../src/guestfs-actions.pod:691 ../fish/guestfish-actions.pod:460
5406 "Returns a boolean indicating if the block device is read-only (true if "
5407 "read-only, false if not)."
5411 #: ../src/guestfs-actions.pod:696 ../src/guestfs-actions.pod:1398 ../src/guestfs-actions.pod:1413 ../src/guestfs-actions.pod:1893 ../src/guestfs-actions.pod:1904 ../src/guestfs-actions.pod:1976 ../src/guestfs-actions.pod:2031 ../src/guestfs-actions.pod:2046 ../src/guestfs-actions.pod:2071 ../src/guestfs-actions.pod:2094 ../src/guestfs-actions.pod:3050 ../src/guestfs-actions.pod:3064 ../src/guestfs-actions.pod:3079 ../src/guestfs-actions.pod:3093 ../src/guestfs-actions.pod:3109 ../src/guestfs-actions.pod:3124 ../src/guestfs-actions.pod:3140 ../src/guestfs-actions.pod:3154 ../src/guestfs-actions.pod:3167 ../src/guestfs-actions.pod:3181 ../src/guestfs-actions.pod:3196 ../src/guestfs-actions.pod:3211 ../src/guestfs-actions.pod:4719
5412 msgid "This function returns a C truth value on success or -1 on error."
5416 #: ../src/guestfs-actions.pod:700
5417 msgid "guestfs_blockdev_getsize64"
5421 #: ../src/guestfs-actions.pod:702
5425 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
5426 " const char *device);\n"
5431 #: ../src/guestfs-actions.pod:706 ../fish/guestfish-actions.pod:469
5432 msgid "This returns the size of the device in bytes."
5436 #: ../src/guestfs-actions.pod:708
5437 msgid "See also C<guestfs_blockdev_getsz>."
5441 #: ../src/guestfs-actions.pod:716
5442 msgid "guestfs_blockdev_getss"
5446 #: ../src/guestfs-actions.pod:718
5450 " guestfs_blockdev_getss (guestfs_h *g,\n"
5451 " const char *device);\n"
5456 #: ../src/guestfs-actions.pod:722 ../fish/guestfish-actions.pod:479
5458 "This returns the size of sectors on a block device. Usually 512, but can be "
5459 "larger for modern devices."
5463 #: ../src/guestfs-actions.pod:725
5465 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
5470 #: ../src/guestfs-actions.pod:734
5471 msgid "guestfs_blockdev_getsz"
5475 #: ../src/guestfs-actions.pod:736
5479 " guestfs_blockdev_getsz (guestfs_h *g,\n"
5480 " const char *device);\n"
5485 #: ../src/guestfs-actions.pod:740 ../fish/guestfish-actions.pod:491
5487 "This returns the size of the device in units of 512-byte sectors (even if "
5488 "the sectorsize isn't 512 bytes ... weird)."
5492 #: ../src/guestfs-actions.pod:743
5494 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
5495 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
5499 #: ../src/guestfs-actions.pod:753
5500 msgid "guestfs_blockdev_rereadpt"
5504 #: ../src/guestfs-actions.pod:755
5508 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
5509 " const char *device);\n"
5514 #: ../src/guestfs-actions.pod:759 ../fish/guestfish-actions.pod:504
5515 msgid "Reread the partition table on C<device>."
5519 #: ../src/guestfs-actions.pod:767
5520 msgid "guestfs_blockdev_setbsz"
5524 #: ../src/guestfs-actions.pod:769
5528 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
5529 " const char *device,\n"
5530 " int blocksize);\n"
5535 #: ../src/guestfs-actions.pod:774 ../fish/guestfish-actions.pod:512
5536 msgid "This sets the block size of a device."
5540 #: ../src/guestfs-actions.pod:785
5541 msgid "guestfs_blockdev_setro"
5545 #: ../src/guestfs-actions.pod:787
5549 " guestfs_blockdev_setro (guestfs_h *g,\n"
5550 " const char *device);\n"
5555 #: ../src/guestfs-actions.pod:791 ../fish/guestfish-actions.pod:523
5556 msgid "Sets the block device named C<device> to read-only."
5560 #: ../src/guestfs-actions.pod:799
5561 msgid "guestfs_blockdev_setrw"
5565 #: ../src/guestfs-actions.pod:801
5569 " guestfs_blockdev_setrw (guestfs_h *g,\n"
5570 " const char *device);\n"
5575 #: ../src/guestfs-actions.pod:805 ../fish/guestfish-actions.pod:531
5576 msgid "Sets the block device named C<device> to read-write."
5580 #: ../src/guestfs-actions.pod:813
5581 msgid "guestfs_case_sensitive_path"
5585 #: ../src/guestfs-actions.pod:815
5589 " guestfs_case_sensitive_path (guestfs_h *g,\n"
5590 " const char *path);\n"
5595 #: ../src/guestfs-actions.pod:819 ../fish/guestfish-actions.pod:539
5597 "This can be used to resolve case insensitive paths on a filesystem which is "
5598 "case sensitive. The use case is to resolve paths which you have read from "
5599 "Windows configuration files or the Windows Registry, to the true path."
5603 #: ../src/guestfs-actions.pod:824 ../fish/guestfish-actions.pod:544
5605 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
5606 "(and probably others), which is that although the underlying filesystem is "
5607 "case-insensitive, the driver exports the filesystem to Linux as "
5612 #: ../src/guestfs-actions.pod:829 ../fish/guestfish-actions.pod:549
5614 "One consequence of this is that special directories such as C<c:\\windows> "
5615 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
5616 "precise details of how they were created. In Windows itself this would not "
5621 #: ../src/guestfs-actions.pod:835 ../fish/guestfish-actions.pod:555
5623 "Bug or feature? You decide: "
5624 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
5628 #: ../src/guestfs-actions.pod:838 ../fish/guestfish-actions.pod:558
5630 "This function resolves the true case of each element in the path and returns "
5631 "the case-sensitive path."
5635 #: ../src/guestfs-actions.pod:841
5637 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
5638 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
5639 "how the directories were originally created under Windows)."
5643 #: ../src/guestfs-actions.pod:846 ../fish/guestfish-actions.pod:566
5644 msgid "I<Note>: This function does not handle drive names, backslashes etc."
5648 #: ../src/guestfs-actions.pod:849
5649 msgid "See also C<guestfs_realpath>."
5653 #: ../src/guestfs-actions.pod:854 ../src/guestfs-actions.pod:6661
5654 msgid "(Added in 1.0.75)"
5658 #: ../src/guestfs-actions.pod:856
5663 #: ../src/guestfs-actions.pod:858
5667 " guestfs_cat (guestfs_h *g,\n"
5668 " const char *path);\n"
5673 #: ../src/guestfs-actions.pod:862 ../src/guestfs-actions.pod:5206 ../fish/guestfish-actions.pod:575 ../fish/guestfish-actions.pod:3464
5674 msgid "Return the contents of the file named C<path>."
5678 #: ../src/guestfs-actions.pod:864
5680 "Note that this function cannot correctly handle binary files (specifically, "
5681 "files containing C<\\0> character which is treated as end of string). For "
5682 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
5683 "functions which have a more complex interface."
5687 #: ../src/guestfs-actions.pod:872 ../src/guestfs-actions.pod:1051 ../src/guestfs-actions.pod:1071 ../src/guestfs-actions.pod:1362 ../src/guestfs-actions.pod:1381 ../src/guestfs-actions.pod:1484 ../src/guestfs-actions.pod:1503 ../src/guestfs-actions.pod:1752 ../src/guestfs-actions.pod:2198 ../src/guestfs-actions.pod:2217 ../src/guestfs-actions.pod:2260 ../src/guestfs-actions.pod:2284 ../src/guestfs-actions.pod:2301 ../src/guestfs-actions.pod:2330 ../src/guestfs-actions.pod:4988 ../src/guestfs-actions.pod:5014 ../src/guestfs-actions.pod:5145 ../src/guestfs-actions.pod:5171 ../src/guestfs-actions.pod:5195 ../src/guestfs-actions.pod:6046 ../src/guestfs-actions.pod:6101 ../src/guestfs-actions.pod:6247 ../src/guestfs-actions.pod:6271 ../src/guestfs-actions.pod:6933 ../src/guestfs-actions.pod:6959 ../src/guestfs-actions.pod:6985 ../src/guestfs-actions.pod:7004 ../src/guestfs-actions.pod:7089 ../src/guestfs-actions.pod:7108 ../src/guestfs-actions.pod:7154 ../src/guestfs-actions.pod:7173 ../fish/guestfish-actions.pod:582 ../fish/guestfish-actions.pod:717 ../fish/guestfish-actions.pod:729 ../fish/guestfish-actions.pod:905 ../fish/guestfish-actions.pod:915 ../fish/guestfish-actions.pod:982 ../fish/guestfish-actions.pod:992 ../fish/guestfish-actions.pod:1187 ../fish/guestfish-actions.pod:1482 ../fish/guestfish-actions.pod:1492 ../fish/guestfish-actions.pod:1520 ../fish/guestfish-actions.pod:1535 ../fish/guestfish-actions.pod:1545 ../fish/guestfish-actions.pod:1564 ../fish/guestfish-actions.pod:3334 ../fish/guestfish-actions.pod:3349 ../fish/guestfish-actions.pod:3425 ../fish/guestfish-actions.pod:3442 ../fish/guestfish-actions.pod:3457 ../fish/guestfish-actions.pod:4040 ../fish/guestfish-actions.pod:4086 ../fish/guestfish-actions.pod:4171 ../fish/guestfish-actions.pod:4186 ../fish/guestfish-actions.pod:4596 ../fish/guestfish-actions.pod:4614 ../fish/guestfish-actions.pod:4631 ../fish/guestfish-actions.pod:4641 ../fish/guestfish-actions.pod:4689 ../fish/guestfish-actions.pod:4699 ../fish/guestfish-actions.pod:4728 ../fish/guestfish-actions.pod:4738
5689 "Because of the message protocol, there is a transfer limit of somewhere "
5690 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
5694 #: ../src/guestfs-actions.pod:875 ../src/guestfs-actions.pod:3320 ../src/guestfs-actions.pod:3382 ../src/guestfs-actions.pod:3399 ../src/guestfs-actions.pod:3487 ../src/guestfs-actions.pod:3892 ../src/guestfs-actions.pod:3906 ../src/guestfs-actions.pod:5094 ../src/guestfs-actions.pod:5108 ../src/guestfs-actions.pod:6820 ../src/guestfs-actions.pod:6834
5695 msgid "(Added in 0.4)"
5699 #: ../src/guestfs-actions.pod:877
5700 msgid "guestfs_checksum"
5704 #: ../src/guestfs-actions.pod:879
5708 " guestfs_checksum (guestfs_h *g,\n"
5709 " const char *csumtype,\n"
5710 " const char *path);\n"
5715 #: ../src/guestfs-actions.pod:884 ../fish/guestfish-actions.pod:589
5716 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
5720 #: ../src/guestfs-actions.pod:887 ../fish/guestfish-actions.pod:592
5722 "The type of checksum to compute is given by the C<csumtype> parameter which "
5723 "must have one of the following values:"
5727 #: ../src/guestfs-actions.pod:892 ../fish/guestfish-actions.pod:597
5732 #: ../src/guestfs-actions.pod:894 ../fish/guestfish-actions.pod:599
5734 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
5739 #: ../src/guestfs-actions.pod:897 ../fish/guestfish-actions.pod:602
5744 #: ../src/guestfs-actions.pod:899 ../fish/guestfish-actions.pod:604
5745 msgid "Compute the MD5 hash (using the C<md5sum> program)."
5749 #: ../src/guestfs-actions.pod:901 ../fish/guestfish-actions.pod:606
5754 #: ../src/guestfs-actions.pod:903 ../fish/guestfish-actions.pod:608
5755 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
5759 #: ../src/guestfs-actions.pod:905 ../fish/guestfish-actions.pod:610
5764 #: ../src/guestfs-actions.pod:907 ../fish/guestfish-actions.pod:612
5765 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
5769 #: ../src/guestfs-actions.pod:909 ../fish/guestfish-actions.pod:614
5774 #: ../src/guestfs-actions.pod:911 ../fish/guestfish-actions.pod:616
5775 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
5779 #: ../src/guestfs-actions.pod:913 ../fish/guestfish-actions.pod:618
5784 #: ../src/guestfs-actions.pod:915 ../fish/guestfish-actions.pod:620
5785 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
5789 #: ../src/guestfs-actions.pod:917 ../fish/guestfish-actions.pod:622
5794 #: ../src/guestfs-actions.pod:919 ../fish/guestfish-actions.pod:624
5795 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
5799 #: ../src/guestfs-actions.pod:923 ../fish/guestfish-actions.pod:628
5800 msgid "The checksum is returned as a printable string."
5804 #: ../src/guestfs-actions.pod:925
5805 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
5809 #: ../src/guestfs-actions.pod:927
5810 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
5814 #: ../src/guestfs-actions.pod:932 ../src/guestfs-actions.pod:1240 ../src/guestfs-actions.pod:2062 ../src/guestfs-actions.pod:3066 ../src/guestfs-actions.pod:3095 ../src/guestfs-actions.pod:3156 ../src/guestfs-actions.pod:3183 ../src/guestfs-actions.pod:6517
5815 msgid "(Added in 1.0.2)"
5819 #: ../src/guestfs-actions.pod:934
5820 msgid "guestfs_checksum_device"
5824 #: ../src/guestfs-actions.pod:936
5828 " guestfs_checksum_device (guestfs_h *g,\n"
5829 " const char *csumtype,\n"
5830 " const char *device);\n"
5835 #: ../src/guestfs-actions.pod:941
5837 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
5838 "device named C<device>. For the types of checksums supported see the "
5839 "C<guestfs_checksum> command."
5843 #: ../src/guestfs-actions.pod:948 ../src/guestfs-actions.pod:4625 ../src/guestfs-actions.pod:4684 ../src/guestfs-actions.pod:4721 ../src/guestfs-actions.pod:4739 ../src/guestfs-actions.pod:4915 ../src/guestfs-actions.pod:6426 ../src/guestfs-actions.pod:6440 ../src/guestfs-actions.pod:6846
5844 msgid "(Added in 1.3.2)"
5848 #: ../src/guestfs-actions.pod:950
5849 msgid "guestfs_checksums_out"
5853 #: ../src/guestfs-actions.pod:952
5857 " guestfs_checksums_out (guestfs_h *g,\n"
5858 " const char *csumtype,\n"
5859 " const char *directory,\n"
5860 " const char *sumsfile);\n"
5865 #: ../src/guestfs-actions.pod:958 ../fish/guestfish-actions.pod:646
5867 "This command computes the checksums of all regular files in C<directory> and "
5868 "then emits a list of those checksums to the local output file C<sumsfile>."
5872 #: ../src/guestfs-actions.pod:962 ../fish/guestfish-actions.pod:650
5874 "This can be used for verifying the integrity of a virtual machine. However "
5875 "to be properly secure you should pay attention to the output of the checksum "
5876 "command (it uses the ones from GNU coreutils). In particular when the "
5877 "filename is not printable, coreutils uses a special backslash syntax. For "
5878 "more information, see the GNU coreutils info file."
5882 #: ../src/guestfs-actions.pod:972
5883 msgid "(Added in 1.3.7)"
5887 #: ../src/guestfs-actions.pod:974
5888 msgid "guestfs_chmod"
5892 #: ../src/guestfs-actions.pod:976
5896 " guestfs_chmod (guestfs_h *g,\n"
5898 " const char *path);\n"
5903 #: ../src/guestfs-actions.pod:981 ../fish/guestfish-actions.pod:664
5905 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
5910 #: ../src/guestfs-actions.pod:984 ../fish/guestfish-actions.pod:667
5912 "I<Note>: When using this command from guestfish, C<mode> by default would be "
5913 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
5918 #: ../src/guestfs-actions.pod:988 ../src/guestfs-actions.pod:4143 ../src/guestfs-actions.pod:4324 ../src/guestfs-actions.pod:4343 ../src/guestfs-actions.pod:4362 ../fish/guestfish-actions.pod:671 ../fish/guestfish-actions.pod:2793 ../fish/guestfish-actions.pod:2909 ../fish/guestfish-actions.pod:2919 ../fish/guestfish-actions.pod:2929
5919 msgid "The mode actually set is affected by the umask."
5923 #: ../src/guestfs-actions.pod:994
5924 msgid "guestfs_chown"
5928 #: ../src/guestfs-actions.pod:996
5932 " guestfs_chown (guestfs_h *g,\n"
5935 " const char *path);\n"
5940 #: ../src/guestfs-actions.pod:1002 ../fish/guestfish-actions.pod:677
5941 msgid "Change the file owner to C<owner> and group to C<group>."
5945 #: ../src/guestfs-actions.pod:1004 ../src/guestfs-actions.pod:3253 ../fish/guestfish-actions.pod:679 ../fish/guestfish-actions.pod:2251
5947 "Only numeric uid and gid are supported. If you want to use names, you will "
5948 "need to locate and parse the password file yourself (Augeas support makes "
5949 "this relatively easy)."
5953 #: ../src/guestfs-actions.pod:1012
5954 msgid "guestfs_command"
5958 #: ../src/guestfs-actions.pod:1014
5962 " guestfs_command (guestfs_h *g,\n"
5963 " char *const *arguments);\n"
5968 #: ../src/guestfs-actions.pod:1018 ../fish/guestfish-actions.pod:687
5970 "This call runs a command from the guest filesystem. The filesystem must be "
5971 "mounted, and must contain a compatible operating system (ie. something "
5972 "Linux, with the same or compatible processor architecture)."
5976 #: ../src/guestfs-actions.pod:1023
5978 "The single parameter is an argv-style list of arguments. The first element "
5979 "is the name of the program to run. Subsequent elements are parameters. The "
5980 "list must be non-empty (ie. must contain a program name). Note that the "
5981 "command runs directly, and is I<not> invoked via the shell (see "
5986 #: ../src/guestfs-actions.pod:1030 ../fish/guestfish-actions.pod:699
5987 msgid "The return value is anything printed to I<stdout> by the command."
5991 #: ../src/guestfs-actions.pod:1033 ../fish/guestfish-actions.pod:702
5993 "If the command returns a non-zero exit status, then this function returns an "
5994 "error message. The error message string is the content of I<stderr> from "
5999 #: ../src/guestfs-actions.pod:1037 ../fish/guestfish-actions.pod:706
6001 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
6002 "C</bin>. If you require a program from another location, you should provide "
6003 "the full path in the first parameter."
6007 #: ../src/guestfs-actions.pod:1042 ../fish/guestfish-actions.pod:711
6009 "Shared libraries and data files required by the program must be available on "
6010 "filesystems which are mounted in the correct places. It is the caller's "
6011 "responsibility to ensure all filesystems that are needed are mounted at the "
6016 #: ../src/guestfs-actions.pod:1054 ../src/guestfs-actions.pod:1074 ../src/guestfs-actions.pod:1537
6017 msgid "(Added in 0.9.1)"
6021 #: ../src/guestfs-actions.pod:1056
6022 msgid "guestfs_command_lines"
6026 #: ../src/guestfs-actions.pod:1058
6030 " guestfs_command_lines (guestfs_h *g,\n"
6031 " char *const *arguments);\n"
6036 #: ../src/guestfs-actions.pod:1062
6038 "This is the same as C<guestfs_command>, but splits the result into a list of "
6043 #: ../src/guestfs-actions.pod:1065
6044 msgid "See also: C<guestfs_sh_lines>"
6048 #: ../src/guestfs-actions.pod:1076
6049 msgid "guestfs_config"
6053 #: ../src/guestfs-actions.pod:1078
6057 " guestfs_config (guestfs_h *g,\n"
6058 " const char *qemuparam,\n"
6059 " const char *qemuvalue);\n"
6064 #: ../src/guestfs-actions.pod:1083 ../fish/guestfish-actions.pod:736
6066 "This can be used to add arbitrary qemu command line parameters of the form "
6067 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
6068 "setting some parameters which would interfere with parameters that we use."
6072 #: ../src/guestfs-actions.pod:1088 ../fish/guestfish-actions.pod:741
6073 msgid "The first character of C<param> string must be a C<-> (dash)."
6077 #: ../src/guestfs-actions.pod:1090 ../fish/guestfish-actions.pod:743
6078 msgid "C<value> can be NULL."
6082 #: ../src/guestfs-actions.pod:1096
6083 msgid "guestfs_copy_size"
6087 #: ../src/guestfs-actions.pod:1098
6091 " guestfs_copy_size (guestfs_h *g,\n"
6092 " const char *src,\n"
6093 " const char *dest,\n"
6099 #: ../src/guestfs-actions.pod:1104 ../fish/guestfish-actions.pod:749
6101 "This command copies exactly C<size> bytes from one source device or file "
6102 "C<src> to another destination device or file C<dest>."
6106 #: ../src/guestfs-actions.pod:1107 ../fish/guestfish-actions.pod:752
6108 "Note this will fail if the source is too short or if the destination is not "
6113 #: ../src/guestfs-actions.pod:1112 ../src/guestfs-actions.pod:1235 ../src/guestfs-actions.pod:1266 ../src/guestfs-actions.pod:1686 ../src/guestfs-actions.pod:1708 ../src/guestfs-actions.pod:6512 ../src/guestfs-actions.pod:6546 ../src/guestfs-actions.pod:7025 ../src/guestfs-actions.pod:7044
6115 "This long-running command can generate progress notification messages so "
6116 "that the caller can display a progress bar or indicator. To receive these "
6117 "messages, the caller must register a progress callback. See "
6118 "L<guestfs(3)/guestfs_set_progress_callback>."
6122 #: ../src/guestfs-actions.pod:1117 ../src/guestfs-actions.pod:3919 ../src/guestfs-actions.pod:5121 ../src/guestfs-actions.pod:6753 ../src/guestfs-actions.pod:6773 ../src/guestfs-actions.pod:6859
6123 msgid "(Added in 1.0.87)"
6127 #: ../src/guestfs-actions.pod:1119
6132 #: ../src/guestfs-actions.pod:1121
6136 " guestfs_cp (guestfs_h *g,\n"
6137 " const char *src,\n"
6138 " const char *dest);\n"
6143 #: ../src/guestfs-actions.pod:1126 ../fish/guestfish-actions.pod:759
6145 "This copies a file from C<src> to C<dest> where C<dest> is either a "
6146 "destination filename or destination directory."
6150 #: ../src/guestfs-actions.pod:1131 ../src/guestfs-actions.pod:1145 ../src/guestfs-actions.pod:1217 ../src/guestfs-actions.pod:1291 ../src/guestfs-actions.pod:1400 ../src/guestfs-actions.pod:4588 ../src/guestfs-actions.pod:4965
6151 msgid "(Added in 1.0.18)"
6155 #: ../src/guestfs-actions.pod:1133
6156 msgid "guestfs_cp_a"
6160 #: ../src/guestfs-actions.pod:1135
6164 " guestfs_cp_a (guestfs_h *g,\n"
6165 " const char *src,\n"
6166 " const char *dest);\n"
6171 #: ../src/guestfs-actions.pod:1140 ../fish/guestfish-actions.pod:766
6173 "This copies a file or directory from C<src> to C<dest> recursively using the "
6178 #: ../src/guestfs-actions.pod:1147
6183 #: ../src/guestfs-actions.pod:1149
6187 " guestfs_dd (guestfs_h *g,\n"
6188 " const char *src,\n"
6189 " const char *dest);\n"
6194 #: ../src/guestfs-actions.pod:1154 ../fish/guestfish-actions.pod:773
6196 "This command copies from one source device or file C<src> to another "
6197 "destination device or file C<dest>. Normally you would use this to copy to "
6198 "or from a device or partition, for example to duplicate a filesystem."
6202 #: ../src/guestfs-actions.pod:1159
6204 "If the destination is a device, it must be as large or larger than the "
6205 "source file or device, otherwise the copy will fail. This command cannot do "
6206 "partial copies (see C<guestfs_copy_size>)."
6210 #: ../src/guestfs-actions.pod:1167
6215 #: ../src/guestfs-actions.pod:1169
6219 " guestfs_df (guestfs_h *g);\n"
6224 #: ../src/guestfs-actions.pod:1172 ../fish/guestfish-actions.pod:786
6225 msgid "This command runs the C<df> command to report disk space used."
6229 #: ../src/guestfs-actions.pod:1174 ../src/guestfs-actions.pod:1191 ../fish/guestfish-actions.pod:788 ../fish/guestfish-actions.pod:799
6231 "This command is mostly useful for interactive sessions. It is I<not> "
6232 "intended that you try to parse the output string. Use C<statvfs> from "
6237 #: ../src/guestfs-actions.pod:1181 ../src/guestfs-actions.pod:1198 ../src/guestfs-actions.pod:1311 ../src/guestfs-actions.pod:2263 ../src/guestfs-actions.pod:2287 ../src/guestfs-actions.pod:2355 ../src/guestfs-actions.pod:4029 ../src/guestfs-actions.pod:4488 ../src/guestfs-actions.pod:6250 ../src/guestfs-actions.pod:6274 ../src/guestfs-actions.pod:6892 ../src/guestfs-actions.pod:6905 ../src/guestfs-actions.pod:6918
6238 msgid "(Added in 1.0.54)"
6242 #: ../src/guestfs-actions.pod:1183
6243 msgid "guestfs_df_h"
6247 #: ../src/guestfs-actions.pod:1185
6251 " guestfs_df_h (guestfs_h *g);\n"
6256 #: ../src/guestfs-actions.pod:1188 ../fish/guestfish-actions.pod:796
6258 "This command runs the C<df -h> command to report disk space used in "
6259 "human-readable format."
6263 #: ../src/guestfs-actions.pod:1200
6264 msgid "guestfs_dmesg"
6268 #: ../src/guestfs-actions.pod:1202
6272 " guestfs_dmesg (guestfs_h *g);\n"
6277 #: ../src/guestfs-actions.pod:1205 ../fish/guestfish-actions.pod:807
6279 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
6280 "This is sometimes useful for extended debugging of problems."
6284 #: ../src/guestfs-actions.pod:1209
6286 "Another way to get the same information is to enable verbose messages with "
6287 "C<guestfs_set_verbose> or by setting the environment variable "
6288 "C<LIBGUESTFS_DEBUG=1> before running the program."
6292 #: ../src/guestfs-actions.pod:1219
6293 msgid "guestfs_download"
6297 #: ../src/guestfs-actions.pod:1221
6301 " guestfs_download (guestfs_h *g,\n"
6302 " const char *remotefilename,\n"
6303 " const char *filename);\n"
6308 #: ../src/guestfs-actions.pod:1226 ../src/guestfs-actions.pod:1251 ../fish/guestfish-actions.pod:820 ../fish/guestfish-actions.pod:833
6310 "Download file C<remotefilename> and save it as C<filename> on the local "
6315 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:6506 ../fish/guestfish-actions.pod:823 ../fish/guestfish-actions.pod:4344
6316 msgid "C<filename> can also be a named pipe."
6320 #: ../src/guestfs-actions.pod:1231
6321 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
6325 #: ../src/guestfs-actions.pod:1242
6326 msgid "guestfs_download_offset"
6330 #: ../src/guestfs-actions.pod:1244
6334 " guestfs_download_offset (guestfs_h *g,\n"
6335 " const char *remotefilename,\n"
6336 " const char *filename,\n"
6337 " int64_t offset,\n"
6343 #: ../src/guestfs-actions.pod:1254 ../fish/guestfish-actions.pod:836
6345 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
6346 "region must be within the file or device)."
6350 #: ../src/guestfs-actions.pod:1257
6352 "Note that there is no limit on the amount of data that can be downloaded "
6353 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
6354 "full amount unless an error occurs."
6358 #: ../src/guestfs-actions.pod:1262
6359 msgid "See also C<guestfs_download>, C<guestfs_pread>."
6363 #: ../src/guestfs-actions.pod:1271 ../src/guestfs-actions.pod:6551
6364 msgid "(Added in 1.5.17)"
6368 #: ../src/guestfs-actions.pod:1273
6369 msgid "guestfs_drop_caches"
6373 #: ../src/guestfs-actions.pod:1275
6377 " guestfs_drop_caches (guestfs_h *g,\n"
6378 " int whattodrop);\n"
6383 #: ../src/guestfs-actions.pod:1279 ../fish/guestfish-actions.pod:852
6385 "This instructs the guest kernel to drop its page cache, and/or dentries and "
6386 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
6387 "to drop, see L<http://linux-mm.org/Drop_Caches>"
6391 #: ../src/guestfs-actions.pod:1284 ../fish/guestfish-actions.pod:857
6392 msgid "Setting C<whattodrop> to 3 should drop everything."
6396 #: ../src/guestfs-actions.pod:1286 ../fish/guestfish-actions.pod:859
6398 "This automatically calls L<sync(2)> before the operation, so that the "
6399 "maximum guest memory is freed."
6403 #: ../src/guestfs-actions.pod:1293
6408 #: ../src/guestfs-actions.pod:1295
6412 " guestfs_du (guestfs_h *g,\n"
6413 " const char *path);\n"
6418 #: ../src/guestfs-actions.pod:1299 ../fish/guestfish-actions.pod:866
6420 "This command runs the C<du -s> command to estimate file space usage for "
6425 #: ../src/guestfs-actions.pod:1302 ../fish/guestfish-actions.pod:869
6427 "C<path> can be a file or a directory. If C<path> is a directory then the "
6428 "estimate includes the contents of the directory and all subdirectories "
6433 #: ../src/guestfs-actions.pod:1306 ../fish/guestfish-actions.pod:873
6434 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
6438 #: ../src/guestfs-actions.pod:1313
6439 msgid "guestfs_e2fsck_f"
6443 #: ../src/guestfs-actions.pod:1315
6447 " guestfs_e2fsck_f (guestfs_h *g,\n"
6448 " const char *device);\n"
6453 #: ../src/guestfs-actions.pod:1319 ../fish/guestfish-actions.pod:880
6455 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
6456 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
6461 #: ../src/guestfs-actions.pod:1323
6463 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
6464 "Normally you should use C<guestfs_fsck>."
6468 #: ../src/guestfs-actions.pod:1328
6469 msgid "(Added in 1.0.29)"
6473 #: ../src/guestfs-actions.pod:1330
6474 msgid "guestfs_echo_daemon"
6478 #: ../src/guestfs-actions.pod:1332
6482 " guestfs_echo_daemon (guestfs_h *g,\n"
6483 " char *const *words);\n"
6488 #: ../src/guestfs-actions.pod:1336 ../fish/guestfish-actions.pod:891
6490 "This command concatenates the list of C<words> passed with single spaces "
6491 "between them and returns the resulting string."
6495 #: ../src/guestfs-actions.pod:1339 ../fish/guestfish-actions.pod:894
6496 msgid "You can use this command to test the connection through to the daemon."
6500 #: ../src/guestfs-actions.pod:1341
6501 msgid "See also C<guestfs_ping_daemon>."
6505 #: ../src/guestfs-actions.pod:1346 ../src/guestfs-actions.pod:2073 ../src/guestfs-actions.pod:5754
6506 msgid "(Added in 1.0.69)"
6510 #: ../src/guestfs-actions.pod:1348
6511 msgid "guestfs_egrep"
6515 #: ../src/guestfs-actions.pod:1350
6519 " guestfs_egrep (guestfs_h *g,\n"
6520 " const char *regex,\n"
6521 " const char *path);\n"
6526 #: ../src/guestfs-actions.pod:1355 ../fish/guestfish-actions.pod:902
6527 msgid "This calls the external C<egrep> program and returns the matching lines."
6531 #: ../src/guestfs-actions.pod:1365 ../src/guestfs-actions.pod:1384 ../src/guestfs-actions.pod:1441 ../src/guestfs-actions.pod:1487 ../src/guestfs-actions.pod:1506 ../src/guestfs-actions.pod:2201 ../src/guestfs-actions.pod:2220 ../src/guestfs-actions.pod:2376 ../src/guestfs-actions.pod:2389 ../src/guestfs-actions.pod:2404 ../src/guestfs-actions.pod:2450 ../src/guestfs-actions.pod:2472 ../src/guestfs-actions.pod:2485 ../src/guestfs-actions.pod:3412 ../src/guestfs-actions.pod:3426 ../src/guestfs-actions.pod:3439 ../src/guestfs-actions.pod:3453 ../src/guestfs-actions.pod:4423 ../src/guestfs-actions.pod:5299 ../src/guestfs-actions.pod:5348 ../src/guestfs-actions.pod:6118 ../src/guestfs-actions.pod:6130 ../src/guestfs-actions.pod:6143 ../src/guestfs-actions.pod:6156 ../src/guestfs-actions.pod:6178 ../src/guestfs-actions.pod:6191 ../src/guestfs-actions.pod:6204 ../src/guestfs-actions.pod:6217 ../src/guestfs-actions.pod:6988 ../src/guestfs-actions.pod:7007 ../src/guestfs-actions.pod:7092 ../src/guestfs-actions.pod:7111 ../src/guestfs-actions.pod:7157 ../src/guestfs-actions.pod:7176
6532 msgid "(Added in 1.0.66)"
6536 #: ../src/guestfs-actions.pod:1367
6537 msgid "guestfs_egrepi"
6541 #: ../src/guestfs-actions.pod:1369
6545 " guestfs_egrepi (guestfs_h *g,\n"
6546 " const char *regex,\n"
6547 " const char *path);\n"
6552 #: ../src/guestfs-actions.pod:1374 ../fish/guestfish-actions.pod:912
6553 msgid "This calls the external C<egrep -i> program and returns the matching lines."
6557 #: ../src/guestfs-actions.pod:1386
6558 msgid "guestfs_equal"
6562 #: ../src/guestfs-actions.pod:1388
6566 " guestfs_equal (guestfs_h *g,\n"
6567 " const char *file1,\n"
6568 " const char *file2);\n"
6573 #: ../src/guestfs-actions.pod:1393 ../fish/guestfish-actions.pod:922
6575 "This compares the two files C<file1> and C<file2> and returns true if their "
6576 "content is exactly equal, or false otherwise."
6580 #: ../src/guestfs-actions.pod:1396 ../fish/guestfish-actions.pod:925
6581 msgid "The external L<cmp(1)> program is used for the comparison."
6585 #: ../src/guestfs-actions.pod:1402
6586 msgid "guestfs_exists"
6590 #: ../src/guestfs-actions.pod:1404
6594 " guestfs_exists (guestfs_h *g,\n"
6595 " const char *path);\n"
6600 #: ../src/guestfs-actions.pod:1408 ../fish/guestfish-actions.pod:931
6602 "This returns C<true> if and only if there is a file, directory (or anything) "
6603 "with the given C<path> name."
6607 #: ../src/guestfs-actions.pod:1411
6608 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
6612 #: ../src/guestfs-actions.pod:1417
6613 msgid "guestfs_fallocate"
6617 #: ../src/guestfs-actions.pod:1419
6621 " guestfs_fallocate (guestfs_h *g,\n"
6622 " const char *path,\n"
6628 #: ../src/guestfs-actions.pod:1424 ../src/guestfs-actions.pod:1450 ../fish/guestfish-actions.pod:940 ../fish/guestfish-actions.pod:959
6630 "This command preallocates a file (containing zero bytes) named C<path> of "
6631 "size C<len> bytes. If the file exists already, it is overwritten."
6635 #: ../src/guestfs-actions.pod:1428 ../fish/guestfish-actions.pod:944
6637 "Do not confuse this with the guestfish-specific C<alloc> command which "
6638 "allocates a file in the host and attaches it as a device."
6642 #: ../src/guestfs-actions.pod:1434 ../fish/guestfish-actions.pod:948
6644 "This function is deprecated. In new code, use the C<fallocate64> call "
6649 #: ../src/guestfs-actions.pod:1443
6650 msgid "guestfs_fallocate64"
6654 #: ../src/guestfs-actions.pod:1445
6658 " guestfs_fallocate64 (guestfs_h *g,\n"
6659 " const char *path,\n"
6665 #: ../src/guestfs-actions.pod:1454
6667 "Note that this call allocates disk blocks for the file. To create a sparse "
6668 "file use C<guestfs_truncate_size> instead."
6672 #: ../src/guestfs-actions.pod:1457
6674 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
6675 "oversight it only allowed 30 bit lengths to be specified, effectively "
6676 "limiting the maximum size of files created through that call to 1GB."
6680 #: ../src/guestfs-actions.pod:1462 ../fish/guestfish-actions.pod:971
6682 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
6683 "commands which create a file in the host and attach it as a device."
6687 #: ../src/guestfs-actions.pod:1468
6688 msgid "(Added in 1.3.17)"
6692 #: ../src/guestfs-actions.pod:1470
6693 msgid "guestfs_fgrep"
6697 #: ../src/guestfs-actions.pod:1472
6701 " guestfs_fgrep (guestfs_h *g,\n"
6702 " const char *pattern,\n"
6703 " const char *path);\n"
6708 #: ../src/guestfs-actions.pod:1477 ../fish/guestfish-actions.pod:979
6709 msgid "This calls the external C<fgrep> program and returns the matching lines."
6713 #: ../src/guestfs-actions.pod:1489
6714 msgid "guestfs_fgrepi"
6718 #: ../src/guestfs-actions.pod:1491
6722 " guestfs_fgrepi (guestfs_h *g,\n"
6723 " const char *pattern,\n"
6724 " const char *path);\n"
6729 #: ../src/guestfs-actions.pod:1496 ../fish/guestfish-actions.pod:989
6730 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
6734 #: ../src/guestfs-actions.pod:1508
6735 msgid "guestfs_file"
6739 #: ../src/guestfs-actions.pod:1510
6743 " guestfs_file (guestfs_h *g,\n"
6744 " const char *path);\n"
6749 #: ../src/guestfs-actions.pod:1514 ../fish/guestfish-actions.pod:999
6751 "This call uses the standard L<file(1)> command to determine the type or "
6752 "contents of the file."
6756 #: ../src/guestfs-actions.pod:1517 ../fish/guestfish-actions.pod:1002
6758 "This call will also transparently look inside various types of compressed "
6763 #: ../src/guestfs-actions.pod:1520 ../fish/guestfish-actions.pod:1005
6765 "The exact command which runs is C<file -zb path>. Note in particular that "
6766 "the filename is not prepended to the output (the C<-b> option)."
6770 #: ../src/guestfs-actions.pod:1524
6772 "This command can also be used on C</dev/> devices (and partitions, LV "
6773 "names). You can for example use this to determine if a device contains a "
6774 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
6778 #: ../src/guestfs-actions.pod:1529 ../fish/guestfish-actions.pod:1014
6780 "If the C<path> does not begin with C</dev/> then this command only works for "
6781 "the content of regular files. For other file types (directory, symbolic "
6782 "link etc) it will just return the string C<directory> etc."
6786 #: ../src/guestfs-actions.pod:1539
6787 msgid "guestfs_file_architecture"
6791 #: ../src/guestfs-actions.pod:1541
6795 " guestfs_file_architecture (guestfs_h *g,\n"
6796 " const char *filename);\n"
6801 #: ../src/guestfs-actions.pod:1545 ../fish/guestfish-actions.pod:1023
6803 "This detects the architecture of the binary C<filename>, and returns it if "
6808 #: ../src/guestfs-actions.pod:1548 ../fish/guestfish-actions.pod:1026
6809 msgid "Currently defined architectures are:"
6813 #: ../src/guestfs-actions.pod:1552 ../fish/guestfish-actions.pod:1030
6818 #: ../src/guestfs-actions.pod:1554 ../fish/guestfish-actions.pod:1032
6820 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
6821 "irrespective of the precise processor requirements of the binary."
6825 #: ../src/guestfs-actions.pod:1557 ../fish/guestfish-actions.pod:1035
6830 #: ../src/guestfs-actions.pod:1559 ../fish/guestfish-actions.pod:1037
6831 msgid "64 bit x86-64."
6835 #: ../src/guestfs-actions.pod:1561 ../fish/guestfish-actions.pod:1039
6840 #: ../src/guestfs-actions.pod:1563 ../fish/guestfish-actions.pod:1041
6841 msgid "32 bit SPARC."
6845 #: ../src/guestfs-actions.pod:1565 ../fish/guestfish-actions.pod:1043
6850 #: ../src/guestfs-actions.pod:1567 ../fish/guestfish-actions.pod:1045
6851 msgid "64 bit SPARC V9 and above."
6855 #: ../src/guestfs-actions.pod:1569 ../fish/guestfish-actions.pod:1047
6860 #: ../src/guestfs-actions.pod:1571 ../fish/guestfish-actions.pod:1049
6861 msgid "Intel Itanium."
6865 #: ../src/guestfs-actions.pod:1573 ../fish/guestfish-actions.pod:1051
6870 #: ../src/guestfs-actions.pod:1575 ../fish/guestfish-actions.pod:1053
6871 msgid "32 bit Power PC."
6875 #: ../src/guestfs-actions.pod:1577 ../fish/guestfish-actions.pod:1055
6880 #: ../src/guestfs-actions.pod:1579 ../fish/guestfish-actions.pod:1057
6881 msgid "64 bit Power PC."
6885 #: ../src/guestfs-actions.pod:1583 ../fish/guestfish-actions.pod:1061
6886 msgid "Libguestfs may return other architecture strings in future."
6890 #: ../src/guestfs-actions.pod:1585 ../fish/guestfish-actions.pod:1063
6891 msgid "The function works on at least the following types of files:"
6895 #: ../src/guestfs-actions.pod:1591 ../fish/guestfish-actions.pod:1069
6896 msgid "many types of Un*x and Linux binary"
6900 #: ../src/guestfs-actions.pod:1595 ../fish/guestfish-actions.pod:1073
6901 msgid "many types of Un*x and Linux shared library"
6905 #: ../src/guestfs-actions.pod:1599 ../fish/guestfish-actions.pod:1077
6906 msgid "Windows Win32 and Win64 binaries"
6910 #: ../src/guestfs-actions.pod:1603 ../fish/guestfish-actions.pod:1081
6911 msgid "Windows Win32 and Win64 DLLs"
6915 #: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1083
6916 msgid "Win32 binaries and DLLs return C<i386>."
6920 #: ../src/guestfs-actions.pod:1607 ../fish/guestfish-actions.pod:1085
6921 msgid "Win64 binaries and DLLs return C<x86_64>."
6925 #: ../src/guestfs-actions.pod:1611 ../fish/guestfish-actions.pod:1089
6926 msgid "Linux kernel modules"
6930 #: ../src/guestfs-actions.pod:1615 ../fish/guestfish-actions.pod:1093
6931 msgid "Linux new-style initrd images"
6935 #: ../src/guestfs-actions.pod:1619 ../fish/guestfish-actions.pod:1097
6936 msgid "some non-x86 Linux vmlinuz kernels"
6940 #: ../src/guestfs-actions.pod:1623 ../fish/guestfish-actions.pod:1101
6941 msgid "What it can't do currently:"
6945 #: ../src/guestfs-actions.pod:1629 ../fish/guestfish-actions.pod:1107
6946 msgid "static libraries (libfoo.a)"
6950 #: ../src/guestfs-actions.pod:1633 ../fish/guestfish-actions.pod:1111
6951 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
6955 #: ../src/guestfs-actions.pod:1637 ../fish/guestfish-actions.pod:1115
6956 msgid "x86 Linux vmlinuz kernels"
6960 #: ../src/guestfs-actions.pod:1639 ../fish/guestfish-actions.pod:1117
6962 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
6963 "compressed code, and are horribly hard to unpack. If you want to find the "
6964 "architecture of a kernel, use the architecture of the associated initrd or "
6965 "kernel module(s) instead."
6969 #: ../src/guestfs-actions.pod:1649 ../src/guestfs-actions.pod:1812 ../src/guestfs-actions.pod:1829 ../src/guestfs-actions.pod:2508 ../src/guestfs-actions.pod:2589 ../src/guestfs-actions.pod:2615 ../src/guestfs-actions.pod:2664 ../src/guestfs-actions.pod:2685 ../src/guestfs-actions.pod:2718 ../src/guestfs-actions.pod:2802 ../src/guestfs-actions.pod:2864 ../src/guestfs-actions.pod:3037 ../src/guestfs-actions.pod:3169
6970 msgid "(Added in 1.5.3)"
6974 #: ../src/guestfs-actions.pod:1651
6975 msgid "guestfs_filesize"
6979 #: ../src/guestfs-actions.pod:1653
6983 " guestfs_filesize (guestfs_h *g,\n"
6984 " const char *file);\n"
6989 #: ../src/guestfs-actions.pod:1657 ../fish/guestfish-actions.pod:1128
6990 msgid "This command returns the size of C<file> in bytes."
6994 #: ../src/guestfs-actions.pod:1659
6996 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
6997 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
6998 "devices, use C<guestfs_blockdev_getsize64>."
7002 #: ../src/guestfs-actions.pod:1665
7003 msgid "(Added in 1.0.82)"
7007 #: ../src/guestfs-actions.pod:1667
7008 msgid "guestfs_fill"
7012 #: ../src/guestfs-actions.pod:1669
7016 " guestfs_fill (guestfs_h *g,\n"
7019 " const char *path);\n"
7024 #: ../src/guestfs-actions.pod:1675 ../fish/guestfish-actions.pod:1138
7026 "This command creates a new file called C<path>. The initial content of the "
7027 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
7032 #: ../src/guestfs-actions.pod:1679
7034 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
7035 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
7036 "bytes use C<guestfs_fill_pattern>."
7040 #: ../src/guestfs-actions.pod:1691
7041 msgid "(Added in 1.0.79)"
7045 #: ../src/guestfs-actions.pod:1693
7046 msgid "guestfs_fill_pattern"
7050 #: ../src/guestfs-actions.pod:1695
7054 " guestfs_fill_pattern (guestfs_h *g,\n"
7055 " const char *pattern,\n"
7057 " const char *path);\n"
7062 #: ../src/guestfs-actions.pod:1701
7064 "This function is like C<guestfs_fill> except that it creates a new file of "
7065 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
7066 "pattern is truncated if necessary to ensure the length of the file is "
7067 "exactly C<len> bytes."
7071 #: ../src/guestfs-actions.pod:1713
7072 msgid "(Added in 1.3.12)"
7076 #: ../src/guestfs-actions.pod:1715
7077 msgid "guestfs_find"
7081 #: ../src/guestfs-actions.pod:1717
7085 " guestfs_find (guestfs_h *g,\n"
7086 " const char *directory);\n"
7091 #: ../src/guestfs-actions.pod:1721 ../fish/guestfish-actions.pod:1160
7093 "This command lists out all files and directories, recursively, starting at "
7094 "C<directory>. It is essentially equivalent to running the shell command "
7095 "C<find directory -print> but some post-processing happens on the output, "
7100 #: ../src/guestfs-actions.pod:1726 ../fish/guestfish-actions.pod:1165
7102 "This returns a list of strings I<without any prefix>. Thus if the directory "
7107 #: ../src/guestfs-actions.pod:1729 ../fish/guestfish-actions.pod:1168
7117 #: ../src/guestfs-actions.pod:1733
7118 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
7122 #: ../src/guestfs-actions.pod:1736 ../fish/guestfish-actions.pod:1175
7133 #: ../src/guestfs-actions.pod:1741 ../fish/guestfish-actions.pod:1180
7134 msgid "If C<directory> is not a directory, then this command returns an error."
7138 #: ../src/guestfs-actions.pod:1744 ../fish/guestfish-actions.pod:1183
7139 msgid "The returned list is sorted."
7143 #: ../src/guestfs-actions.pod:1746
7144 msgid "See also C<guestfs_find0>."
7148 #: ../src/guestfs-actions.pod:1755 ../src/guestfs-actions.pod:3856 ../src/guestfs-actions.pod:5383
7149 msgid "(Added in 1.0.27)"
7153 #: ../src/guestfs-actions.pod:1757
7154 msgid "guestfs_find0"
7158 #: ../src/guestfs-actions.pod:1759
7162 " guestfs_find0 (guestfs_h *g,\n"
7163 " const char *directory,\n"
7164 " const char *files);\n"
7169 #: ../src/guestfs-actions.pod:1764 ../fish/guestfish-actions.pod:1194
7171 "This command lists out all files and directories, recursively, starting at "
7172 "C<directory>, placing the resulting list in the external file called "
7177 #: ../src/guestfs-actions.pod:1768
7179 "This command works the same way as C<guestfs_find> with the following "
7184 #: ../src/guestfs-actions.pod:1775 ../fish/guestfish-actions.pod:1205
7185 msgid "The resulting list is written to an external file."
7189 #: ../src/guestfs-actions.pod:1779 ../fish/guestfish-actions.pod:1209
7191 "Items (filenames) in the result are separated by C<\\0> characters. See "
7192 "L<find(1)> option I<-print0>."
7196 #: ../src/guestfs-actions.pod:1784 ../fish/guestfish-actions.pod:1214
7197 msgid "This command is not limited in the number of names that it can return."
7201 #: ../src/guestfs-actions.pod:1789 ../fish/guestfish-actions.pod:1219
7202 msgid "The result list is not sorted."
7206 #: ../src/guestfs-actions.pod:1795
7207 msgid "(Added in 1.0.74)"
7211 #: ../src/guestfs-actions.pod:1797
7212 msgid "guestfs_findfs_label"
7216 #: ../src/guestfs-actions.pod:1799
7220 " guestfs_findfs_label (guestfs_h *g,\n"
7221 " const char *label);\n"
7226 #: ../src/guestfs-actions.pod:1803 ../fish/guestfish-actions.pod:1229
7228 "This command searches the filesystems and returns the one which has the "
7229 "given label. An error is returned if no such filesystem can be found."
7233 #: ../src/guestfs-actions.pod:1807
7234 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
7238 #: ../src/guestfs-actions.pod:1814
7239 msgid "guestfs_findfs_uuid"
7243 #: ../src/guestfs-actions.pod:1816
7247 " guestfs_findfs_uuid (guestfs_h *g,\n"
7248 " const char *uuid);\n"
7253 #: ../src/guestfs-actions.pod:1820 ../fish/guestfish-actions.pod:1239
7255 "This command searches the filesystems and returns the one which has the "
7256 "given UUID. An error is returned if no such filesystem can be found."
7260 #: ../src/guestfs-actions.pod:1824
7261 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
7265 #: ../src/guestfs-actions.pod:1831
7266 msgid "guestfs_fsck"
7270 #: ../src/guestfs-actions.pod:1833
7274 " guestfs_fsck (guestfs_h *g,\n"
7275 " const char *fstype,\n"
7276 " const char *device);\n"
7281 #: ../src/guestfs-actions.pod:1838 ../fish/guestfish-actions.pod:1249
7283 "This runs the filesystem checker (fsck) on C<device> which should have "
7284 "filesystem type C<fstype>."
7288 #: ../src/guestfs-actions.pod:1841 ../fish/guestfish-actions.pod:1252
7290 "The returned integer is the status. See L<fsck(8)> for the list of status "
7291 "codes from C<fsck>."
7295 #: ../src/guestfs-actions.pod:1850 ../fish/guestfish-actions.pod:1261
7296 msgid "Multiple status codes can be summed together."
7300 #: ../src/guestfs-actions.pod:1854 ../fish/guestfish-actions.pod:1265
7302 "A non-zero return code can mean \"success\", for example if errors have been "
7303 "corrected on the filesystem."
7307 #: ../src/guestfs-actions.pod:1859 ../fish/guestfish-actions.pod:1270
7308 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
7312 #: ../src/guestfs-actions.pod:1864 ../fish/guestfish-actions.pod:1275
7313 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
7317 #: ../src/guestfs-actions.pod:1868 ../src/guestfs-actions.pod:7030
7318 msgid "(Added in 1.0.16)"
7322 #: ../src/guestfs-actions.pod:1870
7323 msgid "guestfs_get_append"
7327 #: ../src/guestfs-actions.pod:1872
7331 " guestfs_get_append (guestfs_h *g);\n"
7336 #: ../src/guestfs-actions.pod:1875 ../fish/guestfish-actions.pod:1281
7338 "Return the additional kernel options which are added to the guest kernel "
7343 #: ../src/guestfs-actions.pod:1878 ../fish/guestfish-actions.pod:1284
7344 msgid "If C<NULL> then no options are added."
7348 #: ../src/guestfs-actions.pod:1880
7350 "This function returns a string which may be NULL. There is no way to return "
7351 "an error from this function. The string is owned by the guest handle and "
7352 "must I<not> be freed."
7356 #: ../src/guestfs-actions.pod:1884 ../src/guestfs-actions.pod:5061 ../src/guestfs-actions.pod:5524 ../src/guestfs-actions.pod:5892 ../src/guestfs-actions.pod:5911 ../src/guestfs-actions.pod:5927 ../src/guestfs-actions.pod:5944 ../src/guestfs-actions.pod:6701 ../src/guestfs-actions.pod:6719 ../src/guestfs-actions.pod:7073
7357 msgid "(Added in 1.0.26)"
7361 #: ../src/guestfs-actions.pod:1886
7362 msgid "guestfs_get_autosync"
7366 #: ../src/guestfs-actions.pod:1888
7370 " guestfs_get_autosync (guestfs_h *g);\n"
7375 #: ../src/guestfs-actions.pod:1891 ../fish/guestfish-actions.pod:1290
7376 msgid "Get the autosync flag."
7380 #: ../src/guestfs-actions.pod:1897
7381 msgid "guestfs_get_direct"
7385 #: ../src/guestfs-actions.pod:1899
7389 " guestfs_get_direct (guestfs_h *g);\n"
7394 #: ../src/guestfs-actions.pod:1902 ../fish/guestfish-actions.pod:1296
7395 msgid "Return the direct appliance mode flag."
7399 #: ../src/guestfs-actions.pod:1906 ../src/guestfs-actions.pod:5565
7400 msgid "(Added in 1.0.72)"
7404 #: ../src/guestfs-actions.pod:1908
7405 msgid "guestfs_get_e2label"
7409 #: ../src/guestfs-actions.pod:1910
7413 " guestfs_get_e2label (guestfs_h *g,\n"
7414 " const char *device);\n"
7419 #: ../src/guestfs-actions.pod:1914 ../fish/guestfish-actions.pod:1302
7420 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
7424 #: ../src/guestfs-actions.pod:1920 ../fish/guestfish-actions.pod:1305
7426 "This function is deprecated. In new code, use the C<vfs_label> call "
7431 #: ../src/guestfs-actions.pod:1927 ../src/guestfs-actions.pod:1948 ../src/guestfs-actions.pod:5583 ../src/guestfs-actions.pod:5602
7432 msgid "(Added in 1.0.15)"
7436 #: ../src/guestfs-actions.pod:1929
7437 msgid "guestfs_get_e2uuid"
7441 #: ../src/guestfs-actions.pod:1931
7445 " guestfs_get_e2uuid (guestfs_h *g,\n"
7446 " const char *device);\n"
7451 #: ../src/guestfs-actions.pod:1935 ../fish/guestfish-actions.pod:1316
7452 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
7456 #: ../src/guestfs-actions.pod:1941 ../fish/guestfish-actions.pod:1319
7457 msgid "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
7461 #: ../src/guestfs-actions.pod:1950
7462 msgid "guestfs_get_memsize"
7466 #: ../src/guestfs-actions.pod:1952
7470 " guestfs_get_memsize (guestfs_h *g);\n"
7475 #: ../src/guestfs-actions.pod:1955 ../fish/guestfish-actions.pod:1330
7476 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
7480 #: ../src/guestfs-actions.pod:1958
7482 "If C<guestfs_set_memsize> was not called on this handle, and if "
7483 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
7484 "value for memsize."
7488 #: ../src/guestfs-actions.pod:1962 ../src/guestfs-actions.pod:2043 ../src/guestfs-actions.pod:5618 ../src/guestfs-actions.pod:5725 ../fish/guestfish-actions.pod:1337 ../fish/guestfish-actions.pod:1388 ../fish/guestfish-actions.pod:3751 ../fish/guestfish-actions.pod:3838
7489 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
7493 #: ../src/guestfs-actions.pod:1967 ../src/guestfs-actions.pod:4147 ../src/guestfs-actions.pod:4328 ../src/guestfs-actions.pod:4347 ../src/guestfs-actions.pod:4366 ../src/guestfs-actions.pod:4378 ../src/guestfs-actions.pod:4395 ../src/guestfs-actions.pod:4408 ../src/guestfs-actions.pod:5286 ../src/guestfs-actions.pod:5623 ../src/guestfs-actions.pod:5866 ../src/guestfs-actions.pod:6467
7494 msgid "(Added in 1.0.55)"
7498 #: ../src/guestfs-actions.pod:1969
7499 msgid "guestfs_get_network"
7503 #: ../src/guestfs-actions.pod:1971
7507 " guestfs_get_network (guestfs_h *g);\n"
7512 #: ../src/guestfs-actions.pod:1974 ../fish/guestfish-actions.pod:1344
7513 msgid "This returns the enable network flag."
7517 #: ../src/guestfs-actions.pod:1978 ../src/guestfs-actions.pod:5642
7518 msgid "(Added in 1.5.4)"
7522 #: ../src/guestfs-actions.pod:1980
7523 msgid "guestfs_get_path"
7527 #: ../src/guestfs-actions.pod:1982
7531 " guestfs_get_path (guestfs_h *g);\n"
7536 #: ../src/guestfs-actions.pod:1985 ../fish/guestfish-actions.pod:1350
7537 msgid "Return the current search path."
7541 #: ../src/guestfs-actions.pod:1987 ../fish/guestfish-actions.pod:1352
7543 "This is always non-NULL. If it wasn't set already, then this will return "
7548 #: ../src/guestfs-actions.pod:1990 ../src/guestfs-actions.pod:2019
7550 "This function returns a string, or NULL on error. The string is owned by "
7551 "the guest handle and must I<not> be freed."
7555 #: ../src/guestfs-actions.pod:1995
7556 msgid "guestfs_get_pid"
7560 #: ../src/guestfs-actions.pod:1997
7564 " guestfs_get_pid (guestfs_h *g);\n"
7569 #: ../src/guestfs-actions.pod:2000 ../fish/guestfish-actions.pod:1361
7571 "Return the process ID of the qemu subprocess. If there is no qemu "
7572 "subprocess, then this will return an error."
7576 #: ../src/guestfs-actions.pod:2003 ../fish/guestfish-actions.pod:1364
7577 msgid "This is an internal call used for debugging and testing."
7581 #: ../src/guestfs-actions.pod:2007
7582 msgid "(Added in 1.0.56)"
7586 #: ../src/guestfs-actions.pod:2009
7587 msgid "guestfs_get_qemu"
7591 #: ../src/guestfs-actions.pod:2011
7595 " guestfs_get_qemu (guestfs_h *g);\n"
7600 #: ../src/guestfs-actions.pod:2014 ../fish/guestfish-actions.pod:1370
7601 msgid "Return the current qemu binary."
7605 #: ../src/guestfs-actions.pod:2016 ../fish/guestfish-actions.pod:1372
7607 "This is always non-NULL. If it wasn't set already, then this will return "
7608 "the default qemu binary name."
7612 #: ../src/guestfs-actions.pod:2022 ../src/guestfs-actions.pod:5687
7613 msgid "(Added in 1.0.6)"
7617 #: ../src/guestfs-actions.pod:2024
7618 msgid "guestfs_get_recovery_proc"
7622 #: ../src/guestfs-actions.pod:2026
7626 " guestfs_get_recovery_proc (guestfs_h *g);\n"
7631 #: ../src/guestfs-actions.pod:2029 ../fish/guestfish-actions.pod:1379
7632 msgid "Return the recovery process enabled flag."
7636 #: ../src/guestfs-actions.pod:2033 ../src/guestfs-actions.pod:3259 ../src/guestfs-actions.pod:3554 ../src/guestfs-actions.pod:3954 ../src/guestfs-actions.pod:3986 ../src/guestfs-actions.pod:4991 ../src/guestfs-actions.pod:5334 ../src/guestfs-actions.pod:5711 ../src/guestfs-actions.pod:6370 ../src/guestfs-actions.pod:6390 ../src/guestfs-actions.pod:6582
7637 msgid "(Added in 1.0.77)"
7641 #: ../src/guestfs-actions.pod:2035
7642 msgid "guestfs_get_selinux"
7646 #: ../src/guestfs-actions.pod:2037
7650 " guestfs_get_selinux (guestfs_h *g);\n"
7655 #: ../src/guestfs-actions.pod:2040
7657 "This returns the current setting of the selinux flag which is passed to the "
7658 "appliance at boot time. See C<guestfs_set_selinux>."
7662 #: ../src/guestfs-actions.pod:2048 ../src/guestfs-actions.pod:2111 ../src/guestfs-actions.pod:5730 ../src/guestfs-actions.pod:5784
7663 msgid "(Added in 1.0.67)"
7667 #: ../src/guestfs-actions.pod:2050
7668 msgid "guestfs_get_state"
7672 #: ../src/guestfs-actions.pod:2052
7676 " guestfs_get_state (guestfs_h *g);\n"
7681 #: ../src/guestfs-actions.pod:2055 ../fish/guestfish-actions.pod:1395
7683 "This returns the current state as an opaque integer. This is only useful "
7684 "for printing debug and internal error messages."
7688 #: ../src/guestfs-actions.pod:2058 ../src/guestfs-actions.pod:3062 ../src/guestfs-actions.pod:3091 ../src/guestfs-actions.pod:3152 ../src/guestfs-actions.pod:3179 ../fish/guestfish-actions.pod:1398 ../fish/guestfish-actions.pod:2133 ../fish/guestfish-actions.pod:2151 ../fish/guestfish-actions.pod:2189 ../fish/guestfish-actions.pod:2205
7689 msgid "For more information on states, see L<guestfs(3)>."
7693 #: ../src/guestfs-actions.pod:2064
7694 msgid "guestfs_get_trace"
7698 #: ../src/guestfs-actions.pod:2066
7702 " guestfs_get_trace (guestfs_h *g);\n"
7707 #: ../src/guestfs-actions.pod:2069 ../fish/guestfish-actions.pod:1404
7708 msgid "Return the command trace flag."
7712 #: ../src/guestfs-actions.pod:2075
7713 msgid "guestfs_get_umask"
7717 #: ../src/guestfs-actions.pod:2077
7721 " guestfs_get_umask (guestfs_h *g);\n"
7726 #: ../src/guestfs-actions.pod:2080
7728 "Return the current umask. By default the umask is C<022> unless it has been "
7729 "set by calling C<guestfs_umask>."
7733 #: ../src/guestfs-actions.pod:2087
7734 msgid "guestfs_get_verbose"
7738 #: ../src/guestfs-actions.pod:2089
7742 " guestfs_get_verbose (guestfs_h *g);\n"
7747 #: ../src/guestfs-actions.pod:2092 ../fish/guestfish-actions.pod:1417
7748 msgid "This returns the verbose messages flag."
7752 #: ../src/guestfs-actions.pod:2098
7753 msgid "guestfs_getcon"
7757 #: ../src/guestfs-actions.pod:2100
7761 " guestfs_getcon (guestfs_h *g);\n"
7766 #: ../src/guestfs-actions.pod:2103 ../fish/guestfish-actions.pod:1423
7767 msgid "This gets the SELinux security context of the daemon."
7771 #: ../src/guestfs-actions.pod:2105
7772 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
7776 #: ../src/guestfs-actions.pod:2113
7777 msgid "guestfs_getxattr"
7781 #: ../src/guestfs-actions.pod:2115
7785 " guestfs_getxattr (guestfs_h *g,\n"
7786 " const char *path,\n"
7787 " const char *name,\n"
7788 " size_t *size_r);\n"
7793 #: ../src/guestfs-actions.pod:2121
7795 "Get a single extended attribute from file C<path> named C<name>. This call "
7796 "follows symlinks. If you want to lookup an extended attribute for the "
7797 "symlink itself, use C<guestfs_lgetxattr>."
7801 #: ../src/guestfs-actions.pod:2125 ../src/guestfs-actions.pod:3273
7803 "Normally it is better to get all extended attributes from a file in one go "
7804 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
7805 "implementations are buggy and do not provide a way to list out attributes. "
7806 "For these filesystems (notably ntfs-3g) you have to know the names of the "
7807 "extended attributes you want in advance and call this function."
7811 #: ../src/guestfs-actions.pod:2132 ../src/guestfs-actions.pod:3280 ../fish/guestfish-actions.pod:1443 ../fish/guestfish-actions.pod:2270
7813 "Extended attribute values are blobs of binary data. If there is no extended "
7814 "attribute named C<name>, this returns an error."
7818 #: ../src/guestfs-actions.pod:2135
7819 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
7823 #: ../src/guestfs-actions.pod:2137 ../src/guestfs-actions.pod:2326 ../src/guestfs-actions.pod:3285 ../src/guestfs-actions.pod:4984 ../src/guestfs-actions.pod:5010 ../src/guestfs-actions.pod:5191
7825 "This function returns a buffer, or NULL on error. The size of the returned "
7826 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
7831 #: ../src/guestfs-actions.pod:2141
7832 msgid "guestfs_getxattrs"
7836 #: ../src/guestfs-actions.pod:2143
7839 " struct guestfs_xattr_list *\n"
7840 " guestfs_getxattrs (guestfs_h *g,\n"
7841 " const char *path);\n"
7846 #: ../src/guestfs-actions.pod:2147 ../fish/guestfish-actions.pod:1452
7847 msgid "This call lists the extended attributes of the file or directory C<path>."
7851 #: ../src/guestfs-actions.pod:2150 ../fish/guestfish-actions.pod:1455
7853 "At the system call level, this is a combination of the L<listxattr(2)> and "
7854 "L<getxattr(2)> calls."
7858 #: ../src/guestfs-actions.pod:2153
7859 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
7863 #: ../src/guestfs-actions.pod:2155 ../src/guestfs-actions.pod:3299 ../src/guestfs-actions.pod:3950
7865 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
7866 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
7870 #: ../src/guestfs-actions.pod:2159 ../src/guestfs-actions.pod:3303 ../src/guestfs-actions.pod:3468 ../src/guestfs-actions.pod:3504 ../src/guestfs-actions.pod:5364 ../src/guestfs-actions.pod:5803 ../src/guestfs-actions.pod:7138
7871 msgid "(Added in 1.0.59)"
7875 #: ../src/guestfs-actions.pod:2161
7876 msgid "guestfs_glob_expand"
7880 #: ../src/guestfs-actions.pod:2163
7884 " guestfs_glob_expand (guestfs_h *g,\n"
7885 " const char *pattern);\n"
7890 #: ../src/guestfs-actions.pod:2167 ../fish/guestfish-actions.pod:1464
7892 "This command searches for all the pathnames matching C<pattern> according to "
7893 "the wildcard expansion rules used by the shell."
7897 #: ../src/guestfs-actions.pod:2171 ../fish/guestfish-actions.pod:1468
7898 msgid "If no paths match, then this returns an empty list (note: not an error)."
7902 #: ../src/guestfs-actions.pod:2174 ../fish/guestfish-actions.pod:1471
7904 "It is just a wrapper around the C L<glob(3)> function with flags "
7905 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
7909 #: ../src/guestfs-actions.pod:2182 ../src/guestfs-actions.pod:5968 ../src/guestfs-actions.pod:5985
7910 msgid "(Added in 1.0.50)"
7914 #: ../src/guestfs-actions.pod:2184
7915 msgid "guestfs_grep"
7919 #: ../src/guestfs-actions.pod:2186
7923 " guestfs_grep (guestfs_h *g,\n"
7924 " const char *regex,\n"
7925 " const char *path);\n"
7930 #: ../src/guestfs-actions.pod:2191 ../fish/guestfish-actions.pod:1479
7931 msgid "This calls the external C<grep> program and returns the matching lines."
7935 #: ../src/guestfs-actions.pod:2203
7936 msgid "guestfs_grepi"
7940 #: ../src/guestfs-actions.pod:2205
7944 " guestfs_grepi (guestfs_h *g,\n"
7945 " const char *regex,\n"
7946 " const char *path);\n"
7951 #: ../src/guestfs-actions.pod:2210 ../fish/guestfish-actions.pod:1489
7952 msgid "This calls the external C<grep -i> program and returns the matching lines."
7956 #: ../src/guestfs-actions.pod:2222
7957 msgid "guestfs_grub_install"
7961 #: ../src/guestfs-actions.pod:2224
7965 " guestfs_grub_install (guestfs_h *g,\n"
7966 " const char *root,\n"
7967 " const char *device);\n"
7972 #: ../src/guestfs-actions.pod:2229 ../fish/guestfish-actions.pod:1499
7974 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
7975 "the root directory being C<root>."
7979 #: ../src/guestfs-actions.pod:2232 ../fish/guestfish-actions.pod:1502
7981 "Note: If grub-install reports the error \"No suitable drive was found in the "
7982 "generated device map.\" it may be that you need to create a "
7983 "C</boot/grub/device.map> file first that contains the mapping between grub "
7984 "device names and Linux device names. It is usually sufficient to create a "
7989 #: ../src/guestfs-actions.pod:2239 ../fish/guestfish-actions.pod:1509
7997 #: ../src/guestfs-actions.pod:2241 ../fish/guestfish-actions.pod:1511
7998 msgid "replacing C</dev/vda> with the name of the installation device."
8002 #: ../src/guestfs-actions.pod:2245
8003 msgid "(Added in 1.0.17)"
8007 #: ../src/guestfs-actions.pod:2247
8008 msgid "guestfs_head"
8012 #: ../src/guestfs-actions.pod:2249
8016 " guestfs_head (guestfs_h *g,\n"
8017 " const char *path);\n"
8022 #: ../src/guestfs-actions.pod:2253 ../fish/guestfish-actions.pod:1517
8024 "This command returns up to the first 10 lines of a file as a list of "
8029 #: ../src/guestfs-actions.pod:2265
8030 msgid "guestfs_head_n"
8034 #: ../src/guestfs-actions.pod:2267
8038 " guestfs_head_n (guestfs_h *g,\n"
8040 " const char *path);\n"
8045 #: ../src/guestfs-actions.pod:2272 ../fish/guestfish-actions.pod:1527
8047 "If the parameter C<nrlines> is a positive number, this returns the first "
8048 "C<nrlines> lines of the file C<path>."
8052 #: ../src/guestfs-actions.pod:2275 ../fish/guestfish-actions.pod:1530
8054 "If the parameter C<nrlines> is a negative number, this returns lines from "
8055 "the file C<path>, excluding the last C<nrlines> lines."
8059 #: ../src/guestfs-actions.pod:2278 ../src/guestfs-actions.pod:6265 ../fish/guestfish-actions.pod:1533 ../fish/guestfish-actions.pod:4184
8060 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
8064 #: ../src/guestfs-actions.pod:2289
8065 msgid "guestfs_hexdump"
8069 #: ../src/guestfs-actions.pod:2291
8073 " guestfs_hexdump (guestfs_h *g,\n"
8074 " const char *path);\n"
8079 #: ../src/guestfs-actions.pod:2295 ../fish/guestfish-actions.pod:1542
8081 "This runs C<hexdump -C> on the given C<path>. The result is the "
8082 "human-readable, canonical hex dump of the file."
8086 #: ../src/guestfs-actions.pod:2304 ../src/guestfs-actions.pod:6049 ../src/guestfs-actions.pod:6104
8087 msgid "(Added in 1.0.22)"
8091 #: ../src/guestfs-actions.pod:2306
8092 msgid "guestfs_initrd_cat"
8096 #: ../src/guestfs-actions.pod:2308
8100 " guestfs_initrd_cat (guestfs_h *g,\n"
8101 " const char *initrdpath,\n"
8102 " const char *filename,\n"
8103 " size_t *size_r);\n"
8108 #: ../src/guestfs-actions.pod:2314 ../fish/guestfish-actions.pod:1552
8110 "This command unpacks the file C<filename> from the initrd file called "
8111 "C<initrdpath>. The filename must be given I<without> the initial C</> "
8116 #: ../src/guestfs-actions.pod:2318 ../fish/guestfish-actions.pod:1556
8118 "For example, in guestfish you could use the following command to examine the "
8119 "boot script (usually called C</init>) contained in a Linux initrd or "
8124 #: ../src/guestfs-actions.pod:2322 ../fish/guestfish-actions.pod:1560
8127 " initrd-cat /boot/initrd-<version>.img init\n"
8132 #: ../src/guestfs-actions.pod:2324
8133 msgid "See also C<guestfs_initrd_list>."
8137 #: ../src/guestfs-actions.pod:2335
8138 msgid "guestfs_initrd_list"
8142 #: ../src/guestfs-actions.pod:2337
8146 " guestfs_initrd_list (guestfs_h *g,\n"
8147 " const char *path);\n"
8152 #: ../src/guestfs-actions.pod:2341 ../fish/guestfish-actions.pod:1571
8153 msgid "This command lists out files contained in an initrd."
8157 #: ../src/guestfs-actions.pod:2343 ../fish/guestfish-actions.pod:1573
8159 "The files are listed without any initial C</> character. The files are "
8160 "listed in the order they appear (not necessarily alphabetical). Directory "
8161 "names are listed as separate items."
8165 #: ../src/guestfs-actions.pod:2347 ../fish/guestfish-actions.pod:1577
8167 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
8168 "initrd. We I<only> support the newer initramfs format (compressed cpio "
8173 #: ../src/guestfs-actions.pod:2357
8174 msgid "guestfs_inotify_add_watch"
8178 #: ../src/guestfs-actions.pod:2359
8182 " guestfs_inotify_add_watch (guestfs_h *g,\n"
8183 " const char *path,\n"
8189 #: ../src/guestfs-actions.pod:2364 ../fish/guestfish-actions.pod:1585
8190 msgid "Watch C<path> for the events listed in C<mask>."
8194 #: ../src/guestfs-actions.pod:2366 ../fish/guestfish-actions.pod:1587
8196 "Note that if C<path> is a directory then events within that directory are "
8197 "watched, but this does I<not> happen recursively (in subdirectories)."
8201 #: ../src/guestfs-actions.pod:2370 ../fish/guestfish-actions.pod:1591
8203 "Note for non-C or non-Linux callers: the inotify events are defined by the "
8204 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
8208 #: ../src/guestfs-actions.pod:2378
8209 msgid "guestfs_inotify_close"
8213 #: ../src/guestfs-actions.pod:2380
8217 " guestfs_inotify_close (guestfs_h *g);\n"
8222 #: ../src/guestfs-actions.pod:2383 ../fish/guestfish-actions.pod:1599
8224 "This closes the inotify handle which was previously opened by inotify_init. "
8225 "It removes all watches, throws away any pending events, and deallocates all "
8230 #: ../src/guestfs-actions.pod:2391
8231 msgid "guestfs_inotify_files"
8235 #: ../src/guestfs-actions.pod:2393
8239 " guestfs_inotify_files (guestfs_h *g);\n"
8244 #: ../src/guestfs-actions.pod:2396
8246 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
8247 "returns a list of pathnames of objects that were touched. The returned "
8248 "pathnames are sorted and deduplicated."
8252 #: ../src/guestfs-actions.pod:2406
8253 msgid "guestfs_inotify_init"
8257 #: ../src/guestfs-actions.pod:2408
8261 " guestfs_inotify_init (guestfs_h *g,\n"
8262 " int maxevents);\n"
8267 #: ../src/guestfs-actions.pod:2412 ../fish/guestfish-actions.pod:1615
8269 "This command creates a new inotify handle. The inotify subsystem can be "
8270 "used to notify events which happen to objects in the guest filesystem."
8274 #: ../src/guestfs-actions.pod:2416
8276 "C<maxevents> is the maximum number of events which will be queued up between "
8277 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
8278 "passed as C<0>, then the kernel (or previously set) default is used. For "
8279 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
8280 "throws away events, but records the fact that it threw them away by setting "
8281 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
8282 "C<guestfs_inotify_read>)."
8286 #: ../src/guestfs-actions.pod:2426
8288 "Before any events are generated, you have to add some watches to the "
8289 "internal watch list. See: C<guestfs_inotify_add_watch>, "
8290 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
8294 #: ../src/guestfs-actions.pod:2432
8296 "Queued up events should be read periodically by calling "
8297 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
8298 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
8299 "often enough then you risk the internal queue overflowing."
8303 #: ../src/guestfs-actions.pod:2439
8305 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
8306 "This also removes any watches automatically."
8310 #: ../src/guestfs-actions.pod:2443 ../fish/guestfish-actions.pod:1646
8312 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
8313 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
8314 "that there is one global inotify handle per libguestfs instance."
8318 #: ../src/guestfs-actions.pod:2452
8319 msgid "guestfs_inotify_read"
8323 #: ../src/guestfs-actions.pod:2454
8326 " struct guestfs_inotify_event_list *\n"
8327 " guestfs_inotify_read (guestfs_h *g);\n"
8332 #: ../src/guestfs-actions.pod:2457 ../fish/guestfish-actions.pod:1655
8334 "Return the complete queue of events that have happened since the previous "
8339 #: ../src/guestfs-actions.pod:2460 ../fish/guestfish-actions.pod:1658
8340 msgid "If no events have happened, this returns an empty list."
8344 #: ../src/guestfs-actions.pod:2462 ../fish/guestfish-actions.pod:1660
8346 "I<Note>: In order to make sure that all events have been read, you must call "
8347 "this function repeatedly until it returns an empty list. The reason is that "
8348 "the call will read events up to the maximum appliance-to-host message size "
8349 "and leave remaining events in the queue."
8353 #: ../src/guestfs-actions.pod:2468
8355 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
8356 "there was an error. I<The caller must call "
8357 "C<guestfs_free_inotify_event_list> after use>."
8361 #: ../src/guestfs-actions.pod:2474
8362 msgid "guestfs_inotify_rm_watch"
8366 #: ../src/guestfs-actions.pod:2476
8370 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
8376 #: ../src/guestfs-actions.pod:2480
8378 "Remove a previously defined inotify watch. See "
8379 "C<guestfs_inotify_add_watch>."
8383 #: ../src/guestfs-actions.pod:2487
8384 msgid "guestfs_inspect_get_arch"
8388 #: ../src/guestfs-actions.pod:2489
8392 " guestfs_inspect_get_arch (guestfs_h *g,\n"
8393 " const char *root);\n"
8398 #: ../src/guestfs-actions.pod:2493 ../src/guestfs-actions.pod:2516 ../src/guestfs-actions.pod:2597 ../src/guestfs-actions.pod:2623 ../src/guestfs-actions.pod:2645 ../src/guestfs-actions.pod:2672 ../src/guestfs-actions.pod:2693 ../src/guestfs-actions.pod:2726 ../src/guestfs-actions.pod:2755 ../src/guestfs-actions.pod:2786 ../src/guestfs-actions.pod:2830 ../src/guestfs-actions.pod:2872 ../src/guestfs-actions.pod:2895
8400 "This function should only be called with a root device string as returned by "
8401 "C<guestfs_inspect_os>."
8405 #: ../src/guestfs-actions.pod:2496
8407 "This returns the architecture of the inspected operating system. The "
8408 "possible return values are listed under C<guestfs_file_architecture>."
8412 #: ../src/guestfs-actions.pod:2500 ../fish/guestfish-actions.pod:1684
8414 "If the architecture could not be determined, then the string C<unknown> is "
8419 #: ../src/guestfs-actions.pod:2503 ../src/guestfs-actions.pod:2584 ../src/guestfs-actions.pod:2632 ../src/guestfs-actions.pod:2660 ../src/guestfs-actions.pod:2742 ../src/guestfs-actions.pod:2773 ../src/guestfs-actions.pod:2797 ../src/guestfs-actions.pod:2816 ../src/guestfs-actions.pod:2859 ../src/guestfs-actions.pod:2882 ../src/guestfs-actions.pod:2988 ../src/guestfs-actions.pod:3029 ../fish/guestfish-actions.pod:1687 ../fish/guestfish-actions.pod:1761 ../fish/guestfish-actions.pod:1794 ../fish/guestfish-actions.pod:1815 ../fish/guestfish-actions.pod:1875 ../fish/guestfish-actions.pod:1899 ../fish/guestfish-actions.pod:1916 ../fish/guestfish-actions.pod:1929 ../fish/guestfish-actions.pod:1964 ../fish/guestfish-actions.pod:1980 ../fish/guestfish-actions.pod:2079 ../fish/guestfish-actions.pod:2113
8420 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
8424 #: ../src/guestfs-actions.pod:2510
8425 msgid "guestfs_inspect_get_distro"
8429 #: ../src/guestfs-actions.pod:2512
8433 " guestfs_inspect_get_distro (guestfs_h *g,\n"
8434 " const char *root);\n"
8439 #: ../src/guestfs-actions.pod:2519 ../fish/guestfish-actions.pod:1696
8440 msgid "This returns the distro (distribution) of the inspected operating system."
8444 #: ../src/guestfs-actions.pod:2522 ../fish/guestfish-actions.pod:1699
8445 msgid "Currently defined distros are:"
8449 #: ../src/guestfs-actions.pod:2526 ../fish/guestfish-actions.pod:1703
8450 msgid "\"archlinux\""
8454 #: ../src/guestfs-actions.pod:2528 ../fish/guestfish-actions.pod:1705
8459 #: ../src/guestfs-actions.pod:2530 ../fish/guestfish-actions.pod:1707
8464 #: ../src/guestfs-actions.pod:2532 ../fish/guestfish-actions.pod:1709
8469 #: ../src/guestfs-actions.pod:2534 ../fish/guestfish-actions.pod:1711
8474 #: ../src/guestfs-actions.pod:2536 ../fish/guestfish-actions.pod:1713
8479 #: ../src/guestfs-actions.pod:2538 ../fish/guestfish-actions.pod:1715
8484 #: ../src/guestfs-actions.pod:2540 ../fish/guestfish-actions.pod:1717
8489 #: ../src/guestfs-actions.pod:2542 ../fish/guestfish-actions.pod:1719
8490 msgid "\"linuxmint\""
8494 #: ../src/guestfs-actions.pod:2544 ../fish/guestfish-actions.pod:1721
8499 #: ../src/guestfs-actions.pod:2546 ../fish/guestfish-actions.pod:1723
8500 msgid "\"mandriva\""
8504 #: ../src/guestfs-actions.pod:2548 ../fish/guestfish-actions.pod:1725
8509 #: ../src/guestfs-actions.pod:2550 ../fish/guestfish-actions.pod:1727
8514 #: ../src/guestfs-actions.pod:2552 ../fish/guestfish-actions.pod:1729
8519 #: ../src/guestfs-actions.pod:2554 ../fish/guestfish-actions.pod:1731
8524 #: ../src/guestfs-actions.pod:2556 ../fish/guestfish-actions.pod:1733
8529 #: ../src/guestfs-actions.pod:2558 ../fish/guestfish-actions.pod:1735
8530 msgid "\"redhat-based\""
8534 #: ../src/guestfs-actions.pod:2560 ../fish/guestfish-actions.pod:1737
8535 msgid "Some Red Hat-derived distro."
8539 #: ../src/guestfs-actions.pod:2562 ../fish/guestfish-actions.pod:1739
8544 #: ../src/guestfs-actions.pod:2564 ../fish/guestfish-actions.pod:1741
8545 msgid "Red Hat Enterprise Linux and some derivatives."
8549 #: ../src/guestfs-actions.pod:2566 ../fish/guestfish-actions.pod:1743
8554 #: ../src/guestfs-actions.pod:2568 ../fish/guestfish-actions.pod:1745
8559 #: ../src/guestfs-actions.pod:2570 ../src/guestfs-actions.pod:2850 ../fish/guestfish-actions.pod:1747 ../fish/guestfish-actions.pod:1955
8564 #: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:1749
8565 msgid "The distro could not be determined."
8569 #: ../src/guestfs-actions.pod:2574 ../src/guestfs-actions.pod:2842 ../fish/guestfish-actions.pod:1751 ../fish/guestfish-actions.pod:1947
8574 #: ../src/guestfs-actions.pod:2576 ../fish/guestfish-actions.pod:1753
8576 "Windows does not have distributions. This string is returned if the OS type "
8581 #: ../src/guestfs-actions.pod:2581 ../src/guestfs-actions.pod:2856 ../fish/guestfish-actions.pod:1758 ../fish/guestfish-actions.pod:1961
8583 "Future versions of libguestfs may return other strings here. The caller "
8584 "should be prepared to handle any string."
8588 #: ../src/guestfs-actions.pod:2591
8589 msgid "guestfs_inspect_get_filesystems"
8593 #: ../src/guestfs-actions.pod:2593
8597 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
8598 " const char *root);\n"
8603 #: ../src/guestfs-actions.pod:2600 ../fish/guestfish-actions.pod:1770
8605 "This returns a list of all the filesystems that we think are associated with "
8606 "this operating system. This includes the root filesystem, other ordinary "
8607 "filesystems, and non-mounted devices like swap partitions."
8611 #: ../src/guestfs-actions.pod:2605 ../fish/guestfish-actions.pod:1775
8613 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
8614 "to be shared between operating systems."
8618 #: ../src/guestfs-actions.pod:2608
8620 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8621 "C<guestfs_inspect_get_mountpoints>."
8625 #: ../src/guestfs-actions.pod:2617
8626 msgid "guestfs_inspect_get_hostname"
8630 #: ../src/guestfs-actions.pod:2619
8634 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
8635 " const char *root);\n"
8640 #: ../src/guestfs-actions.pod:2626 ../fish/guestfish-actions.pod:1788
8642 "This function returns the hostname of the operating system as found by "
8643 "inspection of the guest's configuration files."
8647 #: ../src/guestfs-actions.pod:2629 ../fish/guestfish-actions.pod:1791
8649 "If the hostname could not be determined, then the string C<unknown> is "
8654 #: ../src/guestfs-actions.pod:2637
8655 msgid "(Added in 1.7.9)"
8659 #: ../src/guestfs-actions.pod:2639
8660 msgid "guestfs_inspect_get_major_version"
8664 #: ../src/guestfs-actions.pod:2641
8668 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
8669 " const char *root);\n"
8674 #: ../src/guestfs-actions.pod:2648 ../fish/guestfish-actions.pod:1803
8675 msgid "This returns the major version number of the inspected operating system."
8679 #: ../src/guestfs-actions.pod:2651 ../fish/guestfish-actions.pod:1806
8681 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
8682 "popular public names used by the operating system. Notably the operating "
8683 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
8684 "1). You can find out the real versions corresponding to releases of Windows "
8685 "by consulting Wikipedia or MSDN."
8689 #: ../src/guestfs-actions.pod:2658 ../src/guestfs-actions.pod:2678 ../fish/guestfish-actions.pod:1813 ../fish/guestfish-actions.pod:1827
8690 msgid "If the version could not be determined, then C<0> is returned."
8694 #: ../src/guestfs-actions.pod:2666
8695 msgid "guestfs_inspect_get_minor_version"
8699 #: ../src/guestfs-actions.pod:2668
8703 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
8704 " const char *root);\n"
8709 #: ../src/guestfs-actions.pod:2675 ../fish/guestfish-actions.pod:1824
8710 msgid "This returns the minor version number of the inspected operating system."
8714 #: ../src/guestfs-actions.pod:2680
8716 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8717 "C<guestfs_inspect_get_major_version>."
8721 #: ../src/guestfs-actions.pod:2687
8722 msgid "guestfs_inspect_get_mountpoints"
8726 #: ../src/guestfs-actions.pod:2689
8730 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
8731 " const char *root);\n"
8736 #: ../src/guestfs-actions.pod:2696 ../fish/guestfish-actions.pod:1839
8738 "This returns a hash of where we think the filesystems associated with this "
8739 "operating system should be mounted. Callers should note that this is at "
8740 "best an educated guess made by reading configuration files such as "
8745 #: ../src/guestfs-actions.pod:2701 ../fish/guestfish-actions.pod:1844
8747 "Each element in the returned hashtable has a key which is the path of the "
8748 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
8749 "mounted there (eg. C</dev/sda1>)."
8753 #: ../src/guestfs-actions.pod:2706 ../fish/guestfish-actions.pod:1849
8754 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
8758 #: ../src/guestfs-actions.pod:2709
8760 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8761 "C<guestfs_inspect_get_filesystems>."
8765 #: ../src/guestfs-actions.pod:2712 ../src/guestfs-actions.pod:3356 ../src/guestfs-actions.pod:4550 ../src/guestfs-actions.pod:6406
8767 "This function returns a NULL-terminated array of strings, or NULL if there "
8768 "was an error. The array of strings will always have length C<2n+1>, where "
8769 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
8770 "caller must free the strings and the array after use>."
8774 #: ../src/guestfs-actions.pod:2720
8775 msgid "guestfs_inspect_get_package_format"
8779 #: ../src/guestfs-actions.pod:2722
8783 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
8784 " const char *root);\n"
8789 #: ../src/guestfs-actions.pod:2729
8791 "This function and C<guestfs_inspect_get_package_management> return the "
8792 "package format and package management tool used by the inspected operating "
8793 "system. For example for Fedora these functions would return C<rpm> (package "
8794 "format) and C<yum> (package management)."
8798 #: ../src/guestfs-actions.pod:2735 ../fish/guestfish-actions.pod:1868
8800 "This returns the string C<unknown> if we could not determine the package "
8801 "format I<or> if the operating system does not have a real packaging system "
8806 #: ../src/guestfs-actions.pod:2739 ../fish/guestfish-actions.pod:1872
8808 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>. "
8809 "Future versions of libguestfs may return other strings."
8813 #: ../src/guestfs-actions.pod:2747 ../src/guestfs-actions.pod:2778
8814 msgid "(Added in 1.7.5)"
8818 #: ../src/guestfs-actions.pod:2749
8819 msgid "guestfs_inspect_get_package_management"
8823 #: ../src/guestfs-actions.pod:2751
8827 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
8828 " const char *root);\n"
8833 #: ../src/guestfs-actions.pod:2758
8835 "C<guestfs_inspect_get_package_format> and this function return the package "
8836 "format and package management tool used by the inspected operating system. "
8837 "For example for Fedora these functions would return C<rpm> (package format) "
8838 "and C<yum> (package management)."
8842 #: ../src/guestfs-actions.pod:2764 ../fish/guestfish-actions.pod:1890
8844 "This returns the string C<unknown> if we could not determine the package "
8845 "management tool I<or> if the operating system does not have a real packaging "
8846 "system (eg. Windows)."
8850 #: ../src/guestfs-actions.pod:2768 ../fish/guestfish-actions.pod:1894
8852 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
8853 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>. Future versions of "
8854 "libguestfs may return other strings."
8858 #: ../src/guestfs-actions.pod:2780
8859 msgid "guestfs_inspect_get_product_name"
8863 #: ../src/guestfs-actions.pod:2782
8867 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
8868 " const char *root);\n"
8873 #: ../src/guestfs-actions.pod:2789 ../fish/guestfish-actions.pod:1908
8875 "This returns the product name of the inspected operating system. The "
8876 "product name is generally some freeform string which can be displayed to the "
8877 "user, but should not be parsed by programs."
8881 #: ../src/guestfs-actions.pod:2794 ../fish/guestfish-actions.pod:1913
8883 "If the product name could not be determined, then the string C<unknown> is "
8888 #: ../src/guestfs-actions.pod:2804
8889 msgid "guestfs_inspect_get_roots"
8893 #: ../src/guestfs-actions.pod:2806
8897 " guestfs_inspect_get_roots (guestfs_h *g);\n"
8902 #: ../src/guestfs-actions.pod:2809
8904 "This function is a convenient way to get the list of root devices, as "
8905 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
8906 "the whole inspection process."
8910 #: ../src/guestfs-actions.pod:2813
8912 "This returns an empty list if either no root devices were found or the "
8913 "caller has not called C<guestfs_inspect_os>."
8917 #: ../src/guestfs-actions.pod:2822
8918 msgid "(Added in 1.7.3)"
8922 #: ../src/guestfs-actions.pod:2824
8923 msgid "guestfs_inspect_get_type"
8927 #: ../src/guestfs-actions.pod:2826
8931 " guestfs_inspect_get_type (guestfs_h *g,\n"
8932 " const char *root);\n"
8937 #: ../src/guestfs-actions.pod:2833 ../fish/guestfish-actions.pod:1938
8939 "This returns the type of the inspected operating system. Currently defined "
8944 #: ../src/guestfs-actions.pod:2838 ../fish/guestfish-actions.pod:1943
8949 #: ../src/guestfs-actions.pod:2840 ../fish/guestfish-actions.pod:1945
8950 msgid "Any Linux-based operating system."
8954 #: ../src/guestfs-actions.pod:2844 ../fish/guestfish-actions.pod:1949
8955 msgid "Any Microsoft Windows operating system."
8959 #: ../src/guestfs-actions.pod:2846 ../fish/guestfish-actions.pod:1951
8964 #: ../src/guestfs-actions.pod:2848 ../fish/guestfish-actions.pod:1953
8969 #: ../src/guestfs-actions.pod:2852 ../fish/guestfish-actions.pod:1957
8970 msgid "The operating system type could not be determined."
8974 #: ../src/guestfs-actions.pod:2866
8975 msgid "guestfs_inspect_get_windows_systemroot"
8979 #: ../src/guestfs-actions.pod:2868
8983 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
8984 " const char *root);\n"
8989 #: ../src/guestfs-actions.pod:2875 ../fish/guestfish-actions.pod:1973
8991 "This returns the Windows systemroot of the inspected guest. The systemroot "
8992 "is a directory path such as C</WINDOWS>."
8996 #: ../src/guestfs-actions.pod:2878 ../fish/guestfish-actions.pod:1976
8998 "This call assumes that the guest is Windows and that the systemroot could be "
8999 "determined by inspection. If this is not the case then an error is "
9004 #: ../src/guestfs-actions.pod:2887
9005 msgid "(Added in 1.5.25)"
9009 #: ../src/guestfs-actions.pod:2889
9010 msgid "guestfs_inspect_list_applications"
9014 #: ../src/guestfs-actions.pod:2891
9017 " struct guestfs_application_list *\n"
9018 " guestfs_inspect_list_applications (guestfs_h *g,\n"
9019 " const char *root);\n"
9024 #: ../src/guestfs-actions.pod:2898 ../fish/guestfish-actions.pod:1989
9025 msgid "Return the list of applications installed in the operating system."
9029 #: ../src/guestfs-actions.pod:2900
9031 "I<Note:> This call works differently from other parts of the inspection "
9032 "API. You have to call C<guestfs_inspect_os>, then "
9033 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
9034 "this. Listing applications is a significantly more difficult operation "
9035 "which requires access to the full filesystem. Also note that unlike the "
9036 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
9037 "the libguestfs handle, this call actually reads parts of the mounted "
9038 "filesystems during the call."
9042 #: ../src/guestfs-actions.pod:2910 ../fish/guestfish-actions.pod:2001
9044 "This returns an empty list if the inspection code was not able to determine "
9045 "the list of applications."
9049 #: ../src/guestfs-actions.pod:2913 ../fish/guestfish-actions.pod:2004
9050 msgid "The application structure contains the following fields:"
9054 #: ../src/guestfs-actions.pod:2917 ../fish/guestfish-actions.pod:2008
9059 #: ../src/guestfs-actions.pod:2919 ../fish/guestfish-actions.pod:2010
9061 "The name of the application. For Red Hat-derived and Debian-derived Linux "
9062 "guests, this is the package name."
9066 #: ../src/guestfs-actions.pod:2922 ../fish/guestfish-actions.pod:2013
9067 msgid "C<app_display_name>"
9071 #: ../src/guestfs-actions.pod:2924 ../fish/guestfish-actions.pod:2015
9073 "The display name of the application, sometimes localized to the install "
9074 "language of the guest operating system."
9078 #: ../src/guestfs-actions.pod:2927 ../fish/guestfish-actions.pod:2018
9080 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
9081 "to display something can use C<app_name> instead."
9085 #: ../src/guestfs-actions.pod:2930 ../fish/guestfish-actions.pod:2021
9086 msgid "C<app_epoch>"
9090 #: ../src/guestfs-actions.pod:2932 ../fish/guestfish-actions.pod:2023
9092 "For package managers which use epochs, this contains the epoch of the "
9093 "package (an integer). If unavailable, this is returned as C<0>."
9097 #: ../src/guestfs-actions.pod:2935 ../fish/guestfish-actions.pod:2026
9098 msgid "C<app_version>"
9102 #: ../src/guestfs-actions.pod:2937 ../fish/guestfish-actions.pod:2028
9104 "The version string of the application or package. If unavailable this is "
9105 "returned as an empty string C<\"\">."
9109 #: ../src/guestfs-actions.pod:2940 ../fish/guestfish-actions.pod:2031
9110 msgid "C<app_release>"
9114 #: ../src/guestfs-actions.pod:2942 ../fish/guestfish-actions.pod:2033
9116 "The release string of the application or package, for package managers that "
9117 "use this. If unavailable this is returned as an empty string C<\"\">."
9121 #: ../src/guestfs-actions.pod:2946 ../fish/guestfish-actions.pod:2037
9122 msgid "C<app_install_path>"
9126 #: ../src/guestfs-actions.pod:2948 ../fish/guestfish-actions.pod:2039
9128 "The installation path of the application (on operating systems such as "
9129 "Windows which use installation paths). This path is in the format used by "
9130 "the guest operating system, it is not a libguestfs path."
9134 #: ../src/guestfs-actions.pod:2953 ../fish/guestfish-actions.pod:2044
9135 msgid "If unavailable this is returned as an empty string C<\"\">."
9139 #: ../src/guestfs-actions.pod:2955 ../fish/guestfish-actions.pod:2046
9140 msgid "C<app_trans_path>"
9144 #: ../src/guestfs-actions.pod:2957 ../fish/guestfish-actions.pod:2048
9146 "The install path translated into a libguestfs path. If unavailable this is "
9147 "returned as an empty string C<\"\">."
9151 #: ../src/guestfs-actions.pod:2960 ../fish/guestfish-actions.pod:2051
9152 msgid "C<app_publisher>"
9156 #: ../src/guestfs-actions.pod:2962 ../fish/guestfish-actions.pod:2053
9158 "The name of the publisher of the application, for package managers that use "
9159 "this. If unavailable this is returned as an empty string C<\"\">."
9163 #: ../src/guestfs-actions.pod:2966 ../fish/guestfish-actions.pod:2057
9168 #: ../src/guestfs-actions.pod:2968 ../fish/guestfish-actions.pod:2059
9170 "The URL (eg. upstream URL) of the application. If unavailable this is "
9171 "returned as an empty string C<\"\">."
9175 #: ../src/guestfs-actions.pod:2971 ../fish/guestfish-actions.pod:2062
9176 msgid "C<app_source_package>"
9180 #: ../src/guestfs-actions.pod:2973 ../fish/guestfish-actions.pod:2064
9182 "For packaging systems which support this, the name of the source package. "
9183 "If unavailable this is returned as an empty string C<\"\">."
9187 #: ../src/guestfs-actions.pod:2976 ../fish/guestfish-actions.pod:2067
9188 msgid "C<app_summary>"
9192 #: ../src/guestfs-actions.pod:2978 ../fish/guestfish-actions.pod:2069
9194 "A short (usually one line) description of the application or package. If "
9195 "unavailable this is returned as an empty string C<\"\">."
9199 #: ../src/guestfs-actions.pod:2981 ../fish/guestfish-actions.pod:2072
9200 msgid "C<app_description>"
9204 #: ../src/guestfs-actions.pod:2983 ../fish/guestfish-actions.pod:2074
9206 "A longer description of the application or package. If unavailable this is "
9207 "returned as an empty string C<\"\">."
9211 #: ../src/guestfs-actions.pod:2990
9213 "This function returns a C<struct guestfs_application_list *>, or NULL if "
9214 "there was an error. I<The caller must call C<guestfs_free_application_list> "
9219 #: ../src/guestfs-actions.pod:2994
9220 msgid "(Added in 1.7.8)"
9224 #: ../src/guestfs-actions.pod:2996
9225 msgid "guestfs_inspect_os"
9229 #: ../src/guestfs-actions.pod:2998
9233 " guestfs_inspect_os (guestfs_h *g);\n"
9238 #: ../src/guestfs-actions.pod:3001 ../fish/guestfish-actions.pod:2085
9240 "This function uses other libguestfs functions and certain heuristics to "
9241 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
9242 "for operating systems."
9246 #: ../src/guestfs-actions.pod:3005 ../fish/guestfish-actions.pod:2089
9247 msgid "The list returned is empty if no operating systems were found."
9251 #: ../src/guestfs-actions.pod:3007 ../fish/guestfish-actions.pod:2091
9253 "If one operating system was found, then this returns a list with a single "
9254 "element, which is the name of the root filesystem of this operating system. "
9255 "It is also possible for this function to return a list containing more than "
9256 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
9257 "element being the root filesystem of one of the operating systems."
9261 #: ../src/guestfs-actions.pod:3014
9263 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
9264 "functions in order to query further information about each operating system, "
9265 "such as the name and version."
9269 #: ../src/guestfs-actions.pod:3019
9271 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
9272 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
9273 "the contents. This should be called with no disks currently mounted. The "
9274 "function may also use Augeas, so any existing Augeas handle will be closed."
9278 #: ../src/guestfs-actions.pod:3025 ../fish/guestfish-actions.pod:2109
9280 "This function cannot decrypt encrypted disks. The caller must do that first "
9281 "(supplying the necessary keys) if the disk is encrypted."
9285 #: ../src/guestfs-actions.pod:3031 ../src/guestfs-actions.pod:3314 ../src/guestfs-actions.pod:3376
9286 msgid "See also C<guestfs_list_filesystems>."
9290 #: ../src/guestfs-actions.pod:3039
9291 msgid "guestfs_is_blockdev"
9295 #: ../src/guestfs-actions.pod:3041
9299 " guestfs_is_blockdev (guestfs_h *g,\n"
9300 " const char *path);\n"
9305 #: ../src/guestfs-actions.pod:3045 ../fish/guestfish-actions.pod:2121
9307 "This returns C<true> if and only if there is a block device with the given "
9312 #: ../src/guestfs-actions.pod:3048 ../src/guestfs-actions.pod:3077 ../src/guestfs-actions.pod:3107 ../src/guestfs-actions.pod:3122 ../src/guestfs-actions.pod:3138 ../src/guestfs-actions.pod:3194 ../src/guestfs-actions.pod:3209
9313 msgid "See also C<guestfs_stat>."
9317 #: ../src/guestfs-actions.pod:3052 ../src/guestfs-actions.pod:3081 ../src/guestfs-actions.pod:3126 ../src/guestfs-actions.pod:3198 ../src/guestfs-actions.pod:3213
9318 msgid "(Added in 1.5.10)"
9322 #: ../src/guestfs-actions.pod:3054
9323 msgid "guestfs_is_busy"
9327 #: ../src/guestfs-actions.pod:3056
9331 " guestfs_is_busy (guestfs_h *g);\n"
9336 #: ../src/guestfs-actions.pod:3059 ../fish/guestfish-actions.pod:2130
9338 "This returns true iff this handle is busy processing a command (in the "
9343 #: ../src/guestfs-actions.pod:3068
9344 msgid "guestfs_is_chardev"
9348 #: ../src/guestfs-actions.pod:3070
9352 " guestfs_is_chardev (guestfs_h *g,\n"
9353 " const char *path);\n"
9358 #: ../src/guestfs-actions.pod:3074 ../fish/guestfish-actions.pod:2139
9360 "This returns C<true> if and only if there is a character device with the "
9361 "given C<path> name."
9365 #: ../src/guestfs-actions.pod:3083
9366 msgid "guestfs_is_config"
9370 #: ../src/guestfs-actions.pod:3085
9374 " guestfs_is_config (guestfs_h *g);\n"
9379 #: ../src/guestfs-actions.pod:3088 ../fish/guestfish-actions.pod:2148
9381 "This returns true iff this handle is being configured (in the C<CONFIG> "
9386 #: ../src/guestfs-actions.pod:3097
9387 msgid "guestfs_is_dir"
9391 #: ../src/guestfs-actions.pod:3099
9395 " guestfs_is_dir (guestfs_h *g,\n"
9396 " const char *path);\n"
9401 #: ../src/guestfs-actions.pod:3103 ../fish/guestfish-actions.pod:2157
9403 "This returns C<true> if and only if there is a directory with the given "
9404 "C<path> name. Note that it returns false for other objects like files."
9408 #: ../src/guestfs-actions.pod:3113
9409 msgid "guestfs_is_fifo"
9413 #: ../src/guestfs-actions.pod:3115
9417 " guestfs_is_fifo (guestfs_h *g,\n"
9418 " const char *path);\n"
9423 #: ../src/guestfs-actions.pod:3119 ../fish/guestfish-actions.pod:2167
9425 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
9426 "given C<path> name."
9430 #: ../src/guestfs-actions.pod:3128
9431 msgid "guestfs_is_file"
9435 #: ../src/guestfs-actions.pod:3130
9439 " guestfs_is_file (guestfs_h *g,\n"
9440 " const char *path);\n"
9445 #: ../src/guestfs-actions.pod:3134 ../fish/guestfish-actions.pod:2176
9447 "This returns C<true> if and only if there is a regular file with the given "
9448 "C<path> name. Note that it returns false for other objects like "
9453 #: ../src/guestfs-actions.pod:3144
9454 msgid "guestfs_is_launching"
9458 #: ../src/guestfs-actions.pod:3146
9462 " guestfs_is_launching (guestfs_h *g);\n"
9467 #: ../src/guestfs-actions.pod:3149 ../fish/guestfish-actions.pod:2186
9469 "This returns true iff this handle is launching the subprocess (in the "
9470 "C<LAUNCHING> state)."
9474 #: ../src/guestfs-actions.pod:3158
9475 msgid "guestfs_is_lv"
9479 #: ../src/guestfs-actions.pod:3160
9483 " guestfs_is_lv (guestfs_h *g,\n"
9484 " const char *device);\n"
9489 #: ../src/guestfs-actions.pod:3164 ../fish/guestfish-actions.pod:2195
9491 "This command tests whether C<device> is a logical volume, and returns true "
9492 "iff this is the case."
9496 #: ../src/guestfs-actions.pod:3171
9497 msgid "guestfs_is_ready"
9501 #: ../src/guestfs-actions.pod:3173
9505 " guestfs_is_ready (guestfs_h *g);\n"
9510 #: ../src/guestfs-actions.pod:3176 ../fish/guestfish-actions.pod:2202
9512 "This returns true iff this handle is ready to accept commands (in the "
9517 #: ../src/guestfs-actions.pod:3185
9518 msgid "guestfs_is_socket"
9522 #: ../src/guestfs-actions.pod:3187
9526 " guestfs_is_socket (guestfs_h *g,\n"
9527 " const char *path);\n"
9532 #: ../src/guestfs-actions.pod:3191 ../fish/guestfish-actions.pod:2211
9534 "This returns C<true> if and only if there is a Unix domain socket with the "
9535 "given C<path> name."
9539 #: ../src/guestfs-actions.pod:3200
9540 msgid "guestfs_is_symlink"
9544 #: ../src/guestfs-actions.pod:3202
9548 " guestfs_is_symlink (guestfs_h *g,\n"
9549 " const char *path);\n"
9554 #: ../src/guestfs-actions.pod:3206 ../fish/guestfish-actions.pod:2220
9556 "This returns C<true> if and only if there is a symbolic link with the given "
9561 #: ../src/guestfs-actions.pod:3215
9562 msgid "guestfs_kill_subprocess"
9566 #: ../src/guestfs-actions.pod:3217
9570 " guestfs_kill_subprocess (guestfs_h *g);\n"
9575 #: ../src/guestfs-actions.pod:3220 ../fish/guestfish-actions.pod:2229
9576 msgid "This kills the qemu subprocess. You should never need to call this."
9580 #: ../src/guestfs-actions.pod:3226
9581 msgid "guestfs_launch"
9585 #: ../src/guestfs-actions.pod:3228
9589 " guestfs_launch (guestfs_h *g);\n"
9594 #: ../src/guestfs-actions.pod:3231 ../fish/guestfish-actions.pod:2237
9596 "Internally libguestfs is implemented by running a virtual machine using "
9601 #: ../src/guestfs-actions.pod:3234 ../fish/guestfish-actions.pod:2240
9603 "You should call this after configuring the handle (eg. adding drives) but "
9604 "before performing any actions."
9608 #: ../src/guestfs-actions.pod:3241
9609 msgid "guestfs_lchown"
9613 #: ../src/guestfs-actions.pod:3243
9617 " guestfs_lchown (guestfs_h *g,\n"
9620 " const char *path);\n"
9625 #: ../src/guestfs-actions.pod:3249
9627 "Change the file owner to C<owner> and group to C<group>. This is like "
9628 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
9629 "changed, not the target."
9633 #: ../src/guestfs-actions.pod:3261
9634 msgid "guestfs_lgetxattr"
9638 #: ../src/guestfs-actions.pod:3263
9642 " guestfs_lgetxattr (guestfs_h *g,\n"
9643 " const char *path,\n"
9644 " const char *name,\n"
9645 " size_t *size_r);\n"
9650 #: ../src/guestfs-actions.pod:3269 ../fish/guestfish-actions.pod:2259
9652 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
9653 "is a symlink, then this call returns an extended attribute from the symlink."
9657 #: ../src/guestfs-actions.pod:3283
9658 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
9662 #: ../src/guestfs-actions.pod:3289
9663 msgid "guestfs_lgetxattrs"
9667 #: ../src/guestfs-actions.pod:3291
9670 " struct guestfs_xattr_list *\n"
9671 " guestfs_lgetxattrs (guestfs_h *g,\n"
9672 " const char *path);\n"
9677 #: ../src/guestfs-actions.pod:3295
9679 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
9680 "then it returns the extended attributes of the link itself."
9684 #: ../src/guestfs-actions.pod:3305
9685 msgid "guestfs_list_devices"
9689 #: ../src/guestfs-actions.pod:3307
9693 " guestfs_list_devices (guestfs_h *g);\n"
9698 #: ../src/guestfs-actions.pod:3310 ../fish/guestfish-actions.pod:2287
9699 msgid "List all the block devices."
9703 #: ../src/guestfs-actions.pod:3312 ../fish/guestfish-actions.pod:2289
9704 msgid "The full block device names are returned, eg. C</dev/sda>."
9708 #: ../src/guestfs-actions.pod:3322
9709 msgid "guestfs_list_filesystems"
9713 #: ../src/guestfs-actions.pod:3324
9717 " guestfs_list_filesystems (guestfs_h *g);\n"
9722 #: ../src/guestfs-actions.pod:3327 ../fish/guestfish-actions.pod:2297
9724 "This inspection command looks for filesystems on partitions, block devices "
9725 "and logical volumes, returning a list of devices containing filesystems and "
9730 #: ../src/guestfs-actions.pod:3331 ../fish/guestfish-actions.pod:2301
9732 "The return value is a hash, where the keys are the devices containing "
9733 "filesystems, and the values are the filesystem types. For example:"
9737 #: ../src/guestfs-actions.pod:3335 ../fish/guestfish-actions.pod:2305
9740 " \"/dev/sda1\" => \"ntfs\"\n"
9741 " \"/dev/sda2\" => \"ext2\"\n"
9742 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
9743 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
9748 #: ../src/guestfs-actions.pod:3340 ../fish/guestfish-actions.pod:2310
9750 "The value can have the special value \"unknown\", meaning the content of the "
9751 "device is undetermined or empty. \"swap\" means a Linux swap partition."
9755 #: ../src/guestfs-actions.pod:3344
9757 "This command runs other libguestfs commands, which might include "
9758 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
9759 "soon after launch and only when nothing is mounted."
9763 #: ../src/guestfs-actions.pod:3348
9765 "Not all of the filesystems returned will be mountable. In particular, swap "
9766 "partitions are returned in the list. Also this command does not check that "
9767 "each filesystem found is valid and mountable, and some filesystems might be "
9768 "mountable but require special options. Filesystems may not all belong to a "
9769 "single logical operating system (use C<guestfs_inspect_os> to look for "
9774 #: ../src/guestfs-actions.pod:3362 ../src/guestfs-actions.pod:4951
9775 msgid "(Added in 1.5.15)"
9779 #: ../src/guestfs-actions.pod:3364
9780 msgid "guestfs_list_partitions"
9784 #: ../src/guestfs-actions.pod:3366
9788 " guestfs_list_partitions (guestfs_h *g);\n"
9793 #: ../src/guestfs-actions.pod:3369 ../fish/guestfish-actions.pod:2330
9794 msgid "List all the partitions detected on all block devices."
9798 #: ../src/guestfs-actions.pod:3371 ../fish/guestfish-actions.pod:2332
9799 msgid "The full partition device names are returned, eg. C</dev/sda1>"
9803 #: ../src/guestfs-actions.pod:3373
9805 "This does not return logical volumes. For that you will need to call "
9810 #: ../src/guestfs-actions.pod:3384
9815 #: ../src/guestfs-actions.pod:3386
9819 " guestfs_ll (guestfs_h *g,\n"
9820 " const char *directory);\n"
9825 #: ../src/guestfs-actions.pod:3390 ../fish/guestfish-actions.pod:2343
9827 "List the files in C<directory> (relative to the root directory, there is no "
9828 "cwd) in the format of 'ls -la'."
9832 #: ../src/guestfs-actions.pod:3393 ../fish/guestfish-actions.pod:2346
9834 "This command is mostly useful for interactive sessions. It is I<not> "
9835 "intended that you try to parse the output string."
9839 #: ../src/guestfs-actions.pod:3401
9844 #: ../src/guestfs-actions.pod:3403
9848 " guestfs_ln (guestfs_h *g,\n"
9849 " const char *target,\n"
9850 " const char *linkname);\n"
9855 #: ../src/guestfs-actions.pod:3408 ../fish/guestfish-actions.pod:2353
9856 msgid "This command creates a hard link using the C<ln> command."
9860 #: ../src/guestfs-actions.pod:3414
9861 msgid "guestfs_ln_f"
9865 #: ../src/guestfs-actions.pod:3416
9869 " guestfs_ln_f (guestfs_h *g,\n"
9870 " const char *target,\n"
9871 " const char *linkname);\n"
9876 #: ../src/guestfs-actions.pod:3421 ../fish/guestfish-actions.pod:2359
9878 "This command creates a hard link using the C<ln -f> command. The C<-f> "
9879 "option removes the link (C<linkname>) if it exists already."
9883 #: ../src/guestfs-actions.pod:3428
9884 msgid "guestfs_ln_s"
9888 #: ../src/guestfs-actions.pod:3430
9892 " guestfs_ln_s (guestfs_h *g,\n"
9893 " const char *target,\n"
9894 " const char *linkname);\n"
9899 #: ../src/guestfs-actions.pod:3435 ../fish/guestfish-actions.pod:2366
9900 msgid "This command creates a symbolic link using the C<ln -s> command."
9904 #: ../src/guestfs-actions.pod:3441
9905 msgid "guestfs_ln_sf"
9909 #: ../src/guestfs-actions.pod:3443
9913 " guestfs_ln_sf (guestfs_h *g,\n"
9914 " const char *target,\n"
9915 " const char *linkname);\n"
9920 #: ../src/guestfs-actions.pod:3448 ../fish/guestfish-actions.pod:2372
9922 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
9923 "option removes the link (C<linkname>) if it exists already."
9927 #: ../src/guestfs-actions.pod:3455
9928 msgid "guestfs_lremovexattr"
9932 #: ../src/guestfs-actions.pod:3457
9936 " guestfs_lremovexattr (guestfs_h *g,\n"
9937 " const char *xattr,\n"
9938 " const char *path);\n"
9943 #: ../src/guestfs-actions.pod:3462
9945 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
9946 "link, then it removes an extended attribute of the link itself."
9950 #: ../src/guestfs-actions.pod:3470
9955 #: ../src/guestfs-actions.pod:3472
9959 " guestfs_ls (guestfs_h *g,\n"
9960 " const char *directory);\n"
9965 #: ../src/guestfs-actions.pod:3476 ../fish/guestfish-actions.pod:2387
9967 "List the files in C<directory> (relative to the root directory, there is no "
9968 "cwd). The '.' and '..' entries are not returned, but hidden files are "
9973 #: ../src/guestfs-actions.pod:3480
9975 "This command is mostly useful for interactive sessions. Programs should "
9976 "probably use C<guestfs_readdir> instead."
9980 #: ../src/guestfs-actions.pod:3489
9981 msgid "guestfs_lsetxattr"
9985 #: ../src/guestfs-actions.pod:3491
9989 " guestfs_lsetxattr (guestfs_h *g,\n"
9990 " const char *xattr,\n"
9991 " const char *val,\n"
9993 " const char *path);\n"
9998 #: ../src/guestfs-actions.pod:3498
10000 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
10001 "then it sets an extended attribute of the link itself."
10005 #: ../src/guestfs-actions.pod:3506
10006 msgid "guestfs_lstat"
10010 #: ../src/guestfs-actions.pod:3508
10013 " struct guestfs_stat *\n"
10014 " guestfs_lstat (guestfs_h *g,\n"
10015 " const char *path);\n"
10020 #: ../src/guestfs-actions.pod:3512 ../src/guestfs-actions.pod:6005 ../fish/guestfish-actions.pod:2406 ../fish/guestfish-actions.pod:4019
10021 msgid "Returns file information for the given C<path>."
10025 #: ../src/guestfs-actions.pod:3514
10027 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
10028 "link, then the link is stat-ed, not the file it refers to."
10032 #: ../src/guestfs-actions.pod:3518 ../fish/guestfish-actions.pod:2412
10033 msgid "This is the same as the C<lstat(2)> system call."
10037 #: ../src/guestfs-actions.pod:3520 ../src/guestfs-actions.pod:6009
10039 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
10040 "error. I<The caller must call C<guestfs_free_stat> after use>."
10044 #: ../src/guestfs-actions.pod:3524 ../src/guestfs-actions.pod:6013 ../src/guestfs-actions.pod:6031 ../src/guestfs-actions.pod:6412
10045 msgid "(Added in 0.9.2)"
10049 #: ../src/guestfs-actions.pod:3526
10050 msgid "guestfs_lstatlist"
10054 #: ../src/guestfs-actions.pod:3528
10057 " struct guestfs_stat_list *\n"
10058 " guestfs_lstatlist (guestfs_h *g,\n"
10059 " const char *path,\n"
10060 " char *const *names);\n"
10065 #: ../src/guestfs-actions.pod:3533
10067 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
10068 "files, where all files are in the directory C<path>. C<names> is the list "
10069 "of files from this directory."
10073 #: ../src/guestfs-actions.pod:3537 ../fish/guestfish-actions.pod:2422
10075 "On return you get a list of stat structs, with a one-to-one correspondence "
10076 "to the C<names> list. If any name did not exist or could not be lstat'd, "
10077 "then the C<ino> field of that structure is set to C<-1>."
10081 #: ../src/guestfs-actions.pod:3542
10083 "This call is intended for programs that want to efficiently list a directory "
10084 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
10085 "for a similarly efficient call for getting extended attributes. Very long "
10086 "directory listings might cause the protocol message size to be exceeded, "
10087 "causing this call to fail. The caller must split up such requests into "
10088 "smaller groups of names."
10092 #: ../src/guestfs-actions.pod:3550
10094 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
10095 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
10099 #: ../src/guestfs-actions.pod:3556
10100 msgid "guestfs_luks_add_key"
10104 #: ../src/guestfs-actions.pod:3558
10108 " guestfs_luks_add_key (guestfs_h *g,\n"
10109 " const char *device,\n"
10110 " const char *key,\n"
10111 " const char *newkey,\n"
10117 #: ../src/guestfs-actions.pod:3565 ../fish/guestfish-actions.pod:2439
10119 "This command adds a new key on LUKS device C<device>. C<key> is any "
10120 "existing key, and is used to access the device. C<newkey> is the new key to "
10121 "add. C<keyslot> is the key slot that will be replaced."
10125 #: ../src/guestfs-actions.pod:3570
10127 "Note that if C<keyslot> already contains a key, then this command will "
10128 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
10132 #: ../src/guestfs-actions.pod:3576 ../src/guestfs-actions.pod:3616 ../src/guestfs-actions.pod:3639 ../src/guestfs-actions.pod:3659 ../src/guestfs-actions.pod:3691 ../src/guestfs-actions.pod:3710
10134 "This function takes a key or passphrase parameter which could contain "
10135 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
10140 #: ../src/guestfs-actions.pod:3580 ../src/guestfs-actions.pod:3620 ../src/guestfs-actions.pod:3643 ../src/guestfs-actions.pod:3663
10141 msgid "(Added in 1.5.2)"
10145 #: ../src/guestfs-actions.pod:3582
10146 msgid "guestfs_luks_close"
10150 #: ../src/guestfs-actions.pod:3584
10154 " guestfs_luks_close (guestfs_h *g,\n"
10155 " const char *device);\n"
10160 #: ../src/guestfs-actions.pod:3588
10162 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
10163 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
10164 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
10165 "underlying block device."
10169 #: ../src/guestfs-actions.pod:3596 ../src/guestfs-actions.pod:3695 ../src/guestfs-actions.pod:3714 ../src/guestfs-actions.pod:3764 ../src/guestfs-actions.pod:3812
10170 msgid "(Added in 1.5.1)"
10174 #: ../src/guestfs-actions.pod:3598
10175 msgid "guestfs_luks_format"
10179 #: ../src/guestfs-actions.pod:3600
10183 " guestfs_luks_format (guestfs_h *g,\n"
10184 " const char *device,\n"
10185 " const char *key,\n"
10191 #: ../src/guestfs-actions.pod:3606 ../fish/guestfish-actions.pod:2465
10193 "This command erases existing data on C<device> and formats the device as a "
10194 "LUKS encrypted device. C<key> is the initial key, which is added to key "
10195 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
10199 #: ../src/guestfs-actions.pod:3613 ../src/guestfs-actions.pod:3636 ../src/guestfs-actions.pod:3776 ../src/guestfs-actions.pod:4702 ../src/guestfs-actions.pod:5465 ../src/guestfs-actions.pod:5840 ../src/guestfs-actions.pod:5863 ../src/guestfs-actions.pod:5889 ../src/guestfs-actions.pod:7049 ../fish/guestfish-actions.pod:2473 ../fish/guestfish-actions.pod:2486 ../fish/guestfish-actions.pod:2570 ../fish/guestfish-actions.pod:3131 ../fish/guestfish-actions.pod:3638 ../fish/guestfish-actions.pod:3918 ../fish/guestfish-actions.pod:3934 ../fish/guestfish-actions.pod:3949 ../fish/guestfish-actions.pod:4664
10201 "B<This command is dangerous. Without careful use you can easily destroy all "
10206 #: ../src/guestfs-actions.pod:3622
10207 msgid "guestfs_luks_format_cipher"
10211 #: ../src/guestfs-actions.pod:3624
10215 " guestfs_luks_format_cipher (guestfs_h *g,\n"
10216 " const char *device,\n"
10217 " const char *key,\n"
10219 " const char *cipher);\n"
10224 #: ../src/guestfs-actions.pod:3631
10226 "This command is the same as C<guestfs_luks_format> but it also allows you to "
10227 "set the C<cipher> used."
10231 #: ../src/guestfs-actions.pod:3645
10232 msgid "guestfs_luks_kill_slot"
10236 #: ../src/guestfs-actions.pod:3647
10240 " guestfs_luks_kill_slot (guestfs_h *g,\n"
10241 " const char *device,\n"
10242 " const char *key,\n"
10248 #: ../src/guestfs-actions.pod:3653 ../fish/guestfish-actions.pod:2493
10250 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
10251 "device C<device>. C<key> must be one of the I<other> keys."
10255 #: ../src/guestfs-actions.pod:3665
10256 msgid "guestfs_luks_open"
10260 #: ../src/guestfs-actions.pod:3667
10264 " guestfs_luks_open (guestfs_h *g,\n"
10265 " const char *device,\n"
10266 " const char *key,\n"
10267 " const char *mapname);\n"
10272 #: ../src/guestfs-actions.pod:3673 ../fish/guestfish-actions.pod:2504
10274 "This command opens a block device which has been encrypted according to the "
10275 "Linux Unified Key Setup (LUKS) standard."
10279 #: ../src/guestfs-actions.pod:3676 ../fish/guestfish-actions.pod:2507
10280 msgid "C<device> is the encrypted block device or partition."
10284 #: ../src/guestfs-actions.pod:3678 ../fish/guestfish-actions.pod:2509
10286 "The caller must supply one of the keys associated with the LUKS block "
10287 "device, in the C<key> parameter."
10291 #: ../src/guestfs-actions.pod:3681 ../fish/guestfish-actions.pod:2512
10293 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
10294 "writes to this block device are decrypted from and encrypted to the "
10295 "underlying C<device> respectively."
10299 #: ../src/guestfs-actions.pod:3685
10301 "If this block device contains LVM volume groups, then calling "
10302 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
10307 #: ../src/guestfs-actions.pod:3697
10308 msgid "guestfs_luks_open_ro"
10312 #: ../src/guestfs-actions.pod:3699
10316 " guestfs_luks_open_ro (guestfs_h *g,\n"
10317 " const char *device,\n"
10318 " const char *key,\n"
10319 " const char *mapname);\n"
10324 #: ../src/guestfs-actions.pod:3705
10326 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
10331 #: ../src/guestfs-actions.pod:3716
10332 msgid "guestfs_lvcreate"
10336 #: ../src/guestfs-actions.pod:3718
10340 " guestfs_lvcreate (guestfs_h *g,\n"
10341 " const char *logvol,\n"
10342 " const char *volgroup,\n"
10348 #: ../src/guestfs-actions.pod:3724 ../fish/guestfish-actions.pod:2537
10350 "This creates an LVM logical volume called C<logvol> on the volume group "
10351 "C<volgroup>, with C<size> megabytes."
10355 #: ../src/guestfs-actions.pod:3731
10356 msgid "guestfs_lvm_canonical_lv_name"
10360 #: ../src/guestfs-actions.pod:3733
10364 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
10365 " const char *lvname);\n"
10370 #: ../src/guestfs-actions.pod:3737 ../fish/guestfish-actions.pod:2544
10372 "This converts alternative naming schemes for LVs that you might find to the "
10373 "canonical name. For example, C</dev/mapper/VG-LV> is converted to "
10378 #: ../src/guestfs-actions.pod:3741 ../fish/guestfish-actions.pod:2548
10380 "This command returns an error if the C<lvname> parameter does not refer to a "
10385 #: ../src/guestfs-actions.pod:3744
10386 msgid "See also C<guestfs_is_lv>."
10390 #: ../src/guestfs-actions.pod:3749
10391 msgid "(Added in 1.5.24)"
10395 #: ../src/guestfs-actions.pod:3751
10396 msgid "guestfs_lvm_clear_filter"
10400 #: ../src/guestfs-actions.pod:3753
10404 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
10409 #: ../src/guestfs-actions.pod:3756
10411 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
10412 "see every block device."
10416 #: ../src/guestfs-actions.pod:3759 ../src/guestfs-actions.pod:3801 ../fish/guestfish-actions.pod:2560 ../fish/guestfish-actions.pod:2591
10417 msgid "This command also clears the LVM cache and performs a volume group scan."
10421 #: ../src/guestfs-actions.pod:3766
10422 msgid "guestfs_lvm_remove_all"
10426 #: ../src/guestfs-actions.pod:3768
10430 " guestfs_lvm_remove_all (guestfs_h *g);\n"
10435 #: ../src/guestfs-actions.pod:3771 ../fish/guestfish-actions.pod:2567
10437 "This command removes all LVM logical volumes, volume groups and physical "
10442 #: ../src/guestfs-actions.pod:3781
10443 msgid "guestfs_lvm_set_filter"
10447 #: ../src/guestfs-actions.pod:3783
10451 " guestfs_lvm_set_filter (guestfs_h *g,\n"
10452 " char *const *devices);\n"
10457 #: ../src/guestfs-actions.pod:3787 ../fish/guestfish-actions.pod:2577
10459 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
10460 "block devices in the list C<devices>, and will ignore all other attached "
10465 #: ../src/guestfs-actions.pod:3791 ../fish/guestfish-actions.pod:2581
10467 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
10468 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
10469 "there are two types of duplication possible: either cloned PVs/VGs which "
10470 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
10471 "same name. In normal operation you cannot create this situation, but you "
10472 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
10473 "inside the LVM metadata."
10477 #: ../src/guestfs-actions.pod:3804 ../fish/guestfish-actions.pod:2594
10478 msgid "You can filter whole block devices or individual partitions."
10482 #: ../src/guestfs-actions.pod:3806 ../fish/guestfish-actions.pod:2596
10484 "You cannot use this if any VG is currently in use (eg. contains a mounted "
10485 "filesystem), even if you are not filtering out that VG."
10489 #: ../src/guestfs-actions.pod:3814
10490 msgid "guestfs_lvremove"
10494 #: ../src/guestfs-actions.pod:3816
10498 " guestfs_lvremove (guestfs_h *g,\n"
10499 " const char *device);\n"
10504 #: ../src/guestfs-actions.pod:3820 ../fish/guestfish-actions.pod:2604
10506 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
10507 "LV, such as C</dev/VG/LV>."
10511 #: ../src/guestfs-actions.pod:3823 ../fish/guestfish-actions.pod:2607
10513 "You can also remove all LVs in a volume group by specifying the VG name, "
10518 #: ../src/guestfs-actions.pod:3828 ../src/guestfs-actions.pod:5048 ../src/guestfs-actions.pod:6788
10519 msgid "(Added in 1.0.13)"
10523 #: ../src/guestfs-actions.pod:3830
10524 msgid "guestfs_lvrename"
10528 #: ../src/guestfs-actions.pod:3832
10532 " guestfs_lvrename (guestfs_h *g,\n"
10533 " const char *logvol,\n"
10534 " const char *newlogvol);\n"
10539 #: ../src/guestfs-actions.pod:3837 ../fish/guestfish-actions.pod:2614
10540 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
10544 #: ../src/guestfs-actions.pod:3841 ../src/guestfs-actions.pod:6801
10545 msgid "(Added in 1.0.83)"
10549 #: ../src/guestfs-actions.pod:3843
10550 msgid "guestfs_lvresize"
10554 #: ../src/guestfs-actions.pod:3845
10558 " guestfs_lvresize (guestfs_h *g,\n"
10559 " const char *device,\n"
10565 #: ../src/guestfs-actions.pod:3850 ../fish/guestfish-actions.pod:2620
10567 "This resizes (expands or shrinks) an existing LVM logical volume to "
10568 "C<mbytes>. When reducing, data in the reduced part is lost."
10572 #: ../src/guestfs-actions.pod:3858
10573 msgid "guestfs_lvresize_free"
10577 #: ../src/guestfs-actions.pod:3860
10581 " guestfs_lvresize_free (guestfs_h *g,\n"
10582 " const char *lv,\n"
10588 #: ../src/guestfs-actions.pod:3865 ../fish/guestfish-actions.pod:2628
10590 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
10591 "remaining free space in the volume group. Commonly you would call this with "
10592 "pc = 100 which expands the logical volume as much as possible, using all "
10593 "remaining free space in the volume group."
10597 #: ../src/guestfs-actions.pod:3873
10598 msgid "(Added in 1.3.3)"
10602 #: ../src/guestfs-actions.pod:3875
10603 msgid "guestfs_lvs"
10607 #: ../src/guestfs-actions.pod:3877
10611 " guestfs_lvs (guestfs_h *g);\n"
10616 #: ../src/guestfs-actions.pod:3880 ../fish/guestfish-actions.pod:2638
10618 "List all the logical volumes detected. This is the equivalent of the "
10619 "L<lvs(8)> command."
10623 #: ../src/guestfs-actions.pod:3883 ../fish/guestfish-actions.pod:2641
10625 "This returns a list of the logical volume device names "
10626 "(eg. C</dev/VolGroup00/LogVol00>)."
10630 #: ../src/guestfs-actions.pod:3886
10631 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
10635 #: ../src/guestfs-actions.pod:3894
10636 msgid "guestfs_lvs_full"
10640 #: ../src/guestfs-actions.pod:3896
10643 " struct guestfs_lvm_lv_list *\n"
10644 " guestfs_lvs_full (guestfs_h *g);\n"
10649 #: ../src/guestfs-actions.pod:3899 ../fish/guestfish-actions.pod:2650
10651 "List all the logical volumes detected. This is the equivalent of the "
10652 "L<lvs(8)> command. The \"full\" version includes all fields."
10656 #: ../src/guestfs-actions.pod:3902
10658 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
10659 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after "
10664 #: ../src/guestfs-actions.pod:3908
10665 msgid "guestfs_lvuuid"
10669 #: ../src/guestfs-actions.pod:3910
10673 " guestfs_lvuuid (guestfs_h *g,\n"
10674 " const char *device);\n"
10679 #: ../src/guestfs-actions.pod:3914 ../fish/guestfish-actions.pod:2657
10680 msgid "This command returns the UUID of the LVM LV C<device>."
10684 #: ../src/guestfs-actions.pod:3921
10685 msgid "guestfs_lxattrlist"
10689 #: ../src/guestfs-actions.pod:3923
10692 " struct guestfs_xattr_list *\n"
10693 " guestfs_lxattrlist (guestfs_h *g,\n"
10694 " const char *path,\n"
10695 " char *const *names);\n"
10700 #: ../src/guestfs-actions.pod:3928 ../fish/guestfish-actions.pod:2663
10702 "This call allows you to get the extended attributes of multiple files, where "
10703 "all files are in the directory C<path>. C<names> is the list of files from "
10708 #: ../src/guestfs-actions.pod:3932 ../fish/guestfish-actions.pod:2667
10710 "On return you get a flat list of xattr structs which must be interpreted "
10711 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
10712 "C<attrval> in this struct is zero-length to indicate there was an error "
10713 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
10714 "number (the number of following attributes for this file, which could be "
10715 "C<\"0\">). Then after the first xattr struct are the zero or more "
10716 "attributes for the first named file. This repeats for the second and "
10717 "subsequent files."
10721 #: ../src/guestfs-actions.pod:3942
10723 "This call is intended for programs that want to efficiently list a directory "
10724 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
10725 "a similarly efficient call for getting standard stats. Very long directory "
10726 "listings might cause the protocol message size to be exceeded, causing this "
10727 "call to fail. The caller must split up such requests into smaller groups of "
10732 #: ../src/guestfs-actions.pod:3956
10733 msgid "guestfs_mkdir"
10737 #: ../src/guestfs-actions.pod:3958
10741 " guestfs_mkdir (guestfs_h *g,\n"
10742 " const char *path);\n"
10747 #: ../src/guestfs-actions.pod:3962 ../fish/guestfish-actions.pod:2689
10748 msgid "Create a directory named C<path>."
10752 #: ../src/guestfs-actions.pod:3968
10753 msgid "guestfs_mkdir_mode"
10757 #: ../src/guestfs-actions.pod:3970
10761 " guestfs_mkdir_mode (guestfs_h *g,\n"
10762 " const char *path,\n"
10768 #: ../src/guestfs-actions.pod:3975 ../fish/guestfish-actions.pod:2695
10770 "This command creates a directory, setting the initial permissions of the "
10771 "directory to C<mode>."
10775 #: ../src/guestfs-actions.pod:3978 ../fish/guestfish-actions.pod:2698
10777 "For common Linux filesystems, the actual mode which is set will be C<mode & "
10778 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
10783 #: ../src/guestfs-actions.pod:3982
10784 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
10788 #: ../src/guestfs-actions.pod:3988
10789 msgid "guestfs_mkdir_p"
10793 #: ../src/guestfs-actions.pod:3990
10797 " guestfs_mkdir_p (guestfs_h *g,\n"
10798 " const char *path);\n"
10803 #: ../src/guestfs-actions.pod:3994 ../fish/guestfish-actions.pod:2708
10805 "Create a directory named C<path>, creating any parent directories as "
10806 "necessary. This is like the C<mkdir -p> shell command."
10810 #: ../src/guestfs-actions.pod:4001
10811 msgid "guestfs_mkdtemp"
10815 #: ../src/guestfs-actions.pod:4003
10819 " guestfs_mkdtemp (guestfs_h *g,\n"
10820 " const char *template);\n"
10825 #: ../src/guestfs-actions.pod:4007 ../fish/guestfish-actions.pod:2715
10827 "This command creates a temporary directory. The C<template> parameter "
10828 "should be a full pathname for the temporary directory name with the final "
10829 "six characters being \"XXXXXX\"."
10833 #: ../src/guestfs-actions.pod:4012 ../fish/guestfish-actions.pod:2720
10835 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
10836 "being suitable for Windows filesystems."
10840 #: ../src/guestfs-actions.pod:4015 ../fish/guestfish-actions.pod:2723
10841 msgid "The name of the temporary directory that was created is returned."
10845 #: ../src/guestfs-actions.pod:4018 ../fish/guestfish-actions.pod:2726
10846 msgid "The temporary directory is created with mode 0700 and is owned by root."
10850 #: ../src/guestfs-actions.pod:4021 ../fish/guestfish-actions.pod:2729
10852 "The caller is responsible for deleting the temporary directory and its "
10853 "contents after use."
10857 #: ../src/guestfs-actions.pod:4024 ../fish/guestfish-actions.pod:2732
10858 msgid "See also: L<mkdtemp(3)>"
10862 #: ../src/guestfs-actions.pod:4031
10863 msgid "guestfs_mke2fs_J"
10867 #: ../src/guestfs-actions.pod:4033
10871 " guestfs_mke2fs_J (guestfs_h *g,\n"
10872 " const char *fstype,\n"
10873 " int blocksize,\n"
10874 " const char *device,\n"
10875 " const char *journal);\n"
10880 #: ../src/guestfs-actions.pod:4040 ../fish/guestfish-actions.pod:2738
10882 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10883 "C<journal>. It is equivalent to the command:"
10887 #: ../src/guestfs-actions.pod:4044 ../fish/guestfish-actions.pod:2742
10890 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
10895 #: ../src/guestfs-actions.pod:4046
10896 msgid "See also C<guestfs_mke2journal>."
10900 #: ../src/guestfs-actions.pod:4050 ../src/guestfs-actions.pod:4068 ../src/guestfs-actions.pod:4086 ../src/guestfs-actions.pod:4102 ../src/guestfs-actions.pod:4116 ../src/guestfs-actions.pod:4130 ../src/guestfs-actions.pod:4189 ../src/guestfs-actions.pod:4438
10901 msgid "(Added in 1.0.68)"
10905 #: ../src/guestfs-actions.pod:4052
10906 msgid "guestfs_mke2fs_JL"
10910 #: ../src/guestfs-actions.pod:4054
10914 " guestfs_mke2fs_JL (guestfs_h *g,\n"
10915 " const char *fstype,\n"
10916 " int blocksize,\n"
10917 " const char *device,\n"
10918 " const char *label);\n"
10923 #: ../src/guestfs-actions.pod:4061 ../fish/guestfish-actions.pod:2750
10925 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10926 "the journal labeled C<label>."
10930 #: ../src/guestfs-actions.pod:4064
10931 msgid "See also C<guestfs_mke2journal_L>."
10935 #: ../src/guestfs-actions.pod:4070
10936 msgid "guestfs_mke2fs_JU"
10940 #: ../src/guestfs-actions.pod:4072
10944 " guestfs_mke2fs_JU (guestfs_h *g,\n"
10945 " const char *fstype,\n"
10946 " int blocksize,\n"
10947 " const char *device,\n"
10948 " const char *uuid);\n"
10953 #: ../src/guestfs-actions.pod:4079 ../fish/guestfish-actions.pod:2759
10955 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10956 "the journal with UUID C<uuid>."
10960 #: ../src/guestfs-actions.pod:4082
10961 msgid "See also C<guestfs_mke2journal_U>."
10965 #: ../src/guestfs-actions.pod:4088
10966 msgid "guestfs_mke2journal"
10970 #: ../src/guestfs-actions.pod:4090
10974 " guestfs_mke2journal (guestfs_h *g,\n"
10975 " int blocksize,\n"
10976 " const char *device);\n"
10981 #: ../src/guestfs-actions.pod:4095 ../fish/guestfish-actions.pod:2768
10983 "This creates an ext2 external journal on C<device>. It is equivalent to the "
10988 #: ../src/guestfs-actions.pod:4098 ../fish/guestfish-actions.pod:2771
10991 " mke2fs -O journal_dev -b blocksize device\n"
10996 #: ../src/guestfs-actions.pod:4104
10997 msgid "guestfs_mke2journal_L"
11001 #: ../src/guestfs-actions.pod:4106
11005 " guestfs_mke2journal_L (guestfs_h *g,\n"
11006 " int blocksize,\n"
11007 " const char *label,\n"
11008 " const char *device);\n"
11013 #: ../src/guestfs-actions.pod:4112 ../fish/guestfish-actions.pod:2777
11014 msgid "This creates an ext2 external journal on C<device> with label C<label>."
11018 #: ../src/guestfs-actions.pod:4118
11019 msgid "guestfs_mke2journal_U"
11023 #: ../src/guestfs-actions.pod:4120
11027 " guestfs_mke2journal_U (guestfs_h *g,\n"
11028 " int blocksize,\n"
11029 " const char *uuid,\n"
11030 " const char *device);\n"
11035 #: ../src/guestfs-actions.pod:4126 ../fish/guestfish-actions.pod:2783
11036 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
11040 #: ../src/guestfs-actions.pod:4132
11041 msgid "guestfs_mkfifo"
11045 #: ../src/guestfs-actions.pod:4134
11049 " guestfs_mkfifo (guestfs_h *g,\n"
11051 " const char *path);\n"
11056 #: ../src/guestfs-actions.pod:4139
11058 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
11059 "is just a convenient wrapper around C<guestfs_mknod>."
11063 #: ../src/guestfs-actions.pod:4149
11064 msgid "guestfs_mkfs"
11068 #: ../src/guestfs-actions.pod:4151
11072 " guestfs_mkfs (guestfs_h *g,\n"
11073 " const char *fstype,\n"
11074 " const char *device);\n"
11079 #: ../src/guestfs-actions.pod:4156 ../fish/guestfish-actions.pod:2799
11081 "This creates a filesystem on C<device> (usually a partition or LVM logical "
11082 "volume). The filesystem type is C<fstype>, for example C<ext3>."
11086 #: ../src/guestfs-actions.pod:4164
11087 msgid "guestfs_mkfs_b"
11091 #: ../src/guestfs-actions.pod:4166
11095 " guestfs_mkfs_b (guestfs_h *g,\n"
11096 " const char *fstype,\n"
11097 " int blocksize,\n"
11098 " const char *device);\n"
11103 #: ../src/guestfs-actions.pod:4172
11105 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
11106 "block size of the resulting filesystem. Supported block sizes depend on the "
11107 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
11111 #: ../src/guestfs-actions.pod:4177 ../src/guestfs-actions.pod:4219 ../fish/guestfish-actions.pod:2812 ../fish/guestfish-actions.pod:2839
11113 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
11118 #: ../src/guestfs-actions.pod:4182 ../fish/guestfish-actions.pod:2815
11120 "This function is deprecated. In new code, use the C<mkfs_opts> call "
11125 #: ../src/guestfs-actions.pod:4191
11126 msgid "guestfs_mkfs_opts"
11130 #: ../src/guestfs-actions.pod:4193
11134 " guestfs_mkfs_opts (guestfs_h *g,\n"
11135 " const char *fstype,\n"
11136 " const char *device,\n"
11142 #: ../src/guestfs-actions.pod:4204
11145 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
11150 #: ../src/guestfs-actions.pod:4206 ../fish/guestfish-actions.pod:2826
11152 "This function creates a filesystem on C<device>. The filesystem type is "
11153 "C<fstype>, for example C<ext3>."
11157 #: ../src/guestfs-actions.pod:4213 ../fish/guestfish-actions.pod:2833
11158 msgid "C<blocksize>"
11162 #: ../src/guestfs-actions.pod:4215 ../fish/guestfish-actions.pod:2835
11164 "The filesystem block size. Supported block sizes depend on the filesystem "
11165 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
11170 #: ../src/guestfs-actions.pod:4226
11171 msgid "guestfs_mkfs_opts_va"
11175 #: ../src/guestfs-actions.pod:4228
11179 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
11180 " const char *fstype,\n"
11181 " const char *device,\n"
11182 " va_list args);\n"
11187 #: ../src/guestfs-actions.pod:4234
11188 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
11192 #: ../src/guestfs-actions.pod:4238
11193 msgid "guestfs_mkfs_opts_argv"
11197 #: ../src/guestfs-actions.pod:4240
11201 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
11202 " const char *fstype,\n"
11203 " const char *device,\n"
11204 " const struct guestfs_mkfs_opts_argv *optargs);\n"
11209 #: ../src/guestfs-actions.pod:4246
11210 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
11214 #: ../src/guestfs-actions.pod:4250
11215 msgid "guestfs_mkmountpoint"
11219 #: ../src/guestfs-actions.pod:4252
11223 " guestfs_mkmountpoint (guestfs_h *g,\n"
11224 " const char *exemptpath);\n"
11229 #: ../src/guestfs-actions.pod:4256
11231 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
11232 "that can be used to create extra mountpoints before mounting the first "
11237 #: ../src/guestfs-actions.pod:4260 ../fish/guestfish-actions.pod:2854
11239 "These calls are I<only> necessary in some very limited circumstances, mainly "
11240 "the case where you want to mount a mix of unrelated and/or read-only "
11241 "filesystems together."
11245 #: ../src/guestfs-actions.pod:4264 ../fish/guestfish-actions.pod:2858
11247 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
11248 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
11249 "inside that. You can unpack this as follows in guestfish:"
11253 #: ../src/guestfs-actions.pod:4269 ../fish/guestfish-actions.pod:2863
11256 " add-ro Fedora-11-i686-Live.iso\n"
11258 " mkmountpoint /cd\n"
11259 " mkmountpoint /sqsh\n"
11260 " mkmountpoint /ext3fs\n"
11261 " mount /dev/sda /cd\n"
11262 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
11263 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
11268 #: ../src/guestfs-actions.pod:4278 ../fish/guestfish-actions.pod:2872
11269 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
11273 #: ../src/guestfs-actions.pod:4280
11275 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
11276 "may get unexpected errors if you try to mix these calls. It is safest to "
11277 "manually unmount filesystems and remove mountpoints after use."
11281 #: ../src/guestfs-actions.pod:4284
11283 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
11284 "first, so for this to work for manual mountpoints, you must ensure that the "
11285 "innermost mountpoints have the longest pathnames, as in the example code "
11290 #: ../src/guestfs-actions.pod:4289 ../fish/guestfish-actions.pod:2883
11291 msgid "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
11295 #: ../src/guestfs-actions.pod:4291
11297 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
11298 "means that C<guestfs_umount_all> is called when the handle is closed which "
11299 "can also trigger these issues."
11303 #: ../src/guestfs-actions.pod:4297 ../src/guestfs-actions.pod:4556 ../src/guestfs-actions.pod:5449
11304 msgid "(Added in 1.0.62)"
11308 #: ../src/guestfs-actions.pod:4299
11309 msgid "guestfs_mknod"
11313 #: ../src/guestfs-actions.pod:4301
11317 " guestfs_mknod (guestfs_h *g,\n"
11321 " const char *path);\n"
11326 #: ../src/guestfs-actions.pod:4308 ../fish/guestfish-actions.pod:2893
11328 "This call creates block or character special devices, or named pipes "
11333 #: ../src/guestfs-actions.pod:4311 ../fish/guestfish-actions.pod:2896
11335 "The C<mode> parameter should be the mode, using the standard constants. "
11336 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
11337 "used when creating block and character special devices."
11341 #: ../src/guestfs-actions.pod:4316
11343 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
11344 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
11345 "regular file). These constants are available in the standard Linux header "
11346 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
11347 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
11348 "the appropriate constant for you."
11352 #: ../src/guestfs-actions.pod:4330
11353 msgid "guestfs_mknod_b"
11357 #: ../src/guestfs-actions.pod:4332
11361 " guestfs_mknod_b (guestfs_h *g,\n"
11365 " const char *path);\n"
11370 #: ../src/guestfs-actions.pod:4339
11372 "This call creates a block device node called C<path> with mode C<mode> and "
11373 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
11374 "wrapper around C<guestfs_mknod>."
11378 #: ../src/guestfs-actions.pod:4349
11379 msgid "guestfs_mknod_c"
11383 #: ../src/guestfs-actions.pod:4351
11387 " guestfs_mknod_c (guestfs_h *g,\n"
11391 " const char *path);\n"
11396 #: ../src/guestfs-actions.pod:4358
11398 "This call creates a char device node called C<path> with mode C<mode> and "
11399 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
11400 "wrapper around C<guestfs_mknod>."
11404 #: ../src/guestfs-actions.pod:4368
11405 msgid "guestfs_mkswap"
11409 #: ../src/guestfs-actions.pod:4370
11413 " guestfs_mkswap (guestfs_h *g,\n"
11414 " const char *device);\n"
11419 #: ../src/guestfs-actions.pod:4374 ../fish/guestfish-actions.pod:2935
11420 msgid "Create a swap partition on C<device>."
11424 #: ../src/guestfs-actions.pod:4380
11425 msgid "guestfs_mkswap_L"
11429 #: ../src/guestfs-actions.pod:4382
11433 " guestfs_mkswap_L (guestfs_h *g,\n"
11434 " const char *label,\n"
11435 " const char *device);\n"
11440 #: ../src/guestfs-actions.pod:4387 ../fish/guestfish-actions.pod:2941
11441 msgid "Create a swap partition on C<device> with label C<label>."
11445 #: ../src/guestfs-actions.pod:4389 ../fish/guestfish-actions.pod:2943
11447 "Note that you cannot attach a swap label to a block device "
11448 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
11449 "the kernel or swap tools."
11453 #: ../src/guestfs-actions.pod:4397
11454 msgid "guestfs_mkswap_U"
11458 #: ../src/guestfs-actions.pod:4399
11462 " guestfs_mkswap_U (guestfs_h *g,\n"
11463 " const char *uuid,\n"
11464 " const char *device);\n"
11469 #: ../src/guestfs-actions.pod:4404 ../fish/guestfish-actions.pod:2951
11470 msgid "Create a swap partition on C<device> with UUID C<uuid>."
11474 #: ../src/guestfs-actions.pod:4410
11475 msgid "guestfs_mkswap_file"
11479 #: ../src/guestfs-actions.pod:4412
11483 " guestfs_mkswap_file (guestfs_h *g,\n"
11484 " const char *path);\n"
11489 #: ../src/guestfs-actions.pod:4416 ../fish/guestfish-actions.pod:2957
11490 msgid "Create a swap file."
11494 #: ../src/guestfs-actions.pod:4418
11496 "This command just writes a swap file signature to an existing file. To "
11497 "create the file itself, use something like C<guestfs_fallocate>."
11501 #: ../src/guestfs-actions.pod:4425
11502 msgid "guestfs_modprobe"
11506 #: ../src/guestfs-actions.pod:4427
11510 " guestfs_modprobe (guestfs_h *g,\n"
11511 " const char *modulename);\n"
11516 #: ../src/guestfs-actions.pod:4431 ../fish/guestfish-actions.pod:2966
11517 msgid "This loads a kernel module in the appliance."
11521 #: ../src/guestfs-actions.pod:4433 ../fish/guestfish-actions.pod:2968
11523 "The kernel module must have been whitelisted when libguestfs was built (see "
11524 "C<appliance/kmod.whitelist.in> in the source)."
11528 #: ../src/guestfs-actions.pod:4440
11529 msgid "guestfs_mount"
11533 #: ../src/guestfs-actions.pod:4442
11537 " guestfs_mount (guestfs_h *g,\n"
11538 " const char *device,\n"
11539 " const char *mountpoint);\n"
11544 #: ../src/guestfs-actions.pod:4447 ../fish/guestfish-actions.pod:2975
11546 "Mount a guest disk at a position in the filesystem. Block devices are named "
11547 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
11548 "those block devices contain partitions, they will have the usual names "
11549 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
11553 #: ../src/guestfs-actions.pod:4453 ../fish/guestfish-actions.pod:2981
11555 "The rules are the same as for L<mount(2)>: A filesystem must first be "
11556 "mounted on C</> before others can be mounted. Other filesystems can only be "
11557 "mounted on directories which already exist."
11561 #: ../src/guestfs-actions.pod:4458 ../fish/guestfish-actions.pod:2986
11563 "The mounted filesystem is writable, if we have sufficient permissions on the "
11564 "underlying device."
11568 #: ../src/guestfs-actions.pod:4461
11570 "B<Important note:> When you use this call, the filesystem options C<sync> "
11571 "and C<noatime> are set implicitly. This was originally done because we "
11572 "thought it would improve reliability, but it turns out that I<-o sync> has a "
11573 "very large negative performance impact and negligible effect on "
11574 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
11575 "in any code that needs performance, and instead use C<guestfs_mount_options> "
11576 "(use an empty string for the first parameter if you don't want any options)."
11580 #: ../src/guestfs-actions.pod:4475
11581 msgid "guestfs_mount_loop"
11585 #: ../src/guestfs-actions.pod:4477
11589 " guestfs_mount_loop (guestfs_h *g,\n"
11590 " const char *file,\n"
11591 " const char *mountpoint);\n"
11596 #: ../src/guestfs-actions.pod:4482 ../fish/guestfish-actions.pod:3003
11598 "This command lets you mount C<file> (a filesystem image in a file) on a "
11599 "mount point. It is entirely equivalent to the command C<mount -o loop file "
11604 #: ../src/guestfs-actions.pod:4490
11605 msgid "guestfs_mount_options"
11609 #: ../src/guestfs-actions.pod:4492
11613 " guestfs_mount_options (guestfs_h *g,\n"
11614 " const char *options,\n"
11615 " const char *device,\n"
11616 " const char *mountpoint);\n"
11621 #: ../src/guestfs-actions.pod:4498
11623 "This is the same as the C<guestfs_mount> command, but it allows you to set "
11624 "the mount options as for the L<mount(8)> I<-o> flag."
11628 #: ../src/guestfs-actions.pod:4502 ../fish/guestfish-actions.pod:3015
11630 "If the C<options> parameter is an empty string, then no options are passed "
11631 "(all options default to whatever the filesystem uses)."
11635 #: ../src/guestfs-actions.pod:4508 ../src/guestfs-actions.pod:4522 ../src/guestfs-actions.pod:4539
11636 msgid "(Added in 1.0.10)"
11640 #: ../src/guestfs-actions.pod:4510
11641 msgid "guestfs_mount_ro"
11645 #: ../src/guestfs-actions.pod:4512
11649 " guestfs_mount_ro (guestfs_h *g,\n"
11650 " const char *device,\n"
11651 " const char *mountpoint);\n"
11656 #: ../src/guestfs-actions.pod:4517
11658 "This is the same as the C<guestfs_mount> command, but it mounts the "
11659 "filesystem with the read-only (I<-o ro>) flag."
11663 #: ../src/guestfs-actions.pod:4524
11664 msgid "guestfs_mount_vfs"
11668 #: ../src/guestfs-actions.pod:4526
11672 " guestfs_mount_vfs (guestfs_h *g,\n"
11673 " const char *options,\n"
11674 " const char *vfstype,\n"
11675 " const char *device,\n"
11676 " const char *mountpoint);\n"
11681 #: ../src/guestfs-actions.pod:4533
11683 "This is the same as the C<guestfs_mount> command, but it allows you to set "
11684 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
11689 #: ../src/guestfs-actions.pod:4541
11690 msgid "guestfs_mountpoints"
11694 #: ../src/guestfs-actions.pod:4543
11698 " guestfs_mountpoints (guestfs_h *g);\n"
11703 #: ../src/guestfs-actions.pod:4546
11705 "This call is similar to C<guestfs_mounts>. That call returns a list of "
11706 "devices. This one returns a hash table (map) of device name to directory "
11707 "where the device is mounted."
11711 #: ../src/guestfs-actions.pod:4558
11712 msgid "guestfs_mounts"
11716 #: ../src/guestfs-actions.pod:4560
11720 " guestfs_mounts (guestfs_h *g);\n"
11725 #: ../src/guestfs-actions.pod:4563 ../fish/guestfish-actions.pod:3046
11727 "This returns the list of currently mounted filesystems. It returns the list "
11728 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
11732 #: ../src/guestfs-actions.pod:4566 ../fish/guestfish-actions.pod:3049
11733 msgid "Some internal mounts are not shown."
11737 #: ../src/guestfs-actions.pod:4568
11738 msgid "See also: C<guestfs_mountpoints>"
11742 #: ../src/guestfs-actions.pod:4576
11747 #: ../src/guestfs-actions.pod:4578
11751 " guestfs_mv (guestfs_h *g,\n"
11752 " const char *src,\n"
11753 " const char *dest);\n"
11758 #: ../src/guestfs-actions.pod:4583 ../fish/guestfish-actions.pod:3057
11760 "This moves a file from C<src> to C<dest> where C<dest> is either a "
11761 "destination filename or destination directory."
11765 #: ../src/guestfs-actions.pod:4590
11766 msgid "guestfs_ntfs_3g_probe"
11770 #: ../src/guestfs-actions.pod:4592
11774 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
11776 " const char *device);\n"
11781 #: ../src/guestfs-actions.pod:4597 ../fish/guestfish-actions.pod:3064
11783 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
11784 "C<device> for mountability. (Not all NTFS volumes can be mounted "
11785 "read-write, and some cannot be mounted at all)."
11789 #: ../src/guestfs-actions.pod:4601 ../fish/guestfish-actions.pod:3068
11791 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
11792 "can be mounted read-write. Set it to false if you want to test if the "
11793 "volume can be mounted read-only."
11797 #: ../src/guestfs-actions.pod:4605 ../fish/guestfish-actions.pod:3072
11799 "The return value is an integer which C<0> if the operation would succeed, or "
11800 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
11804 #: ../src/guestfs-actions.pod:4611
11805 msgid "(Added in 1.0.43)"
11809 #: ../src/guestfs-actions.pod:4613
11810 msgid "guestfs_ntfsresize"
11814 #: ../src/guestfs-actions.pod:4615
11818 " guestfs_ntfsresize (guestfs_h *g,\n"
11819 " const char *device);\n"
11824 #: ../src/guestfs-actions.pod:4619 ../fish/guestfish-actions.pod:3080
11826 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
11827 "size of the underlying device. See also L<ntfsresize(8)>."
11831 #: ../src/guestfs-actions.pod:4627
11832 msgid "guestfs_ntfsresize_size"
11836 #: ../src/guestfs-actions.pod:4629
11840 " guestfs_ntfsresize_size (guestfs_h *g,\n"
11841 " const char *device,\n"
11842 " int64_t size);\n"
11847 #: ../src/guestfs-actions.pod:4634
11849 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
11850 "to specify the new size (in bytes) explicitly."
11854 #: ../src/guestfs-actions.pod:4639 ../src/guestfs-actions.pod:5075 ../src/guestfs-actions.pod:5148 ../src/guestfs-actions.pod:5397
11855 msgid "(Added in 1.3.14)"
11859 #: ../src/guestfs-actions.pod:4641
11860 msgid "guestfs_part_add"
11864 #: ../src/guestfs-actions.pod:4643
11868 " guestfs_part_add (guestfs_h *g,\n"
11869 " const char *device,\n"
11870 " const char *prlogex,\n"
11871 " int64_t startsect,\n"
11872 " int64_t endsect);\n"
11877 #: ../src/guestfs-actions.pod:4650
11879 "This command adds a partition to C<device>. If there is no partition table "
11880 "on the device, call C<guestfs_part_init> first."
11884 #: ../src/guestfs-actions.pod:4653 ../fish/guestfish-actions.pod:3098
11886 "The C<prlogex> parameter is the type of partition. Normally you should pass "
11887 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
11888 "C<logical>) and C<e> (or C<extended>) partition types."
11892 #: ../src/guestfs-actions.pod:4658 ../fish/guestfish-actions.pod:3103
11894 "C<startsect> and C<endsect> are the start and end of the partition in "
11895 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
11896 "from the end of the disk (C<-1> is the last sector)."
11900 #: ../src/guestfs-actions.pod:4662
11902 "Creating a partition which covers the whole disk is not so easy. Use "
11903 "C<guestfs_part_disk> to do that."
11907 #: ../src/guestfs-actions.pod:4667 ../src/guestfs-actions.pod:4705 ../src/guestfs-actions.pod:4758 ../src/guestfs-actions.pod:4836 ../src/guestfs-actions.pod:4874 ../src/guestfs-actions.pod:4893 ../src/guestfs-actions.pod:4933
11908 msgid "(Added in 1.0.78)"
11912 #: ../src/guestfs-actions.pod:4669
11913 msgid "guestfs_part_del"
11917 #: ../src/guestfs-actions.pod:4671
11921 " guestfs_part_del (guestfs_h *g,\n"
11922 " const char *device,\n"
11928 #: ../src/guestfs-actions.pod:4676 ../fish/guestfish-actions.pod:3114
11929 msgid "This command deletes the partition numbered C<partnum> on C<device>."
11933 #: ../src/guestfs-actions.pod:4678 ../fish/guestfish-actions.pod:3116
11935 "Note that in the case of MBR partitioning, deleting an extended partition "
11936 "also deletes any logical partitions it contains."
11940 #: ../src/guestfs-actions.pod:4686
11941 msgid "guestfs_part_disk"
11945 #: ../src/guestfs-actions.pod:4688
11949 " guestfs_part_disk (guestfs_h *g,\n"
11950 " const char *device,\n"
11951 " const char *parttype);\n"
11956 #: ../src/guestfs-actions.pod:4693
11958 "This command is simply a combination of C<guestfs_part_init> followed by "
11959 "C<guestfs_part_add> to create a single primary partition covering the whole "
11964 #: ../src/guestfs-actions.pod:4697
11966 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
11967 "possible values are described in C<guestfs_part_init>."
11971 #: ../src/guestfs-actions.pod:4707
11972 msgid "guestfs_part_get_bootable"
11976 #: ../src/guestfs-actions.pod:4709
11980 " guestfs_part_get_bootable (guestfs_h *g,\n"
11981 " const char *device,\n"
11987 #: ../src/guestfs-actions.pod:4714 ../fish/guestfish-actions.pod:3138
11989 "This command returns true if the partition C<partnum> on C<device> has the "
11990 "bootable flag set."
11994 #: ../src/guestfs-actions.pod:4717
11995 msgid "See also C<guestfs_part_set_bootable>."
11999 #: ../src/guestfs-actions.pod:4723
12000 msgid "guestfs_part_get_mbr_id"
12004 #: ../src/guestfs-actions.pod:4725
12008 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
12009 " const char *device,\n"
12015 #: ../src/guestfs-actions.pod:4730 ../fish/guestfish-actions.pod:3147
12017 "Returns the MBR type byte (also known as the ID byte) from the numbered "
12018 "partition C<partnum>."
12022 #: ../src/guestfs-actions.pod:4733 ../src/guestfs-actions.pod:4909
12024 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
12025 "undefined results for other partition table types (see "
12026 "C<guestfs_part_get_parttype>)."
12030 #: ../src/guestfs-actions.pod:4741
12031 msgid "guestfs_part_get_parttype"
12035 #: ../src/guestfs-actions.pod:4743
12039 " guestfs_part_get_parttype (guestfs_h *g,\n"
12040 " const char *device);\n"
12045 #: ../src/guestfs-actions.pod:4747 ../fish/guestfish-actions.pod:3158
12047 "This command examines the partition table on C<device> and returns the "
12048 "partition table type (format) being used."
12052 #: ../src/guestfs-actions.pod:4750
12054 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
12055 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
12056 "possible, although unusual. See C<guestfs_part_init> for a full list."
12060 #: ../src/guestfs-actions.pod:4760
12061 msgid "guestfs_part_init"
12065 #: ../src/guestfs-actions.pod:4762
12069 " guestfs_part_init (guestfs_h *g,\n"
12070 " const char *device,\n"
12071 " const char *parttype);\n"
12076 #: ../src/guestfs-actions.pod:4767 ../fish/guestfish-actions.pod:3170
12078 "This creates an empty partition table on C<device> of one of the partition "
12079 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
12080 "(for large disks)."
12084 #: ../src/guestfs-actions.pod:4771
12086 "Initially there are no partitions. Following this, you should call "
12087 "C<guestfs_part_add> for each partition required."
12091 #: ../src/guestfs-actions.pod:4774 ../fish/guestfish-actions.pod:3177
12092 msgid "Possible values for C<parttype> are:"
12096 #: ../src/guestfs-actions.pod:4778 ../fish/guestfish-actions.pod:3181
12097 msgid "B<efi> | B<gpt>"
12101 #: ../src/guestfs-actions.pod:4780 ../fish/guestfish-actions.pod:3183
12102 msgid "Intel EFI / GPT partition table."
12106 #: ../src/guestfs-actions.pod:4782 ../fish/guestfish-actions.pod:3185
12108 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
12109 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
12110 "the C<mbr> format."
12114 #: ../src/guestfs-actions.pod:4786 ../fish/guestfish-actions.pod:3189
12115 msgid "B<mbr> | B<msdos>"
12119 #: ../src/guestfs-actions.pod:4788 ../fish/guestfish-actions.pod:3191
12121 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
12122 "Windows. This partition type will B<only> work for device sizes up to 2 "
12123 "TB. For large disks we recommend using C<gpt>."
12127 #: ../src/guestfs-actions.pod:4795 ../fish/guestfish-actions.pod:3198
12128 msgid "Other partition table types that may work but are not supported include:"
12132 #: ../src/guestfs-actions.pod:4800 ../fish/guestfish-actions.pod:3203
12137 #: ../src/guestfs-actions.pod:4802 ../fish/guestfish-actions.pod:3205
12138 msgid "AIX disk labels."
12142 #: ../src/guestfs-actions.pod:4804 ../fish/guestfish-actions.pod:3207
12143 msgid "B<amiga> | B<rdb>"
12147 #: ../src/guestfs-actions.pod:4806 ../fish/guestfish-actions.pod:3209
12148 msgid "Amiga \"Rigid Disk Block\" format."
12152 #: ../src/guestfs-actions.pod:4808 ../fish/guestfish-actions.pod:3211
12157 #: ../src/guestfs-actions.pod:4810 ../fish/guestfish-actions.pod:3213
12158 msgid "BSD disk labels."
12162 #: ../src/guestfs-actions.pod:4812 ../fish/guestfish-actions.pod:3215
12167 #: ../src/guestfs-actions.pod:4814 ../fish/guestfish-actions.pod:3217
12168 msgid "DASD, used on IBM mainframes."
12172 #: ../src/guestfs-actions.pod:4816 ../fish/guestfish-actions.pod:3219
12177 #: ../src/guestfs-actions.pod:4818 ../fish/guestfish-actions.pod:3221
12178 msgid "MIPS/SGI volumes."
12182 #: ../src/guestfs-actions.pod:4820 ../fish/guestfish-actions.pod:3223
12187 #: ../src/guestfs-actions.pod:4822 ../fish/guestfish-actions.pod:3225
12188 msgid "Old Mac partition format. Modern Macs use C<gpt>."
12192 #: ../src/guestfs-actions.pod:4824 ../fish/guestfish-actions.pod:3227
12197 #: ../src/guestfs-actions.pod:4826 ../fish/guestfish-actions.pod:3229
12198 msgid "NEC PC-98 format, common in Japan apparently."
12202 #: ../src/guestfs-actions.pod:4828 ../fish/guestfish-actions.pod:3231
12207 #: ../src/guestfs-actions.pod:4830 ../fish/guestfish-actions.pod:3233
12208 msgid "Sun disk labels."
12212 #: ../src/guestfs-actions.pod:4838
12213 msgid "guestfs_part_list"
12217 #: ../src/guestfs-actions.pod:4840
12220 " struct guestfs_partition_list *\n"
12221 " guestfs_part_list (guestfs_h *g,\n"
12222 " const char *device);\n"
12227 #: ../src/guestfs-actions.pod:4844 ../fish/guestfish-actions.pod:3241
12229 "This command parses the partition table on C<device> and returns the list of "
12230 "partitions found."
12234 #: ../src/guestfs-actions.pod:4847 ../fish/guestfish-actions.pod:3244
12235 msgid "The fields in the returned structure are:"
12239 #: ../src/guestfs-actions.pod:4851 ../fish/guestfish-actions.pod:3248
12240 msgid "B<part_num>"
12244 #: ../src/guestfs-actions.pod:4853 ../fish/guestfish-actions.pod:3250
12245 msgid "Partition number, counting from 1."
12249 #: ../src/guestfs-actions.pod:4855 ../fish/guestfish-actions.pod:3252
12250 msgid "B<part_start>"
12254 #: ../src/guestfs-actions.pod:4857
12256 "Start of the partition I<in bytes>. To get sectors you have to divide by "
12257 "the device's sector size, see C<guestfs_blockdev_getss>."
12261 #: ../src/guestfs-actions.pod:4860 ../fish/guestfish-actions.pod:3257
12262 msgid "B<part_end>"
12266 #: ../src/guestfs-actions.pod:4862 ../fish/guestfish-actions.pod:3259
12267 msgid "End of the partition in bytes."
12271 #: ../src/guestfs-actions.pod:4864 ../fish/guestfish-actions.pod:3261
12272 msgid "B<part_size>"
12276 #: ../src/guestfs-actions.pod:4866 ../fish/guestfish-actions.pod:3263
12277 msgid "Size of the partition in bytes."
12281 #: ../src/guestfs-actions.pod:4870
12283 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
12284 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
12289 #: ../src/guestfs-actions.pod:4876
12290 msgid "guestfs_part_set_bootable"
12294 #: ../src/guestfs-actions.pod:4878
12298 " guestfs_part_set_bootable (guestfs_h *g,\n"
12299 " const char *device,\n"
12301 " int bootable);\n"
12306 #: ../src/guestfs-actions.pod:4884 ../fish/guestfish-actions.pod:3271
12308 "This sets the bootable flag on partition numbered C<partnum> on device "
12309 "C<device>. Note that partitions are numbered from 1."
12313 #: ../src/guestfs-actions.pod:4887 ../fish/guestfish-actions.pod:3274
12315 "The bootable flag is used by some operating systems (notably Windows) to "
12316 "determine which partition to boot from. It is by no means universally "
12321 #: ../src/guestfs-actions.pod:4895
12322 msgid "guestfs_part_set_mbr_id"
12326 #: ../src/guestfs-actions.pod:4897
12330 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
12331 " const char *device,\n"
12338 #: ../src/guestfs-actions.pod:4903 ../fish/guestfish-actions.pod:3282
12340 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
12341 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
12342 "documentation are in fact hexadecimal numbers, but usually documented "
12343 "without any leading \"0x\" which might be confusing."
12347 #: ../src/guestfs-actions.pod:4917
12348 msgid "guestfs_part_set_name"
12352 #: ../src/guestfs-actions.pod:4919
12356 " guestfs_part_set_name (guestfs_h *g,\n"
12357 " const char *device,\n"
12359 " const char *name);\n"
12364 #: ../src/guestfs-actions.pod:4925 ../fish/guestfish-actions.pod:3296
12366 "This sets the partition name on partition numbered C<partnum> on device "
12367 "C<device>. Note that partitions are numbered from 1."
12371 #: ../src/guestfs-actions.pod:4928 ../fish/guestfish-actions.pod:3299
12373 "The partition name can only be set on certain types of partition table. "
12374 "This works on C<gpt> but not on C<mbr> partitions."
12378 #: ../src/guestfs-actions.pod:4935
12379 msgid "guestfs_part_to_dev"
12383 #: ../src/guestfs-actions.pod:4937
12387 " guestfs_part_to_dev (guestfs_h *g,\n"
12388 " const char *partition);\n"
12393 #: ../src/guestfs-actions.pod:4941 ../fish/guestfish-actions.pod:3306
12395 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
12396 "partition number, returning the device name (eg. \"/dev/sdb\")."
12400 #: ../src/guestfs-actions.pod:4945
12402 "The named partition must exist, for example as a string returned from "
12403 "C<guestfs_list_partitions>."
12407 #: ../src/guestfs-actions.pod:4953
12408 msgid "guestfs_ping_daemon"
12412 #: ../src/guestfs-actions.pod:4955
12416 " guestfs_ping_daemon (guestfs_h *g);\n"
12421 #: ../src/guestfs-actions.pod:4958 ../fish/guestfish-actions.pod:3317
12423 "This is a test probe into the guestfs daemon running inside the qemu "
12424 "subprocess. Calling this function checks that the daemon responds to the "
12425 "ping message, without affecting the daemon or attached block device(s) in "
12430 #: ../src/guestfs-actions.pod:4967
12431 msgid "guestfs_pread"
12435 #: ../src/guestfs-actions.pod:4969
12439 " guestfs_pread (guestfs_h *g,\n"
12440 " const char *path,\n"
12442 " int64_t offset,\n"
12443 " size_t *size_r);\n"
12448 #: ../src/guestfs-actions.pod:4976 ../fish/guestfish-actions.pod:3326
12450 "This command lets you read part of a file. It reads C<count> bytes of the "
12451 "file, starting at C<offset>, from file C<path>."
12455 #: ../src/guestfs-actions.pod:4979 ../src/guestfs-actions.pod:5005 ../fish/guestfish-actions.pod:3329 ../fish/guestfish-actions.pod:3344
12457 "This may read fewer bytes than requested. For further details see the "
12458 "L<pread(2)> system call."
12462 #: ../src/guestfs-actions.pod:4982
12463 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
12467 #: ../src/guestfs-actions.pod:4993
12468 msgid "guestfs_pread_device"
12472 #: ../src/guestfs-actions.pod:4995
12476 " guestfs_pread_device (guestfs_h *g,\n"
12477 " const char *device,\n"
12479 " int64_t offset,\n"
12480 " size_t *size_r);\n"
12485 #: ../src/guestfs-actions.pod:5002 ../fish/guestfish-actions.pod:3341
12487 "This command lets you read part of a file. It reads C<count> bytes of "
12488 "C<device>, starting at C<offset>."
12492 #: ../src/guestfs-actions.pod:5008
12493 msgid "See also C<guestfs_pread>."
12497 #: ../src/guestfs-actions.pod:5017
12498 msgid "(Added in 1.5.21)"
12502 #: ../src/guestfs-actions.pod:5019
12503 msgid "guestfs_pvcreate"
12507 #: ../src/guestfs-actions.pod:5021
12511 " guestfs_pvcreate (guestfs_h *g,\n"
12512 " const char *device);\n"
12517 #: ../src/guestfs-actions.pod:5025 ../fish/guestfish-actions.pod:3356
12519 "This creates an LVM physical volume on the named C<device>, where C<device> "
12520 "should usually be a partition name such as C</dev/sda1>."
12524 #: ../src/guestfs-actions.pod:5033
12525 msgid "guestfs_pvremove"
12529 #: ../src/guestfs-actions.pod:5035
12533 " guestfs_pvremove (guestfs_h *g,\n"
12534 " const char *device);\n"
12539 #: ../src/guestfs-actions.pod:5039 ../fish/guestfish-actions.pod:3364
12541 "This wipes a physical volume C<device> so that LVM will no longer recognise "
12546 #: ../src/guestfs-actions.pod:5042 ../fish/guestfish-actions.pod:3367
12548 "The implementation uses the C<pvremove> command which refuses to wipe "
12549 "physical volumes that contain any volume groups, so you have to remove those "
12554 #: ../src/guestfs-actions.pod:5050
12555 msgid "guestfs_pvresize"
12559 #: ../src/guestfs-actions.pod:5052
12563 " guestfs_pvresize (guestfs_h *g,\n"
12564 " const char *device);\n"
12569 #: ../src/guestfs-actions.pod:5056 ../fish/guestfish-actions.pod:3375
12571 "This resizes (expands or shrinks) an existing LVM physical volume to match "
12572 "the new size of the underlying device."
12576 #: ../src/guestfs-actions.pod:5063
12577 msgid "guestfs_pvresize_size"
12581 #: ../src/guestfs-actions.pod:5065
12585 " guestfs_pvresize_size (guestfs_h *g,\n"
12586 " const char *device,\n"
12587 " int64_t size);\n"
12592 #: ../src/guestfs-actions.pod:5070
12594 "This command is the same as C<guestfs_pvresize> except that it allows you to "
12595 "specify the new size (in bytes) explicitly."
12599 #: ../src/guestfs-actions.pod:5077
12600 msgid "guestfs_pvs"
12604 #: ../src/guestfs-actions.pod:5079
12608 " guestfs_pvs (guestfs_h *g);\n"
12613 #: ../src/guestfs-actions.pod:5082 ../fish/guestfish-actions.pod:3389
12615 "List all the physical volumes detected. This is the equivalent of the "
12616 "L<pvs(8)> command."
12620 #: ../src/guestfs-actions.pod:5085 ../fish/guestfish-actions.pod:3392
12622 "This returns a list of just the device names that contain PVs "
12623 "(eg. C</dev/sda2>)."
12627 #: ../src/guestfs-actions.pod:5088
12628 msgid "See also C<guestfs_pvs_full>."
12632 #: ../src/guestfs-actions.pod:5096
12633 msgid "guestfs_pvs_full"
12637 #: ../src/guestfs-actions.pod:5098
12640 " struct guestfs_lvm_pv_list *\n"
12641 " guestfs_pvs_full (guestfs_h *g);\n"
12646 #: ../src/guestfs-actions.pod:5101 ../fish/guestfish-actions.pod:3401
12648 "List all the physical volumes detected. This is the equivalent of the "
12649 "L<pvs(8)> command. The \"full\" version includes all fields."
12653 #: ../src/guestfs-actions.pod:5104
12655 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
12656 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after "
12661 #: ../src/guestfs-actions.pod:5110
12662 msgid "guestfs_pvuuid"
12666 #: ../src/guestfs-actions.pod:5112
12670 " guestfs_pvuuid (guestfs_h *g,\n"
12671 " const char *device);\n"
12676 #: ../src/guestfs-actions.pod:5116 ../fish/guestfish-actions.pod:3408
12677 msgid "This command returns the UUID of the LVM PV C<device>."
12681 #: ../src/guestfs-actions.pod:5123
12682 msgid "guestfs_pwrite"
12686 #: ../src/guestfs-actions.pod:5125
12690 " guestfs_pwrite (guestfs_h *g,\n"
12691 " const char *path,\n"
12692 " const char *content,\n"
12693 " size_t content_size,\n"
12694 " int64_t offset);\n"
12699 #: ../src/guestfs-actions.pod:5132 ../fish/guestfish-actions.pod:3414
12701 "This command writes to part of a file. It writes the data buffer C<content> "
12702 "to the file C<path> starting at offset C<offset>."
12706 #: ../src/guestfs-actions.pod:5135 ../fish/guestfish-actions.pod:3417
12708 "This command implements the L<pwrite(2)> system call, and like that system "
12709 "call it may not write the full data requested. The return value is the "
12710 "number of bytes that were actually written to the file. This could even be "
12711 "0, although short writes are unlikely for regular files in ordinary "
12716 #: ../src/guestfs-actions.pod:5141
12717 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
12721 #: ../src/guestfs-actions.pod:5150
12722 msgid "guestfs_pwrite_device"
12726 #: ../src/guestfs-actions.pod:5152
12730 " guestfs_pwrite_device (guestfs_h *g,\n"
12731 " const char *device,\n"
12732 " const char *content,\n"
12733 " size_t content_size,\n"
12734 " int64_t offset);\n"
12739 #: ../src/guestfs-actions.pod:5159 ../fish/guestfish-actions.pod:3432
12741 "This command writes to part of a device. It writes the data buffer "
12742 "C<content> to C<device> starting at offset C<offset>."
12746 #: ../src/guestfs-actions.pod:5162 ../fish/guestfish-actions.pod:3435
12748 "This command implements the L<pwrite(2)> system call, and like that system "
12749 "call it may not write the full data requested (although short writes to disk "
12750 "devices and partitions are probably impossible with standard Linux kernels)."
12754 #: ../src/guestfs-actions.pod:5167
12755 msgid "See also C<guestfs_pwrite>."
12759 #: ../src/guestfs-actions.pod:5174
12760 msgid "(Added in 1.5.20)"
12764 #: ../src/guestfs-actions.pod:5176
12765 msgid "guestfs_read_file"
12769 #: ../src/guestfs-actions.pod:5178
12773 " guestfs_read_file (guestfs_h *g,\n"
12774 " const char *path,\n"
12775 " size_t *size_r);\n"
12780 #: ../src/guestfs-actions.pod:5183 ../fish/guestfish-actions.pod:3449
12781 msgid "This calls returns the contents of the file C<path> as a buffer."
12785 #: ../src/guestfs-actions.pod:5186
12787 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
12788 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
12789 "function is limited in the total size of file that can be handled."
12793 #: ../src/guestfs-actions.pod:5198
12794 msgid "(Added in 1.0.63)"
12798 #: ../src/guestfs-actions.pod:5200
12799 msgid "guestfs_read_lines"
12803 #: ../src/guestfs-actions.pod:5202
12807 " guestfs_read_lines (guestfs_h *g,\n"
12808 " const char *path);\n"
12813 #: ../src/guestfs-actions.pod:5208 ../fish/guestfish-actions.pod:3466
12815 "The file contents are returned as a list of lines. Trailing C<LF> and "
12816 "C<CRLF> character sequences are I<not> returned."
12820 #: ../src/guestfs-actions.pod:5211
12822 "Note that this function cannot correctly handle binary files (specifically, "
12823 "files containing C<\\0> character which is treated as end of line). For "
12824 "those you need to use the C<guestfs_read_file> function which has a more "
12825 "complex interface."
12829 #: ../src/guestfs-actions.pod:5222
12830 msgid "guestfs_readdir"
12834 #: ../src/guestfs-actions.pod:5224
12837 " struct guestfs_dirent_list *\n"
12838 " guestfs_readdir (guestfs_h *g,\n"
12839 " const char *dir);\n"
12844 #: ../src/guestfs-actions.pod:5228 ../fish/guestfish-actions.pod:3478
12845 msgid "This returns the list of directory entries in directory C<dir>."
12849 #: ../src/guestfs-actions.pod:5230 ../fish/guestfish-actions.pod:3480
12851 "All entries in the directory are returned, including C<.> and C<..>. The "
12852 "entries are I<not> sorted, but returned in the same order as the underlying "
12857 #: ../src/guestfs-actions.pod:5234 ../fish/guestfish-actions.pod:3484
12859 "Also this call returns basic file type information about each file. The "
12860 "C<ftyp> field will contain one of the following characters:"
12864 #: ../src/guestfs-actions.pod:5239 ../fish/guestfish-actions.pod:3489
12869 #: ../src/guestfs-actions.pod:5241 ../fish/guestfish-actions.pod:3491
12870 msgid "Block special"
12874 #: ../src/guestfs-actions.pod:5243 ../fish/guestfish-actions.pod:3493
12879 #: ../src/guestfs-actions.pod:5245 ../fish/guestfish-actions.pod:3495
12880 msgid "Char special"
12884 #: ../src/guestfs-actions.pod:5247 ../fish/guestfish-actions.pod:3497
12889 #: ../src/guestfs-actions.pod:5249 ../fish/guestfish-actions.pod:3499
12894 #: ../src/guestfs-actions.pod:5251 ../fish/guestfish-actions.pod:3501
12899 #: ../src/guestfs-actions.pod:5253 ../fish/guestfish-actions.pod:3503
12900 msgid "FIFO (named pipe)"
12904 #: ../src/guestfs-actions.pod:5255 ../fish/guestfish-actions.pod:3505
12909 #: ../src/guestfs-actions.pod:5257 ../fish/guestfish-actions.pod:3507
12910 msgid "Symbolic link"
12914 #: ../src/guestfs-actions.pod:5259 ../fish/guestfish-actions.pod:3509
12919 #: ../src/guestfs-actions.pod:5261 ../fish/guestfish-actions.pod:3511
12920 msgid "Regular file"
12924 #: ../src/guestfs-actions.pod:5263 ../fish/guestfish-actions.pod:3513
12929 #: ../src/guestfs-actions.pod:5265 ../fish/guestfish-actions.pod:3515
12934 #: ../src/guestfs-actions.pod:5267 ../fish/guestfish-actions.pod:3517
12939 #: ../src/guestfs-actions.pod:5269 ../fish/guestfish-actions.pod:3519
12940 msgid "Unknown file type"
12944 #: ../src/guestfs-actions.pod:5271 ../fish/guestfish-actions.pod:3521
12949 #: ../src/guestfs-actions.pod:5273 ../fish/guestfish-actions.pod:3523
12950 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
12954 #: ../src/guestfs-actions.pod:5278
12956 "This function is primarily intended for use by programs. To get a simple "
12957 "list of names, use C<guestfs_ls>. To get a printable directory for human "
12958 "consumption, use C<guestfs_ll>."
12962 #: ../src/guestfs-actions.pod:5282
12964 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
12965 "was an error. I<The caller must call C<guestfs_free_dirent_list> after "
12970 #: ../src/guestfs-actions.pod:5288
12971 msgid "guestfs_readlink"
12975 #: ../src/guestfs-actions.pod:5290
12979 " guestfs_readlink (guestfs_h *g,\n"
12980 " const char *path);\n"
12985 #: ../src/guestfs-actions.pod:5294 ../fish/guestfish-actions.pod:3536
12986 msgid "This command reads the target of a symbolic link."
12990 #: ../src/guestfs-actions.pod:5301
12991 msgid "guestfs_readlinklist"
12995 #: ../src/guestfs-actions.pod:5303
12999 " guestfs_readlinklist (guestfs_h *g,\n"
13000 " const char *path,\n"
13001 " char *const *names);\n"
13006 #: ../src/guestfs-actions.pod:5308 ../fish/guestfish-actions.pod:3542
13008 "This call allows you to do a C<readlink> operation on multiple files, where "
13009 "all files are in the directory C<path>. C<names> is the list of files from "
13014 #: ../src/guestfs-actions.pod:5312 ../fish/guestfish-actions.pod:3546
13016 "On return you get a list of strings, with a one-to-one correspondence to the "
13017 "C<names> list. Each string is the value of the symbolic link."
13021 #: ../src/guestfs-actions.pod:5316 ../fish/guestfish-actions.pod:3550
13023 "If the C<readlink(2)> operation fails on any name, then the corresponding "
13024 "result string is the empty string C<\"\">. However the whole operation is "
13025 "completed even if there were C<readlink(2)> errors, and so you can call this "
13026 "function with names where you don't know if they are symbolic links already "
13027 "(albeit slightly less efficient)."
13031 #: ../src/guestfs-actions.pod:5323 ../fish/guestfish-actions.pod:3557
13033 "This call is intended for programs that want to efficiently list a directory "
13034 "contents without making many round-trips. Very long directory listings "
13035 "might cause the protocol message size to be exceeded, causing this call to "
13036 "fail. The caller must split up such requests into smaller groups of names."
13040 #: ../src/guestfs-actions.pod:5336
13041 msgid "guestfs_realpath"
13045 #: ../src/guestfs-actions.pod:5338
13049 " guestfs_realpath (guestfs_h *g,\n"
13050 " const char *path);\n"
13055 #: ../src/guestfs-actions.pod:5342 ../fish/guestfish-actions.pod:3568
13057 "Return the canonicalized absolute pathname of C<path>. The returned path "
13058 "has no C<.>, C<..> or symbolic link path elements."
13062 #: ../src/guestfs-actions.pod:5350
13063 msgid "guestfs_removexattr"
13067 #: ../src/guestfs-actions.pod:5352
13071 " guestfs_removexattr (guestfs_h *g,\n"
13072 " const char *xattr,\n"
13073 " const char *path);\n"
13078 #: ../src/guestfs-actions.pod:5357 ../fish/guestfish-actions.pod:3575
13079 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
13083 #: ../src/guestfs-actions.pod:5360
13084 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
13088 #: ../src/guestfs-actions.pod:5366
13089 msgid "guestfs_resize2fs"
13093 #: ../src/guestfs-actions.pod:5368
13097 " guestfs_resize2fs (guestfs_h *g,\n"
13098 " const char *device);\n"
13103 #: ../src/guestfs-actions.pod:5372 ../fish/guestfish-actions.pod:3584
13105 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
13106 "underlying device."
13110 #: ../src/guestfs-actions.pod:5375
13112 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
13113 "C<device> before calling this command. For unknown reasons C<resize2fs> "
13114 "sometimes gives an error about this and sometimes not. In any case, it is "
13115 "always safe to call C<guestfs_e2fsck_f> before calling this function."
13119 #: ../src/guestfs-actions.pod:5385
13120 msgid "guestfs_resize2fs_size"
13124 #: ../src/guestfs-actions.pod:5387
13128 " guestfs_resize2fs_size (guestfs_h *g,\n"
13129 " const char *device,\n"
13130 " int64_t size);\n"
13135 #: ../src/guestfs-actions.pod:5392
13137 "This command is the same as C<guestfs_resize2fs> except that it allows you "
13138 "to specify the new size (in bytes) explicitly."
13142 #: ../src/guestfs-actions.pod:5399
13147 #: ../src/guestfs-actions.pod:5401
13151 " guestfs_rm (guestfs_h *g,\n"
13152 " const char *path);\n"
13157 #: ../src/guestfs-actions.pod:5405 ../fish/guestfish-actions.pod:3604
13158 msgid "Remove the single file C<path>."
13162 #: ../src/guestfs-actions.pod:5411
13163 msgid "guestfs_rm_rf"
13167 #: ../src/guestfs-actions.pod:5413
13171 " guestfs_rm_rf (guestfs_h *g,\n"
13172 " const char *path);\n"
13177 #: ../src/guestfs-actions.pod:5417 ../fish/guestfish-actions.pod:3610
13179 "Remove the file or directory C<path>, recursively removing the contents if "
13180 "its a directory. This is like the C<rm -rf> shell command."
13184 #: ../src/guestfs-actions.pod:5425
13185 msgid "guestfs_rmdir"
13189 #: ../src/guestfs-actions.pod:5427
13193 " guestfs_rmdir (guestfs_h *g,\n"
13194 " const char *path);\n"
13199 #: ../src/guestfs-actions.pod:5431 ../fish/guestfish-actions.pod:3618
13200 msgid "Remove the single directory C<path>."
13204 #: ../src/guestfs-actions.pod:5437
13205 msgid "guestfs_rmmountpoint"
13209 #: ../src/guestfs-actions.pod:5439
13213 " guestfs_rmmountpoint (guestfs_h *g,\n"
13214 " const char *exemptpath);\n"
13219 #: ../src/guestfs-actions.pod:5443
13221 "This calls removes a mountpoint that was previously created with "
13222 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
13226 #: ../src/guestfs-actions.pod:5451
13227 msgid "guestfs_scrub_device"
13231 #: ../src/guestfs-actions.pod:5453
13235 " guestfs_scrub_device (guestfs_h *g,\n"
13236 " const char *device);\n"
13241 #: ../src/guestfs-actions.pod:5457 ../fish/guestfish-actions.pod:3632
13243 "This command writes patterns over C<device> to make data retrieval more "
13248 #: ../src/guestfs-actions.pod:5460 ../src/guestfs-actions.pod:5481 ../src/guestfs-actions.pod:5500 ../fish/guestfish-actions.pod:3635 ../fish/guestfish-actions.pod:3650 ../fish/guestfish-actions.pod:3663
13250 "It is an interface to the L<scrub(1)> program. See that manual page for "
13255 #: ../src/guestfs-actions.pod:5468 ../src/guestfs-actions.pod:5486 ../src/guestfs-actions.pod:5505
13256 msgid "(Added in 1.0.52)"
13260 #: ../src/guestfs-actions.pod:5470
13261 msgid "guestfs_scrub_file"
13265 #: ../src/guestfs-actions.pod:5472
13269 " guestfs_scrub_file (guestfs_h *g,\n"
13270 " const char *file);\n"
13275 #: ../src/guestfs-actions.pod:5476 ../fish/guestfish-actions.pod:3645
13277 "This command writes patterns over a file to make data retrieval more "
13282 #: ../src/guestfs-actions.pod:5479 ../fish/guestfish-actions.pod:3648
13283 msgid "The file is I<removed> after scrubbing."
13287 #: ../src/guestfs-actions.pod:5488
13288 msgid "guestfs_scrub_freespace"
13292 #: ../src/guestfs-actions.pod:5490
13296 " guestfs_scrub_freespace (guestfs_h *g,\n"
13297 " const char *dir);\n"
13302 #: ../src/guestfs-actions.pod:5494
13304 "This command creates the directory C<dir> and then fills it with files until "
13305 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
13306 "and deletes them. The intention is to scrub any free space on the partition "
13307 "containing C<dir>."
13311 #: ../src/guestfs-actions.pod:5507
13312 msgid "guestfs_set_append"
13316 #: ../src/guestfs-actions.pod:5509
13320 " guestfs_set_append (guestfs_h *g,\n"
13321 " const char *append);\n"
13326 #: ../src/guestfs-actions.pod:5513 ../fish/guestfish-actions.pod:3672
13328 "This function is used to add additional options to the guest kernel command "
13333 #: ../src/guestfs-actions.pod:5516 ../fish/guestfish-actions.pod:3675
13335 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
13336 "environment variable."
13340 #: ../src/guestfs-actions.pod:5519 ../fish/guestfish-actions.pod:3678
13342 "Setting C<append> to C<NULL> means I<no> additional options are passed "
13343 "(libguestfs always adds a few of its own)."
13347 #: ../src/guestfs-actions.pod:5526
13348 msgid "guestfs_set_autosync"
13352 #: ../src/guestfs-actions.pod:5528
13356 " guestfs_set_autosync (guestfs_h *g,\n"
13357 " int autosync);\n"
13362 #: ../src/guestfs-actions.pod:5532
13364 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
13365 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
13366 "the handle is closed (also if the program exits without closing handles)."
13370 #: ../src/guestfs-actions.pod:5537 ../fish/guestfish-actions.pod:3692
13372 "This is enabled by default (since libguestfs 1.5.24, previously it was "
13373 "disabled by default)."
13377 #: ../src/guestfs-actions.pod:5544
13378 msgid "guestfs_set_direct"
13382 #: ../src/guestfs-actions.pod:5546
13386 " guestfs_set_direct (guestfs_h *g,\n"
13392 #: ../src/guestfs-actions.pod:5550 ../fish/guestfish-actions.pod:3701
13394 "If the direct appliance mode flag is enabled, then stdin and stdout are "
13395 "passed directly through to the appliance once it is launched."
13399 #: ../src/guestfs-actions.pod:5554
13401 "One consequence of this is that log messages aren't caught by the library "
13402 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
13407 #: ../src/guestfs-actions.pod:5558 ../fish/guestfish-actions.pod:3709
13408 msgid "You probably don't want to use this unless you know what you are doing."
13412 #: ../src/guestfs-actions.pod:5561 ../fish/guestfish-actions.pod:3712
13413 msgid "The default is disabled."
13417 #: ../src/guestfs-actions.pod:5567
13418 msgid "guestfs_set_e2label"
13422 #: ../src/guestfs-actions.pod:5569
13426 " guestfs_set_e2label (guestfs_h *g,\n"
13427 " const char *device,\n"
13428 " const char *label);\n"
13433 #: ../src/guestfs-actions.pod:5574 ../fish/guestfish-actions.pod:3718
13435 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
13436 "C<label>. Filesystem labels are limited to 16 characters."
13440 #: ../src/guestfs-actions.pod:5578
13442 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
13443 "the existing label on a filesystem."
13447 #: ../src/guestfs-actions.pod:5585
13448 msgid "guestfs_set_e2uuid"
13452 #: ../src/guestfs-actions.pod:5587
13456 " guestfs_set_e2uuid (guestfs_h *g,\n"
13457 " const char *device,\n"
13458 " const char *uuid);\n"
13463 #: ../src/guestfs-actions.pod:5592 ../fish/guestfish-actions.pod:3729
13465 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
13466 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
13467 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
13471 #: ../src/guestfs-actions.pod:5597
13473 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
13474 "the existing UUID of a filesystem."
13478 #: ../src/guestfs-actions.pod:5604
13479 msgid "guestfs_set_memsize"
13483 #: ../src/guestfs-actions.pod:5606
13487 " guestfs_set_memsize (guestfs_h *g,\n"
13493 #: ../src/guestfs-actions.pod:5610
13495 "This sets the memory size in megabytes allocated to the qemu subprocess. "
13496 "This only has any effect if called before C<guestfs_launch>."
13500 #: ../src/guestfs-actions.pod:5614 ../fish/guestfish-actions.pod:3747
13502 "You can also change this by setting the environment variable "
13503 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
13507 #: ../src/guestfs-actions.pod:5625
13508 msgid "guestfs_set_network"
13512 #: ../src/guestfs-actions.pod:5627
13516 " guestfs_set_network (guestfs_h *g,\n"
13522 #: ../src/guestfs-actions.pod:5631 ../fish/guestfish-actions.pod:3760
13524 "If C<network> is true, then the network is enabled in the libguestfs "
13525 "appliance. The default is false."
13529 #: ../src/guestfs-actions.pod:5634 ../fish/guestfish-actions.pod:3763
13531 "This affects whether commands are able to access the network (see "
13532 "L<guestfs(3)/RUNNING COMMANDS>)."
13536 #: ../src/guestfs-actions.pod:5637
13538 "You must call this before calling C<guestfs_launch>, otherwise it has no "
13543 #: ../src/guestfs-actions.pod:5644
13544 msgid "guestfs_set_path"
13548 #: ../src/guestfs-actions.pod:5646
13552 " guestfs_set_path (guestfs_h *g,\n"
13553 " const char *searchpath);\n"
13558 #: ../src/guestfs-actions.pod:5650 ../fish/guestfish-actions.pod:3775
13559 msgid "Set the path that libguestfs searches for kernel and initrd.img."
13563 #: ../src/guestfs-actions.pod:5652 ../fish/guestfish-actions.pod:3777
13565 "The default is C<$libdir/guestfs> unless overridden by setting "
13566 "C<LIBGUESTFS_PATH> environment variable."
13570 #: ../src/guestfs-actions.pod:5655 ../fish/guestfish-actions.pod:3780
13571 msgid "Setting C<path> to C<NULL> restores the default path."
13575 #: ../src/guestfs-actions.pod:5661
13576 msgid "guestfs_set_qemu"
13580 #: ../src/guestfs-actions.pod:5663
13584 " guestfs_set_qemu (guestfs_h *g,\n"
13585 " const char *qemu);\n"
13590 #: ../src/guestfs-actions.pod:5667 ../fish/guestfish-actions.pod:3788
13591 msgid "Set the qemu binary that we will use."
13595 #: ../src/guestfs-actions.pod:5669 ../fish/guestfish-actions.pod:3790
13596 msgid "The default is chosen when the library was compiled by the configure script."
13600 #: ../src/guestfs-actions.pod:5672 ../fish/guestfish-actions.pod:3793
13602 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
13607 #: ../src/guestfs-actions.pod:5675 ../fish/guestfish-actions.pod:3796
13608 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
13612 #: ../src/guestfs-actions.pod:5677 ../fish/guestfish-actions.pod:3798
13614 "Note that you should call this function as early as possible after creating "
13615 "the handle. This is because some pre-launch operations depend on testing "
13616 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
13617 "don't retest features, and so you might see inconsistent results. Using the "
13618 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
13619 "the qemu binary at the same time as the handle is created."
13623 #: ../src/guestfs-actions.pod:5689
13624 msgid "guestfs_set_recovery_proc"
13628 #: ../src/guestfs-actions.pod:5691
13632 " guestfs_set_recovery_proc (guestfs_h *g,\n"
13633 " int recoveryproc);\n"
13638 #: ../src/guestfs-actions.pod:5695
13640 "If this is called with the parameter C<false> then C<guestfs_launch> does "
13641 "not create a recovery process. The purpose of the recovery process is to "
13642 "stop runaway qemu processes in the case where the main program aborts "
13647 #: ../src/guestfs-actions.pod:5700
13649 "This only has any effect if called before C<guestfs_launch>, and the default "
13654 #: ../src/guestfs-actions.pod:5703 ../fish/guestfish-actions.pod:3820
13656 "About the only time when you would want to disable this is if the main "
13657 "process will fork itself into the background (\"daemonize\" itself). In "
13658 "this case the recovery process thinks that the main program has disappeared "
13659 "and so kills qemu, which is not very helpful."
13663 #: ../src/guestfs-actions.pod:5713
13664 msgid "guestfs_set_selinux"
13668 #: ../src/guestfs-actions.pod:5715
13672 " guestfs_set_selinux (guestfs_h *g,\n"
13678 #: ../src/guestfs-actions.pod:5719 ../fish/guestfish-actions.pod:3832
13680 "This sets the selinux flag that is passed to the appliance at boot time. "
13681 "The default is C<selinux=0> (disabled)."
13685 #: ../src/guestfs-actions.pod:5722 ../fish/guestfish-actions.pod:3835
13687 "Note that if SELinux is enabled, it is always in Permissive mode "
13688 "(C<enforcing=0>)."
13692 #: ../src/guestfs-actions.pod:5732
13693 msgid "guestfs_set_trace"
13697 #: ../src/guestfs-actions.pod:5734
13701 " guestfs_set_trace (guestfs_h *g,\n"
13707 #: ../src/guestfs-actions.pod:5738 ../fish/guestfish-actions.pod:3847
13709 "If the command trace flag is set to 1, then commands are printed on stderr "
13710 "before they are executed in a format which is very similar to the one used "
13711 "by guestfish. In other words, you can run a program with this enabled, and "
13712 "you will get out a script which you can feed to guestfish to perform the "
13713 "same set of actions."
13717 #: ../src/guestfs-actions.pod:5745 ../fish/guestfish-actions.pod:3854
13719 "If you want to trace C API calls into libguestfs (and other libraries) then "
13720 "possibly a better way is to use the external ltrace(1) command."
13724 #: ../src/guestfs-actions.pod:5749 ../fish/guestfish-actions.pod:3858
13726 "Command traces are disabled unless the environment variable "
13727 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
13731 #: ../src/guestfs-actions.pod:5756
13732 msgid "guestfs_set_verbose"
13736 #: ../src/guestfs-actions.pod:5758
13740 " guestfs_set_verbose (guestfs_h *g,\n"
13746 #: ../src/guestfs-actions.pod:5762 ../fish/guestfish-actions.pod:3867
13747 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
13751 #: ../src/guestfs-actions.pod:5764 ../fish/guestfish-actions.pod:3869
13753 "Verbose messages are disabled unless the environment variable "
13754 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
13758 #: ../src/guestfs-actions.pod:5771
13759 msgid "guestfs_setcon"
13763 #: ../src/guestfs-actions.pod:5773
13767 " guestfs_setcon (guestfs_h *g,\n"
13768 " const char *context);\n"
13773 #: ../src/guestfs-actions.pod:5777 ../fish/guestfish-actions.pod:3876
13775 "This sets the SELinux security context of the daemon to the string "
13780 #: ../src/guestfs-actions.pod:5780 ../fish/guestfish-actions.pod:3879
13781 msgid "See the documentation about SELINUX in L<guestfs(3)>."
13785 #: ../src/guestfs-actions.pod:5786
13786 msgid "guestfs_setxattr"
13790 #: ../src/guestfs-actions.pod:5788
13794 " guestfs_setxattr (guestfs_h *g,\n"
13795 " const char *xattr,\n"
13796 " const char *val,\n"
13798 " const char *path);\n"
13803 #: ../src/guestfs-actions.pod:5795 ../fish/guestfish-actions.pod:3885
13805 "This call sets the extended attribute named C<xattr> of the file C<path> to "
13806 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
13810 #: ../src/guestfs-actions.pod:5799
13811 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
13815 #: ../src/guestfs-actions.pod:5805
13816 msgid "guestfs_sfdisk"
13820 #: ../src/guestfs-actions.pod:5807
13824 " guestfs_sfdisk (guestfs_h *g,\n"
13825 " const char *device,\n"
13829 " char *const *lines);\n"
13834 #: ../src/guestfs-actions.pod:5815 ../fish/guestfish-actions.pod:3895
13836 "This is a direct interface to the L<sfdisk(8)> program for creating "
13837 "partitions on block devices."
13841 #: ../src/guestfs-actions.pod:5818 ../fish/guestfish-actions.pod:3898
13842 msgid "C<device> should be a block device, for example C</dev/sda>."
13846 #: ../src/guestfs-actions.pod:5820 ../fish/guestfish-actions.pod:3900
13848 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
13849 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
13850 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
13851 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
13852 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
13853 "the kernel) cannot work out the right geometry and you will need to tell it."
13857 #: ../src/guestfs-actions.pod:5828 ../fish/guestfish-actions.pod:3908
13859 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
13860 "refer to the L<sfdisk(8)> manpage."
13864 #: ../src/guestfs-actions.pod:5831 ../fish/guestfish-actions.pod:3911
13866 "To create a single partition occupying the whole disk, you would pass "
13867 "C<lines> as a single element list, when the single element being the string "
13872 #: ../src/guestfs-actions.pod:5835
13873 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
13877 #: ../src/guestfs-actions.pod:5845
13878 msgid "guestfs_sfdiskM"
13882 #: ../src/guestfs-actions.pod:5847
13886 " guestfs_sfdiskM (guestfs_h *g,\n"
13887 " const char *device,\n"
13888 " char *const *lines);\n"
13893 #: ../src/guestfs-actions.pod:5852
13895 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
13896 "partition sizes are specified in megabytes only (rounded to the nearest "
13897 "cylinder) and you don't need to specify the cyls, heads and sectors "
13898 "parameters which were rarely if ever used anyway."
13902 #: ../src/guestfs-actions.pod:5858
13904 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
13905 "C<guestfs_part_disk>"
13909 #: ../src/guestfs-actions.pod:5868
13910 msgid "guestfs_sfdisk_N"
13914 #: ../src/guestfs-actions.pod:5870
13918 " guestfs_sfdisk_N (guestfs_h *g,\n"
13919 " const char *device,\n"
13924 " const char *line);\n"
13929 #: ../src/guestfs-actions.pod:5879 ../fish/guestfish-actions.pod:3941
13931 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
13932 "(note: C<n> counts from 1)."
13936 #: ../src/guestfs-actions.pod:5882
13938 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
13939 "for the cyls/heads/sectors parameters."
13943 #: ../src/guestfs-actions.pod:5885
13944 msgid "See also: C<guestfs_part_add>"
13948 #: ../src/guestfs-actions.pod:5894
13949 msgid "guestfs_sfdisk_disk_geometry"
13953 #: ../src/guestfs-actions.pod:5896
13957 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
13958 " const char *device);\n"
13963 #: ../src/guestfs-actions.pod:5900
13965 "This displays the disk geometry of C<device> read from the partition table. "
13966 "Especially in the case where the underlying block device has been resized, "
13967 "this can be different from the kernel's idea of the geometry (see "
13968 "C<guestfs_sfdisk_kernel_geometry>)."
13972 #: ../src/guestfs-actions.pod:5905 ../src/guestfs-actions.pod:5921 ../fish/guestfish-actions.pod:3961 ../fish/guestfish-actions.pod:3970
13973 msgid "The result is in human-readable format, and not designed to be parsed."
13977 #: ../src/guestfs-actions.pod:5913
13978 msgid "guestfs_sfdisk_kernel_geometry"
13982 #: ../src/guestfs-actions.pod:5915
13986 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
13987 " const char *device);\n"
13992 #: ../src/guestfs-actions.pod:5919 ../fish/guestfish-actions.pod:3968
13993 msgid "This displays the kernel's idea of the geometry of C<device>."
13997 #: ../src/guestfs-actions.pod:5929
13998 msgid "guestfs_sfdisk_l"
14002 #: ../src/guestfs-actions.pod:5931
14006 " guestfs_sfdisk_l (guestfs_h *g,\n"
14007 " const char *device);\n"
14012 #: ../src/guestfs-actions.pod:5935 ../fish/guestfish-actions.pod:3977
14014 "This displays the partition table on C<device>, in the human-readable output "
14015 "of the L<sfdisk(8)> command. It is not intended to be parsed."
14019 #: ../src/guestfs-actions.pod:5939
14020 msgid "See also: C<guestfs_part_list>"
14024 #: ../src/guestfs-actions.pod:5946
14029 #: ../src/guestfs-actions.pod:5948
14033 " guestfs_sh (guestfs_h *g,\n"
14034 " const char *command);\n"
14039 #: ../src/guestfs-actions.pod:5952 ../fish/guestfish-actions.pod:3987
14041 "This call runs a command from the guest filesystem via the guest's "
14046 #: ../src/guestfs-actions.pod:5955
14047 msgid "This is like C<guestfs_command>, but passes the command to:"
14051 #: ../src/guestfs-actions.pod:5957 ../fish/guestfish-actions.pod:3992
14054 " /bin/sh -c \"command\"\n"
14059 #: ../src/guestfs-actions.pod:5959 ../fish/guestfish-actions.pod:3994
14061 "Depending on the guest's shell, this usually results in wildcards being "
14062 "expanded, shell expressions being interpolated and so on."
14066 #: ../src/guestfs-actions.pod:5963
14067 msgid "All the provisos about C<guestfs_command> apply to this call."
14071 #: ../src/guestfs-actions.pod:5970
14072 msgid "guestfs_sh_lines"
14076 #: ../src/guestfs-actions.pod:5972
14080 " guestfs_sh_lines (guestfs_h *g,\n"
14081 " const char *command);\n"
14086 #: ../src/guestfs-actions.pod:5976
14088 "This is the same as C<guestfs_sh>, but splits the result into a list of "
14093 #: ../src/guestfs-actions.pod:5979
14094 msgid "See also: C<guestfs_command_lines>"
14098 #: ../src/guestfs-actions.pod:5987
14099 msgid "guestfs_sleep"
14103 #: ../src/guestfs-actions.pod:5989
14107 " guestfs_sleep (guestfs_h *g,\n"
14113 #: ../src/guestfs-actions.pod:5993 ../fish/guestfish-actions.pod:4013
14114 msgid "Sleep for C<secs> seconds."
14118 #: ../src/guestfs-actions.pod:5997
14119 msgid "(Added in 1.0.41)"
14123 #: ../src/guestfs-actions.pod:5999 ../src/guestfs-structs.pod:109
14124 msgid "guestfs_stat"
14128 #: ../src/guestfs-actions.pod:6001
14131 " struct guestfs_stat *\n"
14132 " guestfs_stat (guestfs_h *g,\n"
14133 " const char *path);\n"
14138 #: ../src/guestfs-actions.pod:6007 ../fish/guestfish-actions.pod:4021
14139 msgid "This is the same as the C<stat(2)> system call."
14143 #: ../src/guestfs-actions.pod:6015 ../src/guestfs-structs.pod:135
14144 msgid "guestfs_statvfs"
14148 #: ../src/guestfs-actions.pod:6017
14151 " struct guestfs_statvfs *\n"
14152 " guestfs_statvfs (guestfs_h *g,\n"
14153 " const char *path);\n"
14158 #: ../src/guestfs-actions.pod:6021 ../fish/guestfish-actions.pod:4027
14160 "Returns file system statistics for any mounted file system. C<path> should "
14161 "be a file or directory in the mounted file system (typically it is the mount "
14162 "point itself, but it doesn't need to be)."
14166 #: ../src/guestfs-actions.pod:6025 ../fish/guestfish-actions.pod:4031
14167 msgid "This is the same as the C<statvfs(2)> system call."
14171 #: ../src/guestfs-actions.pod:6027
14173 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
14174 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
14178 #: ../src/guestfs-actions.pod:6033
14179 msgid "guestfs_strings"
14183 #: ../src/guestfs-actions.pod:6035
14187 " guestfs_strings (guestfs_h *g,\n"
14188 " const char *path);\n"
14193 #: ../src/guestfs-actions.pod:6039 ../fish/guestfish-actions.pod:4037
14195 "This runs the L<strings(1)> command on a file and returns the list of "
14196 "printable strings found."
14200 #: ../src/guestfs-actions.pod:6051
14201 msgid "guestfs_strings_e"
14205 #: ../src/guestfs-actions.pod:6053
14209 " guestfs_strings_e (guestfs_h *g,\n"
14210 " const char *encoding,\n"
14211 " const char *path);\n"
14216 #: ../src/guestfs-actions.pod:6058
14218 "This is like the C<guestfs_strings> command, but allows you to specify the "
14219 "encoding of strings that are looked for in the source file C<path>."
14223 #: ../src/guestfs-actions.pod:6062 ../fish/guestfish-actions.pod:4051
14224 msgid "Allowed encodings are:"
14228 #: ../src/guestfs-actions.pod:6066 ../fish/guestfish-actions.pod:4055
14233 #: ../src/guestfs-actions.pod:6068
14235 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
14236 "ISO-8859-X (this is what C<guestfs_strings> uses)."
14240 #: ../src/guestfs-actions.pod:6071 ../fish/guestfish-actions.pod:4060
14245 #: ../src/guestfs-actions.pod:6073 ../fish/guestfish-actions.pod:4062
14246 msgid "Single 8-bit-byte characters."
14250 #: ../src/guestfs-actions.pod:6075 ../fish/guestfish-actions.pod:4064
14255 #: ../src/guestfs-actions.pod:6077 ../fish/guestfish-actions.pod:4066
14256 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
14260 #: ../src/guestfs-actions.pod:6080 ../fish/guestfish-actions.pod:4069
14261 msgid "l (lower case letter L)"
14265 #: ../src/guestfs-actions.pod:6082 ../fish/guestfish-actions.pod:4071
14267 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
14268 "examining binaries in Windows guests."
14272 #: ../src/guestfs-actions.pod:6085 ../fish/guestfish-actions.pod:4074
14277 #: ../src/guestfs-actions.pod:6087 ../fish/guestfish-actions.pod:4076
14278 msgid "32-bit big endian such as UCS-4BE."
14282 #: ../src/guestfs-actions.pod:6089 ../fish/guestfish-actions.pod:4078
14287 #: ../src/guestfs-actions.pod:6091 ../fish/guestfish-actions.pod:4080
14288 msgid "32-bit little endian such as UCS-4LE."
14292 #: ../src/guestfs-actions.pod:6095 ../fish/guestfish-actions.pod:4084
14293 msgid "The returned strings are transcoded to UTF-8."
14297 #: ../src/guestfs-actions.pod:6106
14298 msgid "guestfs_swapoff_device"
14302 #: ../src/guestfs-actions.pod:6108
14306 " guestfs_swapoff_device (guestfs_h *g,\n"
14307 " const char *device);\n"
14312 #: ../src/guestfs-actions.pod:6112
14314 "This command disables the libguestfs appliance swap device or partition "
14315 "named C<device>. See C<guestfs_swapon_device>."
14319 #: ../src/guestfs-actions.pod:6120
14320 msgid "guestfs_swapoff_file"
14324 #: ../src/guestfs-actions.pod:6122
14328 " guestfs_swapoff_file (guestfs_h *g,\n"
14329 " const char *file);\n"
14334 #: ../src/guestfs-actions.pod:6126 ../fish/guestfish-actions.pod:4101
14335 msgid "This command disables the libguestfs appliance swap on file."
14339 #: ../src/guestfs-actions.pod:6132
14340 msgid "guestfs_swapoff_label"
14344 #: ../src/guestfs-actions.pod:6134
14348 " guestfs_swapoff_label (guestfs_h *g,\n"
14349 " const char *label);\n"
14354 #: ../src/guestfs-actions.pod:6138 ../fish/guestfish-actions.pod:4107
14356 "This command disables the libguestfs appliance swap on labeled swap "
14361 #: ../src/guestfs-actions.pod:6145
14362 msgid "guestfs_swapoff_uuid"
14366 #: ../src/guestfs-actions.pod:6147
14370 " guestfs_swapoff_uuid (guestfs_h *g,\n"
14371 " const char *uuid);\n"
14376 #: ../src/guestfs-actions.pod:6151 ../fish/guestfish-actions.pod:4114
14378 "This command disables the libguestfs appliance swap partition with the given "
14383 #: ../src/guestfs-actions.pod:6158
14384 msgid "guestfs_swapon_device"
14388 #: ../src/guestfs-actions.pod:6160
14392 " guestfs_swapon_device (guestfs_h *g,\n"
14393 " const char *device);\n"
14398 #: ../src/guestfs-actions.pod:6164
14400 "This command enables the libguestfs appliance to use the swap device or "
14401 "partition named C<device>. The increased memory is made available for all "
14402 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
14406 #: ../src/guestfs-actions.pod:6169 ../fish/guestfish-actions.pod:4126
14408 "Note that you should not swap to existing guest swap partitions unless you "
14409 "know what you are doing. They may contain hibernation information, or other "
14410 "information that the guest doesn't want you to trash. You also risk leaking "
14411 "information about the host to the guest this way. Instead, attach a new "
14412 "host device to the guest and swap on that."
14416 #: ../src/guestfs-actions.pod:6180
14417 msgid "guestfs_swapon_file"
14421 #: ../src/guestfs-actions.pod:6182
14425 " guestfs_swapon_file (guestfs_h *g,\n"
14426 " const char *file);\n"
14431 #: ../src/guestfs-actions.pod:6186
14433 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
14438 #: ../src/guestfs-actions.pod:6193
14439 msgid "guestfs_swapon_label"
14443 #: ../src/guestfs-actions.pod:6195
14447 " guestfs_swapon_label (guestfs_h *g,\n"
14448 " const char *label);\n"
14453 #: ../src/guestfs-actions.pod:6199
14455 "This command enables swap to a labeled swap partition. See "
14456 "C<guestfs_swapon_device> for other notes."
14460 #: ../src/guestfs-actions.pod:6206
14461 msgid "guestfs_swapon_uuid"
14465 #: ../src/guestfs-actions.pod:6208
14469 " guestfs_swapon_uuid (guestfs_h *g,\n"
14470 " const char *uuid);\n"
14475 #: ../src/guestfs-actions.pod:6212
14477 "This command enables swap to a swap partition with the given UUID. See "
14478 "C<guestfs_swapon_device> for other notes."
14482 #: ../src/guestfs-actions.pod:6219
14483 msgid "guestfs_sync"
14487 #: ../src/guestfs-actions.pod:6221
14491 " guestfs_sync (guestfs_h *g);\n"
14496 #: ../src/guestfs-actions.pod:6224 ../fish/guestfish-actions.pod:4158
14498 "This syncs the disk, so that any writes are flushed through to the "
14499 "underlying disk image."
14503 #: ../src/guestfs-actions.pod:6227 ../fish/guestfish-actions.pod:4161
14505 "You should always call this if you have modified a disk image, before "
14506 "closing the handle."
14510 #: ../src/guestfs-actions.pod:6234
14511 msgid "guestfs_tail"
14515 #: ../src/guestfs-actions.pod:6236
14519 " guestfs_tail (guestfs_h *g,\n"
14520 " const char *path);\n"
14525 #: ../src/guestfs-actions.pod:6240 ../fish/guestfish-actions.pod:4168
14526 msgid "This command returns up to the last 10 lines of a file as a list of strings."
14530 #: ../src/guestfs-actions.pod:6252
14531 msgid "guestfs_tail_n"
14535 #: ../src/guestfs-actions.pod:6254
14539 " guestfs_tail_n (guestfs_h *g,\n"
14541 " const char *path);\n"
14546 #: ../src/guestfs-actions.pod:6259 ../fish/guestfish-actions.pod:4178
14548 "If the parameter C<nrlines> is a positive number, this returns the last "
14549 "C<nrlines> lines of the file C<path>."
14553 #: ../src/guestfs-actions.pod:6262 ../fish/guestfish-actions.pod:4181
14555 "If the parameter C<nrlines> is a negative number, this returns lines from "
14556 "the file C<path>, starting with the C<-nrlines>th line."
14560 #: ../src/guestfs-actions.pod:6276
14561 msgid "guestfs_tar_in"
14565 #: ../src/guestfs-actions.pod:6278
14569 " guestfs_tar_in (guestfs_h *g,\n"
14570 " const char *tarfile,\n"
14571 " const char *directory);\n"
14576 #: ../src/guestfs-actions.pod:6283 ../fish/guestfish-actions.pod:4193
14578 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
14579 "tar file) into C<directory>."
14583 #: ../src/guestfs-actions.pod:6286
14584 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
14588 #: ../src/guestfs-actions.pod:6291 ../src/guestfs-actions.pod:6308 ../src/guestfs-actions.pod:6324 ../src/guestfs-actions.pod:6340
14589 msgid "(Added in 1.0.3)"
14593 #: ../src/guestfs-actions.pod:6293
14594 msgid "guestfs_tar_out"
14598 #: ../src/guestfs-actions.pod:6295
14602 " guestfs_tar_out (guestfs_h *g,\n"
14603 " const char *directory,\n"
14604 " const char *tarfile);\n"
14609 #: ../src/guestfs-actions.pod:6300 ../fish/guestfish-actions.pod:4205
14611 "This command packs the contents of C<directory> and downloads it to local "
14616 #: ../src/guestfs-actions.pod:6303
14618 "To download a compressed tarball, use C<guestfs_tgz_out> or "
14619 "C<guestfs_txz_out>."
14623 #: ../src/guestfs-actions.pod:6310
14624 msgid "guestfs_tgz_in"
14628 #: ../src/guestfs-actions.pod:6312
14632 " guestfs_tgz_in (guestfs_h *g,\n"
14633 " const char *tarball,\n"
14634 " const char *directory);\n"
14639 #: ../src/guestfs-actions.pod:6317 ../fish/guestfish-actions.pod:4217
14641 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
14642 "tar file) into C<directory>."
14646 #: ../src/guestfs-actions.pod:6320
14647 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
14651 #: ../src/guestfs-actions.pod:6326
14652 msgid "guestfs_tgz_out"
14656 #: ../src/guestfs-actions.pod:6328
14660 " guestfs_tgz_out (guestfs_h *g,\n"
14661 " const char *directory,\n"
14662 " const char *tarball);\n"
14667 #: ../src/guestfs-actions.pod:6333 ../fish/guestfish-actions.pod:4228
14669 "This command packs the contents of C<directory> and downloads it to local "
14674 #: ../src/guestfs-actions.pod:6336
14675 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
14679 #: ../src/guestfs-actions.pod:6342
14680 msgid "guestfs_touch"
14684 #: ../src/guestfs-actions.pod:6344
14688 " guestfs_touch (guestfs_h *g,\n"
14689 " const char *path);\n"
14694 #: ../src/guestfs-actions.pod:6348 ../fish/guestfish-actions.pod:4239
14696 "Touch acts like the L<touch(1)> command. It can be used to update the "
14697 "timestamps on a file, or, if the file does not exist, to create a new "
14698 "zero-length file."
14702 #: ../src/guestfs-actions.pod:6352 ../fish/guestfish-actions.pod:4243
14704 "This command only works on regular files, and will fail on other file types "
14705 "such as directories, symbolic links, block special etc."
14709 #: ../src/guestfs-actions.pod:6359
14710 msgid "guestfs_truncate"
14714 #: ../src/guestfs-actions.pod:6361
14718 " guestfs_truncate (guestfs_h *g,\n"
14719 " const char *path);\n"
14724 #: ../src/guestfs-actions.pod:6365 ../fish/guestfish-actions.pod:4250
14726 "This command truncates C<path> to a zero-length file. The file must exist "
14731 #: ../src/guestfs-actions.pod:6372
14732 msgid "guestfs_truncate_size"
14736 #: ../src/guestfs-actions.pod:6374
14740 " guestfs_truncate_size (guestfs_h *g,\n"
14741 " const char *path,\n"
14742 " int64_t size);\n"
14747 #: ../src/guestfs-actions.pod:6379 ../fish/guestfish-actions.pod:4257
14749 "This command truncates C<path> to size C<size> bytes. The file must exist "
14754 #: ../src/guestfs-actions.pod:6382
14756 "If the current file size is less than C<size> then the file is extended to "
14757 "the required size with zero bytes. This creates a sparse file (ie. disk "
14758 "blocks are not allocated for the file until you write to it). To create a "
14759 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
14763 #: ../src/guestfs-actions.pod:6392
14764 msgid "guestfs_tune2fs_l"
14768 #: ../src/guestfs-actions.pod:6394
14772 " guestfs_tune2fs_l (guestfs_h *g,\n"
14773 " const char *device);\n"
14778 #: ../src/guestfs-actions.pod:6398 ../fish/guestfish-actions.pod:4270
14780 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
14785 #: ../src/guestfs-actions.pod:6401 ../fish/guestfish-actions.pod:4273
14787 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
14788 "for more details. The list of fields returned isn't clearly defined, and "
14789 "depends on both the version of C<tune2fs> that libguestfs was built against, "
14790 "and the filesystem itself."
14794 #: ../src/guestfs-actions.pod:6414
14795 msgid "guestfs_txz_in"
14799 #: ../src/guestfs-actions.pod:6416
14803 " guestfs_txz_in (guestfs_h *g,\n"
14804 " const char *tarball,\n"
14805 " const char *directory);\n"
14810 #: ../src/guestfs-actions.pod:6421 ../fish/guestfish-actions.pod:4282
14812 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
14813 "tar file) into C<directory>."
14817 #: ../src/guestfs-actions.pod:6428
14818 msgid "guestfs_txz_out"
14822 #: ../src/guestfs-actions.pod:6430
14826 " guestfs_txz_out (guestfs_h *g,\n"
14827 " const char *directory,\n"
14828 " const char *tarball);\n"
14833 #: ../src/guestfs-actions.pod:6435 ../fish/guestfish-actions.pod:4291
14835 "This command packs the contents of C<directory> and downloads it to local "
14836 "file C<tarball> (as an xz compressed tar archive)."
14840 #: ../src/guestfs-actions.pod:6442
14841 msgid "guestfs_umask"
14845 #: ../src/guestfs-actions.pod:6444
14849 " guestfs_umask (guestfs_h *g,\n"
14855 #: ../src/guestfs-actions.pod:6448 ../fish/guestfish-actions.pod:4300
14857 "This function sets the mask used for creating new files and device nodes to "
14862 #: ../src/guestfs-actions.pod:6451 ../fish/guestfish-actions.pod:4303
14864 "Typical umask values would be C<022> which creates new files with "
14865 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
14866 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
14870 #: ../src/guestfs-actions.pod:6456 ../fish/guestfish-actions.pod:4308
14872 "The default umask is C<022>. This is important because it means that "
14873 "directories and device nodes will be created with C<0644> or C<0755> mode "
14874 "even if you specify C<0777>."
14878 #: ../src/guestfs-actions.pod:6460
14880 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
14881 "C<guestfs_mkdir>."
14885 #: ../src/guestfs-actions.pod:6463 ../fish/guestfish-actions.pod:4315
14886 msgid "This call returns the previous umask."
14890 #: ../src/guestfs-actions.pod:6469
14891 msgid "guestfs_umount"
14895 #: ../src/guestfs-actions.pod:6471
14899 " guestfs_umount (guestfs_h *g,\n"
14900 " const char *pathordevice);\n"
14905 #: ../src/guestfs-actions.pod:6475 ../fish/guestfish-actions.pod:4323
14907 "This unmounts the given filesystem. The filesystem may be specified either "
14908 "by its mountpoint (path) or the device which contains the filesystem."
14912 #: ../src/guestfs-actions.pod:6483
14913 msgid "guestfs_umount_all"
14917 #: ../src/guestfs-actions.pod:6485
14921 " guestfs_umount_all (guestfs_h *g);\n"
14926 #: ../src/guestfs-actions.pod:6488 ../fish/guestfish-actions.pod:4333
14927 msgid "This unmounts all mounted filesystems."
14931 #: ../src/guestfs-actions.pod:6490 ../fish/guestfish-actions.pod:4335
14932 msgid "Some internal mounts are not unmounted by this call."
14936 #: ../src/guestfs-actions.pod:6496
14937 msgid "guestfs_upload"
14941 #: ../src/guestfs-actions.pod:6498
14945 " guestfs_upload (guestfs_h *g,\n"
14946 " const char *filename,\n"
14947 " const char *remotefilename);\n"
14952 #: ../src/guestfs-actions.pod:6503 ../src/guestfs-actions.pod:6527 ../fish/guestfish-actions.pod:4341 ../fish/guestfish-actions.pod:4354
14953 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
14957 #: ../src/guestfs-actions.pod:6508
14958 msgid "See also C<guestfs_download>."
14962 #: ../src/guestfs-actions.pod:6519
14963 msgid "guestfs_upload_offset"
14967 #: ../src/guestfs-actions.pod:6521
14971 " guestfs_upload_offset (guestfs_h *g,\n"
14972 " const char *filename,\n"
14973 " const char *remotefilename,\n"
14974 " int64_t offset);\n"
14979 #: ../src/guestfs-actions.pod:6530 ../fish/guestfish-actions.pod:4357
14981 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
14982 "The intention is to overwrite parts of existing files or devices, although "
14983 "if a non-existant file is specified then it is created with a \"hole\" "
14984 "before C<offset>. The size of the data written is implicit in the size of "
14985 "the source C<filename>."
14989 #: ../src/guestfs-actions.pod:6537
14991 "Note that there is no limit on the amount of data that can be uploaded with "
14992 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
14993 "full amount unless an error occurs."
14997 #: ../src/guestfs-actions.pod:6542
14998 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
15002 #: ../src/guestfs-actions.pod:6553
15003 msgid "guestfs_utimens"
15007 #: ../src/guestfs-actions.pod:6555
15011 " guestfs_utimens (guestfs_h *g,\n"
15012 " const char *path,\n"
15013 " int64_t atsecs,\n"
15014 " int64_t atnsecs,\n"
15015 " int64_t mtsecs,\n"
15016 " int64_t mtnsecs);\n"
15021 #: ../src/guestfs-actions.pod:6563 ../fish/guestfish-actions.pod:4377
15022 msgid "This command sets the timestamps of a file with nanosecond precision."
15026 #: ../src/guestfs-actions.pod:6566 ../fish/guestfish-actions.pod:4380
15028 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
15033 #: ../src/guestfs-actions.pod:6569 ../fish/guestfish-actions.pod:4383
15035 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
15036 "nanoseconds from the epoch."
15040 #: ../src/guestfs-actions.pod:6572 ../fish/guestfish-actions.pod:4386
15042 "If the C<*nsecs> field contains the special value C<-1> then the "
15043 "corresponding timestamp is set to the current time. (The C<*secs> field is "
15044 "ignored in this case)."
15048 #: ../src/guestfs-actions.pod:6576 ../fish/guestfish-actions.pod:4390
15050 "If the C<*nsecs> field contains the special value C<-2> then the "
15051 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
15056 #: ../src/guestfs-actions.pod:6584 ../src/guestfs-structs.pod:175
15057 msgid "guestfs_version"
15061 #: ../src/guestfs-actions.pod:6586
15064 " struct guestfs_version *\n"
15065 " guestfs_version (guestfs_h *g);\n"
15070 #: ../src/guestfs-actions.pod:6589 ../fish/guestfish-actions.pod:4398
15071 msgid "Return the libguestfs version number that the program is linked against."
15075 #: ../src/guestfs-actions.pod:6592 ../fish/guestfish-actions.pod:4401
15077 "Note that because of dynamic linking this is not necessarily the version of "
15078 "libguestfs that you compiled against. You can compile the program, and then "
15079 "at runtime dynamically link against a completely different C<libguestfs.so> "
15084 #: ../src/guestfs-actions.pod:6597 ../fish/guestfish-actions.pod:4406
15086 "This call was added in version C<1.0.58>. In previous versions of "
15087 "libguestfs there was no way to get the version number. From C code you can "
15088 "use dynamic linker functions to find out if this symbol exists (if it "
15089 "doesn't, then it's an earlier version)."
15093 #: ../src/guestfs-actions.pod:6603 ../fish/guestfish-actions.pod:4412
15095 "The call returns a structure with four elements. The first three (C<major>, "
15096 "C<minor> and C<release>) are numbers and correspond to the usual version "
15097 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
15098 "but may be used for distro-specific information."
15102 #: ../src/guestfs-actions.pod:6609 ../fish/guestfish-actions.pod:4418
15103 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
15107 #: ../src/guestfs-actions.pod:6612 ../fish/guestfish-actions.pod:4421
15108 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
15112 #: ../src/guestfs-actions.pod:6614
15114 "I<Note:> Don't use this call to test for availability of features. In "
15115 "enterprise distributions we backport features from later versions into "
15116 "earlier versions, making this an unreliable way to test for features. Use "
15117 "C<guestfs_available> instead."
15121 #: ../src/guestfs-actions.pod:6620
15123 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
15124 "error. I<The caller must call C<guestfs_free_version> after use>."
15128 #: ../src/guestfs-actions.pod:6624
15129 msgid "(Added in 1.0.58)"
15133 #: ../src/guestfs-actions.pod:6626
15134 msgid "guestfs_vfs_label"
15138 #: ../src/guestfs-actions.pod:6628
15142 " guestfs_vfs_label (guestfs_h *g,\n"
15143 " const char *device);\n"
15148 #: ../src/guestfs-actions.pod:6632 ../fish/guestfish-actions.pod:4433
15149 msgid "This returns the filesystem label of the filesystem on C<device>."
15153 #: ../src/guestfs-actions.pod:6635 ../fish/guestfish-actions.pod:4436
15154 msgid "If the filesystem is unlabeled, this returns the empty string."
15158 #: ../src/guestfs-actions.pod:6637
15159 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
15163 #: ../src/guestfs-actions.pod:6642 ../src/guestfs-actions.pod:6679
15164 msgid "(Added in 1.3.18)"
15168 #: ../src/guestfs-actions.pod:6644
15169 msgid "guestfs_vfs_type"
15173 #: ../src/guestfs-actions.pod:6646
15177 " guestfs_vfs_type (guestfs_h *g,\n"
15178 " const char *device);\n"
15183 #: ../src/guestfs-actions.pod:6650 ../fish/guestfish-actions.pod:4444
15185 "This command gets the filesystem type corresponding to the filesystem on "
15190 #: ../src/guestfs-actions.pod:6653 ../fish/guestfish-actions.pod:4447
15192 "For most filesystems, the result is the name of the Linux VFS module which "
15193 "would be used to mount this filesystem if you mounted it without specifying "
15194 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
15198 #: ../src/guestfs-actions.pod:6663
15199 msgid "guestfs_vfs_uuid"
15203 #: ../src/guestfs-actions.pod:6665
15207 " guestfs_vfs_uuid (guestfs_h *g,\n"
15208 " const char *device);\n"
15213 #: ../src/guestfs-actions.pod:6669 ../fish/guestfish-actions.pod:4456
15214 msgid "This returns the filesystem UUID of the filesystem on C<device>."
15218 #: ../src/guestfs-actions.pod:6672 ../fish/guestfish-actions.pod:4459
15219 msgid "If the filesystem does not have a UUID, this returns the empty string."
15223 #: ../src/guestfs-actions.pod:6674
15224 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
15228 #: ../src/guestfs-actions.pod:6681
15229 msgid "guestfs_vg_activate"
15233 #: ../src/guestfs-actions.pod:6683
15237 " guestfs_vg_activate (guestfs_h *g,\n"
15239 " char *const *volgroups);\n"
15244 #: ../src/guestfs-actions.pod:6688 ../fish/guestfish-actions.pod:4467
15246 "This command activates or (if C<activate> is false) deactivates all logical "
15247 "volumes in the listed volume groups C<volgroups>. If activated, then they "
15248 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
15249 "deactivated, then those devices disappear."
15253 #: ../src/guestfs-actions.pod:6694 ../fish/guestfish-actions.pod:4473
15254 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
15258 #: ../src/guestfs-actions.pod:6696 ../fish/guestfish-actions.pod:4475
15260 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
15261 "activated or deactivated."
15265 #: ../src/guestfs-actions.pod:6703
15266 msgid "guestfs_vg_activate_all"
15270 #: ../src/guestfs-actions.pod:6705
15274 " guestfs_vg_activate_all (guestfs_h *g,\n"
15275 " int activate);\n"
15280 #: ../src/guestfs-actions.pod:6709 ../fish/guestfish-actions.pod:4482
15282 "This command activates or (if C<activate> is false) deactivates all logical "
15283 "volumes in all volume groups. If activated, then they are made known to the "
15284 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
15285 "those devices disappear."
15289 #: ../src/guestfs-actions.pod:6715 ../fish/guestfish-actions.pod:4488
15290 msgid "This command is the same as running C<vgchange -a y|n>"
15294 #: ../src/guestfs-actions.pod:6721
15295 msgid "guestfs_vgcreate"
15299 #: ../src/guestfs-actions.pod:6723
15303 " guestfs_vgcreate (guestfs_h *g,\n"
15304 " const char *volgroup,\n"
15305 " char *const *physvols);\n"
15310 #: ../src/guestfs-actions.pod:6728 ../fish/guestfish-actions.pod:4494
15312 "This creates an LVM volume group called C<volgroup> from the non-empty list "
15313 "of physical volumes C<physvols>."
15317 #: ../src/guestfs-actions.pod:6735
15318 msgid "guestfs_vglvuuids"
15322 #: ../src/guestfs-actions.pod:6737
15326 " guestfs_vglvuuids (guestfs_h *g,\n"
15327 " const char *vgname);\n"
15332 #: ../src/guestfs-actions.pod:6741 ../fish/guestfish-actions.pod:4501
15334 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
15335 "volumes created in this volume group."
15339 #: ../src/guestfs-actions.pod:6744
15341 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
15342 "associate logical volumes and volume groups."
15346 #: ../src/guestfs-actions.pod:6747
15347 msgid "See also C<guestfs_vgpvuuids>."
15351 #: ../src/guestfs-actions.pod:6755
15352 msgid "guestfs_vgpvuuids"
15356 #: ../src/guestfs-actions.pod:6757
15360 " guestfs_vgpvuuids (guestfs_h *g,\n"
15361 " const char *vgname);\n"
15366 #: ../src/guestfs-actions.pod:6761 ../fish/guestfish-actions.pod:4513
15368 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
15369 "volumes that this volume group resides on."
15373 #: ../src/guestfs-actions.pod:6764
15375 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
15376 "associate physical volumes and volume groups."
15380 #: ../src/guestfs-actions.pod:6767
15381 msgid "See also C<guestfs_vglvuuids>."
15385 #: ../src/guestfs-actions.pod:6775
15386 msgid "guestfs_vgremove"
15390 #: ../src/guestfs-actions.pod:6777
15394 " guestfs_vgremove (guestfs_h *g,\n"
15395 " const char *vgname);\n"
15400 #: ../src/guestfs-actions.pod:6781 ../fish/guestfish-actions.pod:4525
15401 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
15405 #: ../src/guestfs-actions.pod:6783 ../fish/guestfish-actions.pod:4527
15406 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
15410 #: ../src/guestfs-actions.pod:6790
15411 msgid "guestfs_vgrename"
15415 #: ../src/guestfs-actions.pod:6792
15419 " guestfs_vgrename (guestfs_h *g,\n"
15420 " const char *volgroup,\n"
15421 " const char *newvolgroup);\n"
15426 #: ../src/guestfs-actions.pod:6797 ../fish/guestfish-actions.pod:4534
15427 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
15431 #: ../src/guestfs-actions.pod:6803
15432 msgid "guestfs_vgs"
15436 #: ../src/guestfs-actions.pod:6805
15440 " guestfs_vgs (guestfs_h *g);\n"
15445 #: ../src/guestfs-actions.pod:6808 ../fish/guestfish-actions.pod:4540
15447 "List all the volumes groups detected. This is the equivalent of the "
15448 "L<vgs(8)> command."
15452 #: ../src/guestfs-actions.pod:6811 ../fish/guestfish-actions.pod:4543
15454 "This returns a list of just the volume group names that were detected "
15455 "(eg. C<VolGroup00>)."
15459 #: ../src/guestfs-actions.pod:6814
15460 msgid "See also C<guestfs_vgs_full>."
15464 #: ../src/guestfs-actions.pod:6822
15465 msgid "guestfs_vgs_full"
15469 #: ../src/guestfs-actions.pod:6824
15472 " struct guestfs_lvm_vg_list *\n"
15473 " guestfs_vgs_full (guestfs_h *g);\n"
15478 #: ../src/guestfs-actions.pod:6827 ../fish/guestfish-actions.pod:4552
15480 "List all the volumes groups detected. This is the equivalent of the "
15481 "L<vgs(8)> command. The \"full\" version includes all fields."
15485 #: ../src/guestfs-actions.pod:6830
15487 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
15488 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after "
15493 #: ../src/guestfs-actions.pod:6836
15494 msgid "guestfs_vgscan"
15498 #: ../src/guestfs-actions.pod:6838
15502 " guestfs_vgscan (guestfs_h *g);\n"
15507 #: ../src/guestfs-actions.pod:6841 ../fish/guestfish-actions.pod:4559
15509 "This rescans all block devices and rebuilds the list of LVM physical "
15510 "volumes, volume groups and logical volumes."
15514 #: ../src/guestfs-actions.pod:6848
15515 msgid "guestfs_vguuid"
15519 #: ../src/guestfs-actions.pod:6850
15523 " guestfs_vguuid (guestfs_h *g,\n"
15524 " const char *vgname);\n"
15529 #: ../src/guestfs-actions.pod:6854 ../fish/guestfish-actions.pod:4566
15530 msgid "This command returns the UUID of the LVM VG named C<vgname>."
15534 #: ../src/guestfs-actions.pod:6861
15535 msgid "guestfs_wait_ready"
15539 #: ../src/guestfs-actions.pod:6863
15543 " guestfs_wait_ready (guestfs_h *g);\n"
15548 #: ../src/guestfs-actions.pod:6866
15549 msgid "This function is a no op."
15553 #: ../src/guestfs-actions.pod:6868
15555 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
15556 "calling C<guestfs_launch> to wait for the launch to complete. However this "
15557 "is no longer necessary because C<guestfs_launch> now does the waiting."
15561 #: ../src/guestfs-actions.pod:6873
15563 "If you see any calls to this function in code then you can just remove them, "
15564 "unless you want to retain compatibility with older versions of the API."
15568 #: ../src/guestfs-actions.pod:6881
15569 msgid "guestfs_wc_c"
15573 #: ../src/guestfs-actions.pod:6883
15577 " guestfs_wc_c (guestfs_h *g,\n"
15578 " const char *path);\n"
15583 #: ../src/guestfs-actions.pod:6887 ../fish/guestfish-actions.pod:4572
15585 "This command counts the characters in a file, using the C<wc -c> external "
15590 #: ../src/guestfs-actions.pod:6894
15591 msgid "guestfs_wc_l"
15595 #: ../src/guestfs-actions.pod:6896
15599 " guestfs_wc_l (guestfs_h *g,\n"
15600 " const char *path);\n"
15605 #: ../src/guestfs-actions.pod:6900 ../fish/guestfish-actions.pod:4579
15607 "This command counts the lines in a file, using the C<wc -l> external "
15612 #: ../src/guestfs-actions.pod:6907
15613 msgid "guestfs_wc_w"
15617 #: ../src/guestfs-actions.pod:6909
15621 " guestfs_wc_w (guestfs_h *g,\n"
15622 " const char *path);\n"
15627 #: ../src/guestfs-actions.pod:6913 ../fish/guestfish-actions.pod:4586
15629 "This command counts the words in a file, using the C<wc -w> external "
15634 #: ../src/guestfs-actions.pod:6920
15635 msgid "guestfs_write"
15639 #: ../src/guestfs-actions.pod:6922
15643 " guestfs_write (guestfs_h *g,\n"
15644 " const char *path,\n"
15645 " const char *content,\n"
15646 " size_t content_size);\n"
15651 #: ../src/guestfs-actions.pod:6928 ../fish/guestfish-actions.pod:4593
15653 "This call creates a file called C<path>. The content of the file is the "
15654 "string C<content> (which can contain any 8 bit data)."
15658 #: ../src/guestfs-actions.pod:6938
15659 msgid "guestfs_write_file"
15663 #: ../src/guestfs-actions.pod:6940
15667 " guestfs_write_file (guestfs_h *g,\n"
15668 " const char *path,\n"
15669 " const char *content,\n"
15675 #: ../src/guestfs-actions.pod:6946 ../fish/guestfish-actions.pod:4603
15677 "This call creates a file called C<path>. The contents of the file is the "
15678 "string C<content> (which can contain any 8 bit data), with length C<size>."
15682 #: ../src/guestfs-actions.pod:6950 ../fish/guestfish-actions.pod:4607
15684 "As a special case, if C<size> is C<0> then the length is calculated using "
15685 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
15689 #: ../src/guestfs-actions.pod:6954 ../fish/guestfish-actions.pod:4611
15691 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
15692 "I<not> work, even if the length is specified."
15696 #: ../src/guestfs-actions.pod:6962 ../fish/guestfish-actions.pod:4617
15697 msgid "This function is deprecated. In new code, use the C<write> call instead."
15701 #: ../src/guestfs-actions.pod:6971
15702 msgid "guestfs_zegrep"
15706 #: ../src/guestfs-actions.pod:6973
15710 " guestfs_zegrep (guestfs_h *g,\n"
15711 " const char *regex,\n"
15712 " const char *path);\n"
15717 #: ../src/guestfs-actions.pod:6978 ../fish/guestfish-actions.pod:4628
15718 msgid "This calls the external C<zegrep> program and returns the matching lines."
15722 #: ../src/guestfs-actions.pod:6990
15723 msgid "guestfs_zegrepi"
15727 #: ../src/guestfs-actions.pod:6992
15731 " guestfs_zegrepi (guestfs_h *g,\n"
15732 " const char *regex,\n"
15733 " const char *path);\n"
15738 #: ../src/guestfs-actions.pod:6997 ../fish/guestfish-actions.pod:4638
15739 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
15743 #: ../src/guestfs-actions.pod:7009
15744 msgid "guestfs_zero"
15748 #: ../src/guestfs-actions.pod:7011
15752 " guestfs_zero (guestfs_h *g,\n"
15753 " const char *device);\n"
15758 #: ../src/guestfs-actions.pod:7015 ../fish/guestfish-actions.pod:4648
15759 msgid "This command writes zeroes over the first few blocks of C<device>."
15763 #: ../src/guestfs-actions.pod:7017 ../fish/guestfish-actions.pod:4650
15765 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
15766 "securely wipe the device). It should be sufficient to remove any partition "
15767 "tables, filesystem superblocks and so on."
15771 #: ../src/guestfs-actions.pod:7021
15772 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
15776 #: ../src/guestfs-actions.pod:7032
15777 msgid "guestfs_zero_device"
15781 #: ../src/guestfs-actions.pod:7034
15785 " guestfs_zero_device (guestfs_h *g,\n"
15786 " const char *device);\n"
15791 #: ../src/guestfs-actions.pod:7038
15793 "This command writes zeroes over the entire C<device>. Compare with "
15794 "C<guestfs_zero> which just zeroes the first few blocks of a device."
15798 #: ../src/guestfs-actions.pod:7052
15799 msgid "(Added in 1.3.1)"
15803 #: ../src/guestfs-actions.pod:7054
15804 msgid "guestfs_zerofree"
15808 #: ../src/guestfs-actions.pod:7056
15812 " guestfs_zerofree (guestfs_h *g,\n"
15813 " const char *device);\n"
15818 #: ../src/guestfs-actions.pod:7060 ../fish/guestfish-actions.pod:4671
15820 "This runs the I<zerofree> program on C<device>. This program claims to zero "
15821 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
15822 "possible to compress the filesystem more effectively."
15826 #: ../src/guestfs-actions.pod:7065 ../fish/guestfish-actions.pod:4676
15827 msgid "You should B<not> run this program if the filesystem is mounted."
15831 #: ../src/guestfs-actions.pod:7068 ../fish/guestfish-actions.pod:4679
15833 "It is possible that using this program can damage the filesystem or data on "
15838 #: ../src/guestfs-actions.pod:7075
15839 msgid "guestfs_zfgrep"
15843 #: ../src/guestfs-actions.pod:7077
15847 " guestfs_zfgrep (guestfs_h *g,\n"
15848 " const char *pattern,\n"
15849 " const char *path);\n"
15854 #: ../src/guestfs-actions.pod:7082 ../fish/guestfish-actions.pod:4686
15855 msgid "This calls the external C<zfgrep> program and returns the matching lines."
15859 #: ../src/guestfs-actions.pod:7094
15860 msgid "guestfs_zfgrepi"
15864 #: ../src/guestfs-actions.pod:7096
15868 " guestfs_zfgrepi (guestfs_h *g,\n"
15869 " const char *pattern,\n"
15870 " const char *path);\n"
15875 #: ../src/guestfs-actions.pod:7101 ../fish/guestfish-actions.pod:4696
15876 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
15880 #: ../src/guestfs-actions.pod:7113
15881 msgid "guestfs_zfile"
15885 #: ../src/guestfs-actions.pod:7115
15889 " guestfs_zfile (guestfs_h *g,\n"
15890 " const char *meth,\n"
15891 " const char *path);\n"
15896 #: ../src/guestfs-actions.pod:7120 ../fish/guestfish-actions.pod:4706
15897 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
15901 #: ../src/guestfs-actions.pod:7123 ../fish/guestfish-actions.pod:4709
15902 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
15906 #: ../src/guestfs-actions.pod:7125
15908 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
15913 #: ../src/guestfs-actions.pod:7131 ../fish/guestfish-actions.pod:4714
15914 msgid "This function is deprecated. In new code, use the C<file> call instead."
15918 #: ../src/guestfs-actions.pod:7140
15919 msgid "guestfs_zgrep"
15923 #: ../src/guestfs-actions.pod:7142
15927 " guestfs_zgrep (guestfs_h *g,\n"
15928 " const char *regex,\n"
15929 " const char *path);\n"
15934 #: ../src/guestfs-actions.pod:7147 ../fish/guestfish-actions.pod:4725
15935 msgid "This calls the external C<zgrep> program and returns the matching lines."
15939 #: ../src/guestfs-actions.pod:7159
15940 msgid "guestfs_zgrepi"
15944 #: ../src/guestfs-actions.pod:7161
15948 " guestfs_zgrepi (guestfs_h *g,\n"
15949 " const char *regex,\n"
15950 " const char *path);\n"
15955 #: ../src/guestfs-actions.pod:7166 ../fish/guestfish-actions.pod:4735
15956 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
15960 #: ../src/guestfs-availability.pod:3
15965 #: ../src/guestfs-availability.pod:5
15967 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
15968 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
15969 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
15970 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
15971 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
15975 #: ../src/guestfs-availability.pod:21
15980 #: ../src/guestfs-availability.pod:23
15982 "The following functions: L</guestfs_inotify_add_watch> "
15983 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
15984 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
15988 #: ../src/guestfs-availability.pod:31
15989 msgid "B<linuxfsuuid>"
15993 #: ../src/guestfs-availability.pod:33
15995 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
15996 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
16000 #: ../src/guestfs-availability.pod:40
16001 msgid "B<linuxmodules>"
16005 #: ../src/guestfs-availability.pod:42
16006 msgid "The following functions: L</guestfs_modprobe>"
16010 #: ../src/guestfs-availability.pod:45
16011 msgid "B<linuxxattrs>"
16015 #: ../src/guestfs-availability.pod:47
16017 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> "
16018 "L</guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> "
16019 "L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> "
16020 "L</guestfs_setxattr>"
16024 #: ../src/guestfs-availability.pod:58
16029 #: ../src/guestfs-availability.pod:60
16031 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
16032 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
16033 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
16037 #: ../src/guestfs-availability.pod:69
16042 #: ../src/guestfs-availability.pod:71
16044 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
16045 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
16046 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
16047 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
16048 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
16049 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
16050 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
16051 "L</guestfs_vgs_full>"
16055 #: ../src/guestfs-availability.pod:94
16060 #: ../src/guestfs-availability.pod:96
16062 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
16063 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
16067 #: ../src/guestfs-availability.pod:102
16072 #: ../src/guestfs-availability.pod:104
16073 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
16077 #: ../src/guestfs-availability.pod:107
16078 msgid "B<ntfsprogs>"
16082 #: ../src/guestfs-availability.pod:109
16083 msgid "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
16087 #: ../src/guestfs-availability.pod:113
16088 msgid "B<realpath>"
16092 #: ../src/guestfs-availability.pod:115
16093 msgid "The following functions: L</guestfs_realpath>"
16097 #: ../src/guestfs-availability.pod:118
16102 #: ../src/guestfs-availability.pod:120
16104 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
16105 "L</guestfs_scrub_freespace>"
16109 #: ../src/guestfs-availability.pod:125
16114 #: ../src/guestfs-availability.pod:127
16115 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
16119 #: ../src/guestfs-availability.pod:131
16124 #: ../src/guestfs-availability.pod:133
16125 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
16129 #: ../src/guestfs-availability.pod:137
16130 msgid "B<zerofree>"
16134 #: ../src/guestfs-availability.pod:139
16135 msgid "The following functions: L</guestfs_zerofree>"
16139 #: ../src/guestfs-structs.pod:1
16140 msgid "guestfs_int_bool"
16144 #: ../src/guestfs-structs.pod:3
16147 " struct guestfs_int_bool {\n"
16155 #: ../src/guestfs-structs.pod:8
16158 " struct guestfs_int_bool_list {\n"
16159 " uint32_t len; /* Number of elements in list. */\n"
16160 " struct guestfs_int_bool *val; /* Elements. */\n"
16166 #: ../src/guestfs-structs.pod:13
16169 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
16170 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
16175 #: ../src/guestfs-structs.pod:16
16176 msgid "guestfs_lvm_pv"
16180 #: ../src/guestfs-structs.pod:18
16183 " struct guestfs_lvm_pv {\n"
16184 " char *pv_name;\n"
16185 " /* The next field is NOT nul-terminated, be careful when printing it: "
16187 " char pv_uuid[32];\n"
16189 " uint64_t pv_size;\n"
16190 " uint64_t dev_size;\n"
16191 " uint64_t pv_free;\n"
16192 " uint64_t pv_used;\n"
16193 " char *pv_attr;\n"
16194 " int64_t pv_pe_count;\n"
16195 " int64_t pv_pe_alloc_count;\n"
16196 " char *pv_tags;\n"
16197 " uint64_t pe_start;\n"
16198 " int64_t pv_mda_count;\n"
16199 " uint64_t pv_mda_free;\n"
16205 #: ../src/guestfs-structs.pod:36
16208 " struct guestfs_lvm_pv_list {\n"
16209 " uint32_t len; /* Number of elements in list. */\n"
16210 " struct guestfs_lvm_pv *val; /* Elements. */\n"
16216 #: ../src/guestfs-structs.pod:41
16219 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
16220 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
16225 #: ../src/guestfs-structs.pod:44
16226 msgid "guestfs_lvm_vg"
16230 #: ../src/guestfs-structs.pod:46
16233 " struct guestfs_lvm_vg {\n"
16234 " char *vg_name;\n"
16235 " /* The next field is NOT nul-terminated, be careful when printing it: "
16237 " char vg_uuid[32];\n"
16239 " char *vg_attr;\n"
16240 " uint64_t vg_size;\n"
16241 " uint64_t vg_free;\n"
16242 " char *vg_sysid;\n"
16243 " uint64_t vg_extent_size;\n"
16244 " int64_t vg_extent_count;\n"
16245 " int64_t vg_free_count;\n"
16246 " int64_t max_lv;\n"
16247 " int64_t max_pv;\n"
16248 " int64_t pv_count;\n"
16249 " int64_t lv_count;\n"
16250 " int64_t snap_count;\n"
16251 " int64_t vg_seqno;\n"
16252 " char *vg_tags;\n"
16253 " int64_t vg_mda_count;\n"
16254 " uint64_t vg_mda_free;\n"
16260 #: ../src/guestfs-structs.pod:69
16263 " struct guestfs_lvm_vg_list {\n"
16264 " uint32_t len; /* Number of elements in list. */\n"
16265 " struct guestfs_lvm_vg *val; /* Elements. */\n"
16271 #: ../src/guestfs-structs.pod:74
16274 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
16275 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
16280 #: ../src/guestfs-structs.pod:77
16281 msgid "guestfs_lvm_lv"
16285 #: ../src/guestfs-structs.pod:79
16288 " struct guestfs_lvm_lv {\n"
16289 " char *lv_name;\n"
16290 " /* The next field is NOT nul-terminated, be careful when printing it: "
16292 " char lv_uuid[32];\n"
16293 " char *lv_attr;\n"
16294 " int64_t lv_major;\n"
16295 " int64_t lv_minor;\n"
16296 " int64_t lv_kernel_major;\n"
16297 " int64_t lv_kernel_minor;\n"
16298 " uint64_t lv_size;\n"
16299 " int64_t seg_count;\n"
16301 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
16302 " float snap_percent;\n"
16303 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
16304 " float copy_percent;\n"
16305 " char *move_pv;\n"
16306 " char *lv_tags;\n"
16307 " char *mirror_log;\n"
16308 " char *modules;\n"
16314 #: ../src/guestfs-structs.pod:101
16317 " struct guestfs_lvm_lv_list {\n"
16318 " uint32_t len; /* Number of elements in list. */\n"
16319 " struct guestfs_lvm_lv *val; /* Elements. */\n"
16325 #: ../src/guestfs-structs.pod:106
16328 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
16329 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
16334 #: ../src/guestfs-structs.pod:111
16337 " struct guestfs_stat {\n"
16341 " int64_t nlink;\n"
16346 " int64_t blksize;\n"
16347 " int64_t blocks;\n"
16348 " int64_t atime;\n"
16349 " int64_t mtime;\n"
16350 " int64_t ctime;\n"
16356 #: ../src/guestfs-structs.pod:127
16359 " struct guestfs_stat_list {\n"
16360 " uint32_t len; /* Number of elements in list. */\n"
16361 " struct guestfs_stat *val; /* Elements. */\n"
16367 #: ../src/guestfs-structs.pod:132
16370 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
16371 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
16376 #: ../src/guestfs-structs.pod:137
16379 " struct guestfs_statvfs {\n"
16380 " int64_t bsize;\n"
16381 " int64_t frsize;\n"
16382 " int64_t blocks;\n"
16383 " int64_t bfree;\n"
16384 " int64_t bavail;\n"
16385 " int64_t files;\n"
16386 " int64_t ffree;\n"
16387 " int64_t favail;\n"
16390 " int64_t namemax;\n"
16396 #: ../src/guestfs-structs.pod:151
16399 " struct guestfs_statvfs_list {\n"
16400 " uint32_t len; /* Number of elements in list. */\n"
16401 " struct guestfs_statvfs *val; /* Elements. */\n"
16407 #: ../src/guestfs-structs.pod:156
16410 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
16411 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
16416 #: ../src/guestfs-structs.pod:159
16417 msgid "guestfs_dirent"
16421 #: ../src/guestfs-structs.pod:161
16424 " struct guestfs_dirent {\n"
16433 #: ../src/guestfs-structs.pod:167
16436 " struct guestfs_dirent_list {\n"
16437 " uint32_t len; /* Number of elements in list. */\n"
16438 " struct guestfs_dirent *val; /* Elements. */\n"
16444 #: ../src/guestfs-structs.pod:172
16447 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
16448 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
16453 #: ../src/guestfs-structs.pod:177
16456 " struct guestfs_version {\n"
16457 " int64_t major;\n"
16458 " int64_t minor;\n"
16459 " int64_t release;\n"
16466 #: ../src/guestfs-structs.pod:184
16469 " struct guestfs_version_list {\n"
16470 " uint32_t len; /* Number of elements in list. */\n"
16471 " struct guestfs_version *val; /* Elements. */\n"
16477 #: ../src/guestfs-structs.pod:189
16480 " void guestfs_free_version (struct guestfs_free_version *);\n"
16481 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
16486 #: ../src/guestfs-structs.pod:192
16487 msgid "guestfs_xattr"
16491 #: ../src/guestfs-structs.pod:194
16494 " struct guestfs_xattr {\n"
16495 " char *attrname;\n"
16496 " /* The next two fields describe a byte array. */\n"
16497 " uint32_t attrval_len;\n"
16498 " char *attrval;\n"
16504 #: ../src/guestfs-structs.pod:201
16507 " struct guestfs_xattr_list {\n"
16508 " uint32_t len; /* Number of elements in list. */\n"
16509 " struct guestfs_xattr *val; /* Elements. */\n"
16515 #: ../src/guestfs-structs.pod:206
16518 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
16519 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
16524 #: ../src/guestfs-structs.pod:209
16525 msgid "guestfs_inotify_event"
16529 #: ../src/guestfs-structs.pod:211
16532 " struct guestfs_inotify_event {\n"
16533 " int64_t in_wd;\n"
16534 " uint32_t in_mask;\n"
16535 " uint32_t in_cookie;\n"
16536 " char *in_name;\n"
16542 #: ../src/guestfs-structs.pod:218
16545 " struct guestfs_inotify_event_list {\n"
16546 " uint32_t len; /* Number of elements in list. */\n"
16547 " struct guestfs_inotify_event *val; /* Elements. */\n"
16553 #: ../src/guestfs-structs.pod:223
16556 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
16557 " void guestfs_free_inotify_event_list (struct "
16558 "guestfs_free_inotify_event_list *);\n"
16563 #: ../src/guestfs-structs.pod:226
16564 msgid "guestfs_partition"
16568 #: ../src/guestfs-structs.pod:228
16571 " struct guestfs_partition {\n"
16572 " int32_t part_num;\n"
16573 " uint64_t part_start;\n"
16574 " uint64_t part_end;\n"
16575 " uint64_t part_size;\n"
16581 #: ../src/guestfs-structs.pod:235
16584 " struct guestfs_partition_list {\n"
16585 " uint32_t len; /* Number of elements in list. */\n"
16586 " struct guestfs_partition *val; /* Elements. */\n"
16592 #: ../src/guestfs-structs.pod:240
16595 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
16596 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
16601 #: ../src/guestfs-structs.pod:243
16602 msgid "guestfs_application"
16606 #: ../src/guestfs-structs.pod:245
16609 " struct guestfs_application {\n"
16610 " char *app_name;\n"
16611 " char *app_display_name;\n"
16612 " int32_t app_epoch;\n"
16613 " char *app_version;\n"
16614 " char *app_release;\n"
16615 " char *app_install_path;\n"
16616 " char *app_trans_path;\n"
16617 " char *app_publisher;\n"
16618 " char *app_url;\n"
16619 " char *app_source_package;\n"
16620 " char *app_summary;\n"
16621 " char *app_description;\n"
16627 #: ../src/guestfs-structs.pod:260
16630 " struct guestfs_application_list {\n"
16631 " uint32_t len; /* Number of elements in list. */\n"
16632 " struct guestfs_application *val; /* Elements. */\n"
16638 #: ../src/guestfs-structs.pod:265
16641 " void guestfs_free_application (struct guestfs_free_application *);\n"
16642 " void guestfs_free_application_list (struct guestfs_free_application_list "
16648 #: ../fish/guestfish.pod:5
16649 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
16653 #: ../fish/guestfish.pod:9
16656 " guestfish [--options] [commands]\n"
16661 #: ../fish/guestfish.pod:11
16669 #: ../fish/guestfish.pod:13
16672 " guestfish [--ro|--rw] -a disk.img\n"
16677 #: ../fish/guestfish.pod:15
16680 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
16685 #: ../fish/guestfish.pod:17
16688 " guestfish -d libvirt-domain\n"
16693 #: ../fish/guestfish.pod:19
16696 " guestfish [--ro|--rw] -a disk.img -i\n"
16701 #: ../fish/guestfish.pod:21
16704 " guestfish -d libvirt-domain -i\n"
16709 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15 ../tools/virt-edit.pl:44 ../tools/virt-win-reg.pl:51 ../tools/virt-tar.pl:59
16714 #: ../fish/guestfish.pod:25
16716 "Using guestfish in read/write mode on live virtual machines can be "
16717 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
16718 "option to use guestfish safely if the disk image or virtual machine might be "
16723 #: ../fish/guestfish.pod:32
16725 "Guestfish is a shell and command-line tool for examining and modifying "
16726 "virtual machine filesystems. It uses libguestfs and exposes all of the "
16727 "functionality of the guestfs API, see L<guestfs(3)>."
16731 #: ../fish/guestfish.pod:36
16733 "Guestfish gives you structured access to the libguestfs API, from shell "
16734 "scripts or the command line or interactively. If you want to rescue a "
16735 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
16740 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:897 ../fuse/guestmount.pod:39 ../tools/virt-edit.pl:58 ../tools/virt-resize.pl:64 ../tools/virt-tar.pl:45
16745 #: ../fish/guestfish.pod:43
16746 msgid "As an interactive shell"
16750 #: ../fish/guestfish.pod:45
16758 #: ../fish/guestfish.pod:47
16761 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
16762 " editing virtual machine filesystems.\n"
16767 #: ../fish/guestfish.pod:50
16770 " Type: 'help' for a list of commands\n"
16771 " 'man' to read the manual\n"
16772 " 'quit' to quit the shell\n"
16777 #: ../fish/guestfish.pod:54
16780 " ><fs> add-ro disk.img\n"
16782 " ><fs> list-filesystems\n"
16783 " /dev/sda1: ext4\n"
16784 " /dev/vg_guest/lv_root: ext4\n"
16785 " /dev/vg_guest/lv_swap: swap\n"
16786 " ><fs> mount /dev/vg_guest/lv_root /\n"
16787 " ><fs> cat /etc/fstab\n"
16789 " # Created by anaconda\n"
16796 #: ../fish/guestfish.pod:67
16797 msgid "From shell scripts"
16801 #: ../fish/guestfish.pod:69
16802 msgid "Create a new C</etc/motd> file in a guest or disk image:"
16806 #: ../fish/guestfish.pod:71
16809 " guestfish <<_EOF_\n"
16812 " mount /dev/vg_guest/lv_root /\n"
16813 " write /etc/motd \"Welcome, new users\"\n"
16819 #: ../fish/guestfish.pod:78
16820 msgid "List the LVM logical volumes in a disk image:"
16824 #: ../fish/guestfish.pod:80
16827 " guestfish -a disk.img --ro <<_EOF_\n"
16835 #: ../fish/guestfish.pod:85
16836 msgid "List all the filesystems in a disk image:"
16840 #: ../fish/guestfish.pod:87
16843 " guestfish -a disk.img --ro <<_EOF_\n"
16845 " list-filesystems\n"
16851 #: ../fish/guestfish.pod:92
16852 msgid "On one command line"
16856 #: ../fish/guestfish.pod:94
16857 msgid "Update C</etc/resolv.conf> in a guest:"
16861 #: ../fish/guestfish.pod:96
16865 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
16866 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
16871 #: ../fish/guestfish.pod:100
16872 msgid "Edit C</boot/grub/grub.conf> interactively:"
16876 #: ../fish/guestfish.pod:102
16879 " guestfish --rw --add disk.img \\\n"
16880 " --mount /dev/vg_guest/lv_root \\\n"
16881 " --mount /dev/sda1:/boot \\\n"
16882 " edit /boot/grub/grub.conf\n"
16887 #: ../fish/guestfish.pod:107
16888 msgid "Mount disks automatically"
16892 #: ../fish/guestfish.pod:109
16894 "Use the I<-i> option to automatically mount the disks from a virtual "
16899 #: ../fish/guestfish.pod:112
16902 " guestfish --ro -a disk.img -i cat /etc/group\n"
16907 #: ../fish/guestfish.pod:114
16910 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
16915 #: ../fish/guestfish.pod:116
16916 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
16920 #: ../fish/guestfish.pod:118
16923 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
16928 #: ../fish/guestfish.pod:120
16929 msgid "As a script interpreter"
16933 #: ../fish/guestfish.pod:122
16934 msgid "Create a 100MB disk containing an ext2-formatted partition:"
16938 #: ../fish/guestfish.pod:124
16941 " #!/usr/bin/guestfish -f\n"
16942 " sparse test1.img 100M\n"
16944 " part-disk /dev/sda mbr\n"
16945 " mkfs ext2 /dev/sda1\n"
16950 #: ../fish/guestfish.pod:130
16951 msgid "Start with a prepared disk"
16955 #: ../fish/guestfish.pod:132
16957 "An alternate way to create a 100MB disk called C<test1.img> containing a "
16958 "single ext2-formatted partition:"
16962 #: ../fish/guestfish.pod:135
16965 " guestfish -N fs\n"
16970 #: ../fish/guestfish.pod:137
16971 msgid "To list what is available do:"
16975 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:888
16978 " guestfish -N help | less\n"
16983 #: ../fish/guestfish.pod:141
16984 msgid "Remote control"
16988 #: ../fish/guestfish.pod:143
16991 " eval \"`guestfish --listen`\"\n"
16992 " guestfish --remote add-ro disk.img\n"
16993 " guestfish --remote run\n"
16994 " guestfish --remote lvs\n"
16999 #: ../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:98 ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:54
17004 #: ../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:106 ../tools/virt-make-fs.pl:161 ../tools/virt-list-partitions.pl:62
17009 #: ../fish/guestfish.pod:154
17010 msgid "Displays general help on options."
17014 #: ../fish/guestfish.pod:156
17019 #: ../fish/guestfish.pod:158
17020 msgid "B<--cmd-help>"
17024 #: ../fish/guestfish.pod:160
17025 msgid "Lists all available guestfish commands."
17029 #: ../fish/guestfish.pod:162
17034 #: ../fish/guestfish.pod:164
17035 msgid "B<--cmd-help cmd>"
17039 #: ../fish/guestfish.pod:166
17040 msgid "Displays detailed help on a single command C<cmd>."
17044 #: ../fish/guestfish.pod:168
17045 msgid "B<-a image>"
17049 #: ../fish/guestfish.pod:170
17050 msgid "B<--add image>"
17054 #: ../fish/guestfish.pod:172
17055 msgid "Add a block device or virtual machine image to the shell."
17059 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:81
17061 "The format of the disk image is auto-detected. To override this and force a "
17062 "particular format use the I<--format=..> option."
17066 #: ../fish/guestfish.pod:177
17068 "Using this flag is mostly equivalent to using the C<add> command, with "
17069 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
17070 "the I<--format:...> flag was given."
17074 #: ../fish/guestfish.pod:181
17079 #: ../fish/guestfish.pod:183
17080 msgid "B<--connect URI>"
17084 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:86
17086 "When used in conjunction with the I<-d> option, this specifies the libvirt "
17087 "URI to use. The default is to use the default libvirt connection."
17091 #: ../fish/guestfish.pod:189
17096 #: ../fish/guestfish.pod:191
17098 "If using the I<--listen> option and a csh-like shell, use this option. See "
17099 "section L</REMOTE CONTROL AND CSH> below."
17103 #: ../fish/guestfish.pod:194
17104 msgid "B<-d libvirt-domain>"
17108 #: ../fish/guestfish.pod:196
17109 msgid "B<--domain libvirt-domain>"
17113 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:92
17115 "Add disks from the named libvirt domain. If the I<--ro> option is also "
17116 "used, then any libvirt domain can be used. However in write mode, only "
17117 "libvirt domains which are shut down can be named here."
17121 #: ../fish/guestfish.pod:202
17123 "Using this flag is mostly equivalent to using the C<add-domain> command, "
17124 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
17125 "if the I<--format:...> flag was given."
17129 #: ../fish/guestfish.pod:206
17134 #: ../fish/guestfish.pod:208
17135 msgid "B<--no-dest-paths>"
17139 #: ../fish/guestfish.pod:210
17141 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
17142 "to hit the tab key to complete paths on the guest filesystem, but this "
17143 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
17144 "allow this feature to be disabled."
17148 #: ../fish/guestfish.pod:215 ../fuse/guestmount.pod:108
17149 msgid "B<--echo-keys>"
17153 #: ../fish/guestfish.pod:217 ../fuse/guestmount.pod:110
17155 "When prompting for keys and passphrases, guestfish normally turns echoing "
17156 "off so you cannot see what you are typing. If you are not worried about "
17157 "Tempest attacks and there is no one else in the room you can specify this "
17158 "flag to see what you are typing."
17162 #: ../fish/guestfish.pod:222
17167 #: ../fish/guestfish.pod:224
17168 msgid "B<--file file>"
17172 #: ../fish/guestfish.pod:226
17173 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
17177 #: ../fish/guestfish.pod:229
17180 " #!/usr/bin/guestfish -f\n"
17185 #: ../fish/guestfish.pod:231
17186 msgid "B<--format=raw|qcow2|..>"
17190 #: ../fish/guestfish.pod:233
17191 msgid "B<--format>"
17195 #: ../fish/guestfish.pod:235 ../fuse/guestmount.pod:117
17197 "The default for the I<-a> option is to auto-detect the format of the disk "
17198 "image. Using this forces the disk format for I<-a> options which follow on "
17199 "the command line. Using I<--format> with no argument switches back to "
17200 "auto-detection for subsequent I<-a> options."
17204 #: ../fish/guestfish.pod:240 ../fish/guestfish.pod:594
17205 msgid "For example:"
17209 #: ../fish/guestfish.pod:242
17212 " guestfish --format=raw -a disk.img\n"
17217 #: ../fish/guestfish.pod:244
17218 msgid "forces raw format (no auto-detection) for C<disk.img>."
17222 #: ../fish/guestfish.pod:246
17225 " guestfish --format=raw -a disk.img --format -a another.img\n"
17230 #: ../fish/guestfish.pod:248
17232 "forces raw format (no auto-detection) for C<disk.img> and reverts to "
17233 "auto-detection for C<another.img>."
17237 #: ../fish/guestfish.pod:251
17239 "If you have untrusted raw-format guest disk images, you should use this "
17240 "option to specify the disk format. This avoids a possible security problem "
17241 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
17245 #: ../fish/guestfish.pod:256
17250 #: ../fish/guestfish.pod:258
17251 msgid "B<--inspector>"
17255 #: ../fish/guestfish.pod:260 ../fuse/guestmount.pod:137
17257 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
17258 "system and mount filesystems as they would be mounted on the real virtual "
17263 #: ../fish/guestfish.pod:264
17264 msgid "Typical usage is either:"
17268 #: ../fish/guestfish.pod:266
17271 " guestfish -d myguest -i\n"
17276 #: ../fish/guestfish.pod:268
17277 msgid "(for an inactive libvirt domain called I<myguest>), or:"
17281 #: ../fish/guestfish.pod:270
17284 " guestfish --ro -d myguest -i\n"
17289 #: ../fish/guestfish.pod:272
17290 msgid "(for active domains, readonly), or specify the block device directly:"
17294 #: ../fish/guestfish.pod:274
17297 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
17302 #: ../fish/guestfish.pod:276
17304 "Note that the command line syntax changed slightly over older versions of "
17305 "guestfish. You can still use the old syntax:"
17309 #: ../fish/guestfish.pod:279
17312 " guestfish [--ro] -i disk.img\n"
17317 #: ../fish/guestfish.pod:281
17320 " guestfish [--ro] -i libvirt-domain\n"
17325 #: ../fish/guestfish.pod:283
17327 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
17328 "then using other commands to mount the filesystems that were found."
17332 #: ../fish/guestfish.pod:287 ../fuse/guestmount.pod:141
17333 msgid "B<--keys-from-stdin>"
17337 #: ../fish/guestfish.pod:289 ../fuse/guestmount.pod:143
17339 "Read key or passphrase parameters from stdin. The default is to try to read "
17340 "passphrases from the user by opening C</dev/tty>."
17344 #: ../fish/guestfish.pod:292
17345 msgid "B<--listen>"
17349 #: ../fish/guestfish.pod:294
17351 "Fork into the background and listen for remote commands. See section "
17352 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
17356 #: ../fish/guestfish.pod:297
17357 msgid "B<-m dev[:mountpoint]>"
17361 #: ../fish/guestfish.pod:299
17362 msgid "B<--mount dev[:mountpoint]>"
17366 #: ../fish/guestfish.pod:301
17367 msgid "Mount the named partition or logical volume on the given mountpoint."
17371 #: ../fish/guestfish.pod:303
17372 msgid "If the mountpoint is omitted, it defaults to C</>."
17376 #: ../fish/guestfish.pod:305
17377 msgid "You have to mount something on C</> before most commands will work."
17381 #: ../fish/guestfish.pod:307
17383 "If any I<-m> or I<--mount> options are given, the guest is automatically "
17388 #: ../fish/guestfish.pod:310
17390 "If you don't know what filesystems a disk image contains, you can either run "
17391 "guestfish without this option, then list the partitions, filesystems and LVs "
17392 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
17393 "commands), or you can use the L<virt-filesystems(1)> program."
17397 #: ../fish/guestfish.pod:316
17399 "Using this flag is mostly equivalent to using the C<mount-options> command "
17400 "or the C<mount-ro> command if the I<--ro> flag was given."
17404 #: ../fish/guestfish.pod:319
17409 #: ../fish/guestfish.pod:321
17410 msgid "B<--no-sync>"
17414 #: ../fish/guestfish.pod:323
17416 "Disable autosync. This is enabled by default. See the discussion of "
17417 "autosync in the L<guestfs(3)> manpage."
17421 #: ../fish/guestfish.pod:326
17426 #: ../fish/guestfish.pod:328
17427 msgid "B<--new type>"
17431 #: ../fish/guestfish.pod:330
17436 #: ../fish/guestfish.pod:332
17438 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
17439 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
17440 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
17445 #: ../fish/guestfish.pod:337
17446 msgid "B<--progress-bars>"
17450 #: ../fish/guestfish.pod:339
17451 msgid "Enable progress bars, even when guestfish is used non-interactively."
17455 #: ../fish/guestfish.pod:341
17457 "Progress bars are enabled by default when guestfish is used as an "
17458 "interactive shell."
17462 #: ../fish/guestfish.pod:344
17463 msgid "B<--no-progress-bars>"
17467 #: ../fish/guestfish.pod:346
17468 msgid "Disable progress bars."
17472 #: ../fish/guestfish.pod:348
17473 msgid "B<--remote[=pid]>"
17477 #: ../fish/guestfish.pod:350
17479 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
17480 "CONTROL GUESTFISH OVER A SOCKET> below."
17484 #: ../fish/guestfish.pod:353
17489 #: ../fish/guestfish.pod:355
17494 #: ../fish/guestfish.pod:357
17496 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
17497 "mounts are done read-only."
17501 #: ../fish/guestfish.pod:360
17503 "The option must always be used if the disk image or virtual machine might be "
17504 "running, and is generally recommended in cases where you don't need write "
17505 "access to the disk."
17509 #: ../fish/guestfish.pod:364
17511 "Note that prepared disk images created with I<-N> are not affected by this "
17512 "option. Also commands like C<add> are not affected - you have to specify "
17513 "the C<readonly:true> option explicitly if you need it."
17517 #: ../fish/guestfish.pod:368
17518 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
17522 #: ../fish/guestfish.pod:370 ../fuse/guestmount.pod:208
17523 msgid "B<--selinux>"
17527 #: ../fish/guestfish.pod:372
17528 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
17532 #: ../fish/guestfish.pod:374
17537 #: ../fish/guestfish.pod:376
17538 msgid "B<--verbose>"
17542 #: ../fish/guestfish.pod:378
17544 "Enable very verbose messages. This is particularly useful if you find a "
17549 #: ../fish/guestfish.pod:381
17554 #: ../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:114 ../tools/virt-make-fs.pl:169 ../tools/virt-list-partitions.pl:70
17555 msgid "B<--version>"
17559 #: ../fish/guestfish.pod:385
17560 msgid "Display the guestfish / libguestfs version number and exit."
17564 #: ../fish/guestfish.pod:387
17569 #: ../fish/guestfish.pod:389
17574 #: ../fish/guestfish.pod:391
17576 "This option does nothing at the moment. See L</OPENING DISKS FOR READ AND "
17581 #: ../fish/guestfish.pod:394
17586 #: ../fish/guestfish.pod:396
17587 msgid "Echo each command before executing it."
17591 #: ../fish/guestfish.pod:400
17592 msgid "COMMANDS ON COMMAND LINE"
17596 #: ../fish/guestfish.pod:402
17597 msgid "Any additional (non-option) arguments are treated as commands to execute."
17601 #: ../fish/guestfish.pod:405
17603 "Commands to execute should be separated by a colon (C<:>), where the colon "
17604 "is a separate parameter. Thus:"
17608 #: ../fish/guestfish.pod:408
17611 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
17616 #: ../fish/guestfish.pod:410
17618 "If there are no additional arguments, then we enter a shell, either an "
17619 "interactive shell with a prompt (if the input is a terminal) or a "
17620 "non-interactive shell."
17624 #: ../fish/guestfish.pod:414
17626 "In either command line mode or non-interactive shell, the first command that "
17627 "gives an error causes the whole shell to exit. In interactive mode (with a "
17628 "prompt) if a command fails, you can continue to enter commands."
17632 #: ../fish/guestfish.pod:419
17633 msgid "USING launch (OR run)"
17637 #: ../fish/guestfish.pod:421
17639 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
17640 "then launch it, then mount any disks you need, and finally issue "
17641 "actions/commands. So the general order of the day is:"
17645 #: ../fish/guestfish.pod:429
17646 msgid "add or -a/--add"
17650 #: ../fish/guestfish.pod:433
17651 msgid "launch (aka run)"
17655 #: ../fish/guestfish.pod:437
17656 msgid "mount or -m/--mount"
17660 #: ../fish/guestfish.pod:441
17661 msgid "any other commands"
17665 #: ../fish/guestfish.pod:445
17667 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
17668 "guest before mounting or performing any other commands."
17672 #: ../fish/guestfish.pod:448
17674 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
17675 "I<--new> options were given then C<run> is done automatically, simply "
17676 "because guestfish can't perform the action you asked for without doing this."
17680 #: ../fish/guestfish.pod:453
17681 msgid "OPENING DISKS FOR READ AND WRITE"
17685 #: ../fish/guestfish.pod:455
17687 "The guestfish (and L<guestmount(1)>) options I<--ro> and I<--rw> affect "
17688 "whether the other command line options I<-a>, I<-c>, I<-d>, I<-i> and I<-m> "
17689 "open disk images read-only or for writing."
17693 #: ../fish/guestfish.pod:459
17695 "In libguestfs E<lt> 1.6.2, guestfish and guestmount defaulted to opening "
17696 "disk images supplied on the command line for write. To open a disk image "
17697 "read-only you have to do I<-a image --ro>."
17701 #: ../fish/guestfish.pod:463
17703 "This matters: If you accidentally open a live VM disk image writable then "
17704 "you will cause irreversible disk corruption."
17708 #: ../fish/guestfish.pod:466
17710 "By libguestfs 1.8 we intend to change the default the other way. Disk "
17711 "images will be opened read-only. You will have to either specify "
17712 "I<guestfish --rw> or change a configuration file in order to get write "
17713 "access for disk images specified by those other command line options."
17717 #: ../fish/guestfish.pod:471
17719 "This version of guestfish has a I<--rw> option which does nothing (it is "
17720 "already the default). However it is highly recommended that you use this "
17721 "option to indicate that guestfish needs write access, and to prepare your "
17722 "scripts for the day when this option will be required for write access."
17726 #: ../fish/guestfish.pod:477
17728 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
17729 "other libguestfs program apart from guestfish and guestmount."
17733 #: ../fish/guestfish.pod:480
17738 #: ../fish/guestfish.pod:482
17740 "You can quote ordinary parameters using either single or double quotes. For "
17745 #: ../fish/guestfish.pod:485
17748 " add \"file with a space.img\"\n"
17753 #: ../fish/guestfish.pod:487
17756 " rm '/file name'\n"
17761 #: ../fish/guestfish.pod:489
17769 #: ../fish/guestfish.pod:491
17771 "A few commands require a list of strings to be passed. For these, use a "
17772 "whitespace-separated list, enclosed in quotes. Strings containing "
17773 "whitespace to be passed through must be enclosed in single quotes. A "
17774 "literal single quote must be escaped with a backslash."
17778 #: ../fish/guestfish.pod:496
17781 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
17782 " command \"/bin/echo 'foo bar'\"\n"
17783 " command \"/bin/echo \\'foo\\'\"\n"
17788 #: ../fish/guestfish.pod:500
17789 msgid "OPTIONAL ARGUMENTS"
17793 #: ../fish/guestfish.pod:502
17795 "Some commands take optional arguments. These arguments appear in this "
17796 "documentation as C<[argname:..]>. You can use them as in these examples:"
17800 #: ../fish/guestfish.pod:506
17803 " add-drive-opts filename\n"
17808 #: ../fish/guestfish.pod:508
17811 " add-drive-opts filename readonly:true\n"
17816 #: ../fish/guestfish.pod:510
17819 " add-drive-opts filename format:qcow2 readonly:false\n"
17824 #: ../fish/guestfish.pod:512
17826 "Each optional argument can appear at most once. All optional arguments must "
17827 "appear after the required ones."
17831 #: ../fish/guestfish.pod:515
17836 #: ../fish/guestfish.pod:517
17837 msgid "This section applies to all commands which can take integers as parameters."
17841 #: ../fish/guestfish.pod:520
17842 msgid "SIZE SUFFIX"
17846 #: ../fish/guestfish.pod:522
17848 "When the command takes a parameter measured in bytes, you can use one of the "
17849 "following suffixes to specify kilobytes, megabytes and larger sizes:"
17853 #: ../fish/guestfish.pod:528
17854 msgid "B<k> or B<K> or B<KiB>"
17858 #: ../fish/guestfish.pod:530
17859 msgid "The size in kilobytes (multiplied by 1024)."
17863 #: ../fish/guestfish.pod:532
17868 #: ../fish/guestfish.pod:534
17869 msgid "The size in SI 1000 byte units."
17873 #: ../fish/guestfish.pod:536
17874 msgid "B<M> or B<MiB>"
17878 #: ../fish/guestfish.pod:538
17879 msgid "The size in megabytes (multiplied by 1048576)."
17883 #: ../fish/guestfish.pod:540
17888 #: ../fish/guestfish.pod:542
17889 msgid "The size in SI 1000000 byte units."
17893 #: ../fish/guestfish.pod:544
17894 msgid "B<G> or B<GiB>"
17898 #: ../fish/guestfish.pod:546
17899 msgid "The size in gigabytes (multiplied by 2**30)."
17903 #: ../fish/guestfish.pod:548
17908 #: ../fish/guestfish.pod:550
17909 msgid "The size in SI 10**9 byte units."
17913 #: ../fish/guestfish.pod:552
17914 msgid "B<T> or B<TiB>"
17918 #: ../fish/guestfish.pod:554
17919 msgid "The size in terabytes (multiplied by 2**40)."
17923 #: ../fish/guestfish.pod:556
17928 #: ../fish/guestfish.pod:558
17929 msgid "The size in SI 10**12 byte units."
17933 #: ../fish/guestfish.pod:560
17934 msgid "B<P> or B<PiB>"
17938 #: ../fish/guestfish.pod:562
17939 msgid "The size in petabytes (multiplied by 2**50)."
17943 #: ../fish/guestfish.pod:564
17948 #: ../fish/guestfish.pod:566
17949 msgid "The size in SI 10**15 byte units."
17953 #: ../fish/guestfish.pod:568
17954 msgid "B<E> or B<EiB>"
17958 #: ../fish/guestfish.pod:570
17959 msgid "The size in exabytes (multiplied by 2**60)."
17963 #: ../fish/guestfish.pod:572
17968 #: ../fish/guestfish.pod:574
17969 msgid "The size in SI 10**18 byte units."
17973 #: ../fish/guestfish.pod:576
17974 msgid "B<Z> or B<ZiB>"
17978 #: ../fish/guestfish.pod:578
17979 msgid "The size in zettabytes (multiplied by 2**70)."
17983 #: ../fish/guestfish.pod:580
17988 #: ../fish/guestfish.pod:582
17989 msgid "The size in SI 10**21 byte units."
17993 #: ../fish/guestfish.pod:584
17994 msgid "B<Y> or B<YiB>"
17998 #: ../fish/guestfish.pod:586
17999 msgid "The size in yottabytes (multiplied by 2**80)."
18003 #: ../fish/guestfish.pod:588
18008 #: ../fish/guestfish.pod:590
18009 msgid "The size in SI 10**24 byte units."
18013 #: ../fish/guestfish.pod:596
18016 " truncate-size /file 1G\n"
18021 #: ../fish/guestfish.pod:598
18022 msgid "would truncate the file to 1 gigabyte."
18026 #: ../fish/guestfish.pod:600
18028 "Be careful because a few commands take sizes in kilobytes or megabytes "
18029 "(eg. the parameter to L</memsize> is specified in megabytes already). "
18030 "Adding a suffix will probably not do what you expect."
18034 #: ../fish/guestfish.pod:604
18035 msgid "OCTAL AND HEXADECIMAL NUMBERS"
18039 #: ../fish/guestfish.pod:606
18041 "For specifying the radix (base) use the C convention: C<0> to prefix an "
18042 "octal number or C<0x> to prefix a hexadecimal number. For example:"
18046 #: ../fish/guestfish.pod:609
18049 " 1234 decimal number 1234\n"
18050 " 02322 octal number, equivalent to decimal 1234\n"
18051 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
18056 #: ../fish/guestfish.pod:613
18058 "When using the C<chmod> command, you almost always want to specify an octal "
18059 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
18060 "L<chmod(1)> program):"
18064 #: ../fish/guestfish.pod:617
18067 " chmod 0777 /public # OK\n"
18068 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
18073 #: ../fish/guestfish.pod:620
18075 "Commands that return numbers usually print them in decimal, but some "
18076 "commands print numbers in other radices (eg. C<umask> prints the mode in "
18077 "octal, preceeded by C<0>)."
18081 #: ../fish/guestfish.pod:624
18082 msgid "WILDCARDS AND GLOBBING"
18086 #: ../fish/guestfish.pod:626
18088 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
18089 "(globbing) by default. So for example the following will not do what you "
18094 #: ../fish/guestfish.pod:630
18102 #: ../fish/guestfish.pod:632
18104 "Assuming you don't have a directory called literally C</home/*> then the "
18105 "above command will return an error."
18109 #: ../fish/guestfish.pod:635
18110 msgid "To perform wildcard expansion, use the C<glob> command."
18114 #: ../fish/guestfish.pod:637
18117 " glob rm-rf /home/*\n"
18122 #: ../fish/guestfish.pod:639
18124 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
18125 "many times), equivalent to:"
18129 #: ../fish/guestfish.pod:642
18132 " rm-rf /home/jim\n"
18133 " rm-rf /home/joe\n"
18134 " rm-rf /home/mary\n"
18139 #: ../fish/guestfish.pod:646
18140 msgid "C<glob> only works on simple guest paths and not on device names."
18144 #: ../fish/guestfish.pod:648
18146 "If you have several parameters, each containing a wildcard, then glob will "
18147 "perform a Cartesian product."
18151 #: ../fish/guestfish.pod:651
18156 #: ../fish/guestfish.pod:653
18158 "Any line which starts with a I<#> character is treated as a comment and "
18159 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
18160 "a command. For example:"
18164 #: ../fish/guestfish.pod:657
18167 " # this is a comment\n"
18168 " # this is a comment\n"
18169 " foo # NOT a comment\n"
18174 #: ../fish/guestfish.pod:661
18175 msgid "Blank lines are also ignored."
18179 #: ../fish/guestfish.pod:663
18180 msgid "RUNNING COMMANDS LOCALLY"
18184 #: ../fish/guestfish.pod:665
18186 "Any line which starts with a I<!> character is treated as a command sent to "
18187 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
18191 #: ../fish/guestfish.pod:669
18195 " tgz-out /remote local/remote-data.tar.gz\n"
18200 #: ../fish/guestfish.pod:672
18202 "will create a directory C<local> on the host, and then export the contents "
18203 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
18204 "(See C<tgz-out>)."
18208 #: ../fish/guestfish.pod:676
18210 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
18211 "effect, due to the way that subprocesses work in Unix."
18215 #: ../fish/guestfish.pod:679
18220 #: ../fish/guestfish.pod:681
18222 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
18223 "command (a guestfish command) to the second command (any host command). For "
18228 #: ../fish/guestfish.pod:685
18231 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
18236 #: ../fish/guestfish.pod:687
18238 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
18239 "program). The above command would list all accounts in the guest filesystem "
18240 "which have UID 0, ie. root accounts including backdoors. Other examples:"
18244 #: ../fish/guestfish.pod:692
18247 " hexdump /bin/ls | head\n"
18248 " list-devices | tail -1\n"
18249 " tgz-out / - | tar ztf -\n"
18254 #: ../fish/guestfish.pod:696
18256 "The space before the pipe symbol is required, any space after the pipe "
18257 "symbol is optional. Everything after the pipe symbol is just passed "
18258 "straight to the host shell, so it can contain redirections, globs and "
18259 "anything else that makes sense on the host side."
18263 #: ../fish/guestfish.pod:701
18265 "To use a literal argument which begins with a pipe symbol, you have to quote "
18270 #: ../fish/guestfish.pod:704
18278 #: ../fish/guestfish.pod:706
18279 msgid "HOME DIRECTORIES"
18283 #: ../fish/guestfish.pod:708
18285 "If a parameter starts with the character C<~> then the tilde may be expanded "
18286 "as a home directory path (either C<~> for the current user's home directory, "
18287 "or C<~user> for another user)."
18291 #: ../fish/guestfish.pod:712
18293 "Note that home directory expansion happens for users known I<on the host>, "
18294 "not in the guest filesystem."
18298 #: ../fish/guestfish.pod:715
18300 "To use a literal argument which begins with a tilde, you have to quote it, "
18305 #: ../fish/guestfish.pod:718
18313 #: ../fish/guestfish.pod:722
18315 "Libguestfs has some support for Linux guests encrypted according to the "
18316 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
18317 "disk encryption systems used by modern Linux guests. Currently only "
18318 "LVM-on-LUKS is supported."
18322 #: ../fish/guestfish.pod:727
18323 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
18327 #: ../fish/guestfish.pod:729
18330 " ><fs> vfs-type /dev/sda2\n"
18336 #: ../fish/guestfish.pod:732
18338 "Then open those devices using L</luks-open>. This creates a device-mapper "
18339 "device called C</dev/mapper/luksdev>."
18343 #: ../fish/guestfish.pod:735
18346 " ><fs> luks-open /dev/sda2 luksdev\n"
18347 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
18352 #: ../fish/guestfish.pod:738
18354 "Finally you have to tell LVM to scan for volume groups on the newly created "
18359 #: ../fish/guestfish.pod:741
18363 " vg-activate-all true\n"
18368 #: ../fish/guestfish.pod:744
18369 msgid "The logical volume(s) can now be mounted in the usual way."
18373 #: ../fish/guestfish.pod:746
18375 "Before closing a LUKS device you must unmount any logical volumes on it and "
18376 "deactivate the volume groups by calling C<vg-activate false VG> on each "
18377 "one. Then you can close the mapper device:"
18381 #: ../fish/guestfish.pod:750
18384 " vg-activate false /dev/VG\n"
18385 " luks-close /dev/mapper/luksdev\n"
18390 #: ../fish/guestfish.pod:753
18391 msgid "WINDOWS PATHS"
18395 #: ../fish/guestfish.pod:755
18397 "If a path is prefixed with C<win:> then you can use Windows-style paths "
18398 "(with some limitations). The following commands are equivalent:"
18402 #: ../fish/guestfish.pod:758
18405 " file /WINDOWS/system32/config/system.LOG\n"
18410 #: ../fish/guestfish.pod:760
18413 " file win:/windows/system32/config/system.log\n"
18418 #: ../fish/guestfish.pod:762
18421 " file win:\\windows\\system32\\config\\system.log\n"
18426 #: ../fish/guestfish.pod:764
18429 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
18434 #: ../fish/guestfish.pod:766
18436 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
18437 "handles case insensitivity like Windows would. This only works in argument "
18438 "positions that expect a path."
18442 #: ../fish/guestfish.pod:770
18443 msgid "UPLOADING AND DOWNLOADING FILES"
18447 #: ../fish/guestfish.pod:772
18449 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
18450 "others which upload from or download to a local file, you can use the "
18451 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
18455 #: ../fish/guestfish.pod:776
18463 #: ../fish/guestfish.pod:778
18464 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
18468 #: ../fish/guestfish.pod:781
18471 " tar-out /etc - | tar tf -\n"
18476 #: ../fish/guestfish.pod:783
18478 "writes the tarball to stdout and then pipes that into the external \"tar\" "
18479 "command (see L</PIPES>)."
18483 #: ../fish/guestfish.pod:786
18485 "When using C<-> to read from stdin, the input is read up to the end of "
18486 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
18487 "some arbitrary end marker:"
18491 #: ../fish/guestfish.pod:790
18494 " upload -<<END /foo\n"
18503 #: ../fish/guestfish.pod:796
18505 "Any string of characters can be used instead of C<END>. The end marker must "
18506 "appear on a line of its own, without any preceeding or following characters "
18507 "(not even spaces)."
18511 #: ../fish/guestfish.pod:800
18513 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
18514 "upload local files (so-called \"FileIn\" parameters in the generator)."
18518 #: ../fish/guestfish.pod:803
18519 msgid "EXIT ON ERROR BEHAVIOUR"
18523 #: ../fish/guestfish.pod:805
18525 "By default, guestfish will ignore any errors when in interactive mode "
18526 "(ie. taking commands from a human over a tty), and will exit on the first "
18527 "error in non-interactive mode (scripts, commands given on the command line)."
18531 #: ../fish/guestfish.pod:810
18533 "If you prefix a command with a I<-> character, then that command will not "
18534 "cause guestfish to exit, even if that (one) command returns an error."
18538 #: ../fish/guestfish.pod:814
18539 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
18543 #: ../fish/guestfish.pod:816
18545 "Guestfish can be remote-controlled over a socket. This is useful "
18546 "particularly in shell scripts where you want to make several different "
18547 "changes to a filesystem, but you don't want the overhead of starting up a "
18548 "guestfish process each time."
18552 #: ../fish/guestfish.pod:821
18553 msgid "Start a guestfish server process using:"
18557 #: ../fish/guestfish.pod:823
18560 " eval \"`guestfish --listen`\"\n"
18565 #: ../fish/guestfish.pod:825
18566 msgid "and then send it commands by doing:"
18570 #: ../fish/guestfish.pod:827
18573 " guestfish --remote cmd [...]\n"
18578 #: ../fish/guestfish.pod:829
18579 msgid "To cause the server to exit, send it the exit command:"
18583 #: ../fish/guestfish.pod:831
18586 " guestfish --remote exit\n"
18591 #: ../fish/guestfish.pod:833
18593 "Note that the server will normally exit if there is an error in a command. "
18594 "You can change this in the usual way. See section L</EXIT ON ERROR "
18599 #: ../fish/guestfish.pod:837
18600 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
18604 #: ../fish/guestfish.pod:839
18606 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
18607 "is how the I<--remote> option knows where to send the commands. You can "
18608 "have several guestfish listener processes running using:"
18612 #: ../fish/guestfish.pod:843
18615 " eval \"`guestfish --listen`\"\n"
18616 " pid1=$GUESTFISH_PID\n"
18617 " eval \"`guestfish --listen`\"\n"
18618 " pid2=$GUESTFISH_PID\n"
18620 " guestfish --remote=$pid1 cmd\n"
18621 " guestfish --remote=$pid2 cmd\n"
18626 #: ../fish/guestfish.pod:851
18627 msgid "REMOTE CONTROL AND CSH"
18631 #: ../fish/guestfish.pod:853
18633 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
18638 #: ../fish/guestfish.pod:856
18641 " eval \"`guestfish --listen --csh`\"\n"
18646 #: ../fish/guestfish.pod:858
18647 msgid "REMOTE CONTROL DETAILS"
18651 #: ../fish/guestfish.pod:860
18653 "Remote control happens over a Unix domain socket called "
18654 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
18655 "of the process, and C<$PID> is the process ID of the server."
18659 #: ../fish/guestfish.pod:864
18660 msgid "Guestfish client and server versions must match exactly."
18664 #: ../fish/guestfish.pod:866
18665 msgid "PREPARED DISK IMAGES"
18669 #: ../fish/guestfish.pod:868
18671 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
18672 "preformatted disk images that guestfish can make for you to save typing. "
18673 "This is particularly useful for testing purposes. This option is used "
18674 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
18675 "can be mixed with I<-a>)."
18679 #: ../fish/guestfish.pod:874
18681 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
18682 "the second and so on. Existing files in the current directory are "
18687 #: ../fish/guestfish.pod:878
18689 "The type briefly describes how the disk should be sized, partitioned, how "
18690 "filesystem(s) should be created, and how content should be added. "
18691 "Optionally the type can be followed by extra parameters, separated by C<:> "
18692 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
18693 "sparsely-allocated disk, containing a single partition, with the partition "
18694 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
18695 "on a 1GB disk instead."
18699 #: ../fish/guestfish.pod:886
18700 msgid "To list the available types and any extra parameters they take, run:"
18704 #: ../fish/guestfish.pod:890
18706 "Note that the prepared filesystem is not mounted. You would usually have to "
18707 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
18711 #: ../fish/guestfish.pod:894
18713 "If any I<-N> or I<--new> options are given, the guest is automatically "
18718 #: ../fish/guestfish.pod:899
18719 msgid "Create a 100MB disk with an ext4-formatted partition:"
18723 #: ../fish/guestfish.pod:901
18726 " guestfish -N fs:ext4\n"
18731 #: ../fish/guestfish.pod:903
18732 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
18736 #: ../fish/guestfish.pod:905
18739 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
18744 #: ../fish/guestfish.pod:907
18745 msgid "Create a blank 200MB disk:"
18749 #: ../fish/guestfish.pod:909
18752 " guestfish -N disk:200M\n"
18757 #: ../fish/guestfish.pod:911
18758 msgid "PROGRESS BARS"
18762 #: ../fish/guestfish.pod:913
18764 "Some (not all) long-running commands send progress notification messages as "
18765 "they are running. Guestfish turns these messages into progress bars."
18769 #: ../fish/guestfish.pod:917
18771 "When a command that supports progress bars takes longer than two seconds to "
18772 "run, and if progress bars are enabled, then you will see one appearing below "
18777 #: ../fish/guestfish.pod:921
18780 " ><fs> copy-size /large-file /another-file 2048M\n"
18781 " / 10% [#####-----------------------------------------] 00:30\n"
18786 #: ../fish/guestfish.pod:924
18788 "The spinner on the left hand side moves round once for every progress "
18789 "notification received from the backend. This is a (reasonably) golden "
18790 "assurance that the command is \"doing something\" even if the progress bar "
18791 "is not moving, because the command is able to send the progress "
18792 "notifications. When the bar reaches 100% and the command finishes, the "
18793 "spinner disappears."
18797 #: ../fish/guestfish.pod:931
18799 "Progress bars are enabled by default when guestfish is used interactively. "
18800 "You can enable them even for non-interactive modes using I<--progress-bars>, "
18801 "and you can disable them completely using I<--no-progress-bars>."
18805 #: ../fish/guestfish.pod:936
18806 msgid "GUESTFISH COMMANDS"
18810 #: ../fish/guestfish.pod:938
18812 "The commands in this section are guestfish convenience commands, in other "
18813 "words, they are not part of the L<guestfs(3)> API."
18817 #: ../fish/guestfish.pod:941
18822 #: ../fish/guestfish.pod:943
18831 #: ../fish/guestfish.pod:946
18832 msgid "Without any parameter, this provides general help."
18836 #: ../fish/guestfish.pod:948
18837 msgid "With a C<cmd> parameter, this displays detailed help for that command."
18841 #: ../fish/guestfish.pod:950
18842 msgid "quit | exit"
18846 #: ../fish/guestfish.pod:952
18847 msgid "This exits guestfish. You can also use C<^D> key."
18851 #: ../fish/guestfish.pod:954
18852 msgid "@FISH_COMMANDS@"
18856 #: ../fish/guestfish.pod:956
18861 #: ../fish/guestfish.pod:960 ../test-tool/libguestfs-test-tool.pod:83
18866 #: ../fish/guestfish.pod:962
18868 "guestfish returns 0 if the commands completed without error, or 1 if there "
18873 #: ../fish/guestfish.pod:969
18878 #: ../fish/guestfish.pod:971
18880 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
18885 #: ../fish/guestfish.pod:974
18886 msgid "GUESTFISH_PID"
18890 #: ../fish/guestfish.pod:976
18892 "Used with the I<--remote> option to specify the remote guestfish process to "
18893 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
18897 #: ../fish/guestfish.pod:980
18902 #: ../fish/guestfish.pod:982
18904 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
18905 "not specified, the external L<hexedit(1)> program is used."
18909 #: ../fish/guestfish.pod:986
18914 #: ../fish/guestfish.pod:988
18916 "If compiled with GNU readline support, various files in the home directory "
18917 "can be used. See L</FILES>."
18921 #: ../fish/guestfish.pod:997
18923 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
18924 "effect as using the B<-v> option."
18928 #: ../fish/guestfish.pod:1009
18930 "Set the path that guestfish uses to search for kernel and initrd.img. See "
18931 "the discussion of paths in L<guestfs(3)>."
18935 #: ../fish/guestfish.pod:1020
18936 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
18940 #: ../fish/guestfish.pod:1022
18945 #: ../fish/guestfish.pod:1024
18947 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
18952 #: ../fish/guestfish.pod:1039 ../test-tool/libguestfs-test-tool.pod:88
18957 #: ../fish/guestfish.pod:1043
18958 msgid "$HOME/.guestfish"
18962 #: ../fish/guestfish.pod:1045
18964 "If compiled with GNU readline support, then the command history is saved in "
18969 #: ../fish/guestfish.pod:1048
18970 msgid "$HOME/.inputrc"
18974 #: ../fish/guestfish.pod:1050
18975 msgid "/etc/inputrc"
18979 #: ../fish/guestfish.pod:1052
18981 "If compiled with GNU readline support, then these files can be used to "
18982 "configure readline. For further information, please see "
18983 "L<readline(3)/INITIALIZATION FILE>."
18987 #: ../fish/guestfish.pod:1056
18988 msgid "To write rules which only apply to guestfish, use:"
18992 #: ../fish/guestfish.pod:1058
19002 #: ../fish/guestfish.pod:1062
19004 "Variables that you can set in inputrc that change the behaviour of guestfish "
19005 "in useful ways include:"
19009 #: ../fish/guestfish.pod:1067
19010 msgid "completion-ignore-case (default: on)"
19014 #: ../fish/guestfish.pod:1069
19016 "By default, guestfish will ignore case when tab-completing paths on the "
19021 #: ../fish/guestfish.pod:1072
19024 " set completion-ignore-case off\n"
19029 #: ../fish/guestfish.pod:1074
19030 msgid "to make guestfish case sensitive."
19034 #: ../fish/guestfish.pod:1078
19039 #: ../fish/guestfish.pod:1080
19040 msgid "test2.img (etc)"
19044 #: ../fish/guestfish.pod:1082
19046 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
19047 "will be created in the file C<test1.img> in the current directory. The "
19048 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
19049 "the same name will be overwritten."
19053 #: ../fish/guestfish.pod:1091
19055 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
19056 "L<virt-edit(1)>, L<virt-filesystems(1)>, L<virt-inspector(1)>, "
19057 "L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, L<virt-ls(1)>, "
19058 "L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, L<virt-tar(1)>, "
19059 "L<virt-win-reg(1)>, L<hexedit(1)>."
19063 #: ../fish/guestfish.pod:1117 ../test-tool/libguestfs-test-tool.pod:124 ../fuse/guestmount.pod:253 ../tools/virt-edit.pl:370 ../tools/virt-win-reg.pl:606 ../tools/virt-resize.pl:1512 ../tools/virt-list-filesystems.pl:210 ../tools/virt-tar.pl:300 ../tools/virt-make-fs.pl:567 ../tools/virt-list-partitions.pl:277
19065 "This program is free software; you can redistribute it and/or modify it "
19066 "under the terms of the GNU General Public License as published by the Free "
19067 "Software Foundation; either version 2 of the License, or (at your option) "
19068 "any later version."
19072 #: ../fish/guestfish.pod:1122 ../test-tool/libguestfs-test-tool.pod:129 ../fuse/guestmount.pod:258 ../tools/virt-edit.pl:375 ../tools/virt-win-reg.pl:611 ../tools/virt-resize.pl:1517 ../tools/virt-list-filesystems.pl:215 ../tools/virt-tar.pl:305 ../tools/virt-make-fs.pl:572 ../tools/virt-list-partitions.pl:282
19074 "This program is distributed in the hope that it will be useful, but WITHOUT "
19075 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
19076 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
19081 #: ../fish/guestfish.pod:1127 ../test-tool/libguestfs-test-tool.pod:134 ../fuse/guestmount.pod:263 ../tools/virt-edit.pl:380 ../tools/virt-win-reg.pl:616 ../tools/virt-resize.pl:1522 ../tools/virt-list-filesystems.pl:220 ../tools/virt-tar.pl:310 ../tools/virt-make-fs.pl:577 ../tools/virt-list-partitions.pl:287
19083 "You should have received a copy of the GNU General Public License along with "
19084 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
19085 "Ave, Cambridge, MA 02139, USA."
19089 #: ../fish/guestfish-actions.pod:1
19094 #: ../fish/guestfish-actions.pod:3
19097 " add-cdrom filename\n"
19102 #: ../fish/guestfish-actions.pod:15
19104 "This call checks for the existence of C<filename>. This stops you from "
19105 "specifying other types of drive which are supported by qemu such as C<nbd:> "
19106 "and C<http:> URLs. To specify those, use the general L</config> call "
19111 #: ../fish/guestfish-actions.pod:22
19113 "If you just want to add an ISO file (often you use this as an efficient way "
19114 "to transfer large files into the guest), then you should probably use "
19115 "L</add-drive-ro> instead."
19119 #: ../fish/guestfish-actions.pod:35
19124 #: ../fish/guestfish-actions.pod:37
19129 #: ../fish/guestfish-actions.pod:39
19132 " add-domain dom [libvirturi:..] [readonly:..] [iface:..]\n"
19137 #: ../fish/guestfish-actions.pod:41
19139 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
19140 "It works by connecting to libvirt, requesting the domain and domain XML from "
19141 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
19145 #: ../fish/guestfish-actions.pod:58
19147 "The optional C<libvirturi> parameter sets the libvirt URI (see "
19148 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
19149 "default libvirt URI (or one set through an environment variable, see the "
19150 "libvirt documentation for full details). If you are using the C API "
19151 "directly then it is more flexible to create the libvirt connection object "
19152 "yourself, get the domain object, and call L</add-libvirt-dom>."
19156 #: ../fish/guestfish-actions.pod:66
19158 "The other optional parameters are passed directly through to "
19159 "L</add-drive-opts>."
19163 #: ../fish/guestfish-actions.pod:69 ../fish/guestfish-actions.pod:133 ../fish/guestfish-actions.pod:2844
19165 "This command has one or more optional arguments. See L</OPTIONAL "
19170 #: ../fish/guestfish-actions.pod:71
19175 #: ../fish/guestfish-actions.pod:73
19178 " add-drive filename\n"
19183 #: ../fish/guestfish-actions.pod:75
19185 "This function is the equivalent of calling L</add-drive-opts> with no "
19186 "optional parameters, so the disk is added writable, with the format being "
19187 "detected automatically."
19191 #: ../fish/guestfish-actions.pod:79
19193 "Automatic detection of the format opens you up to a potential security hole "
19194 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
19195 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
19196 "you should think about replacing calls to this function with calls to "
19197 "L</add-drive-opts>, and specifying the format."
19201 #: ../fish/guestfish-actions.pod:86
19202 msgid "add-drive-opts"
19206 #: ../fish/guestfish-actions.pod:88
19211 #: ../fish/guestfish-actions.pod:90
19214 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
19219 #: ../fish/guestfish-actions.pod:117
19221 "This forces the image format. If you omit this (or use L</add-drive> or "
19222 "L</add-drive-ro>) then the format is automatically detected. Possible "
19223 "formats include C<raw> and C<qcow2>."
19227 #: ../fish/guestfish-actions.pod:128
19229 "This rarely-used option lets you emulate the behaviour of the deprecated "
19230 "L</add-drive-with-if> call (q.v.)"
19234 #: ../fish/guestfish-actions.pod:135
19235 msgid "add-drive-ro"
19239 #: ../fish/guestfish-actions.pod:137
19244 #: ../fish/guestfish-actions.pod:139
19247 " add-drive-ro filename\n"
19252 #: ../fish/guestfish-actions.pod:141
19254 "This function is the equivalent of calling L</add-drive-opts> with the "
19255 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
19256 "is added read-only, with the format being detected automatically."
19260 #: ../fish/guestfish-actions.pod:146
19261 msgid "add-drive-ro-with-if"
19265 #: ../fish/guestfish-actions.pod:148
19268 " add-drive-ro-with-if filename iface\n"
19273 #: ../fish/guestfish-actions.pod:150
19275 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
19276 "interface emulation to use at run time."
19280 #: ../fish/guestfish-actions.pod:160
19281 msgid "add-drive-with-if"
19285 #: ../fish/guestfish-actions.pod:162
19288 " add-drive-with-if filename iface\n"
19293 #: ../fish/guestfish-actions.pod:164
19295 "This is the same as L</add-drive> but it allows you to specify the QEMU "
19296 "interface emulation to use at run time."
19300 #: ../fish/guestfish-actions.pod:174
19305 #: ../fish/guestfish-actions.pod:176
19308 " aug-clear augpath\n"
19313 #: ../fish/guestfish-actions.pod:181
19318 #: ../fish/guestfish-actions.pod:183
19326 #: ../fish/guestfish-actions.pod:185
19328 "Close the current Augeas handle and free up any resources used by it. After "
19329 "calling this, you have to call L</aug-init> again before you can use any "
19330 "other Augeas functions."
19334 #: ../fish/guestfish-actions.pod:190
19335 msgid "aug-defnode"
19339 #: ../fish/guestfish-actions.pod:192
19342 " aug-defnode name expr val\n"
19347 #: ../fish/guestfish-actions.pod:197
19349 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
19350 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
19351 "containing that single node."
19355 #: ../fish/guestfish-actions.pod:205
19360 #: ../fish/guestfish-actions.pod:207
19363 " aug-defvar name expr\n"
19368 #: ../fish/guestfish-actions.pod:216
19373 #: ../fish/guestfish-actions.pod:218
19376 " aug-get augpath\n"
19381 #: ../fish/guestfish-actions.pod:223
19386 #: ../fish/guestfish-actions.pod:225
19389 " aug-init root flags\n"
19394 #: ../fish/guestfish-actions.pod:231
19395 msgid "You must call this before using any other L</aug-*> commands."
19399 #: ../fish/guestfish-actions.pod:266
19400 msgid "Do not load the tree in L</aug-init>."
19404 #: ../fish/guestfish-actions.pod:270
19405 msgid "To close the handle, you can call L</aug-close>."
19409 #: ../fish/guestfish-actions.pod:274
19414 #: ../fish/guestfish-actions.pod:276
19417 " aug-insert augpath label true|false\n"
19422 #: ../fish/guestfish-actions.pod:286
19427 #: ../fish/guestfish-actions.pod:288
19435 #: ../fish/guestfish-actions.pod:295
19440 #: ../fish/guestfish-actions.pod:297
19443 " aug-ls augpath\n"
19448 #: ../fish/guestfish-actions.pod:299
19450 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
19451 "resulting nodes into alphabetical order."
19455 #: ../fish/guestfish-actions.pod:302
19460 #: ../fish/guestfish-actions.pod:304
19463 " aug-match augpath\n"
19468 #: ../fish/guestfish-actions.pod:310
19473 #: ../fish/guestfish-actions.pod:312
19476 " aug-mv src dest\n"
19481 #: ../fish/guestfish-actions.pod:317
19486 #: ../fish/guestfish-actions.pod:319
19489 " aug-rm augpath\n"
19494 #: ../fish/guestfish-actions.pod:325
19499 #: ../fish/guestfish-actions.pod:327
19507 #: ../fish/guestfish-actions.pod:331
19509 "The flags which were passed to L</aug-init> affect exactly how files are "
19514 #: ../fish/guestfish-actions.pod:334
19519 #: ../fish/guestfish-actions.pod:336
19522 " aug-set augpath val\n"
19527 #: ../fish/guestfish-actions.pod:340
19529 "In the Augeas API, it is possible to clear a node by setting the value to "
19530 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
19531 "this call. Instead you must use the L</aug-clear> call."
19535 #: ../fish/guestfish-actions.pod:345
19540 #: ../fish/guestfish-actions.pod:347
19543 " available 'groups ...'\n"
19548 #: ../fish/guestfish-actions.pod:353
19550 "The libguestfs groups, and the functions that those groups correspond to, "
19551 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
19552 "runtime by calling L</available-all-groups>."
19556 #: ../fish/guestfish-actions.pod:377
19557 msgid "You must call L</launch> before calling this function."
19561 #: ../fish/guestfish-actions.pod:399
19563 "This call was added in version C<1.0.80>. In previous versions of "
19564 "libguestfs all you could do would be to speculatively execute a command to "
19565 "find out if the daemon implemented it. See also L</version>."
19569 #: ../fish/guestfish-actions.pod:406
19570 msgid "available-all-groups"
19574 #: ../fish/guestfish-actions.pod:408
19577 " available-all-groups\n"
19582 #: ../fish/guestfish-actions.pod:410
19584 "This command returns a list of all optional groups that this daemon knows "
19585 "about. Note this returns both supported and unsupported groups. To find "
19586 "out which ones the daemon can actually support you have to call "
19587 "L</available> on each member of the returned list."
19591 #: ../fish/guestfish-actions.pod:416
19592 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
19596 #: ../fish/guestfish-actions.pod:418
19601 #: ../fish/guestfish-actions.pod:420
19604 " base64-in (base64file|-) filename\n"
19609 #: ../fish/guestfish-actions.pod:425 ../fish/guestfish-actions.pod:434 ../fish/guestfish-actions.pod:658 ../fish/guestfish-actions.pod:827 ../fish/guestfish-actions.pod:846 ../fish/guestfish-actions.pod:1223 ../fish/guestfish-actions.pod:4199 ../fish/guestfish-actions.pod:4211 ../fish/guestfish-actions.pod:4222 ../fish/guestfish-actions.pod:4233 ../fish/guestfish-actions.pod:4285 ../fish/guestfish-actions.pod:4294 ../fish/guestfish-actions.pod:4348 ../fish/guestfish-actions.pod:4371
19610 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
19614 #: ../fish/guestfish-actions.pod:427
19619 #: ../fish/guestfish-actions.pod:429
19622 " base64-out filename (base64file|-)\n"
19627 #: ../fish/guestfish-actions.pod:436
19628 msgid "blockdev-flushbufs"
19632 #: ../fish/guestfish-actions.pod:438
19635 " blockdev-flushbufs device\n"
19640 #: ../fish/guestfish-actions.pod:445
19641 msgid "blockdev-getbsz"
19645 #: ../fish/guestfish-actions.pod:447
19648 " blockdev-getbsz device\n"
19653 #: ../fish/guestfish-actions.pod:456
19654 msgid "blockdev-getro"
19658 #: ../fish/guestfish-actions.pod:458
19661 " blockdev-getro device\n"
19666 #: ../fish/guestfish-actions.pod:465
19667 msgid "blockdev-getsize64"
19671 #: ../fish/guestfish-actions.pod:467
19674 " blockdev-getsize64 device\n"
19679 #: ../fish/guestfish-actions.pod:471
19680 msgid "See also L</blockdev-getsz>."
19684 #: ../fish/guestfish-actions.pod:475
19685 msgid "blockdev-getss"
19689 #: ../fish/guestfish-actions.pod:477
19692 " blockdev-getss device\n"
19697 #: ../fish/guestfish-actions.pod:482
19698 msgid "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
19702 #: ../fish/guestfish-actions.pod:487
19703 msgid "blockdev-getsz"
19707 #: ../fish/guestfish-actions.pod:489
19710 " blockdev-getsz device\n"
19715 #: ../fish/guestfish-actions.pod:494
19717 "See also L</blockdev-getss> for the real sector size of the device, and "
19718 "L</blockdev-getsize64> for the more useful I<size in bytes>."
19722 #: ../fish/guestfish-actions.pod:500
19723 msgid "blockdev-rereadpt"
19727 #: ../fish/guestfish-actions.pod:502
19730 " blockdev-rereadpt device\n"
19735 #: ../fish/guestfish-actions.pod:508
19736 msgid "blockdev-setbsz"
19740 #: ../fish/guestfish-actions.pod:510
19743 " blockdev-setbsz device blocksize\n"
19748 #: ../fish/guestfish-actions.pod:519
19749 msgid "blockdev-setro"
19753 #: ../fish/guestfish-actions.pod:521
19756 " blockdev-setro device\n"
19761 #: ../fish/guestfish-actions.pod:527
19762 msgid "blockdev-setrw"
19766 #: ../fish/guestfish-actions.pod:529
19769 " blockdev-setrw device\n"
19774 #: ../fish/guestfish-actions.pod:535
19775 msgid "case-sensitive-path"
19779 #: ../fish/guestfish-actions.pod:537
19782 " case-sensitive-path path\n"
19787 #: ../fish/guestfish-actions.pod:561
19789 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return "
19790 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
19791 "how the directories were originally created under Windows)."
19795 #: ../fish/guestfish-actions.pod:569
19796 msgid "See also L</realpath>."
19800 #: ../fish/guestfish-actions.pod:571
19805 #: ../fish/guestfish-actions.pod:573
19813 #: ../fish/guestfish-actions.pod:577
19815 "Note that this function cannot correctly handle binary files (specifically, "
19816 "files containing C<\\0> character which is treated as end of string). For "
19817 "those you need to use the L</read-file> or L</download> functions which have "
19818 "a more complex interface."
19822 #: ../fish/guestfish-actions.pod:585
19827 #: ../fish/guestfish-actions.pod:587
19830 " checksum csumtype path\n"
19835 #: ../fish/guestfish-actions.pod:630
19836 msgid "To get the checksum for a device, use L</checksum-device>."
19840 #: ../fish/guestfish-actions.pod:632
19841 msgid "To get the checksums for many files, use L</checksums-out>."
19845 #: ../fish/guestfish-actions.pod:634
19846 msgid "checksum-device"
19850 #: ../fish/guestfish-actions.pod:636
19853 " checksum-device csumtype device\n"
19858 #: ../fish/guestfish-actions.pod:638
19860 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
19861 "device named C<device>. For the types of checksums supported see the "
19862 "L</checksum> command."
19866 #: ../fish/guestfish-actions.pod:642
19867 msgid "checksums-out"
19871 #: ../fish/guestfish-actions.pod:644
19874 " checksums-out csumtype directory (sumsfile|-)\n"
19879 #: ../fish/guestfish-actions.pod:660
19884 #: ../fish/guestfish-actions.pod:662
19887 " chmod mode path\n"
19892 #: ../fish/guestfish-actions.pod:673
19897 #: ../fish/guestfish-actions.pod:675
19900 " chown owner group path\n"
19905 #: ../fish/guestfish-actions.pod:683
19910 #: ../fish/guestfish-actions.pod:685
19913 " command 'arguments ...'\n"
19918 #: ../fish/guestfish-actions.pod:692
19920 "The single parameter is an argv-style list of arguments. The first element "
19921 "is the name of the program to run. Subsequent elements are parameters. The "
19922 "list must be non-empty (ie. must contain a program name). Note that the "
19923 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
19927 #: ../fish/guestfish-actions.pod:720
19928 msgid "command-lines"
19932 #: ../fish/guestfish-actions.pod:722
19935 " command-lines 'arguments ...'\n"
19940 #: ../fish/guestfish-actions.pod:724
19941 msgid "This is the same as L</command>, but splits the result into a list of lines."
19945 #: ../fish/guestfish-actions.pod:727
19946 msgid "See also: L</sh-lines>"
19950 #: ../fish/guestfish-actions.pod:732
19955 #: ../fish/guestfish-actions.pod:734
19958 " config qemuparam qemuvalue\n"
19963 #: ../fish/guestfish-actions.pod:745
19968 #: ../fish/guestfish-actions.pod:747
19971 " copy-size src dest size\n"
19976 #: ../fish/guestfish-actions.pod:755
19981 #: ../fish/guestfish-actions.pod:757
19989 #: ../fish/guestfish-actions.pod:762
19994 #: ../fish/guestfish-actions.pod:764
20002 #: ../fish/guestfish-actions.pod:769
20007 #: ../fish/guestfish-actions.pod:771
20015 #: ../fish/guestfish-actions.pod:778
20017 "If the destination is a device, it must be as large or larger than the "
20018 "source file or device, otherwise the copy will fail. This command cannot do "
20019 "partial copies (see L</copy-size>)."
20023 #: ../fish/guestfish-actions.pod:782
20028 #: ../fish/guestfish-actions.pod:784
20036 #: ../fish/guestfish-actions.pod:792
20041 #: ../fish/guestfish-actions.pod:794
20049 #: ../fish/guestfish-actions.pod:803
20054 #: ../fish/guestfish-actions.pod:805
20062 #: ../fish/guestfish-actions.pod:811
20064 "Another way to get the same information is to enable verbose messages with "
20065 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
20066 "before running the program."
20070 #: ../fish/guestfish-actions.pod:816
20075 #: ../fish/guestfish-actions.pod:818
20078 " download remotefilename (filename|-)\n"
20083 #: ../fish/guestfish-actions.pod:825
20084 msgid "See also L</upload>, L</cat>."
20088 #: ../fish/guestfish-actions.pod:829
20089 msgid "download-offset"
20093 #: ../fish/guestfish-actions.pod:831
20096 " download-offset remotefilename (filename|-) offset size\n"
20101 #: ../fish/guestfish-actions.pod:839
20103 "Note that there is no limit on the amount of data that can be downloaded "
20104 "with this call, unlike with L</pread>, and this call always reads the full "
20105 "amount unless an error occurs."
20109 #: ../fish/guestfish-actions.pod:844
20110 msgid "See also L</download>, L</pread>."
20114 #: ../fish/guestfish-actions.pod:848
20115 msgid "drop-caches"
20119 #: ../fish/guestfish-actions.pod:850
20122 " drop-caches whattodrop\n"
20127 #: ../fish/guestfish-actions.pod:862
20132 #: ../fish/guestfish-actions.pod:864
20140 #: ../fish/guestfish-actions.pod:876
20145 #: ../fish/guestfish-actions.pod:878
20148 " e2fsck-f device\n"
20153 #: ../fish/guestfish-actions.pod:884
20155 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
20156 "should use L</fsck>."
20160 #: ../fish/guestfish-actions.pod:887
20161 msgid "echo-daemon"
20165 #: ../fish/guestfish-actions.pod:889
20168 " echo-daemon 'words ...'\n"
20173 #: ../fish/guestfish-actions.pod:896
20174 msgid "See also L</ping-daemon>."
20178 #: ../fish/guestfish-actions.pod:898
20183 #: ../fish/guestfish-actions.pod:900
20186 " egrep regex path\n"
20191 #: ../fish/guestfish-actions.pod:908
20196 #: ../fish/guestfish-actions.pod:910
20199 " egrepi regex path\n"
20204 #: ../fish/guestfish-actions.pod:918
20209 #: ../fish/guestfish-actions.pod:920
20212 " equal file1 file2\n"
20217 #: ../fish/guestfish-actions.pod:927
20222 #: ../fish/guestfish-actions.pod:929
20230 #: ../fish/guestfish-actions.pod:934
20231 msgid "See also L</is-file>, L</is-dir>, L</stat>."
20235 #: ../fish/guestfish-actions.pod:936
20240 #: ../fish/guestfish-actions.pod:938
20243 " fallocate path len\n"
20248 #: ../fish/guestfish-actions.pod:955
20249 msgid "fallocate64"
20253 #: ../fish/guestfish-actions.pod:957
20256 " fallocate64 path len\n"
20261 #: ../fish/guestfish-actions.pod:963
20263 "Note that this call allocates disk blocks for the file. To create a sparse "
20264 "file use L</truncate-size> instead."
20268 #: ../fish/guestfish-actions.pod:966
20270 "The deprecated call L</fallocate> does the same, but owing to an oversight "
20271 "it only allowed 30 bit lengths to be specified, effectively limiting the "
20272 "maximum size of files created through that call to 1GB."
20276 #: ../fish/guestfish-actions.pod:975
20281 #: ../fish/guestfish-actions.pod:977
20284 " fgrep pattern path\n"
20289 #: ../fish/guestfish-actions.pod:985
20294 #: ../fish/guestfish-actions.pod:987
20297 " fgrepi pattern path\n"
20302 #: ../fish/guestfish-actions.pod:995
20307 #: ../fish/guestfish-actions.pod:997
20315 #: ../fish/guestfish-actions.pod:1009
20317 "This command can also be used on C</dev/> devices (and partitions, LV "
20318 "names). You can for example use this to determine if a device contains a "
20319 "filesystem, although it's usually better to use L</vfs-type>."
20323 #: ../fish/guestfish-actions.pod:1019
20324 msgid "file-architecture"
20328 #: ../fish/guestfish-actions.pod:1021
20331 " file-architecture filename\n"
20336 #: ../fish/guestfish-actions.pod:1124
20341 #: ../fish/guestfish-actions.pod:1126
20349 #: ../fish/guestfish-actions.pod:1130
20351 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, "
20352 "L</is-file> etc. To get the size of block devices, use "
20353 "L</blockdev-getsize64>."
20357 #: ../fish/guestfish-actions.pod:1134
20362 #: ../fish/guestfish-actions.pod:1136
20365 " fill c len path\n"
20370 #: ../fish/guestfish-actions.pod:1142
20372 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
20373 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
20374 "L</fill-pattern>."
20378 #: ../fish/guestfish-actions.pod:1147
20379 msgid "fill-pattern"
20383 #: ../fish/guestfish-actions.pod:1149
20386 " fill-pattern pattern len path\n"
20391 #: ../fish/guestfish-actions.pod:1151
20393 "This function is like L</fill> except that it creates a new file of length "
20394 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
20395 "is truncated if necessary to ensure the length of the file is exactly C<len> "
20400 #: ../fish/guestfish-actions.pod:1156
20405 #: ../fish/guestfish-actions.pod:1158
20408 " find directory\n"
20413 #: ../fish/guestfish-actions.pod:1172
20414 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
20418 #: ../fish/guestfish-actions.pod:1185
20419 msgid "See also L</find0>."
20423 #: ../fish/guestfish-actions.pod:1190
20428 #: ../fish/guestfish-actions.pod:1192
20431 " find0 directory (files|-)\n"
20436 #: ../fish/guestfish-actions.pod:1198
20437 msgid "This command works the same way as L</find> with the following exceptions:"
20441 #: ../fish/guestfish-actions.pod:1225
20442 msgid "findfs-label"
20446 #: ../fish/guestfish-actions.pod:1227
20449 " findfs-label label\n"
20454 #: ../fish/guestfish-actions.pod:1233
20455 msgid "To find the label of a filesystem, use L</vfs-label>."
20459 #: ../fish/guestfish-actions.pod:1235
20460 msgid "findfs-uuid"
20464 #: ../fish/guestfish-actions.pod:1237
20467 " findfs-uuid uuid\n"
20472 #: ../fish/guestfish-actions.pod:1243
20473 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
20477 #: ../fish/guestfish-actions.pod:1245
20482 #: ../fish/guestfish-actions.pod:1247
20485 " fsck fstype device\n"
20490 #: ../fish/guestfish-actions.pod:1277
20495 #: ../fish/guestfish-actions.pod:1279
20503 #: ../fish/guestfish-actions.pod:1286
20504 msgid "get-autosync"
20508 #: ../fish/guestfish-actions.pod:1288
20516 #: ../fish/guestfish-actions.pod:1292
20521 #: ../fish/guestfish-actions.pod:1294
20529 #: ../fish/guestfish-actions.pod:1298
20530 msgid "get-e2label"
20534 #: ../fish/guestfish-actions.pod:1300
20537 " get-e2label device\n"
20542 #: ../fish/guestfish-actions.pod:1312
20547 #: ../fish/guestfish-actions.pod:1314
20550 " get-e2uuid device\n"
20555 #: ../fish/guestfish-actions.pod:1326
20556 msgid "get-memsize"
20560 #: ../fish/guestfish-actions.pod:1328
20568 #: ../fish/guestfish-actions.pod:1333
20570 "If L</set-memsize> was not called on this handle, and if "
20571 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
20572 "value for memsize."
20576 #: ../fish/guestfish-actions.pod:1340
20577 msgid "get-network"
20581 #: ../fish/guestfish-actions.pod:1342
20589 #: ../fish/guestfish-actions.pod:1346
20594 #: ../fish/guestfish-actions.pod:1348
20602 #: ../fish/guestfish-actions.pod:1355
20607 #: ../fish/guestfish-actions.pod:1357
20612 #: ../fish/guestfish-actions.pod:1359
20620 #: ../fish/guestfish-actions.pod:1366
20625 #: ../fish/guestfish-actions.pod:1368
20633 #: ../fish/guestfish-actions.pod:1375
20634 msgid "get-recovery-proc"
20638 #: ../fish/guestfish-actions.pod:1377
20641 " get-recovery-proc\n"
20646 #: ../fish/guestfish-actions.pod:1381
20647 msgid "get-selinux"
20651 #: ../fish/guestfish-actions.pod:1383
20659 #: ../fish/guestfish-actions.pod:1385
20661 "This returns the current setting of the selinux flag which is passed to the "
20662 "appliance at boot time. See L</set-selinux>."
20666 #: ../fish/guestfish-actions.pod:1391
20671 #: ../fish/guestfish-actions.pod:1393
20679 #: ../fish/guestfish-actions.pod:1400
20684 #: ../fish/guestfish-actions.pod:1402
20692 #: ../fish/guestfish-actions.pod:1406
20697 #: ../fish/guestfish-actions.pod:1408
20705 #: ../fish/guestfish-actions.pod:1410
20707 "Return the current umask. By default the umask is C<022> unless it has been "
20708 "set by calling L</umask>."
20712 #: ../fish/guestfish-actions.pod:1413
20713 msgid "get-verbose"
20717 #: ../fish/guestfish-actions.pod:1415
20725 #: ../fish/guestfish-actions.pod:1419
20730 #: ../fish/guestfish-actions.pod:1421
20738 #: ../fish/guestfish-actions.pod:1425
20739 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
20743 #: ../fish/guestfish-actions.pod:1428
20748 #: ../fish/guestfish-actions.pod:1430
20751 " getxattr path name\n"
20756 #: ../fish/guestfish-actions.pod:1432
20758 "Get a single extended attribute from file C<path> named C<name>. This call "
20759 "follows symlinks. If you want to lookup an extended attribute for the "
20760 "symlink itself, use L</lgetxattr>."
20764 #: ../fish/guestfish-actions.pod:1436 ../fish/guestfish-actions.pod:2263
20766 "Normally it is better to get all extended attributes from a file in one go "
20767 "by calling L</getxattrs>. However some Linux filesystem implementations are "
20768 "buggy and do not provide a way to list out attributes. For these "
20769 "filesystems (notably ntfs-3g) you have to know the names of the extended "
20770 "attributes you want in advance and call this function."
20774 #: ../fish/guestfish-actions.pod:1446
20775 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
20779 #: ../fish/guestfish-actions.pod:1448
20784 #: ../fish/guestfish-actions.pod:1450
20787 " getxattrs path\n"
20792 #: ../fish/guestfish-actions.pod:1458
20793 msgid "See also: L</lgetxattrs>, L<attr(5)>."
20797 #: ../fish/guestfish-actions.pod:1460
20798 msgid "glob-expand"
20802 #: ../fish/guestfish-actions.pod:1462
20805 " glob-expand pattern\n"
20810 #: ../fish/guestfish-actions.pod:1475
20815 #: ../fish/guestfish-actions.pod:1477
20818 " grep regex path\n"
20823 #: ../fish/guestfish-actions.pod:1485
20828 #: ../fish/guestfish-actions.pod:1487
20831 " grepi regex path\n"
20836 #: ../fish/guestfish-actions.pod:1495
20837 msgid "grub-install"
20841 #: ../fish/guestfish-actions.pod:1497
20844 " grub-install root device\n"
20849 #: ../fish/guestfish-actions.pod:1513
20854 #: ../fish/guestfish-actions.pod:1515
20862 #: ../fish/guestfish-actions.pod:1523
20867 #: ../fish/guestfish-actions.pod:1525
20870 " head-n nrlines path\n"
20875 #: ../fish/guestfish-actions.pod:1538
20880 #: ../fish/guestfish-actions.pod:1540
20888 #: ../fish/guestfish-actions.pod:1548
20893 #: ../fish/guestfish-actions.pod:1550
20896 " initrd-cat initrdpath filename\n"
20901 #: ../fish/guestfish-actions.pod:1562
20902 msgid "See also L</initrd-list>."
20906 #: ../fish/guestfish-actions.pod:1567
20907 msgid "initrd-list"
20911 #: ../fish/guestfish-actions.pod:1569
20914 " initrd-list path\n"
20919 #: ../fish/guestfish-actions.pod:1581
20920 msgid "inotify-add-watch"
20924 #: ../fish/guestfish-actions.pod:1583
20927 " inotify-add-watch path mask\n"
20932 #: ../fish/guestfish-actions.pod:1595
20933 msgid "inotify-close"
20937 #: ../fish/guestfish-actions.pod:1597
20945 #: ../fish/guestfish-actions.pod:1603
20946 msgid "inotify-files"
20950 #: ../fish/guestfish-actions.pod:1605
20958 #: ../fish/guestfish-actions.pod:1607
20960 "This function is a helpful wrapper around L</inotify-read> which just "
20961 "returns a list of pathnames of objects that were touched. The returned "
20962 "pathnames are sorted and deduplicated."
20966 #: ../fish/guestfish-actions.pod:1611
20967 msgid "inotify-init"
20971 #: ../fish/guestfish-actions.pod:1613
20974 " inotify-init maxevents\n"
20979 #: ../fish/guestfish-actions.pod:1619
20981 "C<maxevents> is the maximum number of events which will be queued up between "
20982 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
20983 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
20984 "default was 16384 events. Beyond this limit, the kernel throws away events, "
20985 "but records the fact that it threw them away by setting a flag "
20986 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
20990 #: ../fish/guestfish-actions.pod:1629
20992 "Before any events are generated, you have to add some watches to the "
20993 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
20994 "L</inotify-watch-all>."
20998 #: ../fish/guestfish-actions.pod:1635
21000 "Queued up events should be read periodically by calling L</inotify-read> (or "
21001 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
21002 "If you don't read the events out often enough then you risk the internal "
21003 "queue overflowing."
21007 #: ../fish/guestfish-actions.pod:1642
21009 "The handle should be closed after use by calling L</inotify-close>. This "
21010 "also removes any watches automatically."
21014 #: ../fish/guestfish-actions.pod:1651
21015 msgid "inotify-read"
21019 #: ../fish/guestfish-actions.pod:1653
21027 #: ../fish/guestfish-actions.pod:1666
21028 msgid "inotify-rm-watch"
21032 #: ../fish/guestfish-actions.pod:1668
21035 " inotify-rm-watch wd\n"
21040 #: ../fish/guestfish-actions.pod:1670
21041 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
21045 #: ../fish/guestfish-actions.pod:1673
21046 msgid "inspect-get-arch"
21050 #: ../fish/guestfish-actions.pod:1675
21053 " inspect-get-arch root\n"
21058 #: ../fish/guestfish-actions.pod:1677 ../fish/guestfish-actions.pod:1693 ../fish/guestfish-actions.pod:1767 ../fish/guestfish-actions.pod:1785 ../fish/guestfish-actions.pod:1800 ../fish/guestfish-actions.pod:1821 ../fish/guestfish-actions.pod:1836 ../fish/guestfish-actions.pod:1859 ../fish/guestfish-actions.pod:1881 ../fish/guestfish-actions.pod:1905 ../fish/guestfish-actions.pod:1935 ../fish/guestfish-actions.pod:1970 ../fish/guestfish-actions.pod:1986
21060 "This function should only be called with a root device string as returned by "
21065 #: ../fish/guestfish-actions.pod:1680
21067 "This returns the architecture of the inspected operating system. The "
21068 "possible return values are listed under L</file-architecture>."
21072 #: ../fish/guestfish-actions.pod:1689
21073 msgid "inspect-get-distro"
21077 #: ../fish/guestfish-actions.pod:1691
21080 " inspect-get-distro root\n"
21085 #: ../fish/guestfish-actions.pod:1763
21086 msgid "inspect-get-filesystems"
21090 #: ../fish/guestfish-actions.pod:1765
21093 " inspect-get-filesystems root\n"
21098 #: ../fish/guestfish-actions.pod:1778
21100 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
21101 "L</inspect-get-mountpoints>."
21105 #: ../fish/guestfish-actions.pod:1781
21106 msgid "inspect-get-hostname"
21110 #: ../fish/guestfish-actions.pod:1783
21113 " inspect-get-hostname root\n"
21118 #: ../fish/guestfish-actions.pod:1796
21119 msgid "inspect-get-major-version"
21123 #: ../fish/guestfish-actions.pod:1798
21126 " inspect-get-major-version root\n"
21131 #: ../fish/guestfish-actions.pod:1817
21132 msgid "inspect-get-minor-version"
21136 #: ../fish/guestfish-actions.pod:1819
21139 " inspect-get-minor-version root\n"
21144 #: ../fish/guestfish-actions.pod:1829
21146 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
21147 "L</inspect-get-major-version>."
21151 #: ../fish/guestfish-actions.pod:1832
21152 msgid "inspect-get-mountpoints"
21156 #: ../fish/guestfish-actions.pod:1834
21159 " inspect-get-mountpoints root\n"
21164 #: ../fish/guestfish-actions.pod:1852
21166 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
21167 "L</inspect-get-filesystems>."
21171 #: ../fish/guestfish-actions.pod:1855
21172 msgid "inspect-get-package-format"
21176 #: ../fish/guestfish-actions.pod:1857
21179 " inspect-get-package-format root\n"
21184 #: ../fish/guestfish-actions.pod:1862
21186 "This function and L</inspect-get-package-management> return the package "
21187 "format and package management tool used by the inspected operating system. "
21188 "For example for Fedora these functions would return C<rpm> (package format) "
21189 "and C<yum> (package management)."
21193 #: ../fish/guestfish-actions.pod:1877
21194 msgid "inspect-get-package-management"
21198 #: ../fish/guestfish-actions.pod:1879
21201 " inspect-get-package-management root\n"
21206 #: ../fish/guestfish-actions.pod:1884
21208 "L</inspect-get-package-format> and this function return the package format "
21209 "and package management tool used by the inspected operating system. For "
21210 "example for Fedora these functions would return C<rpm> (package format) and "
21211 "C<yum> (package management)."
21215 #: ../fish/guestfish-actions.pod:1901
21216 msgid "inspect-get-product-name"
21220 #: ../fish/guestfish-actions.pod:1903
21223 " inspect-get-product-name root\n"
21228 #: ../fish/guestfish-actions.pod:1918
21229 msgid "inspect-get-roots"
21233 #: ../fish/guestfish-actions.pod:1920
21236 " inspect-get-roots\n"
21241 #: ../fish/guestfish-actions.pod:1922
21243 "This function is a convenient way to get the list of root devices, as "
21244 "returned from a previous call to L</inspect-os>, but without redoing the "
21245 "whole inspection process."
21249 #: ../fish/guestfish-actions.pod:1926
21251 "This returns an empty list if either no root devices were found or the "
21252 "caller has not called L</inspect-os>."
21256 #: ../fish/guestfish-actions.pod:1931
21257 msgid "inspect-get-type"
21261 #: ../fish/guestfish-actions.pod:1933
21264 " inspect-get-type root\n"
21269 #: ../fish/guestfish-actions.pod:1966
21270 msgid "inspect-get-windows-systemroot"
21274 #: ../fish/guestfish-actions.pod:1968
21277 " inspect-get-windows-systemroot root\n"
21282 #: ../fish/guestfish-actions.pod:1982
21283 msgid "inspect-list-applications"
21287 #: ../fish/guestfish-actions.pod:1984
21290 " inspect-list-applications root\n"
21295 #: ../fish/guestfish-actions.pod:1991
21297 "I<Note:> This call works differently from other parts of the inspection "
21298 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
21299 "then mount up the disks, before calling this. Listing applications is a "
21300 "significantly more difficult operation which requires access to the full "
21301 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
21302 "are just returning data cached in the libguestfs handle, this call actually "
21303 "reads parts of the mounted filesystems during the call."
21307 #: ../fish/guestfish-actions.pod:2081
21312 #: ../fish/guestfish-actions.pod:2083
21320 #: ../fish/guestfish-actions.pod:2098
21322 "You can pass the root string(s) returned to other L</inspect-get-*> "
21323 "functions in order to query further information about each operating system, "
21324 "such as the name and version."
21328 #: ../fish/guestfish-actions.pod:2103
21330 "This function uses other libguestfs features such as L</mount-ro> and "
21331 "L</umount-all> in order to mount and unmount filesystems and look at the "
21332 "contents. This should be called with no disks currently mounted. The "
21333 "function may also use Augeas, so any existing Augeas handle will be closed."
21337 #: ../fish/guestfish-actions.pod:2115 ../fish/guestfish-actions.pod:2291 ../fish/guestfish-actions.pod:2337
21338 msgid "See also L</list-filesystems>."
21342 #: ../fish/guestfish-actions.pod:2117
21343 msgid "is-blockdev"
21347 #: ../fish/guestfish-actions.pod:2119
21350 " is-blockdev path\n"
21355 #: ../fish/guestfish-actions.pod:2124 ../fish/guestfish-actions.pod:2142 ../fish/guestfish-actions.pod:2161 ../fish/guestfish-actions.pod:2170 ../fish/guestfish-actions.pod:2180 ../fish/guestfish-actions.pod:2214 ../fish/guestfish-actions.pod:2223
21356 msgid "See also L</stat>."
21360 #: ../fish/guestfish-actions.pod:2126
21365 #: ../fish/guestfish-actions.pod:2128
21373 #: ../fish/guestfish-actions.pod:2135
21378 #: ../fish/guestfish-actions.pod:2137
21381 " is-chardev path\n"
21386 #: ../fish/guestfish-actions.pod:2144
21391 #: ../fish/guestfish-actions.pod:2146
21399 #: ../fish/guestfish-actions.pod:2153
21404 #: ../fish/guestfish-actions.pod:2155
21412 #: ../fish/guestfish-actions.pod:2163
21417 #: ../fish/guestfish-actions.pod:2165
21425 #: ../fish/guestfish-actions.pod:2172
21430 #: ../fish/guestfish-actions.pod:2174
21438 #: ../fish/guestfish-actions.pod:2182
21439 msgid "is-launching"
21443 #: ../fish/guestfish-actions.pod:2184
21451 #: ../fish/guestfish-actions.pod:2191
21456 #: ../fish/guestfish-actions.pod:2193
21464 #: ../fish/guestfish-actions.pod:2198
21469 #: ../fish/guestfish-actions.pod:2200
21477 #: ../fish/guestfish-actions.pod:2207
21482 #: ../fish/guestfish-actions.pod:2209
21485 " is-socket path\n"
21490 #: ../fish/guestfish-actions.pod:2216
21495 #: ../fish/guestfish-actions.pod:2218
21498 " is-symlink path\n"
21503 #: ../fish/guestfish-actions.pod:2225
21504 msgid "kill-subprocess"
21508 #: ../fish/guestfish-actions.pod:2227
21511 " kill-subprocess\n"
21516 #: ../fish/guestfish-actions.pod:2231
21521 #: ../fish/guestfish-actions.pod:2233
21526 #: ../fish/guestfish-actions.pod:2235
21534 #: ../fish/guestfish-actions.pod:2243
21539 #: ../fish/guestfish-actions.pod:2245
21542 " lchown owner group path\n"
21547 #: ../fish/guestfish-actions.pod:2247
21549 "Change the file owner to C<owner> and group to C<group>. This is like "
21550 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
21555 #: ../fish/guestfish-actions.pod:2255
21560 #: ../fish/guestfish-actions.pod:2257
21563 " lgetxattr path name\n"
21568 #: ../fish/guestfish-actions.pod:2273
21569 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
21573 #: ../fish/guestfish-actions.pod:2275
21578 #: ../fish/guestfish-actions.pod:2277
21581 " lgetxattrs path\n"
21586 #: ../fish/guestfish-actions.pod:2279
21588 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
21589 "it returns the extended attributes of the link itself."
21593 #: ../fish/guestfish-actions.pod:2283
21594 msgid "list-devices"
21598 #: ../fish/guestfish-actions.pod:2285
21606 #: ../fish/guestfish-actions.pod:2293
21607 msgid "list-filesystems"
21611 #: ../fish/guestfish-actions.pod:2295
21614 " list-filesystems\n"
21619 #: ../fish/guestfish-actions.pod:2314
21621 "This command runs other libguestfs commands, which might include L</mount> "
21622 "and L</umount>, and therefore you should use this soon after launch and only "
21623 "when nothing is mounted."
21627 #: ../fish/guestfish-actions.pod:2318
21629 "Not all of the filesystems returned will be mountable. In particular, swap "
21630 "partitions are returned in the list. Also this command does not check that "
21631 "each filesystem found is valid and mountable, and some filesystems might be "
21632 "mountable but require special options. Filesystems may not all belong to a "
21633 "single logical operating system (use L</inspect-os> to look for OSes)."
21637 #: ../fish/guestfish-actions.pod:2326
21638 msgid "list-partitions"
21642 #: ../fish/guestfish-actions.pod:2328
21645 " list-partitions\n"
21650 #: ../fish/guestfish-actions.pod:2334
21652 "This does not return logical volumes. For that you will need to call "
21657 #: ../fish/guestfish-actions.pod:2339
21662 #: ../fish/guestfish-actions.pod:2341
21670 #: ../fish/guestfish-actions.pod:2349
21675 #: ../fish/guestfish-actions.pod:2351
21678 " ln target linkname\n"
21683 #: ../fish/guestfish-actions.pod:2355
21688 #: ../fish/guestfish-actions.pod:2357
21691 " ln-f target linkname\n"
21696 #: ../fish/guestfish-actions.pod:2362
21701 #: ../fish/guestfish-actions.pod:2364
21704 " ln-s target linkname\n"
21709 #: ../fish/guestfish-actions.pod:2368
21714 #: ../fish/guestfish-actions.pod:2370
21717 " ln-sf target linkname\n"
21722 #: ../fish/guestfish-actions.pod:2375
21723 msgid "lremovexattr"
21727 #: ../fish/guestfish-actions.pod:2377
21730 " lremovexattr xattr path\n"
21735 #: ../fish/guestfish-actions.pod:2379
21737 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
21738 "it removes an extended attribute of the link itself."
21742 #: ../fish/guestfish-actions.pod:2383
21747 #: ../fish/guestfish-actions.pod:2385
21755 #: ../fish/guestfish-actions.pod:2391
21757 "This command is mostly useful for interactive sessions. Programs should "
21758 "probably use L</readdir> instead."
21762 #: ../fish/guestfish-actions.pod:2394
21767 #: ../fish/guestfish-actions.pod:2396
21770 " lsetxattr xattr val vallen path\n"
21775 #: ../fish/guestfish-actions.pod:2398
21777 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
21778 "sets an extended attribute of the link itself."
21782 #: ../fish/guestfish-actions.pod:2402
21787 #: ../fish/guestfish-actions.pod:2404
21795 #: ../fish/guestfish-actions.pod:2408
21797 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
21798 "the link is stat-ed, not the file it refers to."
21802 #: ../fish/guestfish-actions.pod:2414
21807 #: ../fish/guestfish-actions.pod:2416
21810 " lstatlist path 'names ...'\n"
21815 #: ../fish/guestfish-actions.pod:2418
21817 "This call allows you to perform the L</lstat> operation on multiple files, "
21818 "where all files are in the directory C<path>. C<names> is the list of files "
21819 "from this directory."
21823 #: ../fish/guestfish-actions.pod:2427
21825 "This call is intended for programs that want to efficiently list a directory "
21826 "contents without making many round-trips. See also L</lxattrlist> for a "
21827 "similarly efficient call for getting extended attributes. Very long "
21828 "directory listings might cause the protocol message size to be exceeded, "
21829 "causing this call to fail. The caller must split up such requests into "
21830 "smaller groups of names."
21834 #: ../fish/guestfish-actions.pod:2435
21835 msgid "luks-add-key"
21839 #: ../fish/guestfish-actions.pod:2437
21842 " luks-add-key device keyslot\n"
21847 #: ../fish/guestfish-actions.pod:2444
21849 "Note that if C<keyslot> already contains a key, then this command will "
21850 "fail. You have to use L</luks-kill-slot> first to remove that key."
21854 #: ../fish/guestfish-actions.pod:2448 ../fish/guestfish-actions.pod:2470 ../fish/guestfish-actions.pod:2483 ../fish/guestfish-actions.pod:2497 ../fish/guestfish-actions.pod:2520 ../fish/guestfish-actions.pod:2530
21856 "This command has one or more key or passphrase parameters. Guestfish will "
21857 "prompt for these separately."
21861 #: ../fish/guestfish-actions.pod:2451
21866 #: ../fish/guestfish-actions.pod:2453
21869 " luks-close device\n"
21874 #: ../fish/guestfish-actions.pod:2455
21876 "This closes a LUKS device that was created earlier by L</luks-open> or "
21877 "L</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
21878 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
21879 "underlying block device."
21883 #: ../fish/guestfish-actions.pod:2461
21884 msgid "luks-format"
21888 #: ../fish/guestfish-actions.pod:2463
21891 " luks-format device keyslot\n"
21896 #: ../fish/guestfish-actions.pod:2476
21897 msgid "luks-format-cipher"
21901 #: ../fish/guestfish-actions.pod:2478
21904 " luks-format-cipher device keyslot cipher\n"
21909 #: ../fish/guestfish-actions.pod:2480
21911 "This command is the same as L</luks-format> but it also allows you to set "
21912 "the C<cipher> used."
21916 #: ../fish/guestfish-actions.pod:2489
21917 msgid "luks-kill-slot"
21921 #: ../fish/guestfish-actions.pod:2491
21924 " luks-kill-slot device keyslot\n"
21929 #: ../fish/guestfish-actions.pod:2500
21934 #: ../fish/guestfish-actions.pod:2502
21937 " luks-open device mapname\n"
21942 #: ../fish/guestfish-actions.pod:2516
21944 "If this block device contains LVM volume groups, then calling L</vgscan> "
21945 "followed by L</vg-activate-all> will make them visible."
21949 #: ../fish/guestfish-actions.pod:2523
21950 msgid "luks-open-ro"
21954 #: ../fish/guestfish-actions.pod:2525
21957 " luks-open-ro device mapname\n"
21962 #: ../fish/guestfish-actions.pod:2527
21964 "This is the same as L</luks-open> except that a read-only mapping is "
21969 #: ../fish/guestfish-actions.pod:2533
21974 #: ../fish/guestfish-actions.pod:2535
21977 " lvcreate logvol volgroup mbytes\n"
21982 #: ../fish/guestfish-actions.pod:2540
21983 msgid "lvm-canonical-lv-name"
21987 #: ../fish/guestfish-actions.pod:2542
21990 " lvm-canonical-lv-name lvname\n"
21995 #: ../fish/guestfish-actions.pod:2551
21996 msgid "See also L</is-lv>."
22000 #: ../fish/guestfish-actions.pod:2553
22001 msgid "lvm-clear-filter"
22005 #: ../fish/guestfish-actions.pod:2555
22008 " lvm-clear-filter\n"
22013 #: ../fish/guestfish-actions.pod:2557
22015 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
22020 #: ../fish/guestfish-actions.pod:2563
22021 msgid "lvm-remove-all"
22025 #: ../fish/guestfish-actions.pod:2565
22028 " lvm-remove-all\n"
22033 #: ../fish/guestfish-actions.pod:2573
22034 msgid "lvm-set-filter"
22038 #: ../fish/guestfish-actions.pod:2575
22041 " lvm-set-filter 'devices ...'\n"
22046 #: ../fish/guestfish-actions.pod:2600
22051 #: ../fish/guestfish-actions.pod:2602
22054 " lvremove device\n"
22059 #: ../fish/guestfish-actions.pod:2610
22064 #: ../fish/guestfish-actions.pod:2612
22067 " lvrename logvol newlogvol\n"
22072 #: ../fish/guestfish-actions.pod:2616
22077 #: ../fish/guestfish-actions.pod:2618
22080 " lvresize device mbytes\n"
22085 #: ../fish/guestfish-actions.pod:2624
22086 msgid "lvresize-free"
22090 #: ../fish/guestfish-actions.pod:2626
22093 " lvresize-free lv percent\n"
22098 #: ../fish/guestfish-actions.pod:2634
22103 #: ../fish/guestfish-actions.pod:2636
22111 #: ../fish/guestfish-actions.pod:2644
22112 msgid "See also L</lvs-full>, L</list-filesystems>."
22116 #: ../fish/guestfish-actions.pod:2646
22121 #: ../fish/guestfish-actions.pod:2648
22129 #: ../fish/guestfish-actions.pod:2653
22134 #: ../fish/guestfish-actions.pod:2655
22142 #: ../fish/guestfish-actions.pod:2659
22147 #: ../fish/guestfish-actions.pod:2661
22150 " lxattrlist path 'names ...'\n"
22155 #: ../fish/guestfish-actions.pod:2677
22157 "This call is intended for programs that want to efficiently list a directory "
22158 "contents without making many round-trips. See also L</lstatlist> for a "
22159 "similarly efficient call for getting standard stats. Very long directory "
22160 "listings might cause the protocol message size to be exceeded, causing this "
22161 "call to fail. The caller must split up such requests into smaller groups of "
22166 #: ../fish/guestfish-actions.pod:2685
22171 #: ../fish/guestfish-actions.pod:2687
22179 #: ../fish/guestfish-actions.pod:2691
22184 #: ../fish/guestfish-actions.pod:2693
22187 " mkdir-mode path mode\n"
22192 #: ../fish/guestfish-actions.pod:2702
22193 msgid "See also L</mkdir>, L</umask>"
22197 #: ../fish/guestfish-actions.pod:2704
22202 #: ../fish/guestfish-actions.pod:2706
22210 #: ../fish/guestfish-actions.pod:2711
22215 #: ../fish/guestfish-actions.pod:2713
22218 " mkdtemp template\n"
22223 #: ../fish/guestfish-actions.pod:2734
22228 #: ../fish/guestfish-actions.pod:2736
22231 " mke2fs-J fstype blocksize device journal\n"
22236 #: ../fish/guestfish-actions.pod:2744
22237 msgid "See also L</mke2journal>."
22241 #: ../fish/guestfish-actions.pod:2746
22246 #: ../fish/guestfish-actions.pod:2748
22249 " mke2fs-JL fstype blocksize device label\n"
22254 #: ../fish/guestfish-actions.pod:2753
22255 msgid "See also L</mke2journal-L>."
22259 #: ../fish/guestfish-actions.pod:2755
22264 #: ../fish/guestfish-actions.pod:2757
22267 " mke2fs-JU fstype blocksize device uuid\n"
22272 #: ../fish/guestfish-actions.pod:2762
22273 msgid "See also L</mke2journal-U>."
22277 #: ../fish/guestfish-actions.pod:2764
22278 msgid "mke2journal"
22282 #: ../fish/guestfish-actions.pod:2766
22285 " mke2journal blocksize device\n"
22290 #: ../fish/guestfish-actions.pod:2773
22291 msgid "mke2journal-L"
22295 #: ../fish/guestfish-actions.pod:2775
22298 " mke2journal-L blocksize label device\n"
22303 #: ../fish/guestfish-actions.pod:2779
22304 msgid "mke2journal-U"
22308 #: ../fish/guestfish-actions.pod:2781
22311 " mke2journal-U blocksize uuid device\n"
22316 #: ../fish/guestfish-actions.pod:2785
22321 #: ../fish/guestfish-actions.pod:2787
22324 " mkfifo mode path\n"
22329 #: ../fish/guestfish-actions.pod:2789
22331 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
22332 "is just a convenient wrapper around L</mknod>."
22336 #: ../fish/guestfish-actions.pod:2795
22341 #: ../fish/guestfish-actions.pod:2797
22344 " mkfs fstype device\n"
22349 #: ../fish/guestfish-actions.pod:2803
22354 #: ../fish/guestfish-actions.pod:2805
22357 " mkfs-b fstype blocksize device\n"
22362 #: ../fish/guestfish-actions.pod:2807
22364 "This call is similar to L</mkfs>, but it allows you to control the block "
22365 "size of the resulting filesystem. Supported block sizes depend on the "
22366 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
22370 #: ../fish/guestfish-actions.pod:2822
22375 #: ../fish/guestfish-actions.pod:2824
22378 " mkfs-opts fstype device [blocksize:..]\n"
22383 #: ../fish/guestfish-actions.pod:2846
22384 msgid "mkmountpoint"
22388 #: ../fish/guestfish-actions.pod:2848
22391 " mkmountpoint exemptpath\n"
22396 #: ../fish/guestfish-actions.pod:2850
22398 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
22399 "to create extra mountpoints before mounting the first filesystem."
22403 #: ../fish/guestfish-actions.pod:2874
22405 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
22406 "unexpected errors if you try to mix these calls. It is safest to manually "
22407 "unmount filesystems and remove mountpoints after use."
22411 #: ../fish/guestfish-actions.pod:2878
22413 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
22414 "for this to work for manual mountpoints, you must ensure that the innermost "
22415 "mountpoints have the longest pathnames, as in the example code above."
22419 #: ../fish/guestfish-actions.pod:2885
22421 "Autosync [see L</set-autosync>, this is set by default on handles] means "
22422 "that L</umount-all> is called when the handle is closed which can also "
22423 "trigger these issues."
22427 #: ../fish/guestfish-actions.pod:2889
22432 #: ../fish/guestfish-actions.pod:2891
22435 " mknod mode devmajor devminor path\n"
22440 #: ../fish/guestfish-actions.pod:2901
22442 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
22443 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
22444 "regular file). These constants are available in the standard Linux header "
22445 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
22446 "wrappers around this command which bitwise OR in the appropriate constant "
22451 #: ../fish/guestfish-actions.pod:2911
22456 #: ../fish/guestfish-actions.pod:2913
22459 " mknod-b mode devmajor devminor path\n"
22464 #: ../fish/guestfish-actions.pod:2915
22466 "This call creates a block device node called C<path> with mode C<mode> and "
22467 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
22468 "wrapper around L</mknod>."
22472 #: ../fish/guestfish-actions.pod:2921
22477 #: ../fish/guestfish-actions.pod:2923
22480 " mknod-c mode devmajor devminor path\n"
22485 #: ../fish/guestfish-actions.pod:2925
22487 "This call creates a char device node called C<path> with mode C<mode> and "
22488 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
22489 "wrapper around L</mknod>."
22493 #: ../fish/guestfish-actions.pod:2931
22498 #: ../fish/guestfish-actions.pod:2933
22506 #: ../fish/guestfish-actions.pod:2937
22511 #: ../fish/guestfish-actions.pod:2939
22514 " mkswap-L label device\n"
22519 #: ../fish/guestfish-actions.pod:2947
22524 #: ../fish/guestfish-actions.pod:2949
22527 " mkswap-U uuid device\n"
22532 #: ../fish/guestfish-actions.pod:2953
22533 msgid "mkswap-file"
22537 #: ../fish/guestfish-actions.pod:2955
22540 " mkswap-file path\n"
22545 #: ../fish/guestfish-actions.pod:2959
22547 "This command just writes a swap file signature to an existing file. To "
22548 "create the file itself, use something like L</fallocate>."
22552 #: ../fish/guestfish-actions.pod:2962
22557 #: ../fish/guestfish-actions.pod:2964
22560 " modprobe modulename\n"
22565 #: ../fish/guestfish-actions.pod:2971
22570 #: ../fish/guestfish-actions.pod:2973
22573 " mount device mountpoint\n"
22578 #: ../fish/guestfish-actions.pod:2989
22580 "B<Important note:> When you use this call, the filesystem options C<sync> "
22581 "and C<noatime> are set implicitly. This was originally done because we "
22582 "thought it would improve reliability, but it turns out that I<-o sync> has a "
22583 "very large negative performance impact and negligible effect on "
22584 "reliability. Therefore we recommend that you avoid using L</mount> in any "
22585 "code that needs performance, and instead use L</mount-options> (use an empty "
22586 "string for the first parameter if you don't want any options)."
22590 #: ../fish/guestfish-actions.pod:2999
22595 #: ../fish/guestfish-actions.pod:3001
22598 " mount-loop file mountpoint\n"
22603 #: ../fish/guestfish-actions.pod:3007
22604 msgid "mount-options"
22608 #: ../fish/guestfish-actions.pod:3009
22611 " mount-options options device mountpoint\n"
22616 #: ../fish/guestfish-actions.pod:3011
22618 "This is the same as the L</mount> command, but it allows you to set the "
22619 "mount options as for the L<mount(8)> I<-o> flag."
22623 #: ../fish/guestfish-actions.pod:3019
22628 #: ../fish/guestfish-actions.pod:3021
22631 " mount-ro device mountpoint\n"
22636 #: ../fish/guestfish-actions.pod:3023
22638 "This is the same as the L</mount> command, but it mounts the filesystem with "
22639 "the read-only (I<-o ro>) flag."
22643 #: ../fish/guestfish-actions.pod:3026
22648 #: ../fish/guestfish-actions.pod:3028
22651 " mount-vfs options vfstype device mountpoint\n"
22656 #: ../fish/guestfish-actions.pod:3030
22658 "This is the same as the L</mount> command, but it allows you to set both the "
22659 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
22663 #: ../fish/guestfish-actions.pod:3034
22664 msgid "mountpoints"
22668 #: ../fish/guestfish-actions.pod:3036
22676 #: ../fish/guestfish-actions.pod:3038
22678 "This call is similar to L</mounts>. That call returns a list of devices. "
22679 "This one returns a hash table (map) of device name to directory where the "
22680 "device is mounted."
22684 #: ../fish/guestfish-actions.pod:3042
22689 #: ../fish/guestfish-actions.pod:3044
22697 #: ../fish/guestfish-actions.pod:3051
22698 msgid "See also: L</mountpoints>"
22702 #: ../fish/guestfish-actions.pod:3053
22707 #: ../fish/guestfish-actions.pod:3055
22715 #: ../fish/guestfish-actions.pod:3060
22716 msgid "ntfs-3g-probe"
22720 #: ../fish/guestfish-actions.pod:3062
22723 " ntfs-3g-probe true|false device\n"
22728 #: ../fish/guestfish-actions.pod:3076
22733 #: ../fish/guestfish-actions.pod:3078
22736 " ntfsresize device\n"
22741 #: ../fish/guestfish-actions.pod:3084
22742 msgid "ntfsresize-size"
22746 #: ../fish/guestfish-actions.pod:3086
22749 " ntfsresize-size device size\n"
22754 #: ../fish/guestfish-actions.pod:3088
22756 "This command is the same as L</ntfsresize> except that it allows you to "
22757 "specify the new size (in bytes) explicitly."
22761 #: ../fish/guestfish-actions.pod:3091
22766 #: ../fish/guestfish-actions.pod:3093
22769 " part-add device prlogex startsect endsect\n"
22774 #: ../fish/guestfish-actions.pod:3095
22776 "This command adds a partition to C<device>. If there is no partition table "
22777 "on the device, call L</part-init> first."
22781 #: ../fish/guestfish-actions.pod:3107
22783 "Creating a partition which covers the whole disk is not so easy. Use "
22784 "L</part-disk> to do that."
22788 #: ../fish/guestfish-actions.pod:3110
22793 #: ../fish/guestfish-actions.pod:3112
22796 " part-del device partnum\n"
22801 #: ../fish/guestfish-actions.pod:3120
22806 #: ../fish/guestfish-actions.pod:3122
22809 " part-disk device parttype\n"
22814 #: ../fish/guestfish-actions.pod:3124
22816 "This command is simply a combination of L</part-init> followed by "
22817 "L</part-add> to create a single primary partition covering the whole disk."
22821 #: ../fish/guestfish-actions.pod:3128
22823 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
22824 "possible values are described in L</part-init>."
22828 #: ../fish/guestfish-actions.pod:3134
22829 msgid "part-get-bootable"
22833 #: ../fish/guestfish-actions.pod:3136
22836 " part-get-bootable device partnum\n"
22841 #: ../fish/guestfish-actions.pod:3141
22842 msgid "See also L</part-set-bootable>."
22846 #: ../fish/guestfish-actions.pod:3143
22847 msgid "part-get-mbr-id"
22851 #: ../fish/guestfish-actions.pod:3145
22854 " part-get-mbr-id device partnum\n"
22859 #: ../fish/guestfish-actions.pod:3150 ../fish/guestfish-actions.pod:3288
22861 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
22862 "undefined results for other partition table types (see "
22863 "L</part-get-parttype>)."
22867 #: ../fish/guestfish-actions.pod:3154
22868 msgid "part-get-parttype"
22872 #: ../fish/guestfish-actions.pod:3156
22875 " part-get-parttype device\n"
22880 #: ../fish/guestfish-actions.pod:3161
22882 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
22883 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
22884 "possible, although unusual. See L</part-init> for a full list."
22888 #: ../fish/guestfish-actions.pod:3166
22893 #: ../fish/guestfish-actions.pod:3168
22896 " part-init device parttype\n"
22901 #: ../fish/guestfish-actions.pod:3174
22903 "Initially there are no partitions. Following this, you should call "
22904 "L</part-add> for each partition required."
22908 #: ../fish/guestfish-actions.pod:3237
22913 #: ../fish/guestfish-actions.pod:3239
22916 " part-list device\n"
22921 #: ../fish/guestfish-actions.pod:3254
22923 "Start of the partition I<in bytes>. To get sectors you have to divide by "
22924 "the device's sector size, see L</blockdev-getss>."
22928 #: ../fish/guestfish-actions.pod:3267
22929 msgid "part-set-bootable"
22933 #: ../fish/guestfish-actions.pod:3269
22936 " part-set-bootable device partnum true|false\n"
22941 #: ../fish/guestfish-actions.pod:3278
22942 msgid "part-set-mbr-id"
22946 #: ../fish/guestfish-actions.pod:3280
22949 " part-set-mbr-id device partnum idbyte\n"
22954 #: ../fish/guestfish-actions.pod:3292
22955 msgid "part-set-name"
22959 #: ../fish/guestfish-actions.pod:3294
22962 " part-set-name device partnum name\n"
22967 #: ../fish/guestfish-actions.pod:3302
22968 msgid "part-to-dev"
22972 #: ../fish/guestfish-actions.pod:3304
22975 " part-to-dev partition\n"
22980 #: ../fish/guestfish-actions.pod:3310
22982 "The named partition must exist, for example as a string returned from "
22983 "L</list-partitions>."
22987 #: ../fish/guestfish-actions.pod:3313
22988 msgid "ping-daemon"
22992 #: ../fish/guestfish-actions.pod:3315
23000 #: ../fish/guestfish-actions.pod:3322
23005 #: ../fish/guestfish-actions.pod:3324
23008 " pread path count offset\n"
23013 #: ../fish/guestfish-actions.pod:3332
23014 msgid "See also L</pwrite>, L</pread-device>."
23018 #: ../fish/guestfish-actions.pod:3337
23019 msgid "pread-device"
23023 #: ../fish/guestfish-actions.pod:3339
23026 " pread-device device count offset\n"
23031 #: ../fish/guestfish-actions.pod:3347
23032 msgid "See also L</pread>."
23036 #: ../fish/guestfish-actions.pod:3352
23041 #: ../fish/guestfish-actions.pod:3354
23044 " pvcreate device\n"
23049 #: ../fish/guestfish-actions.pod:3360
23054 #: ../fish/guestfish-actions.pod:3362
23057 " pvremove device\n"
23062 #: ../fish/guestfish-actions.pod:3371
23067 #: ../fish/guestfish-actions.pod:3373
23070 " pvresize device\n"
23075 #: ../fish/guestfish-actions.pod:3378
23076 msgid "pvresize-size"
23080 #: ../fish/guestfish-actions.pod:3380
23083 " pvresize-size device size\n"
23088 #: ../fish/guestfish-actions.pod:3382
23090 "This command is the same as L</pvresize> except that it allows you to "
23091 "specify the new size (in bytes) explicitly."
23095 #: ../fish/guestfish-actions.pod:3385
23100 #: ../fish/guestfish-actions.pod:3387
23108 #: ../fish/guestfish-actions.pod:3395
23109 msgid "See also L</pvs-full>."
23113 #: ../fish/guestfish-actions.pod:3397
23118 #: ../fish/guestfish-actions.pod:3399
23126 #: ../fish/guestfish-actions.pod:3404
23131 #: ../fish/guestfish-actions.pod:3406
23139 #: ../fish/guestfish-actions.pod:3410
23144 #: ../fish/guestfish-actions.pod:3412
23147 " pwrite path content offset\n"
23152 #: ../fish/guestfish-actions.pod:3423
23153 msgid "See also L</pread>, L</pwrite-device>."
23157 #: ../fish/guestfish-actions.pod:3428
23158 msgid "pwrite-device"
23162 #: ../fish/guestfish-actions.pod:3430
23165 " pwrite-device device content offset\n"
23170 #: ../fish/guestfish-actions.pod:3440
23171 msgid "See also L</pwrite>."
23175 #: ../fish/guestfish-actions.pod:3445
23180 #: ../fish/guestfish-actions.pod:3447
23183 " read-file path\n"
23188 #: ../fish/guestfish-actions.pod:3452
23190 "Unlike L</cat>, this function can correctly handle files that contain "
23191 "embedded ASCII NUL characters. However unlike L</download>, this function "
23192 "is limited in the total size of file that can be handled."
23196 #: ../fish/guestfish-actions.pod:3460
23201 #: ../fish/guestfish-actions.pod:3462
23204 " read-lines path\n"
23209 #: ../fish/guestfish-actions.pod:3469
23211 "Note that this function cannot correctly handle binary files (specifically, "
23212 "files containing C<\\0> character which is treated as end of line). For "
23213 "those you need to use the L</read-file> function which has a more complex "
23218 #: ../fish/guestfish-actions.pod:3474
23223 #: ../fish/guestfish-actions.pod:3476
23231 #: ../fish/guestfish-actions.pod:3528
23233 "This function is primarily intended for use by programs. To get a simple "
23234 "list of names, use L</ls>. To get a printable directory for human "
23235 "consumption, use L</ll>."
23239 #: ../fish/guestfish-actions.pod:3532
23244 #: ../fish/guestfish-actions.pod:3534
23252 #: ../fish/guestfish-actions.pod:3538
23253 msgid "readlinklist"
23257 #: ../fish/guestfish-actions.pod:3540
23260 " readlinklist path 'names ...'\n"
23265 #: ../fish/guestfish-actions.pod:3564
23270 #: ../fish/guestfish-actions.pod:3566
23278 #: ../fish/guestfish-actions.pod:3571
23279 msgid "removexattr"
23283 #: ../fish/guestfish-actions.pod:3573
23286 " removexattr xattr path\n"
23291 #: ../fish/guestfish-actions.pod:3578
23292 msgid "See also: L</lremovexattr>, L<attr(5)>."
23296 #: ../fish/guestfish-actions.pod:3580
23301 #: ../fish/guestfish-actions.pod:3582
23304 " resize2fs device\n"
23309 #: ../fish/guestfish-actions.pod:3587
23311 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
23312 "before calling this command. For unknown reasons C<resize2fs> sometimes "
23313 "gives an error about this and sometimes not. In any case, it is always safe "
23314 "to call L</e2fsck-f> before calling this function."
23318 #: ../fish/guestfish-actions.pod:3593
23319 msgid "resize2fs-size"
23323 #: ../fish/guestfish-actions.pod:3595
23326 " resize2fs-size device size\n"
23331 #: ../fish/guestfish-actions.pod:3597
23333 "This command is the same as L</resize2fs> except that it allows you to "
23334 "specify the new size (in bytes) explicitly."
23338 #: ../fish/guestfish-actions.pod:3600
23343 #: ../fish/guestfish-actions.pod:3602
23351 #: ../fish/guestfish-actions.pod:3606
23356 #: ../fish/guestfish-actions.pod:3608
23364 #: ../fish/guestfish-actions.pod:3614
23369 #: ../fish/guestfish-actions.pod:3616
23377 #: ../fish/guestfish-actions.pod:3620
23378 msgid "rmmountpoint"
23382 #: ../fish/guestfish-actions.pod:3622
23385 " rmmountpoint exemptpath\n"
23390 #: ../fish/guestfish-actions.pod:3624
23392 "This calls removes a mountpoint that was previously created with "
23393 "L</mkmountpoint>. See L</mkmountpoint> for full details."
23397 #: ../fish/guestfish-actions.pod:3628
23398 msgid "scrub-device"
23402 #: ../fish/guestfish-actions.pod:3630
23405 " scrub-device device\n"
23410 #: ../fish/guestfish-actions.pod:3641
23415 #: ../fish/guestfish-actions.pod:3643
23418 " scrub-file file\n"
23423 #: ../fish/guestfish-actions.pod:3653
23424 msgid "scrub-freespace"
23428 #: ../fish/guestfish-actions.pod:3655
23431 " scrub-freespace dir\n"
23436 #: ../fish/guestfish-actions.pod:3657
23438 "This command creates the directory C<dir> and then fills it with files until "
23439 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
23440 "deletes them. The intention is to scrub any free space on the partition "
23441 "containing C<dir>."
23445 #: ../fish/guestfish-actions.pod:3666
23450 #: ../fish/guestfish-actions.pod:3668
23455 #: ../fish/guestfish-actions.pod:3670
23458 " set-append append\n"
23463 #: ../fish/guestfish-actions.pod:3681
23464 msgid "set-autosync"
23468 #: ../fish/guestfish-actions.pod:3683
23473 #: ../fish/guestfish-actions.pod:3685
23476 " set-autosync true|false\n"
23481 #: ../fish/guestfish-actions.pod:3687
23483 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
23484 "effort attempt to run L</umount-all> followed by L</sync> when the handle is "
23485 "closed (also if the program exits without closing handles)."
23489 #: ../fish/guestfish-actions.pod:3695
23494 #: ../fish/guestfish-actions.pod:3697
23499 #: ../fish/guestfish-actions.pod:3699
23502 " set-direct true|false\n"
23507 #: ../fish/guestfish-actions.pod:3705
23509 "One consequence of this is that log messages aren't caught by the library "
23510 "and handled by L</set-log-message-callback>, but go straight to stdout."
23514 #: ../fish/guestfish-actions.pod:3714
23515 msgid "set-e2label"
23519 #: ../fish/guestfish-actions.pod:3716
23522 " set-e2label device label\n"
23527 #: ../fish/guestfish-actions.pod:3722
23529 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
23530 "label on a filesystem."
23534 #: ../fish/guestfish-actions.pod:3725
23539 #: ../fish/guestfish-actions.pod:3727
23542 " set-e2uuid device uuid\n"
23547 #: ../fish/guestfish-actions.pod:3734
23549 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
23550 "UUID of a filesystem."
23554 #: ../fish/guestfish-actions.pod:3737
23555 msgid "set-memsize"
23559 #: ../fish/guestfish-actions.pod:3739
23564 #: ../fish/guestfish-actions.pod:3741
23567 " set-memsize memsize\n"
23572 #: ../fish/guestfish-actions.pod:3743
23574 "This sets the memory size in megabytes allocated to the qemu subprocess. "
23575 "This only has any effect if called before L</launch>."
23579 #: ../fish/guestfish-actions.pod:3754
23580 msgid "set-network"
23584 #: ../fish/guestfish-actions.pod:3756
23589 #: ../fish/guestfish-actions.pod:3758
23592 " set-network true|false\n"
23597 #: ../fish/guestfish-actions.pod:3766
23598 msgid "You must call this before calling L</launch>, otherwise it has no effect."
23602 #: ../fish/guestfish-actions.pod:3769
23607 #: ../fish/guestfish-actions.pod:3771
23612 #: ../fish/guestfish-actions.pod:3773
23615 " set-path searchpath\n"
23620 #: ../fish/guestfish-actions.pod:3782
23625 #: ../fish/guestfish-actions.pod:3784
23630 #: ../fish/guestfish-actions.pod:3786
23638 #: ../fish/guestfish-actions.pod:3806
23639 msgid "set-recovery-proc"
23643 #: ../fish/guestfish-actions.pod:3808
23644 msgid "recovery-proc"
23648 #: ../fish/guestfish-actions.pod:3810
23651 " set-recovery-proc true|false\n"
23656 #: ../fish/guestfish-actions.pod:3812
23658 "If this is called with the parameter C<false> then L</launch> does not "
23659 "create a recovery process. The purpose of the recovery process is to stop "
23660 "runaway qemu processes in the case where the main program aborts abruptly."
23664 #: ../fish/guestfish-actions.pod:3817
23666 "This only has any effect if called before L</launch>, and the default is "
23671 #: ../fish/guestfish-actions.pod:3826
23672 msgid "set-selinux"
23676 #: ../fish/guestfish-actions.pod:3828
23681 #: ../fish/guestfish-actions.pod:3830
23684 " set-selinux true|false\n"
23689 #: ../fish/guestfish-actions.pod:3841
23694 #: ../fish/guestfish-actions.pod:3843
23699 #: ../fish/guestfish-actions.pod:3845
23702 " set-trace true|false\n"
23707 #: ../fish/guestfish-actions.pod:3861
23708 msgid "set-verbose"
23712 #: ../fish/guestfish-actions.pod:3863
23717 #: ../fish/guestfish-actions.pod:3865
23720 " set-verbose true|false\n"
23725 #: ../fish/guestfish-actions.pod:3872
23730 #: ../fish/guestfish-actions.pod:3874
23733 " setcon context\n"
23738 #: ../fish/guestfish-actions.pod:3881
23743 #: ../fish/guestfish-actions.pod:3883
23746 " setxattr xattr val vallen path\n"
23751 #: ../fish/guestfish-actions.pod:3889
23752 msgid "See also: L</lsetxattr>, L<attr(5)>."
23756 #: ../fish/guestfish-actions.pod:3891
23761 #: ../fish/guestfish-actions.pod:3893
23764 " sfdisk device cyls heads sectors 'lines ...'\n"
23769 #: ../fish/guestfish-actions.pod:3915
23770 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
23774 #: ../fish/guestfish-actions.pod:3921
23779 #: ../fish/guestfish-actions.pod:3923
23782 " sfdiskM device 'lines ...'\n"
23787 #: ../fish/guestfish-actions.pod:3925
23789 "This is a simplified interface to the L</sfdisk> command, where partition "
23790 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
23791 "you don't need to specify the cyls, heads and sectors parameters which were "
23792 "rarely if ever used anyway."
23796 #: ../fish/guestfish-actions.pod:3931
23797 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
23801 #: ../fish/guestfish-actions.pod:3937
23806 #: ../fish/guestfish-actions.pod:3939
23809 " sfdisk-N device partnum cyls heads sectors line\n"
23814 #: ../fish/guestfish-actions.pod:3944
23816 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
23817 "cyls/heads/sectors parameters."
23821 #: ../fish/guestfish-actions.pod:3947
23822 msgid "See also: L</part-add>"
23826 #: ../fish/guestfish-actions.pod:3952
23827 msgid "sfdisk-disk-geometry"
23831 #: ../fish/guestfish-actions.pod:3954
23834 " sfdisk-disk-geometry device\n"
23839 #: ../fish/guestfish-actions.pod:3956
23841 "This displays the disk geometry of C<device> read from the partition table. "
23842 "Especially in the case where the underlying block device has been resized, "
23843 "this can be different from the kernel's idea of the geometry (see "
23844 "L</sfdisk-kernel-geometry>)."
23848 #: ../fish/guestfish-actions.pod:3964
23849 msgid "sfdisk-kernel-geometry"
23853 #: ../fish/guestfish-actions.pod:3966
23856 " sfdisk-kernel-geometry device\n"
23861 #: ../fish/guestfish-actions.pod:3973
23866 #: ../fish/guestfish-actions.pod:3975
23869 " sfdisk-l device\n"
23874 #: ../fish/guestfish-actions.pod:3981
23875 msgid "See also: L</part-list>"
23879 #: ../fish/guestfish-actions.pod:3983
23884 #: ../fish/guestfish-actions.pod:3985
23892 #: ../fish/guestfish-actions.pod:3990
23893 msgid "This is like L</command>, but passes the command to:"
23897 #: ../fish/guestfish-actions.pod:3998
23898 msgid "All the provisos about L</command> apply to this call."
23902 #: ../fish/guestfish-actions.pod:4000
23907 #: ../fish/guestfish-actions.pod:4002
23910 " sh-lines command\n"
23915 #: ../fish/guestfish-actions.pod:4004
23916 msgid "This is the same as L</sh>, but splits the result into a list of lines."
23920 #: ../fish/guestfish-actions.pod:4007
23921 msgid "See also: L</command-lines>"
23925 #: ../fish/guestfish-actions.pod:4009
23930 #: ../fish/guestfish-actions.pod:4011
23938 #: ../fish/guestfish-actions.pod:4015
23943 #: ../fish/guestfish-actions.pod:4017
23951 #: ../fish/guestfish-actions.pod:4023
23956 #: ../fish/guestfish-actions.pod:4025
23964 #: ../fish/guestfish-actions.pod:4033
23969 #: ../fish/guestfish-actions.pod:4035
23977 #: ../fish/guestfish-actions.pod:4043
23982 #: ../fish/guestfish-actions.pod:4045
23985 " strings-e encoding path\n"
23990 #: ../fish/guestfish-actions.pod:4047
23992 "This is like the L</strings> command, but allows you to specify the encoding "
23993 "of strings that are looked for in the source file C<path>."
23997 #: ../fish/guestfish-actions.pod:4057
23999 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
24000 "ISO-8859-X (this is what L</strings> uses)."
24004 #: ../fish/guestfish-actions.pod:4089
24005 msgid "swapoff-device"
24009 #: ../fish/guestfish-actions.pod:4091
24012 " swapoff-device device\n"
24017 #: ../fish/guestfish-actions.pod:4093
24019 "This command disables the libguestfs appliance swap device or partition "
24020 "named C<device>. See L</swapon-device>."
24024 #: ../fish/guestfish-actions.pod:4097
24025 msgid "swapoff-file"
24029 #: ../fish/guestfish-actions.pod:4099
24032 " swapoff-file file\n"
24037 #: ../fish/guestfish-actions.pod:4103
24038 msgid "swapoff-label"
24042 #: ../fish/guestfish-actions.pod:4105
24045 " swapoff-label label\n"
24050 #: ../fish/guestfish-actions.pod:4110
24051 msgid "swapoff-uuid"
24055 #: ../fish/guestfish-actions.pod:4112
24058 " swapoff-uuid uuid\n"
24063 #: ../fish/guestfish-actions.pod:4117
24064 msgid "swapon-device"
24068 #: ../fish/guestfish-actions.pod:4119
24071 " swapon-device device\n"
24076 #: ../fish/guestfish-actions.pod:4121
24078 "This command enables the libguestfs appliance to use the swap device or "
24079 "partition named C<device>. The increased memory is made available for all "
24080 "commands, for example those run using L</command> or L</sh>."
24084 #: ../fish/guestfish-actions.pod:4133
24085 msgid "swapon-file"
24089 #: ../fish/guestfish-actions.pod:4135
24092 " swapon-file file\n"
24097 #: ../fish/guestfish-actions.pod:4137
24098 msgid "This command enables swap to a file. See L</swapon-device> for other notes."
24102 #: ../fish/guestfish-actions.pod:4140
24103 msgid "swapon-label"
24107 #: ../fish/guestfish-actions.pod:4142
24110 " swapon-label label\n"
24115 #: ../fish/guestfish-actions.pod:4144
24117 "This command enables swap to a labeled swap partition. See "
24118 "L</swapon-device> for other notes."
24122 #: ../fish/guestfish-actions.pod:4147
24123 msgid "swapon-uuid"
24127 #: ../fish/guestfish-actions.pod:4149
24130 " swapon-uuid uuid\n"
24135 #: ../fish/guestfish-actions.pod:4151
24137 "This command enables swap to a swap partition with the given UUID. See "
24138 "L</swapon-device> for other notes."
24142 #: ../fish/guestfish-actions.pod:4154
24147 #: ../fish/guestfish-actions.pod:4156
24155 #: ../fish/guestfish-actions.pod:4164
24160 #: ../fish/guestfish-actions.pod:4166
24168 #: ../fish/guestfish-actions.pod:4174
24173 #: ../fish/guestfish-actions.pod:4176
24176 " tail-n nrlines path\n"
24181 #: ../fish/guestfish-actions.pod:4189
24186 #: ../fish/guestfish-actions.pod:4191
24189 " tar-in (tarfile|-) directory\n"
24194 #: ../fish/guestfish-actions.pod:4196
24195 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
24199 #: ../fish/guestfish-actions.pod:4201
24204 #: ../fish/guestfish-actions.pod:4203
24207 " tar-out directory (tarfile|-)\n"
24212 #: ../fish/guestfish-actions.pod:4208
24213 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
24217 #: ../fish/guestfish-actions.pod:4213
24222 #: ../fish/guestfish-actions.pod:4215
24225 " tgz-in (tarball|-) directory\n"
24230 #: ../fish/guestfish-actions.pod:4220
24231 msgid "To upload an uncompressed tarball, use L</tar-in>."
24235 #: ../fish/guestfish-actions.pod:4224
24240 #: ../fish/guestfish-actions.pod:4226
24243 " tgz-out directory (tarball|-)\n"
24248 #: ../fish/guestfish-actions.pod:4231
24249 msgid "To download an uncompressed tarball, use L</tar-out>."
24253 #: ../fish/guestfish-actions.pod:4235
24258 #: ../fish/guestfish-actions.pod:4237
24266 #: ../fish/guestfish-actions.pod:4246
24271 #: ../fish/guestfish-actions.pod:4248
24279 #: ../fish/guestfish-actions.pod:4253
24280 msgid "truncate-size"
24284 #: ../fish/guestfish-actions.pod:4255
24287 " truncate-size path size\n"
24292 #: ../fish/guestfish-actions.pod:4260
24294 "If the current file size is less than C<size> then the file is extended to "
24295 "the required size with zero bytes. This creates a sparse file (ie. disk "
24296 "blocks are not allocated for the file until you write to it). To create a "
24297 "non-sparse file of zeroes, use L</fallocate64> instead."
24301 #: ../fish/guestfish-actions.pod:4266
24306 #: ../fish/guestfish-actions.pod:4268
24309 " tune2fs-l device\n"
24314 #: ../fish/guestfish-actions.pod:4278
24319 #: ../fish/guestfish-actions.pod:4280
24322 " txz-in (tarball|-) directory\n"
24327 #: ../fish/guestfish-actions.pod:4287
24332 #: ../fish/guestfish-actions.pod:4289
24335 " txz-out directory (tarball|-)\n"
24340 #: ../fish/guestfish-actions.pod:4296
24345 #: ../fish/guestfish-actions.pod:4298
24353 #: ../fish/guestfish-actions.pod:4312
24354 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
24358 #: ../fish/guestfish-actions.pod:4317
24363 #: ../fish/guestfish-actions.pod:4319
24368 #: ../fish/guestfish-actions.pod:4321
24371 " umount pathordevice\n"
24376 #: ../fish/guestfish-actions.pod:4327
24381 #: ../fish/guestfish-actions.pod:4329
24382 msgid "unmount-all"
24386 #: ../fish/guestfish-actions.pod:4331
24394 #: ../fish/guestfish-actions.pod:4337
24399 #: ../fish/guestfish-actions.pod:4339
24402 " upload (filename|-) remotefilename\n"
24407 #: ../fish/guestfish-actions.pod:4346
24408 msgid "See also L</download>."
24412 #: ../fish/guestfish-actions.pod:4350
24413 msgid "upload-offset"
24417 #: ../fish/guestfish-actions.pod:4352
24420 " upload-offset (filename|-) remotefilename offset\n"
24425 #: ../fish/guestfish-actions.pod:4364
24427 "Note that there is no limit on the amount of data that can be uploaded with "
24428 "this call, unlike with L</pwrite>, and this call always writes the full "
24429 "amount unless an error occurs."
24433 #: ../fish/guestfish-actions.pod:4369
24434 msgid "See also L</upload>, L</pwrite>."
24438 #: ../fish/guestfish-actions.pod:4373
24443 #: ../fish/guestfish-actions.pod:4375
24446 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
24451 #: ../fish/guestfish-actions.pod:4394
24456 #: ../fish/guestfish-actions.pod:4396
24464 #: ../fish/guestfish-actions.pod:4423
24466 "I<Note:> Don't use this call to test for availability of features. In "
24467 "enterprise distributions we backport features from later versions into "
24468 "earlier versions, making this an unreliable way to test for features. Use "
24469 "L</available> instead."
24473 #: ../fish/guestfish-actions.pod:4429
24478 #: ../fish/guestfish-actions.pod:4431
24481 " vfs-label device\n"
24486 #: ../fish/guestfish-actions.pod:4438
24487 msgid "To find a filesystem from the label, use L</findfs-label>."
24491 #: ../fish/guestfish-actions.pod:4440
24496 #: ../fish/guestfish-actions.pod:4442
24499 " vfs-type device\n"
24504 #: ../fish/guestfish-actions.pod:4452
24509 #: ../fish/guestfish-actions.pod:4454
24512 " vfs-uuid device\n"
24517 #: ../fish/guestfish-actions.pod:4461
24518 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
24522 #: ../fish/guestfish-actions.pod:4463
24523 msgid "vg-activate"
24527 #: ../fish/guestfish-actions.pod:4465
24530 " vg-activate true|false 'volgroups ...'\n"
24535 #: ../fish/guestfish-actions.pod:4478
24536 msgid "vg-activate-all"
24540 #: ../fish/guestfish-actions.pod:4480
24543 " vg-activate-all true|false\n"
24548 #: ../fish/guestfish-actions.pod:4490
24553 #: ../fish/guestfish-actions.pod:4492
24556 " vgcreate volgroup 'physvols ...'\n"
24561 #: ../fish/guestfish-actions.pod:4497
24566 #: ../fish/guestfish-actions.pod:4499
24569 " vglvuuids vgname\n"
24574 #: ../fish/guestfish-actions.pod:4504
24576 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
24577 "logical volumes and volume groups."
24581 #: ../fish/guestfish-actions.pod:4507
24582 msgid "See also L</vgpvuuids>."
24586 #: ../fish/guestfish-actions.pod:4509
24591 #: ../fish/guestfish-actions.pod:4511
24594 " vgpvuuids vgname\n"
24599 #: ../fish/guestfish-actions.pod:4516
24601 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
24602 "physical volumes and volume groups."
24606 #: ../fish/guestfish-actions.pod:4519
24607 msgid "See also L</vglvuuids>."
24611 #: ../fish/guestfish-actions.pod:4521
24616 #: ../fish/guestfish-actions.pod:4523
24619 " vgremove vgname\n"
24624 #: ../fish/guestfish-actions.pod:4530
24629 #: ../fish/guestfish-actions.pod:4532
24632 " vgrename volgroup newvolgroup\n"
24637 #: ../fish/guestfish-actions.pod:4536
24642 #: ../fish/guestfish-actions.pod:4538
24650 #: ../fish/guestfish-actions.pod:4546
24651 msgid "See also L</vgs-full>."
24655 #: ../fish/guestfish-actions.pod:4548
24660 #: ../fish/guestfish-actions.pod:4550
24668 #: ../fish/guestfish-actions.pod:4555
24673 #: ../fish/guestfish-actions.pod:4557
24681 #: ../fish/guestfish-actions.pod:4562
24686 #: ../fish/guestfish-actions.pod:4564
24694 #: ../fish/guestfish-actions.pod:4568
24699 #: ../fish/guestfish-actions.pod:4570
24707 #: ../fish/guestfish-actions.pod:4575
24712 #: ../fish/guestfish-actions.pod:4577
24720 #: ../fish/guestfish-actions.pod:4582
24725 #: ../fish/guestfish-actions.pod:4584
24733 #: ../fish/guestfish-actions.pod:4589
24738 #: ../fish/guestfish-actions.pod:4591
24741 " write path content\n"
24746 #: ../fish/guestfish-actions.pod:4599
24751 #: ../fish/guestfish-actions.pod:4601
24754 " write-file path content size\n"
24759 #: ../fish/guestfish-actions.pod:4624
24764 #: ../fish/guestfish-actions.pod:4626
24767 " zegrep regex path\n"
24772 #: ../fish/guestfish-actions.pod:4634
24777 #: ../fish/guestfish-actions.pod:4636
24780 " zegrepi regex path\n"
24785 #: ../fish/guestfish-actions.pod:4644
24790 #: ../fish/guestfish-actions.pod:4646
24798 #: ../fish/guestfish-actions.pod:4654
24799 msgid "See also: L</zero-device>, L</scrub-device>."
24803 #: ../fish/guestfish-actions.pod:4656
24804 msgid "zero-device"
24808 #: ../fish/guestfish-actions.pod:4658
24811 " zero-device device\n"
24816 #: ../fish/guestfish-actions.pod:4660
24818 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
24819 "which just zeroes the first few blocks of a device."
24823 #: ../fish/guestfish-actions.pod:4667
24828 #: ../fish/guestfish-actions.pod:4669
24831 " zerofree device\n"
24836 #: ../fish/guestfish-actions.pod:4682
24841 #: ../fish/guestfish-actions.pod:4684
24844 " zfgrep pattern path\n"
24849 #: ../fish/guestfish-actions.pod:4692
24854 #: ../fish/guestfish-actions.pod:4694
24857 " zfgrepi pattern path\n"
24862 #: ../fish/guestfish-actions.pod:4702
24867 #: ../fish/guestfish-actions.pod:4704
24870 " zfile meth path\n"
24875 #: ../fish/guestfish-actions.pod:4711
24876 msgid "Since 1.0.63, use L</file> instead which can now process compressed files."
24880 #: ../fish/guestfish-actions.pod:4721
24885 #: ../fish/guestfish-actions.pod:4723
24888 " zgrep regex path\n"
24893 #: ../fish/guestfish-actions.pod:4731
24898 #: ../fish/guestfish-actions.pod:4733
24901 " zgrepi regex path\n"
24906 #: ../fish/guestfish-commands.pod:1
24911 #: ../fish/guestfish-commands.pod:3
24916 #: ../fish/guestfish-commands.pod:5
24919 " alloc filename size\n"
24924 #: ../fish/guestfish-commands.pod:7
24926 "This creates an empty (zeroed) file of the given size, and then adds so it "
24927 "can be further examined."
24931 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
24932 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
24936 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
24937 msgid "Size can be specified using standard suffixes, eg. C<1M>."
24941 #: ../fish/guestfish-commands.pod:14
24943 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
24944 "image, see L</PREPARED DISK IMAGES>."
24948 #: ../fish/guestfish-commands.pod:17
24953 #: ../fish/guestfish-commands.pod:19
24956 " copy-in local [local ...] /remotedir\n"
24961 #: ../fish/guestfish-commands.pod:21
24963 "C<copy-in> copies local files or directories recursively into the disk "
24964 "image, placing them in the directory called C</remotedir> (which must "
24965 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
24966 "other commands as necessary."
24970 #: ../fish/guestfish-commands.pod:26
24972 "Multiple local files and directories can be specified, but the last "
24973 "parameter must always be a remote directory. Wildcards cannot be used."
24977 #: ../fish/guestfish-commands.pod:30
24982 #: ../fish/guestfish-commands.pod:32
24985 " copy-out remote [remote ...] localdir\n"
24990 #: ../fish/guestfish-commands.pod:34
24992 "C<copy-out> copies remote files or directories recursively out of the disk "
24993 "image, placing them on the host disk in a local directory called C<localdir> "
24994 "(which must exist). This guestfish meta-command turns into a sequence of "
24995 "L</download>, L</tar-out> and other commands as necessary."
24999 #: ../fish/guestfish-commands.pod:40
25001 "Multiple remote files and directories can be specified, but the last "
25002 "parameter must always be a local directory. To download to the current "
25003 "directory, use C<.> as in:"
25007 #: ../fish/guestfish-commands.pod:44
25010 " copy-out /home .\n"
25015 #: ../fish/guestfish-commands.pod:46
25017 "Wildcards cannot be used in the ordinary command, but you can use them with "
25018 "the help of L</glob> like this:"
25022 #: ../fish/guestfish-commands.pod:49
25025 " glob copy-out /home/* .\n"
25030 #: ../fish/guestfish-commands.pod:51
25035 #: ../fish/guestfish-commands.pod:53
25038 " echo [params ...]\n"
25043 #: ../fish/guestfish-commands.pod:55
25044 msgid "This echos the parameters to the terminal."
25048 #: ../fish/guestfish-commands.pod:57
25053 #: ../fish/guestfish-commands.pod:59
25058 #: ../fish/guestfish-commands.pod:61
25063 #: ../fish/guestfish-commands.pod:63
25071 #: ../fish/guestfish-commands.pod:65
25073 "This is used to edit a file. It downloads the file, edits it locally using "
25074 "your editor, then uploads the result."
25078 #: ../fish/guestfish-commands.pod:68
25080 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
25081 "or C<emacs> you will get those corresponding editors."
25085 #: ../fish/guestfish-commands.pod:72
25090 #: ../fish/guestfish-commands.pod:74
25093 " glob command args...\n"
25098 #: ../fish/guestfish-commands.pod:76
25100 "Expand wildcards in any paths in the args list, and run C<command> "
25101 "repeatedly on each matching path."
25105 #: ../fish/guestfish-commands.pod:79
25106 msgid "See L</WILDCARDS AND GLOBBING>."
25110 #: ../fish/guestfish-commands.pod:81
25115 #: ../fish/guestfish-commands.pod:83
25118 " hexedit <filename|device>\n"
25119 " hexedit <filename|device> <max>\n"
25120 " hexedit <filename|device> <start> <max>\n"
25125 #: ../fish/guestfish-commands.pod:87
25127 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
25132 #: ../fish/guestfish-commands.pod:90
25134 "This command works by downloading potentially the whole file or device, "
25135 "editing it locally, then uploading it. If the file or device is large, you "
25136 "have to specify which part you wish to edit by using C<max> and/or C<start> "
25137 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
25138 "usual modifiers allowed such as C<1M> (1 megabyte)."
25142 #: ../fish/guestfish-commands.pod:97
25143 msgid "For example to edit the first few sectors of a disk you might do:"
25147 #: ../fish/guestfish-commands.pod:100
25150 " hexedit /dev/sda 1M\n"
25155 #: ../fish/guestfish-commands.pod:102
25157 "which would allow you to edit anywhere within the first megabyte of the "
25162 #: ../fish/guestfish-commands.pod:105
25163 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
25167 #: ../fish/guestfish-commands.pod:107
25170 " hexedit /dev/sda1 0x400 0x400\n"
25175 #: ../fish/guestfish-commands.pod:109
25176 msgid "(assuming the superblock is in the standard location)."
25180 #: ../fish/guestfish-commands.pod:111
25182 "This command requires the external L<hexedit(1)> program. You can specify "
25183 "another program to use by setting the C<HEXEDITOR> environment variable."
25187 #: ../fish/guestfish-commands.pod:115
25188 msgid "See also L</hexdump>."
25192 #: ../fish/guestfish-commands.pod:117
25197 #: ../fish/guestfish-commands.pod:119
25205 #: ../fish/guestfish-commands.pod:121
25206 msgid "Change the local directory, ie. the current directory of guestfish itself."
25210 #: ../fish/guestfish-commands.pod:124
25211 msgid "Note that C<!cd> won't do what you might expect."
25215 #: ../fish/guestfish-commands.pod:126
25220 #: ../fish/guestfish-commands.pod:128
25225 #: ../fish/guestfish-commands.pod:130
25233 #: ../fish/guestfish-commands.pod:132
25234 msgid "Opens the manual page for guestfish."
25238 #: ../fish/guestfish-commands.pod:134
25243 #: ../fish/guestfish-commands.pod:136
25248 #: ../fish/guestfish-commands.pod:138
25256 #: ../fish/guestfish-commands.pod:140
25264 #: ../fish/guestfish-commands.pod:142
25265 msgid "This is used to view a file."
25269 #: ../fish/guestfish-commands.pod:144
25271 "The default viewer is C<$PAGER>. However if you use the alternate command "
25272 "C<less> you will get the C<less> command specifically."
25276 #: ../fish/guestfish-commands.pod:147
25281 #: ../fish/guestfish-commands.pod:149
25289 #: ../fish/guestfish-commands.pod:151
25291 "Close and reopen the libguestfs handle. It is not necessary to use this "
25292 "normally, because the handle is closed properly when guestfish exits. "
25293 "However this is occasionally useful for testing."
25297 #: ../fish/guestfish-commands.pod:155
25302 #: ../fish/guestfish-commands.pod:157
25305 " sparse filename size\n"
25310 #: ../fish/guestfish-commands.pod:159
25312 "This creates an empty sparse file of the given size, and then adds so it can "
25313 "be further examined."
25317 #: ../fish/guestfish-commands.pod:162
25319 "In all respects it works the same as the L</alloc> command, except that the "
25320 "image file is allocated sparsely, which means that disk blocks are not "
25321 "assigned to the file until they are needed. Sparse disk files only use "
25322 "space when written to, but they are slower and there is a danger you could "
25323 "run out of real disk space during a write operation."
25327 #: ../fish/guestfish-commands.pod:172
25332 #: ../fish/guestfish-commands.pod:174
25340 #: ../fish/guestfish-commands.pod:176
25342 "This command returns a list of the optional groups known to the daemon, and "
25343 "indicates which ones are supported by this build of the libguestfs "
25348 #: ../fish/guestfish-commands.pod:180
25349 msgid "See also L<guestfs(3)/AVAILABILITY>."
25353 #: ../fish/guestfish-commands.pod:182
25358 #: ../fish/guestfish-commands.pod:184
25361 " time command args...\n"
25366 #: ../fish/guestfish-commands.pod:186
25368 "Run the command as usual, but print the elapsed time afterwards. This can "
25369 "be useful for benchmarking operations."
25373 #: ../test-tool/libguestfs-test-tool.pod:5
25374 msgid "libguestfs-test-tool - End user tests for libguestfs"
25378 #: ../test-tool/libguestfs-test-tool.pod:9
25381 " libguestfs-test-tool [--options]\n"
25386 #: ../test-tool/libguestfs-test-tool.pod:13
25388 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
25389 "and developers, to allow them to check basic libguestfs functionality is "
25390 "working. This is needed because libguestfs occasionally breaks for reasons "
25391 "beyond our control: usually because of changes in the underlying qemu or "
25392 "kernel packages, or the host environment."
25396 #: ../test-tool/libguestfs-test-tool.pod:20
25397 msgid "If you suspect a problem in libguestfs, then just run:"
25401 #: ../test-tool/libguestfs-test-tool.pod:22
25404 " libguestfs-test-tool\n"
25409 #: ../test-tool/libguestfs-test-tool.pod:24
25410 msgid "It will print lots of diagnostic messages."
25414 #: ../test-tool/libguestfs-test-tool.pod:26
25415 msgid "If it runs to completion successfully, you will see this near the end:"
25419 #: ../test-tool/libguestfs-test-tool.pod:28
25422 " ===== TEST FINISHED OK =====\n"
25427 #: ../test-tool/libguestfs-test-tool.pod:30
25428 msgid "and the test tool will exit with code 0."
25432 #: ../test-tool/libguestfs-test-tool.pod:32
25434 "If it fails (and/or exits with non-zero error code), please paste the "
25435 "B<complete, unedited> output of the test tool into a bug report. More "
25436 "information about reporting bugs can be found on the "
25437 "L<http://libguestfs.org/> website."
25441 #: ../test-tool/libguestfs-test-tool.pod:41
25446 #: ../test-tool/libguestfs-test-tool.pod:43
25447 msgid "Display short usage information and exit."
25451 #: ../test-tool/libguestfs-test-tool.pod:45
25452 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
25456 #: ../test-tool/libguestfs-test-tool.pod:47
25458 "Pass an alternate name for the helper program. libguestfs-test-tool will "
25459 "normally look in the C<$libexec> directory that was configured when the tool "
25464 #: ../test-tool/libguestfs-test-tool.pod:51
25465 msgid "I<--qemu qemu_binary>"
25469 #: ../test-tool/libguestfs-test-tool.pod:53
25471 "If you have downloaded another qemu binary, point this option at the full "
25472 "path of the binary to try it."
25476 #: ../test-tool/libguestfs-test-tool.pod:56
25477 msgid "I<--qemudir qemu_source_dir>"
25481 #: ../test-tool/libguestfs-test-tool.pod:58
25483 "If you have compiled qemu from source, point this option at the source "
25484 "directory to try it."
25488 #: ../test-tool/libguestfs-test-tool.pod:61
25489 msgid "I<--timeout N>"
25493 #: ../test-tool/libguestfs-test-tool.pod:63
25495 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
25496 "does not usually need to be adjusted unless your machine is very slow."
25500 #: ../test-tool/libguestfs-test-tool.pod:69
25501 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
25505 #: ../test-tool/libguestfs-test-tool.pod:71
25507 "If you have compiled another version of qemu from source and would like to "
25508 "try that, then you can use the I<--qemudir> option to point to the qemu "
25509 "source directory."
25513 #: ../test-tool/libguestfs-test-tool.pod:75
25515 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
25516 "option to point to the binary."
25520 #: ../test-tool/libguestfs-test-tool.pod:78
25522 "When using an alternate qemu with libguestfs, usually you would need to "
25523 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in "
25524 "L<guestfs(3)>). libguestfs-test-tool writes a temporary qemu wrapper script "
25525 "when you use either of the I<--qemudir> or I<--qemu> options."
25529 #: ../test-tool/libguestfs-test-tool.pod:85
25531 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
25532 "I<1> if there was an error."
25536 #: ../test-tool/libguestfs-test-tool.pod:92
25537 msgid "/usr/libexec/libguestfs-test-tool-helper"
25541 #: ../test-tool/libguestfs-test-tool.pod:94
25543 "This helper program is run inside the appliance and provides additional "
25548 #: ../test-tool/libguestfs-test-tool.pod:97
25549 msgid "/usr/bin/mkisofs"
25553 #: ../test-tool/libguestfs-test-tool.pod:99
25555 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
25556 "which is used as part of the tests."
25560 #: ../test-tool/libguestfs-test-tool.pod:106
25562 "For the full list of environment variables which may affect libguestfs, "
25563 "please see the L<guestfs(3)> manual page."
25567 #: ../test-tool/libguestfs-test-tool.pod:111
25568 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
25572 #: ../test-tool/libguestfs-test-tool.pod:121
25573 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
25577 #: ../fuse/guestmount.pod:5
25578 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
25582 #: ../fuse/guestmount.pod:9
25585 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
25590 #: ../fuse/guestmount.pod:11
25593 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
25598 #: ../fuse/guestmount.pod:13
25601 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
25606 #: ../fuse/guestmount.pod:17
25608 "You must I<not> use C<guestmount> in read-write mode on live virtual "
25609 "machines. If you do this, you risk disk corruption in the VM."
25613 #: ../fuse/guestmount.pod:22
25615 "The guestmount program can be used to mount virtual machine filesystems and "
25616 "other disk images on the host. It uses libguestfs for access to the guest "
25617 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
25618 "a mountable device."
25622 #: ../fuse/guestmount.pod:27
25624 "Along with other options, you have to give at least one device (I<-a> "
25625 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
25626 "option) or use the I<-i> inspection option. How this works is better "
25627 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
25632 #: ../fuse/guestmount.pod:33
25634 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
25635 "by you, and the filesystem will not be visible to any other users unless you "
25636 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
25637 "the filesystem, use the C<fusermount -u> command."
25641 #: ../fuse/guestmount.pod:41
25643 "For a typical Windows guest which has its main filesystem on the first "
25648 #: ../fuse/guestmount.pod:44
25651 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
25656 #: ../fuse/guestmount.pod:46
25658 "For a typical Linux guest which has a /boot filesystem on the first "
25659 "partition, and the root filesystem on a logical volume:"
25663 #: ../fuse/guestmount.pod:49
25666 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
25671 #: ../fuse/guestmount.pod:51
25672 msgid "To get libguestfs to detect guest mountpoints for you:"
25676 #: ../fuse/guestmount.pod:53
25679 " guestmount -a guest.img -i --ro /mnt\n"
25684 #: ../fuse/guestmount.pod:55
25685 msgid "For a libvirt guest called \"Guest\" you could do:"
25689 #: ../fuse/guestmount.pod:57
25692 " guestmount -d Guest -i --ro /mnt\n"
25697 #: ../fuse/guestmount.pod:59
25699 "If you don't know what filesystems are contained in a guest or disk image, "
25700 "use L<virt-filesystems(1)> first:"
25704 #: ../fuse/guestmount.pod:62
25707 " virt-filesystems MyGuest\n"
25712 #: ../fuse/guestmount.pod:64
25714 "If you want to trace the libguestfs calls but without excessive debugging "
25715 "information, we recommend:"
25719 #: ../fuse/guestmount.pod:67
25722 " guestmount [...] --trace /mnt\n"
25727 #: ../fuse/guestmount.pod:69
25728 msgid "If you want to debug the program, we recommend:"
25732 #: ../fuse/guestmount.pod:71
25735 " guestmount [...] --trace --verbose /mnt\n"
25740 #: ../fuse/guestmount.pod:77
25741 msgid "B<-a image> | B<--add image>"
25745 #: ../fuse/guestmount.pod:79
25746 msgid "Add a block device or virtual machine image."
25750 #: ../fuse/guestmount.pod:84
25751 msgid "B<-c URI> | B<--connect URI>"
25755 #: ../fuse/guestmount.pod:90
25756 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
25760 #: ../fuse/guestmount.pod:96
25761 msgid "B<--dir-cache-timeout N>"
25765 #: ../fuse/guestmount.pod:98
25767 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
25768 "seconds. The readdir cache [actually, there are several semi-independent "
25769 "caches] is populated after a readdir(2) call with the stat and extended "
25770 "attributes of the files in the directory, in anticipation that they will be "
25771 "requested soon after."
25775 #: ../fuse/guestmount.pod:104
25777 "There is also a different attribute cache implemented by FUSE (see the FUSE "
25778 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
25779 "requests, only cache existing ones."
25783 #: ../fuse/guestmount.pod:115
25784 msgid "B<--format=raw|qcow2|..> | B<--format>"
25788 #: ../fuse/guestmount.pod:122
25790 "If you have untrusted raw-format guest disk images, you should use this "
25791 "option to specify the disk format. This avoids a possible security problem "
25792 "with malicious guests (CVE-2010-3851). See also "
25793 "L<guestfs(3)/guestfs_add_drive_opts>."
25797 #: ../fuse/guestmount.pod:127
25798 msgid "B<--fuse-help>"
25802 #: ../fuse/guestmount.pod:129
25803 msgid "Display help on special FUSE options (see I<-o> below)."
25807 #: ../fuse/guestmount.pod:133
25808 msgid "Display brief help and exit."
25812 #: ../fuse/guestmount.pod:135
25813 msgid "B<-i> | B<--inspector>"
25817 #: ../fuse/guestmount.pod:146
25818 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
25822 #: ../fuse/guestmount.pod:148
25824 "Mount the named partition or logical volume on the given mountpoint B<in the "
25825 "guest> (this has nothing to do with mountpoints in the host)."
25829 #: ../fuse/guestmount.pod:151
25831 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
25832 "something on C</>."
25836 #: ../fuse/guestmount.pod:154
25837 msgid "B<-n> | B<--no-sync>"
25841 #: ../fuse/guestmount.pod:156
25843 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
25844 "unmounted. If you specify this option, then we don't attempt to sync the "
25845 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
25849 #: ../fuse/guestmount.pod:161
25850 msgid "B<-o option> | B<--option option>"
25854 #: ../fuse/guestmount.pod:163
25855 msgid "Pass extra options to FUSE."
25859 #: ../fuse/guestmount.pod:165
25861 "To get a list of all the extra options supported by FUSE, use the command "
25862 "below. Note that only the FUSE I<-o> options can be passed, and only some "
25863 "of them are a good idea."
25867 #: ../fuse/guestmount.pod:169
25870 " guestmount --fuse-help\n"
25875 #: ../fuse/guestmount.pod:171
25876 msgid "Some potentially useful FUSE options:"
25880 #: ../fuse/guestmount.pod:175
25881 msgid "B<-o allow_other>"
25885 #: ../fuse/guestmount.pod:177
25886 msgid "Allow other users to see the filesystem."
25890 #: ../fuse/guestmount.pod:179
25891 msgid "B<-o attr_timeout=N>"
25895 #: ../fuse/guestmount.pod:181
25896 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
25900 #: ../fuse/guestmount.pod:183
25901 msgid "B<-o kernel_cache>"
25905 #: ../fuse/guestmount.pod:185
25907 "Allow the kernel to cache files (reduces the number of reads that have to go "
25908 "through the L<guestfs(3)> API). This is generally a good idea if you can "
25909 "afford the extra memory usage."
25913 #: ../fuse/guestmount.pod:189
25914 msgid "B<-o uid=N> B<-o gid=N>"
25918 #: ../fuse/guestmount.pod:191
25920 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
25921 "the chosen values."
25925 #: ../fuse/guestmount.pod:196
25926 msgid "B<-r> | B<--ro>"
25930 #: ../fuse/guestmount.pod:198
25932 "Add devices and mount everything read-only. Also disallow writes and make "
25933 "the disk appear read-only to FUSE."
25937 #: ../fuse/guestmount.pod:201
25939 "This is highly recommended if you are not going to edit the guest disk. If "
25940 "the guest is running and this option is I<not> supplied, then there is a "
25941 "strong risk of disk corruption in the guest. We try to prevent this from "
25942 "happening, but it is not always possible."
25946 #: ../fuse/guestmount.pod:206
25947 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
25951 #: ../fuse/guestmount.pod:210
25952 msgid "Enable SELinux support for the guest."
25956 #: ../fuse/guestmount.pod:212
25957 msgid "B<-v> | B<--verbose>"
25961 #: ../fuse/guestmount.pod:214
25962 msgid "Enable verbose messages from underlying libguestfs."
25966 #: ../fuse/guestmount.pod:216
25967 msgid "B<-V> | B<--version>"
25971 #: ../fuse/guestmount.pod:218
25972 msgid "Display the program version and exit."
25976 #: ../fuse/guestmount.pod:220
25977 msgid "B<-w> | B<--rw>"
25981 #: ../fuse/guestmount.pod:222
25983 "This option does nothing at the moment. See L<guestfish(1)/OPENING DISKS "
25984 "FOR READ AND WRITE>."
25988 #: ../fuse/guestmount.pod:225
25989 msgid "B<-x> | B<--trace>"
25993 #: ../fuse/guestmount.pod:227
25994 msgid "Trace libguestfs calls."
25998 #: ../fuse/guestmount.pod:229
25999 msgid "This also stops the daemon from forking into the background."
26003 #: ../fuse/guestmount.pod:235
26005 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
26006 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
26007 "L<http://fuse.sf.net/>."
26011 #: ../tools/virt-edit.pl:34
26012 msgid "virt-edit - Edit a file in a virtual machine"
26016 #: ../tools/virt-edit.pl:38
26019 " virt-edit [--options] domname file\n"
26024 #: ../tools/virt-edit.pl:40
26027 " virt-edit [--options] disk.img [disk.img ...] file\n"
26032 #: ../tools/virt-edit.pl:42
26035 " virt-edit [domname|disk.img] file -e 'expr'\n"
26040 #: ../tools/virt-edit.pl:46
26042 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
26043 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
26044 "doing this, but doesn't catch all cases."
26048 #: ../tools/virt-edit.pl:52
26050 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
26051 "the named virtual machine (or disk image)."
26055 #: ../tools/virt-edit.pl:55
26057 "If you want to just view a file, use L<virt-cat(1)>. For more complex cases "
26058 "you should look at the L<guestfish(1)> tool."
26062 #: ../tools/virt-edit.pl:60
26063 msgid "Edit the named files interactively:"
26067 #: ../tools/virt-edit.pl:62
26070 " virt-edit mydomain /boot/grub/grub.conf\n"
26075 #: ../tools/virt-edit.pl:64
26078 " virt-edit mydomain /etc/passwd\n"
26083 #: ../tools/virt-edit.pl:66
26085 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
26086 "below). To change the init default level to 5:"
26090 #: ../tools/virt-edit.pl:70
26093 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
26098 #: ../tools/virt-edit.pl:82 ../tools/virt-win-reg.pl:106 ../tools/virt-list-filesystems.pl:63 ../tools/virt-tar.pl:108 ../tools/virt-make-fs.pl:163 ../tools/virt-list-partitions.pl:64
26099 msgid "Display brief help."
26103 #: ../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:116 ../tools/virt-make-fs.pl:171 ../tools/virt-list-partitions.pl:72
26104 msgid "Display version number and exit."
26108 #: ../tools/virt-edit.pl:96
26109 msgid "B<--backup extension> | B<-b extension>"
26113 #: ../tools/virt-edit.pl:98
26115 "Create a backup of the original file I<in the guest disk image>. The backup "
26116 "has the original filename with C<extension> added."
26120 #: ../tools/virt-edit.pl:101
26122 "Usually the first character of C<extension> would be a dot C<.> so you would "
26127 #: ../tools/virt-edit.pl:104
26130 " virt-edit -b .orig [etc]\n"
26135 #: ../tools/virt-edit.pl:106
26136 msgid "By default, no backup file is made."
26140 #: ../tools/virt-edit.pl:112 ../tools/virt-win-reg.pl:128 ../tools/virt-list-filesystems.pl:77 ../tools/virt-tar.pl:122 ../tools/virt-list-partitions.pl:78
26141 msgid "B<--connect URI> | B<-c URI>"
26145 #: ../tools/virt-edit.pl:114 ../tools/virt-win-reg.pl:130 ../tools/virt-list-filesystems.pl:79 ../tools/virt-tar.pl:124 ../tools/virt-list-partitions.pl:80
26147 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
26148 "to the default libvirt hypervisor."
26152 #: ../tools/virt-edit.pl:117 ../tools/virt-win-reg.pl:133 ../tools/virt-list-filesystems.pl:82 ../tools/virt-tar.pl:127 ../tools/virt-list-partitions.pl:83
26154 "If you specify guest block devices directly, then libvirt is not used at "
26159 #: ../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:134 ../tools/virt-list-partitions.pl:90
26160 msgid "B<--format> raw"
26164 #: ../tools/virt-edit.pl:126 ../tools/virt-win-reg.pl:142 ../tools/virt-list-filesystems.pl:91 ../tools/virt-tar.pl:136 ../tools/virt-list-partitions.pl:92
26166 "Specify the format of disk images given on the command line. If this is "
26167 "omitted then the format is autodetected from the content of the disk image."
26171 #: ../tools/virt-edit.pl:130 ../tools/virt-win-reg.pl:146 ../tools/virt-list-filesystems.pl:95 ../tools/virt-tar.pl:140 ../tools/virt-list-partitions.pl:96
26173 "If disk images are requested from libvirt, then this program asks libvirt "
26174 "for this information. In this case, the value of the format parameter is "
26179 #: ../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:144 ../tools/virt-list-partitions.pl:100
26181 "If working with untrusted raw-format guest disk images, you should ensure "
26182 "the format is always specified."
26186 #: ../tools/virt-edit.pl:141
26187 msgid "B<--expr EXPR> | B<-e EXPR>"
26191 #: ../tools/virt-edit.pl:143
26193 "Instead of launching the external editor, non-interactively apply the Perl "
26194 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
26199 #: ../tools/virt-edit.pl:147
26201 "Be careful to properly quote the expression to prevent it from being altered "
26206 #: ../tools/virt-edit.pl:268
26207 msgid "NON-INTERACTIVE EDITING"
26211 #: ../tools/virt-edit.pl:270
26213 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
26214 "administrator can interactively edit the file."
26218 #: ../tools/virt-edit.pl:273
26220 "There are two ways also to use C<virt-edit> from scripts in order to make "
26221 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
26222 "like this, it's less error-prone to write scripts directly using the "
26223 "libguestfs API and Augeas for configuration file editing.)"
26227 #: ../tools/virt-edit.pl:279
26229 "The first method is to temporarily set C<$EDITOR> to any script or program "
26230 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
26231 "update C<tmpfile> in place however it likes."
26235 #: ../tools/virt-edit.pl:283
26237 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
26238 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
26239 "instances of C<foo> with C<bar> in a file:"
26243 #: ../tools/virt-edit.pl:287
26246 " virt-edit domname filename -e 's/foo/bar/'\n"
26251 #: ../tools/virt-edit.pl:289
26253 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
26254 "For example to delete root's password you could do:"
26258 #: ../tools/virt-edit.pl:292
26261 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
26266 #: ../tools/virt-edit.pl:294
26268 "What really happens is that the snippet is evaluated as a Perl expression "
26269 "for each line of the file. The line, including the final C<\\n>, is passed "
26270 "in C<$_> and the expression should update C<$_> or leave it unchanged."
26274 #: ../tools/virt-edit.pl:299
26276 "To delete a line, set C<$_> to the empty string. For example, to delete the "
26277 "C<apache> user account from the password file you can do:"
26281 #: ../tools/virt-edit.pl:302
26284 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
26289 #: ../tools/virt-edit.pl:304
26291 "To insert a line, prepend or append it to C<$_>. However appending lines to "
26292 "the end of the file is rather difficult this way since there is no concept "
26293 "of \"last line of the file\" - your expression just doesn't get called "
26294 "again. You might want to use the first method (setting C<$EDITOR>) if you "
26299 #: ../tools/virt-edit.pl:310
26301 "The variable C<$lineno> contains the current line number. As is "
26302 "traditional, the first line in the file is number C<1>."
26306 #: ../tools/virt-edit.pl:313
26308 "The return value from the expression is ignored, but the expression may call "
26309 "C<die> in order to abort the whole program, leaving the original file "
26314 #: ../tools/virt-edit.pl:317
26316 "Remember when matching the end of a line that C<$_> may contain the final "
26317 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
26318 "newline then neither of these. Thus to match or substitute some text at the "
26319 "end of a line, use this regular expression:"
26323 #: ../tools/virt-edit.pl:322
26326 " /some text(\\r?\\n)?$/\n"
26331 #: ../tools/virt-edit.pl:324
26333 "Alternately, use the perl C<chomp> function, being careful not to chomp "
26334 "C<$_> itself (since that would remove all newlines from the file):"
26338 #: ../tools/virt-edit.pl:328
26341 " my $m = $_; chomp $m; $m =~ /some text$/\n"
26346 #: ../tools/virt-edit.pl:334
26351 #: ../tools/virt-edit.pl:336
26353 "If set, this string is used as the editor. It may contain arguments, "
26354 "eg. C<\"emacs -nw\">"
26358 #: ../tools/virt-edit.pl:339
26359 msgid "If not set, C<vi> is used."
26363 #: ../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:274 ../tools/virt-make-fs.pl:527 ../tools/virt-list-partitions.pl:250
26364 msgid "SHELL QUOTING"
26368 #: ../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:276 ../tools/virt-make-fs.pl:529 ../tools/virt-list-partitions.pl:252
26370 "Libvirt guest names can contain arbitrary characters, some of which have "
26371 "meaning to the shell such as C<#> and space. You may need to quote or "
26372 "escape these characters on the command line. See the shell manual page "
26373 "L<sh(1)> for details."
26377 #: ../tools/virt-edit.pl:352
26379 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
26380 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>, "
26381 "L<perl(1)>, L<perlre(1)>."
26385 #: ../tools/virt-edit.pl:362 ../tools/virt-win-reg.pl:598 ../tools/virt-resize.pl:1504 ../tools/virt-list-filesystems.pl:202 ../tools/virt-tar.pl:292 ../tools/virt-make-fs.pl:559 ../tools/virt-list-partitions.pl:269
26390 #: ../tools/virt-edit.pl:364 ../tools/virt-win-reg.pl:600 ../tools/virt-resize.pl:1506 ../tools/virt-list-filesystems.pl:204 ../tools/virt-tar.pl:294 ../tools/virt-make-fs.pl:561 ../tools/virt-list-partitions.pl:271
26391 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
26395 #: ../tools/virt-edit.pl:368 ../tools/virt-list-partitions.pl:275
26396 msgid "Copyright (C) 2009-2010 Red Hat Inc."
26400 #: ../tools/virt-win-reg.pl:37
26402 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
26407 #: ../tools/virt-win-reg.pl:41
26410 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
26415 #: ../tools/virt-win-reg.pl:43
26418 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
26423 #: ../tools/virt-win-reg.pl:45
26426 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
26431 #: ../tools/virt-win-reg.pl:47
26434 " virt-win-reg --merge domname [input.reg ...]\n"
26439 #: ../tools/virt-win-reg.pl:49
26442 " virt-win-reg [--options] disk.img ... # instead of domname\n"
26447 #: ../tools/virt-win-reg.pl:53
26449 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
26450 "virtual machines. If you do this, you I<will> get irreversible disk "
26451 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
26452 "but doesn't catch all cases."
26456 #: ../tools/virt-win-reg.pl:58
26458 "Modifying the Windows Registry is an inherently risky operation. The format "
26459 "is deliberately obscure and undocumented, and Registry changes can leave the "
26460 "system unbootable. Therefore when using the C<--merge> option, make sure "
26461 "you have a reliable backup first."
26465 #: ../tools/virt-win-reg.pl:65
26467 "This program can export and merge Windows Registry entries from a Windows "
26472 #: ../tools/virt-win-reg.pl:68
26474 "The first parameter is the libvirt guest name or the raw disk image of a "
26479 #: ../tools/virt-win-reg.pl:71
26481 "If C<--merge> is I<not> specified, then the chosen registry key is "
26482 "displayed/exported (recursively). For example:"
26486 #: ../tools/virt-win-reg.pl:74
26489 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
26494 #: ../tools/virt-win-reg.pl:76
26495 msgid "You can also display single values from within registry keys, for example:"
26499 #: ../tools/virt-win-reg.pl:79
26502 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
26503 " $ virt-win-reg Windows7 $cvkey ProductName\n"
26504 " Windows 7 Enterprise\n"
26509 #: ../tools/virt-win-reg.pl:83
26511 "With C<--merge>, you can merge a textual regedit file into the Windows "
26516 #: ../tools/virt-win-reg.pl:86
26519 " $ virt-win-reg --merge Windows7 changes.reg\n"
26524 #: ../tools/virt-win-reg.pl:88
26529 #: ../tools/virt-win-reg.pl:90
26531 "This program is only meant for simple access to the registry. If you want "
26532 "to do complicated things with the registry, we suggest you download the "
26533 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
26534 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
26535 "L<hivexregedit(1)>."
26539 #: ../tools/virt-win-reg.pl:120 ../tools/virt-make-fs.pl:177
26544 #: ../tools/virt-win-reg.pl:122 ../tools/virt-resize.pl:498
26545 msgid "Enable debugging messages."
26549 #: ../tools/virt-win-reg.pl:157
26554 #: ../tools/virt-win-reg.pl:159
26556 "In merge mode, this merges a textual regedit file into the Windows Registry "
26557 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
26558 "displays or exports Registry entries instead."
26562 #: ../tools/virt-win-reg.pl:163
26564 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
26565 "result in disk corruption. However exporting (without this flag) is always "
26570 #: ../tools/virt-win-reg.pl:171
26571 msgid "B<--encoding> UTF-16LE|ASCII"
26575 #: ../tools/virt-win-reg.pl:173
26577 "When merging (only), you may need to specify the encoding for strings to be "
26578 "used in the hive file. This is explained in detail in "
26579 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
26583 #: ../tools/virt-win-reg.pl:177
26585 "The default is to use UTF-16LE, which should work with recent versions of "
26590 #: ../tools/virt-win-reg.pl:402
26591 msgid "SUPPORTED SYSTEMS"
26595 #: ../tools/virt-win-reg.pl:404
26597 "The program currently supports Windows NT-derived guests starting with "
26598 "Windows XP through to at least Windows 7."
26602 #: ../tools/virt-win-reg.pl:407
26604 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, "
26605 "C<HKEY_LOCAL_MACHINE\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, "
26606 "C<HKEY_LOCAL_MACHINE\\SYSTEM> and C<HKEY_USERS\\.DEFAULT>."
26610 #: ../tools/virt-win-reg.pl:411
26612 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
26617 #: ../tools/virt-win-reg.pl:414
26619 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
26624 #: ../tools/virt-win-reg.pl:417
26629 #: ../tools/virt-win-reg.pl:419
26631 "C<virt-win-reg> expects that regedit files have already been reencoded in "
26632 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
26633 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
26634 "with Windows-style line endings, you may need to reencode the whole file "
26635 "before or after processing."
26639 #: ../tools/virt-win-reg.pl:425
26641 "To reencode a file from Windows format to Linux (before processing it with "
26642 "the C<--merge> option), you would do something like this:"
26646 #: ../tools/virt-win-reg.pl:428
26649 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
26654 #: ../tools/virt-win-reg.pl:430
26656 "To go in the opposite direction, after exporting and before sending the file "
26657 "to a Windows user, do something like this:"
26661 #: ../tools/virt-win-reg.pl:433
26664 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
26669 #: ../tools/virt-win-reg.pl:435
26670 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
26674 #: ../tools/virt-win-reg.pl:437
26676 "If you are unsure about the current encoding, use the L<file(1)> command. "
26677 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
26678 "Windows-style (CRLF) line endings, like this:"
26682 #: ../tools/virt-win-reg.pl:441
26685 " $ file software.reg\n"
26686 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
26687 " with CRLF line terminators\n"
26692 #: ../tools/virt-win-reg.pl:445
26693 msgid "This file would need conversion before you could C<--merge> it."
26697 #: ../tools/virt-win-reg.pl:447
26698 msgid "CurrentControlSet etc."
26702 #: ../tools/virt-win-reg.pl:449
26704 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
26705 "Registry at the level of the hive file, and therefore you cannot modify "
26710 #: ../tools/virt-win-reg.pl:453
26712 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
26713 "circumstances it might refer to another control set. The way to find out is "
26714 "to look at the C<HKLM\\SYSTEM\\Select> key:"
26718 #: ../tools/virt-win-reg.pl:457
26721 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
26722 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
26723 " \"Current\"=dword:00000001\n"
26724 " \"Default\"=dword:00000001\n"
26725 " \"Failed\"=dword:00000000\n"
26726 " \"LastKnownGood\"=dword:00000002\n"
26731 #: ../tools/virt-win-reg.pl:464
26732 msgid "\"Current\" is the one which Windows will choose when it boots."
26736 #: ../tools/virt-win-reg.pl:466
26737 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
26741 #: ../tools/virt-win-reg.pl:469
26742 msgid "WINDOWS TIPS"
26746 #: ../tools/virt-win-reg.pl:471
26748 "Note that some of these tips modify the guest disk image. The guest I<must> "
26749 "be shut off, else you will get disk corruption."
26753 #: ../tools/virt-win-reg.pl:474
26754 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
26758 #: ../tools/virt-win-reg.pl:476
26760 "Prepare a DOS batch script, VBScript or executable. Upload this using "
26761 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
26762 "is uploaded into C<C:\\>:"
26766 #: ../tools/virt-win-reg.pl:480
26769 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
26774 #: ../tools/virt-win-reg.pl:482
26775 msgid "Prepare a regedit file containing the registry change:"
26779 #: ../tools/virt-win-reg.pl:484
26782 " cat > test.reg <<'EOF'\n"
26783 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
26784 " \"Test\"=\"c:\\\\test.bat\"\n"
26790 #: ../tools/virt-win-reg.pl:489
26792 "In this example we use the key C<RunOnce> which means that the script will "
26793 "run precisely once when the first user logs in. If you want it to run every "
26794 "time a user logs in, replace C<RunOnce> with C<Run>."
26798 #: ../tools/virt-win-reg.pl:493
26799 msgid "Now update the registry:"
26803 #: ../tools/virt-win-reg.pl:495
26806 " virt-win-reg --merge WindowsGuest test.reg\n"
26811 #: ../tools/virt-win-reg.pl:497
26812 msgid "INSTALLING A SERVICE"
26816 #: ../tools/virt-win-reg.pl:499
26818 "This section assumes you are familiar with Windows services, and you either "
26819 "have a program which handles the Windows Service Control Protocol directly "
26820 "or you want to run any program using a service wrapper like SrvAny or the "
26825 #: ../tools/virt-win-reg.pl:504
26827 "First upload the program and optionally the service wrapper. In this case "
26828 "the test program is called C<test.exe> and we are using the RHSrvAny "
26833 #: ../tools/virt-win-reg.pl:508
26836 " guestfish -i -d WindowsGuest <<EOF\n"
26837 " upload rhsrvany.exe /rhsrvany.exe\n"
26838 " upload test.exe /test.exe\n"
26844 #: ../tools/virt-win-reg.pl:513
26846 "Prepare a regedit file containing the registry changes. In this example, "
26847 "the first registry change is needed for the service itself or the service "
26848 "wrapper (if used). The second registry change is only needed because I am "
26849 "using the RHSrvAny service wrapper."
26853 #: ../tools/virt-win-reg.pl:518
26856 " cat > service.reg <<'EOF'\n"
26857 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
26858 " \"Type\"=dword:00000010\n"
26859 " \"Start\"=dword:00000002\n"
26860 " \"ErrorControl\"=dword:00000001\n"
26861 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
26862 " \"DisplayName\"=\"RHSrvAny\"\n"
26863 " \"ObjectName\"=\"NetworkService\"\n"
26868 #: ../tools/virt-win-reg.pl:527
26871 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
26872 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
26873 " \"PWD\"=\"c:\\\\Temp\"\n"
26879 #: ../tools/virt-win-reg.pl:538
26881 "For use of C<ControlSet001> see the section above in this manual page. You "
26882 "may need to adjust this according to the control set that is in use by the "
26887 #: ../tools/virt-win-reg.pl:544
26889 "C<\"ObjectName\"> controls the privileges that the service will have. An "
26890 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
26891 "privileged account."
26895 #: ../tools/virt-win-reg.pl:550
26897 "For the meaning of the magic numbers, see this Microsoft KB article: "
26898 "L<http://support.microsoft.com/kb/103000>."
26902 #: ../tools/virt-win-reg.pl:555
26903 msgid "Update the registry:"
26907 #: ../tools/virt-win-reg.pl:557
26910 " virt-win-reg --merge WindowsGuest service.reg\n"
26915 #: ../tools/virt-win-reg.pl:561
26917 "Be careful when passing parameters containing C<\\> (backslash) in the "
26918 "shell. Usually you will have to use 'single quotes' or double backslashes "
26919 "(but not both) to protect them from the shell."
26923 #: ../tools/virt-win-reg.pl:565
26924 msgid "Paths and value names are case-insensitive."
26928 #: ../tools/virt-win-reg.pl:574
26930 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
26931 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
26932 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
26933 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
26937 #: ../tools/virt-win-reg.pl:589 ../tools/virt-make-fs.pl:550
26939 "When reporting bugs, please enable debugging and capture the I<complete> "
26944 #: ../tools/virt-win-reg.pl:592
26947 " export LIBGUESTFS_DEBUG=1\n"
26948 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
26953 #: ../tools/virt-win-reg.pl:595
26955 "Attach /tmp/virt-win-reg.log to a new bug report at "
26956 "L<https://bugzilla.redhat.com/>"
26960 #: ../tools/virt-win-reg.pl:604 ../tools/virt-resize.pl:1510 ../tools/virt-make-fs.pl:565
26961 msgid "Copyright (C) 2010 Red Hat Inc."
26965 #: ../tools/virt-resize.pl:42
26966 msgid "virt-resize - Resize a virtual machine disk"
26970 #: ../tools/virt-resize.pl:46
26973 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
26974 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
26975 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
26980 #: ../tools/virt-resize.pl:52
26982 "Virt-resize is a tool which can resize a virtual machine disk, making it "
26983 "larger or smaller overall, and resizing or deleting any partitions contained "
26988 #: ../tools/virt-resize.pl:56
26990 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
26991 "not> be used on live virtual machines - for consistent results, shut the "
26992 "virtual machine down before resizing it."
26996 #: ../tools/virt-resize.pl:60
26998 "If you are not familiar with the associated tools: L<virt-filesystems(1)> "
26999 "and L<virt-df(1)>, we recommend you go and read those manual pages first."
27003 #: ../tools/virt-resize.pl:66
27005 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
27006 "fill the extra 5GB of space."
27010 #: ../tools/virt-resize.pl:69
27013 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
27014 " virt-filesystems --long --h --all -a olddisk\n"
27015 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
27016 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
27021 #: ../tools/virt-resize.pl:74
27023 "As above, but make the /boot partition 200MB bigger, while giving the "
27024 "remaining space to /dev/sda2:"
27028 #: ../tools/virt-resize.pl:77
27031 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
27036 #: ../tools/virt-resize.pl:79
27037 msgid "As above, but the output format will be uncompressed qcow2:"
27041 #: ../tools/virt-resize.pl:81
27044 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
27045 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
27050 #: ../tools/virt-resize.pl:84
27051 msgid "DETAILED USAGE"
27055 #: ../tools/virt-resize.pl:86
27056 msgid "EXPANDING A VIRTUAL MACHINE DISK"
27060 #: ../tools/virt-resize.pl:90
27061 msgid "1. Shut down the virtual machine"
27065 #: ../tools/virt-resize.pl:92
27066 msgid "2. Locate input disk image"
27070 #: ../tools/virt-resize.pl:94
27072 "Locate the input disk image (ie. the file or device on the host containing "
27073 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
27074 "dumpxml> like this to find the disk image name:"
27078 #: ../tools/virt-resize.pl:98
27081 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
27082 " Found 1 nodes:\n"
27084 " <source dev=\"/dev/vg/lv_guest\" />\n"
27089 #: ../tools/virt-resize.pl:103
27090 msgid "3. Look at current sizing"
27094 #: ../tools/virt-resize.pl:105
27095 msgid "Use L<virt-filesystems(1)> to display the current partitions and sizes:"
27099 #: ../tools/virt-resize.pl:108
27102 " # virt-filesystems --long --parts --blkdevs -h -a /dev/vg/lv_guest\n"
27103 " Name Type Size Parent\n"
27104 " /dev/sda1 partition 101M /dev/sda\n"
27105 " /dev/sda2 partition 7.9G /dev/sda\n"
27106 " /dev/sda device 8.0G -\n"
27111 #: ../tools/virt-resize.pl:114
27113 "(This example is a virtual machine with an 8 GB disk which we would like to "
27114 "expand up to 10 GB)."
27118 #: ../tools/virt-resize.pl:117
27119 msgid "4. Create output disk"
27123 #: ../tools/virt-resize.pl:119
27125 "Virt-resize cannot do in-place disk modifications. You have to have space "
27126 "to store the resized output disk."
27130 #: ../tools/virt-resize.pl:122
27131 msgid "To store the resized disk image in a file, create a file of a suitable size:"
27135 #: ../tools/virt-resize.pl:125
27138 " # rm -f outdisk\n"
27139 " # truncate -s 10G outdisk\n"
27144 #: ../tools/virt-resize.pl:128
27145 msgid "Or use L<lvcreate(1)> to create a logical volume:"
27149 #: ../tools/virt-resize.pl:130
27152 " # lvcreate -L 10G -n lv_name vg_name\n"
27157 #: ../tools/virt-resize.pl:132
27158 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
27162 #: ../tools/virt-resize.pl:134
27165 " # virsh pool-list\n"
27166 " # virsh vol-create-as poolname newvol 10G\n"
27171 #: ../tools/virt-resize.pl:137
27176 #: ../tools/virt-resize.pl:139
27178 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
27179 "file) and the output disk. The output disk is the one created in the "
27184 #: ../tools/virt-resize.pl:143
27187 " # virt-resize indisk outdisk\n"
27192 #: ../tools/virt-resize.pl:145
27194 "This command just copies disk image C<indisk> to disk image C<outdisk> "
27195 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
27196 "larger, then an extra, empty partition is created at the end of the disk "
27197 "covering the extra space. If C<outdisk> is smaller, then it will give an "
27202 #: ../tools/virt-resize.pl:151
27204 "More realistically you'd want to expand existing partitions in the disk "
27205 "image by passing extra options (for the full list see the L</OPTIONS> "
27210 #: ../tools/virt-resize.pl:155
27212 "L</--expand> is the most useful option. It expands the named partition "
27213 "within the disk to fill any extra space:"
27217 #: ../tools/virt-resize.pl:158
27220 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
27225 #: ../tools/virt-resize.pl:160
27227 "(In this case, an extra partition is I<not> created at the end of the disk, "
27228 "because there will be no unused space)."
27232 #: ../tools/virt-resize.pl:163
27234 "L</--resize> is the other commonly used option. The following would "
27235 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
27236 "rest of the available space:"
27240 #: ../tools/virt-resize.pl:167
27243 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
27244 " indisk outdisk\n"
27249 #: ../tools/virt-resize.pl:170
27251 "If the expanded partition in the image contains a filesystem or LVM PV, then "
27252 "if virt-resize knows how, it will resize the contents, the equivalent of "
27253 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or "
27254 "L<ntfsresize(8)>. However virt-resize does not know how to resize some "
27255 "filesystems, so you would have to online resize them after booting the "
27260 #: ../tools/virt-resize.pl:177
27261 msgid "Other options are covered below."
27265 #: ../tools/virt-resize.pl:179
27270 #: ../tools/virt-resize.pl:181
27271 msgid "Thoroughly test the new disk image I<before> discarding the old one."
27275 #: ../tools/virt-resize.pl:183
27276 msgid "If you are using libvirt, edit the XML to point at the new disk:"
27280 #: ../tools/virt-resize.pl:185
27283 " # virsh edit guestname\n"
27288 #: ../tools/virt-resize.pl:187
27290 "Change E<lt>source ...E<gt>, see "
27291 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
27295 #: ../tools/virt-resize.pl:190
27296 msgid "Then start up the domain with the new, resized disk:"
27300 #: ../tools/virt-resize.pl:192
27303 " # virsh start guestname\n"
27308 #: ../tools/virt-resize.pl:194
27310 "and check that it still works. See also the L</NOTES> section below for "
27311 "additional information."
27315 #: ../tools/virt-resize.pl:197
27316 msgid "7. Resize LVs etc inside the guest"
27320 #: ../tools/virt-resize.pl:199
27321 msgid "(This can also be done offline using L<guestfish(1)>)"
27325 #: ../tools/virt-resize.pl:201
27327 "Once the guest has booted you should see the new space available, at least "
27328 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
27329 "may need to resize LVs inside PVs, and also resize filesystem types that "
27330 "virt-resize does not know how to expand."
27334 #: ../tools/virt-resize.pl:208
27335 msgid "SHRINKING A VIRTUAL MACHINE DISK"
27339 #: ../tools/virt-resize.pl:210
27341 "Shrinking is somewhat more complex than expanding, and only an overview is "
27346 #: ../tools/virt-resize.pl:213
27348 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
27349 "filesystems). The user has to shrink content before passing the disk image "
27350 "to virt-resize, and virt-resize will check that the content has been shrunk "
27355 #: ../tools/virt-resize.pl:218
27356 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
27360 #: ../tools/virt-resize.pl:220
27362 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
27363 "steps 3 and 4 above to allocate a new disk image."
27367 #: ../tools/virt-resize.pl:223
27368 msgid "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
27372 #: ../tools/virt-resize.pl:226
27373 msgid "IGNORING OR DELETING PARTITIONS"
27377 #: ../tools/virt-resize.pl:228
27379 "virt-resize also gives a convenient way to ignore or delete partitions when "
27380 "copying from the input disk to the output disk. Ignoring a partition speeds "
27381 "up the copy where you don't care about the existing contents of a "
27382 "partition. Deleting a partition removes it completely, but note that it "
27383 "also renumbers any partitions after the one which is deleted, which can "
27384 "leave some guests unbootable."
27388 #: ../tools/virt-resize.pl:235
27389 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
27393 #: ../tools/virt-resize.pl:237
27395 "If the input disk is in qcow2 format, then you may prefer that the output is "
27396 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
27397 "the fly. The output format is simply determined by the format of the empty "
27398 "output container that you provide. Thus to create qcow2 output, use:"
27402 #: ../tools/virt-resize.pl:243
27405 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
27410 #: ../tools/virt-resize.pl:245
27411 msgid "instead of the truncate command (use C<-c> for a compressed disk)."
27415 #: ../tools/virt-resize.pl:247
27416 msgid "Similarly, to get non-sparse raw output use:"
27420 #: ../tools/virt-resize.pl:249
27423 " fallocate -l size outdisk\n"
27428 #: ../tools/virt-resize.pl:251
27430 "(on older systems that don't have the L<fallocate(1)> command use C<dd "
27431 "if=/dev/zero of=outdisk bs=1M count=..>)"
27435 #: ../tools/virt-resize.pl:264
27436 msgid "Display help."
27440 #: ../tools/virt-resize.pl:278
27441 msgid "B<--resize part=size>"
27445 #: ../tools/virt-resize.pl:280
27447 "Resize the named partition (expanding or shrinking it) so that it has the "
27452 #: ../tools/virt-resize.pl:283
27454 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
27455 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
27456 "Exabytes; or as a percentage of the current size; or as a relative number or "
27457 "percentage. For example:"
27461 #: ../tools/virt-resize.pl:288
27464 " --resize /dev/sda2=10G\n"
27469 #: ../tools/virt-resize.pl:290
27472 " --resize /dev/sda4=90%\n"
27477 #: ../tools/virt-resize.pl:292
27480 " --resize /dev/sda2=+1G\n"
27485 #: ../tools/virt-resize.pl:294
27488 " --resize /dev/sda2=-200M\n"
27493 #: ../tools/virt-resize.pl:296
27496 " --resize /dev/sda1=+128K\n"
27501 #: ../tools/virt-resize.pl:298
27504 " --resize /dev/sda1=+10%\n"
27509 #: ../tools/virt-resize.pl:300
27512 " --resize /dev/sda1=-10%\n"
27517 #: ../tools/virt-resize.pl:302
27519 "You can increase the size of any partition. Virt-resize will expand the "
27520 "direct content of the partition if it knows how (see C<--expand> below)."
27524 #: ../tools/virt-resize.pl:306
27526 "You can only I<decrease> the size of partitions that contain filesystems or "
27527 "PVs which have already been shrunk. Virt-resize will check this has been "
27528 "done before proceeding, or else will print an error (see also "
27529 "C<--resize-force>)."
27533 #: ../tools/virt-resize.pl:311 ../tools/virt-resize.pl:403 ../tools/virt-resize.pl:420
27534 msgid "You can give this option multiple times."
27538 #: ../tools/virt-resize.pl:317
27539 msgid "B<--resize-force part=size>"
27543 #: ../tools/virt-resize.pl:319
27545 "This is the same as C<--resize> except that it will let you decrease the "
27546 "size of any partition. Generally this means you will lose any data which "
27547 "was at the end of the partition you shrink, but you may not care about that "
27548 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
27549 "as a swap partition)."
27553 #: ../tools/virt-resize.pl:325
27554 msgid "See also the C<--ignore> option."
27558 #: ../tools/virt-resize.pl:331
27559 msgid "B<--expand part>"
27563 #: ../tools/virt-resize.pl:333
27565 "Expand the named partition so it uses up all extra space (space left over "
27566 "after any other resize changes that you request have been done)."
27570 #: ../tools/virt-resize.pl:336
27572 "If virt-resize knows how, it will expand the direct content of the "
27573 "partition. For example, if the partition is an LVM PV, it will expand the "
27574 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
27575 "content it doesn't know about alone."
27579 #: ../tools/virt-resize.pl:341
27580 msgid "Currently virt-resize can resize:"
27584 #: ../tools/virt-resize.pl:347
27586 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
27591 #: ../tools/virt-resize.pl:352
27593 "NTFS filesystems contained directly in a partition, if libguestfs was "
27594 "compiled with support for NTFS."
27598 #: ../tools/virt-resize.pl:355
27600 "The filesystem must have been shut down consistently last time it was used. "
27601 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
27602 "consistency check, so at the first boot after resizing Windows will check "
27607 #: ../tools/virt-resize.pl:362
27609 "LVM PVs (physical volumes). virt-resize does not usually resize anything "
27610 "inside the PV, but see the C<--LV-expand> option. The user could also "
27611 "resize LVs as desired after boot."
27615 #: ../tools/virt-resize.pl:368 ../tools/virt-resize.pl:390
27616 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
27620 #: ../tools/virt-resize.pl:374
27621 msgid "B<--shrink part>"
27625 #: ../tools/virt-resize.pl:376
27627 "Shrink the named partition until the overall disk image fits in the "
27628 "destination. The named partition B<must> contain a filesystem or PV which "
27629 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
27630 "online tools). Virt-resize will check this and give an error if it has not "
27635 #: ../tools/virt-resize.pl:382
27637 "The amount by which the overall disk must be shrunk (after carrying out all "
27638 "other operations requested by the user) is called the \"deficit\". For "
27639 "example, a straight copy (assume no other operations) from a 5GB disk image "
27640 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
27641 "would give an error unless the user specified a partition to shrink and that "
27642 "partition had more than a gigabyte of free space."
27646 #: ../tools/virt-resize.pl:396
27647 msgid "B<--ignore part>"
27651 #: ../tools/virt-resize.pl:398
27653 "Ignore the named partition. Effectively this means the partition is "
27654 "allocated on the destination disk, but the content is not copied across from "
27655 "the source disk. The content of the partition will be blank (all zero "
27660 #: ../tools/virt-resize.pl:409
27661 msgid "B<--delete part>"
27665 #: ../tools/virt-resize.pl:411
27667 "Delete the named partition. It would be more accurate to describe this as "
27668 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
27669 "the original disk image is left intact."
27673 #: ../tools/virt-resize.pl:415
27675 "Note that when you delete a partition, then anything contained in the "
27676 "partition is also deleted. Furthermore, this causes any partitions that "
27677 "come after to be I<renumbered>, which can easily make your guest unbootable."
27681 #: ../tools/virt-resize.pl:426
27682 msgid "B<--LV-expand logvol>"
27686 #: ../tools/virt-resize.pl:428
27688 "This takes the logical volume and, as a final step, expands it to fill all "
27689 "the space available in its volume group. A typical usage, assuming a Linux "
27690 "guest with a single PV C</dev/sda2> and a root device called "
27691 "C</dev/vg_guest/lv_root> would be:"
27695 #: ../tools/virt-resize.pl:433
27698 " virt-resize indisk outdisk \\\n"
27699 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
27704 #: ../tools/virt-resize.pl:436
27706 "This would first expand the partition (and PV), and then expand the root "
27707 "device to fill the extra space in the PV."
27711 #: ../tools/virt-resize.pl:439
27713 "The contents of the LV are also resized if virt-resize knows how to do "
27714 "that. You can stop virt-resize from trying to expand the content by using "
27715 "the option C<--no-expand-content>."
27719 #: ../tools/virt-resize.pl:443
27720 msgid "Use L<virt-filesystems(1)> to list the filesystems in the guest."
27724 #: ../tools/virt-resize.pl:446
27726 "You can give this option multiple times, I<but> it doesn't make sense to do "
27727 "this unless the logical volumes you specify are all in different volume "
27732 #: ../tools/virt-resize.pl:454
27733 msgid "B<--no-copy-boot-loader>"
27737 #: ../tools/virt-resize.pl:456
27739 "By default, virt-resize copies over some sectors at the start of the disk "
27740 "(up to the beginning of the first partition). Commonly these sectors "
27741 "contain the Master Boot Record (MBR) and the boot loader, and are required "
27742 "in order for the guest to boot correctly."
27746 #: ../tools/virt-resize.pl:461
27748 "If you specify this flag, then this initial copy is not done. You may need "
27749 "to reinstall the boot loader in this case."
27753 #: ../tools/virt-resize.pl:469
27754 msgid "B<--no-extra-partition>"
27758 #: ../tools/virt-resize.pl:471
27760 "By default, virt-resize creates an extra partition if there is any extra, "
27761 "unused space after all resizing has happened. Use this option to prevent "
27762 "the extra partition from being created. If you do this then the extra space "
27763 "will be inaccessible until you run fdisk, parted, or some other partitioning "
27764 "tool in the guest."
27768 #: ../tools/virt-resize.pl:477
27770 "Note that if the surplus space is smaller than 10 MB, no extra partition "
27775 #: ../tools/virt-resize.pl:484
27776 msgid "B<--no-expand-content>"
27780 #: ../tools/virt-resize.pl:486
27782 "By default, virt-resize will try to expand the direct contents of "
27783 "partitions, if it knows how (see C<--expand> option above)."
27787 #: ../tools/virt-resize.pl:489
27789 "If you give the C<--no-expand-content> option then virt-resize will not "
27794 #: ../tools/virt-resize.pl:496
27795 msgid "B<-d> | B<--debug>"
27799 #: ../tools/virt-resize.pl:504
27800 msgid "B<-n> | B<--dryrun>"
27804 #: ../tools/virt-resize.pl:506
27805 msgid "Print a summary of what would be done, but don't do anything."
27809 #: ../tools/virt-resize.pl:512
27810 msgid "B<-q> | B<--quiet>"
27814 #: ../tools/virt-resize.pl:514
27815 msgid "Don't print the summary."
27819 #: ../tools/virt-resize.pl:522
27821 "Specify the format of the input disk image. If this flag is not given then "
27822 "it is auto-detected from the image itself."
27826 #: ../tools/virt-resize.pl:528
27828 "Note that this option I<does not> affect the output format. See L</QCOW2 "
27829 "AND NON-SPARSE RAW FORMATS>."
27833 #: ../tools/virt-resize.pl:535
27834 msgid "B<--output-format> raw"
27838 #: ../tools/virt-resize.pl:537
27840 "Specify the format of the output disk image. If this flag is not given then "
27841 "it is auto-detected from the image itself."
27845 #: ../tools/virt-resize.pl:543
27847 "Note that you still need to create the output disk with the right format. "
27848 "See L</QCOW2 AND NON-SPARSE RAW FORMATS>."
27852 #: ../tools/virt-resize.pl:1419
27857 #: ../tools/virt-resize.pl:1421
27858 msgid "\"Partition 1 does not end on cylinder boundary.\""
27862 #: ../tools/virt-resize.pl:1423
27864 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
27865 "means the partitions will not be aligned to the ancient CHS geometry. "
27866 "However CHS geometry is meaningless for disks manufactured since the early "
27867 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
27868 "cylinders is not required by any modern operating system."
27872 #: ../tools/virt-resize.pl:1430
27873 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
27877 #: ../tools/virt-resize.pl:1432
27879 "In Windows Vista and later versions, Microsoft switched to using a separate "
27880 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
27881 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
27882 "the boot partition. Doing so seems to break the guest completely. However "
27883 "expanding the second partition (ie. C: drive) should work."
27887 #: ../tools/virt-resize.pl:1439
27889 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
27890 "NTFS partitions have been expanded. This is just a safety check and (unless "
27891 "it find errors) is nothing to worry about."
27895 #: ../tools/virt-resize.pl:1443
27896 msgid "GUEST BOOT STUCK AT \"GRUB\""
27900 #: ../tools/virt-resize.pl:1445
27902 "If a Linux guest does not boot after resizing, and the boot is stuck after "
27903 "printing C<GRUB> on the console, try reinstalling grub. This sometimes "
27904 "happens on older (RHEL 5-era) guests, for reasons we don't fully understand, "
27905 "although we think is to do with partition alignment."
27909 #: ../tools/virt-resize.pl:1450
27912 " guestfish -i -a newdisk\n"
27913 " ><fs> cat /boot/grub/device.map\n"
27914 " # check the contents of this file are sensible or\n"
27915 " # edit the file if necessary\n"
27916 " ><fs> grub-install / /dev/vda\n"
27922 #: ../tools/virt-resize.pl:1457
27924 "For more flexible guest reconfiguration, including if you need to specify "
27925 "other parameters to grub-install, use L<virt-rescue(1)>."
27929 #: ../tools/virt-resize.pl:1460
27930 msgid "ALTERNATIVE TOOLS"
27934 #: ../tools/virt-resize.pl:1462
27936 "There are several proprietary tools for resizing partitions. We won't "
27937 "mention any here."
27941 #: ../tools/virt-resize.pl:1465
27943 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
27944 "operations on disk images. They can resize and move partitions, but I don't "
27945 "think they can do anything with the contents, and they certainly don't "
27950 #: ../tools/virt-resize.pl:1470
27952 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
27953 "but at a much lower level. You will probably end up hand-calculating sector "
27954 "offsets, which is something that virt-resize was designed to avoid. If you "
27955 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
27960 #: ../tools/virt-resize.pl:1485
27962 "L<virt-filesystems(1)>, L<virt-df(1)>, L<guestfs(3)>, L<guestfish(1)>, "
27963 "L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, L<resize2fs(8)>, "
27964 "L<ntfsresize(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)>, "
27965 "L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, "
27966 "L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
27970 #: ../tools/virt-list-filesystems.pl:32
27971 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
27975 #: ../tools/virt-list-filesystems.pl:36
27978 " virt-list-filesystems [--options] domname\n"
27983 #: ../tools/virt-list-filesystems.pl:38
27986 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
27991 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
27993 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
27998 #: ../tools/virt-list-filesystems.pl:45
28000 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
28001 "are contained in a virtual machine or disk image."
28005 #: ../tools/virt-list-filesystems.pl:49
28007 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
28008 "functionality. For more complex cases you should look at the "
28009 "L<guestfish(1)> tool."
28013 #: ../tools/virt-list-filesystems.pl:106 ../tools/virt-list-partitions.pl:115
28014 msgid "B<-l> | B<--long>"
28018 #: ../tools/virt-list-filesystems.pl:108
28020 "With this option, C<virt-list-filesystems> displays the type of each "
28021 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
28025 #: ../tools/virt-list-filesystems.pl:115
28026 msgid "B<-a> | B<--all>"
28030 #: ../tools/virt-list-filesystems.pl:117
28032 "Normally we only show mountable filesystems. If this option is given then "
28033 "swap devices are shown too."
28037 #: ../tools/virt-list-filesystems.pl:191
28039 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
28040 "L<virt-filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, "
28041 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
28045 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-tar.pl:298
28046 msgid "Copyright (C) 2009 Red Hat Inc."
28050 #: ../tools/virt-tar.pl:33
28051 msgid "virt-tar - Extract or upload files to a virtual machine"
28055 #: ../tools/virt-tar.pl:37
28058 " virt-tar [--options] -x domname directory tarball\n"
28063 #: ../tools/virt-tar.pl:39
28066 " virt-tar [--options] -u domname tarball directory\n"
28071 #: ../tools/virt-tar.pl:41
28074 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
28079 #: ../tools/virt-tar.pl:43
28082 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
28087 #: ../tools/virt-tar.pl:47
28088 msgid "Download C</home> from the VM into a local tarball:"
28092 #: ../tools/virt-tar.pl:49
28095 " virt-tar -x domname /home home.tar\n"
28100 #: ../tools/virt-tar.pl:51
28103 " virt-tar -zx domname /home home.tar.gz\n"
28108 #: ../tools/virt-tar.pl:53
28109 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
28113 #: ../tools/virt-tar.pl:55
28116 " virt-tar -u domname uploadstuff.tar /tmp\n"
28121 #: ../tools/virt-tar.pl:57
28124 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
28129 #: ../tools/virt-tar.pl:61
28131 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
28132 "virtual machines. If you do this, you risk disk corruption in the VM. "
28133 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
28137 #: ../tools/virt-tar.pl:66
28139 "You can use C<-x> (extract) on live virtual machines, but you might get "
28140 "inconsistent results or errors if there is filesystem activity inside the "
28141 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
28142 "work, but the only way to guarantee consistent results is if the virtual "
28143 "machine is shut down."
28147 #: ../tools/virt-tar.pl:74
28149 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
28150 "parts of a guest filesystem. There are many possibilities: making backups, "
28151 "uploading data files, snooping on guest activity, fixing or customizing "
28156 #: ../tools/virt-tar.pl:79
28158 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
28159 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
28160 "should look at the L<guestfish(1)> tool."
28164 #: ../tools/virt-tar.pl:83
28166 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
28167 "its contents (recursively) from the virtual machine into a local tarball. "
28168 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
28169 "virtual machine. You cannot use these two options together."
28173 #: ../tools/virt-tar.pl:89
28175 "In addition, you may need to use the C<-z> (gZip) option to enable "
28176 "compression. When uploading, you have to specify C<-z> if the upload file "
28177 "is compressed because virt-tar won't detect this on its own."
28181 #: ../tools/virt-tar.pl:93
28183 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
28184 "example it cannot do PKZip files or bzip2 compression. If you want that "
28185 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
28186 "the L<libguestfs(3)> API)."
28190 #: ../tools/virt-tar.pl:151
28191 msgid "B<-x> | B<--extract> | B<--download>"
28195 #: ../tools/virt-tar.pl:153
28196 msgid "B<-u> | B<--upload>"
28200 #: ../tools/virt-tar.pl:155
28202 "Use C<-x> to extract (download) a directory from a virtual machine to a "
28207 #: ../tools/virt-tar.pl:158
28209 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
28210 "Please read the L</WARNING> section above before using this option."
28214 #: ../tools/virt-tar.pl:162
28215 msgid "You must specify exactly one of these options."
28219 #: ../tools/virt-tar.pl:168
28220 msgid "B<-z> | B<--gzip>"
28224 #: ../tools/virt-tar.pl:170
28225 msgid "Specify that the input or output tarball is gzip-compressed."
28229 #: ../tools/virt-tar.pl:283
28231 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
28232 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
28233 "L<http://libguestfs.org/>."
28237 #: ../tools/virt-make-fs.pl:37
28238 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
28242 #: ../tools/virt-make-fs.pl:41
28245 " virt-make-fs [--options] input.tar output.img\n"
28250 #: ../tools/virt-make-fs.pl:43
28253 " virt-make-fs [--options] input.tar.gz output.img\n"
28258 #: ../tools/virt-make-fs.pl:45
28261 " virt-make-fs [--options] directory output.img\n"
28266 #: ../tools/virt-make-fs.pl:49
28268 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
28269 "archive or some files in a directory. It is similar to tools like "
28270 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
28271 "it can create common filesystem types like ext2/3 or NTFS, which can be "
28272 "useful if you want to attach these filesystems to existing virtual machines "
28273 "(eg. to import large amounts of read-only data to a VM)."
28277 #: ../tools/virt-make-fs.pl:57
28278 msgid "Basic usage is:"
28282 #: ../tools/virt-make-fs.pl:59
28285 " virt-make-fs input output\n"
28290 #: ../tools/virt-make-fs.pl:61
28292 "where C<input> is either a directory containing files that you want to add, "
28293 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
28294 "C<output> is a disk image. The input type is detected automatically. The "
28295 "output disk image defaults to a raw ext2 image unless you specify extra "
28296 "flags (see L</OPTIONS> below)."
28300 #: ../tools/virt-make-fs.pl:67
28301 msgid "EXTRA SPACE"
28305 #: ../tools/virt-make-fs.pl:69
28307 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
28308 "the files that it contains, but might have extra space. Depending on how "
28309 "you are going to use the output, you might think this extra space is wasted "
28310 "and want to minimize it, or you might want to leave space so that more files "
28311 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
28312 "but you can use the C<--size> flag to leave space in the filesystem if you "
28317 #: ../tools/virt-make-fs.pl:77
28319 "An alternative way to leave extra space but not make the output image any "
28320 "bigger is to use an alternative disk image format (instead of the default "
28321 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
28322 "image format (check your hypervisor supports this before using it). This "
28323 "allows you to choose a large C<--size> but the extra space won't actually be "
28324 "allocated in the image until you try to store something in it."
28328 #: ../tools/virt-make-fs.pl:85
28330 "Don't forget that you can also use local commands including L<resize2fs(8)> "
28331 "and L<virt-resize(1)> to resize existing filesystems, or rerun "
28332 "virt-make-resize to build another image from scratch."
28336 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123 ../tools/virt-make-fs.pl:142
28341 #: ../tools/virt-make-fs.pl:91
28344 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
28349 #: ../tools/virt-make-fs.pl:93
28350 msgid "FILESYSTEM TYPE"
28354 #: ../tools/virt-make-fs.pl:95
28356 "The default filesystem type is C<ext2>. Just about any filesystem type that "
28357 "libguestfs supports can be used (but I<not> read-only formats like "
28358 "ISO9660). Here are some of the more common choices:"
28362 #: ../tools/virt-make-fs.pl:101
28367 #: ../tools/virt-make-fs.pl:103
28369 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
28370 "you are not going to use the filesystem in a way that requires the journal, "
28371 "then this is just wasted overhead."
28375 #: ../tools/virt-make-fs.pl:107
28376 msgid "I<ntfs> or I<vfat>"
28380 #: ../tools/virt-make-fs.pl:109
28381 msgid "Useful if exporting data to a Windows guest."
28385 #: ../tools/virt-make-fs.pl:111
28387 "I<Note for vfat>: The tar archive or local directory must only contain files "
28388 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
28389 "program running within libguestfs is unable to change the ownership of "
28390 "non-root files, since vfat itself does not support this."
28394 #: ../tools/virt-make-fs.pl:116
28399 #: ../tools/virt-make-fs.pl:118
28401 "Lower overhead than C<ext2>, but certain limitations on filename length and "
28402 "total filesystem size."
28406 #: ../tools/virt-make-fs.pl:125
28409 " virt-make-fs --type=minix input minixfs.img\n"
28414 #: ../tools/virt-make-fs.pl:127
28415 msgid "TO PARTITION OR NOT TO PARTITION"
28419 #: ../tools/virt-make-fs.pl:129
28420 msgid "Optionally virt-make-fs can add a partition table to the output disk."
28424 #: ../tools/virt-make-fs.pl:131
28426 "Adding a partition can make the disk image more compatible with certain "
28427 "virtualized operating systems which don't expect to see a filesystem "
28428 "directly located on a block device (Linux doesn't care and will happily "
28429 "handle both types)."
28433 #: ../tools/virt-make-fs.pl:136
28435 "On the other hand, if you have a partition table then the output image is no "
28436 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
28437 "directly on a partitioned disk image. (However libguestfs tools such as "
28438 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
28442 #: ../tools/virt-make-fs.pl:144
28443 msgid "Add an MBR partition:"
28447 #: ../tools/virt-make-fs.pl:146
28450 " virt-make-fs --partition -- input disk.img\n"
28455 #: ../tools/virt-make-fs.pl:148
28457 "If the output disk image could be terabyte-sized or larger, it's better to "
28458 "use an EFI/GPT-compatible partition table:"
28462 #: ../tools/virt-make-fs.pl:151
28465 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
28470 #: ../tools/virt-make-fs.pl:179
28471 msgid "Enable debugging information."
28475 #: ../tools/virt-make-fs.pl:185
28476 msgid "B<--size=E<lt>NE<gt>>"
28480 #: ../tools/virt-make-fs.pl:187
28481 msgid "B<--size=+E<lt>NE<gt>>"
28485 #: ../tools/virt-make-fs.pl:189
28486 msgid "B<-s E<lt>NE<gt>>"
28490 #: ../tools/virt-make-fs.pl:191
28491 msgid "B<-s +E<lt>NE<gt>>"
28495 #: ../tools/virt-make-fs.pl:193
28496 msgid "Use the C<--size> (or C<-s>) option to choose the size of the output image."
28500 #: ../tools/virt-make-fs.pl:196
28502 "If this option is I<not> given, then the output image will be just large "
28503 "enough to contain all the files, with not much wasted space."
28507 #: ../tools/virt-make-fs.pl:199
28509 "To choose a fixed size output disk, specify an absolute number followed by "
28510 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
28511 "Petabytes or Exabytes. This must be large enough to contain all the input "
28512 "files, else you will get an error."
28516 #: ../tools/virt-make-fs.pl:204
28518 "To leave extra space, specify C<+> (plus sign) and a number followed by "
28519 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
28520 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
28521 "the input files, and (approximately) an extra 200 MB free space."
28525 #: ../tools/virt-make-fs.pl:210
28527 "Note that virt-make-fs estimates free space, and therefore will not produce "
28528 "filesystems containing precisely the free space requested. (It is much more "
28529 "expensive and time-consuming to produce a filesystem which has precisely the "
28530 "desired free space)."
28534 #: ../tools/virt-make-fs.pl:219
28535 msgid "B<--format=E<lt>fmtE<gt>>"
28539 #: ../tools/virt-make-fs.pl:221
28540 msgid "B<-F E<lt>fmtE<gt>>"
28544 #: ../tools/virt-make-fs.pl:223
28545 msgid "Choose the output disk image format."
28549 #: ../tools/virt-make-fs.pl:225
28550 msgid "The default is C<raw> (raw disk image)."
28554 #: ../tools/virt-make-fs.pl:227
28556 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
28557 "that would really make sense here is C<qcow2>."
28561 #: ../tools/virt-make-fs.pl:234
28562 msgid "B<--type=E<lt>fsE<gt>>"
28566 #: ../tools/virt-make-fs.pl:236
28567 msgid "B<-t E<lt>fsE<gt>>"
28571 #: ../tools/virt-make-fs.pl:238
28572 msgid "Choose the output filesystem type."
28576 #: ../tools/virt-make-fs.pl:240
28577 msgid "The default is C<ext2>."
28581 #: ../tools/virt-make-fs.pl:242
28582 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
28586 #: ../tools/virt-make-fs.pl:249
28587 msgid "B<--partition>"
28591 #: ../tools/virt-make-fs.pl:251
28592 msgid "B<--partition=E<lt>parttypeE<gt>>"
28596 #: ../tools/virt-make-fs.pl:253
28598 "If specified, this flag adds an MBR partition table to the output disk "
28603 #: ../tools/virt-make-fs.pl:256
28605 "You can change the partition table type, eg. C<--partition=gpt> for large "
28610 #: ../tools/virt-make-fs.pl:259
28612 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
28613 "might consider the next parameter to be the partition type. For example:"
28617 #: ../tools/virt-make-fs.pl:263
28620 " virt-make-fs --partition input.tar ...\n"
28625 #: ../tools/virt-make-fs.pl:265
28627 "would cause virt-make-fs to think you wanted to use a partition type of "
28628 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
28629 "dash) between options and the input file argument:"
28633 #: ../tools/virt-make-fs.pl:269
28636 " virt-make-fs --partition -- input.tar ...\n"
28641 #: ../tools/virt-make-fs.pl:536
28643 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<mkisofs(1)>, "
28644 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
28645 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
28649 #: ../tools/virt-make-fs.pl:553
28652 " export LIBGUESTFS_DEBUG=1\n"
28653 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
28658 #: ../tools/virt-make-fs.pl:556
28660 "Attach /tmp/virt-make-fs.log to a new bug report at "
28661 "L<https://bugzilla.redhat.com/>"
28665 #: ../tools/virt-list-partitions.pl:32
28666 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
28670 #: ../tools/virt-list-partitions.pl:36
28673 " virt-list-partitions [--options] domname\n"
28678 #: ../tools/virt-list-partitions.pl:38
28681 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
28686 #: ../tools/virt-list-partitions.pl:45
28688 "C<virt-list-partitions> is a command line tool to list the partitions that "
28689 "are contained in a virtual machine or disk image. It is mainly useful as a "
28690 "first step to using L<virt-resize(1)>."
28694 #: ../tools/virt-list-partitions.pl:50
28696 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
28697 "functionality. For more complex cases you should look at the "
28698 "L<guestfish(1)> tool."
28702 #: ../tools/virt-list-partitions.pl:107
28703 msgid "B<-h> | B<--human-readable>"
28707 #: ../tools/virt-list-partitions.pl:109
28708 msgid "Show sizes in human-readable form (eg. \"1G\")."
28712 #: ../tools/virt-list-partitions.pl:117
28714 "With this option, C<virt-list-partitions> displays the type and size of each "
28715 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
28719 #: ../tools/virt-list-partitions.pl:124
28720 msgid "B<-t> | B<--total>"
28724 #: ../tools/virt-list-partitions.pl:126
28725 msgid "Display the total size of each block device (as a separate row or rows)."
28729 #: ../tools/virt-list-partitions.pl:259
28731 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, "
28732 "L<virt-list-filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, "
28733 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."