1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Red Hat Inc.
3 # This file is distributed under the same license as the libguestfs package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: libguestfs 1.7.8\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2010-11-15 23:02+0000\n"
12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=utf-8\n"
17 "Content-Transfer-Encoding: ENCODING"
20 #: ../src/guestfs.pod:1 ../fish/guestfish.pod:1 ../test-tool/libguestfs-test-tool.pod:1 ../fuse/guestmount.pod:1 ../inspector/virt-inspector.pl:31 ../tools/virt-edit.pl:30 ../tools/virt-win-reg.pl:33 ../tools/virt-df.pl:32 ../tools/virt-ls.pl:30 ../tools/virt-resize.pl:38 ../tools/virt-list-filesystems.pl:28 ../tools/virt-tar.pl:29 ../tools/virt-rescue.pl:29 ../tools/virt-make-fs.pl:33 ../tools/virt-list-partitions.pl:28
25 #: ../src/guestfs.pod:3 ../fish/guestfish.pod:3 ../test-tool/libguestfs-test-tool.pod:3 ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pl:33 ../tools/virt-edit.pl:32 ../tools/virt-win-reg.pl:35 ../tools/virt-df.pl:34 ../tools/virt-ls.pl:32 ../tools/virt-resize.pl:40 ../tools/virt-list-filesystems.pl:30 ../tools/virt-tar.pl:31 ../tools/virt-rescue.pl:31 ../tools/virt-make-fs.pl:35 ../tools/virt-list-partitions.pl:30
30 #: ../src/guestfs.pod:5
31 msgid "guestfs - Library for accessing and modifying virtual machine images"
35 #: ../src/guestfs.pod:7 ../fish/guestfish.pod:7 ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7 ../inspector/virt-inspector.pl:37 ../tools/virt-edit.pl:36 ../tools/virt-win-reg.pl:39 ../tools/virt-df.pl:38 ../tools/virt-ls.pl:36 ../tools/virt-resize.pl:44 ../tools/virt-list-filesystems.pl:34 ../tools/virt-tar.pl:35 ../tools/virt-rescue.pl:35 ../tools/virt-make-fs.pl:39 ../tools/virt-list-partitions.pl:34
40 #: ../src/guestfs.pod:9
43 " #include <guestfs.h>\n"
48 #: ../src/guestfs.pod:11
51 " guestfs_h *g = guestfs_create ();\n"
52 " guestfs_add_drive (g, \"guest.img\");\n"
53 " guestfs_launch (g);\n"
54 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
55 " guestfs_touch (g, \"/hello\");\n"
56 " guestfs_umount (g, \"/\");\n"
57 " guestfs_sync (g);\n"
58 " guestfs_close (g);\n"
63 #: ../src/guestfs.pod:20
66 " cc prog.c -o prog -lguestfs\n"
68 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
73 #: ../src/guestfs.pod:24 ../fish/guestfish.pod:30 ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:20 ../inspector/virt-inspector.pl:43 ../tools/virt-edit.pl:50 ../tools/virt-win-reg.pl:63 ../tools/virt-df.pl:46 ../tools/virt-ls.pl:42 ../tools/virt-resize.pl:50 ../tools/virt-list-filesystems.pl:40 ../tools/virt-tar.pl:72 ../tools/virt-rescue.pl:51 ../tools/virt-make-fs.pl:47 ../tools/virt-list-partitions.pl:40
78 #: ../src/guestfs.pod:26
80 "Libguestfs is a library for accessing and modifying guest disk images. "
81 "Amongst the things this is good for: making batch configuration changes to "
82 "guests, getting disk used/free statistics (see also: virt-df), migrating "
83 "between virtualization systems (see also: virt-p2v), performing partial "
84 "backups, performing partial guest clones, cloning guests and changing "
85 "registry/UUID/hostname info, and much else besides."
89 #: ../src/guestfs.pod:34
91 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
92 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
93 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
98 #: ../src/guestfs.pod:39
100 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
101 "what filesystem is in each LV, etc.). It can also run commands in the "
102 "context of the guest. Also you can access filesystems over FUSE."
106 #: ../src/guestfs.pod:44
108 "Libguestfs is a library that can be linked with C and C++ management "
109 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
110 "PHP, Haskell or C#). You can also use it from shell scripts or the command "
115 #: ../src/guestfs.pod:49
117 "You don't need to be root to use libguestfs, although obviously you do need "
118 "enough permissions to access the disk images."
122 #: ../src/guestfs.pod:52
124 "Libguestfs is a large API because it can do many things. For a gentle "
125 "introduction, please read the L</API OVERVIEW> section next."
129 #: ../src/guestfs.pod:55
134 #: ../src/guestfs.pod:57
136 "This section provides a gentler overview of the libguestfs API. We also try "
137 "to group API calls together, where that may not be obvious from reading "
138 "about the individual calls in the main section of this manual."
142 #: ../src/guestfs.pod:62
147 #: ../src/guestfs.pod:64
149 "Before you can use libguestfs calls, you have to create a handle. Then you "
150 "must add at least one disk image to the handle, followed by launching the "
151 "handle, then performing whatever operations you want, and finally closing "
152 "the handle. By convention we use the single letter C<g> for the name of the "
153 "handle variable, although of course you can use any name you want."
157 #: ../src/guestfs.pod:71
158 msgid "The general structure of all libguestfs-using programs looks like this:"
162 #: ../src/guestfs.pod:74
165 " guestfs_h *g = guestfs_create ();\n"
170 #: ../src/guestfs.pod:76
173 " /* Call guestfs_add_drive additional times if there are\n"
174 " * multiple disk images.\n"
176 " guestfs_add_drive (g, \"guest.img\");\n"
181 #: ../src/guestfs.pod:81
184 " /* Most manipulation calls won't work until you've launched\n"
185 " * the handle 'g'. You have to do this _after_ adding drives\n"
186 " * and _before_ other commands.\n"
188 " guestfs_launch (g);\n"
193 #: ../src/guestfs.pod:87
196 " /* Now you can examine what partitions, LVs etc are available.\n"
198 " char **partitions = guestfs_list_partitions (g);\n"
199 " char **logvols = guestfs_lvs (g);\n"
204 #: ../src/guestfs.pod:92
207 " /* To access a filesystem in the image, you must mount it.\n"
209 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
214 #: ../src/guestfs.pod:96
217 " /* Now you can perform filesystem actions on the guest\n"
220 " guestfs_touch (g, \"/hello\");\n"
225 #: ../src/guestfs.pod:101
228 " /* You only need to call guestfs_sync if you have made\n"
229 " * changes to the guest image. (But if you've made changes\n"
230 " * then you *must* sync). See also: guestfs_umount and\n"
231 " * guestfs_umount_all calls.\n"
233 " guestfs_sync (g);\n"
238 #: ../src/guestfs.pod:108
241 " /* Close the handle 'g'. */\n"
242 " guestfs_close (g);\n"
247 #: ../src/guestfs.pod:111
249 "The code above doesn't include any error checking. In real code you should "
250 "check return values carefully for errors. In general all functions that "
251 "return integers return C<-1> on error, and all functions that return "
252 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
253 "how to handle errors, and consult the documentation for each function call "
254 "below to see precisely how they return error indications."
258 #: ../src/guestfs.pod:119
263 #: ../src/guestfs.pod:121
265 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
266 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
267 "actual block device, or simply an empty file of zeroes that you have created "
268 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
273 #: ../src/guestfs.pod:127
275 "The call you should use in modern code for adding drives is "
276 "L</guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
277 "specifying that the format is raw, do:"
281 #: ../src/guestfs.pod:131
284 " guestfs_add_drive_opts (g, filename,\n"
285 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
291 #: ../src/guestfs.pod:135
292 msgid "You can add a disk read-only using:"
296 #: ../src/guestfs.pod:137
299 " guestfs_add_drive_opts (g, filename,\n"
300 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
301 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
307 #: ../src/guestfs.pod:142
309 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
310 "libguestfs won't modify the file."
314 #: ../src/guestfs.pod:145
316 "Be extremely cautious if the disk image is in use, eg. if it is being used "
317 "by a virtual machine. Adding it read-write will almost certainly cause disk "
318 "corruption, but adding it read-only is safe."
322 #: ../src/guestfs.pod:149
324 "You must add at least one disk image, and you may add multiple disk images. "
325 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
326 "first one you added), C</dev/sdb> (for the second one you added), etc."
330 #: ../src/guestfs.pod:154
332 "Once L</guestfs_launch> has been called you cannot add any more images. You "
333 "can call L</guestfs_list_devices> to get a list of the device names, in the "
334 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
338 #: ../src/guestfs.pod:159
343 #: ../src/guestfs.pod:161
345 "Before you can read or write files, create directories and so on in a disk "
346 "image that contains filesystems, you have to mount those filesystems using "
347 "L</guestfs_mount>. If you already know that a disk image contains (for "
348 "example) one partition with a filesystem on that partition, then you can "
353 #: ../src/guestfs.pod:167
356 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
361 #: ../src/guestfs.pod:169
363 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
364 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
365 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>)."
369 #: ../src/guestfs.pod:173
371 "If you are given a disk image and you don't know what it contains then you "
372 "have to find out. Libguestfs can do that too: use "
373 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
374 "and LVs, and either try mounting each to see what is mountable, or else "
375 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. Libguestfs also "
376 "has a set of APIs for inspection of disk images (see L</INSPECTION> below). "
377 "But you might find it easier to look at higher level programs built on top "
378 "of libguestfs, in particular L<virt-inspector(1)>."
382 #: ../src/guestfs.pod:183
384 "To mount a disk image read-only, use L</guestfs_mount_ro>. There are "
385 "several other variations of the C<guestfs_mount_*> call."
389 #: ../src/guestfs.pod:186
390 msgid "FILESYSTEM ACCESS AND MODIFICATION"
394 #: ../src/guestfs.pod:188
396 "The majority of the libguestfs API consists of fairly low-level calls for "
397 "accessing and modifying the files, directories, symlinks etc on mounted "
398 "filesystems. There are over a hundred such calls which you can find listed "
399 "in detail below in this man page, and we don't even pretend to cover them "
400 "all in this overview."
404 #: ../src/guestfs.pod:194
406 "Specify filenames as full paths, starting with C<\"/\"> and including the "
411 #: ../src/guestfs.pod:197
413 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
414 "the file called C<\"etc/passwd\"> then you could do:"
418 #: ../src/guestfs.pod:200
421 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
426 #: ../src/guestfs.pod:202
428 "This would return C<data> as a newly allocated buffer containing the full "
429 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
430 "or C<NULL> if there was an error."
434 #: ../src/guestfs.pod:206
436 "As another example, to create a top-level directory on that filesystem "
437 "called C<\"var\"> you would do:"
441 #: ../src/guestfs.pod:209
444 " guestfs_mkdir (g, \"/var\");\n"
449 #: ../src/guestfs.pod:211
450 msgid "To create a symlink you could do:"
454 #: ../src/guestfs.pod:213
457 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
458 " \"/etc/rc3.d/S30portmap\");\n"
463 #: ../src/guestfs.pod:216
465 "Libguestfs will reject attempts to use relative paths and there is no "
466 "concept of a current working directory."
470 #: ../src/guestfs.pod:219
472 "Libguestfs can return errors in many situations: for example if the "
473 "filesystem isn't writable, or if a file or directory that you requested "
474 "doesn't exist. If you are using the C API (documented here) you have to "
475 "check for those error conditions after each call. (Other language bindings "
476 "turn these errors into exceptions)."
480 #: ../src/guestfs.pod:225
482 "File writes are affected by the per-handle umask, set by calling "
483 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
487 #: ../src/guestfs.pod:228
492 #: ../src/guestfs.pod:230
494 "Libguestfs contains API calls to read, create and modify partition tables on "
499 #: ../src/guestfs.pod:233
501 "In the common case where you want to create a single partition covering the "
502 "whole disk, you should use the L</guestfs_part_disk> call:"
506 #: ../src/guestfs.pod:237
509 " const char *parttype = \"mbr\";\n"
510 " if (disk_is_larger_than_2TB)\n"
511 " parttype = \"gpt\";\n"
512 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
517 #: ../src/guestfs.pod:242
519 "Obviously this effectively wipes anything that was on that disk image "
524 #: ../src/guestfs.pod:245
529 #: ../src/guestfs.pod:247
531 "Libguestfs provides access to a large part of the LVM2 API, such as "
532 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
533 "unless you familiarize yourself with the concepts of physical volumes, "
534 "volume groups and logical volumes."
538 #: ../src/guestfs.pod:252
540 "This author strongly recommends reading the LVM HOWTO, online at "
541 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
545 #: ../src/guestfs.pod:255
550 #: ../src/guestfs.pod:257
552 "Use L</guestfs_cat> to download small, text only files. This call is "
553 "limited to files which are less than 2 MB and which cannot contain any ASCII "
554 "NUL (C<\\0>) characters. However it has a very simple to use API."
558 #: ../src/guestfs.pod:262
560 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
561 "bit data, since it returns a (pointer, size) pair. However it is still "
562 "limited to \"small\" files, less than 2 MB."
566 #: ../src/guestfs.pod:266
568 "L</guestfs_download> can be used to download any file, with no limits on "
569 "content or size (even files larger than 4 GB)."
573 #: ../src/guestfs.pod:269
574 msgid "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
578 #: ../src/guestfs.pod:272
583 #: ../src/guestfs.pod:274
585 "It's often the case that you want to write a file or files to the disk "
590 #: ../src/guestfs.pod:277
592 "To write a small file with fixed content, use L</guestfs_write>. To create "
593 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
594 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
595 "variety of other functions for creating test files, for example "
596 "L</guestfs_fill> and L</guestfs_fill_pattern>."
600 #: ../src/guestfs.pod:283
602 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
603 "file content or size (even files larger than 4 GB)."
607 #: ../src/guestfs.pod:286
608 msgid "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
612 #: ../src/guestfs.pod:288
614 "However the fastest way to upload I<large numbers of arbitrary files> is to "
615 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
616 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add "
617 "the drive in a predictable way (eg. adding it last after all other drives) "
618 "then you can get the device name from L</guestfs_list_devices> and mount it "
619 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
620 "sometimes non-portable between kernel versions, and they don't support "
621 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
622 "using a label or UUID, use an ISO image instead."
626 #: ../src/guestfs.pod:299
631 #: ../src/guestfs.pod:301
633 "There are various different commands for copying between files and devices "
634 "and in and out of the guest filesystem. These are summarised in the table "
639 #: ../src/guestfs.pod:307
640 msgid "B<file> to B<file>"
644 #: ../src/guestfs.pod:309
646 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
647 "directories recursively."
651 #: ../src/guestfs.pod:312
652 msgid "B<file or device> to B<file or device>"
656 #: ../src/guestfs.pod:314
658 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
659 "devices in the guest."
663 #: ../src/guestfs.pod:317
664 msgid "Example: duplicate the contents of an LV:"
668 #: ../src/guestfs.pod:319
671 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
676 #: ../src/guestfs.pod:321
678 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
679 "(C</dev/VG/Original>). To copy less than the whole source device, use "
680 "L</guestfs_copy_size>."
684 #: ../src/guestfs.pod:325
685 msgid "B<file on the host> to B<file or device>"
689 #: ../src/guestfs.pod:327
690 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
694 #: ../src/guestfs.pod:329
695 msgid "B<file or device> to B<file on the host>"
699 #: ../src/guestfs.pod:331
700 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
704 #: ../src/guestfs.pod:335
705 msgid "LISTING FILES"
709 #: ../src/guestfs.pod:337
711 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
712 "L<guestfish(1)>-equivalent command C<ll>)."
716 #: ../src/guestfs.pod:340
718 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
719 "programs, as a flat list of strings."
723 #: ../src/guestfs.pod:343
725 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
726 "directory, plus additional information about each one. It is more "
727 "equivalent to using the L<readdir(3)> call on a local filesystem."
731 #: ../src/guestfs.pod:347
733 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
738 #: ../src/guestfs.pod:350
739 msgid "RUNNING COMMANDS"
743 #: ../src/guestfs.pod:352
745 "Although libguestfs is primarily an API for manipulating files inside guest "
746 "images, we also provide some limited facilities for running commands inside "
751 #: ../src/guestfs.pod:356
752 msgid "There are many limitations to this:"
756 #: ../src/guestfs.pod:360 ../src/guestfs.pod:365 ../src/guestfs.pod:370 ../src/guestfs.pod:374 ../src/guestfs.pod:379 ../src/guestfs.pod:383 ../src/guestfs.pod:388 ../src/guestfs.pod:393 ../src/guestfs.pod:957 ../src/guestfs.pod:961 ../src/guestfs.pod:965 ../src/guestfs.pod:970 ../src/guestfs.pod:978 ../src/guestfs.pod:997 ../src/guestfs.pod:1005 ../src/guestfs.pod:1027 ../src/guestfs.pod:1031 ../src/guestfs.pod:1035 ../src/guestfs.pod:1039 ../src/guestfs.pod:1043 ../src/guestfs.pod:1047 ../src/guestfs.pod:1521 ../src/guestfs.pod:1526 ../src/guestfs.pod:1530 ../src/guestfs.pod:1640 ../src/guestfs.pod:1645 ../src/guestfs.pod:1649 ../src/guestfs.pod:1993 ../src/guestfs.pod:1999 ../src/guestfs.pod:2004 ../src/guestfs.pod:2010 ../src/guestfs.pod:2117 ../src/guestfs.pod:2121 ../src/guestfs.pod:2125 ../src/guestfs.pod:2129 ../src/guestfs-actions.pod:15 ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:569 ../src/guestfs-actions.pod:577 ../src/guestfs-actions.pod:584 ../src/guestfs-actions.pod:591 ../src/guestfs-actions.pod:1587 ../src/guestfs-actions.pod:1591 ../src/guestfs-actions.pod:1595 ../src/guestfs-actions.pod:1599 ../src/guestfs-actions.pod:1607 ../src/guestfs-actions.pod:1611 ../src/guestfs-actions.pod:1615 ../src/guestfs-actions.pod:1625 ../src/guestfs-actions.pod:1629 ../src/guestfs-actions.pod:1633 ../src/guestfs-actions.pod:1771 ../src/guestfs-actions.pod:1775 ../src/guestfs-actions.pod:1780 ../src/guestfs-actions.pod:1785 ../src/guestfs-actions.pod:1846 ../src/guestfs-actions.pod:1850 ../src/guestfs-actions.pod:1855 ../fish/guestfish.pod:376 ../fish/guestfish.pod:380 ../fish/guestfish.pod:384 ../fish/guestfish.pod:388 ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:375 ../fish/guestfish-actions.pod:383 ../fish/guestfish-actions.pod:390 ../fish/guestfish-actions.pod:397 ../fish/guestfish-actions.pod:1067 ../fish/guestfish-actions.pod:1071 ../fish/guestfish-actions.pod:1075 ../fish/guestfish-actions.pod:1079 ../fish/guestfish-actions.pod:1087 ../fish/guestfish-actions.pod:1091 ../fish/guestfish-actions.pod:1095 ../fish/guestfish-actions.pod:1105 ../fish/guestfish-actions.pod:1109 ../fish/guestfish-actions.pod:1113 ../fish/guestfish-actions.pod:1203 ../fish/guestfish-actions.pod:1207 ../fish/guestfish-actions.pod:1212 ../fish/guestfish-actions.pod:1217 ../fish/guestfish-actions.pod:1259 ../fish/guestfish-actions.pod:1263 ../fish/guestfish-actions.pod:1268 ../inspector/virt-inspector.pl:466 ../inspector/virt-inspector.pl:470 ../tools/virt-df.pl:161 ../tools/virt-df.pl:167 ../tools/virt-resize.pl:348 ../tools/virt-resize.pl:353 ../tools/virt-resize.pl:363
761 #: ../src/guestfs.pod:362
763 "The kernel version that the command runs under will be different from what "
768 #: ../src/guestfs.pod:367
770 "If the command needs to communicate with daemons, then most likely they "
775 #: ../src/guestfs.pod:372
776 msgid "The command will be running in limited memory."
780 #: ../src/guestfs.pod:376
782 "The network may not be available unless you enable it (see "
783 "L</guestfs_set_network>)."
787 #: ../src/guestfs.pod:381
788 msgid "Only supports Linux guests (not Windows, BSD, etc)."
792 #: ../src/guestfs.pod:385
793 msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
797 #: ../src/guestfs.pod:390
799 "For SELinux guests, you may need to enable SELinux and load policy first. "
800 "See L</SELINUX> in this manpage."
804 #: ../src/guestfs.pod:395
806 "I<Security:> It is not safe to run commands from untrusted, possibly "
807 "malicious guests. These commands may attempt to exploit your program by "
808 "sending unexpected output. They could also try to exploit the Linux kernel "
809 "or qemu provided by the libguestfs appliance. They could use the network "
810 "provided by the libguestfs appliance to bypass ordinary network partitions "
811 "and firewalls. They could use the elevated privileges or different SELinux "
812 "context of your program to their advantage."
816 #: ../src/guestfs.pod:404
818 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
819 "(a script which runs when the guest next boots normally), and to have this "
820 "script run the commands you want in the normal context of the running guest, "
821 "network security and so on. For information about other security issues, "
826 #: ../src/guestfs.pod:412
828 "The two main API calls to run commands are L</guestfs_command> and "
829 "L</guestfs_sh> (there are also variations)."
833 #: ../src/guestfs.pod:415
835 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
836 "shell globs, redirections, etc will work."
840 #: ../src/guestfs.pod:418
841 msgid "CONFIGURATION FILES"
845 #: ../src/guestfs.pod:420
847 "To read and write configuration files in Linux guest filesystems, we "
848 "strongly recommend using Augeas. For example, Augeas understands how to "
849 "read and write, say, a Linux shadow password file or X.org configuration "
850 "file, and so avoids you having to write that code."
854 #: ../src/guestfs.pod:425
856 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
857 "document Augeas itself here because there is excellent documentation on the "
858 "L<http://augeas.net/> website."
862 #: ../src/guestfs.pod:429
864 "If you don't want to use Augeas (you fool!) then try calling "
865 "L</guestfs_read_lines> to get the file as a list of lines which you can "
870 #: ../src/guestfs.pod:433
875 #: ../src/guestfs.pod:435
877 "We support SELinux guests. To ensure that labeling happens correctly in "
878 "SELinux guests, you need to enable SELinux and load the guest's policy:"
882 #: ../src/guestfs.pod:441 ../src/guestfs.pod:1142 ../src/guestfs.pod:1273
887 #: ../src/guestfs.pod:443
888 msgid "Before launching, do:"
892 #: ../src/guestfs.pod:445
895 " guestfs_set_selinux (g, 1);\n"
900 #: ../src/guestfs.pod:447 ../src/guestfs.pod:1146 ../src/guestfs.pod:1277
905 #: ../src/guestfs.pod:449
907 "After mounting the guest's filesystem(s), load the policy. This is best "
908 "done by running the L<load_policy(8)> command in the guest itself:"
912 #: ../src/guestfs.pod:453
915 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
920 #: ../src/guestfs.pod:455
922 "(Older versions of C<load_policy> require you to specify the name of the "
927 #: ../src/guestfs.pod:458 ../src/guestfs.pod:1283
932 #: ../src/guestfs.pod:460
934 "Optionally, set the security context for the API. The correct security "
935 "context to use can only be known by inspecting the guest. As an example:"
939 #: ../src/guestfs.pod:464
942 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
947 #: ../src/guestfs.pod:468
948 msgid "This will work for running commands and editing existing files."
952 #: ../src/guestfs.pod:470
954 "When new files are created, you may need to label them explicitly, for "
955 "example by running the external command C<restorecon pathname>."
959 #: ../src/guestfs.pod:474
964 #: ../src/guestfs.pod:476
966 "Certain calls are affected by the current file mode creation mask (the "
967 "\"umask\"). In particular ones which create files or directories, such as "
968 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
969 "either the default mode that the file is created with or modifies the mode "
974 #: ../src/guestfs.pod:482
976 "The default umask is C<022>, so files are created with modes such as C<0644> "
977 "and directories with C<0755>."
981 #: ../src/guestfs.pod:485
983 "There are two ways to avoid being affected by umask. Either set umask to 0 "
984 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
985 "L</guestfs_chmod> after creating each file or directory."
989 #: ../src/guestfs.pod:489
990 msgid "For more information about umask, see L<umask(2)>."
994 #: ../src/guestfs.pod:491 ../fish/guestfish.pod:669
995 msgid "ENCRYPTED DISKS"
999 #: ../src/guestfs.pod:493
1001 "Libguestfs allows you to access Linux guests which have been encrypted using "
1002 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1003 "standard. This includes nearly all whole disk encryption systems used by "
1004 "modern Linux guests."
1008 #: ../src/guestfs.pod:499
1010 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1011 "returns the string C<crypto_LUKS>)."
1015 #: ../src/guestfs.pod:502
1017 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1018 "will require the passphrase!"
1022 #: ../src/guestfs.pod:505
1024 "Opening a LUKS device creates a new device mapper device called "
1025 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
1026 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
1027 "decrypted from and encrypted to the underlying block device respectively."
1031 #: ../src/guestfs.pod:511
1033 "LVM volume groups on the device can be made visible by calling "
1034 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
1035 "volume(s) can now be mounted in the usual way."
1039 #: ../src/guestfs.pod:515
1041 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1042 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1043 "[\"/dev/VG\"])>. Then close the mapper device by calling "
1044 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1045 "underlying encrypted block device)."
1049 #: ../src/guestfs.pod:522
1054 #: ../src/guestfs.pod:524
1056 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1057 "contains operating systems. (These APIs used to be in a separate Perl-only "
1058 "library called L<Sys::Guestfs::Lib(3)> but since version 1.5.3 the most "
1059 "frequently used part of this library has been rewritten in C and moved into "
1064 #: ../src/guestfs.pod:530
1066 "Add all disks belonging to the unknown virtual machine and call "
1067 "L</guestfs_launch> in the usual way."
1071 #: ../src/guestfs.pod:533
1073 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1074 "and certain heuristics, and returns a list of operating systems that were "
1075 "found. An empty list means none were found. A single element is the root "
1076 "filesystem of the operating system. For dual- or multi-boot guests, "
1077 "multiple roots can be returned, each one corresponding to a separate "
1078 "operating system. (Multi-boot virtual machines are extremely rare in the "
1079 "world of virtualization, but since this scenario can happen, we have built "
1080 "libguestfs to deal with it.)"
1084 #: ../src/guestfs.pod:542
1086 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1087 "to get additional details about that operating system. For example, call "
1088 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1089 "Windows and Linux-based operating systems respectively."
1093 #: ../src/guestfs.pod:548
1095 "Un*x-like and Linux-based operating systems usually consist of several "
1096 "filesystems which are mounted at boot time (for example, a separate boot "
1097 "partition mounted on C</boot>). The inspection rules are able to detect how "
1098 "filesystems correspond to mount points. Call "
1099 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1100 "hash table like this example:"
1104 #: ../src/guestfs.pod:555
1107 " /boot => /dev/sda1\n"
1108 " / => /dev/vg_guest/lv_root\n"
1109 " /usr => /dev/vg_guest/lv_usr\n"
1114 #: ../src/guestfs.pod:559
1116 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1117 "filesystems as suggested."
1121 #: ../src/guestfs.pod:562
1123 "Be careful to mount filesystems in the right order (eg. C</> before "
1124 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
1129 #: ../src/guestfs.pod:566
1131 "Inspection currently only works for some common operating systems. "
1132 "Contributors are welcome to send patches for other operating systems that we "
1133 "currently cannot detect."
1137 #: ../src/guestfs.pod:570
1139 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1140 "for more details. The L</guestfs_inspect_os> function just ignores any "
1141 "encrypted devices."
1145 #: ../src/guestfs.pod:574
1147 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1148 "inspection and caches the results in the guest handle. Subsequent calls to "
1149 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
1150 "re-read the disks. If you change the content of the guest disks, you can "
1151 "redo inspection by calling L</guestfs_inspect_os> again. "
1152 "(L</guestfs_inspect_list_applications> works a little differently from the "
1153 "other calls and does read the disks. See documentation for that function "
1158 #: ../src/guestfs.pod:583
1159 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1163 #: ../src/guestfs.pod:585
1165 "Libguestfs can mount NTFS partitions. It does this using the "
1166 "L<http://www.ntfs-3g.org/> driver."
1170 #: ../src/guestfs.pod:588
1172 "DOS and Windows still use drive letters, and the filesystems are always "
1173 "treated as case insensitive by Windows itself, and therefore you might find "
1174 "a Windows configuration file referring to a path like "
1175 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
1176 "that directory might be referred to as C</WINDOWS/System32>."
1180 #: ../src/guestfs.pod:594
1182 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1183 "libguestfs to read the appropriate Windows Registry and configuration files, "
1184 "to determine yourself how drives are mapped (see also L<hivex(3)> and "
1185 "L<virt-inspector(1)>)."
1189 #: ../src/guestfs.pod:599
1191 "Replacing backslash characters with forward slash characters is also outside "
1192 "the scope of libguestfs, but something that you can easily do."
1196 #: ../src/guestfs.pod:602
1198 "Where we can help is in resolving the case insensitivity of paths. For "
1199 "this, call L</guestfs_case_sensitive_path>."
1203 #: ../src/guestfs.pod:605
1205 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1206 "files, through the library C<hivex> which is part of the libguestfs project "
1207 "although ships as a separate tarball. You have to locate and download the "
1208 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1209 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
1210 "L<virt-win-reg(1)> for more help on this issue."
1214 #: ../src/guestfs.pod:613
1215 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1219 #: ../src/guestfs.pod:615
1221 "Although we don't want to discourage you from using the C API, we will "
1222 "mention here that the same API is also available in other languages."
1226 #: ../src/guestfs.pod:618
1228 "The API is broadly identical in all supported languages. This means that "
1229 "the C call C<guestfs_mount(g,path)> is C<$g-E<gt>mount($path)> in Perl, "
1230 "C<g.mount(path)> in Python, and C<Guestfs.mount g path> in OCaml. In other "
1231 "words, a straightforward, predictable isomorphism between each language."
1235 #: ../src/guestfs.pod:624
1237 "Error messages are automatically transformed into exceptions if the language "
1242 #: ../src/guestfs.pod:627
1244 "We don't try to \"object orientify\" parts of the API in OO languages, "
1245 "although contributors are welcome to write higher level APIs above what we "
1246 "provide in their favourite languages if they wish."
1250 #: ../src/guestfs.pod:633
1255 #: ../src/guestfs.pod:635
1257 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1258 "identical to the C API. C++ classes and exceptions are not used."
1262 #: ../src/guestfs.pod:639
1267 #: ../src/guestfs.pod:641
1269 "The C# bindings are highly experimental. Please read the warnings at the "
1270 "top of C<csharp/Libguestfs.cs>."
1274 #: ../src/guestfs.pod:644
1279 #: ../src/guestfs.pod:646
1281 "This is the only language binding that is working but incomplete. Only "
1282 "calls which return simple integers have been bound in Haskell, and we are "
1283 "looking for help to complete this binding."
1287 #: ../src/guestfs.pod:650
1292 #: ../src/guestfs.pod:652
1294 "Full documentation is contained in the Javadoc which is distributed with "
1299 #: ../src/guestfs.pod:655
1304 #: ../src/guestfs.pod:657
1305 msgid "For documentation see the file C<guestfs.mli>."
1309 #: ../src/guestfs.pod:659
1314 #: ../src/guestfs.pod:661
1315 msgid "For documentation see L<Sys::Guestfs(3)>."
1319 #: ../src/guestfs.pod:663
1324 #: ../src/guestfs.pod:665
1326 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1327 "the php-libguestfs package for your distribution."
1331 #: ../src/guestfs.pod:668
1332 msgid "The PHP binding only works correctly on 64 bit machines."
1336 #: ../src/guestfs.pod:670
1341 #: ../src/guestfs.pod:672
1342 msgid "For documentation do:"
1346 #: ../src/guestfs.pod:674
1350 " >>> import guestfs\n"
1351 " >>> help (guestfs)\n"
1356 #: ../src/guestfs.pod:678
1361 #: ../src/guestfs.pod:680
1363 "Use the Guestfs module. There is no Ruby-specific documentation, but you "
1364 "can find examples written in Ruby in the libguestfs source."
1368 #: ../src/guestfs.pod:683
1369 msgid "B<shell scripts>"
1373 #: ../src/guestfs.pod:685
1374 msgid "For documentation see L<guestfish(1)>."
1378 #: ../src/guestfs.pod:689
1379 msgid "LIBGUESTFS GOTCHAS"
1383 #: ../src/guestfs.pod:691
1385 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1386 "system [...] that works in the way it is documented but is counterintuitive "
1387 "and almost invites mistakes.\""
1391 #: ../src/guestfs.pod:695
1393 "Since we developed libguestfs and the associated tools, there are several "
1394 "things we would have designed differently, but are now stuck with for "
1395 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1396 "release, you can expect these to change. Beware of them."
1400 #: ../src/guestfs.pod:703
1401 msgid "Autosync / forgetting to sync."
1405 #: ../src/guestfs.pod:705
1407 "When modifying a filesystem from C or another language, you B<must> unmount "
1408 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1409 "libguestfs handle. You can also call:"
1413 #: ../src/guestfs.pod:709
1416 " guestfs_set_autosync (g, 1);\n"
1421 #: ../src/guestfs.pod:711
1423 "to have the unmount/sync done automatically for you when the handle 'g' is "
1424 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
1429 #: ../src/guestfs.pod:715
1431 "If you forget to do this, then it is entirely possible that your changes "
1432 "won't be written out, or will be partially written, or (very rarely) that "
1433 "you'll get disk corruption."
1437 #: ../src/guestfs.pod:719
1439 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1440 "guestfish scripts that forget to sync will work just fine, which can make "
1441 "this very puzzling if you are trying to debug a problem."
1445 #: ../src/guestfs.pod:723
1447 "Update: Autosync is enabled by default for all API users starting from "
1448 "libguestfs 1.5.24."
1452 #: ../src/guestfs.pod:726
1453 msgid "Mount option C<-o sync> should not be the default."
1457 #: ../src/guestfs.pod:728
1459 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1460 "However C<-o sync> does not add any reliability benefit, but does have a "
1461 "very large performance impact."
1465 #: ../src/guestfs.pod:732
1467 "The work around is to use L</guestfs_mount_options> and set the mount "
1468 "options that you actually want to use."
1472 #: ../src/guestfs.pod:735
1473 msgid "Read-only should be the default."
1477 #: ../src/guestfs.pod:737
1479 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1480 "specify I<--rw> if you want to make changes to the image."
1484 #: ../src/guestfs.pod:740
1485 msgid "This would reduce the potential to corrupt live VM images."
1489 #: ../src/guestfs.pod:742
1491 "Note that many filesystems change the disk when you just mount and unmount, "
1492 "even if you didn't perform any writes. You need to use "
1493 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
1497 #: ../src/guestfs.pod:746
1498 msgid "guestfish command line is hard to use."
1502 #: ../src/guestfs.pod:748
1504 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1505 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1506 "exist, so it fails. In earlier versions of guestfish the error message was "
1507 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1508 "we should have used C<guestfish -c command> to run commands."
1512 #: ../src/guestfs.pod:755
1513 msgid "guestfish megabyte modifiers don't work right on all commands"
1517 #: ../src/guestfs.pod:757
1519 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1520 "other modifiers). What guestfish actually does is to multiply the number "
1521 "part by the modifier part and pass the result to the C API. However this "
1522 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1523 "expecting some other unit (eg. megabytes)."
1527 #: ../src/guestfs.pod:764
1528 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1532 #: ../src/guestfs.pod:766
1535 " lvcreate LV VG 100M\n"
1540 #: ../src/guestfs.pod:768
1542 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1543 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1544 "megabytes * megabytes) logical volume. The error message you get from this "
1545 "is also a little obscure."
1549 #: ../src/guestfs.pod:773
1551 "This could be fixed in the generator by specially marking parameters and "
1552 "return values which take bytes or other units."
1556 #: ../src/guestfs.pod:776
1557 msgid "Ambiguity between devices and paths"
1561 #: ../src/guestfs.pod:778
1563 "There is a subtle ambiguity in the API between a device name "
1564 "(eg. C</dev/sdb2>) and a similar pathname. A file might just happen to be "
1565 "called C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1569 #: ../src/guestfs.pod:783
1571 "In the current API we usually resolve this ambiguity by having two separate "
1572 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1573 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1574 "detecting if the path supplied begins with C</dev/>."
1578 #: ../src/guestfs.pod:789
1580 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1581 "make paths/devices into structured names. One way to do this would be to "
1582 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1583 "aspect of grub. Another way would be to use a structured type, equivalent "
1584 "to this OCaml type:"
1588 #: ../src/guestfs.pod:795
1591 " type path = Path of string | Device of int | Partition of int * int\n"
1596 #: ../src/guestfs.pod:797
1597 msgid "which would allow you to pass arguments like:"
1601 #: ../src/guestfs.pod:799
1604 " Path \"/foo/bar\"\n"
1605 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
1606 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
1607 " Path \"/dev/sdb2\" (* not a device *)\n"
1612 #: ../src/guestfs.pod:804
1614 "As you can see there are still problems to resolve even with this "
1615 "representation. Also consider how it might work in guestfish."
1619 #: ../src/guestfs.pod:809
1620 msgid "PROTOCOL LIMITS"
1624 #: ../src/guestfs.pod:811
1626 "Internally libguestfs uses a message-based protocol to pass API calls and "
1627 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1628 "plenty more detail about this). The maximum message size used by the "
1629 "protocol is slightly less than 4 MB. For some API calls you may need to be "
1630 "aware of this limit. The API calls which may be affected are individually "
1631 "documented, with a link back to this section of the documentation."
1635 #: ../src/guestfs.pod:819
1637 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1638 "a simple string. Because this string is at some point internally encoded as "
1639 "a message, the maximum size that it can return is slightly under 4 MB. If "
1640 "the requested file is larger than this then you will get an error."
1644 #: ../src/guestfs.pod:825
1646 "In order to transfer large files into and out of the guest filesystem, you "
1647 "need to use particular calls that support this. The sections L</UPLOADING> "
1648 "and L</DOWNLOADING> document how to do this."
1652 #: ../src/guestfs.pod:829
1654 "You might also consider mounting the disk image using our FUSE filesystem "
1655 "support (L<guestmount(1)>)."
1659 #: ../src/guestfs.pod:832
1660 msgid "KEYS AND PASSPHRASES"
1664 #: ../src/guestfs.pod:834
1666 "Certain libguestfs calls take a parameter that contains sensitive key "
1667 "material, passed in as a C string."
1671 #: ../src/guestfs.pod:837
1673 "In the future we would hope to change the libguestfs implementation so that "
1674 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1675 "swap. However this is I<not> done at the moment, because of the complexity "
1676 "of such an implementation."
1680 #: ../src/guestfs.pod:842
1682 "Therefore you should be aware that any key parameter you pass to libguestfs "
1683 "might end up being written out to the swap partition. If this is a concern, "
1684 "scrub the swap partition or don't use libguestfs on encrypted devices."
1688 #: ../src/guestfs.pod:847
1689 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
1693 #: ../src/guestfs.pod:849
1695 "All high-level libguestfs actions are synchronous. If you want to use "
1696 "libguestfs asynchronously then you must create a thread."
1700 #: ../src/guestfs.pod:852
1702 "Only use the handle from a single thread. Either use the handle exclusively "
1703 "from one thread, or provide your own mutex so that two threads cannot issue "
1704 "calls on the same handle at the same time."
1708 #: ../src/guestfs.pod:856
1710 "See the graphical program guestfs-browser for one possible architecture for "
1711 "multithreaded programs using libvirt and libguestfs."
1715 #: ../src/guestfs.pod:859
1720 #: ../src/guestfs.pod:861
1722 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
1727 #: ../src/guestfs.pod:864
1729 "By default it looks for these in the directory C<$libdir/guestfs> "
1730 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
1734 #: ../src/guestfs.pod:867
1736 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
1737 "to change the directories that libguestfs will search in. The value is a "
1738 "colon-separated list of paths. The current directory is I<not> searched "
1739 "unless the path contains an empty element or C<.>. For example "
1740 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
1741 "then C</usr/lib/guestfs>."
1745 #: ../src/guestfs.pod:874
1746 msgid "QEMU WRAPPERS"
1750 #: ../src/guestfs.pod:876
1752 "If you want to compile your own qemu, run qemu from a non-standard location, "
1753 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
1758 #: ../src/guestfs.pod:880
1760 "There is one important rule to remember: you I<must C<exec qemu>> as the "
1761 "last command in the shell script (so that qemu replaces the shell and "
1762 "becomes the direct child of the libguestfs-using program). If you don't do "
1763 "this, then the qemu process won't be cleaned up correctly."
1767 #: ../src/guestfs.pod:885
1769 "Here is an example of a wrapper, where I have built my own copy of qemu from "
1774 #: ../src/guestfs.pod:888
1778 " qemudir=/home/rjones/d/qemu\n"
1779 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
1785 #: ../src/guestfs.pod:892
1787 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
1788 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
1793 #: ../src/guestfs.pod:896
1796 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
1801 #: ../src/guestfs.pod:898
1803 "Note that libguestfs also calls qemu with the -help and -version options in "
1804 "order to determine features."
1808 #: ../src/guestfs.pod:901
1809 msgid "ABI GUARANTEE"
1813 #: ../src/guestfs.pod:903
1815 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
1816 "actions as outlined in this section. Although we will deprecate some "
1817 "actions, for example if they get replaced by newer calls, we will keep the "
1818 "old actions forever. This allows you the developer to program in confidence "
1819 "against the libguestfs API."
1823 #: ../src/guestfs.pod:909
1824 msgid "BLOCK DEVICE NAMING"
1828 #: ../src/guestfs.pod:911
1830 "In the kernel there is now quite a profusion of schemata for naming block "
1831 "devices (in this context, by I<block device> I mean a physical or virtual "
1832 "hard drive). The original Linux IDE driver used names starting with "
1833 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
1834 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
1835 "replacement for the old IDE driver (particularly for SATA devices) those "
1836 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
1837 "machines with paravirtualized drivers. This has created several different "
1838 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
1843 #: ../src/guestfs.pod:923
1845 "As discussed above, libguestfs uses a qemu appliance running an embedded "
1846 "Linux kernel to access block devices. We can run a variety of appliances "
1847 "based on a variety of Linux kernels."
1851 #: ../src/guestfs.pod:927
1853 "This causes a problem for libguestfs because many API calls use device or "
1854 "partition names. Working scripts and the recipe (example) scripts that we "
1855 "make available over the internet could fail if the naming scheme changes."
1859 #: ../src/guestfs.pod:932
1861 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
1862 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
1863 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
1864 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
1868 #: ../src/guestfs.pod:938
1870 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
1871 "L</guestfs_list_partitions> and similar calls return the true names of the "
1872 "devices and partitions as known to the appliance."
1876 #: ../src/guestfs.pod:943
1877 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
1881 #: ../src/guestfs.pod:945
1883 "Usually this translation is transparent. However in some (very rare) cases "
1884 "you may need to know the exact algorithm. Such cases include where you use "
1885 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
1886 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
1891 #: ../src/guestfs.pod:951
1893 "The algorithm is applied only to I<parameters> which are known to be either "
1894 "device or partition names. Return values from functions such as "
1895 "L</guestfs_list_devices> are never changed."
1899 #: ../src/guestfs.pod:959
1900 msgid "Is the string a parameter which is a device or partition name?"
1904 #: ../src/guestfs.pod:963
1905 msgid "Does the string begin with C</dev/sd>?"
1909 #: ../src/guestfs.pod:967
1911 "Does the named device exist? If so, we use that device. However if I<not> "
1912 "then we continue with this algorithm."
1916 #: ../src/guestfs.pod:972
1917 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
1921 #: ../src/guestfs.pod:974
1922 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
1926 #: ../src/guestfs.pod:976
1927 msgid "If that named device exists, use it. If not, continue."
1931 #: ../src/guestfs.pod:980
1932 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
1936 #: ../src/guestfs.pod:982
1937 msgid "If that named device exists, use it. If not, return an error."
1941 #: ../src/guestfs.pod:986
1942 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
1946 #: ../src/guestfs.pod:988
1948 "Although the standard naming scheme and automatic translation is useful for "
1949 "simple programs and guestfish scripts, for larger programs it is best not to "
1950 "rely on this mechanism."
1954 #: ../src/guestfs.pod:992
1956 "Where possible for maximum future portability programs using libguestfs "
1957 "should use these future-proof techniques:"
1961 #: ../src/guestfs.pod:999
1963 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
1964 "device names, and then use those names directly."
1968 #: ../src/guestfs.pod:1002
1969 msgid "Since those device names exist by definition, they will never be translated."
1973 #: ../src/guestfs.pod:1007
1975 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
1976 "filesystem labels."
1980 #: ../src/guestfs.pod:1012
1985 #: ../src/guestfs.pod:1014
1987 "This section discusses security implications of using libguestfs, "
1988 "particularly with untrusted or malicious guests or disk images."
1992 #: ../src/guestfs.pod:1017
1993 msgid "GENERAL SECURITY CONSIDERATIONS"
1997 #: ../src/guestfs.pod:1019
1999 "Be careful with any files or data that you download from a guest (by "
2000 "\"download\" we mean not just the L</guestfs_download> command but any "
2001 "command that reads files, filenames, directories or anything else from a "
2002 "disk image). An attacker could manipulate the data to fool your program "
2003 "into doing the wrong thing. Consider cases such as:"
2007 #: ../src/guestfs.pod:1029
2008 msgid "the data (file etc) not being present"
2012 #: ../src/guestfs.pod:1033
2013 msgid "being present but empty"
2017 #: ../src/guestfs.pod:1037
2018 msgid "being much larger than normal"
2022 #: ../src/guestfs.pod:1041
2023 msgid "containing arbitrary 8 bit data"
2027 #: ../src/guestfs.pod:1045
2028 msgid "being in an unexpected character encoding"
2032 #: ../src/guestfs.pod:1049
2033 msgid "containing homoglyphs."
2037 #: ../src/guestfs.pod:1053
2038 msgid "SECURITY OF MOUNTING FILESYSTEMS"
2042 #: ../src/guestfs.pod:1055
2044 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
2045 "(VFS) module can sometimes be escalated into exploits by deliberately "
2046 "creating a malicious, malformed filesystem. These exploits are very severe "
2047 "for two reasons. Firstly there are very many filesystem drivers in the "
2048 "kernel, and many of them are infrequently used and not much developer "
2049 "attention has been paid to the code. Linux userspace helps potential "
2050 "crackers by detecting the filesystem type and automatically choosing the "
2051 "right VFS driver, even if that filesystem type is obscure or unexpected for "
2052 "the administrator. Secondly, a kernel-level exploit is like a local root "
2053 "exploit (worse in some ways), giving immediate and total access to the "
2054 "system right down to the hardware level."
2058 #: ../src/guestfs.pod:1068
2060 "That explains why you should never mount a filesystem from an untrusted "
2061 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
2062 "inside a qemu virtual machine, usually running as a non-root user. The "
2063 "attacker would need to write a filesystem which first exploited the kernel, "
2064 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
2065 "the libguestfs protocol, and finally to be as serious as the host kernel "
2066 "exploit it would need to escalate its privileges to root. This multi-step "
2067 "escalation, performed by a static piece of data, is thought to be extremely "
2068 "hard to do, although we never say 'never' about security issues."
2072 #: ../src/guestfs.pod:1079
2074 "In any case callers can reduce the attack surface by forcing the filesystem "
2075 "type when mounting (use L</guestfs_mount_vfs>)."
2079 #: ../src/guestfs.pod:1082
2080 msgid "PROTOCOL SECURITY"
2084 #: ../src/guestfs.pod:1084
2086 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
2087 "defined upper message size. However a program that uses libguestfs must "
2088 "also take care - for example you can write a program that downloads a binary "
2089 "from a disk image and executes it locally, and no amount of protocol "
2090 "security will save you from the consequences."
2094 #: ../src/guestfs.pod:1090
2095 msgid "INSPECTION SECURITY"
2099 #: ../src/guestfs.pod:1092
2101 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
2102 "directly from the guest, and these could contain any 8 bit data. Callers "
2103 "should be careful to escape these before printing them to a structured file "
2104 "(for example, use HTML escaping if creating a web page)."
2108 #: ../src/guestfs.pod:1098
2110 "The inspection API parses guest configuration using two external libraries: "
2111 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
2112 "designed to be robust in the face of malicious data, although denial of "
2113 "service attacks are still possible, for example with oversized configuration "
2118 #: ../src/guestfs.pod:1104
2119 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
2123 #: ../src/guestfs.pod:1106
2125 "Be very cautious about running commands from the guest. By running a "
2126 "command in the guest, you are giving CPU time to a binary that you do not "
2127 "control, under the same user account as the library, albeit wrapped in qemu "
2128 "virtualization. More information and alternatives can be found in the "
2129 "section L</RUNNING COMMANDS>."
2133 #: ../src/guestfs.pod:1112
2134 msgid "CVE-2010-3851"
2138 #: ../src/guestfs.pod:1114
2139 msgid "https://bugzilla.redhat.com/642934"
2143 #: ../src/guestfs.pod:1116
2145 "This security bug concerns the automatic disk format detection that qemu "
2146 "does on disk images."
2150 #: ../src/guestfs.pod:1119
2152 "A raw disk image is just the raw bytes, there is no header. Other disk "
2153 "images like qcow2 contain a special header. Qemu deals with this by looking "
2154 "for one of the known headers, and if none is found then assuming the disk "
2155 "image must be raw."
2159 #: ../src/guestfs.pod:1124
2161 "This allows a guest which has been given a raw disk image to write some "
2162 "other header. At next boot (or when the disk image is accessed by "
2163 "libguestfs) qemu would do autodetection and think the disk image format was, "
2164 "say, qcow2 based on the header written by the guest."
2168 #: ../src/guestfs.pod:1129
2170 "This in itself would not be a problem, but qcow2 offers many features, one "
2171 "of which is to allow a disk image to refer to another image (called the "
2172 "\"backing disk\"). It does this by placing the path to the backing disk "
2173 "into the qcow2 header. This path is not validated and could point to any "
2174 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
2175 "\"holes\" in the qcow2 disk image, which of course is completely under the "
2176 "control of the attacker."
2180 #: ../src/guestfs.pod:1137
2181 msgid "In libguestfs this is rather hard to exploit except under two circumstances:"
2185 #: ../src/guestfs.pod:1144
2186 msgid "You have enabled the network or have opened the disk in write mode."
2190 #: ../src/guestfs.pod:1148
2192 "You are also running untrusted code from the guest (see L</RUNNING "
2197 #: ../src/guestfs.pod:1153
2199 "The way to avoid this is to specify the expected disk format when adding "
2200 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
2201 "should always do this if the disk is raw format, and it's a good idea for "
2206 #: ../src/guestfs.pod:1158
2208 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
2209 "format is fetched from libvirt and passed through."
2213 #: ../src/guestfs.pod:1161
2215 "For libguestfs tools, use the I<--format> command line parameter as "
2220 #: ../src/guestfs.pod:1164
2221 msgid "CONNECTION MANAGEMENT"
2225 #: ../src/guestfs.pod:1166
2230 #: ../src/guestfs.pod:1168
2232 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
2233 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
2234 "handle and release all resources used."
2238 #: ../src/guestfs.pod:1172
2240 "For information on using multiple handles and threads, see the section "
2241 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> below."
2245 #: ../src/guestfs.pod:1175
2246 msgid "guestfs_create"
2250 #: ../src/guestfs.pod:1177
2253 " guestfs_h *guestfs_create (void);\n"
2258 #: ../src/guestfs.pod:1179
2259 msgid "Create a connection handle."
2263 #: ../src/guestfs.pod:1181
2265 "You have to call L</guestfs_add_drive_opts> (or one of the equivalent calls) "
2266 "on the handle at least once."
2270 #: ../src/guestfs.pod:1184
2272 "This function returns a non-NULL pointer to a handle on success or NULL on "
2277 #: ../src/guestfs.pod:1187
2278 msgid "After configuring the handle, you have to call L</guestfs_launch>."
2282 #: ../src/guestfs.pod:1189
2284 "You may also want to configure error handling for the handle. See L</ERROR "
2285 "HANDLING> section below."
2289 #: ../src/guestfs.pod:1192
2290 msgid "guestfs_close"
2294 #: ../src/guestfs.pod:1194
2297 " void guestfs_close (guestfs_h *g);\n"
2302 #: ../src/guestfs.pod:1196
2303 msgid "This closes the connection handle and frees up all resources used."
2307 #: ../src/guestfs.pod:1198
2308 msgid "ERROR HANDLING"
2312 #: ../src/guestfs.pod:1200
2314 "API functions can return errors. For example, almost all functions that "
2315 "return C<int> will return C<-1> to indicate an error."
2319 #: ../src/guestfs.pod:1203
2321 "Additional information is available for errors: an error message string and "
2322 "optionally an error number (errno) if the thing that failed was a system "
2327 #: ../src/guestfs.pod:1207
2329 "You can get at the additional information about the last error on the handle "
2330 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
2331 "up an error handler with L</guestfs_set_error_handler>."
2335 #: ../src/guestfs.pod:1212
2337 "When the handle is created, a default error handler is installed which "
2338 "prints the error message string to C<stderr>. For small short-running "
2339 "command line programs it is sufficient to do:"
2343 #: ../src/guestfs.pod:1216
2346 " if (guestfs_launch (g) == -1)\n"
2347 " exit (EXIT_FAILURE);\n"
2352 #: ../src/guestfs.pod:1219
2354 "since the default error handler will ensure that an error message has been "
2355 "printed to C<stderr> before the program exits."
2359 #: ../src/guestfs.pod:1222
2361 "For other programs the caller will almost certainly want to install an "
2362 "alternate error handler or do error handling in-line like this:"
2366 #: ../src/guestfs.pod:1225
2369 " g = guestfs_create ();\n"
2374 #: ../src/guestfs.pod:1227
2377 " /* This disables the default behaviour of printing errors\n"
2379 " guestfs_set_error_handler (g, NULL, NULL);\n"
2384 #: ../src/guestfs.pod:1231
2387 " if (guestfs_launch (g) == -1) {\n"
2388 " /* Examine the error message and print it etc. */\n"
2389 " char *msg = guestfs_last_error (g);\n"
2390 " int errnum = guestfs_last_errno (g);\n"
2391 " fprintf (stderr, \"%s\\n\", msg);\n"
2398 #: ../src/guestfs.pod:1239
2400 "Out of memory errors are handled differently. The default action is to call "
2401 "L<abort(3)>. If this is undesirable, then you can set a handler using "
2402 "L</guestfs_set_out_of_memory_handler>."
2406 #: ../src/guestfs.pod:1243
2408 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
2409 "because there is no handle if this happens there is no way to get additional "
2410 "error information. However L</guestfs_create> is supposed to be a "
2411 "lightweight operation which can only fail because of insufficient memory (it "
2412 "returns NULL in this case)."
2416 #: ../src/guestfs.pod:1249
2417 msgid "guestfs_last_error"
2421 #: ../src/guestfs.pod:1251
2424 " const char *guestfs_last_error (guestfs_h *g);\n"
2429 #: ../src/guestfs.pod:1253
2431 "This returns the last error message that happened on C<g>. If there has not "
2432 "been an error since the handle was created, then this returns C<NULL>."
2436 #: ../src/guestfs.pod:1257
2438 "The lifetime of the returned string is until the next error occurs, or "
2439 "L</guestfs_close> is called."
2443 #: ../src/guestfs.pod:1260
2444 msgid "guestfs_last_errno"
2448 #: ../src/guestfs.pod:1262
2451 " int guestfs_last_errno (guestfs_h *g);\n"
2456 #: ../src/guestfs.pod:1264
2457 msgid "This returns the last error number (errno) that happened on C<g>."
2461 #: ../src/guestfs.pod:1266
2462 msgid "If successful, an errno integer not equal to zero is returned."
2466 #: ../src/guestfs.pod:1268
2467 msgid "If no error, this returns 0. This call can return 0 in three situations:"
2471 #: ../src/guestfs.pod:1275
2472 msgid "There has not been any error on the handle."
2476 #: ../src/guestfs.pod:1279
2478 "There has been an error but the errno was meaningless. This corresponds to "
2479 "the case where the error did not come from a failed system call, but for "
2480 "some other reason."
2484 #: ../src/guestfs.pod:1285
2486 "There was an error from a failed system call, but for some reason the errno "
2487 "was not captured and returned. This usually indicates a bug in libguestfs."
2491 #: ../src/guestfs.pod:1291
2493 "Libguestfs tries to convert the errno from inside the applicance into a "
2494 "corresponding errno for the caller (not entirely trivial: the appliance "
2495 "might be running a completely different operating system from the library "
2496 "and error numbers are not standardized across Un*xen). If this could not be "
2497 "done, then the error is translated to C<EINVAL>. In practice this should "
2498 "only happen in very rare circumstances."
2502 #: ../src/guestfs.pod:1299
2503 msgid "guestfs_set_error_handler"
2507 #: ../src/guestfs.pod:1301
2510 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
2512 " const char *msg);\n"
2513 " void guestfs_set_error_handler (guestfs_h *g,\n"
2514 " guestfs_error_handler_cb cb,\n"
2520 #: ../src/guestfs.pod:1308
2522 "The callback C<cb> will be called if there is an error. The parameters "
2523 "passed to the callback are an opaque data pointer and the error message "
2528 #: ../src/guestfs.pod:1312
2530 "C<errno> is not passed to the callback. To get that the callback must call "
2531 "L</guestfs_last_errno>."
2535 #: ../src/guestfs.pod:1315
2537 "Note that the message string C<msg> is freed as soon as the callback "
2538 "function returns, so if you want to stash it somewhere you must make your "
2543 #: ../src/guestfs.pod:1319
2544 msgid "The default handler prints messages on C<stderr>."
2548 #: ../src/guestfs.pod:1321
2549 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
2553 #: ../src/guestfs.pod:1323
2554 msgid "guestfs_get_error_handler"
2558 #: ../src/guestfs.pod:1325
2561 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
2562 " void **opaque_rtn);\n"
2567 #: ../src/guestfs.pod:1328
2568 msgid "Returns the current error handler callback."
2572 #: ../src/guestfs.pod:1330
2573 msgid "guestfs_set_out_of_memory_handler"
2577 #: ../src/guestfs.pod:1332
2580 " typedef void (*guestfs_abort_cb) (void);\n"
2581 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
2582 " guestfs_abort_cb);\n"
2587 #: ../src/guestfs.pod:1336
2589 "The callback C<cb> will be called if there is an out of memory situation. "
2590 "I<Note this callback must not return>."
2594 #: ../src/guestfs.pod:1339
2595 msgid "The default is to call L<abort(3)>."
2599 #: ../src/guestfs.pod:1341
2600 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
2604 #: ../src/guestfs.pod:1344
2605 msgid "guestfs_get_out_of_memory_handler"
2609 #: ../src/guestfs.pod:1346
2612 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
2617 #: ../src/guestfs.pod:1348
2618 msgid "This returns the current out of memory handler."
2622 #: ../src/guestfs.pod:1350
2627 #: ../src/guestfs.pod:1352 ../fish/guestfish.pod:907
2632 #: ../src/guestfs.pod:1354
2637 #: ../src/guestfs.pod:1356
2642 #: ../src/guestfs.pod:1358
2643 msgid "AVAILABILITY"
2647 #: ../src/guestfs.pod:1360
2648 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
2652 #: ../src/guestfs.pod:1362
2654 "Using L</guestfs_available> you can test availability of the following "
2655 "groups of functions. This test queries the appliance to see if the "
2656 "appliance you are currently using supports the functionality."
2660 #: ../src/guestfs.pod:1367
2661 msgid "@AVAILABILITY@"
2665 #: ../src/guestfs.pod:1369
2666 msgid "GUESTFISH supported COMMAND"
2670 #: ../src/guestfs.pod:1371
2672 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
2673 "prints out the available groups and whether they are supported by this build "
2674 "of libguestfs. Note however that you have to do C<run> first."
2678 #: ../src/guestfs.pod:1376
2679 msgid "SINGLE CALLS AT COMPILE TIME"
2683 #: ../src/guestfs.pod:1378
2685 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
2686 "function, such as:"
2690 #: ../src/guestfs.pod:1381
2693 " #define LIBGUESTFS_HAVE_DD 1\n"
2698 #: ../src/guestfs.pod:1383
2699 msgid "if L</guestfs_dd> is available."
2703 #: ../src/guestfs.pod:1385
2705 "Before version 1.5.8, if you needed to test whether a single libguestfs "
2706 "function is available at compile time, we recommended using build tools such "
2707 "as autoconf or cmake. For example in autotools you could use:"
2711 #: ../src/guestfs.pod:1390
2714 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
2715 " AC_CHECK_FUNCS([guestfs_dd])\n"
2720 #: ../src/guestfs.pod:1393
2722 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
2727 #: ../src/guestfs.pod:1396
2728 msgid "SINGLE CALLS AT RUN TIME"
2732 #: ../src/guestfs.pod:1398
2734 "Testing at compile time doesn't guarantee that a function really exists in "
2735 "the library. The reason is that you might be dynamically linked against a "
2736 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
2737 "This situation unfortunately results in a segmentation fault, which is a "
2738 "shortcoming of the C dynamic linking system itself."
2742 #: ../src/guestfs.pod:1405
2744 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2745 "in this example program (note that you still need the compile time check as "
2750 #: ../src/guestfs.pod:1409
2753 " #include <stdio.h>\n"
2754 " #include <stdlib.h>\n"
2755 " #include <unistd.h>\n"
2756 " #include <dlfcn.h>\n"
2757 " #include <guestfs.h>\n"
2762 #: ../src/guestfs.pod:1415
2767 " #ifdef LIBGUESTFS_HAVE_DD\n"
2769 " int has_function;\n"
2774 #: ../src/guestfs.pod:1421
2777 " /* Test if the function guestfs_dd is really available. */\n"
2778 " dl = dlopen (NULL, RTLD_LAZY);\n"
2780 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2781 " exit (EXIT_FAILURE);\n"
2783 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2789 #: ../src/guestfs.pod:1430
2792 " if (!has_function)\n"
2793 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2795 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2796 " /* Now it's safe to call\n"
2797 " guestfs_dd (g, \"foo\", \"bar\");\n"
2801 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2808 #: ../src/guestfs.pod:1443
2810 "You may think the above is an awful lot of hassle, and it is. There are "
2811 "other ways outside of the C linking system to ensure that this kind of "
2812 "incompatibility never arises, such as using package versioning:"
2816 #: ../src/guestfs.pod:1448
2819 " Requires: libguestfs >= 1.0.80\n"
2824 #: ../src/guestfs.pod:1450
2825 msgid "CALLS WITH OPTIONAL ARGUMENTS"
2829 #: ../src/guestfs.pod:1452
2831 "A recent feature of the API is the introduction of calls which take optional "
2832 "arguments. In C these are declared 3 ways. The main way is as a call which "
2833 "takes variable arguments (ie. C<...>), as in this example:"
2837 #: ../src/guestfs.pod:1457
2840 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
2845 #: ../src/guestfs.pod:1459
2847 "Call this with a list of optional arguments, terminated by C<-1>. So to "
2848 "call with no optional arguments specified:"
2852 #: ../src/guestfs.pod:1462
2855 " guestfs_add_drive_opts (g, filename, -1);\n"
2860 #: ../src/guestfs.pod:1464
2861 msgid "With a single optional argument:"
2865 #: ../src/guestfs.pod:1466
2868 " guestfs_add_drive_opts (g, filename,\n"
2869 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2875 #: ../src/guestfs.pod:1470
2880 #: ../src/guestfs.pod:1472
2883 " guestfs_add_drive_opts (g, filename,\n"
2884 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2885 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
2891 #: ../src/guestfs.pod:1477
2893 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
2898 #: ../src/guestfs.pod:1480
2899 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
2903 #: ../src/guestfs.pod:1482
2905 "The second variant has the same name with the suffix C<_va>, which works the "
2906 "same way but takes a C<va_list>. See the C manual for details. For the "
2907 "example function, this is declared:"
2911 #: ../src/guestfs.pod:1486
2914 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
2920 #: ../src/guestfs.pod:1489
2921 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
2925 #: ../src/guestfs.pod:1491
2927 "The third variant is useful where you need to construct these calls. You "
2928 "pass in a structure where you fill in the optional fields. The structure "
2929 "has a bitmask as the first element which you must set to indicate which "
2930 "fields you have filled in. For our example function the structure and call "
2935 #: ../src/guestfs.pod:1497
2938 " struct guestfs_add_drive_opts_argv {\n"
2939 " uint64_t bitmask;\n"
2941 " const char *format;\n"
2944 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
2945 " const struct guestfs_add_drive_opts_argv *optargs);\n"
2950 #: ../src/guestfs.pod:1506
2951 msgid "You could call it like this:"
2955 #: ../src/guestfs.pod:1508
2958 " struct guestfs_add_drive_opts_argv optargs = {\n"
2959 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
2960 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
2962 " .format = \"qcow2\"\n"
2968 #: ../src/guestfs.pod:1515
2971 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
2976 #: ../src/guestfs.pod:1517 ../src/guestfs-actions.pod:11 ../src/guestfs-actions.pod:1842 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1255
2981 #: ../src/guestfs.pod:1523
2982 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
2986 #: ../src/guestfs.pod:1528
2987 msgid "You do not need to fill in all fields of the structure."
2991 #: ../src/guestfs.pod:1532
2993 "There must be a one-to-one correspondence between fields of the structure "
2994 "that are filled in, and bits set in the bitmask."
2998 #: ../src/guestfs.pod:1537
2999 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
3003 #: ../src/guestfs.pod:1539
3005 "In other languages, optional arguments are expressed in the way that is "
3006 "natural for that language. We refer you to the language-specific "
3007 "documentation for more details on that."
3011 #: ../src/guestfs.pod:1543
3012 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
3016 #: ../src/guestfs.pod:1545
3017 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
3021 #: ../src/guestfs.pod:1547
3023 "The child process generates events in some situations. Current events "
3024 "include: receiving a log message, the child process exits."
3028 #: ../src/guestfs.pod:1550
3030 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
3035 #: ../src/guestfs.pod:1553
3037 "Only I<one callback of each type> can be registered for each handle. "
3038 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
3039 "that type. Cancel all callbacks of this type by calling this function with "
3040 "C<cb> set to C<NULL>."
3044 #: ../src/guestfs.pod:1558
3045 msgid "guestfs_set_log_message_callback"
3049 #: ../src/guestfs.pod:1560
3052 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
3053 " char *buf, int len);\n"
3054 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
3055 " guestfs_log_message_cb cb,\n"
3061 #: ../src/guestfs.pod:1566
3063 "The callback function C<cb> will be called whenever qemu or the guest writes "
3064 "anything to the console."
3068 #: ../src/guestfs.pod:1569
3069 msgid "Use this function to capture kernel messages and similar."
3073 #: ../src/guestfs.pod:1571
3075 "Normally there is no log message handler, and log messages are just "
3080 #: ../src/guestfs.pod:1574
3081 msgid "guestfs_set_subprocess_quit_callback"
3085 #: ../src/guestfs.pod:1576
3088 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
3089 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
3090 " guestfs_subprocess_quit_cb cb,\n"
3096 #: ../src/guestfs.pod:1581
3098 "The callback function C<cb> will be called when the child process quits, "
3099 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
3100 "corresponds to a transition from any state to the CONFIG state)."
3104 #: ../src/guestfs.pod:1586
3105 msgid "guestfs_set_launch_done_callback"
3109 #: ../src/guestfs.pod:1588
3112 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
3113 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
3114 " guestfs_launch_done_cb cb,\n"
3120 #: ../src/guestfs.pod:1593
3122 "The callback function C<cb> will be called when the child process becomes "
3123 "ready first time after it has been launched. (This corresponds to a "
3124 "transition from LAUNCHING to the READY state)."
3128 #: ../src/guestfs.pod:1597
3129 msgid "guestfs_set_close_callback"
3133 #: ../src/guestfs.pod:1599
3136 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
3137 " void guestfs_set_close_callback (guestfs_h *g,\n"
3138 " guestfs_close_cb cb,\n"
3144 #: ../src/guestfs.pod:1604
3146 "The callback function C<cb> will be called while the handle is being closed "
3147 "(synchronously from L</guestfs_close>)."
3151 #: ../src/guestfs.pod:1607
3153 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
3154 "handles that are open when the program exits. This means that this callback "
3155 "might be called indirectly from L<exit(3)>, which can cause unexpected "
3156 "problems in higher-level languages (eg. if your HLL interpreter has already "
3157 "been cleaned up by the time this is called, and if your callback then jumps "
3158 "into some HLL function)."
3162 #: ../src/guestfs.pod:1615
3163 msgid "guestfs_set_progress_callback"
3167 #: ../src/guestfs.pod:1617
3170 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
3171 " int proc_nr, int serial,\n"
3172 " uint64_t position, uint64_t total);\n"
3173 " void guestfs_set_progress_callback (guestfs_h *g,\n"
3174 " guestfs_progress_cb cb,\n"
3180 #: ../src/guestfs.pod:1624
3182 "Some long-running operations can generate progress messages. If this "
3183 "callback is registered, then it will be called each time a progress message "
3184 "is generated (usually two seconds after the operation started, and three "
3185 "times per second thereafter until it completes, although the frequency may "
3186 "change in future versions)."
3190 #: ../src/guestfs.pod:1630
3192 "The callback receives two numbers: C<position> and C<total>. The units of "
3193 "C<total> are not defined, although for some operations C<total> may relate "
3194 "in some way to the amount of data to be transferred (eg. in bytes or "
3195 "megabytes), and C<position> may be the portion which has been transferred."
3199 #: ../src/guestfs.pod:1636
3200 msgid "The only defined and stable parts of the API are:"
3204 #: ../src/guestfs.pod:1642
3206 "The callback can display to the user some type of progress bar or indicator "
3207 "which shows the ratio of C<position>:C<total>."
3211 #: ../src/guestfs.pod:1647
3212 msgid "0 E<lt>= C<position> E<lt>= C<total>"
3216 #: ../src/guestfs.pod:1651
3218 "If any progress notification is sent during a call, then a final progress "
3219 "notification is always sent when C<position> = C<total>."
3223 #: ../src/guestfs.pod:1654
3225 "This is to simplify caller code, so callers can easily set the progress "
3226 "indicator to \"100%\" at the end of the operation, without requiring special "
3227 "code to detect this case."
3231 #: ../src/guestfs.pod:1660
3233 "The callback also receives the procedure number and serial number of the "
3234 "call. These are only useful for debugging protocol issues, and the callback "
3235 "can normally ignore them. The callback may want to print these numbers in "
3236 "error messages or debugging messages."
3240 #: ../src/guestfs.pod:1665
3241 msgid "PRIVATE DATA AREA"
3245 #: ../src/guestfs.pod:1667
3247 "You can attach named pieces of private data to the libguestfs handle, and "
3248 "fetch them by name for the lifetime of the handle. This is called the "
3249 "private data area and is only available from the C API."
3253 #: ../src/guestfs.pod:1671
3254 msgid "To attach a named piece of data, use the following call:"
3258 #: ../src/guestfs.pod:1673
3261 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
3266 #: ../src/guestfs.pod:1675
3268 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
3269 "pointer (which can be C<NULL>). Any previous item with the same name is "
3274 #: ../src/guestfs.pod:1679
3276 "You can use any C<key> you want, but names beginning with an underscore "
3277 "character are reserved for internal libguestfs purposes (for implementing "
3278 "language bindings). It is recommended to prefix the name with some unique "
3279 "string to avoid collisions with other users."
3283 #: ../src/guestfs.pod:1684
3284 msgid "To retrieve the pointer, use:"
3288 #: ../src/guestfs.pod:1686
3291 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
3296 #: ../src/guestfs.pod:1688
3298 "This function returns C<NULL> if either no data is found associated with "
3299 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
3304 #: ../src/guestfs.pod:1692
3306 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
3307 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
3308 "all. In particular, libguestfs does I<not> try to free the data when the "
3309 "handle is closed. If the data must be freed, then the caller must either "
3310 "free it before calling L</guestfs_close> or must set up a close callback to "
3311 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
3312 "can be registered for a handle)."
3316 #: ../src/guestfs.pod:1700
3318 "The private data area is implemented using a hash table, and should be "
3319 "reasonably efficient for moderate numbers of keys."
3323 #: ../src/guestfs.pod:1703 ../src/guestfs.pod:1708
3328 #: ../src/guestfs.pod:1705
3330 "<!-- old anchor for the next section --> <a "
3331 "name=\"state_machine_and_low_level_event_api\"/>"
3335 #: ../src/guestfs.pod:1710
3336 msgid "ARCHITECTURE"
3340 #: ../src/guestfs.pod:1712
3342 "Internally, libguestfs is implemented by running an appliance (a special "
3343 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
3344 "process of the main program."
3348 #: ../src/guestfs.pod:1716
3351 " ___________________\n"
3353 " | main program |\n"
3355 " | | child process / appliance\n"
3356 " | | __________________________\n"
3358 " +-------------------+ RPC | +-----------------+ |\n"
3359 " | libguestfs <--------------------> guestfsd | |\n"
3360 " | | | +-----------------+ |\n"
3361 " \\___________________/ | | Linux kernel | |\n"
3362 " | +--^--------------+ |\n"
3363 " \\_________|________________/\n"
3369 " \\______________/\n"
3374 #: ../src/guestfs.pod:1736
3376 "The library, linked to the main program, creates the child process and hence "
3377 "the appliance in the L</guestfs_launch> function."
3381 #: ../src/guestfs.pod:1739
3383 "Inside the appliance is a Linux kernel and a complete stack of userspace "
3384 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
3385 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
3386 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
3387 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
3388 "attached to the qemu process which translates device access by the "
3389 "appliance's Linux kernel into accesses to the image."
3393 #: ../src/guestfs.pod:1748
3395 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
3396 "Although the disk image you are attached to might also be used by some "
3397 "virtual machine, libguestfs doesn't know or care about this. (But you will "
3398 "care if both libguestfs's qemu process and your virtual machine are trying "
3399 "to update the disk image at the same time, since these usually results in "
3400 "massive disk corruption)."
3404 #: ../src/guestfs.pod:1755
3405 msgid "STATE MACHINE"
3409 #: ../src/guestfs.pod:1757
3410 msgid "libguestfs uses a state machine to model the child process:"
3414 #: ../src/guestfs.pod:1759
3426 " / | \\ \\ guestfs_launch\n"
3427 " / | _\\__V______\n"
3429 " / | | LAUNCHING |\n"
3430 " / | \\___________/\n"
3432 " / | guestfs_launch\n"
3434 " ______ / __|____V\n"
3435 " / \\ ------> / \\\n"
3436 " | BUSY | | READY |\n"
3437 " \\______/ <------ \\________/\n"
3442 #: ../src/guestfs.pod:1781
3444 "The normal transitions are (1) CONFIG (when the handle is created, but there "
3445 "is no child process), (2) LAUNCHING (when the child process is booting up), "
3446 "(3) alternating between READY and BUSY as commands are issued to, and "
3447 "carried out by, the child process."
3451 #: ../src/guestfs.pod:1786
3453 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
3454 "asynchronously at any time (eg. due to some internal error), and that causes "
3455 "the state to transition back to CONFIG."
3459 #: ../src/guestfs.pod:1790
3461 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
3462 "issued when in the CONFIG state."
3466 #: ../src/guestfs.pod:1793
3468 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
3469 "L</guestfs_launch> blocks until the child process is READY to accept "
3470 "commands (or until some failure or timeout). L</guestfs_launch> internally "
3471 "moves the state from CONFIG to LAUNCHING while it is running."
3475 #: ../src/guestfs.pod:1799
3477 "API actions such as L</guestfs_mount> can only be issued when in the READY "
3478 "state. These API calls block waiting for the command to be carried out "
3479 "(ie. the state to transition to BUSY and then back to READY). There are no "
3480 "non-blocking versions, and no way to issue more than one command per handle "
3485 #: ../src/guestfs.pod:1805
3487 "Finally, the child process sends asynchronous messages back to the main "
3488 "program, such as kernel log messages. You can register a callback to "
3489 "receive these messages."
3493 #: ../src/guestfs.pod:1809
3498 #: ../src/guestfs.pod:1811
3499 msgid "COMMUNICATION PROTOCOL"
3503 #: ../src/guestfs.pod:1813
3505 "Don't rely on using this protocol directly. This section documents how it "
3506 "currently works, but it may change at any time."
3510 #: ../src/guestfs.pod:1816
3512 "The protocol used to talk between the library and the daemon running inside "
3513 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
3514 "1014, RFC 1832, RFC 4506)."
3518 #: ../src/guestfs.pod:1820
3520 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
3521 "this file is automatically generated)."
3525 #: ../src/guestfs.pod:1823
3527 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
3528 "and C<FileOut> parameters, which are handled with very simple request/reply "
3529 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
3530 "parameters, which use the same request and reply messages, but they may also "
3531 "be followed by files sent using a chunked encoding."
3535 #: ../src/guestfs.pod:1830
3536 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
3540 #: ../src/guestfs.pod:1832
3541 msgid "For ordinary functions, the request message is:"
3545 #: ../src/guestfs.pod:1834
3548 " total length (header + arguments,\n"
3549 " but not including the length word itself)\n"
3550 " struct guestfs_message_header (encoded as XDR)\n"
3551 " struct guestfs_<foo>_args (encoded as XDR)\n"
3556 #: ../src/guestfs.pod:1839
3558 "The total length field allows the daemon to allocate a fixed size buffer "
3559 "into which it slurps the rest of the message. As a result, the total length "
3560 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
3561 "effective size of any request is limited to somewhere under this size."
3565 #: ../src/guestfs.pod:1845
3567 "Note also that many functions don't take any arguments, in which case the "
3568 "C<guestfs_I<foo>_args> is completely omitted."
3572 #: ../src/guestfs.pod:1848
3574 "The header contains the procedure number (C<guestfs_proc>) which is how the "
3575 "receiver knows what type of args structure to expect, or none at all."
3579 #: ../src/guestfs.pod:1852
3580 msgid "The reply message for ordinary functions is:"
3584 #: ../src/guestfs.pod:1854
3587 " total length (header + ret,\n"
3588 " but not including the length word itself)\n"
3589 " struct guestfs_message_header (encoded as XDR)\n"
3590 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3595 #: ../src/guestfs.pod:1859
3597 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
3598 "functions that return no formal return values."
3602 #: ../src/guestfs.pod:1862
3603 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
3607 #: ../src/guestfs.pod:1865
3609 "In the case of an error, a flag is set in the header, and the reply message "
3610 "is slightly changed:"
3614 #: ../src/guestfs.pod:1868
3617 " total length (header + error,\n"
3618 " but not including the length word itself)\n"
3619 " struct guestfs_message_header (encoded as XDR)\n"
3620 " struct guestfs_message_error (encoded as XDR)\n"
3625 #: ../src/guestfs.pod:1873
3627 "The C<guestfs_message_error> structure contains the error message as a "
3632 #: ../src/guestfs.pod:1876
3633 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
3637 #: ../src/guestfs.pod:1878
3639 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
3640 "The normal request message is sent (see above). However this is followed by "
3641 "a sequence of file chunks."
3645 #: ../src/guestfs.pod:1882
3648 " total length (header + arguments,\n"
3649 " but not including the length word itself,\n"
3650 " and not including the chunks)\n"
3651 " struct guestfs_message_header (encoded as XDR)\n"
3652 " struct guestfs_<foo>_args (encoded as XDR)\n"
3653 " sequence of chunks for FileIn param #0\n"
3654 " sequence of chunks for FileIn param #1 etc.\n"
3659 #: ../src/guestfs.pod:1890
3660 msgid "The \"sequence of chunks\" is:"
3664 #: ../src/guestfs.pod:1892
3667 " length of chunk (not including length word itself)\n"
3668 " struct guestfs_chunk (encoded as XDR)\n"
3669 " length of chunk\n"
3670 " struct guestfs_chunk (encoded as XDR)\n"
3672 " length of chunk\n"
3673 " struct guestfs_chunk (with data.data_len == 0)\n"
3678 #: ../src/guestfs.pod:1900
3680 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
3681 "is set in the final chunk to indicate either successful completion or early "
3686 #: ../src/guestfs.pod:1904
3688 "At time of writing there are no functions that have more than one FileIn "
3689 "parameter. However this is (theoretically) supported, by sending the "
3690 "sequence of chunks for each FileIn parameter one after another (from left to "
3695 #: ../src/guestfs.pod:1909
3697 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
3698 "transfer. The library does this by sending a chunk with a special flag set "
3699 "to indicate cancellation. When the daemon sees this, it cancels the whole "
3700 "RPC, does I<not> send any reply, and goes back to reading the next request."
3704 #: ../src/guestfs.pod:1915
3706 "The daemon may also cancel. It does this by writing a special word "
3707 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
3708 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
3709 "cancel chunk). The special word is chosen so that even if cancellation "
3710 "happens right at the end of the transfer (after the library has finished "
3711 "writing and has started listening for the reply), the \"spurious\" cancel "
3712 "flag will not be confused with the reply message."
3716 #: ../src/guestfs.pod:1924
3718 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
3719 "limit), and also files where the size is not known in advance (eg. from "
3720 "pipes or sockets). However the chunks are rather small "
3721 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
3722 "to keep much in memory."
3726 #: ../src/guestfs.pod:1930
3727 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
3731 #: ../src/guestfs.pod:1932
3733 "The protocol for FileOut parameters is exactly the same as for FileIn "
3734 "parameters, but with the roles of daemon and library reversed."
3738 #: ../src/guestfs.pod:1935
3741 " total length (header + ret,\n"
3742 " but not including the length word itself,\n"
3743 " and not including the chunks)\n"
3744 " struct guestfs_message_header (encoded as XDR)\n"
3745 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3746 " sequence of chunks for FileOut param #0\n"
3747 " sequence of chunks for FileOut param #1 etc.\n"
3752 #: ../src/guestfs.pod:1943
3753 msgid "INITIAL MESSAGE"
3757 #: ../src/guestfs.pod:1945
3759 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
3760 "which indicates that the guest and daemon is alive. This is what "
3761 "L</guestfs_launch> waits for."
3765 #: ../src/guestfs.pod:1949
3766 msgid "PROGRESS NOTIFICATION MESSAGES"
3770 #: ../src/guestfs.pod:1951
3772 "The daemon may send progress notification messages at any time. These are "
3773 "distinguished by the normal length word being replaced by "
3774 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
3778 #: ../src/guestfs.pod:1955
3780 "The library turns them into progress callbacks (see "
3781 "C<guestfs_set_progress_callback>) if there is a callback registered, or "
3782 "discards them if not."
3786 #: ../src/guestfs.pod:1959
3788 "The daemon self-limits the frequency of progress messages it sends (see "
3789 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
3794 #: ../src/guestfs.pod:1963
3795 msgid "LIBGUESTFS VERSION NUMBERS"
3799 #: ../src/guestfs.pod:1965
3801 "Since April 2010, libguestfs has started to make separate development and "
3802 "stable releases, along with corresponding branches in our git repository. "
3803 "These separate releases can be identified by version number:"
3807 #: ../src/guestfs.pod:1970
3810 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3811 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3817 " | `-------- sub-version\n"
3819 " `------ always '1' because we don't change the ABI\n"
3824 #: ../src/guestfs.pod:1981
3825 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3829 #: ../src/guestfs.pod:1983
3831 "As time passes we cherry pick fixes from the development branch and backport "
3832 "those into the stable branch, the effect being that the stable branch should "
3833 "get more stable and less buggy over time. So the stable releases are ideal "
3834 "for people who don't need new features but would just like the software to "
3839 #: ../src/guestfs.pod:1989
3840 msgid "Our criteria for backporting changes are:"
3844 #: ../src/guestfs.pod:1995
3846 "Documentation changes which don't affect any code are backported unless the "
3847 "documentation refers to a future feature which is not in stable."
3851 #: ../src/guestfs.pod:2001
3853 "Bug fixes which are not controversial, fix obvious problems, and have been "
3854 "well tested are backported."
3858 #: ../src/guestfs.pod:2006
3860 "Simple rearrangements of code which shouldn't affect how it works get "
3861 "backported. This is so that the code in the two branches doesn't get too "
3862 "far out of step, allowing us to backport future fixes more easily."
3866 #: ../src/guestfs.pod:2012
3868 "We I<don't> backport new features, new APIs, new tools etc, except in one "
3869 "exceptional case: the new feature is required in order to implement an "
3870 "important bug fix."
3874 #: ../src/guestfs.pod:2018
3876 "A new stable branch starts when we think the new features in development are "
3877 "substantial and compelling enough over the current stable branch to warrant "
3878 "it. When that happens we create new stable and development versions 1.N.0 "
3879 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
3880 "stable at this point, but by backporting fixes from development, that branch "
3881 "will stabilize over time."
3885 #: ../src/guestfs.pod:2026 ../fish/guestfish.pod:914 ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:330 ../tools/virt-rescue.pl:255
3886 msgid "ENVIRONMENT VARIABLES"
3890 #: ../src/guestfs.pod:2030 ../fish/guestfish.pod:940
3891 msgid "LIBGUESTFS_APPEND"
3895 #: ../src/guestfs.pod:2032 ../fish/guestfish.pod:942
3896 msgid "Pass additional options to the guest kernel."
3900 #: ../src/guestfs.pod:2034 ../fish/guestfish.pod:944
3901 msgid "LIBGUESTFS_DEBUG"
3905 #: ../src/guestfs.pod:2036
3907 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
3908 "effect as calling C<guestfs_set_verbose (g, 1)>."
3912 #: ../src/guestfs.pod:2039 ../fish/guestfish.pod:949
3913 msgid "LIBGUESTFS_MEMSIZE"
3917 #: ../src/guestfs.pod:2041 ../fish/guestfish.pod:951
3918 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
3922 #: ../src/guestfs.pod:2044 ../fish/guestfish.pod:954
3925 " LIBGUESTFS_MEMSIZE=700\n"
3930 #: ../src/guestfs.pod:2046 ../fish/guestfish.pod:956
3931 msgid "LIBGUESTFS_PATH"
3935 #: ../src/guestfs.pod:2048
3937 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
3938 "the discussion of paths in section PATH above."
3942 #: ../src/guestfs.pod:2051 ../fish/guestfish.pod:961
3943 msgid "LIBGUESTFS_QEMU"
3947 #: ../src/guestfs.pod:2053 ../fish/guestfish.pod:963
3949 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
3950 "which was found at compile time by the configure script is used."
3954 #: ../src/guestfs.pod:2057
3955 msgid "See also L</QEMU WRAPPERS> above."
3959 #: ../src/guestfs.pod:2059 ../fish/guestfish.pod:967
3960 msgid "LIBGUESTFS_TRACE"
3964 #: ../src/guestfs.pod:2061
3966 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
3967 "effect as calling C<guestfs_set_trace (g, 1)>."
3971 #: ../src/guestfs.pod:2064 ../fish/guestfish.pod:976
3976 #: ../src/guestfs.pod:2066 ../fish/guestfish.pod:978
3977 msgid "Location of temporary directory, defaults to C</tmp>."
3981 #: ../src/guestfs.pod:2068 ../fish/guestfish.pod:980
3983 "If libguestfs was compiled to use the supermin appliance then the real "
3984 "appliance is cached in this directory, shared between all handles belonging "
3985 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
3986 "use in case C</tmp> is not large enough."
3990 #: ../src/guestfs.pod:2076 ../fish/guestfish.pod:1038 ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:233 ../inspector/virt-inspector.pl:452 ../tools/virt-edit.pl:350 ../tools/virt-win-reg.pl:484 ../tools/virt-df.pl:640 ../tools/virt-ls.pl:232 ../tools/virt-resize.pl:1486 ../tools/virt-list-filesystems.pl:186 ../tools/virt-tar.pl:281 ../tools/virt-rescue.pl:267 ../tools/virt-make-fs.pl:534 ../tools/virt-list-partitions.pl:254
3995 #: ../src/guestfs.pod:2078
3997 "L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
3998 "L<virt-edit(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
3999 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
4000 "L<virt-rescue(1)>, L<virt-tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
4001 "L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
4005 #: ../src/guestfs.pod:2096
4007 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
4008 "L<lvm(8)>, L<disktype(1)>."
4012 #: ../src/guestfs.pod:2103 ../tools/virt-win-reg.pl:499 ../tools/virt-make-fs.pl:548
4017 #: ../src/guestfs.pod:2105
4018 msgid "To get a list of bugs against libguestfs use this link:"
4022 #: ../src/guestfs.pod:2107
4023 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
4027 #: ../src/guestfs.pod:2109
4028 msgid "To report a new bug against libguestfs use this link:"
4032 #: ../src/guestfs.pod:2111
4033 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
4037 #: ../src/guestfs.pod:2113
4038 msgid "When reporting a bug, please check:"
4042 #: ../src/guestfs.pod:2119
4043 msgid "That the bug hasn't been reported already."
4047 #: ../src/guestfs.pod:2123
4048 msgid "That you are testing a recent version."
4052 #: ../src/guestfs.pod:2127
4053 msgid "Describe the bug accurately, and give a way to reproduce it."
4057 #: ../src/guestfs.pod:2131
4059 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
4064 #: ../src/guestfs.pod:2136 ../fish/guestfish.pod:1055 ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:244 ../inspector/virt-inspector.pl:462
4069 #: ../src/guestfs.pod:2138 ../fish/guestfish.pod:1057 ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:246
4070 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4074 #: ../src/guestfs.pod:2140 ../fish/guestfish.pod:1059 ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:248 ../inspector/virt-inspector.pl:476 ../tools/virt-edit.pl:366 ../tools/virt-win-reg.pl:514 ../tools/virt-df.pl:653 ../tools/virt-ls.pl:247 ../tools/virt-resize.pl:1512 ../tools/virt-list-filesystems.pl:202 ../tools/virt-tar.pl:296 ../tools/virt-rescue.pl:281 ../tools/virt-make-fs.pl:563 ../tools/virt-list-partitions.pl:269
4079 #: ../src/guestfs.pod:2142 ../fish/guestfish.pod:1061 ../fuse/guestmount.pod:250
4080 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
4084 #: ../src/guestfs.pod:2145
4086 "This library is free software; you can redistribute it and/or modify it "
4087 "under the terms of the GNU Lesser General Public License as published by the "
4088 "Free Software Foundation; either version 2 of the License, or (at your "
4089 "option) any later version."
4093 #: ../src/guestfs.pod:2150
4095 "This library is distributed in the hope that it will be useful, but WITHOUT "
4096 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
4097 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
4102 #: ../src/guestfs.pod:2155
4104 "You should have received a copy of the GNU Lesser General Public License "
4105 "along with this library; if not, write to the Free Software Foundation, "
4106 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
4110 #: ../src/guestfs-actions.pod:1
4111 msgid "guestfs_add_cdrom"
4115 #: ../src/guestfs-actions.pod:3
4119 " guestfs_add_cdrom (guestfs_h *g,\n"
4120 " const char *filename);\n"
4125 #: ../src/guestfs-actions.pod:7 ../fish/guestfish-actions.pod:5
4126 msgid "This function adds a virtual CD-ROM disk image to the guest."
4130 #: ../src/guestfs-actions.pod:9 ../fish/guestfish-actions.pod:7
4131 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
4135 #: ../src/guestfs-actions.pod:17
4137 "This call checks for the existence of C<filename>. This stops you from "
4138 "specifying other types of drive which are supported by qemu such as C<nbd:> "
4139 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
4144 #: ../src/guestfs-actions.pod:24
4146 "If you just want to add an ISO file (often you use this as an efficient way "
4147 "to transfer large files into the guest), then you should probably use "
4148 "C<guestfs_add_drive_ro> instead."
4152 #: ../src/guestfs-actions.pod:30 ../src/guestfs-actions.pod:126 ../src/guestfs-actions.pod:187 ../src/guestfs-actions.pod:224 ../src/guestfs-actions.pod:238 ../src/guestfs-actions.pod:259 ../src/guestfs-actions.pod:279 ../src/guestfs-actions.pod:293 ../src/guestfs-actions.pod:408 ../src/guestfs-actions.pod:428 ../src/guestfs-actions.pod:442 ../src/guestfs-actions.pod:487 ../src/guestfs-actions.pod:515 ../src/guestfs-actions.pod:533 ../src/guestfs-actions.pod:600 ../src/guestfs-actions.pod:633 ../src/guestfs-actions.pod:647 ../src/guestfs-actions.pod:662 ../src/guestfs-actions.pod:761 ../src/guestfs-actions.pod:779 ../src/guestfs-actions.pod:793 ../src/guestfs-actions.pod:807 ../src/guestfs-actions.pod:968 ../src/guestfs-actions.pod:988 ../src/guestfs-actions.pod:1006 ../src/guestfs-actions.pod:1090 ../src/guestfs-actions.pod:1108 ../src/guestfs-actions.pod:1127 ../src/guestfs-actions.pod:1141 ../src/guestfs-actions.pod:1161 ../src/guestfs-actions.pod:1231 ../src/guestfs-actions.pod:1262 ../src/guestfs-actions.pod:1287 ../src/guestfs-actions.pod:1324 ../src/guestfs-actions.pod:1430 ../src/guestfs-actions.pod:1464 ../src/guestfs-actions.pod:1682 ../src/guestfs-actions.pod:1704 ../src/guestfs-actions.pod:1791 ../src/guestfs-actions.pod:2213 ../src/guestfs-actions.pod:2357 ../src/guestfs-actions.pod:2418 ../src/guestfs-actions.pod:2453 ../src/guestfs-actions.pod:3162 ../src/guestfs-actions.pod:3177 ../src/guestfs-actions.pod:3197 ../src/guestfs-actions.pod:3322 ../src/guestfs-actions.pod:3336 ../src/guestfs-actions.pod:3349 ../src/guestfs-actions.pod:3363 ../src/guestfs-actions.pod:3378 ../src/guestfs-actions.pod:3414 ../src/guestfs-actions.pod:3486 ../src/guestfs-actions.pod:3506 ../src/guestfs-actions.pod:3523 ../src/guestfs-actions.pod:3546 ../src/guestfs-actions.pod:3569 ../src/guestfs-actions.pod:3601 ../src/guestfs-actions.pod:3620 ../src/guestfs-actions.pod:3639 ../src/guestfs-actions.pod:3674 ../src/guestfs-actions.pod:3686 ../src/guestfs-actions.pod:3722 ../src/guestfs-actions.pod:3738 ../src/guestfs-actions.pod:3751 ../src/guestfs-actions.pod:3766 ../src/guestfs-actions.pod:3783 ../src/guestfs-actions.pod:3876 ../src/guestfs-actions.pod:3896 ../src/guestfs-actions.pod:3909 ../src/guestfs-actions.pod:3960 ../src/guestfs-actions.pod:3978 ../src/guestfs-actions.pod:3996 ../src/guestfs-actions.pod:4012 ../src/guestfs-actions.pod:4026 ../src/guestfs-actions.pod:4040 ../src/guestfs-actions.pod:4057 ../src/guestfs-actions.pod:4072 ../src/guestfs-actions.pod:4092 ../src/guestfs-actions.pod:4141 ../src/guestfs-actions.pod:4172 ../src/guestfs-actions.pod:4191 ../src/guestfs-actions.pod:4210 ../src/guestfs-actions.pod:4222 ../src/guestfs-actions.pod:4239 ../src/guestfs-actions.pod:4252 ../src/guestfs-actions.pod:4267 ../src/guestfs-actions.pod:4282 ../src/guestfs-actions.pod:4317 ../src/guestfs-actions.pod:4332 ../src/guestfs-actions.pod:4352 ../src/guestfs-actions.pod:4366 ../src/guestfs-actions.pod:4383 ../src/guestfs-actions.pod:4432 ../src/guestfs-actions.pod:4469 ../src/guestfs-actions.pod:4483 ../src/guestfs-actions.pod:4511 ../src/guestfs-actions.pod:4528 ../src/guestfs-actions.pod:4546 ../src/guestfs-actions.pod:4680 ../src/guestfs-actions.pod:4737 ../src/guestfs-actions.pod:4759 ../src/guestfs-actions.pod:4777 ../src/guestfs-actions.pod:4809 ../src/guestfs-actions.pod:4875 ../src/guestfs-actions.pod:4892 ../src/guestfs-actions.pod:4905 ../src/guestfs-actions.pod:4919 ../src/guestfs-actions.pod:5208 ../src/guestfs-actions.pod:5227 ../src/guestfs-actions.pod:5241 ../src/guestfs-actions.pod:5253 ../src/guestfs-actions.pod:5267 ../src/guestfs-actions.pod:5279 ../src/guestfs-actions.pod:5293 ../src/guestfs-actions.pod:5309 ../src/guestfs-actions.pod:5330 ../src/guestfs-actions.pod:5349 ../src/guestfs-actions.pod:5368 ../src/guestfs-actions.pod:5386 ../src/guestfs-actions.pod:5409 ../src/guestfs-actions.pod:5427 ../src/guestfs-actions.pod:5446 ../src/guestfs-actions.pod:5467 ../src/guestfs-actions.pod:5486 ../src/guestfs-actions.pod:5503 ../src/guestfs-actions.pod:5531 ../src/guestfs-actions.pod:5555 ../src/guestfs-actions.pod:5574 ../src/guestfs-actions.pod:5598 ../src/guestfs-actions.pod:5613 ../src/guestfs-actions.pod:5628 ../src/guestfs-actions.pod:5647 ../src/guestfs-actions.pod:5684 ../src/guestfs-actions.pod:5707 ../src/guestfs-actions.pod:5733 ../src/guestfs-actions.pod:5841 ../src/guestfs-actions.pod:5962 ../src/guestfs-actions.pod:5974 ../src/guestfs-actions.pod:5987 ../src/guestfs-actions.pod:6000 ../src/guestfs-actions.pod:6022 ../src/guestfs-actions.pod:6035 ../src/guestfs-actions.pod:6048 ../src/guestfs-actions.pod:6061 ../src/guestfs-actions.pod:6076 ../src/guestfs-actions.pod:6135 ../src/guestfs-actions.pod:6152 ../src/guestfs-actions.pod:6168 ../src/guestfs-actions.pod:6184 ../src/guestfs-actions.pod:6201 ../src/guestfs-actions.pod:6214 ../src/guestfs-actions.pod:6234 ../src/guestfs-actions.pod:6270 ../src/guestfs-actions.pod:6284 ../src/guestfs-actions.pod:6325 ../src/guestfs-actions.pod:6338 ../src/guestfs-actions.pod:6356 ../src/guestfs-actions.pod:6385 ../src/guestfs-actions.pod:6416 ../src/guestfs-actions.pod:6535 ../src/guestfs-actions.pod:6553 ../src/guestfs-actions.pod:6567 ../src/guestfs-actions.pod:6622 ../src/guestfs-actions.pod:6635 ../src/guestfs-actions.pod:6680 ../src/guestfs-actions.pod:6713 ../src/guestfs-actions.pod:6767 ../src/guestfs-actions.pod:6793 ../src/guestfs-actions.pod:6859 ../src/guestfs-actions.pod:6878 ../src/guestfs-actions.pod:6907
4153 msgid "This function returns 0 on success or -1 on error."
4157 #: ../src/guestfs-actions.pod:32 ../src/guestfs-actions.pod:240 ../src/guestfs-actions.pod:261 ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:153 ../fish/guestfish-actions.pod:167
4159 "This function is deprecated. In new code, use the C<add_drive_opts> call "
4164 #: ../src/guestfs-actions.pod:35 ../src/guestfs-actions.pod:243 ../src/guestfs-actions.pod:264 ../src/guestfs-actions.pod:1435 ../src/guestfs-actions.pod:1921 ../src/guestfs-actions.pod:1942 ../src/guestfs-actions.pod:6801 ../src/guestfs-actions.pod:6970 ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:156 ../fish/guestfish-actions.pod:170 ../fish/guestfish-actions.pod:951 ../fish/guestfish-actions.pod:1308 ../fish/guestfish-actions.pod:1322 ../fish/guestfish-actions.pod:4534 ../fish/guestfish-actions.pod:4631
4166 "Deprecated functions will not be removed from the API, but the fact that "
4167 "they are deprecated indicates that there are problems with correct use of "
4172 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:128 ../src/guestfs-actions.pod:1092 ../src/guestfs-actions.pod:1893 ../src/guestfs-actions.pod:1991 ../src/guestfs-actions.pod:2094 ../src/guestfs-actions.pod:3164 ../src/guestfs-actions.pod:3179 ../src/guestfs-actions.pod:4319 ../src/guestfs-actions.pod:5388 ../src/guestfs-actions.pod:5505 ../src/guestfs-actions.pod:5615 ../src/guestfs-actions.pod:6078 ../src/guestfs-actions.pod:6203 ../src/guestfs-actions.pod:6715
4173 msgid "(Added in 0.3)"
4177 #: ../src/guestfs-actions.pod:41
4178 msgid "guestfs_add_domain"
4182 #: ../src/guestfs-actions.pod:43
4186 " guestfs_add_domain (guestfs_h *g,\n"
4187 " const char *dom,\n"
4193 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:137
4195 "You may supply a list of optional arguments to this call. Use zero or more "
4196 "of the following pairs of parameters, and terminate the list with C<-1> on "
4197 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
4201 #: ../src/guestfs-actions.pod:53
4204 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
4205 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
4206 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
4211 #: ../src/guestfs-actions.pod:57
4213 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
4214 "It works by connecting to libvirt, requesting the domain and domain XML from "
4215 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
4220 #: ../src/guestfs-actions.pod:62 ../fish/guestfish-actions.pod:46
4222 "The number of disks added is returned. This operation is atomic: if an "
4223 "error is returned, then no disks are added."
4227 #: ../src/guestfs-actions.pod:65 ../fish/guestfish-actions.pod:49
4229 "This function does some minimal checks to make sure the libvirt domain is "
4230 "not running (unless C<readonly> is true). In a future version we will try "
4231 "to acquire the libvirt lock on each disk."
4235 #: ../src/guestfs-actions.pod:69 ../fish/guestfish-actions.pod:53
4237 "Disks must be accessible locally. This often means that adding disks from a "
4238 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
4239 "unless those disks are accessible via the same device path locally too."
4243 #: ../src/guestfs-actions.pod:74
4245 "The optional C<libvirturi> parameter sets the libvirt URI (see "
4246 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
4247 "default libvirt URI (or one set through an environment variable, see the "
4248 "libvirt documentation for full details). If you are using the C API "
4249 "directly then it is more flexible to create the libvirt connection object "
4250 "yourself, get the domain object, and call C<guestfs_add_libvirt_dom>."
4254 #: ../src/guestfs-actions.pod:82
4256 "The other optional parameters are passed directly through to "
4257 "C<guestfs_add_drive_opts>."
4261 #: ../src/guestfs-actions.pod:85 ../src/guestfs-actions.pod:336 ../src/guestfs-actions.pod:501 ../src/guestfs-actions.pod:679 ../src/guestfs-actions.pod:710 ../src/guestfs-actions.pod:728 ../src/guestfs-actions.pod:747 ../src/guestfs-actions.pod:1307 ../src/guestfs-actions.pod:1661 ../src/guestfs-actions.pod:1864 ../src/guestfs-actions.pod:1963 ../src/guestfs-actions.pod:2003 ../src/guestfs-actions.pod:2058 ../src/guestfs-actions.pod:2081 ../src/guestfs-actions.pod:2344 ../src/guestfs-actions.pod:2610 ../src/guestfs-actions.pod:2631 ../src/guestfs-actions.pod:4455 ../src/guestfs-actions.pod:4583 ../src/guestfs-actions.pod:4989 ../src/guestfs-actions.pod:5015 ../src/guestfs-actions.pod:6311 ../src/guestfs-actions.pod:6726 ../src/guestfs-actions.pod:6739 ../src/guestfs-actions.pod:6752
4262 msgid "On error this function returns -1."
4266 #: ../src/guestfs-actions.pod:87
4267 msgid "guestfs_add_domain_va"
4271 #: ../src/guestfs-actions.pod:89
4275 " guestfs_add_domain_va (guestfs_h *g,\n"
4276 " const char *dom,\n"
4282 #: ../src/guestfs-actions.pod:94
4283 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
4287 #: ../src/guestfs-actions.pod:96 ../src/guestfs-actions.pod:107 ../src/guestfs-actions.pod:200 ../src/guestfs-actions.pod:211
4288 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
4292 #: ../src/guestfs-actions.pod:98
4293 msgid "guestfs_add_domain_argv"
4297 #: ../src/guestfs-actions.pod:100
4301 " guestfs_add_domain_argv (guestfs_h *g,\n"
4302 " const char *dom,\n"
4303 " const struct guestfs_add_domain_argv *optargs);\n"
4308 #: ../src/guestfs-actions.pod:105
4309 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
4313 #: ../src/guestfs-actions.pod:109
4314 msgid "guestfs_add_drive"
4318 #: ../src/guestfs-actions.pod:111
4322 " guestfs_add_drive (guestfs_h *g,\n"
4323 " const char *filename);\n"
4328 #: ../src/guestfs-actions.pod:115
4330 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
4331 "optional parameters, so the disk is added writable, with the format being "
4332 "detected automatically."
4336 #: ../src/guestfs-actions.pod:119
4338 "Automatic detection of the format opens you up to a potential security hole "
4339 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4340 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
4341 "you should think about replacing calls to this function with calls to "
4342 "C<guestfs_add_drive_opts>, and specifying the format."
4346 #: ../src/guestfs-actions.pod:130
4347 msgid "guestfs_add_drive_opts"
4351 #: ../src/guestfs-actions.pod:132
4355 " guestfs_add_drive_opts (guestfs_h *g,\n"
4356 " const char *filename,\n"
4362 #: ../src/guestfs-actions.pod:142
4365 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
4366 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
4367 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
4372 #: ../src/guestfs-actions.pod:146 ../fish/guestfish-actions.pod:92
4374 "This function adds a virtual machine disk image C<filename> to libguestfs. "
4375 "The first time you call this function, the disk appears as C</dev/sda>, the "
4376 "second time as C</dev/sdb>, and so on."
4380 #: ../src/guestfs-actions.pod:151 ../fish/guestfish-actions.pod:97
4382 "You don't necessarily need to be root when using libguestfs. However you "
4383 "obviously do need sufficient permissions to access the filename for whatever "
4384 "operations you want to perform (ie. read access if you just want to read the "
4385 "image or write access if you want to modify the image)."
4389 #: ../src/guestfs-actions.pod:157 ../fish/guestfish-actions.pod:103
4390 msgid "This call checks that C<filename> exists."
4394 #: ../src/guestfs-actions.pod:159 ../fish/guestfish-actions.pod:105
4395 msgid "The optional arguments are:"
4399 #: ../src/guestfs-actions.pod:163 ../fish/guestfish-actions.pod:109
4404 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:111
4406 "If true then the image is treated as read-only. Writes are still allowed, "
4407 "but they are stored in a temporary snapshot overlay which is discarded at "
4408 "the end. The disk that you add is not modified."
4412 #: ../src/guestfs-actions.pod:169 ../fish/guestfish-actions.pod:115
4417 #: ../src/guestfs-actions.pod:171
4419 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
4420 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
4421 "Possible formats include C<raw> and C<qcow2>."
4425 #: ../src/guestfs-actions.pod:175 ../fish/guestfish-actions.pod:121
4427 "Automatic detection of the format opens you up to a potential security hole "
4428 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4429 "RHBZ#642934. Specifying the format closes this security hole."
4433 #: ../src/guestfs-actions.pod:180 ../fish/guestfish-actions.pod:126
4438 #: ../src/guestfs-actions.pod:182
4440 "This rarely-used option lets you emulate the behaviour of the deprecated "
4441 "C<guestfs_add_drive_with_if> call (q.v.)"
4445 #: ../src/guestfs-actions.pod:189
4446 msgid "(Added in 1.5.23)"
4450 #: ../src/guestfs-actions.pod:191
4451 msgid "guestfs_add_drive_opts_va"
4455 #: ../src/guestfs-actions.pod:193
4459 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
4460 " const char *filename,\n"
4466 #: ../src/guestfs-actions.pod:198
4467 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
4471 #: ../src/guestfs-actions.pod:202
4472 msgid "guestfs_add_drive_opts_argv"
4476 #: ../src/guestfs-actions.pod:204
4480 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
4481 " const char *filename,\n"
4482 " const struct guestfs_add_drive_opts_argv "
4488 #: ../src/guestfs-actions.pod:209
4489 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
4493 #: ../src/guestfs-actions.pod:213
4494 msgid "guestfs_add_drive_ro"
4498 #: ../src/guestfs-actions.pod:215
4502 " guestfs_add_drive_ro (guestfs_h *g,\n"
4503 " const char *filename);\n"
4508 #: ../src/guestfs-actions.pod:219
4510 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
4511 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
4512 "disk is added read-only, with the format being detected automatically."
4516 #: ../src/guestfs-actions.pod:226
4517 msgid "(Added in 1.0.38)"
4521 #: ../src/guestfs-actions.pod:228
4522 msgid "guestfs_add_drive_ro_with_if"
4526 #: ../src/guestfs-actions.pod:230
4530 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
4531 " const char *filename,\n"
4532 " const char *iface);\n"
4537 #: ../src/guestfs-actions.pod:235
4539 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
4540 "QEMU interface emulation to use at run time."
4544 #: ../src/guestfs-actions.pod:247 ../src/guestfs-actions.pod:268 ../src/guestfs-actions.pod:2303
4545 msgid "(Added in 1.0.84)"
4549 #: ../src/guestfs-actions.pod:249
4550 msgid "guestfs_add_drive_with_if"
4554 #: ../src/guestfs-actions.pod:251
4558 " guestfs_add_drive_with_if (guestfs_h *g,\n"
4559 " const char *filename,\n"
4560 " const char *iface);\n"
4565 #: ../src/guestfs-actions.pod:256
4567 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
4568 "QEMU interface emulation to use at run time."
4572 #: ../src/guestfs-actions.pod:270
4573 msgid "guestfs_aug_clear"
4577 #: ../src/guestfs-actions.pod:272
4581 " guestfs_aug_clear (guestfs_h *g,\n"
4582 " const char *augpath);\n"
4587 #: ../src/guestfs-actions.pod:276 ../fish/guestfish-actions.pod:178
4589 "Set the value associated with C<path> to C<NULL>. This is the same as the "
4590 "L<augtool(1)> C<clear> command."
4594 #: ../src/guestfs-actions.pod:281 ../src/guestfs-actions.pod:2083
4595 msgid "(Added in 1.3.4)"
4599 #: ../src/guestfs-actions.pod:283
4600 msgid "guestfs_aug_close"
4604 #: ../src/guestfs-actions.pod:285
4608 " guestfs_aug_close (guestfs_h *g);\n"
4613 #: ../src/guestfs-actions.pod:288
4615 "Close the current Augeas handle and free up any resources used by it. After "
4616 "calling this, you have to call C<guestfs_aug_init> again before you can use "
4617 "any other Augeas functions."
4621 #: ../src/guestfs-actions.pod:295 ../src/guestfs-actions.pod:320 ../src/guestfs-actions.pod:338 ../src/guestfs-actions.pod:352 ../src/guestfs-actions.pod:410 ../src/guestfs-actions.pod:430 ../src/guestfs-actions.pod:444 ../src/guestfs-actions.pod:475 ../src/guestfs-actions.pod:489 ../src/guestfs-actions.pod:503 ../src/guestfs-actions.pod:517 ../src/guestfs-actions.pod:535 ../src/guestfs-actions.pod:5066
4622 msgid "(Added in 0.7)"
4626 #: ../src/guestfs-actions.pod:297
4627 msgid "guestfs_aug_defnode"
4631 #: ../src/guestfs-actions.pod:299
4634 " struct guestfs_int_bool *\n"
4635 " guestfs_aug_defnode (guestfs_h *g,\n"
4636 " const char *name,\n"
4637 " const char *expr,\n"
4638 " const char *val);\n"
4643 #: ../src/guestfs-actions.pod:305 ../fish/guestfish-actions.pod:194
4644 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
4648 #: ../src/guestfs-actions.pod:308
4650 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
4651 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
4652 "containing that single node."
4656 #: ../src/guestfs-actions.pod:312 ../fish/guestfish-actions.pod:201
4658 "On success this returns a pair containing the number of nodes in the "
4659 "nodeset, and a boolean flag if a node was created."
4663 #: ../src/guestfs-actions.pod:316
4665 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
4666 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
4670 #: ../src/guestfs-actions.pod:322
4671 msgid "guestfs_aug_defvar"
4675 #: ../src/guestfs-actions.pod:324
4679 " guestfs_aug_defvar (guestfs_h *g,\n"
4680 " const char *name,\n"
4681 " const char *expr);\n"
4686 #: ../src/guestfs-actions.pod:329 ../fish/guestfish-actions.pod:209
4688 "Defines an Augeas variable C<name> whose value is the result of evaluating "
4689 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
4693 #: ../src/guestfs-actions.pod:333 ../fish/guestfish-actions.pod:213
4695 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
4696 "evaluates to something which is not a nodeset."
4700 #: ../src/guestfs-actions.pod:340
4701 msgid "guestfs_aug_get"
4705 #: ../src/guestfs-actions.pod:342
4709 " guestfs_aug_get (guestfs_h *g,\n"
4710 " const char *augpath);\n"
4715 #: ../src/guestfs-actions.pod:346 ../fish/guestfish-actions.pod:220
4717 "Look up the value associated with C<path>. If C<path> matches exactly one "
4718 "node, the C<value> is returned."
4722 #: ../src/guestfs-actions.pod:349 ../src/guestfs-actions.pod:849 ../src/guestfs-actions.pod:867 ../src/guestfs-actions.pod:927 ../src/guestfs-actions.pod:943 ../src/guestfs-actions.pod:1046 ../src/guestfs-actions.pod:1176 ../src/guestfs-actions.pod:1193 ../src/guestfs-actions.pod:1212 ../src/guestfs-actions.pod:1341 ../src/guestfs-actions.pod:1532 ../src/guestfs-actions.pod:1644 ../src/guestfs-actions.pod:1807 ../src/guestfs-actions.pod:1824 ../src/guestfs-actions.pod:1915 ../src/guestfs-actions.pod:1936 ../src/guestfs-actions.pod:2106 ../src/guestfs-actions.pod:2268 ../src/guestfs-actions.pod:2475 ../src/guestfs-actions.pod:2556 ../src/guestfs-actions.pod:2692 ../src/guestfs-actions.pod:2721 ../src/guestfs-actions.pod:2743 ../src/guestfs-actions.pod:2803 ../src/guestfs-actions.pod:2826 ../src/guestfs-actions.pod:3308 ../src/guestfs-actions.pod:3658 ../src/guestfs-actions.pod:3828 ../src/guestfs-actions.pod:3938 ../src/guestfs-actions.pod:4601 ../src/guestfs-actions.pod:4794 ../src/guestfs-actions.pod:4964 ../src/guestfs-actions.pod:5142 ../src/guestfs-actions.pod:5191 ../src/guestfs-actions.pod:5754 ../src/guestfs-actions.pod:5770 ../src/guestfs-actions.pod:5787 ../src/guestfs-actions.pod:5811 ../src/guestfs-actions.pod:6475 ../src/guestfs-actions.pod:6494 ../src/guestfs-actions.pod:6512 ../src/guestfs-actions.pod:6692 ../src/guestfs-actions.pod:6964
4724 "This function returns a string, or NULL on error. I<The caller must free "
4725 "the returned string after use>."
4729 #: ../src/guestfs-actions.pod:354
4730 msgid "guestfs_aug_init"
4734 #: ../src/guestfs-actions.pod:356
4738 " guestfs_aug_init (guestfs_h *g,\n"
4739 " const char *root,\n"
4745 #: ../src/guestfs-actions.pod:361 ../fish/guestfish-actions.pod:227
4747 "Create a new Augeas handle for editing configuration files. If there was "
4748 "any previous Augeas handle associated with this guestfs session, then it is "
4753 #: ../src/guestfs-actions.pod:365
4754 msgid "You must call this before using any other C<guestfs_aug_*> commands."
4758 #: ../src/guestfs-actions.pod:368 ../fish/guestfish-actions.pod:234
4759 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
4763 #: ../src/guestfs-actions.pod:371 ../fish/guestfish-actions.pod:237
4765 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
4766 "logical I<or> of the following integers:"
4770 #: ../src/guestfs-actions.pod:377 ../fish/guestfish-actions.pod:243
4771 msgid "C<AUG_SAVE_BACKUP> = 1"
4775 #: ../src/guestfs-actions.pod:379 ../fish/guestfish-actions.pod:245
4776 msgid "Keep the original file with a C<.augsave> extension."
4780 #: ../src/guestfs-actions.pod:381 ../fish/guestfish-actions.pod:247
4781 msgid "C<AUG_SAVE_NEWFILE> = 2"
4785 #: ../src/guestfs-actions.pod:383 ../fish/guestfish-actions.pod:249
4787 "Save changes into a file with extension C<.augnew>, and do not overwrite "
4788 "original. Overrides C<AUG_SAVE_BACKUP>."
4792 #: ../src/guestfs-actions.pod:386 ../fish/guestfish-actions.pod:252
4793 msgid "C<AUG_TYPE_CHECK> = 4"
4797 #: ../src/guestfs-actions.pod:388 ../fish/guestfish-actions.pod:254
4798 msgid "Typecheck lenses (can be expensive)."
4802 #: ../src/guestfs-actions.pod:390 ../fish/guestfish-actions.pod:256
4803 msgid "C<AUG_NO_STDINC> = 8"
4807 #: ../src/guestfs-actions.pod:392 ../fish/guestfish-actions.pod:258
4808 msgid "Do not use standard load path for modules."
4812 #: ../src/guestfs-actions.pod:394 ../fish/guestfish-actions.pod:260
4813 msgid "C<AUG_SAVE_NOOP> = 16"
4817 #: ../src/guestfs-actions.pod:396 ../fish/guestfish-actions.pod:262
4818 msgid "Make save a no-op, just record what would have been changed."
4822 #: ../src/guestfs-actions.pod:398 ../fish/guestfish-actions.pod:264
4823 msgid "C<AUG_NO_LOAD> = 32"
4827 #: ../src/guestfs-actions.pod:400
4828 msgid "Do not load the tree in C<guestfs_aug_init>."
4832 #: ../src/guestfs-actions.pod:404
4833 msgid "To close the handle, you can call C<guestfs_aug_close>."
4837 #: ../src/guestfs-actions.pod:406 ../fish/guestfish-actions.pod:272
4838 msgid "To find out more about Augeas, see L<http://augeas.net/>."
4842 #: ../src/guestfs-actions.pod:412
4843 msgid "guestfs_aug_insert"
4847 #: ../src/guestfs-actions.pod:414
4851 " guestfs_aug_insert (guestfs_h *g,\n"
4852 " const char *augpath,\n"
4853 " const char *label,\n"
4859 #: ../src/guestfs-actions.pod:420 ../fish/guestfish-actions.pod:278
4861 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
4862 "or after C<path> (depending on the boolean flag C<before>)."
4866 #: ../src/guestfs-actions.pod:424 ../fish/guestfish-actions.pod:282
4868 "C<path> must match exactly one existing node in the tree, and C<label> must "
4869 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
4873 #: ../src/guestfs-actions.pod:432
4874 msgid "guestfs_aug_load"
4878 #: ../src/guestfs-actions.pod:434
4882 " guestfs_aug_load (guestfs_h *g);\n"
4887 #: ../src/guestfs-actions.pod:437 ../fish/guestfish-actions.pod:290
4888 msgid "Load files into the tree."
4892 #: ../src/guestfs-actions.pod:439 ../fish/guestfish-actions.pod:292
4893 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
4897 #: ../src/guestfs-actions.pod:446
4898 msgid "guestfs_aug_ls"
4902 #: ../src/guestfs-actions.pod:448
4906 " guestfs_aug_ls (guestfs_h *g,\n"
4907 " const char *augpath);\n"
4912 #: ../src/guestfs-actions.pod:452
4914 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
4915 "sorting the resulting nodes into alphabetical order."
4919 #: ../src/guestfs-actions.pod:455 ../src/guestfs-actions.pod:471 ../src/guestfs-actions.pod:617 ../src/guestfs-actions.pod:1065 ../src/guestfs-actions.pod:1356 ../src/guestfs-actions.pod:1375 ../src/guestfs-actions.pod:1478 ../src/guestfs-actions.pod:1497 ../src/guestfs-actions.pod:1746 ../src/guestfs-actions.pod:2148 ../src/guestfs-actions.pod:2164 ../src/guestfs-actions.pod:2183 ../src/guestfs-actions.pod:2226 ../src/guestfs-actions.pod:2250 ../src/guestfs-actions.pod:2321 ../src/guestfs-actions.pod:2370 ../src/guestfs-actions.pod:2581 ../src/guestfs-actions.pod:2762 ../src/guestfs-actions.pod:2973 ../src/guestfs-actions.pod:3228 ../src/guestfs-actions.pod:3290 ../src/guestfs-actions.pod:3395 ../src/guestfs-actions.pod:3800 ../src/guestfs-actions.pod:4416 ../src/guestfs-actions.pod:4936 ../src/guestfs-actions.pod:5062 ../src/guestfs-actions.pod:5176 ../src/guestfs-actions.pod:5827 ../src/guestfs-actions.pod:5888 ../src/guestfs-actions.pod:5943 ../src/guestfs-actions.pod:6089 ../src/guestfs-actions.pod:6113 ../src/guestfs-actions.pod:6585 ../src/guestfs-actions.pod:6605 ../src/guestfs-actions.pod:6652 ../src/guestfs-actions.pod:6817 ../src/guestfs-actions.pod:6836 ../src/guestfs-actions.pod:6921 ../src/guestfs-actions.pod:6940 ../src/guestfs-actions.pod:6986 ../src/guestfs-actions.pod:7005
4921 "This function returns a NULL-terminated array of strings (like "
4922 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
4923 "strings and the array after use>."
4927 #: ../src/guestfs-actions.pod:459 ../src/guestfs-actions.pod:990 ../src/guestfs-actions.pod:1008 ../src/guestfs-actions.pod:1413 ../src/guestfs-actions.pod:3051 ../src/guestfs-actions.pod:3082 ../src/guestfs-actions.pod:3641 ../src/guestfs-actions.pod:3691 ../src/guestfs-actions.pod:3878 ../src/guestfs-actions.pod:3911 ../src/guestfs-actions.pod:4074 ../src/guestfs-actions.pod:4420 ../src/guestfs-actions.pod:4877 ../src/guestfs-actions.pod:5255 ../src/guestfs-actions.pod:5269 ../src/guestfs-actions.pod:5281 ../src/guestfs-actions.pod:5689 ../src/guestfs-actions.pod:6327 ../src/guestfs-actions.pod:6340 ../src/guestfs-actions.pod:6569 ../src/guestfs-actions.pod:6772 ../src/guestfs-actions.pod:6805
4928 msgid "(Added in 0.8)"
4932 #: ../src/guestfs-actions.pod:461
4933 msgid "guestfs_aug_match"
4937 #: ../src/guestfs-actions.pod:463
4941 " guestfs_aug_match (guestfs_h *g,\n"
4942 " const char *augpath);\n"
4947 #: ../src/guestfs-actions.pod:467 ../fish/guestfish-actions.pod:306
4949 "Returns a list of paths which match the path expression C<path>. The "
4950 "returned paths are sufficiently qualified so that they match exactly one "
4951 "node in the current tree."
4955 #: ../src/guestfs-actions.pod:477
4956 msgid "guestfs_aug_mv"
4960 #: ../src/guestfs-actions.pod:479
4964 " guestfs_aug_mv (guestfs_h *g,\n"
4965 " const char *src,\n"
4966 " const char *dest);\n"
4971 #: ../src/guestfs-actions.pod:484 ../fish/guestfish-actions.pod:314
4973 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
4974 "C<dest> is overwritten if it exists."
4978 #: ../src/guestfs-actions.pod:491
4979 msgid "guestfs_aug_rm"
4983 #: ../src/guestfs-actions.pod:493
4987 " guestfs_aug_rm (guestfs_h *g,\n"
4988 " const char *augpath);\n"
4993 #: ../src/guestfs-actions.pod:497 ../fish/guestfish-actions.pod:321
4994 msgid "Remove C<path> and all of its children."
4998 #: ../src/guestfs-actions.pod:499 ../fish/guestfish-actions.pod:323
4999 msgid "On success this returns the number of entries which were removed."
5003 #: ../src/guestfs-actions.pod:505
5004 msgid "guestfs_aug_save"
5008 #: ../src/guestfs-actions.pod:507
5012 " guestfs_aug_save (guestfs_h *g);\n"
5017 #: ../src/guestfs-actions.pod:510 ../fish/guestfish-actions.pod:329
5018 msgid "This writes all pending changes to disk."
5022 #: ../src/guestfs-actions.pod:512
5024 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
5029 #: ../src/guestfs-actions.pod:519
5030 msgid "guestfs_aug_set"
5034 #: ../src/guestfs-actions.pod:521
5038 " guestfs_aug_set (guestfs_h *g,\n"
5039 " const char *augpath,\n"
5040 " const char *val);\n"
5045 #: ../src/guestfs-actions.pod:526 ../fish/guestfish-actions.pod:338
5046 msgid "Set the value associated with C<path> to C<val>."
5050 #: ../src/guestfs-actions.pod:528
5052 "In the Augeas API, it is possible to clear a node by setting the value to "
5053 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
5054 "this call. Instead you must use the C<guestfs_aug_clear> call."
5058 #: ../src/guestfs-actions.pod:537
5059 msgid "guestfs_available"
5063 #: ../src/guestfs-actions.pod:539
5067 " guestfs_available (guestfs_h *g,\n"
5068 " char *const *groups);\n"
5073 #: ../src/guestfs-actions.pod:543 ../fish/guestfish-actions.pod:349
5075 "This command is used to check the availability of some groups of "
5076 "functionality in the appliance, which not all builds of the libguestfs "
5077 "appliance will be able to provide."
5081 #: ../src/guestfs-actions.pod:547
5083 "The libguestfs groups, and the functions that those groups correspond to, "
5084 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
5085 "runtime by calling C<guestfs_available_all_groups>."
5089 #: ../src/guestfs-actions.pod:552 ../fish/guestfish-actions.pod:358
5091 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
5092 "\"augeas\"]> would check for the availability of the Linux inotify functions "
5093 "and Augeas (configuration file editing) functions."
5097 #: ../src/guestfs-actions.pod:557 ../fish/guestfish-actions.pod:363
5098 msgid "The command returns no error if I<all> requested groups are available."
5102 #: ../src/guestfs-actions.pod:559 ../fish/guestfish-actions.pod:365
5104 "It fails with an error if one or more of the requested groups is unavailable "
5109 #: ../src/guestfs-actions.pod:562 ../fish/guestfish-actions.pod:368
5111 "If an unknown group name is included in the list of groups then an error is "
5116 #: ../src/guestfs-actions.pod:565 ../fish/guestfish-actions.pod:371
5121 #: ../src/guestfs-actions.pod:571
5122 msgid "You must call C<guestfs_launch> before calling this function."
5126 #: ../src/guestfs-actions.pod:573 ../fish/guestfish-actions.pod:379
5128 "The reason is because we don't know what groups are supported by the "
5129 "appliance/daemon until it is running and can be queried."
5133 #: ../src/guestfs-actions.pod:579 ../fish/guestfish-actions.pod:385
5135 "If a group of functions is available, this does not necessarily mean that "
5136 "they will work. You still have to check for errors when calling individual "
5137 "API functions even if they are available."
5141 #: ../src/guestfs-actions.pod:586 ../fish/guestfish-actions.pod:392
5143 "It is usually the job of distro packagers to build complete functionality "
5144 "into the libguestfs appliance. Upstream libguestfs, if built from source "
5145 "with all requirements satisfied, will support everything."
5149 #: ../src/guestfs-actions.pod:593
5151 "This call was added in version C<1.0.80>. In previous versions of "
5152 "libguestfs all you could do would be to speculatively execute a command to "
5153 "find out if the daemon implemented it. See also C<guestfs_version>."
5157 #: ../src/guestfs-actions.pod:602 ../src/guestfs-actions.pod:1163
5158 msgid "(Added in 1.0.80)"
5162 #: ../src/guestfs-actions.pod:604
5163 msgid "guestfs_available_all_groups"
5167 #: ../src/guestfs-actions.pod:606
5171 " guestfs_available_all_groups (guestfs_h *g);\n"
5176 #: ../src/guestfs-actions.pod:609
5178 "This command returns a list of all optional groups that this daemon knows "
5179 "about. Note this returns both supported and unsupported groups. To find "
5180 "out which ones the daemon can actually support you have to call "
5181 "C<guestfs_available> on each member of the returned list."
5185 #: ../src/guestfs-actions.pod:615
5186 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
5190 #: ../src/guestfs-actions.pod:621
5191 msgid "(Added in 1.3.15)"
5195 #: ../src/guestfs-actions.pod:623
5196 msgid "guestfs_base64_in"
5200 #: ../src/guestfs-actions.pod:625
5204 " guestfs_base64_in (guestfs_h *g,\n"
5205 " const char *base64file,\n"
5206 " const char *filename);\n"
5211 #: ../src/guestfs-actions.pod:630 ../fish/guestfish-actions.pod:422
5212 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
5216 #: ../src/guestfs-actions.pod:635 ../src/guestfs-actions.pod:649
5217 msgid "(Added in 1.3.5)"
5221 #: ../src/guestfs-actions.pod:637
5222 msgid "guestfs_base64_out"
5226 #: ../src/guestfs-actions.pod:639
5230 " guestfs_base64_out (guestfs_h *g,\n"
5231 " const char *filename,\n"
5232 " const char *base64file);\n"
5237 #: ../src/guestfs-actions.pod:644 ../fish/guestfish-actions.pod:431
5239 "This command downloads the contents of C<filename>, writing it out to local "
5240 "file C<base64file> encoded as base64."
5244 #: ../src/guestfs-actions.pod:651
5245 msgid "guestfs_blockdev_flushbufs"
5249 #: ../src/guestfs-actions.pod:653
5253 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
5254 " const char *device);\n"
5259 #: ../src/guestfs-actions.pod:657 ../fish/guestfish-actions.pod:440
5260 msgid "This tells the kernel to flush internal buffers associated with C<device>."
5264 #: ../src/guestfs-actions.pod:660 ../src/guestfs-actions.pod:677 ../src/guestfs-actions.pod:692 ../src/guestfs-actions.pod:708 ../src/guestfs-actions.pod:726 ../src/guestfs-actions.pod:745 ../src/guestfs-actions.pod:759 ../src/guestfs-actions.pod:777 ../src/guestfs-actions.pod:791 ../src/guestfs-actions.pod:805 ../fish/guestfish-actions.pod:443 ../fish/guestfish-actions.pod:454 ../fish/guestfish-actions.pod:463 ../fish/guestfish-actions.pod:473 ../fish/guestfish-actions.pod:485 ../fish/guestfish-actions.pod:498 ../fish/guestfish-actions.pod:506 ../fish/guestfish-actions.pod:517 ../fish/guestfish-actions.pod:525 ../fish/guestfish-actions.pod:533
5265 msgid "This uses the L<blockdev(8)> command."
5269 #: ../src/guestfs-actions.pod:664 ../src/guestfs-actions.pod:681 ../src/guestfs-actions.pod:696 ../src/guestfs-actions.pod:712 ../src/guestfs-actions.pod:730 ../src/guestfs-actions.pod:749 ../src/guestfs-actions.pod:763 ../src/guestfs-actions.pod:781 ../src/guestfs-actions.pod:795 ../src/guestfs-actions.pod:809
5270 msgid "(Added in 0.9.3)"
5274 #: ../src/guestfs-actions.pod:666
5275 msgid "guestfs_blockdev_getbsz"
5279 #: ../src/guestfs-actions.pod:668
5283 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
5284 " const char *device);\n"
5289 #: ../src/guestfs-actions.pod:672 ../fish/guestfish-actions.pod:449
5290 msgid "This returns the block size of a device."
5294 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:774 ../fish/guestfish-actions.pod:451 ../fish/guestfish-actions.pod:514
5296 "(Note this is different from both I<size in blocks> and I<filesystem block "
5301 #: ../src/guestfs-actions.pod:683
5302 msgid "guestfs_blockdev_getro"
5306 #: ../src/guestfs-actions.pod:685
5310 " guestfs_blockdev_getro (guestfs_h *g,\n"
5311 " const char *device);\n"
5316 #: ../src/guestfs-actions.pod:689 ../fish/guestfish-actions.pod:460
5318 "Returns a boolean indicating if the block device is read-only (true if "
5319 "read-only, false if not)."
5323 #: ../src/guestfs-actions.pod:694 ../src/guestfs-actions.pod:1396 ../src/guestfs-actions.pod:1411 ../src/guestfs-actions.pod:1891 ../src/guestfs-actions.pod:1902 ../src/guestfs-actions.pod:1974 ../src/guestfs-actions.pod:2029 ../src/guestfs-actions.pod:2044 ../src/guestfs-actions.pod:2069 ../src/guestfs-actions.pod:2092 ../src/guestfs-actions.pod:2990 ../src/guestfs-actions.pod:3004 ../src/guestfs-actions.pod:3019 ../src/guestfs-actions.pod:3033 ../src/guestfs-actions.pod:3049 ../src/guestfs-actions.pod:3064 ../src/guestfs-actions.pod:3080 ../src/guestfs-actions.pod:3094 ../src/guestfs-actions.pod:3107 ../src/guestfs-actions.pod:3121 ../src/guestfs-actions.pod:3136 ../src/guestfs-actions.pod:3151 ../src/guestfs-actions.pod:4565
5324 msgid "This function returns a C truth value on success or -1 on error."
5328 #: ../src/guestfs-actions.pod:698
5329 msgid "guestfs_blockdev_getsize64"
5333 #: ../src/guestfs-actions.pod:700
5337 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
5338 " const char *device);\n"
5343 #: ../src/guestfs-actions.pod:704 ../fish/guestfish-actions.pod:469
5344 msgid "This returns the size of the device in bytes."
5348 #: ../src/guestfs-actions.pod:706
5349 msgid "See also C<guestfs_blockdev_getsz>."
5353 #: ../src/guestfs-actions.pod:714
5354 msgid "guestfs_blockdev_getss"
5358 #: ../src/guestfs-actions.pod:716
5362 " guestfs_blockdev_getss (guestfs_h *g,\n"
5363 " const char *device);\n"
5368 #: ../src/guestfs-actions.pod:720 ../fish/guestfish-actions.pod:479
5370 "This returns the size of sectors on a block device. Usually 512, but can be "
5371 "larger for modern devices."
5375 #: ../src/guestfs-actions.pod:723
5377 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
5382 #: ../src/guestfs-actions.pod:732
5383 msgid "guestfs_blockdev_getsz"
5387 #: ../src/guestfs-actions.pod:734
5391 " guestfs_blockdev_getsz (guestfs_h *g,\n"
5392 " const char *device);\n"
5397 #: ../src/guestfs-actions.pod:738 ../fish/guestfish-actions.pod:491
5399 "This returns the size of the device in units of 512-byte sectors (even if "
5400 "the sectorsize isn't 512 bytes ... weird)."
5404 #: ../src/guestfs-actions.pod:741
5406 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
5407 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
5411 #: ../src/guestfs-actions.pod:751
5412 msgid "guestfs_blockdev_rereadpt"
5416 #: ../src/guestfs-actions.pod:753
5420 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
5421 " const char *device);\n"
5426 #: ../src/guestfs-actions.pod:757 ../fish/guestfish-actions.pod:504
5427 msgid "Reread the partition table on C<device>."
5431 #: ../src/guestfs-actions.pod:765
5432 msgid "guestfs_blockdev_setbsz"
5436 #: ../src/guestfs-actions.pod:767
5440 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
5441 " const char *device,\n"
5442 " int blocksize);\n"
5447 #: ../src/guestfs-actions.pod:772 ../fish/guestfish-actions.pod:512
5448 msgid "This sets the block size of a device."
5452 #: ../src/guestfs-actions.pod:783
5453 msgid "guestfs_blockdev_setro"
5457 #: ../src/guestfs-actions.pod:785
5461 " guestfs_blockdev_setro (guestfs_h *g,\n"
5462 " const char *device);\n"
5467 #: ../src/guestfs-actions.pod:789 ../fish/guestfish-actions.pod:523
5468 msgid "Sets the block device named C<device> to read-only."
5472 #: ../src/guestfs-actions.pod:797
5473 msgid "guestfs_blockdev_setrw"
5477 #: ../src/guestfs-actions.pod:799
5481 " guestfs_blockdev_setrw (guestfs_h *g,\n"
5482 " const char *device);\n"
5487 #: ../src/guestfs-actions.pod:803 ../fish/guestfish-actions.pod:531
5488 msgid "Sets the block device named C<device> to read-write."
5492 #: ../src/guestfs-actions.pod:811
5493 msgid "guestfs_case_sensitive_path"
5497 #: ../src/guestfs-actions.pod:813
5501 " guestfs_case_sensitive_path (guestfs_h *g,\n"
5502 " const char *path);\n"
5507 #: ../src/guestfs-actions.pod:817 ../fish/guestfish-actions.pod:539
5509 "This can be used to resolve case insensitive paths on a filesystem which is "
5510 "case sensitive. The use case is to resolve paths which you have read from "
5511 "Windows configuration files or the Windows Registry, to the true path."
5515 #: ../src/guestfs-actions.pod:822 ../fish/guestfish-actions.pod:544
5517 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
5518 "(and probably others), which is that although the underlying filesystem is "
5519 "case-insensitive, the driver exports the filesystem to Linux as "
5524 #: ../src/guestfs-actions.pod:827 ../fish/guestfish-actions.pod:549
5526 "One consequence of this is that special directories such as C<c:\\windows> "
5527 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
5528 "precise details of how they were created. In Windows itself this would not "
5533 #: ../src/guestfs-actions.pod:833 ../fish/guestfish-actions.pod:555
5535 "Bug or feature? You decide: "
5536 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
5540 #: ../src/guestfs-actions.pod:836 ../fish/guestfish-actions.pod:558
5542 "This function resolves the true case of each element in the path and returns "
5543 "the case-sensitive path."
5547 #: ../src/guestfs-actions.pod:839
5549 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
5550 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
5551 "how the directories were originally created under Windows)."
5555 #: ../src/guestfs-actions.pod:844 ../fish/guestfish-actions.pod:566
5556 msgid "I<Note>: This function does not handle drive names, backslashes etc."
5560 #: ../src/guestfs-actions.pod:847
5561 msgid "See also C<guestfs_realpath>."
5565 #: ../src/guestfs-actions.pod:852 ../src/guestfs-actions.pod:6497
5566 msgid "(Added in 1.0.75)"
5570 #: ../src/guestfs-actions.pod:854
5575 #: ../src/guestfs-actions.pod:856
5579 " guestfs_cat (guestfs_h *g,\n"
5580 " const char *path);\n"
5585 #: ../src/guestfs-actions.pod:860 ../src/guestfs-actions.pod:5052 ../fish/guestfish-actions.pod:575 ../fish/guestfish-actions.pod:3378
5586 msgid "Return the contents of the file named C<path>."
5590 #: ../src/guestfs-actions.pod:862
5592 "Note that this function cannot correctly handle binary files (specifically, "
5593 "files containing C<\\0> character which is treated as end of string). For "
5594 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
5595 "functions which have a more complex interface."
5599 #: ../src/guestfs-actions.pod:870 ../src/guestfs-actions.pod:1049 ../src/guestfs-actions.pod:1069 ../src/guestfs-actions.pod:1360 ../src/guestfs-actions.pod:1379 ../src/guestfs-actions.pod:1482 ../src/guestfs-actions.pod:1501 ../src/guestfs-actions.pod:1750 ../src/guestfs-actions.pod:2168 ../src/guestfs-actions.pod:2187 ../src/guestfs-actions.pod:2230 ../src/guestfs-actions.pod:2254 ../src/guestfs-actions.pod:2271 ../src/guestfs-actions.pod:2300 ../src/guestfs-actions.pod:4834 ../src/guestfs-actions.pod:4860 ../src/guestfs-actions.pod:4991 ../src/guestfs-actions.pod:5017 ../src/guestfs-actions.pod:5041 ../src/guestfs-actions.pod:5892 ../src/guestfs-actions.pod:5947 ../src/guestfs-actions.pod:6093 ../src/guestfs-actions.pod:6117 ../src/guestfs-actions.pod:6769 ../src/guestfs-actions.pod:6795 ../src/guestfs-actions.pod:6821 ../src/guestfs-actions.pod:6840 ../src/guestfs-actions.pod:6925 ../src/guestfs-actions.pod:6944 ../src/guestfs-actions.pod:6990 ../src/guestfs-actions.pod:7009 ../fish/guestfish-actions.pod:582 ../fish/guestfish-actions.pod:717 ../fish/guestfish-actions.pod:729 ../fish/guestfish-actions.pod:905 ../fish/guestfish-actions.pod:915 ../fish/guestfish-actions.pod:982 ../fish/guestfish-actions.pod:992 ../fish/guestfish-actions.pod:1187 ../fish/guestfish-actions.pod:1462 ../fish/guestfish-actions.pod:1472 ../fish/guestfish-actions.pod:1500 ../fish/guestfish-actions.pod:1515 ../fish/guestfish-actions.pod:1525 ../fish/guestfish-actions.pod:1544 ../fish/guestfish-actions.pod:3248 ../fish/guestfish-actions.pod:3263 ../fish/guestfish-actions.pod:3339 ../fish/guestfish-actions.pod:3356 ../fish/guestfish-actions.pod:3371 ../fish/guestfish-actions.pod:3954 ../fish/guestfish-actions.pod:4000 ../fish/guestfish-actions.pod:4085 ../fish/guestfish-actions.pod:4100 ../fish/guestfish-actions.pod:4510 ../fish/guestfish-actions.pod:4528 ../fish/guestfish-actions.pod:4545 ../fish/guestfish-actions.pod:4555 ../fish/guestfish-actions.pod:4603 ../fish/guestfish-actions.pod:4613 ../fish/guestfish-actions.pod:4642 ../fish/guestfish-actions.pod:4652
5601 "Because of the message protocol, there is a transfer limit of somewhere "
5602 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
5606 #: ../src/guestfs-actions.pod:873 ../src/guestfs-actions.pod:3232 ../src/guestfs-actions.pod:3294 ../src/guestfs-actions.pod:3311 ../src/guestfs-actions.pod:3399 ../src/guestfs-actions.pod:3804 ../src/guestfs-actions.pod:3818 ../src/guestfs-actions.pod:4940 ../src/guestfs-actions.pod:4954 ../src/guestfs-actions.pod:6656 ../src/guestfs-actions.pod:6670
5607 msgid "(Added in 0.4)"
5611 #: ../src/guestfs-actions.pod:875
5612 msgid "guestfs_checksum"
5616 #: ../src/guestfs-actions.pod:877
5620 " guestfs_checksum (guestfs_h *g,\n"
5621 " const char *csumtype,\n"
5622 " const char *path);\n"
5627 #: ../src/guestfs-actions.pod:882 ../fish/guestfish-actions.pod:589
5628 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
5632 #: ../src/guestfs-actions.pod:885 ../fish/guestfish-actions.pod:592
5634 "The type of checksum to compute is given by the C<csumtype> parameter which "
5635 "must have one of the following values:"
5639 #: ../src/guestfs-actions.pod:890 ../fish/guestfish-actions.pod:597
5644 #: ../src/guestfs-actions.pod:892 ../fish/guestfish-actions.pod:599
5646 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
5651 #: ../src/guestfs-actions.pod:895 ../fish/guestfish-actions.pod:602
5656 #: ../src/guestfs-actions.pod:897 ../fish/guestfish-actions.pod:604
5657 msgid "Compute the MD5 hash (using the C<md5sum> program)."
5661 #: ../src/guestfs-actions.pod:899 ../fish/guestfish-actions.pod:606
5666 #: ../src/guestfs-actions.pod:901 ../fish/guestfish-actions.pod:608
5667 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
5671 #: ../src/guestfs-actions.pod:903 ../fish/guestfish-actions.pod:610
5676 #: ../src/guestfs-actions.pod:905 ../fish/guestfish-actions.pod:612
5677 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
5681 #: ../src/guestfs-actions.pod:907 ../fish/guestfish-actions.pod:614
5686 #: ../src/guestfs-actions.pod:909 ../fish/guestfish-actions.pod:616
5687 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
5691 #: ../src/guestfs-actions.pod:911 ../fish/guestfish-actions.pod:618
5696 #: ../src/guestfs-actions.pod:913 ../fish/guestfish-actions.pod:620
5697 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
5701 #: ../src/guestfs-actions.pod:915 ../fish/guestfish-actions.pod:622
5706 #: ../src/guestfs-actions.pod:917 ../fish/guestfish-actions.pod:624
5707 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
5711 #: ../src/guestfs-actions.pod:921 ../fish/guestfish-actions.pod:628
5712 msgid "The checksum is returned as a printable string."
5716 #: ../src/guestfs-actions.pod:923
5717 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
5721 #: ../src/guestfs-actions.pod:925
5722 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
5726 #: ../src/guestfs-actions.pod:930 ../src/guestfs-actions.pod:1238 ../src/guestfs-actions.pod:2060 ../src/guestfs-actions.pod:3006 ../src/guestfs-actions.pod:3035 ../src/guestfs-actions.pod:3096 ../src/guestfs-actions.pod:3123 ../src/guestfs-actions.pod:6358
5727 msgid "(Added in 1.0.2)"
5731 #: ../src/guestfs-actions.pod:932
5732 msgid "guestfs_checksum_device"
5736 #: ../src/guestfs-actions.pod:934
5740 " guestfs_checksum_device (guestfs_h *g,\n"
5741 " const char *csumtype,\n"
5742 " const char *device);\n"
5747 #: ../src/guestfs-actions.pod:939
5749 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
5750 "device named C<device>. For the types of checksums supported see the "
5751 "C<guestfs_checksum> command."
5755 #: ../src/guestfs-actions.pod:946 ../src/guestfs-actions.pod:4471 ../src/guestfs-actions.pod:4530 ../src/guestfs-actions.pod:4567 ../src/guestfs-actions.pod:4585 ../src/guestfs-actions.pod:4761 ../src/guestfs-actions.pod:6272 ../src/guestfs-actions.pod:6286 ../src/guestfs-actions.pod:6682
5756 msgid "(Added in 1.3.2)"
5760 #: ../src/guestfs-actions.pod:948
5761 msgid "guestfs_checksums_out"
5765 #: ../src/guestfs-actions.pod:950
5769 " guestfs_checksums_out (guestfs_h *g,\n"
5770 " const char *csumtype,\n"
5771 " const char *directory,\n"
5772 " const char *sumsfile);\n"
5777 #: ../src/guestfs-actions.pod:956 ../fish/guestfish-actions.pod:646
5779 "This command computes the checksums of all regular files in C<directory> and "
5780 "then emits a list of those checksums to the local output file C<sumsfile>."
5784 #: ../src/guestfs-actions.pod:960 ../fish/guestfish-actions.pod:650
5786 "This can be used for verifying the integrity of a virtual machine. However "
5787 "to be properly secure you should pay attention to the output of the checksum "
5788 "command (it uses the ones from GNU coreutils). In particular when the "
5789 "filename is not printable, coreutils uses a special backslash syntax. For "
5790 "more information, see the GNU coreutils info file."
5794 #: ../src/guestfs-actions.pod:970
5795 msgid "(Added in 1.3.7)"
5799 #: ../src/guestfs-actions.pod:972
5800 msgid "guestfs_chmod"
5804 #: ../src/guestfs-actions.pod:974
5808 " guestfs_chmod (guestfs_h *g,\n"
5810 " const char *path);\n"
5815 #: ../src/guestfs-actions.pod:979 ../fish/guestfish-actions.pod:664
5817 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
5822 #: ../src/guestfs-actions.pod:982 ../fish/guestfish-actions.pod:667
5824 "I<Note>: When using this command from guestfish, C<mode> by default would be "
5825 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
5830 #: ../src/guestfs-actions.pod:986 ../src/guestfs-actions.pod:4055 ../src/guestfs-actions.pod:4170 ../src/guestfs-actions.pod:4189 ../src/guestfs-actions.pod:4208 ../fish/guestfish-actions.pod:671 ../fish/guestfish-actions.pod:2738 ../fish/guestfish-actions.pod:2823 ../fish/guestfish-actions.pod:2833 ../fish/guestfish-actions.pod:2843
5831 msgid "The mode actually set is affected by the umask."
5835 #: ../src/guestfs-actions.pod:992
5836 msgid "guestfs_chown"
5840 #: ../src/guestfs-actions.pod:994
5844 " guestfs_chown (guestfs_h *g,\n"
5847 " const char *path);\n"
5852 #: ../src/guestfs-actions.pod:1000 ../fish/guestfish-actions.pod:677
5853 msgid "Change the file owner to C<owner> and group to C<group>."
5857 #: ../src/guestfs-actions.pod:1002 ../src/guestfs-actions.pod:3193 ../fish/guestfish-actions.pod:679 ../fish/guestfish-actions.pod:2216
5859 "Only numeric uid and gid are supported. If you want to use names, you will "
5860 "need to locate and parse the password file yourself (Augeas support makes "
5861 "this relatively easy)."
5865 #: ../src/guestfs-actions.pod:1010
5866 msgid "guestfs_command"
5870 #: ../src/guestfs-actions.pod:1012
5874 " guestfs_command (guestfs_h *g,\n"
5875 " char *const *arguments);\n"
5880 #: ../src/guestfs-actions.pod:1016 ../fish/guestfish-actions.pod:687
5882 "This call runs a command from the guest filesystem. The filesystem must be "
5883 "mounted, and must contain a compatible operating system (ie. something "
5884 "Linux, with the same or compatible processor architecture)."
5888 #: ../src/guestfs-actions.pod:1021
5890 "The single parameter is an argv-style list of arguments. The first element "
5891 "is the name of the program to run. Subsequent elements are parameters. The "
5892 "list must be non-empty (ie. must contain a program name). Note that the "
5893 "command runs directly, and is I<not> invoked via the shell (see "
5898 #: ../src/guestfs-actions.pod:1028 ../fish/guestfish-actions.pod:699
5899 msgid "The return value is anything printed to I<stdout> by the command."
5903 #: ../src/guestfs-actions.pod:1031 ../fish/guestfish-actions.pod:702
5905 "If the command returns a non-zero exit status, then this function returns an "
5906 "error message. The error message string is the content of I<stderr> from "
5911 #: ../src/guestfs-actions.pod:1035 ../fish/guestfish-actions.pod:706
5913 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
5914 "C</bin>. If you require a program from another location, you should provide "
5915 "the full path in the first parameter."
5919 #: ../src/guestfs-actions.pod:1040 ../fish/guestfish-actions.pod:711
5921 "Shared libraries and data files required by the program must be available on "
5922 "filesystems which are mounted in the correct places. It is the caller's "
5923 "responsibility to ensure all filesystems that are needed are mounted at the "
5928 #: ../src/guestfs-actions.pod:1052 ../src/guestfs-actions.pod:1072 ../src/guestfs-actions.pod:1535
5929 msgid "(Added in 0.9.1)"
5933 #: ../src/guestfs-actions.pod:1054
5934 msgid "guestfs_command_lines"
5938 #: ../src/guestfs-actions.pod:1056
5942 " guestfs_command_lines (guestfs_h *g,\n"
5943 " char *const *arguments);\n"
5948 #: ../src/guestfs-actions.pod:1060
5950 "This is the same as C<guestfs_command>, but splits the result into a list of "
5955 #: ../src/guestfs-actions.pod:1063
5956 msgid "See also: C<guestfs_sh_lines>"
5960 #: ../src/guestfs-actions.pod:1074
5961 msgid "guestfs_config"
5965 #: ../src/guestfs-actions.pod:1076
5969 " guestfs_config (guestfs_h *g,\n"
5970 " const char *qemuparam,\n"
5971 " const char *qemuvalue);\n"
5976 #: ../src/guestfs-actions.pod:1081 ../fish/guestfish-actions.pod:736
5978 "This can be used to add arbitrary qemu command line parameters of the form "
5979 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
5980 "setting some parameters which would interfere with parameters that we use."
5984 #: ../src/guestfs-actions.pod:1086 ../fish/guestfish-actions.pod:741
5985 msgid "The first character of C<param> string must be a C<-> (dash)."
5989 #: ../src/guestfs-actions.pod:1088 ../fish/guestfish-actions.pod:743
5990 msgid "C<value> can be NULL."
5994 #: ../src/guestfs-actions.pod:1094
5995 msgid "guestfs_copy_size"
5999 #: ../src/guestfs-actions.pod:1096
6003 " guestfs_copy_size (guestfs_h *g,\n"
6004 " const char *src,\n"
6005 " const char *dest,\n"
6011 #: ../src/guestfs-actions.pod:1102 ../fish/guestfish-actions.pod:749
6013 "This command copies exactly C<size> bytes from one source device or file "
6014 "C<src> to another destination device or file C<dest>."
6018 #: ../src/guestfs-actions.pod:1105 ../fish/guestfish-actions.pod:752
6020 "Note this will fail if the source is too short or if the destination is not "
6025 #: ../src/guestfs-actions.pod:1110 ../src/guestfs-actions.pod:1233 ../src/guestfs-actions.pod:1264 ../src/guestfs-actions.pod:1684 ../src/guestfs-actions.pod:1706 ../src/guestfs-actions.pod:6861 ../src/guestfs-actions.pod:6880
6027 "This long-running command can generate progress notification messages so "
6028 "that the caller can display a progress bar or indicator. To receive these "
6029 "messages, the caller must register a progress callback. See "
6030 "L<guestfs(3)/guestfs_set_progress_callback>."
6034 #: ../src/guestfs-actions.pod:1115 ../src/guestfs-actions.pod:3831 ../src/guestfs-actions.pod:4967 ../src/guestfs-actions.pod:6589 ../src/guestfs-actions.pod:6609 ../src/guestfs-actions.pod:6695
6035 msgid "(Added in 1.0.87)"
6039 #: ../src/guestfs-actions.pod:1117
6044 #: ../src/guestfs-actions.pod:1119
6048 " guestfs_cp (guestfs_h *g,\n"
6049 " const char *src,\n"
6050 " const char *dest);\n"
6055 #: ../src/guestfs-actions.pod:1124 ../fish/guestfish-actions.pod:759
6057 "This copies a file from C<src> to C<dest> where C<dest> is either a "
6058 "destination filename or destination directory."
6062 #: ../src/guestfs-actions.pod:1129 ../src/guestfs-actions.pod:1143 ../src/guestfs-actions.pod:1215 ../src/guestfs-actions.pod:1289 ../src/guestfs-actions.pod:1398 ../src/guestfs-actions.pod:4434 ../src/guestfs-actions.pod:4811
6063 msgid "(Added in 1.0.18)"
6067 #: ../src/guestfs-actions.pod:1131
6068 msgid "guestfs_cp_a"
6072 #: ../src/guestfs-actions.pod:1133
6076 " guestfs_cp_a (guestfs_h *g,\n"
6077 " const char *src,\n"
6078 " const char *dest);\n"
6083 #: ../src/guestfs-actions.pod:1138 ../fish/guestfish-actions.pod:766
6085 "This copies a file or directory from C<src> to C<dest> recursively using the "
6090 #: ../src/guestfs-actions.pod:1145
6095 #: ../src/guestfs-actions.pod:1147
6099 " guestfs_dd (guestfs_h *g,\n"
6100 " const char *src,\n"
6101 " const char *dest);\n"
6106 #: ../src/guestfs-actions.pod:1152 ../fish/guestfish-actions.pod:773
6108 "This command copies from one source device or file C<src> to another "
6109 "destination device or file C<dest>. Normally you would use this to copy to "
6110 "or from a device or partition, for example to duplicate a filesystem."
6114 #: ../src/guestfs-actions.pod:1157
6116 "If the destination is a device, it must be as large or larger than the "
6117 "source file or device, otherwise the copy will fail. This command cannot do "
6118 "partial copies (see C<guestfs_copy_size>)."
6122 #: ../src/guestfs-actions.pod:1165
6127 #: ../src/guestfs-actions.pod:1167
6131 " guestfs_df (guestfs_h *g);\n"
6136 #: ../src/guestfs-actions.pod:1170 ../fish/guestfish-actions.pod:786
6137 msgid "This command runs the C<df> command to report disk space used."
6141 #: ../src/guestfs-actions.pod:1172 ../src/guestfs-actions.pod:1189 ../fish/guestfish-actions.pod:788 ../fish/guestfish-actions.pod:799
6143 "This command is mostly useful for interactive sessions. It is I<not> "
6144 "intended that you try to parse the output string. Use C<statvfs> from "
6149 #: ../src/guestfs-actions.pod:1179 ../src/guestfs-actions.pod:1196 ../src/guestfs-actions.pod:1309 ../src/guestfs-actions.pod:2233 ../src/guestfs-actions.pod:2257 ../src/guestfs-actions.pod:2325 ../src/guestfs-actions.pod:3941 ../src/guestfs-actions.pod:4334 ../src/guestfs-actions.pod:6096 ../src/guestfs-actions.pod:6120 ../src/guestfs-actions.pod:6728 ../src/guestfs-actions.pod:6741 ../src/guestfs-actions.pod:6754
6150 msgid "(Added in 1.0.54)"
6154 #: ../src/guestfs-actions.pod:1181
6155 msgid "guestfs_df_h"
6159 #: ../src/guestfs-actions.pod:1183
6163 " guestfs_df_h (guestfs_h *g);\n"
6168 #: ../src/guestfs-actions.pod:1186 ../fish/guestfish-actions.pod:796
6170 "This command runs the C<df -h> command to report disk space used in "
6171 "human-readable format."
6175 #: ../src/guestfs-actions.pod:1198
6176 msgid "guestfs_dmesg"
6180 #: ../src/guestfs-actions.pod:1200
6184 " guestfs_dmesg (guestfs_h *g);\n"
6189 #: ../src/guestfs-actions.pod:1203 ../fish/guestfish-actions.pod:807
6191 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
6192 "This is sometimes useful for extended debugging of problems."
6196 #: ../src/guestfs-actions.pod:1207
6198 "Another way to get the same information is to enable verbose messages with "
6199 "C<guestfs_set_verbose> or by setting the environment variable "
6200 "C<LIBGUESTFS_DEBUG=1> before running the program."
6204 #: ../src/guestfs-actions.pod:1217
6205 msgid "guestfs_download"
6209 #: ../src/guestfs-actions.pod:1219
6213 " guestfs_download (guestfs_h *g,\n"
6214 " const char *remotefilename,\n"
6215 " const char *filename);\n"
6220 #: ../src/guestfs-actions.pod:1224 ../src/guestfs-actions.pod:1249 ../fish/guestfish-actions.pod:820 ../fish/guestfish-actions.pod:833
6222 "Download file C<remotefilename> and save it as C<filename> on the local "
6227 #: ../src/guestfs-actions.pod:1227 ../src/guestfs-actions.pod:6352 ../fish/guestfish-actions.pod:823 ../fish/guestfish-actions.pod:4258
6228 msgid "C<filename> can also be a named pipe."
6232 #: ../src/guestfs-actions.pod:1229
6233 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
6237 #: ../src/guestfs-actions.pod:1240
6238 msgid "guestfs_download_offset"
6242 #: ../src/guestfs-actions.pod:1242
6246 " guestfs_download_offset (guestfs_h *g,\n"
6247 " const char *remotefilename,\n"
6248 " const char *filename,\n"
6249 " int64_t offset,\n"
6255 #: ../src/guestfs-actions.pod:1252 ../fish/guestfish-actions.pod:836
6257 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
6258 "region must be within the file or device)."
6262 #: ../src/guestfs-actions.pod:1255
6264 "Note that there is no limit on the amount of data that can be downloaded "
6265 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
6266 "full amount unless an error occurs."
6270 #: ../src/guestfs-actions.pod:1260
6271 msgid "See also C<guestfs_download>, C<guestfs_pread>."
6275 #: ../src/guestfs-actions.pod:1269 ../src/guestfs-actions.pod:6387
6276 msgid "(Added in 1.5.17)"
6280 #: ../src/guestfs-actions.pod:1271
6281 msgid "guestfs_drop_caches"
6285 #: ../src/guestfs-actions.pod:1273
6289 " guestfs_drop_caches (guestfs_h *g,\n"
6290 " int whattodrop);\n"
6295 #: ../src/guestfs-actions.pod:1277 ../fish/guestfish-actions.pod:852
6297 "This instructs the guest kernel to drop its page cache, and/or dentries and "
6298 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
6299 "to drop, see L<http://linux-mm.org/Drop_Caches>"
6303 #: ../src/guestfs-actions.pod:1282 ../fish/guestfish-actions.pod:857
6304 msgid "Setting C<whattodrop> to 3 should drop everything."
6308 #: ../src/guestfs-actions.pod:1284 ../fish/guestfish-actions.pod:859
6310 "This automatically calls L<sync(2)> before the operation, so that the "
6311 "maximum guest memory is freed."
6315 #: ../src/guestfs-actions.pod:1291
6320 #: ../src/guestfs-actions.pod:1293
6324 " guestfs_du (guestfs_h *g,\n"
6325 " const char *path);\n"
6330 #: ../src/guestfs-actions.pod:1297 ../fish/guestfish-actions.pod:866
6332 "This command runs the C<du -s> command to estimate file space usage for "
6337 #: ../src/guestfs-actions.pod:1300 ../fish/guestfish-actions.pod:869
6339 "C<path> can be a file or a directory. If C<path> is a directory then the "
6340 "estimate includes the contents of the directory and all subdirectories "
6345 #: ../src/guestfs-actions.pod:1304 ../fish/guestfish-actions.pod:873
6346 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
6350 #: ../src/guestfs-actions.pod:1311
6351 msgid "guestfs_e2fsck_f"
6355 #: ../src/guestfs-actions.pod:1313
6359 " guestfs_e2fsck_f (guestfs_h *g,\n"
6360 " const char *device);\n"
6365 #: ../src/guestfs-actions.pod:1317 ../fish/guestfish-actions.pod:880
6367 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
6368 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
6373 #: ../src/guestfs-actions.pod:1321
6375 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
6376 "Normally you should use C<guestfs_fsck>."
6380 #: ../src/guestfs-actions.pod:1326
6381 msgid "(Added in 1.0.29)"
6385 #: ../src/guestfs-actions.pod:1328
6386 msgid "guestfs_echo_daemon"
6390 #: ../src/guestfs-actions.pod:1330
6394 " guestfs_echo_daemon (guestfs_h *g,\n"
6395 " char *const *words);\n"
6400 #: ../src/guestfs-actions.pod:1334 ../fish/guestfish-actions.pod:891
6402 "This command concatenates the list of C<words> passed with single spaces "
6403 "between them and returns the resulting string."
6407 #: ../src/guestfs-actions.pod:1337 ../fish/guestfish-actions.pod:894
6408 msgid "You can use this command to test the connection through to the daemon."
6412 #: ../src/guestfs-actions.pod:1339
6413 msgid "See also C<guestfs_ping_daemon>."
6417 #: ../src/guestfs-actions.pod:1344 ../src/guestfs-actions.pod:2071 ../src/guestfs-actions.pod:5600
6418 msgid "(Added in 1.0.69)"
6422 #: ../src/guestfs-actions.pod:1346
6423 msgid "guestfs_egrep"
6427 #: ../src/guestfs-actions.pod:1348
6431 " guestfs_egrep (guestfs_h *g,\n"
6432 " const char *regex,\n"
6433 " const char *path);\n"
6438 #: ../src/guestfs-actions.pod:1353 ../fish/guestfish-actions.pod:902
6439 msgid "This calls the external C<egrep> program and returns the matching lines."
6443 #: ../src/guestfs-actions.pod:1363 ../src/guestfs-actions.pod:1382 ../src/guestfs-actions.pod:1439 ../src/guestfs-actions.pod:1485 ../src/guestfs-actions.pod:1504 ../src/guestfs-actions.pod:2171 ../src/guestfs-actions.pod:2190 ../src/guestfs-actions.pod:2346 ../src/guestfs-actions.pod:2359 ../src/guestfs-actions.pod:2374 ../src/guestfs-actions.pod:2420 ../src/guestfs-actions.pod:2442 ../src/guestfs-actions.pod:2455 ../src/guestfs-actions.pod:3324 ../src/guestfs-actions.pod:3338 ../src/guestfs-actions.pod:3351 ../src/guestfs-actions.pod:3365 ../src/guestfs-actions.pod:4269 ../src/guestfs-actions.pod:5145 ../src/guestfs-actions.pod:5194 ../src/guestfs-actions.pod:5964 ../src/guestfs-actions.pod:5976 ../src/guestfs-actions.pod:5989 ../src/guestfs-actions.pod:6002 ../src/guestfs-actions.pod:6024 ../src/guestfs-actions.pod:6037 ../src/guestfs-actions.pod:6050 ../src/guestfs-actions.pod:6063 ../src/guestfs-actions.pod:6824 ../src/guestfs-actions.pod:6843 ../src/guestfs-actions.pod:6928 ../src/guestfs-actions.pod:6947 ../src/guestfs-actions.pod:6993 ../src/guestfs-actions.pod:7012
6444 msgid "(Added in 1.0.66)"
6448 #: ../src/guestfs-actions.pod:1365
6449 msgid "guestfs_egrepi"
6453 #: ../src/guestfs-actions.pod:1367
6457 " guestfs_egrepi (guestfs_h *g,\n"
6458 " const char *regex,\n"
6459 " const char *path);\n"
6464 #: ../src/guestfs-actions.pod:1372 ../fish/guestfish-actions.pod:912
6465 msgid "This calls the external C<egrep -i> program and returns the matching lines."
6469 #: ../src/guestfs-actions.pod:1384
6470 msgid "guestfs_equal"
6474 #: ../src/guestfs-actions.pod:1386
6478 " guestfs_equal (guestfs_h *g,\n"
6479 " const char *file1,\n"
6480 " const char *file2);\n"
6485 #: ../src/guestfs-actions.pod:1391 ../fish/guestfish-actions.pod:922
6487 "This compares the two files C<file1> and C<file2> and returns true if their "
6488 "content is exactly equal, or false otherwise."
6492 #: ../src/guestfs-actions.pod:1394 ../fish/guestfish-actions.pod:925
6493 msgid "The external L<cmp(1)> program is used for the comparison."
6497 #: ../src/guestfs-actions.pod:1400
6498 msgid "guestfs_exists"
6502 #: ../src/guestfs-actions.pod:1402
6506 " guestfs_exists (guestfs_h *g,\n"
6507 " const char *path);\n"
6512 #: ../src/guestfs-actions.pod:1406 ../fish/guestfish-actions.pod:931
6514 "This returns C<true> if and only if there is a file, directory (or anything) "
6515 "with the given C<path> name."
6519 #: ../src/guestfs-actions.pod:1409
6520 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
6524 #: ../src/guestfs-actions.pod:1415
6525 msgid "guestfs_fallocate"
6529 #: ../src/guestfs-actions.pod:1417
6533 " guestfs_fallocate (guestfs_h *g,\n"
6534 " const char *path,\n"
6540 #: ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:1448 ../fish/guestfish-actions.pod:940 ../fish/guestfish-actions.pod:959
6542 "This command preallocates a file (containing zero bytes) named C<path> of "
6543 "size C<len> bytes. If the file exists already, it is overwritten."
6547 #: ../src/guestfs-actions.pod:1426 ../fish/guestfish-actions.pod:944
6549 "Do not confuse this with the guestfish-specific C<alloc> command which "
6550 "allocates a file in the host and attaches it as a device."
6554 #: ../src/guestfs-actions.pod:1432 ../fish/guestfish-actions.pod:948
6556 "This function is deprecated. In new code, use the C<fallocate64> call "
6561 #: ../src/guestfs-actions.pod:1441
6562 msgid "guestfs_fallocate64"
6566 #: ../src/guestfs-actions.pod:1443
6570 " guestfs_fallocate64 (guestfs_h *g,\n"
6571 " const char *path,\n"
6577 #: ../src/guestfs-actions.pod:1452
6579 "Note that this call allocates disk blocks for the file. To create a sparse "
6580 "file use C<guestfs_truncate_size> instead."
6584 #: ../src/guestfs-actions.pod:1455
6586 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
6587 "oversight it only allowed 30 bit lengths to be specified, effectively "
6588 "limiting the maximum size of files created through that call to 1GB."
6592 #: ../src/guestfs-actions.pod:1460 ../fish/guestfish-actions.pod:971
6594 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
6595 "commands which create a file in the host and attach it as a device."
6599 #: ../src/guestfs-actions.pod:1466
6600 msgid "(Added in 1.3.17)"
6604 #: ../src/guestfs-actions.pod:1468
6605 msgid "guestfs_fgrep"
6609 #: ../src/guestfs-actions.pod:1470
6613 " guestfs_fgrep (guestfs_h *g,\n"
6614 " const char *pattern,\n"
6615 " const char *path);\n"
6620 #: ../src/guestfs-actions.pod:1475 ../fish/guestfish-actions.pod:979
6621 msgid "This calls the external C<fgrep> program and returns the matching lines."
6625 #: ../src/guestfs-actions.pod:1487
6626 msgid "guestfs_fgrepi"
6630 #: ../src/guestfs-actions.pod:1489
6634 " guestfs_fgrepi (guestfs_h *g,\n"
6635 " const char *pattern,\n"
6636 " const char *path);\n"
6641 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:989
6642 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
6646 #: ../src/guestfs-actions.pod:1506
6647 msgid "guestfs_file"
6651 #: ../src/guestfs-actions.pod:1508
6655 " guestfs_file (guestfs_h *g,\n"
6656 " const char *path);\n"
6661 #: ../src/guestfs-actions.pod:1512 ../fish/guestfish-actions.pod:999
6663 "This call uses the standard L<file(1)> command to determine the type or "
6664 "contents of the file."
6668 #: ../src/guestfs-actions.pod:1515 ../fish/guestfish-actions.pod:1002
6670 "This call will also transparently look inside various types of compressed "
6675 #: ../src/guestfs-actions.pod:1518 ../fish/guestfish-actions.pod:1005
6677 "The exact command which runs is C<file -zb path>. Note in particular that "
6678 "the filename is not prepended to the output (the C<-b> option)."
6682 #: ../src/guestfs-actions.pod:1522
6684 "This command can also be used on C</dev/> devices (and partitions, LV "
6685 "names). You can for example use this to determine if a device contains a "
6686 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
6690 #: ../src/guestfs-actions.pod:1527 ../fish/guestfish-actions.pod:1014
6692 "If the C<path> does not begin with C</dev/> then this command only works for "
6693 "the content of regular files. For other file types (directory, symbolic "
6694 "link etc) it will just return the string C<directory> etc."
6698 #: ../src/guestfs-actions.pod:1537
6699 msgid "guestfs_file_architecture"
6703 #: ../src/guestfs-actions.pod:1539
6707 " guestfs_file_architecture (guestfs_h *g,\n"
6708 " const char *filename);\n"
6713 #: ../src/guestfs-actions.pod:1543 ../fish/guestfish-actions.pod:1023
6715 "This detects the architecture of the binary C<filename>, and returns it if "
6720 #: ../src/guestfs-actions.pod:1546 ../fish/guestfish-actions.pod:1026
6721 msgid "Currently defined architectures are:"
6725 #: ../src/guestfs-actions.pod:1550 ../fish/guestfish-actions.pod:1030
6730 #: ../src/guestfs-actions.pod:1552 ../fish/guestfish-actions.pod:1032
6732 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
6733 "irrespective of the precise processor requirements of the binary."
6737 #: ../src/guestfs-actions.pod:1555 ../fish/guestfish-actions.pod:1035
6742 #: ../src/guestfs-actions.pod:1557 ../fish/guestfish-actions.pod:1037
6743 msgid "64 bit x86-64."
6747 #: ../src/guestfs-actions.pod:1559 ../fish/guestfish-actions.pod:1039
6752 #: ../src/guestfs-actions.pod:1561 ../fish/guestfish-actions.pod:1041
6753 msgid "32 bit SPARC."
6757 #: ../src/guestfs-actions.pod:1563 ../fish/guestfish-actions.pod:1043
6762 #: ../src/guestfs-actions.pod:1565 ../fish/guestfish-actions.pod:1045
6763 msgid "64 bit SPARC V9 and above."
6767 #: ../src/guestfs-actions.pod:1567 ../fish/guestfish-actions.pod:1047
6772 #: ../src/guestfs-actions.pod:1569 ../fish/guestfish-actions.pod:1049
6773 msgid "Intel Itanium."
6777 #: ../src/guestfs-actions.pod:1571 ../fish/guestfish-actions.pod:1051
6782 #: ../src/guestfs-actions.pod:1573 ../fish/guestfish-actions.pod:1053
6783 msgid "32 bit Power PC."
6787 #: ../src/guestfs-actions.pod:1575 ../fish/guestfish-actions.pod:1055
6792 #: ../src/guestfs-actions.pod:1577 ../fish/guestfish-actions.pod:1057
6793 msgid "64 bit Power PC."
6797 #: ../src/guestfs-actions.pod:1581 ../fish/guestfish-actions.pod:1061
6798 msgid "Libguestfs may return other architecture strings in future."
6802 #: ../src/guestfs-actions.pod:1583 ../fish/guestfish-actions.pod:1063
6803 msgid "The function works on at least the following types of files:"
6807 #: ../src/guestfs-actions.pod:1589 ../fish/guestfish-actions.pod:1069
6808 msgid "many types of Un*x and Linux binary"
6812 #: ../src/guestfs-actions.pod:1593 ../fish/guestfish-actions.pod:1073
6813 msgid "many types of Un*x and Linux shared library"
6817 #: ../src/guestfs-actions.pod:1597 ../fish/guestfish-actions.pod:1077
6818 msgid "Windows Win32 and Win64 binaries"
6822 #: ../src/guestfs-actions.pod:1601 ../fish/guestfish-actions.pod:1081
6823 msgid "Windows Win32 and Win64 DLLs"
6827 #: ../src/guestfs-actions.pod:1603 ../fish/guestfish-actions.pod:1083
6828 msgid "Win32 binaries and DLLs return C<i386>."
6832 #: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1085
6833 msgid "Win64 binaries and DLLs return C<x86_64>."
6837 #: ../src/guestfs-actions.pod:1609 ../fish/guestfish-actions.pod:1089
6838 msgid "Linux kernel modules"
6842 #: ../src/guestfs-actions.pod:1613 ../fish/guestfish-actions.pod:1093
6843 msgid "Linux new-style initrd images"
6847 #: ../src/guestfs-actions.pod:1617 ../fish/guestfish-actions.pod:1097
6848 msgid "some non-x86 Linux vmlinuz kernels"
6852 #: ../src/guestfs-actions.pod:1621 ../fish/guestfish-actions.pod:1101
6853 msgid "What it can't do currently:"
6857 #: ../src/guestfs-actions.pod:1627 ../fish/guestfish-actions.pod:1107
6858 msgid "static libraries (libfoo.a)"
6862 #: ../src/guestfs-actions.pod:1631 ../fish/guestfish-actions.pod:1111
6863 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
6867 #: ../src/guestfs-actions.pod:1635 ../fish/guestfish-actions.pod:1115
6868 msgid "x86 Linux vmlinuz kernels"
6872 #: ../src/guestfs-actions.pod:1637 ../fish/guestfish-actions.pod:1117
6874 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
6875 "compressed code, and are horribly hard to unpack. If you want to find the "
6876 "architecture of a kernel, use the architecture of the associated initrd or "
6877 "kernel module(s) instead."
6881 #: ../src/guestfs-actions.pod:1647 ../src/guestfs-actions.pod:1810 ../src/guestfs-actions.pod:1827 ../src/guestfs-actions.pod:2478 ../src/guestfs-actions.pod:2559 ../src/guestfs-actions.pod:2585 ../src/guestfs-actions.pod:2612 ../src/guestfs-actions.pod:2633 ../src/guestfs-actions.pod:2666 ../src/guestfs-actions.pod:2746 ../src/guestfs-actions.pod:2806 ../src/guestfs-actions.pod:2977 ../src/guestfs-actions.pod:3109
6882 msgid "(Added in 1.5.3)"
6886 #: ../src/guestfs-actions.pod:1649
6887 msgid "guestfs_filesize"
6891 #: ../src/guestfs-actions.pod:1651
6895 " guestfs_filesize (guestfs_h *g,\n"
6896 " const char *file);\n"
6901 #: ../src/guestfs-actions.pod:1655 ../fish/guestfish-actions.pod:1128
6902 msgid "This command returns the size of C<file> in bytes."
6906 #: ../src/guestfs-actions.pod:1657
6908 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
6909 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
6910 "devices, use C<guestfs_blockdev_getsize64>."
6914 #: ../src/guestfs-actions.pod:1663
6915 msgid "(Added in 1.0.82)"
6919 #: ../src/guestfs-actions.pod:1665
6920 msgid "guestfs_fill"
6924 #: ../src/guestfs-actions.pod:1667
6928 " guestfs_fill (guestfs_h *g,\n"
6931 " const char *path);\n"
6936 #: ../src/guestfs-actions.pod:1673 ../fish/guestfish-actions.pod:1138
6938 "This command creates a new file called C<path>. The initial content of the "
6939 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
6944 #: ../src/guestfs-actions.pod:1677
6946 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
6947 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
6948 "bytes use C<guestfs_fill_pattern>."
6952 #: ../src/guestfs-actions.pod:1689
6953 msgid "(Added in 1.0.79)"
6957 #: ../src/guestfs-actions.pod:1691
6958 msgid "guestfs_fill_pattern"
6962 #: ../src/guestfs-actions.pod:1693
6966 " guestfs_fill_pattern (guestfs_h *g,\n"
6967 " const char *pattern,\n"
6969 " const char *path);\n"
6974 #: ../src/guestfs-actions.pod:1699
6976 "This function is like C<guestfs_fill> except that it creates a new file of "
6977 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
6978 "pattern is truncated if necessary to ensure the length of the file is "
6979 "exactly C<len> bytes."
6983 #: ../src/guestfs-actions.pod:1711
6984 msgid "(Added in 1.3.12)"
6988 #: ../src/guestfs-actions.pod:1713
6989 msgid "guestfs_find"
6993 #: ../src/guestfs-actions.pod:1715
6997 " guestfs_find (guestfs_h *g,\n"
6998 " const char *directory);\n"
7003 #: ../src/guestfs-actions.pod:1719 ../fish/guestfish-actions.pod:1160
7005 "This command lists out all files and directories, recursively, starting at "
7006 "C<directory>. It is essentially equivalent to running the shell command "
7007 "C<find directory -print> but some post-processing happens on the output, "
7012 #: ../src/guestfs-actions.pod:1724 ../fish/guestfish-actions.pod:1165
7014 "This returns a list of strings I<without any prefix>. Thus if the directory "
7019 #: ../src/guestfs-actions.pod:1727 ../fish/guestfish-actions.pod:1168
7029 #: ../src/guestfs-actions.pod:1731
7030 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
7034 #: ../src/guestfs-actions.pod:1734 ../fish/guestfish-actions.pod:1175
7045 #: ../src/guestfs-actions.pod:1739 ../fish/guestfish-actions.pod:1180
7046 msgid "If C<directory> is not a directory, then this command returns an error."
7050 #: ../src/guestfs-actions.pod:1742 ../fish/guestfish-actions.pod:1183
7051 msgid "The returned list is sorted."
7055 #: ../src/guestfs-actions.pod:1744
7056 msgid "See also C<guestfs_find0>."
7060 #: ../src/guestfs-actions.pod:1753 ../src/guestfs-actions.pod:3768 ../src/guestfs-actions.pod:5229
7061 msgid "(Added in 1.0.27)"
7065 #: ../src/guestfs-actions.pod:1755
7066 msgid "guestfs_find0"
7070 #: ../src/guestfs-actions.pod:1757
7074 " guestfs_find0 (guestfs_h *g,\n"
7075 " const char *directory,\n"
7076 " const char *files);\n"
7081 #: ../src/guestfs-actions.pod:1762 ../fish/guestfish-actions.pod:1194
7083 "This command lists out all files and directories, recursively, starting at "
7084 "C<directory>, placing the resulting list in the external file called "
7089 #: ../src/guestfs-actions.pod:1766
7091 "This command works the same way as C<guestfs_find> with the following "
7096 #: ../src/guestfs-actions.pod:1773 ../fish/guestfish-actions.pod:1205
7097 msgid "The resulting list is written to an external file."
7101 #: ../src/guestfs-actions.pod:1777 ../fish/guestfish-actions.pod:1209
7103 "Items (filenames) in the result are separated by C<\\0> characters. See "
7104 "L<find(1)> option I<-print0>."
7108 #: ../src/guestfs-actions.pod:1782 ../fish/guestfish-actions.pod:1214
7109 msgid "This command is not limited in the number of names that it can return."
7113 #: ../src/guestfs-actions.pod:1787 ../fish/guestfish-actions.pod:1219
7114 msgid "The result list is not sorted."
7118 #: ../src/guestfs-actions.pod:1793
7119 msgid "(Added in 1.0.74)"
7123 #: ../src/guestfs-actions.pod:1795
7124 msgid "guestfs_findfs_label"
7128 #: ../src/guestfs-actions.pod:1797
7132 " guestfs_findfs_label (guestfs_h *g,\n"
7133 " const char *label);\n"
7138 #: ../src/guestfs-actions.pod:1801 ../fish/guestfish-actions.pod:1229
7140 "This command searches the filesystems and returns the one which has the "
7141 "given label. An error is returned if no such filesystem can be found."
7145 #: ../src/guestfs-actions.pod:1805
7146 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
7150 #: ../src/guestfs-actions.pod:1812
7151 msgid "guestfs_findfs_uuid"
7155 #: ../src/guestfs-actions.pod:1814
7159 " guestfs_findfs_uuid (guestfs_h *g,\n"
7160 " const char *uuid);\n"
7165 #: ../src/guestfs-actions.pod:1818 ../fish/guestfish-actions.pod:1239
7167 "This command searches the filesystems and returns the one which has the "
7168 "given UUID. An error is returned if no such filesystem can be found."
7172 #: ../src/guestfs-actions.pod:1822
7173 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
7177 #: ../src/guestfs-actions.pod:1829
7178 msgid "guestfs_fsck"
7182 #: ../src/guestfs-actions.pod:1831
7186 " guestfs_fsck (guestfs_h *g,\n"
7187 " const char *fstype,\n"
7188 " const char *device);\n"
7193 #: ../src/guestfs-actions.pod:1836 ../fish/guestfish-actions.pod:1249
7195 "This runs the filesystem checker (fsck) on C<device> which should have "
7196 "filesystem type C<fstype>."
7200 #: ../src/guestfs-actions.pod:1839 ../fish/guestfish-actions.pod:1252
7202 "The returned integer is the status. See L<fsck(8)> for the list of status "
7203 "codes from C<fsck>."
7207 #: ../src/guestfs-actions.pod:1848 ../fish/guestfish-actions.pod:1261
7208 msgid "Multiple status codes can be summed together."
7212 #: ../src/guestfs-actions.pod:1852 ../fish/guestfish-actions.pod:1265
7214 "A non-zero return code can mean \"success\", for example if errors have been "
7215 "corrected on the filesystem."
7219 #: ../src/guestfs-actions.pod:1857 ../fish/guestfish-actions.pod:1270
7220 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
7224 #: ../src/guestfs-actions.pod:1862 ../fish/guestfish-actions.pod:1275
7225 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
7229 #: ../src/guestfs-actions.pod:1866 ../src/guestfs-actions.pod:6866
7230 msgid "(Added in 1.0.16)"
7234 #: ../src/guestfs-actions.pod:1868
7235 msgid "guestfs_get_append"
7239 #: ../src/guestfs-actions.pod:1870
7243 " guestfs_get_append (guestfs_h *g);\n"
7248 #: ../src/guestfs-actions.pod:1873 ../fish/guestfish-actions.pod:1281
7250 "Return the additional kernel options which are added to the guest kernel "
7255 #: ../src/guestfs-actions.pod:1876 ../fish/guestfish-actions.pod:1284
7256 msgid "If C<NULL> then no options are added."
7260 #: ../src/guestfs-actions.pod:1878
7262 "This function returns a string which may be NULL. There is no way to return "
7263 "an error from this function. The string is owned by the guest handle and "
7264 "must I<not> be freed."
7268 #: ../src/guestfs-actions.pod:1882 ../src/guestfs-actions.pod:4907 ../src/guestfs-actions.pod:5370 ../src/guestfs-actions.pod:5738 ../src/guestfs-actions.pod:5757 ../src/guestfs-actions.pod:5773 ../src/guestfs-actions.pod:5790 ../src/guestfs-actions.pod:6537 ../src/guestfs-actions.pod:6555 ../src/guestfs-actions.pod:6909
7269 msgid "(Added in 1.0.26)"
7273 #: ../src/guestfs-actions.pod:1884
7274 msgid "guestfs_get_autosync"
7278 #: ../src/guestfs-actions.pod:1886
7282 " guestfs_get_autosync (guestfs_h *g);\n"
7287 #: ../src/guestfs-actions.pod:1889 ../fish/guestfish-actions.pod:1290
7288 msgid "Get the autosync flag."
7292 #: ../src/guestfs-actions.pod:1895
7293 msgid "guestfs_get_direct"
7297 #: ../src/guestfs-actions.pod:1897
7301 " guestfs_get_direct (guestfs_h *g);\n"
7306 #: ../src/guestfs-actions.pod:1900 ../fish/guestfish-actions.pod:1296
7307 msgid "Return the direct appliance mode flag."
7311 #: ../src/guestfs-actions.pod:1904 ../src/guestfs-actions.pod:5411
7312 msgid "(Added in 1.0.72)"
7316 #: ../src/guestfs-actions.pod:1906
7317 msgid "guestfs_get_e2label"
7321 #: ../src/guestfs-actions.pod:1908
7325 " guestfs_get_e2label (guestfs_h *g,\n"
7326 " const char *device);\n"
7331 #: ../src/guestfs-actions.pod:1912 ../fish/guestfish-actions.pod:1302
7332 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
7336 #: ../src/guestfs-actions.pod:1918 ../fish/guestfish-actions.pod:1305
7338 "This function is deprecated. In new code, use the C<vfs_label> call "
7343 #: ../src/guestfs-actions.pod:1925 ../src/guestfs-actions.pod:1946 ../src/guestfs-actions.pod:5429 ../src/guestfs-actions.pod:5448
7344 msgid "(Added in 1.0.15)"
7348 #: ../src/guestfs-actions.pod:1927
7349 msgid "guestfs_get_e2uuid"
7353 #: ../src/guestfs-actions.pod:1929
7357 " guestfs_get_e2uuid (guestfs_h *g,\n"
7358 " const char *device);\n"
7363 #: ../src/guestfs-actions.pod:1933 ../fish/guestfish-actions.pod:1316
7364 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
7368 #: ../src/guestfs-actions.pod:1939 ../fish/guestfish-actions.pod:1319
7369 msgid "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
7373 #: ../src/guestfs-actions.pod:1948
7374 msgid "guestfs_get_memsize"
7378 #: ../src/guestfs-actions.pod:1950
7382 " guestfs_get_memsize (guestfs_h *g);\n"
7387 #: ../src/guestfs-actions.pod:1953 ../fish/guestfish-actions.pod:1330
7388 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
7392 #: ../src/guestfs-actions.pod:1956
7394 "If C<guestfs_set_memsize> was not called on this handle, and if "
7395 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
7396 "value for memsize."
7400 #: ../src/guestfs-actions.pod:1960 ../src/guestfs-actions.pod:2041 ../src/guestfs-actions.pod:5464 ../src/guestfs-actions.pod:5571 ../fish/guestfish-actions.pod:1337 ../fish/guestfish-actions.pod:1388 ../fish/guestfish-actions.pod:3665 ../fish/guestfish-actions.pod:3752
7401 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
7405 #: ../src/guestfs-actions.pod:1965 ../src/guestfs-actions.pod:4059 ../src/guestfs-actions.pod:4174 ../src/guestfs-actions.pod:4193 ../src/guestfs-actions.pod:4212 ../src/guestfs-actions.pod:4224 ../src/guestfs-actions.pod:4241 ../src/guestfs-actions.pod:4254 ../src/guestfs-actions.pod:5132 ../src/guestfs-actions.pod:5469 ../src/guestfs-actions.pod:5712 ../src/guestfs-actions.pod:6313
7406 msgid "(Added in 1.0.55)"
7410 #: ../src/guestfs-actions.pod:1967
7411 msgid "guestfs_get_network"
7415 #: ../src/guestfs-actions.pod:1969
7419 " guestfs_get_network (guestfs_h *g);\n"
7424 #: ../src/guestfs-actions.pod:1972 ../fish/guestfish-actions.pod:1344
7425 msgid "This returns the enable network flag."
7429 #: ../src/guestfs-actions.pod:1976 ../src/guestfs-actions.pod:5488
7430 msgid "(Added in 1.5.4)"
7434 #: ../src/guestfs-actions.pod:1978
7435 msgid "guestfs_get_path"
7439 #: ../src/guestfs-actions.pod:1980
7443 " guestfs_get_path (guestfs_h *g);\n"
7448 #: ../src/guestfs-actions.pod:1983 ../fish/guestfish-actions.pod:1350
7449 msgid "Return the current search path."
7453 #: ../src/guestfs-actions.pod:1985 ../fish/guestfish-actions.pod:1352
7455 "This is always non-NULL. If it wasn't set already, then this will return "
7460 #: ../src/guestfs-actions.pod:1988 ../src/guestfs-actions.pod:2017
7462 "This function returns a string, or NULL on error. The string is owned by "
7463 "the guest handle and must I<not> be freed."
7467 #: ../src/guestfs-actions.pod:1993
7468 msgid "guestfs_get_pid"
7472 #: ../src/guestfs-actions.pod:1995
7476 " guestfs_get_pid (guestfs_h *g);\n"
7481 #: ../src/guestfs-actions.pod:1998 ../fish/guestfish-actions.pod:1361
7483 "Return the process ID of the qemu subprocess. If there is no qemu "
7484 "subprocess, then this will return an error."
7488 #: ../src/guestfs-actions.pod:2001 ../fish/guestfish-actions.pod:1364
7489 msgid "This is an internal call used for debugging and testing."
7493 #: ../src/guestfs-actions.pod:2005
7494 msgid "(Added in 1.0.56)"
7498 #: ../src/guestfs-actions.pod:2007
7499 msgid "guestfs_get_qemu"
7503 #: ../src/guestfs-actions.pod:2009
7507 " guestfs_get_qemu (guestfs_h *g);\n"
7512 #: ../src/guestfs-actions.pod:2012 ../fish/guestfish-actions.pod:1370
7513 msgid "Return the current qemu binary."
7517 #: ../src/guestfs-actions.pod:2014 ../fish/guestfish-actions.pod:1372
7519 "This is always non-NULL. If it wasn't set already, then this will return "
7520 "the default qemu binary name."
7524 #: ../src/guestfs-actions.pod:2020 ../src/guestfs-actions.pod:5533
7525 msgid "(Added in 1.0.6)"
7529 #: ../src/guestfs-actions.pod:2022
7530 msgid "guestfs_get_recovery_proc"
7534 #: ../src/guestfs-actions.pod:2024
7538 " guestfs_get_recovery_proc (guestfs_h *g);\n"
7543 #: ../src/guestfs-actions.pod:2027 ../fish/guestfish-actions.pod:1379
7544 msgid "Return the recovery process enabled flag."
7548 #: ../src/guestfs-actions.pod:2031 ../src/guestfs-actions.pod:3199 ../src/guestfs-actions.pod:3466 ../src/guestfs-actions.pod:3866 ../src/guestfs-actions.pod:3898 ../src/guestfs-actions.pod:4837 ../src/guestfs-actions.pod:5180 ../src/guestfs-actions.pod:5557 ../src/guestfs-actions.pod:6216 ../src/guestfs-actions.pod:6236 ../src/guestfs-actions.pod:6418
7549 msgid "(Added in 1.0.77)"
7553 #: ../src/guestfs-actions.pod:2033
7554 msgid "guestfs_get_selinux"
7558 #: ../src/guestfs-actions.pod:2035
7562 " guestfs_get_selinux (guestfs_h *g);\n"
7567 #: ../src/guestfs-actions.pod:2038
7569 "This returns the current setting of the selinux flag which is passed to the "
7570 "appliance at boot time. See C<guestfs_set_selinux>."
7574 #: ../src/guestfs-actions.pod:2046 ../src/guestfs-actions.pod:2109 ../src/guestfs-actions.pod:5576 ../src/guestfs-actions.pod:5630
7575 msgid "(Added in 1.0.67)"
7579 #: ../src/guestfs-actions.pod:2048
7580 msgid "guestfs_get_state"
7584 #: ../src/guestfs-actions.pod:2050
7588 " guestfs_get_state (guestfs_h *g);\n"
7593 #: ../src/guestfs-actions.pod:2053 ../fish/guestfish-actions.pod:1395
7595 "This returns the current state as an opaque integer. This is only useful "
7596 "for printing debug and internal error messages."
7600 #: ../src/guestfs-actions.pod:2056 ../src/guestfs-actions.pod:3002 ../src/guestfs-actions.pod:3031 ../src/guestfs-actions.pod:3092 ../src/guestfs-actions.pod:3119 ../fish/guestfish-actions.pod:1398 ../fish/guestfish-actions.pod:2098 ../fish/guestfish-actions.pod:2116 ../fish/guestfish-actions.pod:2154 ../fish/guestfish-actions.pod:2170
7601 msgid "For more information on states, see L<guestfs(3)>."
7605 #: ../src/guestfs-actions.pod:2062
7606 msgid "guestfs_get_trace"
7610 #: ../src/guestfs-actions.pod:2064
7614 " guestfs_get_trace (guestfs_h *g);\n"
7619 #: ../src/guestfs-actions.pod:2067 ../fish/guestfish-actions.pod:1404
7620 msgid "Return the command trace flag."
7624 #: ../src/guestfs-actions.pod:2073
7625 msgid "guestfs_get_umask"
7629 #: ../src/guestfs-actions.pod:2075
7633 " guestfs_get_umask (guestfs_h *g);\n"
7638 #: ../src/guestfs-actions.pod:2078
7640 "Return the current umask. By default the umask is C<022> unless it has been "
7641 "set by calling C<guestfs_umask>."
7645 #: ../src/guestfs-actions.pod:2085
7646 msgid "guestfs_get_verbose"
7650 #: ../src/guestfs-actions.pod:2087
7654 " guestfs_get_verbose (guestfs_h *g);\n"
7659 #: ../src/guestfs-actions.pod:2090 ../fish/guestfish-actions.pod:1417
7660 msgid "This returns the verbose messages flag."
7664 #: ../src/guestfs-actions.pod:2096
7665 msgid "guestfs_getcon"
7669 #: ../src/guestfs-actions.pod:2098
7673 " guestfs_getcon (guestfs_h *g);\n"
7678 #: ../src/guestfs-actions.pod:2101 ../fish/guestfish-actions.pod:1423
7679 msgid "This gets the SELinux security context of the daemon."
7683 #: ../src/guestfs-actions.pod:2103
7684 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
7688 #: ../src/guestfs-actions.pod:2111
7689 msgid "guestfs_getxattrs"
7693 #: ../src/guestfs-actions.pod:2113
7696 " struct guestfs_xattr_list *\n"
7697 " guestfs_getxattrs (guestfs_h *g,\n"
7698 " const char *path);\n"
7703 #: ../src/guestfs-actions.pod:2117 ../fish/guestfish-actions.pod:1432
7704 msgid "This call lists the extended attributes of the file or directory C<path>."
7708 #: ../src/guestfs-actions.pod:2120 ../fish/guestfish-actions.pod:1435
7710 "At the system call level, this is a combination of the L<listxattr(2)> and "
7711 "L<getxattr(2)> calls."
7715 #: ../src/guestfs-actions.pod:2123
7716 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
7720 #: ../src/guestfs-actions.pod:2125 ../src/guestfs-actions.pod:3211 ../src/guestfs-actions.pod:3862
7722 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
7723 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
7727 #: ../src/guestfs-actions.pod:2129 ../src/guestfs-actions.pod:3215 ../src/guestfs-actions.pod:3380 ../src/guestfs-actions.pod:3416 ../src/guestfs-actions.pod:5210 ../src/guestfs-actions.pod:5649 ../src/guestfs-actions.pod:6974
7728 msgid "(Added in 1.0.59)"
7732 #: ../src/guestfs-actions.pod:2131
7733 msgid "guestfs_glob_expand"
7737 #: ../src/guestfs-actions.pod:2133
7741 " guestfs_glob_expand (guestfs_h *g,\n"
7742 " const char *pattern);\n"
7747 #: ../src/guestfs-actions.pod:2137 ../fish/guestfish-actions.pod:1444
7749 "This command searches for all the pathnames matching C<pattern> according to "
7750 "the wildcard expansion rules used by the shell."
7754 #: ../src/guestfs-actions.pod:2141 ../fish/guestfish-actions.pod:1448
7755 msgid "If no paths match, then this returns an empty list (note: not an error)."
7759 #: ../src/guestfs-actions.pod:2144 ../fish/guestfish-actions.pod:1451
7761 "It is just a wrapper around the C L<glob(3)> function with flags "
7762 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
7766 #: ../src/guestfs-actions.pod:2152 ../src/guestfs-actions.pod:5814 ../src/guestfs-actions.pod:5831
7767 msgid "(Added in 1.0.50)"
7771 #: ../src/guestfs-actions.pod:2154
7772 msgid "guestfs_grep"
7776 #: ../src/guestfs-actions.pod:2156
7780 " guestfs_grep (guestfs_h *g,\n"
7781 " const char *regex,\n"
7782 " const char *path);\n"
7787 #: ../src/guestfs-actions.pod:2161 ../fish/guestfish-actions.pod:1459
7788 msgid "This calls the external C<grep> program and returns the matching lines."
7792 #: ../src/guestfs-actions.pod:2173
7793 msgid "guestfs_grepi"
7797 #: ../src/guestfs-actions.pod:2175
7801 " guestfs_grepi (guestfs_h *g,\n"
7802 " const char *regex,\n"
7803 " const char *path);\n"
7808 #: ../src/guestfs-actions.pod:2180 ../fish/guestfish-actions.pod:1469
7809 msgid "This calls the external C<grep -i> program and returns the matching lines."
7813 #: ../src/guestfs-actions.pod:2192
7814 msgid "guestfs_grub_install"
7818 #: ../src/guestfs-actions.pod:2194
7822 " guestfs_grub_install (guestfs_h *g,\n"
7823 " const char *root,\n"
7824 " const char *device);\n"
7829 #: ../src/guestfs-actions.pod:2199 ../fish/guestfish-actions.pod:1479
7831 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
7832 "the root directory being C<root>."
7836 #: ../src/guestfs-actions.pod:2202 ../fish/guestfish-actions.pod:1482
7838 "Note: If grub-install reports the error \"No suitable drive was found in the "
7839 "generated device map.\" it may be that you need to create a "
7840 "C</boot/grub/device.map> file first that contains the mapping between grub "
7841 "device names and Linux device names. It is usually sufficient to create a "
7846 #: ../src/guestfs-actions.pod:2209 ../fish/guestfish-actions.pod:1489
7854 #: ../src/guestfs-actions.pod:2211 ../fish/guestfish-actions.pod:1491
7855 msgid "replacing C</dev/vda> with the name of the installation device."
7859 #: ../src/guestfs-actions.pod:2215
7860 msgid "(Added in 1.0.17)"
7864 #: ../src/guestfs-actions.pod:2217
7865 msgid "guestfs_head"
7869 #: ../src/guestfs-actions.pod:2219
7873 " guestfs_head (guestfs_h *g,\n"
7874 " const char *path);\n"
7879 #: ../src/guestfs-actions.pod:2223 ../fish/guestfish-actions.pod:1497
7881 "This command returns up to the first 10 lines of a file as a list of "
7886 #: ../src/guestfs-actions.pod:2235
7887 msgid "guestfs_head_n"
7891 #: ../src/guestfs-actions.pod:2237
7895 " guestfs_head_n (guestfs_h *g,\n"
7897 " const char *path);\n"
7902 #: ../src/guestfs-actions.pod:2242 ../fish/guestfish-actions.pod:1507
7904 "If the parameter C<nrlines> is a positive number, this returns the first "
7905 "C<nrlines> lines of the file C<path>."
7909 #: ../src/guestfs-actions.pod:2245 ../fish/guestfish-actions.pod:1510
7911 "If the parameter C<nrlines> is a negative number, this returns lines from "
7912 "the file C<path>, excluding the last C<nrlines> lines."
7916 #: ../src/guestfs-actions.pod:2248 ../src/guestfs-actions.pod:6111 ../fish/guestfish-actions.pod:1513 ../fish/guestfish-actions.pod:4098
7917 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
7921 #: ../src/guestfs-actions.pod:2259
7922 msgid "guestfs_hexdump"
7926 #: ../src/guestfs-actions.pod:2261
7930 " guestfs_hexdump (guestfs_h *g,\n"
7931 " const char *path);\n"
7936 #: ../src/guestfs-actions.pod:2265 ../fish/guestfish-actions.pod:1522
7938 "This runs C<hexdump -C> on the given C<path>. The result is the "
7939 "human-readable, canonical hex dump of the file."
7943 #: ../src/guestfs-actions.pod:2274 ../src/guestfs-actions.pod:5895 ../src/guestfs-actions.pod:5950
7944 msgid "(Added in 1.0.22)"
7948 #: ../src/guestfs-actions.pod:2276
7949 msgid "guestfs_initrd_cat"
7953 #: ../src/guestfs-actions.pod:2278
7957 " guestfs_initrd_cat (guestfs_h *g,\n"
7958 " const char *initrdpath,\n"
7959 " const char *filename,\n"
7960 " size_t *size_r);\n"
7965 #: ../src/guestfs-actions.pod:2284 ../fish/guestfish-actions.pod:1532
7967 "This command unpacks the file C<filename> from the initrd file called "
7968 "C<initrdpath>. The filename must be given I<without> the initial C</> "
7973 #: ../src/guestfs-actions.pod:2288 ../fish/guestfish-actions.pod:1536
7975 "For example, in guestfish you could use the following command to examine the "
7976 "boot script (usually called C</init>) contained in a Linux initrd or "
7981 #: ../src/guestfs-actions.pod:2292 ../fish/guestfish-actions.pod:1540
7984 " initrd-cat /boot/initrd-<version>.img init\n"
7989 #: ../src/guestfs-actions.pod:2294
7990 msgid "See also C<guestfs_initrd_list>."
7994 #: ../src/guestfs-actions.pod:2296 ../src/guestfs-actions.pod:4830 ../src/guestfs-actions.pod:4856 ../src/guestfs-actions.pod:5037
7996 "This function returns a buffer, or NULL on error. The size of the returned "
7997 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
8002 #: ../src/guestfs-actions.pod:2305
8003 msgid "guestfs_initrd_list"
8007 #: ../src/guestfs-actions.pod:2307
8011 " guestfs_initrd_list (guestfs_h *g,\n"
8012 " const char *path);\n"
8017 #: ../src/guestfs-actions.pod:2311 ../fish/guestfish-actions.pod:1551
8018 msgid "This command lists out files contained in an initrd."
8022 #: ../src/guestfs-actions.pod:2313 ../fish/guestfish-actions.pod:1553
8024 "The files are listed without any initial C</> character. The files are "
8025 "listed in the order they appear (not necessarily alphabetical). Directory "
8026 "names are listed as separate items."
8030 #: ../src/guestfs-actions.pod:2317 ../fish/guestfish-actions.pod:1557
8032 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
8033 "initrd. We I<only> support the newer initramfs format (compressed cpio "
8038 #: ../src/guestfs-actions.pod:2327
8039 msgid "guestfs_inotify_add_watch"
8043 #: ../src/guestfs-actions.pod:2329
8047 " guestfs_inotify_add_watch (guestfs_h *g,\n"
8048 " const char *path,\n"
8054 #: ../src/guestfs-actions.pod:2334 ../fish/guestfish-actions.pod:1565
8055 msgid "Watch C<path> for the events listed in C<mask>."
8059 #: ../src/guestfs-actions.pod:2336 ../fish/guestfish-actions.pod:1567
8061 "Note that if C<path> is a directory then events within that directory are "
8062 "watched, but this does I<not> happen recursively (in subdirectories)."
8066 #: ../src/guestfs-actions.pod:2340 ../fish/guestfish-actions.pod:1571
8068 "Note for non-C or non-Linux callers: the inotify events are defined by the "
8069 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
8073 #: ../src/guestfs-actions.pod:2348
8074 msgid "guestfs_inotify_close"
8078 #: ../src/guestfs-actions.pod:2350
8082 " guestfs_inotify_close (guestfs_h *g);\n"
8087 #: ../src/guestfs-actions.pod:2353 ../fish/guestfish-actions.pod:1579
8089 "This closes the inotify handle which was previously opened by inotify_init. "
8090 "It removes all watches, throws away any pending events, and deallocates all "
8095 #: ../src/guestfs-actions.pod:2361
8096 msgid "guestfs_inotify_files"
8100 #: ../src/guestfs-actions.pod:2363
8104 " guestfs_inotify_files (guestfs_h *g);\n"
8109 #: ../src/guestfs-actions.pod:2366
8111 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
8112 "returns a list of pathnames of objects that were touched. The returned "
8113 "pathnames are sorted and deduplicated."
8117 #: ../src/guestfs-actions.pod:2376
8118 msgid "guestfs_inotify_init"
8122 #: ../src/guestfs-actions.pod:2378
8126 " guestfs_inotify_init (guestfs_h *g,\n"
8127 " int maxevents);\n"
8132 #: ../src/guestfs-actions.pod:2382 ../fish/guestfish-actions.pod:1595
8134 "This command creates a new inotify handle. The inotify subsystem can be "
8135 "used to notify events which happen to objects in the guest filesystem."
8139 #: ../src/guestfs-actions.pod:2386
8141 "C<maxevents> is the maximum number of events which will be queued up between "
8142 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
8143 "passed as C<0>, then the kernel (or previously set) default is used. For "
8144 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
8145 "throws away events, but records the fact that it threw them away by setting "
8146 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
8147 "C<guestfs_inotify_read>)."
8151 #: ../src/guestfs-actions.pod:2396
8153 "Before any events are generated, you have to add some watches to the "
8154 "internal watch list. See: C<guestfs_inotify_add_watch>, "
8155 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
8159 #: ../src/guestfs-actions.pod:2402
8161 "Queued up events should be read periodically by calling "
8162 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
8163 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
8164 "often enough then you risk the internal queue overflowing."
8168 #: ../src/guestfs-actions.pod:2409
8170 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
8171 "This also removes any watches automatically."
8175 #: ../src/guestfs-actions.pod:2413 ../fish/guestfish-actions.pod:1626
8177 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
8178 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
8179 "that there is one global inotify handle per libguestfs instance."
8183 #: ../src/guestfs-actions.pod:2422
8184 msgid "guestfs_inotify_read"
8188 #: ../src/guestfs-actions.pod:2424
8191 " struct guestfs_inotify_event_list *\n"
8192 " guestfs_inotify_read (guestfs_h *g);\n"
8197 #: ../src/guestfs-actions.pod:2427 ../fish/guestfish-actions.pod:1635
8199 "Return the complete queue of events that have happened since the previous "
8204 #: ../src/guestfs-actions.pod:2430 ../fish/guestfish-actions.pod:1638
8205 msgid "If no events have happened, this returns an empty list."
8209 #: ../src/guestfs-actions.pod:2432 ../fish/guestfish-actions.pod:1640
8211 "I<Note>: In order to make sure that all events have been read, you must call "
8212 "this function repeatedly until it returns an empty list. The reason is that "
8213 "the call will read events up to the maximum appliance-to-host message size "
8214 "and leave remaining events in the queue."
8218 #: ../src/guestfs-actions.pod:2438
8220 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
8221 "there was an error. I<The caller must call "
8222 "C<guestfs_free_inotify_event_list> after use>."
8226 #: ../src/guestfs-actions.pod:2444
8227 msgid "guestfs_inotify_rm_watch"
8231 #: ../src/guestfs-actions.pod:2446
8235 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
8241 #: ../src/guestfs-actions.pod:2450
8243 "Remove a previously defined inotify watch. See "
8244 "C<guestfs_inotify_add_watch>."
8248 #: ../src/guestfs-actions.pod:2457
8249 msgid "guestfs_inspect_get_arch"
8253 #: ../src/guestfs-actions.pod:2459
8257 " guestfs_inspect_get_arch (guestfs_h *g,\n"
8258 " const char *root);\n"
8263 #: ../src/guestfs-actions.pod:2463 ../src/guestfs-actions.pod:2486 ../src/guestfs-actions.pod:2567 ../src/guestfs-actions.pod:2593 ../src/guestfs-actions.pod:2620 ../src/guestfs-actions.pod:2641 ../src/guestfs-actions.pod:2674 ../src/guestfs-actions.pod:2701 ../src/guestfs-actions.pod:2730 ../src/guestfs-actions.pod:2772 ../src/guestfs-actions.pod:2814 ../src/guestfs-actions.pod:2837
8265 "This function should only be called with a root device string as returned by "
8266 "C<guestfs_inspect_os>."
8270 #: ../src/guestfs-actions.pod:2466
8272 "This returns the architecture of the inspected operating system. The "
8273 "possible return values are listed under C<guestfs_file_architecture>."
8277 #: ../src/guestfs-actions.pod:2470 ../fish/guestfish-actions.pod:1664
8279 "If the architecture could not be determined, then the string C<unknown> is "
8284 #: ../src/guestfs-actions.pod:2473 ../src/guestfs-actions.pod:2554 ../src/guestfs-actions.pod:2608 ../src/guestfs-actions.pod:2690 ../src/guestfs-actions.pod:2719 ../src/guestfs-actions.pod:2741 ../src/guestfs-actions.pod:2760 ../src/guestfs-actions.pod:2801 ../src/guestfs-actions.pod:2824 ../src/guestfs-actions.pod:2930 ../src/guestfs-actions.pod:2969 ../fish/guestfish-actions.pod:1667 ../fish/guestfish-actions.pod:1741 ../fish/guestfish-actions.pod:1780 ../fish/guestfish-actions.pod:1840 ../fish/guestfish-actions.pod:1864 ../fish/guestfish-actions.pod:1881 ../fish/guestfish-actions.pod:1894 ../fish/guestfish-actions.pod:1929 ../fish/guestfish-actions.pod:1945 ../fish/guestfish-actions.pod:2044 ../fish/guestfish-actions.pod:2078
8285 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
8289 #: ../src/guestfs-actions.pod:2480
8290 msgid "guestfs_inspect_get_distro"
8294 #: ../src/guestfs-actions.pod:2482
8298 " guestfs_inspect_get_distro (guestfs_h *g,\n"
8299 " const char *root);\n"
8304 #: ../src/guestfs-actions.pod:2489 ../fish/guestfish-actions.pod:1676
8305 msgid "This returns the distro (distribution) of the inspected operating system."
8309 #: ../src/guestfs-actions.pod:2492 ../fish/guestfish-actions.pod:1679
8310 msgid "Currently defined distros are:"
8314 #: ../src/guestfs-actions.pod:2496 ../fish/guestfish-actions.pod:1683
8315 msgid "\"archlinux\""
8319 #: ../src/guestfs-actions.pod:2498 ../fish/guestfish-actions.pod:1685
8324 #: ../src/guestfs-actions.pod:2500 ../fish/guestfish-actions.pod:1687
8329 #: ../src/guestfs-actions.pod:2502 ../fish/guestfish-actions.pod:1689
8334 #: ../src/guestfs-actions.pod:2504 ../fish/guestfish-actions.pod:1691
8339 #: ../src/guestfs-actions.pod:2506 ../fish/guestfish-actions.pod:1693
8344 #: ../src/guestfs-actions.pod:2508 ../fish/guestfish-actions.pod:1695
8349 #: ../src/guestfs-actions.pod:2510 ../fish/guestfish-actions.pod:1697
8354 #: ../src/guestfs-actions.pod:2512 ../fish/guestfish-actions.pod:1699
8355 msgid "\"linuxmint\""
8359 #: ../src/guestfs-actions.pod:2514 ../fish/guestfish-actions.pod:1701
8364 #: ../src/guestfs-actions.pod:2516 ../fish/guestfish-actions.pod:1703
8365 msgid "\"mandriva\""
8369 #: ../src/guestfs-actions.pod:2518 ../fish/guestfish-actions.pod:1705
8374 #: ../src/guestfs-actions.pod:2520 ../fish/guestfish-actions.pod:1707
8379 #: ../src/guestfs-actions.pod:2522 ../fish/guestfish-actions.pod:1709
8384 #: ../src/guestfs-actions.pod:2524 ../fish/guestfish-actions.pod:1711
8389 #: ../src/guestfs-actions.pod:2526 ../fish/guestfish-actions.pod:1713
8394 #: ../src/guestfs-actions.pod:2528 ../fish/guestfish-actions.pod:1715
8395 msgid "\"redhat-based\""
8399 #: ../src/guestfs-actions.pod:2530 ../fish/guestfish-actions.pod:1717
8400 msgid "Some Red Hat-derived distro."
8404 #: ../src/guestfs-actions.pod:2532 ../fish/guestfish-actions.pod:1719
8409 #: ../src/guestfs-actions.pod:2534 ../fish/guestfish-actions.pod:1721
8410 msgid "Red Hat Enterprise Linux and some derivatives."
8414 #: ../src/guestfs-actions.pod:2536 ../fish/guestfish-actions.pod:1723
8419 #: ../src/guestfs-actions.pod:2538 ../fish/guestfish-actions.pod:1725
8424 #: ../src/guestfs-actions.pod:2540 ../src/guestfs-actions.pod:2792 ../fish/guestfish-actions.pod:1727 ../fish/guestfish-actions.pod:1920
8429 #: ../src/guestfs-actions.pod:2542 ../fish/guestfish-actions.pod:1729
8430 msgid "The distro could not be determined."
8434 #: ../src/guestfs-actions.pod:2544 ../src/guestfs-actions.pod:2784 ../fish/guestfish-actions.pod:1731 ../fish/guestfish-actions.pod:1912
8439 #: ../src/guestfs-actions.pod:2546 ../fish/guestfish-actions.pod:1733
8441 "Windows does not have distributions. This string is returned if the OS type "
8446 #: ../src/guestfs-actions.pod:2551 ../src/guestfs-actions.pod:2798 ../fish/guestfish-actions.pod:1738 ../fish/guestfish-actions.pod:1926
8448 "Future versions of libguestfs may return other strings here. The caller "
8449 "should be prepared to handle any string."
8453 #: ../src/guestfs-actions.pod:2561
8454 msgid "guestfs_inspect_get_filesystems"
8458 #: ../src/guestfs-actions.pod:2563
8462 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
8463 " const char *root);\n"
8468 #: ../src/guestfs-actions.pod:2570 ../fish/guestfish-actions.pod:1750
8470 "This returns a list of all the filesystems that we think are associated with "
8471 "this operating system. This includes the root filesystem, other ordinary "
8472 "filesystems, and non-mounted devices like swap partitions."
8476 #: ../src/guestfs-actions.pod:2575 ../fish/guestfish-actions.pod:1755
8478 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
8479 "to be shared between operating systems."
8483 #: ../src/guestfs-actions.pod:2578
8485 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8486 "C<guestfs_inspect_get_mountpoints>."
8490 #: ../src/guestfs-actions.pod:2587
8491 msgid "guestfs_inspect_get_major_version"
8495 #: ../src/guestfs-actions.pod:2589
8499 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
8500 " const char *root);\n"
8505 #: ../src/guestfs-actions.pod:2596 ../fish/guestfish-actions.pod:1768
8506 msgid "This returns the major version number of the inspected operating system."
8510 #: ../src/guestfs-actions.pod:2599 ../fish/guestfish-actions.pod:1771
8512 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
8513 "popular public names used by the operating system. Notably the operating "
8514 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
8515 "1). You can find out the real versions corresponding to releases of Windows "
8516 "by consulting Wikipedia or MSDN."
8520 #: ../src/guestfs-actions.pod:2606 ../src/guestfs-actions.pod:2626 ../fish/guestfish-actions.pod:1778 ../fish/guestfish-actions.pod:1792
8521 msgid "If the version could not be determined, then C<0> is returned."
8525 #: ../src/guestfs-actions.pod:2614
8526 msgid "guestfs_inspect_get_minor_version"
8530 #: ../src/guestfs-actions.pod:2616
8534 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
8535 " const char *root);\n"
8540 #: ../src/guestfs-actions.pod:2623 ../fish/guestfish-actions.pod:1789
8541 msgid "This returns the minor version number of the inspected operating system."
8545 #: ../src/guestfs-actions.pod:2628
8547 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8548 "C<guestfs_inspect_get_major_version>."
8552 #: ../src/guestfs-actions.pod:2635
8553 msgid "guestfs_inspect_get_mountpoints"
8557 #: ../src/guestfs-actions.pod:2637
8561 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
8562 " const char *root);\n"
8567 #: ../src/guestfs-actions.pod:2644 ../fish/guestfish-actions.pod:1804
8569 "This returns a hash of where we think the filesystems associated with this "
8570 "operating system should be mounted. Callers should note that this is at "
8571 "best an educated guess made by reading configuration files such as "
8576 #: ../src/guestfs-actions.pod:2649 ../fish/guestfish-actions.pod:1809
8578 "Each element in the returned hashtable has a key which is the path of the "
8579 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
8580 "mounted there (eg. C</dev/sda1>)."
8584 #: ../src/guestfs-actions.pod:2654 ../fish/guestfish-actions.pod:1814
8585 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
8589 #: ../src/guestfs-actions.pod:2657
8591 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8592 "C<guestfs_inspect_get_filesystems>."
8596 #: ../src/guestfs-actions.pod:2660 ../src/guestfs-actions.pod:3268 ../src/guestfs-actions.pod:4396 ../src/guestfs-actions.pod:6252
8598 "This function returns a NULL-terminated array of strings, or NULL if there "
8599 "was an error. The array of strings will always have length C<2n+1>, where "
8600 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
8601 "caller must free the strings and the array after use>."
8605 #: ../src/guestfs-actions.pod:2668
8606 msgid "guestfs_inspect_get_package_format"
8610 #: ../src/guestfs-actions.pod:2670
8614 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
8615 " const char *root);\n"
8620 #: ../src/guestfs-actions.pod:2677
8622 "This function and C<guestfs_inspect_get_package_management> return the "
8623 "package format and package management tool used by the inspected operating "
8624 "system. For example for Fedora these functions would return C<rpm> (package "
8625 "format) and C<yum> (package management)."
8629 #: ../src/guestfs-actions.pod:2683 ../fish/guestfish-actions.pod:1833
8631 "This returns the string C<unknown> if we could not determine the package "
8632 "format I<or> if the operating system does not have a real packaging system "
8637 #: ../src/guestfs-actions.pod:2687 ../fish/guestfish-actions.pod:1837
8639 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>. "
8640 "Future versions of libguestfs may return other strings."
8644 #: ../src/guestfs-actions.pod:2695
8645 msgid "guestfs_inspect_get_package_management"
8649 #: ../src/guestfs-actions.pod:2697
8653 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
8654 " const char *root);\n"
8659 #: ../src/guestfs-actions.pod:2704
8661 "C<guestfs_inspect_get_package_format> and this function return the package "
8662 "format and package management tool used by the inspected operating system. "
8663 "For example for Fedora these functions would return C<rpm> (package format) "
8664 "and C<yum> (package management)."
8668 #: ../src/guestfs-actions.pod:2710 ../fish/guestfish-actions.pod:1855
8670 "This returns the string C<unknown> if we could not determine the package "
8671 "management tool I<or> if the operating system does not have a real packaging "
8672 "system (eg. Windows)."
8676 #: ../src/guestfs-actions.pod:2714 ../fish/guestfish-actions.pod:1859
8678 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
8679 "derivatives), C<portage>, C<pisi>, C<pacman>, C<urpmi>. Future versions of "
8680 "libguestfs may return other strings."
8684 #: ../src/guestfs-actions.pod:2724
8685 msgid "guestfs_inspect_get_product_name"
8689 #: ../src/guestfs-actions.pod:2726
8693 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
8694 " const char *root);\n"
8699 #: ../src/guestfs-actions.pod:2733 ../fish/guestfish-actions.pod:1873
8701 "This returns the product name of the inspected operating system. The "
8702 "product name is generally some freeform string which can be displayed to the "
8703 "user, but should not be parsed by programs."
8707 #: ../src/guestfs-actions.pod:2738 ../fish/guestfish-actions.pod:1878
8709 "If the product name could not be determined, then the string C<unknown> is "
8714 #: ../src/guestfs-actions.pod:2748
8715 msgid "guestfs_inspect_get_roots"
8719 #: ../src/guestfs-actions.pod:2750
8723 " guestfs_inspect_get_roots (guestfs_h *g);\n"
8728 #: ../src/guestfs-actions.pod:2753
8730 "This function is a convenient way to get the list of root devices, as "
8731 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
8732 "the whole inspection process."
8736 #: ../src/guestfs-actions.pod:2757
8738 "This returns an empty list if either no root devices were found or the "
8739 "caller has not called C<guestfs_inspect_os>."
8743 #: ../src/guestfs-actions.pod:2766
8744 msgid "guestfs_inspect_get_type"
8748 #: ../src/guestfs-actions.pod:2768
8752 " guestfs_inspect_get_type (guestfs_h *g,\n"
8753 " const char *root);\n"
8758 #: ../src/guestfs-actions.pod:2775 ../fish/guestfish-actions.pod:1903
8760 "This returns the type of the inspected operating system. Currently defined "
8765 #: ../src/guestfs-actions.pod:2780 ../fish/guestfish-actions.pod:1908
8770 #: ../src/guestfs-actions.pod:2782 ../fish/guestfish-actions.pod:1910
8771 msgid "Any Linux-based operating system."
8775 #: ../src/guestfs-actions.pod:2786 ../fish/guestfish-actions.pod:1914
8776 msgid "Any Microsoft Windows operating system."
8780 #: ../src/guestfs-actions.pod:2788 ../fish/guestfish-actions.pod:1916
8785 #: ../src/guestfs-actions.pod:2790 ../fish/guestfish-actions.pod:1918
8790 #: ../src/guestfs-actions.pod:2794 ../fish/guestfish-actions.pod:1922
8791 msgid "The operating system type could not be determined."
8795 #: ../src/guestfs-actions.pod:2808
8796 msgid "guestfs_inspect_get_windows_systemroot"
8800 #: ../src/guestfs-actions.pod:2810
8804 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
8805 " const char *root);\n"
8810 #: ../src/guestfs-actions.pod:2817 ../fish/guestfish-actions.pod:1938
8812 "This returns the Windows systemroot of the inspected guest. The systemroot "
8813 "is a directory path such as C</WINDOWS>."
8817 #: ../src/guestfs-actions.pod:2820 ../fish/guestfish-actions.pod:1941
8819 "This call assumes that the guest is Windows and that the systemroot could be "
8820 "determined by inspection. If this is not the case then an error is "
8825 #: ../src/guestfs-actions.pod:2829
8826 msgid "(Added in 1.5.25)"
8830 #: ../src/guestfs-actions.pod:2831
8831 msgid "guestfs_inspect_list_applications"
8835 #: ../src/guestfs-actions.pod:2833
8838 " struct guestfs_application_list *\n"
8839 " guestfs_inspect_list_applications (guestfs_h *g,\n"
8840 " const char *root);\n"
8845 #: ../src/guestfs-actions.pod:2840 ../fish/guestfish-actions.pod:1954
8846 msgid "Return the list of applications installed in the operating system."
8850 #: ../src/guestfs-actions.pod:2842
8852 "I<Note:> This call works differently from other parts of the inspection "
8853 "API. You have to call C<guestfs_inspect_os>, then "
8854 "C<guestfs_inspect_get_mountpoints>, then mount up the disks, before calling "
8855 "this. Listing applications is a significantly more difficult operation "
8856 "which requires access to the full filesystem. Also note that unlike the "
8857 "other C<guestfs_inspect_get_*> calls which are just returning data cached in "
8858 "the libguestfs handle, this call actually reads parts of the mounted "
8859 "filesystems during the call."
8863 #: ../src/guestfs-actions.pod:2852 ../fish/guestfish-actions.pod:1966
8865 "This returns an empty list if the inspection code was not able to determine "
8866 "the list of applications."
8870 #: ../src/guestfs-actions.pod:2855 ../fish/guestfish-actions.pod:1969
8871 msgid "The application structure contains the following fields:"
8875 #: ../src/guestfs-actions.pod:2859 ../fish/guestfish-actions.pod:1973
8880 #: ../src/guestfs-actions.pod:2861 ../fish/guestfish-actions.pod:1975
8882 "The name of the application. For Red Hat-derived and Debian-derived Linux "
8883 "guests, this is the package name."
8887 #: ../src/guestfs-actions.pod:2864 ../fish/guestfish-actions.pod:1978
8888 msgid "C<app_display_name>"
8892 #: ../src/guestfs-actions.pod:2866 ../fish/guestfish-actions.pod:1980
8894 "The display name of the application, sometimes localized to the install "
8895 "language of the guest operating system."
8899 #: ../src/guestfs-actions.pod:2869 ../fish/guestfish-actions.pod:1983
8901 "If unavailable this is returned as an empty string C<\"\">. Callers needing "
8902 "to display something can use C<app_name> instead."
8906 #: ../src/guestfs-actions.pod:2872 ../fish/guestfish-actions.pod:1986
8907 msgid "C<app_epoch>"
8911 #: ../src/guestfs-actions.pod:2874 ../fish/guestfish-actions.pod:1988
8913 "For package managers which use epochs, this contains the epoch of the "
8914 "package (an integer). If unavailable, this is returned as C<0>."
8918 #: ../src/guestfs-actions.pod:2877 ../fish/guestfish-actions.pod:1991
8919 msgid "C<app_version>"
8923 #: ../src/guestfs-actions.pod:2879 ../fish/guestfish-actions.pod:1993
8925 "The version string of the application or package. If unavailable this is "
8926 "returned as an empty string C<\"\">."
8930 #: ../src/guestfs-actions.pod:2882 ../fish/guestfish-actions.pod:1996
8931 msgid "C<app_release>"
8935 #: ../src/guestfs-actions.pod:2884 ../fish/guestfish-actions.pod:1998
8937 "The release string of the application or package, for package managers that "
8938 "use this. If unavailable this is returned as an empty string C<\"\">."
8942 #: ../src/guestfs-actions.pod:2888 ../fish/guestfish-actions.pod:2002
8943 msgid "C<app_install_path>"
8947 #: ../src/guestfs-actions.pod:2890 ../fish/guestfish-actions.pod:2004
8949 "The installation path of the application (on operating systems such as "
8950 "Windows which use installation paths). This path is in the format used by "
8951 "the guest operating system, it is not a libguestfs path."
8955 #: ../src/guestfs-actions.pod:2895 ../fish/guestfish-actions.pod:2009
8956 msgid "If unavailable this is returned as an empty string C<\"\">."
8960 #: ../src/guestfs-actions.pod:2897 ../fish/guestfish-actions.pod:2011
8961 msgid "C<app_trans_path>"
8965 #: ../src/guestfs-actions.pod:2899 ../fish/guestfish-actions.pod:2013
8967 "The install path translated into a libguestfs path. If unavailable this is "
8968 "returned as an empty string C<\"\">."
8972 #: ../src/guestfs-actions.pod:2902 ../fish/guestfish-actions.pod:2016
8973 msgid "C<app_publisher>"
8977 #: ../src/guestfs-actions.pod:2904 ../fish/guestfish-actions.pod:2018
8979 "The name of the publisher of the application, for package managers that use "
8980 "this. If unavailable this is returned as an empty string C<\"\">."
8984 #: ../src/guestfs-actions.pod:2908 ../fish/guestfish-actions.pod:2022
8989 #: ../src/guestfs-actions.pod:2910 ../fish/guestfish-actions.pod:2024
8991 "The URL (eg. upstream URL) of the application. If unavailable this is "
8992 "returned as an empty string C<\"\">."
8996 #: ../src/guestfs-actions.pod:2913 ../fish/guestfish-actions.pod:2027
8997 msgid "C<app_source_package>"
9001 #: ../src/guestfs-actions.pod:2915 ../fish/guestfish-actions.pod:2029
9003 "For packaging systems which support this, the name of the source package. "
9004 "If unavailable this is returned as an empty string C<\"\">."
9008 #: ../src/guestfs-actions.pod:2918 ../fish/guestfish-actions.pod:2032
9009 msgid "C<app_summary>"
9013 #: ../src/guestfs-actions.pod:2920 ../fish/guestfish-actions.pod:2034
9015 "A short (usually one line) description of the application or package. If "
9016 "unavailable this is returned as an empty string C<\"\">."
9020 #: ../src/guestfs-actions.pod:2923 ../fish/guestfish-actions.pod:2037
9021 msgid "C<app_description>"
9025 #: ../src/guestfs-actions.pod:2925 ../fish/guestfish-actions.pod:2039
9027 "A longer description of the application or package. If unavailable this is "
9028 "returned as an empty string C<\"\">."
9032 #: ../src/guestfs-actions.pod:2932
9034 "This function returns a C<struct guestfs_application_list *>, or NULL if "
9035 "there was an error. I<The caller must call C<guestfs_free_application_list> "
9040 #: ../src/guestfs-actions.pod:2936
9041 msgid "guestfs_inspect_os"
9045 #: ../src/guestfs-actions.pod:2938
9049 " guestfs_inspect_os (guestfs_h *g);\n"
9054 #: ../src/guestfs-actions.pod:2941 ../fish/guestfish-actions.pod:2050
9056 "This function uses other libguestfs functions and certain heuristics to "
9057 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
9058 "for operating systems."
9062 #: ../src/guestfs-actions.pod:2945 ../fish/guestfish-actions.pod:2054
9063 msgid "The list returned is empty if no operating systems were found."
9067 #: ../src/guestfs-actions.pod:2947 ../fish/guestfish-actions.pod:2056
9069 "If one operating system was found, then this returns a list with a single "
9070 "element, which is the name of the root filesystem of this operating system. "
9071 "It is also possible for this function to return a list containing more than "
9072 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
9073 "element being the root filesystem of one of the operating systems."
9077 #: ../src/guestfs-actions.pod:2954
9079 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
9080 "functions in order to query further information about each operating system, "
9081 "such as the name and version."
9085 #: ../src/guestfs-actions.pod:2959
9087 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
9088 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
9089 "the contents. This should be called with no disks currently mounted. The "
9090 "function may also use Augeas, so any existing Augeas handle will be closed."
9094 #: ../src/guestfs-actions.pod:2965 ../fish/guestfish-actions.pod:2074
9096 "This function cannot decrypt encrypted disks. The caller must do that first "
9097 "(supplying the necessary keys) if the disk is encrypted."
9101 #: ../src/guestfs-actions.pod:2971 ../src/guestfs-actions.pod:3226 ../src/guestfs-actions.pod:3288
9102 msgid "See also C<guestfs_list_filesystems>."
9106 #: ../src/guestfs-actions.pod:2979
9107 msgid "guestfs_is_blockdev"
9111 #: ../src/guestfs-actions.pod:2981
9115 " guestfs_is_blockdev (guestfs_h *g,\n"
9116 " const char *path);\n"
9121 #: ../src/guestfs-actions.pod:2985 ../fish/guestfish-actions.pod:2086
9123 "This returns C<true> if and only if there is a block device with the given "
9128 #: ../src/guestfs-actions.pod:2988 ../src/guestfs-actions.pod:3017 ../src/guestfs-actions.pod:3047 ../src/guestfs-actions.pod:3062 ../src/guestfs-actions.pod:3078 ../src/guestfs-actions.pod:3134 ../src/guestfs-actions.pod:3149
9129 msgid "See also C<guestfs_stat>."
9133 #: ../src/guestfs-actions.pod:2992 ../src/guestfs-actions.pod:3021 ../src/guestfs-actions.pod:3066 ../src/guestfs-actions.pod:3138 ../src/guestfs-actions.pod:3153
9134 msgid "(Added in 1.5.10)"
9138 #: ../src/guestfs-actions.pod:2994
9139 msgid "guestfs_is_busy"
9143 #: ../src/guestfs-actions.pod:2996
9147 " guestfs_is_busy (guestfs_h *g);\n"
9152 #: ../src/guestfs-actions.pod:2999 ../fish/guestfish-actions.pod:2095
9154 "This returns true iff this handle is busy processing a command (in the "
9159 #: ../src/guestfs-actions.pod:3008
9160 msgid "guestfs_is_chardev"
9164 #: ../src/guestfs-actions.pod:3010
9168 " guestfs_is_chardev (guestfs_h *g,\n"
9169 " const char *path);\n"
9174 #: ../src/guestfs-actions.pod:3014 ../fish/guestfish-actions.pod:2104
9176 "This returns C<true> if and only if there is a character device with the "
9177 "given C<path> name."
9181 #: ../src/guestfs-actions.pod:3023
9182 msgid "guestfs_is_config"
9186 #: ../src/guestfs-actions.pod:3025
9190 " guestfs_is_config (guestfs_h *g);\n"
9195 #: ../src/guestfs-actions.pod:3028 ../fish/guestfish-actions.pod:2113
9197 "This returns true iff this handle is being configured (in the C<CONFIG> "
9202 #: ../src/guestfs-actions.pod:3037
9203 msgid "guestfs_is_dir"
9207 #: ../src/guestfs-actions.pod:3039
9211 " guestfs_is_dir (guestfs_h *g,\n"
9212 " const char *path);\n"
9217 #: ../src/guestfs-actions.pod:3043 ../fish/guestfish-actions.pod:2122
9219 "This returns C<true> if and only if there is a directory with the given "
9220 "C<path> name. Note that it returns false for other objects like files."
9224 #: ../src/guestfs-actions.pod:3053
9225 msgid "guestfs_is_fifo"
9229 #: ../src/guestfs-actions.pod:3055
9233 " guestfs_is_fifo (guestfs_h *g,\n"
9234 " const char *path);\n"
9239 #: ../src/guestfs-actions.pod:3059 ../fish/guestfish-actions.pod:2132
9241 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
9242 "given C<path> name."
9246 #: ../src/guestfs-actions.pod:3068
9247 msgid "guestfs_is_file"
9251 #: ../src/guestfs-actions.pod:3070
9255 " guestfs_is_file (guestfs_h *g,\n"
9256 " const char *path);\n"
9261 #: ../src/guestfs-actions.pod:3074 ../fish/guestfish-actions.pod:2141
9263 "This returns C<true> if and only if there is a regular file with the given "
9264 "C<path> name. Note that it returns false for other objects like "
9269 #: ../src/guestfs-actions.pod:3084
9270 msgid "guestfs_is_launching"
9274 #: ../src/guestfs-actions.pod:3086
9278 " guestfs_is_launching (guestfs_h *g);\n"
9283 #: ../src/guestfs-actions.pod:3089 ../fish/guestfish-actions.pod:2151
9285 "This returns true iff this handle is launching the subprocess (in the "
9286 "C<LAUNCHING> state)."
9290 #: ../src/guestfs-actions.pod:3098
9291 msgid "guestfs_is_lv"
9295 #: ../src/guestfs-actions.pod:3100
9299 " guestfs_is_lv (guestfs_h *g,\n"
9300 " const char *device);\n"
9305 #: ../src/guestfs-actions.pod:3104 ../fish/guestfish-actions.pod:2160
9307 "This command tests whether C<device> is a logical volume, and returns true "
9308 "iff this is the case."
9312 #: ../src/guestfs-actions.pod:3111
9313 msgid "guestfs_is_ready"
9317 #: ../src/guestfs-actions.pod:3113
9321 " guestfs_is_ready (guestfs_h *g);\n"
9326 #: ../src/guestfs-actions.pod:3116 ../fish/guestfish-actions.pod:2167
9328 "This returns true iff this handle is ready to accept commands (in the "
9333 #: ../src/guestfs-actions.pod:3125
9334 msgid "guestfs_is_socket"
9338 #: ../src/guestfs-actions.pod:3127
9342 " guestfs_is_socket (guestfs_h *g,\n"
9343 " const char *path);\n"
9348 #: ../src/guestfs-actions.pod:3131 ../fish/guestfish-actions.pod:2176
9350 "This returns C<true> if and only if there is a Unix domain socket with the "
9351 "given C<path> name."
9355 #: ../src/guestfs-actions.pod:3140
9356 msgid "guestfs_is_symlink"
9360 #: ../src/guestfs-actions.pod:3142
9364 " guestfs_is_symlink (guestfs_h *g,\n"
9365 " const char *path);\n"
9370 #: ../src/guestfs-actions.pod:3146 ../fish/guestfish-actions.pod:2185
9372 "This returns C<true> if and only if there is a symbolic link with the given "
9377 #: ../src/guestfs-actions.pod:3155
9378 msgid "guestfs_kill_subprocess"
9382 #: ../src/guestfs-actions.pod:3157
9386 " guestfs_kill_subprocess (guestfs_h *g);\n"
9391 #: ../src/guestfs-actions.pod:3160 ../fish/guestfish-actions.pod:2194
9392 msgid "This kills the qemu subprocess. You should never need to call this."
9396 #: ../src/guestfs-actions.pod:3166
9397 msgid "guestfs_launch"
9401 #: ../src/guestfs-actions.pod:3168
9405 " guestfs_launch (guestfs_h *g);\n"
9410 #: ../src/guestfs-actions.pod:3171 ../fish/guestfish-actions.pod:2202
9412 "Internally libguestfs is implemented by running a virtual machine using "
9417 #: ../src/guestfs-actions.pod:3174 ../fish/guestfish-actions.pod:2205
9419 "You should call this after configuring the handle (eg. adding drives) but "
9420 "before performing any actions."
9424 #: ../src/guestfs-actions.pod:3181
9425 msgid "guestfs_lchown"
9429 #: ../src/guestfs-actions.pod:3183
9433 " guestfs_lchown (guestfs_h *g,\n"
9436 " const char *path);\n"
9441 #: ../src/guestfs-actions.pod:3189
9443 "Change the file owner to C<owner> and group to C<group>. This is like "
9444 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
9445 "changed, not the target."
9449 #: ../src/guestfs-actions.pod:3201
9450 msgid "guestfs_lgetxattrs"
9454 #: ../src/guestfs-actions.pod:3203
9457 " struct guestfs_xattr_list *\n"
9458 " guestfs_lgetxattrs (guestfs_h *g,\n"
9459 " const char *path);\n"
9464 #: ../src/guestfs-actions.pod:3207
9466 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
9467 "then it returns the extended attributes of the link itself."
9471 #: ../src/guestfs-actions.pod:3217
9472 msgid "guestfs_list_devices"
9476 #: ../src/guestfs-actions.pod:3219
9480 " guestfs_list_devices (guestfs_h *g);\n"
9485 #: ../src/guestfs-actions.pod:3222 ../fish/guestfish-actions.pod:2232
9486 msgid "List all the block devices."
9490 #: ../src/guestfs-actions.pod:3224 ../fish/guestfish-actions.pod:2234
9491 msgid "The full block device names are returned, eg. C</dev/sda>."
9495 #: ../src/guestfs-actions.pod:3234
9496 msgid "guestfs_list_filesystems"
9500 #: ../src/guestfs-actions.pod:3236
9504 " guestfs_list_filesystems (guestfs_h *g);\n"
9509 #: ../src/guestfs-actions.pod:3239 ../fish/guestfish-actions.pod:2242
9511 "This inspection command looks for filesystems on partitions, block devices "
9512 "and logical volumes, returning a list of devices containing filesystems and "
9517 #: ../src/guestfs-actions.pod:3243 ../fish/guestfish-actions.pod:2246
9519 "The return value is a hash, where the keys are the devices containing "
9520 "filesystems, and the values are the filesystem types. For example:"
9524 #: ../src/guestfs-actions.pod:3247 ../fish/guestfish-actions.pod:2250
9527 " \"/dev/sda1\" => \"ntfs\"\n"
9528 " \"/dev/sda2\" => \"ext2\"\n"
9529 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
9530 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
9535 #: ../src/guestfs-actions.pod:3252 ../fish/guestfish-actions.pod:2255
9537 "The value can have the special value \"unknown\", meaning the content of the "
9538 "device is undetermined or empty. \"swap\" means a Linux swap partition."
9542 #: ../src/guestfs-actions.pod:3256
9544 "This command runs other libguestfs commands, which might include "
9545 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
9546 "soon after launch and only when nothing is mounted."
9550 #: ../src/guestfs-actions.pod:3260
9552 "Not all of the filesystems returned will be mountable. In particular, swap "
9553 "partitions are returned in the list. Also this command does not check that "
9554 "each filesystem found is valid and mountable, and some filesystems might be "
9555 "mountable but require special options. Filesystems may not all belong to a "
9556 "single logical operating system (use C<guestfs_inspect_os> to look for "
9561 #: ../src/guestfs-actions.pod:3274 ../src/guestfs-actions.pod:4797
9562 msgid "(Added in 1.5.15)"
9566 #: ../src/guestfs-actions.pod:3276
9567 msgid "guestfs_list_partitions"
9571 #: ../src/guestfs-actions.pod:3278
9575 " guestfs_list_partitions (guestfs_h *g);\n"
9580 #: ../src/guestfs-actions.pod:3281 ../fish/guestfish-actions.pod:2275
9581 msgid "List all the partitions detected on all block devices."
9585 #: ../src/guestfs-actions.pod:3283 ../fish/guestfish-actions.pod:2277
9586 msgid "The full partition device names are returned, eg. C</dev/sda1>"
9590 #: ../src/guestfs-actions.pod:3285
9592 "This does not return logical volumes. For that you will need to call "
9597 #: ../src/guestfs-actions.pod:3296
9602 #: ../src/guestfs-actions.pod:3298
9606 " guestfs_ll (guestfs_h *g,\n"
9607 " const char *directory);\n"
9612 #: ../src/guestfs-actions.pod:3302 ../fish/guestfish-actions.pod:2288
9614 "List the files in C<directory> (relative to the root directory, there is no "
9615 "cwd) in the format of 'ls -la'."
9619 #: ../src/guestfs-actions.pod:3305 ../fish/guestfish-actions.pod:2291
9621 "This command is mostly useful for interactive sessions. It is I<not> "
9622 "intended that you try to parse the output string."
9626 #: ../src/guestfs-actions.pod:3313
9631 #: ../src/guestfs-actions.pod:3315
9635 " guestfs_ln (guestfs_h *g,\n"
9636 " const char *target,\n"
9637 " const char *linkname);\n"
9642 #: ../src/guestfs-actions.pod:3320 ../fish/guestfish-actions.pod:2298
9643 msgid "This command creates a hard link using the C<ln> command."
9647 #: ../src/guestfs-actions.pod:3326
9648 msgid "guestfs_ln_f"
9652 #: ../src/guestfs-actions.pod:3328
9656 " guestfs_ln_f (guestfs_h *g,\n"
9657 " const char *target,\n"
9658 " const char *linkname);\n"
9663 #: ../src/guestfs-actions.pod:3333 ../fish/guestfish-actions.pod:2304
9665 "This command creates a hard link using the C<ln -f> command. The C<-f> "
9666 "option removes the link (C<linkname>) if it exists already."
9670 #: ../src/guestfs-actions.pod:3340
9671 msgid "guestfs_ln_s"
9675 #: ../src/guestfs-actions.pod:3342
9679 " guestfs_ln_s (guestfs_h *g,\n"
9680 " const char *target,\n"
9681 " const char *linkname);\n"
9686 #: ../src/guestfs-actions.pod:3347 ../fish/guestfish-actions.pod:2311
9687 msgid "This command creates a symbolic link using the C<ln -s> command."
9691 #: ../src/guestfs-actions.pod:3353
9692 msgid "guestfs_ln_sf"
9696 #: ../src/guestfs-actions.pod:3355
9700 " guestfs_ln_sf (guestfs_h *g,\n"
9701 " const char *target,\n"
9702 " const char *linkname);\n"
9707 #: ../src/guestfs-actions.pod:3360 ../fish/guestfish-actions.pod:2317
9709 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
9710 "option removes the link (C<linkname>) if it exists already."
9714 #: ../src/guestfs-actions.pod:3367
9715 msgid "guestfs_lremovexattr"
9719 #: ../src/guestfs-actions.pod:3369
9723 " guestfs_lremovexattr (guestfs_h *g,\n"
9724 " const char *xattr,\n"
9725 " const char *path);\n"
9730 #: ../src/guestfs-actions.pod:3374
9732 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
9733 "link, then it removes an extended attribute of the link itself."
9737 #: ../src/guestfs-actions.pod:3382
9742 #: ../src/guestfs-actions.pod:3384
9746 " guestfs_ls (guestfs_h *g,\n"
9747 " const char *directory);\n"
9752 #: ../src/guestfs-actions.pod:3388 ../fish/guestfish-actions.pod:2332
9754 "List the files in C<directory> (relative to the root directory, there is no "
9755 "cwd). The '.' and '..' entries are not returned, but hidden files are "
9760 #: ../src/guestfs-actions.pod:3392
9762 "This command is mostly useful for interactive sessions. Programs should "
9763 "probably use C<guestfs_readdir> instead."
9767 #: ../src/guestfs-actions.pod:3401
9768 msgid "guestfs_lsetxattr"
9772 #: ../src/guestfs-actions.pod:3403
9776 " guestfs_lsetxattr (guestfs_h *g,\n"
9777 " const char *xattr,\n"
9778 " const char *val,\n"
9780 " const char *path);\n"
9785 #: ../src/guestfs-actions.pod:3410
9787 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
9788 "then it sets an extended attribute of the link itself."
9792 #: ../src/guestfs-actions.pod:3418
9793 msgid "guestfs_lstat"
9797 #: ../src/guestfs-actions.pod:3420
9800 " struct guestfs_stat *\n"
9801 " guestfs_lstat (guestfs_h *g,\n"
9802 " const char *path);\n"
9807 #: ../src/guestfs-actions.pod:3424 ../src/guestfs-actions.pod:5851 ../fish/guestfish-actions.pod:2351 ../fish/guestfish-actions.pod:3933
9808 msgid "Returns file information for the given C<path>."
9812 #: ../src/guestfs-actions.pod:3426
9814 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
9815 "link, then the link is stat-ed, not the file it refers to."
9819 #: ../src/guestfs-actions.pod:3430 ../fish/guestfish-actions.pod:2357
9820 msgid "This is the same as the C<lstat(2)> system call."
9824 #: ../src/guestfs-actions.pod:3432 ../src/guestfs-actions.pod:5855
9826 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
9827 "error. I<The caller must call C<guestfs_free_stat> after use>."
9831 #: ../src/guestfs-actions.pod:3436 ../src/guestfs-actions.pod:5859 ../src/guestfs-actions.pod:5877 ../src/guestfs-actions.pod:6258
9832 msgid "(Added in 0.9.2)"
9836 #: ../src/guestfs-actions.pod:3438
9837 msgid "guestfs_lstatlist"
9841 #: ../src/guestfs-actions.pod:3440
9844 " struct guestfs_stat_list *\n"
9845 " guestfs_lstatlist (guestfs_h *g,\n"
9846 " const char *path,\n"
9847 " char *const *names);\n"
9852 #: ../src/guestfs-actions.pod:3445
9854 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
9855 "files, where all files are in the directory C<path>. C<names> is the list "
9856 "of files from this directory."
9860 #: ../src/guestfs-actions.pod:3449 ../fish/guestfish-actions.pod:2367
9862 "On return you get a list of stat structs, with a one-to-one correspondence "
9863 "to the C<names> list. If any name did not exist or could not be lstat'd, "
9864 "then the C<ino> field of that structure is set to C<-1>."
9868 #: ../src/guestfs-actions.pod:3454
9870 "This call is intended for programs that want to efficiently list a directory "
9871 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
9872 "for a similarly efficient call for getting extended attributes. Very long "
9873 "directory listings might cause the protocol message size to be exceeded, "
9874 "causing this call to fail. The caller must split up such requests into "
9875 "smaller groups of names."
9879 #: ../src/guestfs-actions.pod:3462
9881 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
9882 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
9886 #: ../src/guestfs-actions.pod:3468
9887 msgid "guestfs_luks_add_key"
9891 #: ../src/guestfs-actions.pod:3470
9895 " guestfs_luks_add_key (guestfs_h *g,\n"
9896 " const char *device,\n"
9897 " const char *key,\n"
9898 " const char *newkey,\n"
9904 #: ../src/guestfs-actions.pod:3477 ../fish/guestfish-actions.pod:2384
9906 "This command adds a new key on LUKS device C<device>. C<key> is any "
9907 "existing key, and is used to access the device. C<newkey> is the new key to "
9908 "add. C<keyslot> is the key slot that will be replaced."
9912 #: ../src/guestfs-actions.pod:3482
9914 "Note that if C<keyslot> already contains a key, then this command will "
9915 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
9919 #: ../src/guestfs-actions.pod:3488 ../src/guestfs-actions.pod:3528 ../src/guestfs-actions.pod:3551 ../src/guestfs-actions.pod:3571 ../src/guestfs-actions.pod:3603 ../src/guestfs-actions.pod:3622
9921 "This function takes a key or passphrase parameter which could contain "
9922 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
9927 #: ../src/guestfs-actions.pod:3492 ../src/guestfs-actions.pod:3532 ../src/guestfs-actions.pod:3555 ../src/guestfs-actions.pod:3575
9928 msgid "(Added in 1.5.2)"
9932 #: ../src/guestfs-actions.pod:3494
9933 msgid "guestfs_luks_close"
9937 #: ../src/guestfs-actions.pod:3496
9941 " guestfs_luks_close (guestfs_h *g,\n"
9942 " const char *device);\n"
9947 #: ../src/guestfs-actions.pod:3500
9949 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
9950 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
9951 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
9952 "underlying block device."
9956 #: ../src/guestfs-actions.pod:3508 ../src/guestfs-actions.pod:3607 ../src/guestfs-actions.pod:3626 ../src/guestfs-actions.pod:3676 ../src/guestfs-actions.pod:3724
9957 msgid "(Added in 1.5.1)"
9961 #: ../src/guestfs-actions.pod:3510
9962 msgid "guestfs_luks_format"
9966 #: ../src/guestfs-actions.pod:3512
9970 " guestfs_luks_format (guestfs_h *g,\n"
9971 " const char *device,\n"
9972 " const char *key,\n"
9978 #: ../src/guestfs-actions.pod:3518 ../fish/guestfish-actions.pod:2410
9980 "This command erases existing data on C<device> and formats the device as a "
9981 "LUKS encrypted device. C<key> is the initial key, which is added to key "
9982 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
9986 #: ../src/guestfs-actions.pod:3525 ../src/guestfs-actions.pod:3548 ../src/guestfs-actions.pod:3688 ../src/guestfs-actions.pod:4548 ../src/guestfs-actions.pod:5311 ../src/guestfs-actions.pod:5686 ../src/guestfs-actions.pod:5709 ../src/guestfs-actions.pod:5735 ../src/guestfs-actions.pod:6885 ../fish/guestfish-actions.pod:2418 ../fish/guestfish-actions.pod:2431 ../fish/guestfish-actions.pod:2515 ../fish/guestfish-actions.pod:3045 ../fish/guestfish-actions.pod:3552 ../fish/guestfish-actions.pod:3832 ../fish/guestfish-actions.pod:3848 ../fish/guestfish-actions.pod:3863 ../fish/guestfish-actions.pod:4578
9988 "B<This command is dangerous. Without careful use you can easily destroy all "
9993 #: ../src/guestfs-actions.pod:3534
9994 msgid "guestfs_luks_format_cipher"
9998 #: ../src/guestfs-actions.pod:3536
10002 " guestfs_luks_format_cipher (guestfs_h *g,\n"
10003 " const char *device,\n"
10004 " const char *key,\n"
10006 " const char *cipher);\n"
10011 #: ../src/guestfs-actions.pod:3543
10013 "This command is the same as C<guestfs_luks_format> but it also allows you to "
10014 "set the C<cipher> used."
10018 #: ../src/guestfs-actions.pod:3557
10019 msgid "guestfs_luks_kill_slot"
10023 #: ../src/guestfs-actions.pod:3559
10027 " guestfs_luks_kill_slot (guestfs_h *g,\n"
10028 " const char *device,\n"
10029 " const char *key,\n"
10035 #: ../src/guestfs-actions.pod:3565 ../fish/guestfish-actions.pod:2438
10037 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
10038 "device C<device>. C<key> must be one of the I<other> keys."
10042 #: ../src/guestfs-actions.pod:3577
10043 msgid "guestfs_luks_open"
10047 #: ../src/guestfs-actions.pod:3579
10051 " guestfs_luks_open (guestfs_h *g,\n"
10052 " const char *device,\n"
10053 " const char *key,\n"
10054 " const char *mapname);\n"
10059 #: ../src/guestfs-actions.pod:3585 ../fish/guestfish-actions.pod:2449
10061 "This command opens a block device which has been encrypted according to the "
10062 "Linux Unified Key Setup (LUKS) standard."
10066 #: ../src/guestfs-actions.pod:3588 ../fish/guestfish-actions.pod:2452
10067 msgid "C<device> is the encrypted block device or partition."
10071 #: ../src/guestfs-actions.pod:3590 ../fish/guestfish-actions.pod:2454
10073 "The caller must supply one of the keys associated with the LUKS block "
10074 "device, in the C<key> parameter."
10078 #: ../src/guestfs-actions.pod:3593 ../fish/guestfish-actions.pod:2457
10080 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
10081 "writes to this block device are decrypted from and encrypted to the "
10082 "underlying C<device> respectively."
10086 #: ../src/guestfs-actions.pod:3597
10088 "If this block device contains LVM volume groups, then calling "
10089 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
10094 #: ../src/guestfs-actions.pod:3609
10095 msgid "guestfs_luks_open_ro"
10099 #: ../src/guestfs-actions.pod:3611
10103 " guestfs_luks_open_ro (guestfs_h *g,\n"
10104 " const char *device,\n"
10105 " const char *key,\n"
10106 " const char *mapname);\n"
10111 #: ../src/guestfs-actions.pod:3617
10113 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
10118 #: ../src/guestfs-actions.pod:3628
10119 msgid "guestfs_lvcreate"
10123 #: ../src/guestfs-actions.pod:3630
10127 " guestfs_lvcreate (guestfs_h *g,\n"
10128 " const char *logvol,\n"
10129 " const char *volgroup,\n"
10135 #: ../src/guestfs-actions.pod:3636 ../fish/guestfish-actions.pod:2482
10137 "This creates an LVM logical volume called C<logvol> on the volume group "
10138 "C<volgroup>, with C<size> megabytes."
10142 #: ../src/guestfs-actions.pod:3643
10143 msgid "guestfs_lvm_canonical_lv_name"
10147 #: ../src/guestfs-actions.pod:3645
10151 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
10152 " const char *lvname);\n"
10157 #: ../src/guestfs-actions.pod:3649 ../fish/guestfish-actions.pod:2489
10159 "This converts alternative naming schemes for LVs that you might find to the "
10160 "canonical name. For example, C</dev/mapper/VG-LV> is converted to "
10165 #: ../src/guestfs-actions.pod:3653 ../fish/guestfish-actions.pod:2493
10167 "This command returns an error if the C<lvname> parameter does not refer to a "
10172 #: ../src/guestfs-actions.pod:3656
10173 msgid "See also C<guestfs_is_lv>."
10177 #: ../src/guestfs-actions.pod:3661
10178 msgid "(Added in 1.5.24)"
10182 #: ../src/guestfs-actions.pod:3663
10183 msgid "guestfs_lvm_clear_filter"
10187 #: ../src/guestfs-actions.pod:3665
10191 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
10196 #: ../src/guestfs-actions.pod:3668
10198 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
10199 "see every block device."
10203 #: ../src/guestfs-actions.pod:3671 ../src/guestfs-actions.pod:3713 ../fish/guestfish-actions.pod:2505 ../fish/guestfish-actions.pod:2536
10204 msgid "This command also clears the LVM cache and performs a volume group scan."
10208 #: ../src/guestfs-actions.pod:3678
10209 msgid "guestfs_lvm_remove_all"
10213 #: ../src/guestfs-actions.pod:3680
10217 " guestfs_lvm_remove_all (guestfs_h *g);\n"
10222 #: ../src/guestfs-actions.pod:3683 ../fish/guestfish-actions.pod:2512
10224 "This command removes all LVM logical volumes, volume groups and physical "
10229 #: ../src/guestfs-actions.pod:3693
10230 msgid "guestfs_lvm_set_filter"
10234 #: ../src/guestfs-actions.pod:3695
10238 " guestfs_lvm_set_filter (guestfs_h *g,\n"
10239 " char *const *devices);\n"
10244 #: ../src/guestfs-actions.pod:3699 ../fish/guestfish-actions.pod:2522
10246 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
10247 "block devices in the list C<devices>, and will ignore all other attached "
10252 #: ../src/guestfs-actions.pod:3703 ../fish/guestfish-actions.pod:2526
10254 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
10255 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
10256 "there are two types of duplication possible: either cloned PVs/VGs which "
10257 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
10258 "same name. In normal operation you cannot create this situation, but you "
10259 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
10260 "inside the LVM metadata."
10264 #: ../src/guestfs-actions.pod:3716 ../fish/guestfish-actions.pod:2539
10265 msgid "You can filter whole block devices or individual partitions."
10269 #: ../src/guestfs-actions.pod:3718 ../fish/guestfish-actions.pod:2541
10271 "You cannot use this if any VG is currently in use (eg. contains a mounted "
10272 "filesystem), even if you are not filtering out that VG."
10276 #: ../src/guestfs-actions.pod:3726
10277 msgid "guestfs_lvremove"
10281 #: ../src/guestfs-actions.pod:3728
10285 " guestfs_lvremove (guestfs_h *g,\n"
10286 " const char *device);\n"
10291 #: ../src/guestfs-actions.pod:3732 ../fish/guestfish-actions.pod:2549
10293 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
10294 "LV, such as C</dev/VG/LV>."
10298 #: ../src/guestfs-actions.pod:3735 ../fish/guestfish-actions.pod:2552
10300 "You can also remove all LVs in a volume group by specifying the VG name, "
10305 #: ../src/guestfs-actions.pod:3740 ../src/guestfs-actions.pod:4894 ../src/guestfs-actions.pod:6624
10306 msgid "(Added in 1.0.13)"
10310 #: ../src/guestfs-actions.pod:3742
10311 msgid "guestfs_lvrename"
10315 #: ../src/guestfs-actions.pod:3744
10319 " guestfs_lvrename (guestfs_h *g,\n"
10320 " const char *logvol,\n"
10321 " const char *newlogvol);\n"
10326 #: ../src/guestfs-actions.pod:3749 ../fish/guestfish-actions.pod:2559
10327 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
10331 #: ../src/guestfs-actions.pod:3753 ../src/guestfs-actions.pod:6637
10332 msgid "(Added in 1.0.83)"
10336 #: ../src/guestfs-actions.pod:3755
10337 msgid "guestfs_lvresize"
10341 #: ../src/guestfs-actions.pod:3757
10345 " guestfs_lvresize (guestfs_h *g,\n"
10346 " const char *device,\n"
10352 #: ../src/guestfs-actions.pod:3762 ../fish/guestfish-actions.pod:2565
10354 "This resizes (expands or shrinks) an existing LVM logical volume to "
10355 "C<mbytes>. When reducing, data in the reduced part is lost."
10359 #: ../src/guestfs-actions.pod:3770
10360 msgid "guestfs_lvresize_free"
10364 #: ../src/guestfs-actions.pod:3772
10368 " guestfs_lvresize_free (guestfs_h *g,\n"
10369 " const char *lv,\n"
10375 #: ../src/guestfs-actions.pod:3777 ../fish/guestfish-actions.pod:2573
10377 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
10378 "remaining free space in the volume group. Commonly you would call this with "
10379 "pc = 100 which expands the logical volume as much as possible, using all "
10380 "remaining free space in the volume group."
10384 #: ../src/guestfs-actions.pod:3785
10385 msgid "(Added in 1.3.3)"
10389 #: ../src/guestfs-actions.pod:3787
10390 msgid "guestfs_lvs"
10394 #: ../src/guestfs-actions.pod:3789
10398 " guestfs_lvs (guestfs_h *g);\n"
10403 #: ../src/guestfs-actions.pod:3792 ../fish/guestfish-actions.pod:2583
10405 "List all the logical volumes detected. This is the equivalent of the "
10406 "L<lvs(8)> command."
10410 #: ../src/guestfs-actions.pod:3795 ../fish/guestfish-actions.pod:2586
10412 "This returns a list of the logical volume device names "
10413 "(eg. C</dev/VolGroup00/LogVol00>)."
10417 #: ../src/guestfs-actions.pod:3798
10418 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
10422 #: ../src/guestfs-actions.pod:3806
10423 msgid "guestfs_lvs_full"
10427 #: ../src/guestfs-actions.pod:3808
10430 " struct guestfs_lvm_lv_list *\n"
10431 " guestfs_lvs_full (guestfs_h *g);\n"
10436 #: ../src/guestfs-actions.pod:3811 ../fish/guestfish-actions.pod:2595
10438 "List all the logical volumes detected. This is the equivalent of the "
10439 "L<lvs(8)> command. The \"full\" version includes all fields."
10443 #: ../src/guestfs-actions.pod:3814
10445 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
10446 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after "
10451 #: ../src/guestfs-actions.pod:3820
10452 msgid "guestfs_lvuuid"
10456 #: ../src/guestfs-actions.pod:3822
10460 " guestfs_lvuuid (guestfs_h *g,\n"
10461 " const char *device);\n"
10466 #: ../src/guestfs-actions.pod:3826 ../fish/guestfish-actions.pod:2602
10467 msgid "This command returns the UUID of the LVM LV C<device>."
10471 #: ../src/guestfs-actions.pod:3833
10472 msgid "guestfs_lxattrlist"
10476 #: ../src/guestfs-actions.pod:3835
10479 " struct guestfs_xattr_list *\n"
10480 " guestfs_lxattrlist (guestfs_h *g,\n"
10481 " const char *path,\n"
10482 " char *const *names);\n"
10487 #: ../src/guestfs-actions.pod:3840 ../fish/guestfish-actions.pod:2608
10489 "This call allows you to get the extended attributes of multiple files, where "
10490 "all files are in the directory C<path>. C<names> is the list of files from "
10495 #: ../src/guestfs-actions.pod:3844 ../fish/guestfish-actions.pod:2612
10497 "On return you get a flat list of xattr structs which must be interpreted "
10498 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
10499 "C<attrval> in this struct is zero-length to indicate there was an error "
10500 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
10501 "number (the number of following attributes for this file, which could be "
10502 "C<\"0\">). Then after the first xattr struct are the zero or more "
10503 "attributes for the first named file. This repeats for the second and "
10504 "subsequent files."
10508 #: ../src/guestfs-actions.pod:3854
10510 "This call is intended for programs that want to efficiently list a directory "
10511 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
10512 "a similarly efficient call for getting standard stats. Very long directory "
10513 "listings might cause the protocol message size to be exceeded, causing this "
10514 "call to fail. The caller must split up such requests into smaller groups of "
10519 #: ../src/guestfs-actions.pod:3868
10520 msgid "guestfs_mkdir"
10524 #: ../src/guestfs-actions.pod:3870
10528 " guestfs_mkdir (guestfs_h *g,\n"
10529 " const char *path);\n"
10534 #: ../src/guestfs-actions.pod:3874 ../fish/guestfish-actions.pod:2634
10535 msgid "Create a directory named C<path>."
10539 #: ../src/guestfs-actions.pod:3880
10540 msgid "guestfs_mkdir_mode"
10544 #: ../src/guestfs-actions.pod:3882
10548 " guestfs_mkdir_mode (guestfs_h *g,\n"
10549 " const char *path,\n"
10555 #: ../src/guestfs-actions.pod:3887 ../fish/guestfish-actions.pod:2640
10557 "This command creates a directory, setting the initial permissions of the "
10558 "directory to C<mode>."
10562 #: ../src/guestfs-actions.pod:3890 ../fish/guestfish-actions.pod:2643
10564 "For common Linux filesystems, the actual mode which is set will be C<mode & "
10565 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
10570 #: ../src/guestfs-actions.pod:3894
10571 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
10575 #: ../src/guestfs-actions.pod:3900
10576 msgid "guestfs_mkdir_p"
10580 #: ../src/guestfs-actions.pod:3902
10584 " guestfs_mkdir_p (guestfs_h *g,\n"
10585 " const char *path);\n"
10590 #: ../src/guestfs-actions.pod:3906 ../fish/guestfish-actions.pod:2653
10592 "Create a directory named C<path>, creating any parent directories as "
10593 "necessary. This is like the C<mkdir -p> shell command."
10597 #: ../src/guestfs-actions.pod:3913
10598 msgid "guestfs_mkdtemp"
10602 #: ../src/guestfs-actions.pod:3915
10606 " guestfs_mkdtemp (guestfs_h *g,\n"
10607 " const char *template);\n"
10612 #: ../src/guestfs-actions.pod:3919 ../fish/guestfish-actions.pod:2660
10614 "This command creates a temporary directory. The C<template> parameter "
10615 "should be a full pathname for the temporary directory name with the final "
10616 "six characters being \"XXXXXX\"."
10620 #: ../src/guestfs-actions.pod:3924 ../fish/guestfish-actions.pod:2665
10622 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
10623 "being suitable for Windows filesystems."
10627 #: ../src/guestfs-actions.pod:3927 ../fish/guestfish-actions.pod:2668
10628 msgid "The name of the temporary directory that was created is returned."
10632 #: ../src/guestfs-actions.pod:3930 ../fish/guestfish-actions.pod:2671
10633 msgid "The temporary directory is created with mode 0700 and is owned by root."
10637 #: ../src/guestfs-actions.pod:3933 ../fish/guestfish-actions.pod:2674
10639 "The caller is responsible for deleting the temporary directory and its "
10640 "contents after use."
10644 #: ../src/guestfs-actions.pod:3936 ../fish/guestfish-actions.pod:2677
10645 msgid "See also: L<mkdtemp(3)>"
10649 #: ../src/guestfs-actions.pod:3943
10650 msgid "guestfs_mke2fs_J"
10654 #: ../src/guestfs-actions.pod:3945
10658 " guestfs_mke2fs_J (guestfs_h *g,\n"
10659 " const char *fstype,\n"
10660 " int blocksize,\n"
10661 " const char *device,\n"
10662 " const char *journal);\n"
10667 #: ../src/guestfs-actions.pod:3952 ../fish/guestfish-actions.pod:2683
10669 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10670 "C<journal>. It is equivalent to the command:"
10674 #: ../src/guestfs-actions.pod:3956 ../fish/guestfish-actions.pod:2687
10677 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
10682 #: ../src/guestfs-actions.pod:3958
10683 msgid "See also C<guestfs_mke2journal>."
10687 #: ../src/guestfs-actions.pod:3962 ../src/guestfs-actions.pod:3980 ../src/guestfs-actions.pod:3998 ../src/guestfs-actions.pod:4014 ../src/guestfs-actions.pod:4028 ../src/guestfs-actions.pod:4042 ../src/guestfs-actions.pod:4094 ../src/guestfs-actions.pod:4284
10688 msgid "(Added in 1.0.68)"
10692 #: ../src/guestfs-actions.pod:3964
10693 msgid "guestfs_mke2fs_JL"
10697 #: ../src/guestfs-actions.pod:3966
10701 " guestfs_mke2fs_JL (guestfs_h *g,\n"
10702 " const char *fstype,\n"
10703 " int blocksize,\n"
10704 " const char *device,\n"
10705 " const char *label);\n"
10710 #: ../src/guestfs-actions.pod:3973 ../fish/guestfish-actions.pod:2695
10712 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10713 "the journal labeled C<label>."
10717 #: ../src/guestfs-actions.pod:3976
10718 msgid "See also C<guestfs_mke2journal_L>."
10722 #: ../src/guestfs-actions.pod:3982
10723 msgid "guestfs_mke2fs_JU"
10727 #: ../src/guestfs-actions.pod:3984
10731 " guestfs_mke2fs_JU (guestfs_h *g,\n"
10732 " const char *fstype,\n"
10733 " int blocksize,\n"
10734 " const char *device,\n"
10735 " const char *uuid);\n"
10740 #: ../src/guestfs-actions.pod:3991 ../fish/guestfish-actions.pod:2704
10742 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10743 "the journal with UUID C<uuid>."
10747 #: ../src/guestfs-actions.pod:3994
10748 msgid "See also C<guestfs_mke2journal_U>."
10752 #: ../src/guestfs-actions.pod:4000
10753 msgid "guestfs_mke2journal"
10757 #: ../src/guestfs-actions.pod:4002
10761 " guestfs_mke2journal (guestfs_h *g,\n"
10762 " int blocksize,\n"
10763 " const char *device);\n"
10768 #: ../src/guestfs-actions.pod:4007 ../fish/guestfish-actions.pod:2713
10770 "This creates an ext2 external journal on C<device>. It is equivalent to the "
10775 #: ../src/guestfs-actions.pod:4010 ../fish/guestfish-actions.pod:2716
10778 " mke2fs -O journal_dev -b blocksize device\n"
10783 #: ../src/guestfs-actions.pod:4016
10784 msgid "guestfs_mke2journal_L"
10788 #: ../src/guestfs-actions.pod:4018
10792 " guestfs_mke2journal_L (guestfs_h *g,\n"
10793 " int blocksize,\n"
10794 " const char *label,\n"
10795 " const char *device);\n"
10800 #: ../src/guestfs-actions.pod:4024 ../fish/guestfish-actions.pod:2722
10801 msgid "This creates an ext2 external journal on C<device> with label C<label>."
10805 #: ../src/guestfs-actions.pod:4030
10806 msgid "guestfs_mke2journal_U"
10810 #: ../src/guestfs-actions.pod:4032
10814 " guestfs_mke2journal_U (guestfs_h *g,\n"
10815 " int blocksize,\n"
10816 " const char *uuid,\n"
10817 " const char *device);\n"
10822 #: ../src/guestfs-actions.pod:4038 ../fish/guestfish-actions.pod:2728
10823 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
10827 #: ../src/guestfs-actions.pod:4044
10828 msgid "guestfs_mkfifo"
10832 #: ../src/guestfs-actions.pod:4046
10836 " guestfs_mkfifo (guestfs_h *g,\n"
10838 " const char *path);\n"
10843 #: ../src/guestfs-actions.pod:4051
10845 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
10846 "is just a convenient wrapper around C<guestfs_mknod>."
10850 #: ../src/guestfs-actions.pod:4061
10851 msgid "guestfs_mkfs"
10855 #: ../src/guestfs-actions.pod:4063
10859 " guestfs_mkfs (guestfs_h *g,\n"
10860 " const char *fstype,\n"
10861 " const char *device);\n"
10866 #: ../src/guestfs-actions.pod:4068 ../fish/guestfish-actions.pod:2744
10868 "This creates a filesystem on C<device> (usually a partition or LVM logical "
10869 "volume). The filesystem type is C<fstype>, for example C<ext3>."
10873 #: ../src/guestfs-actions.pod:4076
10874 msgid "guestfs_mkfs_b"
10878 #: ../src/guestfs-actions.pod:4078
10882 " guestfs_mkfs_b (guestfs_h *g,\n"
10883 " const char *fstype,\n"
10884 " int blocksize,\n"
10885 " const char *device);\n"
10890 #: ../src/guestfs-actions.pod:4084
10892 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
10893 "block size of the resulting filesystem. Supported block sizes depend on the "
10894 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
10898 #: ../src/guestfs-actions.pod:4089 ../fish/guestfish-actions.pod:2757
10900 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
10905 #: ../src/guestfs-actions.pod:4096
10906 msgid "guestfs_mkmountpoint"
10910 #: ../src/guestfs-actions.pod:4098
10914 " guestfs_mkmountpoint (guestfs_h *g,\n"
10915 " const char *exemptpath);\n"
10920 #: ../src/guestfs-actions.pod:4102
10922 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
10923 "that can be used to create extra mountpoints before mounting the first "
10928 #: ../src/guestfs-actions.pod:4106 ../fish/guestfish-actions.pod:2768
10930 "These calls are I<only> necessary in some very limited circumstances, mainly "
10931 "the case where you want to mount a mix of unrelated and/or read-only "
10932 "filesystems together."
10936 #: ../src/guestfs-actions.pod:4110 ../fish/guestfish-actions.pod:2772
10938 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
10939 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
10940 "inside that. You can unpack this as follows in guestfish:"
10944 #: ../src/guestfs-actions.pod:4115 ../fish/guestfish-actions.pod:2777
10947 " add-ro Fedora-11-i686-Live.iso\n"
10949 " mkmountpoint /cd\n"
10950 " mkmountpoint /sqsh\n"
10951 " mkmountpoint /ext3fs\n"
10952 " mount /dev/sda /cd\n"
10953 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
10954 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
10959 #: ../src/guestfs-actions.pod:4124 ../fish/guestfish-actions.pod:2786
10960 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
10964 #: ../src/guestfs-actions.pod:4126
10966 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
10967 "may get unexpected errors if you try to mix these calls. It is safest to "
10968 "manually unmount filesystems and remove mountpoints after use."
10972 #: ../src/guestfs-actions.pod:4130
10974 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
10975 "first, so for this to work for manual mountpoints, you must ensure that the "
10976 "innermost mountpoints have the longest pathnames, as in the example code "
10981 #: ../src/guestfs-actions.pod:4135 ../fish/guestfish-actions.pod:2797
10982 msgid "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
10986 #: ../src/guestfs-actions.pod:4137
10988 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
10989 "means that C<guestfs_umount_all> is called when the handle is closed which "
10990 "can also trigger these issues."
10994 #: ../src/guestfs-actions.pod:4143 ../src/guestfs-actions.pod:4402 ../src/guestfs-actions.pod:5295
10995 msgid "(Added in 1.0.62)"
10999 #: ../src/guestfs-actions.pod:4145
11000 msgid "guestfs_mknod"
11004 #: ../src/guestfs-actions.pod:4147
11008 " guestfs_mknod (guestfs_h *g,\n"
11012 " const char *path);\n"
11017 #: ../src/guestfs-actions.pod:4154 ../fish/guestfish-actions.pod:2807
11019 "This call creates block or character special devices, or named pipes "
11024 #: ../src/guestfs-actions.pod:4157 ../fish/guestfish-actions.pod:2810
11026 "The C<mode> parameter should be the mode, using the standard constants. "
11027 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
11028 "used when creating block and character special devices."
11032 #: ../src/guestfs-actions.pod:4162
11034 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
11035 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
11036 "regular file). These constants are available in the standard Linux header "
11037 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
11038 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
11039 "the appropriate constant for you."
11043 #: ../src/guestfs-actions.pod:4176
11044 msgid "guestfs_mknod_b"
11048 #: ../src/guestfs-actions.pod:4178
11052 " guestfs_mknod_b (guestfs_h *g,\n"
11056 " const char *path);\n"
11061 #: ../src/guestfs-actions.pod:4185
11063 "This call creates a block device node called C<path> with mode C<mode> and "
11064 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
11065 "wrapper around C<guestfs_mknod>."
11069 #: ../src/guestfs-actions.pod:4195
11070 msgid "guestfs_mknod_c"
11074 #: ../src/guestfs-actions.pod:4197
11078 " guestfs_mknod_c (guestfs_h *g,\n"
11082 " const char *path);\n"
11087 #: ../src/guestfs-actions.pod:4204
11089 "This call creates a char device node called C<path> with mode C<mode> and "
11090 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
11091 "wrapper around C<guestfs_mknod>."
11095 #: ../src/guestfs-actions.pod:4214
11096 msgid "guestfs_mkswap"
11100 #: ../src/guestfs-actions.pod:4216
11104 " guestfs_mkswap (guestfs_h *g,\n"
11105 " const char *device);\n"
11110 #: ../src/guestfs-actions.pod:4220 ../fish/guestfish-actions.pod:2849
11111 msgid "Create a swap partition on C<device>."
11115 #: ../src/guestfs-actions.pod:4226
11116 msgid "guestfs_mkswap_L"
11120 #: ../src/guestfs-actions.pod:4228
11124 " guestfs_mkswap_L (guestfs_h *g,\n"
11125 " const char *label,\n"
11126 " const char *device);\n"
11131 #: ../src/guestfs-actions.pod:4233 ../fish/guestfish-actions.pod:2855
11132 msgid "Create a swap partition on C<device> with label C<label>."
11136 #: ../src/guestfs-actions.pod:4235 ../fish/guestfish-actions.pod:2857
11138 "Note that you cannot attach a swap label to a block device "
11139 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
11140 "the kernel or swap tools."
11144 #: ../src/guestfs-actions.pod:4243
11145 msgid "guestfs_mkswap_U"
11149 #: ../src/guestfs-actions.pod:4245
11153 " guestfs_mkswap_U (guestfs_h *g,\n"
11154 " const char *uuid,\n"
11155 " const char *device);\n"
11160 #: ../src/guestfs-actions.pod:4250 ../fish/guestfish-actions.pod:2865
11161 msgid "Create a swap partition on C<device> with UUID C<uuid>."
11165 #: ../src/guestfs-actions.pod:4256
11166 msgid "guestfs_mkswap_file"
11170 #: ../src/guestfs-actions.pod:4258
11174 " guestfs_mkswap_file (guestfs_h *g,\n"
11175 " const char *path);\n"
11180 #: ../src/guestfs-actions.pod:4262 ../fish/guestfish-actions.pod:2871
11181 msgid "Create a swap file."
11185 #: ../src/guestfs-actions.pod:4264
11187 "This command just writes a swap file signature to an existing file. To "
11188 "create the file itself, use something like C<guestfs_fallocate>."
11192 #: ../src/guestfs-actions.pod:4271
11193 msgid "guestfs_modprobe"
11197 #: ../src/guestfs-actions.pod:4273
11201 " guestfs_modprobe (guestfs_h *g,\n"
11202 " const char *modulename);\n"
11207 #: ../src/guestfs-actions.pod:4277 ../fish/guestfish-actions.pod:2880
11208 msgid "This loads a kernel module in the appliance."
11212 #: ../src/guestfs-actions.pod:4279 ../fish/guestfish-actions.pod:2882
11214 "The kernel module must have been whitelisted when libguestfs was built (see "
11215 "C<appliance/kmod.whitelist.in> in the source)."
11219 #: ../src/guestfs-actions.pod:4286
11220 msgid "guestfs_mount"
11224 #: ../src/guestfs-actions.pod:4288
11228 " guestfs_mount (guestfs_h *g,\n"
11229 " const char *device,\n"
11230 " const char *mountpoint);\n"
11235 #: ../src/guestfs-actions.pod:4293 ../fish/guestfish-actions.pod:2889
11237 "Mount a guest disk at a position in the filesystem. Block devices are named "
11238 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
11239 "those block devices contain partitions, they will have the usual names "
11240 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
11244 #: ../src/guestfs-actions.pod:4299 ../fish/guestfish-actions.pod:2895
11246 "The rules are the same as for L<mount(2)>: A filesystem must first be "
11247 "mounted on C</> before others can be mounted. Other filesystems can only be "
11248 "mounted on directories which already exist."
11252 #: ../src/guestfs-actions.pod:4304 ../fish/guestfish-actions.pod:2900
11254 "The mounted filesystem is writable, if we have sufficient permissions on the "
11255 "underlying device."
11259 #: ../src/guestfs-actions.pod:4307
11261 "B<Important note:> When you use this call, the filesystem options C<sync> "
11262 "and C<noatime> are set implicitly. This was originally done because we "
11263 "thought it would improve reliability, but it turns out that I<-o sync> has a "
11264 "very large negative performance impact and negligible effect on "
11265 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
11266 "in any code that needs performance, and instead use C<guestfs_mount_options> "
11267 "(use an empty string for the first parameter if you don't want any options)."
11271 #: ../src/guestfs-actions.pod:4321
11272 msgid "guestfs_mount_loop"
11276 #: ../src/guestfs-actions.pod:4323
11280 " guestfs_mount_loop (guestfs_h *g,\n"
11281 " const char *file,\n"
11282 " const char *mountpoint);\n"
11287 #: ../src/guestfs-actions.pod:4328 ../fish/guestfish-actions.pod:2917
11289 "This command lets you mount C<file> (a filesystem image in a file) on a "
11290 "mount point. It is entirely equivalent to the command C<mount -o loop file "
11295 #: ../src/guestfs-actions.pod:4336
11296 msgid "guestfs_mount_options"
11300 #: ../src/guestfs-actions.pod:4338
11304 " guestfs_mount_options (guestfs_h *g,\n"
11305 " const char *options,\n"
11306 " const char *device,\n"
11307 " const char *mountpoint);\n"
11312 #: ../src/guestfs-actions.pod:4344
11314 "This is the same as the C<guestfs_mount> command, but it allows you to set "
11315 "the mount options as for the L<mount(8)> I<-o> flag."
11319 #: ../src/guestfs-actions.pod:4348 ../fish/guestfish-actions.pod:2929
11321 "If the C<options> parameter is an empty string, then no options are passed "
11322 "(all options default to whatever the filesystem uses)."
11326 #: ../src/guestfs-actions.pod:4354 ../src/guestfs-actions.pod:4368 ../src/guestfs-actions.pod:4385
11327 msgid "(Added in 1.0.10)"
11331 #: ../src/guestfs-actions.pod:4356
11332 msgid "guestfs_mount_ro"
11336 #: ../src/guestfs-actions.pod:4358
11340 " guestfs_mount_ro (guestfs_h *g,\n"
11341 " const char *device,\n"
11342 " const char *mountpoint);\n"
11347 #: ../src/guestfs-actions.pod:4363
11349 "This is the same as the C<guestfs_mount> command, but it mounts the "
11350 "filesystem with the read-only (I<-o ro>) flag."
11354 #: ../src/guestfs-actions.pod:4370
11355 msgid "guestfs_mount_vfs"
11359 #: ../src/guestfs-actions.pod:4372
11363 " guestfs_mount_vfs (guestfs_h *g,\n"
11364 " const char *options,\n"
11365 " const char *vfstype,\n"
11366 " const char *device,\n"
11367 " const char *mountpoint);\n"
11372 #: ../src/guestfs-actions.pod:4379
11374 "This is the same as the C<guestfs_mount> command, but it allows you to set "
11375 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
11380 #: ../src/guestfs-actions.pod:4387
11381 msgid "guestfs_mountpoints"
11385 #: ../src/guestfs-actions.pod:4389
11389 " guestfs_mountpoints (guestfs_h *g);\n"
11394 #: ../src/guestfs-actions.pod:4392
11396 "This call is similar to C<guestfs_mounts>. That call returns a list of "
11397 "devices. This one returns a hash table (map) of device name to directory "
11398 "where the device is mounted."
11402 #: ../src/guestfs-actions.pod:4404
11403 msgid "guestfs_mounts"
11407 #: ../src/guestfs-actions.pod:4406
11411 " guestfs_mounts (guestfs_h *g);\n"
11416 #: ../src/guestfs-actions.pod:4409 ../fish/guestfish-actions.pod:2960
11418 "This returns the list of currently mounted filesystems. It returns the list "
11419 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
11423 #: ../src/guestfs-actions.pod:4412 ../fish/guestfish-actions.pod:2963
11424 msgid "Some internal mounts are not shown."
11428 #: ../src/guestfs-actions.pod:4414
11429 msgid "See also: C<guestfs_mountpoints>"
11433 #: ../src/guestfs-actions.pod:4422
11438 #: ../src/guestfs-actions.pod:4424
11442 " guestfs_mv (guestfs_h *g,\n"
11443 " const char *src,\n"
11444 " const char *dest);\n"
11449 #: ../src/guestfs-actions.pod:4429 ../fish/guestfish-actions.pod:2971
11451 "This moves a file from C<src> to C<dest> where C<dest> is either a "
11452 "destination filename or destination directory."
11456 #: ../src/guestfs-actions.pod:4436
11457 msgid "guestfs_ntfs_3g_probe"
11461 #: ../src/guestfs-actions.pod:4438
11465 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
11467 " const char *device);\n"
11472 #: ../src/guestfs-actions.pod:4443 ../fish/guestfish-actions.pod:2978
11474 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
11475 "C<device> for mountability. (Not all NTFS volumes can be mounted "
11476 "read-write, and some cannot be mounted at all)."
11480 #: ../src/guestfs-actions.pod:4447 ../fish/guestfish-actions.pod:2982
11482 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
11483 "can be mounted read-write. Set it to false if you want to test if the "
11484 "volume can be mounted read-only."
11488 #: ../src/guestfs-actions.pod:4451 ../fish/guestfish-actions.pod:2986
11490 "The return value is an integer which C<0> if the operation would succeed, or "
11491 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
11495 #: ../src/guestfs-actions.pod:4457
11496 msgid "(Added in 1.0.43)"
11500 #: ../src/guestfs-actions.pod:4459
11501 msgid "guestfs_ntfsresize"
11505 #: ../src/guestfs-actions.pod:4461
11509 " guestfs_ntfsresize (guestfs_h *g,\n"
11510 " const char *device);\n"
11515 #: ../src/guestfs-actions.pod:4465 ../fish/guestfish-actions.pod:2994
11517 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
11518 "size of the underlying device. See also L<ntfsresize(8)>."
11522 #: ../src/guestfs-actions.pod:4473
11523 msgid "guestfs_ntfsresize_size"
11527 #: ../src/guestfs-actions.pod:4475
11531 " guestfs_ntfsresize_size (guestfs_h *g,\n"
11532 " const char *device,\n"
11533 " int64_t size);\n"
11538 #: ../src/guestfs-actions.pod:4480
11540 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
11541 "to specify the new size (in bytes) explicitly."
11545 #: ../src/guestfs-actions.pod:4485 ../src/guestfs-actions.pod:4921 ../src/guestfs-actions.pod:4994 ../src/guestfs-actions.pod:5243
11546 msgid "(Added in 1.3.14)"
11550 #: ../src/guestfs-actions.pod:4487
11551 msgid "guestfs_part_add"
11555 #: ../src/guestfs-actions.pod:4489
11559 " guestfs_part_add (guestfs_h *g,\n"
11560 " const char *device,\n"
11561 " const char *prlogex,\n"
11562 " int64_t startsect,\n"
11563 " int64_t endsect);\n"
11568 #: ../src/guestfs-actions.pod:4496
11570 "This command adds a partition to C<device>. If there is no partition table "
11571 "on the device, call C<guestfs_part_init> first."
11575 #: ../src/guestfs-actions.pod:4499 ../fish/guestfish-actions.pod:3012
11577 "The C<prlogex> parameter is the type of partition. Normally you should pass "
11578 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
11579 "C<logical>) and C<e> (or C<extended>) partition types."
11583 #: ../src/guestfs-actions.pod:4504 ../fish/guestfish-actions.pod:3017
11585 "C<startsect> and C<endsect> are the start and end of the partition in "
11586 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
11587 "from the end of the disk (C<-1> is the last sector)."
11591 #: ../src/guestfs-actions.pod:4508
11593 "Creating a partition which covers the whole disk is not so easy. Use "
11594 "C<guestfs_part_disk> to do that."
11598 #: ../src/guestfs-actions.pod:4513 ../src/guestfs-actions.pod:4551 ../src/guestfs-actions.pod:4604 ../src/guestfs-actions.pod:4682 ../src/guestfs-actions.pod:4720 ../src/guestfs-actions.pod:4739 ../src/guestfs-actions.pod:4779
11599 msgid "(Added in 1.0.78)"
11603 #: ../src/guestfs-actions.pod:4515
11604 msgid "guestfs_part_del"
11608 #: ../src/guestfs-actions.pod:4517
11612 " guestfs_part_del (guestfs_h *g,\n"
11613 " const char *device,\n"
11619 #: ../src/guestfs-actions.pod:4522 ../fish/guestfish-actions.pod:3028
11620 msgid "This command deletes the partition numbered C<partnum> on C<device>."
11624 #: ../src/guestfs-actions.pod:4524 ../fish/guestfish-actions.pod:3030
11626 "Note that in the case of MBR partitioning, deleting an extended partition "
11627 "also deletes any logical partitions it contains."
11631 #: ../src/guestfs-actions.pod:4532
11632 msgid "guestfs_part_disk"
11636 #: ../src/guestfs-actions.pod:4534
11640 " guestfs_part_disk (guestfs_h *g,\n"
11641 " const char *device,\n"
11642 " const char *parttype);\n"
11647 #: ../src/guestfs-actions.pod:4539
11649 "This command is simply a combination of C<guestfs_part_init> followed by "
11650 "C<guestfs_part_add> to create a single primary partition covering the whole "
11655 #: ../src/guestfs-actions.pod:4543
11657 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
11658 "possible values are described in C<guestfs_part_init>."
11662 #: ../src/guestfs-actions.pod:4553
11663 msgid "guestfs_part_get_bootable"
11667 #: ../src/guestfs-actions.pod:4555
11671 " guestfs_part_get_bootable (guestfs_h *g,\n"
11672 " const char *device,\n"
11678 #: ../src/guestfs-actions.pod:4560 ../fish/guestfish-actions.pod:3052
11680 "This command returns true if the partition C<partnum> on C<device> has the "
11681 "bootable flag set."
11685 #: ../src/guestfs-actions.pod:4563
11686 msgid "See also C<guestfs_part_set_bootable>."
11690 #: ../src/guestfs-actions.pod:4569
11691 msgid "guestfs_part_get_mbr_id"
11695 #: ../src/guestfs-actions.pod:4571
11699 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
11700 " const char *device,\n"
11706 #: ../src/guestfs-actions.pod:4576 ../fish/guestfish-actions.pod:3061
11708 "Returns the MBR type byte (also known as the ID byte) from the numbered "
11709 "partition C<partnum>."
11713 #: ../src/guestfs-actions.pod:4579 ../src/guestfs-actions.pod:4755
11715 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
11716 "undefined results for other partition table types (see "
11717 "C<guestfs_part_get_parttype>)."
11721 #: ../src/guestfs-actions.pod:4587
11722 msgid "guestfs_part_get_parttype"
11726 #: ../src/guestfs-actions.pod:4589
11730 " guestfs_part_get_parttype (guestfs_h *g,\n"
11731 " const char *device);\n"
11736 #: ../src/guestfs-actions.pod:4593 ../fish/guestfish-actions.pod:3072
11738 "This command examines the partition table on C<device> and returns the "
11739 "partition table type (format) being used."
11743 #: ../src/guestfs-actions.pod:4596
11745 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
11746 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
11747 "possible, although unusual. See C<guestfs_part_init> for a full list."
11751 #: ../src/guestfs-actions.pod:4606
11752 msgid "guestfs_part_init"
11756 #: ../src/guestfs-actions.pod:4608
11760 " guestfs_part_init (guestfs_h *g,\n"
11761 " const char *device,\n"
11762 " const char *parttype);\n"
11767 #: ../src/guestfs-actions.pod:4613 ../fish/guestfish-actions.pod:3084
11769 "This creates an empty partition table on C<device> of one of the partition "
11770 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
11771 "(for large disks)."
11775 #: ../src/guestfs-actions.pod:4617
11777 "Initially there are no partitions. Following this, you should call "
11778 "C<guestfs_part_add> for each partition required."
11782 #: ../src/guestfs-actions.pod:4620 ../fish/guestfish-actions.pod:3091
11783 msgid "Possible values for C<parttype> are:"
11787 #: ../src/guestfs-actions.pod:4624 ../fish/guestfish-actions.pod:3095
11788 msgid "B<efi> | B<gpt>"
11792 #: ../src/guestfs-actions.pod:4626 ../fish/guestfish-actions.pod:3097
11793 msgid "Intel EFI / GPT partition table."
11797 #: ../src/guestfs-actions.pod:4628 ../fish/guestfish-actions.pod:3099
11799 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
11800 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
11801 "the C<mbr> format."
11805 #: ../src/guestfs-actions.pod:4632 ../fish/guestfish-actions.pod:3103
11806 msgid "B<mbr> | B<msdos>"
11810 #: ../src/guestfs-actions.pod:4634 ../fish/guestfish-actions.pod:3105
11812 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
11813 "Windows. This partition type will B<only> work for device sizes up to 2 "
11814 "TB. For large disks we recommend using C<gpt>."
11818 #: ../src/guestfs-actions.pod:4641 ../fish/guestfish-actions.pod:3112
11819 msgid "Other partition table types that may work but are not supported include:"
11823 #: ../src/guestfs-actions.pod:4646 ../fish/guestfish-actions.pod:3117
11828 #: ../src/guestfs-actions.pod:4648 ../fish/guestfish-actions.pod:3119
11829 msgid "AIX disk labels."
11833 #: ../src/guestfs-actions.pod:4650 ../fish/guestfish-actions.pod:3121
11834 msgid "B<amiga> | B<rdb>"
11838 #: ../src/guestfs-actions.pod:4652 ../fish/guestfish-actions.pod:3123
11839 msgid "Amiga \"Rigid Disk Block\" format."
11843 #: ../src/guestfs-actions.pod:4654 ../fish/guestfish-actions.pod:3125
11848 #: ../src/guestfs-actions.pod:4656 ../fish/guestfish-actions.pod:3127
11849 msgid "BSD disk labels."
11853 #: ../src/guestfs-actions.pod:4658 ../fish/guestfish-actions.pod:3129
11858 #: ../src/guestfs-actions.pod:4660 ../fish/guestfish-actions.pod:3131
11859 msgid "DASD, used on IBM mainframes."
11863 #: ../src/guestfs-actions.pod:4662 ../fish/guestfish-actions.pod:3133
11868 #: ../src/guestfs-actions.pod:4664 ../fish/guestfish-actions.pod:3135
11869 msgid "MIPS/SGI volumes."
11873 #: ../src/guestfs-actions.pod:4666 ../fish/guestfish-actions.pod:3137
11878 #: ../src/guestfs-actions.pod:4668 ../fish/guestfish-actions.pod:3139
11879 msgid "Old Mac partition format. Modern Macs use C<gpt>."
11883 #: ../src/guestfs-actions.pod:4670 ../fish/guestfish-actions.pod:3141
11888 #: ../src/guestfs-actions.pod:4672 ../fish/guestfish-actions.pod:3143
11889 msgid "NEC PC-98 format, common in Japan apparently."
11893 #: ../src/guestfs-actions.pod:4674 ../fish/guestfish-actions.pod:3145
11898 #: ../src/guestfs-actions.pod:4676 ../fish/guestfish-actions.pod:3147
11899 msgid "Sun disk labels."
11903 #: ../src/guestfs-actions.pod:4684
11904 msgid "guestfs_part_list"
11908 #: ../src/guestfs-actions.pod:4686
11911 " struct guestfs_partition_list *\n"
11912 " guestfs_part_list (guestfs_h *g,\n"
11913 " const char *device);\n"
11918 #: ../src/guestfs-actions.pod:4690 ../fish/guestfish-actions.pod:3155
11920 "This command parses the partition table on C<device> and returns the list of "
11921 "partitions found."
11925 #: ../src/guestfs-actions.pod:4693 ../fish/guestfish-actions.pod:3158
11926 msgid "The fields in the returned structure are:"
11930 #: ../src/guestfs-actions.pod:4697 ../fish/guestfish-actions.pod:3162
11931 msgid "B<part_num>"
11935 #: ../src/guestfs-actions.pod:4699 ../fish/guestfish-actions.pod:3164
11936 msgid "Partition number, counting from 1."
11940 #: ../src/guestfs-actions.pod:4701 ../fish/guestfish-actions.pod:3166
11941 msgid "B<part_start>"
11945 #: ../src/guestfs-actions.pod:4703
11947 "Start of the partition I<in bytes>. To get sectors you have to divide by "
11948 "the device's sector size, see C<guestfs_blockdev_getss>."
11952 #: ../src/guestfs-actions.pod:4706 ../fish/guestfish-actions.pod:3171
11953 msgid "B<part_end>"
11957 #: ../src/guestfs-actions.pod:4708 ../fish/guestfish-actions.pod:3173
11958 msgid "End of the partition in bytes."
11962 #: ../src/guestfs-actions.pod:4710 ../fish/guestfish-actions.pod:3175
11963 msgid "B<part_size>"
11967 #: ../src/guestfs-actions.pod:4712 ../fish/guestfish-actions.pod:3177
11968 msgid "Size of the partition in bytes."
11972 #: ../src/guestfs-actions.pod:4716
11974 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
11975 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
11980 #: ../src/guestfs-actions.pod:4722
11981 msgid "guestfs_part_set_bootable"
11985 #: ../src/guestfs-actions.pod:4724
11989 " guestfs_part_set_bootable (guestfs_h *g,\n"
11990 " const char *device,\n"
11992 " int bootable);\n"
11997 #: ../src/guestfs-actions.pod:4730 ../fish/guestfish-actions.pod:3185
11999 "This sets the bootable flag on partition numbered C<partnum> on device "
12000 "C<device>. Note that partitions are numbered from 1."
12004 #: ../src/guestfs-actions.pod:4733 ../fish/guestfish-actions.pod:3188
12006 "The bootable flag is used by some operating systems (notably Windows) to "
12007 "determine which partition to boot from. It is by no means universally "
12012 #: ../src/guestfs-actions.pod:4741
12013 msgid "guestfs_part_set_mbr_id"
12017 #: ../src/guestfs-actions.pod:4743
12021 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
12022 " const char *device,\n"
12029 #: ../src/guestfs-actions.pod:4749 ../fish/guestfish-actions.pod:3196
12031 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
12032 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
12033 "documentation are in fact hexadecimal numbers, but usually documented "
12034 "without any leading \"0x\" which might be confusing."
12038 #: ../src/guestfs-actions.pod:4763
12039 msgid "guestfs_part_set_name"
12043 #: ../src/guestfs-actions.pod:4765
12047 " guestfs_part_set_name (guestfs_h *g,\n"
12048 " const char *device,\n"
12050 " const char *name);\n"
12055 #: ../src/guestfs-actions.pod:4771 ../fish/guestfish-actions.pod:3210
12057 "This sets the partition name on partition numbered C<partnum> on device "
12058 "C<device>. Note that partitions are numbered from 1."
12062 #: ../src/guestfs-actions.pod:4774 ../fish/guestfish-actions.pod:3213
12064 "The partition name can only be set on certain types of partition table. "
12065 "This works on C<gpt> but not on C<mbr> partitions."
12069 #: ../src/guestfs-actions.pod:4781
12070 msgid "guestfs_part_to_dev"
12074 #: ../src/guestfs-actions.pod:4783
12078 " guestfs_part_to_dev (guestfs_h *g,\n"
12079 " const char *partition);\n"
12084 #: ../src/guestfs-actions.pod:4787 ../fish/guestfish-actions.pod:3220
12086 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
12087 "partition number, returning the device name (eg. \"/dev/sdb\")."
12091 #: ../src/guestfs-actions.pod:4791
12093 "The named partition must exist, for example as a string returned from "
12094 "C<guestfs_list_partitions>."
12098 #: ../src/guestfs-actions.pod:4799
12099 msgid "guestfs_ping_daemon"
12103 #: ../src/guestfs-actions.pod:4801
12107 " guestfs_ping_daemon (guestfs_h *g);\n"
12112 #: ../src/guestfs-actions.pod:4804 ../fish/guestfish-actions.pod:3231
12114 "This is a test probe into the guestfs daemon running inside the qemu "
12115 "subprocess. Calling this function checks that the daemon responds to the "
12116 "ping message, without affecting the daemon or attached block device(s) in "
12121 #: ../src/guestfs-actions.pod:4813
12122 msgid "guestfs_pread"
12126 #: ../src/guestfs-actions.pod:4815
12130 " guestfs_pread (guestfs_h *g,\n"
12131 " const char *path,\n"
12133 " int64_t offset,\n"
12134 " size_t *size_r);\n"
12139 #: ../src/guestfs-actions.pod:4822 ../fish/guestfish-actions.pod:3240
12141 "This command lets you read part of a file. It reads C<count> bytes of the "
12142 "file, starting at C<offset>, from file C<path>."
12146 #: ../src/guestfs-actions.pod:4825 ../src/guestfs-actions.pod:4851 ../fish/guestfish-actions.pod:3243 ../fish/guestfish-actions.pod:3258
12148 "This may read fewer bytes than requested. For further details see the "
12149 "L<pread(2)> system call."
12153 #: ../src/guestfs-actions.pod:4828
12154 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
12158 #: ../src/guestfs-actions.pod:4839
12159 msgid "guestfs_pread_device"
12163 #: ../src/guestfs-actions.pod:4841
12167 " guestfs_pread_device (guestfs_h *g,\n"
12168 " const char *device,\n"
12170 " int64_t offset,\n"
12171 " size_t *size_r);\n"
12176 #: ../src/guestfs-actions.pod:4848 ../fish/guestfish-actions.pod:3255
12178 "This command lets you read part of a file. It reads C<count> bytes of "
12179 "C<device>, starting at C<offset>."
12183 #: ../src/guestfs-actions.pod:4854
12184 msgid "See also C<guestfs_pread>."
12188 #: ../src/guestfs-actions.pod:4863
12189 msgid "(Added in 1.5.21)"
12193 #: ../src/guestfs-actions.pod:4865
12194 msgid "guestfs_pvcreate"
12198 #: ../src/guestfs-actions.pod:4867
12202 " guestfs_pvcreate (guestfs_h *g,\n"
12203 " const char *device);\n"
12208 #: ../src/guestfs-actions.pod:4871 ../fish/guestfish-actions.pod:3270
12210 "This creates an LVM physical volume on the named C<device>, where C<device> "
12211 "should usually be a partition name such as C</dev/sda1>."
12215 #: ../src/guestfs-actions.pod:4879
12216 msgid "guestfs_pvremove"
12220 #: ../src/guestfs-actions.pod:4881
12224 " guestfs_pvremove (guestfs_h *g,\n"
12225 " const char *device);\n"
12230 #: ../src/guestfs-actions.pod:4885 ../fish/guestfish-actions.pod:3278
12232 "This wipes a physical volume C<device> so that LVM will no longer recognise "
12237 #: ../src/guestfs-actions.pod:4888 ../fish/guestfish-actions.pod:3281
12239 "The implementation uses the C<pvremove> command which refuses to wipe "
12240 "physical volumes that contain any volume groups, so you have to remove those "
12245 #: ../src/guestfs-actions.pod:4896
12246 msgid "guestfs_pvresize"
12250 #: ../src/guestfs-actions.pod:4898
12254 " guestfs_pvresize (guestfs_h *g,\n"
12255 " const char *device);\n"
12260 #: ../src/guestfs-actions.pod:4902 ../fish/guestfish-actions.pod:3289
12262 "This resizes (expands or shrinks) an existing LVM physical volume to match "
12263 "the new size of the underlying device."
12267 #: ../src/guestfs-actions.pod:4909
12268 msgid "guestfs_pvresize_size"
12272 #: ../src/guestfs-actions.pod:4911
12276 " guestfs_pvresize_size (guestfs_h *g,\n"
12277 " const char *device,\n"
12278 " int64_t size);\n"
12283 #: ../src/guestfs-actions.pod:4916
12285 "This command is the same as C<guestfs_pvresize> except that it allows you to "
12286 "specify the new size (in bytes) explicitly."
12290 #: ../src/guestfs-actions.pod:4923
12291 msgid "guestfs_pvs"
12295 #: ../src/guestfs-actions.pod:4925
12299 " guestfs_pvs (guestfs_h *g);\n"
12304 #: ../src/guestfs-actions.pod:4928 ../fish/guestfish-actions.pod:3303
12306 "List all the physical volumes detected. This is the equivalent of the "
12307 "L<pvs(8)> command."
12311 #: ../src/guestfs-actions.pod:4931 ../fish/guestfish-actions.pod:3306
12313 "This returns a list of just the device names that contain PVs "
12314 "(eg. C</dev/sda2>)."
12318 #: ../src/guestfs-actions.pod:4934
12319 msgid "See also C<guestfs_pvs_full>."
12323 #: ../src/guestfs-actions.pod:4942
12324 msgid "guestfs_pvs_full"
12328 #: ../src/guestfs-actions.pod:4944
12331 " struct guestfs_lvm_pv_list *\n"
12332 " guestfs_pvs_full (guestfs_h *g);\n"
12337 #: ../src/guestfs-actions.pod:4947 ../fish/guestfish-actions.pod:3315
12339 "List all the physical volumes detected. This is the equivalent of the "
12340 "L<pvs(8)> command. The \"full\" version includes all fields."
12344 #: ../src/guestfs-actions.pod:4950
12346 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
12347 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after "
12352 #: ../src/guestfs-actions.pod:4956
12353 msgid "guestfs_pvuuid"
12357 #: ../src/guestfs-actions.pod:4958
12361 " guestfs_pvuuid (guestfs_h *g,\n"
12362 " const char *device);\n"
12367 #: ../src/guestfs-actions.pod:4962 ../fish/guestfish-actions.pod:3322
12368 msgid "This command returns the UUID of the LVM PV C<device>."
12372 #: ../src/guestfs-actions.pod:4969
12373 msgid "guestfs_pwrite"
12377 #: ../src/guestfs-actions.pod:4971
12381 " guestfs_pwrite (guestfs_h *g,\n"
12382 " const char *path,\n"
12383 " const char *content,\n"
12384 " size_t content_size,\n"
12385 " int64_t offset);\n"
12390 #: ../src/guestfs-actions.pod:4978 ../fish/guestfish-actions.pod:3328
12392 "This command writes to part of a file. It writes the data buffer C<content> "
12393 "to the file C<path> starting at offset C<offset>."
12397 #: ../src/guestfs-actions.pod:4981 ../fish/guestfish-actions.pod:3331
12399 "This command implements the L<pwrite(2)> system call, and like that system "
12400 "call it may not write the full data requested. The return value is the "
12401 "number of bytes that were actually written to the file. This could even be "
12402 "0, although short writes are unlikely for regular files in ordinary "
12407 #: ../src/guestfs-actions.pod:4987
12408 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
12412 #: ../src/guestfs-actions.pod:4996
12413 msgid "guestfs_pwrite_device"
12417 #: ../src/guestfs-actions.pod:4998
12421 " guestfs_pwrite_device (guestfs_h *g,\n"
12422 " const char *device,\n"
12423 " const char *content,\n"
12424 " size_t content_size,\n"
12425 " int64_t offset);\n"
12430 #: ../src/guestfs-actions.pod:5005 ../fish/guestfish-actions.pod:3346
12432 "This command writes to part of a device. It writes the data buffer "
12433 "C<content> to C<device> starting at offset C<offset>."
12437 #: ../src/guestfs-actions.pod:5008 ../fish/guestfish-actions.pod:3349
12439 "This command implements the L<pwrite(2)> system call, and like that system "
12440 "call it may not write the full data requested (although short writes to disk "
12441 "devices and partitions are probably impossible with standard Linux kernels)."
12445 #: ../src/guestfs-actions.pod:5013
12446 msgid "See also C<guestfs_pwrite>."
12450 #: ../src/guestfs-actions.pod:5020
12451 msgid "(Added in 1.5.20)"
12455 #: ../src/guestfs-actions.pod:5022
12456 msgid "guestfs_read_file"
12460 #: ../src/guestfs-actions.pod:5024
12464 " guestfs_read_file (guestfs_h *g,\n"
12465 " const char *path,\n"
12466 " size_t *size_r);\n"
12471 #: ../src/guestfs-actions.pod:5029 ../fish/guestfish-actions.pod:3363
12472 msgid "This calls returns the contents of the file C<path> as a buffer."
12476 #: ../src/guestfs-actions.pod:5032
12478 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
12479 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
12480 "function is limited in the total size of file that can be handled."
12484 #: ../src/guestfs-actions.pod:5044
12485 msgid "(Added in 1.0.63)"
12489 #: ../src/guestfs-actions.pod:5046
12490 msgid "guestfs_read_lines"
12494 #: ../src/guestfs-actions.pod:5048
12498 " guestfs_read_lines (guestfs_h *g,\n"
12499 " const char *path);\n"
12504 #: ../src/guestfs-actions.pod:5054 ../fish/guestfish-actions.pod:3380
12506 "The file contents are returned as a list of lines. Trailing C<LF> and "
12507 "C<CRLF> character sequences are I<not> returned."
12511 #: ../src/guestfs-actions.pod:5057
12513 "Note that this function cannot correctly handle binary files (specifically, "
12514 "files containing C<\\0> character which is treated as end of line). For "
12515 "those you need to use the C<guestfs_read_file> function which has a more "
12516 "complex interface."
12520 #: ../src/guestfs-actions.pod:5068
12521 msgid "guestfs_readdir"
12525 #: ../src/guestfs-actions.pod:5070
12528 " struct guestfs_dirent_list *\n"
12529 " guestfs_readdir (guestfs_h *g,\n"
12530 " const char *dir);\n"
12535 #: ../src/guestfs-actions.pod:5074 ../fish/guestfish-actions.pod:3392
12536 msgid "This returns the list of directory entries in directory C<dir>."
12540 #: ../src/guestfs-actions.pod:5076 ../fish/guestfish-actions.pod:3394
12542 "All entries in the directory are returned, including C<.> and C<..>. The "
12543 "entries are I<not> sorted, but returned in the same order as the underlying "
12548 #: ../src/guestfs-actions.pod:5080 ../fish/guestfish-actions.pod:3398
12550 "Also this call returns basic file type information about each file. The "
12551 "C<ftyp> field will contain one of the following characters:"
12555 #: ../src/guestfs-actions.pod:5085 ../fish/guestfish-actions.pod:3403
12560 #: ../src/guestfs-actions.pod:5087 ../fish/guestfish-actions.pod:3405
12561 msgid "Block special"
12565 #: ../src/guestfs-actions.pod:5089 ../fish/guestfish-actions.pod:3407
12570 #: ../src/guestfs-actions.pod:5091 ../fish/guestfish-actions.pod:3409
12571 msgid "Char special"
12575 #: ../src/guestfs-actions.pod:5093 ../fish/guestfish-actions.pod:3411
12580 #: ../src/guestfs-actions.pod:5095 ../fish/guestfish-actions.pod:3413
12585 #: ../src/guestfs-actions.pod:5097 ../fish/guestfish-actions.pod:3415
12590 #: ../src/guestfs-actions.pod:5099 ../fish/guestfish-actions.pod:3417
12591 msgid "FIFO (named pipe)"
12595 #: ../src/guestfs-actions.pod:5101 ../fish/guestfish-actions.pod:3419
12600 #: ../src/guestfs-actions.pod:5103 ../fish/guestfish-actions.pod:3421
12601 msgid "Symbolic link"
12605 #: ../src/guestfs-actions.pod:5105 ../fish/guestfish-actions.pod:3423
12610 #: ../src/guestfs-actions.pod:5107 ../fish/guestfish-actions.pod:3425
12611 msgid "Regular file"
12615 #: ../src/guestfs-actions.pod:5109 ../fish/guestfish-actions.pod:3427
12620 #: ../src/guestfs-actions.pod:5111 ../fish/guestfish-actions.pod:3429
12625 #: ../src/guestfs-actions.pod:5113 ../fish/guestfish-actions.pod:3431
12630 #: ../src/guestfs-actions.pod:5115 ../fish/guestfish-actions.pod:3433
12631 msgid "Unknown file type"
12635 #: ../src/guestfs-actions.pod:5117 ../fish/guestfish-actions.pod:3435
12640 #: ../src/guestfs-actions.pod:5119 ../fish/guestfish-actions.pod:3437
12641 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
12645 #: ../src/guestfs-actions.pod:5124
12647 "This function is primarily intended for use by programs. To get a simple "
12648 "list of names, use C<guestfs_ls>. To get a printable directory for human "
12649 "consumption, use C<guestfs_ll>."
12653 #: ../src/guestfs-actions.pod:5128
12655 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
12656 "was an error. I<The caller must call C<guestfs_free_dirent_list> after "
12661 #: ../src/guestfs-actions.pod:5134
12662 msgid "guestfs_readlink"
12666 #: ../src/guestfs-actions.pod:5136
12670 " guestfs_readlink (guestfs_h *g,\n"
12671 " const char *path);\n"
12676 #: ../src/guestfs-actions.pod:5140 ../fish/guestfish-actions.pod:3450
12677 msgid "This command reads the target of a symbolic link."
12681 #: ../src/guestfs-actions.pod:5147
12682 msgid "guestfs_readlinklist"
12686 #: ../src/guestfs-actions.pod:5149
12690 " guestfs_readlinklist (guestfs_h *g,\n"
12691 " const char *path,\n"
12692 " char *const *names);\n"
12697 #: ../src/guestfs-actions.pod:5154 ../fish/guestfish-actions.pod:3456
12699 "This call allows you to do a C<readlink> operation on multiple files, where "
12700 "all files are in the directory C<path>. C<names> is the list of files from "
12705 #: ../src/guestfs-actions.pod:5158 ../fish/guestfish-actions.pod:3460
12707 "On return you get a list of strings, with a one-to-one correspondence to the "
12708 "C<names> list. Each string is the value of the symbolic link."
12712 #: ../src/guestfs-actions.pod:5162 ../fish/guestfish-actions.pod:3464
12714 "If the C<readlink(2)> operation fails on any name, then the corresponding "
12715 "result string is the empty string C<\"\">. However the whole operation is "
12716 "completed even if there were C<readlink(2)> errors, and so you can call this "
12717 "function with names where you don't know if they are symbolic links already "
12718 "(albeit slightly less efficient)."
12722 #: ../src/guestfs-actions.pod:5169 ../fish/guestfish-actions.pod:3471
12724 "This call is intended for programs that want to efficiently list a directory "
12725 "contents without making many round-trips. Very long directory listings "
12726 "might cause the protocol message size to be exceeded, causing this call to "
12727 "fail. The caller must split up such requests into smaller groups of names."
12731 #: ../src/guestfs-actions.pod:5182
12732 msgid "guestfs_realpath"
12736 #: ../src/guestfs-actions.pod:5184
12740 " guestfs_realpath (guestfs_h *g,\n"
12741 " const char *path);\n"
12746 #: ../src/guestfs-actions.pod:5188 ../fish/guestfish-actions.pod:3482
12748 "Return the canonicalized absolute pathname of C<path>. The returned path "
12749 "has no C<.>, C<..> or symbolic link path elements."
12753 #: ../src/guestfs-actions.pod:5196
12754 msgid "guestfs_removexattr"
12758 #: ../src/guestfs-actions.pod:5198
12762 " guestfs_removexattr (guestfs_h *g,\n"
12763 " const char *xattr,\n"
12764 " const char *path);\n"
12769 #: ../src/guestfs-actions.pod:5203 ../fish/guestfish-actions.pod:3489
12770 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
12774 #: ../src/guestfs-actions.pod:5206
12775 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
12779 #: ../src/guestfs-actions.pod:5212
12780 msgid "guestfs_resize2fs"
12784 #: ../src/guestfs-actions.pod:5214
12788 " guestfs_resize2fs (guestfs_h *g,\n"
12789 " const char *device);\n"
12794 #: ../src/guestfs-actions.pod:5218 ../fish/guestfish-actions.pod:3498
12796 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
12797 "underlying device."
12801 #: ../src/guestfs-actions.pod:5221
12803 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
12804 "C<device> before calling this command. For unknown reasons C<resize2fs> "
12805 "sometimes gives an error about this and sometimes not. In any case, it is "
12806 "always safe to call C<guestfs_e2fsck_f> before calling this function."
12810 #: ../src/guestfs-actions.pod:5231
12811 msgid "guestfs_resize2fs_size"
12815 #: ../src/guestfs-actions.pod:5233
12819 " guestfs_resize2fs_size (guestfs_h *g,\n"
12820 " const char *device,\n"
12821 " int64_t size);\n"
12826 #: ../src/guestfs-actions.pod:5238
12828 "This command is the same as C<guestfs_resize2fs> except that it allows you "
12829 "to specify the new size (in bytes) explicitly."
12833 #: ../src/guestfs-actions.pod:5245
12838 #: ../src/guestfs-actions.pod:5247
12842 " guestfs_rm (guestfs_h *g,\n"
12843 " const char *path);\n"
12848 #: ../src/guestfs-actions.pod:5251 ../fish/guestfish-actions.pod:3518
12849 msgid "Remove the single file C<path>."
12853 #: ../src/guestfs-actions.pod:5257
12854 msgid "guestfs_rm_rf"
12858 #: ../src/guestfs-actions.pod:5259
12862 " guestfs_rm_rf (guestfs_h *g,\n"
12863 " const char *path);\n"
12868 #: ../src/guestfs-actions.pod:5263 ../fish/guestfish-actions.pod:3524
12870 "Remove the file or directory C<path>, recursively removing the contents if "
12871 "its a directory. This is like the C<rm -rf> shell command."
12875 #: ../src/guestfs-actions.pod:5271
12876 msgid "guestfs_rmdir"
12880 #: ../src/guestfs-actions.pod:5273
12884 " guestfs_rmdir (guestfs_h *g,\n"
12885 " const char *path);\n"
12890 #: ../src/guestfs-actions.pod:5277 ../fish/guestfish-actions.pod:3532
12891 msgid "Remove the single directory C<path>."
12895 #: ../src/guestfs-actions.pod:5283
12896 msgid "guestfs_rmmountpoint"
12900 #: ../src/guestfs-actions.pod:5285
12904 " guestfs_rmmountpoint (guestfs_h *g,\n"
12905 " const char *exemptpath);\n"
12910 #: ../src/guestfs-actions.pod:5289
12912 "This calls removes a mountpoint that was previously created with "
12913 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
12917 #: ../src/guestfs-actions.pod:5297
12918 msgid "guestfs_scrub_device"
12922 #: ../src/guestfs-actions.pod:5299
12926 " guestfs_scrub_device (guestfs_h *g,\n"
12927 " const char *device);\n"
12932 #: ../src/guestfs-actions.pod:5303 ../fish/guestfish-actions.pod:3546
12934 "This command writes patterns over C<device> to make data retrieval more "
12939 #: ../src/guestfs-actions.pod:5306 ../src/guestfs-actions.pod:5327 ../src/guestfs-actions.pod:5346 ../fish/guestfish-actions.pod:3549 ../fish/guestfish-actions.pod:3564 ../fish/guestfish-actions.pod:3577
12941 "It is an interface to the L<scrub(1)> program. See that manual page for "
12946 #: ../src/guestfs-actions.pod:5314 ../src/guestfs-actions.pod:5332 ../src/guestfs-actions.pod:5351
12947 msgid "(Added in 1.0.52)"
12951 #: ../src/guestfs-actions.pod:5316
12952 msgid "guestfs_scrub_file"
12956 #: ../src/guestfs-actions.pod:5318
12960 " guestfs_scrub_file (guestfs_h *g,\n"
12961 " const char *file);\n"
12966 #: ../src/guestfs-actions.pod:5322 ../fish/guestfish-actions.pod:3559
12968 "This command writes patterns over a file to make data retrieval more "
12973 #: ../src/guestfs-actions.pod:5325 ../fish/guestfish-actions.pod:3562
12974 msgid "The file is I<removed> after scrubbing."
12978 #: ../src/guestfs-actions.pod:5334
12979 msgid "guestfs_scrub_freespace"
12983 #: ../src/guestfs-actions.pod:5336
12987 " guestfs_scrub_freespace (guestfs_h *g,\n"
12988 " const char *dir);\n"
12993 #: ../src/guestfs-actions.pod:5340
12995 "This command creates the directory C<dir> and then fills it with files until "
12996 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
12997 "and deletes them. The intention is to scrub any free space on the partition "
12998 "containing C<dir>."
13002 #: ../src/guestfs-actions.pod:5353
13003 msgid "guestfs_set_append"
13007 #: ../src/guestfs-actions.pod:5355
13011 " guestfs_set_append (guestfs_h *g,\n"
13012 " const char *append);\n"
13017 #: ../src/guestfs-actions.pod:5359 ../fish/guestfish-actions.pod:3586
13019 "This function is used to add additional options to the guest kernel command "
13024 #: ../src/guestfs-actions.pod:5362 ../fish/guestfish-actions.pod:3589
13026 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
13027 "environment variable."
13031 #: ../src/guestfs-actions.pod:5365 ../fish/guestfish-actions.pod:3592
13033 "Setting C<append> to C<NULL> means I<no> additional options are passed "
13034 "(libguestfs always adds a few of its own)."
13038 #: ../src/guestfs-actions.pod:5372
13039 msgid "guestfs_set_autosync"
13043 #: ../src/guestfs-actions.pod:5374
13047 " guestfs_set_autosync (guestfs_h *g,\n"
13048 " int autosync);\n"
13053 #: ../src/guestfs-actions.pod:5378
13055 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
13056 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
13057 "the handle is closed (also if the program exits without closing handles)."
13061 #: ../src/guestfs-actions.pod:5383 ../fish/guestfish-actions.pod:3606
13063 "This is enabled by default (since libguestfs 1.5.24, previously it was "
13064 "disabled by default)."
13068 #: ../src/guestfs-actions.pod:5390
13069 msgid "guestfs_set_direct"
13073 #: ../src/guestfs-actions.pod:5392
13077 " guestfs_set_direct (guestfs_h *g,\n"
13083 #: ../src/guestfs-actions.pod:5396 ../fish/guestfish-actions.pod:3615
13085 "If the direct appliance mode flag is enabled, then stdin and stdout are "
13086 "passed directly through to the appliance once it is launched."
13090 #: ../src/guestfs-actions.pod:5400
13092 "One consequence of this is that log messages aren't caught by the library "
13093 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
13098 #: ../src/guestfs-actions.pod:5404 ../fish/guestfish-actions.pod:3623
13099 msgid "You probably don't want to use this unless you know what you are doing."
13103 #: ../src/guestfs-actions.pod:5407 ../fish/guestfish-actions.pod:3626
13104 msgid "The default is disabled."
13108 #: ../src/guestfs-actions.pod:5413
13109 msgid "guestfs_set_e2label"
13113 #: ../src/guestfs-actions.pod:5415
13117 " guestfs_set_e2label (guestfs_h *g,\n"
13118 " const char *device,\n"
13119 " const char *label);\n"
13124 #: ../src/guestfs-actions.pod:5420 ../fish/guestfish-actions.pod:3632
13126 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
13127 "C<label>. Filesystem labels are limited to 16 characters."
13131 #: ../src/guestfs-actions.pod:5424
13133 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
13134 "the existing label on a filesystem."
13138 #: ../src/guestfs-actions.pod:5431
13139 msgid "guestfs_set_e2uuid"
13143 #: ../src/guestfs-actions.pod:5433
13147 " guestfs_set_e2uuid (guestfs_h *g,\n"
13148 " const char *device,\n"
13149 " const char *uuid);\n"
13154 #: ../src/guestfs-actions.pod:5438 ../fish/guestfish-actions.pod:3643
13156 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
13157 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
13158 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
13162 #: ../src/guestfs-actions.pod:5443
13164 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
13165 "the existing UUID of a filesystem."
13169 #: ../src/guestfs-actions.pod:5450
13170 msgid "guestfs_set_memsize"
13174 #: ../src/guestfs-actions.pod:5452
13178 " guestfs_set_memsize (guestfs_h *g,\n"
13184 #: ../src/guestfs-actions.pod:5456
13186 "This sets the memory size in megabytes allocated to the qemu subprocess. "
13187 "This only has any effect if called before C<guestfs_launch>."
13191 #: ../src/guestfs-actions.pod:5460 ../fish/guestfish-actions.pod:3661
13193 "You can also change this by setting the environment variable "
13194 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
13198 #: ../src/guestfs-actions.pod:5471
13199 msgid "guestfs_set_network"
13203 #: ../src/guestfs-actions.pod:5473
13207 " guestfs_set_network (guestfs_h *g,\n"
13213 #: ../src/guestfs-actions.pod:5477 ../fish/guestfish-actions.pod:3674
13215 "If C<network> is true, then the network is enabled in the libguestfs "
13216 "appliance. The default is false."
13220 #: ../src/guestfs-actions.pod:5480 ../fish/guestfish-actions.pod:3677
13222 "This affects whether commands are able to access the network (see "
13223 "L<guestfs(3)/RUNNING COMMANDS>)."
13227 #: ../src/guestfs-actions.pod:5483
13229 "You must call this before calling C<guestfs_launch>, otherwise it has no "
13234 #: ../src/guestfs-actions.pod:5490
13235 msgid "guestfs_set_path"
13239 #: ../src/guestfs-actions.pod:5492
13243 " guestfs_set_path (guestfs_h *g,\n"
13244 " const char *searchpath);\n"
13249 #: ../src/guestfs-actions.pod:5496 ../fish/guestfish-actions.pod:3689
13250 msgid "Set the path that libguestfs searches for kernel and initrd.img."
13254 #: ../src/guestfs-actions.pod:5498 ../fish/guestfish-actions.pod:3691
13256 "The default is C<$libdir/guestfs> unless overridden by setting "
13257 "C<LIBGUESTFS_PATH> environment variable."
13261 #: ../src/guestfs-actions.pod:5501 ../fish/guestfish-actions.pod:3694
13262 msgid "Setting C<path> to C<NULL> restores the default path."
13266 #: ../src/guestfs-actions.pod:5507
13267 msgid "guestfs_set_qemu"
13271 #: ../src/guestfs-actions.pod:5509
13275 " guestfs_set_qemu (guestfs_h *g,\n"
13276 " const char *qemu);\n"
13281 #: ../src/guestfs-actions.pod:5513 ../fish/guestfish-actions.pod:3702
13282 msgid "Set the qemu binary that we will use."
13286 #: ../src/guestfs-actions.pod:5515 ../fish/guestfish-actions.pod:3704
13287 msgid "The default is chosen when the library was compiled by the configure script."
13291 #: ../src/guestfs-actions.pod:5518 ../fish/guestfish-actions.pod:3707
13293 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
13298 #: ../src/guestfs-actions.pod:5521 ../fish/guestfish-actions.pod:3710
13299 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
13303 #: ../src/guestfs-actions.pod:5523 ../fish/guestfish-actions.pod:3712
13305 "Note that you should call this function as early as possible after creating "
13306 "the handle. This is because some pre-launch operations depend on testing "
13307 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
13308 "don't retest features, and so you might see inconsistent results. Using the "
13309 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
13310 "the qemu binary at the same time as the handle is created."
13314 #: ../src/guestfs-actions.pod:5535
13315 msgid "guestfs_set_recovery_proc"
13319 #: ../src/guestfs-actions.pod:5537
13323 " guestfs_set_recovery_proc (guestfs_h *g,\n"
13324 " int recoveryproc);\n"
13329 #: ../src/guestfs-actions.pod:5541
13331 "If this is called with the parameter C<false> then C<guestfs_launch> does "
13332 "not create a recovery process. The purpose of the recovery process is to "
13333 "stop runaway qemu processes in the case where the main program aborts "
13338 #: ../src/guestfs-actions.pod:5546
13340 "This only has any effect if called before C<guestfs_launch>, and the default "
13345 #: ../src/guestfs-actions.pod:5549 ../fish/guestfish-actions.pod:3734
13347 "About the only time when you would want to disable this is if the main "
13348 "process will fork itself into the background (\"daemonize\" itself). In "
13349 "this case the recovery process thinks that the main program has disappeared "
13350 "and so kills qemu, which is not very helpful."
13354 #: ../src/guestfs-actions.pod:5559
13355 msgid "guestfs_set_selinux"
13359 #: ../src/guestfs-actions.pod:5561
13363 " guestfs_set_selinux (guestfs_h *g,\n"
13369 #: ../src/guestfs-actions.pod:5565 ../fish/guestfish-actions.pod:3746
13371 "This sets the selinux flag that is passed to the appliance at boot time. "
13372 "The default is C<selinux=0> (disabled)."
13376 #: ../src/guestfs-actions.pod:5568 ../fish/guestfish-actions.pod:3749
13378 "Note that if SELinux is enabled, it is always in Permissive mode "
13379 "(C<enforcing=0>)."
13383 #: ../src/guestfs-actions.pod:5578
13384 msgid "guestfs_set_trace"
13388 #: ../src/guestfs-actions.pod:5580
13392 " guestfs_set_trace (guestfs_h *g,\n"
13398 #: ../src/guestfs-actions.pod:5584 ../fish/guestfish-actions.pod:3761
13400 "If the command trace flag is set to 1, then commands are printed on stderr "
13401 "before they are executed in a format which is very similar to the one used "
13402 "by guestfish. In other words, you can run a program with this enabled, and "
13403 "you will get out a script which you can feed to guestfish to perform the "
13404 "same set of actions."
13408 #: ../src/guestfs-actions.pod:5591 ../fish/guestfish-actions.pod:3768
13410 "If you want to trace C API calls into libguestfs (and other libraries) then "
13411 "possibly a better way is to use the external ltrace(1) command."
13415 #: ../src/guestfs-actions.pod:5595 ../fish/guestfish-actions.pod:3772
13417 "Command traces are disabled unless the environment variable "
13418 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
13422 #: ../src/guestfs-actions.pod:5602
13423 msgid "guestfs_set_verbose"
13427 #: ../src/guestfs-actions.pod:5604
13431 " guestfs_set_verbose (guestfs_h *g,\n"
13437 #: ../src/guestfs-actions.pod:5608 ../fish/guestfish-actions.pod:3781
13438 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
13442 #: ../src/guestfs-actions.pod:5610 ../fish/guestfish-actions.pod:3783
13444 "Verbose messages are disabled unless the environment variable "
13445 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
13449 #: ../src/guestfs-actions.pod:5617
13450 msgid "guestfs_setcon"
13454 #: ../src/guestfs-actions.pod:5619
13458 " guestfs_setcon (guestfs_h *g,\n"
13459 " const char *context);\n"
13464 #: ../src/guestfs-actions.pod:5623 ../fish/guestfish-actions.pod:3790
13466 "This sets the SELinux security context of the daemon to the string "
13471 #: ../src/guestfs-actions.pod:5626 ../fish/guestfish-actions.pod:3793
13472 msgid "See the documentation about SELINUX in L<guestfs(3)>."
13476 #: ../src/guestfs-actions.pod:5632
13477 msgid "guestfs_setxattr"
13481 #: ../src/guestfs-actions.pod:5634
13485 " guestfs_setxattr (guestfs_h *g,\n"
13486 " const char *xattr,\n"
13487 " const char *val,\n"
13489 " const char *path);\n"
13494 #: ../src/guestfs-actions.pod:5641 ../fish/guestfish-actions.pod:3799
13496 "This call sets the extended attribute named C<xattr> of the file C<path> to "
13497 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
13501 #: ../src/guestfs-actions.pod:5645
13502 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
13506 #: ../src/guestfs-actions.pod:5651
13507 msgid "guestfs_sfdisk"
13511 #: ../src/guestfs-actions.pod:5653
13515 " guestfs_sfdisk (guestfs_h *g,\n"
13516 " const char *device,\n"
13520 " char *const *lines);\n"
13525 #: ../src/guestfs-actions.pod:5661 ../fish/guestfish-actions.pod:3809
13527 "This is a direct interface to the L<sfdisk(8)> program for creating "
13528 "partitions on block devices."
13532 #: ../src/guestfs-actions.pod:5664 ../fish/guestfish-actions.pod:3812
13533 msgid "C<device> should be a block device, for example C</dev/sda>."
13537 #: ../src/guestfs-actions.pod:5666 ../fish/guestfish-actions.pod:3814
13539 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
13540 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
13541 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
13542 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
13543 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
13544 "the kernel) cannot work out the right geometry and you will need to tell it."
13548 #: ../src/guestfs-actions.pod:5674 ../fish/guestfish-actions.pod:3822
13550 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
13551 "refer to the L<sfdisk(8)> manpage."
13555 #: ../src/guestfs-actions.pod:5677 ../fish/guestfish-actions.pod:3825
13557 "To create a single partition occupying the whole disk, you would pass "
13558 "C<lines> as a single element list, when the single element being the string "
13563 #: ../src/guestfs-actions.pod:5681
13564 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
13568 #: ../src/guestfs-actions.pod:5691
13569 msgid "guestfs_sfdiskM"
13573 #: ../src/guestfs-actions.pod:5693
13577 " guestfs_sfdiskM (guestfs_h *g,\n"
13578 " const char *device,\n"
13579 " char *const *lines);\n"
13584 #: ../src/guestfs-actions.pod:5698
13586 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
13587 "partition sizes are specified in megabytes only (rounded to the nearest "
13588 "cylinder) and you don't need to specify the cyls, heads and sectors "
13589 "parameters which were rarely if ever used anyway."
13593 #: ../src/guestfs-actions.pod:5704
13595 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
13596 "C<guestfs_part_disk>"
13600 #: ../src/guestfs-actions.pod:5714
13601 msgid "guestfs_sfdisk_N"
13605 #: ../src/guestfs-actions.pod:5716
13609 " guestfs_sfdisk_N (guestfs_h *g,\n"
13610 " const char *device,\n"
13615 " const char *line);\n"
13620 #: ../src/guestfs-actions.pod:5725 ../fish/guestfish-actions.pod:3855
13622 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
13623 "(note: C<n> counts from 1)."
13627 #: ../src/guestfs-actions.pod:5728
13629 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
13630 "for the cyls/heads/sectors parameters."
13634 #: ../src/guestfs-actions.pod:5731
13635 msgid "See also: C<guestfs_part_add>"
13639 #: ../src/guestfs-actions.pod:5740
13640 msgid "guestfs_sfdisk_disk_geometry"
13644 #: ../src/guestfs-actions.pod:5742
13648 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
13649 " const char *device);\n"
13654 #: ../src/guestfs-actions.pod:5746
13656 "This displays the disk geometry of C<device> read from the partition table. "
13657 "Especially in the case where the underlying block device has been resized, "
13658 "this can be different from the kernel's idea of the geometry (see "
13659 "C<guestfs_sfdisk_kernel_geometry>)."
13663 #: ../src/guestfs-actions.pod:5751 ../src/guestfs-actions.pod:5767 ../fish/guestfish-actions.pod:3875 ../fish/guestfish-actions.pod:3884
13664 msgid "The result is in human-readable format, and not designed to be parsed."
13668 #: ../src/guestfs-actions.pod:5759
13669 msgid "guestfs_sfdisk_kernel_geometry"
13673 #: ../src/guestfs-actions.pod:5761
13677 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
13678 " const char *device);\n"
13683 #: ../src/guestfs-actions.pod:5765 ../fish/guestfish-actions.pod:3882
13684 msgid "This displays the kernel's idea of the geometry of C<device>."
13688 #: ../src/guestfs-actions.pod:5775
13689 msgid "guestfs_sfdisk_l"
13693 #: ../src/guestfs-actions.pod:5777
13697 " guestfs_sfdisk_l (guestfs_h *g,\n"
13698 " const char *device);\n"
13703 #: ../src/guestfs-actions.pod:5781 ../fish/guestfish-actions.pod:3891
13705 "This displays the partition table on C<device>, in the human-readable output "
13706 "of the L<sfdisk(8)> command. It is not intended to be parsed."
13710 #: ../src/guestfs-actions.pod:5785
13711 msgid "See also: C<guestfs_part_list>"
13715 #: ../src/guestfs-actions.pod:5792
13720 #: ../src/guestfs-actions.pod:5794
13724 " guestfs_sh (guestfs_h *g,\n"
13725 " const char *command);\n"
13730 #: ../src/guestfs-actions.pod:5798 ../fish/guestfish-actions.pod:3901
13732 "This call runs a command from the guest filesystem via the guest's "
13737 #: ../src/guestfs-actions.pod:5801
13738 msgid "This is like C<guestfs_command>, but passes the command to:"
13742 #: ../src/guestfs-actions.pod:5803 ../fish/guestfish-actions.pod:3906
13745 " /bin/sh -c \"command\"\n"
13750 #: ../src/guestfs-actions.pod:5805 ../fish/guestfish-actions.pod:3908
13752 "Depending on the guest's shell, this usually results in wildcards being "
13753 "expanded, shell expressions being interpolated and so on."
13757 #: ../src/guestfs-actions.pod:5809
13758 msgid "All the provisos about C<guestfs_command> apply to this call."
13762 #: ../src/guestfs-actions.pod:5816
13763 msgid "guestfs_sh_lines"
13767 #: ../src/guestfs-actions.pod:5818
13771 " guestfs_sh_lines (guestfs_h *g,\n"
13772 " const char *command);\n"
13777 #: ../src/guestfs-actions.pod:5822
13779 "This is the same as C<guestfs_sh>, but splits the result into a list of "
13784 #: ../src/guestfs-actions.pod:5825
13785 msgid "See also: C<guestfs_command_lines>"
13789 #: ../src/guestfs-actions.pod:5833
13790 msgid "guestfs_sleep"
13794 #: ../src/guestfs-actions.pod:5835
13798 " guestfs_sleep (guestfs_h *g,\n"
13804 #: ../src/guestfs-actions.pod:5839 ../fish/guestfish-actions.pod:3927
13805 msgid "Sleep for C<secs> seconds."
13809 #: ../src/guestfs-actions.pod:5843
13810 msgid "(Added in 1.0.41)"
13814 #: ../src/guestfs-actions.pod:5845 ../src/guestfs-structs.pod:109
13815 msgid "guestfs_stat"
13819 #: ../src/guestfs-actions.pod:5847
13822 " struct guestfs_stat *\n"
13823 " guestfs_stat (guestfs_h *g,\n"
13824 " const char *path);\n"
13829 #: ../src/guestfs-actions.pod:5853 ../fish/guestfish-actions.pod:3935
13830 msgid "This is the same as the C<stat(2)> system call."
13834 #: ../src/guestfs-actions.pod:5861 ../src/guestfs-structs.pod:135
13835 msgid "guestfs_statvfs"
13839 #: ../src/guestfs-actions.pod:5863
13842 " struct guestfs_statvfs *\n"
13843 " guestfs_statvfs (guestfs_h *g,\n"
13844 " const char *path);\n"
13849 #: ../src/guestfs-actions.pod:5867 ../fish/guestfish-actions.pod:3941
13851 "Returns file system statistics for any mounted file system. C<path> should "
13852 "be a file or directory in the mounted file system (typically it is the mount "
13853 "point itself, but it doesn't need to be)."
13857 #: ../src/guestfs-actions.pod:5871 ../fish/guestfish-actions.pod:3945
13858 msgid "This is the same as the C<statvfs(2)> system call."
13862 #: ../src/guestfs-actions.pod:5873
13864 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
13865 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
13869 #: ../src/guestfs-actions.pod:5879
13870 msgid "guestfs_strings"
13874 #: ../src/guestfs-actions.pod:5881
13878 " guestfs_strings (guestfs_h *g,\n"
13879 " const char *path);\n"
13884 #: ../src/guestfs-actions.pod:5885 ../fish/guestfish-actions.pod:3951
13886 "This runs the L<strings(1)> command on a file and returns the list of "
13887 "printable strings found."
13891 #: ../src/guestfs-actions.pod:5897
13892 msgid "guestfs_strings_e"
13896 #: ../src/guestfs-actions.pod:5899
13900 " guestfs_strings_e (guestfs_h *g,\n"
13901 " const char *encoding,\n"
13902 " const char *path);\n"
13907 #: ../src/guestfs-actions.pod:5904
13909 "This is like the C<guestfs_strings> command, but allows you to specify the "
13910 "encoding of strings that are looked for in the source file C<path>."
13914 #: ../src/guestfs-actions.pod:5908 ../fish/guestfish-actions.pod:3965
13915 msgid "Allowed encodings are:"
13919 #: ../src/guestfs-actions.pod:5912 ../fish/guestfish-actions.pod:3969
13924 #: ../src/guestfs-actions.pod:5914
13926 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
13927 "ISO-8859-X (this is what C<guestfs_strings> uses)."
13931 #: ../src/guestfs-actions.pod:5917 ../fish/guestfish-actions.pod:3974
13936 #: ../src/guestfs-actions.pod:5919 ../fish/guestfish-actions.pod:3976
13937 msgid "Single 8-bit-byte characters."
13941 #: ../src/guestfs-actions.pod:5921 ../fish/guestfish-actions.pod:3978
13946 #: ../src/guestfs-actions.pod:5923 ../fish/guestfish-actions.pod:3980
13947 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
13951 #: ../src/guestfs-actions.pod:5926 ../fish/guestfish-actions.pod:3983
13952 msgid "l (lower case letter L)"
13956 #: ../src/guestfs-actions.pod:5928 ../fish/guestfish-actions.pod:3985
13958 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
13959 "examining binaries in Windows guests."
13963 #: ../src/guestfs-actions.pod:5931 ../fish/guestfish-actions.pod:3988
13968 #: ../src/guestfs-actions.pod:5933 ../fish/guestfish-actions.pod:3990
13969 msgid "32-bit big endian such as UCS-4BE."
13973 #: ../src/guestfs-actions.pod:5935 ../fish/guestfish-actions.pod:3992
13978 #: ../src/guestfs-actions.pod:5937 ../fish/guestfish-actions.pod:3994
13979 msgid "32-bit little endian such as UCS-4LE."
13983 #: ../src/guestfs-actions.pod:5941 ../fish/guestfish-actions.pod:3998
13984 msgid "The returned strings are transcoded to UTF-8."
13988 #: ../src/guestfs-actions.pod:5952
13989 msgid "guestfs_swapoff_device"
13993 #: ../src/guestfs-actions.pod:5954
13997 " guestfs_swapoff_device (guestfs_h *g,\n"
13998 " const char *device);\n"
14003 #: ../src/guestfs-actions.pod:5958
14005 "This command disables the libguestfs appliance swap device or partition "
14006 "named C<device>. See C<guestfs_swapon_device>."
14010 #: ../src/guestfs-actions.pod:5966
14011 msgid "guestfs_swapoff_file"
14015 #: ../src/guestfs-actions.pod:5968
14019 " guestfs_swapoff_file (guestfs_h *g,\n"
14020 " const char *file);\n"
14025 #: ../src/guestfs-actions.pod:5972 ../fish/guestfish-actions.pod:4015
14026 msgid "This command disables the libguestfs appliance swap on file."
14030 #: ../src/guestfs-actions.pod:5978
14031 msgid "guestfs_swapoff_label"
14035 #: ../src/guestfs-actions.pod:5980
14039 " guestfs_swapoff_label (guestfs_h *g,\n"
14040 " const char *label);\n"
14045 #: ../src/guestfs-actions.pod:5984 ../fish/guestfish-actions.pod:4021
14047 "This command disables the libguestfs appliance swap on labeled swap "
14052 #: ../src/guestfs-actions.pod:5991
14053 msgid "guestfs_swapoff_uuid"
14057 #: ../src/guestfs-actions.pod:5993
14061 " guestfs_swapoff_uuid (guestfs_h *g,\n"
14062 " const char *uuid);\n"
14067 #: ../src/guestfs-actions.pod:5997 ../fish/guestfish-actions.pod:4028
14069 "This command disables the libguestfs appliance swap partition with the given "
14074 #: ../src/guestfs-actions.pod:6004
14075 msgid "guestfs_swapon_device"
14079 #: ../src/guestfs-actions.pod:6006
14083 " guestfs_swapon_device (guestfs_h *g,\n"
14084 " const char *device);\n"
14089 #: ../src/guestfs-actions.pod:6010
14091 "This command enables the libguestfs appliance to use the swap device or "
14092 "partition named C<device>. The increased memory is made available for all "
14093 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
14097 #: ../src/guestfs-actions.pod:6015 ../fish/guestfish-actions.pod:4040
14099 "Note that you should not swap to existing guest swap partitions unless you "
14100 "know what you are doing. They may contain hibernation information, or other "
14101 "information that the guest doesn't want you to trash. You also risk leaking "
14102 "information about the host to the guest this way. Instead, attach a new "
14103 "host device to the guest and swap on that."
14107 #: ../src/guestfs-actions.pod:6026
14108 msgid "guestfs_swapon_file"
14112 #: ../src/guestfs-actions.pod:6028
14116 " guestfs_swapon_file (guestfs_h *g,\n"
14117 " const char *file);\n"
14122 #: ../src/guestfs-actions.pod:6032
14124 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
14129 #: ../src/guestfs-actions.pod:6039
14130 msgid "guestfs_swapon_label"
14134 #: ../src/guestfs-actions.pod:6041
14138 " guestfs_swapon_label (guestfs_h *g,\n"
14139 " const char *label);\n"
14144 #: ../src/guestfs-actions.pod:6045
14146 "This command enables swap to a labeled swap partition. See "
14147 "C<guestfs_swapon_device> for other notes."
14151 #: ../src/guestfs-actions.pod:6052
14152 msgid "guestfs_swapon_uuid"
14156 #: ../src/guestfs-actions.pod:6054
14160 " guestfs_swapon_uuid (guestfs_h *g,\n"
14161 " const char *uuid);\n"
14166 #: ../src/guestfs-actions.pod:6058
14168 "This command enables swap to a swap partition with the given UUID. See "
14169 "C<guestfs_swapon_device> for other notes."
14173 #: ../src/guestfs-actions.pod:6065
14174 msgid "guestfs_sync"
14178 #: ../src/guestfs-actions.pod:6067
14182 " guestfs_sync (guestfs_h *g);\n"
14187 #: ../src/guestfs-actions.pod:6070 ../fish/guestfish-actions.pod:4072
14189 "This syncs the disk, so that any writes are flushed through to the "
14190 "underlying disk image."
14194 #: ../src/guestfs-actions.pod:6073 ../fish/guestfish-actions.pod:4075
14196 "You should always call this if you have modified a disk image, before "
14197 "closing the handle."
14201 #: ../src/guestfs-actions.pod:6080
14202 msgid "guestfs_tail"
14206 #: ../src/guestfs-actions.pod:6082
14210 " guestfs_tail (guestfs_h *g,\n"
14211 " const char *path);\n"
14216 #: ../src/guestfs-actions.pod:6086 ../fish/guestfish-actions.pod:4082
14217 msgid "This command returns up to the last 10 lines of a file as a list of strings."
14221 #: ../src/guestfs-actions.pod:6098
14222 msgid "guestfs_tail_n"
14226 #: ../src/guestfs-actions.pod:6100
14230 " guestfs_tail_n (guestfs_h *g,\n"
14232 " const char *path);\n"
14237 #: ../src/guestfs-actions.pod:6105 ../fish/guestfish-actions.pod:4092
14239 "If the parameter C<nrlines> is a positive number, this returns the last "
14240 "C<nrlines> lines of the file C<path>."
14244 #: ../src/guestfs-actions.pod:6108 ../fish/guestfish-actions.pod:4095
14246 "If the parameter C<nrlines> is a negative number, this returns lines from "
14247 "the file C<path>, starting with the C<-nrlines>th line."
14251 #: ../src/guestfs-actions.pod:6122
14252 msgid "guestfs_tar_in"
14256 #: ../src/guestfs-actions.pod:6124
14260 " guestfs_tar_in (guestfs_h *g,\n"
14261 " const char *tarfile,\n"
14262 " const char *directory);\n"
14267 #: ../src/guestfs-actions.pod:6129 ../fish/guestfish-actions.pod:4107
14269 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
14270 "tar file) into C<directory>."
14274 #: ../src/guestfs-actions.pod:6132
14275 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
14279 #: ../src/guestfs-actions.pod:6137 ../src/guestfs-actions.pod:6154 ../src/guestfs-actions.pod:6170 ../src/guestfs-actions.pod:6186
14280 msgid "(Added in 1.0.3)"
14284 #: ../src/guestfs-actions.pod:6139
14285 msgid "guestfs_tar_out"
14289 #: ../src/guestfs-actions.pod:6141
14293 " guestfs_tar_out (guestfs_h *g,\n"
14294 " const char *directory,\n"
14295 " const char *tarfile);\n"
14300 #: ../src/guestfs-actions.pod:6146 ../fish/guestfish-actions.pod:4119
14302 "This command packs the contents of C<directory> and downloads it to local "
14307 #: ../src/guestfs-actions.pod:6149
14309 "To download a compressed tarball, use C<guestfs_tgz_out> or "
14310 "C<guestfs_txz_out>."
14314 #: ../src/guestfs-actions.pod:6156
14315 msgid "guestfs_tgz_in"
14319 #: ../src/guestfs-actions.pod:6158
14323 " guestfs_tgz_in (guestfs_h *g,\n"
14324 " const char *tarball,\n"
14325 " const char *directory);\n"
14330 #: ../src/guestfs-actions.pod:6163 ../fish/guestfish-actions.pod:4131
14332 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
14333 "tar file) into C<directory>."
14337 #: ../src/guestfs-actions.pod:6166
14338 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
14342 #: ../src/guestfs-actions.pod:6172
14343 msgid "guestfs_tgz_out"
14347 #: ../src/guestfs-actions.pod:6174
14351 " guestfs_tgz_out (guestfs_h *g,\n"
14352 " const char *directory,\n"
14353 " const char *tarball);\n"
14358 #: ../src/guestfs-actions.pod:6179 ../fish/guestfish-actions.pod:4142
14360 "This command packs the contents of C<directory> and downloads it to local "
14365 #: ../src/guestfs-actions.pod:6182
14366 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
14370 #: ../src/guestfs-actions.pod:6188
14371 msgid "guestfs_touch"
14375 #: ../src/guestfs-actions.pod:6190
14379 " guestfs_touch (guestfs_h *g,\n"
14380 " const char *path);\n"
14385 #: ../src/guestfs-actions.pod:6194 ../fish/guestfish-actions.pod:4153
14387 "Touch acts like the L<touch(1)> command. It can be used to update the "
14388 "timestamps on a file, or, if the file does not exist, to create a new "
14389 "zero-length file."
14393 #: ../src/guestfs-actions.pod:6198 ../fish/guestfish-actions.pod:4157
14395 "This command only works on regular files, and will fail on other file types "
14396 "such as directories, symbolic links, block special etc."
14400 #: ../src/guestfs-actions.pod:6205
14401 msgid "guestfs_truncate"
14405 #: ../src/guestfs-actions.pod:6207
14409 " guestfs_truncate (guestfs_h *g,\n"
14410 " const char *path);\n"
14415 #: ../src/guestfs-actions.pod:6211 ../fish/guestfish-actions.pod:4164
14417 "This command truncates C<path> to a zero-length file. The file must exist "
14422 #: ../src/guestfs-actions.pod:6218
14423 msgid "guestfs_truncate_size"
14427 #: ../src/guestfs-actions.pod:6220
14431 " guestfs_truncate_size (guestfs_h *g,\n"
14432 " const char *path,\n"
14433 " int64_t size);\n"
14438 #: ../src/guestfs-actions.pod:6225 ../fish/guestfish-actions.pod:4171
14440 "This command truncates C<path> to size C<size> bytes. The file must exist "
14445 #: ../src/guestfs-actions.pod:6228
14447 "If the current file size is less than C<size> then the file is extended to "
14448 "the required size with zero bytes. This creates a sparse file (ie. disk "
14449 "blocks are not allocated for the file until you write to it). To create a "
14450 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
14454 #: ../src/guestfs-actions.pod:6238
14455 msgid "guestfs_tune2fs_l"
14459 #: ../src/guestfs-actions.pod:6240
14463 " guestfs_tune2fs_l (guestfs_h *g,\n"
14464 " const char *device);\n"
14469 #: ../src/guestfs-actions.pod:6244 ../fish/guestfish-actions.pod:4184
14471 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
14476 #: ../src/guestfs-actions.pod:6247 ../fish/guestfish-actions.pod:4187
14478 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
14479 "for more details. The list of fields returned isn't clearly defined, and "
14480 "depends on both the version of C<tune2fs> that libguestfs was built against, "
14481 "and the filesystem itself."
14485 #: ../src/guestfs-actions.pod:6260
14486 msgid "guestfs_txz_in"
14490 #: ../src/guestfs-actions.pod:6262
14494 " guestfs_txz_in (guestfs_h *g,\n"
14495 " const char *tarball,\n"
14496 " const char *directory);\n"
14501 #: ../src/guestfs-actions.pod:6267 ../fish/guestfish-actions.pod:4196
14503 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
14504 "tar file) into C<directory>."
14508 #: ../src/guestfs-actions.pod:6274
14509 msgid "guestfs_txz_out"
14513 #: ../src/guestfs-actions.pod:6276
14517 " guestfs_txz_out (guestfs_h *g,\n"
14518 " const char *directory,\n"
14519 " const char *tarball);\n"
14524 #: ../src/guestfs-actions.pod:6281 ../fish/guestfish-actions.pod:4205
14526 "This command packs the contents of C<directory> and downloads it to local "
14527 "file C<tarball> (as an xz compressed tar archive)."
14531 #: ../src/guestfs-actions.pod:6288
14532 msgid "guestfs_umask"
14536 #: ../src/guestfs-actions.pod:6290
14540 " guestfs_umask (guestfs_h *g,\n"
14546 #: ../src/guestfs-actions.pod:6294 ../fish/guestfish-actions.pod:4214
14548 "This function sets the mask used for creating new files and device nodes to "
14553 #: ../src/guestfs-actions.pod:6297 ../fish/guestfish-actions.pod:4217
14555 "Typical umask values would be C<022> which creates new files with "
14556 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
14557 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
14561 #: ../src/guestfs-actions.pod:6302 ../fish/guestfish-actions.pod:4222
14563 "The default umask is C<022>. This is important because it means that "
14564 "directories and device nodes will be created with C<0644> or C<0755> mode "
14565 "even if you specify C<0777>."
14569 #: ../src/guestfs-actions.pod:6306
14571 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
14572 "C<guestfs_mkdir>."
14576 #: ../src/guestfs-actions.pod:6309 ../fish/guestfish-actions.pod:4229
14577 msgid "This call returns the previous umask."
14581 #: ../src/guestfs-actions.pod:6315
14582 msgid "guestfs_umount"
14586 #: ../src/guestfs-actions.pod:6317
14590 " guestfs_umount (guestfs_h *g,\n"
14591 " const char *pathordevice);\n"
14596 #: ../src/guestfs-actions.pod:6321 ../fish/guestfish-actions.pod:4237
14598 "This unmounts the given filesystem. The filesystem may be specified either "
14599 "by its mountpoint (path) or the device which contains the filesystem."
14603 #: ../src/guestfs-actions.pod:6329
14604 msgid "guestfs_umount_all"
14608 #: ../src/guestfs-actions.pod:6331
14612 " guestfs_umount_all (guestfs_h *g);\n"
14617 #: ../src/guestfs-actions.pod:6334 ../fish/guestfish-actions.pod:4247
14618 msgid "This unmounts all mounted filesystems."
14622 #: ../src/guestfs-actions.pod:6336 ../fish/guestfish-actions.pod:4249
14623 msgid "Some internal mounts are not unmounted by this call."
14627 #: ../src/guestfs-actions.pod:6342
14628 msgid "guestfs_upload"
14632 #: ../src/guestfs-actions.pod:6344
14636 " guestfs_upload (guestfs_h *g,\n"
14637 " const char *filename,\n"
14638 " const char *remotefilename);\n"
14643 #: ../src/guestfs-actions.pod:6349 ../src/guestfs-actions.pod:6368 ../fish/guestfish-actions.pod:4255 ../fish/guestfish-actions.pod:4268
14644 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
14648 #: ../src/guestfs-actions.pod:6354
14649 msgid "See also C<guestfs_download>."
14653 #: ../src/guestfs-actions.pod:6360
14654 msgid "guestfs_upload_offset"
14658 #: ../src/guestfs-actions.pod:6362
14662 " guestfs_upload_offset (guestfs_h *g,\n"
14663 " const char *filename,\n"
14664 " const char *remotefilename,\n"
14665 " int64_t offset);\n"
14670 #: ../src/guestfs-actions.pod:6371 ../fish/guestfish-actions.pod:4271
14672 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
14673 "The intention is to overwrite parts of existing files or devices, although "
14674 "if a non-existant file is specified then it is created with a \"hole\" "
14675 "before C<offset>. The size of the data written is implicit in the size of "
14676 "the source C<filename>."
14680 #: ../src/guestfs-actions.pod:6378
14682 "Note that there is no limit on the amount of data that can be uploaded with "
14683 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
14684 "full amount unless an error occurs."
14688 #: ../src/guestfs-actions.pod:6383
14689 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
14693 #: ../src/guestfs-actions.pod:6389
14694 msgid "guestfs_utimens"
14698 #: ../src/guestfs-actions.pod:6391
14702 " guestfs_utimens (guestfs_h *g,\n"
14703 " const char *path,\n"
14704 " int64_t atsecs,\n"
14705 " int64_t atnsecs,\n"
14706 " int64_t mtsecs,\n"
14707 " int64_t mtnsecs);\n"
14712 #: ../src/guestfs-actions.pod:6399 ../fish/guestfish-actions.pod:4291
14713 msgid "This command sets the timestamps of a file with nanosecond precision."
14717 #: ../src/guestfs-actions.pod:6402 ../fish/guestfish-actions.pod:4294
14719 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
14724 #: ../src/guestfs-actions.pod:6405 ../fish/guestfish-actions.pod:4297
14726 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
14727 "nanoseconds from the epoch."
14731 #: ../src/guestfs-actions.pod:6408 ../fish/guestfish-actions.pod:4300
14733 "If the C<*nsecs> field contains the special value C<-1> then the "
14734 "corresponding timestamp is set to the current time. (The C<*secs> field is "
14735 "ignored in this case)."
14739 #: ../src/guestfs-actions.pod:6412 ../fish/guestfish-actions.pod:4304
14741 "If the C<*nsecs> field contains the special value C<-2> then the "
14742 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
14747 #: ../src/guestfs-actions.pod:6420 ../src/guestfs-structs.pod:175
14748 msgid "guestfs_version"
14752 #: ../src/guestfs-actions.pod:6422
14755 " struct guestfs_version *\n"
14756 " guestfs_version (guestfs_h *g);\n"
14761 #: ../src/guestfs-actions.pod:6425 ../fish/guestfish-actions.pod:4312
14762 msgid "Return the libguestfs version number that the program is linked against."
14766 #: ../src/guestfs-actions.pod:6428 ../fish/guestfish-actions.pod:4315
14768 "Note that because of dynamic linking this is not necessarily the version of "
14769 "libguestfs that you compiled against. You can compile the program, and then "
14770 "at runtime dynamically link against a completely different C<libguestfs.so> "
14775 #: ../src/guestfs-actions.pod:6433 ../fish/guestfish-actions.pod:4320
14777 "This call was added in version C<1.0.58>. In previous versions of "
14778 "libguestfs there was no way to get the version number. From C code you can "
14779 "use dynamic linker functions to find out if this symbol exists (if it "
14780 "doesn't, then it's an earlier version)."
14784 #: ../src/guestfs-actions.pod:6439 ../fish/guestfish-actions.pod:4326
14786 "The call returns a structure with four elements. The first three (C<major>, "
14787 "C<minor> and C<release>) are numbers and correspond to the usual version "
14788 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
14789 "but may be used for distro-specific information."
14793 #: ../src/guestfs-actions.pod:6445 ../fish/guestfish-actions.pod:4332
14794 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
14798 #: ../src/guestfs-actions.pod:6448 ../fish/guestfish-actions.pod:4335
14799 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
14803 #: ../src/guestfs-actions.pod:6450
14805 "I<Note:> Don't use this call to test for availability of features. In "
14806 "enterprise distributions we backport features from later versions into "
14807 "earlier versions, making this an unreliable way to test for features. Use "
14808 "C<guestfs_available> instead."
14812 #: ../src/guestfs-actions.pod:6456
14814 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
14815 "error. I<The caller must call C<guestfs_free_version> after use>."
14819 #: ../src/guestfs-actions.pod:6460
14820 msgid "(Added in 1.0.58)"
14824 #: ../src/guestfs-actions.pod:6462
14825 msgid "guestfs_vfs_label"
14829 #: ../src/guestfs-actions.pod:6464
14833 " guestfs_vfs_label (guestfs_h *g,\n"
14834 " const char *device);\n"
14839 #: ../src/guestfs-actions.pod:6468 ../fish/guestfish-actions.pod:4347
14840 msgid "This returns the filesystem label of the filesystem on C<device>."
14844 #: ../src/guestfs-actions.pod:6471 ../fish/guestfish-actions.pod:4350
14845 msgid "If the filesystem is unlabeled, this returns the empty string."
14849 #: ../src/guestfs-actions.pod:6473
14850 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
14854 #: ../src/guestfs-actions.pod:6478 ../src/guestfs-actions.pod:6515
14855 msgid "(Added in 1.3.18)"
14859 #: ../src/guestfs-actions.pod:6480
14860 msgid "guestfs_vfs_type"
14864 #: ../src/guestfs-actions.pod:6482
14868 " guestfs_vfs_type (guestfs_h *g,\n"
14869 " const char *device);\n"
14874 #: ../src/guestfs-actions.pod:6486 ../fish/guestfish-actions.pod:4358
14876 "This command gets the filesystem type corresponding to the filesystem on "
14881 #: ../src/guestfs-actions.pod:6489 ../fish/guestfish-actions.pod:4361
14883 "For most filesystems, the result is the name of the Linux VFS module which "
14884 "would be used to mount this filesystem if you mounted it without specifying "
14885 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
14889 #: ../src/guestfs-actions.pod:6499
14890 msgid "guestfs_vfs_uuid"
14894 #: ../src/guestfs-actions.pod:6501
14898 " guestfs_vfs_uuid (guestfs_h *g,\n"
14899 " const char *device);\n"
14904 #: ../src/guestfs-actions.pod:6505 ../fish/guestfish-actions.pod:4370
14905 msgid "This returns the filesystem UUID of the filesystem on C<device>."
14909 #: ../src/guestfs-actions.pod:6508 ../fish/guestfish-actions.pod:4373
14910 msgid "If the filesystem does not have a UUID, this returns the empty string."
14914 #: ../src/guestfs-actions.pod:6510
14915 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
14919 #: ../src/guestfs-actions.pod:6517
14920 msgid "guestfs_vg_activate"
14924 #: ../src/guestfs-actions.pod:6519
14928 " guestfs_vg_activate (guestfs_h *g,\n"
14930 " char *const *volgroups);\n"
14935 #: ../src/guestfs-actions.pod:6524 ../fish/guestfish-actions.pod:4381
14937 "This command activates or (if C<activate> is false) deactivates all logical "
14938 "volumes in the listed volume groups C<volgroups>. If activated, then they "
14939 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
14940 "deactivated, then those devices disappear."
14944 #: ../src/guestfs-actions.pod:6530 ../fish/guestfish-actions.pod:4387
14945 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
14949 #: ../src/guestfs-actions.pod:6532 ../fish/guestfish-actions.pod:4389
14951 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
14952 "activated or deactivated."
14956 #: ../src/guestfs-actions.pod:6539
14957 msgid "guestfs_vg_activate_all"
14961 #: ../src/guestfs-actions.pod:6541
14965 " guestfs_vg_activate_all (guestfs_h *g,\n"
14966 " int activate);\n"
14971 #: ../src/guestfs-actions.pod:6545 ../fish/guestfish-actions.pod:4396
14973 "This command activates or (if C<activate> is false) deactivates all logical "
14974 "volumes in all volume groups. If activated, then they are made known to the "
14975 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
14976 "those devices disappear."
14980 #: ../src/guestfs-actions.pod:6551 ../fish/guestfish-actions.pod:4402
14981 msgid "This command is the same as running C<vgchange -a y|n>"
14985 #: ../src/guestfs-actions.pod:6557
14986 msgid "guestfs_vgcreate"
14990 #: ../src/guestfs-actions.pod:6559
14994 " guestfs_vgcreate (guestfs_h *g,\n"
14995 " const char *volgroup,\n"
14996 " char *const *physvols);\n"
15001 #: ../src/guestfs-actions.pod:6564 ../fish/guestfish-actions.pod:4408
15003 "This creates an LVM volume group called C<volgroup> from the non-empty list "
15004 "of physical volumes C<physvols>."
15008 #: ../src/guestfs-actions.pod:6571
15009 msgid "guestfs_vglvuuids"
15013 #: ../src/guestfs-actions.pod:6573
15017 " guestfs_vglvuuids (guestfs_h *g,\n"
15018 " const char *vgname);\n"
15023 #: ../src/guestfs-actions.pod:6577 ../fish/guestfish-actions.pod:4415
15025 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
15026 "volumes created in this volume group."
15030 #: ../src/guestfs-actions.pod:6580
15032 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
15033 "associate logical volumes and volume groups."
15037 #: ../src/guestfs-actions.pod:6583
15038 msgid "See also C<guestfs_vgpvuuids>."
15042 #: ../src/guestfs-actions.pod:6591
15043 msgid "guestfs_vgpvuuids"
15047 #: ../src/guestfs-actions.pod:6593
15051 " guestfs_vgpvuuids (guestfs_h *g,\n"
15052 " const char *vgname);\n"
15057 #: ../src/guestfs-actions.pod:6597 ../fish/guestfish-actions.pod:4427
15059 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
15060 "volumes that this volume group resides on."
15064 #: ../src/guestfs-actions.pod:6600
15066 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
15067 "associate physical volumes and volume groups."
15071 #: ../src/guestfs-actions.pod:6603
15072 msgid "See also C<guestfs_vglvuuids>."
15076 #: ../src/guestfs-actions.pod:6611
15077 msgid "guestfs_vgremove"
15081 #: ../src/guestfs-actions.pod:6613
15085 " guestfs_vgremove (guestfs_h *g,\n"
15086 " const char *vgname);\n"
15091 #: ../src/guestfs-actions.pod:6617 ../fish/guestfish-actions.pod:4439
15092 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
15096 #: ../src/guestfs-actions.pod:6619 ../fish/guestfish-actions.pod:4441
15097 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
15101 #: ../src/guestfs-actions.pod:6626
15102 msgid "guestfs_vgrename"
15106 #: ../src/guestfs-actions.pod:6628
15110 " guestfs_vgrename (guestfs_h *g,\n"
15111 " const char *volgroup,\n"
15112 " const char *newvolgroup);\n"
15117 #: ../src/guestfs-actions.pod:6633 ../fish/guestfish-actions.pod:4448
15118 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
15122 #: ../src/guestfs-actions.pod:6639
15123 msgid "guestfs_vgs"
15127 #: ../src/guestfs-actions.pod:6641
15131 " guestfs_vgs (guestfs_h *g);\n"
15136 #: ../src/guestfs-actions.pod:6644 ../fish/guestfish-actions.pod:4454
15138 "List all the volumes groups detected. This is the equivalent of the "
15139 "L<vgs(8)> command."
15143 #: ../src/guestfs-actions.pod:6647 ../fish/guestfish-actions.pod:4457
15145 "This returns a list of just the volume group names that were detected "
15146 "(eg. C<VolGroup00>)."
15150 #: ../src/guestfs-actions.pod:6650
15151 msgid "See also C<guestfs_vgs_full>."
15155 #: ../src/guestfs-actions.pod:6658
15156 msgid "guestfs_vgs_full"
15160 #: ../src/guestfs-actions.pod:6660
15163 " struct guestfs_lvm_vg_list *\n"
15164 " guestfs_vgs_full (guestfs_h *g);\n"
15169 #: ../src/guestfs-actions.pod:6663 ../fish/guestfish-actions.pod:4466
15171 "List all the volumes groups detected. This is the equivalent of the "
15172 "L<vgs(8)> command. The \"full\" version includes all fields."
15176 #: ../src/guestfs-actions.pod:6666
15178 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
15179 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after "
15184 #: ../src/guestfs-actions.pod:6672
15185 msgid "guestfs_vgscan"
15189 #: ../src/guestfs-actions.pod:6674
15193 " guestfs_vgscan (guestfs_h *g);\n"
15198 #: ../src/guestfs-actions.pod:6677 ../fish/guestfish-actions.pod:4473
15200 "This rescans all block devices and rebuilds the list of LVM physical "
15201 "volumes, volume groups and logical volumes."
15205 #: ../src/guestfs-actions.pod:6684
15206 msgid "guestfs_vguuid"
15210 #: ../src/guestfs-actions.pod:6686
15214 " guestfs_vguuid (guestfs_h *g,\n"
15215 " const char *vgname);\n"
15220 #: ../src/guestfs-actions.pod:6690 ../fish/guestfish-actions.pod:4480
15221 msgid "This command returns the UUID of the LVM VG named C<vgname>."
15225 #: ../src/guestfs-actions.pod:6697
15226 msgid "guestfs_wait_ready"
15230 #: ../src/guestfs-actions.pod:6699
15234 " guestfs_wait_ready (guestfs_h *g);\n"
15239 #: ../src/guestfs-actions.pod:6702
15240 msgid "This function is a no op."
15244 #: ../src/guestfs-actions.pod:6704
15246 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
15247 "calling C<guestfs_launch> to wait for the launch to complete. However this "
15248 "is no longer necessary because C<guestfs_launch> now does the waiting."
15252 #: ../src/guestfs-actions.pod:6709
15254 "If you see any calls to this function in code then you can just remove them, "
15255 "unless you want to retain compatibility with older versions of the API."
15259 #: ../src/guestfs-actions.pod:6717
15260 msgid "guestfs_wc_c"
15264 #: ../src/guestfs-actions.pod:6719
15268 " guestfs_wc_c (guestfs_h *g,\n"
15269 " const char *path);\n"
15274 #: ../src/guestfs-actions.pod:6723 ../fish/guestfish-actions.pod:4486
15276 "This command counts the characters in a file, using the C<wc -c> external "
15281 #: ../src/guestfs-actions.pod:6730
15282 msgid "guestfs_wc_l"
15286 #: ../src/guestfs-actions.pod:6732
15290 " guestfs_wc_l (guestfs_h *g,\n"
15291 " const char *path);\n"
15296 #: ../src/guestfs-actions.pod:6736 ../fish/guestfish-actions.pod:4493
15298 "This command counts the lines in a file, using the C<wc -l> external "
15303 #: ../src/guestfs-actions.pod:6743
15304 msgid "guestfs_wc_w"
15308 #: ../src/guestfs-actions.pod:6745
15312 " guestfs_wc_w (guestfs_h *g,\n"
15313 " const char *path);\n"
15318 #: ../src/guestfs-actions.pod:6749 ../fish/guestfish-actions.pod:4500
15320 "This command counts the words in a file, using the C<wc -w> external "
15325 #: ../src/guestfs-actions.pod:6756
15326 msgid "guestfs_write"
15330 #: ../src/guestfs-actions.pod:6758
15334 " guestfs_write (guestfs_h *g,\n"
15335 " const char *path,\n"
15336 " const char *content,\n"
15337 " size_t content_size);\n"
15342 #: ../src/guestfs-actions.pod:6764 ../fish/guestfish-actions.pod:4507
15344 "This call creates a file called C<path>. The content of the file is the "
15345 "string C<content> (which can contain any 8 bit data)."
15349 #: ../src/guestfs-actions.pod:6774
15350 msgid "guestfs_write_file"
15354 #: ../src/guestfs-actions.pod:6776
15358 " guestfs_write_file (guestfs_h *g,\n"
15359 " const char *path,\n"
15360 " const char *content,\n"
15366 #: ../src/guestfs-actions.pod:6782 ../fish/guestfish-actions.pod:4517
15368 "This call creates a file called C<path>. The contents of the file is the "
15369 "string C<content> (which can contain any 8 bit data), with length C<size>."
15373 #: ../src/guestfs-actions.pod:6786 ../fish/guestfish-actions.pod:4521
15375 "As a special case, if C<size> is C<0> then the length is calculated using "
15376 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
15380 #: ../src/guestfs-actions.pod:6790 ../fish/guestfish-actions.pod:4525
15382 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
15383 "I<not> work, even if the length is specified."
15387 #: ../src/guestfs-actions.pod:6798 ../fish/guestfish-actions.pod:4531
15388 msgid "This function is deprecated. In new code, use the C<write> call instead."
15392 #: ../src/guestfs-actions.pod:6807
15393 msgid "guestfs_zegrep"
15397 #: ../src/guestfs-actions.pod:6809
15401 " guestfs_zegrep (guestfs_h *g,\n"
15402 " const char *regex,\n"
15403 " const char *path);\n"
15408 #: ../src/guestfs-actions.pod:6814 ../fish/guestfish-actions.pod:4542
15409 msgid "This calls the external C<zegrep> program and returns the matching lines."
15413 #: ../src/guestfs-actions.pod:6826
15414 msgid "guestfs_zegrepi"
15418 #: ../src/guestfs-actions.pod:6828
15422 " guestfs_zegrepi (guestfs_h *g,\n"
15423 " const char *regex,\n"
15424 " const char *path);\n"
15429 #: ../src/guestfs-actions.pod:6833 ../fish/guestfish-actions.pod:4552
15430 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
15434 #: ../src/guestfs-actions.pod:6845
15435 msgid "guestfs_zero"
15439 #: ../src/guestfs-actions.pod:6847
15443 " guestfs_zero (guestfs_h *g,\n"
15444 " const char *device);\n"
15449 #: ../src/guestfs-actions.pod:6851 ../fish/guestfish-actions.pod:4562
15450 msgid "This command writes zeroes over the first few blocks of C<device>."
15454 #: ../src/guestfs-actions.pod:6853 ../fish/guestfish-actions.pod:4564
15456 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
15457 "securely wipe the device). It should be sufficient to remove any partition "
15458 "tables, filesystem superblocks and so on."
15462 #: ../src/guestfs-actions.pod:6857
15463 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
15467 #: ../src/guestfs-actions.pod:6868
15468 msgid "guestfs_zero_device"
15472 #: ../src/guestfs-actions.pod:6870
15476 " guestfs_zero_device (guestfs_h *g,\n"
15477 " const char *device);\n"
15482 #: ../src/guestfs-actions.pod:6874
15484 "This command writes zeroes over the entire C<device>. Compare with "
15485 "C<guestfs_zero> which just zeroes the first few blocks of a device."
15489 #: ../src/guestfs-actions.pod:6888
15490 msgid "(Added in 1.3.1)"
15494 #: ../src/guestfs-actions.pod:6890
15495 msgid "guestfs_zerofree"
15499 #: ../src/guestfs-actions.pod:6892
15503 " guestfs_zerofree (guestfs_h *g,\n"
15504 " const char *device);\n"
15509 #: ../src/guestfs-actions.pod:6896 ../fish/guestfish-actions.pod:4585
15511 "This runs the I<zerofree> program on C<device>. This program claims to zero "
15512 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
15513 "possible to compress the filesystem more effectively."
15517 #: ../src/guestfs-actions.pod:6901 ../fish/guestfish-actions.pod:4590
15518 msgid "You should B<not> run this program if the filesystem is mounted."
15522 #: ../src/guestfs-actions.pod:6904 ../fish/guestfish-actions.pod:4593
15524 "It is possible that using this program can damage the filesystem or data on "
15529 #: ../src/guestfs-actions.pod:6911
15530 msgid "guestfs_zfgrep"
15534 #: ../src/guestfs-actions.pod:6913
15538 " guestfs_zfgrep (guestfs_h *g,\n"
15539 " const char *pattern,\n"
15540 " const char *path);\n"
15545 #: ../src/guestfs-actions.pod:6918 ../fish/guestfish-actions.pod:4600
15546 msgid "This calls the external C<zfgrep> program and returns the matching lines."
15550 #: ../src/guestfs-actions.pod:6930
15551 msgid "guestfs_zfgrepi"
15555 #: ../src/guestfs-actions.pod:6932
15559 " guestfs_zfgrepi (guestfs_h *g,\n"
15560 " const char *pattern,\n"
15561 " const char *path);\n"
15566 #: ../src/guestfs-actions.pod:6937 ../fish/guestfish-actions.pod:4610
15567 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
15571 #: ../src/guestfs-actions.pod:6949
15572 msgid "guestfs_zfile"
15576 #: ../src/guestfs-actions.pod:6951
15580 " guestfs_zfile (guestfs_h *g,\n"
15581 " const char *meth,\n"
15582 " const char *path);\n"
15587 #: ../src/guestfs-actions.pod:6956 ../fish/guestfish-actions.pod:4620
15588 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
15592 #: ../src/guestfs-actions.pod:6959 ../fish/guestfish-actions.pod:4623
15593 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
15597 #: ../src/guestfs-actions.pod:6961
15599 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
15604 #: ../src/guestfs-actions.pod:6967 ../fish/guestfish-actions.pod:4628
15605 msgid "This function is deprecated. In new code, use the C<file> call instead."
15609 #: ../src/guestfs-actions.pod:6976
15610 msgid "guestfs_zgrep"
15614 #: ../src/guestfs-actions.pod:6978
15618 " guestfs_zgrep (guestfs_h *g,\n"
15619 " const char *regex,\n"
15620 " const char *path);\n"
15625 #: ../src/guestfs-actions.pod:6983 ../fish/guestfish-actions.pod:4639
15626 msgid "This calls the external C<zgrep> program and returns the matching lines."
15630 #: ../src/guestfs-actions.pod:6995
15631 msgid "guestfs_zgrepi"
15635 #: ../src/guestfs-actions.pod:6997
15639 " guestfs_zgrepi (guestfs_h *g,\n"
15640 " const char *regex,\n"
15641 " const char *path);\n"
15646 #: ../src/guestfs-actions.pod:7002 ../fish/guestfish-actions.pod:4649
15647 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
15651 #: ../src/guestfs-availability.pod:3
15656 #: ../src/guestfs-availability.pod:5
15658 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
15659 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
15660 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
15661 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
15662 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
15666 #: ../src/guestfs-availability.pod:21
15671 #: ../src/guestfs-availability.pod:23
15673 "The following functions: L</guestfs_inotify_add_watch> "
15674 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
15675 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
15679 #: ../src/guestfs-availability.pod:31
15680 msgid "B<linuxfsuuid>"
15684 #: ../src/guestfs-availability.pod:33
15686 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
15687 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
15691 #: ../src/guestfs-availability.pod:40
15692 msgid "B<linuxmodules>"
15696 #: ../src/guestfs-availability.pod:42
15697 msgid "The following functions: L</guestfs_modprobe>"
15701 #: ../src/guestfs-availability.pod:45
15702 msgid "B<linuxxattrs>"
15706 #: ../src/guestfs-availability.pod:47
15708 "The following functions: L</guestfs_getxattrs> L</guestfs_lgetxattrs> "
15709 "L</guestfs_lremovexattr> L</guestfs_lsetxattr> L</guestfs_lxattrlist> "
15710 "L</guestfs_removexattr> L</guestfs_setxattr>"
15714 #: ../src/guestfs-availability.pod:56
15719 #: ../src/guestfs-availability.pod:58
15721 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
15722 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
15723 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
15727 #: ../src/guestfs-availability.pod:67
15732 #: ../src/guestfs-availability.pod:69
15734 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
15735 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
15736 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
15737 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
15738 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
15739 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
15740 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
15741 "L</guestfs_vgs_full>"
15745 #: ../src/guestfs-availability.pod:92
15750 #: ../src/guestfs-availability.pod:94
15752 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
15753 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
15757 #: ../src/guestfs-availability.pod:100
15762 #: ../src/guestfs-availability.pod:102
15763 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
15767 #: ../src/guestfs-availability.pod:105
15768 msgid "B<ntfsprogs>"
15772 #: ../src/guestfs-availability.pod:107
15773 msgid "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
15777 #: ../src/guestfs-availability.pod:111
15778 msgid "B<realpath>"
15782 #: ../src/guestfs-availability.pod:113
15783 msgid "The following functions: L</guestfs_realpath>"
15787 #: ../src/guestfs-availability.pod:116
15792 #: ../src/guestfs-availability.pod:118
15794 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
15795 "L</guestfs_scrub_freespace>"
15799 #: ../src/guestfs-availability.pod:123
15804 #: ../src/guestfs-availability.pod:125
15805 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
15809 #: ../src/guestfs-availability.pod:129
15814 #: ../src/guestfs-availability.pod:131
15815 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
15819 #: ../src/guestfs-availability.pod:135
15820 msgid "B<zerofree>"
15824 #: ../src/guestfs-availability.pod:137
15825 msgid "The following functions: L</guestfs_zerofree>"
15829 #: ../src/guestfs-structs.pod:1
15830 msgid "guestfs_int_bool"
15834 #: ../src/guestfs-structs.pod:3
15837 " struct guestfs_int_bool {\n"
15845 #: ../src/guestfs-structs.pod:8
15848 " struct guestfs_int_bool_list {\n"
15849 " uint32_t len; /* Number of elements in list. */\n"
15850 " struct guestfs_int_bool *val; /* Elements. */\n"
15856 #: ../src/guestfs-structs.pod:13
15859 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
15860 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
15865 #: ../src/guestfs-structs.pod:16
15866 msgid "guestfs_lvm_pv"
15870 #: ../src/guestfs-structs.pod:18
15873 " struct guestfs_lvm_pv {\n"
15874 " char *pv_name;\n"
15875 " /* The next field is NOT nul-terminated, be careful when printing it: "
15877 " char pv_uuid[32];\n"
15879 " uint64_t pv_size;\n"
15880 " uint64_t dev_size;\n"
15881 " uint64_t pv_free;\n"
15882 " uint64_t pv_used;\n"
15883 " char *pv_attr;\n"
15884 " int64_t pv_pe_count;\n"
15885 " int64_t pv_pe_alloc_count;\n"
15886 " char *pv_tags;\n"
15887 " uint64_t pe_start;\n"
15888 " int64_t pv_mda_count;\n"
15889 " uint64_t pv_mda_free;\n"
15895 #: ../src/guestfs-structs.pod:36
15898 " struct guestfs_lvm_pv_list {\n"
15899 " uint32_t len; /* Number of elements in list. */\n"
15900 " struct guestfs_lvm_pv *val; /* Elements. */\n"
15906 #: ../src/guestfs-structs.pod:41
15909 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
15910 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
15915 #: ../src/guestfs-structs.pod:44
15916 msgid "guestfs_lvm_vg"
15920 #: ../src/guestfs-structs.pod:46
15923 " struct guestfs_lvm_vg {\n"
15924 " char *vg_name;\n"
15925 " /* The next field is NOT nul-terminated, be careful when printing it: "
15927 " char vg_uuid[32];\n"
15929 " char *vg_attr;\n"
15930 " uint64_t vg_size;\n"
15931 " uint64_t vg_free;\n"
15932 " char *vg_sysid;\n"
15933 " uint64_t vg_extent_size;\n"
15934 " int64_t vg_extent_count;\n"
15935 " int64_t vg_free_count;\n"
15936 " int64_t max_lv;\n"
15937 " int64_t max_pv;\n"
15938 " int64_t pv_count;\n"
15939 " int64_t lv_count;\n"
15940 " int64_t snap_count;\n"
15941 " int64_t vg_seqno;\n"
15942 " char *vg_tags;\n"
15943 " int64_t vg_mda_count;\n"
15944 " uint64_t vg_mda_free;\n"
15950 #: ../src/guestfs-structs.pod:69
15953 " struct guestfs_lvm_vg_list {\n"
15954 " uint32_t len; /* Number of elements in list. */\n"
15955 " struct guestfs_lvm_vg *val; /* Elements. */\n"
15961 #: ../src/guestfs-structs.pod:74
15964 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
15965 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
15970 #: ../src/guestfs-structs.pod:77
15971 msgid "guestfs_lvm_lv"
15975 #: ../src/guestfs-structs.pod:79
15978 " struct guestfs_lvm_lv {\n"
15979 " char *lv_name;\n"
15980 " /* The next field is NOT nul-terminated, be careful when printing it: "
15982 " char lv_uuid[32];\n"
15983 " char *lv_attr;\n"
15984 " int64_t lv_major;\n"
15985 " int64_t lv_minor;\n"
15986 " int64_t lv_kernel_major;\n"
15987 " int64_t lv_kernel_minor;\n"
15988 " uint64_t lv_size;\n"
15989 " int64_t seg_count;\n"
15991 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
15992 " float snap_percent;\n"
15993 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
15994 " float copy_percent;\n"
15995 " char *move_pv;\n"
15996 " char *lv_tags;\n"
15997 " char *mirror_log;\n"
15998 " char *modules;\n"
16004 #: ../src/guestfs-structs.pod:101
16007 " struct guestfs_lvm_lv_list {\n"
16008 " uint32_t len; /* Number of elements in list. */\n"
16009 " struct guestfs_lvm_lv *val; /* Elements. */\n"
16015 #: ../src/guestfs-structs.pod:106
16018 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
16019 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
16024 #: ../src/guestfs-structs.pod:111
16027 " struct guestfs_stat {\n"
16031 " int64_t nlink;\n"
16036 " int64_t blksize;\n"
16037 " int64_t blocks;\n"
16038 " int64_t atime;\n"
16039 " int64_t mtime;\n"
16040 " int64_t ctime;\n"
16046 #: ../src/guestfs-structs.pod:127
16049 " struct guestfs_stat_list {\n"
16050 " uint32_t len; /* Number of elements in list. */\n"
16051 " struct guestfs_stat *val; /* Elements. */\n"
16057 #: ../src/guestfs-structs.pod:132
16060 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
16061 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
16066 #: ../src/guestfs-structs.pod:137
16069 " struct guestfs_statvfs {\n"
16070 " int64_t bsize;\n"
16071 " int64_t frsize;\n"
16072 " int64_t blocks;\n"
16073 " int64_t bfree;\n"
16074 " int64_t bavail;\n"
16075 " int64_t files;\n"
16076 " int64_t ffree;\n"
16077 " int64_t favail;\n"
16080 " int64_t namemax;\n"
16086 #: ../src/guestfs-structs.pod:151
16089 " struct guestfs_statvfs_list {\n"
16090 " uint32_t len; /* Number of elements in list. */\n"
16091 " struct guestfs_statvfs *val; /* Elements. */\n"
16097 #: ../src/guestfs-structs.pod:156
16100 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
16101 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
16106 #: ../src/guestfs-structs.pod:159
16107 msgid "guestfs_dirent"
16111 #: ../src/guestfs-structs.pod:161
16114 " struct guestfs_dirent {\n"
16123 #: ../src/guestfs-structs.pod:167
16126 " struct guestfs_dirent_list {\n"
16127 " uint32_t len; /* Number of elements in list. */\n"
16128 " struct guestfs_dirent *val; /* Elements. */\n"
16134 #: ../src/guestfs-structs.pod:172
16137 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
16138 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
16143 #: ../src/guestfs-structs.pod:177
16146 " struct guestfs_version {\n"
16147 " int64_t major;\n"
16148 " int64_t minor;\n"
16149 " int64_t release;\n"
16156 #: ../src/guestfs-structs.pod:184
16159 " struct guestfs_version_list {\n"
16160 " uint32_t len; /* Number of elements in list. */\n"
16161 " struct guestfs_version *val; /* Elements. */\n"
16167 #: ../src/guestfs-structs.pod:189
16170 " void guestfs_free_version (struct guestfs_free_version *);\n"
16171 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
16176 #: ../src/guestfs-structs.pod:192
16177 msgid "guestfs_xattr"
16181 #: ../src/guestfs-structs.pod:194
16184 " struct guestfs_xattr {\n"
16185 " char *attrname;\n"
16186 " /* The next two fields describe a byte array. */\n"
16187 " uint32_t attrval_len;\n"
16188 " char *attrval;\n"
16194 #: ../src/guestfs-structs.pod:201
16197 " struct guestfs_xattr_list {\n"
16198 " uint32_t len; /* Number of elements in list. */\n"
16199 " struct guestfs_xattr *val; /* Elements. */\n"
16205 #: ../src/guestfs-structs.pod:206
16208 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
16209 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
16214 #: ../src/guestfs-structs.pod:209
16215 msgid "guestfs_inotify_event"
16219 #: ../src/guestfs-structs.pod:211
16222 " struct guestfs_inotify_event {\n"
16223 " int64_t in_wd;\n"
16224 " uint32_t in_mask;\n"
16225 " uint32_t in_cookie;\n"
16226 " char *in_name;\n"
16232 #: ../src/guestfs-structs.pod:218
16235 " struct guestfs_inotify_event_list {\n"
16236 " uint32_t len; /* Number of elements in list. */\n"
16237 " struct guestfs_inotify_event *val; /* Elements. */\n"
16243 #: ../src/guestfs-structs.pod:223
16246 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
16247 " void guestfs_free_inotify_event_list (struct "
16248 "guestfs_free_inotify_event_list *);\n"
16253 #: ../src/guestfs-structs.pod:226
16254 msgid "guestfs_partition"
16258 #: ../src/guestfs-structs.pod:228
16261 " struct guestfs_partition {\n"
16262 " int32_t part_num;\n"
16263 " uint64_t part_start;\n"
16264 " uint64_t part_end;\n"
16265 " uint64_t part_size;\n"
16271 #: ../src/guestfs-structs.pod:235
16274 " struct guestfs_partition_list {\n"
16275 " uint32_t len; /* Number of elements in list. */\n"
16276 " struct guestfs_partition *val; /* Elements. */\n"
16282 #: ../src/guestfs-structs.pod:240
16285 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
16286 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
16291 #: ../src/guestfs-structs.pod:243
16292 msgid "guestfs_application"
16296 #: ../src/guestfs-structs.pod:245
16299 " struct guestfs_application {\n"
16300 " char *app_name;\n"
16301 " char *app_display_name;\n"
16302 " int32_t app_epoch;\n"
16303 " char *app_version;\n"
16304 " char *app_release;\n"
16305 " char *app_install_path;\n"
16306 " char *app_trans_path;\n"
16307 " char *app_publisher;\n"
16308 " char *app_url;\n"
16309 " char *app_source_package;\n"
16310 " char *app_summary;\n"
16311 " char *app_description;\n"
16317 #: ../src/guestfs-structs.pod:260
16320 " struct guestfs_application_list {\n"
16321 " uint32_t len; /* Number of elements in list. */\n"
16322 " struct guestfs_application *val; /* Elements. */\n"
16328 #: ../src/guestfs-structs.pod:265
16331 " void guestfs_free_application (struct guestfs_free_application *);\n"
16332 " void guestfs_free_application_list (struct guestfs_free_application_list "
16338 #: ../fish/guestfish.pod:5
16339 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
16343 #: ../fish/guestfish.pod:9
16346 " guestfish [--options] [commands]\n"
16351 #: ../fish/guestfish.pod:11
16359 #: ../fish/guestfish.pod:13
16362 " guestfish [--ro|--rw] -a disk.img\n"
16367 #: ../fish/guestfish.pod:15
16370 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
16375 #: ../fish/guestfish.pod:17
16378 " guestfish -d libvirt-domain\n"
16383 #: ../fish/guestfish.pod:19
16386 " guestfish [--ro|--rw] -a disk.img -i\n"
16391 #: ../fish/guestfish.pod:21
16394 " guestfish -d libvirt-domain -i\n"
16399 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15 ../tools/virt-edit.pl:44 ../tools/virt-win-reg.pl:51 ../tools/virt-tar.pl:59 ../tools/virt-rescue.pl:41
16404 #: ../fish/guestfish.pod:25
16406 "Using guestfish in read/write mode on live virtual machines can be "
16407 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
16408 "option to use guestfish safely if the disk image or virtual machine might be "
16413 #: ../fish/guestfish.pod:32
16415 "Guestfish is a shell and command-line tool for examining and modifying "
16416 "virtual machine filesystems. It uses libguestfs and exposes all of the "
16417 "functionality of the guestfs API, see L<guestfs(3)>."
16421 #: ../fish/guestfish.pod:36
16423 "Guestfish gives you structured access to the libguestfs API, from shell "
16424 "scripts or the command line or interactively. If you want to rescue a "
16425 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
16430 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:846 ../fuse/guestmount.pod:39 ../tools/virt-edit.pl:58 ../tools/virt-resize.pl:66 ../tools/virt-tar.pl:45
16435 #: ../fish/guestfish.pod:43
16436 msgid "As an interactive shell"
16440 #: ../fish/guestfish.pod:45
16448 #: ../fish/guestfish.pod:47
16451 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
16452 " editing virtual machine filesystems.\n"
16457 #: ../fish/guestfish.pod:50
16460 " Type: 'help' for a list of commands\n"
16461 " 'man' to read the manual\n"
16462 " 'quit' to quit the shell\n"
16467 #: ../fish/guestfish.pod:54
16470 " ><fs> add-ro disk.img\n"
16472 " ><fs> list-filesystems\n"
16473 " /dev/sda1: ext4\n"
16474 " /dev/vg_guest/lv_root: ext4\n"
16475 " /dev/vg_guest/lv_swap: swap\n"
16476 " ><fs> mount /dev/vg_guest/lv_root /\n"
16477 " ><fs> cat /etc/fstab\n"
16479 " # Created by anaconda\n"
16486 #: ../fish/guestfish.pod:67
16487 msgid "From shell scripts"
16491 #: ../fish/guestfish.pod:69
16492 msgid "Create a new C</etc/motd> file in a guest or disk image:"
16496 #: ../fish/guestfish.pod:71
16499 " guestfish <<_EOF_\n"
16502 " mount /dev/vg_guest/lv_root /\n"
16503 " write /etc/motd \"Welcome, new users\"\n"
16509 #: ../fish/guestfish.pod:78
16510 msgid "List the LVM logical volumes in a disk image:"
16514 #: ../fish/guestfish.pod:80
16517 " guestfish -a disk.img --ro <<_EOF_\n"
16525 #: ../fish/guestfish.pod:85
16526 msgid "List all the filesystems in a disk image:"
16530 #: ../fish/guestfish.pod:87
16533 " guestfish -a disk.img --ro <<_EOF_\n"
16535 " list-filesystems\n"
16541 #: ../fish/guestfish.pod:92
16542 msgid "On one command line"
16546 #: ../fish/guestfish.pod:94
16547 msgid "Update C</etc/resolv.conf> in a guest:"
16551 #: ../fish/guestfish.pod:96
16555 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
16556 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
16561 #: ../fish/guestfish.pod:100
16562 msgid "Edit C</boot/grub/grub.conf> interactively:"
16566 #: ../fish/guestfish.pod:102
16569 " guestfish --rw --add disk.img \\\n"
16570 " --mount /dev/vg_guest/lv_root \\\n"
16571 " --mount /dev/sda1:/boot \\\n"
16572 " edit /boot/grub/grub.conf\n"
16577 #: ../fish/guestfish.pod:107
16578 msgid "Mount disks automatically"
16582 #: ../fish/guestfish.pod:109
16584 "Use the I<-i> option to automatically mount the disks from a virtual "
16589 #: ../fish/guestfish.pod:112
16592 " guestfish --ro -a disk.img -i cat /etc/group\n"
16597 #: ../fish/guestfish.pod:114
16600 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
16605 #: ../fish/guestfish.pod:116
16606 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
16610 #: ../fish/guestfish.pod:118
16613 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
16618 #: ../fish/guestfish.pod:120
16619 msgid "As a script interpreter"
16623 #: ../fish/guestfish.pod:122
16624 msgid "Create a 100MB disk containing an ext2-formatted partition:"
16628 #: ../fish/guestfish.pod:124
16631 " #!/usr/bin/guestfish -f\n"
16632 " sparse test1.img 100M\n"
16634 " part-disk /dev/sda mbr\n"
16635 " mkfs ext2 /dev/sda1\n"
16640 #: ../fish/guestfish.pod:130
16641 msgid "Start with a prepared disk"
16645 #: ../fish/guestfish.pod:132
16647 "An alternate way to create a 100MB disk called C<test1.img> containing a "
16648 "single ext2-formatted partition:"
16652 #: ../fish/guestfish.pod:135
16655 " guestfish -N fs\n"
16660 #: ../fish/guestfish.pod:137
16661 msgid "To list what is available do:"
16665 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:837
16668 " guestfish -N help | less\n"
16673 #: ../fish/guestfish.pod:141
16674 msgid "Remote control"
16678 #: ../fish/guestfish.pod:143
16681 " eval \"`guestfish --listen`\"\n"
16682 " guestfish --remote add-ro disk.img\n"
16683 " guestfish --remote run\n"
16684 " guestfish --remote lvs\n"
16689 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37 ../fuse/guestmount.pod:73 ../inspector/virt-inspector.pl:68 ../tools/virt-edit.pl:72 ../tools/virt-win-reg.pl:171 ../tools/virt-df.pl:71 ../tools/virt-ls.pl:78 ../tools/virt-resize.pl:257 ../tools/virt-list-filesystems.pl:50 ../tools/virt-tar.pl:98 ../tools/virt-rescue.pl:103 ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:51
16694 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:131 ../inspector/virt-inspector.pl:76 ../tools/virt-edit.pl:80 ../tools/virt-win-reg.pl:179 ../tools/virt-df.pl:79 ../tools/virt-ls.pl:86 ../tools/virt-resize.pl:265 ../tools/virt-list-filesystems.pl:58 ../tools/virt-tar.pl:106 ../tools/virt-rescue.pl:111 ../tools/virt-make-fs.pl:161 ../tools/virt-list-partitions.pl:59
16699 #: ../fish/guestfish.pod:154
16700 msgid "Displays general help on options."
16704 #: ../fish/guestfish.pod:156
16705 msgid "B<-h> | B<--cmd-help>"
16709 #: ../fish/guestfish.pod:158
16710 msgid "Lists all available guestfish commands."
16714 #: ../fish/guestfish.pod:160
16715 msgid "B<-h cmd> | B<--cmd-help cmd>"
16719 #: ../fish/guestfish.pod:162
16720 msgid "Displays detailed help on a single command C<cmd>."
16724 #: ../fish/guestfish.pod:164 ../fuse/guestmount.pod:77
16725 msgid "B<-a image> | B<--add image>"
16729 #: ../fish/guestfish.pod:166
16730 msgid "Add a block device or virtual machine image to the shell."
16734 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:81
16736 "The format of the disk image is auto-detected. To override this and force a "
16737 "particular format use the I<--format=..> option."
16741 #: ../fish/guestfish.pod:171 ../fuse/guestmount.pod:84
16742 msgid "B<-c URI> | B<--connect URI>"
16746 #: ../fish/guestfish.pod:173 ../fuse/guestmount.pod:86
16748 "When used in conjunction with the I<-d> option, this specifies the libvirt "
16749 "URI to use. The default is to use the default libvirt connection."
16753 #: ../fish/guestfish.pod:177
16758 #: ../fish/guestfish.pod:179
16760 "If using the I<--listen> option and a csh-like shell, use this option. See "
16761 "section L</REMOTE CONTROL AND CSH> below."
16765 #: ../fish/guestfish.pod:182 ../fuse/guestmount.pod:90
16766 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
16770 #: ../fish/guestfish.pod:184 ../fuse/guestmount.pod:92
16772 "Add disks from the named libvirt domain. If the I<--ro> option is also "
16773 "used, then any libvirt domain can be used. However in write mode, only "
16774 "libvirt domains which are shut down can be named here."
16778 #: ../fish/guestfish.pod:188
16779 msgid "B<-D> | B<--no-dest-paths>"
16783 #: ../fish/guestfish.pod:190
16785 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
16786 "to hit the tab key to complete paths on the guest filesystem, but this "
16787 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
16788 "allow this feature to be disabled."
16792 #: ../fish/guestfish.pod:195 ../fuse/guestmount.pod:108
16793 msgid "B<--echo-keys>"
16797 #: ../fish/guestfish.pod:197 ../fuse/guestmount.pod:110
16799 "When prompting for keys and passphrases, guestfish normally turns echoing "
16800 "off so you cannot see what you are typing. If you are not worried about "
16801 "Tempest attacks and there is no one else in the room you can specify this "
16802 "flag to see what you are typing."
16806 #: ../fish/guestfish.pod:202
16807 msgid "B<-f file> | B<--file file>"
16811 #: ../fish/guestfish.pod:204
16812 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
16816 #: ../fish/guestfish.pod:207
16819 " #!/usr/bin/guestfish -f\n"
16824 #: ../fish/guestfish.pod:209 ../fuse/guestmount.pod:115
16825 msgid "B<--format=raw|qcow2|..> | B<--format>"
16829 #: ../fish/guestfish.pod:211 ../fuse/guestmount.pod:117
16831 "The default for the I<-a> option is to auto-detect the format of the disk "
16832 "image. Using this forces the disk format for I<-a> options which follow on "
16833 "the command line. Using I<--format> with no argument switches back to "
16834 "auto-detection for subsequent I<-a> options."
16838 #: ../fish/guestfish.pod:216 ../fish/guestfish.pod:543 ../inspector/virt-inspector.pl:431
16839 msgid "For example:"
16843 #: ../fish/guestfish.pod:218
16846 " guestfish --format=raw -a disk.img\n"
16851 #: ../fish/guestfish.pod:220
16852 msgid "forces raw format (no auto-detection) for C<disk.img>."
16856 #: ../fish/guestfish.pod:222
16859 " guestfish --format=raw -a disk.img --format -a another.img\n"
16864 #: ../fish/guestfish.pod:224
16866 "forces raw format (no auto-detection) for C<disk.img> and reverts to "
16867 "auto-detection for C<another.img>."
16871 #: ../fish/guestfish.pod:227
16873 "If you have untrusted raw-format guest disk images, you should use this "
16874 "option to specify the disk format. This avoids a possible security problem "
16875 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
16879 #: ../fish/guestfish.pod:232 ../fuse/guestmount.pod:135
16880 msgid "B<-i> | B<--inspector>"
16884 #: ../fish/guestfish.pod:234 ../fuse/guestmount.pod:137
16886 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
16887 "system and mount filesystems as they would be mounted on the real virtual "
16892 #: ../fish/guestfish.pod:238
16893 msgid "Typical usage is either:"
16897 #: ../fish/guestfish.pod:240
16900 " guestfish -d myguest -i\n"
16905 #: ../fish/guestfish.pod:242
16906 msgid "(for an inactive libvirt domain called I<myguest>), or:"
16910 #: ../fish/guestfish.pod:244
16913 " guestfish --ro -d myguest -i\n"
16918 #: ../fish/guestfish.pod:246
16919 msgid "(for active domains, readonly), or specify the block device directly:"
16923 #: ../fish/guestfish.pod:248
16926 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
16931 #: ../fish/guestfish.pod:250
16933 "Note that the command line syntax changed slightly over older versions of "
16934 "guestfish. You can still use the old syntax:"
16938 #: ../fish/guestfish.pod:253
16941 " guestfish [--ro] -i disk.img\n"
16946 #: ../fish/guestfish.pod:255
16949 " guestfish [--ro] -i libvirt-domain\n"
16954 #: ../fish/guestfish.pod:257 ../fuse/guestmount.pod:141
16955 msgid "B<--keys-from-stdin>"
16959 #: ../fish/guestfish.pod:259 ../fuse/guestmount.pod:143
16961 "Read key or passphrase parameters from stdin. The default is to try to read "
16962 "passphrases from the user by opening C</dev/tty>."
16966 #: ../fish/guestfish.pod:262
16967 msgid "B<--listen>"
16971 #: ../fish/guestfish.pod:264
16973 "Fork into the background and listen for remote commands. See section "
16974 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
16978 #: ../fish/guestfish.pod:267
16979 msgid "B<-m dev[:mountpoint]> | B<--mount dev[:mountpoint]>"
16983 #: ../fish/guestfish.pod:269
16984 msgid "Mount the named partition or logical volume on the given mountpoint."
16988 #: ../fish/guestfish.pod:271
16989 msgid "If the mountpoint is omitted, it defaults to C</>."
16993 #: ../fish/guestfish.pod:273
16994 msgid "You have to mount something on C</> before most commands will work."
16998 #: ../fish/guestfish.pod:275
17000 "If any I<-m> or I<--mount> options are given, the guest is automatically "
17005 #: ../fish/guestfish.pod:278
17007 "If you don't know what filesystems a disk image contains, you can either run "
17008 "guestfish without this option, then list the partitions and LVs available "
17009 "(see L</list-partitions> and L</lvs> commands), or you can use the "
17010 "L<virt-list-filesystems(1)> program."
17014 #: ../fish/guestfish.pod:283 ../fuse/guestmount.pod:154
17015 msgid "B<-n> | B<--no-sync>"
17019 #: ../fish/guestfish.pod:285
17021 "Disable autosync. This is enabled by default. See the discussion of "
17022 "autosync in the L<guestfs(3)> manpage."
17026 #: ../fish/guestfish.pod:288
17027 msgid "B<-N type> | B<--new type> | B<-N help>"
17031 #: ../fish/guestfish.pod:290
17033 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
17034 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
17035 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
17040 #: ../fish/guestfish.pod:295
17041 msgid "B<--progress-bars>"
17045 #: ../fish/guestfish.pod:297
17046 msgid "Enable progress bars, even when guestfish is used non-interactively."
17050 #: ../fish/guestfish.pod:299
17052 "Progress bars are enabled by default when guestfish is used as an "
17053 "interactive shell."
17057 #: ../fish/guestfish.pod:302
17058 msgid "B<--no-progress-bars>"
17062 #: ../fish/guestfish.pod:304
17063 msgid "Disable progress bars."
17067 #: ../fish/guestfish.pod:306
17068 msgid "B<--remote[=pid]>"
17072 #: ../fish/guestfish.pod:308
17074 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
17075 "CONTROL GUESTFISH OVER A SOCKET> below."
17079 #: ../fish/guestfish.pod:311 ../fuse/guestmount.pod:196
17080 msgid "B<-r> | B<--ro>"
17084 #: ../fish/guestfish.pod:313
17086 "This changes the I<-a> and I<-m> options so that disks are added and mounts "
17087 "are done read-only (see L<guestfs(3)/guestfs_mount_ro>)."
17091 #: ../fish/guestfish.pod:316 ../tools/virt-rescue.pl:187
17093 "The option must always be used if the disk image or virtual machine might be "
17094 "running, and is generally recommended in cases where you don't need write "
17095 "access to the disk."
17099 #: ../fish/guestfish.pod:320
17101 "Note that prepared disk images created with I<-N> are not affected by the "
17106 #: ../fish/guestfish.pod:323
17107 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
17111 #: ../fish/guestfish.pod:325 ../fuse/guestmount.pod:208 ../tools/virt-rescue.pl:195
17112 msgid "B<--selinux>"
17116 #: ../fish/guestfish.pod:327
17117 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
17121 #: ../fish/guestfish.pod:329 ../fuse/guestmount.pod:212
17122 msgid "B<-v> | B<--verbose>"
17126 #: ../fish/guestfish.pod:331
17128 "Enable very verbose messages. This is particularly useful if you find a "
17133 #: ../fish/guestfish.pod:334 ../fuse/guestmount.pod:216
17134 msgid "B<-V> | B<--version>"
17138 #: ../fish/guestfish.pod:336
17139 msgid "Display the guestfish / libguestfs version number and exit."
17143 #: ../fish/guestfish.pod:338 ../fuse/guestmount.pod:220
17144 msgid "B<-w> | B<--rw>"
17148 #: ../fish/guestfish.pod:340
17150 "This option does nothing at the moment. See L</OPENING DISKS FOR READ AND "
17155 #: ../fish/guestfish.pod:343
17160 #: ../fish/guestfish.pod:345
17161 msgid "Echo each command before executing it."
17165 #: ../fish/guestfish.pod:349
17166 msgid "COMMANDS ON COMMAND LINE"
17170 #: ../fish/guestfish.pod:351
17171 msgid "Any additional (non-option) arguments are treated as commands to execute."
17175 #: ../fish/guestfish.pod:354
17177 "Commands to execute should be separated by a colon (C<:>), where the colon "
17178 "is a separate parameter. Thus:"
17182 #: ../fish/guestfish.pod:357
17185 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
17190 #: ../fish/guestfish.pod:359
17192 "If there are no additional arguments, then we enter a shell, either an "
17193 "interactive shell with a prompt (if the input is a terminal) or a "
17194 "non-interactive shell."
17198 #: ../fish/guestfish.pod:363
17200 "In either command line mode or non-interactive shell, the first command that "
17201 "gives an error causes the whole shell to exit. In interactive mode (with a "
17202 "prompt) if a command fails, you can continue to enter commands."
17206 #: ../fish/guestfish.pod:368
17207 msgid "USING launch (OR run)"
17211 #: ../fish/guestfish.pod:370
17213 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
17214 "then launch it, then mount any disks you need, and finally issue "
17215 "actions/commands. So the general order of the day is:"
17219 #: ../fish/guestfish.pod:378
17220 msgid "add or -a/--add"
17224 #: ../fish/guestfish.pod:382
17225 msgid "launch (aka run)"
17229 #: ../fish/guestfish.pod:386
17230 msgid "mount or -m/--mount"
17234 #: ../fish/guestfish.pod:390
17235 msgid "any other commands"
17239 #: ../fish/guestfish.pod:394
17241 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
17242 "guest before mounting or performing any other commands."
17246 #: ../fish/guestfish.pod:397
17248 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
17249 "I<--new> options were given then C<run> is done automatically, simply "
17250 "because guestfish can't perform the action you asked for without doing this."
17254 #: ../fish/guestfish.pod:402
17255 msgid "OPENING DISKS FOR READ AND WRITE"
17259 #: ../fish/guestfish.pod:404
17261 "The guestfish (and L<guestmount(1)>) options I<--ro> and I<--rw> affect "
17262 "whether the other command line options I<-a>, I<-c>, I<-d>, I<-i> and I<-m> "
17263 "open disk images read-only or for writing."
17267 #: ../fish/guestfish.pod:408
17269 "In libguestfs E<lt> 1.6.2, guestfish and guestmount defaulted to opening "
17270 "disk images supplied on the command line for write. To open a disk image "
17271 "read-only you have to do I<-a image --ro>."
17275 #: ../fish/guestfish.pod:412
17277 "This matters: If you accidentally open a live VM disk image writable then "
17278 "you will cause irreversible disk corruption."
17282 #: ../fish/guestfish.pod:415
17284 "By libguestfs 1.8 we intend to change the default the other way. Disk "
17285 "images will be opened read-only. You will have to either specify "
17286 "I<guestfish --rw> or change a configuration file in order to get write "
17287 "access for disk images specified by those other command line options."
17291 #: ../fish/guestfish.pod:420
17293 "This version of guestfish has a I<--rw> option which does nothing (it is "
17294 "already the default). However it is highly recommended that you use this "
17295 "option to indicate that guestfish needs write access, and to prepare your "
17296 "scripts for the day when this option will be required for write access."
17300 #: ../fish/guestfish.pod:426
17302 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
17303 "other libguestfs program apart from guestfish and guestmount."
17307 #: ../fish/guestfish.pod:429
17312 #: ../fish/guestfish.pod:431
17314 "You can quote ordinary parameters using either single or double quotes. For "
17319 #: ../fish/guestfish.pod:434
17322 " add \"file with a space.img\"\n"
17327 #: ../fish/guestfish.pod:436
17330 " rm '/file name'\n"
17335 #: ../fish/guestfish.pod:438
17343 #: ../fish/guestfish.pod:440
17345 "A few commands require a list of strings to be passed. For these, use a "
17346 "whitespace-separated list, enclosed in quotes. Strings containing "
17347 "whitespace to be passed through must be enclosed in single quotes. A "
17348 "literal single quote must be escaped with a backslash."
17352 #: ../fish/guestfish.pod:445
17355 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
17356 " command \"/bin/echo 'foo bar'\"\n"
17357 " command \"/bin/echo \\'foo\\'\"\n"
17362 #: ../fish/guestfish.pod:449
17363 msgid "OPTIONAL ARGUMENTS"
17367 #: ../fish/guestfish.pod:451
17369 "Some commands take optional arguments. These arguments appear in this "
17370 "documentation as C<[argname:..]>. You can use them as in these examples:"
17374 #: ../fish/guestfish.pod:455
17377 " add-drive-opts filename\n"
17382 #: ../fish/guestfish.pod:457
17385 " add-drive-opts filename readonly:true\n"
17390 #: ../fish/guestfish.pod:459
17393 " add-drive-opts filename format:qcow2 readonly:false\n"
17398 #: ../fish/guestfish.pod:461
17400 "Each optional argument can appear at most once. All optional arguments must "
17401 "appear after the required ones."
17405 #: ../fish/guestfish.pod:464
17410 #: ../fish/guestfish.pod:466
17411 msgid "This section applies to all commands which can take integers as parameters."
17415 #: ../fish/guestfish.pod:469
17416 msgid "SIZE SUFFIX"
17420 #: ../fish/guestfish.pod:471
17422 "When the command takes a parameter measured in bytes, you can use one of the "
17423 "following suffixes to specify kilobytes, megabytes and larger sizes:"
17427 #: ../fish/guestfish.pod:477
17428 msgid "B<k> or B<K> or B<KiB>"
17432 #: ../fish/guestfish.pod:479
17433 msgid "The size in kilobytes (multiplied by 1024)."
17437 #: ../fish/guestfish.pod:481
17442 #: ../fish/guestfish.pod:483
17443 msgid "The size in SI 1000 byte units."
17447 #: ../fish/guestfish.pod:485
17448 msgid "B<M> or B<MiB>"
17452 #: ../fish/guestfish.pod:487
17453 msgid "The size in megabytes (multiplied by 1048576)."
17457 #: ../fish/guestfish.pod:489
17462 #: ../fish/guestfish.pod:491
17463 msgid "The size in SI 1000000 byte units."
17467 #: ../fish/guestfish.pod:493
17468 msgid "B<G> or B<GiB>"
17472 #: ../fish/guestfish.pod:495
17473 msgid "The size in gigabytes (multiplied by 2**30)."
17477 #: ../fish/guestfish.pod:497
17482 #: ../fish/guestfish.pod:499
17483 msgid "The size in SI 10**9 byte units."
17487 #: ../fish/guestfish.pod:501
17488 msgid "B<T> or B<TiB>"
17492 #: ../fish/guestfish.pod:503
17493 msgid "The size in terabytes (multiplied by 2**40)."
17497 #: ../fish/guestfish.pod:505
17502 #: ../fish/guestfish.pod:507
17503 msgid "The size in SI 10**12 byte units."
17507 #: ../fish/guestfish.pod:509
17508 msgid "B<P> or B<PiB>"
17512 #: ../fish/guestfish.pod:511
17513 msgid "The size in petabytes (multiplied by 2**50)."
17517 #: ../fish/guestfish.pod:513
17522 #: ../fish/guestfish.pod:515
17523 msgid "The size in SI 10**15 byte units."
17527 #: ../fish/guestfish.pod:517
17528 msgid "B<E> or B<EiB>"
17532 #: ../fish/guestfish.pod:519
17533 msgid "The size in exabytes (multiplied by 2**60)."
17537 #: ../fish/guestfish.pod:521
17542 #: ../fish/guestfish.pod:523
17543 msgid "The size in SI 10**18 byte units."
17547 #: ../fish/guestfish.pod:525
17548 msgid "B<Z> or B<ZiB>"
17552 #: ../fish/guestfish.pod:527
17553 msgid "The size in zettabytes (multiplied by 2**70)."
17557 #: ../fish/guestfish.pod:529
17562 #: ../fish/guestfish.pod:531
17563 msgid "The size in SI 10**21 byte units."
17567 #: ../fish/guestfish.pod:533
17568 msgid "B<Y> or B<YiB>"
17572 #: ../fish/guestfish.pod:535
17573 msgid "The size in yottabytes (multiplied by 2**80)."
17577 #: ../fish/guestfish.pod:537
17582 #: ../fish/guestfish.pod:539
17583 msgid "The size in SI 10**24 byte units."
17587 #: ../fish/guestfish.pod:545
17590 " truncate-size /file 1G\n"
17595 #: ../fish/guestfish.pod:547
17596 msgid "would truncate the file to 1 gigabyte."
17600 #: ../fish/guestfish.pod:549
17602 "Be careful because a few commands take sizes in kilobytes or megabytes "
17603 "(eg. the parameter to L</memsize> is specified in megabytes already). "
17604 "Adding a suffix will probably not do what you expect."
17608 #: ../fish/guestfish.pod:553
17609 msgid "OCTAL AND HEXADECIMAL NUMBERS"
17613 #: ../fish/guestfish.pod:555
17615 "For specifying the radix (base) use the C convention: C<0> to prefix an "
17616 "octal number or C<0x> to prefix a hexadecimal number. For example:"
17620 #: ../fish/guestfish.pod:558
17623 " 1234 decimal number 1234\n"
17624 " 02322 octal number, equivalent to decimal 1234\n"
17625 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
17630 #: ../fish/guestfish.pod:562
17632 "When using the C<chmod> command, you almost always want to specify an octal "
17633 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
17634 "L<chmod(1)> program):"
17638 #: ../fish/guestfish.pod:566
17641 " chmod 0777 /public # OK\n"
17642 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
17647 #: ../fish/guestfish.pod:569
17649 "Commands that return numbers usually print them in decimal, but some "
17650 "commands print numbers in other radices (eg. C<umask> prints the mode in "
17651 "octal, preceeded by C<0>)."
17655 #: ../fish/guestfish.pod:573
17656 msgid "WILDCARDS AND GLOBBING"
17660 #: ../fish/guestfish.pod:575
17662 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
17663 "(globbing) by default. So for example the following will not do what you "
17668 #: ../fish/guestfish.pod:579
17676 #: ../fish/guestfish.pod:581
17678 "Assuming you don't have a directory called literally C</home/*> then the "
17679 "above command will return an error."
17683 #: ../fish/guestfish.pod:584
17684 msgid "To perform wildcard expansion, use the C<glob> command."
17688 #: ../fish/guestfish.pod:586
17691 " glob rm-rf /home/*\n"
17696 #: ../fish/guestfish.pod:588
17698 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
17699 "many times), equivalent to:"
17703 #: ../fish/guestfish.pod:591
17706 " rm-rf /home/jim\n"
17707 " rm-rf /home/joe\n"
17708 " rm-rf /home/mary\n"
17713 #: ../fish/guestfish.pod:595
17714 msgid "C<glob> only works on simple guest paths and not on device names."
17718 #: ../fish/guestfish.pod:597
17720 "If you have several parameters, each containing a wildcard, then glob will "
17721 "perform a Cartesian product."
17725 #: ../fish/guestfish.pod:600
17730 #: ../fish/guestfish.pod:602
17732 "Any line which starts with a I<#> character is treated as a comment and "
17733 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
17734 "a command. For example:"
17738 #: ../fish/guestfish.pod:606
17741 " # this is a comment\n"
17742 " # this is a comment\n"
17743 " foo # NOT a comment\n"
17748 #: ../fish/guestfish.pod:610
17749 msgid "Blank lines are also ignored."
17753 #: ../fish/guestfish.pod:612
17754 msgid "RUNNING COMMANDS LOCALLY"
17758 #: ../fish/guestfish.pod:614
17760 "Any line which starts with a I<!> character is treated as a command sent to "
17761 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
17765 #: ../fish/guestfish.pod:618
17769 " tgz-out /remote local/remote-data.tar.gz\n"
17774 #: ../fish/guestfish.pod:621
17776 "will create a directory C<local> on the host, and then export the contents "
17777 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
17778 "(See C<tgz-out>)."
17782 #: ../fish/guestfish.pod:625
17784 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
17785 "effect, due to the way that subprocesses work in Unix."
17789 #: ../fish/guestfish.pod:628
17794 #: ../fish/guestfish.pod:630
17796 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
17797 "command (a guestfish command) to the second command (any host command). For "
17802 #: ../fish/guestfish.pod:634
17805 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
17810 #: ../fish/guestfish.pod:636
17812 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
17813 "program). The above command would list all accounts in the guest filesystem "
17814 "which have UID 0, ie. root accounts including backdoors. Other examples:"
17818 #: ../fish/guestfish.pod:641
17821 " hexdump /bin/ls | head\n"
17822 " list-devices | tail -1\n"
17823 " tgz-out / - | tar ztf -\n"
17828 #: ../fish/guestfish.pod:645
17830 "The space before the pipe symbol is required, any space after the pipe "
17831 "symbol is optional. Everything after the pipe symbol is just passed "
17832 "straight to the host shell, so it can contain redirections, globs and "
17833 "anything else that makes sense on the host side."
17837 #: ../fish/guestfish.pod:650
17839 "To use a literal argument which begins with a pipe symbol, you have to quote "
17844 #: ../fish/guestfish.pod:653
17852 #: ../fish/guestfish.pod:655
17853 msgid "HOME DIRECTORIES"
17857 #: ../fish/guestfish.pod:657
17859 "If a parameter starts with the character C<~> then the tilde may be expanded "
17860 "as a home directory path (either C<~> for the current user's home directory, "
17861 "or C<~user> for another user)."
17865 #: ../fish/guestfish.pod:661
17867 "Note that home directory expansion happens for users known I<on the host>, "
17868 "not in the guest filesystem."
17872 #: ../fish/guestfish.pod:664
17874 "To use a literal argument which begins with a tilde, you have to quote it, "
17879 #: ../fish/guestfish.pod:667
17887 #: ../fish/guestfish.pod:671
17889 "Libguestfs has some support for Linux guests encrypted according to the "
17890 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
17891 "disk encryption systems used by modern Linux guests. Currently only "
17892 "LVM-on-LUKS is supported."
17896 #: ../fish/guestfish.pod:676
17897 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
17901 #: ../fish/guestfish.pod:678
17904 " ><fs> vfs-type /dev/sda2\n"
17910 #: ../fish/guestfish.pod:681
17912 "Then open those devices using L</luks-open>. This creates a device-mapper "
17913 "device called C</dev/mapper/luksdev>."
17917 #: ../fish/guestfish.pod:684
17920 " ><fs> luks-open /dev/sda2 luksdev\n"
17921 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
17926 #: ../fish/guestfish.pod:687
17928 "Finally you have to tell LVM to scan for volume groups on the newly created "
17933 #: ../fish/guestfish.pod:690
17937 " vg-activate-all true\n"
17942 #: ../fish/guestfish.pod:693
17943 msgid "The logical volume(s) can now be mounted in the usual way."
17947 #: ../fish/guestfish.pod:695
17949 "Before closing a LUKS device you must unmount any logical volumes on it and "
17950 "deactivate the volume groups by calling C<vg-activate false VG> on each "
17951 "one. Then you can close the mapper device:"
17955 #: ../fish/guestfish.pod:699
17958 " vg-activate false /dev/VG\n"
17959 " luks-close /dev/mapper/luksdev\n"
17964 #: ../fish/guestfish.pod:702
17965 msgid "WINDOWS PATHS"
17969 #: ../fish/guestfish.pod:704
17971 "If a path is prefixed with C<win:> then you can use Windows-style paths "
17972 "(with some limitations). The following commands are equivalent:"
17976 #: ../fish/guestfish.pod:707
17979 " file /WINDOWS/system32/config/system.LOG\n"
17984 #: ../fish/guestfish.pod:709
17987 " file win:/windows/system32/config/system.log\n"
17992 #: ../fish/guestfish.pod:711
17995 " file win:\\windows\\system32\\config\\system.log\n"
18000 #: ../fish/guestfish.pod:713
18003 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
18008 #: ../fish/guestfish.pod:715
18010 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
18011 "handles case insensitivity like Windows would. This only works in argument "
18012 "positions that expect a path."
18016 #: ../fish/guestfish.pod:719
18017 msgid "UPLOADING AND DOWNLOADING FILES"
18021 #: ../fish/guestfish.pod:721
18023 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
18024 "others which upload from or download to a local file, you can use the "
18025 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
18029 #: ../fish/guestfish.pod:725
18037 #: ../fish/guestfish.pod:727
18038 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
18042 #: ../fish/guestfish.pod:730
18045 " tar-out /etc - | tar tf -\n"
18050 #: ../fish/guestfish.pod:732
18052 "writes the tarball to stdout and then pipes that into the external \"tar\" "
18053 "command (see L</PIPES>)."
18057 #: ../fish/guestfish.pod:735
18059 "When using C<-> to read from stdin, the input is read up to the end of "
18060 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
18061 "some arbitrary end marker:"
18065 #: ../fish/guestfish.pod:739
18068 " upload -<<END /foo\n"
18077 #: ../fish/guestfish.pod:745
18079 "Any string of characters can be used instead of C<END>. The end marker must "
18080 "appear on a line of its own, without any preceeding or following characters "
18081 "(not even spaces)."
18085 #: ../fish/guestfish.pod:749
18087 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
18088 "upload local files (so-called \"FileIn\" parameters in the generator)."
18092 #: ../fish/guestfish.pod:752
18093 msgid "EXIT ON ERROR BEHAVIOUR"
18097 #: ../fish/guestfish.pod:754
18099 "By default, guestfish will ignore any errors when in interactive mode "
18100 "(ie. taking commands from a human over a tty), and will exit on the first "
18101 "error in non-interactive mode (scripts, commands given on the command line)."
18105 #: ../fish/guestfish.pod:759
18107 "If you prefix a command with a I<-> character, then that command will not "
18108 "cause guestfish to exit, even if that (one) command returns an error."
18112 #: ../fish/guestfish.pod:763
18113 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
18117 #: ../fish/guestfish.pod:765
18119 "Guestfish can be remote-controlled over a socket. This is useful "
18120 "particularly in shell scripts where you want to make several different "
18121 "changes to a filesystem, but you don't want the overhead of starting up a "
18122 "guestfish process each time."
18126 #: ../fish/guestfish.pod:770
18127 msgid "Start a guestfish server process using:"
18131 #: ../fish/guestfish.pod:772
18134 " eval \"`guestfish --listen`\"\n"
18139 #: ../fish/guestfish.pod:774
18140 msgid "and then send it commands by doing:"
18144 #: ../fish/guestfish.pod:776
18147 " guestfish --remote cmd [...]\n"
18152 #: ../fish/guestfish.pod:778
18153 msgid "To cause the server to exit, send it the exit command:"
18157 #: ../fish/guestfish.pod:780
18160 " guestfish --remote exit\n"
18165 #: ../fish/guestfish.pod:782
18167 "Note that the server will normally exit if there is an error in a command. "
18168 "You can change this in the usual way. See section L</EXIT ON ERROR "
18173 #: ../fish/guestfish.pod:786
18174 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
18178 #: ../fish/guestfish.pod:788
18180 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
18181 "is how the I<--remote> option knows where to send the commands. You can "
18182 "have several guestfish listener processes running using:"
18186 #: ../fish/guestfish.pod:792
18189 " eval \"`guestfish --listen`\"\n"
18190 " pid1=$GUESTFISH_PID\n"
18191 " eval \"`guestfish --listen`\"\n"
18192 " pid2=$GUESTFISH_PID\n"
18194 " guestfish --remote=$pid1 cmd\n"
18195 " guestfish --remote=$pid2 cmd\n"
18200 #: ../fish/guestfish.pod:800
18201 msgid "REMOTE CONTROL AND CSH"
18205 #: ../fish/guestfish.pod:802
18207 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
18212 #: ../fish/guestfish.pod:805
18215 " eval \"`guestfish --listen --csh`\"\n"
18220 #: ../fish/guestfish.pod:807
18221 msgid "REMOTE CONTROL DETAILS"
18225 #: ../fish/guestfish.pod:809
18227 "Remote control happens over a Unix domain socket called "
18228 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
18229 "of the process, and C<$PID> is the process ID of the server."
18233 #: ../fish/guestfish.pod:813
18234 msgid "Guestfish client and server versions must match exactly."
18238 #: ../fish/guestfish.pod:815
18239 msgid "PREPARED DISK IMAGES"
18243 #: ../fish/guestfish.pod:817
18245 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
18246 "preformatted disk images that guestfish can make for you to save typing. "
18247 "This is particularly useful for testing purposes. This option is used "
18248 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
18249 "can be mixed with I<-a>)."
18253 #: ../fish/guestfish.pod:823
18255 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
18256 "the second and so on. Existing files in the current directory are "
18261 #: ../fish/guestfish.pod:827
18263 "The type briefly describes how the disk should be sized, partitioned, how "
18264 "filesystem(s) should be created, and how content should be added. "
18265 "Optionally the type can be followed by extra parameters, separated by C<:> "
18266 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
18267 "sparsely-allocated disk, containing a single partition, with the partition "
18268 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
18269 "on a 1GB disk instead."
18273 #: ../fish/guestfish.pod:835
18274 msgid "To list the available types and any extra parameters they take, run:"
18278 #: ../fish/guestfish.pod:839
18280 "Note that the prepared filesystem is not mounted. You would usually have to "
18281 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
18285 #: ../fish/guestfish.pod:843
18287 "If any I<-N> or I<--new> options are given, the guest is automatically "
18292 #: ../fish/guestfish.pod:848
18293 msgid "Create a 100MB disk with an ext4-formatted partition:"
18297 #: ../fish/guestfish.pod:850
18300 " guestfish -N fs:ext4\n"
18305 #: ../fish/guestfish.pod:852
18306 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
18310 #: ../fish/guestfish.pod:854
18313 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
18318 #: ../fish/guestfish.pod:856
18319 msgid "Create a blank 200MB disk:"
18323 #: ../fish/guestfish.pod:858
18326 " guestfish -N disk:200M\n"
18331 #: ../fish/guestfish.pod:860
18332 msgid "PROGRESS BARS"
18336 #: ../fish/guestfish.pod:862
18338 "Some (not all) long-running commands send progress notification messages as "
18339 "they are running. Guestfish turns these messages into progress bars."
18343 #: ../fish/guestfish.pod:866
18345 "When a command that supports progress bars takes longer than two seconds to "
18346 "run, and if progress bars are enabled, then you will see one appearing below "
18351 #: ../fish/guestfish.pod:870
18354 " ><fs> copy-size /large-file /another-file 2048M\n"
18355 " / 10% [#####-----------------------------------------] 00:30\n"
18360 #: ../fish/guestfish.pod:873
18362 "The spinner on the left hand side moves round once for every progress "
18363 "notification received from the backend. This is a (reasonably) golden "
18364 "assurance that the command is \"doing something\" even if the progress bar "
18365 "is not moving, because the command is able to send the progress "
18366 "notifications. When the bar reaches 100% and the command finishes, the "
18367 "spinner disappears."
18371 #: ../fish/guestfish.pod:880
18373 "Progress bars are enabled by default when guestfish is used interactively. "
18374 "You can enable them even for non-interactive modes using I<--progress-bars>, "
18375 "and you can disable them completely using I<--no-progress-bars>."
18379 #: ../fish/guestfish.pod:885
18380 msgid "GUESTFISH COMMANDS"
18384 #: ../fish/guestfish.pod:887
18386 "The commands in this section are guestfish convenience commands, in other "
18387 "words, they are not part of the L<guestfs(3)> API."
18391 #: ../fish/guestfish.pod:890
18396 #: ../fish/guestfish.pod:892
18405 #: ../fish/guestfish.pod:895
18406 msgid "Without any parameter, this provides general help."
18410 #: ../fish/guestfish.pod:897
18411 msgid "With a C<cmd> parameter, this displays detailed help for that command."
18415 #: ../fish/guestfish.pod:899
18416 msgid "quit | exit"
18420 #: ../fish/guestfish.pod:901
18421 msgid "This exits guestfish. You can also use C<^D> key."
18425 #: ../fish/guestfish.pod:903
18426 msgid "@FISH_COMMANDS@"
18430 #: ../fish/guestfish.pod:905
18435 #: ../fish/guestfish.pod:909 ../test-tool/libguestfs-test-tool.pod:83
18440 #: ../fish/guestfish.pod:911
18442 "guestfish returns 0 if the commands completed without error, or 1 if there "
18447 #: ../fish/guestfish.pod:918
18452 #: ../fish/guestfish.pod:920
18454 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
18459 #: ../fish/guestfish.pod:923
18460 msgid "GUESTFISH_PID"
18464 #: ../fish/guestfish.pod:925
18466 "Used with the I<--remote> option to specify the remote guestfish process to "
18467 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
18471 #: ../fish/guestfish.pod:929
18476 #: ../fish/guestfish.pod:931
18478 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
18479 "not specified, the external L<hexedit(1)> program is used."
18483 #: ../fish/guestfish.pod:935
18488 #: ../fish/guestfish.pod:937
18490 "If compiled with GNU readline support, various files in the home directory "
18491 "can be used. See L</FILES>."
18495 #: ../fish/guestfish.pod:946
18497 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
18498 "effect as using the B<-v> option."
18502 #: ../fish/guestfish.pod:958
18504 "Set the path that guestfish uses to search for kernel and initrd.img. See "
18505 "the discussion of paths in L<guestfs(3)>."
18509 #: ../fish/guestfish.pod:969
18510 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
18514 #: ../fish/guestfish.pod:971
18519 #: ../fish/guestfish.pod:973
18521 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
18526 #: ../fish/guestfish.pod:988 ../test-tool/libguestfs-test-tool.pod:88
18531 #: ../fish/guestfish.pod:992
18532 msgid "$HOME/.guestfish"
18536 #: ../fish/guestfish.pod:994
18538 "If compiled with GNU readline support, then the command history is saved in "
18543 #: ../fish/guestfish.pod:997
18544 msgid "$HOME/.inputrc"
18548 #: ../fish/guestfish.pod:999
18549 msgid "/etc/inputrc"
18553 #: ../fish/guestfish.pod:1001
18555 "If compiled with GNU readline support, then these files can be used to "
18556 "configure readline. For further information, please see "
18557 "L<readline(3)/INITIALIZATION FILE>."
18561 #: ../fish/guestfish.pod:1005
18562 msgid "To write rules which only apply to guestfish, use:"
18566 #: ../fish/guestfish.pod:1007
18576 #: ../fish/guestfish.pod:1011
18578 "Variables that you can set in inputrc that change the behaviour of guestfish "
18579 "in useful ways include:"
18583 #: ../fish/guestfish.pod:1016
18584 msgid "completion-ignore-case (default: on)"
18588 #: ../fish/guestfish.pod:1018
18590 "By default, guestfish will ignore case when tab-completing paths on the "
18595 #: ../fish/guestfish.pod:1021
18598 " set completion-ignore-case off\n"
18603 #: ../fish/guestfish.pod:1023
18604 msgid "to make guestfish case sensitive."
18608 #: ../fish/guestfish.pod:1027
18613 #: ../fish/guestfish.pod:1029
18614 msgid "test2.img (etc)"
18618 #: ../fish/guestfish.pod:1031
18620 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
18621 "will be created in the file C<test1.img> in the current directory. The "
18622 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
18623 "the same name will be overwritten."
18627 #: ../fish/guestfish.pod:1040
18629 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
18630 "L<virt-edit(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, "
18631 "L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
18632 "L<virt-tar(1)>, L<virt-win-reg(1)>, L<hexedit(1)>."
18636 #: ../fish/guestfish.pod:1064 ../test-tool/libguestfs-test-tool.pod:124 ../fuse/guestmount.pod:253 ../inspector/virt-inspector.pl:480 ../tools/virt-edit.pl:370 ../tools/virt-win-reg.pl:518 ../tools/virt-df.pl:657 ../tools/virt-ls.pl:251 ../tools/virt-resize.pl:1516 ../tools/virt-list-filesystems.pl:206 ../tools/virt-tar.pl:300 ../tools/virt-rescue.pl:285 ../tools/virt-make-fs.pl:567 ../tools/virt-list-partitions.pl:273
18638 "This program is free software; you can redistribute it and/or modify it "
18639 "under the terms of the GNU General Public License as published by the Free "
18640 "Software Foundation; either version 2 of the License, or (at your option) "
18641 "any later version."
18645 #: ../fish/guestfish.pod:1069 ../test-tool/libguestfs-test-tool.pod:129 ../fuse/guestmount.pod:258 ../inspector/virt-inspector.pl:485 ../tools/virt-edit.pl:375 ../tools/virt-win-reg.pl:523 ../tools/virt-df.pl:662 ../tools/virt-ls.pl:256 ../tools/virt-resize.pl:1521 ../tools/virt-list-filesystems.pl:211 ../tools/virt-tar.pl:305 ../tools/virt-rescue.pl:290 ../tools/virt-make-fs.pl:572 ../tools/virt-list-partitions.pl:278
18647 "This program is distributed in the hope that it will be useful, but WITHOUT "
18648 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
18649 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
18654 #: ../fish/guestfish.pod:1074 ../test-tool/libguestfs-test-tool.pod:134 ../fuse/guestmount.pod:263 ../inspector/virt-inspector.pl:490 ../tools/virt-edit.pl:380 ../tools/virt-win-reg.pl:528 ../tools/virt-df.pl:667 ../tools/virt-ls.pl:261 ../tools/virt-resize.pl:1526 ../tools/virt-list-filesystems.pl:216 ../tools/virt-tar.pl:310 ../tools/virt-rescue.pl:295 ../tools/virt-make-fs.pl:577 ../tools/virt-list-partitions.pl:283
18656 "You should have received a copy of the GNU General Public License along with "
18657 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
18658 "Ave, Cambridge, MA 02139, USA."
18662 #: ../fish/guestfish-actions.pod:1
18667 #: ../fish/guestfish-actions.pod:3
18670 " add-cdrom filename\n"
18675 #: ../fish/guestfish-actions.pod:15
18677 "This call checks for the existence of C<filename>. This stops you from "
18678 "specifying other types of drive which are supported by qemu such as C<nbd:> "
18679 "and C<http:> URLs. To specify those, use the general L</config> call "
18684 #: ../fish/guestfish-actions.pod:22
18686 "If you just want to add an ISO file (often you use this as an efficient way "
18687 "to transfer large files into the guest), then you should probably use "
18688 "L</add-drive-ro> instead."
18692 #: ../fish/guestfish-actions.pod:35
18697 #: ../fish/guestfish-actions.pod:37
18702 #: ../fish/guestfish-actions.pod:39
18705 " add-domain dom [libvirturi:..] [readonly:..] [iface:..]\n"
18710 #: ../fish/guestfish-actions.pod:41
18712 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
18713 "It works by connecting to libvirt, requesting the domain and domain XML from "
18714 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
18718 #: ../fish/guestfish-actions.pod:58
18720 "The optional C<libvirturi> parameter sets the libvirt URI (see "
18721 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
18722 "default libvirt URI (or one set through an environment variable, see the "
18723 "libvirt documentation for full details). If you are using the C API "
18724 "directly then it is more flexible to create the libvirt connection object "
18725 "yourself, get the domain object, and call L</add-libvirt-dom>."
18729 #: ../fish/guestfish-actions.pod:66
18731 "The other optional parameters are passed directly through to "
18732 "L</add-drive-opts>."
18736 #: ../fish/guestfish-actions.pod:69 ../fish/guestfish-actions.pod:133
18738 "This command has one or more optional arguments. See L</OPTIONAL "
18743 #: ../fish/guestfish-actions.pod:71
18748 #: ../fish/guestfish-actions.pod:73
18751 " add-drive filename\n"
18756 #: ../fish/guestfish-actions.pod:75
18758 "This function is the equivalent of calling L</add-drive-opts> with no "
18759 "optional parameters, so the disk is added writable, with the format being "
18760 "detected automatically."
18764 #: ../fish/guestfish-actions.pod:79
18766 "Automatic detection of the format opens you up to a potential security hole "
18767 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
18768 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
18769 "you should think about replacing calls to this function with calls to "
18770 "L</add-drive-opts>, and specifying the format."
18774 #: ../fish/guestfish-actions.pod:86
18775 msgid "add-drive-opts"
18779 #: ../fish/guestfish-actions.pod:88
18784 #: ../fish/guestfish-actions.pod:90
18787 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
18792 #: ../fish/guestfish-actions.pod:117
18794 "This forces the image format. If you omit this (or use L</add-drive> or "
18795 "L</add-drive-ro>) then the format is automatically detected. Possible "
18796 "formats include C<raw> and C<qcow2>."
18800 #: ../fish/guestfish-actions.pod:128
18802 "This rarely-used option lets you emulate the behaviour of the deprecated "
18803 "L</add-drive-with-if> call (q.v.)"
18807 #: ../fish/guestfish-actions.pod:135
18808 msgid "add-drive-ro"
18812 #: ../fish/guestfish-actions.pod:137
18817 #: ../fish/guestfish-actions.pod:139
18820 " add-drive-ro filename\n"
18825 #: ../fish/guestfish-actions.pod:141
18827 "This function is the equivalent of calling L</add-drive-opts> with the "
18828 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
18829 "is added read-only, with the format being detected automatically."
18833 #: ../fish/guestfish-actions.pod:146
18834 msgid "add-drive-ro-with-if"
18838 #: ../fish/guestfish-actions.pod:148
18841 " add-drive-ro-with-if filename iface\n"
18846 #: ../fish/guestfish-actions.pod:150
18848 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
18849 "interface emulation to use at run time."
18853 #: ../fish/guestfish-actions.pod:160
18854 msgid "add-drive-with-if"
18858 #: ../fish/guestfish-actions.pod:162
18861 " add-drive-with-if filename iface\n"
18866 #: ../fish/guestfish-actions.pod:164
18868 "This is the same as L</add-drive> but it allows you to specify the QEMU "
18869 "interface emulation to use at run time."
18873 #: ../fish/guestfish-actions.pod:174
18878 #: ../fish/guestfish-actions.pod:176
18881 " aug-clear augpath\n"
18886 #: ../fish/guestfish-actions.pod:181
18891 #: ../fish/guestfish-actions.pod:183
18899 #: ../fish/guestfish-actions.pod:185
18901 "Close the current Augeas handle and free up any resources used by it. After "
18902 "calling this, you have to call L</aug-init> again before you can use any "
18903 "other Augeas functions."
18907 #: ../fish/guestfish-actions.pod:190
18908 msgid "aug-defnode"
18912 #: ../fish/guestfish-actions.pod:192
18915 " aug-defnode name expr val\n"
18920 #: ../fish/guestfish-actions.pod:197
18922 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
18923 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
18924 "containing that single node."
18928 #: ../fish/guestfish-actions.pod:205
18933 #: ../fish/guestfish-actions.pod:207
18936 " aug-defvar name expr\n"
18941 #: ../fish/guestfish-actions.pod:216
18946 #: ../fish/guestfish-actions.pod:218
18949 " aug-get augpath\n"
18954 #: ../fish/guestfish-actions.pod:223
18959 #: ../fish/guestfish-actions.pod:225
18962 " aug-init root flags\n"
18967 #: ../fish/guestfish-actions.pod:231
18968 msgid "You must call this before using any other L</aug-*> commands."
18972 #: ../fish/guestfish-actions.pod:266
18973 msgid "Do not load the tree in L</aug-init>."
18977 #: ../fish/guestfish-actions.pod:270
18978 msgid "To close the handle, you can call L</aug-close>."
18982 #: ../fish/guestfish-actions.pod:274
18987 #: ../fish/guestfish-actions.pod:276
18990 " aug-insert augpath label true|false\n"
18995 #: ../fish/guestfish-actions.pod:286
19000 #: ../fish/guestfish-actions.pod:288
19008 #: ../fish/guestfish-actions.pod:295
19013 #: ../fish/guestfish-actions.pod:297
19016 " aug-ls augpath\n"
19021 #: ../fish/guestfish-actions.pod:299
19023 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
19024 "resulting nodes into alphabetical order."
19028 #: ../fish/guestfish-actions.pod:302
19033 #: ../fish/guestfish-actions.pod:304
19036 " aug-match augpath\n"
19041 #: ../fish/guestfish-actions.pod:310
19046 #: ../fish/guestfish-actions.pod:312
19049 " aug-mv src dest\n"
19054 #: ../fish/guestfish-actions.pod:317
19059 #: ../fish/guestfish-actions.pod:319
19062 " aug-rm augpath\n"
19067 #: ../fish/guestfish-actions.pod:325
19072 #: ../fish/guestfish-actions.pod:327
19080 #: ../fish/guestfish-actions.pod:331
19082 "The flags which were passed to L</aug-init> affect exactly how files are "
19087 #: ../fish/guestfish-actions.pod:334
19092 #: ../fish/guestfish-actions.pod:336
19095 " aug-set augpath val\n"
19100 #: ../fish/guestfish-actions.pod:340
19102 "In the Augeas API, it is possible to clear a node by setting the value to "
19103 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
19104 "this call. Instead you must use the L</aug-clear> call."
19108 #: ../fish/guestfish-actions.pod:345
19113 #: ../fish/guestfish-actions.pod:347
19116 " available 'groups ...'\n"
19121 #: ../fish/guestfish-actions.pod:353
19123 "The libguestfs groups, and the functions that those groups correspond to, "
19124 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
19125 "runtime by calling L</available-all-groups>."
19129 #: ../fish/guestfish-actions.pod:377
19130 msgid "You must call L</launch> before calling this function."
19134 #: ../fish/guestfish-actions.pod:399
19136 "This call was added in version C<1.0.80>. In previous versions of "
19137 "libguestfs all you could do would be to speculatively execute a command to "
19138 "find out if the daemon implemented it. See also L</version>."
19142 #: ../fish/guestfish-actions.pod:406
19143 msgid "available-all-groups"
19147 #: ../fish/guestfish-actions.pod:408
19150 " available-all-groups\n"
19155 #: ../fish/guestfish-actions.pod:410
19157 "This command returns a list of all optional groups that this daemon knows "
19158 "about. Note this returns both supported and unsupported groups. To find "
19159 "out which ones the daemon can actually support you have to call "
19160 "L</available> on each member of the returned list."
19164 #: ../fish/guestfish-actions.pod:416
19165 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
19169 #: ../fish/guestfish-actions.pod:418
19174 #: ../fish/guestfish-actions.pod:420
19177 " base64-in (base64file|-) filename\n"
19182 #: ../fish/guestfish-actions.pod:425 ../fish/guestfish-actions.pod:434 ../fish/guestfish-actions.pod:658 ../fish/guestfish-actions.pod:827 ../fish/guestfish-actions.pod:846 ../fish/guestfish-actions.pod:1223 ../fish/guestfish-actions.pod:4113 ../fish/guestfish-actions.pod:4125 ../fish/guestfish-actions.pod:4136 ../fish/guestfish-actions.pod:4147 ../fish/guestfish-actions.pod:4199 ../fish/guestfish-actions.pod:4208 ../fish/guestfish-actions.pod:4262 ../fish/guestfish-actions.pod:4285
19183 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
19187 #: ../fish/guestfish-actions.pod:427
19192 #: ../fish/guestfish-actions.pod:429
19195 " base64-out filename (base64file|-)\n"
19200 #: ../fish/guestfish-actions.pod:436
19201 msgid "blockdev-flushbufs"
19205 #: ../fish/guestfish-actions.pod:438
19208 " blockdev-flushbufs device\n"
19213 #: ../fish/guestfish-actions.pod:445
19214 msgid "blockdev-getbsz"
19218 #: ../fish/guestfish-actions.pod:447
19221 " blockdev-getbsz device\n"
19226 #: ../fish/guestfish-actions.pod:456
19227 msgid "blockdev-getro"
19231 #: ../fish/guestfish-actions.pod:458
19234 " blockdev-getro device\n"
19239 #: ../fish/guestfish-actions.pod:465
19240 msgid "blockdev-getsize64"
19244 #: ../fish/guestfish-actions.pod:467
19247 " blockdev-getsize64 device\n"
19252 #: ../fish/guestfish-actions.pod:471
19253 msgid "See also L</blockdev-getsz>."
19257 #: ../fish/guestfish-actions.pod:475
19258 msgid "blockdev-getss"
19262 #: ../fish/guestfish-actions.pod:477
19265 " blockdev-getss device\n"
19270 #: ../fish/guestfish-actions.pod:482
19271 msgid "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
19275 #: ../fish/guestfish-actions.pod:487
19276 msgid "blockdev-getsz"
19280 #: ../fish/guestfish-actions.pod:489
19283 " blockdev-getsz device\n"
19288 #: ../fish/guestfish-actions.pod:494
19290 "See also L</blockdev-getss> for the real sector size of the device, and "
19291 "L</blockdev-getsize64> for the more useful I<size in bytes>."
19295 #: ../fish/guestfish-actions.pod:500
19296 msgid "blockdev-rereadpt"
19300 #: ../fish/guestfish-actions.pod:502
19303 " blockdev-rereadpt device\n"
19308 #: ../fish/guestfish-actions.pod:508
19309 msgid "blockdev-setbsz"
19313 #: ../fish/guestfish-actions.pod:510
19316 " blockdev-setbsz device blocksize\n"
19321 #: ../fish/guestfish-actions.pod:519
19322 msgid "blockdev-setro"
19326 #: ../fish/guestfish-actions.pod:521
19329 " blockdev-setro device\n"
19334 #: ../fish/guestfish-actions.pod:527
19335 msgid "blockdev-setrw"
19339 #: ../fish/guestfish-actions.pod:529
19342 " blockdev-setrw device\n"
19347 #: ../fish/guestfish-actions.pod:535
19348 msgid "case-sensitive-path"
19352 #: ../fish/guestfish-actions.pod:537
19355 " case-sensitive-path path\n"
19360 #: ../fish/guestfish-actions.pod:561
19362 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return "
19363 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
19364 "how the directories were originally created under Windows)."
19368 #: ../fish/guestfish-actions.pod:569
19369 msgid "See also L</realpath>."
19373 #: ../fish/guestfish-actions.pod:571
19378 #: ../fish/guestfish-actions.pod:573
19386 #: ../fish/guestfish-actions.pod:577
19388 "Note that this function cannot correctly handle binary files (specifically, "
19389 "files containing C<\\0> character which is treated as end of string). For "
19390 "those you need to use the L</read-file> or L</download> functions which have "
19391 "a more complex interface."
19395 #: ../fish/guestfish-actions.pod:585
19400 #: ../fish/guestfish-actions.pod:587
19403 " checksum csumtype path\n"
19408 #: ../fish/guestfish-actions.pod:630
19409 msgid "To get the checksum for a device, use L</checksum-device>."
19413 #: ../fish/guestfish-actions.pod:632
19414 msgid "To get the checksums for many files, use L</checksums-out>."
19418 #: ../fish/guestfish-actions.pod:634
19419 msgid "checksum-device"
19423 #: ../fish/guestfish-actions.pod:636
19426 " checksum-device csumtype device\n"
19431 #: ../fish/guestfish-actions.pod:638
19433 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
19434 "device named C<device>. For the types of checksums supported see the "
19435 "L</checksum> command."
19439 #: ../fish/guestfish-actions.pod:642
19440 msgid "checksums-out"
19444 #: ../fish/guestfish-actions.pod:644
19447 " checksums-out csumtype directory (sumsfile|-)\n"
19452 #: ../fish/guestfish-actions.pod:660
19457 #: ../fish/guestfish-actions.pod:662
19460 " chmod mode path\n"
19465 #: ../fish/guestfish-actions.pod:673
19470 #: ../fish/guestfish-actions.pod:675
19473 " chown owner group path\n"
19478 #: ../fish/guestfish-actions.pod:683
19483 #: ../fish/guestfish-actions.pod:685
19486 " command 'arguments ...'\n"
19491 #: ../fish/guestfish-actions.pod:692
19493 "The single parameter is an argv-style list of arguments. The first element "
19494 "is the name of the program to run. Subsequent elements are parameters. The "
19495 "list must be non-empty (ie. must contain a program name). Note that the "
19496 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
19500 #: ../fish/guestfish-actions.pod:720
19501 msgid "command-lines"
19505 #: ../fish/guestfish-actions.pod:722
19508 " command-lines 'arguments ...'\n"
19513 #: ../fish/guestfish-actions.pod:724
19514 msgid "This is the same as L</command>, but splits the result into a list of lines."
19518 #: ../fish/guestfish-actions.pod:727
19519 msgid "See also: L</sh-lines>"
19523 #: ../fish/guestfish-actions.pod:732
19528 #: ../fish/guestfish-actions.pod:734
19531 " config qemuparam qemuvalue\n"
19536 #: ../fish/guestfish-actions.pod:745
19541 #: ../fish/guestfish-actions.pod:747
19544 " copy-size src dest size\n"
19549 #: ../fish/guestfish-actions.pod:755
19554 #: ../fish/guestfish-actions.pod:757
19562 #: ../fish/guestfish-actions.pod:762
19567 #: ../fish/guestfish-actions.pod:764
19575 #: ../fish/guestfish-actions.pod:769
19580 #: ../fish/guestfish-actions.pod:771
19588 #: ../fish/guestfish-actions.pod:778
19590 "If the destination is a device, it must be as large or larger than the "
19591 "source file or device, otherwise the copy will fail. This command cannot do "
19592 "partial copies (see L</copy-size>)."
19596 #: ../fish/guestfish-actions.pod:782
19601 #: ../fish/guestfish-actions.pod:784
19609 #: ../fish/guestfish-actions.pod:792
19614 #: ../fish/guestfish-actions.pod:794
19622 #: ../fish/guestfish-actions.pod:803
19627 #: ../fish/guestfish-actions.pod:805
19635 #: ../fish/guestfish-actions.pod:811
19637 "Another way to get the same information is to enable verbose messages with "
19638 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
19639 "before running the program."
19643 #: ../fish/guestfish-actions.pod:816
19648 #: ../fish/guestfish-actions.pod:818
19651 " download remotefilename (filename|-)\n"
19656 #: ../fish/guestfish-actions.pod:825
19657 msgid "See also L</upload>, L</cat>."
19661 #: ../fish/guestfish-actions.pod:829
19662 msgid "download-offset"
19666 #: ../fish/guestfish-actions.pod:831
19669 " download-offset remotefilename (filename|-) offset size\n"
19674 #: ../fish/guestfish-actions.pod:839
19676 "Note that there is no limit on the amount of data that can be downloaded "
19677 "with this call, unlike with L</pread>, and this call always reads the full "
19678 "amount unless an error occurs."
19682 #: ../fish/guestfish-actions.pod:844
19683 msgid "See also L</download>, L</pread>."
19687 #: ../fish/guestfish-actions.pod:848
19688 msgid "drop-caches"
19692 #: ../fish/guestfish-actions.pod:850
19695 " drop-caches whattodrop\n"
19700 #: ../fish/guestfish-actions.pod:862
19705 #: ../fish/guestfish-actions.pod:864
19713 #: ../fish/guestfish-actions.pod:876
19718 #: ../fish/guestfish-actions.pod:878
19721 " e2fsck-f device\n"
19726 #: ../fish/guestfish-actions.pod:884
19728 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
19729 "should use L</fsck>."
19733 #: ../fish/guestfish-actions.pod:887
19734 msgid "echo-daemon"
19738 #: ../fish/guestfish-actions.pod:889
19741 " echo-daemon 'words ...'\n"
19746 #: ../fish/guestfish-actions.pod:896
19747 msgid "See also L</ping-daemon>."
19751 #: ../fish/guestfish-actions.pod:898
19756 #: ../fish/guestfish-actions.pod:900
19759 " egrep regex path\n"
19764 #: ../fish/guestfish-actions.pod:908
19769 #: ../fish/guestfish-actions.pod:910
19772 " egrepi regex path\n"
19777 #: ../fish/guestfish-actions.pod:918
19782 #: ../fish/guestfish-actions.pod:920
19785 " equal file1 file2\n"
19790 #: ../fish/guestfish-actions.pod:927
19795 #: ../fish/guestfish-actions.pod:929
19803 #: ../fish/guestfish-actions.pod:934
19804 msgid "See also L</is-file>, L</is-dir>, L</stat>."
19808 #: ../fish/guestfish-actions.pod:936
19813 #: ../fish/guestfish-actions.pod:938
19816 " fallocate path len\n"
19821 #: ../fish/guestfish-actions.pod:955
19822 msgid "fallocate64"
19826 #: ../fish/guestfish-actions.pod:957
19829 " fallocate64 path len\n"
19834 #: ../fish/guestfish-actions.pod:963
19836 "Note that this call allocates disk blocks for the file. To create a sparse "
19837 "file use L</truncate-size> instead."
19841 #: ../fish/guestfish-actions.pod:966
19843 "The deprecated call L</fallocate> does the same, but owing to an oversight "
19844 "it only allowed 30 bit lengths to be specified, effectively limiting the "
19845 "maximum size of files created through that call to 1GB."
19849 #: ../fish/guestfish-actions.pod:975
19854 #: ../fish/guestfish-actions.pod:977
19857 " fgrep pattern path\n"
19862 #: ../fish/guestfish-actions.pod:985
19867 #: ../fish/guestfish-actions.pod:987
19870 " fgrepi pattern path\n"
19875 #: ../fish/guestfish-actions.pod:995
19880 #: ../fish/guestfish-actions.pod:997
19888 #: ../fish/guestfish-actions.pod:1009
19890 "This command can also be used on C</dev/> devices (and partitions, LV "
19891 "names). You can for example use this to determine if a device contains a "
19892 "filesystem, although it's usually better to use L</vfs-type>."
19896 #: ../fish/guestfish-actions.pod:1019
19897 msgid "file-architecture"
19901 #: ../fish/guestfish-actions.pod:1021
19904 " file-architecture filename\n"
19909 #: ../fish/guestfish-actions.pod:1124
19914 #: ../fish/guestfish-actions.pod:1126
19922 #: ../fish/guestfish-actions.pod:1130
19924 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, "
19925 "L</is-file> etc. To get the size of block devices, use "
19926 "L</blockdev-getsize64>."
19930 #: ../fish/guestfish-actions.pod:1134
19935 #: ../fish/guestfish-actions.pod:1136
19938 " fill c len path\n"
19943 #: ../fish/guestfish-actions.pod:1142
19945 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
19946 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
19947 "L</fill-pattern>."
19951 #: ../fish/guestfish-actions.pod:1147
19952 msgid "fill-pattern"
19956 #: ../fish/guestfish-actions.pod:1149
19959 " fill-pattern pattern len path\n"
19964 #: ../fish/guestfish-actions.pod:1151
19966 "This function is like L</fill> except that it creates a new file of length "
19967 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
19968 "is truncated if necessary to ensure the length of the file is exactly C<len> "
19973 #: ../fish/guestfish-actions.pod:1156
19978 #: ../fish/guestfish-actions.pod:1158
19981 " find directory\n"
19986 #: ../fish/guestfish-actions.pod:1172
19987 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
19991 #: ../fish/guestfish-actions.pod:1185
19992 msgid "See also L</find0>."
19996 #: ../fish/guestfish-actions.pod:1190
20001 #: ../fish/guestfish-actions.pod:1192
20004 " find0 directory (files|-)\n"
20009 #: ../fish/guestfish-actions.pod:1198
20010 msgid "This command works the same way as L</find> with the following exceptions:"
20014 #: ../fish/guestfish-actions.pod:1225
20015 msgid "findfs-label"
20019 #: ../fish/guestfish-actions.pod:1227
20022 " findfs-label label\n"
20027 #: ../fish/guestfish-actions.pod:1233
20028 msgid "To find the label of a filesystem, use L</vfs-label>."
20032 #: ../fish/guestfish-actions.pod:1235
20033 msgid "findfs-uuid"
20037 #: ../fish/guestfish-actions.pod:1237
20040 " findfs-uuid uuid\n"
20045 #: ../fish/guestfish-actions.pod:1243
20046 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
20050 #: ../fish/guestfish-actions.pod:1245
20055 #: ../fish/guestfish-actions.pod:1247
20058 " fsck fstype device\n"
20063 #: ../fish/guestfish-actions.pod:1277
20068 #: ../fish/guestfish-actions.pod:1279
20076 #: ../fish/guestfish-actions.pod:1286
20077 msgid "get-autosync"
20081 #: ../fish/guestfish-actions.pod:1288
20089 #: ../fish/guestfish-actions.pod:1292
20094 #: ../fish/guestfish-actions.pod:1294
20102 #: ../fish/guestfish-actions.pod:1298
20103 msgid "get-e2label"
20107 #: ../fish/guestfish-actions.pod:1300
20110 " get-e2label device\n"
20115 #: ../fish/guestfish-actions.pod:1312
20120 #: ../fish/guestfish-actions.pod:1314
20123 " get-e2uuid device\n"
20128 #: ../fish/guestfish-actions.pod:1326
20129 msgid "get-memsize"
20133 #: ../fish/guestfish-actions.pod:1328
20141 #: ../fish/guestfish-actions.pod:1333
20143 "If L</set-memsize> was not called on this handle, and if "
20144 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
20145 "value for memsize."
20149 #: ../fish/guestfish-actions.pod:1340
20150 msgid "get-network"
20154 #: ../fish/guestfish-actions.pod:1342
20162 #: ../fish/guestfish-actions.pod:1346
20167 #: ../fish/guestfish-actions.pod:1348
20175 #: ../fish/guestfish-actions.pod:1355
20180 #: ../fish/guestfish-actions.pod:1357
20185 #: ../fish/guestfish-actions.pod:1359
20193 #: ../fish/guestfish-actions.pod:1366
20198 #: ../fish/guestfish-actions.pod:1368
20206 #: ../fish/guestfish-actions.pod:1375
20207 msgid "get-recovery-proc"
20211 #: ../fish/guestfish-actions.pod:1377
20214 " get-recovery-proc\n"
20219 #: ../fish/guestfish-actions.pod:1381
20220 msgid "get-selinux"
20224 #: ../fish/guestfish-actions.pod:1383
20232 #: ../fish/guestfish-actions.pod:1385
20234 "This returns the current setting of the selinux flag which is passed to the "
20235 "appliance at boot time. See L</set-selinux>."
20239 #: ../fish/guestfish-actions.pod:1391
20244 #: ../fish/guestfish-actions.pod:1393
20252 #: ../fish/guestfish-actions.pod:1400
20257 #: ../fish/guestfish-actions.pod:1402
20265 #: ../fish/guestfish-actions.pod:1406
20270 #: ../fish/guestfish-actions.pod:1408
20278 #: ../fish/guestfish-actions.pod:1410
20280 "Return the current umask. By default the umask is C<022> unless it has been "
20281 "set by calling L</umask>."
20285 #: ../fish/guestfish-actions.pod:1413
20286 msgid "get-verbose"
20290 #: ../fish/guestfish-actions.pod:1415
20298 #: ../fish/guestfish-actions.pod:1419
20303 #: ../fish/guestfish-actions.pod:1421
20311 #: ../fish/guestfish-actions.pod:1425
20312 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
20316 #: ../fish/guestfish-actions.pod:1428
20321 #: ../fish/guestfish-actions.pod:1430
20324 " getxattrs path\n"
20329 #: ../fish/guestfish-actions.pod:1438
20330 msgid "See also: L</lgetxattrs>, L<attr(5)>."
20334 #: ../fish/guestfish-actions.pod:1440
20335 msgid "glob-expand"
20339 #: ../fish/guestfish-actions.pod:1442
20342 " glob-expand pattern\n"
20347 #: ../fish/guestfish-actions.pod:1455
20352 #: ../fish/guestfish-actions.pod:1457
20355 " grep regex path\n"
20360 #: ../fish/guestfish-actions.pod:1465
20365 #: ../fish/guestfish-actions.pod:1467
20368 " grepi regex path\n"
20373 #: ../fish/guestfish-actions.pod:1475
20374 msgid "grub-install"
20378 #: ../fish/guestfish-actions.pod:1477
20381 " grub-install root device\n"
20386 #: ../fish/guestfish-actions.pod:1493
20391 #: ../fish/guestfish-actions.pod:1495
20399 #: ../fish/guestfish-actions.pod:1503
20404 #: ../fish/guestfish-actions.pod:1505
20407 " head-n nrlines path\n"
20412 #: ../fish/guestfish-actions.pod:1518
20417 #: ../fish/guestfish-actions.pod:1520
20425 #: ../fish/guestfish-actions.pod:1528
20430 #: ../fish/guestfish-actions.pod:1530
20433 " initrd-cat initrdpath filename\n"
20438 #: ../fish/guestfish-actions.pod:1542
20439 msgid "See also L</initrd-list>."
20443 #: ../fish/guestfish-actions.pod:1547
20444 msgid "initrd-list"
20448 #: ../fish/guestfish-actions.pod:1549
20451 " initrd-list path\n"
20456 #: ../fish/guestfish-actions.pod:1561
20457 msgid "inotify-add-watch"
20461 #: ../fish/guestfish-actions.pod:1563
20464 " inotify-add-watch path mask\n"
20469 #: ../fish/guestfish-actions.pod:1575
20470 msgid "inotify-close"
20474 #: ../fish/guestfish-actions.pod:1577
20482 #: ../fish/guestfish-actions.pod:1583
20483 msgid "inotify-files"
20487 #: ../fish/guestfish-actions.pod:1585
20495 #: ../fish/guestfish-actions.pod:1587
20497 "This function is a helpful wrapper around L</inotify-read> which just "
20498 "returns a list of pathnames of objects that were touched. The returned "
20499 "pathnames are sorted and deduplicated."
20503 #: ../fish/guestfish-actions.pod:1591
20504 msgid "inotify-init"
20508 #: ../fish/guestfish-actions.pod:1593
20511 " inotify-init maxevents\n"
20516 #: ../fish/guestfish-actions.pod:1599
20518 "C<maxevents> is the maximum number of events which will be queued up between "
20519 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
20520 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
20521 "default was 16384 events. Beyond this limit, the kernel throws away events, "
20522 "but records the fact that it threw them away by setting a flag "
20523 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
20527 #: ../fish/guestfish-actions.pod:1609
20529 "Before any events are generated, you have to add some watches to the "
20530 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
20531 "L</inotify-watch-all>."
20535 #: ../fish/guestfish-actions.pod:1615
20537 "Queued up events should be read periodically by calling L</inotify-read> (or "
20538 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
20539 "If you don't read the events out often enough then you risk the internal "
20540 "queue overflowing."
20544 #: ../fish/guestfish-actions.pod:1622
20546 "The handle should be closed after use by calling L</inotify-close>. This "
20547 "also removes any watches automatically."
20551 #: ../fish/guestfish-actions.pod:1631
20552 msgid "inotify-read"
20556 #: ../fish/guestfish-actions.pod:1633
20564 #: ../fish/guestfish-actions.pod:1646
20565 msgid "inotify-rm-watch"
20569 #: ../fish/guestfish-actions.pod:1648
20572 " inotify-rm-watch wd\n"
20577 #: ../fish/guestfish-actions.pod:1650
20578 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
20582 #: ../fish/guestfish-actions.pod:1653
20583 msgid "inspect-get-arch"
20587 #: ../fish/guestfish-actions.pod:1655
20590 " inspect-get-arch root\n"
20595 #: ../fish/guestfish-actions.pod:1657 ../fish/guestfish-actions.pod:1673 ../fish/guestfish-actions.pod:1747 ../fish/guestfish-actions.pod:1765 ../fish/guestfish-actions.pod:1786 ../fish/guestfish-actions.pod:1801 ../fish/guestfish-actions.pod:1824 ../fish/guestfish-actions.pod:1846 ../fish/guestfish-actions.pod:1870 ../fish/guestfish-actions.pod:1900 ../fish/guestfish-actions.pod:1935 ../fish/guestfish-actions.pod:1951
20597 "This function should only be called with a root device string as returned by "
20602 #: ../fish/guestfish-actions.pod:1660
20604 "This returns the architecture of the inspected operating system. The "
20605 "possible return values are listed under L</file-architecture>."
20609 #: ../fish/guestfish-actions.pod:1669
20610 msgid "inspect-get-distro"
20614 #: ../fish/guestfish-actions.pod:1671
20617 " inspect-get-distro root\n"
20622 #: ../fish/guestfish-actions.pod:1743
20623 msgid "inspect-get-filesystems"
20627 #: ../fish/guestfish-actions.pod:1745
20630 " inspect-get-filesystems root\n"
20635 #: ../fish/guestfish-actions.pod:1758
20637 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
20638 "L</inspect-get-mountpoints>."
20642 #: ../fish/guestfish-actions.pod:1761
20643 msgid "inspect-get-major-version"
20647 #: ../fish/guestfish-actions.pod:1763
20650 " inspect-get-major-version root\n"
20655 #: ../fish/guestfish-actions.pod:1782
20656 msgid "inspect-get-minor-version"
20660 #: ../fish/guestfish-actions.pod:1784
20663 " inspect-get-minor-version root\n"
20668 #: ../fish/guestfish-actions.pod:1794
20670 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
20671 "L</inspect-get-major-version>."
20675 #: ../fish/guestfish-actions.pod:1797
20676 msgid "inspect-get-mountpoints"
20680 #: ../fish/guestfish-actions.pod:1799
20683 " inspect-get-mountpoints root\n"
20688 #: ../fish/guestfish-actions.pod:1817
20690 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
20691 "L</inspect-get-filesystems>."
20695 #: ../fish/guestfish-actions.pod:1820
20696 msgid "inspect-get-package-format"
20700 #: ../fish/guestfish-actions.pod:1822
20703 " inspect-get-package-format root\n"
20708 #: ../fish/guestfish-actions.pod:1827
20710 "This function and L</inspect-get-package-management> return the package "
20711 "format and package management tool used by the inspected operating system. "
20712 "For example for Fedora these functions would return C<rpm> (package format) "
20713 "and C<yum> (package management)."
20717 #: ../fish/guestfish-actions.pod:1842
20718 msgid "inspect-get-package-management"
20722 #: ../fish/guestfish-actions.pod:1844
20725 " inspect-get-package-management root\n"
20730 #: ../fish/guestfish-actions.pod:1849
20732 "L</inspect-get-package-format> and this function return the package format "
20733 "and package management tool used by the inspected operating system. For "
20734 "example for Fedora these functions would return C<rpm> (package format) and "
20735 "C<yum> (package management)."
20739 #: ../fish/guestfish-actions.pod:1866
20740 msgid "inspect-get-product-name"
20744 #: ../fish/guestfish-actions.pod:1868
20747 " inspect-get-product-name root\n"
20752 #: ../fish/guestfish-actions.pod:1883
20753 msgid "inspect-get-roots"
20757 #: ../fish/guestfish-actions.pod:1885
20760 " inspect-get-roots\n"
20765 #: ../fish/guestfish-actions.pod:1887
20767 "This function is a convenient way to get the list of root devices, as "
20768 "returned from a previous call to L</inspect-os>, but without redoing the "
20769 "whole inspection process."
20773 #: ../fish/guestfish-actions.pod:1891
20775 "This returns an empty list if either no root devices were found or the "
20776 "caller has not called L</inspect-os>."
20780 #: ../fish/guestfish-actions.pod:1896
20781 msgid "inspect-get-type"
20785 #: ../fish/guestfish-actions.pod:1898
20788 " inspect-get-type root\n"
20793 #: ../fish/guestfish-actions.pod:1931
20794 msgid "inspect-get-windows-systemroot"
20798 #: ../fish/guestfish-actions.pod:1933
20801 " inspect-get-windows-systemroot root\n"
20806 #: ../fish/guestfish-actions.pod:1947
20807 msgid "inspect-list-applications"
20811 #: ../fish/guestfish-actions.pod:1949
20814 " inspect-list-applications root\n"
20819 #: ../fish/guestfish-actions.pod:1956
20821 "I<Note:> This call works differently from other parts of the inspection "
20822 "API. You have to call L</inspect-os>, then L</inspect-get-mountpoints>, "
20823 "then mount up the disks, before calling this. Listing applications is a "
20824 "significantly more difficult operation which requires access to the full "
20825 "filesystem. Also note that unlike the other L</inspect-get-*> calls which "
20826 "are just returning data cached in the libguestfs handle, this call actually "
20827 "reads parts of the mounted filesystems during the call."
20831 #: ../fish/guestfish-actions.pod:2046
20836 #: ../fish/guestfish-actions.pod:2048
20844 #: ../fish/guestfish-actions.pod:2063
20846 "You can pass the root string(s) returned to other L</inspect-get-*> "
20847 "functions in order to query further information about each operating system, "
20848 "such as the name and version."
20852 #: ../fish/guestfish-actions.pod:2068
20854 "This function uses other libguestfs features such as L</mount-ro> and "
20855 "L</umount-all> in order to mount and unmount filesystems and look at the "
20856 "contents. This should be called with no disks currently mounted. The "
20857 "function may also use Augeas, so any existing Augeas handle will be closed."
20861 #: ../fish/guestfish-actions.pod:2080 ../fish/guestfish-actions.pod:2236 ../fish/guestfish-actions.pod:2282
20862 msgid "See also L</list-filesystems>."
20866 #: ../fish/guestfish-actions.pod:2082
20867 msgid "is-blockdev"
20871 #: ../fish/guestfish-actions.pod:2084
20874 " is-blockdev path\n"
20879 #: ../fish/guestfish-actions.pod:2089 ../fish/guestfish-actions.pod:2107 ../fish/guestfish-actions.pod:2126 ../fish/guestfish-actions.pod:2135 ../fish/guestfish-actions.pod:2145 ../fish/guestfish-actions.pod:2179 ../fish/guestfish-actions.pod:2188
20880 msgid "See also L</stat>."
20884 #: ../fish/guestfish-actions.pod:2091
20889 #: ../fish/guestfish-actions.pod:2093
20897 #: ../fish/guestfish-actions.pod:2100
20902 #: ../fish/guestfish-actions.pod:2102
20905 " is-chardev path\n"
20910 #: ../fish/guestfish-actions.pod:2109
20915 #: ../fish/guestfish-actions.pod:2111
20923 #: ../fish/guestfish-actions.pod:2118
20928 #: ../fish/guestfish-actions.pod:2120
20936 #: ../fish/guestfish-actions.pod:2128
20941 #: ../fish/guestfish-actions.pod:2130
20949 #: ../fish/guestfish-actions.pod:2137
20954 #: ../fish/guestfish-actions.pod:2139
20962 #: ../fish/guestfish-actions.pod:2147
20963 msgid "is-launching"
20967 #: ../fish/guestfish-actions.pod:2149
20975 #: ../fish/guestfish-actions.pod:2156
20980 #: ../fish/guestfish-actions.pod:2158
20988 #: ../fish/guestfish-actions.pod:2163
20993 #: ../fish/guestfish-actions.pod:2165
21001 #: ../fish/guestfish-actions.pod:2172
21006 #: ../fish/guestfish-actions.pod:2174
21009 " is-socket path\n"
21014 #: ../fish/guestfish-actions.pod:2181
21019 #: ../fish/guestfish-actions.pod:2183
21022 " is-symlink path\n"
21027 #: ../fish/guestfish-actions.pod:2190
21028 msgid "kill-subprocess"
21032 #: ../fish/guestfish-actions.pod:2192
21035 " kill-subprocess\n"
21040 #: ../fish/guestfish-actions.pod:2196
21045 #: ../fish/guestfish-actions.pod:2198
21050 #: ../fish/guestfish-actions.pod:2200
21058 #: ../fish/guestfish-actions.pod:2208
21063 #: ../fish/guestfish-actions.pod:2210
21066 " lchown owner group path\n"
21071 #: ../fish/guestfish-actions.pod:2212
21073 "Change the file owner to C<owner> and group to C<group>. This is like "
21074 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
21079 #: ../fish/guestfish-actions.pod:2220
21084 #: ../fish/guestfish-actions.pod:2222
21087 " lgetxattrs path\n"
21092 #: ../fish/guestfish-actions.pod:2224
21094 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
21095 "it returns the extended attributes of the link itself."
21099 #: ../fish/guestfish-actions.pod:2228
21100 msgid "list-devices"
21104 #: ../fish/guestfish-actions.pod:2230
21112 #: ../fish/guestfish-actions.pod:2238
21113 msgid "list-filesystems"
21117 #: ../fish/guestfish-actions.pod:2240
21120 " list-filesystems\n"
21125 #: ../fish/guestfish-actions.pod:2259
21127 "This command runs other libguestfs commands, which might include L</mount> "
21128 "and L</umount>, and therefore you should use this soon after launch and only "
21129 "when nothing is mounted."
21133 #: ../fish/guestfish-actions.pod:2263
21135 "Not all of the filesystems returned will be mountable. In particular, swap "
21136 "partitions are returned in the list. Also this command does not check that "
21137 "each filesystem found is valid and mountable, and some filesystems might be "
21138 "mountable but require special options. Filesystems may not all belong to a "
21139 "single logical operating system (use L</inspect-os> to look for OSes)."
21143 #: ../fish/guestfish-actions.pod:2271
21144 msgid "list-partitions"
21148 #: ../fish/guestfish-actions.pod:2273
21151 " list-partitions\n"
21156 #: ../fish/guestfish-actions.pod:2279
21158 "This does not return logical volumes. For that you will need to call "
21163 #: ../fish/guestfish-actions.pod:2284
21168 #: ../fish/guestfish-actions.pod:2286
21176 #: ../fish/guestfish-actions.pod:2294
21181 #: ../fish/guestfish-actions.pod:2296
21184 " ln target linkname\n"
21189 #: ../fish/guestfish-actions.pod:2300
21194 #: ../fish/guestfish-actions.pod:2302
21197 " ln-f target linkname\n"
21202 #: ../fish/guestfish-actions.pod:2307
21207 #: ../fish/guestfish-actions.pod:2309
21210 " ln-s target linkname\n"
21215 #: ../fish/guestfish-actions.pod:2313
21220 #: ../fish/guestfish-actions.pod:2315
21223 " ln-sf target linkname\n"
21228 #: ../fish/guestfish-actions.pod:2320
21229 msgid "lremovexattr"
21233 #: ../fish/guestfish-actions.pod:2322
21236 " lremovexattr xattr path\n"
21241 #: ../fish/guestfish-actions.pod:2324
21243 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
21244 "it removes an extended attribute of the link itself."
21248 #: ../fish/guestfish-actions.pod:2328
21253 #: ../fish/guestfish-actions.pod:2330
21261 #: ../fish/guestfish-actions.pod:2336
21263 "This command is mostly useful for interactive sessions. Programs should "
21264 "probably use L</readdir> instead."
21268 #: ../fish/guestfish-actions.pod:2339
21273 #: ../fish/guestfish-actions.pod:2341
21276 " lsetxattr xattr val vallen path\n"
21281 #: ../fish/guestfish-actions.pod:2343
21283 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
21284 "sets an extended attribute of the link itself."
21288 #: ../fish/guestfish-actions.pod:2347
21293 #: ../fish/guestfish-actions.pod:2349
21301 #: ../fish/guestfish-actions.pod:2353
21303 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
21304 "the link is stat-ed, not the file it refers to."
21308 #: ../fish/guestfish-actions.pod:2359
21313 #: ../fish/guestfish-actions.pod:2361
21316 " lstatlist path 'names ...'\n"
21321 #: ../fish/guestfish-actions.pod:2363
21323 "This call allows you to perform the L</lstat> operation on multiple files, "
21324 "where all files are in the directory C<path>. C<names> is the list of files "
21325 "from this directory."
21329 #: ../fish/guestfish-actions.pod:2372
21331 "This call is intended for programs that want to efficiently list a directory "
21332 "contents without making many round-trips. See also L</lxattrlist> for a "
21333 "similarly efficient call for getting extended attributes. Very long "
21334 "directory listings might cause the protocol message size to be exceeded, "
21335 "causing this call to fail. The caller must split up such requests into "
21336 "smaller groups of names."
21340 #: ../fish/guestfish-actions.pod:2380
21341 msgid "luks-add-key"
21345 #: ../fish/guestfish-actions.pod:2382
21348 " luks-add-key device keyslot\n"
21353 #: ../fish/guestfish-actions.pod:2389
21355 "Note that if C<keyslot> already contains a key, then this command will "
21356 "fail. You have to use L</luks-kill-slot> first to remove that key."
21360 #: ../fish/guestfish-actions.pod:2393 ../fish/guestfish-actions.pod:2415 ../fish/guestfish-actions.pod:2428 ../fish/guestfish-actions.pod:2442 ../fish/guestfish-actions.pod:2465 ../fish/guestfish-actions.pod:2475
21362 "This command has one or more key or passphrase parameters. Guestfish will "
21363 "prompt for these separately."
21367 #: ../fish/guestfish-actions.pod:2396
21372 #: ../fish/guestfish-actions.pod:2398
21375 " luks-close device\n"
21380 #: ../fish/guestfish-actions.pod:2400
21382 "This closes a LUKS device that was created earlier by L</luks-open> or "
21383 "L</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
21384 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
21385 "underlying block device."
21389 #: ../fish/guestfish-actions.pod:2406
21390 msgid "luks-format"
21394 #: ../fish/guestfish-actions.pod:2408
21397 " luks-format device keyslot\n"
21402 #: ../fish/guestfish-actions.pod:2421
21403 msgid "luks-format-cipher"
21407 #: ../fish/guestfish-actions.pod:2423
21410 " luks-format-cipher device keyslot cipher\n"
21415 #: ../fish/guestfish-actions.pod:2425
21417 "This command is the same as L</luks-format> but it also allows you to set "
21418 "the C<cipher> used."
21422 #: ../fish/guestfish-actions.pod:2434
21423 msgid "luks-kill-slot"
21427 #: ../fish/guestfish-actions.pod:2436
21430 " luks-kill-slot device keyslot\n"
21435 #: ../fish/guestfish-actions.pod:2445
21440 #: ../fish/guestfish-actions.pod:2447
21443 " luks-open device mapname\n"
21448 #: ../fish/guestfish-actions.pod:2461
21450 "If this block device contains LVM volume groups, then calling L</vgscan> "
21451 "followed by L</vg-activate-all> will make them visible."
21455 #: ../fish/guestfish-actions.pod:2468
21456 msgid "luks-open-ro"
21460 #: ../fish/guestfish-actions.pod:2470
21463 " luks-open-ro device mapname\n"
21468 #: ../fish/guestfish-actions.pod:2472
21470 "This is the same as L</luks-open> except that a read-only mapping is "
21475 #: ../fish/guestfish-actions.pod:2478
21480 #: ../fish/guestfish-actions.pod:2480
21483 " lvcreate logvol volgroup mbytes\n"
21488 #: ../fish/guestfish-actions.pod:2485
21489 msgid "lvm-canonical-lv-name"
21493 #: ../fish/guestfish-actions.pod:2487
21496 " lvm-canonical-lv-name lvname\n"
21501 #: ../fish/guestfish-actions.pod:2496
21502 msgid "See also L</is-lv>."
21506 #: ../fish/guestfish-actions.pod:2498
21507 msgid "lvm-clear-filter"
21511 #: ../fish/guestfish-actions.pod:2500
21514 " lvm-clear-filter\n"
21519 #: ../fish/guestfish-actions.pod:2502
21521 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
21526 #: ../fish/guestfish-actions.pod:2508
21527 msgid "lvm-remove-all"
21531 #: ../fish/guestfish-actions.pod:2510
21534 " lvm-remove-all\n"
21539 #: ../fish/guestfish-actions.pod:2518
21540 msgid "lvm-set-filter"
21544 #: ../fish/guestfish-actions.pod:2520
21547 " lvm-set-filter 'devices ...'\n"
21552 #: ../fish/guestfish-actions.pod:2545
21557 #: ../fish/guestfish-actions.pod:2547
21560 " lvremove device\n"
21565 #: ../fish/guestfish-actions.pod:2555
21570 #: ../fish/guestfish-actions.pod:2557
21573 " lvrename logvol newlogvol\n"
21578 #: ../fish/guestfish-actions.pod:2561
21583 #: ../fish/guestfish-actions.pod:2563
21586 " lvresize device mbytes\n"
21591 #: ../fish/guestfish-actions.pod:2569
21592 msgid "lvresize-free"
21596 #: ../fish/guestfish-actions.pod:2571
21599 " lvresize-free lv percent\n"
21604 #: ../fish/guestfish-actions.pod:2579
21609 #: ../fish/guestfish-actions.pod:2581
21617 #: ../fish/guestfish-actions.pod:2589
21618 msgid "See also L</lvs-full>, L</list-filesystems>."
21622 #: ../fish/guestfish-actions.pod:2591
21627 #: ../fish/guestfish-actions.pod:2593
21635 #: ../fish/guestfish-actions.pod:2598
21640 #: ../fish/guestfish-actions.pod:2600
21648 #: ../fish/guestfish-actions.pod:2604
21653 #: ../fish/guestfish-actions.pod:2606
21656 " lxattrlist path 'names ...'\n"
21661 #: ../fish/guestfish-actions.pod:2622
21663 "This call is intended for programs that want to efficiently list a directory "
21664 "contents without making many round-trips. See also L</lstatlist> for a "
21665 "similarly efficient call for getting standard stats. Very long directory "
21666 "listings might cause the protocol message size to be exceeded, causing this "
21667 "call to fail. The caller must split up such requests into smaller groups of "
21672 #: ../fish/guestfish-actions.pod:2630
21677 #: ../fish/guestfish-actions.pod:2632
21685 #: ../fish/guestfish-actions.pod:2636
21690 #: ../fish/guestfish-actions.pod:2638
21693 " mkdir-mode path mode\n"
21698 #: ../fish/guestfish-actions.pod:2647
21699 msgid "See also L</mkdir>, L</umask>"
21703 #: ../fish/guestfish-actions.pod:2649
21708 #: ../fish/guestfish-actions.pod:2651
21716 #: ../fish/guestfish-actions.pod:2656
21721 #: ../fish/guestfish-actions.pod:2658
21724 " mkdtemp template\n"
21729 #: ../fish/guestfish-actions.pod:2679
21734 #: ../fish/guestfish-actions.pod:2681
21737 " mke2fs-J fstype blocksize device journal\n"
21742 #: ../fish/guestfish-actions.pod:2689
21743 msgid "See also L</mke2journal>."
21747 #: ../fish/guestfish-actions.pod:2691
21752 #: ../fish/guestfish-actions.pod:2693
21755 " mke2fs-JL fstype blocksize device label\n"
21760 #: ../fish/guestfish-actions.pod:2698
21761 msgid "See also L</mke2journal-L>."
21765 #: ../fish/guestfish-actions.pod:2700
21770 #: ../fish/guestfish-actions.pod:2702
21773 " mke2fs-JU fstype blocksize device uuid\n"
21778 #: ../fish/guestfish-actions.pod:2707
21779 msgid "See also L</mke2journal-U>."
21783 #: ../fish/guestfish-actions.pod:2709
21784 msgid "mke2journal"
21788 #: ../fish/guestfish-actions.pod:2711
21791 " mke2journal blocksize device\n"
21796 #: ../fish/guestfish-actions.pod:2718
21797 msgid "mke2journal-L"
21801 #: ../fish/guestfish-actions.pod:2720
21804 " mke2journal-L blocksize label device\n"
21809 #: ../fish/guestfish-actions.pod:2724
21810 msgid "mke2journal-U"
21814 #: ../fish/guestfish-actions.pod:2726
21817 " mke2journal-U blocksize uuid device\n"
21822 #: ../fish/guestfish-actions.pod:2730
21827 #: ../fish/guestfish-actions.pod:2732
21830 " mkfifo mode path\n"
21835 #: ../fish/guestfish-actions.pod:2734
21837 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
21838 "is just a convenient wrapper around L</mknod>."
21842 #: ../fish/guestfish-actions.pod:2740
21847 #: ../fish/guestfish-actions.pod:2742
21850 " mkfs fstype device\n"
21855 #: ../fish/guestfish-actions.pod:2748
21860 #: ../fish/guestfish-actions.pod:2750
21863 " mkfs-b fstype blocksize device\n"
21868 #: ../fish/guestfish-actions.pod:2752
21870 "This call is similar to L</mkfs>, but it allows you to control the block "
21871 "size of the resulting filesystem. Supported block sizes depend on the "
21872 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
21876 #: ../fish/guestfish-actions.pod:2760
21877 msgid "mkmountpoint"
21881 #: ../fish/guestfish-actions.pod:2762
21884 " mkmountpoint exemptpath\n"
21889 #: ../fish/guestfish-actions.pod:2764
21891 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
21892 "to create extra mountpoints before mounting the first filesystem."
21896 #: ../fish/guestfish-actions.pod:2788
21898 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
21899 "unexpected errors if you try to mix these calls. It is safest to manually "
21900 "unmount filesystems and remove mountpoints after use."
21904 #: ../fish/guestfish-actions.pod:2792
21906 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
21907 "for this to work for manual mountpoints, you must ensure that the innermost "
21908 "mountpoints have the longest pathnames, as in the example code above."
21912 #: ../fish/guestfish-actions.pod:2799
21914 "Autosync [see L</set-autosync>, this is set by default on handles] means "
21915 "that L</umount-all> is called when the handle is closed which can also "
21916 "trigger these issues."
21920 #: ../fish/guestfish-actions.pod:2803
21925 #: ../fish/guestfish-actions.pod:2805
21928 " mknod mode devmajor devminor path\n"
21933 #: ../fish/guestfish-actions.pod:2815
21935 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
21936 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
21937 "regular file). These constants are available in the standard Linux header "
21938 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
21939 "wrappers around this command which bitwise OR in the appropriate constant "
21944 #: ../fish/guestfish-actions.pod:2825
21949 #: ../fish/guestfish-actions.pod:2827
21952 " mknod-b mode devmajor devminor path\n"
21957 #: ../fish/guestfish-actions.pod:2829
21959 "This call creates a block device node called C<path> with mode C<mode> and "
21960 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
21961 "wrapper around L</mknod>."
21965 #: ../fish/guestfish-actions.pod:2835
21970 #: ../fish/guestfish-actions.pod:2837
21973 " mknod-c mode devmajor devminor path\n"
21978 #: ../fish/guestfish-actions.pod:2839
21980 "This call creates a char device node called C<path> with mode C<mode> and "
21981 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
21982 "wrapper around L</mknod>."
21986 #: ../fish/guestfish-actions.pod:2845
21991 #: ../fish/guestfish-actions.pod:2847
21999 #: ../fish/guestfish-actions.pod:2851
22004 #: ../fish/guestfish-actions.pod:2853
22007 " mkswap-L label device\n"
22012 #: ../fish/guestfish-actions.pod:2861
22017 #: ../fish/guestfish-actions.pod:2863
22020 " mkswap-U uuid device\n"
22025 #: ../fish/guestfish-actions.pod:2867
22026 msgid "mkswap-file"
22030 #: ../fish/guestfish-actions.pod:2869
22033 " mkswap-file path\n"
22038 #: ../fish/guestfish-actions.pod:2873
22040 "This command just writes a swap file signature to an existing file. To "
22041 "create the file itself, use something like L</fallocate>."
22045 #: ../fish/guestfish-actions.pod:2876
22050 #: ../fish/guestfish-actions.pod:2878
22053 " modprobe modulename\n"
22058 #: ../fish/guestfish-actions.pod:2885
22063 #: ../fish/guestfish-actions.pod:2887
22066 " mount device mountpoint\n"
22071 #: ../fish/guestfish-actions.pod:2903
22073 "B<Important note:> When you use this call, the filesystem options C<sync> "
22074 "and C<noatime> are set implicitly. This was originally done because we "
22075 "thought it would improve reliability, but it turns out that I<-o sync> has a "
22076 "very large negative performance impact and negligible effect on "
22077 "reliability. Therefore we recommend that you avoid using L</mount> in any "
22078 "code that needs performance, and instead use L</mount-options> (use an empty "
22079 "string for the first parameter if you don't want any options)."
22083 #: ../fish/guestfish-actions.pod:2913
22088 #: ../fish/guestfish-actions.pod:2915
22091 " mount-loop file mountpoint\n"
22096 #: ../fish/guestfish-actions.pod:2921
22097 msgid "mount-options"
22101 #: ../fish/guestfish-actions.pod:2923
22104 " mount-options options device mountpoint\n"
22109 #: ../fish/guestfish-actions.pod:2925
22111 "This is the same as the L</mount> command, but it allows you to set the "
22112 "mount options as for the L<mount(8)> I<-o> flag."
22116 #: ../fish/guestfish-actions.pod:2933
22121 #: ../fish/guestfish-actions.pod:2935
22124 " mount-ro device mountpoint\n"
22129 #: ../fish/guestfish-actions.pod:2937
22131 "This is the same as the L</mount> command, but it mounts the filesystem with "
22132 "the read-only (I<-o ro>) flag."
22136 #: ../fish/guestfish-actions.pod:2940
22141 #: ../fish/guestfish-actions.pod:2942
22144 " mount-vfs options vfstype device mountpoint\n"
22149 #: ../fish/guestfish-actions.pod:2944
22151 "This is the same as the L</mount> command, but it allows you to set both the "
22152 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
22156 #: ../fish/guestfish-actions.pod:2948
22157 msgid "mountpoints"
22161 #: ../fish/guestfish-actions.pod:2950
22169 #: ../fish/guestfish-actions.pod:2952
22171 "This call is similar to L</mounts>. That call returns a list of devices. "
22172 "This one returns a hash table (map) of device name to directory where the "
22173 "device is mounted."
22177 #: ../fish/guestfish-actions.pod:2956
22182 #: ../fish/guestfish-actions.pod:2958
22190 #: ../fish/guestfish-actions.pod:2965
22191 msgid "See also: L</mountpoints>"
22195 #: ../fish/guestfish-actions.pod:2967
22200 #: ../fish/guestfish-actions.pod:2969
22208 #: ../fish/guestfish-actions.pod:2974
22209 msgid "ntfs-3g-probe"
22213 #: ../fish/guestfish-actions.pod:2976
22216 " ntfs-3g-probe true|false device\n"
22221 #: ../fish/guestfish-actions.pod:2990
22226 #: ../fish/guestfish-actions.pod:2992
22229 " ntfsresize device\n"
22234 #: ../fish/guestfish-actions.pod:2998
22235 msgid "ntfsresize-size"
22239 #: ../fish/guestfish-actions.pod:3000
22242 " ntfsresize-size device size\n"
22247 #: ../fish/guestfish-actions.pod:3002
22249 "This command is the same as L</ntfsresize> except that it allows you to "
22250 "specify the new size (in bytes) explicitly."
22254 #: ../fish/guestfish-actions.pod:3005
22259 #: ../fish/guestfish-actions.pod:3007
22262 " part-add device prlogex startsect endsect\n"
22267 #: ../fish/guestfish-actions.pod:3009
22269 "This command adds a partition to C<device>. If there is no partition table "
22270 "on the device, call L</part-init> first."
22274 #: ../fish/guestfish-actions.pod:3021
22276 "Creating a partition which covers the whole disk is not so easy. Use "
22277 "L</part-disk> to do that."
22281 #: ../fish/guestfish-actions.pod:3024
22286 #: ../fish/guestfish-actions.pod:3026
22289 " part-del device partnum\n"
22294 #: ../fish/guestfish-actions.pod:3034
22299 #: ../fish/guestfish-actions.pod:3036
22302 " part-disk device parttype\n"
22307 #: ../fish/guestfish-actions.pod:3038
22309 "This command is simply a combination of L</part-init> followed by "
22310 "L</part-add> to create a single primary partition covering the whole disk."
22314 #: ../fish/guestfish-actions.pod:3042
22316 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
22317 "possible values are described in L</part-init>."
22321 #: ../fish/guestfish-actions.pod:3048
22322 msgid "part-get-bootable"
22326 #: ../fish/guestfish-actions.pod:3050
22329 " part-get-bootable device partnum\n"
22334 #: ../fish/guestfish-actions.pod:3055
22335 msgid "See also L</part-set-bootable>."
22339 #: ../fish/guestfish-actions.pod:3057
22340 msgid "part-get-mbr-id"
22344 #: ../fish/guestfish-actions.pod:3059
22347 " part-get-mbr-id device partnum\n"
22352 #: ../fish/guestfish-actions.pod:3064 ../fish/guestfish-actions.pod:3202
22354 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
22355 "undefined results for other partition table types (see "
22356 "L</part-get-parttype>)."
22360 #: ../fish/guestfish-actions.pod:3068
22361 msgid "part-get-parttype"
22365 #: ../fish/guestfish-actions.pod:3070
22368 " part-get-parttype device\n"
22373 #: ../fish/guestfish-actions.pod:3075
22375 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
22376 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
22377 "possible, although unusual. See L</part-init> for a full list."
22381 #: ../fish/guestfish-actions.pod:3080
22386 #: ../fish/guestfish-actions.pod:3082
22389 " part-init device parttype\n"
22394 #: ../fish/guestfish-actions.pod:3088
22396 "Initially there are no partitions. Following this, you should call "
22397 "L</part-add> for each partition required."
22401 #: ../fish/guestfish-actions.pod:3151
22406 #: ../fish/guestfish-actions.pod:3153
22409 " part-list device\n"
22414 #: ../fish/guestfish-actions.pod:3168
22416 "Start of the partition I<in bytes>. To get sectors you have to divide by "
22417 "the device's sector size, see L</blockdev-getss>."
22421 #: ../fish/guestfish-actions.pod:3181
22422 msgid "part-set-bootable"
22426 #: ../fish/guestfish-actions.pod:3183
22429 " part-set-bootable device partnum true|false\n"
22434 #: ../fish/guestfish-actions.pod:3192
22435 msgid "part-set-mbr-id"
22439 #: ../fish/guestfish-actions.pod:3194
22442 " part-set-mbr-id device partnum idbyte\n"
22447 #: ../fish/guestfish-actions.pod:3206
22448 msgid "part-set-name"
22452 #: ../fish/guestfish-actions.pod:3208
22455 " part-set-name device partnum name\n"
22460 #: ../fish/guestfish-actions.pod:3216
22461 msgid "part-to-dev"
22465 #: ../fish/guestfish-actions.pod:3218
22468 " part-to-dev partition\n"
22473 #: ../fish/guestfish-actions.pod:3224
22475 "The named partition must exist, for example as a string returned from "
22476 "L</list-partitions>."
22480 #: ../fish/guestfish-actions.pod:3227
22481 msgid "ping-daemon"
22485 #: ../fish/guestfish-actions.pod:3229
22493 #: ../fish/guestfish-actions.pod:3236
22498 #: ../fish/guestfish-actions.pod:3238
22501 " pread path count offset\n"
22506 #: ../fish/guestfish-actions.pod:3246
22507 msgid "See also L</pwrite>, L</pread-device>."
22511 #: ../fish/guestfish-actions.pod:3251
22512 msgid "pread-device"
22516 #: ../fish/guestfish-actions.pod:3253
22519 " pread-device device count offset\n"
22524 #: ../fish/guestfish-actions.pod:3261
22525 msgid "See also L</pread>."
22529 #: ../fish/guestfish-actions.pod:3266
22534 #: ../fish/guestfish-actions.pod:3268
22537 " pvcreate device\n"
22542 #: ../fish/guestfish-actions.pod:3274
22547 #: ../fish/guestfish-actions.pod:3276
22550 " pvremove device\n"
22555 #: ../fish/guestfish-actions.pod:3285
22560 #: ../fish/guestfish-actions.pod:3287
22563 " pvresize device\n"
22568 #: ../fish/guestfish-actions.pod:3292
22569 msgid "pvresize-size"
22573 #: ../fish/guestfish-actions.pod:3294
22576 " pvresize-size device size\n"
22581 #: ../fish/guestfish-actions.pod:3296
22583 "This command is the same as L</pvresize> except that it allows you to "
22584 "specify the new size (in bytes) explicitly."
22588 #: ../fish/guestfish-actions.pod:3299
22593 #: ../fish/guestfish-actions.pod:3301
22601 #: ../fish/guestfish-actions.pod:3309
22602 msgid "See also L</pvs-full>."
22606 #: ../fish/guestfish-actions.pod:3311
22611 #: ../fish/guestfish-actions.pod:3313
22619 #: ../fish/guestfish-actions.pod:3318
22624 #: ../fish/guestfish-actions.pod:3320
22632 #: ../fish/guestfish-actions.pod:3324
22637 #: ../fish/guestfish-actions.pod:3326
22640 " pwrite path content offset\n"
22645 #: ../fish/guestfish-actions.pod:3337
22646 msgid "See also L</pread>, L</pwrite-device>."
22650 #: ../fish/guestfish-actions.pod:3342
22651 msgid "pwrite-device"
22655 #: ../fish/guestfish-actions.pod:3344
22658 " pwrite-device device content offset\n"
22663 #: ../fish/guestfish-actions.pod:3354
22664 msgid "See also L</pwrite>."
22668 #: ../fish/guestfish-actions.pod:3359
22673 #: ../fish/guestfish-actions.pod:3361
22676 " read-file path\n"
22681 #: ../fish/guestfish-actions.pod:3366
22683 "Unlike L</cat>, this function can correctly handle files that contain "
22684 "embedded ASCII NUL characters. However unlike L</download>, this function "
22685 "is limited in the total size of file that can be handled."
22689 #: ../fish/guestfish-actions.pod:3374
22694 #: ../fish/guestfish-actions.pod:3376
22697 " read-lines path\n"
22702 #: ../fish/guestfish-actions.pod:3383
22704 "Note that this function cannot correctly handle binary files (specifically, "
22705 "files containing C<\\0> character which is treated as end of line). For "
22706 "those you need to use the L</read-file> function which has a more complex "
22711 #: ../fish/guestfish-actions.pod:3388
22716 #: ../fish/guestfish-actions.pod:3390
22724 #: ../fish/guestfish-actions.pod:3442
22726 "This function is primarily intended for use by programs. To get a simple "
22727 "list of names, use L</ls>. To get a printable directory for human "
22728 "consumption, use L</ll>."
22732 #: ../fish/guestfish-actions.pod:3446
22737 #: ../fish/guestfish-actions.pod:3448
22745 #: ../fish/guestfish-actions.pod:3452
22746 msgid "readlinklist"
22750 #: ../fish/guestfish-actions.pod:3454
22753 " readlinklist path 'names ...'\n"
22758 #: ../fish/guestfish-actions.pod:3478
22763 #: ../fish/guestfish-actions.pod:3480
22771 #: ../fish/guestfish-actions.pod:3485
22772 msgid "removexattr"
22776 #: ../fish/guestfish-actions.pod:3487
22779 " removexattr xattr path\n"
22784 #: ../fish/guestfish-actions.pod:3492
22785 msgid "See also: L</lremovexattr>, L<attr(5)>."
22789 #: ../fish/guestfish-actions.pod:3494
22794 #: ../fish/guestfish-actions.pod:3496
22797 " resize2fs device\n"
22802 #: ../fish/guestfish-actions.pod:3501
22804 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
22805 "before calling this command. For unknown reasons C<resize2fs> sometimes "
22806 "gives an error about this and sometimes not. In any case, it is always safe "
22807 "to call L</e2fsck-f> before calling this function."
22811 #: ../fish/guestfish-actions.pod:3507
22812 msgid "resize2fs-size"
22816 #: ../fish/guestfish-actions.pod:3509
22819 " resize2fs-size device size\n"
22824 #: ../fish/guestfish-actions.pod:3511
22826 "This command is the same as L</resize2fs> except that it allows you to "
22827 "specify the new size (in bytes) explicitly."
22831 #: ../fish/guestfish-actions.pod:3514
22836 #: ../fish/guestfish-actions.pod:3516
22844 #: ../fish/guestfish-actions.pod:3520
22849 #: ../fish/guestfish-actions.pod:3522
22857 #: ../fish/guestfish-actions.pod:3528
22862 #: ../fish/guestfish-actions.pod:3530
22870 #: ../fish/guestfish-actions.pod:3534
22871 msgid "rmmountpoint"
22875 #: ../fish/guestfish-actions.pod:3536
22878 " rmmountpoint exemptpath\n"
22883 #: ../fish/guestfish-actions.pod:3538
22885 "This calls removes a mountpoint that was previously created with "
22886 "L</mkmountpoint>. See L</mkmountpoint> for full details."
22890 #: ../fish/guestfish-actions.pod:3542
22891 msgid "scrub-device"
22895 #: ../fish/guestfish-actions.pod:3544
22898 " scrub-device device\n"
22903 #: ../fish/guestfish-actions.pod:3555
22908 #: ../fish/guestfish-actions.pod:3557
22911 " scrub-file file\n"
22916 #: ../fish/guestfish-actions.pod:3567
22917 msgid "scrub-freespace"
22921 #: ../fish/guestfish-actions.pod:3569
22924 " scrub-freespace dir\n"
22929 #: ../fish/guestfish-actions.pod:3571
22931 "This command creates the directory C<dir> and then fills it with files until "
22932 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
22933 "deletes them. The intention is to scrub any free space on the partition "
22934 "containing C<dir>."
22938 #: ../fish/guestfish-actions.pod:3580
22943 #: ../fish/guestfish-actions.pod:3582
22948 #: ../fish/guestfish-actions.pod:3584
22951 " set-append append\n"
22956 #: ../fish/guestfish-actions.pod:3595
22957 msgid "set-autosync"
22961 #: ../fish/guestfish-actions.pod:3597
22966 #: ../fish/guestfish-actions.pod:3599
22969 " set-autosync true|false\n"
22974 #: ../fish/guestfish-actions.pod:3601
22976 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
22977 "effort attempt to run L</umount-all> followed by L</sync> when the handle is "
22978 "closed (also if the program exits without closing handles)."
22982 #: ../fish/guestfish-actions.pod:3609
22987 #: ../fish/guestfish-actions.pod:3611
22992 #: ../fish/guestfish-actions.pod:3613
22995 " set-direct true|false\n"
23000 #: ../fish/guestfish-actions.pod:3619
23002 "One consequence of this is that log messages aren't caught by the library "
23003 "and handled by L</set-log-message-callback>, but go straight to stdout."
23007 #: ../fish/guestfish-actions.pod:3628
23008 msgid "set-e2label"
23012 #: ../fish/guestfish-actions.pod:3630
23015 " set-e2label device label\n"
23020 #: ../fish/guestfish-actions.pod:3636
23022 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
23023 "label on a filesystem."
23027 #: ../fish/guestfish-actions.pod:3639
23032 #: ../fish/guestfish-actions.pod:3641
23035 " set-e2uuid device uuid\n"
23040 #: ../fish/guestfish-actions.pod:3648
23042 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
23043 "UUID of a filesystem."
23047 #: ../fish/guestfish-actions.pod:3651
23048 msgid "set-memsize"
23052 #: ../fish/guestfish-actions.pod:3653
23057 #: ../fish/guestfish-actions.pod:3655
23060 " set-memsize memsize\n"
23065 #: ../fish/guestfish-actions.pod:3657
23067 "This sets the memory size in megabytes allocated to the qemu subprocess. "
23068 "This only has any effect if called before L</launch>."
23072 #: ../fish/guestfish-actions.pod:3668
23073 msgid "set-network"
23077 #: ../fish/guestfish-actions.pod:3670
23082 #: ../fish/guestfish-actions.pod:3672
23085 " set-network true|false\n"
23090 #: ../fish/guestfish-actions.pod:3680
23091 msgid "You must call this before calling L</launch>, otherwise it has no effect."
23095 #: ../fish/guestfish-actions.pod:3683
23100 #: ../fish/guestfish-actions.pod:3685
23105 #: ../fish/guestfish-actions.pod:3687
23108 " set-path searchpath\n"
23113 #: ../fish/guestfish-actions.pod:3696
23118 #: ../fish/guestfish-actions.pod:3698
23123 #: ../fish/guestfish-actions.pod:3700
23131 #: ../fish/guestfish-actions.pod:3720
23132 msgid "set-recovery-proc"
23136 #: ../fish/guestfish-actions.pod:3722
23137 msgid "recovery-proc"
23141 #: ../fish/guestfish-actions.pod:3724
23144 " set-recovery-proc true|false\n"
23149 #: ../fish/guestfish-actions.pod:3726
23151 "If this is called with the parameter C<false> then L</launch> does not "
23152 "create a recovery process. The purpose of the recovery process is to stop "
23153 "runaway qemu processes in the case where the main program aborts abruptly."
23157 #: ../fish/guestfish-actions.pod:3731
23159 "This only has any effect if called before L</launch>, and the default is "
23164 #: ../fish/guestfish-actions.pod:3740
23165 msgid "set-selinux"
23169 #: ../fish/guestfish-actions.pod:3742
23174 #: ../fish/guestfish-actions.pod:3744
23177 " set-selinux true|false\n"
23182 #: ../fish/guestfish-actions.pod:3755
23187 #: ../fish/guestfish-actions.pod:3757
23192 #: ../fish/guestfish-actions.pod:3759
23195 " set-trace true|false\n"
23200 #: ../fish/guestfish-actions.pod:3775
23201 msgid "set-verbose"
23205 #: ../fish/guestfish-actions.pod:3777
23210 #: ../fish/guestfish-actions.pod:3779
23213 " set-verbose true|false\n"
23218 #: ../fish/guestfish-actions.pod:3786
23223 #: ../fish/guestfish-actions.pod:3788
23226 " setcon context\n"
23231 #: ../fish/guestfish-actions.pod:3795
23236 #: ../fish/guestfish-actions.pod:3797
23239 " setxattr xattr val vallen path\n"
23244 #: ../fish/guestfish-actions.pod:3803
23245 msgid "See also: L</lsetxattr>, L<attr(5)>."
23249 #: ../fish/guestfish-actions.pod:3805
23254 #: ../fish/guestfish-actions.pod:3807
23257 " sfdisk device cyls heads sectors 'lines ...'\n"
23262 #: ../fish/guestfish-actions.pod:3829
23263 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
23267 #: ../fish/guestfish-actions.pod:3835
23272 #: ../fish/guestfish-actions.pod:3837
23275 " sfdiskM device 'lines ...'\n"
23280 #: ../fish/guestfish-actions.pod:3839
23282 "This is a simplified interface to the L</sfdisk> command, where partition "
23283 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
23284 "you don't need to specify the cyls, heads and sectors parameters which were "
23285 "rarely if ever used anyway."
23289 #: ../fish/guestfish-actions.pod:3845
23290 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
23294 #: ../fish/guestfish-actions.pod:3851
23299 #: ../fish/guestfish-actions.pod:3853
23302 " sfdisk-N device partnum cyls heads sectors line\n"
23307 #: ../fish/guestfish-actions.pod:3858
23309 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
23310 "cyls/heads/sectors parameters."
23314 #: ../fish/guestfish-actions.pod:3861
23315 msgid "See also: L</part-add>"
23319 #: ../fish/guestfish-actions.pod:3866
23320 msgid "sfdisk-disk-geometry"
23324 #: ../fish/guestfish-actions.pod:3868
23327 " sfdisk-disk-geometry device\n"
23332 #: ../fish/guestfish-actions.pod:3870
23334 "This displays the disk geometry of C<device> read from the partition table. "
23335 "Especially in the case where the underlying block device has been resized, "
23336 "this can be different from the kernel's idea of the geometry (see "
23337 "L</sfdisk-kernel-geometry>)."
23341 #: ../fish/guestfish-actions.pod:3878
23342 msgid "sfdisk-kernel-geometry"
23346 #: ../fish/guestfish-actions.pod:3880
23349 " sfdisk-kernel-geometry device\n"
23354 #: ../fish/guestfish-actions.pod:3887
23359 #: ../fish/guestfish-actions.pod:3889
23362 " sfdisk-l device\n"
23367 #: ../fish/guestfish-actions.pod:3895
23368 msgid "See also: L</part-list>"
23372 #: ../fish/guestfish-actions.pod:3897
23377 #: ../fish/guestfish-actions.pod:3899
23385 #: ../fish/guestfish-actions.pod:3904
23386 msgid "This is like L</command>, but passes the command to:"
23390 #: ../fish/guestfish-actions.pod:3912
23391 msgid "All the provisos about L</command> apply to this call."
23395 #: ../fish/guestfish-actions.pod:3914
23400 #: ../fish/guestfish-actions.pod:3916
23403 " sh-lines command\n"
23408 #: ../fish/guestfish-actions.pod:3918
23409 msgid "This is the same as L</sh>, but splits the result into a list of lines."
23413 #: ../fish/guestfish-actions.pod:3921
23414 msgid "See also: L</command-lines>"
23418 #: ../fish/guestfish-actions.pod:3923
23423 #: ../fish/guestfish-actions.pod:3925
23431 #: ../fish/guestfish-actions.pod:3929
23436 #: ../fish/guestfish-actions.pod:3931
23444 #: ../fish/guestfish-actions.pod:3937
23449 #: ../fish/guestfish-actions.pod:3939
23457 #: ../fish/guestfish-actions.pod:3947
23462 #: ../fish/guestfish-actions.pod:3949
23470 #: ../fish/guestfish-actions.pod:3957
23475 #: ../fish/guestfish-actions.pod:3959
23478 " strings-e encoding path\n"
23483 #: ../fish/guestfish-actions.pod:3961
23485 "This is like the L</strings> command, but allows you to specify the encoding "
23486 "of strings that are looked for in the source file C<path>."
23490 #: ../fish/guestfish-actions.pod:3971
23492 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
23493 "ISO-8859-X (this is what L</strings> uses)."
23497 #: ../fish/guestfish-actions.pod:4003
23498 msgid "swapoff-device"
23502 #: ../fish/guestfish-actions.pod:4005
23505 " swapoff-device device\n"
23510 #: ../fish/guestfish-actions.pod:4007
23512 "This command disables the libguestfs appliance swap device or partition "
23513 "named C<device>. See L</swapon-device>."
23517 #: ../fish/guestfish-actions.pod:4011
23518 msgid "swapoff-file"
23522 #: ../fish/guestfish-actions.pod:4013
23525 " swapoff-file file\n"
23530 #: ../fish/guestfish-actions.pod:4017
23531 msgid "swapoff-label"
23535 #: ../fish/guestfish-actions.pod:4019
23538 " swapoff-label label\n"
23543 #: ../fish/guestfish-actions.pod:4024
23544 msgid "swapoff-uuid"
23548 #: ../fish/guestfish-actions.pod:4026
23551 " swapoff-uuid uuid\n"
23556 #: ../fish/guestfish-actions.pod:4031
23557 msgid "swapon-device"
23561 #: ../fish/guestfish-actions.pod:4033
23564 " swapon-device device\n"
23569 #: ../fish/guestfish-actions.pod:4035
23571 "This command enables the libguestfs appliance to use the swap device or "
23572 "partition named C<device>. The increased memory is made available for all "
23573 "commands, for example those run using L</command> or L</sh>."
23577 #: ../fish/guestfish-actions.pod:4047
23578 msgid "swapon-file"
23582 #: ../fish/guestfish-actions.pod:4049
23585 " swapon-file file\n"
23590 #: ../fish/guestfish-actions.pod:4051
23591 msgid "This command enables swap to a file. See L</swapon-device> for other notes."
23595 #: ../fish/guestfish-actions.pod:4054
23596 msgid "swapon-label"
23600 #: ../fish/guestfish-actions.pod:4056
23603 " swapon-label label\n"
23608 #: ../fish/guestfish-actions.pod:4058
23610 "This command enables swap to a labeled swap partition. See "
23611 "L</swapon-device> for other notes."
23615 #: ../fish/guestfish-actions.pod:4061
23616 msgid "swapon-uuid"
23620 #: ../fish/guestfish-actions.pod:4063
23623 " swapon-uuid uuid\n"
23628 #: ../fish/guestfish-actions.pod:4065
23630 "This command enables swap to a swap partition with the given UUID. See "
23631 "L</swapon-device> for other notes."
23635 #: ../fish/guestfish-actions.pod:4068
23640 #: ../fish/guestfish-actions.pod:4070
23648 #: ../fish/guestfish-actions.pod:4078
23653 #: ../fish/guestfish-actions.pod:4080
23661 #: ../fish/guestfish-actions.pod:4088
23666 #: ../fish/guestfish-actions.pod:4090
23669 " tail-n nrlines path\n"
23674 #: ../fish/guestfish-actions.pod:4103
23679 #: ../fish/guestfish-actions.pod:4105
23682 " tar-in (tarfile|-) directory\n"
23687 #: ../fish/guestfish-actions.pod:4110
23688 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
23692 #: ../fish/guestfish-actions.pod:4115
23697 #: ../fish/guestfish-actions.pod:4117
23700 " tar-out directory (tarfile|-)\n"
23705 #: ../fish/guestfish-actions.pod:4122
23706 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
23710 #: ../fish/guestfish-actions.pod:4127
23715 #: ../fish/guestfish-actions.pod:4129
23718 " tgz-in (tarball|-) directory\n"
23723 #: ../fish/guestfish-actions.pod:4134
23724 msgid "To upload an uncompressed tarball, use L</tar-in>."
23728 #: ../fish/guestfish-actions.pod:4138
23733 #: ../fish/guestfish-actions.pod:4140
23736 " tgz-out directory (tarball|-)\n"
23741 #: ../fish/guestfish-actions.pod:4145
23742 msgid "To download an uncompressed tarball, use L</tar-out>."
23746 #: ../fish/guestfish-actions.pod:4149
23751 #: ../fish/guestfish-actions.pod:4151
23759 #: ../fish/guestfish-actions.pod:4160
23764 #: ../fish/guestfish-actions.pod:4162
23772 #: ../fish/guestfish-actions.pod:4167
23773 msgid "truncate-size"
23777 #: ../fish/guestfish-actions.pod:4169
23780 " truncate-size path size\n"
23785 #: ../fish/guestfish-actions.pod:4174
23787 "If the current file size is less than C<size> then the file is extended to "
23788 "the required size with zero bytes. This creates a sparse file (ie. disk "
23789 "blocks are not allocated for the file until you write to it). To create a "
23790 "non-sparse file of zeroes, use L</fallocate64> instead."
23794 #: ../fish/guestfish-actions.pod:4180
23799 #: ../fish/guestfish-actions.pod:4182
23802 " tune2fs-l device\n"
23807 #: ../fish/guestfish-actions.pod:4192
23812 #: ../fish/guestfish-actions.pod:4194
23815 " txz-in (tarball|-) directory\n"
23820 #: ../fish/guestfish-actions.pod:4201
23825 #: ../fish/guestfish-actions.pod:4203
23828 " txz-out directory (tarball|-)\n"
23833 #: ../fish/guestfish-actions.pod:4210
23838 #: ../fish/guestfish-actions.pod:4212
23846 #: ../fish/guestfish-actions.pod:4226
23847 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
23851 #: ../fish/guestfish-actions.pod:4231
23856 #: ../fish/guestfish-actions.pod:4233
23861 #: ../fish/guestfish-actions.pod:4235
23864 " umount pathordevice\n"
23869 #: ../fish/guestfish-actions.pod:4241
23874 #: ../fish/guestfish-actions.pod:4243
23875 msgid "unmount-all"
23879 #: ../fish/guestfish-actions.pod:4245
23887 #: ../fish/guestfish-actions.pod:4251
23892 #: ../fish/guestfish-actions.pod:4253
23895 " upload (filename|-) remotefilename\n"
23900 #: ../fish/guestfish-actions.pod:4260
23901 msgid "See also L</download>."
23905 #: ../fish/guestfish-actions.pod:4264
23906 msgid "upload-offset"
23910 #: ../fish/guestfish-actions.pod:4266
23913 " upload-offset (filename|-) remotefilename offset\n"
23918 #: ../fish/guestfish-actions.pod:4278
23920 "Note that there is no limit on the amount of data that can be uploaded with "
23921 "this call, unlike with L</pwrite>, and this call always writes the full "
23922 "amount unless an error occurs."
23926 #: ../fish/guestfish-actions.pod:4283
23927 msgid "See also L</upload>, L</pwrite>."
23931 #: ../fish/guestfish-actions.pod:4287
23936 #: ../fish/guestfish-actions.pod:4289
23939 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
23944 #: ../fish/guestfish-actions.pod:4308
23949 #: ../fish/guestfish-actions.pod:4310
23957 #: ../fish/guestfish-actions.pod:4337
23959 "I<Note:> Don't use this call to test for availability of features. In "
23960 "enterprise distributions we backport features from later versions into "
23961 "earlier versions, making this an unreliable way to test for features. Use "
23962 "L</available> instead."
23966 #: ../fish/guestfish-actions.pod:4343
23971 #: ../fish/guestfish-actions.pod:4345
23974 " vfs-label device\n"
23979 #: ../fish/guestfish-actions.pod:4352
23980 msgid "To find a filesystem from the label, use L</findfs-label>."
23984 #: ../fish/guestfish-actions.pod:4354
23989 #: ../fish/guestfish-actions.pod:4356
23992 " vfs-type device\n"
23997 #: ../fish/guestfish-actions.pod:4366
24002 #: ../fish/guestfish-actions.pod:4368
24005 " vfs-uuid device\n"
24010 #: ../fish/guestfish-actions.pod:4375
24011 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
24015 #: ../fish/guestfish-actions.pod:4377
24016 msgid "vg-activate"
24020 #: ../fish/guestfish-actions.pod:4379
24023 " vg-activate true|false 'volgroups ...'\n"
24028 #: ../fish/guestfish-actions.pod:4392
24029 msgid "vg-activate-all"
24033 #: ../fish/guestfish-actions.pod:4394
24036 " vg-activate-all true|false\n"
24041 #: ../fish/guestfish-actions.pod:4404
24046 #: ../fish/guestfish-actions.pod:4406
24049 " vgcreate volgroup 'physvols ...'\n"
24054 #: ../fish/guestfish-actions.pod:4411
24059 #: ../fish/guestfish-actions.pod:4413
24062 " vglvuuids vgname\n"
24067 #: ../fish/guestfish-actions.pod:4418
24069 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
24070 "logical volumes and volume groups."
24074 #: ../fish/guestfish-actions.pod:4421
24075 msgid "See also L</vgpvuuids>."
24079 #: ../fish/guestfish-actions.pod:4423
24084 #: ../fish/guestfish-actions.pod:4425
24087 " vgpvuuids vgname\n"
24092 #: ../fish/guestfish-actions.pod:4430
24094 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
24095 "physical volumes and volume groups."
24099 #: ../fish/guestfish-actions.pod:4433
24100 msgid "See also L</vglvuuids>."
24104 #: ../fish/guestfish-actions.pod:4435
24109 #: ../fish/guestfish-actions.pod:4437
24112 " vgremove vgname\n"
24117 #: ../fish/guestfish-actions.pod:4444
24122 #: ../fish/guestfish-actions.pod:4446
24125 " vgrename volgroup newvolgroup\n"
24130 #: ../fish/guestfish-actions.pod:4450
24135 #: ../fish/guestfish-actions.pod:4452
24143 #: ../fish/guestfish-actions.pod:4460
24144 msgid "See also L</vgs-full>."
24148 #: ../fish/guestfish-actions.pod:4462
24153 #: ../fish/guestfish-actions.pod:4464
24161 #: ../fish/guestfish-actions.pod:4469
24166 #: ../fish/guestfish-actions.pod:4471
24174 #: ../fish/guestfish-actions.pod:4476
24179 #: ../fish/guestfish-actions.pod:4478
24187 #: ../fish/guestfish-actions.pod:4482
24192 #: ../fish/guestfish-actions.pod:4484
24200 #: ../fish/guestfish-actions.pod:4489
24205 #: ../fish/guestfish-actions.pod:4491
24213 #: ../fish/guestfish-actions.pod:4496
24218 #: ../fish/guestfish-actions.pod:4498
24226 #: ../fish/guestfish-actions.pod:4503
24231 #: ../fish/guestfish-actions.pod:4505
24234 " write path content\n"
24239 #: ../fish/guestfish-actions.pod:4513
24244 #: ../fish/guestfish-actions.pod:4515
24247 " write-file path content size\n"
24252 #: ../fish/guestfish-actions.pod:4538
24257 #: ../fish/guestfish-actions.pod:4540
24260 " zegrep regex path\n"
24265 #: ../fish/guestfish-actions.pod:4548
24270 #: ../fish/guestfish-actions.pod:4550
24273 " zegrepi regex path\n"
24278 #: ../fish/guestfish-actions.pod:4558
24283 #: ../fish/guestfish-actions.pod:4560
24291 #: ../fish/guestfish-actions.pod:4568
24292 msgid "See also: L</zero-device>, L</scrub-device>."
24296 #: ../fish/guestfish-actions.pod:4570
24297 msgid "zero-device"
24301 #: ../fish/guestfish-actions.pod:4572
24304 " zero-device device\n"
24309 #: ../fish/guestfish-actions.pod:4574
24311 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
24312 "which just zeroes the first few blocks of a device."
24316 #: ../fish/guestfish-actions.pod:4581
24321 #: ../fish/guestfish-actions.pod:4583
24324 " zerofree device\n"
24329 #: ../fish/guestfish-actions.pod:4596
24334 #: ../fish/guestfish-actions.pod:4598
24337 " zfgrep pattern path\n"
24342 #: ../fish/guestfish-actions.pod:4606
24347 #: ../fish/guestfish-actions.pod:4608
24350 " zfgrepi pattern path\n"
24355 #: ../fish/guestfish-actions.pod:4616
24360 #: ../fish/guestfish-actions.pod:4618
24363 " zfile meth path\n"
24368 #: ../fish/guestfish-actions.pod:4625
24369 msgid "Since 1.0.63, use L</file> instead which can now process compressed files."
24373 #: ../fish/guestfish-actions.pod:4635
24378 #: ../fish/guestfish-actions.pod:4637
24381 " zgrep regex path\n"
24386 #: ../fish/guestfish-actions.pod:4645
24391 #: ../fish/guestfish-actions.pod:4647
24394 " zgrepi regex path\n"
24399 #: ../fish/guestfish-commands.pod:1
24404 #: ../fish/guestfish-commands.pod:3
24409 #: ../fish/guestfish-commands.pod:5
24412 " alloc filename size\n"
24417 #: ../fish/guestfish-commands.pod:7
24419 "This creates an empty (zeroed) file of the given size, and then adds so it "
24420 "can be further examined."
24424 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
24425 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
24429 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
24430 msgid "Size can be specified using standard suffixes, eg. C<1M>."
24434 #: ../fish/guestfish-commands.pod:14
24436 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
24437 "image, see L</PREPARED DISK IMAGES>."
24441 #: ../fish/guestfish-commands.pod:17
24446 #: ../fish/guestfish-commands.pod:19
24449 " copy-in local [local ...] /remotedir\n"
24454 #: ../fish/guestfish-commands.pod:21
24456 "C<copy-in> copies local files or directories recursively into the disk "
24457 "image, placing them in the directory called C</remotedir> (which must "
24458 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
24459 "other commands as necessary."
24463 #: ../fish/guestfish-commands.pod:26
24465 "Multiple local files and directories can be specified, but the last "
24466 "parameter must always be a remote directory. Wildcards cannot be used."
24470 #: ../fish/guestfish-commands.pod:30
24475 #: ../fish/guestfish-commands.pod:32
24478 " copy-out remote [remote ...] localdir\n"
24483 #: ../fish/guestfish-commands.pod:34
24485 "C<copy-out> copies remote files or directories recursively out of the disk "
24486 "image, placing them on the host disk in a local directory called C<localdir> "
24487 "(which must exist). This guestfish meta-command turns into a sequence of "
24488 "L</download>, L</tar-out> and other commands as necessary."
24492 #: ../fish/guestfish-commands.pod:40
24494 "Multiple remote files and directories can be specified, but the last "
24495 "parameter must always be a local directory. To download to the current "
24496 "directory, use C<.> as in:"
24500 #: ../fish/guestfish-commands.pod:44
24503 " copy-out /home .\n"
24508 #: ../fish/guestfish-commands.pod:46
24510 "Wildcards cannot be used in the ordinary command, but you can use them with "
24511 "the help of L</glob> like this:"
24515 #: ../fish/guestfish-commands.pod:49
24518 " glob copy-out /home/* .\n"
24523 #: ../fish/guestfish-commands.pod:51
24528 #: ../fish/guestfish-commands.pod:53
24531 " echo [params ...]\n"
24536 #: ../fish/guestfish-commands.pod:55
24537 msgid "This echos the parameters to the terminal."
24541 #: ../fish/guestfish-commands.pod:57
24546 #: ../fish/guestfish-commands.pod:59
24551 #: ../fish/guestfish-commands.pod:61
24556 #: ../fish/guestfish-commands.pod:63
24564 #: ../fish/guestfish-commands.pod:65
24566 "This is used to edit a file. It downloads the file, edits it locally using "
24567 "your editor, then uploads the result."
24571 #: ../fish/guestfish-commands.pod:68
24573 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
24574 "or C<emacs> you will get those corresponding editors."
24578 #: ../fish/guestfish-commands.pod:72
24583 #: ../fish/guestfish-commands.pod:74
24586 " glob command args...\n"
24591 #: ../fish/guestfish-commands.pod:76
24593 "Expand wildcards in any paths in the args list, and run C<command> "
24594 "repeatedly on each matching path."
24598 #: ../fish/guestfish-commands.pod:79
24599 msgid "See L</WILDCARDS AND GLOBBING>."
24603 #: ../fish/guestfish-commands.pod:81
24608 #: ../fish/guestfish-commands.pod:83
24611 " hexedit <filename|device>\n"
24612 " hexedit <filename|device> <max>\n"
24613 " hexedit <filename|device> <start> <max>\n"
24618 #: ../fish/guestfish-commands.pod:87
24620 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
24625 #: ../fish/guestfish-commands.pod:90
24627 "This command works by downloading potentially the whole file or device, "
24628 "editing it locally, then uploading it. If the file or device is large, you "
24629 "have to specify which part you wish to edit by using C<max> and/or C<start> "
24630 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
24631 "usual modifiers allowed such as C<1M> (1 megabyte)."
24635 #: ../fish/guestfish-commands.pod:97
24636 msgid "For example to edit the first few sectors of a disk you might do:"
24640 #: ../fish/guestfish-commands.pod:100
24643 " hexedit /dev/sda 1M\n"
24648 #: ../fish/guestfish-commands.pod:102
24650 "which would allow you to edit anywhere within the first megabyte of the "
24655 #: ../fish/guestfish-commands.pod:105
24656 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
24660 #: ../fish/guestfish-commands.pod:107
24663 " hexedit /dev/sda1 0x400 0x400\n"
24668 #: ../fish/guestfish-commands.pod:109
24669 msgid "(assuming the superblock is in the standard location)."
24673 #: ../fish/guestfish-commands.pod:111
24675 "This command requires the external L<hexedit(1)> program. You can specify "
24676 "another program to use by setting the C<HEXEDITOR> environment variable."
24680 #: ../fish/guestfish-commands.pod:115
24681 msgid "See also L</hexdump>."
24685 #: ../fish/guestfish-commands.pod:117
24690 #: ../fish/guestfish-commands.pod:119
24698 #: ../fish/guestfish-commands.pod:121
24699 msgid "Change the local directory, ie. the current directory of guestfish itself."
24703 #: ../fish/guestfish-commands.pod:124
24704 msgid "Note that C<!cd> won't do what you might expect."
24708 #: ../fish/guestfish-commands.pod:126
24713 #: ../fish/guestfish-commands.pod:128
24718 #: ../fish/guestfish-commands.pod:130
24726 #: ../fish/guestfish-commands.pod:132
24727 msgid "Opens the manual page for guestfish."
24731 #: ../fish/guestfish-commands.pod:134
24736 #: ../fish/guestfish-commands.pod:136
24741 #: ../fish/guestfish-commands.pod:138
24749 #: ../fish/guestfish-commands.pod:140
24757 #: ../fish/guestfish-commands.pod:142
24758 msgid "This is used to view a file."
24762 #: ../fish/guestfish-commands.pod:144
24764 "The default viewer is C<$PAGER>. However if you use the alternate command "
24765 "C<less> you will get the C<less> command specifically."
24769 #: ../fish/guestfish-commands.pod:147
24774 #: ../fish/guestfish-commands.pod:149
24782 #: ../fish/guestfish-commands.pod:151
24784 "Close and reopen the libguestfs handle. It is not necessary to use this "
24785 "normally, because the handle is closed properly when guestfish exits. "
24786 "However this is occasionally useful for testing."
24790 #: ../fish/guestfish-commands.pod:155
24795 #: ../fish/guestfish-commands.pod:157
24798 " sparse filename size\n"
24803 #: ../fish/guestfish-commands.pod:159
24805 "This creates an empty sparse file of the given size, and then adds so it can "
24806 "be further examined."
24810 #: ../fish/guestfish-commands.pod:162
24812 "In all respects it works the same as the L</alloc> command, except that the "
24813 "image file is allocated sparsely, which means that disk blocks are not "
24814 "assigned to the file until they are needed. Sparse disk files only use "
24815 "space when written to, but they are slower and there is a danger you could "
24816 "run out of real disk space during a write operation."
24820 #: ../fish/guestfish-commands.pod:172
24825 #: ../fish/guestfish-commands.pod:174
24833 #: ../fish/guestfish-commands.pod:176
24835 "This command returns a list of the optional groups known to the daemon, and "
24836 "indicates which ones are supported by this build of the libguestfs "
24841 #: ../fish/guestfish-commands.pod:180
24842 msgid "See also L<guestfs(3)/AVAILABILITY>."
24846 #: ../fish/guestfish-commands.pod:182
24851 #: ../fish/guestfish-commands.pod:184
24854 " time command args...\n"
24859 #: ../fish/guestfish-commands.pod:186
24861 "Run the command as usual, but print the elapsed time afterwards. This can "
24862 "be useful for benchmarking operations."
24866 #: ../test-tool/libguestfs-test-tool.pod:5
24867 msgid "libguestfs-test-tool - End user tests for libguestfs"
24871 #: ../test-tool/libguestfs-test-tool.pod:9
24874 " libguestfs-test-tool [--options]\n"
24879 #: ../test-tool/libguestfs-test-tool.pod:13
24881 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
24882 "and developers, to allow them to check basic libguestfs functionality is "
24883 "working. This is needed because libguestfs occasionally breaks for reasons "
24884 "beyond our control: usually because of changes in the underlying qemu or "
24885 "kernel packages, or the host environment."
24889 #: ../test-tool/libguestfs-test-tool.pod:20
24890 msgid "If you suspect a problem in libguestfs, then just run:"
24894 #: ../test-tool/libguestfs-test-tool.pod:22
24897 " libguestfs-test-tool\n"
24902 #: ../test-tool/libguestfs-test-tool.pod:24
24903 msgid "It will print lots of diagnostic messages."
24907 #: ../test-tool/libguestfs-test-tool.pod:26
24908 msgid "If it runs to completion successfully, you will see this near the end:"
24912 #: ../test-tool/libguestfs-test-tool.pod:28
24915 " ===== TEST FINISHED OK =====\n"
24920 #: ../test-tool/libguestfs-test-tool.pod:30
24921 msgid "and the test tool will exit with code 0."
24925 #: ../test-tool/libguestfs-test-tool.pod:32
24927 "If it fails (and/or exits with non-zero error code), please paste the "
24928 "B<complete, unedited> output of the test tool into a bug report. More "
24929 "information about reporting bugs can be found on the "
24930 "L<http://libguestfs.org/> website."
24934 #: ../test-tool/libguestfs-test-tool.pod:41
24939 #: ../test-tool/libguestfs-test-tool.pod:43
24940 msgid "Display short usage information and exit."
24944 #: ../test-tool/libguestfs-test-tool.pod:45
24945 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
24949 #: ../test-tool/libguestfs-test-tool.pod:47
24951 "Pass an alternate name for the helper program. libguestfs-test-tool will "
24952 "normally look in the C<$libexec> directory that was configured when the tool "
24957 #: ../test-tool/libguestfs-test-tool.pod:51
24958 msgid "I<--qemu qemu_binary>"
24962 #: ../test-tool/libguestfs-test-tool.pod:53
24964 "If you have downloaded another qemu binary, point this option at the full "
24965 "path of the binary to try it."
24969 #: ../test-tool/libguestfs-test-tool.pod:56
24970 msgid "I<--qemudir qemu_source_dir>"
24974 #: ../test-tool/libguestfs-test-tool.pod:58
24976 "If you have compiled qemu from source, point this option at the source "
24977 "directory to try it."
24981 #: ../test-tool/libguestfs-test-tool.pod:61
24982 msgid "I<--timeout N>"
24986 #: ../test-tool/libguestfs-test-tool.pod:63
24988 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
24989 "does not usually need to be adjusted unless your machine is very slow."
24993 #: ../test-tool/libguestfs-test-tool.pod:69
24994 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
24998 #: ../test-tool/libguestfs-test-tool.pod:71
25000 "If you have compiled another version of qemu from source and would like to "
25001 "try that, then you can use the I<--qemudir> option to point to the qemu "
25002 "source directory."
25006 #: ../test-tool/libguestfs-test-tool.pod:75
25008 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
25009 "option to point to the binary."
25013 #: ../test-tool/libguestfs-test-tool.pod:78
25015 "When using an alternate qemu with libguestfs, usually you would need to "
25016 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in "
25017 "L<guestfs(3)>). libguestfs-test-tool writes a temporary qemu wrapper script "
25018 "when you use either of the I<--qemudir> or I<--qemu> options."
25022 #: ../test-tool/libguestfs-test-tool.pod:85
25024 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
25025 "I<1> if there was an error."
25029 #: ../test-tool/libguestfs-test-tool.pod:92
25030 msgid "/usr/libexec/libguestfs-test-tool-helper"
25034 #: ../test-tool/libguestfs-test-tool.pod:94
25036 "This helper program is run inside the appliance and provides additional "
25041 #: ../test-tool/libguestfs-test-tool.pod:97
25042 msgid "/usr/bin/mkisofs"
25046 #: ../test-tool/libguestfs-test-tool.pod:99
25048 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
25049 "which is used as part of the tests."
25053 #: ../test-tool/libguestfs-test-tool.pod:106
25055 "For the full list of environment variables which may affect libguestfs, "
25056 "please see the L<guestfs(3)> manual page."
25060 #: ../test-tool/libguestfs-test-tool.pod:111
25061 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
25065 #: ../test-tool/libguestfs-test-tool.pod:121
25066 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
25070 #: ../fuse/guestmount.pod:5
25071 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
25075 #: ../fuse/guestmount.pod:9
25078 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
25083 #: ../fuse/guestmount.pod:11
25086 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
25091 #: ../fuse/guestmount.pod:13
25094 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
25099 #: ../fuse/guestmount.pod:17
25101 "You must I<not> use C<guestmount> in read-write mode on live virtual "
25102 "machines. If you do this, you risk disk corruption in the VM."
25106 #: ../fuse/guestmount.pod:22
25108 "The guestmount program can be used to mount virtual machine filesystems and "
25109 "other disk images on the host. It uses libguestfs for access to the guest "
25110 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
25111 "a mountable device."
25115 #: ../fuse/guestmount.pod:27
25117 "Along with other options, you have to give at least one device (I<-a> "
25118 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
25119 "option) or use the I<-i> inspection option. How this works is better "
25120 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
25125 #: ../fuse/guestmount.pod:33
25127 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
25128 "by you, and the filesystem will not be visible to any other users unless you "
25129 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
25130 "the filesystem, use the C<fusermount -u> command."
25134 #: ../fuse/guestmount.pod:41
25136 "For a typical Windows guest which has its main filesystem on the first "
25141 #: ../fuse/guestmount.pod:44
25144 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
25149 #: ../fuse/guestmount.pod:46
25151 "For a typical Linux guest which has a /boot filesystem on the first "
25152 "partition, and the root filesystem on a logical volume:"
25156 #: ../fuse/guestmount.pod:49
25159 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
25164 #: ../fuse/guestmount.pod:51
25165 msgid "To get libguestfs to detect guest mountpoints for you:"
25169 #: ../fuse/guestmount.pod:53
25172 " guestmount -a guest.img -i --ro /mnt\n"
25177 #: ../fuse/guestmount.pod:55
25178 msgid "For a libvirt guest called \"Guest\" you could do:"
25182 #: ../fuse/guestmount.pod:57
25185 " guestmount -d Guest -i --ro /mnt\n"
25190 #: ../fuse/guestmount.pod:59
25192 "If you don't know what filesystems are contained in a guest or disk image, "
25193 "use L<virt-list-filesystems(1)> first:"
25197 #: ../fuse/guestmount.pod:62
25200 " virt-list-filesystems MyGuest\n"
25205 #: ../fuse/guestmount.pod:64
25207 "If you want to trace the libguestfs calls but without excessive debugging "
25208 "information, we recommend:"
25212 #: ../fuse/guestmount.pod:67
25215 " guestmount [...] --trace /mnt\n"
25220 #: ../fuse/guestmount.pod:69
25221 msgid "If you want to debug the program, we recommend:"
25225 #: ../fuse/guestmount.pod:71
25228 " guestmount [...] --trace --verbose /mnt\n"
25233 #: ../fuse/guestmount.pod:79
25234 msgid "Add a block device or virtual machine image."
25238 #: ../fuse/guestmount.pod:96
25239 msgid "B<--dir-cache-timeout N>"
25243 #: ../fuse/guestmount.pod:98
25245 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
25246 "seconds. The readdir cache [actually, there are several semi-independent "
25247 "caches] is populated after a readdir(2) call with the stat and extended "
25248 "attributes of the files in the directory, in anticipation that they will be "
25249 "requested soon after."
25253 #: ../fuse/guestmount.pod:104
25255 "There is also a different attribute cache implemented by FUSE (see the FUSE "
25256 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
25257 "requests, only cache existing ones."
25261 #: ../fuse/guestmount.pod:122
25263 "If you have untrusted raw-format guest disk images, you should use this "
25264 "option to specify the disk format. This avoids a possible security problem "
25265 "with malicious guests (CVE-2010-3851). See also "
25266 "L<guestfs(3)/guestfs_add_drive_opts>."
25270 #: ../fuse/guestmount.pod:127
25271 msgid "B<--fuse-help>"
25275 #: ../fuse/guestmount.pod:129
25276 msgid "Display help on special FUSE options (see I<-o> below)."
25280 #: ../fuse/guestmount.pod:133
25281 msgid "Display brief help and exit."
25285 #: ../fuse/guestmount.pod:146
25286 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
25290 #: ../fuse/guestmount.pod:148
25292 "Mount the named partition or logical volume on the given mountpoint B<in the "
25293 "guest> (this has nothing to do with mountpoints in the host)."
25297 #: ../fuse/guestmount.pod:151
25299 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
25300 "something on C</>."
25304 #: ../fuse/guestmount.pod:156
25306 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
25307 "unmounted. If you specify this option, then we don't attempt to sync the "
25308 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
25312 #: ../fuse/guestmount.pod:161
25313 msgid "B<-o option> | B<--option option>"
25317 #: ../fuse/guestmount.pod:163
25318 msgid "Pass extra options to FUSE."
25322 #: ../fuse/guestmount.pod:165
25324 "To get a list of all the extra options supported by FUSE, use the command "
25325 "below. Note that only the FUSE I<-o> options can be passed, and only some "
25326 "of them are a good idea."
25330 #: ../fuse/guestmount.pod:169
25333 " guestmount --fuse-help\n"
25338 #: ../fuse/guestmount.pod:171
25339 msgid "Some potentially useful FUSE options:"
25343 #: ../fuse/guestmount.pod:175
25344 msgid "B<-o allow_other>"
25348 #: ../fuse/guestmount.pod:177
25349 msgid "Allow other users to see the filesystem."
25353 #: ../fuse/guestmount.pod:179
25354 msgid "B<-o attr_timeout=N>"
25358 #: ../fuse/guestmount.pod:181
25359 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
25363 #: ../fuse/guestmount.pod:183
25364 msgid "B<-o kernel_cache>"
25368 #: ../fuse/guestmount.pod:185
25370 "Allow the kernel to cache files (reduces the number of reads that have to go "
25371 "through the L<guestfs(3)> API). This is generally a good idea if you can "
25372 "afford the extra memory usage."
25376 #: ../fuse/guestmount.pod:189
25377 msgid "B<-o uid=N> B<-o gid=N>"
25381 #: ../fuse/guestmount.pod:191
25383 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
25384 "the chosen values."
25388 #: ../fuse/guestmount.pod:198
25390 "Add devices and mount everything read-only. Also disallow writes and make "
25391 "the disk appear read-only to FUSE."
25395 #: ../fuse/guestmount.pod:201
25397 "This is highly recommended if you are not going to edit the guest disk. If "
25398 "the guest is running and this option is I<not> supplied, then there is a "
25399 "strong risk of disk corruption in the guest. We try to prevent this from "
25400 "happening, but it is not always possible."
25404 #: ../fuse/guestmount.pod:206
25405 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
25409 #: ../fuse/guestmount.pod:210
25410 msgid "Enable SELinux support for the guest."
25414 #: ../fuse/guestmount.pod:214
25415 msgid "Enable verbose messages from underlying libguestfs."
25419 #: ../fuse/guestmount.pod:218
25420 msgid "Display the program version and exit."
25424 #: ../fuse/guestmount.pod:222
25426 "This option does nothing at the moment. See L<guestfish(1)/OPENING DISKS "
25427 "FOR READ AND WRITE>."
25431 #: ../fuse/guestmount.pod:225
25432 msgid "B<-x> | B<--trace>"
25436 #: ../fuse/guestmount.pod:227
25437 msgid "Trace libguestfs calls."
25441 #: ../fuse/guestmount.pod:229
25442 msgid "This also stops the daemon from forking into the background."
25446 #: ../fuse/guestmount.pod:235
25448 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
25449 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
25450 "L<http://fuse.sf.net/>."
25454 #: ../inspector/virt-inspector.pl:35
25456 "virt-inspector - Display operating system version and other information "
25457 "about a virtual machine"
25461 #: ../inspector/virt-inspector.pl:39
25464 " virt-inspector [--connect URI] domname\n"
25469 #: ../inspector/virt-inspector.pl:41
25472 " virt-inspector guest.img [guest.img ...]\n"
25477 #: ../inspector/virt-inspector.pl:45
25479 "B<virt-inspector> examines a virtual machine or disk image and tries to "
25480 "determine the version of the operating system and other information about "
25481 "the virtual machine."
25485 #: ../inspector/virt-inspector.pl:49
25486 msgid "Virt-inspector produces XML output for feeding into other programs."
25490 #: ../inspector/virt-inspector.pl:51
25492 "In the normal usage, use C<virt-inspector domname> where C<domname> is the "
25493 "libvirt domain (see: C<virsh list --all>)."
25497 #: ../inspector/virt-inspector.pl:54
25499 "You can also run virt-inspector directly on disk images from a single "
25500 "virtual machine. Use C<virt-inspector guest.img>. In rare cases a domain "
25501 "has several block devices, in which case you should list them one after "
25502 "another, with the first corresponding to the guest's C</dev/sda>, the second "
25503 "to the guest's C</dev/sdb> and so on."
25507 #: ../inspector/virt-inspector.pl:60
25509 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
25510 "inspect several virtual machines, you have to run virt-inspector several "
25511 "times (for example, from a shell script for-loop)."
25515 #: ../inspector/virt-inspector.pl:65
25517 "Because virt-inspector needs direct access to guest images, it won't "
25518 "normally work over remote libvirt connections."
25522 #: ../inspector/virt-inspector.pl:78 ../tools/virt-edit.pl:82 ../tools/virt-win-reg.pl:181 ../tools/virt-df.pl:81 ../tools/virt-ls.pl:88 ../tools/virt-list-filesystems.pl:60 ../tools/virt-tar.pl:108 ../tools/virt-rescue.pl:113 ../tools/virt-make-fs.pl:163 ../tools/virt-list-partitions.pl:61
25523 msgid "Display brief help."
25527 #: ../inspector/virt-inspector.pl:84 ../tools/virt-edit.pl:88 ../tools/virt-win-reg.pl:187 ../tools/virt-df.pl:87 ../tools/virt-ls.pl:94 ../tools/virt-resize.pl:273 ../tools/virt-list-filesystems.pl:66 ../tools/virt-tar.pl:114 ../tools/virt-rescue.pl:119 ../tools/virt-make-fs.pl:169 ../tools/virt-list-partitions.pl:67
25528 msgid "B<--version>"
25532 #: ../inspector/virt-inspector.pl:86 ../tools/virt-edit.pl:90 ../tools/virt-win-reg.pl:189 ../tools/virt-df.pl:89 ../tools/virt-ls.pl:96 ../tools/virt-resize.pl:275 ../tools/virt-list-filesystems.pl:68 ../tools/virt-tar.pl:116 ../tools/virt-rescue.pl:121 ../tools/virt-make-fs.pl:171 ../tools/virt-list-partitions.pl:69
25533 msgid "Display version number and exit."
25537 #: ../inspector/virt-inspector.pl:92 ../tools/virt-edit.pl:112 ../tools/virt-win-reg.pl:203 ../tools/virt-df.pl:95 ../tools/virt-ls.pl:102 ../tools/virt-list-filesystems.pl:74 ../tools/virt-tar.pl:122 ../tools/virt-rescue.pl:135 ../tools/virt-list-partitions.pl:75
25538 msgid "B<--connect URI> | B<-c URI>"
25542 #: ../inspector/virt-inspector.pl:94 ../tools/virt-edit.pl:114 ../tools/virt-win-reg.pl:205 ../tools/virt-df.pl:97 ../tools/virt-ls.pl:104 ../tools/virt-list-filesystems.pl:76 ../tools/virt-tar.pl:124 ../tools/virt-rescue.pl:137 ../tools/virt-list-partitions.pl:77
25544 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
25545 "to the default libvirt hypervisor."
25549 #: ../inspector/virt-inspector.pl:97
25551 "Libvirt is only used if you specify a C<domname> on the command line. If "
25552 "you specify guest block devices directly, then libvirt is not used at all."
25556 #: ../inspector/virt-inspector.pl:105 ../tools/virt-edit.pl:124 ../tools/virt-win-reg.pl:215 ../tools/virt-df.pl:117 ../tools/virt-ls.pl:114 ../tools/virt-resize.pl:523 ../tools/virt-list-filesystems.pl:86 ../tools/virt-tar.pl:134 ../tools/virt-rescue.pl:147 ../tools/virt-list-partitions.pl:87
25557 msgid "B<--format> raw"
25561 #: ../inspector/virt-inspector.pl:107 ../tools/virt-edit.pl:126 ../tools/virt-win-reg.pl:217 ../tools/virt-df.pl:119 ../tools/virt-ls.pl:116 ../tools/virt-list-filesystems.pl:88 ../tools/virt-tar.pl:136 ../tools/virt-rescue.pl:149 ../tools/virt-list-partitions.pl:89
25563 "Specify the format of disk images given on the command line. If this is "
25564 "omitted then the format is autodetected from the content of the disk image."
25568 #: ../inspector/virt-inspector.pl:111 ../tools/virt-edit.pl:130 ../tools/virt-win-reg.pl:221 ../tools/virt-df.pl:123 ../tools/virt-ls.pl:120 ../tools/virt-list-filesystems.pl:92 ../tools/virt-tar.pl:140 ../tools/virt-rescue.pl:153 ../tools/virt-list-partitions.pl:93
25570 "If disk images are requested from libvirt, then this program asks libvirt "
25571 "for this information. In this case, the value of the format parameter is "
25576 #: ../inspector/virt-inspector.pl:115 ../tools/virt-edit.pl:134 ../tools/virt-win-reg.pl:225 ../tools/virt-df.pl:127 ../tools/virt-ls.pl:124 ../tools/virt-resize.pl:528 ../tools/virt-resize.pl:543 ../tools/virt-list-filesystems.pl:96 ../tools/virt-tar.pl:144 ../tools/virt-rescue.pl:157 ../tools/virt-list-partitions.pl:97
25578 "If working with untrusted raw-format guest disk images, you should ensure "
25579 "the format is always specified."
25583 #: ../inspector/virt-inspector.pl:149
25588 #: ../inspector/virt-inspector.pl:151
25590 "The virt-inspector XML is described precisely in a RELAX NG schema which is "
25591 "supplied with libguestfs. This section is just an overview."
25595 #: ../inspector/virt-inspector.pl:154
25597 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
25598 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
25599 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
25600 "which is vanishingly rare in real world VMs."
25604 #: ../inspector/virt-inspector.pl:159
25605 msgid "E<lt>operatingsystemE<gt>"
25609 #: ../inspector/virt-inspector.pl:161
25611 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
25612 "describe the operating system, its architecture, the descriptive \"product "
25613 "name\" string, the type of OS and so on, as in this example:"
25617 #: ../inspector/virt-inspector.pl:165
25620 " <operatingsystems>\n"
25621 " <operatingsystem>\n"
25622 " <root>/dev/sda2</root>\n"
25623 " <name>windows</name>\n"
25624 " <arch>i386</arch>\n"
25625 " <distro>windows</distro>\n"
25626 " <product_name>Windows 7 Enterprise</product_name>\n"
25627 " <major_version>6</major_version>\n"
25628 " <minor_version>1</minor_version>\n"
25629 " <windows_systemroot>/Windows</windows_systemroot>\n"
25634 #: ../inspector/virt-inspector.pl:176
25636 "These fields are derived from the libguestfs inspection API, and you can "
25637 "find more details in L<guestfs(3)/INSPECTION>."
25641 #: ../inspector/virt-inspector.pl:179
25643 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
25644 "of view of libguestfs (block devices may have completely different names "
25645 "inside the VM itself)."
25649 #: ../inspector/virt-inspector.pl:246
25650 msgid "E<lt>mountpointsE<gt>"
25654 #: ../inspector/virt-inspector.pl:248
25656 "Un*x-like guests typically have multiple filesystems which are mounted at "
25657 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
25658 "element which looks like this:"
25662 #: ../inspector/virt-inspector.pl:252
25665 " <operatingsystems>\n"
25666 " <operatingsystem>\n"
25669 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
25670 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
25671 " </mountpoints>\n"
25676 #: ../inspector/virt-inspector.pl:260
25678 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
25679 "and may have completely different names inside the guest. Only mountable "
25680 "filesystems appear in this list, not things like swap devices."
25684 #: ../inspector/virt-inspector.pl:282
25685 msgid "E<lt>filesystemsE<gt>"
25689 #: ../inspector/virt-inspector.pl:284
25691 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
25692 "filesystems belonging to the guest, including swap and empty partitions. "
25693 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
25694 "this OS or shared by this OS and other OSes)."
25698 #: ../inspector/virt-inspector.pl:289
25699 msgid "You might see something like this:"
25703 #: ../inspector/virt-inspector.pl:291
25706 " <operatingsystems>\n"
25707 " <operatingsystem>\n"
25710 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
25711 " <type>ext4</type>\n"
25712 " <label>Fedora-13-x86_64</label>\n"
25713 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
25719 #: ../inspector/virt-inspector.pl:301
25721 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
25722 "the label, and the UUID."
25726 #: ../inspector/virt-inspector.pl:343
25727 msgid "E<lt>applicationsE<gt>"
25731 #: ../inspector/virt-inspector.pl:345
25733 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
25734 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
25735 "machine. At the moment we are only able to list RPMs and Debian packages "
25736 "installed, but in future we will support other Linux distros and Windows."
25740 #: ../inspector/virt-inspector.pl:351
25742 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
25743 "Typical values would be C<rpm> and C<deb>."
25747 #: ../inspector/virt-inspector.pl:354
25749 "E<lt>package_managementE<gt>, if present, describes the package manager. "
25750 "Typical values include C<yum>, C<up2date> and C<apt>"
25754 #: ../inspector/virt-inspector.pl:357
25755 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
25759 #: ../inspector/virt-inspector.pl:360
25762 " <operatingsystems>\n"
25763 " <operatingsystem>\n"
25765 " <applications>\n"
25767 " <name>coreutils</name>\n"
25768 " <version>8.5</version>\n"
25769 " <release>1</release>\n"
25770 " </application>\n"
25775 #: ../inspector/virt-inspector.pl:370
25777 "The version and release fields may not be available for some types guests. "
25778 "Other fields are possible, see "
25779 "L<guestfs(3)/guestfs_inspect_list_applications>."
25783 #: ../inspector/virt-inspector.pl:426
25784 msgid "USING XPATH"
25788 #: ../inspector/virt-inspector.pl:428
25790 "You can use the XPath query language, and/or the xpath tool, in order to "
25791 "select parts of the XML."
25795 #: ../inspector/virt-inspector.pl:433
25798 " $ virt-inspector Guest | xpath //filesystems\n"
25799 " Found 1 nodes:\n"
25802 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
25803 " <type>ext4</type>\n"
25809 #: ../inspector/virt-inspector.pl:441
25812 " $ virt-inspector Guest | \\\n"
25813 " xpath \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
25814 " Query didn't return a nodeset. Value: ext4\n"
25819 #: ../inspector/virt-inspector.pl:445 ../tools/virt-edit.pl:343 ../tools/virt-win-reg.pl:141 ../tools/virt-win-reg.pl:477 ../tools/virt-df.pl:633 ../tools/virt-ls.pl:225 ../tools/virt-resize.pl:1479 ../tools/virt-list-filesystems.pl:179 ../tools/virt-tar.pl:274 ../tools/virt-rescue.pl:260 ../tools/virt-make-fs.pl:527 ../tools/virt-list-partitions.pl:247
25820 msgid "SHELL QUOTING"
25824 #: ../inspector/virt-inspector.pl:447 ../tools/virt-edit.pl:345 ../tools/virt-win-reg.pl:479 ../tools/virt-df.pl:635 ../tools/virt-ls.pl:227 ../tools/virt-resize.pl:1481 ../tools/virt-list-filesystems.pl:181 ../tools/virt-tar.pl:276 ../tools/virt-rescue.pl:262 ../tools/virt-make-fs.pl:529 ../tools/virt-list-partitions.pl:249
25826 "Libvirt guest names can contain arbitrary characters, some of which have "
25827 "meaning to the shell such as C<#> and space. You may need to quote or "
25828 "escape these characters on the command line. See the shell manual page "
25829 "L<sh(1)> for details."
25833 #: ../inspector/virt-inspector.pl:454
25835 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
25836 "L<Sys::Virt(3)>, L<http://www.w3.org/TR/xpath/>, L<http://libguestfs.org/>."
25840 #: ../inspector/virt-inspector.pl:468 ../tools/virt-edit.pl:364 ../tools/virt-win-reg.pl:512 ../tools/virt-df.pl:651 ../tools/virt-ls.pl:245 ../tools/virt-resize.pl:1510 ../tools/virt-list-filesystems.pl:200 ../tools/virt-tar.pl:294 ../tools/virt-rescue.pl:279 ../tools/virt-make-fs.pl:561 ../tools/virt-list-partitions.pl:267
25841 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
25845 #: ../inspector/virt-inspector.pl:472
25846 msgid "Matthew Booth L<mbooth@redhat.com>"
25850 #: ../inspector/virt-inspector.pl:478 ../tools/virt-win-reg.pl:516 ../tools/virt-resize.pl:1514 ../tools/virt-make-fs.pl:565
25851 msgid "Copyright (C) 2010 Red Hat Inc."
25855 #: ../tools/virt-edit.pl:34
25856 msgid "virt-edit - Edit a file in a virtual machine"
25860 #: ../tools/virt-edit.pl:38
25863 " virt-edit [--options] domname file\n"
25868 #: ../tools/virt-edit.pl:40
25871 " virt-edit [--options] disk.img [disk.img ...] file\n"
25876 #: ../tools/virt-edit.pl:42
25879 " virt-edit [domname|disk.img] file -e 'expr'\n"
25884 #: ../tools/virt-edit.pl:46
25886 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
25887 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
25888 "doing this, but doesn't catch all cases."
25892 #: ../tools/virt-edit.pl:52
25894 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
25895 "the named virtual machine (or disk image)."
25899 #: ../tools/virt-edit.pl:55
25901 "If you want to just view a file, use L<virt-cat(1)>. For more complex cases "
25902 "you should look at the L<guestfish(1)> tool."
25906 #: ../tools/virt-edit.pl:60
25907 msgid "Edit the named files interactively:"
25911 #: ../tools/virt-edit.pl:62
25914 " virt-edit mydomain /boot/grub/grub.conf\n"
25919 #: ../tools/virt-edit.pl:64
25922 " virt-edit mydomain /etc/passwd\n"
25927 #: ../tools/virt-edit.pl:66
25929 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
25930 "below). To change the init default level to 5:"
25934 #: ../tools/virt-edit.pl:70
25937 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
25942 #: ../tools/virt-edit.pl:96
25943 msgid "B<--backup extension> | B<-b extension>"
25947 #: ../tools/virt-edit.pl:98
25949 "Create a backup of the original file I<in the guest disk image>. The backup "
25950 "has the original filename with C<extension> added."
25954 #: ../tools/virt-edit.pl:101
25956 "Usually the first character of C<extension> would be a dot C<.> so you would "
25961 #: ../tools/virt-edit.pl:104
25964 " virt-edit -b .orig [etc]\n"
25969 #: ../tools/virt-edit.pl:106
25970 msgid "By default, no backup file is made."
25974 #: ../tools/virt-edit.pl:117 ../tools/virt-win-reg.pl:208 ../tools/virt-df.pl:100 ../tools/virt-ls.pl:107 ../tools/virt-list-filesystems.pl:79 ../tools/virt-tar.pl:127 ../tools/virt-rescue.pl:140 ../tools/virt-list-partitions.pl:80
25976 "If you specify guest block devices directly, then libvirt is not used at "
25981 #: ../tools/virt-edit.pl:141
25982 msgid "B<--expr EXPR> | B<-e EXPR>"
25986 #: ../tools/virt-edit.pl:143
25988 "Instead of launching the external editor, non-interactively apply the Perl "
25989 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
25994 #: ../tools/virt-edit.pl:147
25996 "Be careful to properly quote the expression to prevent it from being altered "
26001 #: ../tools/virt-edit.pl:268
26002 msgid "NON-INTERACTIVE EDITING"
26006 #: ../tools/virt-edit.pl:270
26008 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
26009 "administrator can interactively edit the file."
26013 #: ../tools/virt-edit.pl:273
26015 "There are two ways also to use C<virt-edit> from scripts in order to make "
26016 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
26017 "like this, it's less error-prone to write scripts directly using the "
26018 "libguestfs API and Augeas for configuration file editing.)"
26022 #: ../tools/virt-edit.pl:279
26024 "The first method is to temporarily set C<$EDITOR> to any script or program "
26025 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
26026 "update C<tmpfile> in place however it likes."
26030 #: ../tools/virt-edit.pl:283
26032 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
26033 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
26034 "instances of C<foo> with C<bar> in a file:"
26038 #: ../tools/virt-edit.pl:287
26041 " virt-edit domname filename -e 's/foo/bar/'\n"
26046 #: ../tools/virt-edit.pl:289
26048 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
26049 "For example to delete root's password you could do:"
26053 #: ../tools/virt-edit.pl:292
26056 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
26061 #: ../tools/virt-edit.pl:294
26063 "What really happens is that the snippet is evaluated as a Perl expression "
26064 "for each line of the file. The line, including the final C<\\n>, is passed "
26065 "in C<$_> and the expression should update C<$_> or leave it unchanged."
26069 #: ../tools/virt-edit.pl:299
26071 "To delete a line, set C<$_> to the empty string. For example, to delete the "
26072 "C<apache> user account from the password file you can do:"
26076 #: ../tools/virt-edit.pl:302
26079 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
26084 #: ../tools/virt-edit.pl:304
26086 "To insert a line, prepend or append it to C<$_>. However appending lines to "
26087 "the end of the file is rather difficult this way since there is no concept "
26088 "of \"last line of the file\" - your expression just doesn't get called "
26089 "again. You might want to use the first method (setting C<$EDITOR>) if you "
26094 #: ../tools/virt-edit.pl:310
26096 "The variable C<$lineno> contains the current line number. As is "
26097 "traditional, the first line in the file is number C<1>."
26101 #: ../tools/virt-edit.pl:313
26103 "The return value from the expression is ignored, but the expression may call "
26104 "C<die> in order to abort the whole program, leaving the original file "
26109 #: ../tools/virt-edit.pl:317
26111 "Remember when matching the end of a line that C<$_> may contain the final "
26112 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
26113 "newline then neither of these. Thus to match or substitute some text at the "
26114 "end of a line, use this regular expression:"
26118 #: ../tools/virt-edit.pl:322
26121 " /some text(\\r?\\n)?$/\n"
26126 #: ../tools/virt-edit.pl:324
26128 "Alternately, use the perl C<chomp> function, being careful not to chomp "
26129 "C<$_> itself (since that would remove all newlines from the file):"
26133 #: ../tools/virt-edit.pl:328
26136 " my $m = $_; chomp $m; $m =~ /some text$/\n"
26141 #: ../tools/virt-edit.pl:334
26146 #: ../tools/virt-edit.pl:336
26148 "If set, this string is used as the editor. It may contain arguments, "
26149 "eg. C<\"emacs -nw\">"
26153 #: ../tools/virt-edit.pl:339
26154 msgid "If not set, C<vi> is used."
26158 #: ../tools/virt-edit.pl:352
26160 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
26161 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>, "
26162 "L<perl(1)>, L<perlre(1)>."
26166 #: ../tools/virt-edit.pl:362 ../tools/virt-win-reg.pl:510 ../tools/virt-df.pl:649 ../tools/virt-ls.pl:243 ../tools/virt-resize.pl:1508 ../tools/virt-list-filesystems.pl:198 ../tools/virt-tar.pl:292 ../tools/virt-rescue.pl:277 ../tools/virt-make-fs.pl:559 ../tools/virt-list-partitions.pl:265
26171 #: ../tools/virt-edit.pl:368 ../tools/virt-df.pl:655 ../tools/virt-rescue.pl:283 ../tools/virt-list-partitions.pl:271
26172 msgid "Copyright (C) 2009-2010 Red Hat Inc."
26176 #: ../tools/virt-win-reg.pl:37
26178 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
26183 #: ../tools/virt-win-reg.pl:41
26186 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
26191 #: ../tools/virt-win-reg.pl:43
26194 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
26199 #: ../tools/virt-win-reg.pl:45
26202 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
26207 #: ../tools/virt-win-reg.pl:47
26210 " virt-win-reg --merge domname [input.reg ...]\n"
26215 #: ../tools/virt-win-reg.pl:49
26218 " virt-win-reg [--options] disk.img ... # instead of domname\n"
26223 #: ../tools/virt-win-reg.pl:53
26225 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
26226 "virtual machines. If you do this, you I<will> get irreversible disk "
26227 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
26228 "but doesn't catch all cases."
26232 #: ../tools/virt-win-reg.pl:58
26234 "Modifying the Windows Registry is an inherently risky operation. The format "
26235 "is deliberately obscure and undocumented, and Registry changes can leave the "
26236 "system unbootable. Therefore when using the C<--merge> option, make sure "
26237 "you have a reliable backup first."
26241 #: ../tools/virt-win-reg.pl:65
26243 "This program can export and merge Windows Registry entries from a Windows "
26248 #: ../tools/virt-win-reg.pl:68
26250 "The first parameter is the libvirt guest name or the raw disk image of a "
26255 #: ../tools/virt-win-reg.pl:71
26257 "If C<--merge> is I<not> specified, then the chosen registry key is "
26258 "displayed/exported (recursively). For example:"
26262 #: ../tools/virt-win-reg.pl:74
26265 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
26270 #: ../tools/virt-win-reg.pl:76
26271 msgid "You can also display single values from within registry keys, for example:"
26275 #: ../tools/virt-win-reg.pl:79
26278 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
26279 " $ virt-win-reg Windows7 $cvkey ProductName\n"
26280 " Windows 7 Enterprise\n"
26285 #: ../tools/virt-win-reg.pl:83
26287 "With C<--merge>, you can merge a textual regedit file into the Windows "
26292 #: ../tools/virt-win-reg.pl:86
26295 " $ virt-win-reg --merge Windows7 changes.reg\n"
26300 #: ../tools/virt-win-reg.pl:88
26301 msgid "SUPPORTED SYSTEMS"
26305 #: ../tools/virt-win-reg.pl:90
26307 "The program currently supports Windows NT-derived guests starting with "
26308 "Windows XP through to at least Windows 7."
26312 #: ../tools/virt-win-reg.pl:93
26314 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, "
26315 "C<HKEY_LOCAL_MACHINE\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, "
26316 "C<HKEY_LOCAL_MACHINE\\SYSTEM> and C<HKEY_USERS\\.DEFAULT>."
26320 #: ../tools/virt-win-reg.pl:97
26322 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
26327 #: ../tools/virt-win-reg.pl:100
26329 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
26334 #: ../tools/virt-win-reg.pl:103
26339 #: ../tools/virt-win-reg.pl:105
26341 "This program is only meant for simple access to the registry. If you want "
26342 "to do complicated things with the registry, we suggest you download the "
26343 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
26344 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
26345 "L<hivexregedit(1)>."
26349 #: ../tools/virt-win-reg.pl:111
26354 #: ../tools/virt-win-reg.pl:113
26356 "C<virt-win-reg> expects that regedit files have already been reencoded in "
26357 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
26358 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
26359 "with Windows-style line endings, you may need to reencode the whole file "
26360 "before or after processing."
26364 #: ../tools/virt-win-reg.pl:119
26366 "To reencode a file from Windows format to Linux (before processing it with "
26367 "the C<--merge> option), you would do something like this:"
26371 #: ../tools/virt-win-reg.pl:122
26374 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
26379 #: ../tools/virt-win-reg.pl:124
26381 "To go in the opposite direction, after exporting and before sending the file "
26382 "to a Windows user, do something like this:"
26386 #: ../tools/virt-win-reg.pl:127
26389 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
26394 #: ../tools/virt-win-reg.pl:129
26395 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
26399 #: ../tools/virt-win-reg.pl:131
26401 "If you are unsure about the current encoding, use the L<file(1)> command. "
26402 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
26403 "Windows-style (CRLF) line endings, like this:"
26407 #: ../tools/virt-win-reg.pl:135
26410 " $ file software.reg\n"
26411 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
26412 " with CRLF line terminators\n"
26417 #: ../tools/virt-win-reg.pl:139
26418 msgid "This file would need conversion before you could C<--merge> it."
26422 #: ../tools/virt-win-reg.pl:143
26424 "Be careful when passing parameters containing C<\\> (backslash) in the "
26425 "shell. Usually you will have to use 'single quotes' or double backslashes "
26426 "(but not both) to protect them from the shell."
26430 #: ../tools/virt-win-reg.pl:147
26431 msgid "Paths and value names are case-insensitive."
26435 #: ../tools/virt-win-reg.pl:149
26436 msgid "CurrentControlSet etc."
26440 #: ../tools/virt-win-reg.pl:151
26442 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
26443 "Registry at the level of the hive file, and therefore you cannot modify "
26448 #: ../tools/virt-win-reg.pl:155
26450 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
26451 "circumstances it might refer to another control set. The way to find out is "
26452 "to look at the C<HKLM\\SYSTEM\\Select> key:"
26456 #: ../tools/virt-win-reg.pl:159
26459 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
26460 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
26461 " \"Current\"=dword:00000001\n"
26462 " \"Default\"=dword:00000001\n"
26463 " \"Failed\"=dword:00000000\n"
26464 " \"LastKnownGood\"=dword:00000002\n"
26469 #: ../tools/virt-win-reg.pl:166
26470 msgid "\"Current\" is the one which Windows will choose when it boots."
26474 #: ../tools/virt-win-reg.pl:168
26475 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
26479 #: ../tools/virt-win-reg.pl:195 ../tools/virt-make-fs.pl:177
26484 #: ../tools/virt-win-reg.pl:197 ../tools/virt-resize.pl:501
26485 msgid "Enable debugging messages."
26489 #: ../tools/virt-win-reg.pl:232
26494 #: ../tools/virt-win-reg.pl:234
26496 "In merge mode, this merges a textual regedit file into the Windows Registry "
26497 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
26498 "displays or exports Registry entries instead."
26502 #: ../tools/virt-win-reg.pl:238
26504 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
26505 "result in disk corruption. However exporting (without this flag) is always "
26510 #: ../tools/virt-win-reg.pl:246
26511 msgid "B<--encoding> UTF-16LE|ASCII"
26515 #: ../tools/virt-win-reg.pl:248
26517 "When merging (only), you may need to specify the encoding for strings to be "
26518 "used in the hive file. This is explained in detail in "
26519 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
26523 #: ../tools/virt-win-reg.pl:252
26525 "The default is to use UTF-16LE, which should work with recent versions of "
26530 #: ../tools/virt-win-reg.pl:486
26532 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
26533 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
26534 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
26535 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
26539 #: ../tools/virt-win-reg.pl:501 ../tools/virt-make-fs.pl:550
26541 "When reporting bugs, please enable debugging and capture the I<complete> "
26546 #: ../tools/virt-win-reg.pl:504
26549 " export LIBGUESTFS_DEBUG=1\n"
26550 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
26555 #: ../tools/virt-win-reg.pl:507
26557 "Attach /tmp/virt-win-reg.log to a new bug report at "
26558 "L<https://bugzilla.redhat.com/>"
26562 #: ../tools/virt-df.pl:36
26563 msgid "virt-df - Display free space on virtual filesystems"
26567 #: ../tools/virt-df.pl:40
26570 " virt-df [--options]\n"
26575 #: ../tools/virt-df.pl:42
26578 " virt-df [--options] domname\n"
26583 #: ../tools/virt-df.pl:44
26586 " virt-df [--options] disk.img [disk.img ...]\n"
26591 #: ../tools/virt-df.pl:48
26593 "C<virt-df> is a command line tool to display free space on virtual machine "
26594 "filesystems. Unlike other tools, it doesn't just display the amount of "
26595 "space allocated to a virtual machine, but can look inside the virtual "
26596 "machine to see how much space is really being used."
26600 #: ../tools/virt-df.pl:53
26602 "It is like the L<df(1)> command, but for virtual machines, except that it "
26603 "also works for Windows virtual machines."
26607 #: ../tools/virt-df.pl:56
26609 "If used without any arguments, C<virt-df> checks with libvirt to get a list "
26610 "of all active and inactive guests, and performs a C<df>-type operation on "
26611 "each one in turn, printing out the results."
26615 #: ../tools/virt-df.pl:60
26617 "If used with any argument(s), C<virt-df> performs a C<df>-type operation on "
26618 "either the single named libvirt domain, or on the disk image(s) listed on "
26619 "the command line (which must all belong to a single VM). In this mode (with "
26620 "arguments), C<virt-df> will I<only work for a single guest>. If you want to "
26621 "run on multiple guests, then you have to invoke C<virt-df> multiple times."
26625 #: ../tools/virt-df.pl:67
26627 "Use the C<--csv> option to get a format which can be easily parsed by other "
26628 "programs. Other options are mostly similar to standard C<df> options. See "
26629 "below for the complete list."
26633 #: ../tools/virt-df.pl:107
26638 #: ../tools/virt-df.pl:109
26640 "Write out the results in CSV format (comma-separated values). This format "
26641 "can be imported easily into databases and spreadsheets, but read L</NOTE "
26642 "ABOUT CSV FORMAT> below."
26646 #: ../tools/virt-df.pl:134
26647 msgid "B<--human-readable> | B<-h>"
26651 #: ../tools/virt-df.pl:136
26652 msgid "Print sizes in human-readable format."
26656 #: ../tools/virt-df.pl:138
26657 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
26661 #: ../tools/virt-df.pl:144
26662 msgid "B<--inodes> | B<-i>"
26666 #: ../tools/virt-df.pl:146
26667 msgid "Print inodes instead of blocks."
26671 #: ../tools/virt-df.pl:152
26672 msgid "B<--one-per-guest>"
26676 #: ../tools/virt-df.pl:154
26678 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
26679 "disks from several guests to a single libguestfs appliance."
26683 #: ../tools/virt-df.pl:157
26684 msgid "You might use this option in the following circumstances:"
26688 #: ../tools/virt-df.pl:163
26690 "If you think an untrusted guest might actively try to exploit the libguestfs "
26691 "appliance kernel, then this prevents one guest from interfering with the "
26692 "stats printed for another guest."
26696 #: ../tools/virt-df.pl:169
26698 "If the kernel has a bug which stops it from accessing a filesystem in one "
26699 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
26700 "and report stats for further guests."
26704 #: ../tools/virt-df.pl:180
26709 #: ../tools/virt-df.pl:182
26711 "Print UUIDs instead of names. This is useful for following a guest even "
26712 "when the guest is migrated or renamed, or when two guests happen to have the "
26717 #: ../tools/virt-df.pl:186
26719 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
26720 "images, we still print the disk image name even when this option is "
26725 #: ../tools/virt-df.pl:609
26726 msgid "NOTE ABOUT CSV FORMAT"
26730 #: ../tools/virt-df.pl:611
26732 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
26733 "should be easy to parse, but it is definitely not easy to parse."
26737 #: ../tools/virt-df.pl:614
26739 "Myth: Just split fields at commas. Reality: This does I<not> work "
26740 "reliably. This example has two columns:"
26744 #: ../tools/virt-df.pl:617
26747 " \"foo,bar\",baz\n"
26752 #: ../tools/virt-df.pl:619
26754 "Myth: Read the file one line at a time. Reality: This does I<not> work "
26755 "reliably. This example has one row:"
26759 #: ../tools/virt-df.pl:622
26768 #: ../tools/virt-df.pl:625
26770 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
26771 "packaged in major Linux distributions)."
26775 #: ../tools/virt-df.pl:628
26777 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
26778 "or Python's built-in csv library)."
26782 #: ../tools/virt-df.pl:631
26783 msgid "Most spreadsheets and databases can import CSV directly."
26787 #: ../tools/virt-df.pl:642
26789 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
26790 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
26794 #: ../tools/virt-ls.pl:34
26795 msgid "virt-ls - List files in a virtual machine"
26799 #: ../tools/virt-ls.pl:38
26802 " virt-ls [--options] domname directory\n"
26807 #: ../tools/virt-ls.pl:40
26810 " virt-ls [--options] disk.img [disk.img ...] directory\n"
26815 #: ../tools/virt-ls.pl:44
26817 "C<virt-ls> is a command line tool to list the names of files in a directory "
26818 "inside a virtual machine or disk image."
26822 #: ../tools/virt-ls.pl:47
26824 "C<virt-ls> is just a simple wrapper around L<libguestfs(3)> functionality. "
26825 "For more complex cases you should look at the L<guestfish(1)> tool."
26829 #: ../tools/virt-ls.pl:51
26831 "C<virt-ls> can be used in one of three modes: simple, long and recursive. A "
26832 "simple listing is like the ordinary L<ls(1)> command:"
26836 #: ../tools/virt-ls.pl:54
26839 " $ virt-ls myguest /\n"
26847 #: ../tools/virt-ls.pl:59
26848 msgid "With the C<-l> (C<--long>) option, C<virt-ls> shows more detail:"
26852 #: ../tools/virt-ls.pl:61
26855 " $ virt-ls -l myguest /\n"
26857 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
26858 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
26864 #: ../tools/virt-ls.pl:67
26866 "With the C<-R> (C<--recursive>) option, C<virt-ls> lists the names of files "
26867 "and directories recursively:"
26871 #: ../tools/virt-ls.pl:70
26874 " $ virt-ls -R myguest /tmp\n"
26882 #: ../tools/virt-ls.pl:75
26884 "You I<cannot> combine these options. To do more complicated things, use "
26889 #: ../tools/virt-ls.pl:131 ../tools/virt-list-filesystems.pl:103 ../tools/virt-list-partitions.pl:112
26890 msgid "B<-l> | B<--long>"
26894 #: ../tools/virt-ls.pl:133
26895 msgid "B<-R> | B<--recursive>"
26899 #: ../tools/virt-ls.pl:135
26901 "Select the mode. With neither of these options, C<virt-ls> produces a "
26902 "simple, flat list of the files in the named directory."
26906 #: ../tools/virt-ls.pl:138
26908 "C<virt-ls -l> produces a \"long listing\", which shows more detail (just "
26909 "like the plain C<ls -l> command)."
26913 #: ../tools/virt-ls.pl:141
26915 "C<virt-ls -R> produces a recursive list of files starting at the named "
26916 "directory. See the documentation for L<guestfs(3)/guestfs_find> for precise "
26921 #: ../tools/virt-ls.pl:145
26922 msgid "You cannot combine these options."
26926 #: ../tools/virt-ls.pl:234
26928 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
26929 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
26930 "L<http://libguestfs.org/>."
26934 #: ../tools/virt-ls.pl:249 ../tools/virt-list-filesystems.pl:204 ../tools/virt-tar.pl:298
26935 msgid "Copyright (C) 2009 Red Hat Inc."
26939 #: ../tools/virt-resize.pl:42
26940 msgid "virt-resize - Resize a virtual machine disk"
26944 #: ../tools/virt-resize.pl:46
26947 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
26948 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
26949 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
26954 #: ../tools/virt-resize.pl:52
26956 "Virt-resize is a tool which can resize a virtual machine disk, making it "
26957 "larger or smaller overall, and resizing or deleting any partitions contained "
26962 #: ../tools/virt-resize.pl:56
26964 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
26965 "not> be used on live virtual machines - for consistent results, shut the "
26966 "virtual machine down before resizing it."
26970 #: ../tools/virt-resize.pl:60
26972 "If you are not familiar with the associated tools: "
26973 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)> and L<virt-df(1)>, "
26974 "we recommend you go and read those manual pages first."
26978 #: ../tools/virt-resize.pl:68
26980 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
26981 "fill the extra 5GB of space."
26985 #: ../tools/virt-resize.pl:71
26988 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
26989 " virt-list-partitions -lht olddisk\n"
26990 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
26991 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
26996 #: ../tools/virt-resize.pl:76
26998 "As above, but make the /boot partition 200MB bigger, while giving the "
26999 "remaining space to /dev/sda2:"
27003 #: ../tools/virt-resize.pl:79
27006 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
27011 #: ../tools/virt-resize.pl:81
27012 msgid "As above, but the output format will be uncompressed qcow2:"
27016 #: ../tools/virt-resize.pl:83
27019 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
27020 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
27025 #: ../tools/virt-resize.pl:86
27026 msgid "DETAILED USAGE"
27030 #: ../tools/virt-resize.pl:88
27031 msgid "EXPANDING A VIRTUAL MACHINE DISK"
27035 #: ../tools/virt-resize.pl:92
27036 msgid "1. Shut down the virtual machine"
27040 #: ../tools/virt-resize.pl:94
27041 msgid "2. Locate input disk image"
27045 #: ../tools/virt-resize.pl:96
27047 "Locate the input disk image (ie. the file or device on the host containing "
27048 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
27049 "dumpxml> like this to find the disk image name:"
27053 #: ../tools/virt-resize.pl:100
27056 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
27057 " Found 1 nodes:\n"
27059 " <source dev=\"/dev/vg/lv_guest\" />\n"
27064 #: ../tools/virt-resize.pl:105
27065 msgid "3. Look at current sizing"
27069 #: ../tools/virt-resize.pl:107
27070 msgid "Use L<virt-list-partitions(1)> to display the current partitions and sizes:"
27074 #: ../tools/virt-resize.pl:110
27077 " # virt-list-partitions -lht /dev/vg/lv_guest\n"
27078 " /dev/sda1 ext3 101.9M\n"
27079 " /dev/sda2 pv 7.9G\n"
27080 " /dev/sda device 8.0G\n"
27085 #: ../tools/virt-resize.pl:115
27087 "(This example is a virtual machine with an 8 GB disk which we would like to "
27088 "expand up to 10 GB)."
27092 #: ../tools/virt-resize.pl:118
27093 msgid "4. Create output disk"
27097 #: ../tools/virt-resize.pl:120
27099 "Virt-resize cannot do in-place disk modifications. You have to have space "
27100 "to store the resized output disk."
27104 #: ../tools/virt-resize.pl:123
27105 msgid "To store the resized disk image in a file, create a file of a suitable size:"
27109 #: ../tools/virt-resize.pl:126
27112 " # rm -f outdisk\n"
27113 " # truncate -s 10G outdisk\n"
27118 #: ../tools/virt-resize.pl:129
27119 msgid "Or use L<lvcreate(1)> to create a logical volume:"
27123 #: ../tools/virt-resize.pl:131
27126 " # lvcreate -L 10G -n lv_name vg_name\n"
27131 #: ../tools/virt-resize.pl:133
27132 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
27136 #: ../tools/virt-resize.pl:135
27139 " # virsh pool-list\n"
27140 " # virsh vol-create-as poolname newvol 10G\n"
27145 #: ../tools/virt-resize.pl:138
27150 #: ../tools/virt-resize.pl:140
27152 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
27153 "file) and the output disk. The output disk is the one created in the "
27158 #: ../tools/virt-resize.pl:144
27161 " # virt-resize indisk outdisk\n"
27166 #: ../tools/virt-resize.pl:146
27168 "This command just copies disk image C<indisk> to disk image C<outdisk> "
27169 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
27170 "larger, then an extra, empty partition is created at the end of the disk "
27171 "covering the extra space. If C<outdisk> is smaller, then it will give an "
27176 #: ../tools/virt-resize.pl:152
27178 "More realistically you'd want to expand existing partitions in the disk "
27179 "image by passing extra options (for the full list see the L</OPTIONS> "
27184 #: ../tools/virt-resize.pl:156
27186 "L</--expand> is the most useful option. It expands the named partition "
27187 "within the disk to fill any extra space:"
27191 #: ../tools/virt-resize.pl:159
27194 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
27199 #: ../tools/virt-resize.pl:161
27201 "(In this case, an extra partition is I<not> created at the end of the disk, "
27202 "because there will be no unused space)."
27206 #: ../tools/virt-resize.pl:164
27208 "L</--resize> is the other commonly used option. The following would "
27209 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
27210 "rest of the available space:"
27214 #: ../tools/virt-resize.pl:168
27217 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
27218 " indisk outdisk\n"
27223 #: ../tools/virt-resize.pl:171
27225 "If the expanded partition in the image contains a filesystem or LVM PV, then "
27226 "if virt-resize knows how, it will resize the contents, the equivalent of "
27227 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or "
27228 "L<ntfsresize(8)>. However virt-resize does not know how to resize some "
27229 "filesystems, so you would have to online resize them after booting the "
27230 "guest. And virt-resize also does not resize anything inside an LVM PV, it "
27231 "just resizes the PV itself and leaves the user to resize any LVs inside that "
27236 #: ../tools/virt-resize.pl:180
27237 msgid "Other options are covered below."
27241 #: ../tools/virt-resize.pl:182
27246 #: ../tools/virt-resize.pl:184
27247 msgid "Thoroughly test the new disk image I<before> discarding the old one."
27251 #: ../tools/virt-resize.pl:186
27252 msgid "If you are using libvirt, edit the XML to point at the new disk:"
27256 #: ../tools/virt-resize.pl:188
27259 " # virsh edit guestname\n"
27264 #: ../tools/virt-resize.pl:190
27266 "Change E<lt>source ...E<gt>, see "
27267 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
27271 #: ../tools/virt-resize.pl:193
27272 msgid "Then start up the domain with the new, resized disk:"
27276 #: ../tools/virt-resize.pl:195
27279 " # virsh start guestname\n"
27284 #: ../tools/virt-resize.pl:197
27286 "and check that it still works. See also the L</NOTES> section below for "
27287 "additional information."
27291 #: ../tools/virt-resize.pl:200
27292 msgid "7. Resize LVs etc inside the guest"
27296 #: ../tools/virt-resize.pl:202
27297 msgid "(This can also be done offline using L<guestfish(1)>)"
27301 #: ../tools/virt-resize.pl:204
27303 "Once the guest has booted you should see the new space available, at least "
27304 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
27305 "may need to resize LVs inside PVs, and also resize filesystem types that "
27306 "virt-resize does not know how to expand."
27310 #: ../tools/virt-resize.pl:211
27311 msgid "SHRINKING A VIRTUAL MACHINE DISK"
27315 #: ../tools/virt-resize.pl:213
27317 "Shrinking is somewhat more complex than expanding, and only an overview is "
27322 #: ../tools/virt-resize.pl:216
27324 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
27325 "filesystems). The user has to shrink content before passing the disk image "
27326 "to virt-resize, and virt-resize will check that the content has been shrunk "
27331 #: ../tools/virt-resize.pl:221
27332 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
27336 #: ../tools/virt-resize.pl:223
27338 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
27339 "steps 3 and 4 above to allocate a new disk image."
27343 #: ../tools/virt-resize.pl:226
27344 msgid "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
27348 #: ../tools/virt-resize.pl:229
27349 msgid "IGNORING OR DELETING PARTITIONS"
27353 #: ../tools/virt-resize.pl:231
27355 "virt-resize also gives a convenient way to ignore or delete partitions when "
27356 "copying from the input disk to the output disk. Ignoring a partition speeds "
27357 "up the copy where you don't care about the existing contents of a "
27358 "partition. Deleting a partition removes it completely, but note that it "
27359 "also renumbers any partitions after the one which is deleted, which can "
27360 "leave some guests unbootable."
27364 #: ../tools/virt-resize.pl:238
27365 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
27369 #: ../tools/virt-resize.pl:240
27371 "If the input disk is in qcow2 format, then you may prefer that the output is "
27372 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
27373 "the fly. The output format is simply determined by the format of the empty "
27374 "output container that you provide. Thus to create qcow2 output, use:"
27378 #: ../tools/virt-resize.pl:246
27381 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
27386 #: ../tools/virt-resize.pl:248
27387 msgid "instead of the truncate command (use C<-c> for a compressed disk)."
27391 #: ../tools/virt-resize.pl:250
27392 msgid "Similarly, to get non-sparse raw output use:"
27396 #: ../tools/virt-resize.pl:252
27399 " fallocate -l size outdisk\n"
27404 #: ../tools/virt-resize.pl:254
27406 "(on older systems that don't have the L<fallocate(1)> command use C<dd "
27407 "if=/dev/zero of=outdisk bs=1M count=..>)"
27411 #: ../tools/virt-resize.pl:267
27412 msgid "Display help."
27416 #: ../tools/virt-resize.pl:281
27417 msgid "B<--resize part=size>"
27421 #: ../tools/virt-resize.pl:283
27423 "Resize the named partition (expanding or shrinking it) so that it has the "
27428 #: ../tools/virt-resize.pl:286
27430 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
27431 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
27432 "Exabytes; or as a percentage of the current size; or as a relative number or "
27433 "percentage. For example:"
27437 #: ../tools/virt-resize.pl:291
27440 " --resize /dev/sda2=10G\n"
27445 #: ../tools/virt-resize.pl:293
27448 " --resize /dev/sda4=90%\n"
27453 #: ../tools/virt-resize.pl:295
27456 " --resize /dev/sda2=+1G\n"
27461 #: ../tools/virt-resize.pl:297
27464 " --resize /dev/sda2=-200M\n"
27469 #: ../tools/virt-resize.pl:299
27472 " --resize /dev/sda1=+128K\n"
27477 #: ../tools/virt-resize.pl:301
27480 " --resize /dev/sda1=+10%\n"
27485 #: ../tools/virt-resize.pl:303
27488 " --resize /dev/sda1=-10%\n"
27493 #: ../tools/virt-resize.pl:305
27495 "You can increase the size of any partition. Virt-resize will expand the "
27496 "direct content of the partition if it knows how (see C<--expand> below)."
27500 #: ../tools/virt-resize.pl:309
27502 "You can only I<decrease> the size of partitions that contain filesystems or "
27503 "PVs which have already been shrunk. Virt-resize will check this has been "
27504 "done before proceeding, or else will print an error (see also "
27505 "C<--resize-force>)."
27509 #: ../tools/virt-resize.pl:314 ../tools/virt-resize.pl:406 ../tools/virt-resize.pl:423
27510 msgid "You can give this option multiple times."
27514 #: ../tools/virt-resize.pl:320
27515 msgid "B<--resize-force part=size>"
27519 #: ../tools/virt-resize.pl:322
27521 "This is the same as C<--resize> except that it will let you decrease the "
27522 "size of any partition. Generally this means you will lose any data which "
27523 "was at the end of the partition you shrink, but you may not care about that "
27524 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
27525 "as a swap partition)."
27529 #: ../tools/virt-resize.pl:328
27530 msgid "See also the C<--ignore> option."
27534 #: ../tools/virt-resize.pl:334
27535 msgid "B<--expand part>"
27539 #: ../tools/virt-resize.pl:336
27541 "Expand the named partition so it uses up all extra space (space left over "
27542 "after any other resize changes that you request have been done)."
27546 #: ../tools/virt-resize.pl:339
27548 "If virt-resize knows how, it will expand the direct content of the "
27549 "partition. For example, if the partition is an LVM PV, it will expand the "
27550 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
27551 "content it doesn't know about alone."
27555 #: ../tools/virt-resize.pl:344
27556 msgid "Currently virt-resize can resize:"
27560 #: ../tools/virt-resize.pl:350
27562 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
27567 #: ../tools/virt-resize.pl:355
27569 "NTFS filesystems contained directly in a partition, if libguestfs was "
27570 "compiled with support for NTFS."
27574 #: ../tools/virt-resize.pl:358
27576 "The filesystem must have been shut down consistently last time it was used. "
27577 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
27578 "consistency check, so at the first boot after resizing Windows will check "
27583 #: ../tools/virt-resize.pl:365
27585 "LVM PVs (physical volumes). However virt-resize does I<not> resize anything "
27586 "inside the PV. The user will have to resize LVs as desired."
27590 #: ../tools/virt-resize.pl:371 ../tools/virt-resize.pl:393
27591 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
27595 #: ../tools/virt-resize.pl:377
27596 msgid "B<--shrink part>"
27600 #: ../tools/virt-resize.pl:379
27602 "Shrink the named partition until the overall disk image fits in the "
27603 "destination. The named partition B<must> contain a filesystem or PV which "
27604 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
27605 "online tools). Virt-resize will check this and give an error if it has not "
27610 #: ../tools/virt-resize.pl:385
27612 "The amount by which the overall disk must be shrunk (after carrying out all "
27613 "other operations requested by the user) is called the \"deficit\". For "
27614 "example, a straight copy (assume no other operations) from a 5GB disk image "
27615 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
27616 "would give an error unless the user specified a partition to shrink and that "
27617 "partition had more than a gigabyte of free space."
27621 #: ../tools/virt-resize.pl:399
27622 msgid "B<--ignore part>"
27626 #: ../tools/virt-resize.pl:401
27628 "Ignore the named partition. Effectively this means the partition is "
27629 "allocated on the destination disk, but the content is not copied across from "
27630 "the source disk. The content of the partition will be blank (all zero "
27635 #: ../tools/virt-resize.pl:412
27636 msgid "B<--delete part>"
27640 #: ../tools/virt-resize.pl:414
27642 "Delete the named partition. It would be more accurate to describe this as "
27643 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
27644 "the original disk image is left intact."
27648 #: ../tools/virt-resize.pl:418
27650 "Note that when you delete a partition, then anything contained in the "
27651 "partition is also deleted. Furthermore, this causes any partitions that "
27652 "come after to be I<renumbered>, which can easily make your guest unbootable."
27656 #: ../tools/virt-resize.pl:429
27657 msgid "B<--LV-expand logvol>"
27661 #: ../tools/virt-resize.pl:431
27663 "This takes the logical volume and, as a final step, expands it to fill all "
27664 "the space available in its volume group. A typical usage, assuming a Linux "
27665 "guest with a single PV C</dev/sda2> and a root device called "
27666 "C</dev/vg_guest/lv_root> would be:"
27670 #: ../tools/virt-resize.pl:436
27673 " virt-resize indisk outdisk \\\n"
27674 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
27679 #: ../tools/virt-resize.pl:439
27681 "This would first expand the partition (and PV), and then expand the root "
27682 "device to fill the extra space in the PV."
27686 #: ../tools/virt-resize.pl:442
27688 "The contents of the LV are also resized if virt-resize knows how to do "
27689 "that. You can stop virt-resize from trying to expand the content by using "
27690 "the option C<--no-expand-content>."
27694 #: ../tools/virt-resize.pl:446
27695 msgid "Use L<virt-list-filesystems(1)> to list the filesystems in the guest."
27699 #: ../tools/virt-resize.pl:449
27701 "You can give this option multiple times, I<but> it doesn't make sense to do "
27702 "this unless the logical volumes you specify are all in different volume "
27707 #: ../tools/virt-resize.pl:457
27708 msgid "B<--no-copy-boot-loader>"
27712 #: ../tools/virt-resize.pl:459
27714 "By default, virt-resize copies over some sectors at the start of the disk "
27715 "(up to the beginning of the first partition). Commonly these sectors "
27716 "contain the Master Boot Record (MBR) and the boot loader, and are required "
27717 "in order for the guest to boot correctly."
27721 #: ../tools/virt-resize.pl:464
27723 "If you specify this flag, then this initial copy is not done. You may need "
27724 "to reinstall the boot loader in this case."
27728 #: ../tools/virt-resize.pl:472
27729 msgid "B<--no-extra-partition>"
27733 #: ../tools/virt-resize.pl:474
27735 "By default, virt-resize creates an extra partition if there is any extra, "
27736 "unused space after all resizing has happened. Use this option to prevent "
27737 "the extra partition from being created. If you do this then the extra space "
27738 "will be inaccessible until you run fdisk, parted, or some other partitioning "
27739 "tool in the guest."
27743 #: ../tools/virt-resize.pl:480
27745 "Note that if the surplus space is smaller than 10 MB, no extra partition "
27750 #: ../tools/virt-resize.pl:487
27751 msgid "B<--no-expand-content>"
27755 #: ../tools/virt-resize.pl:489
27757 "By default, virt-resize will try to expand the direct contents of "
27758 "partitions, if it knows how (see C<--expand> option above)."
27762 #: ../tools/virt-resize.pl:492
27764 "If you give the C<--no-expand-content> option then virt-resize will not "
27769 #: ../tools/virt-resize.pl:499
27770 msgid "B<-d> | B<--debug>"
27774 #: ../tools/virt-resize.pl:507
27775 msgid "B<-n> | B<--dryrun>"
27779 #: ../tools/virt-resize.pl:509
27780 msgid "Print a summary of what would be done, but don't do anything."
27784 #: ../tools/virt-resize.pl:515
27785 msgid "B<-q> | B<--quiet>"
27789 #: ../tools/virt-resize.pl:517
27790 msgid "Don't print the summary."
27794 #: ../tools/virt-resize.pl:525
27796 "Specify the format of the input disk image. If this flag is not given then "
27797 "it is auto-detected from the image itself."
27801 #: ../tools/virt-resize.pl:531
27803 "Note that this option I<does not> affect the output format. See L</QCOW2 "
27804 "AND NON-SPARSE RAW FORMATS>."
27808 #: ../tools/virt-resize.pl:538
27809 msgid "B<--output-format> raw"
27813 #: ../tools/virt-resize.pl:540
27815 "Specify the format of the output disk image. If this flag is not given then "
27816 "it is auto-detected from the image itself."
27820 #: ../tools/virt-resize.pl:546
27822 "Note that you still need to create the output disk with the right format. "
27823 "See L</QCOW2 AND NON-SPARSE RAW FORMATS>."
27827 #: ../tools/virt-resize.pl:1422 ../tools/virt-rescue.pl:90
27832 #: ../tools/virt-resize.pl:1424
27833 msgid "\"Partition 1 does not end on cylinder boundary.\""
27837 #: ../tools/virt-resize.pl:1426
27839 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
27840 "means the partitions will not be aligned to the ancient CHS geometry. "
27841 "However CHS geometry is meaningless for disks manufactured since the early "
27842 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
27843 "cylinders is not required by any modern operating system."
27847 #: ../tools/virt-resize.pl:1433
27848 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
27852 #: ../tools/virt-resize.pl:1435
27854 "In Windows Vista and later versions, Microsoft switched to using a separate "
27855 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
27856 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
27857 "the boot partition. Doing so seems to break the guest completely. However "
27858 "expanding the second partition (ie. C: drive) should work."
27862 #: ../tools/virt-resize.pl:1442
27864 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
27865 "NTFS partitions have been expanded. This is just a safety check and (unless "
27866 "it find errors) is nothing to worry about."
27870 #: ../tools/virt-resize.pl:1446
27871 msgid "GUEST BOOT STUCK AT \"GRUB\""
27875 #: ../tools/virt-resize.pl:1448
27877 "If a Linux guest does not boot after resizing, and the boot is stuck after "
27878 "printing C<GRUB> on the console, try reinstalling grub. This sometimes "
27879 "happens on older (RHEL 5-era) guests, for reasons we don't fully understand, "
27880 "although we think is to do with partition alignment."
27884 #: ../tools/virt-resize.pl:1453
27887 " guestfish -i -a newdisk\n"
27888 " ><fs> cat /boot/grub/device.map\n"
27889 " # check the contents of this file are sensible or\n"
27890 " # edit the file if necessary\n"
27891 " ><fs> grub-install / /dev/vda\n"
27897 #: ../tools/virt-resize.pl:1460
27899 "For more flexible guest reconfiguration, including if you need to specify "
27900 "other parameters to grub-install, use L<virt-rescue(1)>."
27904 #: ../tools/virt-resize.pl:1463
27905 msgid "ALTERNATIVE TOOLS"
27909 #: ../tools/virt-resize.pl:1465
27911 "There are several proprietary tools for resizing partitions. We won't "
27912 "mention any here."
27916 #: ../tools/virt-resize.pl:1468
27918 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
27919 "operations on disk images. They can resize and move partitions, but I don't "
27920 "think they can do anything with the contents, and they certainly don't "
27925 #: ../tools/virt-resize.pl:1473
27927 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
27928 "but at a much lower level. You will probably end up hand-calculating sector "
27929 "offsets, which is something that virt-resize was designed to avoid. If you "
27930 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
27935 #: ../tools/virt-resize.pl:1488
27937 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)>, L<virt-df(1)>, "
27938 "L<guestfs(3)>, L<guestfish(1)>, L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, "
27939 "L<resize2fs(8)>, L<ntfsresize(8)>, L<virsh(1)>, L<parted(8)>, "
27940 "L<truncate(1)>, L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, "
27941 "L<virt-rescue(1)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
27945 #: ../tools/virt-list-filesystems.pl:32
27946 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
27950 #: ../tools/virt-list-filesystems.pl:36
27953 " virt-list-filesystems [--options] domname\n"
27958 #: ../tools/virt-list-filesystems.pl:38
27961 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
27966 #: ../tools/virt-list-filesystems.pl:42
27968 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
27969 "are contained in a virtual machine or disk image."
27973 #: ../tools/virt-list-filesystems.pl:46
27975 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
27976 "functionality. For more complex cases you should look at the "
27977 "L<guestfish(1)> tool."
27981 #: ../tools/virt-list-filesystems.pl:105
27983 "With this option, C<virt-list-filesystems> displays the type of each "
27984 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
27988 #: ../tools/virt-list-filesystems.pl:112
27989 msgid "B<-a> | B<--all>"
27993 #: ../tools/virt-list-filesystems.pl:114
27995 "Normally we only show mountable filesystems. If this option is given then "
27996 "swap devices are shown too."
28000 #: ../tools/virt-list-filesystems.pl:188
28002 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
28003 "L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
28004 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
28008 #: ../tools/virt-tar.pl:33
28009 msgid "virt-tar - Extract or upload files to a virtual machine"
28013 #: ../tools/virt-tar.pl:37
28016 " virt-tar [--options] -x domname directory tarball\n"
28021 #: ../tools/virt-tar.pl:39
28024 " virt-tar [--options] -u domname tarball directory\n"
28029 #: ../tools/virt-tar.pl:41
28032 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
28037 #: ../tools/virt-tar.pl:43
28040 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
28045 #: ../tools/virt-tar.pl:47
28046 msgid "Download C</home> from the VM into a local tarball:"
28050 #: ../tools/virt-tar.pl:49
28053 " virt-tar -x domname /home home.tar\n"
28058 #: ../tools/virt-tar.pl:51
28061 " virt-tar -zx domname /home home.tar.gz\n"
28066 #: ../tools/virt-tar.pl:53
28067 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
28071 #: ../tools/virt-tar.pl:55
28074 " virt-tar -u domname uploadstuff.tar /tmp\n"
28079 #: ../tools/virt-tar.pl:57
28082 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
28087 #: ../tools/virt-tar.pl:61
28089 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
28090 "virtual machines. If you do this, you risk disk corruption in the VM. "
28091 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
28095 #: ../tools/virt-tar.pl:66
28097 "You can use C<-x> (extract) on live virtual machines, but you might get "
28098 "inconsistent results or errors if there is filesystem activity inside the "
28099 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
28100 "work, but the only way to guarantee consistent results is if the virtual "
28101 "machine is shut down."
28105 #: ../tools/virt-tar.pl:74
28107 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
28108 "parts of a guest filesystem. There are many possibilities: making backups, "
28109 "uploading data files, snooping on guest activity, fixing or customizing "
28114 #: ../tools/virt-tar.pl:79
28116 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
28117 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
28118 "should look at the L<guestfish(1)> tool."
28122 #: ../tools/virt-tar.pl:83
28124 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
28125 "its contents (recursively) from the virtual machine into a local tarball. "
28126 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
28127 "virtual machine. You cannot use these two options together."
28131 #: ../tools/virt-tar.pl:89
28133 "In addition, you may need to use the C<-z> (gZip) option to enable "
28134 "compression. When uploading, you have to specify C<-z> if the upload file "
28135 "is compressed because virt-tar won't detect this on its own."
28139 #: ../tools/virt-tar.pl:93
28141 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
28142 "example it cannot do PKZip files or bzip2 compression. If you want that "
28143 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
28144 "the L<libguestfs(3)> API)."
28148 #: ../tools/virt-tar.pl:151
28149 msgid "B<-x> | B<--extract> | B<--download>"
28153 #: ../tools/virt-tar.pl:153
28154 msgid "B<-u> | B<--upload>"
28158 #: ../tools/virt-tar.pl:155
28160 "Use C<-x> to extract (download) a directory from a virtual machine to a "
28165 #: ../tools/virt-tar.pl:158
28167 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
28168 "Please read the L</WARNING> section above before using this option."
28172 #: ../tools/virt-tar.pl:162
28173 msgid "You must specify exactly one of these options."
28177 #: ../tools/virt-tar.pl:168
28178 msgid "B<-z> | B<--gzip>"
28182 #: ../tools/virt-tar.pl:170
28183 msgid "Specify that the input or output tarball is gzip-compressed."
28187 #: ../tools/virt-tar.pl:283
28189 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
28190 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
28191 "L<http://libguestfs.org/>."
28195 #: ../tools/virt-rescue.pl:33
28196 msgid "virt-rescue - Run a rescue shell on a virtual machine"
28200 #: ../tools/virt-rescue.pl:37
28203 " virt-rescue [--options] domname\n"
28208 #: ../tools/virt-rescue.pl:39
28211 " virt-rescue [--options] disk.img [disk.img ...]\n"
28216 #: ../tools/virt-rescue.pl:43
28218 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
28219 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
28220 "you from doing this, but doesn't catch all cases."
28224 #: ../tools/virt-rescue.pl:47
28226 "However if you use the I<--ro> (read only) option, then you can attach a "
28227 "shell to a live virtual machine. The results might be strange or "
28228 "inconsistent at times but you won't get disk corruption."
28232 #: ../tools/virt-rescue.pl:53
28234 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
28235 "need for a CD. virt-rescue gives you a rescue shell and some simple "
28236 "recovery tools which you can use to examine or rescue a virtual machine or "
28241 #: ../tools/virt-rescue.pl:58
28243 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
28244 "on disk image(s):"
28248 #: ../tools/virt-rescue.pl:61
28251 " virt-rescue GuestName\n"
28256 #: ../tools/virt-rescue.pl:63
28259 " virt-rescue --ro /path/to/disk.img\n"
28264 #: ../tools/virt-rescue.pl:65
28267 " virt-rescue /dev/sdc\n"
28272 #: ../tools/virt-rescue.pl:67
28273 msgid "For live VMs you I<must> use the --ro option."
28277 #: ../tools/virt-rescue.pl:69
28279 "When you run virt-rescue on a virtual machine or disk image, you are placed "
28280 "in an interactive bash shell where you can use many ordinary Linux "
28281 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
28282 "appliance. You must mount the virtual machine's filesystems by hand. There "
28283 "is an empty directory called C</sysroot> where you can mount filesystems."
28287 #: ../tools/virt-rescue.pl:76
28289 "In the example below, we list logical volumes, then choose one to mount "
28290 "under C</sysroot>:"
28294 #: ../tools/virt-rescue.pl:79
28298 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
28299 " lv_root vg_f11x64 -wi-a- 8.83G\n"
28300 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
28301 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
28302 " ><rescue> ls /sysroot\n"
28307 #: ../tools/virt-rescue.pl:86
28309 "If you don't know what filesystems are available on the virtual machine then "
28310 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
28314 #: ../tools/virt-rescue.pl:92
28316 "Virt-rescue can be used on I<any> disk image file or device, not just a "
28317 "virtual machine. For example you can use it on a blank file if you want to "
28318 "partition that file (although we would recommend using L<guestfish(1)> "
28319 "instead as it is more suitable for this purpose). You can even use "
28320 "virt-rescue on things like SD cards."
28324 #: ../tools/virt-rescue.pl:98
28326 "This tool is just designed for quick interactive hacking on a virtual "
28327 "machine. For more structured access to a virtual machine disk image, you "
28328 "should use L<guestfs(3)>. To get a structured shell that you can use to "
28329 "make scripted changes to guests, use L<guestfish(1)>."
28333 #: ../tools/virt-rescue.pl:127
28334 msgid "B<--append kernelopts>"
28338 #: ../tools/virt-rescue.pl:129
28339 msgid "Pass additional options to the rescue kernel."
28343 #: ../tools/virt-rescue.pl:164
28344 msgid "B<--memsize MB> | B<-m MB>"
28348 #: ../tools/virt-rescue.pl:166
28350 "Change the amount of memory allocated to the rescue system. The default is "
28351 "set by libguestfs and is small but adequate for running system tools. The "
28352 "occasional program might need more memory. The parameter is specified in "
28357 #: ../tools/virt-rescue.pl:175
28358 msgid "B<--network MB>"
28362 #: ../tools/virt-rescue.pl:177
28363 msgid "Enable QEMU user networking in the guest."
28367 #: ../tools/virt-rescue.pl:183
28368 msgid "B<--ro> | B<-r>"
28372 #: ../tools/virt-rescue.pl:185
28373 msgid "Open the image read-only."
28377 #: ../tools/virt-rescue.pl:197
28379 "Enable SELinux in the rescue appliance. You should read "
28380 "L<guestfs(3)/SELINUX> before using this option."
28384 #: ../tools/virt-rescue.pl:257
28386 "Several environment variables affect virt-rescue. See "
28387 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
28391 #: ../tools/virt-rescue.pl:269
28393 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
28394 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
28398 #: ../tools/virt-make-fs.pl:37
28399 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
28403 #: ../tools/virt-make-fs.pl:41
28406 " virt-make-fs [--options] input.tar output.img\n"
28411 #: ../tools/virt-make-fs.pl:43
28414 " virt-make-fs [--options] input.tar.gz output.img\n"
28419 #: ../tools/virt-make-fs.pl:45
28422 " virt-make-fs [--options] directory output.img\n"
28427 #: ../tools/virt-make-fs.pl:49
28429 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
28430 "archive or some files in a directory. It is similar to tools like "
28431 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
28432 "it can create common filesystem types like ext2/3 or NTFS, which can be "
28433 "useful if you want to attach these filesystems to existing virtual machines "
28434 "(eg. to import large amounts of read-only data to a VM)."
28438 #: ../tools/virt-make-fs.pl:57
28439 msgid "Basic usage is:"
28443 #: ../tools/virt-make-fs.pl:59
28446 " virt-make-fs input output\n"
28451 #: ../tools/virt-make-fs.pl:61
28453 "where C<input> is either a directory containing files that you want to add, "
28454 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
28455 "C<output> is a disk image. The input type is detected automatically. The "
28456 "output disk image defaults to a raw ext2 image unless you specify extra "
28457 "flags (see L</OPTIONS> below)."
28461 #: ../tools/virt-make-fs.pl:67
28462 msgid "EXTRA SPACE"
28466 #: ../tools/virt-make-fs.pl:69
28468 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
28469 "the files that it contains, but might have extra space. Depending on how "
28470 "you are going to use the output, you might think this extra space is wasted "
28471 "and want to minimize it, or you might want to leave space so that more files "
28472 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
28473 "but you can use the C<--size> flag to leave space in the filesystem if you "
28478 #: ../tools/virt-make-fs.pl:77
28480 "An alternative way to leave extra space but not make the output image any "
28481 "bigger is to use an alternative disk image format (instead of the default "
28482 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
28483 "image format (check your hypervisor supports this before using it). This "
28484 "allows you to choose a large C<--size> but the extra space won't actually be "
28485 "allocated in the image until you try to store something in it."
28489 #: ../tools/virt-make-fs.pl:85
28491 "Don't forget that you can also use local commands including L<resize2fs(8)> "
28492 "and L<virt-resize(1)> to resize existing filesystems, or rerun "
28493 "virt-make-resize to build another image from scratch."
28497 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123 ../tools/virt-make-fs.pl:142
28502 #: ../tools/virt-make-fs.pl:91
28505 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
28510 #: ../tools/virt-make-fs.pl:93
28511 msgid "FILESYSTEM TYPE"
28515 #: ../tools/virt-make-fs.pl:95
28517 "The default filesystem type is C<ext2>. Just about any filesystem type that "
28518 "libguestfs supports can be used (but I<not> read-only formats like "
28519 "ISO9660). Here are some of the more common choices:"
28523 #: ../tools/virt-make-fs.pl:101
28528 #: ../tools/virt-make-fs.pl:103
28530 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
28531 "you are not going to use the filesystem in a way that requires the journal, "
28532 "then this is just wasted overhead."
28536 #: ../tools/virt-make-fs.pl:107
28537 msgid "I<ntfs> or I<vfat>"
28541 #: ../tools/virt-make-fs.pl:109
28542 msgid "Useful if exporting data to a Windows guest."
28546 #: ../tools/virt-make-fs.pl:111
28548 "I<Note for vfat>: The tar archive or local directory must only contain files "
28549 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
28550 "program running within libguestfs is unable to change the ownership of "
28551 "non-root files, since vfat itself does not support this."
28555 #: ../tools/virt-make-fs.pl:116
28560 #: ../tools/virt-make-fs.pl:118
28562 "Lower overhead than C<ext2>, but certain limitations on filename length and "
28563 "total filesystem size."
28567 #: ../tools/virt-make-fs.pl:125
28570 " virt-make-fs --type=minix input minixfs.img\n"
28575 #: ../tools/virt-make-fs.pl:127
28576 msgid "TO PARTITION OR NOT TO PARTITION"
28580 #: ../tools/virt-make-fs.pl:129
28581 msgid "Optionally virt-make-fs can add a partition table to the output disk."
28585 #: ../tools/virt-make-fs.pl:131
28587 "Adding a partition can make the disk image more compatible with certain "
28588 "virtualized operating systems which don't expect to see a filesystem "
28589 "directly located on a block device (Linux doesn't care and will happily "
28590 "handle both types)."
28594 #: ../tools/virt-make-fs.pl:136
28596 "On the other hand, if you have a partition table then the output image is no "
28597 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
28598 "directly on a partitioned disk image. (However libguestfs tools such as "
28599 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
28603 #: ../tools/virt-make-fs.pl:144
28604 msgid "Add an MBR partition:"
28608 #: ../tools/virt-make-fs.pl:146
28611 " virt-make-fs --partition -- input disk.img\n"
28616 #: ../tools/virt-make-fs.pl:148
28618 "If the output disk image could be terabyte-sized or larger, it's better to "
28619 "use an EFI/GPT-compatible partition table:"
28623 #: ../tools/virt-make-fs.pl:151
28626 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
28631 #: ../tools/virt-make-fs.pl:179
28632 msgid "Enable debugging information."
28636 #: ../tools/virt-make-fs.pl:185
28637 msgid "B<--size=E<lt>NE<gt>>"
28641 #: ../tools/virt-make-fs.pl:187
28642 msgid "B<--size=+E<lt>NE<gt>>"
28646 #: ../tools/virt-make-fs.pl:189
28647 msgid "B<-s E<lt>NE<gt>>"
28651 #: ../tools/virt-make-fs.pl:191
28652 msgid "B<-s +E<lt>NE<gt>>"
28656 #: ../tools/virt-make-fs.pl:193
28657 msgid "Use the C<--size> (or C<-s>) option to choose the size of the output image."
28661 #: ../tools/virt-make-fs.pl:196
28663 "If this option is I<not> given, then the output image will be just large "
28664 "enough to contain all the files, with not much wasted space."
28668 #: ../tools/virt-make-fs.pl:199
28670 "To choose a fixed size output disk, specify an absolute number followed by "
28671 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
28672 "Petabytes or Exabytes. This must be large enough to contain all the input "
28673 "files, else you will get an error."
28677 #: ../tools/virt-make-fs.pl:204
28679 "To leave extra space, specify C<+> (plus sign) and a number followed by "
28680 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
28681 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
28682 "the input files, and (approximately) an extra 200 MB free space."
28686 #: ../tools/virt-make-fs.pl:210
28688 "Note that virt-make-fs estimates free space, and therefore will not produce "
28689 "filesystems containing precisely the free space requested. (It is much more "
28690 "expensive and time-consuming to produce a filesystem which has precisely the "
28691 "desired free space)."
28695 #: ../tools/virt-make-fs.pl:219
28696 msgid "B<--format=E<lt>fmtE<gt>>"
28700 #: ../tools/virt-make-fs.pl:221
28701 msgid "B<-F E<lt>fmtE<gt>>"
28705 #: ../tools/virt-make-fs.pl:223
28706 msgid "Choose the output disk image format."
28710 #: ../tools/virt-make-fs.pl:225
28711 msgid "The default is C<raw> (raw disk image)."
28715 #: ../tools/virt-make-fs.pl:227
28717 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
28718 "that would really make sense here is C<qcow2>."
28722 #: ../tools/virt-make-fs.pl:234
28723 msgid "B<--type=E<lt>fsE<gt>>"
28727 #: ../tools/virt-make-fs.pl:236
28728 msgid "B<-t E<lt>fsE<gt>>"
28732 #: ../tools/virt-make-fs.pl:238
28733 msgid "Choose the output filesystem type."
28737 #: ../tools/virt-make-fs.pl:240
28738 msgid "The default is C<ext2>."
28742 #: ../tools/virt-make-fs.pl:242
28743 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
28747 #: ../tools/virt-make-fs.pl:249
28748 msgid "B<--partition>"
28752 #: ../tools/virt-make-fs.pl:251
28753 msgid "B<--partition=E<lt>parttypeE<gt>>"
28757 #: ../tools/virt-make-fs.pl:253
28759 "If specified, this flag adds an MBR partition table to the output disk "
28764 #: ../tools/virt-make-fs.pl:256
28766 "You can change the partition table type, eg. C<--partition=gpt> for large "
28771 #: ../tools/virt-make-fs.pl:259
28773 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
28774 "might consider the next parameter to be the partition type. For example:"
28778 #: ../tools/virt-make-fs.pl:263
28781 " virt-make-fs --partition input.tar ...\n"
28786 #: ../tools/virt-make-fs.pl:265
28788 "would cause virt-make-fs to think you wanted to use a partition type of "
28789 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
28790 "dash) between options and the input file argument:"
28794 #: ../tools/virt-make-fs.pl:269
28797 " virt-make-fs --partition -- input.tar ...\n"
28802 #: ../tools/virt-make-fs.pl:536
28804 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<mkisofs(1)>, "
28805 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
28806 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
28810 #: ../tools/virt-make-fs.pl:553
28813 " export LIBGUESTFS_DEBUG=1\n"
28814 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
28819 #: ../tools/virt-make-fs.pl:556
28821 "Attach /tmp/virt-make-fs.log to a new bug report at "
28822 "L<https://bugzilla.redhat.com/>"
28826 #: ../tools/virt-list-partitions.pl:32
28827 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
28831 #: ../tools/virt-list-partitions.pl:36
28834 " virt-list-partitions [--options] domname\n"
28839 #: ../tools/virt-list-partitions.pl:38
28842 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
28847 #: ../tools/virt-list-partitions.pl:42
28849 "C<virt-list-partitions> is a command line tool to list the partitions that "
28850 "are contained in a virtual machine or disk image. It is mainly useful as a "
28851 "first step to using L<virt-resize(1)>."
28855 #: ../tools/virt-list-partitions.pl:47
28857 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
28858 "functionality. For more complex cases you should look at the "
28859 "L<guestfish(1)> tool."
28863 #: ../tools/virt-list-partitions.pl:104
28864 msgid "B<-h> | B<--human-readable>"
28868 #: ../tools/virt-list-partitions.pl:106
28869 msgid "Show sizes in human-readable form (eg. \"1G\")."
28873 #: ../tools/virt-list-partitions.pl:114
28875 "With this option, C<virt-list-partitions> displays the type and size of each "
28876 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
28880 #: ../tools/virt-list-partitions.pl:121
28881 msgid "B<-t> | B<--total>"
28885 #: ../tools/virt-list-partitions.pl:123
28886 msgid "Display the total size of each block device (as a separate row or rows)."
28890 #: ../tools/virt-list-partitions.pl:256
28892 "L<guestfs(3)>, L<guestfish(1)>, L<virt-list-filesystems(1)>, "
28893 "L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
28894 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."