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-17 17:29+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:1606
872 #: ../src/guestfs-actions.pod:1610 ../src/guestfs-actions.pod:1614
873 #: ../src/guestfs-actions.pod:1618 ../src/guestfs-actions.pod:1626
874 #: ../src/guestfs-actions.pod:1630 ../src/guestfs-actions.pod:1634
875 #: ../src/guestfs-actions.pod:1644 ../src/guestfs-actions.pod:1648
876 #: ../src/guestfs-actions.pod:1652 ../src/guestfs-actions.pod:1790
877 #: ../src/guestfs-actions.pod:1794 ../src/guestfs-actions.pod:1799
878 #: ../src/guestfs-actions.pod:1804 ../src/guestfs-actions.pod:1865
879 #: ../src/guestfs-actions.pod:1869 ../src/guestfs-actions.pod:1874
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:1077 ../fish/guestfish-actions.pod:1081
886 #: ../fish/guestfish-actions.pod:1085 ../fish/guestfish-actions.pod:1089
887 #: ../fish/guestfish-actions.pod:1097 ../fish/guestfish-actions.pod:1101
888 #: ../fish/guestfish-actions.pod:1105 ../fish/guestfish-actions.pod:1115
889 #: ../fish/guestfish-actions.pod:1119 ../fish/guestfish-actions.pod:1123
890 #: ../fish/guestfish-actions.pod:1213 ../fish/guestfish-actions.pod:1217
891 #: ../fish/guestfish-actions.pod:1222 ../fish/guestfish-actions.pod:1227
892 #: ../fish/guestfish-actions.pod:1269 ../fish/guestfish-actions.pod:1273
893 #: ../fish/guestfish-actions.pod:1278 ../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:707 ../tools/virt-win-reg.pl:713
896 #: ../tools/virt-win-reg.pl:719
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:1861 ../fish/guestfish-actions.pod:9
3309 #: ../fish/guestfish-actions.pod:1265 ../tools/virt-win-reg.pl:703
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:5827
5135 #: ../fish/guestfish-actions.pod:3920
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:269
5732 #: ../tools/virt-win-reg.pl:743 ../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:758
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:280
5827 #: ../src/guestfs.pod:2988 ../fish/guestfish.pod:1176
5828 #: ../test-tool/libguestfs-test-tool.pod:95 ../fuse/guestmount.pod:282
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:284
5835 #: ../tools/virt-win-reg.pl:773 ../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:1701 ../src/guestfs-actions.pod:1723
5935 #: ../src/guestfs-actions.pod:1810 ../src/guestfs-actions.pod:2272
5936 #: ../src/guestfs-actions.pod:2416 ../src/guestfs-actions.pod:2477
5937 #: ../src/guestfs-actions.pod:2512 ../src/guestfs-actions.pod:3465
5938 #: ../src/guestfs-actions.pod:3480 ../src/guestfs-actions.pod:3505
5939 #: ../src/guestfs-actions.pod:3660 ../src/guestfs-actions.pod:3674
5940 #: ../src/guestfs-actions.pod:3687 ../src/guestfs-actions.pod:3701
5941 #: ../src/guestfs-actions.pod:3716 ../src/guestfs-actions.pod:3752
5942 #: ../src/guestfs-actions.pod:3824 ../src/guestfs-actions.pod:3844
5943 #: ../src/guestfs-actions.pod:3861 ../src/guestfs-actions.pod:3884
5944 #: ../src/guestfs-actions.pod:3907 ../src/guestfs-actions.pod:3939
5945 #: ../src/guestfs-actions.pod:3958 ../src/guestfs-actions.pod:3977
5946 #: ../src/guestfs-actions.pod:4012 ../src/guestfs-actions.pod:4024
5947 #: ../src/guestfs-actions.pod:4060 ../src/guestfs-actions.pod:4076
5948 #: ../src/guestfs-actions.pod:4089 ../src/guestfs-actions.pod:4104
5949 #: ../src/guestfs-actions.pod:4121 ../src/guestfs-actions.pod:4214
5950 #: ../src/guestfs-actions.pod:4234 ../src/guestfs-actions.pod:4247
5951 #: ../src/guestfs-actions.pod:4298 ../src/guestfs-actions.pod:4316
5952 #: ../src/guestfs-actions.pod:4334 ../src/guestfs-actions.pod:4350
5953 #: ../src/guestfs-actions.pod:4364 ../src/guestfs-actions.pod:4378
5954 #: ../src/guestfs-actions.pod:4395 ../src/guestfs-actions.pod:4410
5955 #: ../src/guestfs-actions.pod:4430 ../src/guestfs-actions.pod:4488
5956 #: ../src/guestfs-actions.pod:4561 ../src/guestfs-actions.pod:4592
5957 #: ../src/guestfs-actions.pod:4611 ../src/guestfs-actions.pod:4630
5958 #: ../src/guestfs-actions.pod:4642 ../src/guestfs-actions.pod:4659
5959 #: ../src/guestfs-actions.pod:4672 ../src/guestfs-actions.pod:4687
5960 #: ../src/guestfs-actions.pod:4702 ../src/guestfs-actions.pod:4737
5961 #: ../src/guestfs-actions.pod:4759 ../src/guestfs-actions.pod:4779
5962 #: ../src/guestfs-actions.pod:4793 ../src/guestfs-actions.pod:4810
5963 #: ../src/guestfs-actions.pod:4859 ../src/guestfs-actions.pod:4896
5964 #: ../src/guestfs-actions.pod:4910 ../src/guestfs-actions.pod:4938
5965 #: ../src/guestfs-actions.pod:4955 ../src/guestfs-actions.pod:4973
5966 #: ../src/guestfs-actions.pod:5107 ../src/guestfs-actions.pod:5164
5967 #: ../src/guestfs-actions.pod:5186 ../src/guestfs-actions.pod:5204
5968 #: ../src/guestfs-actions.pod:5236 ../src/guestfs-actions.pod:5302
5969 #: ../src/guestfs-actions.pod:5319 ../src/guestfs-actions.pod:5332
5970 #: ../src/guestfs-actions.pod:5346 ../src/guestfs-actions.pod:5635
5971 #: ../src/guestfs-actions.pod:5654 ../src/guestfs-actions.pod:5673
5972 #: ../src/guestfs-actions.pod:5685 ../src/guestfs-actions.pod:5697
5973 #: ../src/guestfs-actions.pod:5711 ../src/guestfs-actions.pod:5723
5974 #: ../src/guestfs-actions.pod:5737 ../src/guestfs-actions.pod:5753
5975 #: ../src/guestfs-actions.pod:5774 ../src/guestfs-actions.pod:5793
5976 #: ../src/guestfs-actions.pod:5812 ../src/guestfs-actions.pod:5842
5977 #: ../src/guestfs-actions.pod:5858 ../src/guestfs-actions.pod:5881
5978 #: ../src/guestfs-actions.pod:5899 ../src/guestfs-actions.pod:5918
5979 #: ../src/guestfs-actions.pod:5939 ../src/guestfs-actions.pod:5958
5980 #: ../src/guestfs-actions.pod:5975 ../src/guestfs-actions.pod:6003
5981 #: ../src/guestfs-actions.pod:6027 ../src/guestfs-actions.pod:6046
5982 #: ../src/guestfs-actions.pod:6070 ../src/guestfs-actions.pod:6089
5983 #: ../src/guestfs-actions.pod:6104 ../src/guestfs-actions.pod:6123
5984 #: ../src/guestfs-actions.pod:6160 ../src/guestfs-actions.pod:6190
5985 #: ../src/guestfs-actions.pod:6223 ../src/guestfs-actions.pod:6345
5986 #: ../src/guestfs-actions.pod:6466 ../src/guestfs-actions.pod:6478
5987 #: ../src/guestfs-actions.pod:6491 ../src/guestfs-actions.pod:6504
5988 #: ../src/guestfs-actions.pod:6526 ../src/guestfs-actions.pod:6539
5989 #: ../src/guestfs-actions.pod:6552 ../src/guestfs-actions.pod:6565
5990 #: ../src/guestfs-actions.pod:6580 ../src/guestfs-actions.pod:6639
5991 #: ../src/guestfs-actions.pod:6656 ../src/guestfs-actions.pod:6672
5992 #: ../src/guestfs-actions.pod:6688 ../src/guestfs-actions.pod:6705
5993 #: ../src/guestfs-actions.pod:6718 ../src/guestfs-actions.pod:6738
5994 #: ../src/guestfs-actions.pod:6774 ../src/guestfs-actions.pod:6788
5995 #: ../src/guestfs-actions.pod:6829 ../src/guestfs-actions.pod:6842
5996 #: ../src/guestfs-actions.pod:6860 ../src/guestfs-actions.pod:6894
5997 #: ../src/guestfs-actions.pod:6930 ../src/guestfs-actions.pod:7049
5998 #: ../src/guestfs-actions.pod:7067 ../src/guestfs-actions.pod:7081
5999 #: ../src/guestfs-actions.pod:7136 ../src/guestfs-actions.pod:7149
6000 #: ../src/guestfs-actions.pod:7194 ../src/guestfs-actions.pod:7227
6001 #: ../src/guestfs-actions.pod:7288 ../src/guestfs-actions.pod:7314
6002 #: ../src/guestfs-actions.pod:7380 ../src/guestfs-actions.pod:7399
6003 #: ../src/guestfs-actions.pod:7428
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:1950 ../src/guestfs-actions.pod:1971
6020 #: ../src/guestfs-actions.pod:4435 ../src/guestfs-actions.pod:4742
6021 #: ../src/guestfs-actions.pod:6168 ../src/guestfs-actions.pod:6198
6022 #: ../src/guestfs-actions.pod:6231 ../src/guestfs-actions.pod:6290
6023 #: ../src/guestfs-actions.pod:7232 ../src/guestfs-actions.pod:7322
6024 #: ../src/guestfs-actions.pod:7491 ../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:1324
6027 #: ../fish/guestfish-actions.pod:1338 ../fish/guestfish-actions.pod:3013
6028 #: ../fish/guestfish-actions.pod:3210 ../fish/guestfish-actions.pod:4182
6029 #: ../fish/guestfish-actions.pod:4205 ../fish/guestfish-actions.pod:4227
6030 #: ../fish/guestfish-actions.pod:4265 ../fish/guestfish-actions.pod:4906
6031 #: ../fish/guestfish-actions.pod:5003
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:1922
6041 #: ../src/guestfs-actions.pod:2020 ../src/guestfs-actions.pod:2123
6042 #: ../src/guestfs-actions.pod:3467 ../src/guestfs-actions.pod:3487
6043 #: ../src/guestfs-actions.pod:4746 ../src/guestfs-actions.pod:5860
6044 #: ../src/guestfs-actions.pod:5977 ../src/guestfs-actions.pod:6091
6045 #: ../src/guestfs-actions.pod:6582 ../src/guestfs-actions.pod:6707
6046 #: ../src/guestfs-actions.pod:7236
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:4449
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:1680 ../src/guestfs-actions.pod:1883
6160 #: ../src/guestfs-actions.pod:1992 ../src/guestfs-actions.pod:2032
6161 #: ../src/guestfs-actions.pod:2087 ../src/guestfs-actions.pod:2110
6162 #: ../src/guestfs-actions.pod:2403 ../src/guestfs-actions.pod:2786
6163 #: ../src/guestfs-actions.pod:2807 ../src/guestfs-actions.pod:4882
6164 #: ../src/guestfs-actions.pod:5010 ../src/guestfs-actions.pod:5416
6165 #: ../src/guestfs-actions.pod:5442 ../src/guestfs-actions.pod:6815
6166 #: ../src/guestfs-actions.pod:7247 ../src/guestfs-actions.pod:7260
6167 #: ../src/guestfs-actions.pod:7273
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:4502 ../src/guestfs-actions.pod:4514
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:4460
6308 #: ../fish/guestfish-actions.pod:115 ../fish/guestfish-actions.pod:3024
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:2362
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:2112
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:5493
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:1551 ../src/guestfs-actions.pod:1663
6649 #: ../src/guestfs-actions.pod:1826 ../src/guestfs-actions.pod:1843
6650 #: ../src/guestfs-actions.pod:1910 ../src/guestfs-actions.pod:1944
6651 #: ../src/guestfs-actions.pod:1965 ../src/guestfs-actions.pod:2135
6652 #: ../src/guestfs-actions.pod:2327 ../src/guestfs-actions.pod:2534
6653 #: ../src/guestfs-actions.pod:2627 ../src/guestfs-actions.pod:2738
6654 #: ../src/guestfs-actions.pod:2758 ../src/guestfs-actions.pod:2878
6655 #: ../src/guestfs-actions.pod:2909 ../src/guestfs-actions.pod:2933
6656 #: ../src/guestfs-actions.pod:2970 ../src/guestfs-actions.pod:3030
6657 #: ../src/guestfs-actions.pod:3053 ../src/guestfs-actions.pod:3074
6658 #: ../src/guestfs-actions.pod:3646 ../src/guestfs-actions.pod:3996
6659 #: ../src/guestfs-actions.pod:4166 ../src/guestfs-actions.pod:4276
6660 #: ../src/guestfs-actions.pod:5028 ../src/guestfs-actions.pod:5221
6661 #: ../src/guestfs-actions.pod:5391 ../src/guestfs-actions.pod:5569
6662 #: ../src/guestfs-actions.pod:5618 ../src/guestfs-actions.pod:6251
6663 #: ../src/guestfs-actions.pod:6267 ../src/guestfs-actions.pod:6284
6664 #: ../src/guestfs-actions.pod:6315 ../src/guestfs-actions.pod:6989
6665 #: ../src/guestfs-actions.pod:7008 ../src/guestfs-actions.pod:7026
6666 #: ../src/guestfs-actions.pod:7206 ../src/guestfs-actions.pod:7485
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:1765 ../src/guestfs-actions.pod:2207
6869 #: ../src/guestfs-actions.pod:2223 ../src/guestfs-actions.pod:2242
6870 #: ../src/guestfs-actions.pod:2285 ../src/guestfs-actions.pod:2309
6871 #: ../src/guestfs-actions.pod:2380 ../src/guestfs-actions.pod:2429
6872 #: ../src/guestfs-actions.pod:2696 ../src/guestfs-actions.pod:2987
6873 #: ../src/guestfs-actions.pod:3276 ../src/guestfs-actions.pod:3566
6874 #: ../src/guestfs-actions.pod:3628 ../src/guestfs-actions.pod:3733
6875 #: ../src/guestfs-actions.pod:4138 ../src/guestfs-actions.pod:4843
6876 #: ../src/guestfs-actions.pod:5363 ../src/guestfs-actions.pod:5489
6877 #: ../src/guestfs-actions.pod:5603 ../src/guestfs-actions.pod:6331
6878 #: ../src/guestfs-actions.pod:6392 ../src/guestfs-actions.pod:6447
6879 #: ../src/guestfs-actions.pod:6593 ../src/guestfs-actions.pod:6617
6880 #: ../src/guestfs-actions.pod:7099 ../src/guestfs-actions.pod:7119
6881 #: ../src/guestfs-actions.pod:7166 ../src/guestfs-actions.pod:7338
6882 #: ../src/guestfs-actions.pod:7357 ../src/guestfs-actions.pod:7442
6883 #: ../src/guestfs-actions.pod:7461 ../src/guestfs-actions.pod:7507
6884 #: ../src/guestfs-actions.pod:7526
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:3354 ../src/guestfs-actions.pod:3385
6895 #: ../src/guestfs-actions.pod:3979 ../src/guestfs-actions.pod:4029
6896 #: ../src/guestfs-actions.pod:4216 ../src/guestfs-actions.pod:4249
6897 #: ../src/guestfs-actions.pod:4412 ../src/guestfs-actions.pod:4847
6898 #: ../src/guestfs-actions.pod:5304 ../src/guestfs-actions.pod:5699
6899 #: ../src/guestfs-actions.pod:5713 ../src/guestfs-actions.pod:5725
6900 #: ../src/guestfs-actions.pod:6172 ../src/guestfs-actions.pod:6831
6901 #: ../src/guestfs-actions.pod:6844 ../src/guestfs-actions.pod:7083
6902 #: ../src/guestfs-actions.pod:7326
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:1920
7316 #: ../src/guestfs-actions.pod:1931 ../src/guestfs-actions.pod:2003
7317 #: ../src/guestfs-actions.pod:2058 ../src/guestfs-actions.pod:2073
7318 #: ../src/guestfs-actions.pod:2098 ../src/guestfs-actions.pod:2121
7319 #: ../src/guestfs-actions.pod:3094 ../src/guestfs-actions.pod:3111
7320 #: ../src/guestfs-actions.pod:3130 ../src/guestfs-actions.pod:3293
7321 #: ../src/guestfs-actions.pod:3307 ../src/guestfs-actions.pod:3322
7322 #: ../src/guestfs-actions.pod:3336 ../src/guestfs-actions.pod:3352
7323 #: ../src/guestfs-actions.pod:3367 ../src/guestfs-actions.pod:3383
7324 #: ../src/guestfs-actions.pod:3397 ../src/guestfs-actions.pod:3410
7325 #: ../src/guestfs-actions.pod:3424 ../src/guestfs-actions.pod:3439
7326 #: ../src/guestfs-actions.pod:3454 ../src/guestfs-actions.pod:4992
7327 msgid "This function returns a C truth value on success or -1 on error."
7331 #: ../src/guestfs-actions.pod:712
7332 msgid "guestfs_blockdev_getsize64"
7336 #: ../src/guestfs-actions.pod:714
7340 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
7341 " const char *device);\n"
7346 #: ../src/guestfs-actions.pod:718 ../fish/guestfish-actions.pod:479
7347 msgid "This returns the size of the device in bytes."
7351 #: ../src/guestfs-actions.pod:720
7352 msgid "See also C<guestfs_blockdev_getsz>."
7356 #: ../src/guestfs-actions.pod:728
7357 msgid "guestfs_blockdev_getss"
7361 #: ../src/guestfs-actions.pod:730
7365 " guestfs_blockdev_getss (guestfs_h *g,\n"
7366 " const char *device);\n"
7371 #: ../src/guestfs-actions.pod:734 ../fish/guestfish-actions.pod:489
7373 "This returns the size of sectors on a block device. Usually 512, but can be "
7374 "larger for modern devices."
7378 #: ../src/guestfs-actions.pod:737
7380 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
7385 #: ../src/guestfs-actions.pod:746
7386 msgid "guestfs_blockdev_getsz"
7390 #: ../src/guestfs-actions.pod:748
7394 " guestfs_blockdev_getsz (guestfs_h *g,\n"
7395 " const char *device);\n"
7400 #: ../src/guestfs-actions.pod:752 ../fish/guestfish-actions.pod:501
7402 "This returns the size of the device in units of 512-byte sectors (even if "
7403 "the sectorsize isn't 512 bytes ... weird)."
7407 #: ../src/guestfs-actions.pod:755
7409 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
7410 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
7414 #: ../src/guestfs-actions.pod:765
7415 msgid "guestfs_blockdev_rereadpt"
7419 #: ../src/guestfs-actions.pod:767
7423 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
7424 " const char *device);\n"
7429 #: ../src/guestfs-actions.pod:771 ../fish/guestfish-actions.pod:514
7430 msgid "Reread the partition table on C<device>."
7434 #: ../src/guestfs-actions.pod:779
7435 msgid "guestfs_blockdev_setbsz"
7439 #: ../src/guestfs-actions.pod:781
7443 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
7444 " const char *device,\n"
7445 " int blocksize);\n"
7450 #: ../src/guestfs-actions.pod:786 ../fish/guestfish-actions.pod:522
7451 msgid "This sets the block size of a device."
7455 #: ../src/guestfs-actions.pod:797
7456 msgid "guestfs_blockdev_setro"
7460 #: ../src/guestfs-actions.pod:799
7464 " guestfs_blockdev_setro (guestfs_h *g,\n"
7465 " const char *device);\n"
7470 #: ../src/guestfs-actions.pod:803 ../fish/guestfish-actions.pod:533
7471 msgid "Sets the block device named C<device> to read-only."
7475 #: ../src/guestfs-actions.pod:811
7476 msgid "guestfs_blockdev_setrw"
7480 #: ../src/guestfs-actions.pod:813
7484 " guestfs_blockdev_setrw (guestfs_h *g,\n"
7485 " const char *device);\n"
7490 #: ../src/guestfs-actions.pod:817 ../fish/guestfish-actions.pod:541
7491 msgid "Sets the block device named C<device> to read-write."
7495 #: ../src/guestfs-actions.pod:825
7496 msgid "guestfs_case_sensitive_path"
7500 #: ../src/guestfs-actions.pod:827
7504 " guestfs_case_sensitive_path (guestfs_h *g,\n"
7505 " const char *path);\n"
7510 #: ../src/guestfs-actions.pod:831 ../fish/guestfish-actions.pod:549
7512 "This can be used to resolve case insensitive paths on a filesystem which is "
7513 "case sensitive. The use case is to resolve paths which you have read from "
7514 "Windows configuration files or the Windows Registry, to the true path."
7518 #: ../src/guestfs-actions.pod:836 ../fish/guestfish-actions.pod:554
7520 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
7521 "(and probably others), which is that although the underlying filesystem is "
7522 "case-insensitive, the driver exports the filesystem to Linux as case-"
7527 #: ../src/guestfs-actions.pod:841 ../fish/guestfish-actions.pod:559
7529 "One consequence of this is that special directories such as C<c:\\windows> "
7530 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
7531 "precise details of how they were created. In Windows itself this would not "
7536 #: ../src/guestfs-actions.pod:847 ../fish/guestfish-actions.pod:565
7538 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
7543 #: ../src/guestfs-actions.pod:850 ../fish/guestfish-actions.pod:568
7545 "This function resolves the true case of each element in the path and returns "
7546 "the case-sensitive path."
7550 #: ../src/guestfs-actions.pod:853
7552 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
7553 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
7554 "how the directories were originally created under Windows)."
7558 #: ../src/guestfs-actions.pod:858 ../fish/guestfish-actions.pod:576
7559 msgid "I<Note>: This function does not handle drive names, backslashes etc."
7563 #: ../src/guestfs-actions.pod:861
7564 msgid "See also C<guestfs_realpath>."
7568 #: ../src/guestfs-actions.pod:866 ../src/guestfs-actions.pod:7011
7569 msgid "(Added in 1.0.75)"
7573 #: ../src/guestfs-actions.pod:868
7578 #: ../src/guestfs-actions.pod:870
7582 " guestfs_cat (guestfs_h *g,\n"
7583 " const char *path);\n"
7588 #: ../src/guestfs-actions.pod:874 ../src/guestfs-actions.pod:5479
7589 #: ../fish/guestfish-actions.pod:585 ../fish/guestfish-actions.pod:3679
7590 msgid "Return the contents of the file named C<path>."
7594 #: ../src/guestfs-actions.pod:876
7596 "Note that this function cannot correctly handle binary files (specifically, "
7597 "files containing C<\\0> character which is treated as end of string). For "
7598 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
7599 "functions which have a more complex interface."
7603 #: ../src/guestfs-actions.pod:884 ../src/guestfs-actions.pod:1063
7604 #: ../src/guestfs-actions.pod:1083 ../src/guestfs-actions.pod:1379
7605 #: ../src/guestfs-actions.pod:1398 ../src/guestfs-actions.pod:1501
7606 #: ../src/guestfs-actions.pod:1520 ../src/guestfs-actions.pod:1769
7607 #: ../src/guestfs-actions.pod:2227 ../src/guestfs-actions.pod:2246
7608 #: ../src/guestfs-actions.pod:2289 ../src/guestfs-actions.pod:2313
7609 #: ../src/guestfs-actions.pod:2330 ../src/guestfs-actions.pod:2359
7610 #: ../src/guestfs-actions.pod:5261 ../src/guestfs-actions.pod:5287
7611 #: ../src/guestfs-actions.pod:5418 ../src/guestfs-actions.pod:5444
7612 #: ../src/guestfs-actions.pod:5468 ../src/guestfs-actions.pod:6396
7613 #: ../src/guestfs-actions.pod:6451 ../src/guestfs-actions.pod:6597
7614 #: ../src/guestfs-actions.pod:6621 ../src/guestfs-actions.pod:7290
7615 #: ../src/guestfs-actions.pod:7316 ../src/guestfs-actions.pod:7342
7616 #: ../src/guestfs-actions.pod:7361 ../src/guestfs-actions.pod:7446
7617 #: ../src/guestfs-actions.pod:7465 ../src/guestfs-actions.pod:7511
7618 #: ../src/guestfs-actions.pod:7530 ../fish/guestfish-actions.pod:592
7619 #: ../fish/guestfish-actions.pod:727 ../fish/guestfish-actions.pod:739
7620 #: ../fish/guestfish-actions.pod:915 ../fish/guestfish-actions.pod:925
7621 #: ../fish/guestfish-actions.pod:992 ../fish/guestfish-actions.pod:1002
7622 #: ../fish/guestfish-actions.pod:1197 ../fish/guestfish-actions.pod:1498
7623 #: ../fish/guestfish-actions.pod:1508 ../fish/guestfish-actions.pod:1536
7624 #: ../fish/guestfish-actions.pod:1551 ../fish/guestfish-actions.pod:1561
7625 #: ../fish/guestfish-actions.pod:1580 ../fish/guestfish-actions.pod:3549
7626 #: ../fish/guestfish-actions.pod:3564 ../fish/guestfish-actions.pod:3640
7627 #: ../fish/guestfish-actions.pod:3657 ../fish/guestfish-actions.pod:3672
7628 #: ../fish/guestfish-actions.pod:4326 ../fish/guestfish-actions.pod:4372
7629 #: ../fish/guestfish-actions.pod:4457 ../fish/guestfish-actions.pod:4472
7630 #: ../fish/guestfish-actions.pod:4882 ../fish/guestfish-actions.pod:4900
7631 #: ../fish/guestfish-actions.pod:4917 ../fish/guestfish-actions.pod:4927
7632 #: ../fish/guestfish-actions.pod:4975 ../fish/guestfish-actions.pod:4985
7633 #: ../fish/guestfish-actions.pod:5014 ../fish/guestfish-actions.pod:5024
7635 "Because of the message protocol, there is a transfer limit of somewhere "
7636 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
7640 #: ../src/guestfs-actions.pod:887 ../src/guestfs-actions.pod:3570
7641 #: ../src/guestfs-actions.pod:3632 ../src/guestfs-actions.pod:3649
7642 #: ../src/guestfs-actions.pod:3737 ../src/guestfs-actions.pod:4142
7643 #: ../src/guestfs-actions.pod:4156 ../src/guestfs-actions.pod:5367
7644 #: ../src/guestfs-actions.pod:5381 ../src/guestfs-actions.pod:7170
7645 #: ../src/guestfs-actions.pod:7184
7646 msgid "(Added in 0.4)"
7650 #: ../src/guestfs-actions.pod:889
7651 msgid "guestfs_checksum"
7655 #: ../src/guestfs-actions.pod:891
7659 " guestfs_checksum (guestfs_h *g,\n"
7660 " const char *csumtype,\n"
7661 " const char *path);\n"
7666 #: ../src/guestfs-actions.pod:896 ../fish/guestfish-actions.pod:599
7668 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
7672 #: ../src/guestfs-actions.pod:899 ../fish/guestfish-actions.pod:602
7674 "The type of checksum to compute is given by the C<csumtype> parameter which "
7675 "must have one of the following values:"
7679 #: ../src/guestfs-actions.pod:904 ../fish/guestfish-actions.pod:607
7684 #: ../src/guestfs-actions.pod:906 ../fish/guestfish-actions.pod:609
7686 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
7691 #: ../src/guestfs-actions.pod:909 ../fish/guestfish-actions.pod:612
7696 #: ../src/guestfs-actions.pod:911 ../fish/guestfish-actions.pod:614
7697 msgid "Compute the MD5 hash (using the C<md5sum> program)."
7701 #: ../src/guestfs-actions.pod:913 ../fish/guestfish-actions.pod:616
7706 #: ../src/guestfs-actions.pod:915 ../fish/guestfish-actions.pod:618
7707 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
7711 #: ../src/guestfs-actions.pod:917 ../fish/guestfish-actions.pod:620
7716 #: ../src/guestfs-actions.pod:919 ../fish/guestfish-actions.pod:622
7717 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
7721 #: ../src/guestfs-actions.pod:921 ../fish/guestfish-actions.pod:624
7726 #: ../src/guestfs-actions.pod:923 ../fish/guestfish-actions.pod:626
7727 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
7731 #: ../src/guestfs-actions.pod:925 ../fish/guestfish-actions.pod:628
7736 #: ../src/guestfs-actions.pod:927 ../fish/guestfish-actions.pod:630
7737 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
7741 #: ../src/guestfs-actions.pod:929 ../fish/guestfish-actions.pod:632
7746 #: ../src/guestfs-actions.pod:931 ../fish/guestfish-actions.pod:634
7747 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
7751 #: ../src/guestfs-actions.pod:935 ../fish/guestfish-actions.pod:638
7752 msgid "The checksum is returned as a printable string."
7756 #: ../src/guestfs-actions.pod:937
7757 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
7761 #: ../src/guestfs-actions.pod:939
7762 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
7766 #: ../src/guestfs-actions.pod:944 ../src/guestfs-actions.pod:1252
7767 #: ../src/guestfs-actions.pod:2089 ../src/guestfs-actions.pod:3309
7768 #: ../src/guestfs-actions.pod:3338 ../src/guestfs-actions.pod:3399
7769 #: ../src/guestfs-actions.pod:3426 ../src/guestfs-actions.pod:6867
7770 msgid "(Added in 1.0.2)"
7774 #: ../src/guestfs-actions.pod:946
7775 msgid "guestfs_checksum_device"
7779 #: ../src/guestfs-actions.pod:948
7783 " guestfs_checksum_device (guestfs_h *g,\n"
7784 " const char *csumtype,\n"
7785 " const char *device);\n"
7790 #: ../src/guestfs-actions.pod:953
7792 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
7793 "device named C<device>. For the types of checksums supported see the "
7794 "C<guestfs_checksum> command."
7798 #: ../src/guestfs-actions.pod:960 ../src/guestfs-actions.pod:4898
7799 #: ../src/guestfs-actions.pod:4957 ../src/guestfs-actions.pod:4994
7800 #: ../src/guestfs-actions.pod:5012 ../src/guestfs-actions.pod:5188
7801 #: ../src/guestfs-actions.pod:6776 ../src/guestfs-actions.pod:6790
7802 #: ../src/guestfs-actions.pod:7196
7803 msgid "(Added in 1.3.2)"
7807 #: ../src/guestfs-actions.pod:962
7808 msgid "guestfs_checksums_out"
7812 #: ../src/guestfs-actions.pod:964
7816 " guestfs_checksums_out (guestfs_h *g,\n"
7817 " const char *csumtype,\n"
7818 " const char *directory,\n"
7819 " const char *sumsfile);\n"
7824 #: ../src/guestfs-actions.pod:970 ../fish/guestfish-actions.pod:656
7826 "This command computes the checksums of all regular files in C<directory> and "
7827 "then emits a list of those checksums to the local output file C<sumsfile>."
7831 #: ../src/guestfs-actions.pod:974 ../fish/guestfish-actions.pod:660
7833 "This can be used for verifying the integrity of a virtual machine. However "
7834 "to be properly secure you should pay attention to the output of the checksum "
7835 "command (it uses the ones from GNU coreutils). In particular when the "
7836 "filename is not printable, coreutils uses a special backslash syntax. For "
7837 "more information, see the GNU coreutils info file."
7841 #: ../src/guestfs-actions.pod:984
7842 msgid "(Added in 1.3.7)"
7846 #: ../src/guestfs-actions.pod:986
7847 msgid "guestfs_chmod"
7851 #: ../src/guestfs-actions.pod:988
7855 " guestfs_chmod (guestfs_h *g,\n"
7857 " const char *path);\n"
7862 #: ../src/guestfs-actions.pod:993 ../fish/guestfish-actions.pod:674
7864 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
7869 #: ../src/guestfs-actions.pod:996 ../fish/guestfish-actions.pod:677
7871 "I<Note>: When using this command from guestfish, C<mode> by default would be "
7872 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
7877 #: ../src/guestfs-actions.pod:1000 ../src/guestfs-actions.pod:4393
7878 #: ../src/guestfs-actions.pod:4590 ../src/guestfs-actions.pod:4609
7879 #: ../src/guestfs-actions.pod:4628 ../fish/guestfish-actions.pod:681
7880 #: ../fish/guestfish-actions.pod:2988 ../fish/guestfish-actions.pod:3117
7881 #: ../fish/guestfish-actions.pod:3127 ../fish/guestfish-actions.pod:3137
7882 msgid "The mode actually set is affected by the umask."
7886 #: ../src/guestfs-actions.pod:1006
7887 msgid "guestfs_chown"
7891 #: ../src/guestfs-actions.pod:1008
7895 " guestfs_chown (guestfs_h *g,\n"
7898 " const char *path);\n"
7903 #: ../src/guestfs-actions.pod:1014 ../fish/guestfish-actions.pod:687
7904 msgid "Change the file owner to C<owner> and group to C<group>."
7908 #: ../src/guestfs-actions.pod:1016 ../src/guestfs-actions.pod:3501
7909 #: ../fish/guestfish-actions.pod:689 ../fish/guestfish-actions.pod:2446
7911 "Only numeric uid and gid are supported. If you want to use names, you will "
7912 "need to locate and parse the password file yourself (Augeas support makes "
7913 "this relatively easy)."
7917 #: ../src/guestfs-actions.pod:1024
7918 msgid "guestfs_command"
7922 #: ../src/guestfs-actions.pod:1026
7926 " guestfs_command (guestfs_h *g,\n"
7927 " char *const *arguments);\n"
7932 #: ../src/guestfs-actions.pod:1030 ../fish/guestfish-actions.pod:697
7934 "This call runs a command from the guest filesystem. The filesystem must be "
7935 "mounted, and must contain a compatible operating system (ie. something "
7936 "Linux, with the same or compatible processor architecture)."
7940 #: ../src/guestfs-actions.pod:1035
7942 "The single parameter is an argv-style list of arguments. The first element "
7943 "is the name of the program to run. Subsequent elements are parameters. The "
7944 "list must be non-empty (ie. must contain a program name). Note that the "
7945 "command runs directly, and is I<not> invoked via the shell (see "
7950 #: ../src/guestfs-actions.pod:1042 ../fish/guestfish-actions.pod:709
7951 msgid "The return value is anything printed to I<stdout> by the command."
7955 #: ../src/guestfs-actions.pod:1045 ../fish/guestfish-actions.pod:712
7957 "If the command returns a non-zero exit status, then this function returns an "
7958 "error message. The error message string is the content of I<stderr> from "
7963 #: ../src/guestfs-actions.pod:1049 ../fish/guestfish-actions.pod:716
7965 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
7966 "bin>. If you require a program from another location, you should provide "
7967 "the full path in the first parameter."
7971 #: ../src/guestfs-actions.pod:1054 ../fish/guestfish-actions.pod:721
7973 "Shared libraries and data files required by the program must be available on "
7974 "filesystems which are mounted in the correct places. It is the caller's "
7975 "responsibility to ensure all filesystems that are needed are mounted at the "
7980 #: ../src/guestfs-actions.pod:1066 ../src/guestfs-actions.pod:1086
7981 #: ../src/guestfs-actions.pod:1554
7982 msgid "(Added in 0.9.1)"
7986 #: ../src/guestfs-actions.pod:1068
7987 msgid "guestfs_command_lines"
7991 #: ../src/guestfs-actions.pod:1070
7995 " guestfs_command_lines (guestfs_h *g,\n"
7996 " char *const *arguments);\n"
8001 #: ../src/guestfs-actions.pod:1074
8003 "This is the same as C<guestfs_command>, but splits the result into a list of "
8008 #: ../src/guestfs-actions.pod:1077
8009 msgid "See also: C<guestfs_sh_lines>"
8013 #: ../src/guestfs-actions.pod:1088
8014 msgid "guestfs_config"
8018 #: ../src/guestfs-actions.pod:1090
8022 " guestfs_config (guestfs_h *g,\n"
8023 " const char *qemuparam,\n"
8024 " const char *qemuvalue);\n"
8029 #: ../src/guestfs-actions.pod:1095 ../fish/guestfish-actions.pod:746
8031 "This can be used to add arbitrary qemu command line parameters of the form "
8032 "I<-param value>. Actually it's not quite arbitrary - we prevent you from "
8033 "setting some parameters which would interfere with parameters that we use."
8037 #: ../src/guestfs-actions.pod:1100 ../fish/guestfish-actions.pod:751
8038 msgid "The first character of C<param> string must be a C<-> (dash)."
8042 #: ../src/guestfs-actions.pod:1102 ../fish/guestfish-actions.pod:753
8043 msgid "C<value> can be NULL."
8047 #: ../src/guestfs-actions.pod:1108
8048 msgid "guestfs_copy_size"
8052 #: ../src/guestfs-actions.pod:1110
8056 " guestfs_copy_size (guestfs_h *g,\n"
8057 " const char *src,\n"
8058 " const char *dest,\n"
8064 #: ../src/guestfs-actions.pod:1116 ../fish/guestfish-actions.pod:759
8066 "This command copies exactly C<size> bytes from one source device or file "
8067 "C<src> to another destination device or file C<dest>."
8071 #: ../src/guestfs-actions.pod:1119 ../fish/guestfish-actions.pod:762
8073 "Note this will fail if the source is too short or if the destination is not "
8078 #: ../src/guestfs-actions.pod:1124 ../src/guestfs-actions.pod:1247
8079 #: ../src/guestfs-actions.pod:1278 ../src/guestfs-actions.pod:1323
8080 #: ../src/guestfs-actions.pod:1703 ../src/guestfs-actions.pod:1725
8081 #: ../src/guestfs-actions.pod:3482 ../src/guestfs-actions.pod:6862
8082 #: ../src/guestfs-actions.pod:6896 ../src/guestfs-actions.pod:7382
8083 #: ../src/guestfs-actions.pod:7401
8085 "This long-running command can generate progress notification messages so "
8086 "that the caller can display a progress bar or indicator. To receive these "
8087 "messages, the caller must register a progress event callback. See L<guestfs"
8088 "(3)/GUESTFS_EVENT_PROGRESS>."
8092 #: ../src/guestfs-actions.pod:1129 ../src/guestfs-actions.pod:4169
8093 #: ../src/guestfs-actions.pod:5394 ../src/guestfs-actions.pod:7103
8094 #: ../src/guestfs-actions.pod:7123 ../src/guestfs-actions.pod:7209
8095 msgid "(Added in 1.0.87)"
8099 #: ../src/guestfs-actions.pod:1131
8104 #: ../src/guestfs-actions.pod:1133
8108 " guestfs_cp (guestfs_h *g,\n"
8109 " const char *src,\n"
8110 " const char *dest);\n"
8115 #: ../src/guestfs-actions.pod:1138 ../fish/guestfish-actions.pod:769
8117 "This copies a file from C<src> to C<dest> where C<dest> is either a "
8118 "destination filename or destination directory."
8122 #: ../src/guestfs-actions.pod:1143 ../src/guestfs-actions.pod:1157
8123 #: ../src/guestfs-actions.pod:1229 ../src/guestfs-actions.pod:1303
8124 #: ../src/guestfs-actions.pod:1417 ../src/guestfs-actions.pod:4861
8125 #: ../src/guestfs-actions.pod:5238
8126 msgid "(Added in 1.0.18)"
8130 #: ../src/guestfs-actions.pod:1145
8131 msgid "guestfs_cp_a"
8135 #: ../src/guestfs-actions.pod:1147
8139 " guestfs_cp_a (guestfs_h *g,\n"
8140 " const char *src,\n"
8141 " const char *dest);\n"
8146 #: ../src/guestfs-actions.pod:1152 ../fish/guestfish-actions.pod:776
8148 "This copies a file or directory from C<src> to C<dest> recursively using the "
8153 #: ../src/guestfs-actions.pod:1159
8158 #: ../src/guestfs-actions.pod:1161
8162 " guestfs_dd (guestfs_h *g,\n"
8163 " const char *src,\n"
8164 " const char *dest);\n"
8169 #: ../src/guestfs-actions.pod:1166 ../fish/guestfish-actions.pod:783
8171 "This command copies from one source device or file C<src> to another "
8172 "destination device or file C<dest>. Normally you would use this to copy to "
8173 "or from a device or partition, for example to duplicate a filesystem."
8177 #: ../src/guestfs-actions.pod:1171
8179 "If the destination is a device, it must be as large or larger than the "
8180 "source file or device, otherwise the copy will fail. This command cannot do "
8181 "partial copies (see C<guestfs_copy_size>)."
8185 #: ../src/guestfs-actions.pod:1179
8190 #: ../src/guestfs-actions.pod:1181
8194 " guestfs_df (guestfs_h *g);\n"
8199 #: ../src/guestfs-actions.pod:1184 ../fish/guestfish-actions.pod:796
8200 msgid "This command runs the C<df> command to report disk space used."
8204 #: ../src/guestfs-actions.pod:1186 ../src/guestfs-actions.pod:1203
8206 "This command is mostly useful for interactive sessions. It is I<not> "
8207 "intended that you try to parse the output string. Use C<guestfs_statvfs> "
8212 #: ../src/guestfs-actions.pod:1193 ../src/guestfs-actions.pod:1210
8213 #: ../src/guestfs-actions.pod:1328 ../src/guestfs-actions.pod:2292
8214 #: ../src/guestfs-actions.pod:2316 ../src/guestfs-actions.pod:2384
8215 #: ../src/guestfs-actions.pod:4279 ../src/guestfs-actions.pod:4761
8216 #: ../src/guestfs-actions.pod:6600 ../src/guestfs-actions.pod:6624
8217 #: ../src/guestfs-actions.pod:7249 ../src/guestfs-actions.pod:7262
8218 #: ../src/guestfs-actions.pod:7275
8219 msgid "(Added in 1.0.54)"
8223 #: ../src/guestfs-actions.pod:1195
8224 msgid "guestfs_df_h"
8228 #: ../src/guestfs-actions.pod:1197
8232 " guestfs_df_h (guestfs_h *g);\n"
8237 #: ../src/guestfs-actions.pod:1200 ../fish/guestfish-actions.pod:806
8239 "This command runs the C<df -h> command to report disk space used in human-"
8244 #: ../src/guestfs-actions.pod:1212
8245 msgid "guestfs_dmesg"
8249 #: ../src/guestfs-actions.pod:1214
8253 " guestfs_dmesg (guestfs_h *g);\n"
8258 #: ../src/guestfs-actions.pod:1217 ../fish/guestfish-actions.pod:817
8260 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
8261 "This is sometimes useful for extended debugging of problems."
8265 #: ../src/guestfs-actions.pod:1221
8267 "Another way to get the same information is to enable verbose messages with "
8268 "C<guestfs_set_verbose> or by setting the environment variable "
8269 "C<LIBGUESTFS_DEBUG=1> before running the program."
8273 #: ../src/guestfs-actions.pod:1231
8274 msgid "guestfs_download"
8278 #: ../src/guestfs-actions.pod:1233
8282 " guestfs_download (guestfs_h *g,\n"
8283 " const char *remotefilename,\n"
8284 " const char *filename);\n"
8289 #: ../src/guestfs-actions.pod:1238 ../src/guestfs-actions.pod:1263
8290 #: ../fish/guestfish-actions.pod:830 ../fish/guestfish-actions.pod:843
8292 "Download file C<remotefilename> and save it as C<filename> on the local "
8297 #: ../src/guestfs-actions.pod:1241 ../src/guestfs-actions.pod:6856
8298 #: ../fish/guestfish-actions.pod:833 ../fish/guestfish-actions.pod:4630
8299 msgid "C<filename> can also be a named pipe."
8303 #: ../src/guestfs-actions.pod:1243
8304 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
8308 #: ../src/guestfs-actions.pod:1254
8309 msgid "guestfs_download_offset"
8313 #: ../src/guestfs-actions.pod:1256
8317 " guestfs_download_offset (guestfs_h *g,\n"
8318 " const char *remotefilename,\n"
8319 " const char *filename,\n"
8320 " int64_t offset,\n"
8326 #: ../src/guestfs-actions.pod:1266 ../fish/guestfish-actions.pod:846
8328 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
8329 "region must be within the file or device)."
8333 #: ../src/guestfs-actions.pod:1269
8335 "Note that there is no limit on the amount of data that can be downloaded "
8336 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
8337 "full amount unless an error occurs."
8341 #: ../src/guestfs-actions.pod:1274
8342 msgid "See also C<guestfs_download>, C<guestfs_pread>."
8346 #: ../src/guestfs-actions.pod:1283 ../src/guestfs-actions.pod:6901
8347 msgid "(Added in 1.5.17)"
8351 #: ../src/guestfs-actions.pod:1285
8352 msgid "guestfs_drop_caches"
8356 #: ../src/guestfs-actions.pod:1287
8360 " guestfs_drop_caches (guestfs_h *g,\n"
8361 " int whattodrop);\n"
8366 #: ../src/guestfs-actions.pod:1291 ../fish/guestfish-actions.pod:862
8368 "This instructs the guest kernel to drop its page cache, and/or dentries and "
8369 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
8370 "to drop, see L<http://linux-mm.org/Drop_Caches>"
8374 #: ../src/guestfs-actions.pod:1296 ../fish/guestfish-actions.pod:867
8375 msgid "Setting C<whattodrop> to 3 should drop everything."
8379 #: ../src/guestfs-actions.pod:1298 ../fish/guestfish-actions.pod:869
8381 "This automatically calls L<sync(2)> before the operation, so that the "
8382 "maximum guest memory is freed."
8386 #: ../src/guestfs-actions.pod:1305
8391 #: ../src/guestfs-actions.pod:1307
8395 " guestfs_du (guestfs_h *g,\n"
8396 " const char *path);\n"
8401 #: ../src/guestfs-actions.pod:1311 ../fish/guestfish-actions.pod:876
8403 "This command runs the C<du -s> command to estimate file space usage for "
8408 #: ../src/guestfs-actions.pod:1314 ../fish/guestfish-actions.pod:879
8410 "C<path> can be a file or a directory. If C<path> is a directory then the "
8411 "estimate includes the contents of the directory and all subdirectories "
8416 #: ../src/guestfs-actions.pod:1318 ../fish/guestfish-actions.pod:883
8418 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
8422 #: ../src/guestfs-actions.pod:1330
8423 msgid "guestfs_e2fsck_f"
8427 #: ../src/guestfs-actions.pod:1332
8431 " guestfs_e2fsck_f (guestfs_h *g,\n"
8432 " const char *device);\n"
8437 #: ../src/guestfs-actions.pod:1336 ../fish/guestfish-actions.pod:890
8439 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
8440 "on C<device>, noninteractively (I<-p>), even if the filesystem appears to be "
8445 #: ../src/guestfs-actions.pod:1340
8447 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
8448 "Normally you should use C<guestfs_fsck>."
8452 #: ../src/guestfs-actions.pod:1345
8453 msgid "(Added in 1.0.29)"
8457 #: ../src/guestfs-actions.pod:1347
8458 msgid "guestfs_echo_daemon"
8462 #: ../src/guestfs-actions.pod:1349
8466 " guestfs_echo_daemon (guestfs_h *g,\n"
8467 " char *const *words);\n"
8472 #: ../src/guestfs-actions.pod:1353 ../fish/guestfish-actions.pod:901
8474 "This command concatenates the list of C<words> passed with single spaces "
8475 "between them and returns the resulting string."
8479 #: ../src/guestfs-actions.pod:1356 ../fish/guestfish-actions.pod:904
8480 msgid "You can use this command to test the connection through to the daemon."
8484 #: ../src/guestfs-actions.pod:1358
8485 msgid "See also C<guestfs_ping_daemon>."
8489 #: ../src/guestfs-actions.pod:1363 ../src/guestfs-actions.pod:2100
8490 #: ../src/guestfs-actions.pod:6072
8491 msgid "(Added in 1.0.69)"
8495 #: ../src/guestfs-actions.pod:1365
8496 msgid "guestfs_egrep"
8500 #: ../src/guestfs-actions.pod:1367
8504 " guestfs_egrep (guestfs_h *g,\n"
8505 " const char *regex,\n"
8506 " const char *path);\n"
8511 #: ../src/guestfs-actions.pod:1372 ../fish/guestfish-actions.pod:912
8513 "This calls the external C<egrep> program and returns the matching lines."
8517 #: ../src/guestfs-actions.pod:1382 ../src/guestfs-actions.pod:1401
8518 #: ../src/guestfs-actions.pod:1458 ../src/guestfs-actions.pod:1504
8519 #: ../src/guestfs-actions.pod:1523 ../src/guestfs-actions.pod:2230
8520 #: ../src/guestfs-actions.pod:2249 ../src/guestfs-actions.pod:2405
8521 #: ../src/guestfs-actions.pod:2418 ../src/guestfs-actions.pod:2433
8522 #: ../src/guestfs-actions.pod:2479 ../src/guestfs-actions.pod:2501
8523 #: ../src/guestfs-actions.pod:2514 ../src/guestfs-actions.pod:3662
8524 #: ../src/guestfs-actions.pod:3676 ../src/guestfs-actions.pod:3689
8525 #: ../src/guestfs-actions.pod:3703 ../src/guestfs-actions.pod:4689
8526 #: ../src/guestfs-actions.pod:5572 ../src/guestfs-actions.pod:5621
8527 #: ../src/guestfs-actions.pod:6468 ../src/guestfs-actions.pod:6480
8528 #: ../src/guestfs-actions.pod:6493 ../src/guestfs-actions.pod:6506
8529 #: ../src/guestfs-actions.pod:6528 ../src/guestfs-actions.pod:6541
8530 #: ../src/guestfs-actions.pod:6554 ../src/guestfs-actions.pod:6567
8531 #: ../src/guestfs-actions.pod:7345 ../src/guestfs-actions.pod:7364
8532 #: ../src/guestfs-actions.pod:7449 ../src/guestfs-actions.pod:7468
8533 #: ../src/guestfs-actions.pod:7514 ../src/guestfs-actions.pod:7533
8534 msgid "(Added in 1.0.66)"
8538 #: ../src/guestfs-actions.pod:1384
8539 msgid "guestfs_egrepi"
8543 #: ../src/guestfs-actions.pod:1386
8547 " guestfs_egrepi (guestfs_h *g,\n"
8548 " const char *regex,\n"
8549 " const char *path);\n"
8554 #: ../src/guestfs-actions.pod:1391 ../fish/guestfish-actions.pod:922
8556 "This calls the external C<egrep -i> program and returns the matching lines."
8560 #: ../src/guestfs-actions.pod:1403
8561 msgid "guestfs_equal"
8565 #: ../src/guestfs-actions.pod:1405
8569 " guestfs_equal (guestfs_h *g,\n"
8570 " const char *file1,\n"
8571 " const char *file2);\n"
8576 #: ../src/guestfs-actions.pod:1410 ../fish/guestfish-actions.pod:932
8578 "This compares the two files C<file1> and C<file2> and returns true if their "
8579 "content is exactly equal, or false otherwise."
8583 #: ../src/guestfs-actions.pod:1413 ../fish/guestfish-actions.pod:935
8584 msgid "The external L<cmp(1)> program is used for the comparison."
8588 #: ../src/guestfs-actions.pod:1419
8589 msgid "guestfs_exists"
8593 #: ../src/guestfs-actions.pod:1421
8597 " guestfs_exists (guestfs_h *g,\n"
8598 " const char *path);\n"
8603 #: ../src/guestfs-actions.pod:1425 ../fish/guestfish-actions.pod:941
8605 "This returns C<true> if and only if there is a file, directory (or anything) "
8606 "with the given C<path> name."
8610 #: ../src/guestfs-actions.pod:1428
8611 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
8615 #: ../src/guestfs-actions.pod:1434
8616 msgid "guestfs_fallocate"
8620 #: ../src/guestfs-actions.pod:1436
8624 " guestfs_fallocate (guestfs_h *g,\n"
8625 " const char *path,\n"
8631 #: ../src/guestfs-actions.pod:1441 ../src/guestfs-actions.pod:1467
8632 #: ../fish/guestfish-actions.pod:950 ../fish/guestfish-actions.pod:969
8634 "This command preallocates a file (containing zero bytes) named C<path> of "
8635 "size C<len> bytes. If the file exists already, it is overwritten."
8639 #: ../src/guestfs-actions.pod:1445 ../fish/guestfish-actions.pod:954
8641 "Do not confuse this with the guestfish-specific C<alloc> command which "
8642 "allocates a file in the host and attaches it as a device."
8646 #: ../src/guestfs-actions.pod:1451 ../fish/guestfish-actions.pod:958
8648 "This function is deprecated. In new code, use the C<fallocate64> call "
8653 #: ../src/guestfs-actions.pod:1460
8654 msgid "guestfs_fallocate64"
8658 #: ../src/guestfs-actions.pod:1462
8662 " guestfs_fallocate64 (guestfs_h *g,\n"
8663 " const char *path,\n"
8669 #: ../src/guestfs-actions.pod:1471
8671 "Note that this call allocates disk blocks for the file. To create a sparse "
8672 "file use C<guestfs_truncate_size> instead."
8676 #: ../src/guestfs-actions.pod:1474
8678 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
8679 "oversight it only allowed 30 bit lengths to be specified, effectively "
8680 "limiting the maximum size of files created through that call to 1GB."
8684 #: ../src/guestfs-actions.pod:1479 ../fish/guestfish-actions.pod:981
8686 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
8687 "commands which create a file in the host and attach it as a device."
8691 #: ../src/guestfs-actions.pod:1485
8692 msgid "(Added in 1.3.17)"
8696 #: ../src/guestfs-actions.pod:1487
8697 msgid "guestfs_fgrep"
8701 #: ../src/guestfs-actions.pod:1489
8705 " guestfs_fgrep (guestfs_h *g,\n"
8706 " const char *pattern,\n"
8707 " const char *path);\n"
8712 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:989
8714 "This calls the external C<fgrep> program and returns the matching lines."
8718 #: ../src/guestfs-actions.pod:1506
8719 msgid "guestfs_fgrepi"
8723 #: ../src/guestfs-actions.pod:1508
8727 " guestfs_fgrepi (guestfs_h *g,\n"
8728 " const char *pattern,\n"
8729 " const char *path);\n"
8734 #: ../src/guestfs-actions.pod:1513 ../fish/guestfish-actions.pod:999
8736 "This calls the external C<fgrep -i> program and returns the matching lines."
8740 #: ../src/guestfs-actions.pod:1525
8741 msgid "guestfs_file"
8745 #: ../src/guestfs-actions.pod:1527
8749 " guestfs_file (guestfs_h *g,\n"
8750 " const char *path);\n"
8755 #: ../src/guestfs-actions.pod:1531 ../fish/guestfish-actions.pod:1009
8757 "This call uses the standard L<file(1)> command to determine the type or "
8758 "contents of the file."
8762 #: ../src/guestfs-actions.pod:1534 ../fish/guestfish-actions.pod:1012
8764 "This call will also transparently look inside various types of compressed "
8769 #: ../src/guestfs-actions.pod:1537 ../fish/guestfish-actions.pod:1015
8771 "The exact command which runs is C<file -zb path>. Note in particular that "
8772 "the filename is not prepended to the output (the I<-b> option)."
8776 #: ../src/guestfs-actions.pod:1541
8778 "This command can also be used on C</dev/> devices (and partitions, LV "
8779 "names). You can for example use this to determine if a device contains a "
8780 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
8784 #: ../src/guestfs-actions.pod:1546 ../fish/guestfish-actions.pod:1024
8786 "If the C<path> does not begin with C</dev/> then this command only works for "
8787 "the content of regular files. For other file types (directory, symbolic "
8788 "link etc) it will just return the string C<directory> etc."
8792 #: ../src/guestfs-actions.pod:1556
8793 msgid "guestfs_file_architecture"
8797 #: ../src/guestfs-actions.pod:1558
8801 " guestfs_file_architecture (guestfs_h *g,\n"
8802 " const char *filename);\n"
8807 #: ../src/guestfs-actions.pod:1562 ../fish/guestfish-actions.pod:1033
8809 "This detects the architecture of the binary C<filename>, and returns it if "
8814 #: ../src/guestfs-actions.pod:1565 ../fish/guestfish-actions.pod:1036
8815 msgid "Currently defined architectures are:"
8819 #: ../src/guestfs-actions.pod:1569 ../fish/guestfish-actions.pod:1040
8824 #: ../src/guestfs-actions.pod:1571 ../fish/guestfish-actions.pod:1042
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:1574 ../fish/guestfish-actions.pod:1045
8836 #: ../src/guestfs-actions.pod:1576 ../fish/guestfish-actions.pod:1047
8837 msgid "64 bit x86-64."
8841 #: ../src/guestfs-actions.pod:1578 ../fish/guestfish-actions.pod:1049
8846 #: ../src/guestfs-actions.pod:1580 ../fish/guestfish-actions.pod:1051
8847 msgid "32 bit SPARC."
8851 #: ../src/guestfs-actions.pod:1582 ../fish/guestfish-actions.pod:1053
8856 #: ../src/guestfs-actions.pod:1584 ../fish/guestfish-actions.pod:1055
8857 msgid "64 bit SPARC V9 and above."
8861 #: ../src/guestfs-actions.pod:1586 ../fish/guestfish-actions.pod:1057
8866 #: ../src/guestfs-actions.pod:1588 ../fish/guestfish-actions.pod:1059
8867 msgid "Intel Itanium."
8868 msgstr "Intel Itanium."
8871 #: ../src/guestfs-actions.pod:1590 ../fish/guestfish-actions.pod:1061
8876 #: ../src/guestfs-actions.pod:1592 ../fish/guestfish-actions.pod:1063
8877 msgid "32 bit Power PC."
8881 #: ../src/guestfs-actions.pod:1594 ../fish/guestfish-actions.pod:1065
8886 #: ../src/guestfs-actions.pod:1596 ../fish/guestfish-actions.pod:1067
8887 msgid "64 bit Power PC."
8891 #: ../src/guestfs-actions.pod:1600 ../fish/guestfish-actions.pod:1071
8892 msgid "Libguestfs may return other architecture strings in future."
8896 #: ../src/guestfs-actions.pod:1602 ../fish/guestfish-actions.pod:1073
8897 msgid "The function works on at least the following types of files:"
8901 #: ../src/guestfs-actions.pod:1608 ../fish/guestfish-actions.pod:1079
8902 msgid "many types of Un*x and Linux binary"
8906 #: ../src/guestfs-actions.pod:1612 ../fish/guestfish-actions.pod:1083
8907 msgid "many types of Un*x and Linux shared library"
8911 #: ../src/guestfs-actions.pod:1616 ../fish/guestfish-actions.pod:1087
8912 msgid "Windows Win32 and Win64 binaries"
8916 #: ../src/guestfs-actions.pod:1620 ../fish/guestfish-actions.pod:1091
8917 msgid "Windows Win32 and Win64 DLLs"
8921 #: ../src/guestfs-actions.pod:1622 ../fish/guestfish-actions.pod:1093
8922 msgid "Win32 binaries and DLLs return C<i386>."
8926 #: ../src/guestfs-actions.pod:1624 ../fish/guestfish-actions.pod:1095
8927 msgid "Win64 binaries and DLLs return C<x86_64>."
8931 #: ../src/guestfs-actions.pod:1628 ../fish/guestfish-actions.pod:1099
8932 msgid "Linux kernel modules"
8936 #: ../src/guestfs-actions.pod:1632 ../fish/guestfish-actions.pod:1103
8937 msgid "Linux new-style initrd images"
8941 #: ../src/guestfs-actions.pod:1636 ../fish/guestfish-actions.pod:1107
8942 msgid "some non-x86 Linux vmlinuz kernels"
8946 #: ../src/guestfs-actions.pod:1640 ../fish/guestfish-actions.pod:1111
8947 msgid "What it can't do currently:"
8951 #: ../src/guestfs-actions.pod:1646 ../fish/guestfish-actions.pod:1117
8952 msgid "static libraries (libfoo.a)"
8956 #: ../src/guestfs-actions.pod:1650 ../fish/guestfish-actions.pod:1121
8957 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
8961 #: ../src/guestfs-actions.pod:1654 ../fish/guestfish-actions.pod:1125
8962 msgid "x86 Linux vmlinuz kernels"
8966 #: ../src/guestfs-actions.pod:1656 ../fish/guestfish-actions.pod:1127
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:1666 ../src/guestfs-actions.pod:1829
8976 #: ../src/guestfs-actions.pod:1846 ../src/guestfs-actions.pod:2537
8977 #: ../src/guestfs-actions.pod:2630 ../src/guestfs-actions.pod:2700
8978 #: ../src/guestfs-actions.pod:2788 ../src/guestfs-actions.pod:2809
8979 #: ../src/guestfs-actions.pod:2852 ../src/guestfs-actions.pod:2936
8980 #: ../src/guestfs-actions.pod:3033 ../src/guestfs-actions.pod:3280
8981 #: ../src/guestfs-actions.pod:3412
8982 msgid "(Added in 1.5.3)"
8986 #: ../src/guestfs-actions.pod:1668
8987 msgid "guestfs_filesize"
8991 #: ../src/guestfs-actions.pod:1670
8995 " guestfs_filesize (guestfs_h *g,\n"
8996 " const char *file);\n"
9001 #: ../src/guestfs-actions.pod:1674 ../fish/guestfish-actions.pod:1138
9002 msgid "This command returns the size of C<file> in bytes."
9006 #: ../src/guestfs-actions.pod:1676
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:1682
9015 msgid "(Added in 1.0.82)"
9019 #: ../src/guestfs-actions.pod:1684
9020 msgid "guestfs_fill"
9024 #: ../src/guestfs-actions.pod:1686
9028 " guestfs_fill (guestfs_h *g,\n"
9031 " const char *path);\n"
9036 #: ../src/guestfs-actions.pod:1692 ../fish/guestfish-actions.pod:1148
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:1696
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:1708
9053 msgid "(Added in 1.0.79)"
9057 #: ../src/guestfs-actions.pod:1710
9058 msgid "guestfs_fill_pattern"
9062 #: ../src/guestfs-actions.pod:1712
9066 " guestfs_fill_pattern (guestfs_h *g,\n"
9067 " const char *pattern,\n"
9069 " const char *path);\n"
9074 #: ../src/guestfs-actions.pod:1718
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:1730
9084 msgid "(Added in 1.3.12)"
9088 #: ../src/guestfs-actions.pod:1732
9089 msgid "guestfs_find"
9093 #: ../src/guestfs-actions.pod:1734
9097 " guestfs_find (guestfs_h *g,\n"
9098 " const char *directory);\n"
9103 #: ../src/guestfs-actions.pod:1738 ../fish/guestfish-actions.pod:1170
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:1743 ../fish/guestfish-actions.pod:1175
9114 "This returns a list of strings I<without any prefix>. Thus if the directory "
9119 #: ../src/guestfs-actions.pod:1746 ../fish/guestfish-actions.pod:1178
9129 #: ../src/guestfs-actions.pod:1750
9131 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
9135 #: ../src/guestfs-actions.pod:1753 ../fish/guestfish-actions.pod:1185
9146 #: ../src/guestfs-actions.pod:1758 ../fish/guestfish-actions.pod:1190
9147 msgid "If C<directory> is not a directory, then this command returns an error."
9151 #: ../src/guestfs-actions.pod:1761 ../fish/guestfish-actions.pod:1193
9152 msgid "The returned list is sorted."
9156 #: ../src/guestfs-actions.pod:1763
9157 msgid "See also C<guestfs_find0>."
9161 #: ../src/guestfs-actions.pod:1772 ../src/guestfs-actions.pod:4106
9162 #: ../src/guestfs-actions.pod:5656
9163 msgid "(Added in 1.0.27)"
9167 #: ../src/guestfs-actions.pod:1774
9168 msgid "guestfs_find0"
9172 #: ../src/guestfs-actions.pod:1776
9176 " guestfs_find0 (guestfs_h *g,\n"
9177 " const char *directory,\n"
9178 " const char *files);\n"
9183 #: ../src/guestfs-actions.pod:1781 ../fish/guestfish-actions.pod:1204
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:1785
9193 "This command works the same way as C<guestfs_find> with the following "
9198 #: ../src/guestfs-actions.pod:1792 ../fish/guestfish-actions.pod:1215
9199 msgid "The resulting list is written to an external file."
9203 #: ../src/guestfs-actions.pod:1796 ../fish/guestfish-actions.pod:1219
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:1801 ../fish/guestfish-actions.pod:1224
9211 msgid "This command is not limited in the number of names that it can return."
9215 #: ../src/guestfs-actions.pod:1806 ../fish/guestfish-actions.pod:1229
9216 msgid "The result list is not sorted."
9220 #: ../src/guestfs-actions.pod:1812
9221 msgid "(Added in 1.0.74)"
9225 #: ../src/guestfs-actions.pod:1814
9226 msgid "guestfs_findfs_label"
9230 #: ../src/guestfs-actions.pod:1816
9234 " guestfs_findfs_label (guestfs_h *g,\n"
9235 " const char *label);\n"
9240 #: ../src/guestfs-actions.pod:1820 ../fish/guestfish-actions.pod:1239
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:1824
9248 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
9252 #: ../src/guestfs-actions.pod:1831
9253 msgid "guestfs_findfs_uuid"
9257 #: ../src/guestfs-actions.pod:1833
9261 " guestfs_findfs_uuid (guestfs_h *g,\n"
9262 " const char *uuid);\n"
9267 #: ../src/guestfs-actions.pod:1837 ../fish/guestfish-actions.pod:1249
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:1841
9275 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
9279 #: ../src/guestfs-actions.pod:1848
9280 msgid "guestfs_fsck"
9284 #: ../src/guestfs-actions.pod:1850
9288 " guestfs_fsck (guestfs_h *g,\n"
9289 " const char *fstype,\n"
9290 " const char *device);\n"
9295 #: ../src/guestfs-actions.pod:1855 ../fish/guestfish-actions.pod:1259
9297 "This runs the filesystem checker (fsck) on C<device> which should have "
9298 "filesystem type C<fstype>."
9302 #: ../src/guestfs-actions.pod:1858 ../fish/guestfish-actions.pod:1262
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:1867 ../fish/guestfish-actions.pod:1271
9310 msgid "Multiple status codes can be summed together."
9314 #: ../src/guestfs-actions.pod:1871 ../fish/guestfish-actions.pod:1275
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:1876 ../fish/guestfish-actions.pod:1280
9322 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
9326 #: ../src/guestfs-actions.pod:1881 ../fish/guestfish-actions.pod:1285
9328 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
9332 #: ../src/guestfs-actions.pod:1885 ../src/guestfs-actions.pod:7387
9333 msgid "(Added in 1.0.16)"
9337 #: ../src/guestfs-actions.pod:1887
9338 msgid "guestfs_get_append"
9342 #: ../src/guestfs-actions.pod:1889
9346 " guestfs_get_append (guestfs_h *g);\n"
9351 #: ../src/guestfs-actions.pod:1892 ../fish/guestfish-actions.pod:1291
9353 "Return the additional kernel options which are added to the guest kernel "
9358 #: ../src/guestfs-actions.pod:1895 ../fish/guestfish-actions.pod:1294
9359 msgid "If C<NULL> then no options are added."
9363 #: ../src/guestfs-actions.pod:1897
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:1901 ../src/guestfs-actions.pod:5334
9372 #: ../src/guestfs-actions.pod:5814 ../src/guestfs-actions.pod:6235
9373 #: ../src/guestfs-actions.pod:6254 ../src/guestfs-actions.pod:6270
9374 #: ../src/guestfs-actions.pod:6294 ../src/guestfs-actions.pod:7051
9375 #: ../src/guestfs-actions.pod:7069 ../src/guestfs-actions.pod:7430
9376 msgid "(Added in 1.0.26)"
9380 #: ../src/guestfs-actions.pod:1903
9381 msgid "guestfs_get_attach_method"
9385 #: ../src/guestfs-actions.pod:1905
9389 " guestfs_get_attach_method (guestfs_h *g);\n"
9394 #: ../src/guestfs-actions.pod:1908
9395 msgid "Return the current attach method. See C<guestfs_set_attach_method>."
9399 #: ../src/guestfs-actions.pod:1913
9400 msgid "guestfs_get_autosync"
9404 #: ../src/guestfs-actions.pod:1915
9408 " guestfs_get_autosync (guestfs_h *g);\n"
9413 #: ../src/guestfs-actions.pod:1918 ../fish/guestfish-actions.pod:1306
9414 msgid "Get the autosync flag."
9418 #: ../src/guestfs-actions.pod:1924
9419 msgid "guestfs_get_direct"
9423 #: ../src/guestfs-actions.pod:1926
9427 " guestfs_get_direct (guestfs_h *g);\n"
9432 #: ../src/guestfs-actions.pod:1929 ../fish/guestfish-actions.pod:1312
9433 msgid "Return the direct appliance mode flag."
9437 #: ../src/guestfs-actions.pod:1933 ../src/guestfs-actions.pod:5883
9438 msgid "(Added in 1.0.72)"
9442 #: ../src/guestfs-actions.pod:1935
9443 msgid "guestfs_get_e2label"
9447 #: ../src/guestfs-actions.pod:1937
9451 " guestfs_get_e2label (guestfs_h *g,\n"
9452 " const char *device);\n"
9457 #: ../src/guestfs-actions.pod:1941 ../fish/guestfish-actions.pod:1318
9459 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
9463 #: ../src/guestfs-actions.pod:1947 ../fish/guestfish-actions.pod:1321
9465 "This function is deprecated. In new code, use the C<vfs_label> call instead."
9469 #: ../src/guestfs-actions.pod:1954 ../src/guestfs-actions.pod:1975
9470 #: ../src/guestfs-actions.pod:5901 ../src/guestfs-actions.pod:5920
9471 msgid "(Added in 1.0.15)"
9475 #: ../src/guestfs-actions.pod:1956
9476 msgid "guestfs_get_e2uuid"
9480 #: ../src/guestfs-actions.pod:1958
9484 " guestfs_get_e2uuid (guestfs_h *g,\n"
9485 " const char *device);\n"
9490 #: ../src/guestfs-actions.pod:1962 ../fish/guestfish-actions.pod:1332
9492 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
9496 #: ../src/guestfs-actions.pod:1968 ../fish/guestfish-actions.pod:1335
9498 "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
9502 #: ../src/guestfs-actions.pod:1977
9503 msgid "guestfs_get_memsize"
9507 #: ../src/guestfs-actions.pod:1979
9511 " guestfs_get_memsize (guestfs_h *g);\n"
9516 #: ../src/guestfs-actions.pod:1982 ../fish/guestfish-actions.pod:1346
9518 "This gets the memory size in megabytes allocated to the qemu subprocess."
9522 #: ../src/guestfs-actions.pod:1985
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:1989 ../src/guestfs-actions.pod:2070
9531 #: ../src/guestfs-actions.pod:5936 ../src/guestfs-actions.pod:6043
9532 #: ../fish/guestfish-actions.pod:1353 ../fish/guestfish-actions.pod:1404
9533 #: ../fish/guestfish-actions.pod:4005 ../fish/guestfish-actions.pod:4092
9535 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
9539 #: ../src/guestfs-actions.pod:1994 ../src/guestfs-actions.pod:4397
9540 #: ../src/guestfs-actions.pod:4594 ../src/guestfs-actions.pod:4613
9541 #: ../src/guestfs-actions.pod:4632 ../src/guestfs-actions.pod:4644
9542 #: ../src/guestfs-actions.pod:4661 ../src/guestfs-actions.pod:4674
9543 #: ../src/guestfs-actions.pod:5559 ../src/guestfs-actions.pod:5941
9544 #: ../src/guestfs-actions.pod:6202 ../src/guestfs-actions.pod:6817
9545 msgid "(Added in 1.0.55)"
9549 #: ../src/guestfs-actions.pod:1996
9550 msgid "guestfs_get_network"
9554 #: ../src/guestfs-actions.pod:1998
9558 " guestfs_get_network (guestfs_h *g);\n"
9563 #: ../src/guestfs-actions.pod:2001 ../fish/guestfish-actions.pod:1360
9564 msgid "This returns the enable network flag."
9568 #: ../src/guestfs-actions.pod:2005 ../src/guestfs-actions.pod:5960
9569 msgid "(Added in 1.5.4)"
9573 #: ../src/guestfs-actions.pod:2007
9574 msgid "guestfs_get_path"
9578 #: ../src/guestfs-actions.pod:2009
9582 " guestfs_get_path (guestfs_h *g);\n"
9587 #: ../src/guestfs-actions.pod:2012 ../fish/guestfish-actions.pod:1366
9588 msgid "Return the current search path."
9592 #: ../src/guestfs-actions.pod:2014 ../fish/guestfish-actions.pod:1368
9594 "This is always non-NULL. If it wasn't set already, then this will return "
9599 #: ../src/guestfs-actions.pod:2017 ../src/guestfs-actions.pod:2046
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:2022
9607 msgid "guestfs_get_pid"
9611 #: ../src/guestfs-actions.pod:2024
9615 " guestfs_get_pid (guestfs_h *g);\n"
9620 #: ../src/guestfs-actions.pod:2027 ../fish/guestfish-actions.pod:1377
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:2030 ../fish/guestfish-actions.pod:1380
9628 msgid "This is an internal call used for debugging and testing."
9632 #: ../src/guestfs-actions.pod:2034
9633 msgid "(Added in 1.0.56)"
9637 #: ../src/guestfs-actions.pod:2036
9638 msgid "guestfs_get_qemu"
9642 #: ../src/guestfs-actions.pod:2038
9646 " guestfs_get_qemu (guestfs_h *g);\n"
9651 #: ../src/guestfs-actions.pod:2041 ../fish/guestfish-actions.pod:1386
9652 msgid "Return the current qemu binary."
9656 #: ../src/guestfs-actions.pod:2043 ../fish/guestfish-actions.pod:1388
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:2049 ../src/guestfs-actions.pod:6005
9664 msgid "(Added in 1.0.6)"
9668 #: ../src/guestfs-actions.pod:2051
9669 msgid "guestfs_get_recovery_proc"
9673 #: ../src/guestfs-actions.pod:2053
9677 " guestfs_get_recovery_proc (guestfs_h *g);\n"
9682 #: ../src/guestfs-actions.pod:2056 ../fish/guestfish-actions.pod:1395
9683 msgid "Return the recovery process enabled flag."
9687 #: ../src/guestfs-actions.pod:2060 ../src/guestfs-actions.pod:3507
9688 #: ../src/guestfs-actions.pod:3804 ../src/guestfs-actions.pod:4204
9689 #: ../src/guestfs-actions.pod:4236 ../src/guestfs-actions.pod:5264
9690 #: ../src/guestfs-actions.pod:5607 ../src/guestfs-actions.pod:6029
9691 #: ../src/guestfs-actions.pod:6720 ../src/guestfs-actions.pod:6740
9692 #: ../src/guestfs-actions.pod:6932
9693 msgid "(Added in 1.0.77)"
9697 #: ../src/guestfs-actions.pod:2062
9698 msgid "guestfs_get_selinux"
9702 #: ../src/guestfs-actions.pod:2064
9706 " guestfs_get_selinux (guestfs_h *g);\n"
9711 #: ../src/guestfs-actions.pod:2067
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:2075 ../src/guestfs-actions.pod:2138
9719 #: ../src/guestfs-actions.pod:6048 ../src/guestfs-actions.pod:6106
9720 msgid "(Added in 1.0.67)"
9724 #: ../src/guestfs-actions.pod:2077
9725 msgid "guestfs_get_state"
9729 #: ../src/guestfs-actions.pod:2079
9733 " guestfs_get_state (guestfs_h *g);\n"
9738 #: ../src/guestfs-actions.pod:2082 ../fish/guestfish-actions.pod:1411
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:2085 ../src/guestfs-actions.pod:3305
9746 #: ../src/guestfs-actions.pod:3334 ../src/guestfs-actions.pod:3395
9747 #: ../src/guestfs-actions.pod:3422 ../fish/guestfish-actions.pod:1414
9748 #: ../fish/guestfish-actions.pod:2328 ../fish/guestfish-actions.pod:2346
9749 #: ../fish/guestfish-actions.pod:2384 ../fish/guestfish-actions.pod:2400
9750 msgid "For more information on states, see L<guestfs(3)>."
9754 #: ../src/guestfs-actions.pod:2091
9755 msgid "guestfs_get_trace"
9759 #: ../src/guestfs-actions.pod:2093
9763 " guestfs_get_trace (guestfs_h *g);\n"
9768 #: ../src/guestfs-actions.pod:2096 ../fish/guestfish-actions.pod:1420
9769 msgid "Return the command trace flag."
9773 #: ../src/guestfs-actions.pod:2102
9774 msgid "guestfs_get_umask"
9778 #: ../src/guestfs-actions.pod:2104
9782 " guestfs_get_umask (guestfs_h *g);\n"
9787 #: ../src/guestfs-actions.pod:2107
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:2114
9795 msgid "guestfs_get_verbose"
9799 #: ../src/guestfs-actions.pod:2116
9803 " guestfs_get_verbose (guestfs_h *g);\n"
9808 #: ../src/guestfs-actions.pod:2119 ../fish/guestfish-actions.pod:1433
9809 msgid "This returns the verbose messages flag."
9813 #: ../src/guestfs-actions.pod:2125
9814 msgid "guestfs_getcon"
9818 #: ../src/guestfs-actions.pod:2127
9822 " guestfs_getcon (guestfs_h *g);\n"
9827 #: ../src/guestfs-actions.pod:2130 ../fish/guestfish-actions.pod:1439
9828 msgid "This gets the SELinux security context of the daemon."
9832 #: ../src/guestfs-actions.pod:2132
9834 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
9838 #: ../src/guestfs-actions.pod:2140
9839 msgid "guestfs_getxattr"
9843 #: ../src/guestfs-actions.pod:2142
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:2148
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:2152 ../src/guestfs-actions.pod:3521
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:2159 ../src/guestfs-actions.pod:3528
9874 #: ../fish/guestfish-actions.pod:1459 ../fish/guestfish-actions.pod:2465
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:2162
9882 msgid "See also: C<guestfs_getxattrs>, C<guestfs_lgetxattr>, L<attr(5)>."
9886 #: ../src/guestfs-actions.pod:2164 ../src/guestfs-actions.pod:2355
9887 #: ../src/guestfs-actions.pod:3533 ../src/guestfs-actions.pod:5257
9888 #: ../src/guestfs-actions.pod:5283 ../src/guestfs-actions.pod:5464
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:2168 ../src/guestfs-actions.pod:3537
9897 msgid "(Added in 1.7.24)"
9901 #: ../src/guestfs-actions.pod:2170
9902 msgid "guestfs_getxattrs"
9906 #: ../src/guestfs-actions.pod:2172
9909 " struct guestfs_xattr_list *\n"
9910 " guestfs_getxattrs (guestfs_h *g,\n"
9911 " const char *path);\n"
9916 #: ../src/guestfs-actions.pod:2176 ../fish/guestfish-actions.pod:1468
9918 "This call lists the extended attributes of the file or directory C<path>."
9922 #: ../src/guestfs-actions.pod:2179 ../fish/guestfish-actions.pod:1471
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:2182
9930 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
9934 #: ../src/guestfs-actions.pod:2184 ../src/guestfs-actions.pod:3549
9935 #: ../src/guestfs-actions.pod:4200
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:2188 ../src/guestfs-actions.pod:3553
9943 #: ../src/guestfs-actions.pod:3718 ../src/guestfs-actions.pod:3754
9944 #: ../src/guestfs-actions.pod:5637 ../src/guestfs-actions.pod:6125
9945 #: ../src/guestfs-actions.pod:7495
9946 msgid "(Added in 1.0.59)"
9950 #: ../src/guestfs-actions.pod:2190
9951 msgid "guestfs_glob_expand"
9955 #: ../src/guestfs-actions.pod:2192
9959 " guestfs_glob_expand (guestfs_h *g,\n"
9960 " const char *pattern);\n"
9965 #: ../src/guestfs-actions.pod:2196 ../fish/guestfish-actions.pod:1480
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:2200 ../fish/guestfish-actions.pod:1484
9974 "If no paths match, then this returns an empty list (note: not an error)."
9978 #: ../src/guestfs-actions.pod:2203 ../fish/guestfish-actions.pod:1487
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:2211 ../src/guestfs-actions.pod:6318
9986 #: ../src/guestfs-actions.pod:6335
9987 msgid "(Added in 1.0.50)"
9991 #: ../src/guestfs-actions.pod:2213
9992 msgid "guestfs_grep"
9996 #: ../src/guestfs-actions.pod:2215
10000 " guestfs_grep (guestfs_h *g,\n"
10001 " const char *regex,\n"
10002 " const char *path);\n"
10007 #: ../src/guestfs-actions.pod:2220 ../fish/guestfish-actions.pod:1495
10008 msgid "This calls the external C<grep> program and returns the matching lines."
10012 #: ../src/guestfs-actions.pod:2232
10013 msgid "guestfs_grepi"
10017 #: ../src/guestfs-actions.pod:2234
10021 " guestfs_grepi (guestfs_h *g,\n"
10022 " const char *regex,\n"
10023 " const char *path);\n"
10028 #: ../src/guestfs-actions.pod:2239 ../fish/guestfish-actions.pod:1505
10030 "This calls the external C<grep -i> program and returns the matching lines."
10034 #: ../src/guestfs-actions.pod:2251
10035 msgid "guestfs_grub_install"
10039 #: ../src/guestfs-actions.pod:2253
10043 " guestfs_grub_install (guestfs_h *g,\n"
10044 " const char *root,\n"
10045 " const char *device);\n"
10050 #: ../src/guestfs-actions.pod:2258 ../fish/guestfish-actions.pod:1515
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:2261 ../fish/guestfish-actions.pod:1518
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:2268 ../fish/guestfish-actions.pod:1525
10070 " (hd0) /dev/vda\n"
10075 #: ../src/guestfs-actions.pod:2270 ../fish/guestfish-actions.pod:1527
10076 msgid "replacing C</dev/vda> with the name of the installation device."
10080 #: ../src/guestfs-actions.pod:2274
10081 msgid "(Added in 1.0.17)"
10085 #: ../src/guestfs-actions.pod:2276
10086 msgid "guestfs_head"
10090 #: ../src/guestfs-actions.pod:2278
10094 " guestfs_head (guestfs_h *g,\n"
10095 " const char *path);\n"
10100 #: ../src/guestfs-actions.pod:2282 ../fish/guestfish-actions.pod:1533
10102 "This command returns up to the first 10 lines of a file as a list of strings."
10106 #: ../src/guestfs-actions.pod:2294
10107 msgid "guestfs_head_n"
10111 #: ../src/guestfs-actions.pod:2296
10115 " guestfs_head_n (guestfs_h *g,\n"
10117 " const char *path);\n"
10122 #: ../src/guestfs-actions.pod:2301 ../fish/guestfish-actions.pod:1543
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:2304 ../fish/guestfish-actions.pod:1546
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:2307 ../src/guestfs-actions.pod:6615
10137 #: ../fish/guestfish-actions.pod:1549 ../fish/guestfish-actions.pod:4470
10138 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
10142 #: ../src/guestfs-actions.pod:2318
10143 msgid "guestfs_hexdump"
10147 #: ../src/guestfs-actions.pod:2320
10151 " guestfs_hexdump (guestfs_h *g,\n"
10152 " const char *path);\n"
10157 #: ../src/guestfs-actions.pod:2324 ../fish/guestfish-actions.pod:1558
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:2333 ../src/guestfs-actions.pod:6399
10165 #: ../src/guestfs-actions.pod:6454
10166 msgid "(Added in 1.0.22)"
10170 #: ../src/guestfs-actions.pod:2335
10171 msgid "guestfs_initrd_cat"
10175 #: ../src/guestfs-actions.pod:2337
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:2343 ../fish/guestfish-actions.pod:1568
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:2347 ../fish/guestfish-actions.pod:1572
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:2351 ../fish/guestfish-actions.pod:1576
10206 " initrd-cat /boot/initrd-<version>.img init\n"
10211 #: ../src/guestfs-actions.pod:2353
10212 msgid "See also C<guestfs_initrd_list>."
10216 #: ../src/guestfs-actions.pod:2364
10217 msgid "guestfs_initrd_list"
10221 #: ../src/guestfs-actions.pod:2366
10225 " guestfs_initrd_list (guestfs_h *g,\n"
10226 " const char *path);\n"
10231 #: ../src/guestfs-actions.pod:2370 ../fish/guestfish-actions.pod:1587
10232 msgid "This command lists out files contained in an initrd."
10236 #: ../src/guestfs-actions.pod:2372 ../fish/guestfish-actions.pod:1589
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:2376 ../fish/guestfish-actions.pod:1593
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:2386
10253 msgid "guestfs_inotify_add_watch"
10257 #: ../src/guestfs-actions.pod:2388
10261 " guestfs_inotify_add_watch (guestfs_h *g,\n"
10262 " const char *path,\n"
10268 #: ../src/guestfs-actions.pod:2393 ../fish/guestfish-actions.pod:1601
10269 msgid "Watch C<path> for the events listed in C<mask>."
10273 #: ../src/guestfs-actions.pod:2395 ../fish/guestfish-actions.pod:1603
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:2399 ../fish/guestfish-actions.pod:1607
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:2407
10288 msgid "guestfs_inotify_close"
10292 #: ../src/guestfs-actions.pod:2409
10296 " guestfs_inotify_close (guestfs_h *g);\n"
10301 #: ../src/guestfs-actions.pod:2412 ../fish/guestfish-actions.pod:1615
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:2420
10310 msgid "guestfs_inotify_files"
10314 #: ../src/guestfs-actions.pod:2422
10318 " guestfs_inotify_files (guestfs_h *g);\n"
10323 #: ../src/guestfs-actions.pod:2425
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:2435
10332 msgid "guestfs_inotify_init"
10336 #: ../src/guestfs-actions.pod:2437
10340 " guestfs_inotify_init (guestfs_h *g,\n"
10341 " int maxevents);\n"
10346 #: ../src/guestfs-actions.pod:2441 ../fish/guestfish-actions.pod:1631
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:2445
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:2455
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:2461
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:2468
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:2472 ../fish/guestfish-actions.pod:1662
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:2481
10398 msgid "guestfs_inotify_read"
10402 #: ../src/guestfs-actions.pod:2483
10405 " struct guestfs_inotify_event_list *\n"
10406 " guestfs_inotify_read (guestfs_h *g);\n"
10411 #: ../src/guestfs-actions.pod:2486 ../fish/guestfish-actions.pod:1671
10413 "Return the complete queue of events that have happened since the previous "
10418 #: ../src/guestfs-actions.pod:2489 ../fish/guestfish-actions.pod:1674
10419 msgid "If no events have happened, this returns an empty list."
10423 #: ../src/guestfs-actions.pod:2491 ../fish/guestfish-actions.pod:1676
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:2497
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:2503
10441 msgid "guestfs_inotify_rm_watch"
10445 #: ../src/guestfs-actions.pod:2505
10449 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
10455 #: ../src/guestfs-actions.pod:2509
10457 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
10461 #: ../src/guestfs-actions.pod:2516
10462 msgid "guestfs_inspect_get_arch"
10466 #: ../src/guestfs-actions.pod:2518
10470 " guestfs_inspect_get_arch (guestfs_h *g,\n"
10471 " const char *root);\n"
10476 #: ../src/guestfs-actions.pod:2522 ../src/guestfs-actions.pod:2545
10477 #: ../src/guestfs-actions.pod:2638 ../src/guestfs-actions.pod:2682
10478 #: ../src/guestfs-actions.pod:2708 ../src/guestfs-actions.pod:2747
10479 #: ../src/guestfs-actions.pod:2769 ../src/guestfs-actions.pod:2796
10480 #: ../src/guestfs-actions.pod:2817 ../src/guestfs-actions.pod:2860
10481 #: ../src/guestfs-actions.pod:2889 ../src/guestfs-actions.pod:2920
10482 #: ../src/guestfs-actions.pod:2944 ../src/guestfs-actions.pod:2999
10483 #: ../src/guestfs-actions.pod:3041 ../src/guestfs-actions.pod:3062
10484 #: ../src/guestfs-actions.pod:3085 ../src/guestfs-actions.pod:3102
10485 #: ../src/guestfs-actions.pod:3119 ../src/guestfs-actions.pod:3138
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:2525
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:2529 ../fish/guestfish-actions.pod:1700
10501 "If the architecture could not be determined, then the string C<unknown> is "
10506 #: ../src/guestfs-actions.pod:2532 ../src/guestfs-actions.pod:2625
10507 #: ../src/guestfs-actions.pod:2736 ../src/guestfs-actions.pod:2756
10508 #: ../src/guestfs-actions.pod:2784 ../src/guestfs-actions.pod:2876
10509 #: ../src/guestfs-actions.pod:2907 ../src/guestfs-actions.pod:2931
10510 #: ../src/guestfs-actions.pod:2985 ../src/guestfs-actions.pod:3028
10511 #: ../src/guestfs-actions.pod:3051 ../src/guestfs-actions.pod:3072
10512 #: ../src/guestfs-actions.pod:3092 ../src/guestfs-actions.pod:3109
10513 #: ../src/guestfs-actions.pod:3128 ../src/guestfs-actions.pod:3231
10514 #: ../src/guestfs-actions.pod:3272 ../fish/guestfish-actions.pod:1703
10515 #: ../fish/guestfish-actions.pod:1789 ../fish/guestfish-actions.pod:1877
10516 #: ../fish/guestfish-actions.pod:1892 ../fish/guestfish-actions.pod:1913
10517 #: ../fish/guestfish-actions.pod:1983 ../fish/guestfish-actions.pod:2007
10518 #: ../fish/guestfish-actions.pod:2024 ../fish/guestfish-actions.pod:2067
10519 #: ../fish/guestfish-actions.pod:2102 ../fish/guestfish-actions.pod:2118
10520 #: ../fish/guestfish-actions.pod:2134 ../fish/guestfish-actions.pod:2147
10521 #: ../fish/guestfish-actions.pod:2160 ../fish/guestfish-actions.pod:2175
10522 #: ../fish/guestfish-actions.pod:2274 ../fish/guestfish-actions.pod:2308
10523 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
10527 #: ../src/guestfs-actions.pod:2539
10528 msgid "guestfs_inspect_get_distro"
10532 #: ../src/guestfs-actions.pod:2541
10536 " guestfs_inspect_get_distro (guestfs_h *g,\n"
10537 " const char *root);\n"
10542 #: ../src/guestfs-actions.pod:2548 ../fish/guestfish-actions.pod:1712
10544 "This returns the distro (distribution) of the inspected operating system."
10548 #: ../src/guestfs-actions.pod:2551 ../fish/guestfish-actions.pod:1715
10549 msgid "Currently defined distros are:"
10553 #: ../src/guestfs-actions.pod:2555 ../fish/guestfish-actions.pod:1719
10554 msgid "\"archlinux\""
10555 msgstr "\"archlinux\""
10558 #: ../src/guestfs-actions.pod:2557 ../fish/guestfish-actions.pod:1721
10559 msgid "Arch Linux."
10560 msgstr "Arch Linux."
10563 #: ../src/guestfs-actions.pod:2559 ../fish/guestfish-actions.pod:1723
10565 #| msgid "\"gentoo\""
10567 msgstr "\"gentoo\""
10570 #: ../src/guestfs-actions.pod:2561 ../fish/guestfish-actions.pod:1725
10575 #: ../src/guestfs-actions.pod:2563 ../fish/guestfish-actions.pod:1727
10577 msgstr "\"debian\""
10580 #: ../src/guestfs-actions.pod:2565 ../fish/guestfish-actions.pod:1729
10585 #: ../src/guestfs-actions.pod:2567 ../fish/guestfish-actions.pod:1731
10587 msgstr "\"fedora\""
10590 #: ../src/guestfs-actions.pod:2569 ../fish/guestfish-actions.pod:1733
10595 #: ../src/guestfs-actions.pod:2571 ../fish/guestfish-actions.pod:1735
10597 msgstr "\"gentoo\""
10600 #: ../src/guestfs-actions.pod:2573 ../fish/guestfish-actions.pod:1737
10605 #: ../src/guestfs-actions.pod:2575 ../fish/guestfish-actions.pod:1739
10606 msgid "\"linuxmint\""
10607 msgstr "\"linuxmint\""
10610 #: ../src/guestfs-actions.pod:2577 ../fish/guestfish-actions.pod:1741
10611 msgid "Linux Mint."
10612 msgstr "Linux Mint."
10615 #: ../src/guestfs-actions.pod:2579 ../fish/guestfish-actions.pod:1743
10616 msgid "\"mandriva\""
10617 msgstr "\"mandriva\""
10620 #: ../src/guestfs-actions.pod:2581 ../fish/guestfish-actions.pod:1745
10625 #: ../src/guestfs-actions.pod:2583 ../fish/guestfish-actions.pod:1747
10630 #: ../src/guestfs-actions.pod:2585 ../fish/guestfish-actions.pod:1749
10635 #: ../src/guestfs-actions.pod:2587 ../fish/guestfish-actions.pod:1751
10637 msgstr "\"pardus\""
10640 #: ../src/guestfs-actions.pod:2589 ../fish/guestfish-actions.pod:1753
10645 #: ../src/guestfs-actions.pod:2591 ../fish/guestfish-actions.pod:1755
10646 msgid "\"redhat-based\""
10647 msgstr "\"redhat-based\""
10650 #: ../src/guestfs-actions.pod:2593 ../fish/guestfish-actions.pod:1757
10651 msgid "Some Red Hat-derived distro."
10652 msgstr "Дистрибутив, що походить від Red Hat."
10655 #: ../src/guestfs-actions.pod:2595 ../fish/guestfish-actions.pod:1759
10660 #: ../src/guestfs-actions.pod:2597 ../fish/guestfish-actions.pod:1761
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:2599 ../fish/guestfish-actions.pod:1763
10668 msgid "\"scientificlinux\""
10672 #: ../src/guestfs-actions.pod:2601 ../fish/guestfish-actions.pod:1765
10673 msgid "Scientific Linux."
10677 #: ../src/guestfs-actions.pod:2603 ../fish/guestfish-actions.pod:1767
10678 msgid "\"slackware\""
10682 #: ../src/guestfs-actions.pod:2605 ../fish/guestfish-actions.pod:1769
10687 #: ../src/guestfs-actions.pod:2607 ../fish/guestfish-actions.pod:1771
10689 msgstr "\"ubuntu\""
10692 #: ../src/guestfs-actions.pod:2609 ../fish/guestfish-actions.pod:1773
10697 #: ../src/guestfs-actions.pod:2611 ../src/guestfs-actions.pod:2727
10698 #: ../src/guestfs-actions.pod:3019 ../fish/guestfish-actions.pod:1775
10699 #: ../fish/guestfish-actions.pod:1868 ../fish/guestfish-actions.pod:2093
10700 msgid "\"unknown\""
10701 msgstr "\"unknown\""
10704 #: ../src/guestfs-actions.pod:2613 ../fish/guestfish-actions.pod:1777
10705 msgid "The distro could not be determined."
10706 msgstr "Дистрибутив, тип якого не вдалося визначити."
10709 #: ../src/guestfs-actions.pod:2615 ../src/guestfs-actions.pod:3011
10710 #: ../fish/guestfish-actions.pod:1779 ../fish/guestfish-actions.pod:2085
10711 msgid "\"windows\""
10712 msgstr "\"windows\""
10715 #: ../src/guestfs-actions.pod:2617 ../fish/guestfish-actions.pod:1781
10717 "Windows does not have distributions. This string is returned if the OS type "
10722 #: ../src/guestfs-actions.pod:2622 ../src/guestfs-actions.pod:2733
10723 #: ../src/guestfs-actions.pod:3025 ../fish/guestfish-actions.pod:1786
10724 #: ../fish/guestfish-actions.pod:1874 ../fish/guestfish-actions.pod:2099
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:2632
10732 msgid "guestfs_inspect_get_drive_mappings"
10736 #: ../src/guestfs-actions.pod:2634
10740 " guestfs_inspect_get_drive_mappings (guestfs_h *g,\n"
10741 " const char *root);\n"
10746 #: ../src/guestfs-actions.pod:2641 ../fish/guestfish-actions.pod:1798
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:2647 ../fish/guestfish-actions.pod:1804
10758 " C => /dev/vda2\n"
10759 " E => /dev/vdb1\n"
10760 " F => /dev/vdc1\n"
10765 #: ../src/guestfs-actions.pod:2651 ../fish/guestfish-actions.pod:1808
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:2655 ../fish/guestfish-actions.pod:1812
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:2660 ../fish/guestfish-actions.pod:1817
10784 "For Windows guests, currently only hard drive mappings are returned. "
10785 "Removable disks (eg. DVD-ROMs) are ignored."
10789 #: ../src/guestfs-actions.pod:2663 ../fish/guestfish-actions.pod:1820
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:2666
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:2670 ../src/guestfs-actions.pod:2846
10804 #: ../src/guestfs-actions.pod:3606 ../src/guestfs-actions.pod:4823
10805 #: ../src/guestfs-actions.pod:6756
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:2676
10815 msgid "guestfs_inspect_get_filesystems"
10819 #: ../src/guestfs-actions.pod:2678
10823 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
10824 " const char *root);\n"
10829 #: ../src/guestfs-actions.pod:2685 ../fish/guestfish-actions.pod:1834
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:2690 ../fish/guestfish-actions.pod:1839
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:2693
10846 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
10847 "C<guestfs_inspect_get_mountpoints>."
10851 #: ../src/guestfs-actions.pod:2702
10852 msgid "guestfs_inspect_get_format"
10856 #: ../src/guestfs-actions.pod:2704
10860 " guestfs_inspect_get_format (guestfs_h *g,\n"
10861 " const char *root);\n"
10866 #: ../src/guestfs-actions.pod:2711 ../fish/guestfish-actions.pod:1852
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:2714 ../fish/guestfish-actions.pod:1855
10874 msgid "Currently defined formats are:"
10878 #: ../src/guestfs-actions.pod:2718 ../fish/guestfish-actions.pod:1859
10879 msgid "\"installed\""
10880 msgstr "\"installed\""
10883 #: ../src/guestfs-actions.pod:2720 ../fish/guestfish-actions.pod:1861
10884 msgid "This is an installed operating system."
10885 msgstr "Це встановлена операційна система."
10888 #: ../src/guestfs-actions.pod:2722 ../fish/guestfish-actions.pod:1863
10889 msgid "\"installer\""
10893 #: ../src/guestfs-actions.pod:2724 ../fish/guestfish-actions.pod:1865
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:2729 ../fish/guestfish-actions.pod:1870
10901 msgid "The format of this disk image is not known."
10905 #: ../src/guestfs-actions.pod:2741
10906 msgid "guestfs_inspect_get_hostname"
10910 #: ../src/guestfs-actions.pod:2743
10914 " guestfs_inspect_get_hostname (guestfs_h *g,\n"
10915 " const char *root);\n"
10920 #: ../src/guestfs-actions.pod:2750 ../fish/guestfish-actions.pod:1886
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:2753 ../fish/guestfish-actions.pod:1889
10929 "If the hostname could not be determined, then the string C<unknown> is "
10934 #: ../src/guestfs-actions.pod:2761
10935 msgid "(Added in 1.7.9)"
10939 #: ../src/guestfs-actions.pod:2763
10940 msgid "guestfs_inspect_get_major_version"
10944 #: ../src/guestfs-actions.pod:2765
10948 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
10949 " const char *root);\n"
10954 #: ../src/guestfs-actions.pod:2772 ../fish/guestfish-actions.pod:1901
10956 "This returns the major version number of the inspected operating system."
10960 #: ../src/guestfs-actions.pod:2775 ../fish/guestfish-actions.pod:1904
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:2782 ../src/guestfs-actions.pod:2802
10971 #: ../fish/guestfish-actions.pod:1911 ../fish/guestfish-actions.pod:1925
10972 msgid "If the version could not be determined, then C<0> is returned."
10976 #: ../src/guestfs-actions.pod:2790
10977 msgid "guestfs_inspect_get_minor_version"
10981 #: ../src/guestfs-actions.pod:2792
10985 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
10986 " const char *root);\n"
10991 #: ../src/guestfs-actions.pod:2799 ../fish/guestfish-actions.pod:1922
10993 "This returns the minor version number of the inspected operating system."
10997 #: ../src/guestfs-actions.pod:2804
10999 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11000 "C<guestfs_inspect_get_major_version>."
11004 #: ../src/guestfs-actions.pod:2811
11005 msgid "guestfs_inspect_get_mountpoints"
11009 #: ../src/guestfs-actions.pod:2813
11013 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
11014 " const char *root);\n"
11019 #: ../src/guestfs-actions.pod:2820 ../fish/guestfish-actions.pod:1937
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:2829 ../fish/guestfish-actions.pod:1946
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:2834 ../fish/guestfish-actions.pod:1951
11040 "Non-mounted devices such as swap devices are I<not> returned in this list."
11044 #: ../src/guestfs-actions.pod:2837
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:2843
11055 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
11056 "C<guestfs_inspect_get_filesystems>."
11060 #: ../src/guestfs-actions.pod:2854
11061 msgid "guestfs_inspect_get_package_format"
11065 #: ../src/guestfs-actions.pod:2856
11069 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
11070 " const char *root);\n"
11075 #: ../src/guestfs-actions.pod:2863
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:2869 ../fish/guestfish-actions.pod:1976
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:2873 ../fish/guestfish-actions.pod:1980
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:2881 ../src/guestfs-actions.pod:2912
11100 msgid "(Added in 1.7.5)"
11104 #: ../src/guestfs-actions.pod:2883
11105 msgid "guestfs_inspect_get_package_management"
11109 #: ../src/guestfs-actions.pod:2885
11113 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
11114 " const char *root);\n"
11119 #: ../src/guestfs-actions.pod:2892
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:2898 ../fish/guestfish-actions.pod:1998
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:2902 ../fish/guestfish-actions.pod:2002
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:2914
11145 msgid "guestfs_inspect_get_product_name"
11149 #: ../src/guestfs-actions.pod:2916
11153 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
11154 " const char *root);\n"
11159 #: ../src/guestfs-actions.pod:2923 ../fish/guestfish-actions.pod:2016
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:2928 ../fish/guestfish-actions.pod:2021
11169 "If the product name could not be determined, then the string C<unknown> is "
11174 #: ../src/guestfs-actions.pod:2938
11175 msgid "guestfs_inspect_get_product_variant"
11179 #: ../src/guestfs-actions.pod:2940
11183 " guestfs_inspect_get_product_variant (guestfs_h *g,\n"
11184 " const char *root);\n"
11189 #: ../src/guestfs-actions.pod:2947 ../fish/guestfish-actions.pod:2033
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:2950 ../fish/guestfish-actions.pod:2036
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:2959 ../fish/guestfish-actions.pod:2045
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:2963 ../fish/guestfish-actions.pod:2049
11218 "If the product variant could not be determined, then the string C<unknown> "
11223 #: ../src/guestfs-actions.pod:2966
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:2973
11231 msgid "guestfs_inspect_get_roots"
11235 #: ../src/guestfs-actions.pod:2975
11239 " guestfs_inspect_get_roots (guestfs_h *g);\n"
11244 #: ../src/guestfs-actions.pod:2978
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:2982
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:2991
11260 msgid "(Added in 1.7.3)"
11264 #: ../src/guestfs-actions.pod:2993
11265 msgid "guestfs_inspect_get_type"
11269 #: ../src/guestfs-actions.pod:2995
11273 " guestfs_inspect_get_type (guestfs_h *g,\n"
11274 " const char *root);\n"
11279 #: ../src/guestfs-actions.pod:3002 ../fish/guestfish-actions.pod:2076
11281 "This returns the type of the inspected operating system. Currently defined "
11286 #: ../src/guestfs-actions.pod:3007 ../fish/guestfish-actions.pod:2081
11291 #: ../src/guestfs-actions.pod:3009 ../fish/guestfish-actions.pod:2083
11292 msgid "Any Linux-based operating system."
11296 #: ../src/guestfs-actions.pod:3013 ../fish/guestfish-actions.pod:2087
11297 msgid "Any Microsoft Windows operating system."
11301 #: ../src/guestfs-actions.pod:3015 ../fish/guestfish-actions.pod:2089
11302 msgid "\"freebsd\""
11303 msgstr "\"freebsd\""
11306 #: ../src/guestfs-actions.pod:3017 ../fish/guestfish-actions.pod:2091
11311 #: ../src/guestfs-actions.pod:3021 ../fish/guestfish-actions.pod:2095
11312 msgid "The operating system type could not be determined."
11316 #: ../src/guestfs-actions.pod:3035
11317 msgid "guestfs_inspect_get_windows_current_control_set"
11321 #: ../src/guestfs-actions.pod:3037
11325 " guestfs_inspect_get_windows_current_control_set (guestfs_h *g,\n"
11326 " const char *root);\n"
11331 #: ../src/guestfs-actions.pod:3044 ../fish/guestfish-actions.pod:2111
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:3047 ../fish/guestfish-actions.pod:2114
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:3056
11346 msgid "guestfs_inspect_get_windows_systemroot"
11350 #: ../src/guestfs-actions.pod:3058
11354 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
11355 " const char *root);\n"
11360 #: ../src/guestfs-actions.pod:3065 ../fish/guestfish-actions.pod:2127
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:3068 ../fish/guestfish-actions.pod:2130
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:3077
11375 msgid "(Added in 1.5.25)"
11379 #: ../src/guestfs-actions.pod:3079
11380 msgid "guestfs_inspect_is_live"
11384 #: ../src/guestfs-actions.pod:3081
11388 " guestfs_inspect_is_live (guestfs_h *g,\n"
11389 " const char *root);\n"
11394 #: ../src/guestfs-actions.pod:3088
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:3096
11402 msgid "guestfs_inspect_is_multipart"
11406 #: ../src/guestfs-actions.pod:3098
11410 " guestfs_inspect_is_multipart (guestfs_h *g,\n"
11411 " const char *root);\n"
11416 #: ../src/guestfs-actions.pod:3105
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:3113
11424 msgid "guestfs_inspect_is_netinst"
11428 #: ../src/guestfs-actions.pod:3115
11432 " guestfs_inspect_is_netinst (guestfs_h *g,\n"
11433 " const char *root);\n"
11438 #: ../src/guestfs-actions.pod:3122
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:3132
11448 msgid "guestfs_inspect_list_applications"
11452 #: ../src/guestfs-actions.pod:3134
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:3141 ../fish/guestfish-actions.pod:2184
11463 msgid "Return the list of applications installed in the operating system."
11467 #: ../src/guestfs-actions.pod:3143
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:3153 ../fish/guestfish-actions.pod:2196
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:3156 ../fish/guestfish-actions.pod:2199
11488 msgid "The application structure contains the following fields:"
11492 #: ../src/guestfs-actions.pod:3160 ../fish/guestfish-actions.pod:2203
11493 msgid "C<app_name>"
11494 msgstr "C<app_name>"
11497 #: ../src/guestfs-actions.pod:3162 ../fish/guestfish-actions.pod:2205
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:3165 ../fish/guestfish-actions.pod:2208
11505 msgid "C<app_display_name>"
11506 msgstr "C<app_display_name>"
11509 #: ../src/guestfs-actions.pod:3167 ../fish/guestfish-actions.pod:2210
11511 "The display name of the application, sometimes localized to the install "
11512 "language of the guest operating system."
11516 #: ../src/guestfs-actions.pod:3170 ../fish/guestfish-actions.pod:2213
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:3173 ../fish/guestfish-actions.pod:2216
11524 msgid "C<app_epoch>"
11525 msgstr "C<app_epoch>"
11528 #: ../src/guestfs-actions.pod:3175 ../fish/guestfish-actions.pod:2218
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:3178 ../fish/guestfish-actions.pod:2221
11536 msgid "C<app_version>"
11537 msgstr "C<app_version>"
11540 #: ../src/guestfs-actions.pod:3180 ../fish/guestfish-actions.pod:2223
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:3183 ../fish/guestfish-actions.pod:2226
11548 msgid "C<app_release>"
11549 msgstr "C<app_release>"
11552 #: ../src/guestfs-actions.pod:3185 ../fish/guestfish-actions.pod:2228
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:3189 ../fish/guestfish-actions.pod:2232
11560 msgid "C<app_install_path>"
11561 msgstr "C<app_install_path>"
11564 #: ../src/guestfs-actions.pod:3191 ../fish/guestfish-actions.pod:2234
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:3196 ../fish/guestfish-actions.pod:2239
11573 msgid "If unavailable this is returned as an empty string C<\"\">."
11577 #: ../src/guestfs-actions.pod:3198 ../fish/guestfish-actions.pod:2241
11578 msgid "C<app_trans_path>"
11579 msgstr "C<app_trans_path>"
11582 #: ../src/guestfs-actions.pod:3200 ../fish/guestfish-actions.pod:2243
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:3203 ../fish/guestfish-actions.pod:2246
11590 msgid "C<app_publisher>"
11591 msgstr "C<app_publisher>"
11594 #: ../src/guestfs-actions.pod:3205 ../fish/guestfish-actions.pod:2248
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:3209 ../fish/guestfish-actions.pod:2252
11603 msgstr "C<app_url>"
11606 #: ../src/guestfs-actions.pod:3211 ../fish/guestfish-actions.pod:2254
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:3214 ../fish/guestfish-actions.pod:2257
11614 msgid "C<app_source_package>"
11618 #: ../src/guestfs-actions.pod:3216 ../fish/guestfish-actions.pod:2259
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:3219 ../fish/guestfish-actions.pod:2262
11626 msgid "C<app_summary>"
11630 #: ../src/guestfs-actions.pod:3221 ../fish/guestfish-actions.pod:2264
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:3224 ../fish/guestfish-actions.pod:2267
11638 msgid "C<app_description>"
11642 #: ../src/guestfs-actions.pod:3226 ../fish/guestfish-actions.pod:2269
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:3233
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:3237
11658 msgid "(Added in 1.7.8)"
11662 #: ../src/guestfs-actions.pod:3239
11663 msgid "guestfs_inspect_os"
11667 #: ../src/guestfs-actions.pod:3241
11671 " guestfs_inspect_os (guestfs_h *g);\n"
11676 #: ../src/guestfs-actions.pod:3244 ../fish/guestfish-actions.pod:2280
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:3248 ../fish/guestfish-actions.pod:2284
11685 msgid "The list returned is empty if no operating systems were found."
11689 #: ../src/guestfs-actions.pod:3250 ../fish/guestfish-actions.pod:2286
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:3257
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:3262
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:3268 ../fish/guestfish-actions.pod:2304
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:3274 ../src/guestfs-actions.pod:3564
11724 #: ../src/guestfs-actions.pod:3626
11725 msgid "See also C<guestfs_list_filesystems>."
11729 #: ../src/guestfs-actions.pod:3282
11730 msgid "guestfs_is_blockdev"
11734 #: ../src/guestfs-actions.pod:3284
11738 " guestfs_is_blockdev (guestfs_h *g,\n"
11739 " const char *path);\n"
11744 #: ../src/guestfs-actions.pod:3288 ../fish/guestfish-actions.pod:2316
11746 "This returns C<true> if and only if there is a block device with the given "
11751 #: ../src/guestfs-actions.pod:3291 ../src/guestfs-actions.pod:3320
11752 #: ../src/guestfs-actions.pod:3350 ../src/guestfs-actions.pod:3365
11753 #: ../src/guestfs-actions.pod:3381 ../src/guestfs-actions.pod:3437
11754 #: ../src/guestfs-actions.pod:3452
11755 msgid "See also C<guestfs_stat>."
11759 #: ../src/guestfs-actions.pod:3295 ../src/guestfs-actions.pod:3324
11760 #: ../src/guestfs-actions.pod:3369 ../src/guestfs-actions.pod:3441
11761 #: ../src/guestfs-actions.pod:3456
11762 msgid "(Added in 1.5.10)"
11766 #: ../src/guestfs-actions.pod:3297
11767 msgid "guestfs_is_busy"
11771 #: ../src/guestfs-actions.pod:3299
11775 " guestfs_is_busy (guestfs_h *g);\n"
11780 #: ../src/guestfs-actions.pod:3302 ../fish/guestfish-actions.pod:2325
11782 "This returns true iff this handle is busy processing a command (in the "
11787 #: ../src/guestfs-actions.pod:3311
11788 msgid "guestfs_is_chardev"
11792 #: ../src/guestfs-actions.pod:3313
11796 " guestfs_is_chardev (guestfs_h *g,\n"
11797 " const char *path);\n"
11802 #: ../src/guestfs-actions.pod:3317 ../fish/guestfish-actions.pod:2334
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:3326
11810 msgid "guestfs_is_config"
11814 #: ../src/guestfs-actions.pod:3328
11818 " guestfs_is_config (guestfs_h *g);\n"
11823 #: ../src/guestfs-actions.pod:3331 ../fish/guestfish-actions.pod:2343
11825 "This returns true iff this handle is being configured (in the C<CONFIG> "
11830 #: ../src/guestfs-actions.pod:3340
11831 msgid "guestfs_is_dir"
11835 #: ../src/guestfs-actions.pod:3342
11839 " guestfs_is_dir (guestfs_h *g,\n"
11840 " const char *path);\n"
11845 #: ../src/guestfs-actions.pod:3346 ../fish/guestfish-actions.pod:2352
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:3356
11853 msgid "guestfs_is_fifo"
11857 #: ../src/guestfs-actions.pod:3358
11861 " guestfs_is_fifo (guestfs_h *g,\n"
11862 " const char *path);\n"
11867 #: ../src/guestfs-actions.pod:3362 ../fish/guestfish-actions.pod:2362
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:3371
11875 msgid "guestfs_is_file"
11879 #: ../src/guestfs-actions.pod:3373
11883 " guestfs_is_file (guestfs_h *g,\n"
11884 " const char *path);\n"
11889 #: ../src/guestfs-actions.pod:3377 ../fish/guestfish-actions.pod:2371
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:3387
11897 msgid "guestfs_is_launching"
11901 #: ../src/guestfs-actions.pod:3389
11905 " guestfs_is_launching (guestfs_h *g);\n"
11910 #: ../src/guestfs-actions.pod:3392 ../fish/guestfish-actions.pod:2381
11912 "This returns true iff this handle is launching the subprocess (in the "
11913 "C<LAUNCHING> state)."
11917 #: ../src/guestfs-actions.pod:3401
11918 msgid "guestfs_is_lv"
11922 #: ../src/guestfs-actions.pod:3403
11926 " guestfs_is_lv (guestfs_h *g,\n"
11927 " const char *device);\n"
11932 #: ../src/guestfs-actions.pod:3407 ../fish/guestfish-actions.pod:2390
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:3414
11940 msgid "guestfs_is_ready"
11944 #: ../src/guestfs-actions.pod:3416
11948 " guestfs_is_ready (guestfs_h *g);\n"
11953 #: ../src/guestfs-actions.pod:3419 ../fish/guestfish-actions.pod:2397
11955 "This returns true iff this handle is ready to accept commands (in the "
11960 #: ../src/guestfs-actions.pod:3428
11961 msgid "guestfs_is_socket"
11965 #: ../src/guestfs-actions.pod:3430
11969 " guestfs_is_socket (guestfs_h *g,\n"
11970 " const char *path);\n"
11975 #: ../src/guestfs-actions.pod:3434 ../fish/guestfish-actions.pod:2406
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:3443
11983 msgid "guestfs_is_symlink"
11987 #: ../src/guestfs-actions.pod:3445
11991 " guestfs_is_symlink (guestfs_h *g,\n"
11992 " const char *path);\n"
11997 #: ../src/guestfs-actions.pod:3449 ../fish/guestfish-actions.pod:2415
11999 "This returns C<true> if and only if there is a symbolic link with the given "
12004 #: ../src/guestfs-actions.pod:3458
12005 msgid "guestfs_kill_subprocess"
12009 #: ../src/guestfs-actions.pod:3460
12013 " guestfs_kill_subprocess (guestfs_h *g);\n"
12018 #: ../src/guestfs-actions.pod:3463 ../fish/guestfish-actions.pod:2424
12019 msgid "This kills the qemu subprocess. You should never need to call this."
12023 #: ../src/guestfs-actions.pod:3469
12024 msgid "guestfs_launch"
12028 #: ../src/guestfs-actions.pod:3471
12032 " guestfs_launch (guestfs_h *g);\n"
12037 #: ../src/guestfs-actions.pod:3474 ../fish/guestfish-actions.pod:2432
12039 "Internally libguestfs is implemented by running a virtual machine using "
12044 #: ../src/guestfs-actions.pod:3477 ../fish/guestfish-actions.pod:2435
12046 "You should call this after configuring the handle (eg. adding drives) but "
12047 "before performing any actions."
12051 #: ../src/guestfs-actions.pod:3489
12052 msgid "guestfs_lchown"
12056 #: ../src/guestfs-actions.pod:3491
12060 " guestfs_lchown (guestfs_h *g,\n"
12063 " const char *path);\n"
12068 #: ../src/guestfs-actions.pod:3497
12070 "Change the file owner to C<owner> and group to C<group>. This is like "
12071 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
12072 "changed, not the target."
12076 #: ../src/guestfs-actions.pod:3509
12077 msgid "guestfs_lgetxattr"
12081 #: ../src/guestfs-actions.pod:3511
12085 " guestfs_lgetxattr (guestfs_h *g,\n"
12086 " const char *path,\n"
12087 " const char *name,\n"
12088 " size_t *size_r);\n"
12093 #: ../src/guestfs-actions.pod:3517 ../fish/guestfish-actions.pod:2454
12095 "Get a single extended attribute from file C<path> named C<name>. If C<path> "
12096 "is a symlink, then this call returns an extended attribute from the symlink."
12100 #: ../src/guestfs-actions.pod:3531
12101 msgid "See also: C<guestfs_lgetxattrs>, C<guestfs_getxattr>, L<attr(5)>."
12105 #: ../src/guestfs-actions.pod:3539
12106 msgid "guestfs_lgetxattrs"
12110 #: ../src/guestfs-actions.pod:3541
12113 " struct guestfs_xattr_list *\n"
12114 " guestfs_lgetxattrs (guestfs_h *g,\n"
12115 " const char *path);\n"
12120 #: ../src/guestfs-actions.pod:3545
12122 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
12123 "then it returns the extended attributes of the link itself."
12127 #: ../src/guestfs-actions.pod:3555
12128 msgid "guestfs_list_devices"
12132 #: ../src/guestfs-actions.pod:3557
12136 " guestfs_list_devices (guestfs_h *g);\n"
12141 #: ../src/guestfs-actions.pod:3560 ../fish/guestfish-actions.pod:2482
12142 msgid "List all the block devices."
12146 #: ../src/guestfs-actions.pod:3562 ../fish/guestfish-actions.pod:2484
12147 msgid "The full block device names are returned, eg. C</dev/sda>."
12151 #: ../src/guestfs-actions.pod:3572
12152 msgid "guestfs_list_filesystems"
12156 #: ../src/guestfs-actions.pod:3574
12160 " guestfs_list_filesystems (guestfs_h *g);\n"
12165 #: ../src/guestfs-actions.pod:3577 ../fish/guestfish-actions.pod:2492
12167 "This inspection command looks for filesystems on partitions, block devices "
12168 "and logical volumes, returning a list of devices containing filesystems and "
12173 #: ../src/guestfs-actions.pod:3581 ../fish/guestfish-actions.pod:2496
12175 "The return value is a hash, where the keys are the devices containing "
12176 "filesystems, and the values are the filesystem types. For example:"
12180 #: ../src/guestfs-actions.pod:3585 ../fish/guestfish-actions.pod:2500
12183 " \"/dev/sda1\" => \"ntfs\"\n"
12184 " \"/dev/sda2\" => \"ext2\"\n"
12185 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
12186 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
12191 #: ../src/guestfs-actions.pod:3590 ../fish/guestfish-actions.pod:2505
12193 "The value can have the special value \"unknown\", meaning the content of the "
12194 "device is undetermined or empty. \"swap\" means a Linux swap partition."
12198 #: ../src/guestfs-actions.pod:3594
12200 "This command runs other libguestfs commands, which might include "
12201 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
12202 "soon after launch and only when nothing is mounted."
12206 #: ../src/guestfs-actions.pod:3598
12208 "Not all of the filesystems returned will be mountable. In particular, swap "
12209 "partitions are returned in the list. Also this command does not check that "
12210 "each filesystem found is valid and mountable, and some filesystems might be "
12211 "mountable but require special options. Filesystems may not all belong to a "
12212 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
12216 #: ../src/guestfs-actions.pod:3612 ../src/guestfs-actions.pod:5224
12217 msgid "(Added in 1.5.15)"
12221 #: ../src/guestfs-actions.pod:3614
12222 msgid "guestfs_list_partitions"
12226 #: ../src/guestfs-actions.pod:3616
12230 " guestfs_list_partitions (guestfs_h *g);\n"
12235 #: ../src/guestfs-actions.pod:3619 ../fish/guestfish-actions.pod:2525
12236 msgid "List all the partitions detected on all block devices."
12240 #: ../src/guestfs-actions.pod:3621 ../fish/guestfish-actions.pod:2527
12241 msgid "The full partition device names are returned, eg. C</dev/sda1>"
12245 #: ../src/guestfs-actions.pod:3623
12247 "This does not return logical volumes. For that you will need to call "
12252 #: ../src/guestfs-actions.pod:3634
12257 #: ../src/guestfs-actions.pod:3636
12261 " guestfs_ll (guestfs_h *g,\n"
12262 " const char *directory);\n"
12267 #: ../src/guestfs-actions.pod:3640 ../fish/guestfish-actions.pod:2538
12269 "List the files in C<directory> (relative to the root directory, there is no "
12270 "cwd) in the format of 'ls -la'."
12274 #: ../src/guestfs-actions.pod:3643 ../fish/guestfish-actions.pod:2541
12276 "This command is mostly useful for interactive sessions. It is I<not> "
12277 "intended that you try to parse the output string."
12281 #: ../src/guestfs-actions.pod:3651
12286 #: ../src/guestfs-actions.pod:3653
12290 " guestfs_ln (guestfs_h *g,\n"
12291 " const char *target,\n"
12292 " const char *linkname);\n"
12297 #: ../src/guestfs-actions.pod:3658 ../fish/guestfish-actions.pod:2548
12298 msgid "This command creates a hard link using the C<ln> command."
12302 #: ../src/guestfs-actions.pod:3664
12303 msgid "guestfs_ln_f"
12307 #: ../src/guestfs-actions.pod:3666
12311 " guestfs_ln_f (guestfs_h *g,\n"
12312 " const char *target,\n"
12313 " const char *linkname);\n"
12318 #: ../src/guestfs-actions.pod:3671 ../fish/guestfish-actions.pod:2554
12320 "This command creates a hard link using the C<ln -f> command. The I<-f> "
12321 "option removes the link (C<linkname>) if it exists already."
12325 #: ../src/guestfs-actions.pod:3678
12326 msgid "guestfs_ln_s"
12330 #: ../src/guestfs-actions.pod:3680
12334 " guestfs_ln_s (guestfs_h *g,\n"
12335 " const char *target,\n"
12336 " const char *linkname);\n"
12341 #: ../src/guestfs-actions.pod:3685 ../fish/guestfish-actions.pod:2561
12342 msgid "This command creates a symbolic link using the C<ln -s> command."
12346 #: ../src/guestfs-actions.pod:3691
12347 msgid "guestfs_ln_sf"
12351 #: ../src/guestfs-actions.pod:3693
12355 " guestfs_ln_sf (guestfs_h *g,\n"
12356 " const char *target,\n"
12357 " const char *linkname);\n"
12362 #: ../src/guestfs-actions.pod:3698 ../fish/guestfish-actions.pod:2567
12364 "This command creates a symbolic link using the C<ln -sf> command, The I<-f> "
12365 "option removes the link (C<linkname>) if it exists already."
12369 #: ../src/guestfs-actions.pod:3705
12370 msgid "guestfs_lremovexattr"
12374 #: ../src/guestfs-actions.pod:3707
12378 " guestfs_lremovexattr (guestfs_h *g,\n"
12379 " const char *xattr,\n"
12380 " const char *path);\n"
12385 #: ../src/guestfs-actions.pod:3712
12387 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
12388 "link, then it removes an extended attribute of the link itself."
12392 #: ../src/guestfs-actions.pod:3720
12397 #: ../src/guestfs-actions.pod:3722
12401 " guestfs_ls (guestfs_h *g,\n"
12402 " const char *directory);\n"
12407 #: ../src/guestfs-actions.pod:3726 ../fish/guestfish-actions.pod:2582
12409 "List the files in C<directory> (relative to the root directory, there is no "
12410 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
12414 #: ../src/guestfs-actions.pod:3730
12416 "This command is mostly useful for interactive sessions. Programs should "
12417 "probably use C<guestfs_readdir> instead."
12421 #: ../src/guestfs-actions.pod:3739
12422 msgid "guestfs_lsetxattr"
12426 #: ../src/guestfs-actions.pod:3741
12430 " guestfs_lsetxattr (guestfs_h *g,\n"
12431 " const char *xattr,\n"
12432 " const char *val,\n"
12434 " const char *path);\n"
12439 #: ../src/guestfs-actions.pod:3748
12441 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
12442 "then it sets an extended attribute of the link itself."
12446 #: ../src/guestfs-actions.pod:3756
12447 msgid "guestfs_lstat"
12451 #: ../src/guestfs-actions.pod:3758
12454 " struct guestfs_stat *\n"
12455 " guestfs_lstat (guestfs_h *g,\n"
12456 " const char *path);\n"
12461 #: ../src/guestfs-actions.pod:3762 ../src/guestfs-actions.pod:6355
12462 #: ../fish/guestfish-actions.pod:2601 ../fish/guestfish-actions.pod:4305
12463 msgid "Returns file information for the given C<path>."
12467 #: ../src/guestfs-actions.pod:3764
12469 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
12470 "link, then the link is stat-ed, not the file it refers to."
12474 #: ../src/guestfs-actions.pod:3768 ../fish/guestfish-actions.pod:2607
12475 msgid "This is the same as the C<lstat(2)> system call."
12479 #: ../src/guestfs-actions.pod:3770 ../src/guestfs-actions.pod:6359
12481 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
12482 "error. I<The caller must call C<guestfs_free_stat> after use>."
12486 #: ../src/guestfs-actions.pod:3774 ../src/guestfs-actions.pod:6363
12487 #: ../src/guestfs-actions.pod:6381 ../src/guestfs-actions.pod:6762
12488 msgid "(Added in 0.9.2)"
12492 #: ../src/guestfs-actions.pod:3776
12493 msgid "guestfs_lstatlist"
12497 #: ../src/guestfs-actions.pod:3778
12500 " struct guestfs_stat_list *\n"
12501 " guestfs_lstatlist (guestfs_h *g,\n"
12502 " const char *path,\n"
12503 " char *const *names);\n"
12508 #: ../src/guestfs-actions.pod:3783
12510 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
12511 "files, where all files are in the directory C<path>. C<names> is the list "
12512 "of files from this directory."
12516 #: ../src/guestfs-actions.pod:3787 ../fish/guestfish-actions.pod:2617
12518 "On return you get a list of stat structs, with a one-to-one correspondence "
12519 "to the C<names> list. If any name did not exist or could not be lstat'd, "
12520 "then the C<ino> field of that structure is set to C<-1>."
12524 #: ../src/guestfs-actions.pod:3792
12526 "This call is intended for programs that want to efficiently list a directory "
12527 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
12528 "for a similarly efficient call for getting extended attributes. Very long "
12529 "directory listings might cause the protocol message size to be exceeded, "
12530 "causing this call to fail. The caller must split up such requests into "
12531 "smaller groups of names."
12535 #: ../src/guestfs-actions.pod:3800
12537 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
12538 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
12542 #: ../src/guestfs-actions.pod:3806
12543 msgid "guestfs_luks_add_key"
12547 #: ../src/guestfs-actions.pod:3808
12551 " guestfs_luks_add_key (guestfs_h *g,\n"
12552 " const char *device,\n"
12553 " const char *key,\n"
12554 " const char *newkey,\n"
12560 #: ../src/guestfs-actions.pod:3815 ../fish/guestfish-actions.pod:2634
12562 "This command adds a new key on LUKS device C<device>. C<key> is any "
12563 "existing key, and is used to access the device. C<newkey> is the new key to "
12564 "add. C<keyslot> is the key slot that will be replaced."
12568 #: ../src/guestfs-actions.pod:3820
12570 "Note that if C<keyslot> already contains a key, then this command will "
12571 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
12575 #: ../src/guestfs-actions.pod:3826 ../src/guestfs-actions.pod:3866
12576 #: ../src/guestfs-actions.pod:3889 ../src/guestfs-actions.pod:3909
12577 #: ../src/guestfs-actions.pod:3941 ../src/guestfs-actions.pod:3960
12579 "This function takes a key or passphrase parameter which could contain "
12580 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
12585 #: ../src/guestfs-actions.pod:3830 ../src/guestfs-actions.pod:3870
12586 #: ../src/guestfs-actions.pod:3893 ../src/guestfs-actions.pod:3913
12587 msgid "(Added in 1.5.2)"
12591 #: ../src/guestfs-actions.pod:3832
12592 msgid "guestfs_luks_close"
12596 #: ../src/guestfs-actions.pod:3834
12600 " guestfs_luks_close (guestfs_h *g,\n"
12601 " const char *device);\n"
12606 #: ../src/guestfs-actions.pod:3838
12608 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
12609 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
12610 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
12611 "underlying block device."
12615 #: ../src/guestfs-actions.pod:3846 ../src/guestfs-actions.pod:3945
12616 #: ../src/guestfs-actions.pod:3964 ../src/guestfs-actions.pod:4014
12617 #: ../src/guestfs-actions.pod:4062
12618 msgid "(Added in 1.5.1)"
12622 #: ../src/guestfs-actions.pod:3848
12623 msgid "guestfs_luks_format"
12627 #: ../src/guestfs-actions.pod:3850
12631 " guestfs_luks_format (guestfs_h *g,\n"
12632 " const char *device,\n"
12633 " const char *key,\n"
12639 #: ../src/guestfs-actions.pod:3856 ../fish/guestfish-actions.pod:2660
12641 "This command erases existing data on C<device> and formats the device as a "
12642 "LUKS encrypted device. C<key> is the initial key, which is added to key "
12643 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
12647 #: ../src/guestfs-actions.pod:3863 ../src/guestfs-actions.pod:3886
12648 #: ../src/guestfs-actions.pod:4026 ../src/guestfs-actions.pod:4975
12649 #: ../src/guestfs-actions.pod:5755 ../src/guestfs-actions.pod:6162
12650 #: ../src/guestfs-actions.pod:6192 ../src/guestfs-actions.pod:6225
12651 #: ../src/guestfs-actions.pod:7406 ../fish/guestfish-actions.pod:2668
12652 #: ../fish/guestfish-actions.pod:2681 ../fish/guestfish-actions.pod:2765
12653 #: ../fish/guestfish-actions.pod:3346 ../fish/guestfish-actions.pod:3866
12654 #: ../fish/guestfish-actions.pod:4176 ../fish/guestfish-actions.pod:4199
12655 #: ../fish/guestfish-actions.pod:4221 ../fish/guestfish-actions.pod:4950
12657 "B<This command is dangerous. Without careful use you can easily destroy all "
12662 #: ../src/guestfs-actions.pod:3872
12663 msgid "guestfs_luks_format_cipher"
12667 #: ../src/guestfs-actions.pod:3874
12671 " guestfs_luks_format_cipher (guestfs_h *g,\n"
12672 " const char *device,\n"
12673 " const char *key,\n"
12675 " const char *cipher);\n"
12680 #: ../src/guestfs-actions.pod:3881
12682 "This command is the same as C<guestfs_luks_format> but it also allows you to "
12683 "set the C<cipher> used."
12687 #: ../src/guestfs-actions.pod:3895
12688 msgid "guestfs_luks_kill_slot"
12692 #: ../src/guestfs-actions.pod:3897
12696 " guestfs_luks_kill_slot (guestfs_h *g,\n"
12697 " const char *device,\n"
12698 " const char *key,\n"
12704 #: ../src/guestfs-actions.pod:3903 ../fish/guestfish-actions.pod:2688
12706 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
12707 "device C<device>. C<key> must be one of the I<other> keys."
12711 #: ../src/guestfs-actions.pod:3915
12712 msgid "guestfs_luks_open"
12716 #: ../src/guestfs-actions.pod:3917
12720 " guestfs_luks_open (guestfs_h *g,\n"
12721 " const char *device,\n"
12722 " const char *key,\n"
12723 " const char *mapname);\n"
12728 #: ../src/guestfs-actions.pod:3923 ../fish/guestfish-actions.pod:2699
12730 "This command opens a block device which has been encrypted according to the "
12731 "Linux Unified Key Setup (LUKS) standard."
12735 #: ../src/guestfs-actions.pod:3926 ../fish/guestfish-actions.pod:2702
12736 msgid "C<device> is the encrypted block device or partition."
12740 #: ../src/guestfs-actions.pod:3928 ../fish/guestfish-actions.pod:2704
12742 "The caller must supply one of the keys associated with the LUKS block "
12743 "device, in the C<key> parameter."
12747 #: ../src/guestfs-actions.pod:3931 ../fish/guestfish-actions.pod:2707
12749 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
12750 "writes to this block device are decrypted from and encrypted to the "
12751 "underlying C<device> respectively."
12755 #: ../src/guestfs-actions.pod:3935
12757 "If this block device contains LVM volume groups, then calling "
12758 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
12763 #: ../src/guestfs-actions.pod:3947
12764 msgid "guestfs_luks_open_ro"
12768 #: ../src/guestfs-actions.pod:3949
12772 " guestfs_luks_open_ro (guestfs_h *g,\n"
12773 " const char *device,\n"
12774 " const char *key,\n"
12775 " const char *mapname);\n"
12780 #: ../src/guestfs-actions.pod:3955
12782 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
12787 #: ../src/guestfs-actions.pod:3966
12788 msgid "guestfs_lvcreate"
12792 #: ../src/guestfs-actions.pod:3968
12796 " guestfs_lvcreate (guestfs_h *g,\n"
12797 " const char *logvol,\n"
12798 " const char *volgroup,\n"
12804 #: ../src/guestfs-actions.pod:3974 ../fish/guestfish-actions.pod:2732
12806 "This creates an LVM logical volume called C<logvol> on the volume group "
12807 "C<volgroup>, with C<size> megabytes."
12811 #: ../src/guestfs-actions.pod:3981
12812 msgid "guestfs_lvm_canonical_lv_name"
12816 #: ../src/guestfs-actions.pod:3983
12820 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
12821 " const char *lvname);\n"
12826 #: ../src/guestfs-actions.pod:3987 ../fish/guestfish-actions.pod:2739
12828 "This converts alternative naming schemes for LVs that you might find to the "
12829 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
12834 #: ../src/guestfs-actions.pod:3991 ../fish/guestfish-actions.pod:2743
12836 "This command returns an error if the C<lvname> parameter does not refer to a "
12841 #: ../src/guestfs-actions.pod:3994
12842 msgid "See also C<guestfs_is_lv>."
12846 #: ../src/guestfs-actions.pod:3999
12847 msgid "(Added in 1.5.24)"
12851 #: ../src/guestfs-actions.pod:4001
12852 msgid "guestfs_lvm_clear_filter"
12856 #: ../src/guestfs-actions.pod:4003
12860 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
12865 #: ../src/guestfs-actions.pod:4006
12867 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
12868 "see every block device."
12872 #: ../src/guestfs-actions.pod:4009 ../src/guestfs-actions.pod:4051
12873 #: ../fish/guestfish-actions.pod:2755 ../fish/guestfish-actions.pod:2786
12875 "This command also clears the LVM cache and performs a volume group scan."
12879 #: ../src/guestfs-actions.pod:4016
12880 msgid "guestfs_lvm_remove_all"
12884 #: ../src/guestfs-actions.pod:4018
12888 " guestfs_lvm_remove_all (guestfs_h *g);\n"
12893 #: ../src/guestfs-actions.pod:4021 ../fish/guestfish-actions.pod:2762
12895 "This command removes all LVM logical volumes, volume groups and physical "
12900 #: ../src/guestfs-actions.pod:4031
12901 msgid "guestfs_lvm_set_filter"
12905 #: ../src/guestfs-actions.pod:4033
12909 " guestfs_lvm_set_filter (guestfs_h *g,\n"
12910 " char *const *devices);\n"
12915 #: ../src/guestfs-actions.pod:4037 ../fish/guestfish-actions.pod:2772
12917 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
12918 "block devices in the list C<devices>, and will ignore all other attached "
12923 #: ../src/guestfs-actions.pod:4041 ../fish/guestfish-actions.pod:2776
12925 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
12926 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
12927 "there are two types of duplication possible: either cloned PVs/VGs which "
12928 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
12929 "same name. In normal operation you cannot create this situation, but you "
12930 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
12931 "inside the LVM metadata."
12935 #: ../src/guestfs-actions.pod:4054 ../fish/guestfish-actions.pod:2789
12936 msgid "You can filter whole block devices or individual partitions."
12940 #: ../src/guestfs-actions.pod:4056 ../fish/guestfish-actions.pod:2791
12942 "You cannot use this if any VG is currently in use (eg. contains a mounted "
12943 "filesystem), even if you are not filtering out that VG."
12947 #: ../src/guestfs-actions.pod:4064
12948 msgid "guestfs_lvremove"
12952 #: ../src/guestfs-actions.pod:4066
12956 " guestfs_lvremove (guestfs_h *g,\n"
12957 " const char *device);\n"
12962 #: ../src/guestfs-actions.pod:4070 ../fish/guestfish-actions.pod:2799
12964 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
12965 "LV, such as C</dev/VG/LV>."
12969 #: ../src/guestfs-actions.pod:4073 ../fish/guestfish-actions.pod:2802
12971 "You can also remove all LVs in a volume group by specifying the VG name, C</"
12976 #: ../src/guestfs-actions.pod:4078 ../src/guestfs-actions.pod:5321
12977 #: ../src/guestfs-actions.pod:7138
12978 msgid "(Added in 1.0.13)"
12982 #: ../src/guestfs-actions.pod:4080
12983 msgid "guestfs_lvrename"
12987 #: ../src/guestfs-actions.pod:4082
12991 " guestfs_lvrename (guestfs_h *g,\n"
12992 " const char *logvol,\n"
12993 " const char *newlogvol);\n"
12998 #: ../src/guestfs-actions.pod:4087 ../fish/guestfish-actions.pod:2809
12999 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
13003 #: ../src/guestfs-actions.pod:4091 ../src/guestfs-actions.pod:7151
13004 msgid "(Added in 1.0.83)"
13008 #: ../src/guestfs-actions.pod:4093
13009 msgid "guestfs_lvresize"
13013 #: ../src/guestfs-actions.pod:4095
13017 " guestfs_lvresize (guestfs_h *g,\n"
13018 " const char *device,\n"
13024 #: ../src/guestfs-actions.pod:4100 ../fish/guestfish-actions.pod:2815
13026 "This resizes (expands or shrinks) an existing LVM logical volume to "
13027 "C<mbytes>. When reducing, data in the reduced part is lost."
13031 #: ../src/guestfs-actions.pod:4108
13032 msgid "guestfs_lvresize_free"
13036 #: ../src/guestfs-actions.pod:4110
13040 " guestfs_lvresize_free (guestfs_h *g,\n"
13041 " const char *lv,\n"
13047 #: ../src/guestfs-actions.pod:4115 ../fish/guestfish-actions.pod:2823
13049 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
13050 "remaining free space in the volume group. Commonly you would call this with "
13051 "pc = 100 which expands the logical volume as much as possible, using all "
13052 "remaining free space in the volume group."
13056 #: ../src/guestfs-actions.pod:4123
13057 msgid "(Added in 1.3.3)"
13061 #: ../src/guestfs-actions.pod:4125
13062 msgid "guestfs_lvs"
13066 #: ../src/guestfs-actions.pod:4127
13070 " guestfs_lvs (guestfs_h *g);\n"
13075 #: ../src/guestfs-actions.pod:4130 ../fish/guestfish-actions.pod:2833
13077 "List all the logical volumes detected. This is the equivalent of the L<lvs"
13082 #: ../src/guestfs-actions.pod:4133 ../fish/guestfish-actions.pod:2836
13084 "This returns a list of the logical volume device names (eg. C</dev/"
13085 "VolGroup00/LogVol00>)."
13089 #: ../src/guestfs-actions.pod:4136
13090 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
13094 #: ../src/guestfs-actions.pod:4144
13095 msgid "guestfs_lvs_full"
13099 #: ../src/guestfs-actions.pod:4146
13102 " struct guestfs_lvm_lv_list *\n"
13103 " guestfs_lvs_full (guestfs_h *g);\n"
13108 #: ../src/guestfs-actions.pod:4149 ../fish/guestfish-actions.pod:2845
13110 "List all the logical volumes detected. This is the equivalent of the L<lvs"
13111 "(8)> command. The \"full\" version includes all fields."
13115 #: ../src/guestfs-actions.pod:4152
13117 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
13118 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after use>."
13122 #: ../src/guestfs-actions.pod:4158
13123 msgid "guestfs_lvuuid"
13127 #: ../src/guestfs-actions.pod:4160
13131 " guestfs_lvuuid (guestfs_h *g,\n"
13132 " const char *device);\n"
13137 #: ../src/guestfs-actions.pod:4164 ../fish/guestfish-actions.pod:2852
13138 msgid "This command returns the UUID of the LVM LV C<device>."
13142 #: ../src/guestfs-actions.pod:4171
13143 msgid "guestfs_lxattrlist"
13147 #: ../src/guestfs-actions.pod:4173
13150 " struct guestfs_xattr_list *\n"
13151 " guestfs_lxattrlist (guestfs_h *g,\n"
13152 " const char *path,\n"
13153 " char *const *names);\n"
13158 #: ../src/guestfs-actions.pod:4178 ../fish/guestfish-actions.pod:2858
13160 "This call allows you to get the extended attributes of multiple files, where "
13161 "all files are in the directory C<path>. C<names> is the list of files from "
13166 #: ../src/guestfs-actions.pod:4182 ../fish/guestfish-actions.pod:2862
13168 "On return you get a flat list of xattr structs which must be interpreted "
13169 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
13170 "C<attrval> in this struct is zero-length to indicate there was an error "
13171 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
13172 "number (the number of following attributes for this file, which could be C<"
13173 "\"0\">). Then after the first xattr struct are the zero or more attributes "
13174 "for the first named file. This repeats for the second and subsequent files."
13178 #: ../src/guestfs-actions.pod:4192
13180 "This call is intended for programs that want to efficiently list a directory "
13181 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
13182 "a similarly efficient call for getting standard stats. Very long directory "
13183 "listings might cause the protocol message size to be exceeded, causing this "
13184 "call to fail. The caller must split up such requests into smaller groups of "
13189 #: ../src/guestfs-actions.pod:4206
13190 msgid "guestfs_mkdir"
13194 #: ../src/guestfs-actions.pod:4208
13198 " guestfs_mkdir (guestfs_h *g,\n"
13199 " const char *path);\n"
13204 #: ../src/guestfs-actions.pod:4212 ../fish/guestfish-actions.pod:2884
13205 msgid "Create a directory named C<path>."
13209 #: ../src/guestfs-actions.pod:4218
13210 msgid "guestfs_mkdir_mode"
13214 #: ../src/guestfs-actions.pod:4220
13218 " guestfs_mkdir_mode (guestfs_h *g,\n"
13219 " const char *path,\n"
13225 #: ../src/guestfs-actions.pod:4225 ../fish/guestfish-actions.pod:2890
13227 "This command creates a directory, setting the initial permissions of the "
13228 "directory to C<mode>."
13232 #: ../src/guestfs-actions.pod:4228 ../fish/guestfish-actions.pod:2893
13234 "For common Linux filesystems, the actual mode which is set will be C<mode & "
13235 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
13240 #: ../src/guestfs-actions.pod:4232
13241 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
13245 #: ../src/guestfs-actions.pod:4238
13246 msgid "guestfs_mkdir_p"
13250 #: ../src/guestfs-actions.pod:4240
13254 " guestfs_mkdir_p (guestfs_h *g,\n"
13255 " const char *path);\n"
13260 #: ../src/guestfs-actions.pod:4244 ../fish/guestfish-actions.pod:2903
13262 "Create a directory named C<path>, creating any parent directories as "
13263 "necessary. This is like the C<mkdir -p> shell command."
13267 #: ../src/guestfs-actions.pod:4251
13268 msgid "guestfs_mkdtemp"
13272 #: ../src/guestfs-actions.pod:4253
13276 " guestfs_mkdtemp (guestfs_h *g,\n"
13277 " const char *template);\n"
13282 #: ../src/guestfs-actions.pod:4257 ../fish/guestfish-actions.pod:2910
13284 "This command creates a temporary directory. The C<template> parameter "
13285 "should be a full pathname for the temporary directory name with the final "
13286 "six characters being \"XXXXXX\"."
13290 #: ../src/guestfs-actions.pod:4262 ../fish/guestfish-actions.pod:2915
13292 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
13293 "being suitable for Windows filesystems."
13297 #: ../src/guestfs-actions.pod:4265 ../fish/guestfish-actions.pod:2918
13298 msgid "The name of the temporary directory that was created is returned."
13302 #: ../src/guestfs-actions.pod:4268 ../fish/guestfish-actions.pod:2921
13303 msgid "The temporary directory is created with mode 0700 and is owned by root."
13307 #: ../src/guestfs-actions.pod:4271 ../fish/guestfish-actions.pod:2924
13309 "The caller is responsible for deleting the temporary directory and its "
13310 "contents after use."
13314 #: ../src/guestfs-actions.pod:4274 ../fish/guestfish-actions.pod:2927
13315 msgid "See also: L<mkdtemp(3)>"
13319 #: ../src/guestfs-actions.pod:4281
13320 msgid "guestfs_mke2fs_J"
13324 #: ../src/guestfs-actions.pod:4283
13328 " guestfs_mke2fs_J (guestfs_h *g,\n"
13329 " const char *fstype,\n"
13330 " int blocksize,\n"
13331 " const char *device,\n"
13332 " const char *journal);\n"
13337 #: ../src/guestfs-actions.pod:4290 ../fish/guestfish-actions.pod:2933
13339 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13340 "C<journal>. It is equivalent to the command:"
13344 #: ../src/guestfs-actions.pod:4294 ../fish/guestfish-actions.pod:2937
13347 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
13352 #: ../src/guestfs-actions.pod:4296
13353 msgid "See also C<guestfs_mke2journal>."
13357 #: ../src/guestfs-actions.pod:4300 ../src/guestfs-actions.pod:4318
13358 #: ../src/guestfs-actions.pod:4336 ../src/guestfs-actions.pod:4352
13359 #: ../src/guestfs-actions.pod:4366 ../src/guestfs-actions.pod:4380
13360 #: ../src/guestfs-actions.pod:4439 ../src/guestfs-actions.pod:4704
13361 msgid "(Added in 1.0.68)"
13365 #: ../src/guestfs-actions.pod:4302
13366 msgid "guestfs_mke2fs_JL"
13370 #: ../src/guestfs-actions.pod:4304
13374 " guestfs_mke2fs_JL (guestfs_h *g,\n"
13375 " const char *fstype,\n"
13376 " int blocksize,\n"
13377 " const char *device,\n"
13378 " const char *label);\n"
13383 #: ../src/guestfs-actions.pod:4311 ../fish/guestfish-actions.pod:2945
13385 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13386 "the journal labeled C<label>."
13390 #: ../src/guestfs-actions.pod:4314
13391 msgid "See also C<guestfs_mke2journal_L>."
13395 #: ../src/guestfs-actions.pod:4320
13396 msgid "guestfs_mke2fs_JU"
13400 #: ../src/guestfs-actions.pod:4322
13404 " guestfs_mke2fs_JU (guestfs_h *g,\n"
13405 " const char *fstype,\n"
13406 " int blocksize,\n"
13407 " const char *device,\n"
13408 " const char *uuid);\n"
13413 #: ../src/guestfs-actions.pod:4329 ../fish/guestfish-actions.pod:2954
13415 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
13416 "the journal with UUID C<uuid>."
13420 #: ../src/guestfs-actions.pod:4332
13421 msgid "See also C<guestfs_mke2journal_U>."
13425 #: ../src/guestfs-actions.pod:4338
13426 msgid "guestfs_mke2journal"
13430 #: ../src/guestfs-actions.pod:4340
13434 " guestfs_mke2journal (guestfs_h *g,\n"
13435 " int blocksize,\n"
13436 " const char *device);\n"
13441 #: ../src/guestfs-actions.pod:4345 ../fish/guestfish-actions.pod:2963
13443 "This creates an ext2 external journal on C<device>. It is equivalent to the "
13448 #: ../src/guestfs-actions.pod:4348 ../fish/guestfish-actions.pod:2966
13451 " mke2fs -O journal_dev -b blocksize device\n"
13456 #: ../src/guestfs-actions.pod:4354
13457 msgid "guestfs_mke2journal_L"
13461 #: ../src/guestfs-actions.pod:4356
13465 " guestfs_mke2journal_L (guestfs_h *g,\n"
13466 " int blocksize,\n"
13467 " const char *label,\n"
13468 " const char *device);\n"
13473 #: ../src/guestfs-actions.pod:4362 ../fish/guestfish-actions.pod:2972
13474 msgid "This creates an ext2 external journal on C<device> with label C<label>."
13478 #: ../src/guestfs-actions.pod:4368
13479 msgid "guestfs_mke2journal_U"
13483 #: ../src/guestfs-actions.pod:4370
13487 " guestfs_mke2journal_U (guestfs_h *g,\n"
13488 " int blocksize,\n"
13489 " const char *uuid,\n"
13490 " const char *device);\n"
13495 #: ../src/guestfs-actions.pod:4376 ../fish/guestfish-actions.pod:2978
13496 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
13500 #: ../src/guestfs-actions.pod:4382
13501 msgid "guestfs_mkfifo"
13505 #: ../src/guestfs-actions.pod:4384
13509 " guestfs_mkfifo (guestfs_h *g,\n"
13511 " const char *path);\n"
13516 #: ../src/guestfs-actions.pod:4389
13518 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
13519 "is just a convenient wrapper around C<guestfs_mknod>."
13523 #: ../src/guestfs-actions.pod:4399
13524 msgid "guestfs_mkfs"
13528 #: ../src/guestfs-actions.pod:4401
13532 " guestfs_mkfs (guestfs_h *g,\n"
13533 " const char *fstype,\n"
13534 " const char *device);\n"
13539 #: ../src/guestfs-actions.pod:4406 ../fish/guestfish-actions.pod:2994
13541 "This creates a filesystem on C<device> (usually a partition or LVM logical "
13542 "volume). The filesystem type is C<fstype>, for example C<ext3>."
13546 #: ../src/guestfs-actions.pod:4414
13547 msgid "guestfs_mkfs_b"
13551 #: ../src/guestfs-actions.pod:4416
13555 " guestfs_mkfs_b (guestfs_h *g,\n"
13556 " const char *fstype,\n"
13557 " int blocksize,\n"
13558 " const char *device);\n"
13563 #: ../src/guestfs-actions.pod:4422
13565 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
13566 "block size of the resulting filesystem. Supported block sizes depend on the "
13567 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
13571 #: ../src/guestfs-actions.pod:4427 ../src/guestfs-actions.pod:4470
13572 #: ../fish/guestfish-actions.pod:3007 ../fish/guestfish-actions.pod:3034
13574 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
13579 #: ../src/guestfs-actions.pod:4432 ../fish/guestfish-actions.pod:3010
13581 "This function is deprecated. In new code, use the C<mkfs_opts> call instead."
13585 #: ../src/guestfs-actions.pod:4441
13586 msgid "guestfs_mkfs_opts"
13590 #: ../src/guestfs-actions.pod:4443
13594 " guestfs_mkfs_opts (guestfs_h *g,\n"
13595 " const char *fstype,\n"
13596 " const char *device,\n"
13602 #: ../src/guestfs-actions.pod:4454
13605 " GUESTFS_MKFS_OPTS_BLOCKSIZE, int blocksize,\n"
13606 " GUESTFS_MKFS_OPTS_FEATURES, const char *features,\n"
13611 #: ../src/guestfs-actions.pod:4457 ../fish/guestfish-actions.pod:3021
13613 "This function creates a filesystem on C<device>. The filesystem type is "
13614 "C<fstype>, for example C<ext3>."
13618 #: ../src/guestfs-actions.pod:4464 ../fish/guestfish-actions.pod:3028
13619 msgid "C<blocksize>"
13623 #: ../src/guestfs-actions.pod:4466 ../fish/guestfish-actions.pod:3030
13625 "The filesystem block size. Supported block sizes depend on the filesystem "
13626 "type, but typically they are C<1024>, C<2048> or C<4096> for Linux ext2/3 "
13631 #: ../src/guestfs-actions.pod:4473 ../fish/guestfish-actions.pod:3037
13632 msgid "For UFS block sizes, please see L<mkfs.ufs(8)>."
13636 #: ../src/guestfs-actions.pod:4475 ../fish/guestfish-actions.pod:3039
13637 msgid "C<features>"
13641 #: ../src/guestfs-actions.pod:4477 ../fish/guestfish-actions.pod:3041
13642 msgid "This passes the I<-O> parameter to the external mkfs program."
13646 #: ../src/guestfs-actions.pod:4479 ../fish/guestfish-actions.pod:3043
13648 "For certain filesystem types, this allows extra filesystem features to be "
13649 "selected. See L<mke2fs(8)> and L<mkfs.ufs(8)> for more details."
13653 #: ../src/guestfs-actions.pod:4483 ../fish/guestfish-actions.pod:3047
13655 "You cannot use this optional parameter with the C<gfs> or C<gfs2> filesystem "
13660 #: ../src/guestfs-actions.pod:4490
13661 msgid "(Added in 1.7.19)"
13665 #: ../src/guestfs-actions.pod:4492
13666 msgid "guestfs_mkfs_opts_va"
13670 #: ../src/guestfs-actions.pod:4494
13674 " guestfs_mkfs_opts_va (guestfs_h *g,\n"
13675 " const char *fstype,\n"
13676 " const char *device,\n"
13677 " va_list args);\n"
13682 #: ../src/guestfs-actions.pod:4500
13683 msgid "This is the \"va_list variant\" of L</guestfs_mkfs_opts>."
13687 #: ../src/guestfs-actions.pod:4504
13688 msgid "guestfs_mkfs_opts_argv"
13692 #: ../src/guestfs-actions.pod:4506
13696 " guestfs_mkfs_opts_argv (guestfs_h *g,\n"
13697 " const char *fstype,\n"
13698 " const char *device,\n"
13699 " const struct guestfs_mkfs_opts_argv *optargs);\n"
13704 #: ../src/guestfs-actions.pod:4512
13705 msgid "This is the \"argv variant\" of L</guestfs_mkfs_opts>."
13709 #: ../src/guestfs-actions.pod:4516
13710 msgid "guestfs_mkmountpoint"
13714 #: ../src/guestfs-actions.pod:4518
13718 " guestfs_mkmountpoint (guestfs_h *g,\n"
13719 " const char *exemptpath);\n"
13724 #: ../src/guestfs-actions.pod:4522
13726 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
13727 "that can be used to create extra mountpoints before mounting the first "
13732 #: ../src/guestfs-actions.pod:4526 ../fish/guestfish-actions.pod:3062
13734 "These calls are I<only> necessary in some very limited circumstances, mainly "
13735 "the case where you want to mount a mix of unrelated and/or read-only "
13736 "filesystems together."
13740 #: ../src/guestfs-actions.pod:4530 ../fish/guestfish-actions.pod:3066
13742 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
13743 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
13744 "inside that. You can unpack this as follows in guestfish:"
13748 #: ../src/guestfs-actions.pod:4535 ../fish/guestfish-actions.pod:3071
13751 " add-ro Fedora-11-i686-Live.iso\n"
13753 " mkmountpoint /cd\n"
13754 " mkmountpoint /sqsh\n"
13755 " mkmountpoint /ext3fs\n"
13756 " mount /dev/sda /cd\n"
13757 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
13758 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
13763 #: ../src/guestfs-actions.pod:4544 ../fish/guestfish-actions.pod:3080
13764 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
13768 #: ../src/guestfs-actions.pod:4546
13770 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
13771 "may get unexpected errors if you try to mix these calls. It is safest to "
13772 "manually unmount filesystems and remove mountpoints after use."
13776 #: ../src/guestfs-actions.pod:4550
13778 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
13779 "first, so for this to work for manual mountpoints, you must ensure that the "
13780 "innermost mountpoints have the longest pathnames, as in the example code "
13785 #: ../src/guestfs-actions.pod:4555 ../fish/guestfish-actions.pod:3091
13787 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
13791 #: ../src/guestfs-actions.pod:4557
13793 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
13794 "can cause C<guestfs_umount_all> to be called when the handle is closed which "
13795 "can also trigger these issues."
13799 #: ../src/guestfs-actions.pod:4563 ../src/guestfs-actions.pod:4829
13800 #: ../src/guestfs-actions.pod:5739
13801 msgid "(Added in 1.0.62)"
13805 #: ../src/guestfs-actions.pod:4565
13806 msgid "guestfs_mknod"
13810 #: ../src/guestfs-actions.pod:4567
13814 " guestfs_mknod (guestfs_h *g,\n"
13818 " const char *path);\n"
13823 #: ../src/guestfs-actions.pod:4574 ../fish/guestfish-actions.pod:3101
13825 "This call creates block or character special devices, or named pipes (FIFOs)."
13829 #: ../src/guestfs-actions.pod:4577 ../fish/guestfish-actions.pod:3104
13831 "The C<mode> parameter should be the mode, using the standard constants. "
13832 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
13833 "used when creating block and character special devices."
13837 #: ../src/guestfs-actions.pod:4582
13839 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
13840 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
13841 "regular file). These constants are available in the standard Linux header "
13842 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
13843 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
13844 "the appropriate constant for you."
13848 #: ../src/guestfs-actions.pod:4596
13849 msgid "guestfs_mknod_b"
13853 #: ../src/guestfs-actions.pod:4598
13857 " guestfs_mknod_b (guestfs_h *g,\n"
13861 " const char *path);\n"
13866 #: ../src/guestfs-actions.pod:4605
13868 "This call creates a block device node called C<path> with mode C<mode> and "
13869 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13870 "wrapper around C<guestfs_mknod>."
13874 #: ../src/guestfs-actions.pod:4615
13875 msgid "guestfs_mknod_c"
13879 #: ../src/guestfs-actions.pod:4617
13883 " guestfs_mknod_c (guestfs_h *g,\n"
13887 " const char *path);\n"
13892 #: ../src/guestfs-actions.pod:4624
13894 "This call creates a char device node called C<path> with mode C<mode> and "
13895 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
13896 "wrapper around C<guestfs_mknod>."
13900 #: ../src/guestfs-actions.pod:4634
13901 msgid "guestfs_mkswap"
13905 #: ../src/guestfs-actions.pod:4636
13909 " guestfs_mkswap (guestfs_h *g,\n"
13910 " const char *device);\n"
13915 #: ../src/guestfs-actions.pod:4640 ../fish/guestfish-actions.pod:3143
13916 msgid "Create a swap partition on C<device>."
13920 #: ../src/guestfs-actions.pod:4646
13921 msgid "guestfs_mkswap_L"
13925 #: ../src/guestfs-actions.pod:4648
13929 " guestfs_mkswap_L (guestfs_h *g,\n"
13930 " const char *label,\n"
13931 " const char *device);\n"
13936 #: ../src/guestfs-actions.pod:4653 ../fish/guestfish-actions.pod:3149
13937 msgid "Create a swap partition on C<device> with label C<label>."
13941 #: ../src/guestfs-actions.pod:4655 ../fish/guestfish-actions.pod:3151
13943 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
13944 "sda>), just to a partition. This appears to be a limitation of the kernel "
13949 #: ../src/guestfs-actions.pod:4663
13950 msgid "guestfs_mkswap_U"
13954 #: ../src/guestfs-actions.pod:4665
13958 " guestfs_mkswap_U (guestfs_h *g,\n"
13959 " const char *uuid,\n"
13960 " const char *device);\n"
13965 #: ../src/guestfs-actions.pod:4670 ../fish/guestfish-actions.pod:3159
13966 msgid "Create a swap partition on C<device> with UUID C<uuid>."
13970 #: ../src/guestfs-actions.pod:4676
13971 msgid "guestfs_mkswap_file"
13975 #: ../src/guestfs-actions.pod:4678
13979 " guestfs_mkswap_file (guestfs_h *g,\n"
13980 " const char *path);\n"
13985 #: ../src/guestfs-actions.pod:4682 ../fish/guestfish-actions.pod:3165
13986 msgid "Create a swap file."
13990 #: ../src/guestfs-actions.pod:4684
13992 "This command just writes a swap file signature to an existing file. To "
13993 "create the file itself, use something like C<guestfs_fallocate>."
13997 #: ../src/guestfs-actions.pod:4691
13998 msgid "guestfs_modprobe"
14002 #: ../src/guestfs-actions.pod:4693
14006 " guestfs_modprobe (guestfs_h *g,\n"
14007 " const char *modulename);\n"
14012 #: ../src/guestfs-actions.pod:4697 ../fish/guestfish-actions.pod:3174
14013 msgid "This loads a kernel module in the appliance."
14017 #: ../src/guestfs-actions.pod:4699 ../fish/guestfish-actions.pod:3176
14019 "The kernel module must have been whitelisted when libguestfs was built (see "
14020 "C<appliance/kmod.whitelist.in> in the source)."
14024 #: ../src/guestfs-actions.pod:4706
14025 msgid "guestfs_mount"
14029 #: ../src/guestfs-actions.pod:4708
14033 " guestfs_mount (guestfs_h *g,\n"
14034 " const char *device,\n"
14035 " const char *mountpoint);\n"
14040 #: ../src/guestfs-actions.pod:4713 ../fish/guestfish-actions.pod:3183
14042 "Mount a guest disk at a position in the filesystem. Block devices are named "
14043 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
14044 "those block devices contain partitions, they will have the usual names (eg. "
14045 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
14049 #: ../src/guestfs-actions.pod:4719 ../fish/guestfish-actions.pod:3189
14051 "The rules are the same as for L<mount(2)>: A filesystem must first be "
14052 "mounted on C</> before others can be mounted. Other filesystems can only be "
14053 "mounted on directories which already exist."
14057 #: ../src/guestfs-actions.pod:4724 ../fish/guestfish-actions.pod:3194
14059 "The mounted filesystem is writable, if we have sufficient permissions on the "
14060 "underlying device."
14064 #: ../src/guestfs-actions.pod:4727
14066 "B<Important note:> When you use this call, the filesystem options C<sync> "
14067 "and C<noatime> are set implicitly. This was originally done because we "
14068 "thought it would improve reliability, but it turns out that I<-o sync> has a "
14069 "very large negative performance impact and negligible effect on "
14070 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
14071 "in any code that needs performance, and instead use C<guestfs_mount_options> "
14072 "(use an empty string for the first parameter if you don't want any options)."
14076 #: ../src/guestfs-actions.pod:4739 ../fish/guestfish-actions.pod:3207
14078 "This function is deprecated. In new code, use the C<mount_options> call "
14083 #: ../src/guestfs-actions.pod:4748
14084 msgid "guestfs_mount_loop"
14088 #: ../src/guestfs-actions.pod:4750
14092 " guestfs_mount_loop (guestfs_h *g,\n"
14093 " const char *file,\n"
14094 " const char *mountpoint);\n"
14099 #: ../src/guestfs-actions.pod:4755 ../fish/guestfish-actions.pod:3218
14101 "This command lets you mount C<file> (a filesystem image in a file) on a "
14102 "mount point. It is entirely equivalent to the command C<mount -o loop file "
14107 #: ../src/guestfs-actions.pod:4763
14108 msgid "guestfs_mount_options"
14112 #: ../src/guestfs-actions.pod:4765
14116 " guestfs_mount_options (guestfs_h *g,\n"
14117 " const char *options,\n"
14118 " const char *device,\n"
14119 " const char *mountpoint);\n"
14124 #: ../src/guestfs-actions.pod:4771
14126 "This is the same as the C<guestfs_mount> command, but it allows you to set "
14127 "the mount options as for the L<mount(8)> I<-o> flag."
14131 #: ../src/guestfs-actions.pod:4775 ../fish/guestfish-actions.pod:3230
14133 "If the C<options> parameter is an empty string, then no options are passed "
14134 "(all options default to whatever the filesystem uses)."
14138 #: ../src/guestfs-actions.pod:4781 ../src/guestfs-actions.pod:4795
14139 #: ../src/guestfs-actions.pod:4812
14140 msgid "(Added in 1.0.10)"
14144 #: ../src/guestfs-actions.pod:4783
14145 msgid "guestfs_mount_ro"
14149 #: ../src/guestfs-actions.pod:4785
14153 " guestfs_mount_ro (guestfs_h *g,\n"
14154 " const char *device,\n"
14155 " const char *mountpoint);\n"
14160 #: ../src/guestfs-actions.pod:4790
14162 "This is the same as the C<guestfs_mount> command, but it mounts the "
14163 "filesystem with the read-only (I<-o ro>) flag."
14167 #: ../src/guestfs-actions.pod:4797
14168 msgid "guestfs_mount_vfs"
14172 #: ../src/guestfs-actions.pod:4799
14176 " guestfs_mount_vfs (guestfs_h *g,\n"
14177 " const char *options,\n"
14178 " const char *vfstype,\n"
14179 " const char *device,\n"
14180 " const char *mountpoint);\n"
14185 #: ../src/guestfs-actions.pod:4806
14187 "This is the same as the C<guestfs_mount> command, but it allows you to set "
14188 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
14193 #: ../src/guestfs-actions.pod:4814
14194 msgid "guestfs_mountpoints"
14198 #: ../src/guestfs-actions.pod:4816
14202 " guestfs_mountpoints (guestfs_h *g);\n"
14207 #: ../src/guestfs-actions.pod:4819
14209 "This call is similar to C<guestfs_mounts>. That call returns a list of "
14210 "devices. This one returns a hash table (map) of device name to directory "
14211 "where the device is mounted."
14215 #: ../src/guestfs-actions.pod:4831
14216 msgid "guestfs_mounts"
14220 #: ../src/guestfs-actions.pod:4833
14224 " guestfs_mounts (guestfs_h *g);\n"
14229 #: ../src/guestfs-actions.pod:4836 ../fish/guestfish-actions.pod:3261
14231 "This returns the list of currently mounted filesystems. It returns the list "
14232 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
14236 #: ../src/guestfs-actions.pod:4839 ../fish/guestfish-actions.pod:3264
14237 msgid "Some internal mounts are not shown."
14241 #: ../src/guestfs-actions.pod:4841
14242 msgid "See also: C<guestfs_mountpoints>"
14246 #: ../src/guestfs-actions.pod:4849
14251 #: ../src/guestfs-actions.pod:4851
14255 " guestfs_mv (guestfs_h *g,\n"
14256 " const char *src,\n"
14257 " const char *dest);\n"
14262 #: ../src/guestfs-actions.pod:4856 ../fish/guestfish-actions.pod:3272
14264 "This moves a file from C<src> to C<dest> where C<dest> is either a "
14265 "destination filename or destination directory."
14269 #: ../src/guestfs-actions.pod:4863
14270 msgid "guestfs_ntfs_3g_probe"
14274 #: ../src/guestfs-actions.pod:4865
14278 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
14280 " const char *device);\n"
14285 #: ../src/guestfs-actions.pod:4870 ../fish/guestfish-actions.pod:3279
14287 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
14288 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
14289 "write, and some cannot be mounted at all)."
14293 #: ../src/guestfs-actions.pod:4874 ../fish/guestfish-actions.pod:3283
14295 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
14296 "can be mounted read-write. Set it to false if you want to test if the "
14297 "volume can be mounted read-only."
14301 #: ../src/guestfs-actions.pod:4878 ../fish/guestfish-actions.pod:3287
14303 "The return value is an integer which C<0> if the operation would succeed, or "
14304 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
14308 #: ../src/guestfs-actions.pod:4884
14309 msgid "(Added in 1.0.43)"
14313 #: ../src/guestfs-actions.pod:4886
14314 msgid "guestfs_ntfsresize"
14318 #: ../src/guestfs-actions.pod:4888
14322 " guestfs_ntfsresize (guestfs_h *g,\n"
14323 " const char *device);\n"
14328 #: ../src/guestfs-actions.pod:4892 ../fish/guestfish-actions.pod:3295
14330 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
14331 "size of the underlying device. See also L<ntfsresize(8)>."
14335 #: ../src/guestfs-actions.pod:4900
14336 msgid "guestfs_ntfsresize_size"
14340 #: ../src/guestfs-actions.pod:4902
14344 " guestfs_ntfsresize_size (guestfs_h *g,\n"
14345 " const char *device,\n"
14346 " int64_t size);\n"
14351 #: ../src/guestfs-actions.pod:4907
14353 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
14354 "to specify the new size (in bytes) explicitly."
14358 #: ../src/guestfs-actions.pod:4912 ../src/guestfs-actions.pod:5348
14359 #: ../src/guestfs-actions.pod:5421 ../src/guestfs-actions.pod:5687
14360 #: ../src/guestfs-actions.pod:7293
14361 msgid "(Added in 1.3.14)"
14365 #: ../src/guestfs-actions.pod:4914
14366 msgid "guestfs_part_add"
14370 #: ../src/guestfs-actions.pod:4916
14374 " guestfs_part_add (guestfs_h *g,\n"
14375 " const char *device,\n"
14376 " const char *prlogex,\n"
14377 " int64_t startsect,\n"
14378 " int64_t endsect);\n"
14383 #: ../src/guestfs-actions.pod:4923
14385 "This command adds a partition to C<device>. If there is no partition table "
14386 "on the device, call C<guestfs_part_init> first."
14390 #: ../src/guestfs-actions.pod:4926 ../fish/guestfish-actions.pod:3313
14392 "The C<prlogex> parameter is the type of partition. Normally you should pass "
14393 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
14394 "C<logical>) and C<e> (or C<extended>) partition types."
14398 #: ../src/guestfs-actions.pod:4931 ../fish/guestfish-actions.pod:3318
14400 "C<startsect> and C<endsect> are the start and end of the partition in "
14401 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
14402 "from the end of the disk (C<-1> is the last sector)."
14406 #: ../src/guestfs-actions.pod:4935
14408 "Creating a partition which covers the whole disk is not so easy. Use "
14409 "C<guestfs_part_disk> to do that."
14413 #: ../src/guestfs-actions.pod:4940 ../src/guestfs-actions.pod:4978
14414 #: ../src/guestfs-actions.pod:5031 ../src/guestfs-actions.pod:5109
14415 #: ../src/guestfs-actions.pod:5147 ../src/guestfs-actions.pod:5166
14416 #: ../src/guestfs-actions.pod:5206
14417 msgid "(Added in 1.0.78)"
14421 #: ../src/guestfs-actions.pod:4942
14422 msgid "guestfs_part_del"
14426 #: ../src/guestfs-actions.pod:4944
14430 " guestfs_part_del (guestfs_h *g,\n"
14431 " const char *device,\n"
14437 #: ../src/guestfs-actions.pod:4949 ../fish/guestfish-actions.pod:3329
14438 msgid "This command deletes the partition numbered C<partnum> on C<device>."
14442 #: ../src/guestfs-actions.pod:4951 ../fish/guestfish-actions.pod:3331
14444 "Note that in the case of MBR partitioning, deleting an extended partition "
14445 "also deletes any logical partitions it contains."
14449 #: ../src/guestfs-actions.pod:4959
14450 msgid "guestfs_part_disk"
14454 #: ../src/guestfs-actions.pod:4961
14458 " guestfs_part_disk (guestfs_h *g,\n"
14459 " const char *device,\n"
14460 " const char *parttype);\n"
14465 #: ../src/guestfs-actions.pod:4966
14467 "This command is simply a combination of C<guestfs_part_init> followed by "
14468 "C<guestfs_part_add> to create a single primary partition covering the whole "
14473 #: ../src/guestfs-actions.pod:4970
14475 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
14476 "possible values are described in C<guestfs_part_init>."
14480 #: ../src/guestfs-actions.pod:4980
14481 msgid "guestfs_part_get_bootable"
14485 #: ../src/guestfs-actions.pod:4982
14489 " guestfs_part_get_bootable (guestfs_h *g,\n"
14490 " const char *device,\n"
14496 #: ../src/guestfs-actions.pod:4987 ../fish/guestfish-actions.pod:3353
14498 "This command returns true if the partition C<partnum> on C<device> has the "
14499 "bootable flag set."
14503 #: ../src/guestfs-actions.pod:4990
14504 msgid "See also C<guestfs_part_set_bootable>."
14508 #: ../src/guestfs-actions.pod:4996
14509 msgid "guestfs_part_get_mbr_id"
14513 #: ../src/guestfs-actions.pod:4998
14517 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
14518 " const char *device,\n"
14524 #: ../src/guestfs-actions.pod:5003 ../fish/guestfish-actions.pod:3362
14526 "Returns the MBR type byte (also known as the ID byte) from the numbered "
14527 "partition C<partnum>."
14531 #: ../src/guestfs-actions.pod:5006 ../src/guestfs-actions.pod:5182
14533 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
14534 "undefined results for other partition table types (see "
14535 "C<guestfs_part_get_parttype>)."
14539 #: ../src/guestfs-actions.pod:5014
14540 msgid "guestfs_part_get_parttype"
14544 #: ../src/guestfs-actions.pod:5016
14548 " guestfs_part_get_parttype (guestfs_h *g,\n"
14549 " const char *device);\n"
14554 #: ../src/guestfs-actions.pod:5020 ../fish/guestfish-actions.pod:3373
14556 "This command examines the partition table on C<device> and returns the "
14557 "partition table type (format) being used."
14561 #: ../src/guestfs-actions.pod:5023
14563 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
14564 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
14565 "possible, although unusual. See C<guestfs_part_init> for a full list."
14569 #: ../src/guestfs-actions.pod:5033
14570 msgid "guestfs_part_init"
14574 #: ../src/guestfs-actions.pod:5035
14578 " guestfs_part_init (guestfs_h *g,\n"
14579 " const char *device,\n"
14580 " const char *parttype);\n"
14585 #: ../src/guestfs-actions.pod:5040 ../fish/guestfish-actions.pod:3385
14587 "This creates an empty partition table on C<device> of one of the partition "
14588 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
14589 "(for large disks)."
14593 #: ../src/guestfs-actions.pod:5044
14595 "Initially there are no partitions. Following this, you should call "
14596 "C<guestfs_part_add> for each partition required."
14600 #: ../src/guestfs-actions.pod:5047 ../fish/guestfish-actions.pod:3392
14601 msgid "Possible values for C<parttype> are:"
14605 #: ../src/guestfs-actions.pod:5051 ../fish/guestfish-actions.pod:3396
14606 msgid "B<efi> | B<gpt>"
14610 #: ../src/guestfs-actions.pod:5053 ../fish/guestfish-actions.pod:3398
14611 msgid "Intel EFI / GPT partition table."
14615 #: ../src/guestfs-actions.pod:5055 ../fish/guestfish-actions.pod:3400
14617 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
14618 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
14619 "the C<mbr> format."
14623 #: ../src/guestfs-actions.pod:5059 ../fish/guestfish-actions.pod:3404
14624 msgid "B<mbr> | B<msdos>"
14628 #: ../src/guestfs-actions.pod:5061 ../fish/guestfish-actions.pod:3406
14630 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
14631 "Windows. This partition type will B<only> work for device sizes up to 2 "
14632 "TB. For large disks we recommend using C<gpt>."
14636 #: ../src/guestfs-actions.pod:5068 ../fish/guestfish-actions.pod:3413
14638 "Other partition table types that may work but are not supported include:"
14642 #: ../src/guestfs-actions.pod:5073 ../fish/guestfish-actions.pod:3418
14647 #: ../src/guestfs-actions.pod:5075 ../fish/guestfish-actions.pod:3420
14648 msgid "AIX disk labels."
14652 #: ../src/guestfs-actions.pod:5077 ../fish/guestfish-actions.pod:3422
14653 msgid "B<amiga> | B<rdb>"
14657 #: ../src/guestfs-actions.pod:5079 ../fish/guestfish-actions.pod:3424
14658 msgid "Amiga \"Rigid Disk Block\" format."
14662 #: ../src/guestfs-actions.pod:5081 ../fish/guestfish-actions.pod:3426
14667 #: ../src/guestfs-actions.pod:5083 ../fish/guestfish-actions.pod:3428
14668 msgid "BSD disk labels."
14672 #: ../src/guestfs-actions.pod:5085 ../fish/guestfish-actions.pod:3430
14677 #: ../src/guestfs-actions.pod:5087 ../fish/guestfish-actions.pod:3432
14678 msgid "DASD, used on IBM mainframes."
14682 #: ../src/guestfs-actions.pod:5089 ../fish/guestfish-actions.pod:3434
14687 #: ../src/guestfs-actions.pod:5091 ../fish/guestfish-actions.pod:3436
14688 msgid "MIPS/SGI volumes."
14692 #: ../src/guestfs-actions.pod:5093 ../fish/guestfish-actions.pod:3438
14697 #: ../src/guestfs-actions.pod:5095 ../fish/guestfish-actions.pod:3440
14698 msgid "Old Mac partition format. Modern Macs use C<gpt>."
14702 #: ../src/guestfs-actions.pod:5097 ../fish/guestfish-actions.pod:3442
14707 #: ../src/guestfs-actions.pod:5099 ../fish/guestfish-actions.pod:3444
14708 msgid "NEC PC-98 format, common in Japan apparently."
14712 #: ../src/guestfs-actions.pod:5101 ../fish/guestfish-actions.pod:3446
14717 #: ../src/guestfs-actions.pod:5103 ../fish/guestfish-actions.pod:3448
14718 msgid "Sun disk labels."
14722 #: ../src/guestfs-actions.pod:5111
14723 msgid "guestfs_part_list"
14727 #: ../src/guestfs-actions.pod:5113
14730 " struct guestfs_partition_list *\n"
14731 " guestfs_part_list (guestfs_h *g,\n"
14732 " const char *device);\n"
14737 #: ../src/guestfs-actions.pod:5117 ../fish/guestfish-actions.pod:3456
14739 "This command parses the partition table on C<device> and returns the list of "
14740 "partitions found."
14744 #: ../src/guestfs-actions.pod:5120 ../fish/guestfish-actions.pod:3459
14745 msgid "The fields in the returned structure are:"
14749 #: ../src/guestfs-actions.pod:5124 ../fish/guestfish-actions.pod:3463
14750 msgid "B<part_num>"
14754 #: ../src/guestfs-actions.pod:5126 ../fish/guestfish-actions.pod:3465
14755 msgid "Partition number, counting from 1."
14759 #: ../src/guestfs-actions.pod:5128 ../fish/guestfish-actions.pod:3467
14760 msgid "B<part_start>"
14764 #: ../src/guestfs-actions.pod:5130
14766 "Start of the partition I<in bytes>. To get sectors you have to divide by "
14767 "the device's sector size, see C<guestfs_blockdev_getss>."
14771 #: ../src/guestfs-actions.pod:5133 ../fish/guestfish-actions.pod:3472
14772 msgid "B<part_end>"
14776 #: ../src/guestfs-actions.pod:5135 ../fish/guestfish-actions.pod:3474
14777 msgid "End of the partition in bytes."
14781 #: ../src/guestfs-actions.pod:5137 ../fish/guestfish-actions.pod:3476
14782 msgid "B<part_size>"
14786 #: ../src/guestfs-actions.pod:5139 ../fish/guestfish-actions.pod:3478
14787 msgid "Size of the partition in bytes."
14791 #: ../src/guestfs-actions.pod:5143
14793 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
14794 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
14799 #: ../src/guestfs-actions.pod:5149
14800 msgid "guestfs_part_set_bootable"
14804 #: ../src/guestfs-actions.pod:5151
14808 " guestfs_part_set_bootable (guestfs_h *g,\n"
14809 " const char *device,\n"
14811 " int bootable);\n"
14816 #: ../src/guestfs-actions.pod:5157 ../fish/guestfish-actions.pod:3486
14818 "This sets the bootable flag on partition numbered C<partnum> on device "
14819 "C<device>. Note that partitions are numbered from 1."
14823 #: ../src/guestfs-actions.pod:5160 ../fish/guestfish-actions.pod:3489
14825 "The bootable flag is used by some operating systems (notably Windows) to "
14826 "determine which partition to boot from. It is by no means universally "
14831 #: ../src/guestfs-actions.pod:5168
14832 msgid "guestfs_part_set_mbr_id"
14836 #: ../src/guestfs-actions.pod:5170
14840 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
14841 " const char *device,\n"
14848 #: ../src/guestfs-actions.pod:5176 ../fish/guestfish-actions.pod:3497
14850 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
14851 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
14852 "documentation are in fact hexadecimal numbers, but usually documented "
14853 "without any leading \"0x\" which might be confusing."
14857 #: ../src/guestfs-actions.pod:5190
14858 msgid "guestfs_part_set_name"
14862 #: ../src/guestfs-actions.pod:5192
14866 " guestfs_part_set_name (guestfs_h *g,\n"
14867 " const char *device,\n"
14869 " const char *name);\n"
14874 #: ../src/guestfs-actions.pod:5198 ../fish/guestfish-actions.pod:3511
14876 "This sets the partition name on partition numbered C<partnum> on device "
14877 "C<device>. Note that partitions are numbered from 1."
14881 #: ../src/guestfs-actions.pod:5201 ../fish/guestfish-actions.pod:3514
14883 "The partition name can only be set on certain types of partition table. "
14884 "This works on C<gpt> but not on C<mbr> partitions."
14888 #: ../src/guestfs-actions.pod:5208
14889 msgid "guestfs_part_to_dev"
14893 #: ../src/guestfs-actions.pod:5210
14897 " guestfs_part_to_dev (guestfs_h *g,\n"
14898 " const char *partition);\n"
14903 #: ../src/guestfs-actions.pod:5214 ../fish/guestfish-actions.pod:3521
14905 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
14906 "partition number, returning the device name (eg. \"/dev/sdb\")."
14910 #: ../src/guestfs-actions.pod:5218
14912 "The named partition must exist, for example as a string returned from "
14913 "C<guestfs_list_partitions>."
14917 #: ../src/guestfs-actions.pod:5226
14918 msgid "guestfs_ping_daemon"
14922 #: ../src/guestfs-actions.pod:5228
14926 " guestfs_ping_daemon (guestfs_h *g);\n"
14931 #: ../src/guestfs-actions.pod:5231 ../fish/guestfish-actions.pod:3532
14933 "This is a test probe into the guestfs daemon running inside the qemu "
14934 "subprocess. Calling this function checks that the daemon responds to the "
14935 "ping message, without affecting the daemon or attached block device(s) in "
14940 #: ../src/guestfs-actions.pod:5240
14941 msgid "guestfs_pread"
14945 #: ../src/guestfs-actions.pod:5242
14949 " guestfs_pread (guestfs_h *g,\n"
14950 " const char *path,\n"
14952 " int64_t offset,\n"
14953 " size_t *size_r);\n"
14958 #: ../src/guestfs-actions.pod:5249 ../fish/guestfish-actions.pod:3541
14960 "This command lets you read part of a file. It reads C<count> bytes of the "
14961 "file, starting at C<offset>, from file C<path>."
14965 #: ../src/guestfs-actions.pod:5252 ../src/guestfs-actions.pod:5278
14966 #: ../fish/guestfish-actions.pod:3544 ../fish/guestfish-actions.pod:3559
14968 "This may read fewer bytes than requested. For further details see the "
14969 "L<pread(2)> system call."
14973 #: ../src/guestfs-actions.pod:5255
14974 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
14978 #: ../src/guestfs-actions.pod:5266
14979 msgid "guestfs_pread_device"
14983 #: ../src/guestfs-actions.pod:5268
14987 " guestfs_pread_device (guestfs_h *g,\n"
14988 " const char *device,\n"
14990 " int64_t offset,\n"
14991 " size_t *size_r);\n"
14996 #: ../src/guestfs-actions.pod:5275 ../fish/guestfish-actions.pod:3556
14998 "This command lets you read part of a file. It reads C<count> bytes of "
14999 "C<device>, starting at C<offset>."
15003 #: ../src/guestfs-actions.pod:5281
15004 msgid "See also C<guestfs_pread>."
15008 #: ../src/guestfs-actions.pod:5290
15009 msgid "(Added in 1.5.21)"
15013 #: ../src/guestfs-actions.pod:5292
15014 msgid "guestfs_pvcreate"
15018 #: ../src/guestfs-actions.pod:5294
15022 " guestfs_pvcreate (guestfs_h *g,\n"
15023 " const char *device);\n"
15028 #: ../src/guestfs-actions.pod:5298 ../fish/guestfish-actions.pod:3571
15030 "This creates an LVM physical volume on the named C<device>, where C<device> "
15031 "should usually be a partition name such as C</dev/sda1>."
15035 #: ../src/guestfs-actions.pod:5306
15036 msgid "guestfs_pvremove"
15040 #: ../src/guestfs-actions.pod:5308
15044 " guestfs_pvremove (guestfs_h *g,\n"
15045 " const char *device);\n"
15050 #: ../src/guestfs-actions.pod:5312 ../fish/guestfish-actions.pod:3579
15052 "This wipes a physical volume C<device> so that LVM will no longer recognise "
15057 #: ../src/guestfs-actions.pod:5315 ../fish/guestfish-actions.pod:3582
15059 "The implementation uses the C<pvremove> command which refuses to wipe "
15060 "physical volumes that contain any volume groups, so you have to remove those "
15065 #: ../src/guestfs-actions.pod:5323
15066 msgid "guestfs_pvresize"
15070 #: ../src/guestfs-actions.pod:5325
15074 " guestfs_pvresize (guestfs_h *g,\n"
15075 " const char *device);\n"
15080 #: ../src/guestfs-actions.pod:5329 ../fish/guestfish-actions.pod:3590
15082 "This resizes (expands or shrinks) an existing LVM physical volume to match "
15083 "the new size of the underlying device."
15087 #: ../src/guestfs-actions.pod:5336
15088 msgid "guestfs_pvresize_size"
15092 #: ../src/guestfs-actions.pod:5338
15096 " guestfs_pvresize_size (guestfs_h *g,\n"
15097 " const char *device,\n"
15098 " int64_t size);\n"
15103 #: ../src/guestfs-actions.pod:5343
15105 "This command is the same as C<guestfs_pvresize> except that it allows you to "
15106 "specify the new size (in bytes) explicitly."
15110 #: ../src/guestfs-actions.pod:5350
15111 msgid "guestfs_pvs"
15115 #: ../src/guestfs-actions.pod:5352
15119 " guestfs_pvs (guestfs_h *g);\n"
15124 #: ../src/guestfs-actions.pod:5355 ../fish/guestfish-actions.pod:3604
15126 "List all the physical volumes detected. This is the equivalent of the L<pvs"
15131 #: ../src/guestfs-actions.pod:5358 ../fish/guestfish-actions.pod:3607
15133 "This returns a list of just the device names that contain PVs (eg. C</dev/"
15138 #: ../src/guestfs-actions.pod:5361
15139 msgid "See also C<guestfs_pvs_full>."
15143 #: ../src/guestfs-actions.pod:5369
15144 msgid "guestfs_pvs_full"
15148 #: ../src/guestfs-actions.pod:5371
15151 " struct guestfs_lvm_pv_list *\n"
15152 " guestfs_pvs_full (guestfs_h *g);\n"
15157 #: ../src/guestfs-actions.pod:5374 ../fish/guestfish-actions.pod:3616
15159 "List all the physical volumes detected. This is the equivalent of the L<pvs"
15160 "(8)> command. The \"full\" version includes all fields."
15164 #: ../src/guestfs-actions.pod:5377
15166 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
15167 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after use>."
15171 #: ../src/guestfs-actions.pod:5383
15172 msgid "guestfs_pvuuid"
15176 #: ../src/guestfs-actions.pod:5385
15180 " guestfs_pvuuid (guestfs_h *g,\n"
15181 " const char *device);\n"
15186 #: ../src/guestfs-actions.pod:5389 ../fish/guestfish-actions.pod:3623
15187 msgid "This command returns the UUID of the LVM PV C<device>."
15191 #: ../src/guestfs-actions.pod:5396
15192 msgid "guestfs_pwrite"
15196 #: ../src/guestfs-actions.pod:5398
15200 " guestfs_pwrite (guestfs_h *g,\n"
15201 " const char *path,\n"
15202 " const char *content,\n"
15203 " size_t content_size,\n"
15204 " int64_t offset);\n"
15209 #: ../src/guestfs-actions.pod:5405 ../fish/guestfish-actions.pod:3629
15211 "This command writes to part of a file. It writes the data buffer C<content> "
15212 "to the file C<path> starting at offset C<offset>."
15216 #: ../src/guestfs-actions.pod:5408 ../fish/guestfish-actions.pod:3632
15218 "This command implements the L<pwrite(2)> system call, and like that system "
15219 "call it may not write the full data requested. The return value is the "
15220 "number of bytes that were actually written to the file. This could even be "
15221 "0, although short writes are unlikely for regular files in ordinary "
15226 #: ../src/guestfs-actions.pod:5414
15227 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
15231 #: ../src/guestfs-actions.pod:5423
15232 msgid "guestfs_pwrite_device"
15236 #: ../src/guestfs-actions.pod:5425
15240 " guestfs_pwrite_device (guestfs_h *g,\n"
15241 " const char *device,\n"
15242 " const char *content,\n"
15243 " size_t content_size,\n"
15244 " int64_t offset);\n"
15249 #: ../src/guestfs-actions.pod:5432 ../fish/guestfish-actions.pod:3647
15251 "This command writes to part of a device. It writes the data buffer "
15252 "C<content> to C<device> starting at offset C<offset>."
15256 #: ../src/guestfs-actions.pod:5435 ../fish/guestfish-actions.pod:3650
15258 "This command implements the L<pwrite(2)> system call, and like that system "
15259 "call it may not write the full data requested (although short writes to disk "
15260 "devices and partitions are probably impossible with standard Linux kernels)."
15264 #: ../src/guestfs-actions.pod:5440
15265 msgid "See also C<guestfs_pwrite>."
15269 #: ../src/guestfs-actions.pod:5447
15270 msgid "(Added in 1.5.20)"
15274 #: ../src/guestfs-actions.pod:5449
15275 msgid "guestfs_read_file"
15279 #: ../src/guestfs-actions.pod:5451
15283 " guestfs_read_file (guestfs_h *g,\n"
15284 " const char *path,\n"
15285 " size_t *size_r);\n"
15290 #: ../src/guestfs-actions.pod:5456 ../fish/guestfish-actions.pod:3664
15291 msgid "This calls returns the contents of the file C<path> as a buffer."
15295 #: ../src/guestfs-actions.pod:5459
15297 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
15298 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
15299 "function is limited in the total size of file that can be handled."
15303 #: ../src/guestfs-actions.pod:5471
15304 msgid "(Added in 1.0.63)"
15308 #: ../src/guestfs-actions.pod:5473
15309 msgid "guestfs_read_lines"
15313 #: ../src/guestfs-actions.pod:5475
15317 " guestfs_read_lines (guestfs_h *g,\n"
15318 " const char *path);\n"
15323 #: ../src/guestfs-actions.pod:5481 ../fish/guestfish-actions.pod:3681
15325 "The file contents are returned as a list of lines. Trailing C<LF> and "
15326 "C<CRLF> character sequences are I<not> returned."
15330 #: ../src/guestfs-actions.pod:5484
15332 "Note that this function cannot correctly handle binary files (specifically, "
15333 "files containing C<\\0> character which is treated as end of line). For "
15334 "those you need to use the C<guestfs_read_file> function which has a more "
15335 "complex interface."
15339 #: ../src/guestfs-actions.pod:5495
15340 msgid "guestfs_readdir"
15344 #: ../src/guestfs-actions.pod:5497
15347 " struct guestfs_dirent_list *\n"
15348 " guestfs_readdir (guestfs_h *g,\n"
15349 " const char *dir);\n"
15354 #: ../src/guestfs-actions.pod:5501 ../fish/guestfish-actions.pod:3693
15355 msgid "This returns the list of directory entries in directory C<dir>."
15359 #: ../src/guestfs-actions.pod:5503 ../fish/guestfish-actions.pod:3695
15361 "All entries in the directory are returned, including C<.> and C<..>. The "
15362 "entries are I<not> sorted, but returned in the same order as the underlying "
15367 #: ../src/guestfs-actions.pod:5507 ../fish/guestfish-actions.pod:3699
15369 "Also this call returns basic file type information about each file. The "
15370 "C<ftyp> field will contain one of the following characters:"
15374 #: ../src/guestfs-actions.pod:5512 ../fish/guestfish-actions.pod:3704
15379 #: ../src/guestfs-actions.pod:5514 ../fish/guestfish-actions.pod:3706
15380 msgid "Block special"
15384 #: ../src/guestfs-actions.pod:5516 ../fish/guestfish-actions.pod:3708
15389 #: ../src/guestfs-actions.pod:5518 ../fish/guestfish-actions.pod:3710
15390 msgid "Char special"
15394 #: ../src/guestfs-actions.pod:5520 ../fish/guestfish-actions.pod:3712
15399 #: ../src/guestfs-actions.pod:5522 ../fish/guestfish-actions.pod:3714
15404 #: ../src/guestfs-actions.pod:5524 ../fish/guestfish-actions.pod:3716
15409 #: ../src/guestfs-actions.pod:5526 ../fish/guestfish-actions.pod:3718
15410 msgid "FIFO (named pipe)"
15414 #: ../src/guestfs-actions.pod:5528 ../fish/guestfish-actions.pod:3720
15419 #: ../src/guestfs-actions.pod:5530 ../fish/guestfish-actions.pod:3722
15420 msgid "Symbolic link"
15424 #: ../src/guestfs-actions.pod:5532 ../fish/guestfish-actions.pod:3724
15429 #: ../src/guestfs-actions.pod:5534 ../fish/guestfish-actions.pod:3726
15430 msgid "Regular file"
15434 #: ../src/guestfs-actions.pod:5536 ../fish/guestfish-actions.pod:3728
15439 #: ../src/guestfs-actions.pod:5538 ../fish/guestfish-actions.pod:3730
15444 #: ../src/guestfs-actions.pod:5540 ../fish/guestfish-actions.pod:3732
15449 #: ../src/guestfs-actions.pod:5542 ../fish/guestfish-actions.pod:3734
15450 msgid "Unknown file type"
15454 #: ../src/guestfs-actions.pod:5544 ../fish/guestfish-actions.pod:3736
15459 #: ../src/guestfs-actions.pod:5546 ../fish/guestfish-actions.pod:3738
15461 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
15465 #: ../src/guestfs-actions.pod:5551
15467 "This function is primarily intended for use by programs. To get a simple "
15468 "list of names, use C<guestfs_ls>. To get a printable directory for human "
15469 "consumption, use C<guestfs_ll>."
15473 #: ../src/guestfs-actions.pod:5555
15475 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
15476 "was an error. I<The caller must call C<guestfs_free_dirent_list> after use>."
15480 #: ../src/guestfs-actions.pod:5561
15481 msgid "guestfs_readlink"
15485 #: ../src/guestfs-actions.pod:5563
15489 " guestfs_readlink (guestfs_h *g,\n"
15490 " const char *path);\n"
15495 #: ../src/guestfs-actions.pod:5567 ../fish/guestfish-actions.pod:3751
15496 msgid "This command reads the target of a symbolic link."
15500 #: ../src/guestfs-actions.pod:5574
15501 msgid "guestfs_readlinklist"
15505 #: ../src/guestfs-actions.pod:5576
15509 " guestfs_readlinklist (guestfs_h *g,\n"
15510 " const char *path,\n"
15511 " char *const *names);\n"
15516 #: ../src/guestfs-actions.pod:5581 ../fish/guestfish-actions.pod:3757
15518 "This call allows you to do a C<readlink> operation on multiple files, where "
15519 "all files are in the directory C<path>. C<names> is the list of files from "
15524 #: ../src/guestfs-actions.pod:5585 ../fish/guestfish-actions.pod:3761
15526 "On return you get a list of strings, with a one-to-one correspondence to the "
15527 "C<names> list. Each string is the value of the symbolic link."
15531 #: ../src/guestfs-actions.pod:5589 ../fish/guestfish-actions.pod:3765
15533 "If the C<readlink(2)> operation fails on any name, then the corresponding "
15534 "result string is the empty string C<\"\">. However the whole operation is "
15535 "completed even if there were C<readlink(2)> errors, and so you can call this "
15536 "function with names where you don't know if they are symbolic links already "
15537 "(albeit slightly less efficient)."
15541 #: ../src/guestfs-actions.pod:5596 ../fish/guestfish-actions.pod:3772
15543 "This call is intended for programs that want to efficiently list a directory "
15544 "contents without making many round-trips. Very long directory listings "
15545 "might cause the protocol message size to be exceeded, causing this call to "
15546 "fail. The caller must split up such requests into smaller groups of names."
15550 #: ../src/guestfs-actions.pod:5609
15551 msgid "guestfs_realpath"
15555 #: ../src/guestfs-actions.pod:5611
15559 " guestfs_realpath (guestfs_h *g,\n"
15560 " const char *path);\n"
15565 #: ../src/guestfs-actions.pod:5615 ../fish/guestfish-actions.pod:3783
15567 "Return the canonicalized absolute pathname of C<path>. The returned path "
15568 "has no C<.>, C<..> or symbolic link path elements."
15572 #: ../src/guestfs-actions.pod:5623
15573 msgid "guestfs_removexattr"
15577 #: ../src/guestfs-actions.pod:5625
15581 " guestfs_removexattr (guestfs_h *g,\n"
15582 " const char *xattr,\n"
15583 " const char *path);\n"
15588 #: ../src/guestfs-actions.pod:5630 ../fish/guestfish-actions.pod:3790
15590 "This call removes the extended attribute named C<xattr> of the file C<path>."
15594 #: ../src/guestfs-actions.pod:5633
15595 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
15599 #: ../src/guestfs-actions.pod:5639
15600 msgid "guestfs_resize2fs"
15604 #: ../src/guestfs-actions.pod:5641
15608 " guestfs_resize2fs (guestfs_h *g,\n"
15609 " const char *device);\n"
15614 #: ../src/guestfs-actions.pod:5645 ../fish/guestfish-actions.pod:3799
15616 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
15617 "underlying device."
15621 #: ../src/guestfs-actions.pod:5648
15623 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
15624 "C<device> before calling this command. For unknown reasons C<resize2fs> "
15625 "sometimes gives an error about this and sometimes not. In any case, it is "
15626 "always safe to call C<guestfs_e2fsck_f> before calling this function."
15630 #: ../src/guestfs-actions.pod:5658
15631 msgid "guestfs_resize2fs_M"
15635 #: ../src/guestfs-actions.pod:5660
15639 " guestfs_resize2fs_M (guestfs_h *g,\n"
15640 " const char *device);\n"
15645 #: ../src/guestfs-actions.pod:5664
15647 "This command is the same as C<guestfs_resize2fs>, but the filesystem is "
15648 "resized to its minimum size. This works like the I<-M> option to the "
15649 "C<resize2fs> command."
15653 #: ../src/guestfs-actions.pod:5668
15655 "To get the resulting size of the filesystem you should call "
15656 "C<guestfs_tune2fs_l> and read the C<Block size> and C<Block count> values. "
15657 "These two numbers, multiplied together, give the resulting size of the "
15658 "minimal filesystem in bytes."
15662 #: ../src/guestfs-actions.pod:5675
15663 msgid "guestfs_resize2fs_size"
15667 #: ../src/guestfs-actions.pod:5677
15671 " guestfs_resize2fs_size (guestfs_h *g,\n"
15672 " const char *device,\n"
15673 " int64_t size);\n"
15678 #: ../src/guestfs-actions.pod:5682
15680 "This command is the same as C<guestfs_resize2fs> except that it allows you "
15681 "to specify the new size (in bytes) explicitly."
15685 #: ../src/guestfs-actions.pod:5689
15690 #: ../src/guestfs-actions.pod:5691
15694 " guestfs_rm (guestfs_h *g,\n"
15695 " const char *path);\n"
15700 #: ../src/guestfs-actions.pod:5695 ../fish/guestfish-actions.pod:3832
15701 msgid "Remove the single file C<path>."
15705 #: ../src/guestfs-actions.pod:5701
15706 msgid "guestfs_rm_rf"
15710 #: ../src/guestfs-actions.pod:5703
15714 " guestfs_rm_rf (guestfs_h *g,\n"
15715 " const char *path);\n"
15720 #: ../src/guestfs-actions.pod:5707 ../fish/guestfish-actions.pod:3838
15722 "Remove the file or directory C<path>, recursively removing the contents if "
15723 "its a directory. This is like the C<rm -rf> shell command."
15727 #: ../src/guestfs-actions.pod:5715
15728 msgid "guestfs_rmdir"
15732 #: ../src/guestfs-actions.pod:5717
15736 " guestfs_rmdir (guestfs_h *g,\n"
15737 " const char *path);\n"
15742 #: ../src/guestfs-actions.pod:5721 ../fish/guestfish-actions.pod:3846
15743 msgid "Remove the single directory C<path>."
15747 #: ../src/guestfs-actions.pod:5727
15748 msgid "guestfs_rmmountpoint"
15752 #: ../src/guestfs-actions.pod:5729
15756 " guestfs_rmmountpoint (guestfs_h *g,\n"
15757 " const char *exemptpath);\n"
15762 #: ../src/guestfs-actions.pod:5733
15764 "This calls removes a mountpoint that was previously created with "
15765 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
15769 #: ../src/guestfs-actions.pod:5741
15770 msgid "guestfs_scrub_device"
15774 #: ../src/guestfs-actions.pod:5743
15778 " guestfs_scrub_device (guestfs_h *g,\n"
15779 " const char *device);\n"
15784 #: ../src/guestfs-actions.pod:5747 ../fish/guestfish-actions.pod:3860
15786 "This command writes patterns over C<device> to make data retrieval more "
15791 #: ../src/guestfs-actions.pod:5750 ../src/guestfs-actions.pod:5771
15792 #: ../src/guestfs-actions.pod:5790 ../fish/guestfish-actions.pod:3863
15793 #: ../fish/guestfish-actions.pod:3878 ../fish/guestfish-actions.pod:3891
15795 "It is an interface to the L<scrub(1)> program. See that manual page for "
15800 #: ../src/guestfs-actions.pod:5758 ../src/guestfs-actions.pod:5776
15801 #: ../src/guestfs-actions.pod:5795
15802 msgid "(Added in 1.0.52)"
15806 #: ../src/guestfs-actions.pod:5760
15807 msgid "guestfs_scrub_file"
15811 #: ../src/guestfs-actions.pod:5762
15815 " guestfs_scrub_file (guestfs_h *g,\n"
15816 " const char *file);\n"
15821 #: ../src/guestfs-actions.pod:5766 ../fish/guestfish-actions.pod:3873
15823 "This command writes patterns over a file to make data retrieval more "
15828 #: ../src/guestfs-actions.pod:5769 ../fish/guestfish-actions.pod:3876
15829 msgid "The file is I<removed> after scrubbing."
15833 #: ../src/guestfs-actions.pod:5778
15834 msgid "guestfs_scrub_freespace"
15838 #: ../src/guestfs-actions.pod:5780
15842 " guestfs_scrub_freespace (guestfs_h *g,\n"
15843 " const char *dir);\n"
15848 #: ../src/guestfs-actions.pod:5784
15850 "This command creates the directory C<dir> and then fills it with files until "
15851 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
15852 "and deletes them. The intention is to scrub any free space on the partition "
15853 "containing C<dir>."
15857 #: ../src/guestfs-actions.pod:5797
15858 msgid "guestfs_set_append"
15862 #: ../src/guestfs-actions.pod:5799
15866 " guestfs_set_append (guestfs_h *g,\n"
15867 " const char *append);\n"
15872 #: ../src/guestfs-actions.pod:5803 ../fish/guestfish-actions.pod:3900
15874 "This function is used to add additional options to the guest kernel command "
15879 #: ../src/guestfs-actions.pod:5806 ../fish/guestfish-actions.pod:3903
15881 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
15882 "environment variable."
15886 #: ../src/guestfs-actions.pod:5809 ../fish/guestfish-actions.pod:3906
15888 "Setting C<append> to C<NULL> means I<no> additional options are passed "
15889 "(libguestfs always adds a few of its own)."
15893 #: ../src/guestfs-actions.pod:5816
15894 msgid "guestfs_set_attach_method"
15898 #: ../src/guestfs-actions.pod:5818
15902 " guestfs_set_attach_method (guestfs_h *g,\n"
15903 " const char *attachmethod);\n"
15908 #: ../src/guestfs-actions.pod:5822 ../fish/guestfish-actions.pod:3915
15910 "Set the method that libguestfs uses to connect to the back end guestfsd "
15911 "daemon. Possible methods are:"
15915 #: ../src/guestfs-actions.pod:5829 ../fish/guestfish-actions.pod:3922
15917 "Launch an appliance and connect to it. This is the ordinary method and the "
15922 #: ../src/guestfs-actions.pod:5832 ../fish/guestfish-actions.pod:3925
15923 msgid "C<unix:I<path>>"
15927 #: ../src/guestfs-actions.pod:5834 ../fish/guestfish-actions.pod:3927
15928 msgid "Connect to the Unix domain socket I<path>."
15932 #: ../src/guestfs-actions.pod:5836 ../fish/guestfish-actions.pod:3929
15934 "This method lets you connect to an existing daemon or (using virtio-serial) "
15935 "to a live guest. For more information, see L<guestfs(3)/ATTACHING TO "
15936 "RUNNING DAEMONS>."
15940 #: ../src/guestfs-actions.pod:5844
15941 msgid "guestfs_set_autosync"
15945 #: ../src/guestfs-actions.pod:5846
15949 " guestfs_set_autosync (guestfs_h *g,\n"
15950 " int autosync);\n"
15955 #: ../src/guestfs-actions.pod:5850 ../fish/guestfish-actions.pod:3941
15957 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
15958 "effort attempt to make filesystems consistent and synchronized when the "
15959 "handle is closed (also if the program exits without closing handles)."
15963 #: ../src/guestfs-actions.pod:5855 ../fish/guestfish-actions.pod:3946
15965 "This is enabled by default (since libguestfs 1.5.24, previously it was "
15966 "disabled by default)."
15970 #: ../src/guestfs-actions.pod:5862
15971 msgid "guestfs_set_direct"
15975 #: ../src/guestfs-actions.pod:5864
15979 " guestfs_set_direct (guestfs_h *g,\n"
15985 #: ../src/guestfs-actions.pod:5868 ../fish/guestfish-actions.pod:3955
15987 "If the direct appliance mode flag is enabled, then stdin and stdout are "
15988 "passed directly through to the appliance once it is launched."
15992 #: ../src/guestfs-actions.pod:5872
15994 "One consequence of this is that log messages aren't caught by the library "
15995 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
16000 #: ../src/guestfs-actions.pod:5876 ../fish/guestfish-actions.pod:3963
16001 msgid "You probably don't want to use this unless you know what you are doing."
16005 #: ../src/guestfs-actions.pod:5879 ../fish/guestfish-actions.pod:3966
16006 msgid "The default is disabled."
16010 #: ../src/guestfs-actions.pod:5885
16011 msgid "guestfs_set_e2label"
16015 #: ../src/guestfs-actions.pod:5887
16019 " guestfs_set_e2label (guestfs_h *g,\n"
16020 " const char *device,\n"
16021 " const char *label);\n"
16026 #: ../src/guestfs-actions.pod:5892 ../fish/guestfish-actions.pod:3972
16028 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
16029 "C<label>. Filesystem labels are limited to 16 characters."
16033 #: ../src/guestfs-actions.pod:5896
16035 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
16036 "the existing label on a filesystem."
16040 #: ../src/guestfs-actions.pod:5903
16041 msgid "guestfs_set_e2uuid"
16045 #: ../src/guestfs-actions.pod:5905
16049 " guestfs_set_e2uuid (guestfs_h *g,\n"
16050 " const char *device,\n"
16051 " const char *uuid);\n"
16056 #: ../src/guestfs-actions.pod:5910 ../fish/guestfish-actions.pod:3983
16058 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
16059 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
16060 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
16064 #: ../src/guestfs-actions.pod:5915
16066 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
16067 "the existing UUID of a filesystem."
16071 #: ../src/guestfs-actions.pod:5922
16072 msgid "guestfs_set_memsize"
16076 #: ../src/guestfs-actions.pod:5924
16080 " guestfs_set_memsize (guestfs_h *g,\n"
16086 #: ../src/guestfs-actions.pod:5928
16088 "This sets the memory size in megabytes allocated to the qemu subprocess. "
16089 "This only has any effect if called before C<guestfs_launch>."
16093 #: ../src/guestfs-actions.pod:5932 ../fish/guestfish-actions.pod:4001
16095 "You can also change this by setting the environment variable "
16096 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
16100 #: ../src/guestfs-actions.pod:5943
16101 msgid "guestfs_set_network"
16105 #: ../src/guestfs-actions.pod:5945
16109 " guestfs_set_network (guestfs_h *g,\n"
16115 #: ../src/guestfs-actions.pod:5949 ../fish/guestfish-actions.pod:4014
16117 "If C<network> is true, then the network is enabled in the libguestfs "
16118 "appliance. The default is false."
16122 #: ../src/guestfs-actions.pod:5952 ../fish/guestfish-actions.pod:4017
16124 "This affects whether commands are able to access the network (see L<guestfs"
16125 "(3)/RUNNING COMMANDS>)."
16129 #: ../src/guestfs-actions.pod:5955
16131 "You must call this before calling C<guestfs_launch>, otherwise it has no "
16136 #: ../src/guestfs-actions.pod:5962
16137 msgid "guestfs_set_path"
16141 #: ../src/guestfs-actions.pod:5964
16145 " guestfs_set_path (guestfs_h *g,\n"
16146 " const char *searchpath);\n"
16151 #: ../src/guestfs-actions.pod:5968 ../fish/guestfish-actions.pod:4029
16152 msgid "Set the path that libguestfs searches for kernel and initrd.img."
16156 #: ../src/guestfs-actions.pod:5970 ../fish/guestfish-actions.pod:4031
16158 "The default is C<$libdir/guestfs> unless overridden by setting "
16159 "C<LIBGUESTFS_PATH> environment variable."
16163 #: ../src/guestfs-actions.pod:5973 ../fish/guestfish-actions.pod:4034
16164 msgid "Setting C<path> to C<NULL> restores the default path."
16168 #: ../src/guestfs-actions.pod:5979
16169 msgid "guestfs_set_qemu"
16173 #: ../src/guestfs-actions.pod:5981
16177 " guestfs_set_qemu (guestfs_h *g,\n"
16178 " const char *qemu);\n"
16183 #: ../src/guestfs-actions.pod:5985 ../fish/guestfish-actions.pod:4042
16184 msgid "Set the qemu binary that we will use."
16188 #: ../src/guestfs-actions.pod:5987 ../fish/guestfish-actions.pod:4044
16190 "The default is chosen when the library was compiled by the configure script."
16194 #: ../src/guestfs-actions.pod:5990 ../fish/guestfish-actions.pod:4047
16196 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
16201 #: ../src/guestfs-actions.pod:5993 ../fish/guestfish-actions.pod:4050
16202 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
16206 #: ../src/guestfs-actions.pod:5995 ../fish/guestfish-actions.pod:4052
16208 "Note that you should call this function as early as possible after creating "
16209 "the handle. This is because some pre-launch operations depend on testing "
16210 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
16211 "don't retest features, and so you might see inconsistent results. Using the "
16212 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
16213 "the qemu binary at the same time as the handle is created."
16217 #: ../src/guestfs-actions.pod:6007
16218 msgid "guestfs_set_recovery_proc"
16222 #: ../src/guestfs-actions.pod:6009
16226 " guestfs_set_recovery_proc (guestfs_h *g,\n"
16227 " int recoveryproc);\n"
16232 #: ../src/guestfs-actions.pod:6013
16234 "If this is called with the parameter C<false> then C<guestfs_launch> does "
16235 "not create a recovery process. The purpose of the recovery process is to "
16236 "stop runaway qemu processes in the case where the main program aborts "
16241 #: ../src/guestfs-actions.pod:6018
16243 "This only has any effect if called before C<guestfs_launch>, and the default "
16248 #: ../src/guestfs-actions.pod:6021 ../fish/guestfish-actions.pod:4074
16250 "About the only time when you would want to disable this is if the main "
16251 "process will fork itself into the background (\"daemonize\" itself). In "
16252 "this case the recovery process thinks that the main program has disappeared "
16253 "and so kills qemu, which is not very helpful."
16257 #: ../src/guestfs-actions.pod:6031
16258 msgid "guestfs_set_selinux"
16262 #: ../src/guestfs-actions.pod:6033
16266 " guestfs_set_selinux (guestfs_h *g,\n"
16272 #: ../src/guestfs-actions.pod:6037 ../fish/guestfish-actions.pod:4086
16274 "This sets the selinux flag that is passed to the appliance at boot time. "
16275 "The default is C<selinux=0> (disabled)."
16279 #: ../src/guestfs-actions.pod:6040 ../fish/guestfish-actions.pod:4089
16281 "Note that if SELinux is enabled, it is always in Permissive mode "
16282 "(C<enforcing=0>)."
16286 #: ../src/guestfs-actions.pod:6050
16287 msgid "guestfs_set_trace"
16291 #: ../src/guestfs-actions.pod:6052
16295 " guestfs_set_trace (guestfs_h *g,\n"
16301 #: ../src/guestfs-actions.pod:6056 ../fish/guestfish-actions.pod:4101
16303 "If the command trace flag is set to 1, then libguestfs calls, parameters and "
16304 "return values are traced."
16308 #: ../src/guestfs-actions.pod:6059 ../fish/guestfish-actions.pod:4104
16310 "If you want to trace C API calls into libguestfs (and other libraries) then "
16311 "possibly a better way is to use the external ltrace(1) command."
16315 #: ../src/guestfs-actions.pod:6063 ../fish/guestfish-actions.pod:4108
16317 "Command traces are disabled unless the environment variable "
16318 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
16322 #: ../src/guestfs-actions.pod:6066
16324 "Trace messages are normally sent to C<stderr>, unless you register a "
16325 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
16329 #: ../src/guestfs-actions.pod:6074
16330 msgid "guestfs_set_verbose"
16334 #: ../src/guestfs-actions.pod:6076
16338 " guestfs_set_verbose (guestfs_h *g,\n"
16344 #: ../src/guestfs-actions.pod:6080 ../fish/guestfish-actions.pod:4121
16345 msgid "If C<verbose> is true, this turns on verbose messages."
16349 #: ../src/guestfs-actions.pod:6082 ../fish/guestfish-actions.pod:4123
16351 "Verbose messages are disabled unless the environment variable "
16352 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
16356 #: ../src/guestfs-actions.pod:6085
16358 "Verbose messages are normally sent to C<stderr>, unless you register a "
16359 "callback to send them somewhere else (see C<guestfs_set_event_callback>)."
16363 #: ../src/guestfs-actions.pod:6093
16364 msgid "guestfs_setcon"
16368 #: ../src/guestfs-actions.pod:6095
16372 " guestfs_setcon (guestfs_h *g,\n"
16373 " const char *context);\n"
16378 #: ../src/guestfs-actions.pod:6099 ../fish/guestfish-actions.pod:4134
16380 "This sets the SELinux security context of the daemon to the string "
16385 #: ../src/guestfs-actions.pod:6102 ../fish/guestfish-actions.pod:4137
16386 msgid "See the documentation about SELINUX in L<guestfs(3)>."
16390 #: ../src/guestfs-actions.pod:6108
16391 msgid "guestfs_setxattr"
16395 #: ../src/guestfs-actions.pod:6110
16399 " guestfs_setxattr (guestfs_h *g,\n"
16400 " const char *xattr,\n"
16401 " const char *val,\n"
16403 " const char *path);\n"
16408 #: ../src/guestfs-actions.pod:6117 ../fish/guestfish-actions.pod:4143
16410 "This call sets the extended attribute named C<xattr> of the file C<path> to "
16411 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
16415 #: ../src/guestfs-actions.pod:6121
16416 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
16420 #: ../src/guestfs-actions.pod:6127
16421 msgid "guestfs_sfdisk"
16425 #: ../src/guestfs-actions.pod:6129
16429 " guestfs_sfdisk (guestfs_h *g,\n"
16430 " const char *device,\n"
16434 " char *const *lines);\n"
16439 #: ../src/guestfs-actions.pod:6137 ../fish/guestfish-actions.pod:4153
16441 "This is a direct interface to the L<sfdisk(8)> program for creating "
16442 "partitions on block devices."
16446 #: ../src/guestfs-actions.pod:6140 ../fish/guestfish-actions.pod:4156
16447 msgid "C<device> should be a block device, for example C</dev/sda>."
16451 #: ../src/guestfs-actions.pod:6142 ../fish/guestfish-actions.pod:4158
16453 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
16454 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
16455 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
16456 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
16457 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
16458 "the kernel) cannot work out the right geometry and you will need to tell it."
16462 #: ../src/guestfs-actions.pod:6150 ../fish/guestfish-actions.pod:4166
16464 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
16465 "refer to the L<sfdisk(8)> manpage."
16469 #: ../src/guestfs-actions.pod:6153 ../fish/guestfish-actions.pod:4169
16471 "To create a single partition occupying the whole disk, you would pass "
16472 "C<lines> as a single element list, when the single element being the string "
16477 #: ../src/guestfs-actions.pod:6157
16479 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
16483 #: ../src/guestfs-actions.pod:6165 ../src/guestfs-actions.pod:6195
16484 #: ../src/guestfs-actions.pod:6228 ../fish/guestfish-actions.pod:4179
16485 #: ../fish/guestfish-actions.pod:4202 ../fish/guestfish-actions.pod:4224
16487 "This function is deprecated. In new code, use the C<part_add> call instead."
16491 #: ../src/guestfs-actions.pod:6174
16492 msgid "guestfs_sfdiskM"
16496 #: ../src/guestfs-actions.pod:6176
16500 " guestfs_sfdiskM (guestfs_h *g,\n"
16501 " const char *device,\n"
16502 " char *const *lines);\n"
16507 #: ../src/guestfs-actions.pod:6181
16509 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
16510 "partition sizes are specified in megabytes only (rounded to the nearest "
16511 "cylinder) and you don't need to specify the cyls, heads and sectors "
16512 "parameters which were rarely if ever used anyway."
16516 #: ../src/guestfs-actions.pod:6187
16518 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
16519 "C<guestfs_part_disk>"
16523 #: ../src/guestfs-actions.pod:6204
16524 msgid "guestfs_sfdisk_N"
16528 #: ../src/guestfs-actions.pod:6206
16532 " guestfs_sfdisk_N (guestfs_h *g,\n"
16533 " const char *device,\n"
16538 " const char *line);\n"
16543 #: ../src/guestfs-actions.pod:6215 ../fish/guestfish-actions.pod:4213
16545 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
16546 "(note: C<n> counts from 1)."
16550 #: ../src/guestfs-actions.pod:6218
16552 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
16553 "for the cyls/heads/sectors parameters."
16557 #: ../src/guestfs-actions.pod:6221
16558 msgid "See also: C<guestfs_part_add>"
16562 #: ../src/guestfs-actions.pod:6237
16563 msgid "guestfs_sfdisk_disk_geometry"
16567 #: ../src/guestfs-actions.pod:6239
16571 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
16572 " const char *device);\n"
16577 #: ../src/guestfs-actions.pod:6243
16579 "This displays the disk geometry of C<device> read from the partition table. "
16580 "Especially in the case where the underlying block device has been resized, "
16581 "this can be different from the kernel's idea of the geometry (see "
16582 "C<guestfs_sfdisk_kernel_geometry>)."
16586 #: ../src/guestfs-actions.pod:6248 ../src/guestfs-actions.pod:6264
16587 #: ../fish/guestfish-actions.pod:4240 ../fish/guestfish-actions.pod:4249
16588 msgid "The result is in human-readable format, and not designed to be parsed."
16592 #: ../src/guestfs-actions.pod:6256
16593 msgid "guestfs_sfdisk_kernel_geometry"
16597 #: ../src/guestfs-actions.pod:6258
16601 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
16602 " const char *device);\n"
16607 #: ../src/guestfs-actions.pod:6262 ../fish/guestfish-actions.pod:4247
16608 msgid "This displays the kernel's idea of the geometry of C<device>."
16612 #: ../src/guestfs-actions.pod:6272
16613 msgid "guestfs_sfdisk_l"
16617 #: ../src/guestfs-actions.pod:6274
16621 " guestfs_sfdisk_l (guestfs_h *g,\n"
16622 " const char *device);\n"
16627 #: ../src/guestfs-actions.pod:6278 ../fish/guestfish-actions.pod:4256
16629 "This displays the partition table on C<device>, in the human-readable output "
16630 "of the L<sfdisk(8)> command. It is not intended to be parsed."
16634 #: ../src/guestfs-actions.pod:6282
16635 msgid "See also: C<guestfs_part_list>"
16639 #: ../src/guestfs-actions.pod:6287 ../fish/guestfish-actions.pod:4262
16641 "This function is deprecated. In new code, use the C<part_list> call instead."
16645 #: ../src/guestfs-actions.pod:6296
16650 #: ../src/guestfs-actions.pod:6298
16654 " guestfs_sh (guestfs_h *g,\n"
16655 " const char *command);\n"
16660 #: ../src/guestfs-actions.pod:6302 ../fish/guestfish-actions.pod:4273
16662 "This call runs a command from the guest filesystem via the guest's C</bin/"
16667 #: ../src/guestfs-actions.pod:6305
16668 msgid "This is like C<guestfs_command>, but passes the command to:"
16672 #: ../src/guestfs-actions.pod:6307 ../fish/guestfish-actions.pod:4278
16675 " /bin/sh -c \"command\"\n"
16680 #: ../src/guestfs-actions.pod:6309 ../fish/guestfish-actions.pod:4280
16682 "Depending on the guest's shell, this usually results in wildcards being "
16683 "expanded, shell expressions being interpolated and so on."
16687 #: ../src/guestfs-actions.pod:6313
16688 msgid "All the provisos about C<guestfs_command> apply to this call."
16692 #: ../src/guestfs-actions.pod:6320
16693 msgid "guestfs_sh_lines"
16697 #: ../src/guestfs-actions.pod:6322
16701 " guestfs_sh_lines (guestfs_h *g,\n"
16702 " const char *command);\n"
16707 #: ../src/guestfs-actions.pod:6326
16709 "This is the same as C<guestfs_sh>, but splits the result into a list of "
16714 #: ../src/guestfs-actions.pod:6329
16715 msgid "See also: C<guestfs_command_lines>"
16719 #: ../src/guestfs-actions.pod:6337
16720 msgid "guestfs_sleep"
16724 #: ../src/guestfs-actions.pod:6339
16728 " guestfs_sleep (guestfs_h *g,\n"
16734 #: ../src/guestfs-actions.pod:6343 ../fish/guestfish-actions.pod:4299
16735 msgid "Sleep for C<secs> seconds."
16739 #: ../src/guestfs-actions.pod:6347
16740 msgid "(Added in 1.0.41)"
16744 #: ../src/guestfs-actions.pod:6349 ../src/guestfs-structs.pod:109
16745 msgid "guestfs_stat"
16749 #: ../src/guestfs-actions.pod:6351
16752 " struct guestfs_stat *\n"
16753 " guestfs_stat (guestfs_h *g,\n"
16754 " const char *path);\n"
16759 #: ../src/guestfs-actions.pod:6357 ../fish/guestfish-actions.pod:4307
16760 msgid "This is the same as the C<stat(2)> system call."
16764 #: ../src/guestfs-actions.pod:6365 ../src/guestfs-structs.pod:135
16765 msgid "guestfs_statvfs"
16769 #: ../src/guestfs-actions.pod:6367
16772 " struct guestfs_statvfs *\n"
16773 " guestfs_statvfs (guestfs_h *g,\n"
16774 " const char *path);\n"
16779 #: ../src/guestfs-actions.pod:6371 ../fish/guestfish-actions.pod:4313
16781 "Returns file system statistics for any mounted file system. C<path> should "
16782 "be a file or directory in the mounted file system (typically it is the mount "
16783 "point itself, but it doesn't need to be)."
16787 #: ../src/guestfs-actions.pod:6375 ../fish/guestfish-actions.pod:4317
16788 msgid "This is the same as the C<statvfs(2)> system call."
16792 #: ../src/guestfs-actions.pod:6377
16794 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
16795 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
16799 #: ../src/guestfs-actions.pod:6383
16800 msgid "guestfs_strings"
16804 #: ../src/guestfs-actions.pod:6385
16808 " guestfs_strings (guestfs_h *g,\n"
16809 " const char *path);\n"
16814 #: ../src/guestfs-actions.pod:6389 ../fish/guestfish-actions.pod:4323
16816 "This runs the L<strings(1)> command on a file and returns the list of "
16817 "printable strings found."
16821 #: ../src/guestfs-actions.pod:6401
16822 msgid "guestfs_strings_e"
16826 #: ../src/guestfs-actions.pod:6403
16830 " guestfs_strings_e (guestfs_h *g,\n"
16831 " const char *encoding,\n"
16832 " const char *path);\n"
16837 #: ../src/guestfs-actions.pod:6408
16839 "This is like the C<guestfs_strings> command, but allows you to specify the "
16840 "encoding of strings that are looked for in the source file C<path>."
16844 #: ../src/guestfs-actions.pod:6412 ../fish/guestfish-actions.pod:4337
16845 msgid "Allowed encodings are:"
16849 #: ../src/guestfs-actions.pod:6416 ../fish/guestfish-actions.pod:4341
16854 #: ../src/guestfs-actions.pod:6418
16856 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
16857 "ISO-8859-X (this is what C<guestfs_strings> uses)."
16861 #: ../src/guestfs-actions.pod:6421 ../fish/guestfish-actions.pod:4346
16866 #: ../src/guestfs-actions.pod:6423 ../fish/guestfish-actions.pod:4348
16867 msgid "Single 8-bit-byte characters."
16871 #: ../src/guestfs-actions.pod:6425 ../fish/guestfish-actions.pod:4350
16876 #: ../src/guestfs-actions.pod:6427 ../fish/guestfish-actions.pod:4352
16877 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
16881 #: ../src/guestfs-actions.pod:6430 ../fish/guestfish-actions.pod:4355
16882 msgid "l (lower case letter L)"
16886 #: ../src/guestfs-actions.pod:6432 ../fish/guestfish-actions.pod:4357
16888 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
16889 "examining binaries in Windows guests."
16893 #: ../src/guestfs-actions.pod:6435 ../fish/guestfish-actions.pod:4360
16898 #: ../src/guestfs-actions.pod:6437 ../fish/guestfish-actions.pod:4362
16899 msgid "32-bit big endian such as UCS-4BE."
16903 #: ../src/guestfs-actions.pod:6439 ../fish/guestfish-actions.pod:4364
16908 #: ../src/guestfs-actions.pod:6441 ../fish/guestfish-actions.pod:4366
16909 msgid "32-bit little endian such as UCS-4LE."
16913 #: ../src/guestfs-actions.pod:6445 ../fish/guestfish-actions.pod:4370
16914 msgid "The returned strings are transcoded to UTF-8."
16918 #: ../src/guestfs-actions.pod:6456
16919 msgid "guestfs_swapoff_device"
16923 #: ../src/guestfs-actions.pod:6458
16927 " guestfs_swapoff_device (guestfs_h *g,\n"
16928 " const char *device);\n"
16933 #: ../src/guestfs-actions.pod:6462
16935 "This command disables the libguestfs appliance swap device or partition "
16936 "named C<device>. See C<guestfs_swapon_device>."
16940 #: ../src/guestfs-actions.pod:6470
16941 msgid "guestfs_swapoff_file"
16945 #: ../src/guestfs-actions.pod:6472
16949 " guestfs_swapoff_file (guestfs_h *g,\n"
16950 " const char *file);\n"
16955 #: ../src/guestfs-actions.pod:6476 ../fish/guestfish-actions.pod:4387
16956 msgid "This command disables the libguestfs appliance swap on file."
16960 #: ../src/guestfs-actions.pod:6482
16961 msgid "guestfs_swapoff_label"
16965 #: ../src/guestfs-actions.pod:6484
16969 " guestfs_swapoff_label (guestfs_h *g,\n"
16970 " const char *label);\n"
16975 #: ../src/guestfs-actions.pod:6488 ../fish/guestfish-actions.pod:4393
16977 "This command disables the libguestfs appliance swap on labeled swap "
16982 #: ../src/guestfs-actions.pod:6495
16983 msgid "guestfs_swapoff_uuid"
16987 #: ../src/guestfs-actions.pod:6497
16991 " guestfs_swapoff_uuid (guestfs_h *g,\n"
16992 " const char *uuid);\n"
16997 #: ../src/guestfs-actions.pod:6501 ../fish/guestfish-actions.pod:4400
16999 "This command disables the libguestfs appliance swap partition with the given "
17004 #: ../src/guestfs-actions.pod:6508
17005 msgid "guestfs_swapon_device"
17009 #: ../src/guestfs-actions.pod:6510
17013 " guestfs_swapon_device (guestfs_h *g,\n"
17014 " const char *device);\n"
17019 #: ../src/guestfs-actions.pod:6514
17021 "This command enables the libguestfs appliance to use the swap device or "
17022 "partition named C<device>. The increased memory is made available for all "
17023 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
17027 #: ../src/guestfs-actions.pod:6519 ../fish/guestfish-actions.pod:4412
17029 "Note that you should not swap to existing guest swap partitions unless you "
17030 "know what you are doing. They may contain hibernation information, or other "
17031 "information that the guest doesn't want you to trash. You also risk leaking "
17032 "information about the host to the guest this way. Instead, attach a new "
17033 "host device to the guest and swap on that."
17037 #: ../src/guestfs-actions.pod:6530
17038 msgid "guestfs_swapon_file"
17042 #: ../src/guestfs-actions.pod:6532
17046 " guestfs_swapon_file (guestfs_h *g,\n"
17047 " const char *file);\n"
17052 #: ../src/guestfs-actions.pod:6536
17054 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
17059 #: ../src/guestfs-actions.pod:6543
17060 msgid "guestfs_swapon_label"
17064 #: ../src/guestfs-actions.pod:6545
17068 " guestfs_swapon_label (guestfs_h *g,\n"
17069 " const char *label);\n"
17074 #: ../src/guestfs-actions.pod:6549
17076 "This command enables swap to a labeled swap partition. See "
17077 "C<guestfs_swapon_device> for other notes."
17081 #: ../src/guestfs-actions.pod:6556
17082 msgid "guestfs_swapon_uuid"
17086 #: ../src/guestfs-actions.pod:6558
17090 " guestfs_swapon_uuid (guestfs_h *g,\n"
17091 " const char *uuid);\n"
17096 #: ../src/guestfs-actions.pod:6562
17098 "This command enables swap to a swap partition with the given UUID. See "
17099 "C<guestfs_swapon_device> for other notes."
17103 #: ../src/guestfs-actions.pod:6569
17104 msgid "guestfs_sync"
17108 #: ../src/guestfs-actions.pod:6571
17112 " guestfs_sync (guestfs_h *g);\n"
17117 #: ../src/guestfs-actions.pod:6574 ../fish/guestfish-actions.pod:4444
17119 "This syncs the disk, so that any writes are flushed through to the "
17120 "underlying disk image."
17124 #: ../src/guestfs-actions.pod:6577 ../fish/guestfish-actions.pod:4447
17126 "You should always call this if you have modified a disk image, before "
17127 "closing the handle."
17131 #: ../src/guestfs-actions.pod:6584
17132 msgid "guestfs_tail"
17136 #: ../src/guestfs-actions.pod:6586
17140 " guestfs_tail (guestfs_h *g,\n"
17141 " const char *path);\n"
17146 #: ../src/guestfs-actions.pod:6590 ../fish/guestfish-actions.pod:4454
17148 "This command returns up to the last 10 lines of a file as a list of strings."
17152 #: ../src/guestfs-actions.pod:6602
17153 msgid "guestfs_tail_n"
17157 #: ../src/guestfs-actions.pod:6604
17161 " guestfs_tail_n (guestfs_h *g,\n"
17163 " const char *path);\n"
17168 #: ../src/guestfs-actions.pod:6609 ../fish/guestfish-actions.pod:4464
17170 "If the parameter C<nrlines> is a positive number, this returns the last "
17171 "C<nrlines> lines of the file C<path>."
17175 #: ../src/guestfs-actions.pod:6612 ../fish/guestfish-actions.pod:4467
17177 "If the parameter C<nrlines> is a negative number, this returns lines from "
17178 "the file C<path>, starting with the C<-nrlines>th line."
17182 #: ../src/guestfs-actions.pod:6626
17183 msgid "guestfs_tar_in"
17187 #: ../src/guestfs-actions.pod:6628
17191 " guestfs_tar_in (guestfs_h *g,\n"
17192 " const char *tarfile,\n"
17193 " const char *directory);\n"
17198 #: ../src/guestfs-actions.pod:6633 ../fish/guestfish-actions.pod:4479
17200 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
17201 "tar file) into C<directory>."
17205 #: ../src/guestfs-actions.pod:6636
17207 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
17211 #: ../src/guestfs-actions.pod:6641 ../src/guestfs-actions.pod:6658
17212 #: ../src/guestfs-actions.pod:6674 ../src/guestfs-actions.pod:6690
17213 msgid "(Added in 1.0.3)"
17217 #: ../src/guestfs-actions.pod:6643
17218 msgid "guestfs_tar_out"
17222 #: ../src/guestfs-actions.pod:6645
17226 " guestfs_tar_out (guestfs_h *g,\n"
17227 " const char *directory,\n"
17228 " const char *tarfile);\n"
17233 #: ../src/guestfs-actions.pod:6650 ../fish/guestfish-actions.pod:4491
17235 "This command packs the contents of C<directory> and downloads it to local "
17240 #: ../src/guestfs-actions.pod:6653
17242 "To download a compressed tarball, use C<guestfs_tgz_out> or "
17243 "C<guestfs_txz_out>."
17247 #: ../src/guestfs-actions.pod:6660
17248 msgid "guestfs_tgz_in"
17252 #: ../src/guestfs-actions.pod:6662
17256 " guestfs_tgz_in (guestfs_h *g,\n"
17257 " const char *tarball,\n"
17258 " const char *directory);\n"
17263 #: ../src/guestfs-actions.pod:6667 ../fish/guestfish-actions.pod:4503
17265 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
17266 "tar file) into C<directory>."
17270 #: ../src/guestfs-actions.pod:6670
17271 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
17275 #: ../src/guestfs-actions.pod:6676
17276 msgid "guestfs_tgz_out"
17280 #: ../src/guestfs-actions.pod:6678
17284 " guestfs_tgz_out (guestfs_h *g,\n"
17285 " const char *directory,\n"
17286 " const char *tarball);\n"
17291 #: ../src/guestfs-actions.pod:6683 ../fish/guestfish-actions.pod:4514
17293 "This command packs the contents of C<directory> and downloads it to local "
17298 #: ../src/guestfs-actions.pod:6686
17299 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
17303 #: ../src/guestfs-actions.pod:6692
17304 msgid "guestfs_touch"
17308 #: ../src/guestfs-actions.pod:6694
17312 " guestfs_touch (guestfs_h *g,\n"
17313 " const char *path);\n"
17318 #: ../src/guestfs-actions.pod:6698 ../fish/guestfish-actions.pod:4525
17320 "Touch acts like the L<touch(1)> command. It can be used to update the "
17321 "timestamps on a file, or, if the file does not exist, to create a new zero-"
17326 #: ../src/guestfs-actions.pod:6702 ../fish/guestfish-actions.pod:4529
17328 "This command only works on regular files, and will fail on other file types "
17329 "such as directories, symbolic links, block special etc."
17333 #: ../src/guestfs-actions.pod:6709
17334 msgid "guestfs_truncate"
17338 #: ../src/guestfs-actions.pod:6711
17342 " guestfs_truncate (guestfs_h *g,\n"
17343 " const char *path);\n"
17348 #: ../src/guestfs-actions.pod:6715 ../fish/guestfish-actions.pod:4536
17350 "This command truncates C<path> to a zero-length file. The file must exist "
17355 #: ../src/guestfs-actions.pod:6722
17356 msgid "guestfs_truncate_size"
17360 #: ../src/guestfs-actions.pod:6724
17364 " guestfs_truncate_size (guestfs_h *g,\n"
17365 " const char *path,\n"
17366 " int64_t size);\n"
17371 #: ../src/guestfs-actions.pod:6729 ../fish/guestfish-actions.pod:4543
17373 "This command truncates C<path> to size C<size> bytes. The file must exist "
17378 #: ../src/guestfs-actions.pod:6732
17380 "If the current file size is less than C<size> then the file is extended to "
17381 "the required size with zero bytes. This creates a sparse file (ie. disk "
17382 "blocks are not allocated for the file until you write to it). To create a "
17383 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
17387 #: ../src/guestfs-actions.pod:6742
17388 msgid "guestfs_tune2fs_l"
17392 #: ../src/guestfs-actions.pod:6744
17396 " guestfs_tune2fs_l (guestfs_h *g,\n"
17397 " const char *device);\n"
17402 #: ../src/guestfs-actions.pod:6748 ../fish/guestfish-actions.pod:4556
17404 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
17409 #: ../src/guestfs-actions.pod:6751 ../fish/guestfish-actions.pod:4559
17411 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
17412 "for more details. The list of fields returned isn't clearly defined, and "
17413 "depends on both the version of C<tune2fs> that libguestfs was built against, "
17414 "and the filesystem itself."
17418 #: ../src/guestfs-actions.pod:6764
17419 msgid "guestfs_txz_in"
17423 #: ../src/guestfs-actions.pod:6766
17427 " guestfs_txz_in (guestfs_h *g,\n"
17428 " const char *tarball,\n"
17429 " const char *directory);\n"
17434 #: ../src/guestfs-actions.pod:6771 ../fish/guestfish-actions.pod:4568
17436 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
17437 "tar file) into C<directory>."
17441 #: ../src/guestfs-actions.pod:6778
17442 msgid "guestfs_txz_out"
17446 #: ../src/guestfs-actions.pod:6780
17450 " guestfs_txz_out (guestfs_h *g,\n"
17451 " const char *directory,\n"
17452 " const char *tarball);\n"
17457 #: ../src/guestfs-actions.pod:6785 ../fish/guestfish-actions.pod:4577
17459 "This command packs the contents of C<directory> and downloads it to local "
17460 "file C<tarball> (as an xz compressed tar archive)."
17464 #: ../src/guestfs-actions.pod:6792
17465 msgid "guestfs_umask"
17469 #: ../src/guestfs-actions.pod:6794
17473 " guestfs_umask (guestfs_h *g,\n"
17479 #: ../src/guestfs-actions.pod:6798 ../fish/guestfish-actions.pod:4586
17481 "This function sets the mask used for creating new files and device nodes to "
17486 #: ../src/guestfs-actions.pod:6801 ../fish/guestfish-actions.pod:4589
17488 "Typical umask values would be C<022> which creates new files with "
17489 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
17490 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
17494 #: ../src/guestfs-actions.pod:6806 ../fish/guestfish-actions.pod:4594
17496 "The default umask is C<022>. This is important because it means that "
17497 "directories and device nodes will be created with C<0644> or C<0755> mode "
17498 "even if you specify C<0777>."
17502 #: ../src/guestfs-actions.pod:6810
17504 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
17505 "C<guestfs_mkdir>."
17509 #: ../src/guestfs-actions.pod:6813 ../fish/guestfish-actions.pod:4601
17510 msgid "This call returns the previous umask."
17514 #: ../src/guestfs-actions.pod:6819
17515 msgid "guestfs_umount"
17519 #: ../src/guestfs-actions.pod:6821
17523 " guestfs_umount (guestfs_h *g,\n"
17524 " const char *pathordevice);\n"
17529 #: ../src/guestfs-actions.pod:6825 ../fish/guestfish-actions.pod:4609
17531 "This unmounts the given filesystem. The filesystem may be specified either "
17532 "by its mountpoint (path) or the device which contains the filesystem."
17536 #: ../src/guestfs-actions.pod:6833
17537 msgid "guestfs_umount_all"
17541 #: ../src/guestfs-actions.pod:6835
17545 " guestfs_umount_all (guestfs_h *g);\n"
17550 #: ../src/guestfs-actions.pod:6838 ../fish/guestfish-actions.pod:4619
17551 msgid "This unmounts all mounted filesystems."
17555 #: ../src/guestfs-actions.pod:6840 ../fish/guestfish-actions.pod:4621
17556 msgid "Some internal mounts are not unmounted by this call."
17560 #: ../src/guestfs-actions.pod:6846
17561 msgid "guestfs_upload"
17565 #: ../src/guestfs-actions.pod:6848
17569 " guestfs_upload (guestfs_h *g,\n"
17570 " const char *filename,\n"
17571 " const char *remotefilename);\n"
17576 #: ../src/guestfs-actions.pod:6853 ../src/guestfs-actions.pod:6877
17577 #: ../fish/guestfish-actions.pod:4627 ../fish/guestfish-actions.pod:4640
17578 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
17582 #: ../src/guestfs-actions.pod:6858
17583 msgid "See also C<guestfs_download>."
17587 #: ../src/guestfs-actions.pod:6869
17588 msgid "guestfs_upload_offset"
17592 #: ../src/guestfs-actions.pod:6871
17596 " guestfs_upload_offset (guestfs_h *g,\n"
17597 " const char *filename,\n"
17598 " const char *remotefilename,\n"
17599 " int64_t offset);\n"
17604 #: ../src/guestfs-actions.pod:6880 ../fish/guestfish-actions.pod:4643
17606 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
17607 "The intention is to overwrite parts of existing files or devices, although "
17608 "if a non-existant file is specified then it is created with a \"hole\" "
17609 "before C<offset>. The size of the data written is implicit in the size of "
17610 "the source C<filename>."
17614 #: ../src/guestfs-actions.pod:6887
17616 "Note that there is no limit on the amount of data that can be uploaded with "
17617 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
17618 "full amount unless an error occurs."
17622 #: ../src/guestfs-actions.pod:6892
17623 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
17627 #: ../src/guestfs-actions.pod:6903
17628 msgid "guestfs_utimens"
17632 #: ../src/guestfs-actions.pod:6905
17636 " guestfs_utimens (guestfs_h *g,\n"
17637 " const char *path,\n"
17638 " int64_t atsecs,\n"
17639 " int64_t atnsecs,\n"
17640 " int64_t mtsecs,\n"
17641 " int64_t mtnsecs);\n"
17646 #: ../src/guestfs-actions.pod:6913 ../fish/guestfish-actions.pod:4663
17647 msgid "This command sets the timestamps of a file with nanosecond precision."
17651 #: ../src/guestfs-actions.pod:6916 ../fish/guestfish-actions.pod:4666
17653 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
17658 #: ../src/guestfs-actions.pod:6919 ../fish/guestfish-actions.pod:4669
17660 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
17661 "nanoseconds from the epoch."
17665 #: ../src/guestfs-actions.pod:6922 ../fish/guestfish-actions.pod:4672
17667 "If the C<*nsecs> field contains the special value C<-1> then the "
17668 "corresponding timestamp is set to the current time. (The C<*secs> field is "
17669 "ignored in this case)."
17673 #: ../src/guestfs-actions.pod:6926 ../fish/guestfish-actions.pod:4676
17675 "If the C<*nsecs> field contains the special value C<-2> then the "
17676 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
17681 #: ../src/guestfs-actions.pod:6934 ../src/guestfs-structs.pod:175
17682 msgid "guestfs_version"
17686 #: ../src/guestfs-actions.pod:6936
17689 " struct guestfs_version *\n"
17690 " guestfs_version (guestfs_h *g);\n"
17695 #: ../src/guestfs-actions.pod:6939 ../fish/guestfish-actions.pod:4684
17697 "Return the libguestfs version number that the program is linked against."
17701 #: ../src/guestfs-actions.pod:6942 ../fish/guestfish-actions.pod:4687
17703 "Note that because of dynamic linking this is not necessarily the version of "
17704 "libguestfs that you compiled against. You can compile the program, and then "
17705 "at runtime dynamically link against a completely different C<libguestfs.so> "
17710 #: ../src/guestfs-actions.pod:6947 ../fish/guestfish-actions.pod:4692
17712 "This call was added in version C<1.0.58>. In previous versions of "
17713 "libguestfs there was no way to get the version number. From C code you can "
17714 "use dynamic linker functions to find out if this symbol exists (if it "
17715 "doesn't, then it's an earlier version)."
17719 #: ../src/guestfs-actions.pod:6953 ../fish/guestfish-actions.pod:4698
17721 "The call returns a structure with four elements. The first three (C<major>, "
17722 "C<minor> and C<release>) are numbers and correspond to the usual version "
17723 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
17724 "but may be used for distro-specific information."
17728 #: ../src/guestfs-actions.pod:6959 ../fish/guestfish-actions.pod:4704
17730 "To construct the original version string: C<$major.$minor.$release$extra>"
17734 #: ../src/guestfs-actions.pod:6962 ../fish/guestfish-actions.pod:4707
17735 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
17739 #: ../src/guestfs-actions.pod:6964
17741 "I<Note:> Don't use this call to test for availability of features. In "
17742 "enterprise distributions we backport features from later versions into "
17743 "earlier versions, making this an unreliable way to test for features. Use "
17744 "C<guestfs_available> instead."
17748 #: ../src/guestfs-actions.pod:6970
17750 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
17751 "error. I<The caller must call C<guestfs_free_version> after use>."
17755 #: ../src/guestfs-actions.pod:6974
17756 msgid "(Added in 1.0.58)"
17760 #: ../src/guestfs-actions.pod:6976
17761 msgid "guestfs_vfs_label"
17765 #: ../src/guestfs-actions.pod:6978
17769 " guestfs_vfs_label (guestfs_h *g,\n"
17770 " const char *device);\n"
17775 #: ../src/guestfs-actions.pod:6982 ../fish/guestfish-actions.pod:4719
17776 msgid "This returns the filesystem label of the filesystem on C<device>."
17780 #: ../src/guestfs-actions.pod:6985 ../fish/guestfish-actions.pod:4722
17781 msgid "If the filesystem is unlabeled, this returns the empty string."
17785 #: ../src/guestfs-actions.pod:6987
17786 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
17790 #: ../src/guestfs-actions.pod:6992 ../src/guestfs-actions.pod:7029
17791 msgid "(Added in 1.3.18)"
17795 #: ../src/guestfs-actions.pod:6994
17796 msgid "guestfs_vfs_type"
17800 #: ../src/guestfs-actions.pod:6996
17804 " guestfs_vfs_type (guestfs_h *g,\n"
17805 " const char *device);\n"
17810 #: ../src/guestfs-actions.pod:7000 ../fish/guestfish-actions.pod:4730
17812 "This command gets the filesystem type corresponding to the filesystem on "
17817 #: ../src/guestfs-actions.pod:7003 ../fish/guestfish-actions.pod:4733
17819 "For most filesystems, the result is the name of the Linux VFS module which "
17820 "would be used to mount this filesystem if you mounted it without specifying "
17821 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
17825 #: ../src/guestfs-actions.pod:7013
17826 msgid "guestfs_vfs_uuid"
17830 #: ../src/guestfs-actions.pod:7015
17834 " guestfs_vfs_uuid (guestfs_h *g,\n"
17835 " const char *device);\n"
17840 #: ../src/guestfs-actions.pod:7019 ../fish/guestfish-actions.pod:4742
17841 msgid "This returns the filesystem UUID of the filesystem on C<device>."
17845 #: ../src/guestfs-actions.pod:7022 ../fish/guestfish-actions.pod:4745
17846 msgid "If the filesystem does not have a UUID, this returns the empty string."
17850 #: ../src/guestfs-actions.pod:7024
17851 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
17855 #: ../src/guestfs-actions.pod:7031
17856 msgid "guestfs_vg_activate"
17860 #: ../src/guestfs-actions.pod:7033
17864 " guestfs_vg_activate (guestfs_h *g,\n"
17866 " char *const *volgroups);\n"
17871 #: ../src/guestfs-actions.pod:7038 ../fish/guestfish-actions.pod:4753
17873 "This command activates or (if C<activate> is false) deactivates all logical "
17874 "volumes in the listed volume groups C<volgroups>. If activated, then they "
17875 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
17876 "deactivated, then those devices disappear."
17880 #: ../src/guestfs-actions.pod:7044 ../fish/guestfish-actions.pod:4759
17881 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
17885 #: ../src/guestfs-actions.pod:7046 ../fish/guestfish-actions.pod:4761
17887 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
17888 "activated or deactivated."
17892 #: ../src/guestfs-actions.pod:7053
17893 msgid "guestfs_vg_activate_all"
17897 #: ../src/guestfs-actions.pod:7055
17901 " guestfs_vg_activate_all (guestfs_h *g,\n"
17902 " int activate);\n"
17907 #: ../src/guestfs-actions.pod:7059 ../fish/guestfish-actions.pod:4768
17909 "This command activates or (if C<activate> is false) deactivates all logical "
17910 "volumes in all volume groups. If activated, then they are made known to the "
17911 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
17912 "those devices disappear."
17916 #: ../src/guestfs-actions.pod:7065 ../fish/guestfish-actions.pod:4774
17917 msgid "This command is the same as running C<vgchange -a y|n>"
17921 #: ../src/guestfs-actions.pod:7071
17922 msgid "guestfs_vgcreate"
17926 #: ../src/guestfs-actions.pod:7073
17930 " guestfs_vgcreate (guestfs_h *g,\n"
17931 " const char *volgroup,\n"
17932 " char *const *physvols);\n"
17937 #: ../src/guestfs-actions.pod:7078 ../fish/guestfish-actions.pod:4780
17939 "This creates an LVM volume group called C<volgroup> from the non-empty list "
17940 "of physical volumes C<physvols>."
17944 #: ../src/guestfs-actions.pod:7085
17945 msgid "guestfs_vglvuuids"
17949 #: ../src/guestfs-actions.pod:7087
17953 " guestfs_vglvuuids (guestfs_h *g,\n"
17954 " const char *vgname);\n"
17959 #: ../src/guestfs-actions.pod:7091 ../fish/guestfish-actions.pod:4787
17961 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
17962 "volumes created in this volume group."
17966 #: ../src/guestfs-actions.pod:7094
17968 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
17969 "associate logical volumes and volume groups."
17973 #: ../src/guestfs-actions.pod:7097
17974 msgid "See also C<guestfs_vgpvuuids>."
17978 #: ../src/guestfs-actions.pod:7105
17979 msgid "guestfs_vgpvuuids"
17983 #: ../src/guestfs-actions.pod:7107
17987 " guestfs_vgpvuuids (guestfs_h *g,\n"
17988 " const char *vgname);\n"
17993 #: ../src/guestfs-actions.pod:7111 ../fish/guestfish-actions.pod:4799
17995 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
17996 "volumes that this volume group resides on."
18000 #: ../src/guestfs-actions.pod:7114
18002 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
18003 "associate physical volumes and volume groups."
18007 #: ../src/guestfs-actions.pod:7117
18008 msgid "See also C<guestfs_vglvuuids>."
18012 #: ../src/guestfs-actions.pod:7125
18013 msgid "guestfs_vgremove"
18017 #: ../src/guestfs-actions.pod:7127
18021 " guestfs_vgremove (guestfs_h *g,\n"
18022 " const char *vgname);\n"
18027 #: ../src/guestfs-actions.pod:7131 ../fish/guestfish-actions.pod:4811
18028 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
18032 #: ../src/guestfs-actions.pod:7133 ../fish/guestfish-actions.pod:4813
18034 "This also forcibly removes all logical volumes in the volume group (if any)."
18038 #: ../src/guestfs-actions.pod:7140
18039 msgid "guestfs_vgrename"
18043 #: ../src/guestfs-actions.pod:7142
18047 " guestfs_vgrename (guestfs_h *g,\n"
18048 " const char *volgroup,\n"
18049 " const char *newvolgroup);\n"
18054 #: ../src/guestfs-actions.pod:7147 ../fish/guestfish-actions.pod:4820
18055 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
18059 #: ../src/guestfs-actions.pod:7153
18060 msgid "guestfs_vgs"
18064 #: ../src/guestfs-actions.pod:7155
18068 " guestfs_vgs (guestfs_h *g);\n"
18073 #: ../src/guestfs-actions.pod:7158 ../fish/guestfish-actions.pod:4826
18075 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
18080 #: ../src/guestfs-actions.pod:7161 ../fish/guestfish-actions.pod:4829
18082 "This returns a list of just the volume group names that were detected (eg. "
18087 #: ../src/guestfs-actions.pod:7164
18088 msgid "See also C<guestfs_vgs_full>."
18092 #: ../src/guestfs-actions.pod:7172
18093 msgid "guestfs_vgs_full"
18097 #: ../src/guestfs-actions.pod:7174
18100 " struct guestfs_lvm_vg_list *\n"
18101 " guestfs_vgs_full (guestfs_h *g);\n"
18106 #: ../src/guestfs-actions.pod:7177 ../fish/guestfish-actions.pod:4838
18108 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
18109 "> command. The \"full\" version includes all fields."
18113 #: ../src/guestfs-actions.pod:7180
18115 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
18116 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after use>."
18120 #: ../src/guestfs-actions.pod:7186
18121 msgid "guestfs_vgscan"
18125 #: ../src/guestfs-actions.pod:7188
18129 " guestfs_vgscan (guestfs_h *g);\n"
18134 #: ../src/guestfs-actions.pod:7191 ../fish/guestfish-actions.pod:4845
18136 "This rescans all block devices and rebuilds the list of LVM physical "
18137 "volumes, volume groups and logical volumes."
18141 #: ../src/guestfs-actions.pod:7198
18142 msgid "guestfs_vguuid"
18146 #: ../src/guestfs-actions.pod:7200
18150 " guestfs_vguuid (guestfs_h *g,\n"
18151 " const char *vgname);\n"
18156 #: ../src/guestfs-actions.pod:7204 ../fish/guestfish-actions.pod:4852
18157 msgid "This command returns the UUID of the LVM VG named C<vgname>."
18161 #: ../src/guestfs-actions.pod:7211
18162 msgid "guestfs_wait_ready"
18166 #: ../src/guestfs-actions.pod:7213
18170 " guestfs_wait_ready (guestfs_h *g);\n"
18175 #: ../src/guestfs-actions.pod:7216
18176 msgid "This function is a no op."
18180 #: ../src/guestfs-actions.pod:7218
18182 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
18183 "calling C<guestfs_launch> to wait for the launch to complete. However this "
18184 "is no longer necessary because C<guestfs_launch> now does the waiting."
18188 #: ../src/guestfs-actions.pod:7223
18190 "If you see any calls to this function in code then you can just remove them, "
18191 "unless you want to retain compatibility with older versions of the API."
18195 #: ../src/guestfs-actions.pod:7229
18197 "This function is deprecated. In new code, use the C<launch> call instead."
18201 #: ../src/guestfs-actions.pod:7238
18202 msgid "guestfs_wc_c"
18206 #: ../src/guestfs-actions.pod:7240
18210 " guestfs_wc_c (guestfs_h *g,\n"
18211 " const char *path);\n"
18216 #: ../src/guestfs-actions.pod:7244 ../fish/guestfish-actions.pod:4858
18218 "This command counts the characters in a file, using the C<wc -c> external "
18223 #: ../src/guestfs-actions.pod:7251
18224 msgid "guestfs_wc_l"
18228 #: ../src/guestfs-actions.pod:7253
18232 " guestfs_wc_l (guestfs_h *g,\n"
18233 " const char *path);\n"
18238 #: ../src/guestfs-actions.pod:7257 ../fish/guestfish-actions.pod:4865
18240 "This command counts the lines in a file, using the C<wc -l> external command."
18244 #: ../src/guestfs-actions.pod:7264
18245 msgid "guestfs_wc_w"
18249 #: ../src/guestfs-actions.pod:7266
18253 " guestfs_wc_w (guestfs_h *g,\n"
18254 " const char *path);\n"
18259 #: ../src/guestfs-actions.pod:7270 ../fish/guestfish-actions.pod:4872
18261 "This command counts the words in a file, using the C<wc -w> external command."
18265 #: ../src/guestfs-actions.pod:7277
18266 msgid "guestfs_write"
18270 #: ../src/guestfs-actions.pod:7279
18274 " guestfs_write (guestfs_h *g,\n"
18275 " const char *path,\n"
18276 " const char *content,\n"
18277 " size_t content_size);\n"
18282 #: ../src/guestfs-actions.pod:7285 ../fish/guestfish-actions.pod:4879
18284 "This call creates a file called C<path>. The content of the file is the "
18285 "string C<content> (which can contain any 8 bit data)."
18289 #: ../src/guestfs-actions.pod:7295
18290 msgid "guestfs_write_file"
18294 #: ../src/guestfs-actions.pod:7297
18298 " guestfs_write_file (guestfs_h *g,\n"
18299 " const char *path,\n"
18300 " const char *content,\n"
18306 #: ../src/guestfs-actions.pod:7303 ../fish/guestfish-actions.pod:4889
18308 "This call creates a file called C<path>. The contents of the file is the "
18309 "string C<content> (which can contain any 8 bit data), with length C<size>."
18313 #: ../src/guestfs-actions.pod:7307 ../fish/guestfish-actions.pod:4893
18315 "As a special case, if C<size> is C<0> then the length is calculated using "
18316 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
18320 #: ../src/guestfs-actions.pod:7311 ../fish/guestfish-actions.pod:4897
18322 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
18323 "I<not> work, even if the length is specified."
18327 #: ../src/guestfs-actions.pod:7319 ../fish/guestfish-actions.pod:4903
18329 "This function is deprecated. In new code, use the C<write> call instead."
18333 #: ../src/guestfs-actions.pod:7328
18334 msgid "guestfs_zegrep"
18338 #: ../src/guestfs-actions.pod:7330
18342 " guestfs_zegrep (guestfs_h *g,\n"
18343 " const char *regex,\n"
18344 " const char *path);\n"
18349 #: ../src/guestfs-actions.pod:7335 ../fish/guestfish-actions.pod:4914
18351 "This calls the external C<zegrep> program and returns the matching lines."
18355 #: ../src/guestfs-actions.pod:7347
18356 msgid "guestfs_zegrepi"
18360 #: ../src/guestfs-actions.pod:7349
18364 " guestfs_zegrepi (guestfs_h *g,\n"
18365 " const char *regex,\n"
18366 " const char *path);\n"
18371 #: ../src/guestfs-actions.pod:7354 ../fish/guestfish-actions.pod:4924
18373 "This calls the external C<zegrep -i> program and returns the matching lines."
18377 #: ../src/guestfs-actions.pod:7366
18378 msgid "guestfs_zero"
18382 #: ../src/guestfs-actions.pod:7368
18386 " guestfs_zero (guestfs_h *g,\n"
18387 " const char *device);\n"
18392 #: ../src/guestfs-actions.pod:7372 ../fish/guestfish-actions.pod:4934
18393 msgid "This command writes zeroes over the first few blocks of C<device>."
18397 #: ../src/guestfs-actions.pod:7374 ../fish/guestfish-actions.pod:4936
18399 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
18400 "securely wipe the device). It should be sufficient to remove any partition "
18401 "tables, filesystem superblocks and so on."
18405 #: ../src/guestfs-actions.pod:7378
18406 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
18410 #: ../src/guestfs-actions.pod:7389
18411 msgid "guestfs_zero_device"
18415 #: ../src/guestfs-actions.pod:7391
18419 " guestfs_zero_device (guestfs_h *g,\n"
18420 " const char *device);\n"
18425 #: ../src/guestfs-actions.pod:7395
18427 "This command writes zeroes over the entire C<device>. Compare with "
18428 "C<guestfs_zero> which just zeroes the first few blocks of a device."
18432 #: ../src/guestfs-actions.pod:7409
18433 msgid "(Added in 1.3.1)"
18437 #: ../src/guestfs-actions.pod:7411
18438 msgid "guestfs_zerofree"
18442 #: ../src/guestfs-actions.pod:7413
18446 " guestfs_zerofree (guestfs_h *g,\n"
18447 " const char *device);\n"
18452 #: ../src/guestfs-actions.pod:7417 ../fish/guestfish-actions.pod:4957
18454 "This runs the I<zerofree> program on C<device>. This program claims to zero "
18455 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
18456 "possible to compress the filesystem more effectively."
18460 #: ../src/guestfs-actions.pod:7422 ../fish/guestfish-actions.pod:4962
18461 msgid "You should B<not> run this program if the filesystem is mounted."
18465 #: ../src/guestfs-actions.pod:7425 ../fish/guestfish-actions.pod:4965
18467 "It is possible that using this program can damage the filesystem or data on "
18472 #: ../src/guestfs-actions.pod:7432
18473 msgid "guestfs_zfgrep"
18477 #: ../src/guestfs-actions.pod:7434
18481 " guestfs_zfgrep (guestfs_h *g,\n"
18482 " const char *pattern,\n"
18483 " const char *path);\n"
18488 #: ../src/guestfs-actions.pod:7439 ../fish/guestfish-actions.pod:4972
18490 "This calls the external C<zfgrep> program and returns the matching lines."
18494 #: ../src/guestfs-actions.pod:7451
18495 msgid "guestfs_zfgrepi"
18499 #: ../src/guestfs-actions.pod:7453
18503 " guestfs_zfgrepi (guestfs_h *g,\n"
18504 " const char *pattern,\n"
18505 " const char *path);\n"
18510 #: ../src/guestfs-actions.pod:7458 ../fish/guestfish-actions.pod:4982
18512 "This calls the external C<zfgrep -i> program and returns the matching lines."
18516 #: ../src/guestfs-actions.pod:7470
18517 msgid "guestfs_zfile"
18521 #: ../src/guestfs-actions.pod:7472
18525 " guestfs_zfile (guestfs_h *g,\n"
18526 " const char *meth,\n"
18527 " const char *path);\n"
18532 #: ../src/guestfs-actions.pod:7477 ../fish/guestfish-actions.pod:4992
18534 "This command runs C<file> after first decompressing C<path> using C<method>."
18538 #: ../src/guestfs-actions.pod:7480 ../fish/guestfish-actions.pod:4995
18539 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
18543 #: ../src/guestfs-actions.pod:7482
18545 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
18550 #: ../src/guestfs-actions.pod:7488 ../fish/guestfish-actions.pod:5000
18552 "This function is deprecated. In new code, use the C<file> call instead."
18556 #: ../src/guestfs-actions.pod:7497
18557 msgid "guestfs_zgrep"
18561 #: ../src/guestfs-actions.pod:7499
18565 " guestfs_zgrep (guestfs_h *g,\n"
18566 " const char *regex,\n"
18567 " const char *path);\n"
18572 #: ../src/guestfs-actions.pod:7504 ../fish/guestfish-actions.pod:5011
18574 "This calls the external C<zgrep> program and returns the matching lines."
18578 #: ../src/guestfs-actions.pod:7516
18579 msgid "guestfs_zgrepi"
18583 #: ../src/guestfs-actions.pod:7518
18587 " guestfs_zgrepi (guestfs_h *g,\n"
18588 " const char *regex,\n"
18589 " const char *path);\n"
18594 #: ../src/guestfs-actions.pod:7523 ../fish/guestfish-actions.pod:5021
18596 "This calls the external C<zgrep -i> program and returns the matching lines."
18600 #: ../src/guestfs-availability.pod:3
18605 #: ../src/guestfs-availability.pod:5
18607 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
18608 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
18609 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
18610 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
18611 "L</guestfs_aug_save> L</guestfs_aug_set>"
18615 #: ../src/guestfs-availability.pod:21
18620 #: ../src/guestfs-availability.pod:23
18622 "The following functions: L</guestfs_inotify_add_watch> L</"
18623 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
18624 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
18628 #: ../src/guestfs-availability.pod:31
18629 msgid "B<linuxfsuuid>"
18633 #: ../src/guestfs-availability.pod:33
18635 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
18636 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
18640 #: ../src/guestfs-availability.pod:40
18641 msgid "B<linuxmodules>"
18645 #: ../src/guestfs-availability.pod:42
18646 msgid "The following functions: L</guestfs_modprobe>"
18650 #: ../src/guestfs-availability.pod:45
18651 msgid "B<linuxxattrs>"
18655 #: ../src/guestfs-availability.pod:47
18657 "The following functions: L</guestfs_getxattr> L</guestfs_getxattrs> L</"
18658 "guestfs_lgetxattr> L</guestfs_lgetxattrs> L</guestfs_lremovexattr> L</"
18659 "guestfs_lsetxattr> L</guestfs_lxattrlist> L</guestfs_removexattr> L</"
18660 "guestfs_setxattr>"
18664 #: ../src/guestfs-availability.pod:58
18669 #: ../src/guestfs-availability.pod:60
18671 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
18672 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
18673 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
18677 #: ../src/guestfs-availability.pod:69
18682 #: ../src/guestfs-availability.pod:71
18684 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
18685 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
18686 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
18687 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
18688 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
18689 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
18690 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
18694 #: ../src/guestfs-availability.pod:94
18699 #: ../src/guestfs-availability.pod:96
18701 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
18702 "guestfs_mknod_b> L</guestfs_mknod_c>"
18706 #: ../src/guestfs-availability.pod:102
18711 #: ../src/guestfs-availability.pod:104
18712 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
18716 #: ../src/guestfs-availability.pod:107
18717 msgid "B<ntfsprogs>"
18721 #: ../src/guestfs-availability.pod:109
18723 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
18727 #: ../src/guestfs-availability.pod:113
18728 msgid "B<realpath>"
18732 #: ../src/guestfs-availability.pod:115
18733 msgid "The following functions: L</guestfs_realpath>"
18737 #: ../src/guestfs-availability.pod:118
18742 #: ../src/guestfs-availability.pod:120
18744 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
18745 "guestfs_scrub_freespace>"
18749 #: ../src/guestfs-availability.pod:125
18754 #: ../src/guestfs-availability.pod:127
18755 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
18759 #: ../src/guestfs-availability.pod:131
18764 #: ../src/guestfs-availability.pod:133
18765 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
18769 #: ../src/guestfs-availability.pod:137
18770 msgid "B<zerofree>"
18774 #: ../src/guestfs-availability.pod:139
18775 msgid "The following functions: L</guestfs_zerofree>"
18779 #: ../src/guestfs-structs.pod:1
18780 msgid "guestfs_int_bool"
18784 #: ../src/guestfs-structs.pod:3
18787 " struct guestfs_int_bool {\n"
18795 #: ../src/guestfs-structs.pod:8
18798 " struct guestfs_int_bool_list {\n"
18799 " uint32_t len; /* Number of elements in list. */\n"
18800 " struct guestfs_int_bool *val; /* Elements. */\n"
18806 #: ../src/guestfs-structs.pod:13
18809 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
18810 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
18815 #: ../src/guestfs-structs.pod:16
18816 msgid "guestfs_lvm_pv"
18820 #: ../src/guestfs-structs.pod:18
18823 " struct guestfs_lvm_pv {\n"
18824 " char *pv_name;\n"
18825 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
18826 " char pv_uuid[32];\n"
18828 " uint64_t pv_size;\n"
18829 " uint64_t dev_size;\n"
18830 " uint64_t pv_free;\n"
18831 " uint64_t pv_used;\n"
18832 " char *pv_attr;\n"
18833 " int64_t pv_pe_count;\n"
18834 " int64_t pv_pe_alloc_count;\n"
18835 " char *pv_tags;\n"
18836 " uint64_t pe_start;\n"
18837 " int64_t pv_mda_count;\n"
18838 " uint64_t pv_mda_free;\n"
18844 #: ../src/guestfs-structs.pod:36
18847 " struct guestfs_lvm_pv_list {\n"
18848 " uint32_t len; /* Number of elements in list. */\n"
18849 " struct guestfs_lvm_pv *val; /* Elements. */\n"
18855 #: ../src/guestfs-structs.pod:41
18858 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
18859 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
18864 #: ../src/guestfs-structs.pod:44
18865 msgid "guestfs_lvm_vg"
18869 #: ../src/guestfs-structs.pod:46
18872 " struct guestfs_lvm_vg {\n"
18873 " char *vg_name;\n"
18874 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
18875 " char vg_uuid[32];\n"
18877 " char *vg_attr;\n"
18878 " uint64_t vg_size;\n"
18879 " uint64_t vg_free;\n"
18880 " char *vg_sysid;\n"
18881 " uint64_t vg_extent_size;\n"
18882 " int64_t vg_extent_count;\n"
18883 " int64_t vg_free_count;\n"
18884 " int64_t max_lv;\n"
18885 " int64_t max_pv;\n"
18886 " int64_t pv_count;\n"
18887 " int64_t lv_count;\n"
18888 " int64_t snap_count;\n"
18889 " int64_t vg_seqno;\n"
18890 " char *vg_tags;\n"
18891 " int64_t vg_mda_count;\n"
18892 " uint64_t vg_mda_free;\n"
18898 #: ../src/guestfs-structs.pod:69
18901 " struct guestfs_lvm_vg_list {\n"
18902 " uint32_t len; /* Number of elements in list. */\n"
18903 " struct guestfs_lvm_vg *val; /* Elements. */\n"
18909 #: ../src/guestfs-structs.pod:74
18912 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
18913 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
18918 #: ../src/guestfs-structs.pod:77
18919 msgid "guestfs_lvm_lv"
18923 #: ../src/guestfs-structs.pod:79
18926 " struct guestfs_lvm_lv {\n"
18927 " char *lv_name;\n"
18928 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
18929 " char lv_uuid[32];\n"
18930 " char *lv_attr;\n"
18931 " int64_t lv_major;\n"
18932 " int64_t lv_minor;\n"
18933 " int64_t lv_kernel_major;\n"
18934 " int64_t lv_kernel_minor;\n"
18935 " uint64_t lv_size;\n"
18936 " int64_t seg_count;\n"
18938 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
18939 " float snap_percent;\n"
18940 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
18941 " float copy_percent;\n"
18942 " char *move_pv;\n"
18943 " char *lv_tags;\n"
18944 " char *mirror_log;\n"
18945 " char *modules;\n"
18951 #: ../src/guestfs-structs.pod:101
18954 " struct guestfs_lvm_lv_list {\n"
18955 " uint32_t len; /* Number of elements in list. */\n"
18956 " struct guestfs_lvm_lv *val; /* Elements. */\n"
18962 #: ../src/guestfs-structs.pod:106
18965 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
18966 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
18971 #: ../src/guestfs-structs.pod:111
18974 " struct guestfs_stat {\n"
18978 " int64_t nlink;\n"
18983 " int64_t blksize;\n"
18984 " int64_t blocks;\n"
18985 " int64_t atime;\n"
18986 " int64_t mtime;\n"
18987 " int64_t ctime;\n"
18993 #: ../src/guestfs-structs.pod:127
18996 " struct guestfs_stat_list {\n"
18997 " uint32_t len; /* Number of elements in list. */\n"
18998 " struct guestfs_stat *val; /* Elements. */\n"
19004 #: ../src/guestfs-structs.pod:132
19007 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
19008 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
19013 #: ../src/guestfs-structs.pod:137
19016 " struct guestfs_statvfs {\n"
19017 " int64_t bsize;\n"
19018 " int64_t frsize;\n"
19019 " int64_t blocks;\n"
19020 " int64_t bfree;\n"
19021 " int64_t bavail;\n"
19022 " int64_t files;\n"
19023 " int64_t ffree;\n"
19024 " int64_t favail;\n"
19027 " int64_t namemax;\n"
19033 #: ../src/guestfs-structs.pod:151
19036 " struct guestfs_statvfs_list {\n"
19037 " uint32_t len; /* Number of elements in list. */\n"
19038 " struct guestfs_statvfs *val; /* Elements. */\n"
19044 #: ../src/guestfs-structs.pod:156
19047 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
19048 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
19053 #: ../src/guestfs-structs.pod:159
19054 msgid "guestfs_dirent"
19058 #: ../src/guestfs-structs.pod:161
19061 " struct guestfs_dirent {\n"
19070 #: ../src/guestfs-structs.pod:167
19073 " struct guestfs_dirent_list {\n"
19074 " uint32_t len; /* Number of elements in list. */\n"
19075 " struct guestfs_dirent *val; /* Elements. */\n"
19081 #: ../src/guestfs-structs.pod:172
19084 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
19085 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
19090 #: ../src/guestfs-structs.pod:177
19093 " struct guestfs_version {\n"
19094 " int64_t major;\n"
19095 " int64_t minor;\n"
19096 " int64_t release;\n"
19103 #: ../src/guestfs-structs.pod:184
19106 " struct guestfs_version_list {\n"
19107 " uint32_t len; /* Number of elements in list. */\n"
19108 " struct guestfs_version *val; /* Elements. */\n"
19114 #: ../src/guestfs-structs.pod:189
19117 " void guestfs_free_version (struct guestfs_free_version *);\n"
19118 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
19123 #: ../src/guestfs-structs.pod:192
19124 msgid "guestfs_xattr"
19128 #: ../src/guestfs-structs.pod:194
19131 " struct guestfs_xattr {\n"
19132 " char *attrname;\n"
19133 " /* The next two fields describe a byte array. */\n"
19134 " uint32_t attrval_len;\n"
19135 " char *attrval;\n"
19141 #: ../src/guestfs-structs.pod:201
19144 " struct guestfs_xattr_list {\n"
19145 " uint32_t len; /* Number of elements in list. */\n"
19146 " struct guestfs_xattr *val; /* Elements. */\n"
19152 #: ../src/guestfs-structs.pod:206
19155 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
19156 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
19161 #: ../src/guestfs-structs.pod:209
19162 msgid "guestfs_inotify_event"
19166 #: ../src/guestfs-structs.pod:211
19169 " struct guestfs_inotify_event {\n"
19170 " int64_t in_wd;\n"
19171 " uint32_t in_mask;\n"
19172 " uint32_t in_cookie;\n"
19173 " char *in_name;\n"
19179 #: ../src/guestfs-structs.pod:218
19182 " struct guestfs_inotify_event_list {\n"
19183 " uint32_t len; /* Number of elements in list. */\n"
19184 " struct guestfs_inotify_event *val; /* Elements. */\n"
19190 #: ../src/guestfs-structs.pod:223
19193 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
19194 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
19199 #: ../src/guestfs-structs.pod:226
19200 msgid "guestfs_partition"
19204 #: ../src/guestfs-structs.pod:228
19207 " struct guestfs_partition {\n"
19208 " int32_t part_num;\n"
19209 " uint64_t part_start;\n"
19210 " uint64_t part_end;\n"
19211 " uint64_t part_size;\n"
19217 #: ../src/guestfs-structs.pod:235
19220 " struct guestfs_partition_list {\n"
19221 " uint32_t len; /* Number of elements in list. */\n"
19222 " struct guestfs_partition *val; /* Elements. */\n"
19228 #: ../src/guestfs-structs.pod:240
19231 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
19232 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
19237 #: ../src/guestfs-structs.pod:243
19238 msgid "guestfs_application"
19242 #: ../src/guestfs-structs.pod:245
19245 " struct guestfs_application {\n"
19246 " char *app_name;\n"
19247 " char *app_display_name;\n"
19248 " int32_t app_epoch;\n"
19249 " char *app_version;\n"
19250 " char *app_release;\n"
19251 " char *app_install_path;\n"
19252 " char *app_trans_path;\n"
19253 " char *app_publisher;\n"
19254 " char *app_url;\n"
19255 " char *app_source_package;\n"
19256 " char *app_summary;\n"
19257 " char *app_description;\n"
19263 #: ../src/guestfs-structs.pod:260
19266 " struct guestfs_application_list {\n"
19267 " uint32_t len; /* Number of elements in list. */\n"
19268 " struct guestfs_application *val; /* Elements. */\n"
19274 #: ../src/guestfs-structs.pod:265
19277 " void guestfs_free_application (struct guestfs_free_application *);\n"
19278 " void guestfs_free_application_list (struct guestfs_free_application_list *);\n"
19283 #: ../fish/guestfish.pod:5
19284 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
19288 #: ../fish/guestfish.pod:9
19291 " guestfish [--options] [commands]\n"
19296 #: ../fish/guestfish.pod:11
19304 #: ../fish/guestfish.pod:13
19307 " guestfish [--ro|--rw] -a disk.img\n"
19312 #: ../fish/guestfish.pod:15
19315 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
19320 #: ../fish/guestfish.pod:17
19323 " guestfish -d libvirt-domain\n"
19328 #: ../fish/guestfish.pod:19
19331 " guestfish [--ro|--rw] -a disk.img -i\n"
19336 #: ../fish/guestfish.pod:21
19339 " guestfish -d libvirt-domain -i\n"
19344 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15
19345 #: ../tools/virt-win-reg.pl:51 ../tools/virt-tar.pl:64
19350 #: ../fish/guestfish.pod:25
19352 "Using guestfish in read/write mode on live virtual machines can be "
19353 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
19354 "option to use guestfish safely if the disk image or virtual machine might be "
19359 #: ../fish/guestfish.pod:32
19361 "Guestfish is a shell and command-line tool for examining and modifying "
19362 "virtual machine filesystems. It uses libguestfs and exposes all of the "
19363 "functionality of the guestfs API, see L<guestfs(3)>."
19367 #: ../fish/guestfish.pod:36
19369 "Guestfish gives you structured access to the libguestfs API, from shell "
19370 "scripts or the command line or interactively. If you want to rescue a "
19371 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
19376 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:949
19377 #: ../fuse/guestmount.pod:39 ../tools/virt-tar.pl:50
19382 #: ../fish/guestfish.pod:43
19383 msgid "As an interactive shell"
19387 #: ../fish/guestfish.pod:45
19395 #: ../fish/guestfish.pod:47
19398 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
19399 " editing virtual machine filesystems.\n"
19404 #: ../fish/guestfish.pod:50
19407 " Type: 'help' for a list of commands\n"
19408 " 'man' to read the manual\n"
19409 " 'quit' to quit the shell\n"
19414 #: ../fish/guestfish.pod:54
19417 " ><fs> add-ro disk.img\n"
19419 " ><fs> list-filesystems\n"
19420 " /dev/sda1: ext4\n"
19421 " /dev/vg_guest/lv_root: ext4\n"
19422 " /dev/vg_guest/lv_swap: swap\n"
19423 " ><fs> mount /dev/vg_guest/lv_root /\n"
19424 " ><fs> cat /etc/fstab\n"
19426 " # Created by anaconda\n"
19433 #: ../fish/guestfish.pod:67
19434 msgid "From shell scripts"
19438 #: ../fish/guestfish.pod:69
19439 msgid "Create a new C</etc/motd> file in a guest or disk image:"
19443 #: ../fish/guestfish.pod:71
19446 " guestfish <<_EOF_\n"
19449 " mount /dev/vg_guest/lv_root /\n"
19450 " write /etc/motd \"Welcome, new users\"\n"
19456 #: ../fish/guestfish.pod:78
19457 msgid "List the LVM logical volumes in a disk image:"
19461 #: ../fish/guestfish.pod:80
19464 " guestfish -a disk.img --ro <<_EOF_\n"
19472 #: ../fish/guestfish.pod:85
19473 msgid "List all the filesystems in a disk image:"
19477 #: ../fish/guestfish.pod:87
19480 " guestfish -a disk.img --ro <<_EOF_\n"
19482 " list-filesystems\n"
19488 #: ../fish/guestfish.pod:92
19489 msgid "On one command line"
19493 #: ../fish/guestfish.pod:94
19494 msgid "Update C</etc/resolv.conf> in a guest:"
19498 #: ../fish/guestfish.pod:96
19502 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
19503 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
19508 #: ../fish/guestfish.pod:100
19509 msgid "Edit C</boot/grub/grub.conf> interactively:"
19513 #: ../fish/guestfish.pod:102
19516 " guestfish --rw --add disk.img \\\n"
19517 " --mount /dev/vg_guest/lv_root \\\n"
19518 " --mount /dev/sda1:/boot \\\n"
19519 " edit /boot/grub/grub.conf\n"
19524 #: ../fish/guestfish.pod:107
19525 msgid "Mount disks automatically"
19529 #: ../fish/guestfish.pod:109
19531 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
19535 #: ../fish/guestfish.pod:112
19538 " guestfish --ro -a disk.img -i cat /etc/group\n"
19543 #: ../fish/guestfish.pod:114
19546 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
19551 #: ../fish/guestfish.pod:116
19552 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
19556 #: ../fish/guestfish.pod:118
19559 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
19564 #: ../fish/guestfish.pod:120
19565 msgid "As a script interpreter"
19569 #: ../fish/guestfish.pod:122
19570 msgid "Create a 100MB disk containing an ext2-formatted partition:"
19574 #: ../fish/guestfish.pod:124
19577 " #!/usr/bin/guestfish -f\n"
19578 " sparse test1.img 100M\n"
19580 " part-disk /dev/sda mbr\n"
19581 " mkfs ext2 /dev/sda1\n"
19586 #: ../fish/guestfish.pod:130
19587 msgid "Start with a prepared disk"
19591 #: ../fish/guestfish.pod:132
19593 "An alternate way to create a 100MB disk called C<test1.img> containing a "
19594 "single ext2-formatted partition:"
19598 #: ../fish/guestfish.pod:135
19601 " guestfish -N fs\n"
19606 #: ../fish/guestfish.pod:137
19607 msgid "To list what is available do:"
19611 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:940
19614 " guestfish -N help | less\n"
19619 #: ../fish/guestfish.pod:141
19620 msgid "Remote control"
19624 #: ../fish/guestfish.pod:143
19627 " eval \"`guestfish --listen`\"\n"
19628 " guestfish --remote add-ro disk.img\n"
19629 " guestfish --remote run\n"
19630 " guestfish --remote lvs\n"
19635 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37
19636 #: ../fuse/guestmount.pod:73 ../tools/virt-win-reg.pl:96
19637 #: ../tools/virt-list-filesystems.pl:53 ../tools/virt-tar.pl:103
19638 #: ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:54
19643 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:133
19644 #: ../tools/virt-win-reg.pl:104 ../tools/virt-list-filesystems.pl:61
19645 #: ../tools/virt-tar.pl:111 ../tools/virt-make-fs.pl:161
19646 #: ../tools/virt-list-partitions.pl:62
19651 #: ../fish/guestfish.pod:154
19652 msgid "Displays general help on options."
19656 #: ../fish/guestfish.pod:156
19661 #: ../fish/guestfish.pod:158
19662 msgid "B<--cmd-help>"
19666 #: ../fish/guestfish.pod:160
19667 msgid "Lists all available guestfish commands."
19671 #: ../fish/guestfish.pod:162
19676 #: ../fish/guestfish.pod:164
19677 msgid "B<--cmd-help cmd>"
19681 #: ../fish/guestfish.pod:166
19682 msgid "Displays detailed help on a single command C<cmd>."
19686 #: ../fish/guestfish.pod:168
19687 msgid "B<-a image>"
19691 #: ../fish/guestfish.pod:170
19692 msgid "B<--add image>"
19696 #: ../fish/guestfish.pod:172
19697 msgid "Add a block device or virtual machine image to the shell."
19701 #: ../fish/guestfish.pod:174 ../fuse/guestmount.pod:81
19703 "The format of the disk image is auto-detected. To override this and force a "
19704 "particular format use the I<--format=..> option."
19708 #: ../fish/guestfish.pod:177
19710 "Using this flag is mostly equivalent to using the C<add> command, with "
19711 "C<readonly:true> if the I<--ro> flag was given, and with C<format:...> if "
19712 "the I<--format=...> flag was given."
19716 #: ../fish/guestfish.pod:181
19721 #: ../fish/guestfish.pod:183
19722 msgid "B<--connect URI>"
19726 #: ../fish/guestfish.pod:185 ../fuse/guestmount.pod:86
19728 "When used in conjunction with the I<-d> option, this specifies the libvirt "
19729 "URI to use. The default is to use the default libvirt connection."
19733 #: ../fish/guestfish.pod:189
19738 #: ../fish/guestfish.pod:191
19740 "If using the I<--listen> option and a csh-like shell, use this option. See "
19741 "section L</REMOTE CONTROL AND CSH> below."
19745 #: ../fish/guestfish.pod:194
19746 msgid "B<-d libvirt-domain>"
19750 #: ../fish/guestfish.pod:196
19751 msgid "B<--domain libvirt-domain>"
19755 #: ../fish/guestfish.pod:198 ../fuse/guestmount.pod:92
19757 "Add disks from the named libvirt domain. If the I<--ro> option is also "
19758 "used, then any libvirt domain can be used. However in write mode, only "
19759 "libvirt domains which are shut down can be named here."
19763 #: ../fish/guestfish.pod:202 ../fuse/guestmount.pod:96
19764 msgid "Domain UUIDs can be used instead of names."
19768 #: ../fish/guestfish.pod:204
19770 "Using this flag is mostly equivalent to using the C<add-domain> command, "
19771 "with C<readonly:true> if the I<--ro> flag was given, and with C<format:...> "
19772 "if the I<--format:...> flag was given."
19776 #: ../fish/guestfish.pod:208
19781 #: ../fish/guestfish.pod:210
19782 msgid "B<--no-dest-paths>"
19786 #: ../fish/guestfish.pod:212
19788 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
19789 "to hit the tab key to complete paths on the guest filesystem, but this "
19790 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
19791 "allow this feature to be disabled."
19795 #: ../fish/guestfish.pod:217 ../fuse/guestmount.pod:110
19796 msgid "B<--echo-keys>"
19800 #: ../fish/guestfish.pod:219 ../fuse/guestmount.pod:112
19802 "When prompting for keys and passphrases, guestfish normally turns echoing "
19803 "off so you cannot see what you are typing. If you are not worried about "
19804 "Tempest attacks and there is no one else in the room you can specify this "
19805 "flag to see what you are typing."
19809 #: ../fish/guestfish.pod:224
19814 #: ../fish/guestfish.pod:226
19815 msgid "B<--file file>"
19819 #: ../fish/guestfish.pod:228
19820 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
19824 #: ../fish/guestfish.pod:231
19827 " #!/usr/bin/guestfish -f\n"
19832 #: ../fish/guestfish.pod:233
19833 msgid "B<--format=raw|qcow2|..>"
19837 #: ../fish/guestfish.pod:235
19838 msgid "B<--format>"
19842 #: ../fish/guestfish.pod:237 ../fuse/guestmount.pod:119
19844 "The default for the I<-a> option is to auto-detect the format of the disk "
19845 "image. Using this forces the disk format for I<-a> options which follow on "
19846 "the command line. Using I<--format> with no argument switches back to auto-"
19847 "detection for subsequent I<-a> options."
19851 #: ../fish/guestfish.pod:244
19854 " guestfish --format=raw -a disk.img\n"
19859 #: ../fish/guestfish.pod:246
19860 msgid "forces raw format (no auto-detection) for C<disk.img>."
19864 #: ../fish/guestfish.pod:248
19867 " guestfish --format=raw -a disk.img --format -a another.img\n"
19872 #: ../fish/guestfish.pod:250
19874 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
19875 "detection for C<another.img>."
19879 #: ../fish/guestfish.pod:253
19881 "If you have untrusted raw-format guest disk images, you should use this "
19882 "option to specify the disk format. This avoids a possible security problem "
19883 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
19887 #: ../fish/guestfish.pod:258
19892 #: ../fish/guestfish.pod:260
19893 msgid "B<--inspector>"
19897 #: ../fish/guestfish.pod:262 ../fuse/guestmount.pod:139
19899 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
19900 "system and mount filesystems as they would be mounted on the real virtual "
19905 #: ../fish/guestfish.pod:266
19906 msgid "Typical usage is either:"
19910 #: ../fish/guestfish.pod:268
19913 " guestfish -d myguest -i\n"
19918 #: ../fish/guestfish.pod:270
19919 msgid "(for an inactive libvirt domain called I<myguest>), or:"
19923 #: ../fish/guestfish.pod:272
19926 " guestfish --ro -d myguest -i\n"
19931 #: ../fish/guestfish.pod:274
19932 msgid "(for active domains, readonly), or specify the block device directly:"
19936 #: ../fish/guestfish.pod:276
19939 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
19944 #: ../fish/guestfish.pod:278
19946 "Note that the command line syntax changed slightly over older versions of "
19947 "guestfish. You can still use the old syntax:"
19951 #: ../fish/guestfish.pod:281
19954 " guestfish [--ro] -i disk.img\n"
19959 #: ../fish/guestfish.pod:283
19962 " guestfish [--ro] -i libvirt-domain\n"
19967 #: ../fish/guestfish.pod:285
19969 "Using this flag is mostly equivalent to using the C<inspect-os> command and "
19970 "then using other commands to mount the filesystems that were found."
19974 #: ../fish/guestfish.pod:289 ../fuse/guestmount.pod:143
19975 msgid "B<--keys-from-stdin>"
19979 #: ../fish/guestfish.pod:291 ../fuse/guestmount.pod:145
19981 "Read key or passphrase parameters from stdin. The default is to try to read "
19982 "passphrases from the user by opening C</dev/tty>."
19986 #: ../fish/guestfish.pod:294
19987 msgid "B<--listen>"
19991 #: ../fish/guestfish.pod:296
19993 "Fork into the background and listen for remote commands. See section L</"
19994 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
19998 #: ../fish/guestfish.pod:299 ../fuse/guestmount.pod:148
20003 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:150
20005 "Connect to a live virtual machine. (Experimental, see L<guestfs(3)/"
20006 "ATTACHING TO RUNNING DAEMONS>)."
20010 #: ../fish/guestfish.pod:304 ../fuse/guestmount.pod:153
20011 msgid "B<-m dev[:mountpoint[:options]]>"
20015 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:155
20016 msgid "B<--mount dev[:mountpoint[:options]]>"
20020 #: ../fish/guestfish.pod:308
20021 msgid "Mount the named partition or logical volume on the given mountpoint."
20025 #: ../fish/guestfish.pod:310
20026 msgid "If the mountpoint is omitted, it defaults to C</>."
20030 #: ../fish/guestfish.pod:312
20031 msgid "You have to mount something on C</> before most commands will work."
20035 #: ../fish/guestfish.pod:314
20037 "If any I<-m> or I<--mount> options are given, the guest is automatically "
20042 #: ../fish/guestfish.pod:317
20044 "If you don't know what filesystems a disk image contains, you can either run "
20045 "guestfish without this option, then list the partitions, filesystems and LVs "
20046 "available (see L</list-partitions>, L</list-filesystems> and L</lvs> "
20047 "commands), or you can use the L<virt-filesystems(1)> program."
20051 #: ../fish/guestfish.pod:323 ../fuse/guestmount.pod:163
20053 "The third (and rarely used) part of the mount parameter is the list of mount "
20054 "options used to mount the underlying filesystem. If this is not given, then "
20055 "the mount options are either the empty string or C<ro> (the latter if the "
20056 "I<--ro> flag is used). By specifying the mount options, you override this "
20057 "default choice. Probably the only time you would use this is to enable ACLs "
20058 "and/or extended attributes if the filesystem can support them:"
20062 #: ../fish/guestfish.pod:331 ../fuse/guestmount.pod:171
20065 " -m /dev/sda1:/:acl,user_xattr\n"
20070 #: ../fish/guestfish.pod:333
20071 msgid "Using this flag is equivalent to using the C<mount-options> command."
20075 #: ../fish/guestfish.pod:335
20080 #: ../fish/guestfish.pod:337
20081 msgid "B<--no-sync>"
20085 #: ../fish/guestfish.pod:339
20087 "Disable autosync. This is enabled by default. See the discussion of "
20088 "autosync in the L<guestfs(3)> manpage."
20092 #: ../fish/guestfish.pod:342
20097 #: ../fish/guestfish.pod:344
20098 msgid "B<--new type>"
20102 #: ../fish/guestfish.pod:346
20107 #: ../fish/guestfish.pod:348
20109 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
20110 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
20111 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
20116 #: ../fish/guestfish.pod:353
20117 msgid "B<--progress-bars>"
20121 #: ../fish/guestfish.pod:355
20122 msgid "Enable progress bars, even when guestfish is used non-interactively."
20126 #: ../fish/guestfish.pod:357
20128 "Progress bars are enabled by default when guestfish is used as an "
20129 "interactive shell."
20133 #: ../fish/guestfish.pod:360
20134 msgid "B<--no-progress-bars>"
20138 #: ../fish/guestfish.pod:362
20139 msgid "Disable progress bars."
20143 #: ../fish/guestfish.pod:364
20144 msgid "B<--remote[=pid]>"
20148 #: ../fish/guestfish.pod:366
20150 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
20151 "CONTROL GUESTFISH OVER A SOCKET> below."
20155 #: ../fish/guestfish.pod:369
20160 #: ../fish/guestfish.pod:371
20165 #: ../fish/guestfish.pod:373
20167 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
20168 "mounts are done read-only."
20172 #: ../fish/guestfish.pod:376
20174 "The option must always be used if the disk image or virtual machine might be "
20175 "running, and is generally recommended in cases where you don't need write "
20176 "access to the disk."
20180 #: ../fish/guestfish.pod:380
20182 "Note that prepared disk images created with I<-N> are not affected by this "
20183 "option. Also commands like C<add> are not affected - you have to specify "
20184 "the C<readonly:true> option explicitly if you need it."
20188 #: ../fish/guestfish.pod:384
20189 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
20193 #: ../fish/guestfish.pod:386 ../fuse/guestmount.pod:227
20194 msgid "B<--selinux>"
20198 #: ../fish/guestfish.pod:388
20199 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
20203 #: ../fish/guestfish.pod:390
20208 #: ../fish/guestfish.pod:392
20209 msgid "B<--verbose>"
20213 #: ../fish/guestfish.pod:394
20215 "Enable very verbose messages. This is particularly useful if you find a bug."
20219 #: ../fish/guestfish.pod:397
20224 #: ../fish/guestfish.pod:399 ../tools/virt-win-reg.pl:112
20225 #: ../tools/virt-list-filesystems.pl:69 ../tools/virt-tar.pl:119
20226 #: ../tools/virt-make-fs.pl:169 ../tools/virt-list-partitions.pl:70
20227 msgid "B<--version>"
20231 #: ../fish/guestfish.pod:401
20232 msgid "Display the guestfish / libguestfs version number and exit."
20236 #: ../fish/guestfish.pod:403
20241 #: ../fish/guestfish.pod:405
20246 #: ../fish/guestfish.pod:407 ../fuse/guestmount.pod:241
20248 "This changes the I<-a>, I<-d> and I<-m> options so that disks are added and "
20249 "mounts are done read-write."
20253 #: ../fish/guestfish.pod:410
20254 msgid "See L</OPENING DISKS FOR READ AND WRITE> below."
20258 #: ../fish/guestfish.pod:412
20263 #: ../fish/guestfish.pod:414
20264 msgid "Echo each command before executing it."
20268 #: ../fish/guestfish.pod:418
20269 msgid "COMMANDS ON COMMAND LINE"
20273 #: ../fish/guestfish.pod:420
20275 "Any additional (non-option) arguments are treated as commands to execute."
20279 #: ../fish/guestfish.pod:423
20281 "Commands to execute should be separated by a colon (C<:>), where the colon "
20282 "is a separate parameter. Thus:"
20286 #: ../fish/guestfish.pod:426
20289 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
20294 #: ../fish/guestfish.pod:428
20296 "If there are no additional arguments, then we enter a shell, either an "
20297 "interactive shell with a prompt (if the input is a terminal) or a non-"
20298 "interactive shell."
20302 #: ../fish/guestfish.pod:432
20304 "In either command line mode or non-interactive shell, the first command that "
20305 "gives an error causes the whole shell to exit. In interactive mode (with a "
20306 "prompt) if a command fails, you can continue to enter commands."
20310 #: ../fish/guestfish.pod:437
20311 msgid "USING launch (OR run)"
20315 #: ../fish/guestfish.pod:439
20317 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
20318 "then launch it, then mount any disks you need, and finally issue actions/"
20319 "commands. So the general order of the day is:"
20323 #: ../fish/guestfish.pod:447
20324 msgid "add or -a/--add"
20328 #: ../fish/guestfish.pod:451
20329 msgid "launch (aka run)"
20333 #: ../fish/guestfish.pod:455
20334 msgid "mount or -m/--mount"
20338 #: ../fish/guestfish.pod:459
20339 msgid "any other commands"
20343 #: ../fish/guestfish.pod:463
20345 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
20346 "guest before mounting or performing any other commands."
20350 #: ../fish/guestfish.pod:466
20352 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
20353 "I<--new> options were given then C<run> is done automatically, simply "
20354 "because guestfish can't perform the action you asked for without doing this."
20358 #: ../fish/guestfish.pod:471
20359 msgid "OPENING DISKS FOR READ AND WRITE"
20363 #: ../fish/guestfish.pod:473
20365 "The guestfish, L<guestmount(1)> and L<virt-rescue(1)> options I<--ro> and "
20366 "I<--rw> affect whether the other command line options I<-a>, I<-c>, I<-d>, "
20367 "I<-i> and I<-m> open disk images read-only or for writing."
20371 #: ../fish/guestfish.pod:478
20373 "In libguestfs E<le> 1.10, guestfish, guestmount and virt-rescue defaulted to "
20374 "opening disk images supplied on the command line for write. To open a disk "
20375 "image read-only you have to do I<-a image --ro>."
20379 #: ../fish/guestfish.pod:482
20381 "This matters: If you accidentally open a live VM disk image writable then "
20382 "you will cause irreversible disk corruption."
20386 #: ../fish/guestfish.pod:485
20388 "By libguestfs 1.12 we intend to change the default the other way. Disk "
20389 "images will be opened read-only. You will have to either specify "
20390 "I<guestfish --rw>, I<guestmount --rw>, I<virt-rescue --rw>, or change the "
20391 "configuration file C</etc/libguestfs-tools.conf> in order to get write "
20392 "access for disk images specified by those other command line options."
20396 #: ../fish/guestfish.pod:492
20398 "This version of guestfish, guestmount and virt-rescue has a I<--rw> option "
20399 "which does nothing (it is already the default). However it is highly "
20400 "recommended that you use this option to indicate that you need write access, "
20401 "and prepare your scripts for the day when this option will be required for "
20406 #: ../fish/guestfish.pod:498
20408 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
20409 "other libguestfs program apart from guestfish and guestmount."
20413 #: ../fish/guestfish.pod:501
20418 #: ../fish/guestfish.pod:503
20420 "You can quote ordinary parameters using either single or double quotes. For "
20425 #: ../fish/guestfish.pod:506
20428 " add \"file with a space.img\"\n"
20433 #: ../fish/guestfish.pod:508
20436 " rm '/file name'\n"
20441 #: ../fish/guestfish.pod:510
20449 #: ../fish/guestfish.pod:512
20451 "A few commands require a list of strings to be passed. For these, use a "
20452 "whitespace-separated list, enclosed in quotes. Strings containing "
20453 "whitespace to be passed through must be enclosed in single quotes. A "
20454 "literal single quote must be escaped with a backslash."
20458 #: ../fish/guestfish.pod:517
20461 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
20462 " command \"/bin/echo 'foo bar'\"\n"
20463 " command \"/bin/echo \\'foo\\'\"\n"
20468 #: ../fish/guestfish.pod:521
20469 msgid "OPTIONAL ARGUMENTS"
20473 #: ../fish/guestfish.pod:523
20475 "Some commands take optional arguments. These arguments appear in this "
20476 "documentation as C<[argname:..]>. You can use them as in these examples:"
20480 #: ../fish/guestfish.pod:527
20483 " add-drive-opts filename\n"
20488 #: ../fish/guestfish.pod:529
20491 " add-drive-opts filename readonly:true\n"
20496 #: ../fish/guestfish.pod:531
20499 " add-drive-opts filename format:qcow2 readonly:false\n"
20504 #: ../fish/guestfish.pod:533
20506 "Each optional argument can appear at most once. All optional arguments must "
20507 "appear after the required ones."
20511 #: ../fish/guestfish.pod:536
20516 #: ../fish/guestfish.pod:538
20518 "This section applies to all commands which can take integers as parameters."
20522 #: ../fish/guestfish.pod:541
20523 msgid "SIZE SUFFIX"
20527 #: ../fish/guestfish.pod:543
20529 "When the command takes a parameter measured in bytes, you can use one of the "
20530 "following suffixes to specify kilobytes, megabytes and larger sizes:"
20534 #: ../fish/guestfish.pod:549
20535 msgid "B<k> or B<K> or B<KiB>"
20539 #: ../fish/guestfish.pod:551
20540 msgid "The size in kilobytes (multiplied by 1024)."
20544 #: ../fish/guestfish.pod:553
20549 #: ../fish/guestfish.pod:555
20550 msgid "The size in SI 1000 byte units."
20554 #: ../fish/guestfish.pod:557
20555 msgid "B<M> or B<MiB>"
20559 #: ../fish/guestfish.pod:559
20560 msgid "The size in megabytes (multiplied by 1048576)."
20564 #: ../fish/guestfish.pod:561
20569 #: ../fish/guestfish.pod:563
20570 msgid "The size in SI 1000000 byte units."
20574 #: ../fish/guestfish.pod:565
20575 msgid "B<G> or B<GiB>"
20579 #: ../fish/guestfish.pod:567
20580 msgid "The size in gigabytes (multiplied by 2**30)."
20584 #: ../fish/guestfish.pod:569
20589 #: ../fish/guestfish.pod:571
20590 msgid "The size in SI 10**9 byte units."
20594 #: ../fish/guestfish.pod:573
20595 msgid "B<T> or B<TiB>"
20599 #: ../fish/guestfish.pod:575
20600 msgid "The size in terabytes (multiplied by 2**40)."
20604 #: ../fish/guestfish.pod:577
20609 #: ../fish/guestfish.pod:579
20610 msgid "The size in SI 10**12 byte units."
20614 #: ../fish/guestfish.pod:581
20615 msgid "B<P> or B<PiB>"
20619 #: ../fish/guestfish.pod:583
20620 msgid "The size in petabytes (multiplied by 2**50)."
20624 #: ../fish/guestfish.pod:585
20629 #: ../fish/guestfish.pod:587
20630 msgid "The size in SI 10**15 byte units."
20634 #: ../fish/guestfish.pod:589
20635 msgid "B<E> or B<EiB>"
20639 #: ../fish/guestfish.pod:591
20640 msgid "The size in exabytes (multiplied by 2**60)."
20644 #: ../fish/guestfish.pod:593
20649 #: ../fish/guestfish.pod:595
20650 msgid "The size in SI 10**18 byte units."
20654 #: ../fish/guestfish.pod:597
20655 msgid "B<Z> or B<ZiB>"
20659 #: ../fish/guestfish.pod:599
20660 msgid "The size in zettabytes (multiplied by 2**70)."
20664 #: ../fish/guestfish.pod:601
20669 #: ../fish/guestfish.pod:603
20670 msgid "The size in SI 10**21 byte units."
20674 #: ../fish/guestfish.pod:605
20675 msgid "B<Y> or B<YiB>"
20679 #: ../fish/guestfish.pod:607
20680 msgid "The size in yottabytes (multiplied by 2**80)."
20684 #: ../fish/guestfish.pod:609
20689 #: ../fish/guestfish.pod:611
20690 msgid "The size in SI 10**24 byte units."
20694 #: ../fish/guestfish.pod:617
20697 " truncate-size /file 1G\n"
20702 #: ../fish/guestfish.pod:619
20703 msgid "would truncate the file to 1 gigabyte."
20707 #: ../fish/guestfish.pod:621
20709 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
20710 "the parameter to L</memsize> is specified in megabytes already). Adding a "
20711 "suffix will probably not do what you expect."
20715 #: ../fish/guestfish.pod:625
20716 msgid "OCTAL AND HEXADECIMAL NUMBERS"
20720 #: ../fish/guestfish.pod:627
20722 "For specifying the radix (base) use the C convention: C<0> to prefix an "
20723 "octal number or C<0x> to prefix a hexadecimal number. For example:"
20727 #: ../fish/guestfish.pod:630
20730 " 1234 decimal number 1234\n"
20731 " 02322 octal number, equivalent to decimal 1234\n"
20732 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
20737 #: ../fish/guestfish.pod:634
20739 "When using the C<chmod> command, you almost always want to specify an octal "
20740 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
20741 "L<chmod(1)> program):"
20745 #: ../fish/guestfish.pod:638
20748 " chmod 0777 /public # OK\n"
20749 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
20754 #: ../fish/guestfish.pod:641
20756 "Commands that return numbers usually print them in decimal, but some "
20757 "commands print numbers in other radices (eg. C<umask> prints the mode in "
20758 "octal, preceeded by C<0>)."
20762 #: ../fish/guestfish.pod:645
20763 msgid "WILDCARDS AND GLOBBING"
20767 #: ../fish/guestfish.pod:647
20769 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
20770 "(globbing) by default. So for example the following will not do what you "
20775 #: ../fish/guestfish.pod:651
20783 #: ../fish/guestfish.pod:653
20785 "Assuming you don't have a directory called literally C</home/*> then the "
20786 "above command will return an error."
20790 #: ../fish/guestfish.pod:656
20791 msgid "To perform wildcard expansion, use the C<glob> command."
20795 #: ../fish/guestfish.pod:658
20798 " glob rm-rf /home/*\n"
20803 #: ../fish/guestfish.pod:660
20805 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
20806 "many times), equivalent to:"
20810 #: ../fish/guestfish.pod:663
20813 " rm-rf /home/jim\n"
20814 " rm-rf /home/joe\n"
20815 " rm-rf /home/mary\n"
20820 #: ../fish/guestfish.pod:667
20821 msgid "C<glob> only works on simple guest paths and not on device names."
20825 #: ../fish/guestfish.pod:669
20827 "If you have several parameters, each containing a wildcard, then glob will "
20828 "perform a Cartesian product."
20832 #: ../fish/guestfish.pod:672
20837 #: ../fish/guestfish.pod:674
20839 "Any line which starts with a I<#> character is treated as a comment and "
20840 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
20841 "a command. For example:"
20845 #: ../fish/guestfish.pod:678
20848 " # this is a comment\n"
20849 " # this is a comment\n"
20850 " foo # NOT a comment\n"
20855 #: ../fish/guestfish.pod:682
20856 msgid "Blank lines are also ignored."
20860 #: ../fish/guestfish.pod:684
20861 msgid "RUNNING COMMANDS LOCALLY"
20865 #: ../fish/guestfish.pod:686
20867 "Any line which starts with a I<!> character is treated as a command sent to "
20868 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
20872 #: ../fish/guestfish.pod:690
20876 " tgz-out /remote local/remote-data.tar.gz\n"
20881 #: ../fish/guestfish.pod:693
20883 "will create a directory C<local> on the host, and then export the contents "
20884 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
20885 "(See C<tgz-out>)."
20889 #: ../fish/guestfish.pod:697
20891 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
20892 "effect, due to the way that subprocesses work in Unix."
20896 #: ../fish/guestfish.pod:700
20897 msgid "LOCAL COMMANDS WITH INLINE EXECUTION"
20901 #: ../fish/guestfish.pod:702
20903 "If a line starts with I<E<lt>!> then the shell command is executed (as for "
20904 "I<!>), but subsequently any output (stdout) of the shell command is parsed "
20905 "and executed as guestfish commands."
20909 #: ../fish/guestfish.pod:706
20911 "Thus you can use shell script to construct arbitrary guestfish commands "
20912 "which are then parsed by guestfish."
20916 #: ../fish/guestfish.pod:709
20918 "For example it is tedious to create a sequence of files (eg. C</foo.1> "
20919 "through C</foo.100>) using guestfish commands alone. However this is simple "
20920 "if we use a shell script to create the guestfish commands for us:"
20924 #: ../fish/guestfish.pod:714
20927 " <! for n in `seq 1 100`; do echo write /foo.$n $n; done\n"
20932 #: ../fish/guestfish.pod:716
20933 msgid "or with names like C</foo.001>:"
20937 #: ../fish/guestfish.pod:718
20940 " <! for n in `seq 1 100`; do printf \"write /foo.%03d %d\\n\" $n $n; done\n"
20945 #: ../fish/guestfish.pod:720
20947 "When using guestfish interactively it can be helpful to just run the shell "
20948 "script first (ie. remove the initial C<E<lt>> character so it is just an "
20949 "ordinary I<!> local command), see what guestfish commands it would run, and "
20950 "when you are happy with those prepend the C<E<lt>> character to run the "
20951 "guestfish commands for real."
20955 #: ../fish/guestfish.pod:726
20960 #: ../fish/guestfish.pod:728
20962 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
20963 "command (a guestfish command) to the second command (any host command). For "
20968 #: ../fish/guestfish.pod:732
20971 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
20976 #: ../fish/guestfish.pod:734
20978 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
20979 "program). The above command would list all accounts in the guest filesystem "
20980 "which have UID 0, ie. root accounts including backdoors. Other examples:"
20984 #: ../fish/guestfish.pod:739
20987 " hexdump /bin/ls | head\n"
20988 " list-devices | tail -1\n"
20989 " tgz-out / - | tar ztf -\n"
20994 #: ../fish/guestfish.pod:743
20996 "The space before the pipe symbol is required, any space after the pipe "
20997 "symbol is optional. Everything after the pipe symbol is just passed "
20998 "straight to the host shell, so it can contain redirections, globs and "
20999 "anything else that makes sense on the host side."
21003 #: ../fish/guestfish.pod:748
21005 "To use a literal argument which begins with a pipe symbol, you have to quote "
21010 #: ../fish/guestfish.pod:751
21018 #: ../fish/guestfish.pod:753
21019 msgid "HOME DIRECTORIES"
21023 #: ../fish/guestfish.pod:755
21025 "If a parameter starts with the character C<~> then the tilde may be expanded "
21026 "as a home directory path (either C<~> for the current user's home directory, "
21027 "or C<~user> for another user)."
21031 #: ../fish/guestfish.pod:759
21033 "Note that home directory expansion happens for users known I<on the host>, "
21034 "not in the guest filesystem."
21038 #: ../fish/guestfish.pod:762
21040 "To use a literal argument which begins with a tilde, you have to quote it, "
21045 #: ../fish/guestfish.pod:765
21053 #: ../fish/guestfish.pod:769
21055 "Libguestfs has some support for Linux guests encrypted according to the "
21056 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
21057 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
21058 "LUKS is supported."
21062 #: ../fish/guestfish.pod:774
21063 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
21067 #: ../fish/guestfish.pod:776
21070 " ><fs> vfs-type /dev/sda2\n"
21076 #: ../fish/guestfish.pod:779
21078 "Then open those devices using L</luks-open>. This creates a device-mapper "
21079 "device called C</dev/mapper/luksdev>."
21083 #: ../fish/guestfish.pod:782
21086 " ><fs> luks-open /dev/sda2 luksdev\n"
21087 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
21092 #: ../fish/guestfish.pod:785
21094 "Finally you have to tell LVM to scan for volume groups on the newly created "
21099 #: ../fish/guestfish.pod:788
21103 " vg-activate-all true\n"
21108 #: ../fish/guestfish.pod:791
21109 msgid "The logical volume(s) can now be mounted in the usual way."
21113 #: ../fish/guestfish.pod:793
21115 "Before closing a LUKS device you must unmount any logical volumes on it and "
21116 "deactivate the volume groups by calling C<vg-activate false VG> on each "
21117 "one. Then you can close the mapper device:"
21121 #: ../fish/guestfish.pod:797
21124 " vg-activate false /dev/VG\n"
21125 " luks-close /dev/mapper/luksdev\n"
21130 #: ../fish/guestfish.pod:800
21131 msgid "WINDOWS PATHS"
21135 #: ../fish/guestfish.pod:802
21137 "If a path is prefixed with C<win:> then you can use Windows-style drive "
21138 "letters and paths (with some limitations). The following commands are "
21143 #: ../fish/guestfish.pod:806
21146 " file /WINDOWS/system32/config/system.LOG\n"
21151 #: ../fish/guestfish.pod:808
21154 " file win:\\windows\\system32\\config\\system.log\n"
21159 #: ../fish/guestfish.pod:810
21162 " file WIN:C:\\Windows\\SYSTEM32\\CONFIG\\SYSTEM.LOG\n"
21167 #: ../fish/guestfish.pod:812
21169 "The parameter is rewritten \"behind the scenes\" by looking up the position "
21170 "where the drive is mounted, prepending that to the path, changing all "
21171 "backslash characters to forward slash, then resolving the result using L</"
21172 "case-sensitive-path>. For example if the E: drive was mounted on C</e> then "
21173 "the parameter might be rewritten like this:"
21177 #: ../fish/guestfish.pod:818
21180 " win:e:\\foo\\bar => /e/FOO/bar\n"
21185 #: ../fish/guestfish.pod:820
21186 msgid "This only works in argument positions that expect a path."
21190 #: ../fish/guestfish.pod:822
21191 msgid "UPLOADING AND DOWNLOADING FILES"
21195 #: ../fish/guestfish.pod:824
21197 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
21198 "others which upload from or download to a local file, you can use the "
21199 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
21203 #: ../fish/guestfish.pod:828
21211 #: ../fish/guestfish.pod:830
21213 "reads stdin and creates from that a file C</foo> in the disk image, and:"
21217 #: ../fish/guestfish.pod:833
21220 " tar-out /etc - | tar tf -\n"
21225 #: ../fish/guestfish.pod:835
21227 "writes the tarball to stdout and then pipes that into the external \"tar\" "
21228 "command (see L</PIPES>)."
21232 #: ../fish/guestfish.pod:838
21234 "When using C<-> to read from stdin, the input is read up to the end of "
21235 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
21236 "some arbitrary end marker:"
21240 #: ../fish/guestfish.pod:842
21243 " upload -<<END /foo\n"
21252 #: ../fish/guestfish.pod:848
21254 "Any string of characters can be used instead of C<END>. The end marker must "
21255 "appear on a line of its own, without any preceeding or following characters "
21256 "(not even spaces)."
21260 #: ../fish/guestfish.pod:852
21262 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
21263 "upload local files (so-called \"FileIn\" parameters in the generator)."
21267 #: ../fish/guestfish.pod:855
21268 msgid "EXIT ON ERROR BEHAVIOUR"
21272 #: ../fish/guestfish.pod:857
21274 "By default, guestfish will ignore any errors when in interactive mode (ie. "
21275 "taking commands from a human over a tty), and will exit on the first error "
21276 "in non-interactive mode (scripts, commands given on the command line)."
21280 #: ../fish/guestfish.pod:862
21282 "If you prefix a command with a I<-> character, then that command will not "
21283 "cause guestfish to exit, even if that (one) command returns an error."
21287 #: ../fish/guestfish.pod:866
21288 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
21292 #: ../fish/guestfish.pod:868
21294 "Guestfish can be remote-controlled over a socket. This is useful "
21295 "particularly in shell scripts where you want to make several different "
21296 "changes to a filesystem, but you don't want the overhead of starting up a "
21297 "guestfish process each time."
21301 #: ../fish/guestfish.pod:873
21302 msgid "Start a guestfish server process using:"
21306 #: ../fish/guestfish.pod:875
21309 " eval \"`guestfish --listen`\"\n"
21314 #: ../fish/guestfish.pod:877
21315 msgid "and then send it commands by doing:"
21319 #: ../fish/guestfish.pod:879
21322 " guestfish --remote cmd [...]\n"
21327 #: ../fish/guestfish.pod:881
21328 msgid "To cause the server to exit, send it the exit command:"
21332 #: ../fish/guestfish.pod:883
21335 " guestfish --remote exit\n"
21340 #: ../fish/guestfish.pod:885
21342 "Note that the server will normally exit if there is an error in a command. "
21343 "You can change this in the usual way. See section L</EXIT ON ERROR "
21348 #: ../fish/guestfish.pod:889
21349 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
21353 #: ../fish/guestfish.pod:891
21355 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
21356 "is how the I<--remote> option knows where to send the commands. You can "
21357 "have several guestfish listener processes running using:"
21361 #: ../fish/guestfish.pod:895
21364 " eval \"`guestfish --listen`\"\n"
21365 " pid1=$GUESTFISH_PID\n"
21366 " eval \"`guestfish --listen`\"\n"
21367 " pid2=$GUESTFISH_PID\n"
21369 " guestfish --remote=$pid1 cmd\n"
21370 " guestfish --remote=$pid2 cmd\n"
21375 #: ../fish/guestfish.pod:903
21376 msgid "REMOTE CONTROL AND CSH"
21380 #: ../fish/guestfish.pod:905
21382 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
21387 #: ../fish/guestfish.pod:908
21390 " eval \"`guestfish --listen --csh`\"\n"
21395 #: ../fish/guestfish.pod:910
21396 msgid "REMOTE CONTROL DETAILS"
21400 #: ../fish/guestfish.pod:912
21402 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
21403 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
21404 "and C<$PID> is the process ID of the server."
21408 #: ../fish/guestfish.pod:916
21409 msgid "Guestfish client and server versions must match exactly."
21413 #: ../fish/guestfish.pod:918
21414 msgid "PREPARED DISK IMAGES"
21418 #: ../fish/guestfish.pod:920
21420 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
21421 "preformatted disk images that guestfish can make for you to save typing. "
21422 "This is particularly useful for testing purposes. This option is used "
21423 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
21424 "can be mixed with I<-a>)."
21428 #: ../fish/guestfish.pod:926
21430 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
21431 "the second and so on. Existing files in the current directory are "
21436 #: ../fish/guestfish.pod:930
21438 "The type briefly describes how the disk should be sized, partitioned, how "
21439 "filesystem(s) should be created, and how content should be added. "
21440 "Optionally the type can be followed by extra parameters, separated by C<:> "
21441 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
21442 "allocated disk, containing a single partition, with the partition formatted "
21443 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
21448 #: ../fish/guestfish.pod:938
21449 msgid "To list the available types and any extra parameters they take, run:"
21453 #: ../fish/guestfish.pod:942
21455 "Note that the prepared filesystem is not mounted. You would usually have to "
21456 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
21460 #: ../fish/guestfish.pod:946
21462 "If any I<-N> or I<--new> options are given, the guest is automatically "
21467 #: ../fish/guestfish.pod:951
21468 msgid "Create a 100MB disk with an ext4-formatted partition:"
21472 #: ../fish/guestfish.pod:953
21475 " guestfish -N fs:ext4\n"
21480 #: ../fish/guestfish.pod:955
21481 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
21485 #: ../fish/guestfish.pod:957
21488 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
21493 #: ../fish/guestfish.pod:959
21494 msgid "Create a blank 200MB disk:"
21498 #: ../fish/guestfish.pod:961
21501 " guestfish -N disk:200M\n"
21506 #: ../fish/guestfish.pod:963
21507 msgid "PROGRESS BARS"
21511 #: ../fish/guestfish.pod:965
21513 "Some (not all) long-running commands send progress notification messages as "
21514 "they are running. Guestfish turns these messages into progress bars."
21518 #: ../fish/guestfish.pod:969
21520 "When a command that supports progress bars takes longer than two seconds to "
21521 "run, and if progress bars are enabled, then you will see one appearing below "
21526 #: ../fish/guestfish.pod:973
21529 " ><fs> copy-size /large-file /another-file 2048M\n"
21530 " / 10% [#####-----------------------------------------] 00:30\n"
21535 #: ../fish/guestfish.pod:976
21537 "The spinner on the left hand side moves round once for every progress "
21538 "notification received from the backend. This is a (reasonably) golden "
21539 "assurance that the command is \"doing something\" even if the progress bar "
21540 "is not moving, because the command is able to send the progress "
21541 "notifications. When the bar reaches 100% and the command finishes, the "
21542 "spinner disappears."
21546 #: ../fish/guestfish.pod:983
21548 "Progress bars are enabled by default when guestfish is used interactively. "
21549 "You can enable them even for non-interactive modes using I<--progress-bars>, "
21550 "and you can disable them completely using I<--no-progress-bars>."
21554 #: ../fish/guestfish.pod:988
21555 msgid "GUESTFISH COMMANDS"
21559 #: ../fish/guestfish.pod:990
21561 "The commands in this section are guestfish convenience commands, in other "
21562 "words, they are not part of the L<guestfs(3)> API."
21566 #: ../fish/guestfish.pod:993
21571 #: ../fish/guestfish.pod:995
21580 #: ../fish/guestfish.pod:998
21581 msgid "Without any parameter, this provides general help."
21585 #: ../fish/guestfish.pod:1000
21586 msgid "With a C<cmd> parameter, this displays detailed help for that command."
21590 #: ../fish/guestfish.pod:1002
21591 msgid "quit | exit"
21595 #: ../fish/guestfish.pod:1004
21596 msgid "This exits guestfish. You can also use C<^D> key."
21600 #: ../fish/guestfish.pod:1006
21601 msgid "@FISH_COMMANDS@"
21605 #: ../fish/guestfish.pod:1008
21610 #: ../fish/guestfish.pod:1012 ../test-tool/libguestfs-test-tool.pod:77
21615 #: ../fish/guestfish.pod:1014
21617 "guestfish returns 0 if the commands completed without error, or 1 if there "
21622 #: ../fish/guestfish.pod:1021
21627 #: ../fish/guestfish.pod:1023
21629 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
21634 #: ../fish/guestfish.pod:1026
21635 msgid "GUESTFISH_PID"
21639 #: ../fish/guestfish.pod:1028
21641 "Used with the I<--remote> option to specify the remote guestfish process to "
21642 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
21646 #: ../fish/guestfish.pod:1032
21651 #: ../fish/guestfish.pod:1034
21653 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
21654 "not specified, the external L<hexedit(1)> program is used."
21658 #: ../fish/guestfish.pod:1038
21663 #: ../fish/guestfish.pod:1040
21665 "If compiled with GNU readline support, various files in the home directory "
21666 "can be used. See L</FILES>."
21670 #: ../fish/guestfish.pod:1049
21672 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
21673 "effect as using the B<-v> option."
21677 #: ../fish/guestfish.pod:1061
21679 "Set the path that guestfish uses to search for kernel and initrd.img. See "
21680 "the discussion of paths in L<guestfs(3)>."
21684 #: ../fish/guestfish.pod:1072
21685 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
21689 #: ../fish/guestfish.pod:1074
21694 #: ../fish/guestfish.pod:1076
21696 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
21701 #: ../fish/guestfish.pod:1092 ../fuse/guestmount.pod:254
21706 #: ../fish/guestfish.pod:1096 ../fuse/guestmount.pod:258
21707 msgid "$HOME/.libguestfs-tools.rc"
21711 #: ../fish/guestfish.pod:1098 ../fuse/guestmount.pod:260
21712 msgid "/etc/libguestfs-tools.conf"
21716 #: ../fish/guestfish.pod:1100 ../fuse/guestmount.pod:262
21718 "This configuration file controls the default read-only or read-write mode "
21719 "(I<--ro> or I<--rw>)."
21723 #: ../fish/guestfish.pod:1103
21724 msgid "See L</OPENING DISKS FOR READ AND WRITE>."
21728 #: ../fish/guestfish.pod:1105
21729 msgid "$HOME/.guestfish"
21733 #: ../fish/guestfish.pod:1107
21735 "If compiled with GNU readline support, then the command history is saved in "
21740 #: ../fish/guestfish.pod:1110
21741 msgid "$HOME/.inputrc"
21745 #: ../fish/guestfish.pod:1112
21746 msgid "/etc/inputrc"
21750 #: ../fish/guestfish.pod:1114
21752 "If compiled with GNU readline support, then these files can be used to "
21753 "configure readline. For further information, please see L<readline(3)/"
21754 "INITIALIZATION FILE>."
21758 #: ../fish/guestfish.pod:1118
21759 msgid "To write rules which only apply to guestfish, use:"
21763 #: ../fish/guestfish.pod:1120
21773 #: ../fish/guestfish.pod:1124
21775 "Variables that you can set in inputrc that change the behaviour of guestfish "
21776 "in useful ways include:"
21780 #: ../fish/guestfish.pod:1129
21781 msgid "completion-ignore-case (default: on)"
21785 #: ../fish/guestfish.pod:1131
21787 "By default, guestfish will ignore case when tab-completing paths on the "
21792 #: ../fish/guestfish.pod:1134
21795 " set completion-ignore-case off\n"
21800 #: ../fish/guestfish.pod:1136
21801 msgid "to make guestfish case sensitive."
21805 #: ../fish/guestfish.pod:1140
21810 #: ../fish/guestfish.pod:1142
21811 msgid "test2.img (etc)"
21815 #: ../fish/guestfish.pod:1144
21817 "When using the I<-N> or I<--new> option, the prepared disk or filesystem "
21818 "will be created in the file C<test1.img> in the current directory. The "
21819 "second use of I<-N> will use C<test2.img> and so on. Any existing file with "
21820 "the same name will be overwritten."
21824 #: ../fish/guestfish.pod:1153
21826 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-copy-in(1)"
21827 ">, L<virt-copy-out(1)>, L<virt-df(1)>, L<virt-edit(1)>, L<virt-filesystems(1)"
21828 ">, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions"
21829 "(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)"
21830 ">, L<virt-tar(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<virt-win-reg(1)"
21831 ">, L<hexedit(1)>."
21835 #: ../fish/guestfish.pod:1183 ../test-tool/libguestfs-test-tool.pod:102
21836 #: ../fuse/guestmount.pod:289 ../tools/virt-win-reg.pl:777
21837 #: ../tools/virt-list-filesystems.pl:210 ../tools/virt-tar.pl:309
21838 #: ../tools/virt-make-fs.pl:572 ../tools/virt-list-partitions.pl:277
21840 "This program is free software; you can redistribute it and/or modify it "
21841 "under the terms of the GNU General Public License as published by the Free "
21842 "Software Foundation; either version 2 of the License, or (at your option) "
21843 "any later version."
21847 #: ../fish/guestfish.pod:1188 ../test-tool/libguestfs-test-tool.pod:107
21848 #: ../fuse/guestmount.pod:294 ../tools/virt-win-reg.pl:782
21849 #: ../tools/virt-list-filesystems.pl:215 ../tools/virt-tar.pl:314
21850 #: ../tools/virt-make-fs.pl:577 ../tools/virt-list-partitions.pl:282
21852 "This program is distributed in the hope that it will be useful, but WITHOUT "
21853 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
21854 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
21859 #: ../fish/guestfish.pod:1193 ../test-tool/libguestfs-test-tool.pod:112
21860 #: ../fuse/guestmount.pod:299 ../tools/virt-win-reg.pl:787
21861 #: ../tools/virt-list-filesystems.pl:220 ../tools/virt-tar.pl:319
21862 #: ../tools/virt-make-fs.pl:582 ../tools/virt-list-partitions.pl:287
21864 "You should have received a copy of the GNU General Public License along with "
21865 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
21866 "Ave, Cambridge, MA 02139, USA."
21870 #: ../fish/guestfish-actions.pod:1
21875 #: ../fish/guestfish-actions.pod:3
21878 " add-cdrom filename\n"
21883 #: ../fish/guestfish-actions.pod:15
21885 "This call checks for the existence of C<filename>. This stops you from "
21886 "specifying other types of drive which are supported by qemu such as C<nbd:> "
21887 "and C<http:> URLs. To specify those, use the general L</config> call "
21892 #: ../fish/guestfish-actions.pod:22
21894 "If you just want to add an ISO file (often you use this as an efficient way "
21895 "to transfer large files into the guest), then you should probably use L</add-"
21896 "drive-ro> instead."
21900 #: ../fish/guestfish-actions.pod:35
21905 #: ../fish/guestfish-actions.pod:37
21910 #: ../fish/guestfish-actions.pod:39
21913 " add-domain dom [libvirturi:..] [readonly:..] [iface:..] [live:..] [allowuuid:..]\n"
21918 #: ../fish/guestfish-actions.pod:41
21920 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
21921 "It works by connecting to libvirt, requesting the domain and domain XML from "
21922 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
21926 #: ../fish/guestfish-actions.pod:76
21928 "The other optional parameters are passed directly through to L</add-drive-"
21933 #: ../fish/guestfish-actions.pod:79 ../fish/guestfish-actions.pod:143
21934 #: ../fish/guestfish-actions.pod:3052
21936 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
21940 #: ../fish/guestfish-actions.pod:81
21945 #: ../fish/guestfish-actions.pod:83
21948 " add-drive filename\n"
21953 #: ../fish/guestfish-actions.pod:85
21955 "This function is the equivalent of calling L</add-drive-opts> with no "
21956 "optional parameters, so the disk is added writable, with the format being "
21957 "detected automatically."
21961 #: ../fish/guestfish-actions.pod:89
21963 "Automatic detection of the format opens you up to a potential security hole "
21964 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
21965 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
21966 "you should think about replacing calls to this function with calls to L</add-"
21967 "drive-opts>, and specifying the format."
21971 #: ../fish/guestfish-actions.pod:96
21972 msgid "add-drive-opts"
21976 #: ../fish/guestfish-actions.pod:98
21981 #: ../fish/guestfish-actions.pod:100
21984 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
21989 #: ../fish/guestfish-actions.pod:127
21991 "This forces the image format. If you omit this (or use L</add-drive> or L</"
21992 "add-drive-ro>) then the format is automatically detected. Possible formats "
21993 "include C<raw> and C<qcow2>."
21997 #: ../fish/guestfish-actions.pod:138
21999 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
22000 "add-drive-with-if> call (q.v.)"
22004 #: ../fish/guestfish-actions.pod:145
22005 msgid "add-drive-ro"
22009 #: ../fish/guestfish-actions.pod:147
22014 #: ../fish/guestfish-actions.pod:149
22017 " add-drive-ro filename\n"
22022 #: ../fish/guestfish-actions.pod:151
22024 "This function is the equivalent of calling L</add-drive-opts> with the "
22025 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
22026 "is added read-only, with the format being detected automatically."
22030 #: ../fish/guestfish-actions.pod:156
22031 msgid "add-drive-ro-with-if"
22035 #: ../fish/guestfish-actions.pod:158
22038 " add-drive-ro-with-if filename iface\n"
22043 #: ../fish/guestfish-actions.pod:160
22045 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
22046 "interface emulation to use at run time."
22050 #: ../fish/guestfish-actions.pod:170
22051 msgid "add-drive-with-if"
22055 #: ../fish/guestfish-actions.pod:172
22058 " add-drive-with-if filename iface\n"
22063 #: ../fish/guestfish-actions.pod:174
22065 "This is the same as L</add-drive> but it allows you to specify the QEMU "
22066 "interface emulation to use at run time."
22070 #: ../fish/guestfish-actions.pod:184
22075 #: ../fish/guestfish-actions.pod:186
22078 " aug-clear augpath\n"
22083 #: ../fish/guestfish-actions.pod:191
22088 #: ../fish/guestfish-actions.pod:193
22096 #: ../fish/guestfish-actions.pod:195
22098 "Close the current Augeas handle and free up any resources used by it. After "
22099 "calling this, you have to call L</aug-init> again before you can use any "
22100 "other Augeas functions."
22104 #: ../fish/guestfish-actions.pod:200
22105 msgid "aug-defnode"
22109 #: ../fish/guestfish-actions.pod:202
22112 " aug-defnode name expr val\n"
22117 #: ../fish/guestfish-actions.pod:207
22119 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
22120 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
22121 "containing that single node."
22125 #: ../fish/guestfish-actions.pod:215
22130 #: ../fish/guestfish-actions.pod:217
22133 " aug-defvar name expr\n"
22138 #: ../fish/guestfish-actions.pod:226
22143 #: ../fish/guestfish-actions.pod:228
22146 " aug-get augpath\n"
22151 #: ../fish/guestfish-actions.pod:233
22156 #: ../fish/guestfish-actions.pod:235
22159 " aug-init root flags\n"
22164 #: ../fish/guestfish-actions.pod:241
22165 msgid "You must call this before using any other L</aug-*> commands."
22169 #: ../fish/guestfish-actions.pod:276
22170 msgid "Do not load the tree in L</aug-init>."
22174 #: ../fish/guestfish-actions.pod:280
22175 msgid "To close the handle, you can call L</aug-close>."
22179 #: ../fish/guestfish-actions.pod:284
22184 #: ../fish/guestfish-actions.pod:286
22187 " aug-insert augpath label true|false\n"
22192 #: ../fish/guestfish-actions.pod:296
22197 #: ../fish/guestfish-actions.pod:298
22205 #: ../fish/guestfish-actions.pod:305
22210 #: ../fish/guestfish-actions.pod:307
22213 " aug-ls augpath\n"
22218 #: ../fish/guestfish-actions.pod:309
22220 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
22221 "resulting nodes into alphabetical order."
22225 #: ../fish/guestfish-actions.pod:312
22230 #: ../fish/guestfish-actions.pod:314
22233 " aug-match augpath\n"
22238 #: ../fish/guestfish-actions.pod:320
22243 #: ../fish/guestfish-actions.pod:322
22246 " aug-mv src dest\n"
22251 #: ../fish/guestfish-actions.pod:327
22256 #: ../fish/guestfish-actions.pod:329
22259 " aug-rm augpath\n"
22264 #: ../fish/guestfish-actions.pod:335
22269 #: ../fish/guestfish-actions.pod:337
22277 #: ../fish/guestfish-actions.pod:341
22279 "The flags which were passed to L</aug-init> affect exactly how files are "
22284 #: ../fish/guestfish-actions.pod:344
22289 #: ../fish/guestfish-actions.pod:346
22292 " aug-set augpath val\n"
22297 #: ../fish/guestfish-actions.pod:350
22299 "In the Augeas API, it is possible to clear a node by setting the value to "
22300 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
22301 "this call. Instead you must use the L</aug-clear> call."
22305 #: ../fish/guestfish-actions.pod:355
22310 #: ../fish/guestfish-actions.pod:357
22313 " available 'groups ...'\n"
22318 #: ../fish/guestfish-actions.pod:363
22320 "The libguestfs groups, and the functions that those groups correspond to, "
22321 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
22322 "runtime by calling L</available-all-groups>."
22326 #: ../fish/guestfish-actions.pod:387
22327 msgid "You must call L</launch> before calling this function."
22331 #: ../fish/guestfish-actions.pod:409
22333 "This call was added in version C<1.0.80>. In previous versions of "
22334 "libguestfs all you could do would be to speculatively execute a command to "
22335 "find out if the daemon implemented it. See also L</version>."
22339 #: ../fish/guestfish-actions.pod:416
22340 msgid "available-all-groups"
22344 #: ../fish/guestfish-actions.pod:418
22347 " available-all-groups\n"
22352 #: ../fish/guestfish-actions.pod:420
22354 "This command returns a list of all optional groups that this daemon knows "
22355 "about. Note this returns both supported and unsupported groups. To find "
22356 "out which ones the daemon can actually support you have to call L</"
22357 "available> on each member of the returned list."
22361 #: ../fish/guestfish-actions.pod:426
22362 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
22366 #: ../fish/guestfish-actions.pod:428
22371 #: ../fish/guestfish-actions.pod:430
22374 " base64-in (base64file|-) filename\n"
22379 #: ../fish/guestfish-actions.pod:435 ../fish/guestfish-actions.pod:444
22380 #: ../fish/guestfish-actions.pod:668 ../fish/guestfish-actions.pod:837
22381 #: ../fish/guestfish-actions.pod:856 ../fish/guestfish-actions.pod:1233
22382 #: ../fish/guestfish-actions.pod:4485 ../fish/guestfish-actions.pod:4497
22383 #: ../fish/guestfish-actions.pod:4508 ../fish/guestfish-actions.pod:4519
22384 #: ../fish/guestfish-actions.pod:4571 ../fish/guestfish-actions.pod:4580
22385 #: ../fish/guestfish-actions.pod:4634 ../fish/guestfish-actions.pod:4657
22386 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
22390 #: ../fish/guestfish-actions.pod:437
22395 #: ../fish/guestfish-actions.pod:439
22398 " base64-out filename (base64file|-)\n"
22403 #: ../fish/guestfish-actions.pod:446
22404 msgid "blockdev-flushbufs"
22408 #: ../fish/guestfish-actions.pod:448
22411 " blockdev-flushbufs device\n"
22416 #: ../fish/guestfish-actions.pod:455
22417 msgid "blockdev-getbsz"
22421 #: ../fish/guestfish-actions.pod:457
22424 " blockdev-getbsz device\n"
22429 #: ../fish/guestfish-actions.pod:466
22430 msgid "blockdev-getro"
22434 #: ../fish/guestfish-actions.pod:468
22437 " blockdev-getro device\n"
22442 #: ../fish/guestfish-actions.pod:475
22443 msgid "blockdev-getsize64"
22447 #: ../fish/guestfish-actions.pod:477
22450 " blockdev-getsize64 device\n"
22455 #: ../fish/guestfish-actions.pod:481
22456 msgid "See also L</blockdev-getsz>."
22460 #: ../fish/guestfish-actions.pod:485
22461 msgid "blockdev-getss"
22465 #: ../fish/guestfish-actions.pod:487
22468 " blockdev-getss device\n"
22473 #: ../fish/guestfish-actions.pod:492
22475 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
22479 #: ../fish/guestfish-actions.pod:497
22480 msgid "blockdev-getsz"
22484 #: ../fish/guestfish-actions.pod:499
22487 " blockdev-getsz device\n"
22492 #: ../fish/guestfish-actions.pod:504
22494 "See also L</blockdev-getss> for the real sector size of the device, and L</"
22495 "blockdev-getsize64> for the more useful I<size in bytes>."
22499 #: ../fish/guestfish-actions.pod:510
22500 msgid "blockdev-rereadpt"
22504 #: ../fish/guestfish-actions.pod:512
22507 " blockdev-rereadpt device\n"
22512 #: ../fish/guestfish-actions.pod:518
22513 msgid "blockdev-setbsz"
22517 #: ../fish/guestfish-actions.pod:520
22520 " blockdev-setbsz device blocksize\n"
22525 #: ../fish/guestfish-actions.pod:529
22526 msgid "blockdev-setro"
22530 #: ../fish/guestfish-actions.pod:531
22533 " blockdev-setro device\n"
22538 #: ../fish/guestfish-actions.pod:537
22539 msgid "blockdev-setrw"
22543 #: ../fish/guestfish-actions.pod:539
22546 " blockdev-setrw device\n"
22551 #: ../fish/guestfish-actions.pod:545
22552 msgid "case-sensitive-path"
22556 #: ../fish/guestfish-actions.pod:547
22559 " case-sensitive-path path\n"
22564 #: ../fish/guestfish-actions.pod:571
22566 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
22567 "WINDOWS/system32\"> (the exact return value would depend on details of how "
22568 "the directories were originally created under Windows)."
22572 #: ../fish/guestfish-actions.pod:579
22573 msgid "See also L</realpath>."
22577 #: ../fish/guestfish-actions.pod:581
22582 #: ../fish/guestfish-actions.pod:583
22590 #: ../fish/guestfish-actions.pod:587
22592 "Note that this function cannot correctly handle binary files (specifically, "
22593 "files containing C<\\0> character which is treated as end of string). For "
22594 "those you need to use the L</read-file> or L</download> functions which have "
22595 "a more complex interface."
22599 #: ../fish/guestfish-actions.pod:595
22604 #: ../fish/guestfish-actions.pod:597
22607 " checksum csumtype path\n"
22612 #: ../fish/guestfish-actions.pod:640
22613 msgid "To get the checksum for a device, use L</checksum-device>."
22617 #: ../fish/guestfish-actions.pod:642
22618 msgid "To get the checksums for many files, use L</checksums-out>."
22622 #: ../fish/guestfish-actions.pod:644
22623 msgid "checksum-device"
22627 #: ../fish/guestfish-actions.pod:646
22630 " checksum-device csumtype device\n"
22635 #: ../fish/guestfish-actions.pod:648
22637 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
22638 "device named C<device>. For the types of checksums supported see the L</"
22639 "checksum> command."
22643 #: ../fish/guestfish-actions.pod:652
22644 msgid "checksums-out"
22648 #: ../fish/guestfish-actions.pod:654
22651 " checksums-out csumtype directory (sumsfile|-)\n"
22656 #: ../fish/guestfish-actions.pod:670
22661 #: ../fish/guestfish-actions.pod:672
22664 " chmod mode path\n"
22669 #: ../fish/guestfish-actions.pod:683
22674 #: ../fish/guestfish-actions.pod:685
22677 " chown owner group path\n"
22682 #: ../fish/guestfish-actions.pod:693
22687 #: ../fish/guestfish-actions.pod:695
22690 " command 'arguments ...'\n"
22695 #: ../fish/guestfish-actions.pod:702
22697 "The single parameter is an argv-style list of arguments. The first element "
22698 "is the name of the program to run. Subsequent elements are parameters. The "
22699 "list must be non-empty (ie. must contain a program name). Note that the "
22700 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
22704 #: ../fish/guestfish-actions.pod:730
22705 msgid "command-lines"
22709 #: ../fish/guestfish-actions.pod:732
22712 " command-lines 'arguments ...'\n"
22717 #: ../fish/guestfish-actions.pod:734
22719 "This is the same as L</command>, but splits the result into a list of lines."
22723 #: ../fish/guestfish-actions.pod:737
22724 msgid "See also: L</sh-lines>"
22728 #: ../fish/guestfish-actions.pod:742
22733 #: ../fish/guestfish-actions.pod:744
22736 " config qemuparam qemuvalue\n"
22741 #: ../fish/guestfish-actions.pod:755
22746 #: ../fish/guestfish-actions.pod:757
22749 " copy-size src dest size\n"
22754 #: ../fish/guestfish-actions.pod:765
22759 #: ../fish/guestfish-actions.pod:767
22767 #: ../fish/guestfish-actions.pod:772
22772 #: ../fish/guestfish-actions.pod:774
22780 #: ../fish/guestfish-actions.pod:779
22785 #: ../fish/guestfish-actions.pod:781
22793 #: ../fish/guestfish-actions.pod:788
22795 "If the destination is a device, it must be as large or larger than the "
22796 "source file or device, otherwise the copy will fail. This command cannot do "
22797 "partial copies (see L</copy-size>)."
22801 #: ../fish/guestfish-actions.pod:792
22806 #: ../fish/guestfish-actions.pod:794
22814 #: ../fish/guestfish-actions.pod:798 ../fish/guestfish-actions.pod:809
22816 "This command is mostly useful for interactive sessions. It is I<not> "
22817 "intended that you try to parse the output string. Use L</statvfs> from "
22822 #: ../fish/guestfish-actions.pod:802
22827 #: ../fish/guestfish-actions.pod:804
22835 #: ../fish/guestfish-actions.pod:813
22840 #: ../fish/guestfish-actions.pod:815
22848 #: ../fish/guestfish-actions.pod:821
22850 "Another way to get the same information is to enable verbose messages with "
22851 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
22852 "before running the program."
22856 #: ../fish/guestfish-actions.pod:826
22861 #: ../fish/guestfish-actions.pod:828
22864 " download remotefilename (filename|-)\n"
22869 #: ../fish/guestfish-actions.pod:835
22870 msgid "See also L</upload>, L</cat>."
22874 #: ../fish/guestfish-actions.pod:839
22875 msgid "download-offset"
22879 #: ../fish/guestfish-actions.pod:841
22882 " download-offset remotefilename (filename|-) offset size\n"
22887 #: ../fish/guestfish-actions.pod:849
22889 "Note that there is no limit on the amount of data that can be downloaded "
22890 "with this call, unlike with L</pread>, and this call always reads the full "
22891 "amount unless an error occurs."
22895 #: ../fish/guestfish-actions.pod:854
22896 msgid "See also L</download>, L</pread>."
22900 #: ../fish/guestfish-actions.pod:858
22901 msgid "drop-caches"
22905 #: ../fish/guestfish-actions.pod:860
22908 " drop-caches whattodrop\n"
22913 #: ../fish/guestfish-actions.pod:872
22918 #: ../fish/guestfish-actions.pod:874
22926 #: ../fish/guestfish-actions.pod:886
22931 #: ../fish/guestfish-actions.pod:888
22934 " e2fsck-f device\n"
22939 #: ../fish/guestfish-actions.pod:894
22941 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
22942 "should use L</fsck>."
22946 #: ../fish/guestfish-actions.pod:897
22947 msgid "echo-daemon"
22951 #: ../fish/guestfish-actions.pod:899
22954 " echo-daemon 'words ...'\n"
22959 #: ../fish/guestfish-actions.pod:906
22960 msgid "See also L</ping-daemon>."
22964 #: ../fish/guestfish-actions.pod:908
22969 #: ../fish/guestfish-actions.pod:910
22972 " egrep regex path\n"
22977 #: ../fish/guestfish-actions.pod:918
22982 #: ../fish/guestfish-actions.pod:920
22985 " egrepi regex path\n"
22990 #: ../fish/guestfish-actions.pod:928
22995 #: ../fish/guestfish-actions.pod:930
22998 " equal file1 file2\n"
23003 #: ../fish/guestfish-actions.pod:937
23008 #: ../fish/guestfish-actions.pod:939
23016 #: ../fish/guestfish-actions.pod:944
23017 msgid "See also L</is-file>, L</is-dir>, L</stat>."
23021 #: ../fish/guestfish-actions.pod:946
23026 #: ../fish/guestfish-actions.pod:948
23029 " fallocate path len\n"
23034 #: ../fish/guestfish-actions.pod:965
23035 msgid "fallocate64"
23039 #: ../fish/guestfish-actions.pod:967
23042 " fallocate64 path len\n"
23047 #: ../fish/guestfish-actions.pod:973
23049 "Note that this call allocates disk blocks for the file. To create a sparse "
23050 "file use L</truncate-size> instead."
23054 #: ../fish/guestfish-actions.pod:976
23056 "The deprecated call L</fallocate> does the same, but owing to an oversight "
23057 "it only allowed 30 bit lengths to be specified, effectively limiting the "
23058 "maximum size of files created through that call to 1GB."
23062 #: ../fish/guestfish-actions.pod:985
23067 #: ../fish/guestfish-actions.pod:987
23070 " fgrep pattern path\n"
23075 #: ../fish/guestfish-actions.pod:995
23080 #: ../fish/guestfish-actions.pod:997
23083 " fgrepi pattern path\n"
23088 #: ../fish/guestfish-actions.pod:1005
23093 #: ../fish/guestfish-actions.pod:1007
23101 #: ../fish/guestfish-actions.pod:1019
23103 "This command can also be used on C</dev/> devices (and partitions, LV "
23104 "names). You can for example use this to determine if a device contains a "
23105 "filesystem, although it's usually better to use L</vfs-type>."
23109 #: ../fish/guestfish-actions.pod:1029
23110 msgid "file-architecture"
23114 #: ../fish/guestfish-actions.pod:1031
23117 " file-architecture filename\n"
23122 #: ../fish/guestfish-actions.pod:1134
23127 #: ../fish/guestfish-actions.pod:1136
23135 #: ../fish/guestfish-actions.pod:1140
23137 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
23138 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
23142 #: ../fish/guestfish-actions.pod:1144
23147 #: ../fish/guestfish-actions.pod:1146
23150 " fill c len path\n"
23155 #: ../fish/guestfish-actions.pod:1152
23157 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
23158 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
23159 "L</fill-pattern>."
23163 #: ../fish/guestfish-actions.pod:1157
23164 msgid "fill-pattern"
23168 #: ../fish/guestfish-actions.pod:1159
23171 " fill-pattern pattern len path\n"
23176 #: ../fish/guestfish-actions.pod:1161
23178 "This function is like L</fill> except that it creates a new file of length "
23179 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
23180 "is truncated if necessary to ensure the length of the file is exactly C<len> "
23185 #: ../fish/guestfish-actions.pod:1166
23190 #: ../fish/guestfish-actions.pod:1168
23193 " find directory\n"
23198 #: ../fish/guestfish-actions.pod:1182
23199 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
23203 #: ../fish/guestfish-actions.pod:1195
23204 msgid "See also L</find0>."
23208 #: ../fish/guestfish-actions.pod:1200
23213 #: ../fish/guestfish-actions.pod:1202
23216 " find0 directory (files|-)\n"
23221 #: ../fish/guestfish-actions.pod:1208
23223 "This command works the same way as L</find> with the following exceptions:"
23227 #: ../fish/guestfish-actions.pod:1235
23228 msgid "findfs-label"
23232 #: ../fish/guestfish-actions.pod:1237
23235 " findfs-label label\n"
23240 #: ../fish/guestfish-actions.pod:1243
23241 msgid "To find the label of a filesystem, use L</vfs-label>."
23245 #: ../fish/guestfish-actions.pod:1245
23246 msgid "findfs-uuid"
23250 #: ../fish/guestfish-actions.pod:1247
23253 " findfs-uuid uuid\n"
23258 #: ../fish/guestfish-actions.pod:1253
23259 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
23263 #: ../fish/guestfish-actions.pod:1255
23268 #: ../fish/guestfish-actions.pod:1257
23271 " fsck fstype device\n"
23276 #: ../fish/guestfish-actions.pod:1287
23281 #: ../fish/guestfish-actions.pod:1289
23289 #: ../fish/guestfish-actions.pod:1296
23290 msgid "get-attach-method"
23294 #: ../fish/guestfish-actions.pod:1298
23297 " get-attach-method\n"
23302 #: ../fish/guestfish-actions.pod:1300
23303 msgid "Return the current attach method. See L</set-attach-method>."
23307 #: ../fish/guestfish-actions.pod:1302
23308 msgid "get-autosync"
23312 #: ../fish/guestfish-actions.pod:1304
23320 #: ../fish/guestfish-actions.pod:1308
23325 #: ../fish/guestfish-actions.pod:1310
23333 #: ../fish/guestfish-actions.pod:1314
23334 msgid "get-e2label"
23338 #: ../fish/guestfish-actions.pod:1316
23341 " get-e2label device\n"
23346 #: ../fish/guestfish-actions.pod:1328
23351 #: ../fish/guestfish-actions.pod:1330
23354 " get-e2uuid device\n"
23359 #: ../fish/guestfish-actions.pod:1342
23360 msgid "get-memsize"
23364 #: ../fish/guestfish-actions.pod:1344
23372 #: ../fish/guestfish-actions.pod:1349
23374 "If L</set-memsize> was not called on this handle, and if "
23375 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
23376 "value for memsize."
23380 #: ../fish/guestfish-actions.pod:1356
23381 msgid "get-network"
23385 #: ../fish/guestfish-actions.pod:1358
23393 #: ../fish/guestfish-actions.pod:1362
23398 #: ../fish/guestfish-actions.pod:1364
23406 #: ../fish/guestfish-actions.pod:1371
23411 #: ../fish/guestfish-actions.pod:1373
23416 #: ../fish/guestfish-actions.pod:1375
23424 #: ../fish/guestfish-actions.pod:1382
23429 #: ../fish/guestfish-actions.pod:1384
23437 #: ../fish/guestfish-actions.pod:1391
23438 msgid "get-recovery-proc"
23442 #: ../fish/guestfish-actions.pod:1393
23445 " get-recovery-proc\n"
23450 #: ../fish/guestfish-actions.pod:1397
23451 msgid "get-selinux"
23455 #: ../fish/guestfish-actions.pod:1399
23463 #: ../fish/guestfish-actions.pod:1401
23465 "This returns the current setting of the selinux flag which is passed to the "
23466 "appliance at boot time. See L</set-selinux>."
23470 #: ../fish/guestfish-actions.pod:1407
23475 #: ../fish/guestfish-actions.pod:1409
23483 #: ../fish/guestfish-actions.pod:1416
23488 #: ../fish/guestfish-actions.pod:1418
23496 #: ../fish/guestfish-actions.pod:1422
23501 #: ../fish/guestfish-actions.pod:1424
23509 #: ../fish/guestfish-actions.pod:1426
23511 "Return the current umask. By default the umask is C<022> unless it has been "
23512 "set by calling L</umask>."
23516 #: ../fish/guestfish-actions.pod:1429
23517 msgid "get-verbose"
23521 #: ../fish/guestfish-actions.pod:1431
23529 #: ../fish/guestfish-actions.pod:1435
23534 #: ../fish/guestfish-actions.pod:1437
23542 #: ../fish/guestfish-actions.pod:1441
23543 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
23547 #: ../fish/guestfish-actions.pod:1444
23552 #: ../fish/guestfish-actions.pod:1446
23555 " getxattr path name\n"
23560 #: ../fish/guestfish-actions.pod:1448
23562 "Get a single extended attribute from file C<path> named C<name>. This call "
23563 "follows symlinks. If you want to lookup an extended attribute for the "
23564 "symlink itself, use L</lgetxattr>."
23568 #: ../fish/guestfish-actions.pod:1452 ../fish/guestfish-actions.pod:2458
23570 "Normally it is better to get all extended attributes from a file in one go "
23571 "by calling L</getxattrs>. However some Linux filesystem implementations are "
23572 "buggy and do not provide a way to list out attributes. For these "
23573 "filesystems (notably ntfs-3g) you have to know the names of the extended "
23574 "attributes you want in advance and call this function."
23578 #: ../fish/guestfish-actions.pod:1462
23579 msgid "See also: L</getxattrs>, L</lgetxattr>, L<attr(5)>."
23583 #: ../fish/guestfish-actions.pod:1464
23588 #: ../fish/guestfish-actions.pod:1466
23591 " getxattrs path\n"
23596 #: ../fish/guestfish-actions.pod:1474
23597 msgid "See also: L</lgetxattrs>, L<attr(5)>."
23601 #: ../fish/guestfish-actions.pod:1476
23602 msgid "glob-expand"
23606 #: ../fish/guestfish-actions.pod:1478
23609 " glob-expand pattern\n"
23614 #: ../fish/guestfish-actions.pod:1491
23619 #: ../fish/guestfish-actions.pod:1493
23622 " grep regex path\n"
23627 #: ../fish/guestfish-actions.pod:1501
23632 #: ../fish/guestfish-actions.pod:1503
23635 " grepi regex path\n"
23640 #: ../fish/guestfish-actions.pod:1511
23641 msgid "grub-install"
23645 #: ../fish/guestfish-actions.pod:1513
23648 " grub-install root device\n"
23653 #: ../fish/guestfish-actions.pod:1529
23658 #: ../fish/guestfish-actions.pod:1531
23666 #: ../fish/guestfish-actions.pod:1539
23671 #: ../fish/guestfish-actions.pod:1541
23674 " head-n nrlines path\n"
23679 #: ../fish/guestfish-actions.pod:1554
23684 #: ../fish/guestfish-actions.pod:1556
23692 #: ../fish/guestfish-actions.pod:1564
23697 #: ../fish/guestfish-actions.pod:1566
23700 " initrd-cat initrdpath filename\n"
23705 #: ../fish/guestfish-actions.pod:1578
23706 msgid "See also L</initrd-list>."
23710 #: ../fish/guestfish-actions.pod:1583
23711 msgid "initrd-list"
23715 #: ../fish/guestfish-actions.pod:1585
23718 " initrd-list path\n"
23723 #: ../fish/guestfish-actions.pod:1597
23724 msgid "inotify-add-watch"
23728 #: ../fish/guestfish-actions.pod:1599
23731 " inotify-add-watch path mask\n"
23736 #: ../fish/guestfish-actions.pod:1611
23737 msgid "inotify-close"
23741 #: ../fish/guestfish-actions.pod:1613
23749 #: ../fish/guestfish-actions.pod:1619
23750 msgid "inotify-files"
23754 #: ../fish/guestfish-actions.pod:1621
23762 #: ../fish/guestfish-actions.pod:1623
23764 "This function is a helpful wrapper around L</inotify-read> which just "
23765 "returns a list of pathnames of objects that were touched. The returned "
23766 "pathnames are sorted and deduplicated."
23770 #: ../fish/guestfish-actions.pod:1627
23771 msgid "inotify-init"
23775 #: ../fish/guestfish-actions.pod:1629
23778 " inotify-init maxevents\n"
23783 #: ../fish/guestfish-actions.pod:1635
23785 "C<maxevents> is the maximum number of events which will be queued up between "
23786 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
23787 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
23788 "default was 16384 events. Beyond this limit, the kernel throws away events, "
23789 "but records the fact that it threw them away by setting a flag "
23790 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
23794 #: ../fish/guestfish-actions.pod:1645
23796 "Before any events are generated, you have to add some watches to the "
23797 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
23798 "L</inotify-watch-all>."
23802 #: ../fish/guestfish-actions.pod:1651
23804 "Queued up events should be read periodically by calling L</inotify-read> (or "
23805 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
23806 "If you don't read the events out often enough then you risk the internal "
23807 "queue overflowing."
23811 #: ../fish/guestfish-actions.pod:1658
23813 "The handle should be closed after use by calling L</inotify-close>. This "
23814 "also removes any watches automatically."
23818 #: ../fish/guestfish-actions.pod:1667
23819 msgid "inotify-read"
23823 #: ../fish/guestfish-actions.pod:1669
23831 #: ../fish/guestfish-actions.pod:1682
23832 msgid "inotify-rm-watch"
23836 #: ../fish/guestfish-actions.pod:1684
23839 " inotify-rm-watch wd\n"
23844 #: ../fish/guestfish-actions.pod:1686
23845 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
23849 #: ../fish/guestfish-actions.pod:1689
23850 msgid "inspect-get-arch"
23854 #: ../fish/guestfish-actions.pod:1691
23857 " inspect-get-arch root\n"
23862 #: ../fish/guestfish-actions.pod:1693 ../fish/guestfish-actions.pod:1709
23863 #: ../fish/guestfish-actions.pod:1795 ../fish/guestfish-actions.pod:1831
23864 #: ../fish/guestfish-actions.pod:1849 ../fish/guestfish-actions.pod:1883
23865 #: ../fish/guestfish-actions.pod:1898 ../fish/guestfish-actions.pod:1919
23866 #: ../fish/guestfish-actions.pod:1934 ../fish/guestfish-actions.pod:1967
23867 #: ../fish/guestfish-actions.pod:1989 ../fish/guestfish-actions.pod:2013
23868 #: ../fish/guestfish-actions.pod:2030 ../fish/guestfish-actions.pod:2073
23869 #: ../fish/guestfish-actions.pod:2108 ../fish/guestfish-actions.pod:2124
23870 #: ../fish/guestfish-actions.pod:2140 ../fish/guestfish-actions.pod:2153
23871 #: ../fish/guestfish-actions.pod:2166 ../fish/guestfish-actions.pod:2181
23873 "This function should only be called with a root device string as returned by "
23878 #: ../fish/guestfish-actions.pod:1696
23880 "This returns the architecture of the inspected operating system. The "
23881 "possible return values are listed under L</file-architecture>."
23885 #: ../fish/guestfish-actions.pod:1705
23886 msgid "inspect-get-distro"
23890 #: ../fish/guestfish-actions.pod:1707
23893 " inspect-get-distro root\n"
23898 #: ../fish/guestfish-actions.pod:1791
23899 msgid "inspect-get-drive-mappings"
23903 #: ../fish/guestfish-actions.pod:1793
23906 " inspect-get-drive-mappings root\n"
23911 #: ../fish/guestfish-actions.pod:1823
23913 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
23914 "get-mountpoints>, L</inspect-get-filesystems>."
23918 #: ../fish/guestfish-actions.pod:1827
23919 msgid "inspect-get-filesystems"
23923 #: ../fish/guestfish-actions.pod:1829
23926 " inspect-get-filesystems root\n"
23931 #: ../fish/guestfish-actions.pod:1842
23933 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
23934 "get-mountpoints>."
23938 #: ../fish/guestfish-actions.pod:1845
23939 msgid "inspect-get-format"
23943 #: ../fish/guestfish-actions.pod:1847
23946 " inspect-get-format root\n"
23951 #: ../fish/guestfish-actions.pod:1879
23952 msgid "inspect-get-hostname"
23956 #: ../fish/guestfish-actions.pod:1881
23959 " inspect-get-hostname root\n"
23964 #: ../fish/guestfish-actions.pod:1894
23965 msgid "inspect-get-major-version"
23969 #: ../fish/guestfish-actions.pod:1896
23972 " inspect-get-major-version root\n"
23977 #: ../fish/guestfish-actions.pod:1915
23978 msgid "inspect-get-minor-version"
23982 #: ../fish/guestfish-actions.pod:1917
23985 " inspect-get-minor-version root\n"
23990 #: ../fish/guestfish-actions.pod:1927
23992 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
23993 "get-major-version>."
23997 #: ../fish/guestfish-actions.pod:1930
23998 msgid "inspect-get-mountpoints"
24002 #: ../fish/guestfish-actions.pod:1932
24005 " inspect-get-mountpoints root\n"
24010 #: ../fish/guestfish-actions.pod:1954
24012 "For operating systems like Windows which still use drive letters, this call "
24013 "will only return an entry for the first drive \"mounted on\" C</>. For "
24014 "information about the mapping of drive letters to partitions, see L</inspect-"
24015 "get-drive-mappings>."
24019 #: ../fish/guestfish-actions.pod:1960
24021 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
24022 "get-filesystems>."
24026 #: ../fish/guestfish-actions.pod:1963
24027 msgid "inspect-get-package-format"
24031 #: ../fish/guestfish-actions.pod:1965
24034 " inspect-get-package-format root\n"
24039 #: ../fish/guestfish-actions.pod:1970
24041 "This function and L</inspect-get-package-management> return the package "
24042 "format and package management tool used by the inspected operating system. "
24043 "For example for Fedora these functions would return C<rpm> (package format) "
24044 "and C<yum> (package management)."
24048 #: ../fish/guestfish-actions.pod:1985
24049 msgid "inspect-get-package-management"
24053 #: ../fish/guestfish-actions.pod:1987
24056 " inspect-get-package-management root\n"
24061 #: ../fish/guestfish-actions.pod:1992
24063 "L</inspect-get-package-format> and this function return the package format "
24064 "and package management tool used by the inspected operating system. For "
24065 "example for Fedora these functions would return C<rpm> (package format) and "
24066 "C<yum> (package management)."
24070 #: ../fish/guestfish-actions.pod:2009
24071 msgid "inspect-get-product-name"
24075 #: ../fish/guestfish-actions.pod:2011
24078 " inspect-get-product-name root\n"
24083 #: ../fish/guestfish-actions.pod:2026
24084 msgid "inspect-get-product-variant"
24088 #: ../fish/guestfish-actions.pod:2028
24091 " inspect-get-product-variant root\n"
24096 #: ../fish/guestfish-actions.pod:2052
24098 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
24099 "get-product-name>, L</inspect-get-major-version>."
24103 #: ../fish/guestfish-actions.pod:2056
24104 msgid "inspect-get-roots"
24108 #: ../fish/guestfish-actions.pod:2058
24111 " inspect-get-roots\n"
24116 #: ../fish/guestfish-actions.pod:2060
24118 "This function is a convenient way to get the list of root devices, as "
24119 "returned from a previous call to L</inspect-os>, but without redoing the "
24120 "whole inspection process."
24124 #: ../fish/guestfish-actions.pod:2064
24126 "This returns an empty list if either no root devices were found or the "
24127 "caller has not called L</inspect-os>."
24131 #: ../fish/guestfish-actions.pod:2069
24132 msgid "inspect-get-type"
24136 #: ../fish/guestfish-actions.pod:2071
24139 " inspect-get-type root\n"
24144 #: ../fish/guestfish-actions.pod:2104
24145 msgid "inspect-get-windows-current-control-set"
24149 #: ../fish/guestfish-actions.pod:2106
24152 " inspect-get-windows-current-control-set root\n"
24157 #: ../fish/guestfish-actions.pod:2120
24158 msgid "inspect-get-windows-systemroot"
24162 #: ../fish/guestfish-actions.pod:2122
24165 " inspect-get-windows-systemroot root\n"
24170 #: ../fish/guestfish-actions.pod:2136
24171 msgid "inspect-is-live"
24175 #: ../fish/guestfish-actions.pod:2138
24178 " inspect-is-live root\n"
24183 #: ../fish/guestfish-actions.pod:2143
24185 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
24186 "then this returns true if a live image was detected on the disk."
24190 #: ../fish/guestfish-actions.pod:2149
24191 msgid "inspect-is-multipart"
24195 #: ../fish/guestfish-actions.pod:2151
24198 " inspect-is-multipart root\n"
24203 #: ../fish/guestfish-actions.pod:2156
24205 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
24206 "then this returns true if the disk is part of a set."
24210 #: ../fish/guestfish-actions.pod:2162
24211 msgid "inspect-is-netinst"
24215 #: ../fish/guestfish-actions.pod:2164
24218 " inspect-is-netinst root\n"
24223 #: ../fish/guestfish-actions.pod:2169
24225 "If L</inspect-get-format> returns C<installer> (this is an install disk), "
24226 "then this returns true if the disk is a network installer, ie. not a self-"
24227 "contained install CD but one which is likely to require network access to "
24228 "complete the install."
24232 #: ../fish/guestfish-actions.pod:2177
24233 msgid "inspect-list-applications"
24237 #: ../fish/guestfish-actions.pod:2179
24240 " inspect-list-applications root\n"
24245 #: ../fish/guestfish-actions.pod:2186
24247 "I<Note:> This call works differently from other parts of the inspection "
24248 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
24249 "then mount up the disks, before calling this. Listing applications is a "
24250 "significantly more difficult operation which requires access to the full "
24251 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
24252 "are just returning data cached in the libguestfs handle, this call actually "
24253 "reads parts of the mounted filesystems during the call."
24257 #: ../fish/guestfish-actions.pod:2276
24262 #: ../fish/guestfish-actions.pod:2278
24270 #: ../fish/guestfish-actions.pod:2293
24272 "You can pass the root string(s) returned to other L</inspect-get-*> "
24273 "functions in order to query further information about each operating system, "
24274 "such as the name and version."
24278 #: ../fish/guestfish-actions.pod:2298
24280 "This function uses other libguestfs features such as L</mount-ro> and L</"
24281 "umount-all> in order to mount and unmount filesystems and look at the "
24282 "contents. This should be called with no disks currently mounted. The "
24283 "function may also use Augeas, so any existing Augeas handle will be closed."
24287 #: ../fish/guestfish-actions.pod:2310 ../fish/guestfish-actions.pod:2486
24288 #: ../fish/guestfish-actions.pod:2532
24289 msgid "See also L</list-filesystems>."
24293 #: ../fish/guestfish-actions.pod:2312
24294 msgid "is-blockdev"
24298 #: ../fish/guestfish-actions.pod:2314
24301 " is-blockdev path\n"
24306 #: ../fish/guestfish-actions.pod:2319 ../fish/guestfish-actions.pod:2337
24307 #: ../fish/guestfish-actions.pod:2356 ../fish/guestfish-actions.pod:2365
24308 #: ../fish/guestfish-actions.pod:2375 ../fish/guestfish-actions.pod:2409
24309 #: ../fish/guestfish-actions.pod:2418
24310 msgid "See also L</stat>."
24314 #: ../fish/guestfish-actions.pod:2321
24319 #: ../fish/guestfish-actions.pod:2323
24327 #: ../fish/guestfish-actions.pod:2330
24332 #: ../fish/guestfish-actions.pod:2332
24335 " is-chardev path\n"
24340 #: ../fish/guestfish-actions.pod:2339
24345 #: ../fish/guestfish-actions.pod:2341
24353 #: ../fish/guestfish-actions.pod:2348
24358 #: ../fish/guestfish-actions.pod:2350
24366 #: ../fish/guestfish-actions.pod:2358
24371 #: ../fish/guestfish-actions.pod:2360
24379 #: ../fish/guestfish-actions.pod:2367
24384 #: ../fish/guestfish-actions.pod:2369
24392 #: ../fish/guestfish-actions.pod:2377
24393 msgid "is-launching"
24397 #: ../fish/guestfish-actions.pod:2379
24405 #: ../fish/guestfish-actions.pod:2386
24410 #: ../fish/guestfish-actions.pod:2388
24418 #: ../fish/guestfish-actions.pod:2393
24423 #: ../fish/guestfish-actions.pod:2395
24431 #: ../fish/guestfish-actions.pod:2402
24436 #: ../fish/guestfish-actions.pod:2404
24439 " is-socket path\n"
24444 #: ../fish/guestfish-actions.pod:2411
24449 #: ../fish/guestfish-actions.pod:2413
24452 " is-symlink path\n"
24457 #: ../fish/guestfish-actions.pod:2420
24458 msgid "kill-subprocess"
24462 #: ../fish/guestfish-actions.pod:2422
24465 " kill-subprocess\n"
24470 #: ../fish/guestfish-actions.pod:2426
24475 #: ../fish/guestfish-actions.pod:2428
24480 #: ../fish/guestfish-actions.pod:2430
24488 #: ../fish/guestfish-actions.pod:2438
24493 #: ../fish/guestfish-actions.pod:2440
24496 " lchown owner group path\n"
24501 #: ../fish/guestfish-actions.pod:2442
24503 "Change the file owner to C<owner> and group to C<group>. This is like L</"
24504 "chown> but if C<path> is a symlink then the link itself is changed, not the "
24509 #: ../fish/guestfish-actions.pod:2450
24514 #: ../fish/guestfish-actions.pod:2452
24517 " lgetxattr path name\n"
24522 #: ../fish/guestfish-actions.pod:2468
24523 msgid "See also: L</lgetxattrs>, L</getxattr>, L<attr(5)>."
24527 #: ../fish/guestfish-actions.pod:2470
24532 #: ../fish/guestfish-actions.pod:2472
24535 " lgetxattrs path\n"
24540 #: ../fish/guestfish-actions.pod:2474
24542 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
24543 "it returns the extended attributes of the link itself."
24547 #: ../fish/guestfish-actions.pod:2478
24548 msgid "list-devices"
24552 #: ../fish/guestfish-actions.pod:2480
24560 #: ../fish/guestfish-actions.pod:2488
24561 msgid "list-filesystems"
24565 #: ../fish/guestfish-actions.pod:2490
24568 " list-filesystems\n"
24573 #: ../fish/guestfish-actions.pod:2509
24575 "This command runs other libguestfs commands, which might include L</mount> "
24576 "and L</umount>, and therefore you should use this soon after launch and only "
24577 "when nothing is mounted."
24581 #: ../fish/guestfish-actions.pod:2513
24583 "Not all of the filesystems returned will be mountable. In particular, swap "
24584 "partitions are returned in the list. Also this command does not check that "
24585 "each filesystem found is valid and mountable, and some filesystems might be "
24586 "mountable but require special options. Filesystems may not all belong to a "
24587 "single logical operating system (use L</inspect-os> to look for OSes)."
24591 #: ../fish/guestfish-actions.pod:2521
24592 msgid "list-partitions"
24596 #: ../fish/guestfish-actions.pod:2523
24599 " list-partitions\n"
24604 #: ../fish/guestfish-actions.pod:2529
24606 "This does not return logical volumes. For that you will need to call L</"
24611 #: ../fish/guestfish-actions.pod:2534
24616 #: ../fish/guestfish-actions.pod:2536
24624 #: ../fish/guestfish-actions.pod:2544
24629 #: ../fish/guestfish-actions.pod:2546
24632 " ln target linkname\n"
24637 #: ../fish/guestfish-actions.pod:2550
24642 #: ../fish/guestfish-actions.pod:2552
24645 " ln-f target linkname\n"
24650 #: ../fish/guestfish-actions.pod:2557
24655 #: ../fish/guestfish-actions.pod:2559
24658 " ln-s target linkname\n"
24663 #: ../fish/guestfish-actions.pod:2563
24668 #: ../fish/guestfish-actions.pod:2565
24671 " ln-sf target linkname\n"
24676 #: ../fish/guestfish-actions.pod:2570
24677 msgid "lremovexattr"
24681 #: ../fish/guestfish-actions.pod:2572
24684 " lremovexattr xattr path\n"
24689 #: ../fish/guestfish-actions.pod:2574
24691 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
24692 "it removes an extended attribute of the link itself."
24696 #: ../fish/guestfish-actions.pod:2578
24701 #: ../fish/guestfish-actions.pod:2580
24709 #: ../fish/guestfish-actions.pod:2586
24711 "This command is mostly useful for interactive sessions. Programs should "
24712 "probably use L</readdir> instead."
24716 #: ../fish/guestfish-actions.pod:2589
24721 #: ../fish/guestfish-actions.pod:2591
24724 " lsetxattr xattr val vallen path\n"
24729 #: ../fish/guestfish-actions.pod:2593
24731 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
24732 "sets an extended attribute of the link itself."
24736 #: ../fish/guestfish-actions.pod:2597
24741 #: ../fish/guestfish-actions.pod:2599
24749 #: ../fish/guestfish-actions.pod:2603
24751 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
24752 "the link is stat-ed, not the file it refers to."
24756 #: ../fish/guestfish-actions.pod:2609
24761 #: ../fish/guestfish-actions.pod:2611
24764 " lstatlist path 'names ...'\n"
24769 #: ../fish/guestfish-actions.pod:2613
24771 "This call allows you to perform the L</lstat> operation on multiple files, "
24772 "where all files are in the directory C<path>. C<names> is the list of files "
24773 "from this directory."
24777 #: ../fish/guestfish-actions.pod:2622
24779 "This call is intended for programs that want to efficiently list a directory "
24780 "contents without making many round-trips. See also L</lxattrlist> for a "
24781 "similarly efficient call for getting extended attributes. Very long "
24782 "directory listings might cause the protocol message size to be exceeded, "
24783 "causing this call to fail. The caller must split up such requests into "
24784 "smaller groups of names."
24788 #: ../fish/guestfish-actions.pod:2630
24789 msgid "luks-add-key"
24793 #: ../fish/guestfish-actions.pod:2632
24796 " luks-add-key device keyslot\n"
24801 #: ../fish/guestfish-actions.pod:2639
24803 "Note that if C<keyslot> already contains a key, then this command will "
24804 "fail. You have to use L</luks-kill-slot> first to remove that key."
24808 #: ../fish/guestfish-actions.pod:2643 ../fish/guestfish-actions.pod:2665
24809 #: ../fish/guestfish-actions.pod:2678 ../fish/guestfish-actions.pod:2692
24810 #: ../fish/guestfish-actions.pod:2715 ../fish/guestfish-actions.pod:2725
24812 "This command has one or more key or passphrase parameters. Guestfish will "
24813 "prompt for these separately."
24817 #: ../fish/guestfish-actions.pod:2646
24822 #: ../fish/guestfish-actions.pod:2648
24825 " luks-close device\n"
24830 #: ../fish/guestfish-actions.pod:2650
24832 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
24833 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
24834 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
24839 #: ../fish/guestfish-actions.pod:2656
24840 msgid "luks-format"
24844 #: ../fish/guestfish-actions.pod:2658
24847 " luks-format device keyslot\n"
24852 #: ../fish/guestfish-actions.pod:2671
24853 msgid "luks-format-cipher"
24857 #: ../fish/guestfish-actions.pod:2673
24860 " luks-format-cipher device keyslot cipher\n"
24865 #: ../fish/guestfish-actions.pod:2675
24867 "This command is the same as L</luks-format> but it also allows you to set "
24868 "the C<cipher> used."
24872 #: ../fish/guestfish-actions.pod:2684
24873 msgid "luks-kill-slot"
24877 #: ../fish/guestfish-actions.pod:2686
24880 " luks-kill-slot device keyslot\n"
24885 #: ../fish/guestfish-actions.pod:2695
24890 #: ../fish/guestfish-actions.pod:2697
24893 " luks-open device mapname\n"
24898 #: ../fish/guestfish-actions.pod:2711
24900 "If this block device contains LVM volume groups, then calling L</vgscan> "
24901 "followed by L</vg-activate-all> will make them visible."
24905 #: ../fish/guestfish-actions.pod:2718
24906 msgid "luks-open-ro"
24910 #: ../fish/guestfish-actions.pod:2720
24913 " luks-open-ro device mapname\n"
24918 #: ../fish/guestfish-actions.pod:2722
24920 "This is the same as L</luks-open> except that a read-only mapping is created."
24924 #: ../fish/guestfish-actions.pod:2728
24929 #: ../fish/guestfish-actions.pod:2730
24932 " lvcreate logvol volgroup mbytes\n"
24937 #: ../fish/guestfish-actions.pod:2735
24938 msgid "lvm-canonical-lv-name"
24942 #: ../fish/guestfish-actions.pod:2737
24945 " lvm-canonical-lv-name lvname\n"
24950 #: ../fish/guestfish-actions.pod:2746
24951 msgid "See also L</is-lv>."
24955 #: ../fish/guestfish-actions.pod:2748
24956 msgid "lvm-clear-filter"
24960 #: ../fish/guestfish-actions.pod:2750
24963 " lvm-clear-filter\n"
24968 #: ../fish/guestfish-actions.pod:2752
24970 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
24975 #: ../fish/guestfish-actions.pod:2758
24976 msgid "lvm-remove-all"
24980 #: ../fish/guestfish-actions.pod:2760
24983 " lvm-remove-all\n"
24988 #: ../fish/guestfish-actions.pod:2768
24989 msgid "lvm-set-filter"
24993 #: ../fish/guestfish-actions.pod:2770
24996 " lvm-set-filter 'devices ...'\n"
25001 #: ../fish/guestfish-actions.pod:2795
25006 #: ../fish/guestfish-actions.pod:2797
25009 " lvremove device\n"
25014 #: ../fish/guestfish-actions.pod:2805
25019 #: ../fish/guestfish-actions.pod:2807
25022 " lvrename logvol newlogvol\n"
25027 #: ../fish/guestfish-actions.pod:2811
25032 #: ../fish/guestfish-actions.pod:2813
25035 " lvresize device mbytes\n"
25040 #: ../fish/guestfish-actions.pod:2819
25041 msgid "lvresize-free"
25045 #: ../fish/guestfish-actions.pod:2821
25048 " lvresize-free lv percent\n"
25053 #: ../fish/guestfish-actions.pod:2829
25058 #: ../fish/guestfish-actions.pod:2831
25066 #: ../fish/guestfish-actions.pod:2839
25067 msgid "See also L</lvs-full>, L</list-filesystems>."
25071 #: ../fish/guestfish-actions.pod:2841
25076 #: ../fish/guestfish-actions.pod:2843
25084 #: ../fish/guestfish-actions.pod:2848
25089 #: ../fish/guestfish-actions.pod:2850
25097 #: ../fish/guestfish-actions.pod:2854
25102 #: ../fish/guestfish-actions.pod:2856
25105 " lxattrlist path 'names ...'\n"
25110 #: ../fish/guestfish-actions.pod:2872
25112 "This call is intended for programs that want to efficiently list a directory "
25113 "contents without making many round-trips. See also L</lstatlist> for a "
25114 "similarly efficient call for getting standard stats. Very long directory "
25115 "listings might cause the protocol message size to be exceeded, causing this "
25116 "call to fail. The caller must split up such requests into smaller groups of "
25121 #: ../fish/guestfish-actions.pod:2880
25126 #: ../fish/guestfish-actions.pod:2882
25134 #: ../fish/guestfish-actions.pod:2886
25139 #: ../fish/guestfish-actions.pod:2888
25142 " mkdir-mode path mode\n"
25147 #: ../fish/guestfish-actions.pod:2897
25148 msgid "See also L</mkdir>, L</umask>"
25152 #: ../fish/guestfish-actions.pod:2899
25157 #: ../fish/guestfish-actions.pod:2901
25165 #: ../fish/guestfish-actions.pod:2906
25170 #: ../fish/guestfish-actions.pod:2908
25173 " mkdtemp template\n"
25178 #: ../fish/guestfish-actions.pod:2929
25183 #: ../fish/guestfish-actions.pod:2931
25186 " mke2fs-J fstype blocksize device journal\n"
25191 #: ../fish/guestfish-actions.pod:2939
25192 msgid "See also L</mke2journal>."
25196 #: ../fish/guestfish-actions.pod:2941
25201 #: ../fish/guestfish-actions.pod:2943
25204 " mke2fs-JL fstype blocksize device label\n"
25209 #: ../fish/guestfish-actions.pod:2948
25210 msgid "See also L</mke2journal-L>."
25214 #: ../fish/guestfish-actions.pod:2950
25219 #: ../fish/guestfish-actions.pod:2952
25222 " mke2fs-JU fstype blocksize device uuid\n"
25227 #: ../fish/guestfish-actions.pod:2957
25228 msgid "See also L</mke2journal-U>."
25232 #: ../fish/guestfish-actions.pod:2959
25233 msgid "mke2journal"
25237 #: ../fish/guestfish-actions.pod:2961
25240 " mke2journal blocksize device\n"
25245 #: ../fish/guestfish-actions.pod:2968
25246 msgid "mke2journal-L"
25250 #: ../fish/guestfish-actions.pod:2970
25253 " mke2journal-L blocksize label device\n"
25258 #: ../fish/guestfish-actions.pod:2974
25259 msgid "mke2journal-U"
25263 #: ../fish/guestfish-actions.pod:2976
25266 " mke2journal-U blocksize uuid device\n"
25271 #: ../fish/guestfish-actions.pod:2980
25276 #: ../fish/guestfish-actions.pod:2982
25279 " mkfifo mode path\n"
25284 #: ../fish/guestfish-actions.pod:2984
25286 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
25287 "is just a convenient wrapper around L</mknod>."
25291 #: ../fish/guestfish-actions.pod:2990
25296 #: ../fish/guestfish-actions.pod:2992
25299 " mkfs fstype device\n"
25304 #: ../fish/guestfish-actions.pod:2998
25309 #: ../fish/guestfish-actions.pod:3000
25312 " mkfs-b fstype blocksize device\n"
25317 #: ../fish/guestfish-actions.pod:3002
25319 "This call is similar to L</mkfs>, but it allows you to control the block "
25320 "size of the resulting filesystem. Supported block sizes depend on the "
25321 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
25325 #: ../fish/guestfish-actions.pod:3017
25330 #: ../fish/guestfish-actions.pod:3019
25333 " mkfs-opts fstype device [blocksize:..] [features:..]\n"
25338 #: ../fish/guestfish-actions.pod:3054
25339 msgid "mkmountpoint"
25343 #: ../fish/guestfish-actions.pod:3056
25346 " mkmountpoint exemptpath\n"
25351 #: ../fish/guestfish-actions.pod:3058
25353 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
25354 "to create extra mountpoints before mounting the first filesystem."
25358 #: ../fish/guestfish-actions.pod:3082
25360 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
25361 "unexpected errors if you try to mix these calls. It is safest to manually "
25362 "unmount filesystems and remove mountpoints after use."
25366 #: ../fish/guestfish-actions.pod:3086
25368 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
25369 "for this to work for manual mountpoints, you must ensure that the innermost "
25370 "mountpoints have the longest pathnames, as in the example code above."
25374 #: ../fish/guestfish-actions.pod:3093
25376 "Autosync [see L</set-autosync>, this is set by default on handles] can cause "
25377 "L</umount-all> to be called when the handle is closed which can also trigger "
25382 #: ../fish/guestfish-actions.pod:3097
25387 #: ../fish/guestfish-actions.pod:3099
25390 " mknod mode devmajor devminor path\n"
25395 #: ../fish/guestfish-actions.pod:3109
25397 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
25398 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
25399 "regular file). These constants are available in the standard Linux header "
25400 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
25401 "wrappers around this command which bitwise OR in the appropriate constant "
25406 #: ../fish/guestfish-actions.pod:3119
25411 #: ../fish/guestfish-actions.pod:3121
25414 " mknod-b mode devmajor devminor path\n"
25419 #: ../fish/guestfish-actions.pod:3123
25421 "This call creates a block device node called C<path> with mode C<mode> and "
25422 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
25423 "wrapper around L</mknod>."
25427 #: ../fish/guestfish-actions.pod:3129
25432 #: ../fish/guestfish-actions.pod:3131
25435 " mknod-c mode devmajor devminor path\n"
25440 #: ../fish/guestfish-actions.pod:3133
25442 "This call creates a char device node called C<path> with mode C<mode> and "
25443 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
25444 "wrapper around L</mknod>."
25448 #: ../fish/guestfish-actions.pod:3139
25453 #: ../fish/guestfish-actions.pod:3141
25461 #: ../fish/guestfish-actions.pod:3145
25466 #: ../fish/guestfish-actions.pod:3147
25469 " mkswap-L label device\n"
25474 #: ../fish/guestfish-actions.pod:3155
25479 #: ../fish/guestfish-actions.pod:3157
25482 " mkswap-U uuid device\n"
25487 #: ../fish/guestfish-actions.pod:3161
25488 msgid "mkswap-file"
25492 #: ../fish/guestfish-actions.pod:3163
25495 " mkswap-file path\n"
25500 #: ../fish/guestfish-actions.pod:3167
25502 "This command just writes a swap file signature to an existing file. To "
25503 "create the file itself, use something like L</fallocate>."
25507 #: ../fish/guestfish-actions.pod:3170
25512 #: ../fish/guestfish-actions.pod:3172
25515 " modprobe modulename\n"
25520 #: ../fish/guestfish-actions.pod:3179
25525 #: ../fish/guestfish-actions.pod:3181
25528 " mount device mountpoint\n"
25533 #: ../fish/guestfish-actions.pod:3197
25535 "B<Important note:> When you use this call, the filesystem options C<sync> "
25536 "and C<noatime> are set implicitly. This was originally done because we "
25537 "thought it would improve reliability, but it turns out that I<-o sync> has a "
25538 "very large negative performance impact and negligible effect on "
25539 "reliability. Therefore we recommend that you avoid using L</mount> in any "
25540 "code that needs performance, and instead use L</mount-options> (use an empty "
25541 "string for the first parameter if you don't want any options)."
25545 #: ../fish/guestfish-actions.pod:3214
25550 #: ../fish/guestfish-actions.pod:3216
25553 " mount-loop file mountpoint\n"
25558 #: ../fish/guestfish-actions.pod:3222
25559 msgid "mount-options"
25563 #: ../fish/guestfish-actions.pod:3224
25566 " mount-options options device mountpoint\n"
25571 #: ../fish/guestfish-actions.pod:3226
25573 "This is the same as the L</mount> command, but it allows you to set the "
25574 "mount options as for the L<mount(8)> I<-o> flag."
25578 #: ../fish/guestfish-actions.pod:3234
25583 #: ../fish/guestfish-actions.pod:3236
25586 " mount-ro device mountpoint\n"
25591 #: ../fish/guestfish-actions.pod:3238
25593 "This is the same as the L</mount> command, but it mounts the filesystem with "
25594 "the read-only (I<-o ro>) flag."
25598 #: ../fish/guestfish-actions.pod:3241
25603 #: ../fish/guestfish-actions.pod:3243
25606 " mount-vfs options vfstype device mountpoint\n"
25611 #: ../fish/guestfish-actions.pod:3245
25613 "This is the same as the L</mount> command, but it allows you to set both the "
25614 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
25618 #: ../fish/guestfish-actions.pod:3249
25619 msgid "mountpoints"
25623 #: ../fish/guestfish-actions.pod:3251
25631 #: ../fish/guestfish-actions.pod:3253
25633 "This call is similar to L</mounts>. That call returns a list of devices. "
25634 "This one returns a hash table (map) of device name to directory where the "
25635 "device is mounted."
25639 #: ../fish/guestfish-actions.pod:3257
25644 #: ../fish/guestfish-actions.pod:3259
25652 #: ../fish/guestfish-actions.pod:3266
25653 msgid "See also: L</mountpoints>"
25657 #: ../fish/guestfish-actions.pod:3268
25662 #: ../fish/guestfish-actions.pod:3270
25670 #: ../fish/guestfish-actions.pod:3275
25671 msgid "ntfs-3g-probe"
25675 #: ../fish/guestfish-actions.pod:3277
25678 " ntfs-3g-probe true|false device\n"
25683 #: ../fish/guestfish-actions.pod:3291
25688 #: ../fish/guestfish-actions.pod:3293
25691 " ntfsresize device\n"
25696 #: ../fish/guestfish-actions.pod:3299
25697 msgid "ntfsresize-size"
25701 #: ../fish/guestfish-actions.pod:3301
25704 " ntfsresize-size device size\n"
25709 #: ../fish/guestfish-actions.pod:3303
25711 "This command is the same as L</ntfsresize> except that it allows you to "
25712 "specify the new size (in bytes) explicitly."
25716 #: ../fish/guestfish-actions.pod:3306
25721 #: ../fish/guestfish-actions.pod:3308
25724 " part-add device prlogex startsect endsect\n"
25729 #: ../fish/guestfish-actions.pod:3310
25731 "This command adds a partition to C<device>. If there is no partition table "
25732 "on the device, call L</part-init> first."
25736 #: ../fish/guestfish-actions.pod:3322
25738 "Creating a partition which covers the whole disk is not so easy. Use L</"
25739 "part-disk> to do that."
25743 #: ../fish/guestfish-actions.pod:3325
25748 #: ../fish/guestfish-actions.pod:3327
25751 " part-del device partnum\n"
25756 #: ../fish/guestfish-actions.pod:3335
25761 #: ../fish/guestfish-actions.pod:3337
25764 " part-disk device parttype\n"
25769 #: ../fish/guestfish-actions.pod:3339
25771 "This command is simply a combination of L</part-init> followed by L</part-"
25772 "add> to create a single primary partition covering the whole disk."
25776 #: ../fish/guestfish-actions.pod:3343
25778 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
25779 "possible values are described in L</part-init>."
25783 #: ../fish/guestfish-actions.pod:3349
25784 msgid "part-get-bootable"
25788 #: ../fish/guestfish-actions.pod:3351
25791 " part-get-bootable device partnum\n"
25796 #: ../fish/guestfish-actions.pod:3356
25797 msgid "See also L</part-set-bootable>."
25801 #: ../fish/guestfish-actions.pod:3358
25802 msgid "part-get-mbr-id"
25806 #: ../fish/guestfish-actions.pod:3360
25809 " part-get-mbr-id device partnum\n"
25814 #: ../fish/guestfish-actions.pod:3365 ../fish/guestfish-actions.pod:3503
25816 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
25817 "undefined results for other partition table types (see L</part-get-"
25822 #: ../fish/guestfish-actions.pod:3369
25823 msgid "part-get-parttype"
25827 #: ../fish/guestfish-actions.pod:3371
25830 " part-get-parttype device\n"
25835 #: ../fish/guestfish-actions.pod:3376
25837 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
25838 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
25839 "possible, although unusual. See L</part-init> for a full list."
25843 #: ../fish/guestfish-actions.pod:3381
25848 #: ../fish/guestfish-actions.pod:3383
25851 " part-init device parttype\n"
25856 #: ../fish/guestfish-actions.pod:3389
25858 "Initially there are no partitions. Following this, you should call L</part-"
25859 "add> for each partition required."
25863 #: ../fish/guestfish-actions.pod:3452
25868 #: ../fish/guestfish-actions.pod:3454
25871 " part-list device\n"
25876 #: ../fish/guestfish-actions.pod:3469
25878 "Start of the partition I<in bytes>. To get sectors you have to divide by "
25879 "the device's sector size, see L</blockdev-getss>."
25883 #: ../fish/guestfish-actions.pod:3482
25884 msgid "part-set-bootable"
25888 #: ../fish/guestfish-actions.pod:3484
25891 " part-set-bootable device partnum true|false\n"
25896 #: ../fish/guestfish-actions.pod:3493
25897 msgid "part-set-mbr-id"
25901 #: ../fish/guestfish-actions.pod:3495
25904 " part-set-mbr-id device partnum idbyte\n"
25909 #: ../fish/guestfish-actions.pod:3507
25910 msgid "part-set-name"
25914 #: ../fish/guestfish-actions.pod:3509
25917 " part-set-name device partnum name\n"
25922 #: ../fish/guestfish-actions.pod:3517
25923 msgid "part-to-dev"
25927 #: ../fish/guestfish-actions.pod:3519
25930 " part-to-dev partition\n"
25935 #: ../fish/guestfish-actions.pod:3525
25937 "The named partition must exist, for example as a string returned from L</"
25938 "list-partitions>."
25942 #: ../fish/guestfish-actions.pod:3528
25943 msgid "ping-daemon"
25947 #: ../fish/guestfish-actions.pod:3530
25955 #: ../fish/guestfish-actions.pod:3537
25960 #: ../fish/guestfish-actions.pod:3539
25963 " pread path count offset\n"
25968 #: ../fish/guestfish-actions.pod:3547
25969 msgid "See also L</pwrite>, L</pread-device>."
25973 #: ../fish/guestfish-actions.pod:3552
25974 msgid "pread-device"
25978 #: ../fish/guestfish-actions.pod:3554
25981 " pread-device device count offset\n"
25986 #: ../fish/guestfish-actions.pod:3562
25987 msgid "See also L</pread>."
25991 #: ../fish/guestfish-actions.pod:3567
25996 #: ../fish/guestfish-actions.pod:3569
25999 " pvcreate device\n"
26004 #: ../fish/guestfish-actions.pod:3575
26009 #: ../fish/guestfish-actions.pod:3577
26012 " pvremove device\n"
26017 #: ../fish/guestfish-actions.pod:3586
26022 #: ../fish/guestfish-actions.pod:3588
26025 " pvresize device\n"
26030 #: ../fish/guestfish-actions.pod:3593
26031 msgid "pvresize-size"
26035 #: ../fish/guestfish-actions.pod:3595
26038 " pvresize-size device size\n"
26043 #: ../fish/guestfish-actions.pod:3597
26045 "This command is the same as L</pvresize> except that it allows you to "
26046 "specify the new size (in bytes) explicitly."
26050 #: ../fish/guestfish-actions.pod:3600
26055 #: ../fish/guestfish-actions.pod:3602
26063 #: ../fish/guestfish-actions.pod:3610
26064 msgid "See also L</pvs-full>."
26068 #: ../fish/guestfish-actions.pod:3612
26073 #: ../fish/guestfish-actions.pod:3614
26081 #: ../fish/guestfish-actions.pod:3619
26086 #: ../fish/guestfish-actions.pod:3621
26094 #: ../fish/guestfish-actions.pod:3625
26099 #: ../fish/guestfish-actions.pod:3627
26102 " pwrite path content offset\n"
26107 #: ../fish/guestfish-actions.pod:3638
26108 msgid "See also L</pread>, L</pwrite-device>."
26112 #: ../fish/guestfish-actions.pod:3643
26113 msgid "pwrite-device"
26117 #: ../fish/guestfish-actions.pod:3645
26120 " pwrite-device device content offset\n"
26125 #: ../fish/guestfish-actions.pod:3655
26126 msgid "See also L</pwrite>."
26130 #: ../fish/guestfish-actions.pod:3660
26135 #: ../fish/guestfish-actions.pod:3662
26138 " read-file path\n"
26143 #: ../fish/guestfish-actions.pod:3667
26145 "Unlike L</cat>, this function can correctly handle files that contain "
26146 "embedded ASCII NUL characters. However unlike L</download>, this function "
26147 "is limited in the total size of file that can be handled."
26151 #: ../fish/guestfish-actions.pod:3675
26156 #: ../fish/guestfish-actions.pod:3677
26159 " read-lines path\n"
26164 #: ../fish/guestfish-actions.pod:3684
26166 "Note that this function cannot correctly handle binary files (specifically, "
26167 "files containing C<\\0> character which is treated as end of line). For "
26168 "those you need to use the L</read-file> function which has a more complex "
26173 #: ../fish/guestfish-actions.pod:3689
26178 #: ../fish/guestfish-actions.pod:3691
26186 #: ../fish/guestfish-actions.pod:3743
26188 "This function is primarily intended for use by programs. To get a simple "
26189 "list of names, use L</ls>. To get a printable directory for human "
26190 "consumption, use L</ll>."
26194 #: ../fish/guestfish-actions.pod:3747
26199 #: ../fish/guestfish-actions.pod:3749
26207 #: ../fish/guestfish-actions.pod:3753
26208 msgid "readlinklist"
26212 #: ../fish/guestfish-actions.pod:3755
26215 " readlinklist path 'names ...'\n"
26220 #: ../fish/guestfish-actions.pod:3779
26225 #: ../fish/guestfish-actions.pod:3781
26233 #: ../fish/guestfish-actions.pod:3786
26234 msgid "removexattr"
26238 #: ../fish/guestfish-actions.pod:3788
26241 " removexattr xattr path\n"
26246 #: ../fish/guestfish-actions.pod:3793
26247 msgid "See also: L</lremovexattr>, L<attr(5)>."
26251 #: ../fish/guestfish-actions.pod:3795
26256 #: ../fish/guestfish-actions.pod:3797
26259 " resize2fs device\n"
26264 #: ../fish/guestfish-actions.pod:3802
26266 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
26267 "before calling this command. For unknown reasons C<resize2fs> sometimes "
26268 "gives an error about this and sometimes not. In any case, it is always safe "
26269 "to call L</e2fsck-f> before calling this function."
26273 #: ../fish/guestfish-actions.pod:3808
26274 msgid "resize2fs-M"
26278 #: ../fish/guestfish-actions.pod:3810
26281 " resize2fs-M device\n"
26286 #: ../fish/guestfish-actions.pod:3812
26288 "This command is the same as L</resize2fs>, but the filesystem is resized to "
26289 "its minimum size. This works like the I<-M> option to the C<resize2fs> "
26294 #: ../fish/guestfish-actions.pod:3816
26296 "To get the resulting size of the filesystem you should call L</tune2fs-l> "
26297 "and read the C<Block size> and C<Block count> values. These two numbers, "
26298 "multiplied together, give the resulting size of the minimal filesystem in "
26303 #: ../fish/guestfish-actions.pod:3821
26304 msgid "resize2fs-size"
26308 #: ../fish/guestfish-actions.pod:3823
26311 " resize2fs-size device size\n"
26316 #: ../fish/guestfish-actions.pod:3825
26318 "This command is the same as L</resize2fs> except that it allows you to "
26319 "specify the new size (in bytes) explicitly."
26323 #: ../fish/guestfish-actions.pod:3828
26328 #: ../fish/guestfish-actions.pod:3830
26336 #: ../fish/guestfish-actions.pod:3834
26341 #: ../fish/guestfish-actions.pod:3836
26349 #: ../fish/guestfish-actions.pod:3842
26354 #: ../fish/guestfish-actions.pod:3844
26362 #: ../fish/guestfish-actions.pod:3848
26363 msgid "rmmountpoint"
26367 #: ../fish/guestfish-actions.pod:3850
26370 " rmmountpoint exemptpath\n"
26375 #: ../fish/guestfish-actions.pod:3852
26377 "This calls removes a mountpoint that was previously created with L</"
26378 "mkmountpoint>. See L</mkmountpoint> for full details."
26382 #: ../fish/guestfish-actions.pod:3856
26383 msgid "scrub-device"
26387 #: ../fish/guestfish-actions.pod:3858
26390 " scrub-device device\n"
26395 #: ../fish/guestfish-actions.pod:3869
26400 #: ../fish/guestfish-actions.pod:3871
26403 " scrub-file file\n"
26408 #: ../fish/guestfish-actions.pod:3881
26409 msgid "scrub-freespace"
26413 #: ../fish/guestfish-actions.pod:3883
26416 " scrub-freespace dir\n"
26421 #: ../fish/guestfish-actions.pod:3885
26423 "This command creates the directory C<dir> and then fills it with files until "
26424 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
26425 "deletes them. The intention is to scrub any free space on the partition "
26426 "containing C<dir>."
26430 #: ../fish/guestfish-actions.pod:3894
26435 #: ../fish/guestfish-actions.pod:3896
26440 #: ../fish/guestfish-actions.pod:3898
26443 " set-append append\n"
26448 #: ../fish/guestfish-actions.pod:3909
26449 msgid "set-attach-method"
26453 #: ../fish/guestfish-actions.pod:3911
26454 msgid "attach-method"
26458 #: ../fish/guestfish-actions.pod:3913
26461 " set-attach-method attachmethod\n"
26466 #: ../fish/guestfish-actions.pod:3935
26467 msgid "set-autosync"
26471 #: ../fish/guestfish-actions.pod:3937
26476 #: ../fish/guestfish-actions.pod:3939
26479 " set-autosync true|false\n"
26484 #: ../fish/guestfish-actions.pod:3949
26489 #: ../fish/guestfish-actions.pod:3951
26494 #: ../fish/guestfish-actions.pod:3953
26497 " set-direct true|false\n"
26502 #: ../fish/guestfish-actions.pod:3959
26504 "One consequence of this is that log messages aren't caught by the library "
26505 "and handled by L</set-log-message-callback>, but go straight to stdout."
26509 #: ../fish/guestfish-actions.pod:3968
26510 msgid "set-e2label"
26514 #: ../fish/guestfish-actions.pod:3970
26517 " set-e2label device label\n"
26522 #: ../fish/guestfish-actions.pod:3976
26524 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
26525 "label on a filesystem."
26529 #: ../fish/guestfish-actions.pod:3979
26534 #: ../fish/guestfish-actions.pod:3981
26537 " set-e2uuid device uuid\n"
26542 #: ../fish/guestfish-actions.pod:3988
26544 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
26545 "UUID of a filesystem."
26549 #: ../fish/guestfish-actions.pod:3991
26550 msgid "set-memsize"
26554 #: ../fish/guestfish-actions.pod:3993
26559 #: ../fish/guestfish-actions.pod:3995
26562 " set-memsize memsize\n"
26567 #: ../fish/guestfish-actions.pod:3997
26569 "This sets the memory size in megabytes allocated to the qemu subprocess. "
26570 "This only has any effect if called before L</launch>."
26574 #: ../fish/guestfish-actions.pod:4008
26575 msgid "set-network"
26579 #: ../fish/guestfish-actions.pod:4010
26584 #: ../fish/guestfish-actions.pod:4012
26587 " set-network true|false\n"
26592 #: ../fish/guestfish-actions.pod:4020
26594 "You must call this before calling L</launch>, otherwise it has no effect."
26598 #: ../fish/guestfish-actions.pod:4023
26603 #: ../fish/guestfish-actions.pod:4025
26608 #: ../fish/guestfish-actions.pod:4027
26611 " set-path searchpath\n"
26616 #: ../fish/guestfish-actions.pod:4036
26621 #: ../fish/guestfish-actions.pod:4038
26626 #: ../fish/guestfish-actions.pod:4040
26634 #: ../fish/guestfish-actions.pod:4060
26635 msgid "set-recovery-proc"
26639 #: ../fish/guestfish-actions.pod:4062
26640 msgid "recovery-proc"
26644 #: ../fish/guestfish-actions.pod:4064
26647 " set-recovery-proc true|false\n"
26652 #: ../fish/guestfish-actions.pod:4066
26654 "If this is called with the parameter C<false> then L</launch> does not "
26655 "create a recovery process. The purpose of the recovery process is to stop "
26656 "runaway qemu processes in the case where the main program aborts abruptly."
26660 #: ../fish/guestfish-actions.pod:4071
26662 "This only has any effect if called before L</launch>, and the default is "
26667 #: ../fish/guestfish-actions.pod:4080
26668 msgid "set-selinux"
26672 #: ../fish/guestfish-actions.pod:4082
26677 #: ../fish/guestfish-actions.pod:4084
26680 " set-selinux true|false\n"
26685 #: ../fish/guestfish-actions.pod:4095
26690 #: ../fish/guestfish-actions.pod:4097
26695 #: ../fish/guestfish-actions.pod:4099
26698 " set-trace true|false\n"
26703 #: ../fish/guestfish-actions.pod:4111
26705 "Trace messages are normally sent to C<stderr>, unless you register a "
26706 "callback to send them somewhere else (see L</set-event-callback>)."
26710 #: ../fish/guestfish-actions.pod:4115
26711 msgid "set-verbose"
26715 #: ../fish/guestfish-actions.pod:4117
26720 #: ../fish/guestfish-actions.pod:4119
26723 " set-verbose true|false\n"
26728 #: ../fish/guestfish-actions.pod:4126
26730 "Verbose messages are normally sent to C<stderr>, unless you register a "
26731 "callback to send them somewhere else (see L</set-event-callback>)."
26735 #: ../fish/guestfish-actions.pod:4130
26740 #: ../fish/guestfish-actions.pod:4132
26743 " setcon context\n"
26748 #: ../fish/guestfish-actions.pod:4139
26753 #: ../fish/guestfish-actions.pod:4141
26756 " setxattr xattr val vallen path\n"
26761 #: ../fish/guestfish-actions.pod:4147
26762 msgid "See also: L</lsetxattr>, L<attr(5)>."
26766 #: ../fish/guestfish-actions.pod:4149
26771 #: ../fish/guestfish-actions.pod:4151
26774 " sfdisk device cyls heads sectors 'lines ...'\n"
26779 #: ../fish/guestfish-actions.pod:4173
26780 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
26784 #: ../fish/guestfish-actions.pod:4186
26789 #: ../fish/guestfish-actions.pod:4188
26792 " sfdiskM device 'lines ...'\n"
26797 #: ../fish/guestfish-actions.pod:4190
26799 "This is a simplified interface to the L</sfdisk> command, where partition "
26800 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
26801 "you don't need to specify the cyls, heads and sectors parameters which were "
26802 "rarely if ever used anyway."
26806 #: ../fish/guestfish-actions.pod:4196
26807 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
26811 #: ../fish/guestfish-actions.pod:4209
26816 #: ../fish/guestfish-actions.pod:4211
26819 " sfdisk-N device partnum cyls heads sectors line\n"
26824 #: ../fish/guestfish-actions.pod:4216
26826 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
26827 "cyls/heads/sectors parameters."
26831 #: ../fish/guestfish-actions.pod:4219
26832 msgid "See also: L</part-add>"
26836 #: ../fish/guestfish-actions.pod:4231
26837 msgid "sfdisk-disk-geometry"
26841 #: ../fish/guestfish-actions.pod:4233
26844 " sfdisk-disk-geometry device\n"
26849 #: ../fish/guestfish-actions.pod:4235
26851 "This displays the disk geometry of C<device> read from the partition table. "
26852 "Especially in the case where the underlying block device has been resized, "
26853 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
26854 "kernel-geometry>)."
26858 #: ../fish/guestfish-actions.pod:4243
26859 msgid "sfdisk-kernel-geometry"
26863 #: ../fish/guestfish-actions.pod:4245
26866 " sfdisk-kernel-geometry device\n"
26871 #: ../fish/guestfish-actions.pod:4252
26876 #: ../fish/guestfish-actions.pod:4254
26879 " sfdisk-l device\n"
26884 #: ../fish/guestfish-actions.pod:4260
26885 msgid "See also: L</part-list>"
26889 #: ../fish/guestfish-actions.pod:4269
26894 #: ../fish/guestfish-actions.pod:4271
26902 #: ../fish/guestfish-actions.pod:4276
26903 msgid "This is like L</command>, but passes the command to:"
26907 #: ../fish/guestfish-actions.pod:4284
26908 msgid "All the provisos about L</command> apply to this call."
26912 #: ../fish/guestfish-actions.pod:4286
26917 #: ../fish/guestfish-actions.pod:4288
26920 " sh-lines command\n"
26925 #: ../fish/guestfish-actions.pod:4290
26926 msgid "This is the same as L</sh>, but splits the result into a list of lines."
26930 #: ../fish/guestfish-actions.pod:4293
26931 msgid "See also: L</command-lines>"
26935 #: ../fish/guestfish-actions.pod:4295
26940 #: ../fish/guestfish-actions.pod:4297
26948 #: ../fish/guestfish-actions.pod:4301
26953 #: ../fish/guestfish-actions.pod:4303
26961 #: ../fish/guestfish-actions.pod:4309
26966 #: ../fish/guestfish-actions.pod:4311
26974 #: ../fish/guestfish-actions.pod:4319
26979 #: ../fish/guestfish-actions.pod:4321
26987 #: ../fish/guestfish-actions.pod:4329
26992 #: ../fish/guestfish-actions.pod:4331
26995 " strings-e encoding path\n"
27000 #: ../fish/guestfish-actions.pod:4333
27002 "This is like the L</strings> command, but allows you to specify the encoding "
27003 "of strings that are looked for in the source file C<path>."
27007 #: ../fish/guestfish-actions.pod:4343
27009 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
27010 "ISO-8859-X (this is what L</strings> uses)."
27014 #: ../fish/guestfish-actions.pod:4375
27015 msgid "swapoff-device"
27019 #: ../fish/guestfish-actions.pod:4377
27022 " swapoff-device device\n"
27027 #: ../fish/guestfish-actions.pod:4379
27029 "This command disables the libguestfs appliance swap device or partition "
27030 "named C<device>. See L</swapon-device>."
27034 #: ../fish/guestfish-actions.pod:4383
27035 msgid "swapoff-file"
27039 #: ../fish/guestfish-actions.pod:4385
27042 " swapoff-file file\n"
27047 #: ../fish/guestfish-actions.pod:4389
27048 msgid "swapoff-label"
27052 #: ../fish/guestfish-actions.pod:4391
27055 " swapoff-label label\n"
27060 #: ../fish/guestfish-actions.pod:4396
27061 msgid "swapoff-uuid"
27065 #: ../fish/guestfish-actions.pod:4398
27068 " swapoff-uuid uuid\n"
27073 #: ../fish/guestfish-actions.pod:4403
27074 msgid "swapon-device"
27078 #: ../fish/guestfish-actions.pod:4405
27081 " swapon-device device\n"
27086 #: ../fish/guestfish-actions.pod:4407
27088 "This command enables the libguestfs appliance to use the swap device or "
27089 "partition named C<device>. The increased memory is made available for all "
27090 "commands, for example those run using L</command> or L</sh>."
27094 #: ../fish/guestfish-actions.pod:4419
27095 msgid "swapon-file"
27099 #: ../fish/guestfish-actions.pod:4421
27102 " swapon-file file\n"
27107 #: ../fish/guestfish-actions.pod:4423
27109 "This command enables swap to a file. See L</swapon-device> for other notes."
27113 #: ../fish/guestfish-actions.pod:4426
27114 msgid "swapon-label"
27118 #: ../fish/guestfish-actions.pod:4428
27121 " swapon-label label\n"
27126 #: ../fish/guestfish-actions.pod:4430
27128 "This command enables swap to a labeled swap partition. See L</swapon-"
27129 "device> for other notes."
27133 #: ../fish/guestfish-actions.pod:4433
27134 msgid "swapon-uuid"
27138 #: ../fish/guestfish-actions.pod:4435
27141 " swapon-uuid uuid\n"
27146 #: ../fish/guestfish-actions.pod:4437
27148 "This command enables swap to a swap partition with the given UUID. See L</"
27149 "swapon-device> for other notes."
27153 #: ../fish/guestfish-actions.pod:4440
27158 #: ../fish/guestfish-actions.pod:4442
27166 #: ../fish/guestfish-actions.pod:4450
27171 #: ../fish/guestfish-actions.pod:4452
27179 #: ../fish/guestfish-actions.pod:4460
27184 #: ../fish/guestfish-actions.pod:4462
27187 " tail-n nrlines path\n"
27192 #: ../fish/guestfish-actions.pod:4475
27197 #: ../fish/guestfish-actions.pod:4477
27200 " tar-in (tarfile|-) directory\n"
27205 #: ../fish/guestfish-actions.pod:4482
27206 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
27210 #: ../fish/guestfish-actions.pod:4487
27215 #: ../fish/guestfish-actions.pod:4489
27218 " tar-out directory (tarfile|-)\n"
27223 #: ../fish/guestfish-actions.pod:4494
27224 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
27228 #: ../fish/guestfish-actions.pod:4499
27233 #: ../fish/guestfish-actions.pod:4501
27236 " tgz-in (tarball|-) directory\n"
27241 #: ../fish/guestfish-actions.pod:4506
27242 msgid "To upload an uncompressed tarball, use L</tar-in>."
27246 #: ../fish/guestfish-actions.pod:4510
27251 #: ../fish/guestfish-actions.pod:4512
27254 " tgz-out directory (tarball|-)\n"
27259 #: ../fish/guestfish-actions.pod:4517
27260 msgid "To download an uncompressed tarball, use L</tar-out>."
27264 #: ../fish/guestfish-actions.pod:4521
27269 #: ../fish/guestfish-actions.pod:4523
27277 #: ../fish/guestfish-actions.pod:4532
27282 #: ../fish/guestfish-actions.pod:4534
27290 #: ../fish/guestfish-actions.pod:4539
27291 msgid "truncate-size"
27295 #: ../fish/guestfish-actions.pod:4541
27298 " truncate-size path size\n"
27303 #: ../fish/guestfish-actions.pod:4546
27305 "If the current file size is less than C<size> then the file is extended to "
27306 "the required size with zero bytes. This creates a sparse file (ie. disk "
27307 "blocks are not allocated for the file until you write to it). To create a "
27308 "non-sparse file of zeroes, use L</fallocate64> instead."
27312 #: ../fish/guestfish-actions.pod:4552
27317 #: ../fish/guestfish-actions.pod:4554
27320 " tune2fs-l device\n"
27325 #: ../fish/guestfish-actions.pod:4564
27330 #: ../fish/guestfish-actions.pod:4566
27333 " txz-in (tarball|-) directory\n"
27338 #: ../fish/guestfish-actions.pod:4573
27343 #: ../fish/guestfish-actions.pod:4575
27346 " txz-out directory (tarball|-)\n"
27351 #: ../fish/guestfish-actions.pod:4582
27356 #: ../fish/guestfish-actions.pod:4584
27364 #: ../fish/guestfish-actions.pod:4598
27365 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
27369 #: ../fish/guestfish-actions.pod:4603
27374 #: ../fish/guestfish-actions.pod:4605
27379 #: ../fish/guestfish-actions.pod:4607
27382 " umount pathordevice\n"
27387 #: ../fish/guestfish-actions.pod:4613
27392 #: ../fish/guestfish-actions.pod:4615
27393 msgid "unmount-all"
27397 #: ../fish/guestfish-actions.pod:4617
27405 #: ../fish/guestfish-actions.pod:4623
27410 #: ../fish/guestfish-actions.pod:4625
27413 " upload (filename|-) remotefilename\n"
27418 #: ../fish/guestfish-actions.pod:4632
27419 msgid "See also L</download>."
27423 #: ../fish/guestfish-actions.pod:4636
27424 msgid "upload-offset"
27428 #: ../fish/guestfish-actions.pod:4638
27431 " upload-offset (filename|-) remotefilename offset\n"
27436 #: ../fish/guestfish-actions.pod:4650
27438 "Note that there is no limit on the amount of data that can be uploaded with "
27439 "this call, unlike with L</pwrite>, and this call always writes the full "
27440 "amount unless an error occurs."
27444 #: ../fish/guestfish-actions.pod:4655
27445 msgid "See also L</upload>, L</pwrite>."
27449 #: ../fish/guestfish-actions.pod:4659
27454 #: ../fish/guestfish-actions.pod:4661
27457 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
27462 #: ../fish/guestfish-actions.pod:4680
27467 #: ../fish/guestfish-actions.pod:4682
27475 #: ../fish/guestfish-actions.pod:4709
27477 "I<Note:> Don't use this call to test for availability of features. In "
27478 "enterprise distributions we backport features from later versions into "
27479 "earlier versions, making this an unreliable way to test for features. Use "
27480 "L</available> instead."
27484 #: ../fish/guestfish-actions.pod:4715
27489 #: ../fish/guestfish-actions.pod:4717
27492 " vfs-label device\n"
27497 #: ../fish/guestfish-actions.pod:4724
27498 msgid "To find a filesystem from the label, use L</findfs-label>."
27502 #: ../fish/guestfish-actions.pod:4726
27507 #: ../fish/guestfish-actions.pod:4728
27510 " vfs-type device\n"
27515 #: ../fish/guestfish-actions.pod:4738
27520 #: ../fish/guestfish-actions.pod:4740
27523 " vfs-uuid device\n"
27528 #: ../fish/guestfish-actions.pod:4747
27529 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
27533 #: ../fish/guestfish-actions.pod:4749
27534 msgid "vg-activate"
27538 #: ../fish/guestfish-actions.pod:4751
27541 " vg-activate true|false 'volgroups ...'\n"
27546 #: ../fish/guestfish-actions.pod:4764
27547 msgid "vg-activate-all"
27551 #: ../fish/guestfish-actions.pod:4766
27554 " vg-activate-all true|false\n"
27559 #: ../fish/guestfish-actions.pod:4776
27564 #: ../fish/guestfish-actions.pod:4778
27567 " vgcreate volgroup 'physvols ...'\n"
27572 #: ../fish/guestfish-actions.pod:4783
27577 #: ../fish/guestfish-actions.pod:4785
27580 " vglvuuids vgname\n"
27585 #: ../fish/guestfish-actions.pod:4790
27587 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
27588 "logical volumes and volume groups."
27592 #: ../fish/guestfish-actions.pod:4793
27593 msgid "See also L</vgpvuuids>."
27597 #: ../fish/guestfish-actions.pod:4795
27602 #: ../fish/guestfish-actions.pod:4797
27605 " vgpvuuids vgname\n"
27610 #: ../fish/guestfish-actions.pod:4802
27612 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
27613 "physical volumes and volume groups."
27617 #: ../fish/guestfish-actions.pod:4805
27618 msgid "See also L</vglvuuids>."
27622 #: ../fish/guestfish-actions.pod:4807
27627 #: ../fish/guestfish-actions.pod:4809
27630 " vgremove vgname\n"
27635 #: ../fish/guestfish-actions.pod:4816
27640 #: ../fish/guestfish-actions.pod:4818
27643 " vgrename volgroup newvolgroup\n"
27648 #: ../fish/guestfish-actions.pod:4822
27653 #: ../fish/guestfish-actions.pod:4824
27661 #: ../fish/guestfish-actions.pod:4832
27662 msgid "See also L</vgs-full>."
27666 #: ../fish/guestfish-actions.pod:4834
27671 #: ../fish/guestfish-actions.pod:4836
27679 #: ../fish/guestfish-actions.pod:4841
27684 #: ../fish/guestfish-actions.pod:4843
27692 #: ../fish/guestfish-actions.pod:4848
27697 #: ../fish/guestfish-actions.pod:4850
27705 #: ../fish/guestfish-actions.pod:4854
27710 #: ../fish/guestfish-actions.pod:4856
27718 #: ../fish/guestfish-actions.pod:4861
27723 #: ../fish/guestfish-actions.pod:4863
27731 #: ../fish/guestfish-actions.pod:4868
27736 #: ../fish/guestfish-actions.pod:4870
27744 #: ../fish/guestfish-actions.pod:4875
27749 #: ../fish/guestfish-actions.pod:4877
27752 " write path content\n"
27757 #: ../fish/guestfish-actions.pod:4885
27762 #: ../fish/guestfish-actions.pod:4887
27765 " write-file path content size\n"
27770 #: ../fish/guestfish-actions.pod:4910
27775 #: ../fish/guestfish-actions.pod:4912
27778 " zegrep regex path\n"
27783 #: ../fish/guestfish-actions.pod:4920
27788 #: ../fish/guestfish-actions.pod:4922
27791 " zegrepi regex path\n"
27796 #: ../fish/guestfish-actions.pod:4930
27801 #: ../fish/guestfish-actions.pod:4932
27809 #: ../fish/guestfish-actions.pod:4940
27810 msgid "See also: L</zero-device>, L</scrub-device>."
27814 #: ../fish/guestfish-actions.pod:4942
27815 msgid "zero-device"
27819 #: ../fish/guestfish-actions.pod:4944
27822 " zero-device device\n"
27827 #: ../fish/guestfish-actions.pod:4946
27829 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
27830 "which just zeroes the first few blocks of a device."
27834 #: ../fish/guestfish-actions.pod:4953
27839 #: ../fish/guestfish-actions.pod:4955
27842 " zerofree device\n"
27847 #: ../fish/guestfish-actions.pod:4968
27852 #: ../fish/guestfish-actions.pod:4970
27855 " zfgrep pattern path\n"
27860 #: ../fish/guestfish-actions.pod:4978
27865 #: ../fish/guestfish-actions.pod:4980
27868 " zfgrepi pattern path\n"
27873 #: ../fish/guestfish-actions.pod:4988
27878 #: ../fish/guestfish-actions.pod:4990
27881 " zfile meth path\n"
27886 #: ../fish/guestfish-actions.pod:4997
27888 "Since 1.0.63, use L</file> instead which can now process compressed files."
27892 #: ../fish/guestfish-actions.pod:5007
27897 #: ../fish/guestfish-actions.pod:5009
27900 " zgrep regex path\n"
27905 #: ../fish/guestfish-actions.pod:5017
27910 #: ../fish/guestfish-actions.pod:5019
27913 " zgrepi regex path\n"
27918 #: ../fish/guestfish-commands.pod:1
27923 #: ../fish/guestfish-commands.pod:3
27928 #: ../fish/guestfish-commands.pod:5
27931 " alloc filename size\n"
27936 #: ../fish/guestfish-commands.pod:7
27938 "This creates an empty (zeroed) file of the given size, and then adds so it "
27939 "can be further examined."
27943 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
27944 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
27948 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
27949 msgid "Size can be specified using standard suffixes, eg. C<1M>."
27953 #: ../fish/guestfish-commands.pod:14
27955 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
27956 "image, see L</PREPARED DISK IMAGES>."
27960 #: ../fish/guestfish-commands.pod:17
27965 #: ../fish/guestfish-commands.pod:19
27968 " copy-in local [local ...] /remotedir\n"
27973 #: ../fish/guestfish-commands.pod:21
27975 "C<copy-in> copies local files or directories recursively into the disk "
27976 "image, placing them in the directory called C</remotedir> (which must "
27977 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
27978 "other commands as necessary."
27982 #: ../fish/guestfish-commands.pod:26
27984 "Multiple local files and directories can be specified, but the last "
27985 "parameter must always be a remote directory. Wildcards cannot be used."
27989 #: ../fish/guestfish-commands.pod:30
27994 #: ../fish/guestfish-commands.pod:32
27997 " copy-out remote [remote ...] localdir\n"
28002 #: ../fish/guestfish-commands.pod:34
28004 "C<copy-out> copies remote files or directories recursively out of the disk "
28005 "image, placing them on the host disk in a local directory called C<localdir> "
28006 "(which must exist). This guestfish meta-command turns into a sequence of L</"
28007 "download>, L</tar-out> and other commands as necessary."
28011 #: ../fish/guestfish-commands.pod:40
28013 "Multiple remote files and directories can be specified, but the last "
28014 "parameter must always be a local directory. To download to the current "
28015 "directory, use C<.> as in:"
28019 #: ../fish/guestfish-commands.pod:44
28022 " copy-out /home .\n"
28027 #: ../fish/guestfish-commands.pod:46
28029 "Wildcards cannot be used in the ordinary command, but you can use them with "
28030 "the help of L</glob> like this:"
28034 #: ../fish/guestfish-commands.pod:49
28037 " glob copy-out /home/* .\n"
28042 #: ../fish/guestfish-commands.pod:51
28047 #: ../fish/guestfish-commands.pod:53
28050 " echo [params ...]\n"
28055 #: ../fish/guestfish-commands.pod:55
28056 msgid "This echos the parameters to the terminal."
28060 #: ../fish/guestfish-commands.pod:57
28065 #: ../fish/guestfish-commands.pod:59
28070 #: ../fish/guestfish-commands.pod:61
28075 #: ../fish/guestfish-commands.pod:63
28083 #: ../fish/guestfish-commands.pod:65
28085 "This is used to edit a file. It downloads the file, edits it locally using "
28086 "your editor, then uploads the result."
28090 #: ../fish/guestfish-commands.pod:68
28092 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
28093 "or C<emacs> you will get those corresponding editors."
28097 #: ../fish/guestfish-commands.pod:72
28102 #: ../fish/guestfish-commands.pod:74
28105 " glob command args...\n"
28110 #: ../fish/guestfish-commands.pod:76
28112 "Expand wildcards in any paths in the args list, and run C<command> "
28113 "repeatedly on each matching path."
28117 #: ../fish/guestfish-commands.pod:79
28118 msgid "See L</WILDCARDS AND GLOBBING>."
28122 #: ../fish/guestfish-commands.pod:81
28127 #: ../fish/guestfish-commands.pod:83
28130 " hexedit <filename|device>\n"
28131 " hexedit <filename|device> <max>\n"
28132 " hexedit <filename|device> <start> <max>\n"
28137 #: ../fish/guestfish-commands.pod:87
28139 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
28144 #: ../fish/guestfish-commands.pod:90
28146 "This command works by downloading potentially the whole file or device, "
28147 "editing it locally, then uploading it. If the file or device is large, you "
28148 "have to specify which part you wish to edit by using C<max> and/or C<start> "
28149 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
28150 "usual modifiers allowed such as C<1M> (1 megabyte)."
28154 #: ../fish/guestfish-commands.pod:97
28155 msgid "For example to edit the first few sectors of a disk you might do:"
28159 #: ../fish/guestfish-commands.pod:100
28162 " hexedit /dev/sda 1M\n"
28167 #: ../fish/guestfish-commands.pod:102
28169 "which would allow you to edit anywhere within the first megabyte of the disk."
28173 #: ../fish/guestfish-commands.pod:105
28174 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
28178 #: ../fish/guestfish-commands.pod:107
28181 " hexedit /dev/sda1 0x400 0x400\n"
28186 #: ../fish/guestfish-commands.pod:109
28187 msgid "(assuming the superblock is in the standard location)."
28191 #: ../fish/guestfish-commands.pod:111
28193 "This command requires the external L<hexedit(1)> program. You can specify "
28194 "another program to use by setting the C<HEXEDITOR> environment variable."
28198 #: ../fish/guestfish-commands.pod:115
28199 msgid "See also L</hexdump>."
28203 #: ../fish/guestfish-commands.pod:117
28208 #: ../fish/guestfish-commands.pod:119
28216 #: ../fish/guestfish-commands.pod:121
28218 "Change the local directory, ie. the current directory of guestfish itself."
28222 #: ../fish/guestfish-commands.pod:124
28223 msgid "Note that C<!cd> won't do what you might expect."
28227 #: ../fish/guestfish-commands.pod:126
28232 #: ../fish/guestfish-commands.pod:128
28237 #: ../fish/guestfish-commands.pod:130
28245 #: ../fish/guestfish-commands.pod:132
28246 msgid "Opens the manual page for guestfish."
28250 #: ../fish/guestfish-commands.pod:134
28255 #: ../fish/guestfish-commands.pod:136
28260 #: ../fish/guestfish-commands.pod:138
28268 #: ../fish/guestfish-commands.pod:140
28276 #: ../fish/guestfish-commands.pod:142
28277 msgid "This is used to view a file."
28281 #: ../fish/guestfish-commands.pod:144
28283 "The default viewer is C<$PAGER>. However if you use the alternate command "
28284 "C<less> you will get the C<less> command specifically."
28288 #: ../fish/guestfish-commands.pod:147
28293 #: ../fish/guestfish-commands.pod:149
28301 #: ../fish/guestfish-commands.pod:151
28303 "Close and reopen the libguestfs handle. It is not necessary to use this "
28304 "normally, because the handle is closed properly when guestfish exits. "
28305 "However this is occasionally useful for testing."
28309 #: ../fish/guestfish-commands.pod:155
28314 #: ../fish/guestfish-commands.pod:157
28317 " sparse filename size\n"
28322 #: ../fish/guestfish-commands.pod:159
28324 "This creates an empty sparse file of the given size, and then adds so it can "
28325 "be further examined."
28329 #: ../fish/guestfish-commands.pod:162
28331 "In all respects it works the same as the L</alloc> command, except that the "
28332 "image file is allocated sparsely, which means that disk blocks are not "
28333 "assigned to the file until they are needed. Sparse disk files only use "
28334 "space when written to, but they are slower and there is a danger you could "
28335 "run out of real disk space during a write operation."
28339 #: ../fish/guestfish-commands.pod:172
28344 #: ../fish/guestfish-commands.pod:174
28352 #: ../fish/guestfish-commands.pod:176
28354 "This command returns a list of the optional groups known to the daemon, and "
28355 "indicates which ones are supported by this build of the libguestfs appliance."
28359 #: ../fish/guestfish-commands.pod:180
28360 msgid "See also L<guestfs(3)/AVAILABILITY>."
28364 #: ../fish/guestfish-commands.pod:182
28369 #: ../fish/guestfish-commands.pod:184
28372 " time command args...\n"
28377 #: ../fish/guestfish-commands.pod:186
28379 "Run the command as usual, but print the elapsed time afterwards. This can "
28380 "be useful for benchmarking operations."
28384 #: ../test-tool/libguestfs-test-tool.pod:5
28385 msgid "libguestfs-test-tool - End user tests for libguestfs"
28389 #: ../test-tool/libguestfs-test-tool.pod:9
28392 " libguestfs-test-tool [--options]\n"
28397 #: ../test-tool/libguestfs-test-tool.pod:13
28399 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
28400 "and developers, to allow them to check basic libguestfs functionality is "
28401 "working. This is needed because libguestfs occasionally breaks for reasons "
28402 "beyond our control: usually because of changes in the underlying qemu or "
28403 "kernel packages, or the host environment."
28407 #: ../test-tool/libguestfs-test-tool.pod:20
28408 msgid "If you suspect a problem in libguestfs, then just run:"
28412 #: ../test-tool/libguestfs-test-tool.pod:22
28415 " libguestfs-test-tool\n"
28420 #: ../test-tool/libguestfs-test-tool.pod:24
28421 msgid "It will print lots of diagnostic messages."
28425 #: ../test-tool/libguestfs-test-tool.pod:26
28426 msgid "If it runs to completion successfully, you will see this near the end:"
28430 #: ../test-tool/libguestfs-test-tool.pod:28
28433 " ===== TEST FINISHED OK =====\n"
28438 #: ../test-tool/libguestfs-test-tool.pod:30
28439 msgid "and the test tool will exit with code 0."
28443 #: ../test-tool/libguestfs-test-tool.pod:32
28445 "If it fails (and/or exits with non-zero error code), please paste the "
28446 "B<complete, unedited> output of the test tool into a bug report. More "
28447 "information about reporting bugs can be found on the L<http://libguestfs.org/"
28452 #: ../test-tool/libguestfs-test-tool.pod:41
28457 #: ../test-tool/libguestfs-test-tool.pod:43
28458 msgid "Display short usage information and exit."
28462 #: ../test-tool/libguestfs-test-tool.pod:45
28463 msgid "I<--qemu qemu_binary>"
28467 #: ../test-tool/libguestfs-test-tool.pod:47
28469 "If you have downloaded another qemu binary, point this option at the full "
28470 "path of the binary to try it."
28474 #: ../test-tool/libguestfs-test-tool.pod:50
28475 msgid "I<--qemudir qemu_source_dir>"
28479 #: ../test-tool/libguestfs-test-tool.pod:52
28481 "If you have compiled qemu from source, point this option at the source "
28482 "directory to try it."
28486 #: ../test-tool/libguestfs-test-tool.pod:55
28487 msgid "I<--timeout N>"
28491 #: ../test-tool/libguestfs-test-tool.pod:57
28493 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
28494 "does not usually need to be adjusted unless your machine is very slow."
28498 #: ../test-tool/libguestfs-test-tool.pod:63
28499 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
28503 #: ../test-tool/libguestfs-test-tool.pod:65
28505 "If you have compiled another version of qemu from source and would like to "
28506 "try that, then you can use the I<--qemudir> option to point to the qemu "
28507 "source directory."
28511 #: ../test-tool/libguestfs-test-tool.pod:69
28513 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
28514 "option to point to the binary."
28518 #: ../test-tool/libguestfs-test-tool.pod:72
28520 "When using an alternate qemu with libguestfs, usually you would need to "
28521 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in L<guestfs(3)"
28522 ">). libguestfs-test-tool writes a temporary qemu wrapper script when you "
28523 "use either of the I<--qemudir> or I<--qemu> options."
28527 #: ../test-tool/libguestfs-test-tool.pod:79
28529 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
28530 "I<1> if there was an error."
28534 #: ../test-tool/libguestfs-test-tool.pod:84
28536 "For the full list of environment variables which may affect libguestfs, "
28537 "please see the L<guestfs(3)> manual page."
28541 #: ../test-tool/libguestfs-test-tool.pod:89
28542 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
28546 #: ../fuse/guestmount.pod:5
28548 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
28552 #: ../fuse/guestmount.pod:9
28555 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
28560 #: ../fuse/guestmount.pod:11
28563 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
28568 #: ../fuse/guestmount.pod:13
28571 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
28576 #: ../fuse/guestmount.pod:17
28578 "You must I<not> use C<guestmount> in read-write mode on live virtual "
28579 "machines. If you do this, you risk disk corruption in the VM."
28583 #: ../fuse/guestmount.pod:22
28585 "The guestmount program can be used to mount virtual machine filesystems and "
28586 "other disk images on the host. It uses libguestfs for access to the guest "
28587 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
28588 "a mountable device."
28592 #: ../fuse/guestmount.pod:27
28594 "Along with other options, you have to give at least one device (I<-a> "
28595 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
28596 "option) or use the I<-i> inspection option. How this works is better "
28597 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
28602 #: ../fuse/guestmount.pod:33
28604 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
28605 "by you, and the filesystem will not be visible to any other users unless you "
28606 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
28607 "the filesystem, use the C<fusermount -u> command."
28611 #: ../fuse/guestmount.pod:41
28613 "For a typical Windows guest which has its main filesystem on the first "
28618 #: ../fuse/guestmount.pod:44
28621 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
28626 #: ../fuse/guestmount.pod:46
28628 "For a typical Linux guest which has a /boot filesystem on the first "
28629 "partition, and the root filesystem on a logical volume:"
28633 #: ../fuse/guestmount.pod:49
28636 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
28641 #: ../fuse/guestmount.pod:51
28642 msgid "To get libguestfs to detect guest mountpoints for you:"
28646 #: ../fuse/guestmount.pod:53
28649 " guestmount -a guest.img -i --ro /mnt\n"
28654 #: ../fuse/guestmount.pod:55
28655 msgid "For a libvirt guest called \"Guest\" you could do:"
28659 #: ../fuse/guestmount.pod:57
28662 " guestmount -d Guest -i --ro /mnt\n"
28667 #: ../fuse/guestmount.pod:59
28669 "If you don't know what filesystems are contained in a guest or disk image, "
28670 "use L<virt-filesystems(1)> first:"
28674 #: ../fuse/guestmount.pod:62
28677 " virt-filesystems MyGuest\n"
28682 #: ../fuse/guestmount.pod:64
28684 "If you want to trace the libguestfs calls but without excessive debugging "
28685 "information, we recommend:"
28689 #: ../fuse/guestmount.pod:67
28692 " guestmount [...] --trace /mnt\n"
28697 #: ../fuse/guestmount.pod:69
28698 msgid "If you want to debug the program, we recommend:"
28702 #: ../fuse/guestmount.pod:71
28705 " guestmount [...] --trace --verbose /mnt\n"
28710 #: ../fuse/guestmount.pod:77
28711 msgid "B<-a image> | B<--add image>"
28715 #: ../fuse/guestmount.pod:79
28716 msgid "Add a block device or virtual machine image."
28720 #: ../fuse/guestmount.pod:84
28721 msgid "B<-c URI> | B<--connect URI>"
28725 #: ../fuse/guestmount.pod:90
28726 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
28730 #: ../fuse/guestmount.pod:98
28731 msgid "B<--dir-cache-timeout N>"
28735 #: ../fuse/guestmount.pod:100
28737 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
28738 "seconds. The readdir cache [actually, there are several semi-independent "
28739 "caches] is populated after a readdir(2) call with the stat and extended "
28740 "attributes of the files in the directory, in anticipation that they will be "
28741 "requested soon after."
28745 #: ../fuse/guestmount.pod:106
28747 "There is also a different attribute cache implemented by FUSE (see the FUSE "
28748 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
28749 "requests, only cache existing ones."
28753 #: ../fuse/guestmount.pod:117
28754 msgid "B<--format=raw|qcow2|..> | B<--format>"
28758 #: ../fuse/guestmount.pod:124
28760 "If you have untrusted raw-format guest disk images, you should use this "
28761 "option to specify the disk format. This avoids a possible security problem "
28762 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
28763 "guestfs_add_drive_opts>."
28767 #: ../fuse/guestmount.pod:129
28768 msgid "B<--fuse-help>"
28772 #: ../fuse/guestmount.pod:131
28773 msgid "Display help on special FUSE options (see I<-o> below)."
28777 #: ../fuse/guestmount.pod:135
28778 msgid "Display brief help and exit."
28782 #: ../fuse/guestmount.pod:137
28783 msgid "B<-i> | B<--inspector>"
28787 #: ../fuse/guestmount.pod:157
28789 "Mount the named partition or logical volume on the given mountpoint B<in the "
28790 "guest> (this has nothing to do with mountpoints in the host)."
28794 #: ../fuse/guestmount.pod:160
28796 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
28797 "something on C</>."
28801 #: ../fuse/guestmount.pod:173
28802 msgid "B<-n> | B<--no-sync>"
28806 #: ../fuse/guestmount.pod:175
28808 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
28809 "unmounted. If you specify this option, then we don't attempt to sync the "
28810 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
28814 #: ../fuse/guestmount.pod:180
28815 msgid "B<-o option> | B<--option option>"
28819 #: ../fuse/guestmount.pod:182
28820 msgid "Pass extra options to FUSE."
28824 #: ../fuse/guestmount.pod:184
28826 "To get a list of all the extra options supported by FUSE, use the command "
28827 "below. Note that only the FUSE I<-o> options can be passed, and only some "
28828 "of them are a good idea."
28832 #: ../fuse/guestmount.pod:188
28835 " guestmount --fuse-help\n"
28840 #: ../fuse/guestmount.pod:190
28841 msgid "Some potentially useful FUSE options:"
28845 #: ../fuse/guestmount.pod:194
28846 msgid "B<-o allow_other>"
28850 #: ../fuse/guestmount.pod:196
28851 msgid "Allow other users to see the filesystem."
28855 #: ../fuse/guestmount.pod:198
28856 msgid "B<-o attr_timeout=N>"
28860 #: ../fuse/guestmount.pod:200
28861 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
28865 #: ../fuse/guestmount.pod:202
28866 msgid "B<-o kernel_cache>"
28870 #: ../fuse/guestmount.pod:204
28872 "Allow the kernel to cache files (reduces the number of reads that have to go "
28873 "through the L<guestfs(3)> API). This is generally a good idea if you can "
28874 "afford the extra memory usage."
28878 #: ../fuse/guestmount.pod:208
28879 msgid "B<-o uid=N> B<-o gid=N>"
28883 #: ../fuse/guestmount.pod:210
28885 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
28886 "the chosen values."
28890 #: ../fuse/guestmount.pod:215
28891 msgid "B<-r> | B<--ro>"
28895 #: ../fuse/guestmount.pod:217
28897 "Add devices and mount everything read-only. Also disallow writes and make "
28898 "the disk appear read-only to FUSE."
28902 #: ../fuse/guestmount.pod:220
28904 "This is highly recommended if you are not going to edit the guest disk. If "
28905 "the guest is running and this option is I<not> supplied, then there is a "
28906 "strong risk of disk corruption in the guest. We try to prevent this from "
28907 "happening, but it is not always possible."
28911 #: ../fuse/guestmount.pod:225
28912 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
28916 #: ../fuse/guestmount.pod:229
28917 msgid "Enable SELinux support for the guest."
28921 #: ../fuse/guestmount.pod:231
28922 msgid "B<-v> | B<--verbose>"
28926 #: ../fuse/guestmount.pod:233
28927 msgid "Enable verbose messages from underlying libguestfs."
28931 #: ../fuse/guestmount.pod:235
28932 msgid "B<-V> | B<--version>"
28936 #: ../fuse/guestmount.pod:237
28937 msgid "Display the program version and exit."
28941 #: ../fuse/guestmount.pod:239
28942 msgid "B<-w> | B<--rw>"
28946 #: ../fuse/guestmount.pod:244 ../fuse/guestmount.pod:265
28947 msgid "See L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
28951 #: ../fuse/guestmount.pod:246
28952 msgid "B<-x> | B<--trace>"
28956 #: ../fuse/guestmount.pod:248
28957 msgid "Trace libguestfs calls and entry into each FUSE function."
28961 #: ../fuse/guestmount.pod:250
28962 msgid "This also stops the daemon from forking into the background."
28966 #: ../fuse/guestmount.pod:271
28968 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
28969 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
28974 #: ../fuse/guestmount.pod:286
28975 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
28979 #: ../tools/virt-win-reg.pl:37
28981 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
28985 #: ../tools/virt-win-reg.pl:41
28988 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
28993 #: ../tools/virt-win-reg.pl:43
28996 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
29001 #: ../tools/virt-win-reg.pl:45
29004 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
29009 #: ../tools/virt-win-reg.pl:47
29012 " virt-win-reg --merge domname [input.reg ...]\n"
29017 #: ../tools/virt-win-reg.pl:49
29020 " virt-win-reg [--options] disk.img ... # instead of domname\n"
29025 #: ../tools/virt-win-reg.pl:53
29027 "You must I<not> use C<virt-win-reg> with the I<--merge> option on live "
29028 "virtual machines. If you do this, you I<will> get irreversible disk "
29029 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
29030 "but doesn't catch all cases."
29034 #: ../tools/virt-win-reg.pl:58
29036 "Modifying the Windows Registry is an inherently risky operation. The format "
29037 "is deliberately obscure and undocumented, and Registry changes can leave the "
29038 "system unbootable. Therefore when using the I<--merge> option, make sure "
29039 "you have a reliable backup first."
29043 #: ../tools/virt-win-reg.pl:65
29045 "This program can export and merge Windows Registry entries from a Windows "
29050 #: ../tools/virt-win-reg.pl:68
29052 "The first parameter is the libvirt guest name or the raw disk image of a "
29057 #: ../tools/virt-win-reg.pl:71
29059 "If I<--merge> is I<not> specified, then the chosen registry key is displayed/"
29060 "exported (recursively). For example:"
29064 #: ../tools/virt-win-reg.pl:74
29067 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
29072 #: ../tools/virt-win-reg.pl:76
29074 "You can also display single values from within registry keys, for example:"
29078 #: ../tools/virt-win-reg.pl:79
29081 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
29082 " $ virt-win-reg Windows7 $cvkey ProductName\n"
29083 " Windows 7 Enterprise\n"
29088 #: ../tools/virt-win-reg.pl:83
29090 "With I<--merge>, you can merge a textual regedit file into the Windows "
29095 #: ../tools/virt-win-reg.pl:86
29098 " $ virt-win-reg --merge Windows7 changes.reg\n"
29103 #: ../tools/virt-win-reg.pl:88 ../tools/virt-tar.pl:45
29108 #: ../tools/virt-win-reg.pl:90
29110 "This program is only meant for simple access to the registry. If you want "
29111 "to do complicated things with the registry, we suggest you download the "
29112 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
29113 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
29114 "L<hivexregedit(1)>."
29118 #: ../tools/virt-win-reg.pl:106 ../tools/virt-list-filesystems.pl:63
29119 #: ../tools/virt-tar.pl:113 ../tools/virt-make-fs.pl:163
29120 #: ../tools/virt-list-partitions.pl:64
29121 msgid "Display brief help."
29125 #: ../tools/virt-win-reg.pl:114 ../tools/virt-list-filesystems.pl:71
29126 #: ../tools/virt-tar.pl:121 ../tools/virt-make-fs.pl:171
29127 #: ../tools/virt-list-partitions.pl:72
29128 msgid "Display version number and exit."
29132 #: ../tools/virt-win-reg.pl:120 ../tools/virt-make-fs.pl:177
29137 #: ../tools/virt-win-reg.pl:122
29138 msgid "Enable debugging messages."
29142 #: ../tools/virt-win-reg.pl:128 ../tools/virt-list-filesystems.pl:77
29143 #: ../tools/virt-tar.pl:127 ../tools/virt-list-partitions.pl:78
29144 msgid "B<--connect URI> | B<-c URI>"
29148 #: ../tools/virt-win-reg.pl:130 ../tools/virt-list-filesystems.pl:79
29149 #: ../tools/virt-tar.pl:129 ../tools/virt-list-partitions.pl:80
29151 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
29152 "to the default libvirt hypervisor."
29156 #: ../tools/virt-win-reg.pl:133 ../tools/virt-list-filesystems.pl:82
29157 #: ../tools/virt-tar.pl:132 ../tools/virt-list-partitions.pl:83
29159 "If you specify guest block devices directly, then libvirt is not used at all."
29163 #: ../tools/virt-win-reg.pl:140 ../tools/virt-list-filesystems.pl:89
29164 #: ../tools/virt-tar.pl:139 ../tools/virt-list-partitions.pl:90
29165 msgid "B<--format> raw"
29169 #: ../tools/virt-win-reg.pl:142 ../tools/virt-list-filesystems.pl:91
29170 #: ../tools/virt-tar.pl:141 ../tools/virt-list-partitions.pl:92
29172 "Specify the format of disk images given on the command line. If this is "
29173 "omitted then the format is autodetected from the content of the disk image."
29177 #: ../tools/virt-win-reg.pl:146 ../tools/virt-list-filesystems.pl:95
29178 #: ../tools/virt-tar.pl:145 ../tools/virt-list-partitions.pl:96
29180 "If disk images are requested from libvirt, then this program asks libvirt "
29181 "for this information. In this case, the value of the format parameter is "
29186 #: ../tools/virt-win-reg.pl:150 ../tools/virt-list-filesystems.pl:99
29187 #: ../tools/virt-tar.pl:149 ../tools/virt-list-partitions.pl:100
29189 "If working with untrusted raw-format guest disk images, you should ensure "
29190 "the format is always specified."
29194 #: ../tools/virt-win-reg.pl:157
29199 #: ../tools/virt-win-reg.pl:159
29201 "In merge mode, this merges a textual regedit file into the Windows Registry "
29202 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
29203 "displays or exports Registry entries instead."
29207 #: ../tools/virt-win-reg.pl:163
29209 "Note that I<--merge> is I<unsafe> to use on live virtual machines, and will "
29210 "result in disk corruption. However exporting (without this flag) is always "
29215 #: ../tools/virt-win-reg.pl:171
29216 msgid "B<--encoding> UTF-16LE|ASCII"
29220 #: ../tools/virt-win-reg.pl:173
29222 "When merging (only), you may need to specify the encoding for strings to be "
29223 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
29224 "(3)/ENCODING STRINGS>."
29228 #: ../tools/virt-win-reg.pl:177
29230 "The default is to use UTF-16LE, which should work with recent versions of "
29235 #: ../tools/virt-win-reg.pl:184
29236 msgid "B<--unsafe-printable-strings>"
29240 #: ../tools/virt-win-reg.pl:186
29242 "When exporting (only), assume strings are UTF-16LE and print them as strings "
29243 "instead of hex sequences. Remove the final zero codepoint from strings if "
29248 #: ../tools/virt-win-reg.pl:190
29250 "This is unsafe and does not preserve the fidelity of strings in the original "
29251 "Registry for various reasons:"
29255 #: ../tools/virt-win-reg.pl:197
29257 "Assumes the original encoding is UTF-16LE. ASCII strings and strings in "
29258 "other encodings will be corrupted by this transformation."
29262 #: ../tools/virt-win-reg.pl:202
29264 "Assumes that everything which has type 1 or 2 is really a string and that "
29265 "everything else is not a string, but the type field in real Registries is "
29270 #: ../tools/virt-win-reg.pl:208
29272 "Loses information about whether a zero codepoint followed the string in the "
29277 #: ../tools/virt-win-reg.pl:213
29279 "This all happens because the Registry itself contains no information about "
29280 "how strings are encoded (see L<Win::Hivex::Regedit(3)/ENCODING STRINGS>)."
29284 #: ../tools/virt-win-reg.pl:217
29286 "You should only use this option for quick hacking and debugging of the "
29287 "Registry contents, and I<never> use it if the output is going to be passed "
29288 "into another program or stored in another Registry."
29292 #: ../tools/virt-win-reg.pl:553
29293 msgid "SUPPORTED SYSTEMS"
29297 #: ../tools/virt-win-reg.pl:555
29299 "The program currently supports Windows NT-derived guests starting with "
29300 "Windows XP through to at least Windows 7."
29304 #: ../tools/virt-win-reg.pl:558
29305 msgid "The following Registry keys are supported:"
29309 #: ../tools/virt-win-reg.pl:562
29310 msgid "C<HKEY_LOCAL_MACHINE\\SAM>"
29314 #: ../tools/virt-win-reg.pl:564
29315 msgid "C<HKEY_LOCAL_MACHINE\\SECURITY>"
29319 #: ../tools/virt-win-reg.pl:566
29320 msgid "C<HKEY_LOCAL_MACHINE\\SOFTWARE>"
29324 #: ../tools/virt-win-reg.pl:568
29325 msgid "C<HKEY_LOCAL_MACHINE\\SYSTEM>"
29329 #: ../tools/virt-win-reg.pl:570
29330 msgid "C<HKEY_USERS\\.DEFAULT>"
29334 #: ../tools/virt-win-reg.pl:572
29335 msgid "C<HKEY_USERS\\I<SID>>"
29339 #: ../tools/virt-win-reg.pl:574
29340 msgid "where I<SID> is a Windows User SID (eg. C<S-1-5-18>)."
29344 #: ../tools/virt-win-reg.pl:576
29345 msgid "C<HKEY_USERS\\I<username>>"
29349 #: ../tools/virt-win-reg.pl:578
29351 "where I<username> is a local user name (this is a libguestfs extension)."
29355 #: ../tools/virt-win-reg.pl:582
29357 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
29362 #: ../tools/virt-win-reg.pl:585
29364 "The literal keys C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are not "
29365 "supported (there is no \"current user\")."
29369 #: ../tools/virt-win-reg.pl:588
29374 #: ../tools/virt-win-reg.pl:590
29376 "C<virt-win-reg> expects that regedit files have already been reencoded in "
29377 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
29378 "style line endings. Since Windows regedit files are often in UTF-16LE with "
29379 "Windows-style line endings, you may need to reencode the whole file before "
29380 "or after processing."
29384 #: ../tools/virt-win-reg.pl:596
29386 "To reencode a file from Windows format to Linux (before processing it with "
29387 "the I<--merge> option), you would do something like this:"
29391 #: ../tools/virt-win-reg.pl:599
29394 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
29399 #: ../tools/virt-win-reg.pl:601
29401 "To go in the opposite direction, after exporting and before sending the file "
29402 "to a Windows user, do something like this:"
29406 #: ../tools/virt-win-reg.pl:604
29409 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
29414 #: ../tools/virt-win-reg.pl:606
29415 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
29419 #: ../tools/virt-win-reg.pl:608
29421 "If you are unsure about the current encoding, use the L<file(1)> command. "
29422 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
29423 "style (CRLF) line endings, like this:"
29427 #: ../tools/virt-win-reg.pl:612
29430 " $ file software.reg\n"
29431 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
29432 " with CRLF line terminators\n"
29437 #: ../tools/virt-win-reg.pl:616
29438 msgid "This file would need conversion before you could I<--merge> it."
29442 #: ../tools/virt-win-reg.pl:618
29443 msgid "CurrentControlSet etc."
29447 #: ../tools/virt-win-reg.pl:620
29449 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
29450 "Registry at the level of the hive file, and therefore you cannot modify "
29455 #: ../tools/virt-win-reg.pl:624
29457 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
29458 "circumstances it might refer to another control set. The way to find out is "
29459 "to look at the C<HKLM\\SYSTEM\\Select> key:"
29463 #: ../tools/virt-win-reg.pl:628
29466 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
29467 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
29468 " \"Current\"=dword:00000001\n"
29469 " \"Default\"=dword:00000001\n"
29470 " \"Failed\"=dword:00000000\n"
29471 " \"LastKnownGood\"=dword:00000002\n"
29476 #: ../tools/virt-win-reg.pl:635
29477 msgid "\"Current\" is the one which Windows will choose when it boots."
29481 #: ../tools/virt-win-reg.pl:637
29483 "Similarly, other C<Current...> keys in the path may need to be replaced."
29487 #: ../tools/virt-win-reg.pl:640
29488 msgid "WINDOWS TIPS"
29492 #: ../tools/virt-win-reg.pl:642
29494 "Note that some of these tips modify the guest disk image. The guest I<must> "
29495 "be shut off, else you will get disk corruption."
29499 #: ../tools/virt-win-reg.pl:645
29500 msgid "RUNNING A BATCH SCRIPT WHEN A USER LOGS IN"
29504 #: ../tools/virt-win-reg.pl:647
29506 "Prepare a DOS batch script, VBScript or executable. Upload this using "
29507 "L<guestfish(1)>. For this example the script is called C<test.bat> and it "
29508 "is uploaded into C<C:\\>:"
29512 #: ../tools/virt-win-reg.pl:651
29515 " guestfish -i -d WindowsGuest upload test.bat /test.bat\n"
29520 #: ../tools/virt-win-reg.pl:653
29521 msgid "Prepare a regedit file containing the registry change:"
29525 #: ../tools/virt-win-reg.pl:655
29528 " cat > test.reg <<'EOF'\n"
29529 " [HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce]\n"
29530 " \"Test\"=\"c:\\\\test.bat\"\n"
29536 #: ../tools/virt-win-reg.pl:660
29538 "In this example we use the key C<RunOnce> which means that the script will "
29539 "run precisely once when the first user logs in. If you want it to run every "
29540 "time a user logs in, replace C<RunOnce> with C<Run>."
29544 #: ../tools/virt-win-reg.pl:664
29545 msgid "Now update the registry:"
29549 #: ../tools/virt-win-reg.pl:666
29552 " virt-win-reg --merge WindowsGuest test.reg\n"
29557 #: ../tools/virt-win-reg.pl:668
29558 msgid "INSTALLING A SERVICE"
29562 #: ../tools/virt-win-reg.pl:670
29564 "This section assumes you are familiar with Windows services, and you either "
29565 "have a program which handles the Windows Service Control Protocol directly "
29566 "or you want to run any program using a service wrapper like SrvAny or the "
29571 #: ../tools/virt-win-reg.pl:675
29573 "First upload the program and optionally the service wrapper. In this case "
29574 "the test program is called C<test.exe> and we are using the RHSrvAny wrapper:"
29578 #: ../tools/virt-win-reg.pl:679
29581 " guestfish -i -d WindowsGuest <<EOF\n"
29582 " upload rhsrvany.exe /rhsrvany.exe\n"
29583 " upload test.exe /test.exe\n"
29589 #: ../tools/virt-win-reg.pl:684
29591 "Prepare a regedit file containing the registry changes. In this example, "
29592 "the first registry change is needed for the service itself or the service "
29593 "wrapper (if used). The second registry change is only needed because I am "
29594 "using the RHSrvAny service wrapper."
29598 #: ../tools/virt-win-reg.pl:689
29601 " cat > service.reg <<'EOF'\n"
29602 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny]\n"
29603 " \"Type\"=dword:00000010\n"
29604 " \"Start\"=dword:00000002\n"
29605 " \"ErrorControl\"=dword:00000001\n"
29606 " \"ImagePath\"=\"c:\\\\rhsrvany.exe\"\n"
29607 " \"DisplayName\"=\"RHSrvAny\"\n"
29608 " \"ObjectName\"=\"NetworkService\"\n"
29613 #: ../tools/virt-win-reg.pl:698
29616 " [HKLM\\SYSTEM\\ControlSet001\\services\\RHSrvAny\\Parameters]\n"
29617 " \"CommandLine\"=\"c:\\\\test.exe\"\n"
29618 " \"PWD\"=\"c:\\\\Temp\"\n"
29624 #: ../tools/virt-win-reg.pl:709
29626 "For use of C<ControlSet001> see the section above in this manual page. You "
29627 "may need to adjust this according to the control set that is in use by the "
29632 #: ../tools/virt-win-reg.pl:715
29634 "C<\"ObjectName\"> controls the privileges that the service will have. An "
29635 "alternative is C<\"ObjectName\"=\"LocalSystem\"> which would be the most "
29636 "privileged account."
29640 #: ../tools/virt-win-reg.pl:721
29642 "For the meaning of the magic numbers, see this Microsoft KB article: "
29643 "L<http://support.microsoft.com/kb/103000>."
29647 #: ../tools/virt-win-reg.pl:726
29648 msgid "Update the registry:"
29652 #: ../tools/virt-win-reg.pl:728
29655 " virt-win-reg --merge WindowsGuest service.reg\n"
29660 #: ../tools/virt-win-reg.pl:730 ../tools/virt-list-filesystems.pl:182
29661 #: ../tools/virt-tar.pl:279 ../tools/virt-make-fs.pl:532
29662 #: ../tools/virt-list-partitions.pl:250
29663 msgid "SHELL QUOTING"
29667 #: ../tools/virt-win-reg.pl:732
29669 "Be careful when passing parameters containing C<\\> (backslash) in the "
29670 "shell. Usually you will have to use 'single quotes' or double backslashes "
29671 "(but not both) to protect them from the shell."
29675 #: ../tools/virt-win-reg.pl:736
29676 msgid "Paths and value names are case-insensitive."
29680 #: ../tools/virt-win-reg.pl:738 ../tools/virt-list-filesystems.pl:184
29681 #: ../tools/virt-tar.pl:281 ../tools/virt-make-fs.pl:534
29682 #: ../tools/virt-list-partitions.pl:252
29684 "Libvirt guest names can contain arbitrary characters, some of which have "
29685 "meaning to the shell such as C<#> and space. You may need to quote or "
29686 "escape these characters on the command line. See the shell manual page L<sh"
29687 "(1)> for details."
29691 #: ../tools/virt-win-reg.pl:745
29693 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
29694 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
29695 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
29699 #: ../tools/virt-win-reg.pl:760 ../tools/virt-make-fs.pl:555
29701 "When reporting bugs, please enable debugging and capture the I<complete> "
29706 #: ../tools/virt-win-reg.pl:763
29709 " export LIBGUESTFS_DEBUG=1\n"
29710 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
29715 #: ../tools/virt-win-reg.pl:766
29717 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."
29722 #: ../tools/virt-win-reg.pl:769 ../tools/virt-list-filesystems.pl:202
29723 #: ../tools/virt-tar.pl:301 ../tools/virt-make-fs.pl:564
29724 #: ../tools/virt-list-partitions.pl:269
29729 #: ../tools/virt-win-reg.pl:771 ../tools/virt-list-filesystems.pl:204
29730 #: ../tools/virt-tar.pl:303 ../tools/virt-make-fs.pl:566
29731 #: ../tools/virt-list-partitions.pl:271
29732 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
29736 #: ../tools/virt-win-reg.pl:775 ../tools/virt-make-fs.pl:570
29737 msgid "Copyright (C) 2010 Red Hat Inc."
29741 #: ../tools/virt-list-filesystems.pl:32
29743 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
29747 #: ../tools/virt-list-filesystems.pl:36
29750 " virt-list-filesystems [--options] domname\n"
29755 #: ../tools/virt-list-filesystems.pl:38
29758 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
29763 #: ../tools/virt-list-filesystems.pl:42 ../tools/virt-list-partitions.pl:42
29765 "This tool is obsolete. Use L<virt-filesystems(1)> as a more flexible "
29770 #: ../tools/virt-list-filesystems.pl:45
29772 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
29773 "are contained in a virtual machine or disk image."
29777 #: ../tools/virt-list-filesystems.pl:49
29779 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
29780 "functionality. For more complex cases you should look at the L<guestfish(1)"
29785 #: ../tools/virt-list-filesystems.pl:106 ../tools/virt-list-partitions.pl:115
29786 msgid "B<-l> | B<--long>"
29790 #: ../tools/virt-list-filesystems.pl:108
29792 "With this option, C<virt-list-filesystems> displays the type of each "
29793 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
29797 #: ../tools/virt-list-filesystems.pl:115
29798 msgid "B<-a> | B<--all>"
29802 #: ../tools/virt-list-filesystems.pl:117
29804 "Normally we only show mountable filesystems. If this option is given then "
29805 "swap devices are shown too."
29809 #: ../tools/virt-list-filesystems.pl:191
29811 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-"
29812 "filesystems(1)>, L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::"
29813 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
29817 #: ../tools/virt-list-filesystems.pl:208 ../tools/virt-tar.pl:307
29818 msgid "Copyright (C) 2009 Red Hat Inc."
29822 #: ../tools/virt-tar.pl:33
29823 msgid "virt-tar - Extract or upload files to a virtual machine"
29827 #: ../tools/virt-tar.pl:37
29830 " virt-tar [--options] -x domname directory tarball\n"
29835 #: ../tools/virt-tar.pl:39
29838 " virt-tar [--options] -u domname tarball directory\n"
29843 #: ../tools/virt-tar.pl:41
29846 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
29851 #: ../tools/virt-tar.pl:43
29854 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
29859 #: ../tools/virt-tar.pl:47
29861 "This tool is obsolete. Use L<virt-copy-in(1)>, L<virt-copy-out(1)>, L<virt-"
29862 "tar-in(1)>, L<virt-tar-out(1)> as replacements."
29866 #: ../tools/virt-tar.pl:52
29867 msgid "Download C</home> from the VM into a local tarball:"
29871 #: ../tools/virt-tar.pl:54
29874 " virt-tar -x domname /home home.tar\n"
29879 #: ../tools/virt-tar.pl:56
29882 " virt-tar -zx domname /home home.tar.gz\n"
29887 #: ../tools/virt-tar.pl:58
29888 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
29892 #: ../tools/virt-tar.pl:60
29895 " virt-tar -u domname uploadstuff.tar /tmp\n"
29900 #: ../tools/virt-tar.pl:62
29903 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
29908 #: ../tools/virt-tar.pl:66
29910 "You must I<not> use C<virt-tar> with the I<-u> option (upload) on live "
29911 "virtual machines. If you do this, you risk disk corruption in the VM. "
29912 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
29916 #: ../tools/virt-tar.pl:71
29918 "You can use I<-x> (extract) on live virtual machines, but you might get "
29919 "inconsistent results or errors if there is filesystem activity inside the "
29920 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
29921 "work, but the only way to guarantee consistent results is if the virtual "
29922 "machine is shut down."
29926 #: ../tools/virt-tar.pl:79
29928 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
29929 "parts of a guest filesystem. There are many possibilities: making backups, "
29930 "uploading data files, snooping on guest activity, fixing or customizing "
29935 #: ../tools/virt-tar.pl:84
29937 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
29938 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
29939 "should look at the L<guestfish(1)> tool."
29943 #: ../tools/virt-tar.pl:88
29945 "There are two modes of operation: I<-x> (eXtract) downloads a directory and "
29946 "its contents (recursively) from the virtual machine into a local tarball. "
29947 "I<-u> uploads from a local tarball, unpacking it into a directory inside the "
29948 "virtual machine. You cannot use these two options together."
29952 #: ../tools/virt-tar.pl:94
29954 "In addition, you may need to use the I<-z> (gZip) option to enable "
29955 "compression. When uploading, you have to specify I<-z> if the upload file "
29956 "is compressed because virt-tar won't detect this on its own."
29960 #: ../tools/virt-tar.pl:98
29962 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
29963 "example it cannot do PKZip files or bzip2 compression. If you want that "
29964 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
29965 "the L<libguestfs(3)> API)."
29969 #: ../tools/virt-tar.pl:156
29970 msgid "B<-x> | B<--extract> | B<--download>"
29974 #: ../tools/virt-tar.pl:158
29975 msgid "B<-u> | B<--upload>"
29979 #: ../tools/virt-tar.pl:160
29981 "Use I<-x> to extract (download) a directory from a virtual machine to a "
29986 #: ../tools/virt-tar.pl:163
29988 "Use I<-u> to upload and unpack from a local tarball into a virtual machine. "
29989 "Please read the L</WARNING> section above before using this option."
29993 #: ../tools/virt-tar.pl:167
29994 msgid "You must specify exactly one of these options."
29998 #: ../tools/virt-tar.pl:173
29999 msgid "B<-z> | B<--gzip>"
30003 #: ../tools/virt-tar.pl:175
30004 msgid "Specify that the input or output tarball is gzip-compressed."
30008 #: ../tools/virt-tar.pl:288
30010 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<virt-copy-"
30011 "in(1)>, L<virt-copy-out(1)>, L<virt-tar-in(1)>, L<virt-tar-out(1)>, L<Sys::"
30012 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
30017 #: ../tools/virt-make-fs.pl:37
30018 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
30022 #: ../tools/virt-make-fs.pl:41
30025 " virt-make-fs [--options] input.tar output.img\n"
30030 #: ../tools/virt-make-fs.pl:43
30033 " virt-make-fs [--options] input.tar.gz output.img\n"
30038 #: ../tools/virt-make-fs.pl:45
30041 " virt-make-fs [--options] directory output.img\n"
30046 #: ../tools/virt-make-fs.pl:49
30048 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
30049 "archive or some files in a directory. It is similar to tools like L<mkisofs"
30050 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
30051 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
30052 "you want to attach these filesystems to existing virtual machines (eg. to "
30053 "import large amounts of read-only data to a VM)."
30057 #: ../tools/virt-make-fs.pl:57
30058 msgid "Basic usage is:"
30062 #: ../tools/virt-make-fs.pl:59
30065 " virt-make-fs input output\n"
30070 #: ../tools/virt-make-fs.pl:61
30072 "where C<input> is either a directory containing files that you want to add, "
30073 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
30074 "C<output> is a disk image. The input type is detected automatically. The "
30075 "output disk image defaults to a raw ext2 image unless you specify extra "
30076 "flags (see L</OPTIONS> below)."
30080 #: ../tools/virt-make-fs.pl:67
30081 msgid "EXTRA SPACE"
30085 #: ../tools/virt-make-fs.pl:69
30087 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
30088 "the files that it contains, but might have extra space. Depending on how "
30089 "you are going to use the output, you might think this extra space is wasted "
30090 "and want to minimize it, or you might want to leave space so that more files "
30091 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
30092 "but you can use the I<--size> flag to leave space in the filesystem if you "
30097 #: ../tools/virt-make-fs.pl:77
30099 "An alternative way to leave extra space but not make the output image any "
30100 "bigger is to use an alternative disk image format (instead of the default "
30101 "\"raw\" format). Using I<--format=qcow2> will use the native QEmu/KVM qcow2 "
30102 "image format (check your hypervisor supports this before using it). This "
30103 "allows you to choose a large I<--size> but the extra space won't actually be "
30104 "allocated in the image until you try to store something in it."
30108 #: ../tools/virt-make-fs.pl:85
30110 "Don't forget that you can also use local commands including L<resize2fs(8)> "
30111 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-fs "
30112 "to build another image from scratch."
30116 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
30117 #: ../tools/virt-make-fs.pl:142
30122 #: ../tools/virt-make-fs.pl:91
30125 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
30130 #: ../tools/virt-make-fs.pl:93
30131 msgid "FILESYSTEM TYPE"
30135 #: ../tools/virt-make-fs.pl:95
30137 "The default filesystem type is C<ext2>. Just about any filesystem type that "
30138 "libguestfs supports can be used (but I<not> read-only formats like "
30139 "ISO9660). Here are some of the more common choices:"
30143 #: ../tools/virt-make-fs.pl:101
30148 #: ../tools/virt-make-fs.pl:103
30150 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
30151 "you are not going to use the filesystem in a way that requires the journal, "
30152 "then this is just wasted overhead."
30156 #: ../tools/virt-make-fs.pl:107
30157 msgid "I<ntfs> or I<vfat>"
30161 #: ../tools/virt-make-fs.pl:109
30162 msgid "Useful if exporting data to a Windows guest."
30166 #: ../tools/virt-make-fs.pl:111
30168 "I<Note for vfat>: The tar archive or local directory must only contain files "
30169 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
30170 "program running within libguestfs is unable to change the ownership of non-"
30171 "root files, since vfat itself does not support this."
30175 #: ../tools/virt-make-fs.pl:116
30180 #: ../tools/virt-make-fs.pl:118
30182 "Lower overhead than C<ext2>, but certain limitations on filename length and "
30183 "total filesystem size."
30187 #: ../tools/virt-make-fs.pl:125
30190 " virt-make-fs --type=minix input minixfs.img\n"
30195 #: ../tools/virt-make-fs.pl:127
30196 msgid "TO PARTITION OR NOT TO PARTITION"
30200 #: ../tools/virt-make-fs.pl:129
30201 msgid "Optionally virt-make-fs can add a partition table to the output disk."
30205 #: ../tools/virt-make-fs.pl:131
30207 "Adding a partition can make the disk image more compatible with certain "
30208 "virtualized operating systems which don't expect to see a filesystem "
30209 "directly located on a block device (Linux doesn't care and will happily "
30210 "handle both types)."
30214 #: ../tools/virt-make-fs.pl:136
30216 "On the other hand, if you have a partition table then the output image is no "
30217 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
30218 "directly on a partitioned disk image. (However libguestfs tools such as "
30219 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
30223 #: ../tools/virt-make-fs.pl:144
30224 msgid "Add an MBR partition:"
30228 #: ../tools/virt-make-fs.pl:146
30231 " virt-make-fs --partition -- input disk.img\n"
30236 #: ../tools/virt-make-fs.pl:148
30238 "If the output disk image could be terabyte-sized or larger, it's better to "
30239 "use an EFI/GPT-compatible partition table:"
30243 #: ../tools/virt-make-fs.pl:151
30246 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
30251 #: ../tools/virt-make-fs.pl:179
30252 msgid "Enable debugging information."
30256 #: ../tools/virt-make-fs.pl:185
30257 msgid "B<--size=E<lt>NE<gt>>"
30261 #: ../tools/virt-make-fs.pl:187
30262 msgid "B<--size=+E<lt>NE<gt>>"
30266 #: ../tools/virt-make-fs.pl:189
30267 msgid "B<-s E<lt>NE<gt>>"
30271 #: ../tools/virt-make-fs.pl:191
30272 msgid "B<-s +E<lt>NE<gt>>"
30276 #: ../tools/virt-make-fs.pl:193
30278 "Use the I<--size> (or I<-s>) option to choose the size of the output image."
30282 #: ../tools/virt-make-fs.pl:196
30284 "If this option is I<not> given, then the output image will be just large "
30285 "enough to contain all the files, with not much wasted space."
30289 #: ../tools/virt-make-fs.pl:199
30291 "To choose a fixed size output disk, specify an absolute number followed by b/"
30292 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
30293 "Petabytes or Exabytes. This must be large enough to contain all the input "
30294 "files, else you will get an error."
30298 #: ../tools/virt-make-fs.pl:204
30300 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
30301 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
30302 "Petabytes or Exabytes. For example: I<--size=+200M> means enough space for "
30303 "the input files, and (approximately) an extra 200 MB free space."
30307 #: ../tools/virt-make-fs.pl:210
30309 "Note that virt-make-fs estimates free space, and therefore will not produce "
30310 "filesystems containing precisely the free space requested. (It is much more "
30311 "expensive and time-consuming to produce a filesystem which has precisely the "
30312 "desired free space)."
30316 #: ../tools/virt-make-fs.pl:219
30317 msgid "B<--format=E<lt>fmtE<gt>>"
30321 #: ../tools/virt-make-fs.pl:221
30322 msgid "B<-F E<lt>fmtE<gt>>"
30326 #: ../tools/virt-make-fs.pl:223
30327 msgid "Choose the output disk image format."
30331 #: ../tools/virt-make-fs.pl:225
30332 msgid "The default is C<raw> (raw disk image)."
30336 #: ../tools/virt-make-fs.pl:227
30338 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
30339 "that would really make sense here is C<qcow2>."
30343 #: ../tools/virt-make-fs.pl:234
30344 msgid "B<--type=E<lt>fsE<gt>>"
30348 #: ../tools/virt-make-fs.pl:236
30349 msgid "B<-t E<lt>fsE<gt>>"
30353 #: ../tools/virt-make-fs.pl:238
30354 msgid "Choose the output filesystem type."
30358 #: ../tools/virt-make-fs.pl:240
30359 msgid "The default is C<ext2>."
30363 #: ../tools/virt-make-fs.pl:242
30365 "Any filesystem which is supported read-write by libguestfs can be used here."
30369 #: ../tools/virt-make-fs.pl:249
30370 msgid "B<--partition>"
30374 #: ../tools/virt-make-fs.pl:251
30375 msgid "B<--partition=E<lt>parttypeE<gt>>"
30379 #: ../tools/virt-make-fs.pl:253
30381 "If specified, this flag adds an MBR partition table to the output disk image."
30385 #: ../tools/virt-make-fs.pl:256
30387 "You can change the partition table type, eg. I<--partition=gpt> for large "
30392 #: ../tools/virt-make-fs.pl:259
30394 "Note that if you just use a lonesome I<--partition>, the Perl option parser "
30395 "might consider the next parameter to be the partition type. For example:"
30399 #: ../tools/virt-make-fs.pl:263
30402 " virt-make-fs --partition input.tar ...\n"
30407 #: ../tools/virt-make-fs.pl:265
30409 "would cause virt-make-fs to think you wanted to use a partition type of "
30410 "C<input.tar> which is completely wrong. To avoid this, use I<--> (a double "
30411 "dash) between options and the input file argument:"
30415 #: ../tools/virt-make-fs.pl:269
30418 " virt-make-fs --partition -- input.tar ...\n"
30423 #: ../tools/virt-make-fs.pl:541
30425 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar-in(1)>, L<mkisofs(1)>, "
30426 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
30427 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
30431 #: ../tools/virt-make-fs.pl:558
30434 " export LIBGUESTFS_DEBUG=1\n"
30435 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
30440 #: ../tools/virt-make-fs.pl:561
30442 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
30447 #: ../tools/virt-list-partitions.pl:32
30449 "virt-list-partitions - List partitions in a virtual machine or disk image"
30453 #: ../tools/virt-list-partitions.pl:36
30456 " virt-list-partitions [--options] domname\n"
30461 #: ../tools/virt-list-partitions.pl:38
30464 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
30469 #: ../tools/virt-list-partitions.pl:45
30471 "C<virt-list-partitions> is a command line tool to list the partitions that "
30472 "are contained in a virtual machine or disk image. It is mainly useful as a "
30473 "first step to using L<virt-resize(1)>."
30477 #: ../tools/virt-list-partitions.pl:50
30479 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
30480 "functionality. For more complex cases you should look at the L<guestfish(1)"
30485 #: ../tools/virt-list-partitions.pl:107
30486 msgid "B<-h> | B<--human-readable>"
30490 #: ../tools/virt-list-partitions.pl:109
30491 msgid "Show sizes in human-readable form (eg. \"1G\")."
30495 #: ../tools/virt-list-partitions.pl:117
30497 "With this option, C<virt-list-partitions> displays the type and size of each "
30498 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
30502 #: ../tools/virt-list-partitions.pl:124
30503 msgid "B<-t> | B<--total>"
30507 #: ../tools/virt-list-partitions.pl:126
30509 "Display the total size of each block device (as a separate row or rows)."
30513 #: ../tools/virt-list-partitions.pl:259
30515 "L<guestfs(3)>, L<guestfish(1)>, L<virt-filesystems(1)>, L<virt-list-"
30516 "filesystems(1)>, L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib"
30517 "(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
30521 #: ../tools/virt-list-partitions.pl:275
30522 msgid "Copyright (C) 2009-2010 Red Hat Inc."