1 # SOME DESCRIPTIVE TITLE.
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
8 "Project-Id-Version: PACKAGE VERSION\n"
9 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
10 "POT-Creation-Date: 2010-11-05 15:21+0000\n"
11 "PO-Revision-Date: 2010-09-02 14:46+0100\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
20 #: ../src/guestfs.pod:1 ../fish/guestfish.pod:1
21 #: ../test-tool/libguestfs-test-tool.pod:1 ../fuse/guestmount.pod:1
22 #: ../inspector/virt-inspector.pl:31 ../tools/virt-edit.pl:30
23 #: ../tools/virt-win-reg.pl:33 ../tools/virt-df.pl:32 ../tools/virt-ls.pl:30
24 #: ../tools/virt-resize.pl:38 ../tools/virt-list-filesystems.pl:28
25 #: ../tools/virt-cat.pl:29 ../tools/virt-tar.pl:29 ../tools/virt-rescue.pl:29
26 #: ../tools/virt-make-fs.pl:33 ../tools/virt-list-partitions.pl:28
31 #: ../src/guestfs.pod:3 ../fish/guestfish.pod:3
32 #: ../test-tool/libguestfs-test-tool.pod:3 ../fuse/guestmount.pod:3
33 #: ../inspector/virt-inspector.pl:33 ../tools/virt-edit.pl:32
34 #: ../tools/virt-win-reg.pl:35 ../tools/virt-df.pl:34 ../tools/virt-ls.pl:32
35 #: ../tools/virt-resize.pl:40 ../tools/virt-list-filesystems.pl:30
36 #: ../tools/virt-cat.pl:31 ../tools/virt-tar.pl:31 ../tools/virt-rescue.pl:31
37 #: ../tools/virt-make-fs.pl:35 ../tools/virt-list-partitions.pl:30
42 #: ../src/guestfs.pod:5
43 msgid "guestfs - Library for accessing and modifying virtual machine images"
47 #: ../src/guestfs.pod:7 ../fish/guestfish.pod:7
48 #: ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7
49 #: ../inspector/virt-inspector.pl:37 ../tools/virt-edit.pl:36
50 #: ../tools/virt-win-reg.pl:39 ../tools/virt-df.pl:38 ../tools/virt-ls.pl:36
51 #: ../tools/virt-resize.pl:44 ../tools/virt-list-filesystems.pl:34
52 #: ../tools/virt-cat.pl:35 ../tools/virt-tar.pl:35 ../tools/virt-rescue.pl:35
53 #: ../tools/virt-make-fs.pl:39 ../tools/virt-list-partitions.pl:34
58 #: ../src/guestfs.pod:9
61 " #include <guestfs.h>\n"
66 #: ../src/guestfs.pod:11
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_sync (g);\n"
76 " guestfs_close (g);\n"
81 #: ../src/guestfs.pod:20
84 " cc prog.c -o prog -lguestfs\n"
86 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
91 #: ../src/guestfs.pod:24 ../fish/guestfish.pod:30
92 #: ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:20
93 #: ../inspector/virt-inspector.pl:43 ../tools/virt-edit.pl:50
94 #: ../tools/virt-win-reg.pl:63 ../tools/virt-df.pl:46 ../tools/virt-ls.pl:42
95 #: ../tools/virt-resize.pl:50 ../tools/virt-list-filesystems.pl:40
96 #: ../tools/virt-cat.pl:41 ../tools/virt-tar.pl:72 ../tools/virt-rescue.pl:51
97 #: ../tools/virt-make-fs.pl:47 ../tools/virt-list-partitions.pl:40
102 #: ../src/guestfs.pod:26
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:34
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:39
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:44
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:49
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:52
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:55
158 #: ../src/guestfs.pod:57
160 "This section provides a gentler overview of the libguestfs API. We also try "
161 "to group API calls together, where that may not be obvious from reading "
162 "about the individual calls in the main section of this manual."
166 #: ../src/guestfs.pod:62
171 #: ../src/guestfs.pod:64
173 "Before you can use libguestfs calls, you have to create a handle. Then you "
174 "must add at least one disk image to the handle, followed by launching the "
175 "handle, then performing whatever operations you want, and finally closing "
176 "the handle. By convention we use the single letter C<g> for the name of the "
177 "handle variable, although of course you can use any name you want."
181 #: ../src/guestfs.pod:71
182 msgid "The general structure of all libguestfs-using programs looks like this:"
186 #: ../src/guestfs.pod:74
189 " guestfs_h *g = guestfs_create ();\n"
194 #: ../src/guestfs.pod:76
197 " /* Call guestfs_add_drive additional times if there are\n"
198 " * multiple disk images.\n"
200 " guestfs_add_drive (g, \"guest.img\");\n"
205 #: ../src/guestfs.pod:81
208 " /* Most manipulation calls won't work until you've launched\n"
209 " * the handle 'g'. You have to do this _after_ adding drives\n"
210 " * and _before_ other commands.\n"
212 " guestfs_launch (g);\n"
217 #: ../src/guestfs.pod:87
220 " /* Now you can examine what partitions, LVs etc are available.\n"
222 " char **partitions = guestfs_list_partitions (g);\n"
223 " char **logvols = guestfs_lvs (g);\n"
228 #: ../src/guestfs.pod:92
231 " /* To access a filesystem in the image, you must mount it.\n"
233 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
238 #: ../src/guestfs.pod:96
241 " /* Now you can perform filesystem actions on the guest\n"
244 " guestfs_touch (g, \"/hello\");\n"
249 #: ../src/guestfs.pod:101
252 " /* You only need to call guestfs_sync if you have made\n"
253 " * changes to the guest image. (But if you've made changes\n"
254 " * then you *must* sync). See also: guestfs_umount and\n"
255 " * guestfs_umount_all calls.\n"
257 " guestfs_sync (g);\n"
262 #: ../src/guestfs.pod:108
265 " /* Close the handle 'g'. */\n"
266 " guestfs_close (g);\n"
271 #: ../src/guestfs.pod:111
273 "The code above doesn't include any error checking. In real code you should "
274 "check return values carefully for errors. In general all functions that "
275 "return integers return C<-1> on error, and all functions that return "
276 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
277 "how to handle errors, and consult the documentation for each function call "
278 "below to see precisely how they return error indications."
282 #: ../src/guestfs.pod:119
287 #: ../src/guestfs.pod:121
289 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
290 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
291 "actual block device, or simply an empty file of zeroes that you have created "
292 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
297 #: ../src/guestfs.pod:127
299 "The call you should use in modern code for adding drives is L</"
300 "guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
301 "specifying that the format is raw, do:"
305 #: ../src/guestfs.pod:131
308 " guestfs_add_drive_opts (g, filename,\n"
309 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
315 #: ../src/guestfs.pod:135
316 msgid "You can add a disk read-only using:"
320 #: ../src/guestfs.pod:137
323 " guestfs_add_drive_opts (g, filename,\n"
324 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
325 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
331 #: ../src/guestfs.pod:142
333 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
334 "libguestfs won't modify the file."
338 #: ../src/guestfs.pod:145
340 "Be extremely cautious if the disk image is in use, eg. if it is being used "
341 "by a virtual machine. Adding it read-write will almost certainly cause disk "
342 "corruption, but adding it read-only is safe."
346 #: ../src/guestfs.pod:149
348 "You must add at least one disk image, and you may add multiple disk images. "
349 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
350 "first one you added), C</dev/sdb> (for the second one you added), etc."
354 #: ../src/guestfs.pod:154
356 "Once L</guestfs_launch> has been called you cannot add any more images. You "
357 "can call L</guestfs_list_devices> to get a list of the device names, in the "
358 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
362 #: ../src/guestfs.pod:159
367 #: ../src/guestfs.pod:161
369 "Before you can read or write files, create directories and so on in a disk "
370 "image that contains filesystems, you have to mount those filesystems using "
371 "L</guestfs_mount>. If you already know that a disk image contains (for "
372 "example) one partition with a filesystem on that partition, then you can "
377 #: ../src/guestfs.pod:167
380 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
385 #: ../src/guestfs.pod:169
387 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
388 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
389 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>)."
393 #: ../src/guestfs.pod:173
395 "If you are given a disk image and you don't know what it contains then you "
396 "have to find out. Libguestfs can do that too: use L</"
397 "guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions and "
398 "LVs, and either try mounting each to see what is mountable, or else examine "
399 "them with L</guestfs_vfs_type> or L</guestfs_file>. Libguestfs also has a "
400 "set of APIs for inspection of disk images (see L</INSPECTION> below). But "
401 "you might find it easier to look at higher level programs built on top of "
402 "libguestfs, in particular L<virt-inspector(1)>."
406 #: ../src/guestfs.pod:183
408 "To mount a disk image read-only, use L</guestfs_mount_ro>. There are "
409 "several other variations of the C<guestfs_mount_*> call."
413 #: ../src/guestfs.pod:186
414 msgid "FILESYSTEM ACCESS AND MODIFICATION"
418 #: ../src/guestfs.pod:188
420 "The majority of the libguestfs API consists of fairly low-level calls for "
421 "accessing and modifying the files, directories, symlinks etc on mounted "
422 "filesystems. There are over a hundred such calls which you can find listed "
423 "in detail below in this man page, and we don't even pretend to cover them "
424 "all in this overview."
428 #: ../src/guestfs.pod:194
430 "Specify filenames as full paths, starting with C<\"/\"> and including the "
435 #: ../src/guestfs.pod:197
437 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
438 "the file called C<\"etc/passwd\"> then you could do:"
442 #: ../src/guestfs.pod:200
445 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
450 #: ../src/guestfs.pod:202
452 "This would return C<data> as a newly allocated buffer containing the full "
453 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
454 "or C<NULL> if there was an error."
458 #: ../src/guestfs.pod:206
460 "As another example, to create a top-level directory on that filesystem "
461 "called C<\"var\"> you would do:"
465 #: ../src/guestfs.pod:209
468 " guestfs_mkdir (g, \"/var\");\n"
473 #: ../src/guestfs.pod:211
474 msgid "To create a symlink you could do:"
478 #: ../src/guestfs.pod:213
481 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
482 " \"/etc/rc3.d/S30portmap\");\n"
487 #: ../src/guestfs.pod:216
489 "Libguestfs will reject attempts to use relative paths and there is no "
490 "concept of a current working directory."
494 #: ../src/guestfs.pod:219
496 "Libguestfs can return errors in many situations: for example if the "
497 "filesystem isn't writable, or if a file or directory that you requested "
498 "doesn't exist. If you are using the C API (documented here) you have to "
499 "check for those error conditions after each call. (Other language bindings "
500 "turn these errors into exceptions)."
504 #: ../src/guestfs.pod:225
506 "File writes are affected by the per-handle umask, set by calling L</"
507 "guestfs_umask> and defaulting to 022. See L</UMASK>."
511 #: ../src/guestfs.pod:228
516 #: ../src/guestfs.pod:230
518 "Libguestfs contains API calls to read, create and modify partition tables on "
523 #: ../src/guestfs.pod:233
525 "In the common case where you want to create a single partition covering the "
526 "whole disk, you should use the L</guestfs_part_disk> call:"
530 #: ../src/guestfs.pod:237
533 " const char *parttype = \"mbr\";\n"
534 " if (disk_is_larger_than_2TB)\n"
535 " parttype = \"gpt\";\n"
536 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
541 #: ../src/guestfs.pod:242
543 "Obviously this effectively wipes anything that was on that disk image before."
547 #: ../src/guestfs.pod:245
552 #: ../src/guestfs.pod:247
554 "Libguestfs provides access to a large part of the LVM2 API, such as L</"
555 "guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense unless "
556 "you familiarize yourself with the concepts of physical volumes, volume "
557 "groups and logical volumes."
561 #: ../src/guestfs.pod:252
563 "This author strongly recommends reading the LVM HOWTO, online at L<http://"
564 "tldp.org/HOWTO/LVM-HOWTO/>."
568 #: ../src/guestfs.pod:255
573 #: ../src/guestfs.pod:257
575 "Use L</guestfs_cat> to download small, text only files. This call is "
576 "limited to files which are less than 2 MB and which cannot contain any ASCII "
577 "NUL (C<\\0>) characters. However it has a very simple to use API."
581 #: ../src/guestfs.pod:262
583 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
584 "bit data, since it returns a (pointer, size) pair. However it is still "
585 "limited to \"small\" files, less than 2 MB."
589 #: ../src/guestfs.pod:266
591 "L</guestfs_download> can be used to download any file, with no limits on "
592 "content or size (even files larger than 4 GB)."
596 #: ../src/guestfs.pod:269
598 "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
602 #: ../src/guestfs.pod:272
607 #: ../src/guestfs.pod:274
609 "It's often the case that you want to write a file or files to the disk image."
613 #: ../src/guestfs.pod:277
615 "To write a small file with fixed content, use L</guestfs_write>. To create "
616 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or L</"
617 "guestfs_fallocate64> (with all disk blocks allocated). There are a variety "
618 "of other functions for creating test files, for example L</guestfs_fill> and "
619 "L</guestfs_fill_pattern>."
623 #: ../src/guestfs.pod:283
625 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
626 "file content or size (even files larger than 4 GB)."
630 #: ../src/guestfs.pod:286
632 "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
636 #: ../src/guestfs.pod:288
638 "However the fastest way to upload I<large numbers of arbitrary files> is to "
639 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and L<mkisofs(8)"
640 ">), then attach this using L</guestfs_add_drive_ro>. If you add the drive "
641 "in a predictable way (eg. adding it last after all other drives) then you "
642 "can get the device name from L</guestfs_list_devices> and mount it directly "
643 "using L</guestfs_mount_ro>. Note that squashfs images are sometimes non-"
644 "portable between kernel versions, and they don't support labels or UUIDs. "
645 "If you want to pre-build an image or you need to mount it using a label or "
646 "UUID, use an ISO image instead."
650 #: ../src/guestfs.pod:299
655 #: ../src/guestfs.pod:301
657 "There are various different commands for copying between files and devices "
658 "and in and out of the guest filesystem. These are summarised in the table "
663 #: ../src/guestfs.pod:307
664 msgid "B<file> to B<file>"
668 #: ../src/guestfs.pod:309
670 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
671 "directories recursively."
675 #: ../src/guestfs.pod:312
676 msgid "B<file or device> to B<file or device>"
680 #: ../src/guestfs.pod:314
682 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
683 "devices in the guest."
687 #: ../src/guestfs.pod:317
688 msgid "Example: duplicate the contents of an LV:"
692 #: ../src/guestfs.pod:319
695 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
700 #: ../src/guestfs.pod:321
702 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
703 "(C</dev/VG/Original>). To copy less than the whole source device, use L</"
704 "guestfs_copy_size>."
708 #: ../src/guestfs.pod:325
709 msgid "B<file on the host> to B<file or device>"
713 #: ../src/guestfs.pod:327
714 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
718 #: ../src/guestfs.pod:329
719 msgid "B<file or device> to B<file on the host>"
723 #: ../src/guestfs.pod:331
724 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
728 #: ../src/guestfs.pod:335
729 msgid "LISTING FILES"
733 #: ../src/guestfs.pod:337
735 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
736 "L<guestfish(1)>-equivalent command C<ll>)."
740 #: ../src/guestfs.pod:340
742 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
743 "programs, as a flat list of strings."
747 #: ../src/guestfs.pod:343
749 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
750 "directory, plus additional information about each one. It is more "
751 "equivalent to using the L<readdir(3)> call on a local filesystem."
755 #: ../src/guestfs.pod:347
757 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list files."
761 #: ../src/guestfs.pod:350
762 msgid "RUNNING COMMANDS"
766 #: ../src/guestfs.pod:352
768 "Although libguestfs is primarily an API for manipulating files inside guest "
769 "images, we also provide some limited facilities for running commands inside "
774 #: ../src/guestfs.pod:356
775 msgid "There are many limitations to this:"
779 #: ../src/guestfs.pod:360 ../src/guestfs.pod:365 ../src/guestfs.pod:370
780 #: ../src/guestfs.pod:374 ../src/guestfs.pod:379 ../src/guestfs.pod:383
781 #: ../src/guestfs.pod:388 ../src/guestfs.pod:393 ../src/guestfs.pod:1186
782 #: ../src/guestfs.pod:1191 ../src/guestfs.pod:1195 ../src/guestfs.pod:1411
783 #: ../src/guestfs.pod:1416 ../src/guestfs.pod:1420 ../src/guestfs.pod:1522
784 #: ../src/guestfs.pod:1526 ../src/guestfs.pod:1530 ../src/guestfs.pod:1535
785 #: ../src/guestfs.pod:1543 ../src/guestfs.pod:1562 ../src/guestfs.pod:1570
786 #: ../src/guestfs.pod:1800 ../src/guestfs.pod:1806 ../src/guestfs.pod:1811
787 #: ../src/guestfs.pod:1817 ../src/guestfs.pod:1924 ../src/guestfs.pod:1928
788 #: ../src/guestfs.pod:1932 ../src/guestfs.pod:1936
789 #: ../src/guestfs-actions.pod:15 ../src/guestfs-actions.pod:22
790 #: ../src/guestfs-actions.pod:461 ../src/guestfs-actions.pod:469
791 #: ../src/guestfs-actions.pod:476 ../src/guestfs-actions.pod:483
792 #: ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:1426
793 #: ../src/guestfs-actions.pod:1430 ../src/guestfs-actions.pod:1434
794 #: ../src/guestfs-actions.pod:1442 ../src/guestfs-actions.pod:1446
795 #: ../src/guestfs-actions.pod:1450 ../src/guestfs-actions.pod:1460
796 #: ../src/guestfs-actions.pod:1464 ../src/guestfs-actions.pod:1468
797 #: ../src/guestfs-actions.pod:1596 ../src/guestfs-actions.pod:1600
798 #: ../src/guestfs-actions.pod:1605 ../src/guestfs-actions.pod:1610
799 #: ../src/guestfs-actions.pod:1665 ../src/guestfs-actions.pod:1669
800 #: ../src/guestfs-actions.pod:1674 ../fish/guestfish.pod:364
801 #: ../fish/guestfish.pod:368 ../fish/guestfish.pod:372
802 #: ../fish/guestfish.pod:376 ../fish/guestfish-actions.pod:13
803 #: ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:339
804 #: ../fish/guestfish-actions.pod:347 ../fish/guestfish-actions.pod:354
805 #: ../fish/guestfish-actions.pod:361 ../fish/guestfish-actions.pod:1056
806 #: ../fish/guestfish-actions.pod:1060 ../fish/guestfish-actions.pod:1064
807 #: ../fish/guestfish-actions.pod:1068 ../fish/guestfish-actions.pod:1076
808 #: ../fish/guestfish-actions.pod:1080 ../fish/guestfish-actions.pod:1084
809 #: ../fish/guestfish-actions.pod:1094 ../fish/guestfish-actions.pod:1098
810 #: ../fish/guestfish-actions.pod:1102 ../fish/guestfish-actions.pod:1192
811 #: ../fish/guestfish-actions.pod:1196 ../fish/guestfish-actions.pod:1201
812 #: ../fish/guestfish-actions.pod:1206 ../fish/guestfish-actions.pod:1248
813 #: ../fish/guestfish-actions.pod:1252 ../fish/guestfish-actions.pod:1257
814 #: ../inspector/virt-inspector.pl:584 ../inspector/virt-inspector.pl:588
815 #: ../tools/virt-df.pl:161 ../tools/virt-df.pl:167 ../tools/virt-resize.pl:348
816 #: ../tools/virt-resize.pl:353 ../tools/virt-resize.pl:363
821 #: ../src/guestfs.pod:362
823 "The kernel version that the command runs under will be different from what "
828 #: ../src/guestfs.pod:367
830 "If the command needs to communicate with daemons, then most likely they "
835 #: ../src/guestfs.pod:372
836 msgid "The command will be running in limited memory."
840 #: ../src/guestfs.pod:376
842 "The network may not be available unless you enable it (see L</"
843 "guestfs_set_network>)."
847 #: ../src/guestfs.pod:381
848 msgid "Only supports Linux guests (not Windows, BSD, etc)."
852 #: ../src/guestfs.pod:385
854 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
858 #: ../src/guestfs.pod:390
860 "For SELinux guests, you may need to enable SELinux and load policy first. "
861 "See L</SELINUX> in this manpage."
865 #: ../src/guestfs.pod:395
867 "I<Security:> It is not safe to run commands from untrusted, possibly "
868 "malicious guests. These commands may attempt to exploit your program by "
869 "sending unexpected output. They could also try to exploit the Linux kernel "
870 "or qemu provided by the libguestfs appliance. They could use the network "
871 "provided by the libguestfs appliance to bypass ordinary network partitions "
872 "and firewalls. They could use the elevated privileges or different SELinux "
873 "context of your program to their advantage."
877 #: ../src/guestfs.pod:404
879 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
880 "(a script which runs when the guest next boots normally), and to have this "
881 "script run the commands you want in the normal context of the running guest, "
882 "network security and so on."
886 #: ../src/guestfs.pod:411
888 "The two main API calls to run commands are L</guestfs_command> and L</"
889 "guestfs_sh> (there are also variations)."
893 #: ../src/guestfs.pod:414
895 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
896 "shell globs, redirections, etc will work."
900 #: ../src/guestfs.pod:417
901 msgid "CONFIGURATION FILES"
905 #: ../src/guestfs.pod:419
907 "To read and write configuration files in Linux guest filesystems, we "
908 "strongly recommend using Augeas. For example, Augeas understands how to "
909 "read and write, say, a Linux shadow password file or X.org configuration "
910 "file, and so avoids you having to write that code."
914 #: ../src/guestfs.pod:424
916 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
917 "document Augeas itself here because there is excellent documentation on the "
918 "L<http://augeas.net/> website."
922 #: ../src/guestfs.pod:428
924 "If you don't want to use Augeas (you fool!) then try calling L</"
925 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
930 #: ../src/guestfs.pod:432
935 #: ../src/guestfs.pod:434
937 "We support SELinux guests. To ensure that labeling happens correctly in "
938 "SELinux guests, you need to enable SELinux and load the guest's policy:"
942 #: ../src/guestfs.pod:440
947 #: ../src/guestfs.pod:442
948 msgid "Before launching, do:"
952 #: ../src/guestfs.pod:444
955 " guestfs_set_selinux (g, 1);\n"
960 #: ../src/guestfs.pod:446
965 #: ../src/guestfs.pod:448
967 "After mounting the guest's filesystem(s), load the policy. This is best "
968 "done by running the L<load_policy(8)> command in the guest itself:"
972 #: ../src/guestfs.pod:452
975 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
980 #: ../src/guestfs.pod:454
982 "(Older versions of C<load_policy> require you to specify the name of the "
987 #: ../src/guestfs.pod:457
992 #: ../src/guestfs.pod:459
994 "Optionally, set the security context for the API. The correct security "
995 "context to use can only be known by inspecting the guest. As an example:"
999 #: ../src/guestfs.pod:463
1002 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
1007 #: ../src/guestfs.pod:467
1008 msgid "This will work for running commands and editing existing files."
1012 #: ../src/guestfs.pod:469
1014 "When new files are created, you may need to label them explicitly, for "
1015 "example by running the external command C<restorecon pathname>."
1019 #: ../src/guestfs.pod:473
1024 #: ../src/guestfs.pod:475
1026 "Certain calls are affected by the current file mode creation mask (the "
1027 "\"umask\"). In particular ones which create files or directories, such as "
1028 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
1029 "either the default mode that the file is created with or modifies the mode "
1034 #: ../src/guestfs.pod:481
1036 "The default umask is C<022>, so files are created with modes such as C<0644> "
1037 "and directories with C<0755>."
1041 #: ../src/guestfs.pod:484
1043 "There are two ways to avoid being affected by umask. Either set umask to 0 "
1044 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
1045 "guestfs_chmod> after creating each file or directory."
1049 #: ../src/guestfs.pod:488
1050 msgid "For more information about umask, see L<umask(2)>."
1054 #: ../src/guestfs.pod:490 ../fish/guestfish.pod:630
1055 msgid "ENCRYPTED DISKS"
1059 #: ../src/guestfs.pod:492
1061 "Libguestfs allows you to access Linux guests which have been encrypted using "
1062 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1063 "standard. This includes nearly all whole disk encryption systems used by "
1064 "modern Linux guests."
1068 #: ../src/guestfs.pod:498
1070 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1071 "returns the string C<crypto_LUKS>)."
1075 #: ../src/guestfs.pod:501
1077 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1078 "will require the passphrase!"
1082 #: ../src/guestfs.pod:504
1084 "Opening a LUKS device creates a new device mapper device called C</dev/"
1085 "mapper/mapname> (where C<mapname> is the string you supply to L</"
1086 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
1087 "from and encrypted to the underlying block device respectively."
1091 #: ../src/guestfs.pod:510
1093 "LVM volume groups on the device can be made visible by calling L</"
1094 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
1095 "(s) can now be mounted in the usual way."
1099 #: ../src/guestfs.pod:514
1101 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1102 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1103 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
1104 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1105 "underlying encrypted block device)."
1109 #: ../src/guestfs.pod:521
1114 #: ../src/guestfs.pod:523
1116 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1117 "contains operating systems. (These APIs used to be in a separate Perl-only "
1118 "library called L<Sys::Guestfs::Lib(3)> but since version 1.5.3 the most "
1119 "frequently used part of this library has been rewritten in C and moved into "
1124 #: ../src/guestfs.pod:529
1126 "Add all disks belonging to the unknown virtual machine and call L</"
1127 "guestfs_launch> in the usual way."
1131 #: ../src/guestfs.pod:532
1133 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1134 "and certain heuristics, and returns a list of operating systems that were "
1135 "found. An empty list means none were found. A single element is the root "
1136 "filesystem of the operating system. For dual- or multi-boot guests, "
1137 "multiple roots can be returned, each one corresponding to a separate "
1138 "operating system. (Multi-boot virtual machines are extremely rare in the "
1139 "world of virtualization, but since this scenario can happen, we have built "
1140 "libguestfs to deal with it.)"
1144 #: ../src/guestfs.pod:541
1146 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1147 "to get additional details about that operating system. For example, call L</"
1148 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1149 "Windows and Linux-based operating systems respectively."
1153 #: ../src/guestfs.pod:547
1155 "Un*x-like and Linux-based operating systems usually consist of several "
1156 "filesystems which are mounted at boot time (for example, a separate boot "
1157 "partition mounted on C</boot>). The inspection rules are able to detect how "
1158 "filesystems correspond to mount points. Call "
1159 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1160 "hash table like this example:"
1164 #: ../src/guestfs.pod:554
1167 " /boot => /dev/sda1\n"
1168 " / => /dev/vg_guest/lv_root\n"
1169 " /usr => /dev/vg_guest/lv_usr\n"
1174 #: ../src/guestfs.pod:558
1176 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1177 "filesystems as suggested."
1181 #: ../src/guestfs.pod:561
1183 "Be careful to mount filesystems in the right order (eg. C</> before C</"
1184 "usr>). Sorting the keys of the hash by length, shortest first, should work."
1188 #: ../src/guestfs.pod:565
1190 "Inspection currently only works for some common operating systems. "
1191 "Contributors are welcome to send patches for other operating systems that we "
1192 "currently cannot detect."
1196 #: ../src/guestfs.pod:569
1198 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1199 "for more details. The L</guestfs_inspect_os> function just ignores any "
1200 "encrypted devices."
1204 #: ../src/guestfs.pod:573
1206 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1207 "inspection and caches the results in the guest handle. Subsequent calls to "
1208 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
1209 "read the disks. If you change the content of the guest disks, you can redo "
1210 "inspection by calling L</guestfs_inspect_os> again."
1214 #: ../src/guestfs.pod:580
1215 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1219 #: ../src/guestfs.pod:582
1221 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
1222 "ntfs-3g.org/> driver."
1226 #: ../src/guestfs.pod:585
1228 "DOS and Windows still use drive letters, and the filesystems are always "
1229 "treated as case insensitive by Windows itself, and therefore you might find "
1230 "a Windows configuration file referring to a path like C<c:\\windows"
1231 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
1232 "might be referred to as C</WINDOWS/System32>."
1236 #: ../src/guestfs.pod:591
1238 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1239 "libguestfs to read the appropriate Windows Registry and configuration files, "
1240 "to determine yourself how drives are mapped (see also L<hivex(3)> and L<virt-"
1245 #: ../src/guestfs.pod:596
1247 "Replacing backslash characters with forward slash characters is also outside "
1248 "the scope of libguestfs, but something that you can easily do."
1252 #: ../src/guestfs.pod:599
1254 "Where we can help is in resolving the case insensitivity of paths. For "
1255 "this, call L</guestfs_case_sensitive_path>."
1259 #: ../src/guestfs.pod:602
1261 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1262 "files, through the library C<hivex> which is part of the libguestfs project "
1263 "although ships as a separate tarball. You have to locate and download the "
1264 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1265 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
1266 "reg(1)> for more help on this issue."
1270 #: ../src/guestfs.pod:610
1271 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1275 #: ../src/guestfs.pod:612
1277 "Although we don't want to discourage you from using the C API, we will "
1278 "mention here that the same API is also available in other languages."
1282 #: ../src/guestfs.pod:615
1284 "The API is broadly identical in all supported languages. This means that "
1285 "the C call C<guestfs_mount(g,path)> is C<$g-E<gt>mount($path)> in Perl, C<g."
1286 "mount(path)> in Python, and C<Guestfs.mount g path> in OCaml. In other "
1287 "words, a straightforward, predictable isomorphism between each language."
1291 #: ../src/guestfs.pod:621
1293 "Error messages are automatically transformed into exceptions if the language "
1298 #: ../src/guestfs.pod:624
1300 "We don't try to \"object orientify\" parts of the API in OO languages, "
1301 "although contributors are welcome to write higher level APIs above what we "
1302 "provide in their favourite languages if they wish."
1306 #: ../src/guestfs.pod:630
1311 #: ../src/guestfs.pod:632
1313 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1314 "identical to the C API. C++ classes and exceptions are not used."
1318 #: ../src/guestfs.pod:636
1323 #: ../src/guestfs.pod:638
1325 "The C# bindings are highly experimental. Please read the warnings at the "
1326 "top of C<csharp/Libguestfs.cs>."
1330 #: ../src/guestfs.pod:641
1335 #: ../src/guestfs.pod:643
1337 "This is the only language binding that is working but incomplete. Only "
1338 "calls which return simple integers have been bound in Haskell, and we are "
1339 "looking for help to complete this binding."
1343 #: ../src/guestfs.pod:647
1348 #: ../src/guestfs.pod:649
1350 "Full documentation is contained in the Javadoc which is distributed with "
1355 #: ../src/guestfs.pod:652
1360 #: ../src/guestfs.pod:654
1361 msgid "For documentation see the file C<guestfs.mli>."
1365 #: ../src/guestfs.pod:656
1370 #: ../src/guestfs.pod:658
1371 msgid "For documentation see L<Sys::Guestfs(3)>."
1375 #: ../src/guestfs.pod:660
1380 #: ../src/guestfs.pod:662
1382 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1383 "the php-libguestfs package for your distribution."
1387 #: ../src/guestfs.pod:665
1388 msgid "The PHP binding only works correctly on 64 bit machines."
1392 #: ../src/guestfs.pod:667
1397 #: ../src/guestfs.pod:669
1398 msgid "For documentation do:"
1402 #: ../src/guestfs.pod:671
1406 " >>> import guestfs\n"
1407 " >>> help (guestfs)\n"
1412 #: ../src/guestfs.pod:675
1417 #: ../src/guestfs.pod:677
1419 "Use the Guestfs module. There is no Ruby-specific documentation, but you "
1420 "can find examples written in Ruby in the libguestfs source."
1424 #: ../src/guestfs.pod:680
1425 msgid "B<shell scripts>"
1429 #: ../src/guestfs.pod:682
1430 msgid "For documentation see L<guestfish(1)>."
1434 #: ../src/guestfs.pod:686
1435 msgid "LIBGUESTFS GOTCHAS"
1439 #: ../src/guestfs.pod:688
1441 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1442 "system [...] that works in the way it is documented but is counterintuitive "
1443 "and almost invites mistakes.\""
1447 #: ../src/guestfs.pod:692
1449 "Since we developed libguestfs and the associated tools, there are several "
1450 "things we would have designed differently, but are now stuck with for "
1451 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1452 "release, you can expect these to change. Beware of them."
1456 #: ../src/guestfs.pod:700
1457 msgid "Autosync / forgetting to sync."
1461 #: ../src/guestfs.pod:702
1463 "When modifying a filesystem from C or another language, you B<must> unmount "
1464 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1465 "libguestfs handle. You can also call:"
1469 #: ../src/guestfs.pod:706
1472 " guestfs_set_autosync (g, 1);\n"
1477 #: ../src/guestfs.pod:708
1479 "to have the unmount/sync done automatically for you when the handle 'g' is "
1480 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
1484 #: ../src/guestfs.pod:712
1486 "If you forget to do this, then it is entirely possible that your changes "
1487 "won't be written out, or will be partially written, or (very rarely) that "
1488 "you'll get disk corruption."
1492 #: ../src/guestfs.pod:716
1494 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1495 "guestfish scripts that forget to sync will work just fine, which can make "
1496 "this very puzzling if you are trying to debug a problem."
1500 #: ../src/guestfs.pod:720
1502 "Update: Autosync is enabled by default for all API users starting from "
1503 "libguestfs 1.5.24."
1507 #: ../src/guestfs.pod:723
1508 msgid "Mount option C<-o sync> should not be the default."
1512 #: ../src/guestfs.pod:725
1514 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1515 "However C<-o sync> does not add any reliability benefit, but does have a "
1516 "very large performance impact."
1520 #: ../src/guestfs.pod:729
1522 "The work around is to use L</guestfs_mount_options> and set the mount "
1523 "options that you actually want to use."
1527 #: ../src/guestfs.pod:732
1528 msgid "Read-only should be the default."
1532 #: ../src/guestfs.pod:734
1534 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1535 "specify I<--rw> if you want to make changes to the image."
1539 #: ../src/guestfs.pod:737
1540 msgid "This would reduce the potential to corrupt live VM images."
1544 #: ../src/guestfs.pod:739
1546 "Note that many filesystems change the disk when you just mount and unmount, "
1547 "even if you didn't perform any writes. You need to use L</"
1548 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
1552 #: ../src/guestfs.pod:743
1553 msgid "guestfish command line is hard to use."
1557 #: ../src/guestfs.pod:745
1559 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1560 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1561 "exist, so it fails. In earlier versions of guestfish the error message was "
1562 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1563 "we should have used C<guestfish -c command> to run commands."
1567 #: ../src/guestfs.pod:752
1568 msgid "guestfish megabyte modifiers don't work right on all commands"
1572 #: ../src/guestfs.pod:754
1574 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1575 "other modifiers). What guestfish actually does is to multiply the number "
1576 "part by the modifier part and pass the result to the C API. However this "
1577 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1578 "expecting some other unit (eg. megabytes)."
1582 #: ../src/guestfs.pod:761
1583 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1587 #: ../src/guestfs.pod:763
1590 " lvcreate LV VG 100M\n"
1595 #: ../src/guestfs.pod:765
1597 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1598 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1599 "megabytes * megabytes) logical volume. The error message you get from this "
1600 "is also a little obscure."
1604 #: ../src/guestfs.pod:770
1606 "This could be fixed in the generator by specially marking parameters and "
1607 "return values which take bytes or other units."
1611 #: ../src/guestfs.pod:773
1612 msgid "Library should return errno with error messages."
1616 #: ../src/guestfs.pod:775
1618 "It would be a nice-to-have to be able to get the original value of 'errno' "
1619 "from inside the appliance along error paths (where set). Currently "
1620 "L<guestmount(1)> goes through hoops to try to reverse the error message "
1621 "string into an errno, see the function error() in fuse/guestmount.c."
1625 #: ../src/guestfs.pod:781
1627 "In libguestfs 1.5.4, the protocol was changed so that the Linux errno is "
1628 "sent back from the daemon."
1632 #: ../src/guestfs.pod:784
1633 msgid "Ambiguity between devices and paths"
1637 #: ../src/guestfs.pod:786
1639 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
1640 "sdb2>) and a similar pathname. A file might just happen to be called "
1641 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1645 #: ../src/guestfs.pod:791
1647 "In the current API we usually resolve this ambiguity by having two separate "
1648 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1649 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1650 "detecting if the path supplied begins with C</dev/>."
1654 #: ../src/guestfs.pod:797
1656 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1657 "make paths/devices into structured names. One way to do this would be to "
1658 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1659 "aspect of grub. Another way would be to use a structured type, equivalent "
1660 "to this OCaml type:"
1664 #: ../src/guestfs.pod:803
1667 " type path = Path of string | Device of int | Partition of int * int\n"
1672 #: ../src/guestfs.pod:805
1673 msgid "which would allow you to pass arguments like:"
1677 #: ../src/guestfs.pod:807
1680 " Path \"/foo/bar\"\n"
1681 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
1682 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
1683 " Path \"/dev/sdb2\" (* not a device *)\n"
1688 #: ../src/guestfs.pod:812
1690 "As you can see there are still problems to resolve even with this "
1691 "representation. Also consider how it might work in guestfish."
1695 #: ../src/guestfs.pod:817
1696 msgid "PROTOCOL LIMITS"
1700 #: ../src/guestfs.pod:819
1702 "Internally libguestfs uses a message-based protocol to pass API calls and "
1703 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1704 "plenty more detail about this). The maximum message size used by the "
1705 "protocol is slightly less than 4 MB. For some API calls you may need to be "
1706 "aware of this limit. The API calls which may be affected are individually "
1707 "documented, with a link back to this section of the documentation."
1711 #: ../src/guestfs.pod:827
1713 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1714 "a simple string. Because this string is at some point internally encoded as "
1715 "a message, the maximum size that it can return is slightly under 4 MB. If "
1716 "the requested file is larger than this then you will get an error."
1720 #: ../src/guestfs.pod:833
1722 "In order to transfer large files into and out of the guest filesystem, you "
1723 "need to use particular calls that support this. The sections L</UPLOADING> "
1724 "and L</DOWNLOADING> document how to do this."
1728 #: ../src/guestfs.pod:837
1730 "You might also consider mounting the disk image using our FUSE filesystem "
1731 "support (L<guestmount(1)>)."
1735 #: ../src/guestfs.pod:840
1736 msgid "KEYS AND PASSPHRASES"
1740 #: ../src/guestfs.pod:842
1742 "Certain libguestfs calls take a parameter that contains sensitive key "
1743 "material, passed in as a C string."
1747 #: ../src/guestfs.pod:845
1749 "In the future we would hope to change the libguestfs implementation so that "
1750 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1751 "swap. However this is I<not> done at the moment, because of the complexity "
1752 "of such an implementation."
1756 #: ../src/guestfs.pod:850
1758 "Therefore you should be aware that any key parameter you pass to libguestfs "
1759 "might end up being written out to the swap partition. If this is a concern, "
1760 "scrub the swap partition or don't use libguestfs on encrypted devices."
1764 #: ../src/guestfs.pod:855
1765 msgid "CONNECTION MANAGEMENT"
1769 #: ../src/guestfs.pod:857
1774 #: ../src/guestfs.pod:859
1776 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
1777 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
1778 "handle and release all resources used."
1782 #: ../src/guestfs.pod:863
1784 "For information on using multiple handles and threads, see the section L</"
1785 "MULTIPLE HANDLES AND MULTIPLE THREADS> below."
1789 #: ../src/guestfs.pod:866
1790 msgid "guestfs_create"
1794 #: ../src/guestfs.pod:868
1797 " guestfs_h *guestfs_create (void);\n"
1802 #: ../src/guestfs.pod:870
1803 msgid "Create a connection handle."
1807 #: ../src/guestfs.pod:872
1809 "You have to call L</guestfs_add_drive_opts> (or one of the equivalent calls) "
1810 "on the handle at least once."
1814 #: ../src/guestfs.pod:875
1816 "This function returns a non-NULL pointer to a handle on success or NULL on "
1821 #: ../src/guestfs.pod:878
1822 msgid "After configuring the handle, you have to call L</guestfs_launch>."
1826 #: ../src/guestfs.pod:880
1828 "You may also want to configure error handling for the handle. See L</ERROR "
1829 "HANDLING> section below."
1833 #: ../src/guestfs.pod:883
1834 msgid "guestfs_close"
1838 #: ../src/guestfs.pod:885
1841 " void guestfs_close (guestfs_h *g);\n"
1846 #: ../src/guestfs.pod:887
1847 msgid "This closes the connection handle and frees up all resources used."
1851 #: ../src/guestfs.pod:889
1852 msgid "ERROR HANDLING"
1856 #: ../src/guestfs.pod:891
1858 "API functions can return errors. For example, almost all functions that "
1859 "return C<int> will return C<-1> to indicate an error. You can get "
1860 "additional information on errors by calling L</guestfs_last_error> and/or by "
1861 "setting up an error handler with L</guestfs_set_error_handler>."
1865 #: ../src/guestfs.pod:897
1867 "When the handle is created, a default error handler is installed which "
1868 "prints the error message string to C<stderr>. For small short-running "
1869 "command line programs it is sufficient to do:"
1873 #: ../src/guestfs.pod:901
1876 " if (guestfs_launch (g) == -1)\n"
1877 " exit (EXIT_FAILURE);\n"
1882 #: ../src/guestfs.pod:904
1884 "since the default error handler will ensure that an error message has been "
1885 "printed to C<stderr> before the program exits."
1889 #: ../src/guestfs.pod:907
1891 "For other programs the caller will almost certainly want to install an "
1892 "alternate error handler or do error handling in-line like this:"
1896 #: ../src/guestfs.pod:910
1899 " g = guestfs_create ();\n"
1904 #: ../src/guestfs.pod:912
1907 " /* This disables the default behaviour of printing errors\n"
1909 " guestfs_set_error_handler (g, NULL, NULL);\n"
1914 #: ../src/guestfs.pod:916
1917 " if (guestfs_launch (g) == -1) {\n"
1918 " /* Examine the error message and print it etc. */\n"
1919 " char *msg = guestfs_last_error (g);\n"
1920 " fprintf (stderr, \"%s\\n\", msg);\n"
1927 #: ../src/guestfs.pod:923
1929 "Out of memory errors are handled differently. The default action is to call "
1930 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
1931 "guestfs_set_out_of_memory_handler>."
1935 #: ../src/guestfs.pod:927
1937 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
1938 "because there is no handle if this happens there is no way to get additional "
1939 "error information. However L</guestfs_create> is supposed to be a "
1940 "lightweight operation which can only fail because of insufficient memory (it "
1941 "returns NULL in this case)."
1945 #: ../src/guestfs.pod:933
1946 msgid "guestfs_last_error"
1950 #: ../src/guestfs.pod:935
1953 " const char *guestfs_last_error (guestfs_h *g);\n"
1958 #: ../src/guestfs.pod:937
1960 "This returns the last error message that happened on C<g>. If there has not "
1961 "been an error since the handle was created, then this returns C<NULL>."
1965 #: ../src/guestfs.pod:941
1967 "The lifetime of the returned string is until the next error occurs, or L</"
1968 "guestfs_close> is called."
1972 #: ../src/guestfs.pod:944
1973 msgid "guestfs_set_error_handler"
1977 #: ../src/guestfs.pod:946
1980 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
1982 " const char *msg);\n"
1983 " void guestfs_set_error_handler (guestfs_h *g,\n"
1984 " guestfs_error_handler_cb cb,\n"
1990 #: ../src/guestfs.pod:953
1992 "The callback C<cb> will be called if there is an error. The parameters "
1993 "passed to the callback are an opaque data pointer and the error message "
1998 #: ../src/guestfs.pod:957
2000 "Note that the message string C<msg> is freed as soon as the callback "
2001 "function returns, so if you want to stash it somewhere you must make your "
2006 #: ../src/guestfs.pod:961
2007 msgid "The default handler prints messages on C<stderr>."
2011 #: ../src/guestfs.pod:963
2012 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
2016 #: ../src/guestfs.pod:965
2017 msgid "guestfs_get_error_handler"
2021 #: ../src/guestfs.pod:967
2024 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
2025 " void **opaque_rtn);\n"
2030 #: ../src/guestfs.pod:970
2031 msgid "Returns the current error handler callback."
2035 #: ../src/guestfs.pod:972
2036 msgid "guestfs_set_out_of_memory_handler"
2040 #: ../src/guestfs.pod:974
2043 " typedef void (*guestfs_abort_cb) (void);\n"
2044 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
2045 " guestfs_abort_cb);\n"
2050 #: ../src/guestfs.pod:978
2052 "The callback C<cb> will be called if there is an out of memory situation. "
2053 "I<Note this callback must not return>."
2057 #: ../src/guestfs.pod:981
2058 msgid "The default is to call L<abort(3)>."
2062 #: ../src/guestfs.pod:983
2064 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
2068 #: ../src/guestfs.pod:986
2069 msgid "guestfs_get_out_of_memory_handler"
2073 #: ../src/guestfs.pod:988
2076 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
2081 #: ../src/guestfs.pod:990
2082 msgid "This returns the current out of memory handler."
2086 #: ../src/guestfs.pod:992
2091 #: ../src/guestfs.pod:994
2093 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
2098 #: ../src/guestfs.pod:997
2100 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
2101 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
2105 #: ../src/guestfs.pod:1000
2107 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
2108 "to change the directories that libguestfs will search in. The value is a "
2109 "colon-separated list of paths. The current directory is I<not> searched "
2110 "unless the path contains an empty element or C<.>. For example "
2111 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
2112 "then C</usr/lib/guestfs>."
2116 #: ../src/guestfs.pod:1007
2117 msgid "HIGH-LEVEL API ACTIONS"
2121 #: ../src/guestfs.pod:1009
2122 msgid "ABI GUARANTEE"
2126 #: ../src/guestfs.pod:1011
2128 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
2129 "actions as outlined in this section. Although we will deprecate some "
2130 "actions, for example if they get replaced by newer calls, we will keep the "
2131 "old actions forever. This allows you the developer to program in confidence "
2132 "against the libguestfs API."
2136 #: ../src/guestfs.pod:1017 ../fish/guestfish.pod:860
2141 #: ../src/guestfs.pod:1019
2146 #: ../src/guestfs.pod:1021
2151 #: ../src/guestfs.pod:1023
2152 msgid "AVAILABILITY"
2156 #: ../src/guestfs.pod:1025
2157 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
2161 #: ../src/guestfs.pod:1027
2163 "Using L</guestfs_available> you can test availability of the following "
2164 "groups of functions. This test queries the appliance to see if the "
2165 "appliance you are currently using supports the functionality."
2169 #: ../src/guestfs.pod:1032
2170 msgid "@AVAILABILITY@"
2174 #: ../src/guestfs.pod:1034
2175 msgid "GUESTFISH supported COMMAND"
2179 #: ../src/guestfs.pod:1036
2181 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
2182 "prints out the available groups and whether they are supported by this build "
2183 "of libguestfs. Note however that you have to do C<run> first."
2187 #: ../src/guestfs.pod:1041
2188 msgid "SINGLE CALLS AT COMPILE TIME"
2192 #: ../src/guestfs.pod:1043
2194 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
2195 "function, such as:"
2199 #: ../src/guestfs.pod:1046
2202 " #define LIBGUESTFS_HAVE_DD 1\n"
2207 #: ../src/guestfs.pod:1048
2208 msgid "if L</guestfs_dd> is available."
2212 #: ../src/guestfs.pod:1050
2214 "Before version 1.5.8, if you needed to test whether a single libguestfs "
2215 "function is available at compile time, we recommended using build tools such "
2216 "as autoconf or cmake. For example in autotools you could use:"
2220 #: ../src/guestfs.pod:1055
2223 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
2224 " AC_CHECK_FUNCS([guestfs_dd])\n"
2229 #: ../src/guestfs.pod:1058
2231 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
2236 #: ../src/guestfs.pod:1061
2237 msgid "SINGLE CALLS AT RUN TIME"
2241 #: ../src/guestfs.pod:1063
2243 "Testing at compile time doesn't guarantee that a function really exists in "
2244 "the library. The reason is that you might be dynamically linked against a "
2245 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
2246 "This situation unfortunately results in a segmentation fault, which is a "
2247 "shortcoming of the C dynamic linking system itself."
2251 #: ../src/guestfs.pod:1070
2253 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2254 "in this example program (note that you still need the compile time check as "
2259 #: ../src/guestfs.pod:1074
2262 " #include <stdio.h>\n"
2263 " #include <stdlib.h>\n"
2264 " #include <unistd.h>\n"
2265 " #include <dlfcn.h>\n"
2266 " #include <guestfs.h>\n"
2271 #: ../src/guestfs.pod:1080
2276 " #ifdef LIBGUESTFS_HAVE_DD\n"
2278 " int has_function;\n"
2283 #: ../src/guestfs.pod:1086
2286 " /* Test if the function guestfs_dd is really available. */\n"
2287 " dl = dlopen (NULL, RTLD_LAZY);\n"
2289 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2290 " exit (EXIT_FAILURE);\n"
2292 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2298 #: ../src/guestfs.pod:1095
2301 " if (!has_function)\n"
2302 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2304 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2305 " /* Now it's safe to call\n"
2306 " guestfs_dd (g, \"foo\", \"bar\");\n"
2310 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2317 #: ../src/guestfs.pod:1108
2319 "You may think the above is an awful lot of hassle, and it is. There are "
2320 "other ways outside of the C linking system to ensure that this kind of "
2321 "incompatibility never arises, such as using package versioning:"
2325 #: ../src/guestfs.pod:1113
2328 " Requires: libguestfs >= 1.0.80\n"
2333 #: ../src/guestfs.pod:1115
2334 msgid "CALLS WITH OPTIONAL ARGUMENTS"
2338 #: ../src/guestfs.pod:1117
2340 "A recent feature of the API is the introduction of calls which take optional "
2341 "arguments. In C these are declared 3 ways. The main way is as a call which "
2342 "takes variable arguments (ie. C<...>), as in this example:"
2346 #: ../src/guestfs.pod:1122
2349 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
2354 #: ../src/guestfs.pod:1124
2356 "Call this with a list of optional arguments, terminated by C<-1>. So to "
2357 "call with no optional arguments specified:"
2361 #: ../src/guestfs.pod:1127
2364 " guestfs_add_drive_opts (g, filename, -1);\n"
2369 #: ../src/guestfs.pod:1129
2370 msgid "With a single optional argument:"
2374 #: ../src/guestfs.pod:1131
2377 " guestfs_add_drive_opts (g, filename,\n"
2378 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2384 #: ../src/guestfs.pod:1135
2389 #: ../src/guestfs.pod:1137
2392 " guestfs_add_drive_opts (g, filename,\n"
2393 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2394 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
2400 #: ../src/guestfs.pod:1142
2402 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
2407 #: ../src/guestfs.pod:1145
2408 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
2412 #: ../src/guestfs.pod:1147
2414 "The second variant has the same name with the suffix C<_va>, which works the "
2415 "same way but takes a C<va_list>. See the C manual for details. For the "
2416 "example function, this is declared:"
2420 #: ../src/guestfs.pod:1151
2423 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
2429 #: ../src/guestfs.pod:1154
2430 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
2434 #: ../src/guestfs.pod:1156
2436 "The third variant is useful where you need to construct these calls. You "
2437 "pass in a structure where you fill in the optional fields. The structure "
2438 "has a bitmask as the first element which you must set to indicate which "
2439 "fields you have filled in. For our example function the structure and call "
2444 #: ../src/guestfs.pod:1162
2447 " struct guestfs_add_drive_opts_argv {\n"
2448 " uint64_t bitmask;\n"
2450 " const char *format;\n"
2453 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
2454 " const struct guestfs_add_drive_opts_argv *optargs);\n"
2459 #: ../src/guestfs.pod:1171
2460 msgid "You could call it like this:"
2464 #: ../src/guestfs.pod:1173
2467 " struct guestfs_add_drive_opts_argv optargs = {\n"
2468 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
2469 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
2471 " .format = \"qcow2\"\n"
2477 #: ../src/guestfs.pod:1180
2480 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
2485 #: ../src/guestfs.pod:1182 ../src/guestfs-actions.pod:11
2486 #: ../src/guestfs-actions.pod:1661 ../fish/guestfish-actions.pod:9
2487 #: ../fish/guestfish-actions.pod:1244
2492 #: ../src/guestfs.pod:1188
2493 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
2497 #: ../src/guestfs.pod:1193
2498 msgid "You do not need to fill in all fields of the structure."
2502 #: ../src/guestfs.pod:1197
2504 "There must be a one-to-one correspondence between fields of the structure "
2505 "that are filled in, and bits set in the bitmask."
2509 #: ../src/guestfs.pod:1202
2510 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
2514 #: ../src/guestfs.pod:1204
2516 "In other languages, optional arguments are expressed in the way that is "
2517 "natural for that language. We refer you to the language-specific "
2518 "documentation for more details on that."
2522 #: ../src/guestfs.pod:1208
2523 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
2527 #: ../src/guestfs.pod:1210 ../src/guestfs.pod:1215
2532 #: ../src/guestfs.pod:1212
2534 "<!-- old anchor for the next section --> <a name="
2535 "\"state_machine_and_low_level_event_api\"/>"
2539 #: ../src/guestfs.pod:1217
2540 msgid "ARCHITECTURE"
2544 #: ../src/guestfs.pod:1219
2546 "Internally, libguestfs is implemented by running an appliance (a special "
2547 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
2548 "process of the main program."
2552 #: ../src/guestfs.pod:1223
2555 " ___________________\n"
2557 " | main program |\n"
2559 " | | child process / appliance\n"
2560 " | | __________________________\n"
2562 " +-------------------+ RPC | +-----------------+ |\n"
2563 " | libguestfs <--------------------> guestfsd | |\n"
2564 " | | | +-----------------+ |\n"
2565 " \\___________________/ | | Linux kernel | |\n"
2566 " | +--^--------------+ |\n"
2567 " \\_________|________________/\n"
2573 " \\______________/\n"
2578 #: ../src/guestfs.pod:1243
2580 "The library, linked to the main program, creates the child process and hence "
2581 "the appliance in the L</guestfs_launch> function."
2585 #: ../src/guestfs.pod:1246
2587 "Inside the appliance is a Linux kernel and a complete stack of userspace "
2588 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
2589 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
2590 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
2591 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
2592 "attached to the qemu process which translates device access by the "
2593 "appliance's Linux kernel into accesses to the image."
2597 #: ../src/guestfs.pod:1255
2599 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
2600 "Although the disk image you are attached to might also be used by some "
2601 "virtual machine, libguestfs doesn't know or care about this. (But you will "
2602 "care if both libguestfs's qemu process and your virtual machine are trying "
2603 "to update the disk image at the same time, since these usually results in "
2604 "massive disk corruption)."
2608 #: ../src/guestfs.pod:1262
2609 msgid "STATE MACHINE"
2613 #: ../src/guestfs.pod:1264
2614 msgid "libguestfs uses a state machine to model the child process:"
2618 #: ../src/guestfs.pod:1266
2630 " / | \\ \\ guestfs_launch\n"
2631 " / | _\\__V______\n"
2633 " / | | LAUNCHING |\n"
2634 " / | \\___________/\n"
2636 " / | guestfs_launch\n"
2638 " ______ / __|____V\n"
2639 " / \\ ------> / \\\n"
2640 " | BUSY | | READY |\n"
2641 " \\______/ <------ \\________/\n"
2646 #: ../src/guestfs.pod:1288
2648 "The normal transitions are (1) CONFIG (when the handle is created, but there "
2649 "is no child process), (2) LAUNCHING (when the child process is booting up), "
2650 "(3) alternating between READY and BUSY as commands are issued to, and "
2651 "carried out by, the child process."
2655 #: ../src/guestfs.pod:1293
2657 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
2658 "asynchronously at any time (eg. due to some internal error), and that causes "
2659 "the state to transition back to CONFIG."
2663 #: ../src/guestfs.pod:1297
2665 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
2666 "issued when in the CONFIG state."
2670 #: ../src/guestfs.pod:1300
2672 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
2673 "L</guestfs_launch> blocks until the child process is READY to accept "
2674 "commands (or until some failure or timeout). L</guestfs_launch> internally "
2675 "moves the state from CONFIG to LAUNCHING while it is running."
2679 #: ../src/guestfs.pod:1306
2681 "API actions such as L</guestfs_mount> can only be issued when in the READY "
2682 "state. These API calls block waiting for the command to be carried out (ie. "
2683 "the state to transition to BUSY and then back to READY). There are no non-"
2684 "blocking versions, and no way to issue more than one command per handle at "
2689 #: ../src/guestfs.pod:1312
2691 "Finally, the child process sends asynchronous messages back to the main "
2692 "program, such as kernel log messages. You can register a callback to "
2693 "receive these messages."
2697 #: ../src/guestfs.pod:1316
2698 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
2702 #: ../src/guestfs.pod:1318
2704 "The child process generates events in some situations. Current events "
2705 "include: receiving a log message, the child process exits."
2709 #: ../src/guestfs.pod:1321
2711 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
2716 #: ../src/guestfs.pod:1324
2718 "Only I<one callback of each type> can be registered for each handle. "
2719 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
2720 "that type. Cancel all callbacks of this type by calling this function with "
2721 "C<cb> set to C<NULL>."
2725 #: ../src/guestfs.pod:1329
2726 msgid "guestfs_set_log_message_callback"
2730 #: ../src/guestfs.pod:1331
2733 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
2734 " char *buf, int len);\n"
2735 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
2736 " guestfs_log_message_cb cb,\n"
2742 #: ../src/guestfs.pod:1337
2744 "The callback function C<cb> will be called whenever qemu or the guest writes "
2745 "anything to the console."
2749 #: ../src/guestfs.pod:1340
2750 msgid "Use this function to capture kernel messages and similar."
2754 #: ../src/guestfs.pod:1342
2756 "Normally there is no log message handler, and log messages are just "
2761 #: ../src/guestfs.pod:1345
2762 msgid "guestfs_set_subprocess_quit_callback"
2766 #: ../src/guestfs.pod:1347
2769 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
2770 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
2771 " guestfs_subprocess_quit_cb cb,\n"
2777 #: ../src/guestfs.pod:1352
2779 "The callback function C<cb> will be called when the child process quits, "
2780 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
2781 "corresponds to a transition from any state to the CONFIG state)."
2785 #: ../src/guestfs.pod:1357
2786 msgid "guestfs_set_launch_done_callback"
2790 #: ../src/guestfs.pod:1359
2793 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
2794 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
2795 " guestfs_launch_done_cb cb,\n"
2801 #: ../src/guestfs.pod:1364
2803 "The callback function C<cb> will be called when the child process becomes "
2804 "ready first time after it has been launched. (This corresponds to a "
2805 "transition from LAUNCHING to the READY state)."
2809 #: ../src/guestfs.pod:1368
2810 msgid "guestfs_set_close_callback"
2814 #: ../src/guestfs.pod:1370
2817 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
2818 " void guestfs_set_close_callback (guestfs_h *g,\n"
2819 " guestfs_close_cb cb,\n"
2825 #: ../src/guestfs.pod:1375
2827 "The callback function C<cb> will be called while the handle is being closed "
2828 "(synchronously from L</guestfs_close>)."
2832 #: ../src/guestfs.pod:1378
2834 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
2835 "handles that are open when the program exits. This means that this callback "
2836 "might be called indirectly from L<exit(3)>, which can cause unexpected "
2837 "problems in higher-level languages (eg. if your HLL interpreter has already "
2838 "been cleaned up by the time this is called, and if your callback then jumps "
2839 "into some HLL function)."
2843 #: ../src/guestfs.pod:1386
2844 msgid "guestfs_set_progress_callback"
2848 #: ../src/guestfs.pod:1388
2851 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
2852 " int proc_nr, int serial,\n"
2853 " uint64_t position, uint64_t total);\n"
2854 " void guestfs_set_progress_callback (guestfs_h *g,\n"
2855 " guestfs_progress_cb cb,\n"
2861 #: ../src/guestfs.pod:1395
2863 "Some long-running operations can generate progress messages. If this "
2864 "callback is registered, then it will be called each time a progress message "
2865 "is generated (usually two seconds after the operation started, and three "
2866 "times per second thereafter until it completes, although the frequency may "
2867 "change in future versions)."
2871 #: ../src/guestfs.pod:1401
2873 "The callback receives two numbers: C<position> and C<total>. The units of "
2874 "C<total> are not defined, although for some operations C<total> may relate "
2875 "in some way to the amount of data to be transferred (eg. in bytes or "
2876 "megabytes), and C<position> may be the portion which has been transferred."
2880 #: ../src/guestfs.pod:1407
2881 msgid "The only defined and stable parts of the API are:"
2885 #: ../src/guestfs.pod:1413
2887 "The callback can display to the user some type of progress bar or indicator "
2888 "which shows the ratio of C<position>:C<total>."
2892 #: ../src/guestfs.pod:1418
2893 msgid "0 E<lt>= C<position> E<lt>= C<total>"
2897 #: ../src/guestfs.pod:1422
2899 "If any progress notification is sent during a call, then a final progress "
2900 "notification is always sent when C<position> = C<total>."
2904 #: ../src/guestfs.pod:1425
2906 "This is to simplify caller code, so callers can easily set the progress "
2907 "indicator to \"100%\" at the end of the operation, without requiring special "
2908 "code to detect this case."
2912 #: ../src/guestfs.pod:1431
2914 "The callback also receives the procedure number and serial number of the "
2915 "call. These are only useful for debugging protocol issues, and the callback "
2916 "can normally ignore them. The callback may want to print these numbers in "
2917 "error messages or debugging messages."
2921 #: ../src/guestfs.pod:1436
2922 msgid "PRIVATE DATA AREA"
2926 #: ../src/guestfs.pod:1438
2928 "You can attach named pieces of private data to the libguestfs handle, and "
2929 "fetch them by name for the lifetime of the handle. This is called the "
2930 "private data area and is only available from the C API."
2934 #: ../src/guestfs.pod:1442
2935 msgid "To attach a named piece of data, use the following call:"
2939 #: ../src/guestfs.pod:1444
2942 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
2947 #: ../src/guestfs.pod:1446
2949 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
2950 "pointer (which can be C<NULL>). Any previous item with the same name is "
2955 #: ../src/guestfs.pod:1450
2957 "You can use any C<key> you want, but names beginning with an underscore "
2958 "character are reserved for internal libguestfs purposes (for implementing "
2959 "language bindings). It is recommended to prefix the name with some unique "
2960 "string to avoid collisions with other users."
2964 #: ../src/guestfs.pod:1455
2965 msgid "To retrieve the pointer, use:"
2969 #: ../src/guestfs.pod:1457
2972 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
2977 #: ../src/guestfs.pod:1459
2979 "This function returns C<NULL> if either no data is found associated with "
2980 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
2985 #: ../src/guestfs.pod:1463
2987 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
2988 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
2989 "all. In particular, libguestfs does I<not> try to free the data when the "
2990 "handle is closed. If the data must be freed, then the caller must either "
2991 "free it before calling L</guestfs_close> or must set up a close callback to "
2992 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
2993 "can be registered for a handle)."
2997 #: ../src/guestfs.pod:1471
2999 "The private data area is implemented using a hash table, and should be "
3000 "reasonably efficient for moderate numbers of keys."
3004 #: ../src/guestfs.pod:1474
3005 msgid "BLOCK DEVICE NAMING"
3009 #: ../src/guestfs.pod:1476
3011 "In the kernel there is now quite a profusion of schemata for naming block "
3012 "devices (in this context, by I<block device> I mean a physical or virtual "
3013 "hard drive). The original Linux IDE driver used names starting with C</dev/"
3014 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
3015 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
3016 "for the old IDE driver (particularly for SATA devices) those devices also "
3017 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
3018 "paravirtualized drivers. This has created several different naming systems, "
3019 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
3023 #: ../src/guestfs.pod:1488
3025 "As discussed above, libguestfs uses a qemu appliance running an embedded "
3026 "Linux kernel to access block devices. We can run a variety of appliances "
3027 "based on a variety of Linux kernels."
3031 #: ../src/guestfs.pod:1492
3033 "This causes a problem for libguestfs because many API calls use device or "
3034 "partition names. Working scripts and the recipe (example) scripts that we "
3035 "make available over the internet could fail if the naming scheme changes."
3039 #: ../src/guestfs.pod:1497
3041 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
3042 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
3043 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
3044 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
3048 #: ../src/guestfs.pod:1503
3050 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
3051 "L</guestfs_list_partitions> and similar calls return the true names of the "
3052 "devices and partitions as known to the appliance."
3056 #: ../src/guestfs.pod:1508
3057 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
3061 #: ../src/guestfs.pod:1510
3063 "Usually this translation is transparent. However in some (very rare) cases "
3064 "you may need to know the exact algorithm. Such cases include where you use "
3065 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
3066 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
3070 #: ../src/guestfs.pod:1516
3072 "The algorithm is applied only to I<parameters> which are known to be either "
3073 "device or partition names. Return values from functions such as L</"
3074 "guestfs_list_devices> are never changed."
3078 #: ../src/guestfs.pod:1524
3079 msgid "Is the string a parameter which is a device or partition name?"
3083 #: ../src/guestfs.pod:1528
3084 msgid "Does the string begin with C</dev/sd>?"
3088 #: ../src/guestfs.pod:1532
3090 "Does the named device exist? If so, we use that device. However if I<not> "
3091 "then we continue with this algorithm."
3095 #: ../src/guestfs.pod:1537
3096 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
3100 #: ../src/guestfs.pod:1539
3101 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
3105 #: ../src/guestfs.pod:1541
3106 msgid "If that named device exists, use it. If not, continue."
3110 #: ../src/guestfs.pod:1545
3111 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
3115 #: ../src/guestfs.pod:1547
3116 msgid "If that named device exists, use it. If not, return an error."
3120 #: ../src/guestfs.pod:1551
3121 msgid "PORTABILITY CONCERNS"
3125 #: ../src/guestfs.pod:1553
3127 "Although the standard naming scheme and automatic translation is useful for "
3128 "simple programs and guestfish scripts, for larger programs it is best not to "
3129 "rely on this mechanism."
3133 #: ../src/guestfs.pod:1557
3135 "Where possible for maximum future portability programs using libguestfs "
3136 "should use these future-proof techniques:"
3140 #: ../src/guestfs.pod:1564
3142 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
3143 "device names, and then use those names directly."
3147 #: ../src/guestfs.pod:1567
3149 "Since those device names exist by definition, they will never be translated."
3153 #: ../src/guestfs.pod:1572
3155 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
3156 "filesystem labels."
3160 #: ../src/guestfs.pod:1577
3165 #: ../src/guestfs.pod:1579
3166 msgid "COMMUNICATION PROTOCOL"
3170 #: ../src/guestfs.pod:1581
3172 "Don't rely on using this protocol directly. This section documents how it "
3173 "currently works, but it may change at any time."
3177 #: ../src/guestfs.pod:1584
3179 "The protocol used to talk between the library and the daemon running inside "
3180 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
3181 "1014, RFC 1832, RFC 4506)."
3185 #: ../src/guestfs.pod:1588
3187 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
3188 "this file is automatically generated)."
3192 #: ../src/guestfs.pod:1591
3194 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
3195 "and C<FileOut> parameters, which are handled with very simple request/reply "
3196 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
3197 "parameters, which use the same request and reply messages, but they may also "
3198 "be followed by files sent using a chunked encoding."
3202 #: ../src/guestfs.pod:1598
3203 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
3207 #: ../src/guestfs.pod:1600
3208 msgid "For ordinary functions, the request message is:"
3212 #: ../src/guestfs.pod:1602
3215 " total length (header + arguments,\n"
3216 " but not including the length word itself)\n"
3217 " struct guestfs_message_header (encoded as XDR)\n"
3218 " struct guestfs_<foo>_args (encoded as XDR)\n"
3223 #: ../src/guestfs.pod:1607
3225 "The total length field allows the daemon to allocate a fixed size buffer "
3226 "into which it slurps the rest of the message. As a result, the total length "
3227 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
3228 "effective size of any request is limited to somewhere under this size."
3232 #: ../src/guestfs.pod:1613
3234 "Note also that many functions don't take any arguments, in which case the "
3235 "C<guestfs_I<foo>_args> is completely omitted."
3239 #: ../src/guestfs.pod:1616
3241 "The header contains the procedure number (C<guestfs_proc>) which is how the "
3242 "receiver knows what type of args structure to expect, or none at all."
3246 #: ../src/guestfs.pod:1620
3247 msgid "The reply message for ordinary functions is:"
3251 #: ../src/guestfs.pod:1622
3254 " total length (header + ret,\n"
3255 " but not including the length word itself)\n"
3256 " struct guestfs_message_header (encoded as XDR)\n"
3257 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3262 #: ../src/guestfs.pod:1627
3264 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
3265 "functions that return no formal return values."
3269 #: ../src/guestfs.pod:1630
3271 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
3275 #: ../src/guestfs.pod:1633
3277 "In the case of an error, a flag is set in the header, and the reply message "
3278 "is slightly changed:"
3282 #: ../src/guestfs.pod:1636
3285 " total length (header + error,\n"
3286 " but not including the length word itself)\n"
3287 " struct guestfs_message_header (encoded as XDR)\n"
3288 " struct guestfs_message_error (encoded as XDR)\n"
3293 #: ../src/guestfs.pod:1641
3295 "The C<guestfs_message_error> structure contains the error message as a "
3300 #: ../src/guestfs.pod:1644
3301 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
3305 #: ../src/guestfs.pod:1646
3307 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
3308 "The normal request message is sent (see above). However this is followed by "
3309 "a sequence of file chunks."
3313 #: ../src/guestfs.pod:1650
3316 " total length (header + arguments,\n"
3317 " but not including the length word itself,\n"
3318 " and not including the chunks)\n"
3319 " struct guestfs_message_header (encoded as XDR)\n"
3320 " struct guestfs_<foo>_args (encoded as XDR)\n"
3321 " sequence of chunks for FileIn param #0\n"
3322 " sequence of chunks for FileIn param #1 etc.\n"
3327 #: ../src/guestfs.pod:1658
3328 msgid "The \"sequence of chunks\" is:"
3332 #: ../src/guestfs.pod:1660
3335 " length of chunk (not including length word itself)\n"
3336 " struct guestfs_chunk (encoded as XDR)\n"
3337 " length of chunk\n"
3338 " struct guestfs_chunk (encoded as XDR)\n"
3340 " length of chunk\n"
3341 " struct guestfs_chunk (with data.data_len == 0)\n"
3346 #: ../src/guestfs.pod:1668
3348 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
3349 "is set in the final chunk to indicate either successful completion or early "
3354 #: ../src/guestfs.pod:1672
3356 "At time of writing there are no functions that have more than one FileIn "
3357 "parameter. However this is (theoretically) supported, by sending the "
3358 "sequence of chunks for each FileIn parameter one after another (from left to "
3363 #: ../src/guestfs.pod:1677
3365 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
3366 "transfer. The library does this by sending a chunk with a special flag set "
3367 "to indicate cancellation. When the daemon sees this, it cancels the whole "
3368 "RPC, does I<not> send any reply, and goes back to reading the next request."
3372 #: ../src/guestfs.pod:1683
3374 "The daemon may also cancel. It does this by writing a special word "
3375 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
3376 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
3377 "cancel chunk). The special word is chosen so that even if cancellation "
3378 "happens right at the end of the transfer (after the library has finished "
3379 "writing and has started listening for the reply), the \"spurious\" cancel "
3380 "flag will not be confused with the reply message."
3384 #: ../src/guestfs.pod:1692
3386 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
3387 "limit), and also files where the size is not known in advance (eg. from "
3388 "pipes or sockets). However the chunks are rather small "
3389 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
3390 "to keep much in memory."
3394 #: ../src/guestfs.pod:1698
3395 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
3399 #: ../src/guestfs.pod:1700
3401 "The protocol for FileOut parameters is exactly the same as for FileIn "
3402 "parameters, but with the roles of daemon and library reversed."
3406 #: ../src/guestfs.pod:1703
3409 " total length (header + ret,\n"
3410 " but not including the length word itself,\n"
3411 " and not including the chunks)\n"
3412 " struct guestfs_message_header (encoded as XDR)\n"
3413 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3414 " sequence of chunks for FileOut param #0\n"
3415 " sequence of chunks for FileOut param #1 etc.\n"
3420 #: ../src/guestfs.pod:1711
3421 msgid "INITIAL MESSAGE"
3425 #: ../src/guestfs.pod:1713
3427 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
3428 "which indicates that the guest and daemon is alive. This is what L</"
3429 "guestfs_launch> waits for."
3433 #: ../src/guestfs.pod:1717
3434 msgid "PROGRESS NOTIFICATION MESSAGES"
3438 #: ../src/guestfs.pod:1719
3440 "The daemon may send progress notification messages at any time. These are "
3441 "distinguished by the normal length word being replaced by "
3442 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
3446 #: ../src/guestfs.pod:1723
3448 "The library turns them into progress callbacks (see "
3449 "C<guestfs_set_progress_callback>) if there is a callback registered, or "
3450 "discards them if not."
3454 #: ../src/guestfs.pod:1727
3456 "The daemon self-limits the frequency of progress messages it sends (see "
3457 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
3462 #: ../src/guestfs.pod:1731
3463 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
3467 #: ../src/guestfs.pod:1733
3469 "All high-level libguestfs actions are synchronous. If you want to use "
3470 "libguestfs asynchronously then you must create a thread."
3474 #: ../src/guestfs.pod:1736
3476 "Only use the handle from a single thread. Either use the handle exclusively "
3477 "from one thread, or provide your own mutex so that two threads cannot issue "
3478 "calls on the same handle at the same time."
3482 #: ../src/guestfs.pod:1740
3484 "See the graphical program guestfs-browser for one possible architecture for "
3485 "multithreaded programs using libvirt and libguestfs."
3489 #: ../src/guestfs.pod:1743
3490 msgid "QEMU WRAPPERS"
3494 #: ../src/guestfs.pod:1745
3496 "If you want to compile your own qemu, run qemu from a non-standard location, "
3497 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
3502 #: ../src/guestfs.pod:1749
3504 "There is one important rule to remember: you I<must C<exec qemu>> as the "
3505 "last command in the shell script (so that qemu replaces the shell and "
3506 "becomes the direct child of the libguestfs-using program). If you don't do "
3507 "this, then the qemu process won't be cleaned up correctly."
3511 #: ../src/guestfs.pod:1754
3513 "Here is an example of a wrapper, where I have built my own copy of qemu from "
3518 #: ../src/guestfs.pod:1757
3522 " qemudir=/home/rjones/d/qemu\n"
3523 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
3528 #: ../src/guestfs.pod:1761
3530 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
3531 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
3536 #: ../src/guestfs.pod:1765
3539 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
3544 #: ../src/guestfs.pod:1767
3546 "Note that libguestfs also calls qemu with the -help and -version options in "
3547 "order to determine features."
3551 #: ../src/guestfs.pod:1770
3552 msgid "LIBGUESTFS VERSION NUMBERS"
3556 #: ../src/guestfs.pod:1772
3558 "Since April 2010, libguestfs has started to make separate development and "
3559 "stable releases, along with corresponding branches in our git repository. "
3560 "These separate releases can be identified by version number:"
3564 #: ../src/guestfs.pod:1777
3567 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3568 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3574 " | `-------- sub-version\n"
3576 " `------ always '1' because we don't change the ABI\n"
3581 #: ../src/guestfs.pod:1788
3582 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3586 #: ../src/guestfs.pod:1790
3588 "As time passes we cherry pick fixes from the development branch and backport "
3589 "those into the stable branch, the effect being that the stable branch should "
3590 "get more stable and less buggy over time. So the stable releases are ideal "
3591 "for people who don't need new features but would just like the software to "
3596 #: ../src/guestfs.pod:1796
3597 msgid "Our criteria for backporting changes are:"
3601 #: ../src/guestfs.pod:1802
3603 "Documentation changes which don't affect any code are backported unless the "
3604 "documentation refers to a future feature which is not in stable."
3608 #: ../src/guestfs.pod:1808
3610 "Bug fixes which are not controversial, fix obvious problems, and have been "
3611 "well tested are backported."
3615 #: ../src/guestfs.pod:1813
3617 "Simple rearrangements of code which shouldn't affect how it works get "
3618 "backported. This is so that the code in the two branches doesn't get too "
3619 "far out of step, allowing us to backport future fixes more easily."
3623 #: ../src/guestfs.pod:1819
3625 "We I<don't> backport new features, new APIs, new tools etc, except in one "
3626 "exceptional case: the new feature is required in order to implement an "
3627 "important bug fix."
3631 #: ../src/guestfs.pod:1825
3633 "A new stable branch starts when we think the new features in development are "
3634 "substantial and compelling enough over the current stable branch to warrant "
3635 "it. When that happens we create new stable and development versions 1.N.0 "
3636 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
3637 "stable at this point, but by backporting fixes from development, that branch "
3638 "will stabilize over time."
3642 #: ../src/guestfs.pod:1833 ../fish/guestfish.pod:867
3643 #: ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:330
3644 #: ../tools/virt-rescue.pl:255
3645 msgid "ENVIRONMENT VARIABLES"
3649 #: ../src/guestfs.pod:1837 ../fish/guestfish.pod:893
3650 msgid "LIBGUESTFS_APPEND"
3654 #: ../src/guestfs.pod:1839 ../fish/guestfish.pod:895
3655 msgid "Pass additional options to the guest kernel."
3659 #: ../src/guestfs.pod:1841 ../fish/guestfish.pod:897
3660 msgid "LIBGUESTFS_DEBUG"
3664 #: ../src/guestfs.pod:1843
3666 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
3667 "effect as calling C<guestfs_set_verbose (g, 1)>."
3671 #: ../src/guestfs.pod:1846 ../fish/guestfish.pod:902
3672 msgid "LIBGUESTFS_MEMSIZE"
3676 #: ../src/guestfs.pod:1848 ../fish/guestfish.pod:904
3678 "Set the memory allocated to the qemu process, in megabytes. For example:"
3682 #: ../src/guestfs.pod:1851 ../fish/guestfish.pod:907
3685 " LIBGUESTFS_MEMSIZE=700\n"
3690 #: ../src/guestfs.pod:1853 ../fish/guestfish.pod:909
3691 msgid "LIBGUESTFS_PATH"
3695 #: ../src/guestfs.pod:1855
3697 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
3698 "the discussion of paths in section PATH above."
3702 #: ../src/guestfs.pod:1858 ../fish/guestfish.pod:914
3703 msgid "LIBGUESTFS_QEMU"
3707 #: ../src/guestfs.pod:1860 ../fish/guestfish.pod:916
3709 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
3710 "which was found at compile time by the configure script is used."
3714 #: ../src/guestfs.pod:1864
3715 msgid "See also L</QEMU WRAPPERS> above."
3719 #: ../src/guestfs.pod:1866 ../fish/guestfish.pod:920
3720 msgid "LIBGUESTFS_TRACE"
3724 #: ../src/guestfs.pod:1868
3726 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
3727 "effect as calling C<guestfs_set_trace (g, 1)>."
3731 #: ../src/guestfs.pod:1871 ../fish/guestfish.pod:929
3736 #: ../src/guestfs.pod:1873 ../fish/guestfish.pod:931
3737 msgid "Location of temporary directory, defaults to C</tmp>."
3741 #: ../src/guestfs.pod:1875 ../fish/guestfish.pod:933
3743 "If libguestfs was compiled to use the supermin appliance then the real "
3744 "appliance is cached in this directory, shared between all handles belonging "
3745 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
3746 "use in case C</tmp> is not large enough."
3750 #: ../src/guestfs.pod:1883 ../fish/guestfish.pod:991
3751 #: ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:214
3752 #: ../inspector/virt-inspector.pl:570 ../tools/virt-edit.pl:350
3753 #: ../tools/virt-win-reg.pl:484 ../tools/virt-df.pl:640
3754 #: ../tools/virt-ls.pl:232 ../tools/virt-resize.pl:1486
3755 #: ../tools/virt-list-filesystems.pl:186 ../tools/virt-cat.pl:185
3756 #: ../tools/virt-tar.pl:281 ../tools/virt-rescue.pl:267
3757 #: ../tools/virt-make-fs.pl:534 ../tools/virt-list-partitions.pl:254
3762 #: ../src/guestfs.pod:1885
3764 "L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-df(1)>, L<virt-edit"
3765 "(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-"
3766 "partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-"
3767 "tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, L<febootstrap(1)>, L<hivex(3)>, "
3768 "L<http://libguestfs.org/>."
3772 #: ../src/guestfs.pod:1903
3774 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
3775 "(8)>, L<disktype(1)>."
3779 #: ../src/guestfs.pod:1910 ../tools/virt-win-reg.pl:499
3780 #: ../tools/virt-make-fs.pl:548
3785 #: ../src/guestfs.pod:1912
3786 msgid "To get a list of bugs against libguestfs use this link:"
3790 #: ../src/guestfs.pod:1914
3792 "L<https://bugzilla.redhat.com/buglist.cgi?"
3793 "component=libguestfs&product=Virtualization+Tools>"
3797 #: ../src/guestfs.pod:1916
3798 msgid "To report a new bug against libguestfs use this link:"
3802 #: ../src/guestfs.pod:1918
3804 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
3805 "component=libguestfs&product=Virtualization+Tools>"
3809 #: ../src/guestfs.pod:1920
3810 msgid "When reporting a bug, please check:"
3814 #: ../src/guestfs.pod:1926
3815 msgid "That the bug hasn't been reported already."
3819 #: ../src/guestfs.pod:1930
3820 msgid "That you are testing a recent version."
3824 #: ../src/guestfs.pod:1934
3825 msgid "Describe the bug accurately, and give a way to reproduce it."
3829 #: ../src/guestfs.pod:1938
3831 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
3836 #: ../src/guestfs.pod:1943 ../fish/guestfish.pod:1008
3837 #: ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:225
3838 #: ../inspector/virt-inspector.pl:580
3843 #: ../src/guestfs.pod:1945 ../fish/guestfish.pod:1010
3844 #: ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:227
3845 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
3849 #: ../src/guestfs.pod:1947 ../fish/guestfish.pod:1012
3850 #: ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:229
3851 #: ../inspector/virt-inspector.pl:594 ../tools/virt-edit.pl:366
3852 #: ../tools/virt-win-reg.pl:514 ../tools/virt-df.pl:653
3853 #: ../tools/virt-ls.pl:247 ../tools/virt-resize.pl:1512
3854 #: ../tools/virt-list-filesystems.pl:202 ../tools/virt-cat.pl:199
3855 #: ../tools/virt-tar.pl:296 ../tools/virt-rescue.pl:281
3856 #: ../tools/virt-make-fs.pl:563 ../tools/virt-list-partitions.pl:269
3861 #: ../src/guestfs.pod:1949 ../fish/guestfish.pod:1014
3862 #: ../fuse/guestmount.pod:231
3863 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
3867 #: ../src/guestfs.pod:1952
3869 "This library is free software; you can redistribute it and/or modify it "
3870 "under the terms of the GNU Lesser General Public License as published by the "
3871 "Free Software Foundation; either version 2 of the License, or (at your "
3872 "option) any later version."
3876 #: ../src/guestfs.pod:1957
3878 "This library is distributed in the hope that it will be useful, but WITHOUT "
3879 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
3880 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
3885 #: ../src/guestfs.pod:1962
3887 "You should have received a copy of the GNU Lesser General Public License "
3888 "along with this library; if not, write to the Free Software Foundation, "
3889 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
3893 #: ../src/guestfs-actions.pod:1
3894 msgid "guestfs_add_cdrom"
3898 #: ../src/guestfs-actions.pod:3
3902 " guestfs_add_cdrom (guestfs_h *g,\n"
3903 " const char *filename);\n"
3908 #: ../src/guestfs-actions.pod:7 ../fish/guestfish-actions.pod:5
3909 msgid "This function adds a virtual CD-ROM disk image to the guest."
3913 #: ../src/guestfs-actions.pod:9 ../fish/guestfish-actions.pod:7
3914 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
3918 #: ../src/guestfs-actions.pod:17
3920 "This call checks for the existence of C<filename>. This stops you from "
3921 "specifying other types of drive which are supported by qemu such as C<nbd:> "
3922 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
3927 #: ../src/guestfs-actions.pod:24
3929 "If you just want to add an ISO file (often you use this as an efficient way "
3930 "to transfer large files into the guest), then you should probably use "
3931 "C<guestfs_add_drive_ro> instead."
3935 #: ../src/guestfs-actions.pod:30 ../src/guestfs-actions.pod:56
3936 #: ../src/guestfs-actions.pod:115 ../src/guestfs-actions.pod:150
3937 #: ../src/guestfs-actions.pod:162 ../src/guestfs-actions.pod:181
3938 #: ../src/guestfs-actions.pod:199 ../src/guestfs-actions.pod:211
3939 #: ../src/guestfs-actions.pod:318 ../src/guestfs-actions.pod:336
3940 #: ../src/guestfs-actions.pod:348 ../src/guestfs-actions.pod:387
3941 #: ../src/guestfs-actions.pod:411 ../src/guestfs-actions.pod:427
3942 #: ../src/guestfs-actions.pod:492 ../src/guestfs-actions.pod:521
3943 #: ../src/guestfs-actions.pod:533 ../src/guestfs-actions.pod:546
3944 #: ../src/guestfs-actions.pod:633 ../src/guestfs-actions.pod:649
3945 #: ../src/guestfs-actions.pod:661 ../src/guestfs-actions.pod:673
3946 #: ../src/guestfs-actions.pod:824 ../src/guestfs-actions.pod:842
3947 #: ../src/guestfs-actions.pod:858 ../src/guestfs-actions.pod:936
3948 #: ../src/guestfs-actions.pod:952 ../src/guestfs-actions.pod:969
3949 #: ../src/guestfs-actions.pod:981 ../src/guestfs-actions.pod:999
3950 #: ../src/guestfs-actions.pod:1034 ../src/guestfs-actions.pod:1096
3951 #: ../src/guestfs-actions.pod:1125 ../src/guestfs-actions.pod:1148
3952 #: ../src/guestfs-actions.pod:1181 ../src/guestfs-actions.pod:1275
3953 #: ../src/guestfs-actions.pod:1307 ../src/guestfs-actions.pod:1513
3954 #: ../src/guestfs-actions.pod:1533 ../src/guestfs-actions.pod:1616
3955 #: ../src/guestfs-actions.pod:1989 ../src/guestfs-actions.pod:2119
3956 #: ../src/guestfs-actions.pod:2176 ../src/guestfs-actions.pod:2208
3957 #: ../src/guestfs-actions.pod:2680 ../src/guestfs-actions.pod:2693
3958 #: ../src/guestfs-actions.pod:2711 ../src/guestfs-actions.pod:2825
3959 #: ../src/guestfs-actions.pod:2837 ../src/guestfs-actions.pod:2848
3960 #: ../src/guestfs-actions.pod:2860 ../src/guestfs-actions.pod:2873
3961 #: ../src/guestfs-actions.pod:2905 ../src/guestfs-actions.pod:2972
3962 #: ../src/guestfs-actions.pod:2990 ../src/guestfs-actions.pod:3005
3963 #: ../src/guestfs-actions.pod:3026 ../src/guestfs-actions.pod:3047
3964 #: ../src/guestfs-actions.pod:3077 ../src/guestfs-actions.pod:3094
3965 #: ../src/guestfs-actions.pod:3111 ../src/guestfs-actions.pod:3142
3966 #: ../src/guestfs-actions.pod:3152 ../src/guestfs-actions.pod:3186
3967 #: ../src/guestfs-actions.pod:3200 ../src/guestfs-actions.pod:3211
3968 #: ../src/guestfs-actions.pod:3224 ../src/guestfs-actions.pod:3239
3969 #: ../src/guestfs-actions.pod:3324 ../src/guestfs-actions.pod:3342
3970 #: ../src/guestfs-actions.pod:3353 ../src/guestfs-actions.pod:3400
3971 #: ../src/guestfs-actions.pod:3416 ../src/guestfs-actions.pod:3432
3972 #: ../src/guestfs-actions.pod:3446 ../src/guestfs-actions.pod:3458
3973 #: ../src/guestfs-actions.pod:3470 ../src/guestfs-actions.pod:3485
3974 #: ../src/guestfs-actions.pod:3498 ../src/guestfs-actions.pod:3516
3975 #: ../src/guestfs-actions.pod:3563 ../src/guestfs-actions.pod:3592
3976 #: ../src/guestfs-actions.pod:3609 ../src/guestfs-actions.pod:3626
3977 #: ../src/guestfs-actions.pod:3636 ../src/guestfs-actions.pod:3651
3978 #: ../src/guestfs-actions.pod:3662 ../src/guestfs-actions.pod:3675
3979 #: ../src/guestfs-actions.pod:3688 ../src/guestfs-actions.pod:3721
3980 #: ../src/guestfs-actions.pod:3734 ../src/guestfs-actions.pod:3752
3981 #: ../src/guestfs-actions.pod:3764 ../src/guestfs-actions.pod:3779
3982 #: ../src/guestfs-actions.pod:3822 ../src/guestfs-actions.pod:3855
3983 #: ../src/guestfs-actions.pod:3867 ../src/guestfs-actions.pod:3893
3984 #: ../src/guestfs-actions.pod:3908 ../src/guestfs-actions.pod:3924
3985 #: ../src/guestfs-actions.pod:4050 ../src/guestfs-actions.pod:4104
3986 #: ../src/guestfs-actions.pod:4124 ../src/guestfs-actions.pod:4140
3987 #: ../src/guestfs-actions.pod:4168 ../src/guestfs-actions.pod:4228
3988 #: ../src/guestfs-actions.pod:4243 ../src/guestfs-actions.pod:4254
3989 #: ../src/guestfs-actions.pod:4266 ../src/guestfs-actions.pod:4533
3990 #: ../src/guestfs-actions.pod:4550 ../src/guestfs-actions.pod:4562
3991 #: ../src/guestfs-actions.pod:4572 ../src/guestfs-actions.pod:4584
3992 #: ../src/guestfs-actions.pod:4594 ../src/guestfs-actions.pod:4606
3993 #: ../src/guestfs-actions.pod:4620 ../src/guestfs-actions.pod:4639
3994 #: ../src/guestfs-actions.pod:4656 ../src/guestfs-actions.pod:4673
3995 #: ../src/guestfs-actions.pod:4689 ../src/guestfs-actions.pod:4710
3996 #: ../src/guestfs-actions.pod:4726 ../src/guestfs-actions.pod:4743
3997 #: ../src/guestfs-actions.pod:4762 ../src/guestfs-actions.pod:4779
3998 #: ../src/guestfs-actions.pod:4794 ../src/guestfs-actions.pod:4820
3999 #: ../src/guestfs-actions.pod:4842 ../src/guestfs-actions.pod:4859
4000 #: ../src/guestfs-actions.pod:4881 ../src/guestfs-actions.pod:4894
4001 #: ../src/guestfs-actions.pod:4907 ../src/guestfs-actions.pod:4924
4002 #: ../src/guestfs-actions.pod:4959 ../src/guestfs-actions.pod:4980
4003 #: ../src/guestfs-actions.pod:5004 ../src/guestfs-actions.pod:5100
4004 #: ../src/guestfs-actions.pod:5211 ../src/guestfs-actions.pod:5221
4005 #: ../src/guestfs-actions.pod:5232 ../src/guestfs-actions.pod:5243
4006 #: ../src/guestfs-actions.pod:5263 ../src/guestfs-actions.pod:5274
4007 #: ../src/guestfs-actions.pod:5285 ../src/guestfs-actions.pod:5296
4008 #: ../src/guestfs-actions.pod:5309 ../src/guestfs-actions.pod:5362
4009 #: ../src/guestfs-actions.pod:5377 ../src/guestfs-actions.pod:5391
4010 #: ../src/guestfs-actions.pod:5405 ../src/guestfs-actions.pod:5420
4011 #: ../src/guestfs-actions.pod:5431 ../src/guestfs-actions.pod:5449
4012 #: ../src/guestfs-actions.pod:5481 ../src/guestfs-actions.pod:5493
4013 #: ../src/guestfs-actions.pod:5530 ../src/guestfs-actions.pod:5541
4014 #: ../src/guestfs-actions.pod:5557 ../src/guestfs-actions.pod:5584
4015 #: ../src/guestfs-actions.pod:5613 ../src/guestfs-actions.pod:5722
4016 #: ../src/guestfs-actions.pod:5738 ../src/guestfs-actions.pod:5750
4017 #: ../src/guestfs-actions.pod:5799 ../src/guestfs-actions.pod:5810
4018 #: ../src/guestfs-actions.pod:5850 ../src/guestfs-actions.pod:5879
4019 #: ../src/guestfs-actions.pod:5925 ../src/guestfs-actions.pod:5949
4020 #: ../src/guestfs-actions.pod:6009 ../src/guestfs-actions.pod:6026
4021 #: ../src/guestfs-actions.pod:6053
4022 msgid "This function returns 0 on success or -1 on error."
4026 #: ../src/guestfs-actions.pod:32 ../src/guestfs-actions.pod:164
4027 #: ../src/guestfs-actions.pod:183 ../fish/guestfish-actions.pod:28
4028 #: ../fish/guestfish-actions.pod:117 ../fish/guestfish-actions.pod:131
4030 "This function is deprecated. In new code, use the C<add_drive_opts> call "
4035 #: ../src/guestfs-actions.pod:35 ../src/guestfs-actions.pod:167
4036 #: ../src/guestfs-actions.pod:186 ../src/guestfs-actions.pod:1280
4037 #: ../src/guestfs-actions.pod:1732 ../src/guestfs-actions.pod:1751
4038 #: ../src/guestfs-actions.pod:5957 ../src/guestfs-actions.pod:6110
4039 #: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:120
4040 #: ../fish/guestfish-actions.pod:134 ../fish/guestfish-actions.pod:940
4041 #: ../fish/guestfish-actions.pod:1297 ../fish/guestfish-actions.pod:1311
4042 #: ../fish/guestfish-actions.pod:4353 ../fish/guestfish-actions.pod:4450
4044 "Deprecated functions will not be removed from the API, but the fact that "
4045 "they are deprecated indicates that there are problems with correct use of "
4050 #: ../src/guestfs-actions.pod:39
4051 msgid "guestfs_add_drive"
4055 #: ../src/guestfs-actions.pod:41
4059 " guestfs_add_drive (guestfs_h *g,\n"
4060 " const char *filename);\n"
4065 #: ../src/guestfs-actions.pod:45
4067 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
4068 "optional parameters, so the disk is added writable, with the format being "
4069 "detected automatically."
4073 #: ../src/guestfs-actions.pod:49
4075 "Automatic detection of the format opens you up to a potential security hole "
4076 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4077 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
4078 "you should think about replacing calls to this function with calls to "
4079 "C<guestfs_add_drive_opts>, and specifying the format."
4083 #: ../src/guestfs-actions.pod:58
4084 msgid "guestfs_add_drive_opts"
4088 #: ../src/guestfs-actions.pod:60
4092 " guestfs_add_drive_opts (guestfs_h *g,\n"
4093 " const char *filename,\n"
4099 #: ../src/guestfs-actions.pod:65
4101 "You may supply a list of optional arguments to this call. Use zero or more "
4102 "of the following pairs of parameters, and terminate the list with C<-1> on "
4103 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
4107 #: ../src/guestfs-actions.pod:70
4110 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
4111 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
4112 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
4117 #: ../src/guestfs-actions.pod:74 ../fish/guestfish-actions.pod:56
4119 "This function adds a virtual machine disk image C<filename> to libguestfs. "
4120 "The first time you call this function, the disk appears as C</dev/sda>, the "
4121 "second time as C</dev/sdb>, and so on."
4125 #: ../src/guestfs-actions.pod:79 ../fish/guestfish-actions.pod:61
4127 "You don't necessarily need to be root when using libguestfs. However you "
4128 "obviously do need sufficient permissions to access the filename for whatever "
4129 "operations you want to perform (ie. read access if you just want to read the "
4130 "image or write access if you want to modify the image)."
4134 #: ../src/guestfs-actions.pod:85 ../fish/guestfish-actions.pod:67
4135 msgid "This call checks that C<filename> exists."
4139 #: ../src/guestfs-actions.pod:87 ../fish/guestfish-actions.pod:69
4140 msgid "The optional arguments are:"
4144 #: ../src/guestfs-actions.pod:91 ../fish/guestfish-actions.pod:73
4149 #: ../src/guestfs-actions.pod:93 ../fish/guestfish-actions.pod:75
4151 "If true then the image is treated as read-only. Writes are still allowed, "
4152 "but they are stored in a temporary snapshot overlay which is discarded at "
4153 "the end. The disk that you add is not modified."
4157 #: ../src/guestfs-actions.pod:97 ../fish/guestfish-actions.pod:79
4162 #: ../src/guestfs-actions.pod:99
4164 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
4165 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
4166 "Possible formats include C<raw> and C<qcow2>."
4170 #: ../src/guestfs-actions.pod:103 ../fish/guestfish-actions.pod:85
4172 "Automatic detection of the format opens you up to a potential security hole "
4173 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4174 "RHBZ#642934. Specifying the format closes this security hole."
4178 #: ../src/guestfs-actions.pod:108 ../fish/guestfish-actions.pod:90
4183 #: ../src/guestfs-actions.pod:110
4185 "This rarely-used option lets you emulate the behaviour of the deprecated "
4186 "C<guestfs_add_drive_with_if> call (q.v.)"
4190 #: ../src/guestfs-actions.pod:117
4191 msgid "guestfs_add_drive_opts_va"
4195 #: ../src/guestfs-actions.pod:119
4199 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
4200 " const char *filename,\n"
4206 #: ../src/guestfs-actions.pod:124
4207 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
4211 #: ../src/guestfs-actions.pod:126 ../src/guestfs-actions.pod:137
4212 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
4216 #: ../src/guestfs-actions.pod:128
4217 msgid "guestfs_add_drive_opts_argv"
4221 #: ../src/guestfs-actions.pod:130
4225 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
4226 " const char *filename,\n"
4227 " const struct guestfs_add_drive_opts_argv *optargs);\n"
4232 #: ../src/guestfs-actions.pod:135
4233 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
4237 #: ../src/guestfs-actions.pod:139
4238 msgid "guestfs_add_drive_ro"
4242 #: ../src/guestfs-actions.pod:141
4246 " guestfs_add_drive_ro (guestfs_h *g,\n"
4247 " const char *filename);\n"
4252 #: ../src/guestfs-actions.pod:145
4254 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
4255 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
4256 "disk is added read-only, with the format being detected automatically."
4260 #: ../src/guestfs-actions.pod:152
4261 msgid "guestfs_add_drive_ro_with_if"
4265 #: ../src/guestfs-actions.pod:154
4269 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
4270 " const char *filename,\n"
4271 " const char *iface);\n"
4276 #: ../src/guestfs-actions.pod:159
4278 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
4279 "QEMU interface emulation to use at run time."
4283 #: ../src/guestfs-actions.pod:171
4284 msgid "guestfs_add_drive_with_if"
4288 #: ../src/guestfs-actions.pod:173
4292 " guestfs_add_drive_with_if (guestfs_h *g,\n"
4293 " const char *filename,\n"
4294 " const char *iface);\n"
4299 #: ../src/guestfs-actions.pod:178
4301 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
4302 "QEMU interface emulation to use at run time."
4306 #: ../src/guestfs-actions.pod:190
4307 msgid "guestfs_aug_clear"
4311 #: ../src/guestfs-actions.pod:192
4315 " guestfs_aug_clear (guestfs_h *g,\n"
4316 " const char *augpath);\n"
4321 #: ../src/guestfs-actions.pod:196 ../fish/guestfish-actions.pod:142
4323 "Set the value associated with C<path> to C<NULL>. This is the same as the "
4324 "L<augtool(1)> C<clear> command."
4328 #: ../src/guestfs-actions.pod:201
4329 msgid "guestfs_aug_close"
4333 #: ../src/guestfs-actions.pod:203
4337 " guestfs_aug_close (guestfs_h *g);\n"
4342 #: ../src/guestfs-actions.pod:206
4344 "Close the current Augeas handle and free up any resources used by it. After "
4345 "calling this, you have to call C<guestfs_aug_init> again before you can use "
4346 "any other Augeas functions."
4350 #: ../src/guestfs-actions.pod:213
4351 msgid "guestfs_aug_defnode"
4355 #: ../src/guestfs-actions.pod:215
4358 " struct guestfs_int_bool *\n"
4359 " guestfs_aug_defnode (guestfs_h *g,\n"
4360 " const char *name,\n"
4361 " const char *expr,\n"
4362 " const char *val);\n"
4367 #: ../src/guestfs-actions.pod:221 ../fish/guestfish-actions.pod:158
4369 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
4373 #: ../src/guestfs-actions.pod:224
4375 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
4376 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
4377 "containing that single node."
4381 #: ../src/guestfs-actions.pod:228 ../fish/guestfish-actions.pod:165
4383 "On success this returns a pair containing the number of nodes in the "
4384 "nodeset, and a boolean flag if a node was created."
4388 #: ../src/guestfs-actions.pod:232
4390 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
4391 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
4395 #: ../src/guestfs-actions.pod:236
4396 msgid "guestfs_aug_defvar"
4400 #: ../src/guestfs-actions.pod:238
4404 " guestfs_aug_defvar (guestfs_h *g,\n"
4405 " const char *name,\n"
4406 " const char *expr);\n"
4411 #: ../src/guestfs-actions.pod:243 ../fish/guestfish-actions.pod:173
4413 "Defines an Augeas variable C<name> whose value is the result of evaluating "
4414 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
4418 #: ../src/guestfs-actions.pod:247 ../fish/guestfish-actions.pod:177
4420 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
4421 "evaluates to something which is not a nodeset."
4425 #: ../src/guestfs-actions.pod:250 ../src/guestfs-actions.pod:399
4426 #: ../src/guestfs-actions.pod:561 ../src/guestfs-actions.pod:588
4427 #: ../src/guestfs-actions.pod:604 ../src/guestfs-actions.pod:621
4428 #: ../src/guestfs-actions.pod:1166 ../src/guestfs-actions.pod:1494
4429 #: ../src/guestfs-actions.pod:1683 ../src/guestfs-actions.pod:1770
4430 #: ../src/guestfs-actions.pod:1804 ../src/guestfs-actions.pod:1851
4431 #: ../src/guestfs-actions.pod:1870 ../src/guestfs-actions.pod:2108
4432 #: ../src/guestfs-actions.pod:2349 ../src/guestfs-actions.pod:2368
4433 #: ../src/guestfs-actions.pod:3843 ../src/guestfs-actions.pod:3957
4434 #: ../src/guestfs-actions.pod:4329 ../src/guestfs-actions.pod:4353
4435 #: ../src/guestfs-actions.pod:5518 ../src/guestfs-actions.pod:5890
4436 #: ../src/guestfs-actions.pod:5901 ../src/guestfs-actions.pod:5912
4437 msgid "On error this function returns -1."
4441 #: ../src/guestfs-actions.pod:252
4442 msgid "guestfs_aug_get"
4446 #: ../src/guestfs-actions.pod:254
4450 " guestfs_aug_get (guestfs_h *g,\n"
4451 " const char *augpath);\n"
4456 #: ../src/guestfs-actions.pod:258 ../fish/guestfish-actions.pod:184
4458 "Look up the value associated with C<path>. If C<path> matches exactly one "
4459 "node, the C<value> is returned."
4463 #: ../src/guestfs-actions.pod:261 ../src/guestfs-actions.pod:713
4464 #: ../src/guestfs-actions.pod:729 ../src/guestfs-actions.pod:787
4465 #: ../src/guestfs-actions.pod:801 ../src/guestfs-actions.pod:896
4466 #: ../src/guestfs-actions.pod:1016 ../src/guestfs-actions.pod:1047
4467 #: ../src/guestfs-actions.pod:1062 ../src/guestfs-actions.pod:1079
4468 #: ../src/guestfs-actions.pod:1196 ../src/guestfs-actions.pod:1369
4469 #: ../src/guestfs-actions.pod:1479 ../src/guestfs-actions.pod:1630
4470 #: ../src/guestfs-actions.pod:1645 ../src/guestfs-actions.pod:1726
4471 #: ../src/guestfs-actions.pod:1745 ../src/guestfs-actions.pod:1891
4472 #: ../src/guestfs-actions.pod:2038 ../src/guestfs-actions.pod:2228
4473 #: ../src/guestfs-actions.pod:2299 ../src/guestfs-actions.pod:2420
4474 #: ../src/guestfs-actions.pod:2456 ../src/guestfs-actions.pod:2477
4475 #: ../src/guestfs-actions.pod:2813 ../src/guestfs-actions.pod:3128
4476 #: ../src/guestfs-actions.pod:3279 ../src/guestfs-actions.pod:3380
4477 #: ../src/guestfs-actions.pod:3973 ../src/guestfs-actions.pod:4155
4478 #: ../src/guestfs-actions.pod:4306 ../src/guestfs-actions.pod:4473
4479 #: ../src/guestfs-actions.pod:4518 ../src/guestfs-actions.pod:5023
4480 #: ../src/guestfs-actions.pod:5037 ../src/guestfs-actions.pod:5052
4481 #: ../src/guestfs-actions.pod:5074 ../src/guestfs-actions.pod:5668
4482 #: ../src/guestfs-actions.pod:5685 ../src/guestfs-actions.pod:5701
4483 #: ../src/guestfs-actions.pod:5860 ../src/guestfs-actions.pod:6104
4485 "This function returns a string, or NULL on error. I<The caller must free "
4486 "the returned string after use>."
4490 #: ../src/guestfs-actions.pod:264
4491 msgid "guestfs_aug_init"
4495 #: ../src/guestfs-actions.pod:266
4499 " guestfs_aug_init (guestfs_h *g,\n"
4500 " const char *root,\n"
4506 #: ../src/guestfs-actions.pod:271 ../fish/guestfish-actions.pod:191
4508 "Create a new Augeas handle for editing configuration files. If there was "
4509 "any previous Augeas handle associated with this guestfs session, then it is "
4514 #: ../src/guestfs-actions.pod:275
4515 msgid "You must call this before using any other C<guestfs_aug_*> commands."
4519 #: ../src/guestfs-actions.pod:278 ../fish/guestfish-actions.pod:198
4521 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
4525 #: ../src/guestfs-actions.pod:281 ../fish/guestfish-actions.pod:201
4527 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
4528 "logical I<or> of the following integers:"
4532 #: ../src/guestfs-actions.pod:287 ../fish/guestfish-actions.pod:207
4533 msgid "C<AUG_SAVE_BACKUP> = 1"
4537 #: ../src/guestfs-actions.pod:289 ../fish/guestfish-actions.pod:209
4538 msgid "Keep the original file with a C<.augsave> extension."
4542 #: ../src/guestfs-actions.pod:291 ../fish/guestfish-actions.pod:211
4543 msgid "C<AUG_SAVE_NEWFILE> = 2"
4547 #: ../src/guestfs-actions.pod:293 ../fish/guestfish-actions.pod:213
4549 "Save changes into a file with extension C<.augnew>, and do not overwrite "
4550 "original. Overrides C<AUG_SAVE_BACKUP>."
4554 #: ../src/guestfs-actions.pod:296 ../fish/guestfish-actions.pod:216
4555 msgid "C<AUG_TYPE_CHECK> = 4"
4559 #: ../src/guestfs-actions.pod:298 ../fish/guestfish-actions.pod:218
4560 msgid "Typecheck lenses (can be expensive)."
4564 #: ../src/guestfs-actions.pod:300 ../fish/guestfish-actions.pod:220
4565 msgid "C<AUG_NO_STDINC> = 8"
4569 #: ../src/guestfs-actions.pod:302 ../fish/guestfish-actions.pod:222
4570 msgid "Do not use standard load path for modules."
4574 #: ../src/guestfs-actions.pod:304 ../fish/guestfish-actions.pod:224
4575 msgid "C<AUG_SAVE_NOOP> = 16"
4579 #: ../src/guestfs-actions.pod:306 ../fish/guestfish-actions.pod:226
4580 msgid "Make save a no-op, just record what would have been changed."
4584 #: ../src/guestfs-actions.pod:308 ../fish/guestfish-actions.pod:228
4585 msgid "C<AUG_NO_LOAD> = 32"
4589 #: ../src/guestfs-actions.pod:310
4590 msgid "Do not load the tree in C<guestfs_aug_init>."
4594 #: ../src/guestfs-actions.pod:314
4595 msgid "To close the handle, you can call C<guestfs_aug_close>."
4599 #: ../src/guestfs-actions.pod:316 ../fish/guestfish-actions.pod:236
4600 msgid "To find out more about Augeas, see L<http://augeas.net/>."
4604 #: ../src/guestfs-actions.pod:320
4605 msgid "guestfs_aug_insert"
4609 #: ../src/guestfs-actions.pod:322
4613 " guestfs_aug_insert (guestfs_h *g,\n"
4614 " const char *augpath,\n"
4615 " const char *label,\n"
4621 #: ../src/guestfs-actions.pod:328 ../fish/guestfish-actions.pod:242
4623 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
4624 "or after C<path> (depending on the boolean flag C<before>)."
4628 #: ../src/guestfs-actions.pod:332 ../fish/guestfish-actions.pod:246
4630 "C<path> must match exactly one existing node in the tree, and C<label> must "
4631 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
4635 #: ../src/guestfs-actions.pod:338
4636 msgid "guestfs_aug_load"
4640 #: ../src/guestfs-actions.pod:340
4644 " guestfs_aug_load (guestfs_h *g);\n"
4649 #: ../src/guestfs-actions.pod:343 ../fish/guestfish-actions.pod:254
4650 msgid "Load files into the tree."
4654 #: ../src/guestfs-actions.pod:345 ../fish/guestfish-actions.pod:256
4655 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
4659 #: ../src/guestfs-actions.pod:350
4660 msgid "guestfs_aug_ls"
4664 #: ../src/guestfs-actions.pod:352
4668 " guestfs_aug_ls (guestfs_h *g,\n"
4669 " const char *augpath);\n"
4674 #: ../src/guestfs-actions.pod:356
4676 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
4677 "sorting the resulting nodes into alphabetical order."
4681 #: ../src/guestfs-actions.pod:359 ../src/guestfs-actions.pod:373
4682 #: ../src/guestfs-actions.pod:507 ../src/guestfs-actions.pod:913
4683 #: ../src/guestfs-actions.pod:1209 ../src/guestfs-actions.pod:1226
4684 #: ../src/guestfs-actions.pod:1319 ../src/guestfs-actions.pod:1336
4685 #: ../src/guestfs-actions.pod:1573 ../src/guestfs-actions.pod:1930
4686 #: ../src/guestfs-actions.pod:1944 ../src/guestfs-actions.pod:1961
4687 #: ../src/guestfs-actions.pod:2000 ../src/guestfs-actions.pod:2022
4688 #: ../src/guestfs-actions.pod:2087 ../src/guestfs-actions.pod:2130
4689 #: ../src/guestfs-actions.pod:2322 ../src/guestfs-actions.pod:2517
4690 #: ../src/guestfs-actions.pod:2739 ../src/guestfs-actions.pod:2797
4691 #: ../src/guestfs-actions.pod:2888 ../src/guestfs-actions.pod:3254
4692 #: ../src/guestfs-actions.pod:3808 ../src/guestfs-actions.pod:4281
4693 #: ../src/guestfs-actions.pod:4396 ../src/guestfs-actions.pod:4505
4694 #: ../src/guestfs-actions.pod:5088 ../src/guestfs-actions.pod:5141
4695 #: ../src/guestfs-actions.pod:5194 ../src/guestfs-actions.pod:5320
4696 #: ../src/guestfs-actions.pod:5342 ../src/guestfs-actions.pod:5766
4697 #: ../src/guestfs-actions.pod:5784 ../src/guestfs-actions.pod:5825
4698 #: ../src/guestfs-actions.pod:5971 ../src/guestfs-actions.pod:5988
4699 #: ../src/guestfs-actions.pod:6065 ../src/guestfs-actions.pod:6082
4700 #: ../src/guestfs-actions.pod:6124 ../src/guestfs-actions.pod:6141
4702 "This function returns a NULL-terminated array of strings (like L<environ(3)"
4703 ">), or NULL if there was an error. I<The caller must free the strings and "
4704 "the array after use>."
4708 #: ../src/guestfs-actions.pod:363
4709 msgid "guestfs_aug_match"
4713 #: ../src/guestfs-actions.pod:365
4717 " guestfs_aug_match (guestfs_h *g,\n"
4718 " const char *augpath);\n"
4723 #: ../src/guestfs-actions.pod:369 ../fish/guestfish-actions.pod:270
4725 "Returns a list of paths which match the path expression C<path>. The "
4726 "returned paths are sufficiently qualified so that they match exactly one "
4727 "node in the current tree."
4731 #: ../src/guestfs-actions.pod:377
4732 msgid "guestfs_aug_mv"
4736 #: ../src/guestfs-actions.pod:379
4740 " guestfs_aug_mv (guestfs_h *g,\n"
4741 " const char *src,\n"
4742 " const char *dest);\n"
4747 #: ../src/guestfs-actions.pod:384 ../fish/guestfish-actions.pod:278
4749 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
4750 "C<dest> is overwritten if it exists."
4754 #: ../src/guestfs-actions.pod:389
4755 msgid "guestfs_aug_rm"
4759 #: ../src/guestfs-actions.pod:391
4763 " guestfs_aug_rm (guestfs_h *g,\n"
4764 " const char *augpath);\n"
4769 #: ../src/guestfs-actions.pod:395 ../fish/guestfish-actions.pod:285
4770 msgid "Remove C<path> and all of its children."
4774 #: ../src/guestfs-actions.pod:397 ../fish/guestfish-actions.pod:287
4775 msgid "On success this returns the number of entries which were removed."
4779 #: ../src/guestfs-actions.pod:401
4780 msgid "guestfs_aug_save"
4784 #: ../src/guestfs-actions.pod:403
4788 " guestfs_aug_save (guestfs_h *g);\n"
4793 #: ../src/guestfs-actions.pod:406 ../fish/guestfish-actions.pod:293
4794 msgid "This writes all pending changes to disk."
4798 #: ../src/guestfs-actions.pod:408
4800 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
4805 #: ../src/guestfs-actions.pod:413
4806 msgid "guestfs_aug_set"
4810 #: ../src/guestfs-actions.pod:415
4814 " guestfs_aug_set (guestfs_h *g,\n"
4815 " const char *augpath,\n"
4816 " const char *val);\n"
4821 #: ../src/guestfs-actions.pod:420 ../fish/guestfish-actions.pod:302
4822 msgid "Set the value associated with C<path> to C<val>."
4826 #: ../src/guestfs-actions.pod:422
4828 "In the Augeas API, it is possible to clear a node by setting the value to "
4829 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
4830 "this call. Instead you must use the C<guestfs_aug_clear> call."
4834 #: ../src/guestfs-actions.pod:429
4835 msgid "guestfs_available"
4839 #: ../src/guestfs-actions.pod:431
4843 " guestfs_available (guestfs_h *g,\n"
4844 " char *const *groups);\n"
4849 #: ../src/guestfs-actions.pod:435 ../fish/guestfish-actions.pod:313
4851 "This command is used to check the availability of some groups of "
4852 "functionality in the appliance, which not all builds of the libguestfs "
4853 "appliance will be able to provide."
4857 #: ../src/guestfs-actions.pod:439
4859 "The libguestfs groups, and the functions that those groups correspond to, "
4860 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
4861 "runtime by calling C<guestfs_available_all_groups>."
4865 #: ../src/guestfs-actions.pod:444 ../fish/guestfish-actions.pod:322
4867 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
4868 "\"]> would check for the availability of the Linux inotify functions and "
4869 "Augeas (configuration file editing) functions."
4873 #: ../src/guestfs-actions.pod:449 ../fish/guestfish-actions.pod:327
4874 msgid "The command returns no error if I<all> requested groups are available."
4878 #: ../src/guestfs-actions.pod:451 ../fish/guestfish-actions.pod:329
4880 "It fails with an error if one or more of the requested groups is unavailable "
4885 #: ../src/guestfs-actions.pod:454 ../fish/guestfish-actions.pod:332
4887 "If an unknown group name is included in the list of groups then an error is "
4892 #: ../src/guestfs-actions.pod:457 ../fish/guestfish-actions.pod:335
4897 #: ../src/guestfs-actions.pod:463
4898 msgid "You must call C<guestfs_launch> before calling this function."
4902 #: ../src/guestfs-actions.pod:465 ../fish/guestfish-actions.pod:343
4904 "The reason is because we don't know what groups are supported by the "
4905 "appliance/daemon until it is running and can be queried."
4909 #: ../src/guestfs-actions.pod:471 ../fish/guestfish-actions.pod:349
4911 "If a group of functions is available, this does not necessarily mean that "
4912 "they will work. You still have to check for errors when calling individual "
4913 "API functions even if they are available."
4917 #: ../src/guestfs-actions.pod:478 ../fish/guestfish-actions.pod:356
4919 "It is usually the job of distro packagers to build complete functionality "
4920 "into the libguestfs appliance. Upstream libguestfs, if built from source "
4921 "with all requirements satisfied, will support everything."
4925 #: ../src/guestfs-actions.pod:485
4927 "This call was added in version C<1.0.80>. In previous versions of "
4928 "libguestfs all you could do would be to speculatively execute a command to "
4929 "find out if the daemon implemented it. See also C<guestfs_version>."
4933 #: ../src/guestfs-actions.pod:494
4934 msgid "guestfs_available_all_groups"
4938 #: ../src/guestfs-actions.pod:496
4942 " guestfs_available_all_groups (guestfs_h *g);\n"
4947 #: ../src/guestfs-actions.pod:499
4949 "This command returns a list of all optional groups that this daemon knows "
4950 "about. Note this returns both supported and unsupported groups. To find "
4951 "out which ones the daemon can actually support you have to call "
4952 "C<guestfs_available> on each member of the returned list."
4956 #: ../src/guestfs-actions.pod:505
4957 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
4961 #: ../src/guestfs-actions.pod:511
4962 msgid "guestfs_base64_in"
4966 #: ../src/guestfs-actions.pod:513
4970 " guestfs_base64_in (guestfs_h *g,\n"
4971 " const char *base64file,\n"
4972 " const char *filename);\n"
4977 #: ../src/guestfs-actions.pod:518 ../fish/guestfish-actions.pod:386
4979 "This command uploads base64-encoded data from C<base64file> to C<filename>."
4983 #: ../src/guestfs-actions.pod:523
4984 msgid "guestfs_base64_out"
4988 #: ../src/guestfs-actions.pod:525
4992 " guestfs_base64_out (guestfs_h *g,\n"
4993 " const char *filename,\n"
4994 " const char *base64file);\n"
4999 #: ../src/guestfs-actions.pod:530 ../fish/guestfish-actions.pod:395
5001 "This command downloads the contents of C<filename>, writing it out to local "
5002 "file C<base64file> encoded as base64."
5006 #: ../src/guestfs-actions.pod:535
5007 msgid "guestfs_blockdev_flushbufs"
5011 #: ../src/guestfs-actions.pod:537
5015 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
5016 " const char *device);\n"
5021 #: ../src/guestfs-actions.pod:541 ../fish/guestfish-actions.pod:404
5023 "This tells the kernel to flush internal buffers associated with C<device>."
5027 #: ../src/guestfs-actions.pod:544 ../src/guestfs-actions.pod:559
5028 #: ../src/guestfs-actions.pod:572 ../src/guestfs-actions.pod:586
5029 #: ../src/guestfs-actions.pod:602 ../src/guestfs-actions.pod:619
5030 #: ../src/guestfs-actions.pod:631 ../src/guestfs-actions.pod:647
5031 #: ../src/guestfs-actions.pod:659 ../src/guestfs-actions.pod:671
5032 #: ../fish/guestfish-actions.pod:407 ../fish/guestfish-actions.pod:418
5033 #: ../fish/guestfish-actions.pod:427 ../fish/guestfish-actions.pod:437
5034 #: ../fish/guestfish-actions.pod:449 ../fish/guestfish-actions.pod:462
5035 #: ../fish/guestfish-actions.pod:470 ../fish/guestfish-actions.pod:481
5036 #: ../fish/guestfish-actions.pod:489 ../fish/guestfish-actions.pod:497
5037 msgid "This uses the L<blockdev(8)> command."
5041 #: ../src/guestfs-actions.pod:548
5042 msgid "guestfs_blockdev_getbsz"
5046 #: ../src/guestfs-actions.pod:550
5050 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
5051 " const char *device);\n"
5056 #: ../src/guestfs-actions.pod:554 ../fish/guestfish-actions.pod:413
5057 msgid "This returns the block size of a device."
5061 #: ../src/guestfs-actions.pod:556 ../src/guestfs-actions.pod:644
5062 #: ../fish/guestfish-actions.pod:415 ../fish/guestfish-actions.pod:478
5064 "(Note this is different from both I<size in blocks> and I<filesystem block "
5069 #: ../src/guestfs-actions.pod:563
5070 msgid "guestfs_blockdev_getro"
5074 #: ../src/guestfs-actions.pod:565
5078 " guestfs_blockdev_getro (guestfs_h *g,\n"
5079 " const char *device);\n"
5084 #: ../src/guestfs-actions.pod:569 ../fish/guestfish-actions.pod:424
5086 "Returns a boolean indicating if the block device is read-only (true if read-"
5087 "only, false if not)."
5091 #: ../src/guestfs-actions.pod:574 ../src/guestfs-actions.pod:1245
5092 #: ../src/guestfs-actions.pod:1258 ../src/guestfs-actions.pod:1706
5093 #: ../src/guestfs-actions.pod:1715 ../src/guestfs-actions.pod:1779
5094 #: ../src/guestfs-actions.pod:1826 ../src/guestfs-actions.pod:1839
5095 #: ../src/guestfs-actions.pod:1860 ../src/guestfs-actions.pod:1879
5096 #: ../src/guestfs-actions.pod:2532 ../src/guestfs-actions.pod:2544
5097 #: ../src/guestfs-actions.pod:2557 ../src/guestfs-actions.pod:2569
5098 #: ../src/guestfs-actions.pod:2583 ../src/guestfs-actions.pod:2596
5099 #: ../src/guestfs-actions.pod:2610 ../src/guestfs-actions.pod:2622
5100 #: ../src/guestfs-actions.pod:2633 ../src/guestfs-actions.pod:2645
5101 #: ../src/guestfs-actions.pod:2658 ../src/guestfs-actions.pod:2671
5102 #: ../src/guestfs-actions.pod:3941
5103 msgid "This function returns a C truth value on success or -1 on error."
5107 #: ../src/guestfs-actions.pod:576
5108 msgid "guestfs_blockdev_getsize64"
5112 #: ../src/guestfs-actions.pod:578
5116 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
5117 " const char *device);\n"
5122 #: ../src/guestfs-actions.pod:582 ../fish/guestfish-actions.pod:433
5123 msgid "This returns the size of the device in bytes."
5127 #: ../src/guestfs-actions.pod:584
5128 msgid "See also C<guestfs_blockdev_getsz>."
5132 #: ../src/guestfs-actions.pod:590
5133 msgid "guestfs_blockdev_getss"
5137 #: ../src/guestfs-actions.pod:592
5141 " guestfs_blockdev_getss (guestfs_h *g,\n"
5142 " const char *device);\n"
5147 #: ../src/guestfs-actions.pod:596 ../fish/guestfish-actions.pod:443
5149 "This returns the size of sectors on a block device. Usually 512, but can be "
5150 "larger for modern devices."
5154 #: ../src/guestfs-actions.pod:599
5156 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
5161 #: ../src/guestfs-actions.pod:606
5162 msgid "guestfs_blockdev_getsz"
5166 #: ../src/guestfs-actions.pod:608
5170 " guestfs_blockdev_getsz (guestfs_h *g,\n"
5171 " const char *device);\n"
5176 #: ../src/guestfs-actions.pod:612 ../fish/guestfish-actions.pod:455
5178 "This returns the size of the device in units of 512-byte sectors (even if "
5179 "the sectorsize isn't 512 bytes ... weird)."
5183 #: ../src/guestfs-actions.pod:615
5185 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
5186 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
5190 #: ../src/guestfs-actions.pod:623
5191 msgid "guestfs_blockdev_rereadpt"
5195 #: ../src/guestfs-actions.pod:625
5199 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
5200 " const char *device);\n"
5205 #: ../src/guestfs-actions.pod:629 ../fish/guestfish-actions.pod:468
5206 msgid "Reread the partition table on C<device>."
5210 #: ../src/guestfs-actions.pod:635
5211 msgid "guestfs_blockdev_setbsz"
5215 #: ../src/guestfs-actions.pod:637
5219 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
5220 " const char *device,\n"
5221 " int blocksize);\n"
5226 #: ../src/guestfs-actions.pod:642 ../fish/guestfish-actions.pod:476
5227 msgid "This sets the block size of a device."
5231 #: ../src/guestfs-actions.pod:651
5232 msgid "guestfs_blockdev_setro"
5236 #: ../src/guestfs-actions.pod:653
5240 " guestfs_blockdev_setro (guestfs_h *g,\n"
5241 " const char *device);\n"
5246 #: ../src/guestfs-actions.pod:657 ../fish/guestfish-actions.pod:487
5247 msgid "Sets the block device named C<device> to read-only."
5251 #: ../src/guestfs-actions.pod:663
5252 msgid "guestfs_blockdev_setrw"
5256 #: ../src/guestfs-actions.pod:665
5260 " guestfs_blockdev_setrw (guestfs_h *g,\n"
5261 " const char *device);\n"
5266 #: ../src/guestfs-actions.pod:669 ../fish/guestfish-actions.pod:495
5267 msgid "Sets the block device named C<device> to read-write."
5271 #: ../src/guestfs-actions.pod:675
5272 msgid "guestfs_case_sensitive_path"
5276 #: ../src/guestfs-actions.pod:677
5280 " guestfs_case_sensitive_path (guestfs_h *g,\n"
5281 " const char *path);\n"
5286 #: ../src/guestfs-actions.pod:681 ../fish/guestfish-actions.pod:503
5288 "This can be used to resolve case insensitive paths on a filesystem which is "
5289 "case sensitive. The use case is to resolve paths which you have read from "
5290 "Windows configuration files or the Windows Registry, to the true path."
5294 #: ../src/guestfs-actions.pod:686 ../fish/guestfish-actions.pod:508
5296 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
5297 "(and probably others), which is that although the underlying filesystem is "
5298 "case-insensitive, the driver exports the filesystem to Linux as case-"
5303 #: ../src/guestfs-actions.pod:691 ../fish/guestfish-actions.pod:513
5305 "One consequence of this is that special directories such as C<c:\\windows> "
5306 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
5307 "precise details of how they were created. In Windows itself this would not "
5312 #: ../src/guestfs-actions.pod:697 ../fish/guestfish-actions.pod:519
5314 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
5319 #: ../src/guestfs-actions.pod:700 ../fish/guestfish-actions.pod:522
5321 "This function resolves the true case of each element in the path and returns "
5322 "the case-sensitive path."
5326 #: ../src/guestfs-actions.pod:703
5328 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
5329 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
5330 "how the directories were originally created under Windows)."
5334 #: ../src/guestfs-actions.pod:708 ../fish/guestfish-actions.pod:530
5335 msgid "I<Note>: This function does not handle drive names, backslashes etc."
5339 #: ../src/guestfs-actions.pod:711
5340 msgid "See also C<guestfs_realpath>."
5344 #: ../src/guestfs-actions.pod:716
5349 #: ../src/guestfs-actions.pod:718
5353 " guestfs_cat (guestfs_h *g,\n"
5354 " const char *path);\n"
5359 #: ../src/guestfs-actions.pod:722 ../src/guestfs-actions.pod:4386
5360 #: ../fish/guestfish-actions.pod:539 ../fish/guestfish-actions.pod:3197
5361 msgid "Return the contents of the file named C<path>."
5365 #: ../src/guestfs-actions.pod:724
5367 "Note that this function cannot correctly handle binary files (specifically, "
5368 "files containing C<\\0> character which is treated as end of string). For "
5369 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
5370 "functions which have a more complex interface."
5374 #: ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:899
5375 #: ../src/guestfs-actions.pod:917 ../src/guestfs-actions.pod:1213
5376 #: ../src/guestfs-actions.pod:1230 ../src/guestfs-actions.pod:1323
5377 #: ../src/guestfs-actions.pod:1340 ../src/guestfs-actions.pod:1577
5378 #: ../src/guestfs-actions.pod:1948 ../src/guestfs-actions.pod:1965
5379 #: ../src/guestfs-actions.pod:2004 ../src/guestfs-actions.pod:2026
5380 #: ../src/guestfs-actions.pod:2041 ../src/guestfs-actions.pod:2068
5381 #: ../src/guestfs-actions.pod:4191 ../src/guestfs-actions.pod:4215
5382 #: ../src/guestfs-actions.pod:4331 ../src/guestfs-actions.pod:4355
5383 #: ../src/guestfs-actions.pod:4377 ../src/guestfs-actions.pod:5145
5384 #: ../src/guestfs-actions.pod:5198 ../src/guestfs-actions.pod:5324
5385 #: ../src/guestfs-actions.pod:5346 ../src/guestfs-actions.pod:5927
5386 #: ../src/guestfs-actions.pod:5951 ../src/guestfs-actions.pod:5975
5387 #: ../src/guestfs-actions.pod:5992 ../src/guestfs-actions.pod:6069
5388 #: ../src/guestfs-actions.pod:6086 ../src/guestfs-actions.pod:6128
5389 #: ../src/guestfs-actions.pod:6145 ../fish/guestfish-actions.pod:546
5390 #: ../fish/guestfish-actions.pod:681 ../fish/guestfish-actions.pod:693
5391 #: ../fish/guestfish-actions.pod:894 ../fish/guestfish-actions.pod:904
5392 #: ../fish/guestfish-actions.pod:971 ../fish/guestfish-actions.pod:981
5393 #: ../fish/guestfish-actions.pod:1176 ../fish/guestfish-actions.pod:1451
5394 #: ../fish/guestfish-actions.pod:1461 ../fish/guestfish-actions.pod:1489
5395 #: ../fish/guestfish-actions.pod:1504 ../fish/guestfish-actions.pod:1514
5396 #: ../fish/guestfish-actions.pod:1533 ../fish/guestfish-actions.pod:3067
5397 #: ../fish/guestfish-actions.pod:3082 ../fish/guestfish-actions.pod:3158
5398 #: ../fish/guestfish-actions.pod:3175 ../fish/guestfish-actions.pod:3190
5399 #: ../fish/guestfish-actions.pod:3773 ../fish/guestfish-actions.pod:3819
5400 #: ../fish/guestfish-actions.pod:3904 ../fish/guestfish-actions.pod:3919
5401 #: ../fish/guestfish-actions.pod:4329 ../fish/guestfish-actions.pod:4347
5402 #: ../fish/guestfish-actions.pod:4364 ../fish/guestfish-actions.pod:4374
5403 #: ../fish/guestfish-actions.pod:4422 ../fish/guestfish-actions.pod:4432
5404 #: ../fish/guestfish-actions.pod:4461 ../fish/guestfish-actions.pod:4471
5406 "Because of the message protocol, there is a transfer limit of somewhere "
5407 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
5411 #: ../src/guestfs-actions.pod:735
5412 msgid "guestfs_checksum"
5416 #: ../src/guestfs-actions.pod:737
5420 " guestfs_checksum (guestfs_h *g,\n"
5421 " const char *csumtype,\n"
5422 " const char *path);\n"
5427 #: ../src/guestfs-actions.pod:742 ../fish/guestfish-actions.pod:553
5429 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
5433 #: ../src/guestfs-actions.pod:745 ../fish/guestfish-actions.pod:556
5435 "The type of checksum to compute is given by the C<csumtype> parameter which "
5436 "must have one of the following values:"
5440 #: ../src/guestfs-actions.pod:750 ../fish/guestfish-actions.pod:561
5445 #: ../src/guestfs-actions.pod:752 ../fish/guestfish-actions.pod:563
5447 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
5452 #: ../src/guestfs-actions.pod:755 ../fish/guestfish-actions.pod:566
5457 #: ../src/guestfs-actions.pod:757 ../fish/guestfish-actions.pod:568
5458 msgid "Compute the MD5 hash (using the C<md5sum> program)."
5462 #: ../src/guestfs-actions.pod:759 ../fish/guestfish-actions.pod:570
5467 #: ../src/guestfs-actions.pod:761 ../fish/guestfish-actions.pod:572
5468 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
5472 #: ../src/guestfs-actions.pod:763 ../fish/guestfish-actions.pod:574
5477 #: ../src/guestfs-actions.pod:765 ../fish/guestfish-actions.pod:576
5478 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
5482 #: ../src/guestfs-actions.pod:767 ../fish/guestfish-actions.pod:578
5487 #: ../src/guestfs-actions.pod:769 ../fish/guestfish-actions.pod:580
5488 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
5492 #: ../src/guestfs-actions.pod:771 ../fish/guestfish-actions.pod:582
5497 #: ../src/guestfs-actions.pod:773 ../fish/guestfish-actions.pod:584
5498 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
5502 #: ../src/guestfs-actions.pod:775 ../fish/guestfish-actions.pod:586
5507 #: ../src/guestfs-actions.pod:777 ../fish/guestfish-actions.pod:588
5508 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
5512 #: ../src/guestfs-actions.pod:781 ../fish/guestfish-actions.pod:592
5513 msgid "The checksum is returned as a printable string."
5517 #: ../src/guestfs-actions.pod:783
5518 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
5522 #: ../src/guestfs-actions.pod:785
5523 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
5527 #: ../src/guestfs-actions.pod:790
5528 msgid "guestfs_checksum_device"
5532 #: ../src/guestfs-actions.pod:792
5536 " guestfs_checksum_device (guestfs_h *g,\n"
5537 " const char *csumtype,\n"
5538 " const char *device);\n"
5543 #: ../src/guestfs-actions.pod:797
5545 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
5546 "device named C<device>. For the types of checksums supported see the "
5547 "C<guestfs_checksum> command."
5551 #: ../src/guestfs-actions.pod:804
5552 msgid "guestfs_checksums_out"
5556 #: ../src/guestfs-actions.pod:806
5560 " guestfs_checksums_out (guestfs_h *g,\n"
5561 " const char *csumtype,\n"
5562 " const char *directory,\n"
5563 " const char *sumsfile);\n"
5568 #: ../src/guestfs-actions.pod:812 ../fish/guestfish-actions.pod:610
5570 "This command computes the checksums of all regular files in C<directory> and "
5571 "then emits a list of those checksums to the local output file C<sumsfile>."
5575 #: ../src/guestfs-actions.pod:816 ../fish/guestfish-actions.pod:614
5577 "This can be used for verifying the integrity of a virtual machine. However "
5578 "to be properly secure you should pay attention to the output of the checksum "
5579 "command (it uses the ones from GNU coreutils). In particular when the "
5580 "filename is not printable, coreutils uses a special backslash syntax. For "
5581 "more information, see the GNU coreutils info file."
5585 #: ../src/guestfs-actions.pod:826
5586 msgid "guestfs_chmod"
5590 #: ../src/guestfs-actions.pod:828
5594 " guestfs_chmod (guestfs_h *g,\n"
5596 " const char *path);\n"
5601 #: ../src/guestfs-actions.pod:833 ../fish/guestfish-actions.pod:628
5603 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
5608 #: ../src/guestfs-actions.pod:836 ../fish/guestfish-actions.pod:631
5610 "I<Note>: When using this command from guestfish, C<mode> by default would be "
5611 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
5616 #: ../src/guestfs-actions.pod:840 ../src/guestfs-actions.pod:3483
5617 #: ../src/guestfs-actions.pod:3590 ../src/guestfs-actions.pod:3607
5618 #: ../src/guestfs-actions.pod:3624 ../fish/guestfish-actions.pod:635
5619 #: ../fish/guestfish-actions.pod:2557 ../fish/guestfish-actions.pod:2642
5620 #: ../fish/guestfish-actions.pod:2652 ../fish/guestfish-actions.pod:2662
5621 msgid "The mode actually set is affected by the umask."
5625 #: ../src/guestfs-actions.pod:844
5626 msgid "guestfs_chown"
5630 #: ../src/guestfs-actions.pod:846
5634 " guestfs_chown (guestfs_h *g,\n"
5637 " const char *path);\n"
5642 #: ../src/guestfs-actions.pod:852 ../fish/guestfish-actions.pod:641
5643 msgid "Change the file owner to C<owner> and group to C<group>."
5647 #: ../src/guestfs-actions.pod:854 ../src/guestfs-actions.pod:2707
5648 #: ../fish/guestfish-actions.pod:643 ../fish/guestfish-actions.pod:2035
5650 "Only numeric uid and gid are supported. If you want to use names, you will "
5651 "need to locate and parse the password file yourself (Augeas support makes "
5652 "this relatively easy)."
5656 #: ../src/guestfs-actions.pod:860
5657 msgid "guestfs_command"
5661 #: ../src/guestfs-actions.pod:862
5665 " guestfs_command (guestfs_h *g,\n"
5666 " char *const *arguments);\n"
5671 #: ../src/guestfs-actions.pod:866 ../fish/guestfish-actions.pod:651
5673 "This call runs a command from the guest filesystem. The filesystem must be "
5674 "mounted, and must contain a compatible operating system (ie. something "
5675 "Linux, with the same or compatible processor architecture)."
5679 #: ../src/guestfs-actions.pod:871
5681 "The single parameter is an argv-style list of arguments. The first element "
5682 "is the name of the program to run. Subsequent elements are parameters. The "
5683 "list must be non-empty (ie. must contain a program name). Note that the "
5684 "command runs directly, and is I<not> invoked via the shell (see "
5689 #: ../src/guestfs-actions.pod:878 ../fish/guestfish-actions.pod:663
5690 msgid "The return value is anything printed to I<stdout> by the command."
5694 #: ../src/guestfs-actions.pod:881 ../fish/guestfish-actions.pod:666
5696 "If the command returns a non-zero exit status, then this function returns an "
5697 "error message. The error message string is the content of I<stderr> from "
5702 #: ../src/guestfs-actions.pod:885 ../fish/guestfish-actions.pod:670
5704 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
5705 "bin>. If you require a program from another location, you should provide "
5706 "the full path in the first parameter."
5710 #: ../src/guestfs-actions.pod:890 ../fish/guestfish-actions.pod:675
5712 "Shared libraries and data files required by the program must be available on "
5713 "filesystems which are mounted in the correct places. It is the caller's "
5714 "responsibility to ensure all filesystems that are needed are mounted at the "
5719 #: ../src/guestfs-actions.pod:902
5720 msgid "guestfs_command_lines"
5724 #: ../src/guestfs-actions.pod:904
5728 " guestfs_command_lines (guestfs_h *g,\n"
5729 " char *const *arguments);\n"
5734 #: ../src/guestfs-actions.pod:908
5736 "This is the same as C<guestfs_command>, but splits the result into a list of "
5741 #: ../src/guestfs-actions.pod:911
5742 msgid "See also: C<guestfs_sh_lines>"
5746 #: ../src/guestfs-actions.pod:920
5747 msgid "guestfs_config"
5751 #: ../src/guestfs-actions.pod:922
5755 " guestfs_config (guestfs_h *g,\n"
5756 " const char *qemuparam,\n"
5757 " const char *qemuvalue);\n"
5762 #: ../src/guestfs-actions.pod:927 ../fish/guestfish-actions.pod:700
5764 "This can be used to add arbitrary qemu command line parameters of the form "
5765 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
5766 "setting some parameters which would interfere with parameters that we use."
5770 #: ../src/guestfs-actions.pod:932 ../fish/guestfish-actions.pod:705
5771 msgid "The first character of C<param> string must be a C<-> (dash)."
5775 #: ../src/guestfs-actions.pod:934 ../fish/guestfish-actions.pod:707
5776 msgid "C<value> can be NULL."
5780 #: ../src/guestfs-actions.pod:938
5781 msgid "guestfs_copy_size"
5785 #: ../src/guestfs-actions.pod:940
5789 " guestfs_copy_size (guestfs_h *g,\n"
5790 " const char *src,\n"
5791 " const char *dest,\n"
5797 #: ../src/guestfs-actions.pod:946 ../fish/guestfish-actions.pod:713
5799 "This command copies exactly C<size> bytes from one source device or file "
5800 "C<src> to another destination device or file C<dest>."
5804 #: ../src/guestfs-actions.pod:949 ../fish/guestfish-actions.pod:716
5806 "Note this will fail if the source is too short or if the destination is not "
5811 #: ../src/guestfs-actions.pod:954 ../src/guestfs-actions.pod:1098
5812 #: ../src/guestfs-actions.pod:1127 ../src/guestfs-actions.pod:1515
5813 #: ../src/guestfs-actions.pod:1535 ../src/guestfs-actions.pod:6011
5814 #: ../src/guestfs-actions.pod:6028
5816 "This long-running command can generate progress notification messages so "
5817 "that the caller can display a progress bar or indicator. To receive these "
5818 "messages, the caller must register a progress callback. See L<guestfs(3)/"
5819 "guestfs_set_progress_callback>."
5823 #: ../src/guestfs-actions.pod:959
5828 #: ../src/guestfs-actions.pod:961
5832 " guestfs_cp (guestfs_h *g,\n"
5833 " const char *src,\n"
5834 " const char *dest);\n"
5839 #: ../src/guestfs-actions.pod:966 ../fish/guestfish-actions.pod:723
5841 "This copies a file from C<src> to C<dest> where C<dest> is either a "
5842 "destination filename or destination directory."
5846 #: ../src/guestfs-actions.pod:971
5847 msgid "guestfs_cp_a"
5851 #: ../src/guestfs-actions.pod:973
5855 " guestfs_cp_a (guestfs_h *g,\n"
5856 " const char *src,\n"
5857 " const char *dest);\n"
5862 #: ../src/guestfs-actions.pod:978 ../fish/guestfish-actions.pod:730
5864 "This copies a file or directory from C<src> to C<dest> recursively using the "
5869 #: ../src/guestfs-actions.pod:983
5874 #: ../src/guestfs-actions.pod:985
5878 " guestfs_dd (guestfs_h *g,\n"
5879 " const char *src,\n"
5880 " const char *dest);\n"
5885 #: ../src/guestfs-actions.pod:990 ../fish/guestfish-actions.pod:737
5887 "This command copies from one source device or file C<src> to another "
5888 "destination device or file C<dest>. Normally you would use this to copy to "
5889 "or from a device or partition, for example to duplicate a filesystem."
5893 #: ../src/guestfs-actions.pod:995
5895 "If the destination is a device, it must be as large or larger than the "
5896 "source file or device, otherwise the copy will fail. This command cannot do "
5897 "partial copies (see C<guestfs_copy_size>)."
5901 #: ../src/guestfs-actions.pod:1001
5902 msgid "guestfs_debug"
5906 #: ../src/guestfs-actions.pod:1003
5910 " guestfs_debug (guestfs_h *g,\n"
5911 " const char *subcmd,\n"
5912 " char *const *extraargs);\n"
5917 #: ../src/guestfs-actions.pod:1008
5919 "The C<guestfs_debug> command exposes some internals of C<guestfsd> (the "
5920 "guestfs daemon) that runs inside the qemu subprocess."
5924 #: ../src/guestfs-actions.pod:1012 ../fish/guestfish-actions.pod:754
5926 "There is no comprehensive help for this command. You have to look at the "
5927 "file C<daemon/debug.c> in the libguestfs source to find out what you can do."
5931 #: ../src/guestfs-actions.pod:1019
5932 msgid "guestfs_debug_upload"
5936 #: ../src/guestfs-actions.pod:1021
5940 " guestfs_debug_upload (guestfs_h *g,\n"
5941 " const char *filename,\n"
5942 " const char *tmpname,\n"
5948 #: ../src/guestfs-actions.pod:1027
5950 "The C<guestfs_debug_upload> command uploads a file to the libguestfs "
5955 #: ../src/guestfs-actions.pod:1030 ../fish/guestfish-actions.pod:765
5957 "There is no comprehensive help for this command. You have to look at the "
5958 "file C<daemon/debug.c> in the libguestfs source to find out what it is for."
5962 #: ../src/guestfs-actions.pod:1036
5967 #: ../src/guestfs-actions.pod:1038
5971 " guestfs_df (guestfs_h *g);\n"
5976 #: ../src/guestfs-actions.pod:1041 ../fish/guestfish-actions.pod:775
5977 msgid "This command runs the C<df> command to report disk space used."
5981 #: ../src/guestfs-actions.pod:1043 ../src/guestfs-actions.pod:1058
5982 #: ../fish/guestfish-actions.pod:777 ../fish/guestfish-actions.pod:788
5984 "This command is mostly useful for interactive sessions. It is I<not> "
5985 "intended that you try to parse the output string. Use C<statvfs> from "
5990 #: ../src/guestfs-actions.pod:1050
5991 msgid "guestfs_df_h"
5995 #: ../src/guestfs-actions.pod:1052
5999 " guestfs_df_h (guestfs_h *g);\n"
6004 #: ../src/guestfs-actions.pod:1055 ../fish/guestfish-actions.pod:785
6006 "This command runs the C<df -h> command to report disk space used in human-"
6011 #: ../src/guestfs-actions.pod:1065
6012 msgid "guestfs_dmesg"
6016 #: ../src/guestfs-actions.pod:1067
6020 " guestfs_dmesg (guestfs_h *g);\n"
6025 #: ../src/guestfs-actions.pod:1070 ../fish/guestfish-actions.pod:796
6027 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
6028 "This is sometimes useful for extended debugging of problems."
6032 #: ../src/guestfs-actions.pod:1074
6034 "Another way to get the same information is to enable verbose messages with "
6035 "C<guestfs_set_verbose> or by setting the environment variable "
6036 "C<LIBGUESTFS_DEBUG=1> before running the program."
6040 #: ../src/guestfs-actions.pod:1082
6041 msgid "guestfs_download"
6045 #: ../src/guestfs-actions.pod:1084
6049 " guestfs_download (guestfs_h *g,\n"
6050 " const char *remotefilename,\n"
6051 " const char *filename);\n"
6056 #: ../src/guestfs-actions.pod:1089 ../src/guestfs-actions.pod:1112
6057 #: ../fish/guestfish-actions.pod:809 ../fish/guestfish-actions.pod:822
6059 "Download file C<remotefilename> and save it as C<filename> on the local "
6064 #: ../src/guestfs-actions.pod:1092 ../src/guestfs-actions.pod:5553
6065 #: ../fish/guestfish-actions.pod:812 ../fish/guestfish-actions.pod:4077
6066 msgid "C<filename> can also be a named pipe."
6070 #: ../src/guestfs-actions.pod:1094
6071 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
6075 #: ../src/guestfs-actions.pod:1103
6076 msgid "guestfs_download_offset"
6080 #: ../src/guestfs-actions.pod:1105
6084 " guestfs_download_offset (guestfs_h *g,\n"
6085 " const char *remotefilename,\n"
6086 " const char *filename,\n"
6087 " int64_t offset,\n"
6093 #: ../src/guestfs-actions.pod:1115 ../fish/guestfish-actions.pod:825
6095 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
6096 "region must be within the file or device)."
6100 #: ../src/guestfs-actions.pod:1118
6102 "Note that there is no limit on the amount of data that can be downloaded "
6103 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
6104 "full amount unless an error occurs."
6108 #: ../src/guestfs-actions.pod:1123
6109 msgid "See also C<guestfs_download>, C<guestfs_pread>."
6113 #: ../src/guestfs-actions.pod:1132
6114 msgid "guestfs_drop_caches"
6118 #: ../src/guestfs-actions.pod:1134
6122 " guestfs_drop_caches (guestfs_h *g,\n"
6123 " int whattodrop);\n"
6128 #: ../src/guestfs-actions.pod:1138 ../fish/guestfish-actions.pod:841
6130 "This instructs the guest kernel to drop its page cache, and/or dentries and "
6131 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
6132 "to drop, see L<http://linux-mm.org/Drop_Caches>"
6136 #: ../src/guestfs-actions.pod:1143 ../fish/guestfish-actions.pod:846
6137 msgid "Setting C<whattodrop> to 3 should drop everything."
6141 #: ../src/guestfs-actions.pod:1145 ../fish/guestfish-actions.pod:848
6143 "This automatically calls L<sync(2)> before the operation, so that the "
6144 "maximum guest memory is freed."
6148 #: ../src/guestfs-actions.pod:1150
6153 #: ../src/guestfs-actions.pod:1152
6157 " guestfs_du (guestfs_h *g,\n"
6158 " const char *path);\n"
6163 #: ../src/guestfs-actions.pod:1156 ../fish/guestfish-actions.pod:855
6165 "This command runs the C<du -s> command to estimate file space usage for "
6170 #: ../src/guestfs-actions.pod:1159 ../fish/guestfish-actions.pod:858
6172 "C<path> can be a file or a directory. If C<path> is a directory then the "
6173 "estimate includes the contents of the directory and all subdirectories "
6178 #: ../src/guestfs-actions.pod:1163 ../fish/guestfish-actions.pod:862
6180 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
6184 #: ../src/guestfs-actions.pod:1168
6185 msgid "guestfs_e2fsck_f"
6189 #: ../src/guestfs-actions.pod:1170
6193 " guestfs_e2fsck_f (guestfs_h *g,\n"
6194 " const char *device);\n"
6199 #: ../src/guestfs-actions.pod:1174 ../fish/guestfish-actions.pod:869
6201 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
6202 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
6207 #: ../src/guestfs-actions.pod:1178
6209 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
6210 "Normally you should use C<guestfs_fsck>."
6214 #: ../src/guestfs-actions.pod:1183
6215 msgid "guestfs_echo_daemon"
6219 #: ../src/guestfs-actions.pod:1185
6223 " guestfs_echo_daemon (guestfs_h *g,\n"
6224 " char *const *words);\n"
6229 #: ../src/guestfs-actions.pod:1189 ../fish/guestfish-actions.pod:880
6231 "This command concatenates the list of C<words> passed with single spaces "
6232 "between them and returns the resulting string."
6236 #: ../src/guestfs-actions.pod:1192 ../fish/guestfish-actions.pod:883
6237 msgid "You can use this command to test the connection through to the daemon."
6241 #: ../src/guestfs-actions.pod:1194
6242 msgid "See also C<guestfs_ping_daemon>."
6246 #: ../src/guestfs-actions.pod:1199
6247 msgid "guestfs_egrep"
6251 #: ../src/guestfs-actions.pod:1201
6255 " guestfs_egrep (guestfs_h *g,\n"
6256 " const char *regex,\n"
6257 " const char *path);\n"
6262 #: ../src/guestfs-actions.pod:1206 ../fish/guestfish-actions.pod:891
6264 "This calls the external C<egrep> program and returns the matching lines."
6268 #: ../src/guestfs-actions.pod:1216
6269 msgid "guestfs_egrepi"
6273 #: ../src/guestfs-actions.pod:1218
6277 " guestfs_egrepi (guestfs_h *g,\n"
6278 " const char *regex,\n"
6279 " const char *path);\n"
6284 #: ../src/guestfs-actions.pod:1223 ../fish/guestfish-actions.pod:901
6286 "This calls the external C<egrep -i> program and returns the matching lines."
6290 #: ../src/guestfs-actions.pod:1233
6291 msgid "guestfs_equal"
6295 #: ../src/guestfs-actions.pod:1235
6299 " guestfs_equal (guestfs_h *g,\n"
6300 " const char *file1,\n"
6301 " const char *file2);\n"
6306 #: ../src/guestfs-actions.pod:1240 ../fish/guestfish-actions.pod:911
6308 "This compares the two files C<file1> and C<file2> and returns true if their "
6309 "content is exactly equal, or false otherwise."
6313 #: ../src/guestfs-actions.pod:1243 ../fish/guestfish-actions.pod:914
6314 msgid "The external L<cmp(1)> program is used for the comparison."
6318 #: ../src/guestfs-actions.pod:1247
6319 msgid "guestfs_exists"
6323 #: ../src/guestfs-actions.pod:1249
6327 " guestfs_exists (guestfs_h *g,\n"
6328 " const char *path);\n"
6333 #: ../src/guestfs-actions.pod:1253 ../fish/guestfish-actions.pod:920
6335 "This returns C<true> if and only if there is a file, directory (or anything) "
6336 "with the given C<path> name."
6340 #: ../src/guestfs-actions.pod:1256
6341 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
6345 #: ../src/guestfs-actions.pod:1260
6346 msgid "guestfs_fallocate"
6350 #: ../src/guestfs-actions.pod:1262
6354 " guestfs_fallocate (guestfs_h *g,\n"
6355 " const char *path,\n"
6361 #: ../src/guestfs-actions.pod:1267 ../src/guestfs-actions.pod:1291
6362 #: ../fish/guestfish-actions.pod:929 ../fish/guestfish-actions.pod:948
6364 "This command preallocates a file (containing zero bytes) named C<path> of "
6365 "size C<len> bytes. If the file exists already, it is overwritten."
6369 #: ../src/guestfs-actions.pod:1271 ../fish/guestfish-actions.pod:933
6371 "Do not confuse this with the guestfish-specific C<alloc> command which "
6372 "allocates a file in the host and attaches it as a device."
6376 #: ../src/guestfs-actions.pod:1277 ../fish/guestfish-actions.pod:937
6378 "This function is deprecated. In new code, use the C<fallocate64> call "
6383 #: ../src/guestfs-actions.pod:1284
6384 msgid "guestfs_fallocate64"
6388 #: ../src/guestfs-actions.pod:1286
6392 " guestfs_fallocate64 (guestfs_h *g,\n"
6393 " const char *path,\n"
6399 #: ../src/guestfs-actions.pod:1295
6401 "Note that this call allocates disk blocks for the file. To create a sparse "
6402 "file use C<guestfs_truncate_size> instead."
6406 #: ../src/guestfs-actions.pod:1298
6408 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
6409 "oversight it only allowed 30 bit lengths to be specified, effectively "
6410 "limiting the maximum size of files created through that call to 1GB."
6414 #: ../src/guestfs-actions.pod:1303 ../fish/guestfish-actions.pod:960
6416 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
6417 "commands which create a file in the host and attach it as a device."
6421 #: ../src/guestfs-actions.pod:1309
6422 msgid "guestfs_fgrep"
6426 #: ../src/guestfs-actions.pod:1311
6430 " guestfs_fgrep (guestfs_h *g,\n"
6431 " const char *pattern,\n"
6432 " const char *path);\n"
6437 #: ../src/guestfs-actions.pod:1316 ../fish/guestfish-actions.pod:968
6439 "This calls the external C<fgrep> program and returns the matching lines."
6443 #: ../src/guestfs-actions.pod:1326
6444 msgid "guestfs_fgrepi"
6448 #: ../src/guestfs-actions.pod:1328
6452 " guestfs_fgrepi (guestfs_h *g,\n"
6453 " const char *pattern,\n"
6454 " const char *path);\n"
6459 #: ../src/guestfs-actions.pod:1333 ../fish/guestfish-actions.pod:978
6461 "This calls the external C<fgrep -i> program and returns the matching lines."
6465 #: ../src/guestfs-actions.pod:1343
6466 msgid "guestfs_file"
6470 #: ../src/guestfs-actions.pod:1345
6474 " guestfs_file (guestfs_h *g,\n"
6475 " const char *path);\n"
6480 #: ../src/guestfs-actions.pod:1349 ../fish/guestfish-actions.pod:988
6482 "This call uses the standard L<file(1)> command to determine the type or "
6483 "contents of the file."
6487 #: ../src/guestfs-actions.pod:1352 ../fish/guestfish-actions.pod:991
6489 "This call will also transparently look inside various types of compressed "
6494 #: ../src/guestfs-actions.pod:1355 ../fish/guestfish-actions.pod:994
6496 "The exact command which runs is C<file -zb path>. Note in particular that "
6497 "the filename is not prepended to the output (the C<-b> option)."
6501 #: ../src/guestfs-actions.pod:1359
6503 "This command can also be used on C</dev/> devices (and partitions, LV "
6504 "names). You can for example use this to determine if a device contains a "
6505 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
6509 #: ../src/guestfs-actions.pod:1364 ../fish/guestfish-actions.pod:1003
6511 "If the C<path> does not begin with C</dev/> then this command only works for "
6512 "the content of regular files. For other file types (directory, symbolic "
6513 "link etc) it will just return the string C<directory> etc."
6517 #: ../src/guestfs-actions.pod:1372
6518 msgid "guestfs_file_architecture"
6522 #: ../src/guestfs-actions.pod:1374
6526 " guestfs_file_architecture (guestfs_h *g,\n"
6527 " const char *filename);\n"
6532 #: ../src/guestfs-actions.pod:1378 ../fish/guestfish-actions.pod:1012
6534 "This detects the architecture of the binary C<filename>, and returns it if "
6539 #: ../src/guestfs-actions.pod:1381 ../fish/guestfish-actions.pod:1015
6540 msgid "Currently defined architectures are:"
6544 #: ../src/guestfs-actions.pod:1385 ../fish/guestfish-actions.pod:1019
6549 #: ../src/guestfs-actions.pod:1387 ../fish/guestfish-actions.pod:1021
6551 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
6552 "irrespective of the precise processor requirements of the binary."
6556 #: ../src/guestfs-actions.pod:1390 ../fish/guestfish-actions.pod:1024
6561 #: ../src/guestfs-actions.pod:1392 ../fish/guestfish-actions.pod:1026
6562 msgid "64 bit x86-64."
6566 #: ../src/guestfs-actions.pod:1394 ../fish/guestfish-actions.pod:1028
6571 #: ../src/guestfs-actions.pod:1396 ../fish/guestfish-actions.pod:1030
6572 msgid "32 bit SPARC."
6576 #: ../src/guestfs-actions.pod:1398 ../fish/guestfish-actions.pod:1032
6581 #: ../src/guestfs-actions.pod:1400 ../fish/guestfish-actions.pod:1034
6582 msgid "64 bit SPARC V9 and above."
6586 #: ../src/guestfs-actions.pod:1402 ../fish/guestfish-actions.pod:1036
6591 #: ../src/guestfs-actions.pod:1404 ../fish/guestfish-actions.pod:1038
6592 msgid "Intel Itanium."
6596 #: ../src/guestfs-actions.pod:1406 ../fish/guestfish-actions.pod:1040
6601 #: ../src/guestfs-actions.pod:1408 ../fish/guestfish-actions.pod:1042
6602 msgid "32 bit Power PC."
6606 #: ../src/guestfs-actions.pod:1410 ../fish/guestfish-actions.pod:1044
6611 #: ../src/guestfs-actions.pod:1412 ../fish/guestfish-actions.pod:1046
6612 msgid "64 bit Power PC."
6616 #: ../src/guestfs-actions.pod:1416 ../fish/guestfish-actions.pod:1050
6617 msgid "Libguestfs may return other architecture strings in future."
6621 #: ../src/guestfs-actions.pod:1418 ../fish/guestfish-actions.pod:1052
6622 msgid "The function works on at least the following types of files:"
6626 #: ../src/guestfs-actions.pod:1424 ../fish/guestfish-actions.pod:1058
6627 msgid "many types of Un*x and Linux binary"
6631 #: ../src/guestfs-actions.pod:1428 ../fish/guestfish-actions.pod:1062
6632 msgid "many types of Un*x and Linux shared library"
6636 #: ../src/guestfs-actions.pod:1432 ../fish/guestfish-actions.pod:1066
6637 msgid "Windows Win32 and Win64 binaries"
6641 #: ../src/guestfs-actions.pod:1436 ../fish/guestfish-actions.pod:1070
6642 msgid "Windows Win32 and Win64 DLLs"
6646 #: ../src/guestfs-actions.pod:1438 ../fish/guestfish-actions.pod:1072
6647 msgid "Win32 binaries and DLLs return C<i386>."
6651 #: ../src/guestfs-actions.pod:1440 ../fish/guestfish-actions.pod:1074
6652 msgid "Win64 binaries and DLLs return C<x86_64>."
6656 #: ../src/guestfs-actions.pod:1444 ../fish/guestfish-actions.pod:1078
6657 msgid "Linux kernel modules"
6661 #: ../src/guestfs-actions.pod:1448 ../fish/guestfish-actions.pod:1082
6662 msgid "Linux new-style initrd images"
6666 #: ../src/guestfs-actions.pod:1452 ../fish/guestfish-actions.pod:1086
6667 msgid "some non-x86 Linux vmlinuz kernels"
6671 #: ../src/guestfs-actions.pod:1456 ../fish/guestfish-actions.pod:1090
6672 msgid "What it can't do currently:"
6676 #: ../src/guestfs-actions.pod:1462 ../fish/guestfish-actions.pod:1096
6677 msgid "static libraries (libfoo.a)"
6681 #: ../src/guestfs-actions.pod:1466 ../fish/guestfish-actions.pod:1100
6682 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
6686 #: ../src/guestfs-actions.pod:1470 ../fish/guestfish-actions.pod:1104
6687 msgid "x86 Linux vmlinuz kernels"
6691 #: ../src/guestfs-actions.pod:1472 ../fish/guestfish-actions.pod:1106
6693 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
6694 "compressed code, and are horribly hard to unpack. If you want to find the "
6695 "architecture of a kernel, use the architecture of the associated initrd or "
6696 "kernel module(s) instead."
6700 #: ../src/guestfs-actions.pod:1482
6701 msgid "guestfs_filesize"
6705 #: ../src/guestfs-actions.pod:1484
6709 " guestfs_filesize (guestfs_h *g,\n"
6710 " const char *file);\n"
6715 #: ../src/guestfs-actions.pod:1488 ../fish/guestfish-actions.pod:1117
6716 msgid "This command returns the size of C<file> in bytes."
6720 #: ../src/guestfs-actions.pod:1490
6722 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
6723 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
6724 "devices, use C<guestfs_blockdev_getsize64>."
6728 #: ../src/guestfs-actions.pod:1496
6729 msgid "guestfs_fill"
6733 #: ../src/guestfs-actions.pod:1498
6737 " guestfs_fill (guestfs_h *g,\n"
6740 " const char *path);\n"
6745 #: ../src/guestfs-actions.pod:1504 ../fish/guestfish-actions.pod:1127
6747 "This command creates a new file called C<path>. The initial content of the "
6748 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
6753 #: ../src/guestfs-actions.pod:1508
6755 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
6756 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
6757 "bytes use C<guestfs_fill_pattern>."
6761 #: ../src/guestfs-actions.pod:1520
6762 msgid "guestfs_fill_pattern"
6766 #: ../src/guestfs-actions.pod:1522
6770 " guestfs_fill_pattern (guestfs_h *g,\n"
6771 " const char *pattern,\n"
6773 " const char *path);\n"
6778 #: ../src/guestfs-actions.pod:1528
6780 "This function is like C<guestfs_fill> except that it creates a new file of "
6781 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
6782 "pattern is truncated if necessary to ensure the length of the file is "
6783 "exactly C<len> bytes."
6787 #: ../src/guestfs-actions.pod:1540
6788 msgid "guestfs_find"
6792 #: ../src/guestfs-actions.pod:1542
6796 " guestfs_find (guestfs_h *g,\n"
6797 " const char *directory);\n"
6802 #: ../src/guestfs-actions.pod:1546 ../fish/guestfish-actions.pod:1149
6804 "This command lists out all files and directories, recursively, starting at "
6805 "C<directory>. It is essentially equivalent to running the shell command "
6806 "C<find directory -print> but some post-processing happens on the output, "
6811 #: ../src/guestfs-actions.pod:1551 ../fish/guestfish-actions.pod:1154
6813 "This returns a list of strings I<without any prefix>. Thus if the directory "
6818 #: ../src/guestfs-actions.pod:1554 ../fish/guestfish-actions.pod:1157
6828 #: ../src/guestfs-actions.pod:1558
6830 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
6834 #: ../src/guestfs-actions.pod:1561 ../fish/guestfish-actions.pod:1164
6845 #: ../src/guestfs-actions.pod:1566 ../fish/guestfish-actions.pod:1169
6846 msgid "If C<directory> is not a directory, then this command returns an error."
6850 #: ../src/guestfs-actions.pod:1569 ../fish/guestfish-actions.pod:1172
6851 msgid "The returned list is sorted."
6855 #: ../src/guestfs-actions.pod:1571
6856 msgid "See also C<guestfs_find0>."
6860 #: ../src/guestfs-actions.pod:1580
6861 msgid "guestfs_find0"
6865 #: ../src/guestfs-actions.pod:1582
6869 " guestfs_find0 (guestfs_h *g,\n"
6870 " const char *directory,\n"
6871 " const char *files);\n"
6876 #: ../src/guestfs-actions.pod:1587 ../fish/guestfish-actions.pod:1183
6878 "This command lists out all files and directories, recursively, starting at "
6879 "C<directory>, placing the resulting list in the external file called "
6884 #: ../src/guestfs-actions.pod:1591
6886 "This command works the same way as C<guestfs_find> with the following "
6891 #: ../src/guestfs-actions.pod:1598 ../fish/guestfish-actions.pod:1194
6892 msgid "The resulting list is written to an external file."
6896 #: ../src/guestfs-actions.pod:1602 ../fish/guestfish-actions.pod:1198
6898 "Items (filenames) in the result are separated by C<\\0> characters. See "
6899 "L<find(1)> option I<-print0>."
6903 #: ../src/guestfs-actions.pod:1607 ../fish/guestfish-actions.pod:1203
6904 msgid "This command is not limited in the number of names that it can return."
6908 #: ../src/guestfs-actions.pod:1612 ../fish/guestfish-actions.pod:1208
6909 msgid "The result list is not sorted."
6913 #: ../src/guestfs-actions.pod:1618
6914 msgid "guestfs_findfs_label"
6918 #: ../src/guestfs-actions.pod:1620
6922 " guestfs_findfs_label (guestfs_h *g,\n"
6923 " const char *label);\n"
6928 #: ../src/guestfs-actions.pod:1624 ../fish/guestfish-actions.pod:1218
6930 "This command searches the filesystems and returns the one which has the "
6931 "given label. An error is returned if no such filesystem can be found."
6935 #: ../src/guestfs-actions.pod:1628
6936 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
6940 #: ../src/guestfs-actions.pod:1633
6941 msgid "guestfs_findfs_uuid"
6945 #: ../src/guestfs-actions.pod:1635
6949 " guestfs_findfs_uuid (guestfs_h *g,\n"
6950 " const char *uuid);\n"
6955 #: ../src/guestfs-actions.pod:1639 ../fish/guestfish-actions.pod:1228
6957 "This command searches the filesystems and returns the one which has the "
6958 "given UUID. An error is returned if no such filesystem can be found."
6962 #: ../src/guestfs-actions.pod:1643
6963 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
6967 #: ../src/guestfs-actions.pod:1648
6968 msgid "guestfs_fsck"
6972 #: ../src/guestfs-actions.pod:1650
6976 " guestfs_fsck (guestfs_h *g,\n"
6977 " const char *fstype,\n"
6978 " const char *device);\n"
6983 #: ../src/guestfs-actions.pod:1655 ../fish/guestfish-actions.pod:1238
6985 "This runs the filesystem checker (fsck) on C<device> which should have "
6986 "filesystem type C<fstype>."
6990 #: ../src/guestfs-actions.pod:1658 ../fish/guestfish-actions.pod:1241
6992 "The returned integer is the status. See L<fsck(8)> for the list of status "
6993 "codes from C<fsck>."
6997 #: ../src/guestfs-actions.pod:1667 ../fish/guestfish-actions.pod:1250
6998 msgid "Multiple status codes can be summed together."
7002 #: ../src/guestfs-actions.pod:1671 ../fish/guestfish-actions.pod:1254
7004 "A non-zero return code can mean \"success\", for example if errors have been "
7005 "corrected on the filesystem."
7009 #: ../src/guestfs-actions.pod:1676 ../fish/guestfish-actions.pod:1259
7010 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
7014 #: ../src/guestfs-actions.pod:1681 ../fish/guestfish-actions.pod:1264
7016 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
7020 #: ../src/guestfs-actions.pod:1685
7021 msgid "guestfs_get_append"
7025 #: ../src/guestfs-actions.pod:1687
7029 " guestfs_get_append (guestfs_h *g);\n"
7034 #: ../src/guestfs-actions.pod:1690 ../fish/guestfish-actions.pod:1270
7036 "Return the additional kernel options which are added to the guest kernel "
7041 #: ../src/guestfs-actions.pod:1693 ../fish/guestfish-actions.pod:1273
7042 msgid "If C<NULL> then no options are added."
7046 #: ../src/guestfs-actions.pod:1695
7048 "This function returns a string which may be NULL. There is no way to return "
7049 "an error from this function. The string is owned by the guest handle and "
7050 "must I<not> be freed."
7054 #: ../src/guestfs-actions.pod:1699
7055 msgid "guestfs_get_autosync"
7059 #: ../src/guestfs-actions.pod:1701
7063 " guestfs_get_autosync (guestfs_h *g);\n"
7068 #: ../src/guestfs-actions.pod:1704 ../fish/guestfish-actions.pod:1279
7069 msgid "Get the autosync flag."
7073 #: ../src/guestfs-actions.pod:1708
7074 msgid "guestfs_get_direct"
7078 #: ../src/guestfs-actions.pod:1710
7082 " guestfs_get_direct (guestfs_h *g);\n"
7087 #: ../src/guestfs-actions.pod:1713 ../fish/guestfish-actions.pod:1285
7088 msgid "Return the direct appliance mode flag."
7092 #: ../src/guestfs-actions.pod:1717
7093 msgid "guestfs_get_e2label"
7097 #: ../src/guestfs-actions.pod:1719
7101 " guestfs_get_e2label (guestfs_h *g,\n"
7102 " const char *device);\n"
7107 #: ../src/guestfs-actions.pod:1723 ../fish/guestfish-actions.pod:1291
7109 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
7113 #: ../src/guestfs-actions.pod:1729 ../fish/guestfish-actions.pod:1294
7115 "This function is deprecated. In new code, use the C<vfs_label> call instead."
7119 #: ../src/guestfs-actions.pod:1736
7120 msgid "guestfs_get_e2uuid"
7124 #: ../src/guestfs-actions.pod:1738
7128 " guestfs_get_e2uuid (guestfs_h *g,\n"
7129 " const char *device);\n"
7134 #: ../src/guestfs-actions.pod:1742 ../fish/guestfish-actions.pod:1305
7136 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
7140 #: ../src/guestfs-actions.pod:1748 ../fish/guestfish-actions.pod:1308
7142 "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
7146 #: ../src/guestfs-actions.pod:1755
7147 msgid "guestfs_get_memsize"
7151 #: ../src/guestfs-actions.pod:1757
7155 " guestfs_get_memsize (guestfs_h *g);\n"
7160 #: ../src/guestfs-actions.pod:1760 ../fish/guestfish-actions.pod:1319
7162 "This gets the memory size in megabytes allocated to the qemu subprocess."
7166 #: ../src/guestfs-actions.pod:1763
7168 "If C<guestfs_set_memsize> was not called on this handle, and if "
7169 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
7170 "value for memsize."
7174 #: ../src/guestfs-actions.pod:1767 ../src/guestfs-actions.pod:1836
7175 #: ../src/guestfs-actions.pod:4759 ../src/guestfs-actions.pod:4856
7176 #: ../fish/guestfish-actions.pod:1326 ../fish/guestfish-actions.pod:1377
7177 #: ../fish/guestfish-actions.pod:3484 ../fish/guestfish-actions.pod:3571
7179 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
7183 #: ../src/guestfs-actions.pod:1772
7184 msgid "guestfs_get_network"
7188 #: ../src/guestfs-actions.pod:1774
7192 " guestfs_get_network (guestfs_h *g);\n"
7197 #: ../src/guestfs-actions.pod:1777 ../fish/guestfish-actions.pod:1333
7198 msgid "This returns the enable network flag."
7202 #: ../src/guestfs-actions.pod:1781
7203 msgid "guestfs_get_path"
7207 #: ../src/guestfs-actions.pod:1783
7211 " guestfs_get_path (guestfs_h *g);\n"
7216 #: ../src/guestfs-actions.pod:1786 ../fish/guestfish-actions.pod:1339
7217 msgid "Return the current search path."
7221 #: ../src/guestfs-actions.pod:1788 ../fish/guestfish-actions.pod:1341
7223 "This is always non-NULL. If it wasn't set already, then this will return "
7228 #: ../src/guestfs-actions.pod:1791 ../src/guestfs-actions.pod:1816
7230 "This function returns a string, or NULL on error. The string is owned by "
7231 "the guest handle and must I<not> be freed."
7235 #: ../src/guestfs-actions.pod:1794
7236 msgid "guestfs_get_pid"
7240 #: ../src/guestfs-actions.pod:1796
7244 " guestfs_get_pid (guestfs_h *g);\n"
7249 #: ../src/guestfs-actions.pod:1799 ../fish/guestfish-actions.pod:1350
7251 "Return the process ID of the qemu subprocess. If there is no qemu "
7252 "subprocess, then this will return an error."
7256 #: ../src/guestfs-actions.pod:1802 ../fish/guestfish-actions.pod:1353
7257 msgid "This is an internal call used for debugging and testing."
7261 #: ../src/guestfs-actions.pod:1806
7262 msgid "guestfs_get_qemu"
7266 #: ../src/guestfs-actions.pod:1808
7270 " guestfs_get_qemu (guestfs_h *g);\n"
7275 #: ../src/guestfs-actions.pod:1811 ../fish/guestfish-actions.pod:1359
7276 msgid "Return the current qemu binary."
7280 #: ../src/guestfs-actions.pod:1813 ../fish/guestfish-actions.pod:1361
7282 "This is always non-NULL. If it wasn't set already, then this will return "
7283 "the default qemu binary name."
7287 #: ../src/guestfs-actions.pod:1819
7288 msgid "guestfs_get_recovery_proc"
7292 #: ../src/guestfs-actions.pod:1821
7296 " guestfs_get_recovery_proc (guestfs_h *g);\n"
7301 #: ../src/guestfs-actions.pod:1824 ../fish/guestfish-actions.pod:1368
7302 msgid "Return the recovery process enabled flag."
7306 #: ../src/guestfs-actions.pod:1828
7307 msgid "guestfs_get_selinux"
7311 #: ../src/guestfs-actions.pod:1830
7315 " guestfs_get_selinux (guestfs_h *g);\n"
7320 #: ../src/guestfs-actions.pod:1833
7322 "This returns the current setting of the selinux flag which is passed to the "
7323 "appliance at boot time. See C<guestfs_set_selinux>."
7327 #: ../src/guestfs-actions.pod:1841
7328 msgid "guestfs_get_state"
7332 #: ../src/guestfs-actions.pod:1843
7336 " guestfs_get_state (guestfs_h *g);\n"
7341 #: ../src/guestfs-actions.pod:1846 ../fish/guestfish-actions.pod:1384
7343 "This returns the current state as an opaque integer. This is only useful "
7344 "for printing debug and internal error messages."
7348 #: ../src/guestfs-actions.pod:1849 ../src/guestfs-actions.pod:2542
7349 #: ../src/guestfs-actions.pod:2567 ../src/guestfs-actions.pod:2620
7350 #: ../src/guestfs-actions.pod:2643 ../fish/guestfish-actions.pod:1387
7351 #: ../fish/guestfish-actions.pod:1917 ../fish/guestfish-actions.pod:1935
7352 #: ../fish/guestfish-actions.pod:1973 ../fish/guestfish-actions.pod:1989
7353 msgid "For more information on states, see L<guestfs(3)>."
7357 #: ../src/guestfs-actions.pod:1853
7358 msgid "guestfs_get_trace"
7362 #: ../src/guestfs-actions.pod:1855
7366 " guestfs_get_trace (guestfs_h *g);\n"
7371 #: ../src/guestfs-actions.pod:1858 ../fish/guestfish-actions.pod:1393
7372 msgid "Return the command trace flag."
7376 #: ../src/guestfs-actions.pod:1862
7377 msgid "guestfs_get_umask"
7381 #: ../src/guestfs-actions.pod:1864
7385 " guestfs_get_umask (guestfs_h *g);\n"
7390 #: ../src/guestfs-actions.pod:1867
7392 "Return the current umask. By default the umask is C<022> unless it has been "
7393 "set by calling C<guestfs_umask>."
7397 #: ../src/guestfs-actions.pod:1872
7398 msgid "guestfs_get_verbose"
7402 #: ../src/guestfs-actions.pod:1874
7406 " guestfs_get_verbose (guestfs_h *g);\n"
7411 #: ../src/guestfs-actions.pod:1877 ../fish/guestfish-actions.pod:1406
7412 msgid "This returns the verbose messages flag."
7416 #: ../src/guestfs-actions.pod:1881
7417 msgid "guestfs_getcon"
7421 #: ../src/guestfs-actions.pod:1883
7425 " guestfs_getcon (guestfs_h *g);\n"
7430 #: ../src/guestfs-actions.pod:1886 ../fish/guestfish-actions.pod:1412
7431 msgid "This gets the SELinux security context of the daemon."
7435 #: ../src/guestfs-actions.pod:1888
7437 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
7441 #: ../src/guestfs-actions.pod:1894
7442 msgid "guestfs_getxattrs"
7446 #: ../src/guestfs-actions.pod:1896
7449 " struct guestfs_xattr_list *\n"
7450 " guestfs_getxattrs (guestfs_h *g,\n"
7451 " const char *path);\n"
7456 #: ../src/guestfs-actions.pod:1900 ../fish/guestfish-actions.pod:1421
7458 "This call lists the extended attributes of the file or directory C<path>."
7462 #: ../src/guestfs-actions.pod:1903 ../fish/guestfish-actions.pod:1424
7464 "At the system call level, this is a combination of the L<listxattr(2)> and "
7465 "L<getxattr(2)> calls."
7469 #: ../src/guestfs-actions.pod:1906
7470 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
7474 #: ../src/guestfs-actions.pod:1908 ../src/guestfs-actions.pod:2723
7475 #: ../src/guestfs-actions.pod:3311
7477 "This function returns a C<struct guestfs_xattr_list *> (see E<lt>guestfs-"
7478 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
7479 "C<guestfs_free_xattr_list> after use>."
7483 #: ../src/guestfs-actions.pod:1913
7484 msgid "guestfs_glob_expand"
7488 #: ../src/guestfs-actions.pod:1915
7492 " guestfs_glob_expand (guestfs_h *g,\n"
7493 " const char *pattern);\n"
7498 #: ../src/guestfs-actions.pod:1919 ../fish/guestfish-actions.pod:1433
7500 "This command searches for all the pathnames matching C<pattern> according to "
7501 "the wildcard expansion rules used by the shell."
7505 #: ../src/guestfs-actions.pod:1923 ../fish/guestfish-actions.pod:1437
7507 "If no paths match, then this returns an empty list (note: not an error)."
7511 #: ../src/guestfs-actions.pod:1926 ../fish/guestfish-actions.pod:1440
7513 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
7514 "GLOB_BRACE>. See that manual page for more details."
7518 #: ../src/guestfs-actions.pod:1934
7519 msgid "guestfs_grep"
7523 #: ../src/guestfs-actions.pod:1936
7527 " guestfs_grep (guestfs_h *g,\n"
7528 " const char *regex,\n"
7529 " const char *path);\n"
7534 #: ../src/guestfs-actions.pod:1941 ../fish/guestfish-actions.pod:1448
7535 msgid "This calls the external C<grep> program and returns the matching lines."
7539 #: ../src/guestfs-actions.pod:1951
7540 msgid "guestfs_grepi"
7544 #: ../src/guestfs-actions.pod:1953
7548 " guestfs_grepi (guestfs_h *g,\n"
7549 " const char *regex,\n"
7550 " const char *path);\n"
7555 #: ../src/guestfs-actions.pod:1958 ../fish/guestfish-actions.pod:1458
7557 "This calls the external C<grep -i> program and returns the matching lines."
7561 #: ../src/guestfs-actions.pod:1968
7562 msgid "guestfs_grub_install"
7566 #: ../src/guestfs-actions.pod:1970
7570 " guestfs_grub_install (guestfs_h *g,\n"
7571 " const char *root,\n"
7572 " const char *device);\n"
7577 #: ../src/guestfs-actions.pod:1975 ../fish/guestfish-actions.pod:1468
7579 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
7580 "the root directory being C<root>."
7584 #: ../src/guestfs-actions.pod:1978 ../fish/guestfish-actions.pod:1471
7586 "Note: If grub-install reports the error \"No suitable drive was found in the "
7587 "generated device map.\" it may be that you need to create a C</boot/grub/"
7588 "device.map> file first that contains the mapping between grub device names "
7589 "and Linux device names. It is usually sufficient to create a file "
7594 #: ../src/guestfs-actions.pod:1985 ../fish/guestfish-actions.pod:1478
7602 #: ../src/guestfs-actions.pod:1987 ../fish/guestfish-actions.pod:1480
7603 msgid "replacing C</dev/vda> with the name of the installation device."
7607 #: ../src/guestfs-actions.pod:1991
7608 msgid "guestfs_head"
7612 #: ../src/guestfs-actions.pod:1993
7616 " guestfs_head (guestfs_h *g,\n"
7617 " const char *path);\n"
7622 #: ../src/guestfs-actions.pod:1997 ../fish/guestfish-actions.pod:1486
7624 "This command returns up to the first 10 lines of a file as a list of strings."
7628 #: ../src/guestfs-actions.pod:2007
7629 msgid "guestfs_head_n"
7633 #: ../src/guestfs-actions.pod:2009
7637 " guestfs_head_n (guestfs_h *g,\n"
7639 " const char *path);\n"
7644 #: ../src/guestfs-actions.pod:2014 ../fish/guestfish-actions.pod:1496
7646 "If the parameter C<nrlines> is a positive number, this returns the first "
7647 "C<nrlines> lines of the file C<path>."
7651 #: ../src/guestfs-actions.pod:2017 ../fish/guestfish-actions.pod:1499
7653 "If the parameter C<nrlines> is a negative number, this returns lines from "
7654 "the file C<path>, excluding the last C<nrlines> lines."
7658 #: ../src/guestfs-actions.pod:2020 ../src/guestfs-actions.pod:5340
7659 #: ../fish/guestfish-actions.pod:1502 ../fish/guestfish-actions.pod:3917
7660 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
7664 #: ../src/guestfs-actions.pod:2029
7665 msgid "guestfs_hexdump"
7669 #: ../src/guestfs-actions.pod:2031
7673 " guestfs_hexdump (guestfs_h *g,\n"
7674 " const char *path);\n"
7679 #: ../src/guestfs-actions.pod:2035 ../fish/guestfish-actions.pod:1511
7681 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
7682 "readable, canonical hex dump of the file."
7686 #: ../src/guestfs-actions.pod:2044
7687 msgid "guestfs_initrd_cat"
7691 #: ../src/guestfs-actions.pod:2046
7695 " guestfs_initrd_cat (guestfs_h *g,\n"
7696 " const char *initrdpath,\n"
7697 " const char *filename,\n"
7698 " size_t *size_r);\n"
7703 #: ../src/guestfs-actions.pod:2052 ../fish/guestfish-actions.pod:1521
7705 "This command unpacks the file C<filename> from the initrd file called "
7706 "C<initrdpath>. The filename must be given I<without> the initial C</> "
7711 #: ../src/guestfs-actions.pod:2056 ../fish/guestfish-actions.pod:1525
7713 "For example, in guestfish you could use the following command to examine the "
7714 "boot script (usually called C</init>) contained in a Linux initrd or "
7719 #: ../src/guestfs-actions.pod:2060 ../fish/guestfish-actions.pod:1529
7722 " initrd-cat /boot/initrd-<version>.img init\n"
7727 #: ../src/guestfs-actions.pod:2062
7728 msgid "See also C<guestfs_initrd_list>."
7732 #: ../src/guestfs-actions.pod:2064 ../src/guestfs-actions.pod:4187
7733 #: ../src/guestfs-actions.pod:4211 ../src/guestfs-actions.pod:4373
7735 "This function returns a buffer, or NULL on error. The size of the returned "
7736 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
7741 #: ../src/guestfs-actions.pod:2071
7742 msgid "guestfs_initrd_list"
7746 #: ../src/guestfs-actions.pod:2073
7750 " guestfs_initrd_list (guestfs_h *g,\n"
7751 " const char *path);\n"
7756 #: ../src/guestfs-actions.pod:2077 ../fish/guestfish-actions.pod:1540
7757 msgid "This command lists out files contained in an initrd."
7761 #: ../src/guestfs-actions.pod:2079 ../fish/guestfish-actions.pod:1542
7763 "The files are listed without any initial C</> character. The files are "
7764 "listed in the order they appear (not necessarily alphabetical). Directory "
7765 "names are listed as separate items."
7769 #: ../src/guestfs-actions.pod:2083 ../fish/guestfish-actions.pod:1546
7771 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
7772 "initrd. We I<only> support the newer initramfs format (compressed cpio "
7777 #: ../src/guestfs-actions.pod:2091
7778 msgid "guestfs_inotify_add_watch"
7782 #: ../src/guestfs-actions.pod:2093
7786 " guestfs_inotify_add_watch (guestfs_h *g,\n"
7787 " const char *path,\n"
7793 #: ../src/guestfs-actions.pod:2098 ../fish/guestfish-actions.pod:1554
7794 msgid "Watch C<path> for the events listed in C<mask>."
7798 #: ../src/guestfs-actions.pod:2100 ../fish/guestfish-actions.pod:1556
7800 "Note that if C<path> is a directory then events within that directory are "
7801 "watched, but this does I<not> happen recursively (in subdirectories)."
7805 #: ../src/guestfs-actions.pod:2104 ../fish/guestfish-actions.pod:1560
7807 "Note for non-C or non-Linux callers: the inotify events are defined by the "
7808 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
7812 #: ../src/guestfs-actions.pod:2110
7813 msgid "guestfs_inotify_close"
7817 #: ../src/guestfs-actions.pod:2112
7821 " guestfs_inotify_close (guestfs_h *g);\n"
7826 #: ../src/guestfs-actions.pod:2115 ../fish/guestfish-actions.pod:1568
7828 "This closes the inotify handle which was previously opened by inotify_init. "
7829 "It removes all watches, throws away any pending events, and deallocates all "
7834 #: ../src/guestfs-actions.pod:2121
7835 msgid "guestfs_inotify_files"
7839 #: ../src/guestfs-actions.pod:2123
7843 " guestfs_inotify_files (guestfs_h *g);\n"
7848 #: ../src/guestfs-actions.pod:2126
7850 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
7851 "returns a list of pathnames of objects that were touched. The returned "
7852 "pathnames are sorted and deduplicated."
7856 #: ../src/guestfs-actions.pod:2134
7857 msgid "guestfs_inotify_init"
7861 #: ../src/guestfs-actions.pod:2136
7865 " guestfs_inotify_init (guestfs_h *g,\n"
7866 " int maxevents);\n"
7871 #: ../src/guestfs-actions.pod:2140 ../fish/guestfish-actions.pod:1584
7873 "This command creates a new inotify handle. The inotify subsystem can be "
7874 "used to notify events which happen to objects in the guest filesystem."
7878 #: ../src/guestfs-actions.pod:2144
7880 "C<maxevents> is the maximum number of events which will be queued up between "
7881 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
7882 "passed as C<0>, then the kernel (or previously set) default is used. For "
7883 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
7884 "throws away events, but records the fact that it threw them away by setting "
7885 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
7886 "C<guestfs_inotify_read>)."
7890 #: ../src/guestfs-actions.pod:2154
7892 "Before any events are generated, you have to add some watches to the "
7893 "internal watch list. See: C<guestfs_inotify_add_watch>, "
7894 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
7898 #: ../src/guestfs-actions.pod:2160
7900 "Queued up events should be read periodically by calling "
7901 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
7902 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
7903 "often enough then you risk the internal queue overflowing."
7907 #: ../src/guestfs-actions.pod:2167
7909 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
7910 "This also removes any watches automatically."
7914 #: ../src/guestfs-actions.pod:2171 ../fish/guestfish-actions.pod:1615
7916 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
7917 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
7918 "that there is one global inotify handle per libguestfs instance."
7922 #: ../src/guestfs-actions.pod:2178
7923 msgid "guestfs_inotify_read"
7927 #: ../src/guestfs-actions.pod:2180
7930 " struct guestfs_inotify_event_list *\n"
7931 " guestfs_inotify_read (guestfs_h *g);\n"
7936 #: ../src/guestfs-actions.pod:2183 ../fish/guestfish-actions.pod:1624
7938 "Return the complete queue of events that have happened since the previous "
7943 #: ../src/guestfs-actions.pod:2186 ../fish/guestfish-actions.pod:1627
7944 msgid "If no events have happened, this returns an empty list."
7948 #: ../src/guestfs-actions.pod:2188 ../fish/guestfish-actions.pod:1629
7950 "I<Note>: In order to make sure that all events have been read, you must call "
7951 "this function repeatedly until it returns an empty list. The reason is that "
7952 "the call will read events up to the maximum appliance-to-host message size "
7953 "and leave remaining events in the queue."
7957 #: ../src/guestfs-actions.pod:2194
7959 "This function returns a C<struct guestfs_inotify_event_list *> (see "
7960 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
7961 "must call C<guestfs_free_inotify_event_list> after use>."
7965 #: ../src/guestfs-actions.pod:2199
7966 msgid "guestfs_inotify_rm_watch"
7970 #: ../src/guestfs-actions.pod:2201
7974 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
7980 #: ../src/guestfs-actions.pod:2205
7982 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
7986 #: ../src/guestfs-actions.pod:2210
7987 msgid "guestfs_inspect_get_arch"
7991 #: ../src/guestfs-actions.pod:2212
7995 " guestfs_inspect_get_arch (guestfs_h *g,\n"
7996 " const char *root);\n"
8001 #: ../src/guestfs-actions.pod:2216 ../src/guestfs-actions.pod:2237
8002 #: ../src/guestfs-actions.pod:2308 ../src/guestfs-actions.pod:2332
8003 #: ../src/guestfs-actions.pod:2357 ../src/guestfs-actions.pod:2376
8004 #: ../src/guestfs-actions.pod:2407 ../src/guestfs-actions.pod:2429
8005 #: ../src/guestfs-actions.pod:2465
8007 "This function should only be called with a root device string as returned by "
8008 "C<guestfs_inspect_os>."
8012 #: ../src/guestfs-actions.pod:2219
8014 "This returns the architecture of the inspected operating system. The "
8015 "possible return values are listed under C<guestfs_file_architecture>."
8019 #: ../src/guestfs-actions.pod:2223 ../fish/guestfish-actions.pod:1653
8021 "If the architecture could not be determined, then the string C<unknown> is "
8026 #: ../src/guestfs-actions.pod:2226 ../src/guestfs-actions.pod:2297
8027 #: ../src/guestfs-actions.pod:2347 ../src/guestfs-actions.pod:2418
8028 #: ../src/guestfs-actions.pod:2454 ../src/guestfs-actions.pod:2475
8029 #: ../src/guestfs-actions.pod:2513 ../fish/guestfish-actions.pod:1656
8030 #: ../fish/guestfish-actions.pod:1722 ../fish/guestfish-actions.pod:1761
8031 #: ../fish/guestfish-actions.pod:1816 ../fish/guestfish-actions.pod:1847
8032 #: ../fish/guestfish-actions.pod:1863 ../fish/guestfish-actions.pod:1897
8033 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
8037 #: ../src/guestfs-actions.pod:2231
8038 msgid "guestfs_inspect_get_distro"
8042 #: ../src/guestfs-actions.pod:2233
8046 " guestfs_inspect_get_distro (guestfs_h *g,\n"
8047 " const char *root);\n"
8052 #: ../src/guestfs-actions.pod:2240 ../fish/guestfish-actions.pod:1665
8054 "This returns the distro (distribution) of the inspected operating system."
8058 #: ../src/guestfs-actions.pod:2243 ../fish/guestfish-actions.pod:1668
8059 msgid "Currently defined distros are:"
8063 #: ../src/guestfs-actions.pod:2247 ../fish/guestfish-actions.pod:1672
8064 msgid "\"archlinux\""
8068 #: ../src/guestfs-actions.pod:2249 ../fish/guestfish-actions.pod:1674
8073 #: ../src/guestfs-actions.pod:2251 ../fish/guestfish-actions.pod:1676
8078 #: ../src/guestfs-actions.pod:2253 ../fish/guestfish-actions.pod:1678
8079 msgid "Debian or a Debian-derived distro such as Ubuntu."
8083 #: ../src/guestfs-actions.pod:2255 ../fish/guestfish-actions.pod:1680
8088 #: ../src/guestfs-actions.pod:2257 ../fish/guestfish-actions.pod:1682
8093 #: ../src/guestfs-actions.pod:2259 ../fish/guestfish-actions.pod:1684
8098 #: ../src/guestfs-actions.pod:2261 ../fish/guestfish-actions.pod:1686
8103 #: ../src/guestfs-actions.pod:2263 ../fish/guestfish-actions.pod:1688
8108 #: ../src/guestfs-actions.pod:2265 ../fish/guestfish-actions.pod:1690
8113 #: ../src/guestfs-actions.pod:2267 ../fish/guestfish-actions.pod:1692
8118 #: ../src/guestfs-actions.pod:2269 ../fish/guestfish-actions.pod:1694
8123 #: ../src/guestfs-actions.pod:2271 ../fish/guestfish-actions.pod:1696
8124 msgid "\"redhat-based\""
8128 #: ../src/guestfs-actions.pod:2273 ../fish/guestfish-actions.pod:1698
8129 msgid "Some Red Hat-derived distro."
8133 #: ../src/guestfs-actions.pod:2275 ../fish/guestfish-actions.pod:1700
8138 #: ../src/guestfs-actions.pod:2277 ../fish/guestfish-actions.pod:1702
8139 msgid "Red Hat Enterprise Linux and some derivatives."
8143 #: ../src/guestfs-actions.pod:2279 ../src/guestfs-actions.pod:2441
8144 #: ../fish/guestfish-actions.pod:1704 ../fish/guestfish-actions.pod:1834
8149 #: ../src/guestfs-actions.pod:2281 ../fish/guestfish-actions.pod:1706
8151 "Windows does not have distributions. This string is returned if the OS type "
8156 #: ../src/guestfs-actions.pod:2284 ../fish/guestfish-actions.pod:1709
8161 #: ../src/guestfs-actions.pod:2286 ../fish/guestfish-actions.pod:1711
8166 #: ../src/guestfs-actions.pod:2288 ../src/guestfs-actions.pod:2445
8167 #: ../fish/guestfish-actions.pod:1713 ../fish/guestfish-actions.pod:1838
8172 #: ../src/guestfs-actions.pod:2290 ../fish/guestfish-actions.pod:1715
8173 msgid "The distro could not be determined."
8177 #: ../src/guestfs-actions.pod:2294 ../src/guestfs-actions.pod:2451
8178 #: ../fish/guestfish-actions.pod:1719 ../fish/guestfish-actions.pod:1844
8180 "Future versions of libguestfs may return other strings here. The caller "
8181 "should be prepared to handle any string."
8185 #: ../src/guestfs-actions.pod:2302
8186 msgid "guestfs_inspect_get_filesystems"
8190 #: ../src/guestfs-actions.pod:2304
8194 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
8195 " const char *root);\n"
8200 #: ../src/guestfs-actions.pod:2311 ../fish/guestfish-actions.pod:1731
8202 "This returns a list of all the filesystems that we think are associated with "
8203 "this operating system. This includes the root filesystem, other ordinary "
8204 "filesystems, and non-mounted devices like swap partitions."
8208 #: ../src/guestfs-actions.pod:2316 ../fish/guestfish-actions.pod:1736
8210 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
8211 "to be shared between operating systems."
8215 #: ../src/guestfs-actions.pod:2319
8217 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8218 "C<guestfs_inspect_get_mountpoints>."
8222 #: ../src/guestfs-actions.pod:2326
8223 msgid "guestfs_inspect_get_major_version"
8227 #: ../src/guestfs-actions.pod:2328
8231 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
8232 " const char *root);\n"
8237 #: ../src/guestfs-actions.pod:2335 ../fish/guestfish-actions.pod:1749
8239 "This returns the major version number of the inspected operating system."
8243 #: ../src/guestfs-actions.pod:2338 ../fish/guestfish-actions.pod:1752
8245 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
8246 "popular public names used by the operating system. Notably the operating "
8247 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
8248 "1). You can find out the real versions corresponding to releases of Windows "
8249 "by consulting Wikipedia or MSDN."
8253 #: ../src/guestfs-actions.pod:2345 ../src/guestfs-actions.pod:2363
8254 #: ../fish/guestfish-actions.pod:1759 ../fish/guestfish-actions.pod:1773
8255 msgid "If the version could not be determined, then C<0> is returned."
8259 #: ../src/guestfs-actions.pod:2351
8260 msgid "guestfs_inspect_get_minor_version"
8264 #: ../src/guestfs-actions.pod:2353
8268 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
8269 " const char *root);\n"
8274 #: ../src/guestfs-actions.pod:2360 ../fish/guestfish-actions.pod:1770
8276 "This returns the minor version number of the inspected operating system."
8280 #: ../src/guestfs-actions.pod:2365
8282 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8283 "C<guestfs_inspect_get_major_version>."
8287 #: ../src/guestfs-actions.pod:2370
8288 msgid "guestfs_inspect_get_mountpoints"
8292 #: ../src/guestfs-actions.pod:2372
8296 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
8297 " const char *root);\n"
8302 #: ../src/guestfs-actions.pod:2379 ../fish/guestfish-actions.pod:1785
8304 "This returns a hash of where we think the filesystems associated with this "
8305 "operating system should be mounted. Callers should note that this is at "
8306 "best an educated guess made by reading configuration files such as C</etc/"
8311 #: ../src/guestfs-actions.pod:2384 ../fish/guestfish-actions.pod:1790
8313 "Each element in the returned hashtable has a key which is the path of the "
8314 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
8315 "mounted there (eg. C</dev/sda1>)."
8319 #: ../src/guestfs-actions.pod:2389 ../fish/guestfish-actions.pod:1795
8321 "Non-mounted devices such as swap devices are I<not> returned in this list."
8325 #: ../src/guestfs-actions.pod:2392
8327 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8328 "C<guestfs_inspect_get_filesystems>."
8332 #: ../src/guestfs-actions.pod:2395 ../src/guestfs-actions.pod:2777
8333 #: ../src/guestfs-actions.pod:3790 ../src/guestfs-actions.pod:5465
8335 "This function returns a NULL-terminated array of strings, or NULL if there "
8336 "was an error. The array of strings will always have length C<2n+1>, where "
8337 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
8338 "caller must free the strings and the array after use>."
8342 #: ../src/guestfs-actions.pod:2401
8343 msgid "guestfs_inspect_get_product_name"
8347 #: ../src/guestfs-actions.pod:2403
8351 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
8352 " const char *root);\n"
8357 #: ../src/guestfs-actions.pod:2410 ../fish/guestfish-actions.pod:1808
8359 "This returns the product name of the inspected operating system. The "
8360 "product name is generally some freeform string which can be displayed to the "
8361 "user, but should not be parsed by programs."
8365 #: ../src/guestfs-actions.pod:2415 ../fish/guestfish-actions.pod:1813
8367 "If the product name could not be determined, then the string C<unknown> is "
8372 #: ../src/guestfs-actions.pod:2423
8373 msgid "guestfs_inspect_get_type"
8377 #: ../src/guestfs-actions.pod:2425
8381 " guestfs_inspect_get_type (guestfs_h *g,\n"
8382 " const char *root);\n"
8387 #: ../src/guestfs-actions.pod:2432 ../fish/guestfish-actions.pod:1825
8389 "This returns the type of the inspected operating system. Currently defined "
8394 #: ../src/guestfs-actions.pod:2437 ../fish/guestfish-actions.pod:1830
8399 #: ../src/guestfs-actions.pod:2439 ../fish/guestfish-actions.pod:1832
8400 msgid "Any Linux-based operating system."
8404 #: ../src/guestfs-actions.pod:2443 ../fish/guestfish-actions.pod:1836
8405 msgid "Any Microsoft Windows operating system."
8409 #: ../src/guestfs-actions.pod:2447 ../fish/guestfish-actions.pod:1840
8410 msgid "The operating system type could not be determined."
8414 #: ../src/guestfs-actions.pod:2459
8415 msgid "guestfs_inspect_get_windows_systemroot"
8419 #: ../src/guestfs-actions.pod:2461
8423 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
8424 " const char *root);\n"
8429 #: ../src/guestfs-actions.pod:2468 ../fish/guestfish-actions.pod:1856
8431 "This returns the Windows systemroot of the inspected guest. The systemroot "
8432 "is a directory path such as C</WINDOWS>."
8436 #: ../src/guestfs-actions.pod:2471 ../fish/guestfish-actions.pod:1859
8438 "This call assumes that the guest is Windows and that the systemroot could be "
8439 "determined by inspection. If this is not the case then an error is returned."
8443 #: ../src/guestfs-actions.pod:2480
8444 msgid "guestfs_inspect_os"
8448 #: ../src/guestfs-actions.pod:2482
8452 " guestfs_inspect_os (guestfs_h *g);\n"
8457 #: ../src/guestfs-actions.pod:2485 ../fish/guestfish-actions.pod:1869
8459 "This function uses other libguestfs functions and certain heuristics to "
8460 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
8461 "for operating systems."
8465 #: ../src/guestfs-actions.pod:2489 ../fish/guestfish-actions.pod:1873
8466 msgid "The list returned is empty if no operating systems were found."
8470 #: ../src/guestfs-actions.pod:2491 ../fish/guestfish-actions.pod:1875
8472 "If one operating system was found, then this returns a list with a single "
8473 "element, which is the name of the root filesystem of this operating system. "
8474 "It is also possible for this function to return a list containing more than "
8475 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
8476 "element being the root filesystem of one of the operating systems."
8480 #: ../src/guestfs-actions.pod:2498
8482 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
8483 "functions in order to query further information about each operating system, "
8484 "such as the name and version."
8488 #: ../src/guestfs-actions.pod:2503
8490 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
8491 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
8492 "the contents. This should be called with no disks currently mounted. The "
8493 "function may also use Augeas, so any existing Augeas handle will be closed."
8497 #: ../src/guestfs-actions.pod:2509 ../fish/guestfish-actions.pod:1893
8499 "This function cannot decrypt encrypted disks. The caller must do that first "
8500 "(supplying the necessary keys) if the disk is encrypted."
8504 #: ../src/guestfs-actions.pod:2515 ../src/guestfs-actions.pod:2737
8505 #: ../src/guestfs-actions.pod:2795
8506 msgid "See also C<guestfs_list_filesystems>."
8510 #: ../src/guestfs-actions.pod:2521
8511 msgid "guestfs_is_blockdev"
8515 #: ../src/guestfs-actions.pod:2523
8519 " guestfs_is_blockdev (guestfs_h *g,\n"
8520 " const char *path);\n"
8525 #: ../src/guestfs-actions.pod:2527 ../fish/guestfish-actions.pod:1905
8527 "This returns C<true> if and only if there is a block device with the given "
8532 #: ../src/guestfs-actions.pod:2530 ../src/guestfs-actions.pod:2555
8533 #: ../src/guestfs-actions.pod:2581 ../src/guestfs-actions.pod:2594
8534 #: ../src/guestfs-actions.pod:2608 ../src/guestfs-actions.pod:2656
8535 #: ../src/guestfs-actions.pod:2669
8536 msgid "See also C<guestfs_stat>."
8540 #: ../src/guestfs-actions.pod:2534
8541 msgid "guestfs_is_busy"
8545 #: ../src/guestfs-actions.pod:2536
8549 " guestfs_is_busy (guestfs_h *g);\n"
8554 #: ../src/guestfs-actions.pod:2539 ../fish/guestfish-actions.pod:1914
8556 "This returns true iff this handle is busy processing a command (in the "
8561 #: ../src/guestfs-actions.pod:2546
8562 msgid "guestfs_is_chardev"
8566 #: ../src/guestfs-actions.pod:2548
8570 " guestfs_is_chardev (guestfs_h *g,\n"
8571 " const char *path);\n"
8576 #: ../src/guestfs-actions.pod:2552 ../fish/guestfish-actions.pod:1923
8578 "This returns C<true> if and only if there is a character device with the "
8579 "given C<path> name."
8583 #: ../src/guestfs-actions.pod:2559
8584 msgid "guestfs_is_config"
8588 #: ../src/guestfs-actions.pod:2561
8592 " guestfs_is_config (guestfs_h *g);\n"
8597 #: ../src/guestfs-actions.pod:2564 ../fish/guestfish-actions.pod:1932
8599 "This returns true iff this handle is being configured (in the C<CONFIG> "
8604 #: ../src/guestfs-actions.pod:2571
8605 msgid "guestfs_is_dir"
8609 #: ../src/guestfs-actions.pod:2573
8613 " guestfs_is_dir (guestfs_h *g,\n"
8614 " const char *path);\n"
8619 #: ../src/guestfs-actions.pod:2577 ../fish/guestfish-actions.pod:1941
8621 "This returns C<true> if and only if there is a directory with the given "
8622 "C<path> name. Note that it returns false for other objects like files."
8626 #: ../src/guestfs-actions.pod:2585
8627 msgid "guestfs_is_fifo"
8631 #: ../src/guestfs-actions.pod:2587
8635 " guestfs_is_fifo (guestfs_h *g,\n"
8636 " const char *path);\n"
8641 #: ../src/guestfs-actions.pod:2591 ../fish/guestfish-actions.pod:1951
8643 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
8644 "given C<path> name."
8648 #: ../src/guestfs-actions.pod:2598
8649 msgid "guestfs_is_file"
8653 #: ../src/guestfs-actions.pod:2600
8657 " guestfs_is_file (guestfs_h *g,\n"
8658 " const char *path);\n"
8663 #: ../src/guestfs-actions.pod:2604 ../fish/guestfish-actions.pod:1960
8665 "This returns C<true> if and only if there is a regular file with the given "
8666 "C<path> name. Note that it returns false for other objects like directories."
8670 #: ../src/guestfs-actions.pod:2612
8671 msgid "guestfs_is_launching"
8675 #: ../src/guestfs-actions.pod:2614
8679 " guestfs_is_launching (guestfs_h *g);\n"
8684 #: ../src/guestfs-actions.pod:2617 ../fish/guestfish-actions.pod:1970
8686 "This returns true iff this handle is launching the subprocess (in the "
8687 "C<LAUNCHING> state)."
8691 #: ../src/guestfs-actions.pod:2624
8692 msgid "guestfs_is_lv"
8696 #: ../src/guestfs-actions.pod:2626
8700 " guestfs_is_lv (guestfs_h *g,\n"
8701 " const char *device);\n"
8706 #: ../src/guestfs-actions.pod:2630 ../fish/guestfish-actions.pod:1979
8708 "This command tests whether C<device> is a logical volume, and returns true "
8709 "iff this is the case."
8713 #: ../src/guestfs-actions.pod:2635
8714 msgid "guestfs_is_ready"
8718 #: ../src/guestfs-actions.pod:2637
8722 " guestfs_is_ready (guestfs_h *g);\n"
8727 #: ../src/guestfs-actions.pod:2640 ../fish/guestfish-actions.pod:1986
8729 "This returns true iff this handle is ready to accept commands (in the "
8734 #: ../src/guestfs-actions.pod:2647
8735 msgid "guestfs_is_socket"
8739 #: ../src/guestfs-actions.pod:2649
8743 " guestfs_is_socket (guestfs_h *g,\n"
8744 " const char *path);\n"
8749 #: ../src/guestfs-actions.pod:2653 ../fish/guestfish-actions.pod:1995
8751 "This returns C<true> if and only if there is a Unix domain socket with the "
8752 "given C<path> name."
8756 #: ../src/guestfs-actions.pod:2660
8757 msgid "guestfs_is_symlink"
8761 #: ../src/guestfs-actions.pod:2662
8765 " guestfs_is_symlink (guestfs_h *g,\n"
8766 " const char *path);\n"
8771 #: ../src/guestfs-actions.pod:2666 ../fish/guestfish-actions.pod:2004
8773 "This returns C<true> if and only if there is a symbolic link with the given "
8778 #: ../src/guestfs-actions.pod:2673
8779 msgid "guestfs_kill_subprocess"
8783 #: ../src/guestfs-actions.pod:2675
8787 " guestfs_kill_subprocess (guestfs_h *g);\n"
8792 #: ../src/guestfs-actions.pod:2678 ../fish/guestfish-actions.pod:2013
8793 msgid "This kills the qemu subprocess. You should never need to call this."
8797 #: ../src/guestfs-actions.pod:2682
8798 msgid "guestfs_launch"
8802 #: ../src/guestfs-actions.pod:2684
8806 " guestfs_launch (guestfs_h *g);\n"
8811 #: ../src/guestfs-actions.pod:2687 ../fish/guestfish-actions.pod:2021
8813 "Internally libguestfs is implemented by running a virtual machine using "
8818 #: ../src/guestfs-actions.pod:2690 ../fish/guestfish-actions.pod:2024
8820 "You should call this after configuring the handle (eg. adding drives) but "
8821 "before performing any actions."
8825 #: ../src/guestfs-actions.pod:2695
8826 msgid "guestfs_lchown"
8830 #: ../src/guestfs-actions.pod:2697
8834 " guestfs_lchown (guestfs_h *g,\n"
8837 " const char *path);\n"
8842 #: ../src/guestfs-actions.pod:2703
8844 "Change the file owner to C<owner> and group to C<group>. This is like "
8845 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
8846 "changed, not the target."
8850 #: ../src/guestfs-actions.pod:2713
8851 msgid "guestfs_lgetxattrs"
8855 #: ../src/guestfs-actions.pod:2715
8858 " struct guestfs_xattr_list *\n"
8859 " guestfs_lgetxattrs (guestfs_h *g,\n"
8860 " const char *path);\n"
8865 #: ../src/guestfs-actions.pod:2719
8867 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
8868 "then it returns the extended attributes of the link itself."
8872 #: ../src/guestfs-actions.pod:2728
8873 msgid "guestfs_list_devices"
8877 #: ../src/guestfs-actions.pod:2730
8881 " guestfs_list_devices (guestfs_h *g);\n"
8886 #: ../src/guestfs-actions.pod:2733 ../fish/guestfish-actions.pod:2051
8887 msgid "List all the block devices."
8891 #: ../src/guestfs-actions.pod:2735 ../fish/guestfish-actions.pod:2053
8892 msgid "The full block device names are returned, eg. C</dev/sda>."
8896 #: ../src/guestfs-actions.pod:2743
8897 msgid "guestfs_list_filesystems"
8901 #: ../src/guestfs-actions.pod:2745
8905 " guestfs_list_filesystems (guestfs_h *g);\n"
8910 #: ../src/guestfs-actions.pod:2748 ../fish/guestfish-actions.pod:2061
8912 "This inspection command looks for filesystems on partitions, block devices "
8913 "and logical volumes, returning a list of devices containing filesystems and "
8918 #: ../src/guestfs-actions.pod:2752 ../fish/guestfish-actions.pod:2065
8920 "The return value is a hash, where the keys are the devices containing "
8921 "filesystems, and the values are the filesystem types. For example:"
8925 #: ../src/guestfs-actions.pod:2756 ../fish/guestfish-actions.pod:2069
8928 " \"/dev/sda1\" => \"ntfs\"\n"
8929 " \"/dev/sda2\" => \"ext2\"\n"
8930 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
8931 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
8936 #: ../src/guestfs-actions.pod:2761 ../fish/guestfish-actions.pod:2074
8938 "The value can have the special value \"unknown\", meaning the content of the "
8939 "device is undetermined or empty. \"swap\" means a Linux swap partition."
8943 #: ../src/guestfs-actions.pod:2765
8945 "This command runs other libguestfs commands, which might include "
8946 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
8947 "soon after launch and only when nothing is mounted."
8951 #: ../src/guestfs-actions.pod:2769
8953 "Not all of the filesystems returned will be mountable. In particular, swap "
8954 "partitions are returned in the list. Also this command does not check that "
8955 "each filesystem found is valid and mountable, and some filesystems might be "
8956 "mountable but require special options. Filesystems may not all belong to a "
8957 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
8961 #: ../src/guestfs-actions.pod:2783
8962 msgid "guestfs_list_partitions"
8966 #: ../src/guestfs-actions.pod:2785
8970 " guestfs_list_partitions (guestfs_h *g);\n"
8975 #: ../src/guestfs-actions.pod:2788 ../fish/guestfish-actions.pod:2094
8976 msgid "List all the partitions detected on all block devices."
8980 #: ../src/guestfs-actions.pod:2790 ../fish/guestfish-actions.pod:2096
8981 msgid "The full partition device names are returned, eg. C</dev/sda1>"
8985 #: ../src/guestfs-actions.pod:2792
8987 "This does not return logical volumes. For that you will need to call "
8992 #: ../src/guestfs-actions.pod:2801
8997 #: ../src/guestfs-actions.pod:2803
9001 " guestfs_ll (guestfs_h *g,\n"
9002 " const char *directory);\n"
9007 #: ../src/guestfs-actions.pod:2807 ../fish/guestfish-actions.pod:2107
9009 "List the files in C<directory> (relative to the root directory, there is no "
9010 "cwd) in the format of 'ls -la'."
9014 #: ../src/guestfs-actions.pod:2810 ../fish/guestfish-actions.pod:2110
9016 "This command is mostly useful for interactive sessions. It is I<not> "
9017 "intended that you try to parse the output string."
9021 #: ../src/guestfs-actions.pod:2816
9026 #: ../src/guestfs-actions.pod:2818
9030 " guestfs_ln (guestfs_h *g,\n"
9031 " const char *target,\n"
9032 " const char *linkname);\n"
9037 #: ../src/guestfs-actions.pod:2823 ../fish/guestfish-actions.pod:2117
9038 msgid "This command creates a hard link using the C<ln> command."
9042 #: ../src/guestfs-actions.pod:2827
9043 msgid "guestfs_ln_f"
9047 #: ../src/guestfs-actions.pod:2829
9051 " guestfs_ln_f (guestfs_h *g,\n"
9052 " const char *target,\n"
9053 " const char *linkname);\n"
9058 #: ../src/guestfs-actions.pod:2834 ../fish/guestfish-actions.pod:2123
9060 "This command creates a hard link using the C<ln -f> command. The C<-f> "
9061 "option removes the link (C<linkname>) if it exists already."
9065 #: ../src/guestfs-actions.pod:2839
9066 msgid "guestfs_ln_s"
9070 #: ../src/guestfs-actions.pod:2841
9074 " guestfs_ln_s (guestfs_h *g,\n"
9075 " const char *target,\n"
9076 " const char *linkname);\n"
9081 #: ../src/guestfs-actions.pod:2846 ../fish/guestfish-actions.pod:2130
9082 msgid "This command creates a symbolic link using the C<ln -s> command."
9086 #: ../src/guestfs-actions.pod:2850
9087 msgid "guestfs_ln_sf"
9091 #: ../src/guestfs-actions.pod:2852
9095 " guestfs_ln_sf (guestfs_h *g,\n"
9096 " const char *target,\n"
9097 " const char *linkname);\n"
9102 #: ../src/guestfs-actions.pod:2857 ../fish/guestfish-actions.pod:2136
9104 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
9105 "option removes the link (C<linkname>) if it exists already."
9109 #: ../src/guestfs-actions.pod:2862
9110 msgid "guestfs_lremovexattr"
9114 #: ../src/guestfs-actions.pod:2864
9118 " guestfs_lremovexattr (guestfs_h *g,\n"
9119 " const char *xattr,\n"
9120 " const char *path);\n"
9125 #: ../src/guestfs-actions.pod:2869
9127 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
9128 "link, then it removes an extended attribute of the link itself."
9132 #: ../src/guestfs-actions.pod:2875
9137 #: ../src/guestfs-actions.pod:2877
9141 " guestfs_ls (guestfs_h *g,\n"
9142 " const char *directory);\n"
9147 #: ../src/guestfs-actions.pod:2881 ../fish/guestfish-actions.pod:2151
9149 "List the files in C<directory> (relative to the root directory, there is no "
9150 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
9154 #: ../src/guestfs-actions.pod:2885
9156 "This command is mostly useful for interactive sessions. Programs should "
9157 "probably use C<guestfs_readdir> instead."
9161 #: ../src/guestfs-actions.pod:2892
9162 msgid "guestfs_lsetxattr"
9166 #: ../src/guestfs-actions.pod:2894
9170 " guestfs_lsetxattr (guestfs_h *g,\n"
9171 " const char *xattr,\n"
9172 " const char *val,\n"
9174 " const char *path);\n"
9179 #: ../src/guestfs-actions.pod:2901
9181 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
9182 "then it sets an extended attribute of the link itself."
9186 #: ../src/guestfs-actions.pod:2907
9187 msgid "guestfs_lstat"
9191 #: ../src/guestfs-actions.pod:2909
9194 " struct guestfs_stat *\n"
9195 " guestfs_lstat (guestfs_h *g,\n"
9196 " const char *path);\n"
9201 #: ../src/guestfs-actions.pod:2913 ../src/guestfs-actions.pod:5108
9202 #: ../fish/guestfish-actions.pod:2170 ../fish/guestfish-actions.pod:3752
9203 msgid "Returns file information for the given C<path>."
9207 #: ../src/guestfs-actions.pod:2915
9209 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
9210 "link, then the link is stat-ed, not the file it refers to."
9214 #: ../src/guestfs-actions.pod:2919 ../fish/guestfish-actions.pod:2176
9215 msgid "This is the same as the C<lstat(2)> system call."
9219 #: ../src/guestfs-actions.pod:2921 ../src/guestfs-actions.pod:5112
9221 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
9222 "error. I<The caller must call C<guestfs_free_stat> after use>."
9226 #: ../src/guestfs-actions.pod:2925
9227 msgid "guestfs_lstatlist"
9231 #: ../src/guestfs-actions.pod:2927
9234 " struct guestfs_stat_list *\n"
9235 " guestfs_lstatlist (guestfs_h *g,\n"
9236 " const char *path,\n"
9237 " char *const *names);\n"
9242 #: ../src/guestfs-actions.pod:2932
9244 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
9245 "files, where all files are in the directory C<path>. C<names> is the list "
9246 "of files from this directory."
9250 #: ../src/guestfs-actions.pod:2936 ../fish/guestfish-actions.pod:2186
9252 "On return you get a list of stat structs, with a one-to-one correspondence "
9253 "to the C<names> list. If any name did not exist or could not be lstat'd, "
9254 "then the C<ino> field of that structure is set to C<-1>."
9258 #: ../src/guestfs-actions.pod:2941
9260 "This call is intended for programs that want to efficiently list a directory "
9261 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
9262 "for a similarly efficient call for getting extended attributes. Very long "
9263 "directory listings might cause the protocol message size to be exceeded, "
9264 "causing this call to fail. The caller must split up such requests into "
9265 "smaller groups of names."
9269 #: ../src/guestfs-actions.pod:2949
9271 "This function returns a C<struct guestfs_stat_list *> (see E<lt>guestfs-"
9272 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
9273 "C<guestfs_free_stat_list> after use>."
9277 #: ../src/guestfs-actions.pod:2954
9278 msgid "guestfs_luks_add_key"
9282 #: ../src/guestfs-actions.pod:2956
9286 " guestfs_luks_add_key (guestfs_h *g,\n"
9287 " const char *device,\n"
9288 " const char *key,\n"
9289 " const char *newkey,\n"
9295 #: ../src/guestfs-actions.pod:2963 ../fish/guestfish-actions.pod:2203
9297 "This command adds a new key on LUKS device C<device>. C<key> is any "
9298 "existing key, and is used to access the device. C<newkey> is the new key to "
9299 "add. C<keyslot> is the key slot that will be replaced."
9303 #: ../src/guestfs-actions.pod:2968
9305 "Note that if C<keyslot> already contains a key, then this command will "
9306 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
9310 #: ../src/guestfs-actions.pod:2974 ../src/guestfs-actions.pod:3010
9311 #: ../src/guestfs-actions.pod:3031 ../src/guestfs-actions.pod:3049
9312 #: ../src/guestfs-actions.pod:3079 ../src/guestfs-actions.pod:3096
9314 "This function takes a key or passphrase parameter which could contain "
9315 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
9320 #: ../src/guestfs-actions.pod:2978
9321 msgid "guestfs_luks_close"
9325 #: ../src/guestfs-actions.pod:2980
9329 " guestfs_luks_close (guestfs_h *g,\n"
9330 " const char *device);\n"
9335 #: ../src/guestfs-actions.pod:2984
9337 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
9338 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
9339 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
9340 "underlying block device."
9344 #: ../src/guestfs-actions.pod:2992
9345 msgid "guestfs_luks_format"
9349 #: ../src/guestfs-actions.pod:2994
9353 " guestfs_luks_format (guestfs_h *g,\n"
9354 " const char *device,\n"
9355 " const char *key,\n"
9361 #: ../src/guestfs-actions.pod:3000 ../fish/guestfish-actions.pod:2229
9363 "This command erases existing data on C<device> and formats the device as a "
9364 "LUKS encrypted device. C<key> is the initial key, which is added to key "
9365 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
9369 #: ../src/guestfs-actions.pod:3007 ../src/guestfs-actions.pod:3028
9370 #: ../src/guestfs-actions.pod:3154 ../src/guestfs-actions.pod:3926
9371 #: ../src/guestfs-actions.pod:4622 ../src/guestfs-actions.pod:4961
9372 #: ../src/guestfs-actions.pod:4982 ../src/guestfs-actions.pod:5006
9373 #: ../src/guestfs-actions.pod:6033 ../fish/guestfish-actions.pod:2237
9374 #: ../fish/guestfish-actions.pod:2250 ../fish/guestfish-actions.pod:2334
9375 #: ../fish/guestfish-actions.pod:2864 ../fish/guestfish-actions.pod:3371
9376 #: ../fish/guestfish-actions.pod:3651 ../fish/guestfish-actions.pod:3667
9377 #: ../fish/guestfish-actions.pod:3682 ../fish/guestfish-actions.pod:4397
9379 "B<This command is dangerous. Without careful use you can easily destroy all "
9384 #: ../src/guestfs-actions.pod:3014
9385 msgid "guestfs_luks_format_cipher"
9389 #: ../src/guestfs-actions.pod:3016
9393 " guestfs_luks_format_cipher (guestfs_h *g,\n"
9394 " const char *device,\n"
9395 " const char *key,\n"
9397 " const char *cipher);\n"
9402 #: ../src/guestfs-actions.pod:3023
9404 "This command is the same as C<guestfs_luks_format> but it also allows you to "
9405 "set the C<cipher> used."
9409 #: ../src/guestfs-actions.pod:3035
9410 msgid "guestfs_luks_kill_slot"
9414 #: ../src/guestfs-actions.pod:3037
9418 " guestfs_luks_kill_slot (guestfs_h *g,\n"
9419 " const char *device,\n"
9420 " const char *key,\n"
9426 #: ../src/guestfs-actions.pod:3043 ../fish/guestfish-actions.pod:2257
9428 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
9429 "device C<device>. C<key> must be one of the I<other> keys."
9433 #: ../src/guestfs-actions.pod:3053
9434 msgid "guestfs_luks_open"
9438 #: ../src/guestfs-actions.pod:3055
9442 " guestfs_luks_open (guestfs_h *g,\n"
9443 " const char *device,\n"
9444 " const char *key,\n"
9445 " const char *mapname);\n"
9450 #: ../src/guestfs-actions.pod:3061 ../fish/guestfish-actions.pod:2268
9452 "This command opens a block device which has been encrypted according to the "
9453 "Linux Unified Key Setup (LUKS) standard."
9457 #: ../src/guestfs-actions.pod:3064 ../fish/guestfish-actions.pod:2271
9458 msgid "C<device> is the encrypted block device or partition."
9462 #: ../src/guestfs-actions.pod:3066 ../fish/guestfish-actions.pod:2273
9464 "The caller must supply one of the keys associated with the LUKS block "
9465 "device, in the C<key> parameter."
9469 #: ../src/guestfs-actions.pod:3069 ../fish/guestfish-actions.pod:2276
9471 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
9472 "writes to this block device are decrypted from and encrypted to the "
9473 "underlying C<device> respectively."
9477 #: ../src/guestfs-actions.pod:3073
9479 "If this block device contains LVM volume groups, then calling "
9480 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
9485 #: ../src/guestfs-actions.pod:3083
9486 msgid "guestfs_luks_open_ro"
9490 #: ../src/guestfs-actions.pod:3085
9494 " guestfs_luks_open_ro (guestfs_h *g,\n"
9495 " const char *device,\n"
9496 " const char *key,\n"
9497 " const char *mapname);\n"
9502 #: ../src/guestfs-actions.pod:3091
9504 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
9509 #: ../src/guestfs-actions.pod:3100
9510 msgid "guestfs_lvcreate"
9514 #: ../src/guestfs-actions.pod:3102
9518 " guestfs_lvcreate (guestfs_h *g,\n"
9519 " const char *logvol,\n"
9520 " const char *volgroup,\n"
9526 #: ../src/guestfs-actions.pod:3108 ../fish/guestfish-actions.pod:2301
9528 "This creates an LVM logical volume called C<logvol> on the volume group "
9529 "C<volgroup>, with C<size> megabytes."
9533 #: ../src/guestfs-actions.pod:3113
9534 msgid "guestfs_lvm_canonical_lv_name"
9538 #: ../src/guestfs-actions.pod:3115
9542 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
9543 " const char *lvname);\n"
9548 #: ../src/guestfs-actions.pod:3119 ../fish/guestfish-actions.pod:2308
9550 "This converts alternative naming schemes for LVs that you might find to the "
9551 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
9556 #: ../src/guestfs-actions.pod:3123 ../fish/guestfish-actions.pod:2312
9558 "This command returns an error if the C<lvname> parameter does not refer to a "
9563 #: ../src/guestfs-actions.pod:3126
9564 msgid "See also C<guestfs_is_lv>."
9568 #: ../src/guestfs-actions.pod:3131
9569 msgid "guestfs_lvm_clear_filter"
9573 #: ../src/guestfs-actions.pod:3133
9577 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
9582 #: ../src/guestfs-actions.pod:3136
9584 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
9585 "see every block device."
9589 #: ../src/guestfs-actions.pod:3139 ../src/guestfs-actions.pod:3177
9590 #: ../fish/guestfish-actions.pod:2324 ../fish/guestfish-actions.pod:2355
9592 "This command also clears the LVM cache and performs a volume group scan."
9596 #: ../src/guestfs-actions.pod:3144
9597 msgid "guestfs_lvm_remove_all"
9601 #: ../src/guestfs-actions.pod:3146
9605 " guestfs_lvm_remove_all (guestfs_h *g);\n"
9610 #: ../src/guestfs-actions.pod:3149 ../fish/guestfish-actions.pod:2331
9612 "This command removes all LVM logical volumes, volume groups and physical "
9617 #: ../src/guestfs-actions.pod:3157
9618 msgid "guestfs_lvm_set_filter"
9622 #: ../src/guestfs-actions.pod:3159
9626 " guestfs_lvm_set_filter (guestfs_h *g,\n"
9627 " char *const *devices);\n"
9632 #: ../src/guestfs-actions.pod:3163 ../fish/guestfish-actions.pod:2341
9634 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
9635 "block devices in the list C<devices>, and will ignore all other attached "
9640 #: ../src/guestfs-actions.pod:3167 ../fish/guestfish-actions.pod:2345
9642 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
9643 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
9644 "there are two types of duplication possible: either cloned PVs/VGs which "
9645 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
9646 "same name. In normal operation you cannot create this situation, but you "
9647 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
9648 "inside the LVM metadata."
9652 #: ../src/guestfs-actions.pod:3180 ../fish/guestfish-actions.pod:2358
9653 msgid "You can filter whole block devices or individual partitions."
9657 #: ../src/guestfs-actions.pod:3182 ../fish/guestfish-actions.pod:2360
9659 "You cannot use this if any VG is currently in use (eg. contains a mounted "
9660 "filesystem), even if you are not filtering out that VG."
9664 #: ../src/guestfs-actions.pod:3188
9665 msgid "guestfs_lvremove"
9669 #: ../src/guestfs-actions.pod:3190
9673 " guestfs_lvremove (guestfs_h *g,\n"
9674 " const char *device);\n"
9679 #: ../src/guestfs-actions.pod:3194 ../fish/guestfish-actions.pod:2368
9681 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
9682 "LV, such as C</dev/VG/LV>."
9686 #: ../src/guestfs-actions.pod:3197 ../fish/guestfish-actions.pod:2371
9688 "You can also remove all LVs in a volume group by specifying the VG name, C</"
9693 #: ../src/guestfs-actions.pod:3202
9694 msgid "guestfs_lvrename"
9698 #: ../src/guestfs-actions.pod:3204
9702 " guestfs_lvrename (guestfs_h *g,\n"
9703 " const char *logvol,\n"
9704 " const char *newlogvol);\n"
9709 #: ../src/guestfs-actions.pod:3209 ../fish/guestfish-actions.pod:2378
9710 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
9714 #: ../src/guestfs-actions.pod:3213
9715 msgid "guestfs_lvresize"
9719 #: ../src/guestfs-actions.pod:3215
9723 " guestfs_lvresize (guestfs_h *g,\n"
9724 " const char *device,\n"
9730 #: ../src/guestfs-actions.pod:3220 ../fish/guestfish-actions.pod:2384
9732 "This resizes (expands or shrinks) an existing LVM logical volume to "
9733 "C<mbytes>. When reducing, data in the reduced part is lost."
9737 #: ../src/guestfs-actions.pod:3226
9738 msgid "guestfs_lvresize_free"
9742 #: ../src/guestfs-actions.pod:3228
9746 " guestfs_lvresize_free (guestfs_h *g,\n"
9747 " const char *lv,\n"
9753 #: ../src/guestfs-actions.pod:3233 ../fish/guestfish-actions.pod:2392
9755 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
9756 "remaining free space in the volume group. Commonly you would call this with "
9757 "pc = 100 which expands the logical volume as much as possible, using all "
9758 "remaining free space in the volume group."
9762 #: ../src/guestfs-actions.pod:3241
9767 #: ../src/guestfs-actions.pod:3243
9771 " guestfs_lvs (guestfs_h *g);\n"
9776 #: ../src/guestfs-actions.pod:3246 ../fish/guestfish-actions.pod:2402
9778 "List all the logical volumes detected. This is the equivalent of the L<lvs"
9783 #: ../src/guestfs-actions.pod:3249 ../fish/guestfish-actions.pod:2405
9785 "This returns a list of the logical volume device names (eg. C</dev/"
9786 "VolGroup00/LogVol00>)."
9790 #: ../src/guestfs-actions.pod:3252
9791 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
9795 #: ../src/guestfs-actions.pod:3258
9796 msgid "guestfs_lvs_full"
9800 #: ../src/guestfs-actions.pod:3260
9803 " struct guestfs_lvm_lv_list *\n"
9804 " guestfs_lvs_full (guestfs_h *g);\n"
9809 #: ../src/guestfs-actions.pod:3263 ../fish/guestfish-actions.pod:2414
9811 "List all the logical volumes detected. This is the equivalent of the L<lvs"
9812 "(8)> command. The \"full\" version includes all fields."
9816 #: ../src/guestfs-actions.pod:3266
9818 "This function returns a C<struct guestfs_lvm_lv_list *> (see E<lt>guestfs-"
9819 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
9820 "C<guestfs_free_lvm_lv_list> after use>."
9824 #: ../src/guestfs-actions.pod:3271
9825 msgid "guestfs_lvuuid"
9829 #: ../src/guestfs-actions.pod:3273
9833 " guestfs_lvuuid (guestfs_h *g,\n"
9834 " const char *device);\n"
9839 #: ../src/guestfs-actions.pod:3277 ../fish/guestfish-actions.pod:2421
9840 msgid "This command returns the UUID of the LVM LV C<device>."
9844 #: ../src/guestfs-actions.pod:3282
9845 msgid "guestfs_lxattrlist"
9849 #: ../src/guestfs-actions.pod:3284
9852 " struct guestfs_xattr_list *\n"
9853 " guestfs_lxattrlist (guestfs_h *g,\n"
9854 " const char *path,\n"
9855 " char *const *names);\n"
9860 #: ../src/guestfs-actions.pod:3289 ../fish/guestfish-actions.pod:2427
9862 "This call allows you to get the extended attributes of multiple files, where "
9863 "all files are in the directory C<path>. C<names> is the list of files from "
9868 #: ../src/guestfs-actions.pod:3293 ../fish/guestfish-actions.pod:2431
9870 "On return you get a flat list of xattr structs which must be interpreted "
9871 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
9872 "C<attrval> in this struct is zero-length to indicate there was an error "
9873 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
9874 "number (the number of following attributes for this file, which could be C<"
9875 "\"0\">). Then after the first xattr struct are the zero or more attributes "
9876 "for the first named file. This repeats for the second and subsequent files."
9880 #: ../src/guestfs-actions.pod:3303
9882 "This call is intended for programs that want to efficiently list a directory "
9883 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
9884 "a similarly efficient call for getting standard stats. Very long directory "
9885 "listings might cause the protocol message size to be exceeded, causing this "
9886 "call to fail. The caller must split up such requests into smaller groups of "
9891 #: ../src/guestfs-actions.pod:3316
9892 msgid "guestfs_mkdir"
9896 #: ../src/guestfs-actions.pod:3318
9900 " guestfs_mkdir (guestfs_h *g,\n"
9901 " const char *path);\n"
9906 #: ../src/guestfs-actions.pod:3322 ../fish/guestfish-actions.pod:2453
9907 msgid "Create a directory named C<path>."
9911 #: ../src/guestfs-actions.pod:3326
9912 msgid "guestfs_mkdir_mode"
9916 #: ../src/guestfs-actions.pod:3328
9920 " guestfs_mkdir_mode (guestfs_h *g,\n"
9921 " const char *path,\n"
9927 #: ../src/guestfs-actions.pod:3333 ../fish/guestfish-actions.pod:2459
9929 "This command creates a directory, setting the initial permissions of the "
9930 "directory to C<mode>."
9934 #: ../src/guestfs-actions.pod:3336 ../fish/guestfish-actions.pod:2462
9936 "For common Linux filesystems, the actual mode which is set will be C<mode & "
9937 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
9942 #: ../src/guestfs-actions.pod:3340
9943 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
9947 #: ../src/guestfs-actions.pod:3344
9948 msgid "guestfs_mkdir_p"
9952 #: ../src/guestfs-actions.pod:3346
9956 " guestfs_mkdir_p (guestfs_h *g,\n"
9957 " const char *path);\n"
9962 #: ../src/guestfs-actions.pod:3350 ../fish/guestfish-actions.pod:2472
9964 "Create a directory named C<path>, creating any parent directories as "
9965 "necessary. This is like the C<mkdir -p> shell command."
9969 #: ../src/guestfs-actions.pod:3355
9970 msgid "guestfs_mkdtemp"
9974 #: ../src/guestfs-actions.pod:3357
9978 " guestfs_mkdtemp (guestfs_h *g,\n"
9979 " const char *template);\n"
9984 #: ../src/guestfs-actions.pod:3361 ../fish/guestfish-actions.pod:2479
9986 "This command creates a temporary directory. The C<template> parameter "
9987 "should be a full pathname for the temporary directory name with the final "
9988 "six characters being \"XXXXXX\"."
9992 #: ../src/guestfs-actions.pod:3366 ../fish/guestfish-actions.pod:2484
9994 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
9995 "being suitable for Windows filesystems."
9999 #: ../src/guestfs-actions.pod:3369 ../fish/guestfish-actions.pod:2487
10000 msgid "The name of the temporary directory that was created is returned."
10004 #: ../src/guestfs-actions.pod:3372 ../fish/guestfish-actions.pod:2490
10005 msgid "The temporary directory is created with mode 0700 and is owned by root."
10009 #: ../src/guestfs-actions.pod:3375 ../fish/guestfish-actions.pod:2493
10011 "The caller is responsible for deleting the temporary directory and its "
10012 "contents after use."
10016 #: ../src/guestfs-actions.pod:3378 ../fish/guestfish-actions.pod:2496
10017 msgid "See also: L<mkdtemp(3)>"
10021 #: ../src/guestfs-actions.pod:3383
10022 msgid "guestfs_mke2fs_J"
10026 #: ../src/guestfs-actions.pod:3385
10030 " guestfs_mke2fs_J (guestfs_h *g,\n"
10031 " const char *fstype,\n"
10032 " int blocksize,\n"
10033 " const char *device,\n"
10034 " const char *journal);\n"
10039 #: ../src/guestfs-actions.pod:3392 ../fish/guestfish-actions.pod:2502
10041 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10042 "C<journal>. It is equivalent to the command:"
10046 #: ../src/guestfs-actions.pod:3396 ../fish/guestfish-actions.pod:2506
10049 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
10054 #: ../src/guestfs-actions.pod:3398
10055 msgid "See also C<guestfs_mke2journal>."
10059 #: ../src/guestfs-actions.pod:3402
10060 msgid "guestfs_mke2fs_JL"
10064 #: ../src/guestfs-actions.pod:3404
10068 " guestfs_mke2fs_JL (guestfs_h *g,\n"
10069 " const char *fstype,\n"
10070 " int blocksize,\n"
10071 " const char *device,\n"
10072 " const char *label);\n"
10077 #: ../src/guestfs-actions.pod:3411 ../fish/guestfish-actions.pod:2514
10079 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10080 "the journal labeled C<label>."
10084 #: ../src/guestfs-actions.pod:3414
10085 msgid "See also C<guestfs_mke2journal_L>."
10089 #: ../src/guestfs-actions.pod:3418
10090 msgid "guestfs_mke2fs_JU"
10094 #: ../src/guestfs-actions.pod:3420
10098 " guestfs_mke2fs_JU (guestfs_h *g,\n"
10099 " const char *fstype,\n"
10100 " int blocksize,\n"
10101 " const char *device,\n"
10102 " const char *uuid);\n"
10107 #: ../src/guestfs-actions.pod:3427 ../fish/guestfish-actions.pod:2523
10109 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10110 "the journal with UUID C<uuid>."
10114 #: ../src/guestfs-actions.pod:3430
10115 msgid "See also C<guestfs_mke2journal_U>."
10119 #: ../src/guestfs-actions.pod:3434
10120 msgid "guestfs_mke2journal"
10124 #: ../src/guestfs-actions.pod:3436
10128 " guestfs_mke2journal (guestfs_h *g,\n"
10129 " int blocksize,\n"
10130 " const char *device);\n"
10135 #: ../src/guestfs-actions.pod:3441 ../fish/guestfish-actions.pod:2532
10137 "This creates an ext2 external journal on C<device>. It is equivalent to the "
10142 #: ../src/guestfs-actions.pod:3444 ../fish/guestfish-actions.pod:2535
10145 " mke2fs -O journal_dev -b blocksize device\n"
10150 #: ../src/guestfs-actions.pod:3448
10151 msgid "guestfs_mke2journal_L"
10155 #: ../src/guestfs-actions.pod:3450
10159 " guestfs_mke2journal_L (guestfs_h *g,\n"
10160 " int blocksize,\n"
10161 " const char *label,\n"
10162 " const char *device);\n"
10167 #: ../src/guestfs-actions.pod:3456 ../fish/guestfish-actions.pod:2541
10168 msgid "This creates an ext2 external journal on C<device> with label C<label>."
10172 #: ../src/guestfs-actions.pod:3460
10173 msgid "guestfs_mke2journal_U"
10177 #: ../src/guestfs-actions.pod:3462
10181 " guestfs_mke2journal_U (guestfs_h *g,\n"
10182 " int blocksize,\n"
10183 " const char *uuid,\n"
10184 " const char *device);\n"
10189 #: ../src/guestfs-actions.pod:3468 ../fish/guestfish-actions.pod:2547
10190 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
10194 #: ../src/guestfs-actions.pod:3472
10195 msgid "guestfs_mkfifo"
10199 #: ../src/guestfs-actions.pod:3474
10203 " guestfs_mkfifo (guestfs_h *g,\n"
10205 " const char *path);\n"
10210 #: ../src/guestfs-actions.pod:3479
10212 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
10213 "is just a convenient wrapper around C<guestfs_mknod>."
10217 #: ../src/guestfs-actions.pod:3487
10218 msgid "guestfs_mkfs"
10222 #: ../src/guestfs-actions.pod:3489
10226 " guestfs_mkfs (guestfs_h *g,\n"
10227 " const char *fstype,\n"
10228 " const char *device);\n"
10233 #: ../src/guestfs-actions.pod:3494 ../fish/guestfish-actions.pod:2563
10235 "This creates a filesystem on C<device> (usually a partition or LVM logical "
10236 "volume). The filesystem type is C<fstype>, for example C<ext3>."
10240 #: ../src/guestfs-actions.pod:3500
10241 msgid "guestfs_mkfs_b"
10245 #: ../src/guestfs-actions.pod:3502
10249 " guestfs_mkfs_b (guestfs_h *g,\n"
10250 " const char *fstype,\n"
10251 " int blocksize,\n"
10252 " const char *device);\n"
10257 #: ../src/guestfs-actions.pod:3508
10259 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
10260 "block size of the resulting filesystem. Supported block sizes depend on the "
10261 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
10265 #: ../src/guestfs-actions.pod:3513 ../fish/guestfish-actions.pod:2576
10267 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
10272 #: ../src/guestfs-actions.pod:3518
10273 msgid "guestfs_mkmountpoint"
10277 #: ../src/guestfs-actions.pod:3520
10281 " guestfs_mkmountpoint (guestfs_h *g,\n"
10282 " const char *exemptpath);\n"
10287 #: ../src/guestfs-actions.pod:3524
10289 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
10290 "that can be used to create extra mountpoints before mounting the first "
10295 #: ../src/guestfs-actions.pod:3528 ../fish/guestfish-actions.pod:2587
10297 "These calls are I<only> necessary in some very limited circumstances, mainly "
10298 "the case where you want to mount a mix of unrelated and/or read-only "
10299 "filesystems together."
10303 #: ../src/guestfs-actions.pod:3532 ../fish/guestfish-actions.pod:2591
10305 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
10306 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
10307 "inside that. You can unpack this as follows in guestfish:"
10311 #: ../src/guestfs-actions.pod:3537 ../fish/guestfish-actions.pod:2596
10314 " add-ro Fedora-11-i686-Live.iso\n"
10316 " mkmountpoint /cd\n"
10317 " mkmountpoint /sqsh\n"
10318 " mkmountpoint /ext3fs\n"
10319 " mount /dev/sda /cd\n"
10320 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
10321 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
10326 #: ../src/guestfs-actions.pod:3546 ../fish/guestfish-actions.pod:2605
10327 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
10331 #: ../src/guestfs-actions.pod:3548
10333 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
10334 "may get unexpected errors if you try to mix these calls. It is safest to "
10335 "manually unmount filesystems and remove mountpoints after use."
10339 #: ../src/guestfs-actions.pod:3552
10341 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
10342 "first, so for this to work for manual mountpoints, you must ensure that the "
10343 "innermost mountpoints have the longest pathnames, as in the example code "
10348 #: ../src/guestfs-actions.pod:3557 ../fish/guestfish-actions.pod:2616
10350 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
10354 #: ../src/guestfs-actions.pod:3559
10356 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
10357 "means that C<guestfs_umount_all> is called when the handle is closed which "
10358 "can also trigger these issues."
10362 #: ../src/guestfs-actions.pod:3565
10363 msgid "guestfs_mknod"
10367 #: ../src/guestfs-actions.pod:3567
10371 " guestfs_mknod (guestfs_h *g,\n"
10375 " const char *path);\n"
10380 #: ../src/guestfs-actions.pod:3574 ../fish/guestfish-actions.pod:2626
10382 "This call creates block or character special devices, or named pipes (FIFOs)."
10386 #: ../src/guestfs-actions.pod:3577 ../fish/guestfish-actions.pod:2629
10388 "The C<mode> parameter should be the mode, using the standard constants. "
10389 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
10390 "used when creating block and character special devices."
10394 #: ../src/guestfs-actions.pod:3582
10396 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
10397 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
10398 "regular file). These constants are available in the standard Linux header "
10399 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
10400 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
10401 "the appropriate constant for you."
10405 #: ../src/guestfs-actions.pod:3594
10406 msgid "guestfs_mknod_b"
10410 #: ../src/guestfs-actions.pod:3596
10414 " guestfs_mknod_b (guestfs_h *g,\n"
10418 " const char *path);\n"
10423 #: ../src/guestfs-actions.pod:3603
10425 "This call creates a block device node called C<path> with mode C<mode> and "
10426 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
10427 "wrapper around C<guestfs_mknod>."
10431 #: ../src/guestfs-actions.pod:3611
10432 msgid "guestfs_mknod_c"
10436 #: ../src/guestfs-actions.pod:3613
10440 " guestfs_mknod_c (guestfs_h *g,\n"
10444 " const char *path);\n"
10449 #: ../src/guestfs-actions.pod:3620
10451 "This call creates a char device node called C<path> with mode C<mode> and "
10452 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
10453 "wrapper around C<guestfs_mknod>."
10457 #: ../src/guestfs-actions.pod:3628
10458 msgid "guestfs_mkswap"
10462 #: ../src/guestfs-actions.pod:3630
10466 " guestfs_mkswap (guestfs_h *g,\n"
10467 " const char *device);\n"
10472 #: ../src/guestfs-actions.pod:3634 ../fish/guestfish-actions.pod:2668
10473 msgid "Create a swap partition on C<device>."
10477 #: ../src/guestfs-actions.pod:3638
10478 msgid "guestfs_mkswap_L"
10482 #: ../src/guestfs-actions.pod:3640
10486 " guestfs_mkswap_L (guestfs_h *g,\n"
10487 " const char *label,\n"
10488 " const char *device);\n"
10493 #: ../src/guestfs-actions.pod:3645 ../fish/guestfish-actions.pod:2674
10494 msgid "Create a swap partition on C<device> with label C<label>."
10498 #: ../src/guestfs-actions.pod:3647 ../fish/guestfish-actions.pod:2676
10500 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
10501 "sda>), just to a partition. This appears to be a limitation of the kernel "
10506 #: ../src/guestfs-actions.pod:3653
10507 msgid "guestfs_mkswap_U"
10511 #: ../src/guestfs-actions.pod:3655
10515 " guestfs_mkswap_U (guestfs_h *g,\n"
10516 " const char *uuid,\n"
10517 " const char *device);\n"
10522 #: ../src/guestfs-actions.pod:3660 ../fish/guestfish-actions.pod:2684
10523 msgid "Create a swap partition on C<device> with UUID C<uuid>."
10527 #: ../src/guestfs-actions.pod:3664
10528 msgid "guestfs_mkswap_file"
10532 #: ../src/guestfs-actions.pod:3666
10536 " guestfs_mkswap_file (guestfs_h *g,\n"
10537 " const char *path);\n"
10542 #: ../src/guestfs-actions.pod:3670 ../fish/guestfish-actions.pod:2690
10543 msgid "Create a swap file."
10547 #: ../src/guestfs-actions.pod:3672
10549 "This command just writes a swap file signature to an existing file. To "
10550 "create the file itself, use something like C<guestfs_fallocate>."
10554 #: ../src/guestfs-actions.pod:3677
10555 msgid "guestfs_modprobe"
10559 #: ../src/guestfs-actions.pod:3679
10563 " guestfs_modprobe (guestfs_h *g,\n"
10564 " const char *modulename);\n"
10569 #: ../src/guestfs-actions.pod:3683 ../fish/guestfish-actions.pod:2699
10570 msgid "This loads a kernel module in the appliance."
10574 #: ../src/guestfs-actions.pod:3685 ../fish/guestfish-actions.pod:2701
10576 "The kernel module must have been whitelisted when libguestfs was built (see "
10577 "C<appliance/kmod.whitelist.in> in the source)."
10581 #: ../src/guestfs-actions.pod:3690
10582 msgid "guestfs_mount"
10586 #: ../src/guestfs-actions.pod:3692
10590 " guestfs_mount (guestfs_h *g,\n"
10591 " const char *device,\n"
10592 " const char *mountpoint);\n"
10597 #: ../src/guestfs-actions.pod:3697 ../fish/guestfish-actions.pod:2708
10599 "Mount a guest disk at a position in the filesystem. Block devices are named "
10600 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
10601 "those block devices contain partitions, they will have the usual names (eg. "
10602 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
10606 #: ../src/guestfs-actions.pod:3703 ../fish/guestfish-actions.pod:2714
10608 "The rules are the same as for L<mount(2)>: A filesystem must first be "
10609 "mounted on C</> before others can be mounted. Other filesystems can only be "
10610 "mounted on directories which already exist."
10614 #: ../src/guestfs-actions.pod:3708 ../fish/guestfish-actions.pod:2719
10616 "The mounted filesystem is writable, if we have sufficient permissions on the "
10617 "underlying device."
10621 #: ../src/guestfs-actions.pod:3711
10623 "B<Important note:> When you use this call, the filesystem options C<sync> "
10624 "and C<noatime> are set implicitly. This was originally done because we "
10625 "thought it would improve reliability, but it turns out that I<-o sync> has a "
10626 "very large negative performance impact and negligible effect on "
10627 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
10628 "in any code that needs performance, and instead use C<guestfs_mount_options> "
10629 "(use an empty string for the first parameter if you don't want any options)."
10633 #: ../src/guestfs-actions.pod:3723
10634 msgid "guestfs_mount_loop"
10638 #: ../src/guestfs-actions.pod:3725
10642 " guestfs_mount_loop (guestfs_h *g,\n"
10643 " const char *file,\n"
10644 " const char *mountpoint);\n"
10649 #: ../src/guestfs-actions.pod:3730 ../fish/guestfish-actions.pod:2736
10651 "This command lets you mount C<file> (a filesystem image in a file) on a "
10652 "mount point. It is entirely equivalent to the command C<mount -o loop file "
10657 #: ../src/guestfs-actions.pod:3736
10658 msgid "guestfs_mount_options"
10662 #: ../src/guestfs-actions.pod:3738
10666 " guestfs_mount_options (guestfs_h *g,\n"
10667 " const char *options,\n"
10668 " const char *device,\n"
10669 " const char *mountpoint);\n"
10674 #: ../src/guestfs-actions.pod:3744
10676 "This is the same as the C<guestfs_mount> command, but it allows you to set "
10677 "the mount options as for the L<mount(8)> I<-o> flag."
10681 #: ../src/guestfs-actions.pod:3748 ../fish/guestfish-actions.pod:2748
10683 "If the C<options> parameter is an empty string, then no options are passed "
10684 "(all options default to whatever the filesystem uses)."
10688 #: ../src/guestfs-actions.pod:3754
10689 msgid "guestfs_mount_ro"
10693 #: ../src/guestfs-actions.pod:3756
10697 " guestfs_mount_ro (guestfs_h *g,\n"
10698 " const char *device,\n"
10699 " const char *mountpoint);\n"
10704 #: ../src/guestfs-actions.pod:3761
10706 "This is the same as the C<guestfs_mount> command, but it mounts the "
10707 "filesystem with the read-only (I<-o ro>) flag."
10711 #: ../src/guestfs-actions.pod:3766
10712 msgid "guestfs_mount_vfs"
10716 #: ../src/guestfs-actions.pod:3768
10720 " guestfs_mount_vfs (guestfs_h *g,\n"
10721 " const char *options,\n"
10722 " const char *vfstype,\n"
10723 " const char *device,\n"
10724 " const char *mountpoint);\n"
10729 #: ../src/guestfs-actions.pod:3775
10731 "This is the same as the C<guestfs_mount> command, but it allows you to set "
10732 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
10737 #: ../src/guestfs-actions.pod:3781
10738 msgid "guestfs_mountpoints"
10742 #: ../src/guestfs-actions.pod:3783
10746 " guestfs_mountpoints (guestfs_h *g);\n"
10751 #: ../src/guestfs-actions.pod:3786
10753 "This call is similar to C<guestfs_mounts>. That call returns a list of "
10754 "devices. This one returns a hash table (map) of device name to directory "
10755 "where the device is mounted."
10759 #: ../src/guestfs-actions.pod:3796
10760 msgid "guestfs_mounts"
10764 #: ../src/guestfs-actions.pod:3798
10768 " guestfs_mounts (guestfs_h *g);\n"
10773 #: ../src/guestfs-actions.pod:3801 ../fish/guestfish-actions.pod:2779
10775 "This returns the list of currently mounted filesystems. It returns the list "
10776 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
10780 #: ../src/guestfs-actions.pod:3804 ../fish/guestfish-actions.pod:2782
10781 msgid "Some internal mounts are not shown."
10785 #: ../src/guestfs-actions.pod:3806
10786 msgid "See also: C<guestfs_mountpoints>"
10790 #: ../src/guestfs-actions.pod:3812
10795 #: ../src/guestfs-actions.pod:3814
10799 " guestfs_mv (guestfs_h *g,\n"
10800 " const char *src,\n"
10801 " const char *dest);\n"
10806 #: ../src/guestfs-actions.pod:3819 ../fish/guestfish-actions.pod:2790
10808 "This moves a file from C<src> to C<dest> where C<dest> is either a "
10809 "destination filename or destination directory."
10813 #: ../src/guestfs-actions.pod:3824
10814 msgid "guestfs_ntfs_3g_probe"
10818 #: ../src/guestfs-actions.pod:3826
10822 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
10824 " const char *device);\n"
10829 #: ../src/guestfs-actions.pod:3831 ../fish/guestfish-actions.pod:2797
10831 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
10832 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
10833 "write, and some cannot be mounted at all)."
10837 #: ../src/guestfs-actions.pod:3835 ../fish/guestfish-actions.pod:2801
10839 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
10840 "can be mounted read-write. Set it to false if you want to test if the "
10841 "volume can be mounted read-only."
10845 #: ../src/guestfs-actions.pod:3839 ../fish/guestfish-actions.pod:2805
10847 "The return value is an integer which C<0> if the operation would succeed, or "
10848 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
10852 #: ../src/guestfs-actions.pod:3845
10853 msgid "guestfs_ntfsresize"
10857 #: ../src/guestfs-actions.pod:3847
10861 " guestfs_ntfsresize (guestfs_h *g,\n"
10862 " const char *device);\n"
10867 #: ../src/guestfs-actions.pod:3851 ../fish/guestfish-actions.pod:2813
10869 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
10870 "size of the underlying device. See also L<ntfsresize(8)>."
10874 #: ../src/guestfs-actions.pod:3857
10875 msgid "guestfs_ntfsresize_size"
10879 #: ../src/guestfs-actions.pod:3859
10883 " guestfs_ntfsresize_size (guestfs_h *g,\n"
10884 " const char *device,\n"
10885 " int64_t size);\n"
10890 #: ../src/guestfs-actions.pod:3864
10892 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
10893 "to specify the new size (in bytes) explicitly."
10897 #: ../src/guestfs-actions.pod:3869
10898 msgid "guestfs_part_add"
10902 #: ../src/guestfs-actions.pod:3871
10906 " guestfs_part_add (guestfs_h *g,\n"
10907 " const char *device,\n"
10908 " const char *prlogex,\n"
10909 " int64_t startsect,\n"
10910 " int64_t endsect);\n"
10915 #: ../src/guestfs-actions.pod:3878
10917 "This command adds a partition to C<device>. If there is no partition table "
10918 "on the device, call C<guestfs_part_init> first."
10922 #: ../src/guestfs-actions.pod:3881 ../fish/guestfish-actions.pod:2831
10924 "The C<prlogex> parameter is the type of partition. Normally you should pass "
10925 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
10926 "C<logical>) and C<e> (or C<extended>) partition types."
10930 #: ../src/guestfs-actions.pod:3886 ../fish/guestfish-actions.pod:2836
10932 "C<startsect> and C<endsect> are the start and end of the partition in "
10933 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
10934 "from the end of the disk (C<-1> is the last sector)."
10938 #: ../src/guestfs-actions.pod:3890
10940 "Creating a partition which covers the whole disk is not so easy. Use "
10941 "C<guestfs_part_disk> to do that."
10945 #: ../src/guestfs-actions.pod:3895
10946 msgid "guestfs_part_del"
10950 #: ../src/guestfs-actions.pod:3897
10954 " guestfs_part_del (guestfs_h *g,\n"
10955 " const char *device,\n"
10961 #: ../src/guestfs-actions.pod:3902 ../fish/guestfish-actions.pod:2847
10962 msgid "This command deletes the partition numbered C<partnum> on C<device>."
10966 #: ../src/guestfs-actions.pod:3904 ../fish/guestfish-actions.pod:2849
10968 "Note that in the case of MBR partitioning, deleting an extended partition "
10969 "also deletes any logical partitions it contains."
10973 #: ../src/guestfs-actions.pod:3910
10974 msgid "guestfs_part_disk"
10978 #: ../src/guestfs-actions.pod:3912
10982 " guestfs_part_disk (guestfs_h *g,\n"
10983 " const char *device,\n"
10984 " const char *parttype);\n"
10989 #: ../src/guestfs-actions.pod:3917
10991 "This command is simply a combination of C<guestfs_part_init> followed by "
10992 "C<guestfs_part_add> to create a single primary partition covering the whole "
10997 #: ../src/guestfs-actions.pod:3921
10999 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
11000 "possible values are described in C<guestfs_part_init>."
11004 #: ../src/guestfs-actions.pod:3929
11005 msgid "guestfs_part_get_bootable"
11009 #: ../src/guestfs-actions.pod:3931
11013 " guestfs_part_get_bootable (guestfs_h *g,\n"
11014 " const char *device,\n"
11020 #: ../src/guestfs-actions.pod:3936 ../fish/guestfish-actions.pod:2871
11022 "This command returns true if the partition C<partnum> on C<device> has the "
11023 "bootable flag set."
11027 #: ../src/guestfs-actions.pod:3939
11028 msgid "See also C<guestfs_part_set_bootable>."
11032 #: ../src/guestfs-actions.pod:3943
11033 msgid "guestfs_part_get_mbr_id"
11037 #: ../src/guestfs-actions.pod:3945
11041 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
11042 " const char *device,\n"
11048 #: ../src/guestfs-actions.pod:3950 ../fish/guestfish-actions.pod:2880
11050 "Returns the MBR type byte (also known as the ID byte) from the numbered "
11051 "partition C<partnum>."
11055 #: ../src/guestfs-actions.pod:3953 ../src/guestfs-actions.pod:4120
11057 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
11058 "undefined results for other partition table types (see "
11059 "C<guestfs_part_get_parttype>)."
11063 #: ../src/guestfs-actions.pod:3959
11064 msgid "guestfs_part_get_parttype"
11068 #: ../src/guestfs-actions.pod:3961
11072 " guestfs_part_get_parttype (guestfs_h *g,\n"
11073 " const char *device);\n"
11078 #: ../src/guestfs-actions.pod:3965 ../fish/guestfish-actions.pod:2891
11080 "This command examines the partition table on C<device> and returns the "
11081 "partition table type (format) being used."
11085 #: ../src/guestfs-actions.pod:3968
11087 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
11088 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
11089 "possible, although unusual. See C<guestfs_part_init> for a full list."
11093 #: ../src/guestfs-actions.pod:3976
11094 msgid "guestfs_part_init"
11098 #: ../src/guestfs-actions.pod:3978
11102 " guestfs_part_init (guestfs_h *g,\n"
11103 " const char *device,\n"
11104 " const char *parttype);\n"
11109 #: ../src/guestfs-actions.pod:3983 ../fish/guestfish-actions.pod:2903
11111 "This creates an empty partition table on C<device> of one of the partition "
11112 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
11113 "(for large disks)."
11117 #: ../src/guestfs-actions.pod:3987
11119 "Initially there are no partitions. Following this, you should call "
11120 "C<guestfs_part_add> for each partition required."
11124 #: ../src/guestfs-actions.pod:3990 ../fish/guestfish-actions.pod:2910
11125 msgid "Possible values for C<parttype> are:"
11129 #: ../src/guestfs-actions.pod:3994 ../fish/guestfish-actions.pod:2914
11130 msgid "B<efi> | B<gpt>"
11134 #: ../src/guestfs-actions.pod:3996 ../fish/guestfish-actions.pod:2916
11135 msgid "Intel EFI / GPT partition table."
11139 #: ../src/guestfs-actions.pod:3998 ../fish/guestfish-actions.pod:2918
11141 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
11142 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
11143 "the C<mbr> format."
11147 #: ../src/guestfs-actions.pod:4002 ../fish/guestfish-actions.pod:2922
11148 msgid "B<mbr> | B<msdos>"
11152 #: ../src/guestfs-actions.pod:4004 ../fish/guestfish-actions.pod:2924
11154 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
11155 "Windows. This partition type will B<only> work for device sizes up to 2 "
11156 "TB. For large disks we recommend using C<gpt>."
11160 #: ../src/guestfs-actions.pod:4011 ../fish/guestfish-actions.pod:2931
11162 "Other partition table types that may work but are not supported include:"
11166 #: ../src/guestfs-actions.pod:4016 ../fish/guestfish-actions.pod:2936
11171 #: ../src/guestfs-actions.pod:4018 ../fish/guestfish-actions.pod:2938
11172 msgid "AIX disk labels."
11176 #: ../src/guestfs-actions.pod:4020 ../fish/guestfish-actions.pod:2940
11177 msgid "B<amiga> | B<rdb>"
11181 #: ../src/guestfs-actions.pod:4022 ../fish/guestfish-actions.pod:2942
11182 msgid "Amiga \"Rigid Disk Block\" format."
11186 #: ../src/guestfs-actions.pod:4024 ../fish/guestfish-actions.pod:2944
11191 #: ../src/guestfs-actions.pod:4026 ../fish/guestfish-actions.pod:2946
11192 msgid "BSD disk labels."
11196 #: ../src/guestfs-actions.pod:4028 ../fish/guestfish-actions.pod:2948
11201 #: ../src/guestfs-actions.pod:4030 ../fish/guestfish-actions.pod:2950
11202 msgid "DASD, used on IBM mainframes."
11206 #: ../src/guestfs-actions.pod:4032 ../fish/guestfish-actions.pod:2952
11211 #: ../src/guestfs-actions.pod:4034 ../fish/guestfish-actions.pod:2954
11212 msgid "MIPS/SGI volumes."
11216 #: ../src/guestfs-actions.pod:4036 ../fish/guestfish-actions.pod:2956
11221 #: ../src/guestfs-actions.pod:4038 ../fish/guestfish-actions.pod:2958
11222 msgid "Old Mac partition format. Modern Macs use C<gpt>."
11226 #: ../src/guestfs-actions.pod:4040 ../fish/guestfish-actions.pod:2960
11231 #: ../src/guestfs-actions.pod:4042 ../fish/guestfish-actions.pod:2962
11232 msgid "NEC PC-98 format, common in Japan apparently."
11236 #: ../src/guestfs-actions.pod:4044 ../fish/guestfish-actions.pod:2964
11241 #: ../src/guestfs-actions.pod:4046 ../fish/guestfish-actions.pod:2966
11242 msgid "Sun disk labels."
11246 #: ../src/guestfs-actions.pod:4052
11247 msgid "guestfs_part_list"
11251 #: ../src/guestfs-actions.pod:4054
11254 " struct guestfs_partition_list *\n"
11255 " guestfs_part_list (guestfs_h *g,\n"
11256 " const char *device);\n"
11261 #: ../src/guestfs-actions.pod:4058 ../fish/guestfish-actions.pod:2974
11263 "This command parses the partition table on C<device> and returns the list of "
11264 "partitions found."
11268 #: ../src/guestfs-actions.pod:4061 ../fish/guestfish-actions.pod:2977
11269 msgid "The fields in the returned structure are:"
11273 #: ../src/guestfs-actions.pod:4065 ../fish/guestfish-actions.pod:2981
11274 msgid "B<part_num>"
11278 #: ../src/guestfs-actions.pod:4067 ../fish/guestfish-actions.pod:2983
11279 msgid "Partition number, counting from 1."
11283 #: ../src/guestfs-actions.pod:4069 ../fish/guestfish-actions.pod:2985
11284 msgid "B<part_start>"
11288 #: ../src/guestfs-actions.pod:4071
11290 "Start of the partition I<in bytes>. To get sectors you have to divide by "
11291 "the device's sector size, see C<guestfs_blockdev_getss>."
11295 #: ../src/guestfs-actions.pod:4074 ../fish/guestfish-actions.pod:2990
11296 msgid "B<part_end>"
11300 #: ../src/guestfs-actions.pod:4076 ../fish/guestfish-actions.pod:2992
11301 msgid "End of the partition in bytes."
11305 #: ../src/guestfs-actions.pod:4078 ../fish/guestfish-actions.pod:2994
11306 msgid "B<part_size>"
11310 #: ../src/guestfs-actions.pod:4080 ../fish/guestfish-actions.pod:2996
11311 msgid "Size of the partition in bytes."
11315 #: ../src/guestfs-actions.pod:4084
11317 "This function returns a C<struct guestfs_partition_list *> (see E<lt>guestfs-"
11318 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
11319 "C<guestfs_free_partition_list> after use>."
11323 #: ../src/guestfs-actions.pod:4089
11324 msgid "guestfs_part_set_bootable"
11328 #: ../src/guestfs-actions.pod:4091
11332 " guestfs_part_set_bootable (guestfs_h *g,\n"
11333 " const char *device,\n"
11335 " int bootable);\n"
11340 #: ../src/guestfs-actions.pod:4097 ../fish/guestfish-actions.pod:3004
11342 "This sets the bootable flag on partition numbered C<partnum> on device "
11343 "C<device>. Note that partitions are numbered from 1."
11347 #: ../src/guestfs-actions.pod:4100 ../fish/guestfish-actions.pod:3007
11349 "The bootable flag is used by some operating systems (notably Windows) to "
11350 "determine which partition to boot from. It is by no means universally "
11355 #: ../src/guestfs-actions.pod:4106
11356 msgid "guestfs_part_set_mbr_id"
11360 #: ../src/guestfs-actions.pod:4108
11364 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
11365 " const char *device,\n"
11372 #: ../src/guestfs-actions.pod:4114 ../fish/guestfish-actions.pod:3015
11374 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
11375 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
11376 "documentation are in fact hexadecimal numbers, but usually documented "
11377 "without any leading \"0x\" which might be confusing."
11381 #: ../src/guestfs-actions.pod:4126
11382 msgid "guestfs_part_set_name"
11386 #: ../src/guestfs-actions.pod:4128
11390 " guestfs_part_set_name (guestfs_h *g,\n"
11391 " const char *device,\n"
11393 " const char *name);\n"
11398 #: ../src/guestfs-actions.pod:4134 ../fish/guestfish-actions.pod:3029
11400 "This sets the partition name on partition numbered C<partnum> on device "
11401 "C<device>. Note that partitions are numbered from 1."
11405 #: ../src/guestfs-actions.pod:4137 ../fish/guestfish-actions.pod:3032
11407 "The partition name can only be set on certain types of partition table. "
11408 "This works on C<gpt> but not on C<mbr> partitions."
11412 #: ../src/guestfs-actions.pod:4142
11413 msgid "guestfs_part_to_dev"
11417 #: ../src/guestfs-actions.pod:4144
11421 " guestfs_part_to_dev (guestfs_h *g,\n"
11422 " const char *partition);\n"
11427 #: ../src/guestfs-actions.pod:4148 ../fish/guestfish-actions.pod:3039
11429 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
11430 "partition number, returning the device name (eg. \"/dev/sdb\")."
11434 #: ../src/guestfs-actions.pod:4152
11436 "The named partition must exist, for example as a string returned from "
11437 "C<guestfs_list_partitions>."
11441 #: ../src/guestfs-actions.pod:4158
11442 msgid "guestfs_ping_daemon"
11446 #: ../src/guestfs-actions.pod:4160
11450 " guestfs_ping_daemon (guestfs_h *g);\n"
11455 #: ../src/guestfs-actions.pod:4163 ../fish/guestfish-actions.pod:3050
11457 "This is a test probe into the guestfs daemon running inside the qemu "
11458 "subprocess. Calling this function checks that the daemon responds to the "
11459 "ping message, without affecting the daemon or attached block device(s) in "
11464 #: ../src/guestfs-actions.pod:4170
11465 msgid "guestfs_pread"
11469 #: ../src/guestfs-actions.pod:4172
11473 " guestfs_pread (guestfs_h *g,\n"
11474 " const char *path,\n"
11476 " int64_t offset,\n"
11477 " size_t *size_r);\n"
11482 #: ../src/guestfs-actions.pod:4179 ../fish/guestfish-actions.pod:3059
11484 "This command lets you read part of a file. It reads C<count> bytes of the "
11485 "file, starting at C<offset>, from file C<path>."
11489 #: ../src/guestfs-actions.pod:4182 ../src/guestfs-actions.pod:4206
11490 #: ../fish/guestfish-actions.pod:3062 ../fish/guestfish-actions.pod:3077
11492 "This may read fewer bytes than requested. For further details see the "
11493 "L<pread(2)> system call."
11497 #: ../src/guestfs-actions.pod:4185
11498 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
11502 #: ../src/guestfs-actions.pod:4194
11503 msgid "guestfs_pread_device"
11507 #: ../src/guestfs-actions.pod:4196
11511 " guestfs_pread_device (guestfs_h *g,\n"
11512 " const char *device,\n"
11514 " int64_t offset,\n"
11515 " size_t *size_r);\n"
11520 #: ../src/guestfs-actions.pod:4203 ../fish/guestfish-actions.pod:3074
11522 "This command lets you read part of a file. It reads C<count> bytes of "
11523 "C<device>, starting at C<offset>."
11527 #: ../src/guestfs-actions.pod:4209
11528 msgid "See also C<guestfs_pread>."
11532 #: ../src/guestfs-actions.pod:4218
11533 msgid "guestfs_pvcreate"
11537 #: ../src/guestfs-actions.pod:4220
11541 " guestfs_pvcreate (guestfs_h *g,\n"
11542 " const char *device);\n"
11547 #: ../src/guestfs-actions.pod:4224 ../fish/guestfish-actions.pod:3089
11549 "This creates an LVM physical volume on the named C<device>, where C<device> "
11550 "should usually be a partition name such as C</dev/sda1>."
11554 #: ../src/guestfs-actions.pod:4230
11555 msgid "guestfs_pvremove"
11559 #: ../src/guestfs-actions.pod:4232
11563 " guestfs_pvremove (guestfs_h *g,\n"
11564 " const char *device);\n"
11569 #: ../src/guestfs-actions.pod:4236 ../fish/guestfish-actions.pod:3097
11571 "This wipes a physical volume C<device> so that LVM will no longer recognise "
11576 #: ../src/guestfs-actions.pod:4239 ../fish/guestfish-actions.pod:3100
11578 "The implementation uses the C<pvremove> command which refuses to wipe "
11579 "physical volumes that contain any volume groups, so you have to remove those "
11584 #: ../src/guestfs-actions.pod:4245
11585 msgid "guestfs_pvresize"
11589 #: ../src/guestfs-actions.pod:4247
11593 " guestfs_pvresize (guestfs_h *g,\n"
11594 " const char *device);\n"
11599 #: ../src/guestfs-actions.pod:4251 ../fish/guestfish-actions.pod:3108
11601 "This resizes (expands or shrinks) an existing LVM physical volume to match "
11602 "the new size of the underlying device."
11606 #: ../src/guestfs-actions.pod:4256
11607 msgid "guestfs_pvresize_size"
11611 #: ../src/guestfs-actions.pod:4258
11615 " guestfs_pvresize_size (guestfs_h *g,\n"
11616 " const char *device,\n"
11617 " int64_t size);\n"
11622 #: ../src/guestfs-actions.pod:4263
11624 "This command is the same as C<guestfs_pvresize> except that it allows you to "
11625 "specify the new size (in bytes) explicitly."
11629 #: ../src/guestfs-actions.pod:4268
11630 msgid "guestfs_pvs"
11634 #: ../src/guestfs-actions.pod:4270
11638 " guestfs_pvs (guestfs_h *g);\n"
11643 #: ../src/guestfs-actions.pod:4273 ../fish/guestfish-actions.pod:3122
11645 "List all the physical volumes detected. This is the equivalent of the L<pvs"
11650 #: ../src/guestfs-actions.pod:4276 ../fish/guestfish-actions.pod:3125
11652 "This returns a list of just the device names that contain PVs (eg. C</dev/"
11657 #: ../src/guestfs-actions.pod:4279
11658 msgid "See also C<guestfs_pvs_full>."
11662 #: ../src/guestfs-actions.pod:4285
11663 msgid "guestfs_pvs_full"
11667 #: ../src/guestfs-actions.pod:4287
11670 " struct guestfs_lvm_pv_list *\n"
11671 " guestfs_pvs_full (guestfs_h *g);\n"
11676 #: ../src/guestfs-actions.pod:4290 ../fish/guestfish-actions.pod:3134
11678 "List all the physical volumes detected. This is the equivalent of the L<pvs"
11679 "(8)> command. The \"full\" version includes all fields."
11683 #: ../src/guestfs-actions.pod:4293
11685 "This function returns a C<struct guestfs_lvm_pv_list *> (see E<lt>guestfs-"
11686 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
11687 "C<guestfs_free_lvm_pv_list> after use>."
11691 #: ../src/guestfs-actions.pod:4298
11692 msgid "guestfs_pvuuid"
11696 #: ../src/guestfs-actions.pod:4300
11700 " guestfs_pvuuid (guestfs_h *g,\n"
11701 " const char *device);\n"
11706 #: ../src/guestfs-actions.pod:4304 ../fish/guestfish-actions.pod:3141
11707 msgid "This command returns the UUID of the LVM PV C<device>."
11711 #: ../src/guestfs-actions.pod:4309
11712 msgid "guestfs_pwrite"
11716 #: ../src/guestfs-actions.pod:4311
11720 " guestfs_pwrite (guestfs_h *g,\n"
11721 " const char *path,\n"
11722 " const char *content,\n"
11723 " size_t content_size,\n"
11724 " int64_t offset);\n"
11729 #: ../src/guestfs-actions.pod:4318 ../fish/guestfish-actions.pod:3147
11731 "This command writes to part of a file. It writes the data buffer C<content> "
11732 "to the file C<path> starting at offset C<offset>."
11736 #: ../src/guestfs-actions.pod:4321 ../fish/guestfish-actions.pod:3150
11738 "This command implements the L<pwrite(2)> system call, and like that system "
11739 "call it may not write the full data requested. The return value is the "
11740 "number of bytes that were actually written to the file. This could even be "
11741 "0, although short writes are unlikely for regular files in ordinary "
11746 #: ../src/guestfs-actions.pod:4327
11747 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
11751 #: ../src/guestfs-actions.pod:4334
11752 msgid "guestfs_pwrite_device"
11756 #: ../src/guestfs-actions.pod:4336
11760 " guestfs_pwrite_device (guestfs_h *g,\n"
11761 " const char *device,\n"
11762 " const char *content,\n"
11763 " size_t content_size,\n"
11764 " int64_t offset);\n"
11769 #: ../src/guestfs-actions.pod:4343 ../fish/guestfish-actions.pod:3165
11771 "This command writes to part of a device. It writes the data buffer "
11772 "C<content> to C<device> starting at offset C<offset>."
11776 #: ../src/guestfs-actions.pod:4346 ../fish/guestfish-actions.pod:3168
11778 "This command implements the L<pwrite(2)> system call, and like that system "
11779 "call it may not write the full data requested (although short writes to disk "
11780 "devices and partitions are probably impossible with standard Linux kernels)."
11784 #: ../src/guestfs-actions.pod:4351
11785 msgid "See also C<guestfs_pwrite>."
11789 #: ../src/guestfs-actions.pod:4358
11790 msgid "guestfs_read_file"
11794 #: ../src/guestfs-actions.pod:4360
11798 " guestfs_read_file (guestfs_h *g,\n"
11799 " const char *path,\n"
11800 " size_t *size_r);\n"
11805 #: ../src/guestfs-actions.pod:4365 ../fish/guestfish-actions.pod:3182
11806 msgid "This calls returns the contents of the file C<path> as a buffer."
11810 #: ../src/guestfs-actions.pod:4368
11812 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
11813 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
11814 "function is limited in the total size of file that can be handled."
11818 #: ../src/guestfs-actions.pod:4380
11819 msgid "guestfs_read_lines"
11823 #: ../src/guestfs-actions.pod:4382
11827 " guestfs_read_lines (guestfs_h *g,\n"
11828 " const char *path);\n"
11833 #: ../src/guestfs-actions.pod:4388 ../fish/guestfish-actions.pod:3199
11835 "The file contents are returned as a list of lines. Trailing C<LF> and "
11836 "C<CRLF> character sequences are I<not> returned."
11840 #: ../src/guestfs-actions.pod:4391
11842 "Note that this function cannot correctly handle binary files (specifically, "
11843 "files containing C<\\0> character which is treated as end of line). For "
11844 "those you need to use the C<guestfs_read_file> function which has a more "
11845 "complex interface."
11849 #: ../src/guestfs-actions.pod:4400
11850 msgid "guestfs_readdir"
11854 #: ../src/guestfs-actions.pod:4402
11857 " struct guestfs_dirent_list *\n"
11858 " guestfs_readdir (guestfs_h *g,\n"
11859 " const char *dir);\n"
11864 #: ../src/guestfs-actions.pod:4406 ../fish/guestfish-actions.pod:3211
11865 msgid "This returns the list of directory entries in directory C<dir>."
11869 #: ../src/guestfs-actions.pod:4408 ../fish/guestfish-actions.pod:3213
11871 "All entries in the directory are returned, including C<.> and C<..>. The "
11872 "entries are I<not> sorted, but returned in the same order as the underlying "
11877 #: ../src/guestfs-actions.pod:4412 ../fish/guestfish-actions.pod:3217
11879 "Also this call returns basic file type information about each file. The "
11880 "C<ftyp> field will contain one of the following characters:"
11884 #: ../src/guestfs-actions.pod:4417 ../fish/guestfish-actions.pod:3222
11889 #: ../src/guestfs-actions.pod:4419 ../fish/guestfish-actions.pod:3224
11890 msgid "Block special"
11894 #: ../src/guestfs-actions.pod:4421 ../fish/guestfish-actions.pod:3226
11899 #: ../src/guestfs-actions.pod:4423 ../fish/guestfish-actions.pod:3228
11900 msgid "Char special"
11904 #: ../src/guestfs-actions.pod:4425 ../fish/guestfish-actions.pod:3230
11909 #: ../src/guestfs-actions.pod:4427 ../fish/guestfish-actions.pod:3232
11914 #: ../src/guestfs-actions.pod:4429 ../fish/guestfish-actions.pod:3234
11919 #: ../src/guestfs-actions.pod:4431 ../fish/guestfish-actions.pod:3236
11920 msgid "FIFO (named pipe)"
11924 #: ../src/guestfs-actions.pod:4433 ../fish/guestfish-actions.pod:3238
11929 #: ../src/guestfs-actions.pod:4435 ../fish/guestfish-actions.pod:3240
11930 msgid "Symbolic link"
11934 #: ../src/guestfs-actions.pod:4437 ../fish/guestfish-actions.pod:3242
11939 #: ../src/guestfs-actions.pod:4439 ../fish/guestfish-actions.pod:3244
11940 msgid "Regular file"
11944 #: ../src/guestfs-actions.pod:4441 ../fish/guestfish-actions.pod:3246
11949 #: ../src/guestfs-actions.pod:4443 ../fish/guestfish-actions.pod:3248
11954 #: ../src/guestfs-actions.pod:4445 ../fish/guestfish-actions.pod:3250
11959 #: ../src/guestfs-actions.pod:4447 ../fish/guestfish-actions.pod:3252
11960 msgid "Unknown file type"
11964 #: ../src/guestfs-actions.pod:4449 ../fish/guestfish-actions.pod:3254
11969 #: ../src/guestfs-actions.pod:4451 ../fish/guestfish-actions.pod:3256
11971 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
11975 #: ../src/guestfs-actions.pod:4456
11977 "This function is primarily intended for use by programs. To get a simple "
11978 "list of names, use C<guestfs_ls>. To get a printable directory for human "
11979 "consumption, use C<guestfs_ll>."
11983 #: ../src/guestfs-actions.pod:4460
11985 "This function returns a C<struct guestfs_dirent_list *> (see E<lt>guestfs-"
11986 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
11987 "C<guestfs_free_dirent_list> after use>."
11991 #: ../src/guestfs-actions.pod:4465
11992 msgid "guestfs_readlink"
11996 #: ../src/guestfs-actions.pod:4467
12000 " guestfs_readlink (guestfs_h *g,\n"
12001 " const char *path);\n"
12006 #: ../src/guestfs-actions.pod:4471 ../fish/guestfish-actions.pod:3269
12007 msgid "This command reads the target of a symbolic link."
12011 #: ../src/guestfs-actions.pod:4476
12012 msgid "guestfs_readlinklist"
12016 #: ../src/guestfs-actions.pod:4478
12020 " guestfs_readlinklist (guestfs_h *g,\n"
12021 " const char *path,\n"
12022 " char *const *names);\n"
12027 #: ../src/guestfs-actions.pod:4483 ../fish/guestfish-actions.pod:3275
12029 "This call allows you to do a C<readlink> operation on multiple files, where "
12030 "all files are in the directory C<path>. C<names> is the list of files from "
12035 #: ../src/guestfs-actions.pod:4487 ../fish/guestfish-actions.pod:3279
12037 "On return you get a list of strings, with a one-to-one correspondence to the "
12038 "C<names> list. Each string is the value of the symbolic link."
12042 #: ../src/guestfs-actions.pod:4491 ../fish/guestfish-actions.pod:3283
12044 "If the C<readlink(2)> operation fails on any name, then the corresponding "
12045 "result string is the empty string C<\"\">. However the whole operation is "
12046 "completed even if there were C<readlink(2)> errors, and so you can call this "
12047 "function with names where you don't know if they are symbolic links already "
12048 "(albeit slightly less efficient)."
12052 #: ../src/guestfs-actions.pod:4498 ../fish/guestfish-actions.pod:3290
12054 "This call is intended for programs that want to efficiently list a directory "
12055 "contents without making many round-trips. Very long directory listings "
12056 "might cause the protocol message size to be exceeded, causing this call to "
12057 "fail. The caller must split up such requests into smaller groups of names."
12061 #: ../src/guestfs-actions.pod:4509
12062 msgid "guestfs_realpath"
12066 #: ../src/guestfs-actions.pod:4511
12070 " guestfs_realpath (guestfs_h *g,\n"
12071 " const char *path);\n"
12076 #: ../src/guestfs-actions.pod:4515 ../fish/guestfish-actions.pod:3301
12078 "Return the canonicalized absolute pathname of C<path>. The returned path "
12079 "has no C<.>, C<..> or symbolic link path elements."
12083 #: ../src/guestfs-actions.pod:4521
12084 msgid "guestfs_removexattr"
12088 #: ../src/guestfs-actions.pod:4523
12092 " guestfs_removexattr (guestfs_h *g,\n"
12093 " const char *xattr,\n"
12094 " const char *path);\n"
12099 #: ../src/guestfs-actions.pod:4528 ../fish/guestfish-actions.pod:3308
12101 "This call removes the extended attribute named C<xattr> of the file C<path>."
12105 #: ../src/guestfs-actions.pod:4531
12106 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
12110 #: ../src/guestfs-actions.pod:4535
12111 msgid "guestfs_resize2fs"
12115 #: ../src/guestfs-actions.pod:4537
12119 " guestfs_resize2fs (guestfs_h *g,\n"
12120 " const char *device);\n"
12125 #: ../src/guestfs-actions.pod:4541 ../fish/guestfish-actions.pod:3317
12127 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
12128 "underlying device."
12132 #: ../src/guestfs-actions.pod:4544
12134 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
12135 "C<device> before calling this command. For unknown reasons C<resize2fs> "
12136 "sometimes gives an error about this and sometimes not. In any case, it is "
12137 "always safe to call C<guestfs_e2fsck_f> before calling this function."
12141 #: ../src/guestfs-actions.pod:4552
12142 msgid "guestfs_resize2fs_size"
12146 #: ../src/guestfs-actions.pod:4554
12150 " guestfs_resize2fs_size (guestfs_h *g,\n"
12151 " const char *device,\n"
12152 " int64_t size);\n"
12157 #: ../src/guestfs-actions.pod:4559
12159 "This command is the same as C<guestfs_resize2fs> except that it allows you "
12160 "to specify the new size (in bytes) explicitly."
12164 #: ../src/guestfs-actions.pod:4564
12169 #: ../src/guestfs-actions.pod:4566
12173 " guestfs_rm (guestfs_h *g,\n"
12174 " const char *path);\n"
12179 #: ../src/guestfs-actions.pod:4570 ../fish/guestfish-actions.pod:3337
12180 msgid "Remove the single file C<path>."
12184 #: ../src/guestfs-actions.pod:4574
12185 msgid "guestfs_rm_rf"
12189 #: ../src/guestfs-actions.pod:4576
12193 " guestfs_rm_rf (guestfs_h *g,\n"
12194 " const char *path);\n"
12199 #: ../src/guestfs-actions.pod:4580 ../fish/guestfish-actions.pod:3343
12201 "Remove the file or directory C<path>, recursively removing the contents if "
12202 "its a directory. This is like the C<rm -rf> shell command."
12206 #: ../src/guestfs-actions.pod:4586
12207 msgid "guestfs_rmdir"
12211 #: ../src/guestfs-actions.pod:4588
12215 " guestfs_rmdir (guestfs_h *g,\n"
12216 " const char *path);\n"
12221 #: ../src/guestfs-actions.pod:4592 ../fish/guestfish-actions.pod:3351
12222 msgid "Remove the single directory C<path>."
12226 #: ../src/guestfs-actions.pod:4596
12227 msgid "guestfs_rmmountpoint"
12231 #: ../src/guestfs-actions.pod:4598
12235 " guestfs_rmmountpoint (guestfs_h *g,\n"
12236 " const char *exemptpath);\n"
12241 #: ../src/guestfs-actions.pod:4602
12243 "This calls removes a mountpoint that was previously created with "
12244 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
12248 #: ../src/guestfs-actions.pod:4608
12249 msgid "guestfs_scrub_device"
12253 #: ../src/guestfs-actions.pod:4610
12257 " guestfs_scrub_device (guestfs_h *g,\n"
12258 " const char *device);\n"
12263 #: ../src/guestfs-actions.pod:4614 ../fish/guestfish-actions.pod:3365
12265 "This command writes patterns over C<device> to make data retrieval more "
12270 #: ../src/guestfs-actions.pod:4617 ../src/guestfs-actions.pod:4636
12271 #: ../src/guestfs-actions.pod:4653 ../fish/guestfish-actions.pod:3368
12272 #: ../fish/guestfish-actions.pod:3383 ../fish/guestfish-actions.pod:3396
12274 "It is an interface to the L<scrub(1)> program. See that manual page for "
12279 #: ../src/guestfs-actions.pod:4625
12280 msgid "guestfs_scrub_file"
12284 #: ../src/guestfs-actions.pod:4627
12288 " guestfs_scrub_file (guestfs_h *g,\n"
12289 " const char *file);\n"
12294 #: ../src/guestfs-actions.pod:4631 ../fish/guestfish-actions.pod:3378
12296 "This command writes patterns over a file to make data retrieval more "
12301 #: ../src/guestfs-actions.pod:4634 ../fish/guestfish-actions.pod:3381
12302 msgid "The file is I<removed> after scrubbing."
12306 #: ../src/guestfs-actions.pod:4641
12307 msgid "guestfs_scrub_freespace"
12311 #: ../src/guestfs-actions.pod:4643
12315 " guestfs_scrub_freespace (guestfs_h *g,\n"
12316 " const char *dir);\n"
12321 #: ../src/guestfs-actions.pod:4647
12323 "This command creates the directory C<dir> and then fills it with files until "
12324 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
12325 "and deletes them. The intention is to scrub any free space on the partition "
12326 "containing C<dir>."
12330 #: ../src/guestfs-actions.pod:4658
12331 msgid "guestfs_set_append"
12335 #: ../src/guestfs-actions.pod:4660
12339 " guestfs_set_append (guestfs_h *g,\n"
12340 " const char *append);\n"
12345 #: ../src/guestfs-actions.pod:4664 ../fish/guestfish-actions.pod:3405
12347 "This function is used to add additional options to the guest kernel command "
12352 #: ../src/guestfs-actions.pod:4667 ../fish/guestfish-actions.pod:3408
12354 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
12355 "environment variable."
12359 #: ../src/guestfs-actions.pod:4670 ../fish/guestfish-actions.pod:3411
12361 "Setting C<append> to C<NULL> means I<no> additional options are passed "
12362 "(libguestfs always adds a few of its own)."
12366 #: ../src/guestfs-actions.pod:4675
12367 msgid "guestfs_set_autosync"
12371 #: ../src/guestfs-actions.pod:4677
12375 " guestfs_set_autosync (guestfs_h *g,\n"
12376 " int autosync);\n"
12381 #: ../src/guestfs-actions.pod:4681
12383 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
12384 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
12385 "the handle is closed (also if the program exits without closing handles)."
12389 #: ../src/guestfs-actions.pod:4686 ../fish/guestfish-actions.pod:3425
12391 "This is enabled by default (since libguestfs 1.5.24, previously it was "
12392 "disabled by default)."
12396 #: ../src/guestfs-actions.pod:4691
12397 msgid "guestfs_set_direct"
12401 #: ../src/guestfs-actions.pod:4693
12405 " guestfs_set_direct (guestfs_h *g,\n"
12411 #: ../src/guestfs-actions.pod:4697 ../fish/guestfish-actions.pod:3434
12413 "If the direct appliance mode flag is enabled, then stdin and stdout are "
12414 "passed directly through to the appliance once it is launched."
12418 #: ../src/guestfs-actions.pod:4701
12420 "One consequence of this is that log messages aren't caught by the library "
12421 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
12426 #: ../src/guestfs-actions.pod:4705 ../fish/guestfish-actions.pod:3442
12427 msgid "You probably don't want to use this unless you know what you are doing."
12431 #: ../src/guestfs-actions.pod:4708 ../fish/guestfish-actions.pod:3445
12432 msgid "The default is disabled."
12436 #: ../src/guestfs-actions.pod:4712
12437 msgid "guestfs_set_e2label"
12441 #: ../src/guestfs-actions.pod:4714
12445 " guestfs_set_e2label (guestfs_h *g,\n"
12446 " const char *device,\n"
12447 " const char *label);\n"
12452 #: ../src/guestfs-actions.pod:4719 ../fish/guestfish-actions.pod:3451
12454 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
12455 "C<label>. Filesystem labels are limited to 16 characters."
12459 #: ../src/guestfs-actions.pod:4723
12461 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
12462 "the existing label on a filesystem."
12466 #: ../src/guestfs-actions.pod:4728
12467 msgid "guestfs_set_e2uuid"
12471 #: ../src/guestfs-actions.pod:4730
12475 " guestfs_set_e2uuid (guestfs_h *g,\n"
12476 " const char *device,\n"
12477 " const char *uuid);\n"
12482 #: ../src/guestfs-actions.pod:4735 ../fish/guestfish-actions.pod:3462
12484 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
12485 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
12486 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
12490 #: ../src/guestfs-actions.pod:4740
12492 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
12493 "the existing UUID of a filesystem."
12497 #: ../src/guestfs-actions.pod:4745
12498 msgid "guestfs_set_memsize"
12502 #: ../src/guestfs-actions.pod:4747
12506 " guestfs_set_memsize (guestfs_h *g,\n"
12512 #: ../src/guestfs-actions.pod:4751
12514 "This sets the memory size in megabytes allocated to the qemu subprocess. "
12515 "This only has any effect if called before C<guestfs_launch>."
12519 #: ../src/guestfs-actions.pod:4755 ../fish/guestfish-actions.pod:3480
12521 "You can also change this by setting the environment variable "
12522 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
12526 #: ../src/guestfs-actions.pod:4764
12527 msgid "guestfs_set_network"
12531 #: ../src/guestfs-actions.pod:4766
12535 " guestfs_set_network (guestfs_h *g,\n"
12541 #: ../src/guestfs-actions.pod:4770 ../fish/guestfish-actions.pod:3493
12543 "If C<network> is true, then the network is enabled in the libguestfs "
12544 "appliance. The default is false."
12548 #: ../src/guestfs-actions.pod:4773 ../fish/guestfish-actions.pod:3496
12550 "This affects whether commands are able to access the network (see L<guestfs"
12551 "(3)/RUNNING COMMANDS>)."
12555 #: ../src/guestfs-actions.pod:4776
12557 "You must call this before calling C<guestfs_launch>, otherwise it has no "
12562 #: ../src/guestfs-actions.pod:4781
12563 msgid "guestfs_set_path"
12567 #: ../src/guestfs-actions.pod:4783
12571 " guestfs_set_path (guestfs_h *g,\n"
12572 " const char *searchpath);\n"
12577 #: ../src/guestfs-actions.pod:4787 ../fish/guestfish-actions.pod:3508
12578 msgid "Set the path that libguestfs searches for kernel and initrd.img."
12582 #: ../src/guestfs-actions.pod:4789 ../fish/guestfish-actions.pod:3510
12584 "The default is C<$libdir/guestfs> unless overridden by setting "
12585 "C<LIBGUESTFS_PATH> environment variable."
12589 #: ../src/guestfs-actions.pod:4792 ../fish/guestfish-actions.pod:3513
12590 msgid "Setting C<path> to C<NULL> restores the default path."
12594 #: ../src/guestfs-actions.pod:4796
12595 msgid "guestfs_set_qemu"
12599 #: ../src/guestfs-actions.pod:4798
12603 " guestfs_set_qemu (guestfs_h *g,\n"
12604 " const char *qemu);\n"
12609 #: ../src/guestfs-actions.pod:4802 ../fish/guestfish-actions.pod:3521
12610 msgid "Set the qemu binary that we will use."
12614 #: ../src/guestfs-actions.pod:4804 ../fish/guestfish-actions.pod:3523
12616 "The default is chosen when the library was compiled by the configure script."
12620 #: ../src/guestfs-actions.pod:4807 ../fish/guestfish-actions.pod:3526
12622 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
12627 #: ../src/guestfs-actions.pod:4810 ../fish/guestfish-actions.pod:3529
12628 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
12632 #: ../src/guestfs-actions.pod:4812 ../fish/guestfish-actions.pod:3531
12634 "Note that you should call this function as early as possible after creating "
12635 "the handle. This is because some pre-launch operations depend on testing "
12636 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
12637 "don't retest features, and so you might see inconsistent results. Using the "
12638 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
12639 "the qemu binary at the same time as the handle is created."
12643 #: ../src/guestfs-actions.pod:4822
12644 msgid "guestfs_set_recovery_proc"
12648 #: ../src/guestfs-actions.pod:4824
12652 " guestfs_set_recovery_proc (guestfs_h *g,\n"
12653 " int recoveryproc);\n"
12658 #: ../src/guestfs-actions.pod:4828
12660 "If this is called with the parameter C<false> then C<guestfs_launch> does "
12661 "not create a recovery process. The purpose of the recovery process is to "
12662 "stop runaway qemu processes in the case where the main program aborts "
12667 #: ../src/guestfs-actions.pod:4833
12669 "This only has any effect if called before C<guestfs_launch>, and the default "
12674 #: ../src/guestfs-actions.pod:4836 ../fish/guestfish-actions.pod:3553
12676 "About the only time when you would want to disable this is if the main "
12677 "process will fork itself into the background (\"daemonize\" itself). In "
12678 "this case the recovery process thinks that the main program has disappeared "
12679 "and so kills qemu, which is not very helpful."
12683 #: ../src/guestfs-actions.pod:4844
12684 msgid "guestfs_set_selinux"
12688 #: ../src/guestfs-actions.pod:4846
12692 " guestfs_set_selinux (guestfs_h *g,\n"
12698 #: ../src/guestfs-actions.pod:4850 ../fish/guestfish-actions.pod:3565
12700 "This sets the selinux flag that is passed to the appliance at boot time. "
12701 "The default is C<selinux=0> (disabled)."
12705 #: ../src/guestfs-actions.pod:4853 ../fish/guestfish-actions.pod:3568
12707 "Note that if SELinux is enabled, it is always in Permissive mode "
12708 "(C<enforcing=0>)."
12712 #: ../src/guestfs-actions.pod:4861
12713 msgid "guestfs_set_trace"
12717 #: ../src/guestfs-actions.pod:4863
12721 " guestfs_set_trace (guestfs_h *g,\n"
12727 #: ../src/guestfs-actions.pod:4867 ../fish/guestfish-actions.pod:3580
12729 "If the command trace flag is set to 1, then commands are printed on stderr "
12730 "before they are executed in a format which is very similar to the one used "
12731 "by guestfish. In other words, you can run a program with this enabled, and "
12732 "you will get out a script which you can feed to guestfish to perform the "
12733 "same set of actions."
12737 #: ../src/guestfs-actions.pod:4874 ../fish/guestfish-actions.pod:3587
12739 "If you want to trace C API calls into libguestfs (and other libraries) then "
12740 "possibly a better way is to use the external ltrace(1) command."
12744 #: ../src/guestfs-actions.pod:4878 ../fish/guestfish-actions.pod:3591
12746 "Command traces are disabled unless the environment variable "
12747 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
12751 #: ../src/guestfs-actions.pod:4883
12752 msgid "guestfs_set_verbose"
12756 #: ../src/guestfs-actions.pod:4885
12760 " guestfs_set_verbose (guestfs_h *g,\n"
12766 #: ../src/guestfs-actions.pod:4889 ../fish/guestfish-actions.pod:3600
12767 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
12771 #: ../src/guestfs-actions.pod:4891 ../fish/guestfish-actions.pod:3602
12773 "Verbose messages are disabled unless the environment variable "
12774 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
12778 #: ../src/guestfs-actions.pod:4896
12779 msgid "guestfs_setcon"
12783 #: ../src/guestfs-actions.pod:4898
12787 " guestfs_setcon (guestfs_h *g,\n"
12788 " const char *context);\n"
12793 #: ../src/guestfs-actions.pod:4902 ../fish/guestfish-actions.pod:3609
12795 "This sets the SELinux security context of the daemon to the string "
12800 #: ../src/guestfs-actions.pod:4905 ../fish/guestfish-actions.pod:3612
12801 msgid "See the documentation about SELINUX in L<guestfs(3)>."
12805 #: ../src/guestfs-actions.pod:4909
12806 msgid "guestfs_setxattr"
12810 #: ../src/guestfs-actions.pod:4911
12814 " guestfs_setxattr (guestfs_h *g,\n"
12815 " const char *xattr,\n"
12816 " const char *val,\n"
12818 " const char *path);\n"
12823 #: ../src/guestfs-actions.pod:4918 ../fish/guestfish-actions.pod:3618
12825 "This call sets the extended attribute named C<xattr> of the file C<path> to "
12826 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
12830 #: ../src/guestfs-actions.pod:4922
12831 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
12835 #: ../src/guestfs-actions.pod:4926
12836 msgid "guestfs_sfdisk"
12840 #: ../src/guestfs-actions.pod:4928
12844 " guestfs_sfdisk (guestfs_h *g,\n"
12845 " const char *device,\n"
12849 " char *const *lines);\n"
12854 #: ../src/guestfs-actions.pod:4936 ../fish/guestfish-actions.pod:3628
12856 "This is a direct interface to the L<sfdisk(8)> program for creating "
12857 "partitions on block devices."
12861 #: ../src/guestfs-actions.pod:4939 ../fish/guestfish-actions.pod:3631
12862 msgid "C<device> should be a block device, for example C</dev/sda>."
12866 #: ../src/guestfs-actions.pod:4941 ../fish/guestfish-actions.pod:3633
12868 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
12869 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
12870 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
12871 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
12872 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
12873 "the kernel) cannot work out the right geometry and you will need to tell it."
12877 #: ../src/guestfs-actions.pod:4949 ../fish/guestfish-actions.pod:3641
12879 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
12880 "refer to the L<sfdisk(8)> manpage."
12884 #: ../src/guestfs-actions.pod:4952 ../fish/guestfish-actions.pod:3644
12886 "To create a single partition occupying the whole disk, you would pass "
12887 "C<lines> as a single element list, when the single element being the string "
12892 #: ../src/guestfs-actions.pod:4956
12894 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
12898 #: ../src/guestfs-actions.pod:4964
12899 msgid "guestfs_sfdiskM"
12903 #: ../src/guestfs-actions.pod:4966
12907 " guestfs_sfdiskM (guestfs_h *g,\n"
12908 " const char *device,\n"
12909 " char *const *lines);\n"
12914 #: ../src/guestfs-actions.pod:4971
12916 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
12917 "partition sizes are specified in megabytes only (rounded to the nearest "
12918 "cylinder) and you don't need to specify the cyls, heads and sectors "
12919 "parameters which were rarely if ever used anyway."
12923 #: ../src/guestfs-actions.pod:4977
12925 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
12926 "C<guestfs_part_disk>"
12930 #: ../src/guestfs-actions.pod:4985
12931 msgid "guestfs_sfdisk_N"
12935 #: ../src/guestfs-actions.pod:4987
12939 " guestfs_sfdisk_N (guestfs_h *g,\n"
12940 " const char *device,\n"
12945 " const char *line);\n"
12950 #: ../src/guestfs-actions.pod:4996 ../fish/guestfish-actions.pod:3674
12952 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
12953 "(note: C<n> counts from 1)."
12957 #: ../src/guestfs-actions.pod:4999
12959 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
12960 "for the cyls/heads/sectors parameters."
12964 #: ../src/guestfs-actions.pod:5002
12965 msgid "See also: C<guestfs_part_add>"
12969 #: ../src/guestfs-actions.pod:5009
12970 msgid "guestfs_sfdisk_disk_geometry"
12974 #: ../src/guestfs-actions.pod:5011
12978 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
12979 " const char *device);\n"
12984 #: ../src/guestfs-actions.pod:5015
12986 "This displays the disk geometry of C<device> read from the partition table. "
12987 "Especially in the case where the underlying block device has been resized, "
12988 "this can be different from the kernel's idea of the geometry (see "
12989 "C<guestfs_sfdisk_kernel_geometry>)."
12993 #: ../src/guestfs-actions.pod:5020 ../src/guestfs-actions.pod:5034
12994 #: ../fish/guestfish-actions.pod:3694 ../fish/guestfish-actions.pod:3703
12995 msgid "The result is in human-readable format, and not designed to be parsed."
12999 #: ../src/guestfs-actions.pod:5026
13000 msgid "guestfs_sfdisk_kernel_geometry"
13004 #: ../src/guestfs-actions.pod:5028
13008 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
13009 " const char *device);\n"
13014 #: ../src/guestfs-actions.pod:5032 ../fish/guestfish-actions.pod:3701
13015 msgid "This displays the kernel's idea of the geometry of C<device>."
13019 #: ../src/guestfs-actions.pod:5040
13020 msgid "guestfs_sfdisk_l"
13024 #: ../src/guestfs-actions.pod:5042
13028 " guestfs_sfdisk_l (guestfs_h *g,\n"
13029 " const char *device);\n"
13034 #: ../src/guestfs-actions.pod:5046 ../fish/guestfish-actions.pod:3710
13036 "This displays the partition table on C<device>, in the human-readable output "
13037 "of the L<sfdisk(8)> command. It is not intended to be parsed."
13041 #: ../src/guestfs-actions.pod:5050
13042 msgid "See also: C<guestfs_part_list>"
13046 #: ../src/guestfs-actions.pod:5055
13051 #: ../src/guestfs-actions.pod:5057
13055 " guestfs_sh (guestfs_h *g,\n"
13056 " const char *command);\n"
13061 #: ../src/guestfs-actions.pod:5061 ../fish/guestfish-actions.pod:3720
13063 "This call runs a command from the guest filesystem via the guest's C</bin/"
13068 #: ../src/guestfs-actions.pod:5064
13069 msgid "This is like C<guestfs_command>, but passes the command to:"
13073 #: ../src/guestfs-actions.pod:5066 ../fish/guestfish-actions.pod:3725
13076 " /bin/sh -c \"command\"\n"
13081 #: ../src/guestfs-actions.pod:5068 ../fish/guestfish-actions.pod:3727
13083 "Depending on the guest's shell, this usually results in wildcards being "
13084 "expanded, shell expressions being interpolated and so on."
13088 #: ../src/guestfs-actions.pod:5072
13089 msgid "All the provisos about C<guestfs_command> apply to this call."
13093 #: ../src/guestfs-actions.pod:5077
13094 msgid "guestfs_sh_lines"
13098 #: ../src/guestfs-actions.pod:5079
13102 " guestfs_sh_lines (guestfs_h *g,\n"
13103 " const char *command);\n"
13108 #: ../src/guestfs-actions.pod:5083
13110 "This is the same as C<guestfs_sh>, but splits the result into a list of "
13115 #: ../src/guestfs-actions.pod:5086
13116 msgid "See also: C<guestfs_command_lines>"
13120 #: ../src/guestfs-actions.pod:5092
13121 msgid "guestfs_sleep"
13125 #: ../src/guestfs-actions.pod:5094
13129 " guestfs_sleep (guestfs_h *g,\n"
13135 #: ../src/guestfs-actions.pod:5098 ../fish/guestfish-actions.pod:3746
13136 msgid "Sleep for C<secs> seconds."
13140 #: ../src/guestfs-actions.pod:5102 ../src/guestfs-structs.pod:109
13141 msgid "guestfs_stat"
13145 #: ../src/guestfs-actions.pod:5104
13148 " struct guestfs_stat *\n"
13149 " guestfs_stat (guestfs_h *g,\n"
13150 " const char *path);\n"
13155 #: ../src/guestfs-actions.pod:5110 ../fish/guestfish-actions.pod:3754
13156 msgid "This is the same as the C<stat(2)> system call."
13160 #: ../src/guestfs-actions.pod:5116 ../src/guestfs-structs.pod:135
13161 msgid "guestfs_statvfs"
13165 #: ../src/guestfs-actions.pod:5118
13168 " struct guestfs_statvfs *\n"
13169 " guestfs_statvfs (guestfs_h *g,\n"
13170 " const char *path);\n"
13175 #: ../src/guestfs-actions.pod:5122 ../fish/guestfish-actions.pod:3760
13177 "Returns file system statistics for any mounted file system. C<path> should "
13178 "be a file or directory in the mounted file system (typically it is the mount "
13179 "point itself, but it doesn't need to be)."
13183 #: ../src/guestfs-actions.pod:5126 ../fish/guestfish-actions.pod:3764
13184 msgid "This is the same as the C<statvfs(2)> system call."
13188 #: ../src/guestfs-actions.pod:5128
13190 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
13191 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
13195 #: ../src/guestfs-actions.pod:5132
13196 msgid "guestfs_strings"
13200 #: ../src/guestfs-actions.pod:5134
13204 " guestfs_strings (guestfs_h *g,\n"
13205 " const char *path);\n"
13210 #: ../src/guestfs-actions.pod:5138 ../fish/guestfish-actions.pod:3770
13212 "This runs the L<strings(1)> command on a file and returns the list of "
13213 "printable strings found."
13217 #: ../src/guestfs-actions.pod:5148
13218 msgid "guestfs_strings_e"
13222 #: ../src/guestfs-actions.pod:5150
13226 " guestfs_strings_e (guestfs_h *g,\n"
13227 " const char *encoding,\n"
13228 " const char *path);\n"
13233 #: ../src/guestfs-actions.pod:5155
13235 "This is like the C<guestfs_strings> command, but allows you to specify the "
13236 "encoding of strings that are looked for in the source file C<path>."
13240 #: ../src/guestfs-actions.pod:5159 ../fish/guestfish-actions.pod:3784
13241 msgid "Allowed encodings are:"
13245 #: ../src/guestfs-actions.pod:5163 ../fish/guestfish-actions.pod:3788
13250 #: ../src/guestfs-actions.pod:5165
13252 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
13253 "ISO-8859-X (this is what C<guestfs_strings> uses)."
13257 #: ../src/guestfs-actions.pod:5168 ../fish/guestfish-actions.pod:3793
13262 #: ../src/guestfs-actions.pod:5170 ../fish/guestfish-actions.pod:3795
13263 msgid "Single 8-bit-byte characters."
13267 #: ../src/guestfs-actions.pod:5172 ../fish/guestfish-actions.pod:3797
13272 #: ../src/guestfs-actions.pod:5174 ../fish/guestfish-actions.pod:3799
13273 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
13277 #: ../src/guestfs-actions.pod:5177 ../fish/guestfish-actions.pod:3802
13278 msgid "l (lower case letter L)"
13282 #: ../src/guestfs-actions.pod:5179 ../fish/guestfish-actions.pod:3804
13284 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
13285 "examining binaries in Windows guests."
13289 #: ../src/guestfs-actions.pod:5182 ../fish/guestfish-actions.pod:3807
13294 #: ../src/guestfs-actions.pod:5184 ../fish/guestfish-actions.pod:3809
13295 msgid "32-bit big endian such as UCS-4BE."
13299 #: ../src/guestfs-actions.pod:5186 ../fish/guestfish-actions.pod:3811
13304 #: ../src/guestfs-actions.pod:5188 ../fish/guestfish-actions.pod:3813
13305 msgid "32-bit little endian such as UCS-4LE."
13309 #: ../src/guestfs-actions.pod:5192 ../fish/guestfish-actions.pod:3817
13310 msgid "The returned strings are transcoded to UTF-8."
13314 #: ../src/guestfs-actions.pod:5201
13315 msgid "guestfs_swapoff_device"
13319 #: ../src/guestfs-actions.pod:5203
13323 " guestfs_swapoff_device (guestfs_h *g,\n"
13324 " const char *device);\n"
13329 #: ../src/guestfs-actions.pod:5207
13331 "This command disables the libguestfs appliance swap device or partition "
13332 "named C<device>. See C<guestfs_swapon_device>."
13336 #: ../src/guestfs-actions.pod:5213
13337 msgid "guestfs_swapoff_file"
13341 #: ../src/guestfs-actions.pod:5215
13345 " guestfs_swapoff_file (guestfs_h *g,\n"
13346 " const char *file);\n"
13351 #: ../src/guestfs-actions.pod:5219 ../fish/guestfish-actions.pod:3834
13352 msgid "This command disables the libguestfs appliance swap on file."
13356 #: ../src/guestfs-actions.pod:5223
13357 msgid "guestfs_swapoff_label"
13361 #: ../src/guestfs-actions.pod:5225
13365 " guestfs_swapoff_label (guestfs_h *g,\n"
13366 " const char *label);\n"
13371 #: ../src/guestfs-actions.pod:5229 ../fish/guestfish-actions.pod:3840
13373 "This command disables the libguestfs appliance swap on labeled swap "
13378 #: ../src/guestfs-actions.pod:5234
13379 msgid "guestfs_swapoff_uuid"
13383 #: ../src/guestfs-actions.pod:5236
13387 " guestfs_swapoff_uuid (guestfs_h *g,\n"
13388 " const char *uuid);\n"
13393 #: ../src/guestfs-actions.pod:5240 ../fish/guestfish-actions.pod:3847
13395 "This command disables the libguestfs appliance swap partition with the given "
13400 #: ../src/guestfs-actions.pod:5245
13401 msgid "guestfs_swapon_device"
13405 #: ../src/guestfs-actions.pod:5247
13409 " guestfs_swapon_device (guestfs_h *g,\n"
13410 " const char *device);\n"
13415 #: ../src/guestfs-actions.pod:5251
13417 "This command enables the libguestfs appliance to use the swap device or "
13418 "partition named C<device>. The increased memory is made available for all "
13419 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
13423 #: ../src/guestfs-actions.pod:5256 ../fish/guestfish-actions.pod:3859
13425 "Note that you should not swap to existing guest swap partitions unless you "
13426 "know what you are doing. They may contain hibernation information, or other "
13427 "information that the guest doesn't want you to trash. You also risk leaking "
13428 "information about the host to the guest this way. Instead, attach a new "
13429 "host device to the guest and swap on that."
13433 #: ../src/guestfs-actions.pod:5265
13434 msgid "guestfs_swapon_file"
13438 #: ../src/guestfs-actions.pod:5267
13442 " guestfs_swapon_file (guestfs_h *g,\n"
13443 " const char *file);\n"
13448 #: ../src/guestfs-actions.pod:5271
13450 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
13455 #: ../src/guestfs-actions.pod:5276
13456 msgid "guestfs_swapon_label"
13460 #: ../src/guestfs-actions.pod:5278
13464 " guestfs_swapon_label (guestfs_h *g,\n"
13465 " const char *label);\n"
13470 #: ../src/guestfs-actions.pod:5282
13472 "This command enables swap to a labeled swap partition. See "
13473 "C<guestfs_swapon_device> for other notes."
13477 #: ../src/guestfs-actions.pod:5287
13478 msgid "guestfs_swapon_uuid"
13482 #: ../src/guestfs-actions.pod:5289
13486 " guestfs_swapon_uuid (guestfs_h *g,\n"
13487 " const char *uuid);\n"
13492 #: ../src/guestfs-actions.pod:5293
13494 "This command enables swap to a swap partition with the given UUID. See "
13495 "C<guestfs_swapon_device> for other notes."
13499 #: ../src/guestfs-actions.pod:5298
13500 msgid "guestfs_sync"
13504 #: ../src/guestfs-actions.pod:5300
13508 " guestfs_sync (guestfs_h *g);\n"
13513 #: ../src/guestfs-actions.pod:5303 ../fish/guestfish-actions.pod:3891
13515 "This syncs the disk, so that any writes are flushed through to the "
13516 "underlying disk image."
13520 #: ../src/guestfs-actions.pod:5306 ../fish/guestfish-actions.pod:3894
13522 "You should always call this if you have modified a disk image, before "
13523 "closing the handle."
13527 #: ../src/guestfs-actions.pod:5311
13528 msgid "guestfs_tail"
13532 #: ../src/guestfs-actions.pod:5313
13536 " guestfs_tail (guestfs_h *g,\n"
13537 " const char *path);\n"
13542 #: ../src/guestfs-actions.pod:5317 ../fish/guestfish-actions.pod:3901
13544 "This command returns up to the last 10 lines of a file as a list of strings."
13548 #: ../src/guestfs-actions.pod:5327
13549 msgid "guestfs_tail_n"
13553 #: ../src/guestfs-actions.pod:5329
13557 " guestfs_tail_n (guestfs_h *g,\n"
13559 " const char *path);\n"
13564 #: ../src/guestfs-actions.pod:5334 ../fish/guestfish-actions.pod:3911
13566 "If the parameter C<nrlines> is a positive number, this returns the last "
13567 "C<nrlines> lines of the file C<path>."
13571 #: ../src/guestfs-actions.pod:5337 ../fish/guestfish-actions.pod:3914
13573 "If the parameter C<nrlines> is a negative number, this returns lines from "
13574 "the file C<path>, starting with the C<-nrlines>th line."
13578 #: ../src/guestfs-actions.pod:5349
13579 msgid "guestfs_tar_in"
13583 #: ../src/guestfs-actions.pod:5351
13587 " guestfs_tar_in (guestfs_h *g,\n"
13588 " const char *tarfile,\n"
13589 " const char *directory);\n"
13594 #: ../src/guestfs-actions.pod:5356 ../fish/guestfish-actions.pod:3926
13596 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
13597 "tar file) into C<directory>."
13601 #: ../src/guestfs-actions.pod:5359
13603 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
13607 #: ../src/guestfs-actions.pod:5364
13608 msgid "guestfs_tar_out"
13612 #: ../src/guestfs-actions.pod:5366
13616 " guestfs_tar_out (guestfs_h *g,\n"
13617 " const char *directory,\n"
13618 " const char *tarfile);\n"
13623 #: ../src/guestfs-actions.pod:5371 ../fish/guestfish-actions.pod:3938
13625 "This command packs the contents of C<directory> and downloads it to local "
13630 #: ../src/guestfs-actions.pod:5374
13632 "To download a compressed tarball, use C<guestfs_tgz_out> or "
13633 "C<guestfs_txz_out>."
13637 #: ../src/guestfs-actions.pod:5379
13638 msgid "guestfs_tgz_in"
13642 #: ../src/guestfs-actions.pod:5381
13646 " guestfs_tgz_in (guestfs_h *g,\n"
13647 " const char *tarball,\n"
13648 " const char *directory);\n"
13653 #: ../src/guestfs-actions.pod:5386 ../fish/guestfish-actions.pod:3950
13655 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
13656 "tar file) into C<directory>."
13660 #: ../src/guestfs-actions.pod:5389
13661 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
13665 #: ../src/guestfs-actions.pod:5393
13666 msgid "guestfs_tgz_out"
13670 #: ../src/guestfs-actions.pod:5395
13674 " guestfs_tgz_out (guestfs_h *g,\n"
13675 " const char *directory,\n"
13676 " const char *tarball);\n"
13681 #: ../src/guestfs-actions.pod:5400 ../fish/guestfish-actions.pod:3961
13683 "This command packs the contents of C<directory> and downloads it to local "
13688 #: ../src/guestfs-actions.pod:5403
13689 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
13693 #: ../src/guestfs-actions.pod:5407
13694 msgid "guestfs_touch"
13698 #: ../src/guestfs-actions.pod:5409
13702 " guestfs_touch (guestfs_h *g,\n"
13703 " const char *path);\n"
13708 #: ../src/guestfs-actions.pod:5413 ../fish/guestfish-actions.pod:3972
13710 "Touch acts like the L<touch(1)> command. It can be used to update the "
13711 "timestamps on a file, or, if the file does not exist, to create a new zero-"
13716 #: ../src/guestfs-actions.pod:5417 ../fish/guestfish-actions.pod:3976
13718 "This command only works on regular files, and will fail on other file types "
13719 "such as directories, symbolic links, block special etc."
13723 #: ../src/guestfs-actions.pod:5422
13724 msgid "guestfs_truncate"
13728 #: ../src/guestfs-actions.pod:5424
13732 " guestfs_truncate (guestfs_h *g,\n"
13733 " const char *path);\n"
13738 #: ../src/guestfs-actions.pod:5428 ../fish/guestfish-actions.pod:3983
13740 "This command truncates C<path> to a zero-length file. The file must exist "
13745 #: ../src/guestfs-actions.pod:5433
13746 msgid "guestfs_truncate_size"
13750 #: ../src/guestfs-actions.pod:5435
13754 " guestfs_truncate_size (guestfs_h *g,\n"
13755 " const char *path,\n"
13756 " int64_t size);\n"
13761 #: ../src/guestfs-actions.pod:5440 ../fish/guestfish-actions.pod:3990
13763 "This command truncates C<path> to size C<size> bytes. The file must exist "
13768 #: ../src/guestfs-actions.pod:5443
13770 "If the current file size is less than C<size> then the file is extended to "
13771 "the required size with zero bytes. This creates a sparse file (ie. disk "
13772 "blocks are not allocated for the file until you write to it). To create a "
13773 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
13777 #: ../src/guestfs-actions.pod:5451
13778 msgid "guestfs_tune2fs_l"
13782 #: ../src/guestfs-actions.pod:5453
13786 " guestfs_tune2fs_l (guestfs_h *g,\n"
13787 " const char *device);\n"
13792 #: ../src/guestfs-actions.pod:5457 ../fish/guestfish-actions.pod:4003
13794 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
13799 #: ../src/guestfs-actions.pod:5460 ../fish/guestfish-actions.pod:4006
13801 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
13802 "for more details. The list of fields returned isn't clearly defined, and "
13803 "depends on both the version of C<tune2fs> that libguestfs was built against, "
13804 "and the filesystem itself."
13808 #: ../src/guestfs-actions.pod:5471
13809 msgid "guestfs_txz_in"
13813 #: ../src/guestfs-actions.pod:5473
13817 " guestfs_txz_in (guestfs_h *g,\n"
13818 " const char *tarball,\n"
13819 " const char *directory);\n"
13824 #: ../src/guestfs-actions.pod:5478 ../fish/guestfish-actions.pod:4015
13826 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
13827 "tar file) into C<directory>."
13831 #: ../src/guestfs-actions.pod:5483
13832 msgid "guestfs_txz_out"
13836 #: ../src/guestfs-actions.pod:5485
13840 " guestfs_txz_out (guestfs_h *g,\n"
13841 " const char *directory,\n"
13842 " const char *tarball);\n"
13847 #: ../src/guestfs-actions.pod:5490 ../fish/guestfish-actions.pod:4024
13849 "This command packs the contents of C<directory> and downloads it to local "
13850 "file C<tarball> (as an xz compressed tar archive)."
13854 #: ../src/guestfs-actions.pod:5495
13855 msgid "guestfs_umask"
13859 #: ../src/guestfs-actions.pod:5497
13863 " guestfs_umask (guestfs_h *g,\n"
13869 #: ../src/guestfs-actions.pod:5501 ../fish/guestfish-actions.pod:4033
13871 "This function sets the mask used for creating new files and device nodes to "
13876 #: ../src/guestfs-actions.pod:5504 ../fish/guestfish-actions.pod:4036
13878 "Typical umask values would be C<022> which creates new files with "
13879 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
13880 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
13884 #: ../src/guestfs-actions.pod:5509 ../fish/guestfish-actions.pod:4041
13886 "The default umask is C<022>. This is important because it means that "
13887 "directories and device nodes will be created with C<0644> or C<0755> mode "
13888 "even if you specify C<0777>."
13892 #: ../src/guestfs-actions.pod:5513
13894 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
13895 "C<guestfs_mkdir>."
13899 #: ../src/guestfs-actions.pod:5516 ../fish/guestfish-actions.pod:4048
13900 msgid "This call returns the previous umask."
13904 #: ../src/guestfs-actions.pod:5520
13905 msgid "guestfs_umount"
13909 #: ../src/guestfs-actions.pod:5522
13913 " guestfs_umount (guestfs_h *g,\n"
13914 " const char *pathordevice);\n"
13919 #: ../src/guestfs-actions.pod:5526 ../fish/guestfish-actions.pod:4056
13921 "This unmounts the given filesystem. The filesystem may be specified either "
13922 "by its mountpoint (path) or the device which contains the filesystem."
13926 #: ../src/guestfs-actions.pod:5532
13927 msgid "guestfs_umount_all"
13931 #: ../src/guestfs-actions.pod:5534
13935 " guestfs_umount_all (guestfs_h *g);\n"
13940 #: ../src/guestfs-actions.pod:5537 ../fish/guestfish-actions.pod:4066
13941 msgid "This unmounts all mounted filesystems."
13945 #: ../src/guestfs-actions.pod:5539 ../fish/guestfish-actions.pod:4068
13946 msgid "Some internal mounts are not unmounted by this call."
13950 #: ../src/guestfs-actions.pod:5543
13951 msgid "guestfs_upload"
13955 #: ../src/guestfs-actions.pod:5545
13959 " guestfs_upload (guestfs_h *g,\n"
13960 " const char *filename,\n"
13961 " const char *remotefilename);\n"
13966 #: ../src/guestfs-actions.pod:5550 ../src/guestfs-actions.pod:5567
13967 #: ../fish/guestfish-actions.pod:4074 ../fish/guestfish-actions.pod:4087
13968 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
13972 #: ../src/guestfs-actions.pod:5555
13973 msgid "See also C<guestfs_download>."
13977 #: ../src/guestfs-actions.pod:5559
13978 msgid "guestfs_upload_offset"
13982 #: ../src/guestfs-actions.pod:5561
13986 " guestfs_upload_offset (guestfs_h *g,\n"
13987 " const char *filename,\n"
13988 " const char *remotefilename,\n"
13989 " int64_t offset);\n"
13994 #: ../src/guestfs-actions.pod:5570 ../fish/guestfish-actions.pod:4090
13996 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
13997 "The intention is to overwrite parts of existing files or devices, although "
13998 "if a non-existant file is specified then it is created with a \"hole\" "
13999 "before C<offset>. The size of the data written is implicit in the size of "
14000 "the source C<filename>."
14004 #: ../src/guestfs-actions.pod:5577
14006 "Note that there is no limit on the amount of data that can be uploaded with "
14007 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
14008 "full amount unless an error occurs."
14012 #: ../src/guestfs-actions.pod:5582
14013 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
14017 #: ../src/guestfs-actions.pod:5586
14018 msgid "guestfs_utimens"
14022 #: ../src/guestfs-actions.pod:5588
14026 " guestfs_utimens (guestfs_h *g,\n"
14027 " const char *path,\n"
14028 " int64_t atsecs,\n"
14029 " int64_t atnsecs,\n"
14030 " int64_t mtsecs,\n"
14031 " int64_t mtnsecs);\n"
14036 #: ../src/guestfs-actions.pod:5596 ../fish/guestfish-actions.pod:4110
14037 msgid "This command sets the timestamps of a file with nanosecond precision."
14041 #: ../src/guestfs-actions.pod:5599 ../fish/guestfish-actions.pod:4113
14043 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
14048 #: ../src/guestfs-actions.pod:5602 ../fish/guestfish-actions.pod:4116
14050 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
14051 "nanoseconds from the epoch."
14055 #: ../src/guestfs-actions.pod:5605 ../fish/guestfish-actions.pod:4119
14057 "If the C<*nsecs> field contains the special value C<-1> then the "
14058 "corresponding timestamp is set to the current time. (The C<*secs> field is "
14059 "ignored in this case)."
14063 #: ../src/guestfs-actions.pod:5609 ../fish/guestfish-actions.pod:4123
14065 "If the C<*nsecs> field contains the special value C<-2> then the "
14066 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
14071 #: ../src/guestfs-actions.pod:5615 ../src/guestfs-structs.pod:175
14072 msgid "guestfs_version"
14076 #: ../src/guestfs-actions.pod:5617
14079 " struct guestfs_version *\n"
14080 " guestfs_version (guestfs_h *g);\n"
14085 #: ../src/guestfs-actions.pod:5620 ../fish/guestfish-actions.pod:4131
14087 "Return the libguestfs version number that the program is linked against."
14091 #: ../src/guestfs-actions.pod:5623 ../fish/guestfish-actions.pod:4134
14093 "Note that because of dynamic linking this is not necessarily the version of "
14094 "libguestfs that you compiled against. You can compile the program, and then "
14095 "at runtime dynamically link against a completely different C<libguestfs.so> "
14100 #: ../src/guestfs-actions.pod:5628 ../fish/guestfish-actions.pod:4139
14102 "This call was added in version C<1.0.58>. In previous versions of "
14103 "libguestfs there was no way to get the version number. From C code you can "
14104 "use dynamic linker functions to find out if this symbol exists (if it "
14105 "doesn't, then it's an earlier version)."
14109 #: ../src/guestfs-actions.pod:5634 ../fish/guestfish-actions.pod:4145
14111 "The call returns a structure with four elements. The first three (C<major>, "
14112 "C<minor> and C<release>) are numbers and correspond to the usual version "
14113 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
14114 "but may be used for distro-specific information."
14118 #: ../src/guestfs-actions.pod:5640 ../fish/guestfish-actions.pod:4151
14120 "To construct the original version string: C<$major.$minor.$release$extra>"
14124 #: ../src/guestfs-actions.pod:5643 ../fish/guestfish-actions.pod:4154
14125 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
14129 #: ../src/guestfs-actions.pod:5645
14131 "I<Note:> Don't use this call to test for availability of features. In "
14132 "enterprise distributions we backport features from later versions into "
14133 "earlier versions, making this an unreliable way to test for features. Use "
14134 "C<guestfs_available> instead."
14138 #: ../src/guestfs-actions.pod:5651
14140 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
14141 "error. I<The caller must call C<guestfs_free_version> after use>."
14145 #: ../src/guestfs-actions.pod:5655
14146 msgid "guestfs_vfs_label"
14150 #: ../src/guestfs-actions.pod:5657
14154 " guestfs_vfs_label (guestfs_h *g,\n"
14155 " const char *device);\n"
14160 #: ../src/guestfs-actions.pod:5661 ../fish/guestfish-actions.pod:4166
14161 msgid "This returns the filesystem label of the filesystem on C<device>."
14165 #: ../src/guestfs-actions.pod:5664 ../fish/guestfish-actions.pod:4169
14166 msgid "If the filesystem is unlabeled, this returns the empty string."
14170 #: ../src/guestfs-actions.pod:5666
14171 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
14175 #: ../src/guestfs-actions.pod:5671
14176 msgid "guestfs_vfs_type"
14180 #: ../src/guestfs-actions.pod:5673
14184 " guestfs_vfs_type (guestfs_h *g,\n"
14185 " const char *device);\n"
14190 #: ../src/guestfs-actions.pod:5677 ../fish/guestfish-actions.pod:4177
14192 "This command gets the filesystem type corresponding to the filesystem on "
14197 #: ../src/guestfs-actions.pod:5680 ../fish/guestfish-actions.pod:4180
14199 "For most filesystems, the result is the name of the Linux VFS module which "
14200 "would be used to mount this filesystem if you mounted it without specifying "
14201 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
14205 #: ../src/guestfs-actions.pod:5688
14206 msgid "guestfs_vfs_uuid"
14210 #: ../src/guestfs-actions.pod:5690
14214 " guestfs_vfs_uuid (guestfs_h *g,\n"
14215 " const char *device);\n"
14220 #: ../src/guestfs-actions.pod:5694 ../fish/guestfish-actions.pod:4189
14221 msgid "This returns the filesystem UUID of the filesystem on C<device>."
14225 #: ../src/guestfs-actions.pod:5697 ../fish/guestfish-actions.pod:4192
14226 msgid "If the filesystem does not have a UUID, this returns the empty string."
14230 #: ../src/guestfs-actions.pod:5699
14231 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
14235 #: ../src/guestfs-actions.pod:5704
14236 msgid "guestfs_vg_activate"
14240 #: ../src/guestfs-actions.pod:5706
14244 " guestfs_vg_activate (guestfs_h *g,\n"
14246 " char *const *volgroups);\n"
14251 #: ../src/guestfs-actions.pod:5711 ../fish/guestfish-actions.pod:4200
14253 "This command activates or (if C<activate> is false) deactivates all logical "
14254 "volumes in the listed volume groups C<volgroups>. If activated, then they "
14255 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
14256 "deactivated, then those devices disappear."
14260 #: ../src/guestfs-actions.pod:5717 ../fish/guestfish-actions.pod:4206
14261 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
14265 #: ../src/guestfs-actions.pod:5719 ../fish/guestfish-actions.pod:4208
14267 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
14268 "activated or deactivated."
14272 #: ../src/guestfs-actions.pod:5724
14273 msgid "guestfs_vg_activate_all"
14277 #: ../src/guestfs-actions.pod:5726
14281 " guestfs_vg_activate_all (guestfs_h *g,\n"
14282 " int activate);\n"
14287 #: ../src/guestfs-actions.pod:5730 ../fish/guestfish-actions.pod:4215
14289 "This command activates or (if C<activate> is false) deactivates all logical "
14290 "volumes in all volume groups. If activated, then they are made known to the "
14291 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
14292 "those devices disappear."
14296 #: ../src/guestfs-actions.pod:5736 ../fish/guestfish-actions.pod:4221
14297 msgid "This command is the same as running C<vgchange -a y|n>"
14301 #: ../src/guestfs-actions.pod:5740
14302 msgid "guestfs_vgcreate"
14306 #: ../src/guestfs-actions.pod:5742
14310 " guestfs_vgcreate (guestfs_h *g,\n"
14311 " const char *volgroup,\n"
14312 " char *const *physvols);\n"
14317 #: ../src/guestfs-actions.pod:5747 ../fish/guestfish-actions.pod:4227
14319 "This creates an LVM volume group called C<volgroup> from the non-empty list "
14320 "of physical volumes C<physvols>."
14324 #: ../src/guestfs-actions.pod:5752
14325 msgid "guestfs_vglvuuids"
14329 #: ../src/guestfs-actions.pod:5754
14333 " guestfs_vglvuuids (guestfs_h *g,\n"
14334 " const char *vgname);\n"
14339 #: ../src/guestfs-actions.pod:5758 ../fish/guestfish-actions.pod:4234
14341 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
14342 "volumes created in this volume group."
14346 #: ../src/guestfs-actions.pod:5761
14348 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
14349 "associate logical volumes and volume groups."
14353 #: ../src/guestfs-actions.pod:5764
14354 msgid "See also C<guestfs_vgpvuuids>."
14358 #: ../src/guestfs-actions.pod:5770
14359 msgid "guestfs_vgpvuuids"
14363 #: ../src/guestfs-actions.pod:5772
14367 " guestfs_vgpvuuids (guestfs_h *g,\n"
14368 " const char *vgname);\n"
14373 #: ../src/guestfs-actions.pod:5776 ../fish/guestfish-actions.pod:4246
14375 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
14376 "volumes that this volume group resides on."
14380 #: ../src/guestfs-actions.pod:5779
14382 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
14383 "associate physical volumes and volume groups."
14387 #: ../src/guestfs-actions.pod:5782
14388 msgid "See also C<guestfs_vglvuuids>."
14392 #: ../src/guestfs-actions.pod:5788
14393 msgid "guestfs_vgremove"
14397 #: ../src/guestfs-actions.pod:5790
14401 " guestfs_vgremove (guestfs_h *g,\n"
14402 " const char *vgname);\n"
14407 #: ../src/guestfs-actions.pod:5794 ../fish/guestfish-actions.pod:4258
14408 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
14412 #: ../src/guestfs-actions.pod:5796 ../fish/guestfish-actions.pod:4260
14414 "This also forcibly removes all logical volumes in the volume group (if any)."
14418 #: ../src/guestfs-actions.pod:5801
14419 msgid "guestfs_vgrename"
14423 #: ../src/guestfs-actions.pod:5803
14427 " guestfs_vgrename (guestfs_h *g,\n"
14428 " const char *volgroup,\n"
14429 " const char *newvolgroup);\n"
14434 #: ../src/guestfs-actions.pod:5808 ../fish/guestfish-actions.pod:4267
14435 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
14439 #: ../src/guestfs-actions.pod:5812
14440 msgid "guestfs_vgs"
14444 #: ../src/guestfs-actions.pod:5814
14448 " guestfs_vgs (guestfs_h *g);\n"
14453 #: ../src/guestfs-actions.pod:5817 ../fish/guestfish-actions.pod:4273
14455 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
14460 #: ../src/guestfs-actions.pod:5820 ../fish/guestfish-actions.pod:4276
14462 "This returns a list of just the volume group names that were detected (eg. "
14467 #: ../src/guestfs-actions.pod:5823
14468 msgid "See also C<guestfs_vgs_full>."
14472 #: ../src/guestfs-actions.pod:5829
14473 msgid "guestfs_vgs_full"
14477 #: ../src/guestfs-actions.pod:5831
14480 " struct guestfs_lvm_vg_list *\n"
14481 " guestfs_vgs_full (guestfs_h *g);\n"
14486 #: ../src/guestfs-actions.pod:5834 ../fish/guestfish-actions.pod:4285
14488 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
14489 "> command. The \"full\" version includes all fields."
14493 #: ../src/guestfs-actions.pod:5837
14495 "This function returns a C<struct guestfs_lvm_vg_list *> (see E<lt>guestfs-"
14496 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
14497 "C<guestfs_free_lvm_vg_list> after use>."
14501 #: ../src/guestfs-actions.pod:5842
14502 msgid "guestfs_vgscan"
14506 #: ../src/guestfs-actions.pod:5844
14510 " guestfs_vgscan (guestfs_h *g);\n"
14515 #: ../src/guestfs-actions.pod:5847 ../fish/guestfish-actions.pod:4292
14517 "This rescans all block devices and rebuilds the list of LVM physical "
14518 "volumes, volume groups and logical volumes."
14522 #: ../src/guestfs-actions.pod:5852
14523 msgid "guestfs_vguuid"
14527 #: ../src/guestfs-actions.pod:5854
14531 " guestfs_vguuid (guestfs_h *g,\n"
14532 " const char *vgname);\n"
14537 #: ../src/guestfs-actions.pod:5858 ../fish/guestfish-actions.pod:4299
14538 msgid "This command returns the UUID of the LVM VG named C<vgname>."
14542 #: ../src/guestfs-actions.pod:5863
14543 msgid "guestfs_wait_ready"
14547 #: ../src/guestfs-actions.pod:5865
14551 " guestfs_wait_ready (guestfs_h *g);\n"
14556 #: ../src/guestfs-actions.pod:5868
14557 msgid "This function is a no op."
14561 #: ../src/guestfs-actions.pod:5870
14563 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
14564 "calling C<guestfs_launch> to wait for the launch to complete. However this "
14565 "is no longer necessary because C<guestfs_launch> now does the waiting."
14569 #: ../src/guestfs-actions.pod:5875
14571 "If you see any calls to this function in code then you can just remove them, "
14572 "unless you want to retain compatibility with older versions of the API."
14576 #: ../src/guestfs-actions.pod:5881
14577 msgid "guestfs_wc_c"
14581 #: ../src/guestfs-actions.pod:5883
14585 " guestfs_wc_c (guestfs_h *g,\n"
14586 " const char *path);\n"
14591 #: ../src/guestfs-actions.pod:5887 ../fish/guestfish-actions.pod:4305
14593 "This command counts the characters in a file, using the C<wc -c> external "
14598 #: ../src/guestfs-actions.pod:5892
14599 msgid "guestfs_wc_l"
14603 #: ../src/guestfs-actions.pod:5894
14607 " guestfs_wc_l (guestfs_h *g,\n"
14608 " const char *path);\n"
14613 #: ../src/guestfs-actions.pod:5898 ../fish/guestfish-actions.pod:4312
14615 "This command counts the lines in a file, using the C<wc -l> external command."
14619 #: ../src/guestfs-actions.pod:5903
14620 msgid "guestfs_wc_w"
14624 #: ../src/guestfs-actions.pod:5905
14628 " guestfs_wc_w (guestfs_h *g,\n"
14629 " const char *path);\n"
14634 #: ../src/guestfs-actions.pod:5909 ../fish/guestfish-actions.pod:4319
14636 "This command counts the words in a file, using the C<wc -w> external command."
14640 #: ../src/guestfs-actions.pod:5914
14641 msgid "guestfs_write"
14645 #: ../src/guestfs-actions.pod:5916
14649 " guestfs_write (guestfs_h *g,\n"
14650 " const char *path,\n"
14651 " const char *content,\n"
14652 " size_t content_size);\n"
14657 #: ../src/guestfs-actions.pod:5922 ../fish/guestfish-actions.pod:4326
14659 "This call creates a file called C<path>. The content of the file is the "
14660 "string C<content> (which can contain any 8 bit data)."
14664 #: ../src/guestfs-actions.pod:5930
14665 msgid "guestfs_write_file"
14669 #: ../src/guestfs-actions.pod:5932
14673 " guestfs_write_file (guestfs_h *g,\n"
14674 " const char *path,\n"
14675 " const char *content,\n"
14681 #: ../src/guestfs-actions.pod:5938 ../fish/guestfish-actions.pod:4336
14683 "This call creates a file called C<path>. The contents of the file is the "
14684 "string C<content> (which can contain any 8 bit data), with length C<size>."
14688 #: ../src/guestfs-actions.pod:5942 ../fish/guestfish-actions.pod:4340
14690 "As a special case, if C<size> is C<0> then the length is calculated using "
14691 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
14695 #: ../src/guestfs-actions.pod:5946 ../fish/guestfish-actions.pod:4344
14697 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
14698 "I<not> work, even if the length is specified."
14702 #: ../src/guestfs-actions.pod:5954 ../fish/guestfish-actions.pod:4350
14704 "This function is deprecated. In new code, use the C<write> call instead."
14708 #: ../src/guestfs-actions.pod:5961
14709 msgid "guestfs_zegrep"
14713 #: ../src/guestfs-actions.pod:5963
14717 " guestfs_zegrep (guestfs_h *g,\n"
14718 " const char *regex,\n"
14719 " const char *path);\n"
14724 #: ../src/guestfs-actions.pod:5968 ../fish/guestfish-actions.pod:4361
14726 "This calls the external C<zegrep> program and returns the matching lines."
14730 #: ../src/guestfs-actions.pod:5978
14731 msgid "guestfs_zegrepi"
14735 #: ../src/guestfs-actions.pod:5980
14739 " guestfs_zegrepi (guestfs_h *g,\n"
14740 " const char *regex,\n"
14741 " const char *path);\n"
14746 #: ../src/guestfs-actions.pod:5985 ../fish/guestfish-actions.pod:4371
14748 "This calls the external C<zegrep -i> program and returns the matching lines."
14752 #: ../src/guestfs-actions.pod:5995
14753 msgid "guestfs_zero"
14757 #: ../src/guestfs-actions.pod:5997
14761 " guestfs_zero (guestfs_h *g,\n"
14762 " const char *device);\n"
14767 #: ../src/guestfs-actions.pod:6001 ../fish/guestfish-actions.pod:4381
14768 msgid "This command writes zeroes over the first few blocks of C<device>."
14772 #: ../src/guestfs-actions.pod:6003 ../fish/guestfish-actions.pod:4383
14774 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
14775 "securely wipe the device). It should be sufficient to remove any partition "
14776 "tables, filesystem superblocks and so on."
14780 #: ../src/guestfs-actions.pod:6007
14781 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
14785 #: ../src/guestfs-actions.pod:6016
14786 msgid "guestfs_zero_device"
14790 #: ../src/guestfs-actions.pod:6018
14794 " guestfs_zero_device (guestfs_h *g,\n"
14795 " const char *device);\n"
14800 #: ../src/guestfs-actions.pod:6022
14802 "This command writes zeroes over the entire C<device>. Compare with "
14803 "C<guestfs_zero> which just zeroes the first few blocks of a device."
14807 #: ../src/guestfs-actions.pod:6036
14808 msgid "guestfs_zerofree"
14812 #: ../src/guestfs-actions.pod:6038
14816 " guestfs_zerofree (guestfs_h *g,\n"
14817 " const char *device);\n"
14822 #: ../src/guestfs-actions.pod:6042 ../fish/guestfish-actions.pod:4404
14824 "This runs the I<zerofree> program on C<device>. This program claims to zero "
14825 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
14826 "possible to compress the filesystem more effectively."
14830 #: ../src/guestfs-actions.pod:6047 ../fish/guestfish-actions.pod:4409
14831 msgid "You should B<not> run this program if the filesystem is mounted."
14835 #: ../src/guestfs-actions.pod:6050 ../fish/guestfish-actions.pod:4412
14837 "It is possible that using this program can damage the filesystem or data on "
14842 #: ../src/guestfs-actions.pod:6055
14843 msgid "guestfs_zfgrep"
14847 #: ../src/guestfs-actions.pod:6057
14851 " guestfs_zfgrep (guestfs_h *g,\n"
14852 " const char *pattern,\n"
14853 " const char *path);\n"
14858 #: ../src/guestfs-actions.pod:6062 ../fish/guestfish-actions.pod:4419
14860 "This calls the external C<zfgrep> program and returns the matching lines."
14864 #: ../src/guestfs-actions.pod:6072
14865 msgid "guestfs_zfgrepi"
14869 #: ../src/guestfs-actions.pod:6074
14873 " guestfs_zfgrepi (guestfs_h *g,\n"
14874 " const char *pattern,\n"
14875 " const char *path);\n"
14880 #: ../src/guestfs-actions.pod:6079 ../fish/guestfish-actions.pod:4429
14882 "This calls the external C<zfgrep -i> program and returns the matching lines."
14886 #: ../src/guestfs-actions.pod:6089
14887 msgid "guestfs_zfile"
14891 #: ../src/guestfs-actions.pod:6091
14895 " guestfs_zfile (guestfs_h *g,\n"
14896 " const char *meth,\n"
14897 " const char *path);\n"
14902 #: ../src/guestfs-actions.pod:6096 ../fish/guestfish-actions.pod:4439
14904 "This command runs C<file> after first decompressing C<path> using C<method>."
14908 #: ../src/guestfs-actions.pod:6099 ../fish/guestfish-actions.pod:4442
14909 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
14913 #: ../src/guestfs-actions.pod:6101
14915 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
14920 #: ../src/guestfs-actions.pod:6107 ../fish/guestfish-actions.pod:4447
14922 "This function is deprecated. In new code, use the C<file> call instead."
14926 #: ../src/guestfs-actions.pod:6114
14927 msgid "guestfs_zgrep"
14931 #: ../src/guestfs-actions.pod:6116
14935 " guestfs_zgrep (guestfs_h *g,\n"
14936 " const char *regex,\n"
14937 " const char *path);\n"
14942 #: ../src/guestfs-actions.pod:6121 ../fish/guestfish-actions.pod:4458
14944 "This calls the external C<zgrep> program and returns the matching lines."
14948 #: ../src/guestfs-actions.pod:6131
14949 msgid "guestfs_zgrepi"
14953 #: ../src/guestfs-actions.pod:6133
14957 " guestfs_zgrepi (guestfs_h *g,\n"
14958 " const char *regex,\n"
14959 " const char *path);\n"
14964 #: ../src/guestfs-actions.pod:6138 ../fish/guestfish-actions.pod:4468
14966 "This calls the external C<zgrep -i> program and returns the matching lines."
14970 #: ../src/guestfs-availability.pod:3
14975 #: ../src/guestfs-availability.pod:5
14977 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
14978 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
14979 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
14980 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
14981 "L</guestfs_aug_save> L</guestfs_aug_set>"
14985 #: ../src/guestfs-availability.pod:21
14990 #: ../src/guestfs-availability.pod:23
14992 "The following functions: L</guestfs_inotify_add_watch> L</"
14993 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
14994 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
14998 #: ../src/guestfs-availability.pod:31
14999 msgid "B<linuxfsuuid>"
15003 #: ../src/guestfs-availability.pod:33
15005 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
15006 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
15010 #: ../src/guestfs-availability.pod:40
15011 msgid "B<linuxmodules>"
15015 #: ../src/guestfs-availability.pod:42
15016 msgid "The following functions: L</guestfs_modprobe>"
15020 #: ../src/guestfs-availability.pod:45
15021 msgid "B<linuxxattrs>"
15025 #: ../src/guestfs-availability.pod:47
15027 "The following functions: L</guestfs_getxattrs> L</guestfs_lgetxattrs> L</"
15028 "guestfs_lremovexattr> L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</"
15029 "guestfs_removexattr> L</guestfs_setxattr>"
15033 #: ../src/guestfs-availability.pod:56
15038 #: ../src/guestfs-availability.pod:58
15040 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
15041 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
15042 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
15046 #: ../src/guestfs-availability.pod:67
15051 #: ../src/guestfs-availability.pod:69
15053 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
15054 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
15055 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
15056 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
15057 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
15058 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
15059 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
15063 #: ../src/guestfs-availability.pod:92
15068 #: ../src/guestfs-availability.pod:94
15070 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
15071 "guestfs_mknod_b> L</guestfs_mknod_c>"
15075 #: ../src/guestfs-availability.pod:100
15080 #: ../src/guestfs-availability.pod:102
15081 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
15085 #: ../src/guestfs-availability.pod:105
15086 msgid "B<ntfsprogs>"
15090 #: ../src/guestfs-availability.pod:107
15092 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
15096 #: ../src/guestfs-availability.pod:111
15097 msgid "B<realpath>"
15101 #: ../src/guestfs-availability.pod:113
15102 msgid "The following functions: L</guestfs_realpath>"
15106 #: ../src/guestfs-availability.pod:116
15111 #: ../src/guestfs-availability.pod:118
15113 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
15114 "guestfs_scrub_freespace>"
15118 #: ../src/guestfs-availability.pod:123
15123 #: ../src/guestfs-availability.pod:125
15124 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
15128 #: ../src/guestfs-availability.pod:129
15133 #: ../src/guestfs-availability.pod:131
15134 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
15138 #: ../src/guestfs-availability.pod:135
15139 msgid "B<zerofree>"
15143 #: ../src/guestfs-availability.pod:137
15144 msgid "The following functions: L</guestfs_zerofree>"
15148 #: ../src/guestfs-structs.pod:1
15149 msgid "guestfs_int_bool"
15153 #: ../src/guestfs-structs.pod:3
15156 " struct guestfs_int_bool {\n"
15164 #: ../src/guestfs-structs.pod:8
15167 " struct guestfs_int_bool_list {\n"
15168 " uint32_t len; /* Number of elements in list. */\n"
15169 " struct guestfs_int_bool *val; /* Elements. */\n"
15175 #: ../src/guestfs-structs.pod:13
15178 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
15179 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
15184 #: ../src/guestfs-structs.pod:16
15185 msgid "guestfs_lvm_pv"
15189 #: ../src/guestfs-structs.pod:18
15192 " struct guestfs_lvm_pv {\n"
15193 " char *pv_name;\n"
15194 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
15195 " char pv_uuid[32];\n"
15197 " uint64_t pv_size;\n"
15198 " uint64_t dev_size;\n"
15199 " uint64_t pv_free;\n"
15200 " uint64_t pv_used;\n"
15201 " char *pv_attr;\n"
15202 " int64_t pv_pe_count;\n"
15203 " int64_t pv_pe_alloc_count;\n"
15204 " char *pv_tags;\n"
15205 " uint64_t pe_start;\n"
15206 " int64_t pv_mda_count;\n"
15207 " uint64_t pv_mda_free;\n"
15213 #: ../src/guestfs-structs.pod:36
15216 " struct guestfs_lvm_pv_list {\n"
15217 " uint32_t len; /* Number of elements in list. */\n"
15218 " struct guestfs_lvm_pv *val; /* Elements. */\n"
15224 #: ../src/guestfs-structs.pod:41
15227 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
15228 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
15233 #: ../src/guestfs-structs.pod:44
15234 msgid "guestfs_lvm_vg"
15238 #: ../src/guestfs-structs.pod:46
15241 " struct guestfs_lvm_vg {\n"
15242 " char *vg_name;\n"
15243 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
15244 " char vg_uuid[32];\n"
15246 " char *vg_attr;\n"
15247 " uint64_t vg_size;\n"
15248 " uint64_t vg_free;\n"
15249 " char *vg_sysid;\n"
15250 " uint64_t vg_extent_size;\n"
15251 " int64_t vg_extent_count;\n"
15252 " int64_t vg_free_count;\n"
15253 " int64_t max_lv;\n"
15254 " int64_t max_pv;\n"
15255 " int64_t pv_count;\n"
15256 " int64_t lv_count;\n"
15257 " int64_t snap_count;\n"
15258 " int64_t vg_seqno;\n"
15259 " char *vg_tags;\n"
15260 " int64_t vg_mda_count;\n"
15261 " uint64_t vg_mda_free;\n"
15267 #: ../src/guestfs-structs.pod:69
15270 " struct guestfs_lvm_vg_list {\n"
15271 " uint32_t len; /* Number of elements in list. */\n"
15272 " struct guestfs_lvm_vg *val; /* Elements. */\n"
15278 #: ../src/guestfs-structs.pod:74
15281 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
15282 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
15287 #: ../src/guestfs-structs.pod:77
15288 msgid "guestfs_lvm_lv"
15292 #: ../src/guestfs-structs.pod:79
15295 " struct guestfs_lvm_lv {\n"
15296 " char *lv_name;\n"
15297 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
15298 " char lv_uuid[32];\n"
15299 " char *lv_attr;\n"
15300 " int64_t lv_major;\n"
15301 " int64_t lv_minor;\n"
15302 " int64_t lv_kernel_major;\n"
15303 " int64_t lv_kernel_minor;\n"
15304 " uint64_t lv_size;\n"
15305 " int64_t seg_count;\n"
15307 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
15308 " float snap_percent;\n"
15309 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
15310 " float copy_percent;\n"
15311 " char *move_pv;\n"
15312 " char *lv_tags;\n"
15313 " char *mirror_log;\n"
15314 " char *modules;\n"
15320 #: ../src/guestfs-structs.pod:101
15323 " struct guestfs_lvm_lv_list {\n"
15324 " uint32_t len; /* Number of elements in list. */\n"
15325 " struct guestfs_lvm_lv *val; /* Elements. */\n"
15331 #: ../src/guestfs-structs.pod:106
15334 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
15335 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
15340 #: ../src/guestfs-structs.pod:111
15343 " struct guestfs_stat {\n"
15347 " int64_t nlink;\n"
15352 " int64_t blksize;\n"
15353 " int64_t blocks;\n"
15354 " int64_t atime;\n"
15355 " int64_t mtime;\n"
15356 " int64_t ctime;\n"
15362 #: ../src/guestfs-structs.pod:127
15365 " struct guestfs_stat_list {\n"
15366 " uint32_t len; /* Number of elements in list. */\n"
15367 " struct guestfs_stat *val; /* Elements. */\n"
15373 #: ../src/guestfs-structs.pod:132
15376 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
15377 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
15382 #: ../src/guestfs-structs.pod:137
15385 " struct guestfs_statvfs {\n"
15386 " int64_t bsize;\n"
15387 " int64_t frsize;\n"
15388 " int64_t blocks;\n"
15389 " int64_t bfree;\n"
15390 " int64_t bavail;\n"
15391 " int64_t files;\n"
15392 " int64_t ffree;\n"
15393 " int64_t favail;\n"
15396 " int64_t namemax;\n"
15402 #: ../src/guestfs-structs.pod:151
15405 " struct guestfs_statvfs_list {\n"
15406 " uint32_t len; /* Number of elements in list. */\n"
15407 " struct guestfs_statvfs *val; /* Elements. */\n"
15413 #: ../src/guestfs-structs.pod:156
15416 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
15417 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
15422 #: ../src/guestfs-structs.pod:159
15423 msgid "guestfs_dirent"
15427 #: ../src/guestfs-structs.pod:161
15430 " struct guestfs_dirent {\n"
15439 #: ../src/guestfs-structs.pod:167
15442 " struct guestfs_dirent_list {\n"
15443 " uint32_t len; /* Number of elements in list. */\n"
15444 " struct guestfs_dirent *val; /* Elements. */\n"
15450 #: ../src/guestfs-structs.pod:172
15453 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
15454 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
15459 #: ../src/guestfs-structs.pod:177
15462 " struct guestfs_version {\n"
15463 " int64_t major;\n"
15464 " int64_t minor;\n"
15465 " int64_t release;\n"
15472 #: ../src/guestfs-structs.pod:184
15475 " struct guestfs_version_list {\n"
15476 " uint32_t len; /* Number of elements in list. */\n"
15477 " struct guestfs_version *val; /* Elements. */\n"
15483 #: ../src/guestfs-structs.pod:189
15486 " void guestfs_free_version (struct guestfs_free_version *);\n"
15487 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
15492 #: ../src/guestfs-structs.pod:192
15493 msgid "guestfs_xattr"
15497 #: ../src/guestfs-structs.pod:194
15500 " struct guestfs_xattr {\n"
15501 " char *attrname;\n"
15502 " /* The next two fields describe a byte array. */\n"
15503 " uint32_t attrval_len;\n"
15504 " char *attrval;\n"
15510 #: ../src/guestfs-structs.pod:201
15513 " struct guestfs_xattr_list {\n"
15514 " uint32_t len; /* Number of elements in list. */\n"
15515 " struct guestfs_xattr *val; /* Elements. */\n"
15521 #: ../src/guestfs-structs.pod:206
15524 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
15525 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
15530 #: ../src/guestfs-structs.pod:209
15531 msgid "guestfs_inotify_event"
15535 #: ../src/guestfs-structs.pod:211
15538 " struct guestfs_inotify_event {\n"
15539 " int64_t in_wd;\n"
15540 " uint32_t in_mask;\n"
15541 " uint32_t in_cookie;\n"
15542 " char *in_name;\n"
15548 #: ../src/guestfs-structs.pod:218
15551 " struct guestfs_inotify_event_list {\n"
15552 " uint32_t len; /* Number of elements in list. */\n"
15553 " struct guestfs_inotify_event *val; /* Elements. */\n"
15559 #: ../src/guestfs-structs.pod:223
15562 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
15563 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
15568 #: ../src/guestfs-structs.pod:226
15569 msgid "guestfs_partition"
15573 #: ../src/guestfs-structs.pod:228
15576 " struct guestfs_partition {\n"
15577 " int32_t part_num;\n"
15578 " uint64_t part_start;\n"
15579 " uint64_t part_end;\n"
15580 " uint64_t part_size;\n"
15586 #: ../src/guestfs-structs.pod:235
15589 " struct guestfs_partition_list {\n"
15590 " uint32_t len; /* Number of elements in list. */\n"
15591 " struct guestfs_partition *val; /* Elements. */\n"
15597 #: ../src/guestfs-structs.pod:240
15600 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
15601 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
15606 #: ../fish/guestfish.pod:5
15607 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
15611 #: ../fish/guestfish.pod:9
15614 " guestfish [--options] [commands]\n"
15619 #: ../fish/guestfish.pod:11
15627 #: ../fish/guestfish.pod:13
15630 " guestfish -a disk.img\n"
15635 #: ../fish/guestfish.pod:15
15638 " guestfish -a disk.img -m dev[:mountpoint]\n"
15643 #: ../fish/guestfish.pod:17
15646 " guestfish -d libvirt-domain\n"
15651 #: ../fish/guestfish.pod:19
15654 " guestfish -a disk.img -i\n"
15659 #: ../fish/guestfish.pod:21
15662 " guestfish -d libvirt-domain -i\n"
15667 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15 ../tools/virt-edit.pl:44
15668 #: ../tools/virt-win-reg.pl:51 ../tools/virt-tar.pl:59
15669 #: ../tools/virt-rescue.pl:41
15674 #: ../fish/guestfish.pod:25
15676 "Using guestfish in read/write mode on live virtual machines can be "
15677 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
15678 "option to use guestfish safely if the disk image or virtual machine might be "
15683 #: ../fish/guestfish.pod:32
15685 "Guestfish is a shell and command-line tool for examining and modifying "
15686 "virtual machine filesystems. It uses libguestfs and exposes all of the "
15687 "functionality of the guestfs API, see L<guestfs(3)>."
15691 #: ../fish/guestfish.pod:36
15693 "Guestfish gives you structured access to the libguestfs API, from shell "
15694 "scripts or the command line or interactively. If you want to rescue a "
15695 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
15700 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:800
15701 #: ../fuse/guestmount.pod:39 ../tools/virt-edit.pl:58
15702 #: ../tools/virt-resize.pl:66 ../tools/virt-cat.pl:50 ../tools/virt-tar.pl:45
15707 #: ../fish/guestfish.pod:43
15708 msgid "As an interactive shell"
15712 #: ../fish/guestfish.pod:45
15720 #: ../fish/guestfish.pod:47
15723 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
15724 " editing virtual machine filesystems.\n"
15729 #: ../fish/guestfish.pod:50
15732 " Type: 'help' for a list of commands\n"
15733 " 'man' to read the manual\n"
15734 " 'quit' to quit the shell\n"
15739 #: ../fish/guestfish.pod:54
15742 " ><fs> add-ro disk.img\n"
15744 " ><fs> list-filesystems\n"
15745 " /dev/sda1: ext4\n"
15746 " /dev/vg_guest/lv_root: ext4\n"
15747 " /dev/vg_guest/lv_swap: swap\n"
15748 " ><fs> mount /dev/vg_guest/lv_root /\n"
15749 " ><fs> cat /etc/fstab\n"
15751 " # Created by anaconda\n"
15758 #: ../fish/guestfish.pod:67
15759 msgid "From shell scripts"
15763 #: ../fish/guestfish.pod:69
15764 msgid "Create a new C</etc/motd> file in a guest or disk image:"
15768 #: ../fish/guestfish.pod:71
15771 " guestfish <<_EOF_\n"
15774 " mount /dev/vg_guest/lv_root /\n"
15775 " write /etc/motd \"Welcome, new users\"\n"
15781 #: ../fish/guestfish.pod:78
15782 msgid "List the LVM logical volumes in a disk image:"
15786 #: ../fish/guestfish.pod:80
15789 " guestfish -a disk.img --ro <<_EOF_\n"
15797 #: ../fish/guestfish.pod:85
15798 msgid "List all the filesystems in a disk image:"
15802 #: ../fish/guestfish.pod:87
15805 " guestfish -a disk.img --ro <<_EOF_\n"
15807 " list-filesystems\n"
15813 #: ../fish/guestfish.pod:92
15814 msgid "On one command line"
15818 #: ../fish/guestfish.pod:94
15819 msgid "Update C</etc/resolv.conf> in a guest:"
15823 #: ../fish/guestfish.pod:96
15827 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
15828 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
15833 #: ../fish/guestfish.pod:100
15834 msgid "Edit C</boot/grub/grub.conf> interactively:"
15838 #: ../fish/guestfish.pod:102
15841 " guestfish --add disk.img \\\n"
15842 " --mount /dev/vg_guest/lv_root \\\n"
15843 " --mount /dev/sda1:/boot \\\n"
15844 " edit /boot/grub/grub.conf\n"
15849 #: ../fish/guestfish.pod:107
15850 msgid "Mount disks automatically"
15854 #: ../fish/guestfish.pod:109
15856 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
15860 #: ../fish/guestfish.pod:112
15863 " guestfish --ro -a disk.img -i cat /etc/group\n"
15868 #: ../fish/guestfish.pod:114
15871 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
15876 #: ../fish/guestfish.pod:116
15877 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
15881 #: ../fish/guestfish.pod:118
15884 " guestfish -a disk.img -i edit /boot/grub/grub.conf\n"
15889 #: ../fish/guestfish.pod:120
15890 msgid "As a script interpreter"
15894 #: ../fish/guestfish.pod:122
15895 msgid "Create a 100MB disk containing an ext2-formatted partition:"
15899 #: ../fish/guestfish.pod:124
15902 " #!/usr/bin/guestfish -f\n"
15903 " sparse test1.img 100M\n"
15905 " part-disk /dev/sda mbr\n"
15906 " mkfs ext2 /dev/sda1\n"
15911 #: ../fish/guestfish.pod:130
15912 msgid "Start with a prepared disk"
15916 #: ../fish/guestfish.pod:132
15918 "An alternate way to create a 100MB disk called C<test1.img> containing a "
15919 "single ext2-formatted partition:"
15923 #: ../fish/guestfish.pod:135
15926 " guestfish -N fs\n"
15931 #: ../fish/guestfish.pod:137
15932 msgid "To list what is available do:"
15936 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:791
15939 " guestfish -N help | less\n"
15944 #: ../fish/guestfish.pod:141
15945 msgid "Remote control"
15949 #: ../fish/guestfish.pod:143
15952 " eval `guestfish --listen`\n"
15953 " guestfish --remote add-ro disk.img\n"
15954 " guestfish --remote run\n"
15955 " guestfish --remote lvs\n"
15960 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37
15961 #: ../fuse/guestmount.pod:73 ../inspector/virt-inspector.pl:68
15962 #: ../tools/virt-edit.pl:72 ../tools/virt-win-reg.pl:171
15963 #: ../tools/virt-df.pl:71 ../tools/virt-ls.pl:78 ../tools/virt-resize.pl:257
15964 #: ../tools/virt-list-filesystems.pl:50 ../tools/virt-cat.pl:79
15965 #: ../tools/virt-tar.pl:98 ../tools/virt-rescue.pl:103
15966 #: ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:51
15971 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:124
15972 #: ../inspector/virt-inspector.pl:76 ../tools/virt-edit.pl:80
15973 #: ../tools/virt-win-reg.pl:179 ../tools/virt-df.pl:79 ../tools/virt-ls.pl:86
15974 #: ../tools/virt-resize.pl:265 ../tools/virt-list-filesystems.pl:58
15975 #: ../tools/virt-cat.pl:87 ../tools/virt-tar.pl:106
15976 #: ../tools/virt-rescue.pl:111 ../tools/virt-make-fs.pl:161
15977 #: ../tools/virt-list-partitions.pl:59
15982 #: ../fish/guestfish.pod:154
15983 msgid "Displays general help on options."
15987 #: ../fish/guestfish.pod:156
15988 msgid "B<-h> | B<--cmd-help>"
15992 #: ../fish/guestfish.pod:158
15993 msgid "Lists all available guestfish commands."
15997 #: ../fish/guestfish.pod:160
15998 msgid "B<-h cmd> | B<--cmd-help cmd>"
16002 #: ../fish/guestfish.pod:162
16003 msgid "Displays detailed help on a single command C<cmd>."
16007 #: ../fish/guestfish.pod:164 ../fuse/guestmount.pod:77
16008 msgid "B<-a image> | B<--add image>"
16012 #: ../fish/guestfish.pod:166
16013 msgid "Add a block device or virtual machine image to the shell."
16017 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:81
16019 "The format of the disk image is auto-detected. To override this and force a "
16020 "particular format use the I<--format=..> option."
16024 #: ../fish/guestfish.pod:171 ../fuse/guestmount.pod:84
16025 msgid "B<-c URI> | B<--connect URI>"
16029 #: ../fish/guestfish.pod:173 ../fuse/guestmount.pod:86
16031 "When used in conjunction with the I<-d> option, this specifies the libvirt "
16032 "URI to use. The default is to use the default libvirt connection."
16036 #: ../fish/guestfish.pod:177 ../fuse/guestmount.pod:90
16037 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
16041 #: ../fish/guestfish.pod:179 ../fuse/guestmount.pod:92
16043 "Add disks from the named libvirt domain. If the I<--ro> option is also "
16044 "used, then any libvirt domain can be used. However in write mode, only "
16045 "libvirt domains which are shut down can be named here."
16049 #: ../fish/guestfish.pod:183
16050 msgid "B<-D> | B<--no-dest-paths>"
16054 #: ../fish/guestfish.pod:185
16056 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
16057 "to hit the tab key to complete paths on the guest filesystem, but this "
16058 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
16059 "allow this feature to be disabled."
16063 #: ../fish/guestfish.pod:190
16064 msgid "B<--echo-keys>"
16068 #: ../fish/guestfish.pod:192
16070 "When prompting for keys and passphrases, guestfish normally turns echoing "
16071 "off so you cannot see what you are typing. If you are not worried about "
16072 "Tempest attacks and there is no one else in the room you can specify this "
16073 "flag to see what you are typing."
16077 #: ../fish/guestfish.pod:197
16078 msgid "B<-f file> | B<--file file>"
16082 #: ../fish/guestfish.pod:199
16083 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
16087 #: ../fish/guestfish.pod:202
16090 " #!/usr/bin/guestfish -f\n"
16095 #: ../fish/guestfish.pod:204 ../fuse/guestmount.pod:108
16096 msgid "B<--format=raw|qcow2|..> | B<--format>"
16100 #: ../fish/guestfish.pod:206 ../fuse/guestmount.pod:110
16102 "The default for the I<-a> option is to auto-detect the format of the disk "
16103 "image. Using this forces the disk format for I<-a> options which follow on "
16104 "the command line. Using I<--format> with no argument switches back to auto-"
16105 "detection for subsequent I<-a> options."
16109 #: ../fish/guestfish.pod:211 ../fish/guestfish.pod:504
16110 #: ../inspector/virt-inspector.pl:549
16111 msgid "For example:"
16115 #: ../fish/guestfish.pod:213
16118 " guestfish --format=raw -a disk.img\n"
16123 #: ../fish/guestfish.pod:215
16124 msgid "forces raw format (no auto-detection) for C<disk.img>."
16128 #: ../fish/guestfish.pod:217
16131 " guestfish --format=raw -a disk.img --format -a another.img\n"
16136 #: ../fish/guestfish.pod:219
16138 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
16139 "detection for C<another.img>."
16143 #: ../fish/guestfish.pod:222
16145 "If you have untrusted raw-format guest disk images, you should use this "
16146 "option to specify the disk format. This avoids a possible security problem "
16147 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
16151 #: ../fish/guestfish.pod:227 ../fuse/guestmount.pod:128
16152 msgid "B<-i> | B<--inspector>"
16156 #: ../fish/guestfish.pod:229 ../fuse/guestmount.pod:130
16158 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
16159 "system and mount filesystems as they would be mounted on the real virtual "
16164 #: ../fish/guestfish.pod:233
16165 msgid "Typical usage is either:"
16169 #: ../fish/guestfish.pod:235
16172 " guestfish -d myguest -i\n"
16177 #: ../fish/guestfish.pod:237
16178 msgid "(for an inactive libvirt domain called I<myguest>), or:"
16182 #: ../fish/guestfish.pod:239
16185 " guestfish --ro -d myguest -i\n"
16190 #: ../fish/guestfish.pod:241
16191 msgid "(for active domains, readonly), or specify the block device directly:"
16195 #: ../fish/guestfish.pod:243
16198 " guestfish -a /dev/Guests/MyGuest -i\n"
16203 #: ../fish/guestfish.pod:245
16205 "Note that the command line syntax changed slightly over older versions of "
16206 "guestfish. You can still use the old syntax:"
16210 #: ../fish/guestfish.pod:248
16213 " guestfish [--ro] -i disk.img\n"
16218 #: ../fish/guestfish.pod:250
16221 " guestfish [--ro] -i libvirt-domain\n"
16226 #: ../fish/guestfish.pod:252
16227 msgid "B<--keys-from-stdin>"
16231 #: ../fish/guestfish.pod:254
16233 "Read key or passphrase parameters from stdin. The default is to try to read "
16234 "passphrases from the user by opening C</dev/tty>."
16238 #: ../fish/guestfish.pod:257
16239 msgid "B<--listen>"
16243 #: ../fish/guestfish.pod:259
16245 "Fork into the background and listen for remote commands. See section L</"
16246 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
16250 #: ../fish/guestfish.pod:262
16251 msgid "B<-m dev[:mountpoint]> | B<--mount dev[:mountpoint]>"
16255 #: ../fish/guestfish.pod:264
16256 msgid "Mount the named partition or logical volume on the given mountpoint."
16260 #: ../fish/guestfish.pod:266
16261 msgid "If the mountpoint is omitted, it defaults to C</>."
16265 #: ../fish/guestfish.pod:268
16266 msgid "You have to mount something on C</> before most commands will work."
16270 #: ../fish/guestfish.pod:270
16272 "If any I<-m> or I<--mount> options are given, the guest is automatically "
16277 #: ../fish/guestfish.pod:273
16279 "If you don't know what filesystems a disk image contains, you can either run "
16280 "guestfish without this option, then list the partitions and LVs available "
16281 "(see L</list-partitions> and L</lvs> commands), or you can use the L<virt-"
16282 "list-filesystems(1)> program."
16286 #: ../fish/guestfish.pod:278 ../fuse/guestmount.pod:142
16287 msgid "B<-n> | B<--no-sync>"
16291 #: ../fish/guestfish.pod:280
16293 "Disable autosync. This is enabled by default. See the discussion of "
16294 "autosync in the L<guestfs(3)> manpage."
16298 #: ../fish/guestfish.pod:283
16299 msgid "B<-N type> | B<--new type> | B<-N help>"
16303 #: ../fish/guestfish.pod:285
16305 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
16306 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
16307 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
16312 #: ../fish/guestfish.pod:290
16313 msgid "B<--progress-bars>"
16317 #: ../fish/guestfish.pod:292
16318 msgid "Enable progress bars, even when guestfish is used non-interactively."
16322 #: ../fish/guestfish.pod:294
16324 "Progress bars are enabled by default when guestfish is used as an "
16325 "interactive shell."
16329 #: ../fish/guestfish.pod:297
16330 msgid "B<--no-progress-bars>"
16334 #: ../fish/guestfish.pod:299
16335 msgid "Disable progress bars."
16339 #: ../fish/guestfish.pod:301
16340 msgid "B<--remote[=pid]>"
16344 #: ../fish/guestfish.pod:303
16346 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
16347 "CONTROL GUESTFISH OVER A SOCKET> below."
16351 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
16352 msgid "B<-r> | B<--ro>"
16356 #: ../fish/guestfish.pod:308
16358 "This changes the I<-a> and I<-m> options so that disks are added and mounts "
16359 "are done read-only (see L<guestfs(3)/guestfs_mount_ro>)."
16363 #: ../fish/guestfish.pod:311 ../tools/virt-rescue.pl:187
16365 "The option must always be used if the disk image or virtual machine might be "
16366 "running, and is generally recommended in cases where you don't need write "
16367 "access to the disk."
16371 #: ../fish/guestfish.pod:315
16373 "Note that prepared disk images created with I<-N> are not affected by the "
16378 #: ../fish/guestfish.pod:318 ../fuse/guestmount.pod:194
16379 #: ../tools/virt-rescue.pl:195
16380 msgid "B<--selinux>"
16384 #: ../fish/guestfish.pod:320
16385 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
16389 #: ../fish/guestfish.pod:322 ../fuse/guestmount.pod:198
16390 msgid "B<-v> | B<--verbose>"
16394 #: ../fish/guestfish.pod:324
16396 "Enable very verbose messages. This is particularly useful if you find a bug."
16400 #: ../fish/guestfish.pod:327 ../fuse/guestmount.pod:202
16401 msgid "B<-V> | B<--version>"
16405 #: ../fish/guestfish.pod:329
16406 msgid "Display the guestfish / libguestfs version number and exit."
16410 #: ../fish/guestfish.pod:331
16415 #: ../fish/guestfish.pod:333
16416 msgid "Echo each command before executing it."
16420 #: ../fish/guestfish.pod:337
16421 msgid "COMMANDS ON COMMAND LINE"
16425 #: ../fish/guestfish.pod:339
16427 "Any additional (non-option) arguments are treated as commands to execute."
16431 #: ../fish/guestfish.pod:342
16433 "Commands to execute should be separated by a colon (C<:>), where the colon "
16434 "is a separate parameter. Thus:"
16438 #: ../fish/guestfish.pod:345
16441 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
16446 #: ../fish/guestfish.pod:347
16448 "If there are no additional arguments, then we enter a shell, either an "
16449 "interactive shell with a prompt (if the input is a terminal) or a non-"
16450 "interactive shell."
16454 #: ../fish/guestfish.pod:351
16456 "In either command line mode or non-interactive shell, the first command that "
16457 "gives an error causes the whole shell to exit. In interactive mode (with a "
16458 "prompt) if a command fails, you can continue to enter commands."
16462 #: ../fish/guestfish.pod:356
16463 msgid "USING launch (OR run)"
16467 #: ../fish/guestfish.pod:358
16469 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
16470 "then launch it, then mount any disks you need, and finally issue actions/"
16471 "commands. So the general order of the day is:"
16475 #: ../fish/guestfish.pod:366
16476 msgid "add or -a/--add"
16480 #: ../fish/guestfish.pod:370
16481 msgid "launch (aka run)"
16485 #: ../fish/guestfish.pod:374
16486 msgid "mount or -m/--mount"
16490 #: ../fish/guestfish.pod:378
16491 msgid "any other commands"
16495 #: ../fish/guestfish.pod:382
16497 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
16498 "guest before mounting or performing any other commands."
16502 #: ../fish/guestfish.pod:385
16504 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
16505 "I<--new> options were given then C<run> is done automatically, simply "
16506 "because guestfish can't perform the action you asked for without doing this."
16510 #: ../fish/guestfish.pod:390
16515 #: ../fish/guestfish.pod:392
16517 "You can quote ordinary parameters using either single or double quotes. For "
16522 #: ../fish/guestfish.pod:395
16525 " add \"file with a space.img\"\n"
16530 #: ../fish/guestfish.pod:397
16533 " rm '/file name'\n"
16538 #: ../fish/guestfish.pod:399
16546 #: ../fish/guestfish.pod:401
16548 "A few commands require a list of strings to be passed. For these, use a "
16549 "whitespace-separated list, enclosed in quotes. Strings containing "
16550 "whitespace to be passed through must be enclosed in single quotes. A "
16551 "literal single quote must be escaped with a backslash."
16555 #: ../fish/guestfish.pod:406
16558 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
16559 " command \"/bin/echo 'foo bar'\"\n"
16560 " command \"/bin/echo \\'foo\\'\"\n"
16565 #: ../fish/guestfish.pod:410
16566 msgid "OPTIONAL ARGUMENTS"
16570 #: ../fish/guestfish.pod:412
16572 "Some commands take optional arguments. These arguments appear in this "
16573 "documentation as C<[argname:..]>. You can use them as in these examples:"
16577 #: ../fish/guestfish.pod:416
16580 " add-drive-opts filename\n"
16585 #: ../fish/guestfish.pod:418
16588 " add-drive-opts filename readonly:true\n"
16593 #: ../fish/guestfish.pod:420
16596 " add-drive-opts filename format:qcow2 readonly:false\n"
16601 #: ../fish/guestfish.pod:422
16603 "Each optional argument can appear at most once. All optional arguments must "
16604 "appear after the required ones."
16608 #: ../fish/guestfish.pod:425
16613 #: ../fish/guestfish.pod:427
16615 "This section applies to all commands which can take integers as parameters."
16619 #: ../fish/guestfish.pod:430
16620 msgid "SIZE SUFFIX"
16624 #: ../fish/guestfish.pod:432
16626 "When the command takes a parameter measured in bytes, you can use one of the "
16627 "following suffixes to specify kilobytes, megabytes and larger sizes:"
16631 #: ../fish/guestfish.pod:438
16632 msgid "B<k> or B<K> or B<KiB>"
16636 #: ../fish/guestfish.pod:440
16637 msgid "The size in kilobytes (multiplied by 1024)."
16641 #: ../fish/guestfish.pod:442
16646 #: ../fish/guestfish.pod:444
16647 msgid "The size in SI 1000 byte units."
16651 #: ../fish/guestfish.pod:446
16652 msgid "B<M> or B<MiB>"
16656 #: ../fish/guestfish.pod:448
16657 msgid "The size in megabytes (multiplied by 1048576)."
16661 #: ../fish/guestfish.pod:450
16666 #: ../fish/guestfish.pod:452
16667 msgid "The size in SI 1000000 byte units."
16671 #: ../fish/guestfish.pod:454
16672 msgid "B<G> or B<GiB>"
16676 #: ../fish/guestfish.pod:456
16677 msgid "The size in gigabytes (multiplied by 2**30)."
16681 #: ../fish/guestfish.pod:458
16686 #: ../fish/guestfish.pod:460
16687 msgid "The size in SI 10**9 byte units."
16691 #: ../fish/guestfish.pod:462
16692 msgid "B<T> or B<TiB>"
16696 #: ../fish/guestfish.pod:464
16697 msgid "The size in terabytes (multiplied by 2**40)."
16701 #: ../fish/guestfish.pod:466
16706 #: ../fish/guestfish.pod:468
16707 msgid "The size in SI 10**12 byte units."
16711 #: ../fish/guestfish.pod:470
16712 msgid "B<P> or B<PiB>"
16716 #: ../fish/guestfish.pod:472
16717 msgid "The size in petabytes (multiplied by 2**50)."
16721 #: ../fish/guestfish.pod:474
16726 #: ../fish/guestfish.pod:476
16727 msgid "The size in SI 10**15 byte units."
16731 #: ../fish/guestfish.pod:478
16732 msgid "B<E> or B<EiB>"
16736 #: ../fish/guestfish.pod:480
16737 msgid "The size in exabytes (multiplied by 2**60)."
16741 #: ../fish/guestfish.pod:482
16746 #: ../fish/guestfish.pod:484
16747 msgid "The size in SI 10**18 byte units."
16751 #: ../fish/guestfish.pod:486
16752 msgid "B<Z> or B<ZiB>"
16756 #: ../fish/guestfish.pod:488
16757 msgid "The size in zettabytes (multiplied by 2**70)."
16761 #: ../fish/guestfish.pod:490
16766 #: ../fish/guestfish.pod:492
16767 msgid "The size in SI 10**21 byte units."
16771 #: ../fish/guestfish.pod:494
16772 msgid "B<Y> or B<YiB>"
16776 #: ../fish/guestfish.pod:496
16777 msgid "The size in yottabytes (multiplied by 2**80)."
16781 #: ../fish/guestfish.pod:498
16786 #: ../fish/guestfish.pod:500
16787 msgid "The size in SI 10**24 byte units."
16791 #: ../fish/guestfish.pod:506
16794 " truncate-size /file 1G\n"
16799 #: ../fish/guestfish.pod:508
16800 msgid "would truncate the file to 1 gigabyte."
16804 #: ../fish/guestfish.pod:510
16806 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
16807 "the parameter to L</memsize> is specified in megabytes already). Adding a "
16808 "suffix will probably not do what you expect."
16812 #: ../fish/guestfish.pod:514
16813 msgid "OCTAL AND HEXADECIMAL NUMBERS"
16817 #: ../fish/guestfish.pod:516
16819 "For specifying the radix (base) use the C convention: C<0> to prefix an "
16820 "octal number or C<0x> to prefix a hexadecimal number. For example:"
16824 #: ../fish/guestfish.pod:519
16827 " 1234 decimal number 1234\n"
16828 " 02322 octal number, equivalent to decimal 1234\n"
16829 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
16834 #: ../fish/guestfish.pod:523
16836 "When using the C<chmod> command, you almost always want to specify an octal "
16837 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
16838 "L<chmod(1)> program):"
16842 #: ../fish/guestfish.pod:527
16845 " chmod 0777 /public # OK\n"
16846 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
16851 #: ../fish/guestfish.pod:530
16853 "Commands that return numbers usually print them in decimal, but some "
16854 "commands print numbers in other radices (eg. C<umask> prints the mode in "
16855 "octal, preceeded by C<0>)."
16859 #: ../fish/guestfish.pod:534
16860 msgid "WILDCARDS AND GLOBBING"
16864 #: ../fish/guestfish.pod:536
16866 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
16867 "(globbing) by default. So for example the following will not do what you "
16872 #: ../fish/guestfish.pod:540
16880 #: ../fish/guestfish.pod:542
16882 "Assuming you don't have a directory called literally C</home/*> then the "
16883 "above command will return an error."
16887 #: ../fish/guestfish.pod:545
16888 msgid "To perform wildcard expansion, use the C<glob> command."
16892 #: ../fish/guestfish.pod:547
16895 " glob rm-rf /home/*\n"
16900 #: ../fish/guestfish.pod:549
16902 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
16903 "many times), equivalent to:"
16907 #: ../fish/guestfish.pod:552
16910 " rm-rf /home/jim\n"
16911 " rm-rf /home/joe\n"
16912 " rm-rf /home/mary\n"
16917 #: ../fish/guestfish.pod:556
16918 msgid "C<glob> only works on simple guest paths and not on device names."
16922 #: ../fish/guestfish.pod:558
16924 "If you have several parameters, each containing a wildcard, then glob will "
16925 "perform a Cartesian product."
16929 #: ../fish/guestfish.pod:561
16934 #: ../fish/guestfish.pod:563
16936 "Any line which starts with a I<#> character is treated as a comment and "
16937 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
16938 "a command. For example:"
16942 #: ../fish/guestfish.pod:567
16945 " # this is a comment\n"
16946 " # this is a comment\n"
16947 " foo # NOT a comment\n"
16952 #: ../fish/guestfish.pod:571
16953 msgid "Blank lines are also ignored."
16957 #: ../fish/guestfish.pod:573
16958 msgid "RUNNING COMMANDS LOCALLY"
16962 #: ../fish/guestfish.pod:575
16964 "Any line which starts with a I<!> character is treated as a command sent to "
16965 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
16969 #: ../fish/guestfish.pod:579
16973 " tgz-out /remote local/remote-data.tar.gz\n"
16978 #: ../fish/guestfish.pod:582
16980 "will create a directory C<local> on the host, and then export the contents "
16981 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
16982 "(See C<tgz-out>)."
16986 #: ../fish/guestfish.pod:586
16988 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
16989 "effect, due to the way that subprocesses work in Unix."
16993 #: ../fish/guestfish.pod:589
16998 #: ../fish/guestfish.pod:591
17000 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
17001 "command (a guestfish command) to the second command (any host command). For "
17006 #: ../fish/guestfish.pod:595
17009 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
17014 #: ../fish/guestfish.pod:597
17016 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
17017 "program). The above command would list all accounts in the guest filesystem "
17018 "which have UID 0, ie. root accounts including backdoors. Other examples:"
17022 #: ../fish/guestfish.pod:602
17025 " hexdump /bin/ls | head\n"
17026 " list-devices | tail -1\n"
17027 " tgz-out / - | tar ztf -\n"
17032 #: ../fish/guestfish.pod:606
17034 "The space before the pipe symbol is required, any space after the pipe "
17035 "symbol is optional. Everything after the pipe symbol is just passed "
17036 "straight to the host shell, so it can contain redirections, globs and "
17037 "anything else that makes sense on the host side."
17041 #: ../fish/guestfish.pod:611
17043 "To use a literal argument which begins with a pipe symbol, you have to quote "
17048 #: ../fish/guestfish.pod:614
17056 #: ../fish/guestfish.pod:616
17057 msgid "HOME DIRECTORIES"
17061 #: ../fish/guestfish.pod:618
17063 "If a parameter starts with the character C<~> then the tilde may be expanded "
17064 "as a home directory path (either C<~> for the current user's home directory, "
17065 "or C<~user> for another user)."
17069 #: ../fish/guestfish.pod:622
17071 "Note that home directory expansion happens for users known I<on the host>, "
17072 "not in the guest filesystem."
17076 #: ../fish/guestfish.pod:625
17078 "To use a literal argument which begins with a tilde, you have to quote it, "
17083 #: ../fish/guestfish.pod:628
17091 #: ../fish/guestfish.pod:632
17093 "Libguestfs has some support for Linux guests encrypted according to the "
17094 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
17095 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
17096 "LUKS is supported."
17100 #: ../fish/guestfish.pod:637
17101 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
17105 #: ../fish/guestfish.pod:639
17108 " ><fs> vfs-type /dev/sda2\n"
17114 #: ../fish/guestfish.pod:642
17116 "Then open those devices using L</luks-open>. This creates a device-mapper "
17117 "device called C</dev/mapper/luksdev>."
17121 #: ../fish/guestfish.pod:645
17124 " ><fs> luks-open /dev/sda2 luksdev\n"
17125 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
17130 #: ../fish/guestfish.pod:648
17132 "Finally you have to tell LVM to scan for volume groups on the newly created "
17137 #: ../fish/guestfish.pod:651
17141 " vg-activate-all true\n"
17146 #: ../fish/guestfish.pod:654
17147 msgid "The logical volume(s) can now be mounted in the usual way."
17151 #: ../fish/guestfish.pod:656
17153 "Before closing a LUKS device you must unmount any logical volumes on it and "
17154 "deactivate the volume groups by calling C<vg-activate false VG> on each "
17155 "one. Then you can close the mapper device:"
17159 #: ../fish/guestfish.pod:660
17162 " vg-activate false /dev/VG\n"
17163 " luks-close /dev/mapper/luksdev\n"
17168 #: ../fish/guestfish.pod:663
17169 msgid "WINDOWS PATHS"
17173 #: ../fish/guestfish.pod:665
17175 "If a path is prefixed with C<win:> then you can use Windows-style paths "
17176 "(with some limitations). The following commands are equivalent:"
17180 #: ../fish/guestfish.pod:668
17183 " file /WINDOWS/system32/config/system.LOG\n"
17188 #: ../fish/guestfish.pod:670
17191 " file win:/windows/system32/config/system.log\n"
17196 #: ../fish/guestfish.pod:672
17199 " file win:\\windows\\system32\\config\\system.log\n"
17204 #: ../fish/guestfish.pod:674
17207 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
17212 #: ../fish/guestfish.pod:676
17214 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
17215 "handles case insensitivity like Windows would. This only works in argument "
17216 "positions that expect a path."
17220 #: ../fish/guestfish.pod:680
17221 msgid "UPLOADING AND DOWNLOADING FILES"
17225 #: ../fish/guestfish.pod:682
17227 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
17228 "others which upload from or download to a local file, you can use the "
17229 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
17233 #: ../fish/guestfish.pod:686
17241 #: ../fish/guestfish.pod:688
17243 "reads stdin and creates from that a file C</foo> in the disk image, and:"
17247 #: ../fish/guestfish.pod:691
17250 " tar-out /etc - | tar tf -\n"
17255 #: ../fish/guestfish.pod:693
17257 "writes the tarball to stdout and then pipes that into the external \"tar\" "
17258 "command (see L</PIPES>)."
17262 #: ../fish/guestfish.pod:696
17264 "When using C<-> to read from stdin, the input is read up to the end of "
17265 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
17266 "some arbitrary end marker:"
17270 #: ../fish/guestfish.pod:700
17273 " upload -<<END /foo\n"
17282 #: ../fish/guestfish.pod:706
17284 "Any string of characters can be used instead of C<END>. The end marker must "
17285 "appear on a line of its own, without any preceeding or following characters "
17286 "(not even spaces)."
17290 #: ../fish/guestfish.pod:710
17292 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
17293 "upload local files (so-called \"FileIn\" parameters in the generator)."
17297 #: ../fish/guestfish.pod:713
17298 msgid "EXIT ON ERROR BEHAVIOUR"
17302 #: ../fish/guestfish.pod:715
17304 "By default, guestfish will ignore any errors when in interactive mode (ie. "
17305 "taking commands from a human over a tty), and will exit on the first error "
17306 "in non-interactive mode (scripts, commands given on the command line)."
17310 #: ../fish/guestfish.pod:720
17312 "If you prefix a command with a I<-> character, then that command will not "
17313 "cause guestfish to exit, even if that (one) command returns an error."
17317 #: ../fish/guestfish.pod:724
17318 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
17322 #: ../fish/guestfish.pod:726
17324 "Guestfish can be remote-controlled over a socket. This is useful "
17325 "particularly in shell scripts where you want to make several different "
17326 "changes to a filesystem, but you don't want the overhead of starting up a "
17327 "guestfish process each time."
17331 #: ../fish/guestfish.pod:731
17332 msgid "Start a guestfish server process using:"
17336 #: ../fish/guestfish.pod:733
17339 " eval `guestfish --listen`\n"
17344 #: ../fish/guestfish.pod:735
17345 msgid "and then send it commands by doing:"
17349 #: ../fish/guestfish.pod:737
17352 " guestfish --remote cmd [...]\n"
17357 #: ../fish/guestfish.pod:739
17358 msgid "To cause the server to exit, send it the exit command:"
17362 #: ../fish/guestfish.pod:741
17365 " guestfish --remote exit\n"
17370 #: ../fish/guestfish.pod:743
17372 "Note that the server will normally exit if there is an error in a command. "
17373 "You can change this in the usual way. See section L</EXIT ON ERROR "
17378 #: ../fish/guestfish.pod:747
17379 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
17383 #: ../fish/guestfish.pod:749
17385 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
17386 "is how the I<--remote> option knows where to send the commands. You can "
17387 "have several guestfish listener processes running using:"
17391 #: ../fish/guestfish.pod:753
17394 " eval `guestfish --listen`\n"
17395 " pid1=$GUESTFISH_PID\n"
17396 " eval `guestfish --listen`\n"
17397 " pid2=$GUESTFISH_PID\n"
17399 " guestfish --remote=$pid1 cmd\n"
17400 " guestfish --remote=$pid2 cmd\n"
17405 #: ../fish/guestfish.pod:761
17406 msgid "REMOTE CONTROL DETAILS"
17410 #: ../fish/guestfish.pod:763
17412 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
17413 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
17414 "and C<$PID> is the process ID of the server."
17418 #: ../fish/guestfish.pod:767
17419 msgid "Guestfish client and server versions must match exactly."
17423 #: ../fish/guestfish.pod:769
17424 msgid "PREPARED DISK IMAGES"
17428 #: ../fish/guestfish.pod:771
17430 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
17431 "preformatted disk images that guestfish can make for you to save typing. "
17432 "This is particularly useful for testing purposes. This option is used "
17433 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
17434 "can be mixed with I<-a>)."
17438 #: ../fish/guestfish.pod:777
17440 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
17441 "the second and so on. Existing files in the current directory are "
17446 #: ../fish/guestfish.pod:781
17448 "The type briefly describes how the disk should be sized, partitioned, how "
17449 "filesystem(s) should be created, and how content should be added. "
17450 "Optionally the type can be followed by extra parameters, separated by C<:> "
17451 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
17452 "allocated disk, containing a single partition, with the partition formatted "
17453 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
17458 #: ../fish/guestfish.pod:789
17459 msgid "To list the available types and any extra parameters they take, run:"
17463 #: ../fish/guestfish.pod:793
17465 "Note that the prepared filesystem is not mounted. You would usually have to "
17466 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
17470 #: ../fish/guestfish.pod:797
17472 "If any I<-N> or I<--new> options are given, the guest is automatically "
17477 #: ../fish/guestfish.pod:802
17478 msgid "Create a 100MB disk with an ext4-formatted partition:"
17482 #: ../fish/guestfish.pod:804
17485 " guestfish -N fs:ext4\n"
17490 #: ../fish/guestfish.pod:806
17491 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
17495 #: ../fish/guestfish.pod:808
17498 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
17503 #: ../fish/guestfish.pod:810
17504 msgid "Create a blank 200MB disk:"
17508 #: ../fish/guestfish.pod:812
17511 " guestfish -N disk:200M\n"
17516 #: ../fish/guestfish.pod:814
17517 msgid "PROGRESS BARS"
17521 #: ../fish/guestfish.pod:816
17523 "Some (not all) long-running commands send progress notification messages as "
17524 "they are running. Guestfish turns these messages into progress bars."
17528 #: ../fish/guestfish.pod:820
17530 "When a command that supports progress bars takes longer than two seconds to "
17531 "run, and if progress bars are enabled, then you will see one appearing below "
17536 #: ../fish/guestfish.pod:824
17539 " ><fs> copy-size /large-file /another-file 2048M\n"
17540 " / 10% [#####-----------------------------------------] 00:30\n"
17545 #: ../fish/guestfish.pod:827
17547 "The spinner on the left hand side moves round once for every progress "
17548 "notification received from the backend. This is a (reasonably) golden "
17549 "assurance that the command is \"doing something\" even if the progress bar "
17550 "is not moving, because the command is able to send the progress "
17551 "notifications. When the bar reaches 100% and the command finishes, the "
17552 "spinner disappears."
17556 #: ../fish/guestfish.pod:834
17558 "Progress bars are enabled by default when guestfish is used interactively. "
17559 "You can enable them even for non-interactive modes using I<--progress-bars>, "
17560 "and you can disable them completely using I<--no-progress-bars>."
17564 #: ../fish/guestfish.pod:839
17565 msgid "GUESTFISH COMMANDS"
17569 #: ../fish/guestfish.pod:841
17571 "The commands in this section are guestfish convenience commands, in other "
17572 "words, they are not part of the L<guestfs(3)> API."
17576 #: ../fish/guestfish.pod:844
17581 #: ../fish/guestfish.pod:846
17590 #: ../fish/guestfish.pod:849
17592 "Without any parameter, this lists all commands. With a C<cmd> parameter, "
17593 "this displays detailed help for a command."
17597 #: ../fish/guestfish.pod:852
17598 msgid "quit | exit"
17602 #: ../fish/guestfish.pod:854
17603 msgid "This exits guestfish. You can also use C<^D> key."
17607 #: ../fish/guestfish.pod:856
17608 msgid "@FISH_COMMANDS@"
17612 #: ../fish/guestfish.pod:858
17617 #: ../fish/guestfish.pod:862 ../test-tool/libguestfs-test-tool.pod:83
17622 #: ../fish/guestfish.pod:864
17624 "guestfish returns 0 if the commands completed without error, or 1 if there "
17629 #: ../fish/guestfish.pod:871
17634 #: ../fish/guestfish.pod:873
17636 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
17641 #: ../fish/guestfish.pod:876
17642 msgid "GUESTFISH_PID"
17646 #: ../fish/guestfish.pod:878
17648 "Used with the I<--remote> option to specify the remote guestfish process to "
17649 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
17653 #: ../fish/guestfish.pod:882
17658 #: ../fish/guestfish.pod:884
17660 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
17661 "not specified, the external L<hexedit(1)> program is used."
17665 #: ../fish/guestfish.pod:888
17670 #: ../fish/guestfish.pod:890
17672 "If compiled with GNU readline support, various files in the home directory "
17673 "can be used. See L</FILES>."
17677 #: ../fish/guestfish.pod:899
17679 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
17680 "effect as using the B<-v> option."
17684 #: ../fish/guestfish.pod:911
17686 "Set the path that guestfish uses to search for kernel and initrd.img. See "
17687 "the discussion of paths in L<guestfs(3)>."
17691 #: ../fish/guestfish.pod:922
17692 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
17696 #: ../fish/guestfish.pod:924
17701 #: ../fish/guestfish.pod:926
17703 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
17708 #: ../fish/guestfish.pod:941 ../test-tool/libguestfs-test-tool.pod:88
17713 #: ../fish/guestfish.pod:945
17714 msgid "$HOME/.guestfish"
17718 #: ../fish/guestfish.pod:947
17720 "If compiled with GNU readline support, then the command history is saved in "
17725 #: ../fish/guestfish.pod:950
17726 msgid "$HOME/.inputrc"
17730 #: ../fish/guestfish.pod:952
17731 msgid "/etc/inputrc"
17735 #: ../fish/guestfish.pod:954
17737 "If compiled with GNU readline support, then these files can be used to "
17738 "configure readline. For further information, please see L<readline(3)/"
17739 "INITIALIZATION FILE>."
17743 #: ../fish/guestfish.pod:958
17744 msgid "To write rules which only apply to guestfish, use:"
17748 #: ../fish/guestfish.pod:960
17758 #: ../fish/guestfish.pod:964
17760 "Variables that you can set in inputrc that change the behaviour of guestfish "
17761 "in useful ways include:"
17765 #: ../fish/guestfish.pod:969
17766 msgid "completion-ignore-case (default: on)"
17770 #: ../fish/guestfish.pod:971
17772 "By default, guestfish will ignore case when tab-completing paths on the "
17777 #: ../fish/guestfish.pod:974
17780 " set completion-ignore-case off\n"
17785 #: ../fish/guestfish.pod:976
17786 msgid "to make guestfish case sensitive."
17790 #: ../fish/guestfish.pod:980
17795 #: ../fish/guestfish.pod:982
17796 msgid "test2.img (etc)"
17800 #: ../fish/guestfish.pod:984
17802 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
17803 "will be created in the file C<test1.img> in the current directory. The "
17804 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
17805 "the same name will be overwritten."
17809 #: ../fish/guestfish.pod:993
17811 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
17812 "L<virt-edit(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, "
17813 "L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
17814 "L<virt-tar(1)>, L<virt-win-reg(1)>, L<hexedit(1)>."
17818 #: ../fish/guestfish.pod:1017 ../test-tool/libguestfs-test-tool.pod:124
17819 #: ../fuse/guestmount.pod:234 ../inspector/virt-inspector.pl:598
17820 #: ../tools/virt-edit.pl:370 ../tools/virt-win-reg.pl:518
17821 #: ../tools/virt-df.pl:657 ../tools/virt-ls.pl:251
17822 #: ../tools/virt-resize.pl:1516 ../tools/virt-list-filesystems.pl:206
17823 #: ../tools/virt-cat.pl:203 ../tools/virt-tar.pl:300
17824 #: ../tools/virt-rescue.pl:285 ../tools/virt-make-fs.pl:567
17825 #: ../tools/virt-list-partitions.pl:273
17827 "This program is free software; you can redistribute it and/or modify it "
17828 "under the terms of the GNU General Public License as published by the Free "
17829 "Software Foundation; either version 2 of the License, or (at your option) "
17830 "any later version."
17834 #: ../fish/guestfish.pod:1022 ../test-tool/libguestfs-test-tool.pod:129
17835 #: ../fuse/guestmount.pod:239 ../inspector/virt-inspector.pl:603
17836 #: ../tools/virt-edit.pl:375 ../tools/virt-win-reg.pl:523
17837 #: ../tools/virt-df.pl:662 ../tools/virt-ls.pl:256
17838 #: ../tools/virt-resize.pl:1521 ../tools/virt-list-filesystems.pl:211
17839 #: ../tools/virt-cat.pl:208 ../tools/virt-tar.pl:305
17840 #: ../tools/virt-rescue.pl:290 ../tools/virt-make-fs.pl:572
17841 #: ../tools/virt-list-partitions.pl:278
17843 "This program is distributed in the hope that it will be useful, but WITHOUT "
17844 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
17845 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
17850 #: ../fish/guestfish.pod:1027 ../test-tool/libguestfs-test-tool.pod:134
17851 #: ../fuse/guestmount.pod:244 ../inspector/virt-inspector.pl:608
17852 #: ../tools/virt-edit.pl:380 ../tools/virt-win-reg.pl:528
17853 #: ../tools/virt-df.pl:667 ../tools/virt-ls.pl:261
17854 #: ../tools/virt-resize.pl:1526 ../tools/virt-list-filesystems.pl:216
17855 #: ../tools/virt-cat.pl:213 ../tools/virt-tar.pl:310
17856 #: ../tools/virt-rescue.pl:295 ../tools/virt-make-fs.pl:577
17857 #: ../tools/virt-list-partitions.pl:283
17859 "You should have received a copy of the GNU General Public License along with "
17860 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
17861 "Ave, Cambridge, MA 02139, USA."
17865 #: ../fish/guestfish-actions.pod:1
17870 #: ../fish/guestfish-actions.pod:3
17873 " add-cdrom filename\n"
17878 #: ../fish/guestfish-actions.pod:15
17880 "This call checks for the existence of C<filename>. This stops you from "
17881 "specifying other types of drive which are supported by qemu such as C<nbd:> "
17882 "and C<http:> URLs. To specify those, use the general L</config> call "
17887 #: ../fish/guestfish-actions.pod:22
17889 "If you just want to add an ISO file (often you use this as an efficient way "
17890 "to transfer large files into the guest), then you should probably use L</add-"
17891 "drive-ro> instead."
17895 #: ../fish/guestfish-actions.pod:35
17900 #: ../fish/guestfish-actions.pod:37
17903 " add-drive filename\n"
17908 #: ../fish/guestfish-actions.pod:39
17910 "This function is the equivalent of calling L</add-drive-opts> with no "
17911 "optional parameters, so the disk is added writable, with the format being "
17912 "detected automatically."
17916 #: ../fish/guestfish-actions.pod:43
17918 "Automatic detection of the format opens you up to a potential security hole "
17919 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
17920 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
17921 "you should think about replacing calls to this function with calls to L</add-"
17922 "drive-opts>, and specifying the format."
17926 #: ../fish/guestfish-actions.pod:50
17927 msgid "add-drive-opts"
17931 #: ../fish/guestfish-actions.pod:52
17936 #: ../fish/guestfish-actions.pod:54
17939 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
17944 #: ../fish/guestfish-actions.pod:81
17946 "This forces the image format. If you omit this (or use L</add-drive> or L</"
17947 "add-drive-ro>) then the format is automatically detected. Possible formats "
17948 "include C<raw> and C<qcow2>."
17952 #: ../fish/guestfish-actions.pod:92
17954 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
17955 "add-drive-with-if> call (q.v.)"
17959 #: ../fish/guestfish-actions.pod:97
17961 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
17965 #: ../fish/guestfish-actions.pod:99
17966 msgid "add-drive-ro"
17970 #: ../fish/guestfish-actions.pod:101
17975 #: ../fish/guestfish-actions.pod:103
17978 " add-drive-ro filename\n"
17983 #: ../fish/guestfish-actions.pod:105
17985 "This function is the equivalent of calling L</add-drive-opts> with the "
17986 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
17987 "is added read-only, with the format being detected automatically."
17991 #: ../fish/guestfish-actions.pod:110
17992 msgid "add-drive-ro-with-if"
17996 #: ../fish/guestfish-actions.pod:112
17999 " add-drive-ro-with-if filename iface\n"
18004 #: ../fish/guestfish-actions.pod:114
18006 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
18007 "interface emulation to use at run time."
18011 #: ../fish/guestfish-actions.pod:124
18012 msgid "add-drive-with-if"
18016 #: ../fish/guestfish-actions.pod:126
18019 " add-drive-with-if filename iface\n"
18024 #: ../fish/guestfish-actions.pod:128
18026 "This is the same as L</add-drive> but it allows you to specify the QEMU "
18027 "interface emulation to use at run time."
18031 #: ../fish/guestfish-actions.pod:138
18036 #: ../fish/guestfish-actions.pod:140
18039 " aug-clear augpath\n"
18044 #: ../fish/guestfish-actions.pod:145
18049 #: ../fish/guestfish-actions.pod:147
18057 #: ../fish/guestfish-actions.pod:149
18059 "Close the current Augeas handle and free up any resources used by it. After "
18060 "calling this, you have to call L</aug-init> again before you can use any "
18061 "other Augeas functions."
18065 #: ../fish/guestfish-actions.pod:154
18066 msgid "aug-defnode"
18070 #: ../fish/guestfish-actions.pod:156
18073 " aug-defnode name expr val\n"
18078 #: ../fish/guestfish-actions.pod:161
18080 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
18081 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
18082 "containing that single node."
18086 #: ../fish/guestfish-actions.pod:169
18091 #: ../fish/guestfish-actions.pod:171
18094 " aug-defvar name expr\n"
18099 #: ../fish/guestfish-actions.pod:180
18104 #: ../fish/guestfish-actions.pod:182
18107 " aug-get augpath\n"
18112 #: ../fish/guestfish-actions.pod:187
18117 #: ../fish/guestfish-actions.pod:189
18120 " aug-init root flags\n"
18125 #: ../fish/guestfish-actions.pod:195
18126 msgid "You must call this before using any other L</aug-*> commands."
18130 #: ../fish/guestfish-actions.pod:230
18131 msgid "Do not load the tree in L</aug-init>."
18135 #: ../fish/guestfish-actions.pod:234
18136 msgid "To close the handle, you can call L</aug-close>."
18140 #: ../fish/guestfish-actions.pod:238
18145 #: ../fish/guestfish-actions.pod:240
18148 " aug-insert augpath label true|false\n"
18153 #: ../fish/guestfish-actions.pod:250
18158 #: ../fish/guestfish-actions.pod:252
18166 #: ../fish/guestfish-actions.pod:259
18171 #: ../fish/guestfish-actions.pod:261
18174 " aug-ls augpath\n"
18179 #: ../fish/guestfish-actions.pod:263
18181 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
18182 "resulting nodes into alphabetical order."
18186 #: ../fish/guestfish-actions.pod:266
18191 #: ../fish/guestfish-actions.pod:268
18194 " aug-match augpath\n"
18199 #: ../fish/guestfish-actions.pod:274
18204 #: ../fish/guestfish-actions.pod:276
18207 " aug-mv src dest\n"
18212 #: ../fish/guestfish-actions.pod:281
18217 #: ../fish/guestfish-actions.pod:283
18220 " aug-rm augpath\n"
18225 #: ../fish/guestfish-actions.pod:289
18230 #: ../fish/guestfish-actions.pod:291
18238 #: ../fish/guestfish-actions.pod:295
18240 "The flags which were passed to L</aug-init> affect exactly how files are "
18245 #: ../fish/guestfish-actions.pod:298
18250 #: ../fish/guestfish-actions.pod:300
18253 " aug-set augpath val\n"
18258 #: ../fish/guestfish-actions.pod:304
18260 "In the Augeas API, it is possible to clear a node by setting the value to "
18261 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
18262 "this call. Instead you must use the L</aug-clear> call."
18266 #: ../fish/guestfish-actions.pod:309
18271 #: ../fish/guestfish-actions.pod:311
18274 " available 'groups ...'\n"
18279 #: ../fish/guestfish-actions.pod:317
18281 "The libguestfs groups, and the functions that those groups correspond to, "
18282 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
18283 "runtime by calling L</available-all-groups>."
18287 #: ../fish/guestfish-actions.pod:341
18288 msgid "You must call L</launch> before calling this function."
18292 #: ../fish/guestfish-actions.pod:363
18294 "This call was added in version C<1.0.80>. In previous versions of "
18295 "libguestfs all you could do would be to speculatively execute a command to "
18296 "find out if the daemon implemented it. See also L</version>."
18300 #: ../fish/guestfish-actions.pod:370
18301 msgid "available-all-groups"
18305 #: ../fish/guestfish-actions.pod:372
18308 " available-all-groups\n"
18313 #: ../fish/guestfish-actions.pod:374
18315 "This command returns a list of all optional groups that this daemon knows "
18316 "about. Note this returns both supported and unsupported groups. To find "
18317 "out which ones the daemon can actually support you have to call L</"
18318 "available> on each member of the returned list."
18322 #: ../fish/guestfish-actions.pod:380
18323 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
18327 #: ../fish/guestfish-actions.pod:382
18332 #: ../fish/guestfish-actions.pod:384
18335 " base64-in (base64file|-) filename\n"
18340 #: ../fish/guestfish-actions.pod:389 ../fish/guestfish-actions.pod:398
18341 #: ../fish/guestfish-actions.pod:622 ../fish/guestfish-actions.pod:769
18342 #: ../fish/guestfish-actions.pod:816 ../fish/guestfish-actions.pod:835
18343 #: ../fish/guestfish-actions.pod:1212 ../fish/guestfish-actions.pod:3932
18344 #: ../fish/guestfish-actions.pod:3944 ../fish/guestfish-actions.pod:3955
18345 #: ../fish/guestfish-actions.pod:3966 ../fish/guestfish-actions.pod:4018
18346 #: ../fish/guestfish-actions.pod:4027 ../fish/guestfish-actions.pod:4081
18347 #: ../fish/guestfish-actions.pod:4104
18348 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
18352 #: ../fish/guestfish-actions.pod:391
18357 #: ../fish/guestfish-actions.pod:393
18360 " base64-out filename (base64file|-)\n"
18365 #: ../fish/guestfish-actions.pod:400
18366 msgid "blockdev-flushbufs"
18370 #: ../fish/guestfish-actions.pod:402
18373 " blockdev-flushbufs device\n"
18378 #: ../fish/guestfish-actions.pod:409
18379 msgid "blockdev-getbsz"
18383 #: ../fish/guestfish-actions.pod:411
18386 " blockdev-getbsz device\n"
18391 #: ../fish/guestfish-actions.pod:420
18392 msgid "blockdev-getro"
18396 #: ../fish/guestfish-actions.pod:422
18399 " blockdev-getro device\n"
18404 #: ../fish/guestfish-actions.pod:429
18405 msgid "blockdev-getsize64"
18409 #: ../fish/guestfish-actions.pod:431
18412 " blockdev-getsize64 device\n"
18417 #: ../fish/guestfish-actions.pod:435
18418 msgid "See also L</blockdev-getsz>."
18422 #: ../fish/guestfish-actions.pod:439
18423 msgid "blockdev-getss"
18427 #: ../fish/guestfish-actions.pod:441
18430 " blockdev-getss device\n"
18435 #: ../fish/guestfish-actions.pod:446
18437 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
18441 #: ../fish/guestfish-actions.pod:451
18442 msgid "blockdev-getsz"
18446 #: ../fish/guestfish-actions.pod:453
18449 " blockdev-getsz device\n"
18454 #: ../fish/guestfish-actions.pod:458
18456 "See also L</blockdev-getss> for the real sector size of the device, and L</"
18457 "blockdev-getsize64> for the more useful I<size in bytes>."
18461 #: ../fish/guestfish-actions.pod:464
18462 msgid "blockdev-rereadpt"
18466 #: ../fish/guestfish-actions.pod:466
18469 " blockdev-rereadpt device\n"
18474 #: ../fish/guestfish-actions.pod:472
18475 msgid "blockdev-setbsz"
18479 #: ../fish/guestfish-actions.pod:474
18482 " blockdev-setbsz device blocksize\n"
18487 #: ../fish/guestfish-actions.pod:483
18488 msgid "blockdev-setro"
18492 #: ../fish/guestfish-actions.pod:485
18495 " blockdev-setro device\n"
18500 #: ../fish/guestfish-actions.pod:491
18501 msgid "blockdev-setrw"
18505 #: ../fish/guestfish-actions.pod:493
18508 " blockdev-setrw device\n"
18513 #: ../fish/guestfish-actions.pod:499
18514 msgid "case-sensitive-path"
18518 #: ../fish/guestfish-actions.pod:501
18521 " case-sensitive-path path\n"
18526 #: ../fish/guestfish-actions.pod:525
18528 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
18529 "WINDOWS/system32\"> (the exact return value would depend on details of how "
18530 "the directories were originally created under Windows)."
18534 #: ../fish/guestfish-actions.pod:533
18535 msgid "See also L</realpath>."
18539 #: ../fish/guestfish-actions.pod:535
18544 #: ../fish/guestfish-actions.pod:537
18552 #: ../fish/guestfish-actions.pod:541
18554 "Note that this function cannot correctly handle binary files (specifically, "
18555 "files containing C<\\0> character which is treated as end of string). For "
18556 "those you need to use the L</read-file> or L</download> functions which have "
18557 "a more complex interface."
18561 #: ../fish/guestfish-actions.pod:549
18566 #: ../fish/guestfish-actions.pod:551
18569 " checksum csumtype path\n"
18574 #: ../fish/guestfish-actions.pod:594
18575 msgid "To get the checksum for a device, use L</checksum-device>."
18579 #: ../fish/guestfish-actions.pod:596
18580 msgid "To get the checksums for many files, use L</checksums-out>."
18584 #: ../fish/guestfish-actions.pod:598
18585 msgid "checksum-device"
18589 #: ../fish/guestfish-actions.pod:600
18592 " checksum-device csumtype device\n"
18597 #: ../fish/guestfish-actions.pod:602
18599 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
18600 "device named C<device>. For the types of checksums supported see the L</"
18601 "checksum> command."
18605 #: ../fish/guestfish-actions.pod:606
18606 msgid "checksums-out"
18610 #: ../fish/guestfish-actions.pod:608
18613 " checksums-out csumtype directory (sumsfile|-)\n"
18618 #: ../fish/guestfish-actions.pod:624
18623 #: ../fish/guestfish-actions.pod:626
18626 " chmod mode path\n"
18631 #: ../fish/guestfish-actions.pod:637
18636 #: ../fish/guestfish-actions.pod:639
18639 " chown owner group path\n"
18644 #: ../fish/guestfish-actions.pod:647
18649 #: ../fish/guestfish-actions.pod:649
18652 " command 'arguments ...'\n"
18657 #: ../fish/guestfish-actions.pod:656
18659 "The single parameter is an argv-style list of arguments. The first element "
18660 "is the name of the program to run. Subsequent elements are parameters. The "
18661 "list must be non-empty (ie. must contain a program name). Note that the "
18662 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
18666 #: ../fish/guestfish-actions.pod:684
18667 msgid "command-lines"
18671 #: ../fish/guestfish-actions.pod:686
18674 " command-lines 'arguments ...'\n"
18679 #: ../fish/guestfish-actions.pod:688
18681 "This is the same as L</command>, but splits the result into a list of lines."
18685 #: ../fish/guestfish-actions.pod:691
18686 msgid "See also: L</sh-lines>"
18690 #: ../fish/guestfish-actions.pod:696
18695 #: ../fish/guestfish-actions.pod:698
18698 " config qemuparam qemuvalue\n"
18703 #: ../fish/guestfish-actions.pod:709
18708 #: ../fish/guestfish-actions.pod:711
18711 " copy-size src dest size\n"
18716 #: ../fish/guestfish-actions.pod:719
18721 #: ../fish/guestfish-actions.pod:721
18729 #: ../fish/guestfish-actions.pod:726
18734 #: ../fish/guestfish-actions.pod:728
18742 #: ../fish/guestfish-actions.pod:733
18747 #: ../fish/guestfish-actions.pod:735
18755 #: ../fish/guestfish-actions.pod:742
18757 "If the destination is a device, it must be as large or larger than the "
18758 "source file or device, otherwise the copy will fail. This command cannot do "
18759 "partial copies (see L</copy-size>)."
18763 #: ../fish/guestfish-actions.pod:746
18768 #: ../fish/guestfish-actions.pod:748
18771 " debug subcmd 'extraargs ...'\n"
18776 #: ../fish/guestfish-actions.pod:750
18778 "The L</debug> command exposes some internals of C<guestfsd> (the guestfs "
18779 "daemon) that runs inside the qemu subprocess."
18783 #: ../fish/guestfish-actions.pod:758
18784 msgid "debug-upload"
18788 #: ../fish/guestfish-actions.pod:760
18791 " debug-upload (filename|-) tmpname mode\n"
18796 #: ../fish/guestfish-actions.pod:762
18798 "The L</debug-upload> command uploads a file to the libguestfs appliance."
18802 #: ../fish/guestfish-actions.pod:771
18807 #: ../fish/guestfish-actions.pod:773
18815 #: ../fish/guestfish-actions.pod:781
18820 #: ../fish/guestfish-actions.pod:783
18828 #: ../fish/guestfish-actions.pod:792
18833 #: ../fish/guestfish-actions.pod:794
18841 #: ../fish/guestfish-actions.pod:800
18843 "Another way to get the same information is to enable verbose messages with "
18844 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
18845 "before running the program."
18849 #: ../fish/guestfish-actions.pod:805
18854 #: ../fish/guestfish-actions.pod:807
18857 " download remotefilename (filename|-)\n"
18862 #: ../fish/guestfish-actions.pod:814
18863 msgid "See also L</upload>, L</cat>."
18867 #: ../fish/guestfish-actions.pod:818
18868 msgid "download-offset"
18872 #: ../fish/guestfish-actions.pod:820
18875 " download-offset remotefilename (filename|-) offset size\n"
18880 #: ../fish/guestfish-actions.pod:828
18882 "Note that there is no limit on the amount of data that can be downloaded "
18883 "with this call, unlike with L</pread>, and this call always reads the full "
18884 "amount unless an error occurs."
18888 #: ../fish/guestfish-actions.pod:833
18889 msgid "See also L</download>, L</pread>."
18893 #: ../fish/guestfish-actions.pod:837
18894 msgid "drop-caches"
18898 #: ../fish/guestfish-actions.pod:839
18901 " drop-caches whattodrop\n"
18906 #: ../fish/guestfish-actions.pod:851
18911 #: ../fish/guestfish-actions.pod:853
18919 #: ../fish/guestfish-actions.pod:865
18924 #: ../fish/guestfish-actions.pod:867
18927 " e2fsck-f device\n"
18932 #: ../fish/guestfish-actions.pod:873
18934 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
18935 "should use L</fsck>."
18939 #: ../fish/guestfish-actions.pod:876
18940 msgid "echo-daemon"
18944 #: ../fish/guestfish-actions.pod:878
18947 " echo-daemon 'words ...'\n"
18952 #: ../fish/guestfish-actions.pod:885
18953 msgid "See also L</ping-daemon>."
18957 #: ../fish/guestfish-actions.pod:887
18962 #: ../fish/guestfish-actions.pod:889
18965 " egrep regex path\n"
18970 #: ../fish/guestfish-actions.pod:897
18975 #: ../fish/guestfish-actions.pod:899
18978 " egrepi regex path\n"
18983 #: ../fish/guestfish-actions.pod:907
18988 #: ../fish/guestfish-actions.pod:909
18991 " equal file1 file2\n"
18996 #: ../fish/guestfish-actions.pod:916
19001 #: ../fish/guestfish-actions.pod:918
19009 #: ../fish/guestfish-actions.pod:923
19010 msgid "See also L</is-file>, L</is-dir>, L</stat>."
19014 #: ../fish/guestfish-actions.pod:925
19019 #: ../fish/guestfish-actions.pod:927
19022 " fallocate path len\n"
19027 #: ../fish/guestfish-actions.pod:944
19028 msgid "fallocate64"
19032 #: ../fish/guestfish-actions.pod:946
19035 " fallocate64 path len\n"
19040 #: ../fish/guestfish-actions.pod:952
19042 "Note that this call allocates disk blocks for the file. To create a sparse "
19043 "file use L</truncate-size> instead."
19047 #: ../fish/guestfish-actions.pod:955
19049 "The deprecated call L</fallocate> does the same, but owing to an oversight "
19050 "it only allowed 30 bit lengths to be specified, effectively limiting the "
19051 "maximum size of files created through that call to 1GB."
19055 #: ../fish/guestfish-actions.pod:964
19060 #: ../fish/guestfish-actions.pod:966
19063 " fgrep pattern path\n"
19068 #: ../fish/guestfish-actions.pod:974
19073 #: ../fish/guestfish-actions.pod:976
19076 " fgrepi pattern path\n"
19081 #: ../fish/guestfish-actions.pod:984
19086 #: ../fish/guestfish-actions.pod:986
19094 #: ../fish/guestfish-actions.pod:998
19096 "This command can also be used on C</dev/> devices (and partitions, LV "
19097 "names). You can for example use this to determine if a device contains a "
19098 "filesystem, although it's usually better to use L</vfs-type>."
19102 #: ../fish/guestfish-actions.pod:1008
19103 msgid "file-architecture"
19107 #: ../fish/guestfish-actions.pod:1010
19110 " file-architecture filename\n"
19115 #: ../fish/guestfish-actions.pod:1113
19120 #: ../fish/guestfish-actions.pod:1115
19128 #: ../fish/guestfish-actions.pod:1119
19130 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
19131 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
19135 #: ../fish/guestfish-actions.pod:1123
19140 #: ../fish/guestfish-actions.pod:1125
19143 " fill c len path\n"
19148 #: ../fish/guestfish-actions.pod:1131
19150 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
19151 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
19152 "L</fill-pattern>."
19156 #: ../fish/guestfish-actions.pod:1136
19157 msgid "fill-pattern"
19161 #: ../fish/guestfish-actions.pod:1138
19164 " fill-pattern pattern len path\n"
19169 #: ../fish/guestfish-actions.pod:1140
19171 "This function is like L</fill> except that it creates a new file of length "
19172 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
19173 "is truncated if necessary to ensure the length of the file is exactly C<len> "
19178 #: ../fish/guestfish-actions.pod:1145
19183 #: ../fish/guestfish-actions.pod:1147
19186 " find directory\n"
19191 #: ../fish/guestfish-actions.pod:1161
19192 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
19196 #: ../fish/guestfish-actions.pod:1174
19197 msgid "See also L</find0>."
19201 #: ../fish/guestfish-actions.pod:1179
19206 #: ../fish/guestfish-actions.pod:1181
19209 " find0 directory (files|-)\n"
19214 #: ../fish/guestfish-actions.pod:1187
19216 "This command works the same way as L</find> with the following exceptions:"
19220 #: ../fish/guestfish-actions.pod:1214
19221 msgid "findfs-label"
19225 #: ../fish/guestfish-actions.pod:1216
19228 " findfs-label label\n"
19233 #: ../fish/guestfish-actions.pod:1222
19234 msgid "To find the label of a filesystem, use L</vfs-label>."
19238 #: ../fish/guestfish-actions.pod:1224
19239 msgid "findfs-uuid"
19243 #: ../fish/guestfish-actions.pod:1226
19246 " findfs-uuid uuid\n"
19251 #: ../fish/guestfish-actions.pod:1232
19252 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
19256 #: ../fish/guestfish-actions.pod:1234
19261 #: ../fish/guestfish-actions.pod:1236
19264 " fsck fstype device\n"
19269 #: ../fish/guestfish-actions.pod:1266
19274 #: ../fish/guestfish-actions.pod:1268
19282 #: ../fish/guestfish-actions.pod:1275
19283 msgid "get-autosync"
19287 #: ../fish/guestfish-actions.pod:1277
19295 #: ../fish/guestfish-actions.pod:1281
19300 #: ../fish/guestfish-actions.pod:1283
19308 #: ../fish/guestfish-actions.pod:1287
19309 msgid "get-e2label"
19313 #: ../fish/guestfish-actions.pod:1289
19316 " get-e2label device\n"
19321 #: ../fish/guestfish-actions.pod:1301
19326 #: ../fish/guestfish-actions.pod:1303
19329 " get-e2uuid device\n"
19334 #: ../fish/guestfish-actions.pod:1315
19335 msgid "get-memsize"
19339 #: ../fish/guestfish-actions.pod:1317
19347 #: ../fish/guestfish-actions.pod:1322
19349 "If L</set-memsize> was not called on this handle, and if "
19350 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
19351 "value for memsize."
19355 #: ../fish/guestfish-actions.pod:1329
19356 msgid "get-network"
19360 #: ../fish/guestfish-actions.pod:1331
19368 #: ../fish/guestfish-actions.pod:1335
19373 #: ../fish/guestfish-actions.pod:1337
19381 #: ../fish/guestfish-actions.pod:1344
19386 #: ../fish/guestfish-actions.pod:1346
19391 #: ../fish/guestfish-actions.pod:1348
19399 #: ../fish/guestfish-actions.pod:1355
19404 #: ../fish/guestfish-actions.pod:1357
19412 #: ../fish/guestfish-actions.pod:1364
19413 msgid "get-recovery-proc"
19417 #: ../fish/guestfish-actions.pod:1366
19420 " get-recovery-proc\n"
19425 #: ../fish/guestfish-actions.pod:1370
19426 msgid "get-selinux"
19430 #: ../fish/guestfish-actions.pod:1372
19438 #: ../fish/guestfish-actions.pod:1374
19440 "This returns the current setting of the selinux flag which is passed to the "
19441 "appliance at boot time. See L</set-selinux>."
19445 #: ../fish/guestfish-actions.pod:1380
19450 #: ../fish/guestfish-actions.pod:1382
19458 #: ../fish/guestfish-actions.pod:1389
19463 #: ../fish/guestfish-actions.pod:1391
19471 #: ../fish/guestfish-actions.pod:1395
19476 #: ../fish/guestfish-actions.pod:1397
19484 #: ../fish/guestfish-actions.pod:1399
19486 "Return the current umask. By default the umask is C<022> unless it has been "
19487 "set by calling L</umask>."
19491 #: ../fish/guestfish-actions.pod:1402
19492 msgid "get-verbose"
19496 #: ../fish/guestfish-actions.pod:1404
19504 #: ../fish/guestfish-actions.pod:1408
19509 #: ../fish/guestfish-actions.pod:1410
19517 #: ../fish/guestfish-actions.pod:1414
19518 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
19522 #: ../fish/guestfish-actions.pod:1417
19527 #: ../fish/guestfish-actions.pod:1419
19530 " getxattrs path\n"
19535 #: ../fish/guestfish-actions.pod:1427
19536 msgid "See also: L</lgetxattrs>, L<attr(5)>."
19540 #: ../fish/guestfish-actions.pod:1429
19541 msgid "glob-expand"
19545 #: ../fish/guestfish-actions.pod:1431
19548 " glob-expand pattern\n"
19553 #: ../fish/guestfish-actions.pod:1444
19558 #: ../fish/guestfish-actions.pod:1446
19561 " grep regex path\n"
19566 #: ../fish/guestfish-actions.pod:1454
19571 #: ../fish/guestfish-actions.pod:1456
19574 " grepi regex path\n"
19579 #: ../fish/guestfish-actions.pod:1464
19580 msgid "grub-install"
19584 #: ../fish/guestfish-actions.pod:1466
19587 " grub-install root device\n"
19592 #: ../fish/guestfish-actions.pod:1482
19597 #: ../fish/guestfish-actions.pod:1484
19605 #: ../fish/guestfish-actions.pod:1492
19610 #: ../fish/guestfish-actions.pod:1494
19613 " head-n nrlines path\n"
19618 #: ../fish/guestfish-actions.pod:1507
19623 #: ../fish/guestfish-actions.pod:1509
19631 #: ../fish/guestfish-actions.pod:1517
19636 #: ../fish/guestfish-actions.pod:1519
19639 " initrd-cat initrdpath filename\n"
19644 #: ../fish/guestfish-actions.pod:1531
19645 msgid "See also L</initrd-list>."
19649 #: ../fish/guestfish-actions.pod:1536
19650 msgid "initrd-list"
19654 #: ../fish/guestfish-actions.pod:1538
19657 " initrd-list path\n"
19662 #: ../fish/guestfish-actions.pod:1550
19663 msgid "inotify-add-watch"
19667 #: ../fish/guestfish-actions.pod:1552
19670 " inotify-add-watch path mask\n"
19675 #: ../fish/guestfish-actions.pod:1564
19676 msgid "inotify-close"
19680 #: ../fish/guestfish-actions.pod:1566
19688 #: ../fish/guestfish-actions.pod:1572
19689 msgid "inotify-files"
19693 #: ../fish/guestfish-actions.pod:1574
19701 #: ../fish/guestfish-actions.pod:1576
19703 "This function is a helpful wrapper around L</inotify-read> which just "
19704 "returns a list of pathnames of objects that were touched. The returned "
19705 "pathnames are sorted and deduplicated."
19709 #: ../fish/guestfish-actions.pod:1580
19710 msgid "inotify-init"
19714 #: ../fish/guestfish-actions.pod:1582
19717 " inotify-init maxevents\n"
19722 #: ../fish/guestfish-actions.pod:1588
19724 "C<maxevents> is the maximum number of events which will be queued up between "
19725 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
19726 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
19727 "default was 16384 events. Beyond this limit, the kernel throws away events, "
19728 "but records the fact that it threw them away by setting a flag "
19729 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
19733 #: ../fish/guestfish-actions.pod:1598
19735 "Before any events are generated, you have to add some watches to the "
19736 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
19737 "L</inotify-watch-all>."
19741 #: ../fish/guestfish-actions.pod:1604
19743 "Queued up events should be read periodically by calling L</inotify-read> (or "
19744 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
19745 "If you don't read the events out often enough then you risk the internal "
19746 "queue overflowing."
19750 #: ../fish/guestfish-actions.pod:1611
19752 "The handle should be closed after use by calling L</inotify-close>. This "
19753 "also removes any watches automatically."
19757 #: ../fish/guestfish-actions.pod:1620
19758 msgid "inotify-read"
19762 #: ../fish/guestfish-actions.pod:1622
19770 #: ../fish/guestfish-actions.pod:1635
19771 msgid "inotify-rm-watch"
19775 #: ../fish/guestfish-actions.pod:1637
19778 " inotify-rm-watch wd\n"
19783 #: ../fish/guestfish-actions.pod:1639
19784 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
19788 #: ../fish/guestfish-actions.pod:1642
19789 msgid "inspect-get-arch"
19793 #: ../fish/guestfish-actions.pod:1644
19796 " inspect-get-arch root\n"
19801 #: ../fish/guestfish-actions.pod:1646 ../fish/guestfish-actions.pod:1662
19802 #: ../fish/guestfish-actions.pod:1728 ../fish/guestfish-actions.pod:1746
19803 #: ../fish/guestfish-actions.pod:1767 ../fish/guestfish-actions.pod:1782
19804 #: ../fish/guestfish-actions.pod:1805 ../fish/guestfish-actions.pod:1822
19805 #: ../fish/guestfish-actions.pod:1853
19807 "This function should only be called with a root device string as returned by "
19812 #: ../fish/guestfish-actions.pod:1649
19814 "This returns the architecture of the inspected operating system. The "
19815 "possible return values are listed under L</file-architecture>."
19819 #: ../fish/guestfish-actions.pod:1658
19820 msgid "inspect-get-distro"
19824 #: ../fish/guestfish-actions.pod:1660
19827 " inspect-get-distro root\n"
19832 #: ../fish/guestfish-actions.pod:1724
19833 msgid "inspect-get-filesystems"
19837 #: ../fish/guestfish-actions.pod:1726
19840 " inspect-get-filesystems root\n"
19845 #: ../fish/guestfish-actions.pod:1739
19847 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
19848 "get-mountpoints>."
19852 #: ../fish/guestfish-actions.pod:1742
19853 msgid "inspect-get-major-version"
19857 #: ../fish/guestfish-actions.pod:1744
19860 " inspect-get-major-version root\n"
19865 #: ../fish/guestfish-actions.pod:1763
19866 msgid "inspect-get-minor-version"
19870 #: ../fish/guestfish-actions.pod:1765
19873 " inspect-get-minor-version root\n"
19878 #: ../fish/guestfish-actions.pod:1775
19880 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
19881 "get-major-version>."
19885 #: ../fish/guestfish-actions.pod:1778
19886 msgid "inspect-get-mountpoints"
19890 #: ../fish/guestfish-actions.pod:1780
19893 " inspect-get-mountpoints root\n"
19898 #: ../fish/guestfish-actions.pod:1798
19900 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
19901 "get-filesystems>."
19905 #: ../fish/guestfish-actions.pod:1801
19906 msgid "inspect-get-product-name"
19910 #: ../fish/guestfish-actions.pod:1803
19913 " inspect-get-product-name root\n"
19918 #: ../fish/guestfish-actions.pod:1818
19919 msgid "inspect-get-type"
19923 #: ../fish/guestfish-actions.pod:1820
19926 " inspect-get-type root\n"
19931 #: ../fish/guestfish-actions.pod:1849
19932 msgid "inspect-get-windows-systemroot"
19936 #: ../fish/guestfish-actions.pod:1851
19939 " inspect-get-windows-systemroot root\n"
19944 #: ../fish/guestfish-actions.pod:1865
19949 #: ../fish/guestfish-actions.pod:1867
19957 #: ../fish/guestfish-actions.pod:1882
19959 "You can pass the root string(s) returned to other L</inspect-get-*> "
19960 "functions in order to query further information about each operating system, "
19961 "such as the name and version."
19965 #: ../fish/guestfish-actions.pod:1887
19967 "This function uses other libguestfs features such as L</mount-ro> and L</"
19968 "umount-all> in order to mount and unmount filesystems and look at the "
19969 "contents. This should be called with no disks currently mounted. The "
19970 "function may also use Augeas, so any existing Augeas handle will be closed."
19974 #: ../fish/guestfish-actions.pod:1899 ../fish/guestfish-actions.pod:2055
19975 #: ../fish/guestfish-actions.pod:2101
19976 msgid "See also L</list-filesystems>."
19980 #: ../fish/guestfish-actions.pod:1901
19981 msgid "is-blockdev"
19985 #: ../fish/guestfish-actions.pod:1903
19988 " is-blockdev path\n"
19993 #: ../fish/guestfish-actions.pod:1908 ../fish/guestfish-actions.pod:1926
19994 #: ../fish/guestfish-actions.pod:1945 ../fish/guestfish-actions.pod:1954
19995 #: ../fish/guestfish-actions.pod:1964 ../fish/guestfish-actions.pod:1998
19996 #: ../fish/guestfish-actions.pod:2007
19997 msgid "See also L</stat>."
20001 #: ../fish/guestfish-actions.pod:1910
20006 #: ../fish/guestfish-actions.pod:1912
20014 #: ../fish/guestfish-actions.pod:1919
20019 #: ../fish/guestfish-actions.pod:1921
20022 " is-chardev path\n"
20027 #: ../fish/guestfish-actions.pod:1928
20032 #: ../fish/guestfish-actions.pod:1930
20040 #: ../fish/guestfish-actions.pod:1937
20045 #: ../fish/guestfish-actions.pod:1939
20053 #: ../fish/guestfish-actions.pod:1947
20058 #: ../fish/guestfish-actions.pod:1949
20066 #: ../fish/guestfish-actions.pod:1956
20071 #: ../fish/guestfish-actions.pod:1958
20079 #: ../fish/guestfish-actions.pod:1966
20080 msgid "is-launching"
20084 #: ../fish/guestfish-actions.pod:1968
20092 #: ../fish/guestfish-actions.pod:1975
20097 #: ../fish/guestfish-actions.pod:1977
20105 #: ../fish/guestfish-actions.pod:1982
20110 #: ../fish/guestfish-actions.pod:1984
20118 #: ../fish/guestfish-actions.pod:1991
20123 #: ../fish/guestfish-actions.pod:1993
20126 " is-socket path\n"
20131 #: ../fish/guestfish-actions.pod:2000
20136 #: ../fish/guestfish-actions.pod:2002
20139 " is-symlink path\n"
20144 #: ../fish/guestfish-actions.pod:2009
20145 msgid "kill-subprocess"
20149 #: ../fish/guestfish-actions.pod:2011
20152 " kill-subprocess\n"
20157 #: ../fish/guestfish-actions.pod:2015
20162 #: ../fish/guestfish-actions.pod:2017
20167 #: ../fish/guestfish-actions.pod:2019
20175 #: ../fish/guestfish-actions.pod:2027
20180 #: ../fish/guestfish-actions.pod:2029
20183 " lchown owner group path\n"
20188 #: ../fish/guestfish-actions.pod:2031
20190 "Change the file owner to C<owner> and group to C<group>. This is like L</"
20191 "chown> but if C<path> is a symlink then the link itself is changed, not the "
20196 #: ../fish/guestfish-actions.pod:2039
20201 #: ../fish/guestfish-actions.pod:2041
20204 " lgetxattrs path\n"
20209 #: ../fish/guestfish-actions.pod:2043
20211 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
20212 "it returns the extended attributes of the link itself."
20216 #: ../fish/guestfish-actions.pod:2047
20217 msgid "list-devices"
20221 #: ../fish/guestfish-actions.pod:2049
20229 #: ../fish/guestfish-actions.pod:2057
20230 msgid "list-filesystems"
20234 #: ../fish/guestfish-actions.pod:2059
20237 " list-filesystems\n"
20242 #: ../fish/guestfish-actions.pod:2078
20244 "This command runs other libguestfs commands, which might include L</mount> "
20245 "and L</umount>, and therefore you should use this soon after launch and only "
20246 "when nothing is mounted."
20250 #: ../fish/guestfish-actions.pod:2082
20252 "Not all of the filesystems returned will be mountable. In particular, swap "
20253 "partitions are returned in the list. Also this command does not check that "
20254 "each filesystem found is valid and mountable, and some filesystems might be "
20255 "mountable but require special options. Filesystems may not all belong to a "
20256 "single logical operating system (use L</inspect-os> to look for OSes)."
20260 #: ../fish/guestfish-actions.pod:2090
20261 msgid "list-partitions"
20265 #: ../fish/guestfish-actions.pod:2092
20268 " list-partitions\n"
20273 #: ../fish/guestfish-actions.pod:2098
20275 "This does not return logical volumes. For that you will need to call L</"
20280 #: ../fish/guestfish-actions.pod:2103
20285 #: ../fish/guestfish-actions.pod:2105
20293 #: ../fish/guestfish-actions.pod:2113
20298 #: ../fish/guestfish-actions.pod:2115
20301 " ln target linkname\n"
20306 #: ../fish/guestfish-actions.pod:2119
20311 #: ../fish/guestfish-actions.pod:2121
20314 " ln-f target linkname\n"
20319 #: ../fish/guestfish-actions.pod:2126
20324 #: ../fish/guestfish-actions.pod:2128
20327 " ln-s target linkname\n"
20332 #: ../fish/guestfish-actions.pod:2132
20337 #: ../fish/guestfish-actions.pod:2134
20340 " ln-sf target linkname\n"
20345 #: ../fish/guestfish-actions.pod:2139
20346 msgid "lremovexattr"
20350 #: ../fish/guestfish-actions.pod:2141
20353 " lremovexattr xattr path\n"
20358 #: ../fish/guestfish-actions.pod:2143
20360 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
20361 "it removes an extended attribute of the link itself."
20365 #: ../fish/guestfish-actions.pod:2147
20370 #: ../fish/guestfish-actions.pod:2149
20378 #: ../fish/guestfish-actions.pod:2155
20380 "This command is mostly useful for interactive sessions. Programs should "
20381 "probably use L</readdir> instead."
20385 #: ../fish/guestfish-actions.pod:2158
20390 #: ../fish/guestfish-actions.pod:2160
20393 " lsetxattr xattr val vallen path\n"
20398 #: ../fish/guestfish-actions.pod:2162
20400 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
20401 "sets an extended attribute of the link itself."
20405 #: ../fish/guestfish-actions.pod:2166
20410 #: ../fish/guestfish-actions.pod:2168
20418 #: ../fish/guestfish-actions.pod:2172
20420 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
20421 "the link is stat-ed, not the file it refers to."
20425 #: ../fish/guestfish-actions.pod:2178
20430 #: ../fish/guestfish-actions.pod:2180
20433 " lstatlist path 'names ...'\n"
20438 #: ../fish/guestfish-actions.pod:2182
20440 "This call allows you to perform the L</lstat> operation on multiple files, "
20441 "where all files are in the directory C<path>. C<names> is the list of files "
20442 "from this directory."
20446 #: ../fish/guestfish-actions.pod:2191
20448 "This call is intended for programs that want to efficiently list a directory "
20449 "contents without making many round-trips. See also L</lxattrlist> for a "
20450 "similarly efficient call for getting extended attributes. Very long "
20451 "directory listings might cause the protocol message size to be exceeded, "
20452 "causing this call to fail. The caller must split up such requests into "
20453 "smaller groups of names."
20457 #: ../fish/guestfish-actions.pod:2199
20458 msgid "luks-add-key"
20462 #: ../fish/guestfish-actions.pod:2201
20465 " luks-add-key device keyslot\n"
20470 #: ../fish/guestfish-actions.pod:2208
20472 "Note that if C<keyslot> already contains a key, then this command will "
20473 "fail. You have to use L</luks-kill-slot> first to remove that key."
20477 #: ../fish/guestfish-actions.pod:2212 ../fish/guestfish-actions.pod:2234
20478 #: ../fish/guestfish-actions.pod:2247 ../fish/guestfish-actions.pod:2261
20479 #: ../fish/guestfish-actions.pod:2284 ../fish/guestfish-actions.pod:2294
20481 "This command has one or more key or passphrase parameters. Guestfish will "
20482 "prompt for these separately."
20486 #: ../fish/guestfish-actions.pod:2215
20491 #: ../fish/guestfish-actions.pod:2217
20494 " luks-close device\n"
20499 #: ../fish/guestfish-actions.pod:2219
20501 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
20502 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
20503 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
20508 #: ../fish/guestfish-actions.pod:2225
20509 msgid "luks-format"
20513 #: ../fish/guestfish-actions.pod:2227
20516 " luks-format device keyslot\n"
20521 #: ../fish/guestfish-actions.pod:2240
20522 msgid "luks-format-cipher"
20526 #: ../fish/guestfish-actions.pod:2242
20529 " luks-format-cipher device keyslot cipher\n"
20534 #: ../fish/guestfish-actions.pod:2244
20536 "This command is the same as L</luks-format> but it also allows you to set "
20537 "the C<cipher> used."
20541 #: ../fish/guestfish-actions.pod:2253
20542 msgid "luks-kill-slot"
20546 #: ../fish/guestfish-actions.pod:2255
20549 " luks-kill-slot device keyslot\n"
20554 #: ../fish/guestfish-actions.pod:2264
20559 #: ../fish/guestfish-actions.pod:2266
20562 " luks-open device mapname\n"
20567 #: ../fish/guestfish-actions.pod:2280
20569 "If this block device contains LVM volume groups, then calling L</vgscan> "
20570 "followed by L</vg-activate-all> will make them visible."
20574 #: ../fish/guestfish-actions.pod:2287
20575 msgid "luks-open-ro"
20579 #: ../fish/guestfish-actions.pod:2289
20582 " luks-open-ro device mapname\n"
20587 #: ../fish/guestfish-actions.pod:2291
20589 "This is the same as L</luks-open> except that a read-only mapping is created."
20593 #: ../fish/guestfish-actions.pod:2297
20598 #: ../fish/guestfish-actions.pod:2299
20601 " lvcreate logvol volgroup mbytes\n"
20606 #: ../fish/guestfish-actions.pod:2304
20607 msgid "lvm-canonical-lv-name"
20611 #: ../fish/guestfish-actions.pod:2306
20614 " lvm-canonical-lv-name lvname\n"
20619 #: ../fish/guestfish-actions.pod:2315
20620 msgid "See also L</is-lv>."
20624 #: ../fish/guestfish-actions.pod:2317
20625 msgid "lvm-clear-filter"
20629 #: ../fish/guestfish-actions.pod:2319
20632 " lvm-clear-filter\n"
20637 #: ../fish/guestfish-actions.pod:2321
20639 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
20644 #: ../fish/guestfish-actions.pod:2327
20645 msgid "lvm-remove-all"
20649 #: ../fish/guestfish-actions.pod:2329
20652 " lvm-remove-all\n"
20657 #: ../fish/guestfish-actions.pod:2337
20658 msgid "lvm-set-filter"
20662 #: ../fish/guestfish-actions.pod:2339
20665 " lvm-set-filter 'devices ...'\n"
20670 #: ../fish/guestfish-actions.pod:2364
20675 #: ../fish/guestfish-actions.pod:2366
20678 " lvremove device\n"
20683 #: ../fish/guestfish-actions.pod:2374
20688 #: ../fish/guestfish-actions.pod:2376
20691 " lvrename logvol newlogvol\n"
20696 #: ../fish/guestfish-actions.pod:2380
20701 #: ../fish/guestfish-actions.pod:2382
20704 " lvresize device mbytes\n"
20709 #: ../fish/guestfish-actions.pod:2388
20710 msgid "lvresize-free"
20714 #: ../fish/guestfish-actions.pod:2390
20717 " lvresize-free lv percent\n"
20722 #: ../fish/guestfish-actions.pod:2398
20727 #: ../fish/guestfish-actions.pod:2400
20735 #: ../fish/guestfish-actions.pod:2408
20736 msgid "See also L</lvs-full>, L</list-filesystems>."
20740 #: ../fish/guestfish-actions.pod:2410
20745 #: ../fish/guestfish-actions.pod:2412
20753 #: ../fish/guestfish-actions.pod:2417
20758 #: ../fish/guestfish-actions.pod:2419
20766 #: ../fish/guestfish-actions.pod:2423
20771 #: ../fish/guestfish-actions.pod:2425
20774 " lxattrlist path 'names ...'\n"
20779 #: ../fish/guestfish-actions.pod:2441
20781 "This call is intended for programs that want to efficiently list a directory "
20782 "contents without making many round-trips. See also L</lstatlist> for a "
20783 "similarly efficient call for getting standard stats. Very long directory "
20784 "listings might cause the protocol message size to be exceeded, causing this "
20785 "call to fail. The caller must split up such requests into smaller groups of "
20790 #: ../fish/guestfish-actions.pod:2449
20795 #: ../fish/guestfish-actions.pod:2451
20803 #: ../fish/guestfish-actions.pod:2455
20808 #: ../fish/guestfish-actions.pod:2457
20811 " mkdir-mode path mode\n"
20816 #: ../fish/guestfish-actions.pod:2466
20817 msgid "See also L</mkdir>, L</umask>"
20821 #: ../fish/guestfish-actions.pod:2468
20826 #: ../fish/guestfish-actions.pod:2470
20834 #: ../fish/guestfish-actions.pod:2475
20839 #: ../fish/guestfish-actions.pod:2477
20842 " mkdtemp template\n"
20847 #: ../fish/guestfish-actions.pod:2498
20852 #: ../fish/guestfish-actions.pod:2500
20855 " mke2fs-J fstype blocksize device journal\n"
20860 #: ../fish/guestfish-actions.pod:2508
20861 msgid "See also L</mke2journal>."
20865 #: ../fish/guestfish-actions.pod:2510
20870 #: ../fish/guestfish-actions.pod:2512
20873 " mke2fs-JL fstype blocksize device label\n"
20878 #: ../fish/guestfish-actions.pod:2517
20879 msgid "See also L</mke2journal-L>."
20883 #: ../fish/guestfish-actions.pod:2519
20888 #: ../fish/guestfish-actions.pod:2521
20891 " mke2fs-JU fstype blocksize device uuid\n"
20896 #: ../fish/guestfish-actions.pod:2526
20897 msgid "See also L</mke2journal-U>."
20901 #: ../fish/guestfish-actions.pod:2528
20902 msgid "mke2journal"
20906 #: ../fish/guestfish-actions.pod:2530
20909 " mke2journal blocksize device\n"
20914 #: ../fish/guestfish-actions.pod:2537
20915 msgid "mke2journal-L"
20919 #: ../fish/guestfish-actions.pod:2539
20922 " mke2journal-L blocksize label device\n"
20927 #: ../fish/guestfish-actions.pod:2543
20928 msgid "mke2journal-U"
20932 #: ../fish/guestfish-actions.pod:2545
20935 " mke2journal-U blocksize uuid device\n"
20940 #: ../fish/guestfish-actions.pod:2549
20945 #: ../fish/guestfish-actions.pod:2551
20948 " mkfifo mode path\n"
20953 #: ../fish/guestfish-actions.pod:2553
20955 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
20956 "is just a convenient wrapper around L</mknod>."
20960 #: ../fish/guestfish-actions.pod:2559
20965 #: ../fish/guestfish-actions.pod:2561
20968 " mkfs fstype device\n"
20973 #: ../fish/guestfish-actions.pod:2567
20978 #: ../fish/guestfish-actions.pod:2569
20981 " mkfs-b fstype blocksize device\n"
20986 #: ../fish/guestfish-actions.pod:2571
20988 "This call is similar to L</mkfs>, but it allows you to control the block "
20989 "size of the resulting filesystem. Supported block sizes depend on the "
20990 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
20994 #: ../fish/guestfish-actions.pod:2579
20995 msgid "mkmountpoint"
20999 #: ../fish/guestfish-actions.pod:2581
21002 " mkmountpoint exemptpath\n"
21007 #: ../fish/guestfish-actions.pod:2583
21009 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
21010 "to create extra mountpoints before mounting the first filesystem."
21014 #: ../fish/guestfish-actions.pod:2607
21016 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
21017 "unexpected errors if you try to mix these calls. It is safest to manually "
21018 "unmount filesystems and remove mountpoints after use."
21022 #: ../fish/guestfish-actions.pod:2611
21024 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
21025 "for this to work for manual mountpoints, you must ensure that the innermost "
21026 "mountpoints have the longest pathnames, as in the example code above."
21030 #: ../fish/guestfish-actions.pod:2618
21032 "Autosync [see L</set-autosync>, this is set by default on handles] means "
21033 "that L</umount-all> is called when the handle is closed which can also "
21034 "trigger these issues."
21038 #: ../fish/guestfish-actions.pod:2622
21043 #: ../fish/guestfish-actions.pod:2624
21046 " mknod mode devmajor devminor path\n"
21051 #: ../fish/guestfish-actions.pod:2634
21053 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
21054 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
21055 "regular file). These constants are available in the standard Linux header "
21056 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
21057 "wrappers around this command which bitwise OR in the appropriate constant "
21062 #: ../fish/guestfish-actions.pod:2644
21067 #: ../fish/guestfish-actions.pod:2646
21070 " mknod-b mode devmajor devminor path\n"
21075 #: ../fish/guestfish-actions.pod:2648
21077 "This call creates a block device node called C<path> with mode C<mode> and "
21078 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
21079 "wrapper around L</mknod>."
21083 #: ../fish/guestfish-actions.pod:2654
21088 #: ../fish/guestfish-actions.pod:2656
21091 " mknod-c mode devmajor devminor path\n"
21096 #: ../fish/guestfish-actions.pod:2658
21098 "This call creates a char device node called C<path> with mode C<mode> and "
21099 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
21100 "wrapper around L</mknod>."
21104 #: ../fish/guestfish-actions.pod:2664
21109 #: ../fish/guestfish-actions.pod:2666
21117 #: ../fish/guestfish-actions.pod:2670
21122 #: ../fish/guestfish-actions.pod:2672
21125 " mkswap-L label device\n"
21130 #: ../fish/guestfish-actions.pod:2680
21135 #: ../fish/guestfish-actions.pod:2682
21138 " mkswap-U uuid device\n"
21143 #: ../fish/guestfish-actions.pod:2686
21144 msgid "mkswap-file"
21148 #: ../fish/guestfish-actions.pod:2688
21151 " mkswap-file path\n"
21156 #: ../fish/guestfish-actions.pod:2692
21158 "This command just writes a swap file signature to an existing file. To "
21159 "create the file itself, use something like L</fallocate>."
21163 #: ../fish/guestfish-actions.pod:2695
21168 #: ../fish/guestfish-actions.pod:2697
21171 " modprobe modulename\n"
21176 #: ../fish/guestfish-actions.pod:2704
21181 #: ../fish/guestfish-actions.pod:2706
21184 " mount device mountpoint\n"
21189 #: ../fish/guestfish-actions.pod:2722
21191 "B<Important note:> When you use this call, the filesystem options C<sync> "
21192 "and C<noatime> are set implicitly. This was originally done because we "
21193 "thought it would improve reliability, but it turns out that I<-o sync> has a "
21194 "very large negative performance impact and negligible effect on "
21195 "reliability. Therefore we recommend that you avoid using L</mount> in any "
21196 "code that needs performance, and instead use L</mount-options> (use an empty "
21197 "string for the first parameter if you don't want any options)."
21201 #: ../fish/guestfish-actions.pod:2732
21206 #: ../fish/guestfish-actions.pod:2734
21209 " mount-loop file mountpoint\n"
21214 #: ../fish/guestfish-actions.pod:2740
21215 msgid "mount-options"
21219 #: ../fish/guestfish-actions.pod:2742
21222 " mount-options options device mountpoint\n"
21227 #: ../fish/guestfish-actions.pod:2744
21229 "This is the same as the L</mount> command, but it allows you to set the "
21230 "mount options as for the L<mount(8)> I<-o> flag."
21234 #: ../fish/guestfish-actions.pod:2752
21239 #: ../fish/guestfish-actions.pod:2754
21242 " mount-ro device mountpoint\n"
21247 #: ../fish/guestfish-actions.pod:2756
21249 "This is the same as the L</mount> command, but it mounts the filesystem with "
21250 "the read-only (I<-o ro>) flag."
21254 #: ../fish/guestfish-actions.pod:2759
21259 #: ../fish/guestfish-actions.pod:2761
21262 " mount-vfs options vfstype device mountpoint\n"
21267 #: ../fish/guestfish-actions.pod:2763
21269 "This is the same as the L</mount> command, but it allows you to set both the "
21270 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
21274 #: ../fish/guestfish-actions.pod:2767
21275 msgid "mountpoints"
21279 #: ../fish/guestfish-actions.pod:2769
21287 #: ../fish/guestfish-actions.pod:2771
21289 "This call is similar to L</mounts>. That call returns a list of devices. "
21290 "This one returns a hash table (map) of device name to directory where the "
21291 "device is mounted."
21295 #: ../fish/guestfish-actions.pod:2775
21300 #: ../fish/guestfish-actions.pod:2777
21308 #: ../fish/guestfish-actions.pod:2784
21309 msgid "See also: L</mountpoints>"
21313 #: ../fish/guestfish-actions.pod:2786
21318 #: ../fish/guestfish-actions.pod:2788
21326 #: ../fish/guestfish-actions.pod:2793
21327 msgid "ntfs-3g-probe"
21331 #: ../fish/guestfish-actions.pod:2795
21334 " ntfs-3g-probe true|false device\n"
21339 #: ../fish/guestfish-actions.pod:2809
21344 #: ../fish/guestfish-actions.pod:2811
21347 " ntfsresize device\n"
21352 #: ../fish/guestfish-actions.pod:2817
21353 msgid "ntfsresize-size"
21357 #: ../fish/guestfish-actions.pod:2819
21360 " ntfsresize-size device size\n"
21365 #: ../fish/guestfish-actions.pod:2821
21367 "This command is the same as L</ntfsresize> except that it allows you to "
21368 "specify the new size (in bytes) explicitly."
21372 #: ../fish/guestfish-actions.pod:2824
21377 #: ../fish/guestfish-actions.pod:2826
21380 " part-add device prlogex startsect endsect\n"
21385 #: ../fish/guestfish-actions.pod:2828
21387 "This command adds a partition to C<device>. If there is no partition table "
21388 "on the device, call L</part-init> first."
21392 #: ../fish/guestfish-actions.pod:2840
21394 "Creating a partition which covers the whole disk is not so easy. Use L</"
21395 "part-disk> to do that."
21399 #: ../fish/guestfish-actions.pod:2843
21404 #: ../fish/guestfish-actions.pod:2845
21407 " part-del device partnum\n"
21412 #: ../fish/guestfish-actions.pod:2853
21417 #: ../fish/guestfish-actions.pod:2855
21420 " part-disk device parttype\n"
21425 #: ../fish/guestfish-actions.pod:2857
21427 "This command is simply a combination of L</part-init> followed by L</part-"
21428 "add> to create a single primary partition covering the whole disk."
21432 #: ../fish/guestfish-actions.pod:2861
21434 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
21435 "possible values are described in L</part-init>."
21439 #: ../fish/guestfish-actions.pod:2867
21440 msgid "part-get-bootable"
21444 #: ../fish/guestfish-actions.pod:2869
21447 " part-get-bootable device partnum\n"
21452 #: ../fish/guestfish-actions.pod:2874
21453 msgid "See also L</part-set-bootable>."
21457 #: ../fish/guestfish-actions.pod:2876
21458 msgid "part-get-mbr-id"
21462 #: ../fish/guestfish-actions.pod:2878
21465 " part-get-mbr-id device partnum\n"
21470 #: ../fish/guestfish-actions.pod:2883 ../fish/guestfish-actions.pod:3021
21472 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
21473 "undefined results for other partition table types (see L</part-get-"
21478 #: ../fish/guestfish-actions.pod:2887
21479 msgid "part-get-parttype"
21483 #: ../fish/guestfish-actions.pod:2889
21486 " part-get-parttype device\n"
21491 #: ../fish/guestfish-actions.pod:2894
21493 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
21494 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
21495 "possible, although unusual. See L</part-init> for a full list."
21499 #: ../fish/guestfish-actions.pod:2899
21504 #: ../fish/guestfish-actions.pod:2901
21507 " part-init device parttype\n"
21512 #: ../fish/guestfish-actions.pod:2907
21514 "Initially there are no partitions. Following this, you should call L</part-"
21515 "add> for each partition required."
21519 #: ../fish/guestfish-actions.pod:2970
21524 #: ../fish/guestfish-actions.pod:2972
21527 " part-list device\n"
21532 #: ../fish/guestfish-actions.pod:2987
21534 "Start of the partition I<in bytes>. To get sectors you have to divide by "
21535 "the device's sector size, see L</blockdev-getss>."
21539 #: ../fish/guestfish-actions.pod:3000
21540 msgid "part-set-bootable"
21544 #: ../fish/guestfish-actions.pod:3002
21547 " part-set-bootable device partnum true|false\n"
21552 #: ../fish/guestfish-actions.pod:3011
21553 msgid "part-set-mbr-id"
21557 #: ../fish/guestfish-actions.pod:3013
21560 " part-set-mbr-id device partnum idbyte\n"
21565 #: ../fish/guestfish-actions.pod:3025
21566 msgid "part-set-name"
21570 #: ../fish/guestfish-actions.pod:3027
21573 " part-set-name device partnum name\n"
21578 #: ../fish/guestfish-actions.pod:3035
21579 msgid "part-to-dev"
21583 #: ../fish/guestfish-actions.pod:3037
21586 " part-to-dev partition\n"
21591 #: ../fish/guestfish-actions.pod:3043
21593 "The named partition must exist, for example as a string returned from L</"
21594 "list-partitions>."
21598 #: ../fish/guestfish-actions.pod:3046
21599 msgid "ping-daemon"
21603 #: ../fish/guestfish-actions.pod:3048
21611 #: ../fish/guestfish-actions.pod:3055
21616 #: ../fish/guestfish-actions.pod:3057
21619 " pread path count offset\n"
21624 #: ../fish/guestfish-actions.pod:3065
21625 msgid "See also L</pwrite>, L</pread-device>."
21629 #: ../fish/guestfish-actions.pod:3070
21630 msgid "pread-device"
21634 #: ../fish/guestfish-actions.pod:3072
21637 " pread-device device count offset\n"
21642 #: ../fish/guestfish-actions.pod:3080
21643 msgid "See also L</pread>."
21647 #: ../fish/guestfish-actions.pod:3085
21652 #: ../fish/guestfish-actions.pod:3087
21655 " pvcreate device\n"
21660 #: ../fish/guestfish-actions.pod:3093
21665 #: ../fish/guestfish-actions.pod:3095
21668 " pvremove device\n"
21673 #: ../fish/guestfish-actions.pod:3104
21678 #: ../fish/guestfish-actions.pod:3106
21681 " pvresize device\n"
21686 #: ../fish/guestfish-actions.pod:3111
21687 msgid "pvresize-size"
21691 #: ../fish/guestfish-actions.pod:3113
21694 " pvresize-size device size\n"
21699 #: ../fish/guestfish-actions.pod:3115
21701 "This command is the same as L</pvresize> except that it allows you to "
21702 "specify the new size (in bytes) explicitly."
21706 #: ../fish/guestfish-actions.pod:3118
21711 #: ../fish/guestfish-actions.pod:3120
21719 #: ../fish/guestfish-actions.pod:3128
21720 msgid "See also L</pvs-full>."
21724 #: ../fish/guestfish-actions.pod:3130
21729 #: ../fish/guestfish-actions.pod:3132
21737 #: ../fish/guestfish-actions.pod:3137
21742 #: ../fish/guestfish-actions.pod:3139
21750 #: ../fish/guestfish-actions.pod:3143
21755 #: ../fish/guestfish-actions.pod:3145
21758 " pwrite path content offset\n"
21763 #: ../fish/guestfish-actions.pod:3156
21764 msgid "See also L</pread>, L</pwrite-device>."
21768 #: ../fish/guestfish-actions.pod:3161
21769 msgid "pwrite-device"
21773 #: ../fish/guestfish-actions.pod:3163
21776 " pwrite-device device content offset\n"
21781 #: ../fish/guestfish-actions.pod:3173
21782 msgid "See also L</pwrite>."
21786 #: ../fish/guestfish-actions.pod:3178
21791 #: ../fish/guestfish-actions.pod:3180
21794 " read-file path\n"
21799 #: ../fish/guestfish-actions.pod:3185
21801 "Unlike L</cat>, this function can correctly handle files that contain "
21802 "embedded ASCII NUL characters. However unlike L</download>, this function "
21803 "is limited in the total size of file that can be handled."
21807 #: ../fish/guestfish-actions.pod:3193
21812 #: ../fish/guestfish-actions.pod:3195
21815 " read-lines path\n"
21820 #: ../fish/guestfish-actions.pod:3202
21822 "Note that this function cannot correctly handle binary files (specifically, "
21823 "files containing C<\\0> character which is treated as end of line). For "
21824 "those you need to use the L</read-file> function which has a more complex "
21829 #: ../fish/guestfish-actions.pod:3207
21834 #: ../fish/guestfish-actions.pod:3209
21842 #: ../fish/guestfish-actions.pod:3261
21844 "This function is primarily intended for use by programs. To get a simple "
21845 "list of names, use L</ls>. To get a printable directory for human "
21846 "consumption, use L</ll>."
21850 #: ../fish/guestfish-actions.pod:3265
21855 #: ../fish/guestfish-actions.pod:3267
21863 #: ../fish/guestfish-actions.pod:3271
21864 msgid "readlinklist"
21868 #: ../fish/guestfish-actions.pod:3273
21871 " readlinklist path 'names ...'\n"
21876 #: ../fish/guestfish-actions.pod:3297
21881 #: ../fish/guestfish-actions.pod:3299
21889 #: ../fish/guestfish-actions.pod:3304
21890 msgid "removexattr"
21894 #: ../fish/guestfish-actions.pod:3306
21897 " removexattr xattr path\n"
21902 #: ../fish/guestfish-actions.pod:3311
21903 msgid "See also: L</lremovexattr>, L<attr(5)>."
21907 #: ../fish/guestfish-actions.pod:3313
21912 #: ../fish/guestfish-actions.pod:3315
21915 " resize2fs device\n"
21920 #: ../fish/guestfish-actions.pod:3320
21922 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
21923 "before calling this command. For unknown reasons C<resize2fs> sometimes "
21924 "gives an error about this and sometimes not. In any case, it is always safe "
21925 "to call L</e2fsck-f> before calling this function."
21929 #: ../fish/guestfish-actions.pod:3326
21930 msgid "resize2fs-size"
21934 #: ../fish/guestfish-actions.pod:3328
21937 " resize2fs-size device size\n"
21942 #: ../fish/guestfish-actions.pod:3330
21944 "This command is the same as L</resize2fs> except that it allows you to "
21945 "specify the new size (in bytes) explicitly."
21949 #: ../fish/guestfish-actions.pod:3333
21954 #: ../fish/guestfish-actions.pod:3335
21962 #: ../fish/guestfish-actions.pod:3339
21967 #: ../fish/guestfish-actions.pod:3341
21975 #: ../fish/guestfish-actions.pod:3347
21980 #: ../fish/guestfish-actions.pod:3349
21988 #: ../fish/guestfish-actions.pod:3353
21989 msgid "rmmountpoint"
21993 #: ../fish/guestfish-actions.pod:3355
21996 " rmmountpoint exemptpath\n"
22001 #: ../fish/guestfish-actions.pod:3357
22003 "This calls removes a mountpoint that was previously created with L</"
22004 "mkmountpoint>. See L</mkmountpoint> for full details."
22008 #: ../fish/guestfish-actions.pod:3361
22009 msgid "scrub-device"
22013 #: ../fish/guestfish-actions.pod:3363
22016 " scrub-device device\n"
22021 #: ../fish/guestfish-actions.pod:3374
22026 #: ../fish/guestfish-actions.pod:3376
22029 " scrub-file file\n"
22034 #: ../fish/guestfish-actions.pod:3386
22035 msgid "scrub-freespace"
22039 #: ../fish/guestfish-actions.pod:3388
22042 " scrub-freespace dir\n"
22047 #: ../fish/guestfish-actions.pod:3390
22049 "This command creates the directory C<dir> and then fills it with files until "
22050 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
22051 "deletes them. The intention is to scrub any free space on the partition "
22052 "containing C<dir>."
22056 #: ../fish/guestfish-actions.pod:3399
22061 #: ../fish/guestfish-actions.pod:3401
22066 #: ../fish/guestfish-actions.pod:3403
22069 " set-append append\n"
22074 #: ../fish/guestfish-actions.pod:3414
22075 msgid "set-autosync"
22079 #: ../fish/guestfish-actions.pod:3416
22084 #: ../fish/guestfish-actions.pod:3418
22087 " set-autosync true|false\n"
22092 #: ../fish/guestfish-actions.pod:3420
22094 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
22095 "effort attempt to run L</umount-all> followed by L</sync> when the handle is "
22096 "closed (also if the program exits without closing handles)."
22100 #: ../fish/guestfish-actions.pod:3428
22105 #: ../fish/guestfish-actions.pod:3430
22110 #: ../fish/guestfish-actions.pod:3432
22113 " set-direct true|false\n"
22118 #: ../fish/guestfish-actions.pod:3438
22120 "One consequence of this is that log messages aren't caught by the library "
22121 "and handled by L</set-log-message-callback>, but go straight to stdout."
22125 #: ../fish/guestfish-actions.pod:3447
22126 msgid "set-e2label"
22130 #: ../fish/guestfish-actions.pod:3449
22133 " set-e2label device label\n"
22138 #: ../fish/guestfish-actions.pod:3455
22140 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
22141 "label on a filesystem."
22145 #: ../fish/guestfish-actions.pod:3458
22150 #: ../fish/guestfish-actions.pod:3460
22153 " set-e2uuid device uuid\n"
22158 #: ../fish/guestfish-actions.pod:3467
22160 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
22161 "UUID of a filesystem."
22165 #: ../fish/guestfish-actions.pod:3470
22166 msgid "set-memsize"
22170 #: ../fish/guestfish-actions.pod:3472
22175 #: ../fish/guestfish-actions.pod:3474
22178 " set-memsize memsize\n"
22183 #: ../fish/guestfish-actions.pod:3476
22185 "This sets the memory size in megabytes allocated to the qemu subprocess. "
22186 "This only has any effect if called before L</launch>."
22190 #: ../fish/guestfish-actions.pod:3487
22191 msgid "set-network"
22195 #: ../fish/guestfish-actions.pod:3489
22200 #: ../fish/guestfish-actions.pod:3491
22203 " set-network true|false\n"
22208 #: ../fish/guestfish-actions.pod:3499
22210 "You must call this before calling L</launch>, otherwise it has no effect."
22214 #: ../fish/guestfish-actions.pod:3502
22219 #: ../fish/guestfish-actions.pod:3504
22224 #: ../fish/guestfish-actions.pod:3506
22227 " set-path searchpath\n"
22232 #: ../fish/guestfish-actions.pod:3515
22237 #: ../fish/guestfish-actions.pod:3517
22242 #: ../fish/guestfish-actions.pod:3519
22250 #: ../fish/guestfish-actions.pod:3539
22251 msgid "set-recovery-proc"
22255 #: ../fish/guestfish-actions.pod:3541
22256 msgid "recovery-proc"
22260 #: ../fish/guestfish-actions.pod:3543
22263 " set-recovery-proc true|false\n"
22268 #: ../fish/guestfish-actions.pod:3545
22270 "If this is called with the parameter C<false> then L</launch> does not "
22271 "create a recovery process. The purpose of the recovery process is to stop "
22272 "runaway qemu processes in the case where the main program aborts abruptly."
22276 #: ../fish/guestfish-actions.pod:3550
22278 "This only has any effect if called before L</launch>, and the default is "
22283 #: ../fish/guestfish-actions.pod:3559
22284 msgid "set-selinux"
22288 #: ../fish/guestfish-actions.pod:3561
22293 #: ../fish/guestfish-actions.pod:3563
22296 " set-selinux true|false\n"
22301 #: ../fish/guestfish-actions.pod:3574
22306 #: ../fish/guestfish-actions.pod:3576
22311 #: ../fish/guestfish-actions.pod:3578
22314 " set-trace true|false\n"
22319 #: ../fish/guestfish-actions.pod:3594
22320 msgid "set-verbose"
22324 #: ../fish/guestfish-actions.pod:3596
22329 #: ../fish/guestfish-actions.pod:3598
22332 " set-verbose true|false\n"
22337 #: ../fish/guestfish-actions.pod:3605
22342 #: ../fish/guestfish-actions.pod:3607
22345 " setcon context\n"
22350 #: ../fish/guestfish-actions.pod:3614
22355 #: ../fish/guestfish-actions.pod:3616
22358 " setxattr xattr val vallen path\n"
22363 #: ../fish/guestfish-actions.pod:3622
22364 msgid "See also: L</lsetxattr>, L<attr(5)>."
22368 #: ../fish/guestfish-actions.pod:3624
22373 #: ../fish/guestfish-actions.pod:3626
22376 " sfdisk device cyls heads sectors 'lines ...'\n"
22381 #: ../fish/guestfish-actions.pod:3648
22382 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
22386 #: ../fish/guestfish-actions.pod:3654
22391 #: ../fish/guestfish-actions.pod:3656
22394 " sfdiskM device 'lines ...'\n"
22399 #: ../fish/guestfish-actions.pod:3658
22401 "This is a simplified interface to the L</sfdisk> command, where partition "
22402 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
22403 "you don't need to specify the cyls, heads and sectors parameters which were "
22404 "rarely if ever used anyway."
22408 #: ../fish/guestfish-actions.pod:3664
22409 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
22413 #: ../fish/guestfish-actions.pod:3670
22418 #: ../fish/guestfish-actions.pod:3672
22421 " sfdisk-N device partnum cyls heads sectors line\n"
22426 #: ../fish/guestfish-actions.pod:3677
22428 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
22429 "cyls/heads/sectors parameters."
22433 #: ../fish/guestfish-actions.pod:3680
22434 msgid "See also: L</part-add>"
22438 #: ../fish/guestfish-actions.pod:3685
22439 msgid "sfdisk-disk-geometry"
22443 #: ../fish/guestfish-actions.pod:3687
22446 " sfdisk-disk-geometry device\n"
22451 #: ../fish/guestfish-actions.pod:3689
22453 "This displays the disk geometry of C<device> read from the partition table. "
22454 "Especially in the case where the underlying block device has been resized, "
22455 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
22456 "kernel-geometry>)."
22460 #: ../fish/guestfish-actions.pod:3697
22461 msgid "sfdisk-kernel-geometry"
22465 #: ../fish/guestfish-actions.pod:3699
22468 " sfdisk-kernel-geometry device\n"
22473 #: ../fish/guestfish-actions.pod:3706
22478 #: ../fish/guestfish-actions.pod:3708
22481 " sfdisk-l device\n"
22486 #: ../fish/guestfish-actions.pod:3714
22487 msgid "See also: L</part-list>"
22491 #: ../fish/guestfish-actions.pod:3716
22496 #: ../fish/guestfish-actions.pod:3718
22504 #: ../fish/guestfish-actions.pod:3723
22505 msgid "This is like L</command>, but passes the command to:"
22509 #: ../fish/guestfish-actions.pod:3731
22510 msgid "All the provisos about L</command> apply to this call."
22514 #: ../fish/guestfish-actions.pod:3733
22519 #: ../fish/guestfish-actions.pod:3735
22522 " sh-lines command\n"
22527 #: ../fish/guestfish-actions.pod:3737
22528 msgid "This is the same as L</sh>, but splits the result into a list of lines."
22532 #: ../fish/guestfish-actions.pod:3740
22533 msgid "See also: L</command-lines>"
22537 #: ../fish/guestfish-actions.pod:3742
22542 #: ../fish/guestfish-actions.pod:3744
22550 #: ../fish/guestfish-actions.pod:3748
22555 #: ../fish/guestfish-actions.pod:3750
22563 #: ../fish/guestfish-actions.pod:3756
22568 #: ../fish/guestfish-actions.pod:3758
22576 #: ../fish/guestfish-actions.pod:3766
22581 #: ../fish/guestfish-actions.pod:3768
22589 #: ../fish/guestfish-actions.pod:3776
22594 #: ../fish/guestfish-actions.pod:3778
22597 " strings-e encoding path\n"
22602 #: ../fish/guestfish-actions.pod:3780
22604 "This is like the L</strings> command, but allows you to specify the encoding "
22605 "of strings that are looked for in the source file C<path>."
22609 #: ../fish/guestfish-actions.pod:3790
22611 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
22612 "ISO-8859-X (this is what L</strings> uses)."
22616 #: ../fish/guestfish-actions.pod:3822
22617 msgid "swapoff-device"
22621 #: ../fish/guestfish-actions.pod:3824
22624 " swapoff-device device\n"
22629 #: ../fish/guestfish-actions.pod:3826
22631 "This command disables the libguestfs appliance swap device or partition "
22632 "named C<device>. See L</swapon-device>."
22636 #: ../fish/guestfish-actions.pod:3830
22637 msgid "swapoff-file"
22641 #: ../fish/guestfish-actions.pod:3832
22644 " swapoff-file file\n"
22649 #: ../fish/guestfish-actions.pod:3836
22650 msgid "swapoff-label"
22654 #: ../fish/guestfish-actions.pod:3838
22657 " swapoff-label label\n"
22662 #: ../fish/guestfish-actions.pod:3843
22663 msgid "swapoff-uuid"
22667 #: ../fish/guestfish-actions.pod:3845
22670 " swapoff-uuid uuid\n"
22675 #: ../fish/guestfish-actions.pod:3850
22676 msgid "swapon-device"
22680 #: ../fish/guestfish-actions.pod:3852
22683 " swapon-device device\n"
22688 #: ../fish/guestfish-actions.pod:3854
22690 "This command enables the libguestfs appliance to use the swap device or "
22691 "partition named C<device>. The increased memory is made available for all "
22692 "commands, for example those run using L</command> or L</sh>."
22696 #: ../fish/guestfish-actions.pod:3866
22697 msgid "swapon-file"
22701 #: ../fish/guestfish-actions.pod:3868
22704 " swapon-file file\n"
22709 #: ../fish/guestfish-actions.pod:3870
22711 "This command enables swap to a file. See L</swapon-device> for other notes."
22715 #: ../fish/guestfish-actions.pod:3873
22716 msgid "swapon-label"
22720 #: ../fish/guestfish-actions.pod:3875
22723 " swapon-label label\n"
22728 #: ../fish/guestfish-actions.pod:3877
22730 "This command enables swap to a labeled swap partition. See L</swapon-"
22731 "device> for other notes."
22735 #: ../fish/guestfish-actions.pod:3880
22736 msgid "swapon-uuid"
22740 #: ../fish/guestfish-actions.pod:3882
22743 " swapon-uuid uuid\n"
22748 #: ../fish/guestfish-actions.pod:3884
22750 "This command enables swap to a swap partition with the given UUID. See L</"
22751 "swapon-device> for other notes."
22755 #: ../fish/guestfish-actions.pod:3887
22760 #: ../fish/guestfish-actions.pod:3889
22768 #: ../fish/guestfish-actions.pod:3897
22773 #: ../fish/guestfish-actions.pod:3899
22781 #: ../fish/guestfish-actions.pod:3907
22786 #: ../fish/guestfish-actions.pod:3909
22789 " tail-n nrlines path\n"
22794 #: ../fish/guestfish-actions.pod:3922
22799 #: ../fish/guestfish-actions.pod:3924
22802 " tar-in (tarfile|-) directory\n"
22807 #: ../fish/guestfish-actions.pod:3929
22808 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
22812 #: ../fish/guestfish-actions.pod:3934
22817 #: ../fish/guestfish-actions.pod:3936
22820 " tar-out directory (tarfile|-)\n"
22825 #: ../fish/guestfish-actions.pod:3941
22826 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
22830 #: ../fish/guestfish-actions.pod:3946
22835 #: ../fish/guestfish-actions.pod:3948
22838 " tgz-in (tarball|-) directory\n"
22843 #: ../fish/guestfish-actions.pod:3953
22844 msgid "To upload an uncompressed tarball, use L</tar-in>."
22848 #: ../fish/guestfish-actions.pod:3957
22853 #: ../fish/guestfish-actions.pod:3959
22856 " tgz-out directory (tarball|-)\n"
22861 #: ../fish/guestfish-actions.pod:3964
22862 msgid "To download an uncompressed tarball, use L</tar-out>."
22866 #: ../fish/guestfish-actions.pod:3968
22871 #: ../fish/guestfish-actions.pod:3970
22879 #: ../fish/guestfish-actions.pod:3979
22884 #: ../fish/guestfish-actions.pod:3981
22892 #: ../fish/guestfish-actions.pod:3986
22893 msgid "truncate-size"
22897 #: ../fish/guestfish-actions.pod:3988
22900 " truncate-size path size\n"
22905 #: ../fish/guestfish-actions.pod:3993
22907 "If the current file size is less than C<size> then the file is extended to "
22908 "the required size with zero bytes. This creates a sparse file (ie. disk "
22909 "blocks are not allocated for the file until you write to it). To create a "
22910 "non-sparse file of zeroes, use L</fallocate64> instead."
22914 #: ../fish/guestfish-actions.pod:3999
22919 #: ../fish/guestfish-actions.pod:4001
22922 " tune2fs-l device\n"
22927 #: ../fish/guestfish-actions.pod:4011
22932 #: ../fish/guestfish-actions.pod:4013
22935 " txz-in (tarball|-) directory\n"
22940 #: ../fish/guestfish-actions.pod:4020
22945 #: ../fish/guestfish-actions.pod:4022
22948 " txz-out directory (tarball|-)\n"
22953 #: ../fish/guestfish-actions.pod:4029
22958 #: ../fish/guestfish-actions.pod:4031
22966 #: ../fish/guestfish-actions.pod:4045
22967 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
22971 #: ../fish/guestfish-actions.pod:4050
22976 #: ../fish/guestfish-actions.pod:4052
22981 #: ../fish/guestfish-actions.pod:4054
22984 " umount pathordevice\n"
22989 #: ../fish/guestfish-actions.pod:4060
22994 #: ../fish/guestfish-actions.pod:4062
22995 msgid "unmount-all"
22999 #: ../fish/guestfish-actions.pod:4064
23007 #: ../fish/guestfish-actions.pod:4070
23012 #: ../fish/guestfish-actions.pod:4072
23015 " upload (filename|-) remotefilename\n"
23020 #: ../fish/guestfish-actions.pod:4079
23021 msgid "See also L</download>."
23025 #: ../fish/guestfish-actions.pod:4083
23026 msgid "upload-offset"
23030 #: ../fish/guestfish-actions.pod:4085
23033 " upload-offset (filename|-) remotefilename offset\n"
23038 #: ../fish/guestfish-actions.pod:4097
23040 "Note that there is no limit on the amount of data that can be uploaded with "
23041 "this call, unlike with L</pwrite>, and this call always writes the full "
23042 "amount unless an error occurs."
23046 #: ../fish/guestfish-actions.pod:4102
23047 msgid "See also L</upload>, L</pwrite>."
23051 #: ../fish/guestfish-actions.pod:4106
23056 #: ../fish/guestfish-actions.pod:4108
23059 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
23064 #: ../fish/guestfish-actions.pod:4127
23069 #: ../fish/guestfish-actions.pod:4129
23077 #: ../fish/guestfish-actions.pod:4156
23079 "I<Note:> Don't use this call to test for availability of features. In "
23080 "enterprise distributions we backport features from later versions into "
23081 "earlier versions, making this an unreliable way to test for features. Use "
23082 "L</available> instead."
23086 #: ../fish/guestfish-actions.pod:4162
23091 #: ../fish/guestfish-actions.pod:4164
23094 " vfs-label device\n"
23099 #: ../fish/guestfish-actions.pod:4171
23100 msgid "To find a filesystem from the label, use L</findfs-label>."
23104 #: ../fish/guestfish-actions.pod:4173
23109 #: ../fish/guestfish-actions.pod:4175
23112 " vfs-type device\n"
23117 #: ../fish/guestfish-actions.pod:4185
23122 #: ../fish/guestfish-actions.pod:4187
23125 " vfs-uuid device\n"
23130 #: ../fish/guestfish-actions.pod:4194
23131 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
23135 #: ../fish/guestfish-actions.pod:4196
23136 msgid "vg-activate"
23140 #: ../fish/guestfish-actions.pod:4198
23143 " vg-activate true|false 'volgroups ...'\n"
23148 #: ../fish/guestfish-actions.pod:4211
23149 msgid "vg-activate-all"
23153 #: ../fish/guestfish-actions.pod:4213
23156 " vg-activate-all true|false\n"
23161 #: ../fish/guestfish-actions.pod:4223
23166 #: ../fish/guestfish-actions.pod:4225
23169 " vgcreate volgroup 'physvols ...'\n"
23174 #: ../fish/guestfish-actions.pod:4230
23179 #: ../fish/guestfish-actions.pod:4232
23182 " vglvuuids vgname\n"
23187 #: ../fish/guestfish-actions.pod:4237
23189 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
23190 "logical volumes and volume groups."
23194 #: ../fish/guestfish-actions.pod:4240
23195 msgid "See also L</vgpvuuids>."
23199 #: ../fish/guestfish-actions.pod:4242
23204 #: ../fish/guestfish-actions.pod:4244
23207 " vgpvuuids vgname\n"
23212 #: ../fish/guestfish-actions.pod:4249
23214 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
23215 "physical volumes and volume groups."
23219 #: ../fish/guestfish-actions.pod:4252
23220 msgid "See also L</vglvuuids>."
23224 #: ../fish/guestfish-actions.pod:4254
23229 #: ../fish/guestfish-actions.pod:4256
23232 " vgremove vgname\n"
23237 #: ../fish/guestfish-actions.pod:4263
23242 #: ../fish/guestfish-actions.pod:4265
23245 " vgrename volgroup newvolgroup\n"
23250 #: ../fish/guestfish-actions.pod:4269
23255 #: ../fish/guestfish-actions.pod:4271
23263 #: ../fish/guestfish-actions.pod:4279
23264 msgid "See also L</vgs-full>."
23268 #: ../fish/guestfish-actions.pod:4281
23273 #: ../fish/guestfish-actions.pod:4283
23281 #: ../fish/guestfish-actions.pod:4288
23286 #: ../fish/guestfish-actions.pod:4290
23294 #: ../fish/guestfish-actions.pod:4295
23299 #: ../fish/guestfish-actions.pod:4297
23307 #: ../fish/guestfish-actions.pod:4301
23312 #: ../fish/guestfish-actions.pod:4303
23320 #: ../fish/guestfish-actions.pod:4308
23325 #: ../fish/guestfish-actions.pod:4310
23333 #: ../fish/guestfish-actions.pod:4315
23338 #: ../fish/guestfish-actions.pod:4317
23346 #: ../fish/guestfish-actions.pod:4322
23351 #: ../fish/guestfish-actions.pod:4324
23354 " write path content\n"
23359 #: ../fish/guestfish-actions.pod:4332
23364 #: ../fish/guestfish-actions.pod:4334
23367 " write-file path content size\n"
23372 #: ../fish/guestfish-actions.pod:4357
23377 #: ../fish/guestfish-actions.pod:4359
23380 " zegrep regex path\n"
23385 #: ../fish/guestfish-actions.pod:4367
23390 #: ../fish/guestfish-actions.pod:4369
23393 " zegrepi regex path\n"
23398 #: ../fish/guestfish-actions.pod:4377
23403 #: ../fish/guestfish-actions.pod:4379
23411 #: ../fish/guestfish-actions.pod:4387
23412 msgid "See also: L</zero-device>, L</scrub-device>."
23416 #: ../fish/guestfish-actions.pod:4389
23417 msgid "zero-device"
23421 #: ../fish/guestfish-actions.pod:4391
23424 " zero-device device\n"
23429 #: ../fish/guestfish-actions.pod:4393
23431 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
23432 "which just zeroes the first few blocks of a device."
23436 #: ../fish/guestfish-actions.pod:4400
23441 #: ../fish/guestfish-actions.pod:4402
23444 " zerofree device\n"
23449 #: ../fish/guestfish-actions.pod:4415
23454 #: ../fish/guestfish-actions.pod:4417
23457 " zfgrep pattern path\n"
23462 #: ../fish/guestfish-actions.pod:4425
23467 #: ../fish/guestfish-actions.pod:4427
23470 " zfgrepi pattern path\n"
23475 #: ../fish/guestfish-actions.pod:4435
23480 #: ../fish/guestfish-actions.pod:4437
23483 " zfile meth path\n"
23488 #: ../fish/guestfish-actions.pod:4444
23490 "Since 1.0.63, use L</file> instead which can now process compressed files."
23494 #: ../fish/guestfish-actions.pod:4454
23499 #: ../fish/guestfish-actions.pod:4456
23502 " zgrep regex path\n"
23507 #: ../fish/guestfish-actions.pod:4464
23512 #: ../fish/guestfish-actions.pod:4466
23515 " zgrepi regex path\n"
23520 #: ../fish/guestfish-commands.pod:1
23525 #: ../fish/guestfish-commands.pod:3
23530 #: ../fish/guestfish-commands.pod:5
23533 " alloc filename size\n"
23538 #: ../fish/guestfish-commands.pod:7
23540 "This creates an empty (zeroed) file of the given size, and then adds so it "
23541 "can be further examined."
23545 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
23546 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
23550 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
23551 msgid "Size can be specified using standard suffixes, eg. C<1M>."
23555 #: ../fish/guestfish-commands.pod:14
23557 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
23558 "image, see L</PREPARED DISK IMAGES>."
23562 #: ../fish/guestfish-commands.pod:17
23567 #: ../fish/guestfish-commands.pod:19
23570 " copy-in local [local ...] /remotedir\n"
23575 #: ../fish/guestfish-commands.pod:21
23577 "C<copy-in> copies local files or directories recursively into the disk "
23578 "image, placing them in the directory called C</remotedir> (which must "
23579 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
23580 "other commands as necessary."
23584 #: ../fish/guestfish-commands.pod:26
23586 "Multiple local files and directories can be specified, but the last "
23587 "parameter must always be a remote directory. Wildcards cannot be used."
23591 #: ../fish/guestfish-commands.pod:30
23596 #: ../fish/guestfish-commands.pod:32
23599 " copy-out remote [remote ...] localdir\n"
23604 #: ../fish/guestfish-commands.pod:34
23606 "C<copy-out> copies remote files or directories recursively out of the disk "
23607 "image, placing them on the host disk in a local directory called C<localdir> "
23608 "(which must exist). This guestfish meta-command turns into a sequence of L</"
23609 "download>, L</tar-out> and other commands as necessary."
23613 #: ../fish/guestfish-commands.pod:40
23615 "Multiple remote files and directories can be specified, but the last "
23616 "parameter must always be a local directory. To download to the current "
23617 "directory, use C<.> as in:"
23621 #: ../fish/guestfish-commands.pod:44
23624 " copy-out /home .\n"
23629 #: ../fish/guestfish-commands.pod:46
23631 "Wildcards cannot be used in the ordinary command, but you can use them with "
23632 "the help of L</glob> like this:"
23636 #: ../fish/guestfish-commands.pod:49
23639 " glob copy-out /home/* .\n"
23644 #: ../fish/guestfish-commands.pod:51
23649 #: ../fish/guestfish-commands.pod:53
23652 " echo [params ...]\n"
23657 #: ../fish/guestfish-commands.pod:55
23658 msgid "This echos the parameters to the terminal."
23662 #: ../fish/guestfish-commands.pod:57
23667 #: ../fish/guestfish-commands.pod:59
23672 #: ../fish/guestfish-commands.pod:61
23677 #: ../fish/guestfish-commands.pod:63
23685 #: ../fish/guestfish-commands.pod:65
23687 "This is used to edit a file. It downloads the file, edits it locally using "
23688 "your editor, then uploads the result."
23692 #: ../fish/guestfish-commands.pod:68
23694 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
23695 "or C<emacs> you will get those corresponding editors."
23699 #: ../fish/guestfish-commands.pod:72
23704 #: ../fish/guestfish-commands.pod:74
23707 " glob command args...\n"
23712 #: ../fish/guestfish-commands.pod:76
23714 "Expand wildcards in any paths in the args list, and run C<command> "
23715 "repeatedly on each matching path."
23719 #: ../fish/guestfish-commands.pod:79
23720 msgid "See L</WILDCARDS AND GLOBBING>."
23724 #: ../fish/guestfish-commands.pod:81
23729 #: ../fish/guestfish-commands.pod:83
23732 " hexedit <filename|device>\n"
23733 " hexedit <filename|device> <max>\n"
23734 " hexedit <filename|device> <start> <max>\n"
23739 #: ../fish/guestfish-commands.pod:87
23741 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
23746 #: ../fish/guestfish-commands.pod:90
23748 "This command works by downloading potentially the whole file or device, "
23749 "editing it locally, then uploading it. If the file or device is large, you "
23750 "have to specify which part you wish to edit by using C<max> and/or C<start> "
23751 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
23752 "usual modifiers allowed such as C<1M> (1 megabyte)."
23756 #: ../fish/guestfish-commands.pod:97
23757 msgid "For example to edit the first few sectors of a disk you might do:"
23761 #: ../fish/guestfish-commands.pod:100
23764 " hexedit /dev/sda 1M\n"
23769 #: ../fish/guestfish-commands.pod:102
23771 "which would allow you to edit anywhere within the first megabyte of the disk."
23775 #: ../fish/guestfish-commands.pod:105
23776 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
23780 #: ../fish/guestfish-commands.pod:107
23783 " hexedit /dev/sda1 0x400 0x400\n"
23788 #: ../fish/guestfish-commands.pod:109
23789 msgid "(assuming the superblock is in the standard location)."
23793 #: ../fish/guestfish-commands.pod:111
23795 "This command requires the external L<hexedit(1)> program. You can specify "
23796 "another program to use by setting the C<HEXEDITOR> environment variable."
23800 #: ../fish/guestfish-commands.pod:115
23801 msgid "See also L</hexdump>."
23805 #: ../fish/guestfish-commands.pod:117
23810 #: ../fish/guestfish-commands.pod:119
23818 #: ../fish/guestfish-commands.pod:121
23820 "Change the local directory, ie. the current directory of guestfish itself."
23824 #: ../fish/guestfish-commands.pod:124
23825 msgid "Note that C<!cd> won't do what you might expect."
23829 #: ../fish/guestfish-commands.pod:126
23834 #: ../fish/guestfish-commands.pod:128
23839 #: ../fish/guestfish-commands.pod:130
23847 #: ../fish/guestfish-commands.pod:132
23848 msgid "Opens the manual page for guestfish."
23852 #: ../fish/guestfish-commands.pod:134
23857 #: ../fish/guestfish-commands.pod:136
23862 #: ../fish/guestfish-commands.pod:138
23870 #: ../fish/guestfish-commands.pod:140
23878 #: ../fish/guestfish-commands.pod:142
23879 msgid "This is used to view a file."
23883 #: ../fish/guestfish-commands.pod:144
23885 "The default viewer is C<$PAGER>. However if you use the alternate command "
23886 "C<less> you will get the C<less> command specifically."
23890 #: ../fish/guestfish-commands.pod:147
23895 #: ../fish/guestfish-commands.pod:149
23903 #: ../fish/guestfish-commands.pod:151
23905 "Close and reopen the libguestfs handle. It is not necessary to use this "
23906 "normally, because the handle is closed properly when guestfish exits. "
23907 "However this is occasionally useful for testing."
23911 #: ../fish/guestfish-commands.pod:155
23916 #: ../fish/guestfish-commands.pod:157
23919 " sparse filename size\n"
23924 #: ../fish/guestfish-commands.pod:159
23926 "This creates an empty sparse file of the given size, and then adds so it can "
23927 "be further examined."
23931 #: ../fish/guestfish-commands.pod:162
23933 "In all respects it works the same as the L</alloc> command, except that the "
23934 "image file is allocated sparsely, which means that disk blocks are not "
23935 "assigned to the file until they are needed. Sparse disk files only use "
23936 "space when written to, but they are slower and there is a danger you could "
23937 "run out of real disk space during a write operation."
23941 #: ../fish/guestfish-commands.pod:172
23946 #: ../fish/guestfish-commands.pod:174
23954 #: ../fish/guestfish-commands.pod:176
23956 "This command returns a list of the optional groups known to the daemon, and "
23957 "indicates which ones are supported by this build of the libguestfs appliance."
23961 #: ../fish/guestfish-commands.pod:180
23962 msgid "See also L<guestfs(3)/AVAILABILITY>."
23966 #: ../fish/guestfish-commands.pod:182
23971 #: ../fish/guestfish-commands.pod:184
23974 " time command args...\n"
23979 #: ../fish/guestfish-commands.pod:186
23981 "Run the command as usual, but print the elapsed time afterwards. This can "
23982 "be useful for benchmarking operations."
23986 #: ../test-tool/libguestfs-test-tool.pod:5
23987 msgid "libguestfs-test-tool - End user tests for libguestfs"
23991 #: ../test-tool/libguestfs-test-tool.pod:9
23994 " libguestfs-test-tool [--options]\n"
23999 #: ../test-tool/libguestfs-test-tool.pod:13
24001 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
24002 "and developers, to allow them to check basic libguestfs functionality is "
24003 "working. This is needed because libguestfs occasionally breaks for reasons "
24004 "beyond our control: usually because of changes in the underlying qemu or "
24005 "kernel packages, or the host environment."
24009 #: ../test-tool/libguestfs-test-tool.pod:20
24010 msgid "If you suspect a problem in libguestfs, then just run:"
24014 #: ../test-tool/libguestfs-test-tool.pod:22
24017 " libguestfs-test-tool\n"
24022 #: ../test-tool/libguestfs-test-tool.pod:24
24023 msgid "It will print lots of diagnostic messages."
24027 #: ../test-tool/libguestfs-test-tool.pod:26
24028 msgid "If it runs to completion successfully, you will see this near the end:"
24032 #: ../test-tool/libguestfs-test-tool.pod:28
24035 " ===== TEST FINISHED OK =====\n"
24040 #: ../test-tool/libguestfs-test-tool.pod:30
24041 msgid "and the test tool will exit with code 0."
24045 #: ../test-tool/libguestfs-test-tool.pod:32
24047 "If it fails (and/or exits with non-zero error code), please paste the "
24048 "B<complete, unedited> output of the test tool into a bug report. More "
24049 "information about reporting bugs can be found on the L<http://libguestfs.org/"
24054 #: ../test-tool/libguestfs-test-tool.pod:41
24059 #: ../test-tool/libguestfs-test-tool.pod:43
24060 msgid "Display short usage information and exit."
24064 #: ../test-tool/libguestfs-test-tool.pod:45
24065 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
24069 #: ../test-tool/libguestfs-test-tool.pod:47
24071 "Pass an alternate name for the helper program. libguestfs-test-tool will "
24072 "normally look in the C<$libexec> directory that was configured when the tool "
24077 #: ../test-tool/libguestfs-test-tool.pod:51
24078 msgid "I<--qemu qemu_binary>"
24082 #: ../test-tool/libguestfs-test-tool.pod:53
24084 "If you have downloaded another qemu binary, point this option at the full "
24085 "path of the binary to try it."
24089 #: ../test-tool/libguestfs-test-tool.pod:56
24090 msgid "I<--qemudir qemu_source_dir>"
24094 #: ../test-tool/libguestfs-test-tool.pod:58
24096 "If you have compiled qemu from source, point this option at the source "
24097 "directory to try it."
24101 #: ../test-tool/libguestfs-test-tool.pod:61
24102 msgid "I<--timeout N>"
24106 #: ../test-tool/libguestfs-test-tool.pod:63
24108 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
24109 "does not usually need to be adjusted unless your machine is very slow."
24113 #: ../test-tool/libguestfs-test-tool.pod:69
24114 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
24118 #: ../test-tool/libguestfs-test-tool.pod:71
24120 "If you have compiled another version of qemu from source and would like to "
24121 "try that, then you can use the I<--qemudir> option to point to the qemu "
24122 "source directory."
24126 #: ../test-tool/libguestfs-test-tool.pod:75
24128 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
24129 "option to point to the binary."
24133 #: ../test-tool/libguestfs-test-tool.pod:78
24135 "When using an alternate qemu with libguestfs, usually you would need to "
24136 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in L<guestfs(3)"
24137 ">). libguestfs-test-tool writes a temporary qemu wrapper script when you "
24138 "use either of the I<--qemudir> or I<--qemu> options."
24142 #: ../test-tool/libguestfs-test-tool.pod:85
24144 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
24145 "I<1> if there was an error."
24149 #: ../test-tool/libguestfs-test-tool.pod:92
24150 msgid "/usr/libexec/libguestfs-test-tool-helper"
24154 #: ../test-tool/libguestfs-test-tool.pod:94
24156 "This helper program is run inside the appliance and provides additional "
24161 #: ../test-tool/libguestfs-test-tool.pod:97
24162 msgid "/usr/bin/mkisofs"
24166 #: ../test-tool/libguestfs-test-tool.pod:99
24168 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
24169 "which is used as part of the tests."
24173 #: ../test-tool/libguestfs-test-tool.pod:106
24175 "For the full list of environment variables which may affect libguestfs, "
24176 "please see the L<guestfs(3)> manual page."
24180 #: ../test-tool/libguestfs-test-tool.pod:111
24181 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
24185 #: ../test-tool/libguestfs-test-tool.pod:121
24186 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
24190 #: ../fuse/guestmount.pod:5
24192 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
24196 #: ../fuse/guestmount.pod:9
24199 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
24204 #: ../fuse/guestmount.pod:11
24207 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
24212 #: ../fuse/guestmount.pod:13
24215 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
24220 #: ../fuse/guestmount.pod:17
24222 "You must I<not> use C<guestmount> in read-write mode on live virtual "
24223 "machines. If you do this, you risk disk corruption in the VM."
24227 #: ../fuse/guestmount.pod:22
24229 "The guestmount program can be used to mount virtual machine filesystems and "
24230 "other disk images on the host. It uses libguestfs for access to the guest "
24231 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
24232 "a mountable device."
24236 #: ../fuse/guestmount.pod:27
24238 "Along with other options, you have to give at least one device (I<-a> "
24239 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
24240 "option) or use the I<-i> inspection option. How this works is better "
24241 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
24246 #: ../fuse/guestmount.pod:33
24248 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
24249 "by you, and the filesystem will not be visible to any other users unless you "
24250 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
24251 "the filesystem, use the C<fusermount -u> command."
24255 #: ../fuse/guestmount.pod:41
24257 "For a typical Windows guest which has its main filesystem on the first "
24262 #: ../fuse/guestmount.pod:44
24265 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
24270 #: ../fuse/guestmount.pod:46
24272 "For a typical Linux guest which has a /boot filesystem on the first "
24273 "partition, and the root filesystem on a logical volume:"
24277 #: ../fuse/guestmount.pod:49
24280 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
24285 #: ../fuse/guestmount.pod:51
24286 msgid "To get libguestfs to detect guest mountpoints for you:"
24290 #: ../fuse/guestmount.pod:53
24293 " guestmount -a guest.img -i --ro /mnt\n"
24298 #: ../fuse/guestmount.pod:55
24299 msgid "For a libvirt guest called \"Guest\" you could do:"
24303 #: ../fuse/guestmount.pod:57
24306 " guestmount -d Guest -i --ro /mnt\n"
24311 #: ../fuse/guestmount.pod:59
24313 "If you don't know what filesystems are contained in a guest or disk image, "
24314 "use L<virt-list-filesystems(1)> first:"
24318 #: ../fuse/guestmount.pod:62
24321 " virt-list-filesystems MyGuest\n"
24326 #: ../fuse/guestmount.pod:64
24328 "If you want to trace the libguestfs calls but without excessive debugging "
24329 "information, we recommend:"
24333 #: ../fuse/guestmount.pod:67
24336 " guestmount [...] --trace /mnt\n"
24341 #: ../fuse/guestmount.pod:69
24342 msgid "If you want to debug the program, we recommend:"
24346 #: ../fuse/guestmount.pod:71
24349 " guestmount [...] --trace --verbose /mnt\n"
24354 #: ../fuse/guestmount.pod:79
24355 msgid "Add a block device or virtual machine image."
24359 #: ../fuse/guestmount.pod:96
24360 msgid "B<--dir-cache-timeout N>"
24364 #: ../fuse/guestmount.pod:98
24366 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
24367 "seconds. The readdir cache [actually, there are several semi-independent "
24368 "caches] is populated after a readdir(2) call with the stat and extended "
24369 "attributes of the files in the directory, in anticipation that they will be "
24370 "requested soon after."
24374 #: ../fuse/guestmount.pod:104
24376 "There is also a different attribute cache implemented by FUSE (see the FUSE "
24377 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
24378 "requests, only cache existing ones."
24382 #: ../fuse/guestmount.pod:115
24384 "If you have untrusted raw-format guest disk images, you should use this "
24385 "option to specify the disk format. This avoids a possible security problem "
24386 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
24387 "guestfs_add_drive_opts>."
24391 #: ../fuse/guestmount.pod:120
24392 msgid "B<--fuse-help>"
24396 #: ../fuse/guestmount.pod:122
24397 msgid "Display help on special FUSE options (see I<-o> below)."
24401 #: ../fuse/guestmount.pod:126
24402 msgid "Display brief help and exit."
24406 #: ../fuse/guestmount.pod:134
24407 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
24411 #: ../fuse/guestmount.pod:136
24413 "Mount the named partition or logical volume on the given mountpoint B<in the "
24414 "guest> (this has nothing to do with mountpoints in the host)."
24418 #: ../fuse/guestmount.pod:139
24420 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
24421 "something on C</>."
24425 #: ../fuse/guestmount.pod:144
24427 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
24428 "unmounted. If you specify this option, then we don't attempt to sync the "
24429 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
24433 #: ../fuse/guestmount.pod:149
24434 msgid "B<-o option> | B<--option option>"
24438 #: ../fuse/guestmount.pod:151
24439 msgid "Pass extra options to FUSE."
24443 #: ../fuse/guestmount.pod:153
24445 "To get a list of all the extra options supported by FUSE, use the command "
24446 "below. Note that only the FUSE I<-o> options can be passed, and only some "
24447 "of them are a good idea."
24451 #: ../fuse/guestmount.pod:157
24454 " guestmount --fuse-help\n"
24459 #: ../fuse/guestmount.pod:159
24460 msgid "Some potentially useful FUSE options:"
24464 #: ../fuse/guestmount.pod:163
24465 msgid "B<-o allow_other>"
24469 #: ../fuse/guestmount.pod:165
24470 msgid "Allow other users to see the filesystem."
24474 #: ../fuse/guestmount.pod:167
24475 msgid "B<-o attr_timeout=N>"
24479 #: ../fuse/guestmount.pod:169
24480 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
24484 #: ../fuse/guestmount.pod:171
24485 msgid "B<-o kernel_cache>"
24489 #: ../fuse/guestmount.pod:173
24491 "Allow the kernel to cache files (reduces the number of reads that have to go "
24492 "through the L<guestfs(3)> API). This is generally a good idea if you can "
24493 "afford the extra memory usage."
24497 #: ../fuse/guestmount.pod:177
24498 msgid "B<-o uid=N> B<-o gid=N>"
24502 #: ../fuse/guestmount.pod:179
24504 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
24505 "the chosen values."
24509 #: ../fuse/guestmount.pod:186
24511 "Add devices and mount everything read-only. Also disallow writes and make "
24512 "the disk appear read-only to FUSE."
24516 #: ../fuse/guestmount.pod:189
24518 "This is highly recommended if you are not going to edit the guest disk. If "
24519 "the guest is running and this option is I<not> supplied, then there is a "
24520 "strong risk of disk corruption in the guest. We try to prevent this from "
24521 "happening, but it is not always possible."
24525 #: ../fuse/guestmount.pod:196
24526 msgid "Enable SELinux support for the guest."
24530 #: ../fuse/guestmount.pod:200
24531 msgid "Enable verbose messages from underlying libguestfs."
24535 #: ../fuse/guestmount.pod:204
24536 msgid "Display the program version and exit."
24540 #: ../fuse/guestmount.pod:206
24541 msgid "B<-x> | B<--trace>"
24545 #: ../fuse/guestmount.pod:208
24546 msgid "Trace libguestfs calls."
24550 #: ../fuse/guestmount.pod:210
24551 msgid "This also stops the daemon from forking into the background."
24555 #: ../fuse/guestmount.pod:216
24557 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
24558 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
24563 #: ../inspector/virt-inspector.pl:35
24565 "virt-inspector - Display operating system version and other information "
24566 "about a virtual machine"
24570 #: ../inspector/virt-inspector.pl:39
24573 " virt-inspector [--connect URI] domname\n"
24578 #: ../inspector/virt-inspector.pl:41
24581 " virt-inspector guest.img [guest.img ...]\n"
24586 #: ../inspector/virt-inspector.pl:45
24588 "B<virt-inspector> examines a virtual machine or disk image and tries to "
24589 "determine the version of the operating system and other information about "
24590 "the virtual machine."
24594 #: ../inspector/virt-inspector.pl:49
24595 msgid "Virt-inspector produces XML output for feeding into other programs."
24599 #: ../inspector/virt-inspector.pl:51
24601 "In the normal usage, use C<virt-inspector domname> where C<domname> is the "
24602 "libvirt domain (see: C<virsh list --all>)."
24606 #: ../inspector/virt-inspector.pl:54
24608 "You can also run virt-inspector directly on disk images from a single "
24609 "virtual machine. Use C<virt-inspector guest.img>. In rare cases a domain "
24610 "has several block devices, in which case you should list them one after "
24611 "another, with the first corresponding to the guest's C</dev/sda>, the second "
24612 "to the guest's C</dev/sdb> and so on."
24616 #: ../inspector/virt-inspector.pl:60
24618 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
24619 "inspect several virtual machines, you have to run virt-inspector several "
24620 "times (for example, from a shell script for-loop)."
24624 #: ../inspector/virt-inspector.pl:65
24626 "Because virt-inspector needs direct access to guest images, it won't "
24627 "normally work over remote libvirt connections."
24631 #: ../inspector/virt-inspector.pl:78 ../tools/virt-edit.pl:82
24632 #: ../tools/virt-win-reg.pl:181 ../tools/virt-df.pl:81 ../tools/virt-ls.pl:88
24633 #: ../tools/virt-list-filesystems.pl:60 ../tools/virt-cat.pl:89
24634 #: ../tools/virt-tar.pl:108 ../tools/virt-rescue.pl:113
24635 #: ../tools/virt-make-fs.pl:163 ../tools/virt-list-partitions.pl:61
24636 msgid "Display brief help."
24640 #: ../inspector/virt-inspector.pl:84 ../tools/virt-edit.pl:88
24641 #: ../tools/virt-win-reg.pl:187 ../tools/virt-df.pl:87 ../tools/virt-ls.pl:94
24642 #: ../tools/virt-resize.pl:273 ../tools/virt-list-filesystems.pl:66
24643 #: ../tools/virt-cat.pl:95 ../tools/virt-tar.pl:114
24644 #: ../tools/virt-rescue.pl:119 ../tools/virt-make-fs.pl:169
24645 #: ../tools/virt-list-partitions.pl:67
24646 msgid "B<--version>"
24650 #: ../inspector/virt-inspector.pl:86 ../tools/virt-edit.pl:90
24651 #: ../tools/virt-win-reg.pl:189 ../tools/virt-df.pl:89 ../tools/virt-ls.pl:96
24652 #: ../tools/virt-resize.pl:275 ../tools/virt-list-filesystems.pl:68
24653 #: ../tools/virt-cat.pl:97 ../tools/virt-tar.pl:116
24654 #: ../tools/virt-rescue.pl:121 ../tools/virt-make-fs.pl:171
24655 #: ../tools/virt-list-partitions.pl:69
24656 msgid "Display version number and exit."
24660 #: ../inspector/virt-inspector.pl:92 ../tools/virt-edit.pl:112
24661 #: ../tools/virt-win-reg.pl:203 ../tools/virt-df.pl:95 ../tools/virt-ls.pl:102
24662 #: ../tools/virt-list-filesystems.pl:74 ../tools/virt-cat.pl:103
24663 #: ../tools/virt-tar.pl:122 ../tools/virt-rescue.pl:135
24664 #: ../tools/virt-list-partitions.pl:75
24665 msgid "B<--connect URI> | B<-c URI>"
24669 #: ../inspector/virt-inspector.pl:94 ../tools/virt-edit.pl:114
24670 #: ../tools/virt-win-reg.pl:205 ../tools/virt-df.pl:97 ../tools/virt-ls.pl:104
24671 #: ../tools/virt-list-filesystems.pl:76 ../tools/virt-cat.pl:105
24672 #: ../tools/virt-tar.pl:124 ../tools/virt-rescue.pl:137
24673 #: ../tools/virt-list-partitions.pl:77
24675 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
24676 "to the default libvirt hypervisor."
24680 #: ../inspector/virt-inspector.pl:97
24682 "Libvirt is only used if you specify a C<domname> on the command line. If "
24683 "you specify guest block devices directly, then libvirt is not used at all."
24687 #: ../inspector/virt-inspector.pl:105 ../tools/virt-edit.pl:124
24688 #: ../tools/virt-win-reg.pl:215 ../tools/virt-df.pl:117
24689 #: ../tools/virt-ls.pl:114 ../tools/virt-resize.pl:523
24690 #: ../tools/virt-list-filesystems.pl:86 ../tools/virt-cat.pl:115
24691 #: ../tools/virt-tar.pl:134 ../tools/virt-rescue.pl:147
24692 #: ../tools/virt-list-partitions.pl:87
24693 msgid "B<--format> raw"
24697 #: ../inspector/virt-inspector.pl:107 ../tools/virt-edit.pl:126
24698 #: ../tools/virt-win-reg.pl:217 ../tools/virt-df.pl:119
24699 #: ../tools/virt-ls.pl:116 ../tools/virt-list-filesystems.pl:88
24700 #: ../tools/virt-cat.pl:117 ../tools/virt-tar.pl:136
24701 #: ../tools/virt-rescue.pl:149 ../tools/virt-list-partitions.pl:89
24703 "Specify the format of disk images given on the command line. If this is "
24704 "omitted then the format is autodetected from the content of the disk image."
24708 #: ../inspector/virt-inspector.pl:111 ../tools/virt-edit.pl:130
24709 #: ../tools/virt-win-reg.pl:221 ../tools/virt-df.pl:123
24710 #: ../tools/virt-ls.pl:120 ../tools/virt-list-filesystems.pl:92
24711 #: ../tools/virt-cat.pl:121 ../tools/virt-tar.pl:140
24712 #: ../tools/virt-rescue.pl:153 ../tools/virt-list-partitions.pl:93
24714 "If disk images are requested from libvirt, then this program asks libvirt "
24715 "for this information. In this case, the value of the format parameter is "
24720 #: ../inspector/virt-inspector.pl:115 ../tools/virt-edit.pl:134
24721 #: ../tools/virt-win-reg.pl:225 ../tools/virt-df.pl:127
24722 #: ../tools/virt-ls.pl:124 ../tools/virt-resize.pl:528
24723 #: ../tools/virt-resize.pl:543 ../tools/virt-list-filesystems.pl:96
24724 #: ../tools/virt-cat.pl:125 ../tools/virt-tar.pl:144
24725 #: ../tools/virt-rescue.pl:157 ../tools/virt-list-partitions.pl:97
24727 "If working with untrusted raw-format guest disk images, you should ensure "
24728 "the format is always specified."
24732 #: ../inspector/virt-inspector.pl:149
24737 #: ../inspector/virt-inspector.pl:151
24739 "The virt-inspector XML is described precisely in a RELAX NG schema which is "
24740 "supplied with libguestfs. This section is just an overview."
24744 #: ../inspector/virt-inspector.pl:154
24746 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
24747 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
24748 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
24749 "which is vanishingly rare in real world VMs."
24753 #: ../inspector/virt-inspector.pl:159
24754 msgid "E<lt>operatingsystemE<gt>"
24758 #: ../inspector/virt-inspector.pl:161
24760 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
24761 "describe the operating system, its architecture, the descriptive \"product "
24762 "name\" string, the type of OS and so on, as in this example:"
24766 #: ../inspector/virt-inspector.pl:165
24769 " <operatingsystems>\n"
24770 " <operatingsystem>\n"
24771 " <root>/dev/sda2</root>\n"
24772 " <name>windows</name>\n"
24773 " <arch>i386</arch>\n"
24774 " <distro>windows</distro>\n"
24775 " <product_name>Windows 7 Enterprise</product_name>\n"
24776 " <major_version>6</major_version>\n"
24777 " <minor_version>1</minor_version>\n"
24778 " <windows_systemroot>/Windows</windows_systemroot>\n"
24783 #: ../inspector/virt-inspector.pl:176
24785 "These fields are derived from the libguestfs inspection API, and you can "
24786 "find more details in L<guestfs(3)/INSPECTION>."
24790 #: ../inspector/virt-inspector.pl:179
24792 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
24793 "of view of libguestfs (block devices may have completely different names "
24794 "inside the VM itself)."
24798 #: ../inspector/virt-inspector.pl:240
24799 msgid "E<lt>mountpointsE<gt>"
24803 #: ../inspector/virt-inspector.pl:242
24805 "Un*x-like guests typically have multiple filesystems which are mounted at "
24806 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
24807 "element which looks like this:"
24811 #: ../inspector/virt-inspector.pl:246
24814 " <operatingsystems>\n"
24815 " <operatingsystem>\n"
24818 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
24819 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
24820 " </mountpoints>\n"
24825 #: ../inspector/virt-inspector.pl:254
24827 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
24828 "and may have completely different names inside the guest. Only mountable "
24829 "filesystems appear in this list, not things like swap devices."
24833 #: ../inspector/virt-inspector.pl:276
24834 msgid "E<lt>filesystemsE<gt>"
24838 #: ../inspector/virt-inspector.pl:278
24840 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
24841 "filesystems belonging to the guest, including swap and empty partitions. "
24842 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
24843 "this OS or shared by this OS and other OSes)."
24847 #: ../inspector/virt-inspector.pl:283
24848 msgid "You might see something like this:"
24852 #: ../inspector/virt-inspector.pl:285
24855 " <operatingsystems>\n"
24856 " <operatingsystem>\n"
24859 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
24860 " <type>ext4</type>\n"
24861 " <label>Fedora-13-x86_64</label>\n"
24862 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
24868 #: ../inspector/virt-inspector.pl:295
24870 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
24871 "the label, and the UUID."
24875 #: ../inspector/virt-inspector.pl:337
24876 msgid "E<lt>applicationsE<gt>"
24880 #: ../inspector/virt-inspector.pl:339
24882 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
24883 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
24884 "machine. At the moment we are only able to list RPMs and Debian packages "
24885 "installed, but in future we will support other Linux distros and Windows."
24889 #: ../inspector/virt-inspector.pl:345
24891 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
24892 "Typical values would be C<rpm> and C<deb>."
24896 #: ../inspector/virt-inspector.pl:348
24898 "E<lt>package_managementE<gt>, if present, describes the package manager. "
24899 "Typical values include C<yum>, C<up2date> and C<apt>"
24903 #: ../inspector/virt-inspector.pl:351
24904 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
24908 #: ../inspector/virt-inspector.pl:354
24911 " <operatingsystems>\n"
24912 " <operatingsystem>\n"
24914 " <applications>\n"
24916 " <name>coreutils</name>\n"
24917 " <version>8.5</version>\n"
24918 " <release>1</release>\n"
24919 " </application>\n"
24924 #: ../inspector/virt-inspector.pl:364
24926 "(The version and release fields may not be available for some package types)."
24930 #: ../inspector/virt-inspector.pl:544
24931 msgid "USING XPATH"
24935 #: ../inspector/virt-inspector.pl:546
24937 "You can use the XPath query language, and/or the xpath tool, in order to "
24938 "select parts of the XML."
24942 #: ../inspector/virt-inspector.pl:551
24945 " $ virt-inspector Guest | xpath //filesystems\n"
24946 " Found 1 nodes:\n"
24949 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
24950 " <type>ext4</type>\n"
24956 #: ../inspector/virt-inspector.pl:559
24959 " $ virt-inspector Guest | \\\n"
24960 " xpath \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
24961 " Query didn't return a nodeset. Value: ext4\n"
24966 #: ../inspector/virt-inspector.pl:563 ../tools/virt-edit.pl:343
24967 #: ../tools/virt-win-reg.pl:141 ../tools/virt-win-reg.pl:477
24968 #: ../tools/virt-df.pl:633 ../tools/virt-ls.pl:225
24969 #: ../tools/virt-resize.pl:1479 ../tools/virt-list-filesystems.pl:179
24970 #: ../tools/virt-cat.pl:178 ../tools/virt-tar.pl:274
24971 #: ../tools/virt-rescue.pl:260 ../tools/virt-make-fs.pl:527
24972 #: ../tools/virt-list-partitions.pl:247
24973 msgid "SHELL QUOTING"
24977 #: ../inspector/virt-inspector.pl:565 ../tools/virt-edit.pl:345
24978 #: ../tools/virt-win-reg.pl:479 ../tools/virt-df.pl:635
24979 #: ../tools/virt-ls.pl:227 ../tools/virt-resize.pl:1481
24980 #: ../tools/virt-list-filesystems.pl:181 ../tools/virt-cat.pl:180
24981 #: ../tools/virt-tar.pl:276 ../tools/virt-rescue.pl:262
24982 #: ../tools/virt-make-fs.pl:529 ../tools/virt-list-partitions.pl:249
24984 "Libvirt guest names can contain arbitrary characters, some of which have "
24985 "meaning to the shell such as C<#> and space. You may need to quote or "
24986 "escape these characters on the command line. See the shell manual page L<sh"
24987 "(1)> for details."
24991 #: ../inspector/virt-inspector.pl:572
24993 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
24994 "L<Sys::Virt(3)>, L<http://www.w3.org/TR/xpath/>, L<http://libguestfs.org/>."
24998 #: ../inspector/virt-inspector.pl:586 ../tools/virt-edit.pl:364
24999 #: ../tools/virt-win-reg.pl:512 ../tools/virt-df.pl:651
25000 #: ../tools/virt-ls.pl:245 ../tools/virt-resize.pl:1510
25001 #: ../tools/virt-list-filesystems.pl:200 ../tools/virt-cat.pl:197
25002 #: ../tools/virt-tar.pl:294 ../tools/virt-rescue.pl:279
25003 #: ../tools/virt-make-fs.pl:561 ../tools/virt-list-partitions.pl:267
25004 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
25008 #: ../inspector/virt-inspector.pl:590
25009 msgid "Matthew Booth L<mbooth@redhat.com>"
25013 #: ../inspector/virt-inspector.pl:596 ../tools/virt-win-reg.pl:516
25014 #: ../tools/virt-resize.pl:1514 ../tools/virt-make-fs.pl:565
25015 msgid "Copyright (C) 2010 Red Hat Inc."
25019 #: ../tools/virt-edit.pl:34
25020 msgid "virt-edit - Edit a file in a virtual machine"
25024 #: ../tools/virt-edit.pl:38
25027 " virt-edit [--options] domname file\n"
25032 #: ../tools/virt-edit.pl:40
25035 " virt-edit [--options] disk.img [disk.img ...] file\n"
25040 #: ../tools/virt-edit.pl:42
25043 " virt-edit [domname|disk.img] file -e 'expr'\n"
25048 #: ../tools/virt-edit.pl:46
25050 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
25051 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
25052 "doing this, but doesn't catch all cases."
25056 #: ../tools/virt-edit.pl:52
25058 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
25059 "the named virtual machine (or disk image)."
25063 #: ../tools/virt-edit.pl:55
25065 "If you want to just view a file, use L<virt-cat(1)>. For more complex cases "
25066 "you should look at the L<guestfish(1)> tool."
25070 #: ../tools/virt-edit.pl:60
25071 msgid "Edit the named files interactively:"
25075 #: ../tools/virt-edit.pl:62
25078 " virt-edit mydomain /boot/grub/grub.conf\n"
25083 #: ../tools/virt-edit.pl:64
25086 " virt-edit mydomain /etc/passwd\n"
25091 #: ../tools/virt-edit.pl:66
25093 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
25094 "below). To change the init default level to 5:"
25098 #: ../tools/virt-edit.pl:70
25101 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
25106 #: ../tools/virt-edit.pl:96
25107 msgid "B<--backup extension> | B<-b extension>"
25111 #: ../tools/virt-edit.pl:98
25113 "Create a backup of the original file I<in the guest disk image>. The backup "
25114 "has the original filename with C<extension> added."
25118 #: ../tools/virt-edit.pl:101
25120 "Usually the first character of C<extension> would be a dot C<.> so you would "
25125 #: ../tools/virt-edit.pl:104
25128 " virt-edit -b .orig [etc]\n"
25133 #: ../tools/virt-edit.pl:106
25134 msgid "By default, no backup file is made."
25138 #: ../tools/virt-edit.pl:117 ../tools/virt-win-reg.pl:208
25139 #: ../tools/virt-df.pl:100 ../tools/virt-ls.pl:107
25140 #: ../tools/virt-list-filesystems.pl:79 ../tools/virt-cat.pl:108
25141 #: ../tools/virt-tar.pl:127 ../tools/virt-rescue.pl:140
25142 #: ../tools/virt-list-partitions.pl:80
25144 "If you specify guest block devices directly, then libvirt is not used at all."
25148 #: ../tools/virt-edit.pl:141
25149 msgid "B<--expr EXPR> | B<-e EXPR>"
25153 #: ../tools/virt-edit.pl:143
25155 "Instead of launching the external editor, non-interactively apply the Perl "
25156 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
25161 #: ../tools/virt-edit.pl:147
25163 "Be careful to properly quote the expression to prevent it from being altered "
25168 #: ../tools/virt-edit.pl:268
25169 msgid "NON-INTERACTIVE EDITING"
25173 #: ../tools/virt-edit.pl:270
25175 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
25176 "administrator can interactively edit the file."
25180 #: ../tools/virt-edit.pl:273
25182 "There are two ways also to use C<virt-edit> from scripts in order to make "
25183 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
25184 "like this, it's less error-prone to write scripts directly using the "
25185 "libguestfs API and Augeas for configuration file editing.)"
25189 #: ../tools/virt-edit.pl:279
25191 "The first method is to temporarily set C<$EDITOR> to any script or program "
25192 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
25193 "update C<tmpfile> in place however it likes."
25197 #: ../tools/virt-edit.pl:283
25199 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
25200 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
25201 "instances of C<foo> with C<bar> in a file:"
25205 #: ../tools/virt-edit.pl:287
25208 " virt-edit domname filename -e 's/foo/bar/'\n"
25213 #: ../tools/virt-edit.pl:289
25215 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
25216 "For example to delete root's password you could do:"
25220 #: ../tools/virt-edit.pl:292
25223 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
25228 #: ../tools/virt-edit.pl:294
25230 "What really happens is that the snippet is evaluated as a Perl expression "
25231 "for each line of the file. The line, including the final C<\\n>, is passed "
25232 "in C<$_> and the expression should update C<$_> or leave it unchanged."
25236 #: ../tools/virt-edit.pl:299
25238 "To delete a line, set C<$_> to the empty string. For example, to delete the "
25239 "C<apache> user account from the password file you can do:"
25243 #: ../tools/virt-edit.pl:302
25246 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
25251 #: ../tools/virt-edit.pl:304
25253 "To insert a line, prepend or append it to C<$_>. However appending lines to "
25254 "the end of the file is rather difficult this way since there is no concept "
25255 "of \"last line of the file\" - your expression just doesn't get called "
25256 "again. You might want to use the first method (setting C<$EDITOR>) if you "
25261 #: ../tools/virt-edit.pl:310
25263 "The variable C<$lineno> contains the current line number. As is "
25264 "traditional, the first line in the file is number C<1>."
25268 #: ../tools/virt-edit.pl:313
25270 "The return value from the expression is ignored, but the expression may call "
25271 "C<die> in order to abort the whole program, leaving the original file "
25276 #: ../tools/virt-edit.pl:317
25278 "Remember when matching the end of a line that C<$_> may contain the final C<"
25279 "\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
25280 "newline then neither of these. Thus to match or substitute some text at the "
25281 "end of a line, use this regular expression:"
25285 #: ../tools/virt-edit.pl:322
25288 " /some text(\\r?\\n)?$/\n"
25293 #: ../tools/virt-edit.pl:324
25295 "Alternately, use the perl C<chomp> function, being careful not to chomp C<"
25296 "$_> itself (since that would remove all newlines from the file):"
25300 #: ../tools/virt-edit.pl:328
25303 " my $m = $_; chomp $m; $m =~ /some text$/\n"
25308 #: ../tools/virt-edit.pl:334
25313 #: ../tools/virt-edit.pl:336
25315 "If set, this string is used as the editor. It may contain arguments, eg. C<"
25320 #: ../tools/virt-edit.pl:339
25321 msgid "If not set, C<vi> is used."
25325 #: ../tools/virt-edit.pl:352
25327 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::"
25328 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>, L<perl(1)>, "
25333 #: ../tools/virt-edit.pl:362 ../tools/virt-win-reg.pl:510
25334 #: ../tools/virt-df.pl:649 ../tools/virt-ls.pl:243
25335 #: ../tools/virt-resize.pl:1508 ../tools/virt-list-filesystems.pl:198
25336 #: ../tools/virt-cat.pl:195 ../tools/virt-tar.pl:292
25337 #: ../tools/virt-rescue.pl:277 ../tools/virt-make-fs.pl:559
25338 #: ../tools/virt-list-partitions.pl:265
25343 #: ../tools/virt-edit.pl:368 ../tools/virt-df.pl:655
25344 #: ../tools/virt-rescue.pl:283 ../tools/virt-list-partitions.pl:271
25345 msgid "Copyright (C) 2009-2010 Red Hat Inc."
25349 #: ../tools/virt-win-reg.pl:37
25351 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
25355 #: ../tools/virt-win-reg.pl:41
25358 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
25363 #: ../tools/virt-win-reg.pl:43
25366 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
25371 #: ../tools/virt-win-reg.pl:45
25374 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
25379 #: ../tools/virt-win-reg.pl:47
25382 " virt-win-reg --merge domname [input.reg ...]\n"
25387 #: ../tools/virt-win-reg.pl:49
25390 " virt-win-reg [--options] disk.img ... # instead of domname\n"
25395 #: ../tools/virt-win-reg.pl:53
25397 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
25398 "virtual machines. If you do this, you I<will> get irreversible disk "
25399 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
25400 "but doesn't catch all cases."
25404 #: ../tools/virt-win-reg.pl:58
25406 "Modifying the Windows Registry is an inherently risky operation. The format "
25407 "is deliberately obscure and undocumented, and Registry changes can leave the "
25408 "system unbootable. Therefore when using the C<--merge> option, make sure "
25409 "you have a reliable backup first."
25413 #: ../tools/virt-win-reg.pl:65
25415 "This program can export and merge Windows Registry entries from a Windows "
25420 #: ../tools/virt-win-reg.pl:68
25422 "The first parameter is the libvirt guest name or the raw disk image of a "
25427 #: ../tools/virt-win-reg.pl:71
25429 "If C<--merge> is I<not> specified, then the chosen registry key is displayed/"
25430 "exported (recursively). For example:"
25434 #: ../tools/virt-win-reg.pl:74
25437 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
25442 #: ../tools/virt-win-reg.pl:76
25444 "You can also display single values from within registry keys, for example:"
25448 #: ../tools/virt-win-reg.pl:79
25451 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
25452 " $ virt-win-reg Windows7 $cvkey ProductName\n"
25453 " Windows 7 Enterprise\n"
25458 #: ../tools/virt-win-reg.pl:83
25460 "With C<--merge>, you can merge a textual regedit file into the Windows "
25465 #: ../tools/virt-win-reg.pl:86
25468 " $ virt-win-reg --merge Windows7 changes.reg\n"
25473 #: ../tools/virt-win-reg.pl:88
25474 msgid "SUPPORTED SYSTEMS"
25478 #: ../tools/virt-win-reg.pl:90
25480 "The program currently supports Windows NT-derived guests starting with "
25481 "Windows XP through to at least Windows 7."
25485 #: ../tools/virt-win-reg.pl:93
25487 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, C<HKEY_LOCAL_MACHINE"
25488 "\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, C<HKEY_LOCAL_MACHINE\\SYSTEM> "
25489 "and C<HKEY_USERS\\.DEFAULT>."
25493 #: ../tools/virt-win-reg.pl:97
25495 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
25500 #: ../tools/virt-win-reg.pl:100
25502 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
25507 #: ../tools/virt-win-reg.pl:103
25512 #: ../tools/virt-win-reg.pl:105
25514 "This program is only meant for simple access to the registry. If you want "
25515 "to do complicated things with the registry, we suggest you download the "
25516 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
25517 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
25518 "L<hivexregedit(1)>."
25522 #: ../tools/virt-win-reg.pl:111
25527 #: ../tools/virt-win-reg.pl:113
25529 "C<virt-win-reg> expects that regedit files have already been reencoded in "
25530 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
25531 "style line endings. Since Windows regedit files are often in UTF-16LE with "
25532 "Windows-style line endings, you may need to reencode the whole file before "
25533 "or after processing."
25537 #: ../tools/virt-win-reg.pl:119
25539 "To reencode a file from Windows format to Linux (before processing it with "
25540 "the C<--merge> option), you would do something like this:"
25544 #: ../tools/virt-win-reg.pl:122
25547 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
25552 #: ../tools/virt-win-reg.pl:124
25554 "To go in the opposite direction, after exporting and before sending the file "
25555 "to a Windows user, do something like this:"
25559 #: ../tools/virt-win-reg.pl:127
25562 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
25567 #: ../tools/virt-win-reg.pl:129
25568 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
25572 #: ../tools/virt-win-reg.pl:131
25574 "If you are unsure about the current encoding, use the L<file(1)> command. "
25575 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
25576 "style (CRLF) line endings, like this:"
25580 #: ../tools/virt-win-reg.pl:135
25583 " $ file software.reg\n"
25584 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
25585 " with CRLF line terminators\n"
25590 #: ../tools/virt-win-reg.pl:139
25591 msgid "This file would need conversion before you could C<--merge> it."
25595 #: ../tools/virt-win-reg.pl:143
25597 "Be careful when passing parameters containing C<\\> (backslash) in the "
25598 "shell. Usually you will have to use 'single quotes' or double backslashes "
25599 "(but not both) to protect them from the shell."
25603 #: ../tools/virt-win-reg.pl:147
25604 msgid "Paths and value names are case-insensitive."
25608 #: ../tools/virt-win-reg.pl:149
25609 msgid "CurrentControlSet etc."
25613 #: ../tools/virt-win-reg.pl:151
25615 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
25616 "Registry at the level of the hive file, and therefore you cannot modify "
25621 #: ../tools/virt-win-reg.pl:155
25623 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
25624 "circumstances it might refer to another control set. The way to find out is "
25625 "to look at the C<HKLM\\SYSTEM\\Select> key:"
25629 #: ../tools/virt-win-reg.pl:159
25632 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
25633 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
25634 " \"Current\"=dword:00000001\n"
25635 " \"Default\"=dword:00000001\n"
25636 " \"Failed\"=dword:00000000\n"
25637 " \"LastKnownGood\"=dword:00000002\n"
25642 #: ../tools/virt-win-reg.pl:166
25643 msgid "\"Current\" is the one which Windows will choose when it boots."
25647 #: ../tools/virt-win-reg.pl:168
25649 "Similarly, other C<Current...> keys in the path may need to be replaced."
25653 #: ../tools/virt-win-reg.pl:195 ../tools/virt-make-fs.pl:177
25658 #: ../tools/virt-win-reg.pl:197 ../tools/virt-resize.pl:501
25659 msgid "Enable debugging messages."
25663 #: ../tools/virt-win-reg.pl:232
25668 #: ../tools/virt-win-reg.pl:234
25670 "In merge mode, this merges a textual regedit file into the Windows Registry "
25671 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
25672 "displays or exports Registry entries instead."
25676 #: ../tools/virt-win-reg.pl:238
25678 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
25679 "result in disk corruption. However exporting (without this flag) is always "
25684 #: ../tools/virt-win-reg.pl:246
25685 msgid "B<--encoding> UTF-16LE|ASCII"
25689 #: ../tools/virt-win-reg.pl:248
25691 "When merging (only), you may need to specify the encoding for strings to be "
25692 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
25693 "(3)/ENCODING STRINGS>."
25697 #: ../tools/virt-win-reg.pl:252
25699 "The default is to use UTF-16LE, which should work with recent versions of "
25704 #: ../tools/virt-win-reg.pl:486
25706 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
25707 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
25708 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
25712 #: ../tools/virt-win-reg.pl:501 ../tools/virt-make-fs.pl:550
25714 "When reporting bugs, please enable debugging and capture the I<complete> "
25719 #: ../tools/virt-win-reg.pl:504
25722 " export LIBGUESTFS_DEBUG=1\n"
25723 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
25728 #: ../tools/virt-win-reg.pl:507
25730 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."
25735 #: ../tools/virt-df.pl:36
25736 msgid "virt-df - Display free space on virtual filesystems"
25740 #: ../tools/virt-df.pl:40
25743 " virt-df [--options]\n"
25748 #: ../tools/virt-df.pl:42
25751 " virt-df [--options] domname\n"
25756 #: ../tools/virt-df.pl:44
25759 " virt-df [--options] disk.img [disk.img ...]\n"
25764 #: ../tools/virt-df.pl:48
25766 "C<virt-df> is a command line tool to display free space on virtual machine "
25767 "filesystems. Unlike other tools, it doesn't just display the amount of "
25768 "space allocated to a virtual machine, but can look inside the virtual "
25769 "machine to see how much space is really being used."
25773 #: ../tools/virt-df.pl:53
25775 "It is like the L<df(1)> command, but for virtual machines, except that it "
25776 "also works for Windows virtual machines."
25780 #: ../tools/virt-df.pl:56
25782 "If used without any arguments, C<virt-df> checks with libvirt to get a list "
25783 "of all active and inactive guests, and performs a C<df>-type operation on "
25784 "each one in turn, printing out the results."
25788 #: ../tools/virt-df.pl:60
25790 "If used with any argument(s), C<virt-df> performs a C<df>-type operation on "
25791 "either the single named libvirt domain, or on the disk image(s) listed on "
25792 "the command line (which must all belong to a single VM). In this mode (with "
25793 "arguments), C<virt-df> will I<only work for a single guest>. If you want to "
25794 "run on multiple guests, then you have to invoke C<virt-df> multiple times."
25798 #: ../tools/virt-df.pl:67
25800 "Use the C<--csv> option to get a format which can be easily parsed by other "
25801 "programs. Other options are mostly similar to standard C<df> options. See "
25802 "below for the complete list."
25806 #: ../tools/virt-df.pl:107
25811 #: ../tools/virt-df.pl:109
25813 "Write out the results in CSV format (comma-separated values). This format "
25814 "can be imported easily into databases and spreadsheets, but read L</NOTE "
25815 "ABOUT CSV FORMAT> below."
25819 #: ../tools/virt-df.pl:134
25820 msgid "B<--human-readable> | B<-h>"
25824 #: ../tools/virt-df.pl:136
25825 msgid "Print sizes in human-readable format."
25829 #: ../tools/virt-df.pl:138
25830 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
25834 #: ../tools/virt-df.pl:144
25835 msgid "B<--inodes> | B<-i>"
25839 #: ../tools/virt-df.pl:146
25840 msgid "Print inodes instead of blocks."
25844 #: ../tools/virt-df.pl:152
25845 msgid "B<--one-per-guest>"
25849 #: ../tools/virt-df.pl:154
25851 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
25852 "disks from several guests to a single libguestfs appliance."
25856 #: ../tools/virt-df.pl:157
25857 msgid "You might use this option in the following circumstances:"
25861 #: ../tools/virt-df.pl:163
25863 "If you think an untrusted guest might actively try to exploit the libguestfs "
25864 "appliance kernel, then this prevents one guest from interfering with the "
25865 "stats printed for another guest."
25869 #: ../tools/virt-df.pl:169
25871 "If the kernel has a bug which stops it from accessing a filesystem in one "
25872 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
25873 "and report stats for further guests."
25877 #: ../tools/virt-df.pl:180
25882 #: ../tools/virt-df.pl:182
25884 "Print UUIDs instead of names. This is useful for following a guest even "
25885 "when the guest is migrated or renamed, or when two guests happen to have the "
25890 #: ../tools/virt-df.pl:186
25892 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
25893 "images, we still print the disk image name even when this option is "
25898 #: ../tools/virt-df.pl:609
25899 msgid "NOTE ABOUT CSV FORMAT"
25903 #: ../tools/virt-df.pl:611
25905 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
25906 "should be easy to parse, but it is definitely not easy to parse."
25910 #: ../tools/virt-df.pl:614
25912 "Myth: Just split fields at commas. Reality: This does I<not> work "
25913 "reliably. This example has two columns:"
25917 #: ../tools/virt-df.pl:617
25920 " \"foo,bar\",baz\n"
25925 #: ../tools/virt-df.pl:619
25927 "Myth: Read the file one line at a time. Reality: This does I<not> work "
25928 "reliably. This example has one row:"
25932 #: ../tools/virt-df.pl:622
25941 #: ../tools/virt-df.pl:625
25943 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
25944 "packaged in major Linux distributions)."
25948 #: ../tools/virt-df.pl:628
25950 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
25951 "or Python's built-in csv library)."
25955 #: ../tools/virt-df.pl:631
25956 msgid "Most spreadsheets and databases can import CSV directly."
25960 #: ../tools/virt-df.pl:642
25962 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
25963 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
25967 #: ../tools/virt-ls.pl:34
25968 msgid "virt-ls - List files in a virtual machine"
25972 #: ../tools/virt-ls.pl:38
25975 " virt-ls [--options] domname directory\n"
25980 #: ../tools/virt-ls.pl:40
25983 " virt-ls [--options] disk.img [disk.img ...] directory\n"
25988 #: ../tools/virt-ls.pl:44
25990 "C<virt-ls> is a command line tool to list the names of files in a directory "
25991 "inside a virtual machine or disk image."
25995 #: ../tools/virt-ls.pl:47
25997 "C<virt-ls> is just a simple wrapper around L<libguestfs(3)> functionality. "
25998 "For more complex cases you should look at the L<guestfish(1)> tool."
26002 #: ../tools/virt-ls.pl:51
26004 "C<virt-ls> can be used in one of three modes: simple, long and recursive. A "
26005 "simple listing is like the ordinary L<ls(1)> command:"
26009 #: ../tools/virt-ls.pl:54
26012 " $ virt-ls myguest /\n"
26020 #: ../tools/virt-ls.pl:59
26021 msgid "With the C<-l> (C<--long>) option, C<virt-ls> shows more detail:"
26025 #: ../tools/virt-ls.pl:61
26028 " $ virt-ls -l myguest /\n"
26030 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
26031 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
26037 #: ../tools/virt-ls.pl:67
26039 "With the C<-R> (C<--recursive>) option, C<virt-ls> lists the names of files "
26040 "and directories recursively:"
26044 #: ../tools/virt-ls.pl:70
26047 " $ virt-ls -R myguest /tmp\n"
26055 #: ../tools/virt-ls.pl:75
26057 "You I<cannot> combine these options. To do more complicated things, use "
26062 #: ../tools/virt-ls.pl:131 ../tools/virt-list-filesystems.pl:103
26063 #: ../tools/virt-list-partitions.pl:112
26064 msgid "B<-l> | B<--long>"
26068 #: ../tools/virt-ls.pl:133
26069 msgid "B<-R> | B<--recursive>"
26073 #: ../tools/virt-ls.pl:135
26075 "Select the mode. With neither of these options, C<virt-ls> produces a "
26076 "simple, flat list of the files in the named directory."
26080 #: ../tools/virt-ls.pl:138
26082 "C<virt-ls -l> produces a \"long listing\", which shows more detail (just "
26083 "like the plain C<ls -l> command)."
26087 #: ../tools/virt-ls.pl:141
26089 "C<virt-ls -R> produces a recursive list of files starting at the named "
26090 "directory. See the documentation for L<guestfs(3)/guestfs_find> for precise "
26095 #: ../tools/virt-ls.pl:145
26096 msgid "You cannot combine these options."
26100 #: ../tools/virt-ls.pl:234
26102 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<Sys::"
26103 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
26108 #: ../tools/virt-ls.pl:249 ../tools/virt-list-filesystems.pl:204
26109 #: ../tools/virt-cat.pl:201 ../tools/virt-tar.pl:298
26110 msgid "Copyright (C) 2009 Red Hat Inc."
26114 #: ../tools/virt-resize.pl:42
26115 msgid "virt-resize - Resize a virtual machine disk"
26119 #: ../tools/virt-resize.pl:46
26122 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
26123 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
26124 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
26129 #: ../tools/virt-resize.pl:52
26131 "Virt-resize is a tool which can resize a virtual machine disk, making it "
26132 "larger or smaller overall, and resizing or deleting any partitions contained "
26137 #: ../tools/virt-resize.pl:56
26139 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
26140 "not> be used on live virtual machines - for consistent results, shut the "
26141 "virtual machine down before resizing it."
26145 #: ../tools/virt-resize.pl:60
26147 "If you are not familiar with the associated tools: L<virt-list-partitions(1)"
26148 ">, L<virt-list-filesystems(1)> and L<virt-df(1)>, we recommend you go and "
26149 "read those manual pages first."
26153 #: ../tools/virt-resize.pl:68
26155 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
26156 "fill the extra 5GB of space."
26160 #: ../tools/virt-resize.pl:71
26163 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
26164 " virt-list-partitions -lht olddisk\n"
26165 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
26166 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
26171 #: ../tools/virt-resize.pl:76
26173 "As above, but make the /boot partition 200MB bigger, while giving the "
26174 "remaining space to /dev/sda2:"
26178 #: ../tools/virt-resize.pl:79
26181 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
26186 #: ../tools/virt-resize.pl:81
26187 msgid "As above, but the output format will be uncompressed qcow2:"
26191 #: ../tools/virt-resize.pl:83
26194 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
26195 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
26200 #: ../tools/virt-resize.pl:86
26201 msgid "DETAILED USAGE"
26205 #: ../tools/virt-resize.pl:88
26206 msgid "EXPANDING A VIRTUAL MACHINE DISK"
26210 #: ../tools/virt-resize.pl:92
26211 msgid "1. Shut down the virtual machine"
26215 #: ../tools/virt-resize.pl:94
26216 msgid "2. Locate input disk image"
26220 #: ../tools/virt-resize.pl:96
26222 "Locate the input disk image (ie. the file or device on the host containing "
26223 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
26224 "dumpxml> like this to find the disk image name:"
26228 #: ../tools/virt-resize.pl:100
26231 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
26232 " Found 1 nodes:\n"
26234 " <source dev=\"/dev/vg/lv_guest\" />\n"
26239 #: ../tools/virt-resize.pl:105
26240 msgid "3. Look at current sizing"
26244 #: ../tools/virt-resize.pl:107
26246 "Use L<virt-list-partitions(1)> to display the current partitions and sizes:"
26250 #: ../tools/virt-resize.pl:110
26253 " # virt-list-partitions -lht /dev/vg/lv_guest\n"
26254 " /dev/sda1 ext3 101.9M\n"
26255 " /dev/sda2 pv 7.9G\n"
26256 " /dev/sda device 8.0G\n"
26261 #: ../tools/virt-resize.pl:115
26263 "(This example is a virtual machine with an 8 GB disk which we would like to "
26264 "expand up to 10 GB)."
26268 #: ../tools/virt-resize.pl:118
26269 msgid "4. Create output disk"
26273 #: ../tools/virt-resize.pl:120
26275 "Virt-resize cannot do in-place disk modifications. You have to have space "
26276 "to store the resized output disk."
26280 #: ../tools/virt-resize.pl:123
26282 "To store the resized disk image in a file, create a file of a suitable size:"
26286 #: ../tools/virt-resize.pl:126
26289 " # rm -f outdisk\n"
26290 " # truncate -s 10G outdisk\n"
26295 #: ../tools/virt-resize.pl:129
26296 msgid "Or use L<lvcreate(1)> to create a logical volume:"
26300 #: ../tools/virt-resize.pl:131
26303 " # lvcreate -L 10G -n lv_name vg_name\n"
26308 #: ../tools/virt-resize.pl:133
26309 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
26313 #: ../tools/virt-resize.pl:135
26316 " # virsh pool-list\n"
26317 " # virsh vol-create-as poolname newvol 10G\n"
26322 #: ../tools/virt-resize.pl:138
26327 #: ../tools/virt-resize.pl:140
26329 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
26330 "file) and the output disk. The output disk is the one created in the "
26335 #: ../tools/virt-resize.pl:144
26338 " # virt-resize indisk outdisk\n"
26343 #: ../tools/virt-resize.pl:146
26345 "This command just copies disk image C<indisk> to disk image C<outdisk> "
26346 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
26347 "larger, then an extra, empty partition is created at the end of the disk "
26348 "covering the extra space. If C<outdisk> is smaller, then it will give an "
26353 #: ../tools/virt-resize.pl:152
26355 "More realistically you'd want to expand existing partitions in the disk "
26356 "image by passing extra options (for the full list see the L</OPTIONS> "
26361 #: ../tools/virt-resize.pl:156
26363 "L</--expand> is the most useful option. It expands the named partition "
26364 "within the disk to fill any extra space:"
26368 #: ../tools/virt-resize.pl:159
26371 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
26376 #: ../tools/virt-resize.pl:161
26378 "(In this case, an extra partition is I<not> created at the end of the disk, "
26379 "because there will be no unused space)."
26383 #: ../tools/virt-resize.pl:164
26385 "L</--resize> is the other commonly used option. The following would "
26386 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
26387 "rest of the available space:"
26391 #: ../tools/virt-resize.pl:168
26394 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
26395 " indisk outdisk\n"
26400 #: ../tools/virt-resize.pl:171
26402 "If the expanded partition in the image contains a filesystem or LVM PV, then "
26403 "if virt-resize knows how, it will resize the contents, the equivalent of "
26404 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or L<ntfsresize(8)"
26405 ">. However virt-resize does not know how to resize some filesystems, so you "
26406 "would have to online resize them after booting the guest. And virt-resize "
26407 "also does not resize anything inside an LVM PV, it just resizes the PV "
26408 "itself and leaves the user to resize any LVs inside that PV as desired."
26412 #: ../tools/virt-resize.pl:180
26413 msgid "Other options are covered below."
26417 #: ../tools/virt-resize.pl:182
26422 #: ../tools/virt-resize.pl:184
26423 msgid "Thoroughly test the new disk image I<before> discarding the old one."
26427 #: ../tools/virt-resize.pl:186
26428 msgid "If you are using libvirt, edit the XML to point at the new disk:"
26432 #: ../tools/virt-resize.pl:188
26435 " # virsh edit guestname\n"
26440 #: ../tools/virt-resize.pl:190
26442 "Change E<lt>source ...E<gt>, see L<http://libvirt.org/formatdomain."
26443 "html#elementsDisks>"
26447 #: ../tools/virt-resize.pl:193
26448 msgid "Then start up the domain with the new, resized disk:"
26452 #: ../tools/virt-resize.pl:195
26455 " # virsh start guestname\n"
26460 #: ../tools/virt-resize.pl:197
26462 "and check that it still works. See also the L</NOTES> section below for "
26463 "additional information."
26467 #: ../tools/virt-resize.pl:200
26468 msgid "7. Resize LVs etc inside the guest"
26472 #: ../tools/virt-resize.pl:202
26473 msgid "(This can also be done offline using L<guestfish(1)>)"
26477 #: ../tools/virt-resize.pl:204
26479 "Once the guest has booted you should see the new space available, at least "
26480 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
26481 "may need to resize LVs inside PVs, and also resize filesystem types that "
26482 "virt-resize does not know how to expand."
26486 #: ../tools/virt-resize.pl:211
26487 msgid "SHRINKING A VIRTUAL MACHINE DISK"
26491 #: ../tools/virt-resize.pl:213
26493 "Shrinking is somewhat more complex than expanding, and only an overview is "
26498 #: ../tools/virt-resize.pl:216
26500 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
26501 "filesystems). The user has to shrink content before passing the disk image "
26502 "to virt-resize, and virt-resize will check that the content has been shrunk "
26507 #: ../tools/virt-resize.pl:221
26508 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
26512 #: ../tools/virt-resize.pl:223
26514 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
26515 "steps 3 and 4 above to allocate a new disk image."
26519 #: ../tools/virt-resize.pl:226
26521 "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
26525 #: ../tools/virt-resize.pl:229
26526 msgid "IGNORING OR DELETING PARTITIONS"
26530 #: ../tools/virt-resize.pl:231
26532 "virt-resize also gives a convenient way to ignore or delete partitions when "
26533 "copying from the input disk to the output disk. Ignoring a partition speeds "
26534 "up the copy where you don't care about the existing contents of a "
26535 "partition. Deleting a partition removes it completely, but note that it "
26536 "also renumbers any partitions after the one which is deleted, which can "
26537 "leave some guests unbootable."
26541 #: ../tools/virt-resize.pl:238
26542 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
26546 #: ../tools/virt-resize.pl:240
26548 "If the input disk is in qcow2 format, then you may prefer that the output is "
26549 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
26550 "the fly. The output format is simply determined by the format of the empty "
26551 "output container that you provide. Thus to create qcow2 output, use:"
26555 #: ../tools/virt-resize.pl:246
26558 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
26563 #: ../tools/virt-resize.pl:248
26564 msgid "instead of the truncate command (use C<-c> for a compressed disk)."
26568 #: ../tools/virt-resize.pl:250
26569 msgid "Similarly, to get non-sparse raw output use:"
26573 #: ../tools/virt-resize.pl:252
26576 " fallocate -l size outdisk\n"
26581 #: ../tools/virt-resize.pl:254
26583 "(on older systems that don't have the L<fallocate(1)> command use C<dd if=/"
26584 "dev/zero of=outdisk bs=1M count=..>)"
26588 #: ../tools/virt-resize.pl:267
26589 msgid "Display help."
26593 #: ../tools/virt-resize.pl:281
26594 msgid "B<--resize part=size>"
26598 #: ../tools/virt-resize.pl:283
26600 "Resize the named partition (expanding or shrinking it) so that it has the "
26605 #: ../tools/virt-resize.pl:286
26607 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
26608 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
26609 "Exabytes; or as a percentage of the current size; or as a relative number or "
26610 "percentage. For example:"
26614 #: ../tools/virt-resize.pl:291
26617 " --resize /dev/sda2=10G\n"
26622 #: ../tools/virt-resize.pl:293
26625 " --resize /dev/sda4=90%\n"
26630 #: ../tools/virt-resize.pl:295
26633 " --resize /dev/sda2=+1G\n"
26638 #: ../tools/virt-resize.pl:297
26641 " --resize /dev/sda2=-200M\n"
26646 #: ../tools/virt-resize.pl:299
26649 " --resize /dev/sda1=+128K\n"
26654 #: ../tools/virt-resize.pl:301
26657 " --resize /dev/sda1=+10%\n"
26662 #: ../tools/virt-resize.pl:303
26665 " --resize /dev/sda1=-10%\n"
26670 #: ../tools/virt-resize.pl:305
26672 "You can increase the size of any partition. Virt-resize will expand the "
26673 "direct content of the partition if it knows how (see C<--expand> below)."
26677 #: ../tools/virt-resize.pl:309
26679 "You can only I<decrease> the size of partitions that contain filesystems or "
26680 "PVs which have already been shrunk. Virt-resize will check this has been "
26681 "done before proceeding, or else will print an error (see also C<--resize-"
26686 #: ../tools/virt-resize.pl:314 ../tools/virt-resize.pl:406
26687 #: ../tools/virt-resize.pl:423
26688 msgid "You can give this option multiple times."
26692 #: ../tools/virt-resize.pl:320
26693 msgid "B<--resize-force part=size>"
26697 #: ../tools/virt-resize.pl:322
26699 "This is the same as C<--resize> except that it will let you decrease the "
26700 "size of any partition. Generally this means you will lose any data which "
26701 "was at the end of the partition you shrink, but you may not care about that "
26702 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
26703 "as a swap partition)."
26707 #: ../tools/virt-resize.pl:328
26708 msgid "See also the C<--ignore> option."
26712 #: ../tools/virt-resize.pl:334
26713 msgid "B<--expand part>"
26717 #: ../tools/virt-resize.pl:336
26719 "Expand the named partition so it uses up all extra space (space left over "
26720 "after any other resize changes that you request have been done)."
26724 #: ../tools/virt-resize.pl:339
26726 "If virt-resize knows how, it will expand the direct content of the "
26727 "partition. For example, if the partition is an LVM PV, it will expand the "
26728 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
26729 "content it doesn't know about alone."
26733 #: ../tools/virt-resize.pl:344
26734 msgid "Currently virt-resize can resize:"
26738 #: ../tools/virt-resize.pl:350
26740 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
26745 #: ../tools/virt-resize.pl:355
26747 "NTFS filesystems contained directly in a partition, if libguestfs was "
26748 "compiled with support for NTFS."
26752 #: ../tools/virt-resize.pl:358
26754 "The filesystem must have been shut down consistently last time it was used. "
26755 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
26756 "consistency check, so at the first boot after resizing Windows will check "
26761 #: ../tools/virt-resize.pl:365
26763 "LVM PVs (physical volumes). However virt-resize does I<not> resize anything "
26764 "inside the PV. The user will have to resize LVs as desired."
26768 #: ../tools/virt-resize.pl:371 ../tools/virt-resize.pl:393
26769 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
26773 #: ../tools/virt-resize.pl:377
26774 msgid "B<--shrink part>"
26778 #: ../tools/virt-resize.pl:379
26780 "Shrink the named partition until the overall disk image fits in the "
26781 "destination. The named partition B<must> contain a filesystem or PV which "
26782 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
26783 "online tools). Virt-resize will check this and give an error if it has not "
26788 #: ../tools/virt-resize.pl:385
26790 "The amount by which the overall disk must be shrunk (after carrying out all "
26791 "other operations requested by the user) is called the \"deficit\". For "
26792 "example, a straight copy (assume no other operations) from a 5GB disk image "
26793 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
26794 "would give an error unless the user specified a partition to shrink and that "
26795 "partition had more than a gigabyte of free space."
26799 #: ../tools/virt-resize.pl:399
26800 msgid "B<--ignore part>"
26804 #: ../tools/virt-resize.pl:401
26806 "Ignore the named partition. Effectively this means the partition is "
26807 "allocated on the destination disk, but the content is not copied across from "
26808 "the source disk. The content of the partition will be blank (all zero "
26813 #: ../tools/virt-resize.pl:412
26814 msgid "B<--delete part>"
26818 #: ../tools/virt-resize.pl:414
26820 "Delete the named partition. It would be more accurate to describe this as "
26821 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
26822 "the original disk image is left intact."
26826 #: ../tools/virt-resize.pl:418
26828 "Note that when you delete a partition, then anything contained in the "
26829 "partition is also deleted. Furthermore, this causes any partitions that "
26830 "come after to be I<renumbered>, which can easily make your guest unbootable."
26834 #: ../tools/virt-resize.pl:429
26835 msgid "B<--LV-expand logvol>"
26839 #: ../tools/virt-resize.pl:431
26841 "This takes the logical volume and, as a final step, expands it to fill all "
26842 "the space available in its volume group. A typical usage, assuming a Linux "
26843 "guest with a single PV C</dev/sda2> and a root device called C</dev/vg_guest/"
26844 "lv_root> would be:"
26848 #: ../tools/virt-resize.pl:436
26851 " virt-resize indisk outdisk \\\n"
26852 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
26857 #: ../tools/virt-resize.pl:439
26859 "This would first expand the partition (and PV), and then expand the root "
26860 "device to fill the extra space in the PV."
26864 #: ../tools/virt-resize.pl:442
26866 "The contents of the LV are also resized if virt-resize knows how to do "
26867 "that. You can stop virt-resize from trying to expand the content by using "
26868 "the option C<--no-expand-content>."
26872 #: ../tools/virt-resize.pl:446
26873 msgid "Use L<virt-list-filesystems(1)> to list the filesystems in the guest."
26877 #: ../tools/virt-resize.pl:449
26879 "You can give this option multiple times, I<but> it doesn't make sense to do "
26880 "this unless the logical volumes you specify are all in different volume "
26885 #: ../tools/virt-resize.pl:457
26886 msgid "B<--no-copy-boot-loader>"
26890 #: ../tools/virt-resize.pl:459
26892 "By default, virt-resize copies over some sectors at the start of the disk "
26893 "(up to the beginning of the first partition). Commonly these sectors "
26894 "contain the Master Boot Record (MBR) and the boot loader, and are required "
26895 "in order for the guest to boot correctly."
26899 #: ../tools/virt-resize.pl:464
26901 "If you specify this flag, then this initial copy is not done. You may need "
26902 "to reinstall the boot loader in this case."
26906 #: ../tools/virt-resize.pl:472
26907 msgid "B<--no-extra-partition>"
26911 #: ../tools/virt-resize.pl:474
26913 "By default, virt-resize creates an extra partition if there is any extra, "
26914 "unused space after all resizing has happened. Use this option to prevent "
26915 "the extra partition from being created. If you do this then the extra space "
26916 "will be inaccessible until you run fdisk, parted, or some other partitioning "
26917 "tool in the guest."
26921 #: ../tools/virt-resize.pl:480
26923 "Note that if the surplus space is smaller than 10 MB, no extra partition "
26928 #: ../tools/virt-resize.pl:487
26929 msgid "B<--no-expand-content>"
26933 #: ../tools/virt-resize.pl:489
26935 "By default, virt-resize will try to expand the direct contents of "
26936 "partitions, if it knows how (see C<--expand> option above)."
26940 #: ../tools/virt-resize.pl:492
26942 "If you give the C<--no-expand-content> option then virt-resize will not "
26947 #: ../tools/virt-resize.pl:499
26948 msgid "B<-d> | B<--debug>"
26952 #: ../tools/virt-resize.pl:507
26953 msgid "B<-n> | B<--dryrun>"
26957 #: ../tools/virt-resize.pl:509
26958 msgid "Print a summary of what would be done, but don't do anything."
26962 #: ../tools/virt-resize.pl:515
26963 msgid "B<-q> | B<--quiet>"
26967 #: ../tools/virt-resize.pl:517
26968 msgid "Don't print the summary."
26972 #: ../tools/virt-resize.pl:525
26974 "Specify the format of the input disk image. If this flag is not given then "
26975 "it is auto-detected from the image itself."
26979 #: ../tools/virt-resize.pl:531
26981 "Note that this option I<does not> affect the output format. See L</QCOW2 "
26982 "AND NON-SPARSE RAW FORMATS>."
26986 #: ../tools/virt-resize.pl:538
26987 msgid "B<--output-format> raw"
26991 #: ../tools/virt-resize.pl:540
26993 "Specify the format of the output disk image. If this flag is not given then "
26994 "it is auto-detected from the image itself."
26998 #: ../tools/virt-resize.pl:546
27000 "Note that you still need to create the output disk with the right format. "
27001 "See L</QCOW2 AND NON-SPARSE RAW FORMATS>."
27005 #: ../tools/virt-resize.pl:1422 ../tools/virt-rescue.pl:90
27010 #: ../tools/virt-resize.pl:1424
27011 msgid "\"Partition 1 does not end on cylinder boundary.\""
27015 #: ../tools/virt-resize.pl:1426
27017 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
27018 "means the partitions will not be aligned to the ancient CHS geometry. "
27019 "However CHS geometry is meaningless for disks manufactured since the early "
27020 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
27021 "cylinders is not required by any modern operating system."
27025 #: ../tools/virt-resize.pl:1433
27026 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
27030 #: ../tools/virt-resize.pl:1435
27032 "In Windows Vista and later versions, Microsoft switched to using a separate "
27033 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
27034 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
27035 "the boot partition. Doing so seems to break the guest completely. However "
27036 "expanding the second partition (ie. C: drive) should work."
27040 #: ../tools/virt-resize.pl:1442
27042 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
27043 "NTFS partitions have been expanded. This is just a safety check and (unless "
27044 "it find errors) is nothing to worry about."
27048 #: ../tools/virt-resize.pl:1446
27049 msgid "GUEST BOOT STUCK AT \"GRUB\""
27053 #: ../tools/virt-resize.pl:1448
27055 "If a Linux guest does not boot after resizing, and the boot is stuck after "
27056 "printing C<GRUB> on the console, try reinstalling grub. This sometimes "
27057 "happens on older (RHEL 5-era) guests, for reasons we don't fully understand, "
27058 "although we think is to do with partition alignment."
27062 #: ../tools/virt-resize.pl:1453
27065 " guestfish -i -a newdisk\n"
27066 " ><fs> cat /boot/grub/device.map\n"
27067 " # check the contents of this file are sensible or\n"
27068 " # edit the file if necessary\n"
27069 " ><fs> grub-install / /dev/vda\n"
27075 #: ../tools/virt-resize.pl:1460
27077 "For more flexible guest reconfiguration, including if you need to specify "
27078 "other parameters to grub-install, use L<virt-rescue(1)>."
27082 #: ../tools/virt-resize.pl:1463
27083 msgid "ALTERNATIVE TOOLS"
27087 #: ../tools/virt-resize.pl:1465
27089 "There are several proprietary tools for resizing partitions. We won't "
27090 "mention any here."
27094 #: ../tools/virt-resize.pl:1468
27096 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
27097 "operations on disk images. They can resize and move partitions, but I don't "
27098 "think they can do anything with the contents, and they certainly don't "
27103 #: ../tools/virt-resize.pl:1473
27105 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
27106 "but at a much lower level. You will probably end up hand-calculating sector "
27107 "offsets, which is something that virt-resize was designed to avoid. If you "
27108 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
27113 #: ../tools/virt-resize.pl:1488
27115 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)>, L<virt-df(1)>, "
27116 "L<guestfs(3)>, L<guestfish(1)>, L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, "
27117 "L<resize2fs(8)>, L<ntfsresize(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)"
27118 ">, L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, "
27119 "L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
27123 #: ../tools/virt-list-filesystems.pl:32
27125 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
27129 #: ../tools/virt-list-filesystems.pl:36
27132 " virt-list-filesystems [--options] domname\n"
27137 #: ../tools/virt-list-filesystems.pl:38
27140 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
27145 #: ../tools/virt-list-filesystems.pl:42
27147 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
27148 "are contained in a virtual machine or disk image."
27152 #: ../tools/virt-list-filesystems.pl:46
27154 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
27155 "functionality. For more complex cases you should look at the L<guestfish(1)"
27160 #: ../tools/virt-list-filesystems.pl:105
27162 "With this option, C<virt-list-filesystems> displays the type of each "
27163 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
27167 #: ../tools/virt-list-filesystems.pl:112
27168 msgid "B<-a> | B<--all>"
27172 #: ../tools/virt-list-filesystems.pl:114
27174 "Normally we only show mountable filesystems. If this option is given then "
27175 "swap devices are shown too."
27179 #: ../tools/virt-list-filesystems.pl:188
27181 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-list-"
27182 "partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)"
27183 ">, L<http://libguestfs.org/>."
27187 #: ../tools/virt-cat.pl:33
27188 msgid "virt-cat - Display a file in a virtual machine"
27192 #: ../tools/virt-cat.pl:37
27195 " virt-cat [--options] domname file\n"
27200 #: ../tools/virt-cat.pl:39
27203 " virt-cat [--options] disk.img [disk.img ...] file\n"
27208 #: ../tools/virt-cat.pl:43
27210 "C<virt-cat> is a command line tool to display the contents of C<file> where "
27211 "C<file> exists in the named virtual machine (or disk image)."
27215 #: ../tools/virt-cat.pl:46
27217 "C<virt-cat> can be used to quickly view a single file. To edit a file, use "
27218 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
27223 #: ../tools/virt-cat.pl:52
27225 "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
27229 #: ../tools/virt-cat.pl:55
27232 " virt-cat mydomain /etc/fstab\n"
27237 #: ../tools/virt-cat.pl:57
27238 msgid "List syslog messages from a VM:"
27242 #: ../tools/virt-cat.pl:59
27245 " virt-cat mydomain /var/log/messages | tail\n"
27250 #: ../tools/virt-cat.pl:61
27251 msgid "Find out what DHCP IP address a VM acquired:"
27255 #: ../tools/virt-cat.pl:63
27258 " virt-cat mydomain /var/log/messages | grep 'dhclient: bound to' | tail\n"
27263 #: ../tools/virt-cat.pl:65
27264 msgid "Find out what packages were recently installed:"
27268 #: ../tools/virt-cat.pl:67
27271 " virt-cat mydomain /var/log/yum.log | tail\n"
27276 #: ../tools/virt-cat.pl:69
27277 msgid "Find out who is logged on inside a virtual machine:"
27281 #: ../tools/virt-cat.pl:71
27284 " virt-cat mydomain /var/run/utmp > /tmp/utmp\n"
27290 #: ../tools/virt-cat.pl:74
27291 msgid "or who was logged on:"
27295 #: ../tools/virt-cat.pl:76
27298 " virt-cat mydomain /var/log/wtmp > /tmp/wtmp\n"
27299 " last -f /tmp/wtmp\n"
27304 #: ../tools/virt-cat.pl:187
27306 "L<guestfs(3)>, L<guestfish(1)>, L<virt-edit(1)>, L<Sys::Guestfs(3)>, L<Sys::"
27307 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
27311 #: ../tools/virt-tar.pl:33
27312 msgid "virt-tar - Extract or upload files to a virtual machine"
27316 #: ../tools/virt-tar.pl:37
27319 " virt-tar [--options] -x domname directory tarball\n"
27324 #: ../tools/virt-tar.pl:39
27327 " virt-tar [--options] -u domname tarball directory\n"
27332 #: ../tools/virt-tar.pl:41
27335 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
27340 #: ../tools/virt-tar.pl:43
27343 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
27348 #: ../tools/virt-tar.pl:47
27349 msgid "Download C</home> from the VM into a local tarball:"
27353 #: ../tools/virt-tar.pl:49
27356 " virt-tar -x domname /home home.tar\n"
27361 #: ../tools/virt-tar.pl:51
27364 " virt-tar -zx domname /home home.tar.gz\n"
27369 #: ../tools/virt-tar.pl:53
27370 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
27374 #: ../tools/virt-tar.pl:55
27377 " virt-tar -u domname uploadstuff.tar /tmp\n"
27382 #: ../tools/virt-tar.pl:57
27385 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
27390 #: ../tools/virt-tar.pl:61
27392 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
27393 "virtual machines. If you do this, you risk disk corruption in the VM. "
27394 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
27398 #: ../tools/virt-tar.pl:66
27400 "You can use C<-x> (extract) on live virtual machines, but you might get "
27401 "inconsistent results or errors if there is filesystem activity inside the "
27402 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
27403 "work, but the only way to guarantee consistent results is if the virtual "
27404 "machine is shut down."
27408 #: ../tools/virt-tar.pl:74
27410 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
27411 "parts of a guest filesystem. There are many possibilities: making backups, "
27412 "uploading data files, snooping on guest activity, fixing or customizing "
27417 #: ../tools/virt-tar.pl:79
27419 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
27420 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
27421 "should look at the L<guestfish(1)> tool."
27425 #: ../tools/virt-tar.pl:83
27427 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
27428 "its contents (recursively) from the virtual machine into a local tarball. "
27429 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
27430 "virtual machine. You cannot use these two options together."
27434 #: ../tools/virt-tar.pl:89
27436 "In addition, you may need to use the C<-z> (gZip) option to enable "
27437 "compression. When uploading, you have to specify C<-z> if the upload file "
27438 "is compressed because virt-tar won't detect this on its own."
27442 #: ../tools/virt-tar.pl:93
27444 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
27445 "example it cannot do PKZip files or bzip2 compression. If you want that "
27446 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
27447 "the L<libguestfs(3)> API)."
27451 #: ../tools/virt-tar.pl:151
27452 msgid "B<-x> | B<--extract> | B<--download>"
27456 #: ../tools/virt-tar.pl:153
27457 msgid "B<-u> | B<--upload>"
27461 #: ../tools/virt-tar.pl:155
27463 "Use C<-x> to extract (download) a directory from a virtual machine to a "
27468 #: ../tools/virt-tar.pl:158
27470 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
27471 "Please read the L</WARNING> section above before using this option."
27475 #: ../tools/virt-tar.pl:162
27476 msgid "You must specify exactly one of these options."
27480 #: ../tools/virt-tar.pl:168
27481 msgid "B<-z> | B<--gzip>"
27485 #: ../tools/virt-tar.pl:170
27486 msgid "Specify that the input or output tarball is gzip-compressed."
27490 #: ../tools/virt-tar.pl:283
27492 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<Sys::"
27493 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
27498 #: ../tools/virt-rescue.pl:33
27499 msgid "virt-rescue - Run a rescue shell on a virtual machine"
27503 #: ../tools/virt-rescue.pl:37
27506 " virt-rescue [--options] domname\n"
27511 #: ../tools/virt-rescue.pl:39
27514 " virt-rescue [--options] disk.img [disk.img ...]\n"
27519 #: ../tools/virt-rescue.pl:43
27521 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
27522 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
27523 "you from doing this, but doesn't catch all cases."
27527 #: ../tools/virt-rescue.pl:47
27529 "However if you use the I<--ro> (read only) option, then you can attach a "
27530 "shell to a live virtual machine. The results might be strange or "
27531 "inconsistent at times but you won't get disk corruption."
27535 #: ../tools/virt-rescue.pl:53
27537 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
27538 "need for a CD. virt-rescue gives you a rescue shell and some simple "
27539 "recovery tools which you can use to examine or rescue a virtual machine or "
27544 #: ../tools/virt-rescue.pl:58
27546 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
27547 "on disk image(s):"
27551 #: ../tools/virt-rescue.pl:61
27554 " virt-rescue GuestName\n"
27559 #: ../tools/virt-rescue.pl:63
27562 " virt-rescue --ro /path/to/disk.img\n"
27567 #: ../tools/virt-rescue.pl:65
27570 " virt-rescue /dev/sdc\n"
27575 #: ../tools/virt-rescue.pl:67
27576 msgid "For live VMs you I<must> use the --ro option."
27580 #: ../tools/virt-rescue.pl:69
27582 "When you run virt-rescue on a virtual machine or disk image, you are placed "
27583 "in an interactive bash shell where you can use many ordinary Linux "
27584 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
27585 "appliance. You must mount the virtual machine's filesystems by hand. There "
27586 "is an empty directory called C</sysroot> where you can mount filesystems."
27590 #: ../tools/virt-rescue.pl:76
27592 "In the example below, we list logical volumes, then choose one to mount "
27593 "under C</sysroot>:"
27597 #: ../tools/virt-rescue.pl:79
27601 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
27602 " lv_root vg_f11x64 -wi-a- 8.83G\n"
27603 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
27604 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
27605 " ><rescue> ls /sysroot\n"
27610 #: ../tools/virt-rescue.pl:86
27612 "If you don't know what filesystems are available on the virtual machine then "
27613 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
27617 #: ../tools/virt-rescue.pl:92
27619 "Virt-rescue can be used on I<any> disk image file or device, not just a "
27620 "virtual machine. For example you can use it on a blank file if you want to "
27621 "partition that file (although we would recommend using L<guestfish(1)> "
27622 "instead as it is more suitable for this purpose). You can even use virt-"
27623 "rescue on things like SD cards."
27627 #: ../tools/virt-rescue.pl:98
27629 "This tool is just designed for quick interactive hacking on a virtual "
27630 "machine. For more structured access to a virtual machine disk image, you "
27631 "should use L<guestfs(3)>. To get a structured shell that you can use to "
27632 "make scripted changes to guests, use L<guestfish(1)>."
27636 #: ../tools/virt-rescue.pl:127
27637 msgid "B<--append kernelopts>"
27641 #: ../tools/virt-rescue.pl:129
27642 msgid "Pass additional options to the rescue kernel."
27646 #: ../tools/virt-rescue.pl:164
27647 msgid "B<--memsize MB> | B<-m MB>"
27651 #: ../tools/virt-rescue.pl:166
27653 "Change the amount of memory allocated to the rescue system. The default is "
27654 "set by libguestfs and is small but adequate for running system tools. The "
27655 "occasional program might need more memory. The parameter is specified in "
27660 #: ../tools/virt-rescue.pl:175
27661 msgid "B<--network MB>"
27665 #: ../tools/virt-rescue.pl:177
27666 msgid "Enable QEMU user networking in the guest."
27670 #: ../tools/virt-rescue.pl:183
27671 msgid "B<--ro> | B<-r>"
27675 #: ../tools/virt-rescue.pl:185
27676 msgid "Open the image read-only."
27680 #: ../tools/virt-rescue.pl:197
27682 "Enable SELinux in the rescue appliance. You should read L<guestfs(3)/"
27683 "SELINUX> before using this option."
27687 #: ../tools/virt-rescue.pl:257
27689 "Several environment variables affect virt-rescue. See L<guestfs(3)/"
27690 "ENVIRONMENT VARIABLES> for the complete list."
27694 #: ../tools/virt-rescue.pl:269
27696 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::"
27697 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
27701 #: ../tools/virt-make-fs.pl:37
27702 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
27706 #: ../tools/virt-make-fs.pl:41
27709 " virt-make-fs [--options] input.tar output.img\n"
27714 #: ../tools/virt-make-fs.pl:43
27717 " virt-make-fs [--options] input.tar.gz output.img\n"
27722 #: ../tools/virt-make-fs.pl:45
27725 " virt-make-fs [--options] directory output.img\n"
27730 #: ../tools/virt-make-fs.pl:49
27732 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
27733 "archive or some files in a directory. It is similar to tools like L<mkisofs"
27734 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
27735 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
27736 "you want to attach these filesystems to existing virtual machines (eg. to "
27737 "import large amounts of read-only data to a VM)."
27741 #: ../tools/virt-make-fs.pl:57
27742 msgid "Basic usage is:"
27746 #: ../tools/virt-make-fs.pl:59
27749 " virt-make-fs input output\n"
27754 #: ../tools/virt-make-fs.pl:61
27756 "where C<input> is either a directory containing files that you want to add, "
27757 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
27758 "C<output> is a disk image. The input type is detected automatically. The "
27759 "output disk image defaults to a raw ext2 image unless you specify extra "
27760 "flags (see L</OPTIONS> below)."
27764 #: ../tools/virt-make-fs.pl:67
27765 msgid "EXTRA SPACE"
27769 #: ../tools/virt-make-fs.pl:69
27771 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
27772 "the files that it contains, but might have extra space. Depending on how "
27773 "you are going to use the output, you might think this extra space is wasted "
27774 "and want to minimize it, or you might want to leave space so that more files "
27775 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
27776 "but you can use the C<--size> flag to leave space in the filesystem if you "
27781 #: ../tools/virt-make-fs.pl:77
27783 "An alternative way to leave extra space but not make the output image any "
27784 "bigger is to use an alternative disk image format (instead of the default "
27785 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
27786 "image format (check your hypervisor supports this before using it). This "
27787 "allows you to choose a large C<--size> but the extra space won't actually be "
27788 "allocated in the image until you try to store something in it."
27792 #: ../tools/virt-make-fs.pl:85
27794 "Don't forget that you can also use local commands including L<resize2fs(8)> "
27795 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-"
27796 "resize to build another image from scratch."
27800 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
27801 #: ../tools/virt-make-fs.pl:142
27806 #: ../tools/virt-make-fs.pl:91
27809 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
27814 #: ../tools/virt-make-fs.pl:93
27815 msgid "FILESYSTEM TYPE"
27819 #: ../tools/virt-make-fs.pl:95
27821 "The default filesystem type is C<ext2>. Just about any filesystem type that "
27822 "libguestfs supports can be used (but I<not> read-only formats like "
27823 "ISO9660). Here are some of the more common choices:"
27827 #: ../tools/virt-make-fs.pl:101
27832 #: ../tools/virt-make-fs.pl:103
27834 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
27835 "you are not going to use the filesystem in a way that requires the journal, "
27836 "then this is just wasted overhead."
27840 #: ../tools/virt-make-fs.pl:107
27841 msgid "I<ntfs> or I<vfat>"
27845 #: ../tools/virt-make-fs.pl:109
27846 msgid "Useful if exporting data to a Windows guest."
27850 #: ../tools/virt-make-fs.pl:111
27852 "I<Note for vfat>: The tar archive or local directory must only contain files "
27853 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
27854 "program running within libguestfs is unable to change the ownership of non-"
27855 "root files, since vfat itself does not support this."
27859 #: ../tools/virt-make-fs.pl:116
27864 #: ../tools/virt-make-fs.pl:118
27866 "Lower overhead than C<ext2>, but certain limitations on filename length and "
27867 "total filesystem size."
27871 #: ../tools/virt-make-fs.pl:125
27874 " virt-make-fs --type=minix input minixfs.img\n"
27879 #: ../tools/virt-make-fs.pl:127
27880 msgid "TO PARTITION OR NOT TO PARTITION"
27884 #: ../tools/virt-make-fs.pl:129
27885 msgid "Optionally virt-make-fs can add a partition table to the output disk."
27889 #: ../tools/virt-make-fs.pl:131
27891 "Adding a partition can make the disk image more compatible with certain "
27892 "virtualized operating systems which don't expect to see a filesystem "
27893 "directly located on a block device (Linux doesn't care and will happily "
27894 "handle both types)."
27898 #: ../tools/virt-make-fs.pl:136
27900 "On the other hand, if you have a partition table then the output image is no "
27901 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
27902 "directly on a partitioned disk image. (However libguestfs tools such as "
27903 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
27907 #: ../tools/virt-make-fs.pl:144
27908 msgid "Add an MBR partition:"
27912 #: ../tools/virt-make-fs.pl:146
27915 " virt-make-fs --partition -- input disk.img\n"
27920 #: ../tools/virt-make-fs.pl:148
27922 "If the output disk image could be terabyte-sized or larger, it's better to "
27923 "use an EFI/GPT-compatible partition table:"
27927 #: ../tools/virt-make-fs.pl:151
27930 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
27935 #: ../tools/virt-make-fs.pl:179
27936 msgid "Enable debugging information."
27940 #: ../tools/virt-make-fs.pl:185
27941 msgid "B<--size=E<lt>NE<gt>>"
27945 #: ../tools/virt-make-fs.pl:187
27946 msgid "B<--size=+E<lt>NE<gt>>"
27950 #: ../tools/virt-make-fs.pl:189
27951 msgid "B<-s E<lt>NE<gt>>"
27955 #: ../tools/virt-make-fs.pl:191
27956 msgid "B<-s +E<lt>NE<gt>>"
27960 #: ../tools/virt-make-fs.pl:193
27962 "Use the C<--size> (or C<-s>) option to choose the size of the output image."
27966 #: ../tools/virt-make-fs.pl:196
27968 "If this option is I<not> given, then the output image will be just large "
27969 "enough to contain all the files, with not much wasted space."
27973 #: ../tools/virt-make-fs.pl:199
27975 "To choose a fixed size output disk, specify an absolute number followed by b/"
27976 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
27977 "Petabytes or Exabytes. This must be large enough to contain all the input "
27978 "files, else you will get an error."
27982 #: ../tools/virt-make-fs.pl:204
27984 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
27985 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
27986 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
27987 "the input files, and (approximately) an extra 200 MB free space."
27991 #: ../tools/virt-make-fs.pl:210
27993 "Note that virt-make-fs estimates free space, and therefore will not produce "
27994 "filesystems containing precisely the free space requested. (It is much more "
27995 "expensive and time-consuming to produce a filesystem which has precisely the "
27996 "desired free space)."
28000 #: ../tools/virt-make-fs.pl:219
28001 msgid "B<--format=E<lt>fmtE<gt>>"
28005 #: ../tools/virt-make-fs.pl:221
28006 msgid "B<-F E<lt>fmtE<gt>>"
28010 #: ../tools/virt-make-fs.pl:223
28011 msgid "Choose the output disk image format."
28015 #: ../tools/virt-make-fs.pl:225
28016 msgid "The default is C<raw> (raw disk image)."
28020 #: ../tools/virt-make-fs.pl:227
28022 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
28023 "that would really make sense here is C<qcow2>."
28027 #: ../tools/virt-make-fs.pl:234
28028 msgid "B<--type=E<lt>fsE<gt>>"
28032 #: ../tools/virt-make-fs.pl:236
28033 msgid "B<-t E<lt>fsE<gt>>"
28037 #: ../tools/virt-make-fs.pl:238
28038 msgid "Choose the output filesystem type."
28042 #: ../tools/virt-make-fs.pl:240
28043 msgid "The default is C<ext2>."
28047 #: ../tools/virt-make-fs.pl:242
28049 "Any filesystem which is supported read-write by libguestfs can be used here."
28053 #: ../tools/virt-make-fs.pl:249
28054 msgid "B<--partition>"
28058 #: ../tools/virt-make-fs.pl:251
28059 msgid "B<--partition=E<lt>parttypeE<gt>>"
28063 #: ../tools/virt-make-fs.pl:253
28065 "If specified, this flag adds an MBR partition table to the output disk image."
28069 #: ../tools/virt-make-fs.pl:256
28071 "You can change the partition table type, eg. C<--partition=gpt> for large "
28076 #: ../tools/virt-make-fs.pl:259
28078 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
28079 "might consider the next parameter to be the partition type. For example:"
28083 #: ../tools/virt-make-fs.pl:263
28086 " virt-make-fs --partition input.tar ...\n"
28091 #: ../tools/virt-make-fs.pl:265
28093 "would cause virt-make-fs to think you wanted to use a partition type of "
28094 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
28095 "dash) between options and the input file argument:"
28099 #: ../tools/virt-make-fs.pl:269
28102 " virt-make-fs --partition -- input.tar ...\n"
28107 #: ../tools/virt-make-fs.pl:536
28109 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<mkisofs(1)>, "
28110 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
28111 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
28115 #: ../tools/virt-make-fs.pl:553
28118 " export LIBGUESTFS_DEBUG=1\n"
28119 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
28124 #: ../tools/virt-make-fs.pl:556
28126 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
28131 #: ../tools/virt-list-partitions.pl:32
28133 "virt-list-partitions - List partitions in a virtual machine or disk image"
28137 #: ../tools/virt-list-partitions.pl:36
28140 " virt-list-partitions [--options] domname\n"
28145 #: ../tools/virt-list-partitions.pl:38
28148 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
28153 #: ../tools/virt-list-partitions.pl:42
28155 "C<virt-list-partitions> is a command line tool to list the partitions that "
28156 "are contained in a virtual machine or disk image. It is mainly useful as a "
28157 "first step to using L<virt-resize(1)>."
28161 #: ../tools/virt-list-partitions.pl:47
28163 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
28164 "functionality. For more complex cases you should look at the L<guestfish(1)"
28169 #: ../tools/virt-list-partitions.pl:104
28170 msgid "B<-h> | B<--human-readable>"
28174 #: ../tools/virt-list-partitions.pl:106
28175 msgid "Show sizes in human-readable form (eg. \"1G\")."
28179 #: ../tools/virt-list-partitions.pl:114
28181 "With this option, C<virt-list-partitions> displays the type and size of each "
28182 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
28186 #: ../tools/virt-list-partitions.pl:121
28187 msgid "B<-t> | B<--total>"
28191 #: ../tools/virt-list-partitions.pl:123
28193 "Display the total size of each block device (as a separate row or rows)."
28197 #: ../tools/virt-list-partitions.pl:256
28199 "L<guestfs(3)>, L<guestfish(1)>, L<virt-list-filesystems(1)>, L<virt-resize(1)"
28200 ">, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://"
28201 "libguestfs.org/>."