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-10-22 23:11+0200\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:36 ../tools/virt-edit.pl:31
23 #: ../tools/virt-win-reg.pl:34 ../tools/virt-df.pl:32 ../tools/virt-ls.pl:31
24 #: ../tools/virt-resize.pl:38 ../tools/virt-list-filesystems.pl:28
25 #: ../tools/virt-cat.pl:30 ../tools/virt-tar.pl:30 ../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:38 ../tools/virt-edit.pl:33
34 #: ../tools/virt-win-reg.pl:36 ../tools/virt-df.pl:34 ../tools/virt-ls.pl:33
35 #: ../tools/virt-resize.pl:40 ../tools/virt-list-filesystems.pl:30
36 #: ../tools/virt-cat.pl:32 ../tools/virt-tar.pl:32 ../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:42 ../tools/virt-edit.pl:37
50 #: ../tools/virt-win-reg.pl:40 ../tools/virt-df.pl:38 ../tools/virt-ls.pl:37
51 #: ../tools/virt-resize.pl:44 ../tools/virt-list-filesystems.pl:34
52 #: ../tools/virt-cat.pl:36 ../tools/virt-tar.pl:36 ../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:16
93 #: ../inspector/virt-inspector.pl:48 ../tools/virt-edit.pl:51
94 #: ../tools/virt-win-reg.pl:64 ../tools/virt-df.pl:46 ../tools/virt-ls.pl:43
95 #: ../tools/virt-resize.pl:50 ../tools/virt-list-filesystems.pl:40
96 #: ../tools/virt-cat.pl:42 ../tools/virt-tar.pl:73 ../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:1140 ../src/guestfs.pod:1145
782 #: ../src/guestfs.pod:1149 ../src/guestfs.pod:1365 ../src/guestfs.pod:1370
783 #: ../src/guestfs.pod:1374 ../src/guestfs.pod:1476 ../src/guestfs.pod:1480
784 #: ../src/guestfs.pod:1484 ../src/guestfs.pod:1489 ../src/guestfs.pod:1497
785 #: ../src/guestfs.pod:1516 ../src/guestfs.pod:1524 ../src/guestfs.pod:1754
786 #: ../src/guestfs.pod:1760 ../src/guestfs.pod:1765 ../src/guestfs.pod:1771
787 #: ../src/guestfs.pod:1878 ../src/guestfs.pod:1882 ../src/guestfs.pod:1886
788 #: ../src/guestfs.pod:1890 ../src/guestfs-actions.pod:14
789 #: ../src/guestfs-actions.pod:21 ../src/guestfs-actions.pod:438
790 #: ../src/guestfs-actions.pod:446 ../src/guestfs-actions.pod:453
791 #: ../src/guestfs-actions.pod:460 ../src/guestfs-actions.pod:1351
792 #: ../src/guestfs-actions.pod:1355 ../src/guestfs-actions.pod:1359
793 #: ../src/guestfs-actions.pod:1363 ../src/guestfs-actions.pod:1371
794 #: ../src/guestfs-actions.pod:1375 ../src/guestfs-actions.pod:1379
795 #: ../src/guestfs-actions.pod:1389 ../src/guestfs-actions.pod:1393
796 #: ../src/guestfs-actions.pod:1397 ../src/guestfs-actions.pod:1520
797 #: ../src/guestfs-actions.pod:1524 ../src/guestfs-actions.pod:1529
798 #: ../src/guestfs-actions.pod:1534 ../src/guestfs-actions.pod:1586
799 #: ../src/guestfs-actions.pod:1590 ../src/guestfs-actions.pod:1595
800 #: ../fish/guestfish.pod:364 ../fish/guestfish.pod:368
801 #: ../fish/guestfish.pod:372 ../fish/guestfish.pod:376
802 #: ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20
803 #: ../fish/guestfish-actions.pod:339 ../fish/guestfish-actions.pod:347
804 #: ../fish/guestfish-actions.pod:354 ../fish/guestfish-actions.pod:361
805 #: ../fish/guestfish-actions.pod:1056 ../fish/guestfish-actions.pod:1060
806 #: ../fish/guestfish-actions.pod:1064 ../fish/guestfish-actions.pod:1068
807 #: ../fish/guestfish-actions.pod:1076 ../fish/guestfish-actions.pod:1080
808 #: ../fish/guestfish-actions.pod:1084 ../fish/guestfish-actions.pod:1094
809 #: ../fish/guestfish-actions.pod:1098 ../fish/guestfish-actions.pod:1102
810 #: ../fish/guestfish-actions.pod:1192 ../fish/guestfish-actions.pod:1196
811 #: ../fish/guestfish-actions.pod:1201 ../fish/guestfish-actions.pod:1206
812 #: ../fish/guestfish-actions.pod:1248 ../fish/guestfish-actions.pod:1252
813 #: ../fish/guestfish-actions.pod:1257 ../tools/virt-df.pl:161
814 #: ../tools/virt-df.pl:167 ../tools/virt-resize.pl:348
815 #: ../tools/virt-resize.pl:353 ../tools/virt-resize.pl:363
820 #: ../src/guestfs.pod:362
822 "The kernel version that the command runs under will be different from what "
827 #: ../src/guestfs.pod:367
829 "If the command needs to communicate with daemons, then most likely they "
834 #: ../src/guestfs.pod:372
835 msgid "The command will be running in limited memory."
839 #: ../src/guestfs.pod:376
841 "The network may not be available unless you enable it (see L</"
842 "guestfs_set_network>)."
846 #: ../src/guestfs.pod:381
847 msgid "Only supports Linux guests (not Windows, BSD, etc)."
851 #: ../src/guestfs.pod:385
853 "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
857 #: ../src/guestfs.pod:390
859 "For SELinux guests, you may need to enable SELinux and load policy first. "
860 "See L</SELINUX> in this manpage."
864 #: ../src/guestfs.pod:395
866 "The two main API calls to run commands are L</guestfs_command> and L</"
867 "guestfs_sh> (there are also variations)."
871 #: ../src/guestfs.pod:398
873 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
874 "shell globs, redirections, etc will work."
878 #: ../src/guestfs.pod:401
879 msgid "CONFIGURATION FILES"
883 #: ../src/guestfs.pod:403
885 "To read and write configuration files in Linux guest filesystems, we "
886 "strongly recommend using Augeas. For example, Augeas understands how to "
887 "read and write, say, a Linux shadow password file or X.org configuration "
888 "file, and so avoids you having to write that code."
892 #: ../src/guestfs.pod:408
894 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
895 "document Augeas itself here because there is excellent documentation on the "
896 "L<http://augeas.net/> website."
900 #: ../src/guestfs.pod:412
902 "If you don't want to use Augeas (you fool!) then try calling L</"
903 "guestfs_read_lines> to get the file as a list of lines which you can iterate "
908 #: ../src/guestfs.pod:416
913 #: ../src/guestfs.pod:418
915 "We support SELinux guests. To ensure that labeling happens correctly in "
916 "SELinux guests, you need to enable SELinux and load the guest's policy:"
920 #: ../src/guestfs.pod:424
925 #: ../src/guestfs.pod:426
926 msgid "Before launching, do:"
930 #: ../src/guestfs.pod:428
933 " guestfs_set_selinux (g, 1);\n"
938 #: ../src/guestfs.pod:430
943 #: ../src/guestfs.pod:432
945 "After mounting the guest's filesystem(s), load the policy. This is best "
946 "done by running the L<load_policy(8)> command in the guest itself:"
950 #: ../src/guestfs.pod:436
953 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
958 #: ../src/guestfs.pod:438
960 "(Older versions of C<load_policy> require you to specify the name of the "
965 #: ../src/guestfs.pod:441
970 #: ../src/guestfs.pod:443
972 "Optionally, set the security context for the API. The correct security "
973 "context to use can only be known by inspecting the guest. As an example:"
977 #: ../src/guestfs.pod:447
980 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
985 #: ../src/guestfs.pod:451
986 msgid "This will work for running commands and editing existing files."
990 #: ../src/guestfs.pod:453
992 "When new files are created, you may need to label them explicitly, for "
993 "example by running the external command C<restorecon pathname>."
997 #: ../src/guestfs.pod:457
1002 #: ../src/guestfs.pod:459
1004 "Certain calls are affected by the current file mode creation mask (the "
1005 "\"umask\"). In particular ones which create files or directories, such as "
1006 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
1007 "either the default mode that the file is created with or modifies the mode "
1012 #: ../src/guestfs.pod:465
1014 "The default umask is C<022>, so files are created with modes such as C<0644> "
1015 "and directories with C<0755>."
1019 #: ../src/guestfs.pod:468
1021 "There are two ways to avoid being affected by umask. Either set umask to 0 "
1022 "(call C<guestfs_umask (g, 0)> early after launching). Or call L</"
1023 "guestfs_chmod> after creating each file or directory."
1027 #: ../src/guestfs.pod:472
1028 msgid "For more information about umask, see L<umask(2)>."
1032 #: ../src/guestfs.pod:474 ../fish/guestfish.pod:630
1033 msgid "ENCRYPTED DISKS"
1037 #: ../src/guestfs.pod:476
1039 "Libguestfs allows you to access Linux guests which have been encrypted using "
1040 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1041 "standard. This includes nearly all whole disk encryption systems used by "
1042 "modern Linux guests."
1046 #: ../src/guestfs.pod:482
1048 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1049 "returns the string C<crypto_LUKS>)."
1053 #: ../src/guestfs.pod:485
1055 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1056 "will require the passphrase!"
1060 #: ../src/guestfs.pod:488
1062 "Opening a LUKS device creates a new device mapper device called C</dev/"
1063 "mapper/mapname> (where C<mapname> is the string you supply to L</"
1064 "guestfs_luks_open>). Reads and writes to this mapper device are decrypted "
1065 "from and encrypted to the underlying block device respectively."
1069 #: ../src/guestfs.pod:494
1071 "LVM volume groups on the device can be made visible by calling L</"
1072 "guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical volume"
1073 "(s) can now be mounted in the usual way."
1077 #: ../src/guestfs.pod:498
1079 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1080 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1081 "[\"/dev/VG\"])>. Then close the mapper device by calling L</"
1082 "guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1083 "underlying encrypted block device)."
1087 #: ../src/guestfs.pod:505
1092 #: ../src/guestfs.pod:507
1094 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1095 "contains operating systems. (These APIs used to be in a separate Perl-only "
1096 "library called L<Sys::Guestfs::Lib(3)> but since version 1.5.3 the most "
1097 "frequently used part of this library has been rewritten in C and moved into "
1102 #: ../src/guestfs.pod:513
1104 "Add all disks belonging to the unknown virtual machine and call L</"
1105 "guestfs_launch> in the usual way."
1109 #: ../src/guestfs.pod:516
1111 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1112 "and certain heuristics, and returns a list of operating systems that were "
1113 "found. An empty list means none were found. A single element is the root "
1114 "filesystem of the operating system. For dual- or multi-boot guests, "
1115 "multiple roots can be returned, each one corresponding to a separate "
1116 "operating system. (Multi-boot virtual machines are extremely rare in the "
1117 "world of virtualization, but since this scenario can happen, we have built "
1118 "libguestfs to deal with it.)"
1122 #: ../src/guestfs.pod:525
1124 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1125 "to get additional details about that operating system. For example, call L</"
1126 "guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1127 "Windows and Linux-based operating systems respectively."
1131 #: ../src/guestfs.pod:531
1133 "Un*x-like and Linux-based operating systems usually consist of several "
1134 "filesystems which are mounted at boot time (for example, a separate boot "
1135 "partition mounted on C</boot>). The inspection rules are able to detect how "
1136 "filesystems correspond to mount points. Call "
1137 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1138 "hash table like this example:"
1142 #: ../src/guestfs.pod:538
1145 " /boot => /dev/sda1\n"
1146 " / => /dev/vg_guest/lv_root\n"
1147 " /usr => /dev/vg_guest/lv_usr\n"
1152 #: ../src/guestfs.pod:542
1154 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1155 "filesystems as suggested."
1159 #: ../src/guestfs.pod:545
1161 "Be careful to mount filesystems in the right order (eg. C</> before C</"
1162 "usr>). Sorting the keys of the hash by length, shortest first, should work."
1166 #: ../src/guestfs.pod:549
1168 "Inspection currently only works for some common operating systems. "
1169 "Contributors are welcome to send patches for other operating systems that we "
1170 "currently cannot detect."
1174 #: ../src/guestfs.pod:553
1176 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1177 "for more details. The L</guestfs_inspect_os> function just ignores any "
1178 "encrypted devices."
1182 #: ../src/guestfs.pod:557
1184 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1185 "inspection and caches the results in the guest handle. Subsequent calls to "
1186 "C<guestfs_inspect_get_*> return this cached information, but I<do not> re-"
1187 "read the disks. If you change the content of the guest disks, you can redo "
1188 "inspection by calling L</guestfs_inspect_os> again."
1192 #: ../src/guestfs.pod:564
1193 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1197 #: ../src/guestfs.pod:566
1199 "Libguestfs can mount NTFS partitions. It does this using the L<http://www."
1200 "ntfs-3g.org/> driver."
1204 #: ../src/guestfs.pod:569
1206 "DOS and Windows still use drive letters, and the filesystems are always "
1207 "treated as case insensitive by Windows itself, and therefore you might find "
1208 "a Windows configuration file referring to a path like C<c:\\windows"
1209 "\\system32>. When the filesystem is mounted in libguestfs, that directory "
1210 "might be referred to as C</WINDOWS/System32>."
1214 #: ../src/guestfs.pod:575
1216 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1217 "libguestfs to read the appropriate Windows Registry and configuration files, "
1218 "to determine yourself how drives are mapped (see also L<hivex(3)> and L<virt-"
1223 #: ../src/guestfs.pod:580
1225 "Replacing backslash characters with forward slash characters is also outside "
1226 "the scope of libguestfs, but something that you can easily do."
1230 #: ../src/guestfs.pod:583
1232 "Where we can help is in resolving the case insensitivity of paths. For "
1233 "this, call L</guestfs_case_sensitive_path>."
1237 #: ../src/guestfs.pod:586
1239 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1240 "files, through the library C<hivex> which is part of the libguestfs project "
1241 "although ships as a separate tarball. You have to locate and download the "
1242 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1243 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and L<virt-win-"
1244 "reg(1)> for more help on this issue."
1248 #: ../src/guestfs.pod:594
1249 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1253 #: ../src/guestfs.pod:596
1255 "Although we don't want to discourage you from using the C API, we will "
1256 "mention here that the same API is also available in other languages."
1260 #: ../src/guestfs.pod:599
1262 "The API is broadly identical in all supported languages. This means that "
1263 "the C call C<guestfs_mount(g,path)> is C<$g-E<gt>mount($path)> in Perl, C<g."
1264 "mount(path)> in Python, and C<Guestfs.mount g path> in OCaml. In other "
1265 "words, a straightforward, predictable isomorphism between each language."
1269 #: ../src/guestfs.pod:605
1271 "Error messages are automatically transformed into exceptions if the language "
1276 #: ../src/guestfs.pod:608
1278 "We don't try to \"object orientify\" parts of the API in OO languages, "
1279 "although contributors are welcome to write higher level APIs above what we "
1280 "provide in their favourite languages if they wish."
1284 #: ../src/guestfs.pod:614
1289 #: ../src/guestfs.pod:616
1291 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1292 "identical to the C API. C++ classes and exceptions are not used."
1296 #: ../src/guestfs.pod:620
1301 #: ../src/guestfs.pod:622
1303 "The C# bindings are highly experimental. Please read the warnings at the "
1304 "top of C<csharp/Libguestfs.cs>."
1308 #: ../src/guestfs.pod:625
1313 #: ../src/guestfs.pod:627
1315 "This is the only language binding that is working but incomplete. Only "
1316 "calls which return simple integers have been bound in Haskell, and we are "
1317 "looking for help to complete this binding."
1321 #: ../src/guestfs.pod:631
1326 #: ../src/guestfs.pod:633
1328 "Full documentation is contained in the Javadoc which is distributed with "
1333 #: ../src/guestfs.pod:636
1338 #: ../src/guestfs.pod:638
1339 msgid "For documentation see the file C<guestfs.mli>."
1343 #: ../src/guestfs.pod:640
1348 #: ../src/guestfs.pod:642
1349 msgid "For documentation see L<Sys::Guestfs(3)>."
1353 #: ../src/guestfs.pod:644
1358 #: ../src/guestfs.pod:646
1360 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1361 "the php-libguestfs package for your distribution."
1365 #: ../src/guestfs.pod:649
1366 msgid "The PHP binding only works correctly on 64 bit machines."
1370 #: ../src/guestfs.pod:651
1375 #: ../src/guestfs.pod:653
1376 msgid "For documentation do:"
1380 #: ../src/guestfs.pod:655
1384 " >>> import guestfs\n"
1385 " >>> help (guestfs)\n"
1390 #: ../src/guestfs.pod:659
1395 #: ../src/guestfs.pod:661
1397 "Use the Guestfs module. There is no Ruby-specific documentation, but you "
1398 "can find examples written in Ruby in the libguestfs source."
1402 #: ../src/guestfs.pod:664
1403 msgid "B<shell scripts>"
1407 #: ../src/guestfs.pod:666
1408 msgid "For documentation see L<guestfish(1)>."
1412 #: ../src/guestfs.pod:670
1413 msgid "LIBGUESTFS GOTCHAS"
1417 #: ../src/guestfs.pod:672
1419 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1420 "system [...] that works in the way it is documented but is counterintuitive "
1421 "and almost invites mistakes.\""
1425 #: ../src/guestfs.pod:676
1427 "Since we developed libguestfs and the associated tools, there are several "
1428 "things we would have designed differently, but are now stuck with for "
1429 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1430 "release, you can expect these to change. Beware of them."
1434 #: ../src/guestfs.pod:684
1435 msgid "Autosync / forgetting to sync."
1439 #: ../src/guestfs.pod:686
1441 "When modifying a filesystem from C or another language, you B<must> unmount "
1442 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1443 "libguestfs handle. You can also call:"
1447 #: ../src/guestfs.pod:690
1450 " guestfs_set_autosync (g, 1);\n"
1455 #: ../src/guestfs.pod:692
1457 "to have the unmount/sync done automatically for you when the handle 'g' is "
1458 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> q.v.)"
1462 #: ../src/guestfs.pod:696
1464 "If you forget to do this, then it is entirely possible that your changes "
1465 "won't be written out, or will be partially written, or (very rarely) that "
1466 "you'll get disk corruption."
1470 #: ../src/guestfs.pod:700
1472 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1473 "guestfish scripts that forget to sync will work just fine, which can make "
1474 "this very puzzling if you are trying to debug a problem."
1478 #: ../src/guestfs.pod:704
1479 msgid "Mount option C<-o sync> should not be the default."
1483 #: ../src/guestfs.pod:706
1485 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1486 "However C<-o sync> does not add any reliability benefit, but does have a "
1487 "very large performance impact."
1491 #: ../src/guestfs.pod:710
1493 "The work around is to use L</guestfs_mount_options> and set the mount "
1494 "options that you actually want to use."
1498 #: ../src/guestfs.pod:713
1499 msgid "Read-only should be the default."
1503 #: ../src/guestfs.pod:715
1505 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1506 "specify I<--rw> if you want to make changes to the image."
1510 #: ../src/guestfs.pod:718
1511 msgid "This would reduce the potential to corrupt live VM images."
1515 #: ../src/guestfs.pod:720
1517 "Note that many filesystems change the disk when you just mount and unmount, "
1518 "even if you didn't perform any writes. You need to use L</"
1519 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
1523 #: ../src/guestfs.pod:724
1524 msgid "guestfish command line is hard to use."
1528 #: ../src/guestfs.pod:726
1530 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1531 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1532 "exist, so it fails. In earlier versions of guestfish the error message was "
1533 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1534 "we should have used C<guestfish -c command> to run commands."
1538 #: ../src/guestfs.pod:733
1539 msgid "guestfish megabyte modifiers don't work right on all commands"
1543 #: ../src/guestfs.pod:735
1545 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1546 "other modifiers). What guestfish actually does is to multiply the number "
1547 "part by the modifier part and pass the result to the C API. However this "
1548 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1549 "expecting some other unit (eg. megabytes)."
1553 #: ../src/guestfs.pod:742
1554 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1558 #: ../src/guestfs.pod:744
1561 " lvcreate LV VG 100M\n"
1566 #: ../src/guestfs.pod:746
1568 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1569 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1570 "megabytes * megabytes) logical volume. The error message you get from this "
1571 "is also a little obscure."
1575 #: ../src/guestfs.pod:751
1577 "This could be fixed in the generator by specially marking parameters and "
1578 "return values which take bytes or other units."
1582 #: ../src/guestfs.pod:754
1583 msgid "Library should return errno with error messages."
1587 #: ../src/guestfs.pod:756
1589 "It would be a nice-to-have to be able to get the original value of 'errno' "
1590 "from inside the appliance along error paths (where set). Currently "
1591 "L<guestmount(1)> goes through hoops to try to reverse the error message "
1592 "string into an errno, see the function error() in fuse/guestmount.c."
1596 #: ../src/guestfs.pod:762
1598 "In libguestfs 1.5.4, the protocol was changed so that the Linux errno is "
1599 "sent back from the daemon."
1603 #: ../src/guestfs.pod:765
1604 msgid "Ambiguity between devices and paths"
1608 #: ../src/guestfs.pod:767
1610 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
1611 "sdb2>) and a similar pathname. A file might just happen to be called "
1612 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1616 #: ../src/guestfs.pod:772
1618 "In the current API we usually resolve this ambiguity by having two separate "
1619 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1620 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1621 "detecting if the path supplied begins with C</dev/>."
1625 #: ../src/guestfs.pod:778
1627 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1628 "make paths/devices into structured names. One way to do this would be to "
1629 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1630 "aspect of grub. Another way would be to use a structured type, equivalent "
1631 "to this OCaml type:"
1635 #: ../src/guestfs.pod:784
1638 " type path = Path of string | Device of int | Partition of int * int\n"
1643 #: ../src/guestfs.pod:786
1644 msgid "which would allow you to pass arguments like:"
1648 #: ../src/guestfs.pod:788
1651 " Path \"/foo/bar\"\n"
1652 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
1653 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
1654 " Path \"/dev/sdb2\" (* not a device *)\n"
1659 #: ../src/guestfs.pod:793
1661 "As you can see there are still problems to resolve even with this "
1662 "representation. Also consider how it might work in guestfish."
1666 #: ../src/guestfs.pod:798
1667 msgid "PROTOCOL LIMITS"
1671 #: ../src/guestfs.pod:800
1673 "Internally libguestfs uses a message-based protocol to pass API calls and "
1674 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1675 "plenty more detail about this). The maximum message size used by the "
1676 "protocol is slightly less than 4 MB. For some API calls you may need to be "
1677 "aware of this limit. The API calls which may be affected are individually "
1678 "documented, with a link back to this section of the documentation."
1682 #: ../src/guestfs.pod:808
1684 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1685 "a simple string. Because this string is at some point internally encoded as "
1686 "a message, the maximum size that it can return is slightly under 4 MB. If "
1687 "the requested file is larger than this then you will get an error."
1691 #: ../src/guestfs.pod:814
1693 "In order to transfer large files into and out of the guest filesystem, you "
1694 "need to use particular calls that support this. The sections L</UPLOADING> "
1695 "and L</DOWNLOADING> document how to do this."
1699 #: ../src/guestfs.pod:818
1701 "You might also consider mounting the disk image using our FUSE filesystem "
1702 "support (L<guestmount(1)>)."
1706 #: ../src/guestfs.pod:821
1707 msgid "KEYS AND PASSPHRASES"
1711 #: ../src/guestfs.pod:823
1713 "Certain libguestfs calls take a parameter that contains sensitive key "
1714 "material, passed in as a C string."
1718 #: ../src/guestfs.pod:826
1720 "In the future we would hope to change the libguestfs implementation so that "
1721 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1722 "swap. However this is I<not> done at the moment, because of the complexity "
1723 "of such an implementation."
1727 #: ../src/guestfs.pod:831
1729 "Therefore you should be aware that any key parameter you pass to libguestfs "
1730 "might end up being written out to the swap partition. If this is a concern, "
1731 "scrub the swap partition or don't use libguestfs on encrypted devices."
1735 #: ../src/guestfs.pod:836
1736 msgid "CONNECTION MANAGEMENT"
1740 #: ../src/guestfs.pod:838
1745 #: ../src/guestfs.pod:840
1747 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
1748 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
1749 "handle and release all resources used."
1753 #: ../src/guestfs.pod:844
1755 "For information on using multiple handles and threads, see the section L</"
1756 "MULTIPLE HANDLES AND MULTIPLE THREADS> below."
1760 #: ../src/guestfs.pod:847
1761 msgid "guestfs_create"
1765 #: ../src/guestfs.pod:849
1768 " guestfs_h *guestfs_create (void);\n"
1773 #: ../src/guestfs.pod:851
1774 msgid "Create a connection handle."
1778 #: ../src/guestfs.pod:853
1780 "You have to call L</guestfs_add_drive_opts> (or one of the equivalent calls) "
1781 "on the handle at least once."
1785 #: ../src/guestfs.pod:856
1787 "This function returns a non-NULL pointer to a handle on success or NULL on "
1792 #: ../src/guestfs.pod:859
1793 msgid "After configuring the handle, you have to call L</guestfs_launch>."
1797 #: ../src/guestfs.pod:861
1799 "You may also want to configure error handling for the handle. See L</ERROR "
1800 "HANDLING> section below."
1804 #: ../src/guestfs.pod:864
1805 msgid "guestfs_close"
1809 #: ../src/guestfs.pod:866
1812 " void guestfs_close (guestfs_h *g);\n"
1817 #: ../src/guestfs.pod:868
1818 msgid "This closes the connection handle and frees up all resources used."
1822 #: ../src/guestfs.pod:870
1823 msgid "ERROR HANDLING"
1827 #: ../src/guestfs.pod:872
1829 "The convention in all functions that return C<int> is that they return C<-1> "
1830 "to indicate an error. You can get additional information on errors by "
1831 "calling L</guestfs_last_error> and/or by setting up an error handler with L</"
1832 "guestfs_set_error_handler>."
1836 #: ../src/guestfs.pod:877
1837 msgid "The default error handler prints the information string to C<stderr>."
1841 #: ../src/guestfs.pod:879
1843 "Out of memory errors are handled differently. The default action is to call "
1844 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
1845 "guestfs_set_out_of_memory_handler>."
1849 #: ../src/guestfs.pod:883
1850 msgid "guestfs_last_error"
1854 #: ../src/guestfs.pod:885
1857 " const char *guestfs_last_error (guestfs_h *g);\n"
1862 #: ../src/guestfs.pod:887
1864 "This returns the last error message that happened on C<g>. If there has not "
1865 "been an error since the handle was created, then this returns C<NULL>."
1869 #: ../src/guestfs.pod:891
1871 "The lifetime of the returned string is until the next error occurs, or L</"
1872 "guestfs_close> is called."
1876 #: ../src/guestfs.pod:894
1878 "The error string is not localized (ie. is always in English), because this "
1879 "makes searching for error messages in search engines give the largest number "
1884 #: ../src/guestfs.pod:898
1885 msgid "guestfs_set_error_handler"
1889 #: ../src/guestfs.pod:900
1892 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
1894 " const char *msg);\n"
1895 " void guestfs_set_error_handler (guestfs_h *g,\n"
1896 " guestfs_error_handler_cb cb,\n"
1902 #: ../src/guestfs.pod:907
1904 "The callback C<cb> will be called if there is an error. The parameters "
1905 "passed to the callback are an opaque data pointer and the error message "
1910 #: ../src/guestfs.pod:911
1912 "Note that the message string C<msg> is freed as soon as the callback "
1913 "function returns, so if you want to stash it somewhere you must make your "
1918 #: ../src/guestfs.pod:915
1919 msgid "The default handler prints messages on C<stderr>."
1923 #: ../src/guestfs.pod:917
1924 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
1928 #: ../src/guestfs.pod:919
1929 msgid "guestfs_get_error_handler"
1933 #: ../src/guestfs.pod:921
1936 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
1937 " void **opaque_rtn);\n"
1942 #: ../src/guestfs.pod:924
1943 msgid "Returns the current error handler callback."
1947 #: ../src/guestfs.pod:926
1948 msgid "guestfs_set_out_of_memory_handler"
1952 #: ../src/guestfs.pod:928
1955 " typedef void (*guestfs_abort_cb) (void);\n"
1956 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
1957 " guestfs_abort_cb);\n"
1962 #: ../src/guestfs.pod:932
1964 "The callback C<cb> will be called if there is an out of memory situation. "
1965 "I<Note this callback must not return>."
1969 #: ../src/guestfs.pod:935
1970 msgid "The default is to call L<abort(3)>."
1974 #: ../src/guestfs.pod:937
1976 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
1980 #: ../src/guestfs.pod:940
1981 msgid "guestfs_get_out_of_memory_handler"
1985 #: ../src/guestfs.pod:942
1988 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
1993 #: ../src/guestfs.pod:944
1994 msgid "This returns the current out of memory handler."
1998 #: ../src/guestfs.pod:946
2003 #: ../src/guestfs.pod:948
2005 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
2010 #: ../src/guestfs.pod:951
2012 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
2013 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
2017 #: ../src/guestfs.pod:954
2019 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
2020 "to change the directories that libguestfs will search in. The value is a "
2021 "colon-separated list of paths. The current directory is I<not> searched "
2022 "unless the path contains an empty element or C<.>. For example "
2023 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
2024 "then C</usr/lib/guestfs>."
2028 #: ../src/guestfs.pod:961
2029 msgid "HIGH-LEVEL API ACTIONS"
2033 #: ../src/guestfs.pod:963
2034 msgid "ABI GUARANTEE"
2038 #: ../src/guestfs.pod:965
2040 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
2041 "actions as outlined in this section. Although we will deprecate some "
2042 "actions, for example if they get replaced by newer calls, we will keep the "
2043 "old actions forever. This allows you the developer to program in confidence "
2044 "against the libguestfs API."
2048 #: ../src/guestfs.pod:971 ../fish/guestfish.pod:860
2053 #: ../src/guestfs.pod:973
2058 #: ../src/guestfs.pod:975
2063 #: ../src/guestfs.pod:977
2064 msgid "AVAILABILITY"
2068 #: ../src/guestfs.pod:979
2069 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
2073 #: ../src/guestfs.pod:981
2075 "Using L</guestfs_available> you can test availability of the following "
2076 "groups of functions. This test queries the appliance to see if the "
2077 "appliance you are currently using supports the functionality."
2081 #: ../src/guestfs.pod:986
2082 msgid "@AVAILABILITY@"
2086 #: ../src/guestfs.pod:988
2087 msgid "GUESTFISH supported COMMAND"
2091 #: ../src/guestfs.pod:990
2093 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
2094 "prints out the available groups and whether they are supported by this build "
2095 "of libguestfs. Note however that you have to do C<run> first."
2099 #: ../src/guestfs.pod:995
2100 msgid "SINGLE CALLS AT COMPILE TIME"
2104 #: ../src/guestfs.pod:997
2106 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
2107 "function, such as:"
2111 #: ../src/guestfs.pod:1000
2114 " #define LIBGUESTFS_HAVE_DD 1\n"
2119 #: ../src/guestfs.pod:1002
2120 msgid "if L</guestfs_dd> is available."
2124 #: ../src/guestfs.pod:1004
2126 "Before version 1.5.8, if you needed to test whether a single libguestfs "
2127 "function is available at compile time, we recommended using build tools such "
2128 "as autoconf or cmake. For example in autotools you could use:"
2132 #: ../src/guestfs.pod:1009
2135 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
2136 " AC_CHECK_FUNCS([guestfs_dd])\n"
2141 #: ../src/guestfs.pod:1012
2143 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
2148 #: ../src/guestfs.pod:1015
2149 msgid "SINGLE CALLS AT RUN TIME"
2153 #: ../src/guestfs.pod:1017
2155 "Testing at compile time doesn't guarantee that a function really exists in "
2156 "the library. The reason is that you might be dynamically linked against a "
2157 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
2158 "This situation unfortunately results in a segmentation fault, which is a "
2159 "shortcoming of the C dynamic linking system itself."
2163 #: ../src/guestfs.pod:1024
2165 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2166 "in this example program (note that you still need the compile time check as "
2171 #: ../src/guestfs.pod:1028
2174 " #include <stdio.h>\n"
2175 " #include <stdlib.h>\n"
2176 " #include <unistd.h>\n"
2177 " #include <dlfcn.h>\n"
2178 " #include <guestfs.h>\n"
2183 #: ../src/guestfs.pod:1034
2188 " #ifdef LIBGUESTFS_HAVE_DD\n"
2190 " int has_function;\n"
2195 #: ../src/guestfs.pod:1040
2198 " /* Test if the function guestfs_dd is really available. */\n"
2199 " dl = dlopen (NULL, RTLD_LAZY);\n"
2201 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2202 " exit (EXIT_FAILURE);\n"
2204 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2210 #: ../src/guestfs.pod:1049
2213 " if (!has_function)\n"
2214 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2216 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2217 " /* Now it's safe to call\n"
2218 " guestfs_dd (g, \"foo\", \"bar\");\n"
2222 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2229 #: ../src/guestfs.pod:1062
2231 "You may think the above is an awful lot of hassle, and it is. There are "
2232 "other ways outside of the C linking system to ensure that this kind of "
2233 "incompatibility never arises, such as using package versioning:"
2237 #: ../src/guestfs.pod:1067
2240 " Requires: libguestfs >= 1.0.80\n"
2245 #: ../src/guestfs.pod:1069
2246 msgid "CALLS WITH OPTIONAL ARGUMENTS"
2250 #: ../src/guestfs.pod:1071
2252 "A recent feature of the API is the introduction of calls which take optional "
2253 "arguments. In C these are declared 3 ways. The main way is as a call which "
2254 "takes variable arguments (ie. C<...>), as in this example:"
2258 #: ../src/guestfs.pod:1076
2261 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
2266 #: ../src/guestfs.pod:1078
2268 "Call this with a list of optional arguments, terminated by C<-1>. So to "
2269 "call with no optional arguments specified:"
2273 #: ../src/guestfs.pod:1081
2276 " guestfs_add_drive_opts (g, filename, -1);\n"
2281 #: ../src/guestfs.pod:1083
2282 msgid "With a single optional argument:"
2286 #: ../src/guestfs.pod:1085
2289 " guestfs_add_drive_opts (g, filename,\n"
2290 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2296 #: ../src/guestfs.pod:1089
2301 #: ../src/guestfs.pod:1091
2304 " guestfs_add_drive_opts (g, filename,\n"
2305 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2306 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
2312 #: ../src/guestfs.pod:1096
2314 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
2319 #: ../src/guestfs.pod:1099
2320 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
2324 #: ../src/guestfs.pod:1101
2326 "The second variant has the same name with the suffix C<_va>, which works the "
2327 "same way but takes a C<va_list>. See the C manual for details. For the "
2328 "example function, this is declared:"
2332 #: ../src/guestfs.pod:1105
2335 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
2341 #: ../src/guestfs.pod:1108
2342 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
2346 #: ../src/guestfs.pod:1110
2348 "The third variant is useful where you need to construct these calls. You "
2349 "pass in a structure where you fill in the optional fields. The structure "
2350 "has a bitmask as the first element which you must set to indicate which "
2351 "fields you have filled in. For our example function the structure and call "
2356 #: ../src/guestfs.pod:1116
2359 " struct guestfs_add_drive_opts_argv {\n"
2360 " uint64_t bitmask;\n"
2362 " const char *format;\n"
2365 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
2366 " const struct guestfs_add_drive_opts_argv *optargs);\n"
2371 #: ../src/guestfs.pod:1125
2372 msgid "You could call it like this:"
2376 #: ../src/guestfs.pod:1127
2379 " struct guestfs_add_drive_opts_argv optargs = {\n"
2380 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
2381 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
2383 " .format = \"qcow2\"\n"
2389 #: ../src/guestfs.pod:1134
2392 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
2397 #: ../src/guestfs.pod:1136 ../src/guestfs-actions.pod:10
2398 #: ../src/guestfs-actions.pod:1582 ../fish/guestfish-actions.pod:9
2399 #: ../fish/guestfish-actions.pod:1244
2404 #: ../src/guestfs.pod:1142
2405 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
2409 #: ../src/guestfs.pod:1147
2410 msgid "You do not need to fill in all fields of the structure."
2414 #: ../src/guestfs.pod:1151
2416 "There must be a one-to-one correspondence between fields of the structure "
2417 "that are filled in, and bits set in the bitmask."
2421 #: ../src/guestfs.pod:1156
2422 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
2426 #: ../src/guestfs.pod:1158
2428 "In other languages, optional arguments are expressed in the way that is "
2429 "natural for that language. We refer you to the language-specific "
2430 "documentation for more details on that."
2434 #: ../src/guestfs.pod:1162
2435 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
2439 #: ../src/guestfs.pod:1164 ../src/guestfs.pod:1169
2444 #: ../src/guestfs.pod:1166
2446 "<!-- old anchor for the next section --> <a name="
2447 "\"state_machine_and_low_level_event_api\"/>"
2451 #: ../src/guestfs.pod:1171
2452 msgid "ARCHITECTURE"
2456 #: ../src/guestfs.pod:1173
2458 "Internally, libguestfs is implemented by running an appliance (a special "
2459 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
2460 "process of the main program."
2464 #: ../src/guestfs.pod:1177
2467 " ___________________\n"
2469 " | main program |\n"
2471 " | | child process / appliance\n"
2472 " | | __________________________\n"
2474 " +-------------------+ RPC | +-----------------+ |\n"
2475 " | libguestfs <--------------------> guestfsd | |\n"
2476 " | | | +-----------------+ |\n"
2477 " \\___________________/ | | Linux kernel | |\n"
2478 " | +--^--------------+ |\n"
2479 " \\_________|________________/\n"
2485 " \\______________/\n"
2490 #: ../src/guestfs.pod:1197
2492 "The library, linked to the main program, creates the child process and hence "
2493 "the appliance in the L</guestfs_launch> function."
2497 #: ../src/guestfs.pod:1200
2499 "Inside the appliance is a Linux kernel and a complete stack of userspace "
2500 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
2501 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
2502 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
2503 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
2504 "attached to the qemu process which translates device access by the "
2505 "appliance's Linux kernel into accesses to the image."
2509 #: ../src/guestfs.pod:1209
2511 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
2512 "Although the disk image you are attached to might also be used by some "
2513 "virtual machine, libguestfs doesn't know or care about this. (But you will "
2514 "care if both libguestfs's qemu process and your virtual machine are trying "
2515 "to update the disk image at the same time, since these usually results in "
2516 "massive disk corruption)."
2520 #: ../src/guestfs.pod:1216
2521 msgid "STATE MACHINE"
2525 #: ../src/guestfs.pod:1218
2526 msgid "libguestfs uses a state machine to model the child process:"
2530 #: ../src/guestfs.pod:1220
2542 " / | \\ \\ guestfs_launch\n"
2543 " / | _\\__V______\n"
2545 " / | | LAUNCHING |\n"
2546 " / | \\___________/\n"
2548 " / | guestfs_launch\n"
2550 " ______ / __|____V\n"
2551 " / \\ ------> / \\\n"
2552 " | BUSY | | READY |\n"
2553 " \\______/ <------ \\________/\n"
2558 #: ../src/guestfs.pod:1242
2560 "The normal transitions are (1) CONFIG (when the handle is created, but there "
2561 "is no child process), (2) LAUNCHING (when the child process is booting up), "
2562 "(3) alternating between READY and BUSY as commands are issued to, and "
2563 "carried out by, the child process."
2567 #: ../src/guestfs.pod:1247
2569 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
2570 "asynchronously at any time (eg. due to some internal error), and that causes "
2571 "the state to transition back to CONFIG."
2575 #: ../src/guestfs.pod:1251
2577 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
2578 "issued when in the CONFIG state."
2582 #: ../src/guestfs.pod:1254
2584 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
2585 "L</guestfs_launch> blocks until the child process is READY to accept "
2586 "commands (or until some failure or timeout). L</guestfs_launch> internally "
2587 "moves the state from CONFIG to LAUNCHING while it is running."
2591 #: ../src/guestfs.pod:1260
2593 "API actions such as L</guestfs_mount> can only be issued when in the READY "
2594 "state. These API calls block waiting for the command to be carried out (ie. "
2595 "the state to transition to BUSY and then back to READY). There are no non-"
2596 "blocking versions, and no way to issue more than one command per handle at "
2601 #: ../src/guestfs.pod:1266
2603 "Finally, the child process sends asynchronous messages back to the main "
2604 "program, such as kernel log messages. You can register a callback to "
2605 "receive these messages."
2609 #: ../src/guestfs.pod:1270
2610 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
2614 #: ../src/guestfs.pod:1272
2616 "The child process generates events in some situations. Current events "
2617 "include: receiving a log message, the child process exits."
2621 #: ../src/guestfs.pod:1275
2623 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
2628 #: ../src/guestfs.pod:1278
2630 "Only I<one callback of each type> can be registered for each handle. "
2631 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
2632 "that type. Cancel all callbacks of this type by calling this function with "
2633 "C<cb> set to C<NULL>."
2637 #: ../src/guestfs.pod:1283
2638 msgid "guestfs_set_log_message_callback"
2642 #: ../src/guestfs.pod:1285
2645 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
2646 " char *buf, int len);\n"
2647 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
2648 " guestfs_log_message_cb cb,\n"
2654 #: ../src/guestfs.pod:1291
2656 "The callback function C<cb> will be called whenever qemu or the guest writes "
2657 "anything to the console."
2661 #: ../src/guestfs.pod:1294
2662 msgid "Use this function to capture kernel messages and similar."
2666 #: ../src/guestfs.pod:1296
2668 "Normally there is no log message handler, and log messages are just "
2673 #: ../src/guestfs.pod:1299
2674 msgid "guestfs_set_subprocess_quit_callback"
2678 #: ../src/guestfs.pod:1301
2681 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
2682 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
2683 " guestfs_subprocess_quit_cb cb,\n"
2689 #: ../src/guestfs.pod:1306
2691 "The callback function C<cb> will be called when the child process quits, "
2692 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
2693 "corresponds to a transition from any state to the CONFIG state)."
2697 #: ../src/guestfs.pod:1311
2698 msgid "guestfs_set_launch_done_callback"
2702 #: ../src/guestfs.pod:1313
2705 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
2706 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
2707 " guestfs_launch_done_cb cb,\n"
2713 #: ../src/guestfs.pod:1318
2715 "The callback function C<cb> will be called when the child process becomes "
2716 "ready first time after it has been launched. (This corresponds to a "
2717 "transition from LAUNCHING to the READY state)."
2721 #: ../src/guestfs.pod:1322
2722 msgid "guestfs_set_close_callback"
2726 #: ../src/guestfs.pod:1324
2729 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
2730 " void guestfs_set_close_callback (guestfs_h *g,\n"
2731 " guestfs_close_cb cb,\n"
2737 #: ../src/guestfs.pod:1329
2739 "The callback function C<cb> will be called while the handle is being closed "
2740 "(synchronously from L</guestfs_close>)."
2744 #: ../src/guestfs.pod:1332
2746 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
2747 "handles that are open when the program exits. This means that this callback "
2748 "might be called indirectly from L<exit(3)>, which can cause unexpected "
2749 "problems in higher-level languages (eg. if your HLL interpreter has already "
2750 "been cleaned up by the time this is called, and if your callback then jumps "
2751 "into some HLL function)."
2755 #: ../src/guestfs.pod:1340
2756 msgid "guestfs_set_progress_callback"
2760 #: ../src/guestfs.pod:1342
2763 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
2764 " int proc_nr, int serial,\n"
2765 " uint64_t position, uint64_t total);\n"
2766 " void guestfs_set_progress_callback (guestfs_h *g,\n"
2767 " guestfs_progress_cb cb,\n"
2773 #: ../src/guestfs.pod:1349
2775 "Some long-running operations can generate progress messages. If this "
2776 "callback is registered, then it will be called each time a progress message "
2777 "is generated (usually two seconds after the operation started, and three "
2778 "times per second thereafter until it completes, although the frequency may "
2779 "change in future versions)."
2783 #: ../src/guestfs.pod:1355
2785 "The callback receives two numbers: C<position> and C<total>. The units of "
2786 "C<total> are not defined, although for some operations C<total> may relate "
2787 "in some way to the amount of data to be transferred (eg. in bytes or "
2788 "megabytes), and C<position> may be the portion which has been transferred."
2792 #: ../src/guestfs.pod:1361
2793 msgid "The only defined and stable parts of the API are:"
2797 #: ../src/guestfs.pod:1367
2799 "The callback can display to the user some type of progress bar or indicator "
2800 "which shows the ratio of C<position>:C<total>."
2804 #: ../src/guestfs.pod:1372
2805 msgid "0 E<lt>= C<position> E<lt>= C<total>"
2809 #: ../src/guestfs.pod:1376
2811 "If any progress notification is sent during a call, then a final progress "
2812 "notification is always sent when C<position> = C<total>."
2816 #: ../src/guestfs.pod:1379
2818 "This is to simplify caller code, so callers can easily set the progress "
2819 "indicator to \"100%\" at the end of the operation, without requiring special "
2820 "code to detect this case."
2824 #: ../src/guestfs.pod:1385
2826 "The callback also receives the procedure number and serial number of the "
2827 "call. These are only useful for debugging protocol issues, and the callback "
2828 "can normally ignore them. The callback may want to print these numbers in "
2829 "error messages or debugging messages."
2833 #: ../src/guestfs.pod:1390
2834 msgid "PRIVATE DATA AREA"
2838 #: ../src/guestfs.pod:1392
2840 "You can attach named pieces of private data to the libguestfs handle, and "
2841 "fetch them by name for the lifetime of the handle. This is called the "
2842 "private data area and is only available from the C API."
2846 #: ../src/guestfs.pod:1396
2847 msgid "To attach a named piece of data, use the following call:"
2851 #: ../src/guestfs.pod:1398
2854 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
2859 #: ../src/guestfs.pod:1400
2861 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
2862 "pointer (which can be C<NULL>). Any previous item with the same name is "
2867 #: ../src/guestfs.pod:1404
2869 "You can use any C<key> you want, but names beginning with an underscore "
2870 "character are reserved for internal libguestfs purposes (for implementing "
2871 "language bindings). It is recommended to prefix the name with some unique "
2872 "string to avoid collisions with other users."
2876 #: ../src/guestfs.pod:1409
2877 msgid "To retrieve the pointer, use:"
2881 #: ../src/guestfs.pod:1411
2884 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
2889 #: ../src/guestfs.pod:1413
2891 "This function returns C<NULL> if either no data is found associated with "
2892 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
2897 #: ../src/guestfs.pod:1417
2899 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
2900 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
2901 "all. In particular, libguestfs does I<not> try to free the data when the "
2902 "handle is closed. If the data must be freed, then the caller must either "
2903 "free it before calling L</guestfs_close> or must set up a close callback to "
2904 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
2905 "can be registered for a handle)."
2909 #: ../src/guestfs.pod:1425
2911 "The private data area is implemented using a hash table, and should be "
2912 "reasonably efficient for moderate numbers of keys."
2916 #: ../src/guestfs.pod:1428
2917 msgid "BLOCK DEVICE NAMING"
2921 #: ../src/guestfs.pod:1430
2923 "In the kernel there is now quite a profusion of schemata for naming block "
2924 "devices (in this context, by I<block device> I mean a physical or virtual "
2925 "hard drive). The original Linux IDE driver used names starting with C</dev/"
2926 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
2927 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
2928 "for the old IDE driver (particularly for SATA devices) those devices also "
2929 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
2930 "paravirtualized drivers. This has created several different naming systems, "
2931 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
2935 #: ../src/guestfs.pod:1442
2937 "As discussed above, libguestfs uses a qemu appliance running an embedded "
2938 "Linux kernel to access block devices. We can run a variety of appliances "
2939 "based on a variety of Linux kernels."
2943 #: ../src/guestfs.pod:1446
2945 "This causes a problem for libguestfs because many API calls use device or "
2946 "partition names. Working scripts and the recipe (example) scripts that we "
2947 "make available over the internet could fail if the naming scheme changes."
2951 #: ../src/guestfs.pod:1451
2953 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2954 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2955 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2956 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2960 #: ../src/guestfs.pod:1457
2962 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2963 "L</guestfs_list_partitions> and similar calls return the true names of the "
2964 "devices and partitions as known to the appliance."
2968 #: ../src/guestfs.pod:1462
2969 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2973 #: ../src/guestfs.pod:1464
2975 "Usually this translation is transparent. However in some (very rare) cases "
2976 "you may need to know the exact algorithm. Such cases include where you use "
2977 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
2978 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
2982 #: ../src/guestfs.pod:1470
2984 "The algorithm is applied only to I<parameters> which are known to be either "
2985 "device or partition names. Return values from functions such as L</"
2986 "guestfs_list_devices> are never changed."
2990 #: ../src/guestfs.pod:1478
2991 msgid "Is the string a parameter which is a device or partition name?"
2995 #: ../src/guestfs.pod:1482
2996 msgid "Does the string begin with C</dev/sd>?"
3000 #: ../src/guestfs.pod:1486
3002 "Does the named device exist? If so, we use that device. However if I<not> "
3003 "then we continue with this algorithm."
3007 #: ../src/guestfs.pod:1491
3008 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
3012 #: ../src/guestfs.pod:1493
3013 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
3017 #: ../src/guestfs.pod:1495
3018 msgid "If that named device exists, use it. If not, continue."
3022 #: ../src/guestfs.pod:1499
3023 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
3027 #: ../src/guestfs.pod:1501
3028 msgid "If that named device exists, use it. If not, return an error."
3032 #: ../src/guestfs.pod:1505
3033 msgid "PORTABILITY CONCERNS"
3037 #: ../src/guestfs.pod:1507
3039 "Although the standard naming scheme and automatic translation is useful for "
3040 "simple programs and guestfish scripts, for larger programs it is best not to "
3041 "rely on this mechanism."
3045 #: ../src/guestfs.pod:1511
3047 "Where possible for maximum future portability programs using libguestfs "
3048 "should use these future-proof techniques:"
3052 #: ../src/guestfs.pod:1518
3054 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
3055 "device names, and then use those names directly."
3059 #: ../src/guestfs.pod:1521
3061 "Since those device names exist by definition, they will never be translated."
3065 #: ../src/guestfs.pod:1526
3067 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
3068 "filesystem labels."
3072 #: ../src/guestfs.pod:1531
3077 #: ../src/guestfs.pod:1533
3078 msgid "COMMUNICATION PROTOCOL"
3082 #: ../src/guestfs.pod:1535
3084 "Don't rely on using this protocol directly. This section documents how it "
3085 "currently works, but it may change at any time."
3089 #: ../src/guestfs.pod:1538
3091 "The protocol used to talk between the library and the daemon running inside "
3092 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
3093 "1014, RFC 1832, RFC 4506)."
3097 #: ../src/guestfs.pod:1542
3099 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
3100 "this file is automatically generated)."
3104 #: ../src/guestfs.pod:1545
3106 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
3107 "and C<FileOut> parameters, which are handled with very simple request/reply "
3108 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
3109 "parameters, which use the same request and reply messages, but they may also "
3110 "be followed by files sent using a chunked encoding."
3114 #: ../src/guestfs.pod:1552
3115 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
3119 #: ../src/guestfs.pod:1554
3120 msgid "For ordinary functions, the request message is:"
3124 #: ../src/guestfs.pod:1556
3127 " total length (header + arguments,\n"
3128 " but not including the length word itself)\n"
3129 " struct guestfs_message_header (encoded as XDR)\n"
3130 " struct guestfs_<foo>_args (encoded as XDR)\n"
3135 #: ../src/guestfs.pod:1561
3137 "The total length field allows the daemon to allocate a fixed size buffer "
3138 "into which it slurps the rest of the message. As a result, the total length "
3139 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
3140 "effective size of any request is limited to somewhere under this size."
3144 #: ../src/guestfs.pod:1567
3146 "Note also that many functions don't take any arguments, in which case the "
3147 "C<guestfs_I<foo>_args> is completely omitted."
3151 #: ../src/guestfs.pod:1570
3153 "The header contains the procedure number (C<guestfs_proc>) which is how the "
3154 "receiver knows what type of args structure to expect, or none at all."
3158 #: ../src/guestfs.pod:1574
3159 msgid "The reply message for ordinary functions is:"
3163 #: ../src/guestfs.pod:1576
3166 " total length (header + ret,\n"
3167 " but not including the length word itself)\n"
3168 " struct guestfs_message_header (encoded as XDR)\n"
3169 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3174 #: ../src/guestfs.pod:1581
3176 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
3177 "functions that return no formal return values."
3181 #: ../src/guestfs.pod:1584
3183 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
3187 #: ../src/guestfs.pod:1587
3189 "In the case of an error, a flag is set in the header, and the reply message "
3190 "is slightly changed:"
3194 #: ../src/guestfs.pod:1590
3197 " total length (header + error,\n"
3198 " but not including the length word itself)\n"
3199 " struct guestfs_message_header (encoded as XDR)\n"
3200 " struct guestfs_message_error (encoded as XDR)\n"
3205 #: ../src/guestfs.pod:1595
3207 "The C<guestfs_message_error> structure contains the error message as a "
3212 #: ../src/guestfs.pod:1598
3213 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
3217 #: ../src/guestfs.pod:1600
3219 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
3220 "The normal request message is sent (see above). However this is followed by "
3221 "a sequence of file chunks."
3225 #: ../src/guestfs.pod:1604
3228 " total length (header + arguments,\n"
3229 " but not including the length word itself,\n"
3230 " and not including the chunks)\n"
3231 " struct guestfs_message_header (encoded as XDR)\n"
3232 " struct guestfs_<foo>_args (encoded as XDR)\n"
3233 " sequence of chunks for FileIn param #0\n"
3234 " sequence of chunks for FileIn param #1 etc.\n"
3239 #: ../src/guestfs.pod:1612
3240 msgid "The \"sequence of chunks\" is:"
3244 #: ../src/guestfs.pod:1614
3247 " length of chunk (not including length word itself)\n"
3248 " struct guestfs_chunk (encoded as XDR)\n"
3249 " length of chunk\n"
3250 " struct guestfs_chunk (encoded as XDR)\n"
3252 " length of chunk\n"
3253 " struct guestfs_chunk (with data.data_len == 0)\n"
3258 #: ../src/guestfs.pod:1622
3260 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
3261 "is set in the final chunk to indicate either successful completion or early "
3266 #: ../src/guestfs.pod:1626
3268 "At time of writing there are no functions that have more than one FileIn "
3269 "parameter. However this is (theoretically) supported, by sending the "
3270 "sequence of chunks for each FileIn parameter one after another (from left to "
3275 #: ../src/guestfs.pod:1631
3277 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
3278 "transfer. The library does this by sending a chunk with a special flag set "
3279 "to indicate cancellation. When the daemon sees this, it cancels the whole "
3280 "RPC, does I<not> send any reply, and goes back to reading the next request."
3284 #: ../src/guestfs.pod:1637
3286 "The daemon may also cancel. It does this by writing a special word "
3287 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
3288 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
3289 "cancel chunk). The special word is chosen so that even if cancellation "
3290 "happens right at the end of the transfer (after the library has finished "
3291 "writing and has started listening for the reply), the \"spurious\" cancel "
3292 "flag will not be confused with the reply message."
3296 #: ../src/guestfs.pod:1646
3298 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
3299 "limit), and also files where the size is not known in advance (eg. from "
3300 "pipes or sockets). However the chunks are rather small "
3301 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
3302 "to keep much in memory."
3306 #: ../src/guestfs.pod:1652
3307 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
3311 #: ../src/guestfs.pod:1654
3313 "The protocol for FileOut parameters is exactly the same as for FileIn "
3314 "parameters, but with the roles of daemon and library reversed."
3318 #: ../src/guestfs.pod:1657
3321 " total length (header + ret,\n"
3322 " but not including the length word itself,\n"
3323 " and not including the chunks)\n"
3324 " struct guestfs_message_header (encoded as XDR)\n"
3325 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3326 " sequence of chunks for FileOut param #0\n"
3327 " sequence of chunks for FileOut param #1 etc.\n"
3332 #: ../src/guestfs.pod:1665
3333 msgid "INITIAL MESSAGE"
3337 #: ../src/guestfs.pod:1667
3339 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
3340 "which indicates that the guest and daemon is alive. This is what L</"
3341 "guestfs_launch> waits for."
3345 #: ../src/guestfs.pod:1671
3346 msgid "PROGRESS NOTIFICATION MESSAGES"
3350 #: ../src/guestfs.pod:1673
3352 "The daemon may send progress notification messages at any time. These are "
3353 "distinguished by the normal length word being replaced by "
3354 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
3358 #: ../src/guestfs.pod:1677
3360 "The library turns them into progress callbacks (see "
3361 "C<guestfs_set_progress_callback>) if there is a callback registered, or "
3362 "discards them if not."
3366 #: ../src/guestfs.pod:1681
3368 "The daemon self-limits the frequency of progress messages it sends (see "
3369 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
3374 #: ../src/guestfs.pod:1685
3375 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
3379 #: ../src/guestfs.pod:1687
3381 "All high-level libguestfs actions are synchronous. If you want to use "
3382 "libguestfs asynchronously then you must create a thread."
3386 #: ../src/guestfs.pod:1690
3388 "Only use the handle from a single thread. Either use the handle exclusively "
3389 "from one thread, or provide your own mutex so that two threads cannot issue "
3390 "calls on the same handle at the same time."
3394 #: ../src/guestfs.pod:1694
3396 "See the graphical program guestfs-browser for one possible architecture for "
3397 "multithreaded programs using libvirt and libguestfs."
3401 #: ../src/guestfs.pod:1697
3402 msgid "QEMU WRAPPERS"
3406 #: ../src/guestfs.pod:1699
3408 "If you want to compile your own qemu, run qemu from a non-standard location, "
3409 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
3414 #: ../src/guestfs.pod:1703
3416 "There is one important rule to remember: you I<must C<exec qemu>> as the "
3417 "last command in the shell script (so that qemu replaces the shell and "
3418 "becomes the direct child of the libguestfs-using program). If you don't do "
3419 "this, then the qemu process won't be cleaned up correctly."
3423 #: ../src/guestfs.pod:1708
3425 "Here is an example of a wrapper, where I have built my own copy of qemu from "
3430 #: ../src/guestfs.pod:1711
3434 " qemudir=/home/rjones/d/qemu\n"
3435 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
3440 #: ../src/guestfs.pod:1715
3442 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
3443 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
3448 #: ../src/guestfs.pod:1719
3451 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
3456 #: ../src/guestfs.pod:1721
3458 "Note that libguestfs also calls qemu with the -help and -version options in "
3459 "order to determine features."
3463 #: ../src/guestfs.pod:1724
3464 msgid "LIBGUESTFS VERSION NUMBERS"
3468 #: ../src/guestfs.pod:1726
3470 "Since April 2010, libguestfs has started to make separate development and "
3471 "stable releases, along with corresponding branches in our git repository. "
3472 "These separate releases can be identified by version number:"
3476 #: ../src/guestfs.pod:1731
3479 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3480 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3486 " | `-------- sub-version\n"
3488 " `------ always '1' because we don't change the ABI\n"
3493 #: ../src/guestfs.pod:1742
3494 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3498 #: ../src/guestfs.pod:1744
3500 "As time passes we cherry pick fixes from the development branch and backport "
3501 "those into the stable branch, the effect being that the stable branch should "
3502 "get more stable and less buggy over time. So the stable releases are ideal "
3503 "for people who don't need new features but would just like the software to "
3508 #: ../src/guestfs.pod:1750
3509 msgid "Our criteria for backporting changes are:"
3513 #: ../src/guestfs.pod:1756
3515 "Documentation changes which don't affect any code are backported unless the "
3516 "documentation refers to a future feature which is not in stable."
3520 #: ../src/guestfs.pod:1762
3522 "Bug fixes which are not controversial, fix obvious problems, and have been "
3523 "well tested are backported."
3527 #: ../src/guestfs.pod:1767
3529 "Simple rearrangements of code which shouldn't affect how it works get "
3530 "backported. This is so that the code in the two branches doesn't get too "
3531 "far out of step, allowing us to backport future fixes more easily."
3535 #: ../src/guestfs.pod:1773
3537 "We I<don't> backport new features, new APIs, new tools etc, except in one "
3538 "exceptional case: the new feature is required in order to implement an "
3539 "important bug fix."
3543 #: ../src/guestfs.pod:1779
3545 "A new stable branch starts when we think the new features in development are "
3546 "substantial and compelling enough over the current stable branch to warrant "
3547 "it. When that happens we create new stable and development versions 1.N.0 "
3548 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
3549 "stable at this point, but by backporting fixes from development, that branch "
3550 "will stabilize over time."
3554 #: ../src/guestfs.pod:1787 ../fish/guestfish.pod:867
3555 #: ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:330
3556 #: ../tools/virt-rescue.pl:245
3557 msgid "ENVIRONMENT VARIABLES"
3561 #: ../src/guestfs.pod:1791 ../fish/guestfish.pod:893
3562 msgid "LIBGUESTFS_APPEND"
3566 #: ../src/guestfs.pod:1793 ../fish/guestfish.pod:895
3567 msgid "Pass additional options to the guest kernel."
3571 #: ../src/guestfs.pod:1795 ../fish/guestfish.pod:897
3572 msgid "LIBGUESTFS_DEBUG"
3576 #: ../src/guestfs.pod:1797
3578 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
3579 "effect as calling C<guestfs_set_verbose (g, 1)>."
3583 #: ../src/guestfs.pod:1800 ../fish/guestfish.pod:902
3584 msgid "LIBGUESTFS_MEMSIZE"
3588 #: ../src/guestfs.pod:1802 ../fish/guestfish.pod:904
3590 "Set the memory allocated to the qemu process, in megabytes. For example:"
3594 #: ../src/guestfs.pod:1805 ../fish/guestfish.pod:907
3597 " LIBGUESTFS_MEMSIZE=700\n"
3602 #: ../src/guestfs.pod:1807 ../fish/guestfish.pod:909
3603 msgid "LIBGUESTFS_PATH"
3607 #: ../src/guestfs.pod:1809
3609 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
3610 "the discussion of paths in section PATH above."
3614 #: ../src/guestfs.pod:1812 ../fish/guestfish.pod:914
3615 msgid "LIBGUESTFS_QEMU"
3619 #: ../src/guestfs.pod:1814 ../fish/guestfish.pod:916
3621 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
3622 "which was found at compile time by the configure script is used."
3626 #: ../src/guestfs.pod:1818
3627 msgid "See also L</QEMU WRAPPERS> above."
3631 #: ../src/guestfs.pod:1820 ../fish/guestfish.pod:920
3632 msgid "LIBGUESTFS_TRACE"
3636 #: ../src/guestfs.pod:1822
3638 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
3639 "effect as calling C<guestfs_set_trace (g, 1)>."
3643 #: ../src/guestfs.pod:1825 ../fish/guestfish.pod:929
3648 #: ../src/guestfs.pod:1827 ../fish/guestfish.pod:931
3649 msgid "Location of temporary directory, defaults to C</tmp>."
3653 #: ../src/guestfs.pod:1829 ../fish/guestfish.pod:933
3655 "If libguestfs was compiled to use the supermin appliance then the real "
3656 "appliance is cached in this directory, shared between all handles belonging "
3657 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
3658 "use in case C</tmp> is not large enough."
3662 #: ../src/guestfs.pod:1837 ../fish/guestfish.pod:991
3663 #: ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:178
3664 #: ../inspector/virt-inspector.pl:884 ../tools/virt-edit.pl:350
3665 #: ../tools/virt-win-reg.pl:487 ../tools/virt-df.pl:614
3666 #: ../tools/virt-ls.pl:235 ../tools/virt-resize.pl:1486
3667 #: ../tools/virt-list-filesystems.pl:216 ../tools/virt-cat.pl:188
3668 #: ../tools/virt-tar.pl:283 ../tools/virt-rescue.pl:257
3669 #: ../tools/virt-make-fs.pl:534 ../tools/virt-list-partitions.pl:254
3674 #: ../src/guestfs.pod:1839
3676 "L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-df(1)>, L<virt-edit"
3677 "(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-"
3678 "partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-"
3679 "tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, L<febootstrap(1)>, L<hivex(3)>, "
3680 "L<http://libguestfs.org/>."
3684 #: ../src/guestfs.pod:1857
3686 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
3687 "(8)>, L<disktype(1)>."
3691 #: ../src/guestfs.pod:1864 ../tools/virt-win-reg.pl:502
3692 #: ../tools/virt-make-fs.pl:548
3697 #: ../src/guestfs.pod:1866
3698 msgid "To get a list of bugs against libguestfs use this link:"
3702 #: ../src/guestfs.pod:1868
3704 "L<https://bugzilla.redhat.com/buglist.cgi?"
3705 "component=libguestfs&product=Virtualization+Tools>"
3709 #: ../src/guestfs.pod:1870
3710 msgid "To report a new bug against libguestfs use this link:"
3714 #: ../src/guestfs.pod:1872
3716 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
3717 "component=libguestfs&product=Virtualization+Tools>"
3721 #: ../src/guestfs.pod:1874
3722 msgid "When reporting a bug, please check:"
3726 #: ../src/guestfs.pod:1880
3727 msgid "That the bug hasn't been reported already."
3731 #: ../src/guestfs.pod:1884
3732 msgid "That you are testing a recent version."
3736 #: ../src/guestfs.pod:1888
3737 msgid "Describe the bug accurately, and give a way to reproduce it."
3741 #: ../src/guestfs.pod:1892
3743 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
3748 #: ../src/guestfs.pod:1897 ../fish/guestfish.pod:1008
3749 #: ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:189
3750 #: ../inspector/virt-inspector.pl:893
3755 #: ../src/guestfs.pod:1899 ../fish/guestfish.pod:1010
3756 #: ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:191
3757 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
3761 #: ../src/guestfs.pod:1901 ../fish/guestfish.pod:1012
3762 #: ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:193
3763 #: ../inspector/virt-inspector.pl:899 ../tools/virt-edit.pl:366
3764 #: ../tools/virt-win-reg.pl:517 ../tools/virt-df.pl:627
3765 #: ../tools/virt-ls.pl:250 ../tools/virt-resize.pl:1512
3766 #: ../tools/virt-list-filesystems.pl:232 ../tools/virt-cat.pl:202
3767 #: ../tools/virt-tar.pl:298 ../tools/virt-rescue.pl:271
3768 #: ../tools/virt-make-fs.pl:563 ../tools/virt-list-partitions.pl:269
3773 #: ../src/guestfs.pod:1903 ../fish/guestfish.pod:1014
3774 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
3778 #: ../src/guestfs.pod:1906
3780 "This library is free software; you can redistribute it and/or modify it "
3781 "under the terms of the GNU Lesser General Public License as published by the "
3782 "Free Software Foundation; either version 2 of the License, or (at your "
3783 "option) any later version."
3787 #: ../src/guestfs.pod:1911
3789 "This library is distributed in the hope that it will be useful, but WITHOUT "
3790 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
3791 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
3796 #: ../src/guestfs.pod:1916
3798 "You should have received a copy of the GNU Lesser General Public License "
3799 "along with this library; if not, write to the Free Software Foundation, "
3800 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
3804 #: ../src/guestfs-actions.pod:1
3805 msgid "guestfs_add_cdrom"
3809 #: ../src/guestfs-actions.pod:3
3812 " int guestfs_add_cdrom (guestfs_h *g,\n"
3813 "\t\tconst char *filename);\n"
3818 #: ../src/guestfs-actions.pod:6 ../fish/guestfish-actions.pod:5
3819 msgid "This function adds a virtual CD-ROM disk image to the guest."
3823 #: ../src/guestfs-actions.pod:8 ../fish/guestfish-actions.pod:7
3824 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
3828 #: ../src/guestfs-actions.pod:16
3830 "This call checks for the existence of C<filename>. This stops you from "
3831 "specifying other types of drive which are supported by qemu such as C<nbd:> "
3832 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
3837 #: ../src/guestfs-actions.pod:23
3839 "If you just want to add an ISO file (often you use this as an efficient way "
3840 "to transfer large files into the guest), then you should probably use "
3841 "C<guestfs_add_drive_ro> instead."
3845 #: ../src/guestfs-actions.pod:29 ../src/guestfs-actions.pod:54
3846 #: ../src/guestfs-actions.pod:112 ../src/guestfs-actions.pod:144
3847 #: ../src/guestfs-actions.pod:155 ../src/guestfs-actions.pod:173
3848 #: ../src/guestfs-actions.pod:190 ../src/guestfs-actions.pod:201
3849 #: ../src/guestfs-actions.pod:304 ../src/guestfs-actions.pod:321
3850 #: ../src/guestfs-actions.pod:332 ../src/guestfs-actions.pod:368
3851 #: ../src/guestfs-actions.pod:390 ../src/guestfs-actions.pod:405
3852 #: ../src/guestfs-actions.pod:469 ../src/guestfs-actions.pod:496
3853 #: ../src/guestfs-actions.pod:507 ../src/guestfs-actions.pod:519
3854 #: ../src/guestfs-actions.pod:600 ../src/guestfs-actions.pod:615
3855 #: ../src/guestfs-actions.pod:626 ../src/guestfs-actions.pod:637
3856 #: ../src/guestfs-actions.pod:783 ../src/guestfs-actions.pod:800
3857 #: ../src/guestfs-actions.pod:815 ../src/guestfs-actions.pod:890
3858 #: ../src/guestfs-actions.pod:905 ../src/guestfs-actions.pod:921
3859 #: ../src/guestfs-actions.pod:932 ../src/guestfs-actions.pod:949
3860 #: ../src/guestfs-actions.pod:982 ../src/guestfs-actions.pod:1040
3861 #: ../src/guestfs-actions.pod:1068 ../src/guestfs-actions.pod:1090
3862 #: ../src/guestfs-actions.pod:1121 ../src/guestfs-actions.pod:1209
3863 #: ../src/guestfs-actions.pod:1240 ../src/guestfs-actions.pod:1440
3864 #: ../src/guestfs-actions.pod:1459 ../src/guestfs-actions.pod:1540
3865 #: ../src/guestfs-actions.pod:1888 ../src/guestfs-actions.pod:2011
3866 #: ../src/guestfs-actions.pod:2066 ../src/guestfs-actions.pod:2096
3867 #: ../src/guestfs-actions.pod:2505 ../src/guestfs-actions.pod:2517
3868 #: ../src/guestfs-actions.pod:2534 ../src/guestfs-actions.pod:2642
3869 #: ../src/guestfs-actions.pod:2653 ../src/guestfs-actions.pod:2663
3870 #: ../src/guestfs-actions.pod:2674 ../src/guestfs-actions.pod:2686
3871 #: ../src/guestfs-actions.pod:2716 ../src/guestfs-actions.pod:2780
3872 #: ../src/guestfs-actions.pod:2797 ../src/guestfs-actions.pod:2811
3873 #: ../src/guestfs-actions.pod:2831 ../src/guestfs-actions.pod:2851
3874 #: ../src/guestfs-actions.pod:2880 ../src/guestfs-actions.pod:2896
3875 #: ../src/guestfs-actions.pod:2912 ../src/guestfs-actions.pod:2924
3876 #: ../src/guestfs-actions.pod:2933 ../src/guestfs-actions.pod:2966
3877 #: ../src/guestfs-actions.pod:2979 ../src/guestfs-actions.pod:2989
3878 #: ../src/guestfs-actions.pod:3001 ../src/guestfs-actions.pod:3015
3879 #: ../src/guestfs-actions.pod:3095 ../src/guestfs-actions.pod:3112
3880 #: ../src/guestfs-actions.pod:3122 ../src/guestfs-actions.pod:3167
3881 #: ../src/guestfs-actions.pod:3182 ../src/guestfs-actions.pod:3197
3882 #: ../src/guestfs-actions.pod:3210 ../src/guestfs-actions.pod:3221
3883 #: ../src/guestfs-actions.pod:3232 ../src/guestfs-actions.pod:3246
3884 #: ../src/guestfs-actions.pod:3258 ../src/guestfs-actions.pod:3275
3885 #: ../src/guestfs-actions.pod:3306 ../src/guestfs-actions.pod:3334
3886 #: ../src/guestfs-actions.pod:3350 ../src/guestfs-actions.pod:3366
3887 #: ../src/guestfs-actions.pod:3375 ../src/guestfs-actions.pod:3389
3888 #: ../src/guestfs-actions.pod:3399 ../src/guestfs-actions.pod:3411
3889 #: ../src/guestfs-actions.pod:3423 ../src/guestfs-actions.pod:3455
3890 #: ../src/guestfs-actions.pod:3467 ../src/guestfs-actions.pod:3484
3891 #: ../src/guestfs-actions.pod:3495 ../src/guestfs-actions.pod:3509
3892 #: ../src/guestfs-actions.pod:3549 ../src/guestfs-actions.pod:3580
3893 #: ../src/guestfs-actions.pod:3591 ../src/guestfs-actions.pod:3616
3894 #: ../src/guestfs-actions.pod:3630 ../src/guestfs-actions.pod:3645
3895 #: ../src/guestfs-actions.pod:3767 ../src/guestfs-actions.pod:3819
3896 #: ../src/guestfs-actions.pod:3838 ../src/guestfs-actions.pod:3853
3897 #: ../src/guestfs-actions.pod:3879 ../src/guestfs-actions.pod:3936
3898 #: ../src/guestfs-actions.pod:3950 ../src/guestfs-actions.pod:3960
3899 #: ../src/guestfs-actions.pod:3971 ../src/guestfs-actions.pod:4226
3900 #: ../src/guestfs-actions.pod:4242 ../src/guestfs-actions.pod:4253
3901 #: ../src/guestfs-actions.pod:4262 ../src/guestfs-actions.pod:4273
3902 #: ../src/guestfs-actions.pod:4282 ../src/guestfs-actions.pod:4293
3903 #: ../src/guestfs-actions.pod:4306 ../src/guestfs-actions.pod:4324
3904 #: ../src/guestfs-actions.pod:4340 ../src/guestfs-actions.pod:4356
3905 #: ../src/guestfs-actions.pod:4371 ../src/guestfs-actions.pod:4391
3906 #: ../src/guestfs-actions.pod:4406 ../src/guestfs-actions.pod:4422
3907 #: ../src/guestfs-actions.pod:4440 ../src/guestfs-actions.pod:4456
3908 #: ../src/guestfs-actions.pod:4470 ../src/guestfs-actions.pod:4495
3909 #: ../src/guestfs-actions.pod:4516 ../src/guestfs-actions.pod:4532
3910 #: ../src/guestfs-actions.pod:4553 ../src/guestfs-actions.pod:4565
3911 #: ../src/guestfs-actions.pod:4577 ../src/guestfs-actions.pod:4593
3912 #: ../src/guestfs-actions.pod:4627 ../src/guestfs-actions.pod:4647
3913 #: ../src/guestfs-actions.pod:4670 ../src/guestfs-actions.pod:4760
3914 #: ../src/guestfs-actions.pod:4866 ../src/guestfs-actions.pod:4875
3915 #: ../src/guestfs-actions.pod:4885 ../src/guestfs-actions.pod:4895
3916 #: ../src/guestfs-actions.pod:4914 ../src/guestfs-actions.pod:4924
3917 #: ../src/guestfs-actions.pod:4934 ../src/guestfs-actions.pod:4944
3918 #: ../src/guestfs-actions.pod:4956 ../src/guestfs-actions.pod:5006
3919 #: ../src/guestfs-actions.pod:5020 ../src/guestfs-actions.pod:5033
3920 #: ../src/guestfs-actions.pod:5046 ../src/guestfs-actions.pod:5060
3921 #: ../src/guestfs-actions.pod:5070 ../src/guestfs-actions.pod:5087
3922 #: ../src/guestfs-actions.pod:5117 ../src/guestfs-actions.pod:5128
3923 #: ../src/guestfs-actions.pod:5163 ../src/guestfs-actions.pod:5173
3924 #: ../src/guestfs-actions.pod:5188 ../src/guestfs-actions.pod:5214
3925 #: ../src/guestfs-actions.pod:5242 ../src/guestfs-actions.pod:5346
3926 #: ../src/guestfs-actions.pod:5361 ../src/guestfs-actions.pod:5372
3927 #: ../src/guestfs-actions.pod:5418 ../src/guestfs-actions.pod:5428
3928 #: ../src/guestfs-actions.pod:5465 ../src/guestfs-actions.pod:5492
3929 #: ../src/guestfs-actions.pod:5534 ../src/guestfs-actions.pod:5557
3930 #: ../src/guestfs-actions.pod:5614 ../src/guestfs-actions.pod:5630
3931 #: ../src/guestfs-actions.pod:5656
3932 msgid "This function returns 0 on success or -1 on error."
3936 #: ../src/guestfs-actions.pod:31 ../src/guestfs-actions.pod:157
3937 #: ../src/guestfs-actions.pod:175 ../fish/guestfish-actions.pod:28
3938 #: ../fish/guestfish-actions.pod:117 ../fish/guestfish-actions.pod:131
3940 "This function is deprecated. In new code, use the C<add_drive_opts> call "
3945 #: ../src/guestfs-actions.pod:34 ../src/guestfs-actions.pod:160
3946 #: ../src/guestfs-actions.pod:178 ../src/guestfs-actions.pod:1214
3947 #: ../src/guestfs-actions.pod:1649 ../src/guestfs-actions.pod:1667
3948 #: ../src/guestfs-actions.pod:5565 ../src/guestfs-actions.pod:5710
3949 #: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:120
3950 #: ../fish/guestfish-actions.pod:134 ../fish/guestfish-actions.pod:940
3951 #: ../fish/guestfish-actions.pod:1297 ../fish/guestfish-actions.pod:1311
3952 #: ../fish/guestfish-actions.pod:4289 ../fish/guestfish-actions.pod:4386
3954 "Deprecated functions will not be removed from the API, but the fact that "
3955 "they are deprecated indicates that there are problems with correct use of "
3960 #: ../src/guestfs-actions.pod:38
3961 msgid "guestfs_add_drive"
3965 #: ../src/guestfs-actions.pod:40
3968 " int guestfs_add_drive (guestfs_h *g,\n"
3969 "\t\tconst char *filename);\n"
3974 #: ../src/guestfs-actions.pod:43
3976 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
3977 "optional parameters, so the disk is added writable, with the format being "
3978 "detected automatically."
3982 #: ../src/guestfs-actions.pod:47
3984 "Automatic detection of the format opens you up to a potential security hole "
3985 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
3986 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
3987 "you should think about replacing calls to this function with calls to "
3988 "C<guestfs_add_drive_opts>, and specifying the format."
3992 #: ../src/guestfs-actions.pod:56
3993 msgid "guestfs_add_drive_opts"
3997 #: ../src/guestfs-actions.pod:58
4000 " int guestfs_add_drive_opts (guestfs_h *g,\n"
4001 "\t\tconst char *filename,\n"
4007 #: ../src/guestfs-actions.pod:62
4009 "You may supply a list of optional arguments to this call. Use zero or more "
4010 "of the following pairs of parameters, and terminate the list with C<-1> on "
4011 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
4015 #: ../src/guestfs-actions.pod:67
4018 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
4019 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
4020 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
4025 #: ../src/guestfs-actions.pod:71 ../fish/guestfish-actions.pod:56
4027 "This function adds a virtual machine disk image C<filename> to libguestfs. "
4028 "The first time you call this function, the disk appears as C</dev/sda>, the "
4029 "second time as C</dev/sdb>, and so on."
4033 #: ../src/guestfs-actions.pod:76 ../fish/guestfish-actions.pod:61
4035 "You don't necessarily need to be root when using libguestfs. However you "
4036 "obviously do need sufficient permissions to access the filename for whatever "
4037 "operations you want to perform (ie. read access if you just want to read the "
4038 "image or write access if you want to modify the image)."
4042 #: ../src/guestfs-actions.pod:82 ../fish/guestfish-actions.pod:67
4043 msgid "This call checks that C<filename> exists."
4047 #: ../src/guestfs-actions.pod:84 ../fish/guestfish-actions.pod:69
4048 msgid "The optional arguments are:"
4052 #: ../src/guestfs-actions.pod:88 ../fish/guestfish-actions.pod:73
4057 #: ../src/guestfs-actions.pod:90 ../fish/guestfish-actions.pod:75
4059 "If true then the image is treated as read-only. Writes are still allowed, "
4060 "but they are stored in a temporary snapshot overlay which is discarded at "
4061 "the end. The disk that you add is not modified."
4065 #: ../src/guestfs-actions.pod:94 ../fish/guestfish-actions.pod:79
4070 #: ../src/guestfs-actions.pod:96
4072 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
4073 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
4074 "Possible formats include C<raw> and C<qcow2>."
4078 #: ../src/guestfs-actions.pod:100 ../fish/guestfish-actions.pod:85
4080 "Automatic detection of the format opens you up to a potential security hole "
4081 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4082 "RHBZ#642934. Specifying the format closes this security hole."
4086 #: ../src/guestfs-actions.pod:105 ../fish/guestfish-actions.pod:90
4091 #: ../src/guestfs-actions.pod:107
4093 "This rarely-used option lets you emulate the behaviour of the deprecated "
4094 "C<guestfs_add_drive_with_if> call (q.v.)"
4098 #: ../src/guestfs-actions.pod:114
4099 msgid "guestfs_add_drive_opts_va"
4103 #: ../src/guestfs-actions.pod:116
4106 " int guestfs_add_drive_opts_va (guestfs_h *g,\n"
4107 "\t\tconst char *filename,\n"
4108 "\t\tva_list args);\n"
4113 #: ../src/guestfs-actions.pod:120
4114 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
4118 #: ../src/guestfs-actions.pod:122 ../src/guestfs-actions.pod:132
4119 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
4123 #: ../src/guestfs-actions.pod:124
4124 msgid "guestfs_add_drive_opts_argv"
4128 #: ../src/guestfs-actions.pod:126
4131 " int guestfs_add_drive_opts_argv (guestfs_h *g,\n"
4132 "\t\tconst char *filename,\n"
4133 "\t\tconst struct guestfs_add_drive_opts_argv *optargs);\n"
4138 #: ../src/guestfs-actions.pod:130
4139 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
4143 #: ../src/guestfs-actions.pod:134
4144 msgid "guestfs_add_drive_ro"
4148 #: ../src/guestfs-actions.pod:136
4151 " int guestfs_add_drive_ro (guestfs_h *g,\n"
4152 "\t\tconst char *filename);\n"
4157 #: ../src/guestfs-actions.pod:139
4159 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
4160 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
4161 "disk is added read-only, with the format being detected automatically."
4165 #: ../src/guestfs-actions.pod:146
4166 msgid "guestfs_add_drive_ro_with_if"
4170 #: ../src/guestfs-actions.pod:148
4173 " int guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
4174 "\t\tconst char *filename,\n"
4175 "\t\tconst char *iface);\n"
4180 #: ../src/guestfs-actions.pod:152
4182 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
4183 "QEMU interface emulation to use at run time."
4187 #: ../src/guestfs-actions.pod:164
4188 msgid "guestfs_add_drive_with_if"
4192 #: ../src/guestfs-actions.pod:166
4195 " int guestfs_add_drive_with_if (guestfs_h *g,\n"
4196 "\t\tconst char *filename,\n"
4197 "\t\tconst char *iface);\n"
4202 #: ../src/guestfs-actions.pod:170
4204 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
4205 "QEMU interface emulation to use at run time."
4209 #: ../src/guestfs-actions.pod:182
4210 msgid "guestfs_aug_clear"
4214 #: ../src/guestfs-actions.pod:184
4217 " int guestfs_aug_clear (guestfs_h *g,\n"
4218 "\t\tconst char *augpath);\n"
4223 #: ../src/guestfs-actions.pod:187 ../fish/guestfish-actions.pod:142
4225 "Set the value associated with C<path> to C<NULL>. This is the same as the "
4226 "L<augtool(1)> C<clear> command."
4230 #: ../src/guestfs-actions.pod:192
4231 msgid "guestfs_aug_close"
4235 #: ../src/guestfs-actions.pod:194
4238 " int guestfs_aug_close (guestfs_h *g);\n"
4243 #: ../src/guestfs-actions.pod:196
4245 "Close the current Augeas handle and free up any resources used by it. After "
4246 "calling this, you have to call C<guestfs_aug_init> again before you can use "
4247 "any other Augeas functions."
4251 #: ../src/guestfs-actions.pod:203
4252 msgid "guestfs_aug_defnode"
4256 #: ../src/guestfs-actions.pod:205
4259 " struct guestfs_int_bool *guestfs_aug_defnode (guestfs_h *g,\n"
4260 "\t\tconst char *name,\n"
4261 "\t\tconst char *expr,\n"
4262 "\t\tconst char *val);\n"
4267 #: ../src/guestfs-actions.pod:210 ../fish/guestfish-actions.pod:158
4269 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
4273 #: ../src/guestfs-actions.pod:213
4275 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
4276 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
4277 "containing that single node."
4281 #: ../src/guestfs-actions.pod:217 ../fish/guestfish-actions.pod:165
4283 "On success this returns a pair containing the number of nodes in the "
4284 "nodeset, and a boolean flag if a node was created."
4288 #: ../src/guestfs-actions.pod:221
4290 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
4291 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
4295 #: ../src/guestfs-actions.pod:225
4296 msgid "guestfs_aug_defvar"
4300 #: ../src/guestfs-actions.pod:227
4303 " int guestfs_aug_defvar (guestfs_h *g,\n"
4304 "\t\tconst char *name,\n"
4305 "\t\tconst char *expr);\n"
4310 #: ../src/guestfs-actions.pod:231 ../fish/guestfish-actions.pod:173
4312 "Defines an Augeas variable C<name> whose value is the result of evaluating "
4313 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
4317 #: ../src/guestfs-actions.pod:235 ../fish/guestfish-actions.pod:177
4319 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
4320 "evaluates to something which is not a nodeset."
4324 #: ../src/guestfs-actions.pod:238 ../src/guestfs-actions.pod:379
4325 #: ../src/guestfs-actions.pod:533 ../src/guestfs-actions.pod:558
4326 #: ../src/guestfs-actions.pod:573 ../src/guestfs-actions.pod:589
4327 #: ../src/guestfs-actions.pod:1107 ../src/guestfs-actions.pod:1422
4328 #: ../src/guestfs-actions.pod:1604 ../src/guestfs-actions.pod:1685
4329 #: ../src/guestfs-actions.pod:1716 ../src/guestfs-actions.pod:1759
4330 #: ../src/guestfs-actions.pod:1776 ../src/guestfs-actions.pod:2001
4331 #: ../src/guestfs-actions.pod:2213 ../src/guestfs-actions.pod:2231
4332 #: ../src/guestfs-actions.pod:3569 ../src/guestfs-actions.pod:3676
4333 #: ../src/guestfs-actions.pod:4030 ../src/guestfs-actions.pod:4053
4334 #: ../src/guestfs-actions.pod:5152 ../src/guestfs-actions.pod:5502
4335 #: ../src/guestfs-actions.pod:5512 ../src/guestfs-actions.pod:5522
4336 msgid "On error this function returns -1."
4340 #: ../src/guestfs-actions.pod:240
4341 msgid "guestfs_aug_get"
4345 #: ../src/guestfs-actions.pod:242
4348 " char *guestfs_aug_get (guestfs_h *g,\n"
4349 "\t\tconst char *augpath);\n"
4354 #: ../src/guestfs-actions.pod:245 ../fish/guestfish-actions.pod:184
4356 "Look up the value associated with C<path>. If C<path> matches exactly one "
4357 "node, the C<value> is returned."
4361 #: ../src/guestfs-actions.pod:248 ../src/guestfs-actions.pod:676
4362 #: ../src/guestfs-actions.pod:691 ../src/guestfs-actions.pod:748
4363 #: ../src/guestfs-actions.pod:761 ../src/guestfs-actions.pod:852
4364 #: ../src/guestfs-actions.pod:965 ../src/guestfs-actions.pod:994
4365 #: ../src/guestfs-actions.pod:1008 ../src/guestfs-actions.pod:1024
4366 #: ../src/guestfs-actions.pod:1135 ../src/guestfs-actions.pod:1299
4367 #: ../src/guestfs-actions.pod:1408 ../src/guestfs-actions.pod:1553
4368 #: ../src/guestfs-actions.pod:1567 ../src/guestfs-actions.pod:1643
4369 #: ../src/guestfs-actions.pod:1661 ../src/guestfs-actions.pod:1795
4370 #: ../src/guestfs-actions.pod:1934 ../src/guestfs-actions.pod:2115
4371 #: ../src/guestfs-actions.pod:2165 ../src/guestfs-actions.pod:2281
4372 #: ../src/guestfs-actions.pod:2316 ../src/guestfs-actions.pod:2631
4373 #: ../src/guestfs-actions.pod:3052 ../src/guestfs-actions.pod:3148
4374 #: ../src/guestfs-actions.pod:3691 ../src/guestfs-actions.pod:3867
4375 #: ../src/guestfs-actions.pod:4008 ../src/guestfs-actions.pod:4169
4376 #: ../src/guestfs-actions.pod:4212 ../src/guestfs-actions.pod:4688
4377 #: ../src/guestfs-actions.pod:4701 ../src/guestfs-actions.pod:4715
4378 #: ../src/guestfs-actions.pod:4736 ../src/guestfs-actions.pod:5295
4379 #: ../src/guestfs-actions.pod:5311 ../src/guestfs-actions.pod:5326
4380 #: ../src/guestfs-actions.pod:5474 ../src/guestfs-actions.pod:5704
4382 "This function returns a string, or NULL on error. I<The caller must free "
4383 "the returned string after use>."
4387 #: ../src/guestfs-actions.pod:251
4388 msgid "guestfs_aug_init"
4392 #: ../src/guestfs-actions.pod:253
4395 " int guestfs_aug_init (guestfs_h *g,\n"
4396 "\t\tconst char *root,\n"
4402 #: ../src/guestfs-actions.pod:257 ../fish/guestfish-actions.pod:191
4404 "Create a new Augeas handle for editing configuration files. If there was "
4405 "any previous Augeas handle associated with this guestfs session, then it is "
4410 #: ../src/guestfs-actions.pod:261
4411 msgid "You must call this before using any other C<guestfs_aug_*> commands."
4415 #: ../src/guestfs-actions.pod:264 ../fish/guestfish-actions.pod:198
4417 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
4421 #: ../src/guestfs-actions.pod:267 ../fish/guestfish-actions.pod:201
4423 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
4424 "logical I<or> of the following integers:"
4428 #: ../src/guestfs-actions.pod:273 ../fish/guestfish-actions.pod:207
4429 msgid "C<AUG_SAVE_BACKUP> = 1"
4433 #: ../src/guestfs-actions.pod:275 ../fish/guestfish-actions.pod:209
4434 msgid "Keep the original file with a C<.augsave> extension."
4438 #: ../src/guestfs-actions.pod:277 ../fish/guestfish-actions.pod:211
4439 msgid "C<AUG_SAVE_NEWFILE> = 2"
4443 #: ../src/guestfs-actions.pod:279 ../fish/guestfish-actions.pod:213
4445 "Save changes into a file with extension C<.augnew>, and do not overwrite "
4446 "original. Overrides C<AUG_SAVE_BACKUP>."
4450 #: ../src/guestfs-actions.pod:282 ../fish/guestfish-actions.pod:216
4451 msgid "C<AUG_TYPE_CHECK> = 4"
4455 #: ../src/guestfs-actions.pod:284 ../fish/guestfish-actions.pod:218
4456 msgid "Typecheck lenses (can be expensive)."
4460 #: ../src/guestfs-actions.pod:286 ../fish/guestfish-actions.pod:220
4461 msgid "C<AUG_NO_STDINC> = 8"
4465 #: ../src/guestfs-actions.pod:288 ../fish/guestfish-actions.pod:222
4466 msgid "Do not use standard load path for modules."
4470 #: ../src/guestfs-actions.pod:290 ../fish/guestfish-actions.pod:224
4471 msgid "C<AUG_SAVE_NOOP> = 16"
4475 #: ../src/guestfs-actions.pod:292 ../fish/guestfish-actions.pod:226
4476 msgid "Make save a no-op, just record what would have been changed."
4480 #: ../src/guestfs-actions.pod:294 ../fish/guestfish-actions.pod:228
4481 msgid "C<AUG_NO_LOAD> = 32"
4485 #: ../src/guestfs-actions.pod:296
4486 msgid "Do not load the tree in C<guestfs_aug_init>."
4490 #: ../src/guestfs-actions.pod:300
4491 msgid "To close the handle, you can call C<guestfs_aug_close>."
4495 #: ../src/guestfs-actions.pod:302 ../fish/guestfish-actions.pod:236
4496 msgid "To find out more about Augeas, see L<http://augeas.net/>."
4500 #: ../src/guestfs-actions.pod:306
4501 msgid "guestfs_aug_insert"
4505 #: ../src/guestfs-actions.pod:308
4508 " int guestfs_aug_insert (guestfs_h *g,\n"
4509 "\t\tconst char *augpath,\n"
4510 "\t\tconst char *label,\n"
4511 "\t\tint before);\n"
4516 #: ../src/guestfs-actions.pod:313 ../fish/guestfish-actions.pod:242
4518 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
4519 "or after C<path> (depending on the boolean flag C<before>)."
4523 #: ../src/guestfs-actions.pod:317 ../fish/guestfish-actions.pod:246
4525 "C<path> must match exactly one existing node in the tree, and C<label> must "
4526 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
4530 #: ../src/guestfs-actions.pod:323
4531 msgid "guestfs_aug_load"
4535 #: ../src/guestfs-actions.pod:325
4538 " int guestfs_aug_load (guestfs_h *g);\n"
4543 #: ../src/guestfs-actions.pod:327 ../fish/guestfish-actions.pod:254
4544 msgid "Load files into the tree."
4548 #: ../src/guestfs-actions.pod:329 ../fish/guestfish-actions.pod:256
4549 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
4553 #: ../src/guestfs-actions.pod:334
4554 msgid "guestfs_aug_ls"
4558 #: ../src/guestfs-actions.pod:336
4561 " char **guestfs_aug_ls (guestfs_h *g,\n"
4562 "\t\tconst char *augpath);\n"
4567 #: ../src/guestfs-actions.pod:339
4569 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
4570 "sorting the resulting nodes into alphabetical order."
4574 #: ../src/guestfs-actions.pod:342 ../src/guestfs-actions.pod:355
4575 #: ../src/guestfs-actions.pod:483 ../src/guestfs-actions.pod:868
4576 #: ../src/guestfs-actions.pod:1147 ../src/guestfs-actions.pod:1163
4577 #: ../src/guestfs-actions.pod:1251 ../src/guestfs-actions.pod:1267
4578 #: ../src/guestfs-actions.pod:1498 ../src/guestfs-actions.pod:1832
4579 #: ../src/guestfs-actions.pod:1845 ../src/guestfs-actions.pod:1861
4580 #: ../src/guestfs-actions.pod:1898 ../src/guestfs-actions.pod:1919
4581 #: ../src/guestfs-actions.pod:1981 ../src/guestfs-actions.pod:2021
4582 #: ../src/guestfs-actions.pod:2187 ../src/guestfs-actions.pod:2355
4583 #: ../src/guestfs-actions.pod:2560 ../src/guestfs-actions.pod:2616
4584 #: ../src/guestfs-actions.pod:2700 ../src/guestfs-actions.pod:3029
4585 #: ../src/guestfs-actions.pod:3536 ../src/guestfs-actions.pod:3985
4586 #: ../src/guestfs-actions.pod:4094 ../src/guestfs-actions.pod:4200
4587 #: ../src/guestfs-actions.pod:4749 ../src/guestfs-actions.pod:4798
4588 #: ../src/guestfs-actions.pod:4850 ../src/guestfs-actions.pod:4966
4589 #: ../src/guestfs-actions.pod:4987 ../src/guestfs-actions.pod:5387
4590 #: ../src/guestfs-actions.pod:5404 ../src/guestfs-actions.pod:5442
4591 #: ../src/guestfs-actions.pod:5578 ../src/guestfs-actions.pod:5594
4592 #: ../src/guestfs-actions.pod:5667 ../src/guestfs-actions.pod:5683
4593 #: ../src/guestfs-actions.pod:5723 ../src/guestfs-actions.pod:5739
4595 "This function returns a NULL-terminated array of strings (like L<environ(3)"
4596 ">), or NULL if there was an error. I<The caller must free the strings and "
4597 "the array after use>."
4601 #: ../src/guestfs-actions.pod:346
4602 msgid "guestfs_aug_match"
4606 #: ../src/guestfs-actions.pod:348
4609 " char **guestfs_aug_match (guestfs_h *g,\n"
4610 "\t\tconst char *augpath);\n"
4615 #: ../src/guestfs-actions.pod:351 ../fish/guestfish-actions.pod:270
4617 "Returns a list of paths which match the path expression C<path>. The "
4618 "returned paths are sufficiently qualified so that they match exactly one "
4619 "node in the current tree."
4623 #: ../src/guestfs-actions.pod:359
4624 msgid "guestfs_aug_mv"
4628 #: ../src/guestfs-actions.pod:361
4631 " int guestfs_aug_mv (guestfs_h *g,\n"
4632 "\t\tconst char *src,\n"
4633 "\t\tconst char *dest);\n"
4638 #: ../src/guestfs-actions.pod:365 ../fish/guestfish-actions.pod:278
4640 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
4641 "C<dest> is overwritten if it exists."
4645 #: ../src/guestfs-actions.pod:370
4646 msgid "guestfs_aug_rm"
4650 #: ../src/guestfs-actions.pod:372
4653 " int guestfs_aug_rm (guestfs_h *g,\n"
4654 "\t\tconst char *augpath);\n"
4659 #: ../src/guestfs-actions.pod:375 ../fish/guestfish-actions.pod:285
4660 msgid "Remove C<path> and all of its children."
4664 #: ../src/guestfs-actions.pod:377 ../fish/guestfish-actions.pod:287
4665 msgid "On success this returns the number of entries which were removed."
4669 #: ../src/guestfs-actions.pod:381
4670 msgid "guestfs_aug_save"
4674 #: ../src/guestfs-actions.pod:383
4677 " int guestfs_aug_save (guestfs_h *g);\n"
4682 #: ../src/guestfs-actions.pod:385 ../fish/guestfish-actions.pod:293
4683 msgid "This writes all pending changes to disk."
4687 #: ../src/guestfs-actions.pod:387
4689 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
4694 #: ../src/guestfs-actions.pod:392
4695 msgid "guestfs_aug_set"
4699 #: ../src/guestfs-actions.pod:394
4702 " int guestfs_aug_set (guestfs_h *g,\n"
4703 "\t\tconst char *augpath,\n"
4704 "\t\tconst char *val);\n"
4709 #: ../src/guestfs-actions.pod:398 ../fish/guestfish-actions.pod:302
4710 msgid "Set the value associated with C<path> to C<val>."
4714 #: ../src/guestfs-actions.pod:400
4716 "In the Augeas API, it is possible to clear a node by setting the value to "
4717 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
4718 "this call. Instead you must use the C<guestfs_aug_clear> call."
4722 #: ../src/guestfs-actions.pod:407
4723 msgid "guestfs_available"
4727 #: ../src/guestfs-actions.pod:409
4730 " int guestfs_available (guestfs_h *g,\n"
4731 "\t\tchar *const *groups);\n"
4736 #: ../src/guestfs-actions.pod:412 ../fish/guestfish-actions.pod:313
4738 "This command is used to check the availability of some groups of "
4739 "functionality in the appliance, which not all builds of the libguestfs "
4740 "appliance will be able to provide."
4744 #: ../src/guestfs-actions.pod:416
4746 "The libguestfs groups, and the functions that those groups correspond to, "
4747 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
4748 "runtime by calling C<guestfs_available_all_groups>."
4752 #: ../src/guestfs-actions.pod:421 ../fish/guestfish-actions.pod:322
4754 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
4755 "\"]> would check for the availability of the Linux inotify functions and "
4756 "Augeas (configuration file editing) functions."
4760 #: ../src/guestfs-actions.pod:426 ../fish/guestfish-actions.pod:327
4761 msgid "The command returns no error if I<all> requested groups are available."
4765 #: ../src/guestfs-actions.pod:428 ../fish/guestfish-actions.pod:329
4767 "It fails with an error if one or more of the requested groups is unavailable "
4772 #: ../src/guestfs-actions.pod:431 ../fish/guestfish-actions.pod:332
4774 "If an unknown group name is included in the list of groups then an error is "
4779 #: ../src/guestfs-actions.pod:434 ../fish/guestfish-actions.pod:335
4784 #: ../src/guestfs-actions.pod:440
4785 msgid "You must call C<guestfs_launch> before calling this function."
4789 #: ../src/guestfs-actions.pod:442 ../fish/guestfish-actions.pod:343
4791 "The reason is because we don't know what groups are supported by the "
4792 "appliance/daemon until it is running and can be queried."
4796 #: ../src/guestfs-actions.pod:448 ../fish/guestfish-actions.pod:349
4798 "If a group of functions is available, this does not necessarily mean that "
4799 "they will work. You still have to check for errors when calling individual "
4800 "API functions even if they are available."
4804 #: ../src/guestfs-actions.pod:455 ../fish/guestfish-actions.pod:356
4806 "It is usually the job of distro packagers to build complete functionality "
4807 "into the libguestfs appliance. Upstream libguestfs, if built from source "
4808 "with all requirements satisfied, will support everything."
4812 #: ../src/guestfs-actions.pod:462
4814 "This call was added in version C<1.0.80>. In previous versions of "
4815 "libguestfs all you could do would be to speculatively execute a command to "
4816 "find out if the daemon implemented it. See also C<guestfs_version>."
4820 #: ../src/guestfs-actions.pod:471
4821 msgid "guestfs_available_all_groups"
4825 #: ../src/guestfs-actions.pod:473
4828 " char **guestfs_available_all_groups (guestfs_h *g);\n"
4833 #: ../src/guestfs-actions.pod:475
4835 "This command returns a list of all optional groups that this daemon knows "
4836 "about. Note this returns both supported and unsupported groups. To find "
4837 "out which ones the daemon can actually support you have to call "
4838 "C<guestfs_available> on each member of the returned list."
4842 #: ../src/guestfs-actions.pod:481
4843 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
4847 #: ../src/guestfs-actions.pod:487
4848 msgid "guestfs_base64_in"
4852 #: ../src/guestfs-actions.pod:489
4855 " int guestfs_base64_in (guestfs_h *g,\n"
4856 "\t\tconst char *base64file,\n"
4857 "\t\tconst char *filename);\n"
4862 #: ../src/guestfs-actions.pod:493 ../fish/guestfish-actions.pod:386
4864 "This command uploads base64-encoded data from C<base64file> to C<filename>."
4868 #: ../src/guestfs-actions.pod:498
4869 msgid "guestfs_base64_out"
4873 #: ../src/guestfs-actions.pod:500
4876 " int guestfs_base64_out (guestfs_h *g,\n"
4877 "\t\tconst char *filename,\n"
4878 "\t\tconst char *base64file);\n"
4883 #: ../src/guestfs-actions.pod:504 ../fish/guestfish-actions.pod:395
4885 "This command downloads the contents of C<filename>, writing it out to local "
4886 "file C<base64file> encoded as base64."
4890 #: ../src/guestfs-actions.pod:509
4891 msgid "guestfs_blockdev_flushbufs"
4895 #: ../src/guestfs-actions.pod:511
4898 " int guestfs_blockdev_flushbufs (guestfs_h *g,\n"
4899 "\t\tconst char *device);\n"
4904 #: ../src/guestfs-actions.pod:514 ../fish/guestfish-actions.pod:404
4906 "This tells the kernel to flush internal buffers associated with C<device>."
4910 #: ../src/guestfs-actions.pod:517 ../src/guestfs-actions.pod:531
4911 #: ../src/guestfs-actions.pod:543 ../src/guestfs-actions.pod:556
4912 #: ../src/guestfs-actions.pod:571 ../src/guestfs-actions.pod:587
4913 #: ../src/guestfs-actions.pod:598 ../src/guestfs-actions.pod:613
4914 #: ../src/guestfs-actions.pod:624 ../src/guestfs-actions.pod:635
4915 #: ../fish/guestfish-actions.pod:407 ../fish/guestfish-actions.pod:418
4916 #: ../fish/guestfish-actions.pod:427 ../fish/guestfish-actions.pod:437
4917 #: ../fish/guestfish-actions.pod:449 ../fish/guestfish-actions.pod:462
4918 #: ../fish/guestfish-actions.pod:470 ../fish/guestfish-actions.pod:481
4919 #: ../fish/guestfish-actions.pod:489 ../fish/guestfish-actions.pod:497
4920 msgid "This uses the L<blockdev(8)> command."
4924 #: ../src/guestfs-actions.pod:521
4925 msgid "guestfs_blockdev_getbsz"
4929 #: ../src/guestfs-actions.pod:523
4932 " int guestfs_blockdev_getbsz (guestfs_h *g,\n"
4933 "\t\tconst char *device);\n"
4938 #: ../src/guestfs-actions.pod:526 ../fish/guestfish-actions.pod:413
4939 msgid "This returns the block size of a device."
4943 #: ../src/guestfs-actions.pod:528 ../src/guestfs-actions.pod:610
4944 #: ../fish/guestfish-actions.pod:415 ../fish/guestfish-actions.pod:478
4946 "(Note this is different from both I<size in blocks> and I<filesystem block "
4951 #: ../src/guestfs-actions.pod:535
4952 msgid "guestfs_blockdev_getro"
4956 #: ../src/guestfs-actions.pod:537
4959 " int guestfs_blockdev_getro (guestfs_h *g,\n"
4960 "\t\tconst char *device);\n"
4965 #: ../src/guestfs-actions.pod:540 ../fish/guestfish-actions.pod:424
4967 "Returns a boolean indicating if the block device is read-only (true if read-"
4968 "only, false if not)."
4972 #: ../src/guestfs-actions.pod:545 ../src/guestfs-actions.pod:1181
4973 #: ../src/guestfs-actions.pod:1193 ../src/guestfs-actions.pod:1625
4974 #: ../src/guestfs-actions.pod:1633 ../src/guestfs-actions.pod:1693
4975 #: ../src/guestfs-actions.pod:1736 ../src/guestfs-actions.pod:1748
4976 #: ../src/guestfs-actions.pod:1767 ../src/guestfs-actions.pod:1784
4977 #: ../src/guestfs-actions.pod:2369 ../src/guestfs-actions.pod:2380
4978 #: ../src/guestfs-actions.pod:2392 ../src/guestfs-actions.pod:2403
4979 #: ../src/guestfs-actions.pod:2416 ../src/guestfs-actions.pod:2428
4980 #: ../src/guestfs-actions.pod:2441 ../src/guestfs-actions.pod:2452
4981 #: ../src/guestfs-actions.pod:2462 ../src/guestfs-actions.pod:2473
4982 #: ../src/guestfs-actions.pod:2485 ../src/guestfs-actions.pod:2497
4983 #: ../src/guestfs-actions.pod:3661
4984 msgid "This function returns a C truth value on success or -1 on error."
4988 #: ../src/guestfs-actions.pod:547
4989 msgid "guestfs_blockdev_getsize64"
4993 #: ../src/guestfs-actions.pod:549
4996 " int64_t guestfs_blockdev_getsize64 (guestfs_h *g,\n"
4997 "\t\tconst char *device);\n"
5002 #: ../src/guestfs-actions.pod:552 ../fish/guestfish-actions.pod:433
5003 msgid "This returns the size of the device in bytes."
5007 #: ../src/guestfs-actions.pod:554
5008 msgid "See also C<guestfs_blockdev_getsz>."
5012 #: ../src/guestfs-actions.pod:560
5013 msgid "guestfs_blockdev_getss"
5017 #: ../src/guestfs-actions.pod:562
5020 " int guestfs_blockdev_getss (guestfs_h *g,\n"
5021 "\t\tconst char *device);\n"
5026 #: ../src/guestfs-actions.pod:565 ../fish/guestfish-actions.pod:443
5028 "This returns the size of sectors on a block device. Usually 512, but can be "
5029 "larger for modern devices."
5033 #: ../src/guestfs-actions.pod:568
5035 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
5040 #: ../src/guestfs-actions.pod:575
5041 msgid "guestfs_blockdev_getsz"
5045 #: ../src/guestfs-actions.pod:577
5048 " int64_t guestfs_blockdev_getsz (guestfs_h *g,\n"
5049 "\t\tconst char *device);\n"
5054 #: ../src/guestfs-actions.pod:580 ../fish/guestfish-actions.pod:455
5056 "This returns the size of the device in units of 512-byte sectors (even if "
5057 "the sectorsize isn't 512 bytes ... weird)."
5061 #: ../src/guestfs-actions.pod:583
5063 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
5064 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
5068 #: ../src/guestfs-actions.pod:591
5069 msgid "guestfs_blockdev_rereadpt"
5073 #: ../src/guestfs-actions.pod:593
5076 " int guestfs_blockdev_rereadpt (guestfs_h *g,\n"
5077 "\t\tconst char *device);\n"
5082 #: ../src/guestfs-actions.pod:596 ../fish/guestfish-actions.pod:468
5083 msgid "Reread the partition table on C<device>."
5087 #: ../src/guestfs-actions.pod:602
5088 msgid "guestfs_blockdev_setbsz"
5092 #: ../src/guestfs-actions.pod:604
5095 " int guestfs_blockdev_setbsz (guestfs_h *g,\n"
5096 "\t\tconst char *device,\n"
5097 "\t\tint blocksize);\n"
5102 #: ../src/guestfs-actions.pod:608 ../fish/guestfish-actions.pod:476
5103 msgid "This sets the block size of a device."
5107 #: ../src/guestfs-actions.pod:617
5108 msgid "guestfs_blockdev_setro"
5112 #: ../src/guestfs-actions.pod:619
5115 " int guestfs_blockdev_setro (guestfs_h *g,\n"
5116 "\t\tconst char *device);\n"
5121 #: ../src/guestfs-actions.pod:622 ../fish/guestfish-actions.pod:487
5122 msgid "Sets the block device named C<device> to read-only."
5126 #: ../src/guestfs-actions.pod:628
5127 msgid "guestfs_blockdev_setrw"
5131 #: ../src/guestfs-actions.pod:630
5134 " int guestfs_blockdev_setrw (guestfs_h *g,\n"
5135 "\t\tconst char *device);\n"
5140 #: ../src/guestfs-actions.pod:633 ../fish/guestfish-actions.pod:495
5141 msgid "Sets the block device named C<device> to read-write."
5145 #: ../src/guestfs-actions.pod:639
5146 msgid "guestfs_case_sensitive_path"
5150 #: ../src/guestfs-actions.pod:641
5153 " char *guestfs_case_sensitive_path (guestfs_h *g,\n"
5154 "\t\tconst char *path);\n"
5159 #: ../src/guestfs-actions.pod:644 ../fish/guestfish-actions.pod:503
5161 "This can be used to resolve case insensitive paths on a filesystem which is "
5162 "case sensitive. The use case is to resolve paths which you have read from "
5163 "Windows configuration files or the Windows Registry, to the true path."
5167 #: ../src/guestfs-actions.pod:649 ../fish/guestfish-actions.pod:508
5169 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
5170 "(and probably others), which is that although the underlying filesystem is "
5171 "case-insensitive, the driver exports the filesystem to Linux as case-"
5176 #: ../src/guestfs-actions.pod:654 ../fish/guestfish-actions.pod:513
5178 "One consequence of this is that special directories such as C<c:\\windows> "
5179 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
5180 "precise details of how they were created. In Windows itself this would not "
5185 #: ../src/guestfs-actions.pod:660 ../fish/guestfish-actions.pod:519
5187 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
5192 #: ../src/guestfs-actions.pod:663 ../fish/guestfish-actions.pod:522
5194 "This function resolves the true case of each element in the path and returns "
5195 "the case-sensitive path."
5199 #: ../src/guestfs-actions.pod:666
5201 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
5202 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
5203 "how the directories were originally created under Windows)."
5207 #: ../src/guestfs-actions.pod:671 ../fish/guestfish-actions.pod:530
5208 msgid "I<Note>: This function does not handle drive names, backslashes etc."
5212 #: ../src/guestfs-actions.pod:674
5213 msgid "See also C<guestfs_realpath>."
5217 #: ../src/guestfs-actions.pod:679
5222 #: ../src/guestfs-actions.pod:681
5225 " char *guestfs_cat (guestfs_h *g,\n"
5226 "\t\tconst char *path);\n"
5231 #: ../src/guestfs-actions.pod:684 ../src/guestfs-actions.pod:4084
5232 #: ../fish/guestfish-actions.pod:539 ../fish/guestfish-actions.pod:3133
5233 msgid "Return the contents of the file named C<path>."
5237 #: ../src/guestfs-actions.pod:686
5239 "Note that this function cannot correctly handle binary files (specifically, "
5240 "files containing C<\\0> character which is treated as end of string). For "
5241 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
5242 "functions which have a more complex interface."
5246 #: ../src/guestfs-actions.pod:694 ../src/guestfs-actions.pod:855
5247 #: ../src/guestfs-actions.pod:872 ../src/guestfs-actions.pod:1151
5248 #: ../src/guestfs-actions.pod:1167 ../src/guestfs-actions.pod:1255
5249 #: ../src/guestfs-actions.pod:1271 ../src/guestfs-actions.pod:1502
5250 #: ../src/guestfs-actions.pod:1849 ../src/guestfs-actions.pod:1865
5251 #: ../src/guestfs-actions.pod:1902 ../src/guestfs-actions.pod:1923
5252 #: ../src/guestfs-actions.pod:1937 ../src/guestfs-actions.pod:1963
5253 #: ../src/guestfs-actions.pod:3901 ../src/guestfs-actions.pod:3924
5254 #: ../src/guestfs-actions.pod:4032 ../src/guestfs-actions.pod:4055
5255 #: ../src/guestfs-actions.pod:4076 ../src/guestfs-actions.pod:4802
5256 #: ../src/guestfs-actions.pod:4854 ../src/guestfs-actions.pod:4970
5257 #: ../src/guestfs-actions.pod:4991 ../src/guestfs-actions.pod:5536
5258 #: ../src/guestfs-actions.pod:5559 ../src/guestfs-actions.pod:5582
5259 #: ../src/guestfs-actions.pod:5598 ../src/guestfs-actions.pod:5671
5260 #: ../src/guestfs-actions.pod:5687 ../src/guestfs-actions.pod:5727
5261 #: ../src/guestfs-actions.pod:5743 ../fish/guestfish-actions.pod:546
5262 #: ../fish/guestfish-actions.pod:681 ../fish/guestfish-actions.pod:693
5263 #: ../fish/guestfish-actions.pod:894 ../fish/guestfish-actions.pod:904
5264 #: ../fish/guestfish-actions.pod:971 ../fish/guestfish-actions.pod:981
5265 #: ../fish/guestfish-actions.pod:1176 ../fish/guestfish-actions.pod:1451
5266 #: ../fish/guestfish-actions.pod:1461 ../fish/guestfish-actions.pod:1489
5267 #: ../fish/guestfish-actions.pod:1504 ../fish/guestfish-actions.pod:1514
5268 #: ../fish/guestfish-actions.pod:1533 ../fish/guestfish-actions.pod:3003
5269 #: ../fish/guestfish-actions.pod:3018 ../fish/guestfish-actions.pod:3094
5270 #: ../fish/guestfish-actions.pod:3111 ../fish/guestfish-actions.pod:3126
5271 #: ../fish/guestfish-actions.pod:3709 ../fish/guestfish-actions.pod:3755
5272 #: ../fish/guestfish-actions.pod:3840 ../fish/guestfish-actions.pod:3855
5273 #: ../fish/guestfish-actions.pod:4265 ../fish/guestfish-actions.pod:4283
5274 #: ../fish/guestfish-actions.pod:4300 ../fish/guestfish-actions.pod:4310
5275 #: ../fish/guestfish-actions.pod:4358 ../fish/guestfish-actions.pod:4368
5276 #: ../fish/guestfish-actions.pod:4397 ../fish/guestfish-actions.pod:4407
5278 "Because of the message protocol, there is a transfer limit of somewhere "
5279 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
5283 #: ../src/guestfs-actions.pod:697
5284 msgid "guestfs_checksum"
5288 #: ../src/guestfs-actions.pod:699
5291 " char *guestfs_checksum (guestfs_h *g,\n"
5292 "\t\tconst char *csumtype,\n"
5293 "\t\tconst char *path);\n"
5298 #: ../src/guestfs-actions.pod:703 ../fish/guestfish-actions.pod:553
5300 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
5304 #: ../src/guestfs-actions.pod:706 ../fish/guestfish-actions.pod:556
5306 "The type of checksum to compute is given by the C<csumtype> parameter which "
5307 "must have one of the following values:"
5311 #: ../src/guestfs-actions.pod:711 ../fish/guestfish-actions.pod:561
5316 #: ../src/guestfs-actions.pod:713 ../fish/guestfish-actions.pod:563
5318 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
5323 #: ../src/guestfs-actions.pod:716 ../fish/guestfish-actions.pod:566
5328 #: ../src/guestfs-actions.pod:718 ../fish/guestfish-actions.pod:568
5329 msgid "Compute the MD5 hash (using the C<md5sum> program)."
5333 #: ../src/guestfs-actions.pod:720 ../fish/guestfish-actions.pod:570
5338 #: ../src/guestfs-actions.pod:722 ../fish/guestfish-actions.pod:572
5339 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
5343 #: ../src/guestfs-actions.pod:724 ../fish/guestfish-actions.pod:574
5348 #: ../src/guestfs-actions.pod:726 ../fish/guestfish-actions.pod:576
5349 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
5353 #: ../src/guestfs-actions.pod:728 ../fish/guestfish-actions.pod:578
5358 #: ../src/guestfs-actions.pod:730 ../fish/guestfish-actions.pod:580
5359 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
5363 #: ../src/guestfs-actions.pod:732 ../fish/guestfish-actions.pod:582
5368 #: ../src/guestfs-actions.pod:734 ../fish/guestfish-actions.pod:584
5369 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
5373 #: ../src/guestfs-actions.pod:736 ../fish/guestfish-actions.pod:586
5378 #: ../src/guestfs-actions.pod:738 ../fish/guestfish-actions.pod:588
5379 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
5383 #: ../src/guestfs-actions.pod:742 ../fish/guestfish-actions.pod:592
5384 msgid "The checksum is returned as a printable string."
5388 #: ../src/guestfs-actions.pod:744
5389 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
5393 #: ../src/guestfs-actions.pod:746
5394 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
5398 #: ../src/guestfs-actions.pod:751
5399 msgid "guestfs_checksum_device"
5403 #: ../src/guestfs-actions.pod:753
5406 " char *guestfs_checksum_device (guestfs_h *g,\n"
5407 "\t\tconst char *csumtype,\n"
5408 "\t\tconst char *device);\n"
5413 #: ../src/guestfs-actions.pod:757
5415 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
5416 "device named C<device>. For the types of checksums supported see the "
5417 "C<guestfs_checksum> command."
5421 #: ../src/guestfs-actions.pod:764
5422 msgid "guestfs_checksums_out"
5426 #: ../src/guestfs-actions.pod:766
5429 " int guestfs_checksums_out (guestfs_h *g,\n"
5430 "\t\tconst char *csumtype,\n"
5431 "\t\tconst char *directory,\n"
5432 "\t\tconst char *sumsfile);\n"
5437 #: ../src/guestfs-actions.pod:771 ../fish/guestfish-actions.pod:610
5439 "This command computes the checksums of all regular files in C<directory> and "
5440 "then emits a list of those checksums to the local output file C<sumsfile>."
5444 #: ../src/guestfs-actions.pod:775 ../fish/guestfish-actions.pod:614
5446 "This can be used for verifying the integrity of a virtual machine. However "
5447 "to be properly secure you should pay attention to the output of the checksum "
5448 "command (it uses the ones from GNU coreutils). In particular when the "
5449 "filename is not printable, coreutils uses a special backslash syntax. For "
5450 "more information, see the GNU coreutils info file."
5454 #: ../src/guestfs-actions.pod:785
5455 msgid "guestfs_chmod"
5459 #: ../src/guestfs-actions.pod:787
5462 " int guestfs_chmod (guestfs_h *g,\n"
5464 "\t\tconst char *path);\n"
5469 #: ../src/guestfs-actions.pod:791 ../fish/guestfish-actions.pod:628
5471 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
5476 #: ../src/guestfs-actions.pod:794 ../fish/guestfish-actions.pod:631
5478 "I<Note>: When using this command from guestfish, C<mode> by default would be "
5479 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
5484 #: ../src/guestfs-actions.pod:798 ../src/guestfs-actions.pod:3244
5485 #: ../src/guestfs-actions.pod:3332 ../src/guestfs-actions.pod:3348
5486 #: ../src/guestfs-actions.pod:3364 ../fish/guestfish-actions.pod:635
5487 #: ../fish/guestfish-actions.pod:2508 ../fish/guestfish-actions.pod:2578
5488 #: ../fish/guestfish-actions.pod:2588 ../fish/guestfish-actions.pod:2598
5489 msgid "The mode actually set is affected by the umask."
5493 #: ../src/guestfs-actions.pod:802
5494 msgid "guestfs_chown"
5498 #: ../src/guestfs-actions.pod:804
5501 " int guestfs_chown (guestfs_h *g,\n"
5504 "\t\tconst char *path);\n"
5509 #: ../src/guestfs-actions.pod:809 ../fish/guestfish-actions.pod:641
5510 msgid "Change the file owner to C<owner> and group to C<group>."
5514 #: ../src/guestfs-actions.pod:811 ../src/guestfs-actions.pod:2530
5515 #: ../fish/guestfish-actions.pod:643 ../fish/guestfish-actions.pod:1999
5517 "Only numeric uid and gid are supported. If you want to use names, you will "
5518 "need to locate and parse the password file yourself (Augeas support makes "
5519 "this relatively easy)."
5523 #: ../src/guestfs-actions.pod:817
5524 msgid "guestfs_command"
5528 #: ../src/guestfs-actions.pod:819
5531 " char *guestfs_command (guestfs_h *g,\n"
5532 "\t\tchar *const *arguments);\n"
5537 #: ../src/guestfs-actions.pod:822 ../fish/guestfish-actions.pod:651
5539 "This call runs a command from the guest filesystem. The filesystem must be "
5540 "mounted, and must contain a compatible operating system (ie. something "
5541 "Linux, with the same or compatible processor architecture)."
5545 #: ../src/guestfs-actions.pod:827
5547 "The single parameter is an argv-style list of arguments. The first element "
5548 "is the name of the program to run. Subsequent elements are parameters. The "
5549 "list must be non-empty (ie. must contain a program name). Note that the "
5550 "command runs directly, and is I<not> invoked via the shell (see "
5555 #: ../src/guestfs-actions.pod:834 ../fish/guestfish-actions.pod:663
5556 msgid "The return value is anything printed to I<stdout> by the command."
5560 #: ../src/guestfs-actions.pod:837 ../fish/guestfish-actions.pod:666
5562 "If the command returns a non-zero exit status, then this function returns an "
5563 "error message. The error message string is the content of I<stderr> from "
5568 #: ../src/guestfs-actions.pod:841 ../fish/guestfish-actions.pod:670
5570 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
5571 "bin>. If you require a program from another location, you should provide "
5572 "the full path in the first parameter."
5576 #: ../src/guestfs-actions.pod:846 ../fish/guestfish-actions.pod:675
5578 "Shared libraries and data files required by the program must be available on "
5579 "filesystems which are mounted in the correct places. It is the caller's "
5580 "responsibility to ensure all filesystems that are needed are mounted at the "
5585 #: ../src/guestfs-actions.pod:858
5586 msgid "guestfs_command_lines"
5590 #: ../src/guestfs-actions.pod:860
5593 " char **guestfs_command_lines (guestfs_h *g,\n"
5594 "\t\tchar *const *arguments);\n"
5599 #: ../src/guestfs-actions.pod:863
5601 "This is the same as C<guestfs_command>, but splits the result into a list of "
5606 #: ../src/guestfs-actions.pod:866
5607 msgid "See also: C<guestfs_sh_lines>"
5611 #: ../src/guestfs-actions.pod:875
5612 msgid "guestfs_config"
5616 #: ../src/guestfs-actions.pod:877
5619 " int guestfs_config (guestfs_h *g,\n"
5620 "\t\tconst char *qemuparam,\n"
5621 "\t\tconst char *qemuvalue);\n"
5626 #: ../src/guestfs-actions.pod:881 ../fish/guestfish-actions.pod:700
5628 "This can be used to add arbitrary qemu command line parameters of the form "
5629 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
5630 "setting some parameters which would interfere with parameters that we use."
5634 #: ../src/guestfs-actions.pod:886 ../fish/guestfish-actions.pod:705
5635 msgid "The first character of C<param> string must be a C<-> (dash)."
5639 #: ../src/guestfs-actions.pod:888 ../fish/guestfish-actions.pod:707
5640 msgid "C<value> can be NULL."
5644 #: ../src/guestfs-actions.pod:892
5645 msgid "guestfs_copy_size"
5649 #: ../src/guestfs-actions.pod:894
5652 " int guestfs_copy_size (guestfs_h *g,\n"
5653 "\t\tconst char *src,\n"
5654 "\t\tconst char *dest,\n"
5655 "\t\tint64_t size);\n"
5660 #: ../src/guestfs-actions.pod:899 ../fish/guestfish-actions.pod:713
5662 "This command copies exactly C<size> bytes from one source device or file "
5663 "C<src> to another destination device or file C<dest>."
5667 #: ../src/guestfs-actions.pod:902 ../fish/guestfish-actions.pod:716
5669 "Note this will fail if the source is too short or if the destination is not "
5674 #: ../src/guestfs-actions.pod:907 ../src/guestfs-actions.pod:1042
5675 #: ../src/guestfs-actions.pod:1070 ../src/guestfs-actions.pod:1442
5676 #: ../src/guestfs-actions.pod:1461 ../src/guestfs-actions.pod:5616
5677 #: ../src/guestfs-actions.pod:5632
5679 "This long-running command can generate progress notification messages so "
5680 "that the caller can display a progress bar or indicator. To receive these "
5681 "messages, the caller must register a progress callback. See L<guestfs(3)/"
5682 "guestfs_set_progress_callback>."
5686 #: ../src/guestfs-actions.pod:912
5691 #: ../src/guestfs-actions.pod:914
5694 " int guestfs_cp (guestfs_h *g,\n"
5695 "\t\tconst char *src,\n"
5696 "\t\tconst char *dest);\n"
5701 #: ../src/guestfs-actions.pod:918 ../fish/guestfish-actions.pod:723
5703 "This copies a file from C<src> to C<dest> where C<dest> is either a "
5704 "destination filename or destination directory."
5708 #: ../src/guestfs-actions.pod:923
5709 msgid "guestfs_cp_a"
5713 #: ../src/guestfs-actions.pod:925
5716 " int guestfs_cp_a (guestfs_h *g,\n"
5717 "\t\tconst char *src,\n"
5718 "\t\tconst char *dest);\n"
5723 #: ../src/guestfs-actions.pod:929 ../fish/guestfish-actions.pod:730
5725 "This copies a file or directory from C<src> to C<dest> recursively using the "
5730 #: ../src/guestfs-actions.pod:934
5735 #: ../src/guestfs-actions.pod:936
5738 " int guestfs_dd (guestfs_h *g,\n"
5739 "\t\tconst char *src,\n"
5740 "\t\tconst char *dest);\n"
5745 #: ../src/guestfs-actions.pod:940 ../fish/guestfish-actions.pod:737
5747 "This command copies from one source device or file C<src> to another "
5748 "destination device or file C<dest>. Normally you would use this to copy to "
5749 "or from a device or partition, for example to duplicate a filesystem."
5753 #: ../src/guestfs-actions.pod:945
5755 "If the destination is a device, it must be as large or larger than the "
5756 "source file or device, otherwise the copy will fail. This command cannot do "
5757 "partial copies (see C<guestfs_copy_size>)."
5761 #: ../src/guestfs-actions.pod:951
5762 msgid "guestfs_debug"
5766 #: ../src/guestfs-actions.pod:953
5769 " char *guestfs_debug (guestfs_h *g,\n"
5770 "\t\tconst char *subcmd,\n"
5771 "\t\tchar *const *extraargs);\n"
5776 #: ../src/guestfs-actions.pod:957
5778 "The C<guestfs_debug> command exposes some internals of C<guestfsd> (the "
5779 "guestfs daemon) that runs inside the qemu subprocess."
5783 #: ../src/guestfs-actions.pod:961 ../fish/guestfish-actions.pod:754
5785 "There is no comprehensive help for this command. You have to look at the "
5786 "file C<daemon/debug.c> in the libguestfs source to find out what you can do."
5790 #: ../src/guestfs-actions.pod:968
5791 msgid "guestfs_debug_upload"
5795 #: ../src/guestfs-actions.pod:970
5798 " int guestfs_debug_upload (guestfs_h *g,\n"
5799 "\t\tconst char *filename,\n"
5800 "\t\tconst char *tmpname,\n"
5806 #: ../src/guestfs-actions.pod:975
5808 "The C<guestfs_debug_upload> command uploads a file to the libguestfs "
5813 #: ../src/guestfs-actions.pod:978 ../fish/guestfish-actions.pod:765
5815 "There is no comprehensive help for this command. You have to look at the "
5816 "file C<daemon/debug.c> in the libguestfs source to find out what it is for."
5820 #: ../src/guestfs-actions.pod:984
5825 #: ../src/guestfs-actions.pod:986
5828 " char *guestfs_df (guestfs_h *g);\n"
5833 #: ../src/guestfs-actions.pod:988 ../fish/guestfish-actions.pod:775
5834 msgid "This command runs the C<df> command to report disk space used."
5838 #: ../src/guestfs-actions.pod:990 ../src/guestfs-actions.pod:1004
5839 #: ../fish/guestfish-actions.pod:777 ../fish/guestfish-actions.pod:788
5841 "This command is mostly useful for interactive sessions. It is I<not> "
5842 "intended that you try to parse the output string. Use C<statvfs> from "
5847 #: ../src/guestfs-actions.pod:997
5848 msgid "guestfs_df_h"
5852 #: ../src/guestfs-actions.pod:999
5855 " char *guestfs_df_h (guestfs_h *g);\n"
5860 #: ../src/guestfs-actions.pod:1001 ../fish/guestfish-actions.pod:785
5862 "This command runs the C<df -h> command to report disk space used in human-"
5867 #: ../src/guestfs-actions.pod:1011
5868 msgid "guestfs_dmesg"
5872 #: ../src/guestfs-actions.pod:1013
5875 " char *guestfs_dmesg (guestfs_h *g);\n"
5880 #: ../src/guestfs-actions.pod:1015 ../fish/guestfish-actions.pod:796
5882 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
5883 "This is sometimes useful for extended debugging of problems."
5887 #: ../src/guestfs-actions.pod:1019
5889 "Another way to get the same information is to enable verbose messages with "
5890 "C<guestfs_set_verbose> or by setting the environment variable "
5891 "C<LIBGUESTFS_DEBUG=1> before running the program."
5895 #: ../src/guestfs-actions.pod:1027
5896 msgid "guestfs_download"
5900 #: ../src/guestfs-actions.pod:1029
5903 " int guestfs_download (guestfs_h *g,\n"
5904 "\t\tconst char *remotefilename,\n"
5905 "\t\tconst char *filename);\n"
5910 #: ../src/guestfs-actions.pod:1033 ../src/guestfs-actions.pod:1055
5911 #: ../fish/guestfish-actions.pod:809 ../fish/guestfish-actions.pod:822
5913 "Download file C<remotefilename> and save it as C<filename> on the local "
5918 #: ../src/guestfs-actions.pod:1036 ../src/guestfs-actions.pod:5184
5919 #: ../fish/guestfish-actions.pod:812 ../fish/guestfish-actions.pod:4013
5920 msgid "C<filename> can also be a named pipe."
5924 #: ../src/guestfs-actions.pod:1038
5925 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
5929 #: ../src/guestfs-actions.pod:1047
5930 msgid "guestfs_download_offset"
5934 #: ../src/guestfs-actions.pod:1049
5937 " int guestfs_download_offset (guestfs_h *g,\n"
5938 "\t\tconst char *remotefilename,\n"
5939 "\t\tconst char *filename,\n"
5940 "\t\tint64_t offset,\n"
5941 "\t\tint64_t size);\n"
5946 #: ../src/guestfs-actions.pod:1058 ../fish/guestfish-actions.pod:825
5948 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
5949 "region must be within the file or device)."
5953 #: ../src/guestfs-actions.pod:1061
5955 "Note that there is no limit on the amount of data that can be downloaded "
5956 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
5957 "full amount unless an error occurs."
5961 #: ../src/guestfs-actions.pod:1066
5962 msgid "See also C<guestfs_download>, C<guestfs_pread>."
5966 #: ../src/guestfs-actions.pod:1075
5967 msgid "guestfs_drop_caches"
5971 #: ../src/guestfs-actions.pod:1077
5974 " int guestfs_drop_caches (guestfs_h *g,\n"
5975 "\t\tint whattodrop);\n"
5980 #: ../src/guestfs-actions.pod:1080 ../fish/guestfish-actions.pod:841
5982 "This instructs the guest kernel to drop its page cache, and/or dentries and "
5983 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
5984 "to drop, see L<http://linux-mm.org/Drop_Caches>"
5988 #: ../src/guestfs-actions.pod:1085 ../fish/guestfish-actions.pod:846
5989 msgid "Setting C<whattodrop> to 3 should drop everything."
5993 #: ../src/guestfs-actions.pod:1087 ../fish/guestfish-actions.pod:848
5995 "This automatically calls L<sync(2)> before the operation, so that the "
5996 "maximum guest memory is freed."
6000 #: ../src/guestfs-actions.pod:1092
6005 #: ../src/guestfs-actions.pod:1094
6008 " int64_t guestfs_du (guestfs_h *g,\n"
6009 "\t\tconst char *path);\n"
6014 #: ../src/guestfs-actions.pod:1097 ../fish/guestfish-actions.pod:855
6016 "This command runs the C<du -s> command to estimate file space usage for "
6021 #: ../src/guestfs-actions.pod:1100 ../fish/guestfish-actions.pod:858
6023 "C<path> can be a file or a directory. If C<path> is a directory then the "
6024 "estimate includes the contents of the directory and all subdirectories "
6029 #: ../src/guestfs-actions.pod:1104 ../fish/guestfish-actions.pod:862
6031 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
6035 #: ../src/guestfs-actions.pod:1109
6036 msgid "guestfs_e2fsck_f"
6040 #: ../src/guestfs-actions.pod:1111
6043 " int guestfs_e2fsck_f (guestfs_h *g,\n"
6044 "\t\tconst char *device);\n"
6049 #: ../src/guestfs-actions.pod:1114 ../fish/guestfish-actions.pod:869
6051 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
6052 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
6057 #: ../src/guestfs-actions.pod:1118
6059 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
6060 "Normally you should use C<guestfs_fsck>."
6064 #: ../src/guestfs-actions.pod:1123
6065 msgid "guestfs_echo_daemon"
6069 #: ../src/guestfs-actions.pod:1125
6072 " char *guestfs_echo_daemon (guestfs_h *g,\n"
6073 "\t\tchar *const *words);\n"
6078 #: ../src/guestfs-actions.pod:1128 ../fish/guestfish-actions.pod:880
6080 "This command concatenates the list of C<words> passed with single spaces "
6081 "between them and returns the resulting string."
6085 #: ../src/guestfs-actions.pod:1131 ../fish/guestfish-actions.pod:883
6086 msgid "You can use this command to test the connection through to the daemon."
6090 #: ../src/guestfs-actions.pod:1133
6091 msgid "See also C<guestfs_ping_daemon>."
6095 #: ../src/guestfs-actions.pod:1138
6096 msgid "guestfs_egrep"
6100 #: ../src/guestfs-actions.pod:1140
6103 " char **guestfs_egrep (guestfs_h *g,\n"
6104 "\t\tconst char *regex,\n"
6105 "\t\tconst char *path);\n"
6110 #: ../src/guestfs-actions.pod:1144 ../fish/guestfish-actions.pod:891
6112 "This calls the external C<egrep> program and returns the matching lines."
6116 #: ../src/guestfs-actions.pod:1154
6117 msgid "guestfs_egrepi"
6121 #: ../src/guestfs-actions.pod:1156
6124 " char **guestfs_egrepi (guestfs_h *g,\n"
6125 "\t\tconst char *regex,\n"
6126 "\t\tconst char *path);\n"
6131 #: ../src/guestfs-actions.pod:1160 ../fish/guestfish-actions.pod:901
6133 "This calls the external C<egrep -i> program and returns the matching lines."
6137 #: ../src/guestfs-actions.pod:1170
6138 msgid "guestfs_equal"
6142 #: ../src/guestfs-actions.pod:1172
6145 " int guestfs_equal (guestfs_h *g,\n"
6146 "\t\tconst char *file1,\n"
6147 "\t\tconst char *file2);\n"
6152 #: ../src/guestfs-actions.pod:1176 ../fish/guestfish-actions.pod:911
6154 "This compares the two files C<file1> and C<file2> and returns true if their "
6155 "content is exactly equal, or false otherwise."
6159 #: ../src/guestfs-actions.pod:1179 ../fish/guestfish-actions.pod:914
6160 msgid "The external L<cmp(1)> program is used for the comparison."
6164 #: ../src/guestfs-actions.pod:1183
6165 msgid "guestfs_exists"
6169 #: ../src/guestfs-actions.pod:1185
6172 " int guestfs_exists (guestfs_h *g,\n"
6173 "\t\tconst char *path);\n"
6178 #: ../src/guestfs-actions.pod:1188 ../fish/guestfish-actions.pod:920
6180 "This returns C<true> if and only if there is a file, directory (or anything) "
6181 "with the given C<path> name."
6185 #: ../src/guestfs-actions.pod:1191
6186 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
6190 #: ../src/guestfs-actions.pod:1195
6191 msgid "guestfs_fallocate"
6195 #: ../src/guestfs-actions.pod:1197
6198 " int guestfs_fallocate (guestfs_h *g,\n"
6199 "\t\tconst char *path,\n"
6205 #: ../src/guestfs-actions.pod:1201 ../src/guestfs-actions.pod:1224
6206 #: ../fish/guestfish-actions.pod:929 ../fish/guestfish-actions.pod:948
6208 "This command preallocates a file (containing zero bytes) named C<path> of "
6209 "size C<len> bytes. If the file exists already, it is overwritten."
6213 #: ../src/guestfs-actions.pod:1205 ../fish/guestfish-actions.pod:933
6215 "Do not confuse this with the guestfish-specific C<alloc> command which "
6216 "allocates a file in the host and attaches it as a device."
6220 #: ../src/guestfs-actions.pod:1211 ../fish/guestfish-actions.pod:937
6222 "This function is deprecated. In new code, use the C<fallocate64> call "
6227 #: ../src/guestfs-actions.pod:1218
6228 msgid "guestfs_fallocate64"
6232 #: ../src/guestfs-actions.pod:1220
6235 " int guestfs_fallocate64 (guestfs_h *g,\n"
6236 "\t\tconst char *path,\n"
6237 "\t\tint64_t len);\n"
6242 #: ../src/guestfs-actions.pod:1228
6244 "Note that this call allocates disk blocks for the file. To create a sparse "
6245 "file use C<guestfs_truncate_size> instead."
6249 #: ../src/guestfs-actions.pod:1231
6251 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
6252 "oversight it only allowed 30 bit lengths to be specified, effectively "
6253 "limiting the maximum size of files created through that call to 1GB."
6257 #: ../src/guestfs-actions.pod:1236 ../fish/guestfish-actions.pod:960
6259 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
6260 "commands which create a file in the host and attach it as a device."
6264 #: ../src/guestfs-actions.pod:1242
6265 msgid "guestfs_fgrep"
6269 #: ../src/guestfs-actions.pod:1244
6272 " char **guestfs_fgrep (guestfs_h *g,\n"
6273 "\t\tconst char *pattern,\n"
6274 "\t\tconst char *path);\n"
6279 #: ../src/guestfs-actions.pod:1248 ../fish/guestfish-actions.pod:968
6281 "This calls the external C<fgrep> program and returns the matching lines."
6285 #: ../src/guestfs-actions.pod:1258
6286 msgid "guestfs_fgrepi"
6290 #: ../src/guestfs-actions.pod:1260
6293 " char **guestfs_fgrepi (guestfs_h *g,\n"
6294 "\t\tconst char *pattern,\n"
6295 "\t\tconst char *path);\n"
6300 #: ../src/guestfs-actions.pod:1264 ../fish/guestfish-actions.pod:978
6302 "This calls the external C<fgrep -i> program and returns the matching lines."
6306 #: ../src/guestfs-actions.pod:1274
6307 msgid "guestfs_file"
6311 #: ../src/guestfs-actions.pod:1276
6314 " char *guestfs_file (guestfs_h *g,\n"
6315 "\t\tconst char *path);\n"
6320 #: ../src/guestfs-actions.pod:1279 ../fish/guestfish-actions.pod:988
6322 "This call uses the standard L<file(1)> command to determine the type or "
6323 "contents of the file."
6327 #: ../src/guestfs-actions.pod:1282 ../fish/guestfish-actions.pod:991
6329 "This call will also transparently look inside various types of compressed "
6334 #: ../src/guestfs-actions.pod:1285 ../fish/guestfish-actions.pod:994
6336 "The exact command which runs is C<file -zb path>. Note in particular that "
6337 "the filename is not prepended to the output (the C<-b> option)."
6341 #: ../src/guestfs-actions.pod:1289
6343 "This command can also be used on C</dev/> devices (and partitions, LV "
6344 "names). You can for example use this to determine if a device contains a "
6345 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
6349 #: ../src/guestfs-actions.pod:1294 ../fish/guestfish-actions.pod:1003
6351 "If the C<path> does not begin with C</dev/> then this command only works for "
6352 "the content of regular files. For other file types (directory, symbolic "
6353 "link etc) it will just return the string C<directory> etc."
6357 #: ../src/guestfs-actions.pod:1302
6358 msgid "guestfs_file_architecture"
6362 #: ../src/guestfs-actions.pod:1304
6365 " char *guestfs_file_architecture (guestfs_h *g,\n"
6366 "\t\tconst char *filename);\n"
6371 #: ../src/guestfs-actions.pod:1307 ../fish/guestfish-actions.pod:1012
6373 "This detects the architecture of the binary C<filename>, and returns it if "
6378 #: ../src/guestfs-actions.pod:1310 ../fish/guestfish-actions.pod:1015
6379 msgid "Currently defined architectures are:"
6383 #: ../src/guestfs-actions.pod:1314 ../fish/guestfish-actions.pod:1019
6388 #: ../src/guestfs-actions.pod:1316 ../fish/guestfish-actions.pod:1021
6390 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
6391 "irrespective of the precise processor requirements of the binary."
6395 #: ../src/guestfs-actions.pod:1319 ../fish/guestfish-actions.pod:1024
6400 #: ../src/guestfs-actions.pod:1321 ../fish/guestfish-actions.pod:1026
6401 msgid "64 bit x86-64."
6405 #: ../src/guestfs-actions.pod:1323 ../fish/guestfish-actions.pod:1028
6410 #: ../src/guestfs-actions.pod:1325 ../fish/guestfish-actions.pod:1030
6411 msgid "32 bit SPARC."
6415 #: ../src/guestfs-actions.pod:1327 ../fish/guestfish-actions.pod:1032
6420 #: ../src/guestfs-actions.pod:1329 ../fish/guestfish-actions.pod:1034
6421 msgid "64 bit SPARC V9 and above."
6425 #: ../src/guestfs-actions.pod:1331 ../fish/guestfish-actions.pod:1036
6430 #: ../src/guestfs-actions.pod:1333 ../fish/guestfish-actions.pod:1038
6431 msgid "Intel Itanium."
6435 #: ../src/guestfs-actions.pod:1335 ../fish/guestfish-actions.pod:1040
6440 #: ../src/guestfs-actions.pod:1337 ../fish/guestfish-actions.pod:1042
6441 msgid "32 bit Power PC."
6445 #: ../src/guestfs-actions.pod:1339 ../fish/guestfish-actions.pod:1044
6450 #: ../src/guestfs-actions.pod:1341 ../fish/guestfish-actions.pod:1046
6451 msgid "64 bit Power PC."
6455 #: ../src/guestfs-actions.pod:1345 ../fish/guestfish-actions.pod:1050
6456 msgid "Libguestfs may return other architecture strings in future."
6460 #: ../src/guestfs-actions.pod:1347 ../fish/guestfish-actions.pod:1052
6461 msgid "The function works on at least the following types of files:"
6465 #: ../src/guestfs-actions.pod:1353 ../fish/guestfish-actions.pod:1058
6466 msgid "many types of Un*x and Linux binary"
6470 #: ../src/guestfs-actions.pod:1357 ../fish/guestfish-actions.pod:1062
6471 msgid "many types of Un*x and Linux shared library"
6475 #: ../src/guestfs-actions.pod:1361 ../fish/guestfish-actions.pod:1066
6476 msgid "Windows Win32 and Win64 binaries"
6480 #: ../src/guestfs-actions.pod:1365 ../fish/guestfish-actions.pod:1070
6481 msgid "Windows Win32 and Win64 DLLs"
6485 #: ../src/guestfs-actions.pod:1367 ../fish/guestfish-actions.pod:1072
6486 msgid "Win32 binaries and DLLs return C<i386>."
6490 #: ../src/guestfs-actions.pod:1369 ../fish/guestfish-actions.pod:1074
6491 msgid "Win64 binaries and DLLs return C<x86_64>."
6495 #: ../src/guestfs-actions.pod:1373 ../fish/guestfish-actions.pod:1078
6496 msgid "Linux kernel modules"
6500 #: ../src/guestfs-actions.pod:1377 ../fish/guestfish-actions.pod:1082
6501 msgid "Linux new-style initrd images"
6505 #: ../src/guestfs-actions.pod:1381 ../fish/guestfish-actions.pod:1086
6506 msgid "some non-x86 Linux vmlinuz kernels"
6510 #: ../src/guestfs-actions.pod:1385 ../fish/guestfish-actions.pod:1090
6511 msgid "What it can't do currently:"
6515 #: ../src/guestfs-actions.pod:1391 ../fish/guestfish-actions.pod:1096
6516 msgid "static libraries (libfoo.a)"
6520 #: ../src/guestfs-actions.pod:1395 ../fish/guestfish-actions.pod:1100
6521 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
6525 #: ../src/guestfs-actions.pod:1399 ../fish/guestfish-actions.pod:1104
6526 msgid "x86 Linux vmlinuz kernels"
6530 #: ../src/guestfs-actions.pod:1401 ../fish/guestfish-actions.pod:1106
6532 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
6533 "compressed code, and are horribly hard to unpack. If you want to find the "
6534 "architecture of a kernel, use the architecture of the associated initrd or "
6535 "kernel module(s) instead."
6539 #: ../src/guestfs-actions.pod:1411
6540 msgid "guestfs_filesize"
6544 #: ../src/guestfs-actions.pod:1413
6547 " int64_t guestfs_filesize (guestfs_h *g,\n"
6548 "\t\tconst char *file);\n"
6553 #: ../src/guestfs-actions.pod:1416 ../fish/guestfish-actions.pod:1117
6554 msgid "This command returns the size of C<file> in bytes."
6558 #: ../src/guestfs-actions.pod:1418
6560 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
6561 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
6562 "devices, use C<guestfs_blockdev_getsize64>."
6566 #: ../src/guestfs-actions.pod:1424
6567 msgid "guestfs_fill"
6571 #: ../src/guestfs-actions.pod:1426
6574 " int guestfs_fill (guestfs_h *g,\n"
6577 "\t\tconst char *path);\n"
6582 #: ../src/guestfs-actions.pod:1431 ../fish/guestfish-actions.pod:1127
6584 "This command creates a new file called C<path>. The initial content of the "
6585 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
6590 #: ../src/guestfs-actions.pod:1435
6592 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
6593 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
6594 "bytes use C<guestfs_fill_pattern>."
6598 #: ../src/guestfs-actions.pod:1447
6599 msgid "guestfs_fill_pattern"
6603 #: ../src/guestfs-actions.pod:1449
6606 " int guestfs_fill_pattern (guestfs_h *g,\n"
6607 "\t\tconst char *pattern,\n"
6609 "\t\tconst char *path);\n"
6614 #: ../src/guestfs-actions.pod:1454
6616 "This function is like C<guestfs_fill> except that it creates a new file of "
6617 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
6618 "pattern is truncated if necessary to ensure the length of the file is "
6619 "exactly C<len> bytes."
6623 #: ../src/guestfs-actions.pod:1466
6624 msgid "guestfs_find"
6628 #: ../src/guestfs-actions.pod:1468
6631 " char **guestfs_find (guestfs_h *g,\n"
6632 "\t\tconst char *directory);\n"
6637 #: ../src/guestfs-actions.pod:1471 ../fish/guestfish-actions.pod:1149
6639 "This command lists out all files and directories, recursively, starting at "
6640 "C<directory>. It is essentially equivalent to running the shell command "
6641 "C<find directory -print> but some post-processing happens on the output, "
6646 #: ../src/guestfs-actions.pod:1476 ../fish/guestfish-actions.pod:1154
6648 "This returns a list of strings I<without any prefix>. Thus if the directory "
6653 #: ../src/guestfs-actions.pod:1479 ../fish/guestfish-actions.pod:1157
6663 #: ../src/guestfs-actions.pod:1483
6665 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
6669 #: ../src/guestfs-actions.pod:1486 ../fish/guestfish-actions.pod:1164
6680 #: ../src/guestfs-actions.pod:1491 ../fish/guestfish-actions.pod:1169
6681 msgid "If C<directory> is not a directory, then this command returns an error."
6685 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:1172
6686 msgid "The returned list is sorted."
6690 #: ../src/guestfs-actions.pod:1496
6691 msgid "See also C<guestfs_find0>."
6695 #: ../src/guestfs-actions.pod:1505
6696 msgid "guestfs_find0"
6700 #: ../src/guestfs-actions.pod:1507
6703 " int guestfs_find0 (guestfs_h *g,\n"
6704 "\t\tconst char *directory,\n"
6705 "\t\tconst char *files);\n"
6710 #: ../src/guestfs-actions.pod:1511 ../fish/guestfish-actions.pod:1183
6712 "This command lists out all files and directories, recursively, starting at "
6713 "C<directory>, placing the resulting list in the external file called "
6718 #: ../src/guestfs-actions.pod:1515
6720 "This command works the same way as C<guestfs_find> with the following "
6725 #: ../src/guestfs-actions.pod:1522 ../fish/guestfish-actions.pod:1194
6726 msgid "The resulting list is written to an external file."
6730 #: ../src/guestfs-actions.pod:1526 ../fish/guestfish-actions.pod:1198
6732 "Items (filenames) in the result are separated by C<\\0> characters. See "
6733 "L<find(1)> option I<-print0>."
6737 #: ../src/guestfs-actions.pod:1531 ../fish/guestfish-actions.pod:1203
6738 msgid "This command is not limited in the number of names that it can return."
6742 #: ../src/guestfs-actions.pod:1536 ../fish/guestfish-actions.pod:1208
6743 msgid "The result list is not sorted."
6747 #: ../src/guestfs-actions.pod:1542
6748 msgid "guestfs_findfs_label"
6752 #: ../src/guestfs-actions.pod:1544
6755 " char *guestfs_findfs_label (guestfs_h *g,\n"
6756 "\t\tconst char *label);\n"
6761 #: ../src/guestfs-actions.pod:1547 ../fish/guestfish-actions.pod:1218
6763 "This command searches the filesystems and returns the one which has the "
6764 "given label. An error is returned if no such filesystem can be found."
6768 #: ../src/guestfs-actions.pod:1551
6769 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
6773 #: ../src/guestfs-actions.pod:1556
6774 msgid "guestfs_findfs_uuid"
6778 #: ../src/guestfs-actions.pod:1558
6781 " char *guestfs_findfs_uuid (guestfs_h *g,\n"
6782 "\t\tconst char *uuid);\n"
6787 #: ../src/guestfs-actions.pod:1561 ../fish/guestfish-actions.pod:1228
6789 "This command searches the filesystems and returns the one which has the "
6790 "given UUID. An error is returned if no such filesystem can be found."
6794 #: ../src/guestfs-actions.pod:1565
6795 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
6799 #: ../src/guestfs-actions.pod:1570
6800 msgid "guestfs_fsck"
6804 #: ../src/guestfs-actions.pod:1572
6807 " int guestfs_fsck (guestfs_h *g,\n"
6808 "\t\tconst char *fstype,\n"
6809 "\t\tconst char *device);\n"
6814 #: ../src/guestfs-actions.pod:1576 ../fish/guestfish-actions.pod:1238
6816 "This runs the filesystem checker (fsck) on C<device> which should have "
6817 "filesystem type C<fstype>."
6821 #: ../src/guestfs-actions.pod:1579 ../fish/guestfish-actions.pod:1241
6823 "The returned integer is the status. See L<fsck(8)> for the list of status "
6824 "codes from C<fsck>."
6828 #: ../src/guestfs-actions.pod:1588 ../fish/guestfish-actions.pod:1250
6829 msgid "Multiple status codes can be summed together."
6833 #: ../src/guestfs-actions.pod:1592 ../fish/guestfish-actions.pod:1254
6835 "A non-zero return code can mean \"success\", for example if errors have been "
6836 "corrected on the filesystem."
6840 #: ../src/guestfs-actions.pod:1597 ../fish/guestfish-actions.pod:1259
6841 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
6845 #: ../src/guestfs-actions.pod:1602 ../fish/guestfish-actions.pod:1264
6847 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
6851 #: ../src/guestfs-actions.pod:1606
6852 msgid "guestfs_get_append"
6856 #: ../src/guestfs-actions.pod:1608
6859 " const char *guestfs_get_append (guestfs_h *g);\n"
6864 #: ../src/guestfs-actions.pod:1610 ../fish/guestfish-actions.pod:1270
6866 "Return the additional kernel options which are added to the guest kernel "
6871 #: ../src/guestfs-actions.pod:1613 ../fish/guestfish-actions.pod:1273
6872 msgid "If C<NULL> then no options are added."
6876 #: ../src/guestfs-actions.pod:1615
6878 "This function returns a string which may be NULL. There is no way to return "
6879 "an error from this function. The string is owned by the guest handle and "
6880 "must I<not> be freed."
6884 #: ../src/guestfs-actions.pod:1619
6885 msgid "guestfs_get_autosync"
6889 #: ../src/guestfs-actions.pod:1621
6892 " int guestfs_get_autosync (guestfs_h *g);\n"
6897 #: ../src/guestfs-actions.pod:1623 ../fish/guestfish-actions.pod:1279
6898 msgid "Get the autosync flag."
6902 #: ../src/guestfs-actions.pod:1627
6903 msgid "guestfs_get_direct"
6907 #: ../src/guestfs-actions.pod:1629
6910 " int guestfs_get_direct (guestfs_h *g);\n"
6915 #: ../src/guestfs-actions.pod:1631 ../fish/guestfish-actions.pod:1285
6916 msgid "Return the direct appliance mode flag."
6920 #: ../src/guestfs-actions.pod:1635
6921 msgid "guestfs_get_e2label"
6925 #: ../src/guestfs-actions.pod:1637
6928 " char *guestfs_get_e2label (guestfs_h *g,\n"
6929 "\t\tconst char *device);\n"
6934 #: ../src/guestfs-actions.pod:1640 ../fish/guestfish-actions.pod:1291
6936 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
6940 #: ../src/guestfs-actions.pod:1646 ../fish/guestfish-actions.pod:1294
6942 "This function is deprecated. In new code, use the C<vfs_label> call instead."
6946 #: ../src/guestfs-actions.pod:1653
6947 msgid "guestfs_get_e2uuid"
6951 #: ../src/guestfs-actions.pod:1655
6954 " char *guestfs_get_e2uuid (guestfs_h *g,\n"
6955 "\t\tconst char *device);\n"
6960 #: ../src/guestfs-actions.pod:1658 ../fish/guestfish-actions.pod:1305
6962 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
6966 #: ../src/guestfs-actions.pod:1664 ../fish/guestfish-actions.pod:1308
6968 "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
6972 #: ../src/guestfs-actions.pod:1671
6973 msgid "guestfs_get_memsize"
6977 #: ../src/guestfs-actions.pod:1673
6980 " int guestfs_get_memsize (guestfs_h *g);\n"
6985 #: ../src/guestfs-actions.pod:1675 ../fish/guestfish-actions.pod:1319
6987 "This gets the memory size in megabytes allocated to the qemu subprocess."
6991 #: ../src/guestfs-actions.pod:1678
6993 "If C<guestfs_set_memsize> was not called on this handle, and if "
6994 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
6995 "value for memsize."
6999 #: ../src/guestfs-actions.pod:1682 ../src/guestfs-actions.pod:1745
7000 #: ../src/guestfs-actions.pod:4437 ../src/guestfs-actions.pod:4529
7001 #: ../fish/guestfish-actions.pod:1326 ../fish/guestfish-actions.pod:1377
7002 #: ../fish/guestfish-actions.pod:3420 ../fish/guestfish-actions.pod:3507
7004 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
7008 #: ../src/guestfs-actions.pod:1687
7009 msgid "guestfs_get_network"
7013 #: ../src/guestfs-actions.pod:1689
7016 " int guestfs_get_network (guestfs_h *g);\n"
7021 #: ../src/guestfs-actions.pod:1691 ../fish/guestfish-actions.pod:1333
7022 msgid "This returns the enable network flag."
7026 #: ../src/guestfs-actions.pod:1695
7027 msgid "guestfs_get_path"
7031 #: ../src/guestfs-actions.pod:1697
7034 " const char *guestfs_get_path (guestfs_h *g);\n"
7039 #: ../src/guestfs-actions.pod:1699 ../fish/guestfish-actions.pod:1339
7040 msgid "Return the current search path."
7044 #: ../src/guestfs-actions.pod:1701 ../fish/guestfish-actions.pod:1341
7046 "This is always non-NULL. If it wasn't set already, then this will return "
7051 #: ../src/guestfs-actions.pod:1704 ../src/guestfs-actions.pod:1727
7053 "This function returns a string, or NULL on error. The string is owned by "
7054 "the guest handle and must I<not> be freed."
7058 #: ../src/guestfs-actions.pod:1707
7059 msgid "guestfs_get_pid"
7063 #: ../src/guestfs-actions.pod:1709
7066 " int guestfs_get_pid (guestfs_h *g);\n"
7071 #: ../src/guestfs-actions.pod:1711 ../fish/guestfish-actions.pod:1350
7073 "Return the process ID of the qemu subprocess. If there is no qemu "
7074 "subprocess, then this will return an error."
7078 #: ../src/guestfs-actions.pod:1714 ../fish/guestfish-actions.pod:1353
7079 msgid "This is an internal call used for debugging and testing."
7083 #: ../src/guestfs-actions.pod:1718
7084 msgid "guestfs_get_qemu"
7088 #: ../src/guestfs-actions.pod:1720
7091 " const char *guestfs_get_qemu (guestfs_h *g);\n"
7096 #: ../src/guestfs-actions.pod:1722 ../fish/guestfish-actions.pod:1359
7097 msgid "Return the current qemu binary."
7101 #: ../src/guestfs-actions.pod:1724 ../fish/guestfish-actions.pod:1361
7103 "This is always non-NULL. If it wasn't set already, then this will return "
7104 "the default qemu binary name."
7108 #: ../src/guestfs-actions.pod:1730
7109 msgid "guestfs_get_recovery_proc"
7113 #: ../src/guestfs-actions.pod:1732
7116 " int guestfs_get_recovery_proc (guestfs_h *g);\n"
7121 #: ../src/guestfs-actions.pod:1734 ../fish/guestfish-actions.pod:1368
7122 msgid "Return the recovery process enabled flag."
7126 #: ../src/guestfs-actions.pod:1738
7127 msgid "guestfs_get_selinux"
7131 #: ../src/guestfs-actions.pod:1740
7134 " int guestfs_get_selinux (guestfs_h *g);\n"
7139 #: ../src/guestfs-actions.pod:1742
7141 "This returns the current setting of the selinux flag which is passed to the "
7142 "appliance at boot time. See C<guestfs_set_selinux>."
7146 #: ../src/guestfs-actions.pod:1750
7147 msgid "guestfs_get_state"
7151 #: ../src/guestfs-actions.pod:1752
7154 " int guestfs_get_state (guestfs_h *g);\n"
7159 #: ../src/guestfs-actions.pod:1754 ../fish/guestfish-actions.pod:1384
7161 "This returns the current state as an opaque integer. This is only useful "
7162 "for printing debug and internal error messages."
7166 #: ../src/guestfs-actions.pod:1757 ../src/guestfs-actions.pod:2378
7167 #: ../src/guestfs-actions.pod:2401 ../src/guestfs-actions.pod:2450
7168 #: ../src/guestfs-actions.pod:2471 ../fish/guestfish-actions.pod:1387
7169 #: ../fish/guestfish-actions.pod:1881 ../fish/guestfish-actions.pod:1899
7170 #: ../fish/guestfish-actions.pod:1937 ../fish/guestfish-actions.pod:1953
7171 msgid "For more information on states, see L<guestfs(3)>."
7175 #: ../src/guestfs-actions.pod:1761
7176 msgid "guestfs_get_trace"
7180 #: ../src/guestfs-actions.pod:1763
7183 " int guestfs_get_trace (guestfs_h *g);\n"
7188 #: ../src/guestfs-actions.pod:1765 ../fish/guestfish-actions.pod:1393
7189 msgid "Return the command trace flag."
7193 #: ../src/guestfs-actions.pod:1769
7194 msgid "guestfs_get_umask"
7198 #: ../src/guestfs-actions.pod:1771
7201 " int guestfs_get_umask (guestfs_h *g);\n"
7206 #: ../src/guestfs-actions.pod:1773
7208 "Return the current umask. By default the umask is C<022> unless it has been "
7209 "set by calling C<guestfs_umask>."
7213 #: ../src/guestfs-actions.pod:1778
7214 msgid "guestfs_get_verbose"
7218 #: ../src/guestfs-actions.pod:1780
7221 " int guestfs_get_verbose (guestfs_h *g);\n"
7226 #: ../src/guestfs-actions.pod:1782 ../fish/guestfish-actions.pod:1406
7227 msgid "This returns the verbose messages flag."
7231 #: ../src/guestfs-actions.pod:1786
7232 msgid "guestfs_getcon"
7236 #: ../src/guestfs-actions.pod:1788
7239 " char *guestfs_getcon (guestfs_h *g);\n"
7244 #: ../src/guestfs-actions.pod:1790 ../fish/guestfish-actions.pod:1412
7245 msgid "This gets the SELinux security context of the daemon."
7249 #: ../src/guestfs-actions.pod:1792
7251 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
7255 #: ../src/guestfs-actions.pod:1798
7256 msgid "guestfs_getxattrs"
7260 #: ../src/guestfs-actions.pod:1800
7263 " struct guestfs_xattr_list *guestfs_getxattrs (guestfs_h *g,\n"
7264 "\t\tconst char *path);\n"
7269 #: ../src/guestfs-actions.pod:1803 ../fish/guestfish-actions.pod:1421
7271 "This call lists the extended attributes of the file or directory C<path>."
7275 #: ../src/guestfs-actions.pod:1806 ../fish/guestfish-actions.pod:1424
7277 "At the system call level, this is a combination of the L<listxattr(2)> and "
7278 "L<getxattr(2)> calls."
7282 #: ../src/guestfs-actions.pod:1809
7283 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
7287 #: ../src/guestfs-actions.pod:1811 ../src/guestfs-actions.pod:2545
7288 #: ../src/guestfs-actions.pod:3083
7290 "This function returns a C<struct guestfs_xattr_list *> (see E<lt>guestfs-"
7291 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
7292 "C<guestfs_free_xattr_list> after use>."
7296 #: ../src/guestfs-actions.pod:1816
7297 msgid "guestfs_glob_expand"
7301 #: ../src/guestfs-actions.pod:1818
7304 " char **guestfs_glob_expand (guestfs_h *g,\n"
7305 "\t\tconst char *pattern);\n"
7310 #: ../src/guestfs-actions.pod:1821 ../fish/guestfish-actions.pod:1433
7312 "This command searches for all the pathnames matching C<pattern> according to "
7313 "the wildcard expansion rules used by the shell."
7317 #: ../src/guestfs-actions.pod:1825 ../fish/guestfish-actions.pod:1437
7319 "If no paths match, then this returns an empty list (note: not an error)."
7323 #: ../src/guestfs-actions.pod:1828 ../fish/guestfish-actions.pod:1440
7325 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
7326 "GLOB_BRACE>. See that manual page for more details."
7330 #: ../src/guestfs-actions.pod:1836
7331 msgid "guestfs_grep"
7335 #: ../src/guestfs-actions.pod:1838
7338 " char **guestfs_grep (guestfs_h *g,\n"
7339 "\t\tconst char *regex,\n"
7340 "\t\tconst char *path);\n"
7345 #: ../src/guestfs-actions.pod:1842 ../fish/guestfish-actions.pod:1448
7346 msgid "This calls the external C<grep> program and returns the matching lines."
7350 #: ../src/guestfs-actions.pod:1852
7351 msgid "guestfs_grepi"
7355 #: ../src/guestfs-actions.pod:1854
7358 " char **guestfs_grepi (guestfs_h *g,\n"
7359 "\t\tconst char *regex,\n"
7360 "\t\tconst char *path);\n"
7365 #: ../src/guestfs-actions.pod:1858 ../fish/guestfish-actions.pod:1458
7367 "This calls the external C<grep -i> program and returns the matching lines."
7371 #: ../src/guestfs-actions.pod:1868
7372 msgid "guestfs_grub_install"
7376 #: ../src/guestfs-actions.pod:1870
7379 " int guestfs_grub_install (guestfs_h *g,\n"
7380 "\t\tconst char *root,\n"
7381 "\t\tconst char *device);\n"
7386 #: ../src/guestfs-actions.pod:1874 ../fish/guestfish-actions.pod:1468
7388 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
7389 "the root directory being C<root>."
7393 #: ../src/guestfs-actions.pod:1877 ../fish/guestfish-actions.pod:1471
7395 "Note: If grub-install reports the error \"No suitable drive was found in the "
7396 "generated device map.\" it may be that you need to create a C</boot/grub/"
7397 "device.map> file first that contains the mapping between grub device names "
7398 "and Linux device names. It is usually sufficient to create a file "
7403 #: ../src/guestfs-actions.pod:1884 ../fish/guestfish-actions.pod:1478
7411 #: ../src/guestfs-actions.pod:1886 ../fish/guestfish-actions.pod:1480
7412 msgid "replacing C</dev/vda> with the name of the installation device."
7416 #: ../src/guestfs-actions.pod:1890
7417 msgid "guestfs_head"
7421 #: ../src/guestfs-actions.pod:1892
7424 " char **guestfs_head (guestfs_h *g,\n"
7425 "\t\tconst char *path);\n"
7430 #: ../src/guestfs-actions.pod:1895 ../fish/guestfish-actions.pod:1486
7432 "This command returns up to the first 10 lines of a file as a list of strings."
7436 #: ../src/guestfs-actions.pod:1905
7437 msgid "guestfs_head_n"
7441 #: ../src/guestfs-actions.pod:1907
7444 " char **guestfs_head_n (guestfs_h *g,\n"
7445 "\t\tint nrlines,\n"
7446 "\t\tconst char *path);\n"
7451 #: ../src/guestfs-actions.pod:1911 ../fish/guestfish-actions.pod:1496
7453 "If the parameter C<nrlines> is a positive number, this returns the first "
7454 "C<nrlines> lines of the file C<path>."
7458 #: ../src/guestfs-actions.pod:1914 ../fish/guestfish-actions.pod:1499
7460 "If the parameter C<nrlines> is a negative number, this returns lines from "
7461 "the file C<path>, excluding the last C<nrlines> lines."
7465 #: ../src/guestfs-actions.pod:1917 ../src/guestfs-actions.pod:4985
7466 #: ../fish/guestfish-actions.pod:1502 ../fish/guestfish-actions.pod:3853
7467 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
7471 #: ../src/guestfs-actions.pod:1926
7472 msgid "guestfs_hexdump"
7476 #: ../src/guestfs-actions.pod:1928
7479 " char *guestfs_hexdump (guestfs_h *g,\n"
7480 "\t\tconst char *path);\n"
7485 #: ../src/guestfs-actions.pod:1931 ../fish/guestfish-actions.pod:1511
7487 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
7488 "readable, canonical hex dump of the file."
7492 #: ../src/guestfs-actions.pod:1940
7493 msgid "guestfs_initrd_cat"
7497 #: ../src/guestfs-actions.pod:1942
7500 " char *guestfs_initrd_cat (guestfs_h *g,\n"
7501 "\t\tconst char *initrdpath,\n"
7502 "\t\tconst char *filename,\n"
7503 "\t\tsize_t *size_r);\n"
7508 #: ../src/guestfs-actions.pod:1947 ../fish/guestfish-actions.pod:1521
7510 "This command unpacks the file C<filename> from the initrd file called "
7511 "C<initrdpath>. The filename must be given I<without> the initial C</> "
7516 #: ../src/guestfs-actions.pod:1951 ../fish/guestfish-actions.pod:1525
7518 "For example, in guestfish you could use the following command to examine the "
7519 "boot script (usually called C</init>) contained in a Linux initrd or "
7524 #: ../src/guestfs-actions.pod:1955 ../fish/guestfish-actions.pod:1529
7527 " initrd-cat /boot/initrd-<version>.img init\n"
7532 #: ../src/guestfs-actions.pod:1957
7533 msgid "See also C<guestfs_initrd_list>."
7537 #: ../src/guestfs-actions.pod:1959 ../src/guestfs-actions.pod:3897
7538 #: ../src/guestfs-actions.pod:3920 ../src/guestfs-actions.pod:4072
7540 "This function returns a buffer, or NULL on error. The size of the returned "
7541 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
7546 #: ../src/guestfs-actions.pod:1966
7547 msgid "guestfs_initrd_list"
7551 #: ../src/guestfs-actions.pod:1968
7554 " char **guestfs_initrd_list (guestfs_h *g,\n"
7555 "\t\tconst char *path);\n"
7560 #: ../src/guestfs-actions.pod:1971 ../fish/guestfish-actions.pod:1540
7561 msgid "This command lists out files contained in an initrd."
7565 #: ../src/guestfs-actions.pod:1973 ../fish/guestfish-actions.pod:1542
7567 "The files are listed without any initial C</> character. The files are "
7568 "listed in the order they appear (not necessarily alphabetical). Directory "
7569 "names are listed as separate items."
7573 #: ../src/guestfs-actions.pod:1977 ../fish/guestfish-actions.pod:1546
7575 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
7576 "initrd. We I<only> support the newer initramfs format (compressed cpio "
7581 #: ../src/guestfs-actions.pod:1985
7582 msgid "guestfs_inotify_add_watch"
7586 #: ../src/guestfs-actions.pod:1987
7589 " int64_t guestfs_inotify_add_watch (guestfs_h *g,\n"
7590 "\t\tconst char *path,\n"
7596 #: ../src/guestfs-actions.pod:1991 ../fish/guestfish-actions.pod:1554
7597 msgid "Watch C<path> for the events listed in C<mask>."
7601 #: ../src/guestfs-actions.pod:1993 ../fish/guestfish-actions.pod:1556
7603 "Note that if C<path> is a directory then events within that directory are "
7604 "watched, but this does I<not> happen recursively (in subdirectories)."
7608 #: ../src/guestfs-actions.pod:1997 ../fish/guestfish-actions.pod:1560
7610 "Note for non-C or non-Linux callers: the inotify events are defined by the "
7611 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
7615 #: ../src/guestfs-actions.pod:2003
7616 msgid "guestfs_inotify_close"
7620 #: ../src/guestfs-actions.pod:2005
7623 " int guestfs_inotify_close (guestfs_h *g);\n"
7628 #: ../src/guestfs-actions.pod:2007 ../fish/guestfish-actions.pod:1568
7630 "This closes the inotify handle which was previously opened by inotify_init. "
7631 "It removes all watches, throws away any pending events, and deallocates all "
7636 #: ../src/guestfs-actions.pod:2013
7637 msgid "guestfs_inotify_files"
7641 #: ../src/guestfs-actions.pod:2015
7644 " char **guestfs_inotify_files (guestfs_h *g);\n"
7649 #: ../src/guestfs-actions.pod:2017
7651 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
7652 "returns a list of pathnames of objects that were touched. The returned "
7653 "pathnames are sorted and deduplicated."
7657 #: ../src/guestfs-actions.pod:2025
7658 msgid "guestfs_inotify_init"
7662 #: ../src/guestfs-actions.pod:2027
7665 " int guestfs_inotify_init (guestfs_h *g,\n"
7666 "\t\tint maxevents);\n"
7671 #: ../src/guestfs-actions.pod:2030 ../fish/guestfish-actions.pod:1584
7673 "This command creates a new inotify handle. The inotify subsystem can be "
7674 "used to notify events which happen to objects in the guest filesystem."
7678 #: ../src/guestfs-actions.pod:2034
7680 "C<maxevents> is the maximum number of events which will be queued up between "
7681 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
7682 "passed as C<0>, then the kernel (or previously set) default is used. For "
7683 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
7684 "throws away events, but records the fact that it threw them away by setting "
7685 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
7686 "C<guestfs_inotify_read>)."
7690 #: ../src/guestfs-actions.pod:2044
7692 "Before any events are generated, you have to add some watches to the "
7693 "internal watch list. See: C<guestfs_inotify_add_watch>, "
7694 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
7698 #: ../src/guestfs-actions.pod:2050
7700 "Queued up events should be read periodically by calling "
7701 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
7702 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
7703 "often enough then you risk the internal queue overflowing."
7707 #: ../src/guestfs-actions.pod:2057
7709 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
7710 "This also removes any watches automatically."
7714 #: ../src/guestfs-actions.pod:2061 ../fish/guestfish-actions.pod:1615
7716 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
7717 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
7718 "that there is one global inotify handle per libguestfs instance."
7722 #: ../src/guestfs-actions.pod:2068
7723 msgid "guestfs_inotify_read"
7727 #: ../src/guestfs-actions.pod:2070
7730 " struct guestfs_inotify_event_list *guestfs_inotify_read (guestfs_h *g);\n"
7735 #: ../src/guestfs-actions.pod:2072 ../fish/guestfish-actions.pod:1624
7737 "Return the complete queue of events that have happened since the previous "
7742 #: ../src/guestfs-actions.pod:2075 ../fish/guestfish-actions.pod:1627
7743 msgid "If no events have happened, this returns an empty list."
7747 #: ../src/guestfs-actions.pod:2077 ../fish/guestfish-actions.pod:1629
7749 "I<Note>: In order to make sure that all events have been read, you must call "
7750 "this function repeatedly until it returns an empty list. The reason is that "
7751 "the call will read events up to the maximum appliance-to-host message size "
7752 "and leave remaining events in the queue."
7756 #: ../src/guestfs-actions.pod:2083
7758 "This function returns a C<struct guestfs_inotify_event_list *> (see "
7759 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
7760 "must call C<guestfs_free_inotify_event_list> after use>."
7764 #: ../src/guestfs-actions.pod:2088
7765 msgid "guestfs_inotify_rm_watch"
7769 #: ../src/guestfs-actions.pod:2090
7772 " int guestfs_inotify_rm_watch (guestfs_h *g,\n"
7778 #: ../src/guestfs-actions.pod:2093
7780 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
7784 #: ../src/guestfs-actions.pod:2098
7785 msgid "guestfs_inspect_get_arch"
7789 #: ../src/guestfs-actions.pod:2100
7792 " char *guestfs_inspect_get_arch (guestfs_h *g,\n"
7793 "\t\tconst char *root);\n"
7798 #: ../src/guestfs-actions.pod:2103 ../src/guestfs-actions.pod:2123
7799 #: ../src/guestfs-actions.pod:2173 ../src/guestfs-actions.pod:2196
7800 #: ../src/guestfs-actions.pod:2220 ../src/guestfs-actions.pod:2238
7801 #: ../src/guestfs-actions.pod:2268 ../src/guestfs-actions.pod:2289
7803 "This function should only be called with a root device string as returned by "
7804 "C<guestfs_inspect_os>."
7808 #: ../src/guestfs-actions.pod:2106
7810 "This returns the architecture of the inspected operating system. The "
7811 "possible return values are listed under C<guestfs_file_architecture>."
7815 #: ../src/guestfs-actions.pod:2110 ../fish/guestfish-actions.pod:1653
7817 "If the architecture could not be determined, then the string C<unknown> is "
7822 #: ../src/guestfs-actions.pod:2113 ../src/guestfs-actions.pod:2163
7823 #: ../src/guestfs-actions.pod:2211 ../src/guestfs-actions.pod:2279
7824 #: ../src/guestfs-actions.pod:2314 ../src/guestfs-actions.pod:2351
7825 #: ../fish/guestfish-actions.pod:1656 ../fish/guestfish-actions.pod:1702
7826 #: ../fish/guestfish-actions.pod:1741 ../fish/guestfish-actions.pod:1796
7827 #: ../fish/guestfish-actions.pod:1827 ../fish/guestfish-actions.pod:1861
7828 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
7832 #: ../src/guestfs-actions.pod:2118
7833 msgid "guestfs_inspect_get_distro"
7837 #: ../src/guestfs-actions.pod:2120
7840 " char *guestfs_inspect_get_distro (guestfs_h *g,\n"
7841 "\t\tconst char *root);\n"
7846 #: ../src/guestfs-actions.pod:2126 ../fish/guestfish-actions.pod:1665
7848 "This returns the distro (distribution) of the inspected operating system."
7852 #: ../src/guestfs-actions.pod:2129 ../fish/guestfish-actions.pod:1668
7853 msgid "Currently defined distros are:"
7857 #: ../src/guestfs-actions.pod:2133 ../fish/guestfish-actions.pod:1672
7862 #: ../src/guestfs-actions.pod:2135 ../fish/guestfish-actions.pod:1674
7863 msgid "Debian or a Debian-derived distro such as Ubuntu."
7867 #: ../src/guestfs-actions.pod:2137 ../fish/guestfish-actions.pod:1676
7872 #: ../src/guestfs-actions.pod:2139 ../fish/guestfish-actions.pod:1678
7877 #: ../src/guestfs-actions.pod:2141 ../fish/guestfish-actions.pod:1680
7878 msgid "\"redhat-based\""
7882 #: ../src/guestfs-actions.pod:2143 ../fish/guestfish-actions.pod:1682
7883 msgid "Some Red Hat-derived distro."
7887 #: ../src/guestfs-actions.pod:2145 ../fish/guestfish-actions.pod:1684
7892 #: ../src/guestfs-actions.pod:2147 ../fish/guestfish-actions.pod:1686
7893 msgid "Red Hat Enterprise Linux and some derivatives."
7897 #: ../src/guestfs-actions.pod:2149 ../src/guestfs-actions.pod:2301
7898 #: ../fish/guestfish-actions.pod:1688 ../fish/guestfish-actions.pod:1814
7903 #: ../src/guestfs-actions.pod:2151 ../fish/guestfish-actions.pod:1690
7905 "Windows does not have distributions. This string is returned if the OS type "
7910 #: ../src/guestfs-actions.pod:2154 ../src/guestfs-actions.pod:2305
7911 #: ../fish/guestfish-actions.pod:1693 ../fish/guestfish-actions.pod:1818
7916 #: ../src/guestfs-actions.pod:2156 ../fish/guestfish-actions.pod:1695
7917 msgid "The distro could not be determined."
7921 #: ../src/guestfs-actions.pod:2160 ../src/guestfs-actions.pod:2311
7922 #: ../fish/guestfish-actions.pod:1699 ../fish/guestfish-actions.pod:1824
7924 "Future versions of libguestfs may return other strings here. The caller "
7925 "should be prepared to handle any string."
7929 #: ../src/guestfs-actions.pod:2168
7930 msgid "guestfs_inspect_get_filesystems"
7934 #: ../src/guestfs-actions.pod:2170
7937 " char **guestfs_inspect_get_filesystems (guestfs_h *g,\n"
7938 "\t\tconst char *root);\n"
7943 #: ../src/guestfs-actions.pod:2176 ../fish/guestfish-actions.pod:1711
7945 "This returns a list of all the filesystems that we think are associated with "
7946 "this operating system. This includes the root filesystem, other ordinary "
7947 "filesystems, and non-mounted devices like swap partitions."
7951 #: ../src/guestfs-actions.pod:2181 ../fish/guestfish-actions.pod:1716
7953 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
7954 "to be shared between operating systems."
7958 #: ../src/guestfs-actions.pod:2184
7960 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7961 "C<guestfs_inspect_get_mountpoints>."
7965 #: ../src/guestfs-actions.pod:2191
7966 msgid "guestfs_inspect_get_major_version"
7970 #: ../src/guestfs-actions.pod:2193
7973 " int guestfs_inspect_get_major_version (guestfs_h *g,\n"
7974 "\t\tconst char *root);\n"
7979 #: ../src/guestfs-actions.pod:2199 ../fish/guestfish-actions.pod:1729
7981 "This returns the major version number of the inspected operating system."
7985 #: ../src/guestfs-actions.pod:2202 ../fish/guestfish-actions.pod:1732
7987 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
7988 "popular public names used by the operating system. Notably the operating "
7989 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
7990 "1). You can find out the real versions corresponding to releases of Windows "
7991 "by consulting Wikipedia or MSDN."
7995 #: ../src/guestfs-actions.pod:2209 ../src/guestfs-actions.pod:2226
7996 #: ../fish/guestfish-actions.pod:1739 ../fish/guestfish-actions.pod:1753
7997 msgid "If the version could not be determined, then C<0> is returned."
8001 #: ../src/guestfs-actions.pod:2215
8002 msgid "guestfs_inspect_get_minor_version"
8006 #: ../src/guestfs-actions.pod:2217
8009 " int guestfs_inspect_get_minor_version (guestfs_h *g,\n"
8010 "\t\tconst char *root);\n"
8015 #: ../src/guestfs-actions.pod:2223 ../fish/guestfish-actions.pod:1750
8017 "This returns the minor version number of the inspected operating system."
8021 #: ../src/guestfs-actions.pod:2228
8023 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8024 "C<guestfs_inspect_get_major_version>."
8028 #: ../src/guestfs-actions.pod:2233
8029 msgid "guestfs_inspect_get_mountpoints"
8033 #: ../src/guestfs-actions.pod:2235
8036 " char **guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
8037 "\t\tconst char *root);\n"
8042 #: ../src/guestfs-actions.pod:2241 ../fish/guestfish-actions.pod:1765
8044 "This returns a hash of where we think the filesystems associated with this "
8045 "operating system should be mounted. Callers should note that this is at "
8046 "best an educated guess made by reading configuration files such as C</etc/"
8051 #: ../src/guestfs-actions.pod:2246 ../fish/guestfish-actions.pod:1770
8053 "Each element in the returned hashtable has a key which is the path of the "
8054 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
8055 "mounted there (eg. C</dev/sda1>)."
8059 #: ../src/guestfs-actions.pod:2251 ../fish/guestfish-actions.pod:1775
8061 "Non-mounted devices such as swap devices are I<not> returned in this list."
8065 #: ../src/guestfs-actions.pod:2254
8067 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8068 "C<guestfs_inspect_get_filesystems>."
8072 #: ../src/guestfs-actions.pod:2257 ../src/guestfs-actions.pod:2597
8073 #: ../src/guestfs-actions.pod:3519 ../src/guestfs-actions.pod:5102
8075 "This function returns a NULL-terminated array of strings, or NULL if there "
8076 "was an error. The array of strings will always have length C<2n+1>, where "
8077 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
8078 "caller must free the strings and the array after use>."
8082 #: ../src/guestfs-actions.pod:2263
8083 msgid "guestfs_inspect_get_product_name"
8087 #: ../src/guestfs-actions.pod:2265
8090 " char *guestfs_inspect_get_product_name (guestfs_h *g,\n"
8091 "\t\tconst char *root);\n"
8096 #: ../src/guestfs-actions.pod:2271 ../fish/guestfish-actions.pod:1788
8098 "This returns the product name of the inspected operating system. The "
8099 "product name is generally some freeform string which can be displayed to the "
8100 "user, but should not be parsed by programs."
8104 #: ../src/guestfs-actions.pod:2276 ../fish/guestfish-actions.pod:1793
8106 "If the product name could not be determined, then the string C<unknown> is "
8111 #: ../src/guestfs-actions.pod:2284
8112 msgid "guestfs_inspect_get_type"
8116 #: ../src/guestfs-actions.pod:2286
8119 " char *guestfs_inspect_get_type (guestfs_h *g,\n"
8120 "\t\tconst char *root);\n"
8125 #: ../src/guestfs-actions.pod:2292 ../fish/guestfish-actions.pod:1805
8127 "This returns the type of the inspected operating system. Currently defined "
8132 #: ../src/guestfs-actions.pod:2297 ../fish/guestfish-actions.pod:1810
8137 #: ../src/guestfs-actions.pod:2299 ../fish/guestfish-actions.pod:1812
8138 msgid "Any Linux-based operating system."
8142 #: ../src/guestfs-actions.pod:2303 ../fish/guestfish-actions.pod:1816
8143 msgid "Any Microsoft Windows operating system."
8147 #: ../src/guestfs-actions.pod:2307 ../fish/guestfish-actions.pod:1820
8148 msgid "The operating system type could not be determined."
8152 #: ../src/guestfs-actions.pod:2319
8153 msgid "guestfs_inspect_os"
8157 #: ../src/guestfs-actions.pod:2321
8160 " char **guestfs_inspect_os (guestfs_h *g);\n"
8165 #: ../src/guestfs-actions.pod:2323 ../fish/guestfish-actions.pod:1833
8167 "This function uses other libguestfs functions and certain heuristics to "
8168 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
8169 "for operating systems."
8173 #: ../src/guestfs-actions.pod:2327 ../fish/guestfish-actions.pod:1837
8174 msgid "The list returned is empty if no operating systems were found."
8178 #: ../src/guestfs-actions.pod:2329 ../fish/guestfish-actions.pod:1839
8180 "If one operating system was found, then this returns a list with a single "
8181 "element, which is the name of the root filesystem of this operating system. "
8182 "It is also possible for this function to return a list containing more than "
8183 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
8184 "element being the root filesystem of one of the operating systems."
8188 #: ../src/guestfs-actions.pod:2336
8190 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
8191 "functions in order to query further information about each operating system, "
8192 "such as the name and version."
8196 #: ../src/guestfs-actions.pod:2341
8198 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
8199 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
8200 "the contents. This should be called with no disks currently mounted. The "
8201 "function may also use Augeas, so any existing Augeas handle will be closed."
8205 #: ../src/guestfs-actions.pod:2347 ../fish/guestfish-actions.pod:1857
8207 "This function cannot decrypt encrypted disks. The caller must do that first "
8208 "(supplying the necessary keys) if the disk is encrypted."
8212 #: ../src/guestfs-actions.pod:2353 ../src/guestfs-actions.pod:2558
8213 #: ../src/guestfs-actions.pod:2614
8214 msgid "See also C<guestfs_list_filesystems>."
8218 #: ../src/guestfs-actions.pod:2359
8219 msgid "guestfs_is_blockdev"
8223 #: ../src/guestfs-actions.pod:2361
8226 " int guestfs_is_blockdev (guestfs_h *g,\n"
8227 "\t\tconst char *path);\n"
8232 #: ../src/guestfs-actions.pod:2364 ../fish/guestfish-actions.pod:1869
8234 "This returns C<true> if and only if there is a block device with the given "
8239 #: ../src/guestfs-actions.pod:2367 ../src/guestfs-actions.pod:2390
8240 #: ../src/guestfs-actions.pod:2414 ../src/guestfs-actions.pod:2426
8241 #: ../src/guestfs-actions.pod:2439 ../src/guestfs-actions.pod:2483
8242 #: ../src/guestfs-actions.pod:2495
8243 msgid "See also C<guestfs_stat>."
8247 #: ../src/guestfs-actions.pod:2371
8248 msgid "guestfs_is_busy"
8252 #: ../src/guestfs-actions.pod:2373
8255 " int guestfs_is_busy (guestfs_h *g);\n"
8260 #: ../src/guestfs-actions.pod:2375 ../fish/guestfish-actions.pod:1878
8262 "This returns true iff this handle is busy processing a command (in the "
8267 #: ../src/guestfs-actions.pod:2382
8268 msgid "guestfs_is_chardev"
8272 #: ../src/guestfs-actions.pod:2384
8275 " int guestfs_is_chardev (guestfs_h *g,\n"
8276 "\t\tconst char *path);\n"
8281 #: ../src/guestfs-actions.pod:2387 ../fish/guestfish-actions.pod:1887
8283 "This returns C<true> if and only if there is a character device with the "
8284 "given C<path> name."
8288 #: ../src/guestfs-actions.pod:2394
8289 msgid "guestfs_is_config"
8293 #: ../src/guestfs-actions.pod:2396
8296 " int guestfs_is_config (guestfs_h *g);\n"
8301 #: ../src/guestfs-actions.pod:2398 ../fish/guestfish-actions.pod:1896
8303 "This returns true iff this handle is being configured (in the C<CONFIG> "
8308 #: ../src/guestfs-actions.pod:2405
8309 msgid "guestfs_is_dir"
8313 #: ../src/guestfs-actions.pod:2407
8316 " int guestfs_is_dir (guestfs_h *g,\n"
8317 "\t\tconst char *path);\n"
8322 #: ../src/guestfs-actions.pod:2410 ../fish/guestfish-actions.pod:1905
8324 "This returns C<true> if and only if there is a directory with the given "
8325 "C<path> name. Note that it returns false for other objects like files."
8329 #: ../src/guestfs-actions.pod:2418
8330 msgid "guestfs_is_fifo"
8334 #: ../src/guestfs-actions.pod:2420
8337 " int guestfs_is_fifo (guestfs_h *g,\n"
8338 "\t\tconst char *path);\n"
8343 #: ../src/guestfs-actions.pod:2423 ../fish/guestfish-actions.pod:1915
8345 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
8346 "given C<path> name."
8350 #: ../src/guestfs-actions.pod:2430
8351 msgid "guestfs_is_file"
8355 #: ../src/guestfs-actions.pod:2432
8358 " int guestfs_is_file (guestfs_h *g,\n"
8359 "\t\tconst char *path);\n"
8364 #: ../src/guestfs-actions.pod:2435 ../fish/guestfish-actions.pod:1924
8366 "This returns C<true> if and only if there is a regular file with the given "
8367 "C<path> name. Note that it returns false for other objects like directories."
8371 #: ../src/guestfs-actions.pod:2443
8372 msgid "guestfs_is_launching"
8376 #: ../src/guestfs-actions.pod:2445
8379 " int guestfs_is_launching (guestfs_h *g);\n"
8384 #: ../src/guestfs-actions.pod:2447 ../fish/guestfish-actions.pod:1934
8386 "This returns true iff this handle is launching the subprocess (in the "
8387 "C<LAUNCHING> state)."
8391 #: ../src/guestfs-actions.pod:2454
8392 msgid "guestfs_is_lv"
8396 #: ../src/guestfs-actions.pod:2456
8399 " int guestfs_is_lv (guestfs_h *g,\n"
8400 "\t\tconst char *device);\n"
8405 #: ../src/guestfs-actions.pod:2459 ../fish/guestfish-actions.pod:1943
8407 "This command tests whether C<device> is a logical volume, and returns true "
8408 "iff this is the case."
8412 #: ../src/guestfs-actions.pod:2464
8413 msgid "guestfs_is_ready"
8417 #: ../src/guestfs-actions.pod:2466
8420 " int guestfs_is_ready (guestfs_h *g);\n"
8425 #: ../src/guestfs-actions.pod:2468 ../fish/guestfish-actions.pod:1950
8427 "This returns true iff this handle is ready to accept commands (in the "
8432 #: ../src/guestfs-actions.pod:2475
8433 msgid "guestfs_is_socket"
8437 #: ../src/guestfs-actions.pod:2477
8440 " int guestfs_is_socket (guestfs_h *g,\n"
8441 "\t\tconst char *path);\n"
8446 #: ../src/guestfs-actions.pod:2480 ../fish/guestfish-actions.pod:1959
8448 "This returns C<true> if and only if there is a Unix domain socket with the "
8449 "given C<path> name."
8453 #: ../src/guestfs-actions.pod:2487
8454 msgid "guestfs_is_symlink"
8458 #: ../src/guestfs-actions.pod:2489
8461 " int guestfs_is_symlink (guestfs_h *g,\n"
8462 "\t\tconst char *path);\n"
8467 #: ../src/guestfs-actions.pod:2492 ../fish/guestfish-actions.pod:1968
8469 "This returns C<true> if and only if there is a symbolic link with the given "
8474 #: ../src/guestfs-actions.pod:2499
8475 msgid "guestfs_kill_subprocess"
8479 #: ../src/guestfs-actions.pod:2501
8482 " int guestfs_kill_subprocess (guestfs_h *g);\n"
8487 #: ../src/guestfs-actions.pod:2503 ../fish/guestfish-actions.pod:1977
8488 msgid "This kills the qemu subprocess. You should never need to call this."
8492 #: ../src/guestfs-actions.pod:2507
8493 msgid "guestfs_launch"
8497 #: ../src/guestfs-actions.pod:2509
8500 " int guestfs_launch (guestfs_h *g);\n"
8505 #: ../src/guestfs-actions.pod:2511 ../fish/guestfish-actions.pod:1985
8507 "Internally libguestfs is implemented by running a virtual machine using "
8512 #: ../src/guestfs-actions.pod:2514 ../fish/guestfish-actions.pod:1988
8514 "You should call this after configuring the handle (eg. adding drives) but "
8515 "before performing any actions."
8519 #: ../src/guestfs-actions.pod:2519
8520 msgid "guestfs_lchown"
8524 #: ../src/guestfs-actions.pod:2521
8527 " int guestfs_lchown (guestfs_h *g,\n"
8530 "\t\tconst char *path);\n"
8535 #: ../src/guestfs-actions.pod:2526
8537 "Change the file owner to C<owner> and group to C<group>. This is like "
8538 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
8539 "changed, not the target."
8543 #: ../src/guestfs-actions.pod:2536
8544 msgid "guestfs_lgetxattrs"
8548 #: ../src/guestfs-actions.pod:2538
8551 " struct guestfs_xattr_list *guestfs_lgetxattrs (guestfs_h *g,\n"
8552 "\t\tconst char *path);\n"
8557 #: ../src/guestfs-actions.pod:2541
8559 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
8560 "then it returns the extended attributes of the link itself."
8564 #: ../src/guestfs-actions.pod:2550
8565 msgid "guestfs_list_devices"
8569 #: ../src/guestfs-actions.pod:2552
8572 " char **guestfs_list_devices (guestfs_h *g);\n"
8577 #: ../src/guestfs-actions.pod:2554 ../fish/guestfish-actions.pod:2015
8578 msgid "List all the block devices."
8582 #: ../src/guestfs-actions.pod:2556 ../fish/guestfish-actions.pod:2017
8583 msgid "The full block device names are returned, eg. C</dev/sda>."
8587 #: ../src/guestfs-actions.pod:2564
8588 msgid "guestfs_list_filesystems"
8592 #: ../src/guestfs-actions.pod:2566
8595 " char **guestfs_list_filesystems (guestfs_h *g);\n"
8600 #: ../src/guestfs-actions.pod:2568 ../fish/guestfish-actions.pod:2025
8602 "This inspection command looks for filesystems on partitions, block devices "
8603 "and logical volumes, returning a list of devices containing filesystems and "
8608 #: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:2029
8610 "The return value is a hash, where the keys are the devices containing "
8611 "filesystems, and the values are the filesystem types. For example:"
8615 #: ../src/guestfs-actions.pod:2576 ../fish/guestfish-actions.pod:2033
8618 " \"/dev/sda1\" => \"ntfs\"\n"
8619 " \"/dev/sda2\" => \"ext2\"\n"
8620 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
8621 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
8626 #: ../src/guestfs-actions.pod:2581 ../fish/guestfish-actions.pod:2038
8628 "The value can have the special value \"unknown\", meaning the content of the "
8629 "device is undetermined or empty. \"swap\" means a Linux swap partition."
8633 #: ../src/guestfs-actions.pod:2585
8635 "This command runs other libguestfs commands, which might include "
8636 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
8637 "soon after launch and only when nothing is mounted."
8641 #: ../src/guestfs-actions.pod:2589
8643 "Not all of the filesystems returned will be mountable. In particular, swap "
8644 "partitions are returned in the list. Also this command does not check that "
8645 "each filesystem found is valid and mountable, and some filesystems might be "
8646 "mountable but require special options. Filesystems may not all belong to a "
8647 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
8651 #: ../src/guestfs-actions.pod:2603
8652 msgid "guestfs_list_partitions"
8656 #: ../src/guestfs-actions.pod:2605
8659 " char **guestfs_list_partitions (guestfs_h *g);\n"
8664 #: ../src/guestfs-actions.pod:2607 ../fish/guestfish-actions.pod:2058
8665 msgid "List all the partitions detected on all block devices."
8669 #: ../src/guestfs-actions.pod:2609 ../fish/guestfish-actions.pod:2060
8670 msgid "The full partition device names are returned, eg. C</dev/sda1>"
8674 #: ../src/guestfs-actions.pod:2611
8676 "This does not return logical volumes. For that you will need to call "
8681 #: ../src/guestfs-actions.pod:2620
8686 #: ../src/guestfs-actions.pod:2622
8689 " char *guestfs_ll (guestfs_h *g,\n"
8690 "\t\tconst char *directory);\n"
8695 #: ../src/guestfs-actions.pod:2625 ../fish/guestfish-actions.pod:2071
8697 "List the files in C<directory> (relative to the root directory, there is no "
8698 "cwd) in the format of 'ls -la'."
8702 #: ../src/guestfs-actions.pod:2628 ../fish/guestfish-actions.pod:2074
8704 "This command is mostly useful for interactive sessions. It is I<not> "
8705 "intended that you try to parse the output string."
8709 #: ../src/guestfs-actions.pod:2634
8714 #: ../src/guestfs-actions.pod:2636
8717 " int guestfs_ln (guestfs_h *g,\n"
8718 "\t\tconst char *target,\n"
8719 "\t\tconst char *linkname);\n"
8724 #: ../src/guestfs-actions.pod:2640 ../fish/guestfish-actions.pod:2081
8725 msgid "This command creates a hard link using the C<ln> command."
8729 #: ../src/guestfs-actions.pod:2644
8730 msgid "guestfs_ln_f"
8734 #: ../src/guestfs-actions.pod:2646
8737 " int guestfs_ln_f (guestfs_h *g,\n"
8738 "\t\tconst char *target,\n"
8739 "\t\tconst char *linkname);\n"
8744 #: ../src/guestfs-actions.pod:2650 ../fish/guestfish-actions.pod:2087
8746 "This command creates a hard link using the C<ln -f> command. The C<-f> "
8747 "option removes the link (C<linkname>) if it exists already."
8751 #: ../src/guestfs-actions.pod:2655
8752 msgid "guestfs_ln_s"
8756 #: ../src/guestfs-actions.pod:2657
8759 " int guestfs_ln_s (guestfs_h *g,\n"
8760 "\t\tconst char *target,\n"
8761 "\t\tconst char *linkname);\n"
8766 #: ../src/guestfs-actions.pod:2661 ../fish/guestfish-actions.pod:2094
8767 msgid "This command creates a symbolic link using the C<ln -s> command."
8771 #: ../src/guestfs-actions.pod:2665
8772 msgid "guestfs_ln_sf"
8776 #: ../src/guestfs-actions.pod:2667
8779 " int guestfs_ln_sf (guestfs_h *g,\n"
8780 "\t\tconst char *target,\n"
8781 "\t\tconst char *linkname);\n"
8786 #: ../src/guestfs-actions.pod:2671 ../fish/guestfish-actions.pod:2100
8788 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
8789 "option removes the link (C<linkname>) if it exists already."
8793 #: ../src/guestfs-actions.pod:2676
8794 msgid "guestfs_lremovexattr"
8798 #: ../src/guestfs-actions.pod:2678
8801 " int guestfs_lremovexattr (guestfs_h *g,\n"
8802 "\t\tconst char *xattr,\n"
8803 "\t\tconst char *path);\n"
8808 #: ../src/guestfs-actions.pod:2682
8810 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
8811 "link, then it removes an extended attribute of the link itself."
8815 #: ../src/guestfs-actions.pod:2688
8820 #: ../src/guestfs-actions.pod:2690
8823 " char **guestfs_ls (guestfs_h *g,\n"
8824 "\t\tconst char *directory);\n"
8829 #: ../src/guestfs-actions.pod:2693 ../fish/guestfish-actions.pod:2115
8831 "List the files in C<directory> (relative to the root directory, there is no "
8832 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
8836 #: ../src/guestfs-actions.pod:2697
8838 "This command is mostly useful for interactive sessions. Programs should "
8839 "probably use C<guestfs_readdir> instead."
8843 #: ../src/guestfs-actions.pod:2704
8844 msgid "guestfs_lsetxattr"
8848 #: ../src/guestfs-actions.pod:2706
8851 " int guestfs_lsetxattr (guestfs_h *g,\n"
8852 "\t\tconst char *xattr,\n"
8853 "\t\tconst char *val,\n"
8855 "\t\tconst char *path);\n"
8860 #: ../src/guestfs-actions.pod:2712
8862 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
8863 "then it sets an extended attribute of the link itself."
8867 #: ../src/guestfs-actions.pod:2718
8868 msgid "guestfs_lstat"
8872 #: ../src/guestfs-actions.pod:2720
8875 " struct guestfs_stat *guestfs_lstat (guestfs_h *g,\n"
8876 "\t\tconst char *path);\n"
8881 #: ../src/guestfs-actions.pod:2723 ../src/guestfs-actions.pod:4767
8882 #: ../fish/guestfish-actions.pod:2134 ../fish/guestfish-actions.pod:3688
8883 msgid "Returns file information for the given C<path>."
8887 #: ../src/guestfs-actions.pod:2725
8889 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
8890 "link, then the link is stat-ed, not the file it refers to."
8894 #: ../src/guestfs-actions.pod:2729 ../fish/guestfish-actions.pod:2140
8895 msgid "This is the same as the C<lstat(2)> system call."
8899 #: ../src/guestfs-actions.pod:2731 ../src/guestfs-actions.pod:4771
8901 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
8902 "error. I<The caller must call C<guestfs_free_stat> after use>."
8906 #: ../src/guestfs-actions.pod:2735
8907 msgid "guestfs_lstatlist"
8911 #: ../src/guestfs-actions.pod:2737
8914 " struct guestfs_stat_list *guestfs_lstatlist (guestfs_h *g,\n"
8915 "\t\tconst char *path,\n"
8916 "\t\tchar *const *names);\n"
8921 #: ../src/guestfs-actions.pod:2741
8923 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
8924 "files, where all files are in the directory C<path>. C<names> is the list "
8925 "of files from this directory."
8929 #: ../src/guestfs-actions.pod:2745 ../fish/guestfish-actions.pod:2150
8931 "On return you get a list of stat structs, with a one-to-one correspondence "
8932 "to the C<names> list. If any name did not exist or could not be lstat'd, "
8933 "then the C<ino> field of that structure is set to C<-1>."
8937 #: ../src/guestfs-actions.pod:2750
8939 "This call is intended for programs that want to efficiently list a directory "
8940 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
8941 "for a similarly efficient call for getting extended attributes. Very long "
8942 "directory listings might cause the protocol message size to be exceeded, "
8943 "causing this call to fail. The caller must split up such requests into "
8944 "smaller groups of names."
8948 #: ../src/guestfs-actions.pod:2758
8950 "This function returns a C<struct guestfs_stat_list *> (see E<lt>guestfs-"
8951 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
8952 "C<guestfs_free_stat_list> after use>."
8956 #: ../src/guestfs-actions.pod:2763
8957 msgid "guestfs_luks_add_key"
8961 #: ../src/guestfs-actions.pod:2765
8964 " int guestfs_luks_add_key (guestfs_h *g,\n"
8965 "\t\tconst char *device,\n"
8966 "\t\tconst char *key,\n"
8967 "\t\tconst char *newkey,\n"
8968 "\t\tint keyslot);\n"
8973 #: ../src/guestfs-actions.pod:2771 ../fish/guestfish-actions.pod:2167
8975 "This command adds a new key on LUKS device C<device>. C<key> is any "
8976 "existing key, and is used to access the device. C<newkey> is the new key to "
8977 "add. C<keyslot> is the key slot that will be replaced."
8981 #: ../src/guestfs-actions.pod:2776
8983 "Note that if C<keyslot> already contains a key, then this command will "
8984 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
8988 #: ../src/guestfs-actions.pod:2782 ../src/guestfs-actions.pod:2816
8989 #: ../src/guestfs-actions.pod:2836 ../src/guestfs-actions.pod:2853
8990 #: ../src/guestfs-actions.pod:2882 ../src/guestfs-actions.pod:2898
8992 "This function takes a key or passphrase parameter which could contain "
8993 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
8998 #: ../src/guestfs-actions.pod:2786
8999 msgid "guestfs_luks_close"
9003 #: ../src/guestfs-actions.pod:2788
9006 " int guestfs_luks_close (guestfs_h *g,\n"
9007 "\t\tconst char *device);\n"
9012 #: ../src/guestfs-actions.pod:2791
9014 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
9015 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
9016 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
9017 "underlying block device."
9021 #: ../src/guestfs-actions.pod:2799
9022 msgid "guestfs_luks_format"
9026 #: ../src/guestfs-actions.pod:2801
9029 " int guestfs_luks_format (guestfs_h *g,\n"
9030 "\t\tconst char *device,\n"
9031 "\t\tconst char *key,\n"
9032 "\t\tint keyslot);\n"
9037 #: ../src/guestfs-actions.pod:2806 ../fish/guestfish-actions.pod:2193
9039 "This command erases existing data on C<device> and formats the device as a "
9040 "LUKS encrypted device. C<key> is the initial key, which is added to key "
9041 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
9045 #: ../src/guestfs-actions.pod:2813 ../src/guestfs-actions.pod:2833
9046 #: ../src/guestfs-actions.pod:2935 ../src/guestfs-actions.pod:3647
9047 #: ../src/guestfs-actions.pod:4308 ../src/guestfs-actions.pod:4629
9048 #: ../src/guestfs-actions.pod:4649 ../src/guestfs-actions.pod:4672
9049 #: ../src/guestfs-actions.pod:5637 ../fish/guestfish-actions.pod:2201
9050 #: ../fish/guestfish-actions.pod:2214 ../fish/guestfish-actions.pod:2285
9051 #: ../fish/guestfish-actions.pod:2800 ../fish/guestfish-actions.pod:3307
9052 #: ../fish/guestfish-actions.pod:3587 ../fish/guestfish-actions.pod:3603
9053 #: ../fish/guestfish-actions.pod:3618 ../fish/guestfish-actions.pod:4333
9055 "B<This command is dangerous. Without careful use you can easily destroy all "
9060 #: ../src/guestfs-actions.pod:2820
9061 msgid "guestfs_luks_format_cipher"
9065 #: ../src/guestfs-actions.pod:2822
9068 " int guestfs_luks_format_cipher (guestfs_h *g,\n"
9069 "\t\tconst char *device,\n"
9070 "\t\tconst char *key,\n"
9071 "\t\tint keyslot,\n"
9072 "\t\tconst char *cipher);\n"
9077 #: ../src/guestfs-actions.pod:2828
9079 "This command is the same as C<guestfs_luks_format> but it also allows you to "
9080 "set the C<cipher> used."
9084 #: ../src/guestfs-actions.pod:2840
9085 msgid "guestfs_luks_kill_slot"
9089 #: ../src/guestfs-actions.pod:2842
9092 " int guestfs_luks_kill_slot (guestfs_h *g,\n"
9093 "\t\tconst char *device,\n"
9094 "\t\tconst char *key,\n"
9095 "\t\tint keyslot);\n"
9100 #: ../src/guestfs-actions.pod:2847 ../fish/guestfish-actions.pod:2221
9102 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
9103 "device C<device>. C<key> must be one of the I<other> keys."
9107 #: ../src/guestfs-actions.pod:2857
9108 msgid "guestfs_luks_open"
9112 #: ../src/guestfs-actions.pod:2859
9115 " int guestfs_luks_open (guestfs_h *g,\n"
9116 "\t\tconst char *device,\n"
9117 "\t\tconst char *key,\n"
9118 "\t\tconst char *mapname);\n"
9123 #: ../src/guestfs-actions.pod:2864 ../fish/guestfish-actions.pod:2232
9125 "This command opens a block device which has been encrypted according to the "
9126 "Linux Unified Key Setup (LUKS) standard."
9130 #: ../src/guestfs-actions.pod:2867 ../fish/guestfish-actions.pod:2235
9131 msgid "C<device> is the encrypted block device or partition."
9135 #: ../src/guestfs-actions.pod:2869 ../fish/guestfish-actions.pod:2237
9137 "The caller must supply one of the keys associated with the LUKS block "
9138 "device, in the C<key> parameter."
9142 #: ../src/guestfs-actions.pod:2872 ../fish/guestfish-actions.pod:2240
9144 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
9145 "writes to this block device are decrypted from and encrypted to the "
9146 "underlying C<device> respectively."
9150 #: ../src/guestfs-actions.pod:2876
9152 "If this block device contains LVM volume groups, then calling "
9153 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
9158 #: ../src/guestfs-actions.pod:2886
9159 msgid "guestfs_luks_open_ro"
9163 #: ../src/guestfs-actions.pod:2888
9166 " int guestfs_luks_open_ro (guestfs_h *g,\n"
9167 "\t\tconst char *device,\n"
9168 "\t\tconst char *key,\n"
9169 "\t\tconst char *mapname);\n"
9174 #: ../src/guestfs-actions.pod:2893
9176 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
9181 #: ../src/guestfs-actions.pod:2902
9182 msgid "guestfs_lvcreate"
9186 #: ../src/guestfs-actions.pod:2904
9189 " int guestfs_lvcreate (guestfs_h *g,\n"
9190 "\t\tconst char *logvol,\n"
9191 "\t\tconst char *volgroup,\n"
9192 "\t\tint mbytes);\n"
9197 #: ../src/guestfs-actions.pod:2909 ../fish/guestfish-actions.pod:2265
9199 "This creates an LVM logical volume called C<logvol> on the volume group "
9200 "C<volgroup>, with C<size> megabytes."
9204 #: ../src/guestfs-actions.pod:2914
9205 msgid "guestfs_lvm_clear_filter"
9209 #: ../src/guestfs-actions.pod:2916
9212 " int guestfs_lvm_clear_filter (guestfs_h *g);\n"
9217 #: ../src/guestfs-actions.pod:2918
9219 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
9220 "see every block device."
9224 #: ../src/guestfs-actions.pod:2921 ../src/guestfs-actions.pod:2957
9225 #: ../fish/guestfish-actions.pod:2275 ../fish/guestfish-actions.pod:2306
9227 "This command also clears the LVM cache and performs a volume group scan."
9231 #: ../src/guestfs-actions.pod:2926
9232 msgid "guestfs_lvm_remove_all"
9236 #: ../src/guestfs-actions.pod:2928
9239 " int guestfs_lvm_remove_all (guestfs_h *g);\n"
9244 #: ../src/guestfs-actions.pod:2930 ../fish/guestfish-actions.pod:2282
9246 "This command removes all LVM logical volumes, volume groups and physical "
9251 #: ../src/guestfs-actions.pod:2938
9252 msgid "guestfs_lvm_set_filter"
9256 #: ../src/guestfs-actions.pod:2940
9259 " int guestfs_lvm_set_filter (guestfs_h *g,\n"
9260 "\t\tchar *const *devices);\n"
9265 #: ../src/guestfs-actions.pod:2943 ../fish/guestfish-actions.pod:2292
9267 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
9268 "block devices in the list C<devices>, and will ignore all other attached "
9273 #: ../src/guestfs-actions.pod:2947 ../fish/guestfish-actions.pod:2296
9275 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
9276 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
9277 "there are two types of duplication possible: either cloned PVs/VGs which "
9278 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
9279 "same name. In normal operation you cannot create this situation, but you "
9280 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
9281 "inside the LVM metadata."
9285 #: ../src/guestfs-actions.pod:2960 ../fish/guestfish-actions.pod:2309
9286 msgid "You can filter whole block devices or individual partitions."
9290 #: ../src/guestfs-actions.pod:2962 ../fish/guestfish-actions.pod:2311
9292 "You cannot use this if any VG is currently in use (eg. contains a mounted "
9293 "filesystem), even if you are not filtering out that VG."
9297 #: ../src/guestfs-actions.pod:2968
9298 msgid "guestfs_lvremove"
9302 #: ../src/guestfs-actions.pod:2970
9305 " int guestfs_lvremove (guestfs_h *g,\n"
9306 "\t\tconst char *device);\n"
9311 #: ../src/guestfs-actions.pod:2973 ../fish/guestfish-actions.pod:2319
9313 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
9314 "LV, such as C</dev/VG/LV>."
9318 #: ../src/guestfs-actions.pod:2976 ../fish/guestfish-actions.pod:2322
9320 "You can also remove all LVs in a volume group by specifying the VG name, C</"
9325 #: ../src/guestfs-actions.pod:2981
9326 msgid "guestfs_lvrename"
9330 #: ../src/guestfs-actions.pod:2983
9333 " int guestfs_lvrename (guestfs_h *g,\n"
9334 "\t\tconst char *logvol,\n"
9335 "\t\tconst char *newlogvol);\n"
9340 #: ../src/guestfs-actions.pod:2987 ../fish/guestfish-actions.pod:2329
9341 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
9345 #: ../src/guestfs-actions.pod:2991
9346 msgid "guestfs_lvresize"
9350 #: ../src/guestfs-actions.pod:2993
9353 " int guestfs_lvresize (guestfs_h *g,\n"
9354 "\t\tconst char *device,\n"
9355 "\t\tint mbytes);\n"
9360 #: ../src/guestfs-actions.pod:2997 ../fish/guestfish-actions.pod:2335
9362 "This resizes (expands or shrinks) an existing LVM logical volume to "
9363 "C<mbytes>. When reducing, data in the reduced part is lost."
9367 #: ../src/guestfs-actions.pod:3003
9368 msgid "guestfs_lvresize_free"
9372 #: ../src/guestfs-actions.pod:3005
9375 " int guestfs_lvresize_free (guestfs_h *g,\n"
9376 "\t\tconst char *lv,\n"
9377 "\t\tint percent);\n"
9382 #: ../src/guestfs-actions.pod:3009 ../fish/guestfish-actions.pod:2343
9384 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
9385 "remaining free space in the volume group. Commonly you would call this with "
9386 "pc = 100 which expands the logical volume as much as possible, using all "
9387 "remaining free space in the volume group."
9391 #: ../src/guestfs-actions.pod:3017
9396 #: ../src/guestfs-actions.pod:3019
9399 " char **guestfs_lvs (guestfs_h *g);\n"
9404 #: ../src/guestfs-actions.pod:3021 ../fish/guestfish-actions.pod:2353
9406 "List all the logical volumes detected. This is the equivalent of the L<lvs"
9411 #: ../src/guestfs-actions.pod:3024 ../fish/guestfish-actions.pod:2356
9413 "This returns a list of the logical volume device names (eg. C</dev/"
9414 "VolGroup00/LogVol00>)."
9418 #: ../src/guestfs-actions.pod:3027
9419 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
9423 #: ../src/guestfs-actions.pod:3033
9424 msgid "guestfs_lvs_full"
9428 #: ../src/guestfs-actions.pod:3035
9431 " struct guestfs_lvm_lv_list *guestfs_lvs_full (guestfs_h *g);\n"
9436 #: ../src/guestfs-actions.pod:3037 ../fish/guestfish-actions.pod:2365
9438 "List all the logical volumes detected. This is the equivalent of the L<lvs"
9439 "(8)> command. The \"full\" version includes all fields."
9443 #: ../src/guestfs-actions.pod:3040
9445 "This function returns a C<struct guestfs_lvm_lv_list *> (see E<lt>guestfs-"
9446 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
9447 "C<guestfs_free_lvm_lv_list> after use>."
9451 #: ../src/guestfs-actions.pod:3045
9452 msgid "guestfs_lvuuid"
9456 #: ../src/guestfs-actions.pod:3047
9459 " char *guestfs_lvuuid (guestfs_h *g,\n"
9460 "\t\tconst char *device);\n"
9465 #: ../src/guestfs-actions.pod:3050 ../fish/guestfish-actions.pod:2372
9466 msgid "This command returns the UUID of the LVM LV C<device>."
9470 #: ../src/guestfs-actions.pod:3055
9471 msgid "guestfs_lxattrlist"
9475 #: ../src/guestfs-actions.pod:3057
9478 " struct guestfs_xattr_list *guestfs_lxattrlist (guestfs_h *g,\n"
9479 "\t\tconst char *path,\n"
9480 "\t\tchar *const *names);\n"
9485 #: ../src/guestfs-actions.pod:3061 ../fish/guestfish-actions.pod:2378
9487 "This call allows you to get the extended attributes of multiple files, where "
9488 "all files are in the directory C<path>. C<names> is the list of files from "
9493 #: ../src/guestfs-actions.pod:3065 ../fish/guestfish-actions.pod:2382
9495 "On return you get a flat list of xattr structs which must be interpreted "
9496 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
9497 "C<attrval> in this struct is zero-length to indicate there was an error "
9498 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
9499 "number (the number of following attributes for this file, which could be C<"
9500 "\"0\">). Then after the first xattr struct are the zero or more attributes "
9501 "for the first named file. This repeats for the second and subsequent files."
9505 #: ../src/guestfs-actions.pod:3075
9507 "This call is intended for programs that want to efficiently list a directory "
9508 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
9509 "a similarly efficient call for getting standard stats. Very long directory "
9510 "listings might cause the protocol message size to be exceeded, causing this "
9511 "call to fail. The caller must split up such requests into smaller groups of "
9516 #: ../src/guestfs-actions.pod:3088
9517 msgid "guestfs_mkdir"
9521 #: ../src/guestfs-actions.pod:3090
9524 " int guestfs_mkdir (guestfs_h *g,\n"
9525 "\t\tconst char *path);\n"
9530 #: ../src/guestfs-actions.pod:3093 ../fish/guestfish-actions.pod:2404
9531 msgid "Create a directory named C<path>."
9535 #: ../src/guestfs-actions.pod:3097
9536 msgid "guestfs_mkdir_mode"
9540 #: ../src/guestfs-actions.pod:3099
9543 " int guestfs_mkdir_mode (guestfs_h *g,\n"
9544 "\t\tconst char *path,\n"
9550 #: ../src/guestfs-actions.pod:3103 ../fish/guestfish-actions.pod:2410
9552 "This command creates a directory, setting the initial permissions of the "
9553 "directory to C<mode>."
9557 #: ../src/guestfs-actions.pod:3106 ../fish/guestfish-actions.pod:2413
9559 "For common Linux filesystems, the actual mode which is set will be C<mode & "
9560 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
9565 #: ../src/guestfs-actions.pod:3110
9566 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
9570 #: ../src/guestfs-actions.pod:3114
9571 msgid "guestfs_mkdir_p"
9575 #: ../src/guestfs-actions.pod:3116
9578 " int guestfs_mkdir_p (guestfs_h *g,\n"
9579 "\t\tconst char *path);\n"
9584 #: ../src/guestfs-actions.pod:3119 ../fish/guestfish-actions.pod:2423
9586 "Create a directory named C<path>, creating any parent directories as "
9587 "necessary. This is like the C<mkdir -p> shell command."
9591 #: ../src/guestfs-actions.pod:3124
9592 msgid "guestfs_mkdtemp"
9596 #: ../src/guestfs-actions.pod:3126
9599 " char *guestfs_mkdtemp (guestfs_h *g,\n"
9600 "\t\tconst char *template);\n"
9605 #: ../src/guestfs-actions.pod:3129 ../fish/guestfish-actions.pod:2430
9607 "This command creates a temporary directory. The C<template> parameter "
9608 "should be a full pathname for the temporary directory name with the final "
9609 "six characters being \"XXXXXX\"."
9613 #: ../src/guestfs-actions.pod:3134 ../fish/guestfish-actions.pod:2435
9615 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
9616 "being suitable for Windows filesystems."
9620 #: ../src/guestfs-actions.pod:3137 ../fish/guestfish-actions.pod:2438
9621 msgid "The name of the temporary directory that was created is returned."
9625 #: ../src/guestfs-actions.pod:3140 ../fish/guestfish-actions.pod:2441
9626 msgid "The temporary directory is created with mode 0700 and is owned by root."
9630 #: ../src/guestfs-actions.pod:3143 ../fish/guestfish-actions.pod:2444
9632 "The caller is responsible for deleting the temporary directory and its "
9633 "contents after use."
9637 #: ../src/guestfs-actions.pod:3146 ../fish/guestfish-actions.pod:2447
9638 msgid "See also: L<mkdtemp(3)>"
9642 #: ../src/guestfs-actions.pod:3151
9643 msgid "guestfs_mke2fs_J"
9647 #: ../src/guestfs-actions.pod:3153
9650 " int guestfs_mke2fs_J (guestfs_h *g,\n"
9651 "\t\tconst char *fstype,\n"
9652 "\t\tint blocksize,\n"
9653 "\t\tconst char *device,\n"
9654 "\t\tconst char *journal);\n"
9659 #: ../src/guestfs-actions.pod:3159 ../fish/guestfish-actions.pod:2453
9661 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
9662 "C<journal>. It is equivalent to the command:"
9666 #: ../src/guestfs-actions.pod:3163 ../fish/guestfish-actions.pod:2457
9669 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
9674 #: ../src/guestfs-actions.pod:3165
9675 msgid "See also C<guestfs_mke2journal>."
9679 #: ../src/guestfs-actions.pod:3169
9680 msgid "guestfs_mke2fs_JL"
9684 #: ../src/guestfs-actions.pod:3171
9687 " int guestfs_mke2fs_JL (guestfs_h *g,\n"
9688 "\t\tconst char *fstype,\n"
9689 "\t\tint blocksize,\n"
9690 "\t\tconst char *device,\n"
9691 "\t\tconst char *label);\n"
9696 #: ../src/guestfs-actions.pod:3177 ../fish/guestfish-actions.pod:2465
9698 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
9699 "the journal labeled C<label>."
9703 #: ../src/guestfs-actions.pod:3180
9704 msgid "See also C<guestfs_mke2journal_L>."
9708 #: ../src/guestfs-actions.pod:3184
9709 msgid "guestfs_mke2fs_JU"
9713 #: ../src/guestfs-actions.pod:3186
9716 " int guestfs_mke2fs_JU (guestfs_h *g,\n"
9717 "\t\tconst char *fstype,\n"
9718 "\t\tint blocksize,\n"
9719 "\t\tconst char *device,\n"
9720 "\t\tconst char *uuid);\n"
9725 #: ../src/guestfs-actions.pod:3192 ../fish/guestfish-actions.pod:2474
9727 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
9728 "the journal with UUID C<uuid>."
9732 #: ../src/guestfs-actions.pod:3195
9733 msgid "See also C<guestfs_mke2journal_U>."
9737 #: ../src/guestfs-actions.pod:3199
9738 msgid "guestfs_mke2journal"
9742 #: ../src/guestfs-actions.pod:3201
9745 " int guestfs_mke2journal (guestfs_h *g,\n"
9746 "\t\tint blocksize,\n"
9747 "\t\tconst char *device);\n"
9752 #: ../src/guestfs-actions.pod:3205 ../fish/guestfish-actions.pod:2483
9754 "This creates an ext2 external journal on C<device>. It is equivalent to the "
9759 #: ../src/guestfs-actions.pod:3208 ../fish/guestfish-actions.pod:2486
9762 " mke2fs -O journal_dev -b blocksize device\n"
9767 #: ../src/guestfs-actions.pod:3212
9768 msgid "guestfs_mke2journal_L"
9772 #: ../src/guestfs-actions.pod:3214
9775 " int guestfs_mke2journal_L (guestfs_h *g,\n"
9776 "\t\tint blocksize,\n"
9777 "\t\tconst char *label,\n"
9778 "\t\tconst char *device);\n"
9783 #: ../src/guestfs-actions.pod:3219 ../fish/guestfish-actions.pod:2492
9784 msgid "This creates an ext2 external journal on C<device> with label C<label>."
9788 #: ../src/guestfs-actions.pod:3223
9789 msgid "guestfs_mke2journal_U"
9793 #: ../src/guestfs-actions.pod:3225
9796 " int guestfs_mke2journal_U (guestfs_h *g,\n"
9797 "\t\tint blocksize,\n"
9798 "\t\tconst char *uuid,\n"
9799 "\t\tconst char *device);\n"
9804 #: ../src/guestfs-actions.pod:3230 ../fish/guestfish-actions.pod:2498
9805 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
9809 #: ../src/guestfs-actions.pod:3234
9810 msgid "guestfs_mkfifo"
9814 #: ../src/guestfs-actions.pod:3236
9817 " int guestfs_mkfifo (guestfs_h *g,\n"
9819 "\t\tconst char *path);\n"
9824 #: ../src/guestfs-actions.pod:3240
9826 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
9827 "is just a convenient wrapper around C<guestfs_mknod>."
9831 #: ../src/guestfs-actions.pod:3248
9832 msgid "guestfs_mkfs"
9836 #: ../src/guestfs-actions.pod:3250
9839 " int guestfs_mkfs (guestfs_h *g,\n"
9840 "\t\tconst char *fstype,\n"
9841 "\t\tconst char *device);\n"
9846 #: ../src/guestfs-actions.pod:3254 ../fish/guestfish-actions.pod:2514
9848 "This creates a filesystem on C<device> (usually a partition or LVM logical "
9849 "volume). The filesystem type is C<fstype>, for example C<ext3>."
9853 #: ../src/guestfs-actions.pod:3260
9854 msgid "guestfs_mkfs_b"
9858 #: ../src/guestfs-actions.pod:3262
9861 " int guestfs_mkfs_b (guestfs_h *g,\n"
9862 "\t\tconst char *fstype,\n"
9863 "\t\tint blocksize,\n"
9864 "\t\tconst char *device);\n"
9869 #: ../src/guestfs-actions.pod:3267
9871 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
9872 "block size of the resulting filesystem. Supported block sizes depend on the "
9873 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
9877 #: ../src/guestfs-actions.pod:3272 ../fish/guestfish-actions.pod:2527
9879 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
9884 #: ../src/guestfs-actions.pod:3277
9885 msgid "guestfs_mkmountpoint"
9889 #: ../src/guestfs-actions.pod:3279
9892 " int guestfs_mkmountpoint (guestfs_h *g,\n"
9893 "\t\tconst char *exemptpath);\n"
9898 #: ../src/guestfs-actions.pod:3282
9900 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
9901 "that can be used to create extra mountpoints before mounting the first "
9906 #: ../src/guestfs-actions.pod:3286 ../fish/guestfish-actions.pod:2538
9908 "These calls are I<only> necessary in some very limited circumstances, mainly "
9909 "the case where you want to mount a mix of unrelated and/or read-only "
9910 "filesystems together."
9914 #: ../src/guestfs-actions.pod:3290 ../fish/guestfish-actions.pod:2542
9916 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
9917 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
9918 "inside that. You can unpack this as follows in guestfish:"
9922 #: ../src/guestfs-actions.pod:3295 ../fish/guestfish-actions.pod:2547
9925 " add-ro Fedora-11-i686-Live.iso\n"
9927 " mkmountpoint /cd\n"
9928 " mkmountpoint /squash\n"
9929 " mkmountpoint /ext3\n"
9930 " mount /dev/sda /cd\n"
9931 " mount-loop /cd/LiveOS/squashfs.img /squash\n"
9932 " mount-loop /squash/LiveOS/ext3fs.img /ext3\n"
9937 #: ../src/guestfs-actions.pod:3304 ../fish/guestfish-actions.pod:2556
9938 msgid "The inner filesystem is now unpacked under the /ext3 mountpoint."
9942 #: ../src/guestfs-actions.pod:3308
9943 msgid "guestfs_mknod"
9947 #: ../src/guestfs-actions.pod:3310
9950 " int guestfs_mknod (guestfs_h *g,\n"
9952 "\t\tint devmajor,\n"
9953 "\t\tint devminor,\n"
9954 "\t\tconst char *path);\n"
9959 #: ../src/guestfs-actions.pod:3316 ../fish/guestfish-actions.pod:2562
9961 "This call creates block or character special devices, or named pipes (FIFOs)."
9965 #: ../src/guestfs-actions.pod:3319 ../fish/guestfish-actions.pod:2565
9967 "The C<mode> parameter should be the mode, using the standard constants. "
9968 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
9969 "used when creating block and character special devices."
9973 #: ../src/guestfs-actions.pod:3324
9975 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
9976 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
9977 "regular file). These constants are available in the standard Linux header "
9978 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
9979 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
9980 "the appropriate constant for you."
9984 #: ../src/guestfs-actions.pod:3336
9985 msgid "guestfs_mknod_b"
9989 #: ../src/guestfs-actions.pod:3338
9992 " int guestfs_mknod_b (guestfs_h *g,\n"
9994 "\t\tint devmajor,\n"
9995 "\t\tint devminor,\n"
9996 "\t\tconst char *path);\n"
10001 #: ../src/guestfs-actions.pod:3344
10003 "This call creates a block device node called C<path> with mode C<mode> and "
10004 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
10005 "wrapper around C<guestfs_mknod>."
10009 #: ../src/guestfs-actions.pod:3352
10010 msgid "guestfs_mknod_c"
10014 #: ../src/guestfs-actions.pod:3354
10017 " int guestfs_mknod_c (guestfs_h *g,\n"
10019 "\t\tint devmajor,\n"
10020 "\t\tint devminor,\n"
10021 "\t\tconst char *path);\n"
10026 #: ../src/guestfs-actions.pod:3360
10028 "This call creates a char device node called C<path> with mode C<mode> and "
10029 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
10030 "wrapper around C<guestfs_mknod>."
10034 #: ../src/guestfs-actions.pod:3368
10035 msgid "guestfs_mkswap"
10039 #: ../src/guestfs-actions.pod:3370
10042 " int guestfs_mkswap (guestfs_h *g,\n"
10043 "\t\tconst char *device);\n"
10048 #: ../src/guestfs-actions.pod:3373 ../fish/guestfish-actions.pod:2604
10049 msgid "Create a swap partition on C<device>."
10053 #: ../src/guestfs-actions.pod:3377
10054 msgid "guestfs_mkswap_L"
10058 #: ../src/guestfs-actions.pod:3379
10061 " int guestfs_mkswap_L (guestfs_h *g,\n"
10062 "\t\tconst char *label,\n"
10063 "\t\tconst char *device);\n"
10068 #: ../src/guestfs-actions.pod:3383 ../fish/guestfish-actions.pod:2610
10069 msgid "Create a swap partition on C<device> with label C<label>."
10073 #: ../src/guestfs-actions.pod:3385 ../fish/guestfish-actions.pod:2612
10075 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
10076 "sda>), just to a partition. This appears to be a limitation of the kernel "
10081 #: ../src/guestfs-actions.pod:3391
10082 msgid "guestfs_mkswap_U"
10086 #: ../src/guestfs-actions.pod:3393
10089 " int guestfs_mkswap_U (guestfs_h *g,\n"
10090 "\t\tconst char *uuid,\n"
10091 "\t\tconst char *device);\n"
10096 #: ../src/guestfs-actions.pod:3397 ../fish/guestfish-actions.pod:2620
10097 msgid "Create a swap partition on C<device> with UUID C<uuid>."
10101 #: ../src/guestfs-actions.pod:3401
10102 msgid "guestfs_mkswap_file"
10106 #: ../src/guestfs-actions.pod:3403
10109 " int guestfs_mkswap_file (guestfs_h *g,\n"
10110 "\t\tconst char *path);\n"
10115 #: ../src/guestfs-actions.pod:3406 ../fish/guestfish-actions.pod:2626
10116 msgid "Create a swap file."
10120 #: ../src/guestfs-actions.pod:3408
10122 "This command just writes a swap file signature to an existing file. To "
10123 "create the file itself, use something like C<guestfs_fallocate>."
10127 #: ../src/guestfs-actions.pod:3413
10128 msgid "guestfs_modprobe"
10132 #: ../src/guestfs-actions.pod:3415
10135 " int guestfs_modprobe (guestfs_h *g,\n"
10136 "\t\tconst char *modulename);\n"
10141 #: ../src/guestfs-actions.pod:3418 ../fish/guestfish-actions.pod:2635
10142 msgid "This loads a kernel module in the appliance."
10146 #: ../src/guestfs-actions.pod:3420 ../fish/guestfish-actions.pod:2637
10148 "The kernel module must have been whitelisted when libguestfs was built (see "
10149 "C<appliance/kmod.whitelist.in> in the source)."
10153 #: ../src/guestfs-actions.pod:3425
10154 msgid "guestfs_mount"
10158 #: ../src/guestfs-actions.pod:3427
10161 " int guestfs_mount (guestfs_h *g,\n"
10162 "\t\tconst char *device,\n"
10163 "\t\tconst char *mountpoint);\n"
10168 #: ../src/guestfs-actions.pod:3431 ../fish/guestfish-actions.pod:2644
10170 "Mount a guest disk at a position in the filesystem. Block devices are named "
10171 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
10172 "those block devices contain partitions, they will have the usual names (eg. "
10173 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
10177 #: ../src/guestfs-actions.pod:3437 ../fish/guestfish-actions.pod:2650
10179 "The rules are the same as for L<mount(2)>: A filesystem must first be "
10180 "mounted on C</> before others can be mounted. Other filesystems can only be "
10181 "mounted on directories which already exist."
10185 #: ../src/guestfs-actions.pod:3442 ../fish/guestfish-actions.pod:2655
10187 "The mounted filesystem is writable, if we have sufficient permissions on the "
10188 "underlying device."
10192 #: ../src/guestfs-actions.pod:3445
10194 "B<Important note:> When you use this call, the filesystem options C<sync> "
10195 "and C<noatime> are set implicitly. This was originally done because we "
10196 "thought it would improve reliability, but it turns out that I<-o sync> has a "
10197 "very large negative performance impact and negligible effect on "
10198 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
10199 "in any code that needs performance, and instead use C<guestfs_mount_options> "
10200 "(use an empty string for the first parameter if you don't want any options)."
10204 #: ../src/guestfs-actions.pod:3457
10205 msgid "guestfs_mount_loop"
10209 #: ../src/guestfs-actions.pod:3459
10212 " int guestfs_mount_loop (guestfs_h *g,\n"
10213 "\t\tconst char *file,\n"
10214 "\t\tconst char *mountpoint);\n"
10219 #: ../src/guestfs-actions.pod:3463 ../fish/guestfish-actions.pod:2672
10221 "This command lets you mount C<file> (a filesystem image in a file) on a "
10222 "mount point. It is entirely equivalent to the command C<mount -o loop file "
10227 #: ../src/guestfs-actions.pod:3469
10228 msgid "guestfs_mount_options"
10232 #: ../src/guestfs-actions.pod:3471
10235 " int guestfs_mount_options (guestfs_h *g,\n"
10236 "\t\tconst char *options,\n"
10237 "\t\tconst char *device,\n"
10238 "\t\tconst char *mountpoint);\n"
10243 #: ../src/guestfs-actions.pod:3476
10245 "This is the same as the C<guestfs_mount> command, but it allows you to set "
10246 "the mount options as for the L<mount(8)> I<-o> flag."
10250 #: ../src/guestfs-actions.pod:3480 ../fish/guestfish-actions.pod:2684
10252 "If the C<options> parameter is an empty string, then no options are passed "
10253 "(all options default to whatever the filesystem uses)."
10257 #: ../src/guestfs-actions.pod:3486
10258 msgid "guestfs_mount_ro"
10262 #: ../src/guestfs-actions.pod:3488
10265 " int guestfs_mount_ro (guestfs_h *g,\n"
10266 "\t\tconst char *device,\n"
10267 "\t\tconst char *mountpoint);\n"
10272 #: ../src/guestfs-actions.pod:3492
10274 "This is the same as the C<guestfs_mount> command, but it mounts the "
10275 "filesystem with the read-only (I<-o ro>) flag."
10279 #: ../src/guestfs-actions.pod:3497
10280 msgid "guestfs_mount_vfs"
10284 #: ../src/guestfs-actions.pod:3499
10287 " int guestfs_mount_vfs (guestfs_h *g,\n"
10288 "\t\tconst char *options,\n"
10289 "\t\tconst char *vfstype,\n"
10290 "\t\tconst char *device,\n"
10291 "\t\tconst char *mountpoint);\n"
10296 #: ../src/guestfs-actions.pod:3505
10298 "This is the same as the C<guestfs_mount> command, but it allows you to set "
10299 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
10304 #: ../src/guestfs-actions.pod:3511
10305 msgid "guestfs_mountpoints"
10309 #: ../src/guestfs-actions.pod:3513
10312 " char **guestfs_mountpoints (guestfs_h *g);\n"
10317 #: ../src/guestfs-actions.pod:3515
10319 "This call is similar to C<guestfs_mounts>. That call returns a list of "
10320 "devices. This one returns a hash table (map) of device name to directory "
10321 "where the device is mounted."
10325 #: ../src/guestfs-actions.pod:3525
10326 msgid "guestfs_mounts"
10330 #: ../src/guestfs-actions.pod:3527
10333 " char **guestfs_mounts (guestfs_h *g);\n"
10338 #: ../src/guestfs-actions.pod:3529 ../fish/guestfish-actions.pod:2715
10340 "This returns the list of currently mounted filesystems. It returns the list "
10341 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
10345 #: ../src/guestfs-actions.pod:3532 ../fish/guestfish-actions.pod:2718
10346 msgid "Some internal mounts are not shown."
10350 #: ../src/guestfs-actions.pod:3534
10351 msgid "See also: C<guestfs_mountpoints>"
10355 #: ../src/guestfs-actions.pod:3540
10360 #: ../src/guestfs-actions.pod:3542
10363 " int guestfs_mv (guestfs_h *g,\n"
10364 "\t\tconst char *src,\n"
10365 "\t\tconst char *dest);\n"
10370 #: ../src/guestfs-actions.pod:3546 ../fish/guestfish-actions.pod:2726
10372 "This moves a file from C<src> to C<dest> where C<dest> is either a "
10373 "destination filename or destination directory."
10377 #: ../src/guestfs-actions.pod:3551
10378 msgid "guestfs_ntfs_3g_probe"
10382 #: ../src/guestfs-actions.pod:3553
10385 " int guestfs_ntfs_3g_probe (guestfs_h *g,\n"
10387 "\t\tconst char *device);\n"
10392 #: ../src/guestfs-actions.pod:3557 ../fish/guestfish-actions.pod:2733
10394 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
10395 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
10396 "write, and some cannot be mounted at all)."
10400 #: ../src/guestfs-actions.pod:3561 ../fish/guestfish-actions.pod:2737
10402 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
10403 "can be mounted read-write. Set it to false if you want to test if the "
10404 "volume can be mounted read-only."
10408 #: ../src/guestfs-actions.pod:3565 ../fish/guestfish-actions.pod:2741
10410 "The return value is an integer which C<0> if the operation would succeed, or "
10411 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
10415 #: ../src/guestfs-actions.pod:3571
10416 msgid "guestfs_ntfsresize"
10420 #: ../src/guestfs-actions.pod:3573
10423 " int guestfs_ntfsresize (guestfs_h *g,\n"
10424 "\t\tconst char *device);\n"
10429 #: ../src/guestfs-actions.pod:3576 ../fish/guestfish-actions.pod:2749
10431 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
10432 "size of the underlying device. See also L<ntfsresize(8)>."
10436 #: ../src/guestfs-actions.pod:3582
10437 msgid "guestfs_ntfsresize_size"
10441 #: ../src/guestfs-actions.pod:3584
10444 " int guestfs_ntfsresize_size (guestfs_h *g,\n"
10445 "\t\tconst char *device,\n"
10446 "\t\tint64_t size);\n"
10451 #: ../src/guestfs-actions.pod:3588
10453 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
10454 "to specify the new size (in bytes) explicitly."
10458 #: ../src/guestfs-actions.pod:3593
10459 msgid "guestfs_part_add"
10463 #: ../src/guestfs-actions.pod:3595
10466 " int guestfs_part_add (guestfs_h *g,\n"
10467 "\t\tconst char *device,\n"
10468 "\t\tconst char *prlogex,\n"
10469 "\t\tint64_t startsect,\n"
10470 "\t\tint64_t endsect);\n"
10475 #: ../src/guestfs-actions.pod:3601
10477 "This command adds a partition to C<device>. If there is no partition table "
10478 "on the device, call C<guestfs_part_init> first."
10482 #: ../src/guestfs-actions.pod:3604 ../fish/guestfish-actions.pod:2767
10484 "The C<prlogex> parameter is the type of partition. Normally you should pass "
10485 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
10486 "C<logical>) and C<e> (or C<extended>) partition types."
10490 #: ../src/guestfs-actions.pod:3609 ../fish/guestfish-actions.pod:2772
10492 "C<startsect> and C<endsect> are the start and end of the partition in "
10493 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
10494 "from the end of the disk (C<-1> is the last sector)."
10498 #: ../src/guestfs-actions.pod:3613
10500 "Creating a partition which covers the whole disk is not so easy. Use "
10501 "C<guestfs_part_disk> to do that."
10505 #: ../src/guestfs-actions.pod:3618
10506 msgid "guestfs_part_del"
10510 #: ../src/guestfs-actions.pod:3620
10513 " int guestfs_part_del (guestfs_h *g,\n"
10514 "\t\tconst char *device,\n"
10515 "\t\tint partnum);\n"
10520 #: ../src/guestfs-actions.pod:3624 ../fish/guestfish-actions.pod:2783
10521 msgid "This command deletes the partition numbered C<partnum> on C<device>."
10525 #: ../src/guestfs-actions.pod:3626 ../fish/guestfish-actions.pod:2785
10527 "Note that in the case of MBR partitioning, deleting an extended partition "
10528 "also deletes any logical partitions it contains."
10532 #: ../src/guestfs-actions.pod:3632
10533 msgid "guestfs_part_disk"
10537 #: ../src/guestfs-actions.pod:3634
10540 " int guestfs_part_disk (guestfs_h *g,\n"
10541 "\t\tconst char *device,\n"
10542 "\t\tconst char *parttype);\n"
10547 #: ../src/guestfs-actions.pod:3638
10549 "This command is simply a combination of C<guestfs_part_init> followed by "
10550 "C<guestfs_part_add> to create a single primary partition covering the whole "
10555 #: ../src/guestfs-actions.pod:3642
10557 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
10558 "possible values are described in C<guestfs_part_init>."
10562 #: ../src/guestfs-actions.pod:3650
10563 msgid "guestfs_part_get_bootable"
10567 #: ../src/guestfs-actions.pod:3652
10570 " int guestfs_part_get_bootable (guestfs_h *g,\n"
10571 "\t\tconst char *device,\n"
10572 "\t\tint partnum);\n"
10577 #: ../src/guestfs-actions.pod:3656 ../fish/guestfish-actions.pod:2807
10579 "This command returns true if the partition C<partnum> on C<device> has the "
10580 "bootable flag set."
10584 #: ../src/guestfs-actions.pod:3659
10585 msgid "See also C<guestfs_part_set_bootable>."
10589 #: ../src/guestfs-actions.pod:3663
10590 msgid "guestfs_part_get_mbr_id"
10594 #: ../src/guestfs-actions.pod:3665
10597 " int guestfs_part_get_mbr_id (guestfs_h *g,\n"
10598 "\t\tconst char *device,\n"
10599 "\t\tint partnum);\n"
10604 #: ../src/guestfs-actions.pod:3669 ../fish/guestfish-actions.pod:2816
10606 "Returns the MBR type byte (also known as the ID byte) from the numbered "
10607 "partition C<partnum>."
10611 #: ../src/guestfs-actions.pod:3672 ../src/guestfs-actions.pod:3834
10613 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
10614 "undefined results for other partition table types (see "
10615 "C<guestfs_part_get_parttype>)."
10619 #: ../src/guestfs-actions.pod:3678
10620 msgid "guestfs_part_get_parttype"
10624 #: ../src/guestfs-actions.pod:3680
10627 " char *guestfs_part_get_parttype (guestfs_h *g,\n"
10628 "\t\tconst char *device);\n"
10633 #: ../src/guestfs-actions.pod:3683 ../fish/guestfish-actions.pod:2827
10635 "This command examines the partition table on C<device> and returns the "
10636 "partition table type (format) being used."
10640 #: ../src/guestfs-actions.pod:3686
10642 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
10643 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
10644 "possible, although unusual. See C<guestfs_part_init> for a full list."
10648 #: ../src/guestfs-actions.pod:3694
10649 msgid "guestfs_part_init"
10653 #: ../src/guestfs-actions.pod:3696
10656 " int guestfs_part_init (guestfs_h *g,\n"
10657 "\t\tconst char *device,\n"
10658 "\t\tconst char *parttype);\n"
10663 #: ../src/guestfs-actions.pod:3700 ../fish/guestfish-actions.pod:2839
10665 "This creates an empty partition table on C<device> of one of the partition "
10666 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
10667 "(for large disks)."
10671 #: ../src/guestfs-actions.pod:3704
10673 "Initially there are no partitions. Following this, you should call "
10674 "C<guestfs_part_add> for each partition required."
10678 #: ../src/guestfs-actions.pod:3707 ../fish/guestfish-actions.pod:2846
10679 msgid "Possible values for C<parttype> are:"
10683 #: ../src/guestfs-actions.pod:3711 ../fish/guestfish-actions.pod:2850
10684 msgid "B<efi> | B<gpt>"
10688 #: ../src/guestfs-actions.pod:3713 ../fish/guestfish-actions.pod:2852
10689 msgid "Intel EFI / GPT partition table."
10693 #: ../src/guestfs-actions.pod:3715 ../fish/guestfish-actions.pod:2854
10695 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
10696 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
10697 "the C<mbr> format."
10701 #: ../src/guestfs-actions.pod:3719 ../fish/guestfish-actions.pod:2858
10702 msgid "B<mbr> | B<msdos>"
10706 #: ../src/guestfs-actions.pod:3721 ../fish/guestfish-actions.pod:2860
10708 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
10709 "Windows. This partition type will B<only> work for device sizes up to 2 "
10710 "TB. For large disks we recommend using C<gpt>."
10714 #: ../src/guestfs-actions.pod:3728 ../fish/guestfish-actions.pod:2867
10716 "Other partition table types that may work but are not supported include:"
10720 #: ../src/guestfs-actions.pod:3733 ../fish/guestfish-actions.pod:2872
10725 #: ../src/guestfs-actions.pod:3735 ../fish/guestfish-actions.pod:2874
10726 msgid "AIX disk labels."
10730 #: ../src/guestfs-actions.pod:3737 ../fish/guestfish-actions.pod:2876
10731 msgid "B<amiga> | B<rdb>"
10735 #: ../src/guestfs-actions.pod:3739 ../fish/guestfish-actions.pod:2878
10736 msgid "Amiga \"Rigid Disk Block\" format."
10740 #: ../src/guestfs-actions.pod:3741 ../fish/guestfish-actions.pod:2880
10745 #: ../src/guestfs-actions.pod:3743 ../fish/guestfish-actions.pod:2882
10746 msgid "BSD disk labels."
10750 #: ../src/guestfs-actions.pod:3745 ../fish/guestfish-actions.pod:2884
10755 #: ../src/guestfs-actions.pod:3747 ../fish/guestfish-actions.pod:2886
10756 msgid "DASD, used on IBM mainframes."
10760 #: ../src/guestfs-actions.pod:3749 ../fish/guestfish-actions.pod:2888
10765 #: ../src/guestfs-actions.pod:3751 ../fish/guestfish-actions.pod:2890
10766 msgid "MIPS/SGI volumes."
10770 #: ../src/guestfs-actions.pod:3753 ../fish/guestfish-actions.pod:2892
10775 #: ../src/guestfs-actions.pod:3755 ../fish/guestfish-actions.pod:2894
10776 msgid "Old Mac partition format. Modern Macs use C<gpt>."
10780 #: ../src/guestfs-actions.pod:3757 ../fish/guestfish-actions.pod:2896
10785 #: ../src/guestfs-actions.pod:3759 ../fish/guestfish-actions.pod:2898
10786 msgid "NEC PC-98 format, common in Japan apparently."
10790 #: ../src/guestfs-actions.pod:3761 ../fish/guestfish-actions.pod:2900
10795 #: ../src/guestfs-actions.pod:3763 ../fish/guestfish-actions.pod:2902
10796 msgid "Sun disk labels."
10800 #: ../src/guestfs-actions.pod:3769
10801 msgid "guestfs_part_list"
10805 #: ../src/guestfs-actions.pod:3771
10808 " struct guestfs_partition_list *guestfs_part_list (guestfs_h *g,\n"
10809 "\t\tconst char *device);\n"
10814 #: ../src/guestfs-actions.pod:3774 ../fish/guestfish-actions.pod:2910
10816 "This command parses the partition table on C<device> and returns the list of "
10817 "partitions found."
10821 #: ../src/guestfs-actions.pod:3777 ../fish/guestfish-actions.pod:2913
10822 msgid "The fields in the returned structure are:"
10826 #: ../src/guestfs-actions.pod:3781 ../fish/guestfish-actions.pod:2917
10827 msgid "B<part_num>"
10831 #: ../src/guestfs-actions.pod:3783 ../fish/guestfish-actions.pod:2919
10832 msgid "Partition number, counting from 1."
10836 #: ../src/guestfs-actions.pod:3785 ../fish/guestfish-actions.pod:2921
10837 msgid "B<part_start>"
10841 #: ../src/guestfs-actions.pod:3787
10843 "Start of the partition I<in bytes>. To get sectors you have to divide by "
10844 "the device's sector size, see C<guestfs_blockdev_getss>."
10848 #: ../src/guestfs-actions.pod:3790 ../fish/guestfish-actions.pod:2926
10849 msgid "B<part_end>"
10853 #: ../src/guestfs-actions.pod:3792 ../fish/guestfish-actions.pod:2928
10854 msgid "End of the partition in bytes."
10858 #: ../src/guestfs-actions.pod:3794 ../fish/guestfish-actions.pod:2930
10859 msgid "B<part_size>"
10863 #: ../src/guestfs-actions.pod:3796 ../fish/guestfish-actions.pod:2932
10864 msgid "Size of the partition in bytes."
10868 #: ../src/guestfs-actions.pod:3800
10870 "This function returns a C<struct guestfs_partition_list *> (see E<lt>guestfs-"
10871 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
10872 "C<guestfs_free_partition_list> after use>."
10876 #: ../src/guestfs-actions.pod:3805
10877 msgid "guestfs_part_set_bootable"
10881 #: ../src/guestfs-actions.pod:3807
10884 " int guestfs_part_set_bootable (guestfs_h *g,\n"
10885 "\t\tconst char *device,\n"
10886 "\t\tint partnum,\n"
10887 "\t\tint bootable);\n"
10892 #: ../src/guestfs-actions.pod:3812 ../fish/guestfish-actions.pod:2940
10894 "This sets the bootable flag on partition numbered C<partnum> on device "
10895 "C<device>. Note that partitions are numbered from 1."
10899 #: ../src/guestfs-actions.pod:3815 ../fish/guestfish-actions.pod:2943
10901 "The bootable flag is used by some operating systems (notably Windows) to "
10902 "determine which partition to boot from. It is by no means universally "
10907 #: ../src/guestfs-actions.pod:3821
10908 msgid "guestfs_part_set_mbr_id"
10912 #: ../src/guestfs-actions.pod:3823
10915 " int guestfs_part_set_mbr_id (guestfs_h *g,\n"
10916 "\t\tconst char *device,\n"
10917 "\t\tint partnum,\n"
10918 "\t\tint idbyte);\n"
10923 #: ../src/guestfs-actions.pod:3828 ../fish/guestfish-actions.pod:2951
10925 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
10926 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
10927 "documentation are in fact hexadecimal numbers, but usually documented "
10928 "without any leading \"0x\" which might be confusing."
10932 #: ../src/guestfs-actions.pod:3840
10933 msgid "guestfs_part_set_name"
10937 #: ../src/guestfs-actions.pod:3842
10940 " int guestfs_part_set_name (guestfs_h *g,\n"
10941 "\t\tconst char *device,\n"
10942 "\t\tint partnum,\n"
10943 "\t\tconst char *name);\n"
10948 #: ../src/guestfs-actions.pod:3847 ../fish/guestfish-actions.pod:2965
10950 "This sets the partition name on partition numbered C<partnum> on device "
10951 "C<device>. Note that partitions are numbered from 1."
10955 #: ../src/guestfs-actions.pod:3850 ../fish/guestfish-actions.pod:2968
10957 "The partition name can only be set on certain types of partition table. "
10958 "This works on C<gpt> but not on C<mbr> partitions."
10962 #: ../src/guestfs-actions.pod:3855
10963 msgid "guestfs_part_to_dev"
10967 #: ../src/guestfs-actions.pod:3857
10970 " char *guestfs_part_to_dev (guestfs_h *g,\n"
10971 "\t\tconst char *partition);\n"
10976 #: ../src/guestfs-actions.pod:3860 ../fish/guestfish-actions.pod:2975
10978 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
10979 "partition number, returning the device name (eg. \"/dev/sdb\")."
10983 #: ../src/guestfs-actions.pod:3864
10985 "The named partition must exist, for example as a string returned from "
10986 "C<guestfs_list_partitions>."
10990 #: ../src/guestfs-actions.pod:3870
10991 msgid "guestfs_ping_daemon"
10995 #: ../src/guestfs-actions.pod:3872
10998 " int guestfs_ping_daemon (guestfs_h *g);\n"
11003 #: ../src/guestfs-actions.pod:3874 ../fish/guestfish-actions.pod:2986
11005 "This is a test probe into the guestfs daemon running inside the qemu "
11006 "subprocess. Calling this function checks that the daemon responds to the "
11007 "ping message, without affecting the daemon or attached block device(s) in "
11012 #: ../src/guestfs-actions.pod:3881
11013 msgid "guestfs_pread"
11017 #: ../src/guestfs-actions.pod:3883
11020 " char *guestfs_pread (guestfs_h *g,\n"
11021 "\t\tconst char *path,\n"
11023 "\t\tint64_t offset,\n"
11024 "\t\tsize_t *size_r);\n"
11029 #: ../src/guestfs-actions.pod:3889 ../fish/guestfish-actions.pod:2995
11031 "This command lets you read part of a file. It reads C<count> bytes of the "
11032 "file, starting at C<offset>, from file C<path>."
11036 #: ../src/guestfs-actions.pod:3892 ../src/guestfs-actions.pod:3915
11037 #: ../fish/guestfish-actions.pod:2998 ../fish/guestfish-actions.pod:3013
11039 "This may read fewer bytes than requested. For further details see the "
11040 "L<pread(2)> system call."
11044 #: ../src/guestfs-actions.pod:3895
11045 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
11049 #: ../src/guestfs-actions.pod:3904
11050 msgid "guestfs_pread_device"
11054 #: ../src/guestfs-actions.pod:3906
11057 " char *guestfs_pread_device (guestfs_h *g,\n"
11058 "\t\tconst char *device,\n"
11060 "\t\tint64_t offset,\n"
11061 "\t\tsize_t *size_r);\n"
11066 #: ../src/guestfs-actions.pod:3912 ../fish/guestfish-actions.pod:3010
11068 "This command lets you read part of a file. It reads C<count> bytes of "
11069 "C<device>, starting at C<offset>."
11073 #: ../src/guestfs-actions.pod:3918
11074 msgid "See also C<guestfs_pread>."
11078 #: ../src/guestfs-actions.pod:3927
11079 msgid "guestfs_pvcreate"
11083 #: ../src/guestfs-actions.pod:3929
11086 " int guestfs_pvcreate (guestfs_h *g,\n"
11087 "\t\tconst char *device);\n"
11092 #: ../src/guestfs-actions.pod:3932 ../fish/guestfish-actions.pod:3025
11094 "This creates an LVM physical volume on the named C<device>, where C<device> "
11095 "should usually be a partition name such as C</dev/sda1>."
11099 #: ../src/guestfs-actions.pod:3938
11100 msgid "guestfs_pvremove"
11104 #: ../src/guestfs-actions.pod:3940
11107 " int guestfs_pvremove (guestfs_h *g,\n"
11108 "\t\tconst char *device);\n"
11113 #: ../src/guestfs-actions.pod:3943 ../fish/guestfish-actions.pod:3033
11115 "This wipes a physical volume C<device> so that LVM will no longer recognise "
11120 #: ../src/guestfs-actions.pod:3946 ../fish/guestfish-actions.pod:3036
11122 "The implementation uses the C<pvremove> command which refuses to wipe "
11123 "physical volumes that contain any volume groups, so you have to remove those "
11128 #: ../src/guestfs-actions.pod:3952
11129 msgid "guestfs_pvresize"
11133 #: ../src/guestfs-actions.pod:3954
11136 " int guestfs_pvresize (guestfs_h *g,\n"
11137 "\t\tconst char *device);\n"
11142 #: ../src/guestfs-actions.pod:3957 ../fish/guestfish-actions.pod:3044
11144 "This resizes (expands or shrinks) an existing LVM physical volume to match "
11145 "the new size of the underlying device."
11149 #: ../src/guestfs-actions.pod:3962
11150 msgid "guestfs_pvresize_size"
11154 #: ../src/guestfs-actions.pod:3964
11157 " int guestfs_pvresize_size (guestfs_h *g,\n"
11158 "\t\tconst char *device,\n"
11159 "\t\tint64_t size);\n"
11164 #: ../src/guestfs-actions.pod:3968
11166 "This command is the same as C<guestfs_pvresize> except that it allows you to "
11167 "specify the new size (in bytes) explicitly."
11171 #: ../src/guestfs-actions.pod:3973
11172 msgid "guestfs_pvs"
11176 #: ../src/guestfs-actions.pod:3975
11179 " char **guestfs_pvs (guestfs_h *g);\n"
11184 #: ../src/guestfs-actions.pod:3977 ../fish/guestfish-actions.pod:3058
11186 "List all the physical volumes detected. This is the equivalent of the L<pvs"
11191 #: ../src/guestfs-actions.pod:3980 ../fish/guestfish-actions.pod:3061
11193 "This returns a list of just the device names that contain PVs (eg. C</dev/"
11198 #: ../src/guestfs-actions.pod:3983
11199 msgid "See also C<guestfs_pvs_full>."
11203 #: ../src/guestfs-actions.pod:3989
11204 msgid "guestfs_pvs_full"
11208 #: ../src/guestfs-actions.pod:3991
11211 " struct guestfs_lvm_pv_list *guestfs_pvs_full (guestfs_h *g);\n"
11216 #: ../src/guestfs-actions.pod:3993 ../fish/guestfish-actions.pod:3070
11218 "List all the physical volumes detected. This is the equivalent of the L<pvs"
11219 "(8)> command. The \"full\" version includes all fields."
11223 #: ../src/guestfs-actions.pod:3996
11225 "This function returns a C<struct guestfs_lvm_pv_list *> (see E<lt>guestfs-"
11226 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
11227 "C<guestfs_free_lvm_pv_list> after use>."
11231 #: ../src/guestfs-actions.pod:4001
11232 msgid "guestfs_pvuuid"
11236 #: ../src/guestfs-actions.pod:4003
11239 " char *guestfs_pvuuid (guestfs_h *g,\n"
11240 "\t\tconst char *device);\n"
11245 #: ../src/guestfs-actions.pod:4006 ../fish/guestfish-actions.pod:3077
11246 msgid "This command returns the UUID of the LVM PV C<device>."
11250 #: ../src/guestfs-actions.pod:4011
11251 msgid "guestfs_pwrite"
11255 #: ../src/guestfs-actions.pod:4013
11258 " int guestfs_pwrite (guestfs_h *g,\n"
11259 "\t\tconst char *path,\n"
11260 "\t\tconst char *content,\n"
11261 "\t\tsize_t content_size,\n"
11262 "\t\tint64_t offset);\n"
11267 #: ../src/guestfs-actions.pod:4019 ../fish/guestfish-actions.pod:3083
11269 "This command writes to part of a file. It writes the data buffer C<content> "
11270 "to the file C<path> starting at offset C<offset>."
11274 #: ../src/guestfs-actions.pod:4022 ../fish/guestfish-actions.pod:3086
11276 "This command implements the L<pwrite(2)> system call, and like that system "
11277 "call it may not write the full data requested. The return value is the "
11278 "number of bytes that were actually written to the file. This could even be "
11279 "0, although short writes are unlikely for regular files in ordinary "
11284 #: ../src/guestfs-actions.pod:4028
11285 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
11289 #: ../src/guestfs-actions.pod:4035
11290 msgid "guestfs_pwrite_device"
11294 #: ../src/guestfs-actions.pod:4037
11297 " int guestfs_pwrite_device (guestfs_h *g,\n"
11298 "\t\tconst char *device,\n"
11299 "\t\tconst char *content,\n"
11300 "\t\tsize_t content_size,\n"
11301 "\t\tint64_t offset);\n"
11306 #: ../src/guestfs-actions.pod:4043 ../fish/guestfish-actions.pod:3101
11308 "This command writes to part of a device. It writes the data buffer "
11309 "C<content> to C<device> starting at offset C<offset>."
11313 #: ../src/guestfs-actions.pod:4046 ../fish/guestfish-actions.pod:3104
11315 "This command implements the L<pwrite(2)> system call, and like that system "
11316 "call it may not write the full data requested (although short writes to disk "
11317 "devices and partitions are probably impossible with standard Linux kernels)."
11321 #: ../src/guestfs-actions.pod:4051
11322 msgid "See also C<guestfs_pwrite>."
11326 #: ../src/guestfs-actions.pod:4058
11327 msgid "guestfs_read_file"
11331 #: ../src/guestfs-actions.pod:4060
11334 " char *guestfs_read_file (guestfs_h *g,\n"
11335 "\t\tconst char *path,\n"
11336 "\t\tsize_t *size_r);\n"
11341 #: ../src/guestfs-actions.pod:4064 ../fish/guestfish-actions.pod:3118
11342 msgid "This calls returns the contents of the file C<path> as a buffer."
11346 #: ../src/guestfs-actions.pod:4067
11348 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
11349 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
11350 "function is limited in the total size of file that can be handled."
11354 #: ../src/guestfs-actions.pod:4079
11355 msgid "guestfs_read_lines"
11359 #: ../src/guestfs-actions.pod:4081
11362 " char **guestfs_read_lines (guestfs_h *g,\n"
11363 "\t\tconst char *path);\n"
11368 #: ../src/guestfs-actions.pod:4086 ../fish/guestfish-actions.pod:3135
11370 "The file contents are returned as a list of lines. Trailing C<LF> and "
11371 "C<CRLF> character sequences are I<not> returned."
11375 #: ../src/guestfs-actions.pod:4089
11377 "Note that this function cannot correctly handle binary files (specifically, "
11378 "files containing C<\\0> character which is treated as end of line). For "
11379 "those you need to use the C<guestfs_read_file> function which has a more "
11380 "complex interface."
11384 #: ../src/guestfs-actions.pod:4098
11385 msgid "guestfs_readdir"
11389 #: ../src/guestfs-actions.pod:4100
11392 " struct guestfs_dirent_list *guestfs_readdir (guestfs_h *g,\n"
11393 "\t\tconst char *dir);\n"
11398 #: ../src/guestfs-actions.pod:4103 ../fish/guestfish-actions.pod:3147
11399 msgid "This returns the list of directory entries in directory C<dir>."
11403 #: ../src/guestfs-actions.pod:4105 ../fish/guestfish-actions.pod:3149
11405 "All entries in the directory are returned, including C<.> and C<..>. The "
11406 "entries are I<not> sorted, but returned in the same order as the underlying "
11411 #: ../src/guestfs-actions.pod:4109 ../fish/guestfish-actions.pod:3153
11413 "Also this call returns basic file type information about each file. The "
11414 "C<ftyp> field will contain one of the following characters:"
11418 #: ../src/guestfs-actions.pod:4114 ../fish/guestfish-actions.pod:3158
11423 #: ../src/guestfs-actions.pod:4116 ../fish/guestfish-actions.pod:3160
11424 msgid "Block special"
11428 #: ../src/guestfs-actions.pod:4118 ../fish/guestfish-actions.pod:3162
11433 #: ../src/guestfs-actions.pod:4120 ../fish/guestfish-actions.pod:3164
11434 msgid "Char special"
11438 #: ../src/guestfs-actions.pod:4122 ../fish/guestfish-actions.pod:3166
11443 #: ../src/guestfs-actions.pod:4124 ../fish/guestfish-actions.pod:3168
11448 #: ../src/guestfs-actions.pod:4126 ../fish/guestfish-actions.pod:3170
11453 #: ../src/guestfs-actions.pod:4128 ../fish/guestfish-actions.pod:3172
11454 msgid "FIFO (named pipe)"
11458 #: ../src/guestfs-actions.pod:4130 ../fish/guestfish-actions.pod:3174
11463 #: ../src/guestfs-actions.pod:4132 ../fish/guestfish-actions.pod:3176
11464 msgid "Symbolic link"
11468 #: ../src/guestfs-actions.pod:4134 ../fish/guestfish-actions.pod:3178
11473 #: ../src/guestfs-actions.pod:4136 ../fish/guestfish-actions.pod:3180
11474 msgid "Regular file"
11478 #: ../src/guestfs-actions.pod:4138 ../fish/guestfish-actions.pod:3182
11483 #: ../src/guestfs-actions.pod:4140 ../fish/guestfish-actions.pod:3184
11488 #: ../src/guestfs-actions.pod:4142 ../fish/guestfish-actions.pod:3186
11493 #: ../src/guestfs-actions.pod:4144 ../fish/guestfish-actions.pod:3188
11494 msgid "Unknown file type"
11498 #: ../src/guestfs-actions.pod:4146 ../fish/guestfish-actions.pod:3190
11503 #: ../src/guestfs-actions.pod:4148 ../fish/guestfish-actions.pod:3192
11505 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
11509 #: ../src/guestfs-actions.pod:4153
11511 "This function is primarily intended for use by programs. To get a simple "
11512 "list of names, use C<guestfs_ls>. To get a printable directory for human "
11513 "consumption, use C<guestfs_ll>."
11517 #: ../src/guestfs-actions.pod:4157
11519 "This function returns a C<struct guestfs_dirent_list *> (see E<lt>guestfs-"
11520 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
11521 "C<guestfs_free_dirent_list> after use>."
11525 #: ../src/guestfs-actions.pod:4162
11526 msgid "guestfs_readlink"
11530 #: ../src/guestfs-actions.pod:4164
11533 " char *guestfs_readlink (guestfs_h *g,\n"
11534 "\t\tconst char *path);\n"
11539 #: ../src/guestfs-actions.pod:4167 ../fish/guestfish-actions.pod:3205
11540 msgid "This command reads the target of a symbolic link."
11544 #: ../src/guestfs-actions.pod:4172
11545 msgid "guestfs_readlinklist"
11549 #: ../src/guestfs-actions.pod:4174
11552 " char **guestfs_readlinklist (guestfs_h *g,\n"
11553 "\t\tconst char *path,\n"
11554 "\t\tchar *const *names);\n"
11559 #: ../src/guestfs-actions.pod:4178 ../fish/guestfish-actions.pod:3211
11561 "This call allows you to do a C<readlink> operation on multiple files, where "
11562 "all files are in the directory C<path>. C<names> is the list of files from "
11567 #: ../src/guestfs-actions.pod:4182 ../fish/guestfish-actions.pod:3215
11569 "On return you get a list of strings, with a one-to-one correspondence to the "
11570 "C<names> list. Each string is the value of the symbolic link."
11574 #: ../src/guestfs-actions.pod:4186 ../fish/guestfish-actions.pod:3219
11576 "If the C<readlink(2)> operation fails on any name, then the corresponding "
11577 "result string is the empty string C<\"\">. However the whole operation is "
11578 "completed even if there were C<readlink(2)> errors, and so you can call this "
11579 "function with names where you don't know if they are symbolic links already "
11580 "(albeit slightly less efficient)."
11584 #: ../src/guestfs-actions.pod:4193 ../fish/guestfish-actions.pod:3226
11586 "This call is intended for programs that want to efficiently list a directory "
11587 "contents without making many round-trips. Very long directory listings "
11588 "might cause the protocol message size to be exceeded, causing this call to "
11589 "fail. The caller must split up such requests into smaller groups of names."
11593 #: ../src/guestfs-actions.pod:4204
11594 msgid "guestfs_realpath"
11598 #: ../src/guestfs-actions.pod:4206
11601 " char *guestfs_realpath (guestfs_h *g,\n"
11602 "\t\tconst char *path);\n"
11607 #: ../src/guestfs-actions.pod:4209 ../fish/guestfish-actions.pod:3237
11609 "Return the canonicalized absolute pathname of C<path>. The returned path "
11610 "has no C<.>, C<..> or symbolic link path elements."
11614 #: ../src/guestfs-actions.pod:4215
11615 msgid "guestfs_removexattr"
11619 #: ../src/guestfs-actions.pod:4217
11622 " int guestfs_removexattr (guestfs_h *g,\n"
11623 "\t\tconst char *xattr,\n"
11624 "\t\tconst char *path);\n"
11629 #: ../src/guestfs-actions.pod:4221 ../fish/guestfish-actions.pod:3244
11631 "This call removes the extended attribute named C<xattr> of the file C<path>."
11635 #: ../src/guestfs-actions.pod:4224
11636 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
11640 #: ../src/guestfs-actions.pod:4228
11641 msgid "guestfs_resize2fs"
11645 #: ../src/guestfs-actions.pod:4230
11648 " int guestfs_resize2fs (guestfs_h *g,\n"
11649 "\t\tconst char *device);\n"
11654 #: ../src/guestfs-actions.pod:4233 ../fish/guestfish-actions.pod:3253
11656 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
11657 "underlying device."
11661 #: ../src/guestfs-actions.pod:4236
11663 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
11664 "C<device> before calling this command. For unknown reasons C<resize2fs> "
11665 "sometimes gives an error about this and sometimes not. In any case, it is "
11666 "always safe to call C<guestfs_e2fsck_f> before calling this function."
11670 #: ../src/guestfs-actions.pod:4244
11671 msgid "guestfs_resize2fs_size"
11675 #: ../src/guestfs-actions.pod:4246
11678 " int guestfs_resize2fs_size (guestfs_h *g,\n"
11679 "\t\tconst char *device,\n"
11680 "\t\tint64_t size);\n"
11685 #: ../src/guestfs-actions.pod:4250
11687 "This command is the same as C<guestfs_resize2fs> except that it allows you "
11688 "to specify the new size (in bytes) explicitly."
11692 #: ../src/guestfs-actions.pod:4255
11697 #: ../src/guestfs-actions.pod:4257
11700 " int guestfs_rm (guestfs_h *g,\n"
11701 "\t\tconst char *path);\n"
11706 #: ../src/guestfs-actions.pod:4260 ../fish/guestfish-actions.pod:3273
11707 msgid "Remove the single file C<path>."
11711 #: ../src/guestfs-actions.pod:4264
11712 msgid "guestfs_rm_rf"
11716 #: ../src/guestfs-actions.pod:4266
11719 " int guestfs_rm_rf (guestfs_h *g,\n"
11720 "\t\tconst char *path);\n"
11725 #: ../src/guestfs-actions.pod:4269 ../fish/guestfish-actions.pod:3279
11727 "Remove the file or directory C<path>, recursively removing the contents if "
11728 "its a directory. This is like the C<rm -rf> shell command."
11732 #: ../src/guestfs-actions.pod:4275
11733 msgid "guestfs_rmdir"
11737 #: ../src/guestfs-actions.pod:4277
11740 " int guestfs_rmdir (guestfs_h *g,\n"
11741 "\t\tconst char *path);\n"
11746 #: ../src/guestfs-actions.pod:4280 ../fish/guestfish-actions.pod:3287
11747 msgid "Remove the single directory C<path>."
11751 #: ../src/guestfs-actions.pod:4284
11752 msgid "guestfs_rmmountpoint"
11756 #: ../src/guestfs-actions.pod:4286
11759 " int guestfs_rmmountpoint (guestfs_h *g,\n"
11760 "\t\tconst char *exemptpath);\n"
11765 #: ../src/guestfs-actions.pod:4289
11767 "This calls removes a mountpoint that was previously created with "
11768 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
11772 #: ../src/guestfs-actions.pod:4295
11773 msgid "guestfs_scrub_device"
11777 #: ../src/guestfs-actions.pod:4297
11780 " int guestfs_scrub_device (guestfs_h *g,\n"
11781 "\t\tconst char *device);\n"
11786 #: ../src/guestfs-actions.pod:4300 ../fish/guestfish-actions.pod:3301
11788 "This command writes patterns over C<device> to make data retrieval more "
11793 #: ../src/guestfs-actions.pod:4303 ../src/guestfs-actions.pod:4321
11794 #: ../src/guestfs-actions.pod:4337 ../fish/guestfish-actions.pod:3304
11795 #: ../fish/guestfish-actions.pod:3319 ../fish/guestfish-actions.pod:3332
11797 "It is an interface to the L<scrub(1)> program. See that manual page for "
11802 #: ../src/guestfs-actions.pod:4311
11803 msgid "guestfs_scrub_file"
11807 #: ../src/guestfs-actions.pod:4313
11810 " int guestfs_scrub_file (guestfs_h *g,\n"
11811 "\t\tconst char *file);\n"
11816 #: ../src/guestfs-actions.pod:4316 ../fish/guestfish-actions.pod:3314
11818 "This command writes patterns over a file to make data retrieval more "
11823 #: ../src/guestfs-actions.pod:4319 ../fish/guestfish-actions.pod:3317
11824 msgid "The file is I<removed> after scrubbing."
11828 #: ../src/guestfs-actions.pod:4326
11829 msgid "guestfs_scrub_freespace"
11833 #: ../src/guestfs-actions.pod:4328
11836 " int guestfs_scrub_freespace (guestfs_h *g,\n"
11837 "\t\tconst char *dir);\n"
11842 #: ../src/guestfs-actions.pod:4331
11844 "This command creates the directory C<dir> and then fills it with files until "
11845 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
11846 "and deletes them. The intention is to scrub any free space on the partition "
11847 "containing C<dir>."
11851 #: ../src/guestfs-actions.pod:4342
11852 msgid "guestfs_set_append"
11856 #: ../src/guestfs-actions.pod:4344
11859 " int guestfs_set_append (guestfs_h *g,\n"
11860 "\t\tconst char *append);\n"
11865 #: ../src/guestfs-actions.pod:4347 ../fish/guestfish-actions.pod:3341
11867 "This function is used to add additional options to the guest kernel command "
11872 #: ../src/guestfs-actions.pod:4350 ../fish/guestfish-actions.pod:3344
11874 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
11875 "environment variable."
11879 #: ../src/guestfs-actions.pod:4353 ../fish/guestfish-actions.pod:3347
11881 "Setting C<append> to C<NULL> means I<no> additional options are passed "
11882 "(libguestfs always adds a few of its own)."
11886 #: ../src/guestfs-actions.pod:4358
11887 msgid "guestfs_set_autosync"
11891 #: ../src/guestfs-actions.pod:4360
11894 " int guestfs_set_autosync (guestfs_h *g,\n"
11895 "\t\tint autosync);\n"
11900 #: ../src/guestfs-actions.pod:4363
11902 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
11903 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
11904 "the handle is closed (also if the program exits without closing handles)."
11908 #: ../src/guestfs-actions.pod:4368 ../fish/guestfish-actions.pod:3361
11910 "This is disabled by default (except in guestfish where it is enabled by "
11915 #: ../src/guestfs-actions.pod:4373
11916 msgid "guestfs_set_direct"
11920 #: ../src/guestfs-actions.pod:4375
11923 " int guestfs_set_direct (guestfs_h *g,\n"
11924 "\t\tint direct);\n"
11929 #: ../src/guestfs-actions.pod:4378 ../fish/guestfish-actions.pod:3370
11931 "If the direct appliance mode flag is enabled, then stdin and stdout are "
11932 "passed directly through to the appliance once it is launched."
11936 #: ../src/guestfs-actions.pod:4382
11938 "One consequence of this is that log messages aren't caught by the library "
11939 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
11944 #: ../src/guestfs-actions.pod:4386 ../fish/guestfish-actions.pod:3378
11945 msgid "You probably don't want to use this unless you know what you are doing."
11949 #: ../src/guestfs-actions.pod:4389 ../fish/guestfish-actions.pod:3381
11950 msgid "The default is disabled."
11954 #: ../src/guestfs-actions.pod:4393
11955 msgid "guestfs_set_e2label"
11959 #: ../src/guestfs-actions.pod:4395
11962 " int guestfs_set_e2label (guestfs_h *g,\n"
11963 "\t\tconst char *device,\n"
11964 "\t\tconst char *label);\n"
11969 #: ../src/guestfs-actions.pod:4399 ../fish/guestfish-actions.pod:3387
11971 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
11972 "C<label>. Filesystem labels are limited to 16 characters."
11976 #: ../src/guestfs-actions.pod:4403
11978 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
11979 "the existing label on a filesystem."
11983 #: ../src/guestfs-actions.pod:4408
11984 msgid "guestfs_set_e2uuid"
11988 #: ../src/guestfs-actions.pod:4410
11991 " int guestfs_set_e2uuid (guestfs_h *g,\n"
11992 "\t\tconst char *device,\n"
11993 "\t\tconst char *uuid);\n"
11998 #: ../src/guestfs-actions.pod:4414 ../fish/guestfish-actions.pod:3398
12000 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
12001 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
12002 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
12006 #: ../src/guestfs-actions.pod:4419
12008 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
12009 "the existing UUID of a filesystem."
12013 #: ../src/guestfs-actions.pod:4424
12014 msgid "guestfs_set_memsize"
12018 #: ../src/guestfs-actions.pod:4426
12021 " int guestfs_set_memsize (guestfs_h *g,\n"
12022 "\t\tint memsize);\n"
12027 #: ../src/guestfs-actions.pod:4429
12029 "This sets the memory size in megabytes allocated to the qemu subprocess. "
12030 "This only has any effect if called before C<guestfs_launch>."
12034 #: ../src/guestfs-actions.pod:4433 ../fish/guestfish-actions.pod:3416
12036 "You can also change this by setting the environment variable "
12037 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
12041 #: ../src/guestfs-actions.pod:4442
12042 msgid "guestfs_set_network"
12046 #: ../src/guestfs-actions.pod:4444
12049 " int guestfs_set_network (guestfs_h *g,\n"
12050 "\t\tint network);\n"
12055 #: ../src/guestfs-actions.pod:4447 ../fish/guestfish-actions.pod:3429
12057 "If C<network> is true, then the network is enabled in the libguestfs "
12058 "appliance. The default is false."
12062 #: ../src/guestfs-actions.pod:4450 ../fish/guestfish-actions.pod:3432
12064 "This affects whether commands are able to access the network (see L<guestfs"
12065 "(3)/RUNNING COMMANDS>)."
12069 #: ../src/guestfs-actions.pod:4453
12071 "You must call this before calling C<guestfs_launch>, otherwise it has no "
12076 #: ../src/guestfs-actions.pod:4458
12077 msgid "guestfs_set_path"
12081 #: ../src/guestfs-actions.pod:4460
12084 " int guestfs_set_path (guestfs_h *g,\n"
12085 "\t\tconst char *searchpath);\n"
12090 #: ../src/guestfs-actions.pod:4463 ../fish/guestfish-actions.pod:3444
12091 msgid "Set the path that libguestfs searches for kernel and initrd.img."
12095 #: ../src/guestfs-actions.pod:4465 ../fish/guestfish-actions.pod:3446
12097 "The default is C<$libdir/guestfs> unless overridden by setting "
12098 "C<LIBGUESTFS_PATH> environment variable."
12102 #: ../src/guestfs-actions.pod:4468 ../fish/guestfish-actions.pod:3449
12103 msgid "Setting C<path> to C<NULL> restores the default path."
12107 #: ../src/guestfs-actions.pod:4472
12108 msgid "guestfs_set_qemu"
12112 #: ../src/guestfs-actions.pod:4474
12115 " int guestfs_set_qemu (guestfs_h *g,\n"
12116 "\t\tconst char *qemu);\n"
12121 #: ../src/guestfs-actions.pod:4477 ../fish/guestfish-actions.pod:3457
12122 msgid "Set the qemu binary that we will use."
12126 #: ../src/guestfs-actions.pod:4479 ../fish/guestfish-actions.pod:3459
12128 "The default is chosen when the library was compiled by the configure script."
12132 #: ../src/guestfs-actions.pod:4482 ../fish/guestfish-actions.pod:3462
12134 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
12139 #: ../src/guestfs-actions.pod:4485 ../fish/guestfish-actions.pod:3465
12140 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
12144 #: ../src/guestfs-actions.pod:4487 ../fish/guestfish-actions.pod:3467
12146 "Note that you should call this function as early as possible after creating "
12147 "the handle. This is because some pre-launch operations depend on testing "
12148 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
12149 "don't retest features, and so you might see inconsistent results. Using the "
12150 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
12151 "the qemu binary at the same time as the handle is created."
12155 #: ../src/guestfs-actions.pod:4497
12156 msgid "guestfs_set_recovery_proc"
12160 #: ../src/guestfs-actions.pod:4499
12163 " int guestfs_set_recovery_proc (guestfs_h *g,\n"
12164 "\t\tint recoveryproc);\n"
12169 #: ../src/guestfs-actions.pod:4502
12171 "If this is called with the parameter C<false> then C<guestfs_launch> does "
12172 "not create a recovery process. The purpose of the recovery process is to "
12173 "stop runaway qemu processes in the case where the main program aborts "
12178 #: ../src/guestfs-actions.pod:4507
12180 "This only has any effect if called before C<guestfs_launch>, and the default "
12185 #: ../src/guestfs-actions.pod:4510 ../fish/guestfish-actions.pod:3489
12187 "About the only time when you would want to disable this is if the main "
12188 "process will fork itself into the background (\"daemonize\" itself). In "
12189 "this case the recovery process thinks that the main program has disappeared "
12190 "and so kills qemu, which is not very helpful."
12194 #: ../src/guestfs-actions.pod:4518
12195 msgid "guestfs_set_selinux"
12199 #: ../src/guestfs-actions.pod:4520
12202 " int guestfs_set_selinux (guestfs_h *g,\n"
12203 "\t\tint selinux);\n"
12208 #: ../src/guestfs-actions.pod:4523 ../fish/guestfish-actions.pod:3501
12210 "This sets the selinux flag that is passed to the appliance at boot time. "
12211 "The default is C<selinux=0> (disabled)."
12215 #: ../src/guestfs-actions.pod:4526 ../fish/guestfish-actions.pod:3504
12217 "Note that if SELinux is enabled, it is always in Permissive mode "
12218 "(C<enforcing=0>)."
12222 #: ../src/guestfs-actions.pod:4534
12223 msgid "guestfs_set_trace"
12227 #: ../src/guestfs-actions.pod:4536
12230 " int guestfs_set_trace (guestfs_h *g,\n"
12231 "\t\tint trace);\n"
12236 #: ../src/guestfs-actions.pod:4539 ../fish/guestfish-actions.pod:3516
12238 "If the command trace flag is set to 1, then commands are printed on stderr "
12239 "before they are executed in a format which is very similar to the one used "
12240 "by guestfish. In other words, you can run a program with this enabled, and "
12241 "you will get out a script which you can feed to guestfish to perform the "
12242 "same set of actions."
12246 #: ../src/guestfs-actions.pod:4546 ../fish/guestfish-actions.pod:3523
12248 "If you want to trace C API calls into libguestfs (and other libraries) then "
12249 "possibly a better way is to use the external ltrace(1) command."
12253 #: ../src/guestfs-actions.pod:4550 ../fish/guestfish-actions.pod:3527
12255 "Command traces are disabled unless the environment variable "
12256 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
12260 #: ../src/guestfs-actions.pod:4555
12261 msgid "guestfs_set_verbose"
12265 #: ../src/guestfs-actions.pod:4557
12268 " int guestfs_set_verbose (guestfs_h *g,\n"
12269 "\t\tint verbose);\n"
12274 #: ../src/guestfs-actions.pod:4560 ../fish/guestfish-actions.pod:3536
12275 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
12279 #: ../src/guestfs-actions.pod:4562 ../fish/guestfish-actions.pod:3538
12281 "Verbose messages are disabled unless the environment variable "
12282 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
12286 #: ../src/guestfs-actions.pod:4567
12287 msgid "guestfs_setcon"
12291 #: ../src/guestfs-actions.pod:4569
12294 " int guestfs_setcon (guestfs_h *g,\n"
12295 "\t\tconst char *context);\n"
12300 #: ../src/guestfs-actions.pod:4572 ../fish/guestfish-actions.pod:3545
12302 "This sets the SELinux security context of the daemon to the string "
12307 #: ../src/guestfs-actions.pod:4575 ../fish/guestfish-actions.pod:3548
12308 msgid "See the documentation about SELINUX in L<guestfs(3)>."
12312 #: ../src/guestfs-actions.pod:4579
12313 msgid "guestfs_setxattr"
12317 #: ../src/guestfs-actions.pod:4581
12320 " int guestfs_setxattr (guestfs_h *g,\n"
12321 "\t\tconst char *xattr,\n"
12322 "\t\tconst char *val,\n"
12323 "\t\tint vallen,\n"
12324 "\t\tconst char *path);\n"
12329 #: ../src/guestfs-actions.pod:4587 ../fish/guestfish-actions.pod:3554
12331 "This call sets the extended attribute named C<xattr> of the file C<path> to "
12332 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
12336 #: ../src/guestfs-actions.pod:4591
12337 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
12341 #: ../src/guestfs-actions.pod:4595
12342 msgid "guestfs_sfdisk"
12346 #: ../src/guestfs-actions.pod:4597
12349 " int guestfs_sfdisk (guestfs_h *g,\n"
12350 "\t\tconst char *device,\n"
12353 "\t\tint sectors,\n"
12354 "\t\tchar *const *lines);\n"
12359 #: ../src/guestfs-actions.pod:4604 ../fish/guestfish-actions.pod:3564
12361 "This is a direct interface to the L<sfdisk(8)> program for creating "
12362 "partitions on block devices."
12366 #: ../src/guestfs-actions.pod:4607 ../fish/guestfish-actions.pod:3567
12367 msgid "C<device> should be a block device, for example C</dev/sda>."
12371 #: ../src/guestfs-actions.pod:4609 ../fish/guestfish-actions.pod:3569
12373 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
12374 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
12375 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
12376 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
12377 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
12378 "the kernel) cannot work out the right geometry and you will need to tell it."
12382 #: ../src/guestfs-actions.pod:4617 ../fish/guestfish-actions.pod:3577
12384 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
12385 "refer to the L<sfdisk(8)> manpage."
12389 #: ../src/guestfs-actions.pod:4620 ../fish/guestfish-actions.pod:3580
12391 "To create a single partition occupying the whole disk, you would pass "
12392 "C<lines> as a single element list, when the single element being the string "
12397 #: ../src/guestfs-actions.pod:4624
12399 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
12403 #: ../src/guestfs-actions.pod:4632
12404 msgid "guestfs_sfdiskM"
12408 #: ../src/guestfs-actions.pod:4634
12411 " int guestfs_sfdiskM (guestfs_h *g,\n"
12412 "\t\tconst char *device,\n"
12413 "\t\tchar *const *lines);\n"
12418 #: ../src/guestfs-actions.pod:4638
12420 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
12421 "partition sizes are specified in megabytes only (rounded to the nearest "
12422 "cylinder) and you don't need to specify the cyls, heads and sectors "
12423 "parameters which were rarely if ever used anyway."
12427 #: ../src/guestfs-actions.pod:4644
12429 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
12430 "C<guestfs_part_disk>"
12434 #: ../src/guestfs-actions.pod:4652
12435 msgid "guestfs_sfdisk_N"
12439 #: ../src/guestfs-actions.pod:4654
12442 " int guestfs_sfdisk_N (guestfs_h *g,\n"
12443 "\t\tconst char *device,\n"
12444 "\t\tint partnum,\n"
12447 "\t\tint sectors,\n"
12448 "\t\tconst char *line);\n"
12453 #: ../src/guestfs-actions.pod:4662 ../fish/guestfish-actions.pod:3610
12455 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
12456 "(note: C<n> counts from 1)."
12460 #: ../src/guestfs-actions.pod:4665
12462 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
12463 "for the cyls/heads/sectors parameters."
12467 #: ../src/guestfs-actions.pod:4668
12468 msgid "See also: C<guestfs_part_add>"
12472 #: ../src/guestfs-actions.pod:4675
12473 msgid "guestfs_sfdisk_disk_geometry"
12477 #: ../src/guestfs-actions.pod:4677
12480 " char *guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
12481 "\t\tconst char *device);\n"
12486 #: ../src/guestfs-actions.pod:4680
12488 "This displays the disk geometry of C<device> read from the partition table. "
12489 "Especially in the case where the underlying block device has been resized, "
12490 "this can be different from the kernel's idea of the geometry (see "
12491 "C<guestfs_sfdisk_kernel_geometry>)."
12495 #: ../src/guestfs-actions.pod:4685 ../src/guestfs-actions.pod:4698
12496 #: ../fish/guestfish-actions.pod:3630 ../fish/guestfish-actions.pod:3639
12497 msgid "The result is in human-readable format, and not designed to be parsed."
12501 #: ../src/guestfs-actions.pod:4691
12502 msgid "guestfs_sfdisk_kernel_geometry"
12506 #: ../src/guestfs-actions.pod:4693
12509 " char *guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
12510 "\t\tconst char *device);\n"
12515 #: ../src/guestfs-actions.pod:4696 ../fish/guestfish-actions.pod:3637
12516 msgid "This displays the kernel's idea of the geometry of C<device>."
12520 #: ../src/guestfs-actions.pod:4704
12521 msgid "guestfs_sfdisk_l"
12525 #: ../src/guestfs-actions.pod:4706
12528 " char *guestfs_sfdisk_l (guestfs_h *g,\n"
12529 "\t\tconst char *device);\n"
12534 #: ../src/guestfs-actions.pod:4709 ../fish/guestfish-actions.pod:3646
12536 "This displays the partition table on C<device>, in the human-readable output "
12537 "of the L<sfdisk(8)> command. It is not intended to be parsed."
12541 #: ../src/guestfs-actions.pod:4713
12542 msgid "See also: C<guestfs_part_list>"
12546 #: ../src/guestfs-actions.pod:4718
12551 #: ../src/guestfs-actions.pod:4720
12554 " char *guestfs_sh (guestfs_h *g,\n"
12555 "\t\tconst char *command);\n"
12560 #: ../src/guestfs-actions.pod:4723 ../fish/guestfish-actions.pod:3656
12562 "This call runs a command from the guest filesystem via the guest's C</bin/"
12567 #: ../src/guestfs-actions.pod:4726
12568 msgid "This is like C<guestfs_command>, but passes the command to:"
12572 #: ../src/guestfs-actions.pod:4728 ../fish/guestfish-actions.pod:3661
12575 " /bin/sh -c \"command\"\n"
12580 #: ../src/guestfs-actions.pod:4730 ../fish/guestfish-actions.pod:3663
12582 "Depending on the guest's shell, this usually results in wildcards being "
12583 "expanded, shell expressions being interpolated and so on."
12587 #: ../src/guestfs-actions.pod:4734
12588 msgid "All the provisos about C<guestfs_command> apply to this call."
12592 #: ../src/guestfs-actions.pod:4739
12593 msgid "guestfs_sh_lines"
12597 #: ../src/guestfs-actions.pod:4741
12600 " char **guestfs_sh_lines (guestfs_h *g,\n"
12601 "\t\tconst char *command);\n"
12606 #: ../src/guestfs-actions.pod:4744
12608 "This is the same as C<guestfs_sh>, but splits the result into a list of "
12613 #: ../src/guestfs-actions.pod:4747
12614 msgid "See also: C<guestfs_command_lines>"
12618 #: ../src/guestfs-actions.pod:4753
12619 msgid "guestfs_sleep"
12623 #: ../src/guestfs-actions.pod:4755
12626 " int guestfs_sleep (guestfs_h *g,\n"
12632 #: ../src/guestfs-actions.pod:4758 ../fish/guestfish-actions.pod:3682
12633 msgid "Sleep for C<secs> seconds."
12637 #: ../src/guestfs-actions.pod:4762 ../src/guestfs-structs.pod:109
12638 msgid "guestfs_stat"
12642 #: ../src/guestfs-actions.pod:4764
12645 " struct guestfs_stat *guestfs_stat (guestfs_h *g,\n"
12646 "\t\tconst char *path);\n"
12651 #: ../src/guestfs-actions.pod:4769 ../fish/guestfish-actions.pod:3690
12652 msgid "This is the same as the C<stat(2)> system call."
12656 #: ../src/guestfs-actions.pod:4775 ../src/guestfs-structs.pod:135
12657 msgid "guestfs_statvfs"
12661 #: ../src/guestfs-actions.pod:4777
12664 " struct guestfs_statvfs *guestfs_statvfs (guestfs_h *g,\n"
12665 "\t\tconst char *path);\n"
12670 #: ../src/guestfs-actions.pod:4780 ../fish/guestfish-actions.pod:3696
12672 "Returns file system statistics for any mounted file system. C<path> should "
12673 "be a file or directory in the mounted file system (typically it is the mount "
12674 "point itself, but it doesn't need to be)."
12678 #: ../src/guestfs-actions.pod:4784 ../fish/guestfish-actions.pod:3700
12679 msgid "This is the same as the C<statvfs(2)> system call."
12683 #: ../src/guestfs-actions.pod:4786
12685 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
12686 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
12690 #: ../src/guestfs-actions.pod:4790
12691 msgid "guestfs_strings"
12695 #: ../src/guestfs-actions.pod:4792
12698 " char **guestfs_strings (guestfs_h *g,\n"
12699 "\t\tconst char *path);\n"
12704 #: ../src/guestfs-actions.pod:4795 ../fish/guestfish-actions.pod:3706
12706 "This runs the L<strings(1)> command on a file and returns the list of "
12707 "printable strings found."
12711 #: ../src/guestfs-actions.pod:4805
12712 msgid "guestfs_strings_e"
12716 #: ../src/guestfs-actions.pod:4807
12719 " char **guestfs_strings_e (guestfs_h *g,\n"
12720 "\t\tconst char *encoding,\n"
12721 "\t\tconst char *path);\n"
12726 #: ../src/guestfs-actions.pod:4811
12728 "This is like the C<guestfs_strings> command, but allows you to specify the "
12729 "encoding of strings that are looked for in the source file C<path>."
12733 #: ../src/guestfs-actions.pod:4815 ../fish/guestfish-actions.pod:3720
12734 msgid "Allowed encodings are:"
12738 #: ../src/guestfs-actions.pod:4819 ../fish/guestfish-actions.pod:3724
12743 #: ../src/guestfs-actions.pod:4821
12745 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
12746 "ISO-8859-X (this is what C<guestfs_strings> uses)."
12750 #: ../src/guestfs-actions.pod:4824 ../fish/guestfish-actions.pod:3729
12755 #: ../src/guestfs-actions.pod:4826 ../fish/guestfish-actions.pod:3731
12756 msgid "Single 8-bit-byte characters."
12760 #: ../src/guestfs-actions.pod:4828 ../fish/guestfish-actions.pod:3733
12765 #: ../src/guestfs-actions.pod:4830 ../fish/guestfish-actions.pod:3735
12766 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
12770 #: ../src/guestfs-actions.pod:4833 ../fish/guestfish-actions.pod:3738
12771 msgid "l (lower case letter L)"
12775 #: ../src/guestfs-actions.pod:4835 ../fish/guestfish-actions.pod:3740
12777 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
12778 "examining binaries in Windows guests."
12782 #: ../src/guestfs-actions.pod:4838 ../fish/guestfish-actions.pod:3743
12787 #: ../src/guestfs-actions.pod:4840 ../fish/guestfish-actions.pod:3745
12788 msgid "32-bit big endian such as UCS-4BE."
12792 #: ../src/guestfs-actions.pod:4842 ../fish/guestfish-actions.pod:3747
12797 #: ../src/guestfs-actions.pod:4844 ../fish/guestfish-actions.pod:3749
12798 msgid "32-bit little endian such as UCS-4LE."
12802 #: ../src/guestfs-actions.pod:4848 ../fish/guestfish-actions.pod:3753
12803 msgid "The returned strings are transcoded to UTF-8."
12807 #: ../src/guestfs-actions.pod:4857
12808 msgid "guestfs_swapoff_device"
12812 #: ../src/guestfs-actions.pod:4859
12815 " int guestfs_swapoff_device (guestfs_h *g,\n"
12816 "\t\tconst char *device);\n"
12821 #: ../src/guestfs-actions.pod:4862
12823 "This command disables the libguestfs appliance swap device or partition "
12824 "named C<device>. See C<guestfs_swapon_device>."
12828 #: ../src/guestfs-actions.pod:4868
12829 msgid "guestfs_swapoff_file"
12833 #: ../src/guestfs-actions.pod:4870
12836 " int guestfs_swapoff_file (guestfs_h *g,\n"
12837 "\t\tconst char *file);\n"
12842 #: ../src/guestfs-actions.pod:4873 ../fish/guestfish-actions.pod:3770
12843 msgid "This command disables the libguestfs appliance swap on file."
12847 #: ../src/guestfs-actions.pod:4877
12848 msgid "guestfs_swapoff_label"
12852 #: ../src/guestfs-actions.pod:4879
12855 " int guestfs_swapoff_label (guestfs_h *g,\n"
12856 "\t\tconst char *label);\n"
12861 #: ../src/guestfs-actions.pod:4882 ../fish/guestfish-actions.pod:3776
12863 "This command disables the libguestfs appliance swap on labeled swap "
12868 #: ../src/guestfs-actions.pod:4887
12869 msgid "guestfs_swapoff_uuid"
12873 #: ../src/guestfs-actions.pod:4889
12876 " int guestfs_swapoff_uuid (guestfs_h *g,\n"
12877 "\t\tconst char *uuid);\n"
12882 #: ../src/guestfs-actions.pod:4892 ../fish/guestfish-actions.pod:3783
12884 "This command disables the libguestfs appliance swap partition with the given "
12889 #: ../src/guestfs-actions.pod:4897
12890 msgid "guestfs_swapon_device"
12894 #: ../src/guestfs-actions.pod:4899
12897 " int guestfs_swapon_device (guestfs_h *g,\n"
12898 "\t\tconst char *device);\n"
12903 #: ../src/guestfs-actions.pod:4902
12905 "This command enables the libguestfs appliance to use the swap device or "
12906 "partition named C<device>. The increased memory is made available for all "
12907 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
12911 #: ../src/guestfs-actions.pod:4907 ../fish/guestfish-actions.pod:3795
12913 "Note that you should not swap to existing guest swap partitions unless you "
12914 "know what you are doing. They may contain hibernation information, or other "
12915 "information that the guest doesn't want you to trash. You also risk leaking "
12916 "information about the host to the guest this way. Instead, attach a new "
12917 "host device to the guest and swap on that."
12921 #: ../src/guestfs-actions.pod:4916
12922 msgid "guestfs_swapon_file"
12926 #: ../src/guestfs-actions.pod:4918
12929 " int guestfs_swapon_file (guestfs_h *g,\n"
12930 "\t\tconst char *file);\n"
12935 #: ../src/guestfs-actions.pod:4921
12937 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
12942 #: ../src/guestfs-actions.pod:4926
12943 msgid "guestfs_swapon_label"
12947 #: ../src/guestfs-actions.pod:4928
12950 " int guestfs_swapon_label (guestfs_h *g,\n"
12951 "\t\tconst char *label);\n"
12956 #: ../src/guestfs-actions.pod:4931
12958 "This command enables swap to a labeled swap partition. See "
12959 "C<guestfs_swapon_device> for other notes."
12963 #: ../src/guestfs-actions.pod:4936
12964 msgid "guestfs_swapon_uuid"
12968 #: ../src/guestfs-actions.pod:4938
12971 " int guestfs_swapon_uuid (guestfs_h *g,\n"
12972 "\t\tconst char *uuid);\n"
12977 #: ../src/guestfs-actions.pod:4941
12979 "This command enables swap to a swap partition with the given UUID. See "
12980 "C<guestfs_swapon_device> for other notes."
12984 #: ../src/guestfs-actions.pod:4946
12985 msgid "guestfs_sync"
12989 #: ../src/guestfs-actions.pod:4948
12992 " int guestfs_sync (guestfs_h *g);\n"
12997 #: ../src/guestfs-actions.pod:4950 ../fish/guestfish-actions.pod:3827
12999 "This syncs the disk, so that any writes are flushed through to the "
13000 "underlying disk image."
13004 #: ../src/guestfs-actions.pod:4953 ../fish/guestfish-actions.pod:3830
13006 "You should always call this if you have modified a disk image, before "
13007 "closing the handle."
13011 #: ../src/guestfs-actions.pod:4958
13012 msgid "guestfs_tail"
13016 #: ../src/guestfs-actions.pod:4960
13019 " char **guestfs_tail (guestfs_h *g,\n"
13020 "\t\tconst char *path);\n"
13025 #: ../src/guestfs-actions.pod:4963 ../fish/guestfish-actions.pod:3837
13027 "This command returns up to the last 10 lines of a file as a list of strings."
13031 #: ../src/guestfs-actions.pod:4973
13032 msgid "guestfs_tail_n"
13036 #: ../src/guestfs-actions.pod:4975
13039 " char **guestfs_tail_n (guestfs_h *g,\n"
13040 "\t\tint nrlines,\n"
13041 "\t\tconst char *path);\n"
13046 #: ../src/guestfs-actions.pod:4979 ../fish/guestfish-actions.pod:3847
13048 "If the parameter C<nrlines> is a positive number, this returns the last "
13049 "C<nrlines> lines of the file C<path>."
13053 #: ../src/guestfs-actions.pod:4982 ../fish/guestfish-actions.pod:3850
13055 "If the parameter C<nrlines> is a negative number, this returns lines from "
13056 "the file C<path>, starting with the C<-nrlines>th line."
13060 #: ../src/guestfs-actions.pod:4994
13061 msgid "guestfs_tar_in"
13065 #: ../src/guestfs-actions.pod:4996
13068 " int guestfs_tar_in (guestfs_h *g,\n"
13069 "\t\tconst char *tarfile,\n"
13070 "\t\tconst char *directory);\n"
13075 #: ../src/guestfs-actions.pod:5000 ../fish/guestfish-actions.pod:3862
13077 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
13078 "tar file) into C<directory>."
13082 #: ../src/guestfs-actions.pod:5003
13084 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
13088 #: ../src/guestfs-actions.pod:5008
13089 msgid "guestfs_tar_out"
13093 #: ../src/guestfs-actions.pod:5010
13096 " int guestfs_tar_out (guestfs_h *g,\n"
13097 "\t\tconst char *directory,\n"
13098 "\t\tconst char *tarfile);\n"
13103 #: ../src/guestfs-actions.pod:5014 ../fish/guestfish-actions.pod:3874
13105 "This command packs the contents of C<directory> and downloads it to local "
13110 #: ../src/guestfs-actions.pod:5017
13112 "To download a compressed tarball, use C<guestfs_tgz_out> or "
13113 "C<guestfs_txz_out>."
13117 #: ../src/guestfs-actions.pod:5022
13118 msgid "guestfs_tgz_in"
13122 #: ../src/guestfs-actions.pod:5024
13125 " int guestfs_tgz_in (guestfs_h *g,\n"
13126 "\t\tconst char *tarball,\n"
13127 "\t\tconst char *directory);\n"
13132 #: ../src/guestfs-actions.pod:5028 ../fish/guestfish-actions.pod:3886
13134 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
13135 "tar file) into C<directory>."
13139 #: ../src/guestfs-actions.pod:5031
13140 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
13144 #: ../src/guestfs-actions.pod:5035
13145 msgid "guestfs_tgz_out"
13149 #: ../src/guestfs-actions.pod:5037
13152 " int guestfs_tgz_out (guestfs_h *g,\n"
13153 "\t\tconst char *directory,\n"
13154 "\t\tconst char *tarball);\n"
13159 #: ../src/guestfs-actions.pod:5041 ../fish/guestfish-actions.pod:3897
13161 "This command packs the contents of C<directory> and downloads it to local "
13166 #: ../src/guestfs-actions.pod:5044
13167 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
13171 #: ../src/guestfs-actions.pod:5048
13172 msgid "guestfs_touch"
13176 #: ../src/guestfs-actions.pod:5050
13179 " int guestfs_touch (guestfs_h *g,\n"
13180 "\t\tconst char *path);\n"
13185 #: ../src/guestfs-actions.pod:5053 ../fish/guestfish-actions.pod:3908
13187 "Touch acts like the L<touch(1)> command. It can be used to update the "
13188 "timestamps on a file, or, if the file does not exist, to create a new zero-"
13193 #: ../src/guestfs-actions.pod:5057 ../fish/guestfish-actions.pod:3912
13195 "This command only works on regular files, and will fail on other file types "
13196 "such as directories, symbolic links, block special etc."
13200 #: ../src/guestfs-actions.pod:5062
13201 msgid "guestfs_truncate"
13205 #: ../src/guestfs-actions.pod:5064
13208 " int guestfs_truncate (guestfs_h *g,\n"
13209 "\t\tconst char *path);\n"
13214 #: ../src/guestfs-actions.pod:5067 ../fish/guestfish-actions.pod:3919
13216 "This command truncates C<path> to a zero-length file. The file must exist "
13221 #: ../src/guestfs-actions.pod:5072
13222 msgid "guestfs_truncate_size"
13226 #: ../src/guestfs-actions.pod:5074
13229 " int guestfs_truncate_size (guestfs_h *g,\n"
13230 "\t\tconst char *path,\n"
13231 "\t\tint64_t size);\n"
13236 #: ../src/guestfs-actions.pod:5078 ../fish/guestfish-actions.pod:3926
13238 "This command truncates C<path> to size C<size> bytes. The file must exist "
13243 #: ../src/guestfs-actions.pod:5081
13245 "If the current file size is less than C<size> then the file is extended to "
13246 "the required size with zero bytes. This creates a sparse file (ie. disk "
13247 "blocks are not allocated for the file until you write to it). To create a "
13248 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
13252 #: ../src/guestfs-actions.pod:5089
13253 msgid "guestfs_tune2fs_l"
13257 #: ../src/guestfs-actions.pod:5091
13260 " char **guestfs_tune2fs_l (guestfs_h *g,\n"
13261 "\t\tconst char *device);\n"
13266 #: ../src/guestfs-actions.pod:5094 ../fish/guestfish-actions.pod:3939
13268 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
13273 #: ../src/guestfs-actions.pod:5097 ../fish/guestfish-actions.pod:3942
13275 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
13276 "for more details. The list of fields returned isn't clearly defined, and "
13277 "depends on both the version of C<tune2fs> that libguestfs was built against, "
13278 "and the filesystem itself."
13282 #: ../src/guestfs-actions.pod:5108
13283 msgid "guestfs_txz_in"
13287 #: ../src/guestfs-actions.pod:5110
13290 " int guestfs_txz_in (guestfs_h *g,\n"
13291 "\t\tconst char *tarball,\n"
13292 "\t\tconst char *directory);\n"
13297 #: ../src/guestfs-actions.pod:5114 ../fish/guestfish-actions.pod:3951
13299 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
13300 "tar file) into C<directory>."
13304 #: ../src/guestfs-actions.pod:5119
13305 msgid "guestfs_txz_out"
13309 #: ../src/guestfs-actions.pod:5121
13312 " int guestfs_txz_out (guestfs_h *g,\n"
13313 "\t\tconst char *directory,\n"
13314 "\t\tconst char *tarball);\n"
13319 #: ../src/guestfs-actions.pod:5125 ../fish/guestfish-actions.pod:3960
13321 "This command packs the contents of C<directory> and downloads it to local "
13322 "file C<tarball> (as an xz compressed tar archive)."
13326 #: ../src/guestfs-actions.pod:5130
13327 msgid "guestfs_umask"
13331 #: ../src/guestfs-actions.pod:5132
13334 " int guestfs_umask (guestfs_h *g,\n"
13340 #: ../src/guestfs-actions.pod:5135 ../fish/guestfish-actions.pod:3969
13342 "This function sets the mask used for creating new files and device nodes to "
13347 #: ../src/guestfs-actions.pod:5138 ../fish/guestfish-actions.pod:3972
13349 "Typical umask values would be C<022> which creates new files with "
13350 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
13351 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
13355 #: ../src/guestfs-actions.pod:5143 ../fish/guestfish-actions.pod:3977
13357 "The default umask is C<022>. This is important because it means that "
13358 "directories and device nodes will be created with C<0644> or C<0755> mode "
13359 "even if you specify C<0777>."
13363 #: ../src/guestfs-actions.pod:5147
13365 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
13366 "C<guestfs_mkdir>."
13370 #: ../src/guestfs-actions.pod:5150 ../fish/guestfish-actions.pod:3984
13371 msgid "This call returns the previous umask."
13375 #: ../src/guestfs-actions.pod:5154
13376 msgid "guestfs_umount"
13380 #: ../src/guestfs-actions.pod:5156
13383 " int guestfs_umount (guestfs_h *g,\n"
13384 "\t\tconst char *pathordevice);\n"
13389 #: ../src/guestfs-actions.pod:5159 ../fish/guestfish-actions.pod:3992
13391 "This unmounts the given filesystem. The filesystem may be specified either "
13392 "by its mountpoint (path) or the device which contains the filesystem."
13396 #: ../src/guestfs-actions.pod:5165
13397 msgid "guestfs_umount_all"
13401 #: ../src/guestfs-actions.pod:5167
13404 " int guestfs_umount_all (guestfs_h *g);\n"
13409 #: ../src/guestfs-actions.pod:5169 ../fish/guestfish-actions.pod:4002
13410 msgid "This unmounts all mounted filesystems."
13414 #: ../src/guestfs-actions.pod:5171 ../fish/guestfish-actions.pod:4004
13415 msgid "Some internal mounts are not unmounted by this call."
13419 #: ../src/guestfs-actions.pod:5175
13420 msgid "guestfs_upload"
13424 #: ../src/guestfs-actions.pod:5177
13427 " int guestfs_upload (guestfs_h *g,\n"
13428 "\t\tconst char *filename,\n"
13429 "\t\tconst char *remotefilename);\n"
13434 #: ../src/guestfs-actions.pod:5181 ../src/guestfs-actions.pod:5197
13435 #: ../fish/guestfish-actions.pod:4010 ../fish/guestfish-actions.pod:4023
13436 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
13440 #: ../src/guestfs-actions.pod:5186
13441 msgid "See also C<guestfs_download>."
13445 #: ../src/guestfs-actions.pod:5190
13446 msgid "guestfs_upload_offset"
13450 #: ../src/guestfs-actions.pod:5192
13453 " int guestfs_upload_offset (guestfs_h *g,\n"
13454 "\t\tconst char *filename,\n"
13455 "\t\tconst char *remotefilename,\n"
13456 "\t\tint64_t offset);\n"
13461 #: ../src/guestfs-actions.pod:5200 ../fish/guestfish-actions.pod:4026
13463 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
13464 "The intention is to overwrite parts of existing files or devices, although "
13465 "if a non-existant file is specified then it is created with a \"hole\" "
13466 "before C<offset>. The size of the data written is implicit in the size of "
13467 "the source C<filename>."
13471 #: ../src/guestfs-actions.pod:5207
13473 "Note that there is no limit on the amount of data that can be uploaded with "
13474 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
13475 "full amount unless an error occurs."
13479 #: ../src/guestfs-actions.pod:5212
13480 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
13484 #: ../src/guestfs-actions.pod:5216
13485 msgid "guestfs_utimens"
13489 #: ../src/guestfs-actions.pod:5218
13492 " int guestfs_utimens (guestfs_h *g,\n"
13493 "\t\tconst char *path,\n"
13494 "\t\tint64_t atsecs,\n"
13495 "\t\tint64_t atnsecs,\n"
13496 "\t\tint64_t mtsecs,\n"
13497 "\t\tint64_t mtnsecs);\n"
13502 #: ../src/guestfs-actions.pod:5225 ../fish/guestfish-actions.pod:4046
13503 msgid "This command sets the timestamps of a file with nanosecond precision."
13507 #: ../src/guestfs-actions.pod:5228 ../fish/guestfish-actions.pod:4049
13509 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
13514 #: ../src/guestfs-actions.pod:5231 ../fish/guestfish-actions.pod:4052
13516 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
13517 "nanoseconds from the epoch."
13521 #: ../src/guestfs-actions.pod:5234 ../fish/guestfish-actions.pod:4055
13523 "If the C<*nsecs> field contains the special value C<-1> then the "
13524 "corresponding timestamp is set to the current time. (The C<*secs> field is "
13525 "ignored in this case)."
13529 #: ../src/guestfs-actions.pod:5238 ../fish/guestfish-actions.pod:4059
13531 "If the C<*nsecs> field contains the special value C<-2> then the "
13532 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
13537 #: ../src/guestfs-actions.pod:5244 ../src/guestfs-structs.pod:175
13538 msgid "guestfs_version"
13542 #: ../src/guestfs-actions.pod:5246
13545 " struct guestfs_version *guestfs_version (guestfs_h *g);\n"
13550 #: ../src/guestfs-actions.pod:5248 ../fish/guestfish-actions.pod:4067
13552 "Return the libguestfs version number that the program is linked against."
13556 #: ../src/guestfs-actions.pod:5251 ../fish/guestfish-actions.pod:4070
13558 "Note that because of dynamic linking this is not necessarily the version of "
13559 "libguestfs that you compiled against. You can compile the program, and then "
13560 "at runtime dynamically link against a completely different C<libguestfs.so> "
13565 #: ../src/guestfs-actions.pod:5256 ../fish/guestfish-actions.pod:4075
13567 "This call was added in version C<1.0.58>. In previous versions of "
13568 "libguestfs there was no way to get the version number. From C code you can "
13569 "use dynamic linker functions to find out if this symbol exists (if it "
13570 "doesn't, then it's an earlier version)."
13574 #: ../src/guestfs-actions.pod:5262 ../fish/guestfish-actions.pod:4081
13576 "The call returns a structure with four elements. The first three (C<major>, "
13577 "C<minor> and C<release>) are numbers and correspond to the usual version "
13578 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
13579 "but may be used for distro-specific information."
13583 #: ../src/guestfs-actions.pod:5268 ../fish/guestfish-actions.pod:4087
13585 "To construct the original version string: C<$major.$minor.$release$extra>"
13589 #: ../src/guestfs-actions.pod:5271 ../fish/guestfish-actions.pod:4090
13590 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
13594 #: ../src/guestfs-actions.pod:5273
13596 "I<Note:> Don't use this call to test for availability of features. In "
13597 "enterprise distributions we backport features from later versions into "
13598 "earlier versions, making this an unreliable way to test for features. Use "
13599 "C<guestfs_available> instead."
13603 #: ../src/guestfs-actions.pod:5279
13605 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
13606 "error. I<The caller must call C<guestfs_free_version> after use>."
13610 #: ../src/guestfs-actions.pod:5283
13611 msgid "guestfs_vfs_label"
13615 #: ../src/guestfs-actions.pod:5285
13618 " char *guestfs_vfs_label (guestfs_h *g,\n"
13619 "\t\tconst char *device);\n"
13624 #: ../src/guestfs-actions.pod:5288 ../fish/guestfish-actions.pod:4102
13625 msgid "This returns the filesystem label of the filesystem on C<device>."
13629 #: ../src/guestfs-actions.pod:5291 ../fish/guestfish-actions.pod:4105
13630 msgid "If the filesystem is unlabeled, this returns the empty string."
13634 #: ../src/guestfs-actions.pod:5293
13635 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
13639 #: ../src/guestfs-actions.pod:5298
13640 msgid "guestfs_vfs_type"
13644 #: ../src/guestfs-actions.pod:5300
13647 " char *guestfs_vfs_type (guestfs_h *g,\n"
13648 "\t\tconst char *device);\n"
13653 #: ../src/guestfs-actions.pod:5303 ../fish/guestfish-actions.pod:4113
13655 "This command gets the filesystem type corresponding to the filesystem on "
13660 #: ../src/guestfs-actions.pod:5306 ../fish/guestfish-actions.pod:4116
13662 "For most filesystems, the result is the name of the Linux VFS module which "
13663 "would be used to mount this filesystem if you mounted it without specifying "
13664 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
13668 #: ../src/guestfs-actions.pod:5314
13669 msgid "guestfs_vfs_uuid"
13673 #: ../src/guestfs-actions.pod:5316
13676 " char *guestfs_vfs_uuid (guestfs_h *g,\n"
13677 "\t\tconst char *device);\n"
13682 #: ../src/guestfs-actions.pod:5319 ../fish/guestfish-actions.pod:4125
13683 msgid "This returns the filesystem UUID of the filesystem on C<device>."
13687 #: ../src/guestfs-actions.pod:5322 ../fish/guestfish-actions.pod:4128
13688 msgid "If the filesystem does not have a UUID, this returns the empty string."
13692 #: ../src/guestfs-actions.pod:5324
13693 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
13697 #: ../src/guestfs-actions.pod:5329
13698 msgid "guestfs_vg_activate"
13702 #: ../src/guestfs-actions.pod:5331
13705 " int guestfs_vg_activate (guestfs_h *g,\n"
13706 "\t\tint activate,\n"
13707 "\t\tchar *const *volgroups);\n"
13712 #: ../src/guestfs-actions.pod:5335 ../fish/guestfish-actions.pod:4136
13714 "This command activates or (if C<activate> is false) deactivates all logical "
13715 "volumes in the listed volume groups C<volgroups>. If activated, then they "
13716 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
13717 "deactivated, then those devices disappear."
13721 #: ../src/guestfs-actions.pod:5341 ../fish/guestfish-actions.pod:4142
13722 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
13726 #: ../src/guestfs-actions.pod:5343 ../fish/guestfish-actions.pod:4144
13728 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
13729 "activated or deactivated."
13733 #: ../src/guestfs-actions.pod:5348
13734 msgid "guestfs_vg_activate_all"
13738 #: ../src/guestfs-actions.pod:5350
13741 " int guestfs_vg_activate_all (guestfs_h *g,\n"
13742 "\t\tint activate);\n"
13747 #: ../src/guestfs-actions.pod:5353 ../fish/guestfish-actions.pod:4151
13749 "This command activates or (if C<activate> is false) deactivates all logical "
13750 "volumes in all volume groups. If activated, then they are made known to the "
13751 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
13752 "those devices disappear."
13756 #: ../src/guestfs-actions.pod:5359 ../fish/guestfish-actions.pod:4157
13757 msgid "This command is the same as running C<vgchange -a y|n>"
13761 #: ../src/guestfs-actions.pod:5363
13762 msgid "guestfs_vgcreate"
13766 #: ../src/guestfs-actions.pod:5365
13769 " int guestfs_vgcreate (guestfs_h *g,\n"
13770 "\t\tconst char *volgroup,\n"
13771 "\t\tchar *const *physvols);\n"
13776 #: ../src/guestfs-actions.pod:5369 ../fish/guestfish-actions.pod:4163
13778 "This creates an LVM volume group called C<volgroup> from the non-empty list "
13779 "of physical volumes C<physvols>."
13783 #: ../src/guestfs-actions.pod:5374
13784 msgid "guestfs_vglvuuids"
13788 #: ../src/guestfs-actions.pod:5376
13791 " char **guestfs_vglvuuids (guestfs_h *g,\n"
13792 "\t\tconst char *vgname);\n"
13797 #: ../src/guestfs-actions.pod:5379 ../fish/guestfish-actions.pod:4170
13799 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
13800 "volumes created in this volume group."
13804 #: ../src/guestfs-actions.pod:5382
13806 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
13807 "associate logical volumes and volume groups."
13811 #: ../src/guestfs-actions.pod:5385
13812 msgid "See also C<guestfs_vgpvuuids>."
13816 #: ../src/guestfs-actions.pod:5391
13817 msgid "guestfs_vgpvuuids"
13821 #: ../src/guestfs-actions.pod:5393
13824 " char **guestfs_vgpvuuids (guestfs_h *g,\n"
13825 "\t\tconst char *vgname);\n"
13830 #: ../src/guestfs-actions.pod:5396 ../fish/guestfish-actions.pod:4182
13832 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
13833 "volumes that this volume group resides on."
13837 #: ../src/guestfs-actions.pod:5399
13839 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
13840 "associate physical volumes and volume groups."
13844 #: ../src/guestfs-actions.pod:5402
13845 msgid "See also C<guestfs_vglvuuids>."
13849 #: ../src/guestfs-actions.pod:5408
13850 msgid "guestfs_vgremove"
13854 #: ../src/guestfs-actions.pod:5410
13857 " int guestfs_vgremove (guestfs_h *g,\n"
13858 "\t\tconst char *vgname);\n"
13863 #: ../src/guestfs-actions.pod:5413 ../fish/guestfish-actions.pod:4194
13864 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
13868 #: ../src/guestfs-actions.pod:5415 ../fish/guestfish-actions.pod:4196
13870 "This also forcibly removes all logical volumes in the volume group (if any)."
13874 #: ../src/guestfs-actions.pod:5420
13875 msgid "guestfs_vgrename"
13879 #: ../src/guestfs-actions.pod:5422
13882 " int guestfs_vgrename (guestfs_h *g,\n"
13883 "\t\tconst char *volgroup,\n"
13884 "\t\tconst char *newvolgroup);\n"
13889 #: ../src/guestfs-actions.pod:5426 ../fish/guestfish-actions.pod:4203
13890 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
13894 #: ../src/guestfs-actions.pod:5430
13895 msgid "guestfs_vgs"
13899 #: ../src/guestfs-actions.pod:5432
13902 " char **guestfs_vgs (guestfs_h *g);\n"
13907 #: ../src/guestfs-actions.pod:5434 ../fish/guestfish-actions.pod:4209
13909 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
13914 #: ../src/guestfs-actions.pod:5437 ../fish/guestfish-actions.pod:4212
13916 "This returns a list of just the volume group names that were detected (eg. "
13921 #: ../src/guestfs-actions.pod:5440
13922 msgid "See also C<guestfs_vgs_full>."
13926 #: ../src/guestfs-actions.pod:5446
13927 msgid "guestfs_vgs_full"
13931 #: ../src/guestfs-actions.pod:5448
13934 " struct guestfs_lvm_vg_list *guestfs_vgs_full (guestfs_h *g);\n"
13939 #: ../src/guestfs-actions.pod:5450 ../fish/guestfish-actions.pod:4221
13941 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
13942 "> command. The \"full\" version includes all fields."
13946 #: ../src/guestfs-actions.pod:5453
13948 "This function returns a C<struct guestfs_lvm_vg_list *> (see E<lt>guestfs-"
13949 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
13950 "C<guestfs_free_lvm_vg_list> after use>."
13954 #: ../src/guestfs-actions.pod:5458
13955 msgid "guestfs_vgscan"
13959 #: ../src/guestfs-actions.pod:5460
13962 " int guestfs_vgscan (guestfs_h *g);\n"
13967 #: ../src/guestfs-actions.pod:5462 ../fish/guestfish-actions.pod:4228
13969 "This rescans all block devices and rebuilds the list of LVM physical "
13970 "volumes, volume groups and logical volumes."
13974 #: ../src/guestfs-actions.pod:5467
13975 msgid "guestfs_vguuid"
13979 #: ../src/guestfs-actions.pod:5469
13982 " char *guestfs_vguuid (guestfs_h *g,\n"
13983 "\t\tconst char *vgname);\n"
13988 #: ../src/guestfs-actions.pod:5472 ../fish/guestfish-actions.pod:4235
13989 msgid "This command returns the UUID of the LVM VG named C<vgname>."
13993 #: ../src/guestfs-actions.pod:5477
13994 msgid "guestfs_wait_ready"
13998 #: ../src/guestfs-actions.pod:5479
14001 " int guestfs_wait_ready (guestfs_h *g);\n"
14006 #: ../src/guestfs-actions.pod:5481
14007 msgid "This function is a no op."
14011 #: ../src/guestfs-actions.pod:5483
14013 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
14014 "calling C<guestfs_launch> to wait for the launch to complete. However this "
14015 "is no longer necessary because C<guestfs_launch> now does the waiting."
14019 #: ../src/guestfs-actions.pod:5488
14021 "If you see any calls to this function in code then you can just remove them, "
14022 "unless you want to retain compatibility with older versions of the API."
14026 #: ../src/guestfs-actions.pod:5494
14027 msgid "guestfs_wc_c"
14031 #: ../src/guestfs-actions.pod:5496
14034 " int guestfs_wc_c (guestfs_h *g,\n"
14035 "\t\tconst char *path);\n"
14040 #: ../src/guestfs-actions.pod:5499 ../fish/guestfish-actions.pod:4241
14042 "This command counts the characters in a file, using the C<wc -c> external "
14047 #: ../src/guestfs-actions.pod:5504
14048 msgid "guestfs_wc_l"
14052 #: ../src/guestfs-actions.pod:5506
14055 " int guestfs_wc_l (guestfs_h *g,\n"
14056 "\t\tconst char *path);\n"
14061 #: ../src/guestfs-actions.pod:5509 ../fish/guestfish-actions.pod:4248
14063 "This command counts the lines in a file, using the C<wc -l> external command."
14067 #: ../src/guestfs-actions.pod:5514
14068 msgid "guestfs_wc_w"
14072 #: ../src/guestfs-actions.pod:5516
14075 " int guestfs_wc_w (guestfs_h *g,\n"
14076 "\t\tconst char *path);\n"
14081 #: ../src/guestfs-actions.pod:5519 ../fish/guestfish-actions.pod:4255
14083 "This command counts the words in a file, using the C<wc -w> external command."
14087 #: ../src/guestfs-actions.pod:5524
14088 msgid "guestfs_write"
14092 #: ../src/guestfs-actions.pod:5526
14095 " int guestfs_write (guestfs_h *g,\n"
14096 "\t\tconst char *path,\n"
14097 "\t\tconst char *content,\n"
14098 "\t\tsize_t content_size);\n"
14103 #: ../src/guestfs-actions.pod:5531 ../fish/guestfish-actions.pod:4262
14105 "This call creates a file called C<path>. The content of the file is the "
14106 "string C<content> (which can contain any 8 bit data)."
14110 #: ../src/guestfs-actions.pod:5539
14111 msgid "guestfs_write_file"
14115 #: ../src/guestfs-actions.pod:5541
14118 " int guestfs_write_file (guestfs_h *g,\n"
14119 "\t\tconst char *path,\n"
14120 "\t\tconst char *content,\n"
14126 #: ../src/guestfs-actions.pod:5546 ../fish/guestfish-actions.pod:4272
14128 "This call creates a file called C<path>. The contents of the file is the "
14129 "string C<content> (which can contain any 8 bit data), with length C<size>."
14133 #: ../src/guestfs-actions.pod:5550 ../fish/guestfish-actions.pod:4276
14135 "As a special case, if C<size> is C<0> then the length is calculated using "
14136 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
14140 #: ../src/guestfs-actions.pod:5554 ../fish/guestfish-actions.pod:4280
14142 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
14143 "I<not> work, even if the length is specified."
14147 #: ../src/guestfs-actions.pod:5562 ../fish/guestfish-actions.pod:4286
14149 "This function is deprecated. In new code, use the C<write> call instead."
14153 #: ../src/guestfs-actions.pod:5569
14154 msgid "guestfs_zegrep"
14158 #: ../src/guestfs-actions.pod:5571
14161 " char **guestfs_zegrep (guestfs_h *g,\n"
14162 "\t\tconst char *regex,\n"
14163 "\t\tconst char *path);\n"
14168 #: ../src/guestfs-actions.pod:5575 ../fish/guestfish-actions.pod:4297
14170 "This calls the external C<zegrep> program and returns the matching lines."
14174 #: ../src/guestfs-actions.pod:5585
14175 msgid "guestfs_zegrepi"
14179 #: ../src/guestfs-actions.pod:5587
14182 " char **guestfs_zegrepi (guestfs_h *g,\n"
14183 "\t\tconst char *regex,\n"
14184 "\t\tconst char *path);\n"
14189 #: ../src/guestfs-actions.pod:5591 ../fish/guestfish-actions.pod:4307
14191 "This calls the external C<zegrep -i> program and returns the matching lines."
14195 #: ../src/guestfs-actions.pod:5601
14196 msgid "guestfs_zero"
14200 #: ../src/guestfs-actions.pod:5603
14203 " int guestfs_zero (guestfs_h *g,\n"
14204 "\t\tconst char *device);\n"
14209 #: ../src/guestfs-actions.pod:5606 ../fish/guestfish-actions.pod:4317
14210 msgid "This command writes zeroes over the first few blocks of C<device>."
14214 #: ../src/guestfs-actions.pod:5608 ../fish/guestfish-actions.pod:4319
14216 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
14217 "securely wipe the device). It should be sufficient to remove any partition "
14218 "tables, filesystem superblocks and so on."
14222 #: ../src/guestfs-actions.pod:5612
14223 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
14227 #: ../src/guestfs-actions.pod:5621
14228 msgid "guestfs_zero_device"
14232 #: ../src/guestfs-actions.pod:5623
14235 " int guestfs_zero_device (guestfs_h *g,\n"
14236 "\t\tconst char *device);\n"
14241 #: ../src/guestfs-actions.pod:5626
14243 "This command writes zeroes over the entire C<device>. Compare with "
14244 "C<guestfs_zero> which just zeroes the first few blocks of a device."
14248 #: ../src/guestfs-actions.pod:5640
14249 msgid "guestfs_zerofree"
14253 #: ../src/guestfs-actions.pod:5642
14256 " int guestfs_zerofree (guestfs_h *g,\n"
14257 "\t\tconst char *device);\n"
14262 #: ../src/guestfs-actions.pod:5645 ../fish/guestfish-actions.pod:4340
14264 "This runs the I<zerofree> program on C<device>. This program claims to zero "
14265 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
14266 "possible to compress the filesystem more effectively."
14270 #: ../src/guestfs-actions.pod:5650 ../fish/guestfish-actions.pod:4345
14271 msgid "You should B<not> run this program if the filesystem is mounted."
14275 #: ../src/guestfs-actions.pod:5653 ../fish/guestfish-actions.pod:4348
14277 "It is possible that using this program can damage the filesystem or data on "
14282 #: ../src/guestfs-actions.pod:5658
14283 msgid "guestfs_zfgrep"
14287 #: ../src/guestfs-actions.pod:5660
14290 " char **guestfs_zfgrep (guestfs_h *g,\n"
14291 "\t\tconst char *pattern,\n"
14292 "\t\tconst char *path);\n"
14297 #: ../src/guestfs-actions.pod:5664 ../fish/guestfish-actions.pod:4355
14299 "This calls the external C<zfgrep> program and returns the matching lines."
14303 #: ../src/guestfs-actions.pod:5674
14304 msgid "guestfs_zfgrepi"
14308 #: ../src/guestfs-actions.pod:5676
14311 " char **guestfs_zfgrepi (guestfs_h *g,\n"
14312 "\t\tconst char *pattern,\n"
14313 "\t\tconst char *path);\n"
14318 #: ../src/guestfs-actions.pod:5680 ../fish/guestfish-actions.pod:4365
14320 "This calls the external C<zfgrep -i> program and returns the matching lines."
14324 #: ../src/guestfs-actions.pod:5690
14325 msgid "guestfs_zfile"
14329 #: ../src/guestfs-actions.pod:5692
14332 " char *guestfs_zfile (guestfs_h *g,\n"
14333 "\t\tconst char *meth,\n"
14334 "\t\tconst char *path);\n"
14339 #: ../src/guestfs-actions.pod:5696 ../fish/guestfish-actions.pod:4375
14341 "This command runs C<file> after first decompressing C<path> using C<method>."
14345 #: ../src/guestfs-actions.pod:5699 ../fish/guestfish-actions.pod:4378
14346 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
14350 #: ../src/guestfs-actions.pod:5701
14352 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
14357 #: ../src/guestfs-actions.pod:5707 ../fish/guestfish-actions.pod:4383
14359 "This function is deprecated. In new code, use the C<file> call instead."
14363 #: ../src/guestfs-actions.pod:5714
14364 msgid "guestfs_zgrep"
14368 #: ../src/guestfs-actions.pod:5716
14371 " char **guestfs_zgrep (guestfs_h *g,\n"
14372 "\t\tconst char *regex,\n"
14373 "\t\tconst char *path);\n"
14378 #: ../src/guestfs-actions.pod:5720 ../fish/guestfish-actions.pod:4394
14380 "This calls the external C<zgrep> program and returns the matching lines."
14384 #: ../src/guestfs-actions.pod:5730
14385 msgid "guestfs_zgrepi"
14389 #: ../src/guestfs-actions.pod:5732
14392 " char **guestfs_zgrepi (guestfs_h *g,\n"
14393 "\t\tconst char *regex,\n"
14394 "\t\tconst char *path);\n"
14399 #: ../src/guestfs-actions.pod:5736 ../fish/guestfish-actions.pod:4404
14401 "This calls the external C<zgrep -i> program and returns the matching lines."
14405 #: ../src/guestfs-availability.pod:3
14410 #: ../src/guestfs-availability.pod:5
14412 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
14413 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
14414 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
14415 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
14416 "L</guestfs_aug_save> L</guestfs_aug_set>"
14420 #: ../src/guestfs-availability.pod:21
14425 #: ../src/guestfs-availability.pod:23
14427 "The following functions: L</guestfs_inotify_add_watch> L</"
14428 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
14429 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
14433 #: ../src/guestfs-availability.pod:31
14434 msgid "B<linuxfsuuid>"
14438 #: ../src/guestfs-availability.pod:33
14440 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
14441 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
14445 #: ../src/guestfs-availability.pod:40
14446 msgid "B<linuxmodules>"
14450 #: ../src/guestfs-availability.pod:42
14451 msgid "The following functions: L</guestfs_modprobe>"
14455 #: ../src/guestfs-availability.pod:45
14456 msgid "B<linuxxattrs>"
14460 #: ../src/guestfs-availability.pod:47
14462 "The following functions: L</guestfs_getxattrs> L</guestfs_lgetxattrs> L</"
14463 "guestfs_lremovexattr> L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</"
14464 "guestfs_removexattr> L</guestfs_setxattr>"
14468 #: ../src/guestfs-availability.pod:56
14473 #: ../src/guestfs-availability.pod:58
14475 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
14476 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
14477 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
14481 #: ../src/guestfs-availability.pod:67
14486 #: ../src/guestfs-availability.pod:69
14488 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
14489 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
14490 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
14491 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
14492 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
14493 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
14494 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
14498 #: ../src/guestfs-availability.pod:92
14503 #: ../src/guestfs-availability.pod:94
14505 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
14506 "guestfs_mknod_b> L</guestfs_mknod_c>"
14510 #: ../src/guestfs-availability.pod:100
14515 #: ../src/guestfs-availability.pod:102
14516 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
14520 #: ../src/guestfs-availability.pod:105
14521 msgid "B<ntfsprogs>"
14525 #: ../src/guestfs-availability.pod:107
14527 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
14531 #: ../src/guestfs-availability.pod:111
14532 msgid "B<realpath>"
14536 #: ../src/guestfs-availability.pod:113
14537 msgid "The following functions: L</guestfs_realpath>"
14541 #: ../src/guestfs-availability.pod:116
14546 #: ../src/guestfs-availability.pod:118
14548 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
14549 "guestfs_scrub_freespace>"
14553 #: ../src/guestfs-availability.pod:123
14558 #: ../src/guestfs-availability.pod:125
14559 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
14563 #: ../src/guestfs-availability.pod:129
14568 #: ../src/guestfs-availability.pod:131
14569 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
14573 #: ../src/guestfs-availability.pod:135
14574 msgid "B<zerofree>"
14578 #: ../src/guestfs-availability.pod:137
14579 msgid "The following functions: L</guestfs_zerofree>"
14583 #: ../src/guestfs-structs.pod:1
14584 msgid "guestfs_int_bool"
14588 #: ../src/guestfs-structs.pod:3
14591 " struct guestfs_int_bool {\n"
14599 #: ../src/guestfs-structs.pod:8
14602 " struct guestfs_int_bool_list {\n"
14603 " uint32_t len; /* Number of elements in list. */\n"
14604 " struct guestfs_int_bool *val; /* Elements. */\n"
14610 #: ../src/guestfs-structs.pod:13
14613 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
14614 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
14619 #: ../src/guestfs-structs.pod:16
14620 msgid "guestfs_lvm_pv"
14624 #: ../src/guestfs-structs.pod:18
14627 " struct guestfs_lvm_pv {\n"
14628 " char *pv_name;\n"
14629 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
14630 " char pv_uuid[32];\n"
14632 " uint64_t pv_size;\n"
14633 " uint64_t dev_size;\n"
14634 " uint64_t pv_free;\n"
14635 " uint64_t pv_used;\n"
14636 " char *pv_attr;\n"
14637 " int64_t pv_pe_count;\n"
14638 " int64_t pv_pe_alloc_count;\n"
14639 " char *pv_tags;\n"
14640 " uint64_t pe_start;\n"
14641 " int64_t pv_mda_count;\n"
14642 " uint64_t pv_mda_free;\n"
14648 #: ../src/guestfs-structs.pod:36
14651 " struct guestfs_lvm_pv_list {\n"
14652 " uint32_t len; /* Number of elements in list. */\n"
14653 " struct guestfs_lvm_pv *val; /* Elements. */\n"
14659 #: ../src/guestfs-structs.pod:41
14662 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
14663 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
14668 #: ../src/guestfs-structs.pod:44
14669 msgid "guestfs_lvm_vg"
14673 #: ../src/guestfs-structs.pod:46
14676 " struct guestfs_lvm_vg {\n"
14677 " char *vg_name;\n"
14678 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
14679 " char vg_uuid[32];\n"
14681 " char *vg_attr;\n"
14682 " uint64_t vg_size;\n"
14683 " uint64_t vg_free;\n"
14684 " char *vg_sysid;\n"
14685 " uint64_t vg_extent_size;\n"
14686 " int64_t vg_extent_count;\n"
14687 " int64_t vg_free_count;\n"
14688 " int64_t max_lv;\n"
14689 " int64_t max_pv;\n"
14690 " int64_t pv_count;\n"
14691 " int64_t lv_count;\n"
14692 " int64_t snap_count;\n"
14693 " int64_t vg_seqno;\n"
14694 " char *vg_tags;\n"
14695 " int64_t vg_mda_count;\n"
14696 " uint64_t vg_mda_free;\n"
14702 #: ../src/guestfs-structs.pod:69
14705 " struct guestfs_lvm_vg_list {\n"
14706 " uint32_t len; /* Number of elements in list. */\n"
14707 " struct guestfs_lvm_vg *val; /* Elements. */\n"
14713 #: ../src/guestfs-structs.pod:74
14716 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
14717 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
14722 #: ../src/guestfs-structs.pod:77
14723 msgid "guestfs_lvm_lv"
14727 #: ../src/guestfs-structs.pod:79
14730 " struct guestfs_lvm_lv {\n"
14731 " char *lv_name;\n"
14732 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
14733 " char lv_uuid[32];\n"
14734 " char *lv_attr;\n"
14735 " int64_t lv_major;\n"
14736 " int64_t lv_minor;\n"
14737 " int64_t lv_kernel_major;\n"
14738 " int64_t lv_kernel_minor;\n"
14739 " uint64_t lv_size;\n"
14740 " int64_t seg_count;\n"
14742 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
14743 " float snap_percent;\n"
14744 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
14745 " float copy_percent;\n"
14746 " char *move_pv;\n"
14747 " char *lv_tags;\n"
14748 " char *mirror_log;\n"
14749 " char *modules;\n"
14755 #: ../src/guestfs-structs.pod:101
14758 " struct guestfs_lvm_lv_list {\n"
14759 " uint32_t len; /* Number of elements in list. */\n"
14760 " struct guestfs_lvm_lv *val; /* Elements. */\n"
14766 #: ../src/guestfs-structs.pod:106
14769 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
14770 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
14775 #: ../src/guestfs-structs.pod:111
14778 " struct guestfs_stat {\n"
14782 " int64_t nlink;\n"
14787 " int64_t blksize;\n"
14788 " int64_t blocks;\n"
14789 " int64_t atime;\n"
14790 " int64_t mtime;\n"
14791 " int64_t ctime;\n"
14797 #: ../src/guestfs-structs.pod:127
14800 " struct guestfs_stat_list {\n"
14801 " uint32_t len; /* Number of elements in list. */\n"
14802 " struct guestfs_stat *val; /* Elements. */\n"
14808 #: ../src/guestfs-structs.pod:132
14811 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
14812 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
14817 #: ../src/guestfs-structs.pod:137
14820 " struct guestfs_statvfs {\n"
14821 " int64_t bsize;\n"
14822 " int64_t frsize;\n"
14823 " int64_t blocks;\n"
14824 " int64_t bfree;\n"
14825 " int64_t bavail;\n"
14826 " int64_t files;\n"
14827 " int64_t ffree;\n"
14828 " int64_t favail;\n"
14831 " int64_t namemax;\n"
14837 #: ../src/guestfs-structs.pod:151
14840 " struct guestfs_statvfs_list {\n"
14841 " uint32_t len; /* Number of elements in list. */\n"
14842 " struct guestfs_statvfs *val; /* Elements. */\n"
14848 #: ../src/guestfs-structs.pod:156
14851 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
14852 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
14857 #: ../src/guestfs-structs.pod:159
14858 msgid "guestfs_dirent"
14862 #: ../src/guestfs-structs.pod:161
14865 " struct guestfs_dirent {\n"
14874 #: ../src/guestfs-structs.pod:167
14877 " struct guestfs_dirent_list {\n"
14878 " uint32_t len; /* Number of elements in list. */\n"
14879 " struct guestfs_dirent *val; /* Elements. */\n"
14885 #: ../src/guestfs-structs.pod:172
14888 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
14889 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
14894 #: ../src/guestfs-structs.pod:177
14897 " struct guestfs_version {\n"
14898 " int64_t major;\n"
14899 " int64_t minor;\n"
14900 " int64_t release;\n"
14907 #: ../src/guestfs-structs.pod:184
14910 " struct guestfs_version_list {\n"
14911 " uint32_t len; /* Number of elements in list. */\n"
14912 " struct guestfs_version *val; /* Elements. */\n"
14918 #: ../src/guestfs-structs.pod:189
14921 " void guestfs_free_version (struct guestfs_free_version *);\n"
14922 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
14927 #: ../src/guestfs-structs.pod:192
14928 msgid "guestfs_xattr"
14932 #: ../src/guestfs-structs.pod:194
14935 " struct guestfs_xattr {\n"
14936 " char *attrname;\n"
14937 " /* The next two fields describe a byte array. */\n"
14938 " uint32_t attrval_len;\n"
14939 " char *attrval;\n"
14945 #: ../src/guestfs-structs.pod:201
14948 " struct guestfs_xattr_list {\n"
14949 " uint32_t len; /* Number of elements in list. */\n"
14950 " struct guestfs_xattr *val; /* Elements. */\n"
14956 #: ../src/guestfs-structs.pod:206
14959 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
14960 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
14965 #: ../src/guestfs-structs.pod:209
14966 msgid "guestfs_inotify_event"
14970 #: ../src/guestfs-structs.pod:211
14973 " struct guestfs_inotify_event {\n"
14974 " int64_t in_wd;\n"
14975 " uint32_t in_mask;\n"
14976 " uint32_t in_cookie;\n"
14977 " char *in_name;\n"
14983 #: ../src/guestfs-structs.pod:218
14986 " struct guestfs_inotify_event_list {\n"
14987 " uint32_t len; /* Number of elements in list. */\n"
14988 " struct guestfs_inotify_event *val; /* Elements. */\n"
14994 #: ../src/guestfs-structs.pod:223
14997 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
14998 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
15003 #: ../src/guestfs-structs.pod:226
15004 msgid "guestfs_partition"
15008 #: ../src/guestfs-structs.pod:228
15011 " struct guestfs_partition {\n"
15012 " int32_t part_num;\n"
15013 " uint64_t part_start;\n"
15014 " uint64_t part_end;\n"
15015 " uint64_t part_size;\n"
15021 #: ../src/guestfs-structs.pod:235
15024 " struct guestfs_partition_list {\n"
15025 " uint32_t len; /* Number of elements in list. */\n"
15026 " struct guestfs_partition *val; /* Elements. */\n"
15032 #: ../src/guestfs-structs.pod:240
15035 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
15036 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
15041 #: ../fish/guestfish.pod:5
15042 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
15046 #: ../fish/guestfish.pod:9
15049 " guestfish [--options] [commands]\n"
15054 #: ../fish/guestfish.pod:11
15062 #: ../fish/guestfish.pod:13
15065 " guestfish -a disk.img\n"
15070 #: ../fish/guestfish.pod:15
15073 " guestfish -a disk.img -m dev[:mountpoint]\n"
15078 #: ../fish/guestfish.pod:17
15081 " guestfish -d libvirt-domain\n"
15086 #: ../fish/guestfish.pod:19
15089 " guestfish -a disk.img -i\n"
15094 #: ../fish/guestfish.pod:21
15097 " guestfish -d libvirt-domain -i\n"
15102 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:11 ../tools/virt-edit.pl:45
15103 #: ../tools/virt-win-reg.pl:52 ../tools/virt-tar.pl:60
15104 #: ../tools/virt-rescue.pl:41
15109 #: ../fish/guestfish.pod:25
15111 "Using guestfish in read/write mode on live virtual machines can be "
15112 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
15113 "option to use guestfish safely if the disk image or virtual machine might be "
15118 #: ../fish/guestfish.pod:32
15120 "Guestfish is a shell and command-line tool for examining and modifying "
15121 "virtual machine filesystems. It uses libguestfs and exposes all of the "
15122 "functionality of the guestfs API, see L<guestfs(3)>."
15126 #: ../fish/guestfish.pod:36
15128 "Guestfish gives you structured access to the libguestfs API, from shell "
15129 "scripts or the command line or interactively. If you want to rescue a "
15130 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
15135 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:800
15136 #: ../fuse/guestmount.pod:35 ../tools/virt-edit.pl:59
15137 #: ../tools/virt-resize.pl:66 ../tools/virt-cat.pl:51 ../tools/virt-tar.pl:46
15142 #: ../fish/guestfish.pod:43
15143 msgid "As an interactive shell"
15147 #: ../fish/guestfish.pod:45
15155 #: ../fish/guestfish.pod:47
15158 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
15159 " editing virtual machine filesystems.\n"
15164 #: ../fish/guestfish.pod:50
15167 " Type: 'help' for a list of commands\n"
15168 " 'man' to read the manual\n"
15169 " 'quit' to quit the shell\n"
15174 #: ../fish/guestfish.pod:54
15177 " ><fs> add-ro disk.img\n"
15179 " ><fs> list-filesystems\n"
15180 " /dev/sda1: ext4\n"
15181 " /dev/vg_guest/lv_root: ext4\n"
15182 " /dev/vg_guest/lv_swap: swap\n"
15183 " ><fs> mount /dev/vg_guest/lv_root /\n"
15184 " ><fs> cat /etc/fstab\n"
15186 " # Created by anaconda\n"
15193 #: ../fish/guestfish.pod:67
15194 msgid "From shell scripts"
15198 #: ../fish/guestfish.pod:69
15199 msgid "Create a new C</etc/motd> file in a guest or disk image:"
15203 #: ../fish/guestfish.pod:71
15206 " guestfish <<_EOF_\n"
15209 " mount /dev/vg_guest/lv_root /\n"
15210 " write /etc/motd \"Welcome, new users\"\n"
15216 #: ../fish/guestfish.pod:78
15217 msgid "List the LVM logical volumes in a disk image:"
15221 #: ../fish/guestfish.pod:80
15224 " guestfish -a disk.img --ro <<_EOF_\n"
15232 #: ../fish/guestfish.pod:85
15233 msgid "List all the filesystems in a disk image:"
15237 #: ../fish/guestfish.pod:87
15240 " guestfish -a disk.img --ro <<_EOF_\n"
15242 " list-filesystems\n"
15248 #: ../fish/guestfish.pod:92
15249 msgid "On one command line"
15253 #: ../fish/guestfish.pod:94
15254 msgid "Update C</etc/resolv.conf> in a guest:"
15258 #: ../fish/guestfish.pod:96
15262 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
15263 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
15268 #: ../fish/guestfish.pod:100
15269 msgid "Edit C</boot/grub/grub.conf> interactively:"
15273 #: ../fish/guestfish.pod:102
15276 " guestfish --add disk.img \\\n"
15277 " --mount /dev/vg_guest/lv_root \\\n"
15278 " --mount /dev/sda1:/boot \\\n"
15279 " edit /boot/grub/grub.conf\n"
15284 #: ../fish/guestfish.pod:107
15285 msgid "Mount disks automatically"
15289 #: ../fish/guestfish.pod:109
15291 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
15295 #: ../fish/guestfish.pod:112
15298 " guestfish --ro -a disk.img -i cat /etc/group\n"
15303 #: ../fish/guestfish.pod:114
15306 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
15311 #: ../fish/guestfish.pod:116
15312 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
15316 #: ../fish/guestfish.pod:118
15319 " guestfish -a disk.img -i edit /boot/grub/grub.conf\n"
15324 #: ../fish/guestfish.pod:120
15325 msgid "As a script interpreter"
15329 #: ../fish/guestfish.pod:122
15330 msgid "Create a 100MB disk containing an ext2-formatted partition:"
15334 #: ../fish/guestfish.pod:124
15337 " #!/usr/bin/guestfish -f\n"
15338 " sparse test1.img 100M\n"
15340 " part-disk /dev/sda mbr\n"
15341 " mkfs ext2 /dev/sda1\n"
15346 #: ../fish/guestfish.pod:130
15347 msgid "Start with a prepared disk"
15351 #: ../fish/guestfish.pod:132
15353 "An alternate way to create a 100MB disk called C<test1.img> containing a "
15354 "single ext2-formatted partition:"
15358 #: ../fish/guestfish.pod:135
15361 " guestfish -N fs\n"
15366 #: ../fish/guestfish.pod:137
15367 msgid "To list what is available do:"
15371 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:791
15374 " guestfish -N help | less\n"
15379 #: ../fish/guestfish.pod:141
15380 msgid "Remote control"
15384 #: ../fish/guestfish.pod:143
15387 " eval `guestfish --listen`\n"
15388 " guestfish --remote add-ro disk.img\n"
15389 " guestfish --remote run\n"
15390 " guestfish --remote lvs\n"
15395 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37
15396 #: ../fuse/guestmount.pod:70 ../inspector/virt-inspector.pl:75
15397 #: ../tools/virt-edit.pl:73 ../tools/virt-win-reg.pl:172
15398 #: ../tools/virt-df.pl:71 ../tools/virt-ls.pl:79 ../tools/virt-resize.pl:257
15399 #: ../tools/virt-list-filesystems.pl:50 ../tools/virt-cat.pl:80
15400 #: ../tools/virt-tar.pl:99 ../tools/virt-rescue.pl:103
15401 #: ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:51
15406 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:94
15407 #: ../inspector/virt-inspector.pl:83 ../tools/virt-edit.pl:81
15408 #: ../tools/virt-win-reg.pl:180 ../tools/virt-df.pl:79 ../tools/virt-ls.pl:87
15409 #: ../tools/virt-resize.pl:265 ../tools/virt-list-filesystems.pl:58
15410 #: ../tools/virt-cat.pl:88 ../tools/virt-tar.pl:107
15411 #: ../tools/virt-rescue.pl:111 ../tools/virt-make-fs.pl:161
15412 #: ../tools/virt-list-partitions.pl:59
15417 #: ../fish/guestfish.pod:154
15418 msgid "Displays general help on options."
15422 #: ../fish/guestfish.pod:156
15423 msgid "B<-h> | B<--cmd-help>"
15427 #: ../fish/guestfish.pod:158
15428 msgid "Lists all available guestfish commands."
15432 #: ../fish/guestfish.pod:160
15433 msgid "B<-h cmd> | B<--cmd-help cmd>"
15437 #: ../fish/guestfish.pod:162
15438 msgid "Displays detailed help on a single command C<cmd>."
15442 #: ../fish/guestfish.pod:164 ../fuse/guestmount.pod:74
15443 msgid "B<-a image> | B<--add image>"
15447 #: ../fish/guestfish.pod:166
15448 msgid "Add a block device or virtual machine image to the shell."
15452 #: ../fish/guestfish.pod:168
15454 "The format of the disk image is auto-detected. To override this and force a "
15455 "particular format use the I<--format=..> option."
15459 #: ../fish/guestfish.pod:171
15460 msgid "B<-c URI> | B<--connect URI>"
15464 #: ../fish/guestfish.pod:173
15466 "When used in conjunction with the I<-d> option, this specifies the libvirt "
15467 "URI to use. The default is to use the default libvirt connection."
15471 #: ../fish/guestfish.pod:177
15472 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
15476 #: ../fish/guestfish.pod:179
15478 "Add disks from the named libvirt domain. If the I<--ro> option is also "
15479 "used, then any libvirt domain can be used. However in write mode, only "
15480 "libvirt domains which are shut down can be named here."
15484 #: ../fish/guestfish.pod:183
15485 msgid "B<-D> | B<--no-dest-paths>"
15489 #: ../fish/guestfish.pod:185
15491 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
15492 "to hit the tab key to complete paths on the guest filesystem, but this "
15493 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
15494 "allow this feature to be disabled."
15498 #: ../fish/guestfish.pod:190
15499 msgid "B<--echo-keys>"
15503 #: ../fish/guestfish.pod:192
15505 "When prompting for keys and passphrases, guestfish normally turns echoing "
15506 "off so you cannot see what you are typing. If you are not worried about "
15507 "Tempest attacks and there is no one else in the room you can specify this "
15508 "flag to see what you are typing."
15512 #: ../fish/guestfish.pod:197
15513 msgid "B<-f file> | B<--file file>"
15517 #: ../fish/guestfish.pod:199
15518 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
15522 #: ../fish/guestfish.pod:202
15525 " #!/usr/bin/guestfish -f\n"
15530 #: ../fish/guestfish.pod:204
15531 msgid "B<--format=raw|qcow2|..> | B<--format>"
15535 #: ../fish/guestfish.pod:206
15537 "The default for the I<-a> option is to auto-detect the format of the disk "
15538 "image. Using this forces the disk format for I<-a> options which follow on "
15539 "the command line. Using I<--format> with no argument switches back to auto-"
15540 "detection for subsequent I<-a> options."
15544 #: ../fish/guestfish.pod:211 ../fish/guestfish.pod:504
15545 msgid "For example:"
15549 #: ../fish/guestfish.pod:213
15552 " guestfish --format=raw -a disk.img\n"
15557 #: ../fish/guestfish.pod:215
15558 msgid "forces raw format (no auto-detection) for C<disk.img>."
15562 #: ../fish/guestfish.pod:217
15565 " guestfish --format=raw -a disk.img --format -a another.img\n"
15570 #: ../fish/guestfish.pod:219
15572 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
15573 "detection for C<another.img>."
15577 #: ../fish/guestfish.pod:222
15579 "If you have untrusted raw-format guest disk images, you should use this "
15580 "option to specify the disk format. This avoids a possible security problem "
15581 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
15585 #: ../fish/guestfish.pod:227
15586 msgid "B<-i> | B<--inspector>"
15590 #: ../fish/guestfish.pod:229
15592 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
15593 "system and mount filesystems as they would be mounted on the real virtual "
15598 #: ../fish/guestfish.pod:233
15599 msgid "Typical usage is either:"
15603 #: ../fish/guestfish.pod:235
15606 " guestfish -d myguest -i\n"
15611 #: ../fish/guestfish.pod:237
15612 msgid "(for an inactive libvirt domain called I<myguest>), or:"
15616 #: ../fish/guestfish.pod:239
15619 " guestfish --ro -d myguest -i\n"
15624 #: ../fish/guestfish.pod:241
15625 msgid "(for active domains, readonly), or specify the block device directly:"
15629 #: ../fish/guestfish.pod:243
15632 " guestfish -a /dev/Guests/MyGuest -i\n"
15637 #: ../fish/guestfish.pod:245
15639 "Note that the command line syntax changed slightly over older versions of "
15640 "guestfish. You can still use the old syntax:"
15644 #: ../fish/guestfish.pod:248
15647 " guestfish [--ro] -i disk.img\n"
15652 #: ../fish/guestfish.pod:250
15655 " guestfish [--ro] -i libvirt-domain\n"
15660 #: ../fish/guestfish.pod:252
15661 msgid "B<--keys-from-stdin>"
15665 #: ../fish/guestfish.pod:254
15667 "Read key or passphrase parameters from stdin. The default is to try to read "
15668 "passphrases from the user by opening C</dev/tty>."
15672 #: ../fish/guestfish.pod:257
15673 msgid "B<--listen>"
15677 #: ../fish/guestfish.pod:259
15679 "Fork into the background and listen for remote commands. See section L</"
15680 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
15684 #: ../fish/guestfish.pod:262
15685 msgid "B<-m dev[:mountpoint]> | B<--mount dev[:mountpoint]>"
15689 #: ../fish/guestfish.pod:264
15690 msgid "Mount the named partition or logical volume on the given mountpoint."
15694 #: ../fish/guestfish.pod:266
15695 msgid "If the mountpoint is omitted, it defaults to C</>."
15699 #: ../fish/guestfish.pod:268
15700 msgid "You have to mount something on C</> before most commands will work."
15704 #: ../fish/guestfish.pod:270
15706 "If any I<-m> or I<--mount> options are given, the guest is automatically "
15711 #: ../fish/guestfish.pod:273
15713 "If you don't know what filesystems a disk image contains, you can either run "
15714 "guestfish without this option, then list the partitions and LVs available "
15715 "(see L</list-partitions> and L</lvs> commands), or you can use the L<virt-"
15716 "list-filesystems(1)> program."
15720 #: ../fish/guestfish.pod:278 ../fuse/guestmount.pod:106
15721 msgid "B<-n> | B<--no-sync>"
15725 #: ../fish/guestfish.pod:280
15727 "Disable autosync. This is enabled by default. See the discussion of "
15728 "autosync in the L<guestfs(3)> manpage."
15732 #: ../fish/guestfish.pod:283
15733 msgid "B<-N type> | B<--new type> | B<-N help>"
15737 #: ../fish/guestfish.pod:285
15739 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
15740 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
15741 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
15746 #: ../fish/guestfish.pod:290
15747 msgid "B<--progress-bars>"
15751 #: ../fish/guestfish.pod:292
15752 msgid "Enable progress bars, even when guestfish is used non-interactively."
15756 #: ../fish/guestfish.pod:294
15758 "Progress bars are enabled by default when guestfish is used as an "
15759 "interactive shell."
15763 #: ../fish/guestfish.pod:297
15764 msgid "B<--no-progress-bars>"
15768 #: ../fish/guestfish.pod:299
15769 msgid "Disable progress bars."
15773 #: ../fish/guestfish.pod:301
15774 msgid "B<--remote[=pid]>"
15778 #: ../fish/guestfish.pod:303
15780 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
15781 "CONTROL GUESTFISH OVER A SOCKET> below."
15785 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:148
15786 msgid "B<-r> | B<--ro>"
15790 #: ../fish/guestfish.pod:308
15792 "This changes the I<-a> and I<-m> options so that disks are added and mounts "
15793 "are done read-only (see L<guestfs(3)/guestfs_mount_ro>)."
15797 #: ../fish/guestfish.pod:311 ../tools/virt-rescue.pl:179
15799 "The option must always be used if the disk image or virtual machine might be "
15800 "running, and is generally recommended in cases where you don't need write "
15801 "access to the disk."
15805 #: ../fish/guestfish.pod:315
15807 "Note that prepared disk images created with I<-N> are not affected by the "
15812 #: ../fish/guestfish.pod:318 ../fuse/guestmount.pod:158
15813 #: ../tools/virt-rescue.pl:187
15814 msgid "B<--selinux>"
15818 #: ../fish/guestfish.pod:320
15819 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
15823 #: ../fish/guestfish.pod:322 ../fuse/guestmount.pod:168
15824 msgid "B<-v> | B<--verbose>"
15828 #: ../fish/guestfish.pod:324
15830 "Enable very verbose messages. This is particularly useful if you find a bug."
15834 #: ../fish/guestfish.pod:327 ../fuse/guestmount.pod:172
15835 msgid "B<-V> | B<--version>"
15839 #: ../fish/guestfish.pod:329
15840 msgid "Display the guestfish / libguestfs version number and exit."
15844 #: ../fish/guestfish.pod:331
15849 #: ../fish/guestfish.pod:333
15850 msgid "Echo each command before executing it."
15854 #: ../fish/guestfish.pod:337
15855 msgid "COMMANDS ON COMMAND LINE"
15859 #: ../fish/guestfish.pod:339
15861 "Any additional (non-option) arguments are treated as commands to execute."
15865 #: ../fish/guestfish.pod:342
15867 "Commands to execute should be separated by a colon (C<:>), where the colon "
15868 "is a separate parameter. Thus:"
15872 #: ../fish/guestfish.pod:345
15875 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
15880 #: ../fish/guestfish.pod:347
15882 "If there are no additional arguments, then we enter a shell, either an "
15883 "interactive shell with a prompt (if the input is a terminal) or a non-"
15884 "interactive shell."
15888 #: ../fish/guestfish.pod:351
15890 "In either command line mode or non-interactive shell, the first command that "
15891 "gives an error causes the whole shell to exit. In interactive mode (with a "
15892 "prompt) if a command fails, you can continue to enter commands."
15896 #: ../fish/guestfish.pod:356
15897 msgid "USING launch (OR run)"
15901 #: ../fish/guestfish.pod:358
15903 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
15904 "then launch it, then mount any disks you need, and finally issue actions/"
15905 "commands. So the general order of the day is:"
15909 #: ../fish/guestfish.pod:366
15910 msgid "add or -a/--add"
15914 #: ../fish/guestfish.pod:370
15915 msgid "launch (aka run)"
15919 #: ../fish/guestfish.pod:374
15920 msgid "mount or -m/--mount"
15924 #: ../fish/guestfish.pod:378
15925 msgid "any other commands"
15929 #: ../fish/guestfish.pod:382
15931 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
15932 "guest before mounting or performing any other commands."
15936 #: ../fish/guestfish.pod:385
15938 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
15939 "I<--new> options were given then C<run> is done automatically, simply "
15940 "because guestfish can't perform the action you asked for without doing this."
15944 #: ../fish/guestfish.pod:390
15949 #: ../fish/guestfish.pod:392
15951 "You can quote ordinary parameters using either single or double quotes. For "
15956 #: ../fish/guestfish.pod:395
15959 " add \"file with a space.img\"\n"
15964 #: ../fish/guestfish.pod:397
15967 " rm '/file name'\n"
15972 #: ../fish/guestfish.pod:399
15980 #: ../fish/guestfish.pod:401
15982 "A few commands require a list of strings to be passed. For these, use a "
15983 "whitespace-separated list, enclosed in quotes. Strings containing "
15984 "whitespace to be passed through must be enclosed in single quotes. A "
15985 "literal single quote must be escaped with a backslash."
15989 #: ../fish/guestfish.pod:406
15992 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
15993 " command \"/bin/echo 'foo bar'\"\n"
15994 " command \"/bin/echo \\'foo\\'\"\n"
15999 #: ../fish/guestfish.pod:410
16000 msgid "OPTIONAL ARGUMENTS"
16004 #: ../fish/guestfish.pod:412
16006 "Some commands take optional arguments. These arguments appear in this "
16007 "documentation as C<[argname:..]>. You can use them as in these examples:"
16011 #: ../fish/guestfish.pod:416
16014 " add-drive-opts filename\n"
16019 #: ../fish/guestfish.pod:418
16022 " add-drive-opts filename readonly:true\n"
16027 #: ../fish/guestfish.pod:420
16030 " add-drive-opts filename format:qcow2 readonly:false\n"
16035 #: ../fish/guestfish.pod:422
16037 "Each optional argument can appear at most once. All optional arguments must "
16038 "appear after the required ones."
16042 #: ../fish/guestfish.pod:425
16047 #: ../fish/guestfish.pod:427
16049 "This section applies to all commands which can take integers as parameters."
16053 #: ../fish/guestfish.pod:430
16054 msgid "SIZE SUFFIX"
16058 #: ../fish/guestfish.pod:432
16060 "When the command takes a parameter measured in bytes, you can use one of the "
16061 "following suffixes to specify kilobytes, megabytes and larger sizes:"
16065 #: ../fish/guestfish.pod:438
16066 msgid "B<k> or B<K> or B<KiB>"
16070 #: ../fish/guestfish.pod:440
16071 msgid "The size in kilobytes (multiplied by 1024)."
16075 #: ../fish/guestfish.pod:442
16080 #: ../fish/guestfish.pod:444
16081 msgid "The size in SI 1000 byte units."
16085 #: ../fish/guestfish.pod:446
16086 msgid "B<M> or B<MiB>"
16090 #: ../fish/guestfish.pod:448
16091 msgid "The size in megabytes (multiplied by 1048576)."
16095 #: ../fish/guestfish.pod:450
16100 #: ../fish/guestfish.pod:452
16101 msgid "The size in SI 1000000 byte units."
16105 #: ../fish/guestfish.pod:454
16106 msgid "B<G> or B<GiB>"
16110 #: ../fish/guestfish.pod:456
16111 msgid "The size in gigabytes (multiplied by 2**30)."
16115 #: ../fish/guestfish.pod:458
16120 #: ../fish/guestfish.pod:460
16121 msgid "The size in SI 10**9 byte units."
16125 #: ../fish/guestfish.pod:462
16126 msgid "B<T> or B<TiB>"
16130 #: ../fish/guestfish.pod:464
16131 msgid "The size in terabytes (multiplied by 2**40)."
16135 #: ../fish/guestfish.pod:466
16140 #: ../fish/guestfish.pod:468
16141 msgid "The size in SI 10**12 byte units."
16145 #: ../fish/guestfish.pod:470
16146 msgid "B<P> or B<PiB>"
16150 #: ../fish/guestfish.pod:472
16151 msgid "The size in petabytes (multiplied by 2**50)."
16155 #: ../fish/guestfish.pod:474
16160 #: ../fish/guestfish.pod:476
16161 msgid "The size in SI 10**15 byte units."
16165 #: ../fish/guestfish.pod:478
16166 msgid "B<E> or B<EiB>"
16170 #: ../fish/guestfish.pod:480
16171 msgid "The size in exabytes (multiplied by 2**60)."
16175 #: ../fish/guestfish.pod:482
16180 #: ../fish/guestfish.pod:484
16181 msgid "The size in SI 10**18 byte units."
16185 #: ../fish/guestfish.pod:486
16186 msgid "B<Z> or B<ZiB>"
16190 #: ../fish/guestfish.pod:488
16191 msgid "The size in zettabytes (multiplied by 2**70)."
16195 #: ../fish/guestfish.pod:490
16200 #: ../fish/guestfish.pod:492
16201 msgid "The size in SI 10**21 byte units."
16205 #: ../fish/guestfish.pod:494
16206 msgid "B<Y> or B<YiB>"
16210 #: ../fish/guestfish.pod:496
16211 msgid "The size in yottabytes (multiplied by 2**80)."
16215 #: ../fish/guestfish.pod:498
16220 #: ../fish/guestfish.pod:500
16221 msgid "The size in SI 10**24 byte units."
16225 #: ../fish/guestfish.pod:506
16228 " truncate-size /file 1G\n"
16233 #: ../fish/guestfish.pod:508
16234 msgid "would truncate the file to 1 gigabyte."
16238 #: ../fish/guestfish.pod:510
16240 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
16241 "the parameter to L</memsize> is specified in megabytes already). Adding a "
16242 "suffix will probably not do what you expect."
16246 #: ../fish/guestfish.pod:514
16247 msgid "OCTAL AND HEXADECIMAL NUMBERS"
16251 #: ../fish/guestfish.pod:516
16253 "For specifying the radix (base) use the C convention: C<0> to prefix an "
16254 "octal number or C<0x> to prefix a hexadecimal number. For example:"
16258 #: ../fish/guestfish.pod:519
16261 " 1234 decimal number 1234\n"
16262 " 02322 octal number, equivalent to decimal 1234\n"
16263 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
16268 #: ../fish/guestfish.pod:523
16270 "When using the C<chmod> command, you almost always want to specify an octal "
16271 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
16272 "L<chmod(1)> program):"
16276 #: ../fish/guestfish.pod:527
16279 " chmod 0777 /public # OK\n"
16280 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
16285 #: ../fish/guestfish.pod:530
16287 "Commands that return numbers usually print them in decimal, but some "
16288 "commands print numbers in other radices (eg. C<umask> prints the mode in "
16289 "octal, preceeded by C<0>)."
16293 #: ../fish/guestfish.pod:534
16294 msgid "WILDCARDS AND GLOBBING"
16298 #: ../fish/guestfish.pod:536
16300 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
16301 "(globbing) by default. So for example the following will not do what you "
16306 #: ../fish/guestfish.pod:540
16314 #: ../fish/guestfish.pod:542
16316 "Assuming you don't have a directory called literally C</home/*> then the "
16317 "above command will return an error."
16321 #: ../fish/guestfish.pod:545
16322 msgid "To perform wildcard expansion, use the C<glob> command."
16326 #: ../fish/guestfish.pod:547
16329 " glob rm-rf /home/*\n"
16334 #: ../fish/guestfish.pod:549
16336 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
16337 "many times), equivalent to:"
16341 #: ../fish/guestfish.pod:552
16344 " rm-rf /home/jim\n"
16345 " rm-rf /home/joe\n"
16346 " rm-rf /home/mary\n"
16351 #: ../fish/guestfish.pod:556
16352 msgid "C<glob> only works on simple guest paths and not on device names."
16356 #: ../fish/guestfish.pod:558
16358 "If you have several parameters, each containing a wildcard, then glob will "
16359 "perform a Cartesian product."
16363 #: ../fish/guestfish.pod:561
16368 #: ../fish/guestfish.pod:563
16370 "Any line which starts with a I<#> character is treated as a comment and "
16371 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
16372 "a command. For example:"
16376 #: ../fish/guestfish.pod:567
16379 " # this is a comment\n"
16380 " # this is a comment\n"
16381 " foo # NOT a comment\n"
16386 #: ../fish/guestfish.pod:571
16387 msgid "Blank lines are also ignored."
16391 #: ../fish/guestfish.pod:573
16392 msgid "RUNNING COMMANDS LOCALLY"
16396 #: ../fish/guestfish.pod:575
16398 "Any line which starts with a I<!> character is treated as a command sent to "
16399 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
16403 #: ../fish/guestfish.pod:579
16407 " tgz-out /remote local/remote-data.tar.gz\n"
16412 #: ../fish/guestfish.pod:582
16414 "will create a directory C<local> on the host, and then export the contents "
16415 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
16416 "(See C<tgz-out>)."
16420 #: ../fish/guestfish.pod:586
16422 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
16423 "effect, due to the way that subprocesses work in Unix."
16427 #: ../fish/guestfish.pod:589
16432 #: ../fish/guestfish.pod:591
16434 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
16435 "command (a guestfish command) to the second command (any host command). For "
16440 #: ../fish/guestfish.pod:595
16443 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
16448 #: ../fish/guestfish.pod:597
16450 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
16451 "program). The above command would list all accounts in the guest filesystem "
16452 "which have UID 0, ie. root accounts including backdoors. Other examples:"
16456 #: ../fish/guestfish.pod:602
16459 " hexdump /bin/ls | head\n"
16460 " list-devices | tail -1\n"
16461 " tgz-out / - | tar ztf -\n"
16466 #: ../fish/guestfish.pod:606
16468 "The space before the pipe symbol is required, any space after the pipe "
16469 "symbol is optional. Everything after the pipe symbol is just passed "
16470 "straight to the host shell, so it can contain redirections, globs and "
16471 "anything else that makes sense on the host side."
16475 #: ../fish/guestfish.pod:611
16477 "To use a literal argument which begins with a pipe symbol, you have to quote "
16482 #: ../fish/guestfish.pod:614
16490 #: ../fish/guestfish.pod:616
16491 msgid "HOME DIRECTORIES"
16495 #: ../fish/guestfish.pod:618
16497 "If a parameter starts with the character C<~> then the tilde may be expanded "
16498 "as a home directory path (either C<~> for the current user's home directory, "
16499 "or C<~user> for another user)."
16503 #: ../fish/guestfish.pod:622
16505 "Note that home directory expansion happens for users known I<on the host>, "
16506 "not in the guest filesystem."
16510 #: ../fish/guestfish.pod:625
16512 "To use a literal argument which begins with a tilde, you have to quote it, "
16517 #: ../fish/guestfish.pod:628
16525 #: ../fish/guestfish.pod:632
16527 "Libguestfs has some support for Linux guests encrypted according to the "
16528 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
16529 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
16530 "LUKS is supported."
16534 #: ../fish/guestfish.pod:637
16535 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
16539 #: ../fish/guestfish.pod:639
16542 " ><fs> vfs-type /dev/sda2\n"
16548 #: ../fish/guestfish.pod:642
16550 "Then open those devices using L</luks-open>. This creates a device-mapper "
16551 "device called C</dev/mapper/luksdev>."
16555 #: ../fish/guestfish.pod:645
16558 " ><fs> luks-open /dev/sda2 luksdev\n"
16559 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
16564 #: ../fish/guestfish.pod:648
16566 "Finally you have to tell LVM to scan for volume groups on the newly created "
16571 #: ../fish/guestfish.pod:651
16575 " vg-activate-all true\n"
16580 #: ../fish/guestfish.pod:654
16581 msgid "The logical volume(s) can now be mounted in the usual way."
16585 #: ../fish/guestfish.pod:656
16587 "Before closing a LUKS device you must unmount any logical volumes on it and "
16588 "deactivate the volume groups by calling C<vg-activate false VG> on each "
16589 "one. Then you can close the mapper device:"
16593 #: ../fish/guestfish.pod:660
16596 " vg-activate false /dev/VG\n"
16597 " luks-close /dev/mapper/luksdev\n"
16602 #: ../fish/guestfish.pod:663
16603 msgid "WINDOWS PATHS"
16607 #: ../fish/guestfish.pod:665
16609 "If a path is prefixed with C<win:> then you can use Windows-style paths "
16610 "(with some limitations). The following commands are equivalent:"
16614 #: ../fish/guestfish.pod:668
16617 " file /WINDOWS/system32/config/system.LOG\n"
16622 #: ../fish/guestfish.pod:670
16625 " file win:/windows/system32/config/system.log\n"
16630 #: ../fish/guestfish.pod:672
16633 " file win:\\windows\\system32\\config\\system.log\n"
16638 #: ../fish/guestfish.pod:674
16641 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
16646 #: ../fish/guestfish.pod:676
16648 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
16649 "handles case insensitivity like Windows would. This only works in argument "
16650 "positions that expect a path."
16654 #: ../fish/guestfish.pod:680
16655 msgid "UPLOADING AND DOWNLOADING FILES"
16659 #: ../fish/guestfish.pod:682
16661 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
16662 "others which upload from or download to a local file, you can use the "
16663 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
16667 #: ../fish/guestfish.pod:686
16675 #: ../fish/guestfish.pod:688
16677 "reads stdin and creates from that a file C</foo> in the disk image, and:"
16681 #: ../fish/guestfish.pod:691
16684 " tar-out /etc - | tar tf -\n"
16689 #: ../fish/guestfish.pod:693
16691 "writes the tarball to stdout and then pipes that into the external \"tar\" "
16692 "command (see L</PIPES>)."
16696 #: ../fish/guestfish.pod:696
16698 "When using C<-> to read from stdin, the input is read up to the end of "
16699 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
16700 "some arbitrary end marker:"
16704 #: ../fish/guestfish.pod:700
16707 " upload -<<END /foo\n"
16716 #: ../fish/guestfish.pod:706
16718 "Any string of characters can be used instead of C<END>. The end marker must "
16719 "appear on a line of its own, without any preceeding or following characters "
16720 "(not even spaces)."
16724 #: ../fish/guestfish.pod:710
16726 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
16727 "upload local files (so-called \"FileIn\" parameters in the generator)."
16731 #: ../fish/guestfish.pod:713
16732 msgid "EXIT ON ERROR BEHAVIOUR"
16736 #: ../fish/guestfish.pod:715
16738 "By default, guestfish will ignore any errors when in interactive mode (ie. "
16739 "taking commands from a human over a tty), and will exit on the first error "
16740 "in non-interactive mode (scripts, commands given on the command line)."
16744 #: ../fish/guestfish.pod:720
16746 "If you prefix a command with a I<-> character, then that command will not "
16747 "cause guestfish to exit, even if that (one) command returns an error."
16751 #: ../fish/guestfish.pod:724
16752 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
16756 #: ../fish/guestfish.pod:726
16758 "Guestfish can be remote-controlled over a socket. This is useful "
16759 "particularly in shell scripts where you want to make several different "
16760 "changes to a filesystem, but you don't want the overhead of starting up a "
16761 "guestfish process each time."
16765 #: ../fish/guestfish.pod:731
16766 msgid "Start a guestfish server process using:"
16770 #: ../fish/guestfish.pod:733
16773 " eval `guestfish --listen`\n"
16778 #: ../fish/guestfish.pod:735
16779 msgid "and then send it commands by doing:"
16783 #: ../fish/guestfish.pod:737
16786 " guestfish --remote cmd [...]\n"
16791 #: ../fish/guestfish.pod:739
16792 msgid "To cause the server to exit, send it the exit command:"
16796 #: ../fish/guestfish.pod:741
16799 " guestfish --remote exit\n"
16804 #: ../fish/guestfish.pod:743
16806 "Note that the server will normally exit if there is an error in a command. "
16807 "You can change this in the usual way. See section L</EXIT ON ERROR "
16812 #: ../fish/guestfish.pod:747
16813 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
16817 #: ../fish/guestfish.pod:749
16819 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
16820 "is how the I<--remote> option knows where to send the commands. You can "
16821 "have several guestfish listener processes running using:"
16825 #: ../fish/guestfish.pod:753
16828 " eval `guestfish --listen`\n"
16829 " pid1=$GUESTFISH_PID\n"
16830 " eval `guestfish --listen`\n"
16831 " pid2=$GUESTFISH_PID\n"
16833 " guestfish --remote=$pid1 cmd\n"
16834 " guestfish --remote=$pid2 cmd\n"
16839 #: ../fish/guestfish.pod:761
16840 msgid "REMOTE CONTROL DETAILS"
16844 #: ../fish/guestfish.pod:763
16846 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
16847 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
16848 "and C<$PID> is the process ID of the server."
16852 #: ../fish/guestfish.pod:767
16853 msgid "Guestfish client and server versions must match exactly."
16857 #: ../fish/guestfish.pod:769
16858 msgid "PREPARED DISK IMAGES"
16862 #: ../fish/guestfish.pod:771
16864 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
16865 "preformatted disk images that guestfish can make for you to save typing. "
16866 "This is particularly useful for testing purposes. This option is used "
16867 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
16868 "can be mixed with I<-a>)."
16872 #: ../fish/guestfish.pod:777
16874 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
16875 "the second and so on. Existing files in the current directory are "
16880 #: ../fish/guestfish.pod:781
16882 "The type briefly describes how the disk should be sized, partitioned, how "
16883 "filesystem(s) should be created, and how content should be added. "
16884 "Optionally the type can be followed by extra parameters, separated by C<:> "
16885 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
16886 "allocated disk, containing a single partition, with the partition formatted "
16887 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
16892 #: ../fish/guestfish.pod:789
16893 msgid "To list the available types and any extra parameters they take, run:"
16897 #: ../fish/guestfish.pod:793
16899 "Note that the prepared filesystem is not mounted. You would usually have to "
16900 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
16904 #: ../fish/guestfish.pod:797
16906 "If any I<-N> or I<--new> options are given, the guest is automatically "
16911 #: ../fish/guestfish.pod:802
16912 msgid "Create a 100MB disk with an ext4-formatted partition:"
16916 #: ../fish/guestfish.pod:804
16919 " guestfish -N fs:ext4\n"
16924 #: ../fish/guestfish.pod:806
16925 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
16929 #: ../fish/guestfish.pod:808
16932 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
16937 #: ../fish/guestfish.pod:810
16938 msgid "Create a blank 200MB disk:"
16942 #: ../fish/guestfish.pod:812
16945 " guestfish -N disk:200M\n"
16950 #: ../fish/guestfish.pod:814
16951 msgid "PROGRESS BARS"
16955 #: ../fish/guestfish.pod:816
16957 "Some (not all) long-running commands send progress notification messages as "
16958 "they are running. Guestfish turns these messages into progress bars."
16962 #: ../fish/guestfish.pod:820
16964 "When a command that supports progress bars takes longer than two seconds to "
16965 "run, and if progress bars are enabled, then you will see one appearing below "
16970 #: ../fish/guestfish.pod:824
16973 " ><fs> copy-size /large-file /another-file 2048M\n"
16974 " / 10% [#####-----------------------------------------] 00:30\n"
16979 #: ../fish/guestfish.pod:827
16981 "The spinner on the left hand side moves round once for every progress "
16982 "notification received from the backend. This is a (reasonably) golden "
16983 "assurance that the command is \"doing something\" even if the progress bar "
16984 "is not moving, because the command is able to send the progress "
16985 "notifications. When the bar reaches 100% and the command finishes, the "
16986 "spinner disappears."
16990 #: ../fish/guestfish.pod:834
16992 "Progress bars are enabled by default when guestfish is used interactively. "
16993 "You can enable them even for non-interactive modes using I<--progress-bars>, "
16994 "and you can disable them completely using I<--no-progress-bars>."
16998 #: ../fish/guestfish.pod:839
16999 msgid "GUESTFISH COMMANDS"
17003 #: ../fish/guestfish.pod:841
17005 "The commands in this section are guestfish convenience commands, in other "
17006 "words, they are not part of the L<guestfs(3)> API."
17010 #: ../fish/guestfish.pod:844
17015 #: ../fish/guestfish.pod:846
17024 #: ../fish/guestfish.pod:849
17026 "Without any parameter, this lists all commands. With a C<cmd> parameter, "
17027 "this displays detailed help for a command."
17031 #: ../fish/guestfish.pod:852
17032 msgid "quit | exit"
17036 #: ../fish/guestfish.pod:854
17037 msgid "This exits guestfish. You can also use C<^D> key."
17041 #: ../fish/guestfish.pod:856
17042 msgid "@FISH_COMMANDS@"
17046 #: ../fish/guestfish.pod:858
17051 #: ../fish/guestfish.pod:862 ../test-tool/libguestfs-test-tool.pod:83
17056 #: ../fish/guestfish.pod:864
17058 "guestfish returns 0 if the commands completed without error, or 1 if there "
17063 #: ../fish/guestfish.pod:871
17068 #: ../fish/guestfish.pod:873
17070 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
17075 #: ../fish/guestfish.pod:876
17076 msgid "GUESTFISH_PID"
17080 #: ../fish/guestfish.pod:878
17082 "Used with the I<--remote> option to specify the remote guestfish process to "
17083 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
17087 #: ../fish/guestfish.pod:882
17092 #: ../fish/guestfish.pod:884
17094 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
17095 "not specified, the external L<hexedit(1)> program is used."
17099 #: ../fish/guestfish.pod:888
17104 #: ../fish/guestfish.pod:890
17106 "If compiled with GNU readline support, various files in the home directory "
17107 "can be used. See L</FILES>."
17111 #: ../fish/guestfish.pod:899
17113 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
17114 "effect as using the B<-v> option."
17118 #: ../fish/guestfish.pod:911
17120 "Set the path that guestfish uses to search for kernel and initrd.img. See "
17121 "the discussion of paths in L<guestfs(3)>."
17125 #: ../fish/guestfish.pod:922
17126 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
17130 #: ../fish/guestfish.pod:924
17135 #: ../fish/guestfish.pod:926
17137 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
17142 #: ../fish/guestfish.pod:941 ../test-tool/libguestfs-test-tool.pod:88
17147 #: ../fish/guestfish.pod:945
17148 msgid "$HOME/.guestfish"
17152 #: ../fish/guestfish.pod:947
17154 "If compiled with GNU readline support, then the command history is saved in "
17159 #: ../fish/guestfish.pod:950
17160 msgid "$HOME/.inputrc"
17164 #: ../fish/guestfish.pod:952
17165 msgid "/etc/inputrc"
17169 #: ../fish/guestfish.pod:954
17171 "If compiled with GNU readline support, then these files can be used to "
17172 "configure readline. For further information, please see L<readline(3)/"
17173 "INITIALIZATION FILE>."
17177 #: ../fish/guestfish.pod:958
17178 msgid "To write rules which only apply to guestfish, use:"
17182 #: ../fish/guestfish.pod:960
17192 #: ../fish/guestfish.pod:964
17194 "Variables that you can set in inputrc that change the behaviour of guestfish "
17195 "in useful ways include:"
17199 #: ../fish/guestfish.pod:969
17200 msgid "completion-ignore-case (default: on)"
17204 #: ../fish/guestfish.pod:971
17206 "By default, guestfish will ignore case when tab-completing paths on the "
17211 #: ../fish/guestfish.pod:974
17214 " set completion-ignore-case off\n"
17219 #: ../fish/guestfish.pod:976
17220 msgid "to make guestfish case sensitive."
17224 #: ../fish/guestfish.pod:980
17229 #: ../fish/guestfish.pod:982
17230 msgid "test2.img (etc)"
17234 #: ../fish/guestfish.pod:984
17236 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
17237 "will be created in the file C<test1.img> in the current directory. The "
17238 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
17239 "the same name will be overwritten."
17243 #: ../fish/guestfish.pod:993
17245 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
17246 "L<virt-edit(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, "
17247 "L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
17248 "L<virt-tar(1)>, L<virt-win-reg(1)>, L<hexedit(1)>."
17252 #: ../fish/guestfish.pod:1017 ../test-tool/libguestfs-test-tool.pod:124
17253 #: ../fuse/guestmount.pod:198 ../inspector/virt-inspector.pl:903
17254 #: ../tools/virt-edit.pl:370 ../tools/virt-win-reg.pl:521
17255 #: ../tools/virt-df.pl:631 ../tools/virt-ls.pl:254
17256 #: ../tools/virt-resize.pl:1516 ../tools/virt-list-filesystems.pl:236
17257 #: ../tools/virt-cat.pl:206 ../tools/virt-tar.pl:302
17258 #: ../tools/virt-rescue.pl:275 ../tools/virt-make-fs.pl:567
17259 #: ../tools/virt-list-partitions.pl:273
17261 "This program is free software; you can redistribute it and/or modify it "
17262 "under the terms of the GNU General Public License as published by the Free "
17263 "Software Foundation; either version 2 of the License, or (at your option) "
17264 "any later version."
17268 #: ../fish/guestfish.pod:1022 ../test-tool/libguestfs-test-tool.pod:129
17269 #: ../fuse/guestmount.pod:203 ../inspector/virt-inspector.pl:908
17270 #: ../tools/virt-edit.pl:375 ../tools/virt-win-reg.pl:526
17271 #: ../tools/virt-df.pl:636 ../tools/virt-ls.pl:259
17272 #: ../tools/virt-resize.pl:1521 ../tools/virt-list-filesystems.pl:241
17273 #: ../tools/virt-cat.pl:211 ../tools/virt-tar.pl:307
17274 #: ../tools/virt-rescue.pl:280 ../tools/virt-make-fs.pl:572
17275 #: ../tools/virt-list-partitions.pl:278
17277 "This program is distributed in the hope that it will be useful, but WITHOUT "
17278 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
17279 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
17284 #: ../fish/guestfish.pod:1027 ../test-tool/libguestfs-test-tool.pod:134
17285 #: ../fuse/guestmount.pod:208 ../inspector/virt-inspector.pl:913
17286 #: ../tools/virt-edit.pl:380 ../tools/virt-win-reg.pl:531
17287 #: ../tools/virt-df.pl:641 ../tools/virt-ls.pl:264
17288 #: ../tools/virt-resize.pl:1526 ../tools/virt-list-filesystems.pl:246
17289 #: ../tools/virt-cat.pl:216 ../tools/virt-tar.pl:312
17290 #: ../tools/virt-rescue.pl:285 ../tools/virt-make-fs.pl:577
17291 #: ../tools/virt-list-partitions.pl:283
17293 "You should have received a copy of the GNU General Public License along with "
17294 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
17295 "Ave, Cambridge, MA 02139, USA."
17299 #: ../fish/guestfish-actions.pod:1
17304 #: ../fish/guestfish-actions.pod:3
17307 " add-cdrom filename\n"
17312 #: ../fish/guestfish-actions.pod:15
17314 "This call checks for the existence of C<filename>. This stops you from "
17315 "specifying other types of drive which are supported by qemu such as C<nbd:> "
17316 "and C<http:> URLs. To specify those, use the general L</config> call "
17321 #: ../fish/guestfish-actions.pod:22
17323 "If you just want to add an ISO file (often you use this as an efficient way "
17324 "to transfer large files into the guest), then you should probably use L</add-"
17325 "drive-ro> instead."
17329 #: ../fish/guestfish-actions.pod:35
17334 #: ../fish/guestfish-actions.pod:37
17337 " add-drive filename\n"
17342 #: ../fish/guestfish-actions.pod:39
17344 "This function is the equivalent of calling L</add-drive-opts> with no "
17345 "optional parameters, so the disk is added writable, with the format being "
17346 "detected automatically."
17350 #: ../fish/guestfish-actions.pod:43
17352 "Automatic detection of the format opens you up to a potential security hole "
17353 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
17354 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
17355 "you should think about replacing calls to this function with calls to L</add-"
17356 "drive-opts>, and specifying the format."
17360 #: ../fish/guestfish-actions.pod:50
17361 msgid "add-drive-opts"
17365 #: ../fish/guestfish-actions.pod:52
17370 #: ../fish/guestfish-actions.pod:54
17373 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
17378 #: ../fish/guestfish-actions.pod:81
17380 "This forces the image format. If you omit this (or use L</add-drive> or L</"
17381 "add-drive-ro>) then the format is automatically detected. Possible formats "
17382 "include C<raw> and C<qcow2>."
17386 #: ../fish/guestfish-actions.pod:92
17388 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
17389 "add-drive-with-if> call (q.v.)"
17393 #: ../fish/guestfish-actions.pod:97
17395 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
17399 #: ../fish/guestfish-actions.pod:99
17400 msgid "add-drive-ro"
17404 #: ../fish/guestfish-actions.pod:101
17409 #: ../fish/guestfish-actions.pod:103
17412 " add-drive-ro filename\n"
17417 #: ../fish/guestfish-actions.pod:105
17419 "This function is the equivalent of calling L</add-drive-opts> with the "
17420 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
17421 "is added read-only, with the format being detected automatically."
17425 #: ../fish/guestfish-actions.pod:110
17426 msgid "add-drive-ro-with-if"
17430 #: ../fish/guestfish-actions.pod:112
17433 " add-drive-ro-with-if filename iface\n"
17438 #: ../fish/guestfish-actions.pod:114
17440 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
17441 "interface emulation to use at run time."
17445 #: ../fish/guestfish-actions.pod:124
17446 msgid "add-drive-with-if"
17450 #: ../fish/guestfish-actions.pod:126
17453 " add-drive-with-if filename iface\n"
17458 #: ../fish/guestfish-actions.pod:128
17460 "This is the same as L</add-drive> but it allows you to specify the QEMU "
17461 "interface emulation to use at run time."
17465 #: ../fish/guestfish-actions.pod:138
17470 #: ../fish/guestfish-actions.pod:140
17473 " aug-clear augpath\n"
17478 #: ../fish/guestfish-actions.pod:145
17483 #: ../fish/guestfish-actions.pod:147
17491 #: ../fish/guestfish-actions.pod:149
17493 "Close the current Augeas handle and free up any resources used by it. After "
17494 "calling this, you have to call L</aug-init> again before you can use any "
17495 "other Augeas functions."
17499 #: ../fish/guestfish-actions.pod:154
17500 msgid "aug-defnode"
17504 #: ../fish/guestfish-actions.pod:156
17507 " aug-defnode name expr val\n"
17512 #: ../fish/guestfish-actions.pod:161
17514 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
17515 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
17516 "containing that single node."
17520 #: ../fish/guestfish-actions.pod:169
17525 #: ../fish/guestfish-actions.pod:171
17528 " aug-defvar name expr\n"
17533 #: ../fish/guestfish-actions.pod:180
17538 #: ../fish/guestfish-actions.pod:182
17541 " aug-get augpath\n"
17546 #: ../fish/guestfish-actions.pod:187
17551 #: ../fish/guestfish-actions.pod:189
17554 " aug-init root flags\n"
17559 #: ../fish/guestfish-actions.pod:195
17560 msgid "You must call this before using any other L</aug-*> commands."
17564 #: ../fish/guestfish-actions.pod:230
17565 msgid "Do not load the tree in L</aug-init>."
17569 #: ../fish/guestfish-actions.pod:234
17570 msgid "To close the handle, you can call L</aug-close>."
17574 #: ../fish/guestfish-actions.pod:238
17579 #: ../fish/guestfish-actions.pod:240
17582 " aug-insert augpath label true|false\n"
17587 #: ../fish/guestfish-actions.pod:250
17592 #: ../fish/guestfish-actions.pod:252
17600 #: ../fish/guestfish-actions.pod:259
17605 #: ../fish/guestfish-actions.pod:261
17608 " aug-ls augpath\n"
17613 #: ../fish/guestfish-actions.pod:263
17615 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
17616 "resulting nodes into alphabetical order."
17620 #: ../fish/guestfish-actions.pod:266
17625 #: ../fish/guestfish-actions.pod:268
17628 " aug-match augpath\n"
17633 #: ../fish/guestfish-actions.pod:274
17638 #: ../fish/guestfish-actions.pod:276
17641 " aug-mv src dest\n"
17646 #: ../fish/guestfish-actions.pod:281
17651 #: ../fish/guestfish-actions.pod:283
17654 " aug-rm augpath\n"
17659 #: ../fish/guestfish-actions.pod:289
17664 #: ../fish/guestfish-actions.pod:291
17672 #: ../fish/guestfish-actions.pod:295
17674 "The flags which were passed to L</aug-init> affect exactly how files are "
17679 #: ../fish/guestfish-actions.pod:298
17684 #: ../fish/guestfish-actions.pod:300
17687 " aug-set augpath val\n"
17692 #: ../fish/guestfish-actions.pod:304
17694 "In the Augeas API, it is possible to clear a node by setting the value to "
17695 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
17696 "this call. Instead you must use the L</aug-clear> call."
17700 #: ../fish/guestfish-actions.pod:309
17705 #: ../fish/guestfish-actions.pod:311
17708 " available 'groups ...'\n"
17713 #: ../fish/guestfish-actions.pod:317
17715 "The libguestfs groups, and the functions that those groups correspond to, "
17716 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
17717 "runtime by calling L</available-all-groups>."
17721 #: ../fish/guestfish-actions.pod:341
17722 msgid "You must call L</launch> before calling this function."
17726 #: ../fish/guestfish-actions.pod:363
17728 "This call was added in version C<1.0.80>. In previous versions of "
17729 "libguestfs all you could do would be to speculatively execute a command to "
17730 "find out if the daemon implemented it. See also L</version>."
17734 #: ../fish/guestfish-actions.pod:370
17735 msgid "available-all-groups"
17739 #: ../fish/guestfish-actions.pod:372
17742 " available-all-groups\n"
17747 #: ../fish/guestfish-actions.pod:374
17749 "This command returns a list of all optional groups that this daemon knows "
17750 "about. Note this returns both supported and unsupported groups. To find "
17751 "out which ones the daemon can actually support you have to call L</"
17752 "available> on each member of the returned list."
17756 #: ../fish/guestfish-actions.pod:380
17757 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
17761 #: ../fish/guestfish-actions.pod:382
17766 #: ../fish/guestfish-actions.pod:384
17769 " base64-in (base64file|-) filename\n"
17774 #: ../fish/guestfish-actions.pod:389 ../fish/guestfish-actions.pod:398
17775 #: ../fish/guestfish-actions.pod:622 ../fish/guestfish-actions.pod:769
17776 #: ../fish/guestfish-actions.pod:816 ../fish/guestfish-actions.pod:835
17777 #: ../fish/guestfish-actions.pod:1212 ../fish/guestfish-actions.pod:3868
17778 #: ../fish/guestfish-actions.pod:3880 ../fish/guestfish-actions.pod:3891
17779 #: ../fish/guestfish-actions.pod:3902 ../fish/guestfish-actions.pod:3954
17780 #: ../fish/guestfish-actions.pod:3963 ../fish/guestfish-actions.pod:4017
17781 #: ../fish/guestfish-actions.pod:4040
17782 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
17786 #: ../fish/guestfish-actions.pod:391
17791 #: ../fish/guestfish-actions.pod:393
17794 " base64-out filename (base64file|-)\n"
17799 #: ../fish/guestfish-actions.pod:400
17800 msgid "blockdev-flushbufs"
17804 #: ../fish/guestfish-actions.pod:402
17807 " blockdev-flushbufs device\n"
17812 #: ../fish/guestfish-actions.pod:409
17813 msgid "blockdev-getbsz"
17817 #: ../fish/guestfish-actions.pod:411
17820 " blockdev-getbsz device\n"
17825 #: ../fish/guestfish-actions.pod:420
17826 msgid "blockdev-getro"
17830 #: ../fish/guestfish-actions.pod:422
17833 " blockdev-getro device\n"
17838 #: ../fish/guestfish-actions.pod:429
17839 msgid "blockdev-getsize64"
17843 #: ../fish/guestfish-actions.pod:431
17846 " blockdev-getsize64 device\n"
17851 #: ../fish/guestfish-actions.pod:435
17852 msgid "See also L</blockdev-getsz>."
17856 #: ../fish/guestfish-actions.pod:439
17857 msgid "blockdev-getss"
17861 #: ../fish/guestfish-actions.pod:441
17864 " blockdev-getss device\n"
17869 #: ../fish/guestfish-actions.pod:446
17871 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
17875 #: ../fish/guestfish-actions.pod:451
17876 msgid "blockdev-getsz"
17880 #: ../fish/guestfish-actions.pod:453
17883 " blockdev-getsz device\n"
17888 #: ../fish/guestfish-actions.pod:458
17890 "See also L</blockdev-getss> for the real sector size of the device, and L</"
17891 "blockdev-getsize64> for the more useful I<size in bytes>."
17895 #: ../fish/guestfish-actions.pod:464
17896 msgid "blockdev-rereadpt"
17900 #: ../fish/guestfish-actions.pod:466
17903 " blockdev-rereadpt device\n"
17908 #: ../fish/guestfish-actions.pod:472
17909 msgid "blockdev-setbsz"
17913 #: ../fish/guestfish-actions.pod:474
17916 " blockdev-setbsz device blocksize\n"
17921 #: ../fish/guestfish-actions.pod:483
17922 msgid "blockdev-setro"
17926 #: ../fish/guestfish-actions.pod:485
17929 " blockdev-setro device\n"
17934 #: ../fish/guestfish-actions.pod:491
17935 msgid "blockdev-setrw"
17939 #: ../fish/guestfish-actions.pod:493
17942 " blockdev-setrw device\n"
17947 #: ../fish/guestfish-actions.pod:499
17948 msgid "case-sensitive-path"
17952 #: ../fish/guestfish-actions.pod:501
17955 " case-sensitive-path path\n"
17960 #: ../fish/guestfish-actions.pod:525
17962 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
17963 "WINDOWS/system32\"> (the exact return value would depend on details of how "
17964 "the directories were originally created under Windows)."
17968 #: ../fish/guestfish-actions.pod:533
17969 msgid "See also L</realpath>."
17973 #: ../fish/guestfish-actions.pod:535
17978 #: ../fish/guestfish-actions.pod:537
17986 #: ../fish/guestfish-actions.pod:541
17988 "Note that this function cannot correctly handle binary files (specifically, "
17989 "files containing C<\\0> character which is treated as end of string). For "
17990 "those you need to use the L</read-file> or L</download> functions which have "
17991 "a more complex interface."
17995 #: ../fish/guestfish-actions.pod:549
18000 #: ../fish/guestfish-actions.pod:551
18003 " checksum csumtype path\n"
18008 #: ../fish/guestfish-actions.pod:594
18009 msgid "To get the checksum for a device, use L</checksum-device>."
18013 #: ../fish/guestfish-actions.pod:596
18014 msgid "To get the checksums for many files, use L</checksums-out>."
18018 #: ../fish/guestfish-actions.pod:598
18019 msgid "checksum-device"
18023 #: ../fish/guestfish-actions.pod:600
18026 " checksum-device csumtype device\n"
18031 #: ../fish/guestfish-actions.pod:602
18033 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
18034 "device named C<device>. For the types of checksums supported see the L</"
18035 "checksum> command."
18039 #: ../fish/guestfish-actions.pod:606
18040 msgid "checksums-out"
18044 #: ../fish/guestfish-actions.pod:608
18047 " checksums-out csumtype directory (sumsfile|-)\n"
18052 #: ../fish/guestfish-actions.pod:624
18057 #: ../fish/guestfish-actions.pod:626
18060 " chmod mode path\n"
18065 #: ../fish/guestfish-actions.pod:637
18070 #: ../fish/guestfish-actions.pod:639
18073 " chown owner group path\n"
18078 #: ../fish/guestfish-actions.pod:647
18083 #: ../fish/guestfish-actions.pod:649
18086 " command 'arguments ...'\n"
18091 #: ../fish/guestfish-actions.pod:656
18093 "The single parameter is an argv-style list of arguments. The first element "
18094 "is the name of the program to run. Subsequent elements are parameters. The "
18095 "list must be non-empty (ie. must contain a program name). Note that the "
18096 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
18100 #: ../fish/guestfish-actions.pod:684
18101 msgid "command-lines"
18105 #: ../fish/guestfish-actions.pod:686
18108 " command-lines 'arguments ...'\n"
18113 #: ../fish/guestfish-actions.pod:688
18115 "This is the same as L</command>, but splits the result into a list of lines."
18119 #: ../fish/guestfish-actions.pod:691
18120 msgid "See also: L</sh-lines>"
18124 #: ../fish/guestfish-actions.pod:696
18129 #: ../fish/guestfish-actions.pod:698
18132 " config qemuparam qemuvalue\n"
18137 #: ../fish/guestfish-actions.pod:709
18142 #: ../fish/guestfish-actions.pod:711
18145 " copy-size src dest size\n"
18150 #: ../fish/guestfish-actions.pod:719
18155 #: ../fish/guestfish-actions.pod:721
18163 #: ../fish/guestfish-actions.pod:726
18168 #: ../fish/guestfish-actions.pod:728
18176 #: ../fish/guestfish-actions.pod:733
18181 #: ../fish/guestfish-actions.pod:735
18189 #: ../fish/guestfish-actions.pod:742
18191 "If the destination is a device, it must be as large or larger than the "
18192 "source file or device, otherwise the copy will fail. This command cannot do "
18193 "partial copies (see L</copy-size>)."
18197 #: ../fish/guestfish-actions.pod:746
18202 #: ../fish/guestfish-actions.pod:748
18205 " debug subcmd 'extraargs ...'\n"
18210 #: ../fish/guestfish-actions.pod:750
18212 "The L</debug> command exposes some internals of C<guestfsd> (the guestfs "
18213 "daemon) that runs inside the qemu subprocess."
18217 #: ../fish/guestfish-actions.pod:758
18218 msgid "debug-upload"
18222 #: ../fish/guestfish-actions.pod:760
18225 " debug-upload (filename|-) tmpname mode\n"
18230 #: ../fish/guestfish-actions.pod:762
18232 "The L</debug-upload> command uploads a file to the libguestfs appliance."
18236 #: ../fish/guestfish-actions.pod:771
18241 #: ../fish/guestfish-actions.pod:773
18249 #: ../fish/guestfish-actions.pod:781
18254 #: ../fish/guestfish-actions.pod:783
18262 #: ../fish/guestfish-actions.pod:792
18267 #: ../fish/guestfish-actions.pod:794
18275 #: ../fish/guestfish-actions.pod:800
18277 "Another way to get the same information is to enable verbose messages with "
18278 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
18279 "before running the program."
18283 #: ../fish/guestfish-actions.pod:805
18288 #: ../fish/guestfish-actions.pod:807
18291 " download remotefilename (filename|-)\n"
18296 #: ../fish/guestfish-actions.pod:814
18297 msgid "See also L</upload>, L</cat>."
18301 #: ../fish/guestfish-actions.pod:818
18302 msgid "download-offset"
18306 #: ../fish/guestfish-actions.pod:820
18309 " download-offset remotefilename (filename|-) offset size\n"
18314 #: ../fish/guestfish-actions.pod:828
18316 "Note that there is no limit on the amount of data that can be downloaded "
18317 "with this call, unlike with L</pread>, and this call always reads the full "
18318 "amount unless an error occurs."
18322 #: ../fish/guestfish-actions.pod:833
18323 msgid "See also L</download>, L</pread>."
18327 #: ../fish/guestfish-actions.pod:837
18328 msgid "drop-caches"
18332 #: ../fish/guestfish-actions.pod:839
18335 " drop-caches whattodrop\n"
18340 #: ../fish/guestfish-actions.pod:851
18345 #: ../fish/guestfish-actions.pod:853
18353 #: ../fish/guestfish-actions.pod:865
18358 #: ../fish/guestfish-actions.pod:867
18361 " e2fsck-f device\n"
18366 #: ../fish/guestfish-actions.pod:873
18368 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
18369 "should use L</fsck>."
18373 #: ../fish/guestfish-actions.pod:876
18374 msgid "echo-daemon"
18378 #: ../fish/guestfish-actions.pod:878
18381 " echo-daemon 'words ...'\n"
18386 #: ../fish/guestfish-actions.pod:885
18387 msgid "See also L</ping-daemon>."
18391 #: ../fish/guestfish-actions.pod:887
18396 #: ../fish/guestfish-actions.pod:889
18399 " egrep regex path\n"
18404 #: ../fish/guestfish-actions.pod:897
18409 #: ../fish/guestfish-actions.pod:899
18412 " egrepi regex path\n"
18417 #: ../fish/guestfish-actions.pod:907
18422 #: ../fish/guestfish-actions.pod:909
18425 " equal file1 file2\n"
18430 #: ../fish/guestfish-actions.pod:916
18435 #: ../fish/guestfish-actions.pod:918
18443 #: ../fish/guestfish-actions.pod:923
18444 msgid "See also L</is-file>, L</is-dir>, L</stat>."
18448 #: ../fish/guestfish-actions.pod:925
18453 #: ../fish/guestfish-actions.pod:927
18456 " fallocate path len\n"
18461 #: ../fish/guestfish-actions.pod:944
18462 msgid "fallocate64"
18466 #: ../fish/guestfish-actions.pod:946
18469 " fallocate64 path len\n"
18474 #: ../fish/guestfish-actions.pod:952
18476 "Note that this call allocates disk blocks for the file. To create a sparse "
18477 "file use L</truncate-size> instead."
18481 #: ../fish/guestfish-actions.pod:955
18483 "The deprecated call L</fallocate> does the same, but owing to an oversight "
18484 "it only allowed 30 bit lengths to be specified, effectively limiting the "
18485 "maximum size of files created through that call to 1GB."
18489 #: ../fish/guestfish-actions.pod:964
18494 #: ../fish/guestfish-actions.pod:966
18497 " fgrep pattern path\n"
18502 #: ../fish/guestfish-actions.pod:974
18507 #: ../fish/guestfish-actions.pod:976
18510 " fgrepi pattern path\n"
18515 #: ../fish/guestfish-actions.pod:984
18520 #: ../fish/guestfish-actions.pod:986
18528 #: ../fish/guestfish-actions.pod:998
18530 "This command can also be used on C</dev/> devices (and partitions, LV "
18531 "names). You can for example use this to determine if a device contains a "
18532 "filesystem, although it's usually better to use L</vfs-type>."
18536 #: ../fish/guestfish-actions.pod:1008
18537 msgid "file-architecture"
18541 #: ../fish/guestfish-actions.pod:1010
18544 " file-architecture filename\n"
18549 #: ../fish/guestfish-actions.pod:1113
18554 #: ../fish/guestfish-actions.pod:1115
18562 #: ../fish/guestfish-actions.pod:1119
18564 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
18565 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
18569 #: ../fish/guestfish-actions.pod:1123
18574 #: ../fish/guestfish-actions.pod:1125
18577 " fill c len path\n"
18582 #: ../fish/guestfish-actions.pod:1131
18584 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
18585 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
18586 "L</fill-pattern>."
18590 #: ../fish/guestfish-actions.pod:1136
18591 msgid "fill-pattern"
18595 #: ../fish/guestfish-actions.pod:1138
18598 " fill-pattern pattern len path\n"
18603 #: ../fish/guestfish-actions.pod:1140
18605 "This function is like L</fill> except that it creates a new file of length "
18606 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
18607 "is truncated if necessary to ensure the length of the file is exactly C<len> "
18612 #: ../fish/guestfish-actions.pod:1145
18617 #: ../fish/guestfish-actions.pod:1147
18620 " find directory\n"
18625 #: ../fish/guestfish-actions.pod:1161
18626 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
18630 #: ../fish/guestfish-actions.pod:1174
18631 msgid "See also L</find0>."
18635 #: ../fish/guestfish-actions.pod:1179
18640 #: ../fish/guestfish-actions.pod:1181
18643 " find0 directory (files|-)\n"
18648 #: ../fish/guestfish-actions.pod:1187
18650 "This command works the same way as L</find> with the following exceptions:"
18654 #: ../fish/guestfish-actions.pod:1214
18655 msgid "findfs-label"
18659 #: ../fish/guestfish-actions.pod:1216
18662 " findfs-label label\n"
18667 #: ../fish/guestfish-actions.pod:1222
18668 msgid "To find the label of a filesystem, use L</vfs-label>."
18672 #: ../fish/guestfish-actions.pod:1224
18673 msgid "findfs-uuid"
18677 #: ../fish/guestfish-actions.pod:1226
18680 " findfs-uuid uuid\n"
18685 #: ../fish/guestfish-actions.pod:1232
18686 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
18690 #: ../fish/guestfish-actions.pod:1234
18695 #: ../fish/guestfish-actions.pod:1236
18698 " fsck fstype device\n"
18703 #: ../fish/guestfish-actions.pod:1266
18708 #: ../fish/guestfish-actions.pod:1268
18716 #: ../fish/guestfish-actions.pod:1275
18717 msgid "get-autosync"
18721 #: ../fish/guestfish-actions.pod:1277
18729 #: ../fish/guestfish-actions.pod:1281
18734 #: ../fish/guestfish-actions.pod:1283
18742 #: ../fish/guestfish-actions.pod:1287
18743 msgid "get-e2label"
18747 #: ../fish/guestfish-actions.pod:1289
18750 " get-e2label device\n"
18755 #: ../fish/guestfish-actions.pod:1301
18760 #: ../fish/guestfish-actions.pod:1303
18763 " get-e2uuid device\n"
18768 #: ../fish/guestfish-actions.pod:1315
18769 msgid "get-memsize"
18773 #: ../fish/guestfish-actions.pod:1317
18781 #: ../fish/guestfish-actions.pod:1322
18783 "If L</set-memsize> was not called on this handle, and if "
18784 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
18785 "value for memsize."
18789 #: ../fish/guestfish-actions.pod:1329
18790 msgid "get-network"
18794 #: ../fish/guestfish-actions.pod:1331
18802 #: ../fish/guestfish-actions.pod:1335
18807 #: ../fish/guestfish-actions.pod:1337
18815 #: ../fish/guestfish-actions.pod:1344
18820 #: ../fish/guestfish-actions.pod:1346
18825 #: ../fish/guestfish-actions.pod:1348
18833 #: ../fish/guestfish-actions.pod:1355
18838 #: ../fish/guestfish-actions.pod:1357
18846 #: ../fish/guestfish-actions.pod:1364
18847 msgid "get-recovery-proc"
18851 #: ../fish/guestfish-actions.pod:1366
18854 " get-recovery-proc\n"
18859 #: ../fish/guestfish-actions.pod:1370
18860 msgid "get-selinux"
18864 #: ../fish/guestfish-actions.pod:1372
18872 #: ../fish/guestfish-actions.pod:1374
18874 "This returns the current setting of the selinux flag which is passed to the "
18875 "appliance at boot time. See L</set-selinux>."
18879 #: ../fish/guestfish-actions.pod:1380
18884 #: ../fish/guestfish-actions.pod:1382
18892 #: ../fish/guestfish-actions.pod:1389
18897 #: ../fish/guestfish-actions.pod:1391
18905 #: ../fish/guestfish-actions.pod:1395
18910 #: ../fish/guestfish-actions.pod:1397
18918 #: ../fish/guestfish-actions.pod:1399
18920 "Return the current umask. By default the umask is C<022> unless it has been "
18921 "set by calling L</umask>."
18925 #: ../fish/guestfish-actions.pod:1402
18926 msgid "get-verbose"
18930 #: ../fish/guestfish-actions.pod:1404
18938 #: ../fish/guestfish-actions.pod:1408
18943 #: ../fish/guestfish-actions.pod:1410
18951 #: ../fish/guestfish-actions.pod:1414
18952 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
18956 #: ../fish/guestfish-actions.pod:1417
18961 #: ../fish/guestfish-actions.pod:1419
18964 " getxattrs path\n"
18969 #: ../fish/guestfish-actions.pod:1427
18970 msgid "See also: L</lgetxattrs>, L<attr(5)>."
18974 #: ../fish/guestfish-actions.pod:1429
18975 msgid "glob-expand"
18979 #: ../fish/guestfish-actions.pod:1431
18982 " glob-expand pattern\n"
18987 #: ../fish/guestfish-actions.pod:1444
18992 #: ../fish/guestfish-actions.pod:1446
18995 " grep regex path\n"
19000 #: ../fish/guestfish-actions.pod:1454
19005 #: ../fish/guestfish-actions.pod:1456
19008 " grepi regex path\n"
19013 #: ../fish/guestfish-actions.pod:1464
19014 msgid "grub-install"
19018 #: ../fish/guestfish-actions.pod:1466
19021 " grub-install root device\n"
19026 #: ../fish/guestfish-actions.pod:1482
19031 #: ../fish/guestfish-actions.pod:1484
19039 #: ../fish/guestfish-actions.pod:1492
19044 #: ../fish/guestfish-actions.pod:1494
19047 " head-n nrlines path\n"
19052 #: ../fish/guestfish-actions.pod:1507
19057 #: ../fish/guestfish-actions.pod:1509
19065 #: ../fish/guestfish-actions.pod:1517
19070 #: ../fish/guestfish-actions.pod:1519
19073 " initrd-cat initrdpath filename\n"
19078 #: ../fish/guestfish-actions.pod:1531
19079 msgid "See also L</initrd-list>."
19083 #: ../fish/guestfish-actions.pod:1536
19084 msgid "initrd-list"
19088 #: ../fish/guestfish-actions.pod:1538
19091 " initrd-list path\n"
19096 #: ../fish/guestfish-actions.pod:1550
19097 msgid "inotify-add-watch"
19101 #: ../fish/guestfish-actions.pod:1552
19104 " inotify-add-watch path mask\n"
19109 #: ../fish/guestfish-actions.pod:1564
19110 msgid "inotify-close"
19114 #: ../fish/guestfish-actions.pod:1566
19122 #: ../fish/guestfish-actions.pod:1572
19123 msgid "inotify-files"
19127 #: ../fish/guestfish-actions.pod:1574
19135 #: ../fish/guestfish-actions.pod:1576
19137 "This function is a helpful wrapper around L</inotify-read> which just "
19138 "returns a list of pathnames of objects that were touched. The returned "
19139 "pathnames are sorted and deduplicated."
19143 #: ../fish/guestfish-actions.pod:1580
19144 msgid "inotify-init"
19148 #: ../fish/guestfish-actions.pod:1582
19151 " inotify-init maxevents\n"
19156 #: ../fish/guestfish-actions.pod:1588
19158 "C<maxevents> is the maximum number of events which will be queued up between "
19159 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
19160 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
19161 "default was 16384 events. Beyond this limit, the kernel throws away events, "
19162 "but records the fact that it threw them away by setting a flag "
19163 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
19167 #: ../fish/guestfish-actions.pod:1598
19169 "Before any events are generated, you have to add some watches to the "
19170 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
19171 "L</inotify-watch-all>."
19175 #: ../fish/guestfish-actions.pod:1604
19177 "Queued up events should be read periodically by calling L</inotify-read> (or "
19178 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
19179 "If you don't read the events out often enough then you risk the internal "
19180 "queue overflowing."
19184 #: ../fish/guestfish-actions.pod:1611
19186 "The handle should be closed after use by calling L</inotify-close>. This "
19187 "also removes any watches automatically."
19191 #: ../fish/guestfish-actions.pod:1620
19192 msgid "inotify-read"
19196 #: ../fish/guestfish-actions.pod:1622
19204 #: ../fish/guestfish-actions.pod:1635
19205 msgid "inotify-rm-watch"
19209 #: ../fish/guestfish-actions.pod:1637
19212 " inotify-rm-watch wd\n"
19217 #: ../fish/guestfish-actions.pod:1639
19218 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
19222 #: ../fish/guestfish-actions.pod:1642
19223 msgid "inspect-get-arch"
19227 #: ../fish/guestfish-actions.pod:1644
19230 " inspect-get-arch root\n"
19235 #: ../fish/guestfish-actions.pod:1646 ../fish/guestfish-actions.pod:1662
19236 #: ../fish/guestfish-actions.pod:1708 ../fish/guestfish-actions.pod:1726
19237 #: ../fish/guestfish-actions.pod:1747 ../fish/guestfish-actions.pod:1762
19238 #: ../fish/guestfish-actions.pod:1785 ../fish/guestfish-actions.pod:1802
19240 "This function should only be called with a root device string as returned by "
19245 #: ../fish/guestfish-actions.pod:1649
19247 "This returns the architecture of the inspected operating system. The "
19248 "possible return values are listed under L</file-architecture>."
19252 #: ../fish/guestfish-actions.pod:1658
19253 msgid "inspect-get-distro"
19257 #: ../fish/guestfish-actions.pod:1660
19260 " inspect-get-distro root\n"
19265 #: ../fish/guestfish-actions.pod:1704
19266 msgid "inspect-get-filesystems"
19270 #: ../fish/guestfish-actions.pod:1706
19273 " inspect-get-filesystems root\n"
19278 #: ../fish/guestfish-actions.pod:1719
19280 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
19281 "get-mountpoints>."
19285 #: ../fish/guestfish-actions.pod:1722
19286 msgid "inspect-get-major-version"
19290 #: ../fish/guestfish-actions.pod:1724
19293 " inspect-get-major-version root\n"
19298 #: ../fish/guestfish-actions.pod:1743
19299 msgid "inspect-get-minor-version"
19303 #: ../fish/guestfish-actions.pod:1745
19306 " inspect-get-minor-version root\n"
19311 #: ../fish/guestfish-actions.pod:1755
19313 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
19314 "get-major-version>."
19318 #: ../fish/guestfish-actions.pod:1758
19319 msgid "inspect-get-mountpoints"
19323 #: ../fish/guestfish-actions.pod:1760
19326 " inspect-get-mountpoints root\n"
19331 #: ../fish/guestfish-actions.pod:1778
19333 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
19334 "get-filesystems>."
19338 #: ../fish/guestfish-actions.pod:1781
19339 msgid "inspect-get-product-name"
19343 #: ../fish/guestfish-actions.pod:1783
19346 " inspect-get-product-name root\n"
19351 #: ../fish/guestfish-actions.pod:1798
19352 msgid "inspect-get-type"
19356 #: ../fish/guestfish-actions.pod:1800
19359 " inspect-get-type root\n"
19364 #: ../fish/guestfish-actions.pod:1829
19369 #: ../fish/guestfish-actions.pod:1831
19377 #: ../fish/guestfish-actions.pod:1846
19379 "You can pass the root string(s) returned to other L</inspect-get-*> "
19380 "functions in order to query further information about each operating system, "
19381 "such as the name and version."
19385 #: ../fish/guestfish-actions.pod:1851
19387 "This function uses other libguestfs features such as L</mount-ro> and L</"
19388 "umount-all> in order to mount and unmount filesystems and look at the "
19389 "contents. This should be called with no disks currently mounted. The "
19390 "function may also use Augeas, so any existing Augeas handle will be closed."
19394 #: ../fish/guestfish-actions.pod:1863 ../fish/guestfish-actions.pod:2019
19395 #: ../fish/guestfish-actions.pod:2065
19396 msgid "See also L</list-filesystems>."
19400 #: ../fish/guestfish-actions.pod:1865
19401 msgid "is-blockdev"
19405 #: ../fish/guestfish-actions.pod:1867
19408 " is-blockdev path\n"
19413 #: ../fish/guestfish-actions.pod:1872 ../fish/guestfish-actions.pod:1890
19414 #: ../fish/guestfish-actions.pod:1909 ../fish/guestfish-actions.pod:1918
19415 #: ../fish/guestfish-actions.pod:1928 ../fish/guestfish-actions.pod:1962
19416 #: ../fish/guestfish-actions.pod:1971
19417 msgid "See also L</stat>."
19421 #: ../fish/guestfish-actions.pod:1874
19426 #: ../fish/guestfish-actions.pod:1876
19434 #: ../fish/guestfish-actions.pod:1883
19439 #: ../fish/guestfish-actions.pod:1885
19442 " is-chardev path\n"
19447 #: ../fish/guestfish-actions.pod:1892
19452 #: ../fish/guestfish-actions.pod:1894
19460 #: ../fish/guestfish-actions.pod:1901
19465 #: ../fish/guestfish-actions.pod:1903
19473 #: ../fish/guestfish-actions.pod:1911
19478 #: ../fish/guestfish-actions.pod:1913
19486 #: ../fish/guestfish-actions.pod:1920
19491 #: ../fish/guestfish-actions.pod:1922
19499 #: ../fish/guestfish-actions.pod:1930
19500 msgid "is-launching"
19504 #: ../fish/guestfish-actions.pod:1932
19512 #: ../fish/guestfish-actions.pod:1939
19517 #: ../fish/guestfish-actions.pod:1941
19525 #: ../fish/guestfish-actions.pod:1946
19530 #: ../fish/guestfish-actions.pod:1948
19538 #: ../fish/guestfish-actions.pod:1955
19543 #: ../fish/guestfish-actions.pod:1957
19546 " is-socket path\n"
19551 #: ../fish/guestfish-actions.pod:1964
19556 #: ../fish/guestfish-actions.pod:1966
19559 " is-symlink path\n"
19564 #: ../fish/guestfish-actions.pod:1973
19565 msgid "kill-subprocess"
19569 #: ../fish/guestfish-actions.pod:1975
19572 " kill-subprocess\n"
19577 #: ../fish/guestfish-actions.pod:1979
19582 #: ../fish/guestfish-actions.pod:1981
19587 #: ../fish/guestfish-actions.pod:1983
19595 #: ../fish/guestfish-actions.pod:1991
19600 #: ../fish/guestfish-actions.pod:1993
19603 " lchown owner group path\n"
19608 #: ../fish/guestfish-actions.pod:1995
19610 "Change the file owner to C<owner> and group to C<group>. This is like L</"
19611 "chown> but if C<path> is a symlink then the link itself is changed, not the "
19616 #: ../fish/guestfish-actions.pod:2003
19621 #: ../fish/guestfish-actions.pod:2005
19624 " lgetxattrs path\n"
19629 #: ../fish/guestfish-actions.pod:2007
19631 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
19632 "it returns the extended attributes of the link itself."
19636 #: ../fish/guestfish-actions.pod:2011
19637 msgid "list-devices"
19641 #: ../fish/guestfish-actions.pod:2013
19649 #: ../fish/guestfish-actions.pod:2021
19650 msgid "list-filesystems"
19654 #: ../fish/guestfish-actions.pod:2023
19657 " list-filesystems\n"
19662 #: ../fish/guestfish-actions.pod:2042
19664 "This command runs other libguestfs commands, which might include L</mount> "
19665 "and L</umount>, and therefore you should use this soon after launch and only "
19666 "when nothing is mounted."
19670 #: ../fish/guestfish-actions.pod:2046
19672 "Not all of the filesystems returned will be mountable. In particular, swap "
19673 "partitions are returned in the list. Also this command does not check that "
19674 "each filesystem found is valid and mountable, and some filesystems might be "
19675 "mountable but require special options. Filesystems may not all belong to a "
19676 "single logical operating system (use L</inspect-os> to look for OSes)."
19680 #: ../fish/guestfish-actions.pod:2054
19681 msgid "list-partitions"
19685 #: ../fish/guestfish-actions.pod:2056
19688 " list-partitions\n"
19693 #: ../fish/guestfish-actions.pod:2062
19695 "This does not return logical volumes. For that you will need to call L</"
19700 #: ../fish/guestfish-actions.pod:2067
19705 #: ../fish/guestfish-actions.pod:2069
19713 #: ../fish/guestfish-actions.pod:2077
19718 #: ../fish/guestfish-actions.pod:2079
19721 " ln target linkname\n"
19726 #: ../fish/guestfish-actions.pod:2083
19731 #: ../fish/guestfish-actions.pod:2085
19734 " ln-f target linkname\n"
19739 #: ../fish/guestfish-actions.pod:2090
19744 #: ../fish/guestfish-actions.pod:2092
19747 " ln-s target linkname\n"
19752 #: ../fish/guestfish-actions.pod:2096
19757 #: ../fish/guestfish-actions.pod:2098
19760 " ln-sf target linkname\n"
19765 #: ../fish/guestfish-actions.pod:2103
19766 msgid "lremovexattr"
19770 #: ../fish/guestfish-actions.pod:2105
19773 " lremovexattr xattr path\n"
19778 #: ../fish/guestfish-actions.pod:2107
19780 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
19781 "it removes an extended attribute of the link itself."
19785 #: ../fish/guestfish-actions.pod:2111
19790 #: ../fish/guestfish-actions.pod:2113
19798 #: ../fish/guestfish-actions.pod:2119
19800 "This command is mostly useful for interactive sessions. Programs should "
19801 "probably use L</readdir> instead."
19805 #: ../fish/guestfish-actions.pod:2122
19810 #: ../fish/guestfish-actions.pod:2124
19813 " lsetxattr xattr val vallen path\n"
19818 #: ../fish/guestfish-actions.pod:2126
19820 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
19821 "sets an extended attribute of the link itself."
19825 #: ../fish/guestfish-actions.pod:2130
19830 #: ../fish/guestfish-actions.pod:2132
19838 #: ../fish/guestfish-actions.pod:2136
19840 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
19841 "the link is stat-ed, not the file it refers to."
19845 #: ../fish/guestfish-actions.pod:2142
19850 #: ../fish/guestfish-actions.pod:2144
19853 " lstatlist path 'names ...'\n"
19858 #: ../fish/guestfish-actions.pod:2146
19860 "This call allows you to perform the L</lstat> operation on multiple files, "
19861 "where all files are in the directory C<path>. C<names> is the list of files "
19862 "from this directory."
19866 #: ../fish/guestfish-actions.pod:2155
19868 "This call is intended for programs that want to efficiently list a directory "
19869 "contents without making many round-trips. See also L</lxattrlist> for a "
19870 "similarly efficient call for getting extended attributes. Very long "
19871 "directory listings might cause the protocol message size to be exceeded, "
19872 "causing this call to fail. The caller must split up such requests into "
19873 "smaller groups of names."
19877 #: ../fish/guestfish-actions.pod:2163
19878 msgid "luks-add-key"
19882 #: ../fish/guestfish-actions.pod:2165
19885 " luks-add-key device keyslot\n"
19890 #: ../fish/guestfish-actions.pod:2172
19892 "Note that if C<keyslot> already contains a key, then this command will "
19893 "fail. You have to use L</luks-kill-slot> first to remove that key."
19897 #: ../fish/guestfish-actions.pod:2176 ../fish/guestfish-actions.pod:2198
19898 #: ../fish/guestfish-actions.pod:2211 ../fish/guestfish-actions.pod:2225
19899 #: ../fish/guestfish-actions.pod:2248 ../fish/guestfish-actions.pod:2258
19901 "This command has one or more key or passphrase parameters. Guestfish will "
19902 "prompt for these separately."
19906 #: ../fish/guestfish-actions.pod:2179
19911 #: ../fish/guestfish-actions.pod:2181
19914 " luks-close device\n"
19919 #: ../fish/guestfish-actions.pod:2183
19921 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
19922 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
19923 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
19928 #: ../fish/guestfish-actions.pod:2189
19929 msgid "luks-format"
19933 #: ../fish/guestfish-actions.pod:2191
19936 " luks-format device keyslot\n"
19941 #: ../fish/guestfish-actions.pod:2204
19942 msgid "luks-format-cipher"
19946 #: ../fish/guestfish-actions.pod:2206
19949 " luks-format-cipher device keyslot cipher\n"
19954 #: ../fish/guestfish-actions.pod:2208
19956 "This command is the same as L</luks-format> but it also allows you to set "
19957 "the C<cipher> used."
19961 #: ../fish/guestfish-actions.pod:2217
19962 msgid "luks-kill-slot"
19966 #: ../fish/guestfish-actions.pod:2219
19969 " luks-kill-slot device keyslot\n"
19974 #: ../fish/guestfish-actions.pod:2228
19979 #: ../fish/guestfish-actions.pod:2230
19982 " luks-open device mapname\n"
19987 #: ../fish/guestfish-actions.pod:2244
19989 "If this block device contains LVM volume groups, then calling L</vgscan> "
19990 "followed by L</vg-activate-all> will make them visible."
19994 #: ../fish/guestfish-actions.pod:2251
19995 msgid "luks-open-ro"
19999 #: ../fish/guestfish-actions.pod:2253
20002 " luks-open-ro device mapname\n"
20007 #: ../fish/guestfish-actions.pod:2255
20009 "This is the same as L</luks-open> except that a read-only mapping is created."
20013 #: ../fish/guestfish-actions.pod:2261
20018 #: ../fish/guestfish-actions.pod:2263
20021 " lvcreate logvol volgroup mbytes\n"
20026 #: ../fish/guestfish-actions.pod:2268
20027 msgid "lvm-clear-filter"
20031 #: ../fish/guestfish-actions.pod:2270
20034 " lvm-clear-filter\n"
20039 #: ../fish/guestfish-actions.pod:2272
20041 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
20046 #: ../fish/guestfish-actions.pod:2278
20047 msgid "lvm-remove-all"
20051 #: ../fish/guestfish-actions.pod:2280
20054 " lvm-remove-all\n"
20059 #: ../fish/guestfish-actions.pod:2288
20060 msgid "lvm-set-filter"
20064 #: ../fish/guestfish-actions.pod:2290
20067 " lvm-set-filter 'devices ...'\n"
20072 #: ../fish/guestfish-actions.pod:2315
20077 #: ../fish/guestfish-actions.pod:2317
20080 " lvremove device\n"
20085 #: ../fish/guestfish-actions.pod:2325
20090 #: ../fish/guestfish-actions.pod:2327
20093 " lvrename logvol newlogvol\n"
20098 #: ../fish/guestfish-actions.pod:2331
20103 #: ../fish/guestfish-actions.pod:2333
20106 " lvresize device mbytes\n"
20111 #: ../fish/guestfish-actions.pod:2339
20112 msgid "lvresize-free"
20116 #: ../fish/guestfish-actions.pod:2341
20119 " lvresize-free lv percent\n"
20124 #: ../fish/guestfish-actions.pod:2349
20129 #: ../fish/guestfish-actions.pod:2351
20137 #: ../fish/guestfish-actions.pod:2359
20138 msgid "See also L</lvs-full>, L</list-filesystems>."
20142 #: ../fish/guestfish-actions.pod:2361
20147 #: ../fish/guestfish-actions.pod:2363
20155 #: ../fish/guestfish-actions.pod:2368
20160 #: ../fish/guestfish-actions.pod:2370
20168 #: ../fish/guestfish-actions.pod:2374
20173 #: ../fish/guestfish-actions.pod:2376
20176 " lxattrlist path 'names ...'\n"
20181 #: ../fish/guestfish-actions.pod:2392
20183 "This call is intended for programs that want to efficiently list a directory "
20184 "contents without making many round-trips. See also L</lstatlist> for a "
20185 "similarly efficient call for getting standard stats. Very long directory "
20186 "listings might cause the protocol message size to be exceeded, causing this "
20187 "call to fail. The caller must split up such requests into smaller groups of "
20192 #: ../fish/guestfish-actions.pod:2400
20197 #: ../fish/guestfish-actions.pod:2402
20205 #: ../fish/guestfish-actions.pod:2406
20210 #: ../fish/guestfish-actions.pod:2408
20213 " mkdir-mode path mode\n"
20218 #: ../fish/guestfish-actions.pod:2417
20219 msgid "See also L</mkdir>, L</umask>"
20223 #: ../fish/guestfish-actions.pod:2419
20228 #: ../fish/guestfish-actions.pod:2421
20236 #: ../fish/guestfish-actions.pod:2426
20241 #: ../fish/guestfish-actions.pod:2428
20244 " mkdtemp template\n"
20249 #: ../fish/guestfish-actions.pod:2449
20254 #: ../fish/guestfish-actions.pod:2451
20257 " mke2fs-J fstype blocksize device journal\n"
20262 #: ../fish/guestfish-actions.pod:2459
20263 msgid "See also L</mke2journal>."
20267 #: ../fish/guestfish-actions.pod:2461
20272 #: ../fish/guestfish-actions.pod:2463
20275 " mke2fs-JL fstype blocksize device label\n"
20280 #: ../fish/guestfish-actions.pod:2468
20281 msgid "See also L</mke2journal-L>."
20285 #: ../fish/guestfish-actions.pod:2470
20290 #: ../fish/guestfish-actions.pod:2472
20293 " mke2fs-JU fstype blocksize device uuid\n"
20298 #: ../fish/guestfish-actions.pod:2477
20299 msgid "See also L</mke2journal-U>."
20303 #: ../fish/guestfish-actions.pod:2479
20304 msgid "mke2journal"
20308 #: ../fish/guestfish-actions.pod:2481
20311 " mke2journal blocksize device\n"
20316 #: ../fish/guestfish-actions.pod:2488
20317 msgid "mke2journal-L"
20321 #: ../fish/guestfish-actions.pod:2490
20324 " mke2journal-L blocksize label device\n"
20329 #: ../fish/guestfish-actions.pod:2494
20330 msgid "mke2journal-U"
20334 #: ../fish/guestfish-actions.pod:2496
20337 " mke2journal-U blocksize uuid device\n"
20342 #: ../fish/guestfish-actions.pod:2500
20347 #: ../fish/guestfish-actions.pod:2502
20350 " mkfifo mode path\n"
20355 #: ../fish/guestfish-actions.pod:2504
20357 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
20358 "is just a convenient wrapper around L</mknod>."
20362 #: ../fish/guestfish-actions.pod:2510
20367 #: ../fish/guestfish-actions.pod:2512
20370 " mkfs fstype device\n"
20375 #: ../fish/guestfish-actions.pod:2518
20380 #: ../fish/guestfish-actions.pod:2520
20383 " mkfs-b fstype blocksize device\n"
20388 #: ../fish/guestfish-actions.pod:2522
20390 "This call is similar to L</mkfs>, but it allows you to control the block "
20391 "size of the resulting filesystem. Supported block sizes depend on the "
20392 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
20396 #: ../fish/guestfish-actions.pod:2530
20397 msgid "mkmountpoint"
20401 #: ../fish/guestfish-actions.pod:2532
20404 " mkmountpoint exemptpath\n"
20409 #: ../fish/guestfish-actions.pod:2534
20411 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
20412 "to create extra mountpoints before mounting the first filesystem."
20416 #: ../fish/guestfish-actions.pod:2558
20421 #: ../fish/guestfish-actions.pod:2560
20424 " mknod mode devmajor devminor path\n"
20429 #: ../fish/guestfish-actions.pod:2570
20431 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
20432 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
20433 "regular file). These constants are available in the standard Linux header "
20434 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
20435 "wrappers around this command which bitwise OR in the appropriate constant "
20440 #: ../fish/guestfish-actions.pod:2580
20445 #: ../fish/guestfish-actions.pod:2582
20448 " mknod-b mode devmajor devminor path\n"
20453 #: ../fish/guestfish-actions.pod:2584
20455 "This call creates a block device node called C<path> with mode C<mode> and "
20456 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
20457 "wrapper around L</mknod>."
20461 #: ../fish/guestfish-actions.pod:2590
20466 #: ../fish/guestfish-actions.pod:2592
20469 " mknod-c mode devmajor devminor path\n"
20474 #: ../fish/guestfish-actions.pod:2594
20476 "This call creates a char device node called C<path> with mode C<mode> and "
20477 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
20478 "wrapper around L</mknod>."
20482 #: ../fish/guestfish-actions.pod:2600
20487 #: ../fish/guestfish-actions.pod:2602
20495 #: ../fish/guestfish-actions.pod:2606
20500 #: ../fish/guestfish-actions.pod:2608
20503 " mkswap-L label device\n"
20508 #: ../fish/guestfish-actions.pod:2616
20513 #: ../fish/guestfish-actions.pod:2618
20516 " mkswap-U uuid device\n"
20521 #: ../fish/guestfish-actions.pod:2622
20522 msgid "mkswap-file"
20526 #: ../fish/guestfish-actions.pod:2624
20529 " mkswap-file path\n"
20534 #: ../fish/guestfish-actions.pod:2628
20536 "This command just writes a swap file signature to an existing file. To "
20537 "create the file itself, use something like L</fallocate>."
20541 #: ../fish/guestfish-actions.pod:2631
20546 #: ../fish/guestfish-actions.pod:2633
20549 " modprobe modulename\n"
20554 #: ../fish/guestfish-actions.pod:2640
20559 #: ../fish/guestfish-actions.pod:2642
20562 " mount device mountpoint\n"
20567 #: ../fish/guestfish-actions.pod:2658
20569 "B<Important note:> When you use this call, the filesystem options C<sync> "
20570 "and C<noatime> are set implicitly. This was originally done because we "
20571 "thought it would improve reliability, but it turns out that I<-o sync> has a "
20572 "very large negative performance impact and negligible effect on "
20573 "reliability. Therefore we recommend that you avoid using L</mount> in any "
20574 "code that needs performance, and instead use L</mount-options> (use an empty "
20575 "string for the first parameter if you don't want any options)."
20579 #: ../fish/guestfish-actions.pod:2668
20584 #: ../fish/guestfish-actions.pod:2670
20587 " mount-loop file mountpoint\n"
20592 #: ../fish/guestfish-actions.pod:2676
20593 msgid "mount-options"
20597 #: ../fish/guestfish-actions.pod:2678
20600 " mount-options options device mountpoint\n"
20605 #: ../fish/guestfish-actions.pod:2680
20607 "This is the same as the L</mount> command, but it allows you to set the "
20608 "mount options as for the L<mount(8)> I<-o> flag."
20612 #: ../fish/guestfish-actions.pod:2688
20617 #: ../fish/guestfish-actions.pod:2690
20620 " mount-ro device mountpoint\n"
20625 #: ../fish/guestfish-actions.pod:2692
20627 "This is the same as the L</mount> command, but it mounts the filesystem with "
20628 "the read-only (I<-o ro>) flag."
20632 #: ../fish/guestfish-actions.pod:2695
20637 #: ../fish/guestfish-actions.pod:2697
20640 " mount-vfs options vfstype device mountpoint\n"
20645 #: ../fish/guestfish-actions.pod:2699
20647 "This is the same as the L</mount> command, but it allows you to set both the "
20648 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
20652 #: ../fish/guestfish-actions.pod:2703
20653 msgid "mountpoints"
20657 #: ../fish/guestfish-actions.pod:2705
20665 #: ../fish/guestfish-actions.pod:2707
20667 "This call is similar to L</mounts>. That call returns a list of devices. "
20668 "This one returns a hash table (map) of device name to directory where the "
20669 "device is mounted."
20673 #: ../fish/guestfish-actions.pod:2711
20678 #: ../fish/guestfish-actions.pod:2713
20686 #: ../fish/guestfish-actions.pod:2720
20687 msgid "See also: L</mountpoints>"
20691 #: ../fish/guestfish-actions.pod:2722
20696 #: ../fish/guestfish-actions.pod:2724
20704 #: ../fish/guestfish-actions.pod:2729
20705 msgid "ntfs-3g-probe"
20709 #: ../fish/guestfish-actions.pod:2731
20712 " ntfs-3g-probe true|false device\n"
20717 #: ../fish/guestfish-actions.pod:2745
20722 #: ../fish/guestfish-actions.pod:2747
20725 " ntfsresize device\n"
20730 #: ../fish/guestfish-actions.pod:2753
20731 msgid "ntfsresize-size"
20735 #: ../fish/guestfish-actions.pod:2755
20738 " ntfsresize-size device size\n"
20743 #: ../fish/guestfish-actions.pod:2757
20745 "This command is the same as L</ntfsresize> except that it allows you to "
20746 "specify the new size (in bytes) explicitly."
20750 #: ../fish/guestfish-actions.pod:2760
20755 #: ../fish/guestfish-actions.pod:2762
20758 " part-add device prlogex startsect endsect\n"
20763 #: ../fish/guestfish-actions.pod:2764
20765 "This command adds a partition to C<device>. If there is no partition table "
20766 "on the device, call L</part-init> first."
20770 #: ../fish/guestfish-actions.pod:2776
20772 "Creating a partition which covers the whole disk is not so easy. Use L</"
20773 "part-disk> to do that."
20777 #: ../fish/guestfish-actions.pod:2779
20782 #: ../fish/guestfish-actions.pod:2781
20785 " part-del device partnum\n"
20790 #: ../fish/guestfish-actions.pod:2789
20795 #: ../fish/guestfish-actions.pod:2791
20798 " part-disk device parttype\n"
20803 #: ../fish/guestfish-actions.pod:2793
20805 "This command is simply a combination of L</part-init> followed by L</part-"
20806 "add> to create a single primary partition covering the whole disk."
20810 #: ../fish/guestfish-actions.pod:2797
20812 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
20813 "possible values are described in L</part-init>."
20817 #: ../fish/guestfish-actions.pod:2803
20818 msgid "part-get-bootable"
20822 #: ../fish/guestfish-actions.pod:2805
20825 " part-get-bootable device partnum\n"
20830 #: ../fish/guestfish-actions.pod:2810
20831 msgid "See also L</part-set-bootable>."
20835 #: ../fish/guestfish-actions.pod:2812
20836 msgid "part-get-mbr-id"
20840 #: ../fish/guestfish-actions.pod:2814
20843 " part-get-mbr-id device partnum\n"
20848 #: ../fish/guestfish-actions.pod:2819 ../fish/guestfish-actions.pod:2957
20850 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
20851 "undefined results for other partition table types (see L</part-get-"
20856 #: ../fish/guestfish-actions.pod:2823
20857 msgid "part-get-parttype"
20861 #: ../fish/guestfish-actions.pod:2825
20864 " part-get-parttype device\n"
20869 #: ../fish/guestfish-actions.pod:2830
20871 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
20872 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
20873 "possible, although unusual. See L</part-init> for a full list."
20877 #: ../fish/guestfish-actions.pod:2835
20882 #: ../fish/guestfish-actions.pod:2837
20885 " part-init device parttype\n"
20890 #: ../fish/guestfish-actions.pod:2843
20892 "Initially there are no partitions. Following this, you should call L</part-"
20893 "add> for each partition required."
20897 #: ../fish/guestfish-actions.pod:2906
20902 #: ../fish/guestfish-actions.pod:2908
20905 " part-list device\n"
20910 #: ../fish/guestfish-actions.pod:2923
20912 "Start of the partition I<in bytes>. To get sectors you have to divide by "
20913 "the device's sector size, see L</blockdev-getss>."
20917 #: ../fish/guestfish-actions.pod:2936
20918 msgid "part-set-bootable"
20922 #: ../fish/guestfish-actions.pod:2938
20925 " part-set-bootable device partnum true|false\n"
20930 #: ../fish/guestfish-actions.pod:2947
20931 msgid "part-set-mbr-id"
20935 #: ../fish/guestfish-actions.pod:2949
20938 " part-set-mbr-id device partnum idbyte\n"
20943 #: ../fish/guestfish-actions.pod:2961
20944 msgid "part-set-name"
20948 #: ../fish/guestfish-actions.pod:2963
20951 " part-set-name device partnum name\n"
20956 #: ../fish/guestfish-actions.pod:2971
20957 msgid "part-to-dev"
20961 #: ../fish/guestfish-actions.pod:2973
20964 " part-to-dev partition\n"
20969 #: ../fish/guestfish-actions.pod:2979
20971 "The named partition must exist, for example as a string returned from L</"
20972 "list-partitions>."
20976 #: ../fish/guestfish-actions.pod:2982
20977 msgid "ping-daemon"
20981 #: ../fish/guestfish-actions.pod:2984
20989 #: ../fish/guestfish-actions.pod:2991
20994 #: ../fish/guestfish-actions.pod:2993
20997 " pread path count offset\n"
21002 #: ../fish/guestfish-actions.pod:3001
21003 msgid "See also L</pwrite>, L</pread-device>."
21007 #: ../fish/guestfish-actions.pod:3006
21008 msgid "pread-device"
21012 #: ../fish/guestfish-actions.pod:3008
21015 " pread-device device count offset\n"
21020 #: ../fish/guestfish-actions.pod:3016
21021 msgid "See also L</pread>."
21025 #: ../fish/guestfish-actions.pod:3021
21030 #: ../fish/guestfish-actions.pod:3023
21033 " pvcreate device\n"
21038 #: ../fish/guestfish-actions.pod:3029
21043 #: ../fish/guestfish-actions.pod:3031
21046 " pvremove device\n"
21051 #: ../fish/guestfish-actions.pod:3040
21056 #: ../fish/guestfish-actions.pod:3042
21059 " pvresize device\n"
21064 #: ../fish/guestfish-actions.pod:3047
21065 msgid "pvresize-size"
21069 #: ../fish/guestfish-actions.pod:3049
21072 " pvresize-size device size\n"
21077 #: ../fish/guestfish-actions.pod:3051
21079 "This command is the same as L</pvresize> except that it allows you to "
21080 "specify the new size (in bytes) explicitly."
21084 #: ../fish/guestfish-actions.pod:3054
21089 #: ../fish/guestfish-actions.pod:3056
21097 #: ../fish/guestfish-actions.pod:3064
21098 msgid "See also L</pvs-full>."
21102 #: ../fish/guestfish-actions.pod:3066
21107 #: ../fish/guestfish-actions.pod:3068
21115 #: ../fish/guestfish-actions.pod:3073
21120 #: ../fish/guestfish-actions.pod:3075
21128 #: ../fish/guestfish-actions.pod:3079
21133 #: ../fish/guestfish-actions.pod:3081
21136 " pwrite path content offset\n"
21141 #: ../fish/guestfish-actions.pod:3092
21142 msgid "See also L</pread>, L</pwrite-device>."
21146 #: ../fish/guestfish-actions.pod:3097
21147 msgid "pwrite-device"
21151 #: ../fish/guestfish-actions.pod:3099
21154 " pwrite-device device content offset\n"
21159 #: ../fish/guestfish-actions.pod:3109
21160 msgid "See also L</pwrite>."
21164 #: ../fish/guestfish-actions.pod:3114
21169 #: ../fish/guestfish-actions.pod:3116
21172 " read-file path\n"
21177 #: ../fish/guestfish-actions.pod:3121
21179 "Unlike L</cat>, this function can correctly handle files that contain "
21180 "embedded ASCII NUL characters. However unlike L</download>, this function "
21181 "is limited in the total size of file that can be handled."
21185 #: ../fish/guestfish-actions.pod:3129
21190 #: ../fish/guestfish-actions.pod:3131
21193 " read-lines path\n"
21198 #: ../fish/guestfish-actions.pod:3138
21200 "Note that this function cannot correctly handle binary files (specifically, "
21201 "files containing C<\\0> character which is treated as end of line). For "
21202 "those you need to use the L</read-file> function which has a more complex "
21207 #: ../fish/guestfish-actions.pod:3143
21212 #: ../fish/guestfish-actions.pod:3145
21220 #: ../fish/guestfish-actions.pod:3197
21222 "This function is primarily intended for use by programs. To get a simple "
21223 "list of names, use L</ls>. To get a printable directory for human "
21224 "consumption, use L</ll>."
21228 #: ../fish/guestfish-actions.pod:3201
21233 #: ../fish/guestfish-actions.pod:3203
21241 #: ../fish/guestfish-actions.pod:3207
21242 msgid "readlinklist"
21246 #: ../fish/guestfish-actions.pod:3209
21249 " readlinklist path 'names ...'\n"
21254 #: ../fish/guestfish-actions.pod:3233
21259 #: ../fish/guestfish-actions.pod:3235
21267 #: ../fish/guestfish-actions.pod:3240
21268 msgid "removexattr"
21272 #: ../fish/guestfish-actions.pod:3242
21275 " removexattr xattr path\n"
21280 #: ../fish/guestfish-actions.pod:3247
21281 msgid "See also: L</lremovexattr>, L<attr(5)>."
21285 #: ../fish/guestfish-actions.pod:3249
21290 #: ../fish/guestfish-actions.pod:3251
21293 " resize2fs device\n"
21298 #: ../fish/guestfish-actions.pod:3256
21300 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
21301 "before calling this command. For unknown reasons C<resize2fs> sometimes "
21302 "gives an error about this and sometimes not. In any case, it is always safe "
21303 "to call L</e2fsck-f> before calling this function."
21307 #: ../fish/guestfish-actions.pod:3262
21308 msgid "resize2fs-size"
21312 #: ../fish/guestfish-actions.pod:3264
21315 " resize2fs-size device size\n"
21320 #: ../fish/guestfish-actions.pod:3266
21322 "This command is the same as L</resize2fs> except that it allows you to "
21323 "specify the new size (in bytes) explicitly."
21327 #: ../fish/guestfish-actions.pod:3269
21332 #: ../fish/guestfish-actions.pod:3271
21340 #: ../fish/guestfish-actions.pod:3275
21345 #: ../fish/guestfish-actions.pod:3277
21353 #: ../fish/guestfish-actions.pod:3283
21358 #: ../fish/guestfish-actions.pod:3285
21366 #: ../fish/guestfish-actions.pod:3289
21367 msgid "rmmountpoint"
21371 #: ../fish/guestfish-actions.pod:3291
21374 " rmmountpoint exemptpath\n"
21379 #: ../fish/guestfish-actions.pod:3293
21381 "This calls removes a mountpoint that was previously created with L</"
21382 "mkmountpoint>. See L</mkmountpoint> for full details."
21386 #: ../fish/guestfish-actions.pod:3297
21387 msgid "scrub-device"
21391 #: ../fish/guestfish-actions.pod:3299
21394 " scrub-device device\n"
21399 #: ../fish/guestfish-actions.pod:3310
21404 #: ../fish/guestfish-actions.pod:3312
21407 " scrub-file file\n"
21412 #: ../fish/guestfish-actions.pod:3322
21413 msgid "scrub-freespace"
21417 #: ../fish/guestfish-actions.pod:3324
21420 " scrub-freespace dir\n"
21425 #: ../fish/guestfish-actions.pod:3326
21427 "This command creates the directory C<dir> and then fills it with files until "
21428 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
21429 "deletes them. The intention is to scrub any free space on the partition "
21430 "containing C<dir>."
21434 #: ../fish/guestfish-actions.pod:3335
21439 #: ../fish/guestfish-actions.pod:3337
21444 #: ../fish/guestfish-actions.pod:3339
21447 " set-append append\n"
21452 #: ../fish/guestfish-actions.pod:3350
21453 msgid "set-autosync"
21457 #: ../fish/guestfish-actions.pod:3352
21462 #: ../fish/guestfish-actions.pod:3354
21465 " set-autosync true|false\n"
21470 #: ../fish/guestfish-actions.pod:3356
21472 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
21473 "effort attempt to run L</umount-all> followed by L</sync> when the handle is "
21474 "closed (also if the program exits without closing handles)."
21478 #: ../fish/guestfish-actions.pod:3364
21483 #: ../fish/guestfish-actions.pod:3366
21488 #: ../fish/guestfish-actions.pod:3368
21491 " set-direct true|false\n"
21496 #: ../fish/guestfish-actions.pod:3374
21498 "One consequence of this is that log messages aren't caught by the library "
21499 "and handled by L</set-log-message-callback>, but go straight to stdout."
21503 #: ../fish/guestfish-actions.pod:3383
21504 msgid "set-e2label"
21508 #: ../fish/guestfish-actions.pod:3385
21511 " set-e2label device label\n"
21516 #: ../fish/guestfish-actions.pod:3391
21518 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
21519 "label on a filesystem."
21523 #: ../fish/guestfish-actions.pod:3394
21528 #: ../fish/guestfish-actions.pod:3396
21531 " set-e2uuid device uuid\n"
21536 #: ../fish/guestfish-actions.pod:3403
21538 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
21539 "UUID of a filesystem."
21543 #: ../fish/guestfish-actions.pod:3406
21544 msgid "set-memsize"
21548 #: ../fish/guestfish-actions.pod:3408
21553 #: ../fish/guestfish-actions.pod:3410
21556 " set-memsize memsize\n"
21561 #: ../fish/guestfish-actions.pod:3412
21563 "This sets the memory size in megabytes allocated to the qemu subprocess. "
21564 "This only has any effect if called before L</launch>."
21568 #: ../fish/guestfish-actions.pod:3423
21569 msgid "set-network"
21573 #: ../fish/guestfish-actions.pod:3425
21578 #: ../fish/guestfish-actions.pod:3427
21581 " set-network true|false\n"
21586 #: ../fish/guestfish-actions.pod:3435
21588 "You must call this before calling L</launch>, otherwise it has no effect."
21592 #: ../fish/guestfish-actions.pod:3438
21597 #: ../fish/guestfish-actions.pod:3440
21602 #: ../fish/guestfish-actions.pod:3442
21605 " set-path searchpath\n"
21610 #: ../fish/guestfish-actions.pod:3451
21615 #: ../fish/guestfish-actions.pod:3453
21620 #: ../fish/guestfish-actions.pod:3455
21628 #: ../fish/guestfish-actions.pod:3475
21629 msgid "set-recovery-proc"
21633 #: ../fish/guestfish-actions.pod:3477
21634 msgid "recovery-proc"
21638 #: ../fish/guestfish-actions.pod:3479
21641 " set-recovery-proc true|false\n"
21646 #: ../fish/guestfish-actions.pod:3481
21648 "If this is called with the parameter C<false> then L</launch> does not "
21649 "create a recovery process. The purpose of the recovery process is to stop "
21650 "runaway qemu processes in the case where the main program aborts abruptly."
21654 #: ../fish/guestfish-actions.pod:3486
21656 "This only has any effect if called before L</launch>, and the default is "
21661 #: ../fish/guestfish-actions.pod:3495
21662 msgid "set-selinux"
21666 #: ../fish/guestfish-actions.pod:3497
21671 #: ../fish/guestfish-actions.pod:3499
21674 " set-selinux true|false\n"
21679 #: ../fish/guestfish-actions.pod:3510
21684 #: ../fish/guestfish-actions.pod:3512
21689 #: ../fish/guestfish-actions.pod:3514
21692 " set-trace true|false\n"
21697 #: ../fish/guestfish-actions.pod:3530
21698 msgid "set-verbose"
21702 #: ../fish/guestfish-actions.pod:3532
21707 #: ../fish/guestfish-actions.pod:3534
21710 " set-verbose true|false\n"
21715 #: ../fish/guestfish-actions.pod:3541
21720 #: ../fish/guestfish-actions.pod:3543
21723 " setcon context\n"
21728 #: ../fish/guestfish-actions.pod:3550
21733 #: ../fish/guestfish-actions.pod:3552
21736 " setxattr xattr val vallen path\n"
21741 #: ../fish/guestfish-actions.pod:3558
21742 msgid "See also: L</lsetxattr>, L<attr(5)>."
21746 #: ../fish/guestfish-actions.pod:3560
21751 #: ../fish/guestfish-actions.pod:3562
21754 " sfdisk device cyls heads sectors 'lines ...'\n"
21759 #: ../fish/guestfish-actions.pod:3584
21760 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
21764 #: ../fish/guestfish-actions.pod:3590
21769 #: ../fish/guestfish-actions.pod:3592
21772 " sfdiskM device 'lines ...'\n"
21777 #: ../fish/guestfish-actions.pod:3594
21779 "This is a simplified interface to the L</sfdisk> command, where partition "
21780 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
21781 "you don't need to specify the cyls, heads and sectors parameters which were "
21782 "rarely if ever used anyway."
21786 #: ../fish/guestfish-actions.pod:3600
21787 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
21791 #: ../fish/guestfish-actions.pod:3606
21796 #: ../fish/guestfish-actions.pod:3608
21799 " sfdisk-N device partnum cyls heads sectors line\n"
21804 #: ../fish/guestfish-actions.pod:3613
21806 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
21807 "cyls/heads/sectors parameters."
21811 #: ../fish/guestfish-actions.pod:3616
21812 msgid "See also: L</part-add>"
21816 #: ../fish/guestfish-actions.pod:3621
21817 msgid "sfdisk-disk-geometry"
21821 #: ../fish/guestfish-actions.pod:3623
21824 " sfdisk-disk-geometry device\n"
21829 #: ../fish/guestfish-actions.pod:3625
21831 "This displays the disk geometry of C<device> read from the partition table. "
21832 "Especially in the case where the underlying block device has been resized, "
21833 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
21834 "kernel-geometry>)."
21838 #: ../fish/guestfish-actions.pod:3633
21839 msgid "sfdisk-kernel-geometry"
21843 #: ../fish/guestfish-actions.pod:3635
21846 " sfdisk-kernel-geometry device\n"
21851 #: ../fish/guestfish-actions.pod:3642
21856 #: ../fish/guestfish-actions.pod:3644
21859 " sfdisk-l device\n"
21864 #: ../fish/guestfish-actions.pod:3650
21865 msgid "See also: L</part-list>"
21869 #: ../fish/guestfish-actions.pod:3652
21874 #: ../fish/guestfish-actions.pod:3654
21882 #: ../fish/guestfish-actions.pod:3659
21883 msgid "This is like L</command>, but passes the command to:"
21887 #: ../fish/guestfish-actions.pod:3667
21888 msgid "All the provisos about L</command> apply to this call."
21892 #: ../fish/guestfish-actions.pod:3669
21897 #: ../fish/guestfish-actions.pod:3671
21900 " sh-lines command\n"
21905 #: ../fish/guestfish-actions.pod:3673
21906 msgid "This is the same as L</sh>, but splits the result into a list of lines."
21910 #: ../fish/guestfish-actions.pod:3676
21911 msgid "See also: L</command-lines>"
21915 #: ../fish/guestfish-actions.pod:3678
21920 #: ../fish/guestfish-actions.pod:3680
21928 #: ../fish/guestfish-actions.pod:3684
21933 #: ../fish/guestfish-actions.pod:3686
21941 #: ../fish/guestfish-actions.pod:3692
21946 #: ../fish/guestfish-actions.pod:3694
21954 #: ../fish/guestfish-actions.pod:3702
21959 #: ../fish/guestfish-actions.pod:3704
21967 #: ../fish/guestfish-actions.pod:3712
21972 #: ../fish/guestfish-actions.pod:3714
21975 " strings-e encoding path\n"
21980 #: ../fish/guestfish-actions.pod:3716
21982 "This is like the L</strings> command, but allows you to specify the encoding "
21983 "of strings that are looked for in the source file C<path>."
21987 #: ../fish/guestfish-actions.pod:3726
21989 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
21990 "ISO-8859-X (this is what L</strings> uses)."
21994 #: ../fish/guestfish-actions.pod:3758
21995 msgid "swapoff-device"
21999 #: ../fish/guestfish-actions.pod:3760
22002 " swapoff-device device\n"
22007 #: ../fish/guestfish-actions.pod:3762
22009 "This command disables the libguestfs appliance swap device or partition "
22010 "named C<device>. See L</swapon-device>."
22014 #: ../fish/guestfish-actions.pod:3766
22015 msgid "swapoff-file"
22019 #: ../fish/guestfish-actions.pod:3768
22022 " swapoff-file file\n"
22027 #: ../fish/guestfish-actions.pod:3772
22028 msgid "swapoff-label"
22032 #: ../fish/guestfish-actions.pod:3774
22035 " swapoff-label label\n"
22040 #: ../fish/guestfish-actions.pod:3779
22041 msgid "swapoff-uuid"
22045 #: ../fish/guestfish-actions.pod:3781
22048 " swapoff-uuid uuid\n"
22053 #: ../fish/guestfish-actions.pod:3786
22054 msgid "swapon-device"
22058 #: ../fish/guestfish-actions.pod:3788
22061 " swapon-device device\n"
22066 #: ../fish/guestfish-actions.pod:3790
22068 "This command enables the libguestfs appliance to use the swap device or "
22069 "partition named C<device>. The increased memory is made available for all "
22070 "commands, for example those run using L</command> or L</sh>."
22074 #: ../fish/guestfish-actions.pod:3802
22075 msgid "swapon-file"
22079 #: ../fish/guestfish-actions.pod:3804
22082 " swapon-file file\n"
22087 #: ../fish/guestfish-actions.pod:3806
22089 "This command enables swap to a file. See L</swapon-device> for other notes."
22093 #: ../fish/guestfish-actions.pod:3809
22094 msgid "swapon-label"
22098 #: ../fish/guestfish-actions.pod:3811
22101 " swapon-label label\n"
22106 #: ../fish/guestfish-actions.pod:3813
22108 "This command enables swap to a labeled swap partition. See L</swapon-"
22109 "device> for other notes."
22113 #: ../fish/guestfish-actions.pod:3816
22114 msgid "swapon-uuid"
22118 #: ../fish/guestfish-actions.pod:3818
22121 " swapon-uuid uuid\n"
22126 #: ../fish/guestfish-actions.pod:3820
22128 "This command enables swap to a swap partition with the given UUID. See L</"
22129 "swapon-device> for other notes."
22133 #: ../fish/guestfish-actions.pod:3823
22138 #: ../fish/guestfish-actions.pod:3825
22146 #: ../fish/guestfish-actions.pod:3833
22151 #: ../fish/guestfish-actions.pod:3835
22159 #: ../fish/guestfish-actions.pod:3843
22164 #: ../fish/guestfish-actions.pod:3845
22167 " tail-n nrlines path\n"
22172 #: ../fish/guestfish-actions.pod:3858
22177 #: ../fish/guestfish-actions.pod:3860
22180 " tar-in (tarfile|-) directory\n"
22185 #: ../fish/guestfish-actions.pod:3865
22186 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
22190 #: ../fish/guestfish-actions.pod:3870
22195 #: ../fish/guestfish-actions.pod:3872
22198 " tar-out directory (tarfile|-)\n"
22203 #: ../fish/guestfish-actions.pod:3877
22204 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
22208 #: ../fish/guestfish-actions.pod:3882
22213 #: ../fish/guestfish-actions.pod:3884
22216 " tgz-in (tarball|-) directory\n"
22221 #: ../fish/guestfish-actions.pod:3889
22222 msgid "To upload an uncompressed tarball, use L</tar-in>."
22226 #: ../fish/guestfish-actions.pod:3893
22231 #: ../fish/guestfish-actions.pod:3895
22234 " tgz-out directory (tarball|-)\n"
22239 #: ../fish/guestfish-actions.pod:3900
22240 msgid "To download an uncompressed tarball, use L</tar-out>."
22244 #: ../fish/guestfish-actions.pod:3904
22249 #: ../fish/guestfish-actions.pod:3906
22257 #: ../fish/guestfish-actions.pod:3915
22262 #: ../fish/guestfish-actions.pod:3917
22270 #: ../fish/guestfish-actions.pod:3922
22271 msgid "truncate-size"
22275 #: ../fish/guestfish-actions.pod:3924
22278 " truncate-size path size\n"
22283 #: ../fish/guestfish-actions.pod:3929
22285 "If the current file size is less than C<size> then the file is extended to "
22286 "the required size with zero bytes. This creates a sparse file (ie. disk "
22287 "blocks are not allocated for the file until you write to it). To create a "
22288 "non-sparse file of zeroes, use L</fallocate64> instead."
22292 #: ../fish/guestfish-actions.pod:3935
22297 #: ../fish/guestfish-actions.pod:3937
22300 " tune2fs-l device\n"
22305 #: ../fish/guestfish-actions.pod:3947
22310 #: ../fish/guestfish-actions.pod:3949
22313 " txz-in (tarball|-) directory\n"
22318 #: ../fish/guestfish-actions.pod:3956
22323 #: ../fish/guestfish-actions.pod:3958
22326 " txz-out directory (tarball|-)\n"
22331 #: ../fish/guestfish-actions.pod:3965
22336 #: ../fish/guestfish-actions.pod:3967
22344 #: ../fish/guestfish-actions.pod:3981
22345 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
22349 #: ../fish/guestfish-actions.pod:3986
22354 #: ../fish/guestfish-actions.pod:3988
22359 #: ../fish/guestfish-actions.pod:3990
22362 " umount pathordevice\n"
22367 #: ../fish/guestfish-actions.pod:3996
22372 #: ../fish/guestfish-actions.pod:3998
22373 msgid "unmount-all"
22377 #: ../fish/guestfish-actions.pod:4000
22385 #: ../fish/guestfish-actions.pod:4006
22390 #: ../fish/guestfish-actions.pod:4008
22393 " upload (filename|-) remotefilename\n"
22398 #: ../fish/guestfish-actions.pod:4015
22399 msgid "See also L</download>."
22403 #: ../fish/guestfish-actions.pod:4019
22404 msgid "upload-offset"
22408 #: ../fish/guestfish-actions.pod:4021
22411 " upload-offset (filename|-) remotefilename offset\n"
22416 #: ../fish/guestfish-actions.pod:4033
22418 "Note that there is no limit on the amount of data that can be uploaded with "
22419 "this call, unlike with L</pwrite>, and this call always writes the full "
22420 "amount unless an error occurs."
22424 #: ../fish/guestfish-actions.pod:4038
22425 msgid "See also L</upload>, L</pwrite>."
22429 #: ../fish/guestfish-actions.pod:4042
22434 #: ../fish/guestfish-actions.pod:4044
22437 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
22442 #: ../fish/guestfish-actions.pod:4063
22447 #: ../fish/guestfish-actions.pod:4065
22455 #: ../fish/guestfish-actions.pod:4092
22457 "I<Note:> Don't use this call to test for availability of features. In "
22458 "enterprise distributions we backport features from later versions into "
22459 "earlier versions, making this an unreliable way to test for features. Use "
22460 "L</available> instead."
22464 #: ../fish/guestfish-actions.pod:4098
22469 #: ../fish/guestfish-actions.pod:4100
22472 " vfs-label device\n"
22477 #: ../fish/guestfish-actions.pod:4107
22478 msgid "To find a filesystem from the label, use L</findfs-label>."
22482 #: ../fish/guestfish-actions.pod:4109
22487 #: ../fish/guestfish-actions.pod:4111
22490 " vfs-type device\n"
22495 #: ../fish/guestfish-actions.pod:4121
22500 #: ../fish/guestfish-actions.pod:4123
22503 " vfs-uuid device\n"
22508 #: ../fish/guestfish-actions.pod:4130
22509 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
22513 #: ../fish/guestfish-actions.pod:4132
22514 msgid "vg-activate"
22518 #: ../fish/guestfish-actions.pod:4134
22521 " vg-activate true|false 'volgroups ...'\n"
22526 #: ../fish/guestfish-actions.pod:4147
22527 msgid "vg-activate-all"
22531 #: ../fish/guestfish-actions.pod:4149
22534 " vg-activate-all true|false\n"
22539 #: ../fish/guestfish-actions.pod:4159
22544 #: ../fish/guestfish-actions.pod:4161
22547 " vgcreate volgroup 'physvols ...'\n"
22552 #: ../fish/guestfish-actions.pod:4166
22557 #: ../fish/guestfish-actions.pod:4168
22560 " vglvuuids vgname\n"
22565 #: ../fish/guestfish-actions.pod:4173
22567 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
22568 "logical volumes and volume groups."
22572 #: ../fish/guestfish-actions.pod:4176
22573 msgid "See also L</vgpvuuids>."
22577 #: ../fish/guestfish-actions.pod:4178
22582 #: ../fish/guestfish-actions.pod:4180
22585 " vgpvuuids vgname\n"
22590 #: ../fish/guestfish-actions.pod:4185
22592 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
22593 "physical volumes and volume groups."
22597 #: ../fish/guestfish-actions.pod:4188
22598 msgid "See also L</vglvuuids>."
22602 #: ../fish/guestfish-actions.pod:4190
22607 #: ../fish/guestfish-actions.pod:4192
22610 " vgremove vgname\n"
22615 #: ../fish/guestfish-actions.pod:4199
22620 #: ../fish/guestfish-actions.pod:4201
22623 " vgrename volgroup newvolgroup\n"
22628 #: ../fish/guestfish-actions.pod:4205
22633 #: ../fish/guestfish-actions.pod:4207
22641 #: ../fish/guestfish-actions.pod:4215
22642 msgid "See also L</vgs-full>."
22646 #: ../fish/guestfish-actions.pod:4217
22651 #: ../fish/guestfish-actions.pod:4219
22659 #: ../fish/guestfish-actions.pod:4224
22664 #: ../fish/guestfish-actions.pod:4226
22672 #: ../fish/guestfish-actions.pod:4231
22677 #: ../fish/guestfish-actions.pod:4233
22685 #: ../fish/guestfish-actions.pod:4237
22690 #: ../fish/guestfish-actions.pod:4239
22698 #: ../fish/guestfish-actions.pod:4244
22703 #: ../fish/guestfish-actions.pod:4246
22711 #: ../fish/guestfish-actions.pod:4251
22716 #: ../fish/guestfish-actions.pod:4253
22724 #: ../fish/guestfish-actions.pod:4258
22729 #: ../fish/guestfish-actions.pod:4260
22732 " write path content\n"
22737 #: ../fish/guestfish-actions.pod:4268
22742 #: ../fish/guestfish-actions.pod:4270
22745 " write-file path content size\n"
22750 #: ../fish/guestfish-actions.pod:4293
22755 #: ../fish/guestfish-actions.pod:4295
22758 " zegrep regex path\n"
22763 #: ../fish/guestfish-actions.pod:4303
22768 #: ../fish/guestfish-actions.pod:4305
22771 " zegrepi regex path\n"
22776 #: ../fish/guestfish-actions.pod:4313
22781 #: ../fish/guestfish-actions.pod:4315
22789 #: ../fish/guestfish-actions.pod:4323
22790 msgid "See also: L</zero-device>, L</scrub-device>."
22794 #: ../fish/guestfish-actions.pod:4325
22795 msgid "zero-device"
22799 #: ../fish/guestfish-actions.pod:4327
22802 " zero-device device\n"
22807 #: ../fish/guestfish-actions.pod:4329
22809 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
22810 "which just zeroes the first few blocks of a device."
22814 #: ../fish/guestfish-actions.pod:4336
22819 #: ../fish/guestfish-actions.pod:4338
22822 " zerofree device\n"
22827 #: ../fish/guestfish-actions.pod:4351
22832 #: ../fish/guestfish-actions.pod:4353
22835 " zfgrep pattern path\n"
22840 #: ../fish/guestfish-actions.pod:4361
22845 #: ../fish/guestfish-actions.pod:4363
22848 " zfgrepi pattern path\n"
22853 #: ../fish/guestfish-actions.pod:4371
22858 #: ../fish/guestfish-actions.pod:4373
22861 " zfile meth path\n"
22866 #: ../fish/guestfish-actions.pod:4380
22868 "Since 1.0.63, use L</file> instead which can now process compressed files."
22872 #: ../fish/guestfish-actions.pod:4390
22877 #: ../fish/guestfish-actions.pod:4392
22880 " zgrep regex path\n"
22885 #: ../fish/guestfish-actions.pod:4400
22890 #: ../fish/guestfish-actions.pod:4402
22893 " zgrepi regex path\n"
22898 #: ../fish/guestfish-commands.pod:1
22903 #: ../fish/guestfish-commands.pod:3
22908 #: ../fish/guestfish-commands.pod:5
22911 " alloc filename size\n"
22916 #: ../fish/guestfish-commands.pod:7
22918 "This creates an empty (zeroed) file of the given size, and then adds so it "
22919 "can be further examined."
22923 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
22924 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
22928 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
22929 msgid "Size can be specified using standard suffixes, eg. C<1M>."
22933 #: ../fish/guestfish-commands.pod:14
22935 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
22936 "image, see L</PREPARED DISK IMAGES>."
22940 #: ../fish/guestfish-commands.pod:17
22945 #: ../fish/guestfish-commands.pod:19
22948 " copy-in local [local ...] /remotedir\n"
22953 #: ../fish/guestfish-commands.pod:21
22955 "C<copy-in> copies local files or directories recursively into the disk "
22956 "image, placing them in the directory called C</remotedir> (which must "
22957 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
22958 "other commands as necessary."
22962 #: ../fish/guestfish-commands.pod:26
22964 "Multiple local files and directories can be specified, but the last "
22965 "parameter must always be a remote directory. Wildcards cannot be used."
22969 #: ../fish/guestfish-commands.pod:30
22974 #: ../fish/guestfish-commands.pod:32
22977 " copy-out remote [remote ...] localdir\n"
22982 #: ../fish/guestfish-commands.pod:34
22984 "C<copy-out> copies remote files or directories recursively out of the disk "
22985 "image, placing them on the host disk in a local directory called C<localdir> "
22986 "(which must exist). This guestfish meta-command turns into a sequence of L</"
22987 "download>, L</tar-out> and other commands as necessary."
22991 #: ../fish/guestfish-commands.pod:40
22993 "Multiple remote files and directories can be specified, but the last "
22994 "parameter must always be a local directory. To download to the current "
22995 "directory, use C<.> as in:"
22999 #: ../fish/guestfish-commands.pod:44
23002 " copy-out /home .\n"
23007 #: ../fish/guestfish-commands.pod:46
23009 "Wildcards cannot be used in the ordinary command, but you can use them with "
23010 "the help of L</glob> like this:"
23014 #: ../fish/guestfish-commands.pod:49
23017 " glob copy-out /home/* .\n"
23022 #: ../fish/guestfish-commands.pod:51
23027 #: ../fish/guestfish-commands.pod:53
23030 " echo [params ...]\n"
23035 #: ../fish/guestfish-commands.pod:55
23036 msgid "This echos the parameters to the terminal."
23040 #: ../fish/guestfish-commands.pod:57
23045 #: ../fish/guestfish-commands.pod:59
23050 #: ../fish/guestfish-commands.pod:61
23055 #: ../fish/guestfish-commands.pod:63
23063 #: ../fish/guestfish-commands.pod:65
23065 "This is used to edit a file. It downloads the file, edits it locally using "
23066 "your editor, then uploads the result."
23070 #: ../fish/guestfish-commands.pod:68
23072 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
23073 "or C<emacs> you will get those corresponding editors."
23077 #: ../fish/guestfish-commands.pod:72
23082 #: ../fish/guestfish-commands.pod:74
23085 " glob command args...\n"
23090 #: ../fish/guestfish-commands.pod:76
23092 "Expand wildcards in any paths in the args list, and run C<command> "
23093 "repeatedly on each matching path."
23097 #: ../fish/guestfish-commands.pod:79
23098 msgid "See L</WILDCARDS AND GLOBBING>."
23102 #: ../fish/guestfish-commands.pod:81
23107 #: ../fish/guestfish-commands.pod:83
23110 " hexedit <filename|device>\n"
23111 " hexedit <filename|device> <max>\n"
23112 " hexedit <filename|device> <start> <max>\n"
23117 #: ../fish/guestfish-commands.pod:87
23119 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
23124 #: ../fish/guestfish-commands.pod:90
23126 "This command works by downloading potentially the whole file or device, "
23127 "editing it locally, then uploading it. If the file or device is large, you "
23128 "have to specify which part you wish to edit by using C<max> and/or C<start> "
23129 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
23130 "usual modifiers allowed such as C<1M> (1 megabyte)."
23134 #: ../fish/guestfish-commands.pod:97
23135 msgid "For example to edit the first few sectors of a disk you might do:"
23139 #: ../fish/guestfish-commands.pod:100
23142 " hexedit /dev/sda 1M\n"
23147 #: ../fish/guestfish-commands.pod:102
23149 "which would allow you to edit anywhere within the first megabyte of the disk."
23153 #: ../fish/guestfish-commands.pod:105
23154 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
23158 #: ../fish/guestfish-commands.pod:107
23161 " hexedit /dev/sda1 0x400 0x400\n"
23166 #: ../fish/guestfish-commands.pod:109
23167 msgid "(assuming the superblock is in the standard location)."
23171 #: ../fish/guestfish-commands.pod:111
23173 "This command requires the external L<hexedit(1)> program. You can specify "
23174 "another program to use by setting the C<HEXEDITOR> environment variable."
23178 #: ../fish/guestfish-commands.pod:115
23179 msgid "See also L</hexdump>."
23183 #: ../fish/guestfish-commands.pod:117
23188 #: ../fish/guestfish-commands.pod:119
23196 #: ../fish/guestfish-commands.pod:121
23198 "Change the local directory, ie. the current directory of guestfish itself."
23202 #: ../fish/guestfish-commands.pod:124
23203 msgid "Note that C<!cd> won't do what you might expect."
23207 #: ../fish/guestfish-commands.pod:126
23212 #: ../fish/guestfish-commands.pod:128
23217 #: ../fish/guestfish-commands.pod:130
23225 #: ../fish/guestfish-commands.pod:132
23226 msgid "Opens the manual page for guestfish."
23230 #: ../fish/guestfish-commands.pod:134
23235 #: ../fish/guestfish-commands.pod:136
23240 #: ../fish/guestfish-commands.pod:138
23248 #: ../fish/guestfish-commands.pod:140
23256 #: ../fish/guestfish-commands.pod:142
23257 msgid "This is used to view a file."
23261 #: ../fish/guestfish-commands.pod:144
23263 "The default viewer is C<$PAGER>. However if you use the alternate command "
23264 "C<less> you will get the C<less> command specifically."
23268 #: ../fish/guestfish-commands.pod:147
23273 #: ../fish/guestfish-commands.pod:149
23281 #: ../fish/guestfish-commands.pod:151
23283 "Close and reopen the libguestfs handle. It is not necessary to use this "
23284 "normally, because the handle is closed properly when guestfish exits. "
23285 "However this is occasionally useful for testing."
23289 #: ../fish/guestfish-commands.pod:155
23294 #: ../fish/guestfish-commands.pod:157
23297 " sparse filename size\n"
23302 #: ../fish/guestfish-commands.pod:159
23304 "This creates an empty sparse file of the given size, and then adds so it can "
23305 "be further examined."
23309 #: ../fish/guestfish-commands.pod:162
23311 "In all respects it works the same as the L</alloc> command, except that the "
23312 "image file is allocated sparsely, which means that disk blocks are not "
23313 "assigned to the file until they are needed. Sparse disk files only use "
23314 "space when written to, but they are slower and there is a danger you could "
23315 "run out of real disk space during a write operation."
23319 #: ../fish/guestfish-commands.pod:172
23324 #: ../fish/guestfish-commands.pod:174
23332 #: ../fish/guestfish-commands.pod:176
23334 "This command returns a list of the optional groups known to the daemon, and "
23335 "indicates which ones are supported by this build of the libguestfs appliance."
23339 #: ../fish/guestfish-commands.pod:180
23340 msgid "See also L<guestfs(3)/AVAILABILITY>."
23344 #: ../fish/guestfish-commands.pod:182
23349 #: ../fish/guestfish-commands.pod:184
23352 " time command args...\n"
23357 #: ../fish/guestfish-commands.pod:186
23359 "Run the command as usual, but print the elapsed time afterwards. This can "
23360 "be useful for benchmarking operations."
23364 #: ../test-tool/libguestfs-test-tool.pod:5
23365 msgid "libguestfs-test-tool - End user tests for libguestfs"
23369 #: ../test-tool/libguestfs-test-tool.pod:9
23372 " libguestfs-test-tool [--options]\n"
23377 #: ../test-tool/libguestfs-test-tool.pod:13
23379 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
23380 "and developers, to allow them to check basic libguestfs functionality is "
23381 "working. This is needed because libguestfs occasionally breaks for reasons "
23382 "beyond our control: usually because of changes in the underlying qemu or "
23383 "kernel packages, or the host environment."
23387 #: ../test-tool/libguestfs-test-tool.pod:20
23388 msgid "If you suspect a problem in libguestfs, then just run:"
23392 #: ../test-tool/libguestfs-test-tool.pod:22
23395 " libguestfs-test-tool\n"
23400 #: ../test-tool/libguestfs-test-tool.pod:24
23401 msgid "It will print lots of diagnostic messages."
23405 #: ../test-tool/libguestfs-test-tool.pod:26
23406 msgid "If it runs to completion successfully, you will see this near the end:"
23410 #: ../test-tool/libguestfs-test-tool.pod:28
23413 " ===== TEST FINISHED OK =====\n"
23418 #: ../test-tool/libguestfs-test-tool.pod:30
23419 msgid "and the test tool will exit with code 0."
23423 #: ../test-tool/libguestfs-test-tool.pod:32
23425 "If it fails (and/or exits with non-zero error code), please paste the "
23426 "B<complete, unedited> output of the test tool into a bug report. More "
23427 "information about reporting bugs can be found on the L<http://libguestfs.org/"
23432 #: ../test-tool/libguestfs-test-tool.pod:41
23437 #: ../test-tool/libguestfs-test-tool.pod:43
23438 msgid "Display short usage information and exit."
23442 #: ../test-tool/libguestfs-test-tool.pod:45
23443 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
23447 #: ../test-tool/libguestfs-test-tool.pod:47
23449 "Pass an alternate name for the helper program. libguestfs-test-tool will "
23450 "normally look in the C<$libexec> directory that was configured when the tool "
23455 #: ../test-tool/libguestfs-test-tool.pod:51
23456 msgid "I<--qemu qemu_binary>"
23460 #: ../test-tool/libguestfs-test-tool.pod:53
23462 "If you have downloaded another qemu binary, point this option at the full "
23463 "path of the binary to try it."
23467 #: ../test-tool/libguestfs-test-tool.pod:56
23468 msgid "I<--qemudir qemu_source_dir>"
23472 #: ../test-tool/libguestfs-test-tool.pod:58
23474 "If you have compiled qemu from source, point this option at the source "
23475 "directory to try it."
23479 #: ../test-tool/libguestfs-test-tool.pod:61
23480 msgid "I<--timeout N>"
23484 #: ../test-tool/libguestfs-test-tool.pod:63
23486 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
23487 "does not usually need to be adjusted unless your machine is very slow."
23491 #: ../test-tool/libguestfs-test-tool.pod:69
23492 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
23496 #: ../test-tool/libguestfs-test-tool.pod:71
23498 "If you have compiled another version of qemu from source and would like to "
23499 "try that, then you can use the I<--qemudir> option to point to the qemu "
23500 "source directory."
23504 #: ../test-tool/libguestfs-test-tool.pod:75
23506 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
23507 "option to point to the binary."
23511 #: ../test-tool/libguestfs-test-tool.pod:78
23513 "When using an alternate qemu with libguestfs, usually you would need to "
23514 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in L<guestfs(3)"
23515 ">). libguestfs-test-tool writes a temporary qemu wrapper script when you "
23516 "use either of the I<--qemudir> or I<--qemu> options."
23520 #: ../test-tool/libguestfs-test-tool.pod:85
23522 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
23523 "I<1> if there was an error."
23527 #: ../test-tool/libguestfs-test-tool.pod:92
23528 msgid "/usr/libexec/libguestfs-test-tool-helper"
23532 #: ../test-tool/libguestfs-test-tool.pod:94
23534 "This helper program is run inside the appliance and provides additional "
23539 #: ../test-tool/libguestfs-test-tool.pod:97
23540 msgid "/usr/bin/mkisofs"
23544 #: ../test-tool/libguestfs-test-tool.pod:99
23546 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
23547 "which is used as part of the tests."
23551 #: ../test-tool/libguestfs-test-tool.pod:106
23553 "For the full list of environment variables which may affect libguestfs, "
23554 "please see the L<guestfs(3)> manual page."
23558 #: ../test-tool/libguestfs-test-tool.pod:111
23559 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
23563 #: ../test-tool/libguestfs-test-tool.pod:121 ../fuse/guestmount.pod:195
23564 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
23568 #: ../fuse/guestmount.pod:5
23570 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
23574 #: ../fuse/guestmount.pod:9
23577 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
23582 #: ../fuse/guestmount.pod:13
23584 "You must I<not> use C<guestmount> in read-write mode on live virtual "
23585 "machines. If you do this, you risk disk corruption in the VM."
23589 #: ../fuse/guestmount.pod:18
23591 "The guestmount program can be used to mount virtual machine filesystems and "
23592 "other disk images on the host. It uses libguestfs for access to the guest "
23593 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
23594 "a mountable device."
23598 #: ../fuse/guestmount.pod:23
23600 "Along with other options, you have to give at least one device (I<-a> "
23601 "option) and at least one mountpoint (I<-m> option). How this works is "
23602 "better explained in the L<guestfish(1)> manual page, or you can use L<virt-"
23603 "inspector(1)> and/or the wrapper script C<guestmount-wrapper> to help you."
23607 #: ../fuse/guestmount.pod:29
23609 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
23610 "by you, and the filesystem will not be visible to any other users unless you "
23611 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
23612 "the filesystem, use the C<fusermount -u> command."
23616 #: ../fuse/guestmount.pod:37
23618 "For a typical Windows guest which has its main filesystem on the first "
23623 #: ../fuse/guestmount.pod:40
23626 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
23631 #: ../fuse/guestmount.pod:42
23633 "For a typical Linux guest which has a /boot filesystem on the first "
23634 "partition, and the root filesystem on a logical volume:"
23638 #: ../fuse/guestmount.pod:45
23641 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
23646 #: ../fuse/guestmount.pod:47
23648 "To get L<virt-inspector(1)> to do the hard work of detecting guest "
23649 "mountpoints for you:"
23653 #: ../fuse/guestmount.pod:50
23656 " guestmount $(virt-inspector --ro-fish MyGuest) /mnt\n"
23661 #: ../fuse/guestmount.pod:52
23663 "(or use --fish if you don't want it to be a read only mount). The option is "
23664 "called I<--ro-fish> or I<--fish> because these parameters are compatible "
23665 "with L<guestfish(1)>."
23669 #: ../fuse/guestmount.pod:56
23671 "If you don't know what filesystems are contained in a guest or disk image, "
23672 "use L<virt-list-filesystems(1)> first:"
23676 #: ../fuse/guestmount.pod:59
23679 " virt-list-filesystems MyGuest\n"
23684 #: ../fuse/guestmount.pod:61
23686 "If you want to trace the libguestfs calls but without excessive debugging, "
23691 #: ../fuse/guestmount.pod:64
23694 " guestmount [-a ... -m ...] --trace /mnt\n"
23699 #: ../fuse/guestmount.pod:66
23700 msgid "If you want to debug the program, we recommend:"
23704 #: ../fuse/guestmount.pod:68
23707 " guestmount [-a ... -m ...] --trace --verbose /mnt\n"
23712 #: ../fuse/guestmount.pod:76
23713 msgid "Add a block device or virtual machine image."
23717 #: ../fuse/guestmount.pod:78
23718 msgid "B<--dir-cache-timeout N>"
23722 #: ../fuse/guestmount.pod:80
23724 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
23725 "seconds. The readdir cache [actually, there are several semi-independent "
23726 "caches] is populated after a readdir(2) call with the stat and extended "
23727 "attributes of the files in the directory, in anticipation that they will be "
23728 "requested soon after."
23732 #: ../fuse/guestmount.pod:86
23734 "There is also a different attribute cache implemented by FUSE (see the FUSE "
23735 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
23736 "requests, only cache existing ones."
23740 #: ../fuse/guestmount.pod:90
23741 msgid "B<--fuse-help>"
23745 #: ../fuse/guestmount.pod:92
23746 msgid "Display help on special FUSE options (see I<-o> below)."
23750 #: ../fuse/guestmount.pod:96
23751 msgid "Display brief help and exit."
23755 #: ../fuse/guestmount.pod:98
23756 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
23760 #: ../fuse/guestmount.pod:100
23762 "Mount the named partition or logical volume on the given mountpoint B<in the "
23763 "guest> (this has nothing to do with mountpoints in the host)."
23767 #: ../fuse/guestmount.pod:103
23769 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
23770 "something on C</>."
23774 #: ../fuse/guestmount.pod:108
23776 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
23777 "unmounted. If you specify this option, then we don't attempt to sync the "
23778 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
23782 #: ../fuse/guestmount.pod:113
23783 msgid "B<-o option> | B<--option option>"
23787 #: ../fuse/guestmount.pod:115
23788 msgid "Pass extra options to FUSE."
23792 #: ../fuse/guestmount.pod:117
23794 "To get a list of all the extra options supported by FUSE, use the command "
23795 "below. Note that only the FUSE I<-o> options can be passed, and only some "
23796 "of them are a good idea."
23800 #: ../fuse/guestmount.pod:121
23803 " guestmount --fuse-help\n"
23808 #: ../fuse/guestmount.pod:123
23809 msgid "Some potentially useful FUSE options:"
23813 #: ../fuse/guestmount.pod:127
23814 msgid "B<-o allow_other>"
23818 #: ../fuse/guestmount.pod:129
23819 msgid "Allow other users to see the filesystem."
23823 #: ../fuse/guestmount.pod:131
23824 msgid "B<-o attr_timeout=N>"
23828 #: ../fuse/guestmount.pod:133
23829 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
23833 #: ../fuse/guestmount.pod:135
23834 msgid "B<-o kernel_cache>"
23838 #: ../fuse/guestmount.pod:137
23840 "Allow the kernel to cache files (reduces the number of reads that have to go "
23841 "through the L<guestfs(3)> API). This is generally a good idea if you can "
23842 "afford the extra memory usage."
23846 #: ../fuse/guestmount.pod:141
23847 msgid "B<-o uid=N> B<-o gid=N>"
23851 #: ../fuse/guestmount.pod:143
23853 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
23854 "the chosen values."
23858 #: ../fuse/guestmount.pod:150
23860 "Add devices and mount everything read-only. Also disallow writes and make "
23861 "the disk appear read-only to FUSE."
23865 #: ../fuse/guestmount.pod:153
23867 "This is highly recommended if you are not going to edit the guest disk. If "
23868 "the guest is running and this option is I<not> supplied, then there is a "
23869 "strong risk of disk corruption in the guest. We try to prevent this from "
23870 "happening, but it is not always possible."
23874 #: ../fuse/guestmount.pod:160
23875 msgid "Enable SELinux support for the guest."
23879 #: ../fuse/guestmount.pod:162
23884 #: ../fuse/guestmount.pod:164
23885 msgid "Trace libguestfs calls (to stderr)."
23889 #: ../fuse/guestmount.pod:166
23890 msgid "This also stops the daemon from forking into the background."
23894 #: ../fuse/guestmount.pod:170
23895 msgid "Enable verbose messages from underlying libguestfs."
23899 #: ../fuse/guestmount.pod:174
23900 msgid "Display the program version and exit."
23904 #: ../fuse/guestmount.pod:180
23906 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
23907 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
23912 #: ../inspector/virt-inspector.pl:40
23914 "virt-inspector - Display OS version, kernel, drivers, mount points, "
23915 "applications, etc. in a virtual machine"
23919 #: ../inspector/virt-inspector.pl:44
23922 " virt-inspector [--connect URI] domname\n"
23927 #: ../inspector/virt-inspector.pl:46
23930 " virt-inspector guest.img [guest.img ...]\n"
23935 #: ../inspector/virt-inspector.pl:50
23937 "B<virt-inspector> examines a virtual machine and tries to determine the "
23938 "version of the OS, the kernel version, what drivers are installed, whether "
23939 "the virtual machine is fully virtualized (FV) or para-virtualized (PV), what "
23940 "applications are installed and more."
23944 #: ../inspector/virt-inspector.pl:55
23946 "Virt-inspector can produce output in several formats, including a readable "
23947 "text report, and XML for feeding into other programs."
23951 #: ../inspector/virt-inspector.pl:58
23953 "In the normal usage, use C<virt-inspector domname> where C<domname> is the "
23954 "libvirt domain (see: C<virsh list --all>)."
23958 #: ../inspector/virt-inspector.pl:61
23960 "You can also run virt-inspector directly on disk images from a single "
23961 "virtual machine. Use C<virt-inspector guest.img>. In rare cases a domain "
23962 "has several block devices, in which case you should list them one after "
23963 "another, with the first corresponding to the guest's C</dev/sda>, the second "
23964 "to the guest's C</dev/sdb> and so on."
23968 #: ../inspector/virt-inspector.pl:67
23970 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
23971 "inspect several virtual machines, you have to run virt-inspector several "
23972 "times (for example, from a shell script for-loop)."
23976 #: ../inspector/virt-inspector.pl:72
23978 "Because virt-inspector needs direct access to guest images, it won't "
23979 "normally work over remote libvirt connections."
23983 #: ../inspector/virt-inspector.pl:85 ../tools/virt-edit.pl:83
23984 #: ../tools/virt-win-reg.pl:182 ../tools/virt-df.pl:81 ../tools/virt-ls.pl:89
23985 #: ../tools/virt-list-filesystems.pl:60 ../tools/virt-cat.pl:90
23986 #: ../tools/virt-tar.pl:109 ../tools/virt-rescue.pl:113
23987 #: ../tools/virt-make-fs.pl:163 ../tools/virt-list-partitions.pl:61
23988 msgid "Display brief help."
23992 #: ../inspector/virt-inspector.pl:91 ../tools/virt-edit.pl:89
23993 #: ../tools/virt-win-reg.pl:188 ../tools/virt-df.pl:87 ../tools/virt-ls.pl:95
23994 #: ../tools/virt-resize.pl:273 ../tools/virt-list-filesystems.pl:66
23995 #: ../tools/virt-cat.pl:96 ../tools/virt-tar.pl:115
23996 #: ../tools/virt-rescue.pl:119 ../tools/virt-make-fs.pl:169
23997 #: ../tools/virt-list-partitions.pl:67
23998 msgid "B<--version>"
24002 #: ../inspector/virt-inspector.pl:93 ../tools/virt-edit.pl:91
24003 #: ../tools/virt-win-reg.pl:190 ../tools/virt-df.pl:89 ../tools/virt-ls.pl:97
24004 #: ../tools/virt-resize.pl:275 ../tools/virt-list-filesystems.pl:68
24005 #: ../tools/virt-cat.pl:98 ../tools/virt-tar.pl:117
24006 #: ../tools/virt-rescue.pl:121 ../tools/virt-make-fs.pl:171
24007 #: ../tools/virt-list-partitions.pl:69
24008 msgid "Display version number and exit."
24012 #: ../inspector/virt-inspector.pl:99 ../tools/virt-edit.pl:113
24013 #: ../tools/virt-win-reg.pl:204 ../tools/virt-df.pl:95 ../tools/virt-ls.pl:103
24014 #: ../tools/virt-list-filesystems.pl:74 ../tools/virt-cat.pl:104
24015 #: ../tools/virt-tar.pl:123 ../tools/virt-rescue.pl:135
24016 #: ../tools/virt-list-partitions.pl:75
24017 msgid "B<--connect URI> | B<-c URI>"
24021 #: ../inspector/virt-inspector.pl:101 ../tools/virt-edit.pl:115
24022 #: ../tools/virt-win-reg.pl:206 ../tools/virt-df.pl:97 ../tools/virt-ls.pl:105
24023 #: ../tools/virt-list-filesystems.pl:76 ../tools/virt-cat.pl:106
24024 #: ../tools/virt-tar.pl:125 ../tools/virt-rescue.pl:137
24025 #: ../tools/virt-list-partitions.pl:77
24027 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
24028 "to the default libvirt hypervisor."
24032 #: ../inspector/virt-inspector.pl:104
24034 "Libvirt is only used if you specify a C<domname> on the command line. If "
24035 "you specify guest block devices directly, then libvirt is not used at all."
24039 #: ../inspector/virt-inspector.pl:112 ../tools/virt-edit.pl:125
24040 #: ../tools/virt-win-reg.pl:216 ../tools/virt-df.pl:117
24041 #: ../tools/virt-ls.pl:115 ../tools/virt-resize.pl:523
24042 #: ../tools/virt-list-filesystems.pl:86 ../tools/virt-cat.pl:116
24043 #: ../tools/virt-tar.pl:135 ../tools/virt-rescue.pl:147
24044 #: ../tools/virt-list-partitions.pl:87
24045 msgid "B<--format> raw"
24049 #: ../inspector/virt-inspector.pl:114 ../tools/virt-edit.pl:127
24050 #: ../tools/virt-win-reg.pl:218 ../tools/virt-df.pl:119
24051 #: ../tools/virt-ls.pl:117 ../tools/virt-list-filesystems.pl:88
24052 #: ../tools/virt-cat.pl:118 ../tools/virt-tar.pl:137
24053 #: ../tools/virt-rescue.pl:149 ../tools/virt-list-partitions.pl:89
24055 "Specify the format of disk images given on the command line. If this is "
24056 "omitted then the format is autodetected from the content of the disk image."
24060 #: ../inspector/virt-inspector.pl:118 ../tools/virt-edit.pl:131
24061 #: ../tools/virt-win-reg.pl:222 ../tools/virt-df.pl:123
24062 #: ../tools/virt-ls.pl:121 ../tools/virt-list-filesystems.pl:92
24063 #: ../tools/virt-cat.pl:122 ../tools/virt-tar.pl:141
24064 #: ../tools/virt-rescue.pl:153 ../tools/virt-list-partitions.pl:93
24066 "If disk images are requested from libvirt, then this program asks libvirt "
24067 "for this information. In this case, the value of the format parameter is "
24072 #: ../inspector/virt-inspector.pl:122 ../tools/virt-edit.pl:135
24073 #: ../tools/virt-win-reg.pl:226 ../tools/virt-df.pl:127
24074 #: ../tools/virt-ls.pl:125 ../tools/virt-resize.pl:528
24075 #: ../tools/virt-resize.pl:543 ../tools/virt-list-filesystems.pl:96
24076 #: ../tools/virt-cat.pl:126 ../tools/virt-tar.pl:145
24077 #: ../tools/virt-rescue.pl:157 ../tools/virt-list-partitions.pl:97
24079 "If working with untrusted raw-format guest disk images, you should ensure "
24080 "the format is always specified."
24084 #: ../inspector/virt-inspector.pl:131
24086 "The following options select the output format. Use only one of them. The "
24087 "default is a readable text report."
24091 #: ../inspector/virt-inspector.pl:136
24092 msgid "B<--text> (default)"
24096 #: ../inspector/virt-inspector.pl:138
24097 msgid "Plain text report."
24101 #: ../inspector/virt-inspector.pl:140
24106 #: ../inspector/virt-inspector.pl:142
24107 msgid "Produce no output at all."
24111 #: ../inspector/virt-inspector.pl:144
24116 #: ../inspector/virt-inspector.pl:146
24118 "If you select I<--xml> then you get XML output which can be fed to other "
24123 #: ../inspector/virt-inspector.pl:149
24128 #: ../inspector/virt-inspector.pl:151
24130 "If you select I<--yaml> then you get YAML output which can be fed to other "
24135 #: ../inspector/virt-inspector.pl:154
24140 #: ../inspector/virt-inspector.pl:156
24142 "If you select I<--perl> then you get Perl structures output which can be "
24143 "used directly in another Perl program."
24147 #: ../inspector/virt-inspector.pl:159
24152 #: ../inspector/virt-inspector.pl:161
24153 msgid "B<--ro-fish>"
24157 #: ../inspector/virt-inspector.pl:163
24159 "If you select I<--fish> then we print a L<guestfish(1)> command line which "
24160 "will automatically mount up the filesystems on the correct mount points. "
24161 "Try this for example:"
24165 #: ../inspector/virt-inspector.pl:167
24168 " guestfish $(virt-inspector --fish guest.img)\n"
24173 #: ../inspector/virt-inspector.pl:169
24175 "I<--ro-fish> is the same, but the I<--ro> option is passed to guestfish so "
24176 "that the filesystems are mounted read-only."
24180 #: ../inspector/virt-inspector.pl:172
24185 #: ../inspector/virt-inspector.pl:174
24187 "In \"query mode\" we answer common questions about the guest, such as "
24188 "whether it is fullvirt or needs a Xen hypervisor to run."
24192 #: ../inspector/virt-inspector.pl:177
24193 msgid "See section I<QUERY MODE> below."
24197 #: ../inspector/virt-inspector.pl:183
24198 msgid "B<--windows-registry>"
24202 #: ../inspector/virt-inspector.pl:185
24204 "This flag is ignored for compatibility with earlier releases of the software."
24208 #: ../inspector/virt-inspector.pl:188
24210 "In this version, if L<Win::Hivex(3)> is available, then we attempt to parse "
24211 "information out of the Registry for any Windows guest."
24215 #: ../inspector/virt-inspector.pl:244
24216 msgid "OUTPUT FORMAT"
24220 #: ../inspector/virt-inspector.pl:246
24223 " Operating system(s)\n"
24224 " -------------------\n"
24225 " Linux (distro + version)\n"
24226 " Windows (version)\n"
24229 " +--- Filesystems ---------- Installed apps --- Kernel & drivers\n"
24230 " ----------- -------------- ----------------\n"
24231 " mount point => device List of apps Extra information\n"
24232 " mount point => device and versions about kernel(s)\n"
24233 " ... and drivers\n"
24234 " swap => swap device\n"
24235 " (plus lots of extra information\n"
24236 " about each filesystem)\n"
24241 #: ../inspector/virt-inspector.pl:261
24242 msgid "The output of virt-inspector is a complex two-level data structure."
24246 #: ../inspector/virt-inspector.pl:263
24248 "At the top level is a list of the operating systems installed on the guest. "
24249 "(For the vast majority of guests, only a single OS is installed.) The data "
24250 "returned for the OS includes the name (Linux, Windows), the distribution and "
24255 #: ../inspector/virt-inspector.pl:268
24256 msgid "The diagram above shows what we return for each OS."
24260 #: ../inspector/virt-inspector.pl:270
24262 "With the I<--xml> option the output is mapped into an XML document. There "
24263 "is a RELAX-NG schema for this XML in the file I<virt-inspector.rng> which "
24264 "normally ships with virt-inspector, or can be found in the source."
24268 #: ../inspector/virt-inspector.pl:275
24270 "With the I<--fish> or I<--ro-fish> option the mount points are mapped to "
24271 "L<guestfish(1)> command line parameters, so that you can go in afterwards "
24272 "and inspect the guest with everything mounted in the right place. For "
24277 #: ../inspector/virt-inspector.pl:280
24280 " guestfish $(virt-inspector --ro-fish guest.img)\n"
24281 " ==> guestfish --ro -a guest.img -m /dev/VG/LV:/ -m /dev/sda1:/boot\n"
24286 #: ../inspector/virt-inspector.pl:620
24291 #: ../inspector/virt-inspector.pl:622
24293 "When you use C<virt-inspector --query>, the output is a series of lines of "
24298 #: ../inspector/virt-inspector.pl:625
24304 " xen_pv_drivers=no\n"
24309 #: ../inspector/virt-inspector.pl:630
24311 "(each answer is usually C<yes> or C<no>, or the line is completely missing "
24312 "if we could not determine the answer at all)."
24316 #: ../inspector/virt-inspector.pl:633
24318 "If the guest is multiboot, you can get apparently conflicting answers (eg. "
24319 "C<windows=yes> and C<linux=yes>, or a guest which is both fullvirt and has a "
24320 "Xen PV kernel). This is normal, and just means that the guest can do both "
24321 "things, although it might require operator intervention such as selecting a "
24322 "boot option when the guest is booting."
24326 #: ../inspector/virt-inspector.pl:640
24327 msgid "This section describes the full range of answers possible."
24331 #: ../inspector/virt-inspector.pl:661
24332 msgid "windows=(yes|no)"
24336 #: ../inspector/virt-inspector.pl:663
24337 msgid "Answer C<yes> if Microsoft Windows is installed in the guest."
24341 #: ../inspector/virt-inspector.pl:676
24342 msgid "linux=(yes|no)"
24346 #: ../inspector/virt-inspector.pl:678
24347 msgid "Answer C<yes> if a Linux kernel is installed in the guest."
24351 #: ../inspector/virt-inspector.pl:691
24352 msgid "rhel=(yes|no)"
24356 #: ../inspector/virt-inspector.pl:693
24357 msgid "Answer C<yes> if the guest contains Red Hat Enterprise Linux."
24361 #: ../inspector/virt-inspector.pl:707
24362 msgid "fedora=(yes|no)"
24366 #: ../inspector/virt-inspector.pl:709
24367 msgid "Answer C<yes> if the guest contains the Fedora Linux distribution."
24371 #: ../inspector/virt-inspector.pl:722
24372 msgid "debian=(yes|no)"
24376 #: ../inspector/virt-inspector.pl:724
24377 msgid "Answer C<yes> if the guest contains the Debian Linux distribution."
24381 #: ../inspector/virt-inspector.pl:737
24382 msgid "fullvirt=(yes|no)"
24386 #: ../inspector/virt-inspector.pl:739
24388 "Answer C<yes> if there is at least one operating system kernel installed in "
24389 "the guest which runs fully virtualized. Such a guest would require a "
24390 "hypervisor which supports full system virtualization."
24394 #: ../inspector/virt-inspector.pl:762
24395 msgid "xen_domU_kernel=(yes|no)"
24399 #: ../inspector/virt-inspector.pl:764
24401 "Answer C<yes> if there is at least one Linux kernel installed in the guest "
24402 "which is compiled as a Xen DomU (a Xen paravirtualized guest)."
24406 #: ../inspector/virt-inspector.pl:784
24407 msgid "xen_pv_drivers=(yes|no)"
24411 #: ../inspector/virt-inspector.pl:786
24413 "Answer C<yes> if the guest has Xen paravirtualized drivers installed "
24414 "(usually the kernel itself will be fully virtualized, but the PV drivers "
24415 "have been installed by the administrator for performance reasons)."
24419 #: ../inspector/virt-inspector.pl:808
24420 msgid "virtio_drivers=(yes|no)"
24424 #: ../inspector/virt-inspector.pl:810
24426 "Answer C<yes> if the guest has virtio paravirtualized drivers installed. "
24427 "Virtio drivers are commonly used to improve the performance of KVM."
24431 #: ../inspector/virt-inspector.pl:831
24432 msgid "userspace_arch=(x86_64|...)"
24436 #: ../inspector/virt-inspector.pl:833
24437 msgid "Print the architecture of userspace."
24441 #: ../inspector/virt-inspector.pl:835 ../inspector/virt-inspector.pl:856
24442 msgid "NB. For multi-boot VMs this can print several lines."
24446 #: ../inspector/virt-inspector.pl:852
24447 msgid "kernel_arch=(x86_64|...)"
24451 #: ../inspector/virt-inspector.pl:854
24452 msgid "Print the architecture of the kernel."
24456 #: ../inspector/virt-inspector.pl:877 ../tools/virt-edit.pl:343
24457 #: ../tools/virt-win-reg.pl:142 ../tools/virt-win-reg.pl:480
24458 #: ../tools/virt-df.pl:607 ../tools/virt-ls.pl:228
24459 #: ../tools/virt-resize.pl:1479 ../tools/virt-list-filesystems.pl:209
24460 #: ../tools/virt-cat.pl:181 ../tools/virt-tar.pl:276
24461 #: ../tools/virt-rescue.pl:250 ../tools/virt-make-fs.pl:527
24462 #: ../tools/virt-list-partitions.pl:247
24463 msgid "SHELL QUOTING"
24467 #: ../inspector/virt-inspector.pl:879 ../tools/virt-edit.pl:345
24468 #: ../tools/virt-win-reg.pl:482 ../tools/virt-df.pl:609
24469 #: ../tools/virt-ls.pl:230 ../tools/virt-resize.pl:1481
24470 #: ../tools/virt-list-filesystems.pl:211 ../tools/virt-cat.pl:183
24471 #: ../tools/virt-tar.pl:278 ../tools/virt-rescue.pl:252
24472 #: ../tools/virt-make-fs.pl:529 ../tools/virt-list-partitions.pl:249
24474 "Libvirt guest names can contain arbitrary characters, some of which have "
24475 "meaning to the shell such as C<#> and space. You may need to quote or "
24476 "escape these characters on the command line. See the shell manual page L<sh"
24477 "(1)> for details."
24481 #: ../inspector/virt-inspector.pl:886 ../tools/virt-df.pl:616
24483 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
24484 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
24488 #: ../inspector/virt-inspector.pl:895 ../tools/virt-edit.pl:364
24489 #: ../tools/virt-win-reg.pl:515 ../tools/virt-df.pl:625
24490 #: ../tools/virt-ls.pl:248 ../tools/virt-resize.pl:1510
24491 #: ../tools/virt-list-filesystems.pl:230 ../tools/virt-cat.pl:200
24492 #: ../tools/virt-tar.pl:296 ../tools/virt-rescue.pl:269
24493 #: ../tools/virt-make-fs.pl:561 ../tools/virt-list-partitions.pl:267
24494 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
24498 #: ../inspector/virt-inspector.pl:897
24499 msgid "Matthew Booth L<mbooth@redhat.com>"
24503 #: ../inspector/virt-inspector.pl:901 ../tools/virt-ls.pl:252
24504 #: ../tools/virt-list-filesystems.pl:234 ../tools/virt-cat.pl:204
24505 #: ../tools/virt-tar.pl:300
24506 msgid "Copyright (C) 2009 Red Hat Inc."
24510 #: ../tools/virt-edit.pl:35
24511 msgid "virt-edit - Edit a file in a virtual machine"
24515 #: ../tools/virt-edit.pl:39
24518 " virt-edit [--options] domname file\n"
24523 #: ../tools/virt-edit.pl:41
24526 " virt-edit [--options] disk.img [disk.img ...] file\n"
24531 #: ../tools/virt-edit.pl:43
24534 " virt-edit [domname|disk.img] file -e 'expr'\n"
24539 #: ../tools/virt-edit.pl:47
24541 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
24542 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
24543 "doing this, but doesn't catch all cases."
24547 #: ../tools/virt-edit.pl:53
24549 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
24550 "the named virtual machine (or disk image)."
24554 #: ../tools/virt-edit.pl:56
24556 "If you want to just view a file, use L<virt-cat(1)>. For more complex cases "
24557 "you should look at the L<guestfish(1)> tool."
24561 #: ../tools/virt-edit.pl:61
24562 msgid "Edit the named files interactively:"
24566 #: ../tools/virt-edit.pl:63
24569 " virt-edit mydomain /boot/grub/grub.conf\n"
24574 #: ../tools/virt-edit.pl:65
24577 " virt-edit mydomain /etc/passwd\n"
24582 #: ../tools/virt-edit.pl:67
24584 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
24585 "below). To change the init default level to 5:"
24589 #: ../tools/virt-edit.pl:71
24592 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
24597 #: ../tools/virt-edit.pl:97
24598 msgid "B<--backup extension> | B<-b extension>"
24602 #: ../tools/virt-edit.pl:99
24604 "Create a backup of the original file I<in the guest disk image>. The backup "
24605 "has the original filename with C<extension> added."
24609 #: ../tools/virt-edit.pl:102
24611 "Usually the first character of C<extension> would be a dot C<.> so you would "
24616 #: ../tools/virt-edit.pl:105
24619 " virt-edit -b .orig [etc]\n"
24624 #: ../tools/virt-edit.pl:107
24625 msgid "By default, no backup file is made."
24629 #: ../tools/virt-edit.pl:118 ../tools/virt-win-reg.pl:209
24630 #: ../tools/virt-df.pl:100 ../tools/virt-ls.pl:108
24631 #: ../tools/virt-list-filesystems.pl:79 ../tools/virt-cat.pl:109
24632 #: ../tools/virt-tar.pl:128 ../tools/virt-rescue.pl:140
24633 #: ../tools/virt-list-partitions.pl:80
24635 "If you specify guest block devices directly, then libvirt is not used at all."
24639 #: ../tools/virt-edit.pl:142
24640 msgid "B<--expr EXPR> | B<-e EXPR>"
24644 #: ../tools/virt-edit.pl:144
24646 "Instead of launching the external editor, non-interactively apply the Perl "
24647 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
24652 #: ../tools/virt-edit.pl:148
24654 "Be careful to properly quote the expression to prevent it from being altered "
24659 #: ../tools/virt-edit.pl:268
24660 msgid "NON-INTERACTIVE EDITING"
24664 #: ../tools/virt-edit.pl:270
24666 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
24667 "administrator can interactively edit the file."
24671 #: ../tools/virt-edit.pl:273
24673 "There are two ways also to use C<virt-edit> from scripts in order to make "
24674 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
24675 "like this, it's less error-prone to write scripts directly using the "
24676 "libguestfs API and Augeas for configuration file editing.)"
24680 #: ../tools/virt-edit.pl:279
24682 "The first method is to temporarily set C<$EDITOR> to any script or program "
24683 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
24684 "update C<tmpfile> in place however it likes."
24688 #: ../tools/virt-edit.pl:283
24690 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
24691 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
24692 "instances of C<foo> with C<bar> in a file:"
24696 #: ../tools/virt-edit.pl:287
24699 " virt-edit domname filename -e 's/foo/bar/'\n"
24704 #: ../tools/virt-edit.pl:289
24706 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
24707 "For example to delete root's password you could do:"
24711 #: ../tools/virt-edit.pl:292
24714 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
24719 #: ../tools/virt-edit.pl:294
24721 "What really happens is that the snippet is evaluated as a Perl expression "
24722 "for each line of the file. The line, including the final C<\\n>, is passed "
24723 "in C<$_> and the expression should update C<$_> or leave it unchanged."
24727 #: ../tools/virt-edit.pl:299
24729 "To delete a line, set C<$_> to the empty string. For example, to delete the "
24730 "C<apache> user account from the password file you can do:"
24734 #: ../tools/virt-edit.pl:302
24737 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
24742 #: ../tools/virt-edit.pl:304
24744 "To insert a line, prepend or append it to C<$_>. However appending lines to "
24745 "the end of the file is rather difficult this way since there is no concept "
24746 "of \"last line of the file\" - your expression just doesn't get called "
24747 "again. You might want to use the first method (setting C<$EDITOR>) if you "
24752 #: ../tools/virt-edit.pl:310
24754 "The variable C<$lineno> contains the current line number. As is "
24755 "traditional, the first line in the file is number C<1>."
24759 #: ../tools/virt-edit.pl:313
24761 "The return value from the expression is ignored, but the expression may call "
24762 "C<die> in order to abort the whole program, leaving the original file "
24767 #: ../tools/virt-edit.pl:317
24769 "Remember when matching the end of a line that C<$_> may contain the final C<"
24770 "\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
24771 "newline then neither of these. Thus to match or substitute some text at the "
24772 "end of a line, use this regular expression:"
24776 #: ../tools/virt-edit.pl:322
24779 " /some text(\\r?\\n)?$/\n"
24784 #: ../tools/virt-edit.pl:324
24786 "Alternately, use the perl C<chomp> function, being careful not to chomp C<"
24787 "$_> itself (since that would remove all newlines from the file):"
24791 #: ../tools/virt-edit.pl:328
24794 " my $m = $_; chomp $m; $m =~ /some text$/\n"
24799 #: ../tools/virt-edit.pl:334
24804 #: ../tools/virt-edit.pl:336
24806 "If set, this string is used as the editor. It may contain arguments, eg. C<"
24811 #: ../tools/virt-edit.pl:339
24812 msgid "If not set, C<vi> is used."
24816 #: ../tools/virt-edit.pl:352
24818 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::"
24819 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>, L<perl(1)>, "
24824 #: ../tools/virt-edit.pl:362 ../tools/virt-win-reg.pl:513
24825 #: ../tools/virt-df.pl:623 ../tools/virt-ls.pl:246
24826 #: ../tools/virt-resize.pl:1508 ../tools/virt-list-filesystems.pl:228
24827 #: ../tools/virt-cat.pl:198 ../tools/virt-tar.pl:294
24828 #: ../tools/virt-rescue.pl:267 ../tools/virt-make-fs.pl:559
24829 #: ../tools/virt-list-partitions.pl:265
24834 #: ../tools/virt-edit.pl:368 ../tools/virt-df.pl:629
24835 #: ../tools/virt-rescue.pl:273 ../tools/virt-list-partitions.pl:271
24836 msgid "Copyright (C) 2009-2010 Red Hat Inc."
24840 #: ../tools/virt-win-reg.pl:38
24842 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
24846 #: ../tools/virt-win-reg.pl:42
24849 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
24854 #: ../tools/virt-win-reg.pl:44
24857 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
24862 #: ../tools/virt-win-reg.pl:46
24865 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
24870 #: ../tools/virt-win-reg.pl:48
24873 " virt-win-reg --merge domname [input.reg ...]\n"
24878 #: ../tools/virt-win-reg.pl:50
24881 " virt-win-reg [--options] disk.img ... # instead of domname\n"
24886 #: ../tools/virt-win-reg.pl:54
24888 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
24889 "virtual machines. If you do this, you I<will> get irreversible disk "
24890 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
24891 "but doesn't catch all cases."
24895 #: ../tools/virt-win-reg.pl:59
24897 "Modifying the Windows Registry is an inherently risky operation. The format "
24898 "is deliberately obscure and undocumented, and Registry changes can leave the "
24899 "system unbootable. Therefore when using the C<--merge> option, make sure "
24900 "you have a reliable backup first."
24904 #: ../tools/virt-win-reg.pl:66
24906 "This program can export and merge Windows Registry entries from a Windows "
24911 #: ../tools/virt-win-reg.pl:69
24913 "The first parameter is the libvirt guest name or the raw disk image of a "
24918 #: ../tools/virt-win-reg.pl:72
24920 "If C<--merge> is I<not> specified, then the chosen registry key is displayed/"
24921 "exported (recursively). For example:"
24925 #: ../tools/virt-win-reg.pl:75
24928 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
24933 #: ../tools/virt-win-reg.pl:77
24935 "You can also display single values from within registry keys, for example:"
24939 #: ../tools/virt-win-reg.pl:80
24942 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
24943 " $ virt-win-reg Windows7 $cvkey ProductName\n"
24944 " Windows 7 Enterprise\n"
24949 #: ../tools/virt-win-reg.pl:84
24951 "With C<--merge>, you can merge a textual regedit file into the Windows "
24956 #: ../tools/virt-win-reg.pl:87
24959 " $ virt-win-reg --merge Windows7 changes.reg\n"
24964 #: ../tools/virt-win-reg.pl:89
24965 msgid "SUPPORTED SYSTEMS"
24969 #: ../tools/virt-win-reg.pl:91
24971 "The program currently supports Windows NT-derived guests starting with "
24972 "Windows XP through to at least Windows 7."
24976 #: ../tools/virt-win-reg.pl:94
24978 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, C<HKEY_LOCAL_MACHINE"
24979 "\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, C<HKEY_LOCAL_MACHINE\\SYSTEM> "
24980 "and C<HKEY_USERS\\.DEFAULT>."
24984 #: ../tools/virt-win-reg.pl:98
24986 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
24991 #: ../tools/virt-win-reg.pl:101
24993 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
24998 #: ../tools/virt-win-reg.pl:104
25003 #: ../tools/virt-win-reg.pl:106
25005 "This program is only meant for simple access to the registry. If you want "
25006 "to do complicated things with the registry, we suggest you download the "
25007 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
25008 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
25009 "L<hivexregedit(1)>."
25013 #: ../tools/virt-win-reg.pl:112
25018 #: ../tools/virt-win-reg.pl:114
25020 "C<virt-win-reg> expects that regedit files have already been reencoded in "
25021 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
25022 "style line endings. Since Windows regedit files are often in UTF-16LE with "
25023 "Windows-style line endings, you may need to reencode the whole file before "
25024 "or after processing."
25028 #: ../tools/virt-win-reg.pl:120
25030 "To reencode a file from Windows format to Linux (before processing it with "
25031 "the C<--merge> option), you would do something like this:"
25035 #: ../tools/virt-win-reg.pl:123
25038 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
25043 #: ../tools/virt-win-reg.pl:125
25045 "To go in the opposite direction, after exporting and before sending the file "
25046 "to a Windows user, do something like this:"
25050 #: ../tools/virt-win-reg.pl:128
25053 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
25058 #: ../tools/virt-win-reg.pl:130
25059 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
25063 #: ../tools/virt-win-reg.pl:132
25065 "If you are unsure about the current encoding, use the L<file(1)> command. "
25066 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
25067 "style (CRLF) line endings, like this:"
25071 #: ../tools/virt-win-reg.pl:136
25074 " $ file software.reg\n"
25075 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
25076 " with CRLF line terminators\n"
25081 #: ../tools/virt-win-reg.pl:140
25082 msgid "This file would need conversion before you could C<--merge> it."
25086 #: ../tools/virt-win-reg.pl:144
25088 "Be careful when passing parameters containing C<\\> (backslash) in the "
25089 "shell. Usually you will have to use 'single quotes' or double backslashes "
25090 "(but not both) to protect them from the shell."
25094 #: ../tools/virt-win-reg.pl:148
25095 msgid "Paths and value names are case-insensitive."
25099 #: ../tools/virt-win-reg.pl:150
25100 msgid "CurrentControlSet etc."
25104 #: ../tools/virt-win-reg.pl:152
25106 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
25107 "Registry at the level of the hive file, and therefore you cannot modify "
25112 #: ../tools/virt-win-reg.pl:156
25114 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
25115 "circumstances it might refer to another control set. The way to find out is "
25116 "to look at the C<HKLM\\SYSTEM\\Select> key:"
25120 #: ../tools/virt-win-reg.pl:160
25123 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
25124 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
25125 " \"Current\"=dword:00000001\n"
25126 " \"Default\"=dword:00000001\n"
25127 " \"Failed\"=dword:00000000\n"
25128 " \"LastKnownGood\"=dword:00000002\n"
25133 #: ../tools/virt-win-reg.pl:167
25134 msgid "\"Default\" is the one which Windows will choose when it boots."
25138 #: ../tools/virt-win-reg.pl:169
25140 "Similarly, other C<Current...> keys in the path may need to be replaced."
25144 #: ../tools/virt-win-reg.pl:196 ../tools/virt-make-fs.pl:177
25149 #: ../tools/virt-win-reg.pl:198 ../tools/virt-resize.pl:501
25150 msgid "Enable debugging messages."
25154 #: ../tools/virt-win-reg.pl:233
25159 #: ../tools/virt-win-reg.pl:235
25161 "In merge mode, this merges a textual regedit file into the Windows Registry "
25162 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
25163 "displays or exports Registry entries instead."
25167 #: ../tools/virt-win-reg.pl:239
25169 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
25170 "result in disk corruption. However exporting (without this flag) is always "
25175 #: ../tools/virt-win-reg.pl:247
25176 msgid "B<--encoding> UTF-16LE|ASCII"
25180 #: ../tools/virt-win-reg.pl:249
25182 "When merging (only), you may need to specify the encoding for strings to be "
25183 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
25184 "(3)/ENCODING STRINGS>."
25188 #: ../tools/virt-win-reg.pl:253
25190 "The default is to use UTF-16LE, which should work with recent versions of "
25195 #: ../tools/virt-win-reg.pl:489
25197 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
25198 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
25199 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
25203 #: ../tools/virt-win-reg.pl:504 ../tools/virt-make-fs.pl:550
25205 "When reporting bugs, please enable debugging and capture the I<complete> "
25210 #: ../tools/virt-win-reg.pl:507
25213 " export LIBGUESTFS_DEBUG=1\n"
25214 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
25219 #: ../tools/virt-win-reg.pl:510
25221 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."
25226 #: ../tools/virt-win-reg.pl:519 ../tools/virt-resize.pl:1514
25227 #: ../tools/virt-make-fs.pl:565
25228 msgid "Copyright (C) 2010 Red Hat Inc."
25232 #: ../tools/virt-df.pl:36
25233 msgid "virt-df - Display free space on virtual filesystems"
25237 #: ../tools/virt-df.pl:40
25240 " virt-df [--options]\n"
25245 #: ../tools/virt-df.pl:42
25248 " virt-df [--options] domname\n"
25253 #: ../tools/virt-df.pl:44
25256 " virt-df [--options] disk.img [disk.img ...]\n"
25261 #: ../tools/virt-df.pl:48
25263 "C<virt-df> is a command line tool to display free space on virtual machine "
25264 "filesystems. Unlike other tools, it doesn't just display the amount of "
25265 "space allocated to a virtual machine, but can look inside the virtual "
25266 "machine to see how much space is really being used."
25270 #: ../tools/virt-df.pl:53
25272 "It is like the L<df(1)> command, but for virtual machines, except that it "
25273 "also works for Windows virtual machines."
25277 #: ../tools/virt-df.pl:56
25279 "If used without any arguments, C<virt-df> checks with libvirt to get a list "
25280 "of all active and inactive guests, and performs a C<df>-type operation on "
25281 "each one in turn, printing out the results."
25285 #: ../tools/virt-df.pl:60
25287 "If used with any argument(s), C<virt-df> performs a C<df>-type operation on "
25288 "either the single named libvirt domain, or on the disk image(s) listed on "
25289 "the command line (which must all belong to a single VM). In this mode (with "
25290 "arguments), C<virt-df> will I<only work for a single guest>. If you want to "
25291 "run on multiple guests, then you have to invoke C<virt-df> multiple times."
25295 #: ../tools/virt-df.pl:67
25297 "Use the C<--csv> option to get a format which can be easily parsed by other "
25298 "programs. Other options are mostly similar to standard C<df> options. See "
25299 "below for the complete list."
25303 #: ../tools/virt-df.pl:107
25308 #: ../tools/virt-df.pl:109
25310 "Write out the results in CSV format (comma-separated values). This format "
25311 "can be imported easily into databases and spreadsheets, but read L</NOTE "
25312 "ABOUT CSV FORMAT> below."
25316 #: ../tools/virt-df.pl:134
25317 msgid "B<--human-readable> | B<-h>"
25321 #: ../tools/virt-df.pl:136
25322 msgid "Print sizes in human-readable format."
25326 #: ../tools/virt-df.pl:138
25327 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
25331 #: ../tools/virt-df.pl:144
25332 msgid "B<--inodes> | B<-i>"
25336 #: ../tools/virt-df.pl:146
25337 msgid "Print inodes instead of blocks."
25341 #: ../tools/virt-df.pl:152
25342 msgid "B<--one-per-guest>"
25346 #: ../tools/virt-df.pl:154
25348 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
25349 "disks from several guests to a single libguestfs appliance."
25353 #: ../tools/virt-df.pl:157
25354 msgid "You might use this option in the following circumstances:"
25358 #: ../tools/virt-df.pl:163
25360 "If you think an untrusted guest might actively try to exploit the libguestfs "
25361 "appliance kernel, then this prevents one guest from interfering with the "
25362 "stats printed for another guest."
25366 #: ../tools/virt-df.pl:169
25368 "If the kernel has a bug which stops it from accessing a filesystem in one "
25369 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
25370 "and report stats for further guests."
25374 #: ../tools/virt-df.pl:583
25375 msgid "NOTE ABOUT CSV FORMAT"
25379 #: ../tools/virt-df.pl:585
25381 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
25382 "should be easy to parse, but it is definitely not easy to parse."
25386 #: ../tools/virt-df.pl:588
25388 "Myth: Just split fields at commas. Reality: This does I<not> work "
25389 "reliably. This example has two columns:"
25393 #: ../tools/virt-df.pl:591
25396 " \"foo,bar\",baz\n"
25401 #: ../tools/virt-df.pl:593
25403 "Myth: Read the file one line at a time. Reality: This does I<not> work "
25404 "reliably. This example has one row:"
25408 #: ../tools/virt-df.pl:596
25417 #: ../tools/virt-df.pl:599
25419 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
25420 "packaged in major Linux distributions)."
25424 #: ../tools/virt-df.pl:602
25426 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
25427 "or Python's built-in csv library)."
25431 #: ../tools/virt-df.pl:605
25432 msgid "Most spreadsheets and databases can import CSV directly."
25436 #: ../tools/virt-ls.pl:35
25437 msgid "virt-ls - List files in a virtual machine"
25441 #: ../tools/virt-ls.pl:39
25444 " virt-ls [--options] domname directory\n"
25449 #: ../tools/virt-ls.pl:41
25452 " virt-ls [--options] disk.img [disk.img ...] directory\n"
25457 #: ../tools/virt-ls.pl:45
25459 "C<virt-ls> is a command line tool to list the names of files in a directory "
25460 "inside a virtual machine or disk image."
25464 #: ../tools/virt-ls.pl:48
25466 "C<virt-ls> is just a simple wrapper around L<libguestfs(3)> functionality. "
25467 "For more complex cases you should look at the L<guestfish(1)> tool."
25471 #: ../tools/virt-ls.pl:52
25473 "C<virt-ls> can be used in one of three modes: simple, long and recursive. A "
25474 "simple listing is like the ordinary L<ls(1)> command:"
25478 #: ../tools/virt-ls.pl:55
25481 " $ virt-ls myguest /\n"
25489 #: ../tools/virt-ls.pl:60
25490 msgid "With the C<-l> (C<--long>) option, C<virt-ls> shows more detail:"
25494 #: ../tools/virt-ls.pl:62
25497 " $ virt-ls -l myguest /\n"
25499 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
25500 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
25506 #: ../tools/virt-ls.pl:68
25508 "With the C<-R> (C<--recursive>) option, C<virt-ls> lists the names of files "
25509 "and directories recursively:"
25513 #: ../tools/virt-ls.pl:71
25516 " $ virt-ls -R myguest /tmp\n"
25524 #: ../tools/virt-ls.pl:76
25526 "You I<cannot> combine these options. To do more complicated things, use "
25531 #: ../tools/virt-ls.pl:132 ../tools/virt-list-filesystems.pl:103
25532 #: ../tools/virt-list-partitions.pl:112
25533 msgid "B<-l> | B<--long>"
25537 #: ../tools/virt-ls.pl:134
25538 msgid "B<-R> | B<--recursive>"
25542 #: ../tools/virt-ls.pl:136
25544 "Select the mode. With neither of these options, C<virt-ls> produces a "
25545 "simple, flat list of the files in the named directory."
25549 #: ../tools/virt-ls.pl:139
25551 "C<virt-ls -l> produces a \"long listing\", which shows more detail (just "
25552 "like the plain C<ls -l> command)."
25556 #: ../tools/virt-ls.pl:142
25558 "C<virt-ls -R> produces a recursive list of files starting at the named "
25559 "directory. See the documentation for the C<guestfs_find> command L<guestfs"
25560 "(3)> for precise details."
25564 #: ../tools/virt-ls.pl:146
25565 msgid "You cannot combine these options."
25569 #: ../tools/virt-ls.pl:237
25571 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<Sys::"
25572 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
25577 #: ../tools/virt-resize.pl:42
25578 msgid "virt-resize - Resize a virtual machine disk"
25582 #: ../tools/virt-resize.pl:46
25585 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
25586 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
25587 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
25592 #: ../tools/virt-resize.pl:52
25594 "Virt-resize is a tool which can resize a virtual machine disk, making it "
25595 "larger or smaller overall, and resizing or deleting any partitions contained "
25600 #: ../tools/virt-resize.pl:56
25602 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
25603 "not> be used on live virtual machines - for consistent results, shut the "
25604 "virtual machine down before resizing it."
25608 #: ../tools/virt-resize.pl:60
25610 "If you are not familiar with the associated tools: L<virt-list-partitions(1)"
25611 ">, L<virt-list-filesystems(1)> and L<virt-df(1)>, we recommend you go and "
25612 "read those manual pages first."
25616 #: ../tools/virt-resize.pl:68
25618 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
25619 "fill the extra 5GB of space."
25623 #: ../tools/virt-resize.pl:71
25626 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
25627 " virt-list-partitions -lht olddisk\n"
25628 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
25629 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
25634 #: ../tools/virt-resize.pl:76
25636 "As above, but make the /boot partition 200MB bigger, while giving the "
25637 "remaining space to /dev/sda2:"
25641 #: ../tools/virt-resize.pl:79
25644 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
25649 #: ../tools/virt-resize.pl:81
25650 msgid "As above, but the output format will be uncompressed qcow2:"
25654 #: ../tools/virt-resize.pl:83
25657 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
25658 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
25663 #: ../tools/virt-resize.pl:86
25664 msgid "DETAILED USAGE"
25668 #: ../tools/virt-resize.pl:88
25669 msgid "EXPANDING A VIRTUAL MACHINE DISK"
25673 #: ../tools/virt-resize.pl:92
25674 msgid "1. Shut down the virtual machine"
25678 #: ../tools/virt-resize.pl:94
25679 msgid "2. Locate input disk image"
25683 #: ../tools/virt-resize.pl:96
25685 "Locate the input disk image (ie. the file or device on the host containing "
25686 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
25687 "dumpxml> like this to find the disk image name:"
25691 #: ../tools/virt-resize.pl:100
25694 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
25695 " Found 1 nodes:\n"
25697 " <source dev=\"/dev/vg/lv_guest\" />\n"
25702 #: ../tools/virt-resize.pl:105
25703 msgid "3. Look at current sizing"
25707 #: ../tools/virt-resize.pl:107
25709 "Use L<virt-list-partitions(1)> to display the current partitions and sizes:"
25713 #: ../tools/virt-resize.pl:110
25716 " # virt-list-partitions -lht /dev/vg/lv_guest\n"
25717 " /dev/sda1 ext3 101.9M\n"
25718 " /dev/sda2 pv 7.9G\n"
25719 " /dev/sda device 8.0G\n"
25724 #: ../tools/virt-resize.pl:115
25726 "(This example is a virtual machine with an 8 GB disk which we would like to "
25727 "expand up to 10 GB)."
25731 #: ../tools/virt-resize.pl:118
25732 msgid "4. Create output disk"
25736 #: ../tools/virt-resize.pl:120
25738 "Virt-resize cannot do in-place disk modifications. You have to have space "
25739 "to store the resized output disk."
25743 #: ../tools/virt-resize.pl:123
25745 "To store the resized disk image in a file, create a file of a suitable size:"
25749 #: ../tools/virt-resize.pl:126
25752 " # rm -f outdisk\n"
25753 " # truncate -s 10G outdisk\n"
25758 #: ../tools/virt-resize.pl:129
25759 msgid "Or use L<lvcreate(1)> to create a logical volume:"
25763 #: ../tools/virt-resize.pl:131
25766 " # lvcreate -L 10G -n lv_name vg_name\n"
25771 #: ../tools/virt-resize.pl:133
25772 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
25776 #: ../tools/virt-resize.pl:135
25779 " # virsh pool-list\n"
25780 " # virsh vol-create-as poolname newvol 10G\n"
25785 #: ../tools/virt-resize.pl:138
25790 #: ../tools/virt-resize.pl:140
25792 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
25793 "file) and the output disk. The output disk is the one created in the "
25798 #: ../tools/virt-resize.pl:144
25801 " # virt-resize indisk outdisk\n"
25806 #: ../tools/virt-resize.pl:146
25808 "This command just copies disk image C<indisk> to disk image C<outdisk> "
25809 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
25810 "larger, then an extra, empty partition is created at the end of the disk "
25811 "covering the extra space. If C<outdisk> is smaller, then it will give an "
25816 #: ../tools/virt-resize.pl:152
25818 "More realistically you'd want to expand existing partitions in the disk "
25819 "image by passing extra options (for the full list see the L</OPTIONS> "
25824 #: ../tools/virt-resize.pl:156
25826 "L</--expand> is the most useful option. It expands the named partition "
25827 "within the disk to fill any extra space:"
25831 #: ../tools/virt-resize.pl:159
25834 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
25839 #: ../tools/virt-resize.pl:161
25841 "(In this case, an extra partition is I<not> created at the end of the disk, "
25842 "because there will be no unused space)."
25846 #: ../tools/virt-resize.pl:164
25848 "L</--resize> is the other commonly used option. The following would "
25849 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
25850 "rest of the available space:"
25854 #: ../tools/virt-resize.pl:168
25857 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
25858 " indisk outdisk\n"
25863 #: ../tools/virt-resize.pl:171
25865 "If the expanded partition in the image contains a filesystem or LVM PV, then "
25866 "if virt-resize knows how, it will resize the contents, the equivalent of "
25867 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or L<ntfsresize(8)"
25868 ">. However virt-resize does not know how to resize some filesystems, so you "
25869 "would have to online resize them after booting the guest. And virt-resize "
25870 "also does not resize anything inside an LVM PV, it just resizes the PV "
25871 "itself and leaves the user to resize any LVs inside that PV as desired."
25875 #: ../tools/virt-resize.pl:180
25876 msgid "Other options are covered below."
25880 #: ../tools/virt-resize.pl:182
25885 #: ../tools/virt-resize.pl:184
25886 msgid "Thoroughly test the new disk image I<before> discarding the old one."
25890 #: ../tools/virt-resize.pl:186
25891 msgid "If you are using libvirt, edit the XML to point at the new disk:"
25895 #: ../tools/virt-resize.pl:188
25898 " # virsh edit guestname\n"
25903 #: ../tools/virt-resize.pl:190
25905 "Change E<lt>source ...E<gt>, see L<http://libvirt.org/formatdomain."
25906 "html#elementsDisks>"
25910 #: ../tools/virt-resize.pl:193
25911 msgid "Then start up the domain with the new, resized disk:"
25915 #: ../tools/virt-resize.pl:195
25918 " # virsh start guestname\n"
25923 #: ../tools/virt-resize.pl:197
25925 "and check that it still works. See also the L</NOTES> section below for "
25926 "additional information."
25930 #: ../tools/virt-resize.pl:200
25931 msgid "7. Resize LVs etc inside the guest"
25935 #: ../tools/virt-resize.pl:202
25936 msgid "(This can also be done offline using L<guestfish(1)>)"
25940 #: ../tools/virt-resize.pl:204
25942 "Once the guest has booted you should see the new space available, at least "
25943 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
25944 "may need to resize LVs inside PVs, and also resize filesystem types that "
25945 "virt-resize does not know how to expand."
25949 #: ../tools/virt-resize.pl:211
25950 msgid "SHRINKING A VIRTUAL MACHINE DISK"
25954 #: ../tools/virt-resize.pl:213
25956 "Shrinking is somewhat more complex than expanding, and only an overview is "
25961 #: ../tools/virt-resize.pl:216
25963 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
25964 "filesystems). The user has to shrink content before passing the disk image "
25965 "to virt-resize, and virt-resize will check that the content has been shrunk "
25970 #: ../tools/virt-resize.pl:221
25971 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
25975 #: ../tools/virt-resize.pl:223
25977 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
25978 "steps 3 and 4 above to allocate a new disk image."
25982 #: ../tools/virt-resize.pl:226
25984 "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
25988 #: ../tools/virt-resize.pl:229
25989 msgid "IGNORING OR DELETING PARTITIONS"
25993 #: ../tools/virt-resize.pl:231
25995 "virt-resize also gives a convenient way to ignore or delete partitions when "
25996 "copying from the input disk to the output disk. Ignoring a partition speeds "
25997 "up the copy where you don't care about the existing contents of a "
25998 "partition. Deleting a partition removes it completely, but note that it "
25999 "also renumbers any partitions after the one which is deleted, which can "
26000 "leave some guests unbootable."
26004 #: ../tools/virt-resize.pl:238
26005 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
26009 #: ../tools/virt-resize.pl:240
26011 "If the input disk is in qcow2 format, then you may prefer that the output is "
26012 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
26013 "the fly. The output format is simply determined by the format of the empty "
26014 "output container that you provide. Thus to create qcow2 output, use:"
26018 #: ../tools/virt-resize.pl:246
26021 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
26026 #: ../tools/virt-resize.pl:248
26027 msgid "instead of the truncate command (use C<-c> for a compressed disk)."
26031 #: ../tools/virt-resize.pl:250
26032 msgid "Similarly, to get non-sparse raw output use:"
26036 #: ../tools/virt-resize.pl:252
26039 " fallocate -l size outdisk\n"
26044 #: ../tools/virt-resize.pl:254
26046 "(on older systems that don't have the L<fallocate(1)> command use C<dd if=/"
26047 "dev/zero of=outdisk bs=1M count=..>)"
26051 #: ../tools/virt-resize.pl:267
26052 msgid "Display help."
26056 #: ../tools/virt-resize.pl:281
26057 msgid "B<--resize part=size>"
26061 #: ../tools/virt-resize.pl:283
26063 "Resize the named partition (expanding or shrinking it) so that it has the "
26068 #: ../tools/virt-resize.pl:286
26070 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
26071 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
26072 "Exabytes; or as a percentage of the current size; or as a relative number or "
26073 "percentage. For example:"
26077 #: ../tools/virt-resize.pl:291
26080 " --resize /dev/sda2=10G\n"
26085 #: ../tools/virt-resize.pl:293
26088 " --resize /dev/sda4=90%\n"
26093 #: ../tools/virt-resize.pl:295
26096 " --resize /dev/sda2=+1G\n"
26101 #: ../tools/virt-resize.pl:297
26104 " --resize /dev/sda2=-200M\n"
26109 #: ../tools/virt-resize.pl:299
26112 " --resize /dev/sda1=+128K\n"
26117 #: ../tools/virt-resize.pl:301
26120 " --resize /dev/sda1=+10%\n"
26125 #: ../tools/virt-resize.pl:303
26128 " --resize /dev/sda1=-10%\n"
26133 #: ../tools/virt-resize.pl:305
26135 "You can increase the size of any partition. Virt-resize will expand the "
26136 "direct content of the partition if it knows how (see C<--expand> below)."
26140 #: ../tools/virt-resize.pl:309
26142 "You can only I<decrease> the size of partitions that contain filesystems or "
26143 "PVs which have already been shrunk. Virt-resize will check this has been "
26144 "done before proceeding, or else will print an error (see also C<--resize-"
26149 #: ../tools/virt-resize.pl:314 ../tools/virt-resize.pl:406
26150 #: ../tools/virt-resize.pl:423
26151 msgid "You can give this option multiple times."
26155 #: ../tools/virt-resize.pl:320
26156 msgid "B<--resize-force part=size>"
26160 #: ../tools/virt-resize.pl:322
26162 "This is the same as C<--resize> except that it will let you decrease the "
26163 "size of any partition. Generally this means you will lose any data which "
26164 "was at the end of the partition you shrink, but you may not care about that "
26165 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
26166 "as a swap partition)."
26170 #: ../tools/virt-resize.pl:328
26171 msgid "See also the C<--ignore> option."
26175 #: ../tools/virt-resize.pl:334
26176 msgid "B<--expand part>"
26180 #: ../tools/virt-resize.pl:336
26182 "Expand the named partition so it uses up all extra space (space left over "
26183 "after any other resize changes that you request have been done)."
26187 #: ../tools/virt-resize.pl:339
26189 "If virt-resize knows how, it will expand the direct content of the "
26190 "partition. For example, if the partition is an LVM PV, it will expand the "
26191 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
26192 "content it doesn't know about alone."
26196 #: ../tools/virt-resize.pl:344
26197 msgid "Currently virt-resize can resize:"
26201 #: ../tools/virt-resize.pl:350
26203 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
26208 #: ../tools/virt-resize.pl:355
26210 "NTFS filesystems contained directly in a partition, if libguestfs was "
26211 "compiled with support for NTFS."
26215 #: ../tools/virt-resize.pl:358
26217 "The filesystem must have been shut down consistently last time it was used. "
26218 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
26219 "consistency check, so at the first boot after resizing Windows will check "
26224 #: ../tools/virt-resize.pl:365
26226 "LVM PVs (physical volumes). However virt-resize does I<not> resize anything "
26227 "inside the PV. The user will have to resize LVs as desired."
26231 #: ../tools/virt-resize.pl:371 ../tools/virt-resize.pl:393
26232 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
26236 #: ../tools/virt-resize.pl:377
26237 msgid "B<--shrink part>"
26241 #: ../tools/virt-resize.pl:379
26243 "Shrink the named partition until the overall disk image fits in the "
26244 "destination. The named partition B<must> contain a filesystem or PV which "
26245 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
26246 "online tools). Virt-resize will check this and give an error if it has not "
26251 #: ../tools/virt-resize.pl:385
26253 "The amount by which the overall disk must be shrunk (after carrying out all "
26254 "other operations requested by the user) is called the \"deficit\". For "
26255 "example, a straight copy (assume no other operations) from a 5GB disk image "
26256 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
26257 "would give an error unless the user specified a partition to shrink and that "
26258 "partition had more than a gigabyte of free space."
26262 #: ../tools/virt-resize.pl:399
26263 msgid "B<--ignore part>"
26267 #: ../tools/virt-resize.pl:401
26269 "Ignore the named partition. Effectively this means the partition is "
26270 "allocated on the destination disk, but the content is not copied across from "
26271 "the source disk. The content of the partition will be blank (all zero "
26276 #: ../tools/virt-resize.pl:412
26277 msgid "B<--delete part>"
26281 #: ../tools/virt-resize.pl:414
26283 "Delete the named partition. It would be more accurate to describe this as "
26284 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
26285 "the original disk image is left intact."
26289 #: ../tools/virt-resize.pl:418
26291 "Note that when you delete a partition, then anything contained in the "
26292 "partition is also deleted. Furthermore, this causes any partitions that "
26293 "come after to be I<renumbered>, which can easily make your guest unbootable."
26297 #: ../tools/virt-resize.pl:429
26298 msgid "B<--LV-expand logvol>"
26302 #: ../tools/virt-resize.pl:431
26304 "This takes the logical volume and, as a final step, expands it to fill all "
26305 "the space available in its volume group. A typical usage, assuming a Linux "
26306 "guest with a single PV C</dev/sda2> and a root device called C</dev/vg_guest/"
26307 "lv_root> would be:"
26311 #: ../tools/virt-resize.pl:436
26314 " virt-resize indisk outdisk \\\n"
26315 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
26320 #: ../tools/virt-resize.pl:439
26322 "This would first expand the partition (and PV), and then expand the root "
26323 "device to fill the extra space in the PV."
26327 #: ../tools/virt-resize.pl:442
26329 "The contents of the LV are also resized if virt-resize knows how to do "
26330 "that. You can stop virt-resize from trying to expand the content by using "
26331 "the option C<--no-expand-content>."
26335 #: ../tools/virt-resize.pl:446
26336 msgid "Use L<virt-list-filesystems(1)> to list the filesystems in the guest."
26340 #: ../tools/virt-resize.pl:449
26342 "You can give this option multiple times, I<but> it doesn't make sense to do "
26343 "this unless the logical volumes you specify are all in different volume "
26348 #: ../tools/virt-resize.pl:457
26349 msgid "B<--no-copy-boot-loader>"
26353 #: ../tools/virt-resize.pl:459
26355 "By default, virt-resize copies over some sectors at the start of the disk "
26356 "(up to the beginning of the first partition). Commonly these sectors "
26357 "contain the Master Boot Record (MBR) and the boot loader, and are required "
26358 "in order for the guest to boot correctly."
26362 #: ../tools/virt-resize.pl:464
26364 "If you specify this flag, then this initial copy is not done. You may need "
26365 "to reinstall the boot loader in this case."
26369 #: ../tools/virt-resize.pl:472
26370 msgid "B<--no-extra-partition>"
26374 #: ../tools/virt-resize.pl:474
26376 "By default, virt-resize creates an extra partition if there is any extra, "
26377 "unused space after all resizing has happened. Use this option to prevent "
26378 "the extra partition from being created. If you do this then the extra space "
26379 "will be inaccessible until you run fdisk, parted, or some other partitioning "
26380 "tool in the guest."
26384 #: ../tools/virt-resize.pl:480
26386 "Note that if the surplus space is smaller than 10 MB, no extra partition "
26391 #: ../tools/virt-resize.pl:487
26392 msgid "B<--no-expand-content>"
26396 #: ../tools/virt-resize.pl:489
26398 "By default, virt-resize will try to expand the direct contents of "
26399 "partitions, if it knows how (see C<--expand> option above)."
26403 #: ../tools/virt-resize.pl:492
26405 "If you give the C<--no-expand-content> option then virt-resize will not "
26410 #: ../tools/virt-resize.pl:499
26411 msgid "B<-d> | B<--debug>"
26415 #: ../tools/virt-resize.pl:507
26416 msgid "B<-n> | B<--dryrun>"
26420 #: ../tools/virt-resize.pl:509
26421 msgid "Print a summary of what would be done, but don't do anything."
26425 #: ../tools/virt-resize.pl:515
26426 msgid "B<-q> | B<--quiet>"
26430 #: ../tools/virt-resize.pl:517
26431 msgid "Don't print the summary."
26435 #: ../tools/virt-resize.pl:525
26437 "Specify the format of the input disk image. If this flag is not given then "
26438 "it is auto-detected from the image itself."
26442 #: ../tools/virt-resize.pl:531
26444 "Note that this option I<does not> affect the output format. See L</QCOW2 "
26445 "AND NON-SPARSE RAW FORMATS>."
26449 #: ../tools/virt-resize.pl:538
26450 msgid "B<--output-format> raw"
26454 #: ../tools/virt-resize.pl:540
26456 "Specify the format of the output disk image. If this flag is not given then "
26457 "it is auto-detected from the image itself."
26461 #: ../tools/virt-resize.pl:546
26463 "Note that you still need to create the output disk with the right format. "
26464 "See L</QCOW2 AND NON-SPARSE RAW FORMATS>."
26468 #: ../tools/virt-resize.pl:1422 ../tools/virt-rescue.pl:90
26473 #: ../tools/virt-resize.pl:1424
26474 msgid "\"Partition 1 does not end on cylinder boundary.\""
26478 #: ../tools/virt-resize.pl:1426
26480 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
26481 "means the partitions will not be aligned to the ancient CHS geometry. "
26482 "However CHS geometry is meaningless for disks manufactured since the early "
26483 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
26484 "cylinders is not required by any modern operating system."
26488 #: ../tools/virt-resize.pl:1433
26489 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
26493 #: ../tools/virt-resize.pl:1435
26495 "In Windows Vista and later versions, Microsoft switched to using a separate "
26496 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
26497 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
26498 "the boot partition. Doing so seems to break the guest completely. However "
26499 "expanding the second partition (ie. C: drive) should work."
26503 #: ../tools/virt-resize.pl:1442
26505 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
26506 "NTFS partitions have been expanded. This is just a safety check and (unless "
26507 "it find errors) is nothing to worry about."
26511 #: ../tools/virt-resize.pl:1446
26512 msgid "GUEST BOOT STUCK AT \"GRUB\""
26516 #: ../tools/virt-resize.pl:1448
26518 "If a Linux guest does not boot after resizing, and the boot is stuck after "
26519 "printing C<GRUB> on the console, try reinstalling grub. This sometimes "
26520 "happens on older (RHEL 5-era) guests, for reasons we don't fully understand, "
26521 "although we think is to do with partition alignment."
26525 #: ../tools/virt-resize.pl:1453
26528 " guestfish -i -a newdisk\n"
26529 " ><fs> cat /boot/grub/device.map\n"
26530 " # check the contents of this file are sensible or\n"
26531 " # edit the file if necessary\n"
26532 " ><fs> grub-install / /dev/vda\n"
26538 #: ../tools/virt-resize.pl:1460
26540 "For more flexible guest reconfiguration, including if you need to specify "
26541 "other parameters to grub-install, use L<virt-rescue(1)>."
26545 #: ../tools/virt-resize.pl:1463
26546 msgid "ALTERNATIVE TOOLS"
26550 #: ../tools/virt-resize.pl:1465
26552 "There are several proprietary tools for resizing partitions. We won't "
26553 "mention any here."
26557 #: ../tools/virt-resize.pl:1468
26559 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
26560 "operations on disk images. They can resize and move partitions, but I don't "
26561 "think they can do anything with the contents, and they certainly don't "
26566 #: ../tools/virt-resize.pl:1473
26568 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
26569 "but at a much lower level. You will probably end up hand-calculating sector "
26570 "offsets, which is something that virt-resize was designed to avoid. If you "
26571 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
26576 #: ../tools/virt-resize.pl:1488
26578 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)>, L<virt-df(1)>, "
26579 "L<guestfs(3)>, L<guestfish(1)>, L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, "
26580 "L<resize2fs(8)>, L<ntfsresize(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)"
26581 ">, L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, "
26582 "L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
26586 #: ../tools/virt-list-filesystems.pl:32
26588 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
26592 #: ../tools/virt-list-filesystems.pl:36
26595 " virt-list-filesystems [--options] domname\n"
26600 #: ../tools/virt-list-filesystems.pl:38
26603 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
26608 #: ../tools/virt-list-filesystems.pl:42
26610 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
26611 "are contained in a virtual machine or disk image."
26615 #: ../tools/virt-list-filesystems.pl:46
26617 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
26618 "functionality. For more complex cases you should look at the L<guestfish(1)"
26623 #: ../tools/virt-list-filesystems.pl:105
26625 "With this option, C<virt-list-filesystems> displays the type of each "
26626 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
26630 #: ../tools/virt-list-filesystems.pl:112
26631 msgid "B<-a> | B<--all>"
26635 #: ../tools/virt-list-filesystems.pl:114
26637 "Normally we only show mountable filesystems. If this option is given then "
26638 "swap devices are shown too."
26642 #: ../tools/virt-list-filesystems.pl:218
26644 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-list-"
26645 "partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)"
26646 ">, L<http://libguestfs.org/>."
26650 #: ../tools/virt-cat.pl:34
26651 msgid "virt-cat - Display a file in a virtual machine"
26655 #: ../tools/virt-cat.pl:38
26658 " virt-cat [--options] domname file\n"
26663 #: ../tools/virt-cat.pl:40
26666 " virt-cat [--options] disk.img [disk.img ...] file\n"
26671 #: ../tools/virt-cat.pl:44
26673 "C<virt-cat> is a command line tool to display the contents of C<file> where "
26674 "C<file> exists in the named virtual machine (or disk image)."
26678 #: ../tools/virt-cat.pl:47
26680 "C<virt-cat> can be used to quickly view a single file. To edit a file, use "
26681 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
26686 #: ../tools/virt-cat.pl:53
26688 "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
26692 #: ../tools/virt-cat.pl:56
26695 " virt-cat mydomain /etc/fstab\n"
26700 #: ../tools/virt-cat.pl:58
26701 msgid "List syslog messages from a VM:"
26705 #: ../tools/virt-cat.pl:60
26708 " virt-cat mydomain /var/log/messages | tail\n"
26713 #: ../tools/virt-cat.pl:62
26714 msgid "Find out what DHCP IP address a VM acquired:"
26718 #: ../tools/virt-cat.pl:64
26721 " virt-cat mydomain /var/log/messages | grep 'dhclient: bound to' | tail\n"
26726 #: ../tools/virt-cat.pl:66
26727 msgid "Find out what packages were recently installed:"
26731 #: ../tools/virt-cat.pl:68
26734 " virt-cat mydomain /var/log/yum.log | tail\n"
26739 #: ../tools/virt-cat.pl:70
26740 msgid "Find out who is logged on inside a virtual machine:"
26744 #: ../tools/virt-cat.pl:72
26747 " virt-cat mydomain /var/run/utmp > /tmp/utmp\n"
26753 #: ../tools/virt-cat.pl:75
26754 msgid "or who was logged on:"
26758 #: ../tools/virt-cat.pl:77
26761 " virt-cat mydomain /var/log/wtmp > /tmp/wtmp\n"
26762 " last -f /tmp/wtmp\n"
26767 #: ../tools/virt-cat.pl:190
26769 "L<guestfs(3)>, L<guestfish(1)>, L<virt-edit(1)>, L<Sys::Guestfs(3)>, L<Sys::"
26770 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
26774 #: ../tools/virt-tar.pl:34
26775 msgid "virt-tar - Extract or upload files to a virtual machine"
26779 #: ../tools/virt-tar.pl:38
26782 " virt-tar [--options] -x domname directory tarball\n"
26787 #: ../tools/virt-tar.pl:40
26790 " virt-tar [--options] -u domname tarball directory\n"
26795 #: ../tools/virt-tar.pl:42
26798 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
26803 #: ../tools/virt-tar.pl:44
26806 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
26811 #: ../tools/virt-tar.pl:48
26812 msgid "Download C</home> from the VM into a local tarball:"
26816 #: ../tools/virt-tar.pl:50
26819 " virt-tar -x domname /home home.tar\n"
26824 #: ../tools/virt-tar.pl:52
26827 " virt-tar -zx domname /home home.tar.gz\n"
26832 #: ../tools/virt-tar.pl:54
26833 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
26837 #: ../tools/virt-tar.pl:56
26840 " virt-tar -u domname uploadstuff.tar /tmp\n"
26845 #: ../tools/virt-tar.pl:58
26848 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
26853 #: ../tools/virt-tar.pl:62
26855 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
26856 "virtual machines. If you do this, you risk disk corruption in the VM. "
26857 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
26861 #: ../tools/virt-tar.pl:67
26863 "You can use C<-x> (extract) on live virtual machines, but you might get "
26864 "inconsistent results or errors if there is filesystem activity inside the "
26865 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
26866 "work, but the only way to guarantee consistent results is if the virtual "
26867 "machine is shut down."
26871 #: ../tools/virt-tar.pl:75
26873 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
26874 "parts of a guest filesystem. There are many possibilities: making backups, "
26875 "uploading data files, snooping on guest activity, fixing or customizing "
26880 #: ../tools/virt-tar.pl:80
26882 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
26883 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
26884 "should look at the L<guestfish(1)> tool."
26888 #: ../tools/virt-tar.pl:84
26890 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
26891 "its contents (recursively) from the virtual machine into a local tarball. "
26892 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
26893 "virtual machine. You cannot use these two options together."
26897 #: ../tools/virt-tar.pl:90
26899 "In addition, you may need to use the C<-z> (gZip) option to enable "
26900 "compression. When uploading, you have to specify C<-z> if the upload file "
26901 "is compressed because virt-tar won't detect this on its own."
26905 #: ../tools/virt-tar.pl:94
26907 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
26908 "example it cannot do PKZip files or bzip2 compression. If you want that "
26909 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
26910 "the L<libguestfs(3)> API)."
26914 #: ../tools/virt-tar.pl:152
26915 msgid "B<-x> | B<--extract> | B<--download>"
26919 #: ../tools/virt-tar.pl:154
26920 msgid "B<-u> | B<--upload>"
26924 #: ../tools/virt-tar.pl:156
26926 "Use C<-x> to extract (download) a directory from a virtual machine to a "
26931 #: ../tools/virt-tar.pl:159
26933 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
26934 "Please read the L</WARNING> section above before using this option."
26938 #: ../tools/virt-tar.pl:163
26939 msgid "You must specify exactly one of these options."
26943 #: ../tools/virt-tar.pl:169
26944 msgid "B<-z> | B<--gzip>"
26948 #: ../tools/virt-tar.pl:171
26949 msgid "Specify that the input or output tarball is gzip-compressed."
26953 #: ../tools/virt-tar.pl:285
26955 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<Sys::"
26956 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
26961 #: ../tools/virt-rescue.pl:33
26962 msgid "virt-rescue - Run a rescue shell on a virtual machine"
26966 #: ../tools/virt-rescue.pl:37
26969 " virt-rescue [--options] domname\n"
26974 #: ../tools/virt-rescue.pl:39
26977 " virt-rescue [--options] disk.img [disk.img ...]\n"
26982 #: ../tools/virt-rescue.pl:43
26984 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
26985 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
26986 "you from doing this, but doesn't catch all cases."
26990 #: ../tools/virt-rescue.pl:47
26992 "However if you use the I<--ro> (read only) option, then you can attach a "
26993 "shell to a live virtual machine. The results might be strange or "
26994 "inconsistent at times but you won't get disk corruption."
26998 #: ../tools/virt-rescue.pl:53
27000 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
27001 "need for a CD. virt-rescue gives you a rescue shell and some simple "
27002 "recovery tools which you can use to examine or rescue a virtual machine or "
27007 #: ../tools/virt-rescue.pl:58
27009 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
27010 "on disk image(s):"
27014 #: ../tools/virt-rescue.pl:61
27017 " virt-rescue GuestName\n"
27022 #: ../tools/virt-rescue.pl:63
27025 " virt-rescue --ro /path/to/disk.img\n"
27030 #: ../tools/virt-rescue.pl:65
27033 " virt-rescue /dev/sdc\n"
27038 #: ../tools/virt-rescue.pl:67
27039 msgid "For live VMs you I<must> use the --ro option."
27043 #: ../tools/virt-rescue.pl:69
27045 "When you run virt-rescue on a virtual machine or disk image, you are placed "
27046 "in an interactive bash shell where you can use many ordinary Linux "
27047 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
27048 "appliance. You must mount the virtual machine's filesystems by hand. There "
27049 "is an empty directory called C</sysroot> where you can mount filesystems."
27053 #: ../tools/virt-rescue.pl:76
27055 "In the example below, we list logical volumes, then choose one to mount "
27056 "under C</sysroot>:"
27060 #: ../tools/virt-rescue.pl:79
27064 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
27065 " lv_root vg_f11x64 -wi-a- 8.83G\n"
27066 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
27067 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
27068 " ><rescue> ls /sysroot\n"
27073 #: ../tools/virt-rescue.pl:86
27075 "If you don't know what filesystems are available on the virtual machine then "
27076 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
27080 #: ../tools/virt-rescue.pl:92
27082 "Virt-rescue can be used on I<any> disk image file or device, not just a "
27083 "virtual machine. For example you can use it on a blank file if you want to "
27084 "partition that file (although we would recommend using L<guestfish(1)> "
27085 "instead as it is more suitable for this purpose). You can even use virt-"
27086 "rescue on things like SD cards."
27090 #: ../tools/virt-rescue.pl:98
27092 "This tool is just designed for quick interactive hacking on a virtual "
27093 "machine. For more structured access to a virtual machine disk image, you "
27094 "should use L<guestfs(3)>. To get a structured shell that you can use to "
27095 "make scripted changes to guests, use L<guestfish(1)>."
27099 #: ../tools/virt-rescue.pl:127
27100 msgid "B<--append kernelopts>"
27104 #: ../tools/virt-rescue.pl:129
27105 msgid "Pass additional options to the rescue kernel."
27109 #: ../tools/virt-rescue.pl:164
27110 msgid "B<--memsize MB> | B<-m MB>"
27114 #: ../tools/virt-rescue.pl:166
27116 "Change the amount of memory allocated to the rescue system. The default is "
27117 "set by libguestfs and is small but adequate for running system tools. The "
27118 "occasional program might need more memory. The parameter is specified in "
27123 #: ../tools/virt-rescue.pl:175
27124 msgid "B<--ro> | B<-r>"
27128 #: ../tools/virt-rescue.pl:177
27129 msgid "Open the image read-only."
27133 #: ../tools/virt-rescue.pl:189
27135 "Enable SELinux in the rescue appliance. You should read L<guestfs(3)/"
27136 "SELINUX> before using this option."
27140 #: ../tools/virt-rescue.pl:247
27142 "Several environment variables affect virt-rescue. See L<guestfs(3)/"
27143 "ENVIRONMENT VARIABLES> for the complete list."
27147 #: ../tools/virt-rescue.pl:259
27149 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::"
27150 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
27154 #: ../tools/virt-make-fs.pl:37
27155 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
27159 #: ../tools/virt-make-fs.pl:41
27162 " virt-make-fs [--options] input.tar output.img\n"
27167 #: ../tools/virt-make-fs.pl:43
27170 " virt-make-fs [--options] input.tar.gz output.img\n"
27175 #: ../tools/virt-make-fs.pl:45
27178 " virt-make-fs [--options] directory output.img\n"
27183 #: ../tools/virt-make-fs.pl:49
27185 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
27186 "archive or some files in a directory. It is similar to tools like L<mkisofs"
27187 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
27188 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
27189 "you want to attach these filesystems to existing virtual machines (eg. to "
27190 "import large amounts of read-only data to a VM)."
27194 #: ../tools/virt-make-fs.pl:57
27195 msgid "Basic usage is:"
27199 #: ../tools/virt-make-fs.pl:59
27202 " virt-make-fs input output\n"
27207 #: ../tools/virt-make-fs.pl:61
27209 "where C<input> is either a directory containing files that you want to add, "
27210 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
27211 "C<output> is a disk image. The input type is detected automatically. The "
27212 "output disk image defaults to a raw ext2 image unless you specify extra "
27213 "flags (see L</OPTIONS> below)."
27217 #: ../tools/virt-make-fs.pl:67
27218 msgid "EXTRA SPACE"
27222 #: ../tools/virt-make-fs.pl:69
27224 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
27225 "the files that it contains, but might have extra space. Depending on how "
27226 "you are going to use the output, you might think this extra space is wasted "
27227 "and want to minimize it, or you might want to leave space so that more files "
27228 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
27229 "but you can use the C<--size> flag to leave space in the filesystem if you "
27234 #: ../tools/virt-make-fs.pl:77
27236 "An alternative way to leave extra space but not make the output image any "
27237 "bigger is to use an alternative disk image format (instead of the default "
27238 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
27239 "image format (check your hypervisor supports this before using it). This "
27240 "allows you to choose a large C<--size> but the extra space won't actually be "
27241 "allocated in the image until you try to store something in it."
27245 #: ../tools/virt-make-fs.pl:85
27247 "Don't forget that you can also use local commands including L<resize2fs(8)> "
27248 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-"
27249 "resize to build another image from scratch."
27253 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
27254 #: ../tools/virt-make-fs.pl:142
27259 #: ../tools/virt-make-fs.pl:91
27262 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
27267 #: ../tools/virt-make-fs.pl:93
27268 msgid "FILESYSTEM TYPE"
27272 #: ../tools/virt-make-fs.pl:95
27274 "The default filesystem type is C<ext2>. Just about any filesystem type that "
27275 "libguestfs supports can be used (but I<not> read-only formats like "
27276 "ISO9660). Here are some of the more common choices:"
27280 #: ../tools/virt-make-fs.pl:101
27285 #: ../tools/virt-make-fs.pl:103
27287 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
27288 "you are not going to use the filesystem in a way that requires the journal, "
27289 "then this is just wasted overhead."
27293 #: ../tools/virt-make-fs.pl:107
27294 msgid "I<ntfs> or I<vfat>"
27298 #: ../tools/virt-make-fs.pl:109
27299 msgid "Useful if exporting data to a Windows guest."
27303 #: ../tools/virt-make-fs.pl:111
27305 "I<Note for vfat>: The tar archive or local directory must only contain files "
27306 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
27307 "program running within libguestfs is unable to change the ownership of non-"
27308 "root files, since vfat itself does not support this."
27312 #: ../tools/virt-make-fs.pl:116
27317 #: ../tools/virt-make-fs.pl:118
27319 "Lower overhead than C<ext2>, but certain limitations on filename length and "
27320 "total filesystem size."
27324 #: ../tools/virt-make-fs.pl:125
27327 " virt-make-fs --type=minix input minixfs.img\n"
27332 #: ../tools/virt-make-fs.pl:127
27333 msgid "TO PARTITION OR NOT TO PARTITION"
27337 #: ../tools/virt-make-fs.pl:129
27338 msgid "Optionally virt-make-fs can add a partition table to the output disk."
27342 #: ../tools/virt-make-fs.pl:131
27344 "Adding a partition can make the disk image more compatible with certain "
27345 "virtualized operating systems which don't expect to see a filesystem "
27346 "directly located on a block device (Linux doesn't care and will happily "
27347 "handle both types)."
27351 #: ../tools/virt-make-fs.pl:136
27353 "On the other hand, if you have a partition table then the output image is no "
27354 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
27355 "directly on a partitioned disk image. (However libguestfs tools such as "
27356 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
27360 #: ../tools/virt-make-fs.pl:144
27361 msgid "Add an MBR partition:"
27365 #: ../tools/virt-make-fs.pl:146
27368 " virt-make-fs --partition -- input disk.img\n"
27373 #: ../tools/virt-make-fs.pl:148
27375 "If the output disk image could be terabyte-sized or larger, it's better to "
27376 "use an EFI/GPT-compatible partition table:"
27380 #: ../tools/virt-make-fs.pl:151
27383 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
27388 #: ../tools/virt-make-fs.pl:179
27389 msgid "Enable debugging information."
27393 #: ../tools/virt-make-fs.pl:185
27394 msgid "B<--size=E<lt>NE<gt>>"
27398 #: ../tools/virt-make-fs.pl:187
27399 msgid "B<--size=+E<lt>NE<gt>>"
27403 #: ../tools/virt-make-fs.pl:189
27404 msgid "B<-s E<lt>NE<gt>>"
27408 #: ../tools/virt-make-fs.pl:191
27409 msgid "B<-s +E<lt>NE<gt>>"
27413 #: ../tools/virt-make-fs.pl:193
27415 "Use the C<--size> (or C<-s>) option to choose the size of the output image."
27419 #: ../tools/virt-make-fs.pl:196
27421 "If this option is I<not> given, then the output image will be just large "
27422 "enough to contain all the files, with not much wasted space."
27426 #: ../tools/virt-make-fs.pl:199
27428 "To choose a fixed size output disk, specify an absolute number followed by b/"
27429 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
27430 "Petabytes or Exabytes. This must be large enough to contain all the input "
27431 "files, else you will get an error."
27435 #: ../tools/virt-make-fs.pl:204
27437 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
27438 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
27439 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
27440 "the input files, and (approximately) an extra 200 MB free space."
27444 #: ../tools/virt-make-fs.pl:210
27446 "Note that virt-make-fs estimates free space, and therefore will not produce "
27447 "filesystems containing precisely the free space requested. (It is much more "
27448 "expensive and time-consuming to produce a filesystem which has precisely the "
27449 "desired free space)."
27453 #: ../tools/virt-make-fs.pl:219
27454 msgid "B<--format=E<lt>fmtE<gt>>"
27458 #: ../tools/virt-make-fs.pl:221
27459 msgid "B<-F E<lt>fmtE<gt>>"
27463 #: ../tools/virt-make-fs.pl:223
27464 msgid "Choose the output disk image format."
27468 #: ../tools/virt-make-fs.pl:225
27469 msgid "The default is C<raw> (raw disk image)."
27473 #: ../tools/virt-make-fs.pl:227
27475 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
27476 "that would really make sense here is C<qcow2>."
27480 #: ../tools/virt-make-fs.pl:234
27481 msgid "B<--type=E<lt>fsE<gt>>"
27485 #: ../tools/virt-make-fs.pl:236
27486 msgid "B<-t E<lt>fsE<gt>>"
27490 #: ../tools/virt-make-fs.pl:238
27491 msgid "Choose the output filesystem type."
27495 #: ../tools/virt-make-fs.pl:240
27496 msgid "The default is C<ext2>."
27500 #: ../tools/virt-make-fs.pl:242
27502 "Any filesystem which is supported read-write by libguestfs can be used here."
27506 #: ../tools/virt-make-fs.pl:249
27507 msgid "B<--partition>"
27511 #: ../tools/virt-make-fs.pl:251
27512 msgid "B<--partition=E<lt>parttypeE<gt>>"
27516 #: ../tools/virt-make-fs.pl:253
27518 "If specified, this flag adds an MBR partition table to the output disk image."
27522 #: ../tools/virt-make-fs.pl:256
27524 "You can change the partition table type, eg. C<--partition=gpt> for large "
27529 #: ../tools/virt-make-fs.pl:259
27531 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
27532 "might consider the next parameter to be the partition type. For example:"
27536 #: ../tools/virt-make-fs.pl:263
27539 " virt-make-fs --partition input.tar ...\n"
27544 #: ../tools/virt-make-fs.pl:265
27546 "would cause virt-make-fs to think you wanted to use a partition type of "
27547 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
27548 "dash) between options and the input file argument:"
27552 #: ../tools/virt-make-fs.pl:269
27555 " virt-make-fs --partition -- input.tar ...\n"
27560 #: ../tools/virt-make-fs.pl:536
27562 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<mkisofs(1)>, "
27563 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
27564 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
27568 #: ../tools/virt-make-fs.pl:553
27571 " export LIBGUESTFS_DEBUG=1\n"
27572 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
27577 #: ../tools/virt-make-fs.pl:556
27579 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
27584 #: ../tools/virt-list-partitions.pl:32
27586 "virt-list-partitions - List partitions in a virtual machine or disk image"
27590 #: ../tools/virt-list-partitions.pl:36
27593 " virt-list-partitions [--options] domname\n"
27598 #: ../tools/virt-list-partitions.pl:38
27601 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
27606 #: ../tools/virt-list-partitions.pl:42
27608 "C<virt-list-partitions> is a command line tool to list the partitions that "
27609 "are contained in a virtual machine or disk image. It is mainly useful as a "
27610 "first step to using L<virt-resize(1)>."
27614 #: ../tools/virt-list-partitions.pl:47
27616 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
27617 "functionality. For more complex cases you should look at the L<guestfish(1)"
27622 #: ../tools/virt-list-partitions.pl:104
27623 msgid "B<-h> | B<--human-readable>"
27627 #: ../tools/virt-list-partitions.pl:106
27628 msgid "Show sizes in human-readable form (eg. \"1G\")."
27632 #: ../tools/virt-list-partitions.pl:114
27634 "With this option, C<virt-list-partitions> displays the type and size of each "
27635 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
27639 #: ../tools/virt-list-partitions.pl:121
27640 msgid "B<-t> | B<--total>"
27644 #: ../tools/virt-list-partitions.pl:123
27646 "Display the total size of each block device (as a separate row or rows)."
27650 #: ../tools/virt-list-partitions.pl:256
27652 "L<guestfs(3)>, L<guestfish(1)>, L<virt-list-filesystems(1)>, L<virt-resize(1)"
27653 ">, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://"
27654 "libguestfs.org/>."