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.
8 "Project-Id-Version: libguestfs\n"
9 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
10 "POT-Creation-Date: 2011-05-18 10:02+0200\n"
11 "PO-Revision-Date: 2011-04-01 15:39+0000\n"
12 "Last-Translator: yurchor <yurchor@ukr.net>\n"
13 "Language-Team: Ukrainian <trans-uk@lists.fedoraproject.org>\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18 "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
19 "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2)\n"
22 #: ../src/guestfs.pod:3 ../fish/guestfish.pod:3
23 #: ../test-tool/libguestfs-test-tool.pod:3 ../fuse/guestmount.pod:3
24 #: ../tools/virt-win-reg.pl:35 ../tools/virt-list-filesystems.pl:30
25 #: ../tools/virt-tar.pl:31 ../tools/virt-make-fs.pl:35
26 #: ../tools/virt-list-partitions.pl:30
31 #: ../src/guestfs.pod:5
32 msgid "guestfs - Library for accessing and modifying virtual machine images"
34 "guestfs — бібліотека для доступу та внесення змін до образів віртуальних "
38 #: ../src/guestfs.pod:7 ../fish/guestfish.pod:7
39 #: ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7
40 #: ../tools/virt-win-reg.pl:39 ../tools/virt-list-filesystems.pl:34
41 #: ../tools/virt-tar.pl:35 ../tools/virt-make-fs.pl:39
42 #: ../tools/virt-list-partitions.pl:34
44 msgstr "КОРОТКИЙ ОПИС"
47 #: ../src/guestfs.pod:9
50 " #include <guestfs.h>\n"
53 " #include <guestfs.h>\n"
57 #: ../src/guestfs.pod:11
60 " guestfs_h *g = guestfs_create ();\n"
61 " guestfs_add_drive (g, \"guest.img\");\n"
62 " guestfs_launch (g);\n"
63 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
64 " guestfs_touch (g, \"/hello\");\n"
65 " guestfs_umount (g, \"/\");\n"
66 " guestfs_close (g);\n"
69 " guestfs_h *g = guestfs_create ();\n"
70 " guestfs_add_drive (g, \"guest.img\");\n"
71 " guestfs_launch (g);\n"
72 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
73 " guestfs_touch (g, \"/hello\");\n"
74 " guestfs_umount (g, \"/\");\n"
75 " guestfs_close (g);\n"
79 #: ../src/guestfs.pod:19
82 " cc prog.c -o prog -lguestfs\n"
84 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
87 " cc prog.c -o prog -lguestfs\n"
89 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
93 #: ../src/guestfs.pod:23 ../fish/guestfish.pod:30
94 #: ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:20
95 #: ../tools/virt-win-reg.pl:63 ../tools/virt-list-filesystems.pl:40
96 #: ../tools/virt-tar.pl:77 ../tools/virt-make-fs.pl:47
97 #: ../tools/virt-list-partitions.pl:40
102 #: ../src/guestfs.pod:25
104 "Libguestfs is a library for accessing and modifying guest disk images. "
105 "Amongst the things this is good for: making batch configuration changes to "
106 "guests, getting disk used/free statistics (see also: virt-df), migrating "
107 "between virtualization systems (see also: virt-p2v), performing partial "
108 "backups, performing partial guest clones, cloning guests and changing "
109 "registry/UUID/hostname info, and much else besides."
113 #: ../src/guestfs.pod:33
115 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
116 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
117 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
122 #: ../src/guestfs.pod:38
124 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
125 "what filesystem is in each LV, etc.). It can also run commands in the "
126 "context of the guest. Also you can access filesystems over FUSE."
130 #: ../src/guestfs.pod:43
132 "Libguestfs is a library that can be linked with C and C++ management "
133 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
134 "PHP, Haskell or C#). You can also use it from shell scripts or the command "
139 #: ../src/guestfs.pod:48
141 "You don't need to be root to use libguestfs, although obviously you do need "
142 "enough permissions to access the disk images."
146 #: ../src/guestfs.pod:51
148 "Libguestfs is a large API because it can do many things. For a gentle "
149 "introduction, please read the L</API OVERVIEW> section next."
153 #: ../src/guestfs.pod:54
155 "There are also some example programs in the L<guestfs-examples(3)> manual "
160 #: ../src/guestfs.pod:57
165 #: ../src/guestfs.pod:59
167 "This section provides a gentler overview of the libguestfs API. We also try "
168 "to group API calls together, where that may not be obvious from reading "
169 "about the individual calls in the main section of this manual."
173 #: ../src/guestfs.pod:64
178 #: ../src/guestfs.pod:66
180 "Before you can use libguestfs calls, you have to create a handle. Then you "
181 "must add at least one disk image to the handle, followed by launching the "
182 "handle, then performing whatever operations you want, and finally closing "
183 "the handle. By convention we use the single letter C<g> for the name of the "
184 "handle variable, although of course you can use any name you want."
188 #: ../src/guestfs.pod:73
189 msgid "The general structure of all libguestfs-using programs looks like this:"
193 #: ../src/guestfs.pod:76
196 " guestfs_h *g = guestfs_create ();\n"
199 " guestfs_h *g = guestfs_create ();\n"
203 #: ../src/guestfs.pod:78
206 " /* Call guestfs_add_drive additional times if there are\n"
207 " * multiple disk images.\n"
209 " guestfs_add_drive (g, \"guest.img\");\n"
214 #: ../src/guestfs.pod:83
217 " /* Most manipulation calls won't work until you've launched\n"
218 " * the handle 'g'. You have to do this _after_ adding drives\n"
219 " * and _before_ other commands.\n"
221 " guestfs_launch (g);\n"
226 #: ../src/guestfs.pod:89
229 " /* Now you can examine what partitions, LVs etc are available.\n"
231 " char **partitions = guestfs_list_partitions (g);\n"
232 " char **logvols = guestfs_lvs (g);\n"
237 #: ../src/guestfs.pod:94
240 " /* To access a filesystem in the image, you must mount it.\n"
242 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
245 " /* Щоб отримати доступ до файлової системи на образі, вам слід його змонтувати.\n"
247 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
251 #: ../src/guestfs.pod:98
254 #| " /* Now you can perform filesystem actions on the guest\n"
255 #| " * disk image.\n"
257 #| " guestfs_touch (g, \"/hello\");\n"
260 " /* Now you can perform filesystem actions on the guest\n"
263 " guestfs_touch (g, \"/hello\");\n"
266 " /* Тепер ви можете виконувати дії з файловою системою на\n"
267 " * образі диска операційної системи.\n"
269 " guestfs_touch (g, \"/hello\");\n"
273 #: ../src/guestfs.pod:103
276 " /* This is only needed for libguestfs < 1.5.24. Since then\n"
277 " * it is done automatically when you close the handle. See\n"
278 " * discussion of autosync in this page.\n"
280 " guestfs_sync (g);\n"
285 #: ../src/guestfs.pod:109
288 " /* Close the handle 'g'. */\n"
289 " guestfs_close (g);\n"
294 #: ../src/guestfs.pod:112
296 "The code above doesn't include any error checking. In real code you should "
297 "check return values carefully for errors. In general all functions that "
298 "return integers return C<-1> on error, and all functions that return "
299 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
300 "how to handle errors, and consult the documentation for each function call "
301 "below to see precisely how they return error indications. See L<guestfs-"
302 "examples(3)> for fully worked examples."
306 #: ../src/guestfs.pod:121
311 #: ../src/guestfs.pod:123
313 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
314 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
315 "actual block device, or simply an empty file of zeroes that you have created "
316 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
321 #: ../src/guestfs.pod:129
323 "The call you should use in modern code for adding drives is L</"
324 "guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
325 "specifying that the format is raw, do:"
329 #: ../src/guestfs.pod:133
332 " guestfs_add_drive_opts (g, filename,\n"
333 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
339 #: ../src/guestfs.pod:137
340 msgid "You can add a disk read-only using:"
344 #: ../src/guestfs.pod:139
347 " guestfs_add_drive_opts (g, filename,\n"
348 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
349 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
355 #: ../src/guestfs.pod:144
357 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
358 "libguestfs won't modify the file."
362 #: ../src/guestfs.pod:147
364 "Be extremely cautious if the disk image is in use, eg. if it is being used "
365 "by a virtual machine. Adding it read-write will almost certainly cause disk "
366 "corruption, but adding it read-only is safe."
370 #: ../src/guestfs.pod:151
372 "You must add at least one disk image, and you may add multiple disk images. "
373 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
374 "first one you added), C</dev/sdb> (for the second one you added), etc."
378 #: ../src/guestfs.pod:156
380 "Once L</guestfs_launch> has been called you cannot add any more images. You "
381 "can call L</guestfs_list_devices> to get a list of the device names, in the "
382 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
386 #: ../src/guestfs.pod:161
391 #: ../src/guestfs.pod:163
393 "Before you can read or write files, create directories and so on in a disk "
394 "image that contains filesystems, you have to mount those filesystems using "
395 "L</guestfs_mount_options> or L</guestfs_mount_ro>. If you already know that "
396 "a disk image contains (for example) one partition with a filesystem on that "
397 "partition, then you can mount it directly:"
401 #: ../src/guestfs.pod:170
404 " guestfs_mount_options (g, \"\", \"/dev/sda1\", \"/\");\n"
409 #: ../src/guestfs.pod:172
411 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
412 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
413 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>). Note "
414 "that these are libguestfs virtual devices, and are nothing to do with host "
419 #: ../src/guestfs.pod:178
421 "If you are given a disk image and you don't know what it contains then you "
422 "have to find out. Libguestfs can do that too: use L</"
423 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
424 "LVs, and either try mounting each to see what is mountable, or else examine "
425 "them with L</guestfs_vfs_type> or L</guestfs_file>. To list just "
426 "filesystems, use L</guestfs_list_filesystems>."
430 #: ../src/guestfs.pod:186
432 "Libguestfs also has a set of APIs for inspection of unknown disk images (see "
433 "L</INSPECTION> below). But you might find it easier to look at higher level "
434 "programs built on top of libguestfs, in particular L<virt-inspector(1)>."
438 #: ../src/guestfs.pod:191
440 "To mount a filesystem read-only, use L</guestfs_mount_ro>. There are "
441 "several other variations of the C<guestfs_mount_*> call."
445 #: ../src/guestfs.pod:194
446 msgid "FILESYSTEM ACCESS AND MODIFICATION"
450 #: ../src/guestfs.pod:196
452 "The majority of the libguestfs API consists of fairly low-level calls for "
453 "accessing and modifying the files, directories, symlinks etc on mounted "
454 "filesystems. There are over a hundred such calls which you can find listed "
455 "in detail below in this man page, and we don't even pretend to cover them "
456 "all in this overview."
460 #: ../src/guestfs.pod:202
462 "Specify filenames as full paths, starting with C<\"/\"> and including the "
467 #: ../src/guestfs.pod:205
469 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
470 "the file called C<\"etc/passwd\"> then you could do:"
474 #: ../src/guestfs.pod:208
477 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
482 #: ../src/guestfs.pod:210
484 "This would return C<data> as a newly allocated buffer containing the full "
485 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
486 "or C<NULL> if there was an error."
490 #: ../src/guestfs.pod:214
492 "As another example, to create a top-level directory on that filesystem "
493 "called C<\"var\"> you would do:"
497 #: ../src/guestfs.pod:217
500 " guestfs_mkdir (g, \"/var\");\n"
505 #: ../src/guestfs.pod:219
506 msgid "To create a symlink you could do:"
510 #: ../src/guestfs.pod:221
513 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
514 " \"/etc/rc3.d/S30portmap\");\n"
519 #: ../src/guestfs.pod:224
521 "Libguestfs will reject attempts to use relative paths and there is no "
522 "concept of a current working directory."
526 #: ../src/guestfs.pod:227
528 "Libguestfs can return errors in many situations: for example if the "
529 "filesystem isn't writable, or if a file or directory that you requested "
530 "doesn't exist. If you are using the C API (documented here) you have to "
531 "check for those error conditions after each call. (Other language bindings "
532 "turn these errors into exceptions)."
536 #: ../src/guestfs.pod:233
538 "File writes are affected by the per-handle umask, set by calling L</"
539 "guestfs_umask> and defaulting to 022. See L</UMASK>."
543 #: ../src/guestfs.pod:236
545 msgstr "ПОДІЛ НА РОЗДІЛИ"
548 #: ../src/guestfs.pod:238
550 "Libguestfs contains API calls to read, create and modify partition tables on "
555 #: ../src/guestfs.pod:241
557 "In the common case where you want to create a single partition covering the "
558 "whole disk, you should use the L</guestfs_part_disk> call:"
562 #: ../src/guestfs.pod:245
565 " const char *parttype = \"mbr\";\n"
566 " if (disk_is_larger_than_2TB)\n"
567 " parttype = \"gpt\";\n"
568 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
573 #: ../src/guestfs.pod:250
575 "Obviously this effectively wipes anything that was on that disk image before."
579 #: ../src/guestfs.pod:253
584 #: ../src/guestfs.pod:255
586 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
587 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
588 "you familiarize yourself with the concepts of physical volumes, volume "
589 "groups and logical volumes."
593 #: ../src/guestfs.pod:260
595 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
596 "tldp.org/HOWTO/LVM-HOWTO/>."
600 #: ../src/guestfs.pod:263
605 #: ../src/guestfs.pod:265
607 "Use L</guestfs_cat> to download small, text only files. This call is "
608 "limited to files which are less than 2 MB and which cannot contain any ASCII "
609 "NUL (C<\\0>) characters. However the API is very simple to use."
613 #: ../src/guestfs.pod:269
615 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
616 "bit data, since it returns a (pointer, size) pair. However it is still "
617 "limited to \"small\" files, less than 2 MB."
621 #: ../src/guestfs.pod:273
623 "L</guestfs_download> can be used to download any file, with no limits on "
624 "content or size (even files larger than 4 GB)."
628 #: ../src/guestfs.pod:276
630 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
634 #: ../src/guestfs.pod:279
636 msgstr "ВИВАНТАЖЕННЯ"
639 #: ../src/guestfs.pod:281
641 "It's often the case that you want to write a file or files to the disk image."
645 #: ../src/guestfs.pod:284
647 "To write a small file with fixed content, use L</guestfs_write>. To create "
648 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
649 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
650 "of other functions for creating test files, for example L</guestfs_fill> and "
651 "L</guestfs_fill_pattern>."
655 #: ../src/guestfs.pod:290
657 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
658 "file content or size (even files larger than 4 GB)."
662 #: ../src/guestfs.pod:293
664 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
668 #: ../src/guestfs.pod:295
670 "However the fastest way to upload I<large numbers of arbitrary files> is to "
671 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
672 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
673 "in a predictable way (eg. adding it last after all other drives) then you "
674 "can get the device name from L</guestfs_list_devices> and mount it directly "
675 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
676 "portable between kernel versions, and they don't support labels or UUIDs. "
677 "If you want to pre-build an image or you need to mount it using a label or "
678 "UUID, use an ISO image instead."
682 #: ../src/guestfs.pod:306
687 #: ../src/guestfs.pod:308
689 "There are various different commands for copying between files and devices "
690 "and in and out of the guest filesystem. These are summarised in the table "
695 #: ../src/guestfs.pod:314
696 msgid "B<file> to B<file>"
700 #: ../src/guestfs.pod:316
702 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
703 "directories recursively."
707 #: ../src/guestfs.pod:319
708 msgid "B<file or device> to B<file or device>"
712 #: ../src/guestfs.pod:321
714 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
715 "devices in the guest."
719 #: ../src/guestfs.pod:324
720 msgid "Example: duplicate the contents of an LV:"
724 #: ../src/guestfs.pod:326
727 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
732 #: ../src/guestfs.pod:328
734 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
735 "(C</dev/VG/Original>). To copy less than the whole source device, use L</"
736 "guestfs_copy_size>."
740 #: ../src/guestfs.pod:332
741 msgid "B<file on the host> to B<file or device>"
745 #: ../src/guestfs.pod:334
746 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
750 #: ../src/guestfs.pod:336
751 msgid "B<file or device> to B<file on the host>"
755 #: ../src/guestfs.pod:338
756 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
760 #: ../src/guestfs.pod:342
761 msgid "UPLOADING AND DOWNLOADING TO PIPES AND FILE DESCRIPTORS"
765 #: ../src/guestfs.pod:344
767 "Calls like L</guestfs_upload>, L</guestfs_download>, L</guestfs_tar_in>, L</"
768 "guestfs_tar_out> etc appear to only take filenames as arguments, so it "
769 "appears you can only upload and download to files. However many Un*x-like "
770 "hosts let you use the special device files C</dev/stdin>, C</dev/stdout>, C</"
771 "dev/stderr> and C</dev/fd/N> to read and write from stdin, stdout, stderr, "
772 "and arbitrary file descriptor N."
776 #: ../src/guestfs.pod:352
777 msgid "For example, L<virt-cat(1)> writes its output to stdout by doing:"
781 #: ../src/guestfs.pod:355
784 " guestfs_download (g, filename, \"/dev/stdout\");\n"
789 #: ../src/guestfs.pod:357
790 msgid "and you can write tar output to a file descriptor C<fd> by doing:"
794 #: ../src/guestfs.pod:359
798 " snprintf (devfd, sizeof devfd, \"/dev/fd/%d\", fd);\n"
799 " guestfs_tar_out (g, \"/\", devfd);\n"
804 #: ../src/guestfs.pod:363
805 msgid "LISTING FILES"
809 #: ../src/guestfs.pod:365
811 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
812 "L<guestfish(1)>-equivalent command C<ll>)."
816 #: ../src/guestfs.pod:368
818 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
819 "programs, as a flat list of strings."
823 #: ../src/guestfs.pod:371
825 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
826 "directory, plus additional information about each one. It is more "
827 "equivalent to using the L<readdir(3)> call on a local filesystem."
831 #: ../src/guestfs.pod:375
833 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
837 #: ../src/guestfs.pod:378
838 msgid "RUNNING COMMANDS"
842 #: ../src/guestfs.pod:380
844 "Although libguestfs is primarily an API for manipulating files inside guest "
845 "images, we also provide some limited facilities for running commands inside "
850 #: ../src/guestfs.pod:384
851 msgid "There are many limitations to this:"
855 #: ../src/guestfs.pod:388 ../src/guestfs.pod:393 ../src/guestfs.pod:398
856 #: ../src/guestfs.pod:402 ../src/guestfs.pod:407 ../src/guestfs.pod:411
857 #: ../src/guestfs.pod:416 ../src/guestfs.pod:421 ../src/guestfs.pod:1064
858 #: ../src/guestfs.pod:1068 ../src/guestfs.pod:1072 ../src/guestfs.pod:1077
859 #: ../src/guestfs.pod:1085 ../src/guestfs.pod:1104 ../src/guestfs.pod:1112
860 #: ../src/guestfs.pod:1134 ../src/guestfs.pod:1138 ../src/guestfs.pod:1142
861 #: ../src/guestfs.pod:1146 ../src/guestfs.pod:1150 ../src/guestfs.pod:1154
862 #: ../src/guestfs.pod:1643 ../src/guestfs.pod:1648 ../src/guestfs.pod:1652
863 #: ../src/guestfs.pod:1754 ../src/guestfs.pod:1759 ../src/guestfs.pod:1763
864 #: ../src/guestfs.pod:1773 ../src/guestfs.pod:2008 ../src/guestfs.pod:2013
865 #: ../src/guestfs.pod:2019 ../src/guestfs.pod:2027 ../src/guestfs.pod:2381
866 #: ../src/guestfs.pod:2387 ../src/guestfs.pod:2392 ../src/guestfs.pod:2398
867 #: ../src/guestfs.pod:2967 ../src/guestfs.pod:2971 ../src/guestfs.pod:2975
868 #: ../src/guestfs.pod:2979 ../src/guestfs-actions.pod:15
869 #: ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:583
870 #: ../src/guestfs-actions.pod:591 ../src/guestfs-actions.pod:598
871 #: ../src/guestfs-actions.pod:605 ../src/guestfs-actions.pod:1603
872 #: ../src/guestfs-actions.pod:1607 ../src/guestfs-actions.pod:1611
873 #: ../src/guestfs-actions.pod:1615 ../src/guestfs-actions.pod:1623
874 #: ../src/guestfs-actions.pod:1627 ../src/guestfs-actions.pod:1631
875 #: ../src/guestfs-actions.pod:1641 ../src/guestfs-actions.pod:1645
876 #: ../src/guestfs-actions.pod:1649 ../src/guestfs-actions.pod:1787
877 #: ../src/guestfs-actions.pod:1791 ../src/guestfs-actions.pod:1796
878 #: ../src/guestfs-actions.pod:1801 ../src/guestfs-actions.pod:1862
879 #: ../src/guestfs-actions.pod:1866 ../src/guestfs-actions.pod:1871
880 #: ../fish/guestfish.pod:445 ../fish/guestfish.pod:449
881 #: ../fish/guestfish.pod:453 ../fish/guestfish.pod:457
882 #: ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20
883 #: ../fish/guestfish-actions.pod:385 ../fish/guestfish-actions.pod:393
884 #: ../fish/guestfish-actions.pod:400 ../fish/guestfish-actions.pod:407
885 #: ../fish/guestfish-actions.pod:1074 ../fish/guestfish-actions.pod:1078
886 #: ../fish/guestfish-actions.pod:1082 ../fish/guestfish-actions.pod:1086
887 #: ../fish/guestfish-actions.pod:1094 ../fish/guestfish-actions.pod:1098
888 #: ../fish/guestfish-actions.pod:1102 ../fish/guestfish-actions.pod:1112
889 #: ../fish/guestfish-actions.pod:1116 ../fish/guestfish-actions.pod:1120
890 #: ../fish/guestfish-actions.pod:1210 ../fish/guestfish-actions.pod:1214
891 #: ../fish/guestfish-actions.pod:1219 ../fish/guestfish-actions.pod:1224
892 #: ../fish/guestfish-actions.pod:1266 ../fish/guestfish-actions.pod:1270
893 #: ../fish/guestfish-actions.pod:1275 ../tools/virt-win-reg.pl:195
894 #: ../tools/virt-win-reg.pl:200 ../tools/virt-win-reg.pl:206
895 #: ../tools/virt-win-reg.pl:708 ../tools/virt-win-reg.pl:714
896 #: ../tools/virt-win-reg.pl:720
901 #: ../src/guestfs.pod:390
903 "The kernel version that the command runs under will be different from what "
908 #: ../src/guestfs.pod:395
910 "If the command needs to communicate with daemons, then most likely they "
915 #: ../src/guestfs.pod:400
916 msgid "The command will be running in limited memory."
920 #: ../src/guestfs.pod:404
922 "The network may not be available unless you enable it (see L</"
923 "guestfs_set_network>)."
927 #: ../src/guestfs.pod:409
928 msgid "Only supports Linux guests (not Windows, BSD, etc)."
932 #: ../src/guestfs.pod:413
934 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
938 #: ../src/guestfs.pod:418
940 "For SELinux guests, you may need to enable SELinux and load policy first. "
941 "See L</SELINUX> in this manpage."
945 #: ../src/guestfs.pod:423
947 "I<Security:> It is not safe to run commands from untrusted, possibly "
948 "malicious guests. These commands may attempt to exploit your program by "
949 "sending unexpected output. They could also try to exploit the Linux kernel "
950 "or qemu provided by the libguestfs appliance. They could use the network "
951 "provided by the libguestfs appliance to bypass ordinary network partitions "
952 "and firewalls. They could use the elevated privileges or different SELinux "
953 "context of your program to their advantage."
957 #: ../src/guestfs.pod:432
959 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
960 "(a script which runs when the guest next boots normally), and to have this "
961 "script run the commands you want in the normal context of the running guest, "
962 "network security and so on. For information about other security issues, "
967 #: ../src/guestfs.pod:440
969 "The two main API calls to run commands are L</guestfs_command> and L</"
970 "guestfs_sh> (there are also variations)."
974 #: ../src/guestfs.pod:443
976 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
977 "shell globs, redirections, etc will work."
981 #: ../src/guestfs.pod:446
982 msgid "CONFIGURATION FILES"
983 msgstr "ФАЙЛИ НАЛАШТУВАННЯ"
986 #: ../src/guestfs.pod:448
988 "To read and write configuration files in Linux guest filesystems, we "
989 "strongly recommend using Augeas. For example, Augeas understands how to "
990 "read and write, say, a Linux shadow password file or X.org configuration "
991 "file, and so avoids you having to write that code."
995 #: ../src/guestfs.pod:453
997 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
998 "document Augeas itself here because there is excellent documentation on the "
999 "L<http://augeas.net/> website."
1003 #: ../src/guestfs.pod:457
1005 "If you don't want to use Augeas (you fool!) then try calling L</"
1006 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
1011 #: ../src/guestfs.pod:461
1016 #: ../src/guestfs.pod:463
1018 "We support SELinux guests. To ensure that labeling happens correctly in "
1019 "SELinux guests, you need to enable SELinux and load the guest's policy:"
1023 #: ../src/guestfs.pod:469 ../src/guestfs.pod:1257 ../src/guestfs.pod:1395
1024 #: ../src/guestfs.pod:2426
1029 #: ../src/guestfs.pod:471
1030 msgid "Before launching, do:"
1034 #: ../src/guestfs.pod:473
1037 " guestfs_set_selinux (g, 1);\n"
1042 #: ../src/guestfs.pod:475 ../src/guestfs.pod:1261 ../src/guestfs.pod:1399
1043 #: ../src/guestfs.pod:2451
1048 #: ../src/guestfs.pod:477
1050 "After mounting the guest's filesystem(s), load the policy. This is best "
1051 "done by running the L<load_policy(8)> command in the guest itself:"
1055 #: ../src/guestfs.pod:481
1058 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
1063 #: ../src/guestfs.pod:483
1065 "(Older versions of C<load_policy> require you to specify the name of the "
1070 #: ../src/guestfs.pod:486 ../src/guestfs.pod:1405
1075 #: ../src/guestfs.pod:488
1077 "Optionally, set the security context for the API. The correct security "
1078 "context to use can only be known by inspecting the guest. As an example:"
1082 #: ../src/guestfs.pod:492
1085 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
1090 #: ../src/guestfs.pod:496
1091 msgid "This will work for running commands and editing existing files."
1095 #: ../src/guestfs.pod:498
1097 "When new files are created, you may need to label them explicitly, for "
1098 "example by running the external command C<restorecon pathname>."
1102 #: ../src/guestfs.pod:502
1107 #: ../src/guestfs.pod:504
1109 "Certain calls are affected by the current file mode creation mask (the "
1110 "\"umask\"). In particular ones which create files or directories, such as "
1111 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
1112 "either the default mode that the file is created with or modifies the mode "
1117 #: ../src/guestfs.pod:510
1119 "The default umask is C<022>, so files are created with modes such as C<0644> "
1120 "and directories with C<0755>."
1124 #: ../src/guestfs.pod:513
1126 "There are two ways to avoid being affected by umask. Either set umask to 0 "
1127 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
1128 "guestfs_chmod> after creating each file or directory."
1132 #: ../src/guestfs.pod:517
1133 msgid "For more information about umask, see L<umask(2)>."
1137 #: ../src/guestfs.pod:519 ../fish/guestfish.pod:767
1138 msgid "ENCRYPTED DISKS"
1142 #: ../src/guestfs.pod:521
1144 "Libguestfs allows you to access Linux guests which have been encrypted using "
1145 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1146 "standard. This includes nearly all whole disk encryption systems used by "
1147 "modern Linux guests."
1151 #: ../src/guestfs.pod:527
1153 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1154 "returns the string C<crypto_LUKS>)."
1158 #: ../src/guestfs.pod:530
1160 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1161 "will require the passphrase!"
1165 #: ../src/guestfs.pod:533
1167 "Opening a LUKS device creates a new device mapper device called C</dev/"
1168 "mapper/mapname> (where C<mapname> is the string you supply to L</"
1169 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
1170 "from and encrypted to the underlying block device respectively."
1174 #: ../src/guestfs.pod:539
1176 "LVM volume groups on the device can be made visible by calling L</"
1177 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
1178 "(s) can now be mounted in the usual way."
1182 #: ../src/guestfs.pod:543
1184 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1185 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1186 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
1187 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1188 "underlying encrypted block device)."
1192 #: ../src/guestfs.pod:550
1197 #: ../src/guestfs.pod:552
1199 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1200 "contains operating systems, an install CD or a live CD. (These APIs used to "
1201 "be in a separate Perl-only library called L<Sys::Guestfs::Lib(3)> but since "
1202 "version 1.5.3 the most frequently used part of this library has been "
1203 "rewritten in C and moved into the core code)."
1207 #: ../src/guestfs.pod:559
1209 "Add all disks belonging to the unknown virtual machine and call L</"
1210 "guestfs_launch> in the usual way."
1214 #: ../src/guestfs.pod:562
1216 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1217 "and certain heuristics, and returns a list of operating systems that were "
1218 "found. An empty list means none were found. A single element is the root "
1219 "filesystem of the operating system. For dual- or multi-boot guests, "
1220 "multiple roots can be returned, each one corresponding to a separate "
1221 "operating system. (Multi-boot virtual machines are extremely rare in the "
1222 "world of virtualization, but since this scenario can happen, we have built "
1223 "libguestfs to deal with it.)"
1227 #: ../src/guestfs.pod:571
1229 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1230 "to get additional details about that operating system. For example, call L</"
1231 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1232 "Windows and Linux-based operating systems respectively."
1236 #: ../src/guestfs.pod:577
1238 "Un*x-like and Linux-based operating systems usually consist of several "
1239 "filesystems which are mounted at boot time (for example, a separate boot "
1240 "partition mounted on C</boot>). The inspection rules are able to detect how "
1241 "filesystems correspond to mount points. Call "
1242 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1243 "hash table like this example:"
1247 #: ../src/guestfs.pod:584
1250 " /boot => /dev/sda1\n"
1251 " / => /dev/vg_guest/lv_root\n"
1252 " /usr => /dev/vg_guest/lv_usr\n"
1257 #: ../src/guestfs.pod:588
1259 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1260 "filesystems as suggested."
1264 #: ../src/guestfs.pod:591
1266 "Be careful to mount filesystems in the right order (eg. C</> before C</"
1267 "usr>). Sorting the keys of the hash by length, shortest first, should work."
1271 #: ../src/guestfs.pod:595
1273 "Inspection currently only works for some common operating systems. "
1274 "Contributors are welcome to send patches for other operating systems that we "
1275 "currently cannot detect."
1279 #: ../src/guestfs.pod:599
1281 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1282 "for more details. The L</guestfs_inspect_os> function just ignores any "
1283 "encrypted devices."
1287 #: ../src/guestfs.pod:603
1289 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1290 "inspection and caches the results in the guest handle. Subsequent calls to "
1291 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
1292 "read the disks. If you change the content of the guest disks, you can redo "
1293 "inspection by calling L</guestfs_inspect_os> again. (L</"
1294 "guestfs_inspect_list_applications> works a little differently from the other "
1295 "calls and does read the disks. See documentation for that function for "
1300 #: ../src/guestfs.pod:612
1301 msgid "INSPECTING INSTALL DISKS"
1305 #: ../src/guestfs.pod:614
1307 "Libguestfs (since 1.9.4) can detect some install disks, install CDs, live "
1312 #: ../src/guestfs.pod:617
1314 "Call L</guestfs_inspect_get_format> to return the format of the operating "
1315 "system, which currently can be C<installed> (a regular operating system) or "
1316 "C<installer> (some sort of install disk)."
1320 #: ../src/guestfs.pod:621
1322 "Further information is available about the operating system that can be "
1323 "installed using the regular inspection APIs like L</"
1324 "guestfs_inspect_get_product_name>, L</guestfs_inspect_get_major_version> etc."
1328 #: ../src/guestfs.pod:626
1330 "Some additional information specific to installer disks is also available "
1331 "from the L</guestfs_inspect_is_live>, L</guestfs_inspect_is_netinst> and L</"
1332 "guestfs_inspect_is_multipart> calls."
1336 #: ../src/guestfs.pod:631
1337 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1341 #: ../src/guestfs.pod:633
1343 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
1344 "ntfs-3g.org/> driver."
1348 #: ../src/guestfs.pod:636
1349 msgid "DRIVE LETTERS AND PATHS"
1353 #: ../src/guestfs.pod:638
1355 "DOS and Windows still use drive letters, and the filesystems are always "
1356 "treated as case insensitive by Windows itself, and therefore you might find "
1357 "a Windows configuration file referring to a path like C<c:\\windows"
1358 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
1359 "might be referred to as C</WINDOWS/System32>."
1363 #: ../src/guestfs.pod:644
1365 "Drive letter mappings can be found using inspection (see L</INSPECTION> and "
1366 "L</guestfs_inspect_get_drive_mappings>)"
1370 #: ../src/guestfs.pod:647
1372 "Dealing with separator characters (backslash vs forward slash) is outside "
1373 "the scope of libguestfs, but usually a simple character replacement will "
1378 #: ../src/guestfs.pod:651
1380 "To resolve the case insensitivity of paths, call L</"
1381 "guestfs_case_sensitive_path>."
1385 #: ../src/guestfs.pod:654
1386 msgid "ACCESSING THE WINDOWS REGISTRY"
1390 #: ../src/guestfs.pod:656
1392 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1393 "files, through the library C<hivex> which is part of the libguestfs project "
1394 "although ships as a separate tarball. You have to locate and download the "
1395 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1396 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
1397 "reg(1)> for more help on this issue."
1401 #: ../src/guestfs.pod:664
1402 msgid "SYMLINKS ON NTFS-3G FILESYSTEMS"
1406 #: ../src/guestfs.pod:666
1408 "Ntfs-3g tries to rewrite \"Junction Points\" and NTFS \"symbolic links\" to "
1409 "provide something which looks like a Linux symlink. The way it tries to do "
1410 "the rewriting is described here:"
1414 #: ../src/guestfs.pod:670
1416 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
1419 "L<http://www.tuxera.com/community/ntfs-3g-advanced/junction-points-and-"
1423 #: ../src/guestfs.pod:672
1425 "The essential problem is that ntfs-3g simply does not have enough "
1426 "information to do a correct job. NTFS links can contain drive letters and "
1427 "references to external device GUIDs that ntfs-3g has no way of resolving. "
1428 "It is almost certainly the case that libguestfs callers should ignore what "
1429 "ntfs-3g does (ie. don't use L</guestfs_readlink> on NTFS volumes)."
1433 #: ../src/guestfs.pod:679
1435 "Instead if you encounter a symbolic link on an ntfs-3g filesystem, use L</"
1436 "guestfs_lgetxattr> to read the C<system.ntfs_reparse_data> extended "
1437 "attribute, and read the raw reparse data from that (you can find the format "
1438 "documented in various places around the web)."
1442 #: ../src/guestfs.pod:684
1443 msgid "EXTENDED ATTRIBUTES ON NTFS-3G FILESYSTEMS"
1447 #: ../src/guestfs.pod:686
1449 "There are other useful extended attributes that can be read from ntfs-3g "
1450 "filesystems (using L</guestfs_getxattr>). See:"
1454 #: ../src/guestfs.pod:689
1456 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
1458 "L<http://www.tuxera.com/community/ntfs-3g-advanced/extended-attributes/>"
1461 #: ../src/guestfs.pod:691
1462 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1466 #: ../src/guestfs.pod:693
1468 "Although we don't want to discourage you from using the C API, we will "
1469 "mention here that the same API is also available in other languages."
1473 #: ../src/guestfs.pod:696
1475 "The API is broadly identical in all supported languages. This means that "
1476 "the C call C<guestfs_add_drive_ro(g,file)> is C<$g-E<gt>add_drive_ro($file)> "
1477 "in Perl, C<g.add_drive_ro(file)> in Python, and C<g#add_drive_ro file> in "
1478 "OCaml. In other words, a straightforward, predictable isomorphism between "
1483 #: ../src/guestfs.pod:702
1485 "Error messages are automatically transformed into exceptions if the language "
1490 #: ../src/guestfs.pod:705
1492 "We don't try to \"object orientify\" parts of the API in OO languages, "
1493 "although contributors are welcome to write higher level APIs above what we "
1494 "provide in their favourite languages if they wish."
1498 #: ../src/guestfs.pod:711
1503 #: ../src/guestfs.pod:713
1505 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1506 "identical to the C API. C++ classes and exceptions are not used."
1510 #: ../src/guestfs.pod:717
1515 #: ../src/guestfs.pod:719
1517 "The C# bindings are highly experimental. Please read the warnings at the "
1518 "top of C<csharp/Libguestfs.cs>."
1522 #: ../src/guestfs.pod:722
1527 #: ../src/guestfs.pod:724
1529 "This is the only language binding that is working but incomplete. Only "
1530 "calls which return simple integers have been bound in Haskell, and we are "
1531 "looking for help to complete this binding."
1535 #: ../src/guestfs.pod:728
1540 #: ../src/guestfs.pod:730
1542 "Full documentation is contained in the Javadoc which is distributed with "
1547 #: ../src/guestfs.pod:733
1552 #: ../src/guestfs.pod:735
1553 msgid "See L<guestfs-ocaml(3)>."
1554 msgstr "Див. L<guestfs-ocaml(3)>."
1557 #: ../src/guestfs.pod:737
1562 #: ../src/guestfs.pod:739
1563 msgid "See L<guestfs-perl(3)> and L<Sys::Guestfs(3)>."
1564 msgstr "Див. L<guestfs-perl(3)> та L<Sys::Guestfs(3)>."
1567 #: ../src/guestfs.pod:741
1572 #: ../src/guestfs.pod:743
1574 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1575 "the php-libguestfs package for your distribution."
1579 #: ../src/guestfs.pod:746
1580 msgid "The PHP binding only works correctly on 64 bit machines."
1584 #: ../src/guestfs.pod:748
1589 #: ../src/guestfs.pod:750
1590 msgid "See L<guestfs-python(3)>."
1591 msgstr "Див. L<guestfs-python(3)>."
1594 #: ../src/guestfs.pod:752
1599 #: ../src/guestfs.pod:754
1600 msgid "See L<guestfs-ruby(3)>."
1601 msgstr "Див. L<guestfs-ruby(3)>."
1604 #: ../src/guestfs.pod:756
1605 msgid "B<shell scripts>"
1606 msgstr "B<скрипти оболонки>"
1609 #: ../src/guestfs.pod:758
1610 msgid "See L<guestfish(1)>."
1611 msgstr "Див. L<guestfish(1)>."
1614 #: ../src/guestfs.pod:762
1615 msgid "LIBGUESTFS GOTCHAS"
1619 #: ../src/guestfs.pod:764
1621 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1622 "system [...] that works in the way it is documented but is counterintuitive "
1623 "and almost invites mistakes.\""
1627 #: ../src/guestfs.pod:768
1629 "Since we developed libguestfs and the associated tools, there are several "
1630 "things we would have designed differently, but are now stuck with for "
1631 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1632 "release, you can expect these to change. Beware of them."
1636 #: ../src/guestfs.pod:776
1637 msgid "Autosync / forgetting to sync."
1641 #: ../src/guestfs.pod:778
1643 "I<Update:> Autosync is enabled by default for all API users starting from "
1644 "libguestfs 1.5.24. This section only applies to older versions."
1648 #: ../src/guestfs.pod:781
1650 "When modifying a filesystem from C or another language, you B<must> unmount "
1651 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1652 "libguestfs handle. You can also call:"
1656 #: ../src/guestfs.pod:785
1659 " guestfs_set_autosync (g, 1);\n"
1664 #: ../src/guestfs.pod:787
1666 "to have the unmount/sync done automatically for you when the handle 'g' is "
1667 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
1671 #: ../src/guestfs.pod:791
1673 "If you forget to do this, then it is entirely possible that your changes "
1674 "won't be written out, or will be partially written, or (very rarely) that "
1675 "you'll get disk corruption."
1679 #: ../src/guestfs.pod:795
1681 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1682 "guestfish scripts that forget to sync will work just fine, which can make "
1683 "this very puzzling if you are trying to debug a problem."
1687 #: ../src/guestfs.pod:799
1688 msgid "Mount option C<-o sync> should not be the default."
1692 #: ../src/guestfs.pod:801
1694 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1695 "However C<-o sync> does not add any reliability benefit, but does have a "
1696 "very large performance impact."
1700 #: ../src/guestfs.pod:805
1702 "The work around is to use L</guestfs_mount_options> and set the mount "
1703 "options that you actually want to use."
1707 #: ../src/guestfs.pod:808
1708 msgid "Read-only should be the default."
1712 #: ../src/guestfs.pod:810
1714 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1715 "specify I<--rw> if you want to make changes to the image."
1719 #: ../src/guestfs.pod:813
1720 msgid "This would reduce the potential to corrupt live VM images."
1724 #: ../src/guestfs.pod:815
1726 "Note that many filesystems change the disk when you just mount and unmount, "
1727 "even if you didn't perform any writes. You need to use L</"
1728 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
1732 #: ../src/guestfs.pod:819
1733 msgid "guestfish command line is hard to use."
1737 #: ../src/guestfs.pod:821
1739 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1740 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1741 "exist, so it fails. In earlier versions of guestfish the error message was "
1742 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1743 "we should have used C<guestfish -c command> to run commands."
1747 #: ../src/guestfs.pod:828
1748 msgid "guestfish megabyte modifiers don't work right on all commands"
1752 #: ../src/guestfs.pod:830
1754 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1755 "other modifiers). What guestfish actually does is to multiply the number "
1756 "part by the modifier part and pass the result to the C API. However this "
1757 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1758 "expecting some other unit (eg. megabytes)."
1762 #: ../src/guestfs.pod:837
1763 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1767 #: ../src/guestfs.pod:839
1770 " lvcreate LV VG 100M\n"
1775 #: ../src/guestfs.pod:841
1777 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1778 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1779 "megabytes * megabytes) logical volume. The error message you get from this "
1780 "is also a little obscure."
1784 #: ../src/guestfs.pod:846
1786 "This could be fixed in the generator by specially marking parameters and "
1787 "return values which take bytes or other units."
1791 #: ../src/guestfs.pod:849
1792 msgid "Ambiguity between devices and paths"
1796 #: ../src/guestfs.pod:851
1798 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
1799 "sdb2>) and a similar pathname. A file might just happen to be called "
1800 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1804 #: ../src/guestfs.pod:856
1806 "In the current API we usually resolve this ambiguity by having two separate "
1807 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1808 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1809 "detecting if the path supplied begins with C</dev/>."
1813 #: ../src/guestfs.pod:862
1815 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1816 "make paths/devices into structured names. One way to do this would be to "
1817 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1818 "aspect of grub. Another way would be to use a structured type, equivalent "
1819 "to this OCaml type:"
1823 #: ../src/guestfs.pod:868
1826 " type path = Path of string | Device of int | Partition of int * int\n"
1831 #: ../src/guestfs.pod:870
1832 msgid "which would allow you to pass arguments like:"
1836 #: ../src/guestfs.pod:872
1839 " Path \"/foo/bar\"\n"
1840 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
1841 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
1842 " Path \"/dev/sdb2\" (* not a device *)\n"
1847 #: ../src/guestfs.pod:877
1849 "As you can see there are still problems to resolve even with this "
1850 "representation. Also consider how it might work in guestfish."
1854 #: ../src/guestfs.pod:882
1855 msgid "KEYS AND PASSPHRASES"
1859 #: ../src/guestfs.pod:884
1861 "Certain libguestfs calls take a parameter that contains sensitive key "
1862 "material, passed in as a C string."
1866 #: ../src/guestfs.pod:887
1868 "In the future we would hope to change the libguestfs implementation so that "
1869 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1870 "swap. However this is I<not> done at the moment, because of the complexity "
1871 "of such an implementation."
1875 #: ../src/guestfs.pod:892
1877 "Therefore you should be aware that any key parameter you pass to libguestfs "
1878 "might end up being written out to the swap partition. If this is a concern, "
1879 "scrub the swap partition or don't use libguestfs on encrypted devices."
1883 #: ../src/guestfs.pod:897
1884 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
1888 #: ../src/guestfs.pod:899
1890 "All high-level libguestfs actions are synchronous. If you want to use "
1891 "libguestfs asynchronously then you must create a thread."
1895 #: ../src/guestfs.pod:902
1897 "Only use the handle from a single thread. Either use the handle exclusively "
1898 "from one thread, or provide your own mutex so that two threads cannot issue "
1899 "calls on the same handle at the same time."
1903 #: ../src/guestfs.pod:906
1905 "See the graphical program guestfs-browser for one possible architecture for "
1906 "multithreaded programs using libvirt and libguestfs."
1910 #: ../src/guestfs.pod:909
1915 #: ../src/guestfs.pod:911
1917 "Libguestfs needs a supermin appliance, which it finds by looking along an "
1922 #: ../src/guestfs.pod:914
1924 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
1925 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
1929 #: ../src/guestfs.pod:917
1931 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
1932 "to change the directories that libguestfs will search in. The value is a "
1933 "colon-separated list of paths. The current directory is I<not> searched "
1934 "unless the path contains an empty element or C<.>. For example "
1935 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
1936 "then C</usr/lib/guestfs>."
1940 #: ../src/guestfs.pod:924
1941 msgid "QEMU WRAPPERS"
1945 #: ../src/guestfs.pod:926
1947 "If you want to compile your own qemu, run qemu from a non-standard location, "
1948 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
1953 #: ../src/guestfs.pod:930
1955 "There is one important rule to remember: you I<must C<exec qemu>> as the "
1956 "last command in the shell script (so that qemu replaces the shell and "
1957 "becomes the direct child of the libguestfs-using program). If you don't do "
1958 "this, then the qemu process won't be cleaned up correctly."
1962 #: ../src/guestfs.pod:935
1964 "Here is an example of a wrapper, where I have built my own copy of qemu from "
1969 #: ../src/guestfs.pod:938
1973 " qemudir=/home/rjones/d/qemu\n"
1974 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
1979 #: ../src/guestfs.pod:942
1981 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
1982 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
1987 #: ../src/guestfs.pod:946
1990 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
1995 #: ../src/guestfs.pod:948
1997 "Note that libguestfs also calls qemu with the -help and -version options in "
1998 "order to determine features."
2002 #: ../src/guestfs.pod:951
2003 msgid "ATTACHING TO RUNNING DAEMONS"
2007 #: ../src/guestfs.pod:953
2009 "I<Note (1):> This is B<highly experimental> and has a tendency to eat "
2010 "babies. Use with caution."
2014 #: ../src/guestfs.pod:956
2016 "I<Note (2):> This section explains how to attach to a running daemon from a "
2017 "low level perspective. For most users, simply using virt tools such as "
2018 "L<guestfish(1)> with the I<--live> option will \"just work\"."
2022 #: ../src/guestfs.pod:960
2023 msgid "Using guestfs_set_attach_method"
2027 #: ../src/guestfs.pod:962
2029 "By calling L</guestfs_set_attach_method> you can change how the library "
2030 "connects to the C<guestfsd> daemon in L</guestfs_launch> (read L</"
2031 "ARCHITECTURE> for some background)."
2035 #: ../src/guestfs.pod:966
2037 "The normal attach method is C<appliance>, where a small appliance is created "
2038 "containing the daemon, and then the library connects to this."
2042 #: ../src/guestfs.pod:969
2044 "Setting attach method to C<unix:I<path>> (where I<path> is the path of a "
2045 "Unix domain socket) causes L</guestfs_launch> to connect to an existing "
2046 "daemon over the Unix domain socket."
2050 #: ../src/guestfs.pod:973
2052 "The normal use for this is to connect to a running virtual machine that "
2053 "contains a C<guestfsd> daemon, and send commands so you can read and write "
2054 "files inside the live virtual machine."
2058 #: ../src/guestfs.pod:977
2059 msgid "Using guestfs_add_domain with live flag"
2063 #: ../src/guestfs.pod:979
2065 "L</guestfs_add_domain> provides some help for getting the correct attach "
2066 "method. If you pass the C<live> option to this function, then (if the "
2067 "virtual machine is running) it will examine the libvirt XML looking for a "
2068 "virtio-serial channel to connect to:"
2072 #: ../src/guestfs.pod:985
2079 " <channel type='unix'>\n"
2080 " <source mode='bind' path='/path/to/socket'/>\n"
2081 " <target type='virtio' name='org.libguestfs.channel.0'/>\n"
2090 #: ../src/guestfs.pod:997
2092 "L</guestfs_add_domain> extracts C</path/to/socket> and sets the attach "
2093 "method to C<unix:/path/to/socket>."
2097 #: ../src/guestfs.pod:1000
2099 "Some of the libguestfs tools (including guestfish) support a I<--live> "
2100 "option which is passed through to L</guestfs_add_domain> thus allowing you "
2101 "to attach to and modify live virtual machines."
2105 #: ../src/guestfs.pod:1004
2107 "The virtual machine needs to have been set up beforehand so that it has the "
2108 "virtio-serial channel and so that guestfsd is running inside it."
2112 #: ../src/guestfs.pod:1008
2113 msgid "ABI GUARANTEE"
2117 #: ../src/guestfs.pod:1010
2119 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
2120 "actions as outlined in this section. Although we will deprecate some "
2121 "actions, for example if they get replaced by newer calls, we will keep the "
2122 "old actions forever. This allows you the developer to program in confidence "
2123 "against the libguestfs API."
2127 #: ../src/guestfs.pod:1016
2128 msgid "BLOCK DEVICE NAMING"
2132 #: ../src/guestfs.pod:1018
2134 "In the kernel there is now quite a profusion of schemata for naming block "
2135 "devices (in this context, by I<block device> I mean a physical or virtual "
2136 "hard drive). The original Linux IDE driver used names starting with C</dev/"
2137 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
2138 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
2139 "for the old IDE driver (particularly for SATA devices) those devices also "
2140 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
2141 "paravirtualized drivers. This has created several different naming systems, "
2142 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
2146 #: ../src/guestfs.pod:1030
2148 "As discussed above, libguestfs uses a qemu appliance running an embedded "
2149 "Linux kernel to access block devices. We can run a variety of appliances "
2150 "based on a variety of Linux kernels."
2154 #: ../src/guestfs.pod:1034
2156 "This causes a problem for libguestfs because many API calls use device or "
2157 "partition names. Working scripts and the recipe (example) scripts that we "
2158 "make available over the internet could fail if the naming scheme changes."
2162 #: ../src/guestfs.pod:1039
2164 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2165 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2166 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2167 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2171 #: ../src/guestfs.pod:1045
2173 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2174 "L</guestfs_list_partitions> and similar calls return the true names of the "
2175 "devices and partitions as known to the appliance."
2179 #: ../src/guestfs.pod:1050
2180 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2184 #: ../src/guestfs.pod:1052
2186 "Usually this translation is transparent. However in some (very rare) cases "
2187 "you may need to know the exact algorithm. Such cases include where you use "
2188 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
2189 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
2193 #: ../src/guestfs.pod:1058
2195 "The algorithm is applied only to I<parameters> which are known to be either "
2196 "device or partition names. Return values from functions such as L</"
2197 "guestfs_list_devices> are never changed."
2201 #: ../src/guestfs.pod:1066
2202 msgid "Is the string a parameter which is a device or partition name?"
2206 #: ../src/guestfs.pod:1070
2207 msgid "Does the string begin with C</dev/sd>?"
2211 #: ../src/guestfs.pod:1074
2213 "Does the named device exist? If so, we use that device. However if I<not> "
2214 "then we continue with this algorithm."
2218 #: ../src/guestfs.pod:1079
2219 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2223 #: ../src/guestfs.pod:1081
2224 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2228 #: ../src/guestfs.pod:1083
2229 msgid "If that named device exists, use it. If not, continue."
2233 #: ../src/guestfs.pod:1087
2234 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2238 #: ../src/guestfs.pod:1089
2239 msgid "If that named device exists, use it. If not, return an error."
2243 #: ../src/guestfs.pod:1093
2244 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
2248 #: ../src/guestfs.pod:1095
2250 "Although the standard naming scheme and automatic translation is useful for "
2251 "simple programs and guestfish scripts, for larger programs it is best not to "
2252 "rely on this mechanism."
2256 #: ../src/guestfs.pod:1099
2258 "Where possible for maximum future portability programs using libguestfs "
2259 "should use these future-proof techniques:"
2263 #: ../src/guestfs.pod:1106
2265 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2266 "device names, and then use those names directly."
2270 #: ../src/guestfs.pod:1109
2272 "Since those device names exist by definition, they will never be translated."
2276 #: ../src/guestfs.pod:1114
2278 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2279 "filesystem labels."
2283 #: ../src/guestfs.pod:1119
2288 #: ../src/guestfs.pod:1121
2290 "This section discusses security implications of using libguestfs, "
2291 "particularly with untrusted or malicious guests or disk images."
2295 #: ../src/guestfs.pod:1124
2296 msgid "GENERAL SECURITY CONSIDERATIONS"
2300 #: ../src/guestfs.pod:1126
2302 "Be careful with any files or data that you download from a guest (by "
2303 "\"download\" we mean not just the L</guestfs_download> command but any "
2304 "command that reads files, filenames, directories or anything else from a "
2305 "disk image). An attacker could manipulate the data to fool your program "
2306 "into doing the wrong thing. Consider cases such as:"
2310 #: ../src/guestfs.pod:1136
2311 msgid "the data (file etc) not being present"
2315 #: ../src/guestfs.pod:1140
2316 msgid "being present but empty"
2320 #: ../src/guestfs.pod:1144
2321 msgid "being much larger than normal"
2325 #: ../src/guestfs.pod:1148
2326 msgid "containing arbitrary 8 bit data"
2330 #: ../src/guestfs.pod:1152
2331 msgid "being in an unexpected character encoding"
2335 #: ../src/guestfs.pod:1156
2336 msgid "containing homoglyphs."
2340 #: ../src/guestfs.pod:1160
2341 msgid "SECURITY OF MOUNTING FILESYSTEMS"
2345 #: ../src/guestfs.pod:1162
2347 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
2348 "(VFS) module can sometimes be escalated into exploits by deliberately "
2349 "creating a malicious, malformed filesystem. These exploits are very severe "
2350 "for two reasons. Firstly there are very many filesystem drivers in the "
2351 "kernel, and many of them are infrequently used and not much developer "
2352 "attention has been paid to the code. Linux userspace helps potential "
2353 "crackers by detecting the filesystem type and automatically choosing the "
2354 "right VFS driver, even if that filesystem type is obscure or unexpected for "
2355 "the administrator. Secondly, a kernel-level exploit is like a local root "
2356 "exploit (worse in some ways), giving immediate and total access to the "
2357 "system right down to the hardware level."
2361 #: ../src/guestfs.pod:1175
2363 "That explains why you should never mount a filesystem from an untrusted "
2364 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
2365 "inside a qemu virtual machine, usually running as a non-root user. The "
2366 "attacker would need to write a filesystem which first exploited the kernel, "
2367 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
2368 "the libguestfs protocol, and finally to be as serious as the host kernel "
2369 "exploit it would need to escalate its privileges to root. This multi-step "
2370 "escalation, performed by a static piece of data, is thought to be extremely "
2371 "hard to do, although we never say 'never' about security issues."
2375 #: ../src/guestfs.pod:1186
2377 "In any case callers can reduce the attack surface by forcing the filesystem "
2378 "type when mounting (use L</guestfs_mount_vfs>)."
2382 #: ../src/guestfs.pod:1189
2383 msgid "PROTOCOL SECURITY"
2387 #: ../src/guestfs.pod:1191
2389 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
2390 "defined upper message size. However a program that uses libguestfs must "
2391 "also take care - for example you can write a program that downloads a binary "
2392 "from a disk image and executes it locally, and no amount of protocol "
2393 "security will save you from the consequences."
2397 #: ../src/guestfs.pod:1197
2398 msgid "INSPECTION SECURITY"
2402 #: ../src/guestfs.pod:1199
2404 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
2405 "directly from the guest, and these could contain any 8 bit data. Callers "
2406 "should be careful to escape these before printing them to a structured file "
2407 "(for example, use HTML escaping if creating a web page)."
2411 #: ../src/guestfs.pod:1205
2413 "Guest configuration may be altered in unusual ways by the administrator of "
2414 "the virtual machine, and may not reflect reality (particularly for untrusted "
2415 "or actively malicious guests). For example we parse the hostname from "
2416 "configuration files like C</etc/sysconfig/network> that we find in the "
2417 "guest, but the guest administrator can easily manipulate these files to "
2418 "provide the wrong hostname."
2422 #: ../src/guestfs.pod:1213
2424 "The inspection API parses guest configuration using two external libraries: "
2425 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
2426 "designed to be robust in the face of malicious data, although denial of "
2427 "service attacks are still possible, for example with oversized configuration "
2432 #: ../src/guestfs.pod:1219
2433 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
2437 #: ../src/guestfs.pod:1221
2439 "Be very cautious about running commands from the guest. By running a "
2440 "command in the guest, you are giving CPU time to a binary that you do not "
2441 "control, under the same user account as the library, albeit wrapped in qemu "
2442 "virtualization. More information and alternatives can be found in the "
2443 "section L</RUNNING COMMANDS>."
2447 #: ../src/guestfs.pod:1227
2448 msgid "CVE-2010-3851"
2449 msgstr "CVE-2010-3851"
2452 #: ../src/guestfs.pod:1229
2453 msgid "https://bugzilla.redhat.com/642934"
2454 msgstr "https://bugzilla.redhat.com/642934"
2457 #: ../src/guestfs.pod:1231
2459 "This security bug concerns the automatic disk format detection that qemu "
2460 "does on disk images."
2464 #: ../src/guestfs.pod:1234
2466 "A raw disk image is just the raw bytes, there is no header. Other disk "
2467 "images like qcow2 contain a special header. Qemu deals with this by looking "
2468 "for one of the known headers, and if none is found then assuming the disk "
2469 "image must be raw."
2473 #: ../src/guestfs.pod:1239
2475 "This allows a guest which has been given a raw disk image to write some "
2476 "other header. At next boot (or when the disk image is accessed by "
2477 "libguestfs) qemu would do autodetection and think the disk image format was, "
2478 "say, qcow2 based on the header written by the guest."
2482 #: ../src/guestfs.pod:1244
2484 "This in itself would not be a problem, but qcow2 offers many features, one "
2485 "of which is to allow a disk image to refer to another image (called the "
2486 "\"backing disk\"). It does this by placing the path to the backing disk "
2487 "into the qcow2 header. This path is not validated and could point to any "
2488 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
2489 "\"holes\" in the qcow2 disk image, which of course is completely under the "
2490 "control of the attacker."
2494 #: ../src/guestfs.pod:1252
2496 "In libguestfs this is rather hard to exploit except under two circumstances:"
2500 #: ../src/guestfs.pod:1259
2501 msgid "You have enabled the network or have opened the disk in write mode."
2505 #: ../src/guestfs.pod:1263
2507 "You are also running untrusted code from the guest (see L</RUNNING "
2512 #: ../src/guestfs.pod:1268
2514 "The way to avoid this is to specify the expected disk format when adding "
2515 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
2516 "should always do this if the disk is raw format, and it's a good idea for "
2521 #: ../src/guestfs.pod:1273
2523 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
2524 "format is fetched from libvirt and passed through."
2528 #: ../src/guestfs.pod:1276
2530 "For libguestfs tools, use the I<--format> command line parameter as "
2535 #: ../src/guestfs.pod:1279
2536 msgid "CONNECTION MANAGEMENT"
2540 #: ../src/guestfs.pod:1281
2545 #: ../src/guestfs.pod:1283
2547 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
2548 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
2549 "handle and release all resources used."
2553 #: ../src/guestfs.pod:1287
2555 "For information on using multiple handles and threads, see the section L</"
2556 "MULTIPLE HANDLES AND MULTIPLE THREADS> above."
2560 #: ../src/guestfs.pod:1290
2561 msgid "guestfs_create"
2565 #: ../src/guestfs.pod:1292
2568 " guestfs_h *guestfs_create (void);\n"
2573 #: ../src/guestfs.pod:1294
2574 msgid "Create a connection handle."
2578 #: ../src/guestfs.pod:1296
2580 "On success this returns a non-NULL pointer to a handle. On error it returns "
2585 #: ../src/guestfs.pod:1299
2587 "You have to \"configure\" the handle after creating it. This includes "
2588 "calling L</guestfs_add_drive_opts> (or one of the equivalent calls) on the "
2589 "handle at least once."
2593 #: ../src/guestfs.pod:1303
2594 msgid "After configuring the handle, you have to call L</guestfs_launch>."
2598 #: ../src/guestfs.pod:1305
2600 "You may also want to configure error handling for the handle. See the L</"
2601 "ERROR HANDLING> section below."
2605 #: ../src/guestfs.pod:1308
2606 msgid "guestfs_close"
2610 #: ../src/guestfs.pod:1310
2613 " void guestfs_close (guestfs_h *g);\n"
2618 #: ../src/guestfs.pod:1312
2619 msgid "This closes the connection handle and frees up all resources used."
2623 #: ../src/guestfs.pod:1314
2625 "If autosync was set on the handle and the handle was launched, then this "
2626 "implicitly calls various functions to unmount filesystems and sync the "
2627 "disk. See L</guestfs_set_autosync> for more details."
2631 #: ../src/guestfs.pod:1318
2632 msgid "If a close callback was set on the handle, then it is called."
2636 #: ../src/guestfs.pod:1320
2637 msgid "ERROR HANDLING"
2638 msgstr "ОБРОБКА ПОМИЛОК"
2641 #: ../src/guestfs.pod:1322
2643 "API functions can return errors. For example, almost all functions that "
2644 "return C<int> will return C<-1> to indicate an error."
2648 #: ../src/guestfs.pod:1325
2650 "Additional information is available for errors: an error message string and "
2651 "optionally an error number (errno) if the thing that failed was a system "
2656 #: ../src/guestfs.pod:1329
2658 "You can get at the additional information about the last error on the handle "
2659 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
2660 "up an error handler with L</guestfs_set_error_handler>."
2664 #: ../src/guestfs.pod:1334
2666 "When the handle is created, a default error handler is installed which "
2667 "prints the error message string to C<stderr>. For small short-running "
2668 "command line programs it is sufficient to do:"
2672 #: ../src/guestfs.pod:1338
2675 " if (guestfs_launch (g) == -1)\n"
2676 " exit (EXIT_FAILURE);\n"
2681 #: ../src/guestfs.pod:1341
2683 "since the default error handler will ensure that an error message has been "
2684 "printed to C<stderr> before the program exits."
2688 #: ../src/guestfs.pod:1344
2690 "For other programs the caller will almost certainly want to install an "
2691 "alternate error handler or do error handling in-line like this:"
2695 #: ../src/guestfs.pod:1347
2698 " g = guestfs_create ();\n"
2703 #: ../src/guestfs.pod:1349
2706 " /* This disables the default behaviour of printing errors\n"
2708 " guestfs_set_error_handler (g, NULL, NULL);\n"
2713 #: ../src/guestfs.pod:1353
2716 " if (guestfs_launch (g) == -1) {\n"
2717 " /* Examine the error message and print it etc. */\n"
2718 " char *msg = guestfs_last_error (g);\n"
2719 " int errnum = guestfs_last_errno (g);\n"
2720 " fprintf (stderr, \"%s\\n\", msg);\n"
2727 #: ../src/guestfs.pod:1361
2729 "Out of memory errors are handled differently. The default action is to call "
2730 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
2731 "guestfs_set_out_of_memory_handler>."
2735 #: ../src/guestfs.pod:1365
2737 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
2738 "because there is no handle if this happens there is no way to get additional "
2739 "error information. However L</guestfs_create> is supposed to be a "
2740 "lightweight operation which can only fail because of insufficient memory (it "
2741 "returns NULL in this case)."
2745 #: ../src/guestfs.pod:1371
2746 msgid "guestfs_last_error"
2750 #: ../src/guestfs.pod:1373
2753 " const char *guestfs_last_error (guestfs_h *g);\n"
2758 #: ../src/guestfs.pod:1375
2760 "This returns the last error message that happened on C<g>. If there has not "
2761 "been an error since the handle was created, then this returns C<NULL>."
2765 #: ../src/guestfs.pod:1379
2767 "The lifetime of the returned string is until the next error occurs, or L</"
2768 "guestfs_close> is called."
2772 #: ../src/guestfs.pod:1382
2773 msgid "guestfs_last_errno"
2777 #: ../src/guestfs.pod:1384
2780 " int guestfs_last_errno (guestfs_h *g);\n"
2785 #: ../src/guestfs.pod:1386
2786 msgid "This returns the last error number (errno) that happened on C<g>."
2790 #: ../src/guestfs.pod:1388
2791 msgid "If successful, an errno integer not equal to zero is returned."
2795 #: ../src/guestfs.pod:1390
2797 "If no error, this returns 0. This call can return 0 in three situations:"
2801 #: ../src/guestfs.pod:1397
2802 msgid "There has not been any error on the handle."
2806 #: ../src/guestfs.pod:1401
2808 "There has been an error but the errno was meaningless. This corresponds to "
2809 "the case where the error did not come from a failed system call, but for "
2810 "some other reason."
2814 #: ../src/guestfs.pod:1407
2816 "There was an error from a failed system call, but for some reason the errno "
2817 "was not captured and returned. This usually indicates a bug in libguestfs."
2821 #: ../src/guestfs.pod:1413
2823 "Libguestfs tries to convert the errno from inside the applicance into a "
2824 "corresponding errno for the caller (not entirely trivial: the appliance "
2825 "might be running a completely different operating system from the library "
2826 "and error numbers are not standardized across Un*xen). If this could not be "
2827 "done, then the error is translated to C<EINVAL>. In practice this should "
2828 "only happen in very rare circumstances."
2832 #: ../src/guestfs.pod:1421
2833 msgid "guestfs_set_error_handler"
2837 #: ../src/guestfs.pod:1423
2840 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
2842 " const char *msg);\n"
2843 " void guestfs_set_error_handler (guestfs_h *g,\n"
2844 " guestfs_error_handler_cb cb,\n"
2850 #: ../src/guestfs.pod:1430
2852 "The callback C<cb> will be called if there is an error. The parameters "
2853 "passed to the callback are an opaque data pointer and the error message "
2858 #: ../src/guestfs.pod:1434
2860 "C<errno> is not passed to the callback. To get that the callback must call "
2861 "L</guestfs_last_errno>."
2865 #: ../src/guestfs.pod:1437
2867 "Note that the message string C<msg> is freed as soon as the callback "
2868 "function returns, so if you want to stash it somewhere you must make your "
2873 #: ../src/guestfs.pod:1441
2874 msgid "The default handler prints messages on C<stderr>."
2878 #: ../src/guestfs.pod:1443
2879 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
2883 #: ../src/guestfs.pod:1445
2884 msgid "guestfs_get_error_handler"
2888 #: ../src/guestfs.pod:1447
2891 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
2892 " void **opaque_rtn);\n"
2897 #: ../src/guestfs.pod:1450
2898 msgid "Returns the current error handler callback."
2902 #: ../src/guestfs.pod:1452
2903 msgid "guestfs_set_out_of_memory_handler"
2907 #: ../src/guestfs.pod:1454
2910 " typedef void (*guestfs_abort_cb) (void);\n"
2911 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
2912 " guestfs_abort_cb);\n"
2917 #: ../src/guestfs.pod:1458
2919 "The callback C<cb> will be called if there is an out of memory situation. "
2920 "I<Note this callback must not return>."
2924 #: ../src/guestfs.pod:1461
2925 msgid "The default is to call L<abort(3)>."
2929 #: ../src/guestfs.pod:1463
2931 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
2935 #: ../src/guestfs.pod:1466
2936 msgid "guestfs_get_out_of_memory_handler"
2940 #: ../src/guestfs.pod:1468
2943 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
2948 #: ../src/guestfs.pod:1470
2949 msgid "This returns the current out of memory handler."
2953 #: ../src/guestfs.pod:1472
2958 #: ../src/guestfs.pod:1474 ../fish/guestfish.pod:1010
2963 #: ../src/guestfs.pod:1476
2968 #: ../src/guestfs.pod:1478
2973 #: ../src/guestfs.pod:1480
2974 msgid "AVAILABILITY"
2978 #: ../src/guestfs.pod:1482
2979 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
2983 #: ../src/guestfs.pod:1484
2985 "Using L</guestfs_available> you can test availability of the following "
2986 "groups of functions. This test queries the appliance to see if the "
2987 "appliance you are currently using supports the functionality."
2991 #: ../src/guestfs.pod:1489
2992 msgid "@AVAILABILITY@"
2996 #: ../src/guestfs.pod:1491
2997 msgid "GUESTFISH supported COMMAND"
3001 #: ../src/guestfs.pod:1493
3003 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
3004 "prints out the available groups and whether they are supported by this build "
3005 "of libguestfs. Note however that you have to do C<run> first."
3009 #: ../src/guestfs.pod:1498
3010 msgid "SINGLE CALLS AT COMPILE TIME"
3014 #: ../src/guestfs.pod:1500
3016 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
3017 "function, such as:"
3021 #: ../src/guestfs.pod:1503
3024 " #define LIBGUESTFS_HAVE_DD 1\n"
3029 #: ../src/guestfs.pod:1505
3030 msgid "if L</guestfs_dd> is available."
3034 #: ../src/guestfs.pod:1507
3036 "Before version 1.5.8, if you needed to test whether a single libguestfs "
3037 "function is available at compile time, we recommended using build tools such "
3038 "as autoconf or cmake. For example in autotools you could use:"
3042 #: ../src/guestfs.pod:1512
3045 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
3046 " AC_CHECK_FUNCS([guestfs_dd])\n"
3051 #: ../src/guestfs.pod:1515
3053 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
3058 #: ../src/guestfs.pod:1518
3059 msgid "SINGLE CALLS AT RUN TIME"
3063 #: ../src/guestfs.pod:1520
3065 "Testing at compile time doesn't guarantee that a function really exists in "
3066 "the library. The reason is that you might be dynamically linked against a "
3067 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
3068 "This situation unfortunately results in a segmentation fault, which is a "
3069 "shortcoming of the C dynamic linking system itself."
3073 #: ../src/guestfs.pod:1527
3075 "You can use L<dlopen(3)> to test if a function is available at run time, as "
3076 "in this example program (note that you still need the compile time check as "
3081 #: ../src/guestfs.pod:1531
3084 " #include <stdio.h>\n"
3085 " #include <stdlib.h>\n"
3086 " #include <unistd.h>\n"
3087 " #include <dlfcn.h>\n"
3088 " #include <guestfs.h>\n"
3093 #: ../src/guestfs.pod:1537
3098 " #ifdef LIBGUESTFS_HAVE_DD\n"
3100 " int has_function;\n"
3105 #: ../src/guestfs.pod:1543
3108 " /* Test if the function guestfs_dd is really available. */\n"
3109 " dl = dlopen (NULL, RTLD_LAZY);\n"
3111 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
3112 " exit (EXIT_FAILURE);\n"
3114 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
3120 #: ../src/guestfs.pod:1552
3123 " if (!has_function)\n"
3124 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
3126 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
3127 " /* Now it's safe to call\n"
3128 " guestfs_dd (g, \"foo\", \"bar\");\n"
3132 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
3139 #: ../src/guestfs.pod:1565
3141 "You may think the above is an awful lot of hassle, and it is. There are "
3142 "other ways outside of the C linking system to ensure that this kind of "
3143 "incompatibility never arises, such as using package versioning:"
3147 #: ../src/guestfs.pod:1570
3150 " Requires: libguestfs >= 1.0.80\n"
3155 #: ../src/guestfs.pod:1572
3156 msgid "CALLS WITH OPTIONAL ARGUMENTS"
3160 #: ../src/guestfs.pod:1574
3162 "A recent feature of the API is the introduction of calls which take optional "
3163 "arguments. In C these are declared 3 ways. The main way is as a call which "
3164 "takes variable arguments (ie. C<...>), as in this example:"
3168 #: ../src/guestfs.pod:1579
3171 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
3176 #: ../src/guestfs.pod:1581
3178 "Call this with a list of optional arguments, terminated by C<-1>. So to "
3179 "call with no optional arguments specified:"
3183 #: ../src/guestfs.pod:1584
3186 " guestfs_add_drive_opts (g, filename, -1);\n"
3191 #: ../src/guestfs.pod:1586
3192 msgid "With a single optional argument:"
3196 #: ../src/guestfs.pod:1588
3199 " guestfs_add_drive_opts (g, filename,\n"
3200 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3206 #: ../src/guestfs.pod:1592
3211 #: ../src/guestfs.pod:1594
3214 " guestfs_add_drive_opts (g, filename,\n"
3215 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
3216 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
3222 #: ../src/guestfs.pod:1599
3224 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
3229 #: ../src/guestfs.pod:1602
3230 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
3234 #: ../src/guestfs.pod:1604
3236 "The second variant has the same name with the suffix C<_va>, which works the "
3237 "same way but takes a C<va_list>. See the C manual for details. For the "
3238 "example function, this is declared:"
3242 #: ../src/guestfs.pod:1608
3245 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
3251 #: ../src/guestfs.pod:1611
3252 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
3256 #: ../src/guestfs.pod:1613
3258 "The third variant is useful where you need to construct these calls. You "
3259 "pass in a structure where you fill in the optional fields. The structure "
3260 "has a bitmask as the first element which you must set to indicate which "
3261 "fields you have filled in. For our example function the structure and call "
3266 #: ../src/guestfs.pod:1619
3269 " struct guestfs_add_drive_opts_argv {\n"
3270 " uint64_t bitmask;\n"
3272 " const char *format;\n"
3275 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
3276 " const struct guestfs_add_drive_opts_argv *optargs);\n"
3281 #: ../src/guestfs.pod:1628
3282 msgid "You could call it like this:"
3286 #: ../src/guestfs.pod:1630
3289 " struct guestfs_add_drive_opts_argv optargs = {\n"
3290 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
3291 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
3293 " .format = \"qcow2\"\n"
3299 #: ../src/guestfs.pod:1637
3302 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
3307 #: ../src/guestfs.pod:1639 ../src/guestfs-actions.pod:11
3308 #: ../src/guestfs-actions.pod:1858 ../fish/guestfish-actions.pod:9
3309 #: ../fish/guestfish-actions.pod:1262 ../tools/virt-win-reg.pl:704
3314 #: ../src/guestfs.pod:1645
3315 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
3319 #: ../src/guestfs.pod:1650
3320 msgid "You do not need to fill in all fields of the structure."
3324 #: ../src/guestfs.pod:1654
3326 "There must be a one-to-one correspondence between fields of the structure "
3327 "that are filled in, and bits set in the bitmask."
3331 #: ../src/guestfs.pod:1659
3332 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
3336 #: ../src/guestfs.pod:1661
3338 "In other languages, optional arguments are expressed in the way that is "
3339 "natural for that language. We refer you to the language-specific "
3340 "documentation for more details on that."
3344 #: ../src/guestfs.pod:1665
3345 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
3349 #: ../src/guestfs.pod:1667
3350 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
3354 #: ../src/guestfs.pod:1669
3356 "B<Note:> This section documents the generic event mechanism introduced in "
3357 "libguestfs 1.10, which you should use in new code if possible. The old "
3358 "functions C<guestfs_set_log_message_callback>, "
3359 "C<guestfs_set_subprocess_quit_callback>, "
3360 "C<guestfs_set_launch_done_callback>, C<guestfs_set_close_callback> and "
3361 "C<guestfs_set_progress_callback> are no longer documented in this manual "
3362 "page. Because of the ABI guarantee, the old functions continue to work."
3366 #: ../src/guestfs.pod:1678
3368 "Handles generate events when certain things happen, such as log messages "
3369 "being generated, progress messages during long-running operations, or the "
3370 "handle being closed. The API calls described below let you register a "
3371 "callback to be called when events happen. You can register multiple "
3372 "callbacks (for the same, different or overlapping sets of events), and "
3373 "individually remove callbacks. If callbacks are not removed, then they "
3374 "remain in force until the handle is closed."
3378 #: ../src/guestfs.pod:1686
3380 "In the current implementation, events are only generated synchronously: that "
3381 "means that events (and hence callbacks) can only happen while you are in the "
3382 "middle of making another libguestfs call. The callback is called in the "
3387 #: ../src/guestfs.pod:1691
3389 "Events may contain a payload, usually nothing (void), an array of 64 bit "
3390 "unsigned integers, or a message buffer. Payloads are discussed later on."
3394 #: ../src/guestfs.pod:1695
3395 msgid "CLASSES OF EVENTS"
3399 #: ../src/guestfs.pod:1699
3400 msgid "GUESTFS_EVENT_CLOSE (payload type: void)"
3404 #: ../src/guestfs.pod:1702
3406 "The callback function will be called while the handle is being closed "
3407 "(synchronously from L</guestfs_close>)."
3411 #: ../src/guestfs.pod:1705
3413 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
3414 "handles that are open when the program exits. This means that this callback "
3415 "might be called indirectly from L<exit(3)>, which can cause unexpected "
3416 "problems in higher-level languages (eg. if your HLL interpreter has already "
3417 "been cleaned up by the time this is called, and if your callback then jumps "
3418 "into some HLL function)."
3422 #: ../src/guestfs.pod:1712
3424 "If no callback is registered: the handle is closed without any callback "
3429 #: ../src/guestfs.pod:1715
3430 msgid "GUESTFS_EVENT_SUBPROCESS_QUIT (payload type: void)"
3434 #: ../src/guestfs.pod:1718
3436 "The callback function will be called when the child process quits, either "
3437 "asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
3438 "corresponds to a transition from any state to the CONFIG state)."
3442 #: ../src/guestfs.pod:1722 ../src/guestfs.pod:1731
3443 msgid "If no callback is registered: the event is ignored."
3447 #: ../src/guestfs.pod:1724
3448 msgid "GUESTFS_EVENT_LAUNCH_DONE (payload type: void)"
3452 #: ../src/guestfs.pod:1727
3454 "The callback function will be called when the child process becomes ready "
3455 "first time after it has been launched. (This corresponds to a transition "
3456 "from LAUNCHING to the READY state)."
3460 #: ../src/guestfs.pod:1733
3461 msgid "GUESTFS_EVENT_PROGRESS (payload type: array of 4 x uint64_t)"
3465 #: ../src/guestfs.pod:1736
3467 "Some long-running operations can generate progress messages. If this "
3468 "callback is registered, then it will be called each time a progress message "
3469 "is generated (usually two seconds after the operation started, and three "
3470 "times per second thereafter until it completes, although the frequency may "
3471 "change in future versions)."
3475 #: ../src/guestfs.pod:1742
3477 "The callback receives in the payload four unsigned 64 bit numbers which are "
3478 "(in order): C<proc_nr>, C<serial>, C<position>, C<total>."
3482 #: ../src/guestfs.pod:1745
3484 "The units of C<total> are not defined, although for some operations C<total> "
3485 "may relate in some way to the amount of data to be transferred (eg. in bytes "
3486 "or megabytes), and C<position> may be the portion which has been transferred."
3490 #: ../src/guestfs.pod:1750
3491 msgid "The only defined and stable parts of the API are:"
3495 #: ../src/guestfs.pod:1756
3497 "The callback can display to the user some type of progress bar or indicator "
3498 "which shows the ratio of C<position>:C<total>."
3502 #: ../src/guestfs.pod:1761
3503 msgid "0 E<lt>= C<position> E<lt>= C<total>"
3507 #: ../src/guestfs.pod:1765
3509 "If any progress notification is sent during a call, then a final progress "
3510 "notification is always sent when C<position> = C<total> (I<unless> the call "
3511 "fails with an error)."
3515 #: ../src/guestfs.pod:1769
3517 "This is to simplify caller code, so callers can easily set the progress "
3518 "indicator to \"100%\" at the end of the operation, without requiring special "
3519 "code to detect this case."
3523 #: ../src/guestfs.pod:1775
3525 "For some calls we are unable to estimate the progress of the call, but we "
3526 "can still generate progress messages to indicate activity. This is known as "
3527 "\"pulse mode\", and is directly supported by certain progress bar "
3528 "implementations (eg. GtkProgressBar)."
3532 #: ../src/guestfs.pod:1780
3534 "For these calls, zero or more progress messages are generated with "
3535 "C<position = 0> and C<total = 1>, followed by a final message with "
3536 "C<position = total = 1>."
3540 #: ../src/guestfs.pod:1784
3542 "As noted above, if the call fails with an error then the final message may "
3547 #: ../src/guestfs.pod:1789
3549 "The callback also receives the procedure number (C<proc_nr>) and serial "
3550 "number (C<serial>) of the call. These are only useful for debugging "
3551 "protocol issues, and the callback can normally ignore them. The callback "
3552 "may want to print these numbers in error messages or debugging messages."
3556 #: ../src/guestfs.pod:1795
3557 msgid "If no callback is registered: progress messages are discarded."
3561 #: ../src/guestfs.pod:1797
3562 msgid "GUESTFS_EVENT_APPLIANCE (payload type: message buffer)"
3566 #: ../src/guestfs.pod:1800
3568 "The callback function is called whenever a log message is generated by qemu, "
3569 "the appliance kernel, guestfsd (daemon), or utility programs."
3573 #: ../src/guestfs.pod:1803
3575 "If the verbose flag (L</guestfs_set_verbose>) is set before launch (L</"
3576 "guestfs_launch>) then additional debug messages are generated."
3580 #: ../src/guestfs.pod:1806 ../src/guestfs.pod:1820
3582 "If no callback is registered: the messages are discarded unless the verbose "
3583 "flag is set in which case they are sent to stderr. You can override the "
3584 "printing of verbose messages to stderr by setting up a callback."
3588 #: ../src/guestfs.pod:1811
3589 msgid "GUESTFS_EVENT_LIBRARY (payload type: message buffer)"
3593 #: ../src/guestfs.pod:1814
3595 "The callback function is called whenever a log message is generated by the "
3596 "library part of libguestfs."
3600 #: ../src/guestfs.pod:1817
3602 "If the verbose flag (L</guestfs_set_verbose>) is set then additional debug "
3603 "messages are generated."
3607 #: ../src/guestfs.pod:1825
3608 msgid "GUESTFS_EVENT_TRACE (payload type: message buffer)"
3612 #: ../src/guestfs.pod:1828
3614 "The callback function is called whenever a trace message is generated. This "
3615 "only applies if the trace flag (L</guestfs_set_trace>) is set."
3619 #: ../src/guestfs.pod:1831
3621 "If no callback is registered: the messages are sent to stderr. You can "
3622 "override the printing of trace messages to stderr by setting up a callback."
3626 #: ../src/guestfs.pod:1837
3627 msgid "guestfs_set_event_callback"
3631 #: ../src/guestfs.pod:1839
3634 " int guestfs_set_event_callback (guestfs_h *g,\n"
3635 " guestfs_event_callback cb,\n"
3636 " uint64_t event_bitmask,\n"
3643 #: ../src/guestfs.pod:1845
3645 "This function registers a callback (C<cb>) for all event classes in the "
3650 #: ../src/guestfs.pod:1848
3652 "For example, to register for all log message events, you could call this "
3653 "function with the bitmask C<GUESTFS_EVENT_APPLIANCE|GUESTFS_EVENT_LIBRARY>. "
3654 "To register a single callback for all possible classes of events, use "
3655 "C<GUESTFS_EVENT_ALL>."
3659 #: ../src/guestfs.pod:1854
3660 msgid "C<flags> should always be passed as 0."
3664 #: ../src/guestfs.pod:1856
3666 "C<opaque> is an opaque pointer which is passed to the callback. You can use "
3667 "it for any purpose."
3671 #: ../src/guestfs.pod:1859
3673 "The return value is the event handle (an integer) which you can use to "
3674 "delete the callback (see below)."
3678 #: ../src/guestfs.pod:1862
3680 "If there is an error, this function returns C<-1>, and sets the error in the "
3681 "handle in the usual way (see L</guestfs_last_error> etc.)"
3685 #: ../src/guestfs.pod:1865
3687 "Callbacks remain in effect until they are deleted, or until the handle is "
3692 #: ../src/guestfs.pod:1868
3694 "In the case where multiple callbacks are registered for a particular event "
3695 "class, all of the callbacks are called. The order in which multiple "
3696 "callbacks are called is not defined."
3700 #: ../src/guestfs.pod:1872
3701 msgid "guestfs_delete_event_callback"
3705 #: ../src/guestfs.pod:1874
3708 " void guestfs_delete_event_callback (guestfs_h *g, int event_handle);\n"
3713 #: ../src/guestfs.pod:1876
3715 "Delete a callback that was previously registered. C<event_handle> should be "
3716 "the integer that was returned by a previous call to "
3717 "C<guestfs_set_event_callback> on the same handle."
3721 #: ../src/guestfs.pod:1880
3722 msgid "guestfs_event_callback"
3726 #: ../src/guestfs.pod:1882
3729 " typedef void (*guestfs_event_callback) (\n"
3732 " uint64_t event,\n"
3733 " int event_handle,\n"
3735 " const char *buf, size_t buf_len,\n"
3736 " const uint64_t *array, size_t array_len);\n"
3741 #: ../src/guestfs.pod:1891
3743 "This is the type of the event callback function that you have to provide."
3747 #: ../src/guestfs.pod:1894
3749 "The basic parameters are: the handle (C<g>), the opaque user pointer "
3750 "(C<opaque>), the event class (eg. C<GUESTFS_EVENT_PROGRESS>), the event "
3751 "handle, and C<flags> which in the current API you should ignore."
3755 #: ../src/guestfs.pod:1898
3757 "The remaining parameters contain the event payload (if any). Each event may "
3758 "contain a payload, which usually relates to the event class, but for future "
3759 "proofing your code should be written to handle any payload for any event "
3764 #: ../src/guestfs.pod:1903
3766 "C<buf> and C<buf_len> contain a message buffer (if C<buf_len == 0>, then "
3767 "there is no message buffer). Note that this message buffer can contain "
3768 "arbitrary 8 bit data, including NUL bytes."
3772 #: ../src/guestfs.pod:1907
3774 "C<array> and C<array_len> is an array of 64 bit unsigned integers. At the "
3775 "moment this is only used for progress messages."
3779 #: ../src/guestfs.pod:1910
3780 msgid "EXAMPLE: CAPTURING LOG MESSAGES"
3784 #: ../src/guestfs.pod:1912
3786 "One motivation for the generic event API was to allow GUI programs to "
3787 "capture debug and other messages. In libguestfs E<le> 1.8 these were sent "
3788 "unconditionally to C<stderr>."
3792 #: ../src/guestfs.pod:1916
3794 "Events associated with log messages are: C<GUESTFS_EVENT_LIBRARY>, "
3795 "C<GUESTFS_EVENT_APPLIANCE> and C<GUESTFS_EVENT_TRACE>. (Note that error "
3796 "messages are not events; you must capture error messages separately)."
3800 #: ../src/guestfs.pod:1921
3802 "Programs have to set up a callback to capture the classes of events of "
3807 #: ../src/guestfs.pod:1924
3811 " guestfs_set_event_callback\n"
3812 " (g, message_callback,\n"
3813 " GUESTFS_EVENT_LIBRARY|GUESTFS_EVENT_APPLIANCE|\n"
3814 " GUESTFS_EVENT_TRACE,\n"
3815 " 0, NULL) == -1)\n"
3816 " if (eh == -1) {\n"
3817 " // handle error in the usual way\n"
3823 #: ../src/guestfs.pod:1934
3825 "The callback can then direct messages to the appropriate place. In this "
3826 "example, messages are directed to syslog:"
3830 #: ../src/guestfs.pod:1937
3834 " message_callback (\n"
3837 " uint64_t event,\n"
3838 " int event_handle,\n"
3840 " const char *buf, size_t buf_len,\n"
3841 " const uint64_t *array, size_t array_len)\n"
3843 " const int priority = LOG_USER|LOG_INFO;\n"
3844 " if (buf_len > 0)\n"
3845 " syslog (priority, \"event 0x%lx: %s\", event, buf);\n"
3851 #: ../src/guestfs.pod:1952
3852 msgid "PRIVATE DATA AREA"
3856 #: ../src/guestfs.pod:1954
3858 "You can attach named pieces of private data to the libguestfs handle, fetch "
3859 "them by name, and walk over them, for the lifetime of the handle. This is "
3860 "called the private data area and is only available from the C API."
3864 #: ../src/guestfs.pod:1959
3865 msgid "To attach a named piece of data, use the following call:"
3869 #: ../src/guestfs.pod:1961
3872 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
3877 #: ../src/guestfs.pod:1963
3879 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
3880 "pointer (which can be C<NULL>). Any previous item with the same key is "
3885 #: ../src/guestfs.pod:1967
3887 "You can use any C<key> you want, but your key should I<not> start with an "
3888 "underscore character. Keys beginning with an underscore character are "
3889 "reserved for internal libguestfs purposes (eg. for implementing language "
3890 "bindings). It is recommended that you prefix the key with some unique "
3891 "string to avoid collisions with other users."
3895 #: ../src/guestfs.pod:1973
3896 msgid "To retrieve the pointer, use:"
3900 #: ../src/guestfs.pod:1975
3903 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
3908 #: ../src/guestfs.pod:1977
3910 "This function returns C<NULL> if either no data is found associated with "
3911 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
3916 #: ../src/guestfs.pod:1981
3918 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
3919 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
3920 "all. In particular, libguestfs does I<not> try to free the data when the "
3921 "handle is closed. If the data must be freed, then the caller must either "
3922 "free it before calling L</guestfs_close> or must set up a close callback to "
3923 "do it (see L</GUESTFS_EVENT_CLOSE>)."
3927 #: ../src/guestfs.pod:1988
3928 msgid "To walk over all entries, use these two functions:"
3932 #: ../src/guestfs.pod:1990
3935 " void *guestfs_first_private (guestfs_h *g, const char **key_rtn);\n"
3940 #: ../src/guestfs.pod:1992
3943 " void *guestfs_next_private (guestfs_h *g, const char **key_rtn);\n"
3948 #: ../src/guestfs.pod:1994
3950 "C<guestfs_first_private> returns the first key, pointer pair (\"first\" does "
3951 "not have any particular meaning -- keys are not returned in any defined "
3952 "order). A pointer to the key is returned in C<*key_rtn> and the "
3953 "corresponding data pointer is returned from the function. C<NULL> is "
3954 "returned if there are no keys stored in the handle."
3958 #: ../src/guestfs.pod:2000
3960 "C<guestfs_next_private> returns the next key, pointer pair. The return "
3961 "value of this function is also C<NULL> is there are no further entries to "
3966 #: ../src/guestfs.pod:2004
3967 msgid "Notes about walking over entries:"
3971 #: ../src/guestfs.pod:2010
3973 "You must not call C<guestfs_set_private> while walking over the entries."
3977 #: ../src/guestfs.pod:2015
3979 "The handle maintains an internal iterator which is reset when you call "
3980 "C<guestfs_first_private>. This internal iterator is invalidated when you "
3981 "call C<guestfs_set_private>."
3985 #: ../src/guestfs.pod:2021
3986 msgid "If you have set the data pointer associated with a key to C<NULL>, ie:"
3990 #: ../src/guestfs.pod:2023
3993 " guestfs_set_private (g, key, NULL);\n"
3998 #: ../src/guestfs.pod:2025
3999 msgid "then that C<key> is not returned when walking."
4003 #: ../src/guestfs.pod:2029
4005 "C<*key_rtn> is only valid until the next call to C<guestfs_first_private>, "
4006 "C<guestfs_next_private> or C<guestfs_set_private>."
4010 #: ../src/guestfs.pod:2035
4012 "The following example code shows how to print all keys and data pointers "
4013 "that are associated with the handle C<g>:"
4017 #: ../src/guestfs.pod:2038
4020 " const char *key;\n"
4021 " void *data = guestfs_first_private (g, &key);\n"
4022 " while (data != NULL)\n"
4024 " printf (\"key = %s, data = %p\\n\", key, data);\n"
4025 " data = guestfs_next_private (g, &key);\n"
4031 #: ../src/guestfs.pod:2046
4033 "More commonly you are only interested in keys that begin with an application-"
4034 "specific prefix C<foo_>. Modify the loop like so:"
4038 #: ../src/guestfs.pod:2049
4041 " const char *key;\n"
4042 " void *data = guestfs_first_private (g, &key);\n"
4043 " while (data != NULL)\n"
4045 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
4046 " printf (\"key = %s, data = %p\\n\", key, data);\n"
4047 " data = guestfs_next_private (g, &key);\n"
4053 #: ../src/guestfs.pod:2058
4055 "If you need to modify keys while walking, then you have to jump back to the "
4056 "beginning of the loop. For example, to delete all keys prefixed with "
4061 #: ../src/guestfs.pod:2062
4064 " const char *key;\n"
4067 " data = guestfs_first_private (g, &key);\n"
4068 " while (data != NULL)\n"
4070 " if (strncmp (key, \"foo_\", strlen (\"foo_\")) == 0)\n"
4072 " guestfs_set_private (g, key, NULL);\n"
4073 " /* note that 'key' pointer is now invalid, and so is\n"
4074 " the internal iterator */\n"
4077 " data = guestfs_next_private (g, &key);\n"
4083 #: ../src/guestfs.pod:2078
4085 "Note that the above loop is guaranteed to terminate because the keys are "
4086 "being deleted, but other manipulations of keys within the loop might not "
4087 "terminate unless you also maintain an indication of which keys have been "
4092 #: ../src/guestfs.pod:2083 ../src/guestfs.pod:2088
4097 #: ../src/guestfs.pod:2085
4099 "<!-- old anchor for the next section --> <a name="
4100 "\"state_machine_and_low_level_event_api\"/>"
4102 "<!-- old anchor for the next section --> <a name="
4103 "\"state_machine_and_low_level_event_api\"/>"
4106 #: ../src/guestfs.pod:2090
4107 msgid "ARCHITECTURE"
4108 msgstr "АРХІТЕКТУРА"
4111 #: ../src/guestfs.pod:2092
4113 "Internally, libguestfs is implemented by running an appliance (a special "
4114 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
4115 "process of the main program."
4119 #: ../src/guestfs.pod:2096
4122 " ___________________\n"
4124 " | main program |\n"
4126 " | | child process / appliance\n"
4127 " | | __________________________\n"
4129 " +-------------------+ RPC | +-----------------+ |\n"
4130 " | libguestfs <--------------------> guestfsd | |\n"
4131 " | | | +-----------------+ |\n"
4132 " \\___________________/ | | Linux kernel | |\n"
4133 " | +--^--------------+ |\n"
4134 " \\_________|________________/\n"
4140 " \\______________/\n"
4145 #: ../src/guestfs.pod:2116
4147 "The library, linked to the main program, creates the child process and hence "
4148 "the appliance in the L</guestfs_launch> function."
4152 #: ../src/guestfs.pod:2119
4154 "Inside the appliance is a Linux kernel and a complete stack of userspace "
4155 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
4156 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
4157 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
4158 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
4159 "attached to the qemu process which translates device access by the "
4160 "appliance's Linux kernel into accesses to the image."
4164 #: ../src/guestfs.pod:2128
4166 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
4167 "Although the disk image you are attached to might also be used by some "
4168 "virtual machine, libguestfs doesn't know or care about this. (But you will "
4169 "care if both libguestfs's qemu process and your virtual machine are trying "
4170 "to update the disk image at the same time, since these usually results in "
4171 "massive disk corruption)."
4175 #: ../src/guestfs.pod:2135
4176 msgid "STATE MACHINE"
4177 msgstr "СКІНЧЕННИЙ АВТОМАТ"
4180 #: ../src/guestfs.pod:2137
4181 msgid "libguestfs uses a state machine to model the child process:"
4185 #: ../src/guestfs.pod:2139
4197 " / | \\ \\ guestfs_launch\n"
4198 " / | _\\__V______\n"
4200 " / | | LAUNCHING |\n"
4201 " / | \\___________/\n"
4203 " / | guestfs_launch\n"
4205 " ______ / __|____V\n"
4206 " / \\ ------> / \\\n"
4207 " | BUSY | | READY |\n"
4208 " \\______/ <------ \\________/\n"
4213 #: ../src/guestfs.pod:2161
4215 "The normal transitions are (1) CONFIG (when the handle is created, but there "
4216 "is no child process), (2) LAUNCHING (when the child process is booting up), "
4217 "(3) alternating between READY and BUSY as commands are issued to, and "
4218 "carried out by, the child process."
4222 #: ../src/guestfs.pod:2166
4224 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
4225 "asynchronously at any time (eg. due to some internal error), and that causes "
4226 "the state to transition back to CONFIG."
4230 #: ../src/guestfs.pod:2170
4232 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
4233 "issued when in the CONFIG state."
4237 #: ../src/guestfs.pod:2173
4239 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
4240 "L</guestfs_launch> blocks until the child process is READY to accept "
4241 "commands (or until some failure or timeout). L</guestfs_launch> internally "
4242 "moves the state from CONFIG to LAUNCHING while it is running."
4246 #: ../src/guestfs.pod:2179
4248 "API actions such as L</guestfs_mount> can only be issued when in the READY "
4249 "state. These API calls block waiting for the command to be carried out (ie. "
4250 "the state to transition to BUSY and then back to READY). There are no non-"
4251 "blocking versions, and no way to issue more than one command per handle at "
4256 #: ../src/guestfs.pod:2185
4258 "Finally, the child process sends asynchronous messages back to the main "
4259 "program, such as kernel log messages. You can register a callback to "
4260 "receive these messages."
4264 #: ../src/guestfs.pod:2189
4269 #: ../src/guestfs.pod:2191
4270 msgid "COMMUNICATION PROTOCOL"
4274 #: ../src/guestfs.pod:2193
4276 "Don't rely on using this protocol directly. This section documents how it "
4277 "currently works, but it may change at any time."
4281 #: ../src/guestfs.pod:2196
4283 "The protocol used to talk between the library and the daemon running inside "
4284 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
4285 "1014, RFC 1832, RFC 4506)."
4289 #: ../src/guestfs.pod:2200
4291 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
4292 "this file is automatically generated)."
4296 #: ../src/guestfs.pod:2203
4298 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
4299 "and C<FileOut> parameters, which are handled with very simple request/reply "
4300 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
4301 "parameters, which use the same request and reply messages, but they may also "
4302 "be followed by files sent using a chunked encoding."
4306 #: ../src/guestfs.pod:2210
4307 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
4311 #: ../src/guestfs.pod:2212
4312 msgid "For ordinary functions, the request message is:"
4316 #: ../src/guestfs.pod:2214
4319 " total length (header + arguments,\n"
4320 " but not including the length word itself)\n"
4321 " struct guestfs_message_header (encoded as XDR)\n"
4322 " struct guestfs_<foo>_args (encoded as XDR)\n"
4327 #: ../src/guestfs.pod:2219
4329 "The total length field allows the daemon to allocate a fixed size buffer "
4330 "into which it slurps the rest of the message. As a result, the total length "
4331 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
4332 "effective size of any request is limited to somewhere under this size."
4336 #: ../src/guestfs.pod:2225
4338 "Note also that many functions don't take any arguments, in which case the "
4339 "C<guestfs_I<foo>_args> is completely omitted."
4343 #: ../src/guestfs.pod:2228
4345 "The header contains the procedure number (C<guestfs_proc>) which is how the "
4346 "receiver knows what type of args structure to expect, or none at all."
4350 #: ../src/guestfs.pod:2232
4352 "For functions that take optional arguments, the optional arguments are "
4353 "encoded in the C<guestfs_I<foo>_args> structure in the same way as ordinary "
4354 "arguments. A bitmask in the header indicates which optional arguments are "
4355 "meaningful. The bitmask is also checked to see if it contains bits set "
4356 "which the daemon does not know about (eg. if more optional arguments were "
4357 "added in a later version of the library), and this causes the call to be "
4362 #: ../src/guestfs.pod:2240
4363 msgid "The reply message for ordinary functions is:"
4367 #: ../src/guestfs.pod:2242
4370 " total length (header + ret,\n"
4371 " but not including the length word itself)\n"
4372 " struct guestfs_message_header (encoded as XDR)\n"
4373 " struct guestfs_<foo>_ret (encoded as XDR)\n"
4378 #: ../src/guestfs.pod:2247
4380 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
4381 "functions that return no formal return values."
4385 #: ../src/guestfs.pod:2250
4387 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
4391 #: ../src/guestfs.pod:2253
4393 "In the case of an error, a flag is set in the header, and the reply message "
4394 "is slightly changed:"
4398 #: ../src/guestfs.pod:2256
4401 " total length (header + error,\n"
4402 " but not including the length word itself)\n"
4403 " struct guestfs_message_header (encoded as XDR)\n"
4404 " struct guestfs_message_error (encoded as XDR)\n"
4409 #: ../src/guestfs.pod:2261
4411 "The C<guestfs_message_error> structure contains the error message as a "
4416 #: ../src/guestfs.pod:2264
4417 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
4421 #: ../src/guestfs.pod:2266
4423 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
4424 "The normal request message is sent (see above). However this is followed by "
4425 "a sequence of file chunks."
4429 #: ../src/guestfs.pod:2270
4432 " total length (header + arguments,\n"
4433 " but not including the length word itself,\n"
4434 " and not including the chunks)\n"
4435 " struct guestfs_message_header (encoded as XDR)\n"
4436 " struct guestfs_<foo>_args (encoded as XDR)\n"
4437 " sequence of chunks for FileIn param #0\n"
4438 " sequence of chunks for FileIn param #1 etc.\n"
4443 #: ../src/guestfs.pod:2278
4444 msgid "The \"sequence of chunks\" is:"
4448 #: ../src/guestfs.pod:2280
4451 " length of chunk (not including length word itself)\n"
4452 " struct guestfs_chunk (encoded as XDR)\n"
4453 " length of chunk\n"
4454 " struct guestfs_chunk (encoded as XDR)\n"
4456 " length of chunk\n"
4457 " struct guestfs_chunk (with data.data_len == 0)\n"
4462 #: ../src/guestfs.pod:2288
4464 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
4465 "is set in the final chunk to indicate either successful completion or early "
4470 #: ../src/guestfs.pod:2292
4472 "At time of writing there are no functions that have more than one FileIn "
4473 "parameter. However this is (theoretically) supported, by sending the "
4474 "sequence of chunks for each FileIn parameter one after another (from left to "
4479 #: ../src/guestfs.pod:2297
4481 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
4482 "transfer. The library does this by sending a chunk with a special flag set "
4483 "to indicate cancellation. When the daemon sees this, it cancels the whole "
4484 "RPC, does I<not> send any reply, and goes back to reading the next request."
4488 #: ../src/guestfs.pod:2303
4490 "The daemon may also cancel. It does this by writing a special word "
4491 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
4492 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
4493 "cancel chunk). The special word is chosen so that even if cancellation "
4494 "happens right at the end of the transfer (after the library has finished "
4495 "writing and has started listening for the reply), the \"spurious\" cancel "
4496 "flag will not be confused with the reply message."
4500 #: ../src/guestfs.pod:2312
4502 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
4503 "limit), and also files where the size is not known in advance (eg. from "
4504 "pipes or sockets). However the chunks are rather small "
4505 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
4506 "to keep much in memory."
4510 #: ../src/guestfs.pod:2318
4511 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
4515 #: ../src/guestfs.pod:2320
4517 "The protocol for FileOut parameters is exactly the same as for FileIn "
4518 "parameters, but with the roles of daemon and library reversed."
4522 #: ../src/guestfs.pod:2323
4525 " total length (header + ret,\n"
4526 " but not including the length word itself,\n"
4527 " and not including the chunks)\n"
4528 " struct guestfs_message_header (encoded as XDR)\n"
4529 " struct guestfs_<foo>_ret (encoded as XDR)\n"
4530 " sequence of chunks for FileOut param #0\n"
4531 " sequence of chunks for FileOut param #1 etc.\n"
4536 #: ../src/guestfs.pod:2331
4537 msgid "INITIAL MESSAGE"
4541 #: ../src/guestfs.pod:2333
4543 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
4544 "which indicates that the guest and daemon is alive. This is what L</"
4545 "guestfs_launch> waits for."
4549 #: ../src/guestfs.pod:2337
4550 msgid "PROGRESS NOTIFICATION MESSAGES"
4554 #: ../src/guestfs.pod:2339
4556 "The daemon may send progress notification messages at any time. These are "
4557 "distinguished by the normal length word being replaced by "
4558 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
4562 #: ../src/guestfs.pod:2343
4564 "The library turns them into progress callbacks (see L</"
4565 "GUESTFS_EVENT_PROGRESS>) if there is a callback registered, or discards them "
4570 #: ../src/guestfs.pod:2347
4572 "The daemon self-limits the frequency of progress messages it sends (see "
4573 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
4578 #: ../src/guestfs.pod:2351
4579 msgid "LIBGUESTFS VERSION NUMBERS"
4583 #: ../src/guestfs.pod:2353
4585 "Since April 2010, libguestfs has started to make separate development and "
4586 "stable releases, along with corresponding branches in our git repository. "
4587 "These separate releases can be identified by version number:"
4591 #: ../src/guestfs.pod:2358
4594 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
4595 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
4601 " | `-------- sub-version\n"
4603 " `------ always '1' because we don't change the ABI\n"
4608 #: ../src/guestfs.pod:2369
4609 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
4613 #: ../src/guestfs.pod:2371
4615 "As time passes we cherry pick fixes from the development branch and backport "
4616 "those into the stable branch, the effect being that the stable branch should "
4617 "get more stable and less buggy over time. So the stable releases are ideal "
4618 "for people who don't need new features but would just like the software to "
4623 #: ../src/guestfs.pod:2377
4624 msgid "Our criteria for backporting changes are:"
4628 #: ../src/guestfs.pod:2383
4630 "Documentation changes which don't affect any code are backported unless the "
4631 "documentation refers to a future feature which is not in stable."
4635 #: ../src/guestfs.pod:2389
4637 "Bug fixes which are not controversial, fix obvious problems, and have been "
4638 "well tested are backported."
4642 #: ../src/guestfs.pod:2394
4644 "Simple rearrangements of code which shouldn't affect how it works get "
4645 "backported. This is so that the code in the two branches doesn't get too "
4646 "far out of step, allowing us to backport future fixes more easily."
4650 #: ../src/guestfs.pod:2400
4652 "We I<don't> backport new features, new APIs, new tools etc, except in one "
4653 "exceptional case: the new feature is required in order to implement an "
4654 "important bug fix."
4658 #: ../src/guestfs.pod:2406
4660 "A new stable branch starts when we think the new features in development are "
4661 "substantial and compelling enough over the current stable branch to warrant "
4662 "it. When that happens we create new stable and development versions 1.N.0 "
4663 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
4664 "stable at this point, but by backporting fixes from development, that branch "
4665 "will stabilize over time."
4669 #: ../src/guestfs.pod:2414
4670 msgid "EXTENDING LIBGUESTFS"
4674 #: ../src/guestfs.pod:2416
4675 msgid "ADDING A NEW API ACTION"
4679 #: ../src/guestfs.pod:2418
4681 "Large amounts of boilerplate code in libguestfs (RPC, bindings, "
4682 "documentation) are generated, and this makes it easy to extend the "
4687 #: ../src/guestfs.pod:2422
4688 msgid "To add a new API action there are two changes:"
4692 #: ../src/guestfs.pod:2428
4694 "You need to add a description of the call (name, parameters, return type, "
4695 "tests, documentation) to C<generator/generator_actions.ml>."
4699 #: ../src/guestfs.pod:2431
4701 "There are two sorts of API action, depending on whether the call goes "
4702 "through to the daemon in the appliance, or is serviced entirely by the "
4703 "library (see L</ARCHITECTURE> above). L</guestfs_sync> is an example of the "
4704 "former, since the sync is done in the appliance. L</guestfs_set_trace> is "
4705 "an example of the latter, since a trace flag is maintained in the handle and "
4706 "all tracing is done on the library side."
4710 #: ../src/guestfs.pod:2439
4712 "Most new actions are of the first type, and get added to the "
4713 "C<daemon_functions> list. Each function has a unique procedure number used "
4714 "in the RPC protocol which is assigned to that action when we publish "
4715 "libguestfs and cannot be reused. Take the latest procedure number and "
4720 #: ../src/guestfs.pod:2445
4722 "For library-only actions of the second type, add to the "
4723 "C<non_daemon_functions> list. Since these functions are serviced by the "
4724 "library and do not travel over the RPC mechanism to the daemon, these "
4725 "functions do not need a procedure number, and so the procedure number is set "
4730 #: ../src/guestfs.pod:2453
4731 msgid "Implement the action (in C):"
4735 #: ../src/guestfs.pod:2455
4737 "For daemon actions, implement the function C<do_E<lt>nameE<gt>> in the "
4738 "C<daemon/> directory."
4742 #: ../src/guestfs.pod:2458
4744 "For library actions, implement the function C<guestfs__E<lt>nameE<gt>> "
4745 "(note: double underscore) in the C<src/> directory."
4749 #: ../src/guestfs.pod:2461
4750 msgid "In either case, use another function as an example of what to do."
4754 #: ../src/guestfs.pod:2465
4755 msgid "After making these changes, use C<make> to compile."
4759 #: ../src/guestfs.pod:2467
4761 "Note that you don't need to implement the RPC, language bindings, manual "
4762 "pages or anything else. It's all automatically generated from the OCaml "
4767 #: ../src/guestfs.pod:2471
4768 msgid "ADDING TESTS FOR AN API ACTION"
4772 #: ../src/guestfs.pod:2473
4774 "You can supply zero or as many tests as you want per API call. The tests "
4775 "can either be added as part of the API description (C<generator/"
4776 "generator_actions.ml>), or in some rarer cases you may want to drop a script "
4777 "into C<regressions/>. Note that adding a script to C<regressions/> is "
4778 "slower, so if possible use the first method."
4782 #: ../src/guestfs.pod:2479
4784 "The following describes the test environment used when you add an API test "
4785 "in C<generator_actions.ml>."
4789 #: ../src/guestfs.pod:2482
4790 msgid "The test environment has 4 block devices:"
4794 #: ../src/guestfs.pod:2486
4795 msgid "C</dev/sda> 500MB"
4799 #: ../src/guestfs.pod:2488
4800 msgid "General block device for testing."
4804 #: ../src/guestfs.pod:2490
4805 msgid "C</dev/sdb> 50MB"
4809 #: ../src/guestfs.pod:2492
4811 "C</dev/sdb1> is an ext2 filesystem used for testing filesystem write "
4816 #: ../src/guestfs.pod:2495
4817 msgid "C</dev/sdc> 10MB"
4821 #: ../src/guestfs.pod:2497
4822 msgid "Used in a few tests where two block devices are needed."
4826 #: ../src/guestfs.pod:2499
4828 msgstr "C</dev/sdd>"
4831 #: ../src/guestfs.pod:2501
4832 msgid "ISO with fixed content (see C<images/test.iso>)."
4836 #: ../src/guestfs.pod:2505
4838 "To be able to run the tests in a reasonable amount of time, the libguestfs "
4839 "appliance and block devices are reused between tests. So don't try testing "
4840 "L</guestfs_kill_subprocess> :-x"
4844 #: ../src/guestfs.pod:2509
4846 "Each test starts with an initial scenario, selected using one of the "
4847 "C<Init*> expressions, described in C<generator/generator_types.ml>. These "
4848 "initialize the disks mentioned above in a particular way as documented in "
4849 "C<generator_types.ml>. You should not assume anything about the previous "
4850 "contents of other disks that are not initialized."
4854 #: ../src/guestfs.pod:2515
4856 "You can add a prerequisite clause to any individual test. This is a run-"
4857 "time check, which, if it fails, causes the test to be skipped. Useful if "
4858 "testing a command which might not work on all variations of libguestfs "
4859 "builds. A test that has prerequisite of C<Always> means to run "
4864 #: ../src/guestfs.pod:2521
4866 "In addition, packagers can skip individual tests by setting environment "
4867 "variables before running C<make check>."
4871 #: ../src/guestfs.pod:2524
4874 " SKIP_TEST_<CMD>_<NUM>=1\n"
4879 #: ../src/guestfs.pod:2526
4880 msgid "eg: C<SKIP_TEST_COMMAND_3=1> skips test #3 of L</guestfs_command>."
4884 #: ../src/guestfs.pod:2528
4889 #: ../src/guestfs.pod:2530
4892 " SKIP_TEST_<CMD>=1\n"
4897 #: ../src/guestfs.pod:2532
4898 msgid "eg: C<SKIP_TEST_ZEROFREE=1> skips all L</guestfs_zerofree> tests."
4902 #: ../src/guestfs.pod:2534
4903 msgid "Packagers can run only certain tests by setting for example:"
4907 #: ../src/guestfs.pod:2536
4910 " TEST_ONLY=\"vfs_type zerofree\"\n"
4915 #: ../src/guestfs.pod:2538
4917 "See C<capitests/tests.c> for more details of how these environment variables "
4922 #: ../src/guestfs.pod:2541
4923 msgid "DEBUGGING NEW API ACTIONS"
4927 #: ../src/guestfs.pod:2543
4928 msgid "Test new actions work before submitting them."
4932 #: ../src/guestfs.pod:2545
4933 msgid "You can use guestfish to try out new commands."
4937 #: ../src/guestfs.pod:2547
4939 "Debugging the daemon is a problem because it runs inside a minimal "
4940 "environment. However you can fprintf messages in the daemon to stderr, and "
4941 "they will show up if you use C<guestfish -v>."
4945 #: ../src/guestfs.pod:2551
4946 msgid "FORMATTING CODE AND OTHER CONVENTIONS"
4950 #: ../src/guestfs.pod:2553
4952 "Our C source code generally adheres to some basic code-formatting "
4953 "conventions. The existing code base is not totally consistent on this "
4954 "front, but we do prefer that contributed code be formatted similarly. In "
4955 "short, use spaces-not-TABs for indentation, use 2 spaces for each "
4956 "indentation level, and other than that, follow the K&R style."
4960 #: ../src/guestfs.pod:2559
4962 "If you use Emacs, add the following to one of one of your start-up files (e."
4963 "g., ~/.emacs), to help ensure that you get indentation right:"
4967 #: ../src/guestfs.pod:2562
4970 " ;;; In libguestfs, indent with spaces everywhere (not TABs).\n"
4971 " ;;; Exceptions: Makefile and ChangeLog modes.\n"
4972 " (add-hook 'find-file-hook\n"
4973 " '(lambda () (if (and buffer-file-name\n"
4974 " (string-match \"/libguestfs\\\\>\"\n"
4975 " (buffer-file-name))\n"
4976 " (not (string-equal mode-name \"Change Log\"))\n"
4977 " (not (string-equal mode-name \"Makefile\")))\n"
4978 " (setq indent-tabs-mode nil))))\n"
4983 #: ../src/guestfs.pod:2572
4986 " ;;; When editing C sources in libguestfs, use this style.\n"
4987 " (defun libguestfs-c-mode ()\n"
4988 " \"C mode with adjusted defaults for use with libguestfs.\"\n"
4990 " (c-set-style \"K&R\")\n"
4991 " (setq c-indent-level 2)\n"
4992 " (setq c-basic-offset 2))\n"
4993 " (add-hook 'c-mode-hook\n"
4994 " '(lambda () (if (string-match \"/libguestfs\\\\>\"\n"
4995 " (buffer-file-name))\n"
4996 " (libguestfs-c-mode))))\n"
5001 #: ../src/guestfs.pod:2584
5002 msgid "Enable warnings when compiling (and fix any problems this finds):"
5006 #: ../src/guestfs.pod:2587
5009 " ./configure --enable-gcc-warnings\n"
5014 #: ../src/guestfs.pod:2589
5015 msgid "Useful targets are:"
5019 #: ../src/guestfs.pod:2591
5022 " make syntax-check # checks the syntax of the C code\n"
5023 " make check # runs the test suite\n"
5028 #: ../src/guestfs.pod:2594
5029 msgid "DAEMON CUSTOM PRINTF FORMATTERS"
5033 #: ../src/guestfs.pod:2596
5035 "In the daemon code we have created custom printf formatters C<%Q> and C<%R>, "
5036 "which are used to do shell quoting."
5040 #: ../src/guestfs.pod:2601
5045 #: ../src/guestfs.pod:2603
5047 "Simple shell quoted string. Any spaces or other shell characters are "
5052 #: ../src/guestfs.pod:2606
5057 #: ../src/guestfs.pod:2608
5059 "Same as C<%Q> except the string is treated as a path which is prefixed by "
5064 #: ../src/guestfs.pod:2613 ../fish/guestfish.pod:242 ../fish/guestfish.pod:615
5065 msgid "For example:"
5069 #: ../src/guestfs.pod:2615
5072 " asprintf (&cmd, \"cat %R\", path);\n"
5077 #: ../src/guestfs.pod:2617
5078 msgid "would produce C<cat /sysroot/some\\ path\\ with\\ spaces>"
5082 #: ../src/guestfs.pod:2619
5084 "I<Note:> Do I<not> use these when you are passing parameters to the C<command"
5085 "{,r,v,rv}()> functions. These parameters do NOT need to be quoted because "
5086 "they are not passed via the shell (instead, straight to exec). You probably "
5087 "want to use the C<sysroot_path()> function however."
5091 #: ../src/guestfs.pod:2625
5092 msgid "SUBMITTING YOUR NEW API ACTIONS"
5096 #: ../src/guestfs.pod:2627
5098 "Submit patches to the mailing list: L<http://www.redhat.com/mailman/listinfo/"
5099 "libguestfs> and CC to L<rjones@redhat.com>."
5103 #: ../src/guestfs.pod:2631
5104 msgid "INTERNATIONALIZATION (I18N) SUPPORT"
5108 #: ../src/guestfs.pod:2633
5109 msgid "We support i18n (gettext anyhow) in the library."
5113 #: ../src/guestfs.pod:2635
5115 "However many messages come from the daemon, and we don't translate those at "
5116 "the moment. One reason is that the appliance generally has all locale files "
5117 "removed from it, because they take up a lot of space. So we'd have to readd "
5118 "some of those, as well as copying our PO files into the appliance."
5122 #: ../src/guestfs.pod:2641
5124 "Debugging messages are never translated, since they are intended for the "
5129 #: ../src/guestfs.pod:2644
5130 msgid "SOURCE CODE SUBDIRECTORIES"
5134 #: ../src/guestfs.pod:2648 ../src/guestfs-actions.pod:5847
5135 #: ../fish/guestfish-actions.pod:3932
5136 msgid "C<appliance>"
5137 msgstr "C<appliance>"
5140 #: ../src/guestfs.pod:2650
5141 msgid "The libguestfs appliance, build scripts and so on."
5145 #: ../src/guestfs.pod:2652
5146 msgid "C<capitests>"
5147 msgstr "C<capitests>"
5150 #: ../src/guestfs.pod:2654
5151 msgid "Automated tests of the C API."
5155 #: ../src/guestfs.pod:2656
5160 #: ../src/guestfs.pod:2658
5162 "The L<virt-cat(1)>, L<virt-filesystems(1)> and L<virt-ls(1)> commands and "
5167 #: ../src/guestfs.pod:2661
5172 #: ../src/guestfs.pod:2663
5173 msgid "Outside contributions, experimental parts."
5177 #: ../src/guestfs.pod:2665
5182 #: ../src/guestfs.pod:2667
5184 "The daemon that runs inside the libguestfs appliance and carries out actions."
5188 #: ../src/guestfs.pod:2670
5193 #: ../src/guestfs.pod:2672
5194 msgid "L<virt-df(1)> command and documentation."
5198 #: ../src/guestfs.pod:2674
5203 #: ../src/guestfs.pod:2676
5204 msgid "L<virt-edit(1)> command and documentation."
5208 #: ../src/guestfs.pod:2678
5210 msgstr "C<examples>"
5213 #: ../src/guestfs.pod:2680
5214 msgid "C API example code."
5215 msgstr "Код прикладів використання програмного інтерфейсу мовою C."
5218 #: ../src/guestfs.pod:2682
5223 #: ../src/guestfs.pod:2684
5225 "L<guestfish(1)>, the command-line shell, and various shell scripts built on "
5226 "top such as L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, "
5227 "L<virt-tar-out(1)>."
5231 #: ../src/guestfs.pod:2688
5236 #: ../src/guestfs.pod:2690
5238 "L<guestmount(1)>, FUSE (userspace filesystem) built on top of libguestfs."
5242 #: ../src/guestfs.pod:2692
5243 msgid "C<generator>"
5244 msgstr "C<generator>"
5247 #: ../src/guestfs.pod:2694
5249 "The crucially important generator, used to automatically generate large "
5250 "amounts of boilerplate C code for things like RPC and bindings."
5254 #: ../src/guestfs.pod:2697
5259 #: ../src/guestfs.pod:2699
5260 msgid "Files used by the test suite."
5264 #: ../src/guestfs.pod:2701
5265 msgid "Some \"phony\" guest images which we test against."
5269 #: ../src/guestfs.pod:2703
5270 msgid "C<inspector>"
5271 msgstr "C<inspector>"
5274 #: ../src/guestfs.pod:2705
5275 msgid "L<virt-inspector(1)>, the virtual machine image inspector."
5279 #: ../src/guestfs.pod:2707
5284 #: ../src/guestfs.pod:2709
5285 msgid "Logo used on the website. The fish is called Arthur by the way."
5289 #: ../src/guestfs.pod:2711
5294 #: ../src/guestfs.pod:2713
5295 msgid "M4 macros used by autoconf."
5299 #: ../src/guestfs.pod:2715
5304 #: ../src/guestfs.pod:2717
5305 msgid "Translations of simple gettext strings."
5306 msgstr "Переклади простих рядків gettext."
5309 #: ../src/guestfs.pod:2719
5314 #: ../src/guestfs.pod:2721
5316 "The build infrastructure and PO files for translations of manpages and POD "
5317 "files. Eventually this will be combined with the C<po> directory, but that "
5318 "is rather complicated."
5322 #: ../src/guestfs.pod:2725
5323 msgid "C<regressions>"
5324 msgstr "C<regressions>"
5327 #: ../src/guestfs.pod:2727
5328 msgid "Regression tests."
5329 msgstr "Тести на регресії."
5332 #: ../src/guestfs.pod:2729
5337 #: ../src/guestfs.pod:2731
5338 msgid "L<virt-rescue(1)> command and documentation."
5342 #: ../src/guestfs.pod:2733
5347 #: ../src/guestfs.pod:2735
5348 msgid "Source code to the C library."
5352 #: ../src/guestfs.pod:2737
5357 #: ../src/guestfs.pod:2739
5358 msgid "Command line tools written in Perl (L<virt-resize(1)> and many others)."
5362 #: ../src/guestfs.pod:2741
5363 msgid "C<test-tool>"
5364 msgstr "C<test-tool>"
5367 #: ../src/guestfs.pod:2743
5369 "Test tool for end users to test if their qemu/kernel combination will work "
5374 #: ../src/guestfs.pod:2746
5379 #: ../src/guestfs.pod:2748
5384 #: ../src/guestfs.pod:2750
5389 #: ../src/guestfs.pod:2752
5394 #: ../src/guestfs.pod:2754
5399 #: ../src/guestfs.pod:2756
5404 #: ../src/guestfs.pod:2758
5409 #: ../src/guestfs.pod:2760
5414 #: ../src/guestfs.pod:2762
5415 msgid "Language bindings."
5416 msgstr "Прив’язки до мов програмування."
5419 #: ../src/guestfs.pod:2766
5424 #: ../src/guestfs.pod:2768
5425 msgid "PROTOCOL LIMITS"
5429 #: ../src/guestfs.pod:2770
5431 "Internally libguestfs uses a message-based protocol to pass API calls and "
5432 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
5433 "plenty more detail about this). The maximum message size used by the "
5434 "protocol is slightly less than 4 MB. For some API calls you may need to be "
5435 "aware of this limit. The API calls which may be affected are individually "
5436 "documented, with a link back to this section of the documentation."
5440 #: ../src/guestfs.pod:2778
5442 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
5443 "a simple string. Because this string is at some point internally encoded as "
5444 "a message, the maximum size that it can return is slightly under 4 MB. If "
5445 "the requested file is larger than this then you will get an error."
5449 #: ../src/guestfs.pod:2784
5451 "In order to transfer large files into and out of the guest filesystem, you "
5452 "need to use particular calls that support this. The sections L</UPLOADING> "
5453 "and L</DOWNLOADING> document how to do this."
5457 #: ../src/guestfs.pod:2788
5459 "You might also consider mounting the disk image using our FUSE filesystem "
5460 "support (L<guestmount(1)>)."
5464 #: ../src/guestfs.pod:2791
5465 msgid "MAXIMUM NUMBER OF DISKS"
5469 #: ../src/guestfs.pod:2793
5470 msgid "When using virtio disks (the default) the current limit is B<25> disks."
5474 #: ../src/guestfs.pod:2796
5476 "Virtio itself consumes 1 virtual PCI slot per disk, and PCI is limited to 31 "
5477 "slots. However febootstrap only understands disks with names C</dev/vda> "
5478 "through C</dev/vdz> (26 letters) and it reserves one disk for its own "
5483 #: ../src/guestfs.pod:2801
5485 "We are working to substantially raise this limit in future versions but it "
5486 "requires complex changes to qemu."
5490 #: ../src/guestfs.pod:2804
5492 "In future versions of libguestfs it should also be possible to \"hot plug\" "
5493 "disks (add and remove disks after calling L</guestfs_launch>). This also "
5494 "requires changes to qemu."
5498 #: ../src/guestfs.pod:2808
5499 msgid "MAXIMUM NUMBER OF PARTITIONS PER DISK"
5503 #: ../src/guestfs.pod:2810
5504 msgid "Virtio limits the maximum number of partitions per disk to B<15>."
5508 #: ../src/guestfs.pod:2812
5510 "This is because it reserves 4 bits for the minor device number (thus C</dev/"
5511 "vda>, and C</dev/vda1> through C</dev/vda15>)."
5515 #: ../src/guestfs.pod:2815
5517 "If you attach a disk with more than 15 partitions, the extra partitions are "
5518 "ignored by libguestfs."
5522 #: ../src/guestfs.pod:2818
5523 msgid "MAXIMUM SIZE OF A DISK"
5527 #: ../src/guestfs.pod:2820
5528 msgid "Probably the limit is between 2**63-1 and 2**64-1 bytes."
5532 #: ../src/guestfs.pod:2822
5534 "We have tested block devices up to 1 exabyte (2**60 or "
5535 "1,152,921,504,606,846,976 bytes) using sparse files backed by an XFS host "
5540 #: ../src/guestfs.pod:2826
5542 "Although libguestfs probably does not impose any limit, the underlying host "
5543 "storage will. If you store disk images on a host ext4 filesystem, then the "
5544 "maximum size will be limited by the maximum ext4 file size (currently 16 "
5545 "TB). If you store disk images as host logical volumes then you are limited "
5546 "by the maximum size of an LV."
5550 #: ../src/guestfs.pod:2832
5552 "For the hugest disk image files, we recommend using XFS on the host for "
5557 #: ../src/guestfs.pod:2835
5558 msgid "MAXIMUM SIZE OF A PARTITION"
5562 #: ../src/guestfs.pod:2837
5564 "The MBR (ie. classic MS-DOS) partitioning scheme uses 32 bit sector "
5565 "numbers. Assuming a 512 byte sector size, this means that MBR cannot "
5566 "address a partition located beyond 2 TB on the disk."
5570 #: ../src/guestfs.pod:2841
5572 "It is recommended that you use GPT partitions on disks which are larger than "
5573 "this size. GPT uses 64 bit sector numbers and so can address partitions "
5574 "which are theoretically larger than the largest disk we could support."
5578 #: ../src/guestfs.pod:2846
5579 msgid "MAXIMUM SIZE OF A FILESYSTEM, FILES, DIRECTORIES"
5583 #: ../src/guestfs.pod:2848
5585 "This depends on the filesystem type. libguestfs itself does not impose any "
5586 "known limit. Consult Wikipedia or the filesystem documentation to find out "
5587 "what these limits are."
5591 #: ../src/guestfs.pod:2852
5592 msgid "MAXIMUM UPLOAD AND DOWNLOAD"
5596 #: ../src/guestfs.pod:2854
5598 "The API functions L</guestfs_upload>, L</guestfs_download>, L</"
5599 "guestfs_tar_in>, L</guestfs_tar_out> and the like allow unlimited sized "
5600 "uploads and downloads."
5604 #: ../src/guestfs.pod:2858
5606 #| msgid "INSPECTION"
5607 msgid "INSPECTION LIMITS"
5611 #: ../src/guestfs.pod:2860
5613 "The inspection code has several arbitrary limits on things like the size of "
5614 "Windows Registry hive it will read, and the length of product name. These "
5615 "are intended to stop a malicious guest from consuming arbitrary amounts of "
5616 "memory and disk space on the host, and should not be reached in practice. "
5617 "See the source code for more information."
5621 #: ../src/guestfs.pod:2866 ../fish/guestfish.pod:1017
5622 #: ../test-tool/libguestfs-test-tool.pod:82
5623 msgid "ENVIRONMENT VARIABLES"
5624 msgstr "ЗМІННІ СЕРЕДОВИЩА"
5627 #: ../src/guestfs.pod:2870 ../fish/guestfish.pod:1043
5628 msgid "LIBGUESTFS_APPEND"
5632 #: ../src/guestfs.pod:2872 ../fish/guestfish.pod:1045
5633 msgid "Pass additional options to the guest kernel."
5637 #: ../src/guestfs.pod:2874 ../fish/guestfish.pod:1047
5638 msgid "LIBGUESTFS_DEBUG"
5642 #: ../src/guestfs.pod:2876
5644 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
5645 "effect as calling C<guestfs_set_verbose (g, 1)>."
5649 #: ../src/guestfs.pod:2879 ../fish/guestfish.pod:1052
5650 msgid "LIBGUESTFS_MEMSIZE"
5654 #: ../src/guestfs.pod:2881 ../fish/guestfish.pod:1054
5656 "Set the memory allocated to the qemu process, in megabytes. For example:"
5660 #: ../src/guestfs.pod:2884 ../fish/guestfish.pod:1057
5663 " LIBGUESTFS_MEMSIZE=700\n"
5668 #: ../src/guestfs.pod:2886 ../fish/guestfish.pod:1059
5669 msgid "LIBGUESTFS_PATH"
5673 #: ../src/guestfs.pod:2888
5675 "Set the path that libguestfs uses to search for a supermin appliance. See "
5676 "the discussion of paths in section L</PATH> above."
5680 #: ../src/guestfs.pod:2891 ../fish/guestfish.pod:1064
5681 msgid "LIBGUESTFS_QEMU"
5685 #: ../src/guestfs.pod:2893 ../fish/guestfish.pod:1066
5687 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
5688 "which was found at compile time by the configure script is used."
5692 #: ../src/guestfs.pod:2897
5693 msgid "See also L</QEMU WRAPPERS> above."
5697 #: ../src/guestfs.pod:2899 ../fish/guestfish.pod:1070
5698 msgid "LIBGUESTFS_TRACE"
5702 #: ../src/guestfs.pod:2901
5704 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
5705 "effect as calling C<guestfs_set_trace (g, 1)>."
5709 #: ../src/guestfs.pod:2904 ../fish/guestfish.pod:1079
5714 #: ../src/guestfs.pod:2906 ../fish/guestfish.pod:1081
5716 "Location of temporary directory, defaults to C</tmp> except for the cached "
5717 "supermin appliance which defaults to C</var/tmp>."
5721 #: ../src/guestfs.pod:2909 ../fish/guestfish.pod:1084
5723 "If libguestfs was compiled to use the supermin appliance then the real "
5724 "appliance is cached in this directory, shared between all handles belonging "
5725 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
5726 "use in case C</var/tmp> is not large enough."
5730 #: ../src/guestfs.pod:2917 ../fish/guestfish.pod:1151
5731 #: ../test-tool/libguestfs-test-tool.pod:87 ../fuse/guestmount.pod:279
5732 #: ../tools/virt-win-reg.pl:744 ../tools/virt-list-filesystems.pl:189
5733 #: ../tools/virt-tar.pl:286 ../tools/virt-make-fs.pl:539
5734 #: ../tools/virt-list-partitions.pl:257
5736 msgstr "ТАКОЖ ПЕРЕГЛЯНЬТЕ"
5739 #: ../src/guestfs.pod:2919
5741 "L<guestfs-examples(3)>, L<guestfs-ocaml(3)>, L<guestfs-python(3)>, L<guestfs-"
5742 "ruby(3)>, L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-copy-in"
5743 "(1)>, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems"
5744 "(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-"
5745 "partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-"
5746 "tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)>, L<qemu(1)"
5747 ">, L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
5751 #: ../src/guestfs.pod:2946
5753 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
5754 "(8)>, L<disktype(1)>."
5758 #: ../src/guestfs.pod:2953 ../tools/virt-win-reg.pl:759
5759 #: ../tools/virt-make-fs.pl:553
5764 #: ../src/guestfs.pod:2955
5765 msgid "To get a list of bugs against libguestfs use this link:"
5767 "Щоб переглянути список відомих вад у libguestfs, скористайтеся таким "
5771 #: ../src/guestfs.pod:2957
5773 "L<https://bugzilla.redhat.com/buglist.cgi?"
5774 "component=libguestfs&product=Virtualization+Tools>"
5776 "L<https://bugzilla.redhat.com/buglist.cgi?"
5777 "component=libguestfs&product=Virtualization+Tools>"
5780 #: ../src/guestfs.pod:2959
5781 msgid "To report a new bug against libguestfs use this link:"
5782 msgstr "Для звітування щодо вад у libguestfs скористайтеся цим посиланням:"
5785 #: ../src/guestfs.pod:2961
5787 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
5788 "component=libguestfs&product=Virtualization+Tools>"
5790 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
5791 "component=libguestfs&product=Virtualization+Tools>"
5794 #: ../src/guestfs.pod:2963
5795 msgid "When reporting a bug, please check:"
5799 #: ../src/guestfs.pod:2969
5800 msgid "That the bug hasn't been reported already."
5804 #: ../src/guestfs.pod:2973
5805 msgid "That you are testing a recent version."
5809 #: ../src/guestfs.pod:2977
5810 msgid "Describe the bug accurately, and give a way to reproduce it."
5814 #: ../src/guestfs.pod:2981
5816 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
5821 #: ../src/guestfs.pod:2986 ../fish/guestfish.pod:1174
5822 #: ../test-tool/libguestfs-test-tool.pod:93 ../fuse/guestmount.pod:290
5827 #: ../src/guestfs.pod:2988 ../fish/guestfish.pod:1176
5828 #: ../test-tool/libguestfs-test-tool.pod:95 ../fuse/guestmount.pod:292
5829 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
5833 #: ../src/guestfs.pod:2990 ../fish/guestfish.pod:1178
5834 #: ../test-tool/libguestfs-test-tool.pod:97 ../fuse/guestmount.pod:294
5835 #: ../tools/virt-win-reg.pl:774 ../tools/virt-list-filesystems.pl:206
5836 #: ../tools/virt-tar.pl:305 ../tools/virt-make-fs.pl:568
5837 #: ../tools/virt-list-partitions.pl:273
5839 msgstr "АВТОРСЬКІ ПРАВА"
5842 #: ../src/guestfs.pod:2992 ../fish/guestfish.pod:1180
5843 #: ../test-tool/libguestfs-test-tool.pod:99
5844 msgid "Copyright (C) 2009-2011 Red Hat Inc. L<http://libguestfs.org/>"
5848 #: ../src/guestfs.pod:2995
5850 "This library is free software; you can redistribute it and/or modify it "
5851 "under the terms of the GNU Lesser General Public License as published by the "
5852 "Free Software Foundation; either version 2 of the License, or (at your "
5853 "option) any later version."
5857 #: ../src/guestfs.pod:3000
5859 "This library is distributed in the hope that it will be useful, but WITHOUT "
5860 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
5861 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
5866 #: ../src/guestfs.pod:3005
5868 "You should have received a copy of the GNU Lesser General Public License "
5869 "along with this library; if not, write to the Free Software Foundation, "
5870 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
5874 #: ../src/guestfs-actions.pod:1
5875 msgid "guestfs_add_cdrom"
5879 #: ../src/guestfs-actions.pod:3
5883 " guestfs_add_cdrom (guestfs_h *g,\n"
5884 " const char *filename);\n"
5889 #: ../src/guestfs-actions.pod:7 ../fish/guestfish-actions.pod:5
5890 msgid "This function adds a virtual CD-ROM disk image to the guest."
5894 #: ../src/guestfs-actions.pod:9 ../fish/guestfish-actions.pod:7
5895 msgid "This is equivalent to the qemu parameter I<-cdrom filename>."
5899 #: ../src/guestfs-actions.pod:17
5901 "This call checks for the existence of C<filename>. This stops you from "
5902 "specifying other types of drive which are supported by qemu such as C<nbd:> "
5903 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
5908 #: ../src/guestfs-actions.pod:24
5910 "If you just want to add an ISO file (often you use this as an efficient way "
5911 "to transfer large files into the guest), then you should probably use "
5912 "C<guestfs_add_drive_ro> instead."
5916 #: ../src/guestfs-actions.pod:30 ../src/guestfs-actions.pod:140
5917 #: ../src/guestfs-actions.pod:201 ../src/guestfs-actions.pod:238
5918 #: ../src/guestfs-actions.pod:252 ../src/guestfs-actions.pod:273
5919 #: ../src/guestfs-actions.pod:293 ../src/guestfs-actions.pod:307
5920 #: ../src/guestfs-actions.pod:422 ../src/guestfs-actions.pod:442
5921 #: ../src/guestfs-actions.pod:456 ../src/guestfs-actions.pod:501
5922 #: ../src/guestfs-actions.pod:529 ../src/guestfs-actions.pod:547
5923 #: ../src/guestfs-actions.pod:614 ../src/guestfs-actions.pod:647
5924 #: ../src/guestfs-actions.pod:661 ../src/guestfs-actions.pod:676
5925 #: ../src/guestfs-actions.pod:775 ../src/guestfs-actions.pod:793
5926 #: ../src/guestfs-actions.pod:807 ../src/guestfs-actions.pod:821
5927 #: ../src/guestfs-actions.pod:982 ../src/guestfs-actions.pod:1002
5928 #: ../src/guestfs-actions.pod:1020 ../src/guestfs-actions.pod:1104
5929 #: ../src/guestfs-actions.pod:1122 ../src/guestfs-actions.pod:1141
5930 #: ../src/guestfs-actions.pod:1155 ../src/guestfs-actions.pod:1175
5931 #: ../src/guestfs-actions.pod:1245 ../src/guestfs-actions.pod:1276
5932 #: ../src/guestfs-actions.pod:1301 ../src/guestfs-actions.pod:1343
5933 #: ../src/guestfs-actions.pod:1449 ../src/guestfs-actions.pod:1483
5934 #: ../src/guestfs-actions.pod:1698 ../src/guestfs-actions.pod:1720
5935 #: ../src/guestfs-actions.pod:1807 ../src/guestfs-actions.pod:2269
5936 #: ../src/guestfs-actions.pod:2413 ../src/guestfs-actions.pod:2474
5937 #: ../src/guestfs-actions.pod:2509 ../src/guestfs-actions.pod:3485
5938 #: ../src/guestfs-actions.pod:3500 ../src/guestfs-actions.pod:3525
5939 #: ../src/guestfs-actions.pod:3680 ../src/guestfs-actions.pod:3694
5940 #: ../src/guestfs-actions.pod:3707 ../src/guestfs-actions.pod:3721
5941 #: ../src/guestfs-actions.pod:3736 ../src/guestfs-actions.pod:3772
5942 #: ../src/guestfs-actions.pod:3844 ../src/guestfs-actions.pod:3864
5943 #: ../src/guestfs-actions.pod:3881 ../src/guestfs-actions.pod:3904
5944 #: ../src/guestfs-actions.pod:3927 ../src/guestfs-actions.pod:3959
5945 #: ../src/guestfs-actions.pod:3978 ../src/guestfs-actions.pod:3997
5946 #: ../src/guestfs-actions.pod:4032 ../src/guestfs-actions.pod:4044
5947 #: ../src/guestfs-actions.pod:4080 ../src/guestfs-actions.pod:4096
5948 #: ../src/guestfs-actions.pod:4109 ../src/guestfs-actions.pod:4124
5949 #: ../src/guestfs-actions.pod:4141 ../src/guestfs-actions.pod:4234
5950 #: ../src/guestfs-actions.pod:4254 ../src/guestfs-actions.pod:4267
5951 #: ../src/guestfs-actions.pod:4318 ../src/guestfs-actions.pod:4336
5952 #: ../src/guestfs-actions.pod:4354 ../src/guestfs-actions.pod:4370
5953 #: ../src/guestfs-actions.pod:4384 ../src/guestfs-actions.pod:4398
5954 #: ../src/guestfs-actions.pod:4415 ../src/guestfs-actions.pod:4430
5955 #: ../src/guestfs-actions.pod:4450 ../src/guestfs-actions.pod:4508
5956 #: ../src/guestfs-actions.pod:4581 ../src/guestfs-actions.pod:4612
5957 #: ../src/guestfs-actions.pod:4631 ../src/guestfs-actions.pod:4650
5958 #: ../src/guestfs-actions.pod:4662 ../src/guestfs-actions.pod:4679
5959 #: ../src/guestfs-actions.pod:4692 ../src/guestfs-actions.pod:4707
5960 #: ../src/guestfs-actions.pod:4722 ../src/guestfs-actions.pod:4757
5961 #: ../src/guestfs-actions.pod:4779 ../src/guestfs-actions.pod:4799
5962 #: ../src/guestfs-actions.pod:4813 ../src/guestfs-actions.pod:4830
5963 #: ../src/guestfs-actions.pod:4879 ../src/guestfs-actions.pod:4916
5964 #: ../src/guestfs-actions.pod:4930 ../src/guestfs-actions.pod:4958
5965 #: ../src/guestfs-actions.pod:4975 ../src/guestfs-actions.pod:4993
5966 #: ../src/guestfs-actions.pod:5127 ../src/guestfs-actions.pod:5184
5967 #: ../src/guestfs-actions.pod:5206 ../src/guestfs-actions.pod:5224
5968 #: ../src/guestfs-actions.pod:5256 ../src/guestfs-actions.pod:5322
5969 #: ../src/guestfs-actions.pod:5339 ../src/guestfs-actions.pod:5352
5970 #: ../src/guestfs-actions.pod:5366 ../src/guestfs-actions.pod:5655
5971 #: ../src/guestfs-actions.pod:5674 ../src/guestfs-actions.pod:5693
5972 #: ../src/guestfs-actions.pod:5705 ../src/guestfs-actions.pod:5717
5973 #: ../src/guestfs-actions.pod:5731 ../src/guestfs-actions.pod:5743
5974 #: ../src/guestfs-actions.pod:5757 ../src/guestfs-actions.pod:5773
5975 #: ../src/guestfs-actions.pod:5794 ../src/guestfs-actions.pod:5813
5976 #: ../src/guestfs-actions.pod:5832 ../src/guestfs-actions.pod:5862
5977 #: ../src/guestfs-actions.pod:5878 ../src/guestfs-actions.pod:5901
5978 #: ../src/guestfs-actions.pod:5919 ../src/guestfs-actions.pod:5938
5979 #: ../src/guestfs-actions.pod:5959 ../src/guestfs-actions.pod:5978
5980 #: ../src/guestfs-actions.pod:5995 ../src/guestfs-actions.pod:6023
5981 #: ../src/guestfs-actions.pod:6047 ../src/guestfs-actions.pod:6066
5982 #: ../src/guestfs-actions.pod:6090 ../src/guestfs-actions.pod:6109
5983 #: ../src/guestfs-actions.pod:6124 ../src/guestfs-actions.pod:6143
5984 #: ../src/guestfs-actions.pod:6180 ../src/guestfs-actions.pod:6210
5985 #: ../src/guestfs-actions.pod:6243 ../src/guestfs-actions.pod:6365
5986 #: ../src/guestfs-actions.pod:6486 ../src/guestfs-actions.pod:6498
5987 #: ../src/guestfs-actions.pod:6511 ../src/guestfs-actions.pod:6524
5988 #: ../src/guestfs-actions.pod:6546 ../src/guestfs-actions.pod:6559
5989 #: ../src/guestfs-actions.pod:6572 ../src/guestfs-actions.pod:6585
5990 #: ../src/guestfs-actions.pod:6600 ../src/guestfs-actions.pod:6659
5991 #: ../src/guestfs-actions.pod:6676 ../src/guestfs-actions.pod:6692
5992 #: ../src/guestfs-actions.pod:6708 ../src/guestfs-actions.pod:6725
5993 #: ../src/guestfs-actions.pod:6738 ../src/guestfs-actions.pod:6758
5994 #: ../src/guestfs-actions.pod:6794 ../src/guestfs-actions.pod:6808
5995 #: ../src/guestfs-actions.pod:6849 ../src/guestfs-actions.pod:6862
5996 #: ../src/guestfs-actions.pod:6880 ../src/guestfs-actions.pod:6914
5997 #: ../src/guestfs-actions.pod:6950 ../src/guestfs-actions.pod:7069
5998 #: ../src/guestfs-actions.pod:7087 ../src/guestfs-actions.pod:7101
5999 #: ../src/guestfs-actions.pod:7156 ../src/guestfs-actions.pod:7169
6000 #: ../src/guestfs-actions.pod:7214 ../src/guestfs-actions.pod:7247
6001 #: ../src/guestfs-actions.pod:7308 ../src/guestfs-actions.pod:7334
6002 #: ../src/guestfs-actions.pod:7401 ../src/guestfs-actions.pod:7420
6003 #: ../src/guestfs-actions.pod:7449
6004 msgid "This function returns 0 on success or -1 on error."
6008 #: ../src/guestfs-actions.pod:32 ../src/guestfs-actions.pod:254
6009 #: ../src/guestfs-actions.pod:275 ../fish/guestfish-actions.pod:28
6010 #: ../fish/guestfish-actions.pod:163 ../fish/guestfish-actions.pod:177
6012 "This function is deprecated. In new code, use the C<add_drive_opts> call "
6017 #: ../src/guestfs-actions.pod:35 ../src/guestfs-actions.pod:257
6018 #: ../src/guestfs-actions.pod:278 ../src/guestfs-actions.pod:1454
6019 #: ../src/guestfs-actions.pod:1947 ../src/guestfs-actions.pod:1968
6020 #: ../src/guestfs-actions.pod:4455 ../src/guestfs-actions.pod:4762
6021 #: ../src/guestfs-actions.pod:6188 ../src/guestfs-actions.pod:6218
6022 #: ../src/guestfs-actions.pod:6251 ../src/guestfs-actions.pod:6310
6023 #: ../src/guestfs-actions.pod:7252 ../src/guestfs-actions.pod:7342
6024 #: ../src/guestfs-actions.pod:7512 ../fish/guestfish-actions.pod:31
6025 #: ../fish/guestfish-actions.pod:166 ../fish/guestfish-actions.pod:180
6026 #: ../fish/guestfish-actions.pod:961 ../fish/guestfish-actions.pod:1321
6027 #: ../fish/guestfish-actions.pod:1335 ../fish/guestfish-actions.pod:3025
6028 #: ../fish/guestfish-actions.pod:3222 ../fish/guestfish-actions.pod:4194
6029 #: ../fish/guestfish-actions.pod:4217 ../fish/guestfish-actions.pod:4239
6030 #: ../fish/guestfish-actions.pod:4277 ../fish/guestfish-actions.pod:4918
6031 #: ../fish/guestfish-actions.pod:5016
6033 "Deprecated functions will not be removed from the API, but the fact that "
6034 "they are deprecated indicates that there are problems with correct use of "
6039 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:142
6040 #: ../src/guestfs-actions.pod:1106 ../src/guestfs-actions.pod:1919
6041 #: ../src/guestfs-actions.pod:2017 ../src/guestfs-actions.pod:2120
6042 #: ../src/guestfs-actions.pod:3487 ../src/guestfs-actions.pod:3507
6043 #: ../src/guestfs-actions.pod:4766 ../src/guestfs-actions.pod:5880
6044 #: ../src/guestfs-actions.pod:5997 ../src/guestfs-actions.pod:6111
6045 #: ../src/guestfs-actions.pod:6602 ../src/guestfs-actions.pod:6727
6046 #: ../src/guestfs-actions.pod:7256
6047 msgid "(Added in 0.3)"
6051 #: ../src/guestfs-actions.pod:41
6052 msgid "guestfs_add_domain"
6056 #: ../src/guestfs-actions.pod:43
6060 " guestfs_add_domain (guestfs_h *g,\n"
6061 " const char *dom,\n"
6067 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:151
6068 #: ../src/guestfs-actions.pod:4469
6070 "You may supply a list of optional arguments to this call. Use zero or more "
6071 "of the following pairs of parameters, and terminate the list with C<-1> on "
6072 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
6076 #: ../src/guestfs-actions.pod:53
6079 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
6080 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
6081 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
6082 " GUESTFS_ADD_DOMAIN_LIVE, int live,\n"
6083 " GUESTFS_ADD_DOMAIN_ALLOWUUID, int allowuuid,\n"
6088 #: ../src/guestfs-actions.pod:59
6090 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
6091 "It works by connecting to libvirt, requesting the domain and domain XML from "
6092 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
6097 #: ../src/guestfs-actions.pod:64 ../fish/guestfish-actions.pod:46
6099 "The number of disks added is returned. This operation is atomic: if an "
6100 "error is returned, then no disks are added."
6104 #: ../src/guestfs-actions.pod:67 ../fish/guestfish-actions.pod:49
6106 "This function does some minimal checks to make sure the libvirt domain is "
6107 "not running (unless C<readonly> is true). In a future version we will try "
6108 "to acquire the libvirt lock on each disk."
6112 #: ../src/guestfs-actions.pod:71 ../fish/guestfish-actions.pod:53
6114 "Disks must be accessible locally. This often means that adding disks from a "
6115 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
6116 "unless those disks are accessible via the same device path locally too."
6120 #: ../src/guestfs-actions.pod:76 ../fish/guestfish-actions.pod:58
6122 "The optional C<libvirturi> parameter sets the libvirt URI (see L<http://"
6123 "libvirt.org/uri.html>). If this is not set then we connect to the default "
6124 "libvirt URI (or one set through an environment variable, see the libvirt "
6125 "documentation for full details)."
6129 #: ../src/guestfs-actions.pod:82 ../fish/guestfish-actions.pod:64
6131 "The optional C<live> flag controls whether this call will try to connect to "
6132 "a running virtual machine C<guestfsd> process if it sees a suitable "
6133 "E<lt>channelE<gt> element in the libvirt XML definition. The default (if "
6134 "the flag is omitted) is never to try. See L<guestfs(3)/ATTACHING TO RUNNING "
6135 "DAEMONS> for more information."
6139 #: ../src/guestfs-actions.pod:89 ../fish/guestfish-actions.pod:71
6141 "If the C<allowuuid> flag is true (default is false) then a UUID I<may> be "
6142 "passed instead of the domain name. The C<dom> string is treated as a UUID "
6143 "first and looked up, and if that lookup fails then we treat C<dom> as a name "
6148 #: ../src/guestfs-actions.pod:94
6150 "The other optional parameters are passed directly through to "
6151 "C<guestfs_add_drive_opts>."
6155 #: ../src/guestfs-actions.pod:97 ../src/guestfs-actions.pod:350
6156 #: ../src/guestfs-actions.pod:515 ../src/guestfs-actions.pod:693
6157 #: ../src/guestfs-actions.pod:724 ../src/guestfs-actions.pod:742
6158 #: ../src/guestfs-actions.pod:761 ../src/guestfs-actions.pod:1321
6159 #: ../src/guestfs-actions.pod:1677 ../src/guestfs-actions.pod:1880
6160 #: ../src/guestfs-actions.pod:1989 ../src/guestfs-actions.pod:2029
6161 #: ../src/guestfs-actions.pod:2084 ../src/guestfs-actions.pod:2107
6162 #: ../src/guestfs-actions.pod:2400 ../src/guestfs-actions.pod:2783
6163 #: ../src/guestfs-actions.pod:2804 ../src/guestfs-actions.pod:4902
6164 #: ../src/guestfs-actions.pod:5030 ../src/guestfs-actions.pod:5436
6165 #: ../src/guestfs-actions.pod:5462 ../src/guestfs-actions.pod:6835
6166 #: ../src/guestfs-actions.pod:7267 ../src/guestfs-actions.pod:7280
6167 #: ../src/guestfs-actions.pod:7293
6168 msgid "On error this function returns -1."
6172 #: ../src/guestfs-actions.pod:99
6173 msgid "(Added in 1.7.4)"
6177 #: ../src/guestfs-actions.pod:101
6178 msgid "guestfs_add_domain_va"
6182 #: ../src/guestfs-actions.pod:103
6186 " guestfs_add_domain_va (guestfs_h *g,\n"
6187 " const char *dom,\n"
6193 #: ../src/guestfs-actions.pod:108
6194 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
6198 #: ../src/guestfs-actions.pod:110 ../src/guestfs-actions.pod:121
6199 #: ../src/guestfs-actions.pod:214 ../src/guestfs-actions.pod:225
6200 #: ../src/guestfs-actions.pod:4522 ../src/guestfs-actions.pod:4534
6201 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
6205 #: ../src/guestfs-actions.pod:112
6206 msgid "guestfs_add_domain_argv"
6210 #: ../src/guestfs-actions.pod:114
6214 " guestfs_add_domain_argv (guestfs_h *g,\n"
6215 " const char *dom,\n"
6216 " const struct guestfs_add_domain_argv *optargs);\n"
6221 #: ../src/guestfs-actions.pod:119
6222 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
6226 #: ../src/guestfs-actions.pod:123
6227 msgid "guestfs_add_drive"
6231 #: ../src/guestfs-actions.pod:125
6235 " guestfs_add_drive (guestfs_h *g,\n"
6236 " const char *filename);\n"
6241 #: ../src/guestfs-actions.pod:129
6243 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
6244 "optional parameters, so the disk is added writable, with the format being "
6245 "detected automatically."
6249 #: ../src/guestfs-actions.pod:133
6251 "Automatic detection of the format opens you up to a potential security hole "
6252 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6253 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
6254 "you should think about replacing calls to this function with calls to "
6255 "C<guestfs_add_drive_opts>, and specifying the format."
6259 #: ../src/guestfs-actions.pod:144
6260 msgid "guestfs_add_drive_opts"
6264 #: ../src/guestfs-actions.pod:146
6268 " guestfs_add_drive_opts (guestfs_h *g,\n"
6269 " const char *filename,\n"
6275 #: ../src/guestfs-actions.pod:156
6278 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
6279 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
6280 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
6285 #: ../src/guestfs-actions.pod:160 ../fish/guestfish-actions.pod:102
6287 "This function adds a virtual machine disk image C<filename> to libguestfs. "
6288 "The first time you call this function, the disk appears as C</dev/sda>, the "
6289 "second time as C</dev/sdb>, and so on."
6293 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:107
6295 "You don't necessarily need to be root when using libguestfs. However you "
6296 "obviously do need sufficient permissions to access the filename for whatever "
6297 "operations you want to perform (ie. read access if you just want to read the "
6298 "image or write access if you want to modify the image)."
6302 #: ../src/guestfs-actions.pod:171 ../fish/guestfish-actions.pod:113
6303 msgid "This call checks that C<filename> exists."
6307 #: ../src/guestfs-actions.pod:173 ../src/guestfs-actions.pod:4480
6308 #: ../fish/guestfish-actions.pod:115 ../fish/guestfish-actions.pod:3036
6309 msgid "The optional arguments are:"
6313 #: ../src/guestfs-actions.pod:177 ../fish/guestfish-actions.pod:119
6315 msgstr "C<readonly>"
6318 #: ../src/guestfs-actions.pod:179 ../fish/guestfish-actions.pod:121
6320 "If true then the image is treated as read-only. Writes are still allowed, "
6321 "but they are stored in a temporary snapshot overlay which is discarded at "
6322 "the end. The disk that you add is not modified."
6326 #: ../src/guestfs-actions.pod:183 ../fish/guestfish-actions.pod:125
6331 #: ../src/guestfs-actions.pod:185
6333 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
6334 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
6335 "Possible formats include C<raw> and C<qcow2>."
6339 #: ../src/guestfs-actions.pod:189 ../fish/guestfish-actions.pod:131
6341 "Automatic detection of the format opens you up to a potential security hole "
6342 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
6343 "RHBZ#642934. Specifying the format closes this security hole."
6347 #: ../src/guestfs-actions.pod:194 ../fish/guestfish-actions.pod:136
6352 #: ../src/guestfs-actions.pod:196
6354 "This rarely-used option lets you emulate the behaviour of the deprecated "
6355 "C<guestfs_add_drive_with_if> call (q.v.)"
6359 #: ../src/guestfs-actions.pod:203
6360 msgid "(Added in 1.5.23)"
6364 #: ../src/guestfs-actions.pod:205
6365 msgid "guestfs_add_drive_opts_va"
6369 #: ../src/guestfs-actions.pod:207
6373 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
6374 " const char *filename,\n"
6380 #: ../src/guestfs-actions.pod:212
6381 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
6385 #: ../src/guestfs-actions.pod:216
6386 msgid "guestfs_add_drive_opts_argv"
6390 #: ../src/guestfs-actions.pod:218
6394 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
6395 " const char *filename,\n"
6396 " const struct guestfs_add_drive_opts_argv *optargs);\n"
6401 #: ../src/guestfs-actions.pod:223
6402 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
6406 #: ../src/guestfs-actions.pod:227
6407 msgid "guestfs_add_drive_ro"
6411 #: ../src/guestfs-actions.pod:229
6415 " guestfs_add_drive_ro (guestfs_h *g,\n"
6416 " const char *filename);\n"
6421 #: ../src/guestfs-actions.pod:233
6423 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
6424 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
6425 "disk is added read-only, with the format being detected automatically."
6429 #: ../src/guestfs-actions.pod:240
6430 msgid "(Added in 1.0.38)"
6434 #: ../src/guestfs-actions.pod:242
6435 msgid "guestfs_add_drive_ro_with_if"
6439 #: ../src/guestfs-actions.pod:244
6443 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
6444 " const char *filename,\n"
6445 " const char *iface);\n"
6450 #: ../src/guestfs-actions.pod:249
6452 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
6453 "QEMU interface emulation to use at run time."
6457 #: ../src/guestfs-actions.pod:261 ../src/guestfs-actions.pod:282
6458 #: ../src/guestfs-actions.pod:2359
6459 msgid "(Added in 1.0.84)"
6463 #: ../src/guestfs-actions.pod:263
6464 msgid "guestfs_add_drive_with_if"
6468 #: ../src/guestfs-actions.pod:265
6472 " guestfs_add_drive_with_if (guestfs_h *g,\n"
6473 " const char *filename,\n"
6474 " const char *iface);\n"
6479 #: ../src/guestfs-actions.pod:270
6481 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
6482 "QEMU interface emulation to use at run time."
6486 #: ../src/guestfs-actions.pod:284
6487 msgid "guestfs_aug_clear"
6491 #: ../src/guestfs-actions.pod:286
6495 " guestfs_aug_clear (guestfs_h *g,\n"
6496 " const char *augpath);\n"
6501 #: ../src/guestfs-actions.pod:290 ../fish/guestfish-actions.pod:188
6503 "Set the value associated with C<path> to C<NULL>. This is the same as the "
6504 "L<augtool(1)> C<clear> command."
6508 #: ../src/guestfs-actions.pod:295 ../src/guestfs-actions.pod:2109
6509 msgid "(Added in 1.3.4)"
6513 #: ../src/guestfs-actions.pod:297
6514 msgid "guestfs_aug_close"
6518 #: ../src/guestfs-actions.pod:299
6522 " guestfs_aug_close (guestfs_h *g);\n"
6527 #: ../src/guestfs-actions.pod:302
6529 "Close the current Augeas handle and free up any resources used by it. After "
6530 "calling this, you have to call C<guestfs_aug_init> again before you can use "
6531 "any other Augeas functions."
6535 #: ../src/guestfs-actions.pod:309 ../src/guestfs-actions.pod:334
6536 #: ../src/guestfs-actions.pod:352 ../src/guestfs-actions.pod:366
6537 #: ../src/guestfs-actions.pod:424 ../src/guestfs-actions.pod:444
6538 #: ../src/guestfs-actions.pod:458 ../src/guestfs-actions.pod:489
6539 #: ../src/guestfs-actions.pod:503 ../src/guestfs-actions.pod:517
6540 #: ../src/guestfs-actions.pod:531 ../src/guestfs-actions.pod:549
6541 #: ../src/guestfs-actions.pod:5513
6542 msgid "(Added in 0.7)"
6546 #: ../src/guestfs-actions.pod:311
6547 msgid "guestfs_aug_defnode"
6551 #: ../src/guestfs-actions.pod:313
6554 " struct guestfs_int_bool *\n"
6555 " guestfs_aug_defnode (guestfs_h *g,\n"
6556 " const char *name,\n"
6557 " const char *expr,\n"
6558 " const char *val);\n"
6563 #: ../src/guestfs-actions.pod:319 ../fish/guestfish-actions.pod:204
6565 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
6569 #: ../src/guestfs-actions.pod:322
6571 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
6572 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
6573 "containing that single node."
6577 #: ../src/guestfs-actions.pod:326 ../fish/guestfish-actions.pod:211
6579 "On success this returns a pair containing the number of nodes in the "
6580 "nodeset, and a boolean flag if a node was created."
6584 #: ../src/guestfs-actions.pod:330
6586 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
6587 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
6591 #: ../src/guestfs-actions.pod:336
6592 msgid "guestfs_aug_defvar"
6596 #: ../src/guestfs-actions.pod:338
6600 " guestfs_aug_defvar (guestfs_h *g,\n"
6601 " const char *name,\n"
6602 " const char *expr);\n"
6607 #: ../src/guestfs-actions.pod:343 ../fish/guestfish-actions.pod:219
6609 "Defines an Augeas variable C<name> whose value is the result of evaluating "
6610 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
6614 #: ../src/guestfs-actions.pod:347 ../fish/guestfish-actions.pod:223
6616 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
6617 "evaluates to something which is not a nodeset."
6621 #: ../src/guestfs-actions.pod:354
6622 msgid "guestfs_aug_get"
6626 #: ../src/guestfs-actions.pod:356
6630 " guestfs_aug_get (guestfs_h *g,\n"
6631 " const char *augpath);\n"
6636 #: ../src/guestfs-actions.pod:360 ../fish/guestfish-actions.pod:230
6638 "Look up the value associated with C<path>. If C<path> matches exactly one "
6639 "node, the C<value> is returned."
6643 #: ../src/guestfs-actions.pod:363 ../src/guestfs-actions.pod:863
6644 #: ../src/guestfs-actions.pod:881 ../src/guestfs-actions.pod:941
6645 #: ../src/guestfs-actions.pod:957 ../src/guestfs-actions.pod:1060
6646 #: ../src/guestfs-actions.pod:1190 ../src/guestfs-actions.pod:1207
6647 #: ../src/guestfs-actions.pod:1226 ../src/guestfs-actions.pod:1360
6648 #: ../src/guestfs-actions.pod:1548 ../src/guestfs-actions.pod:1660
6649 #: ../src/guestfs-actions.pod:1823 ../src/guestfs-actions.pod:1840
6650 #: ../src/guestfs-actions.pod:1907 ../src/guestfs-actions.pod:1941
6651 #: ../src/guestfs-actions.pod:1962 ../src/guestfs-actions.pod:2132
6652 #: ../src/guestfs-actions.pod:2324 ../src/guestfs-actions.pod:2531
6653 #: ../src/guestfs-actions.pod:2624 ../src/guestfs-actions.pod:2735
6654 #: ../src/guestfs-actions.pod:2755 ../src/guestfs-actions.pod:2875
6655 #: ../src/guestfs-actions.pod:2906 ../src/guestfs-actions.pod:2930
6656 #: ../src/guestfs-actions.pod:2967 ../src/guestfs-actions.pod:3027
6657 #: ../src/guestfs-actions.pod:3050 ../src/guestfs-actions.pod:3071
6658 #: ../src/guestfs-actions.pod:3666 ../src/guestfs-actions.pod:4016
6659 #: ../src/guestfs-actions.pod:4186 ../src/guestfs-actions.pod:4296
6660 #: ../src/guestfs-actions.pod:5048 ../src/guestfs-actions.pod:5241
6661 #: ../src/guestfs-actions.pod:5411 ../src/guestfs-actions.pod:5589
6662 #: ../src/guestfs-actions.pod:5638 ../src/guestfs-actions.pod:6271
6663 #: ../src/guestfs-actions.pod:6287 ../src/guestfs-actions.pod:6304
6664 #: ../src/guestfs-actions.pod:6335 ../src/guestfs-actions.pod:7009
6665 #: ../src/guestfs-actions.pod:7028 ../src/guestfs-actions.pod:7046
6666 #: ../src/guestfs-actions.pod:7226 ../src/guestfs-actions.pod:7506
6668 "This function returns a string, or NULL on error. I<The caller must free "
6669 "the returned string after use>."
6673 #: ../src/guestfs-actions.pod:368
6674 msgid "guestfs_aug_init"
6678 #: ../src/guestfs-actions.pod:370
6682 " guestfs_aug_init (guestfs_h *g,\n"
6683 " const char *root,\n"
6689 #: ../src/guestfs-actions.pod:375 ../fish/guestfish-actions.pod:237
6691 "Create a new Augeas handle for editing configuration files. If there was "
6692 "any previous Augeas handle associated with this guestfs session, then it is "
6697 #: ../src/guestfs-actions.pod:379
6698 msgid "You must call this before using any other C<guestfs_aug_*> commands."
6702 #: ../src/guestfs-actions.pod:382 ../fish/guestfish-actions.pod:244
6704 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
6708 #: ../src/guestfs-actions.pod:385 ../fish/guestfish-actions.pod:247
6710 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
6711 "logical I<or> of the following integers:"
6715 #: ../src/guestfs-actions.pod:391 ../fish/guestfish-actions.pod:253
6716 msgid "C<AUG_SAVE_BACKUP> = 1"
6717 msgstr "C<AUG_SAVE_BACKUP> = 1"
6720 #: ../src/guestfs-actions.pod:393 ../fish/guestfish-actions.pod:255
6721 msgid "Keep the original file with a C<.augsave> extension."
6725 #: ../src/guestfs-actions.pod:395 ../fish/guestfish-actions.pod:257
6726 msgid "C<AUG_SAVE_NEWFILE> = 2"
6727 msgstr "C<AUG_SAVE_NEWFILE> = 2"
6730 #: ../src/guestfs-actions.pod:397 ../fish/guestfish-actions.pod:259
6732 "Save changes into a file with extension C<.augnew>, and do not overwrite "
6733 "original. Overrides C<AUG_SAVE_BACKUP>."
6737 #: ../src/guestfs-actions.pod:400 ../fish/guestfish-actions.pod:262
6738 msgid "C<AUG_TYPE_CHECK> = 4"
6739 msgstr "C<AUG_TYPE_CHECK> = 4"
6742 #: ../src/guestfs-actions.pod:402 ../fish/guestfish-actions.pod:264
6743 msgid "Typecheck lenses (can be expensive)."
6747 #: ../src/guestfs-actions.pod:404 ../fish/guestfish-actions.pod:266
6748 msgid "C<AUG_NO_STDINC> = 8"
6749 msgstr "C<AUG_NO_STDINC> = 8"
6752 #: ../src/guestfs-actions.pod:406 ../fish/guestfish-actions.pod:268
6753 msgid "Do not use standard load path for modules."
6757 #: ../src/guestfs-actions.pod:408 ../fish/guestfish-actions.pod:270
6758 msgid "C<AUG_SAVE_NOOP> = 16"
6759 msgstr "C<AUG_SAVE_NOOP> = 16"
6762 #: ../src/guestfs-actions.pod:410 ../fish/guestfish-actions.pod:272
6763 msgid "Make save a no-op, just record what would have been changed."
6767 #: ../src/guestfs-actions.pod:412 ../fish/guestfish-actions.pod:274
6768 msgid "C<AUG_NO_LOAD> = 32"
6769 msgstr "C<AUG_NO_LOAD> = 32"
6772 #: ../src/guestfs-actions.pod:414
6773 msgid "Do not load the tree in C<guestfs_aug_init>."
6777 #: ../src/guestfs-actions.pod:418
6778 msgid "To close the handle, you can call C<guestfs_aug_close>."
6782 #: ../src/guestfs-actions.pod:420 ../fish/guestfish-actions.pod:282
6783 msgid "To find out more about Augeas, see L<http://augeas.net/>."
6787 #: ../src/guestfs-actions.pod:426
6788 msgid "guestfs_aug_insert"
6792 #: ../src/guestfs-actions.pod:428
6796 " guestfs_aug_insert (guestfs_h *g,\n"
6797 " const char *augpath,\n"
6798 " const char *label,\n"
6804 #: ../src/guestfs-actions.pod:434 ../fish/guestfish-actions.pod:288
6806 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
6807 "or after C<path> (depending on the boolean flag C<before>)."
6811 #: ../src/guestfs-actions.pod:438 ../fish/guestfish-actions.pod:292
6813 "C<path> must match exactly one existing node in the tree, and C<label> must "
6814 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
6818 #: ../src/guestfs-actions.pod:446
6819 msgid "guestfs_aug_load"
6823 #: ../src/guestfs-actions.pod:448
6827 " guestfs_aug_load (guestfs_h *g);\n"
6832 #: ../src/guestfs-actions.pod:451 ../fish/guestfish-actions.pod:300
6833 msgid "Load files into the tree."
6834 msgstr "Завантажити файли до ієрархії."
6837 #: ../src/guestfs-actions.pod:453 ../fish/guestfish-actions.pod:302
6838 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
6842 #: ../src/guestfs-actions.pod:460
6843 msgid "guestfs_aug_ls"
6847 #: ../src/guestfs-actions.pod:462
6851 " guestfs_aug_ls (guestfs_h *g,\n"
6852 " const char *augpath);\n"
6857 #: ../src/guestfs-actions.pod:466
6859 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
6860 "sorting the resulting nodes into alphabetical order."
6864 #: ../src/guestfs-actions.pod:469 ../src/guestfs-actions.pod:485
6865 #: ../src/guestfs-actions.pod:631 ../src/guestfs-actions.pod:1079
6866 #: ../src/guestfs-actions.pod:1375 ../src/guestfs-actions.pod:1394
6867 #: ../src/guestfs-actions.pod:1497 ../src/guestfs-actions.pod:1516
6868 #: ../src/guestfs-actions.pod:1762 ../src/guestfs-actions.pod:2204
6869 #: ../src/guestfs-actions.pod:2220 ../src/guestfs-actions.pod:2239
6870 #: ../src/guestfs-actions.pod:2282 ../src/guestfs-actions.pod:2306
6871 #: ../src/guestfs-actions.pod:2377 ../src/guestfs-actions.pod:2426
6872 #: ../src/guestfs-actions.pod:2693 ../src/guestfs-actions.pod:2984
6873 #: ../src/guestfs-actions.pod:3273 ../src/guestfs-actions.pod:3586
6874 #: ../src/guestfs-actions.pod:3648 ../src/guestfs-actions.pod:3753
6875 #: ../src/guestfs-actions.pod:4158 ../src/guestfs-actions.pod:4863
6876 #: ../src/guestfs-actions.pod:5383 ../src/guestfs-actions.pod:5509
6877 #: ../src/guestfs-actions.pod:5623 ../src/guestfs-actions.pod:6351
6878 #: ../src/guestfs-actions.pod:6412 ../src/guestfs-actions.pod:6467
6879 #: ../src/guestfs-actions.pod:6613 ../src/guestfs-actions.pod:6637
6880 #: ../src/guestfs-actions.pod:7119 ../src/guestfs-actions.pod:7139
6881 #: ../src/guestfs-actions.pod:7186 ../src/guestfs-actions.pod:7358
6882 #: ../src/guestfs-actions.pod:7377 ../src/guestfs-actions.pod:7463
6883 #: ../src/guestfs-actions.pod:7482 ../src/guestfs-actions.pod:7528
6884 #: ../src/guestfs-actions.pod:7547
6886 "This function returns a NULL-terminated array of strings (like L<environ(3)"
6887 ">), or NULL if there was an error. I<The caller must free the strings and "
6888 "the array after use>."
6892 #: ../src/guestfs-actions.pod:473 ../src/guestfs-actions.pod:1004
6893 #: ../src/guestfs-actions.pod:1022 ../src/guestfs-actions.pod:1432
6894 #: ../src/guestfs-actions.pod:3351 ../src/guestfs-actions.pod:3382
6895 #: ../src/guestfs-actions.pod:3999 ../src/guestfs-actions.pod:4049
6896 #: ../src/guestfs-actions.pod:4236 ../src/guestfs-actions.pod:4269
6897 #: ../src/guestfs-actions.pod:4432 ../src/guestfs-actions.pod:4867
6898 #: ../src/guestfs-actions.pod:5324 ../src/guestfs-actions.pod:5719
6899 #: ../src/guestfs-actions.pod:5733 ../src/guestfs-actions.pod:5745
6900 #: ../src/guestfs-actions.pod:6192 ../src/guestfs-actions.pod:6851
6901 #: ../src/guestfs-actions.pod:6864 ../src/guestfs-actions.pod:7103
6902 #: ../src/guestfs-actions.pod:7346
6903 msgid "(Added in 0.8)"
6907 #: ../src/guestfs-actions.pod:475
6908 msgid "guestfs_aug_match"
6912 #: ../src/guestfs-actions.pod:477
6916 " guestfs_aug_match (guestfs_h *g,\n"
6917 " const char *augpath);\n"
6922 #: ../src/guestfs-actions.pod:481 ../fish/guestfish-actions.pod:316
6924 "Returns a list of paths which match the path expression C<path>. The "
6925 "returned paths are sufficiently qualified so that they match exactly one "
6926 "node in the current tree."
6930 #: ../src/guestfs-actions.pod:491
6931 msgid "guestfs_aug_mv"
6935 #: ../src/guestfs-actions.pod:493
6939 " guestfs_aug_mv (guestfs_h *g,\n"
6940 " const char *src,\n"
6941 " const char *dest);\n"
6946 #: ../src/guestfs-actions.pod:498 ../fish/guestfish-actions.pod:324
6948 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
6949 "C<dest> is overwritten if it exists."
6953 #: ../src/guestfs-actions.pod:505
6954 msgid "guestfs_aug_rm"
6958 #: ../src/guestfs-actions.pod:507
6962 " guestfs_aug_rm (guestfs_h *g,\n"
6963 " const char *augpath);\n"
6968 #: ../src/guestfs-actions.pod:511 ../fish/guestfish-actions.pod:331
6969 msgid "Remove C<path> and all of its children."
6973 #: ../src/guestfs-actions.pod:513 ../fish/guestfish-actions.pod:333
6974 msgid "On success this returns the number of entries which were removed."
6978 #: ../src/guestfs-actions.pod:519
6979 msgid "guestfs_aug_save"
6983 #: ../src/guestfs-actions.pod:521
6987 " guestfs_aug_save (guestfs_h *g);\n"
6992 #: ../src/guestfs-actions.pod:524 ../fish/guestfish-actions.pod:339
6993 msgid "This writes all pending changes to disk."
6997 #: ../src/guestfs-actions.pod:526
6999 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
7004 #: ../src/guestfs-actions.pod:533
7005 msgid "guestfs_aug_set"
7009 #: ../src/guestfs-actions.pod:535
7013 " guestfs_aug_set (guestfs_h *g,\n"
7014 " const char *augpath,\n"
7015 " const char *val);\n"
7020 #: ../src/guestfs-actions.pod:540 ../fish/guestfish-actions.pod:348
7021 msgid "Set the value associated with C<path> to C<val>."
7025 #: ../src/guestfs-actions.pod:542
7027 "In the Augeas API, it is possible to clear a node by setting the value to "
7028 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
7029 "this call. Instead you must use the C<guestfs_aug_clear> call."
7033 #: ../src/guestfs-actions.pod:551
7034 msgid "guestfs_available"
7038 #: ../src/guestfs-actions.pod:553
7042 " guestfs_available (guestfs_h *g,\n"
7043 " char *const *groups);\n"
7048 #: ../src/guestfs-actions.pod:557 ../fish/guestfish-actions.pod:359
7050 "This command is used to check the availability of some groups of "
7051 "functionality in the appliance, which not all builds of the libguestfs "
7052 "appliance will be able to provide."
7056 #: ../src/guestfs-actions.pod:561
7058 "The libguestfs groups, and the functions that those groups correspond to, "
7059 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
7060 "runtime by calling C<guestfs_available_all_groups>."
7064 #: ../src/guestfs-actions.pod:566 ../fish/guestfish-actions.pod:368
7066 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
7067 "\"]> would check for the availability of the Linux inotify functions and "
7068 "Augeas (configuration file editing) functions."
7072 #: ../src/guestfs-actions.pod:571 ../fish/guestfish-actions.pod:373
7073 msgid "The command returns no error if I<all> requested groups are available."
7077 #: ../src/guestfs-actions.pod:573 ../fish/guestfish-actions.pod:375
7079 "It fails with an error if one or more of the requested groups is unavailable "
7084 #: ../src/guestfs-actions.pod:576 ../fish/guestfish-actions.pod:378
7086 "If an unknown group name is included in the list of groups then an error is "
7091 #: ../src/guestfs-actions.pod:579 ../fish/guestfish-actions.pod:381
7093 msgstr "I<Нотатки:>"
7096 #: ../src/guestfs-actions.pod:585
7097 msgid "You must call C<guestfs_launch> before calling this function."
7101 #: ../src/guestfs-actions.pod:587 ../fish/guestfish-actions.pod:389
7103 "The reason is because we don't know what groups are supported by the "
7104 "appliance/daemon until it is running and can be queried."
7108 #: ../src/guestfs-actions.pod:593 ../fish/guestfish-actions.pod:395
7110 "If a group of functions is available, this does not necessarily mean that "
7111 "they will work. You still have to check for errors when calling individual "
7112 "API functions even if they are available."
7116 #: ../src/guestfs-actions.pod:600 ../fish/guestfish-actions.pod:402
7118 "It is usually the job of distro packagers to build complete functionality "
7119 "into the libguestfs appliance. Upstream libguestfs, if built from source "
7120 "with all requirements satisfied, will support everything."
7124 #: ../src/guestfs-actions.pod:607
7126 "This call was added in version C<1.0.80>. In previous versions of "
7127 "libguestfs all you could do would be to speculatively execute a command to "
7128 "find out if the daemon implemented it. See also C<guestfs_version>."
7132 #: ../src/guestfs-actions.pod:616 ../src/guestfs-actions.pod:1177
7133 msgid "(Added in 1.0.80)"
7137 #: ../src/guestfs-actions.pod:618
7138 msgid "guestfs_available_all_groups"
7142 #: ../src/guestfs-actions.pod:620
7146 " guestfs_available_all_groups (guestfs_h *g);\n"
7151 #: ../src/guestfs-actions.pod:623
7153 "This command returns a list of all optional groups that this daemon knows "
7154 "about. Note this returns both supported and unsupported groups. To find "
7155 "out which ones the daemon can actually support you have to call "
7156 "C<guestfs_available> on each member of the returned list."
7160 #: ../src/guestfs-actions.pod:629
7161 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
7165 #: ../src/guestfs-actions.pod:635
7166 msgid "(Added in 1.3.15)"
7170 #: ../src/guestfs-actions.pod:637
7171 msgid "guestfs_base64_in"
7175 #: ../src/guestfs-actions.pod:639
7179 " guestfs_base64_in (guestfs_h *g,\n"
7180 " const char *base64file,\n"
7181 " const char *filename);\n"
7186 #: ../src/guestfs-actions.pod:644 ../fish/guestfish-actions.pod:432
7188 "This command uploads base64-encoded data from C<base64file> to C<filename>."
7192 #: ../src/guestfs-actions.pod:649 ../src/guestfs-actions.pod:663
7193 msgid "(Added in 1.3.5)"
7197 #: ../src/guestfs-actions.pod:651
7198 msgid "guestfs_base64_out"
7202 #: ../src/guestfs-actions.pod:653
7206 " guestfs_base64_out (guestfs_h *g,\n"
7207 " const char *filename,\n"
7208 " const char *base64file);\n"
7213 #: ../src/guestfs-actions.pod:658 ../fish/guestfish-actions.pod:441
7215 "This command downloads the contents of C<filename>, writing it out to local "
7216 "file C<base64file> encoded as base64."
7220 #: ../src/guestfs-actions.pod:665
7221 msgid "guestfs_blockdev_flushbufs"
7225 #: ../src/guestfs-actions.pod:667
7229 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
7230 " const char *device);\n"
7235 #: ../src/guestfs-actions.pod:671 ../fish/guestfish-actions.pod:450
7237 "This tells the kernel to flush internal buffers associated with C<device>."
7241 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:691
7242 #: ../src/guestfs-actions.pod:706 ../src/guestfs-actions.pod:722
7243 #: ../src/guestfs-actions.pod:740 ../src/guestfs-actions.pod:759
7244 #: ../src/guestfs-actions.pod:773 ../src/guestfs-actions.pod:791
7245 #: ../src/guestfs-actions.pod:805 ../src/guestfs-actions.pod:819
7246 #: ../fish/guestfish-actions.pod:453 ../fish/guestfish-actions.pod:464
7247 #: ../fish/guestfish-actions.pod:473 ../fish/guestfish-actions.pod:483
7248 #: ../fish/guestfish-actions.pod:495 ../fish/guestfish-actions.pod:508
7249 #: ../fish/guestfish-actions.pod:516 ../fish/guestfish-actions.pod:527
7250 #: ../fish/guestfish-actions.pod:535 ../fish/guestfish-actions.pod:543
7251 msgid "This uses the L<blockdev(8)> command."
7255 #: ../src/guestfs-actions.pod:678 ../src/guestfs-actions.pod:695
7256 #: ../src/guestfs-actions.pod:710 ../src/guestfs-actions.pod:726
7257 #: ../src/guestfs-actions.pod:744 ../src/guestfs-actions.pod:763
7258 #: ../src/guestfs-actions.pod:777 ../src/guestfs-actions.pod:795
7259 #: ../src/guestfs-actions.pod:809 ../src/guestfs-actions.pod:823
7260 msgid "(Added in 0.9.3)"
7264 #: ../src/guestfs-actions.pod:680
7265 msgid "guestfs_blockdev_getbsz"
7269 #: ../src/guestfs-actions.pod:682
7273 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
7274 " const char *device);\n"
7279 #: ../src/guestfs-actions.pod:686 ../fish/guestfish-actions.pod:459
7280 msgid "This returns the block size of a device."
7284 #: ../src/guestfs-actions.pod:688 ../src/guestfs-actions.pod:788
7285 #: ../fish/guestfish-actions.pod:461 ../fish/guestfish-actions.pod:524
7287 "(Note this is different from both I<size in blocks> and I<filesystem block "
7292 #: ../src/guestfs-actions.pod:697
7293 msgid "guestfs_blockdev_getro"
7297 #: ../src/guestfs-actions.pod:699
7301 " guestfs_blockdev_getro (guestfs_h *g,\n"
7302 " const char *device);\n"
7307 #: ../src/guestfs-actions.pod:703 ../fish/guestfish-actions.pod:470
7309 "Returns a boolean indicating if the block device is read-only (true if read-"
7310 "only, false if not)."
7314 #: ../src/guestfs-actions.pod:708 ../src/guestfs-actions.pod:1415
7315 #: ../src/guestfs-actions.pod:1430 ../src/guestfs-actions.pod:1917
7316 #: ../src/guestfs-actions.pod:1928 ../src/guestfs-actions.pod:2000
7317 #: ../src/guestfs-actions.pod:2055 ../src/guestfs-actions.pod:2070
7318 #: ../src/guestfs-actions.pod:2095 ../src/guestfs-actions.pod:2118
7319 #: ../src/guestfs-actions.pod:3091 ../src/guestfs-actions.pod:3108
7320 #: ../src/guestfs-actions.pod:3127 ../src/guestfs-actions.pod:3290
7321 #: ../src/guestfs-actions.pod:3304 ../src/guestfs-actions.pod:3319
7322 #: ../src/guestfs-actions.pod:3333 ../src/guestfs-actions.pod:3349
7323 #: ../src/guestfs-actions.pod:3364 ../src/guestfs-actions.pod:3380
7324 #: ../src/guestfs-actions.pod:3394 ../src/guestfs-actions.pod:3407
7325 #: ../src/guestfs-actions.pod:3421 ../src/guestfs-actions.pod:3436
7326 #: ../src/guestfs-actions.pod:3451 ../src/guestfs-actions.pod:3464
7327 #: ../src/guestfs-actions.pod:3476 ../src/guestfs-actions.pod:5012
7328 msgid "This function returns a C truth value on success or -1 on error."
7332 #: ../src/guestfs-actions.pod:712
7333 msgid "guestfs_blockdev_getsize64"
7337 #: ../src/guestfs-actions.pod:714
7341 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
7342 " const char *device);\n"
7347 #: ../src/guestfs-actions.pod:718 ../fish/guestfish-actions.pod:479
7348 msgid "This returns the size of the device in bytes."
7352 #: ../src/guestfs-actions.pod:720
7353 msgid "See also C<guestfs_blockdev_getsz>."
7357 #: ../src/guestfs-actions.pod:728
7358 msgid "guestfs_blockdev_getss"
7362 #: ../src/guestfs-actions.pod:730
7366 " guestfs_blockdev_getss (guestfs_h *g,\n"
7367 " const char *device);\n"
7372 #: ../src/guestfs-actions.pod:734 ../fish/guestfish-actions.pod:489
7374 "This returns the size of sectors on a block device. Usually 512, but can be "
7375 "larger for modern devices."
7379 #: ../src/guestfs-actions.pod:737
7381 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
7386 #: ../src/guestfs-actions.pod:746
7387 msgid "guestfs_blockdev_getsz"
7391 #: ../src/guestfs-actions.pod:748
7395 " guestfs_blockdev_getsz (guestfs_h *g,\n"
7396 " const char *device);\n"
7401 #: ../src/guestfs-actions.pod:752 ../fish/guestfish-actions.pod:501
7403 "This returns the size of the device in units of 512-byte sectors (even if "
7404 "the sectorsize isn't 512 bytes ... weird)."
7408 #: ../src/guestfs-actions.pod:755
7410 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
7411 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
7415 #: ../src/guestfs-actions.pod:765
7416 msgid "guestfs_blockdev_rereadpt"
7420 #: ../src/guestfs-actions.pod:767
7424 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
7425 " const char *device);\n"
7430 #: ../src/guestfs-actions.pod:771 ../fish/guestfish-actions.pod:514
7431 msgid "Reread the partition table on C<device>."
7435 #: ../src/guestfs-actions.pod:779
7436 msgid "guestfs_blockdev_setbsz"
7440 #: ../src/guestfs-actions.pod:781
7444 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
7445 " const char *device,\n"
7446 " int blocksize);\n"
7451 #: ../src/guestfs-actions.pod:786 ../fish/guestfish-actions.pod:522
7452 msgid "This sets the block size of a device."
7456 #: ../src/guestfs-actions.pod:797
7457 msgid "guestfs_blockdev_setro"
7461 #: ../src/guestfs-actions.pod:799
7465 " guestfs_blockdev_setro (guestfs_h *g,\n"
7466 " const char *device);\n"
7471 #: ../src/guestfs-actions.pod:803 ../fish/guestfish-actions.pod:533
7472 msgid "Sets the block device named C<device> to read-only."
7476 #: ../src/guestfs-actions.pod:811
7477 msgid "guestfs_blockdev_setrw"
7481 #: ../src/guestfs-actions.pod:813
7485 " guestfs_blockdev_setrw (guestfs_h *g,\n"
7486 " const char *device);\n"
7491 #: ../src/guestfs-actions.pod:817 ../fish/guestfish-actions.pod:541
7492 msgid "Sets the block device named C<device> to read-write."
7496 #: ../src/guestfs-actions.pod:825
7497 msgid "guestfs_case_sensitive_path"
7501 #: ../src/guestfs-actions.pod:827
7505 " guestfs_case_sensitive_path (guestfs_h *g,\n"
7506 " const char *path);\n"
7511 #: ../src/guestfs-actions.pod:831 ../fish/guestfish-actions.pod:549
7513 "This can be used to resolve case insensitive paths on a filesystem which is "
7514 "case sensitive. The use case is to resolve paths which you have read from "
7515 "Windows configuration files or the Windows Registry, to the true path."
7519 #: ../src/guestfs-actions.pod:836 ../fish/guestfish-actions.pod:554
7521 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
7522 "(and probably others), which is that although the underlying filesystem is "
7523 "case-insensitive, the driver exports the filesystem to Linux as case-"
7528 #: ../src/guestfs-actions.pod:841 ../fish/guestfish-actions.pod:559
7530 "One consequence of this is that special directories such as C<c:\\windows> "
7531 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
7532 "precise details of how they were created. In Windows itself this would not "
7537 #: ../src/guestfs-actions.pod:847 ../fish/guestfish-actions.pod:565
7539 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
7544 #: ../src/guestfs-actions.pod:850 ../fish/guestfish-actions.pod:568
7546 "This function resolves the true case of each element in the path and returns "
7547 "the case-sensitive path."
7551 #: ../src/guestfs-actions.pod:853
7553 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
7554 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
7555 "how the directories were originally created under Windows)."
7559 #: ../src/guestfs-actions.pod:858 ../fish/guestfish-actions.pod:576
7560 msgid "I<Note>: This function does not handle drive names, backslashes etc."
7564 #: ../src/guestfs-actions.pod:861
7565 msgid "See also C<guestfs_realpath>."
7569 #: ../src/guestfs-actions.pod:866 ../src/guestfs-actions.pod:7031
7570 msgid "(Added in 1.0.75)"
7574 #: ../src/guestfs-actions.pod:868
7579 #: ../src/guestfs-actions.pod:870
7583 " guestfs_cat (guestfs_h *g,\n"
7584 " const char *path);\n"
7589 #: ../src/guestfs-actions.pod:874 ../src/guestfs-actions.pod:5499
7590 #: ../fish/guestfish-actions.pod:585 ../fish/guestfish-actions.pod:3691
7591 msgid "Return the contents of the file named C<path>."
7595 #: ../src/guestfs-actions.pod:876
7597 "Note that this function cannot correctly handle binary files (specifically, "
7598 "files containing C<\\0> character which is treated as end of string). For "
7599 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
7600 "functions which have a more complex interface."
7604 #: ../src/guestfs-actions.pod:884 ../src/guestfs-actions.pod:1063
7605 #: ../src/guestfs-actions.pod:1083 ../src/guestfs-actions.pod:1379
7606 #: ../src/guestfs-actions.pod:1398 ../src/guestfs-actions.pod:1501
7607 #: ../src/guestfs-actions.pod:1520 ../src/guestfs-actions.pod:1766
7608 #: ../src/guestfs-actions.pod:2224 ../src/guestfs-actions.pod:2243
7609 #: ../src/guestfs-actions.pod:2286 ../src/guestfs-actions.pod:2310
7610 #: ../src/guestfs-actions.pod:2327 ../src/guestfs-actions.pod:2356
7611 #: ../src/guestfs-actions.pod:5281 ../src/guestfs-actions.pod:5307
7612 #: ../src/guestfs-actions.pod:5438 ../src/guestfs-actions.pod:5464
7613 #: ../src/guestfs-actions.pod:5488 ../src/guestfs-actions.pod:6416
7614 #: ../src/guestfs-actions.pod:6471 ../src/guestfs-actions.pod:6617
7615 #: ../src/guestfs-actions.pod:6641 ../src/guestfs-actions.pod:7310
7616 #: ../src/guestfs-actions.pod:7336 ../src/guestfs-actions.pod:7362
7617 #: ../src/guestfs-actions.pod:7381 ../src/guestfs-actions.pod:7467
7618 #: ../src/guestfs-actions.pod:7486 ../src/guestfs-actions.pod:7532
7619 #: ../src/guestfs-actions.pod:7551 ../fish/guestfish-actions.pod:592
7620 #: ../fish/guestfish-actions.pod:727 ../fish/guestfish-actions.pod:739
7621 #: ../fish/guestfish-actions.pod:915 ../fish/guestfish-actions.pod:925
7622 #: ../fish/guestfish-actions.pod:992 ../fish/guestfish-actions.pod:1002
7623 #: ../fish/guestfish-actions.pod:1194 ../fish/guestfish-actions.pod:1495
7624 #: ../fish/guestfish-actions.pod:1505 ../fish/guestfish-actions.pod:1533
7625 #: ../fish/guestfish-actions.pod:1548 ../fish/guestfish-actions.pod:1558
7626 #: ../fish/guestfish-actions.pod:1577 ../fish/guestfish-actions.pod:3561
7627 #: ../fish/guestfish-actions.pod:3576 ../fish/guestfish-actions.pod:3652
7628 #: ../fish/guestfish-actions.pod:3669 ../fish/guestfish-actions.pod:3684
7629 #: ../fish/guestfish-actions.pod:4338 ../fish/guestfish-actions.pod:4384
7630 #: ../fish/guestfish-actions.pod:4469 ../fish/guestfish-actions.pod:4484
7631 #: ../fish/guestfish-actions.pod:4894 ../fish/guestfish-actions.pod:4912
7632 #: ../fish/guestfish-actions.pod:4929 ../fish/guestfish-actions.pod:4939
7633 #: ../fish/guestfish-actions.pod:4988 ../fish/guestfish-actions.pod:4998
7634 #: ../fish/guestfish-actions.pod:5027 ../fish/guestfish-actions.pod:5037
7636 "Because of the message protocol, there is a transfer limit of somewhere "
7637 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
7641 #: ../src/guestfs-actions.pod:887 ../src/guestfs-actions.pod:3590
7642 #: ../src/guestfs-actions.pod:3652 ../src/guestfs-actions.pod:3669
7643 #: ../src/guestfs-actions.pod:3757 ../src/guestfs-actions.pod:4162
7644 #: ../src/guestfs-actions.pod:4176 ../src/guestfs-actions.pod:5387
7645 #: ../src/guestfs-actions.pod:5401 ../src/guestfs-actions.pod:7190
7646 #: ../src/guestfs-actions.pod:7204
7647 msgid "(Added in 0.4)"
7651 #: ../src/guestfs-actions.pod:889
7652 msgid "guestfs_checksum"
7656 #: ../src/guestfs-actions.pod:891
7660 " guestfs_checksum (guestfs_h *g,\n"
7661 " const char *csumtype,\n"
7662 " const char *path);\n"
7667 #: ../src/guestfs-actions.pod:896 ../fish/guestfish-actions.pod:599
7669 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
7673 #: ../src/guestfs-actions.pod:899 ../fish/guestfish-actions.pod:602
7675 "The type of checksum to compute is given by the C<csumtype> parameter which "
7676 "must have one of the following values:"
7680 #: ../src/guestfs-actions.pod:904 ../fish/guestfish-actions.pod:607
7685 #: ../src/guestfs-actions.pod:906 ../fish/guestfish-actions.pod:609
7687 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
7692 #: ../src/guestfs-actions.pod:909 ../fish/guestfish-actions.pod:612
7697 #: ../src/guestfs-actions.pod:911 ../fish/guestfish-actions.pod:614
7698 msgid "Compute the MD5 hash (using the C<md5sum> program)."
7702 #: ../src/guestfs-actions.pod:913 ../fish/guestfish-actions.pod:616
7707 #: ../src/guestfs-actions.pod:915 ../fish/guestfish-actions.pod:618
7708 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
7712 #: ../src/guestfs-actions.pod:917 ../fish/guestfish-actions.pod:620
7717 #: ../src/guestfs-actions.pod:919 ../fish/guestfish-actions.pod:622
7718 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
7722 #: ../src/guestfs-actions.pod:921 ../fish/guestfish-actions.pod:624
7727 #: ../src/guestfs-actions.pod:923 ../fish/guestfish-actions.pod:626
7728 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
7732 #: ../src/guestfs-actions.pod:925 ../fish/guestfish-actions.pod:628
7737 #: ../src/guestfs-actions.pod:927 ../fish/guestfish-actions.pod:630
7738 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
7742 #: ../src/guestfs-actions.pod:929 ../fish/guestfish-actions.pod:632
7747 #: ../src/guestfs-actions.pod:931 ../fish/guestfish-actions.pod:634
7748 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
7752 #: ../src/guestfs-actions.pod:935 ../fish/guestfish-actions.pod:638
7753 msgid "The checksum is returned as a printable string."
7757 #: ../src/guestfs-actions.pod:937
7758 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
7762 #: ../src/guestfs-actions.pod:939
7763 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
7767 #: ../src/guestfs-actions.pod:944 ../src/guestfs-actions.pod:1252
7768 #: ../src/guestfs-actions.pod:2086 ../src/guestfs-actions.pod:3306
7769 #: ../src/guestfs-actions.pod:3335 ../src/guestfs-actions.pod:3396
7770 #: ../src/guestfs-actions.pod:3423 ../src/guestfs-actions.pod:6887
7771 msgid "(Added in 1.0.2)"
7775 #: ../src/guestfs-actions.pod:946
7776 msgid "guestfs_checksum_device"
7780 #: ../src/guestfs-actions.pod:948
7784 " guestfs_checksum_device (guestfs_h *g,\n"
7785 " const char *csumtype,\n"
7786 " const char *device);\n"
7791 #: ../src/guestfs-actions.pod:953
7793 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
7794 "device named C<device>. For the types of checksums supported see the "
7795 "C<guestfs_checksum> command."
7799 #: ../src/guestfs-actions.pod:960 ../src/guestfs-actions.pod:4918
7800 #: ../src/guestfs-actions.pod:4977 ../src/guestfs-actions.pod:5014
7801 #: ../src/guestfs-actions.pod:5032 ../src/guestfs-actions.pod:5208
7802 #: ../src/guestfs-actions.pod:6796 ../src/guestfs-actions.pod:6810
7803 #: ../src/guestfs-actions.pod:7216
7804 msgid "(Added in 1.3.2)"
7808 #: ../src/guestfs-actions.pod:962
7809 msgid "guestfs_checksums_out"
7813 #: ../src/guestfs-actions.pod:964
7817 " guestfs_checksums_out (guestfs_h *g,\n"
7818 " const char *csumtype,\n"
7819 " const char *directory,\n"
7820 " const char *sumsfile);\n"
7825 #: ../src/guestfs-actions.pod:970 ../fish/guestfish-actions.pod:656
7827 "This command computes the checksums of all regular files in C<directory> and "
7828 "then emits a list of those checksums to the local output file C<sumsfile>."
7832 #: ../src/guestfs-actions.pod:974 ../fish/guestfish-actions.pod:660
7834 "This can be used for verifying the integrity of a virtual machine. However "
7835 "to be properly secure you should pay attention to the output of the checksum "
7836 "command (it uses the ones from GNU coreutils). In particular when the "
7837 "filename is not printable, coreutils uses a special backslash syntax. For "
7838 "more information, see the GNU coreutils info file."
7842 #: ../src/guestfs-actions.pod:984
7843 msgid "(Added in 1.3.7)"
7847 #: ../src/guestfs-actions.pod:986
7848 msgid "guestfs_chmod"
7852 #: ../src/guestfs-actions.pod:988
7856 " guestfs_chmod (guestfs_h *g,\n"
7858 " const char *path);\n"
7863 #: ../src/guestfs-actions.pod:993 ../fish/guestfish-actions.pod:674
7865 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
7870 #: ../src/guestfs-actions.pod:996 ../fish/guestfish-actions.pod:677
7872 "I<Note>: When using this command from guestfish, C<mode> by default would be "
7873 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
7878 #: ../src/guestfs-actions.pod:1000 ../src/guestfs-actions.pod:4413
7879 #: ../src/guestfs-actions.pod:4610 ../src/guestfs-actions.pod:4629
7880 #: ../src/guestfs-actions.pod:4648 ../fish/guestfish-actions.pod:681
7881 #: ../fish/guestfish-actions.pod:3000 ../fish/guestfish-actions.pod:3129
7882 #: ../fish/guestfish-actions.pod:3139 ../fish/guestfish-actions.pod:3149
7883 msgid "The mode actually set is affected by the umask."
7887 #: ../src/guestfs-actions.pod:1006
7888 msgid "guestfs_chown"
7892 #: ../src/guestfs-actions.pod:1008
7896 " guestfs_chown (guestfs_h *g,\n"
7899 " const char *path);\n"
7904 #: ../src/guestfs-actions.pod:1014 ../fish/guestfish-actions.pod:687
7905 msgid "Change the file owner to C<owner> and group to C<group>."
7909 #: ../src/guestfs-actions.pod:1016 ../src/guestfs-actions.pod:3521
7910 #: ../fish/guestfish-actions.pod:689 ../fish/guestfish-actions.pod:2458
7912 "Only numeric uid and gid are supported. If you want to use names, you will "
7913 "need to locate and parse the password file yourself (Augeas support makes "
7914 "this relatively easy)."
7918 #: ../src/guestfs-actions.pod:1024
7919 msgid "guestfs_command"
7923 #: ../src/guestfs-actions.pod:1026
7927 " guestfs_command (guestfs_h *g,\n"
7928 " char *const *arguments);\n"
7933 #: ../src/guestfs-actions.pod:1030 ../fish/guestfish-actions.pod:697
7935 "This call runs a command from the guest filesystem. The filesystem must be "
7936 "mounted, and must contain a compatible operating system (ie. something "
7937 "Linux, with the same or compatible processor architecture)."
7941 #: ../src/guestfs-actions.pod:1035
7943 "The single parameter is an argv-style list of arguments. The first element "
7944 "is the name of the program to run. Subsequent elements are parameters. The "
7945 "list must be non-empty (ie. must contain a program name). Note that the "
7946 "command runs directly, and is I<not> invoked via the shell (see "
7951 #: ../src/guestfs-actions.pod:1042 ../fish/guestfish-actions.pod:709
7952 msgid "The return value is anything printed to I<stdout> by the command."
7956 #: ../src/guestfs-actions.pod:1045 ../fish/guestfish-actions.pod:712
7958 "If the command returns a non-zero exit status, then this function returns an "
7959 "error message. The error message string is the content of I<stderr> from "
7964 #: ../src/guestfs-actions.pod:1049 ../fish/guestfish-actions.pod:716
7966 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
7967 "bin>. If you require a program from another location, you should provide "
7968 "the full path in the first parameter."
7972 #: ../src/guestfs-actions.pod:1054 ../fish/guestfish-actions.pod:721
7974 "Shared libraries and data files required by the program must be available on "
7975 "filesystems which are mounted in the correct places. It is the caller's "
7976 "responsibility to ensure all filesystems that are needed are mounted at the "
7981 #: ../src/guestfs-actions.pod:1066 ../src/guestfs-actions.pod:1086
7982 #: ../src/guestfs-actions.pod:1551
7983 msgid "(Added in 0.9.1)"
7987 #: ../src/guestfs-actions.pod:1068
7988 msgid "guestfs_command_lines"
7992 #: ../src/guestfs-actions.pod:1070
7996 " guestfs_command_lines (guestfs_h *g,\n"
7997 " char *const *arguments);\n"
8002 #: ../src/guestfs-actions.pod:1074
8004 "This is the same as C<guestfs_command>, but splits the result into a list of "
8009 #: ../src/guestfs-actions.pod:1077
8010 msgid "See also: C<guestfs_sh_lines>"
8014 #: ../src/guestfs-actions.pod:1088
8015 msgid "guestfs_config"
8019 #: ../src/guestfs-actions.pod:1090
8023 " guestfs_config (guestfs_h *g,\n"
8024 " const char *qemuparam,\n"
8025 " const char *qemuvalue);\n"
8030 #: ../src/guestfs-actions.pod:1095 ../fish/guestfish-actions.pod:746
8032 "This can be used to add arbitrary qemu command line parameters of the form "
8033 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
8034 "setting some parameters which would interfere with parameters that we use."
8038 #: ../src/guestfs-actions.pod:1100 ../fish/guestfish-actions.pod:751
8039 msgid "The first character of C<param> string must be a C<-> (dash)."
8043 #: ../src/guestfs-actions.pod:1102 ../fish/guestfish-actions.pod:753
8044 msgid "C<value> can be NULL."
8048 #: ../src/guestfs-actions.pod:1108
8049 msgid "guestfs_copy_size"
8053 #: ../src/guestfs-actions.pod:1110
8057 " guestfs_copy_size (guestfs_h *g,\n"
8058 " const char *src,\n"
8059 " const char *dest,\n"
8065 #: ../src/guestfs-actions.pod:1116 ../fish/guestfish-actions.pod:759
8067 "This command copies exactly C<size> bytes from one source device or file "
8068 "C<src> to another destination device or file C<dest>."
8072 #: ../src/guestfs-actions.pod:1119 ../fish/guestfish-actions.pod:762
8074 "Note this will fail if the source is too short or if the destination is not "
8079 #: ../src/guestfs-actions.pod:1124 ../src/guestfs-actions.pod:1247
8080 #: ../src/guestfs-actions.pod:1278 ../src/guestfs-actions.pod:1323
8081 #: ../src/guestfs-actions.pod:1700 ../src/guestfs-actions.pod:1722
8082 #: ../src/guestfs-actions.pod:3502 ../src/guestfs-actions.pod:6882
8083 #: ../src/guestfs-actions.pod:6916 ../src/guestfs-actions.pod:7403
8084 #: ../src/guestfs-actions.pod:7422
8086 "This long-running command can generate progress notification messages so "
8087 "that the caller can display a progress bar or indicator. To receive these "
8088 "messages, the caller must register a progress event callback. See L<guestfs"
8089 "(3)/GUESTFS_EVENT_PROGRESS>."
8093 #: ../src/guestfs-actions.pod:1129 ../src/guestfs-actions.pod:4189
8094 #: ../src/guestfs-actions.pod:5414 ../src/guestfs-actions.pod:7123
8095 #: ../src/guestfs-actions.pod:7143 ../src/guestfs-actions.pod:7229
8096 msgid "(Added in 1.0.87)"
8100 #: ../src/guestfs-actions.pod:1131
8105 #: ../src/guestfs-actions.pod:1133
8109 " guestfs_cp (guestfs_h *g,\n"
8110 " const char *src,\n"
8111 " const char *dest);\n"
8116 #: ../src/guestfs-actions.pod:1138 ../fish/guestfish-actions.pod:769
8118 "This copies a file from C<src> to C<dest> where C<dest> is either a "
8119 "destination filename or destination directory."
8123 #: ../src/guestfs-actions.pod:1143 ../src/guestfs-actions.pod:1157
8124 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:1303
8125 #: ../src/guestfs-actions.pod:1417 ../src/guestfs-actions.pod:4881
8126 #: ../src/guestfs-actions.pod:5258
8127 msgid "(Added in 1.0.18)"
8131 #: ../src/guestfs-actions.pod:1145
8132 msgid "guestfs_cp_a"
8136 #: ../src/guestfs-actions.pod:1147
8140 " guestfs_cp_a (guestfs_h *g,\n"
8141 " const char *src,\n"
8142 " const char *dest);\n"
8147 #: ../src/guestfs-actions.pod:1152 ../fish/guestfish-actions.pod:776
8149 "This copies a file or directory from C<src> to C<dest> recursively using the "
8154 #: ../src/guestfs-actions.pod:1159
8159 #: ../src/guestfs-actions.pod:1161
8163 " guestfs_dd (guestfs_h *g,\n"
8164 " const char *src,\n"
8165 " const char *dest);\n"
8170 #: ../src/guestfs-actions.pod:1166 ../fish/guestfish-actions.pod:783
8172 "This command copies from one source device or file C<src> to another "
8173 "destination device or file C<dest>. Normally you would use this to copy to "
8174 "or from a device or partition, for example to duplicate a filesystem."
8178 #: ../src/guestfs-actions.pod:1171
8180 "If the destination is a device, it must be as large or larger than the "
8181 "source file or device, otherwise the copy will fail. This command cannot do "
8182 "partial copies (see C<guestfs_copy_size>)."
8186 #: ../src/guestfs-actions.pod:1179
8191 #: ../src/guestfs-actions.pod:1181
8195 " guestfs_df (guestfs_h *g);\n"
8200 #: ../src/guestfs-actions.pod:1184 ../fish/guestfish-actions.pod:796
8201 msgid "This command runs the C<df> command to report disk space used."
8205 #: ../src/guestfs-actions.pod:1186 ../src/guestfs-actions.pod:1203
8207 "This command is mostly useful for interactive sessions. It is I<not> "
8208 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
8213 #: ../src/guestfs-actions.pod:1193 ../src/guestfs-actions.pod:1210
8214 #: ../src/guestfs-actions.pod:1328 ../src/guestfs-actions.pod:2289
8215 #: ../src/guestfs-actions.pod:2313 ../src/guestfs-actions.pod:2381
8216 #: ../src/guestfs-actions.pod:4299 ../src/guestfs-actions.pod:4781
8217 #: ../src/guestfs-actions.pod:6620 ../src/guestfs-actions.pod:6644
8218 #: ../src/guestfs-actions.pod:7269 ../src/guestfs-actions.pod:7282
8219 #: ../src/guestfs-actions.pod:7295
8220 msgid "(Added in 1.0.54)"
8224 #: ../src/guestfs-actions.pod:1195
8225 msgid "guestfs_df_h"
8229 #: ../src/guestfs-actions.pod:1197
8233 " guestfs_df_h (guestfs_h *g);\n"
8238 #: ../src/guestfs-actions.pod:1200 ../fish/guestfish-actions.pod:806
8240 "This command runs the C<df -h> command to report disk space used in human-"
8245 #: ../src/guestfs-actions.pod:1212
8246 msgid "guestfs_dmesg"
8250 #: ../src/guestfs-actions.pod:1214
8254 " guestfs_dmesg (guestfs_h *g);\n"
8259 #: ../src/guestfs-actions.pod:1217 ../fish/guestfish-actions.pod:817
8261 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
8262 "This is sometimes useful for extended debugging of problems."
8266 #: ../src/guestfs-actions.pod:1221
8268 "Another way to get the same information is to enable verbose messages with "
8269 "C<guestfs_set_verbose> or by setting the environment variable "
8270 "C<LIBGUESTFS_DEBUG=1> before running the program."
8274 #: ../src/guestfs-actions.pod:1231
8275 msgid "guestfs_download"
8279 #: ../src/guestfs-actions.pod:1233
8283 " guestfs_download (guestfs_h *g,\n"
8284 " const char *remotefilename,\n"
8285 " const char *filename);\n"
8290 #: ../src/guestfs-actions.pod:1238 ../src/guestfs-actions.pod:1263
8291 #: ../fish/guestfish-actions.pod:830 ../fish/guestfish-actions.pod:843
8293 "Download file C<remotefilename> and save it as C<filename> on the local "
8298 #: ../src/guestfs-actions.pod:1241 ../src/guestfs-actions.pod:6876
8299 #: ../fish/guestfish-actions.pod:833 ../fish/guestfish-actions.pod:4642
8300 msgid "C<filename> can also be a named pipe."
8304 #: ../src/guestfs-actions.pod:1243
8305 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
8309 #: ../src/guestfs-actions.pod:1254
8310 msgid "guestfs_download_offset"
8314 #: ../src/guestfs-actions.pod:1256
8318 " guestfs_download_offset (guestfs_h *g,\n"
8319 " const char *remotefilename,\n"
8320 " const char *filename,\n"
8321 " int64_t offset,\n"
8327 #: ../src/guestfs-actions.pod:1266 ../fish/guestfish-actions.pod:846
8329 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
8330 "region must be within the file or device)."
8334 #: ../src/guestfs-actions.pod:1269
8336 "Note that there is no limit on the amount of data that can be downloaded "
8337 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
8338 "full amount unless an error occurs."
8342 #: ../src/guestfs-actions.pod:1274
8343 msgid "See also C<guestfs_download>, C<guestfs_pread>."
8347 #: ../src/guestfs-actions.pod:1283 ../src/guestfs-actions.pod:6921
8348 msgid "(Added in 1.5.17)"
8352 #: ../src/guestfs-actions.pod:1285
8353 msgid "guestfs_drop_caches"
8357 #: ../src/guestfs-actions.pod:1287
8361 " guestfs_drop_caches (guestfs_h *g,\n"
8362 " int whattodrop);\n"
8367 #: ../src/guestfs-actions.pod:1291 ../fish/guestfish-actions.pod:862
8369 "This instructs the guest kernel to drop its page cache, and/or dentries and "
8370 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
8371 "to drop, see L<http://linux-mm.org/Drop_Caches>"
8375 #: ../src/guestfs-actions.pod:1296 ../fish/guestfish-actions.pod:867
8376 msgid "Setting C<whattodrop> to 3 should drop everything."
8380 #: ../src/guestfs-actions.pod:1298 ../fish/guestfish-actions.pod:869
8382 "This automatically calls L<sync(2)> before the operation, so that the "
8383 "maximum guest memory is freed."
8387 #: ../src/guestfs-actions.pod:1305
8392 #: ../src/guestfs-actions.pod:1307
8396 " guestfs_du (guestfs_h *g,\n"
8397 " const char *path);\n"
8402 #: ../src/guestfs-actions.pod:1311 ../fish/guestfish-actions.pod:876
8404 "This command runs the C<du -s> command to estimate file space usage for "
8409 #: ../src/guestfs-actions.pod:1314 ../fish/guestfish-actions.pod:879
8411 "C<path> can be a file or a directory. If C<path> is a directory then the "
8412 "estimate includes the contents of the directory and all subdirectories "
8417 #: ../src/guestfs-actions.pod:1318 ../fish/guestfish-actions.pod:883
8419 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
8423 #: ../src/guestfs-actions.pod:1330
8424 msgid "guestfs_e2fsck_f"
8428 #: ../src/guestfs-actions.pod:1332
8432 " guestfs_e2fsck_f (guestfs_h *g,\n"
8433 " const char *device);\n"
8438 #: ../src/guestfs-actions.pod:1336 ../fish/guestfish-actions.pod:890
8440 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
8441 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
8446 #: ../src/guestfs-actions.pod:1340
8448 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
8449 "Normally you should use C<guestfs_fsck>."
8453 #: ../src/guestfs-actions.pod:1345
8454 msgid "(Added in 1.0.29)"
8458 #: ../src/guestfs-actions.pod:1347
8459 msgid "guestfs_echo_daemon"
8463 #: ../src/guestfs-actions.pod:1349
8467 " guestfs_echo_daemon (guestfs_h *g,\n"
8468 " char *const *words);\n"
8473 #: ../src/guestfs-actions.pod:1353 ../fish/guestfish-actions.pod:901
8475 "This command concatenates the list of C<words> passed with single spaces "
8476 "between them and returns the resulting string."
8480 #: ../src/guestfs-actions.pod:1356 ../fish/guestfish-actions.pod:904
8481 msgid "You can use this command to test the connection through to the daemon."
8485 #: ../src/guestfs-actions.pod:1358
8486 msgid "See also C<guestfs_ping_daemon>."
8490 #: ../src/guestfs-actions.pod:1363 ../src/guestfs-actions.pod:2097
8491 #: ../src/guestfs-actions.pod:6092
8492 msgid "(Added in 1.0.69)"
8496 #: ../src/guestfs-actions.pod:1365
8497 msgid "guestfs_egrep"
8501 #: ../src/guestfs-actions.pod:1367
8505 " guestfs_egrep (guestfs_h *g,\n"
8506 " const char *regex,\n"
8507 " const char *path);\n"
8512 #: ../src/guestfs-actions.pod:1372 ../fish/guestfish-actions.pod:912
8514 "This calls the external C<egrep> program and returns the matching lines."
8518 #: ../src/guestfs-actions.pod:1382 ../src/guestfs-actions.pod:1401
8519 #: ../src/guestfs-actions.pod:1458 ../src/guestfs-actions.pod:1504
8520 #: ../src/guestfs-actions.pod:1523 ../src/guestfs-actions.pod:2227
8521 #: ../src/guestfs-actions.pod:2246 ../src/guestfs-actions.pod:2402
8522 #: ../src/guestfs-actions.pod:2415 ../src/guestfs-actions.pod:2430
8523 #: ../src/guestfs-actions.pod:2476 ../src/guestfs-actions.pod:2498
8524 #: ../src/guestfs-actions.pod:2511 ../src/guestfs-actions.pod:3682
8525 #: ../src/guestfs-actions.pod:3696 ../src/guestfs-actions.pod:3709
8526 #: ../src/guestfs-actions.pod:3723 ../src/guestfs-actions.pod:4709
8527 #: ../src/guestfs-actions.pod:5592 ../src/guestfs-actions.pod:5641
8528 #: ../src/guestfs-actions.pod:6488 ../src/guestfs-actions.pod:6500
8529 #: ../src/guestfs-actions.pod:6513 ../src/guestfs-actions.pod:6526
8530 #: ../src/guestfs-actions.pod:6548 ../src/guestfs-actions.pod:6561
8531 #: ../src/guestfs-actions.pod:6574 ../src/guestfs-actions.pod:6587
8532 #: ../src/guestfs-actions.pod:7365 ../src/guestfs-actions.pod:7384
8533 #: ../src/guestfs-actions.pod:7470 ../src/guestfs-actions.pod:7489
8534 #: ../src/guestfs-actions.pod:7535 ../src/guestfs-actions.pod:7554
8535 msgid "(Added in 1.0.66)"
8539 #: ../src/guestfs-actions.pod:1384
8540 msgid "guestfs_egrepi"
8544 #: ../src/guestfs-actions.pod:1386
8548 " guestfs_egrepi (guestfs_h *g,\n"
8549 " const char *regex,\n"
8550 " const char *path);\n"
8555 #: ../src/guestfs-actions.pod:1391 ../fish/guestfish-actions.pod:922
8557 "This calls the external C<egrep -i> program and returns the matching lines."
8561 #: ../src/guestfs-actions.pod:1403
8562 msgid "guestfs_equal"
8566 #: ../src/guestfs-actions.pod:1405
8570 " guestfs_equal (guestfs_h *g,\n"
8571 " const char *file1,\n"
8572 " const char *file2);\n"
8577 #: ../src/guestfs-actions.pod:1410 ../fish/guestfish-actions.pod:932
8579 "This compares the two files C<file1> and C<file2> and returns true if their "
8580 "content is exactly equal, or false otherwise."
8584 #: ../src/guestfs-actions.pod:1413 ../fish/guestfish-actions.pod:935
8585 msgid "The external L<cmp(1)> program is used for the comparison."
8589 #: ../src/guestfs-actions.pod:1419
8590 msgid "guestfs_exists"
8594 #: ../src/guestfs-actions.pod:1421
8598 " guestfs_exists (guestfs_h *g,\n"
8599 " const char *path);\n"
8604 #: ../src/guestfs-actions.pod:1425 ../fish/guestfish-actions.pod:941
8606 "This returns C<true> if and only if there is a file, directory (or anything) "
8607 "with the given C<path> name."
8611 #: ../src/guestfs-actions.pod:1428
8612 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
8616 #: ../src/guestfs-actions.pod:1434
8617 msgid "guestfs_fallocate"
8621 #: ../src/guestfs-actions.pod:1436
8625 " guestfs_fallocate (guestfs_h *g,\n"
8626 " const char *path,\n"
8632 #: ../src/guestfs-actions.pod:1441 ../src/guestfs-actions.pod:1467
8633 #: ../fish/guestfish-actions.pod:950 ../fish/guestfish-actions.pod:969
8635 "This command preallocates a file (containing zero bytes) named C<path> of "
8636 "size C<len> bytes. If the file exists already, it is overwritten."
8640 #: ../src/guestfs-actions.pod:1445 ../fish/guestfish-actions.pod:954
8642 "Do not confuse this with the guestfish-specific C<alloc> command which "
8643 "allocates a file in the host and attaches it as a device."
8647 #: ../src/guestfs-actions.pod:1451 ../fish/guestfish-actions.pod:958
8649 "This function is deprecated. In new code, use the C<fallocate64> call "
8654 #: ../src/guestfs-actions.pod:1460
8655 msgid "guestfs_fallocate64"
8659 #: ../src/guestfs-actions.pod:1462
8663 " guestfs_fallocate64 (guestfs_h *g,\n"
8664 " const char *path,\n"
8670 #: ../src/guestfs-actions.pod:1471
8672 "Note that this call allocates disk blocks for the file. To create a sparse "
8673 "file use C<guestfs_truncate_size> instead."
8677 #: ../src/guestfs-actions.pod:1474
8679 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
8680 "oversight it only allowed 30 bit lengths to be specified, effectively "
8681 "limiting the maximum size of files created through that call to 1GB."
8685 #: ../src/guestfs-actions.pod:1479 ../fish/guestfish-actions.pod:981
8687 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
8688 "commands which create a file in the host and attach it as a device."
8692 #: ../src/guestfs-actions.pod:1485
8693 msgid "(Added in 1.3.17)"
8697 #: ../src/guestfs-actions.pod:1487
8698 msgid "guestfs_fgrep"
8702 #: ../src/guestfs-actions.pod:1489
8706 " guestfs_fgrep (guestfs_h *g,\n"
8707 " const char *pattern,\n"
8708 " const char *path);\n"
8713 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:989
8715 "This calls the external C<fgrep> program and returns the matching lines."
8719 #: ../src/guestfs-actions.pod:1506
8720 msgid "guestfs_fgrepi"
8724 #: ../src/guestfs-actions.pod:1508
8728 " guestfs_fgrepi (guestfs_h *g,\n"
8729 " const char *pattern,\n"
8730 " const char *path);\n"
8735 #: ../src/guestfs-actions.pod:1513 ../fish/guestfish-actions.pod:999
8737 "This calls the external C<fgrep -i> program and returns the matching lines."
8741 #: ../src/guestfs-actions.pod:1525
8742 msgid "guestfs_file"
8746 #: ../src/guestfs-actions.pod:1527
8750 " guestfs_file (guestfs_h *g,\n"
8751 " const char *path);\n"
8756 #: ../src/guestfs-actions.pod:1531 ../fish/guestfish-actions.pod:1009
8758 "This call uses the standard L<file(1)> command to determine the type or "
8759 "contents of the file."
8763 #: ../src/guestfs-actions.pod:1534 ../fish/guestfish-actions.pod:1012
8765 "This call will also transparently look inside various types of compressed "
8770 #: ../src/guestfs-actions.pod:1537 ../fish/guestfish-actions.pod:1015
8772 "The exact command which runs is C<file -zb path>. Note in particular that "
8773 "the filename is not prepended to the output (the I<-b> option)."
8777 #: ../src/guestfs-actions.pod:1541 ../fish/guestfish-actions.pod:1019
8779 "The output depends on the output of the underlying L<file(1)> command and it "
8780 "can change in future in ways beyond our control. In other words, the output "
8781 "is not guaranteed by the ABI."
8785 #: ../src/guestfs-actions.pod:1545
8787 "See also: L<file(1)>, C<guestfs_vfs_type>, C<guestfs_lstat>, "
8788 "C<guestfs_is_file>, C<guestfs_is_blockdev> (etc), C<guestfs_is_zero>."
8792 #: ../src/guestfs-actions.pod:1553
8793 msgid "guestfs_file_architecture"
8797 #: ../src/guestfs-actions.pod:1555
8801 " guestfs_file_architecture (guestfs_h *g,\n"
8802 " const char *filename);\n"
8807 #: ../src/guestfs-actions.pod:1559 ../fish/guestfish-actions.pod:1030
8809 "This detects the architecture of the binary C<filename>, and returns it if "
8814 #: ../src/guestfs-actions.pod:1562 ../fish/guestfish-actions.pod:1033
8815 msgid "Currently defined architectures are:"
8819 #: ../src/guestfs-actions.pod:1566 ../fish/guestfish-actions.pod:1037
8824 #: ../src/guestfs-actions.pod:1568 ../fish/guestfish-actions.pod:1039
8826 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
8827 "irrespective of the precise processor requirements of the binary."
8831 #: ../src/guestfs-actions.pod:1571 ../fish/guestfish-actions.pod:1042
8836 #: ../src/guestfs-actions.pod:1573 ../fish/guestfish-actions.pod:1044
8837 msgid "64 bit x86-64."
8841 #: ../src/guestfs-actions.pod:1575 ../fish/guestfish-actions.pod:1046
8846 #: ../src/guestfs-actions.pod:1577 ../fish/guestfish-actions.pod:1048
8847 msgid "32 bit SPARC."
8851 #: ../src/guestfs-actions.pod:1579 ../fish/guestfish-actions.pod:1050
8856 #: ../src/guestfs-actions.pod:1581 ../fish/guestfish-actions.pod:1052
8857 msgid "64 bit SPARC V9 and above."
8861 #: ../src/guestfs-actions.pod:1583 ../fish/guestfish-actions.pod:1054
8866 #: ../src/guestfs-actions.pod:1585 ../fish/guestfish-actions.pod:1056
8867 msgid "Intel Itanium."
8868 msgstr "Intel Itanium."
8871 #: ../src/guestfs-actions.pod:1587 ../fish/guestfish-actions.pod:1058
8876 #: ../src/guestfs-actions.pod:1589 ../fish/guestfish-actions.pod:1060
8877 msgid "32 bit Power PC."
8881 #: ../src/guestfs-actions.pod:1591 ../fish/guestfish-actions.pod:1062
8886 #: ../src/guestfs-actions.pod:1593 ../fish/guestfish-actions.pod:1064
8887 msgid "64 bit Power PC."
8891 #: ../src/guestfs-actions.pod:1597 ../fish/guestfish-actions.pod:1068
8892 msgid "Libguestfs may return other architecture strings in future."
8896 #: ../src/guestfs-actions.pod:1599 ../fish/guestfish-actions.pod:1070
8897 msgid "The function works on at least the following types of files:"
8901 #: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1076
8902 msgid "many types of Un*x and Linux binary"
8906 #: ../src/guestfs-actions.pod:1609 ../fish/guestfish-actions.pod:1080
8907 msgid "many types of Un*x and Linux shared library"
8911 #: ../src/guestfs-actions.pod:1613 ../fish/guestfish-actions.pod:1084
8912 msgid "Windows Win32 and Win64 binaries"
8916 #: ../src/guestfs-actions.pod:1617 ../fish/guestfish-actions.pod:1088
8917 msgid "Windows Win32 and Win64 DLLs"
8921 #: ../src/guestfs-actions.pod:1619 ../fish/guestfish-actions.pod:1090
8922 msgid "Win32 binaries and DLLs return C<i386>."
8926 #: ../src/guestfs-actions.pod:1621 ../fish/guestfish-actions.pod:1092
8927 msgid "Win64 binaries and DLLs return C<x86_64>."
8931 #: ../src/guestfs-actions.pod:1625 ../fish/guestfish-actions.pod:1096
8932 msgid "Linux kernel modules"
8936 #: ../src/guestfs-actions.pod:1629 ../fish/guestfish-actions.pod:1100
8937 msgid "Linux new-style initrd images"
8941 #: ../src/guestfs-actions.pod:1633 ../fish/guestfish-actions.pod:1104
8942 msgid "some non-x86 Linux vmlinuz kernels"
8946 #: ../src/guestfs-actions.pod:1637 ../fish/guestfish-actions.pod:1108
8947 msgid "What it can't do currently:"
8951 #: ../src/guestfs-actions.pod:1643 ../fish/guestfish-actions.pod:1114
8952 msgid "static libraries (libfoo.a)"
8956 #: ../src/guestfs-actions.pod:1647 ../fish/guestfish-actions.pod:1118
8957 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
8961 #: ../src/guestfs-actions.pod:1651 ../fish/guestfish-actions.pod:1122
8962 msgid "x86 Linux vmlinuz kernels"
8966 #: ../src/guestfs-actions.pod:1653 ../fish/guestfish-actions.pod:1124
8968 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
8969 "compressed code, and are horribly hard to unpack. If you want to find the "
8970 "architecture of a kernel, use the architecture of the associated initrd or "
8971 "kernel module(s) instead."
8975 #: ../src/guestfs-actions.pod:1663 ../src/guestfs-actions.pod:1826
8976 #: ../src/guestfs-actions.pod:1843 ../src/guestfs-actions.pod:2534
8977 #: ../src/guestfs-actions.pod:2627 ../src/guestfs-actions.pod:2697
8978 #: ../src/guestfs-actions.pod:2785 ../src/guestfs-actions.pod:2806
8979 #: ../src/guestfs-actions.pod:2849 ../src/guestfs-actions.pod:2933
8980 #: ../src/guestfs-actions.pod:3030 ../src/guestfs-actions.pod:3277
8981 #: ../src/guestfs-actions.pod:3409
8982 msgid "(Added in 1.5.3)"
8986 #: ../src/guestfs-actions.pod:1665
8987 msgid "guestfs_filesize"
8991 #: ../src/guestfs-actions.pod:1667
8995 " guestfs_filesize (guestfs_h *g,\n"
8996 " const char *file);\n"
9001 #: ../src/guestfs-actions.pod:1671 ../fish/guestfish-actions.pod:1135
9002 msgid "This command returns the size of C<file> in bytes."
9006 #: ../src/guestfs-actions.pod:1673
9008 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
9009 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
9010 "devices, use C<guestfs_blockdev_getsize64>."
9014 #: ../src/guestfs-actions.pod:1679
9015 msgid "(Added in 1.0.82)"
9019 #: ../src/guestfs-actions.pod:1681
9020 msgid "guestfs_fill"
9024 #: ../src/guestfs-actions.pod:1683
9028 " guestfs_fill (guestfs_h *g,\n"
9031 " const char *path);\n"
9036 #: ../src/guestfs-actions.pod:1689 ../fish/guestfish-actions.pod:1145
9038 "This command creates a new file called C<path>. The initial content of the "
9039 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
9044 #: ../src/guestfs-actions.pod:1693
9046 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
9047 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
9048 "bytes use C<guestfs_fill_pattern>."
9052 #: ../src/guestfs-actions.pod:1705
9053 msgid "(Added in 1.0.79)"
9057 #: ../src/guestfs-actions.pod:1707
9058 msgid "guestfs_fill_pattern"
9062 #: ../src/guestfs-actions.pod:1709
9066 " guestfs_fill_pattern (guestfs_h *g,\n"
9067 " const char *pattern,\n"
9069 " const char *path);\n"
9074 #: ../src/guestfs-actions.pod:1715
9076 "This function is like C<guestfs_fill> except that it creates a new file of "
9077 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
9078 "pattern is truncated if necessary to ensure the length of the file is "
9079 "exactly C<len> bytes."
9083 #: ../src/guestfs-actions.pod:1727
9084 msgid "(Added in 1.3.12)"
9088 #: ../src/guestfs-actions.pod:1729
9089 msgid "guestfs_find"
9093 #: ../src/guestfs-actions.pod:1731
9097 " guestfs_find (guestfs_h *g,\n"
9098 " const char *directory);\n"
9103 #: ../src/guestfs-actions.pod:1735 ../fish/guestfish-actions.pod:1167
9105 "This command lists out all files and directories, recursively, starting at "
9106 "C<directory>. It is essentially equivalent to running the shell command "
9107 "C<find directory -print> but some post-processing happens on the output, "
9112 #: ../src/guestfs-actions.pod:1740 ../fish/guestfish-actions.pod:1172
9114 "This returns a list of strings I<without any prefix>. Thus if the directory "
9119 #: ../src/guestfs-actions.pod:1743 ../fish/guestfish-actions.pod:1175
9129 #: ../src/guestfs-actions.pod:1747
9131 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
9135 #: ../src/guestfs-actions.pod:1750 ../fish/guestfish-actions.pod:1182
9146 #: ../src/guestfs-actions.pod:1755 ../fish/guestfish-actions.pod:1187
9147 msgid "If C<directory> is not a directory, then this command returns an error."
9151 #: ../src/guestfs-actions.pod:1758 ../fish/guestfish-actions.pod:1190
9152 msgid "The returned list is sorted."
9156 #: ../src/guestfs-actions.pod:1760
9157 msgid "See also C<guestfs_find0>."
9161 #: ../src/guestfs-actions.pod:1769 ../src/guestfs-actions.pod:4126
9162 #: ../src/guestfs-actions.pod:5676
9163 msgid "(Added in 1.0.27)"
9167 #: ../src/guestfs-actions.pod:1771
9168 msgid "guestfs_find0"
9172 #: ../src/guestfs-actions.pod:1773
9176 " guestfs_find0 (guestfs_h *g,\n"
9177 " const char *directory,\n"
9178 " const char *files);\n"
9183 #: ../src/guestfs-actions.pod:1778 ../fish/guestfish-actions.pod:1201
9185 "This command lists out all files and directories, recursively, starting at "
9186 "C<directory>, placing the resulting list in the external file called "
9191 #: ../src/guestfs-actions.pod:1782
9193 "This command works the same way as C<guestfs_find> with the following "
9198 #: ../src/guestfs-actions.pod:1789 ../fish/guestfish-actions.pod:1212
9199 msgid "The resulting list is written to an external file."
9203 #: ../src/guestfs-actions.pod:1793 ../fish/guestfish-actions.pod:1216
9205 "Items (filenames) in the result are separated by C<\\0> characters. See "
9206 "L<find(1)> option I<-print0>."
9210 #: ../src/guestfs-actions.pod:1798 ../fish/guestfish-actions.pod:1221
9211 msgid "This command is not limited in the number of names that it can return."
9215 #: ../src/guestfs-actions.pod:1803 ../fish/guestfish-actions.pod:1226
9216 msgid "The result list is not sorted."
9220 #: ../src/guestfs-actions.pod:1809
9221 msgid "(Added in 1.0.74)"
9225 #: ../src/guestfs-actions.pod:1811
9226 msgid "guestfs_findfs_label"
9230 #: ../src/guestfs-actions.pod:1813
9234 " guestfs_findfs_label (guestfs_h *g,\n"
9235 " const char *label);\n"
9240 #: ../src/guestfs-actions.pod:1817 ../fish/guestfish-actions.pod:1236
9242 "This command searches the filesystems and returns the one which has the "
9243 "given label. An error is returned if no such filesystem can be found."
9247 #: ../src/guestfs-actions.pod:1821
9248 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
9252 #: ../src/guestfs-actions.pod:1828
9253 msgid "guestfs_findfs_uuid"
9257 #: ../src/guestfs-actions.pod:1830
9261 " guestfs_findfs_uuid (guestfs_h *g,\n"
9262 " const char *uuid);\n"
9267 #: ../src/guestfs-actions.pod:1834 ../fish/guestfish-actions.pod:1246
9269 "This command searches the filesystems and returns the one which has the "
9270 "given UUID. An error is returned if no such filesystem can be found."
9274 #: ../src/guestfs-actions.pod:1838
9275 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
9279 #: ../src/guestfs-actions.pod:1845
9280 msgid "guestfs_fsck"
9284 #: ../src/guestfs-actions.pod:1847
9288 " guestfs_fsck (guestfs_h *g,\n"
9289 " const char *fstype,\n"
9290 " const char *device);\n"
9295 #: ../src/guestfs-actions.pod:1852 ../fish/guestfish-actions.pod:1256
9297 "This runs the filesystem checker (fsck) on C<device> which should have "
9298 "filesystem type C<fstype>."
9302 #: ../src/guestfs-actions.pod:1855 ../fish/guestfish-actions.pod:1259
9304 "The returned integer is the status. See L<fsck(8)> for the list of status "
9305 "codes from C<fsck>."
9309 #: ../src/guestfs-actions.pod:1864 ../fish/guestfish-actions.pod:1268
9310 msgid "Multiple status codes can be summed together."
9314 #: ../src/guestfs-actions.pod:1868 ../fish/guestfish-actions.pod:1272
9316 "A non-zero return code can mean \"success\", for example if errors have been "
9317 "corrected on the filesystem."
9321 #: ../src/guestfs-actions.pod:1873 ../fish/guestfish-actions.pod:1277
9322 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
9326 #: ../src/guestfs-actions.pod:1878 ../fish/guestfish-actions.pod:1282
9328 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
9332 #: ../src/guestfs-actions.pod:1882 ../src/guestfs-actions.pod:7408
9333 msgid "(Added in 1.0.16)"
9337 #: ../src/guestfs-actions.pod:1884
9338 msgid "guestfs_get_append"
9342 #: ../src/guestfs-actions.pod:1886
9346 " guestfs_get_append (guestfs_h *g);\n"
9351 #: ../src/guestfs-actions.pod:1889 ../fish/guestfish-actions.pod:1288
9353 "Return the additional kernel options which are added to the guest kernel "
9358 #: ../src/guestfs-actions.pod:1892 ../fish/guestfish-actions.pod:1291
9359 msgid "If C<NULL> then no options are added."
9363 #: ../src/guestfs-actions.pod:1894
9365 "This function returns a string which may be NULL. There is no way to return "
9366 "an error from this function. The string is owned by the guest handle and "
9367 "must I<not> be freed."
9371 #: ../src/guestfs-actions.pod:1898 ../src/guestfs-actions.pod:5354
9372 #: ../src/guestfs-actions.pod:5834 ../src/guestfs-actions.pod:6255
9373 #: ../src/guestfs-actions.pod:6274 ../src/guestfs-actions.pod:6290
9374 #: ../src/guestfs-actions.pod:6314 ../src/guestfs-actions.pod:7071
9375 #: ../src/guestfs-actions.pod:7089 ../src/guestfs-actions.pod:7451
9376 msgid "(Added in 1.0.26)"
9380 #: ../src/guestfs-actions.pod:1900
9381 msgid "guestfs_get_attach_method"
9385 #: ../src/guestfs-actions.pod:1902
9389 " guestfs_get_attach_method (guestfs_h *g);\n"
9394 #: ../src/guestfs-actions.pod:1905
9395 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
9399 #: ../src/guestfs-actions.pod:1910
9400 msgid "guestfs_get_autosync"
9404 #: ../src/guestfs-actions.pod:1912
9408 " guestfs_get_autosync (guestfs_h *g);\n"
9413 #: ../src/guestfs-actions.pod:1915 ../fish/guestfish-actions.pod:1303
9414 msgid "Get the autosync flag."
9418 #: ../src/guestfs-actions.pod:1921
9419 msgid "guestfs_get_direct"
9423 #: ../src/guestfs-actions.pod:1923
9427 " guestfs_get_direct (guestfs_h *g);\n"
9432 #: ../src/guestfs-actions.pod:1926 ../fish/guestfish-actions.pod:1309
9433 msgid "Return the direct appliance mode flag."
9437 #: ../src/guestfs-actions.pod:1930 ../src/guestfs-actions.pod:5903
9438 msgid "(Added in 1.0.72)"
9442 #: ../src/guestfs-actions.pod:1932
9443 msgid "guestfs_get_e2label"
9447 #: ../src/guestfs-actions.pod:1934
9451 " guestfs_get_e2label (guestfs_h *g,\n"
9452 " const char *device);\n"
9457 #: ../src/guestfs-actions.pod:1938 ../fish/guestfish-actions.pod:1315
9459 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
9463 #: ../src/guestfs-actions.pod:1944 ../fish/guestfish-actions.pod:1318
9465 "This function is deprecated. In new code, use the C<vfs_label> call instead."
9469 #: ../src/guestfs-actions.pod:1951 ../src/guestfs-actions.pod:1972
9470 #: ../src/guestfs-actions.pod:5921 ../src/guestfs-actions.pod:5940
9471 msgid "(Added in 1.0.15)"
9475 #: ../src/guestfs-actions.pod:1953
9476 msgid "guestfs_get_e2uuid"
9480 #: ../src/guestfs-actions.pod:1955
9484 " guestfs_get_e2uuid (guestfs_h *g,\n"
9485 " const char *device);\n"
9490 #: ../src/guestfs-actions.pod:1959 ../fish/guestfish-actions.pod:1329
9492 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
9496 #: ../src/guestfs-actions.pod:1965 ../fish/guestfish-actions.pod:1332
9498 "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
9502 #: ../src/guestfs-actions.pod:1974
9503 msgid "guestfs_get_memsize"
9507 #: ../src/guestfs-actions.pod:1976
9511 " guestfs_get_memsize (guestfs_h *g);\n"
9516 #: ../src/guestfs-actions.pod:1979 ../fish/guestfish-actions.pod:1343
9518 "This gets the memory size in megabytes allocated to the qemu subprocess."
9522 #: ../src/guestfs-actions.pod:1982
9524 "If C<guestfs_set_memsize> was not called on this handle, and if "
9525 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
9526 "value for memsize."
9530 #: ../src/guestfs-actions.pod:1986 ../src/guestfs-actions.pod:2067
9531 #: ../src/guestfs-actions.pod:5956 ../src/guestfs-actions.pod:6063
9532 #: ../fish/guestfish-actions.pod:1350 ../fish/guestfish-actions.pod:1401
9533 #: ../fish/guestfish-actions.pod:4017 ../fish/guestfish-actions.pod:4104
9535 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
9539 #: ../src/guestfs-actions.pod:1991 ../src/guestfs-actions.pod:4417
9540 #: ../src/guestfs-actions.pod:4614 ../src/guestfs-actions.pod:4633
9541 #: ../src/guestfs-actions.pod:4652 ../src/guestfs-actions.pod:4664
9542 #: ../src/guestfs-actions.pod:4681 ../src/guestfs-actions.pod:4694
9543 #: ../src/guestfs-actions.pod:5579 ../src/guestfs-actions.pod:5961
9544 #: ../src/guestfs-actions.pod:6222 ../src/guestfs-actions.pod:6837
9545 msgid "(Added in 1.0.55)"
9549 #: ../src/guestfs-actions.pod:1993
9550 msgid "guestfs_get_network"
9554 #: ../src/guestfs-actions.pod:1995
9558 " guestfs_get_network (guestfs_h *g);\n"
9563 #: ../src/guestfs-actions.pod:1998 ../fish/guestfish-actions.pod:1357
9564 msgid "This returns the enable network flag."
9568 #: ../src/guestfs-actions.pod:2002 ../src/guestfs-actions.pod:5980
9569 msgid "(Added in 1.5.4)"
9573 #: ../src/guestfs-actions.pod:2004
9574 msgid "guestfs_get_path"
9578 #: ../src/guestfs-actions.pod:2006
9582 " guestfs_get_path (guestfs_h *g);\n"
9587 #: ../src/guestfs-actions.pod:2009 ../fish/guestfish-actions.pod:1363
9588 msgid "Return the current search path."
9592 #: ../src/guestfs-actions.pod:2011 ../fish/guestfish-actions.pod:1365
9594 "This is always non-NULL. If it wasn't set already, then this will return "
9599 #: ../src/guestfs-actions.pod:2014 ../src/guestfs-actions.pod:2043
9601 "This function returns a string, or NULL on error. The string is owned by "
9602 "the guest handle and must I<not> be freed."
9606 #: ../src/guestfs-actions.pod:2019
9607 msgid "guestfs_get_pid"
9611 #: ../src/guestfs-actions.pod:2021
9615 " guestfs_get_pid (guestfs_h *g);\n"
9620 #: ../src/guestfs-actions.pod:2024 ../fish/guestfish-actions.pod:1374
9622 "Return the process ID of the qemu subprocess. If there is no qemu "
9623 "subprocess, then this will return an error."
9627 #: ../src/guestfs-actions.pod:2027 ../fish/guestfish-actions.pod:1377
9628 msgid "This is an internal call used for debugging and testing."
9632 #: ../src/guestfs-actions.pod:2031
9633 msgid "(Added in 1.0.56)"
9637 #: ../src/guestfs-actions.pod:2033
9638 msgid "guestfs_get_qemu"
9642 #: ../src/guestfs-actions.pod:2035
9646 " guestfs_get_qemu (guestfs_h *g);\n"
9651 #: ../src/guestfs-actions.pod:2038 ../fish/guestfish-actions.pod:1383
9652 msgid "Return the current qemu binary."
9656 #: ../src/guestfs-actions.pod:2040 ../fish/guestfish-actions.pod:1385
9658 "This is always non-NULL. If it wasn't set already, then this will return "
9659 "the default qemu binary name."
9663 #: ../src/guestfs-actions.pod:2046 ../src/guestfs-actions.pod:6025
9664 msgid "(Added in 1.0.6)"
9668 #: ../src/guestfs-actions.pod:2048
9669 msgid "guestfs_get_recovery_proc"
9673 #: ../src/guestfs-actions.pod:2050
9677 " guestfs_get_recovery_proc (guestfs_h *g);\n"
9682 #: ../src/guestfs-actions.pod:2053 ../fish/guestfish-actions.pod:1392
9683 msgid "Return the recovery process enabled flag."
9687 #: ../src/guestfs-actions.pod:2057 ../src/guestfs-actions.pod:3527
9688 #: ../src/guestfs-actions.pod:3824 ../src/guestfs-actions.pod:4224
9689 #: ../src/guestfs-actions.pod:4256 ../src/guestfs-actions.pod:5284
9690 #: ../src/guestfs-actions.pod:5627 ../src/guestfs-actions.pod:6049
9691 #: ../src/guestfs-actions.pod:6740 ../src/guestfs-actions.pod:6760
9692 #: ../src/guestfs-actions.pod:6952
9693 msgid "(Added in 1.0.77)"
9697 #: ../src/guestfs-actions.pod:2059
9698 msgid "guestfs_get_selinux"
9702 #: ../src/guestfs-actions.pod:2061
9706 " guestfs_get_selinux (guestfs_h *g);\n"
9711 #: ../src/guestfs-actions.pod:2064
9713 "This returns the current setting of the selinux flag which is passed to the "
9714 "appliance at boot time. See C<guestfs_set_selinux>."
9718 #: ../src/guestfs-actions.pod:2072 ../src/guestfs-actions.pod:2135
9719 #: ../src/guestfs-actions.pod:6068 ../src/guestfs-actions.pod:6126
9720 msgid "(Added in 1.0.67)"
9724 #: ../src/guestfs-actions.pod:2074
9725 msgid "guestfs_get_state"
9729 #: ../src/guestfs-actions.pod:2076
9733 " guestfs_get_state (guestfs_h *g);\n"
9738 #: ../src/guestfs-actions.pod:2079 ../fish/guestfish-actions.pod:1408
9740 "This returns the current state as an opaque integer. This is only useful "
9741 "for printing debug and internal error messages."
9745 #: ../src/guestfs-actions.pod:2082 ../src/guestfs-actions.pod:3302
9746 #: ../src/guestfs-actions.pod:3331 ../src/guestfs-actions.pod:3392
9747 #: ../src/guestfs-actions.pod:3419 ../fish/guestfish-actions.pod:1411
9748 #: ../fish/guestfish-actions.pod:2325 ../fish/guestfish-actions.pod:2343
9749 #: ../fish/guestfish-actions.pod:2381 ../fish/guestfish-actions.pod:2397
9750 msgid "For more information on states, see L<guestfs(3)>."
9754 #: ../src/guestfs-actions.pod:2088
9755 msgid "guestfs_get_trace"
9759 #: ../src/guestfs-actions.pod:2090
9763 " guestfs_get_trace (guestfs_h *g);\n"
9768 #: ../src/guestfs-actions.pod:2093 ../fish/guestfish-actions.pod:1417
9769 msgid "Return the command trace flag."
9773 #: ../src/guestfs-actions.pod:2099
9774 msgid "guestfs_get_umask"
9778 #: ../src/guestfs-actions.pod:2101
9782 " guestfs_get_umask (guestfs_h *g);\n"
9787 #: ../src/guestfs-actions.pod:2104
9789 "Return the current umask. By default the umask is C<022> unless it has been "
9790 "set by calling C<guestfs_umask>."
9794 #: ../src/guestfs-actions.pod:2111
9795 msgid "guestfs_get_verbose"
9799 #: ../src/guestfs-actions.pod:2113
9803 " guestfs_get_verbose (guestfs_h *g);\n"
9808 #: ../src/guestfs-actions.pod:2116 ../fish/guestfish-actions.pod:1430
9809 msgid "This returns the verbose messages flag."
9813 #: ../src/guestfs-actions.pod:2122
9814 msgid "guestfs_getcon"
9818 #: ../src/guestfs-actions.pod:2124
9822 " guestfs_getcon (guestfs_h *g);\n"
9827 #: ../src/guestfs-actions.pod:2127 ../fish/guestfish-actions.pod:1436
9828 msgid "This gets the SELinux security context of the daemon."
9832 #: ../src/guestfs-actions.pod:2129
9834 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
9838 #: ../src/guestfs-actions.pod:2137
9839 msgid "guestfs_getxattr"
9843 #: ../src/guestfs-actions.pod:2139
9847 " guestfs_getxattr (guestfs_h *g,\n"
9848 " const char *path,\n"
9849 " const char *name,\n"
9850 " size_t *size_r);\n"
9855 #: ../src/guestfs-actions.pod:2145
9857 "Get a single extended attribute from file C<path> named C<name>. This call "
9858 "follows symlinks. If you want to lookup an extended attribute for the "
9859 "symlink itself, use C<guestfs_lgetxattr>."
9863 #: ../src/guestfs-actions.pod:2149 ../src/guestfs-actions.pod:3541
9865 "Normally it is better to get all extended attributes from a file in one go "
9866 "by calling C<guestfs_getxattrs>. However some Linux filesystem "
9867 "implementations are buggy and do not provide a way to list out attributes. "
9868 "For these filesystems (notably ntfs-3g) you have to know the names of the "
9869 "extended attributes you want in advance and call this function."
9873 #: ../src/guestfs-actions.pod:2156 ../src/guestfs-actions.pod:3548
9874 #: ../fish/guestfish-actions.pod:1456 ../fish/guestfish-actions.pod:2477
9876 "Extended attribute values are blobs of binary data. If there is no extended "
9877 "attribute named C<name>, this returns an error."
9881 #: ../src/guestfs-actions.pod:2159
9882 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
9886 #: ../src/guestfs-actions.pod:2161 ../src/guestfs-actions.pod:2352
9887 #: ../src/guestfs-actions.pod:3553 ../src/guestfs-actions.pod:5277
9888 #: ../src/guestfs-actions.pod:5303 ../src/guestfs-actions.pod:5484
9890 "This function returns a buffer, or NULL on error. The size of the returned "
9891 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
9896 #: ../src/guestfs-actions.pod:2165 ../src/guestfs-actions.pod:3557
9897 msgid "(Added in 1.7.24)"
9901 #: ../src/guestfs-actions.pod:2167
9902 msgid "guestfs_getxattrs"
9906 #: ../src/guestfs-actions.pod:2169
9909 " struct guestfs_xattr_list *\n"
9910 " guestfs_getxattrs (guestfs_h *g,\n"
9911 " const char *path);\n"
9916 #: ../src/guestfs-actions.pod:2173 ../fish/guestfish-actions.pod:1465
9918 "This call lists the extended attributes of the file or directory C<path>."
9922 #: ../src/guestfs-actions.pod:2176 ../fish/guestfish-actions.pod:1468
9924 "At the system call level, this is a combination of the L<listxattr(2)> and "
9925 "L<getxattr(2)> calls."
9929 #: ../src/guestfs-actions.pod:2179
9930 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
9934 #: ../src/guestfs-actions.pod:2181 ../src/guestfs-actions.pod:3569
9935 #: ../src/guestfs-actions.pod:4220
9937 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
9938 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
9942 #: ../src/guestfs-actions.pod:2185 ../src/guestfs-actions.pod:3573
9943 #: ../src/guestfs-actions.pod:3738 ../src/guestfs-actions.pod:3774
9944 #: ../src/guestfs-actions.pod:5657 ../src/guestfs-actions.pod:6145
9945 #: ../src/guestfs-actions.pod:7516
9946 msgid "(Added in 1.0.59)"
9950 #: ../src/guestfs-actions.pod:2187
9951 msgid "guestfs_glob_expand"
9955 #: ../src/guestfs-actions.pod:2189
9959 " guestfs_glob_expand (guestfs_h *g,\n"
9960 " const char *pattern);\n"
9965 #: ../src/guestfs-actions.pod:2193 ../fish/guestfish-actions.pod:1477
9967 "This command searches for all the pathnames matching C<pattern> according to "
9968 "the wildcard expansion rules used by the shell."
9972 #: ../src/guestfs-actions.pod:2197 ../fish/guestfish-actions.pod:1481
9974 "If no paths match, then this returns an empty list (note: not an error)."
9978 #: ../src/guestfs-actions.pod:2200 ../fish/guestfish-actions.pod:1484
9980 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
9981 "GLOB_BRACE>. See that manual page for more details."
9985 #: ../src/guestfs-actions.pod:2208 ../src/guestfs-actions.pod:6338
9986 #: ../src/guestfs-actions.pod:6355
9987 msgid "(Added in 1.0.50)"
9991 #: ../src/guestfs-actions.pod:2210
9992 msgid "guestfs_grep"
9996 #: ../src/guestfs-actions.pod:2212
10000 " guestfs_grep (guestfs_h *g,\n"
10001 " const char *regex,\n"
10002 " const char *path);\n"
10007 #: ../src/guestfs-actions.pod:2217 ../fish/guestfish-actions.pod:1492
10008 msgid "This calls the external C<grep> program and returns the matching lines."
10012 #: ../src/guestfs-actions.pod:2229
10013 msgid "guestfs_grepi"
10017 #: ../src/guestfs-actions.pod:2231
10021 " guestfs_grepi (guestfs_h *g,\n"
10022 " const char *regex,\n"
10023 " const char *path);\n"
10028 #: ../src/guestfs-actions.pod:2236 ../fish/guestfish-actions.pod:1502
10030 "This calls the external C<grep -i> program and returns the matching lines."
10034 #: ../src/guestfs-actions.pod:2248
10035 msgid "guestfs_grub_install"
10039 #: ../src/guestfs-actions.pod:2250
10043 " guestfs_grub_install (guestfs_h *g,\n"
10044 " const char *root,\n"
10045 " const char *device);\n"
10050 #: ../src/guestfs-actions.pod:2255 ../fish/guestfish-actions.pod:1512
10052 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
10053 "the root directory being C<root>."
10057 #: ../src/guestfs-actions.pod:2258 ../fish/guestfish-actions.pod:1515
10059 "Note: If grub-install reports the error \"No suitable drive was found in the "
10060 "generated device map.\" it may be that you need to create a C</boot/grub/"
10061 "device.map> file first that contains the mapping between grub device names "
10062 "and Linux device names. It is usually sufficient to create a file "
10067 #: ../src/guestfs-actions.pod:2265 ../fish/guestfish-actions.pod:1522
10070 " (hd0) /dev/vda\n"
10075 #: ../src/guestfs-actions.pod:2267 ../fish/guestfish-actions.pod:1524
10076 msgid "replacing C</dev/vda> with the name of the installation device."
10080 #: ../src/guestfs-actions.pod:2271
10081 msgid "(Added in 1.0.17)"
10085 #: ../src/guestfs-actions.pod:2273
10086 msgid "guestfs_head"
10090 #: ../src/guestfs-actions.pod:2275
10094 " guestfs_head (guestfs_h *g,\n"
10095 " const char *path);\n"
10100 #: ../src/guestfs-actions.pod:2279 ../fish/guestfish-actions.pod:1530
10102 "This command returns up to the first 10 lines of a file as a list of strings."
10106 #: ../src/guestfs-actions.pod:2291
10107 msgid "guestfs_head_n"
10111 #: ../src/guestfs-actions.pod:2293
10115 " guestfs_head_n (guestfs_h *g,\n"
10117 " const char *path);\n"
10122 #: ../src/guestfs-actions.pod:2298 ../fish/guestfish-actions.pod:1540
10124 "If the parameter C<nrlines> is a positive number, this returns the first "
10125 "C<nrlines> lines of the file C<path>."
10129 #: ../src/guestfs-actions.pod:2301 ../fish/guestfish-actions.pod:1543
10131 "If the parameter C<nrlines> is a negative number, this returns lines from "
10132 "the file C<path>, excluding the last C<nrlines> lines."
10136 #: ../src/guestfs-actions.pod:2304 ../src/guestfs-actions.pod:6635
10137 #: ../fish/guestfish-actions.pod:1546 ../fish/guestfish-actions.pod:4482
10138 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
10142 #: ../src/guestfs-actions.pod:2315
10143 msgid "guestfs_hexdump"
10147 #: ../src/guestfs-actions.pod:2317
10151 " guestfs_hexdump (guestfs_h *g,\n"
10152 " const char *path);\n"
10157 #: ../src/guestfs-actions.pod:2321 ../fish/guestfish-actions.pod:1555
10159 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
10160 "readable, canonical hex dump of the file."
10164 #: ../src/guestfs-actions.pod:2330 ../src/guestfs-actions.pod:6419
10165 #: ../src/guestfs-actions.pod:6474
10166 msgid "(Added in 1.0.22)"
10170 #: ../src/guestfs-actions.pod:2332
10171 msgid "guestfs_initrd_cat"
10175 #: ../src/guestfs-actions.pod:2334
10179 " guestfs_initrd_cat (guestfs_h *g,\n"
10180 " const char *initrdpath,\n"
10181 " const char *filename,\n"
10182 " size_t *size_r);\n"
10187 #: ../src/guestfs-actions.pod:2340 ../fish/guestfish-actions.pod:1565
10189 "This command unpacks the file C<filename> from the initrd file called "
10190 "C<initrdpath>. The filename must be given I<without> the initial C</> "
10195 #: ../src/guestfs-actions.pod:2344 ../fish/guestfish-actions.pod:1569
10197 "For example, in guestfish you could use the following command to examine the "
10198 "boot script (usually called C</init>) contained in a Linux initrd or "
10203 #: ../src/guestfs-actions.pod:2348 ../fish/guestfish-actions.pod:1573
10206 " initrd-cat /boot/initrd-<version>.img init\n"
10211 #: ../src/guestfs-actions.pod:2350
10212 msgid "See also C<guestfs_initrd_list>."
10216 #: ../src/guestfs-actions.pod:2361
10217 msgid "guestfs_initrd_list"
10221 #: ../src/guestfs-actions.pod:2363
10225 " guestfs_initrd_list (guestfs_h *g,\n"
10226 " const char *path);\n"
10231 #: ../src/guestfs-actions.pod:2367 ../fish/guestfish-actions.pod:1584
10232 msgid "This command lists out files contained in an initrd."
10236 #: ../src/guestfs-actions.pod:2369 ../fish/guestfish-actions.pod:1586
10238 "The files are listed without any initial C</> character. The files are "
10239 "listed in the order they appear (not necessarily alphabetical). Directory "
10240 "names are listed as separate items."
10244 #: ../src/guestfs-actions.pod:2373 ../fish/guestfish-actions.pod:1590
10246 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
10247 "initrd. We I<only> support the newer initramfs format (compressed cpio "
10252 #: ../src/guestfs-actions.pod:2383
10253 msgid "guestfs_inotify_add_watch"
10257 #: ../src/guestfs-actions.pod:2385
10261 " guestfs_inotify_add_watch (guestfs_h *g,\n"
10262 " const char *path,\n"
10268 #: ../src/guestfs-actions.pod:2390 ../fish/guestfish-actions.pod:1598
10269 msgid "Watch C<path> for the events listed in C<mask>."
10273 #: ../src/guestfs-actions.pod:2392 ../fish/guestfish-actions.pod:1600
10275 "Note that if C<path> is a directory then events within that directory are "
10276 "watched, but this does I<not> happen recursively (in subdirectories)."
10280 #: ../src/guestfs-actions.pod:2396 ../fish/guestfish-actions.pod:1604
10282 "Note for non-C or non-Linux callers: the inotify events are defined by the "
10283 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
10287 #: ../src/guestfs-actions.pod:2404
10288 msgid "guestfs_inotify_close"
10292 #: ../src/guestfs-actions.pod:2406
10296 " guestfs_inotify_close (guestfs_h *g);\n"
10301 #: ../src/guestfs-actions.pod:2409 ../fish/guestfish-actions.pod:1612
10303 "This closes the inotify handle which was previously opened by inotify_init. "
10304 "It removes all watches, throws away any pending events, and deallocates all "
10309 #: ../src/guestfs-actions.pod:2417
10310 msgid "guestfs_inotify_files"
10314 #: ../src/guestfs-actions.pod:2419
10318 " guestfs_inotify_files (guestfs_h *g);\n"
10323 #: ../src/guestfs-actions.pod:2422
10325 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
10326 "returns a list of pathnames of objects that were touched. The returned "
10327 "pathnames are sorted and deduplicated."
10331 #: ../src/guestfs-actions.pod:2432
10332 msgid "guestfs_inotify_init"
10336 #: ../src/guestfs-actions.pod:2434
10340 " guestfs_inotify_init (guestfs_h *g,\n"
10341 " int maxevents);\n"
10346 #: ../src/guestfs-actions.pod:2438 ../fish/guestfish-actions.pod:1628
10348 "This command creates a new inotify handle. The inotify subsystem can be "
10349 "used to notify events which happen to objects in the guest filesystem."
10353 #: ../src/guestfs-actions.pod:2442
10355 "C<maxevents> is the maximum number of events which will be queued up between "
10356 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
10357 "passed as C<0>, then the kernel (or previously set) default is used. For "
10358 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
10359 "throws away events, but records the fact that it threw them away by setting "
10360 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
10361 "C<guestfs_inotify_read>)."
10365 #: ../src/guestfs-actions.pod:2452
10367 "Before any events are generated, you have to add some watches to the "
10368 "internal watch list. See: C<guestfs_inotify_add_watch>, "
10369 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
10373 #: ../src/guestfs-actions.pod:2458
10375 "Queued up events should be read periodically by calling "
10376 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
10377 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
10378 "often enough then you risk the internal queue overflowing."
10382 #: ../src/guestfs-actions.pod:2465
10384 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
10385 "This also removes any watches automatically."
10389 #: ../src/guestfs-actions.pod:2469 ../fish/guestfish-actions.pod:1659
10391 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
10392 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
10393 "that there is one global inotify handle per libguestfs instance."
10397 #: ../src/guestfs-actions.pod:2478
10398 msgid "guestfs_inotify_read"
10402 #: ../src/guestfs-actions.pod:2480
10405 " struct guestfs_inotify_event_list *\n"
10406 " guestfs_inotify_read (guestfs_h *g);\n"
10411 #: ../src/guestfs-actions.pod:2483 ../fish/guestfish-actions.pod:1668
10413 "Return the complete queue of events that have happened since the previous "
10418 #: ../src/guestfs-actions.pod:2486 ../fish/guestfish-actions.pod:1671
10419 msgid "If no events have happened, this returns an empty list."
10423 #: ../src/guestfs-actions.pod:2488 ../fish/guestfish-actions.pod:1673
10425 "I<Note>: In order to make sure that all events have been read, you must call "
10426 "this function repeatedly until it returns an empty list. The reason is that "
10427 "the call will read events up to the maximum appliance-to-host message size "
10428 "and leave remaining events in the queue."
10432 #: ../src/guestfs-actions.pod:2494
10434 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
10435 "there was an error. I<The caller must call "
10436 "C<guestfs_free_inotify_event_list> after use>."
10440 #: ../src/guestfs-actions.pod:2500
10441 msgid "guestfs_inotify_rm_watch"
10445 #: ../src/guestfs-actions.pod:2502
10449 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
10455 #: ../src/guestfs-actions.pod:2506
10457 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
10461 #: ../src/guestfs-actions.pod:2513
10462 msgid "guestfs_inspect_get_arch"
10466 #: ../src/guestfs-actions.pod:2515
10470 " guestfs_inspect_get_arch (guestfs_h *g,\n"
10471 " const char *root);\n"
10476 #: ../src/guestfs-actions.pod:2519 ../src/guestfs-actions.pod:2542
10477 #: ../src/guestfs-actions.pod:2635 ../src/guestfs-actions.pod:2679
10478 #: ../src/guestfs-actions.pod:2705 ../src/guestfs-actions.pod:2744
10479 #: ../src/guestfs-actions.pod:2766 ../src/guestfs-actions.pod:2793
10480 #: ../src/guestfs-actions.pod:2814 ../src/guestfs-actions.pod:2857
10481 #: ../src/guestfs-actions.pod:2886 ../src/guestfs-actions.pod:2917
10482 #: ../src/guestfs-actions.pod:2941 ../src/guestfs-actions.pod:2996
10483 #: ../src/guestfs-actions.pod:3038 ../src/guestfs-actions.pod:3059
10484 #: ../src/guestfs-actions.pod:3082 ../src/guestfs-actions.pod:3099
10485 #: ../src/guestfs-actions.pod:3116 ../src/guestfs-actions.pod:3135
10487 "This function should only be called with a root device string as returned by "
10488 "C<guestfs_inspect_os>."
10492 #: ../src/guestfs-actions.pod:2522
10494 "This returns the architecture of the inspected operating system. The "
10495 "possible return values are listed under C<guestfs_file_architecture>."
10499 #: ../src/guestfs-actions.pod:2526 ../fish/guestfish-actions.pod:1697
10501 "If the architecture could not be determined, then the string C<unknown> is "
10506 #: ../src/guestfs-actions.pod:2529 ../src/guestfs-actions.pod:2622
10507 #: ../src/guestfs-actions.pod:2733 ../src/guestfs-actions.pod:2753
10508 #: ../src/guestfs-actions.pod:2781 ../src/guestfs-actions.pod:2873
10509 #: ../src/guestfs-actions.pod:2904 ../src/guestfs-actions.pod:2928
10510 #: ../src/guestfs-actions.pod:2982 ../src/guestfs-actions.pod:3025
10511 #: ../src/guestfs-actions.pod:3048 ../src/guestfs-actions.pod:3069
10512 #: ../src/guestfs-actions.pod:3089 ../src/guestfs-actions.pod:3106
10513 #: ../src/guestfs-actions.pod:3125 ../src/guestfs-actions.pod:3228
10514 #: ../src/guestfs-actions.pod:3269 ../fish/guestfish-actions.pod:1700
10515 #: ../fish/guestfish-actions.pod:1786 ../fish/guestfish-actions.pod:1874
10516 #: ../fish/guestfish-actions.pod:1889 ../fish/guestfish-actions.pod:1910
10517 #: ../fish/guestfish-actions.pod:1980 ../fish/guestfish-actions.pod:2004
10518 #: ../fish/guestfish-actions.pod:2021 ../fish/guestfish-actions.pod:2064
10519 #: ../fish/guestfish-actions.pod:2099 ../fish/guestfish-actions.pod:2115
10520 #: ../fish/guestfish-actions.pod:2131 ../fish/guestfish-actions.pod:2144
10521 #: ../fish/guestfish-actions.pod:2157 ../fish/guestfish-actions.pod:2172
10522 #: ../fish/guestfish-actions.pod:2271 ../fish/guestfish-actions.pod:2305
10523 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
10527 #: ../src/guestfs-actions.pod:2536
10528 msgid "guestfs_inspect_get_distro"
10532 #: ../src/guestfs-actions.pod:2538
10536 " guestfs_inspect_get_distro (guestfs_h *g,\n"
10537 " const char *root);\n"
10542 #: ../src/guestfs-actions.pod:2545 ../fish/guestfish-actions.pod:1709
10544 "This returns the distro (distribution) of the inspected operating system."
10548 #: ../src/guestfs-actions.pod:2548 ../fish/guestfish-actions.pod:1712
10549 msgid "Currently defined distros are:"
10553 #: ../src/guestfs-actions.pod:2552 ../fish/guestfish-actions.pod:1716
10554 msgid "\"archlinux\""
10555 msgstr "\"archlinux\""
10558 #: ../src/guestfs-actions.pod:2554 ../fish/guestfish-actions.pod:1718
10559 msgid "Arch Linux."
10560 msgstr "Arch Linux."
10563 #: ../src/guestfs-actions.pod:2556 ../fish/guestfish-actions.pod:1720
10565 #| msgid "\"gentoo\""
10567 msgstr "\"gentoo\""
10570 #: ../src/guestfs-actions.pod:2558 ../fish/guestfish-actions.pod:1722
10575 #: ../src/guestfs-actions.pod:2560 ../fish/guestfish-actions.pod:1724
10577 msgstr "\"debian\""
10580 #: ../src/guestfs-actions.pod:2562 ../fish/guestfish-actions.pod:1726
10585 #: ../src/guestfs-actions.pod:2564 ../fish/guestfish-actions.pod:1728
10587 msgstr "\"fedora\""
10590 #: ../src/guestfs-actions.pod:2566 ../fish/guestfish-actions.pod:1730
10595 #: ../src/guestfs-actions.pod:2568 ../fish/guestfish-actions.pod:1732
10597 msgstr "\"gentoo\""
10600 #: ../src/guestfs-actions.pod:2570 ../fish/guestfish-actions.pod:1734
10605 #: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:1736
10606 msgid "\"linuxmint\""
10607 msgstr "\"linuxmint\""
10610 #: ../src/guestfs-actions.pod:2574 ../fish/guestfish-actions.pod:1738
10611 msgid "Linux Mint."
10612 msgstr "Linux Mint."
10615 #: ../src/guestfs-actions.pod:2576 ../fish/guestfish-actions.pod:1740
10616 msgid "\"mandriva\""
10617 msgstr "\"mandriva\""
10620 #: ../src/guestfs-actions.pod:2578 ../fish/guestfish-actions.pod:1742
10625 #: ../src/guestfs-actions.pod:2580 ../fish/guestfish-actions.pod:1744
10630 #: ../src/guestfs-actions.pod:2582 ../fish/guestfish-actions.pod:1746
10635 #: ../src/guestfs-actions.pod:2584 ../fish/guestfish-actions.pod:1748
10637 msgstr "\"pardus\""
10640 #: ../src/guestfs-actions.pod:2586 ../fish/guestfish-actions.pod:1750
10645 #: ../src/guestfs-actions.pod:2588 ../fish/guestfish-actions.pod:1752
10646 msgid "\"redhat-based\""
10647 msgstr "\"redhat-based\""
10650 #: ../src/guestfs-actions.pod:2590 ../fish/guestfish-actions.pod:1754
10651 msgid "Some Red Hat-derived distro."
10652 msgstr "Дистрибутив, що походить від Red Hat."
10655 #: ../src/guestfs-actions.pod:2592 ../fish/guestfish-actions.pod:1756
10660 #: ../src/guestfs-actions.pod:2594 ../fish/guestfish-actions.pod:1758
10662 #| msgid "Red Hat Enterprise Linux and some derivatives."
10663 msgid "Red Hat Enterprise Linux."
10664 msgstr "Red Hat Enterprise Linux та деякі з похідних дистрибутивів."
10667 #: ../src/guestfs-actions.pod:2596 ../fish/guestfish-actions.pod:1760
10668 msgid "\"scientificlinux\""
10672 #: ../src/guestfs-actions.pod:2598 ../fish/guestfish-actions.pod:1762
10673 msgid "Scientific Linux."
10677 #: ../src/guestfs-actions.pod:2600 ../fish/guestfish-actions.pod:1764
10678 msgid "\"slackware\""
10682 #: ../src/guestfs-actions.pod:2602 ../fish/guestfish-actions.pod:1766
10687 #: ../src/guestfs-actions.pod:2604 ../fish/guestfish-actions.pod:1768
10689 msgstr "\"ubuntu\""
10692 #: ../src/guestfs-actions.pod:2606 ../fish/guestfish-actions.pod:1770
10697 #: ../src/guestfs-actions.pod:2608 ../src/guestfs-actions.pod:2724
10698 #: ../src/guestfs-actions.pod:3016 ../fish/guestfish-actions.pod:1772
10699 #: ../fish/guestfish-actions.pod:1865 ../fish/guestfish-actions.pod:2090
10700 msgid "\"unknown\""
10701 msgstr "\"unknown\""
10704 #: ../src/guestfs-actions.pod:2610 ../fish/guestfish-actions.pod:1774
10705 msgid "The distro could not be determined."
10706 msgstr "Дистрибутив, тип якого не вдалося визначити."
10709 #: ../src/guestfs-actions.pod:2612 ../src/guestfs-actions.pod:3008
10710 #: ../fish/guestfish-actions.pod:1776 ../fish/guestfish-actions.pod:2082
10711 msgid "\"windows\""
10712 msgstr "\"windows\""
10715 #: ../src/guestfs-actions.pod:2614 ../fish/guestfish-actions.pod:1778
10717 "Windows does not have distributions. This string is returned if the OS type "
10722 #: ../src/guestfs-actions.pod:2619 ../src/guestfs-actions.pod:2730
10723 #: ../src/guestfs-actions.pod:3022 ../fish/guestfish-actions.pod:1783
10724 #: ../fish/guestfish-actions.pod:1871 ../fish/guestfish-actions.pod:2096
10726 "Future versions of libguestfs may return other strings here. The caller "
10727 "should be prepared to handle any string."
10731 #: ../src/guestfs-actions.pod:2629
10732 msgid "guestfs_inspect_get_drive_mappings"
10736 #: ../src/guestfs-actions.pod:2631
10740 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
10741 " const char *root);\n"
10746 #: ../src/guestfs-actions.pod:2638 ../fish/guestfish-actions.pod:1795
10748 "This call is useful for Windows which uses a primitive system of assigning "
10749 "drive letters (like \"C:\") to partitions. This inspection API examines the "
10750 "Windows Registry to find out how disks/partitions are mapped to drive "
10751 "letters, and returns a hash table as in the example below:"
10755 #: ../src/guestfs-actions.pod:2644 ../fish/guestfish-actions.pod:1801
10758 " C => /dev/vda2\n"
10759 " E => /dev/vdb1\n"
10760 " F => /dev/vdc1\n"
10765 #: ../src/guestfs-actions.pod:2648 ../fish/guestfish-actions.pod:1805
10767 "Note that keys are drive letters. For Windows, the key is case insensitive "
10768 "and just contains the drive letter, without the customary colon separator "
10773 #: ../src/guestfs-actions.pod:2652 ../fish/guestfish-actions.pod:1809
10775 "In future we may support other operating systems that also used drive "
10776 "letters, but the keys for those might not be case insensitive and might be "
10777 "longer than 1 character. For example in OS-9, hard drives were named C<h0>, "
10782 #: ../src/guestfs-actions.pod:2657 ../fish/guestfish-actions.pod:1814
10784 "For Windows guests, currently only hard drive mappings are returned. "
10785 "Removable disks (eg. DVD-ROMs) are ignored."
10789 #: ../src/guestfs-actions.pod:2660 ../fish/guestfish-actions.pod:1817
10791 "For guests that do not use drive mappings, or if the drive mappings could "
10792 "not be determined, this returns an empty hash table."
10796 #: ../src/guestfs-actions.pod:2663
10798 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10799 "C<guestfs_inspect_get_mountpoints>, C<guestfs_inspect_get_filesystems>."
10803 #: ../src/guestfs-actions.pod:2667 ../src/guestfs-actions.pod:2843
10804 #: ../src/guestfs-actions.pod:3626 ../src/guestfs-actions.pod:4843
10805 #: ../src/guestfs-actions.pod:6776
10807 "This function returns a NULL-terminated array of strings, or NULL if there "
10808 "was an error. The array of strings will always have length C<2n+1>, where "
10809 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
10810 "caller must free the strings and the array after use>."
10814 #: ../src/guestfs-actions.pod:2673
10815 msgid "guestfs_inspect_get_filesystems"
10819 #: ../src/guestfs-actions.pod:2675
10823 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
10824 " const char *root);\n"
10829 #: ../src/guestfs-actions.pod:2682 ../fish/guestfish-actions.pod:1831
10831 "This returns a list of all the filesystems that we think are associated with "
10832 "this operating system. This includes the root filesystem, other ordinary "
10833 "filesystems, and non-mounted devices like swap partitions."
10837 #: ../src/guestfs-actions.pod:2687 ../fish/guestfish-actions.pod:1836
10839 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
10840 "to be shared between operating systems."
10844 #: ../src/guestfs-actions.pod:2690
10846 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10847 "C<guestfs_inspect_get_mountpoints>."
10851 #: ../src/guestfs-actions.pod:2699
10852 msgid "guestfs_inspect_get_format"
10856 #: ../src/guestfs-actions.pod:2701
10860 " guestfs_inspect_get_format (guestfs_h *g,\n"
10861 " const char *root);\n"
10866 #: ../src/guestfs-actions.pod:2708 ../fish/guestfish-actions.pod:1849
10868 "This returns the format of the inspected operating system. You can use it "
10869 "to detect install images, live CDs and similar."
10873 #: ../src/guestfs-actions.pod:2711 ../fish/guestfish-actions.pod:1852
10874 msgid "Currently defined formats are:"
10878 #: ../src/guestfs-actions.pod:2715 ../fish/guestfish-actions.pod:1856
10879 msgid "\"installed\""
10880 msgstr "\"installed\""
10883 #: ../src/guestfs-actions.pod:2717 ../fish/guestfish-actions.pod:1858
10884 msgid "This is an installed operating system."
10885 msgstr "Це встановлена операційна система."
10888 #: ../src/guestfs-actions.pod:2719 ../fish/guestfish-actions.pod:1860
10889 msgid "\"installer\""
10893 #: ../src/guestfs-actions.pod:2721 ../fish/guestfish-actions.pod:1862
10895 "The disk image being inspected is not an installed operating system, but a "
10896 "I<bootable> install disk, live CD, or similar."
10900 #: ../src/guestfs-actions.pod:2726 ../fish/guestfish-actions.pod:1867
10901 msgid "The format of this disk image is not known."
10905 #: ../src/guestfs-actions.pod:2738
10906 msgid "guestfs_inspect_get_hostname"
10910 #: ../src/guestfs-actions.pod:2740
10914 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
10915 " const char *root);\n"
10920 #: ../src/guestfs-actions.pod:2747 ../fish/guestfish-actions.pod:1883
10922 "This function returns the hostname of the operating system as found by "
10923 "inspection of the guest's configuration files."
10927 #: ../src/guestfs-actions.pod:2750 ../fish/guestfish-actions.pod:1886
10929 "If the hostname could not be determined, then the string C<unknown> is "
10934 #: ../src/guestfs-actions.pod:2758
10935 msgid "(Added in 1.7.9)"
10939 #: ../src/guestfs-actions.pod:2760
10940 msgid "guestfs_inspect_get_major_version"
10944 #: ../src/guestfs-actions.pod:2762
10948 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
10949 " const char *root);\n"
10954 #: ../src/guestfs-actions.pod:2769 ../fish/guestfish-actions.pod:1898
10956 "This returns the major version number of the inspected operating system."
10960 #: ../src/guestfs-actions.pod:2772 ../fish/guestfish-actions.pod:1901
10962 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
10963 "popular public names used by the operating system. Notably the operating "
10964 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
10965 "1). You can find out the real versions corresponding to releases of Windows "
10966 "by consulting Wikipedia or MSDN."
10970 #: ../src/guestfs-actions.pod:2779 ../src/guestfs-actions.pod:2799
10971 #: ../fish/guestfish-actions.pod:1908 ../fish/guestfish-actions.pod:1922
10972 msgid "If the version could not be determined, then C<0> is returned."
10976 #: ../src/guestfs-actions.pod:2787
10977 msgid "guestfs_inspect_get_minor_version"
10981 #: ../src/guestfs-actions.pod:2789
10985 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
10986 " const char *root);\n"
10991 #: ../src/guestfs-actions.pod:2796 ../fish/guestfish-actions.pod:1919
10993 "This returns the minor version number of the inspected operating system."
10997 #: ../src/guestfs-actions.pod:2801
10999 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11000 "C<guestfs_inspect_get_major_version>."
11004 #: ../src/guestfs-actions.pod:2808
11005 msgid "guestfs_inspect_get_mountpoints"
11009 #: ../src/guestfs-actions.pod:2810
11013 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
11014 " const char *root);\n"
11019 #: ../src/guestfs-actions.pod:2817 ../fish/guestfish-actions.pod:1934
11021 "This returns a hash of where we think the filesystems associated with this "
11022 "operating system should be mounted. Callers should note that this is at "
11023 "best an educated guess made by reading configuration files such as C</etc/"
11024 "fstab>. I<In particular note> that this may return filesystems which are "
11025 "non-existent or not mountable and callers should be prepared to handle or "
11026 "ignore failures if they try to mount them."
11030 #: ../src/guestfs-actions.pod:2826 ../fish/guestfish-actions.pod:1943
11032 "Each element in the returned hashtable has a key which is the path of the "
11033 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
11034 "mounted there (eg. C</dev/sda1>)."
11038 #: ../src/guestfs-actions.pod:2831 ../fish/guestfish-actions.pod:1948
11040 "Non-mounted devices such as swap devices are I<not> returned in this list."
11044 #: ../src/guestfs-actions.pod:2834
11046 "For operating systems like Windows which still use drive letters, this call "
11047 "will only return an entry for the first drive \"mounted on\" C</>. For "
11048 "information about the mapping of drive letters to partitions, see "
11049 "C<guestfs_inspect_get_drive_mappings>."
11053 #: ../src/guestfs-actions.pod:2840
11055 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11056 "C<guestfs_inspect_get_filesystems>."
11060 #: ../src/guestfs-actions.pod:2851
11061 msgid "guestfs_inspect_get_package_format"
11065 #: ../src/guestfs-actions.pod:2853
11069 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
11070 " const char *root);\n"
11075 #: ../src/guestfs-actions.pod:2860
11077 "This function and C<guestfs_inspect_get_package_management> return the "
11078 "package format and package management tool used by the inspected operating "
11079 "system. For example for Fedora these functions would return C<rpm> (package "
11080 "format) and C<yum> (package management)."
11084 #: ../src/guestfs-actions.pod:2866 ../fish/guestfish-actions.pod:1973
11086 "This returns the string C<unknown> if we could not determine the package "
11087 "format I<or> if the operating system does not have a real packaging system "
11092 #: ../src/guestfs-actions.pod:2870 ../fish/guestfish-actions.pod:1977
11094 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>. "
11095 "Future versions of libguestfs may return other strings."
11099 #: ../src/guestfs-actions.pod:2878 ../src/guestfs-actions.pod:2909
11100 msgid "(Added in 1.7.5)"
11104 #: ../src/guestfs-actions.pod:2880
11105 msgid "guestfs_inspect_get_package_management"
11109 #: ../src/guestfs-actions.pod:2882
11113 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
11114 " const char *root);\n"
11119 #: ../src/guestfs-actions.pod:2889
11121 "C<guestfs_inspect_get_package_format> and this function return the package "
11122 "format and package management tool used by the inspected operating system. "
11123 "For example for Fedora these functions would return C<rpm> (package format) "
11124 "and C<yum> (package management)."
11128 #: ../src/guestfs-actions.pod:2895 ../fish/guestfish-actions.pod:1995
11130 "This returns the string C<unknown> if we could not determine the package "
11131 "management tool I<or> if the operating system does not have a real packaging "
11132 "system (eg. Windows)."
11136 #: ../src/guestfs-actions.pod:2899 ../fish/guestfish-actions.pod:1999
11138 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
11139 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>. Future versions of "
11140 "libguestfs may return other strings."
11144 #: ../src/guestfs-actions.pod:2911
11145 msgid "guestfs_inspect_get_product_name"
11149 #: ../src/guestfs-actions.pod:2913
11153 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
11154 " const char *root);\n"
11159 #: ../src/guestfs-actions.pod:2920 ../fish/guestfish-actions.pod:2013
11161 "This returns the product name of the inspected operating system. The "
11162 "product name is generally some freeform string which can be displayed to the "
11163 "user, but should not be parsed by programs."
11167 #: ../src/guestfs-actions.pod:2925 ../fish/guestfish-actions.pod:2018
11169 "If the product name could not be determined, then the string C<unknown> is "
11174 #: ../src/guestfs-actions.pod:2935
11175 msgid "guestfs_inspect_get_product_variant"
11179 #: ../src/guestfs-actions.pod:2937
11183 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
11184 " const char *root);\n"
11189 #: ../src/guestfs-actions.pod:2944 ../fish/guestfish-actions.pod:2030
11191 #| msgid "This is an installed operating system."
11192 msgid "This returns the product variant of the inspected operating system."
11193 msgstr "Це встановлена операційна система."
11196 #: ../src/guestfs-actions.pod:2947 ../fish/guestfish-actions.pod:2033
11198 "For Windows guests, this returns the contents of the Registry key C<HKLM"
11199 "\\Software\\Microsoft\\Windows NT\\CurrentVersion> C<InstallationType> which "
11200 "is usually a string such as C<Client> or C<Server> (other values are "
11201 "possible). This can be used to distinguish consumer and enterprise versions "
11202 "of Windows that have the same version number (for example, Windows 7 and "
11203 "Windows 2008 Server are both version 6.1, but the former is C<Client> and "
11204 "the latter is C<Server>)."
11208 #: ../src/guestfs-actions.pod:2956 ../fish/guestfish-actions.pod:2042
11210 "For enterprise Linux guests, in future we intend this to return the product "
11211 "variant such as C<Desktop>, C<Server> and so on. But this is not "
11212 "implemented at present."
11216 #: ../src/guestfs-actions.pod:2960 ../fish/guestfish-actions.pod:2046
11218 "If the product variant could not be determined, then the string C<unknown> "
11223 #: ../src/guestfs-actions.pod:2963
11225 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11226 "C<guestfs_inspect_get_product_name>, C<guestfs_inspect_get_major_version>."
11230 #: ../src/guestfs-actions.pod:2970
11231 msgid "guestfs_inspect_get_roots"
11235 #: ../src/guestfs-actions.pod:2972
11239 " guestfs_inspect_get_roots (guestfs_h *g);\n"
11244 #: ../src/guestfs-actions.pod:2975
11246 "This function is a convenient way to get the list of root devices, as "
11247 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
11248 "the whole inspection process."
11252 #: ../src/guestfs-actions.pod:2979
11254 "This returns an empty list if either no root devices were found or the "
11255 "caller has not called C<guestfs_inspect_os>."
11259 #: ../src/guestfs-actions.pod:2988
11260 msgid "(Added in 1.7.3)"
11264 #: ../src/guestfs-actions.pod:2990
11265 msgid "guestfs_inspect_get_type"
11269 #: ../src/guestfs-actions.pod:2992
11273 " guestfs_inspect_get_type (guestfs_h *g,\n"
11274 " const char *root);\n"
11279 #: ../src/guestfs-actions.pod:2999 ../fish/guestfish-actions.pod:2073
11281 "This returns the type of the inspected operating system. Currently defined "
11286 #: ../src/guestfs-actions.pod:3004 ../fish/guestfish-actions.pod:2078
11291 #: ../src/guestfs-actions.pod:3006 ../fish/guestfish-actions.pod:2080
11292 msgid "Any Linux-based operating system."
11296 #: ../src/guestfs-actions.pod:3010 ../fish/guestfish-actions.pod:2084
11297 msgid "Any Microsoft Windows operating system."
11301 #: ../src/guestfs-actions.pod:3012 ../fish/guestfish-actions.pod:2086
11302 msgid "\"freebsd\""
11303 msgstr "\"freebsd\""
11306 #: ../src/guestfs-actions.pod:3014 ../fish/guestfish-actions.pod:2088
11311 #: ../src/guestfs-actions.pod:3018 ../fish/guestfish-actions.pod:2092
11312 msgid "The operating system type could not be determined."
11316 #: ../src/guestfs-actions.pod:3032
11317 msgid "guestfs_inspect_get_windows_current_control_set"
11321 #: ../src/guestfs-actions.pod:3034
11325 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
11326 " const char *root);\n"
11331 #: ../src/guestfs-actions.pod:3041 ../fish/guestfish-actions.pod:2108
11333 "This returns the Windows CurrentControlSet of the inspected guest. The "
11334 "CurrentControlSet is a registry key name such as C<ControlSet001>."
11338 #: ../src/guestfs-actions.pod:3044 ../fish/guestfish-actions.pod:2111
11340 "This call assumes that the guest is Windows and that the Registry could be "
11341 "examined by inspection. If this is not the case then an error is returned."
11345 #: ../src/guestfs-actions.pod:3053
11346 msgid "guestfs_inspect_get_windows_systemroot"
11350 #: ../src/guestfs-actions.pod:3055
11354 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
11355 " const char *root);\n"
11360 #: ../src/guestfs-actions.pod:3062 ../fish/guestfish-actions.pod:2124
11362 "This returns the Windows systemroot of the inspected guest. The systemroot "
11363 "is a directory path such as C</WINDOWS>."
11367 #: ../src/guestfs-actions.pod:3065 ../fish/guestfish-actions.pod:2127
11369 "This call assumes that the guest is Windows and that the systemroot could be "
11370 "determined by inspection. If this is not the case then an error is returned."
11374 #: ../src/guestfs-actions.pod:3074
11375 msgid "(Added in 1.5.25)"
11379 #: ../src/guestfs-actions.pod:3076
11380 msgid "guestfs_inspect_is_live"
11384 #: ../src/guestfs-actions.pod:3078
11388 " guestfs_inspect_is_live (guestfs_h *g,\n"
11389 " const char *root);\n"
11394 #: ../src/guestfs-actions.pod:3085
11396 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
11397 "disk), then this returns true if a live image was detected on the disk."
11401 #: ../src/guestfs-actions.pod:3093
11402 msgid "guestfs_inspect_is_multipart"
11406 #: ../src/guestfs-actions.pod:3095
11410 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
11411 " const char *root);\n"
11416 #: ../src/guestfs-actions.pod:3102
11418 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
11419 "disk), then this returns true if the disk is part of a set."
11423 #: ../src/guestfs-actions.pod:3110
11424 msgid "guestfs_inspect_is_netinst"
11428 #: ../src/guestfs-actions.pod:3112
11432 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
11433 " const char *root);\n"
11438 #: ../src/guestfs-actions.pod:3119
11440 "If C<guestfs_inspect_get_format> returns C<installer> (this is an install "
11441 "disk), then this returns true if the disk is a network installer, ie. not a "
11442 "self-contained install CD but one which is likely to require network access "
11443 "to complete the install."
11447 #: ../src/guestfs-actions.pod:3129
11448 msgid "guestfs_inspect_list_applications"
11452 #: ../src/guestfs-actions.pod:3131
11455 " struct guestfs_application_list *\n"
11456 " guestfs_inspect_list_applications (guestfs_h *g,\n"
11457 " const char *root);\n"
11462 #: ../src/guestfs-actions.pod:3138 ../fish/guestfish-actions.pod:2181
11463 msgid "Return the list of applications installed in the operating system."
11467 #: ../src/guestfs-actions.pod:3140
11469 "I<Note:> This call works differently from other parts of the inspection "
11470 "API. You have to call C<guestfs_inspect_os>, then "
11471 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
11472 "this. Listing applications is a significantly more difficult operation "
11473 "which requires access to the full filesystem. Also note that unlike the "
11474 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
11475 "the libguestfs handle, this call actually reads parts of the mounted "
11476 "filesystems during the call."
11480 #: ../src/guestfs-actions.pod:3150 ../fish/guestfish-actions.pod:2193
11482 "This returns an empty list if the inspection code was not able to determine "
11483 "the list of applications."
11487 #: ../src/guestfs-actions.pod:3153 ../fish/guestfish-actions.pod:2196
11488 msgid "The application structure contains the following fields:"
11492 #: ../src/guestfs-actions.pod:3157 ../fish/guestfish-actions.pod:2200
11493 msgid "C<app_name>"
11494 msgstr "C<app_name>"
11497 #: ../src/guestfs-actions.pod:3159 ../fish/guestfish-actions.pod:2202
11499 "The name of the application. For Red Hat-derived and Debian-derived Linux "
11500 "guests, this is the package name."
11504 #: ../src/guestfs-actions.pod:3162 ../fish/guestfish-actions.pod:2205
11505 msgid "C<app_display_name>"
11506 msgstr "C<app_display_name>"
11509 #: ../src/guestfs-actions.pod:3164 ../fish/guestfish-actions.pod:2207
11511 "The display name of the application, sometimes localized to the install "
11512 "language of the guest operating system."
11516 #: ../src/guestfs-actions.pod:3167 ../fish/guestfish-actions.pod:2210
11518 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
11519 "to display something can use C<app_name> instead."
11523 #: ../src/guestfs-actions.pod:3170 ../fish/guestfish-actions.pod:2213
11524 msgid "C<app_epoch>"
11525 msgstr "C<app_epoch>"
11528 #: ../src/guestfs-actions.pod:3172 ../fish/guestfish-actions.pod:2215
11530 "For package managers which use epochs, this contains the epoch of the "
11531 "package (an integer). If unavailable, this is returned as C<0>."
11535 #: ../src/guestfs-actions.pod:3175 ../fish/guestfish-actions.pod:2218
11536 msgid "C<app_version>"
11537 msgstr "C<app_version>"
11540 #: ../src/guestfs-actions.pod:3177 ../fish/guestfish-actions.pod:2220
11542 "The version string of the application or package. If unavailable this is "
11543 "returned as an empty string C<\"\">."
11547 #: ../src/guestfs-actions.pod:3180 ../fish/guestfish-actions.pod:2223
11548 msgid "C<app_release>"
11549 msgstr "C<app_release>"
11552 #: ../src/guestfs-actions.pod:3182 ../fish/guestfish-actions.pod:2225
11554 "The release string of the application or package, for package managers that "
11555 "use this. If unavailable this is returned as an empty string C<\"\">."
11559 #: ../src/guestfs-actions.pod:3186 ../fish/guestfish-actions.pod:2229
11560 msgid "C<app_install_path>"
11561 msgstr "C<app_install_path>"
11564 #: ../src/guestfs-actions.pod:3188 ../fish/guestfish-actions.pod:2231
11566 "The installation path of the application (on operating systems such as "
11567 "Windows which use installation paths). This path is in the format used by "
11568 "the guest operating system, it is not a libguestfs path."
11572 #: ../src/guestfs-actions.pod:3193 ../fish/guestfish-actions.pod:2236
11573 msgid "If unavailable this is returned as an empty string C<\"\">."
11577 #: ../src/guestfs-actions.pod:3195 ../fish/guestfish-actions.pod:2238
11578 msgid "C<app_trans_path>"
11579 msgstr "C<app_trans_path>"
11582 #: ../src/guestfs-actions.pod:3197 ../fish/guestfish-actions.pod:2240
11584 "The install path translated into a libguestfs path. If unavailable this is "
11585 "returned as an empty string C<\"\">."
11589 #: ../src/guestfs-actions.pod:3200 ../fish/guestfish-actions.pod:2243
11590 msgid "C<app_publisher>"
11591 msgstr "C<app_publisher>"
11594 #: ../src/guestfs-actions.pod:3202 ../fish/guestfish-actions.pod:2245
11596 "The name of the publisher of the application, for package managers that use "
11597 "this. If unavailable this is returned as an empty string C<\"\">."
11601 #: ../src/guestfs-actions.pod:3206 ../fish/guestfish-actions.pod:2249
11603 msgstr "C<app_url>"
11606 #: ../src/guestfs-actions.pod:3208 ../fish/guestfish-actions.pod:2251
11608 "The URL (eg. upstream URL) of the application. If unavailable this is "
11609 "returned as an empty string C<\"\">."
11613 #: ../src/guestfs-actions.pod:3211 ../fish/guestfish-actions.pod:2254
11614 msgid "C<app_source_package>"
11618 #: ../src/guestfs-actions.pod:3213 ../fish/guestfish-actions.pod:2256
11620 "For packaging systems which support this, the name of the source package. "
11621 "If unavailable this is returned as an empty string C<\"\">."
11625 #: ../src/guestfs-actions.pod:3216 ../fish/guestfish-actions.pod:2259
11626 msgid "C<app_summary>"
11630 #: ../src/guestfs-actions.pod:3218 ../fish/guestfish-actions.pod:2261
11632 "A short (usually one line) description of the application or package. If "
11633 "unavailable this is returned as an empty string C<\"\">."
11637 #: ../src/guestfs-actions.pod:3221 ../fish/guestfish-actions.pod:2264
11638 msgid "C<app_description>"
11642 #: ../src/guestfs-actions.pod:3223 ../fish/guestfish-actions.pod:2266
11644 "A longer description of the application or package. If unavailable this is "
11645 "returned as an empty string C<\"\">."
11649 #: ../src/guestfs-actions.pod:3230
11651 "This function returns a C<struct guestfs_application_list *>, or NULL if "
11652 "there was an error. I<The caller must call C<guestfs_free_application_list> "
11657 #: ../src/guestfs-actions.pod:3234
11658 msgid "(Added in 1.7.8)"
11662 #: ../src/guestfs-actions.pod:3236
11663 msgid "guestfs_inspect_os"
11667 #: ../src/guestfs-actions.pod:3238
11671 " guestfs_inspect_os (guestfs_h *g);\n"
11676 #: ../src/guestfs-actions.pod:3241 ../fish/guestfish-actions.pod:2277
11678 "This function uses other libguestfs functions and certain heuristics to "
11679 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
11680 "for operating systems."
11684 #: ../src/guestfs-actions.pod:3245 ../fish/guestfish-actions.pod:2281
11685 msgid "The list returned is empty if no operating systems were found."
11689 #: ../src/guestfs-actions.pod:3247 ../fish/guestfish-actions.pod:2283
11691 "If one operating system was found, then this returns a list with a single "
11692 "element, which is the name of the root filesystem of this operating system. "
11693 "It is also possible for this function to return a list containing more than "
11694 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
11695 "element being the root filesystem of one of the operating systems."
11699 #: ../src/guestfs-actions.pod:3254
11701 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
11702 "functions in order to query further information about each operating system, "
11703 "such as the name and version."
11707 #: ../src/guestfs-actions.pod:3259
11709 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
11710 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
11711 "the contents. This should be called with no disks currently mounted. The "
11712 "function may also use Augeas, so any existing Augeas handle will be closed."
11716 #: ../src/guestfs-actions.pod:3265 ../fish/guestfish-actions.pod:2301
11718 "This function cannot decrypt encrypted disks. The caller must do that first "
11719 "(supplying the necessary keys) if the disk is encrypted."
11723 #: ../src/guestfs-actions.pod:3271 ../src/guestfs-actions.pod:3584
11724 #: ../src/guestfs-actions.pod:3646
11725 msgid "See also C<guestfs_list_filesystems>."
11729 #: ../src/guestfs-actions.pod:3279
11730 msgid "guestfs_is_blockdev"
11734 #: ../src/guestfs-actions.pod:3281
11738 " guestfs_is_blockdev (guestfs_h *g,\n"
11739 " const char *path);\n"
11744 #: ../src/guestfs-actions.pod:3285 ../fish/guestfish-actions.pod:2313
11746 "This returns C<true> if and only if there is a block device with the given "
11751 #: ../src/guestfs-actions.pod:3288 ../src/guestfs-actions.pod:3317
11752 #: ../src/guestfs-actions.pod:3347 ../src/guestfs-actions.pod:3362
11753 #: ../src/guestfs-actions.pod:3378 ../src/guestfs-actions.pod:3434
11754 #: ../src/guestfs-actions.pod:3449
11755 msgid "See also C<guestfs_stat>."
11759 #: ../src/guestfs-actions.pod:3292 ../src/guestfs-actions.pod:3321
11760 #: ../src/guestfs-actions.pod:3366 ../src/guestfs-actions.pod:3438
11761 #: ../src/guestfs-actions.pod:3453
11762 msgid "(Added in 1.5.10)"
11766 #: ../src/guestfs-actions.pod:3294
11767 msgid "guestfs_is_busy"
11771 #: ../src/guestfs-actions.pod:3296
11775 " guestfs_is_busy (guestfs_h *g);\n"
11780 #: ../src/guestfs-actions.pod:3299 ../fish/guestfish-actions.pod:2322
11782 "This returns true iff this handle is busy processing a command (in the "
11787 #: ../src/guestfs-actions.pod:3308
11788 msgid "guestfs_is_chardev"
11792 #: ../src/guestfs-actions.pod:3310
11796 " guestfs_is_chardev (guestfs_h *g,\n"
11797 " const char *path);\n"
11802 #: ../src/guestfs-actions.pod:3314 ../fish/guestfish-actions.pod:2331
11804 "This returns C<true> if and only if there is a character device with the "
11805 "given C<path> name."
11809 #: ../src/guestfs-actions.pod:3323
11810 msgid "guestfs_is_config"
11814 #: ../src/guestfs-actions.pod:3325
11818 " guestfs_is_config (guestfs_h *g);\n"
11823 #: ../src/guestfs-actions.pod:3328 ../fish/guestfish-actions.pod:2340
11825 "This returns true iff this handle is being configured (in the C<CONFIG> "
11830 #: ../src/guestfs-actions.pod:3337
11831 msgid "guestfs_is_dir"
11835 #: ../src/guestfs-actions.pod:3339
11839 " guestfs_is_dir (guestfs_h *g,\n"
11840 " const char *path);\n"
11845 #: ../src/guestfs-actions.pod:3343 ../fish/guestfish-actions.pod:2349
11847 "This returns C<true> if and only if there is a directory with the given "
11848 "C<path> name. Note that it returns false for other objects like files."
11852 #: ../src/guestfs-actions.pod:3353
11853 msgid "guestfs_is_fifo"
11857 #: ../src/guestfs-actions.pod:3355
11861 " guestfs_is_fifo (guestfs_h *g,\n"
11862 " const char *path);\n"
11867 #: ../src/guestfs-actions.pod:3359 ../fish/guestfish-actions.pod:2359
11869 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
11870 "given C<path> name."
11874 #: ../src/guestfs-actions.pod:3368
11875 msgid "guestfs_is_file"
11879 #: ../src/guestfs-actions.pod:3370
11883 " guestfs_is_file (guestfs_h *g,\n"
11884 " const char *path);\n"
11889 #: ../src/guestfs-actions.pod:3374 ../fish/guestfish-actions.pod:2368
11891 "This returns C<true> if and only if there is a regular file with the given "
11892 "C<path> name. Note that it returns false for other objects like directories."
11896 #: ../src/guestfs-actions.pod:3384
11897 msgid "guestfs_is_launching"
11901 #: ../src/guestfs-actions.pod:3386
11905 " guestfs_is_launching (guestfs_h *g);\n"
11910 #: ../src/guestfs-actions.pod:3389 ../fish/guestfish-actions.pod:2378
11912 "This returns true iff this handle is launching the subprocess (in the "
11913 "C<LAUNCHING> state)."
11917 #: ../src/guestfs-actions.pod:3398
11918 msgid "guestfs_is_lv"
11922 #: ../src/guestfs-actions.pod:3400
11926 " guestfs_is_lv (guestfs_h *g,\n"
11927 " const char *device);\n"
11932 #: ../src/guestfs-actions.pod:3404 ../fish/guestfish-actions.pod:2387
11934 "This command tests whether C<device> is a logical volume, and returns true "
11935 "iff this is the case."
11939 #: ../src/guestfs-actions.pod:3411
11940 msgid "guestfs_is_ready"
11944 #: ../src/guestfs-actions.pod:3413
11948 " guestfs_is_ready (guestfs_h *g);\n"
11953 #: ../src/guestfs-actions.pod:3416 ../fish/guestfish-actions.pod:2394
11955 "This returns true iff this handle is ready to accept commands (in the "
11960 #: ../src/guestfs-actions.pod:3425
11961 msgid "guestfs_is_socket"
11965 #: ../src/guestfs-actions.pod:3427
11969 " guestfs_is_socket (guestfs_h *g,\n"
11970 " const char *path);\n"
11975 #: ../src/guestfs-actions.pod:3431 ../fish/guestfish-actions.pod:2403
11977 "This returns C<true> if and only if there is a Unix domain socket with the "
11978 "given C<path> name."
11982 #: ../src/guestfs-actions.pod:3440
11983 msgid "guestfs_is_symlink"
11987 #: ../src/guestfs-actions.pod:3442
11991 " guestfs_is_symlink (guestfs_h *g,\n"
11992 " const char *path);\n"
11997 #: ../src/guestfs-actions.pod:3446 ../fish/guestfish-actions.pod:2412
11999 "This returns C<true> if and only if there is a symbolic link with the given "
12004 #: ../src/guestfs-actions.pod:3455
12005 msgid "guestfs_is_zero"
12009 #: ../src/guestfs-actions.pod:3457
12013 " guestfs_is_zero (guestfs_h *g,\n"
12014 " const char *path);\n"
12019 #: ../src/guestfs-actions.pod:3461 ../fish/guestfish-actions.pod:2421
12021 "This returns true iff the file exists and the file is empty or it contains "
12026 #: ../src/guestfs-actions.pod:3466
12027 msgid "guestfs_is_zero_device"
12031 #: ../src/guestfs-actions.pod:3468
12035 " guestfs_is_zero_device (guestfs_h *g,\n"
12036 " const char *device);\n"
12041 #: ../src/guestfs-actions.pod:3472 ../fish/guestfish-actions.pod:2428
12042 msgid "This returns true iff the device exists and contains all zero bytes."
12046 #: ../src/guestfs-actions.pod:3474 ../fish/guestfish-actions.pod:2430
12047 msgid "Note that for large devices this can take a long time to run."
12051 #: ../src/guestfs-actions.pod:3478
12052 msgid "guestfs_kill_subprocess"
12056 #: ../src/guestfs-actions.pod:3480
12060 " guestfs_kill_subprocess (guestfs_h *g);\n"
12065 #: ../src/guestfs-actions.pod:3483 ../fish/guestfish-actions.pod:2436
12066 msgid "This kills the qemu subprocess. You should never need to call this."
12070 #: ../src/guestfs-actions.pod:3489
12071 msgid "guestfs_launch"
12075 #: ../src/guestfs-actions.pod:3491
12079 " guestfs_launch (guestfs_h *g);\n"
12084 #: ../src/guestfs-actions.pod:3494 ../fish/guestfish-actions.pod:2444
12086 "Internally libguestfs is implemented by running a virtual machine using "
12091 #: ../src/guestfs-actions.pod:3497 ../fish/guestfish-actions.pod:2447
12093 "You should call this after configuring the handle (eg. adding drives) but "
12094 "before performing any actions."
12098 #: ../src/guestfs-actions.pod:3509
12099 msgid "guestfs_lchown"
12103 #: ../src/guestfs-actions.pod:3511
12107 " guestfs_lchown (guestfs_h *g,\n"
12110 " const char *path);\n"
12115 #: ../src/guestfs-actions.pod:3517
12117 "Change the file owner to C<owner> and group to C<group>. This is like "
12118 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
12119 "changed, not the target."
12123 #: ../src/guestfs-actions.pod:3529
12124 msgid "guestfs_lgetxattr"
12128 #: ../src/guestfs-actions.pod:3531
12132 " guestfs_lgetxattr (guestfs_h *g,\n"
12133 " const char *path,\n"
12134 " const char *name,\n"
12135 " size_t *size_r);\n"
12140 #: ../src/guestfs-actions.pod:3537 ../fish/guestfish-actions.pod:2466
12142 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
12143 "is a symlink, then this call returns an extended attribute from the symlink."
12147 #: ../src/guestfs-actions.pod:3551
12148 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
12152 #: ../src/guestfs-actions.pod:3559
12153 msgid "guestfs_lgetxattrs"
12157 #: ../src/guestfs-actions.pod:3561
12160 " struct guestfs_xattr_list *\n"
12161 " guestfs_lgetxattrs (guestfs_h *g,\n"
12162 " const char *path);\n"
12167 #: ../src/guestfs-actions.pod:3565
12169 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
12170 "then it returns the extended attributes of the link itself."
12174 #: ../src/guestfs-actions.pod:3575
12175 msgid "guestfs_list_devices"
12179 #: ../src/guestfs-actions.pod:3577
12183 " guestfs_list_devices (guestfs_h *g);\n"
12188 #: ../src/guestfs-actions.pod:3580 ../fish/guestfish-actions.pod:2494
12189 msgid "List all the block devices."
12193 #: ../src/guestfs-actions.pod:3582 ../fish/guestfish-actions.pod:2496
12194 msgid "The full block device names are returned, eg. C</dev/sda>."
12198 #: ../src/guestfs-actions.pod:3592
12199 msgid "guestfs_list_filesystems"
12203 #: ../src/guestfs-actions.pod:3594
12207 " guestfs_list_filesystems (guestfs_h *g);\n"
12212 #: ../src/guestfs-actions.pod:3597 ../fish/guestfish-actions.pod:2504
12214 "This inspection command looks for filesystems on partitions, block devices "
12215 "and logical volumes, returning a list of devices containing filesystems and "
12220 #: ../src/guestfs-actions.pod:3601 ../fish/guestfish-actions.pod:2508
12222 "The return value is a hash, where the keys are the devices containing "
12223 "filesystems, and the values are the filesystem types. For example:"
12227 #: ../src/guestfs-actions.pod:3605 ../fish/guestfish-actions.pod:2512
12230 " \"/dev/sda1\" => \"ntfs\"\n"
12231 " \"/dev/sda2\" => \"ext2\"\n"
12232 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
12233 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
12238 #: ../src/guestfs-actions.pod:3610 ../fish/guestfish-actions.pod:2517
12240 "The value can have the special value \"unknown\", meaning the content of the "
12241 "device is undetermined or empty. \"swap\" means a Linux swap partition."
12245 #: ../src/guestfs-actions.pod:3614
12247 "This command runs other libguestfs commands, which might include "
12248 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
12249 "soon after launch and only when nothing is mounted."
12253 #: ../src/guestfs-actions.pod:3618
12255 "Not all of the filesystems returned will be mountable. In particular, swap "
12256 "partitions are returned in the list. Also this command does not check that "
12257 "each filesystem found is valid and mountable, and some filesystems might be "
12258 "mountable but require special options. Filesystems may not all belong to a "
12259 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
12263 #: ../src/guestfs-actions.pod:3632 ../src/guestfs-actions.pod:5244
12264 msgid "(Added in 1.5.15)"
12268 #: ../src/guestfs-actions.pod:3634
12269 msgid "guestfs_list_partitions"
12273 #: ../src/guestfs-actions.pod:3636
12277 " guestfs_list_partitions (guestfs_h *g);\n"
12282 #: ../src/guestfs-actions.pod:3639 ../fish/guestfish-actions.pod:2537
12283 msgid "List all the partitions detected on all block devices."
12287 #: ../src/guestfs-actions.pod:3641 ../fish/guestfish-actions.pod:2539
12288 msgid "The full partition device names are returned, eg. C</dev/sda1>"
12292 #: ../src/guestfs-actions.pod:3643
12294 "This does not return logical volumes. For that you will need to call "
12299 #: ../src/guestfs-actions.pod:3654
12304 #: ../src/guestfs-actions.pod:3656
12308 " guestfs_ll (guestfs_h *g,\n"
12309 " const char *directory);\n"
12314 #: ../src/guestfs-actions.pod:3660 ../fish/guestfish-actions.pod:2550
12316 "List the files in C<directory> (relative to the root directory, there is no "
12317 "cwd) in the format of 'ls -la'."
12321 #: ../src/guestfs-actions.pod:3663 ../fish/guestfish-actions.pod:2553
12323 "This command is mostly useful for interactive sessions. It is I<not> "
12324 "intended that you try to parse the output string."
12328 #: ../src/guestfs-actions.pod:3671
12333 #: ../src/guestfs-actions.pod:3673
12337 " guestfs_ln (guestfs_h *g,\n"
12338 " const char *target,\n"
12339 " const char *linkname);\n"
12344 #: ../src/guestfs-actions.pod:3678 ../fish/guestfish-actions.pod:2560
12345 msgid "This command creates a hard link using the C<ln> command."
12349 #: ../src/guestfs-actions.pod:3684
12350 msgid "guestfs_ln_f"
12354 #: ../src/guestfs-actions.pod:3686
12358 " guestfs_ln_f (guestfs_h *g,\n"
12359 " const char *target,\n"
12360 " const char *linkname);\n"
12365 #: ../src/guestfs-actions.pod:3691 ../fish/guestfish-actions.pod:2566
12367 "This command creates a hard link using the C<ln -f> command. The I<-f> "
12368 "option removes the link (C<linkname>) if it exists already."
12372 #: ../src/guestfs-actions.pod:3698
12373 msgid "guestfs_ln_s"
12377 #: ../src/guestfs-actions.pod:3700
12381 " guestfs_ln_s (guestfs_h *g,\n"
12382 " const char *target,\n"
12383 " const char *linkname);\n"
12388 #: ../src/guestfs-actions.pod:3705 ../fish/guestfish-actions.pod:2573
12389 msgid "This command creates a symbolic link using the C<ln -s> command."
12393 #: ../src/guestfs-actions.pod:3711
12394 msgid "guestfs_ln_sf"
12398 #: ../src/guestfs-actions.pod:3713
12402 " guestfs_ln_sf (guestfs_h *g,\n"
12403 " const char *target,\n"
12404 " const char *linkname);\n"
12409 #: ../src/guestfs-actions.pod:3718 ../fish/guestfish-actions.pod:2579
12411 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
12412 "option removes the link (C<linkname>) if it exists already."
12416 #: ../src/guestfs-actions.pod:3725
12417 msgid "guestfs_lremovexattr"
12421 #: ../src/guestfs-actions.pod:3727
12425 " guestfs_lremovexattr (guestfs_h *g,\n"
12426 " const char *xattr,\n"
12427 " const char *path);\n"
12432 #: ../src/guestfs-actions.pod:3732
12434 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
12435 "link, then it removes an extended attribute of the link itself."
12439 #: ../src/guestfs-actions.pod:3740
12444 #: ../src/guestfs-actions.pod:3742
12448 " guestfs_ls (guestfs_h *g,\n"
12449 " const char *directory);\n"
12454 #: ../src/guestfs-actions.pod:3746 ../fish/guestfish-actions.pod:2594
12456 "List the files in C<directory> (relative to the root directory, there is no "
12457 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
12461 #: ../src/guestfs-actions.pod:3750
12463 "This command is mostly useful for interactive sessions. Programs should "
12464 "probably use C<guestfs_readdir> instead."
12468 #: ../src/guestfs-actions.pod:3759
12469 msgid "guestfs_lsetxattr"
12473 #: ../src/guestfs-actions.pod:3761
12477 " guestfs_lsetxattr (guestfs_h *g,\n"
12478 " const char *xattr,\n"
12479 " const char *val,\n"
12481 " const char *path);\n"
12486 #: ../src/guestfs-actions.pod:3768
12488 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
12489 "then it sets an extended attribute of the link itself."
12493 #: ../src/guestfs-actions.pod:3776
12494 msgid "guestfs_lstat"
12498 #: ../src/guestfs-actions.pod:3778
12501 " struct guestfs_stat *\n"
12502 " guestfs_lstat (guestfs_h *g,\n"
12503 " const char *path);\n"
12508 #: ../src/guestfs-actions.pod:3782 ../src/guestfs-actions.pod:6375
12509 #: ../fish/guestfish-actions.pod:2613 ../fish/guestfish-actions.pod:4317
12510 msgid "Returns file information for the given C<path>."
12514 #: ../src/guestfs-actions.pod:3784
12516 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
12517 "link, then the link is stat-ed, not the file it refers to."
12521 #: ../src/guestfs-actions.pod:3788 ../fish/guestfish-actions.pod:2619
12522 msgid "This is the same as the C<lstat(2)> system call."
12526 #: ../src/guestfs-actions.pod:3790 ../src/guestfs-actions.pod:6379
12528 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
12529 "error. I<The caller must call C<guestfs_free_stat> after use>."
12533 #: ../src/guestfs-actions.pod:3794 ../src/guestfs-actions.pod:6383
12534 #: ../src/guestfs-actions.pod:6401 ../src/guestfs-actions.pod:6782
12535 msgid "(Added in 0.9.2)"
12539 #: ../src/guestfs-actions.pod:3796
12540 msgid "guestfs_lstatlist"
12544 #: ../src/guestfs-actions.pod:3798
12547 " struct guestfs_stat_list *\n"
12548 " guestfs_lstatlist (guestfs_h *g,\n"
12549 " const char *path,\n"
12550 " char *const *names);\n"
12555 #: ../src/guestfs-actions.pod:3803
12557 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
12558 "files, where all files are in the directory C<path>. C<names> is the list "
12559 "of files from this directory."
12563 #: ../src/guestfs-actions.pod:3807 ../fish/guestfish-actions.pod:2629
12565 "On return you get a list of stat structs, with a one-to-one correspondence "
12566 "to the C<names> list. If any name did not exist or could not be lstat'd, "
12567 "then the C<ino> field of that structure is set to C<-1>."
12571 #: ../src/guestfs-actions.pod:3812
12573 "This call is intended for programs that want to efficiently list a directory "
12574 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
12575 "for a similarly efficient call for getting extended attributes. Very long "
12576 "directory listings might cause the protocol message size to be exceeded, "
12577 "causing this call to fail. The caller must split up such requests into "
12578 "smaller groups of names."
12582 #: ../src/guestfs-actions.pod:3820
12584 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
12585 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
12589 #: ../src/guestfs-actions.pod:3826
12590 msgid "guestfs_luks_add_key"
12594 #: ../src/guestfs-actions.pod:3828
12598 " guestfs_luks_add_key (guestfs_h *g,\n"
12599 " const char *device,\n"
12600 " const char *key,\n"
12601 " const char *newkey,\n"
12607 #: ../src/guestfs-actions.pod:3835 ../fish/guestfish-actions.pod:2646
12609 "This command adds a new key on LUKS device C<device>. C<key> is any "
12610 "existing key, and is used to access the device. C<newkey> is the new key to "
12611 "add. C<keyslot> is the key slot that will be replaced."
12615 #: ../src/guestfs-actions.pod:3840
12617 "Note that if C<keyslot> already contains a key, then this command will "
12618 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
12622 #: ../src/guestfs-actions.pod:3846 ../src/guestfs-actions.pod:3886
12623 #: ../src/guestfs-actions.pod:3909 ../src/guestfs-actions.pod:3929
12624 #: ../src/guestfs-actions.pod:3961 ../src/guestfs-actions.pod:3980
12626 "This function takes a key or passphrase parameter which could contain "
12627 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
12632 #: ../src/guestfs-actions.pod:3850 ../src/guestfs-actions.pod:3890
12633 #: ../src/guestfs-actions.pod:3913 ../src/guestfs-actions.pod:3933
12634 msgid "(Added in 1.5.2)"
12638 #: ../src/guestfs-actions.pod:3852
12639 msgid "guestfs_luks_close"
12643 #: ../src/guestfs-actions.pod:3854
12647 " guestfs_luks_close (guestfs_h *g,\n"
12648 " const char *device);\n"
12653 #: ../src/guestfs-actions.pod:3858
12655 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
12656 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
12657 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
12658 "underlying block device."
12662 #: ../src/guestfs-actions.pod:3866 ../src/guestfs-actions.pod:3965
12663 #: ../src/guestfs-actions.pod:3984 ../src/guestfs-actions.pod:4034
12664 #: ../src/guestfs-actions.pod:4082
12665 msgid "(Added in 1.5.1)"
12669 #: ../src/guestfs-actions.pod:3868
12670 msgid "guestfs_luks_format"
12674 #: ../src/guestfs-actions.pod:3870
12678 " guestfs_luks_format (guestfs_h *g,\n"
12679 " const char *device,\n"
12680 " const char *key,\n"
12686 #: ../src/guestfs-actions.pod:3876 ../fish/guestfish-actions.pod:2672
12688 "This command erases existing data on C<device> and formats the device as a "
12689 "LUKS encrypted device. C<key> is the initial key, which is added to key "
12690 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
12694 #: ../src/guestfs-actions.pod:3883 ../src/guestfs-actions.pod:3906
12695 #: ../src/guestfs-actions.pod:4046 ../src/guestfs-actions.pod:4995
12696 #: ../src/guestfs-actions.pod:5775 ../src/guestfs-actions.pod:6182
12697 #: ../src/guestfs-actions.pod:6212 ../src/guestfs-actions.pod:6245
12698 #: ../src/guestfs-actions.pod:7427 ../fish/guestfish-actions.pod:2680
12699 #: ../fish/guestfish-actions.pod:2693 ../fish/guestfish-actions.pod:2777
12700 #: ../fish/guestfish-actions.pod:3358 ../fish/guestfish-actions.pod:3878
12701 #: ../fish/guestfish-actions.pod:4188 ../fish/guestfish-actions.pod:4211
12702 #: ../fish/guestfish-actions.pod:4233 ../fish/guestfish-actions.pod:4963
12704 "B<This command is dangerous. Without careful use you can easily destroy all "
12709 #: ../src/guestfs-actions.pod:3892
12710 msgid "guestfs_luks_format_cipher"
12714 #: ../src/guestfs-actions.pod:3894
12718 " guestfs_luks_format_cipher (guestfs_h *g,\n"
12719 " const char *device,\n"
12720 " const char *key,\n"
12722 " const char *cipher);\n"
12727 #: ../src/guestfs-actions.pod:3901
12729 "This command is the same as C<guestfs_luks_format> but it also allows you to "
12730 "set the C<cipher> used."
12734 #: ../src/guestfs-actions.pod:3915
12735 msgid "guestfs_luks_kill_slot"
12739 #: ../src/guestfs-actions.pod:3917
12743 " guestfs_luks_kill_slot (guestfs_h *g,\n"
12744 " const char *device,\n"
12745 " const char *key,\n"
12751 #: ../src/guestfs-actions.pod:3923 ../fish/guestfish-actions.pod:2700
12753 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
12754 "device C<device>. C<key> must be one of the I<other> keys."
12758 #: ../src/guestfs-actions.pod:3935
12759 msgid "guestfs_luks_open"
12763 #: ../src/guestfs-actions.pod:3937
12767 " guestfs_luks_open (guestfs_h *g,\n"
12768 " const char *device,\n"
12769 " const char *key,\n"
12770 " const char *mapname);\n"
12775 #: ../src/guestfs-actions.pod:3943 ../fish/guestfish-actions.pod:2711
12777 "This command opens a block device which has been encrypted according to the "
12778 "Linux Unified Key Setup (LUKS) standard."
12782 #: ../src/guestfs-actions.pod:3946 ../fish/guestfish-actions.pod:2714
12783 msgid "C<device> is the encrypted block device or partition."
12787 #: ../src/guestfs-actions.pod:3948 ../fish/guestfish-actions.pod:2716
12789 "The caller must supply one of the keys associated with the LUKS block "
12790 "device, in the C<key> parameter."
12794 #: ../src/guestfs-actions.pod:3951 ../fish/guestfish-actions.pod:2719
12796 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
12797 "writes to this block device are decrypted from and encrypted to the "
12798 "underlying C<device> respectively."
12802 #: ../src/guestfs-actions.pod:3955
12804 "If this block device contains LVM volume groups, then calling "
12805 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
12810 #: ../src/guestfs-actions.pod:3967
12811 msgid "guestfs_luks_open_ro"
12815 #: ../src/guestfs-actions.pod:3969
12819 " guestfs_luks_open_ro (guestfs_h *g,\n"
12820 " const char *device,\n"
12821 " const char *key,\n"
12822 " const char *mapname);\n"
12827 #: ../src/guestfs-actions.pod:3975
12829 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
12834 #: ../src/guestfs-actions.pod:3986
12835 msgid "guestfs_lvcreate"
12839 #: ../src/guestfs-actions.pod:3988
12843 " guestfs_lvcreate (guestfs_h *g,\n"
12844 " const char *logvol,\n"
12845 " const char *volgroup,\n"
12851 #: ../src/guestfs-actions.pod:3994 ../fish/guestfish-actions.pod:2744
12853 "This creates an LVM logical volume called C<logvol> on the volume group "
12854 "C<volgroup>, with C<size> megabytes."
12858 #: ../src/guestfs-actions.pod:4001
12859 msgid "guestfs_lvm_canonical_lv_name"
12863 #: ../src/guestfs-actions.pod:4003
12867 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
12868 " const char *lvname);\n"
12873 #: ../src/guestfs-actions.pod:4007 ../fish/guestfish-actions.pod:2751
12875 "This converts alternative naming schemes for LVs that you might find to the "
12876 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
12881 #: ../src/guestfs-actions.pod:4011 ../fish/guestfish-actions.pod:2755
12883 "This command returns an error if the C<lvname> parameter does not refer to a "
12888 #: ../src/guestfs-actions.pod:4014
12889 msgid "See also C<guestfs_is_lv>."
12893 #: ../src/guestfs-actions.pod:4019
12894 msgid "(Added in 1.5.24)"
12898 #: ../src/guestfs-actions.pod:4021
12899 msgid "guestfs_lvm_clear_filter"
12903 #: ../src/guestfs-actions.pod:4023
12907 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
12912 #: ../src/guestfs-actions.pod:4026
12914 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
12915 "see every block device."
12919 #: ../src/guestfs-actions.pod:4029 ../src/guestfs-actions.pod:4071
12920 #: ../fish/guestfish-actions.pod:2767 ../fish/guestfish-actions.pod:2798
12922 "This command also clears the LVM cache and performs a volume group scan."
12926 #: ../src/guestfs-actions.pod:4036
12927 msgid "guestfs_lvm_remove_all"
12931 #: ../src/guestfs-actions.pod:4038
12935 " guestfs_lvm_remove_all (guestfs_h *g);\n"
12940 #: ../src/guestfs-actions.pod:4041 ../fish/guestfish-actions.pod:2774
12942 "This command removes all LVM logical volumes, volume groups and physical "
12947 #: ../src/guestfs-actions.pod:4051
12948 msgid "guestfs_lvm_set_filter"
12952 #: ../src/guestfs-actions.pod:4053
12956 " guestfs_lvm_set_filter (guestfs_h *g,\n"
12957 " char *const *devices);\n"
12962 #: ../src/guestfs-actions.pod:4057 ../fish/guestfish-actions.pod:2784
12964 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
12965 "block devices in the list C<devices>, and will ignore all other attached "
12970 #: ../src/guestfs-actions.pod:4061 ../fish/guestfish-actions.pod:2788
12972 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
12973 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
12974 "there are two types of duplication possible: either cloned PVs/VGs which "
12975 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
12976 "same name. In normal operation you cannot create this situation, but you "
12977 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
12978 "inside the LVM metadata."
12982 #: ../src/guestfs-actions.pod:4074 ../fish/guestfish-actions.pod:2801
12983 msgid "You can filter whole block devices or individual partitions."
12987 #: ../src/guestfs-actions.pod:4076 ../fish/guestfish-actions.pod:2803
12989 "You cannot use this if any VG is currently in use (eg. contains a mounted "
12990 "filesystem), even if you are not filtering out that VG."
12994 #: ../src/guestfs-actions.pod:4084
12995 msgid "guestfs_lvremove"
12999 #: ../src/guestfs-actions.pod:4086
13003 " guestfs_lvremove (guestfs_h *g,\n"
13004 " const char *device);\n"
13009 #: ../src/guestfs-actions.pod:4090 ../fish/guestfish-actions.pod:2811
13011 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
13012 "LV, such as C</dev/VG/LV>."
13016 #: ../src/guestfs-actions.pod:4093 ../fish/guestfish-actions.pod:2814
13018 "You can also remove all LVs in a volume group by specifying the VG name, C</"
13023 #: ../src/guestfs-actions.pod:4098 ../src/guestfs-actions.pod:5341
13024 #: ../src/guestfs-actions.pod:7158
13025 msgid "(Added in 1.0.13)"
13029 #: ../src/guestfs-actions.pod:4100
13030 msgid "guestfs_lvrename"
13034 #: ../src/guestfs-actions.pod:4102
13038 " guestfs_lvrename (guestfs_h *g,\n"
13039 " const char *logvol,\n"
13040 " const char *newlogvol);\n"
13045 #: ../src/guestfs-actions.pod:4107 ../fish/guestfish-actions.pod:2821
13046 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
13050 #: ../src/guestfs-actions.pod:4111 ../src/guestfs-actions.pod:7171
13051 msgid "(Added in 1.0.83)"
13055 #: ../src/guestfs-actions.pod:4113
13056 msgid "guestfs_lvresize"
13060 #: ../src/guestfs-actions.pod:4115
13064 " guestfs_lvresize (guestfs_h *g,\n"
13065 " const char *device,\n"
13071 #: ../src/guestfs-actions.pod:4120 ../fish/guestfish-actions.pod:2827
13073 "This resizes (expands or shrinks) an existing LVM logical volume to "
13074 "C<mbytes>. When reducing, data in the reduced part is lost."
13078 #: ../src/guestfs-actions.pod:4128
13079 msgid "guestfs_lvresize_free"
13083 #: ../src/guestfs-actions.pod:4130
13087 " guestfs_lvresize_free (guestfs_h *g,\n"
13088 " const char *lv,\n"
13094 #: ../src/guestfs-actions.pod:4135 ../fish/guestfish-actions.pod:2835
13096 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
13097 "remaining free space in the volume group. Commonly you would call this with "
13098 "pc = 100 which expands the logical volume as much as possible, using all "
13099 "remaining free space in the volume group."
13103 #: ../src/guestfs-actions.pod:4143
13104 msgid "(Added in 1.3.3)"
13108 #: ../src/guestfs-actions.pod:4145
13109 msgid "guestfs_lvs"
13113 #: ../src/guestfs-actions.pod:4147
13117 " guestfs_lvs (guestfs_h *g);\n"
13122 #: ../src/guestfs-actions.pod:4150 ../fish/guestfish-actions.pod:2845
13124 "List all the logical volumes detected. This is the equivalent of the L<lvs"
13129 #: ../src/guestfs-actions.pod:4153 ../fish/guestfish-actions.pod:2848
13131 "This returns a list of the logical volume device names (eg. C</dev/"
13132 "VolGroup00/LogVol00>)."
13136 #: ../src/guestfs-actions.pod:4156
13137 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
13141 #: ../src/guestfs-actions.pod:4164
13142 msgid "guestfs_lvs_full"
13146 #: ../src/guestfs-actions.pod:4166
13149 " struct guestfs_lvm_lv_list *\n"
13150 " guestfs_lvs_full (guestfs_h *g);\n"
13155 #: ../src/guestfs-actions.pod:4169 ../fish/guestfish-actions.pod:2857
13157 "List all the logical volumes detected. This is the equivalent of the L<lvs"
13158 "(8)> command. The \"full\" version includes all fields."
13162 #: ../src/guestfs-actions.pod:4172
13164 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
13165 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
13169 #: ../src/guestfs-actions.pod:4178
13170 msgid "guestfs_lvuuid"
13174 #: ../src/guestfs-actions.pod:4180
13178 " guestfs_lvuuid (guestfs_h *g,\n"
13179 " const char *device);\n"
13184 #: ../src/guestfs-actions.pod:4184 ../fish/guestfish-actions.pod:2864
13185 msgid "This command returns the UUID of the LVM LV C<device>."
13189 #: ../src/guestfs-actions.pod:4191
13190 msgid "guestfs_lxattrlist"
13194 #: ../src/guestfs-actions.pod:4193
13197 " struct guestfs_xattr_list *\n"
13198 " guestfs_lxattrlist (guestfs_h *g,\n"
13199 " const char *path,\n"
13200 " char *const *names);\n"
13205 #: ../src/guestfs-actions.pod:4198 ../fish/guestfish-actions.pod:2870
13207 "This call allows you to get the extended attributes of multiple files, where "
13208 "all files are in the directory C<path>. C<names> is the list of files from "
13213 #: ../src/guestfs-actions.pod:4202 ../fish/guestfish-actions.pod:2874
13215 "On return you get a flat list of xattr structs which must be interpreted "
13216 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
13217 "C<attrval> in this struct is zero-length to indicate there was an error "
13218 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
13219 "number (the number of following attributes for this file, which could be C<"
13220 "\"0\">). Then after the first xattr struct are the zero or more attributes "
13221 "for the first named file. This repeats for the second and subsequent files."
13225 #: ../src/guestfs-actions.pod:4212
13227 "This call is intended for programs that want to efficiently list a directory "
13228 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
13229 "a similarly efficient call for getting standard stats. Very long directory "
13230 "listings might cause the protocol message size to be exceeded, causing this "
13231 "call to fail. The caller must split up such requests into smaller groups of "
13236 #: ../src/guestfs-actions.pod:4226
13237 msgid "guestfs_mkdir"
13241 #: ../src/guestfs-actions.pod:4228
13245 " guestfs_mkdir (guestfs_h *g,\n"
13246 " const char *path);\n"
13251 #: ../src/guestfs-actions.pod:4232 ../fish/guestfish-actions.pod:2896
13252 msgid "Create a directory named C<path>."
13256 #: ../src/guestfs-actions.pod:4238
13257 msgid "guestfs_mkdir_mode"
13261 #: ../src/guestfs-actions.pod:4240
13265 " guestfs_mkdir_mode (guestfs_h *g,\n"
13266 " const char *path,\n"
13272 #: ../src/guestfs-actions.pod:4245 ../fish/guestfish-actions.pod:2902
13274 "This command creates a directory, setting the initial permissions of the "
13275 "directory to C<mode>."
13279 #: ../src/guestfs-actions.pod:4248 ../fish/guestfish-actions.pod:2905
13281 "For common Linux filesystems, the actual mode which is set will be C<mode & "
13282 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
13287 #: ../src/guestfs-actions.pod:4252
13288 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
13292 #: ../src/guestfs-actions.pod:4258
13293 msgid "guestfs_mkdir_p"
13297 #: ../src/guestfs-actions.pod:4260
13301 " guestfs_mkdir_p (guestfs_h *g,\n"
13302 " const char *path);\n"
13307 #: ../src/guestfs-actions.pod:4264 ../fish/guestfish-actions.pod:2915
13309 "Create a directory named C<path>, creating any parent directories as "
13310 "necessary. This is like the C<mkdir -p> shell command."
13314 #: ../src/guestfs-actions.pod:4271
13315 msgid "guestfs_mkdtemp"
13319 #: ../src/guestfs-actions.pod:4273
13323 " guestfs_mkdtemp (guestfs_h *g,\n"
13324 " const char *template);\n"
13329 #: ../src/guestfs-actions.pod:4277 ../fish/guestfish-actions.pod:2922
13331 "This command creates a temporary directory. The C<template> parameter "
13332 "should be a full pathname for the temporary directory name with the final "
13333 "six characters being \"XXXXXX\"."
13337 #: ../src/guestfs-actions.pod:4282 ../fish/guestfish-actions.pod:2927
13339 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
13340 "being suitable for Windows filesystems."
13344 #: ../src/guestfs-actions.pod:4285 ../fish/guestfish-actions.pod:2930
13345 msgid "The name of the temporary directory that was created is returned."
13349 #: ../src/guestfs-actions.pod:4288 ../fish/guestfish-actions.pod:2933
13350 msgid "The temporary directory is created with mode 0700 and is owned by root."
13354 #: ../src/guestfs-actions.pod:4291 ../fish/guestfish-actions.pod:2936
13356 "The caller is responsible for deleting the temporary directory and its "
13357 "contents after use."
13361 #: ../src/guestfs-actions.pod:4294 ../fish/guestfish-actions.pod:2939
13362 msgid "See also: L<mkdtemp(3)>"
13366 #: ../src/guestfs-actions.pod:4301
13367 msgid "guestfs_mke2fs_J"
13371 #: ../src/guestfs-actions.pod:4303
13375 " guestfs_mke2fs_J (guestfs_h *g,\n"
13376 " const char *fstype,\n"
13377 " int blocksize,\n"
13378 " const char *device,\n"
13379 " const char *journal);\n"
13384 #: ../src/guestfs-actions.pod:4310 ../fish/guestfish-actions.pod:2945
13386 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13387 "C<journal>. It is equivalent to the command:"
13391 #: ../src/guestfs-actions.pod:4314 ../fish/guestfish-actions.pod:2949
13394 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
13399 #: ../src/guestfs-actions.pod:4316
13400 msgid "See also C<guestfs_mke2journal>."
13404 #: ../src/guestfs-actions.pod:4320 ../src/guestfs-actions.pod:4338
13405 #: ../src/guestfs-actions.pod:4356 ../src/guestfs-actions.pod:4372
13406 #: ../src/guestfs-actions.pod:4386 ../src/guestfs-actions.pod:4400
13407 #: ../src/guestfs-actions.pod:4459 ../src/guestfs-actions.pod:4724
13408 msgid "(Added in 1.0.68)"
13412 #: ../src/guestfs-actions.pod:4322
13413 msgid "guestfs_mke2fs_JL"
13417 #: ../src/guestfs-actions.pod:4324
13421 " guestfs_mke2fs_JL (guestfs_h *g,\n"
13422 " const char *fstype,\n"
13423 " int blocksize,\n"
13424 " const char *device,\n"
13425 " const char *label);\n"
13430 #: ../src/guestfs-actions.pod:4331 ../fish/guestfish-actions.pod:2957
13432 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13433 "the journal labeled C<label>."
13437 #: ../src/guestfs-actions.pod:4334
13438 msgid "See also C<guestfs_mke2journal_L>."
13442 #: ../src/guestfs-actions.pod:4340
13443 msgid "guestfs_mke2fs_JU"
13447 #: ../src/guestfs-actions.pod:4342
13451 " guestfs_mke2fs_JU (guestfs_h *g,\n"
13452 " const char *fstype,\n"
13453 " int blocksize,\n"
13454 " const char *device,\n"
13455 " const char *uuid);\n"
13460 #: ../src/guestfs-actions.pod:4349 ../fish/guestfish-actions.pod:2966
13462 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13463 "the journal with UUID C<uuid>."
13467 #: ../src/guestfs-actions.pod:4352
13468 msgid "See also C<guestfs_mke2journal_U>."
13472 #: ../src/guestfs-actions.pod:4358
13473 msgid "guestfs_mke2journal"
13477 #: ../src/guestfs-actions.pod:4360
13481 " guestfs_mke2journal (guestfs_h *g,\n"
13482 " int blocksize,\n"
13483 " const char *device);\n"
13488 #: ../src/guestfs-actions.pod:4365 ../fish/guestfish-actions.pod:2975
13490 "This creates an ext2 external journal on C<device>. It is equivalent to the "
13495 #: ../src/guestfs-actions.pod:4368 ../fish/guestfish-actions.pod:2978
13498 " mke2fs -O journal_dev -b blocksize device\n"
13503 #: ../src/guestfs-actions.pod:4374
13504 msgid "guestfs_mke2journal_L"
13508 #: ../src/guestfs-actions.pod:4376
13512 " guestfs_mke2journal_L (guestfs_h *g,\n"
13513 " int blocksize,\n"
13514 " const char *label,\n"
13515 " const char *device);\n"
13520 #: ../src/guestfs-actions.pod:4382 ../fish/guestfish-actions.pod:2984
13521 msgid "This creates an ext2 external journal on C<device> with label C<label>."
13525 #: ../src/guestfs-actions.pod:4388
13526 msgid "guestfs_mke2journal_U"
13530 #: ../src/guestfs-actions.pod:4390
13534 " guestfs_mke2journal_U (guestfs_h *g,\n"
13535 " int blocksize,\n"
13536 " const char *uuid,\n"
13537 " const char *device);\n"
13542 #: ../src/guestfs-actions.pod:4396 ../fish/guestfish-actions.pod:2990
13543 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
13547 #: ../src/guestfs-actions.pod:4402
13548 msgid "guestfs_mkfifo"
13552 #: ../src/guestfs-actions.pod:4404
13556 " guestfs_mkfifo (guestfs_h *g,\n"
13558 " const char *path);\n"
13563 #: ../src/guestfs-actions.pod:4409
13565 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
13566 "is just a convenient wrapper around C<guestfs_mknod>."
13570 #: ../src/guestfs-actions.pod:4419
13571 msgid "guestfs_mkfs"
13575 #: ../src/guestfs-actions.pod:4421
13579 " guestfs_mkfs (guestfs_h *g,\n"
13580 " const char *fstype,\n"
13581 " const char *device);\n"
13586 #: ../src/guestfs-actions.pod:4426 ../fish/guestfish-actions.pod:3006
13588 "This creates a filesystem on C<device> (usually a partition or LVM logical "
13589 "volume). The filesystem type is C<fstype>, for example C<ext3>."
13593 #: ../src/guestfs-actions.pod:4434
13594 msgid "guestfs_mkfs_b"
13598 #: ../src/guestfs-actions.pod:4436
13602 " guestfs_mkfs_b (guestfs_h *g,\n"
13603 " const char *fstype,\n"
13604 " int blocksize,\n"
13605 " const char *device);\n"
13610 #: ../src/guestfs-actions.pod:4442
13612 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
13613 "block size of the resulting filesystem. Supported block sizes depend on the "
13614 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
13618 #: ../src/guestfs-actions.pod:4447 ../src/guestfs-actions.pod:4490
13619 #: ../fish/guestfish-actions.pod:3019 ../fish/guestfish-actions.pod:3046
13621 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
13626 #: ../src/guestfs-actions.pod:4452 ../fish/guestfish-actions.pod:3022
13628 "This function is deprecated. In new code, use the C<mkfs_opts> call instead."
13632 #: ../src/guestfs-actions.pod:4461
13633 msgid "guestfs_mkfs_opts"
13637 #: ../src/guestfs-actions.pod:4463
13641 " guestfs_mkfs_opts (guestfs_h *g,\n"
13642 " const char *fstype,\n"
13643 " const char *device,\n"
13649 #: ../src/guestfs-actions.pod:4474
13652 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
13653 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
13658 #: ../src/guestfs-actions.pod:4477 ../fish/guestfish-actions.pod:3033
13660 "This function creates a filesystem on C<device>. The filesystem type is "
13661 "C<fstype>, for example C<ext3>."
13665 #: ../src/guestfs-actions.pod:4484 ../fish/guestfish-actions.pod:3040
13666 msgid "C<blocksize>"
13670 #: ../src/guestfs-actions.pod:4486 ../fish/guestfish-actions.pod:3042
13672 "The filesystem block size. Supported block sizes depend on the filesystem "
13673 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
13678 #: ../src/guestfs-actions.pod:4493 ../fish/guestfish-actions.pod:3049
13679 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
13683 #: ../src/guestfs-actions.pod:4495 ../fish/guestfish-actions.pod:3051
13684 msgid "C<features>"
13688 #: ../src/guestfs-actions.pod:4497 ../fish/guestfish-actions.pod:3053
13689 msgid "This passes the I<-O> parameter to the external mkfs program."
13693 #: ../src/guestfs-actions.pod:4499 ../fish/guestfish-actions.pod:3055
13695 "For certain filesystem types, this allows extra filesystem features to be "
13696 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
13700 #: ../src/guestfs-actions.pod:4503 ../fish/guestfish-actions.pod:3059
13702 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
13707 #: ../src/guestfs-actions.pod:4510
13708 msgid "(Added in 1.7.19)"
13712 #: ../src/guestfs-actions.pod:4512
13713 msgid "guestfs_mkfs_opts_va"
13717 #: ../src/guestfs-actions.pod:4514
13721 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
13722 " const char *fstype,\n"
13723 " const char *device,\n"
13724 " va_list args);\n"
13729 #: ../src/guestfs-actions.pod:4520
13730 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
13734 #: ../src/guestfs-actions.pod:4524
13735 msgid "guestfs_mkfs_opts_argv"
13739 #: ../src/guestfs-actions.pod:4526
13743 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
13744 " const char *fstype,\n"
13745 " const char *device,\n"
13746 " const struct guestfs_mkfs_opts_argv *optargs);\n"
13751 #: ../src/guestfs-actions.pod:4532
13752 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
13756 #: ../src/guestfs-actions.pod:4536
13757 msgid "guestfs_mkmountpoint"
13761 #: ../src/guestfs-actions.pod:4538
13765 " guestfs_mkmountpoint (guestfs_h *g,\n"
13766 " const char *exemptpath);\n"
13771 #: ../src/guestfs-actions.pod:4542
13773 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
13774 "that can be used to create extra mountpoints before mounting the first "
13779 #: ../src/guestfs-actions.pod:4546 ../fish/guestfish-actions.pod:3074
13781 "These calls are I<only> necessary in some very limited circumstances, mainly "
13782 "the case where you want to mount a mix of unrelated and/or read-only "
13783 "filesystems together."
13787 #: ../src/guestfs-actions.pod:4550 ../fish/guestfish-actions.pod:3078
13789 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
13790 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
13791 "inside that. You can unpack this as follows in guestfish:"
13795 #: ../src/guestfs-actions.pod:4555 ../fish/guestfish-actions.pod:3083
13798 " add-ro Fedora-11-i686-Live.iso\n"
13800 " mkmountpoint /cd\n"
13801 " mkmountpoint /sqsh\n"
13802 " mkmountpoint /ext3fs\n"
13803 " mount /dev/sda /cd\n"
13804 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
13805 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
13810 #: ../src/guestfs-actions.pod:4564 ../fish/guestfish-actions.pod:3092
13811 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
13815 #: ../src/guestfs-actions.pod:4566
13817 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
13818 "may get unexpected errors if you try to mix these calls. It is safest to "
13819 "manually unmount filesystems and remove mountpoints after use."
13823 #: ../src/guestfs-actions.pod:4570
13825 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
13826 "first, so for this to work for manual mountpoints, you must ensure that the "
13827 "innermost mountpoints have the longest pathnames, as in the example code "
13832 #: ../src/guestfs-actions.pod:4575 ../fish/guestfish-actions.pod:3103
13834 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
13838 #: ../src/guestfs-actions.pod:4577
13840 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
13841 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
13842 "can also trigger these issues."
13846 #: ../src/guestfs-actions.pod:4583 ../src/guestfs-actions.pod:4849
13847 #: ../src/guestfs-actions.pod:5759
13848 msgid "(Added in 1.0.62)"
13852 #: ../src/guestfs-actions.pod:4585
13853 msgid "guestfs_mknod"
13857 #: ../src/guestfs-actions.pod:4587
13861 " guestfs_mknod (guestfs_h *g,\n"
13865 " const char *path);\n"
13870 #: ../src/guestfs-actions.pod:4594 ../fish/guestfish-actions.pod:3113
13872 "This call creates block or character special devices, or named pipes (FIFOs)."
13876 #: ../src/guestfs-actions.pod:4597 ../fish/guestfish-actions.pod:3116
13878 "The C<mode> parameter should be the mode, using the standard constants. "
13879 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
13880 "used when creating block and character special devices."
13884 #: ../src/guestfs-actions.pod:4602
13886 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
13887 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
13888 "regular file). These constants are available in the standard Linux header "
13889 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
13890 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
13891 "the appropriate constant for you."
13895 #: ../src/guestfs-actions.pod:4616
13896 msgid "guestfs_mknod_b"
13900 #: ../src/guestfs-actions.pod:4618
13904 " guestfs_mknod_b (guestfs_h *g,\n"
13908 " const char *path);\n"
13913 #: ../src/guestfs-actions.pod:4625
13915 "This call creates a block device node called C<path> with mode C<mode> and "
13916 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13917 "wrapper around C<guestfs_mknod>."
13921 #: ../src/guestfs-actions.pod:4635
13922 msgid "guestfs_mknod_c"
13926 #: ../src/guestfs-actions.pod:4637
13930 " guestfs_mknod_c (guestfs_h *g,\n"
13934 " const char *path);\n"
13939 #: ../src/guestfs-actions.pod:4644
13941 "This call creates a char device node called C<path> with mode C<mode> and "
13942 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13943 "wrapper around C<guestfs_mknod>."
13947 #: ../src/guestfs-actions.pod:4654
13948 msgid "guestfs_mkswap"
13952 #: ../src/guestfs-actions.pod:4656
13956 " guestfs_mkswap (guestfs_h *g,\n"
13957 " const char *device);\n"
13962 #: ../src/guestfs-actions.pod:4660 ../fish/guestfish-actions.pod:3155
13963 msgid "Create a swap partition on C<device>."
13967 #: ../src/guestfs-actions.pod:4666
13968 msgid "guestfs_mkswap_L"
13972 #: ../src/guestfs-actions.pod:4668
13976 " guestfs_mkswap_L (guestfs_h *g,\n"
13977 " const char *label,\n"
13978 " const char *device);\n"
13983 #: ../src/guestfs-actions.pod:4673 ../fish/guestfish-actions.pod:3161
13984 msgid "Create a swap partition on C<device> with label C<label>."
13988 #: ../src/guestfs-actions.pod:4675 ../fish/guestfish-actions.pod:3163
13990 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
13991 "sda>), just to a partition. This appears to be a limitation of the kernel "
13996 #: ../src/guestfs-actions.pod:4683
13997 msgid "guestfs_mkswap_U"
14001 #: ../src/guestfs-actions.pod:4685
14005 " guestfs_mkswap_U (guestfs_h *g,\n"
14006 " const char *uuid,\n"
14007 " const char *device);\n"
14012 #: ../src/guestfs-actions.pod:4690 ../fish/guestfish-actions.pod:3171
14013 msgid "Create a swap partition on C<device> with UUID C<uuid>."
14017 #: ../src/guestfs-actions.pod:4696
14018 msgid "guestfs_mkswap_file"
14022 #: ../src/guestfs-actions.pod:4698
14026 " guestfs_mkswap_file (guestfs_h *g,\n"
14027 " const char *path);\n"
14032 #: ../src/guestfs-actions.pod:4702 ../fish/guestfish-actions.pod:3177
14033 msgid "Create a swap file."
14037 #: ../src/guestfs-actions.pod:4704
14039 "This command just writes a swap file signature to an existing file. To "
14040 "create the file itself, use something like C<guestfs_fallocate>."
14044 #: ../src/guestfs-actions.pod:4711
14045 msgid "guestfs_modprobe"
14049 #: ../src/guestfs-actions.pod:4713
14053 " guestfs_modprobe (guestfs_h *g,\n"
14054 " const char *modulename);\n"
14059 #: ../src/guestfs-actions.pod:4717 ../fish/guestfish-actions.pod:3186
14060 msgid "This loads a kernel module in the appliance."
14064 #: ../src/guestfs-actions.pod:4719 ../fish/guestfish-actions.pod:3188
14066 "The kernel module must have been whitelisted when libguestfs was built (see "
14067 "C<appliance/kmod.whitelist.in> in the source)."
14071 #: ../src/guestfs-actions.pod:4726
14072 msgid "guestfs_mount"
14076 #: ../src/guestfs-actions.pod:4728
14080 " guestfs_mount (guestfs_h *g,\n"
14081 " const char *device,\n"
14082 " const char *mountpoint);\n"
14087 #: ../src/guestfs-actions.pod:4733 ../fish/guestfish-actions.pod:3195
14089 "Mount a guest disk at a position in the filesystem. Block devices are named "
14090 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
14091 "those block devices contain partitions, they will have the usual names (eg. "
14092 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
14096 #: ../src/guestfs-actions.pod:4739 ../fish/guestfish-actions.pod:3201
14098 "The rules are the same as for L<mount(2)>: A filesystem must first be "
14099 "mounted on C</> before others can be mounted. Other filesystems can only be "
14100 "mounted on directories which already exist."
14104 #: ../src/guestfs-actions.pod:4744 ../fish/guestfish-actions.pod:3206
14106 "The mounted filesystem is writable, if we have sufficient permissions on the "
14107 "underlying device."
14111 #: ../src/guestfs-actions.pod:4747
14113 "B<Important note:> When you use this call, the filesystem options C<sync> "
14114 "and C<noatime> are set implicitly. This was originally done because we "
14115 "thought it would improve reliability, but it turns out that I<-o sync> has a "
14116 "very large negative performance impact and negligible effect on "
14117 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
14118 "in any code that needs performance, and instead use C<guestfs_mount_options> "
14119 "(use an empty string for the first parameter if you don't want any options)."
14123 #: ../src/guestfs-actions.pod:4759 ../fish/guestfish-actions.pod:3219
14125 "This function is deprecated. In new code, use the C<mount_options> call "
14130 #: ../src/guestfs-actions.pod:4768
14131 msgid "guestfs_mount_loop"
14135 #: ../src/guestfs-actions.pod:4770
14139 " guestfs_mount_loop (guestfs_h *g,\n"
14140 " const char *file,\n"
14141 " const char *mountpoint);\n"
14146 #: ../src/guestfs-actions.pod:4775 ../fish/guestfish-actions.pod:3230
14148 "This command lets you mount C<file> (a filesystem image in a file) on a "
14149 "mount point. It is entirely equivalent to the command C<mount -o loop file "
14154 #: ../src/guestfs-actions.pod:4783
14155 msgid "guestfs_mount_options"
14159 #: ../src/guestfs-actions.pod:4785
14163 " guestfs_mount_options (guestfs_h *g,\n"
14164 " const char *options,\n"
14165 " const char *device,\n"
14166 " const char *mountpoint);\n"
14171 #: ../src/guestfs-actions.pod:4791
14173 "This is the same as the C<guestfs_mount> command, but it allows you to set "
14174 "the mount options as for the L<mount(8)> I<-o> flag."
14178 #: ../src/guestfs-actions.pod:4795 ../fish/guestfish-actions.pod:3242
14180 "If the C<options> parameter is an empty string, then no options are passed "
14181 "(all options default to whatever the filesystem uses)."
14185 #: ../src/guestfs-actions.pod:4801 ../src/guestfs-actions.pod:4815
14186 #: ../src/guestfs-actions.pod:4832
14187 msgid "(Added in 1.0.10)"
14191 #: ../src/guestfs-actions.pod:4803
14192 msgid "guestfs_mount_ro"
14196 #: ../src/guestfs-actions.pod:4805
14200 " guestfs_mount_ro (guestfs_h *g,\n"
14201 " const char *device,\n"
14202 " const char *mountpoint);\n"
14207 #: ../src/guestfs-actions.pod:4810
14209 "This is the same as the C<guestfs_mount> command, but it mounts the "
14210 "filesystem with the read-only (I<-o ro>) flag."
14214 #: ../src/guestfs-actions.pod:4817
14215 msgid "guestfs_mount_vfs"
14219 #: ../src/guestfs-actions.pod:4819
14223 " guestfs_mount_vfs (guestfs_h *g,\n"
14224 " const char *options,\n"
14225 " const char *vfstype,\n"
14226 " const char *device,\n"
14227 " const char *mountpoint);\n"
14232 #: ../src/guestfs-actions.pod:4826
14234 "This is the same as the C<guestfs_mount> command, but it allows you to set "
14235 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
14240 #: ../src/guestfs-actions.pod:4834
14241 msgid "guestfs_mountpoints"
14245 #: ../src/guestfs-actions.pod:4836
14249 " guestfs_mountpoints (guestfs_h *g);\n"
14254 #: ../src/guestfs-actions.pod:4839
14256 "This call is similar to C<guestfs_mounts>. That call returns a list of "
14257 "devices. This one returns a hash table (map) of device name to directory "
14258 "where the device is mounted."
14262 #: ../src/guestfs-actions.pod:4851
14263 msgid "guestfs_mounts"
14267 #: ../src/guestfs-actions.pod:4853
14271 " guestfs_mounts (guestfs_h *g);\n"
14276 #: ../src/guestfs-actions.pod:4856 ../fish/guestfish-actions.pod:3273
14278 "This returns the list of currently mounted filesystems. It returns the list "
14279 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
14283 #: ../src/guestfs-actions.pod:4859 ../fish/guestfish-actions.pod:3276
14284 msgid "Some internal mounts are not shown."
14288 #: ../src/guestfs-actions.pod:4861
14289 msgid "See also: C<guestfs_mountpoints>"
14293 #: ../src/guestfs-actions.pod:4869
14298 #: ../src/guestfs-actions.pod:4871
14302 " guestfs_mv (guestfs_h *g,\n"
14303 " const char *src,\n"
14304 " const char *dest);\n"
14309 #: ../src/guestfs-actions.pod:4876 ../fish/guestfish-actions.pod:3284
14311 "This moves a file from C<src> to C<dest> where C<dest> is either a "
14312 "destination filename or destination directory."
14316 #: ../src/guestfs-actions.pod:4883
14317 msgid "guestfs_ntfs_3g_probe"
14321 #: ../src/guestfs-actions.pod:4885
14325 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
14327 " const char *device);\n"
14332 #: ../src/guestfs-actions.pod:4890 ../fish/guestfish-actions.pod:3291
14334 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
14335 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
14336 "write, and some cannot be mounted at all)."
14340 #: ../src/guestfs-actions.pod:4894 ../fish/guestfish-actions.pod:3295
14342 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
14343 "can be mounted read-write. Set it to false if you want to test if the "
14344 "volume can be mounted read-only."
14348 #: ../src/guestfs-actions.pod:4898 ../fish/guestfish-actions.pod:3299
14350 "The return value is an integer which C<0> if the operation would succeed, or "
14351 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
14355 #: ../src/guestfs-actions.pod:4904
14356 msgid "(Added in 1.0.43)"
14360 #: ../src/guestfs-actions.pod:4906
14361 msgid "guestfs_ntfsresize"
14365 #: ../src/guestfs-actions.pod:4908
14369 " guestfs_ntfsresize (guestfs_h *g,\n"
14370 " const char *device);\n"
14375 #: ../src/guestfs-actions.pod:4912 ../fish/guestfish-actions.pod:3307
14377 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
14378 "size of the underlying device. See also L<ntfsresize(8)>."
14382 #: ../src/guestfs-actions.pod:4920
14383 msgid "guestfs_ntfsresize_size"
14387 #: ../src/guestfs-actions.pod:4922
14391 " guestfs_ntfsresize_size (guestfs_h *g,\n"
14392 " const char *device,\n"
14393 " int64_t size);\n"
14398 #: ../src/guestfs-actions.pod:4927
14400 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
14401 "to specify the new size (in bytes) explicitly."
14405 #: ../src/guestfs-actions.pod:4932 ../src/guestfs-actions.pod:5368
14406 #: ../src/guestfs-actions.pod:5441 ../src/guestfs-actions.pod:5707
14407 #: ../src/guestfs-actions.pod:7313
14408 msgid "(Added in 1.3.14)"
14412 #: ../src/guestfs-actions.pod:4934
14413 msgid "guestfs_part_add"
14417 #: ../src/guestfs-actions.pod:4936
14421 " guestfs_part_add (guestfs_h *g,\n"
14422 " const char *device,\n"
14423 " const char *prlogex,\n"
14424 " int64_t startsect,\n"
14425 " int64_t endsect);\n"
14430 #: ../src/guestfs-actions.pod:4943
14432 "This command adds a partition to C<device>. If there is no partition table "
14433 "on the device, call C<guestfs_part_init> first."
14437 #: ../src/guestfs-actions.pod:4946 ../fish/guestfish-actions.pod:3325
14439 "The C<prlogex> parameter is the type of partition. Normally you should pass "
14440 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
14441 "C<logical>) and C<e> (or C<extended>) partition types."
14445 #: ../src/guestfs-actions.pod:4951 ../fish/guestfish-actions.pod:3330
14447 "C<startsect> and C<endsect> are the start and end of the partition in "
14448 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
14449 "from the end of the disk (C<-1> is the last sector)."
14453 #: ../src/guestfs-actions.pod:4955
14455 "Creating a partition which covers the whole disk is not so easy. Use "
14456 "C<guestfs_part_disk> to do that."
14460 #: ../src/guestfs-actions.pod:4960 ../src/guestfs-actions.pod:4998
14461 #: ../src/guestfs-actions.pod:5051 ../src/guestfs-actions.pod:5129
14462 #: ../src/guestfs-actions.pod:5167 ../src/guestfs-actions.pod:5186
14463 #: ../src/guestfs-actions.pod:5226
14464 msgid "(Added in 1.0.78)"
14468 #: ../src/guestfs-actions.pod:4962
14469 msgid "guestfs_part_del"
14473 #: ../src/guestfs-actions.pod:4964
14477 " guestfs_part_del (guestfs_h *g,\n"
14478 " const char *device,\n"
14484 #: ../src/guestfs-actions.pod:4969 ../fish/guestfish-actions.pod:3341
14485 msgid "This command deletes the partition numbered C<partnum> on C<device>."
14489 #: ../src/guestfs-actions.pod:4971 ../fish/guestfish-actions.pod:3343
14491 "Note that in the case of MBR partitioning, deleting an extended partition "
14492 "also deletes any logical partitions it contains."
14496 #: ../src/guestfs-actions.pod:4979
14497 msgid "guestfs_part_disk"
14501 #: ../src/guestfs-actions.pod:4981
14505 " guestfs_part_disk (guestfs_h *g,\n"
14506 " const char *device,\n"
14507 " const char *parttype);\n"
14512 #: ../src/guestfs-actions.pod:4986
14514 "This command is simply a combination of C<guestfs_part_init> followed by "
14515 "C<guestfs_part_add> to create a single primary partition covering the whole "
14520 #: ../src/guestfs-actions.pod:4990
14522 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
14523 "possible values are described in C<guestfs_part_init>."
14527 #: ../src/guestfs-actions.pod:5000
14528 msgid "guestfs_part_get_bootable"
14532 #: ../src/guestfs-actions.pod:5002
14536 " guestfs_part_get_bootable (guestfs_h *g,\n"
14537 " const char *device,\n"
14543 #: ../src/guestfs-actions.pod:5007 ../fish/guestfish-actions.pod:3365
14545 "This command returns true if the partition C<partnum> on C<device> has the "
14546 "bootable flag set."
14550 #: ../src/guestfs-actions.pod:5010
14551 msgid "See also C<guestfs_part_set_bootable>."
14555 #: ../src/guestfs-actions.pod:5016
14556 msgid "guestfs_part_get_mbr_id"
14560 #: ../src/guestfs-actions.pod:5018
14564 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
14565 " const char *device,\n"
14571 #: ../src/guestfs-actions.pod:5023 ../fish/guestfish-actions.pod:3374
14573 "Returns the MBR type byte (also known as the ID byte) from the numbered "
14574 "partition C<partnum>."
14578 #: ../src/guestfs-actions.pod:5026 ../src/guestfs-actions.pod:5202
14580 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
14581 "undefined results for other partition table types (see "
14582 "C<guestfs_part_get_parttype>)."
14586 #: ../src/guestfs-actions.pod:5034
14587 msgid "guestfs_part_get_parttype"
14591 #: ../src/guestfs-actions.pod:5036
14595 " guestfs_part_get_parttype (guestfs_h *g,\n"
14596 " const char *device);\n"
14601 #: ../src/guestfs-actions.pod:5040 ../fish/guestfish-actions.pod:3385
14603 "This command examines the partition table on C<device> and returns the "
14604 "partition table type (format) being used."
14608 #: ../src/guestfs-actions.pod:5043
14610 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
14611 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
14612 "possible, although unusual. See C<guestfs_part_init> for a full list."
14616 #: ../src/guestfs-actions.pod:5053
14617 msgid "guestfs_part_init"
14621 #: ../src/guestfs-actions.pod:5055
14625 " guestfs_part_init (guestfs_h *g,\n"
14626 " const char *device,\n"
14627 " const char *parttype);\n"
14632 #: ../src/guestfs-actions.pod:5060 ../fish/guestfish-actions.pod:3397
14634 "This creates an empty partition table on C<device> of one of the partition "
14635 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
14636 "(for large disks)."
14640 #: ../src/guestfs-actions.pod:5064
14642 "Initially there are no partitions. Following this, you should call "
14643 "C<guestfs_part_add> for each partition required."
14647 #: ../src/guestfs-actions.pod:5067 ../fish/guestfish-actions.pod:3404
14648 msgid "Possible values for C<parttype> are:"
14652 #: ../src/guestfs-actions.pod:5071 ../fish/guestfish-actions.pod:3408
14653 msgid "B<efi> | B<gpt>"
14657 #: ../src/guestfs-actions.pod:5073 ../fish/guestfish-actions.pod:3410
14658 msgid "Intel EFI / GPT partition table."
14662 #: ../src/guestfs-actions.pod:5075 ../fish/guestfish-actions.pod:3412
14664 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
14665 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
14666 "the C<mbr> format."
14670 #: ../src/guestfs-actions.pod:5079 ../fish/guestfish-actions.pod:3416
14671 msgid "B<mbr> | B<msdos>"
14675 #: ../src/guestfs-actions.pod:5081 ../fish/guestfish-actions.pod:3418
14677 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
14678 "Windows. This partition type will B<only> work for device sizes up to 2 "
14679 "TB. For large disks we recommend using C<gpt>."
14683 #: ../src/guestfs-actions.pod:5088 ../fish/guestfish-actions.pod:3425
14685 "Other partition table types that may work but are not supported include:"
14689 #: ../src/guestfs-actions.pod:5093 ../fish/guestfish-actions.pod:3430
14694 #: ../src/guestfs-actions.pod:5095 ../fish/guestfish-actions.pod:3432
14695 msgid "AIX disk labels."
14699 #: ../src/guestfs-actions.pod:5097 ../fish/guestfish-actions.pod:3434
14700 msgid "B<amiga> | B<rdb>"
14704 #: ../src/guestfs-actions.pod:5099 ../fish/guestfish-actions.pod:3436
14705 msgid "Amiga \"Rigid Disk Block\" format."
14709 #: ../src/guestfs-actions.pod:5101 ../fish/guestfish-actions.pod:3438
14714 #: ../src/guestfs-actions.pod:5103 ../fish/guestfish-actions.pod:3440
14715 msgid "BSD disk labels."
14719 #: ../src/guestfs-actions.pod:5105 ../fish/guestfish-actions.pod:3442
14724 #: ../src/guestfs-actions.pod:5107 ../fish/guestfish-actions.pod:3444
14725 msgid "DASD, used on IBM mainframes."
14729 #: ../src/guestfs-actions.pod:5109 ../fish/guestfish-actions.pod:3446
14734 #: ../src/guestfs-actions.pod:5111 ../fish/guestfish-actions.pod:3448
14735 msgid "MIPS/SGI volumes."
14739 #: ../src/guestfs-actions.pod:5113 ../fish/guestfish-actions.pod:3450
14744 #: ../src/guestfs-actions.pod:5115 ../fish/guestfish-actions.pod:3452
14745 msgid "Old Mac partition format. Modern Macs use C<gpt>."
14749 #: ../src/guestfs-actions.pod:5117 ../fish/guestfish-actions.pod:3454
14754 #: ../src/guestfs-actions.pod:5119 ../fish/guestfish-actions.pod:3456
14755 msgid "NEC PC-98 format, common in Japan apparently."
14759 #: ../src/guestfs-actions.pod:5121 ../fish/guestfish-actions.pod:3458
14764 #: ../src/guestfs-actions.pod:5123 ../fish/guestfish-actions.pod:3460
14765 msgid "Sun disk labels."
14769 #: ../src/guestfs-actions.pod:5131
14770 msgid "guestfs_part_list"
14774 #: ../src/guestfs-actions.pod:5133
14777 " struct guestfs_partition_list *\n"
14778 " guestfs_part_list (guestfs_h *g,\n"
14779 " const char *device);\n"
14784 #: ../src/guestfs-actions.pod:5137 ../fish/guestfish-actions.pod:3468
14786 "This command parses the partition table on C<device> and returns the list of "
14787 "partitions found."
14791 #: ../src/guestfs-actions.pod:5140 ../fish/guestfish-actions.pod:3471
14792 msgid "The fields in the returned structure are:"
14796 #: ../src/guestfs-actions.pod:5144 ../fish/guestfish-actions.pod:3475
14797 msgid "B<part_num>"
14801 #: ../src/guestfs-actions.pod:5146 ../fish/guestfish-actions.pod:3477
14802 msgid "Partition number, counting from 1."
14806 #: ../src/guestfs-actions.pod:5148 ../fish/guestfish-actions.pod:3479
14807 msgid "B<part_start>"
14811 #: ../src/guestfs-actions.pod:5150
14813 "Start of the partition I<in bytes>. To get sectors you have to divide by "
14814 "the device's sector size, see C<guestfs_blockdev_getss>."
14818 #: ../src/guestfs-actions.pod:5153 ../fish/guestfish-actions.pod:3484
14819 msgid "B<part_end>"
14823 #: ../src/guestfs-actions.pod:5155 ../fish/guestfish-actions.pod:3486
14824 msgid "End of the partition in bytes."
14828 #: ../src/guestfs-actions.pod:5157 ../fish/guestfish-actions.pod:3488
14829 msgid "B<part_size>"
14833 #: ../src/guestfs-actions.pod:5159 ../fish/guestfish-actions.pod:3490
14834 msgid "Size of the partition in bytes."
14838 #: ../src/guestfs-actions.pod:5163
14840 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
14841 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
14846 #: ../src/guestfs-actions.pod:5169
14847 msgid "guestfs_part_set_bootable"
14851 #: ../src/guestfs-actions.pod:5171
14855 " guestfs_part_set_bootable (guestfs_h *g,\n"
14856 " const char *device,\n"
14858 " int bootable);\n"
14863 #: ../src/guestfs-actions.pod:5177 ../fish/guestfish-actions.pod:3498
14865 "This sets the bootable flag on partition numbered C<partnum> on device "
14866 "C<device>. Note that partitions are numbered from 1."
14870 #: ../src/guestfs-actions.pod:5180 ../fish/guestfish-actions.pod:3501
14872 "The bootable flag is used by some operating systems (notably Windows) to "
14873 "determine which partition to boot from. It is by no means universally "
14878 #: ../src/guestfs-actions.pod:5188
14879 msgid "guestfs_part_set_mbr_id"
14883 #: ../src/guestfs-actions.pod:5190
14887 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
14888 " const char *device,\n"
14895 #: ../src/guestfs-actions.pod:5196 ../fish/guestfish-actions.pod:3509
14897 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
14898 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
14899 "documentation are in fact hexadecimal numbers, but usually documented "
14900 "without any leading \"0x\" which might be confusing."
14904 #: ../src/guestfs-actions.pod:5210
14905 msgid "guestfs_part_set_name"
14909 #: ../src/guestfs-actions.pod:5212
14913 " guestfs_part_set_name (guestfs_h *g,\n"
14914 " const char *device,\n"
14916 " const char *name);\n"
14921 #: ../src/guestfs-actions.pod:5218 ../fish/guestfish-actions.pod:3523
14923 "This sets the partition name on partition numbered C<partnum> on device "
14924 "C<device>. Note that partitions are numbered from 1."
14928 #: ../src/guestfs-actions.pod:5221 ../fish/guestfish-actions.pod:3526
14930 "The partition name can only be set on certain types of partition table. "
14931 "This works on C<gpt> but not on C<mbr> partitions."
14935 #: ../src/guestfs-actions.pod:5228
14936 msgid "guestfs_part_to_dev"
14940 #: ../src/guestfs-actions.pod:5230
14944 " guestfs_part_to_dev (guestfs_h *g,\n"
14945 " const char *partition);\n"
14950 #: ../src/guestfs-actions.pod:5234 ../fish/guestfish-actions.pod:3533
14952 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
14953 "partition number, returning the device name (eg. \"/dev/sdb\")."
14957 #: ../src/guestfs-actions.pod:5238
14959 "The named partition must exist, for example as a string returned from "
14960 "C<guestfs_list_partitions>."
14964 #: ../src/guestfs-actions.pod:5246
14965 msgid "guestfs_ping_daemon"
14969 #: ../src/guestfs-actions.pod:5248
14973 " guestfs_ping_daemon (guestfs_h *g);\n"
14978 #: ../src/guestfs-actions.pod:5251 ../fish/guestfish-actions.pod:3544
14980 "This is a test probe into the guestfs daemon running inside the qemu "
14981 "subprocess. Calling this function checks that the daemon responds to the "
14982 "ping message, without affecting the daemon or attached block device(s) in "
14987 #: ../src/guestfs-actions.pod:5260
14988 msgid "guestfs_pread"
14992 #: ../src/guestfs-actions.pod:5262
14996 " guestfs_pread (guestfs_h *g,\n"
14997 " const char *path,\n"
14999 " int64_t offset,\n"
15000 " size_t *size_r);\n"
15005 #: ../src/guestfs-actions.pod:5269 ../fish/guestfish-actions.pod:3553
15007 "This command lets you read part of a file. It reads C<count> bytes of the "
15008 "file, starting at C<offset>, from file C<path>."
15012 #: ../src/guestfs-actions.pod:5272 ../src/guestfs-actions.pod:5298
15013 #: ../fish/guestfish-actions.pod:3556 ../fish/guestfish-actions.pod:3571
15015 "This may read fewer bytes than requested. For further details see the "
15016 "L<pread(2)> system call."
15020 #: ../src/guestfs-actions.pod:5275
15021 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
15025 #: ../src/guestfs-actions.pod:5286
15026 msgid "guestfs_pread_device"
15030 #: ../src/guestfs-actions.pod:5288
15034 " guestfs_pread_device (guestfs_h *g,\n"
15035 " const char *device,\n"
15037 " int64_t offset,\n"
15038 " size_t *size_r);\n"
15043 #: ../src/guestfs-actions.pod:5295 ../fish/guestfish-actions.pod:3568
15045 "This command lets you read part of a file. It reads C<count> bytes of "
15046 "C<device>, starting at C<offset>."
15050 #: ../src/guestfs-actions.pod:5301
15051 msgid "See also C<guestfs_pread>."
15055 #: ../src/guestfs-actions.pod:5310
15056 msgid "(Added in 1.5.21)"
15060 #: ../src/guestfs-actions.pod:5312
15061 msgid "guestfs_pvcreate"
15065 #: ../src/guestfs-actions.pod:5314
15069 " guestfs_pvcreate (guestfs_h *g,\n"
15070 " const char *device);\n"
15075 #: ../src/guestfs-actions.pod:5318 ../fish/guestfish-actions.pod:3583
15077 "This creates an LVM physical volume on the named C<device>, where C<device> "
15078 "should usually be a partition name such as C</dev/sda1>."
15082 #: ../src/guestfs-actions.pod:5326
15083 msgid "guestfs_pvremove"
15087 #: ../src/guestfs-actions.pod:5328
15091 " guestfs_pvremove (guestfs_h *g,\n"
15092 " const char *device);\n"
15097 #: ../src/guestfs-actions.pod:5332 ../fish/guestfish-actions.pod:3591
15099 "This wipes a physical volume C<device> so that LVM will no longer recognise "
15104 #: ../src/guestfs-actions.pod:5335 ../fish/guestfish-actions.pod:3594
15106 "The implementation uses the C<pvremove> command which refuses to wipe "
15107 "physical volumes that contain any volume groups, so you have to remove those "
15112 #: ../src/guestfs-actions.pod:5343
15113 msgid "guestfs_pvresize"
15117 #: ../src/guestfs-actions.pod:5345
15121 " guestfs_pvresize (guestfs_h *g,\n"
15122 " const char *device);\n"
15127 #: ../src/guestfs-actions.pod:5349 ../fish/guestfish-actions.pod:3602
15129 "This resizes (expands or shrinks) an existing LVM physical volume to match "
15130 "the new size of the underlying device."
15134 #: ../src/guestfs-actions.pod:5356
15135 msgid "guestfs_pvresize_size"
15139 #: ../src/guestfs-actions.pod:5358
15143 " guestfs_pvresize_size (guestfs_h *g,\n"
15144 " const char *device,\n"
15145 " int64_t size);\n"
15150 #: ../src/guestfs-actions.pod:5363
15152 "This command is the same as C<guestfs_pvresize> except that it allows you to "
15153 "specify the new size (in bytes) explicitly."
15157 #: ../src/guestfs-actions.pod:5370
15158 msgid "guestfs_pvs"
15162 #: ../src/guestfs-actions.pod:5372
15166 " guestfs_pvs (guestfs_h *g);\n"
15171 #: ../src/guestfs-actions.pod:5375 ../fish/guestfish-actions.pod:3616
15173 "List all the physical volumes detected. This is the equivalent of the L<pvs"
15178 #: ../src/guestfs-actions.pod:5378 ../fish/guestfish-actions.pod:3619
15180 "This returns a list of just the device names that contain PVs (eg. C</dev/"
15185 #: ../src/guestfs-actions.pod:5381
15186 msgid "See also C<guestfs_pvs_full>."
15190 #: ../src/guestfs-actions.pod:5389
15191 msgid "guestfs_pvs_full"
15195 #: ../src/guestfs-actions.pod:5391
15198 " struct guestfs_lvm_pv_list *\n"
15199 " guestfs_pvs_full (guestfs_h *g);\n"
15204 #: ../src/guestfs-actions.pod:5394 ../fish/guestfish-actions.pod:3628
15206 "List all the physical volumes detected. This is the equivalent of the L<pvs"
15207 "(8)> command. The \"full\" version includes all fields."
15211 #: ../src/guestfs-actions.pod:5397
15213 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
15214 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
15218 #: ../src/guestfs-actions.pod:5403
15219 msgid "guestfs_pvuuid"
15223 #: ../src/guestfs-actions.pod:5405
15227 " guestfs_pvuuid (guestfs_h *g,\n"
15228 " const char *device);\n"
15233 #: ../src/guestfs-actions.pod:5409 ../fish/guestfish-actions.pod:3635
15234 msgid "This command returns the UUID of the LVM PV C<device>."
15238 #: ../src/guestfs-actions.pod:5416
15239 msgid "guestfs_pwrite"
15243 #: ../src/guestfs-actions.pod:5418
15247 " guestfs_pwrite (guestfs_h *g,\n"
15248 " const char *path,\n"
15249 " const char *content,\n"
15250 " size_t content_size,\n"
15251 " int64_t offset);\n"
15256 #: ../src/guestfs-actions.pod:5425 ../fish/guestfish-actions.pod:3641
15258 "This command writes to part of a file. It writes the data buffer C<content> "
15259 "to the file C<path> starting at offset C<offset>."
15263 #: ../src/guestfs-actions.pod:5428 ../fish/guestfish-actions.pod:3644
15265 "This command implements the L<pwrite(2)> system call, and like that system "
15266 "call it may not write the full data requested. The return value is the "
15267 "number of bytes that were actually written to the file. This could even be "
15268 "0, although short writes are unlikely for regular files in ordinary "
15273 #: ../src/guestfs-actions.pod:5434
15274 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
15278 #: ../src/guestfs-actions.pod:5443
15279 msgid "guestfs_pwrite_device"
15283 #: ../src/guestfs-actions.pod:5445
15287 " guestfs_pwrite_device (guestfs_h *g,\n"
15288 " const char *device,\n"
15289 " const char *content,\n"
15290 " size_t content_size,\n"
15291 " int64_t offset);\n"
15296 #: ../src/guestfs-actions.pod:5452 ../fish/guestfish-actions.pod:3659
15298 "This command writes to part of a device. It writes the data buffer "
15299 "C<content> to C<device> starting at offset C<offset>."
15303 #: ../src/guestfs-actions.pod:5455 ../fish/guestfish-actions.pod:3662
15305 "This command implements the L<pwrite(2)> system call, and like that system "
15306 "call it may not write the full data requested (although short writes to disk "
15307 "devices and partitions are probably impossible with standard Linux kernels)."
15311 #: ../src/guestfs-actions.pod:5460
15312 msgid "See also C<guestfs_pwrite>."
15316 #: ../src/guestfs-actions.pod:5467
15317 msgid "(Added in 1.5.20)"
15321 #: ../src/guestfs-actions.pod:5469
15322 msgid "guestfs_read_file"
15326 #: ../src/guestfs-actions.pod:5471
15330 " guestfs_read_file (guestfs_h *g,\n"
15331 " const char *path,\n"
15332 " size_t *size_r);\n"
15337 #: ../src/guestfs-actions.pod:5476 ../fish/guestfish-actions.pod:3676
15338 msgid "This calls returns the contents of the file C<path> as a buffer."
15342 #: ../src/guestfs-actions.pod:5479
15344 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
15345 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
15346 "function is limited in the total size of file that can be handled."
15350 #: ../src/guestfs-actions.pod:5491
15351 msgid "(Added in 1.0.63)"
15355 #: ../src/guestfs-actions.pod:5493
15356 msgid "guestfs_read_lines"
15360 #: ../src/guestfs-actions.pod:5495
15364 " guestfs_read_lines (guestfs_h *g,\n"
15365 " const char *path);\n"
15370 #: ../src/guestfs-actions.pod:5501 ../fish/guestfish-actions.pod:3693
15372 "The file contents are returned as a list of lines. Trailing C<LF> and "
15373 "C<CRLF> character sequences are I<not> returned."
15377 #: ../src/guestfs-actions.pod:5504
15379 "Note that this function cannot correctly handle binary files (specifically, "
15380 "files containing C<\\0> character which is treated as end of line). For "
15381 "those you need to use the C<guestfs_read_file> function which has a more "
15382 "complex interface."
15386 #: ../src/guestfs-actions.pod:5515
15387 msgid "guestfs_readdir"
15391 #: ../src/guestfs-actions.pod:5517
15394 " struct guestfs_dirent_list *\n"
15395 " guestfs_readdir (guestfs_h *g,\n"
15396 " const char *dir);\n"
15401 #: ../src/guestfs-actions.pod:5521 ../fish/guestfish-actions.pod:3705
15402 msgid "This returns the list of directory entries in directory C<dir>."
15406 #: ../src/guestfs-actions.pod:5523 ../fish/guestfish-actions.pod:3707
15408 "All entries in the directory are returned, including C<.> and C<..>. The "
15409 "entries are I<not> sorted, but returned in the same order as the underlying "
15414 #: ../src/guestfs-actions.pod:5527 ../fish/guestfish-actions.pod:3711
15416 "Also this call returns basic file type information about each file. The "
15417 "C<ftyp> field will contain one of the following characters:"
15421 #: ../src/guestfs-actions.pod:5532 ../fish/guestfish-actions.pod:3716
15426 #: ../src/guestfs-actions.pod:5534 ../fish/guestfish-actions.pod:3718
15427 msgid "Block special"
15431 #: ../src/guestfs-actions.pod:5536 ../fish/guestfish-actions.pod:3720
15436 #: ../src/guestfs-actions.pod:5538 ../fish/guestfish-actions.pod:3722
15437 msgid "Char special"
15441 #: ../src/guestfs-actions.pod:5540 ../fish/guestfish-actions.pod:3724
15446 #: ../src/guestfs-actions.pod:5542 ../fish/guestfish-actions.pod:3726
15451 #: ../src/guestfs-actions.pod:5544 ../fish/guestfish-actions.pod:3728
15456 #: ../src/guestfs-actions.pod:5546 ../fish/guestfish-actions.pod:3730
15457 msgid "FIFO (named pipe)"
15461 #: ../src/guestfs-actions.pod:5548 ../fish/guestfish-actions.pod:3732
15466 #: ../src/guestfs-actions.pod:5550 ../fish/guestfish-actions.pod:3734
15467 msgid "Symbolic link"
15471 #: ../src/guestfs-actions.pod:5552 ../fish/guestfish-actions.pod:3736
15476 #: ../src/guestfs-actions.pod:5554 ../fish/guestfish-actions.pod:3738
15477 msgid "Regular file"
15481 #: ../src/guestfs-actions.pod:5556 ../fish/guestfish-actions.pod:3740
15486 #: ../src/guestfs-actions.pod:5558 ../fish/guestfish-actions.pod:3742
15491 #: ../src/guestfs-actions.pod:5560 ../fish/guestfish-actions.pod:3744
15496 #: ../src/guestfs-actions.pod:5562 ../fish/guestfish-actions.pod:3746
15497 msgid "Unknown file type"
15501 #: ../src/guestfs-actions.pod:5564 ../fish/guestfish-actions.pod:3748
15506 #: ../src/guestfs-actions.pod:5566 ../fish/guestfish-actions.pod:3750
15508 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
15512 #: ../src/guestfs-actions.pod:5571
15514 "This function is primarily intended for use by programs. To get a simple "
15515 "list of names, use C<guestfs_ls>. To get a printable directory for human "
15516 "consumption, use C<guestfs_ll>."
15520 #: ../src/guestfs-actions.pod:5575
15522 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
15523 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
15527 #: ../src/guestfs-actions.pod:5581
15528 msgid "guestfs_readlink"
15532 #: ../src/guestfs-actions.pod:5583
15536 " guestfs_readlink (guestfs_h *g,\n"
15537 " const char *path);\n"
15542 #: ../src/guestfs-actions.pod:5587 ../fish/guestfish-actions.pod:3763
15543 msgid "This command reads the target of a symbolic link."
15547 #: ../src/guestfs-actions.pod:5594
15548 msgid "guestfs_readlinklist"
15552 #: ../src/guestfs-actions.pod:5596
15556 " guestfs_readlinklist (guestfs_h *g,\n"
15557 " const char *path,\n"
15558 " char *const *names);\n"
15563 #: ../src/guestfs-actions.pod:5601 ../fish/guestfish-actions.pod:3769
15565 "This call allows you to do a C<readlink> operation on multiple files, where "
15566 "all files are in the directory C<path>. C<names> is the list of files from "
15571 #: ../src/guestfs-actions.pod:5605 ../fish/guestfish-actions.pod:3773
15573 "On return you get a list of strings, with a one-to-one correspondence to the "
15574 "C<names> list. Each string is the value of the symbolic link."
15578 #: ../src/guestfs-actions.pod:5609 ../fish/guestfish-actions.pod:3777
15580 "If the C<readlink(2)> operation fails on any name, then the corresponding "
15581 "result string is the empty string C<\"\">. However the whole operation is "
15582 "completed even if there were C<readlink(2)> errors, and so you can call this "
15583 "function with names where you don't know if they are symbolic links already "
15584 "(albeit slightly less efficient)."
15588 #: ../src/guestfs-actions.pod:5616 ../fish/guestfish-actions.pod:3784
15590 "This call is intended for programs that want to efficiently list a directory "
15591 "contents without making many round-trips. Very long directory listings "
15592 "might cause the protocol message size to be exceeded, causing this call to "
15593 "fail. The caller must split up such requests into smaller groups of names."
15597 #: ../src/guestfs-actions.pod:5629
15598 msgid "guestfs_realpath"
15602 #: ../src/guestfs-actions.pod:5631
15606 " guestfs_realpath (guestfs_h *g,\n"
15607 " const char *path);\n"
15612 #: ../src/guestfs-actions.pod:5635 ../fish/guestfish-actions.pod:3795
15614 "Return the canonicalized absolute pathname of C<path>. The returned path "
15615 "has no C<.>, C<..> or symbolic link path elements."
15619 #: ../src/guestfs-actions.pod:5643
15620 msgid "guestfs_removexattr"
15624 #: ../src/guestfs-actions.pod:5645
15628 " guestfs_removexattr (guestfs_h *g,\n"
15629 " const char *xattr,\n"
15630 " const char *path);\n"
15635 #: ../src/guestfs-actions.pod:5650 ../fish/guestfish-actions.pod:3802
15637 "This call removes the extended attribute named C<xattr> of the file C<path>."
15641 #: ../src/guestfs-actions.pod:5653
15642 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
15646 #: ../src/guestfs-actions.pod:5659
15647 msgid "guestfs_resize2fs"
15651 #: ../src/guestfs-actions.pod:5661
15655 " guestfs_resize2fs (guestfs_h *g,\n"
15656 " const char *device);\n"
15661 #: ../src/guestfs-actions.pod:5665 ../fish/guestfish-actions.pod:3811
15663 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
15664 "underlying device."
15668 #: ../src/guestfs-actions.pod:5668
15670 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
15671 "C<device> before calling this command. For unknown reasons C<resize2fs> "
15672 "sometimes gives an error about this and sometimes not. In any case, it is "
15673 "always safe to call C<guestfs_e2fsck_f> before calling this function."
15677 #: ../src/guestfs-actions.pod:5678
15678 msgid "guestfs_resize2fs_M"
15682 #: ../src/guestfs-actions.pod:5680
15686 " guestfs_resize2fs_M (guestfs_h *g,\n"
15687 " const char *device);\n"
15692 #: ../src/guestfs-actions.pod:5684
15694 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
15695 "resized to its minimum size. This works like the I<-M> option to the "
15696 "C<resize2fs> command."
15700 #: ../src/guestfs-actions.pod:5688
15702 "To get the resulting size of the filesystem you should call "
15703 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
15704 "These two numbers, multiplied together, give the resulting size of the "
15705 "minimal filesystem in bytes."
15709 #: ../src/guestfs-actions.pod:5695
15710 msgid "guestfs_resize2fs_size"
15714 #: ../src/guestfs-actions.pod:5697
15718 " guestfs_resize2fs_size (guestfs_h *g,\n"
15719 " const char *device,\n"
15720 " int64_t size);\n"
15725 #: ../src/guestfs-actions.pod:5702
15727 "This command is the same as C<guestfs_resize2fs> except that it allows you "
15728 "to specify the new size (in bytes) explicitly."
15732 #: ../src/guestfs-actions.pod:5709
15737 #: ../src/guestfs-actions.pod:5711
15741 " guestfs_rm (guestfs_h *g,\n"
15742 " const char *path);\n"
15747 #: ../src/guestfs-actions.pod:5715 ../fish/guestfish-actions.pod:3844
15748 msgid "Remove the single file C<path>."
15752 #: ../src/guestfs-actions.pod:5721
15753 msgid "guestfs_rm_rf"
15757 #: ../src/guestfs-actions.pod:5723
15761 " guestfs_rm_rf (guestfs_h *g,\n"
15762 " const char *path);\n"
15767 #: ../src/guestfs-actions.pod:5727 ../fish/guestfish-actions.pod:3850
15769 "Remove the file or directory C<path>, recursively removing the contents if "
15770 "its a directory. This is like the C<rm -rf> shell command."
15774 #: ../src/guestfs-actions.pod:5735
15775 msgid "guestfs_rmdir"
15779 #: ../src/guestfs-actions.pod:5737
15783 " guestfs_rmdir (guestfs_h *g,\n"
15784 " const char *path);\n"
15789 #: ../src/guestfs-actions.pod:5741 ../fish/guestfish-actions.pod:3858
15790 msgid "Remove the single directory C<path>."
15794 #: ../src/guestfs-actions.pod:5747
15795 msgid "guestfs_rmmountpoint"
15799 #: ../src/guestfs-actions.pod:5749
15803 " guestfs_rmmountpoint (guestfs_h *g,\n"
15804 " const char *exemptpath);\n"
15809 #: ../src/guestfs-actions.pod:5753
15811 "This calls removes a mountpoint that was previously created with "
15812 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
15816 #: ../src/guestfs-actions.pod:5761
15817 msgid "guestfs_scrub_device"
15821 #: ../src/guestfs-actions.pod:5763
15825 " guestfs_scrub_device (guestfs_h *g,\n"
15826 " const char *device);\n"
15831 #: ../src/guestfs-actions.pod:5767 ../fish/guestfish-actions.pod:3872
15833 "This command writes patterns over C<device> to make data retrieval more "
15838 #: ../src/guestfs-actions.pod:5770 ../src/guestfs-actions.pod:5791
15839 #: ../src/guestfs-actions.pod:5810 ../fish/guestfish-actions.pod:3875
15840 #: ../fish/guestfish-actions.pod:3890 ../fish/guestfish-actions.pod:3903
15842 "It is an interface to the L<scrub(1)> program. See that manual page for "
15847 #: ../src/guestfs-actions.pod:5778 ../src/guestfs-actions.pod:5796
15848 #: ../src/guestfs-actions.pod:5815
15849 msgid "(Added in 1.0.52)"
15853 #: ../src/guestfs-actions.pod:5780
15854 msgid "guestfs_scrub_file"
15858 #: ../src/guestfs-actions.pod:5782
15862 " guestfs_scrub_file (guestfs_h *g,\n"
15863 " const char *file);\n"
15868 #: ../src/guestfs-actions.pod:5786 ../fish/guestfish-actions.pod:3885
15870 "This command writes patterns over a file to make data retrieval more "
15875 #: ../src/guestfs-actions.pod:5789 ../fish/guestfish-actions.pod:3888
15876 msgid "The file is I<removed> after scrubbing."
15880 #: ../src/guestfs-actions.pod:5798
15881 msgid "guestfs_scrub_freespace"
15885 #: ../src/guestfs-actions.pod:5800
15889 " guestfs_scrub_freespace (guestfs_h *g,\n"
15890 " const char *dir);\n"
15895 #: ../src/guestfs-actions.pod:5804
15897 "This command creates the directory C<dir> and then fills it with files until "
15898 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
15899 "and deletes them. The intention is to scrub any free space on the partition "
15900 "containing C<dir>."
15904 #: ../src/guestfs-actions.pod:5817
15905 msgid "guestfs_set_append"
15909 #: ../src/guestfs-actions.pod:5819
15913 " guestfs_set_append (guestfs_h *g,\n"
15914 " const char *append);\n"
15919 #: ../src/guestfs-actions.pod:5823 ../fish/guestfish-actions.pod:3912
15921 "This function is used to add additional options to the guest kernel command "
15926 #: ../src/guestfs-actions.pod:5826 ../fish/guestfish-actions.pod:3915
15928 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
15929 "environment variable."
15933 #: ../src/guestfs-actions.pod:5829 ../fish/guestfish-actions.pod:3918
15935 "Setting C<append> to C<NULL> means I<no> additional options are passed "
15936 "(libguestfs always adds a few of its own)."
15940 #: ../src/guestfs-actions.pod:5836
15941 msgid "guestfs_set_attach_method"
15945 #: ../src/guestfs-actions.pod:5838
15949 " guestfs_set_attach_method (guestfs_h *g,\n"
15950 " const char *attachmethod);\n"
15955 #: ../src/guestfs-actions.pod:5842 ../fish/guestfish-actions.pod:3927
15957 "Set the method that libguestfs uses to connect to the back end guestfsd "
15958 "daemon. Possible methods are:"
15962 #: ../src/guestfs-actions.pod:5849 ../fish/guestfish-actions.pod:3934
15964 "Launch an appliance and connect to it. This is the ordinary method and the "
15969 #: ../src/guestfs-actions.pod:5852 ../fish/guestfish-actions.pod:3937
15970 msgid "C<unix:I<path>>"
15974 #: ../src/guestfs-actions.pod:5854 ../fish/guestfish-actions.pod:3939
15975 msgid "Connect to the Unix domain socket I<path>."
15979 #: ../src/guestfs-actions.pod:5856 ../fish/guestfish-actions.pod:3941
15981 "This method lets you connect to an existing daemon or (using virtio-serial) "
15982 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
15983 "RUNNING DAEMONS>."
15987 #: ../src/guestfs-actions.pod:5864
15988 msgid "guestfs_set_autosync"
15992 #: ../src/guestfs-actions.pod:5866
15996 " guestfs_set_autosync (guestfs_h *g,\n"
15997 " int autosync);\n"
16002 #: ../src/guestfs-actions.pod:5870 ../fish/guestfish-actions.pod:3953
16004 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
16005 "effort attempt to make filesystems consistent and synchronized when the "
16006 "handle is closed (also if the program exits without closing handles)."
16010 #: ../src/guestfs-actions.pod:5875 ../fish/guestfish-actions.pod:3958
16012 "This is enabled by default (since libguestfs 1.5.24, previously it was "
16013 "disabled by default)."
16017 #: ../src/guestfs-actions.pod:5882
16018 msgid "guestfs_set_direct"
16022 #: ../src/guestfs-actions.pod:5884
16026 " guestfs_set_direct (guestfs_h *g,\n"
16032 #: ../src/guestfs-actions.pod:5888 ../fish/guestfish-actions.pod:3967
16034 "If the direct appliance mode flag is enabled, then stdin and stdout are "
16035 "passed directly through to the appliance once it is launched."
16039 #: ../src/guestfs-actions.pod:5892
16041 "One consequence of this is that log messages aren't caught by the library "
16042 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
16047 #: ../src/guestfs-actions.pod:5896 ../fish/guestfish-actions.pod:3975
16048 msgid "You probably don't want to use this unless you know what you are doing."
16052 #: ../src/guestfs-actions.pod:5899 ../fish/guestfish-actions.pod:3978
16053 msgid "The default is disabled."
16057 #: ../src/guestfs-actions.pod:5905
16058 msgid "guestfs_set_e2label"
16062 #: ../src/guestfs-actions.pod:5907
16066 " guestfs_set_e2label (guestfs_h *g,\n"
16067 " const char *device,\n"
16068 " const char *label);\n"
16073 #: ../src/guestfs-actions.pod:5912 ../fish/guestfish-actions.pod:3984
16075 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
16076 "C<label>. Filesystem labels are limited to 16 characters."
16080 #: ../src/guestfs-actions.pod:5916
16082 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
16083 "the existing label on a filesystem."
16087 #: ../src/guestfs-actions.pod:5923
16088 msgid "guestfs_set_e2uuid"
16092 #: ../src/guestfs-actions.pod:5925
16096 " guestfs_set_e2uuid (guestfs_h *g,\n"
16097 " const char *device,\n"
16098 " const char *uuid);\n"
16103 #: ../src/guestfs-actions.pod:5930 ../fish/guestfish-actions.pod:3995
16105 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
16106 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
16107 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
16111 #: ../src/guestfs-actions.pod:5935
16113 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
16114 "the existing UUID of a filesystem."
16118 #: ../src/guestfs-actions.pod:5942
16119 msgid "guestfs_set_memsize"
16123 #: ../src/guestfs-actions.pod:5944
16127 " guestfs_set_memsize (guestfs_h *g,\n"
16133 #: ../src/guestfs-actions.pod:5948
16135 "This sets the memory size in megabytes allocated to the qemu subprocess. "
16136 "This only has any effect if called before C<guestfs_launch>."
16140 #: ../src/guestfs-actions.pod:5952 ../fish/guestfish-actions.pod:4013
16142 "You can also change this by setting the environment variable "
16143 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
16147 #: ../src/guestfs-actions.pod:5963
16148 msgid "guestfs_set_network"
16152 #: ../src/guestfs-actions.pod:5965
16156 " guestfs_set_network (guestfs_h *g,\n"
16162 #: ../src/guestfs-actions.pod:5969 ../fish/guestfish-actions.pod:4026
16164 "If C<network> is true, then the network is enabled in the libguestfs "
16165 "appliance. The default is false."
16169 #: ../src/guestfs-actions.pod:5972 ../fish/guestfish-actions.pod:4029
16171 "This affects whether commands are able to access the network (see L<guestfs"
16172 "(3)/RUNNING COMMANDS>)."
16176 #: ../src/guestfs-actions.pod:5975
16178 "You must call this before calling C<guestfs_launch>, otherwise it has no "
16183 #: ../src/guestfs-actions.pod:5982
16184 msgid "guestfs_set_path"
16188 #: ../src/guestfs-actions.pod:5984
16192 " guestfs_set_path (guestfs_h *g,\n"
16193 " const char *searchpath);\n"
16198 #: ../src/guestfs-actions.pod:5988 ../fish/guestfish-actions.pod:4041
16199 msgid "Set the path that libguestfs searches for kernel and initrd.img."
16203 #: ../src/guestfs-actions.pod:5990 ../fish/guestfish-actions.pod:4043
16205 "The default is C<$libdir/guestfs> unless overridden by setting "
16206 "C<LIBGUESTFS_PATH> environment variable."
16210 #: ../src/guestfs-actions.pod:5993 ../fish/guestfish-actions.pod:4046
16211 msgid "Setting C<path> to C<NULL> restores the default path."
16215 #: ../src/guestfs-actions.pod:5999
16216 msgid "guestfs_set_qemu"
16220 #: ../src/guestfs-actions.pod:6001
16224 " guestfs_set_qemu (guestfs_h *g,\n"
16225 " const char *qemu);\n"
16230 #: ../src/guestfs-actions.pod:6005 ../fish/guestfish-actions.pod:4054
16231 msgid "Set the qemu binary that we will use."
16235 #: ../src/guestfs-actions.pod:6007 ../fish/guestfish-actions.pod:4056
16237 "The default is chosen when the library was compiled by the configure script."
16241 #: ../src/guestfs-actions.pod:6010 ../fish/guestfish-actions.pod:4059
16243 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
16248 #: ../src/guestfs-actions.pod:6013 ../fish/guestfish-actions.pod:4062
16249 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
16253 #: ../src/guestfs-actions.pod:6015 ../fish/guestfish-actions.pod:4064
16255 "Note that you should call this function as early as possible after creating "
16256 "the handle. This is because some pre-launch operations depend on testing "
16257 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
16258 "don't retest features, and so you might see inconsistent results. Using the "
16259 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
16260 "the qemu binary at the same time as the handle is created."
16264 #: ../src/guestfs-actions.pod:6027
16265 msgid "guestfs_set_recovery_proc"
16269 #: ../src/guestfs-actions.pod:6029
16273 " guestfs_set_recovery_proc (guestfs_h *g,\n"
16274 " int recoveryproc);\n"
16279 #: ../src/guestfs-actions.pod:6033
16281 "If this is called with the parameter C<false> then C<guestfs_launch> does "
16282 "not create a recovery process. The purpose of the recovery process is to "
16283 "stop runaway qemu processes in the case where the main program aborts "
16288 #: ../src/guestfs-actions.pod:6038
16290 "This only has any effect if called before C<guestfs_launch>, and the default "
16295 #: ../src/guestfs-actions.pod:6041 ../fish/guestfish-actions.pod:4086
16297 "About the only time when you would want to disable this is if the main "
16298 "process will fork itself into the background (\"daemonize\" itself). In "
16299 "this case the recovery process thinks that the main program has disappeared "
16300 "and so kills qemu, which is not very helpful."
16304 #: ../src/guestfs-actions.pod:6051
16305 msgid "guestfs_set_selinux"
16309 #: ../src/guestfs-actions.pod:6053
16313 " guestfs_set_selinux (guestfs_h *g,\n"
16319 #: ../src/guestfs-actions.pod:6057 ../fish/guestfish-actions.pod:4098
16321 "This sets the selinux flag that is passed to the appliance at boot time. "
16322 "The default is C<selinux=0> (disabled)."
16326 #: ../src/guestfs-actions.pod:6060 ../fish/guestfish-actions.pod:4101
16328 "Note that if SELinux is enabled, it is always in Permissive mode "
16329 "(C<enforcing=0>)."
16333 #: ../src/guestfs-actions.pod:6070
16334 msgid "guestfs_set_trace"
16338 #: ../src/guestfs-actions.pod:6072
16342 " guestfs_set_trace (guestfs_h *g,\n"
16348 #: ../src/guestfs-actions.pod:6076 ../fish/guestfish-actions.pod:4113
16350 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
16351 "return values are traced."
16355 #: ../src/guestfs-actions.pod:6079 ../fish/guestfish-actions.pod:4116
16357 "If you want to trace C API calls into libguestfs (and other libraries) then "
16358 "possibly a better way is to use the external ltrace(1) command."
16362 #: ../src/guestfs-actions.pod:6083 ../fish/guestfish-actions.pod:4120
16364 "Command traces are disabled unless the environment variable "
16365 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
16369 #: ../src/guestfs-actions.pod:6086
16371 "Trace messages are normally sent to C<stderr>, unless you register a "
16372 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
16376 #: ../src/guestfs-actions.pod:6094
16377 msgid "guestfs_set_verbose"
16381 #: ../src/guestfs-actions.pod:6096
16385 " guestfs_set_verbose (guestfs_h *g,\n"
16391 #: ../src/guestfs-actions.pod:6100 ../fish/guestfish-actions.pod:4133
16392 msgid "If C<verbose> is true, this turns on verbose messages."
16396 #: ../src/guestfs-actions.pod:6102 ../fish/guestfish-actions.pod:4135
16398 "Verbose messages are disabled unless the environment variable "
16399 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
16403 #: ../src/guestfs-actions.pod:6105
16405 "Verbose messages are normally sent to C<stderr>, unless you register a "
16406 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
16410 #: ../src/guestfs-actions.pod:6113
16411 msgid "guestfs_setcon"
16415 #: ../src/guestfs-actions.pod:6115
16419 " guestfs_setcon (guestfs_h *g,\n"
16420 " const char *context);\n"
16425 #: ../src/guestfs-actions.pod:6119 ../fish/guestfish-actions.pod:4146
16427 "This sets the SELinux security context of the daemon to the string "
16432 #: ../src/guestfs-actions.pod:6122 ../fish/guestfish-actions.pod:4149
16433 msgid "See the documentation about SELINUX in L<guestfs(3)>."
16437 #: ../src/guestfs-actions.pod:6128
16438 msgid "guestfs_setxattr"
16442 #: ../src/guestfs-actions.pod:6130
16446 " guestfs_setxattr (guestfs_h *g,\n"
16447 " const char *xattr,\n"
16448 " const char *val,\n"
16450 " const char *path);\n"
16455 #: ../src/guestfs-actions.pod:6137 ../fish/guestfish-actions.pod:4155
16457 "This call sets the extended attribute named C<xattr> of the file C<path> to "
16458 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
16462 #: ../src/guestfs-actions.pod:6141
16463 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
16467 #: ../src/guestfs-actions.pod:6147
16468 msgid "guestfs_sfdisk"
16472 #: ../src/guestfs-actions.pod:6149
16476 " guestfs_sfdisk (guestfs_h *g,\n"
16477 " const char *device,\n"
16481 " char *const *lines);\n"
16486 #: ../src/guestfs-actions.pod:6157 ../fish/guestfish-actions.pod:4165
16488 "This is a direct interface to the L<sfdisk(8)> program for creating "
16489 "partitions on block devices."
16493 #: ../src/guestfs-actions.pod:6160 ../fish/guestfish-actions.pod:4168
16494 msgid "C<device> should be a block device, for example C</dev/sda>."
16498 #: ../src/guestfs-actions.pod:6162 ../fish/guestfish-actions.pod:4170
16500 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
16501 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
16502 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
16503 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
16504 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
16505 "the kernel) cannot work out the right geometry and you will need to tell it."
16509 #: ../src/guestfs-actions.pod:6170 ../fish/guestfish-actions.pod:4178
16511 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
16512 "refer to the L<sfdisk(8)> manpage."
16516 #: ../src/guestfs-actions.pod:6173 ../fish/guestfish-actions.pod:4181
16518 "To create a single partition occupying the whole disk, you would pass "
16519 "C<lines> as a single element list, when the single element being the string "
16524 #: ../src/guestfs-actions.pod:6177
16526 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
16530 #: ../src/guestfs-actions.pod:6185 ../src/guestfs-actions.pod:6215
16531 #: ../src/guestfs-actions.pod:6248 ../fish/guestfish-actions.pod:4191
16532 #: ../fish/guestfish-actions.pod:4214 ../fish/guestfish-actions.pod:4236
16534 "This function is deprecated. In new code, use the C<part_add> call instead."
16538 #: ../src/guestfs-actions.pod:6194
16539 msgid "guestfs_sfdiskM"
16543 #: ../src/guestfs-actions.pod:6196
16547 " guestfs_sfdiskM (guestfs_h *g,\n"
16548 " const char *device,\n"
16549 " char *const *lines);\n"
16554 #: ../src/guestfs-actions.pod:6201
16556 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
16557 "partition sizes are specified in megabytes only (rounded to the nearest "
16558 "cylinder) and you don't need to specify the cyls, heads and sectors "
16559 "parameters which were rarely if ever used anyway."
16563 #: ../src/guestfs-actions.pod:6207
16565 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
16566 "C<guestfs_part_disk>"
16570 #: ../src/guestfs-actions.pod:6224
16571 msgid "guestfs_sfdisk_N"
16575 #: ../src/guestfs-actions.pod:6226
16579 " guestfs_sfdisk_N (guestfs_h *g,\n"
16580 " const char *device,\n"
16585 " const char *line);\n"
16590 #: ../src/guestfs-actions.pod:6235 ../fish/guestfish-actions.pod:4225
16592 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
16593 "(note: C<n> counts from 1)."
16597 #: ../src/guestfs-actions.pod:6238
16599 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
16600 "for the cyls/heads/sectors parameters."
16604 #: ../src/guestfs-actions.pod:6241
16605 msgid "See also: C<guestfs_part_add>"
16609 #: ../src/guestfs-actions.pod:6257
16610 msgid "guestfs_sfdisk_disk_geometry"
16614 #: ../src/guestfs-actions.pod:6259
16618 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
16619 " const char *device);\n"
16624 #: ../src/guestfs-actions.pod:6263
16626 "This displays the disk geometry of C<device> read from the partition table. "
16627 "Especially in the case where the underlying block device has been resized, "
16628 "this can be different from the kernel's idea of the geometry (see "
16629 "C<guestfs_sfdisk_kernel_geometry>)."
16633 #: ../src/guestfs-actions.pod:6268 ../src/guestfs-actions.pod:6284
16634 #: ../fish/guestfish-actions.pod:4252 ../fish/guestfish-actions.pod:4261
16635 msgid "The result is in human-readable format, and not designed to be parsed."
16639 #: ../src/guestfs-actions.pod:6276
16640 msgid "guestfs_sfdisk_kernel_geometry"
16644 #: ../src/guestfs-actions.pod:6278
16648 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
16649 " const char *device);\n"
16654 #: ../src/guestfs-actions.pod:6282 ../fish/guestfish-actions.pod:4259
16655 msgid "This displays the kernel's idea of the geometry of C<device>."
16659 #: ../src/guestfs-actions.pod:6292
16660 msgid "guestfs_sfdisk_l"
16664 #: ../src/guestfs-actions.pod:6294
16668 " guestfs_sfdisk_l (guestfs_h *g,\n"
16669 " const char *device);\n"
16674 #: ../src/guestfs-actions.pod:6298 ../fish/guestfish-actions.pod:4268
16676 "This displays the partition table on C<device>, in the human-readable output "
16677 "of the L<sfdisk(8)> command. It is not intended to be parsed."
16681 #: ../src/guestfs-actions.pod:6302
16682 msgid "See also: C<guestfs_part_list>"
16686 #: ../src/guestfs-actions.pod:6307 ../fish/guestfish-actions.pod:4274
16688 "This function is deprecated. In new code, use the C<part_list> call instead."
16692 #: ../src/guestfs-actions.pod:6316
16697 #: ../src/guestfs-actions.pod:6318
16701 " guestfs_sh (guestfs_h *g,\n"
16702 " const char *command);\n"
16707 #: ../src/guestfs-actions.pod:6322 ../fish/guestfish-actions.pod:4285
16709 "This call runs a command from the guest filesystem via the guest's C</bin/"
16714 #: ../src/guestfs-actions.pod:6325
16715 msgid "This is like C<guestfs_command>, but passes the command to:"
16719 #: ../src/guestfs-actions.pod:6327 ../fish/guestfish-actions.pod:4290
16722 " /bin/sh -c \"command\"\n"
16727 #: ../src/guestfs-actions.pod:6329 ../fish/guestfish-actions.pod:4292
16729 "Depending on the guest's shell, this usually results in wildcards being "
16730 "expanded, shell expressions being interpolated and so on."
16734 #: ../src/guestfs-actions.pod:6333
16735 msgid "All the provisos about C<guestfs_command> apply to this call."
16739 #: ../src/guestfs-actions.pod:6340
16740 msgid "guestfs_sh_lines"
16744 #: ../src/guestfs-actions.pod:6342
16748 " guestfs_sh_lines (guestfs_h *g,\n"
16749 " const char *command);\n"
16754 #: ../src/guestfs-actions.pod:6346
16756 "This is the same as C<guestfs_sh>, but splits the result into a list of "
16761 #: ../src/guestfs-actions.pod:6349
16762 msgid "See also: C<guestfs_command_lines>"
16766 #: ../src/guestfs-actions.pod:6357
16767 msgid "guestfs_sleep"
16771 #: ../src/guestfs-actions.pod:6359
16775 " guestfs_sleep (guestfs_h *g,\n"
16781 #: ../src/guestfs-actions.pod:6363 ../fish/guestfish-actions.pod:4311
16782 msgid "Sleep for C<secs> seconds."
16786 #: ../src/guestfs-actions.pod:6367
16787 msgid "(Added in 1.0.41)"
16791 #: ../src/guestfs-actions.pod:6369 ../src/guestfs-structs.pod:109
16792 msgid "guestfs_stat"
16796 #: ../src/guestfs-actions.pod:6371
16799 " struct guestfs_stat *\n"
16800 " guestfs_stat (guestfs_h *g,\n"
16801 " const char *path);\n"
16806 #: ../src/guestfs-actions.pod:6377 ../fish/guestfish-actions.pod:4319
16807 msgid "This is the same as the C<stat(2)> system call."
16811 #: ../src/guestfs-actions.pod:6385 ../src/guestfs-structs.pod:135
16812 msgid "guestfs_statvfs"
16816 #: ../src/guestfs-actions.pod:6387
16819 " struct guestfs_statvfs *\n"
16820 " guestfs_statvfs (guestfs_h *g,\n"
16821 " const char *path);\n"
16826 #: ../src/guestfs-actions.pod:6391 ../fish/guestfish-actions.pod:4325
16828 "Returns file system statistics for any mounted file system. C<path> should "
16829 "be a file or directory in the mounted file system (typically it is the mount "
16830 "point itself, but it doesn't need to be)."
16834 #: ../src/guestfs-actions.pod:6395 ../fish/guestfish-actions.pod:4329
16835 msgid "This is the same as the C<statvfs(2)> system call."
16839 #: ../src/guestfs-actions.pod:6397
16841 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
16842 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
16846 #: ../src/guestfs-actions.pod:6403
16847 msgid "guestfs_strings"
16851 #: ../src/guestfs-actions.pod:6405
16855 " guestfs_strings (guestfs_h *g,\n"
16856 " const char *path);\n"
16861 #: ../src/guestfs-actions.pod:6409 ../fish/guestfish-actions.pod:4335
16863 "This runs the L<strings(1)> command on a file and returns the list of "
16864 "printable strings found."
16868 #: ../src/guestfs-actions.pod:6421
16869 msgid "guestfs_strings_e"
16873 #: ../src/guestfs-actions.pod:6423
16877 " guestfs_strings_e (guestfs_h *g,\n"
16878 " const char *encoding,\n"
16879 " const char *path);\n"
16884 #: ../src/guestfs-actions.pod:6428
16886 "This is like the C<guestfs_strings> command, but allows you to specify the "
16887 "encoding of strings that are looked for in the source file C<path>."
16891 #: ../src/guestfs-actions.pod:6432 ../fish/guestfish-actions.pod:4349
16892 msgid "Allowed encodings are:"
16896 #: ../src/guestfs-actions.pod:6436 ../fish/guestfish-actions.pod:4353
16901 #: ../src/guestfs-actions.pod:6438
16903 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
16904 "ISO-8859-X (this is what C<guestfs_strings> uses)."
16908 #: ../src/guestfs-actions.pod:6441 ../fish/guestfish-actions.pod:4358
16913 #: ../src/guestfs-actions.pod:6443 ../fish/guestfish-actions.pod:4360
16914 msgid "Single 8-bit-byte characters."
16918 #: ../src/guestfs-actions.pod:6445 ../fish/guestfish-actions.pod:4362
16923 #: ../src/guestfs-actions.pod:6447 ../fish/guestfish-actions.pod:4364
16924 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
16928 #: ../src/guestfs-actions.pod:6450 ../fish/guestfish-actions.pod:4367
16929 msgid "l (lower case letter L)"
16933 #: ../src/guestfs-actions.pod:6452 ../fish/guestfish-actions.pod:4369
16935 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
16936 "examining binaries in Windows guests."
16940 #: ../src/guestfs-actions.pod:6455 ../fish/guestfish-actions.pod:4372
16945 #: ../src/guestfs-actions.pod:6457 ../fish/guestfish-actions.pod:4374
16946 msgid "32-bit big endian such as UCS-4BE."
16950 #: ../src/guestfs-actions.pod:6459 ../fish/guestfish-actions.pod:4376
16955 #: ../src/guestfs-actions.pod:6461 ../fish/guestfish-actions.pod:4378
16956 msgid "32-bit little endian such as UCS-4LE."
16960 #: ../src/guestfs-actions.pod:6465 ../fish/guestfish-actions.pod:4382
16961 msgid "The returned strings are transcoded to UTF-8."
16965 #: ../src/guestfs-actions.pod:6476
16966 msgid "guestfs_swapoff_device"
16970 #: ../src/guestfs-actions.pod:6478
16974 " guestfs_swapoff_device (guestfs_h *g,\n"
16975 " const char *device);\n"
16980 #: ../src/guestfs-actions.pod:6482
16982 "This command disables the libguestfs appliance swap device or partition "
16983 "named C<device>. See C<guestfs_swapon_device>."
16987 #: ../src/guestfs-actions.pod:6490
16988 msgid "guestfs_swapoff_file"
16992 #: ../src/guestfs-actions.pod:6492
16996 " guestfs_swapoff_file (guestfs_h *g,\n"
16997 " const char *file);\n"
17002 #: ../src/guestfs-actions.pod:6496 ../fish/guestfish-actions.pod:4399
17003 msgid "This command disables the libguestfs appliance swap on file."
17007 #: ../src/guestfs-actions.pod:6502
17008 msgid "guestfs_swapoff_label"
17012 #: ../src/guestfs-actions.pod:6504
17016 " guestfs_swapoff_label (guestfs_h *g,\n"
17017 " const char *label);\n"
17022 #: ../src/guestfs-actions.pod:6508 ../fish/guestfish-actions.pod:4405
17024 "This command disables the libguestfs appliance swap on labeled swap "
17029 #: ../src/guestfs-actions.pod:6515
17030 msgid "guestfs_swapoff_uuid"
17034 #: ../src/guestfs-actions.pod:6517
17038 " guestfs_swapoff_uuid (guestfs_h *g,\n"
17039 " const char *uuid);\n"
17044 #: ../src/guestfs-actions.pod:6521 ../fish/guestfish-actions.pod:4412
17046 "This command disables the libguestfs appliance swap partition with the given "
17051 #: ../src/guestfs-actions.pod:6528
17052 msgid "guestfs_swapon_device"
17056 #: ../src/guestfs-actions.pod:6530
17060 " guestfs_swapon_device (guestfs_h *g,\n"
17061 " const char *device);\n"
17066 #: ../src/guestfs-actions.pod:6534
17068 "This command enables the libguestfs appliance to use the swap device or "
17069 "partition named C<device>. The increased memory is made available for all "
17070 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
17074 #: ../src/guestfs-actions.pod:6539 ../fish/guestfish-actions.pod:4424
17076 "Note that you should not swap to existing guest swap partitions unless you "
17077 "know what you are doing. They may contain hibernation information, or other "
17078 "information that the guest doesn't want you to trash. You also risk leaking "
17079 "information about the host to the guest this way. Instead, attach a new "
17080 "host device to the guest and swap on that."
17084 #: ../src/guestfs-actions.pod:6550
17085 msgid "guestfs_swapon_file"
17089 #: ../src/guestfs-actions.pod:6552
17093 " guestfs_swapon_file (guestfs_h *g,\n"
17094 " const char *file);\n"
17099 #: ../src/guestfs-actions.pod:6556
17101 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
17106 #: ../src/guestfs-actions.pod:6563
17107 msgid "guestfs_swapon_label"
17111 #: ../src/guestfs-actions.pod:6565
17115 " guestfs_swapon_label (guestfs_h *g,\n"
17116 " const char *label);\n"
17121 #: ../src/guestfs-actions.pod:6569
17123 "This command enables swap to a labeled swap partition. See "
17124 "C<guestfs_swapon_device> for other notes."
17128 #: ../src/guestfs-actions.pod:6576
17129 msgid "guestfs_swapon_uuid"
17133 #: ../src/guestfs-actions.pod:6578
17137 " guestfs_swapon_uuid (guestfs_h *g,\n"
17138 " const char *uuid);\n"
17143 #: ../src/guestfs-actions.pod:6582
17145 "This command enables swap to a swap partition with the given UUID. See "
17146 "C<guestfs_swapon_device> for other notes."
17150 #: ../src/guestfs-actions.pod:6589
17151 msgid "guestfs_sync"
17155 #: ../src/guestfs-actions.pod:6591
17159 " guestfs_sync (guestfs_h *g);\n"
17164 #: ../src/guestfs-actions.pod:6594 ../fish/guestfish-actions.pod:4456
17166 "This syncs the disk, so that any writes are flushed through to the "
17167 "underlying disk image."
17171 #: ../src/guestfs-actions.pod:6597 ../fish/guestfish-actions.pod:4459
17173 "You should always call this if you have modified a disk image, before "
17174 "closing the handle."
17178 #: ../src/guestfs-actions.pod:6604
17179 msgid "guestfs_tail"
17183 #: ../src/guestfs-actions.pod:6606
17187 " guestfs_tail (guestfs_h *g,\n"
17188 " const char *path);\n"
17193 #: ../src/guestfs-actions.pod:6610 ../fish/guestfish-actions.pod:4466
17195 "This command returns up to the last 10 lines of a file as a list of strings."
17199 #: ../src/guestfs-actions.pod:6622
17200 msgid "guestfs_tail_n"
17204 #: ../src/guestfs-actions.pod:6624
17208 " guestfs_tail_n (guestfs_h *g,\n"
17210 " const char *path);\n"
17215 #: ../src/guestfs-actions.pod:6629 ../fish/guestfish-actions.pod:4476
17217 "If the parameter C<nrlines> is a positive number, this returns the last "
17218 "C<nrlines> lines of the file C<path>."
17222 #: ../src/guestfs-actions.pod:6632 ../fish/guestfish-actions.pod:4479
17224 "If the parameter C<nrlines> is a negative number, this returns lines from "
17225 "the file C<path>, starting with the C<-nrlines>th line."
17229 #: ../src/guestfs-actions.pod:6646
17230 msgid "guestfs_tar_in"
17234 #: ../src/guestfs-actions.pod:6648
17238 " guestfs_tar_in (guestfs_h *g,\n"
17239 " const char *tarfile,\n"
17240 " const char *directory);\n"
17245 #: ../src/guestfs-actions.pod:6653 ../fish/guestfish-actions.pod:4491
17247 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
17248 "tar file) into C<directory>."
17252 #: ../src/guestfs-actions.pod:6656
17254 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
17258 #: ../src/guestfs-actions.pod:6661 ../src/guestfs-actions.pod:6678
17259 #: ../src/guestfs-actions.pod:6694 ../src/guestfs-actions.pod:6710
17260 msgid "(Added in 1.0.3)"
17264 #: ../src/guestfs-actions.pod:6663
17265 msgid "guestfs_tar_out"
17269 #: ../src/guestfs-actions.pod:6665
17273 " guestfs_tar_out (guestfs_h *g,\n"
17274 " const char *directory,\n"
17275 " const char *tarfile);\n"
17280 #: ../src/guestfs-actions.pod:6670 ../fish/guestfish-actions.pod:4503
17282 "This command packs the contents of C<directory> and downloads it to local "
17287 #: ../src/guestfs-actions.pod:6673
17289 "To download a compressed tarball, use C<guestfs_tgz_out> or "
17290 "C<guestfs_txz_out>."
17294 #: ../src/guestfs-actions.pod:6680
17295 msgid "guestfs_tgz_in"
17299 #: ../src/guestfs-actions.pod:6682
17303 " guestfs_tgz_in (guestfs_h *g,\n"
17304 " const char *tarball,\n"
17305 " const char *directory);\n"
17310 #: ../src/guestfs-actions.pod:6687 ../fish/guestfish-actions.pod:4515
17312 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
17313 "tar file) into C<directory>."
17317 #: ../src/guestfs-actions.pod:6690
17318 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
17322 #: ../src/guestfs-actions.pod:6696
17323 msgid "guestfs_tgz_out"
17327 #: ../src/guestfs-actions.pod:6698
17331 " guestfs_tgz_out (guestfs_h *g,\n"
17332 " const char *directory,\n"
17333 " const char *tarball);\n"
17338 #: ../src/guestfs-actions.pod:6703 ../fish/guestfish-actions.pod:4526
17340 "This command packs the contents of C<directory> and downloads it to local "
17345 #: ../src/guestfs-actions.pod:6706
17346 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
17350 #: ../src/guestfs-actions.pod:6712
17351 msgid "guestfs_touch"
17355 #: ../src/guestfs-actions.pod:6714
17359 " guestfs_touch (guestfs_h *g,\n"
17360 " const char *path);\n"
17365 #: ../src/guestfs-actions.pod:6718 ../fish/guestfish-actions.pod:4537
17367 "Touch acts like the L<touch(1)> command. It can be used to update the "
17368 "timestamps on a file, or, if the file does not exist, to create a new zero-"
17373 #: ../src/guestfs-actions.pod:6722 ../fish/guestfish-actions.pod:4541
17375 "This command only works on regular files, and will fail on other file types "
17376 "such as directories, symbolic links, block special etc."
17380 #: ../src/guestfs-actions.pod:6729
17381 msgid "guestfs_truncate"
17385 #: ../src/guestfs-actions.pod:6731
17389 " guestfs_truncate (guestfs_h *g,\n"
17390 " const char *path);\n"
17395 #: ../src/guestfs-actions.pod:6735 ../fish/guestfish-actions.pod:4548
17397 "This command truncates C<path> to a zero-length file. The file must exist "
17402 #: ../src/guestfs-actions.pod:6742
17403 msgid "guestfs_truncate_size"
17407 #: ../src/guestfs-actions.pod:6744
17411 " guestfs_truncate_size (guestfs_h *g,\n"
17412 " const char *path,\n"
17413 " int64_t size);\n"
17418 #: ../src/guestfs-actions.pod:6749 ../fish/guestfish-actions.pod:4555
17420 "This command truncates C<path> to size C<size> bytes. The file must exist "
17425 #: ../src/guestfs-actions.pod:6752
17427 "If the current file size is less than C<size> then the file is extended to "
17428 "the required size with zero bytes. This creates a sparse file (ie. disk "
17429 "blocks are not allocated for the file until you write to it). To create a "
17430 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
17434 #: ../src/guestfs-actions.pod:6762
17435 msgid "guestfs_tune2fs_l"
17439 #: ../src/guestfs-actions.pod:6764
17443 " guestfs_tune2fs_l (guestfs_h *g,\n"
17444 " const char *device);\n"
17449 #: ../src/guestfs-actions.pod:6768 ../fish/guestfish-actions.pod:4568
17451 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
17456 #: ../src/guestfs-actions.pod:6771 ../fish/guestfish-actions.pod:4571
17458 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
17459 "for more details. The list of fields returned isn't clearly defined, and "
17460 "depends on both the version of C<tune2fs> that libguestfs was built against, "
17461 "and the filesystem itself."
17465 #: ../src/guestfs-actions.pod:6784
17466 msgid "guestfs_txz_in"
17470 #: ../src/guestfs-actions.pod:6786
17474 " guestfs_txz_in (guestfs_h *g,\n"
17475 " const char *tarball,\n"
17476 " const char *directory);\n"
17481 #: ../src/guestfs-actions.pod:6791 ../fish/guestfish-actions.pod:4580
17483 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
17484 "tar file) into C<directory>."
17488 #: ../src/guestfs-actions.pod:6798
17489 msgid "guestfs_txz_out"
17493 #: ../src/guestfs-actions.pod:6800
17497 " guestfs_txz_out (guestfs_h *g,\n"
17498 " const char *directory,\n"
17499 " const char *tarball);\n"
17504 #: ../src/guestfs-actions.pod:6805 ../fish/guestfish-actions.pod:4589
17506 "This command packs the contents of C<directory> and downloads it to local "
17507 "file C<tarball> (as an xz compressed tar archive)."
17511 #: ../src/guestfs-actions.pod:6812
17512 msgid "guestfs_umask"
17516 #: ../src/guestfs-actions.pod:6814
17520 " guestfs_umask (guestfs_h *g,\n"
17526 #: ../src/guestfs-actions.pod:6818 ../fish/guestfish-actions.pod:4598
17528 "This function sets the mask used for creating new files and device nodes to "
17533 #: ../src/guestfs-actions.pod:6821 ../fish/guestfish-actions.pod:4601
17535 "Typical umask values would be C<022> which creates new files with "
17536 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
17537 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
17541 #: ../src/guestfs-actions.pod:6826 ../fish/guestfish-actions.pod:4606
17543 "The default umask is C<022>. This is important because it means that "
17544 "directories and device nodes will be created with C<0644> or C<0755> mode "
17545 "even if you specify C<0777>."
17549 #: ../src/guestfs-actions.pod:6830
17551 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
17552 "C<guestfs_mkdir>."
17556 #: ../src/guestfs-actions.pod:6833 ../fish/guestfish-actions.pod:4613
17557 msgid "This call returns the previous umask."
17561 #: ../src/guestfs-actions.pod:6839
17562 msgid "guestfs_umount"
17566 #: ../src/guestfs-actions.pod:6841
17570 " guestfs_umount (guestfs_h *g,\n"
17571 " const char *pathordevice);\n"
17576 #: ../src/guestfs-actions.pod:6845 ../fish/guestfish-actions.pod:4621
17578 "This unmounts the given filesystem. The filesystem may be specified either "
17579 "by its mountpoint (path) or the device which contains the filesystem."
17583 #: ../src/guestfs-actions.pod:6853
17584 msgid "guestfs_umount_all"
17588 #: ../src/guestfs-actions.pod:6855
17592 " guestfs_umount_all (guestfs_h *g);\n"
17597 #: ../src/guestfs-actions.pod:6858 ../fish/guestfish-actions.pod:4631
17598 msgid "This unmounts all mounted filesystems."
17602 #: ../src/guestfs-actions.pod:6860 ../fish/guestfish-actions.pod:4633
17603 msgid "Some internal mounts are not unmounted by this call."
17607 #: ../src/guestfs-actions.pod:6866
17608 msgid "guestfs_upload"
17612 #: ../src/guestfs-actions.pod:6868
17616 " guestfs_upload (guestfs_h *g,\n"
17617 " const char *filename,\n"
17618 " const char *remotefilename);\n"
17623 #: ../src/guestfs-actions.pod:6873 ../src/guestfs-actions.pod:6897
17624 #: ../fish/guestfish-actions.pod:4639 ../fish/guestfish-actions.pod:4652
17625 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
17629 #: ../src/guestfs-actions.pod:6878
17630 msgid "See also C<guestfs_download>."
17634 #: ../src/guestfs-actions.pod:6889
17635 msgid "guestfs_upload_offset"
17639 #: ../src/guestfs-actions.pod:6891
17643 " guestfs_upload_offset (guestfs_h *g,\n"
17644 " const char *filename,\n"
17645 " const char *remotefilename,\n"
17646 " int64_t offset);\n"
17651 #: ../src/guestfs-actions.pod:6900 ../fish/guestfish-actions.pod:4655
17653 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
17654 "The intention is to overwrite parts of existing files or devices, although "
17655 "if a non-existant file is specified then it is created with a \"hole\" "
17656 "before C<offset>. The size of the data written is implicit in the size of "
17657 "the source C<filename>."
17661 #: ../src/guestfs-actions.pod:6907
17663 "Note that there is no limit on the amount of data that can be uploaded with "
17664 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
17665 "full amount unless an error occurs."
17669 #: ../src/guestfs-actions.pod:6912
17670 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
17674 #: ../src/guestfs-actions.pod:6923
17675 msgid "guestfs_utimens"
17679 #: ../src/guestfs-actions.pod:6925
17683 " guestfs_utimens (guestfs_h *g,\n"
17684 " const char *path,\n"
17685 " int64_t atsecs,\n"
17686 " int64_t atnsecs,\n"
17687 " int64_t mtsecs,\n"
17688 " int64_t mtnsecs);\n"
17693 #: ../src/guestfs-actions.pod:6933 ../fish/guestfish-actions.pod:4675
17694 msgid "This command sets the timestamps of a file with nanosecond precision."
17698 #: ../src/guestfs-actions.pod:6936 ../fish/guestfish-actions.pod:4678
17700 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
17705 #: ../src/guestfs-actions.pod:6939 ../fish/guestfish-actions.pod:4681
17707 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
17708 "nanoseconds from the epoch."
17712 #: ../src/guestfs-actions.pod:6942 ../fish/guestfish-actions.pod:4684
17714 "If the C<*nsecs> field contains the special value C<-1> then the "
17715 "corresponding timestamp is set to the current time. (The C<*secs> field is "
17716 "ignored in this case)."
17720 #: ../src/guestfs-actions.pod:6946 ../fish/guestfish-actions.pod:4688
17722 "If the C<*nsecs> field contains the special value C<-2> then the "
17723 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
17728 #: ../src/guestfs-actions.pod:6954 ../src/guestfs-structs.pod:175
17729 msgid "guestfs_version"
17733 #: ../src/guestfs-actions.pod:6956
17736 " struct guestfs_version *\n"
17737 " guestfs_version (guestfs_h *g);\n"
17742 #: ../src/guestfs-actions.pod:6959 ../fish/guestfish-actions.pod:4696
17744 "Return the libguestfs version number that the program is linked against."
17748 #: ../src/guestfs-actions.pod:6962 ../fish/guestfish-actions.pod:4699
17750 "Note that because of dynamic linking this is not necessarily the version of "
17751 "libguestfs that you compiled against. You can compile the program, and then "
17752 "at runtime dynamically link against a completely different C<libguestfs.so> "
17757 #: ../src/guestfs-actions.pod:6967 ../fish/guestfish-actions.pod:4704
17759 "This call was added in version C<1.0.58>. In previous versions of "
17760 "libguestfs there was no way to get the version number. From C code you can "
17761 "use dynamic linker functions to find out if this symbol exists (if it "
17762 "doesn't, then it's an earlier version)."
17766 #: ../src/guestfs-actions.pod:6973 ../fish/guestfish-actions.pod:4710
17768 "The call returns a structure with four elements. The first three (C<major>, "
17769 "C<minor> and C<release>) are numbers and correspond to the usual version "
17770 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
17771 "but may be used for distro-specific information."
17775 #: ../src/guestfs-actions.pod:6979 ../fish/guestfish-actions.pod:4716
17777 "To construct the original version string: C<$major.$minor.$release$extra>"
17781 #: ../src/guestfs-actions.pod:6982 ../fish/guestfish-actions.pod:4719
17782 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
17786 #: ../src/guestfs-actions.pod:6984
17788 "I<Note:> Don't use this call to test for availability of features. In "
17789 "enterprise distributions we backport features from later versions into "
17790 "earlier versions, making this an unreliable way to test for features. Use "
17791 "C<guestfs_available> instead."
17795 #: ../src/guestfs-actions.pod:6990
17797 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
17798 "error. I<The caller must call C<guestfs_free_version> after use>."
17802 #: ../src/guestfs-actions.pod:6994
17803 msgid "(Added in 1.0.58)"
17807 #: ../src/guestfs-actions.pod:6996
17808 msgid "guestfs_vfs_label"
17812 #: ../src/guestfs-actions.pod:6998
17816 " guestfs_vfs_label (guestfs_h *g,\n"
17817 " const char *device);\n"
17822 #: ../src/guestfs-actions.pod:7002 ../fish/guestfish-actions.pod:4731
17823 msgid "This returns the filesystem label of the filesystem on C<device>."
17827 #: ../src/guestfs-actions.pod:7005 ../fish/guestfish-actions.pod:4734
17828 msgid "If the filesystem is unlabeled, this returns the empty string."
17832 #: ../src/guestfs-actions.pod:7007
17833 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
17837 #: ../src/guestfs-actions.pod:7012 ../src/guestfs-actions.pod:7049
17838 msgid "(Added in 1.3.18)"
17842 #: ../src/guestfs-actions.pod:7014
17843 msgid "guestfs_vfs_type"
17847 #: ../src/guestfs-actions.pod:7016
17851 " guestfs_vfs_type (guestfs_h *g,\n"
17852 " const char *device);\n"
17857 #: ../src/guestfs-actions.pod:7020 ../fish/guestfish-actions.pod:4742
17859 "This command gets the filesystem type corresponding to the filesystem on "
17864 #: ../src/guestfs-actions.pod:7023 ../fish/guestfish-actions.pod:4745
17866 "For most filesystems, the result is the name of the Linux VFS module which "
17867 "would be used to mount this filesystem if you mounted it without specifying "
17868 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
17872 #: ../src/guestfs-actions.pod:7033
17873 msgid "guestfs_vfs_uuid"
17877 #: ../src/guestfs-actions.pod:7035
17881 " guestfs_vfs_uuid (guestfs_h *g,\n"
17882 " const char *device);\n"
17887 #: ../src/guestfs-actions.pod:7039 ../fish/guestfish-actions.pod:4754
17888 msgid "This returns the filesystem UUID of the filesystem on C<device>."
17892 #: ../src/guestfs-actions.pod:7042 ../fish/guestfish-actions.pod:4757
17893 msgid "If the filesystem does not have a UUID, this returns the empty string."
17897 #: ../src/guestfs-actions.pod:7044
17898 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
17902 #: ../src/guestfs-actions.pod:7051
17903 msgid "guestfs_vg_activate"
17907 #: ../src/guestfs-actions.pod:7053
17911 " guestfs_vg_activate (guestfs_h *g,\n"
17913 " char *const *volgroups);\n"
17918 #: ../src/guestfs-actions.pod:7058 ../fish/guestfish-actions.pod:4765
17920 "This command activates or (if C<activate> is false) deactivates all logical "
17921 "volumes in the listed volume groups C<volgroups>. If activated, then they "
17922 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
17923 "deactivated, then those devices disappear."
17927 #: ../src/guestfs-actions.pod:7064 ../fish/guestfish-actions.pod:4771
17928 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
17932 #: ../src/guestfs-actions.pod:7066 ../fish/guestfish-actions.pod:4773
17934 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
17935 "activated or deactivated."
17939 #: ../src/guestfs-actions.pod:7073
17940 msgid "guestfs_vg_activate_all"
17944 #: ../src/guestfs-actions.pod:7075
17948 " guestfs_vg_activate_all (guestfs_h *g,\n"
17949 " int activate);\n"
17954 #: ../src/guestfs-actions.pod:7079 ../fish/guestfish-actions.pod:4780
17956 "This command activates or (if C<activate> is false) deactivates all logical "
17957 "volumes in all volume groups. If activated, then they are made known to the "
17958 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
17959 "those devices disappear."
17963 #: ../src/guestfs-actions.pod:7085 ../fish/guestfish-actions.pod:4786
17964 msgid "This command is the same as running C<vgchange -a y|n>"
17968 #: ../src/guestfs-actions.pod:7091
17969 msgid "guestfs_vgcreate"
17973 #: ../src/guestfs-actions.pod:7093
17977 " guestfs_vgcreate (guestfs_h *g,\n"
17978 " const char *volgroup,\n"
17979 " char *const *physvols);\n"
17984 #: ../src/guestfs-actions.pod:7098 ../fish/guestfish-actions.pod:4792
17986 "This creates an LVM volume group called C<volgroup> from the non-empty list "
17987 "of physical volumes C<physvols>."
17991 #: ../src/guestfs-actions.pod:7105
17992 msgid "guestfs_vglvuuids"
17996 #: ../src/guestfs-actions.pod:7107
18000 " guestfs_vglvuuids (guestfs_h *g,\n"
18001 " const char *vgname);\n"
18006 #: ../src/guestfs-actions.pod:7111 ../fish/guestfish-actions.pod:4799
18008 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
18009 "volumes created in this volume group."
18013 #: ../src/guestfs-actions.pod:7114
18015 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
18016 "associate logical volumes and volume groups."
18020 #: ../src/guestfs-actions.pod:7117
18021 msgid "See also C<guestfs_vgpvuuids>."
18025 #: ../src/guestfs-actions.pod:7125
18026 msgid "guestfs_vgpvuuids"
18030 #: ../src/guestfs-actions.pod:7127
18034 " guestfs_vgpvuuids (guestfs_h *g,\n"
18035 " const char *vgname);\n"
18040 #: ../src/guestfs-actions.pod:7131 ../fish/guestfish-actions.pod:4811
18042 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
18043 "volumes that this volume group resides on."
18047 #: ../src/guestfs-actions.pod:7134
18049 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
18050 "associate physical volumes and volume groups."
18054 #: ../src/guestfs-actions.pod:7137
18055 msgid "See also C<guestfs_vglvuuids>."
18059 #: ../src/guestfs-actions.pod:7145
18060 msgid "guestfs_vgremove"
18064 #: ../src/guestfs-actions.pod:7147
18068 " guestfs_vgremove (guestfs_h *g,\n"
18069 " const char *vgname);\n"
18074 #: ../src/guestfs-actions.pod:7151 ../fish/guestfish-actions.pod:4823
18075 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
18079 #: ../src/guestfs-actions.pod:7153 ../fish/guestfish-actions.pod:4825
18081 "This also forcibly removes all logical volumes in the volume group (if any)."
18085 #: ../src/guestfs-actions.pod:7160
18086 msgid "guestfs_vgrename"
18090 #: ../src/guestfs-actions.pod:7162
18094 " guestfs_vgrename (guestfs_h *g,\n"
18095 " const char *volgroup,\n"
18096 " const char *newvolgroup);\n"
18101 #: ../src/guestfs-actions.pod:7167 ../fish/guestfish-actions.pod:4832
18102 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
18106 #: ../src/guestfs-actions.pod:7173
18107 msgid "guestfs_vgs"
18111 #: ../src/guestfs-actions.pod:7175
18115 " guestfs_vgs (guestfs_h *g);\n"
18120 #: ../src/guestfs-actions.pod:7178 ../fish/guestfish-actions.pod:4838
18122 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
18127 #: ../src/guestfs-actions.pod:7181 ../fish/guestfish-actions.pod:4841
18129 "This returns a list of just the volume group names that were detected (eg. "
18134 #: ../src/guestfs-actions.pod:7184
18135 msgid "See also C<guestfs_vgs_full>."
18139 #: ../src/guestfs-actions.pod:7192
18140 msgid "guestfs_vgs_full"
18144 #: ../src/guestfs-actions.pod:7194
18147 " struct guestfs_lvm_vg_list *\n"
18148 " guestfs_vgs_full (guestfs_h *g);\n"
18153 #: ../src/guestfs-actions.pod:7197 ../fish/guestfish-actions.pod:4850
18155 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
18156 "> command. The \"full\" version includes all fields."
18160 #: ../src/guestfs-actions.pod:7200
18162 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
18163 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
18167 #: ../src/guestfs-actions.pod:7206
18168 msgid "guestfs_vgscan"
18172 #: ../src/guestfs-actions.pod:7208
18176 " guestfs_vgscan (guestfs_h *g);\n"
18181 #: ../src/guestfs-actions.pod:7211 ../fish/guestfish-actions.pod:4857
18183 "This rescans all block devices and rebuilds the list of LVM physical "
18184 "volumes, volume groups and logical volumes."
18188 #: ../src/guestfs-actions.pod:7218
18189 msgid "guestfs_vguuid"
18193 #: ../src/guestfs-actions.pod:7220
18197 " guestfs_vguuid (guestfs_h *g,\n"
18198 " const char *vgname);\n"
18203 #: ../src/guestfs-actions.pod:7224 ../fish/guestfish-actions.pod:4864
18204 msgid "This command returns the UUID of the LVM VG named C<vgname>."
18208 #: ../src/guestfs-actions.pod:7231
18209 msgid "guestfs_wait_ready"
18213 #: ../src/guestfs-actions.pod:7233
18217 " guestfs_wait_ready (guestfs_h *g);\n"
18222 #: ../src/guestfs-actions.pod:7236
18223 msgid "This function is a no op."
18227 #: ../src/guestfs-actions.pod:7238
18229 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
18230 "calling C<guestfs_launch> to wait for the launch to complete. However this "
18231 "is no longer necessary because C<guestfs_launch> now does the waiting."
18235 #: ../src/guestfs-actions.pod:7243
18237 "If you see any calls to this function in code then you can just remove them, "
18238 "unless you want to retain compatibility with older versions of the API."
18242 #: ../src/guestfs-actions.pod:7249
18244 "This function is deprecated. In new code, use the C<launch> call instead."
18248 #: ../src/guestfs-actions.pod:7258
18249 msgid "guestfs_wc_c"
18253 #: ../src/guestfs-actions.pod:7260
18257 " guestfs_wc_c (guestfs_h *g,\n"
18258 " const char *path);\n"
18263 #: ../src/guestfs-actions.pod:7264 ../fish/guestfish-actions.pod:4870
18265 "This command counts the characters in a file, using the C<wc -c> external "
18270 #: ../src/guestfs-actions.pod:7271
18271 msgid "guestfs_wc_l"
18275 #: ../src/guestfs-actions.pod:7273
18279 " guestfs_wc_l (guestfs_h *g,\n"
18280 " const char *path);\n"
18285 #: ../src/guestfs-actions.pod:7277 ../fish/guestfish-actions.pod:4877
18287 "This command counts the lines in a file, using the C<wc -l> external command."
18291 #: ../src/guestfs-actions.pod:7284
18292 msgid "guestfs_wc_w"
18296 #: ../src/guestfs-actions.pod:7286
18300 " guestfs_wc_w (guestfs_h *g,\n"
18301 " const char *path);\n"
18306 #: ../src/guestfs-actions.pod:7290 ../fish/guestfish-actions.pod:4884
18308 "This command counts the words in a file, using the C<wc -w> external command."
18312 #: ../src/guestfs-actions.pod:7297
18313 msgid "guestfs_write"
18317 #: ../src/guestfs-actions.pod:7299
18321 " guestfs_write (guestfs_h *g,\n"
18322 " const char *path,\n"
18323 " const char *content,\n"
18324 " size_t content_size);\n"
18329 #: ../src/guestfs-actions.pod:7305 ../fish/guestfish-actions.pod:4891
18331 "This call creates a file called C<path>. The content of the file is the "
18332 "string C<content> (which can contain any 8 bit data)."
18336 #: ../src/guestfs-actions.pod:7315
18337 msgid "guestfs_write_file"
18341 #: ../src/guestfs-actions.pod:7317
18345 " guestfs_write_file (guestfs_h *g,\n"
18346 " const char *path,\n"
18347 " const char *content,\n"
18353 #: ../src/guestfs-actions.pod:7323 ../fish/guestfish-actions.pod:4901
18355 "This call creates a file called C<path>. The contents of the file is the "
18356 "string C<content> (which can contain any 8 bit data), with length C<size>."
18360 #: ../src/guestfs-actions.pod:7327 ../fish/guestfish-actions.pod:4905
18362 "As a special case, if C<size> is C<0> then the length is calculated using "
18363 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
18367 #: ../src/guestfs-actions.pod:7331 ../fish/guestfish-actions.pod:4909
18369 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
18370 "I<not> work, even if the length is specified."
18374 #: ../src/guestfs-actions.pod:7339 ../fish/guestfish-actions.pod:4915
18376 "This function is deprecated. In new code, use the C<write> call instead."
18380 #: ../src/guestfs-actions.pod:7348
18381 msgid "guestfs_zegrep"
18385 #: ../src/guestfs-actions.pod:7350
18389 " guestfs_zegrep (guestfs_h *g,\n"
18390 " const char *regex,\n"
18391 " const char *path);\n"
18396 #: ../src/guestfs-actions.pod:7355 ../fish/guestfish-actions.pod:4926
18398 "This calls the external C<zegrep> program and returns the matching lines."
18402 #: ../src/guestfs-actions.pod:7367
18403 msgid "guestfs_zegrepi"
18407 #: ../src/guestfs-actions.pod:7369
18411 " guestfs_zegrepi (guestfs_h *g,\n"
18412 " const char *regex,\n"
18413 " const char *path);\n"
18418 #: ../src/guestfs-actions.pod:7374 ../fish/guestfish-actions.pod:4936
18420 "This calls the external C<zegrep -i> program and returns the matching lines."
18424 #: ../src/guestfs-actions.pod:7386
18425 msgid "guestfs_zero"
18429 #: ../src/guestfs-actions.pod:7388
18433 " guestfs_zero (guestfs_h *g,\n"
18434 " const char *device);\n"
18439 #: ../src/guestfs-actions.pod:7392 ../fish/guestfish-actions.pod:4946
18440 msgid "This command writes zeroes over the first few blocks of C<device>."
18444 #: ../src/guestfs-actions.pod:7394 ../fish/guestfish-actions.pod:4948
18446 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
18447 "securely wipe the device). It should be sufficient to remove any partition "
18448 "tables, filesystem superblocks and so on."
18452 #: ../src/guestfs-actions.pod:7398
18454 "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>, "
18455 "C<guestfs_is_zero_device>"
18459 #: ../src/guestfs-actions.pod:7410
18460 msgid "guestfs_zero_device"
18464 #: ../src/guestfs-actions.pod:7412
18468 " guestfs_zero_device (guestfs_h *g,\n"
18469 " const char *device);\n"
18474 #: ../src/guestfs-actions.pod:7416
18476 "This command writes zeroes over the entire C<device>. Compare with "
18477 "C<guestfs_zero> which just zeroes the first few blocks of a device."
18481 #: ../src/guestfs-actions.pod:7430
18482 msgid "(Added in 1.3.1)"
18486 #: ../src/guestfs-actions.pod:7432
18487 msgid "guestfs_zerofree"
18491 #: ../src/guestfs-actions.pod:7434
18495 " guestfs_zerofree (guestfs_h *g,\n"
18496 " const char *device);\n"
18501 #: ../src/guestfs-actions.pod:7438 ../fish/guestfish-actions.pod:4970
18503 "This runs the I<zerofree> program on C<device>. This program claims to zero "
18504 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
18505 "possible to compress the filesystem more effectively."
18509 #: ../src/guestfs-actions.pod:7443 ../fish/guestfish-actions.pod:4975
18510 msgid "You should B<not> run this program if the filesystem is mounted."
18514 #: ../src/guestfs-actions.pod:7446 ../fish/guestfish-actions.pod:4978
18516 "It is possible that using this program can damage the filesystem or data on "
18521 #: ../src/guestfs-actions.pod:7453
18522 msgid "guestfs_zfgrep"
18526 #: ../src/guestfs-actions.pod:7455
18530 " guestfs_zfgrep (guestfs_h *g,\n"
18531 " const char *pattern,\n"
18532 " const char *path);\n"
18537 #: ../src/guestfs-actions.pod:7460 ../fish/guestfish-actions.pod:4985
18539 "This calls the external C<zfgrep> program and returns the matching lines."
18543 #: ../src/guestfs-actions.pod:7472
18544 msgid "guestfs_zfgrepi"
18548 #: ../src/guestfs-actions.pod:7474
18552 " guestfs_zfgrepi (guestfs_h *g,\n"
18553 " const char *pattern,\n"
18554 " const char *path);\n"
18559 #: ../src/guestfs-actions.pod:7479 ../fish/guestfish-actions.pod:4995
18561 "This calls the external C<zfgrep -i> program and returns the matching lines."
18565 #: ../src/guestfs-actions.pod:7491
18566 msgid "guestfs_zfile"
18570 #: ../src/guestfs-actions.pod:7493
18574 " guestfs_zfile (guestfs_h *g,\n"
18575 " const char *meth,\n"
18576 " const char *path);\n"
18581 #: ../src/guestfs-actions.pod:7498 ../fish/guestfish-actions.pod:5005
18583 "This command runs C<file> after first decompressing C<path> using C<method>."
18587 #: ../src/guestfs-actions.pod:7501 ../fish/guestfish-actions.pod:5008
18588 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
18592 #: ../src/guestfs-actions.pod:7503
18594 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
18599 #: ../src/guestfs-actions.pod:7509 ../fish/guestfish-actions.pod:5013
18601 "This function is deprecated. In new code, use the C<file> call instead."
18605 #: ../src/guestfs-actions.pod:7518
18606 msgid "guestfs_zgrep"
18610 #: ../src/guestfs-actions.pod:7520
18614 " guestfs_zgrep (guestfs_h *g,\n"
18615 " const char *regex,\n"
18616 " const char *path);\n"
18621 #: ../src/guestfs-actions.pod:7525 ../fish/guestfish-actions.pod:5024
18623 "This calls the external C<zgrep> program and returns the matching lines."
18627 #: ../src/guestfs-actions.pod:7537
18628 msgid "guestfs_zgrepi"
18632 #: ../src/guestfs-actions.pod:7539
18636 " guestfs_zgrepi (guestfs_h *g,\n"
18637 " const char *regex,\n"
18638 " const char *path);\n"
18643 #: ../src/guestfs-actions.pod:7544 ../fish/guestfish-actions.pod:5034
18645 "This calls the external C<zgrep -i> program and returns the matching lines."
18649 #: ../src/guestfs-availability.pod:3
18654 #: ../src/guestfs-availability.pod:5
18656 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
18657 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
18658 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
18659 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
18660 "L</guestfs_aug_save> L</guestfs_aug_set>"
18664 #: ../src/guestfs-availability.pod:21
18669 #: ../src/guestfs-availability.pod:23
18671 "The following functions: L</guestfs_inotify_add_watch> L</"
18672 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
18673 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
18677 #: ../src/guestfs-availability.pod:31
18678 msgid "B<linuxfsuuid>"
18682 #: ../src/guestfs-availability.pod:33
18684 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
18685 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
18689 #: ../src/guestfs-availability.pod:40
18690 msgid "B<linuxmodules>"
18694 #: ../src/guestfs-availability.pod:42
18695 msgid "The following functions: L</guestfs_modprobe>"
18699 #: ../src/guestfs-availability.pod:45
18700 msgid "B<linuxxattrs>"
18704 #: ../src/guestfs-availability.pod:47
18706 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
18707 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
18708 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
18709 "guestfs_setxattr>"
18713 #: ../src/guestfs-availability.pod:58
18718 #: ../src/guestfs-availability.pod:60
18720 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
18721 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
18722 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
18726 #: ../src/guestfs-availability.pod:69
18731 #: ../src/guestfs-availability.pod:71
18733 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
18734 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
18735 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
18736 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
18737 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
18738 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
18739 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
18743 #: ../src/guestfs-availability.pod:94
18748 #: ../src/guestfs-availability.pod:96
18750 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
18751 "guestfs_mknod_b> L</guestfs_mknod_c>"
18755 #: ../src/guestfs-availability.pod:102
18760 #: ../src/guestfs-availability.pod:104
18761 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
18765 #: ../src/guestfs-availability.pod:107
18766 msgid "B<ntfsprogs>"
18770 #: ../src/guestfs-availability.pod:109
18772 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
18776 #: ../src/guestfs-availability.pod:113
18777 msgid "B<realpath>"
18781 #: ../src/guestfs-availability.pod:115
18782 msgid "The following functions: L</guestfs_realpath>"
18786 #: ../src/guestfs-availability.pod:118
18791 #: ../src/guestfs-availability.pod:120
18793 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
18794 "guestfs_scrub_freespace>"
18798 #: ../src/guestfs-availability.pod:125
18803 #: ../src/guestfs-availability.pod:127
18804 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
18808 #: ../src/guestfs-availability.pod:131
18813 #: ../src/guestfs-availability.pod:133
18814 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
18818 #: ../src/guestfs-availability.pod:137
18819 msgid "B<zerofree>"
18823 #: ../src/guestfs-availability.pod:139
18824 msgid "The following functions: L</guestfs_zerofree>"
18828 #: ../src/guestfs-structs.pod:1
18829 msgid "guestfs_int_bool"
18833 #: ../src/guestfs-structs.pod:3
18836 " struct guestfs_int_bool {\n"
18844 #: ../src/guestfs-structs.pod:8
18847 " struct guestfs_int_bool_list {\n"
18848 " uint32_t len; /* Number of elements in list. */\n"
18849 " struct guestfs_int_bool *val; /* Elements. */\n"
18855 #: ../src/guestfs-structs.pod:13
18858 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
18859 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
18864 #: ../src/guestfs-structs.pod:16
18865 msgid "guestfs_lvm_pv"
18869 #: ../src/guestfs-structs.pod:18
18872 " struct guestfs_lvm_pv {\n"
18873 " char *pv_name;\n"
18874 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
18875 " char pv_uuid[32];\n"
18877 " uint64_t pv_size;\n"
18878 " uint64_t dev_size;\n"
18879 " uint64_t pv_free;\n"
18880 " uint64_t pv_used;\n"
18881 " char *pv_attr;\n"
18882 " int64_t pv_pe_count;\n"
18883 " int64_t pv_pe_alloc_count;\n"
18884 " char *pv_tags;\n"
18885 " uint64_t pe_start;\n"
18886 " int64_t pv_mda_count;\n"
18887 " uint64_t pv_mda_free;\n"
18893 #: ../src/guestfs-structs.pod:36
18896 " struct guestfs_lvm_pv_list {\n"
18897 " uint32_t len; /* Number of elements in list. */\n"
18898 " struct guestfs_lvm_pv *val; /* Elements. */\n"
18904 #: ../src/guestfs-structs.pod:41
18907 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
18908 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
18913 #: ../src/guestfs-structs.pod:44
18914 msgid "guestfs_lvm_vg"
18918 #: ../src/guestfs-structs.pod:46
18921 " struct guestfs_lvm_vg {\n"
18922 " char *vg_name;\n"
18923 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
18924 " char vg_uuid[32];\n"
18926 " char *vg_attr;\n"
18927 " uint64_t vg_size;\n"
18928 " uint64_t vg_free;\n"
18929 " char *vg_sysid;\n"
18930 " uint64_t vg_extent_size;\n"
18931 " int64_t vg_extent_count;\n"
18932 " int64_t vg_free_count;\n"
18933 " int64_t max_lv;\n"
18934 " int64_t max_pv;\n"
18935 " int64_t pv_count;\n"
18936 " int64_t lv_count;\n"
18937 " int64_t snap_count;\n"
18938 " int64_t vg_seqno;\n"
18939 " char *vg_tags;\n"
18940 " int64_t vg_mda_count;\n"
18941 " uint64_t vg_mda_free;\n"
18947 #: ../src/guestfs-structs.pod:69
18950 " struct guestfs_lvm_vg_list {\n"
18951 " uint32_t len; /* Number of elements in list. */\n"
18952 " struct guestfs_lvm_vg *val; /* Elements. */\n"
18958 #: ../src/guestfs-structs.pod:74
18961 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
18962 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
18967 #: ../src/guestfs-structs.pod:77
18968 msgid "guestfs_lvm_lv"
18972 #: ../src/guestfs-structs.pod:79
18975 " struct guestfs_lvm_lv {\n"
18976 " char *lv_name;\n"
18977 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
18978 " char lv_uuid[32];\n"
18979 " char *lv_attr;\n"
18980 " int64_t lv_major;\n"
18981 " int64_t lv_minor;\n"
18982 " int64_t lv_kernel_major;\n"
18983 " int64_t lv_kernel_minor;\n"
18984 " uint64_t lv_size;\n"
18985 " int64_t seg_count;\n"
18987 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
18988 " float snap_percent;\n"
18989 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
18990 " float copy_percent;\n"
18991 " char *move_pv;\n"
18992 " char *lv_tags;\n"
18993 " char *mirror_log;\n"
18994 " char *modules;\n"
19000 #: ../src/guestfs-structs.pod:101
19003 " struct guestfs_lvm_lv_list {\n"
19004 " uint32_t len; /* Number of elements in list. */\n"
19005 " struct guestfs_lvm_lv *val; /* Elements. */\n"
19011 #: ../src/guestfs-structs.pod:106
19014 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
19015 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
19020 #: ../src/guestfs-structs.pod:111
19023 " struct guestfs_stat {\n"
19027 " int64_t nlink;\n"
19032 " int64_t blksize;\n"
19033 " int64_t blocks;\n"
19034 " int64_t atime;\n"
19035 " int64_t mtime;\n"
19036 " int64_t ctime;\n"
19042 #: ../src/guestfs-structs.pod:127
19045 " struct guestfs_stat_list {\n"
19046 " uint32_t len; /* Number of elements in list. */\n"
19047 " struct guestfs_stat *val; /* Elements. */\n"
19053 #: ../src/guestfs-structs.pod:132
19056 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
19057 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
19062 #: ../src/guestfs-structs.pod:137
19065 " struct guestfs_statvfs {\n"
19066 " int64_t bsize;\n"
19067 " int64_t frsize;\n"
19068 " int64_t blocks;\n"
19069 " int64_t bfree;\n"
19070 " int64_t bavail;\n"
19071 " int64_t files;\n"
19072 " int64_t ffree;\n"
19073 " int64_t favail;\n"
19076 " int64_t namemax;\n"
19082 #: ../src/guestfs-structs.pod:151
19085 " struct guestfs_statvfs_list {\n"
19086 " uint32_t len; /* Number of elements in list. */\n"
19087 " struct guestfs_statvfs *val; /* Elements. */\n"
19093 #: ../src/guestfs-structs.pod:156
19096 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
19097 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
19102 #: ../src/guestfs-structs.pod:159
19103 msgid "guestfs_dirent"
19107 #: ../src/guestfs-structs.pod:161
19110 " struct guestfs_dirent {\n"
19119 #: ../src/guestfs-structs.pod:167
19122 " struct guestfs_dirent_list {\n"
19123 " uint32_t len; /* Number of elements in list. */\n"
19124 " struct guestfs_dirent *val; /* Elements. */\n"
19130 #: ../src/guestfs-structs.pod:172
19133 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
19134 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
19139 #: ../src/guestfs-structs.pod:177
19142 " struct guestfs_version {\n"
19143 " int64_t major;\n"
19144 " int64_t minor;\n"
19145 " int64_t release;\n"
19152 #: ../src/guestfs-structs.pod:184
19155 " struct guestfs_version_list {\n"
19156 " uint32_t len; /* Number of elements in list. */\n"
19157 " struct guestfs_version *val; /* Elements. */\n"
19163 #: ../src/guestfs-structs.pod:189
19166 " void guestfs_free_version (struct guestfs_free_version *);\n"
19167 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
19172 #: ../src/guestfs-structs.pod:192
19173 msgid "guestfs_xattr"
19177 #: ../src/guestfs-structs.pod:194
19180 " struct guestfs_xattr {\n"
19181 " char *attrname;\n"
19182 " /* The next two fields describe a byte array. */\n"
19183 " uint32_t attrval_len;\n"
19184 " char *attrval;\n"
19190 #: ../src/guestfs-structs.pod:201
19193 " struct guestfs_xattr_list {\n"
19194 " uint32_t len; /* Number of elements in list. */\n"
19195 " struct guestfs_xattr *val; /* Elements. */\n"
19201 #: ../src/guestfs-structs.pod:206
19204 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
19205 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
19210 #: ../src/guestfs-structs.pod:209
19211 msgid "guestfs_inotify_event"
19215 #: ../src/guestfs-structs.pod:211
19218 " struct guestfs_inotify_event {\n"
19219 " int64_t in_wd;\n"
19220 " uint32_t in_mask;\n"
19221 " uint32_t in_cookie;\n"
19222 " char *in_name;\n"
19228 #: ../src/guestfs-structs.pod:218
19231 " struct guestfs_inotify_event_list {\n"
19232 " uint32_t len; /* Number of elements in list. */\n"
19233 " struct guestfs_inotify_event *val; /* Elements. */\n"
19239 #: ../src/guestfs-structs.pod:223
19242 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
19243 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
19248 #: ../src/guestfs-structs.pod:226
19249 msgid "guestfs_partition"
19253 #: ../src/guestfs-structs.pod:228
19256 " struct guestfs_partition {\n"
19257 " int32_t part_num;\n"
19258 " uint64_t part_start;\n"
19259 " uint64_t part_end;\n"
19260 " uint64_t part_size;\n"
19266 #: ../src/guestfs-structs.pod:235
19269 " struct guestfs_partition_list {\n"
19270 " uint32_t len; /* Number of elements in list. */\n"
19271 " struct guestfs_partition *val; /* Elements. */\n"
19277 #: ../src/guestfs-structs.pod:240
19280 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
19281 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
19286 #: ../src/guestfs-structs.pod:243
19287 msgid "guestfs_application"
19291 #: ../src/guestfs-structs.pod:245
19294 " struct guestfs_application {\n"
19295 " char *app_name;\n"
19296 " char *app_display_name;\n"
19297 " int32_t app_epoch;\n"
19298 " char *app_version;\n"
19299 " char *app_release;\n"
19300 " char *app_install_path;\n"
19301 " char *app_trans_path;\n"
19302 " char *app_publisher;\n"
19303 " char *app_url;\n"
19304 " char *app_source_package;\n"
19305 " char *app_summary;\n"
19306 " char *app_description;\n"
19312 #: ../src/guestfs-structs.pod:260
19315 " struct guestfs_application_list {\n"
19316 " uint32_t len; /* Number of elements in list. */\n"
19317 " struct guestfs_application *val; /* Elements. */\n"
19323 #: ../src/guestfs-structs.pod:265
19326 " void guestfs_free_application (struct guestfs_free_application *);\n"
19327 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
19332 #: ../fish/guestfish.pod:5
19333 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
19337 #: ../fish/guestfish.pod:9
19340 " guestfish [--options] [commands]\n"
19345 #: ../fish/guestfish.pod:11
19353 #: ../fish/guestfish.pod:13
19356 " guestfish [--ro|--rw] -a disk.img\n"
19361 #: ../fish/guestfish.pod:15
19364 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
19369 #: ../fish/guestfish.pod:17
19372 " guestfish -d libvirt-domain\n"
19377 #: ../fish/guestfish.pod:19
19380 " guestfish [--ro|--rw] -a disk.img -i\n"
19385 #: ../fish/guestfish.pod:21
19388 " guestfish -d libvirt-domain -i\n"
19393 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15
19394 #: ../tools/virt-win-reg.pl:51 ../tools/virt-tar.pl:64
19399 #: ../fish/guestfish.pod:25
19401 "Using guestfish in read/write mode on live virtual machines can be "
19402 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
19403 "option to use guestfish safely if the disk image or virtual machine might be "
19408 #: ../fish/guestfish.pod:32
19410 "Guestfish is a shell and command-line tool for examining and modifying "
19411 "virtual machine filesystems. It uses libguestfs and exposes all of the "
19412 "functionality of the guestfs API, see L<guestfs(3)>."
19416 #: ../fish/guestfish.pod:36
19418 "Guestfish gives you structured access to the libguestfs API, from shell "
19419 "scripts or the command line or interactively. If you want to rescue a "
19420 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
19425 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:949
19426 #: ../fuse/guestmount.pod:39 ../tools/virt-tar.pl:50
19431 #: ../fish/guestfish.pod:43
19432 msgid "As an interactive shell"
19436 #: ../fish/guestfish.pod:45
19444 #: ../fish/guestfish.pod:47
19447 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
19448 " editing virtual machine filesystems.\n"
19453 #: ../fish/guestfish.pod:50
19456 " Type: 'help' for a list of commands\n"
19457 " 'man' to read the manual\n"
19458 " 'quit' to quit the shell\n"
19463 #: ../fish/guestfish.pod:54
19466 " ><fs> add-ro disk.img\n"
19468 " ><fs> list-filesystems\n"
19469 " /dev/sda1: ext4\n"
19470 " /dev/vg_guest/lv_root: ext4\n"
19471 " /dev/vg_guest/lv_swap: swap\n"
19472 " ><fs> mount /dev/vg_guest/lv_root /\n"
19473 " ><fs> cat /etc/fstab\n"
19475 " # Created by anaconda\n"
19482 #: ../fish/guestfish.pod:67
19483 msgid "From shell scripts"
19487 #: ../fish/guestfish.pod:69
19488 msgid "Create a new C</etc/motd> file in a guest or disk image:"
19492 #: ../fish/guestfish.pod:71
19495 " guestfish <<_EOF_\n"
19498 " mount /dev/vg_guest/lv_root /\n"
19499 " write /etc/motd \"Welcome, new users\"\n"
19505 #: ../fish/guestfish.pod:78
19506 msgid "List the LVM logical volumes in a disk image:"
19510 #: ../fish/guestfish.pod:80
19513 " guestfish -a disk.img --ro <<_EOF_\n"
19521 #: ../fish/guestfish.pod:85
19522 msgid "List all the filesystems in a disk image:"
19526 #: ../fish/guestfish.pod:87
19529 " guestfish -a disk.img --ro <<_EOF_\n"
19531 " list-filesystems\n"
19537 #: ../fish/guestfish.pod:92
19538 msgid "On one command line"
19542 #: ../fish/guestfish.pod:94
19543 msgid "Update C</etc/resolv.conf> in a guest:"
19547 #: ../fish/guestfish.pod:96
19551 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
19552 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
19557 #: ../fish/guestfish.pod:100
19558 msgid "Edit C</boot/grub/grub.conf> interactively:"
19562 #: ../fish/guestfish.pod:102
19565 " guestfish --rw --add disk.img \\\n"
19566 " --mount /dev/vg_guest/lv_root \\\n"
19567 " --mount /dev/sda1:/boot \\\n"
19568 " edit /boot/grub/grub.conf\n"
19573 #: ../fish/guestfish.pod:107
19574 msgid "Mount disks automatically"
19578 #: ../fish/guestfish.pod:109
19580 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
19584 #: ../fish/guestfish.pod:112
19587 " guestfish --ro -a disk.img -i cat /etc/group\n"
19592 #: ../fish/guestfish.pod:114
19595 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
19600 #: ../fish/guestfish.pod:116
19601 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
19605 #: ../fish/guestfish.pod:118
19608 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
19613 #: ../fish/guestfish.pod:120
19614 msgid "As a script interpreter"
19618 #: ../fish/guestfish.pod:122
19619 msgid "Create a 100MB disk containing an ext2-formatted partition:"
19623 #: ../fish/guestfish.pod:124
19626 " #!/usr/bin/guestfish -f\n"
19627 " sparse test1.img 100M\n"
19629 " part-disk /dev/sda mbr\n"
19630 " mkfs ext2 /dev/sda1\n"
19635 #: ../fish/guestfish.pod:130
19636 msgid "Start with a prepared disk"
19640 #: ../fish/guestfish.pod:132
19642 "An alternate way to create a 100MB disk called C<test1.img> containing a "
19643 "single ext2-formatted partition:"
19647 #: ../fish/guestfish.pod:135
19650 " guestfish -N fs\n"
19655 #: ../fish/guestfish.pod:137
19656 msgid "To list what is available do:"
19660 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:940
19663 " guestfish -N help | less\n"
19668 #: ../fish/guestfish.pod:141
19669 msgid "Remote control"
19673 #: ../fish/guestfish.pod:143
19676 " eval \"`guestfish --listen`\"\n"
19677 " guestfish --remote add-ro disk.img\n"
19678 " guestfish --remote run\n"
19679 " guestfish --remote lvs\n"
19684 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37
19685 #: ../fuse/guestmount.pod:83 ../tools/virt-win-reg.pl:96
19686 #: ../tools/virt-list-filesystems.pl:53 ../tools/virt-tar.pl:103
19687 #: ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:54
19692 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:143
19693 #: ../tools/virt-win-reg.pl:104 ../tools/virt-list-filesystems.pl:61
19694 #: ../tools/virt-tar.pl:111 ../tools/virt-make-fs.pl:161
19695 #: ../tools/virt-list-partitions.pl:62
19700 #: ../fish/guestfish.pod:154
19701 msgid "Displays general help on options."
19705 #: ../fish/guestfish.pod:156
19710 #: ../fish/guestfish.pod:158
19711 msgid "B<--cmd-help>"
19715 #: ../fish/guestfish.pod:160
19716 msgid "Lists all available guestfish commands."
19720 #: ../fish/guestfish.pod:162
19725 #: ../fish/guestfish.pod:164
19726 msgid "B<--cmd-help cmd>"
19730 #: ../fish/guestfish.pod:166
19731 msgid "Displays detailed help on a single command C<cmd>."
19735 #: ../fish/guestfish.pod:168
19736 msgid "B<-a image>"
19740 #: ../fish/guestfish.pod:170
19741 msgid "B<--add image>"
19745 #: ../fish/guestfish.pod:172
19746 msgid "Add a block device or virtual machine image to the shell."
19750 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:91
19752 "The format of the disk image is auto-detected. To override this and force a "
19753 "particular format use the I<--format=..> option."
19757 #: ../fish/guestfish.pod:177
19759 "Using this flag is mostly equivalent to using the C<add> command, with "
19760 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
19761 "the I<--format=...> flag was given."
19765 #: ../fish/guestfish.pod:181
19770 #: ../fish/guestfish.pod:183
19771 msgid "B<--connect URI>"
19775 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:96
19777 "When used in conjunction with the I<-d> option, this specifies the libvirt "
19778 "URI to use. The default is to use the default libvirt connection."
19782 #: ../fish/guestfish.pod:189
19787 #: ../fish/guestfish.pod:191
19789 "If using the I<--listen> option and a csh-like shell, use this option. See "
19790 "section L</REMOTE CONTROL AND CSH> below."
19794 #: ../fish/guestfish.pod:194
19795 msgid "B<-d libvirt-domain>"
19799 #: ../fish/guestfish.pod:196
19800 msgid "B<--domain libvirt-domain>"
19804 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:102
19806 "Add disks from the named libvirt domain. If the I<--ro> option is also "
19807 "used, then any libvirt domain can be used. However in write mode, only "
19808 "libvirt domains which are shut down can be named here."
19812 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:106
19813 msgid "Domain UUIDs can be used instead of names."
19817 #: ../fish/guestfish.pod:204
19819 "Using this flag is mostly equivalent to using the C<add-domain> command, "
19820 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
19821 "if the I<--format:...> flag was given."
19825 #: ../fish/guestfish.pod:208
19830 #: ../fish/guestfish.pod:210
19831 msgid "B<--no-dest-paths>"
19835 #: ../fish/guestfish.pod:212
19837 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
19838 "to hit the tab key to complete paths on the guest filesystem, but this "
19839 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
19840 "allow this feature to be disabled."
19844 #: ../fish/guestfish.pod:217 ../fuse/guestmount.pod:120
19845 msgid "B<--echo-keys>"
19849 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:122
19851 "When prompting for keys and passphrases, guestfish normally turns echoing "
19852 "off so you cannot see what you are typing. If you are not worried about "
19853 "Tempest attacks and there is no one else in the room you can specify this "
19854 "flag to see what you are typing."
19858 #: ../fish/guestfish.pod:224
19863 #: ../fish/guestfish.pod:226
19864 msgid "B<--file file>"
19868 #: ../fish/guestfish.pod:228
19869 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
19873 #: ../fish/guestfish.pod:231
19876 " #!/usr/bin/guestfish -f\n"
19881 #: ../fish/guestfish.pod:233
19882 msgid "B<--format=raw|qcow2|..>"
19886 #: ../fish/guestfish.pod:235
19887 msgid "B<--format>"
19891 #: ../fish/guestfish.pod:237 ../fuse/guestmount.pod:129
19893 "The default for the I<-a> option is to auto-detect the format of the disk "
19894 "image. Using this forces the disk format for I<-a> options which follow on "
19895 "the command line. Using I<--format> with no argument switches back to auto-"
19896 "detection for subsequent I<-a> options."
19900 #: ../fish/guestfish.pod:244
19903 " guestfish --format=raw -a disk.img\n"
19908 #: ../fish/guestfish.pod:246
19909 msgid "forces raw format (no auto-detection) for C<disk.img>."
19913 #: ../fish/guestfish.pod:248
19916 " guestfish --format=raw -a disk.img --format -a another.img\n"
19921 #: ../fish/guestfish.pod:250
19923 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
19924 "detection for C<another.img>."
19928 #: ../fish/guestfish.pod:253
19930 "If you have untrusted raw-format guest disk images, you should use this "
19931 "option to specify the disk format. This avoids a possible security problem "
19932 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
19936 #: ../fish/guestfish.pod:258
19941 #: ../fish/guestfish.pod:260
19942 msgid "B<--inspector>"
19946 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:149
19948 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
19949 "system and mount filesystems as they would be mounted on the real virtual "
19954 #: ../fish/guestfish.pod:266
19955 msgid "Typical usage is either:"
19959 #: ../fish/guestfish.pod:268
19962 " guestfish -d myguest -i\n"
19967 #: ../fish/guestfish.pod:270
19968 msgid "(for an inactive libvirt domain called I<myguest>), or:"
19972 #: ../fish/guestfish.pod:272
19975 " guestfish --ro -d myguest -i\n"
19980 #: ../fish/guestfish.pod:274
19981 msgid "(for active domains, readonly), or specify the block device directly:"
19985 #: ../fish/guestfish.pod:276
19988 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
19993 #: ../fish/guestfish.pod:278
19995 "Note that the command line syntax changed slightly over older versions of "
19996 "guestfish. You can still use the old syntax:"
20000 #: ../fish/guestfish.pod:281
20003 " guestfish [--ro] -i disk.img\n"
20008 #: ../fish/guestfish.pod:283
20011 " guestfish [--ro] -i libvirt-domain\n"
20016 #: ../fish/guestfish.pod:285
20018 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
20019 "then using other commands to mount the filesystems that were found."
20023 #: ../fish/guestfish.pod:289 ../fuse/guestmount.pod:153
20024 msgid "B<--keys-from-stdin>"
20028 #: ../fish/guestfish.pod:291 ../fuse/guestmount.pod:155
20030 "Read key or passphrase parameters from stdin. The default is to try to read "
20031 "passphrases from the user by opening C</dev/tty>."
20035 #: ../fish/guestfish.pod:294
20036 msgid "B<--listen>"
20040 #: ../fish/guestfish.pod:296
20042 "Fork into the background and listen for remote commands. See section L</"
20043 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
20047 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:158
20052 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:160
20054 "Connect to a live virtual machine. (Experimental, see L<guestfs(3)/"
20055 "ATTACHING TO RUNNING DAEMONS>)."
20059 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:163
20060 msgid "B<-m dev[:mountpoint[:options]]>"
20064 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:165
20065 msgid "B<--mount dev[:mountpoint[:options]]>"
20069 #: ../fish/guestfish.pod:308
20070 msgid "Mount the named partition or logical volume on the given mountpoint."
20074 #: ../fish/guestfish.pod:310
20075 msgid "If the mountpoint is omitted, it defaults to C</>."
20079 #: ../fish/guestfish.pod:312
20080 msgid "You have to mount something on C</> before most commands will work."
20084 #: ../fish/guestfish.pod:314
20086 "If any I<-m> or I<--mount> options are given, the guest is automatically "
20091 #: ../fish/guestfish.pod:317
20093 "If you don't know what filesystems a disk image contains, you can either run "
20094 "guestfish without this option, then list the partitions, filesystems and LVs "
20095 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
20096 "commands), or you can use the L<virt-filesystems(1)> program."
20100 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:173
20102 "The third (and rarely used) part of the mount parameter is the list of mount "
20103 "options used to mount the underlying filesystem. If this is not given, then "
20104 "the mount options are either the empty string or C<ro> (the latter if the "
20105 "I<--ro> flag is used). By specifying the mount options, you override this "
20106 "default choice. Probably the only time you would use this is to enable ACLs "
20107 "and/or extended attributes if the filesystem can support them:"
20111 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:181
20114 " -m /dev/sda1:/:acl,user_xattr\n"
20119 #: ../fish/guestfish.pod:333
20120 msgid "Using this flag is equivalent to using the C<mount-options> command."
20124 #: ../fish/guestfish.pod:335
20129 #: ../fish/guestfish.pod:337
20130 msgid "B<--no-sync>"
20134 #: ../fish/guestfish.pod:339
20136 "Disable autosync. This is enabled by default. See the discussion of "
20137 "autosync in the L<guestfs(3)> manpage."
20141 #: ../fish/guestfish.pod:342
20146 #: ../fish/guestfish.pod:344
20147 msgid "B<--new type>"
20151 #: ../fish/guestfish.pod:346
20156 #: ../fish/guestfish.pod:348
20158 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
20159 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
20160 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
20165 #: ../fish/guestfish.pod:353
20166 msgid "B<--progress-bars>"
20170 #: ../fish/guestfish.pod:355
20171 msgid "Enable progress bars, even when guestfish is used non-interactively."
20175 #: ../fish/guestfish.pod:357
20177 "Progress bars are enabled by default when guestfish is used as an "
20178 "interactive shell."
20182 #: ../fish/guestfish.pod:360
20183 msgid "B<--no-progress-bars>"
20187 #: ../fish/guestfish.pod:362
20188 msgid "Disable progress bars."
20192 #: ../fish/guestfish.pod:364
20193 msgid "B<--remote[=pid]>"
20197 #: ../fish/guestfish.pod:366
20199 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
20200 "CONTROL GUESTFISH OVER A SOCKET> below."
20204 #: ../fish/guestfish.pod:369
20209 #: ../fish/guestfish.pod:371
20214 #: ../fish/guestfish.pod:373
20216 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
20217 "mounts are done read-only."
20221 #: ../fish/guestfish.pod:376
20223 "The option must always be used if the disk image or virtual machine might be "
20224 "running, and is generally recommended in cases where you don't need write "
20225 "access to the disk."
20229 #: ../fish/guestfish.pod:380
20231 "Note that prepared disk images created with I<-N> are not affected by this "
20232 "option. Also commands like C<add> are not affected - you have to specify "
20233 "the C<readonly:true> option explicitly if you need it."
20237 #: ../fish/guestfish.pod:384
20238 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
20242 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:237
20243 msgid "B<--selinux>"
20247 #: ../fish/guestfish.pod:388
20248 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
20252 #: ../fish/guestfish.pod:390
20257 #: ../fish/guestfish.pod:392
20258 msgid "B<--verbose>"
20262 #: ../fish/guestfish.pod:394
20264 "Enable very verbose messages. This is particularly useful if you find a bug."
20268 #: ../fish/guestfish.pod:397
20273 #: ../fish/guestfish.pod:399 ../tools/virt-win-reg.pl:112
20274 #: ../tools/virt-list-filesystems.pl:69 ../tools/virt-tar.pl:119
20275 #: ../tools/virt-make-fs.pl:169 ../tools/virt-list-partitions.pl:70
20276 msgid "B<--version>"
20280 #: ../fish/guestfish.pod:401
20281 msgid "Display the guestfish / libguestfs version number and exit."
20285 #: ../fish/guestfish.pod:403
20290 #: ../fish/guestfish.pod:405
20295 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:251
20297 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
20298 "mounts are done read-write."
20302 #: ../fish/guestfish.pod:410
20303 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
20307 #: ../fish/guestfish.pod:412
20312 #: ../fish/guestfish.pod:414
20313 msgid "Echo each command before executing it."
20317 #: ../fish/guestfish.pod:418
20318 msgid "COMMANDS ON COMMAND LINE"
20322 #: ../fish/guestfish.pod:420
20324 "Any additional (non-option) arguments are treated as commands to execute."
20328 #: ../fish/guestfish.pod:423
20330 "Commands to execute should be separated by a colon (C<:>), where the colon "
20331 "is a separate parameter. Thus:"
20335 #: ../fish/guestfish.pod:426
20338 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
20343 #: ../fish/guestfish.pod:428
20345 "If there are no additional arguments, then we enter a shell, either an "
20346 "interactive shell with a prompt (if the input is a terminal) or a non-"
20347 "interactive shell."
20351 #: ../fish/guestfish.pod:432
20353 "In either command line mode or non-interactive shell, the first command that "
20354 "gives an error causes the whole shell to exit. In interactive mode (with a "
20355 "prompt) if a command fails, you can continue to enter commands."
20359 #: ../fish/guestfish.pod:437
20360 msgid "USING launch (OR run)"
20364 #: ../fish/guestfish.pod:439
20366 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
20367 "then launch it, then mount any disks you need, and finally issue actions/"
20368 "commands. So the general order of the day is:"
20372 #: ../fish/guestfish.pod:447
20373 msgid "add or -a/--add"
20377 #: ../fish/guestfish.pod:451
20378 msgid "launch (aka run)"
20382 #: ../fish/guestfish.pod:455
20383 msgid "mount or -m/--mount"
20387 #: ../fish/guestfish.pod:459
20388 msgid "any other commands"
20392 #: ../fish/guestfish.pod:463
20394 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
20395 "guest before mounting or performing any other commands."
20399 #: ../fish/guestfish.pod:466
20401 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
20402 "I<--new> options were given then C<run> is done automatically, simply "
20403 "because guestfish can't perform the action you asked for without doing this."
20407 #: ../fish/guestfish.pod:471
20408 msgid "OPENING DISKS FOR READ AND WRITE"
20412 #: ../fish/guestfish.pod:473
20414 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
20415 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
20416 "I<-i> and I<-m> open disk images read-only or for writing."
20420 #: ../fish/guestfish.pod:478
20422 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
20423 "opening disk images supplied on the command line for write. To open a disk "
20424 "image read-only you have to do I<-a image --ro>."
20428 #: ../fish/guestfish.pod:482
20430 "This matters: If you accidentally open a live VM disk image writable then "
20431 "you will cause irreversible disk corruption."
20435 #: ../fish/guestfish.pod:485
20437 "By libguestfs 1.12 we intend to change the default the other way. Disk "
20438 "images will be opened read-only. You will have to either specify "
20439 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
20440 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
20441 "access for disk images specified by those other command line options."
20445 #: ../fish/guestfish.pod:492
20447 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
20448 "which does nothing (it is already the default). However it is highly "
20449 "recommended that you use this option to indicate that you need write access, "
20450 "and prepare your scripts for the day when this option will be required for "
20455 #: ../fish/guestfish.pod:498
20457 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
20458 "other libguestfs program apart from guestfish and guestmount."
20462 #: ../fish/guestfish.pod:501
20467 #: ../fish/guestfish.pod:503
20469 "You can quote ordinary parameters using either single or double quotes. For "
20474 #: ../fish/guestfish.pod:506
20477 " add \"file with a space.img\"\n"
20482 #: ../fish/guestfish.pod:508
20485 " rm '/file name'\n"
20490 #: ../fish/guestfish.pod:510
20498 #: ../fish/guestfish.pod:512
20500 "A few commands require a list of strings to be passed. For these, use a "
20501 "whitespace-separated list, enclosed in quotes. Strings containing "
20502 "whitespace to be passed through must be enclosed in single quotes. A "
20503 "literal single quote must be escaped with a backslash."
20507 #: ../fish/guestfish.pod:517
20510 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
20511 " command \"/bin/echo 'foo bar'\"\n"
20512 " command \"/bin/echo \\'foo\\'\"\n"
20517 #: ../fish/guestfish.pod:521
20518 msgid "OPTIONAL ARGUMENTS"
20522 #: ../fish/guestfish.pod:523
20524 "Some commands take optional arguments. These arguments appear in this "
20525 "documentation as C<[argname:..]>. You can use them as in these examples:"
20529 #: ../fish/guestfish.pod:527
20532 " add-drive-opts filename\n"
20537 #: ../fish/guestfish.pod:529
20540 " add-drive-opts filename readonly:true\n"
20545 #: ../fish/guestfish.pod:531
20548 " add-drive-opts filename format:qcow2 readonly:false\n"
20553 #: ../fish/guestfish.pod:533
20555 "Each optional argument can appear at most once. All optional arguments must "
20556 "appear after the required ones."
20560 #: ../fish/guestfish.pod:536
20565 #: ../fish/guestfish.pod:538
20567 "This section applies to all commands which can take integers as parameters."
20571 #: ../fish/guestfish.pod:541
20572 msgid "SIZE SUFFIX"
20576 #: ../fish/guestfish.pod:543
20578 "When the command takes a parameter measured in bytes, you can use one of the "
20579 "following suffixes to specify kilobytes, megabytes and larger sizes:"
20583 #: ../fish/guestfish.pod:549
20584 msgid "B<k> or B<K> or B<KiB>"
20588 #: ../fish/guestfish.pod:551
20589 msgid "The size in kilobytes (multiplied by 1024)."
20593 #: ../fish/guestfish.pod:553
20598 #: ../fish/guestfish.pod:555
20599 msgid "The size in SI 1000 byte units."
20603 #: ../fish/guestfish.pod:557
20604 msgid "B<M> or B<MiB>"
20608 #: ../fish/guestfish.pod:559
20609 msgid "The size in megabytes (multiplied by 1048576)."
20613 #: ../fish/guestfish.pod:561
20618 #: ../fish/guestfish.pod:563
20619 msgid "The size in SI 1000000 byte units."
20623 #: ../fish/guestfish.pod:565
20624 msgid "B<G> or B<GiB>"
20628 #: ../fish/guestfish.pod:567
20629 msgid "The size in gigabytes (multiplied by 2**30)."
20633 #: ../fish/guestfish.pod:569
20638 #: ../fish/guestfish.pod:571
20639 msgid "The size in SI 10**9 byte units."
20643 #: ../fish/guestfish.pod:573
20644 msgid "B<T> or B<TiB>"
20648 #: ../fish/guestfish.pod:575
20649 msgid "The size in terabytes (multiplied by 2**40)."
20653 #: ../fish/guestfish.pod:577
20658 #: ../fish/guestfish.pod:579
20659 msgid "The size in SI 10**12 byte units."
20663 #: ../fish/guestfish.pod:581
20664 msgid "B<P> or B<PiB>"
20668 #: ../fish/guestfish.pod:583
20669 msgid "The size in petabytes (multiplied by 2**50)."
20673 #: ../fish/guestfish.pod:585
20678 #: ../fish/guestfish.pod:587
20679 msgid "The size in SI 10**15 byte units."
20683 #: ../fish/guestfish.pod:589
20684 msgid "B<E> or B<EiB>"
20688 #: ../fish/guestfish.pod:591
20689 msgid "The size in exabytes (multiplied by 2**60)."
20693 #: ../fish/guestfish.pod:593
20698 #: ../fish/guestfish.pod:595
20699 msgid "The size in SI 10**18 byte units."
20703 #: ../fish/guestfish.pod:597
20704 msgid "B<Z> or B<ZiB>"
20708 #: ../fish/guestfish.pod:599
20709 msgid "The size in zettabytes (multiplied by 2**70)."
20713 #: ../fish/guestfish.pod:601
20718 #: ../fish/guestfish.pod:603
20719 msgid "The size in SI 10**21 byte units."
20723 #: ../fish/guestfish.pod:605
20724 msgid "B<Y> or B<YiB>"
20728 #: ../fish/guestfish.pod:607
20729 msgid "The size in yottabytes (multiplied by 2**80)."
20733 #: ../fish/guestfish.pod:609
20738 #: ../fish/guestfish.pod:611
20739 msgid "The size in SI 10**24 byte units."
20743 #: ../fish/guestfish.pod:617
20746 " truncate-size /file 1G\n"
20751 #: ../fish/guestfish.pod:619
20752 msgid "would truncate the file to 1 gigabyte."
20756 #: ../fish/guestfish.pod:621
20758 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
20759 "the parameter to L</memsize> is specified in megabytes already). Adding a "
20760 "suffix will probably not do what you expect."
20764 #: ../fish/guestfish.pod:625
20765 msgid "OCTAL AND HEXADECIMAL NUMBERS"
20769 #: ../fish/guestfish.pod:627
20771 "For specifying the radix (base) use the C convention: C<0> to prefix an "
20772 "octal number or C<0x> to prefix a hexadecimal number. For example:"
20776 #: ../fish/guestfish.pod:630
20779 " 1234 decimal number 1234\n"
20780 " 02322 octal number, equivalent to decimal 1234\n"
20781 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
20786 #: ../fish/guestfish.pod:634
20788 "When using the C<chmod> command, you almost always want to specify an octal "
20789 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
20790 "L<chmod(1)> program):"
20794 #: ../fish/guestfish.pod:638
20797 " chmod 0777 /public # OK\n"
20798 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
20803 #: ../fish/guestfish.pod:641
20805 "Commands that return numbers usually print them in decimal, but some "
20806 "commands print numbers in other radices (eg. C<umask> prints the mode in "
20807 "octal, preceeded by C<0>)."
20811 #: ../fish/guestfish.pod:645
20812 msgid "WILDCARDS AND GLOBBING"
20816 #: ../fish/guestfish.pod:647
20818 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
20819 "(globbing) by default. So for example the following will not do what you "
20824 #: ../fish/guestfish.pod:651
20832 #: ../fish/guestfish.pod:653
20834 "Assuming you don't have a directory called literally C</home/*> then the "
20835 "above command will return an error."
20839 #: ../fish/guestfish.pod:656
20840 msgid "To perform wildcard expansion, use the C<glob> command."
20844 #: ../fish/guestfish.pod:658
20847 " glob rm-rf /home/*\n"
20852 #: ../fish/guestfish.pod:660
20854 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
20855 "many times), equivalent to:"
20859 #: ../fish/guestfish.pod:663
20862 " rm-rf /home/jim\n"
20863 " rm-rf /home/joe\n"
20864 " rm-rf /home/mary\n"
20869 #: ../fish/guestfish.pod:667
20870 msgid "C<glob> only works on simple guest paths and not on device names."
20874 #: ../fish/guestfish.pod:669
20876 "If you have several parameters, each containing a wildcard, then glob will "
20877 "perform a Cartesian product."
20881 #: ../fish/guestfish.pod:672
20886 #: ../fish/guestfish.pod:674
20888 "Any line which starts with a I<#> character is treated as a comment and "
20889 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
20890 "a command. For example:"
20894 #: ../fish/guestfish.pod:678
20897 " # this is a comment\n"
20898 " # this is a comment\n"
20899 " foo # NOT a comment\n"
20904 #: ../fish/guestfish.pod:682
20905 msgid "Blank lines are also ignored."
20909 #: ../fish/guestfish.pod:684
20910 msgid "RUNNING COMMANDS LOCALLY"
20914 #: ../fish/guestfish.pod:686
20916 "Any line which starts with a I<!> character is treated as a command sent to "
20917 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
20921 #: ../fish/guestfish.pod:690
20925 " tgz-out /remote local/remote-data.tar.gz\n"
20930 #: ../fish/guestfish.pod:693
20932 "will create a directory C<local> on the host, and then export the contents "
20933 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
20934 "(See C<tgz-out>)."
20938 #: ../fish/guestfish.pod:697
20940 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
20941 "effect, due to the way that subprocesses work in Unix."
20945 #: ../fish/guestfish.pod:700
20946 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
20950 #: ../fish/guestfish.pod:702
20952 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
20953 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
20954 "and executed as guestfish commands."
20958 #: ../fish/guestfish.pod:706
20960 "Thus you can use shell script to construct arbitrary guestfish commands "
20961 "which are then parsed by guestfish."
20965 #: ../fish/guestfish.pod:709
20967 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
20968 "through C</foo.100>) using guestfish commands alone. However this is simple "
20969 "if we use a shell script to create the guestfish commands for us:"
20973 #: ../fish/guestfish.pod:714
20976 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
20981 #: ../fish/guestfish.pod:716
20982 msgid "or with names like C</foo.001>:"
20986 #: ../fish/guestfish.pod:718
20989 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
20994 #: ../fish/guestfish.pod:720
20996 "When using guestfish interactively it can be helpful to just run the shell "
20997 "script first (ie. remove the initial C<E<lt>> character so it is just an "
20998 "ordinary I<!> local command), see what guestfish commands it would run, and "
20999 "when you are happy with those prepend the C<E<lt>> character to run the "
21000 "guestfish commands for real."
21004 #: ../fish/guestfish.pod:726
21009 #: ../fish/guestfish.pod:728
21011 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
21012 "command (a guestfish command) to the second command (any host command). For "
21017 #: ../fish/guestfish.pod:732
21020 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
21025 #: ../fish/guestfish.pod:734
21027 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
21028 "program). The above command would list all accounts in the guest filesystem "
21029 "which have UID 0, ie. root accounts including backdoors. Other examples:"
21033 #: ../fish/guestfish.pod:739
21036 " hexdump /bin/ls | head\n"
21037 " list-devices | tail -1\n"
21038 " tgz-out / - | tar ztf -\n"
21043 #: ../fish/guestfish.pod:743
21045 "The space before the pipe symbol is required, any space after the pipe "
21046 "symbol is optional. Everything after the pipe symbol is just passed "
21047 "straight to the host shell, so it can contain redirections, globs and "
21048 "anything else that makes sense on the host side."
21052 #: ../fish/guestfish.pod:748
21054 "To use a literal argument which begins with a pipe symbol, you have to quote "
21059 #: ../fish/guestfish.pod:751
21067 #: ../fish/guestfish.pod:753
21068 msgid "HOME DIRECTORIES"
21072 #: ../fish/guestfish.pod:755
21074 "If a parameter starts with the character C<~> then the tilde may be expanded "
21075 "as a home directory path (either C<~> for the current user's home directory, "
21076 "or C<~user> for another user)."
21080 #: ../fish/guestfish.pod:759
21082 "Note that home directory expansion happens for users known I<on the host>, "
21083 "not in the guest filesystem."
21087 #: ../fish/guestfish.pod:762
21089 "To use a literal argument which begins with a tilde, you have to quote it, "
21094 #: ../fish/guestfish.pod:765
21102 #: ../fish/guestfish.pod:769
21104 "Libguestfs has some support for Linux guests encrypted according to the "
21105 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
21106 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
21107 "LUKS is supported."
21111 #: ../fish/guestfish.pod:774
21112 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
21116 #: ../fish/guestfish.pod:776
21119 " ><fs> vfs-type /dev/sda2\n"
21125 #: ../fish/guestfish.pod:779
21127 "Then open those devices using L</luks-open>. This creates a device-mapper "
21128 "device called C</dev/mapper/luksdev>."
21132 #: ../fish/guestfish.pod:782
21135 " ><fs> luks-open /dev/sda2 luksdev\n"
21136 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
21141 #: ../fish/guestfish.pod:785
21143 "Finally you have to tell LVM to scan for volume groups on the newly created "
21148 #: ../fish/guestfish.pod:788
21152 " vg-activate-all true\n"
21157 #: ../fish/guestfish.pod:791
21158 msgid "The logical volume(s) can now be mounted in the usual way."
21162 #: ../fish/guestfish.pod:793
21164 "Before closing a LUKS device you must unmount any logical volumes on it and "
21165 "deactivate the volume groups by calling C<vg-activate false VG> on each "
21166 "one. Then you can close the mapper device:"
21170 #: ../fish/guestfish.pod:797
21173 " vg-activate false /dev/VG\n"
21174 " luks-close /dev/mapper/luksdev\n"
21179 #: ../fish/guestfish.pod:800
21180 msgid "WINDOWS PATHS"
21184 #: ../fish/guestfish.pod:802
21186 "If a path is prefixed with C<win:> then you can use Windows-style drive "
21187 "letters and paths (with some limitations). The following commands are "
21192 #: ../fish/guestfish.pod:806
21195 " file /WINDOWS/system32/config/system.LOG\n"
21200 #: ../fish/guestfish.pod:808
21203 " file win:\\windows\\system32\\config\\system.log\n"
21208 #: ../fish/guestfish.pod:810
21211 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
21216 #: ../fish/guestfish.pod:812
21218 "The parameter is rewritten \"behind the scenes\" by looking up the position "
21219 "where the drive is mounted, prepending that to the path, changing all "
21220 "backslash characters to forward slash, then resolving the result using L</"
21221 "case-sensitive-path>. For example if the E: drive was mounted on C</e> then "
21222 "the parameter might be rewritten like this:"
21226 #: ../fish/guestfish.pod:818
21229 " win:e:\\foo\\bar => /e/FOO/bar\n"
21234 #: ../fish/guestfish.pod:820
21235 msgid "This only works in argument positions that expect a path."
21239 #: ../fish/guestfish.pod:822
21240 msgid "UPLOADING AND DOWNLOADING FILES"
21244 #: ../fish/guestfish.pod:824
21246 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
21247 "others which upload from or download to a local file, you can use the "
21248 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
21252 #: ../fish/guestfish.pod:828
21260 #: ../fish/guestfish.pod:830
21262 "reads stdin and creates from that a file C</foo> in the disk image, and:"
21266 #: ../fish/guestfish.pod:833
21269 " tar-out /etc - | tar tf -\n"
21274 #: ../fish/guestfish.pod:835
21276 "writes the tarball to stdout and then pipes that into the external \"tar\" "
21277 "command (see L</PIPES>)."
21281 #: ../fish/guestfish.pod:838
21283 "When using C<-> to read from stdin, the input is read up to the end of "
21284 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
21285 "some arbitrary end marker:"
21289 #: ../fish/guestfish.pod:842
21292 " upload -<<END /foo\n"
21301 #: ../fish/guestfish.pod:848
21303 "Any string of characters can be used instead of C<END>. The end marker must "
21304 "appear on a line of its own, without any preceeding or following characters "
21305 "(not even spaces)."
21309 #: ../fish/guestfish.pod:852
21311 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
21312 "upload local files (so-called \"FileIn\" parameters in the generator)."
21316 #: ../fish/guestfish.pod:855
21317 msgid "EXIT ON ERROR BEHAVIOUR"
21321 #: ../fish/guestfish.pod:857
21323 "By default, guestfish will ignore any errors when in interactive mode (ie. "
21324 "taking commands from a human over a tty), and will exit on the first error "
21325 "in non-interactive mode (scripts, commands given on the command line)."
21329 #: ../fish/guestfish.pod:862
21331 "If you prefix a command with a I<-> character, then that command will not "
21332 "cause guestfish to exit, even if that (one) command returns an error."
21336 #: ../fish/guestfish.pod:866
21337 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
21341 #: ../fish/guestfish.pod:868
21343 "Guestfish can be remote-controlled over a socket. This is useful "
21344 "particularly in shell scripts where you want to make several different "
21345 "changes to a filesystem, but you don't want the overhead of starting up a "
21346 "guestfish process each time."
21350 #: ../fish/guestfish.pod:873
21351 msgid "Start a guestfish server process using:"
21355 #: ../fish/guestfish.pod:875
21358 " eval \"`guestfish --listen`\"\n"
21363 #: ../fish/guestfish.pod:877
21364 msgid "and then send it commands by doing:"
21368 #: ../fish/guestfish.pod:879
21371 " guestfish --remote cmd [...]\n"
21376 #: ../fish/guestfish.pod:881
21377 msgid "To cause the server to exit, send it the exit command:"
21381 #: ../fish/guestfish.pod:883
21384 " guestfish --remote exit\n"
21389 #: ../fish/guestfish.pod:885
21391 "Note that the server will normally exit if there is an error in a command. "
21392 "You can change this in the usual way. See section L</EXIT ON ERROR "
21397 #: ../fish/guestfish.pod:889
21398 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
21402 #: ../fish/guestfish.pod:891
21404 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
21405 "is how the I<--remote> option knows where to send the commands. You can "
21406 "have several guestfish listener processes running using:"
21410 #: ../fish/guestfish.pod:895
21413 " eval \"`guestfish --listen`\"\n"
21414 " pid1=$GUESTFISH_PID\n"
21415 " eval \"`guestfish --listen`\"\n"
21416 " pid2=$GUESTFISH_PID\n"
21418 " guestfish --remote=$pid1 cmd\n"
21419 " guestfish --remote=$pid2 cmd\n"
21424 #: ../fish/guestfish.pod:903
21425 msgid "REMOTE CONTROL AND CSH"
21429 #: ../fish/guestfish.pod:905
21431 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
21436 #: ../fish/guestfish.pod:908
21439 " eval \"`guestfish --listen --csh`\"\n"
21444 #: ../fish/guestfish.pod:910
21445 msgid "REMOTE CONTROL DETAILS"
21449 #: ../fish/guestfish.pod:912
21451 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
21452 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
21453 "and C<$PID> is the process ID of the server."
21457 #: ../fish/guestfish.pod:916
21458 msgid "Guestfish client and server versions must match exactly."
21462 #: ../fish/guestfish.pod:918
21463 msgid "PREPARED DISK IMAGES"
21467 #: ../fish/guestfish.pod:920
21469 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
21470 "preformatted disk images that guestfish can make for you to save typing. "
21471 "This is particularly useful for testing purposes. This option is used "
21472 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
21473 "can be mixed with I<-a>)."
21477 #: ../fish/guestfish.pod:926
21479 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
21480 "the second and so on. Existing files in the current directory are "
21485 #: ../fish/guestfish.pod:930
21487 "The type briefly describes how the disk should be sized, partitioned, how "
21488 "filesystem(s) should be created, and how content should be added. "
21489 "Optionally the type can be followed by extra parameters, separated by C<:> "
21490 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
21491 "allocated disk, containing a single partition, with the partition formatted "
21492 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
21497 #: ../fish/guestfish.pod:938
21498 msgid "To list the available types and any extra parameters they take, run:"
21502 #: ../fish/guestfish.pod:942
21504 "Note that the prepared filesystem is not mounted. You would usually have to "
21505 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
21509 #: ../fish/guestfish.pod:946
21511 "If any I<-N> or I<--new> options are given, the guest is automatically "
21516 #: ../fish/guestfish.pod:951
21517 msgid "Create a 100MB disk with an ext4-formatted partition:"
21521 #: ../fish/guestfish.pod:953
21524 " guestfish -N fs:ext4\n"
21529 #: ../fish/guestfish.pod:955
21530 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
21534 #: ../fish/guestfish.pod:957
21537 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
21542 #: ../fish/guestfish.pod:959
21543 msgid "Create a blank 200MB disk:"
21547 #: ../fish/guestfish.pod:961
21550 " guestfish -N disk:200M\n"
21555 #: ../fish/guestfish.pod:963
21556 msgid "PROGRESS BARS"
21560 #: ../fish/guestfish.pod:965
21562 "Some (not all) long-running commands send progress notification messages as "
21563 "they are running. Guestfish turns these messages into progress bars."
21567 #: ../fish/guestfish.pod:969
21569 "When a command that supports progress bars takes longer than two seconds to "
21570 "run, and if progress bars are enabled, then you will see one appearing below "
21575 #: ../fish/guestfish.pod:973
21578 " ><fs> copy-size /large-file /another-file 2048M\n"
21579 " / 10% [#####-----------------------------------------] 00:30\n"
21584 #: ../fish/guestfish.pod:976
21586 "The spinner on the left hand side moves round once for every progress "
21587 "notification received from the backend. This is a (reasonably) golden "
21588 "assurance that the command is \"doing something\" even if the progress bar "
21589 "is not moving, because the command is able to send the progress "
21590 "notifications. When the bar reaches 100% and the command finishes, the "
21591 "spinner disappears."
21595 #: ../fish/guestfish.pod:983
21597 "Progress bars are enabled by default when guestfish is used interactively. "
21598 "You can enable them even for non-interactive modes using I<--progress-bars>, "
21599 "and you can disable them completely using I<--no-progress-bars>."
21603 #: ../fish/guestfish.pod:988
21604 msgid "GUESTFISH COMMANDS"
21608 #: ../fish/guestfish.pod:990
21610 "The commands in this section are guestfish convenience commands, in other "
21611 "words, they are not part of the L<guestfs(3)> API."
21615 #: ../fish/guestfish.pod:993
21620 #: ../fish/guestfish.pod:995
21629 #: ../fish/guestfish.pod:998
21630 msgid "Without any parameter, this provides general help."
21634 #: ../fish/guestfish.pod:1000
21635 msgid "With a C<cmd> parameter, this displays detailed help for that command."
21639 #: ../fish/guestfish.pod:1002
21640 msgid "quit | exit"
21644 #: ../fish/guestfish.pod:1004
21645 msgid "This exits guestfish. You can also use C<^D> key."
21649 #: ../fish/guestfish.pod:1006
21650 msgid "@FISH_COMMANDS@"
21654 #: ../fish/guestfish.pod:1008
21659 #: ../fish/guestfish.pod:1012 ../test-tool/libguestfs-test-tool.pod:77
21664 #: ../fish/guestfish.pod:1014
21666 "guestfish returns 0 if the commands completed without error, or 1 if there "
21671 #: ../fish/guestfish.pod:1021
21676 #: ../fish/guestfish.pod:1023
21678 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
21683 #: ../fish/guestfish.pod:1026
21684 msgid "GUESTFISH_PID"
21688 #: ../fish/guestfish.pod:1028
21690 "Used with the I<--remote> option to specify the remote guestfish process to "
21691 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
21695 #: ../fish/guestfish.pod:1032
21700 #: ../fish/guestfish.pod:1034
21702 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
21703 "not specified, the external L<hexedit(1)> program is used."
21707 #: ../fish/guestfish.pod:1038
21712 #: ../fish/guestfish.pod:1040
21714 "If compiled with GNU readline support, various files in the home directory "
21715 "can be used. See L</FILES>."
21719 #: ../fish/guestfish.pod:1049
21721 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
21722 "effect as using the B<-v> option."
21726 #: ../fish/guestfish.pod:1061
21728 "Set the path that guestfish uses to search for kernel and initrd.img. See "
21729 "the discussion of paths in L<guestfs(3)>."
21733 #: ../fish/guestfish.pod:1072
21734 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
21738 #: ../fish/guestfish.pod:1074
21743 #: ../fish/guestfish.pod:1076
21745 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
21750 #: ../fish/guestfish.pod:1092 ../fuse/guestmount.pod:264
21755 #: ../fish/guestfish.pod:1096 ../fuse/guestmount.pod:268
21756 msgid "$HOME/.libguestfs-tools.rc"
21760 #: ../fish/guestfish.pod:1098 ../fuse/guestmount.pod:270
21761 msgid "/etc/libguestfs-tools.conf"
21765 #: ../fish/guestfish.pod:1100 ../fuse/guestmount.pod:272
21767 "This configuration file controls the default read-only or read-write mode "
21768 "(I<--ro> or I<--rw>)."
21772 #: ../fish/guestfish.pod:1103
21773 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
21777 #: ../fish/guestfish.pod:1105
21778 msgid "$HOME/.guestfish"
21782 #: ../fish/guestfish.pod:1107
21784 "If compiled with GNU readline support, then the command history is saved in "
21789 #: ../fish/guestfish.pod:1110
21790 msgid "$HOME/.inputrc"
21794 #: ../fish/guestfish.pod:1112
21795 msgid "/etc/inputrc"
21799 #: ../fish/guestfish.pod:1114
21801 "If compiled with GNU readline support, then these files can be used to "
21802 "configure readline. For further information, please see L<readline(3)/"
21803 "INITIALIZATION FILE>."
21807 #: ../fish/guestfish.pod:1118
21808 msgid "To write rules which only apply to guestfish, use:"
21812 #: ../fish/guestfish.pod:1120
21822 #: ../fish/guestfish.pod:1124
21824 "Variables that you can set in inputrc that change the behaviour of guestfish "
21825 "in useful ways include:"
21829 #: ../fish/guestfish.pod:1129
21830 msgid "completion-ignore-case (default: on)"
21834 #: ../fish/guestfish.pod:1131
21836 "By default, guestfish will ignore case when tab-completing paths on the "
21841 #: ../fish/guestfish.pod:1134
21844 " set completion-ignore-case off\n"
21849 #: ../fish/guestfish.pod:1136
21850 msgid "to make guestfish case sensitive."
21854 #: ../fish/guestfish.pod:1140
21859 #: ../fish/guestfish.pod:1142
21860 msgid "test2.img (etc)"
21864 #: ../fish/guestfish.pod:1144
21866 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
21867 "will be created in the file C<test1.img> in the current directory. The "
21868 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
21869 "the same name will be overwritten."
21873 #: ../fish/guestfish.pod:1153
21875 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-copy-in(1)"
21876 ">, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)"
21877 ">, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions"
21878 "(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)"
21879 ">, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)"
21880 ">, L<hexedit(1)>."
21884 #: ../fish/guestfish.pod:1183 ../test-tool/libguestfs-test-tool.pod:102
21885 #: ../fuse/guestmount.pod:299 ../tools/virt-win-reg.pl:778
21886 #: ../tools/virt-list-filesystems.pl:210 ../tools/virt-tar.pl:309
21887 #: ../tools/virt-make-fs.pl:572 ../tools/virt-list-partitions.pl:277
21889 "This program is free software; you can redistribute it and/or modify it "
21890 "under the terms of the GNU General Public License as published by the Free "
21891 "Software Foundation; either version 2 of the License, or (at your option) "
21892 "any later version."
21896 #: ../fish/guestfish.pod:1188 ../test-tool/libguestfs-test-tool.pod:107
21897 #: ../fuse/guestmount.pod:304 ../tools/virt-win-reg.pl:783
21898 #: ../tools/virt-list-filesystems.pl:215 ../tools/virt-tar.pl:314
21899 #: ../tools/virt-make-fs.pl:577 ../tools/virt-list-partitions.pl:282
21901 "This program is distributed in the hope that it will be useful, but WITHOUT "
21902 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
21903 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
21908 #: ../fish/guestfish.pod:1193 ../test-tool/libguestfs-test-tool.pod:112
21909 #: ../fuse/guestmount.pod:309 ../tools/virt-win-reg.pl:788
21910 #: ../tools/virt-list-filesystems.pl:220 ../tools/virt-tar.pl:319
21911 #: ../tools/virt-make-fs.pl:582 ../tools/virt-list-partitions.pl:287
21913 "You should have received a copy of the GNU General Public License along with "
21914 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
21915 "Ave, Cambridge, MA 02139, USA."
21919 #: ../fish/guestfish-actions.pod:1
21924 #: ../fish/guestfish-actions.pod:3
21927 " add-cdrom filename\n"
21932 #: ../fish/guestfish-actions.pod:15
21934 "This call checks for the existence of C<filename>. This stops you from "
21935 "specifying other types of drive which are supported by qemu such as C<nbd:> "
21936 "and C<http:> URLs. To specify those, use the general L</config> call "
21941 #: ../fish/guestfish-actions.pod:22
21943 "If you just want to add an ISO file (often you use this as an efficient way "
21944 "to transfer large files into the guest), then you should probably use L</add-"
21945 "drive-ro> instead."
21949 #: ../fish/guestfish-actions.pod:35
21954 #: ../fish/guestfish-actions.pod:37
21959 #: ../fish/guestfish-actions.pod:39
21962 " add-domain dom [libvirturi:..] [readonly:..] [iface:..] [live:..] [allowuuid:..]\n"
21967 #: ../fish/guestfish-actions.pod:41
21969 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
21970 "It works by connecting to libvirt, requesting the domain and domain XML from "
21971 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
21975 #: ../fish/guestfish-actions.pod:76
21977 "The other optional parameters are passed directly through to L</add-drive-"
21982 #: ../fish/guestfish-actions.pod:79 ../fish/guestfish-actions.pod:143
21983 #: ../fish/guestfish-actions.pod:3064
21985 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
21989 #: ../fish/guestfish-actions.pod:81
21994 #: ../fish/guestfish-actions.pod:83
21997 " add-drive filename\n"
22002 #: ../fish/guestfish-actions.pod:85
22004 "This function is the equivalent of calling L</add-drive-opts> with no "
22005 "optional parameters, so the disk is added writable, with the format being "
22006 "detected automatically."
22010 #: ../fish/guestfish-actions.pod:89
22012 "Automatic detection of the format opens you up to a potential security hole "
22013 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
22014 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
22015 "you should think about replacing calls to this function with calls to L</add-"
22016 "drive-opts>, and specifying the format."
22020 #: ../fish/guestfish-actions.pod:96
22021 msgid "add-drive-opts"
22025 #: ../fish/guestfish-actions.pod:98
22030 #: ../fish/guestfish-actions.pod:100
22033 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
22038 #: ../fish/guestfish-actions.pod:127
22040 "This forces the image format. If you omit this (or use L</add-drive> or L</"
22041 "add-drive-ro>) then the format is automatically detected. Possible formats "
22042 "include C<raw> and C<qcow2>."
22046 #: ../fish/guestfish-actions.pod:138
22048 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
22049 "add-drive-with-if> call (q.v.)"
22053 #: ../fish/guestfish-actions.pod:145
22054 msgid "add-drive-ro"
22058 #: ../fish/guestfish-actions.pod:147
22063 #: ../fish/guestfish-actions.pod:149
22066 " add-drive-ro filename\n"
22071 #: ../fish/guestfish-actions.pod:151
22073 "This function is the equivalent of calling L</add-drive-opts> with the "
22074 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
22075 "is added read-only, with the format being detected automatically."
22079 #: ../fish/guestfish-actions.pod:156
22080 msgid "add-drive-ro-with-if"
22084 #: ../fish/guestfish-actions.pod:158
22087 " add-drive-ro-with-if filename iface\n"
22092 #: ../fish/guestfish-actions.pod:160
22094 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
22095 "interface emulation to use at run time."
22099 #: ../fish/guestfish-actions.pod:170
22100 msgid "add-drive-with-if"
22104 #: ../fish/guestfish-actions.pod:172
22107 " add-drive-with-if filename iface\n"
22112 #: ../fish/guestfish-actions.pod:174
22114 "This is the same as L</add-drive> but it allows you to specify the QEMU "
22115 "interface emulation to use at run time."
22119 #: ../fish/guestfish-actions.pod:184
22124 #: ../fish/guestfish-actions.pod:186
22127 " aug-clear augpath\n"
22132 #: ../fish/guestfish-actions.pod:191
22137 #: ../fish/guestfish-actions.pod:193
22145 #: ../fish/guestfish-actions.pod:195
22147 "Close the current Augeas handle and free up any resources used by it. After "
22148 "calling this, you have to call L</aug-init> again before you can use any "
22149 "other Augeas functions."
22153 #: ../fish/guestfish-actions.pod:200
22154 msgid "aug-defnode"
22158 #: ../fish/guestfish-actions.pod:202
22161 " aug-defnode name expr val\n"
22166 #: ../fish/guestfish-actions.pod:207
22168 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
22169 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
22170 "containing that single node."
22174 #: ../fish/guestfish-actions.pod:215
22179 #: ../fish/guestfish-actions.pod:217
22182 " aug-defvar name expr\n"
22187 #: ../fish/guestfish-actions.pod:226
22192 #: ../fish/guestfish-actions.pod:228
22195 " aug-get augpath\n"
22200 #: ../fish/guestfish-actions.pod:233
22205 #: ../fish/guestfish-actions.pod:235
22208 " aug-init root flags\n"
22213 #: ../fish/guestfish-actions.pod:241
22214 msgid "You must call this before using any other L</aug-*> commands."
22218 #: ../fish/guestfish-actions.pod:276
22219 msgid "Do not load the tree in L</aug-init>."
22223 #: ../fish/guestfish-actions.pod:280
22224 msgid "To close the handle, you can call L</aug-close>."
22228 #: ../fish/guestfish-actions.pod:284
22233 #: ../fish/guestfish-actions.pod:286
22236 " aug-insert augpath label true|false\n"
22241 #: ../fish/guestfish-actions.pod:296
22246 #: ../fish/guestfish-actions.pod:298
22254 #: ../fish/guestfish-actions.pod:305
22259 #: ../fish/guestfish-actions.pod:307
22262 " aug-ls augpath\n"
22267 #: ../fish/guestfish-actions.pod:309
22269 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
22270 "resulting nodes into alphabetical order."
22274 #: ../fish/guestfish-actions.pod:312
22279 #: ../fish/guestfish-actions.pod:314
22282 " aug-match augpath\n"
22287 #: ../fish/guestfish-actions.pod:320
22292 #: ../fish/guestfish-actions.pod:322
22295 " aug-mv src dest\n"
22300 #: ../fish/guestfish-actions.pod:327
22305 #: ../fish/guestfish-actions.pod:329
22308 " aug-rm augpath\n"
22313 #: ../fish/guestfish-actions.pod:335
22318 #: ../fish/guestfish-actions.pod:337
22326 #: ../fish/guestfish-actions.pod:341
22328 "The flags which were passed to L</aug-init> affect exactly how files are "
22333 #: ../fish/guestfish-actions.pod:344
22338 #: ../fish/guestfish-actions.pod:346
22341 " aug-set augpath val\n"
22346 #: ../fish/guestfish-actions.pod:350
22348 "In the Augeas API, it is possible to clear a node by setting the value to "
22349 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
22350 "this call. Instead you must use the L</aug-clear> call."
22354 #: ../fish/guestfish-actions.pod:355
22359 #: ../fish/guestfish-actions.pod:357
22362 " available 'groups ...'\n"
22367 #: ../fish/guestfish-actions.pod:363
22369 "The libguestfs groups, and the functions that those groups correspond to, "
22370 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
22371 "runtime by calling L</available-all-groups>."
22375 #: ../fish/guestfish-actions.pod:387
22376 msgid "You must call L</launch> before calling this function."
22380 #: ../fish/guestfish-actions.pod:409
22382 "This call was added in version C<1.0.80>. In previous versions of "
22383 "libguestfs all you could do would be to speculatively execute a command to "
22384 "find out if the daemon implemented it. See also L</version>."
22388 #: ../fish/guestfish-actions.pod:416
22389 msgid "available-all-groups"
22393 #: ../fish/guestfish-actions.pod:418
22396 " available-all-groups\n"
22401 #: ../fish/guestfish-actions.pod:420
22403 "This command returns a list of all optional groups that this daemon knows "
22404 "about. Note this returns both supported and unsupported groups. To find "
22405 "out which ones the daemon can actually support you have to call L</"
22406 "available> on each member of the returned list."
22410 #: ../fish/guestfish-actions.pod:426
22411 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
22415 #: ../fish/guestfish-actions.pod:428
22420 #: ../fish/guestfish-actions.pod:430
22423 " base64-in (base64file|-) filename\n"
22428 #: ../fish/guestfish-actions.pod:435 ../fish/guestfish-actions.pod:444
22429 #: ../fish/guestfish-actions.pod:668 ../fish/guestfish-actions.pod:837
22430 #: ../fish/guestfish-actions.pod:856 ../fish/guestfish-actions.pod:1230
22431 #: ../fish/guestfish-actions.pod:4497 ../fish/guestfish-actions.pod:4509
22432 #: ../fish/guestfish-actions.pod:4520 ../fish/guestfish-actions.pod:4531
22433 #: ../fish/guestfish-actions.pod:4583 ../fish/guestfish-actions.pod:4592
22434 #: ../fish/guestfish-actions.pod:4646 ../fish/guestfish-actions.pod:4669
22435 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
22439 #: ../fish/guestfish-actions.pod:437
22444 #: ../fish/guestfish-actions.pod:439
22447 " base64-out filename (base64file|-)\n"
22452 #: ../fish/guestfish-actions.pod:446
22453 msgid "blockdev-flushbufs"
22457 #: ../fish/guestfish-actions.pod:448
22460 " blockdev-flushbufs device\n"
22465 #: ../fish/guestfish-actions.pod:455
22466 msgid "blockdev-getbsz"
22470 #: ../fish/guestfish-actions.pod:457
22473 " blockdev-getbsz device\n"
22478 #: ../fish/guestfish-actions.pod:466
22479 msgid "blockdev-getro"
22483 #: ../fish/guestfish-actions.pod:468
22486 " blockdev-getro device\n"
22491 #: ../fish/guestfish-actions.pod:475
22492 msgid "blockdev-getsize64"
22496 #: ../fish/guestfish-actions.pod:477
22499 " blockdev-getsize64 device\n"
22504 #: ../fish/guestfish-actions.pod:481
22505 msgid "See also L</blockdev-getsz>."
22509 #: ../fish/guestfish-actions.pod:485
22510 msgid "blockdev-getss"
22514 #: ../fish/guestfish-actions.pod:487
22517 " blockdev-getss device\n"
22522 #: ../fish/guestfish-actions.pod:492
22524 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
22528 #: ../fish/guestfish-actions.pod:497
22529 msgid "blockdev-getsz"
22533 #: ../fish/guestfish-actions.pod:499
22536 " blockdev-getsz device\n"
22541 #: ../fish/guestfish-actions.pod:504
22543 "See also L</blockdev-getss> for the real sector size of the device, and L</"
22544 "blockdev-getsize64> for the more useful I<size in bytes>."
22548 #: ../fish/guestfish-actions.pod:510
22549 msgid "blockdev-rereadpt"
22553 #: ../fish/guestfish-actions.pod:512
22556 " blockdev-rereadpt device\n"
22561 #: ../fish/guestfish-actions.pod:518
22562 msgid "blockdev-setbsz"
22566 #: ../fish/guestfish-actions.pod:520
22569 " blockdev-setbsz device blocksize\n"
22574 #: ../fish/guestfish-actions.pod:529
22575 msgid "blockdev-setro"
22579 #: ../fish/guestfish-actions.pod:531
22582 " blockdev-setro device\n"
22587 #: ../fish/guestfish-actions.pod:537
22588 msgid "blockdev-setrw"
22592 #: ../fish/guestfish-actions.pod:539
22595 " blockdev-setrw device\n"
22600 #: ../fish/guestfish-actions.pod:545
22601 msgid "case-sensitive-path"
22605 #: ../fish/guestfish-actions.pod:547
22608 " case-sensitive-path path\n"
22613 #: ../fish/guestfish-actions.pod:571
22615 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
22616 "WINDOWS/system32\"> (the exact return value would depend on details of how "
22617 "the directories were originally created under Windows)."
22621 #: ../fish/guestfish-actions.pod:579
22622 msgid "See also L</realpath>."
22626 #: ../fish/guestfish-actions.pod:581
22631 #: ../fish/guestfish-actions.pod:583
22639 #: ../fish/guestfish-actions.pod:587
22641 "Note that this function cannot correctly handle binary files (specifically, "
22642 "files containing C<\\0> character which is treated as end of string). For "
22643 "those you need to use the L</read-file> or L</download> functions which have "
22644 "a more complex interface."
22648 #: ../fish/guestfish-actions.pod:595
22653 #: ../fish/guestfish-actions.pod:597
22656 " checksum csumtype path\n"
22661 #: ../fish/guestfish-actions.pod:640
22662 msgid "To get the checksum for a device, use L</checksum-device>."
22666 #: ../fish/guestfish-actions.pod:642
22667 msgid "To get the checksums for many files, use L</checksums-out>."
22671 #: ../fish/guestfish-actions.pod:644
22672 msgid "checksum-device"
22676 #: ../fish/guestfish-actions.pod:646
22679 " checksum-device csumtype device\n"
22684 #: ../fish/guestfish-actions.pod:648
22686 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
22687 "device named C<device>. For the types of checksums supported see the L</"
22688 "checksum> command."
22692 #: ../fish/guestfish-actions.pod:652
22693 msgid "checksums-out"
22697 #: ../fish/guestfish-actions.pod:654
22700 " checksums-out csumtype directory (sumsfile|-)\n"
22705 #: ../fish/guestfish-actions.pod:670
22710 #: ../fish/guestfish-actions.pod:672
22713 " chmod mode path\n"
22718 #: ../fish/guestfish-actions.pod:683
22723 #: ../fish/guestfish-actions.pod:685
22726 " chown owner group path\n"
22731 #: ../fish/guestfish-actions.pod:693
22736 #: ../fish/guestfish-actions.pod:695
22739 " command 'arguments ...'\n"
22744 #: ../fish/guestfish-actions.pod:702
22746 "The single parameter is an argv-style list of arguments. The first element "
22747 "is the name of the program to run. Subsequent elements are parameters. The "
22748 "list must be non-empty (ie. must contain a program name). Note that the "
22749 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
22753 #: ../fish/guestfish-actions.pod:730
22754 msgid "command-lines"
22758 #: ../fish/guestfish-actions.pod:732
22761 " command-lines 'arguments ...'\n"
22766 #: ../fish/guestfish-actions.pod:734
22768 "This is the same as L</command>, but splits the result into a list of lines."
22772 #: ../fish/guestfish-actions.pod:737
22773 msgid "See also: L</sh-lines>"
22777 #: ../fish/guestfish-actions.pod:742
22782 #: ../fish/guestfish-actions.pod:744
22785 " config qemuparam qemuvalue\n"
22790 #: ../fish/guestfish-actions.pod:755
22795 #: ../fish/guestfish-actions.pod:757
22798 " copy-size src dest size\n"
22803 #: ../fish/guestfish-actions.pod:765
22808 #: ../fish/guestfish-actions.pod:767
22816 #: ../fish/guestfish-actions.pod:772
22821 #: ../fish/guestfish-actions.pod:774
22829 #: ../fish/guestfish-actions.pod:779
22834 #: ../fish/guestfish-actions.pod:781
22842 #: ../fish/guestfish-actions.pod:788
22844 "If the destination is a device, it must be as large or larger than the "
22845 "source file or device, otherwise the copy will fail. This command cannot do "
22846 "partial copies (see L</copy-size>)."
22850 #: ../fish/guestfish-actions.pod:792
22855 #: ../fish/guestfish-actions.pod:794
22863 #: ../fish/guestfish-actions.pod:798 ../fish/guestfish-actions.pod:809
22865 "This command is mostly useful for interactive sessions. It is I<not> "
22866 "intended that you try to parse the output string. Use L</statvfs> from "
22871 #: ../fish/guestfish-actions.pod:802
22876 #: ../fish/guestfish-actions.pod:804
22884 #: ../fish/guestfish-actions.pod:813
22889 #: ../fish/guestfish-actions.pod:815
22897 #: ../fish/guestfish-actions.pod:821
22899 "Another way to get the same information is to enable verbose messages with "
22900 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
22901 "before running the program."
22905 #: ../fish/guestfish-actions.pod:826
22910 #: ../fish/guestfish-actions.pod:828
22913 " download remotefilename (filename|-)\n"
22918 #: ../fish/guestfish-actions.pod:835
22919 msgid "See also L</upload>, L</cat>."
22923 #: ../fish/guestfish-actions.pod:839
22924 msgid "download-offset"
22928 #: ../fish/guestfish-actions.pod:841
22931 " download-offset remotefilename (filename|-) offset size\n"
22936 #: ../fish/guestfish-actions.pod:849
22938 "Note that there is no limit on the amount of data that can be downloaded "
22939 "with this call, unlike with L</pread>, and this call always reads the full "
22940 "amount unless an error occurs."
22944 #: ../fish/guestfish-actions.pod:854
22945 msgid "See also L</download>, L</pread>."
22949 #: ../fish/guestfish-actions.pod:858
22950 msgid "drop-caches"
22954 #: ../fish/guestfish-actions.pod:860
22957 " drop-caches whattodrop\n"
22962 #: ../fish/guestfish-actions.pod:872
22967 #: ../fish/guestfish-actions.pod:874
22975 #: ../fish/guestfish-actions.pod:886
22980 #: ../fish/guestfish-actions.pod:888
22983 " e2fsck-f device\n"
22988 #: ../fish/guestfish-actions.pod:894
22990 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
22991 "should use L</fsck>."
22995 #: ../fish/guestfish-actions.pod:897
22996 msgid "echo-daemon"
23000 #: ../fish/guestfish-actions.pod:899
23003 " echo-daemon 'words ...'\n"
23008 #: ../fish/guestfish-actions.pod:906
23009 msgid "See also L</ping-daemon>."
23013 #: ../fish/guestfish-actions.pod:908
23018 #: ../fish/guestfish-actions.pod:910
23021 " egrep regex path\n"
23026 #: ../fish/guestfish-actions.pod:918
23031 #: ../fish/guestfish-actions.pod:920
23034 " egrepi regex path\n"
23039 #: ../fish/guestfish-actions.pod:928
23044 #: ../fish/guestfish-actions.pod:930
23047 " equal file1 file2\n"
23052 #: ../fish/guestfish-actions.pod:937
23057 #: ../fish/guestfish-actions.pod:939
23065 #: ../fish/guestfish-actions.pod:944
23066 msgid "See also L</is-file>, L</is-dir>, L</stat>."
23070 #: ../fish/guestfish-actions.pod:946
23075 #: ../fish/guestfish-actions.pod:948
23078 " fallocate path len\n"
23083 #: ../fish/guestfish-actions.pod:965
23084 msgid "fallocate64"
23088 #: ../fish/guestfish-actions.pod:967
23091 " fallocate64 path len\n"
23096 #: ../fish/guestfish-actions.pod:973
23098 "Note that this call allocates disk blocks for the file. To create a sparse "
23099 "file use L</truncate-size> instead."
23103 #: ../fish/guestfish-actions.pod:976
23105 "The deprecated call L</fallocate> does the same, but owing to an oversight "
23106 "it only allowed 30 bit lengths to be specified, effectively limiting the "
23107 "maximum size of files created through that call to 1GB."
23111 #: ../fish/guestfish-actions.pod:985
23116 #: ../fish/guestfish-actions.pod:987
23119 " fgrep pattern path\n"
23124 #: ../fish/guestfish-actions.pod:995
23129 #: ../fish/guestfish-actions.pod:997
23132 " fgrepi pattern path\n"
23137 #: ../fish/guestfish-actions.pod:1005
23142 #: ../fish/guestfish-actions.pod:1007
23150 #: ../fish/guestfish-actions.pod:1023
23152 "See also: L<file(1)>, L</vfs-type>, L</lstat>, L</is-file>, L</is-blockdev> "
23153 "(etc), L</is-zero>."
23157 #: ../fish/guestfish-actions.pod:1026
23158 msgid "file-architecture"
23162 #: ../fish/guestfish-actions.pod:1028
23165 " file-architecture filename\n"
23170 #: ../fish/guestfish-actions.pod:1131
23175 #: ../fish/guestfish-actions.pod:1133
23183 #: ../fish/guestfish-actions.pod:1137
23185 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
23186 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
23190 #: ../fish/guestfish-actions.pod:1141
23195 #: ../fish/guestfish-actions.pod:1143
23198 " fill c len path\n"
23203 #: ../fish/guestfish-actions.pod:1149
23205 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
23206 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
23207 "L</fill-pattern>."
23211 #: ../fish/guestfish-actions.pod:1154
23212 msgid "fill-pattern"
23216 #: ../fish/guestfish-actions.pod:1156
23219 " fill-pattern pattern len path\n"
23224 #: ../fish/guestfish-actions.pod:1158
23226 "This function is like L</fill> except that it creates a new file of length "
23227 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
23228 "is truncated if necessary to ensure the length of the file is exactly C<len> "
23233 #: ../fish/guestfish-actions.pod:1163
23238 #: ../fish/guestfish-actions.pod:1165
23241 " find directory\n"
23246 #: ../fish/guestfish-actions.pod:1179
23247 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
23251 #: ../fish/guestfish-actions.pod:1192
23252 msgid "See also L</find0>."
23256 #: ../fish/guestfish-actions.pod:1197
23261 #: ../fish/guestfish-actions.pod:1199
23264 " find0 directory (files|-)\n"
23269 #: ../fish/guestfish-actions.pod:1205
23271 "This command works the same way as L</find> with the following exceptions:"
23275 #: ../fish/guestfish-actions.pod:1232
23276 msgid "findfs-label"
23280 #: ../fish/guestfish-actions.pod:1234
23283 " findfs-label label\n"
23288 #: ../fish/guestfish-actions.pod:1240
23289 msgid "To find the label of a filesystem, use L</vfs-label>."
23293 #: ../fish/guestfish-actions.pod:1242
23294 msgid "findfs-uuid"
23298 #: ../fish/guestfish-actions.pod:1244
23301 " findfs-uuid uuid\n"
23306 #: ../fish/guestfish-actions.pod:1250
23307 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
23311 #: ../fish/guestfish-actions.pod:1252
23316 #: ../fish/guestfish-actions.pod:1254
23319 " fsck fstype device\n"
23324 #: ../fish/guestfish-actions.pod:1284
23329 #: ../fish/guestfish-actions.pod:1286
23337 #: ../fish/guestfish-actions.pod:1293
23338 msgid "get-attach-method"
23342 #: ../fish/guestfish-actions.pod:1295
23345 " get-attach-method\n"
23350 #: ../fish/guestfish-actions.pod:1297
23351 msgid "Return the current attach method. See L</set-attach-method>."
23355 #: ../fish/guestfish-actions.pod:1299
23356 msgid "get-autosync"
23360 #: ../fish/guestfish-actions.pod:1301
23368 #: ../fish/guestfish-actions.pod:1305
23373 #: ../fish/guestfish-actions.pod:1307
23381 #: ../fish/guestfish-actions.pod:1311
23382 msgid "get-e2label"
23386 #: ../fish/guestfish-actions.pod:1313
23389 " get-e2label device\n"
23394 #: ../fish/guestfish-actions.pod:1325
23399 #: ../fish/guestfish-actions.pod:1327
23402 " get-e2uuid device\n"
23407 #: ../fish/guestfish-actions.pod:1339
23408 msgid "get-memsize"
23412 #: ../fish/guestfish-actions.pod:1341
23420 #: ../fish/guestfish-actions.pod:1346
23422 "If L</set-memsize> was not called on this handle, and if "
23423 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
23424 "value for memsize."
23428 #: ../fish/guestfish-actions.pod:1353
23429 msgid "get-network"
23433 #: ../fish/guestfish-actions.pod:1355
23441 #: ../fish/guestfish-actions.pod:1359
23446 #: ../fish/guestfish-actions.pod:1361
23454 #: ../fish/guestfish-actions.pod:1368
23459 #: ../fish/guestfish-actions.pod:1370
23464 #: ../fish/guestfish-actions.pod:1372
23472 #: ../fish/guestfish-actions.pod:1379
23477 #: ../fish/guestfish-actions.pod:1381
23485 #: ../fish/guestfish-actions.pod:1388
23486 msgid "get-recovery-proc"
23490 #: ../fish/guestfish-actions.pod:1390
23493 " get-recovery-proc\n"
23498 #: ../fish/guestfish-actions.pod:1394
23499 msgid "get-selinux"
23503 #: ../fish/guestfish-actions.pod:1396
23511 #: ../fish/guestfish-actions.pod:1398
23513 "This returns the current setting of the selinux flag which is passed to the "
23514 "appliance at boot time. See L</set-selinux>."
23518 #: ../fish/guestfish-actions.pod:1404
23523 #: ../fish/guestfish-actions.pod:1406
23531 #: ../fish/guestfish-actions.pod:1413
23536 #: ../fish/guestfish-actions.pod:1415
23544 #: ../fish/guestfish-actions.pod:1419
23549 #: ../fish/guestfish-actions.pod:1421
23557 #: ../fish/guestfish-actions.pod:1423
23559 "Return the current umask. By default the umask is C<022> unless it has been "
23560 "set by calling L</umask>."
23564 #: ../fish/guestfish-actions.pod:1426
23565 msgid "get-verbose"
23569 #: ../fish/guestfish-actions.pod:1428
23577 #: ../fish/guestfish-actions.pod:1432
23582 #: ../fish/guestfish-actions.pod:1434
23590 #: ../fish/guestfish-actions.pod:1438
23591 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
23595 #: ../fish/guestfish-actions.pod:1441
23600 #: ../fish/guestfish-actions.pod:1443
23603 " getxattr path name\n"
23608 #: ../fish/guestfish-actions.pod:1445
23610 "Get a single extended attribute from file C<path> named C<name>. This call "
23611 "follows symlinks. If you want to lookup an extended attribute for the "
23612 "symlink itself, use L</lgetxattr>."
23616 #: ../fish/guestfish-actions.pod:1449 ../fish/guestfish-actions.pod:2470
23618 "Normally it is better to get all extended attributes from a file in one go "
23619 "by calling L</getxattrs>. However some Linux filesystem implementations are "
23620 "buggy and do not provide a way to list out attributes. For these "
23621 "filesystems (notably ntfs-3g) you have to know the names of the extended "
23622 "attributes you want in advance and call this function."
23626 #: ../fish/guestfish-actions.pod:1459
23627 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
23631 #: ../fish/guestfish-actions.pod:1461
23636 #: ../fish/guestfish-actions.pod:1463
23639 " getxattrs path\n"
23644 #: ../fish/guestfish-actions.pod:1471
23645 msgid "See also: L</lgetxattrs>, L<attr(5)>."
23649 #: ../fish/guestfish-actions.pod:1473
23650 msgid "glob-expand"
23654 #: ../fish/guestfish-actions.pod:1475
23657 " glob-expand pattern\n"
23662 #: ../fish/guestfish-actions.pod:1488
23667 #: ../fish/guestfish-actions.pod:1490
23670 " grep regex path\n"
23675 #: ../fish/guestfish-actions.pod:1498
23680 #: ../fish/guestfish-actions.pod:1500
23683 " grepi regex path\n"
23688 #: ../fish/guestfish-actions.pod:1508
23689 msgid "grub-install"
23693 #: ../fish/guestfish-actions.pod:1510
23696 " grub-install root device\n"
23701 #: ../fish/guestfish-actions.pod:1526
23706 #: ../fish/guestfish-actions.pod:1528
23714 #: ../fish/guestfish-actions.pod:1536
23719 #: ../fish/guestfish-actions.pod:1538
23722 " head-n nrlines path\n"
23727 #: ../fish/guestfish-actions.pod:1551
23732 #: ../fish/guestfish-actions.pod:1553
23740 #: ../fish/guestfish-actions.pod:1561
23745 #: ../fish/guestfish-actions.pod:1563
23748 " initrd-cat initrdpath filename\n"
23753 #: ../fish/guestfish-actions.pod:1575
23754 msgid "See also L</initrd-list>."
23758 #: ../fish/guestfish-actions.pod:1580
23759 msgid "initrd-list"
23763 #: ../fish/guestfish-actions.pod:1582
23766 " initrd-list path\n"
23771 #: ../fish/guestfish-actions.pod:1594
23772 msgid "inotify-add-watch"
23776 #: ../fish/guestfish-actions.pod:1596
23779 " inotify-add-watch path mask\n"
23784 #: ../fish/guestfish-actions.pod:1608
23785 msgid "inotify-close"
23789 #: ../fish/guestfish-actions.pod:1610
23797 #: ../fish/guestfish-actions.pod:1616
23798 msgid "inotify-files"
23802 #: ../fish/guestfish-actions.pod:1618
23810 #: ../fish/guestfish-actions.pod:1620
23812 "This function is a helpful wrapper around L</inotify-read> which just "
23813 "returns a list of pathnames of objects that were touched. The returned "
23814 "pathnames are sorted and deduplicated."
23818 #: ../fish/guestfish-actions.pod:1624
23819 msgid "inotify-init"
23823 #: ../fish/guestfish-actions.pod:1626
23826 " inotify-init maxevents\n"
23831 #: ../fish/guestfish-actions.pod:1632
23833 "C<maxevents> is the maximum number of events which will be queued up between "
23834 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
23835 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
23836 "default was 16384 events. Beyond this limit, the kernel throws away events, "
23837 "but records the fact that it threw them away by setting a flag "
23838 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
23842 #: ../fish/guestfish-actions.pod:1642
23844 "Before any events are generated, you have to add some watches to the "
23845 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
23846 "L</inotify-watch-all>."
23850 #: ../fish/guestfish-actions.pod:1648
23852 "Queued up events should be read periodically by calling L</inotify-read> (or "
23853 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
23854 "If you don't read the events out often enough then you risk the internal "
23855 "queue overflowing."
23859 #: ../fish/guestfish-actions.pod:1655
23861 "The handle should be closed after use by calling L</inotify-close>. This "
23862 "also removes any watches automatically."
23866 #: ../fish/guestfish-actions.pod:1664
23867 msgid "inotify-read"
23871 #: ../fish/guestfish-actions.pod:1666
23879 #: ../fish/guestfish-actions.pod:1679
23880 msgid "inotify-rm-watch"
23884 #: ../fish/guestfish-actions.pod:1681
23887 " inotify-rm-watch wd\n"
23892 #: ../fish/guestfish-actions.pod:1683
23893 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
23897 #: ../fish/guestfish-actions.pod:1686
23898 msgid "inspect-get-arch"
23902 #: ../fish/guestfish-actions.pod:1688
23905 " inspect-get-arch root\n"
23910 #: ../fish/guestfish-actions.pod:1690 ../fish/guestfish-actions.pod:1706
23911 #: ../fish/guestfish-actions.pod:1792 ../fish/guestfish-actions.pod:1828
23912 #: ../fish/guestfish-actions.pod:1846 ../fish/guestfish-actions.pod:1880
23913 #: ../fish/guestfish-actions.pod:1895 ../fish/guestfish-actions.pod:1916
23914 #: ../fish/guestfish-actions.pod:1931 ../fish/guestfish-actions.pod:1964
23915 #: ../fish/guestfish-actions.pod:1986 ../fish/guestfish-actions.pod:2010
23916 #: ../fish/guestfish-actions.pod:2027 ../fish/guestfish-actions.pod:2070
23917 #: ../fish/guestfish-actions.pod:2105 ../fish/guestfish-actions.pod:2121
23918 #: ../fish/guestfish-actions.pod:2137 ../fish/guestfish-actions.pod:2150
23919 #: ../fish/guestfish-actions.pod:2163 ../fish/guestfish-actions.pod:2178
23921 "This function should only be called with a root device string as returned by "
23926 #: ../fish/guestfish-actions.pod:1693
23928 "This returns the architecture of the inspected operating system. The "
23929 "possible return values are listed under L</file-architecture>."
23933 #: ../fish/guestfish-actions.pod:1702
23934 msgid "inspect-get-distro"
23938 #: ../fish/guestfish-actions.pod:1704
23941 " inspect-get-distro root\n"
23946 #: ../fish/guestfish-actions.pod:1788
23947 msgid "inspect-get-drive-mappings"
23951 #: ../fish/guestfish-actions.pod:1790
23954 " inspect-get-drive-mappings root\n"
23959 #: ../fish/guestfish-actions.pod:1820
23961 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
23962 "get-mountpoints>, L</inspect-get-filesystems>."
23966 #: ../fish/guestfish-actions.pod:1824
23967 msgid "inspect-get-filesystems"
23971 #: ../fish/guestfish-actions.pod:1826
23974 " inspect-get-filesystems root\n"
23979 #: ../fish/guestfish-actions.pod:1839
23981 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
23982 "get-mountpoints>."
23986 #: ../fish/guestfish-actions.pod:1842
23987 msgid "inspect-get-format"
23991 #: ../fish/guestfish-actions.pod:1844
23994 " inspect-get-format root\n"
23999 #: ../fish/guestfish-actions.pod:1876
24000 msgid "inspect-get-hostname"
24004 #: ../fish/guestfish-actions.pod:1878
24007 " inspect-get-hostname root\n"
24012 #: ../fish/guestfish-actions.pod:1891
24013 msgid "inspect-get-major-version"
24017 #: ../fish/guestfish-actions.pod:1893
24020 " inspect-get-major-version root\n"
24025 #: ../fish/guestfish-actions.pod:1912
24026 msgid "inspect-get-minor-version"
24030 #: ../fish/guestfish-actions.pod:1914
24033 " inspect-get-minor-version root\n"
24038 #: ../fish/guestfish-actions.pod:1924
24040 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
24041 "get-major-version>."
24045 #: ../fish/guestfish-actions.pod:1927
24046 msgid "inspect-get-mountpoints"
24050 #: ../fish/guestfish-actions.pod:1929
24053 " inspect-get-mountpoints root\n"
24058 #: ../fish/guestfish-actions.pod:1951
24060 "For operating systems like Windows which still use drive letters, this call "
24061 "will only return an entry for the first drive \"mounted on\" C</>. For "
24062 "information about the mapping of drive letters to partitions, see L</inspect-"
24063 "get-drive-mappings>."
24067 #: ../fish/guestfish-actions.pod:1957
24069 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
24070 "get-filesystems>."
24074 #: ../fish/guestfish-actions.pod:1960
24075 msgid "inspect-get-package-format"
24079 #: ../fish/guestfish-actions.pod:1962
24082 " inspect-get-package-format root\n"
24087 #: ../fish/guestfish-actions.pod:1967
24089 "This function and L</inspect-get-package-management> return the package "
24090 "format and package management tool used by the inspected operating system. "
24091 "For example for Fedora these functions would return C<rpm> (package format) "
24092 "and C<yum> (package management)."
24096 #: ../fish/guestfish-actions.pod:1982
24097 msgid "inspect-get-package-management"
24101 #: ../fish/guestfish-actions.pod:1984
24104 " inspect-get-package-management root\n"
24109 #: ../fish/guestfish-actions.pod:1989
24111 "L</inspect-get-package-format> and this function return the package format "
24112 "and package management tool used by the inspected operating system. For "
24113 "example for Fedora these functions would return C<rpm> (package format) and "
24114 "C<yum> (package management)."
24118 #: ../fish/guestfish-actions.pod:2006
24119 msgid "inspect-get-product-name"
24123 #: ../fish/guestfish-actions.pod:2008
24126 " inspect-get-product-name root\n"
24131 #: ../fish/guestfish-actions.pod:2023
24132 msgid "inspect-get-product-variant"
24136 #: ../fish/guestfish-actions.pod:2025
24139 " inspect-get-product-variant root\n"
24144 #: ../fish/guestfish-actions.pod:2049
24146 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
24147 "get-product-name>, L</inspect-get-major-version>."
24151 #: ../fish/guestfish-actions.pod:2053
24152 msgid "inspect-get-roots"
24156 #: ../fish/guestfish-actions.pod:2055
24159 " inspect-get-roots\n"
24164 #: ../fish/guestfish-actions.pod:2057
24166 "This function is a convenient way to get the list of root devices, as "
24167 "returned from a previous call to L</inspect-os>, but without redoing the "
24168 "whole inspection process."
24172 #: ../fish/guestfish-actions.pod:2061
24174 "This returns an empty list if either no root devices were found or the "
24175 "caller has not called L</inspect-os>."
24179 #: ../fish/guestfish-actions.pod:2066
24180 msgid "inspect-get-type"
24184 #: ../fish/guestfish-actions.pod:2068
24187 " inspect-get-type root\n"
24192 #: ../fish/guestfish-actions.pod:2101
24193 msgid "inspect-get-windows-current-control-set"
24197 #: ../fish/guestfish-actions.pod:2103
24200 " inspect-get-windows-current-control-set root\n"
24205 #: ../fish/guestfish-actions.pod:2117
24206 msgid "inspect-get-windows-systemroot"
24210 #: ../fish/guestfish-actions.pod:2119
24213 " inspect-get-windows-systemroot root\n"
24218 #: ../fish/guestfish-actions.pod:2133
24219 msgid "inspect-is-live"
24223 #: ../fish/guestfish-actions.pod:2135
24226 " inspect-is-live root\n"
24231 #: ../fish/guestfish-actions.pod:2140
24233 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
24234 "then this returns true if a live image was detected on the disk."
24238 #: ../fish/guestfish-actions.pod:2146
24239 msgid "inspect-is-multipart"
24243 #: ../fish/guestfish-actions.pod:2148
24246 " inspect-is-multipart root\n"
24251 #: ../fish/guestfish-actions.pod:2153
24253 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
24254 "then this returns true if the disk is part of a set."
24258 #: ../fish/guestfish-actions.pod:2159
24259 msgid "inspect-is-netinst"
24263 #: ../fish/guestfish-actions.pod:2161
24266 " inspect-is-netinst root\n"
24271 #: ../fish/guestfish-actions.pod:2166
24273 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
24274 "then this returns true if the disk is a network installer, ie. not a self-"
24275 "contained install CD but one which is likely to require network access to "
24276 "complete the install."
24280 #: ../fish/guestfish-actions.pod:2174
24281 msgid "inspect-list-applications"
24285 #: ../fish/guestfish-actions.pod:2176
24288 " inspect-list-applications root\n"
24293 #: ../fish/guestfish-actions.pod:2183
24295 "I<Note:> This call works differently from other parts of the inspection "
24296 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
24297 "then mount up the disks, before calling this. Listing applications is a "
24298 "significantly more difficult operation which requires access to the full "
24299 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
24300 "are just returning data cached in the libguestfs handle, this call actually "
24301 "reads parts of the mounted filesystems during the call."
24305 #: ../fish/guestfish-actions.pod:2273
24310 #: ../fish/guestfish-actions.pod:2275
24318 #: ../fish/guestfish-actions.pod:2290
24320 "You can pass the root string(s) returned to other L</inspect-get-*> "
24321 "functions in order to query further information about each operating system, "
24322 "such as the name and version."
24326 #: ../fish/guestfish-actions.pod:2295
24328 "This function uses other libguestfs features such as L</mount-ro> and L</"
24329 "umount-all> in order to mount and unmount filesystems and look at the "
24330 "contents. This should be called with no disks currently mounted. The "
24331 "function may also use Augeas, so any existing Augeas handle will be closed."
24335 #: ../fish/guestfish-actions.pod:2307 ../fish/guestfish-actions.pod:2498
24336 #: ../fish/guestfish-actions.pod:2544
24337 msgid "See also L</list-filesystems>."
24341 #: ../fish/guestfish-actions.pod:2309
24342 msgid "is-blockdev"
24346 #: ../fish/guestfish-actions.pod:2311
24349 " is-blockdev path\n"
24354 #: ../fish/guestfish-actions.pod:2316 ../fish/guestfish-actions.pod:2334
24355 #: ../fish/guestfish-actions.pod:2353 ../fish/guestfish-actions.pod:2362
24356 #: ../fish/guestfish-actions.pod:2372 ../fish/guestfish-actions.pod:2406
24357 #: ../fish/guestfish-actions.pod:2415
24358 msgid "See also L</stat>."
24362 #: ../fish/guestfish-actions.pod:2318
24367 #: ../fish/guestfish-actions.pod:2320
24375 #: ../fish/guestfish-actions.pod:2327
24380 #: ../fish/guestfish-actions.pod:2329
24383 " is-chardev path\n"
24388 #: ../fish/guestfish-actions.pod:2336
24393 #: ../fish/guestfish-actions.pod:2338
24401 #: ../fish/guestfish-actions.pod:2345
24406 #: ../fish/guestfish-actions.pod:2347
24414 #: ../fish/guestfish-actions.pod:2355
24419 #: ../fish/guestfish-actions.pod:2357
24427 #: ../fish/guestfish-actions.pod:2364
24432 #: ../fish/guestfish-actions.pod:2366
24440 #: ../fish/guestfish-actions.pod:2374
24441 msgid "is-launching"
24445 #: ../fish/guestfish-actions.pod:2376
24453 #: ../fish/guestfish-actions.pod:2383
24458 #: ../fish/guestfish-actions.pod:2385
24466 #: ../fish/guestfish-actions.pod:2390
24471 #: ../fish/guestfish-actions.pod:2392
24479 #: ../fish/guestfish-actions.pod:2399
24484 #: ../fish/guestfish-actions.pod:2401
24487 " is-socket path\n"
24492 #: ../fish/guestfish-actions.pod:2408
24497 #: ../fish/guestfish-actions.pod:2410
24500 " is-symlink path\n"
24505 #: ../fish/guestfish-actions.pod:2417
24510 #: ../fish/guestfish-actions.pod:2419
24518 #: ../fish/guestfish-actions.pod:2424
24519 msgid "is-zero-device"
24523 #: ../fish/guestfish-actions.pod:2426
24526 " is-zero-device device\n"
24531 #: ../fish/guestfish-actions.pod:2432
24532 msgid "kill-subprocess"
24536 #: ../fish/guestfish-actions.pod:2434
24539 " kill-subprocess\n"
24544 #: ../fish/guestfish-actions.pod:2438
24549 #: ../fish/guestfish-actions.pod:2440
24554 #: ../fish/guestfish-actions.pod:2442
24562 #: ../fish/guestfish-actions.pod:2450
24567 #: ../fish/guestfish-actions.pod:2452
24570 " lchown owner group path\n"
24575 #: ../fish/guestfish-actions.pod:2454
24577 "Change the file owner to C<owner> and group to C<group>. This is like L</"
24578 "chown> but if C<path> is a symlink then the link itself is changed, not the "
24583 #: ../fish/guestfish-actions.pod:2462
24588 #: ../fish/guestfish-actions.pod:2464
24591 " lgetxattr path name\n"
24596 #: ../fish/guestfish-actions.pod:2480
24597 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
24601 #: ../fish/guestfish-actions.pod:2482
24606 #: ../fish/guestfish-actions.pod:2484
24609 " lgetxattrs path\n"
24614 #: ../fish/guestfish-actions.pod:2486
24616 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
24617 "it returns the extended attributes of the link itself."
24621 #: ../fish/guestfish-actions.pod:2490
24622 msgid "list-devices"
24626 #: ../fish/guestfish-actions.pod:2492
24634 #: ../fish/guestfish-actions.pod:2500
24635 msgid "list-filesystems"
24639 #: ../fish/guestfish-actions.pod:2502
24642 " list-filesystems\n"
24647 #: ../fish/guestfish-actions.pod:2521
24649 "This command runs other libguestfs commands, which might include L</mount> "
24650 "and L</umount>, and therefore you should use this soon after launch and only "
24651 "when nothing is mounted."
24655 #: ../fish/guestfish-actions.pod:2525
24657 "Not all of the filesystems returned will be mountable. In particular, swap "
24658 "partitions are returned in the list. Also this command does not check that "
24659 "each filesystem found is valid and mountable, and some filesystems might be "
24660 "mountable but require special options. Filesystems may not all belong to a "
24661 "single logical operating system (use L</inspect-os> to look for OSes)."
24665 #: ../fish/guestfish-actions.pod:2533
24666 msgid "list-partitions"
24670 #: ../fish/guestfish-actions.pod:2535
24673 " list-partitions\n"
24678 #: ../fish/guestfish-actions.pod:2541
24680 "This does not return logical volumes. For that you will need to call L</"
24685 #: ../fish/guestfish-actions.pod:2546
24690 #: ../fish/guestfish-actions.pod:2548
24698 #: ../fish/guestfish-actions.pod:2556
24703 #: ../fish/guestfish-actions.pod:2558
24706 " ln target linkname\n"
24711 #: ../fish/guestfish-actions.pod:2562
24716 #: ../fish/guestfish-actions.pod:2564
24719 " ln-f target linkname\n"
24724 #: ../fish/guestfish-actions.pod:2569
24729 #: ../fish/guestfish-actions.pod:2571
24732 " ln-s target linkname\n"
24737 #: ../fish/guestfish-actions.pod:2575
24742 #: ../fish/guestfish-actions.pod:2577
24745 " ln-sf target linkname\n"
24750 #: ../fish/guestfish-actions.pod:2582
24751 msgid "lremovexattr"
24755 #: ../fish/guestfish-actions.pod:2584
24758 " lremovexattr xattr path\n"
24763 #: ../fish/guestfish-actions.pod:2586
24765 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
24766 "it removes an extended attribute of the link itself."
24770 #: ../fish/guestfish-actions.pod:2590
24775 #: ../fish/guestfish-actions.pod:2592
24783 #: ../fish/guestfish-actions.pod:2598
24785 "This command is mostly useful for interactive sessions. Programs should "
24786 "probably use L</readdir> instead."
24790 #: ../fish/guestfish-actions.pod:2601
24795 #: ../fish/guestfish-actions.pod:2603
24798 " lsetxattr xattr val vallen path\n"
24803 #: ../fish/guestfish-actions.pod:2605
24805 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
24806 "sets an extended attribute of the link itself."
24810 #: ../fish/guestfish-actions.pod:2609
24815 #: ../fish/guestfish-actions.pod:2611
24823 #: ../fish/guestfish-actions.pod:2615
24825 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
24826 "the link is stat-ed, not the file it refers to."
24830 #: ../fish/guestfish-actions.pod:2621
24835 #: ../fish/guestfish-actions.pod:2623
24838 " lstatlist path 'names ...'\n"
24843 #: ../fish/guestfish-actions.pod:2625
24845 "This call allows you to perform the L</lstat> operation on multiple files, "
24846 "where all files are in the directory C<path>. C<names> is the list of files "
24847 "from this directory."
24851 #: ../fish/guestfish-actions.pod:2634
24853 "This call is intended for programs that want to efficiently list a directory "
24854 "contents without making many round-trips. See also L</lxattrlist> for a "
24855 "similarly efficient call for getting extended attributes. Very long "
24856 "directory listings might cause the protocol message size to be exceeded, "
24857 "causing this call to fail. The caller must split up such requests into "
24858 "smaller groups of names."
24862 #: ../fish/guestfish-actions.pod:2642
24863 msgid "luks-add-key"
24867 #: ../fish/guestfish-actions.pod:2644
24870 " luks-add-key device keyslot\n"
24875 #: ../fish/guestfish-actions.pod:2651
24877 "Note that if C<keyslot> already contains a key, then this command will "
24878 "fail. You have to use L</luks-kill-slot> first to remove that key."
24882 #: ../fish/guestfish-actions.pod:2655 ../fish/guestfish-actions.pod:2677
24883 #: ../fish/guestfish-actions.pod:2690 ../fish/guestfish-actions.pod:2704
24884 #: ../fish/guestfish-actions.pod:2727 ../fish/guestfish-actions.pod:2737
24886 "This command has one or more key or passphrase parameters. Guestfish will "
24887 "prompt for these separately."
24891 #: ../fish/guestfish-actions.pod:2658
24896 #: ../fish/guestfish-actions.pod:2660
24899 " luks-close device\n"
24904 #: ../fish/guestfish-actions.pod:2662
24906 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
24907 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
24908 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
24913 #: ../fish/guestfish-actions.pod:2668
24914 msgid "luks-format"
24918 #: ../fish/guestfish-actions.pod:2670
24921 " luks-format device keyslot\n"
24926 #: ../fish/guestfish-actions.pod:2683
24927 msgid "luks-format-cipher"
24931 #: ../fish/guestfish-actions.pod:2685
24934 " luks-format-cipher device keyslot cipher\n"
24939 #: ../fish/guestfish-actions.pod:2687
24941 "This command is the same as L</luks-format> but it also allows you to set "
24942 "the C<cipher> used."
24946 #: ../fish/guestfish-actions.pod:2696
24947 msgid "luks-kill-slot"
24951 #: ../fish/guestfish-actions.pod:2698
24954 " luks-kill-slot device keyslot\n"
24959 #: ../fish/guestfish-actions.pod:2707
24964 #: ../fish/guestfish-actions.pod:2709
24967 " luks-open device mapname\n"
24972 #: ../fish/guestfish-actions.pod:2723
24974 "If this block device contains LVM volume groups, then calling L</vgscan> "
24975 "followed by L</vg-activate-all> will make them visible."
24979 #: ../fish/guestfish-actions.pod:2730
24980 msgid "luks-open-ro"
24984 #: ../fish/guestfish-actions.pod:2732
24987 " luks-open-ro device mapname\n"
24992 #: ../fish/guestfish-actions.pod:2734
24994 "This is the same as L</luks-open> except that a read-only mapping is created."
24998 #: ../fish/guestfish-actions.pod:2740
25003 #: ../fish/guestfish-actions.pod:2742
25006 " lvcreate logvol volgroup mbytes\n"
25011 #: ../fish/guestfish-actions.pod:2747
25012 msgid "lvm-canonical-lv-name"
25016 #: ../fish/guestfish-actions.pod:2749
25019 " lvm-canonical-lv-name lvname\n"
25024 #: ../fish/guestfish-actions.pod:2758
25025 msgid "See also L</is-lv>."
25029 #: ../fish/guestfish-actions.pod:2760
25030 msgid "lvm-clear-filter"
25034 #: ../fish/guestfish-actions.pod:2762
25037 " lvm-clear-filter\n"
25042 #: ../fish/guestfish-actions.pod:2764
25044 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
25049 #: ../fish/guestfish-actions.pod:2770
25050 msgid "lvm-remove-all"
25054 #: ../fish/guestfish-actions.pod:2772
25057 " lvm-remove-all\n"
25062 #: ../fish/guestfish-actions.pod:2780
25063 msgid "lvm-set-filter"
25067 #: ../fish/guestfish-actions.pod:2782
25070 " lvm-set-filter 'devices ...'\n"
25075 #: ../fish/guestfish-actions.pod:2807
25080 #: ../fish/guestfish-actions.pod:2809
25083 " lvremove device\n"
25088 #: ../fish/guestfish-actions.pod:2817
25093 #: ../fish/guestfish-actions.pod:2819
25096 " lvrename logvol newlogvol\n"
25101 #: ../fish/guestfish-actions.pod:2823
25106 #: ../fish/guestfish-actions.pod:2825
25109 " lvresize device mbytes\n"
25114 #: ../fish/guestfish-actions.pod:2831
25115 msgid "lvresize-free"
25119 #: ../fish/guestfish-actions.pod:2833
25122 " lvresize-free lv percent\n"
25127 #: ../fish/guestfish-actions.pod:2841
25132 #: ../fish/guestfish-actions.pod:2843
25140 #: ../fish/guestfish-actions.pod:2851
25141 msgid "See also L</lvs-full>, L</list-filesystems>."
25145 #: ../fish/guestfish-actions.pod:2853
25150 #: ../fish/guestfish-actions.pod:2855
25158 #: ../fish/guestfish-actions.pod:2860
25163 #: ../fish/guestfish-actions.pod:2862
25171 #: ../fish/guestfish-actions.pod:2866
25176 #: ../fish/guestfish-actions.pod:2868
25179 " lxattrlist path 'names ...'\n"
25184 #: ../fish/guestfish-actions.pod:2884
25186 "This call is intended for programs that want to efficiently list a directory "
25187 "contents without making many round-trips. See also L</lstatlist> for a "
25188 "similarly efficient call for getting standard stats. Very long directory "
25189 "listings might cause the protocol message size to be exceeded, causing this "
25190 "call to fail. The caller must split up such requests into smaller groups of "
25195 #: ../fish/guestfish-actions.pod:2892
25200 #: ../fish/guestfish-actions.pod:2894
25208 #: ../fish/guestfish-actions.pod:2898
25213 #: ../fish/guestfish-actions.pod:2900
25216 " mkdir-mode path mode\n"
25221 #: ../fish/guestfish-actions.pod:2909
25222 msgid "See also L</mkdir>, L</umask>"
25226 #: ../fish/guestfish-actions.pod:2911
25231 #: ../fish/guestfish-actions.pod:2913
25239 #: ../fish/guestfish-actions.pod:2918
25244 #: ../fish/guestfish-actions.pod:2920
25247 " mkdtemp template\n"
25252 #: ../fish/guestfish-actions.pod:2941
25257 #: ../fish/guestfish-actions.pod:2943
25260 " mke2fs-J fstype blocksize device journal\n"
25265 #: ../fish/guestfish-actions.pod:2951
25266 msgid "See also L</mke2journal>."
25270 #: ../fish/guestfish-actions.pod:2953
25275 #: ../fish/guestfish-actions.pod:2955
25278 " mke2fs-JL fstype blocksize device label\n"
25283 #: ../fish/guestfish-actions.pod:2960
25284 msgid "See also L</mke2journal-L>."
25288 #: ../fish/guestfish-actions.pod:2962
25293 #: ../fish/guestfish-actions.pod:2964
25296 " mke2fs-JU fstype blocksize device uuid\n"
25301 #: ../fish/guestfish-actions.pod:2969
25302 msgid "See also L</mke2journal-U>."
25306 #: ../fish/guestfish-actions.pod:2971
25307 msgid "mke2journal"
25311 #: ../fish/guestfish-actions.pod:2973
25314 " mke2journal blocksize device\n"
25319 #: ../fish/guestfish-actions.pod:2980
25320 msgid "mke2journal-L"
25324 #: ../fish/guestfish-actions.pod:2982
25327 " mke2journal-L blocksize label device\n"
25332 #: ../fish/guestfish-actions.pod:2986
25333 msgid "mke2journal-U"
25337 #: ../fish/guestfish-actions.pod:2988
25340 " mke2journal-U blocksize uuid device\n"
25345 #: ../fish/guestfish-actions.pod:2992
25350 #: ../fish/guestfish-actions.pod:2994
25353 " mkfifo mode path\n"
25358 #: ../fish/guestfish-actions.pod:2996
25360 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
25361 "is just a convenient wrapper around L</mknod>."
25365 #: ../fish/guestfish-actions.pod:3002
25370 #: ../fish/guestfish-actions.pod:3004
25373 " mkfs fstype device\n"
25378 #: ../fish/guestfish-actions.pod:3010
25383 #: ../fish/guestfish-actions.pod:3012
25386 " mkfs-b fstype blocksize device\n"
25391 #: ../fish/guestfish-actions.pod:3014
25393 "This call is similar to L</mkfs>, but it allows you to control the block "
25394 "size of the resulting filesystem. Supported block sizes depend on the "
25395 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
25399 #: ../fish/guestfish-actions.pod:3029
25404 #: ../fish/guestfish-actions.pod:3031
25407 " mkfs-opts fstype device [blocksize:..] [features:..]\n"
25412 #: ../fish/guestfish-actions.pod:3066
25413 msgid "mkmountpoint"
25417 #: ../fish/guestfish-actions.pod:3068
25420 " mkmountpoint exemptpath\n"
25425 #: ../fish/guestfish-actions.pod:3070
25427 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
25428 "to create extra mountpoints before mounting the first filesystem."
25432 #: ../fish/guestfish-actions.pod:3094
25434 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
25435 "unexpected errors if you try to mix these calls. It is safest to manually "
25436 "unmount filesystems and remove mountpoints after use."
25440 #: ../fish/guestfish-actions.pod:3098
25442 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
25443 "for this to work for manual mountpoints, you must ensure that the innermost "
25444 "mountpoints have the longest pathnames, as in the example code above."
25448 #: ../fish/guestfish-actions.pod:3105
25450 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
25451 "L</umount-all> to be called when the handle is closed which can also trigger "
25456 #: ../fish/guestfish-actions.pod:3109
25461 #: ../fish/guestfish-actions.pod:3111
25464 " mknod mode devmajor devminor path\n"
25469 #: ../fish/guestfish-actions.pod:3121
25471 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
25472 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
25473 "regular file). These constants are available in the standard Linux header "
25474 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
25475 "wrappers around this command which bitwise OR in the appropriate constant "
25480 #: ../fish/guestfish-actions.pod:3131
25485 #: ../fish/guestfish-actions.pod:3133
25488 " mknod-b mode devmajor devminor path\n"
25493 #: ../fish/guestfish-actions.pod:3135
25495 "This call creates a block device node called C<path> with mode C<mode> and "
25496 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
25497 "wrapper around L</mknod>."
25501 #: ../fish/guestfish-actions.pod:3141
25506 #: ../fish/guestfish-actions.pod:3143
25509 " mknod-c mode devmajor devminor path\n"
25514 #: ../fish/guestfish-actions.pod:3145
25516 "This call creates a char device node called C<path> with mode C<mode> and "
25517 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
25518 "wrapper around L</mknod>."
25522 #: ../fish/guestfish-actions.pod:3151
25527 #: ../fish/guestfish-actions.pod:3153
25535 #: ../fish/guestfish-actions.pod:3157
25540 #: ../fish/guestfish-actions.pod:3159
25543 " mkswap-L label device\n"
25548 #: ../fish/guestfish-actions.pod:3167
25553 #: ../fish/guestfish-actions.pod:3169
25556 " mkswap-U uuid device\n"
25561 #: ../fish/guestfish-actions.pod:3173
25562 msgid "mkswap-file"
25566 #: ../fish/guestfish-actions.pod:3175
25569 " mkswap-file path\n"
25574 #: ../fish/guestfish-actions.pod:3179
25576 "This command just writes a swap file signature to an existing file. To "
25577 "create the file itself, use something like L</fallocate>."
25581 #: ../fish/guestfish-actions.pod:3182
25586 #: ../fish/guestfish-actions.pod:3184
25589 " modprobe modulename\n"
25594 #: ../fish/guestfish-actions.pod:3191
25599 #: ../fish/guestfish-actions.pod:3193
25602 " mount device mountpoint\n"
25607 #: ../fish/guestfish-actions.pod:3209
25609 "B<Important note:> When you use this call, the filesystem options C<sync> "
25610 "and C<noatime> are set implicitly. This was originally done because we "
25611 "thought it would improve reliability, but it turns out that I<-o sync> has a "
25612 "very large negative performance impact and negligible effect on "
25613 "reliability. Therefore we recommend that you avoid using L</mount> in any "
25614 "code that needs performance, and instead use L</mount-options> (use an empty "
25615 "string for the first parameter if you don't want any options)."
25619 #: ../fish/guestfish-actions.pod:3226
25624 #: ../fish/guestfish-actions.pod:3228
25627 " mount-loop file mountpoint\n"
25632 #: ../fish/guestfish-actions.pod:3234
25633 msgid "mount-options"
25637 #: ../fish/guestfish-actions.pod:3236
25640 " mount-options options device mountpoint\n"
25645 #: ../fish/guestfish-actions.pod:3238
25647 "This is the same as the L</mount> command, but it allows you to set the "
25648 "mount options as for the L<mount(8)> I<-o> flag."
25652 #: ../fish/guestfish-actions.pod:3246
25657 #: ../fish/guestfish-actions.pod:3248
25660 " mount-ro device mountpoint\n"
25665 #: ../fish/guestfish-actions.pod:3250
25667 "This is the same as the L</mount> command, but it mounts the filesystem with "
25668 "the read-only (I<-o ro>) flag."
25672 #: ../fish/guestfish-actions.pod:3253
25677 #: ../fish/guestfish-actions.pod:3255
25680 " mount-vfs options vfstype device mountpoint\n"
25685 #: ../fish/guestfish-actions.pod:3257
25687 "This is the same as the L</mount> command, but it allows you to set both the "
25688 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
25692 #: ../fish/guestfish-actions.pod:3261
25693 msgid "mountpoints"
25697 #: ../fish/guestfish-actions.pod:3263
25705 #: ../fish/guestfish-actions.pod:3265
25707 "This call is similar to L</mounts>. That call returns a list of devices. "
25708 "This one returns a hash table (map) of device name to directory where the "
25709 "device is mounted."
25713 #: ../fish/guestfish-actions.pod:3269
25718 #: ../fish/guestfish-actions.pod:3271
25726 #: ../fish/guestfish-actions.pod:3278
25727 msgid "See also: L</mountpoints>"
25731 #: ../fish/guestfish-actions.pod:3280
25736 #: ../fish/guestfish-actions.pod:3282
25744 #: ../fish/guestfish-actions.pod:3287
25745 msgid "ntfs-3g-probe"
25749 #: ../fish/guestfish-actions.pod:3289
25752 " ntfs-3g-probe true|false device\n"
25757 #: ../fish/guestfish-actions.pod:3303
25762 #: ../fish/guestfish-actions.pod:3305
25765 " ntfsresize device\n"
25770 #: ../fish/guestfish-actions.pod:3311
25771 msgid "ntfsresize-size"
25775 #: ../fish/guestfish-actions.pod:3313
25778 " ntfsresize-size device size\n"
25783 #: ../fish/guestfish-actions.pod:3315
25785 "This command is the same as L</ntfsresize> except that it allows you to "
25786 "specify the new size (in bytes) explicitly."
25790 #: ../fish/guestfish-actions.pod:3318
25795 #: ../fish/guestfish-actions.pod:3320
25798 " part-add device prlogex startsect endsect\n"
25803 #: ../fish/guestfish-actions.pod:3322
25805 "This command adds a partition to C<device>. If there is no partition table "
25806 "on the device, call L</part-init> first."
25810 #: ../fish/guestfish-actions.pod:3334
25812 "Creating a partition which covers the whole disk is not so easy. Use L</"
25813 "part-disk> to do that."
25817 #: ../fish/guestfish-actions.pod:3337
25822 #: ../fish/guestfish-actions.pod:3339
25825 " part-del device partnum\n"
25830 #: ../fish/guestfish-actions.pod:3347
25835 #: ../fish/guestfish-actions.pod:3349
25838 " part-disk device parttype\n"
25843 #: ../fish/guestfish-actions.pod:3351
25845 "This command is simply a combination of L</part-init> followed by L</part-"
25846 "add> to create a single primary partition covering the whole disk."
25850 #: ../fish/guestfish-actions.pod:3355
25852 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
25853 "possible values are described in L</part-init>."
25857 #: ../fish/guestfish-actions.pod:3361
25858 msgid "part-get-bootable"
25862 #: ../fish/guestfish-actions.pod:3363
25865 " part-get-bootable device partnum\n"
25870 #: ../fish/guestfish-actions.pod:3368
25871 msgid "See also L</part-set-bootable>."
25875 #: ../fish/guestfish-actions.pod:3370
25876 msgid "part-get-mbr-id"
25880 #: ../fish/guestfish-actions.pod:3372
25883 " part-get-mbr-id device partnum\n"
25888 #: ../fish/guestfish-actions.pod:3377 ../fish/guestfish-actions.pod:3515
25890 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
25891 "undefined results for other partition table types (see L</part-get-"
25896 #: ../fish/guestfish-actions.pod:3381
25897 msgid "part-get-parttype"
25901 #: ../fish/guestfish-actions.pod:3383
25904 " part-get-parttype device\n"
25909 #: ../fish/guestfish-actions.pod:3388
25911 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
25912 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
25913 "possible, although unusual. See L</part-init> for a full list."
25917 #: ../fish/guestfish-actions.pod:3393
25922 #: ../fish/guestfish-actions.pod:3395
25925 " part-init device parttype\n"
25930 #: ../fish/guestfish-actions.pod:3401
25932 "Initially there are no partitions. Following this, you should call L</part-"
25933 "add> for each partition required."
25937 #: ../fish/guestfish-actions.pod:3464
25942 #: ../fish/guestfish-actions.pod:3466
25945 " part-list device\n"
25950 #: ../fish/guestfish-actions.pod:3481
25952 "Start of the partition I<in bytes>. To get sectors you have to divide by "
25953 "the device's sector size, see L</blockdev-getss>."
25957 #: ../fish/guestfish-actions.pod:3494
25958 msgid "part-set-bootable"
25962 #: ../fish/guestfish-actions.pod:3496
25965 " part-set-bootable device partnum true|false\n"
25970 #: ../fish/guestfish-actions.pod:3505
25971 msgid "part-set-mbr-id"
25975 #: ../fish/guestfish-actions.pod:3507
25978 " part-set-mbr-id device partnum idbyte\n"
25983 #: ../fish/guestfish-actions.pod:3519
25984 msgid "part-set-name"
25988 #: ../fish/guestfish-actions.pod:3521
25991 " part-set-name device partnum name\n"
25996 #: ../fish/guestfish-actions.pod:3529
25997 msgid "part-to-dev"
26001 #: ../fish/guestfish-actions.pod:3531
26004 " part-to-dev partition\n"
26009 #: ../fish/guestfish-actions.pod:3537
26011 "The named partition must exist, for example as a string returned from L</"
26012 "list-partitions>."
26016 #: ../fish/guestfish-actions.pod:3540
26017 msgid "ping-daemon"
26021 #: ../fish/guestfish-actions.pod:3542
26029 #: ../fish/guestfish-actions.pod:3549
26034 #: ../fish/guestfish-actions.pod:3551
26037 " pread path count offset\n"
26042 #: ../fish/guestfish-actions.pod:3559
26043 msgid "See also L</pwrite>, L</pread-device>."
26047 #: ../fish/guestfish-actions.pod:3564
26048 msgid "pread-device"
26052 #: ../fish/guestfish-actions.pod:3566
26055 " pread-device device count offset\n"
26060 #: ../fish/guestfish-actions.pod:3574
26061 msgid "See also L</pread>."
26065 #: ../fish/guestfish-actions.pod:3579
26070 #: ../fish/guestfish-actions.pod:3581
26073 " pvcreate device\n"
26078 #: ../fish/guestfish-actions.pod:3587
26083 #: ../fish/guestfish-actions.pod:3589
26086 " pvremove device\n"
26091 #: ../fish/guestfish-actions.pod:3598
26096 #: ../fish/guestfish-actions.pod:3600
26099 " pvresize device\n"
26104 #: ../fish/guestfish-actions.pod:3605
26105 msgid "pvresize-size"
26109 #: ../fish/guestfish-actions.pod:3607
26112 " pvresize-size device size\n"
26117 #: ../fish/guestfish-actions.pod:3609
26119 "This command is the same as L</pvresize> except that it allows you to "
26120 "specify the new size (in bytes) explicitly."
26124 #: ../fish/guestfish-actions.pod:3612
26129 #: ../fish/guestfish-actions.pod:3614
26137 #: ../fish/guestfish-actions.pod:3622
26138 msgid "See also L</pvs-full>."
26142 #: ../fish/guestfish-actions.pod:3624
26147 #: ../fish/guestfish-actions.pod:3626
26155 #: ../fish/guestfish-actions.pod:3631
26160 #: ../fish/guestfish-actions.pod:3633
26168 #: ../fish/guestfish-actions.pod:3637
26173 #: ../fish/guestfish-actions.pod:3639
26176 " pwrite path content offset\n"
26181 #: ../fish/guestfish-actions.pod:3650
26182 msgid "See also L</pread>, L</pwrite-device>."
26186 #: ../fish/guestfish-actions.pod:3655
26187 msgid "pwrite-device"
26191 #: ../fish/guestfish-actions.pod:3657
26194 " pwrite-device device content offset\n"
26199 #: ../fish/guestfish-actions.pod:3667
26200 msgid "See also L</pwrite>."
26204 #: ../fish/guestfish-actions.pod:3672
26209 #: ../fish/guestfish-actions.pod:3674
26212 " read-file path\n"
26217 #: ../fish/guestfish-actions.pod:3679
26219 "Unlike L</cat>, this function can correctly handle files that contain "
26220 "embedded ASCII NUL characters. However unlike L</download>, this function "
26221 "is limited in the total size of file that can be handled."
26225 #: ../fish/guestfish-actions.pod:3687
26230 #: ../fish/guestfish-actions.pod:3689
26233 " read-lines path\n"
26238 #: ../fish/guestfish-actions.pod:3696
26240 "Note that this function cannot correctly handle binary files (specifically, "
26241 "files containing C<\\0> character which is treated as end of line). For "
26242 "those you need to use the L</read-file> function which has a more complex "
26247 #: ../fish/guestfish-actions.pod:3701
26252 #: ../fish/guestfish-actions.pod:3703
26260 #: ../fish/guestfish-actions.pod:3755
26262 "This function is primarily intended for use by programs. To get a simple "
26263 "list of names, use L</ls>. To get a printable directory for human "
26264 "consumption, use L</ll>."
26268 #: ../fish/guestfish-actions.pod:3759
26273 #: ../fish/guestfish-actions.pod:3761
26281 #: ../fish/guestfish-actions.pod:3765
26282 msgid "readlinklist"
26286 #: ../fish/guestfish-actions.pod:3767
26289 " readlinklist path 'names ...'\n"
26294 #: ../fish/guestfish-actions.pod:3791
26299 #: ../fish/guestfish-actions.pod:3793
26307 #: ../fish/guestfish-actions.pod:3798
26308 msgid "removexattr"
26312 #: ../fish/guestfish-actions.pod:3800
26315 " removexattr xattr path\n"
26320 #: ../fish/guestfish-actions.pod:3805
26321 msgid "See also: L</lremovexattr>, L<attr(5)>."
26325 #: ../fish/guestfish-actions.pod:3807
26330 #: ../fish/guestfish-actions.pod:3809
26333 " resize2fs device\n"
26338 #: ../fish/guestfish-actions.pod:3814
26340 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
26341 "before calling this command. For unknown reasons C<resize2fs> sometimes "
26342 "gives an error about this and sometimes not. In any case, it is always safe "
26343 "to call L</e2fsck-f> before calling this function."
26347 #: ../fish/guestfish-actions.pod:3820
26348 msgid "resize2fs-M"
26352 #: ../fish/guestfish-actions.pod:3822
26355 " resize2fs-M device\n"
26360 #: ../fish/guestfish-actions.pod:3824
26362 "This command is the same as L</resize2fs>, but the filesystem is resized to "
26363 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
26368 #: ../fish/guestfish-actions.pod:3828
26370 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
26371 "and read the C<Block size> and C<Block count> values. These two numbers, "
26372 "multiplied together, give the resulting size of the minimal filesystem in "
26377 #: ../fish/guestfish-actions.pod:3833
26378 msgid "resize2fs-size"
26382 #: ../fish/guestfish-actions.pod:3835
26385 " resize2fs-size device size\n"
26390 #: ../fish/guestfish-actions.pod:3837
26392 "This command is the same as L</resize2fs> except that it allows you to "
26393 "specify the new size (in bytes) explicitly."
26397 #: ../fish/guestfish-actions.pod:3840
26402 #: ../fish/guestfish-actions.pod:3842
26410 #: ../fish/guestfish-actions.pod:3846
26415 #: ../fish/guestfish-actions.pod:3848
26423 #: ../fish/guestfish-actions.pod:3854
26428 #: ../fish/guestfish-actions.pod:3856
26436 #: ../fish/guestfish-actions.pod:3860
26437 msgid "rmmountpoint"
26441 #: ../fish/guestfish-actions.pod:3862
26444 " rmmountpoint exemptpath\n"
26449 #: ../fish/guestfish-actions.pod:3864
26451 "This calls removes a mountpoint that was previously created with L</"
26452 "mkmountpoint>. See L</mkmountpoint> for full details."
26456 #: ../fish/guestfish-actions.pod:3868
26457 msgid "scrub-device"
26461 #: ../fish/guestfish-actions.pod:3870
26464 " scrub-device device\n"
26469 #: ../fish/guestfish-actions.pod:3881
26474 #: ../fish/guestfish-actions.pod:3883
26477 " scrub-file file\n"
26482 #: ../fish/guestfish-actions.pod:3893
26483 msgid "scrub-freespace"
26487 #: ../fish/guestfish-actions.pod:3895
26490 " scrub-freespace dir\n"
26495 #: ../fish/guestfish-actions.pod:3897
26497 "This command creates the directory C<dir> and then fills it with files until "
26498 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
26499 "deletes them. The intention is to scrub any free space on the partition "
26500 "containing C<dir>."
26504 #: ../fish/guestfish-actions.pod:3906
26509 #: ../fish/guestfish-actions.pod:3908
26514 #: ../fish/guestfish-actions.pod:3910
26517 " set-append append\n"
26522 #: ../fish/guestfish-actions.pod:3921
26523 msgid "set-attach-method"
26527 #: ../fish/guestfish-actions.pod:3923
26528 msgid "attach-method"
26532 #: ../fish/guestfish-actions.pod:3925
26535 " set-attach-method attachmethod\n"
26540 #: ../fish/guestfish-actions.pod:3947
26541 msgid "set-autosync"
26545 #: ../fish/guestfish-actions.pod:3949
26550 #: ../fish/guestfish-actions.pod:3951
26553 " set-autosync true|false\n"
26558 #: ../fish/guestfish-actions.pod:3961
26563 #: ../fish/guestfish-actions.pod:3963
26568 #: ../fish/guestfish-actions.pod:3965
26571 " set-direct true|false\n"
26576 #: ../fish/guestfish-actions.pod:3971
26578 "One consequence of this is that log messages aren't caught by the library "
26579 "and handled by L</set-log-message-callback>, but go straight to stdout."
26583 #: ../fish/guestfish-actions.pod:3980
26584 msgid "set-e2label"
26588 #: ../fish/guestfish-actions.pod:3982
26591 " set-e2label device label\n"
26596 #: ../fish/guestfish-actions.pod:3988
26598 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
26599 "label on a filesystem."
26603 #: ../fish/guestfish-actions.pod:3991
26608 #: ../fish/guestfish-actions.pod:3993
26611 " set-e2uuid device uuid\n"
26616 #: ../fish/guestfish-actions.pod:4000
26618 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
26619 "UUID of a filesystem."
26623 #: ../fish/guestfish-actions.pod:4003
26624 msgid "set-memsize"
26628 #: ../fish/guestfish-actions.pod:4005
26633 #: ../fish/guestfish-actions.pod:4007
26636 " set-memsize memsize\n"
26641 #: ../fish/guestfish-actions.pod:4009
26643 "This sets the memory size in megabytes allocated to the qemu subprocess. "
26644 "This only has any effect if called before L</launch>."
26648 #: ../fish/guestfish-actions.pod:4020
26649 msgid "set-network"
26653 #: ../fish/guestfish-actions.pod:4022
26658 #: ../fish/guestfish-actions.pod:4024
26661 " set-network true|false\n"
26666 #: ../fish/guestfish-actions.pod:4032
26668 "You must call this before calling L</launch>, otherwise it has no effect."
26672 #: ../fish/guestfish-actions.pod:4035
26677 #: ../fish/guestfish-actions.pod:4037
26682 #: ../fish/guestfish-actions.pod:4039
26685 " set-path searchpath\n"
26690 #: ../fish/guestfish-actions.pod:4048
26695 #: ../fish/guestfish-actions.pod:4050
26700 #: ../fish/guestfish-actions.pod:4052
26708 #: ../fish/guestfish-actions.pod:4072
26709 msgid "set-recovery-proc"
26713 #: ../fish/guestfish-actions.pod:4074
26714 msgid "recovery-proc"
26718 #: ../fish/guestfish-actions.pod:4076
26721 " set-recovery-proc true|false\n"
26726 #: ../fish/guestfish-actions.pod:4078
26728 "If this is called with the parameter C<false> then L</launch> does not "
26729 "create a recovery process. The purpose of the recovery process is to stop "
26730 "runaway qemu processes in the case where the main program aborts abruptly."
26734 #: ../fish/guestfish-actions.pod:4083
26736 "This only has any effect if called before L</launch>, and the default is "
26741 #: ../fish/guestfish-actions.pod:4092
26742 msgid "set-selinux"
26746 #: ../fish/guestfish-actions.pod:4094
26751 #: ../fish/guestfish-actions.pod:4096
26754 " set-selinux true|false\n"
26759 #: ../fish/guestfish-actions.pod:4107
26764 #: ../fish/guestfish-actions.pod:4109
26769 #: ../fish/guestfish-actions.pod:4111
26772 " set-trace true|false\n"
26777 #: ../fish/guestfish-actions.pod:4123
26779 "Trace messages are normally sent to C<stderr>, unless you register a "
26780 "callback to send them somewhere else (see L</set-event-callback>)."
26784 #: ../fish/guestfish-actions.pod:4127
26785 msgid "set-verbose"
26789 #: ../fish/guestfish-actions.pod:4129
26794 #: ../fish/guestfish-actions.pod:4131
26797 " set-verbose true|false\n"
26802 #: ../fish/guestfish-actions.pod:4138
26804 "Verbose messages are normally sent to C<stderr>, unless you register a "
26805 "callback to send them somewhere else (see L</set-event-callback>)."
26809 #: ../fish/guestfish-actions.pod:4142
26814 #: ../fish/guestfish-actions.pod:4144
26817 " setcon context\n"
26822 #: ../fish/guestfish-actions.pod:4151
26827 #: ../fish/guestfish-actions.pod:4153
26830 " setxattr xattr val vallen path\n"
26835 #: ../fish/guestfish-actions.pod:4159
26836 msgid "See also: L</lsetxattr>, L<attr(5)>."
26840 #: ../fish/guestfish-actions.pod:4161
26845 #: ../fish/guestfish-actions.pod:4163
26848 " sfdisk device cyls heads sectors 'lines ...'\n"
26853 #: ../fish/guestfish-actions.pod:4185
26854 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
26858 #: ../fish/guestfish-actions.pod:4198
26863 #: ../fish/guestfish-actions.pod:4200
26866 " sfdiskM device 'lines ...'\n"
26871 #: ../fish/guestfish-actions.pod:4202
26873 "This is a simplified interface to the L</sfdisk> command, where partition "
26874 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
26875 "you don't need to specify the cyls, heads and sectors parameters which were "
26876 "rarely if ever used anyway."
26880 #: ../fish/guestfish-actions.pod:4208
26881 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
26885 #: ../fish/guestfish-actions.pod:4221
26890 #: ../fish/guestfish-actions.pod:4223
26893 " sfdisk-N device partnum cyls heads sectors line\n"
26898 #: ../fish/guestfish-actions.pod:4228
26900 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
26901 "cyls/heads/sectors parameters."
26905 #: ../fish/guestfish-actions.pod:4231
26906 msgid "See also: L</part-add>"
26910 #: ../fish/guestfish-actions.pod:4243
26911 msgid "sfdisk-disk-geometry"
26915 #: ../fish/guestfish-actions.pod:4245
26918 " sfdisk-disk-geometry device\n"
26923 #: ../fish/guestfish-actions.pod:4247
26925 "This displays the disk geometry of C<device> read from the partition table. "
26926 "Especially in the case where the underlying block device has been resized, "
26927 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
26928 "kernel-geometry>)."
26932 #: ../fish/guestfish-actions.pod:4255
26933 msgid "sfdisk-kernel-geometry"
26937 #: ../fish/guestfish-actions.pod:4257
26940 " sfdisk-kernel-geometry device\n"
26945 #: ../fish/guestfish-actions.pod:4264
26950 #: ../fish/guestfish-actions.pod:4266
26953 " sfdisk-l device\n"
26958 #: ../fish/guestfish-actions.pod:4272
26959 msgid "See also: L</part-list>"
26963 #: ../fish/guestfish-actions.pod:4281
26968 #: ../fish/guestfish-actions.pod:4283
26976 #: ../fish/guestfish-actions.pod:4288
26977 msgid "This is like L</command>, but passes the command to:"
26981 #: ../fish/guestfish-actions.pod:4296
26982 msgid "All the provisos about L</command> apply to this call."
26986 #: ../fish/guestfish-actions.pod:4298
26991 #: ../fish/guestfish-actions.pod:4300
26994 " sh-lines command\n"
26999 #: ../fish/guestfish-actions.pod:4302
27000 msgid "This is the same as L</sh>, but splits the result into a list of lines."
27004 #: ../fish/guestfish-actions.pod:4305
27005 msgid "See also: L</command-lines>"
27009 #: ../fish/guestfish-actions.pod:4307
27014 #: ../fish/guestfish-actions.pod:4309
27022 #: ../fish/guestfish-actions.pod:4313
27027 #: ../fish/guestfish-actions.pod:4315
27035 #: ../fish/guestfish-actions.pod:4321
27040 #: ../fish/guestfish-actions.pod:4323
27048 #: ../fish/guestfish-actions.pod:4331
27053 #: ../fish/guestfish-actions.pod:4333
27061 #: ../fish/guestfish-actions.pod:4341
27066 #: ../fish/guestfish-actions.pod:4343
27069 " strings-e encoding path\n"
27074 #: ../fish/guestfish-actions.pod:4345
27076 "This is like the L</strings> command, but allows you to specify the encoding "
27077 "of strings that are looked for in the source file C<path>."
27081 #: ../fish/guestfish-actions.pod:4355
27083 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
27084 "ISO-8859-X (this is what L</strings> uses)."
27088 #: ../fish/guestfish-actions.pod:4387
27089 msgid "swapoff-device"
27093 #: ../fish/guestfish-actions.pod:4389
27096 " swapoff-device device\n"
27101 #: ../fish/guestfish-actions.pod:4391
27103 "This command disables the libguestfs appliance swap device or partition "
27104 "named C<device>. See L</swapon-device>."
27108 #: ../fish/guestfish-actions.pod:4395
27109 msgid "swapoff-file"
27113 #: ../fish/guestfish-actions.pod:4397
27116 " swapoff-file file\n"
27121 #: ../fish/guestfish-actions.pod:4401
27122 msgid "swapoff-label"
27126 #: ../fish/guestfish-actions.pod:4403
27129 " swapoff-label label\n"
27134 #: ../fish/guestfish-actions.pod:4408
27135 msgid "swapoff-uuid"
27139 #: ../fish/guestfish-actions.pod:4410
27142 " swapoff-uuid uuid\n"
27147 #: ../fish/guestfish-actions.pod:4415
27148 msgid "swapon-device"
27152 #: ../fish/guestfish-actions.pod:4417
27155 " swapon-device device\n"
27160 #: ../fish/guestfish-actions.pod:4419
27162 "This command enables the libguestfs appliance to use the swap device or "
27163 "partition named C<device>. The increased memory is made available for all "
27164 "commands, for example those run using L</command> or L</sh>."
27168 #: ../fish/guestfish-actions.pod:4431
27169 msgid "swapon-file"
27173 #: ../fish/guestfish-actions.pod:4433
27176 " swapon-file file\n"
27181 #: ../fish/guestfish-actions.pod:4435
27183 "This command enables swap to a file. See L</swapon-device> for other notes."
27187 #: ../fish/guestfish-actions.pod:4438
27188 msgid "swapon-label"
27192 #: ../fish/guestfish-actions.pod:4440
27195 " swapon-label label\n"
27200 #: ../fish/guestfish-actions.pod:4442
27202 "This command enables swap to a labeled swap partition. See L</swapon-"
27203 "device> for other notes."
27207 #: ../fish/guestfish-actions.pod:4445
27208 msgid "swapon-uuid"
27212 #: ../fish/guestfish-actions.pod:4447
27215 " swapon-uuid uuid\n"
27220 #: ../fish/guestfish-actions.pod:4449
27222 "This command enables swap to a swap partition with the given UUID. See L</"
27223 "swapon-device> for other notes."
27227 #: ../fish/guestfish-actions.pod:4452
27232 #: ../fish/guestfish-actions.pod:4454
27240 #: ../fish/guestfish-actions.pod:4462
27245 #: ../fish/guestfish-actions.pod:4464
27253 #: ../fish/guestfish-actions.pod:4472
27258 #: ../fish/guestfish-actions.pod:4474
27261 " tail-n nrlines path\n"
27266 #: ../fish/guestfish-actions.pod:4487
27271 #: ../fish/guestfish-actions.pod:4489
27274 " tar-in (tarfile|-) directory\n"
27279 #: ../fish/guestfish-actions.pod:4494
27280 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
27284 #: ../fish/guestfish-actions.pod:4499
27289 #: ../fish/guestfish-actions.pod:4501
27292 " tar-out directory (tarfile|-)\n"
27297 #: ../fish/guestfish-actions.pod:4506
27298 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
27302 #: ../fish/guestfish-actions.pod:4511
27307 #: ../fish/guestfish-actions.pod:4513
27310 " tgz-in (tarball|-) directory\n"
27315 #: ../fish/guestfish-actions.pod:4518
27316 msgid "To upload an uncompressed tarball, use L</tar-in>."
27320 #: ../fish/guestfish-actions.pod:4522
27325 #: ../fish/guestfish-actions.pod:4524
27328 " tgz-out directory (tarball|-)\n"
27333 #: ../fish/guestfish-actions.pod:4529
27334 msgid "To download an uncompressed tarball, use L</tar-out>."
27338 #: ../fish/guestfish-actions.pod:4533
27343 #: ../fish/guestfish-actions.pod:4535
27351 #: ../fish/guestfish-actions.pod:4544
27356 #: ../fish/guestfish-actions.pod:4546
27364 #: ../fish/guestfish-actions.pod:4551
27365 msgid "truncate-size"
27369 #: ../fish/guestfish-actions.pod:4553
27372 " truncate-size path size\n"
27377 #: ../fish/guestfish-actions.pod:4558
27379 "If the current file size is less than C<size> then the file is extended to "
27380 "the required size with zero bytes. This creates a sparse file (ie. disk "
27381 "blocks are not allocated for the file until you write to it). To create a "
27382 "non-sparse file of zeroes, use L</fallocate64> instead."
27386 #: ../fish/guestfish-actions.pod:4564
27391 #: ../fish/guestfish-actions.pod:4566
27394 " tune2fs-l device\n"
27399 #: ../fish/guestfish-actions.pod:4576
27404 #: ../fish/guestfish-actions.pod:4578
27407 " txz-in (tarball|-) directory\n"
27412 #: ../fish/guestfish-actions.pod:4585
27417 #: ../fish/guestfish-actions.pod:4587
27420 " txz-out directory (tarball|-)\n"
27425 #: ../fish/guestfish-actions.pod:4594
27430 #: ../fish/guestfish-actions.pod:4596
27438 #: ../fish/guestfish-actions.pod:4610
27439 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
27443 #: ../fish/guestfish-actions.pod:4615
27448 #: ../fish/guestfish-actions.pod:4617
27453 #: ../fish/guestfish-actions.pod:4619
27456 " umount pathordevice\n"
27461 #: ../fish/guestfish-actions.pod:4625
27466 #: ../fish/guestfish-actions.pod:4627
27467 msgid "unmount-all"
27471 #: ../fish/guestfish-actions.pod:4629
27479 #: ../fish/guestfish-actions.pod:4635
27484 #: ../fish/guestfish-actions.pod:4637
27487 " upload (filename|-) remotefilename\n"
27492 #: ../fish/guestfish-actions.pod:4644
27493 msgid "See also L</download>."
27497 #: ../fish/guestfish-actions.pod:4648
27498 msgid "upload-offset"
27502 #: ../fish/guestfish-actions.pod:4650
27505 " upload-offset (filename|-) remotefilename offset\n"
27510 #: ../fish/guestfish-actions.pod:4662
27512 "Note that there is no limit on the amount of data that can be uploaded with "
27513 "this call, unlike with L</pwrite>, and this call always writes the full "
27514 "amount unless an error occurs."
27518 #: ../fish/guestfish-actions.pod:4667
27519 msgid "See also L</upload>, L</pwrite>."
27523 #: ../fish/guestfish-actions.pod:4671
27528 #: ../fish/guestfish-actions.pod:4673
27531 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
27536 #: ../fish/guestfish-actions.pod:4692
27541 #: ../fish/guestfish-actions.pod:4694
27549 #: ../fish/guestfish-actions.pod:4721
27551 "I<Note:> Don't use this call to test for availability of features. In "
27552 "enterprise distributions we backport features from later versions into "
27553 "earlier versions, making this an unreliable way to test for features. Use "
27554 "L</available> instead."
27558 #: ../fish/guestfish-actions.pod:4727
27563 #: ../fish/guestfish-actions.pod:4729
27566 " vfs-label device\n"
27571 #: ../fish/guestfish-actions.pod:4736
27572 msgid "To find a filesystem from the label, use L</findfs-label>."
27576 #: ../fish/guestfish-actions.pod:4738
27581 #: ../fish/guestfish-actions.pod:4740
27584 " vfs-type device\n"
27589 #: ../fish/guestfish-actions.pod:4750
27594 #: ../fish/guestfish-actions.pod:4752
27597 " vfs-uuid device\n"
27602 #: ../fish/guestfish-actions.pod:4759
27603 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
27607 #: ../fish/guestfish-actions.pod:4761
27608 msgid "vg-activate"
27612 #: ../fish/guestfish-actions.pod:4763
27615 " vg-activate true|false 'volgroups ...'\n"
27620 #: ../fish/guestfish-actions.pod:4776
27621 msgid "vg-activate-all"
27625 #: ../fish/guestfish-actions.pod:4778
27628 " vg-activate-all true|false\n"
27633 #: ../fish/guestfish-actions.pod:4788
27638 #: ../fish/guestfish-actions.pod:4790
27641 " vgcreate volgroup 'physvols ...'\n"
27646 #: ../fish/guestfish-actions.pod:4795
27651 #: ../fish/guestfish-actions.pod:4797
27654 " vglvuuids vgname\n"
27659 #: ../fish/guestfish-actions.pod:4802
27661 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
27662 "logical volumes and volume groups."
27666 #: ../fish/guestfish-actions.pod:4805
27667 msgid "See also L</vgpvuuids>."
27671 #: ../fish/guestfish-actions.pod:4807
27676 #: ../fish/guestfish-actions.pod:4809
27679 " vgpvuuids vgname\n"
27684 #: ../fish/guestfish-actions.pod:4814
27686 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
27687 "physical volumes and volume groups."
27691 #: ../fish/guestfish-actions.pod:4817
27692 msgid "See also L</vglvuuids>."
27696 #: ../fish/guestfish-actions.pod:4819
27701 #: ../fish/guestfish-actions.pod:4821
27704 " vgremove vgname\n"
27709 #: ../fish/guestfish-actions.pod:4828
27714 #: ../fish/guestfish-actions.pod:4830
27717 " vgrename volgroup newvolgroup\n"
27722 #: ../fish/guestfish-actions.pod:4834
27727 #: ../fish/guestfish-actions.pod:4836
27735 #: ../fish/guestfish-actions.pod:4844
27736 msgid "See also L</vgs-full>."
27740 #: ../fish/guestfish-actions.pod:4846
27745 #: ../fish/guestfish-actions.pod:4848
27753 #: ../fish/guestfish-actions.pod:4853
27758 #: ../fish/guestfish-actions.pod:4855
27766 #: ../fish/guestfish-actions.pod:4860
27771 #: ../fish/guestfish-actions.pod:4862
27779 #: ../fish/guestfish-actions.pod:4866
27784 #: ../fish/guestfish-actions.pod:4868
27792 #: ../fish/guestfish-actions.pod:4873
27797 #: ../fish/guestfish-actions.pod:4875
27805 #: ../fish/guestfish-actions.pod:4880
27810 #: ../fish/guestfish-actions.pod:4882
27818 #: ../fish/guestfish-actions.pod:4887
27823 #: ../fish/guestfish-actions.pod:4889
27826 " write path content\n"
27831 #: ../fish/guestfish-actions.pod:4897
27836 #: ../fish/guestfish-actions.pod:4899
27839 " write-file path content size\n"
27844 #: ../fish/guestfish-actions.pod:4922
27849 #: ../fish/guestfish-actions.pod:4924
27852 " zegrep regex path\n"
27857 #: ../fish/guestfish-actions.pod:4932
27862 #: ../fish/guestfish-actions.pod:4934
27865 " zegrepi regex path\n"
27870 #: ../fish/guestfish-actions.pod:4942
27875 #: ../fish/guestfish-actions.pod:4944
27883 #: ../fish/guestfish-actions.pod:4952
27884 msgid "See also: L</zero-device>, L</scrub-device>, L</is-zero-device>"
27888 #: ../fish/guestfish-actions.pod:4955
27889 msgid "zero-device"
27893 #: ../fish/guestfish-actions.pod:4957
27896 " zero-device device\n"
27901 #: ../fish/guestfish-actions.pod:4959
27903 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
27904 "which just zeroes the first few blocks of a device."
27908 #: ../fish/guestfish-actions.pod:4966
27913 #: ../fish/guestfish-actions.pod:4968
27916 " zerofree device\n"
27921 #: ../fish/guestfish-actions.pod:4981
27926 #: ../fish/guestfish-actions.pod:4983
27929 " zfgrep pattern path\n"
27934 #: ../fish/guestfish-actions.pod:4991
27939 #: ../fish/guestfish-actions.pod:4993
27942 " zfgrepi pattern path\n"
27947 #: ../fish/guestfish-actions.pod:5001
27952 #: ../fish/guestfish-actions.pod:5003
27955 " zfile meth path\n"
27960 #: ../fish/guestfish-actions.pod:5010
27962 "Since 1.0.63, use L</file> instead which can now process compressed files."
27966 #: ../fish/guestfish-actions.pod:5020
27971 #: ../fish/guestfish-actions.pod:5022
27974 " zgrep regex path\n"
27979 #: ../fish/guestfish-actions.pod:5030
27984 #: ../fish/guestfish-actions.pod:5032
27987 " zgrepi regex path\n"
27992 #: ../fish/guestfish-commands.pod:1
27997 #: ../fish/guestfish-commands.pod:3
28002 #: ../fish/guestfish-commands.pod:5
28005 " alloc filename size\n"
28010 #: ../fish/guestfish-commands.pod:7
28012 "This creates an empty (zeroed) file of the given size, and then adds so it "
28013 "can be further examined."
28017 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
28018 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
28022 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
28023 msgid "Size can be specified using standard suffixes, eg. C<1M>."
28027 #: ../fish/guestfish-commands.pod:14
28029 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
28030 "image, see L</PREPARED DISK IMAGES>."
28034 #: ../fish/guestfish-commands.pod:17
28039 #: ../fish/guestfish-commands.pod:19
28042 " copy-in local [local ...] /remotedir\n"
28047 #: ../fish/guestfish-commands.pod:21
28049 "C<copy-in> copies local files or directories recursively into the disk "
28050 "image, placing them in the directory called C</remotedir> (which must "
28051 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
28052 "other commands as necessary."
28056 #: ../fish/guestfish-commands.pod:26
28058 "Multiple local files and directories can be specified, but the last "
28059 "parameter must always be a remote directory. Wildcards cannot be used."
28063 #: ../fish/guestfish-commands.pod:30
28068 #: ../fish/guestfish-commands.pod:32
28071 " copy-out remote [remote ...] localdir\n"
28076 #: ../fish/guestfish-commands.pod:34
28078 "C<copy-out> copies remote files or directories recursively out of the disk "
28079 "image, placing them on the host disk in a local directory called C<localdir> "
28080 "(which must exist). This guestfish meta-command turns into a sequence of L</"
28081 "download>, L</tar-out> and other commands as necessary."
28085 #: ../fish/guestfish-commands.pod:40
28087 "Multiple remote files and directories can be specified, but the last "
28088 "parameter must always be a local directory. To download to the current "
28089 "directory, use C<.> as in:"
28093 #: ../fish/guestfish-commands.pod:44
28096 " copy-out /home .\n"
28101 #: ../fish/guestfish-commands.pod:46
28103 "Wildcards cannot be used in the ordinary command, but you can use them with "
28104 "the help of L</glob> like this:"
28108 #: ../fish/guestfish-commands.pod:49
28111 " glob copy-out /home/* .\n"
28116 #: ../fish/guestfish-commands.pod:51
28121 #: ../fish/guestfish-commands.pod:53
28124 " echo [params ...]\n"
28129 #: ../fish/guestfish-commands.pod:55
28130 msgid "This echos the parameters to the terminal."
28134 #: ../fish/guestfish-commands.pod:57
28139 #: ../fish/guestfish-commands.pod:59
28144 #: ../fish/guestfish-commands.pod:61
28149 #: ../fish/guestfish-commands.pod:63
28157 #: ../fish/guestfish-commands.pod:65
28159 "This is used to edit a file. It downloads the file, edits it locally using "
28160 "your editor, then uploads the result."
28164 #: ../fish/guestfish-commands.pod:68
28166 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
28167 "or C<emacs> you will get those corresponding editors."
28171 #: ../fish/guestfish-commands.pod:72
28176 #: ../fish/guestfish-commands.pod:74
28179 " glob command args...\n"
28184 #: ../fish/guestfish-commands.pod:76
28186 "Expand wildcards in any paths in the args list, and run C<command> "
28187 "repeatedly on each matching path."
28191 #: ../fish/guestfish-commands.pod:79
28192 msgid "See L</WILDCARDS AND GLOBBING>."
28196 #: ../fish/guestfish-commands.pod:81
28201 #: ../fish/guestfish-commands.pod:83
28204 " hexedit <filename|device>\n"
28205 " hexedit <filename|device> <max>\n"
28206 " hexedit <filename|device> <start> <max>\n"
28211 #: ../fish/guestfish-commands.pod:87
28213 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
28218 #: ../fish/guestfish-commands.pod:90
28220 "This command works by downloading potentially the whole file or device, "
28221 "editing it locally, then uploading it. If the file or device is large, you "
28222 "have to specify which part you wish to edit by using C<max> and/or C<start> "
28223 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
28224 "usual modifiers allowed such as C<1M> (1 megabyte)."
28228 #: ../fish/guestfish-commands.pod:97
28229 msgid "For example to edit the first few sectors of a disk you might do:"
28233 #: ../fish/guestfish-commands.pod:100
28236 " hexedit /dev/sda 1M\n"
28241 #: ../fish/guestfish-commands.pod:102
28243 "which would allow you to edit anywhere within the first megabyte of the disk."
28247 #: ../fish/guestfish-commands.pod:105
28248 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
28252 #: ../fish/guestfish-commands.pod:107
28255 " hexedit /dev/sda1 0x400 0x400\n"
28260 #: ../fish/guestfish-commands.pod:109
28261 msgid "(assuming the superblock is in the standard location)."
28265 #: ../fish/guestfish-commands.pod:111
28267 "This command requires the external L<hexedit(1)> program. You can specify "
28268 "another program to use by setting the C<HEXEDITOR> environment variable."
28272 #: ../fish/guestfish-commands.pod:115
28273 msgid "See also L</hexdump>."
28277 #: ../fish/guestfish-commands.pod:117
28282 #: ../fish/guestfish-commands.pod:119
28290 #: ../fish/guestfish-commands.pod:121
28292 "Change the local directory, ie. the current directory of guestfish itself."
28296 #: ../fish/guestfish-commands.pod:124
28297 msgid "Note that C<!cd> won't do what you might expect."
28301 #: ../fish/guestfish-commands.pod:126
28306 #: ../fish/guestfish-commands.pod:128
28311 #: ../fish/guestfish-commands.pod:130
28319 #: ../fish/guestfish-commands.pod:132
28320 msgid "Opens the manual page for guestfish."
28324 #: ../fish/guestfish-commands.pod:134
28329 #: ../fish/guestfish-commands.pod:136
28334 #: ../fish/guestfish-commands.pod:138
28342 #: ../fish/guestfish-commands.pod:140
28350 #: ../fish/guestfish-commands.pod:142
28351 msgid "This is used to view a file."
28355 #: ../fish/guestfish-commands.pod:144
28357 "The default viewer is C<$PAGER>. However if you use the alternate command "
28358 "C<less> you will get the C<less> command specifically."
28362 #: ../fish/guestfish-commands.pod:147
28367 #: ../fish/guestfish-commands.pod:149
28375 #: ../fish/guestfish-commands.pod:151
28377 "Close and reopen the libguestfs handle. It is not necessary to use this "
28378 "normally, because the handle is closed properly when guestfish exits. "
28379 "However this is occasionally useful for testing."
28383 #: ../fish/guestfish-commands.pod:155
28388 #: ../fish/guestfish-commands.pod:157
28391 " sparse filename size\n"
28396 #: ../fish/guestfish-commands.pod:159
28398 "This creates an empty sparse file of the given size, and then adds so it can "
28399 "be further examined."
28403 #: ../fish/guestfish-commands.pod:162
28405 "In all respects it works the same as the L</alloc> command, except that the "
28406 "image file is allocated sparsely, which means that disk blocks are not "
28407 "assigned to the file until they are needed. Sparse disk files only use "
28408 "space when written to, but they are slower and there is a danger you could "
28409 "run out of real disk space during a write operation."
28413 #: ../fish/guestfish-commands.pod:172
28418 #: ../fish/guestfish-commands.pod:174
28426 #: ../fish/guestfish-commands.pod:176
28428 "This command returns a list of the optional groups known to the daemon, and "
28429 "indicates which ones are supported by this build of the libguestfs appliance."
28433 #: ../fish/guestfish-commands.pod:180
28434 msgid "See also L<guestfs(3)/AVAILABILITY>."
28438 #: ../fish/guestfish-commands.pod:182
28443 #: ../fish/guestfish-commands.pod:184
28446 " time command args...\n"
28451 #: ../fish/guestfish-commands.pod:186
28453 "Run the command as usual, but print the elapsed time afterwards. This can "
28454 "be useful for benchmarking operations."
28458 #: ../test-tool/libguestfs-test-tool.pod:5
28459 msgid "libguestfs-test-tool - End user tests for libguestfs"
28463 #: ../test-tool/libguestfs-test-tool.pod:9
28466 " libguestfs-test-tool [--options]\n"
28471 #: ../test-tool/libguestfs-test-tool.pod:13
28473 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
28474 "and developers, to allow them to check basic libguestfs functionality is "
28475 "working. This is needed because libguestfs occasionally breaks for reasons "
28476 "beyond our control: usually because of changes in the underlying qemu or "
28477 "kernel packages, or the host environment."
28481 #: ../test-tool/libguestfs-test-tool.pod:20
28482 msgid "If you suspect a problem in libguestfs, then just run:"
28486 #: ../test-tool/libguestfs-test-tool.pod:22
28489 " libguestfs-test-tool\n"
28494 #: ../test-tool/libguestfs-test-tool.pod:24
28495 msgid "It will print lots of diagnostic messages."
28499 #: ../test-tool/libguestfs-test-tool.pod:26
28500 msgid "If it runs to completion successfully, you will see this near the end:"
28504 #: ../test-tool/libguestfs-test-tool.pod:28
28507 " ===== TEST FINISHED OK =====\n"
28512 #: ../test-tool/libguestfs-test-tool.pod:30
28513 msgid "and the test tool will exit with code 0."
28517 #: ../test-tool/libguestfs-test-tool.pod:32
28519 "If it fails (and/or exits with non-zero error code), please paste the "
28520 "B<complete, unedited> output of the test tool into a bug report. More "
28521 "information about reporting bugs can be found on the L<http://libguestfs.org/"
28526 #: ../test-tool/libguestfs-test-tool.pod:41
28531 #: ../test-tool/libguestfs-test-tool.pod:43
28532 msgid "Display short usage information and exit."
28536 #: ../test-tool/libguestfs-test-tool.pod:45
28537 msgid "I<--qemu qemu_binary>"
28541 #: ../test-tool/libguestfs-test-tool.pod:47
28543 "If you have downloaded another qemu binary, point this option at the full "
28544 "path of the binary to try it."
28548 #: ../test-tool/libguestfs-test-tool.pod:50
28549 msgid "I<--qemudir qemu_source_dir>"
28553 #: ../test-tool/libguestfs-test-tool.pod:52
28555 "If you have compiled qemu from source, point this option at the source "
28556 "directory to try it."
28560 #: ../test-tool/libguestfs-test-tool.pod:55
28561 msgid "I<--timeout N>"
28565 #: ../test-tool/libguestfs-test-tool.pod:57
28567 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
28568 "does not usually need to be adjusted unless your machine is very slow."
28572 #: ../test-tool/libguestfs-test-tool.pod:63
28573 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
28577 #: ../test-tool/libguestfs-test-tool.pod:65
28579 "If you have compiled another version of qemu from source and would like to "
28580 "try that, then you can use the I<--qemudir> option to point to the qemu "
28581 "source directory."
28585 #: ../test-tool/libguestfs-test-tool.pod:69
28587 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
28588 "option to point to the binary."
28592 #: ../test-tool/libguestfs-test-tool.pod:72
28594 "When using an alternate qemu with libguestfs, usually you would need to "
28595 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in L<guestfs(3)"
28596 ">). libguestfs-test-tool writes a temporary qemu wrapper script when you "
28597 "use either of the I<--qemudir> or I<--qemu> options."
28601 #: ../test-tool/libguestfs-test-tool.pod:79
28603 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
28604 "I<1> if there was an error."
28608 #: ../test-tool/libguestfs-test-tool.pod:84
28610 "For the full list of environment variables which may affect libguestfs, "
28611 "please see the L<guestfs(3)> manual page."
28615 #: ../test-tool/libguestfs-test-tool.pod:89
28616 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
28620 #: ../fuse/guestmount.pod:5
28622 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
28626 #: ../fuse/guestmount.pod:9
28629 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
28634 #: ../fuse/guestmount.pod:11
28637 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
28642 #: ../fuse/guestmount.pod:13
28645 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
28650 #: ../fuse/guestmount.pod:17
28652 "You must I<not> use C<guestmount> in read-write mode on live virtual "
28653 "machines. If you do this, you risk disk corruption in the VM."
28657 #: ../fuse/guestmount.pod:22
28659 "The guestmount program can be used to mount virtual machine filesystems and "
28660 "other disk images on the host. It uses libguestfs for access to the guest "
28661 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
28662 "a mountable device."
28666 #: ../fuse/guestmount.pod:27
28668 "Along with other options, you have to give at least one device (I<-a> "
28669 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
28670 "option) or use the I<-i> inspection option. How this works is better "
28671 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
28676 #: ../fuse/guestmount.pod:33
28678 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
28679 "by you, and the filesystem will not be visible to any other users unless you "
28680 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
28681 "the filesystem, use the C<fusermount -u> command."
28685 #: ../fuse/guestmount.pod:41
28687 "For a typical Windows guest which has its main filesystem on the first "
28692 #: ../fuse/guestmount.pod:44
28695 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
28700 #: ../fuse/guestmount.pod:46
28702 "For a typical Linux guest which has a /boot filesystem on the first "
28703 "partition, and the root filesystem on a logical volume:"
28707 #: ../fuse/guestmount.pod:49
28710 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
28715 #: ../fuse/guestmount.pod:51
28716 msgid "To get libguestfs to detect guest mountpoints for you:"
28720 #: ../fuse/guestmount.pod:53
28723 " guestmount -a guest.img -i --ro /mnt\n"
28728 #: ../fuse/guestmount.pod:55
28729 msgid "For a libvirt guest called \"Guest\" you could do:"
28733 #: ../fuse/guestmount.pod:57
28736 " guestmount -d Guest -i --ro /mnt\n"
28741 #: ../fuse/guestmount.pod:59
28743 "If you don't know what filesystems are contained in a guest or disk image, "
28744 "use L<virt-filesystems(1)> first:"
28748 #: ../fuse/guestmount.pod:62
28751 " virt-filesystems MyGuest\n"
28756 #: ../fuse/guestmount.pod:64
28758 "If you want to trace the libguestfs calls but without excessive debugging "
28759 "information, we recommend:"
28763 #: ../fuse/guestmount.pod:67
28766 " guestmount [...] --trace /mnt\n"
28771 #: ../fuse/guestmount.pod:69
28772 msgid "If you want to debug the program, we recommend:"
28776 #: ../fuse/guestmount.pod:71
28779 " guestmount [...] --trace --verbose /mnt\n"
28784 #: ../fuse/guestmount.pod:73
28789 #: ../fuse/guestmount.pod:75
28790 msgid "Other users cannot see the filesystem by default"
28794 #: ../fuse/guestmount.pod:77
28796 "If you mount a filesystem as one user (eg. root), then other users will not "
28797 "be able to see it by default. The fix is to add the FUSE C<allow_other> "
28798 "option when mounting:"
28802 #: ../fuse/guestmount.pod:81
28805 " sudo guestmount [...] -o allow_other /mnt\n"
28810 #: ../fuse/guestmount.pod:87
28811 msgid "B<-a image> | B<--add image>"
28815 #: ../fuse/guestmount.pod:89
28816 msgid "Add a block device or virtual machine image."
28820 #: ../fuse/guestmount.pod:94
28821 msgid "B<-c URI> | B<--connect URI>"
28825 #: ../fuse/guestmount.pod:100
28826 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
28830 #: ../fuse/guestmount.pod:108
28831 msgid "B<--dir-cache-timeout N>"
28835 #: ../fuse/guestmount.pod:110
28837 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
28838 "seconds. The readdir cache [actually, there are several semi-independent "
28839 "caches] is populated after a readdir(2) call with the stat and extended "
28840 "attributes of the files in the directory, in anticipation that they will be "
28841 "requested soon after."
28845 #: ../fuse/guestmount.pod:116
28847 "There is also a different attribute cache implemented by FUSE (see the FUSE "
28848 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
28849 "requests, only cache existing ones."
28853 #: ../fuse/guestmount.pod:127
28854 msgid "B<--format=raw|qcow2|..> | B<--format>"
28858 #: ../fuse/guestmount.pod:134
28860 "If you have untrusted raw-format guest disk images, you should use this "
28861 "option to specify the disk format. This avoids a possible security problem "
28862 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
28863 "guestfs_add_drive_opts>."
28867 #: ../fuse/guestmount.pod:139
28868 msgid "B<--fuse-help>"
28872 #: ../fuse/guestmount.pod:141
28873 msgid "Display help on special FUSE options (see I<-o> below)."
28877 #: ../fuse/guestmount.pod:145
28878 msgid "Display brief help and exit."
28882 #: ../fuse/guestmount.pod:147
28883 msgid "B<-i> | B<--inspector>"
28887 #: ../fuse/guestmount.pod:167
28889 "Mount the named partition or logical volume on the given mountpoint B<in the "
28890 "guest> (this has nothing to do with mountpoints in the host)."
28894 #: ../fuse/guestmount.pod:170
28896 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
28897 "something on C</>."
28901 #: ../fuse/guestmount.pod:183
28902 msgid "B<-n> | B<--no-sync>"
28906 #: ../fuse/guestmount.pod:185
28908 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
28909 "unmounted. If you specify this option, then we don't attempt to sync the "
28910 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
28914 #: ../fuse/guestmount.pod:190
28915 msgid "B<-o option> | B<--option option>"
28919 #: ../fuse/guestmount.pod:192
28920 msgid "Pass extra options to FUSE."
28924 #: ../fuse/guestmount.pod:194
28926 "To get a list of all the extra options supported by FUSE, use the command "
28927 "below. Note that only the FUSE I<-o> options can be passed, and only some "
28928 "of them are a good idea."
28932 #: ../fuse/guestmount.pod:198
28935 " guestmount --fuse-help\n"
28940 #: ../fuse/guestmount.pod:200
28941 msgid "Some potentially useful FUSE options:"
28945 #: ../fuse/guestmount.pod:204
28946 msgid "B<-o allow_other>"
28950 #: ../fuse/guestmount.pod:206
28951 msgid "Allow other users to see the filesystem."
28955 #: ../fuse/guestmount.pod:208
28956 msgid "B<-o attr_timeout=N>"
28960 #: ../fuse/guestmount.pod:210
28961 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
28965 #: ../fuse/guestmount.pod:212
28966 msgid "B<-o kernel_cache>"
28970 #: ../fuse/guestmount.pod:214
28972 "Allow the kernel to cache files (reduces the number of reads that have to go "
28973 "through the L<guestfs(3)> API). This is generally a good idea if you can "
28974 "afford the extra memory usage."
28978 #: ../fuse/guestmount.pod:218
28979 msgid "B<-o uid=N> B<-o gid=N>"
28983 #: ../fuse/guestmount.pod:220
28985 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
28986 "the chosen values."
28990 #: ../fuse/guestmount.pod:225
28991 msgid "B<-r> | B<--ro>"
28995 #: ../fuse/guestmount.pod:227
28997 "Add devices and mount everything read-only. Also disallow writes and make "
28998 "the disk appear read-only to FUSE."
29002 #: ../fuse/guestmount.pod:230
29004 "This is highly recommended if you are not going to edit the guest disk. If "
29005 "the guest is running and this option is I<not> supplied, then there is a "
29006 "strong risk of disk corruption in the guest. We try to prevent this from "
29007 "happening, but it is not always possible."
29011 #: ../fuse/guestmount.pod:235
29012 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
29016 #: ../fuse/guestmount.pod:239
29017 msgid "Enable SELinux support for the guest."
29021 #: ../fuse/guestmount.pod:241
29022 msgid "B<-v> | B<--verbose>"
29026 #: ../fuse/guestmount.pod:243
29027 msgid "Enable verbose messages from underlying libguestfs."
29031 #: ../fuse/guestmount.pod:245
29032 msgid "B<-V> | B<--version>"
29036 #: ../fuse/guestmount.pod:247
29037 msgid "Display the program version and exit."
29041 #: ../fuse/guestmount.pod:249
29042 msgid "B<-w> | B<--rw>"
29046 #: ../fuse/guestmount.pod:254 ../fuse/guestmount.pod:275
29047 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
29051 #: ../fuse/guestmount.pod:256
29052 msgid "B<-x> | B<--trace>"
29056 #: ../fuse/guestmount.pod:258
29057 msgid "Trace libguestfs calls and entry into each FUSE function."
29061 #: ../fuse/guestmount.pod:260
29062 msgid "This also stops the daemon from forking into the background."
29066 #: ../fuse/guestmount.pod:281
29068 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
29069 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
29074 #: ../fuse/guestmount.pod:296
29075 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
29079 #: ../tools/virt-win-reg.pl:37
29081 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
29085 #: ../tools/virt-win-reg.pl:41
29088 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
29093 #: ../tools/virt-win-reg.pl:43
29096 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
29101 #: ../tools/virt-win-reg.pl:45
29104 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
29109 #: ../tools/virt-win-reg.pl:47
29112 " virt-win-reg --merge domname [input.reg ...]\n"
29117 #: ../tools/virt-win-reg.pl:49
29120 " virt-win-reg [--options] disk.img ... # instead of domname\n"
29125 #: ../tools/virt-win-reg.pl:53
29127 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
29128 "virtual machines. If you do this, you I<will> get irreversible disk "
29129 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
29130 "but doesn't catch all cases."
29134 #: ../tools/virt-win-reg.pl:58
29136 "Modifying the Windows Registry is an inherently risky operation. The format "
29137 "is deliberately obscure and undocumented, and Registry changes can leave the "
29138 "system unbootable. Therefore when using the I<--merge> option, make sure "
29139 "you have a reliable backup first."
29143 #: ../tools/virt-win-reg.pl:65
29145 "This program can export and merge Windows Registry entries from a Windows "
29150 #: ../tools/virt-win-reg.pl:68
29152 "The first parameter is the libvirt guest name or the raw disk image of a "
29157 #: ../tools/virt-win-reg.pl:71
29159 "If I<--merge> is I<not> specified, then the chosen registry key is displayed/"
29160 "exported (recursively). For example:"
29164 #: ../tools/virt-win-reg.pl:74
29167 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
29172 #: ../tools/virt-win-reg.pl:76
29174 "You can also display single values from within registry keys, for example:"
29178 #: ../tools/virt-win-reg.pl:79
29181 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
29182 " $ virt-win-reg Windows7 $cvkey ProductName\n"
29183 " Windows 7 Enterprise\n"
29188 #: ../tools/virt-win-reg.pl:83
29190 "With I<--merge>, you can merge a textual regedit file into the Windows "
29195 #: ../tools/virt-win-reg.pl:86
29198 " $ virt-win-reg --merge Windows7 changes.reg\n"
29203 #: ../tools/virt-win-reg.pl:88 ../tools/virt-tar.pl:45
29208 #: ../tools/virt-win-reg.pl:90
29210 "This program is only meant for simple access to the registry. If you want "
29211 "to do complicated things with the registry, we suggest you download the "
29212 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
29213 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
29214 "L<hivexregedit(1)>."
29218 #: ../tools/virt-win-reg.pl:106 ../tools/virt-list-filesystems.pl:63
29219 #: ../tools/virt-tar.pl:113 ../tools/virt-make-fs.pl:163
29220 #: ../tools/virt-list-partitions.pl:64
29221 msgid "Display brief help."
29225 #: ../tools/virt-win-reg.pl:114 ../tools/virt-list-filesystems.pl:71
29226 #: ../tools/virt-tar.pl:121 ../tools/virt-make-fs.pl:171
29227 #: ../tools/virt-list-partitions.pl:72
29228 msgid "Display version number and exit."
29232 #: ../tools/virt-win-reg.pl:120 ../tools/virt-make-fs.pl:177
29237 #: ../tools/virt-win-reg.pl:122
29238 msgid "Enable debugging messages."
29242 #: ../tools/virt-win-reg.pl:128 ../tools/virt-list-filesystems.pl:77
29243 #: ../tools/virt-tar.pl:127 ../tools/virt-list-partitions.pl:78
29244 msgid "B<--connect URI> | B<-c URI>"
29248 #: ../tools/virt-win-reg.pl:130 ../tools/virt-list-filesystems.pl:79
29249 #: ../tools/virt-tar.pl:129 ../tools/virt-list-partitions.pl:80
29251 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
29252 "to the default libvirt hypervisor."
29256 #: ../tools/virt-win-reg.pl:133 ../tools/virt-list-filesystems.pl:82
29257 #: ../tools/virt-tar.pl:132 ../tools/virt-list-partitions.pl:83
29259 "If you specify guest block devices directly, then libvirt is not used at all."
29263 #: ../tools/virt-win-reg.pl:140 ../tools/virt-list-filesystems.pl:89
29264 #: ../tools/virt-tar.pl:139 ../tools/virt-list-partitions.pl:90
29265 msgid "B<--format> raw"
29269 #: ../tools/virt-win-reg.pl:142 ../tools/virt-list-filesystems.pl:91
29270 #: ../tools/virt-tar.pl:141 ../tools/virt-list-partitions.pl:92
29272 "Specify the format of disk images given on the command line. If this is "
29273 "omitted then the format is autodetected from the content of the disk image."
29277 #: ../tools/virt-win-reg.pl:146 ../tools/virt-list-filesystems.pl:95
29278 #: ../tools/virt-tar.pl:145 ../tools/virt-list-partitions.pl:96
29280 "If disk images are requested from libvirt, then this program asks libvirt "
29281 "for this information. In this case, the value of the format parameter is "
29286 #: ../tools/virt-win-reg.pl:150 ../tools/virt-list-filesystems.pl:99
29287 #: ../tools/virt-tar.pl:149 ../tools/virt-list-partitions.pl:100
29289 "If working with untrusted raw-format guest disk images, you should ensure "
29290 "the format is always specified."
29294 #: ../tools/virt-win-reg.pl:157
29299 #: ../tools/virt-win-reg.pl:159
29301 "In merge mode, this merges a textual regedit file into the Windows Registry "
29302 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
29303 "displays or exports Registry entries instead."
29307 #: ../tools/virt-win-reg.pl:163
29309 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
29310 "result in disk corruption. However exporting (without this flag) is always "
29315 #: ../tools/virt-win-reg.pl:171
29316 msgid "B<--encoding> UTF-16LE|ASCII"
29320 #: ../tools/virt-win-reg.pl:173
29322 "When merging (only), you may need to specify the encoding for strings to be "
29323 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
29324 "(3)/ENCODING STRINGS>."
29328 #: ../tools/virt-win-reg.pl:177
29330 "The default is to use UTF-16LE, which should work with recent versions of "
29335 #: ../tools/virt-win-reg.pl:184
29336 msgid "B<--unsafe-printable-strings>"
29340 #: ../tools/virt-win-reg.pl:186
29342 "When exporting (only), assume strings are UTF-16LE and print them as strings "
29343 "instead of hex sequences. Remove the final zero codepoint from strings if "
29348 #: ../tools/virt-win-reg.pl:190
29350 "This is unsafe and does not preserve the fidelity of strings in the original "
29351 "Registry for various reasons:"
29355 #: ../tools/virt-win-reg.pl:197
29357 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
29358 "other encodings will be corrupted by this transformation."
29362 #: ../tools/virt-win-reg.pl:202
29364 "Assumes that everything which has type 1 or 2 is really a string and that "
29365 "everything else is not a string, but the type field in real Registries is "
29370 #: ../tools/virt-win-reg.pl:208
29372 "Loses information about whether a zero codepoint followed the string in the "
29377 #: ../tools/virt-win-reg.pl:213
29379 "This all happens because the Registry itself contains no information about "
29380 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
29384 #: ../tools/virt-win-reg.pl:217
29386 "You should only use this option for quick hacking and debugging of the "
29387 "Registry contents, and I<never> use it if the output is going to be passed "
29388 "into another program or stored in another Registry."
29392 #: ../tools/virt-win-reg.pl:554
29393 msgid "SUPPORTED SYSTEMS"
29397 #: ../tools/virt-win-reg.pl:556
29399 "The program currently supports Windows NT-derived guests starting with "
29400 "Windows XP through to at least Windows 7."
29404 #: ../tools/virt-win-reg.pl:559
29405 msgid "The following Registry keys are supported:"
29409 #: ../tools/virt-win-reg.pl:563
29410 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
29414 #: ../tools/virt-win-reg.pl:565
29415 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
29419 #: ../tools/virt-win-reg.pl:567
29420 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
29424 #: ../tools/virt-win-reg.pl:569
29425 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
29429 #: ../tools/virt-win-reg.pl:571
29430 msgid "C<HKEY_USERS\\.DEFAULT>"
29434 #: ../tools/virt-win-reg.pl:573
29435 msgid "C<HKEY_USERS\\I<SID>>"
29439 #: ../tools/virt-win-reg.pl:575
29440 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
29444 #: ../tools/virt-win-reg.pl:577
29445 msgid "C<HKEY_USERS\\I<username>>"
29449 #: ../tools/virt-win-reg.pl:579
29451 "where I<username> is a local user name (this is a libguestfs extension)."
29455 #: ../tools/virt-win-reg.pl:583
29457 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
29462 #: ../tools/virt-win-reg.pl:586
29464 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
29465 "supported (there is no \"current user\")."
29469 #: ../tools/virt-win-reg.pl:589
29474 #: ../tools/virt-win-reg.pl:591
29476 "C<virt-win-reg> expects that regedit files have already been reencoded in "
29477 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
29478 "style line endings. Since Windows regedit files are often in UTF-16LE with "
29479 "Windows-style line endings, you may need to reencode the whole file before "
29480 "or after processing."
29484 #: ../tools/virt-win-reg.pl:597
29486 "To reencode a file from Windows format to Linux (before processing it with "
29487 "the I<--merge> option), you would do something like this:"
29491 #: ../tools/virt-win-reg.pl:600
29494 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
29499 #: ../tools/virt-win-reg.pl:602
29501 "To go in the opposite direction, after exporting and before sending the file "
29502 "to a Windows user, do something like this:"
29506 #: ../tools/virt-win-reg.pl:605
29509 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
29514 #: ../tools/virt-win-reg.pl:607
29515 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
29519 #: ../tools/virt-win-reg.pl:609
29521 "If you are unsure about the current encoding, use the L<file(1)> command. "
29522 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
29523 "style (CRLF) line endings, like this:"
29527 #: ../tools/virt-win-reg.pl:613
29530 " $ file software.reg\n"
29531 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
29532 " with CRLF line terminators\n"
29537 #: ../tools/virt-win-reg.pl:617
29538 msgid "This file would need conversion before you could I<--merge> it."
29542 #: ../tools/virt-win-reg.pl:619
29543 msgid "CurrentControlSet etc."
29547 #: ../tools/virt-win-reg.pl:621
29549 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
29550 "Registry at the level of the hive file, and therefore you cannot modify "
29555 #: ../tools/virt-win-reg.pl:625
29557 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
29558 "circumstances it might refer to another control set. The way to find out is "
29559 "to look at the C<HKLM\\SYSTEM\\Select> key:"
29563 #: ../tools/virt-win-reg.pl:629
29566 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
29567 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
29568 " \"Current\"=dword:00000001\n"
29569 " \"Default\"=dword:00000001\n"
29570 " \"Failed\"=dword:00000000\n"
29571 " \"LastKnownGood\"=dword:00000002\n"
29576 #: ../tools/virt-win-reg.pl:636
29577 msgid "\"Current\" is the one which Windows will choose when it boots."
29581 #: ../tools/virt-win-reg.pl:638
29583 "Similarly, other C<Current...> keys in the path may need to be replaced."
29587 #: ../tools/virt-win-reg.pl:641
29588 msgid "WINDOWS TIPS"
29592 #: ../tools/virt-win-reg.pl:643
29594 "Note that some of these tips modify the guest disk image. The guest I<must> "
29595 "be shut off, else you will get disk corruption."
29599 #: ../tools/virt-win-reg.pl:646
29600 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
29604 #: ../tools/virt-win-reg.pl:648
29606 "Prepare a DOS batch script, VBScript or executable. Upload this using "
29607 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
29608 "is uploaded into C<C:\\>:"
29612 #: ../tools/virt-win-reg.pl:652
29615 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
29620 #: ../tools/virt-win-reg.pl:654
29621 msgid "Prepare a regedit file containing the registry change:"
29625 #: ../tools/virt-win-reg.pl:656
29628 " cat > test.reg <<'EOF'\n"
29629 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
29630 " \"Test\"=\"c:\\\\test.bat\"\n"
29636 #: ../tools/virt-win-reg.pl:661
29638 "In this example we use the key C<RunOnce> which means that the script will "
29639 "run precisely once when the first user logs in. If you want it to run every "
29640 "time a user logs in, replace C<RunOnce> with C<Run>."
29644 #: ../tools/virt-win-reg.pl:665
29645 msgid "Now update the registry:"
29649 #: ../tools/virt-win-reg.pl:667
29652 " virt-win-reg --merge WindowsGuest test.reg\n"
29657 #: ../tools/virt-win-reg.pl:669
29658 msgid "INSTALLING A SERVICE"
29662 #: ../tools/virt-win-reg.pl:671
29664 "This section assumes you are familiar with Windows services, and you either "
29665 "have a program which handles the Windows Service Control Protocol directly "
29666 "or you want to run any program using a service wrapper like SrvAny or the "
29671 #: ../tools/virt-win-reg.pl:676
29673 "First upload the program and optionally the service wrapper. In this case "
29674 "the test program is called C<test.exe> and we are using the RHSrvAny wrapper:"
29678 #: ../tools/virt-win-reg.pl:680
29681 " guestfish -i -d WindowsGuest <<EOF\n"
29682 " upload rhsrvany.exe /rhsrvany.exe\n"
29683 " upload test.exe /test.exe\n"
29689 #: ../tools/virt-win-reg.pl:685
29691 "Prepare a regedit file containing the registry changes. In this example, "
29692 "the first registry change is needed for the service itself or the service "
29693 "wrapper (if used). The second registry change is only needed because I am "
29694 "using the RHSrvAny service wrapper."
29698 #: ../tools/virt-win-reg.pl:690
29701 " cat > service.reg <<'EOF'\n"
29702 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
29703 " \"Type\"=dword:00000010\n"
29704 " \"Start\"=dword:00000002\n"
29705 " \"ErrorControl\"=dword:00000001\n"
29706 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
29707 " \"DisplayName\"=\"RHSrvAny\"\n"
29708 " \"ObjectName\"=\"NetworkService\"\n"
29713 #: ../tools/virt-win-reg.pl:699
29716 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
29717 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
29718 " \"PWD\"=\"c:\\\\Temp\"\n"
29724 #: ../tools/virt-win-reg.pl:710
29726 "For use of C<ControlSet001> see the section above in this manual page. You "
29727 "may need to adjust this according to the control set that is in use by the "
29732 #: ../tools/virt-win-reg.pl:716
29734 "C<\"ObjectName\"> controls the privileges that the service will have. An "
29735 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
29736 "privileged account."
29740 #: ../tools/virt-win-reg.pl:722
29742 "For the meaning of the magic numbers, see this Microsoft KB article: "
29743 "L<http://support.microsoft.com/kb/103000>."
29747 #: ../tools/virt-win-reg.pl:727
29748 msgid "Update the registry:"
29752 #: ../tools/virt-win-reg.pl:729
29755 " virt-win-reg --merge WindowsGuest service.reg\n"
29760 #: ../tools/virt-win-reg.pl:731 ../tools/virt-list-filesystems.pl:182
29761 #: ../tools/virt-tar.pl:279 ../tools/virt-make-fs.pl:532
29762 #: ../tools/virt-list-partitions.pl:250
29763 msgid "SHELL QUOTING"
29767 #: ../tools/virt-win-reg.pl:733
29769 "Be careful when passing parameters containing C<\\> (backslash) in the "
29770 "shell. Usually you will have to use 'single quotes' or double backslashes "
29771 "(but not both) to protect them from the shell."
29775 #: ../tools/virt-win-reg.pl:737
29776 msgid "Paths and value names are case-insensitive."
29780 #: ../tools/virt-win-reg.pl:739 ../tools/virt-list-filesystems.pl:184
29781 #: ../tools/virt-tar.pl:281 ../tools/virt-make-fs.pl:534
29782 #: ../tools/virt-list-partitions.pl:252
29784 "Libvirt guest names can contain arbitrary characters, some of which have "
29785 "meaning to the shell such as C<#> and space. You may need to quote or "
29786 "escape these characters on the command line. See the shell manual page L<sh"
29787 "(1)> for details."
29791 #: ../tools/virt-win-reg.pl:746
29793 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
29794 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
29795 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
29799 #: ../tools/virt-win-reg.pl:761 ../tools/virt-make-fs.pl:555
29801 "When reporting bugs, please enable debugging and capture the I<complete> "
29806 #: ../tools/virt-win-reg.pl:764
29809 " export LIBGUESTFS_DEBUG=1\n"
29810 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
29815 #: ../tools/virt-win-reg.pl:767
29817 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."
29822 #: ../tools/virt-win-reg.pl:770 ../tools/virt-list-filesystems.pl:202
29823 #: ../tools/virt-tar.pl:301 ../tools/virt-make-fs.pl:564
29824 #: ../tools/virt-list-partitions.pl:269
29829 #: ../tools/virt-win-reg.pl:772 ../tools/virt-list-filesystems.pl:204
29830 #: ../tools/virt-tar.pl:303 ../tools/virt-make-fs.pl:566
29831 #: ../tools/virt-list-partitions.pl:271
29832 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
29836 #: ../tools/virt-win-reg.pl:776 ../tools/virt-make-fs.pl:570
29837 msgid "Copyright (C) 2010 Red Hat Inc."
29841 #: ../tools/virt-list-filesystems.pl:32
29843 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
29847 #: ../tools/virt-list-filesystems.pl:36
29850 " virt-list-filesystems [--options] domname\n"
29855 #: ../tools/virt-list-filesystems.pl:38
29858 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
29863 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
29865 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
29870 #: ../tools/virt-list-filesystems.pl:45
29872 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
29873 "are contained in a virtual machine or disk image."
29877 #: ../tools/virt-list-filesystems.pl:49
29879 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
29880 "functionality. For more complex cases you should look at the L<guestfish(1)"
29885 #: ../tools/virt-list-filesystems.pl:106 ../tools/virt-list-partitions.pl:115
29886 msgid "B<-l> | B<--long>"
29890 #: ../tools/virt-list-filesystems.pl:108
29892 "With this option, C<virt-list-filesystems> displays the type of each "
29893 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
29897 #: ../tools/virt-list-filesystems.pl:115
29898 msgid "B<-a> | B<--all>"
29902 #: ../tools/virt-list-filesystems.pl:117
29904 "Normally we only show mountable filesystems. If this option is given then "
29905 "swap devices are shown too."
29909 #: ../tools/virt-list-filesystems.pl:191
29911 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
29912 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::"
29913 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
29917 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-tar.pl:307
29918 msgid "Copyright (C) 2009 Red Hat Inc."
29922 #: ../tools/virt-tar.pl:33
29923 msgid "virt-tar - Extract or upload files to a virtual machine"
29927 #: ../tools/virt-tar.pl:37
29930 " virt-tar [--options] -x domname directory tarball\n"
29935 #: ../tools/virt-tar.pl:39
29938 " virt-tar [--options] -u domname tarball directory\n"
29943 #: ../tools/virt-tar.pl:41
29946 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
29951 #: ../tools/virt-tar.pl:43
29954 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
29959 #: ../tools/virt-tar.pl:47
29961 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-"
29962 "tar-in(1)>, L<virt-tar-out(1)> as replacements."
29966 #: ../tools/virt-tar.pl:52
29967 msgid "Download C</home> from the VM into a local tarball:"
29971 #: ../tools/virt-tar.pl:54
29974 " virt-tar -x domname /home home.tar\n"
29979 #: ../tools/virt-tar.pl:56
29982 " virt-tar -zx domname /home home.tar.gz\n"
29987 #: ../tools/virt-tar.pl:58
29988 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
29992 #: ../tools/virt-tar.pl:60
29995 " virt-tar -u domname uploadstuff.tar /tmp\n"
30000 #: ../tools/virt-tar.pl:62
30003 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
30008 #: ../tools/virt-tar.pl:66
30010 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
30011 "virtual machines. If you do this, you risk disk corruption in the VM. "
30012 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
30016 #: ../tools/virt-tar.pl:71
30018 "You can use I<-x> (extract) on live virtual machines, but you might get "
30019 "inconsistent results or errors if there is filesystem activity inside the "
30020 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
30021 "work, but the only way to guarantee consistent results is if the virtual "
30022 "machine is shut down."
30026 #: ../tools/virt-tar.pl:79
30028 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
30029 "parts of a guest filesystem. There are many possibilities: making backups, "
30030 "uploading data files, snooping on guest activity, fixing or customizing "
30035 #: ../tools/virt-tar.pl:84
30037 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
30038 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
30039 "should look at the L<guestfish(1)> tool."
30043 #: ../tools/virt-tar.pl:88
30045 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
30046 "its contents (recursively) from the virtual machine into a local tarball. "
30047 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
30048 "virtual machine. You cannot use these two options together."
30052 #: ../tools/virt-tar.pl:94
30054 "In addition, you may need to use the I<-z> (gZip) option to enable "
30055 "compression. When uploading, you have to specify I<-z> if the upload file "
30056 "is compressed because virt-tar won't detect this on its own."
30060 #: ../tools/virt-tar.pl:98
30062 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
30063 "example it cannot do PKZip files or bzip2 compression. If you want that "
30064 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
30065 "the L<libguestfs(3)> API)."
30069 #: ../tools/virt-tar.pl:156
30070 msgid "B<-x> | B<--extract> | B<--download>"
30074 #: ../tools/virt-tar.pl:158
30075 msgid "B<-u> | B<--upload>"
30079 #: ../tools/virt-tar.pl:160
30081 "Use I<-x> to extract (download) a directory from a virtual machine to a "
30086 #: ../tools/virt-tar.pl:163
30088 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
30089 "Please read the L</WARNING> section above before using this option."
30093 #: ../tools/virt-tar.pl:167
30094 msgid "You must specify exactly one of these options."
30098 #: ../tools/virt-tar.pl:173
30099 msgid "B<-z> | B<--gzip>"
30103 #: ../tools/virt-tar.pl:175
30104 msgid "Specify that the input or output tarball is gzip-compressed."
30108 #: ../tools/virt-tar.pl:288
30110 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-copy-"
30111 "in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<Sys::"
30112 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
30117 #: ../tools/virt-make-fs.pl:37
30118 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
30122 #: ../tools/virt-make-fs.pl:41
30125 " virt-make-fs [--options] input.tar output.img\n"
30130 #: ../tools/virt-make-fs.pl:43
30133 " virt-make-fs [--options] input.tar.gz output.img\n"
30138 #: ../tools/virt-make-fs.pl:45
30141 " virt-make-fs [--options] directory output.img\n"
30146 #: ../tools/virt-make-fs.pl:49
30148 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
30149 "archive or some files in a directory. It is similar to tools like L<mkisofs"
30150 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
30151 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
30152 "you want to attach these filesystems to existing virtual machines (eg. to "
30153 "import large amounts of read-only data to a VM)."
30157 #: ../tools/virt-make-fs.pl:57
30158 msgid "Basic usage is:"
30162 #: ../tools/virt-make-fs.pl:59
30165 " virt-make-fs input output\n"
30170 #: ../tools/virt-make-fs.pl:61
30172 "where C<input> is either a directory containing files that you want to add, "
30173 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
30174 "C<output> is a disk image. The input type is detected automatically. The "
30175 "output disk image defaults to a raw ext2 image unless you specify extra "
30176 "flags (see L</OPTIONS> below)."
30180 #: ../tools/virt-make-fs.pl:67
30181 msgid "EXTRA SPACE"
30185 #: ../tools/virt-make-fs.pl:69
30187 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
30188 "the files that it contains, but might have extra space. Depending on how "
30189 "you are going to use the output, you might think this extra space is wasted "
30190 "and want to minimize it, or you might want to leave space so that more files "
30191 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
30192 "but you can use the I<--size> flag to leave space in the filesystem if you "
30197 #: ../tools/virt-make-fs.pl:77
30199 "An alternative way to leave extra space but not make the output image any "
30200 "bigger is to use an alternative disk image format (instead of the default "
30201 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
30202 "image format (check your hypervisor supports this before using it). This "
30203 "allows you to choose a large I<--size> but the extra space won't actually be "
30204 "allocated in the image until you try to store something in it."
30208 #: ../tools/virt-make-fs.pl:85
30210 "Don't forget that you can also use local commands including L<resize2fs(8)> "
30211 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
30212 "to build another image from scratch."
30216 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
30217 #: ../tools/virt-make-fs.pl:142
30222 #: ../tools/virt-make-fs.pl:91
30225 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
30230 #: ../tools/virt-make-fs.pl:93
30231 msgid "FILESYSTEM TYPE"
30235 #: ../tools/virt-make-fs.pl:95
30237 "The default filesystem type is C<ext2>. Just about any filesystem type that "
30238 "libguestfs supports can be used (but I<not> read-only formats like "
30239 "ISO9660). Here are some of the more common choices:"
30243 #: ../tools/virt-make-fs.pl:101
30248 #: ../tools/virt-make-fs.pl:103
30250 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
30251 "you are not going to use the filesystem in a way that requires the journal, "
30252 "then this is just wasted overhead."
30256 #: ../tools/virt-make-fs.pl:107
30257 msgid "I<ntfs> or I<vfat>"
30261 #: ../tools/virt-make-fs.pl:109
30262 msgid "Useful if exporting data to a Windows guest."
30266 #: ../tools/virt-make-fs.pl:111
30268 "I<Note for vfat>: The tar archive or local directory must only contain files "
30269 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
30270 "program running within libguestfs is unable to change the ownership of non-"
30271 "root files, since vfat itself does not support this."
30275 #: ../tools/virt-make-fs.pl:116
30280 #: ../tools/virt-make-fs.pl:118
30282 "Lower overhead than C<ext2>, but certain limitations on filename length and "
30283 "total filesystem size."
30287 #: ../tools/virt-make-fs.pl:125
30290 " virt-make-fs --type=minix input minixfs.img\n"
30295 #: ../tools/virt-make-fs.pl:127
30296 msgid "TO PARTITION OR NOT TO PARTITION"
30300 #: ../tools/virt-make-fs.pl:129
30301 msgid "Optionally virt-make-fs can add a partition table to the output disk."
30305 #: ../tools/virt-make-fs.pl:131
30307 "Adding a partition can make the disk image more compatible with certain "
30308 "virtualized operating systems which don't expect to see a filesystem "
30309 "directly located on a block device (Linux doesn't care and will happily "
30310 "handle both types)."
30314 #: ../tools/virt-make-fs.pl:136
30316 "On the other hand, if you have a partition table then the output image is no "
30317 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
30318 "directly on a partitioned disk image. (However libguestfs tools such as "
30319 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
30323 #: ../tools/virt-make-fs.pl:144
30324 msgid "Add an MBR partition:"
30328 #: ../tools/virt-make-fs.pl:146
30331 " virt-make-fs --partition -- input disk.img\n"
30336 #: ../tools/virt-make-fs.pl:148
30338 "If the output disk image could be terabyte-sized or larger, it's better to "
30339 "use an EFI/GPT-compatible partition table:"
30343 #: ../tools/virt-make-fs.pl:151
30346 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
30351 #: ../tools/virt-make-fs.pl:179
30352 msgid "Enable debugging information."
30356 #: ../tools/virt-make-fs.pl:185
30357 msgid "B<--size=E<lt>NE<gt>>"
30361 #: ../tools/virt-make-fs.pl:187
30362 msgid "B<--size=+E<lt>NE<gt>>"
30366 #: ../tools/virt-make-fs.pl:189
30367 msgid "B<-s E<lt>NE<gt>>"
30371 #: ../tools/virt-make-fs.pl:191
30372 msgid "B<-s +E<lt>NE<gt>>"
30376 #: ../tools/virt-make-fs.pl:193
30378 "Use the I<--size> (or I<-s>) option to choose the size of the output image."
30382 #: ../tools/virt-make-fs.pl:196
30384 "If this option is I<not> given, then the output image will be just large "
30385 "enough to contain all the files, with not much wasted space."
30389 #: ../tools/virt-make-fs.pl:199
30391 "To choose a fixed size output disk, specify an absolute number followed by b/"
30392 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
30393 "Petabytes or Exabytes. This must be large enough to contain all the input "
30394 "files, else you will get an error."
30398 #: ../tools/virt-make-fs.pl:204
30400 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
30401 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
30402 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
30403 "the input files, and (approximately) an extra 200 MB free space."
30407 #: ../tools/virt-make-fs.pl:210
30409 "Note that virt-make-fs estimates free space, and therefore will not produce "
30410 "filesystems containing precisely the free space requested. (It is much more "
30411 "expensive and time-consuming to produce a filesystem which has precisely the "
30412 "desired free space)."
30416 #: ../tools/virt-make-fs.pl:219
30417 msgid "B<--format=E<lt>fmtE<gt>>"
30421 #: ../tools/virt-make-fs.pl:221
30422 msgid "B<-F E<lt>fmtE<gt>>"
30426 #: ../tools/virt-make-fs.pl:223
30427 msgid "Choose the output disk image format."
30431 #: ../tools/virt-make-fs.pl:225
30432 msgid "The default is C<raw> (raw disk image)."
30436 #: ../tools/virt-make-fs.pl:227
30438 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
30439 "that would really make sense here is C<qcow2>."
30443 #: ../tools/virt-make-fs.pl:234
30444 msgid "B<--type=E<lt>fsE<gt>>"
30448 #: ../tools/virt-make-fs.pl:236
30449 msgid "B<-t E<lt>fsE<gt>>"
30453 #: ../tools/virt-make-fs.pl:238
30454 msgid "Choose the output filesystem type."
30458 #: ../tools/virt-make-fs.pl:240
30459 msgid "The default is C<ext2>."
30463 #: ../tools/virt-make-fs.pl:242
30465 "Any filesystem which is supported read-write by libguestfs can be used here."
30469 #: ../tools/virt-make-fs.pl:249
30470 msgid "B<--partition>"
30474 #: ../tools/virt-make-fs.pl:251
30475 msgid "B<--partition=E<lt>parttypeE<gt>>"
30479 #: ../tools/virt-make-fs.pl:253
30481 "If specified, this flag adds an MBR partition table to the output disk image."
30485 #: ../tools/virt-make-fs.pl:256
30487 "You can change the partition table type, eg. I<--partition=gpt> for large "
30492 #: ../tools/virt-make-fs.pl:259
30494 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
30495 "might consider the next parameter to be the partition type. For example:"
30499 #: ../tools/virt-make-fs.pl:263
30502 " virt-make-fs --partition input.tar ...\n"
30507 #: ../tools/virt-make-fs.pl:265
30509 "would cause virt-make-fs to think you wanted to use a partition type of "
30510 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
30511 "dash) between options and the input file argument:"
30515 #: ../tools/virt-make-fs.pl:269
30518 " virt-make-fs --partition -- input.tar ...\n"
30523 #: ../tools/virt-make-fs.pl:541
30525 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
30526 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
30527 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
30531 #: ../tools/virt-make-fs.pl:558
30534 " export LIBGUESTFS_DEBUG=1\n"
30535 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
30540 #: ../tools/virt-make-fs.pl:561
30542 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
30547 #: ../tools/virt-list-partitions.pl:32
30549 "virt-list-partitions - List partitions in a virtual machine or disk image"
30553 #: ../tools/virt-list-partitions.pl:36
30556 " virt-list-partitions [--options] domname\n"
30561 #: ../tools/virt-list-partitions.pl:38
30564 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
30569 #: ../tools/virt-list-partitions.pl:45
30571 "C<virt-list-partitions> is a command line tool to list the partitions that "
30572 "are contained in a virtual machine or disk image. It is mainly useful as a "
30573 "first step to using L<virt-resize(1)>."
30577 #: ../tools/virt-list-partitions.pl:50
30579 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
30580 "functionality. For more complex cases you should look at the L<guestfish(1)"
30585 #: ../tools/virt-list-partitions.pl:107
30586 msgid "B<-h> | B<--human-readable>"
30590 #: ../tools/virt-list-partitions.pl:109
30591 msgid "Show sizes in human-readable form (eg. \"1G\")."
30595 #: ../tools/virt-list-partitions.pl:117
30597 "With this option, C<virt-list-partitions> displays the type and size of each "
30598 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
30602 #: ../tools/virt-list-partitions.pl:124
30603 msgid "B<-t> | B<--total>"
30607 #: ../tools/virt-list-partitions.pl:126
30609 "Display the total size of each block device (as a separate row or rows)."
30613 #: ../tools/virt-list-partitions.pl:259
30615 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
30616 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib"
30617 "(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
30621 #: ../tools/virt-list-partitions.pl:275
30622 msgid "Copyright (C) 2009-2010 Red Hat Inc."