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-27 12:50+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:20
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:1143 ../src/guestfs.pod:1148
782 #: ../src/guestfs.pod:1152 ../src/guestfs.pod:1368 ../src/guestfs.pod:1373
783 #: ../src/guestfs.pod:1377 ../src/guestfs.pod:1479 ../src/guestfs.pod:1483
784 #: ../src/guestfs.pod:1487 ../src/guestfs.pod:1492 ../src/guestfs.pod:1500
785 #: ../src/guestfs.pod:1519 ../src/guestfs.pod:1527 ../src/guestfs.pod:1757
786 #: ../src/guestfs.pod:1763 ../src/guestfs.pod:1768 ../src/guestfs.pod:1774
787 #: ../src/guestfs.pod:1881 ../src/guestfs.pod:1885 ../src/guestfs.pod:1889
788 #: ../src/guestfs.pod:1893 ../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
1480 "Update: Autosync is enabled by default for all API users starting from "
1481 "libguestfs 1.5.24."
1485 #: ../src/guestfs.pod:707
1486 msgid "Mount option C<-o sync> should not be the default."
1490 #: ../src/guestfs.pod:709
1492 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1493 "However C<-o sync> does not add any reliability benefit, but does have a "
1494 "very large performance impact."
1498 #: ../src/guestfs.pod:713
1500 "The work around is to use L</guestfs_mount_options> and set the mount "
1501 "options that you actually want to use."
1505 #: ../src/guestfs.pod:716
1506 msgid "Read-only should be the default."
1510 #: ../src/guestfs.pod:718
1512 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1513 "specify I<--rw> if you want to make changes to the image."
1517 #: ../src/guestfs.pod:721
1518 msgid "This would reduce the potential to corrupt live VM images."
1522 #: ../src/guestfs.pod:723
1524 "Note that many filesystems change the disk when you just mount and unmount, "
1525 "even if you didn't perform any writes. You need to use L</"
1526 "guestfs_add_drive_ro> to guarantee that the disk is not changed."
1530 #: ../src/guestfs.pod:727
1531 msgid "guestfish command line is hard to use."
1535 #: ../src/guestfs.pod:729
1537 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1538 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1539 "exist, so it fails. In earlier versions of guestfish the error message was "
1540 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1541 "we should have used C<guestfish -c command> to run commands."
1545 #: ../src/guestfs.pod:736
1546 msgid "guestfish megabyte modifiers don't work right on all commands"
1550 #: ../src/guestfs.pod:738
1552 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1553 "other modifiers). What guestfish actually does is to multiply the number "
1554 "part by the modifier part and pass the result to the C API. However this "
1555 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1556 "expecting some other unit (eg. megabytes)."
1560 #: ../src/guestfs.pod:745
1561 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1565 #: ../src/guestfs.pod:747
1568 " lvcreate LV VG 100M\n"
1573 #: ../src/guestfs.pod:749
1575 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1576 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1577 "megabytes * megabytes) logical volume. The error message you get from this "
1578 "is also a little obscure."
1582 #: ../src/guestfs.pod:754
1584 "This could be fixed in the generator by specially marking parameters and "
1585 "return values which take bytes or other units."
1589 #: ../src/guestfs.pod:757
1590 msgid "Library should return errno with error messages."
1594 #: ../src/guestfs.pod:759
1596 "It would be a nice-to-have to be able to get the original value of 'errno' "
1597 "from inside the appliance along error paths (where set). Currently "
1598 "L<guestmount(1)> goes through hoops to try to reverse the error message "
1599 "string into an errno, see the function error() in fuse/guestmount.c."
1603 #: ../src/guestfs.pod:765
1605 "In libguestfs 1.5.4, the protocol was changed so that the Linux errno is "
1606 "sent back from the daemon."
1610 #: ../src/guestfs.pod:768
1611 msgid "Ambiguity between devices and paths"
1615 #: ../src/guestfs.pod:770
1617 "There is a subtle ambiguity in the API between a device name (eg. C</dev/"
1618 "sdb2>) and a similar pathname. A file might just happen to be called "
1619 "C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1623 #: ../src/guestfs.pod:775
1625 "In the current API we usually resolve this ambiguity by having two separate "
1626 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1627 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1628 "detecting if the path supplied begins with C</dev/>."
1632 #: ../src/guestfs.pod:781
1634 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1635 "make paths/devices into structured names. One way to do this would be to "
1636 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1637 "aspect of grub. Another way would be to use a structured type, equivalent "
1638 "to this OCaml type:"
1642 #: ../src/guestfs.pod:787
1645 " type path = Path of string | Device of int | Partition of int * int\n"
1650 #: ../src/guestfs.pod:789
1651 msgid "which would allow you to pass arguments like:"
1655 #: ../src/guestfs.pod:791
1658 " Path \"/foo/bar\"\n"
1659 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
1660 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
1661 " Path \"/dev/sdb2\" (* not a device *)\n"
1666 #: ../src/guestfs.pod:796
1668 "As you can see there are still problems to resolve even with this "
1669 "representation. Also consider how it might work in guestfish."
1673 #: ../src/guestfs.pod:801
1674 msgid "PROTOCOL LIMITS"
1678 #: ../src/guestfs.pod:803
1680 "Internally libguestfs uses a message-based protocol to pass API calls and "
1681 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1682 "plenty more detail about this). The maximum message size used by the "
1683 "protocol is slightly less than 4 MB. For some API calls you may need to be "
1684 "aware of this limit. The API calls which may be affected are individually "
1685 "documented, with a link back to this section of the documentation."
1689 #: ../src/guestfs.pod:811
1691 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1692 "a simple string. Because this string is at some point internally encoded as "
1693 "a message, the maximum size that it can return is slightly under 4 MB. If "
1694 "the requested file is larger than this then you will get an error."
1698 #: ../src/guestfs.pod:817
1700 "In order to transfer large files into and out of the guest filesystem, you "
1701 "need to use particular calls that support this. The sections L</UPLOADING> "
1702 "and L</DOWNLOADING> document how to do this."
1706 #: ../src/guestfs.pod:821
1708 "You might also consider mounting the disk image using our FUSE filesystem "
1709 "support (L<guestmount(1)>)."
1713 #: ../src/guestfs.pod:824
1714 msgid "KEYS AND PASSPHRASES"
1718 #: ../src/guestfs.pod:826
1720 "Certain libguestfs calls take a parameter that contains sensitive key "
1721 "material, passed in as a C string."
1725 #: ../src/guestfs.pod:829
1727 "In the future we would hope to change the libguestfs implementation so that "
1728 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1729 "swap. However this is I<not> done at the moment, because of the complexity "
1730 "of such an implementation."
1734 #: ../src/guestfs.pod:834
1736 "Therefore you should be aware that any key parameter you pass to libguestfs "
1737 "might end up being written out to the swap partition. If this is a concern, "
1738 "scrub the swap partition or don't use libguestfs on encrypted devices."
1742 #: ../src/guestfs.pod:839
1743 msgid "CONNECTION MANAGEMENT"
1747 #: ../src/guestfs.pod:841
1752 #: ../src/guestfs.pod:843
1754 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
1755 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
1756 "handle and release all resources used."
1760 #: ../src/guestfs.pod:847
1762 "For information on using multiple handles and threads, see the section L</"
1763 "MULTIPLE HANDLES AND MULTIPLE THREADS> below."
1767 #: ../src/guestfs.pod:850
1768 msgid "guestfs_create"
1772 #: ../src/guestfs.pod:852
1775 " guestfs_h *guestfs_create (void);\n"
1780 #: ../src/guestfs.pod:854
1781 msgid "Create a connection handle."
1785 #: ../src/guestfs.pod:856
1787 "You have to call L</guestfs_add_drive_opts> (or one of the equivalent calls) "
1788 "on the handle at least once."
1792 #: ../src/guestfs.pod:859
1794 "This function returns a non-NULL pointer to a handle on success or NULL on "
1799 #: ../src/guestfs.pod:862
1800 msgid "After configuring the handle, you have to call L</guestfs_launch>."
1804 #: ../src/guestfs.pod:864
1806 "You may also want to configure error handling for the handle. See L</ERROR "
1807 "HANDLING> section below."
1811 #: ../src/guestfs.pod:867
1812 msgid "guestfs_close"
1816 #: ../src/guestfs.pod:869
1819 " void guestfs_close (guestfs_h *g);\n"
1824 #: ../src/guestfs.pod:871
1825 msgid "This closes the connection handle and frees up all resources used."
1829 #: ../src/guestfs.pod:873
1830 msgid "ERROR HANDLING"
1834 #: ../src/guestfs.pod:875
1836 "The convention in all functions that return C<int> is that they return C<-1> "
1837 "to indicate an error. You can get additional information on errors by "
1838 "calling L</guestfs_last_error> and/or by setting up an error handler with L</"
1839 "guestfs_set_error_handler>."
1843 #: ../src/guestfs.pod:880
1844 msgid "The default error handler prints the information string to C<stderr>."
1848 #: ../src/guestfs.pod:882
1850 "Out of memory errors are handled differently. The default action is to call "
1851 "L<abort(3)>. If this is undesirable, then you can set a handler using L</"
1852 "guestfs_set_out_of_memory_handler>."
1856 #: ../src/guestfs.pod:886
1857 msgid "guestfs_last_error"
1861 #: ../src/guestfs.pod:888
1864 " const char *guestfs_last_error (guestfs_h *g);\n"
1869 #: ../src/guestfs.pod:890
1871 "This returns the last error message that happened on C<g>. If there has not "
1872 "been an error since the handle was created, then this returns C<NULL>."
1876 #: ../src/guestfs.pod:894
1878 "The lifetime of the returned string is until the next error occurs, or L</"
1879 "guestfs_close> is called."
1883 #: ../src/guestfs.pod:897
1885 "The error string is not localized (ie. is always in English), because this "
1886 "makes searching for error messages in search engines give the largest number "
1891 #: ../src/guestfs.pod:901
1892 msgid "guestfs_set_error_handler"
1896 #: ../src/guestfs.pod:903
1899 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
1901 " const char *msg);\n"
1902 " void guestfs_set_error_handler (guestfs_h *g,\n"
1903 " guestfs_error_handler_cb cb,\n"
1909 #: ../src/guestfs.pod:910
1911 "The callback C<cb> will be called if there is an error. The parameters "
1912 "passed to the callback are an opaque data pointer and the error message "
1917 #: ../src/guestfs.pod:914
1919 "Note that the message string C<msg> is freed as soon as the callback "
1920 "function returns, so if you want to stash it somewhere you must make your "
1925 #: ../src/guestfs.pod:918
1926 msgid "The default handler prints messages on C<stderr>."
1930 #: ../src/guestfs.pod:920
1931 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
1935 #: ../src/guestfs.pod:922
1936 msgid "guestfs_get_error_handler"
1940 #: ../src/guestfs.pod:924
1943 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
1944 " void **opaque_rtn);\n"
1949 #: ../src/guestfs.pod:927
1950 msgid "Returns the current error handler callback."
1954 #: ../src/guestfs.pod:929
1955 msgid "guestfs_set_out_of_memory_handler"
1959 #: ../src/guestfs.pod:931
1962 " typedef void (*guestfs_abort_cb) (void);\n"
1963 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
1964 " guestfs_abort_cb);\n"
1969 #: ../src/guestfs.pod:935
1971 "The callback C<cb> will be called if there is an out of memory situation. "
1972 "I<Note this callback must not return>."
1976 #: ../src/guestfs.pod:938
1977 msgid "The default is to call L<abort(3)>."
1981 #: ../src/guestfs.pod:940
1983 "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
1987 #: ../src/guestfs.pod:943
1988 msgid "guestfs_get_out_of_memory_handler"
1992 #: ../src/guestfs.pod:945
1995 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
2000 #: ../src/guestfs.pod:947
2001 msgid "This returns the current out of memory handler."
2005 #: ../src/guestfs.pod:949
2010 #: ../src/guestfs.pod:951
2012 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
2017 #: ../src/guestfs.pod:954
2019 "By default it looks for these in the directory C<$libdir/guestfs> (eg. C</"
2020 "usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
2024 #: ../src/guestfs.pod:957
2026 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
2027 "to change the directories that libguestfs will search in. The value is a "
2028 "colon-separated list of paths. The current directory is I<not> searched "
2029 "unless the path contains an empty element or C<.>. For example "
2030 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
2031 "then C</usr/lib/guestfs>."
2035 #: ../src/guestfs.pod:964
2036 msgid "HIGH-LEVEL API ACTIONS"
2040 #: ../src/guestfs.pod:966
2041 msgid "ABI GUARANTEE"
2045 #: ../src/guestfs.pod:968
2047 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
2048 "actions as outlined in this section. Although we will deprecate some "
2049 "actions, for example if they get replaced by newer calls, we will keep the "
2050 "old actions forever. This allows you the developer to program in confidence "
2051 "against the libguestfs API."
2055 #: ../src/guestfs.pod:974 ../fish/guestfish.pod:860
2060 #: ../src/guestfs.pod:976
2065 #: ../src/guestfs.pod:978
2070 #: ../src/guestfs.pod:980
2071 msgid "AVAILABILITY"
2075 #: ../src/guestfs.pod:982
2076 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
2080 #: ../src/guestfs.pod:984
2082 "Using L</guestfs_available> you can test availability of the following "
2083 "groups of functions. This test queries the appliance to see if the "
2084 "appliance you are currently using supports the functionality."
2088 #: ../src/guestfs.pod:989
2089 msgid "@AVAILABILITY@"
2093 #: ../src/guestfs.pod:991
2094 msgid "GUESTFISH supported COMMAND"
2098 #: ../src/guestfs.pod:993
2100 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
2101 "prints out the available groups and whether they are supported by this build "
2102 "of libguestfs. Note however that you have to do C<run> first."
2106 #: ../src/guestfs.pod:998
2107 msgid "SINGLE CALLS AT COMPILE TIME"
2111 #: ../src/guestfs.pod:1000
2113 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
2114 "function, such as:"
2118 #: ../src/guestfs.pod:1003
2121 " #define LIBGUESTFS_HAVE_DD 1\n"
2126 #: ../src/guestfs.pod:1005
2127 msgid "if L</guestfs_dd> is available."
2131 #: ../src/guestfs.pod:1007
2133 "Before version 1.5.8, if you needed to test whether a single libguestfs "
2134 "function is available at compile time, we recommended using build tools such "
2135 "as autoconf or cmake. For example in autotools you could use:"
2139 #: ../src/guestfs.pod:1012
2142 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
2143 " AC_CHECK_FUNCS([guestfs_dd])\n"
2148 #: ../src/guestfs.pod:1015
2150 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
2155 #: ../src/guestfs.pod:1018
2156 msgid "SINGLE CALLS AT RUN TIME"
2160 #: ../src/guestfs.pod:1020
2162 "Testing at compile time doesn't guarantee that a function really exists in "
2163 "the library. The reason is that you might be dynamically linked against a "
2164 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
2165 "This situation unfortunately results in a segmentation fault, which is a "
2166 "shortcoming of the C dynamic linking system itself."
2170 #: ../src/guestfs.pod:1027
2172 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2173 "in this example program (note that you still need the compile time check as "
2178 #: ../src/guestfs.pod:1031
2181 " #include <stdio.h>\n"
2182 " #include <stdlib.h>\n"
2183 " #include <unistd.h>\n"
2184 " #include <dlfcn.h>\n"
2185 " #include <guestfs.h>\n"
2190 #: ../src/guestfs.pod:1037
2195 " #ifdef LIBGUESTFS_HAVE_DD\n"
2197 " int has_function;\n"
2202 #: ../src/guestfs.pod:1043
2205 " /* Test if the function guestfs_dd is really available. */\n"
2206 " dl = dlopen (NULL, RTLD_LAZY);\n"
2208 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2209 " exit (EXIT_FAILURE);\n"
2211 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2217 #: ../src/guestfs.pod:1052
2220 " if (!has_function)\n"
2221 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2223 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2224 " /* Now it's safe to call\n"
2225 " guestfs_dd (g, \"foo\", \"bar\");\n"
2229 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2236 #: ../src/guestfs.pod:1065
2238 "You may think the above is an awful lot of hassle, and it is. There are "
2239 "other ways outside of the C linking system to ensure that this kind of "
2240 "incompatibility never arises, such as using package versioning:"
2244 #: ../src/guestfs.pod:1070
2247 " Requires: libguestfs >= 1.0.80\n"
2252 #: ../src/guestfs.pod:1072
2253 msgid "CALLS WITH OPTIONAL ARGUMENTS"
2257 #: ../src/guestfs.pod:1074
2259 "A recent feature of the API is the introduction of calls which take optional "
2260 "arguments. In C these are declared 3 ways. The main way is as a call which "
2261 "takes variable arguments (ie. C<...>), as in this example:"
2265 #: ../src/guestfs.pod:1079
2268 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
2273 #: ../src/guestfs.pod:1081
2275 "Call this with a list of optional arguments, terminated by C<-1>. So to "
2276 "call with no optional arguments specified:"
2280 #: ../src/guestfs.pod:1084
2283 " guestfs_add_drive_opts (g, filename, -1);\n"
2288 #: ../src/guestfs.pod:1086
2289 msgid "With a single optional argument:"
2293 #: ../src/guestfs.pod:1088
2296 " guestfs_add_drive_opts (g, filename,\n"
2297 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2303 #: ../src/guestfs.pod:1092
2308 #: ../src/guestfs.pod:1094
2311 " guestfs_add_drive_opts (g, filename,\n"
2312 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2313 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
2319 #: ../src/guestfs.pod:1099
2321 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
2326 #: ../src/guestfs.pod:1102
2327 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
2331 #: ../src/guestfs.pod:1104
2333 "The second variant has the same name with the suffix C<_va>, which works the "
2334 "same way but takes a C<va_list>. See the C manual for details. For the "
2335 "example function, this is declared:"
2339 #: ../src/guestfs.pod:1108
2342 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
2348 #: ../src/guestfs.pod:1111
2349 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
2353 #: ../src/guestfs.pod:1113
2355 "The third variant is useful where you need to construct these calls. You "
2356 "pass in a structure where you fill in the optional fields. The structure "
2357 "has a bitmask as the first element which you must set to indicate which "
2358 "fields you have filled in. For our example function the structure and call "
2363 #: ../src/guestfs.pod:1119
2366 " struct guestfs_add_drive_opts_argv {\n"
2367 " uint64_t bitmask;\n"
2369 " const char *format;\n"
2372 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
2373 " const struct guestfs_add_drive_opts_argv *optargs);\n"
2378 #: ../src/guestfs.pod:1128
2379 msgid "You could call it like this:"
2383 #: ../src/guestfs.pod:1130
2386 " struct guestfs_add_drive_opts_argv optargs = {\n"
2387 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
2388 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
2390 " .format = \"qcow2\"\n"
2396 #: ../src/guestfs.pod:1137
2399 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
2404 #: ../src/guestfs.pod:1139 ../src/guestfs-actions.pod:10
2405 #: ../src/guestfs-actions.pod:1582 ../fish/guestfish-actions.pod:9
2406 #: ../fish/guestfish-actions.pod:1244
2411 #: ../src/guestfs.pod:1145
2412 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
2416 #: ../src/guestfs.pod:1150
2417 msgid "You do not need to fill in all fields of the structure."
2421 #: ../src/guestfs.pod:1154
2423 "There must be a one-to-one correspondence between fields of the structure "
2424 "that are filled in, and bits set in the bitmask."
2428 #: ../src/guestfs.pod:1159
2429 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
2433 #: ../src/guestfs.pod:1161
2435 "In other languages, optional arguments are expressed in the way that is "
2436 "natural for that language. We refer you to the language-specific "
2437 "documentation for more details on that."
2441 #: ../src/guestfs.pod:1165
2442 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
2446 #: ../src/guestfs.pod:1167 ../src/guestfs.pod:1172
2451 #: ../src/guestfs.pod:1169
2453 "<!-- old anchor for the next section --> <a name="
2454 "\"state_machine_and_low_level_event_api\"/>"
2458 #: ../src/guestfs.pod:1174
2459 msgid "ARCHITECTURE"
2463 #: ../src/guestfs.pod:1176
2465 "Internally, libguestfs is implemented by running an appliance (a special "
2466 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
2467 "process of the main program."
2471 #: ../src/guestfs.pod:1180
2474 " ___________________\n"
2476 " | main program |\n"
2478 " | | child process / appliance\n"
2479 " | | __________________________\n"
2481 " +-------------------+ RPC | +-----------------+ |\n"
2482 " | libguestfs <--------------------> guestfsd | |\n"
2483 " | | | +-----------------+ |\n"
2484 " \\___________________/ | | Linux kernel | |\n"
2485 " | +--^--------------+ |\n"
2486 " \\_________|________________/\n"
2492 " \\______________/\n"
2497 #: ../src/guestfs.pod:1200
2499 "The library, linked to the main program, creates the child process and hence "
2500 "the appliance in the L</guestfs_launch> function."
2504 #: ../src/guestfs.pod:1203
2506 "Inside the appliance is a Linux kernel and a complete stack of userspace "
2507 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
2508 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
2509 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
2510 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
2511 "attached to the qemu process which translates device access by the "
2512 "appliance's Linux kernel into accesses to the image."
2516 #: ../src/guestfs.pod:1212
2518 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
2519 "Although the disk image you are attached to might also be used by some "
2520 "virtual machine, libguestfs doesn't know or care about this. (But you will "
2521 "care if both libguestfs's qemu process and your virtual machine are trying "
2522 "to update the disk image at the same time, since these usually results in "
2523 "massive disk corruption)."
2527 #: ../src/guestfs.pod:1219
2528 msgid "STATE MACHINE"
2532 #: ../src/guestfs.pod:1221
2533 msgid "libguestfs uses a state machine to model the child process:"
2537 #: ../src/guestfs.pod:1223
2549 " / | \\ \\ guestfs_launch\n"
2550 " / | _\\__V______\n"
2552 " / | | LAUNCHING |\n"
2553 " / | \\___________/\n"
2555 " / | guestfs_launch\n"
2557 " ______ / __|____V\n"
2558 " / \\ ------> / \\\n"
2559 " | BUSY | | READY |\n"
2560 " \\______/ <------ \\________/\n"
2565 #: ../src/guestfs.pod:1245
2567 "The normal transitions are (1) CONFIG (when the handle is created, but there "
2568 "is no child process), (2) LAUNCHING (when the child process is booting up), "
2569 "(3) alternating between READY and BUSY as commands are issued to, and "
2570 "carried out by, the child process."
2574 #: ../src/guestfs.pod:1250
2576 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
2577 "asynchronously at any time (eg. due to some internal error), and that causes "
2578 "the state to transition back to CONFIG."
2582 #: ../src/guestfs.pod:1254
2584 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
2585 "issued when in the CONFIG state."
2589 #: ../src/guestfs.pod:1257
2591 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
2592 "L</guestfs_launch> blocks until the child process is READY to accept "
2593 "commands (or until some failure or timeout). L</guestfs_launch> internally "
2594 "moves the state from CONFIG to LAUNCHING while it is running."
2598 #: ../src/guestfs.pod:1263
2600 "API actions such as L</guestfs_mount> can only be issued when in the READY "
2601 "state. These API calls block waiting for the command to be carried out (ie. "
2602 "the state to transition to BUSY and then back to READY). There are no non-"
2603 "blocking versions, and no way to issue more than one command per handle at "
2608 #: ../src/guestfs.pod:1269
2610 "Finally, the child process sends asynchronous messages back to the main "
2611 "program, such as kernel log messages. You can register a callback to "
2612 "receive these messages."
2616 #: ../src/guestfs.pod:1273
2617 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
2621 #: ../src/guestfs.pod:1275
2623 "The child process generates events in some situations. Current events "
2624 "include: receiving a log message, the child process exits."
2628 #: ../src/guestfs.pod:1278
2630 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
2635 #: ../src/guestfs.pod:1281
2637 "Only I<one callback of each type> can be registered for each handle. "
2638 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
2639 "that type. Cancel all callbacks of this type by calling this function with "
2640 "C<cb> set to C<NULL>."
2644 #: ../src/guestfs.pod:1286
2645 msgid "guestfs_set_log_message_callback"
2649 #: ../src/guestfs.pod:1288
2652 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
2653 " char *buf, int len);\n"
2654 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
2655 " guestfs_log_message_cb cb,\n"
2661 #: ../src/guestfs.pod:1294
2663 "The callback function C<cb> will be called whenever qemu or the guest writes "
2664 "anything to the console."
2668 #: ../src/guestfs.pod:1297
2669 msgid "Use this function to capture kernel messages and similar."
2673 #: ../src/guestfs.pod:1299
2675 "Normally there is no log message handler, and log messages are just "
2680 #: ../src/guestfs.pod:1302
2681 msgid "guestfs_set_subprocess_quit_callback"
2685 #: ../src/guestfs.pod:1304
2688 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
2689 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
2690 " guestfs_subprocess_quit_cb cb,\n"
2696 #: ../src/guestfs.pod:1309
2698 "The callback function C<cb> will be called when the child process quits, "
2699 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
2700 "corresponds to a transition from any state to the CONFIG state)."
2704 #: ../src/guestfs.pod:1314
2705 msgid "guestfs_set_launch_done_callback"
2709 #: ../src/guestfs.pod:1316
2712 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
2713 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
2714 " guestfs_launch_done_cb cb,\n"
2720 #: ../src/guestfs.pod:1321
2722 "The callback function C<cb> will be called when the child process becomes "
2723 "ready first time after it has been launched. (This corresponds to a "
2724 "transition from LAUNCHING to the READY state)."
2728 #: ../src/guestfs.pod:1325
2729 msgid "guestfs_set_close_callback"
2733 #: ../src/guestfs.pod:1327
2736 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
2737 " void guestfs_set_close_callback (guestfs_h *g,\n"
2738 " guestfs_close_cb cb,\n"
2744 #: ../src/guestfs.pod:1332
2746 "The callback function C<cb> will be called while the handle is being closed "
2747 "(synchronously from L</guestfs_close>)."
2751 #: ../src/guestfs.pod:1335
2753 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
2754 "handles that are open when the program exits. This means that this callback "
2755 "might be called indirectly from L<exit(3)>, which can cause unexpected "
2756 "problems in higher-level languages (eg. if your HLL interpreter has already "
2757 "been cleaned up by the time this is called, and if your callback then jumps "
2758 "into some HLL function)."
2762 #: ../src/guestfs.pod:1343
2763 msgid "guestfs_set_progress_callback"
2767 #: ../src/guestfs.pod:1345
2770 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
2771 " int proc_nr, int serial,\n"
2772 " uint64_t position, uint64_t total);\n"
2773 " void guestfs_set_progress_callback (guestfs_h *g,\n"
2774 " guestfs_progress_cb cb,\n"
2780 #: ../src/guestfs.pod:1352
2782 "Some long-running operations can generate progress messages. If this "
2783 "callback is registered, then it will be called each time a progress message "
2784 "is generated (usually two seconds after the operation started, and three "
2785 "times per second thereafter until it completes, although the frequency may "
2786 "change in future versions)."
2790 #: ../src/guestfs.pod:1358
2792 "The callback receives two numbers: C<position> and C<total>. The units of "
2793 "C<total> are not defined, although for some operations C<total> may relate "
2794 "in some way to the amount of data to be transferred (eg. in bytes or "
2795 "megabytes), and C<position> may be the portion which has been transferred."
2799 #: ../src/guestfs.pod:1364
2800 msgid "The only defined and stable parts of the API are:"
2804 #: ../src/guestfs.pod:1370
2806 "The callback can display to the user some type of progress bar or indicator "
2807 "which shows the ratio of C<position>:C<total>."
2811 #: ../src/guestfs.pod:1375
2812 msgid "0 E<lt>= C<position> E<lt>= C<total>"
2816 #: ../src/guestfs.pod:1379
2818 "If any progress notification is sent during a call, then a final progress "
2819 "notification is always sent when C<position> = C<total>."
2823 #: ../src/guestfs.pod:1382
2825 "This is to simplify caller code, so callers can easily set the progress "
2826 "indicator to \"100%\" at the end of the operation, without requiring special "
2827 "code to detect this case."
2831 #: ../src/guestfs.pod:1388
2833 "The callback also receives the procedure number and serial number of the "
2834 "call. These are only useful for debugging protocol issues, and the callback "
2835 "can normally ignore them. The callback may want to print these numbers in "
2836 "error messages or debugging messages."
2840 #: ../src/guestfs.pod:1393
2841 msgid "PRIVATE DATA AREA"
2845 #: ../src/guestfs.pod:1395
2847 "You can attach named pieces of private data to the libguestfs handle, and "
2848 "fetch them by name for the lifetime of the handle. This is called the "
2849 "private data area and is only available from the C API."
2853 #: ../src/guestfs.pod:1399
2854 msgid "To attach a named piece of data, use the following call:"
2858 #: ../src/guestfs.pod:1401
2861 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
2866 #: ../src/guestfs.pod:1403
2868 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
2869 "pointer (which can be C<NULL>). Any previous item with the same name is "
2874 #: ../src/guestfs.pod:1407
2876 "You can use any C<key> you want, but names beginning with an underscore "
2877 "character are reserved for internal libguestfs purposes (for implementing "
2878 "language bindings). It is recommended to prefix the name with some unique "
2879 "string to avoid collisions with other users."
2883 #: ../src/guestfs.pod:1412
2884 msgid "To retrieve the pointer, use:"
2888 #: ../src/guestfs.pod:1414
2891 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
2896 #: ../src/guestfs.pod:1416
2898 "This function returns C<NULL> if either no data is found associated with "
2899 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
2904 #: ../src/guestfs.pod:1420
2906 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
2907 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
2908 "all. In particular, libguestfs does I<not> try to free the data when the "
2909 "handle is closed. If the data must be freed, then the caller must either "
2910 "free it before calling L</guestfs_close> or must set up a close callback to "
2911 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
2912 "can be registered for a handle)."
2916 #: ../src/guestfs.pod:1428
2918 "The private data area is implemented using a hash table, and should be "
2919 "reasonably efficient for moderate numbers of keys."
2923 #: ../src/guestfs.pod:1431
2924 msgid "BLOCK DEVICE NAMING"
2928 #: ../src/guestfs.pod:1433
2930 "In the kernel there is now quite a profusion of schemata for naming block "
2931 "devices (in this context, by I<block device> I mean a physical or virtual "
2932 "hard drive). The original Linux IDE driver used names starting with C</dev/"
2933 "hd*>. SCSI devices have historically used a different naming scheme, C</dev/"
2934 "sd*>. When the Linux kernel I<libata> driver became a popular replacement "
2935 "for the old IDE driver (particularly for SATA devices) those devices also "
2936 "used the C</dev/sd*> scheme. Additionally we now have virtual machines with "
2937 "paravirtualized drivers. This has created several different naming systems, "
2938 "such as C</dev/vd*> for virtio disks and C</dev/xvd*> for Xen PV disks."
2942 #: ../src/guestfs.pod:1445
2944 "As discussed above, libguestfs uses a qemu appliance running an embedded "
2945 "Linux kernel to access block devices. We can run a variety of appliances "
2946 "based on a variety of Linux kernels."
2950 #: ../src/guestfs.pod:1449
2952 "This causes a problem for libguestfs because many API calls use device or "
2953 "partition names. Working scripts and the recipe (example) scripts that we "
2954 "make available over the internet could fail if the naming scheme changes."
2958 #: ../src/guestfs.pod:1454
2960 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2961 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2962 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2963 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2967 #: ../src/guestfs.pod:1460
2969 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2970 "L</guestfs_list_partitions> and similar calls return the true names of the "
2971 "devices and partitions as known to the appliance."
2975 #: ../src/guestfs.pod:1465
2976 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2980 #: ../src/guestfs.pod:1467
2982 "Usually this translation is transparent. However in some (very rare) cases "
2983 "you may need to know the exact algorithm. Such cases include where you use "
2984 "L</guestfs_config> to add a mixture of virtio and IDE devices to the qemu-"
2985 "based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> devices."
2989 #: ../src/guestfs.pod:1473
2991 "The algorithm is applied only to I<parameters> which are known to be either "
2992 "device or partition names. Return values from functions such as L</"
2993 "guestfs_list_devices> are never changed."
2997 #: ../src/guestfs.pod:1481
2998 msgid "Is the string a parameter which is a device or partition name?"
3002 #: ../src/guestfs.pod:1485
3003 msgid "Does the string begin with C</dev/sd>?"
3007 #: ../src/guestfs.pod:1489
3009 "Does the named device exist? If so, we use that device. However if I<not> "
3010 "then we continue with this algorithm."
3014 #: ../src/guestfs.pod:1494
3015 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
3019 #: ../src/guestfs.pod:1496
3020 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
3024 #: ../src/guestfs.pod:1498
3025 msgid "If that named device exists, use it. If not, continue."
3029 #: ../src/guestfs.pod:1502
3030 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
3034 #: ../src/guestfs.pod:1504
3035 msgid "If that named device exists, use it. If not, return an error."
3039 #: ../src/guestfs.pod:1508
3040 msgid "PORTABILITY CONCERNS"
3044 #: ../src/guestfs.pod:1510
3046 "Although the standard naming scheme and automatic translation is useful for "
3047 "simple programs and guestfish scripts, for larger programs it is best not to "
3048 "rely on this mechanism."
3052 #: ../src/guestfs.pod:1514
3054 "Where possible for maximum future portability programs using libguestfs "
3055 "should use these future-proof techniques:"
3059 #: ../src/guestfs.pod:1521
3061 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
3062 "device names, and then use those names directly."
3066 #: ../src/guestfs.pod:1524
3068 "Since those device names exist by definition, they will never be translated."
3072 #: ../src/guestfs.pod:1529
3074 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
3075 "filesystem labels."
3079 #: ../src/guestfs.pod:1534
3084 #: ../src/guestfs.pod:1536
3085 msgid "COMMUNICATION PROTOCOL"
3089 #: ../src/guestfs.pod:1538
3091 "Don't rely on using this protocol directly. This section documents how it "
3092 "currently works, but it may change at any time."
3096 #: ../src/guestfs.pod:1541
3098 "The protocol used to talk between the library and the daemon running inside "
3099 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
3100 "1014, RFC 1832, RFC 4506)."
3104 #: ../src/guestfs.pod:1545
3106 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
3107 "this file is automatically generated)."
3111 #: ../src/guestfs.pod:1548
3113 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
3114 "and C<FileOut> parameters, which are handled with very simple request/reply "
3115 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
3116 "parameters, which use the same request and reply messages, but they may also "
3117 "be followed by files sent using a chunked encoding."
3121 #: ../src/guestfs.pod:1555
3122 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
3126 #: ../src/guestfs.pod:1557
3127 msgid "For ordinary functions, the request message is:"
3131 #: ../src/guestfs.pod:1559
3134 " total length (header + arguments,\n"
3135 " but not including the length word itself)\n"
3136 " struct guestfs_message_header (encoded as XDR)\n"
3137 " struct guestfs_<foo>_args (encoded as XDR)\n"
3142 #: ../src/guestfs.pod:1564
3144 "The total length field allows the daemon to allocate a fixed size buffer "
3145 "into which it slurps the rest of the message. As a result, the total length "
3146 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
3147 "effective size of any request is limited to somewhere under this size."
3151 #: ../src/guestfs.pod:1570
3153 "Note also that many functions don't take any arguments, in which case the "
3154 "C<guestfs_I<foo>_args> is completely omitted."
3158 #: ../src/guestfs.pod:1573
3160 "The header contains the procedure number (C<guestfs_proc>) which is how the "
3161 "receiver knows what type of args structure to expect, or none at all."
3165 #: ../src/guestfs.pod:1577
3166 msgid "The reply message for ordinary functions is:"
3170 #: ../src/guestfs.pod:1579
3173 " total length (header + ret,\n"
3174 " but not including the length word itself)\n"
3175 " struct guestfs_message_header (encoded as XDR)\n"
3176 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3181 #: ../src/guestfs.pod:1584
3183 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
3184 "functions that return no formal return values."
3188 #: ../src/guestfs.pod:1587
3190 "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
3194 #: ../src/guestfs.pod:1590
3196 "In the case of an error, a flag is set in the header, and the reply message "
3197 "is slightly changed:"
3201 #: ../src/guestfs.pod:1593
3204 " total length (header + error,\n"
3205 " but not including the length word itself)\n"
3206 " struct guestfs_message_header (encoded as XDR)\n"
3207 " struct guestfs_message_error (encoded as XDR)\n"
3212 #: ../src/guestfs.pod:1598
3214 "The C<guestfs_message_error> structure contains the error message as a "
3219 #: ../src/guestfs.pod:1601
3220 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
3224 #: ../src/guestfs.pod:1603
3226 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
3227 "The normal request message is sent (see above). However this is followed by "
3228 "a sequence of file chunks."
3232 #: ../src/guestfs.pod:1607
3235 " total length (header + arguments,\n"
3236 " but not including the length word itself,\n"
3237 " and not including the chunks)\n"
3238 " struct guestfs_message_header (encoded as XDR)\n"
3239 " struct guestfs_<foo>_args (encoded as XDR)\n"
3240 " sequence of chunks for FileIn param #0\n"
3241 " sequence of chunks for FileIn param #1 etc.\n"
3246 #: ../src/guestfs.pod:1615
3247 msgid "The \"sequence of chunks\" is:"
3251 #: ../src/guestfs.pod:1617
3254 " length of chunk (not including length word itself)\n"
3255 " struct guestfs_chunk (encoded as XDR)\n"
3256 " length of chunk\n"
3257 " struct guestfs_chunk (encoded as XDR)\n"
3259 " length of chunk\n"
3260 " struct guestfs_chunk (with data.data_len == 0)\n"
3265 #: ../src/guestfs.pod:1625
3267 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
3268 "is set in the final chunk to indicate either successful completion or early "
3273 #: ../src/guestfs.pod:1629
3275 "At time of writing there are no functions that have more than one FileIn "
3276 "parameter. However this is (theoretically) supported, by sending the "
3277 "sequence of chunks for each FileIn parameter one after another (from left to "
3282 #: ../src/guestfs.pod:1634
3284 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
3285 "transfer. The library does this by sending a chunk with a special flag set "
3286 "to indicate cancellation. When the daemon sees this, it cancels the whole "
3287 "RPC, does I<not> send any reply, and goes back to reading the next request."
3291 #: ../src/guestfs.pod:1640
3293 "The daemon may also cancel. It does this by writing a special word "
3294 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
3295 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
3296 "cancel chunk). The special word is chosen so that even if cancellation "
3297 "happens right at the end of the transfer (after the library has finished "
3298 "writing and has started listening for the reply), the \"spurious\" cancel "
3299 "flag will not be confused with the reply message."
3303 #: ../src/guestfs.pod:1649
3305 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
3306 "limit), and also files where the size is not known in advance (eg. from "
3307 "pipes or sockets). However the chunks are rather small "
3308 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
3309 "to keep much in memory."
3313 #: ../src/guestfs.pod:1655
3314 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
3318 #: ../src/guestfs.pod:1657
3320 "The protocol for FileOut parameters is exactly the same as for FileIn "
3321 "parameters, but with the roles of daemon and library reversed."
3325 #: ../src/guestfs.pod:1660
3328 " total length (header + ret,\n"
3329 " but not including the length word itself,\n"
3330 " and not including the chunks)\n"
3331 " struct guestfs_message_header (encoded as XDR)\n"
3332 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3333 " sequence of chunks for FileOut param #0\n"
3334 " sequence of chunks for FileOut param #1 etc.\n"
3339 #: ../src/guestfs.pod:1668
3340 msgid "INITIAL MESSAGE"
3344 #: ../src/guestfs.pod:1670
3346 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
3347 "which indicates that the guest and daemon is alive. This is what L</"
3348 "guestfs_launch> waits for."
3352 #: ../src/guestfs.pod:1674
3353 msgid "PROGRESS NOTIFICATION MESSAGES"
3357 #: ../src/guestfs.pod:1676
3359 "The daemon may send progress notification messages at any time. These are "
3360 "distinguished by the normal length word being replaced by "
3361 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
3365 #: ../src/guestfs.pod:1680
3367 "The library turns them into progress callbacks (see "
3368 "C<guestfs_set_progress_callback>) if there is a callback registered, or "
3369 "discards them if not."
3373 #: ../src/guestfs.pod:1684
3375 "The daemon self-limits the frequency of progress messages it sends (see "
3376 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
3381 #: ../src/guestfs.pod:1688
3382 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
3386 #: ../src/guestfs.pod:1690
3388 "All high-level libguestfs actions are synchronous. If you want to use "
3389 "libguestfs asynchronously then you must create a thread."
3393 #: ../src/guestfs.pod:1693
3395 "Only use the handle from a single thread. Either use the handle exclusively "
3396 "from one thread, or provide your own mutex so that two threads cannot issue "
3397 "calls on the same handle at the same time."
3401 #: ../src/guestfs.pod:1697
3403 "See the graphical program guestfs-browser for one possible architecture for "
3404 "multithreaded programs using libvirt and libguestfs."
3408 #: ../src/guestfs.pod:1700
3409 msgid "QEMU WRAPPERS"
3413 #: ../src/guestfs.pod:1702
3415 "If you want to compile your own qemu, run qemu from a non-standard location, "
3416 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
3421 #: ../src/guestfs.pod:1706
3423 "There is one important rule to remember: you I<must C<exec qemu>> as the "
3424 "last command in the shell script (so that qemu replaces the shell and "
3425 "becomes the direct child of the libguestfs-using program). If you don't do "
3426 "this, then the qemu process won't be cleaned up correctly."
3430 #: ../src/guestfs.pod:1711
3432 "Here is an example of a wrapper, where I have built my own copy of qemu from "
3437 #: ../src/guestfs.pod:1714
3441 " qemudir=/home/rjones/d/qemu\n"
3442 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios \"$@\"\n"
3447 #: ../src/guestfs.pod:1718
3449 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
3450 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
3455 #: ../src/guestfs.pod:1722
3458 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
3463 #: ../src/guestfs.pod:1724
3465 "Note that libguestfs also calls qemu with the -help and -version options in "
3466 "order to determine features."
3470 #: ../src/guestfs.pod:1727
3471 msgid "LIBGUESTFS VERSION NUMBERS"
3475 #: ../src/guestfs.pod:1729
3477 "Since April 2010, libguestfs has started to make separate development and "
3478 "stable releases, along with corresponding branches in our git repository. "
3479 "These separate releases can be identified by version number:"
3483 #: ../src/guestfs.pod:1734
3486 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3487 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3493 " | `-------- sub-version\n"
3495 " `------ always '1' because we don't change the ABI\n"
3500 #: ../src/guestfs.pod:1745
3501 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3505 #: ../src/guestfs.pod:1747
3507 "As time passes we cherry pick fixes from the development branch and backport "
3508 "those into the stable branch, the effect being that the stable branch should "
3509 "get more stable and less buggy over time. So the stable releases are ideal "
3510 "for people who don't need new features but would just like the software to "
3515 #: ../src/guestfs.pod:1753
3516 msgid "Our criteria for backporting changes are:"
3520 #: ../src/guestfs.pod:1759
3522 "Documentation changes which don't affect any code are backported unless the "
3523 "documentation refers to a future feature which is not in stable."
3527 #: ../src/guestfs.pod:1765
3529 "Bug fixes which are not controversial, fix obvious problems, and have been "
3530 "well tested are backported."
3534 #: ../src/guestfs.pod:1770
3536 "Simple rearrangements of code which shouldn't affect how it works get "
3537 "backported. This is so that the code in the two branches doesn't get too "
3538 "far out of step, allowing us to backport future fixes more easily."
3542 #: ../src/guestfs.pod:1776
3544 "We I<don't> backport new features, new APIs, new tools etc, except in one "
3545 "exceptional case: the new feature is required in order to implement an "
3546 "important bug fix."
3550 #: ../src/guestfs.pod:1782
3552 "A new stable branch starts when we think the new features in development are "
3553 "substantial and compelling enough over the current stable branch to warrant "
3554 "it. When that happens we create new stable and development versions 1.N.0 "
3555 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
3556 "stable at this point, but by backporting fixes from development, that branch "
3557 "will stabilize over time."
3561 #: ../src/guestfs.pod:1790 ../fish/guestfish.pod:867
3562 #: ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:330
3563 #: ../tools/virt-rescue.pl:255
3564 msgid "ENVIRONMENT VARIABLES"
3568 #: ../src/guestfs.pod:1794 ../fish/guestfish.pod:893
3569 msgid "LIBGUESTFS_APPEND"
3573 #: ../src/guestfs.pod:1796 ../fish/guestfish.pod:895
3574 msgid "Pass additional options to the guest kernel."
3578 #: ../src/guestfs.pod:1798 ../fish/guestfish.pod:897
3579 msgid "LIBGUESTFS_DEBUG"
3583 #: ../src/guestfs.pod:1800
3585 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
3586 "effect as calling C<guestfs_set_verbose (g, 1)>."
3590 #: ../src/guestfs.pod:1803 ../fish/guestfish.pod:902
3591 msgid "LIBGUESTFS_MEMSIZE"
3595 #: ../src/guestfs.pod:1805 ../fish/guestfish.pod:904
3597 "Set the memory allocated to the qemu process, in megabytes. For example:"
3601 #: ../src/guestfs.pod:1808 ../fish/guestfish.pod:907
3604 " LIBGUESTFS_MEMSIZE=700\n"
3609 #: ../src/guestfs.pod:1810 ../fish/guestfish.pod:909
3610 msgid "LIBGUESTFS_PATH"
3614 #: ../src/guestfs.pod:1812
3616 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
3617 "the discussion of paths in section PATH above."
3621 #: ../src/guestfs.pod:1815 ../fish/guestfish.pod:914
3622 msgid "LIBGUESTFS_QEMU"
3626 #: ../src/guestfs.pod:1817 ../fish/guestfish.pod:916
3628 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
3629 "which was found at compile time by the configure script is used."
3633 #: ../src/guestfs.pod:1821
3634 msgid "See also L</QEMU WRAPPERS> above."
3638 #: ../src/guestfs.pod:1823 ../fish/guestfish.pod:920
3639 msgid "LIBGUESTFS_TRACE"
3643 #: ../src/guestfs.pod:1825
3645 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
3646 "effect as calling C<guestfs_set_trace (g, 1)>."
3650 #: ../src/guestfs.pod:1828 ../fish/guestfish.pod:929
3655 #: ../src/guestfs.pod:1830 ../fish/guestfish.pod:931
3656 msgid "Location of temporary directory, defaults to C</tmp>."
3660 #: ../src/guestfs.pod:1832 ../fish/guestfish.pod:933
3662 "If libguestfs was compiled to use the supermin appliance then the real "
3663 "appliance is cached in this directory, shared between all handles belonging "
3664 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
3665 "use in case C</tmp> is not large enough."
3669 #: ../src/guestfs.pod:1840 ../fish/guestfish.pod:991
3670 #: ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:214
3671 #: ../inspector/virt-inspector.pl:884 ../tools/virt-edit.pl:350
3672 #: ../tools/virt-win-reg.pl:487 ../tools/virt-df.pl:640
3673 #: ../tools/virt-ls.pl:235 ../tools/virt-resize.pl:1486
3674 #: ../tools/virt-list-filesystems.pl:216 ../tools/virt-cat.pl:188
3675 #: ../tools/virt-tar.pl:283 ../tools/virt-rescue.pl:267
3676 #: ../tools/virt-make-fs.pl:534 ../tools/virt-list-partitions.pl:254
3681 #: ../src/guestfs.pod:1842
3683 "L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-df(1)>, L<virt-edit"
3684 "(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, L<virt-list-"
3685 "partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-"
3686 "tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, L<febootstrap(1)>, L<hivex(3)>, "
3687 "L<http://libguestfs.org/>."
3691 #: ../src/guestfs.pod:1860
3693 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, L<lvm"
3694 "(8)>, L<disktype(1)>."
3698 #: ../src/guestfs.pod:1867 ../tools/virt-win-reg.pl:502
3699 #: ../tools/virt-make-fs.pl:548
3704 #: ../src/guestfs.pod:1869
3705 msgid "To get a list of bugs against libguestfs use this link:"
3709 #: ../src/guestfs.pod:1871
3711 "L<https://bugzilla.redhat.com/buglist.cgi?"
3712 "component=libguestfs&product=Virtualization+Tools>"
3716 #: ../src/guestfs.pod:1873
3717 msgid "To report a new bug against libguestfs use this link:"
3721 #: ../src/guestfs.pod:1875
3723 "L<https://bugzilla.redhat.com/enter_bug.cgi?"
3724 "component=libguestfs&product=Virtualization+Tools>"
3728 #: ../src/guestfs.pod:1877
3729 msgid "When reporting a bug, please check:"
3733 #: ../src/guestfs.pod:1883
3734 msgid "That the bug hasn't been reported already."
3738 #: ../src/guestfs.pod:1887
3739 msgid "That you are testing a recent version."
3743 #: ../src/guestfs.pod:1891
3744 msgid "Describe the bug accurately, and give a way to reproduce it."
3748 #: ../src/guestfs.pod:1895
3750 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
3755 #: ../src/guestfs.pod:1900 ../fish/guestfish.pod:1008
3756 #: ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:225
3757 #: ../inspector/virt-inspector.pl:893
3762 #: ../src/guestfs.pod:1902 ../fish/guestfish.pod:1010
3763 #: ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:227
3764 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
3768 #: ../src/guestfs.pod:1904 ../fish/guestfish.pod:1012
3769 #: ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:229
3770 #: ../inspector/virt-inspector.pl:899 ../tools/virt-edit.pl:366
3771 #: ../tools/virt-win-reg.pl:517 ../tools/virt-df.pl:653
3772 #: ../tools/virt-ls.pl:250 ../tools/virt-resize.pl:1512
3773 #: ../tools/virt-list-filesystems.pl:232 ../tools/virt-cat.pl:202
3774 #: ../tools/virt-tar.pl:298 ../tools/virt-rescue.pl:281
3775 #: ../tools/virt-make-fs.pl:563 ../tools/virt-list-partitions.pl:269
3780 #: ../src/guestfs.pod:1906 ../fish/guestfish.pod:1014
3781 #: ../fuse/guestmount.pod:231
3782 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
3786 #: ../src/guestfs.pod:1909
3788 "This library is free software; you can redistribute it and/or modify it "
3789 "under the terms of the GNU Lesser General Public License as published by the "
3790 "Free Software Foundation; either version 2 of the License, or (at your "
3791 "option) any later version."
3795 #: ../src/guestfs.pod:1914
3797 "This library is distributed in the hope that it will be useful, but WITHOUT "
3798 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
3799 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
3804 #: ../src/guestfs.pod:1919
3806 "You should have received a copy of the GNU Lesser General Public License "
3807 "along with this library; if not, write to the Free Software Foundation, "
3808 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
3812 #: ../src/guestfs-actions.pod:1
3813 msgid "guestfs_add_cdrom"
3817 #: ../src/guestfs-actions.pod:3
3820 " int guestfs_add_cdrom (guestfs_h *g,\n"
3821 "\t\tconst char *filename);\n"
3826 #: ../src/guestfs-actions.pod:6 ../fish/guestfish-actions.pod:5
3827 msgid "This function adds a virtual CD-ROM disk image to the guest."
3831 #: ../src/guestfs-actions.pod:8 ../fish/guestfish-actions.pod:7
3832 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
3836 #: ../src/guestfs-actions.pod:16
3838 "This call checks for the existence of C<filename>. This stops you from "
3839 "specifying other types of drive which are supported by qemu such as C<nbd:> "
3840 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
3845 #: ../src/guestfs-actions.pod:23
3847 "If you just want to add an ISO file (often you use this as an efficient way "
3848 "to transfer large files into the guest), then you should probably use "
3849 "C<guestfs_add_drive_ro> instead."
3853 #: ../src/guestfs-actions.pod:29 ../src/guestfs-actions.pod:54
3854 #: ../src/guestfs-actions.pod:112 ../src/guestfs-actions.pod:144
3855 #: ../src/guestfs-actions.pod:155 ../src/guestfs-actions.pod:173
3856 #: ../src/guestfs-actions.pod:190 ../src/guestfs-actions.pod:201
3857 #: ../src/guestfs-actions.pod:304 ../src/guestfs-actions.pod:321
3858 #: ../src/guestfs-actions.pod:332 ../src/guestfs-actions.pod:368
3859 #: ../src/guestfs-actions.pod:390 ../src/guestfs-actions.pod:405
3860 #: ../src/guestfs-actions.pod:469 ../src/guestfs-actions.pod:496
3861 #: ../src/guestfs-actions.pod:507 ../src/guestfs-actions.pod:519
3862 #: ../src/guestfs-actions.pod:600 ../src/guestfs-actions.pod:615
3863 #: ../src/guestfs-actions.pod:626 ../src/guestfs-actions.pod:637
3864 #: ../src/guestfs-actions.pod:783 ../src/guestfs-actions.pod:800
3865 #: ../src/guestfs-actions.pod:815 ../src/guestfs-actions.pod:890
3866 #: ../src/guestfs-actions.pod:905 ../src/guestfs-actions.pod:921
3867 #: ../src/guestfs-actions.pod:932 ../src/guestfs-actions.pod:949
3868 #: ../src/guestfs-actions.pod:982 ../src/guestfs-actions.pod:1040
3869 #: ../src/guestfs-actions.pod:1068 ../src/guestfs-actions.pod:1090
3870 #: ../src/guestfs-actions.pod:1121 ../src/guestfs-actions.pod:1209
3871 #: ../src/guestfs-actions.pod:1240 ../src/guestfs-actions.pod:1440
3872 #: ../src/guestfs-actions.pod:1459 ../src/guestfs-actions.pod:1540
3873 #: ../src/guestfs-actions.pod:1888 ../src/guestfs-actions.pod:2011
3874 #: ../src/guestfs-actions.pod:2066 ../src/guestfs-actions.pod:2096
3875 #: ../src/guestfs-actions.pod:2505 ../src/guestfs-actions.pod:2517
3876 #: ../src/guestfs-actions.pod:2534 ../src/guestfs-actions.pod:2642
3877 #: ../src/guestfs-actions.pod:2653 ../src/guestfs-actions.pod:2663
3878 #: ../src/guestfs-actions.pod:2674 ../src/guestfs-actions.pod:2686
3879 #: ../src/guestfs-actions.pod:2716 ../src/guestfs-actions.pod:2780
3880 #: ../src/guestfs-actions.pod:2797 ../src/guestfs-actions.pod:2811
3881 #: ../src/guestfs-actions.pod:2831 ../src/guestfs-actions.pod:2851
3882 #: ../src/guestfs-actions.pod:2880 ../src/guestfs-actions.pod:2896
3883 #: ../src/guestfs-actions.pod:2912 ../src/guestfs-actions.pod:2941
3884 #: ../src/guestfs-actions.pod:2950 ../src/guestfs-actions.pod:2983
3885 #: ../src/guestfs-actions.pod:2996 ../src/guestfs-actions.pod:3006
3886 #: ../src/guestfs-actions.pod:3018 ../src/guestfs-actions.pod:3032
3887 #: ../src/guestfs-actions.pod:3112 ../src/guestfs-actions.pod:3129
3888 #: ../src/guestfs-actions.pod:3139 ../src/guestfs-actions.pod:3184
3889 #: ../src/guestfs-actions.pod:3199 ../src/guestfs-actions.pod:3214
3890 #: ../src/guestfs-actions.pod:3227 ../src/guestfs-actions.pod:3238
3891 #: ../src/guestfs-actions.pod:3249 ../src/guestfs-actions.pod:3263
3892 #: ../src/guestfs-actions.pod:3275 ../src/guestfs-actions.pod:3292
3893 #: ../src/guestfs-actions.pod:3338 ../src/guestfs-actions.pod:3366
3894 #: ../src/guestfs-actions.pod:3382 ../src/guestfs-actions.pod:3398
3895 #: ../src/guestfs-actions.pod:3407 ../src/guestfs-actions.pod:3421
3896 #: ../src/guestfs-actions.pod:3431 ../src/guestfs-actions.pod:3443
3897 #: ../src/guestfs-actions.pod:3455 ../src/guestfs-actions.pod:3487
3898 #: ../src/guestfs-actions.pod:3499 ../src/guestfs-actions.pod:3516
3899 #: ../src/guestfs-actions.pod:3527 ../src/guestfs-actions.pod:3541
3900 #: ../src/guestfs-actions.pod:3581 ../src/guestfs-actions.pod:3612
3901 #: ../src/guestfs-actions.pod:3623 ../src/guestfs-actions.pod:3648
3902 #: ../src/guestfs-actions.pod:3662 ../src/guestfs-actions.pod:3677
3903 #: ../src/guestfs-actions.pod:3799 ../src/guestfs-actions.pod:3851
3904 #: ../src/guestfs-actions.pod:3870 ../src/guestfs-actions.pod:3885
3905 #: ../src/guestfs-actions.pod:3911 ../src/guestfs-actions.pod:3968
3906 #: ../src/guestfs-actions.pod:3982 ../src/guestfs-actions.pod:3992
3907 #: ../src/guestfs-actions.pod:4003 ../src/guestfs-actions.pod:4258
3908 #: ../src/guestfs-actions.pod:4274 ../src/guestfs-actions.pod:4285
3909 #: ../src/guestfs-actions.pod:4294 ../src/guestfs-actions.pod:4305
3910 #: ../src/guestfs-actions.pod:4314 ../src/guestfs-actions.pod:4325
3911 #: ../src/guestfs-actions.pod:4338 ../src/guestfs-actions.pod:4356
3912 #: ../src/guestfs-actions.pod:4372 ../src/guestfs-actions.pod:4388
3913 #: ../src/guestfs-actions.pod:4403 ../src/guestfs-actions.pod:4423
3914 #: ../src/guestfs-actions.pod:4438 ../src/guestfs-actions.pod:4454
3915 #: ../src/guestfs-actions.pod:4472 ../src/guestfs-actions.pod:4488
3916 #: ../src/guestfs-actions.pod:4502 ../src/guestfs-actions.pod:4527
3917 #: ../src/guestfs-actions.pod:4548 ../src/guestfs-actions.pod:4564
3918 #: ../src/guestfs-actions.pod:4585 ../src/guestfs-actions.pod:4597
3919 #: ../src/guestfs-actions.pod:4609 ../src/guestfs-actions.pod:4625
3920 #: ../src/guestfs-actions.pod:4659 ../src/guestfs-actions.pod:4679
3921 #: ../src/guestfs-actions.pod:4702 ../src/guestfs-actions.pod:4792
3922 #: ../src/guestfs-actions.pod:4898 ../src/guestfs-actions.pod:4907
3923 #: ../src/guestfs-actions.pod:4917 ../src/guestfs-actions.pod:4927
3924 #: ../src/guestfs-actions.pod:4946 ../src/guestfs-actions.pod:4956
3925 #: ../src/guestfs-actions.pod:4966 ../src/guestfs-actions.pod:4976
3926 #: ../src/guestfs-actions.pod:4988 ../src/guestfs-actions.pod:5038
3927 #: ../src/guestfs-actions.pod:5052 ../src/guestfs-actions.pod:5065
3928 #: ../src/guestfs-actions.pod:5078 ../src/guestfs-actions.pod:5092
3929 #: ../src/guestfs-actions.pod:5102 ../src/guestfs-actions.pod:5119
3930 #: ../src/guestfs-actions.pod:5149 ../src/guestfs-actions.pod:5160
3931 #: ../src/guestfs-actions.pod:5195 ../src/guestfs-actions.pod:5205
3932 #: ../src/guestfs-actions.pod:5220 ../src/guestfs-actions.pod:5246
3933 #: ../src/guestfs-actions.pod:5274 ../src/guestfs-actions.pod:5378
3934 #: ../src/guestfs-actions.pod:5393 ../src/guestfs-actions.pod:5404
3935 #: ../src/guestfs-actions.pod:5450 ../src/guestfs-actions.pod:5460
3936 #: ../src/guestfs-actions.pod:5497 ../src/guestfs-actions.pod:5524
3937 #: ../src/guestfs-actions.pod:5566 ../src/guestfs-actions.pod:5589
3938 #: ../src/guestfs-actions.pod:5646 ../src/guestfs-actions.pod:5662
3939 #: ../src/guestfs-actions.pod:5688
3940 msgid "This function returns 0 on success or -1 on error."
3944 #: ../src/guestfs-actions.pod:31 ../src/guestfs-actions.pod:157
3945 #: ../src/guestfs-actions.pod:175 ../fish/guestfish-actions.pod:28
3946 #: ../fish/guestfish-actions.pod:117 ../fish/guestfish-actions.pod:131
3948 "This function is deprecated. In new code, use the C<add_drive_opts> call "
3953 #: ../src/guestfs-actions.pod:34 ../src/guestfs-actions.pod:160
3954 #: ../src/guestfs-actions.pod:178 ../src/guestfs-actions.pod:1214
3955 #: ../src/guestfs-actions.pod:1649 ../src/guestfs-actions.pod:1667
3956 #: ../src/guestfs-actions.pod:5597 ../src/guestfs-actions.pod:5742
3957 #: ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:120
3958 #: ../fish/guestfish-actions.pod:134 ../fish/guestfish-actions.pod:940
3959 #: ../fish/guestfish-actions.pod:1297 ../fish/guestfish-actions.pod:1311
3960 #: ../fish/guestfish-actions.pod:4317 ../fish/guestfish-actions.pod:4414
3962 "Deprecated functions will not be removed from the API, but the fact that "
3963 "they are deprecated indicates that there are problems with correct use of "
3968 #: ../src/guestfs-actions.pod:38
3969 msgid "guestfs_add_drive"
3973 #: ../src/guestfs-actions.pod:40
3976 " int guestfs_add_drive (guestfs_h *g,\n"
3977 "\t\tconst char *filename);\n"
3982 #: ../src/guestfs-actions.pod:43
3984 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
3985 "optional parameters, so the disk is added writable, with the format being "
3986 "detected automatically."
3990 #: ../src/guestfs-actions.pod:47
3992 "Automatic detection of the format opens you up to a potential security hole "
3993 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
3994 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
3995 "you should think about replacing calls to this function with calls to "
3996 "C<guestfs_add_drive_opts>, and specifying the format."
4000 #: ../src/guestfs-actions.pod:56
4001 msgid "guestfs_add_drive_opts"
4005 #: ../src/guestfs-actions.pod:58
4008 " int guestfs_add_drive_opts (guestfs_h *g,\n"
4009 "\t\tconst char *filename,\n"
4015 #: ../src/guestfs-actions.pod:62
4017 "You may supply a list of optional arguments to this call. Use zero or more "
4018 "of the following pairs of parameters, and terminate the list with C<-1> on "
4019 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
4023 #: ../src/guestfs-actions.pod:67
4026 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
4027 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
4028 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
4033 #: ../src/guestfs-actions.pod:71 ../fish/guestfish-actions.pod:56
4035 "This function adds a virtual machine disk image C<filename> to libguestfs. "
4036 "The first time you call this function, the disk appears as C</dev/sda>, the "
4037 "second time as C</dev/sdb>, and so on."
4041 #: ../src/guestfs-actions.pod:76 ../fish/guestfish-actions.pod:61
4043 "You don't necessarily need to be root when using libguestfs. However you "
4044 "obviously do need sufficient permissions to access the filename for whatever "
4045 "operations you want to perform (ie. read access if you just want to read the "
4046 "image or write access if you want to modify the image)."
4050 #: ../src/guestfs-actions.pod:82 ../fish/guestfish-actions.pod:67
4051 msgid "This call checks that C<filename> exists."
4055 #: ../src/guestfs-actions.pod:84 ../fish/guestfish-actions.pod:69
4056 msgid "The optional arguments are:"
4060 #: ../src/guestfs-actions.pod:88 ../fish/guestfish-actions.pod:73
4065 #: ../src/guestfs-actions.pod:90 ../fish/guestfish-actions.pod:75
4067 "If true then the image is treated as read-only. Writes are still allowed, "
4068 "but they are stored in a temporary snapshot overlay which is discarded at "
4069 "the end. The disk that you add is not modified."
4073 #: ../src/guestfs-actions.pod:94 ../fish/guestfish-actions.pod:79
4078 #: ../src/guestfs-actions.pod:96
4080 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
4081 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
4082 "Possible formats include C<raw> and C<qcow2>."
4086 #: ../src/guestfs-actions.pod:100 ../fish/guestfish-actions.pod:85
4088 "Automatic detection of the format opens you up to a potential security hole "
4089 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4090 "RHBZ#642934. Specifying the format closes this security hole."
4094 #: ../src/guestfs-actions.pod:105 ../fish/guestfish-actions.pod:90
4099 #: ../src/guestfs-actions.pod:107
4101 "This rarely-used option lets you emulate the behaviour of the deprecated "
4102 "C<guestfs_add_drive_with_if> call (q.v.)"
4106 #: ../src/guestfs-actions.pod:114
4107 msgid "guestfs_add_drive_opts_va"
4111 #: ../src/guestfs-actions.pod:116
4114 " int guestfs_add_drive_opts_va (guestfs_h *g,\n"
4115 "\t\tconst char *filename,\n"
4116 "\t\tva_list args);\n"
4121 #: ../src/guestfs-actions.pod:120
4122 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
4126 #: ../src/guestfs-actions.pod:122 ../src/guestfs-actions.pod:132
4127 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
4131 #: ../src/guestfs-actions.pod:124
4132 msgid "guestfs_add_drive_opts_argv"
4136 #: ../src/guestfs-actions.pod:126
4139 " int guestfs_add_drive_opts_argv (guestfs_h *g,\n"
4140 "\t\tconst char *filename,\n"
4141 "\t\tconst struct guestfs_add_drive_opts_argv *optargs);\n"
4146 #: ../src/guestfs-actions.pod:130
4147 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
4151 #: ../src/guestfs-actions.pod:134
4152 msgid "guestfs_add_drive_ro"
4156 #: ../src/guestfs-actions.pod:136
4159 " int guestfs_add_drive_ro (guestfs_h *g,\n"
4160 "\t\tconst char *filename);\n"
4165 #: ../src/guestfs-actions.pod:139
4167 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
4168 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
4169 "disk is added read-only, with the format being detected automatically."
4173 #: ../src/guestfs-actions.pod:146
4174 msgid "guestfs_add_drive_ro_with_if"
4178 #: ../src/guestfs-actions.pod:148
4181 " int guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
4182 "\t\tconst char *filename,\n"
4183 "\t\tconst char *iface);\n"
4188 #: ../src/guestfs-actions.pod:152
4190 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
4191 "QEMU interface emulation to use at run time."
4195 #: ../src/guestfs-actions.pod:164
4196 msgid "guestfs_add_drive_with_if"
4200 #: ../src/guestfs-actions.pod:166
4203 " int guestfs_add_drive_with_if (guestfs_h *g,\n"
4204 "\t\tconst char *filename,\n"
4205 "\t\tconst char *iface);\n"
4210 #: ../src/guestfs-actions.pod:170
4212 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
4213 "QEMU interface emulation to use at run time."
4217 #: ../src/guestfs-actions.pod:182
4218 msgid "guestfs_aug_clear"
4222 #: ../src/guestfs-actions.pod:184
4225 " int guestfs_aug_clear (guestfs_h *g,\n"
4226 "\t\tconst char *augpath);\n"
4231 #: ../src/guestfs-actions.pod:187 ../fish/guestfish-actions.pod:142
4233 "Set the value associated with C<path> to C<NULL>. This is the same as the "
4234 "L<augtool(1)> C<clear> command."
4238 #: ../src/guestfs-actions.pod:192
4239 msgid "guestfs_aug_close"
4243 #: ../src/guestfs-actions.pod:194
4246 " int guestfs_aug_close (guestfs_h *g);\n"
4251 #: ../src/guestfs-actions.pod:196
4253 "Close the current Augeas handle and free up any resources used by it. After "
4254 "calling this, you have to call C<guestfs_aug_init> again before you can use "
4255 "any other Augeas functions."
4259 #: ../src/guestfs-actions.pod:203
4260 msgid "guestfs_aug_defnode"
4264 #: ../src/guestfs-actions.pod:205
4267 " struct guestfs_int_bool *guestfs_aug_defnode (guestfs_h *g,\n"
4268 "\t\tconst char *name,\n"
4269 "\t\tconst char *expr,\n"
4270 "\t\tconst char *val);\n"
4275 #: ../src/guestfs-actions.pod:210 ../fish/guestfish-actions.pod:158
4277 "Defines a variable C<name> whose value is the result of evaluating C<expr>."
4281 #: ../src/guestfs-actions.pod:213
4283 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
4284 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
4285 "containing that single node."
4289 #: ../src/guestfs-actions.pod:217 ../fish/guestfish-actions.pod:165
4291 "On success this returns a pair containing the number of nodes in the "
4292 "nodeset, and a boolean flag if a node was created."
4296 #: ../src/guestfs-actions.pod:221
4298 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
4299 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
4303 #: ../src/guestfs-actions.pod:225
4304 msgid "guestfs_aug_defvar"
4308 #: ../src/guestfs-actions.pod:227
4311 " int guestfs_aug_defvar (guestfs_h *g,\n"
4312 "\t\tconst char *name,\n"
4313 "\t\tconst char *expr);\n"
4318 #: ../src/guestfs-actions.pod:231 ../fish/guestfish-actions.pod:173
4320 "Defines an Augeas variable C<name> whose value is the result of evaluating "
4321 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
4325 #: ../src/guestfs-actions.pod:235 ../fish/guestfish-actions.pod:177
4327 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
4328 "evaluates to something which is not a nodeset."
4332 #: ../src/guestfs-actions.pod:238 ../src/guestfs-actions.pod:379
4333 #: ../src/guestfs-actions.pod:533 ../src/guestfs-actions.pod:558
4334 #: ../src/guestfs-actions.pod:573 ../src/guestfs-actions.pod:589
4335 #: ../src/guestfs-actions.pod:1107 ../src/guestfs-actions.pod:1422
4336 #: ../src/guestfs-actions.pod:1604 ../src/guestfs-actions.pod:1685
4337 #: ../src/guestfs-actions.pod:1716 ../src/guestfs-actions.pod:1759
4338 #: ../src/guestfs-actions.pod:1776 ../src/guestfs-actions.pod:2001
4339 #: ../src/guestfs-actions.pod:2213 ../src/guestfs-actions.pod:2231
4340 #: ../src/guestfs-actions.pod:3601 ../src/guestfs-actions.pod:3708
4341 #: ../src/guestfs-actions.pod:4062 ../src/guestfs-actions.pod:4085
4342 #: ../src/guestfs-actions.pod:5184 ../src/guestfs-actions.pod:5534
4343 #: ../src/guestfs-actions.pod:5544 ../src/guestfs-actions.pod:5554
4344 msgid "On error this function returns -1."
4348 #: ../src/guestfs-actions.pod:240
4349 msgid "guestfs_aug_get"
4353 #: ../src/guestfs-actions.pod:242
4356 " char *guestfs_aug_get (guestfs_h *g,\n"
4357 "\t\tconst char *augpath);\n"
4362 #: ../src/guestfs-actions.pod:245 ../fish/guestfish-actions.pod:184
4364 "Look up the value associated with C<path>. If C<path> matches exactly one "
4365 "node, the C<value> is returned."
4369 #: ../src/guestfs-actions.pod:248 ../src/guestfs-actions.pod:676
4370 #: ../src/guestfs-actions.pod:691 ../src/guestfs-actions.pod:748
4371 #: ../src/guestfs-actions.pod:761 ../src/guestfs-actions.pod:852
4372 #: ../src/guestfs-actions.pod:965 ../src/guestfs-actions.pod:994
4373 #: ../src/guestfs-actions.pod:1008 ../src/guestfs-actions.pod:1024
4374 #: ../src/guestfs-actions.pod:1135 ../src/guestfs-actions.pod:1299
4375 #: ../src/guestfs-actions.pod:1408 ../src/guestfs-actions.pod:1553
4376 #: ../src/guestfs-actions.pod:1567 ../src/guestfs-actions.pod:1643
4377 #: ../src/guestfs-actions.pod:1661 ../src/guestfs-actions.pod:1795
4378 #: ../src/guestfs-actions.pod:1934 ../src/guestfs-actions.pod:2115
4379 #: ../src/guestfs-actions.pod:2165 ../src/guestfs-actions.pod:2281
4380 #: ../src/guestfs-actions.pod:2316 ../src/guestfs-actions.pod:2631
4381 #: ../src/guestfs-actions.pod:2928 ../src/guestfs-actions.pod:3069
4382 #: ../src/guestfs-actions.pod:3165 ../src/guestfs-actions.pod:3723
4383 #: ../src/guestfs-actions.pod:3899 ../src/guestfs-actions.pod:4040
4384 #: ../src/guestfs-actions.pod:4201 ../src/guestfs-actions.pod:4244
4385 #: ../src/guestfs-actions.pod:4720 ../src/guestfs-actions.pod:4733
4386 #: ../src/guestfs-actions.pod:4747 ../src/guestfs-actions.pod:4768
4387 #: ../src/guestfs-actions.pod:5327 ../src/guestfs-actions.pod:5343
4388 #: ../src/guestfs-actions.pod:5358 ../src/guestfs-actions.pod:5506
4389 #: ../src/guestfs-actions.pod:5736
4391 "This function returns a string, or NULL on error. I<The caller must free "
4392 "the returned string after use>."
4396 #: ../src/guestfs-actions.pod:251
4397 msgid "guestfs_aug_init"
4401 #: ../src/guestfs-actions.pod:253
4404 " int guestfs_aug_init (guestfs_h *g,\n"
4405 "\t\tconst char *root,\n"
4411 #: ../src/guestfs-actions.pod:257 ../fish/guestfish-actions.pod:191
4413 "Create a new Augeas handle for editing configuration files. If there was "
4414 "any previous Augeas handle associated with this guestfs session, then it is "
4419 #: ../src/guestfs-actions.pod:261
4420 msgid "You must call this before using any other C<guestfs_aug_*> commands."
4424 #: ../src/guestfs-actions.pod:264 ../fish/guestfish-actions.pod:198
4426 "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
4430 #: ../src/guestfs-actions.pod:267 ../fish/guestfish-actions.pod:201
4432 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
4433 "logical I<or> of the following integers:"
4437 #: ../src/guestfs-actions.pod:273 ../fish/guestfish-actions.pod:207
4438 msgid "C<AUG_SAVE_BACKUP> = 1"
4442 #: ../src/guestfs-actions.pod:275 ../fish/guestfish-actions.pod:209
4443 msgid "Keep the original file with a C<.augsave> extension."
4447 #: ../src/guestfs-actions.pod:277 ../fish/guestfish-actions.pod:211
4448 msgid "C<AUG_SAVE_NEWFILE> = 2"
4452 #: ../src/guestfs-actions.pod:279 ../fish/guestfish-actions.pod:213
4454 "Save changes into a file with extension C<.augnew>, and do not overwrite "
4455 "original. Overrides C<AUG_SAVE_BACKUP>."
4459 #: ../src/guestfs-actions.pod:282 ../fish/guestfish-actions.pod:216
4460 msgid "C<AUG_TYPE_CHECK> = 4"
4464 #: ../src/guestfs-actions.pod:284 ../fish/guestfish-actions.pod:218
4465 msgid "Typecheck lenses (can be expensive)."
4469 #: ../src/guestfs-actions.pod:286 ../fish/guestfish-actions.pod:220
4470 msgid "C<AUG_NO_STDINC> = 8"
4474 #: ../src/guestfs-actions.pod:288 ../fish/guestfish-actions.pod:222
4475 msgid "Do not use standard load path for modules."
4479 #: ../src/guestfs-actions.pod:290 ../fish/guestfish-actions.pod:224
4480 msgid "C<AUG_SAVE_NOOP> = 16"
4484 #: ../src/guestfs-actions.pod:292 ../fish/guestfish-actions.pod:226
4485 msgid "Make save a no-op, just record what would have been changed."
4489 #: ../src/guestfs-actions.pod:294 ../fish/guestfish-actions.pod:228
4490 msgid "C<AUG_NO_LOAD> = 32"
4494 #: ../src/guestfs-actions.pod:296
4495 msgid "Do not load the tree in C<guestfs_aug_init>."
4499 #: ../src/guestfs-actions.pod:300
4500 msgid "To close the handle, you can call C<guestfs_aug_close>."
4504 #: ../src/guestfs-actions.pod:302 ../fish/guestfish-actions.pod:236
4505 msgid "To find out more about Augeas, see L<http://augeas.net/>."
4509 #: ../src/guestfs-actions.pod:306
4510 msgid "guestfs_aug_insert"
4514 #: ../src/guestfs-actions.pod:308
4517 " int guestfs_aug_insert (guestfs_h *g,\n"
4518 "\t\tconst char *augpath,\n"
4519 "\t\tconst char *label,\n"
4520 "\t\tint before);\n"
4525 #: ../src/guestfs-actions.pod:313 ../fish/guestfish-actions.pod:242
4527 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
4528 "or after C<path> (depending on the boolean flag C<before>)."
4532 #: ../src/guestfs-actions.pod:317 ../fish/guestfish-actions.pod:246
4534 "C<path> must match exactly one existing node in the tree, and C<label> must "
4535 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
4539 #: ../src/guestfs-actions.pod:323
4540 msgid "guestfs_aug_load"
4544 #: ../src/guestfs-actions.pod:325
4547 " int guestfs_aug_load (guestfs_h *g);\n"
4552 #: ../src/guestfs-actions.pod:327 ../fish/guestfish-actions.pod:254
4553 msgid "Load files into the tree."
4557 #: ../src/guestfs-actions.pod:329 ../fish/guestfish-actions.pod:256
4558 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
4562 #: ../src/guestfs-actions.pod:334
4563 msgid "guestfs_aug_ls"
4567 #: ../src/guestfs-actions.pod:336
4570 " char **guestfs_aug_ls (guestfs_h *g,\n"
4571 "\t\tconst char *augpath);\n"
4576 #: ../src/guestfs-actions.pod:339
4578 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
4579 "sorting the resulting nodes into alphabetical order."
4583 #: ../src/guestfs-actions.pod:342 ../src/guestfs-actions.pod:355
4584 #: ../src/guestfs-actions.pod:483 ../src/guestfs-actions.pod:868
4585 #: ../src/guestfs-actions.pod:1147 ../src/guestfs-actions.pod:1163
4586 #: ../src/guestfs-actions.pod:1251 ../src/guestfs-actions.pod:1267
4587 #: ../src/guestfs-actions.pod:1498 ../src/guestfs-actions.pod:1832
4588 #: ../src/guestfs-actions.pod:1845 ../src/guestfs-actions.pod:1861
4589 #: ../src/guestfs-actions.pod:1898 ../src/guestfs-actions.pod:1919
4590 #: ../src/guestfs-actions.pod:1981 ../src/guestfs-actions.pod:2021
4591 #: ../src/guestfs-actions.pod:2187 ../src/guestfs-actions.pod:2355
4592 #: ../src/guestfs-actions.pod:2560 ../src/guestfs-actions.pod:2616
4593 #: ../src/guestfs-actions.pod:2700 ../src/guestfs-actions.pod:3046
4594 #: ../src/guestfs-actions.pod:3568 ../src/guestfs-actions.pod:4017
4595 #: ../src/guestfs-actions.pod:4126 ../src/guestfs-actions.pod:4232
4596 #: ../src/guestfs-actions.pod:4781 ../src/guestfs-actions.pod:4830
4597 #: ../src/guestfs-actions.pod:4882 ../src/guestfs-actions.pod:4998
4598 #: ../src/guestfs-actions.pod:5019 ../src/guestfs-actions.pod:5419
4599 #: ../src/guestfs-actions.pod:5436 ../src/guestfs-actions.pod:5474
4600 #: ../src/guestfs-actions.pod:5610 ../src/guestfs-actions.pod:5626
4601 #: ../src/guestfs-actions.pod:5699 ../src/guestfs-actions.pod:5715
4602 #: ../src/guestfs-actions.pod:5755 ../src/guestfs-actions.pod:5771
4604 "This function returns a NULL-terminated array of strings (like L<environ(3)"
4605 ">), or NULL if there was an error. I<The caller must free the strings and "
4606 "the array after use>."
4610 #: ../src/guestfs-actions.pod:346
4611 msgid "guestfs_aug_match"
4615 #: ../src/guestfs-actions.pod:348
4618 " char **guestfs_aug_match (guestfs_h *g,\n"
4619 "\t\tconst char *augpath);\n"
4624 #: ../src/guestfs-actions.pod:351 ../fish/guestfish-actions.pod:270
4626 "Returns a list of paths which match the path expression C<path>. The "
4627 "returned paths are sufficiently qualified so that they match exactly one "
4628 "node in the current tree."
4632 #: ../src/guestfs-actions.pod:359
4633 msgid "guestfs_aug_mv"
4637 #: ../src/guestfs-actions.pod:361
4640 " int guestfs_aug_mv (guestfs_h *g,\n"
4641 "\t\tconst char *src,\n"
4642 "\t\tconst char *dest);\n"
4647 #: ../src/guestfs-actions.pod:365 ../fish/guestfish-actions.pod:278
4649 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
4650 "C<dest> is overwritten if it exists."
4654 #: ../src/guestfs-actions.pod:370
4655 msgid "guestfs_aug_rm"
4659 #: ../src/guestfs-actions.pod:372
4662 " int guestfs_aug_rm (guestfs_h *g,\n"
4663 "\t\tconst char *augpath);\n"
4668 #: ../src/guestfs-actions.pod:375 ../fish/guestfish-actions.pod:285
4669 msgid "Remove C<path> and all of its children."
4673 #: ../src/guestfs-actions.pod:377 ../fish/guestfish-actions.pod:287
4674 msgid "On success this returns the number of entries which were removed."
4678 #: ../src/guestfs-actions.pod:381
4679 msgid "guestfs_aug_save"
4683 #: ../src/guestfs-actions.pod:383
4686 " int guestfs_aug_save (guestfs_h *g);\n"
4691 #: ../src/guestfs-actions.pod:385 ../fish/guestfish-actions.pod:293
4692 msgid "This writes all pending changes to disk."
4696 #: ../src/guestfs-actions.pod:387
4698 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
4703 #: ../src/guestfs-actions.pod:392
4704 msgid "guestfs_aug_set"
4708 #: ../src/guestfs-actions.pod:394
4711 " int guestfs_aug_set (guestfs_h *g,\n"
4712 "\t\tconst char *augpath,\n"
4713 "\t\tconst char *val);\n"
4718 #: ../src/guestfs-actions.pod:398 ../fish/guestfish-actions.pod:302
4719 msgid "Set the value associated with C<path> to C<val>."
4723 #: ../src/guestfs-actions.pod:400
4725 "In the Augeas API, it is possible to clear a node by setting the value to "
4726 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
4727 "this call. Instead you must use the C<guestfs_aug_clear> call."
4731 #: ../src/guestfs-actions.pod:407
4732 msgid "guestfs_available"
4736 #: ../src/guestfs-actions.pod:409
4739 " int guestfs_available (guestfs_h *g,\n"
4740 "\t\tchar *const *groups);\n"
4745 #: ../src/guestfs-actions.pod:412 ../fish/guestfish-actions.pod:313
4747 "This command is used to check the availability of some groups of "
4748 "functionality in the appliance, which not all builds of the libguestfs "
4749 "appliance will be able to provide."
4753 #: ../src/guestfs-actions.pod:416
4755 "The libguestfs groups, and the functions that those groups correspond to, "
4756 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
4757 "runtime by calling C<guestfs_available_all_groups>."
4761 #: ../src/guestfs-actions.pod:421 ../fish/guestfish-actions.pod:322
4763 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", \"augeas"
4764 "\"]> would check for the availability of the Linux inotify functions and "
4765 "Augeas (configuration file editing) functions."
4769 #: ../src/guestfs-actions.pod:426 ../fish/guestfish-actions.pod:327
4770 msgid "The command returns no error if I<all> requested groups are available."
4774 #: ../src/guestfs-actions.pod:428 ../fish/guestfish-actions.pod:329
4776 "It fails with an error if one or more of the requested groups is unavailable "
4781 #: ../src/guestfs-actions.pod:431 ../fish/guestfish-actions.pod:332
4783 "If an unknown group name is included in the list of groups then an error is "
4788 #: ../src/guestfs-actions.pod:434 ../fish/guestfish-actions.pod:335
4793 #: ../src/guestfs-actions.pod:440
4794 msgid "You must call C<guestfs_launch> before calling this function."
4798 #: ../src/guestfs-actions.pod:442 ../fish/guestfish-actions.pod:343
4800 "The reason is because we don't know what groups are supported by the "
4801 "appliance/daemon until it is running and can be queried."
4805 #: ../src/guestfs-actions.pod:448 ../fish/guestfish-actions.pod:349
4807 "If a group of functions is available, this does not necessarily mean that "
4808 "they will work. You still have to check for errors when calling individual "
4809 "API functions even if they are available."
4813 #: ../src/guestfs-actions.pod:455 ../fish/guestfish-actions.pod:356
4815 "It is usually the job of distro packagers to build complete functionality "
4816 "into the libguestfs appliance. Upstream libguestfs, if built from source "
4817 "with all requirements satisfied, will support everything."
4821 #: ../src/guestfs-actions.pod:462
4823 "This call was added in version C<1.0.80>. In previous versions of "
4824 "libguestfs all you could do would be to speculatively execute a command to "
4825 "find out if the daemon implemented it. See also C<guestfs_version>."
4829 #: ../src/guestfs-actions.pod:471
4830 msgid "guestfs_available_all_groups"
4834 #: ../src/guestfs-actions.pod:473
4837 " char **guestfs_available_all_groups (guestfs_h *g);\n"
4842 #: ../src/guestfs-actions.pod:475
4844 "This command returns a list of all optional groups that this daemon knows "
4845 "about. Note this returns both supported and unsupported groups. To find "
4846 "out which ones the daemon can actually support you have to call "
4847 "C<guestfs_available> on each member of the returned list."
4851 #: ../src/guestfs-actions.pod:481
4852 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
4856 #: ../src/guestfs-actions.pod:487
4857 msgid "guestfs_base64_in"
4861 #: ../src/guestfs-actions.pod:489
4864 " int guestfs_base64_in (guestfs_h *g,\n"
4865 "\t\tconst char *base64file,\n"
4866 "\t\tconst char *filename);\n"
4871 #: ../src/guestfs-actions.pod:493 ../fish/guestfish-actions.pod:386
4873 "This command uploads base64-encoded data from C<base64file> to C<filename>."
4877 #: ../src/guestfs-actions.pod:498
4878 msgid "guestfs_base64_out"
4882 #: ../src/guestfs-actions.pod:500
4885 " int guestfs_base64_out (guestfs_h *g,\n"
4886 "\t\tconst char *filename,\n"
4887 "\t\tconst char *base64file);\n"
4892 #: ../src/guestfs-actions.pod:504 ../fish/guestfish-actions.pod:395
4894 "This command downloads the contents of C<filename>, writing it out to local "
4895 "file C<base64file> encoded as base64."
4899 #: ../src/guestfs-actions.pod:509
4900 msgid "guestfs_blockdev_flushbufs"
4904 #: ../src/guestfs-actions.pod:511
4907 " int guestfs_blockdev_flushbufs (guestfs_h *g,\n"
4908 "\t\tconst char *device);\n"
4913 #: ../src/guestfs-actions.pod:514 ../fish/guestfish-actions.pod:404
4915 "This tells the kernel to flush internal buffers associated with C<device>."
4919 #: ../src/guestfs-actions.pod:517 ../src/guestfs-actions.pod:531
4920 #: ../src/guestfs-actions.pod:543 ../src/guestfs-actions.pod:556
4921 #: ../src/guestfs-actions.pod:571 ../src/guestfs-actions.pod:587
4922 #: ../src/guestfs-actions.pod:598 ../src/guestfs-actions.pod:613
4923 #: ../src/guestfs-actions.pod:624 ../src/guestfs-actions.pod:635
4924 #: ../fish/guestfish-actions.pod:407 ../fish/guestfish-actions.pod:418
4925 #: ../fish/guestfish-actions.pod:427 ../fish/guestfish-actions.pod:437
4926 #: ../fish/guestfish-actions.pod:449 ../fish/guestfish-actions.pod:462
4927 #: ../fish/guestfish-actions.pod:470 ../fish/guestfish-actions.pod:481
4928 #: ../fish/guestfish-actions.pod:489 ../fish/guestfish-actions.pod:497
4929 msgid "This uses the L<blockdev(8)> command."
4933 #: ../src/guestfs-actions.pod:521
4934 msgid "guestfs_blockdev_getbsz"
4938 #: ../src/guestfs-actions.pod:523
4941 " int guestfs_blockdev_getbsz (guestfs_h *g,\n"
4942 "\t\tconst char *device);\n"
4947 #: ../src/guestfs-actions.pod:526 ../fish/guestfish-actions.pod:413
4948 msgid "This returns the block size of a device."
4952 #: ../src/guestfs-actions.pod:528 ../src/guestfs-actions.pod:610
4953 #: ../fish/guestfish-actions.pod:415 ../fish/guestfish-actions.pod:478
4955 "(Note this is different from both I<size in blocks> and I<filesystem block "
4960 #: ../src/guestfs-actions.pod:535
4961 msgid "guestfs_blockdev_getro"
4965 #: ../src/guestfs-actions.pod:537
4968 " int guestfs_blockdev_getro (guestfs_h *g,\n"
4969 "\t\tconst char *device);\n"
4974 #: ../src/guestfs-actions.pod:540 ../fish/guestfish-actions.pod:424
4976 "Returns a boolean indicating if the block device is read-only (true if read-"
4977 "only, false if not)."
4981 #: ../src/guestfs-actions.pod:545 ../src/guestfs-actions.pod:1181
4982 #: ../src/guestfs-actions.pod:1193 ../src/guestfs-actions.pod:1625
4983 #: ../src/guestfs-actions.pod:1633 ../src/guestfs-actions.pod:1693
4984 #: ../src/guestfs-actions.pod:1736 ../src/guestfs-actions.pod:1748
4985 #: ../src/guestfs-actions.pod:1767 ../src/guestfs-actions.pod:1784
4986 #: ../src/guestfs-actions.pod:2369 ../src/guestfs-actions.pod:2380
4987 #: ../src/guestfs-actions.pod:2392 ../src/guestfs-actions.pod:2403
4988 #: ../src/guestfs-actions.pod:2416 ../src/guestfs-actions.pod:2428
4989 #: ../src/guestfs-actions.pod:2441 ../src/guestfs-actions.pod:2452
4990 #: ../src/guestfs-actions.pod:2462 ../src/guestfs-actions.pod:2473
4991 #: ../src/guestfs-actions.pod:2485 ../src/guestfs-actions.pod:2497
4992 #: ../src/guestfs-actions.pod:3693
4993 msgid "This function returns a C truth value on success or -1 on error."
4997 #: ../src/guestfs-actions.pod:547
4998 msgid "guestfs_blockdev_getsize64"
5002 #: ../src/guestfs-actions.pod:549
5005 " int64_t guestfs_blockdev_getsize64 (guestfs_h *g,\n"
5006 "\t\tconst char *device);\n"
5011 #: ../src/guestfs-actions.pod:552 ../fish/guestfish-actions.pod:433
5012 msgid "This returns the size of the device in bytes."
5016 #: ../src/guestfs-actions.pod:554
5017 msgid "See also C<guestfs_blockdev_getsz>."
5021 #: ../src/guestfs-actions.pod:560
5022 msgid "guestfs_blockdev_getss"
5026 #: ../src/guestfs-actions.pod:562
5029 " int guestfs_blockdev_getss (guestfs_h *g,\n"
5030 "\t\tconst char *device);\n"
5035 #: ../src/guestfs-actions.pod:565 ../fish/guestfish-actions.pod:443
5037 "This returns the size of sectors on a block device. Usually 512, but can be "
5038 "larger for modern devices."
5042 #: ../src/guestfs-actions.pod:568
5044 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
5049 #: ../src/guestfs-actions.pod:575
5050 msgid "guestfs_blockdev_getsz"
5054 #: ../src/guestfs-actions.pod:577
5057 " int64_t guestfs_blockdev_getsz (guestfs_h *g,\n"
5058 "\t\tconst char *device);\n"
5063 #: ../src/guestfs-actions.pod:580 ../fish/guestfish-actions.pod:455
5065 "This returns the size of the device in units of 512-byte sectors (even if "
5066 "the sectorsize isn't 512 bytes ... weird)."
5070 #: ../src/guestfs-actions.pod:583
5072 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
5073 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
5077 #: ../src/guestfs-actions.pod:591
5078 msgid "guestfs_blockdev_rereadpt"
5082 #: ../src/guestfs-actions.pod:593
5085 " int guestfs_blockdev_rereadpt (guestfs_h *g,\n"
5086 "\t\tconst char *device);\n"
5091 #: ../src/guestfs-actions.pod:596 ../fish/guestfish-actions.pod:468
5092 msgid "Reread the partition table on C<device>."
5096 #: ../src/guestfs-actions.pod:602
5097 msgid "guestfs_blockdev_setbsz"
5101 #: ../src/guestfs-actions.pod:604
5104 " int guestfs_blockdev_setbsz (guestfs_h *g,\n"
5105 "\t\tconst char *device,\n"
5106 "\t\tint blocksize);\n"
5111 #: ../src/guestfs-actions.pod:608 ../fish/guestfish-actions.pod:476
5112 msgid "This sets the block size of a device."
5116 #: ../src/guestfs-actions.pod:617
5117 msgid "guestfs_blockdev_setro"
5121 #: ../src/guestfs-actions.pod:619
5124 " int guestfs_blockdev_setro (guestfs_h *g,\n"
5125 "\t\tconst char *device);\n"
5130 #: ../src/guestfs-actions.pod:622 ../fish/guestfish-actions.pod:487
5131 msgid "Sets the block device named C<device> to read-only."
5135 #: ../src/guestfs-actions.pod:628
5136 msgid "guestfs_blockdev_setrw"
5140 #: ../src/guestfs-actions.pod:630
5143 " int guestfs_blockdev_setrw (guestfs_h *g,\n"
5144 "\t\tconst char *device);\n"
5149 #: ../src/guestfs-actions.pod:633 ../fish/guestfish-actions.pod:495
5150 msgid "Sets the block device named C<device> to read-write."
5154 #: ../src/guestfs-actions.pod:639
5155 msgid "guestfs_case_sensitive_path"
5159 #: ../src/guestfs-actions.pod:641
5162 " char *guestfs_case_sensitive_path (guestfs_h *g,\n"
5163 "\t\tconst char *path);\n"
5168 #: ../src/guestfs-actions.pod:644 ../fish/guestfish-actions.pod:503
5170 "This can be used to resolve case insensitive paths on a filesystem which is "
5171 "case sensitive. The use case is to resolve paths which you have read from "
5172 "Windows configuration files or the Windows Registry, to the true path."
5176 #: ../src/guestfs-actions.pod:649 ../fish/guestfish-actions.pod:508
5178 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
5179 "(and probably others), which is that although the underlying filesystem is "
5180 "case-insensitive, the driver exports the filesystem to Linux as case-"
5185 #: ../src/guestfs-actions.pod:654 ../fish/guestfish-actions.pod:513
5187 "One consequence of this is that special directories such as C<c:\\windows> "
5188 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
5189 "precise details of how they were created. In Windows itself this would not "
5194 #: ../src/guestfs-actions.pod:660 ../fish/guestfish-actions.pod:519
5196 "Bug or feature? You decide: L<http://www.tuxera.com/community/ntfs-3g-faq/"
5201 #: ../src/guestfs-actions.pod:663 ../fish/guestfish-actions.pod:522
5203 "This function resolves the true case of each element in the path and returns "
5204 "the case-sensitive path."
5208 #: ../src/guestfs-actions.pod:666
5210 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return C<"
5211 "\"/WINDOWS/system32\"> (the exact return value would depend on details of "
5212 "how the directories were originally created under Windows)."
5216 #: ../src/guestfs-actions.pod:671 ../fish/guestfish-actions.pod:530
5217 msgid "I<Note>: This function does not handle drive names, backslashes etc."
5221 #: ../src/guestfs-actions.pod:674
5222 msgid "See also C<guestfs_realpath>."
5226 #: ../src/guestfs-actions.pod:679
5231 #: ../src/guestfs-actions.pod:681
5234 " char *guestfs_cat (guestfs_h *g,\n"
5235 "\t\tconst char *path);\n"
5240 #: ../src/guestfs-actions.pod:684 ../src/guestfs-actions.pod:4116
5241 #: ../fish/guestfish-actions.pod:539 ../fish/guestfish-actions.pod:3161
5242 msgid "Return the contents of the file named C<path>."
5246 #: ../src/guestfs-actions.pod:686
5248 "Note that this function cannot correctly handle binary files (specifically, "
5249 "files containing C<\\0> character which is treated as end of string). For "
5250 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
5251 "functions which have a more complex interface."
5255 #: ../src/guestfs-actions.pod:694 ../src/guestfs-actions.pod:855
5256 #: ../src/guestfs-actions.pod:872 ../src/guestfs-actions.pod:1151
5257 #: ../src/guestfs-actions.pod:1167 ../src/guestfs-actions.pod:1255
5258 #: ../src/guestfs-actions.pod:1271 ../src/guestfs-actions.pod:1502
5259 #: ../src/guestfs-actions.pod:1849 ../src/guestfs-actions.pod:1865
5260 #: ../src/guestfs-actions.pod:1902 ../src/guestfs-actions.pod:1923
5261 #: ../src/guestfs-actions.pod:1937 ../src/guestfs-actions.pod:1963
5262 #: ../src/guestfs-actions.pod:3933 ../src/guestfs-actions.pod:3956
5263 #: ../src/guestfs-actions.pod:4064 ../src/guestfs-actions.pod:4087
5264 #: ../src/guestfs-actions.pod:4108 ../src/guestfs-actions.pod:4834
5265 #: ../src/guestfs-actions.pod:4886 ../src/guestfs-actions.pod:5002
5266 #: ../src/guestfs-actions.pod:5023 ../src/guestfs-actions.pod:5568
5267 #: ../src/guestfs-actions.pod:5591 ../src/guestfs-actions.pod:5614
5268 #: ../src/guestfs-actions.pod:5630 ../src/guestfs-actions.pod:5703
5269 #: ../src/guestfs-actions.pod:5719 ../src/guestfs-actions.pod:5759
5270 #: ../src/guestfs-actions.pod:5775 ../fish/guestfish-actions.pod:546
5271 #: ../fish/guestfish-actions.pod:681 ../fish/guestfish-actions.pod:693
5272 #: ../fish/guestfish-actions.pod:894 ../fish/guestfish-actions.pod:904
5273 #: ../fish/guestfish-actions.pod:971 ../fish/guestfish-actions.pod:981
5274 #: ../fish/guestfish-actions.pod:1176 ../fish/guestfish-actions.pod:1451
5275 #: ../fish/guestfish-actions.pod:1461 ../fish/guestfish-actions.pod:1489
5276 #: ../fish/guestfish-actions.pod:1504 ../fish/guestfish-actions.pod:1514
5277 #: ../fish/guestfish-actions.pod:1533 ../fish/guestfish-actions.pod:3031
5278 #: ../fish/guestfish-actions.pod:3046 ../fish/guestfish-actions.pod:3122
5279 #: ../fish/guestfish-actions.pod:3139 ../fish/guestfish-actions.pod:3154
5280 #: ../fish/guestfish-actions.pod:3737 ../fish/guestfish-actions.pod:3783
5281 #: ../fish/guestfish-actions.pod:3868 ../fish/guestfish-actions.pod:3883
5282 #: ../fish/guestfish-actions.pod:4293 ../fish/guestfish-actions.pod:4311
5283 #: ../fish/guestfish-actions.pod:4328 ../fish/guestfish-actions.pod:4338
5284 #: ../fish/guestfish-actions.pod:4386 ../fish/guestfish-actions.pod:4396
5285 #: ../fish/guestfish-actions.pod:4425 ../fish/guestfish-actions.pod:4435
5287 "Because of the message protocol, there is a transfer limit of somewhere "
5288 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
5292 #: ../src/guestfs-actions.pod:697
5293 msgid "guestfs_checksum"
5297 #: ../src/guestfs-actions.pod:699
5300 " char *guestfs_checksum (guestfs_h *g,\n"
5301 "\t\tconst char *csumtype,\n"
5302 "\t\tconst char *path);\n"
5307 #: ../src/guestfs-actions.pod:703 ../fish/guestfish-actions.pod:553
5309 "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
5313 #: ../src/guestfs-actions.pod:706 ../fish/guestfish-actions.pod:556
5315 "The type of checksum to compute is given by the C<csumtype> parameter which "
5316 "must have one of the following values:"
5320 #: ../src/guestfs-actions.pod:711 ../fish/guestfish-actions.pod:561
5325 #: ../src/guestfs-actions.pod:713 ../fish/guestfish-actions.pod:563
5327 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
5332 #: ../src/guestfs-actions.pod:716 ../fish/guestfish-actions.pod:566
5337 #: ../src/guestfs-actions.pod:718 ../fish/guestfish-actions.pod:568
5338 msgid "Compute the MD5 hash (using the C<md5sum> program)."
5342 #: ../src/guestfs-actions.pod:720 ../fish/guestfish-actions.pod:570
5347 #: ../src/guestfs-actions.pod:722 ../fish/guestfish-actions.pod:572
5348 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
5352 #: ../src/guestfs-actions.pod:724 ../fish/guestfish-actions.pod:574
5357 #: ../src/guestfs-actions.pod:726 ../fish/guestfish-actions.pod:576
5358 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
5362 #: ../src/guestfs-actions.pod:728 ../fish/guestfish-actions.pod:578
5367 #: ../src/guestfs-actions.pod:730 ../fish/guestfish-actions.pod:580
5368 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
5372 #: ../src/guestfs-actions.pod:732 ../fish/guestfish-actions.pod:582
5377 #: ../src/guestfs-actions.pod:734 ../fish/guestfish-actions.pod:584
5378 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
5382 #: ../src/guestfs-actions.pod:736 ../fish/guestfish-actions.pod:586
5387 #: ../src/guestfs-actions.pod:738 ../fish/guestfish-actions.pod:588
5388 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
5392 #: ../src/guestfs-actions.pod:742 ../fish/guestfish-actions.pod:592
5393 msgid "The checksum is returned as a printable string."
5397 #: ../src/guestfs-actions.pod:744
5398 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
5402 #: ../src/guestfs-actions.pod:746
5403 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
5407 #: ../src/guestfs-actions.pod:751
5408 msgid "guestfs_checksum_device"
5412 #: ../src/guestfs-actions.pod:753
5415 " char *guestfs_checksum_device (guestfs_h *g,\n"
5416 "\t\tconst char *csumtype,\n"
5417 "\t\tconst char *device);\n"
5422 #: ../src/guestfs-actions.pod:757
5424 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
5425 "device named C<device>. For the types of checksums supported see the "
5426 "C<guestfs_checksum> command."
5430 #: ../src/guestfs-actions.pod:764
5431 msgid "guestfs_checksums_out"
5435 #: ../src/guestfs-actions.pod:766
5438 " int guestfs_checksums_out (guestfs_h *g,\n"
5439 "\t\tconst char *csumtype,\n"
5440 "\t\tconst char *directory,\n"
5441 "\t\tconst char *sumsfile);\n"
5446 #: ../src/guestfs-actions.pod:771 ../fish/guestfish-actions.pod:610
5448 "This command computes the checksums of all regular files in C<directory> and "
5449 "then emits a list of those checksums to the local output file C<sumsfile>."
5453 #: ../src/guestfs-actions.pod:775 ../fish/guestfish-actions.pod:614
5455 "This can be used for verifying the integrity of a virtual machine. However "
5456 "to be properly secure you should pay attention to the output of the checksum "
5457 "command (it uses the ones from GNU coreutils). In particular when the "
5458 "filename is not printable, coreutils uses a special backslash syntax. For "
5459 "more information, see the GNU coreutils info file."
5463 #: ../src/guestfs-actions.pod:785
5464 msgid "guestfs_chmod"
5468 #: ../src/guestfs-actions.pod:787
5471 " int guestfs_chmod (guestfs_h *g,\n"
5473 "\t\tconst char *path);\n"
5478 #: ../src/guestfs-actions.pod:791 ../fish/guestfish-actions.pod:628
5480 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
5485 #: ../src/guestfs-actions.pod:794 ../fish/guestfish-actions.pod:631
5487 "I<Note>: When using this command from guestfish, C<mode> by default would be "
5488 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
5493 #: ../src/guestfs-actions.pod:798 ../src/guestfs-actions.pod:3261
5494 #: ../src/guestfs-actions.pod:3364 ../src/guestfs-actions.pod:3380
5495 #: ../src/guestfs-actions.pod:3396 ../fish/guestfish-actions.pod:635
5496 #: ../fish/guestfish-actions.pod:2521 ../fish/guestfish-actions.pod:2606
5497 #: ../fish/guestfish-actions.pod:2616 ../fish/guestfish-actions.pod:2626
5498 msgid "The mode actually set is affected by the umask."
5502 #: ../src/guestfs-actions.pod:802
5503 msgid "guestfs_chown"
5507 #: ../src/guestfs-actions.pod:804
5510 " int guestfs_chown (guestfs_h *g,\n"
5513 "\t\tconst char *path);\n"
5518 #: ../src/guestfs-actions.pod:809 ../fish/guestfish-actions.pod:641
5519 msgid "Change the file owner to C<owner> and group to C<group>."
5523 #: ../src/guestfs-actions.pod:811 ../src/guestfs-actions.pod:2530
5524 #: ../fish/guestfish-actions.pod:643 ../fish/guestfish-actions.pod:1999
5526 "Only numeric uid and gid are supported. If you want to use names, you will "
5527 "need to locate and parse the password file yourself (Augeas support makes "
5528 "this relatively easy)."
5532 #: ../src/guestfs-actions.pod:817
5533 msgid "guestfs_command"
5537 #: ../src/guestfs-actions.pod:819
5540 " char *guestfs_command (guestfs_h *g,\n"
5541 "\t\tchar *const *arguments);\n"
5546 #: ../src/guestfs-actions.pod:822 ../fish/guestfish-actions.pod:651
5548 "This call runs a command from the guest filesystem. The filesystem must be "
5549 "mounted, and must contain a compatible operating system (ie. something "
5550 "Linux, with the same or compatible processor architecture)."
5554 #: ../src/guestfs-actions.pod:827
5556 "The single parameter is an argv-style list of arguments. The first element "
5557 "is the name of the program to run. Subsequent elements are parameters. The "
5558 "list must be non-empty (ie. must contain a program name). Note that the "
5559 "command runs directly, and is I<not> invoked via the shell (see "
5564 #: ../src/guestfs-actions.pod:834 ../fish/guestfish-actions.pod:663
5565 msgid "The return value is anything printed to I<stdout> by the command."
5569 #: ../src/guestfs-actions.pod:837 ../fish/guestfish-actions.pod:666
5571 "If the command returns a non-zero exit status, then this function returns an "
5572 "error message. The error message string is the content of I<stderr> from "
5577 #: ../src/guestfs-actions.pod:841 ../fish/guestfish-actions.pod:670
5579 "The C<$PATH> environment variable will contain at least C</usr/bin> and C</"
5580 "bin>. If you require a program from another location, you should provide "
5581 "the full path in the first parameter."
5585 #: ../src/guestfs-actions.pod:846 ../fish/guestfish-actions.pod:675
5587 "Shared libraries and data files required by the program must be available on "
5588 "filesystems which are mounted in the correct places. It is the caller's "
5589 "responsibility to ensure all filesystems that are needed are mounted at the "
5594 #: ../src/guestfs-actions.pod:858
5595 msgid "guestfs_command_lines"
5599 #: ../src/guestfs-actions.pod:860
5602 " char **guestfs_command_lines (guestfs_h *g,\n"
5603 "\t\tchar *const *arguments);\n"
5608 #: ../src/guestfs-actions.pod:863
5610 "This is the same as C<guestfs_command>, but splits the result into a list of "
5615 #: ../src/guestfs-actions.pod:866
5616 msgid "See also: C<guestfs_sh_lines>"
5620 #: ../src/guestfs-actions.pod:875
5621 msgid "guestfs_config"
5625 #: ../src/guestfs-actions.pod:877
5628 " int guestfs_config (guestfs_h *g,\n"
5629 "\t\tconst char *qemuparam,\n"
5630 "\t\tconst char *qemuvalue);\n"
5635 #: ../src/guestfs-actions.pod:881 ../fish/guestfish-actions.pod:700
5637 "This can be used to add arbitrary qemu command line parameters of the form "
5638 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
5639 "setting some parameters which would interfere with parameters that we use."
5643 #: ../src/guestfs-actions.pod:886 ../fish/guestfish-actions.pod:705
5644 msgid "The first character of C<param> string must be a C<-> (dash)."
5648 #: ../src/guestfs-actions.pod:888 ../fish/guestfish-actions.pod:707
5649 msgid "C<value> can be NULL."
5653 #: ../src/guestfs-actions.pod:892
5654 msgid "guestfs_copy_size"
5658 #: ../src/guestfs-actions.pod:894
5661 " int guestfs_copy_size (guestfs_h *g,\n"
5662 "\t\tconst char *src,\n"
5663 "\t\tconst char *dest,\n"
5664 "\t\tint64_t size);\n"
5669 #: ../src/guestfs-actions.pod:899 ../fish/guestfish-actions.pod:713
5671 "This command copies exactly C<size> bytes from one source device or file "
5672 "C<src> to another destination device or file C<dest>."
5676 #: ../src/guestfs-actions.pod:902 ../fish/guestfish-actions.pod:716
5678 "Note this will fail if the source is too short or if the destination is not "
5683 #: ../src/guestfs-actions.pod:907 ../src/guestfs-actions.pod:1042
5684 #: ../src/guestfs-actions.pod:1070 ../src/guestfs-actions.pod:1442
5685 #: ../src/guestfs-actions.pod:1461 ../src/guestfs-actions.pod:5648
5686 #: ../src/guestfs-actions.pod:5664
5688 "This long-running command can generate progress notification messages so "
5689 "that the caller can display a progress bar or indicator. To receive these "
5690 "messages, the caller must register a progress callback. See L<guestfs(3)/"
5691 "guestfs_set_progress_callback>."
5695 #: ../src/guestfs-actions.pod:912
5700 #: ../src/guestfs-actions.pod:914
5703 " int guestfs_cp (guestfs_h *g,\n"
5704 "\t\tconst char *src,\n"
5705 "\t\tconst char *dest);\n"
5710 #: ../src/guestfs-actions.pod:918 ../fish/guestfish-actions.pod:723
5712 "This copies a file from C<src> to C<dest> where C<dest> is either a "
5713 "destination filename or destination directory."
5717 #: ../src/guestfs-actions.pod:923
5718 msgid "guestfs_cp_a"
5722 #: ../src/guestfs-actions.pod:925
5725 " int guestfs_cp_a (guestfs_h *g,\n"
5726 "\t\tconst char *src,\n"
5727 "\t\tconst char *dest);\n"
5732 #: ../src/guestfs-actions.pod:929 ../fish/guestfish-actions.pod:730
5734 "This copies a file or directory from C<src> to C<dest> recursively using the "
5739 #: ../src/guestfs-actions.pod:934
5744 #: ../src/guestfs-actions.pod:936
5747 " int guestfs_dd (guestfs_h *g,\n"
5748 "\t\tconst char *src,\n"
5749 "\t\tconst char *dest);\n"
5754 #: ../src/guestfs-actions.pod:940 ../fish/guestfish-actions.pod:737
5756 "This command copies from one source device or file C<src> to another "
5757 "destination device or file C<dest>. Normally you would use this to copy to "
5758 "or from a device or partition, for example to duplicate a filesystem."
5762 #: ../src/guestfs-actions.pod:945
5764 "If the destination is a device, it must be as large or larger than the "
5765 "source file or device, otherwise the copy will fail. This command cannot do "
5766 "partial copies (see C<guestfs_copy_size>)."
5770 #: ../src/guestfs-actions.pod:951
5771 msgid "guestfs_debug"
5775 #: ../src/guestfs-actions.pod:953
5778 " char *guestfs_debug (guestfs_h *g,\n"
5779 "\t\tconst char *subcmd,\n"
5780 "\t\tchar *const *extraargs);\n"
5785 #: ../src/guestfs-actions.pod:957
5787 "The C<guestfs_debug> command exposes some internals of C<guestfsd> (the "
5788 "guestfs daemon) that runs inside the qemu subprocess."
5792 #: ../src/guestfs-actions.pod:961 ../fish/guestfish-actions.pod:754
5794 "There is no comprehensive help for this command. You have to look at the "
5795 "file C<daemon/debug.c> in the libguestfs source to find out what you can do."
5799 #: ../src/guestfs-actions.pod:968
5800 msgid "guestfs_debug_upload"
5804 #: ../src/guestfs-actions.pod:970
5807 " int guestfs_debug_upload (guestfs_h *g,\n"
5808 "\t\tconst char *filename,\n"
5809 "\t\tconst char *tmpname,\n"
5815 #: ../src/guestfs-actions.pod:975
5817 "The C<guestfs_debug_upload> command uploads a file to the libguestfs "
5822 #: ../src/guestfs-actions.pod:978 ../fish/guestfish-actions.pod:765
5824 "There is no comprehensive help for this command. You have to look at the "
5825 "file C<daemon/debug.c> in the libguestfs source to find out what it is for."
5829 #: ../src/guestfs-actions.pod:984
5834 #: ../src/guestfs-actions.pod:986
5837 " char *guestfs_df (guestfs_h *g);\n"
5842 #: ../src/guestfs-actions.pod:988 ../fish/guestfish-actions.pod:775
5843 msgid "This command runs the C<df> command to report disk space used."
5847 #: ../src/guestfs-actions.pod:990 ../src/guestfs-actions.pod:1004
5848 #: ../fish/guestfish-actions.pod:777 ../fish/guestfish-actions.pod:788
5850 "This command is mostly useful for interactive sessions. It is I<not> "
5851 "intended that you try to parse the output string. Use C<statvfs> from "
5856 #: ../src/guestfs-actions.pod:997
5857 msgid "guestfs_df_h"
5861 #: ../src/guestfs-actions.pod:999
5864 " char *guestfs_df_h (guestfs_h *g);\n"
5869 #: ../src/guestfs-actions.pod:1001 ../fish/guestfish-actions.pod:785
5871 "This command runs the C<df -h> command to report disk space used in human-"
5876 #: ../src/guestfs-actions.pod:1011
5877 msgid "guestfs_dmesg"
5881 #: ../src/guestfs-actions.pod:1013
5884 " char *guestfs_dmesg (guestfs_h *g);\n"
5889 #: ../src/guestfs-actions.pod:1015 ../fish/guestfish-actions.pod:796
5891 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
5892 "This is sometimes useful for extended debugging of problems."
5896 #: ../src/guestfs-actions.pod:1019
5898 "Another way to get the same information is to enable verbose messages with "
5899 "C<guestfs_set_verbose> or by setting the environment variable "
5900 "C<LIBGUESTFS_DEBUG=1> before running the program."
5904 #: ../src/guestfs-actions.pod:1027
5905 msgid "guestfs_download"
5909 #: ../src/guestfs-actions.pod:1029
5912 " int guestfs_download (guestfs_h *g,\n"
5913 "\t\tconst char *remotefilename,\n"
5914 "\t\tconst char *filename);\n"
5919 #: ../src/guestfs-actions.pod:1033 ../src/guestfs-actions.pod:1055
5920 #: ../fish/guestfish-actions.pod:809 ../fish/guestfish-actions.pod:822
5922 "Download file C<remotefilename> and save it as C<filename> on the local "
5927 #: ../src/guestfs-actions.pod:1036 ../src/guestfs-actions.pod:5216
5928 #: ../fish/guestfish-actions.pod:812 ../fish/guestfish-actions.pod:4041
5929 msgid "C<filename> can also be a named pipe."
5933 #: ../src/guestfs-actions.pod:1038
5934 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
5938 #: ../src/guestfs-actions.pod:1047
5939 msgid "guestfs_download_offset"
5943 #: ../src/guestfs-actions.pod:1049
5946 " int guestfs_download_offset (guestfs_h *g,\n"
5947 "\t\tconst char *remotefilename,\n"
5948 "\t\tconst char *filename,\n"
5949 "\t\tint64_t offset,\n"
5950 "\t\tint64_t size);\n"
5955 #: ../src/guestfs-actions.pod:1058 ../fish/guestfish-actions.pod:825
5957 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
5958 "region must be within the file or device)."
5962 #: ../src/guestfs-actions.pod:1061
5964 "Note that there is no limit on the amount of data that can be downloaded "
5965 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
5966 "full amount unless an error occurs."
5970 #: ../src/guestfs-actions.pod:1066
5971 msgid "See also C<guestfs_download>, C<guestfs_pread>."
5975 #: ../src/guestfs-actions.pod:1075
5976 msgid "guestfs_drop_caches"
5980 #: ../src/guestfs-actions.pod:1077
5983 " int guestfs_drop_caches (guestfs_h *g,\n"
5984 "\t\tint whattodrop);\n"
5989 #: ../src/guestfs-actions.pod:1080 ../fish/guestfish-actions.pod:841
5991 "This instructs the guest kernel to drop its page cache, and/or dentries and "
5992 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
5993 "to drop, see L<http://linux-mm.org/Drop_Caches>"
5997 #: ../src/guestfs-actions.pod:1085 ../fish/guestfish-actions.pod:846
5998 msgid "Setting C<whattodrop> to 3 should drop everything."
6002 #: ../src/guestfs-actions.pod:1087 ../fish/guestfish-actions.pod:848
6004 "This automatically calls L<sync(2)> before the operation, so that the "
6005 "maximum guest memory is freed."
6009 #: ../src/guestfs-actions.pod:1092
6014 #: ../src/guestfs-actions.pod:1094
6017 " int64_t guestfs_du (guestfs_h *g,\n"
6018 "\t\tconst char *path);\n"
6023 #: ../src/guestfs-actions.pod:1097 ../fish/guestfish-actions.pod:855
6025 "This command runs the C<du -s> command to estimate file space usage for "
6030 #: ../src/guestfs-actions.pod:1100 ../fish/guestfish-actions.pod:858
6032 "C<path> can be a file or a directory. If C<path> is a directory then the "
6033 "estimate includes the contents of the directory and all subdirectories "
6038 #: ../src/guestfs-actions.pod:1104 ../fish/guestfish-actions.pod:862
6040 "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
6044 #: ../src/guestfs-actions.pod:1109
6045 msgid "guestfs_e2fsck_f"
6049 #: ../src/guestfs-actions.pod:1111
6052 " int guestfs_e2fsck_f (guestfs_h *g,\n"
6053 "\t\tconst char *device);\n"
6058 #: ../src/guestfs-actions.pod:1114 ../fish/guestfish-actions.pod:869
6060 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
6061 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
6066 #: ../src/guestfs-actions.pod:1118
6068 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
6069 "Normally you should use C<guestfs_fsck>."
6073 #: ../src/guestfs-actions.pod:1123
6074 msgid "guestfs_echo_daemon"
6078 #: ../src/guestfs-actions.pod:1125
6081 " char *guestfs_echo_daemon (guestfs_h *g,\n"
6082 "\t\tchar *const *words);\n"
6087 #: ../src/guestfs-actions.pod:1128 ../fish/guestfish-actions.pod:880
6089 "This command concatenates the list of C<words> passed with single spaces "
6090 "between them and returns the resulting string."
6094 #: ../src/guestfs-actions.pod:1131 ../fish/guestfish-actions.pod:883
6095 msgid "You can use this command to test the connection through to the daemon."
6099 #: ../src/guestfs-actions.pod:1133
6100 msgid "See also C<guestfs_ping_daemon>."
6104 #: ../src/guestfs-actions.pod:1138
6105 msgid "guestfs_egrep"
6109 #: ../src/guestfs-actions.pod:1140
6112 " char **guestfs_egrep (guestfs_h *g,\n"
6113 "\t\tconst char *regex,\n"
6114 "\t\tconst char *path);\n"
6119 #: ../src/guestfs-actions.pod:1144 ../fish/guestfish-actions.pod:891
6121 "This calls the external C<egrep> program and returns the matching lines."
6125 #: ../src/guestfs-actions.pod:1154
6126 msgid "guestfs_egrepi"
6130 #: ../src/guestfs-actions.pod:1156
6133 " char **guestfs_egrepi (guestfs_h *g,\n"
6134 "\t\tconst char *regex,\n"
6135 "\t\tconst char *path);\n"
6140 #: ../src/guestfs-actions.pod:1160 ../fish/guestfish-actions.pod:901
6142 "This calls the external C<egrep -i> program and returns the matching lines."
6146 #: ../src/guestfs-actions.pod:1170
6147 msgid "guestfs_equal"
6151 #: ../src/guestfs-actions.pod:1172
6154 " int guestfs_equal (guestfs_h *g,\n"
6155 "\t\tconst char *file1,\n"
6156 "\t\tconst char *file2);\n"
6161 #: ../src/guestfs-actions.pod:1176 ../fish/guestfish-actions.pod:911
6163 "This compares the two files C<file1> and C<file2> and returns true if their "
6164 "content is exactly equal, or false otherwise."
6168 #: ../src/guestfs-actions.pod:1179 ../fish/guestfish-actions.pod:914
6169 msgid "The external L<cmp(1)> program is used for the comparison."
6173 #: ../src/guestfs-actions.pod:1183
6174 msgid "guestfs_exists"
6178 #: ../src/guestfs-actions.pod:1185
6181 " int guestfs_exists (guestfs_h *g,\n"
6182 "\t\tconst char *path);\n"
6187 #: ../src/guestfs-actions.pod:1188 ../fish/guestfish-actions.pod:920
6189 "This returns C<true> if and only if there is a file, directory (or anything) "
6190 "with the given C<path> name."
6194 #: ../src/guestfs-actions.pod:1191
6195 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
6199 #: ../src/guestfs-actions.pod:1195
6200 msgid "guestfs_fallocate"
6204 #: ../src/guestfs-actions.pod:1197
6207 " int guestfs_fallocate (guestfs_h *g,\n"
6208 "\t\tconst char *path,\n"
6214 #: ../src/guestfs-actions.pod:1201 ../src/guestfs-actions.pod:1224
6215 #: ../fish/guestfish-actions.pod:929 ../fish/guestfish-actions.pod:948
6217 "This command preallocates a file (containing zero bytes) named C<path> of "
6218 "size C<len> bytes. If the file exists already, it is overwritten."
6222 #: ../src/guestfs-actions.pod:1205 ../fish/guestfish-actions.pod:933
6224 "Do not confuse this with the guestfish-specific C<alloc> command which "
6225 "allocates a file in the host and attaches it as a device."
6229 #: ../src/guestfs-actions.pod:1211 ../fish/guestfish-actions.pod:937
6231 "This function is deprecated. In new code, use the C<fallocate64> call "
6236 #: ../src/guestfs-actions.pod:1218
6237 msgid "guestfs_fallocate64"
6241 #: ../src/guestfs-actions.pod:1220
6244 " int guestfs_fallocate64 (guestfs_h *g,\n"
6245 "\t\tconst char *path,\n"
6246 "\t\tint64_t len);\n"
6251 #: ../src/guestfs-actions.pod:1228
6253 "Note that this call allocates disk blocks for the file. To create a sparse "
6254 "file use C<guestfs_truncate_size> instead."
6258 #: ../src/guestfs-actions.pod:1231
6260 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
6261 "oversight it only allowed 30 bit lengths to be specified, effectively "
6262 "limiting the maximum size of files created through that call to 1GB."
6266 #: ../src/guestfs-actions.pod:1236 ../fish/guestfish-actions.pod:960
6268 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
6269 "commands which create a file in the host and attach it as a device."
6273 #: ../src/guestfs-actions.pod:1242
6274 msgid "guestfs_fgrep"
6278 #: ../src/guestfs-actions.pod:1244
6281 " char **guestfs_fgrep (guestfs_h *g,\n"
6282 "\t\tconst char *pattern,\n"
6283 "\t\tconst char *path);\n"
6288 #: ../src/guestfs-actions.pod:1248 ../fish/guestfish-actions.pod:968
6290 "This calls the external C<fgrep> program and returns the matching lines."
6294 #: ../src/guestfs-actions.pod:1258
6295 msgid "guestfs_fgrepi"
6299 #: ../src/guestfs-actions.pod:1260
6302 " char **guestfs_fgrepi (guestfs_h *g,\n"
6303 "\t\tconst char *pattern,\n"
6304 "\t\tconst char *path);\n"
6309 #: ../src/guestfs-actions.pod:1264 ../fish/guestfish-actions.pod:978
6311 "This calls the external C<fgrep -i> program and returns the matching lines."
6315 #: ../src/guestfs-actions.pod:1274
6316 msgid "guestfs_file"
6320 #: ../src/guestfs-actions.pod:1276
6323 " char *guestfs_file (guestfs_h *g,\n"
6324 "\t\tconst char *path);\n"
6329 #: ../src/guestfs-actions.pod:1279 ../fish/guestfish-actions.pod:988
6331 "This call uses the standard L<file(1)> command to determine the type or "
6332 "contents of the file."
6336 #: ../src/guestfs-actions.pod:1282 ../fish/guestfish-actions.pod:991
6338 "This call will also transparently look inside various types of compressed "
6343 #: ../src/guestfs-actions.pod:1285 ../fish/guestfish-actions.pod:994
6345 "The exact command which runs is C<file -zb path>. Note in particular that "
6346 "the filename is not prepended to the output (the C<-b> option)."
6350 #: ../src/guestfs-actions.pod:1289
6352 "This command can also be used on C</dev/> devices (and partitions, LV "
6353 "names). You can for example use this to determine if a device contains a "
6354 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
6358 #: ../src/guestfs-actions.pod:1294 ../fish/guestfish-actions.pod:1003
6360 "If the C<path> does not begin with C</dev/> then this command only works for "
6361 "the content of regular files. For other file types (directory, symbolic "
6362 "link etc) it will just return the string C<directory> etc."
6366 #: ../src/guestfs-actions.pod:1302
6367 msgid "guestfs_file_architecture"
6371 #: ../src/guestfs-actions.pod:1304
6374 " char *guestfs_file_architecture (guestfs_h *g,\n"
6375 "\t\tconst char *filename);\n"
6380 #: ../src/guestfs-actions.pod:1307 ../fish/guestfish-actions.pod:1012
6382 "This detects the architecture of the binary C<filename>, and returns it if "
6387 #: ../src/guestfs-actions.pod:1310 ../fish/guestfish-actions.pod:1015
6388 msgid "Currently defined architectures are:"
6392 #: ../src/guestfs-actions.pod:1314 ../fish/guestfish-actions.pod:1019
6397 #: ../src/guestfs-actions.pod:1316 ../fish/guestfish-actions.pod:1021
6399 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
6400 "irrespective of the precise processor requirements of the binary."
6404 #: ../src/guestfs-actions.pod:1319 ../fish/guestfish-actions.pod:1024
6409 #: ../src/guestfs-actions.pod:1321 ../fish/guestfish-actions.pod:1026
6410 msgid "64 bit x86-64."
6414 #: ../src/guestfs-actions.pod:1323 ../fish/guestfish-actions.pod:1028
6419 #: ../src/guestfs-actions.pod:1325 ../fish/guestfish-actions.pod:1030
6420 msgid "32 bit SPARC."
6424 #: ../src/guestfs-actions.pod:1327 ../fish/guestfish-actions.pod:1032
6429 #: ../src/guestfs-actions.pod:1329 ../fish/guestfish-actions.pod:1034
6430 msgid "64 bit SPARC V9 and above."
6434 #: ../src/guestfs-actions.pod:1331 ../fish/guestfish-actions.pod:1036
6439 #: ../src/guestfs-actions.pod:1333 ../fish/guestfish-actions.pod:1038
6440 msgid "Intel Itanium."
6444 #: ../src/guestfs-actions.pod:1335 ../fish/guestfish-actions.pod:1040
6449 #: ../src/guestfs-actions.pod:1337 ../fish/guestfish-actions.pod:1042
6450 msgid "32 bit Power PC."
6454 #: ../src/guestfs-actions.pod:1339 ../fish/guestfish-actions.pod:1044
6459 #: ../src/guestfs-actions.pod:1341 ../fish/guestfish-actions.pod:1046
6460 msgid "64 bit Power PC."
6464 #: ../src/guestfs-actions.pod:1345 ../fish/guestfish-actions.pod:1050
6465 msgid "Libguestfs may return other architecture strings in future."
6469 #: ../src/guestfs-actions.pod:1347 ../fish/guestfish-actions.pod:1052
6470 msgid "The function works on at least the following types of files:"
6474 #: ../src/guestfs-actions.pod:1353 ../fish/guestfish-actions.pod:1058
6475 msgid "many types of Un*x and Linux binary"
6479 #: ../src/guestfs-actions.pod:1357 ../fish/guestfish-actions.pod:1062
6480 msgid "many types of Un*x and Linux shared library"
6484 #: ../src/guestfs-actions.pod:1361 ../fish/guestfish-actions.pod:1066
6485 msgid "Windows Win32 and Win64 binaries"
6489 #: ../src/guestfs-actions.pod:1365 ../fish/guestfish-actions.pod:1070
6490 msgid "Windows Win32 and Win64 DLLs"
6494 #: ../src/guestfs-actions.pod:1367 ../fish/guestfish-actions.pod:1072
6495 msgid "Win32 binaries and DLLs return C<i386>."
6499 #: ../src/guestfs-actions.pod:1369 ../fish/guestfish-actions.pod:1074
6500 msgid "Win64 binaries and DLLs return C<x86_64>."
6504 #: ../src/guestfs-actions.pod:1373 ../fish/guestfish-actions.pod:1078
6505 msgid "Linux kernel modules"
6509 #: ../src/guestfs-actions.pod:1377 ../fish/guestfish-actions.pod:1082
6510 msgid "Linux new-style initrd images"
6514 #: ../src/guestfs-actions.pod:1381 ../fish/guestfish-actions.pod:1086
6515 msgid "some non-x86 Linux vmlinuz kernels"
6519 #: ../src/guestfs-actions.pod:1385 ../fish/guestfish-actions.pod:1090
6520 msgid "What it can't do currently:"
6524 #: ../src/guestfs-actions.pod:1391 ../fish/guestfish-actions.pod:1096
6525 msgid "static libraries (libfoo.a)"
6529 #: ../src/guestfs-actions.pod:1395 ../fish/guestfish-actions.pod:1100
6530 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
6534 #: ../src/guestfs-actions.pod:1399 ../fish/guestfish-actions.pod:1104
6535 msgid "x86 Linux vmlinuz kernels"
6539 #: ../src/guestfs-actions.pod:1401 ../fish/guestfish-actions.pod:1106
6541 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
6542 "compressed code, and are horribly hard to unpack. If you want to find the "
6543 "architecture of a kernel, use the architecture of the associated initrd or "
6544 "kernel module(s) instead."
6548 #: ../src/guestfs-actions.pod:1411
6549 msgid "guestfs_filesize"
6553 #: ../src/guestfs-actions.pod:1413
6556 " int64_t guestfs_filesize (guestfs_h *g,\n"
6557 "\t\tconst char *file);\n"
6562 #: ../src/guestfs-actions.pod:1416 ../fish/guestfish-actions.pod:1117
6563 msgid "This command returns the size of C<file> in bytes."
6567 #: ../src/guestfs-actions.pod:1418
6569 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
6570 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
6571 "devices, use C<guestfs_blockdev_getsize64>."
6575 #: ../src/guestfs-actions.pod:1424
6576 msgid "guestfs_fill"
6580 #: ../src/guestfs-actions.pod:1426
6583 " int guestfs_fill (guestfs_h *g,\n"
6586 "\t\tconst char *path);\n"
6591 #: ../src/guestfs-actions.pod:1431 ../fish/guestfish-actions.pod:1127
6593 "This command creates a new file called C<path>. The initial content of the "
6594 "file is C<len> octets of C<c>, where C<c> must be a number in the range C<"
6599 #: ../src/guestfs-actions.pod:1435
6601 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
6602 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
6603 "bytes use C<guestfs_fill_pattern>."
6607 #: ../src/guestfs-actions.pod:1447
6608 msgid "guestfs_fill_pattern"
6612 #: ../src/guestfs-actions.pod:1449
6615 " int guestfs_fill_pattern (guestfs_h *g,\n"
6616 "\t\tconst char *pattern,\n"
6618 "\t\tconst char *path);\n"
6623 #: ../src/guestfs-actions.pod:1454
6625 "This function is like C<guestfs_fill> except that it creates a new file of "
6626 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
6627 "pattern is truncated if necessary to ensure the length of the file is "
6628 "exactly C<len> bytes."
6632 #: ../src/guestfs-actions.pod:1466
6633 msgid "guestfs_find"
6637 #: ../src/guestfs-actions.pod:1468
6640 " char **guestfs_find (guestfs_h *g,\n"
6641 "\t\tconst char *directory);\n"
6646 #: ../src/guestfs-actions.pod:1471 ../fish/guestfish-actions.pod:1149
6648 "This command lists out all files and directories, recursively, starting at "
6649 "C<directory>. It is essentially equivalent to running the shell command "
6650 "C<find directory -print> but some post-processing happens on the output, "
6655 #: ../src/guestfs-actions.pod:1476 ../fish/guestfish-actions.pod:1154
6657 "This returns a list of strings I<without any prefix>. Thus if the directory "
6662 #: ../src/guestfs-actions.pod:1479 ../fish/guestfish-actions.pod:1157
6672 #: ../src/guestfs-actions.pod:1483
6674 "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
6678 #: ../src/guestfs-actions.pod:1486 ../fish/guestfish-actions.pod:1164
6689 #: ../src/guestfs-actions.pod:1491 ../fish/guestfish-actions.pod:1169
6690 msgid "If C<directory> is not a directory, then this command returns an error."
6694 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:1172
6695 msgid "The returned list is sorted."
6699 #: ../src/guestfs-actions.pod:1496
6700 msgid "See also C<guestfs_find0>."
6704 #: ../src/guestfs-actions.pod:1505
6705 msgid "guestfs_find0"
6709 #: ../src/guestfs-actions.pod:1507
6712 " int guestfs_find0 (guestfs_h *g,\n"
6713 "\t\tconst char *directory,\n"
6714 "\t\tconst char *files);\n"
6719 #: ../src/guestfs-actions.pod:1511 ../fish/guestfish-actions.pod:1183
6721 "This command lists out all files and directories, recursively, starting at "
6722 "C<directory>, placing the resulting list in the external file called "
6727 #: ../src/guestfs-actions.pod:1515
6729 "This command works the same way as C<guestfs_find> with the following "
6734 #: ../src/guestfs-actions.pod:1522 ../fish/guestfish-actions.pod:1194
6735 msgid "The resulting list is written to an external file."
6739 #: ../src/guestfs-actions.pod:1526 ../fish/guestfish-actions.pod:1198
6741 "Items (filenames) in the result are separated by C<\\0> characters. See "
6742 "L<find(1)> option I<-print0>."
6746 #: ../src/guestfs-actions.pod:1531 ../fish/guestfish-actions.pod:1203
6747 msgid "This command is not limited in the number of names that it can return."
6751 #: ../src/guestfs-actions.pod:1536 ../fish/guestfish-actions.pod:1208
6752 msgid "The result list is not sorted."
6756 #: ../src/guestfs-actions.pod:1542
6757 msgid "guestfs_findfs_label"
6761 #: ../src/guestfs-actions.pod:1544
6764 " char *guestfs_findfs_label (guestfs_h *g,\n"
6765 "\t\tconst char *label);\n"
6770 #: ../src/guestfs-actions.pod:1547 ../fish/guestfish-actions.pod:1218
6772 "This command searches the filesystems and returns the one which has the "
6773 "given label. An error is returned if no such filesystem can be found."
6777 #: ../src/guestfs-actions.pod:1551
6778 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
6782 #: ../src/guestfs-actions.pod:1556
6783 msgid "guestfs_findfs_uuid"
6787 #: ../src/guestfs-actions.pod:1558
6790 " char *guestfs_findfs_uuid (guestfs_h *g,\n"
6791 "\t\tconst char *uuid);\n"
6796 #: ../src/guestfs-actions.pod:1561 ../fish/guestfish-actions.pod:1228
6798 "This command searches the filesystems and returns the one which has the "
6799 "given UUID. An error is returned if no such filesystem can be found."
6803 #: ../src/guestfs-actions.pod:1565
6804 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
6808 #: ../src/guestfs-actions.pod:1570
6809 msgid "guestfs_fsck"
6813 #: ../src/guestfs-actions.pod:1572
6816 " int guestfs_fsck (guestfs_h *g,\n"
6817 "\t\tconst char *fstype,\n"
6818 "\t\tconst char *device);\n"
6823 #: ../src/guestfs-actions.pod:1576 ../fish/guestfish-actions.pod:1238
6825 "This runs the filesystem checker (fsck) on C<device> which should have "
6826 "filesystem type C<fstype>."
6830 #: ../src/guestfs-actions.pod:1579 ../fish/guestfish-actions.pod:1241
6832 "The returned integer is the status. See L<fsck(8)> for the list of status "
6833 "codes from C<fsck>."
6837 #: ../src/guestfs-actions.pod:1588 ../fish/guestfish-actions.pod:1250
6838 msgid "Multiple status codes can be summed together."
6842 #: ../src/guestfs-actions.pod:1592 ../fish/guestfish-actions.pod:1254
6844 "A non-zero return code can mean \"success\", for example if errors have been "
6845 "corrected on the filesystem."
6849 #: ../src/guestfs-actions.pod:1597 ../fish/guestfish-actions.pod:1259
6850 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
6854 #: ../src/guestfs-actions.pod:1602 ../fish/guestfish-actions.pod:1264
6856 "This command is entirely equivalent to running C<fsck -a -t fstype device>."
6860 #: ../src/guestfs-actions.pod:1606
6861 msgid "guestfs_get_append"
6865 #: ../src/guestfs-actions.pod:1608
6868 " const char *guestfs_get_append (guestfs_h *g);\n"
6873 #: ../src/guestfs-actions.pod:1610 ../fish/guestfish-actions.pod:1270
6875 "Return the additional kernel options which are added to the guest kernel "
6880 #: ../src/guestfs-actions.pod:1613 ../fish/guestfish-actions.pod:1273
6881 msgid "If C<NULL> then no options are added."
6885 #: ../src/guestfs-actions.pod:1615
6887 "This function returns a string which may be NULL. There is no way to return "
6888 "an error from this function. The string is owned by the guest handle and "
6889 "must I<not> be freed."
6893 #: ../src/guestfs-actions.pod:1619
6894 msgid "guestfs_get_autosync"
6898 #: ../src/guestfs-actions.pod:1621
6901 " int guestfs_get_autosync (guestfs_h *g);\n"
6906 #: ../src/guestfs-actions.pod:1623 ../fish/guestfish-actions.pod:1279
6907 msgid "Get the autosync flag."
6911 #: ../src/guestfs-actions.pod:1627
6912 msgid "guestfs_get_direct"
6916 #: ../src/guestfs-actions.pod:1629
6919 " int guestfs_get_direct (guestfs_h *g);\n"
6924 #: ../src/guestfs-actions.pod:1631 ../fish/guestfish-actions.pod:1285
6925 msgid "Return the direct appliance mode flag."
6929 #: ../src/guestfs-actions.pod:1635
6930 msgid "guestfs_get_e2label"
6934 #: ../src/guestfs-actions.pod:1637
6937 " char *guestfs_get_e2label (guestfs_h *g,\n"
6938 "\t\tconst char *device);\n"
6943 #: ../src/guestfs-actions.pod:1640 ../fish/guestfish-actions.pod:1291
6945 "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
6949 #: ../src/guestfs-actions.pod:1646 ../fish/guestfish-actions.pod:1294
6951 "This function is deprecated. In new code, use the C<vfs_label> call instead."
6955 #: ../src/guestfs-actions.pod:1653
6956 msgid "guestfs_get_e2uuid"
6960 #: ../src/guestfs-actions.pod:1655
6963 " char *guestfs_get_e2uuid (guestfs_h *g,\n"
6964 "\t\tconst char *device);\n"
6969 #: ../src/guestfs-actions.pod:1658 ../fish/guestfish-actions.pod:1305
6971 "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
6975 #: ../src/guestfs-actions.pod:1664 ../fish/guestfish-actions.pod:1308
6977 "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
6981 #: ../src/guestfs-actions.pod:1671
6982 msgid "guestfs_get_memsize"
6986 #: ../src/guestfs-actions.pod:1673
6989 " int guestfs_get_memsize (guestfs_h *g);\n"
6994 #: ../src/guestfs-actions.pod:1675 ../fish/guestfish-actions.pod:1319
6996 "This gets the memory size in megabytes allocated to the qemu subprocess."
7000 #: ../src/guestfs-actions.pod:1678
7002 "If C<guestfs_set_memsize> was not called on this handle, and if "
7003 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
7004 "value for memsize."
7008 #: ../src/guestfs-actions.pod:1682 ../src/guestfs-actions.pod:1745
7009 #: ../src/guestfs-actions.pod:4469 ../src/guestfs-actions.pod:4561
7010 #: ../fish/guestfish-actions.pod:1326 ../fish/guestfish-actions.pod:1377
7011 #: ../fish/guestfish-actions.pod:3448 ../fish/guestfish-actions.pod:3535
7013 "For more information on the architecture of libguestfs, see L<guestfs(3)>."
7017 #: ../src/guestfs-actions.pod:1687
7018 msgid "guestfs_get_network"
7022 #: ../src/guestfs-actions.pod:1689
7025 " int guestfs_get_network (guestfs_h *g);\n"
7030 #: ../src/guestfs-actions.pod:1691 ../fish/guestfish-actions.pod:1333
7031 msgid "This returns the enable network flag."
7035 #: ../src/guestfs-actions.pod:1695
7036 msgid "guestfs_get_path"
7040 #: ../src/guestfs-actions.pod:1697
7043 " const char *guestfs_get_path (guestfs_h *g);\n"
7048 #: ../src/guestfs-actions.pod:1699 ../fish/guestfish-actions.pod:1339
7049 msgid "Return the current search path."
7053 #: ../src/guestfs-actions.pod:1701 ../fish/guestfish-actions.pod:1341
7055 "This is always non-NULL. If it wasn't set already, then this will return "
7060 #: ../src/guestfs-actions.pod:1704 ../src/guestfs-actions.pod:1727
7062 "This function returns a string, or NULL on error. The string is owned by "
7063 "the guest handle and must I<not> be freed."
7067 #: ../src/guestfs-actions.pod:1707
7068 msgid "guestfs_get_pid"
7072 #: ../src/guestfs-actions.pod:1709
7075 " int guestfs_get_pid (guestfs_h *g);\n"
7080 #: ../src/guestfs-actions.pod:1711 ../fish/guestfish-actions.pod:1350
7082 "Return the process ID of the qemu subprocess. If there is no qemu "
7083 "subprocess, then this will return an error."
7087 #: ../src/guestfs-actions.pod:1714 ../fish/guestfish-actions.pod:1353
7088 msgid "This is an internal call used for debugging and testing."
7092 #: ../src/guestfs-actions.pod:1718
7093 msgid "guestfs_get_qemu"
7097 #: ../src/guestfs-actions.pod:1720
7100 " const char *guestfs_get_qemu (guestfs_h *g);\n"
7105 #: ../src/guestfs-actions.pod:1722 ../fish/guestfish-actions.pod:1359
7106 msgid "Return the current qemu binary."
7110 #: ../src/guestfs-actions.pod:1724 ../fish/guestfish-actions.pod:1361
7112 "This is always non-NULL. If it wasn't set already, then this will return "
7113 "the default qemu binary name."
7117 #: ../src/guestfs-actions.pod:1730
7118 msgid "guestfs_get_recovery_proc"
7122 #: ../src/guestfs-actions.pod:1732
7125 " int guestfs_get_recovery_proc (guestfs_h *g);\n"
7130 #: ../src/guestfs-actions.pod:1734 ../fish/guestfish-actions.pod:1368
7131 msgid "Return the recovery process enabled flag."
7135 #: ../src/guestfs-actions.pod:1738
7136 msgid "guestfs_get_selinux"
7140 #: ../src/guestfs-actions.pod:1740
7143 " int guestfs_get_selinux (guestfs_h *g);\n"
7148 #: ../src/guestfs-actions.pod:1742
7150 "This returns the current setting of the selinux flag which is passed to the "
7151 "appliance at boot time. See C<guestfs_set_selinux>."
7155 #: ../src/guestfs-actions.pod:1750
7156 msgid "guestfs_get_state"
7160 #: ../src/guestfs-actions.pod:1752
7163 " int guestfs_get_state (guestfs_h *g);\n"
7168 #: ../src/guestfs-actions.pod:1754 ../fish/guestfish-actions.pod:1384
7170 "This returns the current state as an opaque integer. This is only useful "
7171 "for printing debug and internal error messages."
7175 #: ../src/guestfs-actions.pod:1757 ../src/guestfs-actions.pod:2378
7176 #: ../src/guestfs-actions.pod:2401 ../src/guestfs-actions.pod:2450
7177 #: ../src/guestfs-actions.pod:2471 ../fish/guestfish-actions.pod:1387
7178 #: ../fish/guestfish-actions.pod:1881 ../fish/guestfish-actions.pod:1899
7179 #: ../fish/guestfish-actions.pod:1937 ../fish/guestfish-actions.pod:1953
7180 msgid "For more information on states, see L<guestfs(3)>."
7184 #: ../src/guestfs-actions.pod:1761
7185 msgid "guestfs_get_trace"
7189 #: ../src/guestfs-actions.pod:1763
7192 " int guestfs_get_trace (guestfs_h *g);\n"
7197 #: ../src/guestfs-actions.pod:1765 ../fish/guestfish-actions.pod:1393
7198 msgid "Return the command trace flag."
7202 #: ../src/guestfs-actions.pod:1769
7203 msgid "guestfs_get_umask"
7207 #: ../src/guestfs-actions.pod:1771
7210 " int guestfs_get_umask (guestfs_h *g);\n"
7215 #: ../src/guestfs-actions.pod:1773
7217 "Return the current umask. By default the umask is C<022> unless it has been "
7218 "set by calling C<guestfs_umask>."
7222 #: ../src/guestfs-actions.pod:1778
7223 msgid "guestfs_get_verbose"
7227 #: ../src/guestfs-actions.pod:1780
7230 " int guestfs_get_verbose (guestfs_h *g);\n"
7235 #: ../src/guestfs-actions.pod:1782 ../fish/guestfish-actions.pod:1406
7236 msgid "This returns the verbose messages flag."
7240 #: ../src/guestfs-actions.pod:1786
7241 msgid "guestfs_getcon"
7245 #: ../src/guestfs-actions.pod:1788
7248 " char *guestfs_getcon (guestfs_h *g);\n"
7253 #: ../src/guestfs-actions.pod:1790 ../fish/guestfish-actions.pod:1412
7254 msgid "This gets the SELinux security context of the daemon."
7258 #: ../src/guestfs-actions.pod:1792
7260 "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
7264 #: ../src/guestfs-actions.pod:1798
7265 msgid "guestfs_getxattrs"
7269 #: ../src/guestfs-actions.pod:1800
7272 " struct guestfs_xattr_list *guestfs_getxattrs (guestfs_h *g,\n"
7273 "\t\tconst char *path);\n"
7278 #: ../src/guestfs-actions.pod:1803 ../fish/guestfish-actions.pod:1421
7280 "This call lists the extended attributes of the file or directory C<path>."
7284 #: ../src/guestfs-actions.pod:1806 ../fish/guestfish-actions.pod:1424
7286 "At the system call level, this is a combination of the L<listxattr(2)> and "
7287 "L<getxattr(2)> calls."
7291 #: ../src/guestfs-actions.pod:1809
7292 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
7296 #: ../src/guestfs-actions.pod:1811 ../src/guestfs-actions.pod:2545
7297 #: ../src/guestfs-actions.pod:3100
7299 "This function returns a C<struct guestfs_xattr_list *> (see E<lt>guestfs-"
7300 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
7301 "C<guestfs_free_xattr_list> after use>."
7305 #: ../src/guestfs-actions.pod:1816
7306 msgid "guestfs_glob_expand"
7310 #: ../src/guestfs-actions.pod:1818
7313 " char **guestfs_glob_expand (guestfs_h *g,\n"
7314 "\t\tconst char *pattern);\n"
7319 #: ../src/guestfs-actions.pod:1821 ../fish/guestfish-actions.pod:1433
7321 "This command searches for all the pathnames matching C<pattern> according to "
7322 "the wildcard expansion rules used by the shell."
7326 #: ../src/guestfs-actions.pod:1825 ../fish/guestfish-actions.pod:1437
7328 "If no paths match, then this returns an empty list (note: not an error)."
7332 #: ../src/guestfs-actions.pod:1828 ../fish/guestfish-actions.pod:1440
7334 "It is just a wrapper around the C L<glob(3)> function with flags C<GLOB_MARK|"
7335 "GLOB_BRACE>. See that manual page for more details."
7339 #: ../src/guestfs-actions.pod:1836
7340 msgid "guestfs_grep"
7344 #: ../src/guestfs-actions.pod:1838
7347 " char **guestfs_grep (guestfs_h *g,\n"
7348 "\t\tconst char *regex,\n"
7349 "\t\tconst char *path);\n"
7354 #: ../src/guestfs-actions.pod:1842 ../fish/guestfish-actions.pod:1448
7355 msgid "This calls the external C<grep> program and returns the matching lines."
7359 #: ../src/guestfs-actions.pod:1852
7360 msgid "guestfs_grepi"
7364 #: ../src/guestfs-actions.pod:1854
7367 " char **guestfs_grepi (guestfs_h *g,\n"
7368 "\t\tconst char *regex,\n"
7369 "\t\tconst char *path);\n"
7374 #: ../src/guestfs-actions.pod:1858 ../fish/guestfish-actions.pod:1458
7376 "This calls the external C<grep -i> program and returns the matching lines."
7380 #: ../src/guestfs-actions.pod:1868
7381 msgid "guestfs_grub_install"
7385 #: ../src/guestfs-actions.pod:1870
7388 " int guestfs_grub_install (guestfs_h *g,\n"
7389 "\t\tconst char *root,\n"
7390 "\t\tconst char *device);\n"
7395 #: ../src/guestfs-actions.pod:1874 ../fish/guestfish-actions.pod:1468
7397 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
7398 "the root directory being C<root>."
7402 #: ../src/guestfs-actions.pod:1877 ../fish/guestfish-actions.pod:1471
7404 "Note: If grub-install reports the error \"No suitable drive was found in the "
7405 "generated device map.\" it may be that you need to create a C</boot/grub/"
7406 "device.map> file first that contains the mapping between grub device names "
7407 "and Linux device names. It is usually sufficient to create a file "
7412 #: ../src/guestfs-actions.pod:1884 ../fish/guestfish-actions.pod:1478
7420 #: ../src/guestfs-actions.pod:1886 ../fish/guestfish-actions.pod:1480
7421 msgid "replacing C</dev/vda> with the name of the installation device."
7425 #: ../src/guestfs-actions.pod:1890
7426 msgid "guestfs_head"
7430 #: ../src/guestfs-actions.pod:1892
7433 " char **guestfs_head (guestfs_h *g,\n"
7434 "\t\tconst char *path);\n"
7439 #: ../src/guestfs-actions.pod:1895 ../fish/guestfish-actions.pod:1486
7441 "This command returns up to the first 10 lines of a file as a list of strings."
7445 #: ../src/guestfs-actions.pod:1905
7446 msgid "guestfs_head_n"
7450 #: ../src/guestfs-actions.pod:1907
7453 " char **guestfs_head_n (guestfs_h *g,\n"
7454 "\t\tint nrlines,\n"
7455 "\t\tconst char *path);\n"
7460 #: ../src/guestfs-actions.pod:1911 ../fish/guestfish-actions.pod:1496
7462 "If the parameter C<nrlines> is a positive number, this returns the first "
7463 "C<nrlines> lines of the file C<path>."
7467 #: ../src/guestfs-actions.pod:1914 ../fish/guestfish-actions.pod:1499
7469 "If the parameter C<nrlines> is a negative number, this returns lines from "
7470 "the file C<path>, excluding the last C<nrlines> lines."
7474 #: ../src/guestfs-actions.pod:1917 ../src/guestfs-actions.pod:5017
7475 #: ../fish/guestfish-actions.pod:1502 ../fish/guestfish-actions.pod:3881
7476 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
7480 #: ../src/guestfs-actions.pod:1926
7481 msgid "guestfs_hexdump"
7485 #: ../src/guestfs-actions.pod:1928
7488 " char *guestfs_hexdump (guestfs_h *g,\n"
7489 "\t\tconst char *path);\n"
7494 #: ../src/guestfs-actions.pod:1931 ../fish/guestfish-actions.pod:1511
7496 "This runs C<hexdump -C> on the given C<path>. The result is the human-"
7497 "readable, canonical hex dump of the file."
7501 #: ../src/guestfs-actions.pod:1940
7502 msgid "guestfs_initrd_cat"
7506 #: ../src/guestfs-actions.pod:1942
7509 " char *guestfs_initrd_cat (guestfs_h *g,\n"
7510 "\t\tconst char *initrdpath,\n"
7511 "\t\tconst char *filename,\n"
7512 "\t\tsize_t *size_r);\n"
7517 #: ../src/guestfs-actions.pod:1947 ../fish/guestfish-actions.pod:1521
7519 "This command unpacks the file C<filename> from the initrd file called "
7520 "C<initrdpath>. The filename must be given I<without> the initial C</> "
7525 #: ../src/guestfs-actions.pod:1951 ../fish/guestfish-actions.pod:1525
7527 "For example, in guestfish you could use the following command to examine the "
7528 "boot script (usually called C</init>) contained in a Linux initrd or "
7533 #: ../src/guestfs-actions.pod:1955 ../fish/guestfish-actions.pod:1529
7536 " initrd-cat /boot/initrd-<version>.img init\n"
7541 #: ../src/guestfs-actions.pod:1957
7542 msgid "See also C<guestfs_initrd_list>."
7546 #: ../src/guestfs-actions.pod:1959 ../src/guestfs-actions.pod:3929
7547 #: ../src/guestfs-actions.pod:3952 ../src/guestfs-actions.pod:4104
7549 "This function returns a buffer, or NULL on error. The size of the returned "
7550 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
7555 #: ../src/guestfs-actions.pod:1966
7556 msgid "guestfs_initrd_list"
7560 #: ../src/guestfs-actions.pod:1968
7563 " char **guestfs_initrd_list (guestfs_h *g,\n"
7564 "\t\tconst char *path);\n"
7569 #: ../src/guestfs-actions.pod:1971 ../fish/guestfish-actions.pod:1540
7570 msgid "This command lists out files contained in an initrd."
7574 #: ../src/guestfs-actions.pod:1973 ../fish/guestfish-actions.pod:1542
7576 "The files are listed without any initial C</> character. The files are "
7577 "listed in the order they appear (not necessarily alphabetical). Directory "
7578 "names are listed as separate items."
7582 #: ../src/guestfs-actions.pod:1977 ../fish/guestfish-actions.pod:1546
7584 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
7585 "initrd. We I<only> support the newer initramfs format (compressed cpio "
7590 #: ../src/guestfs-actions.pod:1985
7591 msgid "guestfs_inotify_add_watch"
7595 #: ../src/guestfs-actions.pod:1987
7598 " int64_t guestfs_inotify_add_watch (guestfs_h *g,\n"
7599 "\t\tconst char *path,\n"
7605 #: ../src/guestfs-actions.pod:1991 ../fish/guestfish-actions.pod:1554
7606 msgid "Watch C<path> for the events listed in C<mask>."
7610 #: ../src/guestfs-actions.pod:1993 ../fish/guestfish-actions.pod:1556
7612 "Note that if C<path> is a directory then events within that directory are "
7613 "watched, but this does I<not> happen recursively (in subdirectories)."
7617 #: ../src/guestfs-actions.pod:1997 ../fish/guestfish-actions.pod:1560
7619 "Note for non-C or non-Linux callers: the inotify events are defined by the "
7620 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
7624 #: ../src/guestfs-actions.pod:2003
7625 msgid "guestfs_inotify_close"
7629 #: ../src/guestfs-actions.pod:2005
7632 " int guestfs_inotify_close (guestfs_h *g);\n"
7637 #: ../src/guestfs-actions.pod:2007 ../fish/guestfish-actions.pod:1568
7639 "This closes the inotify handle which was previously opened by inotify_init. "
7640 "It removes all watches, throws away any pending events, and deallocates all "
7645 #: ../src/guestfs-actions.pod:2013
7646 msgid "guestfs_inotify_files"
7650 #: ../src/guestfs-actions.pod:2015
7653 " char **guestfs_inotify_files (guestfs_h *g);\n"
7658 #: ../src/guestfs-actions.pod:2017
7660 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
7661 "returns a list of pathnames of objects that were touched. The returned "
7662 "pathnames are sorted and deduplicated."
7666 #: ../src/guestfs-actions.pod:2025
7667 msgid "guestfs_inotify_init"
7671 #: ../src/guestfs-actions.pod:2027
7674 " int guestfs_inotify_init (guestfs_h *g,\n"
7675 "\t\tint maxevents);\n"
7680 #: ../src/guestfs-actions.pod:2030 ../fish/guestfish-actions.pod:1584
7682 "This command creates a new inotify handle. The inotify subsystem can be "
7683 "used to notify events which happen to objects in the guest filesystem."
7687 #: ../src/guestfs-actions.pod:2034
7689 "C<maxevents> is the maximum number of events which will be queued up between "
7690 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
7691 "passed as C<0>, then the kernel (or previously set) default is used. For "
7692 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
7693 "throws away events, but records the fact that it threw them away by setting "
7694 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
7695 "C<guestfs_inotify_read>)."
7699 #: ../src/guestfs-actions.pod:2044
7701 "Before any events are generated, you have to add some watches to the "
7702 "internal watch list. See: C<guestfs_inotify_add_watch>, "
7703 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
7707 #: ../src/guestfs-actions.pod:2050
7709 "Queued up events should be read periodically by calling "
7710 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
7711 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
7712 "often enough then you risk the internal queue overflowing."
7716 #: ../src/guestfs-actions.pod:2057
7718 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
7719 "This also removes any watches automatically."
7723 #: ../src/guestfs-actions.pod:2061 ../fish/guestfish-actions.pod:1615
7725 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
7726 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
7727 "that there is one global inotify handle per libguestfs instance."
7731 #: ../src/guestfs-actions.pod:2068
7732 msgid "guestfs_inotify_read"
7736 #: ../src/guestfs-actions.pod:2070
7739 " struct guestfs_inotify_event_list *guestfs_inotify_read (guestfs_h *g);\n"
7744 #: ../src/guestfs-actions.pod:2072 ../fish/guestfish-actions.pod:1624
7746 "Return the complete queue of events that have happened since the previous "
7751 #: ../src/guestfs-actions.pod:2075 ../fish/guestfish-actions.pod:1627
7752 msgid "If no events have happened, this returns an empty list."
7756 #: ../src/guestfs-actions.pod:2077 ../fish/guestfish-actions.pod:1629
7758 "I<Note>: In order to make sure that all events have been read, you must call "
7759 "this function repeatedly until it returns an empty list. The reason is that "
7760 "the call will read events up to the maximum appliance-to-host message size "
7761 "and leave remaining events in the queue."
7765 #: ../src/guestfs-actions.pod:2083
7767 "This function returns a C<struct guestfs_inotify_event_list *> (see "
7768 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
7769 "must call C<guestfs_free_inotify_event_list> after use>."
7773 #: ../src/guestfs-actions.pod:2088
7774 msgid "guestfs_inotify_rm_watch"
7778 #: ../src/guestfs-actions.pod:2090
7781 " int guestfs_inotify_rm_watch (guestfs_h *g,\n"
7787 #: ../src/guestfs-actions.pod:2093
7789 "Remove a previously defined inotify watch. See C<guestfs_inotify_add_watch>."
7793 #: ../src/guestfs-actions.pod:2098
7794 msgid "guestfs_inspect_get_arch"
7798 #: ../src/guestfs-actions.pod:2100
7801 " char *guestfs_inspect_get_arch (guestfs_h *g,\n"
7802 "\t\tconst char *root);\n"
7807 #: ../src/guestfs-actions.pod:2103 ../src/guestfs-actions.pod:2123
7808 #: ../src/guestfs-actions.pod:2173 ../src/guestfs-actions.pod:2196
7809 #: ../src/guestfs-actions.pod:2220 ../src/guestfs-actions.pod:2238
7810 #: ../src/guestfs-actions.pod:2268 ../src/guestfs-actions.pod:2289
7812 "This function should only be called with a root device string as returned by "
7813 "C<guestfs_inspect_os>."
7817 #: ../src/guestfs-actions.pod:2106
7819 "This returns the architecture of the inspected operating system. The "
7820 "possible return values are listed under C<guestfs_file_architecture>."
7824 #: ../src/guestfs-actions.pod:2110 ../fish/guestfish-actions.pod:1653
7826 "If the architecture could not be determined, then the string C<unknown> is "
7831 #: ../src/guestfs-actions.pod:2113 ../src/guestfs-actions.pod:2163
7832 #: ../src/guestfs-actions.pod:2211 ../src/guestfs-actions.pod:2279
7833 #: ../src/guestfs-actions.pod:2314 ../src/guestfs-actions.pod:2351
7834 #: ../fish/guestfish-actions.pod:1656 ../fish/guestfish-actions.pod:1702
7835 #: ../fish/guestfish-actions.pod:1741 ../fish/guestfish-actions.pod:1796
7836 #: ../fish/guestfish-actions.pod:1827 ../fish/guestfish-actions.pod:1861
7837 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
7841 #: ../src/guestfs-actions.pod:2118
7842 msgid "guestfs_inspect_get_distro"
7846 #: ../src/guestfs-actions.pod:2120
7849 " char *guestfs_inspect_get_distro (guestfs_h *g,\n"
7850 "\t\tconst char *root);\n"
7855 #: ../src/guestfs-actions.pod:2126 ../fish/guestfish-actions.pod:1665
7857 "This returns the distro (distribution) of the inspected operating system."
7861 #: ../src/guestfs-actions.pod:2129 ../fish/guestfish-actions.pod:1668
7862 msgid "Currently defined distros are:"
7866 #: ../src/guestfs-actions.pod:2133 ../fish/guestfish-actions.pod:1672
7871 #: ../src/guestfs-actions.pod:2135 ../fish/guestfish-actions.pod:1674
7872 msgid "Debian or a Debian-derived distro such as Ubuntu."
7876 #: ../src/guestfs-actions.pod:2137 ../fish/guestfish-actions.pod:1676
7881 #: ../src/guestfs-actions.pod:2139 ../fish/guestfish-actions.pod:1678
7886 #: ../src/guestfs-actions.pod:2141 ../fish/guestfish-actions.pod:1680
7887 msgid "\"redhat-based\""
7891 #: ../src/guestfs-actions.pod:2143 ../fish/guestfish-actions.pod:1682
7892 msgid "Some Red Hat-derived distro."
7896 #: ../src/guestfs-actions.pod:2145 ../fish/guestfish-actions.pod:1684
7901 #: ../src/guestfs-actions.pod:2147 ../fish/guestfish-actions.pod:1686
7902 msgid "Red Hat Enterprise Linux and some derivatives."
7906 #: ../src/guestfs-actions.pod:2149 ../src/guestfs-actions.pod:2301
7907 #: ../fish/guestfish-actions.pod:1688 ../fish/guestfish-actions.pod:1814
7912 #: ../src/guestfs-actions.pod:2151 ../fish/guestfish-actions.pod:1690
7914 "Windows does not have distributions. This string is returned if the OS type "
7919 #: ../src/guestfs-actions.pod:2154 ../src/guestfs-actions.pod:2305
7920 #: ../fish/guestfish-actions.pod:1693 ../fish/guestfish-actions.pod:1818
7925 #: ../src/guestfs-actions.pod:2156 ../fish/guestfish-actions.pod:1695
7926 msgid "The distro could not be determined."
7930 #: ../src/guestfs-actions.pod:2160 ../src/guestfs-actions.pod:2311
7931 #: ../fish/guestfish-actions.pod:1699 ../fish/guestfish-actions.pod:1824
7933 "Future versions of libguestfs may return other strings here. The caller "
7934 "should be prepared to handle any string."
7938 #: ../src/guestfs-actions.pod:2168
7939 msgid "guestfs_inspect_get_filesystems"
7943 #: ../src/guestfs-actions.pod:2170
7946 " char **guestfs_inspect_get_filesystems (guestfs_h *g,\n"
7947 "\t\tconst char *root);\n"
7952 #: ../src/guestfs-actions.pod:2176 ../fish/guestfish-actions.pod:1711
7954 "This returns a list of all the filesystems that we think are associated with "
7955 "this operating system. This includes the root filesystem, other ordinary "
7956 "filesystems, and non-mounted devices like swap partitions."
7960 #: ../src/guestfs-actions.pod:2181 ../fish/guestfish-actions.pod:1716
7962 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
7963 "to be shared between operating systems."
7967 #: ../src/guestfs-actions.pod:2184
7969 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7970 "C<guestfs_inspect_get_mountpoints>."
7974 #: ../src/guestfs-actions.pod:2191
7975 msgid "guestfs_inspect_get_major_version"
7979 #: ../src/guestfs-actions.pod:2193
7982 " int guestfs_inspect_get_major_version (guestfs_h *g,\n"
7983 "\t\tconst char *root);\n"
7988 #: ../src/guestfs-actions.pod:2199 ../fish/guestfish-actions.pod:1729
7990 "This returns the major version number of the inspected operating system."
7994 #: ../src/guestfs-actions.pod:2202 ../fish/guestfish-actions.pod:1732
7996 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
7997 "popular public names used by the operating system. Notably the operating "
7998 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
7999 "1). You can find out the real versions corresponding to releases of Windows "
8000 "by consulting Wikipedia or MSDN."
8004 #: ../src/guestfs-actions.pod:2209 ../src/guestfs-actions.pod:2226
8005 #: ../fish/guestfish-actions.pod:1739 ../fish/guestfish-actions.pod:1753
8006 msgid "If the version could not be determined, then C<0> is returned."
8010 #: ../src/guestfs-actions.pod:2215
8011 msgid "guestfs_inspect_get_minor_version"
8015 #: ../src/guestfs-actions.pod:2217
8018 " int guestfs_inspect_get_minor_version (guestfs_h *g,\n"
8019 "\t\tconst char *root);\n"
8024 #: ../src/guestfs-actions.pod:2223 ../fish/guestfish-actions.pod:1750
8026 "This returns the minor version number of the inspected operating system."
8030 #: ../src/guestfs-actions.pod:2228
8032 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8033 "C<guestfs_inspect_get_major_version>."
8037 #: ../src/guestfs-actions.pod:2233
8038 msgid "guestfs_inspect_get_mountpoints"
8042 #: ../src/guestfs-actions.pod:2235
8045 " char **guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
8046 "\t\tconst char *root);\n"
8051 #: ../src/guestfs-actions.pod:2241 ../fish/guestfish-actions.pod:1765
8053 "This returns a hash of where we think the filesystems associated with this "
8054 "operating system should be mounted. Callers should note that this is at "
8055 "best an educated guess made by reading configuration files such as C</etc/"
8060 #: ../src/guestfs-actions.pod:2246 ../fish/guestfish-actions.pod:1770
8062 "Each element in the returned hashtable has a key which is the path of the "
8063 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
8064 "mounted there (eg. C</dev/sda1>)."
8068 #: ../src/guestfs-actions.pod:2251 ../fish/guestfish-actions.pod:1775
8070 "Non-mounted devices such as swap devices are I<not> returned in this list."
8074 #: ../src/guestfs-actions.pod:2254
8076 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8077 "C<guestfs_inspect_get_filesystems>."
8081 #: ../src/guestfs-actions.pod:2257 ../src/guestfs-actions.pod:2597
8082 #: ../src/guestfs-actions.pod:3551 ../src/guestfs-actions.pod:5134
8084 "This function returns a NULL-terminated array of strings, or NULL if there "
8085 "was an error. The array of strings will always have length C<2n+1>, where "
8086 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
8087 "caller must free the strings and the array after use>."
8091 #: ../src/guestfs-actions.pod:2263
8092 msgid "guestfs_inspect_get_product_name"
8096 #: ../src/guestfs-actions.pod:2265
8099 " char *guestfs_inspect_get_product_name (guestfs_h *g,\n"
8100 "\t\tconst char *root);\n"
8105 #: ../src/guestfs-actions.pod:2271 ../fish/guestfish-actions.pod:1788
8107 "This returns the product name of the inspected operating system. The "
8108 "product name is generally some freeform string which can be displayed to the "
8109 "user, but should not be parsed by programs."
8113 #: ../src/guestfs-actions.pod:2276 ../fish/guestfish-actions.pod:1793
8115 "If the product name could not be determined, then the string C<unknown> is "
8120 #: ../src/guestfs-actions.pod:2284
8121 msgid "guestfs_inspect_get_type"
8125 #: ../src/guestfs-actions.pod:2286
8128 " char *guestfs_inspect_get_type (guestfs_h *g,\n"
8129 "\t\tconst char *root);\n"
8134 #: ../src/guestfs-actions.pod:2292 ../fish/guestfish-actions.pod:1805
8136 "This returns the type of the inspected operating system. Currently defined "
8141 #: ../src/guestfs-actions.pod:2297 ../fish/guestfish-actions.pod:1810
8146 #: ../src/guestfs-actions.pod:2299 ../fish/guestfish-actions.pod:1812
8147 msgid "Any Linux-based operating system."
8151 #: ../src/guestfs-actions.pod:2303 ../fish/guestfish-actions.pod:1816
8152 msgid "Any Microsoft Windows operating system."
8156 #: ../src/guestfs-actions.pod:2307 ../fish/guestfish-actions.pod:1820
8157 msgid "The operating system type could not be determined."
8161 #: ../src/guestfs-actions.pod:2319
8162 msgid "guestfs_inspect_os"
8166 #: ../src/guestfs-actions.pod:2321
8169 " char **guestfs_inspect_os (guestfs_h *g);\n"
8174 #: ../src/guestfs-actions.pod:2323 ../fish/guestfish-actions.pod:1833
8176 "This function uses other libguestfs functions and certain heuristics to "
8177 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
8178 "for operating systems."
8182 #: ../src/guestfs-actions.pod:2327 ../fish/guestfish-actions.pod:1837
8183 msgid "The list returned is empty if no operating systems were found."
8187 #: ../src/guestfs-actions.pod:2329 ../fish/guestfish-actions.pod:1839
8189 "If one operating system was found, then this returns a list with a single "
8190 "element, which is the name of the root filesystem of this operating system. "
8191 "It is also possible for this function to return a list containing more than "
8192 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
8193 "element being the root filesystem of one of the operating systems."
8197 #: ../src/guestfs-actions.pod:2336
8199 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
8200 "functions in order to query further information about each operating system, "
8201 "such as the name and version."
8205 #: ../src/guestfs-actions.pod:2341
8207 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
8208 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
8209 "the contents. This should be called with no disks currently mounted. The "
8210 "function may also use Augeas, so any existing Augeas handle will be closed."
8214 #: ../src/guestfs-actions.pod:2347 ../fish/guestfish-actions.pod:1857
8216 "This function cannot decrypt encrypted disks. The caller must do that first "
8217 "(supplying the necessary keys) if the disk is encrypted."
8221 #: ../src/guestfs-actions.pod:2353 ../src/guestfs-actions.pod:2558
8222 #: ../src/guestfs-actions.pod:2614
8223 msgid "See also C<guestfs_list_filesystems>."
8227 #: ../src/guestfs-actions.pod:2359
8228 msgid "guestfs_is_blockdev"
8232 #: ../src/guestfs-actions.pod:2361
8235 " int guestfs_is_blockdev (guestfs_h *g,\n"
8236 "\t\tconst char *path);\n"
8241 #: ../src/guestfs-actions.pod:2364 ../fish/guestfish-actions.pod:1869
8243 "This returns C<true> if and only if there is a block device with the given "
8248 #: ../src/guestfs-actions.pod:2367 ../src/guestfs-actions.pod:2390
8249 #: ../src/guestfs-actions.pod:2414 ../src/guestfs-actions.pod:2426
8250 #: ../src/guestfs-actions.pod:2439 ../src/guestfs-actions.pod:2483
8251 #: ../src/guestfs-actions.pod:2495
8252 msgid "See also C<guestfs_stat>."
8256 #: ../src/guestfs-actions.pod:2371
8257 msgid "guestfs_is_busy"
8261 #: ../src/guestfs-actions.pod:2373
8264 " int guestfs_is_busy (guestfs_h *g);\n"
8269 #: ../src/guestfs-actions.pod:2375 ../fish/guestfish-actions.pod:1878
8271 "This returns true iff this handle is busy processing a command (in the "
8276 #: ../src/guestfs-actions.pod:2382
8277 msgid "guestfs_is_chardev"
8281 #: ../src/guestfs-actions.pod:2384
8284 " int guestfs_is_chardev (guestfs_h *g,\n"
8285 "\t\tconst char *path);\n"
8290 #: ../src/guestfs-actions.pod:2387 ../fish/guestfish-actions.pod:1887
8292 "This returns C<true> if and only if there is a character device with the "
8293 "given C<path> name."
8297 #: ../src/guestfs-actions.pod:2394
8298 msgid "guestfs_is_config"
8302 #: ../src/guestfs-actions.pod:2396
8305 " int guestfs_is_config (guestfs_h *g);\n"
8310 #: ../src/guestfs-actions.pod:2398 ../fish/guestfish-actions.pod:1896
8312 "This returns true iff this handle is being configured (in the C<CONFIG> "
8317 #: ../src/guestfs-actions.pod:2405
8318 msgid "guestfs_is_dir"
8322 #: ../src/guestfs-actions.pod:2407
8325 " int guestfs_is_dir (guestfs_h *g,\n"
8326 "\t\tconst char *path);\n"
8331 #: ../src/guestfs-actions.pod:2410 ../fish/guestfish-actions.pod:1905
8333 "This returns C<true> if and only if there is a directory with the given "
8334 "C<path> name. Note that it returns false for other objects like files."
8338 #: ../src/guestfs-actions.pod:2418
8339 msgid "guestfs_is_fifo"
8343 #: ../src/guestfs-actions.pod:2420
8346 " int guestfs_is_fifo (guestfs_h *g,\n"
8347 "\t\tconst char *path);\n"
8352 #: ../src/guestfs-actions.pod:2423 ../fish/guestfish-actions.pod:1915
8354 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
8355 "given C<path> name."
8359 #: ../src/guestfs-actions.pod:2430
8360 msgid "guestfs_is_file"
8364 #: ../src/guestfs-actions.pod:2432
8367 " int guestfs_is_file (guestfs_h *g,\n"
8368 "\t\tconst char *path);\n"
8373 #: ../src/guestfs-actions.pod:2435 ../fish/guestfish-actions.pod:1924
8375 "This returns C<true> if and only if there is a regular file with the given "
8376 "C<path> name. Note that it returns false for other objects like directories."
8380 #: ../src/guestfs-actions.pod:2443
8381 msgid "guestfs_is_launching"
8385 #: ../src/guestfs-actions.pod:2445
8388 " int guestfs_is_launching (guestfs_h *g);\n"
8393 #: ../src/guestfs-actions.pod:2447 ../fish/guestfish-actions.pod:1934
8395 "This returns true iff this handle is launching the subprocess (in the "
8396 "C<LAUNCHING> state)."
8400 #: ../src/guestfs-actions.pod:2454
8401 msgid "guestfs_is_lv"
8405 #: ../src/guestfs-actions.pod:2456
8408 " int guestfs_is_lv (guestfs_h *g,\n"
8409 "\t\tconst char *device);\n"
8414 #: ../src/guestfs-actions.pod:2459 ../fish/guestfish-actions.pod:1943
8416 "This command tests whether C<device> is a logical volume, and returns true "
8417 "iff this is the case."
8421 #: ../src/guestfs-actions.pod:2464
8422 msgid "guestfs_is_ready"
8426 #: ../src/guestfs-actions.pod:2466
8429 " int guestfs_is_ready (guestfs_h *g);\n"
8434 #: ../src/guestfs-actions.pod:2468 ../fish/guestfish-actions.pod:1950
8436 "This returns true iff this handle is ready to accept commands (in the "
8441 #: ../src/guestfs-actions.pod:2475
8442 msgid "guestfs_is_socket"
8446 #: ../src/guestfs-actions.pod:2477
8449 " int guestfs_is_socket (guestfs_h *g,\n"
8450 "\t\tconst char *path);\n"
8455 #: ../src/guestfs-actions.pod:2480 ../fish/guestfish-actions.pod:1959
8457 "This returns C<true> if and only if there is a Unix domain socket with the "
8458 "given C<path> name."
8462 #: ../src/guestfs-actions.pod:2487
8463 msgid "guestfs_is_symlink"
8467 #: ../src/guestfs-actions.pod:2489
8470 " int guestfs_is_symlink (guestfs_h *g,\n"
8471 "\t\tconst char *path);\n"
8476 #: ../src/guestfs-actions.pod:2492 ../fish/guestfish-actions.pod:1968
8478 "This returns C<true> if and only if there is a symbolic link with the given "
8483 #: ../src/guestfs-actions.pod:2499
8484 msgid "guestfs_kill_subprocess"
8488 #: ../src/guestfs-actions.pod:2501
8491 " int guestfs_kill_subprocess (guestfs_h *g);\n"
8496 #: ../src/guestfs-actions.pod:2503 ../fish/guestfish-actions.pod:1977
8497 msgid "This kills the qemu subprocess. You should never need to call this."
8501 #: ../src/guestfs-actions.pod:2507
8502 msgid "guestfs_launch"
8506 #: ../src/guestfs-actions.pod:2509
8509 " int guestfs_launch (guestfs_h *g);\n"
8514 #: ../src/guestfs-actions.pod:2511 ../fish/guestfish-actions.pod:1985
8516 "Internally libguestfs is implemented by running a virtual machine using "
8521 #: ../src/guestfs-actions.pod:2514 ../fish/guestfish-actions.pod:1988
8523 "You should call this after configuring the handle (eg. adding drives) but "
8524 "before performing any actions."
8528 #: ../src/guestfs-actions.pod:2519
8529 msgid "guestfs_lchown"
8533 #: ../src/guestfs-actions.pod:2521
8536 " int guestfs_lchown (guestfs_h *g,\n"
8539 "\t\tconst char *path);\n"
8544 #: ../src/guestfs-actions.pod:2526
8546 "Change the file owner to C<owner> and group to C<group>. This is like "
8547 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
8548 "changed, not the target."
8552 #: ../src/guestfs-actions.pod:2536
8553 msgid "guestfs_lgetxattrs"
8557 #: ../src/guestfs-actions.pod:2538
8560 " struct guestfs_xattr_list *guestfs_lgetxattrs (guestfs_h *g,\n"
8561 "\t\tconst char *path);\n"
8566 #: ../src/guestfs-actions.pod:2541
8568 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
8569 "then it returns the extended attributes of the link itself."
8573 #: ../src/guestfs-actions.pod:2550
8574 msgid "guestfs_list_devices"
8578 #: ../src/guestfs-actions.pod:2552
8581 " char **guestfs_list_devices (guestfs_h *g);\n"
8586 #: ../src/guestfs-actions.pod:2554 ../fish/guestfish-actions.pod:2015
8587 msgid "List all the block devices."
8591 #: ../src/guestfs-actions.pod:2556 ../fish/guestfish-actions.pod:2017
8592 msgid "The full block device names are returned, eg. C</dev/sda>."
8596 #: ../src/guestfs-actions.pod:2564
8597 msgid "guestfs_list_filesystems"
8601 #: ../src/guestfs-actions.pod:2566
8604 " char **guestfs_list_filesystems (guestfs_h *g);\n"
8609 #: ../src/guestfs-actions.pod:2568 ../fish/guestfish-actions.pod:2025
8611 "This inspection command looks for filesystems on partitions, block devices "
8612 "and logical volumes, returning a list of devices containing filesystems and "
8617 #: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:2029
8619 "The return value is a hash, where the keys are the devices containing "
8620 "filesystems, and the values are the filesystem types. For example:"
8624 #: ../src/guestfs-actions.pod:2576 ../fish/guestfish-actions.pod:2033
8627 " \"/dev/sda1\" => \"ntfs\"\n"
8628 " \"/dev/sda2\" => \"ext2\"\n"
8629 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
8630 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
8635 #: ../src/guestfs-actions.pod:2581 ../fish/guestfish-actions.pod:2038
8637 "The value can have the special value \"unknown\", meaning the content of the "
8638 "device is undetermined or empty. \"swap\" means a Linux swap partition."
8642 #: ../src/guestfs-actions.pod:2585
8644 "This command runs other libguestfs commands, which might include "
8645 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
8646 "soon after launch and only when nothing is mounted."
8650 #: ../src/guestfs-actions.pod:2589
8652 "Not all of the filesystems returned will be mountable. In particular, swap "
8653 "partitions are returned in the list. Also this command does not check that "
8654 "each filesystem found is valid and mountable, and some filesystems might be "
8655 "mountable but require special options. Filesystems may not all belong to a "
8656 "single logical operating system (use C<guestfs_inspect_os> to look for OSes)."
8660 #: ../src/guestfs-actions.pod:2603
8661 msgid "guestfs_list_partitions"
8665 #: ../src/guestfs-actions.pod:2605
8668 " char **guestfs_list_partitions (guestfs_h *g);\n"
8673 #: ../src/guestfs-actions.pod:2607 ../fish/guestfish-actions.pod:2058
8674 msgid "List all the partitions detected on all block devices."
8678 #: ../src/guestfs-actions.pod:2609 ../fish/guestfish-actions.pod:2060
8679 msgid "The full partition device names are returned, eg. C</dev/sda1>"
8683 #: ../src/guestfs-actions.pod:2611
8685 "This does not return logical volumes. For that you will need to call "
8690 #: ../src/guestfs-actions.pod:2620
8695 #: ../src/guestfs-actions.pod:2622
8698 " char *guestfs_ll (guestfs_h *g,\n"
8699 "\t\tconst char *directory);\n"
8704 #: ../src/guestfs-actions.pod:2625 ../fish/guestfish-actions.pod:2071
8706 "List the files in C<directory> (relative to the root directory, there is no "
8707 "cwd) in the format of 'ls -la'."
8711 #: ../src/guestfs-actions.pod:2628 ../fish/guestfish-actions.pod:2074
8713 "This command is mostly useful for interactive sessions. It is I<not> "
8714 "intended that you try to parse the output string."
8718 #: ../src/guestfs-actions.pod:2634
8723 #: ../src/guestfs-actions.pod:2636
8726 " int guestfs_ln (guestfs_h *g,\n"
8727 "\t\tconst char *target,\n"
8728 "\t\tconst char *linkname);\n"
8733 #: ../src/guestfs-actions.pod:2640 ../fish/guestfish-actions.pod:2081
8734 msgid "This command creates a hard link using the C<ln> command."
8738 #: ../src/guestfs-actions.pod:2644
8739 msgid "guestfs_ln_f"
8743 #: ../src/guestfs-actions.pod:2646
8746 " int guestfs_ln_f (guestfs_h *g,\n"
8747 "\t\tconst char *target,\n"
8748 "\t\tconst char *linkname);\n"
8753 #: ../src/guestfs-actions.pod:2650 ../fish/guestfish-actions.pod:2087
8755 "This command creates a hard link using the C<ln -f> command. The C<-f> "
8756 "option removes the link (C<linkname>) if it exists already."
8760 #: ../src/guestfs-actions.pod:2655
8761 msgid "guestfs_ln_s"
8765 #: ../src/guestfs-actions.pod:2657
8768 " int guestfs_ln_s (guestfs_h *g,\n"
8769 "\t\tconst char *target,\n"
8770 "\t\tconst char *linkname);\n"
8775 #: ../src/guestfs-actions.pod:2661 ../fish/guestfish-actions.pod:2094
8776 msgid "This command creates a symbolic link using the C<ln -s> command."
8780 #: ../src/guestfs-actions.pod:2665
8781 msgid "guestfs_ln_sf"
8785 #: ../src/guestfs-actions.pod:2667
8788 " int guestfs_ln_sf (guestfs_h *g,\n"
8789 "\t\tconst char *target,\n"
8790 "\t\tconst char *linkname);\n"
8795 #: ../src/guestfs-actions.pod:2671 ../fish/guestfish-actions.pod:2100
8797 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
8798 "option removes the link (C<linkname>) if it exists already."
8802 #: ../src/guestfs-actions.pod:2676
8803 msgid "guestfs_lremovexattr"
8807 #: ../src/guestfs-actions.pod:2678
8810 " int guestfs_lremovexattr (guestfs_h *g,\n"
8811 "\t\tconst char *xattr,\n"
8812 "\t\tconst char *path);\n"
8817 #: ../src/guestfs-actions.pod:2682
8819 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
8820 "link, then it removes an extended attribute of the link itself."
8824 #: ../src/guestfs-actions.pod:2688
8829 #: ../src/guestfs-actions.pod:2690
8832 " char **guestfs_ls (guestfs_h *g,\n"
8833 "\t\tconst char *directory);\n"
8838 #: ../src/guestfs-actions.pod:2693 ../fish/guestfish-actions.pod:2115
8840 "List the files in C<directory> (relative to the root directory, there is no "
8841 "cwd). The '.' and '..' entries are not returned, but hidden files are shown."
8845 #: ../src/guestfs-actions.pod:2697
8847 "This command is mostly useful for interactive sessions. Programs should "
8848 "probably use C<guestfs_readdir> instead."
8852 #: ../src/guestfs-actions.pod:2704
8853 msgid "guestfs_lsetxattr"
8857 #: ../src/guestfs-actions.pod:2706
8860 " int guestfs_lsetxattr (guestfs_h *g,\n"
8861 "\t\tconst char *xattr,\n"
8862 "\t\tconst char *val,\n"
8864 "\t\tconst char *path);\n"
8869 #: ../src/guestfs-actions.pod:2712
8871 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
8872 "then it sets an extended attribute of the link itself."
8876 #: ../src/guestfs-actions.pod:2718
8877 msgid "guestfs_lstat"
8881 #: ../src/guestfs-actions.pod:2720
8884 " struct guestfs_stat *guestfs_lstat (guestfs_h *g,\n"
8885 "\t\tconst char *path);\n"
8890 #: ../src/guestfs-actions.pod:2723 ../src/guestfs-actions.pod:4799
8891 #: ../fish/guestfish-actions.pod:2134 ../fish/guestfish-actions.pod:3716
8892 msgid "Returns file information for the given C<path>."
8896 #: ../src/guestfs-actions.pod:2725
8898 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
8899 "link, then the link is stat-ed, not the file it refers to."
8903 #: ../src/guestfs-actions.pod:2729 ../fish/guestfish-actions.pod:2140
8904 msgid "This is the same as the C<lstat(2)> system call."
8908 #: ../src/guestfs-actions.pod:2731 ../src/guestfs-actions.pod:4803
8910 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
8911 "error. I<The caller must call C<guestfs_free_stat> after use>."
8915 #: ../src/guestfs-actions.pod:2735
8916 msgid "guestfs_lstatlist"
8920 #: ../src/guestfs-actions.pod:2737
8923 " struct guestfs_stat_list *guestfs_lstatlist (guestfs_h *g,\n"
8924 "\t\tconst char *path,\n"
8925 "\t\tchar *const *names);\n"
8930 #: ../src/guestfs-actions.pod:2741
8932 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
8933 "files, where all files are in the directory C<path>. C<names> is the list "
8934 "of files from this directory."
8938 #: ../src/guestfs-actions.pod:2745 ../fish/guestfish-actions.pod:2150
8940 "On return you get a list of stat structs, with a one-to-one correspondence "
8941 "to the C<names> list. If any name did not exist or could not be lstat'd, "
8942 "then the C<ino> field of that structure is set to C<-1>."
8946 #: ../src/guestfs-actions.pod:2750
8948 "This call is intended for programs that want to efficiently list a directory "
8949 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
8950 "for a similarly efficient call for getting extended attributes. Very long "
8951 "directory listings might cause the protocol message size to be exceeded, "
8952 "causing this call to fail. The caller must split up such requests into "
8953 "smaller groups of names."
8957 #: ../src/guestfs-actions.pod:2758
8959 "This function returns a C<struct guestfs_stat_list *> (see E<lt>guestfs-"
8960 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
8961 "C<guestfs_free_stat_list> after use>."
8965 #: ../src/guestfs-actions.pod:2763
8966 msgid "guestfs_luks_add_key"
8970 #: ../src/guestfs-actions.pod:2765
8973 " int guestfs_luks_add_key (guestfs_h *g,\n"
8974 "\t\tconst char *device,\n"
8975 "\t\tconst char *key,\n"
8976 "\t\tconst char *newkey,\n"
8977 "\t\tint keyslot);\n"
8982 #: ../src/guestfs-actions.pod:2771 ../fish/guestfish-actions.pod:2167
8984 "This command adds a new key on LUKS device C<device>. C<key> is any "
8985 "existing key, and is used to access the device. C<newkey> is the new key to "
8986 "add. C<keyslot> is the key slot that will be replaced."
8990 #: ../src/guestfs-actions.pod:2776
8992 "Note that if C<keyslot> already contains a key, then this command will "
8993 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
8997 #: ../src/guestfs-actions.pod:2782 ../src/guestfs-actions.pod:2816
8998 #: ../src/guestfs-actions.pod:2836 ../src/guestfs-actions.pod:2853
8999 #: ../src/guestfs-actions.pod:2882 ../src/guestfs-actions.pod:2898
9001 "This function takes a key or passphrase parameter which could contain "
9002 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
9007 #: ../src/guestfs-actions.pod:2786
9008 msgid "guestfs_luks_close"
9012 #: ../src/guestfs-actions.pod:2788
9015 " int guestfs_luks_close (guestfs_h *g,\n"
9016 "\t\tconst char *device);\n"
9021 #: ../src/guestfs-actions.pod:2791
9023 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
9024 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
9025 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
9026 "underlying block device."
9030 #: ../src/guestfs-actions.pod:2799
9031 msgid "guestfs_luks_format"
9035 #: ../src/guestfs-actions.pod:2801
9038 " int guestfs_luks_format (guestfs_h *g,\n"
9039 "\t\tconst char *device,\n"
9040 "\t\tconst char *key,\n"
9041 "\t\tint keyslot);\n"
9046 #: ../src/guestfs-actions.pod:2806 ../fish/guestfish-actions.pod:2193
9048 "This command erases existing data on C<device> and formats the device as a "
9049 "LUKS encrypted device. C<key> is the initial key, which is added to key "
9050 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
9054 #: ../src/guestfs-actions.pod:2813 ../src/guestfs-actions.pod:2833
9055 #: ../src/guestfs-actions.pod:2952 ../src/guestfs-actions.pod:3679
9056 #: ../src/guestfs-actions.pod:4340 ../src/guestfs-actions.pod:4661
9057 #: ../src/guestfs-actions.pod:4681 ../src/guestfs-actions.pod:4704
9058 #: ../src/guestfs-actions.pod:5669 ../fish/guestfish-actions.pod:2201
9059 #: ../fish/guestfish-actions.pod:2214 ../fish/guestfish-actions.pod:2298
9060 #: ../fish/guestfish-actions.pod:2828 ../fish/guestfish-actions.pod:3335
9061 #: ../fish/guestfish-actions.pod:3615 ../fish/guestfish-actions.pod:3631
9062 #: ../fish/guestfish-actions.pod:3646 ../fish/guestfish-actions.pod:4361
9064 "B<This command is dangerous. Without careful use you can easily destroy all "
9069 #: ../src/guestfs-actions.pod:2820
9070 msgid "guestfs_luks_format_cipher"
9074 #: ../src/guestfs-actions.pod:2822
9077 " int guestfs_luks_format_cipher (guestfs_h *g,\n"
9078 "\t\tconst char *device,\n"
9079 "\t\tconst char *key,\n"
9080 "\t\tint keyslot,\n"
9081 "\t\tconst char *cipher);\n"
9086 #: ../src/guestfs-actions.pod:2828
9088 "This command is the same as C<guestfs_luks_format> but it also allows you to "
9089 "set the C<cipher> used."
9093 #: ../src/guestfs-actions.pod:2840
9094 msgid "guestfs_luks_kill_slot"
9098 #: ../src/guestfs-actions.pod:2842
9101 " int guestfs_luks_kill_slot (guestfs_h *g,\n"
9102 "\t\tconst char *device,\n"
9103 "\t\tconst char *key,\n"
9104 "\t\tint keyslot);\n"
9109 #: ../src/guestfs-actions.pod:2847 ../fish/guestfish-actions.pod:2221
9111 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
9112 "device C<device>. C<key> must be one of the I<other> keys."
9116 #: ../src/guestfs-actions.pod:2857
9117 msgid "guestfs_luks_open"
9121 #: ../src/guestfs-actions.pod:2859
9124 " int guestfs_luks_open (guestfs_h *g,\n"
9125 "\t\tconst char *device,\n"
9126 "\t\tconst char *key,\n"
9127 "\t\tconst char *mapname);\n"
9132 #: ../src/guestfs-actions.pod:2864 ../fish/guestfish-actions.pod:2232
9134 "This command opens a block device which has been encrypted according to the "
9135 "Linux Unified Key Setup (LUKS) standard."
9139 #: ../src/guestfs-actions.pod:2867 ../fish/guestfish-actions.pod:2235
9140 msgid "C<device> is the encrypted block device or partition."
9144 #: ../src/guestfs-actions.pod:2869 ../fish/guestfish-actions.pod:2237
9146 "The caller must supply one of the keys associated with the LUKS block "
9147 "device, in the C<key> parameter."
9151 #: ../src/guestfs-actions.pod:2872 ../fish/guestfish-actions.pod:2240
9153 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
9154 "writes to this block device are decrypted from and encrypted to the "
9155 "underlying C<device> respectively."
9159 #: ../src/guestfs-actions.pod:2876
9161 "If this block device contains LVM volume groups, then calling "
9162 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
9167 #: ../src/guestfs-actions.pod:2886
9168 msgid "guestfs_luks_open_ro"
9172 #: ../src/guestfs-actions.pod:2888
9175 " int guestfs_luks_open_ro (guestfs_h *g,\n"
9176 "\t\tconst char *device,\n"
9177 "\t\tconst char *key,\n"
9178 "\t\tconst char *mapname);\n"
9183 #: ../src/guestfs-actions.pod:2893
9185 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
9190 #: ../src/guestfs-actions.pod:2902
9191 msgid "guestfs_lvcreate"
9195 #: ../src/guestfs-actions.pod:2904
9198 " int guestfs_lvcreate (guestfs_h *g,\n"
9199 "\t\tconst char *logvol,\n"
9200 "\t\tconst char *volgroup,\n"
9201 "\t\tint mbytes);\n"
9206 #: ../src/guestfs-actions.pod:2909 ../fish/guestfish-actions.pod:2265
9208 "This creates an LVM logical volume called C<logvol> on the volume group "
9209 "C<volgroup>, with C<size> megabytes."
9213 #: ../src/guestfs-actions.pod:2914
9214 msgid "guestfs_lvm_canonical_lv_name"
9218 #: ../src/guestfs-actions.pod:2916
9221 " char *guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
9222 "\t\tconst char *lvname);\n"
9227 #: ../src/guestfs-actions.pod:2919 ../fish/guestfish-actions.pod:2272
9229 "This converts alternative naming schemes for LVs that you might find to the "
9230 "canonical name. For example, C</dev/mapper/VG-LV> is converted to C</dev/VG/"
9235 #: ../src/guestfs-actions.pod:2923 ../fish/guestfish-actions.pod:2276
9237 "This command returns an error if the C<lvname> parameter does not refer to a "
9242 #: ../src/guestfs-actions.pod:2926
9243 msgid "See also C<guestfs_is_lv>."
9247 #: ../src/guestfs-actions.pod:2931
9248 msgid "guestfs_lvm_clear_filter"
9252 #: ../src/guestfs-actions.pod:2933
9255 " int guestfs_lvm_clear_filter (guestfs_h *g);\n"
9260 #: ../src/guestfs-actions.pod:2935
9262 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
9263 "see every block device."
9267 #: ../src/guestfs-actions.pod:2938 ../src/guestfs-actions.pod:2974
9268 #: ../fish/guestfish-actions.pod:2288 ../fish/guestfish-actions.pod:2319
9270 "This command also clears the LVM cache and performs a volume group scan."
9274 #: ../src/guestfs-actions.pod:2943
9275 msgid "guestfs_lvm_remove_all"
9279 #: ../src/guestfs-actions.pod:2945
9282 " int guestfs_lvm_remove_all (guestfs_h *g);\n"
9287 #: ../src/guestfs-actions.pod:2947 ../fish/guestfish-actions.pod:2295
9289 "This command removes all LVM logical volumes, volume groups and physical "
9294 #: ../src/guestfs-actions.pod:2955
9295 msgid "guestfs_lvm_set_filter"
9299 #: ../src/guestfs-actions.pod:2957
9302 " int guestfs_lvm_set_filter (guestfs_h *g,\n"
9303 "\t\tchar *const *devices);\n"
9308 #: ../src/guestfs-actions.pod:2960 ../fish/guestfish-actions.pod:2305
9310 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
9311 "block devices in the list C<devices>, and will ignore all other attached "
9316 #: ../src/guestfs-actions.pod:2964 ../fish/guestfish-actions.pod:2309
9318 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
9319 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
9320 "there are two types of duplication possible: either cloned PVs/VGs which "
9321 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
9322 "same name. In normal operation you cannot create this situation, but you "
9323 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
9324 "inside the LVM metadata."
9328 #: ../src/guestfs-actions.pod:2977 ../fish/guestfish-actions.pod:2322
9329 msgid "You can filter whole block devices or individual partitions."
9333 #: ../src/guestfs-actions.pod:2979 ../fish/guestfish-actions.pod:2324
9335 "You cannot use this if any VG is currently in use (eg. contains a mounted "
9336 "filesystem), even if you are not filtering out that VG."
9340 #: ../src/guestfs-actions.pod:2985
9341 msgid "guestfs_lvremove"
9345 #: ../src/guestfs-actions.pod:2987
9348 " int guestfs_lvremove (guestfs_h *g,\n"
9349 "\t\tconst char *device);\n"
9354 #: ../src/guestfs-actions.pod:2990 ../fish/guestfish-actions.pod:2332
9356 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
9357 "LV, such as C</dev/VG/LV>."
9361 #: ../src/guestfs-actions.pod:2993 ../fish/guestfish-actions.pod:2335
9363 "You can also remove all LVs in a volume group by specifying the VG name, C</"
9368 #: ../src/guestfs-actions.pod:2998
9369 msgid "guestfs_lvrename"
9373 #: ../src/guestfs-actions.pod:3000
9376 " int guestfs_lvrename (guestfs_h *g,\n"
9377 "\t\tconst char *logvol,\n"
9378 "\t\tconst char *newlogvol);\n"
9383 #: ../src/guestfs-actions.pod:3004 ../fish/guestfish-actions.pod:2342
9384 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
9388 #: ../src/guestfs-actions.pod:3008
9389 msgid "guestfs_lvresize"
9393 #: ../src/guestfs-actions.pod:3010
9396 " int guestfs_lvresize (guestfs_h *g,\n"
9397 "\t\tconst char *device,\n"
9398 "\t\tint mbytes);\n"
9403 #: ../src/guestfs-actions.pod:3014 ../fish/guestfish-actions.pod:2348
9405 "This resizes (expands or shrinks) an existing LVM logical volume to "
9406 "C<mbytes>. When reducing, data in the reduced part is lost."
9410 #: ../src/guestfs-actions.pod:3020
9411 msgid "guestfs_lvresize_free"
9415 #: ../src/guestfs-actions.pod:3022
9418 " int guestfs_lvresize_free (guestfs_h *g,\n"
9419 "\t\tconst char *lv,\n"
9420 "\t\tint percent);\n"
9425 #: ../src/guestfs-actions.pod:3026 ../fish/guestfish-actions.pod:2356
9427 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
9428 "remaining free space in the volume group. Commonly you would call this with "
9429 "pc = 100 which expands the logical volume as much as possible, using all "
9430 "remaining free space in the volume group."
9434 #: ../src/guestfs-actions.pod:3034
9439 #: ../src/guestfs-actions.pod:3036
9442 " char **guestfs_lvs (guestfs_h *g);\n"
9447 #: ../src/guestfs-actions.pod:3038 ../fish/guestfish-actions.pod:2366
9449 "List all the logical volumes detected. This is the equivalent of the L<lvs"
9454 #: ../src/guestfs-actions.pod:3041 ../fish/guestfish-actions.pod:2369
9456 "This returns a list of the logical volume device names (eg. C</dev/"
9457 "VolGroup00/LogVol00>)."
9461 #: ../src/guestfs-actions.pod:3044
9462 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
9466 #: ../src/guestfs-actions.pod:3050
9467 msgid "guestfs_lvs_full"
9471 #: ../src/guestfs-actions.pod:3052
9474 " struct guestfs_lvm_lv_list *guestfs_lvs_full (guestfs_h *g);\n"
9479 #: ../src/guestfs-actions.pod:3054 ../fish/guestfish-actions.pod:2378
9481 "List all the logical volumes detected. This is the equivalent of the L<lvs"
9482 "(8)> command. The \"full\" version includes all fields."
9486 #: ../src/guestfs-actions.pod:3057
9488 "This function returns a C<struct guestfs_lvm_lv_list *> (see E<lt>guestfs-"
9489 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
9490 "C<guestfs_free_lvm_lv_list> after use>."
9494 #: ../src/guestfs-actions.pod:3062
9495 msgid "guestfs_lvuuid"
9499 #: ../src/guestfs-actions.pod:3064
9502 " char *guestfs_lvuuid (guestfs_h *g,\n"
9503 "\t\tconst char *device);\n"
9508 #: ../src/guestfs-actions.pod:3067 ../fish/guestfish-actions.pod:2385
9509 msgid "This command returns the UUID of the LVM LV C<device>."
9513 #: ../src/guestfs-actions.pod:3072
9514 msgid "guestfs_lxattrlist"
9518 #: ../src/guestfs-actions.pod:3074
9521 " struct guestfs_xattr_list *guestfs_lxattrlist (guestfs_h *g,\n"
9522 "\t\tconst char *path,\n"
9523 "\t\tchar *const *names);\n"
9528 #: ../src/guestfs-actions.pod:3078 ../fish/guestfish-actions.pod:2391
9530 "This call allows you to get the extended attributes of multiple files, where "
9531 "all files are in the directory C<path>. C<names> is the list of files from "
9536 #: ../src/guestfs-actions.pod:3082 ../fish/guestfish-actions.pod:2395
9538 "On return you get a flat list of xattr structs which must be interpreted "
9539 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
9540 "C<attrval> in this struct is zero-length to indicate there was an error "
9541 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
9542 "number (the number of following attributes for this file, which could be C<"
9543 "\"0\">). Then after the first xattr struct are the zero or more attributes "
9544 "for the first named file. This repeats for the second and subsequent files."
9548 #: ../src/guestfs-actions.pod:3092
9550 "This call is intended for programs that want to efficiently list a directory "
9551 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
9552 "a similarly efficient call for getting standard stats. Very long directory "
9553 "listings might cause the protocol message size to be exceeded, causing this "
9554 "call to fail. The caller must split up such requests into smaller groups of "
9559 #: ../src/guestfs-actions.pod:3105
9560 msgid "guestfs_mkdir"
9564 #: ../src/guestfs-actions.pod:3107
9567 " int guestfs_mkdir (guestfs_h *g,\n"
9568 "\t\tconst char *path);\n"
9573 #: ../src/guestfs-actions.pod:3110 ../fish/guestfish-actions.pod:2417
9574 msgid "Create a directory named C<path>."
9578 #: ../src/guestfs-actions.pod:3114
9579 msgid "guestfs_mkdir_mode"
9583 #: ../src/guestfs-actions.pod:3116
9586 " int guestfs_mkdir_mode (guestfs_h *g,\n"
9587 "\t\tconst char *path,\n"
9593 #: ../src/guestfs-actions.pod:3120 ../fish/guestfish-actions.pod:2423
9595 "This command creates a directory, setting the initial permissions of the "
9596 "directory to C<mode>."
9600 #: ../src/guestfs-actions.pod:3123 ../fish/guestfish-actions.pod:2426
9602 "For common Linux filesystems, the actual mode which is set will be C<mode & "
9603 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
9608 #: ../src/guestfs-actions.pod:3127
9609 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
9613 #: ../src/guestfs-actions.pod:3131
9614 msgid "guestfs_mkdir_p"
9618 #: ../src/guestfs-actions.pod:3133
9621 " int guestfs_mkdir_p (guestfs_h *g,\n"
9622 "\t\tconst char *path);\n"
9627 #: ../src/guestfs-actions.pod:3136 ../fish/guestfish-actions.pod:2436
9629 "Create a directory named C<path>, creating any parent directories as "
9630 "necessary. This is like the C<mkdir -p> shell command."
9634 #: ../src/guestfs-actions.pod:3141
9635 msgid "guestfs_mkdtemp"
9639 #: ../src/guestfs-actions.pod:3143
9642 " char *guestfs_mkdtemp (guestfs_h *g,\n"
9643 "\t\tconst char *template);\n"
9648 #: ../src/guestfs-actions.pod:3146 ../fish/guestfish-actions.pod:2443
9650 "This command creates a temporary directory. The C<template> parameter "
9651 "should be a full pathname for the temporary directory name with the final "
9652 "six characters being \"XXXXXX\"."
9656 #: ../src/guestfs-actions.pod:3151 ../fish/guestfish-actions.pod:2448
9658 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
9659 "being suitable for Windows filesystems."
9663 #: ../src/guestfs-actions.pod:3154 ../fish/guestfish-actions.pod:2451
9664 msgid "The name of the temporary directory that was created is returned."
9668 #: ../src/guestfs-actions.pod:3157 ../fish/guestfish-actions.pod:2454
9669 msgid "The temporary directory is created with mode 0700 and is owned by root."
9673 #: ../src/guestfs-actions.pod:3160 ../fish/guestfish-actions.pod:2457
9675 "The caller is responsible for deleting the temporary directory and its "
9676 "contents after use."
9680 #: ../src/guestfs-actions.pod:3163 ../fish/guestfish-actions.pod:2460
9681 msgid "See also: L<mkdtemp(3)>"
9685 #: ../src/guestfs-actions.pod:3168
9686 msgid "guestfs_mke2fs_J"
9690 #: ../src/guestfs-actions.pod:3170
9693 " int guestfs_mke2fs_J (guestfs_h *g,\n"
9694 "\t\tconst char *fstype,\n"
9695 "\t\tint blocksize,\n"
9696 "\t\tconst char *device,\n"
9697 "\t\tconst char *journal);\n"
9702 #: ../src/guestfs-actions.pod:3176 ../fish/guestfish-actions.pod:2466
9704 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
9705 "C<journal>. It is equivalent to the command:"
9709 #: ../src/guestfs-actions.pod:3180 ../fish/guestfish-actions.pod:2470
9712 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
9717 #: ../src/guestfs-actions.pod:3182
9718 msgid "See also C<guestfs_mke2journal>."
9722 #: ../src/guestfs-actions.pod:3186
9723 msgid "guestfs_mke2fs_JL"
9727 #: ../src/guestfs-actions.pod:3188
9730 " int guestfs_mke2fs_JL (guestfs_h *g,\n"
9731 "\t\tconst char *fstype,\n"
9732 "\t\tint blocksize,\n"
9733 "\t\tconst char *device,\n"
9734 "\t\tconst char *label);\n"
9739 #: ../src/guestfs-actions.pod:3194 ../fish/guestfish-actions.pod:2478
9741 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
9742 "the journal labeled C<label>."
9746 #: ../src/guestfs-actions.pod:3197
9747 msgid "See also C<guestfs_mke2journal_L>."
9751 #: ../src/guestfs-actions.pod:3201
9752 msgid "guestfs_mke2fs_JU"
9756 #: ../src/guestfs-actions.pod:3203
9759 " int guestfs_mke2fs_JU (guestfs_h *g,\n"
9760 "\t\tconst char *fstype,\n"
9761 "\t\tint blocksize,\n"
9762 "\t\tconst char *device,\n"
9763 "\t\tconst char *uuid);\n"
9768 #: ../src/guestfs-actions.pod:3209 ../fish/guestfish-actions.pod:2487
9770 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
9771 "the journal with UUID C<uuid>."
9775 #: ../src/guestfs-actions.pod:3212
9776 msgid "See also C<guestfs_mke2journal_U>."
9780 #: ../src/guestfs-actions.pod:3216
9781 msgid "guestfs_mke2journal"
9785 #: ../src/guestfs-actions.pod:3218
9788 " int guestfs_mke2journal (guestfs_h *g,\n"
9789 "\t\tint blocksize,\n"
9790 "\t\tconst char *device);\n"
9795 #: ../src/guestfs-actions.pod:3222 ../fish/guestfish-actions.pod:2496
9797 "This creates an ext2 external journal on C<device>. It is equivalent to the "
9802 #: ../src/guestfs-actions.pod:3225 ../fish/guestfish-actions.pod:2499
9805 " mke2fs -O journal_dev -b blocksize device\n"
9810 #: ../src/guestfs-actions.pod:3229
9811 msgid "guestfs_mke2journal_L"
9815 #: ../src/guestfs-actions.pod:3231
9818 " int guestfs_mke2journal_L (guestfs_h *g,\n"
9819 "\t\tint blocksize,\n"
9820 "\t\tconst char *label,\n"
9821 "\t\tconst char *device);\n"
9826 #: ../src/guestfs-actions.pod:3236 ../fish/guestfish-actions.pod:2505
9827 msgid "This creates an ext2 external journal on C<device> with label C<label>."
9831 #: ../src/guestfs-actions.pod:3240
9832 msgid "guestfs_mke2journal_U"
9836 #: ../src/guestfs-actions.pod:3242
9839 " int guestfs_mke2journal_U (guestfs_h *g,\n"
9840 "\t\tint blocksize,\n"
9841 "\t\tconst char *uuid,\n"
9842 "\t\tconst char *device);\n"
9847 #: ../src/guestfs-actions.pod:3247 ../fish/guestfish-actions.pod:2511
9848 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
9852 #: ../src/guestfs-actions.pod:3251
9853 msgid "guestfs_mkfifo"
9857 #: ../src/guestfs-actions.pod:3253
9860 " int guestfs_mkfifo (guestfs_h *g,\n"
9862 "\t\tconst char *path);\n"
9867 #: ../src/guestfs-actions.pod:3257
9869 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
9870 "is just a convenient wrapper around C<guestfs_mknod>."
9874 #: ../src/guestfs-actions.pod:3265
9875 msgid "guestfs_mkfs"
9879 #: ../src/guestfs-actions.pod:3267
9882 " int guestfs_mkfs (guestfs_h *g,\n"
9883 "\t\tconst char *fstype,\n"
9884 "\t\tconst char *device);\n"
9889 #: ../src/guestfs-actions.pod:3271 ../fish/guestfish-actions.pod:2527
9891 "This creates a filesystem on C<device> (usually a partition or LVM logical "
9892 "volume). The filesystem type is C<fstype>, for example C<ext3>."
9896 #: ../src/guestfs-actions.pod:3277
9897 msgid "guestfs_mkfs_b"
9901 #: ../src/guestfs-actions.pod:3279
9904 " int guestfs_mkfs_b (guestfs_h *g,\n"
9905 "\t\tconst char *fstype,\n"
9906 "\t\tint blocksize,\n"
9907 "\t\tconst char *device);\n"
9912 #: ../src/guestfs-actions.pod:3284
9914 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
9915 "block size of the resulting filesystem. Supported block sizes depend on the "
9916 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
9920 #: ../src/guestfs-actions.pod:3289 ../fish/guestfish-actions.pod:2540
9922 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
9927 #: ../src/guestfs-actions.pod:3294
9928 msgid "guestfs_mkmountpoint"
9932 #: ../src/guestfs-actions.pod:3296
9935 " int guestfs_mkmountpoint (guestfs_h *g,\n"
9936 "\t\tconst char *exemptpath);\n"
9941 #: ../src/guestfs-actions.pod:3299
9943 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
9944 "that can be used to create extra mountpoints before mounting the first "
9949 #: ../src/guestfs-actions.pod:3303 ../fish/guestfish-actions.pod:2551
9951 "These calls are I<only> necessary in some very limited circumstances, mainly "
9952 "the case where you want to mount a mix of unrelated and/or read-only "
9953 "filesystems together."
9957 #: ../src/guestfs-actions.pod:3307 ../fish/guestfish-actions.pod:2555
9959 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
9960 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
9961 "inside that. You can unpack this as follows in guestfish:"
9965 #: ../src/guestfs-actions.pod:3312 ../fish/guestfish-actions.pod:2560
9968 " add-ro Fedora-11-i686-Live.iso\n"
9970 " mkmountpoint /cd\n"
9971 " mkmountpoint /sqsh\n"
9972 " mkmountpoint /ext3fs\n"
9973 " mount /dev/sda /cd\n"
9974 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
9975 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
9980 #: ../src/guestfs-actions.pod:3321 ../fish/guestfish-actions.pod:2569
9981 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
9985 #: ../src/guestfs-actions.pod:3323
9987 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
9988 "may get unexpected errors if you try to mix these calls. It is safest to "
9989 "manually unmount filesystems and remove mountpoints after use."
9993 #: ../src/guestfs-actions.pod:3327
9995 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
9996 "first, so for this to work for manual mountpoints, you must ensure that the "
9997 "innermost mountpoints have the longest pathnames, as in the example code "
10002 #: ../src/guestfs-actions.pod:3332 ../fish/guestfish-actions.pod:2580
10004 "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
10008 #: ../src/guestfs-actions.pod:3334
10010 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
10011 "means that C<guestfs_umount_all> is called when the handle is closed which "
10012 "can also trigger these issues."
10016 #: ../src/guestfs-actions.pod:3340
10017 msgid "guestfs_mknod"
10021 #: ../src/guestfs-actions.pod:3342
10024 " int guestfs_mknod (guestfs_h *g,\n"
10026 "\t\tint devmajor,\n"
10027 "\t\tint devminor,\n"
10028 "\t\tconst char *path);\n"
10033 #: ../src/guestfs-actions.pod:3348 ../fish/guestfish-actions.pod:2590
10035 "This call creates block or character special devices, or named pipes (FIFOs)."
10039 #: ../src/guestfs-actions.pod:3351 ../fish/guestfish-actions.pod:2593
10041 "The C<mode> parameter should be the mode, using the standard constants. "
10042 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
10043 "used when creating block and character special devices."
10047 #: ../src/guestfs-actions.pod:3356
10049 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
10050 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
10051 "regular file). These constants are available in the standard Linux header "
10052 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
10053 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
10054 "the appropriate constant for you."
10058 #: ../src/guestfs-actions.pod:3368
10059 msgid "guestfs_mknod_b"
10063 #: ../src/guestfs-actions.pod:3370
10066 " int guestfs_mknod_b (guestfs_h *g,\n"
10068 "\t\tint devmajor,\n"
10069 "\t\tint devminor,\n"
10070 "\t\tconst char *path);\n"
10075 #: ../src/guestfs-actions.pod:3376
10077 "This call creates a block device node called C<path> with mode C<mode> and "
10078 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
10079 "wrapper around C<guestfs_mknod>."
10083 #: ../src/guestfs-actions.pod:3384
10084 msgid "guestfs_mknod_c"
10088 #: ../src/guestfs-actions.pod:3386
10091 " int guestfs_mknod_c (guestfs_h *g,\n"
10093 "\t\tint devmajor,\n"
10094 "\t\tint devminor,\n"
10095 "\t\tconst char *path);\n"
10100 #: ../src/guestfs-actions.pod:3392
10102 "This call creates a char device node called C<path> with mode C<mode> and "
10103 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
10104 "wrapper around C<guestfs_mknod>."
10108 #: ../src/guestfs-actions.pod:3400
10109 msgid "guestfs_mkswap"
10113 #: ../src/guestfs-actions.pod:3402
10116 " int guestfs_mkswap (guestfs_h *g,\n"
10117 "\t\tconst char *device);\n"
10122 #: ../src/guestfs-actions.pod:3405 ../fish/guestfish-actions.pod:2632
10123 msgid "Create a swap partition on C<device>."
10127 #: ../src/guestfs-actions.pod:3409
10128 msgid "guestfs_mkswap_L"
10132 #: ../src/guestfs-actions.pod:3411
10135 " int guestfs_mkswap_L (guestfs_h *g,\n"
10136 "\t\tconst char *label,\n"
10137 "\t\tconst char *device);\n"
10142 #: ../src/guestfs-actions.pod:3415 ../fish/guestfish-actions.pod:2638
10143 msgid "Create a swap partition on C<device> with label C<label>."
10147 #: ../src/guestfs-actions.pod:3417 ../fish/guestfish-actions.pod:2640
10149 "Note that you cannot attach a swap label to a block device (eg. C</dev/"
10150 "sda>), just to a partition. This appears to be a limitation of the kernel "
10155 #: ../src/guestfs-actions.pod:3423
10156 msgid "guestfs_mkswap_U"
10160 #: ../src/guestfs-actions.pod:3425
10163 " int guestfs_mkswap_U (guestfs_h *g,\n"
10164 "\t\tconst char *uuid,\n"
10165 "\t\tconst char *device);\n"
10170 #: ../src/guestfs-actions.pod:3429 ../fish/guestfish-actions.pod:2648
10171 msgid "Create a swap partition on C<device> with UUID C<uuid>."
10175 #: ../src/guestfs-actions.pod:3433
10176 msgid "guestfs_mkswap_file"
10180 #: ../src/guestfs-actions.pod:3435
10183 " int guestfs_mkswap_file (guestfs_h *g,\n"
10184 "\t\tconst char *path);\n"
10189 #: ../src/guestfs-actions.pod:3438 ../fish/guestfish-actions.pod:2654
10190 msgid "Create a swap file."
10194 #: ../src/guestfs-actions.pod:3440
10196 "This command just writes a swap file signature to an existing file. To "
10197 "create the file itself, use something like C<guestfs_fallocate>."
10201 #: ../src/guestfs-actions.pod:3445
10202 msgid "guestfs_modprobe"
10206 #: ../src/guestfs-actions.pod:3447
10209 " int guestfs_modprobe (guestfs_h *g,\n"
10210 "\t\tconst char *modulename);\n"
10215 #: ../src/guestfs-actions.pod:3450 ../fish/guestfish-actions.pod:2663
10216 msgid "This loads a kernel module in the appliance."
10220 #: ../src/guestfs-actions.pod:3452 ../fish/guestfish-actions.pod:2665
10222 "The kernel module must have been whitelisted when libguestfs was built (see "
10223 "C<appliance/kmod.whitelist.in> in the source)."
10227 #: ../src/guestfs-actions.pod:3457
10228 msgid "guestfs_mount"
10232 #: ../src/guestfs-actions.pod:3459
10235 " int guestfs_mount (guestfs_h *g,\n"
10236 "\t\tconst char *device,\n"
10237 "\t\tconst char *mountpoint);\n"
10242 #: ../src/guestfs-actions.pod:3463 ../fish/guestfish-actions.pod:2672
10244 "Mount a guest disk at a position in the filesystem. Block devices are named "
10245 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
10246 "those block devices contain partitions, they will have the usual names (eg. "
10247 "C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
10251 #: ../src/guestfs-actions.pod:3469 ../fish/guestfish-actions.pod:2678
10253 "The rules are the same as for L<mount(2)>: A filesystem must first be "
10254 "mounted on C</> before others can be mounted. Other filesystems can only be "
10255 "mounted on directories which already exist."
10259 #: ../src/guestfs-actions.pod:3474 ../fish/guestfish-actions.pod:2683
10261 "The mounted filesystem is writable, if we have sufficient permissions on the "
10262 "underlying device."
10266 #: ../src/guestfs-actions.pod:3477
10268 "B<Important note:> When you use this call, the filesystem options C<sync> "
10269 "and C<noatime> are set implicitly. This was originally done because we "
10270 "thought it would improve reliability, but it turns out that I<-o sync> has a "
10271 "very large negative performance impact and negligible effect on "
10272 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
10273 "in any code that needs performance, and instead use C<guestfs_mount_options> "
10274 "(use an empty string for the first parameter if you don't want any options)."
10278 #: ../src/guestfs-actions.pod:3489
10279 msgid "guestfs_mount_loop"
10283 #: ../src/guestfs-actions.pod:3491
10286 " int guestfs_mount_loop (guestfs_h *g,\n"
10287 "\t\tconst char *file,\n"
10288 "\t\tconst char *mountpoint);\n"
10293 #: ../src/guestfs-actions.pod:3495 ../fish/guestfish-actions.pod:2700
10295 "This command lets you mount C<file> (a filesystem image in a file) on a "
10296 "mount point. It is entirely equivalent to the command C<mount -o loop file "
10301 #: ../src/guestfs-actions.pod:3501
10302 msgid "guestfs_mount_options"
10306 #: ../src/guestfs-actions.pod:3503
10309 " int guestfs_mount_options (guestfs_h *g,\n"
10310 "\t\tconst char *options,\n"
10311 "\t\tconst char *device,\n"
10312 "\t\tconst char *mountpoint);\n"
10317 #: ../src/guestfs-actions.pod:3508
10319 "This is the same as the C<guestfs_mount> command, but it allows you to set "
10320 "the mount options as for the L<mount(8)> I<-o> flag."
10324 #: ../src/guestfs-actions.pod:3512 ../fish/guestfish-actions.pod:2712
10326 "If the C<options> parameter is an empty string, then no options are passed "
10327 "(all options default to whatever the filesystem uses)."
10331 #: ../src/guestfs-actions.pod:3518
10332 msgid "guestfs_mount_ro"
10336 #: ../src/guestfs-actions.pod:3520
10339 " int guestfs_mount_ro (guestfs_h *g,\n"
10340 "\t\tconst char *device,\n"
10341 "\t\tconst char *mountpoint);\n"
10346 #: ../src/guestfs-actions.pod:3524
10348 "This is the same as the C<guestfs_mount> command, but it mounts the "
10349 "filesystem with the read-only (I<-o ro>) flag."
10353 #: ../src/guestfs-actions.pod:3529
10354 msgid "guestfs_mount_vfs"
10358 #: ../src/guestfs-actions.pod:3531
10361 " int guestfs_mount_vfs (guestfs_h *g,\n"
10362 "\t\tconst char *options,\n"
10363 "\t\tconst char *vfstype,\n"
10364 "\t\tconst char *device,\n"
10365 "\t\tconst char *mountpoint);\n"
10370 #: ../src/guestfs-actions.pod:3537
10372 "This is the same as the C<guestfs_mount> command, but it allows you to set "
10373 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and I<-"
10378 #: ../src/guestfs-actions.pod:3543
10379 msgid "guestfs_mountpoints"
10383 #: ../src/guestfs-actions.pod:3545
10386 " char **guestfs_mountpoints (guestfs_h *g);\n"
10391 #: ../src/guestfs-actions.pod:3547
10393 "This call is similar to C<guestfs_mounts>. That call returns a list of "
10394 "devices. This one returns a hash table (map) of device name to directory "
10395 "where the device is mounted."
10399 #: ../src/guestfs-actions.pod:3557
10400 msgid "guestfs_mounts"
10404 #: ../src/guestfs-actions.pod:3559
10407 " char **guestfs_mounts (guestfs_h *g);\n"
10412 #: ../src/guestfs-actions.pod:3561 ../fish/guestfish-actions.pod:2743
10414 "This returns the list of currently mounted filesystems. It returns the list "
10415 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
10419 #: ../src/guestfs-actions.pod:3564 ../fish/guestfish-actions.pod:2746
10420 msgid "Some internal mounts are not shown."
10424 #: ../src/guestfs-actions.pod:3566
10425 msgid "See also: C<guestfs_mountpoints>"
10429 #: ../src/guestfs-actions.pod:3572
10434 #: ../src/guestfs-actions.pod:3574
10437 " int guestfs_mv (guestfs_h *g,\n"
10438 "\t\tconst char *src,\n"
10439 "\t\tconst char *dest);\n"
10444 #: ../src/guestfs-actions.pod:3578 ../fish/guestfish-actions.pod:2754
10446 "This moves a file from C<src> to C<dest> where C<dest> is either a "
10447 "destination filename or destination directory."
10451 #: ../src/guestfs-actions.pod:3583
10452 msgid "guestfs_ntfs_3g_probe"
10456 #: ../src/guestfs-actions.pod:3585
10459 " int guestfs_ntfs_3g_probe (guestfs_h *g,\n"
10461 "\t\tconst char *device);\n"
10466 #: ../src/guestfs-actions.pod:3589 ../fish/guestfish-actions.pod:2761
10468 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
10469 "C<device> for mountability. (Not all NTFS volumes can be mounted read-"
10470 "write, and some cannot be mounted at all)."
10474 #: ../src/guestfs-actions.pod:3593 ../fish/guestfish-actions.pod:2765
10476 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
10477 "can be mounted read-write. Set it to false if you want to test if the "
10478 "volume can be mounted read-only."
10482 #: ../src/guestfs-actions.pod:3597 ../fish/guestfish-actions.pod:2769
10484 "The return value is an integer which C<0> if the operation would succeed, or "
10485 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
10489 #: ../src/guestfs-actions.pod:3603
10490 msgid "guestfs_ntfsresize"
10494 #: ../src/guestfs-actions.pod:3605
10497 " int guestfs_ntfsresize (guestfs_h *g,\n"
10498 "\t\tconst char *device);\n"
10503 #: ../src/guestfs-actions.pod:3608 ../fish/guestfish-actions.pod:2777
10505 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
10506 "size of the underlying device. See also L<ntfsresize(8)>."
10510 #: ../src/guestfs-actions.pod:3614
10511 msgid "guestfs_ntfsresize_size"
10515 #: ../src/guestfs-actions.pod:3616
10518 " int guestfs_ntfsresize_size (guestfs_h *g,\n"
10519 "\t\tconst char *device,\n"
10520 "\t\tint64_t size);\n"
10525 #: ../src/guestfs-actions.pod:3620
10527 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
10528 "to specify the new size (in bytes) explicitly."
10532 #: ../src/guestfs-actions.pod:3625
10533 msgid "guestfs_part_add"
10537 #: ../src/guestfs-actions.pod:3627
10540 " int guestfs_part_add (guestfs_h *g,\n"
10541 "\t\tconst char *device,\n"
10542 "\t\tconst char *prlogex,\n"
10543 "\t\tint64_t startsect,\n"
10544 "\t\tint64_t endsect);\n"
10549 #: ../src/guestfs-actions.pod:3633
10551 "This command adds a partition to C<device>. If there is no partition table "
10552 "on the device, call C<guestfs_part_init> first."
10556 #: ../src/guestfs-actions.pod:3636 ../fish/guestfish-actions.pod:2795
10558 "The C<prlogex> parameter is the type of partition. Normally you should pass "
10559 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
10560 "C<logical>) and C<e> (or C<extended>) partition types."
10564 #: ../src/guestfs-actions.pod:3641 ../fish/guestfish-actions.pod:2800
10566 "C<startsect> and C<endsect> are the start and end of the partition in "
10567 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
10568 "from the end of the disk (C<-1> is the last sector)."
10572 #: ../src/guestfs-actions.pod:3645
10574 "Creating a partition which covers the whole disk is not so easy. Use "
10575 "C<guestfs_part_disk> to do that."
10579 #: ../src/guestfs-actions.pod:3650
10580 msgid "guestfs_part_del"
10584 #: ../src/guestfs-actions.pod:3652
10587 " int guestfs_part_del (guestfs_h *g,\n"
10588 "\t\tconst char *device,\n"
10589 "\t\tint partnum);\n"
10594 #: ../src/guestfs-actions.pod:3656 ../fish/guestfish-actions.pod:2811
10595 msgid "This command deletes the partition numbered C<partnum> on C<device>."
10599 #: ../src/guestfs-actions.pod:3658 ../fish/guestfish-actions.pod:2813
10601 "Note that in the case of MBR partitioning, deleting an extended partition "
10602 "also deletes any logical partitions it contains."
10606 #: ../src/guestfs-actions.pod:3664
10607 msgid "guestfs_part_disk"
10611 #: ../src/guestfs-actions.pod:3666
10614 " int guestfs_part_disk (guestfs_h *g,\n"
10615 "\t\tconst char *device,\n"
10616 "\t\tconst char *parttype);\n"
10621 #: ../src/guestfs-actions.pod:3670
10623 "This command is simply a combination of C<guestfs_part_init> followed by "
10624 "C<guestfs_part_add> to create a single primary partition covering the whole "
10629 #: ../src/guestfs-actions.pod:3674
10631 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
10632 "possible values are described in C<guestfs_part_init>."
10636 #: ../src/guestfs-actions.pod:3682
10637 msgid "guestfs_part_get_bootable"
10641 #: ../src/guestfs-actions.pod:3684
10644 " int guestfs_part_get_bootable (guestfs_h *g,\n"
10645 "\t\tconst char *device,\n"
10646 "\t\tint partnum);\n"
10651 #: ../src/guestfs-actions.pod:3688 ../fish/guestfish-actions.pod:2835
10653 "This command returns true if the partition C<partnum> on C<device> has the "
10654 "bootable flag set."
10658 #: ../src/guestfs-actions.pod:3691
10659 msgid "See also C<guestfs_part_set_bootable>."
10663 #: ../src/guestfs-actions.pod:3695
10664 msgid "guestfs_part_get_mbr_id"
10668 #: ../src/guestfs-actions.pod:3697
10671 " int guestfs_part_get_mbr_id (guestfs_h *g,\n"
10672 "\t\tconst char *device,\n"
10673 "\t\tint partnum);\n"
10678 #: ../src/guestfs-actions.pod:3701 ../fish/guestfish-actions.pod:2844
10680 "Returns the MBR type byte (also known as the ID byte) from the numbered "
10681 "partition C<partnum>."
10685 #: ../src/guestfs-actions.pod:3704 ../src/guestfs-actions.pod:3866
10687 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
10688 "undefined results for other partition table types (see "
10689 "C<guestfs_part_get_parttype>)."
10693 #: ../src/guestfs-actions.pod:3710
10694 msgid "guestfs_part_get_parttype"
10698 #: ../src/guestfs-actions.pod:3712
10701 " char *guestfs_part_get_parttype (guestfs_h *g,\n"
10702 "\t\tconst char *device);\n"
10707 #: ../src/guestfs-actions.pod:3715 ../fish/guestfish-actions.pod:2855
10709 "This command examines the partition table on C<device> and returns the "
10710 "partition table type (format) being used."
10714 #: ../src/guestfs-actions.pod:3718
10716 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
10717 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
10718 "possible, although unusual. See C<guestfs_part_init> for a full list."
10722 #: ../src/guestfs-actions.pod:3726
10723 msgid "guestfs_part_init"
10727 #: ../src/guestfs-actions.pod:3728
10730 " int guestfs_part_init (guestfs_h *g,\n"
10731 "\t\tconst char *device,\n"
10732 "\t\tconst char *parttype);\n"
10737 #: ../src/guestfs-actions.pod:3732 ../fish/guestfish-actions.pod:2867
10739 "This creates an empty partition table on C<device> of one of the partition "
10740 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
10741 "(for large disks)."
10745 #: ../src/guestfs-actions.pod:3736
10747 "Initially there are no partitions. Following this, you should call "
10748 "C<guestfs_part_add> for each partition required."
10752 #: ../src/guestfs-actions.pod:3739 ../fish/guestfish-actions.pod:2874
10753 msgid "Possible values for C<parttype> are:"
10757 #: ../src/guestfs-actions.pod:3743 ../fish/guestfish-actions.pod:2878
10758 msgid "B<efi> | B<gpt>"
10762 #: ../src/guestfs-actions.pod:3745 ../fish/guestfish-actions.pod:2880
10763 msgid "Intel EFI / GPT partition table."
10767 #: ../src/guestfs-actions.pod:3747 ../fish/guestfish-actions.pod:2882
10769 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
10770 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
10771 "the C<mbr> format."
10775 #: ../src/guestfs-actions.pod:3751 ../fish/guestfish-actions.pod:2886
10776 msgid "B<mbr> | B<msdos>"
10780 #: ../src/guestfs-actions.pod:3753 ../fish/guestfish-actions.pod:2888
10782 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
10783 "Windows. This partition type will B<only> work for device sizes up to 2 "
10784 "TB. For large disks we recommend using C<gpt>."
10788 #: ../src/guestfs-actions.pod:3760 ../fish/guestfish-actions.pod:2895
10790 "Other partition table types that may work but are not supported include:"
10794 #: ../src/guestfs-actions.pod:3765 ../fish/guestfish-actions.pod:2900
10799 #: ../src/guestfs-actions.pod:3767 ../fish/guestfish-actions.pod:2902
10800 msgid "AIX disk labels."
10804 #: ../src/guestfs-actions.pod:3769 ../fish/guestfish-actions.pod:2904
10805 msgid "B<amiga> | B<rdb>"
10809 #: ../src/guestfs-actions.pod:3771 ../fish/guestfish-actions.pod:2906
10810 msgid "Amiga \"Rigid Disk Block\" format."
10814 #: ../src/guestfs-actions.pod:3773 ../fish/guestfish-actions.pod:2908
10819 #: ../src/guestfs-actions.pod:3775 ../fish/guestfish-actions.pod:2910
10820 msgid "BSD disk labels."
10824 #: ../src/guestfs-actions.pod:3777 ../fish/guestfish-actions.pod:2912
10829 #: ../src/guestfs-actions.pod:3779 ../fish/guestfish-actions.pod:2914
10830 msgid "DASD, used on IBM mainframes."
10834 #: ../src/guestfs-actions.pod:3781 ../fish/guestfish-actions.pod:2916
10839 #: ../src/guestfs-actions.pod:3783 ../fish/guestfish-actions.pod:2918
10840 msgid "MIPS/SGI volumes."
10844 #: ../src/guestfs-actions.pod:3785 ../fish/guestfish-actions.pod:2920
10849 #: ../src/guestfs-actions.pod:3787 ../fish/guestfish-actions.pod:2922
10850 msgid "Old Mac partition format. Modern Macs use C<gpt>."
10854 #: ../src/guestfs-actions.pod:3789 ../fish/guestfish-actions.pod:2924
10859 #: ../src/guestfs-actions.pod:3791 ../fish/guestfish-actions.pod:2926
10860 msgid "NEC PC-98 format, common in Japan apparently."
10864 #: ../src/guestfs-actions.pod:3793 ../fish/guestfish-actions.pod:2928
10869 #: ../src/guestfs-actions.pod:3795 ../fish/guestfish-actions.pod:2930
10870 msgid "Sun disk labels."
10874 #: ../src/guestfs-actions.pod:3801
10875 msgid "guestfs_part_list"
10879 #: ../src/guestfs-actions.pod:3803
10882 " struct guestfs_partition_list *guestfs_part_list (guestfs_h *g,\n"
10883 "\t\tconst char *device);\n"
10888 #: ../src/guestfs-actions.pod:3806 ../fish/guestfish-actions.pod:2938
10890 "This command parses the partition table on C<device> and returns the list of "
10891 "partitions found."
10895 #: ../src/guestfs-actions.pod:3809 ../fish/guestfish-actions.pod:2941
10896 msgid "The fields in the returned structure are:"
10900 #: ../src/guestfs-actions.pod:3813 ../fish/guestfish-actions.pod:2945
10901 msgid "B<part_num>"
10905 #: ../src/guestfs-actions.pod:3815 ../fish/guestfish-actions.pod:2947
10906 msgid "Partition number, counting from 1."
10910 #: ../src/guestfs-actions.pod:3817 ../fish/guestfish-actions.pod:2949
10911 msgid "B<part_start>"
10915 #: ../src/guestfs-actions.pod:3819
10917 "Start of the partition I<in bytes>. To get sectors you have to divide by "
10918 "the device's sector size, see C<guestfs_blockdev_getss>."
10922 #: ../src/guestfs-actions.pod:3822 ../fish/guestfish-actions.pod:2954
10923 msgid "B<part_end>"
10927 #: ../src/guestfs-actions.pod:3824 ../fish/guestfish-actions.pod:2956
10928 msgid "End of the partition in bytes."
10932 #: ../src/guestfs-actions.pod:3826 ../fish/guestfish-actions.pod:2958
10933 msgid "B<part_size>"
10937 #: ../src/guestfs-actions.pod:3828 ../fish/guestfish-actions.pod:2960
10938 msgid "Size of the partition in bytes."
10942 #: ../src/guestfs-actions.pod:3832
10944 "This function returns a C<struct guestfs_partition_list *> (see E<lt>guestfs-"
10945 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
10946 "C<guestfs_free_partition_list> after use>."
10950 #: ../src/guestfs-actions.pod:3837
10951 msgid "guestfs_part_set_bootable"
10955 #: ../src/guestfs-actions.pod:3839
10958 " int guestfs_part_set_bootable (guestfs_h *g,\n"
10959 "\t\tconst char *device,\n"
10960 "\t\tint partnum,\n"
10961 "\t\tint bootable);\n"
10966 #: ../src/guestfs-actions.pod:3844 ../fish/guestfish-actions.pod:2968
10968 "This sets the bootable flag on partition numbered C<partnum> on device "
10969 "C<device>. Note that partitions are numbered from 1."
10973 #: ../src/guestfs-actions.pod:3847 ../fish/guestfish-actions.pod:2971
10975 "The bootable flag is used by some operating systems (notably Windows) to "
10976 "determine which partition to boot from. It is by no means universally "
10981 #: ../src/guestfs-actions.pod:3853
10982 msgid "guestfs_part_set_mbr_id"
10986 #: ../src/guestfs-actions.pod:3855
10989 " int guestfs_part_set_mbr_id (guestfs_h *g,\n"
10990 "\t\tconst char *device,\n"
10991 "\t\tint partnum,\n"
10992 "\t\tint idbyte);\n"
10997 #: ../src/guestfs-actions.pod:3860 ../fish/guestfish-actions.pod:2979
10999 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
11000 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
11001 "documentation are in fact hexadecimal numbers, but usually documented "
11002 "without any leading \"0x\" which might be confusing."
11006 #: ../src/guestfs-actions.pod:3872
11007 msgid "guestfs_part_set_name"
11011 #: ../src/guestfs-actions.pod:3874
11014 " int guestfs_part_set_name (guestfs_h *g,\n"
11015 "\t\tconst char *device,\n"
11016 "\t\tint partnum,\n"
11017 "\t\tconst char *name);\n"
11022 #: ../src/guestfs-actions.pod:3879 ../fish/guestfish-actions.pod:2993
11024 "This sets the partition name on partition numbered C<partnum> on device "
11025 "C<device>. Note that partitions are numbered from 1."
11029 #: ../src/guestfs-actions.pod:3882 ../fish/guestfish-actions.pod:2996
11031 "The partition name can only be set on certain types of partition table. "
11032 "This works on C<gpt> but not on C<mbr> partitions."
11036 #: ../src/guestfs-actions.pod:3887
11037 msgid "guestfs_part_to_dev"
11041 #: ../src/guestfs-actions.pod:3889
11044 " char *guestfs_part_to_dev (guestfs_h *g,\n"
11045 "\t\tconst char *partition);\n"
11050 #: ../src/guestfs-actions.pod:3892 ../fish/guestfish-actions.pod:3003
11052 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
11053 "partition number, returning the device name (eg. \"/dev/sdb\")."
11057 #: ../src/guestfs-actions.pod:3896
11059 "The named partition must exist, for example as a string returned from "
11060 "C<guestfs_list_partitions>."
11064 #: ../src/guestfs-actions.pod:3902
11065 msgid "guestfs_ping_daemon"
11069 #: ../src/guestfs-actions.pod:3904
11072 " int guestfs_ping_daemon (guestfs_h *g);\n"
11077 #: ../src/guestfs-actions.pod:3906 ../fish/guestfish-actions.pod:3014
11079 "This is a test probe into the guestfs daemon running inside the qemu "
11080 "subprocess. Calling this function checks that the daemon responds to the "
11081 "ping message, without affecting the daemon or attached block device(s) in "
11086 #: ../src/guestfs-actions.pod:3913
11087 msgid "guestfs_pread"
11091 #: ../src/guestfs-actions.pod:3915
11094 " char *guestfs_pread (guestfs_h *g,\n"
11095 "\t\tconst char *path,\n"
11097 "\t\tint64_t offset,\n"
11098 "\t\tsize_t *size_r);\n"
11103 #: ../src/guestfs-actions.pod:3921 ../fish/guestfish-actions.pod:3023
11105 "This command lets you read part of a file. It reads C<count> bytes of the "
11106 "file, starting at C<offset>, from file C<path>."
11110 #: ../src/guestfs-actions.pod:3924 ../src/guestfs-actions.pod:3947
11111 #: ../fish/guestfish-actions.pod:3026 ../fish/guestfish-actions.pod:3041
11113 "This may read fewer bytes than requested. For further details see the "
11114 "L<pread(2)> system call."
11118 #: ../src/guestfs-actions.pod:3927
11119 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
11123 #: ../src/guestfs-actions.pod:3936
11124 msgid "guestfs_pread_device"
11128 #: ../src/guestfs-actions.pod:3938
11131 " char *guestfs_pread_device (guestfs_h *g,\n"
11132 "\t\tconst char *device,\n"
11134 "\t\tint64_t offset,\n"
11135 "\t\tsize_t *size_r);\n"
11140 #: ../src/guestfs-actions.pod:3944 ../fish/guestfish-actions.pod:3038
11142 "This command lets you read part of a file. It reads C<count> bytes of "
11143 "C<device>, starting at C<offset>."
11147 #: ../src/guestfs-actions.pod:3950
11148 msgid "See also C<guestfs_pread>."
11152 #: ../src/guestfs-actions.pod:3959
11153 msgid "guestfs_pvcreate"
11157 #: ../src/guestfs-actions.pod:3961
11160 " int guestfs_pvcreate (guestfs_h *g,\n"
11161 "\t\tconst char *device);\n"
11166 #: ../src/guestfs-actions.pod:3964 ../fish/guestfish-actions.pod:3053
11168 "This creates an LVM physical volume on the named C<device>, where C<device> "
11169 "should usually be a partition name such as C</dev/sda1>."
11173 #: ../src/guestfs-actions.pod:3970
11174 msgid "guestfs_pvremove"
11178 #: ../src/guestfs-actions.pod:3972
11181 " int guestfs_pvremove (guestfs_h *g,\n"
11182 "\t\tconst char *device);\n"
11187 #: ../src/guestfs-actions.pod:3975 ../fish/guestfish-actions.pod:3061
11189 "This wipes a physical volume C<device> so that LVM will no longer recognise "
11194 #: ../src/guestfs-actions.pod:3978 ../fish/guestfish-actions.pod:3064
11196 "The implementation uses the C<pvremove> command which refuses to wipe "
11197 "physical volumes that contain any volume groups, so you have to remove those "
11202 #: ../src/guestfs-actions.pod:3984
11203 msgid "guestfs_pvresize"
11207 #: ../src/guestfs-actions.pod:3986
11210 " int guestfs_pvresize (guestfs_h *g,\n"
11211 "\t\tconst char *device);\n"
11216 #: ../src/guestfs-actions.pod:3989 ../fish/guestfish-actions.pod:3072
11218 "This resizes (expands or shrinks) an existing LVM physical volume to match "
11219 "the new size of the underlying device."
11223 #: ../src/guestfs-actions.pod:3994
11224 msgid "guestfs_pvresize_size"
11228 #: ../src/guestfs-actions.pod:3996
11231 " int guestfs_pvresize_size (guestfs_h *g,\n"
11232 "\t\tconst char *device,\n"
11233 "\t\tint64_t size);\n"
11238 #: ../src/guestfs-actions.pod:4000
11240 "This command is the same as C<guestfs_pvresize> except that it allows you to "
11241 "specify the new size (in bytes) explicitly."
11245 #: ../src/guestfs-actions.pod:4005
11246 msgid "guestfs_pvs"
11250 #: ../src/guestfs-actions.pod:4007
11253 " char **guestfs_pvs (guestfs_h *g);\n"
11258 #: ../src/guestfs-actions.pod:4009 ../fish/guestfish-actions.pod:3086
11260 "List all the physical volumes detected. This is the equivalent of the L<pvs"
11265 #: ../src/guestfs-actions.pod:4012 ../fish/guestfish-actions.pod:3089
11267 "This returns a list of just the device names that contain PVs (eg. C</dev/"
11272 #: ../src/guestfs-actions.pod:4015
11273 msgid "See also C<guestfs_pvs_full>."
11277 #: ../src/guestfs-actions.pod:4021
11278 msgid "guestfs_pvs_full"
11282 #: ../src/guestfs-actions.pod:4023
11285 " struct guestfs_lvm_pv_list *guestfs_pvs_full (guestfs_h *g);\n"
11290 #: ../src/guestfs-actions.pod:4025 ../fish/guestfish-actions.pod:3098
11292 "List all the physical volumes detected. This is the equivalent of the L<pvs"
11293 "(8)> command. The \"full\" version includes all fields."
11297 #: ../src/guestfs-actions.pod:4028
11299 "This function returns a C<struct guestfs_lvm_pv_list *> (see E<lt>guestfs-"
11300 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
11301 "C<guestfs_free_lvm_pv_list> after use>."
11305 #: ../src/guestfs-actions.pod:4033
11306 msgid "guestfs_pvuuid"
11310 #: ../src/guestfs-actions.pod:4035
11313 " char *guestfs_pvuuid (guestfs_h *g,\n"
11314 "\t\tconst char *device);\n"
11319 #: ../src/guestfs-actions.pod:4038 ../fish/guestfish-actions.pod:3105
11320 msgid "This command returns the UUID of the LVM PV C<device>."
11324 #: ../src/guestfs-actions.pod:4043
11325 msgid "guestfs_pwrite"
11329 #: ../src/guestfs-actions.pod:4045
11332 " int guestfs_pwrite (guestfs_h *g,\n"
11333 "\t\tconst char *path,\n"
11334 "\t\tconst char *content,\n"
11335 "\t\tsize_t content_size,\n"
11336 "\t\tint64_t offset);\n"
11341 #: ../src/guestfs-actions.pod:4051 ../fish/guestfish-actions.pod:3111
11343 "This command writes to part of a file. It writes the data buffer C<content> "
11344 "to the file C<path> starting at offset C<offset>."
11348 #: ../src/guestfs-actions.pod:4054 ../fish/guestfish-actions.pod:3114
11350 "This command implements the L<pwrite(2)> system call, and like that system "
11351 "call it may not write the full data requested. The return value is the "
11352 "number of bytes that were actually written to the file. This could even be "
11353 "0, although short writes are unlikely for regular files in ordinary "
11358 #: ../src/guestfs-actions.pod:4060
11359 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
11363 #: ../src/guestfs-actions.pod:4067
11364 msgid "guestfs_pwrite_device"
11368 #: ../src/guestfs-actions.pod:4069
11371 " int guestfs_pwrite_device (guestfs_h *g,\n"
11372 "\t\tconst char *device,\n"
11373 "\t\tconst char *content,\n"
11374 "\t\tsize_t content_size,\n"
11375 "\t\tint64_t offset);\n"
11380 #: ../src/guestfs-actions.pod:4075 ../fish/guestfish-actions.pod:3129
11382 "This command writes to part of a device. It writes the data buffer "
11383 "C<content> to C<device> starting at offset C<offset>."
11387 #: ../src/guestfs-actions.pod:4078 ../fish/guestfish-actions.pod:3132
11389 "This command implements the L<pwrite(2)> system call, and like that system "
11390 "call it may not write the full data requested (although short writes to disk "
11391 "devices and partitions are probably impossible with standard Linux kernels)."
11395 #: ../src/guestfs-actions.pod:4083
11396 msgid "See also C<guestfs_pwrite>."
11400 #: ../src/guestfs-actions.pod:4090
11401 msgid "guestfs_read_file"
11405 #: ../src/guestfs-actions.pod:4092
11408 " char *guestfs_read_file (guestfs_h *g,\n"
11409 "\t\tconst char *path,\n"
11410 "\t\tsize_t *size_r);\n"
11415 #: ../src/guestfs-actions.pod:4096 ../fish/guestfish-actions.pod:3146
11416 msgid "This calls returns the contents of the file C<path> as a buffer."
11420 #: ../src/guestfs-actions.pod:4099
11422 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
11423 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
11424 "function is limited in the total size of file that can be handled."
11428 #: ../src/guestfs-actions.pod:4111
11429 msgid "guestfs_read_lines"
11433 #: ../src/guestfs-actions.pod:4113
11436 " char **guestfs_read_lines (guestfs_h *g,\n"
11437 "\t\tconst char *path);\n"
11442 #: ../src/guestfs-actions.pod:4118 ../fish/guestfish-actions.pod:3163
11444 "The file contents are returned as a list of lines. Trailing C<LF> and "
11445 "C<CRLF> character sequences are I<not> returned."
11449 #: ../src/guestfs-actions.pod:4121
11451 "Note that this function cannot correctly handle binary files (specifically, "
11452 "files containing C<\\0> character which is treated as end of line). For "
11453 "those you need to use the C<guestfs_read_file> function which has a more "
11454 "complex interface."
11458 #: ../src/guestfs-actions.pod:4130
11459 msgid "guestfs_readdir"
11463 #: ../src/guestfs-actions.pod:4132
11466 " struct guestfs_dirent_list *guestfs_readdir (guestfs_h *g,\n"
11467 "\t\tconst char *dir);\n"
11472 #: ../src/guestfs-actions.pod:4135 ../fish/guestfish-actions.pod:3175
11473 msgid "This returns the list of directory entries in directory C<dir>."
11477 #: ../src/guestfs-actions.pod:4137 ../fish/guestfish-actions.pod:3177
11479 "All entries in the directory are returned, including C<.> and C<..>. The "
11480 "entries are I<not> sorted, but returned in the same order as the underlying "
11485 #: ../src/guestfs-actions.pod:4141 ../fish/guestfish-actions.pod:3181
11487 "Also this call returns basic file type information about each file. The "
11488 "C<ftyp> field will contain one of the following characters:"
11492 #: ../src/guestfs-actions.pod:4146 ../fish/guestfish-actions.pod:3186
11497 #: ../src/guestfs-actions.pod:4148 ../fish/guestfish-actions.pod:3188
11498 msgid "Block special"
11502 #: ../src/guestfs-actions.pod:4150 ../fish/guestfish-actions.pod:3190
11507 #: ../src/guestfs-actions.pod:4152 ../fish/guestfish-actions.pod:3192
11508 msgid "Char special"
11512 #: ../src/guestfs-actions.pod:4154 ../fish/guestfish-actions.pod:3194
11517 #: ../src/guestfs-actions.pod:4156 ../fish/guestfish-actions.pod:3196
11522 #: ../src/guestfs-actions.pod:4158 ../fish/guestfish-actions.pod:3198
11527 #: ../src/guestfs-actions.pod:4160 ../fish/guestfish-actions.pod:3200
11528 msgid "FIFO (named pipe)"
11532 #: ../src/guestfs-actions.pod:4162 ../fish/guestfish-actions.pod:3202
11537 #: ../src/guestfs-actions.pod:4164 ../fish/guestfish-actions.pod:3204
11538 msgid "Symbolic link"
11542 #: ../src/guestfs-actions.pod:4166 ../fish/guestfish-actions.pod:3206
11547 #: ../src/guestfs-actions.pod:4168 ../fish/guestfish-actions.pod:3208
11548 msgid "Regular file"
11552 #: ../src/guestfs-actions.pod:4170 ../fish/guestfish-actions.pod:3210
11557 #: ../src/guestfs-actions.pod:4172 ../fish/guestfish-actions.pod:3212
11562 #: ../src/guestfs-actions.pod:4174 ../fish/guestfish-actions.pod:3214
11567 #: ../src/guestfs-actions.pod:4176 ../fish/guestfish-actions.pod:3216
11568 msgid "Unknown file type"
11572 #: ../src/guestfs-actions.pod:4178 ../fish/guestfish-actions.pod:3218
11577 #: ../src/guestfs-actions.pod:4180 ../fish/guestfish-actions.pod:3220
11579 "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
11583 #: ../src/guestfs-actions.pod:4185
11585 "This function is primarily intended for use by programs. To get a simple "
11586 "list of names, use C<guestfs_ls>. To get a printable directory for human "
11587 "consumption, use C<guestfs_ll>."
11591 #: ../src/guestfs-actions.pod:4189
11593 "This function returns a C<struct guestfs_dirent_list *> (see E<lt>guestfs-"
11594 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
11595 "C<guestfs_free_dirent_list> after use>."
11599 #: ../src/guestfs-actions.pod:4194
11600 msgid "guestfs_readlink"
11604 #: ../src/guestfs-actions.pod:4196
11607 " char *guestfs_readlink (guestfs_h *g,\n"
11608 "\t\tconst char *path);\n"
11613 #: ../src/guestfs-actions.pod:4199 ../fish/guestfish-actions.pod:3233
11614 msgid "This command reads the target of a symbolic link."
11618 #: ../src/guestfs-actions.pod:4204
11619 msgid "guestfs_readlinklist"
11623 #: ../src/guestfs-actions.pod:4206
11626 " char **guestfs_readlinklist (guestfs_h *g,\n"
11627 "\t\tconst char *path,\n"
11628 "\t\tchar *const *names);\n"
11633 #: ../src/guestfs-actions.pod:4210 ../fish/guestfish-actions.pod:3239
11635 "This call allows you to do a C<readlink> operation on multiple files, where "
11636 "all files are in the directory C<path>. C<names> is the list of files from "
11641 #: ../src/guestfs-actions.pod:4214 ../fish/guestfish-actions.pod:3243
11643 "On return you get a list of strings, with a one-to-one correspondence to the "
11644 "C<names> list. Each string is the value of the symbolic link."
11648 #: ../src/guestfs-actions.pod:4218 ../fish/guestfish-actions.pod:3247
11650 "If the C<readlink(2)> operation fails on any name, then the corresponding "
11651 "result string is the empty string C<\"\">. However the whole operation is "
11652 "completed even if there were C<readlink(2)> errors, and so you can call this "
11653 "function with names where you don't know if they are symbolic links already "
11654 "(albeit slightly less efficient)."
11658 #: ../src/guestfs-actions.pod:4225 ../fish/guestfish-actions.pod:3254
11660 "This call is intended for programs that want to efficiently list a directory "
11661 "contents without making many round-trips. Very long directory listings "
11662 "might cause the protocol message size to be exceeded, causing this call to "
11663 "fail. The caller must split up such requests into smaller groups of names."
11667 #: ../src/guestfs-actions.pod:4236
11668 msgid "guestfs_realpath"
11672 #: ../src/guestfs-actions.pod:4238
11675 " char *guestfs_realpath (guestfs_h *g,\n"
11676 "\t\tconst char *path);\n"
11681 #: ../src/guestfs-actions.pod:4241 ../fish/guestfish-actions.pod:3265
11683 "Return the canonicalized absolute pathname of C<path>. The returned path "
11684 "has no C<.>, C<..> or symbolic link path elements."
11688 #: ../src/guestfs-actions.pod:4247
11689 msgid "guestfs_removexattr"
11693 #: ../src/guestfs-actions.pod:4249
11696 " int guestfs_removexattr (guestfs_h *g,\n"
11697 "\t\tconst char *xattr,\n"
11698 "\t\tconst char *path);\n"
11703 #: ../src/guestfs-actions.pod:4253 ../fish/guestfish-actions.pod:3272
11705 "This call removes the extended attribute named C<xattr> of the file C<path>."
11709 #: ../src/guestfs-actions.pod:4256
11710 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
11714 #: ../src/guestfs-actions.pod:4260
11715 msgid "guestfs_resize2fs"
11719 #: ../src/guestfs-actions.pod:4262
11722 " int guestfs_resize2fs (guestfs_h *g,\n"
11723 "\t\tconst char *device);\n"
11728 #: ../src/guestfs-actions.pod:4265 ../fish/guestfish-actions.pod:3281
11730 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
11731 "underlying device."
11735 #: ../src/guestfs-actions.pod:4268
11737 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
11738 "C<device> before calling this command. For unknown reasons C<resize2fs> "
11739 "sometimes gives an error about this and sometimes not. In any case, it is "
11740 "always safe to call C<guestfs_e2fsck_f> before calling this function."
11744 #: ../src/guestfs-actions.pod:4276
11745 msgid "guestfs_resize2fs_size"
11749 #: ../src/guestfs-actions.pod:4278
11752 " int guestfs_resize2fs_size (guestfs_h *g,\n"
11753 "\t\tconst char *device,\n"
11754 "\t\tint64_t size);\n"
11759 #: ../src/guestfs-actions.pod:4282
11761 "This command is the same as C<guestfs_resize2fs> except that it allows you "
11762 "to specify the new size (in bytes) explicitly."
11766 #: ../src/guestfs-actions.pod:4287
11771 #: ../src/guestfs-actions.pod:4289
11774 " int guestfs_rm (guestfs_h *g,\n"
11775 "\t\tconst char *path);\n"
11780 #: ../src/guestfs-actions.pod:4292 ../fish/guestfish-actions.pod:3301
11781 msgid "Remove the single file C<path>."
11785 #: ../src/guestfs-actions.pod:4296
11786 msgid "guestfs_rm_rf"
11790 #: ../src/guestfs-actions.pod:4298
11793 " int guestfs_rm_rf (guestfs_h *g,\n"
11794 "\t\tconst char *path);\n"
11799 #: ../src/guestfs-actions.pod:4301 ../fish/guestfish-actions.pod:3307
11801 "Remove the file or directory C<path>, recursively removing the contents if "
11802 "its a directory. This is like the C<rm -rf> shell command."
11806 #: ../src/guestfs-actions.pod:4307
11807 msgid "guestfs_rmdir"
11811 #: ../src/guestfs-actions.pod:4309
11814 " int guestfs_rmdir (guestfs_h *g,\n"
11815 "\t\tconst char *path);\n"
11820 #: ../src/guestfs-actions.pod:4312 ../fish/guestfish-actions.pod:3315
11821 msgid "Remove the single directory C<path>."
11825 #: ../src/guestfs-actions.pod:4316
11826 msgid "guestfs_rmmountpoint"
11830 #: ../src/guestfs-actions.pod:4318
11833 " int guestfs_rmmountpoint (guestfs_h *g,\n"
11834 "\t\tconst char *exemptpath);\n"
11839 #: ../src/guestfs-actions.pod:4321
11841 "This calls removes a mountpoint that was previously created with "
11842 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
11846 #: ../src/guestfs-actions.pod:4327
11847 msgid "guestfs_scrub_device"
11851 #: ../src/guestfs-actions.pod:4329
11854 " int guestfs_scrub_device (guestfs_h *g,\n"
11855 "\t\tconst char *device);\n"
11860 #: ../src/guestfs-actions.pod:4332 ../fish/guestfish-actions.pod:3329
11862 "This command writes patterns over C<device> to make data retrieval more "
11867 #: ../src/guestfs-actions.pod:4335 ../src/guestfs-actions.pod:4353
11868 #: ../src/guestfs-actions.pod:4369 ../fish/guestfish-actions.pod:3332
11869 #: ../fish/guestfish-actions.pod:3347 ../fish/guestfish-actions.pod:3360
11871 "It is an interface to the L<scrub(1)> program. See that manual page for "
11876 #: ../src/guestfs-actions.pod:4343
11877 msgid "guestfs_scrub_file"
11881 #: ../src/guestfs-actions.pod:4345
11884 " int guestfs_scrub_file (guestfs_h *g,\n"
11885 "\t\tconst char *file);\n"
11890 #: ../src/guestfs-actions.pod:4348 ../fish/guestfish-actions.pod:3342
11892 "This command writes patterns over a file to make data retrieval more "
11897 #: ../src/guestfs-actions.pod:4351 ../fish/guestfish-actions.pod:3345
11898 msgid "The file is I<removed> after scrubbing."
11902 #: ../src/guestfs-actions.pod:4358
11903 msgid "guestfs_scrub_freespace"
11907 #: ../src/guestfs-actions.pod:4360
11910 " int guestfs_scrub_freespace (guestfs_h *g,\n"
11911 "\t\tconst char *dir);\n"
11916 #: ../src/guestfs-actions.pod:4363
11918 "This command creates the directory C<dir> and then fills it with files until "
11919 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
11920 "and deletes them. The intention is to scrub any free space on the partition "
11921 "containing C<dir>."
11925 #: ../src/guestfs-actions.pod:4374
11926 msgid "guestfs_set_append"
11930 #: ../src/guestfs-actions.pod:4376
11933 " int guestfs_set_append (guestfs_h *g,\n"
11934 "\t\tconst char *append);\n"
11939 #: ../src/guestfs-actions.pod:4379 ../fish/guestfish-actions.pod:3369
11941 "This function is used to add additional options to the guest kernel command "
11946 #: ../src/guestfs-actions.pod:4382 ../fish/guestfish-actions.pod:3372
11948 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
11949 "environment variable."
11953 #: ../src/guestfs-actions.pod:4385 ../fish/guestfish-actions.pod:3375
11955 "Setting C<append> to C<NULL> means I<no> additional options are passed "
11956 "(libguestfs always adds a few of its own)."
11960 #: ../src/guestfs-actions.pod:4390
11961 msgid "guestfs_set_autosync"
11965 #: ../src/guestfs-actions.pod:4392
11968 " int guestfs_set_autosync (guestfs_h *g,\n"
11969 "\t\tint autosync);\n"
11974 #: ../src/guestfs-actions.pod:4395
11976 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
11977 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
11978 "the handle is closed (also if the program exits without closing handles)."
11982 #: ../src/guestfs-actions.pod:4400 ../fish/guestfish-actions.pod:3389
11984 "This is enabled by default (since libguestfs 1.5.24, previously it was "
11985 "disabled by default)."
11989 #: ../src/guestfs-actions.pod:4405
11990 msgid "guestfs_set_direct"
11994 #: ../src/guestfs-actions.pod:4407
11997 " int guestfs_set_direct (guestfs_h *g,\n"
11998 "\t\tint direct);\n"
12003 #: ../src/guestfs-actions.pod:4410 ../fish/guestfish-actions.pod:3398
12005 "If the direct appliance mode flag is enabled, then stdin and stdout are "
12006 "passed directly through to the appliance once it is launched."
12010 #: ../src/guestfs-actions.pod:4414
12012 "One consequence of this is that log messages aren't caught by the library "
12013 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
12018 #: ../src/guestfs-actions.pod:4418 ../fish/guestfish-actions.pod:3406
12019 msgid "You probably don't want to use this unless you know what you are doing."
12023 #: ../src/guestfs-actions.pod:4421 ../fish/guestfish-actions.pod:3409
12024 msgid "The default is disabled."
12028 #: ../src/guestfs-actions.pod:4425
12029 msgid "guestfs_set_e2label"
12033 #: ../src/guestfs-actions.pod:4427
12036 " int guestfs_set_e2label (guestfs_h *g,\n"
12037 "\t\tconst char *device,\n"
12038 "\t\tconst char *label);\n"
12043 #: ../src/guestfs-actions.pod:4431 ../fish/guestfish-actions.pod:3415
12045 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
12046 "C<label>. Filesystem labels are limited to 16 characters."
12050 #: ../src/guestfs-actions.pod:4435
12052 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
12053 "the existing label on a filesystem."
12057 #: ../src/guestfs-actions.pod:4440
12058 msgid "guestfs_set_e2uuid"
12062 #: ../src/guestfs-actions.pod:4442
12065 " int guestfs_set_e2uuid (guestfs_h *g,\n"
12066 "\t\tconst char *device,\n"
12067 "\t\tconst char *uuid);\n"
12072 #: ../src/guestfs-actions.pod:4446 ../fish/guestfish-actions.pod:3426
12074 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
12075 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
12076 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
12080 #: ../src/guestfs-actions.pod:4451
12082 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
12083 "the existing UUID of a filesystem."
12087 #: ../src/guestfs-actions.pod:4456
12088 msgid "guestfs_set_memsize"
12092 #: ../src/guestfs-actions.pod:4458
12095 " int guestfs_set_memsize (guestfs_h *g,\n"
12096 "\t\tint memsize);\n"
12101 #: ../src/guestfs-actions.pod:4461
12103 "This sets the memory size in megabytes allocated to the qemu subprocess. "
12104 "This only has any effect if called before C<guestfs_launch>."
12108 #: ../src/guestfs-actions.pod:4465 ../fish/guestfish-actions.pod:3444
12110 "You can also change this by setting the environment variable "
12111 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
12115 #: ../src/guestfs-actions.pod:4474
12116 msgid "guestfs_set_network"
12120 #: ../src/guestfs-actions.pod:4476
12123 " int guestfs_set_network (guestfs_h *g,\n"
12124 "\t\tint network);\n"
12129 #: ../src/guestfs-actions.pod:4479 ../fish/guestfish-actions.pod:3457
12131 "If C<network> is true, then the network is enabled in the libguestfs "
12132 "appliance. The default is false."
12136 #: ../src/guestfs-actions.pod:4482 ../fish/guestfish-actions.pod:3460
12138 "This affects whether commands are able to access the network (see L<guestfs"
12139 "(3)/RUNNING COMMANDS>)."
12143 #: ../src/guestfs-actions.pod:4485
12145 "You must call this before calling C<guestfs_launch>, otherwise it has no "
12150 #: ../src/guestfs-actions.pod:4490
12151 msgid "guestfs_set_path"
12155 #: ../src/guestfs-actions.pod:4492
12158 " int guestfs_set_path (guestfs_h *g,\n"
12159 "\t\tconst char *searchpath);\n"
12164 #: ../src/guestfs-actions.pod:4495 ../fish/guestfish-actions.pod:3472
12165 msgid "Set the path that libguestfs searches for kernel and initrd.img."
12169 #: ../src/guestfs-actions.pod:4497 ../fish/guestfish-actions.pod:3474
12171 "The default is C<$libdir/guestfs> unless overridden by setting "
12172 "C<LIBGUESTFS_PATH> environment variable."
12176 #: ../src/guestfs-actions.pod:4500 ../fish/guestfish-actions.pod:3477
12177 msgid "Setting C<path> to C<NULL> restores the default path."
12181 #: ../src/guestfs-actions.pod:4504
12182 msgid "guestfs_set_qemu"
12186 #: ../src/guestfs-actions.pod:4506
12189 " int guestfs_set_qemu (guestfs_h *g,\n"
12190 "\t\tconst char *qemu);\n"
12195 #: ../src/guestfs-actions.pod:4509 ../fish/guestfish-actions.pod:3485
12196 msgid "Set the qemu binary that we will use."
12200 #: ../src/guestfs-actions.pod:4511 ../fish/guestfish-actions.pod:3487
12202 "The default is chosen when the library was compiled by the configure script."
12206 #: ../src/guestfs-actions.pod:4514 ../fish/guestfish-actions.pod:3490
12208 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
12213 #: ../src/guestfs-actions.pod:4517 ../fish/guestfish-actions.pod:3493
12214 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
12218 #: ../src/guestfs-actions.pod:4519 ../fish/guestfish-actions.pod:3495
12220 "Note that you should call this function as early as possible after creating "
12221 "the handle. This is because some pre-launch operations depend on testing "
12222 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
12223 "don't retest features, and so you might see inconsistent results. Using the "
12224 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
12225 "the qemu binary at the same time as the handle is created."
12229 #: ../src/guestfs-actions.pod:4529
12230 msgid "guestfs_set_recovery_proc"
12234 #: ../src/guestfs-actions.pod:4531
12237 " int guestfs_set_recovery_proc (guestfs_h *g,\n"
12238 "\t\tint recoveryproc);\n"
12243 #: ../src/guestfs-actions.pod:4534
12245 "If this is called with the parameter C<false> then C<guestfs_launch> does "
12246 "not create a recovery process. The purpose of the recovery process is to "
12247 "stop runaway qemu processes in the case where the main program aborts "
12252 #: ../src/guestfs-actions.pod:4539
12254 "This only has any effect if called before C<guestfs_launch>, and the default "
12259 #: ../src/guestfs-actions.pod:4542 ../fish/guestfish-actions.pod:3517
12261 "About the only time when you would want to disable this is if the main "
12262 "process will fork itself into the background (\"daemonize\" itself). In "
12263 "this case the recovery process thinks that the main program has disappeared "
12264 "and so kills qemu, which is not very helpful."
12268 #: ../src/guestfs-actions.pod:4550
12269 msgid "guestfs_set_selinux"
12273 #: ../src/guestfs-actions.pod:4552
12276 " int guestfs_set_selinux (guestfs_h *g,\n"
12277 "\t\tint selinux);\n"
12282 #: ../src/guestfs-actions.pod:4555 ../fish/guestfish-actions.pod:3529
12284 "This sets the selinux flag that is passed to the appliance at boot time. "
12285 "The default is C<selinux=0> (disabled)."
12289 #: ../src/guestfs-actions.pod:4558 ../fish/guestfish-actions.pod:3532
12291 "Note that if SELinux is enabled, it is always in Permissive mode "
12292 "(C<enforcing=0>)."
12296 #: ../src/guestfs-actions.pod:4566
12297 msgid "guestfs_set_trace"
12301 #: ../src/guestfs-actions.pod:4568
12304 " int guestfs_set_trace (guestfs_h *g,\n"
12305 "\t\tint trace);\n"
12310 #: ../src/guestfs-actions.pod:4571 ../fish/guestfish-actions.pod:3544
12312 "If the command trace flag is set to 1, then commands are printed on stderr "
12313 "before they are executed in a format which is very similar to the one used "
12314 "by guestfish. In other words, you can run a program with this enabled, and "
12315 "you will get out a script which you can feed to guestfish to perform the "
12316 "same set of actions."
12320 #: ../src/guestfs-actions.pod:4578 ../fish/guestfish-actions.pod:3551
12322 "If you want to trace C API calls into libguestfs (and other libraries) then "
12323 "possibly a better way is to use the external ltrace(1) command."
12327 #: ../src/guestfs-actions.pod:4582 ../fish/guestfish-actions.pod:3555
12329 "Command traces are disabled unless the environment variable "
12330 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
12334 #: ../src/guestfs-actions.pod:4587
12335 msgid "guestfs_set_verbose"
12339 #: ../src/guestfs-actions.pod:4589
12342 " int guestfs_set_verbose (guestfs_h *g,\n"
12343 "\t\tint verbose);\n"
12348 #: ../src/guestfs-actions.pod:4592 ../fish/guestfish-actions.pod:3564
12349 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
12353 #: ../src/guestfs-actions.pod:4594 ../fish/guestfish-actions.pod:3566
12355 "Verbose messages are disabled unless the environment variable "
12356 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
12360 #: ../src/guestfs-actions.pod:4599
12361 msgid "guestfs_setcon"
12365 #: ../src/guestfs-actions.pod:4601
12368 " int guestfs_setcon (guestfs_h *g,\n"
12369 "\t\tconst char *context);\n"
12374 #: ../src/guestfs-actions.pod:4604 ../fish/guestfish-actions.pod:3573
12376 "This sets the SELinux security context of the daemon to the string "
12381 #: ../src/guestfs-actions.pod:4607 ../fish/guestfish-actions.pod:3576
12382 msgid "See the documentation about SELINUX in L<guestfs(3)>."
12386 #: ../src/guestfs-actions.pod:4611
12387 msgid "guestfs_setxattr"
12391 #: ../src/guestfs-actions.pod:4613
12394 " int guestfs_setxattr (guestfs_h *g,\n"
12395 "\t\tconst char *xattr,\n"
12396 "\t\tconst char *val,\n"
12397 "\t\tint vallen,\n"
12398 "\t\tconst char *path);\n"
12403 #: ../src/guestfs-actions.pod:4619 ../fish/guestfish-actions.pod:3582
12405 "This call sets the extended attribute named C<xattr> of the file C<path> to "
12406 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
12410 #: ../src/guestfs-actions.pod:4623
12411 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
12415 #: ../src/guestfs-actions.pod:4627
12416 msgid "guestfs_sfdisk"
12420 #: ../src/guestfs-actions.pod:4629
12423 " int guestfs_sfdisk (guestfs_h *g,\n"
12424 "\t\tconst char *device,\n"
12427 "\t\tint sectors,\n"
12428 "\t\tchar *const *lines);\n"
12433 #: ../src/guestfs-actions.pod:4636 ../fish/guestfish-actions.pod:3592
12435 "This is a direct interface to the L<sfdisk(8)> program for creating "
12436 "partitions on block devices."
12440 #: ../src/guestfs-actions.pod:4639 ../fish/guestfish-actions.pod:3595
12441 msgid "C<device> should be a block device, for example C</dev/sda>."
12445 #: ../src/guestfs-actions.pod:4641 ../fish/guestfish-actions.pod:3597
12447 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
12448 "sectors on the device, which are passed directly to sfdisk as the I<-C>, I<-"
12449 "H> and I<-S> parameters. If you pass C<0> for any of these, then the "
12450 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
12451 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
12452 "the kernel) cannot work out the right geometry and you will need to tell it."
12456 #: ../src/guestfs-actions.pod:4649 ../fish/guestfish-actions.pod:3605
12458 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
12459 "refer to the L<sfdisk(8)> manpage."
12463 #: ../src/guestfs-actions.pod:4652 ../fish/guestfish-actions.pod:3608
12465 "To create a single partition occupying the whole disk, you would pass "
12466 "C<lines> as a single element list, when the single element being the string "
12471 #: ../src/guestfs-actions.pod:4656
12473 "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
12477 #: ../src/guestfs-actions.pod:4664
12478 msgid "guestfs_sfdiskM"
12482 #: ../src/guestfs-actions.pod:4666
12485 " int guestfs_sfdiskM (guestfs_h *g,\n"
12486 "\t\tconst char *device,\n"
12487 "\t\tchar *const *lines);\n"
12492 #: ../src/guestfs-actions.pod:4670
12494 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
12495 "partition sizes are specified in megabytes only (rounded to the nearest "
12496 "cylinder) and you don't need to specify the cyls, heads and sectors "
12497 "parameters which were rarely if ever used anyway."
12501 #: ../src/guestfs-actions.pod:4676
12503 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
12504 "C<guestfs_part_disk>"
12508 #: ../src/guestfs-actions.pod:4684
12509 msgid "guestfs_sfdisk_N"
12513 #: ../src/guestfs-actions.pod:4686
12516 " int guestfs_sfdisk_N (guestfs_h *g,\n"
12517 "\t\tconst char *device,\n"
12518 "\t\tint partnum,\n"
12521 "\t\tint sectors,\n"
12522 "\t\tconst char *line);\n"
12527 #: ../src/guestfs-actions.pod:4694 ../fish/guestfish-actions.pod:3638
12529 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
12530 "(note: C<n> counts from 1)."
12534 #: ../src/guestfs-actions.pod:4697
12536 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
12537 "for the cyls/heads/sectors parameters."
12541 #: ../src/guestfs-actions.pod:4700
12542 msgid "See also: C<guestfs_part_add>"
12546 #: ../src/guestfs-actions.pod:4707
12547 msgid "guestfs_sfdisk_disk_geometry"
12551 #: ../src/guestfs-actions.pod:4709
12554 " char *guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
12555 "\t\tconst char *device);\n"
12560 #: ../src/guestfs-actions.pod:4712
12562 "This displays the disk geometry of C<device> read from the partition table. "
12563 "Especially in the case where the underlying block device has been resized, "
12564 "this can be different from the kernel's idea of the geometry (see "
12565 "C<guestfs_sfdisk_kernel_geometry>)."
12569 #: ../src/guestfs-actions.pod:4717 ../src/guestfs-actions.pod:4730
12570 #: ../fish/guestfish-actions.pod:3658 ../fish/guestfish-actions.pod:3667
12571 msgid "The result is in human-readable format, and not designed to be parsed."
12575 #: ../src/guestfs-actions.pod:4723
12576 msgid "guestfs_sfdisk_kernel_geometry"
12580 #: ../src/guestfs-actions.pod:4725
12583 " char *guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
12584 "\t\tconst char *device);\n"
12589 #: ../src/guestfs-actions.pod:4728 ../fish/guestfish-actions.pod:3665
12590 msgid "This displays the kernel's idea of the geometry of C<device>."
12594 #: ../src/guestfs-actions.pod:4736
12595 msgid "guestfs_sfdisk_l"
12599 #: ../src/guestfs-actions.pod:4738
12602 " char *guestfs_sfdisk_l (guestfs_h *g,\n"
12603 "\t\tconst char *device);\n"
12608 #: ../src/guestfs-actions.pod:4741 ../fish/guestfish-actions.pod:3674
12610 "This displays the partition table on C<device>, in the human-readable output "
12611 "of the L<sfdisk(8)> command. It is not intended to be parsed."
12615 #: ../src/guestfs-actions.pod:4745
12616 msgid "See also: C<guestfs_part_list>"
12620 #: ../src/guestfs-actions.pod:4750
12625 #: ../src/guestfs-actions.pod:4752
12628 " char *guestfs_sh (guestfs_h *g,\n"
12629 "\t\tconst char *command);\n"
12634 #: ../src/guestfs-actions.pod:4755 ../fish/guestfish-actions.pod:3684
12636 "This call runs a command from the guest filesystem via the guest's C</bin/"
12641 #: ../src/guestfs-actions.pod:4758
12642 msgid "This is like C<guestfs_command>, but passes the command to:"
12646 #: ../src/guestfs-actions.pod:4760 ../fish/guestfish-actions.pod:3689
12649 " /bin/sh -c \"command\"\n"
12654 #: ../src/guestfs-actions.pod:4762 ../fish/guestfish-actions.pod:3691
12656 "Depending on the guest's shell, this usually results in wildcards being "
12657 "expanded, shell expressions being interpolated and so on."
12661 #: ../src/guestfs-actions.pod:4766
12662 msgid "All the provisos about C<guestfs_command> apply to this call."
12666 #: ../src/guestfs-actions.pod:4771
12667 msgid "guestfs_sh_lines"
12671 #: ../src/guestfs-actions.pod:4773
12674 " char **guestfs_sh_lines (guestfs_h *g,\n"
12675 "\t\tconst char *command);\n"
12680 #: ../src/guestfs-actions.pod:4776
12682 "This is the same as C<guestfs_sh>, but splits the result into a list of "
12687 #: ../src/guestfs-actions.pod:4779
12688 msgid "See also: C<guestfs_command_lines>"
12692 #: ../src/guestfs-actions.pod:4785
12693 msgid "guestfs_sleep"
12697 #: ../src/guestfs-actions.pod:4787
12700 " int guestfs_sleep (guestfs_h *g,\n"
12706 #: ../src/guestfs-actions.pod:4790 ../fish/guestfish-actions.pod:3710
12707 msgid "Sleep for C<secs> seconds."
12711 #: ../src/guestfs-actions.pod:4794 ../src/guestfs-structs.pod:109
12712 msgid "guestfs_stat"
12716 #: ../src/guestfs-actions.pod:4796
12719 " struct guestfs_stat *guestfs_stat (guestfs_h *g,\n"
12720 "\t\tconst char *path);\n"
12725 #: ../src/guestfs-actions.pod:4801 ../fish/guestfish-actions.pod:3718
12726 msgid "This is the same as the C<stat(2)> system call."
12730 #: ../src/guestfs-actions.pod:4807 ../src/guestfs-structs.pod:135
12731 msgid "guestfs_statvfs"
12735 #: ../src/guestfs-actions.pod:4809
12738 " struct guestfs_statvfs *guestfs_statvfs (guestfs_h *g,\n"
12739 "\t\tconst char *path);\n"
12744 #: ../src/guestfs-actions.pod:4812 ../fish/guestfish-actions.pod:3724
12746 "Returns file system statistics for any mounted file system. C<path> should "
12747 "be a file or directory in the mounted file system (typically it is the mount "
12748 "point itself, but it doesn't need to be)."
12752 #: ../src/guestfs-actions.pod:4816 ../fish/guestfish-actions.pod:3728
12753 msgid "This is the same as the C<statvfs(2)> system call."
12757 #: ../src/guestfs-actions.pod:4818
12759 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
12760 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
12764 #: ../src/guestfs-actions.pod:4822
12765 msgid "guestfs_strings"
12769 #: ../src/guestfs-actions.pod:4824
12772 " char **guestfs_strings (guestfs_h *g,\n"
12773 "\t\tconst char *path);\n"
12778 #: ../src/guestfs-actions.pod:4827 ../fish/guestfish-actions.pod:3734
12780 "This runs the L<strings(1)> command on a file and returns the list of "
12781 "printable strings found."
12785 #: ../src/guestfs-actions.pod:4837
12786 msgid "guestfs_strings_e"
12790 #: ../src/guestfs-actions.pod:4839
12793 " char **guestfs_strings_e (guestfs_h *g,\n"
12794 "\t\tconst char *encoding,\n"
12795 "\t\tconst char *path);\n"
12800 #: ../src/guestfs-actions.pod:4843
12802 "This is like the C<guestfs_strings> command, but allows you to specify the "
12803 "encoding of strings that are looked for in the source file C<path>."
12807 #: ../src/guestfs-actions.pod:4847 ../fish/guestfish-actions.pod:3748
12808 msgid "Allowed encodings are:"
12812 #: ../src/guestfs-actions.pod:4851 ../fish/guestfish-actions.pod:3752
12817 #: ../src/guestfs-actions.pod:4853
12819 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
12820 "ISO-8859-X (this is what C<guestfs_strings> uses)."
12824 #: ../src/guestfs-actions.pod:4856 ../fish/guestfish-actions.pod:3757
12829 #: ../src/guestfs-actions.pod:4858 ../fish/guestfish-actions.pod:3759
12830 msgid "Single 8-bit-byte characters."
12834 #: ../src/guestfs-actions.pod:4860 ../fish/guestfish-actions.pod:3761
12839 #: ../src/guestfs-actions.pod:4862 ../fish/guestfish-actions.pod:3763
12840 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
12844 #: ../src/guestfs-actions.pod:4865 ../fish/guestfish-actions.pod:3766
12845 msgid "l (lower case letter L)"
12849 #: ../src/guestfs-actions.pod:4867 ../fish/guestfish-actions.pod:3768
12851 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
12852 "examining binaries in Windows guests."
12856 #: ../src/guestfs-actions.pod:4870 ../fish/guestfish-actions.pod:3771
12861 #: ../src/guestfs-actions.pod:4872 ../fish/guestfish-actions.pod:3773
12862 msgid "32-bit big endian such as UCS-4BE."
12866 #: ../src/guestfs-actions.pod:4874 ../fish/guestfish-actions.pod:3775
12871 #: ../src/guestfs-actions.pod:4876 ../fish/guestfish-actions.pod:3777
12872 msgid "32-bit little endian such as UCS-4LE."
12876 #: ../src/guestfs-actions.pod:4880 ../fish/guestfish-actions.pod:3781
12877 msgid "The returned strings are transcoded to UTF-8."
12881 #: ../src/guestfs-actions.pod:4889
12882 msgid "guestfs_swapoff_device"
12886 #: ../src/guestfs-actions.pod:4891
12889 " int guestfs_swapoff_device (guestfs_h *g,\n"
12890 "\t\tconst char *device);\n"
12895 #: ../src/guestfs-actions.pod:4894
12897 "This command disables the libguestfs appliance swap device or partition "
12898 "named C<device>. See C<guestfs_swapon_device>."
12902 #: ../src/guestfs-actions.pod:4900
12903 msgid "guestfs_swapoff_file"
12907 #: ../src/guestfs-actions.pod:4902
12910 " int guestfs_swapoff_file (guestfs_h *g,\n"
12911 "\t\tconst char *file);\n"
12916 #: ../src/guestfs-actions.pod:4905 ../fish/guestfish-actions.pod:3798
12917 msgid "This command disables the libguestfs appliance swap on file."
12921 #: ../src/guestfs-actions.pod:4909
12922 msgid "guestfs_swapoff_label"
12926 #: ../src/guestfs-actions.pod:4911
12929 " int guestfs_swapoff_label (guestfs_h *g,\n"
12930 "\t\tconst char *label);\n"
12935 #: ../src/guestfs-actions.pod:4914 ../fish/guestfish-actions.pod:3804
12937 "This command disables the libguestfs appliance swap on labeled swap "
12942 #: ../src/guestfs-actions.pod:4919
12943 msgid "guestfs_swapoff_uuid"
12947 #: ../src/guestfs-actions.pod:4921
12950 " int guestfs_swapoff_uuid (guestfs_h *g,\n"
12951 "\t\tconst char *uuid);\n"
12956 #: ../src/guestfs-actions.pod:4924 ../fish/guestfish-actions.pod:3811
12958 "This command disables the libguestfs appliance swap partition with the given "
12963 #: ../src/guestfs-actions.pod:4929
12964 msgid "guestfs_swapon_device"
12968 #: ../src/guestfs-actions.pod:4931
12971 " int guestfs_swapon_device (guestfs_h *g,\n"
12972 "\t\tconst char *device);\n"
12977 #: ../src/guestfs-actions.pod:4934
12979 "This command enables the libguestfs appliance to use the swap device or "
12980 "partition named C<device>. The increased memory is made available for all "
12981 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
12985 #: ../src/guestfs-actions.pod:4939 ../fish/guestfish-actions.pod:3823
12987 "Note that you should not swap to existing guest swap partitions unless you "
12988 "know what you are doing. They may contain hibernation information, or other "
12989 "information that the guest doesn't want you to trash. You also risk leaking "
12990 "information about the host to the guest this way. Instead, attach a new "
12991 "host device to the guest and swap on that."
12995 #: ../src/guestfs-actions.pod:4948
12996 msgid "guestfs_swapon_file"
13000 #: ../src/guestfs-actions.pod:4950
13003 " int guestfs_swapon_file (guestfs_h *g,\n"
13004 "\t\tconst char *file);\n"
13009 #: ../src/guestfs-actions.pod:4953
13011 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
13016 #: ../src/guestfs-actions.pod:4958
13017 msgid "guestfs_swapon_label"
13021 #: ../src/guestfs-actions.pod:4960
13024 " int guestfs_swapon_label (guestfs_h *g,\n"
13025 "\t\tconst char *label);\n"
13030 #: ../src/guestfs-actions.pod:4963
13032 "This command enables swap to a labeled swap partition. See "
13033 "C<guestfs_swapon_device> for other notes."
13037 #: ../src/guestfs-actions.pod:4968
13038 msgid "guestfs_swapon_uuid"
13042 #: ../src/guestfs-actions.pod:4970
13045 " int guestfs_swapon_uuid (guestfs_h *g,\n"
13046 "\t\tconst char *uuid);\n"
13051 #: ../src/guestfs-actions.pod:4973
13053 "This command enables swap to a swap partition with the given UUID. See "
13054 "C<guestfs_swapon_device> for other notes."
13058 #: ../src/guestfs-actions.pod:4978
13059 msgid "guestfs_sync"
13063 #: ../src/guestfs-actions.pod:4980
13066 " int guestfs_sync (guestfs_h *g);\n"
13071 #: ../src/guestfs-actions.pod:4982 ../fish/guestfish-actions.pod:3855
13073 "This syncs the disk, so that any writes are flushed through to the "
13074 "underlying disk image."
13078 #: ../src/guestfs-actions.pod:4985 ../fish/guestfish-actions.pod:3858
13080 "You should always call this if you have modified a disk image, before "
13081 "closing the handle."
13085 #: ../src/guestfs-actions.pod:4990
13086 msgid "guestfs_tail"
13090 #: ../src/guestfs-actions.pod:4992
13093 " char **guestfs_tail (guestfs_h *g,\n"
13094 "\t\tconst char *path);\n"
13099 #: ../src/guestfs-actions.pod:4995 ../fish/guestfish-actions.pod:3865
13101 "This command returns up to the last 10 lines of a file as a list of strings."
13105 #: ../src/guestfs-actions.pod:5005
13106 msgid "guestfs_tail_n"
13110 #: ../src/guestfs-actions.pod:5007
13113 " char **guestfs_tail_n (guestfs_h *g,\n"
13114 "\t\tint nrlines,\n"
13115 "\t\tconst char *path);\n"
13120 #: ../src/guestfs-actions.pod:5011 ../fish/guestfish-actions.pod:3875
13122 "If the parameter C<nrlines> is a positive number, this returns the last "
13123 "C<nrlines> lines of the file C<path>."
13127 #: ../src/guestfs-actions.pod:5014 ../fish/guestfish-actions.pod:3878
13129 "If the parameter C<nrlines> is a negative number, this returns lines from "
13130 "the file C<path>, starting with the C<-nrlines>th line."
13134 #: ../src/guestfs-actions.pod:5026
13135 msgid "guestfs_tar_in"
13139 #: ../src/guestfs-actions.pod:5028
13142 " int guestfs_tar_in (guestfs_h *g,\n"
13143 "\t\tconst char *tarfile,\n"
13144 "\t\tconst char *directory);\n"
13149 #: ../src/guestfs-actions.pod:5032 ../fish/guestfish-actions.pod:3890
13151 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
13152 "tar file) into C<directory>."
13156 #: ../src/guestfs-actions.pod:5035
13158 "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
13162 #: ../src/guestfs-actions.pod:5040
13163 msgid "guestfs_tar_out"
13167 #: ../src/guestfs-actions.pod:5042
13170 " int guestfs_tar_out (guestfs_h *g,\n"
13171 "\t\tconst char *directory,\n"
13172 "\t\tconst char *tarfile);\n"
13177 #: ../src/guestfs-actions.pod:5046 ../fish/guestfish-actions.pod:3902
13179 "This command packs the contents of C<directory> and downloads it to local "
13184 #: ../src/guestfs-actions.pod:5049
13186 "To download a compressed tarball, use C<guestfs_tgz_out> or "
13187 "C<guestfs_txz_out>."
13191 #: ../src/guestfs-actions.pod:5054
13192 msgid "guestfs_tgz_in"
13196 #: ../src/guestfs-actions.pod:5056
13199 " int guestfs_tgz_in (guestfs_h *g,\n"
13200 "\t\tconst char *tarball,\n"
13201 "\t\tconst char *directory);\n"
13206 #: ../src/guestfs-actions.pod:5060 ../fish/guestfish-actions.pod:3914
13208 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
13209 "tar file) into C<directory>."
13213 #: ../src/guestfs-actions.pod:5063
13214 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
13218 #: ../src/guestfs-actions.pod:5067
13219 msgid "guestfs_tgz_out"
13223 #: ../src/guestfs-actions.pod:5069
13226 " int guestfs_tgz_out (guestfs_h *g,\n"
13227 "\t\tconst char *directory,\n"
13228 "\t\tconst char *tarball);\n"
13233 #: ../src/guestfs-actions.pod:5073 ../fish/guestfish-actions.pod:3925
13235 "This command packs the contents of C<directory> and downloads it to local "
13240 #: ../src/guestfs-actions.pod:5076
13241 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
13245 #: ../src/guestfs-actions.pod:5080
13246 msgid "guestfs_touch"
13250 #: ../src/guestfs-actions.pod:5082
13253 " int guestfs_touch (guestfs_h *g,\n"
13254 "\t\tconst char *path);\n"
13259 #: ../src/guestfs-actions.pod:5085 ../fish/guestfish-actions.pod:3936
13261 "Touch acts like the L<touch(1)> command. It can be used to update the "
13262 "timestamps on a file, or, if the file does not exist, to create a new zero-"
13267 #: ../src/guestfs-actions.pod:5089 ../fish/guestfish-actions.pod:3940
13269 "This command only works on regular files, and will fail on other file types "
13270 "such as directories, symbolic links, block special etc."
13274 #: ../src/guestfs-actions.pod:5094
13275 msgid "guestfs_truncate"
13279 #: ../src/guestfs-actions.pod:5096
13282 " int guestfs_truncate (guestfs_h *g,\n"
13283 "\t\tconst char *path);\n"
13288 #: ../src/guestfs-actions.pod:5099 ../fish/guestfish-actions.pod:3947
13290 "This command truncates C<path> to a zero-length file. The file must exist "
13295 #: ../src/guestfs-actions.pod:5104
13296 msgid "guestfs_truncate_size"
13300 #: ../src/guestfs-actions.pod:5106
13303 " int guestfs_truncate_size (guestfs_h *g,\n"
13304 "\t\tconst char *path,\n"
13305 "\t\tint64_t size);\n"
13310 #: ../src/guestfs-actions.pod:5110 ../fish/guestfish-actions.pod:3954
13312 "This command truncates C<path> to size C<size> bytes. The file must exist "
13317 #: ../src/guestfs-actions.pod:5113
13319 "If the current file size is less than C<size> then the file is extended to "
13320 "the required size with zero bytes. This creates a sparse file (ie. disk "
13321 "blocks are not allocated for the file until you write to it). To create a "
13322 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
13326 #: ../src/guestfs-actions.pod:5121
13327 msgid "guestfs_tune2fs_l"
13331 #: ../src/guestfs-actions.pod:5123
13334 " char **guestfs_tune2fs_l (guestfs_h *g,\n"
13335 "\t\tconst char *device);\n"
13340 #: ../src/guestfs-actions.pod:5126 ../fish/guestfish-actions.pod:3967
13342 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
13347 #: ../src/guestfs-actions.pod:5129 ../fish/guestfish-actions.pod:3970
13349 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
13350 "for more details. The list of fields returned isn't clearly defined, and "
13351 "depends on both the version of C<tune2fs> that libguestfs was built against, "
13352 "and the filesystem itself."
13356 #: ../src/guestfs-actions.pod:5140
13357 msgid "guestfs_txz_in"
13361 #: ../src/guestfs-actions.pod:5142
13364 " int guestfs_txz_in (guestfs_h *g,\n"
13365 "\t\tconst char *tarball,\n"
13366 "\t\tconst char *directory);\n"
13371 #: ../src/guestfs-actions.pod:5146 ../fish/guestfish-actions.pod:3979
13373 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
13374 "tar file) into C<directory>."
13378 #: ../src/guestfs-actions.pod:5151
13379 msgid "guestfs_txz_out"
13383 #: ../src/guestfs-actions.pod:5153
13386 " int guestfs_txz_out (guestfs_h *g,\n"
13387 "\t\tconst char *directory,\n"
13388 "\t\tconst char *tarball);\n"
13393 #: ../src/guestfs-actions.pod:5157 ../fish/guestfish-actions.pod:3988
13395 "This command packs the contents of C<directory> and downloads it to local "
13396 "file C<tarball> (as an xz compressed tar archive)."
13400 #: ../src/guestfs-actions.pod:5162
13401 msgid "guestfs_umask"
13405 #: ../src/guestfs-actions.pod:5164
13408 " int guestfs_umask (guestfs_h *g,\n"
13414 #: ../src/guestfs-actions.pod:5167 ../fish/guestfish-actions.pod:3997
13416 "This function sets the mask used for creating new files and device nodes to "
13421 #: ../src/guestfs-actions.pod:5170 ../fish/guestfish-actions.pod:4000
13423 "Typical umask values would be C<022> which creates new files with "
13424 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
13425 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
13429 #: ../src/guestfs-actions.pod:5175 ../fish/guestfish-actions.pod:4005
13431 "The default umask is C<022>. This is important because it means that "
13432 "directories and device nodes will be created with C<0644> or C<0755> mode "
13433 "even if you specify C<0777>."
13437 #: ../src/guestfs-actions.pod:5179
13439 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
13440 "C<guestfs_mkdir>."
13444 #: ../src/guestfs-actions.pod:5182 ../fish/guestfish-actions.pod:4012
13445 msgid "This call returns the previous umask."
13449 #: ../src/guestfs-actions.pod:5186
13450 msgid "guestfs_umount"
13454 #: ../src/guestfs-actions.pod:5188
13457 " int guestfs_umount (guestfs_h *g,\n"
13458 "\t\tconst char *pathordevice);\n"
13463 #: ../src/guestfs-actions.pod:5191 ../fish/guestfish-actions.pod:4020
13465 "This unmounts the given filesystem. The filesystem may be specified either "
13466 "by its mountpoint (path) or the device which contains the filesystem."
13470 #: ../src/guestfs-actions.pod:5197
13471 msgid "guestfs_umount_all"
13475 #: ../src/guestfs-actions.pod:5199
13478 " int guestfs_umount_all (guestfs_h *g);\n"
13483 #: ../src/guestfs-actions.pod:5201 ../fish/guestfish-actions.pod:4030
13484 msgid "This unmounts all mounted filesystems."
13488 #: ../src/guestfs-actions.pod:5203 ../fish/guestfish-actions.pod:4032
13489 msgid "Some internal mounts are not unmounted by this call."
13493 #: ../src/guestfs-actions.pod:5207
13494 msgid "guestfs_upload"
13498 #: ../src/guestfs-actions.pod:5209
13501 " int guestfs_upload (guestfs_h *g,\n"
13502 "\t\tconst char *filename,\n"
13503 "\t\tconst char *remotefilename);\n"
13508 #: ../src/guestfs-actions.pod:5213 ../src/guestfs-actions.pod:5229
13509 #: ../fish/guestfish-actions.pod:4038 ../fish/guestfish-actions.pod:4051
13510 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
13514 #: ../src/guestfs-actions.pod:5218
13515 msgid "See also C<guestfs_download>."
13519 #: ../src/guestfs-actions.pod:5222
13520 msgid "guestfs_upload_offset"
13524 #: ../src/guestfs-actions.pod:5224
13527 " int guestfs_upload_offset (guestfs_h *g,\n"
13528 "\t\tconst char *filename,\n"
13529 "\t\tconst char *remotefilename,\n"
13530 "\t\tint64_t offset);\n"
13535 #: ../src/guestfs-actions.pod:5232 ../fish/guestfish-actions.pod:4054
13537 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
13538 "The intention is to overwrite parts of existing files or devices, although "
13539 "if a non-existant file is specified then it is created with a \"hole\" "
13540 "before C<offset>. The size of the data written is implicit in the size of "
13541 "the source C<filename>."
13545 #: ../src/guestfs-actions.pod:5239
13547 "Note that there is no limit on the amount of data that can be uploaded with "
13548 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
13549 "full amount unless an error occurs."
13553 #: ../src/guestfs-actions.pod:5244
13554 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
13558 #: ../src/guestfs-actions.pod:5248
13559 msgid "guestfs_utimens"
13563 #: ../src/guestfs-actions.pod:5250
13566 " int guestfs_utimens (guestfs_h *g,\n"
13567 "\t\tconst char *path,\n"
13568 "\t\tint64_t atsecs,\n"
13569 "\t\tint64_t atnsecs,\n"
13570 "\t\tint64_t mtsecs,\n"
13571 "\t\tint64_t mtnsecs);\n"
13576 #: ../src/guestfs-actions.pod:5257 ../fish/guestfish-actions.pod:4074
13577 msgid "This command sets the timestamps of a file with nanosecond precision."
13581 #: ../src/guestfs-actions.pod:5260 ../fish/guestfish-actions.pod:4077
13583 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
13588 #: ../src/guestfs-actions.pod:5263 ../fish/guestfish-actions.pod:4080
13590 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
13591 "nanoseconds from the epoch."
13595 #: ../src/guestfs-actions.pod:5266 ../fish/guestfish-actions.pod:4083
13597 "If the C<*nsecs> field contains the special value C<-1> then the "
13598 "corresponding timestamp is set to the current time. (The C<*secs> field is "
13599 "ignored in this case)."
13603 #: ../src/guestfs-actions.pod:5270 ../fish/guestfish-actions.pod:4087
13605 "If the C<*nsecs> field contains the special value C<-2> then the "
13606 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
13611 #: ../src/guestfs-actions.pod:5276 ../src/guestfs-structs.pod:175
13612 msgid "guestfs_version"
13616 #: ../src/guestfs-actions.pod:5278
13619 " struct guestfs_version *guestfs_version (guestfs_h *g);\n"
13624 #: ../src/guestfs-actions.pod:5280 ../fish/guestfish-actions.pod:4095
13626 "Return the libguestfs version number that the program is linked against."
13630 #: ../src/guestfs-actions.pod:5283 ../fish/guestfish-actions.pod:4098
13632 "Note that because of dynamic linking this is not necessarily the version of "
13633 "libguestfs that you compiled against. You can compile the program, and then "
13634 "at runtime dynamically link against a completely different C<libguestfs.so> "
13639 #: ../src/guestfs-actions.pod:5288 ../fish/guestfish-actions.pod:4103
13641 "This call was added in version C<1.0.58>. In previous versions of "
13642 "libguestfs there was no way to get the version number. From C code you can "
13643 "use dynamic linker functions to find out if this symbol exists (if it "
13644 "doesn't, then it's an earlier version)."
13648 #: ../src/guestfs-actions.pod:5294 ../fish/guestfish-actions.pod:4109
13650 "The call returns a structure with four elements. The first three (C<major>, "
13651 "C<minor> and C<release>) are numbers and correspond to the usual version "
13652 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
13653 "but may be used for distro-specific information."
13657 #: ../src/guestfs-actions.pod:5300 ../fish/guestfish-actions.pod:4115
13659 "To construct the original version string: C<$major.$minor.$release$extra>"
13663 #: ../src/guestfs-actions.pod:5303 ../fish/guestfish-actions.pod:4118
13664 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
13668 #: ../src/guestfs-actions.pod:5305
13670 "I<Note:> Don't use this call to test for availability of features. In "
13671 "enterprise distributions we backport features from later versions into "
13672 "earlier versions, making this an unreliable way to test for features. Use "
13673 "C<guestfs_available> instead."
13677 #: ../src/guestfs-actions.pod:5311
13679 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
13680 "error. I<The caller must call C<guestfs_free_version> after use>."
13684 #: ../src/guestfs-actions.pod:5315
13685 msgid "guestfs_vfs_label"
13689 #: ../src/guestfs-actions.pod:5317
13692 " char *guestfs_vfs_label (guestfs_h *g,\n"
13693 "\t\tconst char *device);\n"
13698 #: ../src/guestfs-actions.pod:5320 ../fish/guestfish-actions.pod:4130
13699 msgid "This returns the filesystem label of the filesystem on C<device>."
13703 #: ../src/guestfs-actions.pod:5323 ../fish/guestfish-actions.pod:4133
13704 msgid "If the filesystem is unlabeled, this returns the empty string."
13708 #: ../src/guestfs-actions.pod:5325
13709 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
13713 #: ../src/guestfs-actions.pod:5330
13714 msgid "guestfs_vfs_type"
13718 #: ../src/guestfs-actions.pod:5332
13721 " char *guestfs_vfs_type (guestfs_h *g,\n"
13722 "\t\tconst char *device);\n"
13727 #: ../src/guestfs-actions.pod:5335 ../fish/guestfish-actions.pod:4141
13729 "This command gets the filesystem type corresponding to the filesystem on "
13734 #: ../src/guestfs-actions.pod:5338 ../fish/guestfish-actions.pod:4144
13736 "For most filesystems, the result is the name of the Linux VFS module which "
13737 "would be used to mount this filesystem if you mounted it without specifying "
13738 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
13742 #: ../src/guestfs-actions.pod:5346
13743 msgid "guestfs_vfs_uuid"
13747 #: ../src/guestfs-actions.pod:5348
13750 " char *guestfs_vfs_uuid (guestfs_h *g,\n"
13751 "\t\tconst char *device);\n"
13756 #: ../src/guestfs-actions.pod:5351 ../fish/guestfish-actions.pod:4153
13757 msgid "This returns the filesystem UUID of the filesystem on C<device>."
13761 #: ../src/guestfs-actions.pod:5354 ../fish/guestfish-actions.pod:4156
13762 msgid "If the filesystem does not have a UUID, this returns the empty string."
13766 #: ../src/guestfs-actions.pod:5356
13767 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
13771 #: ../src/guestfs-actions.pod:5361
13772 msgid "guestfs_vg_activate"
13776 #: ../src/guestfs-actions.pod:5363
13779 " int guestfs_vg_activate (guestfs_h *g,\n"
13780 "\t\tint activate,\n"
13781 "\t\tchar *const *volgroups);\n"
13786 #: ../src/guestfs-actions.pod:5367 ../fish/guestfish-actions.pod:4164
13788 "This command activates or (if C<activate> is false) deactivates all logical "
13789 "volumes in the listed volume groups C<volgroups>. If activated, then they "
13790 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
13791 "deactivated, then those devices disappear."
13795 #: ../src/guestfs-actions.pod:5373 ../fish/guestfish-actions.pod:4170
13796 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
13800 #: ../src/guestfs-actions.pod:5375 ../fish/guestfish-actions.pod:4172
13802 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
13803 "activated or deactivated."
13807 #: ../src/guestfs-actions.pod:5380
13808 msgid "guestfs_vg_activate_all"
13812 #: ../src/guestfs-actions.pod:5382
13815 " int guestfs_vg_activate_all (guestfs_h *g,\n"
13816 "\t\tint activate);\n"
13821 #: ../src/guestfs-actions.pod:5385 ../fish/guestfish-actions.pod:4179
13823 "This command activates or (if C<activate> is false) deactivates all logical "
13824 "volumes in all volume groups. If activated, then they are made known to the "
13825 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
13826 "those devices disappear."
13830 #: ../src/guestfs-actions.pod:5391 ../fish/guestfish-actions.pod:4185
13831 msgid "This command is the same as running C<vgchange -a y|n>"
13835 #: ../src/guestfs-actions.pod:5395
13836 msgid "guestfs_vgcreate"
13840 #: ../src/guestfs-actions.pod:5397
13843 " int guestfs_vgcreate (guestfs_h *g,\n"
13844 "\t\tconst char *volgroup,\n"
13845 "\t\tchar *const *physvols);\n"
13850 #: ../src/guestfs-actions.pod:5401 ../fish/guestfish-actions.pod:4191
13852 "This creates an LVM volume group called C<volgroup> from the non-empty list "
13853 "of physical volumes C<physvols>."
13857 #: ../src/guestfs-actions.pod:5406
13858 msgid "guestfs_vglvuuids"
13862 #: ../src/guestfs-actions.pod:5408
13865 " char **guestfs_vglvuuids (guestfs_h *g,\n"
13866 "\t\tconst char *vgname);\n"
13871 #: ../src/guestfs-actions.pod:5411 ../fish/guestfish-actions.pod:4198
13873 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
13874 "volumes created in this volume group."
13878 #: ../src/guestfs-actions.pod:5414
13880 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
13881 "associate logical volumes and volume groups."
13885 #: ../src/guestfs-actions.pod:5417
13886 msgid "See also C<guestfs_vgpvuuids>."
13890 #: ../src/guestfs-actions.pod:5423
13891 msgid "guestfs_vgpvuuids"
13895 #: ../src/guestfs-actions.pod:5425
13898 " char **guestfs_vgpvuuids (guestfs_h *g,\n"
13899 "\t\tconst char *vgname);\n"
13904 #: ../src/guestfs-actions.pod:5428 ../fish/guestfish-actions.pod:4210
13906 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
13907 "volumes that this volume group resides on."
13911 #: ../src/guestfs-actions.pod:5431
13913 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
13914 "associate physical volumes and volume groups."
13918 #: ../src/guestfs-actions.pod:5434
13919 msgid "See also C<guestfs_vglvuuids>."
13923 #: ../src/guestfs-actions.pod:5440
13924 msgid "guestfs_vgremove"
13928 #: ../src/guestfs-actions.pod:5442
13931 " int guestfs_vgremove (guestfs_h *g,\n"
13932 "\t\tconst char *vgname);\n"
13937 #: ../src/guestfs-actions.pod:5445 ../fish/guestfish-actions.pod:4222
13938 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
13942 #: ../src/guestfs-actions.pod:5447 ../fish/guestfish-actions.pod:4224
13944 "This also forcibly removes all logical volumes in the volume group (if any)."
13948 #: ../src/guestfs-actions.pod:5452
13949 msgid "guestfs_vgrename"
13953 #: ../src/guestfs-actions.pod:5454
13956 " int guestfs_vgrename (guestfs_h *g,\n"
13957 "\t\tconst char *volgroup,\n"
13958 "\t\tconst char *newvolgroup);\n"
13963 #: ../src/guestfs-actions.pod:5458 ../fish/guestfish-actions.pod:4231
13964 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
13968 #: ../src/guestfs-actions.pod:5462
13969 msgid "guestfs_vgs"
13973 #: ../src/guestfs-actions.pod:5464
13976 " char **guestfs_vgs (guestfs_h *g);\n"
13981 #: ../src/guestfs-actions.pod:5466 ../fish/guestfish-actions.pod:4237
13983 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
13988 #: ../src/guestfs-actions.pod:5469 ../fish/guestfish-actions.pod:4240
13990 "This returns a list of just the volume group names that were detected (eg. "
13995 #: ../src/guestfs-actions.pod:5472
13996 msgid "See also C<guestfs_vgs_full>."
14000 #: ../src/guestfs-actions.pod:5478
14001 msgid "guestfs_vgs_full"
14005 #: ../src/guestfs-actions.pod:5480
14008 " struct guestfs_lvm_vg_list *guestfs_vgs_full (guestfs_h *g);\n"
14013 #: ../src/guestfs-actions.pod:5482 ../fish/guestfish-actions.pod:4249
14015 "List all the volumes groups detected. This is the equivalent of the L<vgs(8)"
14016 "> command. The \"full\" version includes all fields."
14020 #: ../src/guestfs-actions.pod:5485
14022 "This function returns a C<struct guestfs_lvm_vg_list *> (see E<lt>guestfs-"
14023 "structs.hE<gt>), or NULL if there was an error. I<The caller must call "
14024 "C<guestfs_free_lvm_vg_list> after use>."
14028 #: ../src/guestfs-actions.pod:5490
14029 msgid "guestfs_vgscan"
14033 #: ../src/guestfs-actions.pod:5492
14036 " int guestfs_vgscan (guestfs_h *g);\n"
14041 #: ../src/guestfs-actions.pod:5494 ../fish/guestfish-actions.pod:4256
14043 "This rescans all block devices and rebuilds the list of LVM physical "
14044 "volumes, volume groups and logical volumes."
14048 #: ../src/guestfs-actions.pod:5499
14049 msgid "guestfs_vguuid"
14053 #: ../src/guestfs-actions.pod:5501
14056 " char *guestfs_vguuid (guestfs_h *g,\n"
14057 "\t\tconst char *vgname);\n"
14062 #: ../src/guestfs-actions.pod:5504 ../fish/guestfish-actions.pod:4263
14063 msgid "This command returns the UUID of the LVM VG named C<vgname>."
14067 #: ../src/guestfs-actions.pod:5509
14068 msgid "guestfs_wait_ready"
14072 #: ../src/guestfs-actions.pod:5511
14075 " int guestfs_wait_ready (guestfs_h *g);\n"
14080 #: ../src/guestfs-actions.pod:5513
14081 msgid "This function is a no op."
14085 #: ../src/guestfs-actions.pod:5515
14087 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
14088 "calling C<guestfs_launch> to wait for the launch to complete. However this "
14089 "is no longer necessary because C<guestfs_launch> now does the waiting."
14093 #: ../src/guestfs-actions.pod:5520
14095 "If you see any calls to this function in code then you can just remove them, "
14096 "unless you want to retain compatibility with older versions of the API."
14100 #: ../src/guestfs-actions.pod:5526
14101 msgid "guestfs_wc_c"
14105 #: ../src/guestfs-actions.pod:5528
14108 " int guestfs_wc_c (guestfs_h *g,\n"
14109 "\t\tconst char *path);\n"
14114 #: ../src/guestfs-actions.pod:5531 ../fish/guestfish-actions.pod:4269
14116 "This command counts the characters in a file, using the C<wc -c> external "
14121 #: ../src/guestfs-actions.pod:5536
14122 msgid "guestfs_wc_l"
14126 #: ../src/guestfs-actions.pod:5538
14129 " int guestfs_wc_l (guestfs_h *g,\n"
14130 "\t\tconst char *path);\n"
14135 #: ../src/guestfs-actions.pod:5541 ../fish/guestfish-actions.pod:4276
14137 "This command counts the lines in a file, using the C<wc -l> external command."
14141 #: ../src/guestfs-actions.pod:5546
14142 msgid "guestfs_wc_w"
14146 #: ../src/guestfs-actions.pod:5548
14149 " int guestfs_wc_w (guestfs_h *g,\n"
14150 "\t\tconst char *path);\n"
14155 #: ../src/guestfs-actions.pod:5551 ../fish/guestfish-actions.pod:4283
14157 "This command counts the words in a file, using the C<wc -w> external command."
14161 #: ../src/guestfs-actions.pod:5556
14162 msgid "guestfs_write"
14166 #: ../src/guestfs-actions.pod:5558
14169 " int guestfs_write (guestfs_h *g,\n"
14170 "\t\tconst char *path,\n"
14171 "\t\tconst char *content,\n"
14172 "\t\tsize_t content_size);\n"
14177 #: ../src/guestfs-actions.pod:5563 ../fish/guestfish-actions.pod:4290
14179 "This call creates a file called C<path>. The content of the file is the "
14180 "string C<content> (which can contain any 8 bit data)."
14184 #: ../src/guestfs-actions.pod:5571
14185 msgid "guestfs_write_file"
14189 #: ../src/guestfs-actions.pod:5573
14192 " int guestfs_write_file (guestfs_h *g,\n"
14193 "\t\tconst char *path,\n"
14194 "\t\tconst char *content,\n"
14200 #: ../src/guestfs-actions.pod:5578 ../fish/guestfish-actions.pod:4300
14202 "This call creates a file called C<path>. The contents of the file is the "
14203 "string C<content> (which can contain any 8 bit data), with length C<size>."
14207 #: ../src/guestfs-actions.pod:5582 ../fish/guestfish-actions.pod:4304
14209 "As a special case, if C<size> is C<0> then the length is calculated using "
14210 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
14214 #: ../src/guestfs-actions.pod:5586 ../fish/guestfish-actions.pod:4308
14216 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
14217 "I<not> work, even if the length is specified."
14221 #: ../src/guestfs-actions.pod:5594 ../fish/guestfish-actions.pod:4314
14223 "This function is deprecated. In new code, use the C<write> call instead."
14227 #: ../src/guestfs-actions.pod:5601
14228 msgid "guestfs_zegrep"
14232 #: ../src/guestfs-actions.pod:5603
14235 " char **guestfs_zegrep (guestfs_h *g,\n"
14236 "\t\tconst char *regex,\n"
14237 "\t\tconst char *path);\n"
14242 #: ../src/guestfs-actions.pod:5607 ../fish/guestfish-actions.pod:4325
14244 "This calls the external C<zegrep> program and returns the matching lines."
14248 #: ../src/guestfs-actions.pod:5617
14249 msgid "guestfs_zegrepi"
14253 #: ../src/guestfs-actions.pod:5619
14256 " char **guestfs_zegrepi (guestfs_h *g,\n"
14257 "\t\tconst char *regex,\n"
14258 "\t\tconst char *path);\n"
14263 #: ../src/guestfs-actions.pod:5623 ../fish/guestfish-actions.pod:4335
14265 "This calls the external C<zegrep -i> program and returns the matching lines."
14269 #: ../src/guestfs-actions.pod:5633
14270 msgid "guestfs_zero"
14274 #: ../src/guestfs-actions.pod:5635
14277 " int guestfs_zero (guestfs_h *g,\n"
14278 "\t\tconst char *device);\n"
14283 #: ../src/guestfs-actions.pod:5638 ../fish/guestfish-actions.pod:4345
14284 msgid "This command writes zeroes over the first few blocks of C<device>."
14288 #: ../src/guestfs-actions.pod:5640 ../fish/guestfish-actions.pod:4347
14290 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
14291 "securely wipe the device). It should be sufficient to remove any partition "
14292 "tables, filesystem superblocks and so on."
14296 #: ../src/guestfs-actions.pod:5644
14297 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
14301 #: ../src/guestfs-actions.pod:5653
14302 msgid "guestfs_zero_device"
14306 #: ../src/guestfs-actions.pod:5655
14309 " int guestfs_zero_device (guestfs_h *g,\n"
14310 "\t\tconst char *device);\n"
14315 #: ../src/guestfs-actions.pod:5658
14317 "This command writes zeroes over the entire C<device>. Compare with "
14318 "C<guestfs_zero> which just zeroes the first few blocks of a device."
14322 #: ../src/guestfs-actions.pod:5672
14323 msgid "guestfs_zerofree"
14327 #: ../src/guestfs-actions.pod:5674
14330 " int guestfs_zerofree (guestfs_h *g,\n"
14331 "\t\tconst char *device);\n"
14336 #: ../src/guestfs-actions.pod:5677 ../fish/guestfish-actions.pod:4368
14338 "This runs the I<zerofree> program on C<device>. This program claims to zero "
14339 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
14340 "possible to compress the filesystem more effectively."
14344 #: ../src/guestfs-actions.pod:5682 ../fish/guestfish-actions.pod:4373
14345 msgid "You should B<not> run this program if the filesystem is mounted."
14349 #: ../src/guestfs-actions.pod:5685 ../fish/guestfish-actions.pod:4376
14351 "It is possible that using this program can damage the filesystem or data on "
14356 #: ../src/guestfs-actions.pod:5690
14357 msgid "guestfs_zfgrep"
14361 #: ../src/guestfs-actions.pod:5692
14364 " char **guestfs_zfgrep (guestfs_h *g,\n"
14365 "\t\tconst char *pattern,\n"
14366 "\t\tconst char *path);\n"
14371 #: ../src/guestfs-actions.pod:5696 ../fish/guestfish-actions.pod:4383
14373 "This calls the external C<zfgrep> program and returns the matching lines."
14377 #: ../src/guestfs-actions.pod:5706
14378 msgid "guestfs_zfgrepi"
14382 #: ../src/guestfs-actions.pod:5708
14385 " char **guestfs_zfgrepi (guestfs_h *g,\n"
14386 "\t\tconst char *pattern,\n"
14387 "\t\tconst char *path);\n"
14392 #: ../src/guestfs-actions.pod:5712 ../fish/guestfish-actions.pod:4393
14394 "This calls the external C<zfgrep -i> program and returns the matching lines."
14398 #: ../src/guestfs-actions.pod:5722
14399 msgid "guestfs_zfile"
14403 #: ../src/guestfs-actions.pod:5724
14406 " char *guestfs_zfile (guestfs_h *g,\n"
14407 "\t\tconst char *meth,\n"
14408 "\t\tconst char *path);\n"
14413 #: ../src/guestfs-actions.pod:5728 ../fish/guestfish-actions.pod:4403
14415 "This command runs C<file> after first decompressing C<path> using C<method>."
14419 #: ../src/guestfs-actions.pod:5731 ../fish/guestfish-actions.pod:4406
14420 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
14424 #: ../src/guestfs-actions.pod:5733
14426 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
14431 #: ../src/guestfs-actions.pod:5739 ../fish/guestfish-actions.pod:4411
14433 "This function is deprecated. In new code, use the C<file> call instead."
14437 #: ../src/guestfs-actions.pod:5746
14438 msgid "guestfs_zgrep"
14442 #: ../src/guestfs-actions.pod:5748
14445 " char **guestfs_zgrep (guestfs_h *g,\n"
14446 "\t\tconst char *regex,\n"
14447 "\t\tconst char *path);\n"
14452 #: ../src/guestfs-actions.pod:5752 ../fish/guestfish-actions.pod:4422
14454 "This calls the external C<zgrep> program and returns the matching lines."
14458 #: ../src/guestfs-actions.pod:5762
14459 msgid "guestfs_zgrepi"
14463 #: ../src/guestfs-actions.pod:5764
14466 " char **guestfs_zgrepi (guestfs_h *g,\n"
14467 "\t\tconst char *regex,\n"
14468 "\t\tconst char *path);\n"
14473 #: ../src/guestfs-actions.pod:5768 ../fish/guestfish-actions.pod:4432
14475 "This calls the external C<zgrep -i> program and returns the matching lines."
14479 #: ../src/guestfs-availability.pod:3
14484 #: ../src/guestfs-availability.pod:5
14486 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> L</"
14487 "guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> L</"
14488 "guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> L</"
14489 "guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> L</guestfs_aug_rm> "
14490 "L</guestfs_aug_save> L</guestfs_aug_set>"
14494 #: ../src/guestfs-availability.pod:21
14499 #: ../src/guestfs-availability.pod:23
14501 "The following functions: L</guestfs_inotify_add_watch> L</"
14502 "guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> L</"
14503 "guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
14507 #: ../src/guestfs-availability.pod:31
14508 msgid "B<linuxfsuuid>"
14512 #: ../src/guestfs-availability.pod:33
14514 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> L</"
14515 "guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
14519 #: ../src/guestfs-availability.pod:40
14520 msgid "B<linuxmodules>"
14524 #: ../src/guestfs-availability.pod:42
14525 msgid "The following functions: L</guestfs_modprobe>"
14529 #: ../src/guestfs-availability.pod:45
14530 msgid "B<linuxxattrs>"
14534 #: ../src/guestfs-availability.pod:47
14536 "The following functions: L</guestfs_getxattrs> L</guestfs_lgetxattrs> L</"
14537 "guestfs_lremovexattr> L</guestfs_lsetxattr> L</guestfs_lxattrlist> L</"
14538 "guestfs_removexattr> L</guestfs_setxattr>"
14542 #: ../src/guestfs-availability.pod:56
14547 #: ../src/guestfs-availability.pod:58
14549 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> L</"
14550 "guestfs_luks_format> L</guestfs_luks_format_cipher> L</"
14551 "guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
14555 #: ../src/guestfs-availability.pod:67
14560 #: ../src/guestfs-availability.pod:69
14562 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> L</"
14563 "guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> L</"
14564 "guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> L</"
14565 "guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> L</"
14566 "guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> L</"
14567 "guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> L</"
14568 "guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> L</guestfs_vgs_full>"
14572 #: ../src/guestfs-availability.pod:92
14577 #: ../src/guestfs-availability.pod:94
14579 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> L</"
14580 "guestfs_mknod_b> L</guestfs_mknod_c>"
14584 #: ../src/guestfs-availability.pod:100
14589 #: ../src/guestfs-availability.pod:102
14590 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
14594 #: ../src/guestfs-availability.pod:105
14595 msgid "B<ntfsprogs>"
14599 #: ../src/guestfs-availability.pod:107
14601 "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
14605 #: ../src/guestfs-availability.pod:111
14606 msgid "B<realpath>"
14610 #: ../src/guestfs-availability.pod:113
14611 msgid "The following functions: L</guestfs_realpath>"
14615 #: ../src/guestfs-availability.pod:116
14620 #: ../src/guestfs-availability.pod:118
14622 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> L</"
14623 "guestfs_scrub_freespace>"
14627 #: ../src/guestfs-availability.pod:123
14632 #: ../src/guestfs-availability.pod:125
14633 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
14637 #: ../src/guestfs-availability.pod:129
14642 #: ../src/guestfs-availability.pod:131
14643 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
14647 #: ../src/guestfs-availability.pod:135
14648 msgid "B<zerofree>"
14652 #: ../src/guestfs-availability.pod:137
14653 msgid "The following functions: L</guestfs_zerofree>"
14657 #: ../src/guestfs-structs.pod:1
14658 msgid "guestfs_int_bool"
14662 #: ../src/guestfs-structs.pod:3
14665 " struct guestfs_int_bool {\n"
14673 #: ../src/guestfs-structs.pod:8
14676 " struct guestfs_int_bool_list {\n"
14677 " uint32_t len; /* Number of elements in list. */\n"
14678 " struct guestfs_int_bool *val; /* Elements. */\n"
14684 #: ../src/guestfs-structs.pod:13
14687 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
14688 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
14693 #: ../src/guestfs-structs.pod:16
14694 msgid "guestfs_lvm_pv"
14698 #: ../src/guestfs-structs.pod:18
14701 " struct guestfs_lvm_pv {\n"
14702 " char *pv_name;\n"
14703 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
14704 " char pv_uuid[32];\n"
14706 " uint64_t pv_size;\n"
14707 " uint64_t dev_size;\n"
14708 " uint64_t pv_free;\n"
14709 " uint64_t pv_used;\n"
14710 " char *pv_attr;\n"
14711 " int64_t pv_pe_count;\n"
14712 " int64_t pv_pe_alloc_count;\n"
14713 " char *pv_tags;\n"
14714 " uint64_t pe_start;\n"
14715 " int64_t pv_mda_count;\n"
14716 " uint64_t pv_mda_free;\n"
14722 #: ../src/guestfs-structs.pod:36
14725 " struct guestfs_lvm_pv_list {\n"
14726 " uint32_t len; /* Number of elements in list. */\n"
14727 " struct guestfs_lvm_pv *val; /* Elements. */\n"
14733 #: ../src/guestfs-structs.pod:41
14736 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
14737 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
14742 #: ../src/guestfs-structs.pod:44
14743 msgid "guestfs_lvm_vg"
14747 #: ../src/guestfs-structs.pod:46
14750 " struct guestfs_lvm_vg {\n"
14751 " char *vg_name;\n"
14752 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
14753 " char vg_uuid[32];\n"
14755 " char *vg_attr;\n"
14756 " uint64_t vg_size;\n"
14757 " uint64_t vg_free;\n"
14758 " char *vg_sysid;\n"
14759 " uint64_t vg_extent_size;\n"
14760 " int64_t vg_extent_count;\n"
14761 " int64_t vg_free_count;\n"
14762 " int64_t max_lv;\n"
14763 " int64_t max_pv;\n"
14764 " int64_t pv_count;\n"
14765 " int64_t lv_count;\n"
14766 " int64_t snap_count;\n"
14767 " int64_t vg_seqno;\n"
14768 " char *vg_tags;\n"
14769 " int64_t vg_mda_count;\n"
14770 " uint64_t vg_mda_free;\n"
14776 #: ../src/guestfs-structs.pod:69
14779 " struct guestfs_lvm_vg_list {\n"
14780 " uint32_t len; /* Number of elements in list. */\n"
14781 " struct guestfs_lvm_vg *val; /* Elements. */\n"
14787 #: ../src/guestfs-structs.pod:74
14790 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
14791 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
14796 #: ../src/guestfs-structs.pod:77
14797 msgid "guestfs_lvm_lv"
14801 #: ../src/guestfs-structs.pod:79
14804 " struct guestfs_lvm_lv {\n"
14805 " char *lv_name;\n"
14806 " /* The next field is NOT nul-terminated, be careful when printing it: */\n"
14807 " char lv_uuid[32];\n"
14808 " char *lv_attr;\n"
14809 " int64_t lv_major;\n"
14810 " int64_t lv_minor;\n"
14811 " int64_t lv_kernel_major;\n"
14812 " int64_t lv_kernel_minor;\n"
14813 " uint64_t lv_size;\n"
14814 " int64_t seg_count;\n"
14816 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
14817 " float snap_percent;\n"
14818 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
14819 " float copy_percent;\n"
14820 " char *move_pv;\n"
14821 " char *lv_tags;\n"
14822 " char *mirror_log;\n"
14823 " char *modules;\n"
14829 #: ../src/guestfs-structs.pod:101
14832 " struct guestfs_lvm_lv_list {\n"
14833 " uint32_t len; /* Number of elements in list. */\n"
14834 " struct guestfs_lvm_lv *val; /* Elements. */\n"
14840 #: ../src/guestfs-structs.pod:106
14843 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
14844 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
14849 #: ../src/guestfs-structs.pod:111
14852 " struct guestfs_stat {\n"
14856 " int64_t nlink;\n"
14861 " int64_t blksize;\n"
14862 " int64_t blocks;\n"
14863 " int64_t atime;\n"
14864 " int64_t mtime;\n"
14865 " int64_t ctime;\n"
14871 #: ../src/guestfs-structs.pod:127
14874 " struct guestfs_stat_list {\n"
14875 " uint32_t len; /* Number of elements in list. */\n"
14876 " struct guestfs_stat *val; /* Elements. */\n"
14882 #: ../src/guestfs-structs.pod:132
14885 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
14886 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
14891 #: ../src/guestfs-structs.pod:137
14894 " struct guestfs_statvfs {\n"
14895 " int64_t bsize;\n"
14896 " int64_t frsize;\n"
14897 " int64_t blocks;\n"
14898 " int64_t bfree;\n"
14899 " int64_t bavail;\n"
14900 " int64_t files;\n"
14901 " int64_t ffree;\n"
14902 " int64_t favail;\n"
14905 " int64_t namemax;\n"
14911 #: ../src/guestfs-structs.pod:151
14914 " struct guestfs_statvfs_list {\n"
14915 " uint32_t len; /* Number of elements in list. */\n"
14916 " struct guestfs_statvfs *val; /* Elements. */\n"
14922 #: ../src/guestfs-structs.pod:156
14925 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
14926 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
14931 #: ../src/guestfs-structs.pod:159
14932 msgid "guestfs_dirent"
14936 #: ../src/guestfs-structs.pod:161
14939 " struct guestfs_dirent {\n"
14948 #: ../src/guestfs-structs.pod:167
14951 " struct guestfs_dirent_list {\n"
14952 " uint32_t len; /* Number of elements in list. */\n"
14953 " struct guestfs_dirent *val; /* Elements. */\n"
14959 #: ../src/guestfs-structs.pod:172
14962 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
14963 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
14968 #: ../src/guestfs-structs.pod:177
14971 " struct guestfs_version {\n"
14972 " int64_t major;\n"
14973 " int64_t minor;\n"
14974 " int64_t release;\n"
14981 #: ../src/guestfs-structs.pod:184
14984 " struct guestfs_version_list {\n"
14985 " uint32_t len; /* Number of elements in list. */\n"
14986 " struct guestfs_version *val; /* Elements. */\n"
14992 #: ../src/guestfs-structs.pod:189
14995 " void guestfs_free_version (struct guestfs_free_version *);\n"
14996 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
15001 #: ../src/guestfs-structs.pod:192
15002 msgid "guestfs_xattr"
15006 #: ../src/guestfs-structs.pod:194
15009 " struct guestfs_xattr {\n"
15010 " char *attrname;\n"
15011 " /* The next two fields describe a byte array. */\n"
15012 " uint32_t attrval_len;\n"
15013 " char *attrval;\n"
15019 #: ../src/guestfs-structs.pod:201
15022 " struct guestfs_xattr_list {\n"
15023 " uint32_t len; /* Number of elements in list. */\n"
15024 " struct guestfs_xattr *val; /* Elements. */\n"
15030 #: ../src/guestfs-structs.pod:206
15033 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
15034 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
15039 #: ../src/guestfs-structs.pod:209
15040 msgid "guestfs_inotify_event"
15044 #: ../src/guestfs-structs.pod:211
15047 " struct guestfs_inotify_event {\n"
15048 " int64_t in_wd;\n"
15049 " uint32_t in_mask;\n"
15050 " uint32_t in_cookie;\n"
15051 " char *in_name;\n"
15057 #: ../src/guestfs-structs.pod:218
15060 " struct guestfs_inotify_event_list {\n"
15061 " uint32_t len; /* Number of elements in list. */\n"
15062 " struct guestfs_inotify_event *val; /* Elements. */\n"
15068 #: ../src/guestfs-structs.pod:223
15071 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
15072 " void guestfs_free_inotify_event_list (struct guestfs_free_inotify_event_list *);\n"
15077 #: ../src/guestfs-structs.pod:226
15078 msgid "guestfs_partition"
15082 #: ../src/guestfs-structs.pod:228
15085 " struct guestfs_partition {\n"
15086 " int32_t part_num;\n"
15087 " uint64_t part_start;\n"
15088 " uint64_t part_end;\n"
15089 " uint64_t part_size;\n"
15095 #: ../src/guestfs-structs.pod:235
15098 " struct guestfs_partition_list {\n"
15099 " uint32_t len; /* Number of elements in list. */\n"
15100 " struct guestfs_partition *val; /* Elements. */\n"
15106 #: ../src/guestfs-structs.pod:240
15109 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
15110 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
15115 #: ../fish/guestfish.pod:5
15116 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
15120 #: ../fish/guestfish.pod:9
15123 " guestfish [--options] [commands]\n"
15128 #: ../fish/guestfish.pod:11
15136 #: ../fish/guestfish.pod:13
15139 " guestfish -a disk.img\n"
15144 #: ../fish/guestfish.pod:15
15147 " guestfish -a disk.img -m dev[:mountpoint]\n"
15152 #: ../fish/guestfish.pod:17
15155 " guestfish -d libvirt-domain\n"
15160 #: ../fish/guestfish.pod:19
15163 " guestfish -a disk.img -i\n"
15168 #: ../fish/guestfish.pod:21
15171 " guestfish -d libvirt-domain -i\n"
15176 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15 ../tools/virt-edit.pl:45
15177 #: ../tools/virt-win-reg.pl:52 ../tools/virt-tar.pl:60
15178 #: ../tools/virt-rescue.pl:41
15183 #: ../fish/guestfish.pod:25
15185 "Using guestfish in read/write mode on live virtual machines can be "
15186 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
15187 "option to use guestfish safely if the disk image or virtual machine might be "
15192 #: ../fish/guestfish.pod:32
15194 "Guestfish is a shell and command-line tool for examining and modifying "
15195 "virtual machine filesystems. It uses libguestfs and exposes all of the "
15196 "functionality of the guestfs API, see L<guestfs(3)>."
15200 #: ../fish/guestfish.pod:36
15202 "Guestfish gives you structured access to the libguestfs API, from shell "
15203 "scripts or the command line or interactively. If you want to rescue a "
15204 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
15209 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:800
15210 #: ../fuse/guestmount.pod:39 ../tools/virt-edit.pl:59
15211 #: ../tools/virt-resize.pl:66 ../tools/virt-cat.pl:51 ../tools/virt-tar.pl:46
15216 #: ../fish/guestfish.pod:43
15217 msgid "As an interactive shell"
15221 #: ../fish/guestfish.pod:45
15229 #: ../fish/guestfish.pod:47
15232 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
15233 " editing virtual machine filesystems.\n"
15238 #: ../fish/guestfish.pod:50
15241 " Type: 'help' for a list of commands\n"
15242 " 'man' to read the manual\n"
15243 " 'quit' to quit the shell\n"
15248 #: ../fish/guestfish.pod:54
15251 " ><fs> add-ro disk.img\n"
15253 " ><fs> list-filesystems\n"
15254 " /dev/sda1: ext4\n"
15255 " /dev/vg_guest/lv_root: ext4\n"
15256 " /dev/vg_guest/lv_swap: swap\n"
15257 " ><fs> mount /dev/vg_guest/lv_root /\n"
15258 " ><fs> cat /etc/fstab\n"
15260 " # Created by anaconda\n"
15267 #: ../fish/guestfish.pod:67
15268 msgid "From shell scripts"
15272 #: ../fish/guestfish.pod:69
15273 msgid "Create a new C</etc/motd> file in a guest or disk image:"
15277 #: ../fish/guestfish.pod:71
15280 " guestfish <<_EOF_\n"
15283 " mount /dev/vg_guest/lv_root /\n"
15284 " write /etc/motd \"Welcome, new users\"\n"
15290 #: ../fish/guestfish.pod:78
15291 msgid "List the LVM logical volumes in a disk image:"
15295 #: ../fish/guestfish.pod:80
15298 " guestfish -a disk.img --ro <<_EOF_\n"
15306 #: ../fish/guestfish.pod:85
15307 msgid "List all the filesystems in a disk image:"
15311 #: ../fish/guestfish.pod:87
15314 " guestfish -a disk.img --ro <<_EOF_\n"
15316 " list-filesystems\n"
15322 #: ../fish/guestfish.pod:92
15323 msgid "On one command line"
15327 #: ../fish/guestfish.pod:94
15328 msgid "Update C</etc/resolv.conf> in a guest:"
15332 #: ../fish/guestfish.pod:96
15336 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
15337 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
15342 #: ../fish/guestfish.pod:100
15343 msgid "Edit C</boot/grub/grub.conf> interactively:"
15347 #: ../fish/guestfish.pod:102
15350 " guestfish --add disk.img \\\n"
15351 " --mount /dev/vg_guest/lv_root \\\n"
15352 " --mount /dev/sda1:/boot \\\n"
15353 " edit /boot/grub/grub.conf\n"
15358 #: ../fish/guestfish.pod:107
15359 msgid "Mount disks automatically"
15363 #: ../fish/guestfish.pod:109
15365 "Use the I<-i> option to automatically mount the disks from a virtual machine:"
15369 #: ../fish/guestfish.pod:112
15372 " guestfish --ro -a disk.img -i cat /etc/group\n"
15377 #: ../fish/guestfish.pod:114
15380 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
15385 #: ../fish/guestfish.pod:116
15386 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
15390 #: ../fish/guestfish.pod:118
15393 " guestfish -a disk.img -i edit /boot/grub/grub.conf\n"
15398 #: ../fish/guestfish.pod:120
15399 msgid "As a script interpreter"
15403 #: ../fish/guestfish.pod:122
15404 msgid "Create a 100MB disk containing an ext2-formatted partition:"
15408 #: ../fish/guestfish.pod:124
15411 " #!/usr/bin/guestfish -f\n"
15412 " sparse test1.img 100M\n"
15414 " part-disk /dev/sda mbr\n"
15415 " mkfs ext2 /dev/sda1\n"
15420 #: ../fish/guestfish.pod:130
15421 msgid "Start with a prepared disk"
15425 #: ../fish/guestfish.pod:132
15427 "An alternate way to create a 100MB disk called C<test1.img> containing a "
15428 "single ext2-formatted partition:"
15432 #: ../fish/guestfish.pod:135
15435 " guestfish -N fs\n"
15440 #: ../fish/guestfish.pod:137
15441 msgid "To list what is available do:"
15445 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:791
15448 " guestfish -N help | less\n"
15453 #: ../fish/guestfish.pod:141
15454 msgid "Remote control"
15458 #: ../fish/guestfish.pod:143
15461 " eval `guestfish --listen`\n"
15462 " guestfish --remote add-ro disk.img\n"
15463 " guestfish --remote run\n"
15464 " guestfish --remote lvs\n"
15469 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37
15470 #: ../fuse/guestmount.pod:73 ../inspector/virt-inspector.pl:75
15471 #: ../tools/virt-edit.pl:73 ../tools/virt-win-reg.pl:172
15472 #: ../tools/virt-df.pl:71 ../tools/virt-ls.pl:79 ../tools/virt-resize.pl:257
15473 #: ../tools/virt-list-filesystems.pl:50 ../tools/virt-cat.pl:80
15474 #: ../tools/virt-tar.pl:99 ../tools/virt-rescue.pl:103
15475 #: ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:51
15480 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:124
15481 #: ../inspector/virt-inspector.pl:83 ../tools/virt-edit.pl:81
15482 #: ../tools/virt-win-reg.pl:180 ../tools/virt-df.pl:79 ../tools/virt-ls.pl:87
15483 #: ../tools/virt-resize.pl:265 ../tools/virt-list-filesystems.pl:58
15484 #: ../tools/virt-cat.pl:88 ../tools/virt-tar.pl:107
15485 #: ../tools/virt-rescue.pl:111 ../tools/virt-make-fs.pl:161
15486 #: ../tools/virt-list-partitions.pl:59
15491 #: ../fish/guestfish.pod:154
15492 msgid "Displays general help on options."
15496 #: ../fish/guestfish.pod:156
15497 msgid "B<-h> | B<--cmd-help>"
15501 #: ../fish/guestfish.pod:158
15502 msgid "Lists all available guestfish commands."
15506 #: ../fish/guestfish.pod:160
15507 msgid "B<-h cmd> | B<--cmd-help cmd>"
15511 #: ../fish/guestfish.pod:162
15512 msgid "Displays detailed help on a single command C<cmd>."
15516 #: ../fish/guestfish.pod:164 ../fuse/guestmount.pod:77
15517 msgid "B<-a image> | B<--add image>"
15521 #: ../fish/guestfish.pod:166
15522 msgid "Add a block device or virtual machine image to the shell."
15526 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:81
15528 "The format of the disk image is auto-detected. To override this and force a "
15529 "particular format use the I<--format=..> option."
15533 #: ../fish/guestfish.pod:171 ../fuse/guestmount.pod:84
15534 msgid "B<-c URI> | B<--connect URI>"
15538 #: ../fish/guestfish.pod:173 ../fuse/guestmount.pod:86
15540 "When used in conjunction with the I<-d> option, this specifies the libvirt "
15541 "URI to use. The default is to use the default libvirt connection."
15545 #: ../fish/guestfish.pod:177 ../fuse/guestmount.pod:90
15546 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
15550 #: ../fish/guestfish.pod:179 ../fuse/guestmount.pod:92
15552 "Add disks from the named libvirt domain. If the I<--ro> option is also "
15553 "used, then any libvirt domain can be used. However in write mode, only "
15554 "libvirt domains which are shut down can be named here."
15558 #: ../fish/guestfish.pod:183
15559 msgid "B<-D> | B<--no-dest-paths>"
15563 #: ../fish/guestfish.pod:185
15565 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
15566 "to hit the tab key to complete paths on the guest filesystem, but this "
15567 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
15568 "allow this feature to be disabled."
15572 #: ../fish/guestfish.pod:190
15573 msgid "B<--echo-keys>"
15577 #: ../fish/guestfish.pod:192
15579 "When prompting for keys and passphrases, guestfish normally turns echoing "
15580 "off so you cannot see what you are typing. If you are not worried about "
15581 "Tempest attacks and there is no one else in the room you can specify this "
15582 "flag to see what you are typing."
15586 #: ../fish/guestfish.pod:197
15587 msgid "B<-f file> | B<--file file>"
15591 #: ../fish/guestfish.pod:199
15592 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
15596 #: ../fish/guestfish.pod:202
15599 " #!/usr/bin/guestfish -f\n"
15604 #: ../fish/guestfish.pod:204 ../fuse/guestmount.pod:108
15605 msgid "B<--format=raw|qcow2|..> | B<--format>"
15609 #: ../fish/guestfish.pod:206 ../fuse/guestmount.pod:110
15611 "The default for the I<-a> option is to auto-detect the format of the disk "
15612 "image. Using this forces the disk format for I<-a> options which follow on "
15613 "the command line. Using I<--format> with no argument switches back to auto-"
15614 "detection for subsequent I<-a> options."
15618 #: ../fish/guestfish.pod:211 ../fish/guestfish.pod:504
15619 msgid "For example:"
15623 #: ../fish/guestfish.pod:213
15626 " guestfish --format=raw -a disk.img\n"
15631 #: ../fish/guestfish.pod:215
15632 msgid "forces raw format (no auto-detection) for C<disk.img>."
15636 #: ../fish/guestfish.pod:217
15639 " guestfish --format=raw -a disk.img --format -a another.img\n"
15644 #: ../fish/guestfish.pod:219
15646 "forces raw format (no auto-detection) for C<disk.img> and reverts to auto-"
15647 "detection for C<another.img>."
15651 #: ../fish/guestfish.pod:222
15653 "If you have untrusted raw-format guest disk images, you should use this "
15654 "option to specify the disk format. This avoids a possible security problem "
15655 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
15659 #: ../fish/guestfish.pod:227 ../fuse/guestmount.pod:128
15660 msgid "B<-i> | B<--inspector>"
15664 #: ../fish/guestfish.pod:229 ../fuse/guestmount.pod:130
15666 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
15667 "system and mount filesystems as they would be mounted on the real virtual "
15672 #: ../fish/guestfish.pod:233
15673 msgid "Typical usage is either:"
15677 #: ../fish/guestfish.pod:235
15680 " guestfish -d myguest -i\n"
15685 #: ../fish/guestfish.pod:237
15686 msgid "(for an inactive libvirt domain called I<myguest>), or:"
15690 #: ../fish/guestfish.pod:239
15693 " guestfish --ro -d myguest -i\n"
15698 #: ../fish/guestfish.pod:241
15699 msgid "(for active domains, readonly), or specify the block device directly:"
15703 #: ../fish/guestfish.pod:243
15706 " guestfish -a /dev/Guests/MyGuest -i\n"
15711 #: ../fish/guestfish.pod:245
15713 "Note that the command line syntax changed slightly over older versions of "
15714 "guestfish. You can still use the old syntax:"
15718 #: ../fish/guestfish.pod:248
15721 " guestfish [--ro] -i disk.img\n"
15726 #: ../fish/guestfish.pod:250
15729 " guestfish [--ro] -i libvirt-domain\n"
15734 #: ../fish/guestfish.pod:252
15735 msgid "B<--keys-from-stdin>"
15739 #: ../fish/guestfish.pod:254
15741 "Read key or passphrase parameters from stdin. The default is to try to read "
15742 "passphrases from the user by opening C</dev/tty>."
15746 #: ../fish/guestfish.pod:257
15747 msgid "B<--listen>"
15751 #: ../fish/guestfish.pod:259
15753 "Fork into the background and listen for remote commands. See section L</"
15754 "REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
15758 #: ../fish/guestfish.pod:262
15759 msgid "B<-m dev[:mountpoint]> | B<--mount dev[:mountpoint]>"
15763 #: ../fish/guestfish.pod:264
15764 msgid "Mount the named partition or logical volume on the given mountpoint."
15768 #: ../fish/guestfish.pod:266
15769 msgid "If the mountpoint is omitted, it defaults to C</>."
15773 #: ../fish/guestfish.pod:268
15774 msgid "You have to mount something on C</> before most commands will work."
15778 #: ../fish/guestfish.pod:270
15780 "If any I<-m> or I<--mount> options are given, the guest is automatically "
15785 #: ../fish/guestfish.pod:273
15787 "If you don't know what filesystems a disk image contains, you can either run "
15788 "guestfish without this option, then list the partitions and LVs available "
15789 "(see L</list-partitions> and L</lvs> commands), or you can use the L<virt-"
15790 "list-filesystems(1)> program."
15794 #: ../fish/guestfish.pod:278 ../fuse/guestmount.pod:142
15795 msgid "B<-n> | B<--no-sync>"
15799 #: ../fish/guestfish.pod:280
15801 "Disable autosync. This is enabled by default. See the discussion of "
15802 "autosync in the L<guestfs(3)> manpage."
15806 #: ../fish/guestfish.pod:283
15807 msgid "B<-N type> | B<--new type> | B<-N help>"
15811 #: ../fish/guestfish.pod:285
15813 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
15814 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
15815 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
15820 #: ../fish/guestfish.pod:290
15821 msgid "B<--progress-bars>"
15825 #: ../fish/guestfish.pod:292
15826 msgid "Enable progress bars, even when guestfish is used non-interactively."
15830 #: ../fish/guestfish.pod:294
15832 "Progress bars are enabled by default when guestfish is used as an "
15833 "interactive shell."
15837 #: ../fish/guestfish.pod:297
15838 msgid "B<--no-progress-bars>"
15842 #: ../fish/guestfish.pod:299
15843 msgid "Disable progress bars."
15847 #: ../fish/guestfish.pod:301
15848 msgid "B<--remote[=pid]>"
15852 #: ../fish/guestfish.pod:303
15854 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
15855 "CONTROL GUESTFISH OVER A SOCKET> below."
15859 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
15860 msgid "B<-r> | B<--ro>"
15864 #: ../fish/guestfish.pod:308
15866 "This changes the I<-a> and I<-m> options so that disks are added and mounts "
15867 "are done read-only (see L<guestfs(3)/guestfs_mount_ro>)."
15871 #: ../fish/guestfish.pod:311 ../tools/virt-rescue.pl:187
15873 "The option must always be used if the disk image or virtual machine might be "
15874 "running, and is generally recommended in cases where you don't need write "
15875 "access to the disk."
15879 #: ../fish/guestfish.pod:315
15881 "Note that prepared disk images created with I<-N> are not affected by the "
15886 #: ../fish/guestfish.pod:318 ../fuse/guestmount.pod:194
15887 #: ../tools/virt-rescue.pl:195
15888 msgid "B<--selinux>"
15892 #: ../fish/guestfish.pod:320
15893 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
15897 #: ../fish/guestfish.pod:322 ../fuse/guestmount.pod:198
15898 msgid "B<-v> | B<--verbose>"
15902 #: ../fish/guestfish.pod:324
15904 "Enable very verbose messages. This is particularly useful if you find a bug."
15908 #: ../fish/guestfish.pod:327 ../fuse/guestmount.pod:202
15909 msgid "B<-V> | B<--version>"
15913 #: ../fish/guestfish.pod:329
15914 msgid "Display the guestfish / libguestfs version number and exit."
15918 #: ../fish/guestfish.pod:331
15923 #: ../fish/guestfish.pod:333
15924 msgid "Echo each command before executing it."
15928 #: ../fish/guestfish.pod:337
15929 msgid "COMMANDS ON COMMAND LINE"
15933 #: ../fish/guestfish.pod:339
15935 "Any additional (non-option) arguments are treated as commands to execute."
15939 #: ../fish/guestfish.pod:342
15941 "Commands to execute should be separated by a colon (C<:>), where the colon "
15942 "is a separate parameter. Thus:"
15946 #: ../fish/guestfish.pod:345
15949 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
15954 #: ../fish/guestfish.pod:347
15956 "If there are no additional arguments, then we enter a shell, either an "
15957 "interactive shell with a prompt (if the input is a terminal) or a non-"
15958 "interactive shell."
15962 #: ../fish/guestfish.pod:351
15964 "In either command line mode or non-interactive shell, the first command that "
15965 "gives an error causes the whole shell to exit. In interactive mode (with a "
15966 "prompt) if a command fails, you can continue to enter commands."
15970 #: ../fish/guestfish.pod:356
15971 msgid "USING launch (OR run)"
15975 #: ../fish/guestfish.pod:358
15977 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
15978 "then launch it, then mount any disks you need, and finally issue actions/"
15979 "commands. So the general order of the day is:"
15983 #: ../fish/guestfish.pod:366
15984 msgid "add or -a/--add"
15988 #: ../fish/guestfish.pod:370
15989 msgid "launch (aka run)"
15993 #: ../fish/guestfish.pod:374
15994 msgid "mount or -m/--mount"
15998 #: ../fish/guestfish.pod:378
15999 msgid "any other commands"
16003 #: ../fish/guestfish.pod:382
16005 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
16006 "guest before mounting or performing any other commands."
16010 #: ../fish/guestfish.pod:385
16012 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
16013 "I<--new> options were given then C<run> is done automatically, simply "
16014 "because guestfish can't perform the action you asked for without doing this."
16018 #: ../fish/guestfish.pod:390
16023 #: ../fish/guestfish.pod:392
16025 "You can quote ordinary parameters using either single or double quotes. For "
16030 #: ../fish/guestfish.pod:395
16033 " add \"file with a space.img\"\n"
16038 #: ../fish/guestfish.pod:397
16041 " rm '/file name'\n"
16046 #: ../fish/guestfish.pod:399
16054 #: ../fish/guestfish.pod:401
16056 "A few commands require a list of strings to be passed. For these, use a "
16057 "whitespace-separated list, enclosed in quotes. Strings containing "
16058 "whitespace to be passed through must be enclosed in single quotes. A "
16059 "literal single quote must be escaped with a backslash."
16063 #: ../fish/guestfish.pod:406
16066 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
16067 " command \"/bin/echo 'foo bar'\"\n"
16068 " command \"/bin/echo \\'foo\\'\"\n"
16073 #: ../fish/guestfish.pod:410
16074 msgid "OPTIONAL ARGUMENTS"
16078 #: ../fish/guestfish.pod:412
16080 "Some commands take optional arguments. These arguments appear in this "
16081 "documentation as C<[argname:..]>. You can use them as in these examples:"
16085 #: ../fish/guestfish.pod:416
16088 " add-drive-opts filename\n"
16093 #: ../fish/guestfish.pod:418
16096 " add-drive-opts filename readonly:true\n"
16101 #: ../fish/guestfish.pod:420
16104 " add-drive-opts filename format:qcow2 readonly:false\n"
16109 #: ../fish/guestfish.pod:422
16111 "Each optional argument can appear at most once. All optional arguments must "
16112 "appear after the required ones."
16116 #: ../fish/guestfish.pod:425
16121 #: ../fish/guestfish.pod:427
16123 "This section applies to all commands which can take integers as parameters."
16127 #: ../fish/guestfish.pod:430
16128 msgid "SIZE SUFFIX"
16132 #: ../fish/guestfish.pod:432
16134 "When the command takes a parameter measured in bytes, you can use one of the "
16135 "following suffixes to specify kilobytes, megabytes and larger sizes:"
16139 #: ../fish/guestfish.pod:438
16140 msgid "B<k> or B<K> or B<KiB>"
16144 #: ../fish/guestfish.pod:440
16145 msgid "The size in kilobytes (multiplied by 1024)."
16149 #: ../fish/guestfish.pod:442
16154 #: ../fish/guestfish.pod:444
16155 msgid "The size in SI 1000 byte units."
16159 #: ../fish/guestfish.pod:446
16160 msgid "B<M> or B<MiB>"
16164 #: ../fish/guestfish.pod:448
16165 msgid "The size in megabytes (multiplied by 1048576)."
16169 #: ../fish/guestfish.pod:450
16174 #: ../fish/guestfish.pod:452
16175 msgid "The size in SI 1000000 byte units."
16179 #: ../fish/guestfish.pod:454
16180 msgid "B<G> or B<GiB>"
16184 #: ../fish/guestfish.pod:456
16185 msgid "The size in gigabytes (multiplied by 2**30)."
16189 #: ../fish/guestfish.pod:458
16194 #: ../fish/guestfish.pod:460
16195 msgid "The size in SI 10**9 byte units."
16199 #: ../fish/guestfish.pod:462
16200 msgid "B<T> or B<TiB>"
16204 #: ../fish/guestfish.pod:464
16205 msgid "The size in terabytes (multiplied by 2**40)."
16209 #: ../fish/guestfish.pod:466
16214 #: ../fish/guestfish.pod:468
16215 msgid "The size in SI 10**12 byte units."
16219 #: ../fish/guestfish.pod:470
16220 msgid "B<P> or B<PiB>"
16224 #: ../fish/guestfish.pod:472
16225 msgid "The size in petabytes (multiplied by 2**50)."
16229 #: ../fish/guestfish.pod:474
16234 #: ../fish/guestfish.pod:476
16235 msgid "The size in SI 10**15 byte units."
16239 #: ../fish/guestfish.pod:478
16240 msgid "B<E> or B<EiB>"
16244 #: ../fish/guestfish.pod:480
16245 msgid "The size in exabytes (multiplied by 2**60)."
16249 #: ../fish/guestfish.pod:482
16254 #: ../fish/guestfish.pod:484
16255 msgid "The size in SI 10**18 byte units."
16259 #: ../fish/guestfish.pod:486
16260 msgid "B<Z> or B<ZiB>"
16264 #: ../fish/guestfish.pod:488
16265 msgid "The size in zettabytes (multiplied by 2**70)."
16269 #: ../fish/guestfish.pod:490
16274 #: ../fish/guestfish.pod:492
16275 msgid "The size in SI 10**21 byte units."
16279 #: ../fish/guestfish.pod:494
16280 msgid "B<Y> or B<YiB>"
16284 #: ../fish/guestfish.pod:496
16285 msgid "The size in yottabytes (multiplied by 2**80)."
16289 #: ../fish/guestfish.pod:498
16294 #: ../fish/guestfish.pod:500
16295 msgid "The size in SI 10**24 byte units."
16299 #: ../fish/guestfish.pod:506
16302 " truncate-size /file 1G\n"
16307 #: ../fish/guestfish.pod:508
16308 msgid "would truncate the file to 1 gigabyte."
16312 #: ../fish/guestfish.pod:510
16314 "Be careful because a few commands take sizes in kilobytes or megabytes (eg. "
16315 "the parameter to L</memsize> is specified in megabytes already). Adding a "
16316 "suffix will probably not do what you expect."
16320 #: ../fish/guestfish.pod:514
16321 msgid "OCTAL AND HEXADECIMAL NUMBERS"
16325 #: ../fish/guestfish.pod:516
16327 "For specifying the radix (base) use the C convention: C<0> to prefix an "
16328 "octal number or C<0x> to prefix a hexadecimal number. For example:"
16332 #: ../fish/guestfish.pod:519
16335 " 1234 decimal number 1234\n"
16336 " 02322 octal number, equivalent to decimal 1234\n"
16337 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
16342 #: ../fish/guestfish.pod:523
16344 "When using the C<chmod> command, you almost always want to specify an octal "
16345 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
16346 "L<chmod(1)> program):"
16350 #: ../fish/guestfish.pod:527
16353 " chmod 0777 /public # OK\n"
16354 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
16359 #: ../fish/guestfish.pod:530
16361 "Commands that return numbers usually print them in decimal, but some "
16362 "commands print numbers in other radices (eg. C<umask> prints the mode in "
16363 "octal, preceeded by C<0>)."
16367 #: ../fish/guestfish.pod:534
16368 msgid "WILDCARDS AND GLOBBING"
16372 #: ../fish/guestfish.pod:536
16374 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
16375 "(globbing) by default. So for example the following will not do what you "
16380 #: ../fish/guestfish.pod:540
16388 #: ../fish/guestfish.pod:542
16390 "Assuming you don't have a directory called literally C</home/*> then the "
16391 "above command will return an error."
16395 #: ../fish/guestfish.pod:545
16396 msgid "To perform wildcard expansion, use the C<glob> command."
16400 #: ../fish/guestfish.pod:547
16403 " glob rm-rf /home/*\n"
16408 #: ../fish/guestfish.pod:549
16410 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
16411 "many times), equivalent to:"
16415 #: ../fish/guestfish.pod:552
16418 " rm-rf /home/jim\n"
16419 " rm-rf /home/joe\n"
16420 " rm-rf /home/mary\n"
16425 #: ../fish/guestfish.pod:556
16426 msgid "C<glob> only works on simple guest paths and not on device names."
16430 #: ../fish/guestfish.pod:558
16432 "If you have several parameters, each containing a wildcard, then glob will "
16433 "perform a Cartesian product."
16437 #: ../fish/guestfish.pod:561
16442 #: ../fish/guestfish.pod:563
16444 "Any line which starts with a I<#> character is treated as a comment and "
16445 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
16446 "a command. For example:"
16450 #: ../fish/guestfish.pod:567
16453 " # this is a comment\n"
16454 " # this is a comment\n"
16455 " foo # NOT a comment\n"
16460 #: ../fish/guestfish.pod:571
16461 msgid "Blank lines are also ignored."
16465 #: ../fish/guestfish.pod:573
16466 msgid "RUNNING COMMANDS LOCALLY"
16470 #: ../fish/guestfish.pod:575
16472 "Any line which starts with a I<!> character is treated as a command sent to "
16473 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
16477 #: ../fish/guestfish.pod:579
16481 " tgz-out /remote local/remote-data.tar.gz\n"
16486 #: ../fish/guestfish.pod:582
16488 "will create a directory C<local> on the host, and then export the contents "
16489 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
16490 "(See C<tgz-out>)."
16494 #: ../fish/guestfish.pod:586
16496 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
16497 "effect, due to the way that subprocesses work in Unix."
16501 #: ../fish/guestfish.pod:589
16506 #: ../fish/guestfish.pod:591
16508 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
16509 "command (a guestfish command) to the second command (any host command). For "
16514 #: ../fish/guestfish.pod:595
16517 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
16522 #: ../fish/guestfish.pod:597
16524 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
16525 "program). The above command would list all accounts in the guest filesystem "
16526 "which have UID 0, ie. root accounts including backdoors. Other examples:"
16530 #: ../fish/guestfish.pod:602
16533 " hexdump /bin/ls | head\n"
16534 " list-devices | tail -1\n"
16535 " tgz-out / - | tar ztf -\n"
16540 #: ../fish/guestfish.pod:606
16542 "The space before the pipe symbol is required, any space after the pipe "
16543 "symbol is optional. Everything after the pipe symbol is just passed "
16544 "straight to the host shell, so it can contain redirections, globs and "
16545 "anything else that makes sense on the host side."
16549 #: ../fish/guestfish.pod:611
16551 "To use a literal argument which begins with a pipe symbol, you have to quote "
16556 #: ../fish/guestfish.pod:614
16564 #: ../fish/guestfish.pod:616
16565 msgid "HOME DIRECTORIES"
16569 #: ../fish/guestfish.pod:618
16571 "If a parameter starts with the character C<~> then the tilde may be expanded "
16572 "as a home directory path (either C<~> for the current user's home directory, "
16573 "or C<~user> for another user)."
16577 #: ../fish/guestfish.pod:622
16579 "Note that home directory expansion happens for users known I<on the host>, "
16580 "not in the guest filesystem."
16584 #: ../fish/guestfish.pod:625
16586 "To use a literal argument which begins with a tilde, you have to quote it, "
16591 #: ../fish/guestfish.pod:628
16599 #: ../fish/guestfish.pod:632
16601 "Libguestfs has some support for Linux guests encrypted according to the "
16602 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
16603 "disk encryption systems used by modern Linux guests. Currently only LVM-on-"
16604 "LUKS is supported."
16608 #: ../fish/guestfish.pod:637
16609 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
16613 #: ../fish/guestfish.pod:639
16616 " ><fs> vfs-type /dev/sda2\n"
16622 #: ../fish/guestfish.pod:642
16624 "Then open those devices using L</luks-open>. This creates a device-mapper "
16625 "device called C</dev/mapper/luksdev>."
16629 #: ../fish/guestfish.pod:645
16632 " ><fs> luks-open /dev/sda2 luksdev\n"
16633 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
16638 #: ../fish/guestfish.pod:648
16640 "Finally you have to tell LVM to scan for volume groups on the newly created "
16645 #: ../fish/guestfish.pod:651
16649 " vg-activate-all true\n"
16654 #: ../fish/guestfish.pod:654
16655 msgid "The logical volume(s) can now be mounted in the usual way."
16659 #: ../fish/guestfish.pod:656
16661 "Before closing a LUKS device you must unmount any logical volumes on it and "
16662 "deactivate the volume groups by calling C<vg-activate false VG> on each "
16663 "one. Then you can close the mapper device:"
16667 #: ../fish/guestfish.pod:660
16670 " vg-activate false /dev/VG\n"
16671 " luks-close /dev/mapper/luksdev\n"
16676 #: ../fish/guestfish.pod:663
16677 msgid "WINDOWS PATHS"
16681 #: ../fish/guestfish.pod:665
16683 "If a path is prefixed with C<win:> then you can use Windows-style paths "
16684 "(with some limitations). The following commands are equivalent:"
16688 #: ../fish/guestfish.pod:668
16691 " file /WINDOWS/system32/config/system.LOG\n"
16696 #: ../fish/guestfish.pod:670
16699 " file win:/windows/system32/config/system.log\n"
16704 #: ../fish/guestfish.pod:672
16707 " file win:\\windows\\system32\\config\\system.log\n"
16712 #: ../fish/guestfish.pod:674
16715 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
16720 #: ../fish/guestfish.pod:676
16722 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
16723 "handles case insensitivity like Windows would. This only works in argument "
16724 "positions that expect a path."
16728 #: ../fish/guestfish.pod:680
16729 msgid "UPLOADING AND DOWNLOADING FILES"
16733 #: ../fish/guestfish.pod:682
16735 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
16736 "others which upload from or download to a local file, you can use the "
16737 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
16741 #: ../fish/guestfish.pod:686
16749 #: ../fish/guestfish.pod:688
16751 "reads stdin and creates from that a file C</foo> in the disk image, and:"
16755 #: ../fish/guestfish.pod:691
16758 " tar-out /etc - | tar tf -\n"
16763 #: ../fish/guestfish.pod:693
16765 "writes the tarball to stdout and then pipes that into the external \"tar\" "
16766 "command (see L</PIPES>)."
16770 #: ../fish/guestfish.pod:696
16772 "When using C<-> to read from stdin, the input is read up to the end of "
16773 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
16774 "some arbitrary end marker:"
16778 #: ../fish/guestfish.pod:700
16781 " upload -<<END /foo\n"
16790 #: ../fish/guestfish.pod:706
16792 "Any string of characters can be used instead of C<END>. The end marker must "
16793 "appear on a line of its own, without any preceeding or following characters "
16794 "(not even spaces)."
16798 #: ../fish/guestfish.pod:710
16800 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
16801 "upload local files (so-called \"FileIn\" parameters in the generator)."
16805 #: ../fish/guestfish.pod:713
16806 msgid "EXIT ON ERROR BEHAVIOUR"
16810 #: ../fish/guestfish.pod:715
16812 "By default, guestfish will ignore any errors when in interactive mode (ie. "
16813 "taking commands from a human over a tty), and will exit on the first error "
16814 "in non-interactive mode (scripts, commands given on the command line)."
16818 #: ../fish/guestfish.pod:720
16820 "If you prefix a command with a I<-> character, then that command will not "
16821 "cause guestfish to exit, even if that (one) command returns an error."
16825 #: ../fish/guestfish.pod:724
16826 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
16830 #: ../fish/guestfish.pod:726
16832 "Guestfish can be remote-controlled over a socket. This is useful "
16833 "particularly in shell scripts where you want to make several different "
16834 "changes to a filesystem, but you don't want the overhead of starting up a "
16835 "guestfish process each time."
16839 #: ../fish/guestfish.pod:731
16840 msgid "Start a guestfish server process using:"
16844 #: ../fish/guestfish.pod:733
16847 " eval `guestfish --listen`\n"
16852 #: ../fish/guestfish.pod:735
16853 msgid "and then send it commands by doing:"
16857 #: ../fish/guestfish.pod:737
16860 " guestfish --remote cmd [...]\n"
16865 #: ../fish/guestfish.pod:739
16866 msgid "To cause the server to exit, send it the exit command:"
16870 #: ../fish/guestfish.pod:741
16873 " guestfish --remote exit\n"
16878 #: ../fish/guestfish.pod:743
16880 "Note that the server will normally exit if there is an error in a command. "
16881 "You can change this in the usual way. See section L</EXIT ON ERROR "
16886 #: ../fish/guestfish.pod:747
16887 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
16891 #: ../fish/guestfish.pod:749
16893 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
16894 "is how the I<--remote> option knows where to send the commands. You can "
16895 "have several guestfish listener processes running using:"
16899 #: ../fish/guestfish.pod:753
16902 " eval `guestfish --listen`\n"
16903 " pid1=$GUESTFISH_PID\n"
16904 " eval `guestfish --listen`\n"
16905 " pid2=$GUESTFISH_PID\n"
16907 " guestfish --remote=$pid1 cmd\n"
16908 " guestfish --remote=$pid2 cmd\n"
16913 #: ../fish/guestfish.pod:761
16914 msgid "REMOTE CONTROL DETAILS"
16918 #: ../fish/guestfish.pod:763
16920 "Remote control happens over a Unix domain socket called C</tmp/.guestfish-"
16921 "$UID/socket-$PID>, where C<$UID> is the effective user ID of the process, "
16922 "and C<$PID> is the process ID of the server."
16926 #: ../fish/guestfish.pod:767
16927 msgid "Guestfish client and server versions must match exactly."
16931 #: ../fish/guestfish.pod:769
16932 msgid "PREPARED DISK IMAGES"
16936 #: ../fish/guestfish.pod:771
16938 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
16939 "preformatted disk images that guestfish can make for you to save typing. "
16940 "This is particularly useful for testing purposes. This option is used "
16941 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
16942 "can be mixed with I<-a>)."
16946 #: ../fish/guestfish.pod:777
16948 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
16949 "the second and so on. Existing files in the current directory are "
16954 #: ../fish/guestfish.pod:781
16956 "The type briefly describes how the disk should be sized, partitioned, how "
16957 "filesystem(s) should be created, and how content should be added. "
16958 "Optionally the type can be followed by extra parameters, separated by C<:> "
16959 "(colon) characters. For example, I<-N fs> creates a default 100MB, sparsely-"
16960 "allocated disk, containing a single partition, with the partition formatted "
16961 "as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem on a 1GB "
16966 #: ../fish/guestfish.pod:789
16967 msgid "To list the available types and any extra parameters they take, run:"
16971 #: ../fish/guestfish.pod:793
16973 "Note that the prepared filesystem is not mounted. You would usually have to "
16974 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
16978 #: ../fish/guestfish.pod:797
16980 "If any I<-N> or I<--new> options are given, the guest is automatically "
16985 #: ../fish/guestfish.pod:802
16986 msgid "Create a 100MB disk with an ext4-formatted partition:"
16990 #: ../fish/guestfish.pod:804
16993 " guestfish -N fs:ext4\n"
16998 #: ../fish/guestfish.pod:806
16999 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
17003 #: ../fish/guestfish.pod:808
17006 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
17011 #: ../fish/guestfish.pod:810
17012 msgid "Create a blank 200MB disk:"
17016 #: ../fish/guestfish.pod:812
17019 " guestfish -N disk:200M\n"
17024 #: ../fish/guestfish.pod:814
17025 msgid "PROGRESS BARS"
17029 #: ../fish/guestfish.pod:816
17031 "Some (not all) long-running commands send progress notification messages as "
17032 "they are running. Guestfish turns these messages into progress bars."
17036 #: ../fish/guestfish.pod:820
17038 "When a command that supports progress bars takes longer than two seconds to "
17039 "run, and if progress bars are enabled, then you will see one appearing below "
17044 #: ../fish/guestfish.pod:824
17047 " ><fs> copy-size /large-file /another-file 2048M\n"
17048 " / 10% [#####-----------------------------------------] 00:30\n"
17053 #: ../fish/guestfish.pod:827
17055 "The spinner on the left hand side moves round once for every progress "
17056 "notification received from the backend. This is a (reasonably) golden "
17057 "assurance that the command is \"doing something\" even if the progress bar "
17058 "is not moving, because the command is able to send the progress "
17059 "notifications. When the bar reaches 100% and the command finishes, the "
17060 "spinner disappears."
17064 #: ../fish/guestfish.pod:834
17066 "Progress bars are enabled by default when guestfish is used interactively. "
17067 "You can enable them even for non-interactive modes using I<--progress-bars>, "
17068 "and you can disable them completely using I<--no-progress-bars>."
17072 #: ../fish/guestfish.pod:839
17073 msgid "GUESTFISH COMMANDS"
17077 #: ../fish/guestfish.pod:841
17079 "The commands in this section are guestfish convenience commands, in other "
17080 "words, they are not part of the L<guestfs(3)> API."
17084 #: ../fish/guestfish.pod:844
17089 #: ../fish/guestfish.pod:846
17098 #: ../fish/guestfish.pod:849
17100 "Without any parameter, this lists all commands. With a C<cmd> parameter, "
17101 "this displays detailed help for a command."
17105 #: ../fish/guestfish.pod:852
17106 msgid "quit | exit"
17110 #: ../fish/guestfish.pod:854
17111 msgid "This exits guestfish. You can also use C<^D> key."
17115 #: ../fish/guestfish.pod:856
17116 msgid "@FISH_COMMANDS@"
17120 #: ../fish/guestfish.pod:858
17125 #: ../fish/guestfish.pod:862 ../test-tool/libguestfs-test-tool.pod:83
17130 #: ../fish/guestfish.pod:864
17132 "guestfish returns 0 if the commands completed without error, or 1 if there "
17137 #: ../fish/guestfish.pod:871
17142 #: ../fish/guestfish.pod:873
17144 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
17149 #: ../fish/guestfish.pod:876
17150 msgid "GUESTFISH_PID"
17154 #: ../fish/guestfish.pod:878
17156 "Used with the I<--remote> option to specify the remote guestfish process to "
17157 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
17161 #: ../fish/guestfish.pod:882
17166 #: ../fish/guestfish.pod:884
17168 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
17169 "not specified, the external L<hexedit(1)> program is used."
17173 #: ../fish/guestfish.pod:888
17178 #: ../fish/guestfish.pod:890
17180 "If compiled with GNU readline support, various files in the home directory "
17181 "can be used. See L</FILES>."
17185 #: ../fish/guestfish.pod:899
17187 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
17188 "effect as using the B<-v> option."
17192 #: ../fish/guestfish.pod:911
17194 "Set the path that guestfish uses to search for kernel and initrd.img. See "
17195 "the discussion of paths in L<guestfs(3)>."
17199 #: ../fish/guestfish.pod:922
17200 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
17204 #: ../fish/guestfish.pod:924
17209 #: ../fish/guestfish.pod:926
17211 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
17216 #: ../fish/guestfish.pod:941 ../test-tool/libguestfs-test-tool.pod:88
17221 #: ../fish/guestfish.pod:945
17222 msgid "$HOME/.guestfish"
17226 #: ../fish/guestfish.pod:947
17228 "If compiled with GNU readline support, then the command history is saved in "
17233 #: ../fish/guestfish.pod:950
17234 msgid "$HOME/.inputrc"
17238 #: ../fish/guestfish.pod:952
17239 msgid "/etc/inputrc"
17243 #: ../fish/guestfish.pod:954
17245 "If compiled with GNU readline support, then these files can be used to "
17246 "configure readline. For further information, please see L<readline(3)/"
17247 "INITIALIZATION FILE>."
17251 #: ../fish/guestfish.pod:958
17252 msgid "To write rules which only apply to guestfish, use:"
17256 #: ../fish/guestfish.pod:960
17266 #: ../fish/guestfish.pod:964
17268 "Variables that you can set in inputrc that change the behaviour of guestfish "
17269 "in useful ways include:"
17273 #: ../fish/guestfish.pod:969
17274 msgid "completion-ignore-case (default: on)"
17278 #: ../fish/guestfish.pod:971
17280 "By default, guestfish will ignore case when tab-completing paths on the "
17285 #: ../fish/guestfish.pod:974
17288 " set completion-ignore-case off\n"
17293 #: ../fish/guestfish.pod:976
17294 msgid "to make guestfish case sensitive."
17298 #: ../fish/guestfish.pod:980
17303 #: ../fish/guestfish.pod:982
17304 msgid "test2.img (etc)"
17308 #: ../fish/guestfish.pod:984
17310 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
17311 "will be created in the file C<test1.img> in the current directory. The "
17312 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
17313 "the same name will be overwritten."
17317 #: ../fish/guestfish.pod:993
17319 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
17320 "L<virt-edit(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, "
17321 "L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
17322 "L<virt-tar(1)>, L<virt-win-reg(1)>, L<hexedit(1)>."
17326 #: ../fish/guestfish.pod:1017 ../test-tool/libguestfs-test-tool.pod:124
17327 #: ../fuse/guestmount.pod:234 ../inspector/virt-inspector.pl:903
17328 #: ../tools/virt-edit.pl:370 ../tools/virt-win-reg.pl:521
17329 #: ../tools/virt-df.pl:657 ../tools/virt-ls.pl:254
17330 #: ../tools/virt-resize.pl:1516 ../tools/virt-list-filesystems.pl:236
17331 #: ../tools/virt-cat.pl:206 ../tools/virt-tar.pl:302
17332 #: ../tools/virt-rescue.pl:285 ../tools/virt-make-fs.pl:567
17333 #: ../tools/virt-list-partitions.pl:273
17335 "This program is free software; you can redistribute it and/or modify it "
17336 "under the terms of the GNU General Public License as published by the Free "
17337 "Software Foundation; either version 2 of the License, or (at your option) "
17338 "any later version."
17342 #: ../fish/guestfish.pod:1022 ../test-tool/libguestfs-test-tool.pod:129
17343 #: ../fuse/guestmount.pod:239 ../inspector/virt-inspector.pl:908
17344 #: ../tools/virt-edit.pl:375 ../tools/virt-win-reg.pl:526
17345 #: ../tools/virt-df.pl:662 ../tools/virt-ls.pl:259
17346 #: ../tools/virt-resize.pl:1521 ../tools/virt-list-filesystems.pl:241
17347 #: ../tools/virt-cat.pl:211 ../tools/virt-tar.pl:307
17348 #: ../tools/virt-rescue.pl:290 ../tools/virt-make-fs.pl:572
17349 #: ../tools/virt-list-partitions.pl:278
17351 "This program is distributed in the hope that it will be useful, but WITHOUT "
17352 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
17353 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
17358 #: ../fish/guestfish.pod:1027 ../test-tool/libguestfs-test-tool.pod:134
17359 #: ../fuse/guestmount.pod:244 ../inspector/virt-inspector.pl:913
17360 #: ../tools/virt-edit.pl:380 ../tools/virt-win-reg.pl:531
17361 #: ../tools/virt-df.pl:667 ../tools/virt-ls.pl:264
17362 #: ../tools/virt-resize.pl:1526 ../tools/virt-list-filesystems.pl:246
17363 #: ../tools/virt-cat.pl:216 ../tools/virt-tar.pl:312
17364 #: ../tools/virt-rescue.pl:295 ../tools/virt-make-fs.pl:577
17365 #: ../tools/virt-list-partitions.pl:283
17367 "You should have received a copy of the GNU General Public License along with "
17368 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
17369 "Ave, Cambridge, MA 02139, USA."
17373 #: ../fish/guestfish-actions.pod:1
17378 #: ../fish/guestfish-actions.pod:3
17381 " add-cdrom filename\n"
17386 #: ../fish/guestfish-actions.pod:15
17388 "This call checks for the existence of C<filename>. This stops you from "
17389 "specifying other types of drive which are supported by qemu such as C<nbd:> "
17390 "and C<http:> URLs. To specify those, use the general L</config> call "
17395 #: ../fish/guestfish-actions.pod:22
17397 "If you just want to add an ISO file (often you use this as an efficient way "
17398 "to transfer large files into the guest), then you should probably use L</add-"
17399 "drive-ro> instead."
17403 #: ../fish/guestfish-actions.pod:35
17408 #: ../fish/guestfish-actions.pod:37
17411 " add-drive filename\n"
17416 #: ../fish/guestfish-actions.pod:39
17418 "This function is the equivalent of calling L</add-drive-opts> with no "
17419 "optional parameters, so the disk is added writable, with the format being "
17420 "detected automatically."
17424 #: ../fish/guestfish-actions.pod:43
17426 "Automatic detection of the format opens you up to a potential security hole "
17427 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
17428 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
17429 "you should think about replacing calls to this function with calls to L</add-"
17430 "drive-opts>, and specifying the format."
17434 #: ../fish/guestfish-actions.pod:50
17435 msgid "add-drive-opts"
17439 #: ../fish/guestfish-actions.pod:52
17444 #: ../fish/guestfish-actions.pod:54
17447 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
17452 #: ../fish/guestfish-actions.pod:81
17454 "This forces the image format. If you omit this (or use L</add-drive> or L</"
17455 "add-drive-ro>) then the format is automatically detected. Possible formats "
17456 "include C<raw> and C<qcow2>."
17460 #: ../fish/guestfish-actions.pod:92
17462 "This rarely-used option lets you emulate the behaviour of the deprecated L</"
17463 "add-drive-with-if> call (q.v.)"
17467 #: ../fish/guestfish-actions.pod:97
17469 "This command has one or more optional arguments. See L</OPTIONAL ARGUMENTS>."
17473 #: ../fish/guestfish-actions.pod:99
17474 msgid "add-drive-ro"
17478 #: ../fish/guestfish-actions.pod:101
17483 #: ../fish/guestfish-actions.pod:103
17486 " add-drive-ro filename\n"
17491 #: ../fish/guestfish-actions.pod:105
17493 "This function is the equivalent of calling L</add-drive-opts> with the "
17494 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
17495 "is added read-only, with the format being detected automatically."
17499 #: ../fish/guestfish-actions.pod:110
17500 msgid "add-drive-ro-with-if"
17504 #: ../fish/guestfish-actions.pod:112
17507 " add-drive-ro-with-if filename iface\n"
17512 #: ../fish/guestfish-actions.pod:114
17514 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
17515 "interface emulation to use at run time."
17519 #: ../fish/guestfish-actions.pod:124
17520 msgid "add-drive-with-if"
17524 #: ../fish/guestfish-actions.pod:126
17527 " add-drive-with-if filename iface\n"
17532 #: ../fish/guestfish-actions.pod:128
17534 "This is the same as L</add-drive> but it allows you to specify the QEMU "
17535 "interface emulation to use at run time."
17539 #: ../fish/guestfish-actions.pod:138
17544 #: ../fish/guestfish-actions.pod:140
17547 " aug-clear augpath\n"
17552 #: ../fish/guestfish-actions.pod:145
17557 #: ../fish/guestfish-actions.pod:147
17565 #: ../fish/guestfish-actions.pod:149
17567 "Close the current Augeas handle and free up any resources used by it. After "
17568 "calling this, you have to call L</aug-init> again before you can use any "
17569 "other Augeas functions."
17573 #: ../fish/guestfish-actions.pod:154
17574 msgid "aug-defnode"
17578 #: ../fish/guestfish-actions.pod:156
17581 " aug-defnode name expr val\n"
17586 #: ../fish/guestfish-actions.pod:161
17588 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
17589 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
17590 "containing that single node."
17594 #: ../fish/guestfish-actions.pod:169
17599 #: ../fish/guestfish-actions.pod:171
17602 " aug-defvar name expr\n"
17607 #: ../fish/guestfish-actions.pod:180
17612 #: ../fish/guestfish-actions.pod:182
17615 " aug-get augpath\n"
17620 #: ../fish/guestfish-actions.pod:187
17625 #: ../fish/guestfish-actions.pod:189
17628 " aug-init root flags\n"
17633 #: ../fish/guestfish-actions.pod:195
17634 msgid "You must call this before using any other L</aug-*> commands."
17638 #: ../fish/guestfish-actions.pod:230
17639 msgid "Do not load the tree in L</aug-init>."
17643 #: ../fish/guestfish-actions.pod:234
17644 msgid "To close the handle, you can call L</aug-close>."
17648 #: ../fish/guestfish-actions.pod:238
17653 #: ../fish/guestfish-actions.pod:240
17656 " aug-insert augpath label true|false\n"
17661 #: ../fish/guestfish-actions.pod:250
17666 #: ../fish/guestfish-actions.pod:252
17674 #: ../fish/guestfish-actions.pod:259
17679 #: ../fish/guestfish-actions.pod:261
17682 " aug-ls augpath\n"
17687 #: ../fish/guestfish-actions.pod:263
17689 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
17690 "resulting nodes into alphabetical order."
17694 #: ../fish/guestfish-actions.pod:266
17699 #: ../fish/guestfish-actions.pod:268
17702 " aug-match augpath\n"
17707 #: ../fish/guestfish-actions.pod:274
17712 #: ../fish/guestfish-actions.pod:276
17715 " aug-mv src dest\n"
17720 #: ../fish/guestfish-actions.pod:281
17725 #: ../fish/guestfish-actions.pod:283
17728 " aug-rm augpath\n"
17733 #: ../fish/guestfish-actions.pod:289
17738 #: ../fish/guestfish-actions.pod:291
17746 #: ../fish/guestfish-actions.pod:295
17748 "The flags which were passed to L</aug-init> affect exactly how files are "
17753 #: ../fish/guestfish-actions.pod:298
17758 #: ../fish/guestfish-actions.pod:300
17761 " aug-set augpath val\n"
17766 #: ../fish/guestfish-actions.pod:304
17768 "In the Augeas API, it is possible to clear a node by setting the value to "
17769 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
17770 "this call. Instead you must use the L</aug-clear> call."
17774 #: ../fish/guestfish-actions.pod:309
17779 #: ../fish/guestfish-actions.pod:311
17782 " available 'groups ...'\n"
17787 #: ../fish/guestfish-actions.pod:317
17789 "The libguestfs groups, and the functions that those groups correspond to, "
17790 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
17791 "runtime by calling L</available-all-groups>."
17795 #: ../fish/guestfish-actions.pod:341
17796 msgid "You must call L</launch> before calling this function."
17800 #: ../fish/guestfish-actions.pod:363
17802 "This call was added in version C<1.0.80>. In previous versions of "
17803 "libguestfs all you could do would be to speculatively execute a command to "
17804 "find out if the daemon implemented it. See also L</version>."
17808 #: ../fish/guestfish-actions.pod:370
17809 msgid "available-all-groups"
17813 #: ../fish/guestfish-actions.pod:372
17816 " available-all-groups\n"
17821 #: ../fish/guestfish-actions.pod:374
17823 "This command returns a list of all optional groups that this daemon knows "
17824 "about. Note this returns both supported and unsupported groups. To find "
17825 "out which ones the daemon can actually support you have to call L</"
17826 "available> on each member of the returned list."
17830 #: ../fish/guestfish-actions.pod:380
17831 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
17835 #: ../fish/guestfish-actions.pod:382
17840 #: ../fish/guestfish-actions.pod:384
17843 " base64-in (base64file|-) filename\n"
17848 #: ../fish/guestfish-actions.pod:389 ../fish/guestfish-actions.pod:398
17849 #: ../fish/guestfish-actions.pod:622 ../fish/guestfish-actions.pod:769
17850 #: ../fish/guestfish-actions.pod:816 ../fish/guestfish-actions.pod:835
17851 #: ../fish/guestfish-actions.pod:1212 ../fish/guestfish-actions.pod:3896
17852 #: ../fish/guestfish-actions.pod:3908 ../fish/guestfish-actions.pod:3919
17853 #: ../fish/guestfish-actions.pod:3930 ../fish/guestfish-actions.pod:3982
17854 #: ../fish/guestfish-actions.pod:3991 ../fish/guestfish-actions.pod:4045
17855 #: ../fish/guestfish-actions.pod:4068
17856 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
17860 #: ../fish/guestfish-actions.pod:391
17865 #: ../fish/guestfish-actions.pod:393
17868 " base64-out filename (base64file|-)\n"
17873 #: ../fish/guestfish-actions.pod:400
17874 msgid "blockdev-flushbufs"
17878 #: ../fish/guestfish-actions.pod:402
17881 " blockdev-flushbufs device\n"
17886 #: ../fish/guestfish-actions.pod:409
17887 msgid "blockdev-getbsz"
17891 #: ../fish/guestfish-actions.pod:411
17894 " blockdev-getbsz device\n"
17899 #: ../fish/guestfish-actions.pod:420
17900 msgid "blockdev-getro"
17904 #: ../fish/guestfish-actions.pod:422
17907 " blockdev-getro device\n"
17912 #: ../fish/guestfish-actions.pod:429
17913 msgid "blockdev-getsize64"
17917 #: ../fish/guestfish-actions.pod:431
17920 " blockdev-getsize64 device\n"
17925 #: ../fish/guestfish-actions.pod:435
17926 msgid "See also L</blockdev-getsz>."
17930 #: ../fish/guestfish-actions.pod:439
17931 msgid "blockdev-getss"
17935 #: ../fish/guestfish-actions.pod:441
17938 " blockdev-getss device\n"
17943 #: ../fish/guestfish-actions.pod:446
17945 "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
17949 #: ../fish/guestfish-actions.pod:451
17950 msgid "blockdev-getsz"
17954 #: ../fish/guestfish-actions.pod:453
17957 " blockdev-getsz device\n"
17962 #: ../fish/guestfish-actions.pod:458
17964 "See also L</blockdev-getss> for the real sector size of the device, and L</"
17965 "blockdev-getsize64> for the more useful I<size in bytes>."
17969 #: ../fish/guestfish-actions.pod:464
17970 msgid "blockdev-rereadpt"
17974 #: ../fish/guestfish-actions.pod:466
17977 " blockdev-rereadpt device\n"
17982 #: ../fish/guestfish-actions.pod:472
17983 msgid "blockdev-setbsz"
17987 #: ../fish/guestfish-actions.pod:474
17990 " blockdev-setbsz device blocksize\n"
17995 #: ../fish/guestfish-actions.pod:483
17996 msgid "blockdev-setro"
18000 #: ../fish/guestfish-actions.pod:485
18003 " blockdev-setro device\n"
18008 #: ../fish/guestfish-actions.pod:491
18009 msgid "blockdev-setrw"
18013 #: ../fish/guestfish-actions.pod:493
18016 " blockdev-setrw device\n"
18021 #: ../fish/guestfish-actions.pod:499
18022 msgid "case-sensitive-path"
18026 #: ../fish/guestfish-actions.pod:501
18029 " case-sensitive-path path\n"
18034 #: ../fish/guestfish-actions.pod:525
18036 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return C<\"/"
18037 "WINDOWS/system32\"> (the exact return value would depend on details of how "
18038 "the directories were originally created under Windows)."
18042 #: ../fish/guestfish-actions.pod:533
18043 msgid "See also L</realpath>."
18047 #: ../fish/guestfish-actions.pod:535
18052 #: ../fish/guestfish-actions.pod:537
18060 #: ../fish/guestfish-actions.pod:541
18062 "Note that this function cannot correctly handle binary files (specifically, "
18063 "files containing C<\\0> character which is treated as end of string). For "
18064 "those you need to use the L</read-file> or L</download> functions which have "
18065 "a more complex interface."
18069 #: ../fish/guestfish-actions.pod:549
18074 #: ../fish/guestfish-actions.pod:551
18077 " checksum csumtype path\n"
18082 #: ../fish/guestfish-actions.pod:594
18083 msgid "To get the checksum for a device, use L</checksum-device>."
18087 #: ../fish/guestfish-actions.pod:596
18088 msgid "To get the checksums for many files, use L</checksums-out>."
18092 #: ../fish/guestfish-actions.pod:598
18093 msgid "checksum-device"
18097 #: ../fish/guestfish-actions.pod:600
18100 " checksum-device csumtype device\n"
18105 #: ../fish/guestfish-actions.pod:602
18107 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
18108 "device named C<device>. For the types of checksums supported see the L</"
18109 "checksum> command."
18113 #: ../fish/guestfish-actions.pod:606
18114 msgid "checksums-out"
18118 #: ../fish/guestfish-actions.pod:608
18121 " checksums-out csumtype directory (sumsfile|-)\n"
18126 #: ../fish/guestfish-actions.pod:624
18131 #: ../fish/guestfish-actions.pod:626
18134 " chmod mode path\n"
18139 #: ../fish/guestfish-actions.pod:637
18144 #: ../fish/guestfish-actions.pod:639
18147 " chown owner group path\n"
18152 #: ../fish/guestfish-actions.pod:647
18157 #: ../fish/guestfish-actions.pod:649
18160 " command 'arguments ...'\n"
18165 #: ../fish/guestfish-actions.pod:656
18167 "The single parameter is an argv-style list of arguments. The first element "
18168 "is the name of the program to run. Subsequent elements are parameters. The "
18169 "list must be non-empty (ie. must contain a program name). Note that the "
18170 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
18174 #: ../fish/guestfish-actions.pod:684
18175 msgid "command-lines"
18179 #: ../fish/guestfish-actions.pod:686
18182 " command-lines 'arguments ...'\n"
18187 #: ../fish/guestfish-actions.pod:688
18189 "This is the same as L</command>, but splits the result into a list of lines."
18193 #: ../fish/guestfish-actions.pod:691
18194 msgid "See also: L</sh-lines>"
18198 #: ../fish/guestfish-actions.pod:696
18203 #: ../fish/guestfish-actions.pod:698
18206 " config qemuparam qemuvalue\n"
18211 #: ../fish/guestfish-actions.pod:709
18216 #: ../fish/guestfish-actions.pod:711
18219 " copy-size src dest size\n"
18224 #: ../fish/guestfish-actions.pod:719
18229 #: ../fish/guestfish-actions.pod:721
18237 #: ../fish/guestfish-actions.pod:726
18242 #: ../fish/guestfish-actions.pod:728
18250 #: ../fish/guestfish-actions.pod:733
18255 #: ../fish/guestfish-actions.pod:735
18263 #: ../fish/guestfish-actions.pod:742
18265 "If the destination is a device, it must be as large or larger than the "
18266 "source file or device, otherwise the copy will fail. This command cannot do "
18267 "partial copies (see L</copy-size>)."
18271 #: ../fish/guestfish-actions.pod:746
18276 #: ../fish/guestfish-actions.pod:748
18279 " debug subcmd 'extraargs ...'\n"
18284 #: ../fish/guestfish-actions.pod:750
18286 "The L</debug> command exposes some internals of C<guestfsd> (the guestfs "
18287 "daemon) that runs inside the qemu subprocess."
18291 #: ../fish/guestfish-actions.pod:758
18292 msgid "debug-upload"
18296 #: ../fish/guestfish-actions.pod:760
18299 " debug-upload (filename|-) tmpname mode\n"
18304 #: ../fish/guestfish-actions.pod:762
18306 "The L</debug-upload> command uploads a file to the libguestfs appliance."
18310 #: ../fish/guestfish-actions.pod:771
18315 #: ../fish/guestfish-actions.pod:773
18323 #: ../fish/guestfish-actions.pod:781
18328 #: ../fish/guestfish-actions.pod:783
18336 #: ../fish/guestfish-actions.pod:792
18341 #: ../fish/guestfish-actions.pod:794
18349 #: ../fish/guestfish-actions.pod:800
18351 "Another way to get the same information is to enable verbose messages with "
18352 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
18353 "before running the program."
18357 #: ../fish/guestfish-actions.pod:805
18362 #: ../fish/guestfish-actions.pod:807
18365 " download remotefilename (filename|-)\n"
18370 #: ../fish/guestfish-actions.pod:814
18371 msgid "See also L</upload>, L</cat>."
18375 #: ../fish/guestfish-actions.pod:818
18376 msgid "download-offset"
18380 #: ../fish/guestfish-actions.pod:820
18383 " download-offset remotefilename (filename|-) offset size\n"
18388 #: ../fish/guestfish-actions.pod:828
18390 "Note that there is no limit on the amount of data that can be downloaded "
18391 "with this call, unlike with L</pread>, and this call always reads the full "
18392 "amount unless an error occurs."
18396 #: ../fish/guestfish-actions.pod:833
18397 msgid "See also L</download>, L</pread>."
18401 #: ../fish/guestfish-actions.pod:837
18402 msgid "drop-caches"
18406 #: ../fish/guestfish-actions.pod:839
18409 " drop-caches whattodrop\n"
18414 #: ../fish/guestfish-actions.pod:851
18419 #: ../fish/guestfish-actions.pod:853
18427 #: ../fish/guestfish-actions.pod:865
18432 #: ../fish/guestfish-actions.pod:867
18435 " e2fsck-f device\n"
18440 #: ../fish/guestfish-actions.pod:873
18442 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
18443 "should use L</fsck>."
18447 #: ../fish/guestfish-actions.pod:876
18448 msgid "echo-daemon"
18452 #: ../fish/guestfish-actions.pod:878
18455 " echo-daemon 'words ...'\n"
18460 #: ../fish/guestfish-actions.pod:885
18461 msgid "See also L</ping-daemon>."
18465 #: ../fish/guestfish-actions.pod:887
18470 #: ../fish/guestfish-actions.pod:889
18473 " egrep regex path\n"
18478 #: ../fish/guestfish-actions.pod:897
18483 #: ../fish/guestfish-actions.pod:899
18486 " egrepi regex path\n"
18491 #: ../fish/guestfish-actions.pod:907
18496 #: ../fish/guestfish-actions.pod:909
18499 " equal file1 file2\n"
18504 #: ../fish/guestfish-actions.pod:916
18509 #: ../fish/guestfish-actions.pod:918
18517 #: ../fish/guestfish-actions.pod:923
18518 msgid "See also L</is-file>, L</is-dir>, L</stat>."
18522 #: ../fish/guestfish-actions.pod:925
18527 #: ../fish/guestfish-actions.pod:927
18530 " fallocate path len\n"
18535 #: ../fish/guestfish-actions.pod:944
18536 msgid "fallocate64"
18540 #: ../fish/guestfish-actions.pod:946
18543 " fallocate64 path len\n"
18548 #: ../fish/guestfish-actions.pod:952
18550 "Note that this call allocates disk blocks for the file. To create a sparse "
18551 "file use L</truncate-size> instead."
18555 #: ../fish/guestfish-actions.pod:955
18557 "The deprecated call L</fallocate> does the same, but owing to an oversight "
18558 "it only allowed 30 bit lengths to be specified, effectively limiting the "
18559 "maximum size of files created through that call to 1GB."
18563 #: ../fish/guestfish-actions.pod:964
18568 #: ../fish/guestfish-actions.pod:966
18571 " fgrep pattern path\n"
18576 #: ../fish/guestfish-actions.pod:974
18581 #: ../fish/guestfish-actions.pod:976
18584 " fgrepi pattern path\n"
18589 #: ../fish/guestfish-actions.pod:984
18594 #: ../fish/guestfish-actions.pod:986
18602 #: ../fish/guestfish-actions.pod:998
18604 "This command can also be used on C</dev/> devices (and partitions, LV "
18605 "names). You can for example use this to determine if a device contains a "
18606 "filesystem, although it's usually better to use L</vfs-type>."
18610 #: ../fish/guestfish-actions.pod:1008
18611 msgid "file-architecture"
18615 #: ../fish/guestfish-actions.pod:1010
18618 " file-architecture filename\n"
18623 #: ../fish/guestfish-actions.pod:1113
18628 #: ../fish/guestfish-actions.pod:1115
18636 #: ../fish/guestfish-actions.pod:1119
18638 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, L</is-"
18639 "file> etc. To get the size of block devices, use L</blockdev-getsize64>."
18643 #: ../fish/guestfish-actions.pod:1123
18648 #: ../fish/guestfish-actions.pod:1125
18651 " fill c len path\n"
18656 #: ../fish/guestfish-actions.pod:1131
18658 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
18659 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
18660 "L</fill-pattern>."
18664 #: ../fish/guestfish-actions.pod:1136
18665 msgid "fill-pattern"
18669 #: ../fish/guestfish-actions.pod:1138
18672 " fill-pattern pattern len path\n"
18677 #: ../fish/guestfish-actions.pod:1140
18679 "This function is like L</fill> except that it creates a new file of length "
18680 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
18681 "is truncated if necessary to ensure the length of the file is exactly C<len> "
18686 #: ../fish/guestfish-actions.pod:1145
18691 #: ../fish/guestfish-actions.pod:1147
18694 " find directory\n"
18699 #: ../fish/guestfish-actions.pod:1161
18700 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
18704 #: ../fish/guestfish-actions.pod:1174
18705 msgid "See also L</find0>."
18709 #: ../fish/guestfish-actions.pod:1179
18714 #: ../fish/guestfish-actions.pod:1181
18717 " find0 directory (files|-)\n"
18722 #: ../fish/guestfish-actions.pod:1187
18724 "This command works the same way as L</find> with the following exceptions:"
18728 #: ../fish/guestfish-actions.pod:1214
18729 msgid "findfs-label"
18733 #: ../fish/guestfish-actions.pod:1216
18736 " findfs-label label\n"
18741 #: ../fish/guestfish-actions.pod:1222
18742 msgid "To find the label of a filesystem, use L</vfs-label>."
18746 #: ../fish/guestfish-actions.pod:1224
18747 msgid "findfs-uuid"
18751 #: ../fish/guestfish-actions.pod:1226
18754 " findfs-uuid uuid\n"
18759 #: ../fish/guestfish-actions.pod:1232
18760 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
18764 #: ../fish/guestfish-actions.pod:1234
18769 #: ../fish/guestfish-actions.pod:1236
18772 " fsck fstype device\n"
18777 #: ../fish/guestfish-actions.pod:1266
18782 #: ../fish/guestfish-actions.pod:1268
18790 #: ../fish/guestfish-actions.pod:1275
18791 msgid "get-autosync"
18795 #: ../fish/guestfish-actions.pod:1277
18803 #: ../fish/guestfish-actions.pod:1281
18808 #: ../fish/guestfish-actions.pod:1283
18816 #: ../fish/guestfish-actions.pod:1287
18817 msgid "get-e2label"
18821 #: ../fish/guestfish-actions.pod:1289
18824 " get-e2label device\n"
18829 #: ../fish/guestfish-actions.pod:1301
18834 #: ../fish/guestfish-actions.pod:1303
18837 " get-e2uuid device\n"
18842 #: ../fish/guestfish-actions.pod:1315
18843 msgid "get-memsize"
18847 #: ../fish/guestfish-actions.pod:1317
18855 #: ../fish/guestfish-actions.pod:1322
18857 "If L</set-memsize> was not called on this handle, and if "
18858 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
18859 "value for memsize."
18863 #: ../fish/guestfish-actions.pod:1329
18864 msgid "get-network"
18868 #: ../fish/guestfish-actions.pod:1331
18876 #: ../fish/guestfish-actions.pod:1335
18881 #: ../fish/guestfish-actions.pod:1337
18889 #: ../fish/guestfish-actions.pod:1344
18894 #: ../fish/guestfish-actions.pod:1346
18899 #: ../fish/guestfish-actions.pod:1348
18907 #: ../fish/guestfish-actions.pod:1355
18912 #: ../fish/guestfish-actions.pod:1357
18920 #: ../fish/guestfish-actions.pod:1364
18921 msgid "get-recovery-proc"
18925 #: ../fish/guestfish-actions.pod:1366
18928 " get-recovery-proc\n"
18933 #: ../fish/guestfish-actions.pod:1370
18934 msgid "get-selinux"
18938 #: ../fish/guestfish-actions.pod:1372
18946 #: ../fish/guestfish-actions.pod:1374
18948 "This returns the current setting of the selinux flag which is passed to the "
18949 "appliance at boot time. See L</set-selinux>."
18953 #: ../fish/guestfish-actions.pod:1380
18958 #: ../fish/guestfish-actions.pod:1382
18966 #: ../fish/guestfish-actions.pod:1389
18971 #: ../fish/guestfish-actions.pod:1391
18979 #: ../fish/guestfish-actions.pod:1395
18984 #: ../fish/guestfish-actions.pod:1397
18992 #: ../fish/guestfish-actions.pod:1399
18994 "Return the current umask. By default the umask is C<022> unless it has been "
18995 "set by calling L</umask>."
18999 #: ../fish/guestfish-actions.pod:1402
19000 msgid "get-verbose"
19004 #: ../fish/guestfish-actions.pod:1404
19012 #: ../fish/guestfish-actions.pod:1408
19017 #: ../fish/guestfish-actions.pod:1410
19025 #: ../fish/guestfish-actions.pod:1414
19026 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
19030 #: ../fish/guestfish-actions.pod:1417
19035 #: ../fish/guestfish-actions.pod:1419
19038 " getxattrs path\n"
19043 #: ../fish/guestfish-actions.pod:1427
19044 msgid "See also: L</lgetxattrs>, L<attr(5)>."
19048 #: ../fish/guestfish-actions.pod:1429
19049 msgid "glob-expand"
19053 #: ../fish/guestfish-actions.pod:1431
19056 " glob-expand pattern\n"
19061 #: ../fish/guestfish-actions.pod:1444
19066 #: ../fish/guestfish-actions.pod:1446
19069 " grep regex path\n"
19074 #: ../fish/guestfish-actions.pod:1454
19079 #: ../fish/guestfish-actions.pod:1456
19082 " grepi regex path\n"
19087 #: ../fish/guestfish-actions.pod:1464
19088 msgid "grub-install"
19092 #: ../fish/guestfish-actions.pod:1466
19095 " grub-install root device\n"
19100 #: ../fish/guestfish-actions.pod:1482
19105 #: ../fish/guestfish-actions.pod:1484
19113 #: ../fish/guestfish-actions.pod:1492
19118 #: ../fish/guestfish-actions.pod:1494
19121 " head-n nrlines path\n"
19126 #: ../fish/guestfish-actions.pod:1507
19131 #: ../fish/guestfish-actions.pod:1509
19139 #: ../fish/guestfish-actions.pod:1517
19144 #: ../fish/guestfish-actions.pod:1519
19147 " initrd-cat initrdpath filename\n"
19152 #: ../fish/guestfish-actions.pod:1531
19153 msgid "See also L</initrd-list>."
19157 #: ../fish/guestfish-actions.pod:1536
19158 msgid "initrd-list"
19162 #: ../fish/guestfish-actions.pod:1538
19165 " initrd-list path\n"
19170 #: ../fish/guestfish-actions.pod:1550
19171 msgid "inotify-add-watch"
19175 #: ../fish/guestfish-actions.pod:1552
19178 " inotify-add-watch path mask\n"
19183 #: ../fish/guestfish-actions.pod:1564
19184 msgid "inotify-close"
19188 #: ../fish/guestfish-actions.pod:1566
19196 #: ../fish/guestfish-actions.pod:1572
19197 msgid "inotify-files"
19201 #: ../fish/guestfish-actions.pod:1574
19209 #: ../fish/guestfish-actions.pod:1576
19211 "This function is a helpful wrapper around L</inotify-read> which just "
19212 "returns a list of pathnames of objects that were touched. The returned "
19213 "pathnames are sorted and deduplicated."
19217 #: ../fish/guestfish-actions.pod:1580
19218 msgid "inotify-init"
19222 #: ../fish/guestfish-actions.pod:1582
19225 " inotify-init maxevents\n"
19230 #: ../fish/guestfish-actions.pod:1588
19232 "C<maxevents> is the maximum number of events which will be queued up between "
19233 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
19234 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
19235 "default was 16384 events. Beyond this limit, the kernel throws away events, "
19236 "but records the fact that it threw them away by setting a flag "
19237 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
19241 #: ../fish/guestfish-actions.pod:1598
19243 "Before any events are generated, you have to add some watches to the "
19244 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
19245 "L</inotify-watch-all>."
19249 #: ../fish/guestfish-actions.pod:1604
19251 "Queued up events should be read periodically by calling L</inotify-read> (or "
19252 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
19253 "If you don't read the events out often enough then you risk the internal "
19254 "queue overflowing."
19258 #: ../fish/guestfish-actions.pod:1611
19260 "The handle should be closed after use by calling L</inotify-close>. This "
19261 "also removes any watches automatically."
19265 #: ../fish/guestfish-actions.pod:1620
19266 msgid "inotify-read"
19270 #: ../fish/guestfish-actions.pod:1622
19278 #: ../fish/guestfish-actions.pod:1635
19279 msgid "inotify-rm-watch"
19283 #: ../fish/guestfish-actions.pod:1637
19286 " inotify-rm-watch wd\n"
19291 #: ../fish/guestfish-actions.pod:1639
19292 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
19296 #: ../fish/guestfish-actions.pod:1642
19297 msgid "inspect-get-arch"
19301 #: ../fish/guestfish-actions.pod:1644
19304 " inspect-get-arch root\n"
19309 #: ../fish/guestfish-actions.pod:1646 ../fish/guestfish-actions.pod:1662
19310 #: ../fish/guestfish-actions.pod:1708 ../fish/guestfish-actions.pod:1726
19311 #: ../fish/guestfish-actions.pod:1747 ../fish/guestfish-actions.pod:1762
19312 #: ../fish/guestfish-actions.pod:1785 ../fish/guestfish-actions.pod:1802
19314 "This function should only be called with a root device string as returned by "
19319 #: ../fish/guestfish-actions.pod:1649
19321 "This returns the architecture of the inspected operating system. The "
19322 "possible return values are listed under L</file-architecture>."
19326 #: ../fish/guestfish-actions.pod:1658
19327 msgid "inspect-get-distro"
19331 #: ../fish/guestfish-actions.pod:1660
19334 " inspect-get-distro root\n"
19339 #: ../fish/guestfish-actions.pod:1704
19340 msgid "inspect-get-filesystems"
19344 #: ../fish/guestfish-actions.pod:1706
19347 " inspect-get-filesystems root\n"
19352 #: ../fish/guestfish-actions.pod:1719
19354 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
19355 "get-mountpoints>."
19359 #: ../fish/guestfish-actions.pod:1722
19360 msgid "inspect-get-major-version"
19364 #: ../fish/guestfish-actions.pod:1724
19367 " inspect-get-major-version root\n"
19372 #: ../fish/guestfish-actions.pod:1743
19373 msgid "inspect-get-minor-version"
19377 #: ../fish/guestfish-actions.pod:1745
19380 " inspect-get-minor-version root\n"
19385 #: ../fish/guestfish-actions.pod:1755
19387 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
19388 "get-major-version>."
19392 #: ../fish/guestfish-actions.pod:1758
19393 msgid "inspect-get-mountpoints"
19397 #: ../fish/guestfish-actions.pod:1760
19400 " inspect-get-mountpoints root\n"
19405 #: ../fish/guestfish-actions.pod:1778
19407 "Please read L<guestfs(3)/INSPECTION> for more details. See also L</inspect-"
19408 "get-filesystems>."
19412 #: ../fish/guestfish-actions.pod:1781
19413 msgid "inspect-get-product-name"
19417 #: ../fish/guestfish-actions.pod:1783
19420 " inspect-get-product-name root\n"
19425 #: ../fish/guestfish-actions.pod:1798
19426 msgid "inspect-get-type"
19430 #: ../fish/guestfish-actions.pod:1800
19433 " inspect-get-type root\n"
19438 #: ../fish/guestfish-actions.pod:1829
19443 #: ../fish/guestfish-actions.pod:1831
19451 #: ../fish/guestfish-actions.pod:1846
19453 "You can pass the root string(s) returned to other L</inspect-get-*> "
19454 "functions in order to query further information about each operating system, "
19455 "such as the name and version."
19459 #: ../fish/guestfish-actions.pod:1851
19461 "This function uses other libguestfs features such as L</mount-ro> and L</"
19462 "umount-all> in order to mount and unmount filesystems and look at the "
19463 "contents. This should be called with no disks currently mounted. The "
19464 "function may also use Augeas, so any existing Augeas handle will be closed."
19468 #: ../fish/guestfish-actions.pod:1863 ../fish/guestfish-actions.pod:2019
19469 #: ../fish/guestfish-actions.pod:2065
19470 msgid "See also L</list-filesystems>."
19474 #: ../fish/guestfish-actions.pod:1865
19475 msgid "is-blockdev"
19479 #: ../fish/guestfish-actions.pod:1867
19482 " is-blockdev path\n"
19487 #: ../fish/guestfish-actions.pod:1872 ../fish/guestfish-actions.pod:1890
19488 #: ../fish/guestfish-actions.pod:1909 ../fish/guestfish-actions.pod:1918
19489 #: ../fish/guestfish-actions.pod:1928 ../fish/guestfish-actions.pod:1962
19490 #: ../fish/guestfish-actions.pod:1971
19491 msgid "See also L</stat>."
19495 #: ../fish/guestfish-actions.pod:1874
19500 #: ../fish/guestfish-actions.pod:1876
19508 #: ../fish/guestfish-actions.pod:1883
19513 #: ../fish/guestfish-actions.pod:1885
19516 " is-chardev path\n"
19521 #: ../fish/guestfish-actions.pod:1892
19526 #: ../fish/guestfish-actions.pod:1894
19534 #: ../fish/guestfish-actions.pod:1901
19539 #: ../fish/guestfish-actions.pod:1903
19547 #: ../fish/guestfish-actions.pod:1911
19552 #: ../fish/guestfish-actions.pod:1913
19560 #: ../fish/guestfish-actions.pod:1920
19565 #: ../fish/guestfish-actions.pod:1922
19573 #: ../fish/guestfish-actions.pod:1930
19574 msgid "is-launching"
19578 #: ../fish/guestfish-actions.pod:1932
19586 #: ../fish/guestfish-actions.pod:1939
19591 #: ../fish/guestfish-actions.pod:1941
19599 #: ../fish/guestfish-actions.pod:1946
19604 #: ../fish/guestfish-actions.pod:1948
19612 #: ../fish/guestfish-actions.pod:1955
19617 #: ../fish/guestfish-actions.pod:1957
19620 " is-socket path\n"
19625 #: ../fish/guestfish-actions.pod:1964
19630 #: ../fish/guestfish-actions.pod:1966
19633 " is-symlink path\n"
19638 #: ../fish/guestfish-actions.pod:1973
19639 msgid "kill-subprocess"
19643 #: ../fish/guestfish-actions.pod:1975
19646 " kill-subprocess\n"
19651 #: ../fish/guestfish-actions.pod:1979
19656 #: ../fish/guestfish-actions.pod:1981
19661 #: ../fish/guestfish-actions.pod:1983
19669 #: ../fish/guestfish-actions.pod:1991
19674 #: ../fish/guestfish-actions.pod:1993
19677 " lchown owner group path\n"
19682 #: ../fish/guestfish-actions.pod:1995
19684 "Change the file owner to C<owner> and group to C<group>. This is like L</"
19685 "chown> but if C<path> is a symlink then the link itself is changed, not the "
19690 #: ../fish/guestfish-actions.pod:2003
19695 #: ../fish/guestfish-actions.pod:2005
19698 " lgetxattrs path\n"
19703 #: ../fish/guestfish-actions.pod:2007
19705 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
19706 "it returns the extended attributes of the link itself."
19710 #: ../fish/guestfish-actions.pod:2011
19711 msgid "list-devices"
19715 #: ../fish/guestfish-actions.pod:2013
19723 #: ../fish/guestfish-actions.pod:2021
19724 msgid "list-filesystems"
19728 #: ../fish/guestfish-actions.pod:2023
19731 " list-filesystems\n"
19736 #: ../fish/guestfish-actions.pod:2042
19738 "This command runs other libguestfs commands, which might include L</mount> "
19739 "and L</umount>, and therefore you should use this soon after launch and only "
19740 "when nothing is mounted."
19744 #: ../fish/guestfish-actions.pod:2046
19746 "Not all of the filesystems returned will be mountable. In particular, swap "
19747 "partitions are returned in the list. Also this command does not check that "
19748 "each filesystem found is valid and mountable, and some filesystems might be "
19749 "mountable but require special options. Filesystems may not all belong to a "
19750 "single logical operating system (use L</inspect-os> to look for OSes)."
19754 #: ../fish/guestfish-actions.pod:2054
19755 msgid "list-partitions"
19759 #: ../fish/guestfish-actions.pod:2056
19762 " list-partitions\n"
19767 #: ../fish/guestfish-actions.pod:2062
19769 "This does not return logical volumes. For that you will need to call L</"
19774 #: ../fish/guestfish-actions.pod:2067
19779 #: ../fish/guestfish-actions.pod:2069
19787 #: ../fish/guestfish-actions.pod:2077
19792 #: ../fish/guestfish-actions.pod:2079
19795 " ln target linkname\n"
19800 #: ../fish/guestfish-actions.pod:2083
19805 #: ../fish/guestfish-actions.pod:2085
19808 " ln-f target linkname\n"
19813 #: ../fish/guestfish-actions.pod:2090
19818 #: ../fish/guestfish-actions.pod:2092
19821 " ln-s target linkname\n"
19826 #: ../fish/guestfish-actions.pod:2096
19831 #: ../fish/guestfish-actions.pod:2098
19834 " ln-sf target linkname\n"
19839 #: ../fish/guestfish-actions.pod:2103
19840 msgid "lremovexattr"
19844 #: ../fish/guestfish-actions.pod:2105
19847 " lremovexattr xattr path\n"
19852 #: ../fish/guestfish-actions.pod:2107
19854 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
19855 "it removes an extended attribute of the link itself."
19859 #: ../fish/guestfish-actions.pod:2111
19864 #: ../fish/guestfish-actions.pod:2113
19872 #: ../fish/guestfish-actions.pod:2119
19874 "This command is mostly useful for interactive sessions. Programs should "
19875 "probably use L</readdir> instead."
19879 #: ../fish/guestfish-actions.pod:2122
19884 #: ../fish/guestfish-actions.pod:2124
19887 " lsetxattr xattr val vallen path\n"
19892 #: ../fish/guestfish-actions.pod:2126
19894 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
19895 "sets an extended attribute of the link itself."
19899 #: ../fish/guestfish-actions.pod:2130
19904 #: ../fish/guestfish-actions.pod:2132
19912 #: ../fish/guestfish-actions.pod:2136
19914 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
19915 "the link is stat-ed, not the file it refers to."
19919 #: ../fish/guestfish-actions.pod:2142
19924 #: ../fish/guestfish-actions.pod:2144
19927 " lstatlist path 'names ...'\n"
19932 #: ../fish/guestfish-actions.pod:2146
19934 "This call allows you to perform the L</lstat> operation on multiple files, "
19935 "where all files are in the directory C<path>. C<names> is the list of files "
19936 "from this directory."
19940 #: ../fish/guestfish-actions.pod:2155
19942 "This call is intended for programs that want to efficiently list a directory "
19943 "contents without making many round-trips. See also L</lxattrlist> for a "
19944 "similarly efficient call for getting extended attributes. Very long "
19945 "directory listings might cause the protocol message size to be exceeded, "
19946 "causing this call to fail. The caller must split up such requests into "
19947 "smaller groups of names."
19951 #: ../fish/guestfish-actions.pod:2163
19952 msgid "luks-add-key"
19956 #: ../fish/guestfish-actions.pod:2165
19959 " luks-add-key device keyslot\n"
19964 #: ../fish/guestfish-actions.pod:2172
19966 "Note that if C<keyslot> already contains a key, then this command will "
19967 "fail. You have to use L</luks-kill-slot> first to remove that key."
19971 #: ../fish/guestfish-actions.pod:2176 ../fish/guestfish-actions.pod:2198
19972 #: ../fish/guestfish-actions.pod:2211 ../fish/guestfish-actions.pod:2225
19973 #: ../fish/guestfish-actions.pod:2248 ../fish/guestfish-actions.pod:2258
19975 "This command has one or more key or passphrase parameters. Guestfish will "
19976 "prompt for these separately."
19980 #: ../fish/guestfish-actions.pod:2179
19985 #: ../fish/guestfish-actions.pod:2181
19988 " luks-close device\n"
19993 #: ../fish/guestfish-actions.pod:2183
19995 "This closes a LUKS device that was created earlier by L</luks-open> or L</"
19996 "luks-open-ro>. The C<device> parameter must be the name of the LUKS mapping "
19997 "device (ie. C</dev/mapper/mapname>) and I<not> the name of the underlying "
20002 #: ../fish/guestfish-actions.pod:2189
20003 msgid "luks-format"
20007 #: ../fish/guestfish-actions.pod:2191
20010 " luks-format device keyslot\n"
20015 #: ../fish/guestfish-actions.pod:2204
20016 msgid "luks-format-cipher"
20020 #: ../fish/guestfish-actions.pod:2206
20023 " luks-format-cipher device keyslot cipher\n"
20028 #: ../fish/guestfish-actions.pod:2208
20030 "This command is the same as L</luks-format> but it also allows you to set "
20031 "the C<cipher> used."
20035 #: ../fish/guestfish-actions.pod:2217
20036 msgid "luks-kill-slot"
20040 #: ../fish/guestfish-actions.pod:2219
20043 " luks-kill-slot device keyslot\n"
20048 #: ../fish/guestfish-actions.pod:2228
20053 #: ../fish/guestfish-actions.pod:2230
20056 " luks-open device mapname\n"
20061 #: ../fish/guestfish-actions.pod:2244
20063 "If this block device contains LVM volume groups, then calling L</vgscan> "
20064 "followed by L</vg-activate-all> will make them visible."
20068 #: ../fish/guestfish-actions.pod:2251
20069 msgid "luks-open-ro"
20073 #: ../fish/guestfish-actions.pod:2253
20076 " luks-open-ro device mapname\n"
20081 #: ../fish/guestfish-actions.pod:2255
20083 "This is the same as L</luks-open> except that a read-only mapping is created."
20087 #: ../fish/guestfish-actions.pod:2261
20092 #: ../fish/guestfish-actions.pod:2263
20095 " lvcreate logvol volgroup mbytes\n"
20100 #: ../fish/guestfish-actions.pod:2268
20101 msgid "lvm-canonical-lv-name"
20105 #: ../fish/guestfish-actions.pod:2270
20108 " lvm-canonical-lv-name lvname\n"
20113 #: ../fish/guestfish-actions.pod:2279
20114 msgid "See also L</is-lv>."
20118 #: ../fish/guestfish-actions.pod:2281
20119 msgid "lvm-clear-filter"
20123 #: ../fish/guestfish-actions.pod:2283
20126 " lvm-clear-filter\n"
20131 #: ../fish/guestfish-actions.pod:2285
20133 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
20138 #: ../fish/guestfish-actions.pod:2291
20139 msgid "lvm-remove-all"
20143 #: ../fish/guestfish-actions.pod:2293
20146 " lvm-remove-all\n"
20151 #: ../fish/guestfish-actions.pod:2301
20152 msgid "lvm-set-filter"
20156 #: ../fish/guestfish-actions.pod:2303
20159 " lvm-set-filter 'devices ...'\n"
20164 #: ../fish/guestfish-actions.pod:2328
20169 #: ../fish/guestfish-actions.pod:2330
20172 " lvremove device\n"
20177 #: ../fish/guestfish-actions.pod:2338
20182 #: ../fish/guestfish-actions.pod:2340
20185 " lvrename logvol newlogvol\n"
20190 #: ../fish/guestfish-actions.pod:2344
20195 #: ../fish/guestfish-actions.pod:2346
20198 " lvresize device mbytes\n"
20203 #: ../fish/guestfish-actions.pod:2352
20204 msgid "lvresize-free"
20208 #: ../fish/guestfish-actions.pod:2354
20211 " lvresize-free lv percent\n"
20216 #: ../fish/guestfish-actions.pod:2362
20221 #: ../fish/guestfish-actions.pod:2364
20229 #: ../fish/guestfish-actions.pod:2372
20230 msgid "See also L</lvs-full>, L</list-filesystems>."
20234 #: ../fish/guestfish-actions.pod:2374
20239 #: ../fish/guestfish-actions.pod:2376
20247 #: ../fish/guestfish-actions.pod:2381
20252 #: ../fish/guestfish-actions.pod:2383
20260 #: ../fish/guestfish-actions.pod:2387
20265 #: ../fish/guestfish-actions.pod:2389
20268 " lxattrlist path 'names ...'\n"
20273 #: ../fish/guestfish-actions.pod:2405
20275 "This call is intended for programs that want to efficiently list a directory "
20276 "contents without making many round-trips. See also L</lstatlist> for a "
20277 "similarly efficient call for getting standard stats. Very long directory "
20278 "listings might cause the protocol message size to be exceeded, causing this "
20279 "call to fail. The caller must split up such requests into smaller groups of "
20284 #: ../fish/guestfish-actions.pod:2413
20289 #: ../fish/guestfish-actions.pod:2415
20297 #: ../fish/guestfish-actions.pod:2419
20302 #: ../fish/guestfish-actions.pod:2421
20305 " mkdir-mode path mode\n"
20310 #: ../fish/guestfish-actions.pod:2430
20311 msgid "See also L</mkdir>, L</umask>"
20315 #: ../fish/guestfish-actions.pod:2432
20320 #: ../fish/guestfish-actions.pod:2434
20328 #: ../fish/guestfish-actions.pod:2439
20333 #: ../fish/guestfish-actions.pod:2441
20336 " mkdtemp template\n"
20341 #: ../fish/guestfish-actions.pod:2462
20346 #: ../fish/guestfish-actions.pod:2464
20349 " mke2fs-J fstype blocksize device journal\n"
20354 #: ../fish/guestfish-actions.pod:2472
20355 msgid "See also L</mke2journal>."
20359 #: ../fish/guestfish-actions.pod:2474
20364 #: ../fish/guestfish-actions.pod:2476
20367 " mke2fs-JL fstype blocksize device label\n"
20372 #: ../fish/guestfish-actions.pod:2481
20373 msgid "See also L</mke2journal-L>."
20377 #: ../fish/guestfish-actions.pod:2483
20382 #: ../fish/guestfish-actions.pod:2485
20385 " mke2fs-JU fstype blocksize device uuid\n"
20390 #: ../fish/guestfish-actions.pod:2490
20391 msgid "See also L</mke2journal-U>."
20395 #: ../fish/guestfish-actions.pod:2492
20396 msgid "mke2journal"
20400 #: ../fish/guestfish-actions.pod:2494
20403 " mke2journal blocksize device\n"
20408 #: ../fish/guestfish-actions.pod:2501
20409 msgid "mke2journal-L"
20413 #: ../fish/guestfish-actions.pod:2503
20416 " mke2journal-L blocksize label device\n"
20421 #: ../fish/guestfish-actions.pod:2507
20422 msgid "mke2journal-U"
20426 #: ../fish/guestfish-actions.pod:2509
20429 " mke2journal-U blocksize uuid device\n"
20434 #: ../fish/guestfish-actions.pod:2513
20439 #: ../fish/guestfish-actions.pod:2515
20442 " mkfifo mode path\n"
20447 #: ../fish/guestfish-actions.pod:2517
20449 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
20450 "is just a convenient wrapper around L</mknod>."
20454 #: ../fish/guestfish-actions.pod:2523
20459 #: ../fish/guestfish-actions.pod:2525
20462 " mkfs fstype device\n"
20467 #: ../fish/guestfish-actions.pod:2531
20472 #: ../fish/guestfish-actions.pod:2533
20475 " mkfs-b fstype blocksize device\n"
20480 #: ../fish/guestfish-actions.pod:2535
20482 "This call is similar to L</mkfs>, but it allows you to control the block "
20483 "size of the resulting filesystem. Supported block sizes depend on the "
20484 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
20488 #: ../fish/guestfish-actions.pod:2543
20489 msgid "mkmountpoint"
20493 #: ../fish/guestfish-actions.pod:2545
20496 " mkmountpoint exemptpath\n"
20501 #: ../fish/guestfish-actions.pod:2547
20503 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
20504 "to create extra mountpoints before mounting the first filesystem."
20508 #: ../fish/guestfish-actions.pod:2571
20510 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
20511 "unexpected errors if you try to mix these calls. It is safest to manually "
20512 "unmount filesystems and remove mountpoints after use."
20516 #: ../fish/guestfish-actions.pod:2575
20518 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
20519 "for this to work for manual mountpoints, you must ensure that the innermost "
20520 "mountpoints have the longest pathnames, as in the example code above."
20524 #: ../fish/guestfish-actions.pod:2582
20526 "Autosync [see L</set-autosync>, this is set by default on handles] means "
20527 "that L</umount-all> is called when the handle is closed which can also "
20528 "trigger these issues."
20532 #: ../fish/guestfish-actions.pod:2586
20537 #: ../fish/guestfish-actions.pod:2588
20540 " mknod mode devmajor devminor path\n"
20545 #: ../fish/guestfish-actions.pod:2598
20547 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
20548 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
20549 "regular file). These constants are available in the standard Linux header "
20550 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
20551 "wrappers around this command which bitwise OR in the appropriate constant "
20556 #: ../fish/guestfish-actions.pod:2608
20561 #: ../fish/guestfish-actions.pod:2610
20564 " mknod-b mode devmajor devminor path\n"
20569 #: ../fish/guestfish-actions.pod:2612
20571 "This call creates a block device node called C<path> with mode C<mode> and "
20572 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
20573 "wrapper around L</mknod>."
20577 #: ../fish/guestfish-actions.pod:2618
20582 #: ../fish/guestfish-actions.pod:2620
20585 " mknod-c mode devmajor devminor path\n"
20590 #: ../fish/guestfish-actions.pod:2622
20592 "This call creates a char device node called C<path> with mode C<mode> and "
20593 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
20594 "wrapper around L</mknod>."
20598 #: ../fish/guestfish-actions.pod:2628
20603 #: ../fish/guestfish-actions.pod:2630
20611 #: ../fish/guestfish-actions.pod:2634
20616 #: ../fish/guestfish-actions.pod:2636
20619 " mkswap-L label device\n"
20624 #: ../fish/guestfish-actions.pod:2644
20629 #: ../fish/guestfish-actions.pod:2646
20632 " mkswap-U uuid device\n"
20637 #: ../fish/guestfish-actions.pod:2650
20638 msgid "mkswap-file"
20642 #: ../fish/guestfish-actions.pod:2652
20645 " mkswap-file path\n"
20650 #: ../fish/guestfish-actions.pod:2656
20652 "This command just writes a swap file signature to an existing file. To "
20653 "create the file itself, use something like L</fallocate>."
20657 #: ../fish/guestfish-actions.pod:2659
20662 #: ../fish/guestfish-actions.pod:2661
20665 " modprobe modulename\n"
20670 #: ../fish/guestfish-actions.pod:2668
20675 #: ../fish/guestfish-actions.pod:2670
20678 " mount device mountpoint\n"
20683 #: ../fish/guestfish-actions.pod:2686
20685 "B<Important note:> When you use this call, the filesystem options C<sync> "
20686 "and C<noatime> are set implicitly. This was originally done because we "
20687 "thought it would improve reliability, but it turns out that I<-o sync> has a "
20688 "very large negative performance impact and negligible effect on "
20689 "reliability. Therefore we recommend that you avoid using L</mount> in any "
20690 "code that needs performance, and instead use L</mount-options> (use an empty "
20691 "string for the first parameter if you don't want any options)."
20695 #: ../fish/guestfish-actions.pod:2696
20700 #: ../fish/guestfish-actions.pod:2698
20703 " mount-loop file mountpoint\n"
20708 #: ../fish/guestfish-actions.pod:2704
20709 msgid "mount-options"
20713 #: ../fish/guestfish-actions.pod:2706
20716 " mount-options options device mountpoint\n"
20721 #: ../fish/guestfish-actions.pod:2708
20723 "This is the same as the L</mount> command, but it allows you to set the "
20724 "mount options as for the L<mount(8)> I<-o> flag."
20728 #: ../fish/guestfish-actions.pod:2716
20733 #: ../fish/guestfish-actions.pod:2718
20736 " mount-ro device mountpoint\n"
20741 #: ../fish/guestfish-actions.pod:2720
20743 "This is the same as the L</mount> command, but it mounts the filesystem with "
20744 "the read-only (I<-o ro>) flag."
20748 #: ../fish/guestfish-actions.pod:2723
20753 #: ../fish/guestfish-actions.pod:2725
20756 " mount-vfs options vfstype device mountpoint\n"
20761 #: ../fish/guestfish-actions.pod:2727
20763 "This is the same as the L</mount> command, but it allows you to set both the "
20764 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
20768 #: ../fish/guestfish-actions.pod:2731
20769 msgid "mountpoints"
20773 #: ../fish/guestfish-actions.pod:2733
20781 #: ../fish/guestfish-actions.pod:2735
20783 "This call is similar to L</mounts>. That call returns a list of devices. "
20784 "This one returns a hash table (map) of device name to directory where the "
20785 "device is mounted."
20789 #: ../fish/guestfish-actions.pod:2739
20794 #: ../fish/guestfish-actions.pod:2741
20802 #: ../fish/guestfish-actions.pod:2748
20803 msgid "See also: L</mountpoints>"
20807 #: ../fish/guestfish-actions.pod:2750
20812 #: ../fish/guestfish-actions.pod:2752
20820 #: ../fish/guestfish-actions.pod:2757
20821 msgid "ntfs-3g-probe"
20825 #: ../fish/guestfish-actions.pod:2759
20828 " ntfs-3g-probe true|false device\n"
20833 #: ../fish/guestfish-actions.pod:2773
20838 #: ../fish/guestfish-actions.pod:2775
20841 " ntfsresize device\n"
20846 #: ../fish/guestfish-actions.pod:2781
20847 msgid "ntfsresize-size"
20851 #: ../fish/guestfish-actions.pod:2783
20854 " ntfsresize-size device size\n"
20859 #: ../fish/guestfish-actions.pod:2785
20861 "This command is the same as L</ntfsresize> except that it allows you to "
20862 "specify the new size (in bytes) explicitly."
20866 #: ../fish/guestfish-actions.pod:2788
20871 #: ../fish/guestfish-actions.pod:2790
20874 " part-add device prlogex startsect endsect\n"
20879 #: ../fish/guestfish-actions.pod:2792
20881 "This command adds a partition to C<device>. If there is no partition table "
20882 "on the device, call L</part-init> first."
20886 #: ../fish/guestfish-actions.pod:2804
20888 "Creating a partition which covers the whole disk is not so easy. Use L</"
20889 "part-disk> to do that."
20893 #: ../fish/guestfish-actions.pod:2807
20898 #: ../fish/guestfish-actions.pod:2809
20901 " part-del device partnum\n"
20906 #: ../fish/guestfish-actions.pod:2817
20911 #: ../fish/guestfish-actions.pod:2819
20914 " part-disk device parttype\n"
20919 #: ../fish/guestfish-actions.pod:2821
20921 "This command is simply a combination of L</part-init> followed by L</part-"
20922 "add> to create a single primary partition covering the whole disk."
20926 #: ../fish/guestfish-actions.pod:2825
20928 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
20929 "possible values are described in L</part-init>."
20933 #: ../fish/guestfish-actions.pod:2831
20934 msgid "part-get-bootable"
20938 #: ../fish/guestfish-actions.pod:2833
20941 " part-get-bootable device partnum\n"
20946 #: ../fish/guestfish-actions.pod:2838
20947 msgid "See also L</part-set-bootable>."
20951 #: ../fish/guestfish-actions.pod:2840
20952 msgid "part-get-mbr-id"
20956 #: ../fish/guestfish-actions.pod:2842
20959 " part-get-mbr-id device partnum\n"
20964 #: ../fish/guestfish-actions.pod:2847 ../fish/guestfish-actions.pod:2985
20966 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
20967 "undefined results for other partition table types (see L</part-get-"
20972 #: ../fish/guestfish-actions.pod:2851
20973 msgid "part-get-parttype"
20977 #: ../fish/guestfish-actions.pod:2853
20980 " part-get-parttype device\n"
20985 #: ../fish/guestfish-actions.pod:2858
20987 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
20988 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
20989 "possible, although unusual. See L</part-init> for a full list."
20993 #: ../fish/guestfish-actions.pod:2863
20998 #: ../fish/guestfish-actions.pod:2865
21001 " part-init device parttype\n"
21006 #: ../fish/guestfish-actions.pod:2871
21008 "Initially there are no partitions. Following this, you should call L</part-"
21009 "add> for each partition required."
21013 #: ../fish/guestfish-actions.pod:2934
21018 #: ../fish/guestfish-actions.pod:2936
21021 " part-list device\n"
21026 #: ../fish/guestfish-actions.pod:2951
21028 "Start of the partition I<in bytes>. To get sectors you have to divide by "
21029 "the device's sector size, see L</blockdev-getss>."
21033 #: ../fish/guestfish-actions.pod:2964
21034 msgid "part-set-bootable"
21038 #: ../fish/guestfish-actions.pod:2966
21041 " part-set-bootable device partnum true|false\n"
21046 #: ../fish/guestfish-actions.pod:2975
21047 msgid "part-set-mbr-id"
21051 #: ../fish/guestfish-actions.pod:2977
21054 " part-set-mbr-id device partnum idbyte\n"
21059 #: ../fish/guestfish-actions.pod:2989
21060 msgid "part-set-name"
21064 #: ../fish/guestfish-actions.pod:2991
21067 " part-set-name device partnum name\n"
21072 #: ../fish/guestfish-actions.pod:2999
21073 msgid "part-to-dev"
21077 #: ../fish/guestfish-actions.pod:3001
21080 " part-to-dev partition\n"
21085 #: ../fish/guestfish-actions.pod:3007
21087 "The named partition must exist, for example as a string returned from L</"
21088 "list-partitions>."
21092 #: ../fish/guestfish-actions.pod:3010
21093 msgid "ping-daemon"
21097 #: ../fish/guestfish-actions.pod:3012
21105 #: ../fish/guestfish-actions.pod:3019
21110 #: ../fish/guestfish-actions.pod:3021
21113 " pread path count offset\n"
21118 #: ../fish/guestfish-actions.pod:3029
21119 msgid "See also L</pwrite>, L</pread-device>."
21123 #: ../fish/guestfish-actions.pod:3034
21124 msgid "pread-device"
21128 #: ../fish/guestfish-actions.pod:3036
21131 " pread-device device count offset\n"
21136 #: ../fish/guestfish-actions.pod:3044
21137 msgid "See also L</pread>."
21141 #: ../fish/guestfish-actions.pod:3049
21146 #: ../fish/guestfish-actions.pod:3051
21149 " pvcreate device\n"
21154 #: ../fish/guestfish-actions.pod:3057
21159 #: ../fish/guestfish-actions.pod:3059
21162 " pvremove device\n"
21167 #: ../fish/guestfish-actions.pod:3068
21172 #: ../fish/guestfish-actions.pod:3070
21175 " pvresize device\n"
21180 #: ../fish/guestfish-actions.pod:3075
21181 msgid "pvresize-size"
21185 #: ../fish/guestfish-actions.pod:3077
21188 " pvresize-size device size\n"
21193 #: ../fish/guestfish-actions.pod:3079
21195 "This command is the same as L</pvresize> except that it allows you to "
21196 "specify the new size (in bytes) explicitly."
21200 #: ../fish/guestfish-actions.pod:3082
21205 #: ../fish/guestfish-actions.pod:3084
21213 #: ../fish/guestfish-actions.pod:3092
21214 msgid "See also L</pvs-full>."
21218 #: ../fish/guestfish-actions.pod:3094
21223 #: ../fish/guestfish-actions.pod:3096
21231 #: ../fish/guestfish-actions.pod:3101
21236 #: ../fish/guestfish-actions.pod:3103
21244 #: ../fish/guestfish-actions.pod:3107
21249 #: ../fish/guestfish-actions.pod:3109
21252 " pwrite path content offset\n"
21257 #: ../fish/guestfish-actions.pod:3120
21258 msgid "See also L</pread>, L</pwrite-device>."
21262 #: ../fish/guestfish-actions.pod:3125
21263 msgid "pwrite-device"
21267 #: ../fish/guestfish-actions.pod:3127
21270 " pwrite-device device content offset\n"
21275 #: ../fish/guestfish-actions.pod:3137
21276 msgid "See also L</pwrite>."
21280 #: ../fish/guestfish-actions.pod:3142
21285 #: ../fish/guestfish-actions.pod:3144
21288 " read-file path\n"
21293 #: ../fish/guestfish-actions.pod:3149
21295 "Unlike L</cat>, this function can correctly handle files that contain "
21296 "embedded ASCII NUL characters. However unlike L</download>, this function "
21297 "is limited in the total size of file that can be handled."
21301 #: ../fish/guestfish-actions.pod:3157
21306 #: ../fish/guestfish-actions.pod:3159
21309 " read-lines path\n"
21314 #: ../fish/guestfish-actions.pod:3166
21316 "Note that this function cannot correctly handle binary files (specifically, "
21317 "files containing C<\\0> character which is treated as end of line). For "
21318 "those you need to use the L</read-file> function which has a more complex "
21323 #: ../fish/guestfish-actions.pod:3171
21328 #: ../fish/guestfish-actions.pod:3173
21336 #: ../fish/guestfish-actions.pod:3225
21338 "This function is primarily intended for use by programs. To get a simple "
21339 "list of names, use L</ls>. To get a printable directory for human "
21340 "consumption, use L</ll>."
21344 #: ../fish/guestfish-actions.pod:3229
21349 #: ../fish/guestfish-actions.pod:3231
21357 #: ../fish/guestfish-actions.pod:3235
21358 msgid "readlinklist"
21362 #: ../fish/guestfish-actions.pod:3237
21365 " readlinklist path 'names ...'\n"
21370 #: ../fish/guestfish-actions.pod:3261
21375 #: ../fish/guestfish-actions.pod:3263
21383 #: ../fish/guestfish-actions.pod:3268
21384 msgid "removexattr"
21388 #: ../fish/guestfish-actions.pod:3270
21391 " removexattr xattr path\n"
21396 #: ../fish/guestfish-actions.pod:3275
21397 msgid "See also: L</lremovexattr>, L<attr(5)>."
21401 #: ../fish/guestfish-actions.pod:3277
21406 #: ../fish/guestfish-actions.pod:3279
21409 " resize2fs device\n"
21414 #: ../fish/guestfish-actions.pod:3284
21416 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
21417 "before calling this command. For unknown reasons C<resize2fs> sometimes "
21418 "gives an error about this and sometimes not. In any case, it is always safe "
21419 "to call L</e2fsck-f> before calling this function."
21423 #: ../fish/guestfish-actions.pod:3290
21424 msgid "resize2fs-size"
21428 #: ../fish/guestfish-actions.pod:3292
21431 " resize2fs-size device size\n"
21436 #: ../fish/guestfish-actions.pod:3294
21438 "This command is the same as L</resize2fs> except that it allows you to "
21439 "specify the new size (in bytes) explicitly."
21443 #: ../fish/guestfish-actions.pod:3297
21448 #: ../fish/guestfish-actions.pod:3299
21456 #: ../fish/guestfish-actions.pod:3303
21461 #: ../fish/guestfish-actions.pod:3305
21469 #: ../fish/guestfish-actions.pod:3311
21474 #: ../fish/guestfish-actions.pod:3313
21482 #: ../fish/guestfish-actions.pod:3317
21483 msgid "rmmountpoint"
21487 #: ../fish/guestfish-actions.pod:3319
21490 " rmmountpoint exemptpath\n"
21495 #: ../fish/guestfish-actions.pod:3321
21497 "This calls removes a mountpoint that was previously created with L</"
21498 "mkmountpoint>. See L</mkmountpoint> for full details."
21502 #: ../fish/guestfish-actions.pod:3325
21503 msgid "scrub-device"
21507 #: ../fish/guestfish-actions.pod:3327
21510 " scrub-device device\n"
21515 #: ../fish/guestfish-actions.pod:3338
21520 #: ../fish/guestfish-actions.pod:3340
21523 " scrub-file file\n"
21528 #: ../fish/guestfish-actions.pod:3350
21529 msgid "scrub-freespace"
21533 #: ../fish/guestfish-actions.pod:3352
21536 " scrub-freespace dir\n"
21541 #: ../fish/guestfish-actions.pod:3354
21543 "This command creates the directory C<dir> and then fills it with files until "
21544 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
21545 "deletes them. The intention is to scrub any free space on the partition "
21546 "containing C<dir>."
21550 #: ../fish/guestfish-actions.pod:3363
21555 #: ../fish/guestfish-actions.pod:3365
21560 #: ../fish/guestfish-actions.pod:3367
21563 " set-append append\n"
21568 #: ../fish/guestfish-actions.pod:3378
21569 msgid "set-autosync"
21573 #: ../fish/guestfish-actions.pod:3380
21578 #: ../fish/guestfish-actions.pod:3382
21581 " set-autosync true|false\n"
21586 #: ../fish/guestfish-actions.pod:3384
21588 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
21589 "effort attempt to run L</umount-all> followed by L</sync> when the handle is "
21590 "closed (also if the program exits without closing handles)."
21594 #: ../fish/guestfish-actions.pod:3392
21599 #: ../fish/guestfish-actions.pod:3394
21604 #: ../fish/guestfish-actions.pod:3396
21607 " set-direct true|false\n"
21612 #: ../fish/guestfish-actions.pod:3402
21614 "One consequence of this is that log messages aren't caught by the library "
21615 "and handled by L</set-log-message-callback>, but go straight to stdout."
21619 #: ../fish/guestfish-actions.pod:3411
21620 msgid "set-e2label"
21624 #: ../fish/guestfish-actions.pod:3413
21627 " set-e2label device label\n"
21632 #: ../fish/guestfish-actions.pod:3419
21634 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
21635 "label on a filesystem."
21639 #: ../fish/guestfish-actions.pod:3422
21644 #: ../fish/guestfish-actions.pod:3424
21647 " set-e2uuid device uuid\n"
21652 #: ../fish/guestfish-actions.pod:3431
21654 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
21655 "UUID of a filesystem."
21659 #: ../fish/guestfish-actions.pod:3434
21660 msgid "set-memsize"
21664 #: ../fish/guestfish-actions.pod:3436
21669 #: ../fish/guestfish-actions.pod:3438
21672 " set-memsize memsize\n"
21677 #: ../fish/guestfish-actions.pod:3440
21679 "This sets the memory size in megabytes allocated to the qemu subprocess. "
21680 "This only has any effect if called before L</launch>."
21684 #: ../fish/guestfish-actions.pod:3451
21685 msgid "set-network"
21689 #: ../fish/guestfish-actions.pod:3453
21694 #: ../fish/guestfish-actions.pod:3455
21697 " set-network true|false\n"
21702 #: ../fish/guestfish-actions.pod:3463
21704 "You must call this before calling L</launch>, otherwise it has no effect."
21708 #: ../fish/guestfish-actions.pod:3466
21713 #: ../fish/guestfish-actions.pod:3468
21718 #: ../fish/guestfish-actions.pod:3470
21721 " set-path searchpath\n"
21726 #: ../fish/guestfish-actions.pod:3479
21731 #: ../fish/guestfish-actions.pod:3481
21736 #: ../fish/guestfish-actions.pod:3483
21744 #: ../fish/guestfish-actions.pod:3503
21745 msgid "set-recovery-proc"
21749 #: ../fish/guestfish-actions.pod:3505
21750 msgid "recovery-proc"
21754 #: ../fish/guestfish-actions.pod:3507
21757 " set-recovery-proc true|false\n"
21762 #: ../fish/guestfish-actions.pod:3509
21764 "If this is called with the parameter C<false> then L</launch> does not "
21765 "create a recovery process. The purpose of the recovery process is to stop "
21766 "runaway qemu processes in the case where the main program aborts abruptly."
21770 #: ../fish/guestfish-actions.pod:3514
21772 "This only has any effect if called before L</launch>, and the default is "
21777 #: ../fish/guestfish-actions.pod:3523
21778 msgid "set-selinux"
21782 #: ../fish/guestfish-actions.pod:3525
21787 #: ../fish/guestfish-actions.pod:3527
21790 " set-selinux true|false\n"
21795 #: ../fish/guestfish-actions.pod:3538
21800 #: ../fish/guestfish-actions.pod:3540
21805 #: ../fish/guestfish-actions.pod:3542
21808 " set-trace true|false\n"
21813 #: ../fish/guestfish-actions.pod:3558
21814 msgid "set-verbose"
21818 #: ../fish/guestfish-actions.pod:3560
21823 #: ../fish/guestfish-actions.pod:3562
21826 " set-verbose true|false\n"
21831 #: ../fish/guestfish-actions.pod:3569
21836 #: ../fish/guestfish-actions.pod:3571
21839 " setcon context\n"
21844 #: ../fish/guestfish-actions.pod:3578
21849 #: ../fish/guestfish-actions.pod:3580
21852 " setxattr xattr val vallen path\n"
21857 #: ../fish/guestfish-actions.pod:3586
21858 msgid "See also: L</lsetxattr>, L<attr(5)>."
21862 #: ../fish/guestfish-actions.pod:3588
21867 #: ../fish/guestfish-actions.pod:3590
21870 " sfdisk device cyls heads sectors 'lines ...'\n"
21875 #: ../fish/guestfish-actions.pod:3612
21876 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
21880 #: ../fish/guestfish-actions.pod:3618
21885 #: ../fish/guestfish-actions.pod:3620
21888 " sfdiskM device 'lines ...'\n"
21893 #: ../fish/guestfish-actions.pod:3622
21895 "This is a simplified interface to the L</sfdisk> command, where partition "
21896 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
21897 "you don't need to specify the cyls, heads and sectors parameters which were "
21898 "rarely if ever used anyway."
21902 #: ../fish/guestfish-actions.pod:3628
21903 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
21907 #: ../fish/guestfish-actions.pod:3634
21912 #: ../fish/guestfish-actions.pod:3636
21915 " sfdisk-N device partnum cyls heads sectors line\n"
21920 #: ../fish/guestfish-actions.pod:3641
21922 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
21923 "cyls/heads/sectors parameters."
21927 #: ../fish/guestfish-actions.pod:3644
21928 msgid "See also: L</part-add>"
21932 #: ../fish/guestfish-actions.pod:3649
21933 msgid "sfdisk-disk-geometry"
21937 #: ../fish/guestfish-actions.pod:3651
21940 " sfdisk-disk-geometry device\n"
21945 #: ../fish/guestfish-actions.pod:3653
21947 "This displays the disk geometry of C<device> read from the partition table. "
21948 "Especially in the case where the underlying block device has been resized, "
21949 "this can be different from the kernel's idea of the geometry (see L</sfdisk-"
21950 "kernel-geometry>)."
21954 #: ../fish/guestfish-actions.pod:3661
21955 msgid "sfdisk-kernel-geometry"
21959 #: ../fish/guestfish-actions.pod:3663
21962 " sfdisk-kernel-geometry device\n"
21967 #: ../fish/guestfish-actions.pod:3670
21972 #: ../fish/guestfish-actions.pod:3672
21975 " sfdisk-l device\n"
21980 #: ../fish/guestfish-actions.pod:3678
21981 msgid "See also: L</part-list>"
21985 #: ../fish/guestfish-actions.pod:3680
21990 #: ../fish/guestfish-actions.pod:3682
21998 #: ../fish/guestfish-actions.pod:3687
21999 msgid "This is like L</command>, but passes the command to:"
22003 #: ../fish/guestfish-actions.pod:3695
22004 msgid "All the provisos about L</command> apply to this call."
22008 #: ../fish/guestfish-actions.pod:3697
22013 #: ../fish/guestfish-actions.pod:3699
22016 " sh-lines command\n"
22021 #: ../fish/guestfish-actions.pod:3701
22022 msgid "This is the same as L</sh>, but splits the result into a list of lines."
22026 #: ../fish/guestfish-actions.pod:3704
22027 msgid "See also: L</command-lines>"
22031 #: ../fish/guestfish-actions.pod:3706
22036 #: ../fish/guestfish-actions.pod:3708
22044 #: ../fish/guestfish-actions.pod:3712
22049 #: ../fish/guestfish-actions.pod:3714
22057 #: ../fish/guestfish-actions.pod:3720
22062 #: ../fish/guestfish-actions.pod:3722
22070 #: ../fish/guestfish-actions.pod:3730
22075 #: ../fish/guestfish-actions.pod:3732
22083 #: ../fish/guestfish-actions.pod:3740
22088 #: ../fish/guestfish-actions.pod:3742
22091 " strings-e encoding path\n"
22096 #: ../fish/guestfish-actions.pod:3744
22098 "This is like the L</strings> command, but allows you to specify the encoding "
22099 "of strings that are looked for in the source file C<path>."
22103 #: ../fish/guestfish-actions.pod:3754
22105 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
22106 "ISO-8859-X (this is what L</strings> uses)."
22110 #: ../fish/guestfish-actions.pod:3786
22111 msgid "swapoff-device"
22115 #: ../fish/guestfish-actions.pod:3788
22118 " swapoff-device device\n"
22123 #: ../fish/guestfish-actions.pod:3790
22125 "This command disables the libguestfs appliance swap device or partition "
22126 "named C<device>. See L</swapon-device>."
22130 #: ../fish/guestfish-actions.pod:3794
22131 msgid "swapoff-file"
22135 #: ../fish/guestfish-actions.pod:3796
22138 " swapoff-file file\n"
22143 #: ../fish/guestfish-actions.pod:3800
22144 msgid "swapoff-label"
22148 #: ../fish/guestfish-actions.pod:3802
22151 " swapoff-label label\n"
22156 #: ../fish/guestfish-actions.pod:3807
22157 msgid "swapoff-uuid"
22161 #: ../fish/guestfish-actions.pod:3809
22164 " swapoff-uuid uuid\n"
22169 #: ../fish/guestfish-actions.pod:3814
22170 msgid "swapon-device"
22174 #: ../fish/guestfish-actions.pod:3816
22177 " swapon-device device\n"
22182 #: ../fish/guestfish-actions.pod:3818
22184 "This command enables the libguestfs appliance to use the swap device or "
22185 "partition named C<device>. The increased memory is made available for all "
22186 "commands, for example those run using L</command> or L</sh>."
22190 #: ../fish/guestfish-actions.pod:3830
22191 msgid "swapon-file"
22195 #: ../fish/guestfish-actions.pod:3832
22198 " swapon-file file\n"
22203 #: ../fish/guestfish-actions.pod:3834
22205 "This command enables swap to a file. See L</swapon-device> for other notes."
22209 #: ../fish/guestfish-actions.pod:3837
22210 msgid "swapon-label"
22214 #: ../fish/guestfish-actions.pod:3839
22217 " swapon-label label\n"
22222 #: ../fish/guestfish-actions.pod:3841
22224 "This command enables swap to a labeled swap partition. See L</swapon-"
22225 "device> for other notes."
22229 #: ../fish/guestfish-actions.pod:3844
22230 msgid "swapon-uuid"
22234 #: ../fish/guestfish-actions.pod:3846
22237 " swapon-uuid uuid\n"
22242 #: ../fish/guestfish-actions.pod:3848
22244 "This command enables swap to a swap partition with the given UUID. See L</"
22245 "swapon-device> for other notes."
22249 #: ../fish/guestfish-actions.pod:3851
22254 #: ../fish/guestfish-actions.pod:3853
22262 #: ../fish/guestfish-actions.pod:3861
22267 #: ../fish/guestfish-actions.pod:3863
22275 #: ../fish/guestfish-actions.pod:3871
22280 #: ../fish/guestfish-actions.pod:3873
22283 " tail-n nrlines path\n"
22288 #: ../fish/guestfish-actions.pod:3886
22293 #: ../fish/guestfish-actions.pod:3888
22296 " tar-in (tarfile|-) directory\n"
22301 #: ../fish/guestfish-actions.pod:3893
22302 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
22306 #: ../fish/guestfish-actions.pod:3898
22311 #: ../fish/guestfish-actions.pod:3900
22314 " tar-out directory (tarfile|-)\n"
22319 #: ../fish/guestfish-actions.pod:3905
22320 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
22324 #: ../fish/guestfish-actions.pod:3910
22329 #: ../fish/guestfish-actions.pod:3912
22332 " tgz-in (tarball|-) directory\n"
22337 #: ../fish/guestfish-actions.pod:3917
22338 msgid "To upload an uncompressed tarball, use L</tar-in>."
22342 #: ../fish/guestfish-actions.pod:3921
22347 #: ../fish/guestfish-actions.pod:3923
22350 " tgz-out directory (tarball|-)\n"
22355 #: ../fish/guestfish-actions.pod:3928
22356 msgid "To download an uncompressed tarball, use L</tar-out>."
22360 #: ../fish/guestfish-actions.pod:3932
22365 #: ../fish/guestfish-actions.pod:3934
22373 #: ../fish/guestfish-actions.pod:3943
22378 #: ../fish/guestfish-actions.pod:3945
22386 #: ../fish/guestfish-actions.pod:3950
22387 msgid "truncate-size"
22391 #: ../fish/guestfish-actions.pod:3952
22394 " truncate-size path size\n"
22399 #: ../fish/guestfish-actions.pod:3957
22401 "If the current file size is less than C<size> then the file is extended to "
22402 "the required size with zero bytes. This creates a sparse file (ie. disk "
22403 "blocks are not allocated for the file until you write to it). To create a "
22404 "non-sparse file of zeroes, use L</fallocate64> instead."
22408 #: ../fish/guestfish-actions.pod:3963
22413 #: ../fish/guestfish-actions.pod:3965
22416 " tune2fs-l device\n"
22421 #: ../fish/guestfish-actions.pod:3975
22426 #: ../fish/guestfish-actions.pod:3977
22429 " txz-in (tarball|-) directory\n"
22434 #: ../fish/guestfish-actions.pod:3984
22439 #: ../fish/guestfish-actions.pod:3986
22442 " txz-out directory (tarball|-)\n"
22447 #: ../fish/guestfish-actions.pod:3993
22452 #: ../fish/guestfish-actions.pod:3995
22460 #: ../fish/guestfish-actions.pod:4009
22461 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
22465 #: ../fish/guestfish-actions.pod:4014
22470 #: ../fish/guestfish-actions.pod:4016
22475 #: ../fish/guestfish-actions.pod:4018
22478 " umount pathordevice\n"
22483 #: ../fish/guestfish-actions.pod:4024
22488 #: ../fish/guestfish-actions.pod:4026
22489 msgid "unmount-all"
22493 #: ../fish/guestfish-actions.pod:4028
22501 #: ../fish/guestfish-actions.pod:4034
22506 #: ../fish/guestfish-actions.pod:4036
22509 " upload (filename|-) remotefilename\n"
22514 #: ../fish/guestfish-actions.pod:4043
22515 msgid "See also L</download>."
22519 #: ../fish/guestfish-actions.pod:4047
22520 msgid "upload-offset"
22524 #: ../fish/guestfish-actions.pod:4049
22527 " upload-offset (filename|-) remotefilename offset\n"
22532 #: ../fish/guestfish-actions.pod:4061
22534 "Note that there is no limit on the amount of data that can be uploaded with "
22535 "this call, unlike with L</pwrite>, and this call always writes the full "
22536 "amount unless an error occurs."
22540 #: ../fish/guestfish-actions.pod:4066
22541 msgid "See also L</upload>, L</pwrite>."
22545 #: ../fish/guestfish-actions.pod:4070
22550 #: ../fish/guestfish-actions.pod:4072
22553 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
22558 #: ../fish/guestfish-actions.pod:4091
22563 #: ../fish/guestfish-actions.pod:4093
22571 #: ../fish/guestfish-actions.pod:4120
22573 "I<Note:> Don't use this call to test for availability of features. In "
22574 "enterprise distributions we backport features from later versions into "
22575 "earlier versions, making this an unreliable way to test for features. Use "
22576 "L</available> instead."
22580 #: ../fish/guestfish-actions.pod:4126
22585 #: ../fish/guestfish-actions.pod:4128
22588 " vfs-label device\n"
22593 #: ../fish/guestfish-actions.pod:4135
22594 msgid "To find a filesystem from the label, use L</findfs-label>."
22598 #: ../fish/guestfish-actions.pod:4137
22603 #: ../fish/guestfish-actions.pod:4139
22606 " vfs-type device\n"
22611 #: ../fish/guestfish-actions.pod:4149
22616 #: ../fish/guestfish-actions.pod:4151
22619 " vfs-uuid device\n"
22624 #: ../fish/guestfish-actions.pod:4158
22625 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
22629 #: ../fish/guestfish-actions.pod:4160
22630 msgid "vg-activate"
22634 #: ../fish/guestfish-actions.pod:4162
22637 " vg-activate true|false 'volgroups ...'\n"
22642 #: ../fish/guestfish-actions.pod:4175
22643 msgid "vg-activate-all"
22647 #: ../fish/guestfish-actions.pod:4177
22650 " vg-activate-all true|false\n"
22655 #: ../fish/guestfish-actions.pod:4187
22660 #: ../fish/guestfish-actions.pod:4189
22663 " vgcreate volgroup 'physvols ...'\n"
22668 #: ../fish/guestfish-actions.pod:4194
22673 #: ../fish/guestfish-actions.pod:4196
22676 " vglvuuids vgname\n"
22681 #: ../fish/guestfish-actions.pod:4201
22683 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
22684 "logical volumes and volume groups."
22688 #: ../fish/guestfish-actions.pod:4204
22689 msgid "See also L</vgpvuuids>."
22693 #: ../fish/guestfish-actions.pod:4206
22698 #: ../fish/guestfish-actions.pod:4208
22701 " vgpvuuids vgname\n"
22706 #: ../fish/guestfish-actions.pod:4213
22708 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
22709 "physical volumes and volume groups."
22713 #: ../fish/guestfish-actions.pod:4216
22714 msgid "See also L</vglvuuids>."
22718 #: ../fish/guestfish-actions.pod:4218
22723 #: ../fish/guestfish-actions.pod:4220
22726 " vgremove vgname\n"
22731 #: ../fish/guestfish-actions.pod:4227
22736 #: ../fish/guestfish-actions.pod:4229
22739 " vgrename volgroup newvolgroup\n"
22744 #: ../fish/guestfish-actions.pod:4233
22749 #: ../fish/guestfish-actions.pod:4235
22757 #: ../fish/guestfish-actions.pod:4243
22758 msgid "See also L</vgs-full>."
22762 #: ../fish/guestfish-actions.pod:4245
22767 #: ../fish/guestfish-actions.pod:4247
22775 #: ../fish/guestfish-actions.pod:4252
22780 #: ../fish/guestfish-actions.pod:4254
22788 #: ../fish/guestfish-actions.pod:4259
22793 #: ../fish/guestfish-actions.pod:4261
22801 #: ../fish/guestfish-actions.pod:4265
22806 #: ../fish/guestfish-actions.pod:4267
22814 #: ../fish/guestfish-actions.pod:4272
22819 #: ../fish/guestfish-actions.pod:4274
22827 #: ../fish/guestfish-actions.pod:4279
22832 #: ../fish/guestfish-actions.pod:4281
22840 #: ../fish/guestfish-actions.pod:4286
22845 #: ../fish/guestfish-actions.pod:4288
22848 " write path content\n"
22853 #: ../fish/guestfish-actions.pod:4296
22858 #: ../fish/guestfish-actions.pod:4298
22861 " write-file path content size\n"
22866 #: ../fish/guestfish-actions.pod:4321
22871 #: ../fish/guestfish-actions.pod:4323
22874 " zegrep regex path\n"
22879 #: ../fish/guestfish-actions.pod:4331
22884 #: ../fish/guestfish-actions.pod:4333
22887 " zegrepi regex path\n"
22892 #: ../fish/guestfish-actions.pod:4341
22897 #: ../fish/guestfish-actions.pod:4343
22905 #: ../fish/guestfish-actions.pod:4351
22906 msgid "See also: L</zero-device>, L</scrub-device>."
22910 #: ../fish/guestfish-actions.pod:4353
22911 msgid "zero-device"
22915 #: ../fish/guestfish-actions.pod:4355
22918 " zero-device device\n"
22923 #: ../fish/guestfish-actions.pod:4357
22925 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
22926 "which just zeroes the first few blocks of a device."
22930 #: ../fish/guestfish-actions.pod:4364
22935 #: ../fish/guestfish-actions.pod:4366
22938 " zerofree device\n"
22943 #: ../fish/guestfish-actions.pod:4379
22948 #: ../fish/guestfish-actions.pod:4381
22951 " zfgrep pattern path\n"
22956 #: ../fish/guestfish-actions.pod:4389
22961 #: ../fish/guestfish-actions.pod:4391
22964 " zfgrepi pattern path\n"
22969 #: ../fish/guestfish-actions.pod:4399
22974 #: ../fish/guestfish-actions.pod:4401
22977 " zfile meth path\n"
22982 #: ../fish/guestfish-actions.pod:4408
22984 "Since 1.0.63, use L</file> instead which can now process compressed files."
22988 #: ../fish/guestfish-actions.pod:4418
22993 #: ../fish/guestfish-actions.pod:4420
22996 " zgrep regex path\n"
23001 #: ../fish/guestfish-actions.pod:4428
23006 #: ../fish/guestfish-actions.pod:4430
23009 " zgrepi regex path\n"
23014 #: ../fish/guestfish-commands.pod:1
23019 #: ../fish/guestfish-commands.pod:3
23024 #: ../fish/guestfish-commands.pod:5
23027 " alloc filename size\n"
23032 #: ../fish/guestfish-commands.pod:7
23034 "This creates an empty (zeroed) file of the given size, and then adds so it "
23035 "can be further examined."
23039 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
23040 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
23044 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
23045 msgid "Size can be specified using standard suffixes, eg. C<1M>."
23049 #: ../fish/guestfish-commands.pod:14
23051 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
23052 "image, see L</PREPARED DISK IMAGES>."
23056 #: ../fish/guestfish-commands.pod:17
23061 #: ../fish/guestfish-commands.pod:19
23064 " copy-in local [local ...] /remotedir\n"
23069 #: ../fish/guestfish-commands.pod:21
23071 "C<copy-in> copies local files or directories recursively into the disk "
23072 "image, placing them in the directory called C</remotedir> (which must "
23073 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
23074 "other commands as necessary."
23078 #: ../fish/guestfish-commands.pod:26
23080 "Multiple local files and directories can be specified, but the last "
23081 "parameter must always be a remote directory. Wildcards cannot be used."
23085 #: ../fish/guestfish-commands.pod:30
23090 #: ../fish/guestfish-commands.pod:32
23093 " copy-out remote [remote ...] localdir\n"
23098 #: ../fish/guestfish-commands.pod:34
23100 "C<copy-out> copies remote files or directories recursively out of the disk "
23101 "image, placing them on the host disk in a local directory called C<localdir> "
23102 "(which must exist). This guestfish meta-command turns into a sequence of L</"
23103 "download>, L</tar-out> and other commands as necessary."
23107 #: ../fish/guestfish-commands.pod:40
23109 "Multiple remote files and directories can be specified, but the last "
23110 "parameter must always be a local directory. To download to the current "
23111 "directory, use C<.> as in:"
23115 #: ../fish/guestfish-commands.pod:44
23118 " copy-out /home .\n"
23123 #: ../fish/guestfish-commands.pod:46
23125 "Wildcards cannot be used in the ordinary command, but you can use them with "
23126 "the help of L</glob> like this:"
23130 #: ../fish/guestfish-commands.pod:49
23133 " glob copy-out /home/* .\n"
23138 #: ../fish/guestfish-commands.pod:51
23143 #: ../fish/guestfish-commands.pod:53
23146 " echo [params ...]\n"
23151 #: ../fish/guestfish-commands.pod:55
23152 msgid "This echos the parameters to the terminal."
23156 #: ../fish/guestfish-commands.pod:57
23161 #: ../fish/guestfish-commands.pod:59
23166 #: ../fish/guestfish-commands.pod:61
23171 #: ../fish/guestfish-commands.pod:63
23179 #: ../fish/guestfish-commands.pod:65
23181 "This is used to edit a file. It downloads the file, edits it locally using "
23182 "your editor, then uploads the result."
23186 #: ../fish/guestfish-commands.pod:68
23188 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
23189 "or C<emacs> you will get those corresponding editors."
23193 #: ../fish/guestfish-commands.pod:72
23198 #: ../fish/guestfish-commands.pod:74
23201 " glob command args...\n"
23206 #: ../fish/guestfish-commands.pod:76
23208 "Expand wildcards in any paths in the args list, and run C<command> "
23209 "repeatedly on each matching path."
23213 #: ../fish/guestfish-commands.pod:79
23214 msgid "See L</WILDCARDS AND GLOBBING>."
23218 #: ../fish/guestfish-commands.pod:81
23223 #: ../fish/guestfish-commands.pod:83
23226 " hexedit <filename|device>\n"
23227 " hexedit <filename|device> <max>\n"
23228 " hexedit <filename|device> <start> <max>\n"
23233 #: ../fish/guestfish-commands.pod:87
23235 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
23240 #: ../fish/guestfish-commands.pod:90
23242 "This command works by downloading potentially the whole file or device, "
23243 "editing it locally, then uploading it. If the file or device is large, you "
23244 "have to specify which part you wish to edit by using C<max> and/or C<start> "
23245 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
23246 "usual modifiers allowed such as C<1M> (1 megabyte)."
23250 #: ../fish/guestfish-commands.pod:97
23251 msgid "For example to edit the first few sectors of a disk you might do:"
23255 #: ../fish/guestfish-commands.pod:100
23258 " hexedit /dev/sda 1M\n"
23263 #: ../fish/guestfish-commands.pod:102
23265 "which would allow you to edit anywhere within the first megabyte of the disk."
23269 #: ../fish/guestfish-commands.pod:105
23270 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
23274 #: ../fish/guestfish-commands.pod:107
23277 " hexedit /dev/sda1 0x400 0x400\n"
23282 #: ../fish/guestfish-commands.pod:109
23283 msgid "(assuming the superblock is in the standard location)."
23287 #: ../fish/guestfish-commands.pod:111
23289 "This command requires the external L<hexedit(1)> program. You can specify "
23290 "another program to use by setting the C<HEXEDITOR> environment variable."
23294 #: ../fish/guestfish-commands.pod:115
23295 msgid "See also L</hexdump>."
23299 #: ../fish/guestfish-commands.pod:117
23304 #: ../fish/guestfish-commands.pod:119
23312 #: ../fish/guestfish-commands.pod:121
23314 "Change the local directory, ie. the current directory of guestfish itself."
23318 #: ../fish/guestfish-commands.pod:124
23319 msgid "Note that C<!cd> won't do what you might expect."
23323 #: ../fish/guestfish-commands.pod:126
23328 #: ../fish/guestfish-commands.pod:128
23333 #: ../fish/guestfish-commands.pod:130
23341 #: ../fish/guestfish-commands.pod:132
23342 msgid "Opens the manual page for guestfish."
23346 #: ../fish/guestfish-commands.pod:134
23351 #: ../fish/guestfish-commands.pod:136
23356 #: ../fish/guestfish-commands.pod:138
23364 #: ../fish/guestfish-commands.pod:140
23372 #: ../fish/guestfish-commands.pod:142
23373 msgid "This is used to view a file."
23377 #: ../fish/guestfish-commands.pod:144
23379 "The default viewer is C<$PAGER>. However if you use the alternate command "
23380 "C<less> you will get the C<less> command specifically."
23384 #: ../fish/guestfish-commands.pod:147
23389 #: ../fish/guestfish-commands.pod:149
23397 #: ../fish/guestfish-commands.pod:151
23399 "Close and reopen the libguestfs handle. It is not necessary to use this "
23400 "normally, because the handle is closed properly when guestfish exits. "
23401 "However this is occasionally useful for testing."
23405 #: ../fish/guestfish-commands.pod:155
23410 #: ../fish/guestfish-commands.pod:157
23413 " sparse filename size\n"
23418 #: ../fish/guestfish-commands.pod:159
23420 "This creates an empty sparse file of the given size, and then adds so it can "
23421 "be further examined."
23425 #: ../fish/guestfish-commands.pod:162
23427 "In all respects it works the same as the L</alloc> command, except that the "
23428 "image file is allocated sparsely, which means that disk blocks are not "
23429 "assigned to the file until they are needed. Sparse disk files only use "
23430 "space when written to, but they are slower and there is a danger you could "
23431 "run out of real disk space during a write operation."
23435 #: ../fish/guestfish-commands.pod:172
23440 #: ../fish/guestfish-commands.pod:174
23448 #: ../fish/guestfish-commands.pod:176
23450 "This command returns a list of the optional groups known to the daemon, and "
23451 "indicates which ones are supported by this build of the libguestfs appliance."
23455 #: ../fish/guestfish-commands.pod:180
23456 msgid "See also L<guestfs(3)/AVAILABILITY>."
23460 #: ../fish/guestfish-commands.pod:182
23465 #: ../fish/guestfish-commands.pod:184
23468 " time command args...\n"
23473 #: ../fish/guestfish-commands.pod:186
23475 "Run the command as usual, but print the elapsed time afterwards. This can "
23476 "be useful for benchmarking operations."
23480 #: ../test-tool/libguestfs-test-tool.pod:5
23481 msgid "libguestfs-test-tool - End user tests for libguestfs"
23485 #: ../test-tool/libguestfs-test-tool.pod:9
23488 " libguestfs-test-tool [--options]\n"
23493 #: ../test-tool/libguestfs-test-tool.pod:13
23495 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
23496 "and developers, to allow them to check basic libguestfs functionality is "
23497 "working. This is needed because libguestfs occasionally breaks for reasons "
23498 "beyond our control: usually because of changes in the underlying qemu or "
23499 "kernel packages, or the host environment."
23503 #: ../test-tool/libguestfs-test-tool.pod:20
23504 msgid "If you suspect a problem in libguestfs, then just run:"
23508 #: ../test-tool/libguestfs-test-tool.pod:22
23511 " libguestfs-test-tool\n"
23516 #: ../test-tool/libguestfs-test-tool.pod:24
23517 msgid "It will print lots of diagnostic messages."
23521 #: ../test-tool/libguestfs-test-tool.pod:26
23522 msgid "If it runs to completion successfully, you will see this near the end:"
23526 #: ../test-tool/libguestfs-test-tool.pod:28
23529 " ===== TEST FINISHED OK =====\n"
23534 #: ../test-tool/libguestfs-test-tool.pod:30
23535 msgid "and the test tool will exit with code 0."
23539 #: ../test-tool/libguestfs-test-tool.pod:32
23541 "If it fails (and/or exits with non-zero error code), please paste the "
23542 "B<complete, unedited> output of the test tool into a bug report. More "
23543 "information about reporting bugs can be found on the L<http://libguestfs.org/"
23548 #: ../test-tool/libguestfs-test-tool.pod:41
23553 #: ../test-tool/libguestfs-test-tool.pod:43
23554 msgid "Display short usage information and exit."
23558 #: ../test-tool/libguestfs-test-tool.pod:45
23559 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
23563 #: ../test-tool/libguestfs-test-tool.pod:47
23565 "Pass an alternate name for the helper program. libguestfs-test-tool will "
23566 "normally look in the C<$libexec> directory that was configured when the tool "
23571 #: ../test-tool/libguestfs-test-tool.pod:51
23572 msgid "I<--qemu qemu_binary>"
23576 #: ../test-tool/libguestfs-test-tool.pod:53
23578 "If you have downloaded another qemu binary, point this option at the full "
23579 "path of the binary to try it."
23583 #: ../test-tool/libguestfs-test-tool.pod:56
23584 msgid "I<--qemudir qemu_source_dir>"
23588 #: ../test-tool/libguestfs-test-tool.pod:58
23590 "If you have compiled qemu from source, point this option at the source "
23591 "directory to try it."
23595 #: ../test-tool/libguestfs-test-tool.pod:61
23596 msgid "I<--timeout N>"
23600 #: ../test-tool/libguestfs-test-tool.pod:63
23602 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
23603 "does not usually need to be adjusted unless your machine is very slow."
23607 #: ../test-tool/libguestfs-test-tool.pod:69
23608 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
23612 #: ../test-tool/libguestfs-test-tool.pod:71
23614 "If you have compiled another version of qemu from source and would like to "
23615 "try that, then you can use the I<--qemudir> option to point to the qemu "
23616 "source directory."
23620 #: ../test-tool/libguestfs-test-tool.pod:75
23622 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
23623 "option to point to the binary."
23627 #: ../test-tool/libguestfs-test-tool.pod:78
23629 "When using an alternate qemu with libguestfs, usually you would need to "
23630 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in L<guestfs(3)"
23631 ">). libguestfs-test-tool writes a temporary qemu wrapper script when you "
23632 "use either of the I<--qemudir> or I<--qemu> options."
23636 #: ../test-tool/libguestfs-test-tool.pod:85
23638 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
23639 "I<1> if there was an error."
23643 #: ../test-tool/libguestfs-test-tool.pod:92
23644 msgid "/usr/libexec/libguestfs-test-tool-helper"
23648 #: ../test-tool/libguestfs-test-tool.pod:94
23650 "This helper program is run inside the appliance and provides additional "
23655 #: ../test-tool/libguestfs-test-tool.pod:97
23656 msgid "/usr/bin/mkisofs"
23660 #: ../test-tool/libguestfs-test-tool.pod:99
23662 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
23663 "which is used as part of the tests."
23667 #: ../test-tool/libguestfs-test-tool.pod:106
23669 "For the full list of environment variables which may affect libguestfs, "
23670 "please see the L<guestfs(3)> manual page."
23674 #: ../test-tool/libguestfs-test-tool.pod:111
23675 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
23679 #: ../test-tool/libguestfs-test-tool.pod:121
23680 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
23684 #: ../fuse/guestmount.pod:5
23686 "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
23690 #: ../fuse/guestmount.pod:9
23693 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
23698 #: ../fuse/guestmount.pod:11
23701 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
23706 #: ../fuse/guestmount.pod:13
23709 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
23714 #: ../fuse/guestmount.pod:17
23716 "You must I<not> use C<guestmount> in read-write mode on live virtual "
23717 "machines. If you do this, you risk disk corruption in the VM."
23721 #: ../fuse/guestmount.pod:22
23723 "The guestmount program can be used to mount virtual machine filesystems and "
23724 "other disk images on the host. It uses libguestfs for access to the guest "
23725 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
23726 "a mountable device."
23730 #: ../fuse/guestmount.pod:27
23732 "Along with other options, you have to give at least one device (I<-a> "
23733 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
23734 "option) or use the I<-i> inspection option. How this works is better "
23735 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
23740 #: ../fuse/guestmount.pod:33
23742 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
23743 "by you, and the filesystem will not be visible to any other users unless you "
23744 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
23745 "the filesystem, use the C<fusermount -u> command."
23749 #: ../fuse/guestmount.pod:41
23751 "For a typical Windows guest which has its main filesystem on the first "
23756 #: ../fuse/guestmount.pod:44
23759 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
23764 #: ../fuse/guestmount.pod:46
23766 "For a typical Linux guest which has a /boot filesystem on the first "
23767 "partition, and the root filesystem on a logical volume:"
23771 #: ../fuse/guestmount.pod:49
23774 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
23779 #: ../fuse/guestmount.pod:51
23780 msgid "To get libguestfs to detect guest mountpoints for you:"
23784 #: ../fuse/guestmount.pod:53
23787 " guestmount -a guest.img -i --ro /mnt\n"
23792 #: ../fuse/guestmount.pod:55
23793 msgid "For a libvirt guest called \"Guest\" you could do:"
23797 #: ../fuse/guestmount.pod:57
23800 " guestmount -d Guest -i --ro /mnt\n"
23805 #: ../fuse/guestmount.pod:59
23807 "If you don't know what filesystems are contained in a guest or disk image, "
23808 "use L<virt-list-filesystems(1)> first:"
23812 #: ../fuse/guestmount.pod:62
23815 " virt-list-filesystems MyGuest\n"
23820 #: ../fuse/guestmount.pod:64
23822 "If you want to trace the libguestfs calls but without excessive debugging "
23823 "information, we recommend:"
23827 #: ../fuse/guestmount.pod:67
23830 " guestmount [...] --trace /mnt\n"
23835 #: ../fuse/guestmount.pod:69
23836 msgid "If you want to debug the program, we recommend:"
23840 #: ../fuse/guestmount.pod:71
23843 " guestmount [...] --trace --verbose /mnt\n"
23848 #: ../fuse/guestmount.pod:79
23849 msgid "Add a block device or virtual machine image."
23853 #: ../fuse/guestmount.pod:96
23854 msgid "B<--dir-cache-timeout N>"
23858 #: ../fuse/guestmount.pod:98
23860 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
23861 "seconds. The readdir cache [actually, there are several semi-independent "
23862 "caches] is populated after a readdir(2) call with the stat and extended "
23863 "attributes of the files in the directory, in anticipation that they will be "
23864 "requested soon after."
23868 #: ../fuse/guestmount.pod:104
23870 "There is also a different attribute cache implemented by FUSE (see the FUSE "
23871 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
23872 "requests, only cache existing ones."
23876 #: ../fuse/guestmount.pod:115
23878 "If you have untrusted raw-format guest disk images, you should use this "
23879 "option to specify the disk format. This avoids a possible security problem "
23880 "with malicious guests (CVE-2010-3851). See also L<guestfs(3)/"
23881 "guestfs_add_drive_opts>."
23885 #: ../fuse/guestmount.pod:120
23886 msgid "B<--fuse-help>"
23890 #: ../fuse/guestmount.pod:122
23891 msgid "Display help on special FUSE options (see I<-o> below)."
23895 #: ../fuse/guestmount.pod:126
23896 msgid "Display brief help and exit."
23900 #: ../fuse/guestmount.pod:134
23901 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
23905 #: ../fuse/guestmount.pod:136
23907 "Mount the named partition or logical volume on the given mountpoint B<in the "
23908 "guest> (this has nothing to do with mountpoints in the host)."
23912 #: ../fuse/guestmount.pod:139
23914 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
23915 "something on C</>."
23919 #: ../fuse/guestmount.pod:144
23921 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
23922 "unmounted. If you specify this option, then we don't attempt to sync the "
23923 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
23927 #: ../fuse/guestmount.pod:149
23928 msgid "B<-o option> | B<--option option>"
23932 #: ../fuse/guestmount.pod:151
23933 msgid "Pass extra options to FUSE."
23937 #: ../fuse/guestmount.pod:153
23939 "To get a list of all the extra options supported by FUSE, use the command "
23940 "below. Note that only the FUSE I<-o> options can be passed, and only some "
23941 "of them are a good idea."
23945 #: ../fuse/guestmount.pod:157
23948 " guestmount --fuse-help\n"
23953 #: ../fuse/guestmount.pod:159
23954 msgid "Some potentially useful FUSE options:"
23958 #: ../fuse/guestmount.pod:163
23959 msgid "B<-o allow_other>"
23963 #: ../fuse/guestmount.pod:165
23964 msgid "Allow other users to see the filesystem."
23968 #: ../fuse/guestmount.pod:167
23969 msgid "B<-o attr_timeout=N>"
23973 #: ../fuse/guestmount.pod:169
23974 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
23978 #: ../fuse/guestmount.pod:171
23979 msgid "B<-o kernel_cache>"
23983 #: ../fuse/guestmount.pod:173
23985 "Allow the kernel to cache files (reduces the number of reads that have to go "
23986 "through the L<guestfs(3)> API). This is generally a good idea if you can "
23987 "afford the extra memory usage."
23991 #: ../fuse/guestmount.pod:177
23992 msgid "B<-o uid=N> B<-o gid=N>"
23996 #: ../fuse/guestmount.pod:179
23998 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
23999 "the chosen values."
24003 #: ../fuse/guestmount.pod:186
24005 "Add devices and mount everything read-only. Also disallow writes and make "
24006 "the disk appear read-only to FUSE."
24010 #: ../fuse/guestmount.pod:189
24012 "This is highly recommended if you are not going to edit the guest disk. If "
24013 "the guest is running and this option is I<not> supplied, then there is a "
24014 "strong risk of disk corruption in the guest. We try to prevent this from "
24015 "happening, but it is not always possible."
24019 #: ../fuse/guestmount.pod:196
24020 msgid "Enable SELinux support for the guest."
24024 #: ../fuse/guestmount.pod:200
24025 msgid "Enable verbose messages from underlying libguestfs."
24029 #: ../fuse/guestmount.pod:204
24030 msgid "Display the program version and exit."
24034 #: ../fuse/guestmount.pod:206
24035 msgid "B<-x> | B<--trace>"
24039 #: ../fuse/guestmount.pod:208
24040 msgid "Trace libguestfs calls."
24044 #: ../fuse/guestmount.pod:210
24045 msgid "This also stops the daemon from forking into the background."
24049 #: ../fuse/guestmount.pod:216
24051 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
24052 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, L<http://fuse.sf."
24057 #: ../inspector/virt-inspector.pl:40
24059 "virt-inspector - Display OS version, kernel, drivers, mount points, "
24060 "applications, etc. in a virtual machine"
24064 #: ../inspector/virt-inspector.pl:44
24067 " virt-inspector [--connect URI] domname\n"
24072 #: ../inspector/virt-inspector.pl:46
24075 " virt-inspector guest.img [guest.img ...]\n"
24080 #: ../inspector/virt-inspector.pl:50
24082 "B<virt-inspector> examines a virtual machine and tries to determine the "
24083 "version of the OS, the kernel version, what drivers are installed, whether "
24084 "the virtual machine is fully virtualized (FV) or para-virtualized (PV), what "
24085 "applications are installed and more."
24089 #: ../inspector/virt-inspector.pl:55
24091 "Virt-inspector can produce output in several formats, including a readable "
24092 "text report, and XML for feeding into other programs."
24096 #: ../inspector/virt-inspector.pl:58
24098 "In the normal usage, use C<virt-inspector domname> where C<domname> is the "
24099 "libvirt domain (see: C<virsh list --all>)."
24103 #: ../inspector/virt-inspector.pl:61
24105 "You can also run virt-inspector directly on disk images from a single "
24106 "virtual machine. Use C<virt-inspector guest.img>. In rare cases a domain "
24107 "has several block devices, in which case you should list them one after "
24108 "another, with the first corresponding to the guest's C</dev/sda>, the second "
24109 "to the guest's C</dev/sdb> and so on."
24113 #: ../inspector/virt-inspector.pl:67
24115 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
24116 "inspect several virtual machines, you have to run virt-inspector several "
24117 "times (for example, from a shell script for-loop)."
24121 #: ../inspector/virt-inspector.pl:72
24123 "Because virt-inspector needs direct access to guest images, it won't "
24124 "normally work over remote libvirt connections."
24128 #: ../inspector/virt-inspector.pl:85 ../tools/virt-edit.pl:83
24129 #: ../tools/virt-win-reg.pl:182 ../tools/virt-df.pl:81 ../tools/virt-ls.pl:89
24130 #: ../tools/virt-list-filesystems.pl:60 ../tools/virt-cat.pl:90
24131 #: ../tools/virt-tar.pl:109 ../tools/virt-rescue.pl:113
24132 #: ../tools/virt-make-fs.pl:163 ../tools/virt-list-partitions.pl:61
24133 msgid "Display brief help."
24137 #: ../inspector/virt-inspector.pl:91 ../tools/virt-edit.pl:89
24138 #: ../tools/virt-win-reg.pl:188 ../tools/virt-df.pl:87 ../tools/virt-ls.pl:95
24139 #: ../tools/virt-resize.pl:273 ../tools/virt-list-filesystems.pl:66
24140 #: ../tools/virt-cat.pl:96 ../tools/virt-tar.pl:115
24141 #: ../tools/virt-rescue.pl:119 ../tools/virt-make-fs.pl:169
24142 #: ../tools/virt-list-partitions.pl:67
24143 msgid "B<--version>"
24147 #: ../inspector/virt-inspector.pl:93 ../tools/virt-edit.pl:91
24148 #: ../tools/virt-win-reg.pl:190 ../tools/virt-df.pl:89 ../tools/virt-ls.pl:97
24149 #: ../tools/virt-resize.pl:275 ../tools/virt-list-filesystems.pl:68
24150 #: ../tools/virt-cat.pl:98 ../tools/virt-tar.pl:117
24151 #: ../tools/virt-rescue.pl:121 ../tools/virt-make-fs.pl:171
24152 #: ../tools/virt-list-partitions.pl:69
24153 msgid "Display version number and exit."
24157 #: ../inspector/virt-inspector.pl:99 ../tools/virt-edit.pl:113
24158 #: ../tools/virt-win-reg.pl:204 ../tools/virt-df.pl:95 ../tools/virt-ls.pl:103
24159 #: ../tools/virt-list-filesystems.pl:74 ../tools/virt-cat.pl:104
24160 #: ../tools/virt-tar.pl:123 ../tools/virt-rescue.pl:135
24161 #: ../tools/virt-list-partitions.pl:75
24162 msgid "B<--connect URI> | B<-c URI>"
24166 #: ../inspector/virt-inspector.pl:101 ../tools/virt-edit.pl:115
24167 #: ../tools/virt-win-reg.pl:206 ../tools/virt-df.pl:97 ../tools/virt-ls.pl:105
24168 #: ../tools/virt-list-filesystems.pl:76 ../tools/virt-cat.pl:106
24169 #: ../tools/virt-tar.pl:125 ../tools/virt-rescue.pl:137
24170 #: ../tools/virt-list-partitions.pl:77
24172 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
24173 "to the default libvirt hypervisor."
24177 #: ../inspector/virt-inspector.pl:104
24179 "Libvirt is only used if you specify a C<domname> on the command line. If "
24180 "you specify guest block devices directly, then libvirt is not used at all."
24184 #: ../inspector/virt-inspector.pl:112 ../tools/virt-edit.pl:125
24185 #: ../tools/virt-win-reg.pl:216 ../tools/virt-df.pl:117
24186 #: ../tools/virt-ls.pl:115 ../tools/virt-resize.pl:523
24187 #: ../tools/virt-list-filesystems.pl:86 ../tools/virt-cat.pl:116
24188 #: ../tools/virt-tar.pl:135 ../tools/virt-rescue.pl:147
24189 #: ../tools/virt-list-partitions.pl:87
24190 msgid "B<--format> raw"
24194 #: ../inspector/virt-inspector.pl:114 ../tools/virt-edit.pl:127
24195 #: ../tools/virt-win-reg.pl:218 ../tools/virt-df.pl:119
24196 #: ../tools/virt-ls.pl:117 ../tools/virt-list-filesystems.pl:88
24197 #: ../tools/virt-cat.pl:118 ../tools/virt-tar.pl:137
24198 #: ../tools/virt-rescue.pl:149 ../tools/virt-list-partitions.pl:89
24200 "Specify the format of disk images given on the command line. If this is "
24201 "omitted then the format is autodetected from the content of the disk image."
24205 #: ../inspector/virt-inspector.pl:118 ../tools/virt-edit.pl:131
24206 #: ../tools/virt-win-reg.pl:222 ../tools/virt-df.pl:123
24207 #: ../tools/virt-ls.pl:121 ../tools/virt-list-filesystems.pl:92
24208 #: ../tools/virt-cat.pl:122 ../tools/virt-tar.pl:141
24209 #: ../tools/virt-rescue.pl:153 ../tools/virt-list-partitions.pl:93
24211 "If disk images are requested from libvirt, then this program asks libvirt "
24212 "for this information. In this case, the value of the format parameter is "
24217 #: ../inspector/virt-inspector.pl:122 ../tools/virt-edit.pl:135
24218 #: ../tools/virt-win-reg.pl:226 ../tools/virt-df.pl:127
24219 #: ../tools/virt-ls.pl:125 ../tools/virt-resize.pl:528
24220 #: ../tools/virt-resize.pl:543 ../tools/virt-list-filesystems.pl:96
24221 #: ../tools/virt-cat.pl:126 ../tools/virt-tar.pl:145
24222 #: ../tools/virt-rescue.pl:157 ../tools/virt-list-partitions.pl:97
24224 "If working with untrusted raw-format guest disk images, you should ensure "
24225 "the format is always specified."
24229 #: ../inspector/virt-inspector.pl:131
24231 "The following options select the output format. Use only one of them. The "
24232 "default is a readable text report."
24236 #: ../inspector/virt-inspector.pl:136
24237 msgid "B<--text> (default)"
24241 #: ../inspector/virt-inspector.pl:138
24242 msgid "Plain text report."
24246 #: ../inspector/virt-inspector.pl:140
24251 #: ../inspector/virt-inspector.pl:142
24252 msgid "Produce no output at all."
24256 #: ../inspector/virt-inspector.pl:144
24261 #: ../inspector/virt-inspector.pl:146
24263 "If you select I<--xml> then you get XML output which can be fed to other "
24268 #: ../inspector/virt-inspector.pl:149
24273 #: ../inspector/virt-inspector.pl:151
24275 "If you select I<--yaml> then you get YAML output which can be fed to other "
24280 #: ../inspector/virt-inspector.pl:154
24285 #: ../inspector/virt-inspector.pl:156
24287 "If you select I<--perl> then you get Perl structures output which can be "
24288 "used directly in another Perl program."
24292 #: ../inspector/virt-inspector.pl:159
24297 #: ../inspector/virt-inspector.pl:161
24298 msgid "B<--ro-fish>"
24302 #: ../inspector/virt-inspector.pl:163
24304 "If you select I<--fish> then we print a L<guestfish(1)> command line which "
24305 "will automatically mount up the filesystems on the correct mount points. "
24306 "Try this for example:"
24310 #: ../inspector/virt-inspector.pl:167
24313 " guestfish $(virt-inspector --fish guest.img)\n"
24318 #: ../inspector/virt-inspector.pl:169
24320 "I<--ro-fish> is the same, but the I<--ro> option is passed to guestfish so "
24321 "that the filesystems are mounted read-only."
24325 #: ../inspector/virt-inspector.pl:172
24330 #: ../inspector/virt-inspector.pl:174
24332 "In \"query mode\" we answer common questions about the guest, such as "
24333 "whether it is fullvirt or needs a Xen hypervisor to run."
24337 #: ../inspector/virt-inspector.pl:177
24338 msgid "See section I<QUERY MODE> below."
24342 #: ../inspector/virt-inspector.pl:183
24343 msgid "B<--windows-registry>"
24347 #: ../inspector/virt-inspector.pl:185
24349 "This flag is ignored for compatibility with earlier releases of the software."
24353 #: ../inspector/virt-inspector.pl:188
24355 "In this version, if L<Win::Hivex(3)> is available, then we attempt to parse "
24356 "information out of the Registry for any Windows guest."
24360 #: ../inspector/virt-inspector.pl:244
24361 msgid "OUTPUT FORMAT"
24365 #: ../inspector/virt-inspector.pl:246
24368 " Operating system(s)\n"
24369 " -------------------\n"
24370 " Linux (distro + version)\n"
24371 " Windows (version)\n"
24374 " +--- Filesystems ---------- Installed apps --- Kernel & drivers\n"
24375 " ----------- -------------- ----------------\n"
24376 " mount point => device List of apps Extra information\n"
24377 " mount point => device and versions about kernel(s)\n"
24378 " ... and drivers\n"
24379 " swap => swap device\n"
24380 " (plus lots of extra information\n"
24381 " about each filesystem)\n"
24386 #: ../inspector/virt-inspector.pl:261
24387 msgid "The output of virt-inspector is a complex two-level data structure."
24391 #: ../inspector/virt-inspector.pl:263
24393 "At the top level is a list of the operating systems installed on the guest. "
24394 "(For the vast majority of guests, only a single OS is installed.) The data "
24395 "returned for the OS includes the name (Linux, Windows), the distribution and "
24400 #: ../inspector/virt-inspector.pl:268
24401 msgid "The diagram above shows what we return for each OS."
24405 #: ../inspector/virt-inspector.pl:270
24407 "With the I<--xml> option the output is mapped into an XML document. There "
24408 "is a RELAX-NG schema for this XML in the file I<virt-inspector.rng> which "
24409 "normally ships with virt-inspector, or can be found in the source."
24413 #: ../inspector/virt-inspector.pl:275
24415 "With the I<--fish> or I<--ro-fish> option the mount points are mapped to "
24416 "L<guestfish(1)> command line parameters, so that you can go in afterwards "
24417 "and inspect the guest with everything mounted in the right place. For "
24422 #: ../inspector/virt-inspector.pl:280
24425 " guestfish $(virt-inspector --ro-fish guest.img)\n"
24426 " ==> guestfish --ro -a guest.img -m /dev/VG/LV:/ -m /dev/sda1:/boot\n"
24431 #: ../inspector/virt-inspector.pl:620
24436 #: ../inspector/virt-inspector.pl:622
24438 "When you use C<virt-inspector --query>, the output is a series of lines of "
24443 #: ../inspector/virt-inspector.pl:625
24449 " xen_pv_drivers=no\n"
24454 #: ../inspector/virt-inspector.pl:630
24456 "(each answer is usually C<yes> or C<no>, or the line is completely missing "
24457 "if we could not determine the answer at all)."
24461 #: ../inspector/virt-inspector.pl:633
24463 "If the guest is multiboot, you can get apparently conflicting answers (eg. "
24464 "C<windows=yes> and C<linux=yes>, or a guest which is both fullvirt and has a "
24465 "Xen PV kernel). This is normal, and just means that the guest can do both "
24466 "things, although it might require operator intervention such as selecting a "
24467 "boot option when the guest is booting."
24471 #: ../inspector/virt-inspector.pl:640
24472 msgid "This section describes the full range of answers possible."
24476 #: ../inspector/virt-inspector.pl:661
24477 msgid "windows=(yes|no)"
24481 #: ../inspector/virt-inspector.pl:663
24482 msgid "Answer C<yes> if Microsoft Windows is installed in the guest."
24486 #: ../inspector/virt-inspector.pl:676
24487 msgid "linux=(yes|no)"
24491 #: ../inspector/virt-inspector.pl:678
24492 msgid "Answer C<yes> if a Linux kernel is installed in the guest."
24496 #: ../inspector/virt-inspector.pl:691
24497 msgid "rhel=(yes|no)"
24501 #: ../inspector/virt-inspector.pl:693
24502 msgid "Answer C<yes> if the guest contains Red Hat Enterprise Linux."
24506 #: ../inspector/virt-inspector.pl:707
24507 msgid "fedora=(yes|no)"
24511 #: ../inspector/virt-inspector.pl:709
24512 msgid "Answer C<yes> if the guest contains the Fedora Linux distribution."
24516 #: ../inspector/virt-inspector.pl:722
24517 msgid "debian=(yes|no)"
24521 #: ../inspector/virt-inspector.pl:724
24522 msgid "Answer C<yes> if the guest contains the Debian Linux distribution."
24526 #: ../inspector/virt-inspector.pl:737
24527 msgid "fullvirt=(yes|no)"
24531 #: ../inspector/virt-inspector.pl:739
24533 "Answer C<yes> if there is at least one operating system kernel installed in "
24534 "the guest which runs fully virtualized. Such a guest would require a "
24535 "hypervisor which supports full system virtualization."
24539 #: ../inspector/virt-inspector.pl:762
24540 msgid "xen_domU_kernel=(yes|no)"
24544 #: ../inspector/virt-inspector.pl:764
24546 "Answer C<yes> if there is at least one Linux kernel installed in the guest "
24547 "which is compiled as a Xen DomU (a Xen paravirtualized guest)."
24551 #: ../inspector/virt-inspector.pl:784
24552 msgid "xen_pv_drivers=(yes|no)"
24556 #: ../inspector/virt-inspector.pl:786
24558 "Answer C<yes> if the guest has Xen paravirtualized drivers installed "
24559 "(usually the kernel itself will be fully virtualized, but the PV drivers "
24560 "have been installed by the administrator for performance reasons)."
24564 #: ../inspector/virt-inspector.pl:808
24565 msgid "virtio_drivers=(yes|no)"
24569 #: ../inspector/virt-inspector.pl:810
24571 "Answer C<yes> if the guest has virtio paravirtualized drivers installed. "
24572 "Virtio drivers are commonly used to improve the performance of KVM."
24576 #: ../inspector/virt-inspector.pl:831
24577 msgid "userspace_arch=(x86_64|...)"
24581 #: ../inspector/virt-inspector.pl:833
24582 msgid "Print the architecture of userspace."
24586 #: ../inspector/virt-inspector.pl:835 ../inspector/virt-inspector.pl:856
24587 msgid "NB. For multi-boot VMs this can print several lines."
24591 #: ../inspector/virt-inspector.pl:852
24592 msgid "kernel_arch=(x86_64|...)"
24596 #: ../inspector/virt-inspector.pl:854
24597 msgid "Print the architecture of the kernel."
24601 #: ../inspector/virt-inspector.pl:877 ../tools/virt-edit.pl:343
24602 #: ../tools/virt-win-reg.pl:142 ../tools/virt-win-reg.pl:480
24603 #: ../tools/virt-df.pl:633 ../tools/virt-ls.pl:228
24604 #: ../tools/virt-resize.pl:1479 ../tools/virt-list-filesystems.pl:209
24605 #: ../tools/virt-cat.pl:181 ../tools/virt-tar.pl:276
24606 #: ../tools/virt-rescue.pl:260 ../tools/virt-make-fs.pl:527
24607 #: ../tools/virt-list-partitions.pl:247
24608 msgid "SHELL QUOTING"
24612 #: ../inspector/virt-inspector.pl:879 ../tools/virt-edit.pl:345
24613 #: ../tools/virt-win-reg.pl:482 ../tools/virt-df.pl:635
24614 #: ../tools/virt-ls.pl:230 ../tools/virt-resize.pl:1481
24615 #: ../tools/virt-list-filesystems.pl:211 ../tools/virt-cat.pl:183
24616 #: ../tools/virt-tar.pl:278 ../tools/virt-rescue.pl:262
24617 #: ../tools/virt-make-fs.pl:529 ../tools/virt-list-partitions.pl:249
24619 "Libvirt guest names can contain arbitrary characters, some of which have "
24620 "meaning to the shell such as C<#> and space. You may need to quote or "
24621 "escape these characters on the command line. See the shell manual page L<sh"
24622 "(1)> for details."
24626 #: ../inspector/virt-inspector.pl:886 ../tools/virt-df.pl:642
24628 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
24629 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
24633 #: ../inspector/virt-inspector.pl:895 ../tools/virt-edit.pl:364
24634 #: ../tools/virt-win-reg.pl:515 ../tools/virt-df.pl:651
24635 #: ../tools/virt-ls.pl:248 ../tools/virt-resize.pl:1510
24636 #: ../tools/virt-list-filesystems.pl:230 ../tools/virt-cat.pl:200
24637 #: ../tools/virt-tar.pl:296 ../tools/virt-rescue.pl:279
24638 #: ../tools/virt-make-fs.pl:561 ../tools/virt-list-partitions.pl:267
24639 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
24643 #: ../inspector/virt-inspector.pl:897
24644 msgid "Matthew Booth L<mbooth@redhat.com>"
24648 #: ../inspector/virt-inspector.pl:901 ../tools/virt-ls.pl:252
24649 #: ../tools/virt-list-filesystems.pl:234 ../tools/virt-cat.pl:204
24650 #: ../tools/virt-tar.pl:300
24651 msgid "Copyright (C) 2009 Red Hat Inc."
24655 #: ../tools/virt-edit.pl:35
24656 msgid "virt-edit - Edit a file in a virtual machine"
24660 #: ../tools/virt-edit.pl:39
24663 " virt-edit [--options] domname file\n"
24668 #: ../tools/virt-edit.pl:41
24671 " virt-edit [--options] disk.img [disk.img ...] file\n"
24676 #: ../tools/virt-edit.pl:43
24679 " virt-edit [domname|disk.img] file -e 'expr'\n"
24684 #: ../tools/virt-edit.pl:47
24686 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
24687 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
24688 "doing this, but doesn't catch all cases."
24692 #: ../tools/virt-edit.pl:53
24694 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
24695 "the named virtual machine (or disk image)."
24699 #: ../tools/virt-edit.pl:56
24701 "If you want to just view a file, use L<virt-cat(1)>. For more complex cases "
24702 "you should look at the L<guestfish(1)> tool."
24706 #: ../tools/virt-edit.pl:61
24707 msgid "Edit the named files interactively:"
24711 #: ../tools/virt-edit.pl:63
24714 " virt-edit mydomain /boot/grub/grub.conf\n"
24719 #: ../tools/virt-edit.pl:65
24722 " virt-edit mydomain /etc/passwd\n"
24727 #: ../tools/virt-edit.pl:67
24729 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
24730 "below). To change the init default level to 5:"
24734 #: ../tools/virt-edit.pl:71
24737 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
24742 #: ../tools/virt-edit.pl:97
24743 msgid "B<--backup extension> | B<-b extension>"
24747 #: ../tools/virt-edit.pl:99
24749 "Create a backup of the original file I<in the guest disk image>. The backup "
24750 "has the original filename with C<extension> added."
24754 #: ../tools/virt-edit.pl:102
24756 "Usually the first character of C<extension> would be a dot C<.> so you would "
24761 #: ../tools/virt-edit.pl:105
24764 " virt-edit -b .orig [etc]\n"
24769 #: ../tools/virt-edit.pl:107
24770 msgid "By default, no backup file is made."
24774 #: ../tools/virt-edit.pl:118 ../tools/virt-win-reg.pl:209
24775 #: ../tools/virt-df.pl:100 ../tools/virt-ls.pl:108
24776 #: ../tools/virt-list-filesystems.pl:79 ../tools/virt-cat.pl:109
24777 #: ../tools/virt-tar.pl:128 ../tools/virt-rescue.pl:140
24778 #: ../tools/virt-list-partitions.pl:80
24780 "If you specify guest block devices directly, then libvirt is not used at all."
24784 #: ../tools/virt-edit.pl:142
24785 msgid "B<--expr EXPR> | B<-e EXPR>"
24789 #: ../tools/virt-edit.pl:144
24791 "Instead of launching the external editor, non-interactively apply the Perl "
24792 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
24797 #: ../tools/virt-edit.pl:148
24799 "Be careful to properly quote the expression to prevent it from being altered "
24804 #: ../tools/virt-edit.pl:268
24805 msgid "NON-INTERACTIVE EDITING"
24809 #: ../tools/virt-edit.pl:270
24811 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
24812 "administrator can interactively edit the file."
24816 #: ../tools/virt-edit.pl:273
24818 "There are two ways also to use C<virt-edit> from scripts in order to make "
24819 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
24820 "like this, it's less error-prone to write scripts directly using the "
24821 "libguestfs API and Augeas for configuration file editing.)"
24825 #: ../tools/virt-edit.pl:279
24827 "The first method is to temporarily set C<$EDITOR> to any script or program "
24828 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
24829 "update C<tmpfile> in place however it likes."
24833 #: ../tools/virt-edit.pl:283
24835 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
24836 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
24837 "instances of C<foo> with C<bar> in a file:"
24841 #: ../tools/virt-edit.pl:287
24844 " virt-edit domname filename -e 's/foo/bar/'\n"
24849 #: ../tools/virt-edit.pl:289
24851 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
24852 "For example to delete root's password you could do:"
24856 #: ../tools/virt-edit.pl:292
24859 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
24864 #: ../tools/virt-edit.pl:294
24866 "What really happens is that the snippet is evaluated as a Perl expression "
24867 "for each line of the file. The line, including the final C<\\n>, is passed "
24868 "in C<$_> and the expression should update C<$_> or leave it unchanged."
24872 #: ../tools/virt-edit.pl:299
24874 "To delete a line, set C<$_> to the empty string. For example, to delete the "
24875 "C<apache> user account from the password file you can do:"
24879 #: ../tools/virt-edit.pl:302
24882 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
24887 #: ../tools/virt-edit.pl:304
24889 "To insert a line, prepend or append it to C<$_>. However appending lines to "
24890 "the end of the file is rather difficult this way since there is no concept "
24891 "of \"last line of the file\" - your expression just doesn't get called "
24892 "again. You might want to use the first method (setting C<$EDITOR>) if you "
24897 #: ../tools/virt-edit.pl:310
24899 "The variable C<$lineno> contains the current line number. As is "
24900 "traditional, the first line in the file is number C<1>."
24904 #: ../tools/virt-edit.pl:313
24906 "The return value from the expression is ignored, but the expression may call "
24907 "C<die> in order to abort the whole program, leaving the original file "
24912 #: ../tools/virt-edit.pl:317
24914 "Remember when matching the end of a line that C<$_> may contain the final C<"
24915 "\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
24916 "newline then neither of these. Thus to match or substitute some text at the "
24917 "end of a line, use this regular expression:"
24921 #: ../tools/virt-edit.pl:322
24924 " /some text(\\r?\\n)?$/\n"
24929 #: ../tools/virt-edit.pl:324
24931 "Alternately, use the perl C<chomp> function, being careful not to chomp C<"
24932 "$_> itself (since that would remove all newlines from the file):"
24936 #: ../tools/virt-edit.pl:328
24939 " my $m = $_; chomp $m; $m =~ /some text$/\n"
24944 #: ../tools/virt-edit.pl:334
24949 #: ../tools/virt-edit.pl:336
24951 "If set, this string is used as the editor. It may contain arguments, eg. C<"
24956 #: ../tools/virt-edit.pl:339
24957 msgid "If not set, C<vi> is used."
24961 #: ../tools/virt-edit.pl:352
24963 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::"
24964 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>, L<perl(1)>, "
24969 #: ../tools/virt-edit.pl:362 ../tools/virt-win-reg.pl:513
24970 #: ../tools/virt-df.pl:649 ../tools/virt-ls.pl:246
24971 #: ../tools/virt-resize.pl:1508 ../tools/virt-list-filesystems.pl:228
24972 #: ../tools/virt-cat.pl:198 ../tools/virt-tar.pl:294
24973 #: ../tools/virt-rescue.pl:277 ../tools/virt-make-fs.pl:559
24974 #: ../tools/virt-list-partitions.pl:265
24979 #: ../tools/virt-edit.pl:368 ../tools/virt-df.pl:655
24980 #: ../tools/virt-rescue.pl:283 ../tools/virt-list-partitions.pl:271
24981 msgid "Copyright (C) 2009-2010 Red Hat Inc."
24985 #: ../tools/virt-win-reg.pl:38
24987 "virt-win-reg - Export and merge Windows Registry entries from a Windows guest"
24991 #: ../tools/virt-win-reg.pl:42
24994 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
24999 #: ../tools/virt-win-reg.pl:44
25002 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
25007 #: ../tools/virt-win-reg.pl:46
25010 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
25015 #: ../tools/virt-win-reg.pl:48
25018 " virt-win-reg --merge domname [input.reg ...]\n"
25023 #: ../tools/virt-win-reg.pl:50
25026 " virt-win-reg [--options] disk.img ... # instead of domname\n"
25031 #: ../tools/virt-win-reg.pl:54
25033 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
25034 "virtual machines. If you do this, you I<will> get irreversible disk "
25035 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
25036 "but doesn't catch all cases."
25040 #: ../tools/virt-win-reg.pl:59
25042 "Modifying the Windows Registry is an inherently risky operation. The format "
25043 "is deliberately obscure and undocumented, and Registry changes can leave the "
25044 "system unbootable. Therefore when using the C<--merge> option, make sure "
25045 "you have a reliable backup first."
25049 #: ../tools/virt-win-reg.pl:66
25051 "This program can export and merge Windows Registry entries from a Windows "
25056 #: ../tools/virt-win-reg.pl:69
25058 "The first parameter is the libvirt guest name or the raw disk image of a "
25063 #: ../tools/virt-win-reg.pl:72
25065 "If C<--merge> is I<not> specified, then the chosen registry key is displayed/"
25066 "exported (recursively). For example:"
25070 #: ../tools/virt-win-reg.pl:75
25073 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
25078 #: ../tools/virt-win-reg.pl:77
25080 "You can also display single values from within registry keys, for example:"
25084 #: ../tools/virt-win-reg.pl:80
25087 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
25088 " $ virt-win-reg Windows7 $cvkey ProductName\n"
25089 " Windows 7 Enterprise\n"
25094 #: ../tools/virt-win-reg.pl:84
25096 "With C<--merge>, you can merge a textual regedit file into the Windows "
25101 #: ../tools/virt-win-reg.pl:87
25104 " $ virt-win-reg --merge Windows7 changes.reg\n"
25109 #: ../tools/virt-win-reg.pl:89
25110 msgid "SUPPORTED SYSTEMS"
25114 #: ../tools/virt-win-reg.pl:91
25116 "The program currently supports Windows NT-derived guests starting with "
25117 "Windows XP through to at least Windows 7."
25121 #: ../tools/virt-win-reg.pl:94
25123 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, C<HKEY_LOCAL_MACHINE"
25124 "\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, C<HKEY_LOCAL_MACHINE\\SYSTEM> "
25125 "and C<HKEY_USERS\\.DEFAULT>."
25129 #: ../tools/virt-win-reg.pl:98
25131 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
25136 #: ../tools/virt-win-reg.pl:101
25138 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
25143 #: ../tools/virt-win-reg.pl:104
25148 #: ../tools/virt-win-reg.pl:106
25150 "This program is only meant for simple access to the registry. If you want "
25151 "to do complicated things with the registry, we suggest you download the "
25152 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
25153 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
25154 "L<hivexregedit(1)>."
25158 #: ../tools/virt-win-reg.pl:112
25163 #: ../tools/virt-win-reg.pl:114
25165 "C<virt-win-reg> expects that regedit files have already been reencoded in "
25166 "the local encoding. Usually on Linux hosts, this means UTF-8 with Unix-"
25167 "style line endings. Since Windows regedit files are often in UTF-16LE with "
25168 "Windows-style line endings, you may need to reencode the whole file before "
25169 "or after processing."
25173 #: ../tools/virt-win-reg.pl:120
25175 "To reencode a file from Windows format to Linux (before processing it with "
25176 "the C<--merge> option), you would do something like this:"
25180 #: ../tools/virt-win-reg.pl:123
25183 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
25188 #: ../tools/virt-win-reg.pl:125
25190 "To go in the opposite direction, after exporting and before sending the file "
25191 "to a Windows user, do something like this:"
25195 #: ../tools/virt-win-reg.pl:128
25198 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
25203 #: ../tools/virt-win-reg.pl:130
25204 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
25208 #: ../tools/virt-win-reg.pl:132
25210 "If you are unsure about the current encoding, use the L<file(1)> command. "
25211 "Recent versions of Windows regedit.exe produce a UTF-16LE file with Windows-"
25212 "style (CRLF) line endings, like this:"
25216 #: ../tools/virt-win-reg.pl:136
25219 " $ file software.reg\n"
25220 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
25221 " with CRLF line terminators\n"
25226 #: ../tools/virt-win-reg.pl:140
25227 msgid "This file would need conversion before you could C<--merge> it."
25231 #: ../tools/virt-win-reg.pl:144
25233 "Be careful when passing parameters containing C<\\> (backslash) in the "
25234 "shell. Usually you will have to use 'single quotes' or double backslashes "
25235 "(but not both) to protect them from the shell."
25239 #: ../tools/virt-win-reg.pl:148
25240 msgid "Paths and value names are case-insensitive."
25244 #: ../tools/virt-win-reg.pl:150
25245 msgid "CurrentControlSet etc."
25249 #: ../tools/virt-win-reg.pl:152
25251 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
25252 "Registry at the level of the hive file, and therefore you cannot modify "
25257 #: ../tools/virt-win-reg.pl:156
25259 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
25260 "circumstances it might refer to another control set. The way to find out is "
25261 "to look at the C<HKLM\\SYSTEM\\Select> key:"
25265 #: ../tools/virt-win-reg.pl:160
25268 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
25269 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
25270 " \"Current\"=dword:00000001\n"
25271 " \"Default\"=dword:00000001\n"
25272 " \"Failed\"=dword:00000000\n"
25273 " \"LastKnownGood\"=dword:00000002\n"
25278 #: ../tools/virt-win-reg.pl:167
25279 msgid "\"Default\" is the one which Windows will choose when it boots."
25283 #: ../tools/virt-win-reg.pl:169
25285 "Similarly, other C<Current...> keys in the path may need to be replaced."
25289 #: ../tools/virt-win-reg.pl:196 ../tools/virt-make-fs.pl:177
25294 #: ../tools/virt-win-reg.pl:198 ../tools/virt-resize.pl:501
25295 msgid "Enable debugging messages."
25299 #: ../tools/virt-win-reg.pl:233
25304 #: ../tools/virt-win-reg.pl:235
25306 "In merge mode, this merges a textual regedit file into the Windows Registry "
25307 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
25308 "displays or exports Registry entries instead."
25312 #: ../tools/virt-win-reg.pl:239
25314 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
25315 "result in disk corruption. However exporting (without this flag) is always "
25320 #: ../tools/virt-win-reg.pl:247
25321 msgid "B<--encoding> UTF-16LE|ASCII"
25325 #: ../tools/virt-win-reg.pl:249
25327 "When merging (only), you may need to specify the encoding for strings to be "
25328 "used in the hive file. This is explained in detail in L<Win::Hivex::Regedit"
25329 "(3)/ENCODING STRINGS>."
25333 #: ../tools/virt-win-reg.pl:253
25335 "The default is to use UTF-16LE, which should work with recent versions of "
25340 #: ../tools/virt-win-reg.pl:489
25342 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, L<guestfish(1)"
25343 ">, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Win::Hivex"
25344 "(3)>, L<Win::Hivex::Regedit(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
25348 #: ../tools/virt-win-reg.pl:504 ../tools/virt-make-fs.pl:550
25350 "When reporting bugs, please enable debugging and capture the I<complete> "
25355 #: ../tools/virt-win-reg.pl:507
25358 " export LIBGUESTFS_DEBUG=1\n"
25359 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
25364 #: ../tools/virt-win-reg.pl:510
25366 "Attach /tmp/virt-win-reg.log to a new bug report at L<https://bugzilla."
25371 #: ../tools/virt-win-reg.pl:519 ../tools/virt-resize.pl:1514
25372 #: ../tools/virt-make-fs.pl:565
25373 msgid "Copyright (C) 2010 Red Hat Inc."
25377 #: ../tools/virt-df.pl:36
25378 msgid "virt-df - Display free space on virtual filesystems"
25382 #: ../tools/virt-df.pl:40
25385 " virt-df [--options]\n"
25390 #: ../tools/virt-df.pl:42
25393 " virt-df [--options] domname\n"
25398 #: ../tools/virt-df.pl:44
25401 " virt-df [--options] disk.img [disk.img ...]\n"
25406 #: ../tools/virt-df.pl:48
25408 "C<virt-df> is a command line tool to display free space on virtual machine "
25409 "filesystems. Unlike other tools, it doesn't just display the amount of "
25410 "space allocated to a virtual machine, but can look inside the virtual "
25411 "machine to see how much space is really being used."
25415 #: ../tools/virt-df.pl:53
25417 "It is like the L<df(1)> command, but for virtual machines, except that it "
25418 "also works for Windows virtual machines."
25422 #: ../tools/virt-df.pl:56
25424 "If used without any arguments, C<virt-df> checks with libvirt to get a list "
25425 "of all active and inactive guests, and performs a C<df>-type operation on "
25426 "each one in turn, printing out the results."
25430 #: ../tools/virt-df.pl:60
25432 "If used with any argument(s), C<virt-df> performs a C<df>-type operation on "
25433 "either the single named libvirt domain, or on the disk image(s) listed on "
25434 "the command line (which must all belong to a single VM). In this mode (with "
25435 "arguments), C<virt-df> will I<only work for a single guest>. If you want to "
25436 "run on multiple guests, then you have to invoke C<virt-df> multiple times."
25440 #: ../tools/virt-df.pl:67
25442 "Use the C<--csv> option to get a format which can be easily parsed by other "
25443 "programs. Other options are mostly similar to standard C<df> options. See "
25444 "below for the complete list."
25448 #: ../tools/virt-df.pl:107
25453 #: ../tools/virt-df.pl:109
25455 "Write out the results in CSV format (comma-separated values). This format "
25456 "can be imported easily into databases and spreadsheets, but read L</NOTE "
25457 "ABOUT CSV FORMAT> below."
25461 #: ../tools/virt-df.pl:134
25462 msgid "B<--human-readable> | B<-h>"
25466 #: ../tools/virt-df.pl:136
25467 msgid "Print sizes in human-readable format."
25471 #: ../tools/virt-df.pl:138
25472 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
25476 #: ../tools/virt-df.pl:144
25477 msgid "B<--inodes> | B<-i>"
25481 #: ../tools/virt-df.pl:146
25482 msgid "Print inodes instead of blocks."
25486 #: ../tools/virt-df.pl:152
25487 msgid "B<--one-per-guest>"
25491 #: ../tools/virt-df.pl:154
25493 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
25494 "disks from several guests to a single libguestfs appliance."
25498 #: ../tools/virt-df.pl:157
25499 msgid "You might use this option in the following circumstances:"
25503 #: ../tools/virt-df.pl:163
25505 "If you think an untrusted guest might actively try to exploit the libguestfs "
25506 "appliance kernel, then this prevents one guest from interfering with the "
25507 "stats printed for another guest."
25511 #: ../tools/virt-df.pl:169
25513 "If the kernel has a bug which stops it from accessing a filesystem in one "
25514 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
25515 "and report stats for further guests."
25519 #: ../tools/virt-df.pl:180
25524 #: ../tools/virt-df.pl:182
25526 "Print UUIDs instead of names. This is useful for following a guest even "
25527 "when the guest is migrated or renamed, or when two guests happen to have the "
25532 #: ../tools/virt-df.pl:186
25534 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
25535 "images, we still print the disk image name even when this option is "
25540 #: ../tools/virt-df.pl:609
25541 msgid "NOTE ABOUT CSV FORMAT"
25545 #: ../tools/virt-df.pl:611
25547 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
25548 "should be easy to parse, but it is definitely not easy to parse."
25552 #: ../tools/virt-df.pl:614
25554 "Myth: Just split fields at commas. Reality: This does I<not> work "
25555 "reliably. This example has two columns:"
25559 #: ../tools/virt-df.pl:617
25562 " \"foo,bar\",baz\n"
25567 #: ../tools/virt-df.pl:619
25569 "Myth: Read the file one line at a time. Reality: This does I<not> work "
25570 "reliably. This example has one row:"
25574 #: ../tools/virt-df.pl:622
25583 #: ../tools/virt-df.pl:625
25585 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
25586 "packaged in major Linux distributions)."
25590 #: ../tools/virt-df.pl:628
25592 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
25593 "or Python's built-in csv library)."
25597 #: ../tools/virt-df.pl:631
25598 msgid "Most spreadsheets and databases can import CSV directly."
25602 #: ../tools/virt-ls.pl:35
25603 msgid "virt-ls - List files in a virtual machine"
25607 #: ../tools/virt-ls.pl:39
25610 " virt-ls [--options] domname directory\n"
25615 #: ../tools/virt-ls.pl:41
25618 " virt-ls [--options] disk.img [disk.img ...] directory\n"
25623 #: ../tools/virt-ls.pl:45
25625 "C<virt-ls> is a command line tool to list the names of files in a directory "
25626 "inside a virtual machine or disk image."
25630 #: ../tools/virt-ls.pl:48
25632 "C<virt-ls> is just a simple wrapper around L<libguestfs(3)> functionality. "
25633 "For more complex cases you should look at the L<guestfish(1)> tool."
25637 #: ../tools/virt-ls.pl:52
25639 "C<virt-ls> can be used in one of three modes: simple, long and recursive. A "
25640 "simple listing is like the ordinary L<ls(1)> command:"
25644 #: ../tools/virt-ls.pl:55
25647 " $ virt-ls myguest /\n"
25655 #: ../tools/virt-ls.pl:60
25656 msgid "With the C<-l> (C<--long>) option, C<virt-ls> shows more detail:"
25660 #: ../tools/virt-ls.pl:62
25663 " $ virt-ls -l myguest /\n"
25665 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
25666 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
25672 #: ../tools/virt-ls.pl:68
25674 "With the C<-R> (C<--recursive>) option, C<virt-ls> lists the names of files "
25675 "and directories recursively:"
25679 #: ../tools/virt-ls.pl:71
25682 " $ virt-ls -R myguest /tmp\n"
25690 #: ../tools/virt-ls.pl:76
25692 "You I<cannot> combine these options. To do more complicated things, use "
25697 #: ../tools/virt-ls.pl:132 ../tools/virt-list-filesystems.pl:103
25698 #: ../tools/virt-list-partitions.pl:112
25699 msgid "B<-l> | B<--long>"
25703 #: ../tools/virt-ls.pl:134
25704 msgid "B<-R> | B<--recursive>"
25708 #: ../tools/virt-ls.pl:136
25710 "Select the mode. With neither of these options, C<virt-ls> produces a "
25711 "simple, flat list of the files in the named directory."
25715 #: ../tools/virt-ls.pl:139
25717 "C<virt-ls -l> produces a \"long listing\", which shows more detail (just "
25718 "like the plain C<ls -l> command)."
25722 #: ../tools/virt-ls.pl:142
25724 "C<virt-ls -R> produces a recursive list of files starting at the named "
25725 "directory. See the documentation for the C<guestfs_find> command L<guestfs"
25726 "(3)> for precise details."
25730 #: ../tools/virt-ls.pl:146
25731 msgid "You cannot combine these options."
25735 #: ../tools/virt-ls.pl:237
25737 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<Sys::"
25738 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
25743 #: ../tools/virt-resize.pl:42
25744 msgid "virt-resize - Resize a virtual machine disk"
25748 #: ../tools/virt-resize.pl:46
25751 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
25752 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
25753 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
25758 #: ../tools/virt-resize.pl:52
25760 "Virt-resize is a tool which can resize a virtual machine disk, making it "
25761 "larger or smaller overall, and resizing or deleting any partitions contained "
25766 #: ../tools/virt-resize.pl:56
25768 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
25769 "not> be used on live virtual machines - for consistent results, shut the "
25770 "virtual machine down before resizing it."
25774 #: ../tools/virt-resize.pl:60
25776 "If you are not familiar with the associated tools: L<virt-list-partitions(1)"
25777 ">, L<virt-list-filesystems(1)> and L<virt-df(1)>, we recommend you go and "
25778 "read those manual pages first."
25782 #: ../tools/virt-resize.pl:68
25784 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
25785 "fill the extra 5GB of space."
25789 #: ../tools/virt-resize.pl:71
25792 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
25793 " virt-list-partitions -lht olddisk\n"
25794 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
25795 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
25800 #: ../tools/virt-resize.pl:76
25802 "As above, but make the /boot partition 200MB bigger, while giving the "
25803 "remaining space to /dev/sda2:"
25807 #: ../tools/virt-resize.pl:79
25810 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
25815 #: ../tools/virt-resize.pl:81
25816 msgid "As above, but the output format will be uncompressed qcow2:"
25820 #: ../tools/virt-resize.pl:83
25823 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
25824 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
25829 #: ../tools/virt-resize.pl:86
25830 msgid "DETAILED USAGE"
25834 #: ../tools/virt-resize.pl:88
25835 msgid "EXPANDING A VIRTUAL MACHINE DISK"
25839 #: ../tools/virt-resize.pl:92
25840 msgid "1. Shut down the virtual machine"
25844 #: ../tools/virt-resize.pl:94
25845 msgid "2. Locate input disk image"
25849 #: ../tools/virt-resize.pl:96
25851 "Locate the input disk image (ie. the file or device on the host containing "
25852 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
25853 "dumpxml> like this to find the disk image name:"
25857 #: ../tools/virt-resize.pl:100
25860 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
25861 " Found 1 nodes:\n"
25863 " <source dev=\"/dev/vg/lv_guest\" />\n"
25868 #: ../tools/virt-resize.pl:105
25869 msgid "3. Look at current sizing"
25873 #: ../tools/virt-resize.pl:107
25875 "Use L<virt-list-partitions(1)> to display the current partitions and sizes:"
25879 #: ../tools/virt-resize.pl:110
25882 " # virt-list-partitions -lht /dev/vg/lv_guest\n"
25883 " /dev/sda1 ext3 101.9M\n"
25884 " /dev/sda2 pv 7.9G\n"
25885 " /dev/sda device 8.0G\n"
25890 #: ../tools/virt-resize.pl:115
25892 "(This example is a virtual machine with an 8 GB disk which we would like to "
25893 "expand up to 10 GB)."
25897 #: ../tools/virt-resize.pl:118
25898 msgid "4. Create output disk"
25902 #: ../tools/virt-resize.pl:120
25904 "Virt-resize cannot do in-place disk modifications. You have to have space "
25905 "to store the resized output disk."
25909 #: ../tools/virt-resize.pl:123
25911 "To store the resized disk image in a file, create a file of a suitable size:"
25915 #: ../tools/virt-resize.pl:126
25918 " # rm -f outdisk\n"
25919 " # truncate -s 10G outdisk\n"
25924 #: ../tools/virt-resize.pl:129
25925 msgid "Or use L<lvcreate(1)> to create a logical volume:"
25929 #: ../tools/virt-resize.pl:131
25932 " # lvcreate -L 10G -n lv_name vg_name\n"
25937 #: ../tools/virt-resize.pl:133
25938 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
25942 #: ../tools/virt-resize.pl:135
25945 " # virsh pool-list\n"
25946 " # virsh vol-create-as poolname newvol 10G\n"
25951 #: ../tools/virt-resize.pl:138
25956 #: ../tools/virt-resize.pl:140
25958 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
25959 "file) and the output disk. The output disk is the one created in the "
25964 #: ../tools/virt-resize.pl:144
25967 " # virt-resize indisk outdisk\n"
25972 #: ../tools/virt-resize.pl:146
25974 "This command just copies disk image C<indisk> to disk image C<outdisk> "
25975 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
25976 "larger, then an extra, empty partition is created at the end of the disk "
25977 "covering the extra space. If C<outdisk> is smaller, then it will give an "
25982 #: ../tools/virt-resize.pl:152
25984 "More realistically you'd want to expand existing partitions in the disk "
25985 "image by passing extra options (for the full list see the L</OPTIONS> "
25990 #: ../tools/virt-resize.pl:156
25992 "L</--expand> is the most useful option. It expands the named partition "
25993 "within the disk to fill any extra space:"
25997 #: ../tools/virt-resize.pl:159
26000 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
26005 #: ../tools/virt-resize.pl:161
26007 "(In this case, an extra partition is I<not> created at the end of the disk, "
26008 "because there will be no unused space)."
26012 #: ../tools/virt-resize.pl:164
26014 "L</--resize> is the other commonly used option. The following would "
26015 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
26016 "rest of the available space:"
26020 #: ../tools/virt-resize.pl:168
26023 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
26024 " indisk outdisk\n"
26029 #: ../tools/virt-resize.pl:171
26031 "If the expanded partition in the image contains a filesystem or LVM PV, then "
26032 "if virt-resize knows how, it will resize the contents, the equivalent of "
26033 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or L<ntfsresize(8)"
26034 ">. However virt-resize does not know how to resize some filesystems, so you "
26035 "would have to online resize them after booting the guest. And virt-resize "
26036 "also does not resize anything inside an LVM PV, it just resizes the PV "
26037 "itself and leaves the user to resize any LVs inside that PV as desired."
26041 #: ../tools/virt-resize.pl:180
26042 msgid "Other options are covered below."
26046 #: ../tools/virt-resize.pl:182
26051 #: ../tools/virt-resize.pl:184
26052 msgid "Thoroughly test the new disk image I<before> discarding the old one."
26056 #: ../tools/virt-resize.pl:186
26057 msgid "If you are using libvirt, edit the XML to point at the new disk:"
26061 #: ../tools/virt-resize.pl:188
26064 " # virsh edit guestname\n"
26069 #: ../tools/virt-resize.pl:190
26071 "Change E<lt>source ...E<gt>, see L<http://libvirt.org/formatdomain."
26072 "html#elementsDisks>"
26076 #: ../tools/virt-resize.pl:193
26077 msgid "Then start up the domain with the new, resized disk:"
26081 #: ../tools/virt-resize.pl:195
26084 " # virsh start guestname\n"
26089 #: ../tools/virt-resize.pl:197
26091 "and check that it still works. See also the L</NOTES> section below for "
26092 "additional information."
26096 #: ../tools/virt-resize.pl:200
26097 msgid "7. Resize LVs etc inside the guest"
26101 #: ../tools/virt-resize.pl:202
26102 msgid "(This can also be done offline using L<guestfish(1)>)"
26106 #: ../tools/virt-resize.pl:204
26108 "Once the guest has booted you should see the new space available, at least "
26109 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
26110 "may need to resize LVs inside PVs, and also resize filesystem types that "
26111 "virt-resize does not know how to expand."
26115 #: ../tools/virt-resize.pl:211
26116 msgid "SHRINKING A VIRTUAL MACHINE DISK"
26120 #: ../tools/virt-resize.pl:213
26122 "Shrinking is somewhat more complex than expanding, and only an overview is "
26127 #: ../tools/virt-resize.pl:216
26129 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
26130 "filesystems). The user has to shrink content before passing the disk image "
26131 "to virt-resize, and virt-resize will check that the content has been shrunk "
26136 #: ../tools/virt-resize.pl:221
26137 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
26141 #: ../tools/virt-resize.pl:223
26143 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
26144 "steps 3 and 4 above to allocate a new disk image."
26148 #: ../tools/virt-resize.pl:226
26150 "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
26154 #: ../tools/virt-resize.pl:229
26155 msgid "IGNORING OR DELETING PARTITIONS"
26159 #: ../tools/virt-resize.pl:231
26161 "virt-resize also gives a convenient way to ignore or delete partitions when "
26162 "copying from the input disk to the output disk. Ignoring a partition speeds "
26163 "up the copy where you don't care about the existing contents of a "
26164 "partition. Deleting a partition removes it completely, but note that it "
26165 "also renumbers any partitions after the one which is deleted, which can "
26166 "leave some guests unbootable."
26170 #: ../tools/virt-resize.pl:238
26171 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
26175 #: ../tools/virt-resize.pl:240
26177 "If the input disk is in qcow2 format, then you may prefer that the output is "
26178 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
26179 "the fly. The output format is simply determined by the format of the empty "
26180 "output container that you provide. Thus to create qcow2 output, use:"
26184 #: ../tools/virt-resize.pl:246
26187 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
26192 #: ../tools/virt-resize.pl:248
26193 msgid "instead of the truncate command (use C<-c> for a compressed disk)."
26197 #: ../tools/virt-resize.pl:250
26198 msgid "Similarly, to get non-sparse raw output use:"
26202 #: ../tools/virt-resize.pl:252
26205 " fallocate -l size outdisk\n"
26210 #: ../tools/virt-resize.pl:254
26212 "(on older systems that don't have the L<fallocate(1)> command use C<dd if=/"
26213 "dev/zero of=outdisk bs=1M count=..>)"
26217 #: ../tools/virt-resize.pl:267
26218 msgid "Display help."
26222 #: ../tools/virt-resize.pl:281
26223 msgid "B<--resize part=size>"
26227 #: ../tools/virt-resize.pl:283
26229 "Resize the named partition (expanding or shrinking it) so that it has the "
26234 #: ../tools/virt-resize.pl:286
26236 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
26237 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
26238 "Exabytes; or as a percentage of the current size; or as a relative number or "
26239 "percentage. For example:"
26243 #: ../tools/virt-resize.pl:291
26246 " --resize /dev/sda2=10G\n"
26251 #: ../tools/virt-resize.pl:293
26254 " --resize /dev/sda4=90%\n"
26259 #: ../tools/virt-resize.pl:295
26262 " --resize /dev/sda2=+1G\n"
26267 #: ../tools/virt-resize.pl:297
26270 " --resize /dev/sda2=-200M\n"
26275 #: ../tools/virt-resize.pl:299
26278 " --resize /dev/sda1=+128K\n"
26283 #: ../tools/virt-resize.pl:301
26286 " --resize /dev/sda1=+10%\n"
26291 #: ../tools/virt-resize.pl:303
26294 " --resize /dev/sda1=-10%\n"
26299 #: ../tools/virt-resize.pl:305
26301 "You can increase the size of any partition. Virt-resize will expand the "
26302 "direct content of the partition if it knows how (see C<--expand> below)."
26306 #: ../tools/virt-resize.pl:309
26308 "You can only I<decrease> the size of partitions that contain filesystems or "
26309 "PVs which have already been shrunk. Virt-resize will check this has been "
26310 "done before proceeding, or else will print an error (see also C<--resize-"
26315 #: ../tools/virt-resize.pl:314 ../tools/virt-resize.pl:406
26316 #: ../tools/virt-resize.pl:423
26317 msgid "You can give this option multiple times."
26321 #: ../tools/virt-resize.pl:320
26322 msgid "B<--resize-force part=size>"
26326 #: ../tools/virt-resize.pl:322
26328 "This is the same as C<--resize> except that it will let you decrease the "
26329 "size of any partition. Generally this means you will lose any data which "
26330 "was at the end of the partition you shrink, but you may not care about that "
26331 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
26332 "as a swap partition)."
26336 #: ../tools/virt-resize.pl:328
26337 msgid "See also the C<--ignore> option."
26341 #: ../tools/virt-resize.pl:334
26342 msgid "B<--expand part>"
26346 #: ../tools/virt-resize.pl:336
26348 "Expand the named partition so it uses up all extra space (space left over "
26349 "after any other resize changes that you request have been done)."
26353 #: ../tools/virt-resize.pl:339
26355 "If virt-resize knows how, it will expand the direct content of the "
26356 "partition. For example, if the partition is an LVM PV, it will expand the "
26357 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
26358 "content it doesn't know about alone."
26362 #: ../tools/virt-resize.pl:344
26363 msgid "Currently virt-resize can resize:"
26367 #: ../tools/virt-resize.pl:350
26369 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
26374 #: ../tools/virt-resize.pl:355
26376 "NTFS filesystems contained directly in a partition, if libguestfs was "
26377 "compiled with support for NTFS."
26381 #: ../tools/virt-resize.pl:358
26383 "The filesystem must have been shut down consistently last time it was used. "
26384 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
26385 "consistency check, so at the first boot after resizing Windows will check "
26390 #: ../tools/virt-resize.pl:365
26392 "LVM PVs (physical volumes). However virt-resize does I<not> resize anything "
26393 "inside the PV. The user will have to resize LVs as desired."
26397 #: ../tools/virt-resize.pl:371 ../tools/virt-resize.pl:393
26398 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
26402 #: ../tools/virt-resize.pl:377
26403 msgid "B<--shrink part>"
26407 #: ../tools/virt-resize.pl:379
26409 "Shrink the named partition until the overall disk image fits in the "
26410 "destination. The named partition B<must> contain a filesystem or PV which "
26411 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
26412 "online tools). Virt-resize will check this and give an error if it has not "
26417 #: ../tools/virt-resize.pl:385
26419 "The amount by which the overall disk must be shrunk (after carrying out all "
26420 "other operations requested by the user) is called the \"deficit\". For "
26421 "example, a straight copy (assume no other operations) from a 5GB disk image "
26422 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
26423 "would give an error unless the user specified a partition to shrink and that "
26424 "partition had more than a gigabyte of free space."
26428 #: ../tools/virt-resize.pl:399
26429 msgid "B<--ignore part>"
26433 #: ../tools/virt-resize.pl:401
26435 "Ignore the named partition. Effectively this means the partition is "
26436 "allocated on the destination disk, but the content is not copied across from "
26437 "the source disk. The content of the partition will be blank (all zero "
26442 #: ../tools/virt-resize.pl:412
26443 msgid "B<--delete part>"
26447 #: ../tools/virt-resize.pl:414
26449 "Delete the named partition. It would be more accurate to describe this as "
26450 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
26451 "the original disk image is left intact."
26455 #: ../tools/virt-resize.pl:418
26457 "Note that when you delete a partition, then anything contained in the "
26458 "partition is also deleted. Furthermore, this causes any partitions that "
26459 "come after to be I<renumbered>, which can easily make your guest unbootable."
26463 #: ../tools/virt-resize.pl:429
26464 msgid "B<--LV-expand logvol>"
26468 #: ../tools/virt-resize.pl:431
26470 "This takes the logical volume and, as a final step, expands it to fill all "
26471 "the space available in its volume group. A typical usage, assuming a Linux "
26472 "guest with a single PV C</dev/sda2> and a root device called C</dev/vg_guest/"
26473 "lv_root> would be:"
26477 #: ../tools/virt-resize.pl:436
26480 " virt-resize indisk outdisk \\\n"
26481 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
26486 #: ../tools/virt-resize.pl:439
26488 "This would first expand the partition (and PV), and then expand the root "
26489 "device to fill the extra space in the PV."
26493 #: ../tools/virt-resize.pl:442
26495 "The contents of the LV are also resized if virt-resize knows how to do "
26496 "that. You can stop virt-resize from trying to expand the content by using "
26497 "the option C<--no-expand-content>."
26501 #: ../tools/virt-resize.pl:446
26502 msgid "Use L<virt-list-filesystems(1)> to list the filesystems in the guest."
26506 #: ../tools/virt-resize.pl:449
26508 "You can give this option multiple times, I<but> it doesn't make sense to do "
26509 "this unless the logical volumes you specify are all in different volume "
26514 #: ../tools/virt-resize.pl:457
26515 msgid "B<--no-copy-boot-loader>"
26519 #: ../tools/virt-resize.pl:459
26521 "By default, virt-resize copies over some sectors at the start of the disk "
26522 "(up to the beginning of the first partition). Commonly these sectors "
26523 "contain the Master Boot Record (MBR) and the boot loader, and are required "
26524 "in order for the guest to boot correctly."
26528 #: ../tools/virt-resize.pl:464
26530 "If you specify this flag, then this initial copy is not done. You may need "
26531 "to reinstall the boot loader in this case."
26535 #: ../tools/virt-resize.pl:472
26536 msgid "B<--no-extra-partition>"
26540 #: ../tools/virt-resize.pl:474
26542 "By default, virt-resize creates an extra partition if there is any extra, "
26543 "unused space after all resizing has happened. Use this option to prevent "
26544 "the extra partition from being created. If you do this then the extra space "
26545 "will be inaccessible until you run fdisk, parted, or some other partitioning "
26546 "tool in the guest."
26550 #: ../tools/virt-resize.pl:480
26552 "Note that if the surplus space is smaller than 10 MB, no extra partition "
26557 #: ../tools/virt-resize.pl:487
26558 msgid "B<--no-expand-content>"
26562 #: ../tools/virt-resize.pl:489
26564 "By default, virt-resize will try to expand the direct contents of "
26565 "partitions, if it knows how (see C<--expand> option above)."
26569 #: ../tools/virt-resize.pl:492
26571 "If you give the C<--no-expand-content> option then virt-resize will not "
26576 #: ../tools/virt-resize.pl:499
26577 msgid "B<-d> | B<--debug>"
26581 #: ../tools/virt-resize.pl:507
26582 msgid "B<-n> | B<--dryrun>"
26586 #: ../tools/virt-resize.pl:509
26587 msgid "Print a summary of what would be done, but don't do anything."
26591 #: ../tools/virt-resize.pl:515
26592 msgid "B<-q> | B<--quiet>"
26596 #: ../tools/virt-resize.pl:517
26597 msgid "Don't print the summary."
26601 #: ../tools/virt-resize.pl:525
26603 "Specify the format of the input disk image. If this flag is not given then "
26604 "it is auto-detected from the image itself."
26608 #: ../tools/virt-resize.pl:531
26610 "Note that this option I<does not> affect the output format. See L</QCOW2 "
26611 "AND NON-SPARSE RAW FORMATS>."
26615 #: ../tools/virt-resize.pl:538
26616 msgid "B<--output-format> raw"
26620 #: ../tools/virt-resize.pl:540
26622 "Specify the format of the output disk image. If this flag is not given then "
26623 "it is auto-detected from the image itself."
26627 #: ../tools/virt-resize.pl:546
26629 "Note that you still need to create the output disk with the right format. "
26630 "See L</QCOW2 AND NON-SPARSE RAW FORMATS>."
26634 #: ../tools/virt-resize.pl:1422 ../tools/virt-rescue.pl:90
26639 #: ../tools/virt-resize.pl:1424
26640 msgid "\"Partition 1 does not end on cylinder boundary.\""
26644 #: ../tools/virt-resize.pl:1426
26646 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
26647 "means the partitions will not be aligned to the ancient CHS geometry. "
26648 "However CHS geometry is meaningless for disks manufactured since the early "
26649 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
26650 "cylinders is not required by any modern operating system."
26654 #: ../tools/virt-resize.pl:1433
26655 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
26659 #: ../tools/virt-resize.pl:1435
26661 "In Windows Vista and later versions, Microsoft switched to using a separate "
26662 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
26663 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
26664 "the boot partition. Doing so seems to break the guest completely. However "
26665 "expanding the second partition (ie. C: drive) should work."
26669 #: ../tools/virt-resize.pl:1442
26671 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
26672 "NTFS partitions have been expanded. This is just a safety check and (unless "
26673 "it find errors) is nothing to worry about."
26677 #: ../tools/virt-resize.pl:1446
26678 msgid "GUEST BOOT STUCK AT \"GRUB\""
26682 #: ../tools/virt-resize.pl:1448
26684 "If a Linux guest does not boot after resizing, and the boot is stuck after "
26685 "printing C<GRUB> on the console, try reinstalling grub. This sometimes "
26686 "happens on older (RHEL 5-era) guests, for reasons we don't fully understand, "
26687 "although we think is to do with partition alignment."
26691 #: ../tools/virt-resize.pl:1453
26694 " guestfish -i -a newdisk\n"
26695 " ><fs> cat /boot/grub/device.map\n"
26696 " # check the contents of this file are sensible or\n"
26697 " # edit the file if necessary\n"
26698 " ><fs> grub-install / /dev/vda\n"
26704 #: ../tools/virt-resize.pl:1460
26706 "For more flexible guest reconfiguration, including if you need to specify "
26707 "other parameters to grub-install, use L<virt-rescue(1)>."
26711 #: ../tools/virt-resize.pl:1463
26712 msgid "ALTERNATIVE TOOLS"
26716 #: ../tools/virt-resize.pl:1465
26718 "There are several proprietary tools for resizing partitions. We won't "
26719 "mention any here."
26723 #: ../tools/virt-resize.pl:1468
26725 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
26726 "operations on disk images. They can resize and move partitions, but I don't "
26727 "think they can do anything with the contents, and they certainly don't "
26732 #: ../tools/virt-resize.pl:1473
26734 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
26735 "but at a much lower level. You will probably end up hand-calculating sector "
26736 "offsets, which is something that virt-resize was designed to avoid. If you "
26737 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
26742 #: ../tools/virt-resize.pl:1488
26744 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)>, L<virt-df(1)>, "
26745 "L<guestfs(3)>, L<guestfish(1)>, L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, "
26746 "L<resize2fs(8)>, L<ntfsresize(8)>, L<virsh(1)>, L<parted(8)>, L<truncate(1)"
26747 ">, L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, L<virt-rescue(1)>, "
26748 "L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
26752 #: ../tools/virt-list-filesystems.pl:32
26754 "virt-list-filesystems - List filesystems in a virtual machine or disk image"
26758 #: ../tools/virt-list-filesystems.pl:36
26761 " virt-list-filesystems [--options] domname\n"
26766 #: ../tools/virt-list-filesystems.pl:38
26769 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
26774 #: ../tools/virt-list-filesystems.pl:42
26776 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
26777 "are contained in a virtual machine or disk image."
26781 #: ../tools/virt-list-filesystems.pl:46
26783 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
26784 "functionality. For more complex cases you should look at the L<guestfish(1)"
26789 #: ../tools/virt-list-filesystems.pl:105
26791 "With this option, C<virt-list-filesystems> displays the type of each "
26792 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
26796 #: ../tools/virt-list-filesystems.pl:112
26797 msgid "B<-a> | B<--all>"
26801 #: ../tools/virt-list-filesystems.pl:114
26803 "Normally we only show mountable filesystems. If this option is given then "
26804 "swap devices are shown too."
26808 #: ../tools/virt-list-filesystems.pl:218
26810 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, L<virt-list-"
26811 "partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)"
26812 ">, L<http://libguestfs.org/>."
26816 #: ../tools/virt-cat.pl:34
26817 msgid "virt-cat - Display a file in a virtual machine"
26821 #: ../tools/virt-cat.pl:38
26824 " virt-cat [--options] domname file\n"
26829 #: ../tools/virt-cat.pl:40
26832 " virt-cat [--options] disk.img [disk.img ...] file\n"
26837 #: ../tools/virt-cat.pl:44
26839 "C<virt-cat> is a command line tool to display the contents of C<file> where "
26840 "C<file> exists in the named virtual machine (or disk image)."
26844 #: ../tools/virt-cat.pl:47
26846 "C<virt-cat> can be used to quickly view a single file. To edit a file, use "
26847 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
26852 #: ../tools/virt-cat.pl:53
26854 "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
26858 #: ../tools/virt-cat.pl:56
26861 " virt-cat mydomain /etc/fstab\n"
26866 #: ../tools/virt-cat.pl:58
26867 msgid "List syslog messages from a VM:"
26871 #: ../tools/virt-cat.pl:60
26874 " virt-cat mydomain /var/log/messages | tail\n"
26879 #: ../tools/virt-cat.pl:62
26880 msgid "Find out what DHCP IP address a VM acquired:"
26884 #: ../tools/virt-cat.pl:64
26887 " virt-cat mydomain /var/log/messages | grep 'dhclient: bound to' | tail\n"
26892 #: ../tools/virt-cat.pl:66
26893 msgid "Find out what packages were recently installed:"
26897 #: ../tools/virt-cat.pl:68
26900 " virt-cat mydomain /var/log/yum.log | tail\n"
26905 #: ../tools/virt-cat.pl:70
26906 msgid "Find out who is logged on inside a virtual machine:"
26910 #: ../tools/virt-cat.pl:72
26913 " virt-cat mydomain /var/run/utmp > /tmp/utmp\n"
26919 #: ../tools/virt-cat.pl:75
26920 msgid "or who was logged on:"
26924 #: ../tools/virt-cat.pl:77
26927 " virt-cat mydomain /var/log/wtmp > /tmp/wtmp\n"
26928 " last -f /tmp/wtmp\n"
26933 #: ../tools/virt-cat.pl:190
26935 "L<guestfs(3)>, L<guestfish(1)>, L<virt-edit(1)>, L<Sys::Guestfs(3)>, L<Sys::"
26936 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
26940 #: ../tools/virt-tar.pl:34
26941 msgid "virt-tar - Extract or upload files to a virtual machine"
26945 #: ../tools/virt-tar.pl:38
26948 " virt-tar [--options] -x domname directory tarball\n"
26953 #: ../tools/virt-tar.pl:40
26956 " virt-tar [--options] -u domname tarball directory\n"
26961 #: ../tools/virt-tar.pl:42
26964 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
26969 #: ../tools/virt-tar.pl:44
26972 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
26977 #: ../tools/virt-tar.pl:48
26978 msgid "Download C</home> from the VM into a local tarball:"
26982 #: ../tools/virt-tar.pl:50
26985 " virt-tar -x domname /home home.tar\n"
26990 #: ../tools/virt-tar.pl:52
26993 " virt-tar -zx domname /home home.tar.gz\n"
26998 #: ../tools/virt-tar.pl:54
26999 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
27003 #: ../tools/virt-tar.pl:56
27006 " virt-tar -u domname uploadstuff.tar /tmp\n"
27011 #: ../tools/virt-tar.pl:58
27014 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
27019 #: ../tools/virt-tar.pl:62
27021 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
27022 "virtual machines. If you do this, you risk disk corruption in the VM. "
27023 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
27027 #: ../tools/virt-tar.pl:67
27029 "You can use C<-x> (extract) on live virtual machines, but you might get "
27030 "inconsistent results or errors if there is filesystem activity inside the "
27031 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
27032 "work, but the only way to guarantee consistent results is if the virtual "
27033 "machine is shut down."
27037 #: ../tools/virt-tar.pl:75
27039 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
27040 "parts of a guest filesystem. There are many possibilities: making backups, "
27041 "uploading data files, snooping on guest activity, fixing or customizing "
27046 #: ../tools/virt-tar.pl:80
27048 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
27049 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
27050 "should look at the L<guestfish(1)> tool."
27054 #: ../tools/virt-tar.pl:84
27056 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
27057 "its contents (recursively) from the virtual machine into a local tarball. "
27058 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
27059 "virtual machine. You cannot use these two options together."
27063 #: ../tools/virt-tar.pl:90
27065 "In addition, you may need to use the C<-z> (gZip) option to enable "
27066 "compression. When uploading, you have to specify C<-z> if the upload file "
27067 "is compressed because virt-tar won't detect this on its own."
27071 #: ../tools/virt-tar.pl:94
27073 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
27074 "example it cannot do PKZip files or bzip2 compression. If you want that "
27075 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
27076 "the L<libguestfs(3)> API)."
27080 #: ../tools/virt-tar.pl:152
27081 msgid "B<-x> | B<--extract> | B<--download>"
27085 #: ../tools/virt-tar.pl:154
27086 msgid "B<-u> | B<--upload>"
27090 #: ../tools/virt-tar.pl:156
27092 "Use C<-x> to extract (download) a directory from a virtual machine to a "
27097 #: ../tools/virt-tar.pl:159
27099 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
27100 "Please read the L</WARNING> section above before using this option."
27104 #: ../tools/virt-tar.pl:163
27105 msgid "You must specify exactly one of these options."
27109 #: ../tools/virt-tar.pl:169
27110 msgid "B<-z> | B<--gzip>"
27114 #: ../tools/virt-tar.pl:171
27115 msgid "Specify that the input or output tarball is gzip-compressed."
27119 #: ../tools/virt-tar.pl:285
27121 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, L<Sys::"
27122 "Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs."
27127 #: ../tools/virt-rescue.pl:33
27128 msgid "virt-rescue - Run a rescue shell on a virtual machine"
27132 #: ../tools/virt-rescue.pl:37
27135 " virt-rescue [--options] domname\n"
27140 #: ../tools/virt-rescue.pl:39
27143 " virt-rescue [--options] disk.img [disk.img ...]\n"
27148 #: ../tools/virt-rescue.pl:43
27150 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
27151 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
27152 "you from doing this, but doesn't catch all cases."
27156 #: ../tools/virt-rescue.pl:47
27158 "However if you use the I<--ro> (read only) option, then you can attach a "
27159 "shell to a live virtual machine. The results might be strange or "
27160 "inconsistent at times but you won't get disk corruption."
27164 #: ../tools/virt-rescue.pl:53
27166 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
27167 "need for a CD. virt-rescue gives you a rescue shell and some simple "
27168 "recovery tools which you can use to examine or rescue a virtual machine or "
27173 #: ../tools/virt-rescue.pl:58
27175 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
27176 "on disk image(s):"
27180 #: ../tools/virt-rescue.pl:61
27183 " virt-rescue GuestName\n"
27188 #: ../tools/virt-rescue.pl:63
27191 " virt-rescue --ro /path/to/disk.img\n"
27196 #: ../tools/virt-rescue.pl:65
27199 " virt-rescue /dev/sdc\n"
27204 #: ../tools/virt-rescue.pl:67
27205 msgid "For live VMs you I<must> use the --ro option."
27209 #: ../tools/virt-rescue.pl:69
27211 "When you run virt-rescue on a virtual machine or disk image, you are placed "
27212 "in an interactive bash shell where you can use many ordinary Linux "
27213 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
27214 "appliance. You must mount the virtual machine's filesystems by hand. There "
27215 "is an empty directory called C</sysroot> where you can mount filesystems."
27219 #: ../tools/virt-rescue.pl:76
27221 "In the example below, we list logical volumes, then choose one to mount "
27222 "under C</sysroot>:"
27226 #: ../tools/virt-rescue.pl:79
27230 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
27231 " lv_root vg_f11x64 -wi-a- 8.83G\n"
27232 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
27233 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
27234 " ><rescue> ls /sysroot\n"
27239 #: ../tools/virt-rescue.pl:86
27241 "If you don't know what filesystems are available on the virtual machine then "
27242 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
27246 #: ../tools/virt-rescue.pl:92
27248 "Virt-rescue can be used on I<any> disk image file or device, not just a "
27249 "virtual machine. For example you can use it on a blank file if you want to "
27250 "partition that file (although we would recommend using L<guestfish(1)> "
27251 "instead as it is more suitable for this purpose). You can even use virt-"
27252 "rescue on things like SD cards."
27256 #: ../tools/virt-rescue.pl:98
27258 "This tool is just designed for quick interactive hacking on a virtual "
27259 "machine. For more structured access to a virtual machine disk image, you "
27260 "should use L<guestfs(3)>. To get a structured shell that you can use to "
27261 "make scripted changes to guests, use L<guestfish(1)>."
27265 #: ../tools/virt-rescue.pl:127
27266 msgid "B<--append kernelopts>"
27270 #: ../tools/virt-rescue.pl:129
27271 msgid "Pass additional options to the rescue kernel."
27275 #: ../tools/virt-rescue.pl:164
27276 msgid "B<--memsize MB> | B<-m MB>"
27280 #: ../tools/virt-rescue.pl:166
27282 "Change the amount of memory allocated to the rescue system. The default is "
27283 "set by libguestfs and is small but adequate for running system tools. The "
27284 "occasional program might need more memory. The parameter is specified in "
27289 #: ../tools/virt-rescue.pl:175
27290 msgid "B<--network MB>"
27294 #: ../tools/virt-rescue.pl:177
27295 msgid "Enable QEMU user networking in the guest."
27299 #: ../tools/virt-rescue.pl:183
27300 msgid "B<--ro> | B<-r>"
27304 #: ../tools/virt-rescue.pl:185
27305 msgid "Open the image read-only."
27309 #: ../tools/virt-rescue.pl:197
27311 "Enable SELinux in the rescue appliance. You should read L<guestfs(3)/"
27312 "SELINUX> before using this option."
27316 #: ../tools/virt-rescue.pl:257
27318 "Several environment variables affect virt-rescue. See L<guestfs(3)/"
27319 "ENVIRONMENT VARIABLES> for the complete list."
27323 #: ../tools/virt-rescue.pl:269
27325 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, L<Sys::"
27326 "Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
27330 #: ../tools/virt-make-fs.pl:37
27331 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
27335 #: ../tools/virt-make-fs.pl:41
27338 " virt-make-fs [--options] input.tar output.img\n"
27343 #: ../tools/virt-make-fs.pl:43
27346 " virt-make-fs [--options] input.tar.gz output.img\n"
27351 #: ../tools/virt-make-fs.pl:45
27354 " virt-make-fs [--options] directory output.img\n"
27359 #: ../tools/virt-make-fs.pl:49
27361 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
27362 "archive or some files in a directory. It is similar to tools like L<mkisofs"
27363 "(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, it can "
27364 "create common filesystem types like ext2/3 or NTFS, which can be useful if "
27365 "you want to attach these filesystems to existing virtual machines (eg. to "
27366 "import large amounts of read-only data to a VM)."
27370 #: ../tools/virt-make-fs.pl:57
27371 msgid "Basic usage is:"
27375 #: ../tools/virt-make-fs.pl:59
27378 " virt-make-fs input output\n"
27383 #: ../tools/virt-make-fs.pl:61
27385 "where C<input> is either a directory containing files that you want to add, "
27386 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
27387 "C<output> is a disk image. The input type is detected automatically. The "
27388 "output disk image defaults to a raw ext2 image unless you specify extra "
27389 "flags (see L</OPTIONS> below)."
27393 #: ../tools/virt-make-fs.pl:67
27394 msgid "EXTRA SPACE"
27398 #: ../tools/virt-make-fs.pl:69
27400 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
27401 "the files that it contains, but might have extra space. Depending on how "
27402 "you are going to use the output, you might think this extra space is wasted "
27403 "and want to minimize it, or you might want to leave space so that more files "
27404 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
27405 "but you can use the C<--size> flag to leave space in the filesystem if you "
27410 #: ../tools/virt-make-fs.pl:77
27412 "An alternative way to leave extra space but not make the output image any "
27413 "bigger is to use an alternative disk image format (instead of the default "
27414 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
27415 "image format (check your hypervisor supports this before using it). This "
27416 "allows you to choose a large C<--size> but the extra space won't actually be "
27417 "allocated in the image until you try to store something in it."
27421 #: ../tools/virt-make-fs.pl:85
27423 "Don't forget that you can also use local commands including L<resize2fs(8)> "
27424 "and L<virt-resize(1)> to resize existing filesystems, or rerun virt-make-"
27425 "resize to build another image from scratch."
27429 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123
27430 #: ../tools/virt-make-fs.pl:142
27435 #: ../tools/virt-make-fs.pl:91
27438 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
27443 #: ../tools/virt-make-fs.pl:93
27444 msgid "FILESYSTEM TYPE"
27448 #: ../tools/virt-make-fs.pl:95
27450 "The default filesystem type is C<ext2>. Just about any filesystem type that "
27451 "libguestfs supports can be used (but I<not> read-only formats like "
27452 "ISO9660). Here are some of the more common choices:"
27456 #: ../tools/virt-make-fs.pl:101
27461 #: ../tools/virt-make-fs.pl:103
27463 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
27464 "you are not going to use the filesystem in a way that requires the journal, "
27465 "then this is just wasted overhead."
27469 #: ../tools/virt-make-fs.pl:107
27470 msgid "I<ntfs> or I<vfat>"
27474 #: ../tools/virt-make-fs.pl:109
27475 msgid "Useful if exporting data to a Windows guest."
27479 #: ../tools/virt-make-fs.pl:111
27481 "I<Note for vfat>: The tar archive or local directory must only contain files "
27482 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
27483 "program running within libguestfs is unable to change the ownership of non-"
27484 "root files, since vfat itself does not support this."
27488 #: ../tools/virt-make-fs.pl:116
27493 #: ../tools/virt-make-fs.pl:118
27495 "Lower overhead than C<ext2>, but certain limitations on filename length and "
27496 "total filesystem size."
27500 #: ../tools/virt-make-fs.pl:125
27503 " virt-make-fs --type=minix input minixfs.img\n"
27508 #: ../tools/virt-make-fs.pl:127
27509 msgid "TO PARTITION OR NOT TO PARTITION"
27513 #: ../tools/virt-make-fs.pl:129
27514 msgid "Optionally virt-make-fs can add a partition table to the output disk."
27518 #: ../tools/virt-make-fs.pl:131
27520 "Adding a partition can make the disk image more compatible with certain "
27521 "virtualized operating systems which don't expect to see a filesystem "
27522 "directly located on a block device (Linux doesn't care and will happily "
27523 "handle both types)."
27527 #: ../tools/virt-make-fs.pl:136
27529 "On the other hand, if you have a partition table then the output image is no "
27530 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
27531 "directly on a partitioned disk image. (However libguestfs tools such as "
27532 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
27536 #: ../tools/virt-make-fs.pl:144
27537 msgid "Add an MBR partition:"
27541 #: ../tools/virt-make-fs.pl:146
27544 " virt-make-fs --partition -- input disk.img\n"
27549 #: ../tools/virt-make-fs.pl:148
27551 "If the output disk image could be terabyte-sized or larger, it's better to "
27552 "use an EFI/GPT-compatible partition table:"
27556 #: ../tools/virt-make-fs.pl:151
27559 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
27564 #: ../tools/virt-make-fs.pl:179
27565 msgid "Enable debugging information."
27569 #: ../tools/virt-make-fs.pl:185
27570 msgid "B<--size=E<lt>NE<gt>>"
27574 #: ../tools/virt-make-fs.pl:187
27575 msgid "B<--size=+E<lt>NE<gt>>"
27579 #: ../tools/virt-make-fs.pl:189
27580 msgid "B<-s E<lt>NE<gt>>"
27584 #: ../tools/virt-make-fs.pl:191
27585 msgid "B<-s +E<lt>NE<gt>>"
27589 #: ../tools/virt-make-fs.pl:193
27591 "Use the C<--size> (or C<-s>) option to choose the size of the output image."
27595 #: ../tools/virt-make-fs.pl:196
27597 "If this option is I<not> given, then the output image will be just large "
27598 "enough to contain all the files, with not much wasted space."
27602 #: ../tools/virt-make-fs.pl:199
27604 "To choose a fixed size output disk, specify an absolute number followed by b/"
27605 "K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
27606 "Petabytes or Exabytes. This must be large enough to contain all the input "
27607 "files, else you will get an error."
27611 #: ../tools/virt-make-fs.pl:204
27613 "To leave extra space, specify C<+> (plus sign) and a number followed by b/K/"
27614 "M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
27615 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
27616 "the input files, and (approximately) an extra 200 MB free space."
27620 #: ../tools/virt-make-fs.pl:210
27622 "Note that virt-make-fs estimates free space, and therefore will not produce "
27623 "filesystems containing precisely the free space requested. (It is much more "
27624 "expensive and time-consuming to produce a filesystem which has precisely the "
27625 "desired free space)."
27629 #: ../tools/virt-make-fs.pl:219
27630 msgid "B<--format=E<lt>fmtE<gt>>"
27634 #: ../tools/virt-make-fs.pl:221
27635 msgid "B<-F E<lt>fmtE<gt>>"
27639 #: ../tools/virt-make-fs.pl:223
27640 msgid "Choose the output disk image format."
27644 #: ../tools/virt-make-fs.pl:225
27645 msgid "The default is C<raw> (raw disk image)."
27649 #: ../tools/virt-make-fs.pl:227
27651 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
27652 "that would really make sense here is C<qcow2>."
27656 #: ../tools/virt-make-fs.pl:234
27657 msgid "B<--type=E<lt>fsE<gt>>"
27661 #: ../tools/virt-make-fs.pl:236
27662 msgid "B<-t E<lt>fsE<gt>>"
27666 #: ../tools/virt-make-fs.pl:238
27667 msgid "Choose the output filesystem type."
27671 #: ../tools/virt-make-fs.pl:240
27672 msgid "The default is C<ext2>."
27676 #: ../tools/virt-make-fs.pl:242
27678 "Any filesystem which is supported read-write by libguestfs can be used here."
27682 #: ../tools/virt-make-fs.pl:249
27683 msgid "B<--partition>"
27687 #: ../tools/virt-make-fs.pl:251
27688 msgid "B<--partition=E<lt>parttypeE<gt>>"
27692 #: ../tools/virt-make-fs.pl:253
27694 "If specified, this flag adds an MBR partition table to the output disk image."
27698 #: ../tools/virt-make-fs.pl:256
27700 "You can change the partition table type, eg. C<--partition=gpt> for large "
27705 #: ../tools/virt-make-fs.pl:259
27707 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
27708 "might consider the next parameter to be the partition type. For example:"
27712 #: ../tools/virt-make-fs.pl:263
27715 " virt-make-fs --partition input.tar ...\n"
27720 #: ../tools/virt-make-fs.pl:265
27722 "would cause virt-make-fs to think you wanted to use a partition type of "
27723 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
27724 "dash) between options and the input file argument:"
27728 #: ../tools/virt-make-fs.pl:269
27731 " virt-make-fs --partition -- input.tar ...\n"
27736 #: ../tools/virt-make-fs.pl:536
27738 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<mkisofs(1)>, "
27739 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, L<guestfs"
27740 "(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
27744 #: ../tools/virt-make-fs.pl:553
27747 " export LIBGUESTFS_DEBUG=1\n"
27748 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
27753 #: ../tools/virt-make-fs.pl:556
27755 "Attach /tmp/virt-make-fs.log to a new bug report at L<https://bugzilla."
27760 #: ../tools/virt-list-partitions.pl:32
27762 "virt-list-partitions - List partitions in a virtual machine or disk image"
27766 #: ../tools/virt-list-partitions.pl:36
27769 " virt-list-partitions [--options] domname\n"
27774 #: ../tools/virt-list-partitions.pl:38
27777 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
27782 #: ../tools/virt-list-partitions.pl:42
27784 "C<virt-list-partitions> is a command line tool to list the partitions that "
27785 "are contained in a virtual machine or disk image. It is mainly useful as a "
27786 "first step to using L<virt-resize(1)>."
27790 #: ../tools/virt-list-partitions.pl:47
27792 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
27793 "functionality. For more complex cases you should look at the L<guestfish(1)"
27798 #: ../tools/virt-list-partitions.pl:104
27799 msgid "B<-h> | B<--human-readable>"
27803 #: ../tools/virt-list-partitions.pl:106
27804 msgid "Show sizes in human-readable form (eg. \"1G\")."
27808 #: ../tools/virt-list-partitions.pl:114
27810 "With this option, C<virt-list-partitions> displays the type and size of each "
27811 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
27815 #: ../tools/virt-list-partitions.pl:121
27816 msgid "B<-t> | B<--total>"
27820 #: ../tools/virt-list-partitions.pl:123
27822 "Display the total size of each block device (as a separate row or rows)."
27826 #: ../tools/virt-list-partitions.pl:256
27828 "L<guestfs(3)>, L<guestfish(1)>, L<virt-list-filesystems(1)>, L<virt-resize(1)"
27829 ">, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://"
27830 "libguestfs.org/>."