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.6\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2010-11-13 16:19+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:955 ../src/guestfs.pod:959 ../src/guestfs.pod:963 ../src/guestfs.pod:968 ../src/guestfs.pod:976 ../src/guestfs.pod:995 ../src/guestfs.pod:1003 ../src/guestfs.pod:1025 ../src/guestfs.pod:1029 ../src/guestfs.pod:1033 ../src/guestfs.pod:1037 ../src/guestfs.pod:1041 ../src/guestfs.pod:1045 ../src/guestfs.pod:1519 ../src/guestfs.pod:1524 ../src/guestfs.pod:1528 ../src/guestfs.pod:1638 ../src/guestfs.pod:1643 ../src/guestfs.pod:1647 ../src/guestfs.pod:1991 ../src/guestfs.pod:1997 ../src/guestfs.pod:2002 ../src/guestfs.pod:2008 ../src/guestfs.pod:2115 ../src/guestfs.pod:2119 ../src/guestfs.pod:2123 ../src/guestfs.pod:2127 ../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:550 ../inspector/virt-inspector.pl:554 ../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:1140 ../src/guestfs.pod:1271
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:1144 ../src/guestfs.pod:1275
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:1281
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."
1155 #: ../src/guestfs.pod:581
1156 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1160 #: ../src/guestfs.pod:583
1162 "Libguestfs can mount NTFS partitions. It does this using the "
1163 "L<http://www.ntfs-3g.org/> driver."
1167 #: ../src/guestfs.pod:586
1169 "DOS and Windows still use drive letters, and the filesystems are always "
1170 "treated as case insensitive by Windows itself, and therefore you might find "
1171 "a Windows configuration file referring to a path like "
1172 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
1173 "that directory might be referred to as C</WINDOWS/System32>."
1177 #: ../src/guestfs.pod:592
1179 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1180 "libguestfs to read the appropriate Windows Registry and configuration files, "
1181 "to determine yourself how drives are mapped (see also L<hivex(3)> and "
1182 "L<virt-inspector(1)>)."
1186 #: ../src/guestfs.pod:597
1188 "Replacing backslash characters with forward slash characters is also outside "
1189 "the scope of libguestfs, but something that you can easily do."
1193 #: ../src/guestfs.pod:600
1195 "Where we can help is in resolving the case insensitivity of paths. For "
1196 "this, call L</guestfs_case_sensitive_path>."
1200 #: ../src/guestfs.pod:603
1202 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1203 "files, through the library C<hivex> which is part of the libguestfs project "
1204 "although ships as a separate tarball. You have to locate and download the "
1205 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1206 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
1207 "L<virt-win-reg(1)> for more help on this issue."
1211 #: ../src/guestfs.pod:611
1212 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1216 #: ../src/guestfs.pod:613
1218 "Although we don't want to discourage you from using the C API, we will "
1219 "mention here that the same API is also available in other languages."
1223 #: ../src/guestfs.pod:616
1225 "The API is broadly identical in all supported languages. This means that "
1226 "the C call C<guestfs_mount(g,path)> is C<$g-E<gt>mount($path)> in Perl, "
1227 "C<g.mount(path)> in Python, and C<Guestfs.mount g path> in OCaml. In other "
1228 "words, a straightforward, predictable isomorphism between each language."
1232 #: ../src/guestfs.pod:622
1234 "Error messages are automatically transformed into exceptions if the language "
1239 #: ../src/guestfs.pod:625
1241 "We don't try to \"object orientify\" parts of the API in OO languages, "
1242 "although contributors are welcome to write higher level APIs above what we "
1243 "provide in their favourite languages if they wish."
1247 #: ../src/guestfs.pod:631
1252 #: ../src/guestfs.pod:633
1254 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1255 "identical to the C API. C++ classes and exceptions are not used."
1259 #: ../src/guestfs.pod:637
1264 #: ../src/guestfs.pod:639
1266 "The C# bindings are highly experimental. Please read the warnings at the "
1267 "top of C<csharp/Libguestfs.cs>."
1271 #: ../src/guestfs.pod:642
1276 #: ../src/guestfs.pod:644
1278 "This is the only language binding that is working but incomplete. Only "
1279 "calls which return simple integers have been bound in Haskell, and we are "
1280 "looking for help to complete this binding."
1284 #: ../src/guestfs.pod:648
1289 #: ../src/guestfs.pod:650
1291 "Full documentation is contained in the Javadoc which is distributed with "
1296 #: ../src/guestfs.pod:653
1301 #: ../src/guestfs.pod:655
1302 msgid "For documentation see the file C<guestfs.mli>."
1306 #: ../src/guestfs.pod:657
1311 #: ../src/guestfs.pod:659
1312 msgid "For documentation see L<Sys::Guestfs(3)>."
1316 #: ../src/guestfs.pod:661
1321 #: ../src/guestfs.pod:663
1323 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1324 "the php-libguestfs package for your distribution."
1328 #: ../src/guestfs.pod:666
1329 msgid "The PHP binding only works correctly on 64 bit machines."
1333 #: ../src/guestfs.pod:668
1338 #: ../src/guestfs.pod:670
1339 msgid "For documentation do:"
1343 #: ../src/guestfs.pod:672
1347 " >>> import guestfs\n"
1348 " >>> help (guestfs)\n"
1353 #: ../src/guestfs.pod:676
1358 #: ../src/guestfs.pod:678
1360 "Use the Guestfs module. There is no Ruby-specific documentation, but you "
1361 "can find examples written in Ruby in the libguestfs source."
1365 #: ../src/guestfs.pod:681
1366 msgid "B<shell scripts>"
1370 #: ../src/guestfs.pod:683
1371 msgid "For documentation see L<guestfish(1)>."
1375 #: ../src/guestfs.pod:687
1376 msgid "LIBGUESTFS GOTCHAS"
1380 #: ../src/guestfs.pod:689
1382 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1383 "system [...] that works in the way it is documented but is counterintuitive "
1384 "and almost invites mistakes.\""
1388 #: ../src/guestfs.pod:693
1390 "Since we developed libguestfs and the associated tools, there are several "
1391 "things we would have designed differently, but are now stuck with for "
1392 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1393 "release, you can expect these to change. Beware of them."
1397 #: ../src/guestfs.pod:701
1398 msgid "Autosync / forgetting to sync."
1402 #: ../src/guestfs.pod:703
1404 "When modifying a filesystem from C or another language, you B<must> unmount "
1405 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1406 "libguestfs handle. You can also call:"
1410 #: ../src/guestfs.pod:707
1413 " guestfs_set_autosync (g, 1);\n"
1418 #: ../src/guestfs.pod:709
1420 "to have the unmount/sync done automatically for you when the handle 'g' is "
1421 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
1426 #: ../src/guestfs.pod:713
1428 "If you forget to do this, then it is entirely possible that your changes "
1429 "won't be written out, or will be partially written, or (very rarely) that "
1430 "you'll get disk corruption."
1434 #: ../src/guestfs.pod:717
1436 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1437 "guestfish scripts that forget to sync will work just fine, which can make "
1438 "this very puzzling if you are trying to debug a problem."
1442 #: ../src/guestfs.pod:721
1444 "Update: Autosync is enabled by default for all API users starting from "
1445 "libguestfs 1.5.24."
1449 #: ../src/guestfs.pod:724
1450 msgid "Mount option C<-o sync> should not be the default."
1454 #: ../src/guestfs.pod:726
1456 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1457 "However C<-o sync> does not add any reliability benefit, but does have a "
1458 "very large performance impact."
1462 #: ../src/guestfs.pod:730
1464 "The work around is to use L</guestfs_mount_options> and set the mount "
1465 "options that you actually want to use."
1469 #: ../src/guestfs.pod:733
1470 msgid "Read-only should be the default."
1474 #: ../src/guestfs.pod:735
1476 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1477 "specify I<--rw> if you want to make changes to the image."
1481 #: ../src/guestfs.pod:738
1482 msgid "This would reduce the potential to corrupt live VM images."
1486 #: ../src/guestfs.pod:740
1488 "Note that many filesystems change the disk when you just mount and unmount, "
1489 "even if you didn't perform any writes. You need to use "
1490 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
1494 #: ../src/guestfs.pod:744
1495 msgid "guestfish command line is hard to use."
1499 #: ../src/guestfs.pod:746
1501 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1502 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1503 "exist, so it fails. In earlier versions of guestfish the error message was "
1504 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1505 "we should have used C<guestfish -c command> to run commands."
1509 #: ../src/guestfs.pod:753
1510 msgid "guestfish megabyte modifiers don't work right on all commands"
1514 #: ../src/guestfs.pod:755
1516 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1517 "other modifiers). What guestfish actually does is to multiply the number "
1518 "part by the modifier part and pass the result to the C API. However this "
1519 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1520 "expecting some other unit (eg. megabytes)."
1524 #: ../src/guestfs.pod:762
1525 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1529 #: ../src/guestfs.pod:764
1532 " lvcreate LV VG 100M\n"
1537 #: ../src/guestfs.pod:766
1539 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1540 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1541 "megabytes * megabytes) logical volume. The error message you get from this "
1542 "is also a little obscure."
1546 #: ../src/guestfs.pod:771
1548 "This could be fixed in the generator by specially marking parameters and "
1549 "return values which take bytes or other units."
1553 #: ../src/guestfs.pod:774
1554 msgid "Ambiguity between devices and paths"
1558 #: ../src/guestfs.pod:776
1560 "There is a subtle ambiguity in the API between a device name "
1561 "(eg. C</dev/sdb2>) and a similar pathname. A file might just happen to be "
1562 "called C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1566 #: ../src/guestfs.pod:781
1568 "In the current API we usually resolve this ambiguity by having two separate "
1569 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1570 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1571 "detecting if the path supplied begins with C</dev/>."
1575 #: ../src/guestfs.pod:787
1577 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1578 "make paths/devices into structured names. One way to do this would be to "
1579 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1580 "aspect of grub. Another way would be to use a structured type, equivalent "
1581 "to this OCaml type:"
1585 #: ../src/guestfs.pod:793
1588 " type path = Path of string | Device of int | Partition of int * int\n"
1593 #: ../src/guestfs.pod:795
1594 msgid "which would allow you to pass arguments like:"
1598 #: ../src/guestfs.pod:797
1601 " Path \"/foo/bar\"\n"
1602 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
1603 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
1604 " Path \"/dev/sdb2\" (* not a device *)\n"
1609 #: ../src/guestfs.pod:802
1611 "As you can see there are still problems to resolve even with this "
1612 "representation. Also consider how it might work in guestfish."
1616 #: ../src/guestfs.pod:807
1617 msgid "PROTOCOL LIMITS"
1621 #: ../src/guestfs.pod:809
1623 "Internally libguestfs uses a message-based protocol to pass API calls and "
1624 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1625 "plenty more detail about this). The maximum message size used by the "
1626 "protocol is slightly less than 4 MB. For some API calls you may need to be "
1627 "aware of this limit. The API calls which may be affected are individually "
1628 "documented, with a link back to this section of the documentation."
1632 #: ../src/guestfs.pod:817
1634 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1635 "a simple string. Because this string is at some point internally encoded as "
1636 "a message, the maximum size that it can return is slightly under 4 MB. If "
1637 "the requested file is larger than this then you will get an error."
1641 #: ../src/guestfs.pod:823
1643 "In order to transfer large files into and out of the guest filesystem, you "
1644 "need to use particular calls that support this. The sections L</UPLOADING> "
1645 "and L</DOWNLOADING> document how to do this."
1649 #: ../src/guestfs.pod:827
1651 "You might also consider mounting the disk image using our FUSE filesystem "
1652 "support (L<guestmount(1)>)."
1656 #: ../src/guestfs.pod:830
1657 msgid "KEYS AND PASSPHRASES"
1661 #: ../src/guestfs.pod:832
1663 "Certain libguestfs calls take a parameter that contains sensitive key "
1664 "material, passed in as a C string."
1668 #: ../src/guestfs.pod:835
1670 "In the future we would hope to change the libguestfs implementation so that "
1671 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1672 "swap. However this is I<not> done at the moment, because of the complexity "
1673 "of such an implementation."
1677 #: ../src/guestfs.pod:840
1679 "Therefore you should be aware that any key parameter you pass to libguestfs "
1680 "might end up being written out to the swap partition. If this is a concern, "
1681 "scrub the swap partition or don't use libguestfs on encrypted devices."
1685 #: ../src/guestfs.pod:845
1686 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
1690 #: ../src/guestfs.pod:847
1692 "All high-level libguestfs actions are synchronous. If you want to use "
1693 "libguestfs asynchronously then you must create a thread."
1697 #: ../src/guestfs.pod:850
1699 "Only use the handle from a single thread. Either use the handle exclusively "
1700 "from one thread, or provide your own mutex so that two threads cannot issue "
1701 "calls on the same handle at the same time."
1705 #: ../src/guestfs.pod:854
1707 "See the graphical program guestfs-browser for one possible architecture for "
1708 "multithreaded programs using libvirt and libguestfs."
1712 #: ../src/guestfs.pod:857
1717 #: ../src/guestfs.pod:859
1719 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
1724 #: ../src/guestfs.pod:862
1726 "By default it looks for these in the directory C<$libdir/guestfs> "
1727 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
1731 #: ../src/guestfs.pod:865
1733 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
1734 "to change the directories that libguestfs will search in. The value is a "
1735 "colon-separated list of paths. The current directory is I<not> searched "
1736 "unless the path contains an empty element or C<.>. For example "
1737 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
1738 "then C</usr/lib/guestfs>."
1742 #: ../src/guestfs.pod:872
1743 msgid "QEMU WRAPPERS"
1747 #: ../src/guestfs.pod:874
1749 "If you want to compile your own qemu, run qemu from a non-standard location, "
1750 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
1755 #: ../src/guestfs.pod:878
1757 "There is one important rule to remember: you I<must C<exec qemu>> as the "
1758 "last command in the shell script (so that qemu replaces the shell and "
1759 "becomes the direct child of the libguestfs-using program). If you don't do "
1760 "this, then the qemu process won't be cleaned up correctly."
1764 #: ../src/guestfs.pod:883
1766 "Here is an example of a wrapper, where I have built my own copy of qemu from "
1771 #: ../src/guestfs.pod:886
1775 " qemudir=/home/rjones/d/qemu\n"
1776 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
1782 #: ../src/guestfs.pod:890
1784 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
1785 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
1790 #: ../src/guestfs.pod:894
1793 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
1798 #: ../src/guestfs.pod:896
1800 "Note that libguestfs also calls qemu with the -help and -version options in "
1801 "order to determine features."
1805 #: ../src/guestfs.pod:899
1806 msgid "ABI GUARANTEE"
1810 #: ../src/guestfs.pod:901
1812 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
1813 "actions as outlined in this section. Although we will deprecate some "
1814 "actions, for example if they get replaced by newer calls, we will keep the "
1815 "old actions forever. This allows you the developer to program in confidence "
1816 "against the libguestfs API."
1820 #: ../src/guestfs.pod:907
1821 msgid "BLOCK DEVICE NAMING"
1825 #: ../src/guestfs.pod:909
1827 "In the kernel there is now quite a profusion of schemata for naming block "
1828 "devices (in this context, by I<block device> I mean a physical or virtual "
1829 "hard drive). The original Linux IDE driver used names starting with "
1830 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
1831 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
1832 "replacement for the old IDE driver (particularly for SATA devices) those "
1833 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
1834 "machines with paravirtualized drivers. This has created several different "
1835 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
1840 #: ../src/guestfs.pod:921
1842 "As discussed above, libguestfs uses a qemu appliance running an embedded "
1843 "Linux kernel to access block devices. We can run a variety of appliances "
1844 "based on a variety of Linux kernels."
1848 #: ../src/guestfs.pod:925
1850 "This causes a problem for libguestfs because many API calls use device or "
1851 "partition names. Working scripts and the recipe (example) scripts that we "
1852 "make available over the internet could fail if the naming scheme changes."
1856 #: ../src/guestfs.pod:930
1858 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
1859 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
1860 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
1861 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
1865 #: ../src/guestfs.pod:936
1867 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
1868 "L</guestfs_list_partitions> and similar calls return the true names of the "
1869 "devices and partitions as known to the appliance."
1873 #: ../src/guestfs.pod:941
1874 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
1878 #: ../src/guestfs.pod:943
1880 "Usually this translation is transparent. However in some (very rare) cases "
1881 "you may need to know the exact algorithm. Such cases include where you use "
1882 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
1883 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
1888 #: ../src/guestfs.pod:949
1890 "The algorithm is applied only to I<parameters> which are known to be either "
1891 "device or partition names. Return values from functions such as "
1892 "L</guestfs_list_devices> are never changed."
1896 #: ../src/guestfs.pod:957
1897 msgid "Is the string a parameter which is a device or partition name?"
1901 #: ../src/guestfs.pod:961
1902 msgid "Does the string begin with C</dev/sd>?"
1906 #: ../src/guestfs.pod:965
1908 "Does the named device exist? If so, we use that device. However if I<not> "
1909 "then we continue with this algorithm."
1913 #: ../src/guestfs.pod:970
1914 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
1918 #: ../src/guestfs.pod:972
1919 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
1923 #: ../src/guestfs.pod:974
1924 msgid "If that named device exists, use it. If not, continue."
1928 #: ../src/guestfs.pod:978
1929 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
1933 #: ../src/guestfs.pod:980
1934 msgid "If that named device exists, use it. If not, return an error."
1938 #: ../src/guestfs.pod:984
1939 msgid "PORTABILITY CONCERNS WITH BLOCK DEVICE NAMING"
1943 #: ../src/guestfs.pod:986
1945 "Although the standard naming scheme and automatic translation is useful for "
1946 "simple programs and guestfish scripts, for larger programs it is best not to "
1947 "rely on this mechanism."
1951 #: ../src/guestfs.pod:990
1953 "Where possible for maximum future portability programs using libguestfs "
1954 "should use these future-proof techniques:"
1958 #: ../src/guestfs.pod:997
1960 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
1961 "device names, and then use those names directly."
1965 #: ../src/guestfs.pod:1000
1966 msgid "Since those device names exist by definition, they will never be translated."
1970 #: ../src/guestfs.pod:1005
1972 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
1973 "filesystem labels."
1977 #: ../src/guestfs.pod:1010
1982 #: ../src/guestfs.pod:1012
1984 "This section discusses security implications of using libguestfs, "
1985 "particularly with untrusted or malicious guests or disk images."
1989 #: ../src/guestfs.pod:1015
1990 msgid "GENERAL SECURITY CONSIDERATIONS"
1994 #: ../src/guestfs.pod:1017
1996 "Be careful with any files or data that you download from a guest (by "
1997 "\"download\" we mean not just the L</guestfs_download> command but any "
1998 "command that reads files, filenames, directories or anything else from a "
1999 "disk image). An attacker could manipulate the data to fool your program "
2000 "into doing the wrong thing. Consider cases such as:"
2004 #: ../src/guestfs.pod:1027
2005 msgid "the data (file etc) not being present"
2009 #: ../src/guestfs.pod:1031
2010 msgid "being present but empty"
2014 #: ../src/guestfs.pod:1035
2015 msgid "being much larger than normal"
2019 #: ../src/guestfs.pod:1039
2020 msgid "containing arbitrary 8 bit data"
2024 #: ../src/guestfs.pod:1043
2025 msgid "being in an unexpected character encoding"
2029 #: ../src/guestfs.pod:1047
2030 msgid "containing homoglyphs."
2034 #: ../src/guestfs.pod:1051
2035 msgid "SECURITY OF MOUNTING FILESYSTEMS"
2039 #: ../src/guestfs.pod:1053
2041 "When you mount a filesystem under Linux, mistakes in the kernel filesystem "
2042 "(VFS) module can sometimes be escalated into exploits by deliberately "
2043 "creating a malicious, malformed filesystem. These exploits are very severe "
2044 "for two reasons. Firstly there are very many filesystem drivers in the "
2045 "kernel, and many of them are infrequently used and not much developer "
2046 "attention has been paid to the code. Linux userspace helps potential "
2047 "crackers by detecting the filesystem type and automatically choosing the "
2048 "right VFS driver, even if that filesystem type is obscure or unexpected for "
2049 "the administrator. Secondly, a kernel-level exploit is like a local root "
2050 "exploit (worse in some ways), giving immediate and total access to the "
2051 "system right down to the hardware level."
2055 #: ../src/guestfs.pod:1066
2057 "That explains why you should never mount a filesystem from an untrusted "
2058 "guest on your host kernel. How about libguestfs? We run a Linux kernel "
2059 "inside a qemu virtual machine, usually running as a non-root user. The "
2060 "attacker would need to write a filesystem which first exploited the kernel, "
2061 "and then exploited either qemu virtualization (eg. a faulty qemu driver) or "
2062 "the libguestfs protocol, and finally to be as serious as the host kernel "
2063 "exploit it would need to escalate its privileges to root. This multi-step "
2064 "escalation, performed by a static piece of data, is thought to be extremely "
2065 "hard to do, although we never say 'never' about security issues."
2069 #: ../src/guestfs.pod:1077
2071 "In any case callers can reduce the attack surface by forcing the filesystem "
2072 "type when mounting (use L</guestfs_mount_vfs>)."
2076 #: ../src/guestfs.pod:1080
2077 msgid "PROTOCOL SECURITY"
2081 #: ../src/guestfs.pod:1082
2083 "The protocol is designed to be secure, being based on RFC 4506 (XDR) with a "
2084 "defined upper message size. However a program that uses libguestfs must "
2085 "also take care - for example you can write a program that downloads a binary "
2086 "from a disk image and executes it locally, and no amount of protocol "
2087 "security will save you from the consequences."
2091 #: ../src/guestfs.pod:1088
2092 msgid "INSPECTION SECURITY"
2096 #: ../src/guestfs.pod:1090
2098 "Parts of the inspection API (see L</INSPECTION>) return untrusted strings "
2099 "directly from the guest, and these could contain any 8 bit data. Callers "
2100 "should be careful to escape these before printing them to a structured file "
2101 "(for example, use HTML escaping if creating a web page)."
2105 #: ../src/guestfs.pod:1096
2107 "The inspection API parses guest configuration using two external libraries: "
2108 "Augeas (Linux configuration) and hivex (Windows Registry). Both are "
2109 "designed to be robust in the face of malicious data, although denial of "
2110 "service attacks are still possible, for example with oversized configuration "
2115 #: ../src/guestfs.pod:1102
2116 msgid "RUNNING UNTRUSTED GUEST COMMANDS"
2120 #: ../src/guestfs.pod:1104
2122 "Be very cautious about running commands from the guest. By running a "
2123 "command in the guest, you are giving CPU time to a binary that you do not "
2124 "control, under the same user account as the library, albeit wrapped in qemu "
2125 "virtualization. More information and alternatives can be found in the "
2126 "section L</RUNNING COMMANDS>."
2130 #: ../src/guestfs.pod:1110
2131 msgid "CVE-2010-3851"
2135 #: ../src/guestfs.pod:1112
2136 msgid "https://bugzilla.redhat.com/642934"
2140 #: ../src/guestfs.pod:1114
2142 "This security bug concerns the automatic disk format detection that qemu "
2143 "does on disk images."
2147 #: ../src/guestfs.pod:1117
2149 "A raw disk image is just the raw bytes, there is no header. Other disk "
2150 "images like qcow2 contain a special header. Qemu deals with this by looking "
2151 "for one of the known headers, and if none is found then assuming the disk "
2152 "image must be raw."
2156 #: ../src/guestfs.pod:1122
2158 "This allows a guest which has been given a raw disk image to write some "
2159 "other header. At next boot (or when the disk image is accessed by "
2160 "libguestfs) qemu would do autodetection and think the disk image format was, "
2161 "say, qcow2 based on the header written by the guest."
2165 #: ../src/guestfs.pod:1127
2167 "This in itself would not be a problem, but qcow2 offers many features, one "
2168 "of which is to allow a disk image to refer to another image (called the "
2169 "\"backing disk\"). It does this by placing the path to the backing disk "
2170 "into the qcow2 header. This path is not validated and could point to any "
2171 "host file (eg. \"/etc/passwd\"). The backing disk is then exposed through "
2172 "\"holes\" in the qcow2 disk image, which of course is completely under the "
2173 "control of the attacker."
2177 #: ../src/guestfs.pod:1135
2178 msgid "In libguestfs this is rather hard to exploit except under two circumstances:"
2182 #: ../src/guestfs.pod:1142
2183 msgid "You have enabled the network or have opened the disk in write mode."
2187 #: ../src/guestfs.pod:1146
2189 "You are also running untrusted code from the guest (see L</RUNNING "
2194 #: ../src/guestfs.pod:1151
2196 "The way to avoid this is to specify the expected disk format when adding "
2197 "disks (the optional C<format> option to L</guestfs_add_drive_opts>). You "
2198 "should always do this if the disk is raw format, and it's a good idea for "
2203 #: ../src/guestfs.pod:1156
2205 "For disks added from libvirt using calls like L</guestfs_add_domain>, the "
2206 "format is fetched from libvirt and passed through."
2210 #: ../src/guestfs.pod:1159
2212 "For libguestfs tools, use the I<--format> command line parameter as "
2217 #: ../src/guestfs.pod:1162
2218 msgid "CONNECTION MANAGEMENT"
2222 #: ../src/guestfs.pod:1164
2227 #: ../src/guestfs.pod:1166
2229 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
2230 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
2231 "handle and release all resources used."
2235 #: ../src/guestfs.pod:1170
2237 "For information on using multiple handles and threads, see the section "
2238 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> below."
2242 #: ../src/guestfs.pod:1173
2243 msgid "guestfs_create"
2247 #: ../src/guestfs.pod:1175
2250 " guestfs_h *guestfs_create (void);\n"
2255 #: ../src/guestfs.pod:1177
2256 msgid "Create a connection handle."
2260 #: ../src/guestfs.pod:1179
2262 "You have to call L</guestfs_add_drive_opts> (or one of the equivalent calls) "
2263 "on the handle at least once."
2267 #: ../src/guestfs.pod:1182
2269 "This function returns a non-NULL pointer to a handle on success or NULL on "
2274 #: ../src/guestfs.pod:1185
2275 msgid "After configuring the handle, you have to call L</guestfs_launch>."
2279 #: ../src/guestfs.pod:1187
2281 "You may also want to configure error handling for the handle. See L</ERROR "
2282 "HANDLING> section below."
2286 #: ../src/guestfs.pod:1190
2287 msgid "guestfs_close"
2291 #: ../src/guestfs.pod:1192
2294 " void guestfs_close (guestfs_h *g);\n"
2299 #: ../src/guestfs.pod:1194
2300 msgid "This closes the connection handle and frees up all resources used."
2304 #: ../src/guestfs.pod:1196
2305 msgid "ERROR HANDLING"
2309 #: ../src/guestfs.pod:1198
2311 "API functions can return errors. For example, almost all functions that "
2312 "return C<int> will return C<-1> to indicate an error."
2316 #: ../src/guestfs.pod:1201
2318 "Additional information is available for errors: an error message string and "
2319 "optionally an error number (errno) if the thing that failed was a system "
2324 #: ../src/guestfs.pod:1205
2326 "You can get at the additional information about the last error on the handle "
2327 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
2328 "up an error handler with L</guestfs_set_error_handler>."
2332 #: ../src/guestfs.pod:1210
2334 "When the handle is created, a default error handler is installed which "
2335 "prints the error message string to C<stderr>. For small short-running "
2336 "command line programs it is sufficient to do:"
2340 #: ../src/guestfs.pod:1214
2343 " if (guestfs_launch (g) == -1)\n"
2344 " exit (EXIT_FAILURE);\n"
2349 #: ../src/guestfs.pod:1217
2351 "since the default error handler will ensure that an error message has been "
2352 "printed to C<stderr> before the program exits."
2356 #: ../src/guestfs.pod:1220
2358 "For other programs the caller will almost certainly want to install an "
2359 "alternate error handler or do error handling in-line like this:"
2363 #: ../src/guestfs.pod:1223
2366 " g = guestfs_create ();\n"
2371 #: ../src/guestfs.pod:1225
2374 " /* This disables the default behaviour of printing errors\n"
2376 " guestfs_set_error_handler (g, NULL, NULL);\n"
2381 #: ../src/guestfs.pod:1229
2384 " if (guestfs_launch (g) == -1) {\n"
2385 " /* Examine the error message and print it etc. */\n"
2386 " char *msg = guestfs_last_error (g);\n"
2387 " int errnum = guestfs_last_errno (g);\n"
2388 " fprintf (stderr, \"%s\\n\", msg);\n"
2395 #: ../src/guestfs.pod:1237
2397 "Out of memory errors are handled differently. The default action is to call "
2398 "L<abort(3)>. If this is undesirable, then you can set a handler using "
2399 "L</guestfs_set_out_of_memory_handler>."
2403 #: ../src/guestfs.pod:1241
2405 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
2406 "because there is no handle if this happens there is no way to get additional "
2407 "error information. However L</guestfs_create> is supposed to be a "
2408 "lightweight operation which can only fail because of insufficient memory (it "
2409 "returns NULL in this case)."
2413 #: ../src/guestfs.pod:1247
2414 msgid "guestfs_last_error"
2418 #: ../src/guestfs.pod:1249
2421 " const char *guestfs_last_error (guestfs_h *g);\n"
2426 #: ../src/guestfs.pod:1251
2428 "This returns the last error message that happened on C<g>. If there has not "
2429 "been an error since the handle was created, then this returns C<NULL>."
2433 #: ../src/guestfs.pod:1255
2435 "The lifetime of the returned string is until the next error occurs, or "
2436 "L</guestfs_close> is called."
2440 #: ../src/guestfs.pod:1258
2441 msgid "guestfs_last_errno"
2445 #: ../src/guestfs.pod:1260
2448 " int guestfs_last_errno (guestfs_h *g);\n"
2453 #: ../src/guestfs.pod:1262
2454 msgid "This returns the last error number (errno) that happened on C<g>."
2458 #: ../src/guestfs.pod:1264
2459 msgid "If successful, an errno integer not equal to zero is returned."
2463 #: ../src/guestfs.pod:1266
2464 msgid "If no error, this returns 0. This call can return 0 in three situations:"
2468 #: ../src/guestfs.pod:1273
2469 msgid "There has not been any error on the handle."
2473 #: ../src/guestfs.pod:1277
2475 "There has been an error but the errno was meaningless. This corresponds to "
2476 "the case where the error did not come from a failed system call, but for "
2477 "some other reason."
2481 #: ../src/guestfs.pod:1283
2483 "There was an error from a failed system call, but for some reason the errno "
2484 "was not captured and returned. This usually indicates a bug in libguestfs."
2488 #: ../src/guestfs.pod:1289
2490 "Libguestfs tries to convert the errno from inside the applicance into a "
2491 "corresponding errno for the caller (not entirely trivial: the appliance "
2492 "might be running a completely different operating system from the library "
2493 "and error numbers are not standardized across Un*xen). If this could not be "
2494 "done, then the error is translated to C<EINVAL>. In practice this should "
2495 "only happen in very rare circumstances."
2499 #: ../src/guestfs.pod:1297
2500 msgid "guestfs_set_error_handler"
2504 #: ../src/guestfs.pod:1299
2507 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
2509 " const char *msg);\n"
2510 " void guestfs_set_error_handler (guestfs_h *g,\n"
2511 " guestfs_error_handler_cb cb,\n"
2517 #: ../src/guestfs.pod:1306
2519 "The callback C<cb> will be called if there is an error. The parameters "
2520 "passed to the callback are an opaque data pointer and the error message "
2525 #: ../src/guestfs.pod:1310
2527 "C<errno> is not passed to the callback. To get that the callback must call "
2528 "L</guestfs_last_errno>."
2532 #: ../src/guestfs.pod:1313
2534 "Note that the message string C<msg> is freed as soon as the callback "
2535 "function returns, so if you want to stash it somewhere you must make your "
2540 #: ../src/guestfs.pod:1317
2541 msgid "The default handler prints messages on C<stderr>."
2545 #: ../src/guestfs.pod:1319
2546 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
2550 #: ../src/guestfs.pod:1321
2551 msgid "guestfs_get_error_handler"
2555 #: ../src/guestfs.pod:1323
2558 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
2559 " void **opaque_rtn);\n"
2564 #: ../src/guestfs.pod:1326
2565 msgid "Returns the current error handler callback."
2569 #: ../src/guestfs.pod:1328
2570 msgid "guestfs_set_out_of_memory_handler"
2574 #: ../src/guestfs.pod:1330
2577 " typedef void (*guestfs_abort_cb) (void);\n"
2578 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
2579 " guestfs_abort_cb);\n"
2584 #: ../src/guestfs.pod:1334
2586 "The callback C<cb> will be called if there is an out of memory situation. "
2587 "I<Note this callback must not return>."
2591 #: ../src/guestfs.pod:1337
2592 msgid "The default is to call L<abort(3)>."
2596 #: ../src/guestfs.pod:1339
2597 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
2601 #: ../src/guestfs.pod:1342
2602 msgid "guestfs_get_out_of_memory_handler"
2606 #: ../src/guestfs.pod:1344
2609 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
2614 #: ../src/guestfs.pod:1346
2615 msgid "This returns the current out of memory handler."
2619 #: ../src/guestfs.pod:1348
2624 #: ../src/guestfs.pod:1350 ../fish/guestfish.pod:907
2629 #: ../src/guestfs.pod:1352
2634 #: ../src/guestfs.pod:1354
2639 #: ../src/guestfs.pod:1356
2640 msgid "AVAILABILITY"
2644 #: ../src/guestfs.pod:1358
2645 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
2649 #: ../src/guestfs.pod:1360
2651 "Using L</guestfs_available> you can test availability of the following "
2652 "groups of functions. This test queries the appliance to see if the "
2653 "appliance you are currently using supports the functionality."
2657 #: ../src/guestfs.pod:1365
2658 msgid "@AVAILABILITY@"
2662 #: ../src/guestfs.pod:1367
2663 msgid "GUESTFISH supported COMMAND"
2667 #: ../src/guestfs.pod:1369
2669 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
2670 "prints out the available groups and whether they are supported by this build "
2671 "of libguestfs. Note however that you have to do C<run> first."
2675 #: ../src/guestfs.pod:1374
2676 msgid "SINGLE CALLS AT COMPILE TIME"
2680 #: ../src/guestfs.pod:1376
2682 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
2683 "function, such as:"
2687 #: ../src/guestfs.pod:1379
2690 " #define LIBGUESTFS_HAVE_DD 1\n"
2695 #: ../src/guestfs.pod:1381
2696 msgid "if L</guestfs_dd> is available."
2700 #: ../src/guestfs.pod:1383
2702 "Before version 1.5.8, if you needed to test whether a single libguestfs "
2703 "function is available at compile time, we recommended using build tools such "
2704 "as autoconf or cmake. For example in autotools you could use:"
2708 #: ../src/guestfs.pod:1388
2711 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
2712 " AC_CHECK_FUNCS([guestfs_dd])\n"
2717 #: ../src/guestfs.pod:1391
2719 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
2724 #: ../src/guestfs.pod:1394
2725 msgid "SINGLE CALLS AT RUN TIME"
2729 #: ../src/guestfs.pod:1396
2731 "Testing at compile time doesn't guarantee that a function really exists in "
2732 "the library. The reason is that you might be dynamically linked against a "
2733 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
2734 "This situation unfortunately results in a segmentation fault, which is a "
2735 "shortcoming of the C dynamic linking system itself."
2739 #: ../src/guestfs.pod:1403
2741 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2742 "in this example program (note that you still need the compile time check as "
2747 #: ../src/guestfs.pod:1407
2750 " #include <stdio.h>\n"
2751 " #include <stdlib.h>\n"
2752 " #include <unistd.h>\n"
2753 " #include <dlfcn.h>\n"
2754 " #include <guestfs.h>\n"
2759 #: ../src/guestfs.pod:1413
2764 " #ifdef LIBGUESTFS_HAVE_DD\n"
2766 " int has_function;\n"
2771 #: ../src/guestfs.pod:1419
2774 " /* Test if the function guestfs_dd is really available. */\n"
2775 " dl = dlopen (NULL, RTLD_LAZY);\n"
2777 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2778 " exit (EXIT_FAILURE);\n"
2780 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2786 #: ../src/guestfs.pod:1428
2789 " if (!has_function)\n"
2790 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2792 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2793 " /* Now it's safe to call\n"
2794 " guestfs_dd (g, \"foo\", \"bar\");\n"
2798 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2805 #: ../src/guestfs.pod:1441
2807 "You may think the above is an awful lot of hassle, and it is. There are "
2808 "other ways outside of the C linking system to ensure that this kind of "
2809 "incompatibility never arises, such as using package versioning:"
2813 #: ../src/guestfs.pod:1446
2816 " Requires: libguestfs >= 1.0.80\n"
2821 #: ../src/guestfs.pod:1448
2822 msgid "CALLS WITH OPTIONAL ARGUMENTS"
2826 #: ../src/guestfs.pod:1450
2828 "A recent feature of the API is the introduction of calls which take optional "
2829 "arguments. In C these are declared 3 ways. The main way is as a call which "
2830 "takes variable arguments (ie. C<...>), as in this example:"
2834 #: ../src/guestfs.pod:1455
2837 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
2842 #: ../src/guestfs.pod:1457
2844 "Call this with a list of optional arguments, terminated by C<-1>. So to "
2845 "call with no optional arguments specified:"
2849 #: ../src/guestfs.pod:1460
2852 " guestfs_add_drive_opts (g, filename, -1);\n"
2857 #: ../src/guestfs.pod:1462
2858 msgid "With a single optional argument:"
2862 #: ../src/guestfs.pod:1464
2865 " guestfs_add_drive_opts (g, filename,\n"
2866 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2872 #: ../src/guestfs.pod:1468
2877 #: ../src/guestfs.pod:1470
2880 " guestfs_add_drive_opts (g, filename,\n"
2881 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2882 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
2888 #: ../src/guestfs.pod:1475
2890 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
2895 #: ../src/guestfs.pod:1478
2896 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
2900 #: ../src/guestfs.pod:1480
2902 "The second variant has the same name with the suffix C<_va>, which works the "
2903 "same way but takes a C<va_list>. See the C manual for details. For the "
2904 "example function, this is declared:"
2908 #: ../src/guestfs.pod:1484
2911 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
2917 #: ../src/guestfs.pod:1487
2918 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
2922 #: ../src/guestfs.pod:1489
2924 "The third variant is useful where you need to construct these calls. You "
2925 "pass in a structure where you fill in the optional fields. The structure "
2926 "has a bitmask as the first element which you must set to indicate which "
2927 "fields you have filled in. For our example function the structure and call "
2932 #: ../src/guestfs.pod:1495
2935 " struct guestfs_add_drive_opts_argv {\n"
2936 " uint64_t bitmask;\n"
2938 " const char *format;\n"
2941 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
2942 " const struct guestfs_add_drive_opts_argv *optargs);\n"
2947 #: ../src/guestfs.pod:1504
2948 msgid "You could call it like this:"
2952 #: ../src/guestfs.pod:1506
2955 " struct guestfs_add_drive_opts_argv optargs = {\n"
2956 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
2957 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
2959 " .format = \"qcow2\"\n"
2965 #: ../src/guestfs.pod:1513
2968 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
2973 #: ../src/guestfs.pod:1515 ../src/guestfs-actions.pod:11 ../src/guestfs-actions.pod:1842 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1255
2978 #: ../src/guestfs.pod:1521
2979 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
2983 #: ../src/guestfs.pod:1526
2984 msgid "You do not need to fill in all fields of the structure."
2988 #: ../src/guestfs.pod:1530
2990 "There must be a one-to-one correspondence between fields of the structure "
2991 "that are filled in, and bits set in the bitmask."
2995 #: ../src/guestfs.pod:1535
2996 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
3000 #: ../src/guestfs.pod:1537
3002 "In other languages, optional arguments are expressed in the way that is "
3003 "natural for that language. We refer you to the language-specific "
3004 "documentation for more details on that."
3008 #: ../src/guestfs.pod:1541
3009 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
3013 #: ../src/guestfs.pod:1543
3014 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
3018 #: ../src/guestfs.pod:1545
3020 "The child process generates events in some situations. Current events "
3021 "include: receiving a log message, the child process exits."
3025 #: ../src/guestfs.pod:1548
3027 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
3032 #: ../src/guestfs.pod:1551
3034 "Only I<one callback of each type> can be registered for each handle. "
3035 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
3036 "that type. Cancel all callbacks of this type by calling this function with "
3037 "C<cb> set to C<NULL>."
3041 #: ../src/guestfs.pod:1556
3042 msgid "guestfs_set_log_message_callback"
3046 #: ../src/guestfs.pod:1558
3049 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
3050 " char *buf, int len);\n"
3051 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
3052 " guestfs_log_message_cb cb,\n"
3058 #: ../src/guestfs.pod:1564
3060 "The callback function C<cb> will be called whenever qemu or the guest writes "
3061 "anything to the console."
3065 #: ../src/guestfs.pod:1567
3066 msgid "Use this function to capture kernel messages and similar."
3070 #: ../src/guestfs.pod:1569
3072 "Normally there is no log message handler, and log messages are just "
3077 #: ../src/guestfs.pod:1572
3078 msgid "guestfs_set_subprocess_quit_callback"
3082 #: ../src/guestfs.pod:1574
3085 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
3086 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
3087 " guestfs_subprocess_quit_cb cb,\n"
3093 #: ../src/guestfs.pod:1579
3095 "The callback function C<cb> will be called when the child process quits, "
3096 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
3097 "corresponds to a transition from any state to the CONFIG state)."
3101 #: ../src/guestfs.pod:1584
3102 msgid "guestfs_set_launch_done_callback"
3106 #: ../src/guestfs.pod:1586
3109 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
3110 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
3111 " guestfs_launch_done_cb cb,\n"
3117 #: ../src/guestfs.pod:1591
3119 "The callback function C<cb> will be called when the child process becomes "
3120 "ready first time after it has been launched. (This corresponds to a "
3121 "transition from LAUNCHING to the READY state)."
3125 #: ../src/guestfs.pod:1595
3126 msgid "guestfs_set_close_callback"
3130 #: ../src/guestfs.pod:1597
3133 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
3134 " void guestfs_set_close_callback (guestfs_h *g,\n"
3135 " guestfs_close_cb cb,\n"
3141 #: ../src/guestfs.pod:1602
3143 "The callback function C<cb> will be called while the handle is being closed "
3144 "(synchronously from L</guestfs_close>)."
3148 #: ../src/guestfs.pod:1605
3150 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
3151 "handles that are open when the program exits. This means that this callback "
3152 "might be called indirectly from L<exit(3)>, which can cause unexpected "
3153 "problems in higher-level languages (eg. if your HLL interpreter has already "
3154 "been cleaned up by the time this is called, and if your callback then jumps "
3155 "into some HLL function)."
3159 #: ../src/guestfs.pod:1613
3160 msgid "guestfs_set_progress_callback"
3164 #: ../src/guestfs.pod:1615
3167 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
3168 " int proc_nr, int serial,\n"
3169 " uint64_t position, uint64_t total);\n"
3170 " void guestfs_set_progress_callback (guestfs_h *g,\n"
3171 " guestfs_progress_cb cb,\n"
3177 #: ../src/guestfs.pod:1622
3179 "Some long-running operations can generate progress messages. If this "
3180 "callback is registered, then it will be called each time a progress message "
3181 "is generated (usually two seconds after the operation started, and three "
3182 "times per second thereafter until it completes, although the frequency may "
3183 "change in future versions)."
3187 #: ../src/guestfs.pod:1628
3189 "The callback receives two numbers: C<position> and C<total>. The units of "
3190 "C<total> are not defined, although for some operations C<total> may relate "
3191 "in some way to the amount of data to be transferred (eg. in bytes or "
3192 "megabytes), and C<position> may be the portion which has been transferred."
3196 #: ../src/guestfs.pod:1634
3197 msgid "The only defined and stable parts of the API are:"
3201 #: ../src/guestfs.pod:1640
3203 "The callback can display to the user some type of progress bar or indicator "
3204 "which shows the ratio of C<position>:C<total>."
3208 #: ../src/guestfs.pod:1645
3209 msgid "0 E<lt>= C<position> E<lt>= C<total>"
3213 #: ../src/guestfs.pod:1649
3215 "If any progress notification is sent during a call, then a final progress "
3216 "notification is always sent when C<position> = C<total>."
3220 #: ../src/guestfs.pod:1652
3222 "This is to simplify caller code, so callers can easily set the progress "
3223 "indicator to \"100%\" at the end of the operation, without requiring special "
3224 "code to detect this case."
3228 #: ../src/guestfs.pod:1658
3230 "The callback also receives the procedure number and serial number of the "
3231 "call. These are only useful for debugging protocol issues, and the callback "
3232 "can normally ignore them. The callback may want to print these numbers in "
3233 "error messages or debugging messages."
3237 #: ../src/guestfs.pod:1663
3238 msgid "PRIVATE DATA AREA"
3242 #: ../src/guestfs.pod:1665
3244 "You can attach named pieces of private data to the libguestfs handle, and "
3245 "fetch them by name for the lifetime of the handle. This is called the "
3246 "private data area and is only available from the C API."
3250 #: ../src/guestfs.pod:1669
3251 msgid "To attach a named piece of data, use the following call:"
3255 #: ../src/guestfs.pod:1671
3258 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
3263 #: ../src/guestfs.pod:1673
3265 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
3266 "pointer (which can be C<NULL>). Any previous item with the same name is "
3271 #: ../src/guestfs.pod:1677
3273 "You can use any C<key> you want, but names beginning with an underscore "
3274 "character are reserved for internal libguestfs purposes (for implementing "
3275 "language bindings). It is recommended to prefix the name with some unique "
3276 "string to avoid collisions with other users."
3280 #: ../src/guestfs.pod:1682
3281 msgid "To retrieve the pointer, use:"
3285 #: ../src/guestfs.pod:1684
3288 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
3293 #: ../src/guestfs.pod:1686
3295 "This function returns C<NULL> if either no data is found associated with "
3296 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
3301 #: ../src/guestfs.pod:1690
3303 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
3304 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
3305 "all. In particular, libguestfs does I<not> try to free the data when the "
3306 "handle is closed. If the data must be freed, then the caller must either "
3307 "free it before calling L</guestfs_close> or must set up a close callback to "
3308 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
3309 "can be registered for a handle)."
3313 #: ../src/guestfs.pod:1698
3315 "The private data area is implemented using a hash table, and should be "
3316 "reasonably efficient for moderate numbers of keys."
3320 #: ../src/guestfs.pod:1701 ../src/guestfs.pod:1706
3325 #: ../src/guestfs.pod:1703
3327 "<!-- old anchor for the next section --> <a "
3328 "name=\"state_machine_and_low_level_event_api\"/>"
3332 #: ../src/guestfs.pod:1708
3333 msgid "ARCHITECTURE"
3337 #: ../src/guestfs.pod:1710
3339 "Internally, libguestfs is implemented by running an appliance (a special "
3340 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
3341 "process of the main program."
3345 #: ../src/guestfs.pod:1714
3348 " ___________________\n"
3350 " | main program |\n"
3352 " | | child process / appliance\n"
3353 " | | __________________________\n"
3355 " +-------------------+ RPC | +-----------------+ |\n"
3356 " | libguestfs <--------------------> guestfsd | |\n"
3357 " | | | +-----------------+ |\n"
3358 " \\___________________/ | | Linux kernel | |\n"
3359 " | +--^--------------+ |\n"
3360 " \\_________|________________/\n"
3366 " \\______________/\n"
3371 #: ../src/guestfs.pod:1734
3373 "The library, linked to the main program, creates the child process and hence "
3374 "the appliance in the L</guestfs_launch> function."
3378 #: ../src/guestfs.pod:1737
3380 "Inside the appliance is a Linux kernel and a complete stack of userspace "
3381 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
3382 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
3383 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
3384 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
3385 "attached to the qemu process which translates device access by the "
3386 "appliance's Linux kernel into accesses to the image."
3390 #: ../src/guestfs.pod:1746
3392 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
3393 "Although the disk image you are attached to might also be used by some "
3394 "virtual machine, libguestfs doesn't know or care about this. (But you will "
3395 "care if both libguestfs's qemu process and your virtual machine are trying "
3396 "to update the disk image at the same time, since these usually results in "
3397 "massive disk corruption)."
3401 #: ../src/guestfs.pod:1753
3402 msgid "STATE MACHINE"
3406 #: ../src/guestfs.pod:1755
3407 msgid "libguestfs uses a state machine to model the child process:"
3411 #: ../src/guestfs.pod:1757
3423 " / | \\ \\ guestfs_launch\n"
3424 " / | _\\__V______\n"
3426 " / | | LAUNCHING |\n"
3427 " / | \\___________/\n"
3429 " / | guestfs_launch\n"
3431 " ______ / __|____V\n"
3432 " / \\ ------> / \\\n"
3433 " | BUSY | | READY |\n"
3434 " \\______/ <------ \\________/\n"
3439 #: ../src/guestfs.pod:1779
3441 "The normal transitions are (1) CONFIG (when the handle is created, but there "
3442 "is no child process), (2) LAUNCHING (when the child process is booting up), "
3443 "(3) alternating between READY and BUSY as commands are issued to, and "
3444 "carried out by, the child process."
3448 #: ../src/guestfs.pod:1784
3450 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
3451 "asynchronously at any time (eg. due to some internal error), and that causes "
3452 "the state to transition back to CONFIG."
3456 #: ../src/guestfs.pod:1788
3458 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
3459 "issued when in the CONFIG state."
3463 #: ../src/guestfs.pod:1791
3465 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
3466 "L</guestfs_launch> blocks until the child process is READY to accept "
3467 "commands (or until some failure or timeout). L</guestfs_launch> internally "
3468 "moves the state from CONFIG to LAUNCHING while it is running."
3472 #: ../src/guestfs.pod:1797
3474 "API actions such as L</guestfs_mount> can only be issued when in the READY "
3475 "state. These API calls block waiting for the command to be carried out "
3476 "(ie. the state to transition to BUSY and then back to READY). There are no "
3477 "non-blocking versions, and no way to issue more than one command per handle "
3482 #: ../src/guestfs.pod:1803
3484 "Finally, the child process sends asynchronous messages back to the main "
3485 "program, such as kernel log messages. You can register a callback to "
3486 "receive these messages."
3490 #: ../src/guestfs.pod:1807
3495 #: ../src/guestfs.pod:1809
3496 msgid "COMMUNICATION PROTOCOL"
3500 #: ../src/guestfs.pod:1811
3502 "Don't rely on using this protocol directly. This section documents how it "
3503 "currently works, but it may change at any time."
3507 #: ../src/guestfs.pod:1814
3509 "The protocol used to talk between the library and the daemon running inside "
3510 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
3511 "1014, RFC 1832, RFC 4506)."
3515 #: ../src/guestfs.pod:1818
3517 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
3518 "this file is automatically generated)."
3522 #: ../src/guestfs.pod:1821
3524 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
3525 "and C<FileOut> parameters, which are handled with very simple request/reply "
3526 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
3527 "parameters, which use the same request and reply messages, but they may also "
3528 "be followed by files sent using a chunked encoding."
3532 #: ../src/guestfs.pod:1828
3533 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
3537 #: ../src/guestfs.pod:1830
3538 msgid "For ordinary functions, the request message is:"
3542 #: ../src/guestfs.pod:1832
3545 " total length (header + arguments,\n"
3546 " but not including the length word itself)\n"
3547 " struct guestfs_message_header (encoded as XDR)\n"
3548 " struct guestfs_<foo>_args (encoded as XDR)\n"
3553 #: ../src/guestfs.pod:1837
3555 "The total length field allows the daemon to allocate a fixed size buffer "
3556 "into which it slurps the rest of the message. As a result, the total length "
3557 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
3558 "effective size of any request is limited to somewhere under this size."
3562 #: ../src/guestfs.pod:1843
3564 "Note also that many functions don't take any arguments, in which case the "
3565 "C<guestfs_I<foo>_args> is completely omitted."
3569 #: ../src/guestfs.pod:1846
3571 "The header contains the procedure number (C<guestfs_proc>) which is how the "
3572 "receiver knows what type of args structure to expect, or none at all."
3576 #: ../src/guestfs.pod:1850
3577 msgid "The reply message for ordinary functions is:"
3581 #: ../src/guestfs.pod:1852
3584 " total length (header + ret,\n"
3585 " but not including the length word itself)\n"
3586 " struct guestfs_message_header (encoded as XDR)\n"
3587 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3592 #: ../src/guestfs.pod:1857
3594 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
3595 "functions that return no formal return values."
3599 #: ../src/guestfs.pod:1860
3600 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
3604 #: ../src/guestfs.pod:1863
3606 "In the case of an error, a flag is set in the header, and the reply message "
3607 "is slightly changed:"
3611 #: ../src/guestfs.pod:1866
3614 " total length (header + error,\n"
3615 " but not including the length word itself)\n"
3616 " struct guestfs_message_header (encoded as XDR)\n"
3617 " struct guestfs_message_error (encoded as XDR)\n"
3622 #: ../src/guestfs.pod:1871
3624 "The C<guestfs_message_error> structure contains the error message as a "
3629 #: ../src/guestfs.pod:1874
3630 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
3634 #: ../src/guestfs.pod:1876
3636 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
3637 "The normal request message is sent (see above). However this is followed by "
3638 "a sequence of file chunks."
3642 #: ../src/guestfs.pod:1880
3645 " total length (header + arguments,\n"
3646 " but not including the length word itself,\n"
3647 " and not including the chunks)\n"
3648 " struct guestfs_message_header (encoded as XDR)\n"
3649 " struct guestfs_<foo>_args (encoded as XDR)\n"
3650 " sequence of chunks for FileIn param #0\n"
3651 " sequence of chunks for FileIn param #1 etc.\n"
3656 #: ../src/guestfs.pod:1888
3657 msgid "The \"sequence of chunks\" is:"
3661 #: ../src/guestfs.pod:1890
3664 " length of chunk (not including length word itself)\n"
3665 " struct guestfs_chunk (encoded as XDR)\n"
3666 " length of chunk\n"
3667 " struct guestfs_chunk (encoded as XDR)\n"
3669 " length of chunk\n"
3670 " struct guestfs_chunk (with data.data_len == 0)\n"
3675 #: ../src/guestfs.pod:1898
3677 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
3678 "is set in the final chunk to indicate either successful completion or early "
3683 #: ../src/guestfs.pod:1902
3685 "At time of writing there are no functions that have more than one FileIn "
3686 "parameter. However this is (theoretically) supported, by sending the "
3687 "sequence of chunks for each FileIn parameter one after another (from left to "
3692 #: ../src/guestfs.pod:1907
3694 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
3695 "transfer. The library does this by sending a chunk with a special flag set "
3696 "to indicate cancellation. When the daemon sees this, it cancels the whole "
3697 "RPC, does I<not> send any reply, and goes back to reading the next request."
3701 #: ../src/guestfs.pod:1913
3703 "The daemon may also cancel. It does this by writing a special word "
3704 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
3705 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
3706 "cancel chunk). The special word is chosen so that even if cancellation "
3707 "happens right at the end of the transfer (after the library has finished "
3708 "writing and has started listening for the reply), the \"spurious\" cancel "
3709 "flag will not be confused with the reply message."
3713 #: ../src/guestfs.pod:1922
3715 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
3716 "limit), and also files where the size is not known in advance (eg. from "
3717 "pipes or sockets). However the chunks are rather small "
3718 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
3719 "to keep much in memory."
3723 #: ../src/guestfs.pod:1928
3724 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
3728 #: ../src/guestfs.pod:1930
3730 "The protocol for FileOut parameters is exactly the same as for FileIn "
3731 "parameters, but with the roles of daemon and library reversed."
3735 #: ../src/guestfs.pod:1933
3738 " total length (header + ret,\n"
3739 " but not including the length word itself,\n"
3740 " and not including the chunks)\n"
3741 " struct guestfs_message_header (encoded as XDR)\n"
3742 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3743 " sequence of chunks for FileOut param #0\n"
3744 " sequence of chunks for FileOut param #1 etc.\n"
3749 #: ../src/guestfs.pod:1941
3750 msgid "INITIAL MESSAGE"
3754 #: ../src/guestfs.pod:1943
3756 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
3757 "which indicates that the guest and daemon is alive. This is what "
3758 "L</guestfs_launch> waits for."
3762 #: ../src/guestfs.pod:1947
3763 msgid "PROGRESS NOTIFICATION MESSAGES"
3767 #: ../src/guestfs.pod:1949
3769 "The daemon may send progress notification messages at any time. These are "
3770 "distinguished by the normal length word being replaced by "
3771 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
3775 #: ../src/guestfs.pod:1953
3777 "The library turns them into progress callbacks (see "
3778 "C<guestfs_set_progress_callback>) if there is a callback registered, or "
3779 "discards them if not."
3783 #: ../src/guestfs.pod:1957
3785 "The daemon self-limits the frequency of progress messages it sends (see "
3786 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
3791 #: ../src/guestfs.pod:1961
3792 msgid "LIBGUESTFS VERSION NUMBERS"
3796 #: ../src/guestfs.pod:1963
3798 "Since April 2010, libguestfs has started to make separate development and "
3799 "stable releases, along with corresponding branches in our git repository. "
3800 "These separate releases can be identified by version number:"
3804 #: ../src/guestfs.pod:1968
3807 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3808 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3814 " | `-------- sub-version\n"
3816 " `------ always '1' because we don't change the ABI\n"
3821 #: ../src/guestfs.pod:1979
3822 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3826 #: ../src/guestfs.pod:1981
3828 "As time passes we cherry pick fixes from the development branch and backport "
3829 "those into the stable branch, the effect being that the stable branch should "
3830 "get more stable and less buggy over time. So the stable releases are ideal "
3831 "for people who don't need new features but would just like the software to "
3836 #: ../src/guestfs.pod:1987
3837 msgid "Our criteria for backporting changes are:"
3841 #: ../src/guestfs.pod:1993
3843 "Documentation changes which don't affect any code are backported unless the "
3844 "documentation refers to a future feature which is not in stable."
3848 #: ../src/guestfs.pod:1999
3850 "Bug fixes which are not controversial, fix obvious problems, and have been "
3851 "well tested are backported."
3855 #: ../src/guestfs.pod:2004
3857 "Simple rearrangements of code which shouldn't affect how it works get "
3858 "backported. This is so that the code in the two branches doesn't get too "
3859 "far out of step, allowing us to backport future fixes more easily."
3863 #: ../src/guestfs.pod:2010
3865 "We I<don't> backport new features, new APIs, new tools etc, except in one "
3866 "exceptional case: the new feature is required in order to implement an "
3867 "important bug fix."
3871 #: ../src/guestfs.pod:2016
3873 "A new stable branch starts when we think the new features in development are "
3874 "substantial and compelling enough over the current stable branch to warrant "
3875 "it. When that happens we create new stable and development versions 1.N.0 "
3876 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
3877 "stable at this point, but by backporting fixes from development, that branch "
3878 "will stabilize over time."
3882 #: ../src/guestfs.pod:2024 ../fish/guestfish.pod:914 ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:330 ../tools/virt-rescue.pl:255
3883 msgid "ENVIRONMENT VARIABLES"
3887 #: ../src/guestfs.pod:2028 ../fish/guestfish.pod:940
3888 msgid "LIBGUESTFS_APPEND"
3892 #: ../src/guestfs.pod:2030 ../fish/guestfish.pod:942
3893 msgid "Pass additional options to the guest kernel."
3897 #: ../src/guestfs.pod:2032 ../fish/guestfish.pod:944
3898 msgid "LIBGUESTFS_DEBUG"
3902 #: ../src/guestfs.pod:2034
3904 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
3905 "effect as calling C<guestfs_set_verbose (g, 1)>."
3909 #: ../src/guestfs.pod:2037 ../fish/guestfish.pod:949
3910 msgid "LIBGUESTFS_MEMSIZE"
3914 #: ../src/guestfs.pod:2039 ../fish/guestfish.pod:951
3915 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
3919 #: ../src/guestfs.pod:2042 ../fish/guestfish.pod:954
3922 " LIBGUESTFS_MEMSIZE=700\n"
3927 #: ../src/guestfs.pod:2044 ../fish/guestfish.pod:956
3928 msgid "LIBGUESTFS_PATH"
3932 #: ../src/guestfs.pod:2046
3934 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
3935 "the discussion of paths in section PATH above."
3939 #: ../src/guestfs.pod:2049 ../fish/guestfish.pod:961
3940 msgid "LIBGUESTFS_QEMU"
3944 #: ../src/guestfs.pod:2051 ../fish/guestfish.pod:963
3946 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
3947 "which was found at compile time by the configure script is used."
3951 #: ../src/guestfs.pod:2055
3952 msgid "See also L</QEMU WRAPPERS> above."
3956 #: ../src/guestfs.pod:2057 ../fish/guestfish.pod:967
3957 msgid "LIBGUESTFS_TRACE"
3961 #: ../src/guestfs.pod:2059
3963 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
3964 "effect as calling C<guestfs_set_trace (g, 1)>."
3968 #: ../src/guestfs.pod:2062 ../fish/guestfish.pod:976
3973 #: ../src/guestfs.pod:2064 ../fish/guestfish.pod:978
3974 msgid "Location of temporary directory, defaults to C</tmp>."
3978 #: ../src/guestfs.pod:2066 ../fish/guestfish.pod:980
3980 "If libguestfs was compiled to use the supermin appliance then the real "
3981 "appliance is cached in this directory, shared between all handles belonging "
3982 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
3983 "use in case C</tmp> is not large enough."
3987 #: ../src/guestfs.pod:2074 ../fish/guestfish.pod:1038 ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:233 ../inspector/virt-inspector.pl:536 ../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
3992 #: ../src/guestfs.pod:2076
3994 "L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
3995 "L<virt-edit(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
3996 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
3997 "L<virt-rescue(1)>, L<virt-tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
3998 "L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
4002 #: ../src/guestfs.pod:2094
4004 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
4005 "L<lvm(8)>, L<disktype(1)>."
4009 #: ../src/guestfs.pod:2101 ../tools/virt-win-reg.pl:499 ../tools/virt-make-fs.pl:548
4014 #: ../src/guestfs.pod:2103
4015 msgid "To get a list of bugs against libguestfs use this link:"
4019 #: ../src/guestfs.pod:2105
4020 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
4024 #: ../src/guestfs.pod:2107
4025 msgid "To report a new bug against libguestfs use this link:"
4029 #: ../src/guestfs.pod:2109
4030 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
4034 #: ../src/guestfs.pod:2111
4035 msgid "When reporting a bug, please check:"
4039 #: ../src/guestfs.pod:2117
4040 msgid "That the bug hasn't been reported already."
4044 #: ../src/guestfs.pod:2121
4045 msgid "That you are testing a recent version."
4049 #: ../src/guestfs.pod:2125
4050 msgid "Describe the bug accurately, and give a way to reproduce it."
4054 #: ../src/guestfs.pod:2129
4056 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
4061 #: ../src/guestfs.pod:2134 ../fish/guestfish.pod:1055 ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:244 ../inspector/virt-inspector.pl:546
4066 #: ../src/guestfs.pod:2136 ../fish/guestfish.pod:1057 ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:246
4067 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
4071 #: ../src/guestfs.pod:2138 ../fish/guestfish.pod:1059 ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:248 ../inspector/virt-inspector.pl:560 ../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
4076 #: ../src/guestfs.pod:2140 ../fish/guestfish.pod:1061 ../fuse/guestmount.pod:250
4077 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
4081 #: ../src/guestfs.pod:2143
4083 "This library is free software; you can redistribute it and/or modify it "
4084 "under the terms of the GNU Lesser General Public License as published by the "
4085 "Free Software Foundation; either version 2 of the License, or (at your "
4086 "option) any later version."
4090 #: ../src/guestfs.pod:2148
4092 "This library is distributed in the hope that it will be useful, but WITHOUT "
4093 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
4094 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
4099 #: ../src/guestfs.pod:2153
4101 "You should have received a copy of the GNU Lesser General Public License "
4102 "along with this library; if not, write to the Free Software Foundation, "
4103 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
4107 #: ../src/guestfs-actions.pod:1
4108 msgid "guestfs_add_cdrom"
4112 #: ../src/guestfs-actions.pod:3
4116 " guestfs_add_cdrom (guestfs_h *g,\n"
4117 " const char *filename);\n"
4122 #: ../src/guestfs-actions.pod:7 ../fish/guestfish-actions.pod:5
4123 msgid "This function adds a virtual CD-ROM disk image to the guest."
4127 #: ../src/guestfs-actions.pod:9 ../fish/guestfish-actions.pod:7
4128 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
4132 #: ../src/guestfs-actions.pod:17
4134 "This call checks for the existence of C<filename>. This stops you from "
4135 "specifying other types of drive which are supported by qemu such as C<nbd:> "
4136 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
4141 #: ../src/guestfs-actions.pod:24
4143 "If you just want to add an ISO file (often you use this as an efficient way "
4144 "to transfer large files into the guest), then you should probably use "
4145 "C<guestfs_add_drive_ro> instead."
4149 #: ../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:3049 ../src/guestfs-actions.pod:3064 ../src/guestfs-actions.pod:3084 ../src/guestfs-actions.pod:3209 ../src/guestfs-actions.pod:3223 ../src/guestfs-actions.pod:3236 ../src/guestfs-actions.pod:3250 ../src/guestfs-actions.pod:3265 ../src/guestfs-actions.pod:3301 ../src/guestfs-actions.pod:3373 ../src/guestfs-actions.pod:3393 ../src/guestfs-actions.pod:3410 ../src/guestfs-actions.pod:3433 ../src/guestfs-actions.pod:3456 ../src/guestfs-actions.pod:3488 ../src/guestfs-actions.pod:3507 ../src/guestfs-actions.pod:3526 ../src/guestfs-actions.pod:3561 ../src/guestfs-actions.pod:3573 ../src/guestfs-actions.pod:3609 ../src/guestfs-actions.pod:3625 ../src/guestfs-actions.pod:3638 ../src/guestfs-actions.pod:3653 ../src/guestfs-actions.pod:3670 ../src/guestfs-actions.pod:3763 ../src/guestfs-actions.pod:3783 ../src/guestfs-actions.pod:3796 ../src/guestfs-actions.pod:3847 ../src/guestfs-actions.pod:3865 ../src/guestfs-actions.pod:3883 ../src/guestfs-actions.pod:3899 ../src/guestfs-actions.pod:3913 ../src/guestfs-actions.pod:3927 ../src/guestfs-actions.pod:3944 ../src/guestfs-actions.pod:3959 ../src/guestfs-actions.pod:3979 ../src/guestfs-actions.pod:4028 ../src/guestfs-actions.pod:4059 ../src/guestfs-actions.pod:4078 ../src/guestfs-actions.pod:4097 ../src/guestfs-actions.pod:4109 ../src/guestfs-actions.pod:4126 ../src/guestfs-actions.pod:4139 ../src/guestfs-actions.pod:4154 ../src/guestfs-actions.pod:4169 ../src/guestfs-actions.pod:4204 ../src/guestfs-actions.pod:4219 ../src/guestfs-actions.pod:4239 ../src/guestfs-actions.pod:4253 ../src/guestfs-actions.pod:4270 ../src/guestfs-actions.pod:4319 ../src/guestfs-actions.pod:4356 ../src/guestfs-actions.pod:4370 ../src/guestfs-actions.pod:4398 ../src/guestfs-actions.pod:4415 ../src/guestfs-actions.pod:4433 ../src/guestfs-actions.pod:4567 ../src/guestfs-actions.pod:4624 ../src/guestfs-actions.pod:4646 ../src/guestfs-actions.pod:4664 ../src/guestfs-actions.pod:4696 ../src/guestfs-actions.pod:4762 ../src/guestfs-actions.pod:4779 ../src/guestfs-actions.pod:4792 ../src/guestfs-actions.pod:4806 ../src/guestfs-actions.pod:5095 ../src/guestfs-actions.pod:5114 ../src/guestfs-actions.pod:5128 ../src/guestfs-actions.pod:5140 ../src/guestfs-actions.pod:5154 ../src/guestfs-actions.pod:5166 ../src/guestfs-actions.pod:5180 ../src/guestfs-actions.pod:5196 ../src/guestfs-actions.pod:5217 ../src/guestfs-actions.pod:5236 ../src/guestfs-actions.pod:5255 ../src/guestfs-actions.pod:5273 ../src/guestfs-actions.pod:5296 ../src/guestfs-actions.pod:5314 ../src/guestfs-actions.pod:5333 ../src/guestfs-actions.pod:5354 ../src/guestfs-actions.pod:5373 ../src/guestfs-actions.pod:5390 ../src/guestfs-actions.pod:5418 ../src/guestfs-actions.pod:5442 ../src/guestfs-actions.pod:5461 ../src/guestfs-actions.pod:5485 ../src/guestfs-actions.pod:5500 ../src/guestfs-actions.pod:5515 ../src/guestfs-actions.pod:5534 ../src/guestfs-actions.pod:5571 ../src/guestfs-actions.pod:5594 ../src/guestfs-actions.pod:5620 ../src/guestfs-actions.pod:5728 ../src/guestfs-actions.pod:5849 ../src/guestfs-actions.pod:5861 ../src/guestfs-actions.pod:5874 ../src/guestfs-actions.pod:5887 ../src/guestfs-actions.pod:5909 ../src/guestfs-actions.pod:5922 ../src/guestfs-actions.pod:5935 ../src/guestfs-actions.pod:5948 ../src/guestfs-actions.pod:5963 ../src/guestfs-actions.pod:6022 ../src/guestfs-actions.pod:6039 ../src/guestfs-actions.pod:6055 ../src/guestfs-actions.pod:6071 ../src/guestfs-actions.pod:6088 ../src/guestfs-actions.pod:6101 ../src/guestfs-actions.pod:6121 ../src/guestfs-actions.pod:6157 ../src/guestfs-actions.pod:6171 ../src/guestfs-actions.pod:6212 ../src/guestfs-actions.pod:6225 ../src/guestfs-actions.pod:6243 ../src/guestfs-actions.pod:6272 ../src/guestfs-actions.pod:6303 ../src/guestfs-actions.pod:6422 ../src/guestfs-actions.pod:6440 ../src/guestfs-actions.pod:6454 ../src/guestfs-actions.pod:6509 ../src/guestfs-actions.pod:6522 ../src/guestfs-actions.pod:6567 ../src/guestfs-actions.pod:6600 ../src/guestfs-actions.pod:6654 ../src/guestfs-actions.pod:6680 ../src/guestfs-actions.pod:6746 ../src/guestfs-actions.pod:6765 ../src/guestfs-actions.pod:6794
4150 msgid "This function returns 0 on success or -1 on error."
4154 #: ../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
4156 "This function is deprecated. In new code, use the C<add_drive_opts> call "
4161 #: ../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:6688 ../src/guestfs-actions.pod:6857 ../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:4427 ../fish/guestfish-actions.pod:4524
4163 "Deprecated functions will not be removed from the API, but the fact that "
4164 "they are deprecated indicates that there are problems with correct use of "
4169 #: ../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:3051 ../src/guestfs-actions.pod:3066 ../src/guestfs-actions.pod:4206 ../src/guestfs-actions.pod:5275 ../src/guestfs-actions.pod:5392 ../src/guestfs-actions.pod:5502 ../src/guestfs-actions.pod:5965 ../src/guestfs-actions.pod:6090 ../src/guestfs-actions.pod:6602
4170 msgid "(Added in 0.3)"
4174 #: ../src/guestfs-actions.pod:41
4175 msgid "guestfs_add_domain"
4179 #: ../src/guestfs-actions.pod:43
4183 " guestfs_add_domain (guestfs_h *g,\n"
4184 " const char *dom,\n"
4190 #: ../src/guestfs-actions.pod:48 ../src/guestfs-actions.pod:137
4192 "You may supply a list of optional arguments to this call. Use zero or more "
4193 "of the following pairs of parameters, and terminate the list with C<-1> on "
4194 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
4198 #: ../src/guestfs-actions.pod:53
4201 " GUESTFS_ADD_DOMAIN_LIBVIRTURI, const char *libvirturi,\n"
4202 " GUESTFS_ADD_DOMAIN_READONLY, int readonly,\n"
4203 " GUESTFS_ADD_DOMAIN_IFACE, const char *iface,\n"
4208 #: ../src/guestfs-actions.pod:57
4210 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
4211 "It works by connecting to libvirt, requesting the domain and domain XML from "
4212 "libvirt, parsing it for disks, and calling C<guestfs_add_drive_opts> on each "
4217 #: ../src/guestfs-actions.pod:62 ../fish/guestfish-actions.pod:46
4219 "The number of disks added is returned. This operation is atomic: if an "
4220 "error is returned, then no disks are added."
4224 #: ../src/guestfs-actions.pod:65 ../fish/guestfish-actions.pod:49
4226 "This function does some minimal checks to make sure the libvirt domain is "
4227 "not running (unless C<readonly> is true). In a future version we will try "
4228 "to acquire the libvirt lock on each disk."
4232 #: ../src/guestfs-actions.pod:69 ../fish/guestfish-actions.pod:53
4234 "Disks must be accessible locally. This often means that adding disks from a "
4235 "remote libvirt connection (see L<http://libvirt.org/remote.html>) will fail "
4236 "unless those disks are accessible via the same device path locally too."
4240 #: ../src/guestfs-actions.pod:74
4242 "The optional C<libvirturi> parameter sets the libvirt URI (see "
4243 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
4244 "default libvirt URI (or one set through an environment variable, see the "
4245 "libvirt documentation for full details). If you are using the C API "
4246 "directly then it is more flexible to create the libvirt connection object "
4247 "yourself, get the domain object, and call C<guestfs_add_libvirt_dom>."
4251 #: ../src/guestfs-actions.pod:82
4253 "The other optional parameters are passed directly through to "
4254 "C<guestfs_add_drive_opts>."
4258 #: ../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:2602 ../src/guestfs-actions.pod:2623 ../src/guestfs-actions.pod:4342 ../src/guestfs-actions.pod:4470 ../src/guestfs-actions.pod:4876 ../src/guestfs-actions.pod:4902 ../src/guestfs-actions.pod:6198 ../src/guestfs-actions.pod:6613 ../src/guestfs-actions.pod:6626 ../src/guestfs-actions.pod:6639
4259 msgid "On error this function returns -1."
4263 #: ../src/guestfs-actions.pod:87
4264 msgid "guestfs_add_domain_va"
4268 #: ../src/guestfs-actions.pod:89
4272 " guestfs_add_domain_va (guestfs_h *g,\n"
4273 " const char *dom,\n"
4279 #: ../src/guestfs-actions.pod:94
4280 msgid "This is the \"va_list variant\" of L</guestfs_add_domain>."
4284 #: ../src/guestfs-actions.pod:96 ../src/guestfs-actions.pod:107 ../src/guestfs-actions.pod:200 ../src/guestfs-actions.pod:211
4285 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
4289 #: ../src/guestfs-actions.pod:98
4290 msgid "guestfs_add_domain_argv"
4294 #: ../src/guestfs-actions.pod:100
4298 " guestfs_add_domain_argv (guestfs_h *g,\n"
4299 " const char *dom,\n"
4300 " const struct guestfs_add_domain_argv *optargs);\n"
4305 #: ../src/guestfs-actions.pod:105
4306 msgid "This is the \"argv variant\" of L</guestfs_add_domain>."
4310 #: ../src/guestfs-actions.pod:109
4311 msgid "guestfs_add_drive"
4315 #: ../src/guestfs-actions.pod:111
4319 " guestfs_add_drive (guestfs_h *g,\n"
4320 " const char *filename);\n"
4325 #: ../src/guestfs-actions.pod:115
4327 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
4328 "optional parameters, so the disk is added writable, with the format being "
4329 "detected automatically."
4333 #: ../src/guestfs-actions.pod:119
4335 "Automatic detection of the format opens you up to a potential security hole "
4336 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4337 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
4338 "you should think about replacing calls to this function with calls to "
4339 "C<guestfs_add_drive_opts>, and specifying the format."
4343 #: ../src/guestfs-actions.pod:130
4344 msgid "guestfs_add_drive_opts"
4348 #: ../src/guestfs-actions.pod:132
4352 " guestfs_add_drive_opts (guestfs_h *g,\n"
4353 " const char *filename,\n"
4359 #: ../src/guestfs-actions.pod:142
4362 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
4363 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
4364 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
4369 #: ../src/guestfs-actions.pod:146 ../fish/guestfish-actions.pod:92
4371 "This function adds a virtual machine disk image C<filename> to libguestfs. "
4372 "The first time you call this function, the disk appears as C</dev/sda>, the "
4373 "second time as C</dev/sdb>, and so on."
4377 #: ../src/guestfs-actions.pod:151 ../fish/guestfish-actions.pod:97
4379 "You don't necessarily need to be root when using libguestfs. However you "
4380 "obviously do need sufficient permissions to access the filename for whatever "
4381 "operations you want to perform (ie. read access if you just want to read the "
4382 "image or write access if you want to modify the image)."
4386 #: ../src/guestfs-actions.pod:157 ../fish/guestfish-actions.pod:103
4387 msgid "This call checks that C<filename> exists."
4391 #: ../src/guestfs-actions.pod:159 ../fish/guestfish-actions.pod:105
4392 msgid "The optional arguments are:"
4396 #: ../src/guestfs-actions.pod:163 ../fish/guestfish-actions.pod:109
4401 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:111
4403 "If true then the image is treated as read-only. Writes are still allowed, "
4404 "but they are stored in a temporary snapshot overlay which is discarded at "
4405 "the end. The disk that you add is not modified."
4409 #: ../src/guestfs-actions.pod:169 ../fish/guestfish-actions.pod:115
4414 #: ../src/guestfs-actions.pod:171
4416 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
4417 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
4418 "Possible formats include C<raw> and C<qcow2>."
4422 #: ../src/guestfs-actions.pod:175 ../fish/guestfish-actions.pod:121
4424 "Automatic detection of the format opens you up to a potential security hole "
4425 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4426 "RHBZ#642934. Specifying the format closes this security hole."
4430 #: ../src/guestfs-actions.pod:180 ../fish/guestfish-actions.pod:126
4435 #: ../src/guestfs-actions.pod:182
4437 "This rarely-used option lets you emulate the behaviour of the deprecated "
4438 "C<guestfs_add_drive_with_if> call (q.v.)"
4442 #: ../src/guestfs-actions.pod:189
4443 msgid "(Added in 1.5.23)"
4447 #: ../src/guestfs-actions.pod:191
4448 msgid "guestfs_add_drive_opts_va"
4452 #: ../src/guestfs-actions.pod:193
4456 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
4457 " const char *filename,\n"
4463 #: ../src/guestfs-actions.pod:198
4464 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
4468 #: ../src/guestfs-actions.pod:202
4469 msgid "guestfs_add_drive_opts_argv"
4473 #: ../src/guestfs-actions.pod:204
4477 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
4478 " const char *filename,\n"
4479 " const struct guestfs_add_drive_opts_argv "
4485 #: ../src/guestfs-actions.pod:209
4486 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
4490 #: ../src/guestfs-actions.pod:213
4491 msgid "guestfs_add_drive_ro"
4495 #: ../src/guestfs-actions.pod:215
4499 " guestfs_add_drive_ro (guestfs_h *g,\n"
4500 " const char *filename);\n"
4505 #: ../src/guestfs-actions.pod:219
4507 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
4508 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
4509 "disk is added read-only, with the format being detected automatically."
4513 #: ../src/guestfs-actions.pod:226
4514 msgid "(Added in 1.0.38)"
4518 #: ../src/guestfs-actions.pod:228
4519 msgid "guestfs_add_drive_ro_with_if"
4523 #: ../src/guestfs-actions.pod:230
4527 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
4528 " const char *filename,\n"
4529 " const char *iface);\n"
4534 #: ../src/guestfs-actions.pod:235
4536 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
4537 "QEMU interface emulation to use at run time."
4541 #: ../src/guestfs-actions.pod:247 ../src/guestfs-actions.pod:268 ../src/guestfs-actions.pod:2303
4542 msgid "(Added in 1.0.84)"
4546 #: ../src/guestfs-actions.pod:249
4547 msgid "guestfs_add_drive_with_if"
4551 #: ../src/guestfs-actions.pod:251
4555 " guestfs_add_drive_with_if (guestfs_h *g,\n"
4556 " const char *filename,\n"
4557 " const char *iface);\n"
4562 #: ../src/guestfs-actions.pod:256
4564 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
4565 "QEMU interface emulation to use at run time."
4569 #: ../src/guestfs-actions.pod:270
4570 msgid "guestfs_aug_clear"
4574 #: ../src/guestfs-actions.pod:272
4578 " guestfs_aug_clear (guestfs_h *g,\n"
4579 " const char *augpath);\n"
4584 #: ../src/guestfs-actions.pod:276 ../fish/guestfish-actions.pod:178
4586 "Set the value associated with C<path> to C<NULL>. This is the same as the "
4587 "L<augtool(1)> C<clear> command."
4591 #: ../src/guestfs-actions.pod:281 ../src/guestfs-actions.pod:2083
4592 msgid "(Added in 1.3.4)"
4596 #: ../src/guestfs-actions.pod:283
4597 msgid "guestfs_aug_close"
4601 #: ../src/guestfs-actions.pod:285
4605 " guestfs_aug_close (guestfs_h *g);\n"
4610 #: ../src/guestfs-actions.pod:288
4612 "Close the current Augeas handle and free up any resources used by it. After "
4613 "calling this, you have to call C<guestfs_aug_init> again before you can use "
4614 "any other Augeas functions."
4618 #: ../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:4953
4619 msgid "(Added in 0.7)"
4623 #: ../src/guestfs-actions.pod:297
4624 msgid "guestfs_aug_defnode"
4628 #: ../src/guestfs-actions.pod:299
4631 " struct guestfs_int_bool *\n"
4632 " guestfs_aug_defnode (guestfs_h *g,\n"
4633 " const char *name,\n"
4634 " const char *expr,\n"
4635 " const char *val);\n"
4640 #: ../src/guestfs-actions.pod:305 ../fish/guestfish-actions.pod:194
4641 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
4645 #: ../src/guestfs-actions.pod:308
4647 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
4648 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
4649 "containing that single node."
4653 #: ../src/guestfs-actions.pod:312 ../fish/guestfish-actions.pod:201
4655 "On success this returns a pair containing the number of nodes in the "
4656 "nodeset, and a boolean flag if a node was created."
4660 #: ../src/guestfs-actions.pod:316
4662 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
4663 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
4667 #: ../src/guestfs-actions.pod:322
4668 msgid "guestfs_aug_defvar"
4672 #: ../src/guestfs-actions.pod:324
4676 " guestfs_aug_defvar (guestfs_h *g,\n"
4677 " const char *name,\n"
4678 " const char *expr);\n"
4683 #: ../src/guestfs-actions.pod:329 ../fish/guestfish-actions.pod:209
4685 "Defines an Augeas variable C<name> whose value is the result of evaluating "
4686 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
4690 #: ../src/guestfs-actions.pod:333 ../fish/guestfish-actions.pod:213
4692 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
4693 "evaluates to something which is not a nodeset."
4697 #: ../src/guestfs-actions.pod:340
4698 msgid "guestfs_aug_get"
4702 #: ../src/guestfs-actions.pod:342
4706 " guestfs_aug_get (guestfs_h *g,\n"
4707 " const char *augpath);\n"
4712 #: ../src/guestfs-actions.pod:346 ../fish/guestfish-actions.pod:220
4714 "Look up the value associated with C<path>. If C<path> matches exactly one "
4715 "node, the C<value> is returned."
4719 #: ../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:2548 ../src/guestfs-actions.pod:2684 ../src/guestfs-actions.pod:2713 ../src/guestfs-actions.pod:2735 ../src/guestfs-actions.pod:2795 ../src/guestfs-actions.pod:2818 ../src/guestfs-actions.pod:3195 ../src/guestfs-actions.pod:3545 ../src/guestfs-actions.pod:3715 ../src/guestfs-actions.pod:3825 ../src/guestfs-actions.pod:4488 ../src/guestfs-actions.pod:4681 ../src/guestfs-actions.pod:4851 ../src/guestfs-actions.pod:5029 ../src/guestfs-actions.pod:5078 ../src/guestfs-actions.pod:5641 ../src/guestfs-actions.pod:5657 ../src/guestfs-actions.pod:5674 ../src/guestfs-actions.pod:5698 ../src/guestfs-actions.pod:6362 ../src/guestfs-actions.pod:6381 ../src/guestfs-actions.pod:6399 ../src/guestfs-actions.pod:6579 ../src/guestfs-actions.pod:6851
4721 "This function returns a string, or NULL on error. I<The caller must free "
4722 "the returned string after use>."
4726 #: ../src/guestfs-actions.pod:354
4727 msgid "guestfs_aug_init"
4731 #: ../src/guestfs-actions.pod:356
4735 " guestfs_aug_init (guestfs_h *g,\n"
4736 " const char *root,\n"
4742 #: ../src/guestfs-actions.pod:361 ../fish/guestfish-actions.pod:227
4744 "Create a new Augeas handle for editing configuration files. If there was "
4745 "any previous Augeas handle associated with this guestfs session, then it is "
4750 #: ../src/guestfs-actions.pod:365
4751 msgid "You must call this before using any other C<guestfs_aug_*> commands."
4755 #: ../src/guestfs-actions.pod:368 ../fish/guestfish-actions.pod:234
4756 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
4760 #: ../src/guestfs-actions.pod:371 ../fish/guestfish-actions.pod:237
4762 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
4763 "logical I<or> of the following integers:"
4767 #: ../src/guestfs-actions.pod:377 ../fish/guestfish-actions.pod:243
4768 msgid "C<AUG_SAVE_BACKUP> = 1"
4772 #: ../src/guestfs-actions.pod:379 ../fish/guestfish-actions.pod:245
4773 msgid "Keep the original file with a C<.augsave> extension."
4777 #: ../src/guestfs-actions.pod:381 ../fish/guestfish-actions.pod:247
4778 msgid "C<AUG_SAVE_NEWFILE> = 2"
4782 #: ../src/guestfs-actions.pod:383 ../fish/guestfish-actions.pod:249
4784 "Save changes into a file with extension C<.augnew>, and do not overwrite "
4785 "original. Overrides C<AUG_SAVE_BACKUP>."
4789 #: ../src/guestfs-actions.pod:386 ../fish/guestfish-actions.pod:252
4790 msgid "C<AUG_TYPE_CHECK> = 4"
4794 #: ../src/guestfs-actions.pod:388 ../fish/guestfish-actions.pod:254
4795 msgid "Typecheck lenses (can be expensive)."
4799 #: ../src/guestfs-actions.pod:390 ../fish/guestfish-actions.pod:256
4800 msgid "C<AUG_NO_STDINC> = 8"
4804 #: ../src/guestfs-actions.pod:392 ../fish/guestfish-actions.pod:258
4805 msgid "Do not use standard load path for modules."
4809 #: ../src/guestfs-actions.pod:394 ../fish/guestfish-actions.pod:260
4810 msgid "C<AUG_SAVE_NOOP> = 16"
4814 #: ../src/guestfs-actions.pod:396 ../fish/guestfish-actions.pod:262
4815 msgid "Make save a no-op, just record what would have been changed."
4819 #: ../src/guestfs-actions.pod:398 ../fish/guestfish-actions.pod:264
4820 msgid "C<AUG_NO_LOAD> = 32"
4824 #: ../src/guestfs-actions.pod:400
4825 msgid "Do not load the tree in C<guestfs_aug_init>."
4829 #: ../src/guestfs-actions.pod:404
4830 msgid "To close the handle, you can call C<guestfs_aug_close>."
4834 #: ../src/guestfs-actions.pod:406 ../fish/guestfish-actions.pod:272
4835 msgid "To find out more about Augeas, see L<http://augeas.net/>."
4839 #: ../src/guestfs-actions.pod:412
4840 msgid "guestfs_aug_insert"
4844 #: ../src/guestfs-actions.pod:414
4848 " guestfs_aug_insert (guestfs_h *g,\n"
4849 " const char *augpath,\n"
4850 " const char *label,\n"
4856 #: ../src/guestfs-actions.pod:420 ../fish/guestfish-actions.pod:278
4858 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
4859 "or after C<path> (depending on the boolean flag C<before>)."
4863 #: ../src/guestfs-actions.pod:424 ../fish/guestfish-actions.pod:282
4865 "C<path> must match exactly one existing node in the tree, and C<label> must "
4866 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
4870 #: ../src/guestfs-actions.pod:432
4871 msgid "guestfs_aug_load"
4875 #: ../src/guestfs-actions.pod:434
4879 " guestfs_aug_load (guestfs_h *g);\n"
4884 #: ../src/guestfs-actions.pod:437 ../fish/guestfish-actions.pod:290
4885 msgid "Load files into the tree."
4889 #: ../src/guestfs-actions.pod:439 ../fish/guestfish-actions.pod:292
4890 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
4894 #: ../src/guestfs-actions.pod:446
4895 msgid "guestfs_aug_ls"
4899 #: ../src/guestfs-actions.pod:448
4903 " guestfs_aug_ls (guestfs_h *g,\n"
4904 " const char *augpath);\n"
4909 #: ../src/guestfs-actions.pod:452
4911 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
4912 "sorting the resulting nodes into alphabetical order."
4916 #: ../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:2573 ../src/guestfs-actions.pod:2754 ../src/guestfs-actions.pod:2860 ../src/guestfs-actions.pod:3115 ../src/guestfs-actions.pod:3177 ../src/guestfs-actions.pod:3282 ../src/guestfs-actions.pod:3687 ../src/guestfs-actions.pod:4303 ../src/guestfs-actions.pod:4823 ../src/guestfs-actions.pod:4949 ../src/guestfs-actions.pod:5063 ../src/guestfs-actions.pod:5714 ../src/guestfs-actions.pod:5775 ../src/guestfs-actions.pod:5830 ../src/guestfs-actions.pod:5976 ../src/guestfs-actions.pod:6000 ../src/guestfs-actions.pod:6472 ../src/guestfs-actions.pod:6492 ../src/guestfs-actions.pod:6539 ../src/guestfs-actions.pod:6704 ../src/guestfs-actions.pod:6723 ../src/guestfs-actions.pod:6808 ../src/guestfs-actions.pod:6827 ../src/guestfs-actions.pod:6873 ../src/guestfs-actions.pod:6892
4918 "This function returns a NULL-terminated array of strings (like "
4919 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
4920 "strings and the array after use>."
4924 #: ../src/guestfs-actions.pod:459 ../src/guestfs-actions.pod:990 ../src/guestfs-actions.pod:1008 ../src/guestfs-actions.pod:1413 ../src/guestfs-actions.pod:2938 ../src/guestfs-actions.pod:2969 ../src/guestfs-actions.pod:3528 ../src/guestfs-actions.pod:3578 ../src/guestfs-actions.pod:3765 ../src/guestfs-actions.pod:3798 ../src/guestfs-actions.pod:3961 ../src/guestfs-actions.pod:4307 ../src/guestfs-actions.pod:4764 ../src/guestfs-actions.pod:5142 ../src/guestfs-actions.pod:5156 ../src/guestfs-actions.pod:5168 ../src/guestfs-actions.pod:5576 ../src/guestfs-actions.pod:6214 ../src/guestfs-actions.pod:6227 ../src/guestfs-actions.pod:6456 ../src/guestfs-actions.pod:6659 ../src/guestfs-actions.pod:6692
4925 msgid "(Added in 0.8)"
4929 #: ../src/guestfs-actions.pod:461
4930 msgid "guestfs_aug_match"
4934 #: ../src/guestfs-actions.pod:463
4938 " guestfs_aug_match (guestfs_h *g,\n"
4939 " const char *augpath);\n"
4944 #: ../src/guestfs-actions.pod:467 ../fish/guestfish-actions.pod:306
4946 "Returns a list of paths which match the path expression C<path>. The "
4947 "returned paths are sufficiently qualified so that they match exactly one "
4948 "node in the current tree."
4952 #: ../src/guestfs-actions.pod:477
4953 msgid "guestfs_aug_mv"
4957 #: ../src/guestfs-actions.pod:479
4961 " guestfs_aug_mv (guestfs_h *g,\n"
4962 " const char *src,\n"
4963 " const char *dest);\n"
4968 #: ../src/guestfs-actions.pod:484 ../fish/guestfish-actions.pod:314
4970 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
4971 "C<dest> is overwritten if it exists."
4975 #: ../src/guestfs-actions.pod:491
4976 msgid "guestfs_aug_rm"
4980 #: ../src/guestfs-actions.pod:493
4984 " guestfs_aug_rm (guestfs_h *g,\n"
4985 " const char *augpath);\n"
4990 #: ../src/guestfs-actions.pod:497 ../fish/guestfish-actions.pod:321
4991 msgid "Remove C<path> and all of its children."
4995 #: ../src/guestfs-actions.pod:499 ../fish/guestfish-actions.pod:323
4996 msgid "On success this returns the number of entries which were removed."
5000 #: ../src/guestfs-actions.pod:505
5001 msgid "guestfs_aug_save"
5005 #: ../src/guestfs-actions.pod:507
5009 " guestfs_aug_save (guestfs_h *g);\n"
5014 #: ../src/guestfs-actions.pod:510 ../fish/guestfish-actions.pod:329
5015 msgid "This writes all pending changes to disk."
5019 #: ../src/guestfs-actions.pod:512
5021 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
5026 #: ../src/guestfs-actions.pod:519
5027 msgid "guestfs_aug_set"
5031 #: ../src/guestfs-actions.pod:521
5035 " guestfs_aug_set (guestfs_h *g,\n"
5036 " const char *augpath,\n"
5037 " const char *val);\n"
5042 #: ../src/guestfs-actions.pod:526 ../fish/guestfish-actions.pod:338
5043 msgid "Set the value associated with C<path> to C<val>."
5047 #: ../src/guestfs-actions.pod:528
5049 "In the Augeas API, it is possible to clear a node by setting the value to "
5050 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
5051 "this call. Instead you must use the C<guestfs_aug_clear> call."
5055 #: ../src/guestfs-actions.pod:537
5056 msgid "guestfs_available"
5060 #: ../src/guestfs-actions.pod:539
5064 " guestfs_available (guestfs_h *g,\n"
5065 " char *const *groups);\n"
5070 #: ../src/guestfs-actions.pod:543 ../fish/guestfish-actions.pod:349
5072 "This command is used to check the availability of some groups of "
5073 "functionality in the appliance, which not all builds of the libguestfs "
5074 "appliance will be able to provide."
5078 #: ../src/guestfs-actions.pod:547
5080 "The libguestfs groups, and the functions that those groups correspond to, "
5081 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
5082 "runtime by calling C<guestfs_available_all_groups>."
5086 #: ../src/guestfs-actions.pod:552 ../fish/guestfish-actions.pod:358
5088 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
5089 "\"augeas\"]> would check for the availability of the Linux inotify functions "
5090 "and Augeas (configuration file editing) functions."
5094 #: ../src/guestfs-actions.pod:557 ../fish/guestfish-actions.pod:363
5095 msgid "The command returns no error if I<all> requested groups are available."
5099 #: ../src/guestfs-actions.pod:559 ../fish/guestfish-actions.pod:365
5101 "It fails with an error if one or more of the requested groups is unavailable "
5106 #: ../src/guestfs-actions.pod:562 ../fish/guestfish-actions.pod:368
5108 "If an unknown group name is included in the list of groups then an error is "
5113 #: ../src/guestfs-actions.pod:565 ../fish/guestfish-actions.pod:371
5118 #: ../src/guestfs-actions.pod:571
5119 msgid "You must call C<guestfs_launch> before calling this function."
5123 #: ../src/guestfs-actions.pod:573 ../fish/guestfish-actions.pod:379
5125 "The reason is because we don't know what groups are supported by the "
5126 "appliance/daemon until it is running and can be queried."
5130 #: ../src/guestfs-actions.pod:579 ../fish/guestfish-actions.pod:385
5132 "If a group of functions is available, this does not necessarily mean that "
5133 "they will work. You still have to check for errors when calling individual "
5134 "API functions even if they are available."
5138 #: ../src/guestfs-actions.pod:586 ../fish/guestfish-actions.pod:392
5140 "It is usually the job of distro packagers to build complete functionality "
5141 "into the libguestfs appliance. Upstream libguestfs, if built from source "
5142 "with all requirements satisfied, will support everything."
5146 #: ../src/guestfs-actions.pod:593
5148 "This call was added in version C<1.0.80>. In previous versions of "
5149 "libguestfs all you could do would be to speculatively execute a command to "
5150 "find out if the daemon implemented it. See also C<guestfs_version>."
5154 #: ../src/guestfs-actions.pod:602 ../src/guestfs-actions.pod:1163
5155 msgid "(Added in 1.0.80)"
5159 #: ../src/guestfs-actions.pod:604
5160 msgid "guestfs_available_all_groups"
5164 #: ../src/guestfs-actions.pod:606
5168 " guestfs_available_all_groups (guestfs_h *g);\n"
5173 #: ../src/guestfs-actions.pod:609
5175 "This command returns a list of all optional groups that this daemon knows "
5176 "about. Note this returns both supported and unsupported groups. To find "
5177 "out which ones the daemon can actually support you have to call "
5178 "C<guestfs_available> on each member of the returned list."
5182 #: ../src/guestfs-actions.pod:615
5183 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
5187 #: ../src/guestfs-actions.pod:621
5188 msgid "(Added in 1.3.15)"
5192 #: ../src/guestfs-actions.pod:623
5193 msgid "guestfs_base64_in"
5197 #: ../src/guestfs-actions.pod:625
5201 " guestfs_base64_in (guestfs_h *g,\n"
5202 " const char *base64file,\n"
5203 " const char *filename);\n"
5208 #: ../src/guestfs-actions.pod:630 ../fish/guestfish-actions.pod:422
5209 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
5213 #: ../src/guestfs-actions.pod:635 ../src/guestfs-actions.pod:649
5214 msgid "(Added in 1.3.5)"
5218 #: ../src/guestfs-actions.pod:637
5219 msgid "guestfs_base64_out"
5223 #: ../src/guestfs-actions.pod:639
5227 " guestfs_base64_out (guestfs_h *g,\n"
5228 " const char *filename,\n"
5229 " const char *base64file);\n"
5234 #: ../src/guestfs-actions.pod:644 ../fish/guestfish-actions.pod:431
5236 "This command downloads the contents of C<filename>, writing it out to local "
5237 "file C<base64file> encoded as base64."
5241 #: ../src/guestfs-actions.pod:651
5242 msgid "guestfs_blockdev_flushbufs"
5246 #: ../src/guestfs-actions.pod:653
5250 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
5251 " const char *device);\n"
5256 #: ../src/guestfs-actions.pod:657 ../fish/guestfish-actions.pod:440
5257 msgid "This tells the kernel to flush internal buffers associated with C<device>."
5261 #: ../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
5262 msgid "This uses the L<blockdev(8)> command."
5266 #: ../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
5267 msgid "(Added in 0.9.3)"
5271 #: ../src/guestfs-actions.pod:666
5272 msgid "guestfs_blockdev_getbsz"
5276 #: ../src/guestfs-actions.pod:668
5280 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
5281 " const char *device);\n"
5286 #: ../src/guestfs-actions.pod:672 ../fish/guestfish-actions.pod:449
5287 msgid "This returns the block size of a device."
5291 #: ../src/guestfs-actions.pod:674 ../src/guestfs-actions.pod:774 ../fish/guestfish-actions.pod:451 ../fish/guestfish-actions.pod:514
5293 "(Note this is different from both I<size in blocks> and I<filesystem block "
5298 #: ../src/guestfs-actions.pod:683
5299 msgid "guestfs_blockdev_getro"
5303 #: ../src/guestfs-actions.pod:685
5307 " guestfs_blockdev_getro (guestfs_h *g,\n"
5308 " const char *device);\n"
5313 #: ../src/guestfs-actions.pod:689 ../fish/guestfish-actions.pod:460
5315 "Returns a boolean indicating if the block device is read-only (true if "
5316 "read-only, false if not)."
5320 #: ../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:2877 ../src/guestfs-actions.pod:2891 ../src/guestfs-actions.pod:2906 ../src/guestfs-actions.pod:2920 ../src/guestfs-actions.pod:2936 ../src/guestfs-actions.pod:2951 ../src/guestfs-actions.pod:2967 ../src/guestfs-actions.pod:2981 ../src/guestfs-actions.pod:2994 ../src/guestfs-actions.pod:3008 ../src/guestfs-actions.pod:3023 ../src/guestfs-actions.pod:3038 ../src/guestfs-actions.pod:4452
5321 msgid "This function returns a C truth value on success or -1 on error."
5325 #: ../src/guestfs-actions.pod:698
5326 msgid "guestfs_blockdev_getsize64"
5330 #: ../src/guestfs-actions.pod:700
5334 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
5335 " const char *device);\n"
5340 #: ../src/guestfs-actions.pod:704 ../fish/guestfish-actions.pod:469
5341 msgid "This returns the size of the device in bytes."
5345 #: ../src/guestfs-actions.pod:706
5346 msgid "See also C<guestfs_blockdev_getsz>."
5350 #: ../src/guestfs-actions.pod:714
5351 msgid "guestfs_blockdev_getss"
5355 #: ../src/guestfs-actions.pod:716
5359 " guestfs_blockdev_getss (guestfs_h *g,\n"
5360 " const char *device);\n"
5365 #: ../src/guestfs-actions.pod:720 ../fish/guestfish-actions.pod:479
5367 "This returns the size of sectors on a block device. Usually 512, but can be "
5368 "larger for modern devices."
5372 #: ../src/guestfs-actions.pod:723
5374 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
5379 #: ../src/guestfs-actions.pod:732
5380 msgid "guestfs_blockdev_getsz"
5384 #: ../src/guestfs-actions.pod:734
5388 " guestfs_blockdev_getsz (guestfs_h *g,\n"
5389 " const char *device);\n"
5394 #: ../src/guestfs-actions.pod:738 ../fish/guestfish-actions.pod:491
5396 "This returns the size of the device in units of 512-byte sectors (even if "
5397 "the sectorsize isn't 512 bytes ... weird)."
5401 #: ../src/guestfs-actions.pod:741
5403 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
5404 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
5408 #: ../src/guestfs-actions.pod:751
5409 msgid "guestfs_blockdev_rereadpt"
5413 #: ../src/guestfs-actions.pod:753
5417 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
5418 " const char *device);\n"
5423 #: ../src/guestfs-actions.pod:757 ../fish/guestfish-actions.pod:504
5424 msgid "Reread the partition table on C<device>."
5428 #: ../src/guestfs-actions.pod:765
5429 msgid "guestfs_blockdev_setbsz"
5433 #: ../src/guestfs-actions.pod:767
5437 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
5438 " const char *device,\n"
5439 " int blocksize);\n"
5444 #: ../src/guestfs-actions.pod:772 ../fish/guestfish-actions.pod:512
5445 msgid "This sets the block size of a device."
5449 #: ../src/guestfs-actions.pod:783
5450 msgid "guestfs_blockdev_setro"
5454 #: ../src/guestfs-actions.pod:785
5458 " guestfs_blockdev_setro (guestfs_h *g,\n"
5459 " const char *device);\n"
5464 #: ../src/guestfs-actions.pod:789 ../fish/guestfish-actions.pod:523
5465 msgid "Sets the block device named C<device> to read-only."
5469 #: ../src/guestfs-actions.pod:797
5470 msgid "guestfs_blockdev_setrw"
5474 #: ../src/guestfs-actions.pod:799
5478 " guestfs_blockdev_setrw (guestfs_h *g,\n"
5479 " const char *device);\n"
5484 #: ../src/guestfs-actions.pod:803 ../fish/guestfish-actions.pod:531
5485 msgid "Sets the block device named C<device> to read-write."
5489 #: ../src/guestfs-actions.pod:811
5490 msgid "guestfs_case_sensitive_path"
5494 #: ../src/guestfs-actions.pod:813
5498 " guestfs_case_sensitive_path (guestfs_h *g,\n"
5499 " const char *path);\n"
5504 #: ../src/guestfs-actions.pod:817 ../fish/guestfish-actions.pod:539
5506 "This can be used to resolve case insensitive paths on a filesystem which is "
5507 "case sensitive. The use case is to resolve paths which you have read from "
5508 "Windows configuration files or the Windows Registry, to the true path."
5512 #: ../src/guestfs-actions.pod:822 ../fish/guestfish-actions.pod:544
5514 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
5515 "(and probably others), which is that although the underlying filesystem is "
5516 "case-insensitive, the driver exports the filesystem to Linux as "
5521 #: ../src/guestfs-actions.pod:827 ../fish/guestfish-actions.pod:549
5523 "One consequence of this is that special directories such as C<c:\\windows> "
5524 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
5525 "precise details of how they were created. In Windows itself this would not "
5530 #: ../src/guestfs-actions.pod:833 ../fish/guestfish-actions.pod:555
5532 "Bug or feature? You decide: "
5533 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
5537 #: ../src/guestfs-actions.pod:836 ../fish/guestfish-actions.pod:558
5539 "This function resolves the true case of each element in the path and returns "
5540 "the case-sensitive path."
5544 #: ../src/guestfs-actions.pod:839
5546 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
5547 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
5548 "how the directories were originally created under Windows)."
5552 #: ../src/guestfs-actions.pod:844 ../fish/guestfish-actions.pod:566
5553 msgid "I<Note>: This function does not handle drive names, backslashes etc."
5557 #: ../src/guestfs-actions.pod:847
5558 msgid "See also C<guestfs_realpath>."
5562 #: ../src/guestfs-actions.pod:852 ../src/guestfs-actions.pod:6384
5563 msgid "(Added in 1.0.75)"
5567 #: ../src/guestfs-actions.pod:854
5572 #: ../src/guestfs-actions.pod:856
5576 " guestfs_cat (guestfs_h *g,\n"
5577 " const char *path);\n"
5582 #: ../src/guestfs-actions.pod:860 ../src/guestfs-actions.pod:4939 ../fish/guestfish-actions.pod:575 ../fish/guestfish-actions.pod:3271
5583 msgid "Return the contents of the file named C<path>."
5587 #: ../src/guestfs-actions.pod:862
5589 "Note that this function cannot correctly handle binary files (specifically, "
5590 "files containing C<\\0> character which is treated as end of string). For "
5591 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
5592 "functions which have a more complex interface."
5596 #: ../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:4721 ../src/guestfs-actions.pod:4747 ../src/guestfs-actions.pod:4878 ../src/guestfs-actions.pod:4904 ../src/guestfs-actions.pod:4928 ../src/guestfs-actions.pod:5779 ../src/guestfs-actions.pod:5834 ../src/guestfs-actions.pod:5980 ../src/guestfs-actions.pod:6004 ../src/guestfs-actions.pod:6656 ../src/guestfs-actions.pod:6682 ../src/guestfs-actions.pod:6708 ../src/guestfs-actions.pod:6727 ../src/guestfs-actions.pod:6812 ../src/guestfs-actions.pod:6831 ../src/guestfs-actions.pod:6877 ../src/guestfs-actions.pod:6896 ../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:3141 ../fish/guestfish-actions.pod:3156 ../fish/guestfish-actions.pod:3232 ../fish/guestfish-actions.pod:3249 ../fish/guestfish-actions.pod:3264 ../fish/guestfish-actions.pod:3847 ../fish/guestfish-actions.pod:3893 ../fish/guestfish-actions.pod:3978 ../fish/guestfish-actions.pod:3993 ../fish/guestfish-actions.pod:4403 ../fish/guestfish-actions.pod:4421 ../fish/guestfish-actions.pod:4438 ../fish/guestfish-actions.pod:4448 ../fish/guestfish-actions.pod:4496 ../fish/guestfish-actions.pod:4506 ../fish/guestfish-actions.pod:4535 ../fish/guestfish-actions.pod:4545
5598 "Because of the message protocol, there is a transfer limit of somewhere "
5599 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
5603 #: ../src/guestfs-actions.pod:873 ../src/guestfs-actions.pod:3119 ../src/guestfs-actions.pod:3181 ../src/guestfs-actions.pod:3198 ../src/guestfs-actions.pod:3286 ../src/guestfs-actions.pod:3691 ../src/guestfs-actions.pod:3705 ../src/guestfs-actions.pod:4827 ../src/guestfs-actions.pod:4841 ../src/guestfs-actions.pod:6543 ../src/guestfs-actions.pod:6557
5604 msgid "(Added in 0.4)"
5608 #: ../src/guestfs-actions.pod:875
5609 msgid "guestfs_checksum"
5613 #: ../src/guestfs-actions.pod:877
5617 " guestfs_checksum (guestfs_h *g,\n"
5618 " const char *csumtype,\n"
5619 " const char *path);\n"
5624 #: ../src/guestfs-actions.pod:882 ../fish/guestfish-actions.pod:589
5625 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
5629 #: ../src/guestfs-actions.pod:885 ../fish/guestfish-actions.pod:592
5631 "The type of checksum to compute is given by the C<csumtype> parameter which "
5632 "must have one of the following values:"
5636 #: ../src/guestfs-actions.pod:890 ../fish/guestfish-actions.pod:597
5641 #: ../src/guestfs-actions.pod:892 ../fish/guestfish-actions.pod:599
5643 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
5648 #: ../src/guestfs-actions.pod:895 ../fish/guestfish-actions.pod:602
5653 #: ../src/guestfs-actions.pod:897 ../fish/guestfish-actions.pod:604
5654 msgid "Compute the MD5 hash (using the C<md5sum> program)."
5658 #: ../src/guestfs-actions.pod:899 ../fish/guestfish-actions.pod:606
5663 #: ../src/guestfs-actions.pod:901 ../fish/guestfish-actions.pod:608
5664 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
5668 #: ../src/guestfs-actions.pod:903 ../fish/guestfish-actions.pod:610
5673 #: ../src/guestfs-actions.pod:905 ../fish/guestfish-actions.pod:612
5674 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
5678 #: ../src/guestfs-actions.pod:907 ../fish/guestfish-actions.pod:614
5683 #: ../src/guestfs-actions.pod:909 ../fish/guestfish-actions.pod:616
5684 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
5688 #: ../src/guestfs-actions.pod:911 ../fish/guestfish-actions.pod:618
5693 #: ../src/guestfs-actions.pod:913 ../fish/guestfish-actions.pod:620
5694 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
5698 #: ../src/guestfs-actions.pod:915 ../fish/guestfish-actions.pod:622
5703 #: ../src/guestfs-actions.pod:917 ../fish/guestfish-actions.pod:624
5704 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
5708 #: ../src/guestfs-actions.pod:921 ../fish/guestfish-actions.pod:628
5709 msgid "The checksum is returned as a printable string."
5713 #: ../src/guestfs-actions.pod:923
5714 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
5718 #: ../src/guestfs-actions.pod:925
5719 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
5723 #: ../src/guestfs-actions.pod:930 ../src/guestfs-actions.pod:1238 ../src/guestfs-actions.pod:2060 ../src/guestfs-actions.pod:2893 ../src/guestfs-actions.pod:2922 ../src/guestfs-actions.pod:2983 ../src/guestfs-actions.pod:3010 ../src/guestfs-actions.pod:6245
5724 msgid "(Added in 1.0.2)"
5728 #: ../src/guestfs-actions.pod:932
5729 msgid "guestfs_checksum_device"
5733 #: ../src/guestfs-actions.pod:934
5737 " guestfs_checksum_device (guestfs_h *g,\n"
5738 " const char *csumtype,\n"
5739 " const char *device);\n"
5744 #: ../src/guestfs-actions.pod:939
5746 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
5747 "device named C<device>. For the types of checksums supported see the "
5748 "C<guestfs_checksum> command."
5752 #: ../src/guestfs-actions.pod:946 ../src/guestfs-actions.pod:4358 ../src/guestfs-actions.pod:4417 ../src/guestfs-actions.pod:4454 ../src/guestfs-actions.pod:4472 ../src/guestfs-actions.pod:4648 ../src/guestfs-actions.pod:6159 ../src/guestfs-actions.pod:6173 ../src/guestfs-actions.pod:6569
5753 msgid "(Added in 1.3.2)"
5757 #: ../src/guestfs-actions.pod:948
5758 msgid "guestfs_checksums_out"
5762 #: ../src/guestfs-actions.pod:950
5766 " guestfs_checksums_out (guestfs_h *g,\n"
5767 " const char *csumtype,\n"
5768 " const char *directory,\n"
5769 " const char *sumsfile);\n"
5774 #: ../src/guestfs-actions.pod:956 ../fish/guestfish-actions.pod:646
5776 "This command computes the checksums of all regular files in C<directory> and "
5777 "then emits a list of those checksums to the local output file C<sumsfile>."
5781 #: ../src/guestfs-actions.pod:960 ../fish/guestfish-actions.pod:650
5783 "This can be used for verifying the integrity of a virtual machine. However "
5784 "to be properly secure you should pay attention to the output of the checksum "
5785 "command (it uses the ones from GNU coreutils). In particular when the "
5786 "filename is not printable, coreutils uses a special backslash syntax. For "
5787 "more information, see the GNU coreutils info file."
5791 #: ../src/guestfs-actions.pod:970
5792 msgid "(Added in 1.3.7)"
5796 #: ../src/guestfs-actions.pod:972
5797 msgid "guestfs_chmod"
5801 #: ../src/guestfs-actions.pod:974
5805 " guestfs_chmod (guestfs_h *g,\n"
5807 " const char *path);\n"
5812 #: ../src/guestfs-actions.pod:979 ../fish/guestfish-actions.pod:664
5814 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
5819 #: ../src/guestfs-actions.pod:982 ../fish/guestfish-actions.pod:667
5821 "I<Note>: When using this command from guestfish, C<mode> by default would be "
5822 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
5827 #: ../src/guestfs-actions.pod:986 ../src/guestfs-actions.pod:3942 ../src/guestfs-actions.pod:4057 ../src/guestfs-actions.pod:4076 ../src/guestfs-actions.pod:4095 ../fish/guestfish-actions.pod:671 ../fish/guestfish-actions.pod:2631 ../fish/guestfish-actions.pod:2716 ../fish/guestfish-actions.pod:2726 ../fish/guestfish-actions.pod:2736
5828 msgid "The mode actually set is affected by the umask."
5832 #: ../src/guestfs-actions.pod:992
5833 msgid "guestfs_chown"
5837 #: ../src/guestfs-actions.pod:994
5841 " guestfs_chown (guestfs_h *g,\n"
5844 " const char *path);\n"
5849 #: ../src/guestfs-actions.pod:1000 ../fish/guestfish-actions.pod:677
5850 msgid "Change the file owner to C<owner> and group to C<group>."
5854 #: ../src/guestfs-actions.pod:1002 ../src/guestfs-actions.pod:3080 ../fish/guestfish-actions.pod:679 ../fish/guestfish-actions.pod:2109
5856 "Only numeric uid and gid are supported. If you want to use names, you will "
5857 "need to locate and parse the password file yourself (Augeas support makes "
5858 "this relatively easy)."
5862 #: ../src/guestfs-actions.pod:1010
5863 msgid "guestfs_command"
5867 #: ../src/guestfs-actions.pod:1012
5871 " guestfs_command (guestfs_h *g,\n"
5872 " char *const *arguments);\n"
5877 #: ../src/guestfs-actions.pod:1016 ../fish/guestfish-actions.pod:687
5879 "This call runs a command from the guest filesystem. The filesystem must be "
5880 "mounted, and must contain a compatible operating system (ie. something "
5881 "Linux, with the same or compatible processor architecture)."
5885 #: ../src/guestfs-actions.pod:1021
5887 "The single parameter is an argv-style list of arguments. The first element "
5888 "is the name of the program to run. Subsequent elements are parameters. The "
5889 "list must be non-empty (ie. must contain a program name). Note that the "
5890 "command runs directly, and is I<not> invoked via the shell (see "
5895 #: ../src/guestfs-actions.pod:1028 ../fish/guestfish-actions.pod:699
5896 msgid "The return value is anything printed to I<stdout> by the command."
5900 #: ../src/guestfs-actions.pod:1031 ../fish/guestfish-actions.pod:702
5902 "If the command returns a non-zero exit status, then this function returns an "
5903 "error message. The error message string is the content of I<stderr> from "
5908 #: ../src/guestfs-actions.pod:1035 ../fish/guestfish-actions.pod:706
5910 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
5911 "C</bin>. If you require a program from another location, you should provide "
5912 "the full path in the first parameter."
5916 #: ../src/guestfs-actions.pod:1040 ../fish/guestfish-actions.pod:711
5918 "Shared libraries and data files required by the program must be available on "
5919 "filesystems which are mounted in the correct places. It is the caller's "
5920 "responsibility to ensure all filesystems that are needed are mounted at the "
5925 #: ../src/guestfs-actions.pod:1052 ../src/guestfs-actions.pod:1072 ../src/guestfs-actions.pod:1535
5926 msgid "(Added in 0.9.1)"
5930 #: ../src/guestfs-actions.pod:1054
5931 msgid "guestfs_command_lines"
5935 #: ../src/guestfs-actions.pod:1056
5939 " guestfs_command_lines (guestfs_h *g,\n"
5940 " char *const *arguments);\n"
5945 #: ../src/guestfs-actions.pod:1060
5947 "This is the same as C<guestfs_command>, but splits the result into a list of "
5952 #: ../src/guestfs-actions.pod:1063
5953 msgid "See also: C<guestfs_sh_lines>"
5957 #: ../src/guestfs-actions.pod:1074
5958 msgid "guestfs_config"
5962 #: ../src/guestfs-actions.pod:1076
5966 " guestfs_config (guestfs_h *g,\n"
5967 " const char *qemuparam,\n"
5968 " const char *qemuvalue);\n"
5973 #: ../src/guestfs-actions.pod:1081 ../fish/guestfish-actions.pod:736
5975 "This can be used to add arbitrary qemu command line parameters of the form "
5976 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
5977 "setting some parameters which would interfere with parameters that we use."
5981 #: ../src/guestfs-actions.pod:1086 ../fish/guestfish-actions.pod:741
5982 msgid "The first character of C<param> string must be a C<-> (dash)."
5986 #: ../src/guestfs-actions.pod:1088 ../fish/guestfish-actions.pod:743
5987 msgid "C<value> can be NULL."
5991 #: ../src/guestfs-actions.pod:1094
5992 msgid "guestfs_copy_size"
5996 #: ../src/guestfs-actions.pod:1096
6000 " guestfs_copy_size (guestfs_h *g,\n"
6001 " const char *src,\n"
6002 " const char *dest,\n"
6008 #: ../src/guestfs-actions.pod:1102 ../fish/guestfish-actions.pod:749
6010 "This command copies exactly C<size> bytes from one source device or file "
6011 "C<src> to another destination device or file C<dest>."
6015 #: ../src/guestfs-actions.pod:1105 ../fish/guestfish-actions.pod:752
6017 "Note this will fail if the source is too short or if the destination is not "
6022 #: ../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:6748 ../src/guestfs-actions.pod:6767
6024 "This long-running command can generate progress notification messages so "
6025 "that the caller can display a progress bar or indicator. To receive these "
6026 "messages, the caller must register a progress callback. See "
6027 "L<guestfs(3)/guestfs_set_progress_callback>."
6031 #: ../src/guestfs-actions.pod:1115 ../src/guestfs-actions.pod:3718 ../src/guestfs-actions.pod:4854 ../src/guestfs-actions.pod:6476 ../src/guestfs-actions.pod:6496 ../src/guestfs-actions.pod:6582
6032 msgid "(Added in 1.0.87)"
6036 #: ../src/guestfs-actions.pod:1117
6041 #: ../src/guestfs-actions.pod:1119
6045 " guestfs_cp (guestfs_h *g,\n"
6046 " const char *src,\n"
6047 " const char *dest);\n"
6052 #: ../src/guestfs-actions.pod:1124 ../fish/guestfish-actions.pod:759
6054 "This copies a file from C<src> to C<dest> where C<dest> is either a "
6055 "destination filename or destination directory."
6059 #: ../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:4321 ../src/guestfs-actions.pod:4698
6060 msgid "(Added in 1.0.18)"
6064 #: ../src/guestfs-actions.pod:1131
6065 msgid "guestfs_cp_a"
6069 #: ../src/guestfs-actions.pod:1133
6073 " guestfs_cp_a (guestfs_h *g,\n"
6074 " const char *src,\n"
6075 " const char *dest);\n"
6080 #: ../src/guestfs-actions.pod:1138 ../fish/guestfish-actions.pod:766
6082 "This copies a file or directory from C<src> to C<dest> recursively using the "
6087 #: ../src/guestfs-actions.pod:1145
6092 #: ../src/guestfs-actions.pod:1147
6096 " guestfs_dd (guestfs_h *g,\n"
6097 " const char *src,\n"
6098 " const char *dest);\n"
6103 #: ../src/guestfs-actions.pod:1152 ../fish/guestfish-actions.pod:773
6105 "This command copies from one source device or file C<src> to another "
6106 "destination device or file C<dest>. Normally you would use this to copy to "
6107 "or from a device or partition, for example to duplicate a filesystem."
6111 #: ../src/guestfs-actions.pod:1157
6113 "If the destination is a device, it must be as large or larger than the "
6114 "source file or device, otherwise the copy will fail. This command cannot do "
6115 "partial copies (see C<guestfs_copy_size>)."
6119 #: ../src/guestfs-actions.pod:1165
6124 #: ../src/guestfs-actions.pod:1167
6128 " guestfs_df (guestfs_h *g);\n"
6133 #: ../src/guestfs-actions.pod:1170 ../fish/guestfish-actions.pod:786
6134 msgid "This command runs the C<df> command to report disk space used."
6138 #: ../src/guestfs-actions.pod:1172 ../src/guestfs-actions.pod:1189 ../fish/guestfish-actions.pod:788 ../fish/guestfish-actions.pod:799
6140 "This command is mostly useful for interactive sessions. It is I<not> "
6141 "intended that you try to parse the output string. Use C<statvfs> from "
6146 #: ../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:3828 ../src/guestfs-actions.pod:4221 ../src/guestfs-actions.pod:5983 ../src/guestfs-actions.pod:6007 ../src/guestfs-actions.pod:6615 ../src/guestfs-actions.pod:6628 ../src/guestfs-actions.pod:6641
6147 msgid "(Added in 1.0.54)"
6151 #: ../src/guestfs-actions.pod:1181
6152 msgid "guestfs_df_h"
6156 #: ../src/guestfs-actions.pod:1183
6160 " guestfs_df_h (guestfs_h *g);\n"
6165 #: ../src/guestfs-actions.pod:1186 ../fish/guestfish-actions.pod:796
6167 "This command runs the C<df -h> command to report disk space used in "
6168 "human-readable format."
6172 #: ../src/guestfs-actions.pod:1198
6173 msgid "guestfs_dmesg"
6177 #: ../src/guestfs-actions.pod:1200
6181 " guestfs_dmesg (guestfs_h *g);\n"
6186 #: ../src/guestfs-actions.pod:1203 ../fish/guestfish-actions.pod:807
6188 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
6189 "This is sometimes useful for extended debugging of problems."
6193 #: ../src/guestfs-actions.pod:1207
6195 "Another way to get the same information is to enable verbose messages with "
6196 "C<guestfs_set_verbose> or by setting the environment variable "
6197 "C<LIBGUESTFS_DEBUG=1> before running the program."
6201 #: ../src/guestfs-actions.pod:1217
6202 msgid "guestfs_download"
6206 #: ../src/guestfs-actions.pod:1219
6210 " guestfs_download (guestfs_h *g,\n"
6211 " const char *remotefilename,\n"
6212 " const char *filename);\n"
6217 #: ../src/guestfs-actions.pod:1224 ../src/guestfs-actions.pod:1249 ../fish/guestfish-actions.pod:820 ../fish/guestfish-actions.pod:833
6219 "Download file C<remotefilename> and save it as C<filename> on the local "
6224 #: ../src/guestfs-actions.pod:1227 ../src/guestfs-actions.pod:6239 ../fish/guestfish-actions.pod:823 ../fish/guestfish-actions.pod:4151
6225 msgid "C<filename> can also be a named pipe."
6229 #: ../src/guestfs-actions.pod:1229
6230 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
6234 #: ../src/guestfs-actions.pod:1240
6235 msgid "guestfs_download_offset"
6239 #: ../src/guestfs-actions.pod:1242
6243 " guestfs_download_offset (guestfs_h *g,\n"
6244 " const char *remotefilename,\n"
6245 " const char *filename,\n"
6246 " int64_t offset,\n"
6252 #: ../src/guestfs-actions.pod:1252 ../fish/guestfish-actions.pod:836
6254 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
6255 "region must be within the file or device)."
6259 #: ../src/guestfs-actions.pod:1255
6261 "Note that there is no limit on the amount of data that can be downloaded "
6262 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
6263 "full amount unless an error occurs."
6267 #: ../src/guestfs-actions.pod:1260
6268 msgid "See also C<guestfs_download>, C<guestfs_pread>."
6272 #: ../src/guestfs-actions.pod:1269 ../src/guestfs-actions.pod:6274
6273 msgid "(Added in 1.5.17)"
6277 #: ../src/guestfs-actions.pod:1271
6278 msgid "guestfs_drop_caches"
6282 #: ../src/guestfs-actions.pod:1273
6286 " guestfs_drop_caches (guestfs_h *g,\n"
6287 " int whattodrop);\n"
6292 #: ../src/guestfs-actions.pod:1277 ../fish/guestfish-actions.pod:852
6294 "This instructs the guest kernel to drop its page cache, and/or dentries and "
6295 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
6296 "to drop, see L<http://linux-mm.org/Drop_Caches>"
6300 #: ../src/guestfs-actions.pod:1282 ../fish/guestfish-actions.pod:857
6301 msgid "Setting C<whattodrop> to 3 should drop everything."
6305 #: ../src/guestfs-actions.pod:1284 ../fish/guestfish-actions.pod:859
6307 "This automatically calls L<sync(2)> before the operation, so that the "
6308 "maximum guest memory is freed."
6312 #: ../src/guestfs-actions.pod:1291
6317 #: ../src/guestfs-actions.pod:1293
6321 " guestfs_du (guestfs_h *g,\n"
6322 " const char *path);\n"
6327 #: ../src/guestfs-actions.pod:1297 ../fish/guestfish-actions.pod:866
6329 "This command runs the C<du -s> command to estimate file space usage for "
6334 #: ../src/guestfs-actions.pod:1300 ../fish/guestfish-actions.pod:869
6336 "C<path> can be a file or a directory. If C<path> is a directory then the "
6337 "estimate includes the contents of the directory and all subdirectories "
6342 #: ../src/guestfs-actions.pod:1304 ../fish/guestfish-actions.pod:873
6343 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
6347 #: ../src/guestfs-actions.pod:1311
6348 msgid "guestfs_e2fsck_f"
6352 #: ../src/guestfs-actions.pod:1313
6356 " guestfs_e2fsck_f (guestfs_h *g,\n"
6357 " const char *device);\n"
6362 #: ../src/guestfs-actions.pod:1317 ../fish/guestfish-actions.pod:880
6364 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
6365 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
6370 #: ../src/guestfs-actions.pod:1321
6372 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
6373 "Normally you should use C<guestfs_fsck>."
6377 #: ../src/guestfs-actions.pod:1326
6378 msgid "(Added in 1.0.29)"
6382 #: ../src/guestfs-actions.pod:1328
6383 msgid "guestfs_echo_daemon"
6387 #: ../src/guestfs-actions.pod:1330
6391 " guestfs_echo_daemon (guestfs_h *g,\n"
6392 " char *const *words);\n"
6397 #: ../src/guestfs-actions.pod:1334 ../fish/guestfish-actions.pod:891
6399 "This command concatenates the list of C<words> passed with single spaces "
6400 "between them and returns the resulting string."
6404 #: ../src/guestfs-actions.pod:1337 ../fish/guestfish-actions.pod:894
6405 msgid "You can use this command to test the connection through to the daemon."
6409 #: ../src/guestfs-actions.pod:1339
6410 msgid "See also C<guestfs_ping_daemon>."
6414 #: ../src/guestfs-actions.pod:1344 ../src/guestfs-actions.pod:2071 ../src/guestfs-actions.pod:5487
6415 msgid "(Added in 1.0.69)"
6419 #: ../src/guestfs-actions.pod:1346
6420 msgid "guestfs_egrep"
6424 #: ../src/guestfs-actions.pod:1348
6428 " guestfs_egrep (guestfs_h *g,\n"
6429 " const char *regex,\n"
6430 " const char *path);\n"
6435 #: ../src/guestfs-actions.pod:1353 ../fish/guestfish-actions.pod:902
6436 msgid "This calls the external C<egrep> program and returns the matching lines."
6440 #: ../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:3211 ../src/guestfs-actions.pod:3225 ../src/guestfs-actions.pod:3238 ../src/guestfs-actions.pod:3252 ../src/guestfs-actions.pod:4156 ../src/guestfs-actions.pod:5032 ../src/guestfs-actions.pod:5081 ../src/guestfs-actions.pod:5851 ../src/guestfs-actions.pod:5863 ../src/guestfs-actions.pod:5876 ../src/guestfs-actions.pod:5889 ../src/guestfs-actions.pod:5911 ../src/guestfs-actions.pod:5924 ../src/guestfs-actions.pod:5937 ../src/guestfs-actions.pod:5950 ../src/guestfs-actions.pod:6711 ../src/guestfs-actions.pod:6730 ../src/guestfs-actions.pod:6815 ../src/guestfs-actions.pod:6834 ../src/guestfs-actions.pod:6880 ../src/guestfs-actions.pod:6899
6441 msgid "(Added in 1.0.66)"
6445 #: ../src/guestfs-actions.pod:1365
6446 msgid "guestfs_egrepi"
6450 #: ../src/guestfs-actions.pod:1367
6454 " guestfs_egrepi (guestfs_h *g,\n"
6455 " const char *regex,\n"
6456 " const char *path);\n"
6461 #: ../src/guestfs-actions.pod:1372 ../fish/guestfish-actions.pod:912
6462 msgid "This calls the external C<egrep -i> program and returns the matching lines."
6466 #: ../src/guestfs-actions.pod:1384
6467 msgid "guestfs_equal"
6471 #: ../src/guestfs-actions.pod:1386
6475 " guestfs_equal (guestfs_h *g,\n"
6476 " const char *file1,\n"
6477 " const char *file2);\n"
6482 #: ../src/guestfs-actions.pod:1391 ../fish/guestfish-actions.pod:922
6484 "This compares the two files C<file1> and C<file2> and returns true if their "
6485 "content is exactly equal, or false otherwise."
6489 #: ../src/guestfs-actions.pod:1394 ../fish/guestfish-actions.pod:925
6490 msgid "The external L<cmp(1)> program is used for the comparison."
6494 #: ../src/guestfs-actions.pod:1400
6495 msgid "guestfs_exists"
6499 #: ../src/guestfs-actions.pod:1402
6503 " guestfs_exists (guestfs_h *g,\n"
6504 " const char *path);\n"
6509 #: ../src/guestfs-actions.pod:1406 ../fish/guestfish-actions.pod:931
6511 "This returns C<true> if and only if there is a file, directory (or anything) "
6512 "with the given C<path> name."
6516 #: ../src/guestfs-actions.pod:1409
6517 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
6521 #: ../src/guestfs-actions.pod:1415
6522 msgid "guestfs_fallocate"
6526 #: ../src/guestfs-actions.pod:1417
6530 " guestfs_fallocate (guestfs_h *g,\n"
6531 " const char *path,\n"
6537 #: ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:1448 ../fish/guestfish-actions.pod:940 ../fish/guestfish-actions.pod:959
6539 "This command preallocates a file (containing zero bytes) named C<path> of "
6540 "size C<len> bytes. If the file exists already, it is overwritten."
6544 #: ../src/guestfs-actions.pod:1426 ../fish/guestfish-actions.pod:944
6546 "Do not confuse this with the guestfish-specific C<alloc> command which "
6547 "allocates a file in the host and attaches it as a device."
6551 #: ../src/guestfs-actions.pod:1432 ../fish/guestfish-actions.pod:948
6553 "This function is deprecated. In new code, use the C<fallocate64> call "
6558 #: ../src/guestfs-actions.pod:1441
6559 msgid "guestfs_fallocate64"
6563 #: ../src/guestfs-actions.pod:1443
6567 " guestfs_fallocate64 (guestfs_h *g,\n"
6568 " const char *path,\n"
6574 #: ../src/guestfs-actions.pod:1452
6576 "Note that this call allocates disk blocks for the file. To create a sparse "
6577 "file use C<guestfs_truncate_size> instead."
6581 #: ../src/guestfs-actions.pod:1455
6583 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
6584 "oversight it only allowed 30 bit lengths to be specified, effectively "
6585 "limiting the maximum size of files created through that call to 1GB."
6589 #: ../src/guestfs-actions.pod:1460 ../fish/guestfish-actions.pod:971
6591 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
6592 "commands which create a file in the host and attach it as a device."
6596 #: ../src/guestfs-actions.pod:1466
6597 msgid "(Added in 1.3.17)"
6601 #: ../src/guestfs-actions.pod:1468
6602 msgid "guestfs_fgrep"
6606 #: ../src/guestfs-actions.pod:1470
6610 " guestfs_fgrep (guestfs_h *g,\n"
6611 " const char *pattern,\n"
6612 " const char *path);\n"
6617 #: ../src/guestfs-actions.pod:1475 ../fish/guestfish-actions.pod:979
6618 msgid "This calls the external C<fgrep> program and returns the matching lines."
6622 #: ../src/guestfs-actions.pod:1487
6623 msgid "guestfs_fgrepi"
6627 #: ../src/guestfs-actions.pod:1489
6631 " guestfs_fgrepi (guestfs_h *g,\n"
6632 " const char *pattern,\n"
6633 " const char *path);\n"
6638 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:989
6639 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
6643 #: ../src/guestfs-actions.pod:1506
6644 msgid "guestfs_file"
6648 #: ../src/guestfs-actions.pod:1508
6652 " guestfs_file (guestfs_h *g,\n"
6653 " const char *path);\n"
6658 #: ../src/guestfs-actions.pod:1512 ../fish/guestfish-actions.pod:999
6660 "This call uses the standard L<file(1)> command to determine the type or "
6661 "contents of the file."
6665 #: ../src/guestfs-actions.pod:1515 ../fish/guestfish-actions.pod:1002
6667 "This call will also transparently look inside various types of compressed "
6672 #: ../src/guestfs-actions.pod:1518 ../fish/guestfish-actions.pod:1005
6674 "The exact command which runs is C<file -zb path>. Note in particular that "
6675 "the filename is not prepended to the output (the C<-b> option)."
6679 #: ../src/guestfs-actions.pod:1522
6681 "This command can also be used on C</dev/> devices (and partitions, LV "
6682 "names). You can for example use this to determine if a device contains a "
6683 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
6687 #: ../src/guestfs-actions.pod:1527 ../fish/guestfish-actions.pod:1014
6689 "If the C<path> does not begin with C</dev/> then this command only works for "
6690 "the content of regular files. For other file types (directory, symbolic "
6691 "link etc) it will just return the string C<directory> etc."
6695 #: ../src/guestfs-actions.pod:1537
6696 msgid "guestfs_file_architecture"
6700 #: ../src/guestfs-actions.pod:1539
6704 " guestfs_file_architecture (guestfs_h *g,\n"
6705 " const char *filename);\n"
6710 #: ../src/guestfs-actions.pod:1543 ../fish/guestfish-actions.pod:1023
6712 "This detects the architecture of the binary C<filename>, and returns it if "
6717 #: ../src/guestfs-actions.pod:1546 ../fish/guestfish-actions.pod:1026
6718 msgid "Currently defined architectures are:"
6722 #: ../src/guestfs-actions.pod:1550 ../fish/guestfish-actions.pod:1030
6727 #: ../src/guestfs-actions.pod:1552 ../fish/guestfish-actions.pod:1032
6729 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
6730 "irrespective of the precise processor requirements of the binary."
6734 #: ../src/guestfs-actions.pod:1555 ../fish/guestfish-actions.pod:1035
6739 #: ../src/guestfs-actions.pod:1557 ../fish/guestfish-actions.pod:1037
6740 msgid "64 bit x86-64."
6744 #: ../src/guestfs-actions.pod:1559 ../fish/guestfish-actions.pod:1039
6749 #: ../src/guestfs-actions.pod:1561 ../fish/guestfish-actions.pod:1041
6750 msgid "32 bit SPARC."
6754 #: ../src/guestfs-actions.pod:1563 ../fish/guestfish-actions.pod:1043
6759 #: ../src/guestfs-actions.pod:1565 ../fish/guestfish-actions.pod:1045
6760 msgid "64 bit SPARC V9 and above."
6764 #: ../src/guestfs-actions.pod:1567 ../fish/guestfish-actions.pod:1047
6769 #: ../src/guestfs-actions.pod:1569 ../fish/guestfish-actions.pod:1049
6770 msgid "Intel Itanium."
6774 #: ../src/guestfs-actions.pod:1571 ../fish/guestfish-actions.pod:1051
6779 #: ../src/guestfs-actions.pod:1573 ../fish/guestfish-actions.pod:1053
6780 msgid "32 bit Power PC."
6784 #: ../src/guestfs-actions.pod:1575 ../fish/guestfish-actions.pod:1055
6789 #: ../src/guestfs-actions.pod:1577 ../fish/guestfish-actions.pod:1057
6790 msgid "64 bit Power PC."
6794 #: ../src/guestfs-actions.pod:1581 ../fish/guestfish-actions.pod:1061
6795 msgid "Libguestfs may return other architecture strings in future."
6799 #: ../src/guestfs-actions.pod:1583 ../fish/guestfish-actions.pod:1063
6800 msgid "The function works on at least the following types of files:"
6804 #: ../src/guestfs-actions.pod:1589 ../fish/guestfish-actions.pod:1069
6805 msgid "many types of Un*x and Linux binary"
6809 #: ../src/guestfs-actions.pod:1593 ../fish/guestfish-actions.pod:1073
6810 msgid "many types of Un*x and Linux shared library"
6814 #: ../src/guestfs-actions.pod:1597 ../fish/guestfish-actions.pod:1077
6815 msgid "Windows Win32 and Win64 binaries"
6819 #: ../src/guestfs-actions.pod:1601 ../fish/guestfish-actions.pod:1081
6820 msgid "Windows Win32 and Win64 DLLs"
6824 #: ../src/guestfs-actions.pod:1603 ../fish/guestfish-actions.pod:1083
6825 msgid "Win32 binaries and DLLs return C<i386>."
6829 #: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1085
6830 msgid "Win64 binaries and DLLs return C<x86_64>."
6834 #: ../src/guestfs-actions.pod:1609 ../fish/guestfish-actions.pod:1089
6835 msgid "Linux kernel modules"
6839 #: ../src/guestfs-actions.pod:1613 ../fish/guestfish-actions.pod:1093
6840 msgid "Linux new-style initrd images"
6844 #: ../src/guestfs-actions.pod:1617 ../fish/guestfish-actions.pod:1097
6845 msgid "some non-x86 Linux vmlinuz kernels"
6849 #: ../src/guestfs-actions.pod:1621 ../fish/guestfish-actions.pod:1101
6850 msgid "What it can't do currently:"
6854 #: ../src/guestfs-actions.pod:1627 ../fish/guestfish-actions.pod:1107
6855 msgid "static libraries (libfoo.a)"
6859 #: ../src/guestfs-actions.pod:1631 ../fish/guestfish-actions.pod:1111
6860 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
6864 #: ../src/guestfs-actions.pod:1635 ../fish/guestfish-actions.pod:1115
6865 msgid "x86 Linux vmlinuz kernels"
6869 #: ../src/guestfs-actions.pod:1637 ../fish/guestfish-actions.pod:1117
6871 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
6872 "compressed code, and are horribly hard to unpack. If you want to find the "
6873 "architecture of a kernel, use the architecture of the associated initrd or "
6874 "kernel module(s) instead."
6878 #: ../src/guestfs-actions.pod:1647 ../src/guestfs-actions.pod:1810 ../src/guestfs-actions.pod:1827 ../src/guestfs-actions.pod:2478 ../src/guestfs-actions.pod:2551 ../src/guestfs-actions.pod:2577 ../src/guestfs-actions.pod:2604 ../src/guestfs-actions.pod:2625 ../src/guestfs-actions.pod:2658 ../src/guestfs-actions.pod:2738 ../src/guestfs-actions.pod:2798 ../src/guestfs-actions.pod:2864 ../src/guestfs-actions.pod:2996
6879 msgid "(Added in 1.5.3)"
6883 #: ../src/guestfs-actions.pod:1649
6884 msgid "guestfs_filesize"
6888 #: ../src/guestfs-actions.pod:1651
6892 " guestfs_filesize (guestfs_h *g,\n"
6893 " const char *file);\n"
6898 #: ../src/guestfs-actions.pod:1655 ../fish/guestfish-actions.pod:1128
6899 msgid "This command returns the size of C<file> in bytes."
6903 #: ../src/guestfs-actions.pod:1657
6905 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
6906 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
6907 "devices, use C<guestfs_blockdev_getsize64>."
6911 #: ../src/guestfs-actions.pod:1663
6912 msgid "(Added in 1.0.82)"
6916 #: ../src/guestfs-actions.pod:1665
6917 msgid "guestfs_fill"
6921 #: ../src/guestfs-actions.pod:1667
6925 " guestfs_fill (guestfs_h *g,\n"
6928 " const char *path);\n"
6933 #: ../src/guestfs-actions.pod:1673 ../fish/guestfish-actions.pod:1138
6935 "This command creates a new file called C<path>. The initial content of the "
6936 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
6941 #: ../src/guestfs-actions.pod:1677
6943 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
6944 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
6945 "bytes use C<guestfs_fill_pattern>."
6949 #: ../src/guestfs-actions.pod:1689
6950 msgid "(Added in 1.0.79)"
6954 #: ../src/guestfs-actions.pod:1691
6955 msgid "guestfs_fill_pattern"
6959 #: ../src/guestfs-actions.pod:1693
6963 " guestfs_fill_pattern (guestfs_h *g,\n"
6964 " const char *pattern,\n"
6966 " const char *path);\n"
6971 #: ../src/guestfs-actions.pod:1699
6973 "This function is like C<guestfs_fill> except that it creates a new file of "
6974 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
6975 "pattern is truncated if necessary to ensure the length of the file is "
6976 "exactly C<len> bytes."
6980 #: ../src/guestfs-actions.pod:1711
6981 msgid "(Added in 1.3.12)"
6985 #: ../src/guestfs-actions.pod:1713
6986 msgid "guestfs_find"
6990 #: ../src/guestfs-actions.pod:1715
6994 " guestfs_find (guestfs_h *g,\n"
6995 " const char *directory);\n"
7000 #: ../src/guestfs-actions.pod:1719 ../fish/guestfish-actions.pod:1160
7002 "This command lists out all files and directories, recursively, starting at "
7003 "C<directory>. It is essentially equivalent to running the shell command "
7004 "C<find directory -print> but some post-processing happens on the output, "
7009 #: ../src/guestfs-actions.pod:1724 ../fish/guestfish-actions.pod:1165
7011 "This returns a list of strings I<without any prefix>. Thus if the directory "
7016 #: ../src/guestfs-actions.pod:1727 ../fish/guestfish-actions.pod:1168
7026 #: ../src/guestfs-actions.pod:1731
7027 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
7031 #: ../src/guestfs-actions.pod:1734 ../fish/guestfish-actions.pod:1175
7042 #: ../src/guestfs-actions.pod:1739 ../fish/guestfish-actions.pod:1180
7043 msgid "If C<directory> is not a directory, then this command returns an error."
7047 #: ../src/guestfs-actions.pod:1742 ../fish/guestfish-actions.pod:1183
7048 msgid "The returned list is sorted."
7052 #: ../src/guestfs-actions.pod:1744
7053 msgid "See also C<guestfs_find0>."
7057 #: ../src/guestfs-actions.pod:1753 ../src/guestfs-actions.pod:3655 ../src/guestfs-actions.pod:5116
7058 msgid "(Added in 1.0.27)"
7062 #: ../src/guestfs-actions.pod:1755
7063 msgid "guestfs_find0"
7067 #: ../src/guestfs-actions.pod:1757
7071 " guestfs_find0 (guestfs_h *g,\n"
7072 " const char *directory,\n"
7073 " const char *files);\n"
7078 #: ../src/guestfs-actions.pod:1762 ../fish/guestfish-actions.pod:1194
7080 "This command lists out all files and directories, recursively, starting at "
7081 "C<directory>, placing the resulting list in the external file called "
7086 #: ../src/guestfs-actions.pod:1766
7088 "This command works the same way as C<guestfs_find> with the following "
7093 #: ../src/guestfs-actions.pod:1773 ../fish/guestfish-actions.pod:1205
7094 msgid "The resulting list is written to an external file."
7098 #: ../src/guestfs-actions.pod:1777 ../fish/guestfish-actions.pod:1209
7100 "Items (filenames) in the result are separated by C<\\0> characters. See "
7101 "L<find(1)> option I<-print0>."
7105 #: ../src/guestfs-actions.pod:1782 ../fish/guestfish-actions.pod:1214
7106 msgid "This command is not limited in the number of names that it can return."
7110 #: ../src/guestfs-actions.pod:1787 ../fish/guestfish-actions.pod:1219
7111 msgid "The result list is not sorted."
7115 #: ../src/guestfs-actions.pod:1793
7116 msgid "(Added in 1.0.74)"
7120 #: ../src/guestfs-actions.pod:1795
7121 msgid "guestfs_findfs_label"
7125 #: ../src/guestfs-actions.pod:1797
7129 " guestfs_findfs_label (guestfs_h *g,\n"
7130 " const char *label);\n"
7135 #: ../src/guestfs-actions.pod:1801 ../fish/guestfish-actions.pod:1229
7137 "This command searches the filesystems and returns the one which has the "
7138 "given label. An error is returned if no such filesystem can be found."
7142 #: ../src/guestfs-actions.pod:1805
7143 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
7147 #: ../src/guestfs-actions.pod:1812
7148 msgid "guestfs_findfs_uuid"
7152 #: ../src/guestfs-actions.pod:1814
7156 " guestfs_findfs_uuid (guestfs_h *g,\n"
7157 " const char *uuid);\n"
7162 #: ../src/guestfs-actions.pod:1818 ../fish/guestfish-actions.pod:1239
7164 "This command searches the filesystems and returns the one which has the "
7165 "given UUID. An error is returned if no such filesystem can be found."
7169 #: ../src/guestfs-actions.pod:1822
7170 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
7174 #: ../src/guestfs-actions.pod:1829
7175 msgid "guestfs_fsck"
7179 #: ../src/guestfs-actions.pod:1831
7183 " guestfs_fsck (guestfs_h *g,\n"
7184 " const char *fstype,\n"
7185 " const char *device);\n"
7190 #: ../src/guestfs-actions.pod:1836 ../fish/guestfish-actions.pod:1249
7192 "This runs the filesystem checker (fsck) on C<device> which should have "
7193 "filesystem type C<fstype>."
7197 #: ../src/guestfs-actions.pod:1839 ../fish/guestfish-actions.pod:1252
7199 "The returned integer is the status. See L<fsck(8)> for the list of status "
7200 "codes from C<fsck>."
7204 #: ../src/guestfs-actions.pod:1848 ../fish/guestfish-actions.pod:1261
7205 msgid "Multiple status codes can be summed together."
7209 #: ../src/guestfs-actions.pod:1852 ../fish/guestfish-actions.pod:1265
7211 "A non-zero return code can mean \"success\", for example if errors have been "
7212 "corrected on the filesystem."
7216 #: ../src/guestfs-actions.pod:1857 ../fish/guestfish-actions.pod:1270
7217 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
7221 #: ../src/guestfs-actions.pod:1862 ../fish/guestfish-actions.pod:1275
7222 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
7226 #: ../src/guestfs-actions.pod:1866 ../src/guestfs-actions.pod:6753
7227 msgid "(Added in 1.0.16)"
7231 #: ../src/guestfs-actions.pod:1868
7232 msgid "guestfs_get_append"
7236 #: ../src/guestfs-actions.pod:1870
7240 " guestfs_get_append (guestfs_h *g);\n"
7245 #: ../src/guestfs-actions.pod:1873 ../fish/guestfish-actions.pod:1281
7247 "Return the additional kernel options which are added to the guest kernel "
7252 #: ../src/guestfs-actions.pod:1876 ../fish/guestfish-actions.pod:1284
7253 msgid "If C<NULL> then no options are added."
7257 #: ../src/guestfs-actions.pod:1878
7259 "This function returns a string which may be NULL. There is no way to return "
7260 "an error from this function. The string is owned by the guest handle and "
7261 "must I<not> be freed."
7265 #: ../src/guestfs-actions.pod:1882 ../src/guestfs-actions.pod:4794 ../src/guestfs-actions.pod:5257 ../src/guestfs-actions.pod:5625 ../src/guestfs-actions.pod:5644 ../src/guestfs-actions.pod:5660 ../src/guestfs-actions.pod:5677 ../src/guestfs-actions.pod:6424 ../src/guestfs-actions.pod:6442 ../src/guestfs-actions.pod:6796
7266 msgid "(Added in 1.0.26)"
7270 #: ../src/guestfs-actions.pod:1884
7271 msgid "guestfs_get_autosync"
7275 #: ../src/guestfs-actions.pod:1886
7279 " guestfs_get_autosync (guestfs_h *g);\n"
7284 #: ../src/guestfs-actions.pod:1889 ../fish/guestfish-actions.pod:1290
7285 msgid "Get the autosync flag."
7289 #: ../src/guestfs-actions.pod:1895
7290 msgid "guestfs_get_direct"
7294 #: ../src/guestfs-actions.pod:1897
7298 " guestfs_get_direct (guestfs_h *g);\n"
7303 #: ../src/guestfs-actions.pod:1900 ../fish/guestfish-actions.pod:1296
7304 msgid "Return the direct appliance mode flag."
7308 #: ../src/guestfs-actions.pod:1904 ../src/guestfs-actions.pod:5298
7309 msgid "(Added in 1.0.72)"
7313 #: ../src/guestfs-actions.pod:1906
7314 msgid "guestfs_get_e2label"
7318 #: ../src/guestfs-actions.pod:1908
7322 " guestfs_get_e2label (guestfs_h *g,\n"
7323 " const char *device);\n"
7328 #: ../src/guestfs-actions.pod:1912 ../fish/guestfish-actions.pod:1302
7329 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
7333 #: ../src/guestfs-actions.pod:1918 ../fish/guestfish-actions.pod:1305
7335 "This function is deprecated. In new code, use the C<vfs_label> call "
7340 #: ../src/guestfs-actions.pod:1925 ../src/guestfs-actions.pod:1946 ../src/guestfs-actions.pod:5316 ../src/guestfs-actions.pod:5335
7341 msgid "(Added in 1.0.15)"
7345 #: ../src/guestfs-actions.pod:1927
7346 msgid "guestfs_get_e2uuid"
7350 #: ../src/guestfs-actions.pod:1929
7354 " guestfs_get_e2uuid (guestfs_h *g,\n"
7355 " const char *device);\n"
7360 #: ../src/guestfs-actions.pod:1933 ../fish/guestfish-actions.pod:1316
7361 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
7365 #: ../src/guestfs-actions.pod:1939 ../fish/guestfish-actions.pod:1319
7366 msgid "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
7370 #: ../src/guestfs-actions.pod:1948
7371 msgid "guestfs_get_memsize"
7375 #: ../src/guestfs-actions.pod:1950
7379 " guestfs_get_memsize (guestfs_h *g);\n"
7384 #: ../src/guestfs-actions.pod:1953 ../fish/guestfish-actions.pod:1330
7385 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
7389 #: ../src/guestfs-actions.pod:1956
7391 "If C<guestfs_set_memsize> was not called on this handle, and if "
7392 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
7393 "value for memsize."
7397 #: ../src/guestfs-actions.pod:1960 ../src/guestfs-actions.pod:2041 ../src/guestfs-actions.pod:5351 ../src/guestfs-actions.pod:5458 ../fish/guestfish-actions.pod:1337 ../fish/guestfish-actions.pod:1388 ../fish/guestfish-actions.pod:3558 ../fish/guestfish-actions.pod:3645
7398 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
7402 #: ../src/guestfs-actions.pod:1965 ../src/guestfs-actions.pod:3946 ../src/guestfs-actions.pod:4061 ../src/guestfs-actions.pod:4080 ../src/guestfs-actions.pod:4099 ../src/guestfs-actions.pod:4111 ../src/guestfs-actions.pod:4128 ../src/guestfs-actions.pod:4141 ../src/guestfs-actions.pod:5019 ../src/guestfs-actions.pod:5356 ../src/guestfs-actions.pod:5599 ../src/guestfs-actions.pod:6200
7403 msgid "(Added in 1.0.55)"
7407 #: ../src/guestfs-actions.pod:1967
7408 msgid "guestfs_get_network"
7412 #: ../src/guestfs-actions.pod:1969
7416 " guestfs_get_network (guestfs_h *g);\n"
7421 #: ../src/guestfs-actions.pod:1972 ../fish/guestfish-actions.pod:1344
7422 msgid "This returns the enable network flag."
7426 #: ../src/guestfs-actions.pod:1976 ../src/guestfs-actions.pod:5375
7427 msgid "(Added in 1.5.4)"
7431 #: ../src/guestfs-actions.pod:1978
7432 msgid "guestfs_get_path"
7436 #: ../src/guestfs-actions.pod:1980
7440 " guestfs_get_path (guestfs_h *g);\n"
7445 #: ../src/guestfs-actions.pod:1983 ../fish/guestfish-actions.pod:1350
7446 msgid "Return the current search path."
7450 #: ../src/guestfs-actions.pod:1985 ../fish/guestfish-actions.pod:1352
7452 "This is always non-NULL. If it wasn't set already, then this will return "
7457 #: ../src/guestfs-actions.pod:1988 ../src/guestfs-actions.pod:2017
7459 "This function returns a string, or NULL on error. The string is owned by "
7460 "the guest handle and must I<not> be freed."
7464 #: ../src/guestfs-actions.pod:1993
7465 msgid "guestfs_get_pid"
7469 #: ../src/guestfs-actions.pod:1995
7473 " guestfs_get_pid (guestfs_h *g);\n"
7478 #: ../src/guestfs-actions.pod:1998 ../fish/guestfish-actions.pod:1361
7480 "Return the process ID of the qemu subprocess. If there is no qemu "
7481 "subprocess, then this will return an error."
7485 #: ../src/guestfs-actions.pod:2001 ../fish/guestfish-actions.pod:1364
7486 msgid "This is an internal call used for debugging and testing."
7490 #: ../src/guestfs-actions.pod:2005
7491 msgid "(Added in 1.0.56)"
7495 #: ../src/guestfs-actions.pod:2007
7496 msgid "guestfs_get_qemu"
7500 #: ../src/guestfs-actions.pod:2009
7504 " guestfs_get_qemu (guestfs_h *g);\n"
7509 #: ../src/guestfs-actions.pod:2012 ../fish/guestfish-actions.pod:1370
7510 msgid "Return the current qemu binary."
7514 #: ../src/guestfs-actions.pod:2014 ../fish/guestfish-actions.pod:1372
7516 "This is always non-NULL. If it wasn't set already, then this will return "
7517 "the default qemu binary name."
7521 #: ../src/guestfs-actions.pod:2020 ../src/guestfs-actions.pod:5420
7522 msgid "(Added in 1.0.6)"
7526 #: ../src/guestfs-actions.pod:2022
7527 msgid "guestfs_get_recovery_proc"
7531 #: ../src/guestfs-actions.pod:2024
7535 " guestfs_get_recovery_proc (guestfs_h *g);\n"
7540 #: ../src/guestfs-actions.pod:2027 ../fish/guestfish-actions.pod:1379
7541 msgid "Return the recovery process enabled flag."
7545 #: ../src/guestfs-actions.pod:2031 ../src/guestfs-actions.pod:3086 ../src/guestfs-actions.pod:3353 ../src/guestfs-actions.pod:3753 ../src/guestfs-actions.pod:3785 ../src/guestfs-actions.pod:4724 ../src/guestfs-actions.pod:5067 ../src/guestfs-actions.pod:5444 ../src/guestfs-actions.pod:6103 ../src/guestfs-actions.pod:6123 ../src/guestfs-actions.pod:6305
7546 msgid "(Added in 1.0.77)"
7550 #: ../src/guestfs-actions.pod:2033
7551 msgid "guestfs_get_selinux"
7555 #: ../src/guestfs-actions.pod:2035
7559 " guestfs_get_selinux (guestfs_h *g);\n"
7564 #: ../src/guestfs-actions.pod:2038
7566 "This returns the current setting of the selinux flag which is passed to the "
7567 "appliance at boot time. See C<guestfs_set_selinux>."
7571 #: ../src/guestfs-actions.pod:2046 ../src/guestfs-actions.pod:2109 ../src/guestfs-actions.pod:5463 ../src/guestfs-actions.pod:5517
7572 msgid "(Added in 1.0.67)"
7576 #: ../src/guestfs-actions.pod:2048
7577 msgid "guestfs_get_state"
7581 #: ../src/guestfs-actions.pod:2050
7585 " guestfs_get_state (guestfs_h *g);\n"
7590 #: ../src/guestfs-actions.pod:2053 ../fish/guestfish-actions.pod:1395
7592 "This returns the current state as an opaque integer. This is only useful "
7593 "for printing debug and internal error messages."
7597 #: ../src/guestfs-actions.pod:2056 ../src/guestfs-actions.pod:2889 ../src/guestfs-actions.pod:2918 ../src/guestfs-actions.pod:2979 ../src/guestfs-actions.pod:3006 ../fish/guestfish-actions.pod:1398 ../fish/guestfish-actions.pod:1991 ../fish/guestfish-actions.pod:2009 ../fish/guestfish-actions.pod:2047 ../fish/guestfish-actions.pod:2063
7598 msgid "For more information on states, see L<guestfs(3)>."
7602 #: ../src/guestfs-actions.pod:2062
7603 msgid "guestfs_get_trace"
7607 #: ../src/guestfs-actions.pod:2064
7611 " guestfs_get_trace (guestfs_h *g);\n"
7616 #: ../src/guestfs-actions.pod:2067 ../fish/guestfish-actions.pod:1404
7617 msgid "Return the command trace flag."
7621 #: ../src/guestfs-actions.pod:2073
7622 msgid "guestfs_get_umask"
7626 #: ../src/guestfs-actions.pod:2075
7630 " guestfs_get_umask (guestfs_h *g);\n"
7635 #: ../src/guestfs-actions.pod:2078
7637 "Return the current umask. By default the umask is C<022> unless it has been "
7638 "set by calling C<guestfs_umask>."
7642 #: ../src/guestfs-actions.pod:2085
7643 msgid "guestfs_get_verbose"
7647 #: ../src/guestfs-actions.pod:2087
7651 " guestfs_get_verbose (guestfs_h *g);\n"
7656 #: ../src/guestfs-actions.pod:2090 ../fish/guestfish-actions.pod:1417
7657 msgid "This returns the verbose messages flag."
7661 #: ../src/guestfs-actions.pod:2096
7662 msgid "guestfs_getcon"
7666 #: ../src/guestfs-actions.pod:2098
7670 " guestfs_getcon (guestfs_h *g);\n"
7675 #: ../src/guestfs-actions.pod:2101 ../fish/guestfish-actions.pod:1423
7676 msgid "This gets the SELinux security context of the daemon."
7680 #: ../src/guestfs-actions.pod:2103
7681 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
7685 #: ../src/guestfs-actions.pod:2111
7686 msgid "guestfs_getxattrs"
7690 #: ../src/guestfs-actions.pod:2113
7693 " struct guestfs_xattr_list *\n"
7694 " guestfs_getxattrs (guestfs_h *g,\n"
7695 " const char *path);\n"
7700 #: ../src/guestfs-actions.pod:2117 ../fish/guestfish-actions.pod:1432
7701 msgid "This call lists the extended attributes of the file or directory C<path>."
7705 #: ../src/guestfs-actions.pod:2120 ../fish/guestfish-actions.pod:1435
7707 "At the system call level, this is a combination of the L<listxattr(2)> and "
7708 "L<getxattr(2)> calls."
7712 #: ../src/guestfs-actions.pod:2123
7713 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
7717 #: ../src/guestfs-actions.pod:2125 ../src/guestfs-actions.pod:3098 ../src/guestfs-actions.pod:3749
7719 "This function returns a C<struct guestfs_xattr_list *>, or NULL if there was "
7720 "an error. I<The caller must call C<guestfs_free_xattr_list> after use>."
7724 #: ../src/guestfs-actions.pod:2129 ../src/guestfs-actions.pod:3102 ../src/guestfs-actions.pod:3267 ../src/guestfs-actions.pod:3303 ../src/guestfs-actions.pod:5097 ../src/guestfs-actions.pod:5536 ../src/guestfs-actions.pod:6861
7725 msgid "(Added in 1.0.59)"
7729 #: ../src/guestfs-actions.pod:2131
7730 msgid "guestfs_glob_expand"
7734 #: ../src/guestfs-actions.pod:2133
7738 " guestfs_glob_expand (guestfs_h *g,\n"
7739 " const char *pattern);\n"
7744 #: ../src/guestfs-actions.pod:2137 ../fish/guestfish-actions.pod:1444
7746 "This command searches for all the pathnames matching C<pattern> according to "
7747 "the wildcard expansion rules used by the shell."
7751 #: ../src/guestfs-actions.pod:2141 ../fish/guestfish-actions.pod:1448
7752 msgid "If no paths match, then this returns an empty list (note: not an error)."
7756 #: ../src/guestfs-actions.pod:2144 ../fish/guestfish-actions.pod:1451
7758 "It is just a wrapper around the C L<glob(3)> function with flags "
7759 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
7763 #: ../src/guestfs-actions.pod:2152 ../src/guestfs-actions.pod:5701 ../src/guestfs-actions.pod:5718
7764 msgid "(Added in 1.0.50)"
7768 #: ../src/guestfs-actions.pod:2154
7769 msgid "guestfs_grep"
7773 #: ../src/guestfs-actions.pod:2156
7777 " guestfs_grep (guestfs_h *g,\n"
7778 " const char *regex,\n"
7779 " const char *path);\n"
7784 #: ../src/guestfs-actions.pod:2161 ../fish/guestfish-actions.pod:1459
7785 msgid "This calls the external C<grep> program and returns the matching lines."
7789 #: ../src/guestfs-actions.pod:2173
7790 msgid "guestfs_grepi"
7794 #: ../src/guestfs-actions.pod:2175
7798 " guestfs_grepi (guestfs_h *g,\n"
7799 " const char *regex,\n"
7800 " const char *path);\n"
7805 #: ../src/guestfs-actions.pod:2180 ../fish/guestfish-actions.pod:1469
7806 msgid "This calls the external C<grep -i> program and returns the matching lines."
7810 #: ../src/guestfs-actions.pod:2192
7811 msgid "guestfs_grub_install"
7815 #: ../src/guestfs-actions.pod:2194
7819 " guestfs_grub_install (guestfs_h *g,\n"
7820 " const char *root,\n"
7821 " const char *device);\n"
7826 #: ../src/guestfs-actions.pod:2199 ../fish/guestfish-actions.pod:1479
7828 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
7829 "the root directory being C<root>."
7833 #: ../src/guestfs-actions.pod:2202 ../fish/guestfish-actions.pod:1482
7835 "Note: If grub-install reports the error \"No suitable drive was found in the "
7836 "generated device map.\" it may be that you need to create a "
7837 "C</boot/grub/device.map> file first that contains the mapping between grub "
7838 "device names and Linux device names. It is usually sufficient to create a "
7843 #: ../src/guestfs-actions.pod:2209 ../fish/guestfish-actions.pod:1489
7851 #: ../src/guestfs-actions.pod:2211 ../fish/guestfish-actions.pod:1491
7852 msgid "replacing C</dev/vda> with the name of the installation device."
7856 #: ../src/guestfs-actions.pod:2215
7857 msgid "(Added in 1.0.17)"
7861 #: ../src/guestfs-actions.pod:2217
7862 msgid "guestfs_head"
7866 #: ../src/guestfs-actions.pod:2219
7870 " guestfs_head (guestfs_h *g,\n"
7871 " const char *path);\n"
7876 #: ../src/guestfs-actions.pod:2223 ../fish/guestfish-actions.pod:1497
7878 "This command returns up to the first 10 lines of a file as a list of "
7883 #: ../src/guestfs-actions.pod:2235
7884 msgid "guestfs_head_n"
7888 #: ../src/guestfs-actions.pod:2237
7892 " guestfs_head_n (guestfs_h *g,\n"
7894 " const char *path);\n"
7899 #: ../src/guestfs-actions.pod:2242 ../fish/guestfish-actions.pod:1507
7901 "If the parameter C<nrlines> is a positive number, this returns the first "
7902 "C<nrlines> lines of the file C<path>."
7906 #: ../src/guestfs-actions.pod:2245 ../fish/guestfish-actions.pod:1510
7908 "If the parameter C<nrlines> is a negative number, this returns lines from "
7909 "the file C<path>, excluding the last C<nrlines> lines."
7913 #: ../src/guestfs-actions.pod:2248 ../src/guestfs-actions.pod:5998 ../fish/guestfish-actions.pod:1513 ../fish/guestfish-actions.pod:3991
7914 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
7918 #: ../src/guestfs-actions.pod:2259
7919 msgid "guestfs_hexdump"
7923 #: ../src/guestfs-actions.pod:2261
7927 " guestfs_hexdump (guestfs_h *g,\n"
7928 " const char *path);\n"
7933 #: ../src/guestfs-actions.pod:2265 ../fish/guestfish-actions.pod:1522
7935 "This runs C<hexdump -C> on the given C<path>. The result is the "
7936 "human-readable, canonical hex dump of the file."
7940 #: ../src/guestfs-actions.pod:2274 ../src/guestfs-actions.pod:5782 ../src/guestfs-actions.pod:5837
7941 msgid "(Added in 1.0.22)"
7945 #: ../src/guestfs-actions.pod:2276
7946 msgid "guestfs_initrd_cat"
7950 #: ../src/guestfs-actions.pod:2278
7954 " guestfs_initrd_cat (guestfs_h *g,\n"
7955 " const char *initrdpath,\n"
7956 " const char *filename,\n"
7957 " size_t *size_r);\n"
7962 #: ../src/guestfs-actions.pod:2284 ../fish/guestfish-actions.pod:1532
7964 "This command unpacks the file C<filename> from the initrd file called "
7965 "C<initrdpath>. The filename must be given I<without> the initial C</> "
7970 #: ../src/guestfs-actions.pod:2288 ../fish/guestfish-actions.pod:1536
7972 "For example, in guestfish you could use the following command to examine the "
7973 "boot script (usually called C</init>) contained in a Linux initrd or "
7978 #: ../src/guestfs-actions.pod:2292 ../fish/guestfish-actions.pod:1540
7981 " initrd-cat /boot/initrd-<version>.img init\n"
7986 #: ../src/guestfs-actions.pod:2294
7987 msgid "See also C<guestfs_initrd_list>."
7991 #: ../src/guestfs-actions.pod:2296 ../src/guestfs-actions.pod:4717 ../src/guestfs-actions.pod:4743 ../src/guestfs-actions.pod:4924
7993 "This function returns a buffer, or NULL on error. The size of the returned "
7994 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
7999 #: ../src/guestfs-actions.pod:2305
8000 msgid "guestfs_initrd_list"
8004 #: ../src/guestfs-actions.pod:2307
8008 " guestfs_initrd_list (guestfs_h *g,\n"
8009 " const char *path);\n"
8014 #: ../src/guestfs-actions.pod:2311 ../fish/guestfish-actions.pod:1551
8015 msgid "This command lists out files contained in an initrd."
8019 #: ../src/guestfs-actions.pod:2313 ../fish/guestfish-actions.pod:1553
8021 "The files are listed without any initial C</> character. The files are "
8022 "listed in the order they appear (not necessarily alphabetical). Directory "
8023 "names are listed as separate items."
8027 #: ../src/guestfs-actions.pod:2317 ../fish/guestfish-actions.pod:1557
8029 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
8030 "initrd. We I<only> support the newer initramfs format (compressed cpio "
8035 #: ../src/guestfs-actions.pod:2327
8036 msgid "guestfs_inotify_add_watch"
8040 #: ../src/guestfs-actions.pod:2329
8044 " guestfs_inotify_add_watch (guestfs_h *g,\n"
8045 " const char *path,\n"
8051 #: ../src/guestfs-actions.pod:2334 ../fish/guestfish-actions.pod:1565
8052 msgid "Watch C<path> for the events listed in C<mask>."
8056 #: ../src/guestfs-actions.pod:2336 ../fish/guestfish-actions.pod:1567
8058 "Note that if C<path> is a directory then events within that directory are "
8059 "watched, but this does I<not> happen recursively (in subdirectories)."
8063 #: ../src/guestfs-actions.pod:2340 ../fish/guestfish-actions.pod:1571
8065 "Note for non-C or non-Linux callers: the inotify events are defined by the "
8066 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
8070 #: ../src/guestfs-actions.pod:2348
8071 msgid "guestfs_inotify_close"
8075 #: ../src/guestfs-actions.pod:2350
8079 " guestfs_inotify_close (guestfs_h *g);\n"
8084 #: ../src/guestfs-actions.pod:2353 ../fish/guestfish-actions.pod:1579
8086 "This closes the inotify handle which was previously opened by inotify_init. "
8087 "It removes all watches, throws away any pending events, and deallocates all "
8092 #: ../src/guestfs-actions.pod:2361
8093 msgid "guestfs_inotify_files"
8097 #: ../src/guestfs-actions.pod:2363
8101 " guestfs_inotify_files (guestfs_h *g);\n"
8106 #: ../src/guestfs-actions.pod:2366
8108 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
8109 "returns a list of pathnames of objects that were touched. The returned "
8110 "pathnames are sorted and deduplicated."
8114 #: ../src/guestfs-actions.pod:2376
8115 msgid "guestfs_inotify_init"
8119 #: ../src/guestfs-actions.pod:2378
8123 " guestfs_inotify_init (guestfs_h *g,\n"
8124 " int maxevents);\n"
8129 #: ../src/guestfs-actions.pod:2382 ../fish/guestfish-actions.pod:1595
8131 "This command creates a new inotify handle. The inotify subsystem can be "
8132 "used to notify events which happen to objects in the guest filesystem."
8136 #: ../src/guestfs-actions.pod:2386
8138 "C<maxevents> is the maximum number of events which will be queued up between "
8139 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
8140 "passed as C<0>, then the kernel (or previously set) default is used. For "
8141 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
8142 "throws away events, but records the fact that it threw them away by setting "
8143 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
8144 "C<guestfs_inotify_read>)."
8148 #: ../src/guestfs-actions.pod:2396
8150 "Before any events are generated, you have to add some watches to the "
8151 "internal watch list. See: C<guestfs_inotify_add_watch>, "
8152 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
8156 #: ../src/guestfs-actions.pod:2402
8158 "Queued up events should be read periodically by calling "
8159 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
8160 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
8161 "often enough then you risk the internal queue overflowing."
8165 #: ../src/guestfs-actions.pod:2409
8167 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
8168 "This also removes any watches automatically."
8172 #: ../src/guestfs-actions.pod:2413 ../fish/guestfish-actions.pod:1626
8174 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
8175 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
8176 "that there is one global inotify handle per libguestfs instance."
8180 #: ../src/guestfs-actions.pod:2422
8181 msgid "guestfs_inotify_read"
8185 #: ../src/guestfs-actions.pod:2424
8188 " struct guestfs_inotify_event_list *\n"
8189 " guestfs_inotify_read (guestfs_h *g);\n"
8194 #: ../src/guestfs-actions.pod:2427 ../fish/guestfish-actions.pod:1635
8196 "Return the complete queue of events that have happened since the previous "
8201 #: ../src/guestfs-actions.pod:2430 ../fish/guestfish-actions.pod:1638
8202 msgid "If no events have happened, this returns an empty list."
8206 #: ../src/guestfs-actions.pod:2432 ../fish/guestfish-actions.pod:1640
8208 "I<Note>: In order to make sure that all events have been read, you must call "
8209 "this function repeatedly until it returns an empty list. The reason is that "
8210 "the call will read events up to the maximum appliance-to-host message size "
8211 "and leave remaining events in the queue."
8215 #: ../src/guestfs-actions.pod:2438
8217 "This function returns a C<struct guestfs_inotify_event_list *>, or NULL if "
8218 "there was an error. I<The caller must call "
8219 "C<guestfs_free_inotify_event_list> after use>."
8223 #: ../src/guestfs-actions.pod:2444
8224 msgid "guestfs_inotify_rm_watch"
8228 #: ../src/guestfs-actions.pod:2446
8232 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
8238 #: ../src/guestfs-actions.pod:2450
8240 "Remove a previously defined inotify watch. See "
8241 "C<guestfs_inotify_add_watch>."
8245 #: ../src/guestfs-actions.pod:2457
8246 msgid "guestfs_inspect_get_arch"
8250 #: ../src/guestfs-actions.pod:2459
8254 " guestfs_inspect_get_arch (guestfs_h *g,\n"
8255 " const char *root);\n"
8260 #: ../src/guestfs-actions.pod:2463 ../src/guestfs-actions.pod:2486 ../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:2693 ../src/guestfs-actions.pod:2722 ../src/guestfs-actions.pod:2764 ../src/guestfs-actions.pod:2806
8262 "This function should only be called with a root device string as returned by "
8263 "C<guestfs_inspect_os>."
8267 #: ../src/guestfs-actions.pod:2466
8269 "This returns the architecture of the inspected operating system. The "
8270 "possible return values are listed under C<guestfs_file_architecture>."
8274 #: ../src/guestfs-actions.pod:2470 ../fish/guestfish-actions.pod:1664
8276 "If the architecture could not be determined, then the string C<unknown> is "
8281 #: ../src/guestfs-actions.pod:2473 ../src/guestfs-actions.pod:2546 ../src/guestfs-actions.pod:2600 ../src/guestfs-actions.pod:2682 ../src/guestfs-actions.pod:2711 ../src/guestfs-actions.pod:2733 ../src/guestfs-actions.pod:2752 ../src/guestfs-actions.pod:2793 ../src/guestfs-actions.pod:2816 ../src/guestfs-actions.pod:2856 ../fish/guestfish-actions.pod:1667 ../fish/guestfish-actions.pod:1733 ../fish/guestfish-actions.pod:1772 ../fish/guestfish-actions.pod:1832 ../fish/guestfish-actions.pod:1856 ../fish/guestfish-actions.pod:1873 ../fish/guestfish-actions.pod:1886 ../fish/guestfish-actions.pod:1921 ../fish/guestfish-actions.pod:1937 ../fish/guestfish-actions.pod:1971
8282 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
8286 #: ../src/guestfs-actions.pod:2480
8287 msgid "guestfs_inspect_get_distro"
8291 #: ../src/guestfs-actions.pod:2482
8295 " guestfs_inspect_get_distro (guestfs_h *g,\n"
8296 " const char *root);\n"
8301 #: ../src/guestfs-actions.pod:2489 ../fish/guestfish-actions.pod:1676
8302 msgid "This returns the distro (distribution) of the inspected operating system."
8306 #: ../src/guestfs-actions.pod:2492 ../fish/guestfish-actions.pod:1679
8307 msgid "Currently defined distros are:"
8311 #: ../src/guestfs-actions.pod:2496 ../fish/guestfish-actions.pod:1683
8312 msgid "\"archlinux\""
8316 #: ../src/guestfs-actions.pod:2498 ../fish/guestfish-actions.pod:1685
8321 #: ../src/guestfs-actions.pod:2500 ../fish/guestfish-actions.pod:1687
8326 #: ../src/guestfs-actions.pod:2502 ../fish/guestfish-actions.pod:1689
8327 msgid "Debian or a Debian-derived distro such as Ubuntu."
8331 #: ../src/guestfs-actions.pod:2504 ../fish/guestfish-actions.pod:1691
8336 #: ../src/guestfs-actions.pod:2506 ../fish/guestfish-actions.pod:1693
8341 #: ../src/guestfs-actions.pod:2508 ../fish/guestfish-actions.pod:1695
8346 #: ../src/guestfs-actions.pod:2510 ../fish/guestfish-actions.pod:1697
8351 #: ../src/guestfs-actions.pod:2512 ../fish/guestfish-actions.pod:1699
8356 #: ../src/guestfs-actions.pod:2514 ../fish/guestfish-actions.pod:1701
8361 #: ../src/guestfs-actions.pod:2516 ../fish/guestfish-actions.pod:1703
8366 #: ../src/guestfs-actions.pod:2518 ../fish/guestfish-actions.pod:1705
8371 #: ../src/guestfs-actions.pod:2520 ../fish/guestfish-actions.pod:1707
8372 msgid "\"redhat-based\""
8376 #: ../src/guestfs-actions.pod:2522 ../fish/guestfish-actions.pod:1709
8377 msgid "Some Red Hat-derived distro."
8381 #: ../src/guestfs-actions.pod:2524 ../fish/guestfish-actions.pod:1711
8386 #: ../src/guestfs-actions.pod:2526 ../fish/guestfish-actions.pod:1713
8387 msgid "Red Hat Enterprise Linux and some derivatives."
8391 #: ../src/guestfs-actions.pod:2528 ../src/guestfs-actions.pod:2776 ../fish/guestfish-actions.pod:1715 ../fish/guestfish-actions.pod:1904
8396 #: ../src/guestfs-actions.pod:2530 ../fish/guestfish-actions.pod:1717
8398 "Windows does not have distributions. This string is returned if the OS type "
8403 #: ../src/guestfs-actions.pod:2533 ../fish/guestfish-actions.pod:1720
8408 #: ../src/guestfs-actions.pod:2535 ../fish/guestfish-actions.pod:1722
8413 #: ../src/guestfs-actions.pod:2537 ../src/guestfs-actions.pod:2784 ../fish/guestfish-actions.pod:1724 ../fish/guestfish-actions.pod:1912
8418 #: ../src/guestfs-actions.pod:2539 ../fish/guestfish-actions.pod:1726
8419 msgid "The distro could not be determined."
8423 #: ../src/guestfs-actions.pod:2543 ../src/guestfs-actions.pod:2790 ../fish/guestfish-actions.pod:1730 ../fish/guestfish-actions.pod:1918
8425 "Future versions of libguestfs may return other strings here. The caller "
8426 "should be prepared to handle any string."
8430 #: ../src/guestfs-actions.pod:2553
8431 msgid "guestfs_inspect_get_filesystems"
8435 #: ../src/guestfs-actions.pod:2555
8439 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
8440 " const char *root);\n"
8445 #: ../src/guestfs-actions.pod:2562 ../fish/guestfish-actions.pod:1742
8447 "This returns a list of all the filesystems that we think are associated with "
8448 "this operating system. This includes the root filesystem, other ordinary "
8449 "filesystems, and non-mounted devices like swap partitions."
8453 #: ../src/guestfs-actions.pod:2567 ../fish/guestfish-actions.pod:1747
8455 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
8456 "to be shared between operating systems."
8460 #: ../src/guestfs-actions.pod:2570
8462 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8463 "C<guestfs_inspect_get_mountpoints>."
8467 #: ../src/guestfs-actions.pod:2579
8468 msgid "guestfs_inspect_get_major_version"
8472 #: ../src/guestfs-actions.pod:2581
8476 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
8477 " const char *root);\n"
8482 #: ../src/guestfs-actions.pod:2588 ../fish/guestfish-actions.pod:1760
8483 msgid "This returns the major version number of the inspected operating system."
8487 #: ../src/guestfs-actions.pod:2591 ../fish/guestfish-actions.pod:1763
8489 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
8490 "popular public names used by the operating system. Notably the operating "
8491 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
8492 "1). You can find out the real versions corresponding to releases of Windows "
8493 "by consulting Wikipedia or MSDN."
8497 #: ../src/guestfs-actions.pod:2598 ../src/guestfs-actions.pod:2618 ../fish/guestfish-actions.pod:1770 ../fish/guestfish-actions.pod:1784
8498 msgid "If the version could not be determined, then C<0> is returned."
8502 #: ../src/guestfs-actions.pod:2606
8503 msgid "guestfs_inspect_get_minor_version"
8507 #: ../src/guestfs-actions.pod:2608
8511 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
8512 " const char *root);\n"
8517 #: ../src/guestfs-actions.pod:2615 ../fish/guestfish-actions.pod:1781
8518 msgid "This returns the minor version number of the inspected operating system."
8522 #: ../src/guestfs-actions.pod:2620
8524 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8525 "C<guestfs_inspect_get_major_version>."
8529 #: ../src/guestfs-actions.pod:2627
8530 msgid "guestfs_inspect_get_mountpoints"
8534 #: ../src/guestfs-actions.pod:2629
8538 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
8539 " const char *root);\n"
8544 #: ../src/guestfs-actions.pod:2636 ../fish/guestfish-actions.pod:1796
8546 "This returns a hash of where we think the filesystems associated with this "
8547 "operating system should be mounted. Callers should note that this is at "
8548 "best an educated guess made by reading configuration files such as "
8553 #: ../src/guestfs-actions.pod:2641 ../fish/guestfish-actions.pod:1801
8555 "Each element in the returned hashtable has a key which is the path of the "
8556 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
8557 "mounted there (eg. C</dev/sda1>)."
8561 #: ../src/guestfs-actions.pod:2646 ../fish/guestfish-actions.pod:1806
8562 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
8566 #: ../src/guestfs-actions.pod:2649
8568 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8569 "C<guestfs_inspect_get_filesystems>."
8573 #: ../src/guestfs-actions.pod:2652 ../src/guestfs-actions.pod:3155 ../src/guestfs-actions.pod:4283 ../src/guestfs-actions.pod:6139
8575 "This function returns a NULL-terminated array of strings, or NULL if there "
8576 "was an error. The array of strings will always have length C<2n+1>, where "
8577 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
8578 "caller must free the strings and the array after use>."
8582 #: ../src/guestfs-actions.pod:2660
8583 msgid "guestfs_inspect_get_package_format"
8587 #: ../src/guestfs-actions.pod:2662
8591 " guestfs_inspect_get_package_format (guestfs_h *g,\n"
8592 " const char *root);\n"
8597 #: ../src/guestfs-actions.pod:2669
8599 "This function and C<guestfs_inspect_get_package_management> return the "
8600 "package format and package management tool used by the inspected operating "
8601 "system. For example for Fedora these functions would return C<rpm> (package "
8602 "format) and C<yum> (package management)."
8606 #: ../src/guestfs-actions.pod:2675 ../fish/guestfish-actions.pod:1825
8608 "This returns the string C<unknown> if we could not determine the package "
8609 "format I<or> if the operating system does not have a real packaging system "
8614 #: ../src/guestfs-actions.pod:2679 ../fish/guestfish-actions.pod:1829
8616 "Possible strings include: C<rpm>, C<deb>, C<ebuild>, C<pisi>, C<pacman>. "
8617 "Future versions of libguestfs may return other strings."
8621 #: ../src/guestfs-actions.pod:2687
8622 msgid "guestfs_inspect_get_package_management"
8626 #: ../src/guestfs-actions.pod:2689
8630 " guestfs_inspect_get_package_management (guestfs_h *g,\n"
8631 " const char *root);\n"
8636 #: ../src/guestfs-actions.pod:2696
8638 "C<guestfs_inspect_get_package_format> and this function return the package "
8639 "format and package management tool used by the inspected operating system. "
8640 "For example for Fedora these functions would return C<rpm> (package format) "
8641 "and C<yum> (package management)."
8645 #: ../src/guestfs-actions.pod:2702 ../fish/guestfish-actions.pod:1847
8647 "This returns the string C<unknown> if we could not determine the package "
8648 "management tool I<or> if the operating system does not have a real packaging "
8649 "system (eg. Windows)."
8653 #: ../src/guestfs-actions.pod:2706 ../fish/guestfish-actions.pod:1851
8655 "Possible strings include: C<yum>, C<up2date>, C<apt> (for all Debian "
8656 "derivatives), C<portage>, C<pisi>, C<pacman>. Future versions of libguestfs "
8657 "may return other strings."
8661 #: ../src/guestfs-actions.pod:2716
8662 msgid "guestfs_inspect_get_product_name"
8666 #: ../src/guestfs-actions.pod:2718
8670 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
8671 " const char *root);\n"
8676 #: ../src/guestfs-actions.pod:2725 ../fish/guestfish-actions.pod:1865
8678 "This returns the product name of the inspected operating system. The "
8679 "product name is generally some freeform string which can be displayed to the "
8680 "user, but should not be parsed by programs."
8684 #: ../src/guestfs-actions.pod:2730 ../fish/guestfish-actions.pod:1870
8686 "If the product name could not be determined, then the string C<unknown> is "
8691 #: ../src/guestfs-actions.pod:2740
8692 msgid "guestfs_inspect_get_roots"
8696 #: ../src/guestfs-actions.pod:2742
8700 " guestfs_inspect_get_roots (guestfs_h *g);\n"
8705 #: ../src/guestfs-actions.pod:2745
8707 "This function is a convenient way to get the list of root devices, as "
8708 "returned from a previous call to C<guestfs_inspect_os>, but without redoing "
8709 "the whole inspection process."
8713 #: ../src/guestfs-actions.pod:2749
8715 "This returns an empty list if either no root devices were found or the "
8716 "caller has not called C<guestfs_inspect_os>."
8720 #: ../src/guestfs-actions.pod:2758
8721 msgid "guestfs_inspect_get_type"
8725 #: ../src/guestfs-actions.pod:2760
8729 " guestfs_inspect_get_type (guestfs_h *g,\n"
8730 " const char *root);\n"
8735 #: ../src/guestfs-actions.pod:2767 ../fish/guestfish-actions.pod:1895
8737 "This returns the type of the inspected operating system. Currently defined "
8742 #: ../src/guestfs-actions.pod:2772 ../fish/guestfish-actions.pod:1900
8747 #: ../src/guestfs-actions.pod:2774 ../fish/guestfish-actions.pod:1902
8748 msgid "Any Linux-based operating system."
8752 #: ../src/guestfs-actions.pod:2778 ../fish/guestfish-actions.pod:1906
8753 msgid "Any Microsoft Windows operating system."
8757 #: ../src/guestfs-actions.pod:2780 ../fish/guestfish-actions.pod:1908
8762 #: ../src/guestfs-actions.pod:2782 ../fish/guestfish-actions.pod:1910
8767 #: ../src/guestfs-actions.pod:2786 ../fish/guestfish-actions.pod:1914
8768 msgid "The operating system type could not be determined."
8772 #: ../src/guestfs-actions.pod:2800
8773 msgid "guestfs_inspect_get_windows_systemroot"
8777 #: ../src/guestfs-actions.pod:2802
8781 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
8782 " const char *root);\n"
8787 #: ../src/guestfs-actions.pod:2809 ../fish/guestfish-actions.pod:1930
8789 "This returns the Windows systemroot of the inspected guest. The systemroot "
8790 "is a directory path such as C</WINDOWS>."
8794 #: ../src/guestfs-actions.pod:2812 ../fish/guestfish-actions.pod:1933
8796 "This call assumes that the guest is Windows and that the systemroot could be "
8797 "determined by inspection. If this is not the case then an error is "
8802 #: ../src/guestfs-actions.pod:2821
8803 msgid "(Added in 1.5.25)"
8807 #: ../src/guestfs-actions.pod:2823
8808 msgid "guestfs_inspect_os"
8812 #: ../src/guestfs-actions.pod:2825
8816 " guestfs_inspect_os (guestfs_h *g);\n"
8821 #: ../src/guestfs-actions.pod:2828 ../fish/guestfish-actions.pod:1943
8823 "This function uses other libguestfs functions and certain heuristics to "
8824 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
8825 "for operating systems."
8829 #: ../src/guestfs-actions.pod:2832 ../fish/guestfish-actions.pod:1947
8830 msgid "The list returned is empty if no operating systems were found."
8834 #: ../src/guestfs-actions.pod:2834 ../fish/guestfish-actions.pod:1949
8836 "If one operating system was found, then this returns a list with a single "
8837 "element, which is the name of the root filesystem of this operating system. "
8838 "It is also possible for this function to return a list containing more than "
8839 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
8840 "element being the root filesystem of one of the operating systems."
8844 #: ../src/guestfs-actions.pod:2841
8846 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
8847 "functions in order to query further information about each operating system, "
8848 "such as the name and version."
8852 #: ../src/guestfs-actions.pod:2846
8854 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
8855 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
8856 "the contents. This should be called with no disks currently mounted. The "
8857 "function may also use Augeas, so any existing Augeas handle will be closed."
8861 #: ../src/guestfs-actions.pod:2852 ../fish/guestfish-actions.pod:1967
8863 "This function cannot decrypt encrypted disks. The caller must do that first "
8864 "(supplying the necessary keys) if the disk is encrypted."
8868 #: ../src/guestfs-actions.pod:2858 ../src/guestfs-actions.pod:3113 ../src/guestfs-actions.pod:3175
8869 msgid "See also C<guestfs_list_filesystems>."
8873 #: ../src/guestfs-actions.pod:2866
8874 msgid "guestfs_is_blockdev"
8878 #: ../src/guestfs-actions.pod:2868
8882 " guestfs_is_blockdev (guestfs_h *g,\n"
8883 " const char *path);\n"
8888 #: ../src/guestfs-actions.pod:2872 ../fish/guestfish-actions.pod:1979
8890 "This returns C<true> if and only if there is a block device with the given "
8895 #: ../src/guestfs-actions.pod:2875 ../src/guestfs-actions.pod:2904 ../src/guestfs-actions.pod:2934 ../src/guestfs-actions.pod:2949 ../src/guestfs-actions.pod:2965 ../src/guestfs-actions.pod:3021 ../src/guestfs-actions.pod:3036
8896 msgid "See also C<guestfs_stat>."
8900 #: ../src/guestfs-actions.pod:2879 ../src/guestfs-actions.pod:2908 ../src/guestfs-actions.pod:2953 ../src/guestfs-actions.pod:3025 ../src/guestfs-actions.pod:3040
8901 msgid "(Added in 1.5.10)"
8905 #: ../src/guestfs-actions.pod:2881
8906 msgid "guestfs_is_busy"
8910 #: ../src/guestfs-actions.pod:2883
8914 " guestfs_is_busy (guestfs_h *g);\n"
8919 #: ../src/guestfs-actions.pod:2886 ../fish/guestfish-actions.pod:1988
8921 "This returns true iff this handle is busy processing a command (in the "
8926 #: ../src/guestfs-actions.pod:2895
8927 msgid "guestfs_is_chardev"
8931 #: ../src/guestfs-actions.pod:2897
8935 " guestfs_is_chardev (guestfs_h *g,\n"
8936 " const char *path);\n"
8941 #: ../src/guestfs-actions.pod:2901 ../fish/guestfish-actions.pod:1997
8943 "This returns C<true> if and only if there is a character device with the "
8944 "given C<path> name."
8948 #: ../src/guestfs-actions.pod:2910
8949 msgid "guestfs_is_config"
8953 #: ../src/guestfs-actions.pod:2912
8957 " guestfs_is_config (guestfs_h *g);\n"
8962 #: ../src/guestfs-actions.pod:2915 ../fish/guestfish-actions.pod:2006
8964 "This returns true iff this handle is being configured (in the C<CONFIG> "
8969 #: ../src/guestfs-actions.pod:2924
8970 msgid "guestfs_is_dir"
8974 #: ../src/guestfs-actions.pod:2926
8978 " guestfs_is_dir (guestfs_h *g,\n"
8979 " const char *path);\n"
8984 #: ../src/guestfs-actions.pod:2930 ../fish/guestfish-actions.pod:2015
8986 "This returns C<true> if and only if there is a directory with the given "
8987 "C<path> name. Note that it returns false for other objects like files."
8991 #: ../src/guestfs-actions.pod:2940
8992 msgid "guestfs_is_fifo"
8996 #: ../src/guestfs-actions.pod:2942
9000 " guestfs_is_fifo (guestfs_h *g,\n"
9001 " const char *path);\n"
9006 #: ../src/guestfs-actions.pod:2946 ../fish/guestfish-actions.pod:2025
9008 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
9009 "given C<path> name."
9013 #: ../src/guestfs-actions.pod:2955
9014 msgid "guestfs_is_file"
9018 #: ../src/guestfs-actions.pod:2957
9022 " guestfs_is_file (guestfs_h *g,\n"
9023 " const char *path);\n"
9028 #: ../src/guestfs-actions.pod:2961 ../fish/guestfish-actions.pod:2034
9030 "This returns C<true> if and only if there is a regular file with the given "
9031 "C<path> name. Note that it returns false for other objects like "
9036 #: ../src/guestfs-actions.pod:2971
9037 msgid "guestfs_is_launching"
9041 #: ../src/guestfs-actions.pod:2973
9045 " guestfs_is_launching (guestfs_h *g);\n"
9050 #: ../src/guestfs-actions.pod:2976 ../fish/guestfish-actions.pod:2044
9052 "This returns true iff this handle is launching the subprocess (in the "
9053 "C<LAUNCHING> state)."
9057 #: ../src/guestfs-actions.pod:2985
9058 msgid "guestfs_is_lv"
9062 #: ../src/guestfs-actions.pod:2987
9066 " guestfs_is_lv (guestfs_h *g,\n"
9067 " const char *device);\n"
9072 #: ../src/guestfs-actions.pod:2991 ../fish/guestfish-actions.pod:2053
9074 "This command tests whether C<device> is a logical volume, and returns true "
9075 "iff this is the case."
9079 #: ../src/guestfs-actions.pod:2998
9080 msgid "guestfs_is_ready"
9084 #: ../src/guestfs-actions.pod:3000
9088 " guestfs_is_ready (guestfs_h *g);\n"
9093 #: ../src/guestfs-actions.pod:3003 ../fish/guestfish-actions.pod:2060
9095 "This returns true iff this handle is ready to accept commands (in the "
9100 #: ../src/guestfs-actions.pod:3012
9101 msgid "guestfs_is_socket"
9105 #: ../src/guestfs-actions.pod:3014
9109 " guestfs_is_socket (guestfs_h *g,\n"
9110 " const char *path);\n"
9115 #: ../src/guestfs-actions.pod:3018 ../fish/guestfish-actions.pod:2069
9117 "This returns C<true> if and only if there is a Unix domain socket with the "
9118 "given C<path> name."
9122 #: ../src/guestfs-actions.pod:3027
9123 msgid "guestfs_is_symlink"
9127 #: ../src/guestfs-actions.pod:3029
9131 " guestfs_is_symlink (guestfs_h *g,\n"
9132 " const char *path);\n"
9137 #: ../src/guestfs-actions.pod:3033 ../fish/guestfish-actions.pod:2078
9139 "This returns C<true> if and only if there is a symbolic link with the given "
9144 #: ../src/guestfs-actions.pod:3042
9145 msgid "guestfs_kill_subprocess"
9149 #: ../src/guestfs-actions.pod:3044
9153 " guestfs_kill_subprocess (guestfs_h *g);\n"
9158 #: ../src/guestfs-actions.pod:3047 ../fish/guestfish-actions.pod:2087
9159 msgid "This kills the qemu subprocess. You should never need to call this."
9163 #: ../src/guestfs-actions.pod:3053
9164 msgid "guestfs_launch"
9168 #: ../src/guestfs-actions.pod:3055
9172 " guestfs_launch (guestfs_h *g);\n"
9177 #: ../src/guestfs-actions.pod:3058 ../fish/guestfish-actions.pod:2095
9179 "Internally libguestfs is implemented by running a virtual machine using "
9184 #: ../src/guestfs-actions.pod:3061 ../fish/guestfish-actions.pod:2098
9186 "You should call this after configuring the handle (eg. adding drives) but "
9187 "before performing any actions."
9191 #: ../src/guestfs-actions.pod:3068
9192 msgid "guestfs_lchown"
9196 #: ../src/guestfs-actions.pod:3070
9200 " guestfs_lchown (guestfs_h *g,\n"
9203 " const char *path);\n"
9208 #: ../src/guestfs-actions.pod:3076
9210 "Change the file owner to C<owner> and group to C<group>. This is like "
9211 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
9212 "changed, not the target."
9216 #: ../src/guestfs-actions.pod:3088
9217 msgid "guestfs_lgetxattrs"
9221 #: ../src/guestfs-actions.pod:3090
9224 " struct guestfs_xattr_list *\n"
9225 " guestfs_lgetxattrs (guestfs_h *g,\n"
9226 " const char *path);\n"
9231 #: ../src/guestfs-actions.pod:3094
9233 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
9234 "then it returns the extended attributes of the link itself."
9238 #: ../src/guestfs-actions.pod:3104
9239 msgid "guestfs_list_devices"
9243 #: ../src/guestfs-actions.pod:3106
9247 " guestfs_list_devices (guestfs_h *g);\n"
9252 #: ../src/guestfs-actions.pod:3109 ../fish/guestfish-actions.pod:2125
9253 msgid "List all the block devices."
9257 #: ../src/guestfs-actions.pod:3111 ../fish/guestfish-actions.pod:2127
9258 msgid "The full block device names are returned, eg. C</dev/sda>."
9262 #: ../src/guestfs-actions.pod:3121
9263 msgid "guestfs_list_filesystems"
9267 #: ../src/guestfs-actions.pod:3123
9271 " guestfs_list_filesystems (guestfs_h *g);\n"
9276 #: ../src/guestfs-actions.pod:3126 ../fish/guestfish-actions.pod:2135
9278 "This inspection command looks for filesystems on partitions, block devices "
9279 "and logical volumes, returning a list of devices containing filesystems and "
9284 #: ../src/guestfs-actions.pod:3130 ../fish/guestfish-actions.pod:2139
9286 "The return value is a hash, where the keys are the devices containing "
9287 "filesystems, and the values are the filesystem types. For example:"
9291 #: ../src/guestfs-actions.pod:3134 ../fish/guestfish-actions.pod:2143
9294 " \"/dev/sda1\" => \"ntfs\"\n"
9295 " \"/dev/sda2\" => \"ext2\"\n"
9296 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
9297 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
9302 #: ../src/guestfs-actions.pod:3139 ../fish/guestfish-actions.pod:2148
9304 "The value can have the special value \"unknown\", meaning the content of the "
9305 "device is undetermined or empty. \"swap\" means a Linux swap partition."
9309 #: ../src/guestfs-actions.pod:3143
9311 "This command runs other libguestfs commands, which might include "
9312 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
9313 "soon after launch and only when nothing is mounted."
9317 #: ../src/guestfs-actions.pod:3147
9319 "Not all of the filesystems returned will be mountable. In particular, swap "
9320 "partitions are returned in the list. Also this command does not check that "
9321 "each filesystem found is valid and mountable, and some filesystems might be "
9322 "mountable but require special options. Filesystems may not all belong to a "
9323 "single logical operating system (use C<guestfs_inspect_os> to look for "
9328 #: ../src/guestfs-actions.pod:3161 ../src/guestfs-actions.pod:4684
9329 msgid "(Added in 1.5.15)"
9333 #: ../src/guestfs-actions.pod:3163
9334 msgid "guestfs_list_partitions"
9338 #: ../src/guestfs-actions.pod:3165
9342 " guestfs_list_partitions (guestfs_h *g);\n"
9347 #: ../src/guestfs-actions.pod:3168 ../fish/guestfish-actions.pod:2168
9348 msgid "List all the partitions detected on all block devices."
9352 #: ../src/guestfs-actions.pod:3170 ../fish/guestfish-actions.pod:2170
9353 msgid "The full partition device names are returned, eg. C</dev/sda1>"
9357 #: ../src/guestfs-actions.pod:3172
9359 "This does not return logical volumes. For that you will need to call "
9364 #: ../src/guestfs-actions.pod:3183
9369 #: ../src/guestfs-actions.pod:3185
9373 " guestfs_ll (guestfs_h *g,\n"
9374 " const char *directory);\n"
9379 #: ../src/guestfs-actions.pod:3189 ../fish/guestfish-actions.pod:2181
9381 "List the files in C<directory> (relative to the root directory, there is no "
9382 "cwd) in the format of 'ls -la'."
9386 #: ../src/guestfs-actions.pod:3192 ../fish/guestfish-actions.pod:2184
9388 "This command is mostly useful for interactive sessions. It is I<not> "
9389 "intended that you try to parse the output string."
9393 #: ../src/guestfs-actions.pod:3200
9398 #: ../src/guestfs-actions.pod:3202
9402 " guestfs_ln (guestfs_h *g,\n"
9403 " const char *target,\n"
9404 " const char *linkname);\n"
9409 #: ../src/guestfs-actions.pod:3207 ../fish/guestfish-actions.pod:2191
9410 msgid "This command creates a hard link using the C<ln> command."
9414 #: ../src/guestfs-actions.pod:3213
9415 msgid "guestfs_ln_f"
9419 #: ../src/guestfs-actions.pod:3215
9423 " guestfs_ln_f (guestfs_h *g,\n"
9424 " const char *target,\n"
9425 " const char *linkname);\n"
9430 #: ../src/guestfs-actions.pod:3220 ../fish/guestfish-actions.pod:2197
9432 "This command creates a hard link using the C<ln -f> command. The C<-f> "
9433 "option removes the link (C<linkname>) if it exists already."
9437 #: ../src/guestfs-actions.pod:3227
9438 msgid "guestfs_ln_s"
9442 #: ../src/guestfs-actions.pod:3229
9446 " guestfs_ln_s (guestfs_h *g,\n"
9447 " const char *target,\n"
9448 " const char *linkname);\n"
9453 #: ../src/guestfs-actions.pod:3234 ../fish/guestfish-actions.pod:2204
9454 msgid "This command creates a symbolic link using the C<ln -s> command."
9458 #: ../src/guestfs-actions.pod:3240
9459 msgid "guestfs_ln_sf"
9463 #: ../src/guestfs-actions.pod:3242
9467 " guestfs_ln_sf (guestfs_h *g,\n"
9468 " const char *target,\n"
9469 " const char *linkname);\n"
9474 #: ../src/guestfs-actions.pod:3247 ../fish/guestfish-actions.pod:2210
9476 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
9477 "option removes the link (C<linkname>) if it exists already."
9481 #: ../src/guestfs-actions.pod:3254
9482 msgid "guestfs_lremovexattr"
9486 #: ../src/guestfs-actions.pod:3256
9490 " guestfs_lremovexattr (guestfs_h *g,\n"
9491 " const char *xattr,\n"
9492 " const char *path);\n"
9497 #: ../src/guestfs-actions.pod:3261
9499 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
9500 "link, then it removes an extended attribute of the link itself."
9504 #: ../src/guestfs-actions.pod:3269
9509 #: ../src/guestfs-actions.pod:3271
9513 " guestfs_ls (guestfs_h *g,\n"
9514 " const char *directory);\n"
9519 #: ../src/guestfs-actions.pod:3275 ../fish/guestfish-actions.pod:2225
9521 "List the files in C<directory> (relative to the root directory, there is no "
9522 "cwd). The '.' and '..' entries are not returned, but hidden files are "
9527 #: ../src/guestfs-actions.pod:3279
9529 "This command is mostly useful for interactive sessions. Programs should "
9530 "probably use C<guestfs_readdir> instead."
9534 #: ../src/guestfs-actions.pod:3288
9535 msgid "guestfs_lsetxattr"
9539 #: ../src/guestfs-actions.pod:3290
9543 " guestfs_lsetxattr (guestfs_h *g,\n"
9544 " const char *xattr,\n"
9545 " const char *val,\n"
9547 " const char *path);\n"
9552 #: ../src/guestfs-actions.pod:3297
9554 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
9555 "then it sets an extended attribute of the link itself."
9559 #: ../src/guestfs-actions.pod:3305
9560 msgid "guestfs_lstat"
9564 #: ../src/guestfs-actions.pod:3307
9567 " struct guestfs_stat *\n"
9568 " guestfs_lstat (guestfs_h *g,\n"
9569 " const char *path);\n"
9574 #: ../src/guestfs-actions.pod:3311 ../src/guestfs-actions.pod:5738 ../fish/guestfish-actions.pod:2244 ../fish/guestfish-actions.pod:3826
9575 msgid "Returns file information for the given C<path>."
9579 #: ../src/guestfs-actions.pod:3313
9581 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
9582 "link, then the link is stat-ed, not the file it refers to."
9586 #: ../src/guestfs-actions.pod:3317 ../fish/guestfish-actions.pod:2250
9587 msgid "This is the same as the C<lstat(2)> system call."
9591 #: ../src/guestfs-actions.pod:3319 ../src/guestfs-actions.pod:5742
9593 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
9594 "error. I<The caller must call C<guestfs_free_stat> after use>."
9598 #: ../src/guestfs-actions.pod:3323 ../src/guestfs-actions.pod:5746 ../src/guestfs-actions.pod:5764 ../src/guestfs-actions.pod:6145
9599 msgid "(Added in 0.9.2)"
9603 #: ../src/guestfs-actions.pod:3325
9604 msgid "guestfs_lstatlist"
9608 #: ../src/guestfs-actions.pod:3327
9611 " struct guestfs_stat_list *\n"
9612 " guestfs_lstatlist (guestfs_h *g,\n"
9613 " const char *path,\n"
9614 " char *const *names);\n"
9619 #: ../src/guestfs-actions.pod:3332
9621 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
9622 "files, where all files are in the directory C<path>. C<names> is the list "
9623 "of files from this directory."
9627 #: ../src/guestfs-actions.pod:3336 ../fish/guestfish-actions.pod:2260
9629 "On return you get a list of stat structs, with a one-to-one correspondence "
9630 "to the C<names> list. If any name did not exist or could not be lstat'd, "
9631 "then the C<ino> field of that structure is set to C<-1>."
9635 #: ../src/guestfs-actions.pod:3341
9637 "This call is intended for programs that want to efficiently list a directory "
9638 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
9639 "for a similarly efficient call for getting extended attributes. Very long "
9640 "directory listings might cause the protocol message size to be exceeded, "
9641 "causing this call to fail. The caller must split up such requests into "
9642 "smaller groups of names."
9646 #: ../src/guestfs-actions.pod:3349
9648 "This function returns a C<struct guestfs_stat_list *>, or NULL if there was "
9649 "an error. I<The caller must call C<guestfs_free_stat_list> after use>."
9653 #: ../src/guestfs-actions.pod:3355
9654 msgid "guestfs_luks_add_key"
9658 #: ../src/guestfs-actions.pod:3357
9662 " guestfs_luks_add_key (guestfs_h *g,\n"
9663 " const char *device,\n"
9664 " const char *key,\n"
9665 " const char *newkey,\n"
9671 #: ../src/guestfs-actions.pod:3364 ../fish/guestfish-actions.pod:2277
9673 "This command adds a new key on LUKS device C<device>. C<key> is any "
9674 "existing key, and is used to access the device. C<newkey> is the new key to "
9675 "add. C<keyslot> is the key slot that will be replaced."
9679 #: ../src/guestfs-actions.pod:3369
9681 "Note that if C<keyslot> already contains a key, then this command will "
9682 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
9686 #: ../src/guestfs-actions.pod:3375 ../src/guestfs-actions.pod:3415 ../src/guestfs-actions.pod:3438 ../src/guestfs-actions.pod:3458 ../src/guestfs-actions.pod:3490 ../src/guestfs-actions.pod:3509
9688 "This function takes a key or passphrase parameter which could contain "
9689 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
9694 #: ../src/guestfs-actions.pod:3379 ../src/guestfs-actions.pod:3419 ../src/guestfs-actions.pod:3442 ../src/guestfs-actions.pod:3462
9695 msgid "(Added in 1.5.2)"
9699 #: ../src/guestfs-actions.pod:3381
9700 msgid "guestfs_luks_close"
9704 #: ../src/guestfs-actions.pod:3383
9708 " guestfs_luks_close (guestfs_h *g,\n"
9709 " const char *device);\n"
9714 #: ../src/guestfs-actions.pod:3387
9716 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
9717 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
9718 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
9719 "underlying block device."
9723 #: ../src/guestfs-actions.pod:3395 ../src/guestfs-actions.pod:3494 ../src/guestfs-actions.pod:3513 ../src/guestfs-actions.pod:3563 ../src/guestfs-actions.pod:3611
9724 msgid "(Added in 1.5.1)"
9728 #: ../src/guestfs-actions.pod:3397
9729 msgid "guestfs_luks_format"
9733 #: ../src/guestfs-actions.pod:3399
9737 " guestfs_luks_format (guestfs_h *g,\n"
9738 " const char *device,\n"
9739 " const char *key,\n"
9745 #: ../src/guestfs-actions.pod:3405 ../fish/guestfish-actions.pod:2303
9747 "This command erases existing data on C<device> and formats the device as a "
9748 "LUKS encrypted device. C<key> is the initial key, which is added to key "
9749 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
9753 #: ../src/guestfs-actions.pod:3412 ../src/guestfs-actions.pod:3435 ../src/guestfs-actions.pod:3575 ../src/guestfs-actions.pod:4435 ../src/guestfs-actions.pod:5198 ../src/guestfs-actions.pod:5573 ../src/guestfs-actions.pod:5596 ../src/guestfs-actions.pod:5622 ../src/guestfs-actions.pod:6772 ../fish/guestfish-actions.pod:2311 ../fish/guestfish-actions.pod:2324 ../fish/guestfish-actions.pod:2408 ../fish/guestfish-actions.pod:2938 ../fish/guestfish-actions.pod:3445 ../fish/guestfish-actions.pod:3725 ../fish/guestfish-actions.pod:3741 ../fish/guestfish-actions.pod:3756 ../fish/guestfish-actions.pod:4471
9755 "B<This command is dangerous. Without careful use you can easily destroy all "
9760 #: ../src/guestfs-actions.pod:3421
9761 msgid "guestfs_luks_format_cipher"
9765 #: ../src/guestfs-actions.pod:3423
9769 " guestfs_luks_format_cipher (guestfs_h *g,\n"
9770 " const char *device,\n"
9771 " const char *key,\n"
9773 " const char *cipher);\n"
9778 #: ../src/guestfs-actions.pod:3430
9780 "This command is the same as C<guestfs_luks_format> but it also allows you to "
9781 "set the C<cipher> used."
9785 #: ../src/guestfs-actions.pod:3444
9786 msgid "guestfs_luks_kill_slot"
9790 #: ../src/guestfs-actions.pod:3446
9794 " guestfs_luks_kill_slot (guestfs_h *g,\n"
9795 " const char *device,\n"
9796 " const char *key,\n"
9802 #: ../src/guestfs-actions.pod:3452 ../fish/guestfish-actions.pod:2331
9804 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
9805 "device C<device>. C<key> must be one of the I<other> keys."
9809 #: ../src/guestfs-actions.pod:3464
9810 msgid "guestfs_luks_open"
9814 #: ../src/guestfs-actions.pod:3466
9818 " guestfs_luks_open (guestfs_h *g,\n"
9819 " const char *device,\n"
9820 " const char *key,\n"
9821 " const char *mapname);\n"
9826 #: ../src/guestfs-actions.pod:3472 ../fish/guestfish-actions.pod:2342
9828 "This command opens a block device which has been encrypted according to the "
9829 "Linux Unified Key Setup (LUKS) standard."
9833 #: ../src/guestfs-actions.pod:3475 ../fish/guestfish-actions.pod:2345
9834 msgid "C<device> is the encrypted block device or partition."
9838 #: ../src/guestfs-actions.pod:3477 ../fish/guestfish-actions.pod:2347
9840 "The caller must supply one of the keys associated with the LUKS block "
9841 "device, in the C<key> parameter."
9845 #: ../src/guestfs-actions.pod:3480 ../fish/guestfish-actions.pod:2350
9847 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
9848 "writes to this block device are decrypted from and encrypted to the "
9849 "underlying C<device> respectively."
9853 #: ../src/guestfs-actions.pod:3484
9855 "If this block device contains LVM volume groups, then calling "
9856 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
9861 #: ../src/guestfs-actions.pod:3496
9862 msgid "guestfs_luks_open_ro"
9866 #: ../src/guestfs-actions.pod:3498
9870 " guestfs_luks_open_ro (guestfs_h *g,\n"
9871 " const char *device,\n"
9872 " const char *key,\n"
9873 " const char *mapname);\n"
9878 #: ../src/guestfs-actions.pod:3504
9880 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
9885 #: ../src/guestfs-actions.pod:3515
9886 msgid "guestfs_lvcreate"
9890 #: ../src/guestfs-actions.pod:3517
9894 " guestfs_lvcreate (guestfs_h *g,\n"
9895 " const char *logvol,\n"
9896 " const char *volgroup,\n"
9902 #: ../src/guestfs-actions.pod:3523 ../fish/guestfish-actions.pod:2375
9904 "This creates an LVM logical volume called C<logvol> on the volume group "
9905 "C<volgroup>, with C<size> megabytes."
9909 #: ../src/guestfs-actions.pod:3530
9910 msgid "guestfs_lvm_canonical_lv_name"
9914 #: ../src/guestfs-actions.pod:3532
9918 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
9919 " const char *lvname);\n"
9924 #: ../src/guestfs-actions.pod:3536 ../fish/guestfish-actions.pod:2382
9926 "This converts alternative naming schemes for LVs that you might find to the "
9927 "canonical name. For example, C</dev/mapper/VG-LV> is converted to "
9932 #: ../src/guestfs-actions.pod:3540 ../fish/guestfish-actions.pod:2386
9934 "This command returns an error if the C<lvname> parameter does not refer to a "
9939 #: ../src/guestfs-actions.pod:3543
9940 msgid "See also C<guestfs_is_lv>."
9944 #: ../src/guestfs-actions.pod:3548
9945 msgid "(Added in 1.5.24)"
9949 #: ../src/guestfs-actions.pod:3550
9950 msgid "guestfs_lvm_clear_filter"
9954 #: ../src/guestfs-actions.pod:3552
9958 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
9963 #: ../src/guestfs-actions.pod:3555
9965 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
9966 "see every block device."
9970 #: ../src/guestfs-actions.pod:3558 ../src/guestfs-actions.pod:3600 ../fish/guestfish-actions.pod:2398 ../fish/guestfish-actions.pod:2429
9971 msgid "This command also clears the LVM cache and performs a volume group scan."
9975 #: ../src/guestfs-actions.pod:3565
9976 msgid "guestfs_lvm_remove_all"
9980 #: ../src/guestfs-actions.pod:3567
9984 " guestfs_lvm_remove_all (guestfs_h *g);\n"
9989 #: ../src/guestfs-actions.pod:3570 ../fish/guestfish-actions.pod:2405
9991 "This command removes all LVM logical volumes, volume groups and physical "
9996 #: ../src/guestfs-actions.pod:3580
9997 msgid "guestfs_lvm_set_filter"
10001 #: ../src/guestfs-actions.pod:3582
10005 " guestfs_lvm_set_filter (guestfs_h *g,\n"
10006 " char *const *devices);\n"
10011 #: ../src/guestfs-actions.pod:3586 ../fish/guestfish-actions.pod:2415
10013 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
10014 "block devices in the list C<devices>, and will ignore all other attached "
10019 #: ../src/guestfs-actions.pod:3590 ../fish/guestfish-actions.pod:2419
10021 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
10022 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
10023 "there are two types of duplication possible: either cloned PVs/VGs which "
10024 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
10025 "same name. In normal operation you cannot create this situation, but you "
10026 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
10027 "inside the LVM metadata."
10031 #: ../src/guestfs-actions.pod:3603 ../fish/guestfish-actions.pod:2432
10032 msgid "You can filter whole block devices or individual partitions."
10036 #: ../src/guestfs-actions.pod:3605 ../fish/guestfish-actions.pod:2434
10038 "You cannot use this if any VG is currently in use (eg. contains a mounted "
10039 "filesystem), even if you are not filtering out that VG."
10043 #: ../src/guestfs-actions.pod:3613
10044 msgid "guestfs_lvremove"
10048 #: ../src/guestfs-actions.pod:3615
10052 " guestfs_lvremove (guestfs_h *g,\n"
10053 " const char *device);\n"
10058 #: ../src/guestfs-actions.pod:3619 ../fish/guestfish-actions.pod:2442
10060 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
10061 "LV, such as C</dev/VG/LV>."
10065 #: ../src/guestfs-actions.pod:3622 ../fish/guestfish-actions.pod:2445
10067 "You can also remove all LVs in a volume group by specifying the VG name, "
10072 #: ../src/guestfs-actions.pod:3627 ../src/guestfs-actions.pod:4781 ../src/guestfs-actions.pod:6511
10073 msgid "(Added in 1.0.13)"
10077 #: ../src/guestfs-actions.pod:3629
10078 msgid "guestfs_lvrename"
10082 #: ../src/guestfs-actions.pod:3631
10086 " guestfs_lvrename (guestfs_h *g,\n"
10087 " const char *logvol,\n"
10088 " const char *newlogvol);\n"
10093 #: ../src/guestfs-actions.pod:3636 ../fish/guestfish-actions.pod:2452
10094 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
10098 #: ../src/guestfs-actions.pod:3640 ../src/guestfs-actions.pod:6524
10099 msgid "(Added in 1.0.83)"
10103 #: ../src/guestfs-actions.pod:3642
10104 msgid "guestfs_lvresize"
10108 #: ../src/guestfs-actions.pod:3644
10112 " guestfs_lvresize (guestfs_h *g,\n"
10113 " const char *device,\n"
10119 #: ../src/guestfs-actions.pod:3649 ../fish/guestfish-actions.pod:2458
10121 "This resizes (expands or shrinks) an existing LVM logical volume to "
10122 "C<mbytes>. When reducing, data in the reduced part is lost."
10126 #: ../src/guestfs-actions.pod:3657
10127 msgid "guestfs_lvresize_free"
10131 #: ../src/guestfs-actions.pod:3659
10135 " guestfs_lvresize_free (guestfs_h *g,\n"
10136 " const char *lv,\n"
10142 #: ../src/guestfs-actions.pod:3664 ../fish/guestfish-actions.pod:2466
10144 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
10145 "remaining free space in the volume group. Commonly you would call this with "
10146 "pc = 100 which expands the logical volume as much as possible, using all "
10147 "remaining free space in the volume group."
10151 #: ../src/guestfs-actions.pod:3672
10152 msgid "(Added in 1.3.3)"
10156 #: ../src/guestfs-actions.pod:3674
10157 msgid "guestfs_lvs"
10161 #: ../src/guestfs-actions.pod:3676
10165 " guestfs_lvs (guestfs_h *g);\n"
10170 #: ../src/guestfs-actions.pod:3679 ../fish/guestfish-actions.pod:2476
10172 "List all the logical volumes detected. This is the equivalent of the "
10173 "L<lvs(8)> command."
10177 #: ../src/guestfs-actions.pod:3682 ../fish/guestfish-actions.pod:2479
10179 "This returns a list of the logical volume device names "
10180 "(eg. C</dev/VolGroup00/LogVol00>)."
10184 #: ../src/guestfs-actions.pod:3685
10185 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
10189 #: ../src/guestfs-actions.pod:3693
10190 msgid "guestfs_lvs_full"
10194 #: ../src/guestfs-actions.pod:3695
10197 " struct guestfs_lvm_lv_list *\n"
10198 " guestfs_lvs_full (guestfs_h *g);\n"
10203 #: ../src/guestfs-actions.pod:3698 ../fish/guestfish-actions.pod:2488
10205 "List all the logical volumes detected. This is the equivalent of the "
10206 "L<lvs(8)> command. The \"full\" version includes all fields."
10210 #: ../src/guestfs-actions.pod:3701
10212 "This function returns a C<struct guestfs_lvm_lv_list *>, or NULL if there "
10213 "was an error. I<The caller must call C<guestfs_free_lvm_lv_list> after "
10218 #: ../src/guestfs-actions.pod:3707
10219 msgid "guestfs_lvuuid"
10223 #: ../src/guestfs-actions.pod:3709
10227 " guestfs_lvuuid (guestfs_h *g,\n"
10228 " const char *device);\n"
10233 #: ../src/guestfs-actions.pod:3713 ../fish/guestfish-actions.pod:2495
10234 msgid "This command returns the UUID of the LVM LV C<device>."
10238 #: ../src/guestfs-actions.pod:3720
10239 msgid "guestfs_lxattrlist"
10243 #: ../src/guestfs-actions.pod:3722
10246 " struct guestfs_xattr_list *\n"
10247 " guestfs_lxattrlist (guestfs_h *g,\n"
10248 " const char *path,\n"
10249 " char *const *names);\n"
10254 #: ../src/guestfs-actions.pod:3727 ../fish/guestfish-actions.pod:2501
10256 "This call allows you to get the extended attributes of multiple files, where "
10257 "all files are in the directory C<path>. C<names> is the list of files from "
10262 #: ../src/guestfs-actions.pod:3731 ../fish/guestfish-actions.pod:2505
10264 "On return you get a flat list of xattr structs which must be interpreted "
10265 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
10266 "C<attrval> in this struct is zero-length to indicate there was an error "
10267 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
10268 "number (the number of following attributes for this file, which could be "
10269 "C<\"0\">). Then after the first xattr struct are the zero or more "
10270 "attributes for the first named file. This repeats for the second and "
10271 "subsequent files."
10275 #: ../src/guestfs-actions.pod:3741
10277 "This call is intended for programs that want to efficiently list a directory "
10278 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
10279 "a similarly efficient call for getting standard stats. Very long directory "
10280 "listings might cause the protocol message size to be exceeded, causing this "
10281 "call to fail. The caller must split up such requests into smaller groups of "
10286 #: ../src/guestfs-actions.pod:3755
10287 msgid "guestfs_mkdir"
10291 #: ../src/guestfs-actions.pod:3757
10295 " guestfs_mkdir (guestfs_h *g,\n"
10296 " const char *path);\n"
10301 #: ../src/guestfs-actions.pod:3761 ../fish/guestfish-actions.pod:2527
10302 msgid "Create a directory named C<path>."
10306 #: ../src/guestfs-actions.pod:3767
10307 msgid "guestfs_mkdir_mode"
10311 #: ../src/guestfs-actions.pod:3769
10315 " guestfs_mkdir_mode (guestfs_h *g,\n"
10316 " const char *path,\n"
10322 #: ../src/guestfs-actions.pod:3774 ../fish/guestfish-actions.pod:2533
10324 "This command creates a directory, setting the initial permissions of the "
10325 "directory to C<mode>."
10329 #: ../src/guestfs-actions.pod:3777 ../fish/guestfish-actions.pod:2536
10331 "For common Linux filesystems, the actual mode which is set will be C<mode & "
10332 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
10337 #: ../src/guestfs-actions.pod:3781
10338 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
10342 #: ../src/guestfs-actions.pod:3787
10343 msgid "guestfs_mkdir_p"
10347 #: ../src/guestfs-actions.pod:3789
10351 " guestfs_mkdir_p (guestfs_h *g,\n"
10352 " const char *path);\n"
10357 #: ../src/guestfs-actions.pod:3793 ../fish/guestfish-actions.pod:2546
10359 "Create a directory named C<path>, creating any parent directories as "
10360 "necessary. This is like the C<mkdir -p> shell command."
10364 #: ../src/guestfs-actions.pod:3800
10365 msgid "guestfs_mkdtemp"
10369 #: ../src/guestfs-actions.pod:3802
10373 " guestfs_mkdtemp (guestfs_h *g,\n"
10374 " const char *template);\n"
10379 #: ../src/guestfs-actions.pod:3806 ../fish/guestfish-actions.pod:2553
10381 "This command creates a temporary directory. The C<template> parameter "
10382 "should be a full pathname for the temporary directory name with the final "
10383 "six characters being \"XXXXXX\"."
10387 #: ../src/guestfs-actions.pod:3811 ../fish/guestfish-actions.pod:2558
10389 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
10390 "being suitable for Windows filesystems."
10394 #: ../src/guestfs-actions.pod:3814 ../fish/guestfish-actions.pod:2561
10395 msgid "The name of the temporary directory that was created is returned."
10399 #: ../src/guestfs-actions.pod:3817 ../fish/guestfish-actions.pod:2564
10400 msgid "The temporary directory is created with mode 0700 and is owned by root."
10404 #: ../src/guestfs-actions.pod:3820 ../fish/guestfish-actions.pod:2567
10406 "The caller is responsible for deleting the temporary directory and its "
10407 "contents after use."
10411 #: ../src/guestfs-actions.pod:3823 ../fish/guestfish-actions.pod:2570
10412 msgid "See also: L<mkdtemp(3)>"
10416 #: ../src/guestfs-actions.pod:3830
10417 msgid "guestfs_mke2fs_J"
10421 #: ../src/guestfs-actions.pod:3832
10425 " guestfs_mke2fs_J (guestfs_h *g,\n"
10426 " const char *fstype,\n"
10427 " int blocksize,\n"
10428 " const char *device,\n"
10429 " const char *journal);\n"
10434 #: ../src/guestfs-actions.pod:3839 ../fish/guestfish-actions.pod:2576
10436 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10437 "C<journal>. It is equivalent to the command:"
10441 #: ../src/guestfs-actions.pod:3843 ../fish/guestfish-actions.pod:2580
10444 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
10449 #: ../src/guestfs-actions.pod:3845
10450 msgid "See also C<guestfs_mke2journal>."
10454 #: ../src/guestfs-actions.pod:3849 ../src/guestfs-actions.pod:3867 ../src/guestfs-actions.pod:3885 ../src/guestfs-actions.pod:3901 ../src/guestfs-actions.pod:3915 ../src/guestfs-actions.pod:3929 ../src/guestfs-actions.pod:3981 ../src/guestfs-actions.pod:4171
10455 msgid "(Added in 1.0.68)"
10459 #: ../src/guestfs-actions.pod:3851
10460 msgid "guestfs_mke2fs_JL"
10464 #: ../src/guestfs-actions.pod:3853
10468 " guestfs_mke2fs_JL (guestfs_h *g,\n"
10469 " const char *fstype,\n"
10470 " int blocksize,\n"
10471 " const char *device,\n"
10472 " const char *label);\n"
10477 #: ../src/guestfs-actions.pod:3860 ../fish/guestfish-actions.pod:2588
10479 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10480 "the journal labeled C<label>."
10484 #: ../src/guestfs-actions.pod:3863
10485 msgid "See also C<guestfs_mke2journal_L>."
10489 #: ../src/guestfs-actions.pod:3869
10490 msgid "guestfs_mke2fs_JU"
10494 #: ../src/guestfs-actions.pod:3871
10498 " guestfs_mke2fs_JU (guestfs_h *g,\n"
10499 " const char *fstype,\n"
10500 " int blocksize,\n"
10501 " const char *device,\n"
10502 " const char *uuid);\n"
10507 #: ../src/guestfs-actions.pod:3878 ../fish/guestfish-actions.pod:2597
10509 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10510 "the journal with UUID C<uuid>."
10514 #: ../src/guestfs-actions.pod:3881
10515 msgid "See also C<guestfs_mke2journal_U>."
10519 #: ../src/guestfs-actions.pod:3887
10520 msgid "guestfs_mke2journal"
10524 #: ../src/guestfs-actions.pod:3889
10528 " guestfs_mke2journal (guestfs_h *g,\n"
10529 " int blocksize,\n"
10530 " const char *device);\n"
10535 #: ../src/guestfs-actions.pod:3894 ../fish/guestfish-actions.pod:2606
10537 "This creates an ext2 external journal on C<device>. It is equivalent to the "
10542 #: ../src/guestfs-actions.pod:3897 ../fish/guestfish-actions.pod:2609
10545 " mke2fs -O journal_dev -b blocksize device\n"
10550 #: ../src/guestfs-actions.pod:3903
10551 msgid "guestfs_mke2journal_L"
10555 #: ../src/guestfs-actions.pod:3905
10559 " guestfs_mke2journal_L (guestfs_h *g,\n"
10560 " int blocksize,\n"
10561 " const char *label,\n"
10562 " const char *device);\n"
10567 #: ../src/guestfs-actions.pod:3911 ../fish/guestfish-actions.pod:2615
10568 msgid "This creates an ext2 external journal on C<device> with label C<label>."
10572 #: ../src/guestfs-actions.pod:3917
10573 msgid "guestfs_mke2journal_U"
10577 #: ../src/guestfs-actions.pod:3919
10581 " guestfs_mke2journal_U (guestfs_h *g,\n"
10582 " int blocksize,\n"
10583 " const char *uuid,\n"
10584 " const char *device);\n"
10589 #: ../src/guestfs-actions.pod:3925 ../fish/guestfish-actions.pod:2621
10590 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
10594 #: ../src/guestfs-actions.pod:3931
10595 msgid "guestfs_mkfifo"
10599 #: ../src/guestfs-actions.pod:3933
10603 " guestfs_mkfifo (guestfs_h *g,\n"
10605 " const char *path);\n"
10610 #: ../src/guestfs-actions.pod:3938
10612 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
10613 "is just a convenient wrapper around C<guestfs_mknod>."
10617 #: ../src/guestfs-actions.pod:3948
10618 msgid "guestfs_mkfs"
10622 #: ../src/guestfs-actions.pod:3950
10626 " guestfs_mkfs (guestfs_h *g,\n"
10627 " const char *fstype,\n"
10628 " const char *device);\n"
10633 #: ../src/guestfs-actions.pod:3955 ../fish/guestfish-actions.pod:2637
10635 "This creates a filesystem on C<device> (usually a partition or LVM logical "
10636 "volume). The filesystem type is C<fstype>, for example C<ext3>."
10640 #: ../src/guestfs-actions.pod:3963
10641 msgid "guestfs_mkfs_b"
10645 #: ../src/guestfs-actions.pod:3965
10649 " guestfs_mkfs_b (guestfs_h *g,\n"
10650 " const char *fstype,\n"
10651 " int blocksize,\n"
10652 " const char *device);\n"
10657 #: ../src/guestfs-actions.pod:3971
10659 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
10660 "block size of the resulting filesystem. Supported block sizes depend on the "
10661 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
10665 #: ../src/guestfs-actions.pod:3976 ../fish/guestfish-actions.pod:2650
10667 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
10672 #: ../src/guestfs-actions.pod:3983
10673 msgid "guestfs_mkmountpoint"
10677 #: ../src/guestfs-actions.pod:3985
10681 " guestfs_mkmountpoint (guestfs_h *g,\n"
10682 " const char *exemptpath);\n"
10687 #: ../src/guestfs-actions.pod:3989
10689 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
10690 "that can be used to create extra mountpoints before mounting the first "
10695 #: ../src/guestfs-actions.pod:3993 ../fish/guestfish-actions.pod:2661
10697 "These calls are I<only> necessary in some very limited circumstances, mainly "
10698 "the case where you want to mount a mix of unrelated and/or read-only "
10699 "filesystems together."
10703 #: ../src/guestfs-actions.pod:3997 ../fish/guestfish-actions.pod:2665
10705 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
10706 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
10707 "inside that. You can unpack this as follows in guestfish:"
10711 #: ../src/guestfs-actions.pod:4002 ../fish/guestfish-actions.pod:2670
10714 " add-ro Fedora-11-i686-Live.iso\n"
10716 " mkmountpoint /cd\n"
10717 " mkmountpoint /sqsh\n"
10718 " mkmountpoint /ext3fs\n"
10719 " mount /dev/sda /cd\n"
10720 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
10721 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
10726 #: ../src/guestfs-actions.pod:4011 ../fish/guestfish-actions.pod:2679
10727 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
10731 #: ../src/guestfs-actions.pod:4013
10733 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
10734 "may get unexpected errors if you try to mix these calls. It is safest to "
10735 "manually unmount filesystems and remove mountpoints after use."
10739 #: ../src/guestfs-actions.pod:4017
10741 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
10742 "first, so for this to work for manual mountpoints, you must ensure that the "
10743 "innermost mountpoints have the longest pathnames, as in the example code "
10748 #: ../src/guestfs-actions.pod:4022 ../fish/guestfish-actions.pod:2690
10749 msgid "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
10753 #: ../src/guestfs-actions.pod:4024
10755 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
10756 "means that C<guestfs_umount_all> is called when the handle is closed which "
10757 "can also trigger these issues."
10761 #: ../src/guestfs-actions.pod:4030 ../src/guestfs-actions.pod:4289 ../src/guestfs-actions.pod:5182
10762 msgid "(Added in 1.0.62)"
10766 #: ../src/guestfs-actions.pod:4032
10767 msgid "guestfs_mknod"
10771 #: ../src/guestfs-actions.pod:4034
10775 " guestfs_mknod (guestfs_h *g,\n"
10779 " const char *path);\n"
10784 #: ../src/guestfs-actions.pod:4041 ../fish/guestfish-actions.pod:2700
10786 "This call creates block or character special devices, or named pipes "
10791 #: ../src/guestfs-actions.pod:4044 ../fish/guestfish-actions.pod:2703
10793 "The C<mode> parameter should be the mode, using the standard constants. "
10794 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
10795 "used when creating block and character special devices."
10799 #: ../src/guestfs-actions.pod:4049
10801 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
10802 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
10803 "regular file). These constants are available in the standard Linux header "
10804 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
10805 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
10806 "the appropriate constant for you."
10810 #: ../src/guestfs-actions.pod:4063
10811 msgid "guestfs_mknod_b"
10815 #: ../src/guestfs-actions.pod:4065
10819 " guestfs_mknod_b (guestfs_h *g,\n"
10823 " const char *path);\n"
10828 #: ../src/guestfs-actions.pod:4072
10830 "This call creates a block device node called C<path> with mode C<mode> and "
10831 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
10832 "wrapper around C<guestfs_mknod>."
10836 #: ../src/guestfs-actions.pod:4082
10837 msgid "guestfs_mknod_c"
10841 #: ../src/guestfs-actions.pod:4084
10845 " guestfs_mknod_c (guestfs_h *g,\n"
10849 " const char *path);\n"
10854 #: ../src/guestfs-actions.pod:4091
10856 "This call creates a char device node called C<path> with mode C<mode> and "
10857 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
10858 "wrapper around C<guestfs_mknod>."
10862 #: ../src/guestfs-actions.pod:4101
10863 msgid "guestfs_mkswap"
10867 #: ../src/guestfs-actions.pod:4103
10871 " guestfs_mkswap (guestfs_h *g,\n"
10872 " const char *device);\n"
10877 #: ../src/guestfs-actions.pod:4107 ../fish/guestfish-actions.pod:2742
10878 msgid "Create a swap partition on C<device>."
10882 #: ../src/guestfs-actions.pod:4113
10883 msgid "guestfs_mkswap_L"
10887 #: ../src/guestfs-actions.pod:4115
10891 " guestfs_mkswap_L (guestfs_h *g,\n"
10892 " const char *label,\n"
10893 " const char *device);\n"
10898 #: ../src/guestfs-actions.pod:4120 ../fish/guestfish-actions.pod:2748
10899 msgid "Create a swap partition on C<device> with label C<label>."
10903 #: ../src/guestfs-actions.pod:4122 ../fish/guestfish-actions.pod:2750
10905 "Note that you cannot attach a swap label to a block device "
10906 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
10907 "the kernel or swap tools."
10911 #: ../src/guestfs-actions.pod:4130
10912 msgid "guestfs_mkswap_U"
10916 #: ../src/guestfs-actions.pod:4132
10920 " guestfs_mkswap_U (guestfs_h *g,\n"
10921 " const char *uuid,\n"
10922 " const char *device);\n"
10927 #: ../src/guestfs-actions.pod:4137 ../fish/guestfish-actions.pod:2758
10928 msgid "Create a swap partition on C<device> with UUID C<uuid>."
10932 #: ../src/guestfs-actions.pod:4143
10933 msgid "guestfs_mkswap_file"
10937 #: ../src/guestfs-actions.pod:4145
10941 " guestfs_mkswap_file (guestfs_h *g,\n"
10942 " const char *path);\n"
10947 #: ../src/guestfs-actions.pod:4149 ../fish/guestfish-actions.pod:2764
10948 msgid "Create a swap file."
10952 #: ../src/guestfs-actions.pod:4151
10954 "This command just writes a swap file signature to an existing file. To "
10955 "create the file itself, use something like C<guestfs_fallocate>."
10959 #: ../src/guestfs-actions.pod:4158
10960 msgid "guestfs_modprobe"
10964 #: ../src/guestfs-actions.pod:4160
10968 " guestfs_modprobe (guestfs_h *g,\n"
10969 " const char *modulename);\n"
10974 #: ../src/guestfs-actions.pod:4164 ../fish/guestfish-actions.pod:2773
10975 msgid "This loads a kernel module in the appliance."
10979 #: ../src/guestfs-actions.pod:4166 ../fish/guestfish-actions.pod:2775
10981 "The kernel module must have been whitelisted when libguestfs was built (see "
10982 "C<appliance/kmod.whitelist.in> in the source)."
10986 #: ../src/guestfs-actions.pod:4173
10987 msgid "guestfs_mount"
10991 #: ../src/guestfs-actions.pod:4175
10995 " guestfs_mount (guestfs_h *g,\n"
10996 " const char *device,\n"
10997 " const char *mountpoint);\n"
11002 #: ../src/guestfs-actions.pod:4180 ../fish/guestfish-actions.pod:2782
11004 "Mount a guest disk at a position in the filesystem. Block devices are named "
11005 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
11006 "those block devices contain partitions, they will have the usual names "
11007 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
11011 #: ../src/guestfs-actions.pod:4186 ../fish/guestfish-actions.pod:2788
11013 "The rules are the same as for L<mount(2)>: A filesystem must first be "
11014 "mounted on C</> before others can be mounted. Other filesystems can only be "
11015 "mounted on directories which already exist."
11019 #: ../src/guestfs-actions.pod:4191 ../fish/guestfish-actions.pod:2793
11021 "The mounted filesystem is writable, if we have sufficient permissions on the "
11022 "underlying device."
11026 #: ../src/guestfs-actions.pod:4194
11028 "B<Important note:> When you use this call, the filesystem options C<sync> "
11029 "and C<noatime> are set implicitly. This was originally done because we "
11030 "thought it would improve reliability, but it turns out that I<-o sync> has a "
11031 "very large negative performance impact and negligible effect on "
11032 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
11033 "in any code that needs performance, and instead use C<guestfs_mount_options> "
11034 "(use an empty string for the first parameter if you don't want any options)."
11038 #: ../src/guestfs-actions.pod:4208
11039 msgid "guestfs_mount_loop"
11043 #: ../src/guestfs-actions.pod:4210
11047 " guestfs_mount_loop (guestfs_h *g,\n"
11048 " const char *file,\n"
11049 " const char *mountpoint);\n"
11054 #: ../src/guestfs-actions.pod:4215 ../fish/guestfish-actions.pod:2810
11056 "This command lets you mount C<file> (a filesystem image in a file) on a "
11057 "mount point. It is entirely equivalent to the command C<mount -o loop file "
11062 #: ../src/guestfs-actions.pod:4223
11063 msgid "guestfs_mount_options"
11067 #: ../src/guestfs-actions.pod:4225
11071 " guestfs_mount_options (guestfs_h *g,\n"
11072 " const char *options,\n"
11073 " const char *device,\n"
11074 " const char *mountpoint);\n"
11079 #: ../src/guestfs-actions.pod:4231
11081 "This is the same as the C<guestfs_mount> command, but it allows you to set "
11082 "the mount options as for the L<mount(8)> I<-o> flag."
11086 #: ../src/guestfs-actions.pod:4235 ../fish/guestfish-actions.pod:2822
11088 "If the C<options> parameter is an empty string, then no options are passed "
11089 "(all options default to whatever the filesystem uses)."
11093 #: ../src/guestfs-actions.pod:4241 ../src/guestfs-actions.pod:4255 ../src/guestfs-actions.pod:4272
11094 msgid "(Added in 1.0.10)"
11098 #: ../src/guestfs-actions.pod:4243
11099 msgid "guestfs_mount_ro"
11103 #: ../src/guestfs-actions.pod:4245
11107 " guestfs_mount_ro (guestfs_h *g,\n"
11108 " const char *device,\n"
11109 " const char *mountpoint);\n"
11114 #: ../src/guestfs-actions.pod:4250
11116 "This is the same as the C<guestfs_mount> command, but it mounts the "
11117 "filesystem with the read-only (I<-o ro>) flag."
11121 #: ../src/guestfs-actions.pod:4257
11122 msgid "guestfs_mount_vfs"
11126 #: ../src/guestfs-actions.pod:4259
11130 " guestfs_mount_vfs (guestfs_h *g,\n"
11131 " const char *options,\n"
11132 " const char *vfstype,\n"
11133 " const char *device,\n"
11134 " const char *mountpoint);\n"
11139 #: ../src/guestfs-actions.pod:4266
11141 "This is the same as the C<guestfs_mount> command, but it allows you to set "
11142 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
11147 #: ../src/guestfs-actions.pod:4274
11148 msgid "guestfs_mountpoints"
11152 #: ../src/guestfs-actions.pod:4276
11156 " guestfs_mountpoints (guestfs_h *g);\n"
11161 #: ../src/guestfs-actions.pod:4279
11163 "This call is similar to C<guestfs_mounts>. That call returns a list of "
11164 "devices. This one returns a hash table (map) of device name to directory "
11165 "where the device is mounted."
11169 #: ../src/guestfs-actions.pod:4291
11170 msgid "guestfs_mounts"
11174 #: ../src/guestfs-actions.pod:4293
11178 " guestfs_mounts (guestfs_h *g);\n"
11183 #: ../src/guestfs-actions.pod:4296 ../fish/guestfish-actions.pod:2853
11185 "This returns the list of currently mounted filesystems. It returns the list "
11186 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
11190 #: ../src/guestfs-actions.pod:4299 ../fish/guestfish-actions.pod:2856
11191 msgid "Some internal mounts are not shown."
11195 #: ../src/guestfs-actions.pod:4301
11196 msgid "See also: C<guestfs_mountpoints>"
11200 #: ../src/guestfs-actions.pod:4309
11205 #: ../src/guestfs-actions.pod:4311
11209 " guestfs_mv (guestfs_h *g,\n"
11210 " const char *src,\n"
11211 " const char *dest);\n"
11216 #: ../src/guestfs-actions.pod:4316 ../fish/guestfish-actions.pod:2864
11218 "This moves a file from C<src> to C<dest> where C<dest> is either a "
11219 "destination filename or destination directory."
11223 #: ../src/guestfs-actions.pod:4323
11224 msgid "guestfs_ntfs_3g_probe"
11228 #: ../src/guestfs-actions.pod:4325
11232 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
11234 " const char *device);\n"
11239 #: ../src/guestfs-actions.pod:4330 ../fish/guestfish-actions.pod:2871
11241 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
11242 "C<device> for mountability. (Not all NTFS volumes can be mounted "
11243 "read-write, and some cannot be mounted at all)."
11247 #: ../src/guestfs-actions.pod:4334 ../fish/guestfish-actions.pod:2875
11249 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
11250 "can be mounted read-write. Set it to false if you want to test if the "
11251 "volume can be mounted read-only."
11255 #: ../src/guestfs-actions.pod:4338 ../fish/guestfish-actions.pod:2879
11257 "The return value is an integer which C<0> if the operation would succeed, or "
11258 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
11262 #: ../src/guestfs-actions.pod:4344
11263 msgid "(Added in 1.0.43)"
11267 #: ../src/guestfs-actions.pod:4346
11268 msgid "guestfs_ntfsresize"
11272 #: ../src/guestfs-actions.pod:4348
11276 " guestfs_ntfsresize (guestfs_h *g,\n"
11277 " const char *device);\n"
11282 #: ../src/guestfs-actions.pod:4352 ../fish/guestfish-actions.pod:2887
11284 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
11285 "size of the underlying device. See also L<ntfsresize(8)>."
11289 #: ../src/guestfs-actions.pod:4360
11290 msgid "guestfs_ntfsresize_size"
11294 #: ../src/guestfs-actions.pod:4362
11298 " guestfs_ntfsresize_size (guestfs_h *g,\n"
11299 " const char *device,\n"
11300 " int64_t size);\n"
11305 #: ../src/guestfs-actions.pod:4367
11307 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
11308 "to specify the new size (in bytes) explicitly."
11312 #: ../src/guestfs-actions.pod:4372 ../src/guestfs-actions.pod:4808 ../src/guestfs-actions.pod:4881 ../src/guestfs-actions.pod:5130
11313 msgid "(Added in 1.3.14)"
11317 #: ../src/guestfs-actions.pod:4374
11318 msgid "guestfs_part_add"
11322 #: ../src/guestfs-actions.pod:4376
11326 " guestfs_part_add (guestfs_h *g,\n"
11327 " const char *device,\n"
11328 " const char *prlogex,\n"
11329 " int64_t startsect,\n"
11330 " int64_t endsect);\n"
11335 #: ../src/guestfs-actions.pod:4383
11337 "This command adds a partition to C<device>. If there is no partition table "
11338 "on the device, call C<guestfs_part_init> first."
11342 #: ../src/guestfs-actions.pod:4386 ../fish/guestfish-actions.pod:2905
11344 "The C<prlogex> parameter is the type of partition. Normally you should pass "
11345 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
11346 "C<logical>) and C<e> (or C<extended>) partition types."
11350 #: ../src/guestfs-actions.pod:4391 ../fish/guestfish-actions.pod:2910
11352 "C<startsect> and C<endsect> are the start and end of the partition in "
11353 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
11354 "from the end of the disk (C<-1> is the last sector)."
11358 #: ../src/guestfs-actions.pod:4395
11360 "Creating a partition which covers the whole disk is not so easy. Use "
11361 "C<guestfs_part_disk> to do that."
11365 #: ../src/guestfs-actions.pod:4400 ../src/guestfs-actions.pod:4438 ../src/guestfs-actions.pod:4491 ../src/guestfs-actions.pod:4569 ../src/guestfs-actions.pod:4607 ../src/guestfs-actions.pod:4626 ../src/guestfs-actions.pod:4666
11366 msgid "(Added in 1.0.78)"
11370 #: ../src/guestfs-actions.pod:4402
11371 msgid "guestfs_part_del"
11375 #: ../src/guestfs-actions.pod:4404
11379 " guestfs_part_del (guestfs_h *g,\n"
11380 " const char *device,\n"
11386 #: ../src/guestfs-actions.pod:4409 ../fish/guestfish-actions.pod:2921
11387 msgid "This command deletes the partition numbered C<partnum> on C<device>."
11391 #: ../src/guestfs-actions.pod:4411 ../fish/guestfish-actions.pod:2923
11393 "Note that in the case of MBR partitioning, deleting an extended partition "
11394 "also deletes any logical partitions it contains."
11398 #: ../src/guestfs-actions.pod:4419
11399 msgid "guestfs_part_disk"
11403 #: ../src/guestfs-actions.pod:4421
11407 " guestfs_part_disk (guestfs_h *g,\n"
11408 " const char *device,\n"
11409 " const char *parttype);\n"
11414 #: ../src/guestfs-actions.pod:4426
11416 "This command is simply a combination of C<guestfs_part_init> followed by "
11417 "C<guestfs_part_add> to create a single primary partition covering the whole "
11422 #: ../src/guestfs-actions.pod:4430
11424 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
11425 "possible values are described in C<guestfs_part_init>."
11429 #: ../src/guestfs-actions.pod:4440
11430 msgid "guestfs_part_get_bootable"
11434 #: ../src/guestfs-actions.pod:4442
11438 " guestfs_part_get_bootable (guestfs_h *g,\n"
11439 " const char *device,\n"
11445 #: ../src/guestfs-actions.pod:4447 ../fish/guestfish-actions.pod:2945
11447 "This command returns true if the partition C<partnum> on C<device> has the "
11448 "bootable flag set."
11452 #: ../src/guestfs-actions.pod:4450
11453 msgid "See also C<guestfs_part_set_bootable>."
11457 #: ../src/guestfs-actions.pod:4456
11458 msgid "guestfs_part_get_mbr_id"
11462 #: ../src/guestfs-actions.pod:4458
11466 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
11467 " const char *device,\n"
11473 #: ../src/guestfs-actions.pod:4463 ../fish/guestfish-actions.pod:2954
11475 "Returns the MBR type byte (also known as the ID byte) from the numbered "
11476 "partition C<partnum>."
11480 #: ../src/guestfs-actions.pod:4466 ../src/guestfs-actions.pod:4642
11482 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
11483 "undefined results for other partition table types (see "
11484 "C<guestfs_part_get_parttype>)."
11488 #: ../src/guestfs-actions.pod:4474
11489 msgid "guestfs_part_get_parttype"
11493 #: ../src/guestfs-actions.pod:4476
11497 " guestfs_part_get_parttype (guestfs_h *g,\n"
11498 " const char *device);\n"
11503 #: ../src/guestfs-actions.pod:4480 ../fish/guestfish-actions.pod:2965
11505 "This command examines the partition table on C<device> and returns the "
11506 "partition table type (format) being used."
11510 #: ../src/guestfs-actions.pod:4483
11512 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
11513 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
11514 "possible, although unusual. See C<guestfs_part_init> for a full list."
11518 #: ../src/guestfs-actions.pod:4493
11519 msgid "guestfs_part_init"
11523 #: ../src/guestfs-actions.pod:4495
11527 " guestfs_part_init (guestfs_h *g,\n"
11528 " const char *device,\n"
11529 " const char *parttype);\n"
11534 #: ../src/guestfs-actions.pod:4500 ../fish/guestfish-actions.pod:2977
11536 "This creates an empty partition table on C<device> of one of the partition "
11537 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
11538 "(for large disks)."
11542 #: ../src/guestfs-actions.pod:4504
11544 "Initially there are no partitions. Following this, you should call "
11545 "C<guestfs_part_add> for each partition required."
11549 #: ../src/guestfs-actions.pod:4507 ../fish/guestfish-actions.pod:2984
11550 msgid "Possible values for C<parttype> are:"
11554 #: ../src/guestfs-actions.pod:4511 ../fish/guestfish-actions.pod:2988
11555 msgid "B<efi> | B<gpt>"
11559 #: ../src/guestfs-actions.pod:4513 ../fish/guestfish-actions.pod:2990
11560 msgid "Intel EFI / GPT partition table."
11564 #: ../src/guestfs-actions.pod:4515 ../fish/guestfish-actions.pod:2992
11566 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
11567 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
11568 "the C<mbr> format."
11572 #: ../src/guestfs-actions.pod:4519 ../fish/guestfish-actions.pod:2996
11573 msgid "B<mbr> | B<msdos>"
11577 #: ../src/guestfs-actions.pod:4521 ../fish/guestfish-actions.pod:2998
11579 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
11580 "Windows. This partition type will B<only> work for device sizes up to 2 "
11581 "TB. For large disks we recommend using C<gpt>."
11585 #: ../src/guestfs-actions.pod:4528 ../fish/guestfish-actions.pod:3005
11586 msgid "Other partition table types that may work but are not supported include:"
11590 #: ../src/guestfs-actions.pod:4533 ../fish/guestfish-actions.pod:3010
11595 #: ../src/guestfs-actions.pod:4535 ../fish/guestfish-actions.pod:3012
11596 msgid "AIX disk labels."
11600 #: ../src/guestfs-actions.pod:4537 ../fish/guestfish-actions.pod:3014
11601 msgid "B<amiga> | B<rdb>"
11605 #: ../src/guestfs-actions.pod:4539 ../fish/guestfish-actions.pod:3016
11606 msgid "Amiga \"Rigid Disk Block\" format."
11610 #: ../src/guestfs-actions.pod:4541 ../fish/guestfish-actions.pod:3018
11615 #: ../src/guestfs-actions.pod:4543 ../fish/guestfish-actions.pod:3020
11616 msgid "BSD disk labels."
11620 #: ../src/guestfs-actions.pod:4545 ../fish/guestfish-actions.pod:3022
11625 #: ../src/guestfs-actions.pod:4547 ../fish/guestfish-actions.pod:3024
11626 msgid "DASD, used on IBM mainframes."
11630 #: ../src/guestfs-actions.pod:4549 ../fish/guestfish-actions.pod:3026
11635 #: ../src/guestfs-actions.pod:4551 ../fish/guestfish-actions.pod:3028
11636 msgid "MIPS/SGI volumes."
11640 #: ../src/guestfs-actions.pod:4553 ../fish/guestfish-actions.pod:3030
11645 #: ../src/guestfs-actions.pod:4555 ../fish/guestfish-actions.pod:3032
11646 msgid "Old Mac partition format. Modern Macs use C<gpt>."
11650 #: ../src/guestfs-actions.pod:4557 ../fish/guestfish-actions.pod:3034
11655 #: ../src/guestfs-actions.pod:4559 ../fish/guestfish-actions.pod:3036
11656 msgid "NEC PC-98 format, common in Japan apparently."
11660 #: ../src/guestfs-actions.pod:4561 ../fish/guestfish-actions.pod:3038
11665 #: ../src/guestfs-actions.pod:4563 ../fish/guestfish-actions.pod:3040
11666 msgid "Sun disk labels."
11670 #: ../src/guestfs-actions.pod:4571
11671 msgid "guestfs_part_list"
11675 #: ../src/guestfs-actions.pod:4573
11678 " struct guestfs_partition_list *\n"
11679 " guestfs_part_list (guestfs_h *g,\n"
11680 " const char *device);\n"
11685 #: ../src/guestfs-actions.pod:4577 ../fish/guestfish-actions.pod:3048
11687 "This command parses the partition table on C<device> and returns the list of "
11688 "partitions found."
11692 #: ../src/guestfs-actions.pod:4580 ../fish/guestfish-actions.pod:3051
11693 msgid "The fields in the returned structure are:"
11697 #: ../src/guestfs-actions.pod:4584 ../fish/guestfish-actions.pod:3055
11698 msgid "B<part_num>"
11702 #: ../src/guestfs-actions.pod:4586 ../fish/guestfish-actions.pod:3057
11703 msgid "Partition number, counting from 1."
11707 #: ../src/guestfs-actions.pod:4588 ../fish/guestfish-actions.pod:3059
11708 msgid "B<part_start>"
11712 #: ../src/guestfs-actions.pod:4590
11714 "Start of the partition I<in bytes>. To get sectors you have to divide by "
11715 "the device's sector size, see C<guestfs_blockdev_getss>."
11719 #: ../src/guestfs-actions.pod:4593 ../fish/guestfish-actions.pod:3064
11720 msgid "B<part_end>"
11724 #: ../src/guestfs-actions.pod:4595 ../fish/guestfish-actions.pod:3066
11725 msgid "End of the partition in bytes."
11729 #: ../src/guestfs-actions.pod:4597 ../fish/guestfish-actions.pod:3068
11730 msgid "B<part_size>"
11734 #: ../src/guestfs-actions.pod:4599 ../fish/guestfish-actions.pod:3070
11735 msgid "Size of the partition in bytes."
11739 #: ../src/guestfs-actions.pod:4603
11741 "This function returns a C<struct guestfs_partition_list *>, or NULL if there "
11742 "was an error. I<The caller must call C<guestfs_free_partition_list> after "
11747 #: ../src/guestfs-actions.pod:4609
11748 msgid "guestfs_part_set_bootable"
11752 #: ../src/guestfs-actions.pod:4611
11756 " guestfs_part_set_bootable (guestfs_h *g,\n"
11757 " const char *device,\n"
11759 " int bootable);\n"
11764 #: ../src/guestfs-actions.pod:4617 ../fish/guestfish-actions.pod:3078
11766 "This sets the bootable flag on partition numbered C<partnum> on device "
11767 "C<device>. Note that partitions are numbered from 1."
11771 #: ../src/guestfs-actions.pod:4620 ../fish/guestfish-actions.pod:3081
11773 "The bootable flag is used by some operating systems (notably Windows) to "
11774 "determine which partition to boot from. It is by no means universally "
11779 #: ../src/guestfs-actions.pod:4628
11780 msgid "guestfs_part_set_mbr_id"
11784 #: ../src/guestfs-actions.pod:4630
11788 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
11789 " const char *device,\n"
11796 #: ../src/guestfs-actions.pod:4636 ../fish/guestfish-actions.pod:3089
11798 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
11799 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
11800 "documentation are in fact hexadecimal numbers, but usually documented "
11801 "without any leading \"0x\" which might be confusing."
11805 #: ../src/guestfs-actions.pod:4650
11806 msgid "guestfs_part_set_name"
11810 #: ../src/guestfs-actions.pod:4652
11814 " guestfs_part_set_name (guestfs_h *g,\n"
11815 " const char *device,\n"
11817 " const char *name);\n"
11822 #: ../src/guestfs-actions.pod:4658 ../fish/guestfish-actions.pod:3103
11824 "This sets the partition name on partition numbered C<partnum> on device "
11825 "C<device>. Note that partitions are numbered from 1."
11829 #: ../src/guestfs-actions.pod:4661 ../fish/guestfish-actions.pod:3106
11831 "The partition name can only be set on certain types of partition table. "
11832 "This works on C<gpt> but not on C<mbr> partitions."
11836 #: ../src/guestfs-actions.pod:4668
11837 msgid "guestfs_part_to_dev"
11841 #: ../src/guestfs-actions.pod:4670
11845 " guestfs_part_to_dev (guestfs_h *g,\n"
11846 " const char *partition);\n"
11851 #: ../src/guestfs-actions.pod:4674 ../fish/guestfish-actions.pod:3113
11853 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
11854 "partition number, returning the device name (eg. \"/dev/sdb\")."
11858 #: ../src/guestfs-actions.pod:4678
11860 "The named partition must exist, for example as a string returned from "
11861 "C<guestfs_list_partitions>."
11865 #: ../src/guestfs-actions.pod:4686
11866 msgid "guestfs_ping_daemon"
11870 #: ../src/guestfs-actions.pod:4688
11874 " guestfs_ping_daemon (guestfs_h *g);\n"
11879 #: ../src/guestfs-actions.pod:4691 ../fish/guestfish-actions.pod:3124
11881 "This is a test probe into the guestfs daemon running inside the qemu "
11882 "subprocess. Calling this function checks that the daemon responds to the "
11883 "ping message, without affecting the daemon or attached block device(s) in "
11888 #: ../src/guestfs-actions.pod:4700
11889 msgid "guestfs_pread"
11893 #: ../src/guestfs-actions.pod:4702
11897 " guestfs_pread (guestfs_h *g,\n"
11898 " const char *path,\n"
11900 " int64_t offset,\n"
11901 " size_t *size_r);\n"
11906 #: ../src/guestfs-actions.pod:4709 ../fish/guestfish-actions.pod:3133
11908 "This command lets you read part of a file. It reads C<count> bytes of the "
11909 "file, starting at C<offset>, from file C<path>."
11913 #: ../src/guestfs-actions.pod:4712 ../src/guestfs-actions.pod:4738 ../fish/guestfish-actions.pod:3136 ../fish/guestfish-actions.pod:3151
11915 "This may read fewer bytes than requested. For further details see the "
11916 "L<pread(2)> system call."
11920 #: ../src/guestfs-actions.pod:4715
11921 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
11925 #: ../src/guestfs-actions.pod:4726
11926 msgid "guestfs_pread_device"
11930 #: ../src/guestfs-actions.pod:4728
11934 " guestfs_pread_device (guestfs_h *g,\n"
11935 " const char *device,\n"
11937 " int64_t offset,\n"
11938 " size_t *size_r);\n"
11943 #: ../src/guestfs-actions.pod:4735 ../fish/guestfish-actions.pod:3148
11945 "This command lets you read part of a file. It reads C<count> bytes of "
11946 "C<device>, starting at C<offset>."
11950 #: ../src/guestfs-actions.pod:4741
11951 msgid "See also C<guestfs_pread>."
11955 #: ../src/guestfs-actions.pod:4750
11956 msgid "(Added in 1.5.21)"
11960 #: ../src/guestfs-actions.pod:4752
11961 msgid "guestfs_pvcreate"
11965 #: ../src/guestfs-actions.pod:4754
11969 " guestfs_pvcreate (guestfs_h *g,\n"
11970 " const char *device);\n"
11975 #: ../src/guestfs-actions.pod:4758 ../fish/guestfish-actions.pod:3163
11977 "This creates an LVM physical volume on the named C<device>, where C<device> "
11978 "should usually be a partition name such as C</dev/sda1>."
11982 #: ../src/guestfs-actions.pod:4766
11983 msgid "guestfs_pvremove"
11987 #: ../src/guestfs-actions.pod:4768
11991 " guestfs_pvremove (guestfs_h *g,\n"
11992 " const char *device);\n"
11997 #: ../src/guestfs-actions.pod:4772 ../fish/guestfish-actions.pod:3171
11999 "This wipes a physical volume C<device> so that LVM will no longer recognise "
12004 #: ../src/guestfs-actions.pod:4775 ../fish/guestfish-actions.pod:3174
12006 "The implementation uses the C<pvremove> command which refuses to wipe "
12007 "physical volumes that contain any volume groups, so you have to remove those "
12012 #: ../src/guestfs-actions.pod:4783
12013 msgid "guestfs_pvresize"
12017 #: ../src/guestfs-actions.pod:4785
12021 " guestfs_pvresize (guestfs_h *g,\n"
12022 " const char *device);\n"
12027 #: ../src/guestfs-actions.pod:4789 ../fish/guestfish-actions.pod:3182
12029 "This resizes (expands or shrinks) an existing LVM physical volume to match "
12030 "the new size of the underlying device."
12034 #: ../src/guestfs-actions.pod:4796
12035 msgid "guestfs_pvresize_size"
12039 #: ../src/guestfs-actions.pod:4798
12043 " guestfs_pvresize_size (guestfs_h *g,\n"
12044 " const char *device,\n"
12045 " int64_t size);\n"
12050 #: ../src/guestfs-actions.pod:4803
12052 "This command is the same as C<guestfs_pvresize> except that it allows you to "
12053 "specify the new size (in bytes) explicitly."
12057 #: ../src/guestfs-actions.pod:4810
12058 msgid "guestfs_pvs"
12062 #: ../src/guestfs-actions.pod:4812
12066 " guestfs_pvs (guestfs_h *g);\n"
12071 #: ../src/guestfs-actions.pod:4815 ../fish/guestfish-actions.pod:3196
12073 "List all the physical volumes detected. This is the equivalent of the "
12074 "L<pvs(8)> command."
12078 #: ../src/guestfs-actions.pod:4818 ../fish/guestfish-actions.pod:3199
12080 "This returns a list of just the device names that contain PVs "
12081 "(eg. C</dev/sda2>)."
12085 #: ../src/guestfs-actions.pod:4821
12086 msgid "See also C<guestfs_pvs_full>."
12090 #: ../src/guestfs-actions.pod:4829
12091 msgid "guestfs_pvs_full"
12095 #: ../src/guestfs-actions.pod:4831
12098 " struct guestfs_lvm_pv_list *\n"
12099 " guestfs_pvs_full (guestfs_h *g);\n"
12104 #: ../src/guestfs-actions.pod:4834 ../fish/guestfish-actions.pod:3208
12106 "List all the physical volumes detected. This is the equivalent of the "
12107 "L<pvs(8)> command. The \"full\" version includes all fields."
12111 #: ../src/guestfs-actions.pod:4837
12113 "This function returns a C<struct guestfs_lvm_pv_list *>, or NULL if there "
12114 "was an error. I<The caller must call C<guestfs_free_lvm_pv_list> after "
12119 #: ../src/guestfs-actions.pod:4843
12120 msgid "guestfs_pvuuid"
12124 #: ../src/guestfs-actions.pod:4845
12128 " guestfs_pvuuid (guestfs_h *g,\n"
12129 " const char *device);\n"
12134 #: ../src/guestfs-actions.pod:4849 ../fish/guestfish-actions.pod:3215
12135 msgid "This command returns the UUID of the LVM PV C<device>."
12139 #: ../src/guestfs-actions.pod:4856
12140 msgid "guestfs_pwrite"
12144 #: ../src/guestfs-actions.pod:4858
12148 " guestfs_pwrite (guestfs_h *g,\n"
12149 " const char *path,\n"
12150 " const char *content,\n"
12151 " size_t content_size,\n"
12152 " int64_t offset);\n"
12157 #: ../src/guestfs-actions.pod:4865 ../fish/guestfish-actions.pod:3221
12159 "This command writes to part of a file. It writes the data buffer C<content> "
12160 "to the file C<path> starting at offset C<offset>."
12164 #: ../src/guestfs-actions.pod:4868 ../fish/guestfish-actions.pod:3224
12166 "This command implements the L<pwrite(2)> system call, and like that system "
12167 "call it may not write the full data requested. The return value is the "
12168 "number of bytes that were actually written to the file. This could even be "
12169 "0, although short writes are unlikely for regular files in ordinary "
12174 #: ../src/guestfs-actions.pod:4874
12175 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
12179 #: ../src/guestfs-actions.pod:4883
12180 msgid "guestfs_pwrite_device"
12184 #: ../src/guestfs-actions.pod:4885
12188 " guestfs_pwrite_device (guestfs_h *g,\n"
12189 " const char *device,\n"
12190 " const char *content,\n"
12191 " size_t content_size,\n"
12192 " int64_t offset);\n"
12197 #: ../src/guestfs-actions.pod:4892 ../fish/guestfish-actions.pod:3239
12199 "This command writes to part of a device. It writes the data buffer "
12200 "C<content> to C<device> starting at offset C<offset>."
12204 #: ../src/guestfs-actions.pod:4895 ../fish/guestfish-actions.pod:3242
12206 "This command implements the L<pwrite(2)> system call, and like that system "
12207 "call it may not write the full data requested (although short writes to disk "
12208 "devices and partitions are probably impossible with standard Linux kernels)."
12212 #: ../src/guestfs-actions.pod:4900
12213 msgid "See also C<guestfs_pwrite>."
12217 #: ../src/guestfs-actions.pod:4907
12218 msgid "(Added in 1.5.20)"
12222 #: ../src/guestfs-actions.pod:4909
12223 msgid "guestfs_read_file"
12227 #: ../src/guestfs-actions.pod:4911
12231 " guestfs_read_file (guestfs_h *g,\n"
12232 " const char *path,\n"
12233 " size_t *size_r);\n"
12238 #: ../src/guestfs-actions.pod:4916 ../fish/guestfish-actions.pod:3256
12239 msgid "This calls returns the contents of the file C<path> as a buffer."
12243 #: ../src/guestfs-actions.pod:4919
12245 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
12246 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
12247 "function is limited in the total size of file that can be handled."
12251 #: ../src/guestfs-actions.pod:4931
12252 msgid "(Added in 1.0.63)"
12256 #: ../src/guestfs-actions.pod:4933
12257 msgid "guestfs_read_lines"
12261 #: ../src/guestfs-actions.pod:4935
12265 " guestfs_read_lines (guestfs_h *g,\n"
12266 " const char *path);\n"
12271 #: ../src/guestfs-actions.pod:4941 ../fish/guestfish-actions.pod:3273
12273 "The file contents are returned as a list of lines. Trailing C<LF> and "
12274 "C<CRLF> character sequences are I<not> returned."
12278 #: ../src/guestfs-actions.pod:4944
12280 "Note that this function cannot correctly handle binary files (specifically, "
12281 "files containing C<\\0> character which is treated as end of line). For "
12282 "those you need to use the C<guestfs_read_file> function which has a more "
12283 "complex interface."
12287 #: ../src/guestfs-actions.pod:4955
12288 msgid "guestfs_readdir"
12292 #: ../src/guestfs-actions.pod:4957
12295 " struct guestfs_dirent_list *\n"
12296 " guestfs_readdir (guestfs_h *g,\n"
12297 " const char *dir);\n"
12302 #: ../src/guestfs-actions.pod:4961 ../fish/guestfish-actions.pod:3285
12303 msgid "This returns the list of directory entries in directory C<dir>."
12307 #: ../src/guestfs-actions.pod:4963 ../fish/guestfish-actions.pod:3287
12309 "All entries in the directory are returned, including C<.> and C<..>. The "
12310 "entries are I<not> sorted, but returned in the same order as the underlying "
12315 #: ../src/guestfs-actions.pod:4967 ../fish/guestfish-actions.pod:3291
12317 "Also this call returns basic file type information about each file. The "
12318 "C<ftyp> field will contain one of the following characters:"
12322 #: ../src/guestfs-actions.pod:4972 ../fish/guestfish-actions.pod:3296
12327 #: ../src/guestfs-actions.pod:4974 ../fish/guestfish-actions.pod:3298
12328 msgid "Block special"
12332 #: ../src/guestfs-actions.pod:4976 ../fish/guestfish-actions.pod:3300
12337 #: ../src/guestfs-actions.pod:4978 ../fish/guestfish-actions.pod:3302
12338 msgid "Char special"
12342 #: ../src/guestfs-actions.pod:4980 ../fish/guestfish-actions.pod:3304
12347 #: ../src/guestfs-actions.pod:4982 ../fish/guestfish-actions.pod:3306
12352 #: ../src/guestfs-actions.pod:4984 ../fish/guestfish-actions.pod:3308
12357 #: ../src/guestfs-actions.pod:4986 ../fish/guestfish-actions.pod:3310
12358 msgid "FIFO (named pipe)"
12362 #: ../src/guestfs-actions.pod:4988 ../fish/guestfish-actions.pod:3312
12367 #: ../src/guestfs-actions.pod:4990 ../fish/guestfish-actions.pod:3314
12368 msgid "Symbolic link"
12372 #: ../src/guestfs-actions.pod:4992 ../fish/guestfish-actions.pod:3316
12377 #: ../src/guestfs-actions.pod:4994 ../fish/guestfish-actions.pod:3318
12378 msgid "Regular file"
12382 #: ../src/guestfs-actions.pod:4996 ../fish/guestfish-actions.pod:3320
12387 #: ../src/guestfs-actions.pod:4998 ../fish/guestfish-actions.pod:3322
12392 #: ../src/guestfs-actions.pod:5000 ../fish/guestfish-actions.pod:3324
12397 #: ../src/guestfs-actions.pod:5002 ../fish/guestfish-actions.pod:3326
12398 msgid "Unknown file type"
12402 #: ../src/guestfs-actions.pod:5004 ../fish/guestfish-actions.pod:3328
12407 #: ../src/guestfs-actions.pod:5006 ../fish/guestfish-actions.pod:3330
12408 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
12412 #: ../src/guestfs-actions.pod:5011
12414 "This function is primarily intended for use by programs. To get a simple "
12415 "list of names, use C<guestfs_ls>. To get a printable directory for human "
12416 "consumption, use C<guestfs_ll>."
12420 #: ../src/guestfs-actions.pod:5015
12422 "This function returns a C<struct guestfs_dirent_list *>, or NULL if there "
12423 "was an error. I<The caller must call C<guestfs_free_dirent_list> after "
12428 #: ../src/guestfs-actions.pod:5021
12429 msgid "guestfs_readlink"
12433 #: ../src/guestfs-actions.pod:5023
12437 " guestfs_readlink (guestfs_h *g,\n"
12438 " const char *path);\n"
12443 #: ../src/guestfs-actions.pod:5027 ../fish/guestfish-actions.pod:3343
12444 msgid "This command reads the target of a symbolic link."
12448 #: ../src/guestfs-actions.pod:5034
12449 msgid "guestfs_readlinklist"
12453 #: ../src/guestfs-actions.pod:5036
12457 " guestfs_readlinklist (guestfs_h *g,\n"
12458 " const char *path,\n"
12459 " char *const *names);\n"
12464 #: ../src/guestfs-actions.pod:5041 ../fish/guestfish-actions.pod:3349
12466 "This call allows you to do a C<readlink> operation on multiple files, where "
12467 "all files are in the directory C<path>. C<names> is the list of files from "
12472 #: ../src/guestfs-actions.pod:5045 ../fish/guestfish-actions.pod:3353
12474 "On return you get a list of strings, with a one-to-one correspondence to the "
12475 "C<names> list. Each string is the value of the symbolic link."
12479 #: ../src/guestfs-actions.pod:5049 ../fish/guestfish-actions.pod:3357
12481 "If the C<readlink(2)> operation fails on any name, then the corresponding "
12482 "result string is the empty string C<\"\">. However the whole operation is "
12483 "completed even if there were C<readlink(2)> errors, and so you can call this "
12484 "function with names where you don't know if they are symbolic links already "
12485 "(albeit slightly less efficient)."
12489 #: ../src/guestfs-actions.pod:5056 ../fish/guestfish-actions.pod:3364
12491 "This call is intended for programs that want to efficiently list a directory "
12492 "contents without making many round-trips. Very long directory listings "
12493 "might cause the protocol message size to be exceeded, causing this call to "
12494 "fail. The caller must split up such requests into smaller groups of names."
12498 #: ../src/guestfs-actions.pod:5069
12499 msgid "guestfs_realpath"
12503 #: ../src/guestfs-actions.pod:5071
12507 " guestfs_realpath (guestfs_h *g,\n"
12508 " const char *path);\n"
12513 #: ../src/guestfs-actions.pod:5075 ../fish/guestfish-actions.pod:3375
12515 "Return the canonicalized absolute pathname of C<path>. The returned path "
12516 "has no C<.>, C<..> or symbolic link path elements."
12520 #: ../src/guestfs-actions.pod:5083
12521 msgid "guestfs_removexattr"
12525 #: ../src/guestfs-actions.pod:5085
12529 " guestfs_removexattr (guestfs_h *g,\n"
12530 " const char *xattr,\n"
12531 " const char *path);\n"
12536 #: ../src/guestfs-actions.pod:5090 ../fish/guestfish-actions.pod:3382
12537 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
12541 #: ../src/guestfs-actions.pod:5093
12542 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
12546 #: ../src/guestfs-actions.pod:5099
12547 msgid "guestfs_resize2fs"
12551 #: ../src/guestfs-actions.pod:5101
12555 " guestfs_resize2fs (guestfs_h *g,\n"
12556 " const char *device);\n"
12561 #: ../src/guestfs-actions.pod:5105 ../fish/guestfish-actions.pod:3391
12563 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
12564 "underlying device."
12568 #: ../src/guestfs-actions.pod:5108
12570 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
12571 "C<device> before calling this command. For unknown reasons C<resize2fs> "
12572 "sometimes gives an error about this and sometimes not. In any case, it is "
12573 "always safe to call C<guestfs_e2fsck_f> before calling this function."
12577 #: ../src/guestfs-actions.pod:5118
12578 msgid "guestfs_resize2fs_size"
12582 #: ../src/guestfs-actions.pod:5120
12586 " guestfs_resize2fs_size (guestfs_h *g,\n"
12587 " const char *device,\n"
12588 " int64_t size);\n"
12593 #: ../src/guestfs-actions.pod:5125
12595 "This command is the same as C<guestfs_resize2fs> except that it allows you "
12596 "to specify the new size (in bytes) explicitly."
12600 #: ../src/guestfs-actions.pod:5132
12605 #: ../src/guestfs-actions.pod:5134
12609 " guestfs_rm (guestfs_h *g,\n"
12610 " const char *path);\n"
12615 #: ../src/guestfs-actions.pod:5138 ../fish/guestfish-actions.pod:3411
12616 msgid "Remove the single file C<path>."
12620 #: ../src/guestfs-actions.pod:5144
12621 msgid "guestfs_rm_rf"
12625 #: ../src/guestfs-actions.pod:5146
12629 " guestfs_rm_rf (guestfs_h *g,\n"
12630 " const char *path);\n"
12635 #: ../src/guestfs-actions.pod:5150 ../fish/guestfish-actions.pod:3417
12637 "Remove the file or directory C<path>, recursively removing the contents if "
12638 "its a directory. This is like the C<rm -rf> shell command."
12642 #: ../src/guestfs-actions.pod:5158
12643 msgid "guestfs_rmdir"
12647 #: ../src/guestfs-actions.pod:5160
12651 " guestfs_rmdir (guestfs_h *g,\n"
12652 " const char *path);\n"
12657 #: ../src/guestfs-actions.pod:5164 ../fish/guestfish-actions.pod:3425
12658 msgid "Remove the single directory C<path>."
12662 #: ../src/guestfs-actions.pod:5170
12663 msgid "guestfs_rmmountpoint"
12667 #: ../src/guestfs-actions.pod:5172
12671 " guestfs_rmmountpoint (guestfs_h *g,\n"
12672 " const char *exemptpath);\n"
12677 #: ../src/guestfs-actions.pod:5176
12679 "This calls removes a mountpoint that was previously created with "
12680 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
12684 #: ../src/guestfs-actions.pod:5184
12685 msgid "guestfs_scrub_device"
12689 #: ../src/guestfs-actions.pod:5186
12693 " guestfs_scrub_device (guestfs_h *g,\n"
12694 " const char *device);\n"
12699 #: ../src/guestfs-actions.pod:5190 ../fish/guestfish-actions.pod:3439
12701 "This command writes patterns over C<device> to make data retrieval more "
12706 #: ../src/guestfs-actions.pod:5193 ../src/guestfs-actions.pod:5214 ../src/guestfs-actions.pod:5233 ../fish/guestfish-actions.pod:3442 ../fish/guestfish-actions.pod:3457 ../fish/guestfish-actions.pod:3470
12708 "It is an interface to the L<scrub(1)> program. See that manual page for "
12713 #: ../src/guestfs-actions.pod:5201 ../src/guestfs-actions.pod:5219 ../src/guestfs-actions.pod:5238
12714 msgid "(Added in 1.0.52)"
12718 #: ../src/guestfs-actions.pod:5203
12719 msgid "guestfs_scrub_file"
12723 #: ../src/guestfs-actions.pod:5205
12727 " guestfs_scrub_file (guestfs_h *g,\n"
12728 " const char *file);\n"
12733 #: ../src/guestfs-actions.pod:5209 ../fish/guestfish-actions.pod:3452
12735 "This command writes patterns over a file to make data retrieval more "
12740 #: ../src/guestfs-actions.pod:5212 ../fish/guestfish-actions.pod:3455
12741 msgid "The file is I<removed> after scrubbing."
12745 #: ../src/guestfs-actions.pod:5221
12746 msgid "guestfs_scrub_freespace"
12750 #: ../src/guestfs-actions.pod:5223
12754 " guestfs_scrub_freespace (guestfs_h *g,\n"
12755 " const char *dir);\n"
12760 #: ../src/guestfs-actions.pod:5227
12762 "This command creates the directory C<dir> and then fills it with files until "
12763 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
12764 "and deletes them. The intention is to scrub any free space on the partition "
12765 "containing C<dir>."
12769 #: ../src/guestfs-actions.pod:5240
12770 msgid "guestfs_set_append"
12774 #: ../src/guestfs-actions.pod:5242
12778 " guestfs_set_append (guestfs_h *g,\n"
12779 " const char *append);\n"
12784 #: ../src/guestfs-actions.pod:5246 ../fish/guestfish-actions.pod:3479
12786 "This function is used to add additional options to the guest kernel command "
12791 #: ../src/guestfs-actions.pod:5249 ../fish/guestfish-actions.pod:3482
12793 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
12794 "environment variable."
12798 #: ../src/guestfs-actions.pod:5252 ../fish/guestfish-actions.pod:3485
12800 "Setting C<append> to C<NULL> means I<no> additional options are passed "
12801 "(libguestfs always adds a few of its own)."
12805 #: ../src/guestfs-actions.pod:5259
12806 msgid "guestfs_set_autosync"
12810 #: ../src/guestfs-actions.pod:5261
12814 " guestfs_set_autosync (guestfs_h *g,\n"
12815 " int autosync);\n"
12820 #: ../src/guestfs-actions.pod:5265
12822 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
12823 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
12824 "the handle is closed (also if the program exits without closing handles)."
12828 #: ../src/guestfs-actions.pod:5270 ../fish/guestfish-actions.pod:3499
12830 "This is enabled by default (since libguestfs 1.5.24, previously it was "
12831 "disabled by default)."
12835 #: ../src/guestfs-actions.pod:5277
12836 msgid "guestfs_set_direct"
12840 #: ../src/guestfs-actions.pod:5279
12844 " guestfs_set_direct (guestfs_h *g,\n"
12850 #: ../src/guestfs-actions.pod:5283 ../fish/guestfish-actions.pod:3508
12852 "If the direct appliance mode flag is enabled, then stdin and stdout are "
12853 "passed directly through to the appliance once it is launched."
12857 #: ../src/guestfs-actions.pod:5287
12859 "One consequence of this is that log messages aren't caught by the library "
12860 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
12865 #: ../src/guestfs-actions.pod:5291 ../fish/guestfish-actions.pod:3516
12866 msgid "You probably don't want to use this unless you know what you are doing."
12870 #: ../src/guestfs-actions.pod:5294 ../fish/guestfish-actions.pod:3519
12871 msgid "The default is disabled."
12875 #: ../src/guestfs-actions.pod:5300
12876 msgid "guestfs_set_e2label"
12880 #: ../src/guestfs-actions.pod:5302
12884 " guestfs_set_e2label (guestfs_h *g,\n"
12885 " const char *device,\n"
12886 " const char *label);\n"
12891 #: ../src/guestfs-actions.pod:5307 ../fish/guestfish-actions.pod:3525
12893 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
12894 "C<label>. Filesystem labels are limited to 16 characters."
12898 #: ../src/guestfs-actions.pod:5311
12900 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
12901 "the existing label on a filesystem."
12905 #: ../src/guestfs-actions.pod:5318
12906 msgid "guestfs_set_e2uuid"
12910 #: ../src/guestfs-actions.pod:5320
12914 " guestfs_set_e2uuid (guestfs_h *g,\n"
12915 " const char *device,\n"
12916 " const char *uuid);\n"
12921 #: ../src/guestfs-actions.pod:5325 ../fish/guestfish-actions.pod:3536
12923 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
12924 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
12925 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
12929 #: ../src/guestfs-actions.pod:5330
12931 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
12932 "the existing UUID of a filesystem."
12936 #: ../src/guestfs-actions.pod:5337
12937 msgid "guestfs_set_memsize"
12941 #: ../src/guestfs-actions.pod:5339
12945 " guestfs_set_memsize (guestfs_h *g,\n"
12951 #: ../src/guestfs-actions.pod:5343
12953 "This sets the memory size in megabytes allocated to the qemu subprocess. "
12954 "This only has any effect if called before C<guestfs_launch>."
12958 #: ../src/guestfs-actions.pod:5347 ../fish/guestfish-actions.pod:3554
12960 "You can also change this by setting the environment variable "
12961 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
12965 #: ../src/guestfs-actions.pod:5358
12966 msgid "guestfs_set_network"
12970 #: ../src/guestfs-actions.pod:5360
12974 " guestfs_set_network (guestfs_h *g,\n"
12980 #: ../src/guestfs-actions.pod:5364 ../fish/guestfish-actions.pod:3567
12982 "If C<network> is true, then the network is enabled in the libguestfs "
12983 "appliance. The default is false."
12987 #: ../src/guestfs-actions.pod:5367 ../fish/guestfish-actions.pod:3570
12989 "This affects whether commands are able to access the network (see "
12990 "L<guestfs(3)/RUNNING COMMANDS>)."
12994 #: ../src/guestfs-actions.pod:5370
12996 "You must call this before calling C<guestfs_launch>, otherwise it has no "
13001 #: ../src/guestfs-actions.pod:5377
13002 msgid "guestfs_set_path"
13006 #: ../src/guestfs-actions.pod:5379
13010 " guestfs_set_path (guestfs_h *g,\n"
13011 " const char *searchpath);\n"
13016 #: ../src/guestfs-actions.pod:5383 ../fish/guestfish-actions.pod:3582
13017 msgid "Set the path that libguestfs searches for kernel and initrd.img."
13021 #: ../src/guestfs-actions.pod:5385 ../fish/guestfish-actions.pod:3584
13023 "The default is C<$libdir/guestfs> unless overridden by setting "
13024 "C<LIBGUESTFS_PATH> environment variable."
13028 #: ../src/guestfs-actions.pod:5388 ../fish/guestfish-actions.pod:3587
13029 msgid "Setting C<path> to C<NULL> restores the default path."
13033 #: ../src/guestfs-actions.pod:5394
13034 msgid "guestfs_set_qemu"
13038 #: ../src/guestfs-actions.pod:5396
13042 " guestfs_set_qemu (guestfs_h *g,\n"
13043 " const char *qemu);\n"
13048 #: ../src/guestfs-actions.pod:5400 ../fish/guestfish-actions.pod:3595
13049 msgid "Set the qemu binary that we will use."
13053 #: ../src/guestfs-actions.pod:5402 ../fish/guestfish-actions.pod:3597
13054 msgid "The default is chosen when the library was compiled by the configure script."
13058 #: ../src/guestfs-actions.pod:5405 ../fish/guestfish-actions.pod:3600
13060 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
13065 #: ../src/guestfs-actions.pod:5408 ../fish/guestfish-actions.pod:3603
13066 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
13070 #: ../src/guestfs-actions.pod:5410 ../fish/guestfish-actions.pod:3605
13072 "Note that you should call this function as early as possible after creating "
13073 "the handle. This is because some pre-launch operations depend on testing "
13074 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
13075 "don't retest features, and so you might see inconsistent results. Using the "
13076 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
13077 "the qemu binary at the same time as the handle is created."
13081 #: ../src/guestfs-actions.pod:5422
13082 msgid "guestfs_set_recovery_proc"
13086 #: ../src/guestfs-actions.pod:5424
13090 " guestfs_set_recovery_proc (guestfs_h *g,\n"
13091 " int recoveryproc);\n"
13096 #: ../src/guestfs-actions.pod:5428
13098 "If this is called with the parameter C<false> then C<guestfs_launch> does "
13099 "not create a recovery process. The purpose of the recovery process is to "
13100 "stop runaway qemu processes in the case where the main program aborts "
13105 #: ../src/guestfs-actions.pod:5433
13107 "This only has any effect if called before C<guestfs_launch>, and the default "
13112 #: ../src/guestfs-actions.pod:5436 ../fish/guestfish-actions.pod:3627
13114 "About the only time when you would want to disable this is if the main "
13115 "process will fork itself into the background (\"daemonize\" itself). In "
13116 "this case the recovery process thinks that the main program has disappeared "
13117 "and so kills qemu, which is not very helpful."
13121 #: ../src/guestfs-actions.pod:5446
13122 msgid "guestfs_set_selinux"
13126 #: ../src/guestfs-actions.pod:5448
13130 " guestfs_set_selinux (guestfs_h *g,\n"
13136 #: ../src/guestfs-actions.pod:5452 ../fish/guestfish-actions.pod:3639
13138 "This sets the selinux flag that is passed to the appliance at boot time. "
13139 "The default is C<selinux=0> (disabled)."
13143 #: ../src/guestfs-actions.pod:5455 ../fish/guestfish-actions.pod:3642
13145 "Note that if SELinux is enabled, it is always in Permissive mode "
13146 "(C<enforcing=0>)."
13150 #: ../src/guestfs-actions.pod:5465
13151 msgid "guestfs_set_trace"
13155 #: ../src/guestfs-actions.pod:5467
13159 " guestfs_set_trace (guestfs_h *g,\n"
13165 #: ../src/guestfs-actions.pod:5471 ../fish/guestfish-actions.pod:3654
13167 "If the command trace flag is set to 1, then commands are printed on stderr "
13168 "before they are executed in a format which is very similar to the one used "
13169 "by guestfish. In other words, you can run a program with this enabled, and "
13170 "you will get out a script which you can feed to guestfish to perform the "
13171 "same set of actions."
13175 #: ../src/guestfs-actions.pod:5478 ../fish/guestfish-actions.pod:3661
13177 "If you want to trace C API calls into libguestfs (and other libraries) then "
13178 "possibly a better way is to use the external ltrace(1) command."
13182 #: ../src/guestfs-actions.pod:5482 ../fish/guestfish-actions.pod:3665
13184 "Command traces are disabled unless the environment variable "
13185 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
13189 #: ../src/guestfs-actions.pod:5489
13190 msgid "guestfs_set_verbose"
13194 #: ../src/guestfs-actions.pod:5491
13198 " guestfs_set_verbose (guestfs_h *g,\n"
13204 #: ../src/guestfs-actions.pod:5495 ../fish/guestfish-actions.pod:3674
13205 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
13209 #: ../src/guestfs-actions.pod:5497 ../fish/guestfish-actions.pod:3676
13211 "Verbose messages are disabled unless the environment variable "
13212 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
13216 #: ../src/guestfs-actions.pod:5504
13217 msgid "guestfs_setcon"
13221 #: ../src/guestfs-actions.pod:5506
13225 " guestfs_setcon (guestfs_h *g,\n"
13226 " const char *context);\n"
13231 #: ../src/guestfs-actions.pod:5510 ../fish/guestfish-actions.pod:3683
13233 "This sets the SELinux security context of the daemon to the string "
13238 #: ../src/guestfs-actions.pod:5513 ../fish/guestfish-actions.pod:3686
13239 msgid "See the documentation about SELINUX in L<guestfs(3)>."
13243 #: ../src/guestfs-actions.pod:5519
13244 msgid "guestfs_setxattr"
13248 #: ../src/guestfs-actions.pod:5521
13252 " guestfs_setxattr (guestfs_h *g,\n"
13253 " const char *xattr,\n"
13254 " const char *val,\n"
13256 " const char *path);\n"
13261 #: ../src/guestfs-actions.pod:5528 ../fish/guestfish-actions.pod:3692
13263 "This call sets the extended attribute named C<xattr> of the file C<path> to "
13264 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
13268 #: ../src/guestfs-actions.pod:5532
13269 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
13273 #: ../src/guestfs-actions.pod:5538
13274 msgid "guestfs_sfdisk"
13278 #: ../src/guestfs-actions.pod:5540
13282 " guestfs_sfdisk (guestfs_h *g,\n"
13283 " const char *device,\n"
13287 " char *const *lines);\n"
13292 #: ../src/guestfs-actions.pod:5548 ../fish/guestfish-actions.pod:3702
13294 "This is a direct interface to the L<sfdisk(8)> program for creating "
13295 "partitions on block devices."
13299 #: ../src/guestfs-actions.pod:5551 ../fish/guestfish-actions.pod:3705
13300 msgid "C<device> should be a block device, for example C</dev/sda>."
13304 #: ../src/guestfs-actions.pod:5553 ../fish/guestfish-actions.pod:3707
13306 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
13307 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
13308 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
13309 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
13310 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
13311 "the kernel) cannot work out the right geometry and you will need to tell it."
13315 #: ../src/guestfs-actions.pod:5561 ../fish/guestfish-actions.pod:3715
13317 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
13318 "refer to the L<sfdisk(8)> manpage."
13322 #: ../src/guestfs-actions.pod:5564 ../fish/guestfish-actions.pod:3718
13324 "To create a single partition occupying the whole disk, you would pass "
13325 "C<lines> as a single element list, when the single element being the string "
13330 #: ../src/guestfs-actions.pod:5568
13331 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
13335 #: ../src/guestfs-actions.pod:5578
13336 msgid "guestfs_sfdiskM"
13340 #: ../src/guestfs-actions.pod:5580
13344 " guestfs_sfdiskM (guestfs_h *g,\n"
13345 " const char *device,\n"
13346 " char *const *lines);\n"
13351 #: ../src/guestfs-actions.pod:5585
13353 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
13354 "partition sizes are specified in megabytes only (rounded to the nearest "
13355 "cylinder) and you don't need to specify the cyls, heads and sectors "
13356 "parameters which were rarely if ever used anyway."
13360 #: ../src/guestfs-actions.pod:5591
13362 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
13363 "C<guestfs_part_disk>"
13367 #: ../src/guestfs-actions.pod:5601
13368 msgid "guestfs_sfdisk_N"
13372 #: ../src/guestfs-actions.pod:5603
13376 " guestfs_sfdisk_N (guestfs_h *g,\n"
13377 " const char *device,\n"
13382 " const char *line);\n"
13387 #: ../src/guestfs-actions.pod:5612 ../fish/guestfish-actions.pod:3748
13389 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
13390 "(note: C<n> counts from 1)."
13394 #: ../src/guestfs-actions.pod:5615
13396 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
13397 "for the cyls/heads/sectors parameters."
13401 #: ../src/guestfs-actions.pod:5618
13402 msgid "See also: C<guestfs_part_add>"
13406 #: ../src/guestfs-actions.pod:5627
13407 msgid "guestfs_sfdisk_disk_geometry"
13411 #: ../src/guestfs-actions.pod:5629
13415 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
13416 " const char *device);\n"
13421 #: ../src/guestfs-actions.pod:5633
13423 "This displays the disk geometry of C<device> read from the partition table. "
13424 "Especially in the case where the underlying block device has been resized, "
13425 "this can be different from the kernel's idea of the geometry (see "
13426 "C<guestfs_sfdisk_kernel_geometry>)."
13430 #: ../src/guestfs-actions.pod:5638 ../src/guestfs-actions.pod:5654 ../fish/guestfish-actions.pod:3768 ../fish/guestfish-actions.pod:3777
13431 msgid "The result is in human-readable format, and not designed to be parsed."
13435 #: ../src/guestfs-actions.pod:5646
13436 msgid "guestfs_sfdisk_kernel_geometry"
13440 #: ../src/guestfs-actions.pod:5648
13444 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
13445 " const char *device);\n"
13450 #: ../src/guestfs-actions.pod:5652 ../fish/guestfish-actions.pod:3775
13451 msgid "This displays the kernel's idea of the geometry of C<device>."
13455 #: ../src/guestfs-actions.pod:5662
13456 msgid "guestfs_sfdisk_l"
13460 #: ../src/guestfs-actions.pod:5664
13464 " guestfs_sfdisk_l (guestfs_h *g,\n"
13465 " const char *device);\n"
13470 #: ../src/guestfs-actions.pod:5668 ../fish/guestfish-actions.pod:3784
13472 "This displays the partition table on C<device>, in the human-readable output "
13473 "of the L<sfdisk(8)> command. It is not intended to be parsed."
13477 #: ../src/guestfs-actions.pod:5672
13478 msgid "See also: C<guestfs_part_list>"
13482 #: ../src/guestfs-actions.pod:5679
13487 #: ../src/guestfs-actions.pod:5681
13491 " guestfs_sh (guestfs_h *g,\n"
13492 " const char *command);\n"
13497 #: ../src/guestfs-actions.pod:5685 ../fish/guestfish-actions.pod:3794
13499 "This call runs a command from the guest filesystem via the guest's "
13504 #: ../src/guestfs-actions.pod:5688
13505 msgid "This is like C<guestfs_command>, but passes the command to:"
13509 #: ../src/guestfs-actions.pod:5690 ../fish/guestfish-actions.pod:3799
13512 " /bin/sh -c \"command\"\n"
13517 #: ../src/guestfs-actions.pod:5692 ../fish/guestfish-actions.pod:3801
13519 "Depending on the guest's shell, this usually results in wildcards being "
13520 "expanded, shell expressions being interpolated and so on."
13524 #: ../src/guestfs-actions.pod:5696
13525 msgid "All the provisos about C<guestfs_command> apply to this call."
13529 #: ../src/guestfs-actions.pod:5703
13530 msgid "guestfs_sh_lines"
13534 #: ../src/guestfs-actions.pod:5705
13538 " guestfs_sh_lines (guestfs_h *g,\n"
13539 " const char *command);\n"
13544 #: ../src/guestfs-actions.pod:5709
13546 "This is the same as C<guestfs_sh>, but splits the result into a list of "
13551 #: ../src/guestfs-actions.pod:5712
13552 msgid "See also: C<guestfs_command_lines>"
13556 #: ../src/guestfs-actions.pod:5720
13557 msgid "guestfs_sleep"
13561 #: ../src/guestfs-actions.pod:5722
13565 " guestfs_sleep (guestfs_h *g,\n"
13571 #: ../src/guestfs-actions.pod:5726 ../fish/guestfish-actions.pod:3820
13572 msgid "Sleep for C<secs> seconds."
13576 #: ../src/guestfs-actions.pod:5730
13577 msgid "(Added in 1.0.41)"
13581 #: ../src/guestfs-actions.pod:5732 ../src/guestfs-structs.pod:109
13582 msgid "guestfs_stat"
13586 #: ../src/guestfs-actions.pod:5734
13589 " struct guestfs_stat *\n"
13590 " guestfs_stat (guestfs_h *g,\n"
13591 " const char *path);\n"
13596 #: ../src/guestfs-actions.pod:5740 ../fish/guestfish-actions.pod:3828
13597 msgid "This is the same as the C<stat(2)> system call."
13601 #: ../src/guestfs-actions.pod:5748 ../src/guestfs-structs.pod:135
13602 msgid "guestfs_statvfs"
13606 #: ../src/guestfs-actions.pod:5750
13609 " struct guestfs_statvfs *\n"
13610 " guestfs_statvfs (guestfs_h *g,\n"
13611 " const char *path);\n"
13616 #: ../src/guestfs-actions.pod:5754 ../fish/guestfish-actions.pod:3834
13618 "Returns file system statistics for any mounted file system. C<path> should "
13619 "be a file or directory in the mounted file system (typically it is the mount "
13620 "point itself, but it doesn't need to be)."
13624 #: ../src/guestfs-actions.pod:5758 ../fish/guestfish-actions.pod:3838
13625 msgid "This is the same as the C<statvfs(2)> system call."
13629 #: ../src/guestfs-actions.pod:5760
13631 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
13632 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
13636 #: ../src/guestfs-actions.pod:5766
13637 msgid "guestfs_strings"
13641 #: ../src/guestfs-actions.pod:5768
13645 " guestfs_strings (guestfs_h *g,\n"
13646 " const char *path);\n"
13651 #: ../src/guestfs-actions.pod:5772 ../fish/guestfish-actions.pod:3844
13653 "This runs the L<strings(1)> command on a file and returns the list of "
13654 "printable strings found."
13658 #: ../src/guestfs-actions.pod:5784
13659 msgid "guestfs_strings_e"
13663 #: ../src/guestfs-actions.pod:5786
13667 " guestfs_strings_e (guestfs_h *g,\n"
13668 " const char *encoding,\n"
13669 " const char *path);\n"
13674 #: ../src/guestfs-actions.pod:5791
13676 "This is like the C<guestfs_strings> command, but allows you to specify the "
13677 "encoding of strings that are looked for in the source file C<path>."
13681 #: ../src/guestfs-actions.pod:5795 ../fish/guestfish-actions.pod:3858
13682 msgid "Allowed encodings are:"
13686 #: ../src/guestfs-actions.pod:5799 ../fish/guestfish-actions.pod:3862
13691 #: ../src/guestfs-actions.pod:5801
13693 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
13694 "ISO-8859-X (this is what C<guestfs_strings> uses)."
13698 #: ../src/guestfs-actions.pod:5804 ../fish/guestfish-actions.pod:3867
13703 #: ../src/guestfs-actions.pod:5806 ../fish/guestfish-actions.pod:3869
13704 msgid "Single 8-bit-byte characters."
13708 #: ../src/guestfs-actions.pod:5808 ../fish/guestfish-actions.pod:3871
13713 #: ../src/guestfs-actions.pod:5810 ../fish/guestfish-actions.pod:3873
13714 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
13718 #: ../src/guestfs-actions.pod:5813 ../fish/guestfish-actions.pod:3876
13719 msgid "l (lower case letter L)"
13723 #: ../src/guestfs-actions.pod:5815 ../fish/guestfish-actions.pod:3878
13725 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
13726 "examining binaries in Windows guests."
13730 #: ../src/guestfs-actions.pod:5818 ../fish/guestfish-actions.pod:3881
13735 #: ../src/guestfs-actions.pod:5820 ../fish/guestfish-actions.pod:3883
13736 msgid "32-bit big endian such as UCS-4BE."
13740 #: ../src/guestfs-actions.pod:5822 ../fish/guestfish-actions.pod:3885
13745 #: ../src/guestfs-actions.pod:5824 ../fish/guestfish-actions.pod:3887
13746 msgid "32-bit little endian such as UCS-4LE."
13750 #: ../src/guestfs-actions.pod:5828 ../fish/guestfish-actions.pod:3891
13751 msgid "The returned strings are transcoded to UTF-8."
13755 #: ../src/guestfs-actions.pod:5839
13756 msgid "guestfs_swapoff_device"
13760 #: ../src/guestfs-actions.pod:5841
13764 " guestfs_swapoff_device (guestfs_h *g,\n"
13765 " const char *device);\n"
13770 #: ../src/guestfs-actions.pod:5845
13772 "This command disables the libguestfs appliance swap device or partition "
13773 "named C<device>. See C<guestfs_swapon_device>."
13777 #: ../src/guestfs-actions.pod:5853
13778 msgid "guestfs_swapoff_file"
13782 #: ../src/guestfs-actions.pod:5855
13786 " guestfs_swapoff_file (guestfs_h *g,\n"
13787 " const char *file);\n"
13792 #: ../src/guestfs-actions.pod:5859 ../fish/guestfish-actions.pod:3908
13793 msgid "This command disables the libguestfs appliance swap on file."
13797 #: ../src/guestfs-actions.pod:5865
13798 msgid "guestfs_swapoff_label"
13802 #: ../src/guestfs-actions.pod:5867
13806 " guestfs_swapoff_label (guestfs_h *g,\n"
13807 " const char *label);\n"
13812 #: ../src/guestfs-actions.pod:5871 ../fish/guestfish-actions.pod:3914
13814 "This command disables the libguestfs appliance swap on labeled swap "
13819 #: ../src/guestfs-actions.pod:5878
13820 msgid "guestfs_swapoff_uuid"
13824 #: ../src/guestfs-actions.pod:5880
13828 " guestfs_swapoff_uuid (guestfs_h *g,\n"
13829 " const char *uuid);\n"
13834 #: ../src/guestfs-actions.pod:5884 ../fish/guestfish-actions.pod:3921
13836 "This command disables the libguestfs appliance swap partition with the given "
13841 #: ../src/guestfs-actions.pod:5891
13842 msgid "guestfs_swapon_device"
13846 #: ../src/guestfs-actions.pod:5893
13850 " guestfs_swapon_device (guestfs_h *g,\n"
13851 " const char *device);\n"
13856 #: ../src/guestfs-actions.pod:5897
13858 "This command enables the libguestfs appliance to use the swap device or "
13859 "partition named C<device>. The increased memory is made available for all "
13860 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
13864 #: ../src/guestfs-actions.pod:5902 ../fish/guestfish-actions.pod:3933
13866 "Note that you should not swap to existing guest swap partitions unless you "
13867 "know what you are doing. They may contain hibernation information, or other "
13868 "information that the guest doesn't want you to trash. You also risk leaking "
13869 "information about the host to the guest this way. Instead, attach a new "
13870 "host device to the guest and swap on that."
13874 #: ../src/guestfs-actions.pod:5913
13875 msgid "guestfs_swapon_file"
13879 #: ../src/guestfs-actions.pod:5915
13883 " guestfs_swapon_file (guestfs_h *g,\n"
13884 " const char *file);\n"
13889 #: ../src/guestfs-actions.pod:5919
13891 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
13896 #: ../src/guestfs-actions.pod:5926
13897 msgid "guestfs_swapon_label"
13901 #: ../src/guestfs-actions.pod:5928
13905 " guestfs_swapon_label (guestfs_h *g,\n"
13906 " const char *label);\n"
13911 #: ../src/guestfs-actions.pod:5932
13913 "This command enables swap to a labeled swap partition. See "
13914 "C<guestfs_swapon_device> for other notes."
13918 #: ../src/guestfs-actions.pod:5939
13919 msgid "guestfs_swapon_uuid"
13923 #: ../src/guestfs-actions.pod:5941
13927 " guestfs_swapon_uuid (guestfs_h *g,\n"
13928 " const char *uuid);\n"
13933 #: ../src/guestfs-actions.pod:5945
13935 "This command enables swap to a swap partition with the given UUID. See "
13936 "C<guestfs_swapon_device> for other notes."
13940 #: ../src/guestfs-actions.pod:5952
13941 msgid "guestfs_sync"
13945 #: ../src/guestfs-actions.pod:5954
13949 " guestfs_sync (guestfs_h *g);\n"
13954 #: ../src/guestfs-actions.pod:5957 ../fish/guestfish-actions.pod:3965
13956 "This syncs the disk, so that any writes are flushed through to the "
13957 "underlying disk image."
13961 #: ../src/guestfs-actions.pod:5960 ../fish/guestfish-actions.pod:3968
13963 "You should always call this if you have modified a disk image, before "
13964 "closing the handle."
13968 #: ../src/guestfs-actions.pod:5967
13969 msgid "guestfs_tail"
13973 #: ../src/guestfs-actions.pod:5969
13977 " guestfs_tail (guestfs_h *g,\n"
13978 " const char *path);\n"
13983 #: ../src/guestfs-actions.pod:5973 ../fish/guestfish-actions.pod:3975
13984 msgid "This command returns up to the last 10 lines of a file as a list of strings."
13988 #: ../src/guestfs-actions.pod:5985
13989 msgid "guestfs_tail_n"
13993 #: ../src/guestfs-actions.pod:5987
13997 " guestfs_tail_n (guestfs_h *g,\n"
13999 " const char *path);\n"
14004 #: ../src/guestfs-actions.pod:5992 ../fish/guestfish-actions.pod:3985
14006 "If the parameter C<nrlines> is a positive number, this returns the last "
14007 "C<nrlines> lines of the file C<path>."
14011 #: ../src/guestfs-actions.pod:5995 ../fish/guestfish-actions.pod:3988
14013 "If the parameter C<nrlines> is a negative number, this returns lines from "
14014 "the file C<path>, starting with the C<-nrlines>th line."
14018 #: ../src/guestfs-actions.pod:6009
14019 msgid "guestfs_tar_in"
14023 #: ../src/guestfs-actions.pod:6011
14027 " guestfs_tar_in (guestfs_h *g,\n"
14028 " const char *tarfile,\n"
14029 " const char *directory);\n"
14034 #: ../src/guestfs-actions.pod:6016 ../fish/guestfish-actions.pod:4000
14036 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
14037 "tar file) into C<directory>."
14041 #: ../src/guestfs-actions.pod:6019
14042 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
14046 #: ../src/guestfs-actions.pod:6024 ../src/guestfs-actions.pod:6041 ../src/guestfs-actions.pod:6057 ../src/guestfs-actions.pod:6073
14047 msgid "(Added in 1.0.3)"
14051 #: ../src/guestfs-actions.pod:6026
14052 msgid "guestfs_tar_out"
14056 #: ../src/guestfs-actions.pod:6028
14060 " guestfs_tar_out (guestfs_h *g,\n"
14061 " const char *directory,\n"
14062 " const char *tarfile);\n"
14067 #: ../src/guestfs-actions.pod:6033 ../fish/guestfish-actions.pod:4012
14069 "This command packs the contents of C<directory> and downloads it to local "
14074 #: ../src/guestfs-actions.pod:6036
14076 "To download a compressed tarball, use C<guestfs_tgz_out> or "
14077 "C<guestfs_txz_out>."
14081 #: ../src/guestfs-actions.pod:6043
14082 msgid "guestfs_tgz_in"
14086 #: ../src/guestfs-actions.pod:6045
14090 " guestfs_tgz_in (guestfs_h *g,\n"
14091 " const char *tarball,\n"
14092 " const char *directory);\n"
14097 #: ../src/guestfs-actions.pod:6050 ../fish/guestfish-actions.pod:4024
14099 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
14100 "tar file) into C<directory>."
14104 #: ../src/guestfs-actions.pod:6053
14105 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
14109 #: ../src/guestfs-actions.pod:6059
14110 msgid "guestfs_tgz_out"
14114 #: ../src/guestfs-actions.pod:6061
14118 " guestfs_tgz_out (guestfs_h *g,\n"
14119 " const char *directory,\n"
14120 " const char *tarball);\n"
14125 #: ../src/guestfs-actions.pod:6066 ../fish/guestfish-actions.pod:4035
14127 "This command packs the contents of C<directory> and downloads it to local "
14132 #: ../src/guestfs-actions.pod:6069
14133 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
14137 #: ../src/guestfs-actions.pod:6075
14138 msgid "guestfs_touch"
14142 #: ../src/guestfs-actions.pod:6077
14146 " guestfs_touch (guestfs_h *g,\n"
14147 " const char *path);\n"
14152 #: ../src/guestfs-actions.pod:6081 ../fish/guestfish-actions.pod:4046
14154 "Touch acts like the L<touch(1)> command. It can be used to update the "
14155 "timestamps on a file, or, if the file does not exist, to create a new "
14156 "zero-length file."
14160 #: ../src/guestfs-actions.pod:6085 ../fish/guestfish-actions.pod:4050
14162 "This command only works on regular files, and will fail on other file types "
14163 "such as directories, symbolic links, block special etc."
14167 #: ../src/guestfs-actions.pod:6092
14168 msgid "guestfs_truncate"
14172 #: ../src/guestfs-actions.pod:6094
14176 " guestfs_truncate (guestfs_h *g,\n"
14177 " const char *path);\n"
14182 #: ../src/guestfs-actions.pod:6098 ../fish/guestfish-actions.pod:4057
14184 "This command truncates C<path> to a zero-length file. The file must exist "
14189 #: ../src/guestfs-actions.pod:6105
14190 msgid "guestfs_truncate_size"
14194 #: ../src/guestfs-actions.pod:6107
14198 " guestfs_truncate_size (guestfs_h *g,\n"
14199 " const char *path,\n"
14200 " int64_t size);\n"
14205 #: ../src/guestfs-actions.pod:6112 ../fish/guestfish-actions.pod:4064
14207 "This command truncates C<path> to size C<size> bytes. The file must exist "
14212 #: ../src/guestfs-actions.pod:6115
14214 "If the current file size is less than C<size> then the file is extended to "
14215 "the required size with zero bytes. This creates a sparse file (ie. disk "
14216 "blocks are not allocated for the file until you write to it). To create a "
14217 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
14221 #: ../src/guestfs-actions.pod:6125
14222 msgid "guestfs_tune2fs_l"
14226 #: ../src/guestfs-actions.pod:6127
14230 " guestfs_tune2fs_l (guestfs_h *g,\n"
14231 " const char *device);\n"
14236 #: ../src/guestfs-actions.pod:6131 ../fish/guestfish-actions.pod:4077
14238 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
14243 #: ../src/guestfs-actions.pod:6134 ../fish/guestfish-actions.pod:4080
14245 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
14246 "for more details. The list of fields returned isn't clearly defined, and "
14247 "depends on both the version of C<tune2fs> that libguestfs was built against, "
14248 "and the filesystem itself."
14252 #: ../src/guestfs-actions.pod:6147
14253 msgid "guestfs_txz_in"
14257 #: ../src/guestfs-actions.pod:6149
14261 " guestfs_txz_in (guestfs_h *g,\n"
14262 " const char *tarball,\n"
14263 " const char *directory);\n"
14268 #: ../src/guestfs-actions.pod:6154 ../fish/guestfish-actions.pod:4089
14270 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
14271 "tar file) into C<directory>."
14275 #: ../src/guestfs-actions.pod:6161
14276 msgid "guestfs_txz_out"
14280 #: ../src/guestfs-actions.pod:6163
14284 " guestfs_txz_out (guestfs_h *g,\n"
14285 " const char *directory,\n"
14286 " const char *tarball);\n"
14291 #: ../src/guestfs-actions.pod:6168 ../fish/guestfish-actions.pod:4098
14293 "This command packs the contents of C<directory> and downloads it to local "
14294 "file C<tarball> (as an xz compressed tar archive)."
14298 #: ../src/guestfs-actions.pod:6175
14299 msgid "guestfs_umask"
14303 #: ../src/guestfs-actions.pod:6177
14307 " guestfs_umask (guestfs_h *g,\n"
14313 #: ../src/guestfs-actions.pod:6181 ../fish/guestfish-actions.pod:4107
14315 "This function sets the mask used for creating new files and device nodes to "
14320 #: ../src/guestfs-actions.pod:6184 ../fish/guestfish-actions.pod:4110
14322 "Typical umask values would be C<022> which creates new files with "
14323 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
14324 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
14328 #: ../src/guestfs-actions.pod:6189 ../fish/guestfish-actions.pod:4115
14330 "The default umask is C<022>. This is important because it means that "
14331 "directories and device nodes will be created with C<0644> or C<0755> mode "
14332 "even if you specify C<0777>."
14336 #: ../src/guestfs-actions.pod:6193
14338 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
14339 "C<guestfs_mkdir>."
14343 #: ../src/guestfs-actions.pod:6196 ../fish/guestfish-actions.pod:4122
14344 msgid "This call returns the previous umask."
14348 #: ../src/guestfs-actions.pod:6202
14349 msgid "guestfs_umount"
14353 #: ../src/guestfs-actions.pod:6204
14357 " guestfs_umount (guestfs_h *g,\n"
14358 " const char *pathordevice);\n"
14363 #: ../src/guestfs-actions.pod:6208 ../fish/guestfish-actions.pod:4130
14365 "This unmounts the given filesystem. The filesystem may be specified either "
14366 "by its mountpoint (path) or the device which contains the filesystem."
14370 #: ../src/guestfs-actions.pod:6216
14371 msgid "guestfs_umount_all"
14375 #: ../src/guestfs-actions.pod:6218
14379 " guestfs_umount_all (guestfs_h *g);\n"
14384 #: ../src/guestfs-actions.pod:6221 ../fish/guestfish-actions.pod:4140
14385 msgid "This unmounts all mounted filesystems."
14389 #: ../src/guestfs-actions.pod:6223 ../fish/guestfish-actions.pod:4142
14390 msgid "Some internal mounts are not unmounted by this call."
14394 #: ../src/guestfs-actions.pod:6229
14395 msgid "guestfs_upload"
14399 #: ../src/guestfs-actions.pod:6231
14403 " guestfs_upload (guestfs_h *g,\n"
14404 " const char *filename,\n"
14405 " const char *remotefilename);\n"
14410 #: ../src/guestfs-actions.pod:6236 ../src/guestfs-actions.pod:6255 ../fish/guestfish-actions.pod:4148 ../fish/guestfish-actions.pod:4161
14411 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
14415 #: ../src/guestfs-actions.pod:6241
14416 msgid "See also C<guestfs_download>."
14420 #: ../src/guestfs-actions.pod:6247
14421 msgid "guestfs_upload_offset"
14425 #: ../src/guestfs-actions.pod:6249
14429 " guestfs_upload_offset (guestfs_h *g,\n"
14430 " const char *filename,\n"
14431 " const char *remotefilename,\n"
14432 " int64_t offset);\n"
14437 #: ../src/guestfs-actions.pod:6258 ../fish/guestfish-actions.pod:4164
14439 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
14440 "The intention is to overwrite parts of existing files or devices, although "
14441 "if a non-existant file is specified then it is created with a \"hole\" "
14442 "before C<offset>. The size of the data written is implicit in the size of "
14443 "the source C<filename>."
14447 #: ../src/guestfs-actions.pod:6265
14449 "Note that there is no limit on the amount of data that can be uploaded with "
14450 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
14451 "full amount unless an error occurs."
14455 #: ../src/guestfs-actions.pod:6270
14456 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
14460 #: ../src/guestfs-actions.pod:6276
14461 msgid "guestfs_utimens"
14465 #: ../src/guestfs-actions.pod:6278
14469 " guestfs_utimens (guestfs_h *g,\n"
14470 " const char *path,\n"
14471 " int64_t atsecs,\n"
14472 " int64_t atnsecs,\n"
14473 " int64_t mtsecs,\n"
14474 " int64_t mtnsecs);\n"
14479 #: ../src/guestfs-actions.pod:6286 ../fish/guestfish-actions.pod:4184
14480 msgid "This command sets the timestamps of a file with nanosecond precision."
14484 #: ../src/guestfs-actions.pod:6289 ../fish/guestfish-actions.pod:4187
14486 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
14491 #: ../src/guestfs-actions.pod:6292 ../fish/guestfish-actions.pod:4190
14493 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
14494 "nanoseconds from the epoch."
14498 #: ../src/guestfs-actions.pod:6295 ../fish/guestfish-actions.pod:4193
14500 "If the C<*nsecs> field contains the special value C<-1> then the "
14501 "corresponding timestamp is set to the current time. (The C<*secs> field is "
14502 "ignored in this case)."
14506 #: ../src/guestfs-actions.pod:6299 ../fish/guestfish-actions.pod:4197
14508 "If the C<*nsecs> field contains the special value C<-2> then the "
14509 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
14514 #: ../src/guestfs-actions.pod:6307 ../src/guestfs-structs.pod:175
14515 msgid "guestfs_version"
14519 #: ../src/guestfs-actions.pod:6309
14522 " struct guestfs_version *\n"
14523 " guestfs_version (guestfs_h *g);\n"
14528 #: ../src/guestfs-actions.pod:6312 ../fish/guestfish-actions.pod:4205
14529 msgid "Return the libguestfs version number that the program is linked against."
14533 #: ../src/guestfs-actions.pod:6315 ../fish/guestfish-actions.pod:4208
14535 "Note that because of dynamic linking this is not necessarily the version of "
14536 "libguestfs that you compiled against. You can compile the program, and then "
14537 "at runtime dynamically link against a completely different C<libguestfs.so> "
14542 #: ../src/guestfs-actions.pod:6320 ../fish/guestfish-actions.pod:4213
14544 "This call was added in version C<1.0.58>. In previous versions of "
14545 "libguestfs there was no way to get the version number. From C code you can "
14546 "use dynamic linker functions to find out if this symbol exists (if it "
14547 "doesn't, then it's an earlier version)."
14551 #: ../src/guestfs-actions.pod:6326 ../fish/guestfish-actions.pod:4219
14553 "The call returns a structure with four elements. The first three (C<major>, "
14554 "C<minor> and C<release>) are numbers and correspond to the usual version "
14555 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
14556 "but may be used for distro-specific information."
14560 #: ../src/guestfs-actions.pod:6332 ../fish/guestfish-actions.pod:4225
14561 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
14565 #: ../src/guestfs-actions.pod:6335 ../fish/guestfish-actions.pod:4228
14566 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
14570 #: ../src/guestfs-actions.pod:6337
14572 "I<Note:> Don't use this call to test for availability of features. In "
14573 "enterprise distributions we backport features from later versions into "
14574 "earlier versions, making this an unreliable way to test for features. Use "
14575 "C<guestfs_available> instead."
14579 #: ../src/guestfs-actions.pod:6343
14581 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
14582 "error. I<The caller must call C<guestfs_free_version> after use>."
14586 #: ../src/guestfs-actions.pod:6347
14587 msgid "(Added in 1.0.58)"
14591 #: ../src/guestfs-actions.pod:6349
14592 msgid "guestfs_vfs_label"
14596 #: ../src/guestfs-actions.pod:6351
14600 " guestfs_vfs_label (guestfs_h *g,\n"
14601 " const char *device);\n"
14606 #: ../src/guestfs-actions.pod:6355 ../fish/guestfish-actions.pod:4240
14607 msgid "This returns the filesystem label of the filesystem on C<device>."
14611 #: ../src/guestfs-actions.pod:6358 ../fish/guestfish-actions.pod:4243
14612 msgid "If the filesystem is unlabeled, this returns the empty string."
14616 #: ../src/guestfs-actions.pod:6360
14617 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
14621 #: ../src/guestfs-actions.pod:6365 ../src/guestfs-actions.pod:6402
14622 msgid "(Added in 1.3.18)"
14626 #: ../src/guestfs-actions.pod:6367
14627 msgid "guestfs_vfs_type"
14631 #: ../src/guestfs-actions.pod:6369
14635 " guestfs_vfs_type (guestfs_h *g,\n"
14636 " const char *device);\n"
14641 #: ../src/guestfs-actions.pod:6373 ../fish/guestfish-actions.pod:4251
14643 "This command gets the filesystem type corresponding to the filesystem on "
14648 #: ../src/guestfs-actions.pod:6376 ../fish/guestfish-actions.pod:4254
14650 "For most filesystems, the result is the name of the Linux VFS module which "
14651 "would be used to mount this filesystem if you mounted it without specifying "
14652 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
14656 #: ../src/guestfs-actions.pod:6386
14657 msgid "guestfs_vfs_uuid"
14661 #: ../src/guestfs-actions.pod:6388
14665 " guestfs_vfs_uuid (guestfs_h *g,\n"
14666 " const char *device);\n"
14671 #: ../src/guestfs-actions.pod:6392 ../fish/guestfish-actions.pod:4263
14672 msgid "This returns the filesystem UUID of the filesystem on C<device>."
14676 #: ../src/guestfs-actions.pod:6395 ../fish/guestfish-actions.pod:4266
14677 msgid "If the filesystem does not have a UUID, this returns the empty string."
14681 #: ../src/guestfs-actions.pod:6397
14682 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
14686 #: ../src/guestfs-actions.pod:6404
14687 msgid "guestfs_vg_activate"
14691 #: ../src/guestfs-actions.pod:6406
14695 " guestfs_vg_activate (guestfs_h *g,\n"
14697 " char *const *volgroups);\n"
14702 #: ../src/guestfs-actions.pod:6411 ../fish/guestfish-actions.pod:4274
14704 "This command activates or (if C<activate> is false) deactivates all logical "
14705 "volumes in the listed volume groups C<volgroups>. If activated, then they "
14706 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
14707 "deactivated, then those devices disappear."
14711 #: ../src/guestfs-actions.pod:6417 ../fish/guestfish-actions.pod:4280
14712 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
14716 #: ../src/guestfs-actions.pod:6419 ../fish/guestfish-actions.pod:4282
14718 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
14719 "activated or deactivated."
14723 #: ../src/guestfs-actions.pod:6426
14724 msgid "guestfs_vg_activate_all"
14728 #: ../src/guestfs-actions.pod:6428
14732 " guestfs_vg_activate_all (guestfs_h *g,\n"
14733 " int activate);\n"
14738 #: ../src/guestfs-actions.pod:6432 ../fish/guestfish-actions.pod:4289
14740 "This command activates or (if C<activate> is false) deactivates all logical "
14741 "volumes in all volume groups. If activated, then they are made known to the "
14742 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
14743 "those devices disappear."
14747 #: ../src/guestfs-actions.pod:6438 ../fish/guestfish-actions.pod:4295
14748 msgid "This command is the same as running C<vgchange -a y|n>"
14752 #: ../src/guestfs-actions.pod:6444
14753 msgid "guestfs_vgcreate"
14757 #: ../src/guestfs-actions.pod:6446
14761 " guestfs_vgcreate (guestfs_h *g,\n"
14762 " const char *volgroup,\n"
14763 " char *const *physvols);\n"
14768 #: ../src/guestfs-actions.pod:6451 ../fish/guestfish-actions.pod:4301
14770 "This creates an LVM volume group called C<volgroup> from the non-empty list "
14771 "of physical volumes C<physvols>."
14775 #: ../src/guestfs-actions.pod:6458
14776 msgid "guestfs_vglvuuids"
14780 #: ../src/guestfs-actions.pod:6460
14784 " guestfs_vglvuuids (guestfs_h *g,\n"
14785 " const char *vgname);\n"
14790 #: ../src/guestfs-actions.pod:6464 ../fish/guestfish-actions.pod:4308
14792 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
14793 "volumes created in this volume group."
14797 #: ../src/guestfs-actions.pod:6467
14799 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
14800 "associate logical volumes and volume groups."
14804 #: ../src/guestfs-actions.pod:6470
14805 msgid "See also C<guestfs_vgpvuuids>."
14809 #: ../src/guestfs-actions.pod:6478
14810 msgid "guestfs_vgpvuuids"
14814 #: ../src/guestfs-actions.pod:6480
14818 " guestfs_vgpvuuids (guestfs_h *g,\n"
14819 " const char *vgname);\n"
14824 #: ../src/guestfs-actions.pod:6484 ../fish/guestfish-actions.pod:4320
14826 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
14827 "volumes that this volume group resides on."
14831 #: ../src/guestfs-actions.pod:6487
14833 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
14834 "associate physical volumes and volume groups."
14838 #: ../src/guestfs-actions.pod:6490
14839 msgid "See also C<guestfs_vglvuuids>."
14843 #: ../src/guestfs-actions.pod:6498
14844 msgid "guestfs_vgremove"
14848 #: ../src/guestfs-actions.pod:6500
14852 " guestfs_vgremove (guestfs_h *g,\n"
14853 " const char *vgname);\n"
14858 #: ../src/guestfs-actions.pod:6504 ../fish/guestfish-actions.pod:4332
14859 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
14863 #: ../src/guestfs-actions.pod:6506 ../fish/guestfish-actions.pod:4334
14864 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
14868 #: ../src/guestfs-actions.pod:6513
14869 msgid "guestfs_vgrename"
14873 #: ../src/guestfs-actions.pod:6515
14877 " guestfs_vgrename (guestfs_h *g,\n"
14878 " const char *volgroup,\n"
14879 " const char *newvolgroup);\n"
14884 #: ../src/guestfs-actions.pod:6520 ../fish/guestfish-actions.pod:4341
14885 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
14889 #: ../src/guestfs-actions.pod:6526
14890 msgid "guestfs_vgs"
14894 #: ../src/guestfs-actions.pod:6528
14898 " guestfs_vgs (guestfs_h *g);\n"
14903 #: ../src/guestfs-actions.pod:6531 ../fish/guestfish-actions.pod:4347
14905 "List all the volumes groups detected. This is the equivalent of the "
14906 "L<vgs(8)> command."
14910 #: ../src/guestfs-actions.pod:6534 ../fish/guestfish-actions.pod:4350
14912 "This returns a list of just the volume group names that were detected "
14913 "(eg. C<VolGroup00>)."
14917 #: ../src/guestfs-actions.pod:6537
14918 msgid "See also C<guestfs_vgs_full>."
14922 #: ../src/guestfs-actions.pod:6545
14923 msgid "guestfs_vgs_full"
14927 #: ../src/guestfs-actions.pod:6547
14930 " struct guestfs_lvm_vg_list *\n"
14931 " guestfs_vgs_full (guestfs_h *g);\n"
14936 #: ../src/guestfs-actions.pod:6550 ../fish/guestfish-actions.pod:4359
14938 "List all the volumes groups detected. This is the equivalent of the "
14939 "L<vgs(8)> command. The \"full\" version includes all fields."
14943 #: ../src/guestfs-actions.pod:6553
14945 "This function returns a C<struct guestfs_lvm_vg_list *>, or NULL if there "
14946 "was an error. I<The caller must call C<guestfs_free_lvm_vg_list> after "
14951 #: ../src/guestfs-actions.pod:6559
14952 msgid "guestfs_vgscan"
14956 #: ../src/guestfs-actions.pod:6561
14960 " guestfs_vgscan (guestfs_h *g);\n"
14965 #: ../src/guestfs-actions.pod:6564 ../fish/guestfish-actions.pod:4366
14967 "This rescans all block devices and rebuilds the list of LVM physical "
14968 "volumes, volume groups and logical volumes."
14972 #: ../src/guestfs-actions.pod:6571
14973 msgid "guestfs_vguuid"
14977 #: ../src/guestfs-actions.pod:6573
14981 " guestfs_vguuid (guestfs_h *g,\n"
14982 " const char *vgname);\n"
14987 #: ../src/guestfs-actions.pod:6577 ../fish/guestfish-actions.pod:4373
14988 msgid "This command returns the UUID of the LVM VG named C<vgname>."
14992 #: ../src/guestfs-actions.pod:6584
14993 msgid "guestfs_wait_ready"
14997 #: ../src/guestfs-actions.pod:6586
15001 " guestfs_wait_ready (guestfs_h *g);\n"
15006 #: ../src/guestfs-actions.pod:6589
15007 msgid "This function is a no op."
15011 #: ../src/guestfs-actions.pod:6591
15013 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
15014 "calling C<guestfs_launch> to wait for the launch to complete. However this "
15015 "is no longer necessary because C<guestfs_launch> now does the waiting."
15019 #: ../src/guestfs-actions.pod:6596
15021 "If you see any calls to this function in code then you can just remove them, "
15022 "unless you want to retain compatibility with older versions of the API."
15026 #: ../src/guestfs-actions.pod:6604
15027 msgid "guestfs_wc_c"
15031 #: ../src/guestfs-actions.pod:6606
15035 " guestfs_wc_c (guestfs_h *g,\n"
15036 " const char *path);\n"
15041 #: ../src/guestfs-actions.pod:6610 ../fish/guestfish-actions.pod:4379
15043 "This command counts the characters in a file, using the C<wc -c> external "
15048 #: ../src/guestfs-actions.pod:6617
15049 msgid "guestfs_wc_l"
15053 #: ../src/guestfs-actions.pod:6619
15057 " guestfs_wc_l (guestfs_h *g,\n"
15058 " const char *path);\n"
15063 #: ../src/guestfs-actions.pod:6623 ../fish/guestfish-actions.pod:4386
15065 "This command counts the lines in a file, using the C<wc -l> external "
15070 #: ../src/guestfs-actions.pod:6630
15071 msgid "guestfs_wc_w"
15075 #: ../src/guestfs-actions.pod:6632
15079 " guestfs_wc_w (guestfs_h *g,\n"
15080 " const char *path);\n"
15085 #: ../src/guestfs-actions.pod:6636 ../fish/guestfish-actions.pod:4393
15087 "This command counts the words in a file, using the C<wc -w> external "
15092 #: ../src/guestfs-actions.pod:6643
15093 msgid "guestfs_write"
15097 #: ../src/guestfs-actions.pod:6645
15101 " guestfs_write (guestfs_h *g,\n"
15102 " const char *path,\n"
15103 " const char *content,\n"
15104 " size_t content_size);\n"
15109 #: ../src/guestfs-actions.pod:6651 ../fish/guestfish-actions.pod:4400
15111 "This call creates a file called C<path>. The content of the file is the "
15112 "string C<content> (which can contain any 8 bit data)."
15116 #: ../src/guestfs-actions.pod:6661
15117 msgid "guestfs_write_file"
15121 #: ../src/guestfs-actions.pod:6663
15125 " guestfs_write_file (guestfs_h *g,\n"
15126 " const char *path,\n"
15127 " const char *content,\n"
15133 #: ../src/guestfs-actions.pod:6669 ../fish/guestfish-actions.pod:4410
15135 "This call creates a file called C<path>. The contents of the file is the "
15136 "string C<content> (which can contain any 8 bit data), with length C<size>."
15140 #: ../src/guestfs-actions.pod:6673 ../fish/guestfish-actions.pod:4414
15142 "As a special case, if C<size> is C<0> then the length is calculated using "
15143 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
15147 #: ../src/guestfs-actions.pod:6677 ../fish/guestfish-actions.pod:4418
15149 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
15150 "I<not> work, even if the length is specified."
15154 #: ../src/guestfs-actions.pod:6685 ../fish/guestfish-actions.pod:4424
15155 msgid "This function is deprecated. In new code, use the C<write> call instead."
15159 #: ../src/guestfs-actions.pod:6694
15160 msgid "guestfs_zegrep"
15164 #: ../src/guestfs-actions.pod:6696
15168 " guestfs_zegrep (guestfs_h *g,\n"
15169 " const char *regex,\n"
15170 " const char *path);\n"
15175 #: ../src/guestfs-actions.pod:6701 ../fish/guestfish-actions.pod:4435
15176 msgid "This calls the external C<zegrep> program and returns the matching lines."
15180 #: ../src/guestfs-actions.pod:6713
15181 msgid "guestfs_zegrepi"
15185 #: ../src/guestfs-actions.pod:6715
15189 " guestfs_zegrepi (guestfs_h *g,\n"
15190 " const char *regex,\n"
15191 " const char *path);\n"
15196 #: ../src/guestfs-actions.pod:6720 ../fish/guestfish-actions.pod:4445
15197 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
15201 #: ../src/guestfs-actions.pod:6732
15202 msgid "guestfs_zero"
15206 #: ../src/guestfs-actions.pod:6734
15210 " guestfs_zero (guestfs_h *g,\n"
15211 " const char *device);\n"
15216 #: ../src/guestfs-actions.pod:6738 ../fish/guestfish-actions.pod:4455
15217 msgid "This command writes zeroes over the first few blocks of C<device>."
15221 #: ../src/guestfs-actions.pod:6740 ../fish/guestfish-actions.pod:4457
15223 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
15224 "securely wipe the device). It should be sufficient to remove any partition "
15225 "tables, filesystem superblocks and so on."
15229 #: ../src/guestfs-actions.pod:6744
15230 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
15234 #: ../src/guestfs-actions.pod:6755
15235 msgid "guestfs_zero_device"
15239 #: ../src/guestfs-actions.pod:6757
15243 " guestfs_zero_device (guestfs_h *g,\n"
15244 " const char *device);\n"
15249 #: ../src/guestfs-actions.pod:6761
15251 "This command writes zeroes over the entire C<device>. Compare with "
15252 "C<guestfs_zero> which just zeroes the first few blocks of a device."
15256 #: ../src/guestfs-actions.pod:6775
15257 msgid "(Added in 1.3.1)"
15261 #: ../src/guestfs-actions.pod:6777
15262 msgid "guestfs_zerofree"
15266 #: ../src/guestfs-actions.pod:6779
15270 " guestfs_zerofree (guestfs_h *g,\n"
15271 " const char *device);\n"
15276 #: ../src/guestfs-actions.pod:6783 ../fish/guestfish-actions.pod:4478
15278 "This runs the I<zerofree> program on C<device>. This program claims to zero "
15279 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
15280 "possible to compress the filesystem more effectively."
15284 #: ../src/guestfs-actions.pod:6788 ../fish/guestfish-actions.pod:4483
15285 msgid "You should B<not> run this program if the filesystem is mounted."
15289 #: ../src/guestfs-actions.pod:6791 ../fish/guestfish-actions.pod:4486
15291 "It is possible that using this program can damage the filesystem or data on "
15296 #: ../src/guestfs-actions.pod:6798
15297 msgid "guestfs_zfgrep"
15301 #: ../src/guestfs-actions.pod:6800
15305 " guestfs_zfgrep (guestfs_h *g,\n"
15306 " const char *pattern,\n"
15307 " const char *path);\n"
15312 #: ../src/guestfs-actions.pod:6805 ../fish/guestfish-actions.pod:4493
15313 msgid "This calls the external C<zfgrep> program and returns the matching lines."
15317 #: ../src/guestfs-actions.pod:6817
15318 msgid "guestfs_zfgrepi"
15322 #: ../src/guestfs-actions.pod:6819
15326 " guestfs_zfgrepi (guestfs_h *g,\n"
15327 " const char *pattern,\n"
15328 " const char *path);\n"
15333 #: ../src/guestfs-actions.pod:6824 ../fish/guestfish-actions.pod:4503
15334 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
15338 #: ../src/guestfs-actions.pod:6836
15339 msgid "guestfs_zfile"
15343 #: ../src/guestfs-actions.pod:6838
15347 " guestfs_zfile (guestfs_h *g,\n"
15348 " const char *meth,\n"
15349 " const char *path);\n"
15354 #: ../src/guestfs-actions.pod:6843 ../fish/guestfish-actions.pod:4513
15355 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
15359 #: ../src/guestfs-actions.pod:6846 ../fish/guestfish-actions.pod:4516
15360 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
15364 #: ../src/guestfs-actions.pod:6848
15366 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
15371 #: ../src/guestfs-actions.pod:6854 ../fish/guestfish-actions.pod:4521
15372 msgid "This function is deprecated. In new code, use the C<file> call instead."
15376 #: ../src/guestfs-actions.pod:6863
15377 msgid "guestfs_zgrep"
15381 #: ../src/guestfs-actions.pod:6865
15385 " guestfs_zgrep (guestfs_h *g,\n"
15386 " const char *regex,\n"
15387 " const char *path);\n"
15392 #: ../src/guestfs-actions.pod:6870 ../fish/guestfish-actions.pod:4532
15393 msgid "This calls the external C<zgrep> program and returns the matching lines."
15397 #: ../src/guestfs-actions.pod:6882
15398 msgid "guestfs_zgrepi"
15402 #: ../src/guestfs-actions.pod:6884
15406 " guestfs_zgrepi (guestfs_h *g,\n"
15407 " const char *regex,\n"
15408 " const char *path);\n"
15413 #: ../src/guestfs-actions.pod:6889 ../fish/guestfish-actions.pod:4542
15414 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
15418 #: ../src/guestfs-availability.pod:3
15423 #: ../src/guestfs-availability.pod:5
15425 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
15426 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
15427 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
15428 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
15429 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
15433 #: ../src/guestfs-availability.pod:21
15438 #: ../src/guestfs-availability.pod:23
15440 "The following functions: L</guestfs_inotify_add_watch> "
15441 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
15442 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
15446 #: ../src/guestfs-availability.pod:31
15447 msgid "B<linuxfsuuid>"
15451 #: ../src/guestfs-availability.pod:33
15453 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
15454 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
15458 #: ../src/guestfs-availability.pod:40
15459 msgid "B<linuxmodules>"
15463 #: ../src/guestfs-availability.pod:42
15464 msgid "The following functions: L</guestfs_modprobe>"
15468 #: ../src/guestfs-availability.pod:45
15469 msgid "B<linuxxattrs>"
15473 #: ../src/guestfs-availability.pod:47
15475 "The following functions: L</guestfs_getxattrs> L</guestfs_lgetxattrs> "
15476 "L</guestfs_lremovexattr> L</guestfs_lsetxattr> L</guestfs_lxattrlist> "
15477 "L</guestfs_removexattr> L</guestfs_setxattr>"
15481 #: ../src/guestfs-availability.pod:56
15486 #: ../src/guestfs-availability.pod:58
15488 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
15489 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
15490 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
15494 #: ../src/guestfs-availability.pod:67
15499 #: ../src/guestfs-availability.pod:69
15501 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
15502 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
15503 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
15504 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
15505 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
15506 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
15507 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
15508 "L</guestfs_vgs_full>"
15512 #: ../src/guestfs-availability.pod:92
15517 #: ../src/guestfs-availability.pod:94
15519 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
15520 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
15524 #: ../src/guestfs-availability.pod:100
15529 #: ../src/guestfs-availability.pod:102
15530 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
15534 #: ../src/guestfs-availability.pod:105
15535 msgid "B<ntfsprogs>"
15539 #: ../src/guestfs-availability.pod:107
15540 msgid "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
15544 #: ../src/guestfs-availability.pod:111
15545 msgid "B<realpath>"
15549 #: ../src/guestfs-availability.pod:113
15550 msgid "The following functions: L</guestfs_realpath>"
15554 #: ../src/guestfs-availability.pod:116
15559 #: ../src/guestfs-availability.pod:118
15561 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
15562 "L</guestfs_scrub_freespace>"
15566 #: ../src/guestfs-availability.pod:123
15571 #: ../src/guestfs-availability.pod:125
15572 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
15576 #: ../src/guestfs-availability.pod:129
15581 #: ../src/guestfs-availability.pod:131
15582 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
15586 #: ../src/guestfs-availability.pod:135
15587 msgid "B<zerofree>"
15591 #: ../src/guestfs-availability.pod:137
15592 msgid "The following functions: L</guestfs_zerofree>"
15596 #: ../src/guestfs-structs.pod:1
15597 msgid "guestfs_int_bool"
15601 #: ../src/guestfs-structs.pod:3
15604 " struct guestfs_int_bool {\n"
15612 #: ../src/guestfs-structs.pod:8
15615 " struct guestfs_int_bool_list {\n"
15616 " uint32_t len; /* Number of elements in list. */\n"
15617 " struct guestfs_int_bool *val; /* Elements. */\n"
15623 #: ../src/guestfs-structs.pod:13
15626 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
15627 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
15632 #: ../src/guestfs-structs.pod:16
15633 msgid "guestfs_lvm_pv"
15637 #: ../src/guestfs-structs.pod:18
15640 " struct guestfs_lvm_pv {\n"
15641 " char *pv_name;\n"
15642 " /* The next field is NOT nul-terminated, be careful when printing it: "
15644 " char pv_uuid[32];\n"
15646 " uint64_t pv_size;\n"
15647 " uint64_t dev_size;\n"
15648 " uint64_t pv_free;\n"
15649 " uint64_t pv_used;\n"
15650 " char *pv_attr;\n"
15651 " int64_t pv_pe_count;\n"
15652 " int64_t pv_pe_alloc_count;\n"
15653 " char *pv_tags;\n"
15654 " uint64_t pe_start;\n"
15655 " int64_t pv_mda_count;\n"
15656 " uint64_t pv_mda_free;\n"
15662 #: ../src/guestfs-structs.pod:36
15665 " struct guestfs_lvm_pv_list {\n"
15666 " uint32_t len; /* Number of elements in list. */\n"
15667 " struct guestfs_lvm_pv *val; /* Elements. */\n"
15673 #: ../src/guestfs-structs.pod:41
15676 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
15677 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
15682 #: ../src/guestfs-structs.pod:44
15683 msgid "guestfs_lvm_vg"
15687 #: ../src/guestfs-structs.pod:46
15690 " struct guestfs_lvm_vg {\n"
15691 " char *vg_name;\n"
15692 " /* The next field is NOT nul-terminated, be careful when printing it: "
15694 " char vg_uuid[32];\n"
15696 " char *vg_attr;\n"
15697 " uint64_t vg_size;\n"
15698 " uint64_t vg_free;\n"
15699 " char *vg_sysid;\n"
15700 " uint64_t vg_extent_size;\n"
15701 " int64_t vg_extent_count;\n"
15702 " int64_t vg_free_count;\n"
15703 " int64_t max_lv;\n"
15704 " int64_t max_pv;\n"
15705 " int64_t pv_count;\n"
15706 " int64_t lv_count;\n"
15707 " int64_t snap_count;\n"
15708 " int64_t vg_seqno;\n"
15709 " char *vg_tags;\n"
15710 " int64_t vg_mda_count;\n"
15711 " uint64_t vg_mda_free;\n"
15717 #: ../src/guestfs-structs.pod:69
15720 " struct guestfs_lvm_vg_list {\n"
15721 " uint32_t len; /* Number of elements in list. */\n"
15722 " struct guestfs_lvm_vg *val; /* Elements. */\n"
15728 #: ../src/guestfs-structs.pod:74
15731 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
15732 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
15737 #: ../src/guestfs-structs.pod:77
15738 msgid "guestfs_lvm_lv"
15742 #: ../src/guestfs-structs.pod:79
15745 " struct guestfs_lvm_lv {\n"
15746 " char *lv_name;\n"
15747 " /* The next field is NOT nul-terminated, be careful when printing it: "
15749 " char lv_uuid[32];\n"
15750 " char *lv_attr;\n"
15751 " int64_t lv_major;\n"
15752 " int64_t lv_minor;\n"
15753 " int64_t lv_kernel_major;\n"
15754 " int64_t lv_kernel_minor;\n"
15755 " uint64_t lv_size;\n"
15756 " int64_t seg_count;\n"
15758 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
15759 " float snap_percent;\n"
15760 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
15761 " float copy_percent;\n"
15762 " char *move_pv;\n"
15763 " char *lv_tags;\n"
15764 " char *mirror_log;\n"
15765 " char *modules;\n"
15771 #: ../src/guestfs-structs.pod:101
15774 " struct guestfs_lvm_lv_list {\n"
15775 " uint32_t len; /* Number of elements in list. */\n"
15776 " struct guestfs_lvm_lv *val; /* Elements. */\n"
15782 #: ../src/guestfs-structs.pod:106
15785 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
15786 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
15791 #: ../src/guestfs-structs.pod:111
15794 " struct guestfs_stat {\n"
15798 " int64_t nlink;\n"
15803 " int64_t blksize;\n"
15804 " int64_t blocks;\n"
15805 " int64_t atime;\n"
15806 " int64_t mtime;\n"
15807 " int64_t ctime;\n"
15813 #: ../src/guestfs-structs.pod:127
15816 " struct guestfs_stat_list {\n"
15817 " uint32_t len; /* Number of elements in list. */\n"
15818 " struct guestfs_stat *val; /* Elements. */\n"
15824 #: ../src/guestfs-structs.pod:132
15827 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
15828 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
15833 #: ../src/guestfs-structs.pod:137
15836 " struct guestfs_statvfs {\n"
15837 " int64_t bsize;\n"
15838 " int64_t frsize;\n"
15839 " int64_t blocks;\n"
15840 " int64_t bfree;\n"
15841 " int64_t bavail;\n"
15842 " int64_t files;\n"
15843 " int64_t ffree;\n"
15844 " int64_t favail;\n"
15847 " int64_t namemax;\n"
15853 #: ../src/guestfs-structs.pod:151
15856 " struct guestfs_statvfs_list {\n"
15857 " uint32_t len; /* Number of elements in list. */\n"
15858 " struct guestfs_statvfs *val; /* Elements. */\n"
15864 #: ../src/guestfs-structs.pod:156
15867 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
15868 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
15873 #: ../src/guestfs-structs.pod:159
15874 msgid "guestfs_dirent"
15878 #: ../src/guestfs-structs.pod:161
15881 " struct guestfs_dirent {\n"
15890 #: ../src/guestfs-structs.pod:167
15893 " struct guestfs_dirent_list {\n"
15894 " uint32_t len; /* Number of elements in list. */\n"
15895 " struct guestfs_dirent *val; /* Elements. */\n"
15901 #: ../src/guestfs-structs.pod:172
15904 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
15905 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
15910 #: ../src/guestfs-structs.pod:177
15913 " struct guestfs_version {\n"
15914 " int64_t major;\n"
15915 " int64_t minor;\n"
15916 " int64_t release;\n"
15923 #: ../src/guestfs-structs.pod:184
15926 " struct guestfs_version_list {\n"
15927 " uint32_t len; /* Number of elements in list. */\n"
15928 " struct guestfs_version *val; /* Elements. */\n"
15934 #: ../src/guestfs-structs.pod:189
15937 " void guestfs_free_version (struct guestfs_free_version *);\n"
15938 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
15943 #: ../src/guestfs-structs.pod:192
15944 msgid "guestfs_xattr"
15948 #: ../src/guestfs-structs.pod:194
15951 " struct guestfs_xattr {\n"
15952 " char *attrname;\n"
15953 " /* The next two fields describe a byte array. */\n"
15954 " uint32_t attrval_len;\n"
15955 " char *attrval;\n"
15961 #: ../src/guestfs-structs.pod:201
15964 " struct guestfs_xattr_list {\n"
15965 " uint32_t len; /* Number of elements in list. */\n"
15966 " struct guestfs_xattr *val; /* Elements. */\n"
15972 #: ../src/guestfs-structs.pod:206
15975 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
15976 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
15981 #: ../src/guestfs-structs.pod:209
15982 msgid "guestfs_inotify_event"
15986 #: ../src/guestfs-structs.pod:211
15989 " struct guestfs_inotify_event {\n"
15990 " int64_t in_wd;\n"
15991 " uint32_t in_mask;\n"
15992 " uint32_t in_cookie;\n"
15993 " char *in_name;\n"
15999 #: ../src/guestfs-structs.pod:218
16002 " struct guestfs_inotify_event_list {\n"
16003 " uint32_t len; /* Number of elements in list. */\n"
16004 " struct guestfs_inotify_event *val; /* Elements. */\n"
16010 #: ../src/guestfs-structs.pod:223
16013 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
16014 " void guestfs_free_inotify_event_list (struct "
16015 "guestfs_free_inotify_event_list *);\n"
16020 #: ../src/guestfs-structs.pod:226
16021 msgid "guestfs_partition"
16025 #: ../src/guestfs-structs.pod:228
16028 " struct guestfs_partition {\n"
16029 " int32_t part_num;\n"
16030 " uint64_t part_start;\n"
16031 " uint64_t part_end;\n"
16032 " uint64_t part_size;\n"
16038 #: ../src/guestfs-structs.pod:235
16041 " struct guestfs_partition_list {\n"
16042 " uint32_t len; /* Number of elements in list. */\n"
16043 " struct guestfs_partition *val; /* Elements. */\n"
16049 #: ../src/guestfs-structs.pod:240
16052 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
16053 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
16058 #: ../fish/guestfish.pod:5
16059 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
16063 #: ../fish/guestfish.pod:9
16066 " guestfish [--options] [commands]\n"
16071 #: ../fish/guestfish.pod:11
16079 #: ../fish/guestfish.pod:13
16082 " guestfish [--ro|--rw] -a disk.img\n"
16087 #: ../fish/guestfish.pod:15
16090 " guestfish [--ro|--rw] -a disk.img -m dev[:mountpoint]\n"
16095 #: ../fish/guestfish.pod:17
16098 " guestfish -d libvirt-domain\n"
16103 #: ../fish/guestfish.pod:19
16106 " guestfish [--ro|--rw] -a disk.img -i\n"
16111 #: ../fish/guestfish.pod:21
16114 " guestfish -d libvirt-domain -i\n"
16119 #: ../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
16124 #: ../fish/guestfish.pod:25
16126 "Using guestfish in read/write mode on live virtual machines can be "
16127 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
16128 "option to use guestfish safely if the disk image or virtual machine might be "
16133 #: ../fish/guestfish.pod:32
16135 "Guestfish is a shell and command-line tool for examining and modifying "
16136 "virtual machine filesystems. It uses libguestfs and exposes all of the "
16137 "functionality of the guestfs API, see L<guestfs(3)>."
16141 #: ../fish/guestfish.pod:36
16143 "Guestfish gives you structured access to the libguestfs API, from shell "
16144 "scripts or the command line or interactively. If you want to rescue a "
16145 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
16150 #: ../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
16155 #: ../fish/guestfish.pod:43
16156 msgid "As an interactive shell"
16160 #: ../fish/guestfish.pod:45
16168 #: ../fish/guestfish.pod:47
16171 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
16172 " editing virtual machine filesystems.\n"
16177 #: ../fish/guestfish.pod:50
16180 " Type: 'help' for a list of commands\n"
16181 " 'man' to read the manual\n"
16182 " 'quit' to quit the shell\n"
16187 #: ../fish/guestfish.pod:54
16190 " ><fs> add-ro disk.img\n"
16192 " ><fs> list-filesystems\n"
16193 " /dev/sda1: ext4\n"
16194 " /dev/vg_guest/lv_root: ext4\n"
16195 " /dev/vg_guest/lv_swap: swap\n"
16196 " ><fs> mount /dev/vg_guest/lv_root /\n"
16197 " ><fs> cat /etc/fstab\n"
16199 " # Created by anaconda\n"
16206 #: ../fish/guestfish.pod:67
16207 msgid "From shell scripts"
16211 #: ../fish/guestfish.pod:69
16212 msgid "Create a new C</etc/motd> file in a guest or disk image:"
16216 #: ../fish/guestfish.pod:71
16219 " guestfish <<_EOF_\n"
16222 " mount /dev/vg_guest/lv_root /\n"
16223 " write /etc/motd \"Welcome, new users\"\n"
16229 #: ../fish/guestfish.pod:78
16230 msgid "List the LVM logical volumes in a disk image:"
16234 #: ../fish/guestfish.pod:80
16237 " guestfish -a disk.img --ro <<_EOF_\n"
16245 #: ../fish/guestfish.pod:85
16246 msgid "List all the filesystems in a disk image:"
16250 #: ../fish/guestfish.pod:87
16253 " guestfish -a disk.img --ro <<_EOF_\n"
16255 " list-filesystems\n"
16261 #: ../fish/guestfish.pod:92
16262 msgid "On one command line"
16266 #: ../fish/guestfish.pod:94
16267 msgid "Update C</etc/resolv.conf> in a guest:"
16271 #: ../fish/guestfish.pod:96
16275 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
16276 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
16281 #: ../fish/guestfish.pod:100
16282 msgid "Edit C</boot/grub/grub.conf> interactively:"
16286 #: ../fish/guestfish.pod:102
16289 " guestfish --rw --add disk.img \\\n"
16290 " --mount /dev/vg_guest/lv_root \\\n"
16291 " --mount /dev/sda1:/boot \\\n"
16292 " edit /boot/grub/grub.conf\n"
16297 #: ../fish/guestfish.pod:107
16298 msgid "Mount disks automatically"
16302 #: ../fish/guestfish.pod:109
16304 "Use the I<-i> option to automatically mount the disks from a virtual "
16309 #: ../fish/guestfish.pod:112
16312 " guestfish --ro -a disk.img -i cat /etc/group\n"
16317 #: ../fish/guestfish.pod:114
16320 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
16325 #: ../fish/guestfish.pod:116
16326 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
16330 #: ../fish/guestfish.pod:118
16333 " guestfish --rw -a disk.img -i edit /boot/grub/grub.conf\n"
16338 #: ../fish/guestfish.pod:120
16339 msgid "As a script interpreter"
16343 #: ../fish/guestfish.pod:122
16344 msgid "Create a 100MB disk containing an ext2-formatted partition:"
16348 #: ../fish/guestfish.pod:124
16351 " #!/usr/bin/guestfish -f\n"
16352 " sparse test1.img 100M\n"
16354 " part-disk /dev/sda mbr\n"
16355 " mkfs ext2 /dev/sda1\n"
16360 #: ../fish/guestfish.pod:130
16361 msgid "Start with a prepared disk"
16365 #: ../fish/guestfish.pod:132
16367 "An alternate way to create a 100MB disk called C<test1.img> containing a "
16368 "single ext2-formatted partition:"
16372 #: ../fish/guestfish.pod:135
16375 " guestfish -N fs\n"
16380 #: ../fish/guestfish.pod:137
16381 msgid "To list what is available do:"
16385 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:837
16388 " guestfish -N help | less\n"
16393 #: ../fish/guestfish.pod:141
16394 msgid "Remote control"
16398 #: ../fish/guestfish.pod:143
16401 " eval \"`guestfish --listen`\"\n"
16402 " guestfish --remote add-ro disk.img\n"
16403 " guestfish --remote run\n"
16404 " guestfish --remote lvs\n"
16409 #: ../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
16414 #: ../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
16419 #: ../fish/guestfish.pod:154
16420 msgid "Displays general help on options."
16424 #: ../fish/guestfish.pod:156
16425 msgid "B<-h> | B<--cmd-help>"
16429 #: ../fish/guestfish.pod:158
16430 msgid "Lists all available guestfish commands."
16434 #: ../fish/guestfish.pod:160
16435 msgid "B<-h cmd> | B<--cmd-help cmd>"
16439 #: ../fish/guestfish.pod:162
16440 msgid "Displays detailed help on a single command C<cmd>."
16444 #: ../fish/guestfish.pod:164 ../fuse/guestmount.pod:77
16445 msgid "B<-a image> | B<--add image>"
16449 #: ../fish/guestfish.pod:166
16450 msgid "Add a block device or virtual machine image to the shell."
16454 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:81
16456 "The format of the disk image is auto-detected. To override this and force a "
16457 "particular format use the I<--format=..> option."
16461 #: ../fish/guestfish.pod:171 ../fuse/guestmount.pod:84
16462 msgid "B<-c URI> | B<--connect URI>"
16466 #: ../fish/guestfish.pod:173 ../fuse/guestmount.pod:86
16468 "When used in conjunction with the I<-d> option, this specifies the libvirt "
16469 "URI to use. The default is to use the default libvirt connection."
16473 #: ../fish/guestfish.pod:177
16478 #: ../fish/guestfish.pod:179
16480 "If using the I<--listen> option and a csh-like shell, use this option. See "
16481 "section L</REMOTE CONTROL AND CSH> below."
16485 #: ../fish/guestfish.pod:182 ../fuse/guestmount.pod:90
16486 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
16490 #: ../fish/guestfish.pod:184 ../fuse/guestmount.pod:92
16492 "Add disks from the named libvirt domain. If the I<--ro> option is also "
16493 "used, then any libvirt domain can be used. However in write mode, only "
16494 "libvirt domains which are shut down can be named here."
16498 #: ../fish/guestfish.pod:188
16499 msgid "B<-D> | B<--no-dest-paths>"
16503 #: ../fish/guestfish.pod:190
16505 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
16506 "to hit the tab key to complete paths on the guest filesystem, but this "
16507 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
16508 "allow this feature to be disabled."
16512 #: ../fish/guestfish.pod:195 ../fuse/guestmount.pod:108
16513 msgid "B<--echo-keys>"
16517 #: ../fish/guestfish.pod:197 ../fuse/guestmount.pod:110
16519 "When prompting for keys and passphrases, guestfish normally turns echoing "
16520 "off so you cannot see what you are typing. If you are not worried about "
16521 "Tempest attacks and there is no one else in the room you can specify this "
16522 "flag to see what you are typing."
16526 #: ../fish/guestfish.pod:202
16527 msgid "B<-f file> | B<--file file>"
16531 #: ../fish/guestfish.pod:204
16532 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
16536 #: ../fish/guestfish.pod:207
16539 " #!/usr/bin/guestfish -f\n"
16544 #: ../fish/guestfish.pod:209 ../fuse/guestmount.pod:115
16545 msgid "B<--format=raw|qcow2|..> | B<--format>"
16549 #: ../fish/guestfish.pod:211 ../fuse/guestmount.pod:117
16551 "The default for the I<-a> option is to auto-detect the format of the disk "
16552 "image. Using this forces the disk format for I<-a> options which follow on "
16553 "the command line. Using I<--format> with no argument switches back to "
16554 "auto-detection for subsequent I<-a> options."
16558 #: ../fish/guestfish.pod:216 ../fish/guestfish.pod:543 ../inspector/virt-inspector.pl:515
16559 msgid "For example:"
16563 #: ../fish/guestfish.pod:218
16566 " guestfish --format=raw -a disk.img\n"
16571 #: ../fish/guestfish.pod:220
16572 msgid "forces raw format (no auto-detection) for C<disk.img>."
16576 #: ../fish/guestfish.pod:222
16579 " guestfish --format=raw -a disk.img --format -a another.img\n"
16584 #: ../fish/guestfish.pod:224
16586 "forces raw format (no auto-detection) for C<disk.img> and reverts to "
16587 "auto-detection for C<another.img>."
16591 #: ../fish/guestfish.pod:227
16593 "If you have untrusted raw-format guest disk images, you should use this "
16594 "option to specify the disk format. This avoids a possible security problem "
16595 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
16599 #: ../fish/guestfish.pod:232 ../fuse/guestmount.pod:135
16600 msgid "B<-i> | B<--inspector>"
16604 #: ../fish/guestfish.pod:234 ../fuse/guestmount.pod:137
16606 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
16607 "system and mount filesystems as they would be mounted on the real virtual "
16612 #: ../fish/guestfish.pod:238
16613 msgid "Typical usage is either:"
16617 #: ../fish/guestfish.pod:240
16620 " guestfish -d myguest -i\n"
16625 #: ../fish/guestfish.pod:242
16626 msgid "(for an inactive libvirt domain called I<myguest>), or:"
16630 #: ../fish/guestfish.pod:244
16633 " guestfish --ro -d myguest -i\n"
16638 #: ../fish/guestfish.pod:246
16639 msgid "(for active domains, readonly), or specify the block device directly:"
16643 #: ../fish/guestfish.pod:248
16646 " guestfish --rw -a /dev/Guests/MyGuest -i\n"
16651 #: ../fish/guestfish.pod:250
16653 "Note that the command line syntax changed slightly over older versions of "
16654 "guestfish. You can still use the old syntax:"
16658 #: ../fish/guestfish.pod:253
16661 " guestfish [--ro] -i disk.img\n"
16666 #: ../fish/guestfish.pod:255
16669 " guestfish [--ro] -i libvirt-domain\n"
16674 #: ../fish/guestfish.pod:257 ../fuse/guestmount.pod:141
16675 msgid "B<--keys-from-stdin>"
16679 #: ../fish/guestfish.pod:259 ../fuse/guestmount.pod:143
16681 "Read key or passphrase parameters from stdin. The default is to try to read "
16682 "passphrases from the user by opening C</dev/tty>."
16686 #: ../fish/guestfish.pod:262
16687 msgid "B<--listen>"
16691 #: ../fish/guestfish.pod:264
16693 "Fork into the background and listen for remote commands. See section "
16694 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
16698 #: ../fish/guestfish.pod:267
16699 msgid "B<-m dev[:mountpoint]> | B<--mount dev[:mountpoint]>"
16703 #: ../fish/guestfish.pod:269
16704 msgid "Mount the named partition or logical volume on the given mountpoint."
16708 #: ../fish/guestfish.pod:271
16709 msgid "If the mountpoint is omitted, it defaults to C</>."
16713 #: ../fish/guestfish.pod:273
16714 msgid "You have to mount something on C</> before most commands will work."
16718 #: ../fish/guestfish.pod:275
16720 "If any I<-m> or I<--mount> options are given, the guest is automatically "
16725 #: ../fish/guestfish.pod:278
16727 "If you don't know what filesystems a disk image contains, you can either run "
16728 "guestfish without this option, then list the partitions and LVs available "
16729 "(see L</list-partitions> and L</lvs> commands), or you can use the "
16730 "L<virt-list-filesystems(1)> program."
16734 #: ../fish/guestfish.pod:283 ../fuse/guestmount.pod:154
16735 msgid "B<-n> | B<--no-sync>"
16739 #: ../fish/guestfish.pod:285
16741 "Disable autosync. This is enabled by default. See the discussion of "
16742 "autosync in the L<guestfs(3)> manpage."
16746 #: ../fish/guestfish.pod:288
16747 msgid "B<-N type> | B<--new type> | B<-N help>"
16751 #: ../fish/guestfish.pod:290
16753 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
16754 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
16755 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
16760 #: ../fish/guestfish.pod:295
16761 msgid "B<--progress-bars>"
16765 #: ../fish/guestfish.pod:297
16766 msgid "Enable progress bars, even when guestfish is used non-interactively."
16770 #: ../fish/guestfish.pod:299
16772 "Progress bars are enabled by default when guestfish is used as an "
16773 "interactive shell."
16777 #: ../fish/guestfish.pod:302
16778 msgid "B<--no-progress-bars>"
16782 #: ../fish/guestfish.pod:304
16783 msgid "Disable progress bars."
16787 #: ../fish/guestfish.pod:306
16788 msgid "B<--remote[=pid]>"
16792 #: ../fish/guestfish.pod:308
16794 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
16795 "CONTROL GUESTFISH OVER A SOCKET> below."
16799 #: ../fish/guestfish.pod:311 ../fuse/guestmount.pod:196
16800 msgid "B<-r> | B<--ro>"
16804 #: ../fish/guestfish.pod:313
16806 "This changes the I<-a> and I<-m> options so that disks are added and mounts "
16807 "are done read-only (see L<guestfs(3)/guestfs_mount_ro>)."
16811 #: ../fish/guestfish.pod:316 ../tools/virt-rescue.pl:187
16813 "The option must always be used if the disk image or virtual machine might be "
16814 "running, and is generally recommended in cases where you don't need write "
16815 "access to the disk."
16819 #: ../fish/guestfish.pod:320
16821 "Note that prepared disk images created with I<-N> are not affected by the "
16826 #: ../fish/guestfish.pod:323
16827 msgid "See also L</OPENING DISKS FOR READ AND WRITE> below."
16831 #: ../fish/guestfish.pod:325 ../fuse/guestmount.pod:208 ../tools/virt-rescue.pl:195
16832 msgid "B<--selinux>"
16836 #: ../fish/guestfish.pod:327
16837 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
16841 #: ../fish/guestfish.pod:329 ../fuse/guestmount.pod:212
16842 msgid "B<-v> | B<--verbose>"
16846 #: ../fish/guestfish.pod:331
16848 "Enable very verbose messages. This is particularly useful if you find a "
16853 #: ../fish/guestfish.pod:334 ../fuse/guestmount.pod:216
16854 msgid "B<-V> | B<--version>"
16858 #: ../fish/guestfish.pod:336
16859 msgid "Display the guestfish / libguestfs version number and exit."
16863 #: ../fish/guestfish.pod:338 ../fuse/guestmount.pod:220
16864 msgid "B<-w> | B<--rw>"
16868 #: ../fish/guestfish.pod:340
16870 "This option does nothing at the moment. See L</OPENING DISKS FOR READ AND "
16875 #: ../fish/guestfish.pod:343
16880 #: ../fish/guestfish.pod:345
16881 msgid "Echo each command before executing it."
16885 #: ../fish/guestfish.pod:349
16886 msgid "COMMANDS ON COMMAND LINE"
16890 #: ../fish/guestfish.pod:351
16891 msgid "Any additional (non-option) arguments are treated as commands to execute."
16895 #: ../fish/guestfish.pod:354
16897 "Commands to execute should be separated by a colon (C<:>), where the colon "
16898 "is a separate parameter. Thus:"
16902 #: ../fish/guestfish.pod:357
16905 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
16910 #: ../fish/guestfish.pod:359
16912 "If there are no additional arguments, then we enter a shell, either an "
16913 "interactive shell with a prompt (if the input is a terminal) or a "
16914 "non-interactive shell."
16918 #: ../fish/guestfish.pod:363
16920 "In either command line mode or non-interactive shell, the first command that "
16921 "gives an error causes the whole shell to exit. In interactive mode (with a "
16922 "prompt) if a command fails, you can continue to enter commands."
16926 #: ../fish/guestfish.pod:368
16927 msgid "USING launch (OR run)"
16931 #: ../fish/guestfish.pod:370
16933 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
16934 "then launch it, then mount any disks you need, and finally issue "
16935 "actions/commands. So the general order of the day is:"
16939 #: ../fish/guestfish.pod:378
16940 msgid "add or -a/--add"
16944 #: ../fish/guestfish.pod:382
16945 msgid "launch (aka run)"
16949 #: ../fish/guestfish.pod:386
16950 msgid "mount or -m/--mount"
16954 #: ../fish/guestfish.pod:390
16955 msgid "any other commands"
16959 #: ../fish/guestfish.pod:394
16961 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
16962 "guest before mounting or performing any other commands."
16966 #: ../fish/guestfish.pod:397
16968 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
16969 "I<--new> options were given then C<run> is done automatically, simply "
16970 "because guestfish can't perform the action you asked for without doing this."
16974 #: ../fish/guestfish.pod:402
16975 msgid "OPENING DISKS FOR READ AND WRITE"
16979 #: ../fish/guestfish.pod:404
16981 "The guestfish (and L<guestmount(1)>) options I<--ro> and I<--rw> affect "
16982 "whether the other command line options I<-a>, I<-c>, I<-d>, I<-i> and I<-m> "
16983 "open disk images read-only or for writing."
16987 #: ../fish/guestfish.pod:408
16989 "In libguestfs E<lt> 1.6.2, guestfish and guestmount defaulted to opening "
16990 "disk images supplied on the command line for write. To open a disk image "
16991 "read-only you have to do I<-a image --ro>."
16995 #: ../fish/guestfish.pod:412
16997 "This matters: If you accidentally open a live VM disk image writable then "
16998 "you will cause irreversible disk corruption."
17002 #: ../fish/guestfish.pod:415
17004 "By libguestfs 1.8 we intend to change the default the other way. Disk "
17005 "images will be opened read-only. You will have to either specify "
17006 "I<guestfish --rw> or change a configuration file in order to get write "
17007 "access for disk images specified by those other command line options."
17011 #: ../fish/guestfish.pod:420
17013 "This version of guestfish has a I<--rw> option which does nothing (it is "
17014 "already the default). However it is highly recommended that you use this "
17015 "option to indicate that guestfish needs write access, and to prepare your "
17016 "scripts for the day when this option will be required for write access."
17020 #: ../fish/guestfish.pod:426
17022 "B<Note:> This does I<not> affect commands like L</add> and L</mount>, or any "
17023 "other libguestfs program apart from guestfish and guestmount."
17027 #: ../fish/guestfish.pod:429
17032 #: ../fish/guestfish.pod:431
17034 "You can quote ordinary parameters using either single or double quotes. For "
17039 #: ../fish/guestfish.pod:434
17042 " add \"file with a space.img\"\n"
17047 #: ../fish/guestfish.pod:436
17050 " rm '/file name'\n"
17055 #: ../fish/guestfish.pod:438
17063 #: ../fish/guestfish.pod:440
17065 "A few commands require a list of strings to be passed. For these, use a "
17066 "whitespace-separated list, enclosed in quotes. Strings containing "
17067 "whitespace to be passed through must be enclosed in single quotes. A "
17068 "literal single quote must be escaped with a backslash."
17072 #: ../fish/guestfish.pod:445
17075 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
17076 " command \"/bin/echo 'foo bar'\"\n"
17077 " command \"/bin/echo \\'foo\\'\"\n"
17082 #: ../fish/guestfish.pod:449
17083 msgid "OPTIONAL ARGUMENTS"
17087 #: ../fish/guestfish.pod:451
17089 "Some commands take optional arguments. These arguments appear in this "
17090 "documentation as C<[argname:..]>. You can use them as in these examples:"
17094 #: ../fish/guestfish.pod:455
17097 " add-drive-opts filename\n"
17102 #: ../fish/guestfish.pod:457
17105 " add-drive-opts filename readonly:true\n"
17110 #: ../fish/guestfish.pod:459
17113 " add-drive-opts filename format:qcow2 readonly:false\n"
17118 #: ../fish/guestfish.pod:461
17120 "Each optional argument can appear at most once. All optional arguments must "
17121 "appear after the required ones."
17125 #: ../fish/guestfish.pod:464
17130 #: ../fish/guestfish.pod:466
17131 msgid "This section applies to all commands which can take integers as parameters."
17135 #: ../fish/guestfish.pod:469
17136 msgid "SIZE SUFFIX"
17140 #: ../fish/guestfish.pod:471
17142 "When the command takes a parameter measured in bytes, you can use one of the "
17143 "following suffixes to specify kilobytes, megabytes and larger sizes:"
17147 #: ../fish/guestfish.pod:477
17148 msgid "B<k> or B<K> or B<KiB>"
17152 #: ../fish/guestfish.pod:479
17153 msgid "The size in kilobytes (multiplied by 1024)."
17157 #: ../fish/guestfish.pod:481
17162 #: ../fish/guestfish.pod:483
17163 msgid "The size in SI 1000 byte units."
17167 #: ../fish/guestfish.pod:485
17168 msgid "B<M> or B<MiB>"
17172 #: ../fish/guestfish.pod:487
17173 msgid "The size in megabytes (multiplied by 1048576)."
17177 #: ../fish/guestfish.pod:489
17182 #: ../fish/guestfish.pod:491
17183 msgid "The size in SI 1000000 byte units."
17187 #: ../fish/guestfish.pod:493
17188 msgid "B<G> or B<GiB>"
17192 #: ../fish/guestfish.pod:495
17193 msgid "The size in gigabytes (multiplied by 2**30)."
17197 #: ../fish/guestfish.pod:497
17202 #: ../fish/guestfish.pod:499
17203 msgid "The size in SI 10**9 byte units."
17207 #: ../fish/guestfish.pod:501
17208 msgid "B<T> or B<TiB>"
17212 #: ../fish/guestfish.pod:503
17213 msgid "The size in terabytes (multiplied by 2**40)."
17217 #: ../fish/guestfish.pod:505
17222 #: ../fish/guestfish.pod:507
17223 msgid "The size in SI 10**12 byte units."
17227 #: ../fish/guestfish.pod:509
17228 msgid "B<P> or B<PiB>"
17232 #: ../fish/guestfish.pod:511
17233 msgid "The size in petabytes (multiplied by 2**50)."
17237 #: ../fish/guestfish.pod:513
17242 #: ../fish/guestfish.pod:515
17243 msgid "The size in SI 10**15 byte units."
17247 #: ../fish/guestfish.pod:517
17248 msgid "B<E> or B<EiB>"
17252 #: ../fish/guestfish.pod:519
17253 msgid "The size in exabytes (multiplied by 2**60)."
17257 #: ../fish/guestfish.pod:521
17262 #: ../fish/guestfish.pod:523
17263 msgid "The size in SI 10**18 byte units."
17267 #: ../fish/guestfish.pod:525
17268 msgid "B<Z> or B<ZiB>"
17272 #: ../fish/guestfish.pod:527
17273 msgid "The size in zettabytes (multiplied by 2**70)."
17277 #: ../fish/guestfish.pod:529
17282 #: ../fish/guestfish.pod:531
17283 msgid "The size in SI 10**21 byte units."
17287 #: ../fish/guestfish.pod:533
17288 msgid "B<Y> or B<YiB>"
17292 #: ../fish/guestfish.pod:535
17293 msgid "The size in yottabytes (multiplied by 2**80)."
17297 #: ../fish/guestfish.pod:537
17302 #: ../fish/guestfish.pod:539
17303 msgid "The size in SI 10**24 byte units."
17307 #: ../fish/guestfish.pod:545
17310 " truncate-size /file 1G\n"
17315 #: ../fish/guestfish.pod:547
17316 msgid "would truncate the file to 1 gigabyte."
17320 #: ../fish/guestfish.pod:549
17322 "Be careful because a few commands take sizes in kilobytes or megabytes "
17323 "(eg. the parameter to L</memsize> is specified in megabytes already). "
17324 "Adding a suffix will probably not do what you expect."
17328 #: ../fish/guestfish.pod:553
17329 msgid "OCTAL AND HEXADECIMAL NUMBERS"
17333 #: ../fish/guestfish.pod:555
17335 "For specifying the radix (base) use the C convention: C<0> to prefix an "
17336 "octal number or C<0x> to prefix a hexadecimal number. For example:"
17340 #: ../fish/guestfish.pod:558
17343 " 1234 decimal number 1234\n"
17344 " 02322 octal number, equivalent to decimal 1234\n"
17345 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
17350 #: ../fish/guestfish.pod:562
17352 "When using the C<chmod> command, you almost always want to specify an octal "
17353 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
17354 "L<chmod(1)> program):"
17358 #: ../fish/guestfish.pod:566
17361 " chmod 0777 /public # OK\n"
17362 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
17367 #: ../fish/guestfish.pod:569
17369 "Commands that return numbers usually print them in decimal, but some "
17370 "commands print numbers in other radices (eg. C<umask> prints the mode in "
17371 "octal, preceeded by C<0>)."
17375 #: ../fish/guestfish.pod:573
17376 msgid "WILDCARDS AND GLOBBING"
17380 #: ../fish/guestfish.pod:575
17382 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
17383 "(globbing) by default. So for example the following will not do what you "
17388 #: ../fish/guestfish.pod:579
17396 #: ../fish/guestfish.pod:581
17398 "Assuming you don't have a directory called literally C</home/*> then the "
17399 "above command will return an error."
17403 #: ../fish/guestfish.pod:584
17404 msgid "To perform wildcard expansion, use the C<glob> command."
17408 #: ../fish/guestfish.pod:586
17411 " glob rm-rf /home/*\n"
17416 #: ../fish/guestfish.pod:588
17418 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
17419 "many times), equivalent to:"
17423 #: ../fish/guestfish.pod:591
17426 " rm-rf /home/jim\n"
17427 " rm-rf /home/joe\n"
17428 " rm-rf /home/mary\n"
17433 #: ../fish/guestfish.pod:595
17434 msgid "C<glob> only works on simple guest paths and not on device names."
17438 #: ../fish/guestfish.pod:597
17440 "If you have several parameters, each containing a wildcard, then glob will "
17441 "perform a Cartesian product."
17445 #: ../fish/guestfish.pod:600
17450 #: ../fish/guestfish.pod:602
17452 "Any line which starts with a I<#> character is treated as a comment and "
17453 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
17454 "a command. For example:"
17458 #: ../fish/guestfish.pod:606
17461 " # this is a comment\n"
17462 " # this is a comment\n"
17463 " foo # NOT a comment\n"
17468 #: ../fish/guestfish.pod:610
17469 msgid "Blank lines are also ignored."
17473 #: ../fish/guestfish.pod:612
17474 msgid "RUNNING COMMANDS LOCALLY"
17478 #: ../fish/guestfish.pod:614
17480 "Any line which starts with a I<!> character is treated as a command sent to "
17481 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
17485 #: ../fish/guestfish.pod:618
17489 " tgz-out /remote local/remote-data.tar.gz\n"
17494 #: ../fish/guestfish.pod:621
17496 "will create a directory C<local> on the host, and then export the contents "
17497 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
17498 "(See C<tgz-out>)."
17502 #: ../fish/guestfish.pod:625
17504 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
17505 "effect, due to the way that subprocesses work in Unix."
17509 #: ../fish/guestfish.pod:628
17514 #: ../fish/guestfish.pod:630
17516 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
17517 "command (a guestfish command) to the second command (any host command). For "
17522 #: ../fish/guestfish.pod:634
17525 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
17530 #: ../fish/guestfish.pod:636
17532 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
17533 "program). The above command would list all accounts in the guest filesystem "
17534 "which have UID 0, ie. root accounts including backdoors. Other examples:"
17538 #: ../fish/guestfish.pod:641
17541 " hexdump /bin/ls | head\n"
17542 " list-devices | tail -1\n"
17543 " tgz-out / - | tar ztf -\n"
17548 #: ../fish/guestfish.pod:645
17550 "The space before the pipe symbol is required, any space after the pipe "
17551 "symbol is optional. Everything after the pipe symbol is just passed "
17552 "straight to the host shell, so it can contain redirections, globs and "
17553 "anything else that makes sense on the host side."
17557 #: ../fish/guestfish.pod:650
17559 "To use a literal argument which begins with a pipe symbol, you have to quote "
17564 #: ../fish/guestfish.pod:653
17572 #: ../fish/guestfish.pod:655
17573 msgid "HOME DIRECTORIES"
17577 #: ../fish/guestfish.pod:657
17579 "If a parameter starts with the character C<~> then the tilde may be expanded "
17580 "as a home directory path (either C<~> for the current user's home directory, "
17581 "or C<~user> for another user)."
17585 #: ../fish/guestfish.pod:661
17587 "Note that home directory expansion happens for users known I<on the host>, "
17588 "not in the guest filesystem."
17592 #: ../fish/guestfish.pod:664
17594 "To use a literal argument which begins with a tilde, you have to quote it, "
17599 #: ../fish/guestfish.pod:667
17607 #: ../fish/guestfish.pod:671
17609 "Libguestfs has some support for Linux guests encrypted according to the "
17610 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
17611 "disk encryption systems used by modern Linux guests. Currently only "
17612 "LVM-on-LUKS is supported."
17616 #: ../fish/guestfish.pod:676
17617 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
17621 #: ../fish/guestfish.pod:678
17624 " ><fs> vfs-type /dev/sda2\n"
17630 #: ../fish/guestfish.pod:681
17632 "Then open those devices using L</luks-open>. This creates a device-mapper "
17633 "device called C</dev/mapper/luksdev>."
17637 #: ../fish/guestfish.pod:684
17640 " ><fs> luks-open /dev/sda2 luksdev\n"
17641 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
17646 #: ../fish/guestfish.pod:687
17648 "Finally you have to tell LVM to scan for volume groups on the newly created "
17653 #: ../fish/guestfish.pod:690
17657 " vg-activate-all true\n"
17662 #: ../fish/guestfish.pod:693
17663 msgid "The logical volume(s) can now be mounted in the usual way."
17667 #: ../fish/guestfish.pod:695
17669 "Before closing a LUKS device you must unmount any logical volumes on it and "
17670 "deactivate the volume groups by calling C<vg-activate false VG> on each "
17671 "one. Then you can close the mapper device:"
17675 #: ../fish/guestfish.pod:699
17678 " vg-activate false /dev/VG\n"
17679 " luks-close /dev/mapper/luksdev\n"
17684 #: ../fish/guestfish.pod:702
17685 msgid "WINDOWS PATHS"
17689 #: ../fish/guestfish.pod:704
17691 "If a path is prefixed with C<win:> then you can use Windows-style paths "
17692 "(with some limitations). The following commands are equivalent:"
17696 #: ../fish/guestfish.pod:707
17699 " file /WINDOWS/system32/config/system.LOG\n"
17704 #: ../fish/guestfish.pod:709
17707 " file win:/windows/system32/config/system.log\n"
17712 #: ../fish/guestfish.pod:711
17715 " file win:\\windows\\system32\\config\\system.log\n"
17720 #: ../fish/guestfish.pod:713
17723 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
17728 #: ../fish/guestfish.pod:715
17730 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
17731 "handles case insensitivity like Windows would. This only works in argument "
17732 "positions that expect a path."
17736 #: ../fish/guestfish.pod:719
17737 msgid "UPLOADING AND DOWNLOADING FILES"
17741 #: ../fish/guestfish.pod:721
17743 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
17744 "others which upload from or download to a local file, you can use the "
17745 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
17749 #: ../fish/guestfish.pod:725
17757 #: ../fish/guestfish.pod:727
17758 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
17762 #: ../fish/guestfish.pod:730
17765 " tar-out /etc - | tar tf -\n"
17770 #: ../fish/guestfish.pod:732
17772 "writes the tarball to stdout and then pipes that into the external \"tar\" "
17773 "command (see L</PIPES>)."
17777 #: ../fish/guestfish.pod:735
17779 "When using C<-> to read from stdin, the input is read up to the end of "
17780 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
17781 "some arbitrary end marker:"
17785 #: ../fish/guestfish.pod:739
17788 " upload -<<END /foo\n"
17797 #: ../fish/guestfish.pod:745
17799 "Any string of characters can be used instead of C<END>. The end marker must "
17800 "appear on a line of its own, without any preceeding or following characters "
17801 "(not even spaces)."
17805 #: ../fish/guestfish.pod:749
17807 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
17808 "upload local files (so-called \"FileIn\" parameters in the generator)."
17812 #: ../fish/guestfish.pod:752
17813 msgid "EXIT ON ERROR BEHAVIOUR"
17817 #: ../fish/guestfish.pod:754
17819 "By default, guestfish will ignore any errors when in interactive mode "
17820 "(ie. taking commands from a human over a tty), and will exit on the first "
17821 "error in non-interactive mode (scripts, commands given on the command line)."
17825 #: ../fish/guestfish.pod:759
17827 "If you prefix a command with a I<-> character, then that command will not "
17828 "cause guestfish to exit, even if that (one) command returns an error."
17832 #: ../fish/guestfish.pod:763
17833 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
17837 #: ../fish/guestfish.pod:765
17839 "Guestfish can be remote-controlled over a socket. This is useful "
17840 "particularly in shell scripts where you want to make several different "
17841 "changes to a filesystem, but you don't want the overhead of starting up a "
17842 "guestfish process each time."
17846 #: ../fish/guestfish.pod:770
17847 msgid "Start a guestfish server process using:"
17851 #: ../fish/guestfish.pod:772
17854 " eval \"`guestfish --listen`\"\n"
17859 #: ../fish/guestfish.pod:774
17860 msgid "and then send it commands by doing:"
17864 #: ../fish/guestfish.pod:776
17867 " guestfish --remote cmd [...]\n"
17872 #: ../fish/guestfish.pod:778
17873 msgid "To cause the server to exit, send it the exit command:"
17877 #: ../fish/guestfish.pod:780
17880 " guestfish --remote exit\n"
17885 #: ../fish/guestfish.pod:782
17887 "Note that the server will normally exit if there is an error in a command. "
17888 "You can change this in the usual way. See section L</EXIT ON ERROR "
17893 #: ../fish/guestfish.pod:786
17894 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
17898 #: ../fish/guestfish.pod:788
17900 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
17901 "is how the I<--remote> option knows where to send the commands. You can "
17902 "have several guestfish listener processes running using:"
17906 #: ../fish/guestfish.pod:792
17909 " eval \"`guestfish --listen`\"\n"
17910 " pid1=$GUESTFISH_PID\n"
17911 " eval \"`guestfish --listen`\"\n"
17912 " pid2=$GUESTFISH_PID\n"
17914 " guestfish --remote=$pid1 cmd\n"
17915 " guestfish --remote=$pid2 cmd\n"
17920 #: ../fish/guestfish.pod:800
17921 msgid "REMOTE CONTROL AND CSH"
17925 #: ../fish/guestfish.pod:802
17927 "When using csh-like shells (csh, tcsh etc) you have to add the I<--csh> "
17932 #: ../fish/guestfish.pod:805
17935 " eval \"`guestfish --listen --csh`\"\n"
17940 #: ../fish/guestfish.pod:807
17941 msgid "REMOTE CONTROL DETAILS"
17945 #: ../fish/guestfish.pod:809
17947 "Remote control happens over a Unix domain socket called "
17948 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
17949 "of the process, and C<$PID> is the process ID of the server."
17953 #: ../fish/guestfish.pod:813
17954 msgid "Guestfish client and server versions must match exactly."
17958 #: ../fish/guestfish.pod:815
17959 msgid "PREPARED DISK IMAGES"
17963 #: ../fish/guestfish.pod:817
17965 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
17966 "preformatted disk images that guestfish can make for you to save typing. "
17967 "This is particularly useful for testing purposes. This option is used "
17968 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
17969 "can be mixed with I<-a>)."
17973 #: ../fish/guestfish.pod:823
17975 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
17976 "the second and so on. Existing files in the current directory are "
17981 #: ../fish/guestfish.pod:827
17983 "The type briefly describes how the disk should be sized, partitioned, how "
17984 "filesystem(s) should be created, and how content should be added. "
17985 "Optionally the type can be followed by extra parameters, separated by C<:> "
17986 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
17987 "sparsely-allocated disk, containing a single partition, with the partition "
17988 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
17989 "on a 1GB disk instead."
17993 #: ../fish/guestfish.pod:835
17994 msgid "To list the available types and any extra parameters they take, run:"
17998 #: ../fish/guestfish.pod:839
18000 "Note that the prepared filesystem is not mounted. You would usually have to "
18001 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
18005 #: ../fish/guestfish.pod:843
18007 "If any I<-N> or I<--new> options are given, the guest is automatically "
18012 #: ../fish/guestfish.pod:848
18013 msgid "Create a 100MB disk with an ext4-formatted partition:"
18017 #: ../fish/guestfish.pod:850
18020 " guestfish -N fs:ext4\n"
18025 #: ../fish/guestfish.pod:852
18026 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
18030 #: ../fish/guestfish.pod:854
18033 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
18038 #: ../fish/guestfish.pod:856
18039 msgid "Create a blank 200MB disk:"
18043 #: ../fish/guestfish.pod:858
18046 " guestfish -N disk:200M\n"
18051 #: ../fish/guestfish.pod:860
18052 msgid "PROGRESS BARS"
18056 #: ../fish/guestfish.pod:862
18058 "Some (not all) long-running commands send progress notification messages as "
18059 "they are running. Guestfish turns these messages into progress bars."
18063 #: ../fish/guestfish.pod:866
18065 "When a command that supports progress bars takes longer than two seconds to "
18066 "run, and if progress bars are enabled, then you will see one appearing below "
18071 #: ../fish/guestfish.pod:870
18074 " ><fs> copy-size /large-file /another-file 2048M\n"
18075 " / 10% [#####-----------------------------------------] 00:30\n"
18080 #: ../fish/guestfish.pod:873
18082 "The spinner on the left hand side moves round once for every progress "
18083 "notification received from the backend. This is a (reasonably) golden "
18084 "assurance that the command is \"doing something\" even if the progress bar "
18085 "is not moving, because the command is able to send the progress "
18086 "notifications. When the bar reaches 100% and the command finishes, the "
18087 "spinner disappears."
18091 #: ../fish/guestfish.pod:880
18093 "Progress bars are enabled by default when guestfish is used interactively. "
18094 "You can enable them even for non-interactive modes using I<--progress-bars>, "
18095 "and you can disable them completely using I<--no-progress-bars>."
18099 #: ../fish/guestfish.pod:885
18100 msgid "GUESTFISH COMMANDS"
18104 #: ../fish/guestfish.pod:887
18106 "The commands in this section are guestfish convenience commands, in other "
18107 "words, they are not part of the L<guestfs(3)> API."
18111 #: ../fish/guestfish.pod:890
18116 #: ../fish/guestfish.pod:892
18125 #: ../fish/guestfish.pod:895
18126 msgid "Without any parameter, this provides general help."
18130 #: ../fish/guestfish.pod:897
18131 msgid "With a C<cmd> parameter, this displays detailed help for that command."
18135 #: ../fish/guestfish.pod:899
18136 msgid "quit | exit"
18140 #: ../fish/guestfish.pod:901
18141 msgid "This exits guestfish. You can also use C<^D> key."
18145 #: ../fish/guestfish.pod:903
18146 msgid "@FISH_COMMANDS@"
18150 #: ../fish/guestfish.pod:905
18155 #: ../fish/guestfish.pod:909 ../test-tool/libguestfs-test-tool.pod:83
18160 #: ../fish/guestfish.pod:911
18162 "guestfish returns 0 if the commands completed without error, or 1 if there "
18167 #: ../fish/guestfish.pod:918
18172 #: ../fish/guestfish.pod:920
18174 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
18179 #: ../fish/guestfish.pod:923
18180 msgid "GUESTFISH_PID"
18184 #: ../fish/guestfish.pod:925
18186 "Used with the I<--remote> option to specify the remote guestfish process to "
18187 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
18191 #: ../fish/guestfish.pod:929
18196 #: ../fish/guestfish.pod:931
18198 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
18199 "not specified, the external L<hexedit(1)> program is used."
18203 #: ../fish/guestfish.pod:935
18208 #: ../fish/guestfish.pod:937
18210 "If compiled with GNU readline support, various files in the home directory "
18211 "can be used. See L</FILES>."
18215 #: ../fish/guestfish.pod:946
18217 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
18218 "effect as using the B<-v> option."
18222 #: ../fish/guestfish.pod:958
18224 "Set the path that guestfish uses to search for kernel and initrd.img. See "
18225 "the discussion of paths in L<guestfs(3)>."
18229 #: ../fish/guestfish.pod:969
18230 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
18234 #: ../fish/guestfish.pod:971
18239 #: ../fish/guestfish.pod:973
18241 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
18246 #: ../fish/guestfish.pod:988 ../test-tool/libguestfs-test-tool.pod:88
18251 #: ../fish/guestfish.pod:992
18252 msgid "$HOME/.guestfish"
18256 #: ../fish/guestfish.pod:994
18258 "If compiled with GNU readline support, then the command history is saved in "
18263 #: ../fish/guestfish.pod:997
18264 msgid "$HOME/.inputrc"
18268 #: ../fish/guestfish.pod:999
18269 msgid "/etc/inputrc"
18273 #: ../fish/guestfish.pod:1001
18275 "If compiled with GNU readline support, then these files can be used to "
18276 "configure readline. For further information, please see "
18277 "L<readline(3)/INITIALIZATION FILE>."
18281 #: ../fish/guestfish.pod:1005
18282 msgid "To write rules which only apply to guestfish, use:"
18286 #: ../fish/guestfish.pod:1007
18296 #: ../fish/guestfish.pod:1011
18298 "Variables that you can set in inputrc that change the behaviour of guestfish "
18299 "in useful ways include:"
18303 #: ../fish/guestfish.pod:1016
18304 msgid "completion-ignore-case (default: on)"
18308 #: ../fish/guestfish.pod:1018
18310 "By default, guestfish will ignore case when tab-completing paths on the "
18315 #: ../fish/guestfish.pod:1021
18318 " set completion-ignore-case off\n"
18323 #: ../fish/guestfish.pod:1023
18324 msgid "to make guestfish case sensitive."
18328 #: ../fish/guestfish.pod:1027
18333 #: ../fish/guestfish.pod:1029
18334 msgid "test2.img (etc)"
18338 #: ../fish/guestfish.pod:1031
18340 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
18341 "will be created in the file C<test1.img> in the current directory. The "
18342 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
18343 "the same name will be overwritten."
18347 #: ../fish/guestfish.pod:1040
18349 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
18350 "L<virt-edit(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, "
18351 "L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
18352 "L<virt-tar(1)>, L<virt-win-reg(1)>, L<hexedit(1)>."
18356 #: ../fish/guestfish.pod:1064 ../test-tool/libguestfs-test-tool.pod:124 ../fuse/guestmount.pod:253 ../inspector/virt-inspector.pl:564 ../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
18358 "This program is free software; you can redistribute it and/or modify it "
18359 "under the terms of the GNU General Public License as published by the Free "
18360 "Software Foundation; either version 2 of the License, or (at your option) "
18361 "any later version."
18365 #: ../fish/guestfish.pod:1069 ../test-tool/libguestfs-test-tool.pod:129 ../fuse/guestmount.pod:258 ../inspector/virt-inspector.pl:569 ../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
18367 "This program is distributed in the hope that it will be useful, but WITHOUT "
18368 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
18369 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
18374 #: ../fish/guestfish.pod:1074 ../test-tool/libguestfs-test-tool.pod:134 ../fuse/guestmount.pod:263 ../inspector/virt-inspector.pl:574 ../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
18376 "You should have received a copy of the GNU General Public License along with "
18377 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
18378 "Ave, Cambridge, MA 02139, USA."
18382 #: ../fish/guestfish-actions.pod:1
18387 #: ../fish/guestfish-actions.pod:3
18390 " add-cdrom filename\n"
18395 #: ../fish/guestfish-actions.pod:15
18397 "This call checks for the existence of C<filename>. This stops you from "
18398 "specifying other types of drive which are supported by qemu such as C<nbd:> "
18399 "and C<http:> URLs. To specify those, use the general L</config> call "
18404 #: ../fish/guestfish-actions.pod:22
18406 "If you just want to add an ISO file (often you use this as an efficient way "
18407 "to transfer large files into the guest), then you should probably use "
18408 "L</add-drive-ro> instead."
18412 #: ../fish/guestfish-actions.pod:35
18417 #: ../fish/guestfish-actions.pod:37
18422 #: ../fish/guestfish-actions.pod:39
18425 " add-domain dom [libvirturi:..] [readonly:..] [iface:..]\n"
18430 #: ../fish/guestfish-actions.pod:41
18432 "This function adds the disk(s) attached to the named libvirt domain C<dom>. "
18433 "It works by connecting to libvirt, requesting the domain and domain XML from "
18434 "libvirt, parsing it for disks, and calling L</add-drive-opts> on each one."
18438 #: ../fish/guestfish-actions.pod:58
18440 "The optional C<libvirturi> parameter sets the libvirt URI (see "
18441 "L<http://libvirt.org/uri.html>). If this is not set then we connect to the "
18442 "default libvirt URI (or one set through an environment variable, see the "
18443 "libvirt documentation for full details). If you are using the C API "
18444 "directly then it is more flexible to create the libvirt connection object "
18445 "yourself, get the domain object, and call L</add-libvirt-dom>."
18449 #: ../fish/guestfish-actions.pod:66
18451 "The other optional parameters are passed directly through to "
18452 "L</add-drive-opts>."
18456 #: ../fish/guestfish-actions.pod:69 ../fish/guestfish-actions.pod:133
18458 "This command has one or more optional arguments. See L</OPTIONAL "
18463 #: ../fish/guestfish-actions.pod:71
18468 #: ../fish/guestfish-actions.pod:73
18471 " add-drive filename\n"
18476 #: ../fish/guestfish-actions.pod:75
18478 "This function is the equivalent of calling L</add-drive-opts> with no "
18479 "optional parameters, so the disk is added writable, with the format being "
18480 "detected automatically."
18484 #: ../fish/guestfish-actions.pod:79
18486 "Automatic detection of the format opens you up to a potential security hole "
18487 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
18488 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
18489 "you should think about replacing calls to this function with calls to "
18490 "L</add-drive-opts>, and specifying the format."
18494 #: ../fish/guestfish-actions.pod:86
18495 msgid "add-drive-opts"
18499 #: ../fish/guestfish-actions.pod:88
18504 #: ../fish/guestfish-actions.pod:90
18507 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
18512 #: ../fish/guestfish-actions.pod:117
18514 "This forces the image format. If you omit this (or use L</add-drive> or "
18515 "L</add-drive-ro>) then the format is automatically detected. Possible "
18516 "formats include C<raw> and C<qcow2>."
18520 #: ../fish/guestfish-actions.pod:128
18522 "This rarely-used option lets you emulate the behaviour of the deprecated "
18523 "L</add-drive-with-if> call (q.v.)"
18527 #: ../fish/guestfish-actions.pod:135
18528 msgid "add-drive-ro"
18532 #: ../fish/guestfish-actions.pod:137
18537 #: ../fish/guestfish-actions.pod:139
18540 " add-drive-ro filename\n"
18545 #: ../fish/guestfish-actions.pod:141
18547 "This function is the equivalent of calling L</add-drive-opts> with the "
18548 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
18549 "is added read-only, with the format being detected automatically."
18553 #: ../fish/guestfish-actions.pod:146
18554 msgid "add-drive-ro-with-if"
18558 #: ../fish/guestfish-actions.pod:148
18561 " add-drive-ro-with-if filename iface\n"
18566 #: ../fish/guestfish-actions.pod:150
18568 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
18569 "interface emulation to use at run time."
18573 #: ../fish/guestfish-actions.pod:160
18574 msgid "add-drive-with-if"
18578 #: ../fish/guestfish-actions.pod:162
18581 " add-drive-with-if filename iface\n"
18586 #: ../fish/guestfish-actions.pod:164
18588 "This is the same as L</add-drive> but it allows you to specify the QEMU "
18589 "interface emulation to use at run time."
18593 #: ../fish/guestfish-actions.pod:174
18598 #: ../fish/guestfish-actions.pod:176
18601 " aug-clear augpath\n"
18606 #: ../fish/guestfish-actions.pod:181
18611 #: ../fish/guestfish-actions.pod:183
18619 #: ../fish/guestfish-actions.pod:185
18621 "Close the current Augeas handle and free up any resources used by it. After "
18622 "calling this, you have to call L</aug-init> again before you can use any "
18623 "other Augeas functions."
18627 #: ../fish/guestfish-actions.pod:190
18628 msgid "aug-defnode"
18632 #: ../fish/guestfish-actions.pod:192
18635 " aug-defnode name expr val\n"
18640 #: ../fish/guestfish-actions.pod:197
18642 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
18643 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
18644 "containing that single node."
18648 #: ../fish/guestfish-actions.pod:205
18653 #: ../fish/guestfish-actions.pod:207
18656 " aug-defvar name expr\n"
18661 #: ../fish/guestfish-actions.pod:216
18666 #: ../fish/guestfish-actions.pod:218
18669 " aug-get augpath\n"
18674 #: ../fish/guestfish-actions.pod:223
18679 #: ../fish/guestfish-actions.pod:225
18682 " aug-init root flags\n"
18687 #: ../fish/guestfish-actions.pod:231
18688 msgid "You must call this before using any other L</aug-*> commands."
18692 #: ../fish/guestfish-actions.pod:266
18693 msgid "Do not load the tree in L</aug-init>."
18697 #: ../fish/guestfish-actions.pod:270
18698 msgid "To close the handle, you can call L</aug-close>."
18702 #: ../fish/guestfish-actions.pod:274
18707 #: ../fish/guestfish-actions.pod:276
18710 " aug-insert augpath label true|false\n"
18715 #: ../fish/guestfish-actions.pod:286
18720 #: ../fish/guestfish-actions.pod:288
18728 #: ../fish/guestfish-actions.pod:295
18733 #: ../fish/guestfish-actions.pod:297
18736 " aug-ls augpath\n"
18741 #: ../fish/guestfish-actions.pod:299
18743 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
18744 "resulting nodes into alphabetical order."
18748 #: ../fish/guestfish-actions.pod:302
18753 #: ../fish/guestfish-actions.pod:304
18756 " aug-match augpath\n"
18761 #: ../fish/guestfish-actions.pod:310
18766 #: ../fish/guestfish-actions.pod:312
18769 " aug-mv src dest\n"
18774 #: ../fish/guestfish-actions.pod:317
18779 #: ../fish/guestfish-actions.pod:319
18782 " aug-rm augpath\n"
18787 #: ../fish/guestfish-actions.pod:325
18792 #: ../fish/guestfish-actions.pod:327
18800 #: ../fish/guestfish-actions.pod:331
18802 "The flags which were passed to L</aug-init> affect exactly how files are "
18807 #: ../fish/guestfish-actions.pod:334
18812 #: ../fish/guestfish-actions.pod:336
18815 " aug-set augpath val\n"
18820 #: ../fish/guestfish-actions.pod:340
18822 "In the Augeas API, it is possible to clear a node by setting the value to "
18823 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
18824 "this call. Instead you must use the L</aug-clear> call."
18828 #: ../fish/guestfish-actions.pod:345
18833 #: ../fish/guestfish-actions.pod:347
18836 " available 'groups ...'\n"
18841 #: ../fish/guestfish-actions.pod:353
18843 "The libguestfs groups, and the functions that those groups correspond to, "
18844 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
18845 "runtime by calling L</available-all-groups>."
18849 #: ../fish/guestfish-actions.pod:377
18850 msgid "You must call L</launch> before calling this function."
18854 #: ../fish/guestfish-actions.pod:399
18856 "This call was added in version C<1.0.80>. In previous versions of "
18857 "libguestfs all you could do would be to speculatively execute a command to "
18858 "find out if the daemon implemented it. See also L</version>."
18862 #: ../fish/guestfish-actions.pod:406
18863 msgid "available-all-groups"
18867 #: ../fish/guestfish-actions.pod:408
18870 " available-all-groups\n"
18875 #: ../fish/guestfish-actions.pod:410
18877 "This command returns a list of all optional groups that this daemon knows "
18878 "about. Note this returns both supported and unsupported groups. To find "
18879 "out which ones the daemon can actually support you have to call "
18880 "L</available> on each member of the returned list."
18884 #: ../fish/guestfish-actions.pod:416
18885 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
18889 #: ../fish/guestfish-actions.pod:418
18894 #: ../fish/guestfish-actions.pod:420
18897 " base64-in (base64file|-) filename\n"
18902 #: ../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:4006 ../fish/guestfish-actions.pod:4018 ../fish/guestfish-actions.pod:4029 ../fish/guestfish-actions.pod:4040 ../fish/guestfish-actions.pod:4092 ../fish/guestfish-actions.pod:4101 ../fish/guestfish-actions.pod:4155 ../fish/guestfish-actions.pod:4178
18903 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
18907 #: ../fish/guestfish-actions.pod:427
18912 #: ../fish/guestfish-actions.pod:429
18915 " base64-out filename (base64file|-)\n"
18920 #: ../fish/guestfish-actions.pod:436
18921 msgid "blockdev-flushbufs"
18925 #: ../fish/guestfish-actions.pod:438
18928 " blockdev-flushbufs device\n"
18933 #: ../fish/guestfish-actions.pod:445
18934 msgid "blockdev-getbsz"
18938 #: ../fish/guestfish-actions.pod:447
18941 " blockdev-getbsz device\n"
18946 #: ../fish/guestfish-actions.pod:456
18947 msgid "blockdev-getro"
18951 #: ../fish/guestfish-actions.pod:458
18954 " blockdev-getro device\n"
18959 #: ../fish/guestfish-actions.pod:465
18960 msgid "blockdev-getsize64"
18964 #: ../fish/guestfish-actions.pod:467
18967 " blockdev-getsize64 device\n"
18972 #: ../fish/guestfish-actions.pod:471
18973 msgid "See also L</blockdev-getsz>."
18977 #: ../fish/guestfish-actions.pod:475
18978 msgid "blockdev-getss"
18982 #: ../fish/guestfish-actions.pod:477
18985 " blockdev-getss device\n"
18990 #: ../fish/guestfish-actions.pod:482
18991 msgid "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
18995 #: ../fish/guestfish-actions.pod:487
18996 msgid "blockdev-getsz"
19000 #: ../fish/guestfish-actions.pod:489
19003 " blockdev-getsz device\n"
19008 #: ../fish/guestfish-actions.pod:494
19010 "See also L</blockdev-getss> for the real sector size of the device, and "
19011 "L</blockdev-getsize64> for the more useful I<size in bytes>."
19015 #: ../fish/guestfish-actions.pod:500
19016 msgid "blockdev-rereadpt"
19020 #: ../fish/guestfish-actions.pod:502
19023 " blockdev-rereadpt device\n"
19028 #: ../fish/guestfish-actions.pod:508
19029 msgid "blockdev-setbsz"
19033 #: ../fish/guestfish-actions.pod:510
19036 " blockdev-setbsz device blocksize\n"
19041 #: ../fish/guestfish-actions.pod:519
19042 msgid "blockdev-setro"
19046 #: ../fish/guestfish-actions.pod:521
19049 " blockdev-setro device\n"
19054 #: ../fish/guestfish-actions.pod:527
19055 msgid "blockdev-setrw"
19059 #: ../fish/guestfish-actions.pod:529
19062 " blockdev-setrw device\n"
19067 #: ../fish/guestfish-actions.pod:535
19068 msgid "case-sensitive-path"
19072 #: ../fish/guestfish-actions.pod:537
19075 " case-sensitive-path path\n"
19080 #: ../fish/guestfish-actions.pod:561
19082 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return "
19083 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
19084 "how the directories were originally created under Windows)."
19088 #: ../fish/guestfish-actions.pod:569
19089 msgid "See also L</realpath>."
19093 #: ../fish/guestfish-actions.pod:571
19098 #: ../fish/guestfish-actions.pod:573
19106 #: ../fish/guestfish-actions.pod:577
19108 "Note that this function cannot correctly handle binary files (specifically, "
19109 "files containing C<\\0> character which is treated as end of string). For "
19110 "those you need to use the L</read-file> or L</download> functions which have "
19111 "a more complex interface."
19115 #: ../fish/guestfish-actions.pod:585
19120 #: ../fish/guestfish-actions.pod:587
19123 " checksum csumtype path\n"
19128 #: ../fish/guestfish-actions.pod:630
19129 msgid "To get the checksum for a device, use L</checksum-device>."
19133 #: ../fish/guestfish-actions.pod:632
19134 msgid "To get the checksums for many files, use L</checksums-out>."
19138 #: ../fish/guestfish-actions.pod:634
19139 msgid "checksum-device"
19143 #: ../fish/guestfish-actions.pod:636
19146 " checksum-device csumtype device\n"
19151 #: ../fish/guestfish-actions.pod:638
19153 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
19154 "device named C<device>. For the types of checksums supported see the "
19155 "L</checksum> command."
19159 #: ../fish/guestfish-actions.pod:642
19160 msgid "checksums-out"
19164 #: ../fish/guestfish-actions.pod:644
19167 " checksums-out csumtype directory (sumsfile|-)\n"
19172 #: ../fish/guestfish-actions.pod:660
19177 #: ../fish/guestfish-actions.pod:662
19180 " chmod mode path\n"
19185 #: ../fish/guestfish-actions.pod:673
19190 #: ../fish/guestfish-actions.pod:675
19193 " chown owner group path\n"
19198 #: ../fish/guestfish-actions.pod:683
19203 #: ../fish/guestfish-actions.pod:685
19206 " command 'arguments ...'\n"
19211 #: ../fish/guestfish-actions.pod:692
19213 "The single parameter is an argv-style list of arguments. The first element "
19214 "is the name of the program to run. Subsequent elements are parameters. The "
19215 "list must be non-empty (ie. must contain a program name). Note that the "
19216 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
19220 #: ../fish/guestfish-actions.pod:720
19221 msgid "command-lines"
19225 #: ../fish/guestfish-actions.pod:722
19228 " command-lines 'arguments ...'\n"
19233 #: ../fish/guestfish-actions.pod:724
19234 msgid "This is the same as L</command>, but splits the result into a list of lines."
19238 #: ../fish/guestfish-actions.pod:727
19239 msgid "See also: L</sh-lines>"
19243 #: ../fish/guestfish-actions.pod:732
19248 #: ../fish/guestfish-actions.pod:734
19251 " config qemuparam qemuvalue\n"
19256 #: ../fish/guestfish-actions.pod:745
19261 #: ../fish/guestfish-actions.pod:747
19264 " copy-size src dest size\n"
19269 #: ../fish/guestfish-actions.pod:755
19274 #: ../fish/guestfish-actions.pod:757
19282 #: ../fish/guestfish-actions.pod:762
19287 #: ../fish/guestfish-actions.pod:764
19295 #: ../fish/guestfish-actions.pod:769
19300 #: ../fish/guestfish-actions.pod:771
19308 #: ../fish/guestfish-actions.pod:778
19310 "If the destination is a device, it must be as large or larger than the "
19311 "source file or device, otherwise the copy will fail. This command cannot do "
19312 "partial copies (see L</copy-size>)."
19316 #: ../fish/guestfish-actions.pod:782
19321 #: ../fish/guestfish-actions.pod:784
19329 #: ../fish/guestfish-actions.pod:792
19334 #: ../fish/guestfish-actions.pod:794
19342 #: ../fish/guestfish-actions.pod:803
19347 #: ../fish/guestfish-actions.pod:805
19355 #: ../fish/guestfish-actions.pod:811
19357 "Another way to get the same information is to enable verbose messages with "
19358 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
19359 "before running the program."
19363 #: ../fish/guestfish-actions.pod:816
19368 #: ../fish/guestfish-actions.pod:818
19371 " download remotefilename (filename|-)\n"
19376 #: ../fish/guestfish-actions.pod:825
19377 msgid "See also L</upload>, L</cat>."
19381 #: ../fish/guestfish-actions.pod:829
19382 msgid "download-offset"
19386 #: ../fish/guestfish-actions.pod:831
19389 " download-offset remotefilename (filename|-) offset size\n"
19394 #: ../fish/guestfish-actions.pod:839
19396 "Note that there is no limit on the amount of data that can be downloaded "
19397 "with this call, unlike with L</pread>, and this call always reads the full "
19398 "amount unless an error occurs."
19402 #: ../fish/guestfish-actions.pod:844
19403 msgid "See also L</download>, L</pread>."
19407 #: ../fish/guestfish-actions.pod:848
19408 msgid "drop-caches"
19412 #: ../fish/guestfish-actions.pod:850
19415 " drop-caches whattodrop\n"
19420 #: ../fish/guestfish-actions.pod:862
19425 #: ../fish/guestfish-actions.pod:864
19433 #: ../fish/guestfish-actions.pod:876
19438 #: ../fish/guestfish-actions.pod:878
19441 " e2fsck-f device\n"
19446 #: ../fish/guestfish-actions.pod:884
19448 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
19449 "should use L</fsck>."
19453 #: ../fish/guestfish-actions.pod:887
19454 msgid "echo-daemon"
19458 #: ../fish/guestfish-actions.pod:889
19461 " echo-daemon 'words ...'\n"
19466 #: ../fish/guestfish-actions.pod:896
19467 msgid "See also L</ping-daemon>."
19471 #: ../fish/guestfish-actions.pod:898
19476 #: ../fish/guestfish-actions.pod:900
19479 " egrep regex path\n"
19484 #: ../fish/guestfish-actions.pod:908
19489 #: ../fish/guestfish-actions.pod:910
19492 " egrepi regex path\n"
19497 #: ../fish/guestfish-actions.pod:918
19502 #: ../fish/guestfish-actions.pod:920
19505 " equal file1 file2\n"
19510 #: ../fish/guestfish-actions.pod:927
19515 #: ../fish/guestfish-actions.pod:929
19523 #: ../fish/guestfish-actions.pod:934
19524 msgid "See also L</is-file>, L</is-dir>, L</stat>."
19528 #: ../fish/guestfish-actions.pod:936
19533 #: ../fish/guestfish-actions.pod:938
19536 " fallocate path len\n"
19541 #: ../fish/guestfish-actions.pod:955
19542 msgid "fallocate64"
19546 #: ../fish/guestfish-actions.pod:957
19549 " fallocate64 path len\n"
19554 #: ../fish/guestfish-actions.pod:963
19556 "Note that this call allocates disk blocks for the file. To create a sparse "
19557 "file use L</truncate-size> instead."
19561 #: ../fish/guestfish-actions.pod:966
19563 "The deprecated call L</fallocate> does the same, but owing to an oversight "
19564 "it only allowed 30 bit lengths to be specified, effectively limiting the "
19565 "maximum size of files created through that call to 1GB."
19569 #: ../fish/guestfish-actions.pod:975
19574 #: ../fish/guestfish-actions.pod:977
19577 " fgrep pattern path\n"
19582 #: ../fish/guestfish-actions.pod:985
19587 #: ../fish/guestfish-actions.pod:987
19590 " fgrepi pattern path\n"
19595 #: ../fish/guestfish-actions.pod:995
19600 #: ../fish/guestfish-actions.pod:997
19608 #: ../fish/guestfish-actions.pod:1009
19610 "This command can also be used on C</dev/> devices (and partitions, LV "
19611 "names). You can for example use this to determine if a device contains a "
19612 "filesystem, although it's usually better to use L</vfs-type>."
19616 #: ../fish/guestfish-actions.pod:1019
19617 msgid "file-architecture"
19621 #: ../fish/guestfish-actions.pod:1021
19624 " file-architecture filename\n"
19629 #: ../fish/guestfish-actions.pod:1124
19634 #: ../fish/guestfish-actions.pod:1126
19642 #: ../fish/guestfish-actions.pod:1130
19644 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, "
19645 "L</is-file> etc. To get the size of block devices, use "
19646 "L</blockdev-getsize64>."
19650 #: ../fish/guestfish-actions.pod:1134
19655 #: ../fish/guestfish-actions.pod:1136
19658 " fill c len path\n"
19663 #: ../fish/guestfish-actions.pod:1142
19665 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
19666 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
19667 "L</fill-pattern>."
19671 #: ../fish/guestfish-actions.pod:1147
19672 msgid "fill-pattern"
19676 #: ../fish/guestfish-actions.pod:1149
19679 " fill-pattern pattern len path\n"
19684 #: ../fish/guestfish-actions.pod:1151
19686 "This function is like L</fill> except that it creates a new file of length "
19687 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
19688 "is truncated if necessary to ensure the length of the file is exactly C<len> "
19693 #: ../fish/guestfish-actions.pod:1156
19698 #: ../fish/guestfish-actions.pod:1158
19701 " find directory\n"
19706 #: ../fish/guestfish-actions.pod:1172
19707 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
19711 #: ../fish/guestfish-actions.pod:1185
19712 msgid "See also L</find0>."
19716 #: ../fish/guestfish-actions.pod:1190
19721 #: ../fish/guestfish-actions.pod:1192
19724 " find0 directory (files|-)\n"
19729 #: ../fish/guestfish-actions.pod:1198
19730 msgid "This command works the same way as L</find> with the following exceptions:"
19734 #: ../fish/guestfish-actions.pod:1225
19735 msgid "findfs-label"
19739 #: ../fish/guestfish-actions.pod:1227
19742 " findfs-label label\n"
19747 #: ../fish/guestfish-actions.pod:1233
19748 msgid "To find the label of a filesystem, use L</vfs-label>."
19752 #: ../fish/guestfish-actions.pod:1235
19753 msgid "findfs-uuid"
19757 #: ../fish/guestfish-actions.pod:1237
19760 " findfs-uuid uuid\n"
19765 #: ../fish/guestfish-actions.pod:1243
19766 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
19770 #: ../fish/guestfish-actions.pod:1245
19775 #: ../fish/guestfish-actions.pod:1247
19778 " fsck fstype device\n"
19783 #: ../fish/guestfish-actions.pod:1277
19788 #: ../fish/guestfish-actions.pod:1279
19796 #: ../fish/guestfish-actions.pod:1286
19797 msgid "get-autosync"
19801 #: ../fish/guestfish-actions.pod:1288
19809 #: ../fish/guestfish-actions.pod:1292
19814 #: ../fish/guestfish-actions.pod:1294
19822 #: ../fish/guestfish-actions.pod:1298
19823 msgid "get-e2label"
19827 #: ../fish/guestfish-actions.pod:1300
19830 " get-e2label device\n"
19835 #: ../fish/guestfish-actions.pod:1312
19840 #: ../fish/guestfish-actions.pod:1314
19843 " get-e2uuid device\n"
19848 #: ../fish/guestfish-actions.pod:1326
19849 msgid "get-memsize"
19853 #: ../fish/guestfish-actions.pod:1328
19861 #: ../fish/guestfish-actions.pod:1333
19863 "If L</set-memsize> was not called on this handle, and if "
19864 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
19865 "value for memsize."
19869 #: ../fish/guestfish-actions.pod:1340
19870 msgid "get-network"
19874 #: ../fish/guestfish-actions.pod:1342
19882 #: ../fish/guestfish-actions.pod:1346
19887 #: ../fish/guestfish-actions.pod:1348
19895 #: ../fish/guestfish-actions.pod:1355
19900 #: ../fish/guestfish-actions.pod:1357
19905 #: ../fish/guestfish-actions.pod:1359
19913 #: ../fish/guestfish-actions.pod:1366
19918 #: ../fish/guestfish-actions.pod:1368
19926 #: ../fish/guestfish-actions.pod:1375
19927 msgid "get-recovery-proc"
19931 #: ../fish/guestfish-actions.pod:1377
19934 " get-recovery-proc\n"
19939 #: ../fish/guestfish-actions.pod:1381
19940 msgid "get-selinux"
19944 #: ../fish/guestfish-actions.pod:1383
19952 #: ../fish/guestfish-actions.pod:1385
19954 "This returns the current setting of the selinux flag which is passed to the "
19955 "appliance at boot time. See L</set-selinux>."
19959 #: ../fish/guestfish-actions.pod:1391
19964 #: ../fish/guestfish-actions.pod:1393
19972 #: ../fish/guestfish-actions.pod:1400
19977 #: ../fish/guestfish-actions.pod:1402
19985 #: ../fish/guestfish-actions.pod:1406
19990 #: ../fish/guestfish-actions.pod:1408
19998 #: ../fish/guestfish-actions.pod:1410
20000 "Return the current umask. By default the umask is C<022> unless it has been "
20001 "set by calling L</umask>."
20005 #: ../fish/guestfish-actions.pod:1413
20006 msgid "get-verbose"
20010 #: ../fish/guestfish-actions.pod:1415
20018 #: ../fish/guestfish-actions.pod:1419
20023 #: ../fish/guestfish-actions.pod:1421
20031 #: ../fish/guestfish-actions.pod:1425
20032 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
20036 #: ../fish/guestfish-actions.pod:1428
20041 #: ../fish/guestfish-actions.pod:1430
20044 " getxattrs path\n"
20049 #: ../fish/guestfish-actions.pod:1438
20050 msgid "See also: L</lgetxattrs>, L<attr(5)>."
20054 #: ../fish/guestfish-actions.pod:1440
20055 msgid "glob-expand"
20059 #: ../fish/guestfish-actions.pod:1442
20062 " glob-expand pattern\n"
20067 #: ../fish/guestfish-actions.pod:1455
20072 #: ../fish/guestfish-actions.pod:1457
20075 " grep regex path\n"
20080 #: ../fish/guestfish-actions.pod:1465
20085 #: ../fish/guestfish-actions.pod:1467
20088 " grepi regex path\n"
20093 #: ../fish/guestfish-actions.pod:1475
20094 msgid "grub-install"
20098 #: ../fish/guestfish-actions.pod:1477
20101 " grub-install root device\n"
20106 #: ../fish/guestfish-actions.pod:1493
20111 #: ../fish/guestfish-actions.pod:1495
20119 #: ../fish/guestfish-actions.pod:1503
20124 #: ../fish/guestfish-actions.pod:1505
20127 " head-n nrlines path\n"
20132 #: ../fish/guestfish-actions.pod:1518
20137 #: ../fish/guestfish-actions.pod:1520
20145 #: ../fish/guestfish-actions.pod:1528
20150 #: ../fish/guestfish-actions.pod:1530
20153 " initrd-cat initrdpath filename\n"
20158 #: ../fish/guestfish-actions.pod:1542
20159 msgid "See also L</initrd-list>."
20163 #: ../fish/guestfish-actions.pod:1547
20164 msgid "initrd-list"
20168 #: ../fish/guestfish-actions.pod:1549
20171 " initrd-list path\n"
20176 #: ../fish/guestfish-actions.pod:1561
20177 msgid "inotify-add-watch"
20181 #: ../fish/guestfish-actions.pod:1563
20184 " inotify-add-watch path mask\n"
20189 #: ../fish/guestfish-actions.pod:1575
20190 msgid "inotify-close"
20194 #: ../fish/guestfish-actions.pod:1577
20202 #: ../fish/guestfish-actions.pod:1583
20203 msgid "inotify-files"
20207 #: ../fish/guestfish-actions.pod:1585
20215 #: ../fish/guestfish-actions.pod:1587
20217 "This function is a helpful wrapper around L</inotify-read> which just "
20218 "returns a list of pathnames of objects that were touched. The returned "
20219 "pathnames are sorted and deduplicated."
20223 #: ../fish/guestfish-actions.pod:1591
20224 msgid "inotify-init"
20228 #: ../fish/guestfish-actions.pod:1593
20231 " inotify-init maxevents\n"
20236 #: ../fish/guestfish-actions.pod:1599
20238 "C<maxevents> is the maximum number of events which will be queued up between "
20239 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
20240 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
20241 "default was 16384 events. Beyond this limit, the kernel throws away events, "
20242 "but records the fact that it threw them away by setting a flag "
20243 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
20247 #: ../fish/guestfish-actions.pod:1609
20249 "Before any events are generated, you have to add some watches to the "
20250 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
20251 "L</inotify-watch-all>."
20255 #: ../fish/guestfish-actions.pod:1615
20257 "Queued up events should be read periodically by calling L</inotify-read> (or "
20258 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
20259 "If you don't read the events out often enough then you risk the internal "
20260 "queue overflowing."
20264 #: ../fish/guestfish-actions.pod:1622
20266 "The handle should be closed after use by calling L</inotify-close>. This "
20267 "also removes any watches automatically."
20271 #: ../fish/guestfish-actions.pod:1631
20272 msgid "inotify-read"
20276 #: ../fish/guestfish-actions.pod:1633
20284 #: ../fish/guestfish-actions.pod:1646
20285 msgid "inotify-rm-watch"
20289 #: ../fish/guestfish-actions.pod:1648
20292 " inotify-rm-watch wd\n"
20297 #: ../fish/guestfish-actions.pod:1650
20298 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
20302 #: ../fish/guestfish-actions.pod:1653
20303 msgid "inspect-get-arch"
20307 #: ../fish/guestfish-actions.pod:1655
20310 " inspect-get-arch root\n"
20315 #: ../fish/guestfish-actions.pod:1657 ../fish/guestfish-actions.pod:1673 ../fish/guestfish-actions.pod:1739 ../fish/guestfish-actions.pod:1757 ../fish/guestfish-actions.pod:1778 ../fish/guestfish-actions.pod:1793 ../fish/guestfish-actions.pod:1816 ../fish/guestfish-actions.pod:1838 ../fish/guestfish-actions.pod:1862 ../fish/guestfish-actions.pod:1892 ../fish/guestfish-actions.pod:1927
20317 "This function should only be called with a root device string as returned by "
20322 #: ../fish/guestfish-actions.pod:1660
20324 "This returns the architecture of the inspected operating system. The "
20325 "possible return values are listed under L</file-architecture>."
20329 #: ../fish/guestfish-actions.pod:1669
20330 msgid "inspect-get-distro"
20334 #: ../fish/guestfish-actions.pod:1671
20337 " inspect-get-distro root\n"
20342 #: ../fish/guestfish-actions.pod:1735
20343 msgid "inspect-get-filesystems"
20347 #: ../fish/guestfish-actions.pod:1737
20350 " inspect-get-filesystems root\n"
20355 #: ../fish/guestfish-actions.pod:1750
20357 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
20358 "L</inspect-get-mountpoints>."
20362 #: ../fish/guestfish-actions.pod:1753
20363 msgid "inspect-get-major-version"
20367 #: ../fish/guestfish-actions.pod:1755
20370 " inspect-get-major-version root\n"
20375 #: ../fish/guestfish-actions.pod:1774
20376 msgid "inspect-get-minor-version"
20380 #: ../fish/guestfish-actions.pod:1776
20383 " inspect-get-minor-version root\n"
20388 #: ../fish/guestfish-actions.pod:1786
20390 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
20391 "L</inspect-get-major-version>."
20395 #: ../fish/guestfish-actions.pod:1789
20396 msgid "inspect-get-mountpoints"
20400 #: ../fish/guestfish-actions.pod:1791
20403 " inspect-get-mountpoints root\n"
20408 #: ../fish/guestfish-actions.pod:1809
20410 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
20411 "L</inspect-get-filesystems>."
20415 #: ../fish/guestfish-actions.pod:1812
20416 msgid "inspect-get-package-format"
20420 #: ../fish/guestfish-actions.pod:1814
20423 " inspect-get-package-format root\n"
20428 #: ../fish/guestfish-actions.pod:1819
20430 "This function and L</inspect-get-package-management> return the package "
20431 "format and package management tool used by the inspected operating system. "
20432 "For example for Fedora these functions would return C<rpm> (package format) "
20433 "and C<yum> (package management)."
20437 #: ../fish/guestfish-actions.pod:1834
20438 msgid "inspect-get-package-management"
20442 #: ../fish/guestfish-actions.pod:1836
20445 " inspect-get-package-management root\n"
20450 #: ../fish/guestfish-actions.pod:1841
20452 "L</inspect-get-package-format> and this function return the package format "
20453 "and package management tool used by the inspected operating system. For "
20454 "example for Fedora these functions would return C<rpm> (package format) and "
20455 "C<yum> (package management)."
20459 #: ../fish/guestfish-actions.pod:1858
20460 msgid "inspect-get-product-name"
20464 #: ../fish/guestfish-actions.pod:1860
20467 " inspect-get-product-name root\n"
20472 #: ../fish/guestfish-actions.pod:1875
20473 msgid "inspect-get-roots"
20477 #: ../fish/guestfish-actions.pod:1877
20480 " inspect-get-roots\n"
20485 #: ../fish/guestfish-actions.pod:1879
20487 "This function is a convenient way to get the list of root devices, as "
20488 "returned from a previous call to L</inspect-os>, but without redoing the "
20489 "whole inspection process."
20493 #: ../fish/guestfish-actions.pod:1883
20495 "This returns an empty list if either no root devices were found or the "
20496 "caller has not called L</inspect-os>."
20500 #: ../fish/guestfish-actions.pod:1888
20501 msgid "inspect-get-type"
20505 #: ../fish/guestfish-actions.pod:1890
20508 " inspect-get-type root\n"
20513 #: ../fish/guestfish-actions.pod:1923
20514 msgid "inspect-get-windows-systemroot"
20518 #: ../fish/guestfish-actions.pod:1925
20521 " inspect-get-windows-systemroot root\n"
20526 #: ../fish/guestfish-actions.pod:1939
20531 #: ../fish/guestfish-actions.pod:1941
20539 #: ../fish/guestfish-actions.pod:1956
20541 "You can pass the root string(s) returned to other L</inspect-get-*> "
20542 "functions in order to query further information about each operating system, "
20543 "such as the name and version."
20547 #: ../fish/guestfish-actions.pod:1961
20549 "This function uses other libguestfs features such as L</mount-ro> and "
20550 "L</umount-all> in order to mount and unmount filesystems and look at the "
20551 "contents. This should be called with no disks currently mounted. The "
20552 "function may also use Augeas, so any existing Augeas handle will be closed."
20556 #: ../fish/guestfish-actions.pod:1973 ../fish/guestfish-actions.pod:2129 ../fish/guestfish-actions.pod:2175
20557 msgid "See also L</list-filesystems>."
20561 #: ../fish/guestfish-actions.pod:1975
20562 msgid "is-blockdev"
20566 #: ../fish/guestfish-actions.pod:1977
20569 " is-blockdev path\n"
20574 #: ../fish/guestfish-actions.pod:1982 ../fish/guestfish-actions.pod:2000 ../fish/guestfish-actions.pod:2019 ../fish/guestfish-actions.pod:2028 ../fish/guestfish-actions.pod:2038 ../fish/guestfish-actions.pod:2072 ../fish/guestfish-actions.pod:2081
20575 msgid "See also L</stat>."
20579 #: ../fish/guestfish-actions.pod:1984
20584 #: ../fish/guestfish-actions.pod:1986
20592 #: ../fish/guestfish-actions.pod:1993
20597 #: ../fish/guestfish-actions.pod:1995
20600 " is-chardev path\n"
20605 #: ../fish/guestfish-actions.pod:2002
20610 #: ../fish/guestfish-actions.pod:2004
20618 #: ../fish/guestfish-actions.pod:2011
20623 #: ../fish/guestfish-actions.pod:2013
20631 #: ../fish/guestfish-actions.pod:2021
20636 #: ../fish/guestfish-actions.pod:2023
20644 #: ../fish/guestfish-actions.pod:2030
20649 #: ../fish/guestfish-actions.pod:2032
20657 #: ../fish/guestfish-actions.pod:2040
20658 msgid "is-launching"
20662 #: ../fish/guestfish-actions.pod:2042
20670 #: ../fish/guestfish-actions.pod:2049
20675 #: ../fish/guestfish-actions.pod:2051
20683 #: ../fish/guestfish-actions.pod:2056
20688 #: ../fish/guestfish-actions.pod:2058
20696 #: ../fish/guestfish-actions.pod:2065
20701 #: ../fish/guestfish-actions.pod:2067
20704 " is-socket path\n"
20709 #: ../fish/guestfish-actions.pod:2074
20714 #: ../fish/guestfish-actions.pod:2076
20717 " is-symlink path\n"
20722 #: ../fish/guestfish-actions.pod:2083
20723 msgid "kill-subprocess"
20727 #: ../fish/guestfish-actions.pod:2085
20730 " kill-subprocess\n"
20735 #: ../fish/guestfish-actions.pod:2089
20740 #: ../fish/guestfish-actions.pod:2091
20745 #: ../fish/guestfish-actions.pod:2093
20753 #: ../fish/guestfish-actions.pod:2101
20758 #: ../fish/guestfish-actions.pod:2103
20761 " lchown owner group path\n"
20766 #: ../fish/guestfish-actions.pod:2105
20768 "Change the file owner to C<owner> and group to C<group>. This is like "
20769 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
20774 #: ../fish/guestfish-actions.pod:2113
20779 #: ../fish/guestfish-actions.pod:2115
20782 " lgetxattrs path\n"
20787 #: ../fish/guestfish-actions.pod:2117
20789 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
20790 "it returns the extended attributes of the link itself."
20794 #: ../fish/guestfish-actions.pod:2121
20795 msgid "list-devices"
20799 #: ../fish/guestfish-actions.pod:2123
20807 #: ../fish/guestfish-actions.pod:2131
20808 msgid "list-filesystems"
20812 #: ../fish/guestfish-actions.pod:2133
20815 " list-filesystems\n"
20820 #: ../fish/guestfish-actions.pod:2152
20822 "This command runs other libguestfs commands, which might include L</mount> "
20823 "and L</umount>, and therefore you should use this soon after launch and only "
20824 "when nothing is mounted."
20828 #: ../fish/guestfish-actions.pod:2156
20830 "Not all of the filesystems returned will be mountable. In particular, swap "
20831 "partitions are returned in the list. Also this command does not check that "
20832 "each filesystem found is valid and mountable, and some filesystems might be "
20833 "mountable but require special options. Filesystems may not all belong to a "
20834 "single logical operating system (use L</inspect-os> to look for OSes)."
20838 #: ../fish/guestfish-actions.pod:2164
20839 msgid "list-partitions"
20843 #: ../fish/guestfish-actions.pod:2166
20846 " list-partitions\n"
20851 #: ../fish/guestfish-actions.pod:2172
20853 "This does not return logical volumes. For that you will need to call "
20858 #: ../fish/guestfish-actions.pod:2177
20863 #: ../fish/guestfish-actions.pod:2179
20871 #: ../fish/guestfish-actions.pod:2187
20876 #: ../fish/guestfish-actions.pod:2189
20879 " ln target linkname\n"
20884 #: ../fish/guestfish-actions.pod:2193
20889 #: ../fish/guestfish-actions.pod:2195
20892 " ln-f target linkname\n"
20897 #: ../fish/guestfish-actions.pod:2200
20902 #: ../fish/guestfish-actions.pod:2202
20905 " ln-s target linkname\n"
20910 #: ../fish/guestfish-actions.pod:2206
20915 #: ../fish/guestfish-actions.pod:2208
20918 " ln-sf target linkname\n"
20923 #: ../fish/guestfish-actions.pod:2213
20924 msgid "lremovexattr"
20928 #: ../fish/guestfish-actions.pod:2215
20931 " lremovexattr xattr path\n"
20936 #: ../fish/guestfish-actions.pod:2217
20938 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
20939 "it removes an extended attribute of the link itself."
20943 #: ../fish/guestfish-actions.pod:2221
20948 #: ../fish/guestfish-actions.pod:2223
20956 #: ../fish/guestfish-actions.pod:2229
20958 "This command is mostly useful for interactive sessions. Programs should "
20959 "probably use L</readdir> instead."
20963 #: ../fish/guestfish-actions.pod:2232
20968 #: ../fish/guestfish-actions.pod:2234
20971 " lsetxattr xattr val vallen path\n"
20976 #: ../fish/guestfish-actions.pod:2236
20978 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
20979 "sets an extended attribute of the link itself."
20983 #: ../fish/guestfish-actions.pod:2240
20988 #: ../fish/guestfish-actions.pod:2242
20996 #: ../fish/guestfish-actions.pod:2246
20998 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
20999 "the link is stat-ed, not the file it refers to."
21003 #: ../fish/guestfish-actions.pod:2252
21008 #: ../fish/guestfish-actions.pod:2254
21011 " lstatlist path 'names ...'\n"
21016 #: ../fish/guestfish-actions.pod:2256
21018 "This call allows you to perform the L</lstat> operation on multiple files, "
21019 "where all files are in the directory C<path>. C<names> is the list of files "
21020 "from this directory."
21024 #: ../fish/guestfish-actions.pod:2265
21026 "This call is intended for programs that want to efficiently list a directory "
21027 "contents without making many round-trips. See also L</lxattrlist> for a "
21028 "similarly efficient call for getting extended attributes. Very long "
21029 "directory listings might cause the protocol message size to be exceeded, "
21030 "causing this call to fail. The caller must split up such requests into "
21031 "smaller groups of names."
21035 #: ../fish/guestfish-actions.pod:2273
21036 msgid "luks-add-key"
21040 #: ../fish/guestfish-actions.pod:2275
21043 " luks-add-key device keyslot\n"
21048 #: ../fish/guestfish-actions.pod:2282
21050 "Note that if C<keyslot> already contains a key, then this command will "
21051 "fail. You have to use L</luks-kill-slot> first to remove that key."
21055 #: ../fish/guestfish-actions.pod:2286 ../fish/guestfish-actions.pod:2308 ../fish/guestfish-actions.pod:2321 ../fish/guestfish-actions.pod:2335 ../fish/guestfish-actions.pod:2358 ../fish/guestfish-actions.pod:2368
21057 "This command has one or more key or passphrase parameters. Guestfish will "
21058 "prompt for these separately."
21062 #: ../fish/guestfish-actions.pod:2289
21067 #: ../fish/guestfish-actions.pod:2291
21070 " luks-close device\n"
21075 #: ../fish/guestfish-actions.pod:2293
21077 "This closes a LUKS device that was created earlier by L</luks-open> or "
21078 "L</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
21079 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
21080 "underlying block device."
21084 #: ../fish/guestfish-actions.pod:2299
21085 msgid "luks-format"
21089 #: ../fish/guestfish-actions.pod:2301
21092 " luks-format device keyslot\n"
21097 #: ../fish/guestfish-actions.pod:2314
21098 msgid "luks-format-cipher"
21102 #: ../fish/guestfish-actions.pod:2316
21105 " luks-format-cipher device keyslot cipher\n"
21110 #: ../fish/guestfish-actions.pod:2318
21112 "This command is the same as L</luks-format> but it also allows you to set "
21113 "the C<cipher> used."
21117 #: ../fish/guestfish-actions.pod:2327
21118 msgid "luks-kill-slot"
21122 #: ../fish/guestfish-actions.pod:2329
21125 " luks-kill-slot device keyslot\n"
21130 #: ../fish/guestfish-actions.pod:2338
21135 #: ../fish/guestfish-actions.pod:2340
21138 " luks-open device mapname\n"
21143 #: ../fish/guestfish-actions.pod:2354
21145 "If this block device contains LVM volume groups, then calling L</vgscan> "
21146 "followed by L</vg-activate-all> will make them visible."
21150 #: ../fish/guestfish-actions.pod:2361
21151 msgid "luks-open-ro"
21155 #: ../fish/guestfish-actions.pod:2363
21158 " luks-open-ro device mapname\n"
21163 #: ../fish/guestfish-actions.pod:2365
21165 "This is the same as L</luks-open> except that a read-only mapping is "
21170 #: ../fish/guestfish-actions.pod:2371
21175 #: ../fish/guestfish-actions.pod:2373
21178 " lvcreate logvol volgroup mbytes\n"
21183 #: ../fish/guestfish-actions.pod:2378
21184 msgid "lvm-canonical-lv-name"
21188 #: ../fish/guestfish-actions.pod:2380
21191 " lvm-canonical-lv-name lvname\n"
21196 #: ../fish/guestfish-actions.pod:2389
21197 msgid "See also L</is-lv>."
21201 #: ../fish/guestfish-actions.pod:2391
21202 msgid "lvm-clear-filter"
21206 #: ../fish/guestfish-actions.pod:2393
21209 " lvm-clear-filter\n"
21214 #: ../fish/guestfish-actions.pod:2395
21216 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
21221 #: ../fish/guestfish-actions.pod:2401
21222 msgid "lvm-remove-all"
21226 #: ../fish/guestfish-actions.pod:2403
21229 " lvm-remove-all\n"
21234 #: ../fish/guestfish-actions.pod:2411
21235 msgid "lvm-set-filter"
21239 #: ../fish/guestfish-actions.pod:2413
21242 " lvm-set-filter 'devices ...'\n"
21247 #: ../fish/guestfish-actions.pod:2438
21252 #: ../fish/guestfish-actions.pod:2440
21255 " lvremove device\n"
21260 #: ../fish/guestfish-actions.pod:2448
21265 #: ../fish/guestfish-actions.pod:2450
21268 " lvrename logvol newlogvol\n"
21273 #: ../fish/guestfish-actions.pod:2454
21278 #: ../fish/guestfish-actions.pod:2456
21281 " lvresize device mbytes\n"
21286 #: ../fish/guestfish-actions.pod:2462
21287 msgid "lvresize-free"
21291 #: ../fish/guestfish-actions.pod:2464
21294 " lvresize-free lv percent\n"
21299 #: ../fish/guestfish-actions.pod:2472
21304 #: ../fish/guestfish-actions.pod:2474
21312 #: ../fish/guestfish-actions.pod:2482
21313 msgid "See also L</lvs-full>, L</list-filesystems>."
21317 #: ../fish/guestfish-actions.pod:2484
21322 #: ../fish/guestfish-actions.pod:2486
21330 #: ../fish/guestfish-actions.pod:2491
21335 #: ../fish/guestfish-actions.pod:2493
21343 #: ../fish/guestfish-actions.pod:2497
21348 #: ../fish/guestfish-actions.pod:2499
21351 " lxattrlist path 'names ...'\n"
21356 #: ../fish/guestfish-actions.pod:2515
21358 "This call is intended for programs that want to efficiently list a directory "
21359 "contents without making many round-trips. See also L</lstatlist> for a "
21360 "similarly efficient call for getting standard stats. Very long directory "
21361 "listings might cause the protocol message size to be exceeded, causing this "
21362 "call to fail. The caller must split up such requests into smaller groups of "
21367 #: ../fish/guestfish-actions.pod:2523
21372 #: ../fish/guestfish-actions.pod:2525
21380 #: ../fish/guestfish-actions.pod:2529
21385 #: ../fish/guestfish-actions.pod:2531
21388 " mkdir-mode path mode\n"
21393 #: ../fish/guestfish-actions.pod:2540
21394 msgid "See also L</mkdir>, L</umask>"
21398 #: ../fish/guestfish-actions.pod:2542
21403 #: ../fish/guestfish-actions.pod:2544
21411 #: ../fish/guestfish-actions.pod:2549
21416 #: ../fish/guestfish-actions.pod:2551
21419 " mkdtemp template\n"
21424 #: ../fish/guestfish-actions.pod:2572
21429 #: ../fish/guestfish-actions.pod:2574
21432 " mke2fs-J fstype blocksize device journal\n"
21437 #: ../fish/guestfish-actions.pod:2582
21438 msgid "See also L</mke2journal>."
21442 #: ../fish/guestfish-actions.pod:2584
21447 #: ../fish/guestfish-actions.pod:2586
21450 " mke2fs-JL fstype blocksize device label\n"
21455 #: ../fish/guestfish-actions.pod:2591
21456 msgid "See also L</mke2journal-L>."
21460 #: ../fish/guestfish-actions.pod:2593
21465 #: ../fish/guestfish-actions.pod:2595
21468 " mke2fs-JU fstype blocksize device uuid\n"
21473 #: ../fish/guestfish-actions.pod:2600
21474 msgid "See also L</mke2journal-U>."
21478 #: ../fish/guestfish-actions.pod:2602
21479 msgid "mke2journal"
21483 #: ../fish/guestfish-actions.pod:2604
21486 " mke2journal blocksize device\n"
21491 #: ../fish/guestfish-actions.pod:2611
21492 msgid "mke2journal-L"
21496 #: ../fish/guestfish-actions.pod:2613
21499 " mke2journal-L blocksize label device\n"
21504 #: ../fish/guestfish-actions.pod:2617
21505 msgid "mke2journal-U"
21509 #: ../fish/guestfish-actions.pod:2619
21512 " mke2journal-U blocksize uuid device\n"
21517 #: ../fish/guestfish-actions.pod:2623
21522 #: ../fish/guestfish-actions.pod:2625
21525 " mkfifo mode path\n"
21530 #: ../fish/guestfish-actions.pod:2627
21532 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
21533 "is just a convenient wrapper around L</mknod>."
21537 #: ../fish/guestfish-actions.pod:2633
21542 #: ../fish/guestfish-actions.pod:2635
21545 " mkfs fstype device\n"
21550 #: ../fish/guestfish-actions.pod:2641
21555 #: ../fish/guestfish-actions.pod:2643
21558 " mkfs-b fstype blocksize device\n"
21563 #: ../fish/guestfish-actions.pod:2645
21565 "This call is similar to L</mkfs>, but it allows you to control the block "
21566 "size of the resulting filesystem. Supported block sizes depend on the "
21567 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
21571 #: ../fish/guestfish-actions.pod:2653
21572 msgid "mkmountpoint"
21576 #: ../fish/guestfish-actions.pod:2655
21579 " mkmountpoint exemptpath\n"
21584 #: ../fish/guestfish-actions.pod:2657
21586 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
21587 "to create extra mountpoints before mounting the first filesystem."
21591 #: ../fish/guestfish-actions.pod:2681
21593 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
21594 "unexpected errors if you try to mix these calls. It is safest to manually "
21595 "unmount filesystems and remove mountpoints after use."
21599 #: ../fish/guestfish-actions.pod:2685
21601 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
21602 "for this to work for manual mountpoints, you must ensure that the innermost "
21603 "mountpoints have the longest pathnames, as in the example code above."
21607 #: ../fish/guestfish-actions.pod:2692
21609 "Autosync [see L</set-autosync>, this is set by default on handles] means "
21610 "that L</umount-all> is called when the handle is closed which can also "
21611 "trigger these issues."
21615 #: ../fish/guestfish-actions.pod:2696
21620 #: ../fish/guestfish-actions.pod:2698
21623 " mknod mode devmajor devminor path\n"
21628 #: ../fish/guestfish-actions.pod:2708
21630 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
21631 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
21632 "regular file). These constants are available in the standard Linux header "
21633 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
21634 "wrappers around this command which bitwise OR in the appropriate constant "
21639 #: ../fish/guestfish-actions.pod:2718
21644 #: ../fish/guestfish-actions.pod:2720
21647 " mknod-b mode devmajor devminor path\n"
21652 #: ../fish/guestfish-actions.pod:2722
21654 "This call creates a block device node called C<path> with mode C<mode> and "
21655 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
21656 "wrapper around L</mknod>."
21660 #: ../fish/guestfish-actions.pod:2728
21665 #: ../fish/guestfish-actions.pod:2730
21668 " mknod-c mode devmajor devminor path\n"
21673 #: ../fish/guestfish-actions.pod:2732
21675 "This call creates a char device node called C<path> with mode C<mode> and "
21676 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
21677 "wrapper around L</mknod>."
21681 #: ../fish/guestfish-actions.pod:2738
21686 #: ../fish/guestfish-actions.pod:2740
21694 #: ../fish/guestfish-actions.pod:2744
21699 #: ../fish/guestfish-actions.pod:2746
21702 " mkswap-L label device\n"
21707 #: ../fish/guestfish-actions.pod:2754
21712 #: ../fish/guestfish-actions.pod:2756
21715 " mkswap-U uuid device\n"
21720 #: ../fish/guestfish-actions.pod:2760
21721 msgid "mkswap-file"
21725 #: ../fish/guestfish-actions.pod:2762
21728 " mkswap-file path\n"
21733 #: ../fish/guestfish-actions.pod:2766
21735 "This command just writes a swap file signature to an existing file. To "
21736 "create the file itself, use something like L</fallocate>."
21740 #: ../fish/guestfish-actions.pod:2769
21745 #: ../fish/guestfish-actions.pod:2771
21748 " modprobe modulename\n"
21753 #: ../fish/guestfish-actions.pod:2778
21758 #: ../fish/guestfish-actions.pod:2780
21761 " mount device mountpoint\n"
21766 #: ../fish/guestfish-actions.pod:2796
21768 "B<Important note:> When you use this call, the filesystem options C<sync> "
21769 "and C<noatime> are set implicitly. This was originally done because we "
21770 "thought it would improve reliability, but it turns out that I<-o sync> has a "
21771 "very large negative performance impact and negligible effect on "
21772 "reliability. Therefore we recommend that you avoid using L</mount> in any "
21773 "code that needs performance, and instead use L</mount-options> (use an empty "
21774 "string for the first parameter if you don't want any options)."
21778 #: ../fish/guestfish-actions.pod:2806
21783 #: ../fish/guestfish-actions.pod:2808
21786 " mount-loop file mountpoint\n"
21791 #: ../fish/guestfish-actions.pod:2814
21792 msgid "mount-options"
21796 #: ../fish/guestfish-actions.pod:2816
21799 " mount-options options device mountpoint\n"
21804 #: ../fish/guestfish-actions.pod:2818
21806 "This is the same as the L</mount> command, but it allows you to set the "
21807 "mount options as for the L<mount(8)> I<-o> flag."
21811 #: ../fish/guestfish-actions.pod:2826
21816 #: ../fish/guestfish-actions.pod:2828
21819 " mount-ro device mountpoint\n"
21824 #: ../fish/guestfish-actions.pod:2830
21826 "This is the same as the L</mount> command, but it mounts the filesystem with "
21827 "the read-only (I<-o ro>) flag."
21831 #: ../fish/guestfish-actions.pod:2833
21836 #: ../fish/guestfish-actions.pod:2835
21839 " mount-vfs options vfstype device mountpoint\n"
21844 #: ../fish/guestfish-actions.pod:2837
21846 "This is the same as the L</mount> command, but it allows you to set both the "
21847 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
21851 #: ../fish/guestfish-actions.pod:2841
21852 msgid "mountpoints"
21856 #: ../fish/guestfish-actions.pod:2843
21864 #: ../fish/guestfish-actions.pod:2845
21866 "This call is similar to L</mounts>. That call returns a list of devices. "
21867 "This one returns a hash table (map) of device name to directory where the "
21868 "device is mounted."
21872 #: ../fish/guestfish-actions.pod:2849
21877 #: ../fish/guestfish-actions.pod:2851
21885 #: ../fish/guestfish-actions.pod:2858
21886 msgid "See also: L</mountpoints>"
21890 #: ../fish/guestfish-actions.pod:2860
21895 #: ../fish/guestfish-actions.pod:2862
21903 #: ../fish/guestfish-actions.pod:2867
21904 msgid "ntfs-3g-probe"
21908 #: ../fish/guestfish-actions.pod:2869
21911 " ntfs-3g-probe true|false device\n"
21916 #: ../fish/guestfish-actions.pod:2883
21921 #: ../fish/guestfish-actions.pod:2885
21924 " ntfsresize device\n"
21929 #: ../fish/guestfish-actions.pod:2891
21930 msgid "ntfsresize-size"
21934 #: ../fish/guestfish-actions.pod:2893
21937 " ntfsresize-size device size\n"
21942 #: ../fish/guestfish-actions.pod:2895
21944 "This command is the same as L</ntfsresize> except that it allows you to "
21945 "specify the new size (in bytes) explicitly."
21949 #: ../fish/guestfish-actions.pod:2898
21954 #: ../fish/guestfish-actions.pod:2900
21957 " part-add device prlogex startsect endsect\n"
21962 #: ../fish/guestfish-actions.pod:2902
21964 "This command adds a partition to C<device>. If there is no partition table "
21965 "on the device, call L</part-init> first."
21969 #: ../fish/guestfish-actions.pod:2914
21971 "Creating a partition which covers the whole disk is not so easy. Use "
21972 "L</part-disk> to do that."
21976 #: ../fish/guestfish-actions.pod:2917
21981 #: ../fish/guestfish-actions.pod:2919
21984 " part-del device partnum\n"
21989 #: ../fish/guestfish-actions.pod:2927
21994 #: ../fish/guestfish-actions.pod:2929
21997 " part-disk device parttype\n"
22002 #: ../fish/guestfish-actions.pod:2931
22004 "This command is simply a combination of L</part-init> followed by "
22005 "L</part-add> to create a single primary partition covering the whole disk."
22009 #: ../fish/guestfish-actions.pod:2935
22011 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
22012 "possible values are described in L</part-init>."
22016 #: ../fish/guestfish-actions.pod:2941
22017 msgid "part-get-bootable"
22021 #: ../fish/guestfish-actions.pod:2943
22024 " part-get-bootable device partnum\n"
22029 #: ../fish/guestfish-actions.pod:2948
22030 msgid "See also L</part-set-bootable>."
22034 #: ../fish/guestfish-actions.pod:2950
22035 msgid "part-get-mbr-id"
22039 #: ../fish/guestfish-actions.pod:2952
22042 " part-get-mbr-id device partnum\n"
22047 #: ../fish/guestfish-actions.pod:2957 ../fish/guestfish-actions.pod:3095
22049 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
22050 "undefined results for other partition table types (see "
22051 "L</part-get-parttype>)."
22055 #: ../fish/guestfish-actions.pod:2961
22056 msgid "part-get-parttype"
22060 #: ../fish/guestfish-actions.pod:2963
22063 " part-get-parttype device\n"
22068 #: ../fish/guestfish-actions.pod:2968
22070 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
22071 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
22072 "possible, although unusual. See L</part-init> for a full list."
22076 #: ../fish/guestfish-actions.pod:2973
22081 #: ../fish/guestfish-actions.pod:2975
22084 " part-init device parttype\n"
22089 #: ../fish/guestfish-actions.pod:2981
22091 "Initially there are no partitions. Following this, you should call "
22092 "L</part-add> for each partition required."
22096 #: ../fish/guestfish-actions.pod:3044
22101 #: ../fish/guestfish-actions.pod:3046
22104 " part-list device\n"
22109 #: ../fish/guestfish-actions.pod:3061
22111 "Start of the partition I<in bytes>. To get sectors you have to divide by "
22112 "the device's sector size, see L</blockdev-getss>."
22116 #: ../fish/guestfish-actions.pod:3074
22117 msgid "part-set-bootable"
22121 #: ../fish/guestfish-actions.pod:3076
22124 " part-set-bootable device partnum true|false\n"
22129 #: ../fish/guestfish-actions.pod:3085
22130 msgid "part-set-mbr-id"
22134 #: ../fish/guestfish-actions.pod:3087
22137 " part-set-mbr-id device partnum idbyte\n"
22142 #: ../fish/guestfish-actions.pod:3099
22143 msgid "part-set-name"
22147 #: ../fish/guestfish-actions.pod:3101
22150 " part-set-name device partnum name\n"
22155 #: ../fish/guestfish-actions.pod:3109
22156 msgid "part-to-dev"
22160 #: ../fish/guestfish-actions.pod:3111
22163 " part-to-dev partition\n"
22168 #: ../fish/guestfish-actions.pod:3117
22170 "The named partition must exist, for example as a string returned from "
22171 "L</list-partitions>."
22175 #: ../fish/guestfish-actions.pod:3120
22176 msgid "ping-daemon"
22180 #: ../fish/guestfish-actions.pod:3122
22188 #: ../fish/guestfish-actions.pod:3129
22193 #: ../fish/guestfish-actions.pod:3131
22196 " pread path count offset\n"
22201 #: ../fish/guestfish-actions.pod:3139
22202 msgid "See also L</pwrite>, L</pread-device>."
22206 #: ../fish/guestfish-actions.pod:3144
22207 msgid "pread-device"
22211 #: ../fish/guestfish-actions.pod:3146
22214 " pread-device device count offset\n"
22219 #: ../fish/guestfish-actions.pod:3154
22220 msgid "See also L</pread>."
22224 #: ../fish/guestfish-actions.pod:3159
22229 #: ../fish/guestfish-actions.pod:3161
22232 " pvcreate device\n"
22237 #: ../fish/guestfish-actions.pod:3167
22242 #: ../fish/guestfish-actions.pod:3169
22245 " pvremove device\n"
22250 #: ../fish/guestfish-actions.pod:3178
22255 #: ../fish/guestfish-actions.pod:3180
22258 " pvresize device\n"
22263 #: ../fish/guestfish-actions.pod:3185
22264 msgid "pvresize-size"
22268 #: ../fish/guestfish-actions.pod:3187
22271 " pvresize-size device size\n"
22276 #: ../fish/guestfish-actions.pod:3189
22278 "This command is the same as L</pvresize> except that it allows you to "
22279 "specify the new size (in bytes) explicitly."
22283 #: ../fish/guestfish-actions.pod:3192
22288 #: ../fish/guestfish-actions.pod:3194
22296 #: ../fish/guestfish-actions.pod:3202
22297 msgid "See also L</pvs-full>."
22301 #: ../fish/guestfish-actions.pod:3204
22306 #: ../fish/guestfish-actions.pod:3206
22314 #: ../fish/guestfish-actions.pod:3211
22319 #: ../fish/guestfish-actions.pod:3213
22327 #: ../fish/guestfish-actions.pod:3217
22332 #: ../fish/guestfish-actions.pod:3219
22335 " pwrite path content offset\n"
22340 #: ../fish/guestfish-actions.pod:3230
22341 msgid "See also L</pread>, L</pwrite-device>."
22345 #: ../fish/guestfish-actions.pod:3235
22346 msgid "pwrite-device"
22350 #: ../fish/guestfish-actions.pod:3237
22353 " pwrite-device device content offset\n"
22358 #: ../fish/guestfish-actions.pod:3247
22359 msgid "See also L</pwrite>."
22363 #: ../fish/guestfish-actions.pod:3252
22368 #: ../fish/guestfish-actions.pod:3254
22371 " read-file path\n"
22376 #: ../fish/guestfish-actions.pod:3259
22378 "Unlike L</cat>, this function can correctly handle files that contain "
22379 "embedded ASCII NUL characters. However unlike L</download>, this function "
22380 "is limited in the total size of file that can be handled."
22384 #: ../fish/guestfish-actions.pod:3267
22389 #: ../fish/guestfish-actions.pod:3269
22392 " read-lines path\n"
22397 #: ../fish/guestfish-actions.pod:3276
22399 "Note that this function cannot correctly handle binary files (specifically, "
22400 "files containing C<\\0> character which is treated as end of line). For "
22401 "those you need to use the L</read-file> function which has a more complex "
22406 #: ../fish/guestfish-actions.pod:3281
22411 #: ../fish/guestfish-actions.pod:3283
22419 #: ../fish/guestfish-actions.pod:3335
22421 "This function is primarily intended for use by programs. To get a simple "
22422 "list of names, use L</ls>. To get a printable directory for human "
22423 "consumption, use L</ll>."
22427 #: ../fish/guestfish-actions.pod:3339
22432 #: ../fish/guestfish-actions.pod:3341
22440 #: ../fish/guestfish-actions.pod:3345
22441 msgid "readlinklist"
22445 #: ../fish/guestfish-actions.pod:3347
22448 " readlinklist path 'names ...'\n"
22453 #: ../fish/guestfish-actions.pod:3371
22458 #: ../fish/guestfish-actions.pod:3373
22466 #: ../fish/guestfish-actions.pod:3378
22467 msgid "removexattr"
22471 #: ../fish/guestfish-actions.pod:3380
22474 " removexattr xattr path\n"
22479 #: ../fish/guestfish-actions.pod:3385
22480 msgid "See also: L</lremovexattr>, L<attr(5)>."
22484 #: ../fish/guestfish-actions.pod:3387
22489 #: ../fish/guestfish-actions.pod:3389
22492 " resize2fs device\n"
22497 #: ../fish/guestfish-actions.pod:3394
22499 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
22500 "before calling this command. For unknown reasons C<resize2fs> sometimes "
22501 "gives an error about this and sometimes not. In any case, it is always safe "
22502 "to call L</e2fsck-f> before calling this function."
22506 #: ../fish/guestfish-actions.pod:3400
22507 msgid "resize2fs-size"
22511 #: ../fish/guestfish-actions.pod:3402
22514 " resize2fs-size device size\n"
22519 #: ../fish/guestfish-actions.pod:3404
22521 "This command is the same as L</resize2fs> except that it allows you to "
22522 "specify the new size (in bytes) explicitly."
22526 #: ../fish/guestfish-actions.pod:3407
22531 #: ../fish/guestfish-actions.pod:3409
22539 #: ../fish/guestfish-actions.pod:3413
22544 #: ../fish/guestfish-actions.pod:3415
22552 #: ../fish/guestfish-actions.pod:3421
22557 #: ../fish/guestfish-actions.pod:3423
22565 #: ../fish/guestfish-actions.pod:3427
22566 msgid "rmmountpoint"
22570 #: ../fish/guestfish-actions.pod:3429
22573 " rmmountpoint exemptpath\n"
22578 #: ../fish/guestfish-actions.pod:3431
22580 "This calls removes a mountpoint that was previously created with "
22581 "L</mkmountpoint>. See L</mkmountpoint> for full details."
22585 #: ../fish/guestfish-actions.pod:3435
22586 msgid "scrub-device"
22590 #: ../fish/guestfish-actions.pod:3437
22593 " scrub-device device\n"
22598 #: ../fish/guestfish-actions.pod:3448
22603 #: ../fish/guestfish-actions.pod:3450
22606 " scrub-file file\n"
22611 #: ../fish/guestfish-actions.pod:3460
22612 msgid "scrub-freespace"
22616 #: ../fish/guestfish-actions.pod:3462
22619 " scrub-freespace dir\n"
22624 #: ../fish/guestfish-actions.pod:3464
22626 "This command creates the directory C<dir> and then fills it with files until "
22627 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
22628 "deletes them. The intention is to scrub any free space on the partition "
22629 "containing C<dir>."
22633 #: ../fish/guestfish-actions.pod:3473
22638 #: ../fish/guestfish-actions.pod:3475
22643 #: ../fish/guestfish-actions.pod:3477
22646 " set-append append\n"
22651 #: ../fish/guestfish-actions.pod:3488
22652 msgid "set-autosync"
22656 #: ../fish/guestfish-actions.pod:3490
22661 #: ../fish/guestfish-actions.pod:3492
22664 " set-autosync true|false\n"
22669 #: ../fish/guestfish-actions.pod:3494
22671 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
22672 "effort attempt to run L</umount-all> followed by L</sync> when the handle is "
22673 "closed (also if the program exits without closing handles)."
22677 #: ../fish/guestfish-actions.pod:3502
22682 #: ../fish/guestfish-actions.pod:3504
22687 #: ../fish/guestfish-actions.pod:3506
22690 " set-direct true|false\n"
22695 #: ../fish/guestfish-actions.pod:3512
22697 "One consequence of this is that log messages aren't caught by the library "
22698 "and handled by L</set-log-message-callback>, but go straight to stdout."
22702 #: ../fish/guestfish-actions.pod:3521
22703 msgid "set-e2label"
22707 #: ../fish/guestfish-actions.pod:3523
22710 " set-e2label device label\n"
22715 #: ../fish/guestfish-actions.pod:3529
22717 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
22718 "label on a filesystem."
22722 #: ../fish/guestfish-actions.pod:3532
22727 #: ../fish/guestfish-actions.pod:3534
22730 " set-e2uuid device uuid\n"
22735 #: ../fish/guestfish-actions.pod:3541
22737 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
22738 "UUID of a filesystem."
22742 #: ../fish/guestfish-actions.pod:3544
22743 msgid "set-memsize"
22747 #: ../fish/guestfish-actions.pod:3546
22752 #: ../fish/guestfish-actions.pod:3548
22755 " set-memsize memsize\n"
22760 #: ../fish/guestfish-actions.pod:3550
22762 "This sets the memory size in megabytes allocated to the qemu subprocess. "
22763 "This only has any effect if called before L</launch>."
22767 #: ../fish/guestfish-actions.pod:3561
22768 msgid "set-network"
22772 #: ../fish/guestfish-actions.pod:3563
22777 #: ../fish/guestfish-actions.pod:3565
22780 " set-network true|false\n"
22785 #: ../fish/guestfish-actions.pod:3573
22786 msgid "You must call this before calling L</launch>, otherwise it has no effect."
22790 #: ../fish/guestfish-actions.pod:3576
22795 #: ../fish/guestfish-actions.pod:3578
22800 #: ../fish/guestfish-actions.pod:3580
22803 " set-path searchpath\n"
22808 #: ../fish/guestfish-actions.pod:3589
22813 #: ../fish/guestfish-actions.pod:3591
22818 #: ../fish/guestfish-actions.pod:3593
22826 #: ../fish/guestfish-actions.pod:3613
22827 msgid "set-recovery-proc"
22831 #: ../fish/guestfish-actions.pod:3615
22832 msgid "recovery-proc"
22836 #: ../fish/guestfish-actions.pod:3617
22839 " set-recovery-proc true|false\n"
22844 #: ../fish/guestfish-actions.pod:3619
22846 "If this is called with the parameter C<false> then L</launch> does not "
22847 "create a recovery process. The purpose of the recovery process is to stop "
22848 "runaway qemu processes in the case where the main program aborts abruptly."
22852 #: ../fish/guestfish-actions.pod:3624
22854 "This only has any effect if called before L</launch>, and the default is "
22859 #: ../fish/guestfish-actions.pod:3633
22860 msgid "set-selinux"
22864 #: ../fish/guestfish-actions.pod:3635
22869 #: ../fish/guestfish-actions.pod:3637
22872 " set-selinux true|false\n"
22877 #: ../fish/guestfish-actions.pod:3648
22882 #: ../fish/guestfish-actions.pod:3650
22887 #: ../fish/guestfish-actions.pod:3652
22890 " set-trace true|false\n"
22895 #: ../fish/guestfish-actions.pod:3668
22896 msgid "set-verbose"
22900 #: ../fish/guestfish-actions.pod:3670
22905 #: ../fish/guestfish-actions.pod:3672
22908 " set-verbose true|false\n"
22913 #: ../fish/guestfish-actions.pod:3679
22918 #: ../fish/guestfish-actions.pod:3681
22921 " setcon context\n"
22926 #: ../fish/guestfish-actions.pod:3688
22931 #: ../fish/guestfish-actions.pod:3690
22934 " setxattr xattr val vallen path\n"
22939 #: ../fish/guestfish-actions.pod:3696
22940 msgid "See also: L</lsetxattr>, L<attr(5)>."
22944 #: ../fish/guestfish-actions.pod:3698
22949 #: ../fish/guestfish-actions.pod:3700
22952 " sfdisk device cyls heads sectors 'lines ...'\n"
22957 #: ../fish/guestfish-actions.pod:3722
22958 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
22962 #: ../fish/guestfish-actions.pod:3728
22967 #: ../fish/guestfish-actions.pod:3730
22970 " sfdiskM device 'lines ...'\n"
22975 #: ../fish/guestfish-actions.pod:3732
22977 "This is a simplified interface to the L</sfdisk> command, where partition "
22978 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
22979 "you don't need to specify the cyls, heads and sectors parameters which were "
22980 "rarely if ever used anyway."
22984 #: ../fish/guestfish-actions.pod:3738
22985 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
22989 #: ../fish/guestfish-actions.pod:3744
22994 #: ../fish/guestfish-actions.pod:3746
22997 " sfdisk-N device partnum cyls heads sectors line\n"
23002 #: ../fish/guestfish-actions.pod:3751
23004 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
23005 "cyls/heads/sectors parameters."
23009 #: ../fish/guestfish-actions.pod:3754
23010 msgid "See also: L</part-add>"
23014 #: ../fish/guestfish-actions.pod:3759
23015 msgid "sfdisk-disk-geometry"
23019 #: ../fish/guestfish-actions.pod:3761
23022 " sfdisk-disk-geometry device\n"
23027 #: ../fish/guestfish-actions.pod:3763
23029 "This displays the disk geometry of C<device> read from the partition table. "
23030 "Especially in the case where the underlying block device has been resized, "
23031 "this can be different from the kernel's idea of the geometry (see "
23032 "L</sfdisk-kernel-geometry>)."
23036 #: ../fish/guestfish-actions.pod:3771
23037 msgid "sfdisk-kernel-geometry"
23041 #: ../fish/guestfish-actions.pod:3773
23044 " sfdisk-kernel-geometry device\n"
23049 #: ../fish/guestfish-actions.pod:3780
23054 #: ../fish/guestfish-actions.pod:3782
23057 " sfdisk-l device\n"
23062 #: ../fish/guestfish-actions.pod:3788
23063 msgid "See also: L</part-list>"
23067 #: ../fish/guestfish-actions.pod:3790
23072 #: ../fish/guestfish-actions.pod:3792
23080 #: ../fish/guestfish-actions.pod:3797
23081 msgid "This is like L</command>, but passes the command to:"
23085 #: ../fish/guestfish-actions.pod:3805
23086 msgid "All the provisos about L</command> apply to this call."
23090 #: ../fish/guestfish-actions.pod:3807
23095 #: ../fish/guestfish-actions.pod:3809
23098 " sh-lines command\n"
23103 #: ../fish/guestfish-actions.pod:3811
23104 msgid "This is the same as L</sh>, but splits the result into a list of lines."
23108 #: ../fish/guestfish-actions.pod:3814
23109 msgid "See also: L</command-lines>"
23113 #: ../fish/guestfish-actions.pod:3816
23118 #: ../fish/guestfish-actions.pod:3818
23126 #: ../fish/guestfish-actions.pod:3822
23131 #: ../fish/guestfish-actions.pod:3824
23139 #: ../fish/guestfish-actions.pod:3830
23144 #: ../fish/guestfish-actions.pod:3832
23152 #: ../fish/guestfish-actions.pod:3840
23157 #: ../fish/guestfish-actions.pod:3842
23165 #: ../fish/guestfish-actions.pod:3850
23170 #: ../fish/guestfish-actions.pod:3852
23173 " strings-e encoding path\n"
23178 #: ../fish/guestfish-actions.pod:3854
23180 "This is like the L</strings> command, but allows you to specify the encoding "
23181 "of strings that are looked for in the source file C<path>."
23185 #: ../fish/guestfish-actions.pod:3864
23187 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
23188 "ISO-8859-X (this is what L</strings> uses)."
23192 #: ../fish/guestfish-actions.pod:3896
23193 msgid "swapoff-device"
23197 #: ../fish/guestfish-actions.pod:3898
23200 " swapoff-device device\n"
23205 #: ../fish/guestfish-actions.pod:3900
23207 "This command disables the libguestfs appliance swap device or partition "
23208 "named C<device>. See L</swapon-device>."
23212 #: ../fish/guestfish-actions.pod:3904
23213 msgid "swapoff-file"
23217 #: ../fish/guestfish-actions.pod:3906
23220 " swapoff-file file\n"
23225 #: ../fish/guestfish-actions.pod:3910
23226 msgid "swapoff-label"
23230 #: ../fish/guestfish-actions.pod:3912
23233 " swapoff-label label\n"
23238 #: ../fish/guestfish-actions.pod:3917
23239 msgid "swapoff-uuid"
23243 #: ../fish/guestfish-actions.pod:3919
23246 " swapoff-uuid uuid\n"
23251 #: ../fish/guestfish-actions.pod:3924
23252 msgid "swapon-device"
23256 #: ../fish/guestfish-actions.pod:3926
23259 " swapon-device device\n"
23264 #: ../fish/guestfish-actions.pod:3928
23266 "This command enables the libguestfs appliance to use the swap device or "
23267 "partition named C<device>. The increased memory is made available for all "
23268 "commands, for example those run using L</command> or L</sh>."
23272 #: ../fish/guestfish-actions.pod:3940
23273 msgid "swapon-file"
23277 #: ../fish/guestfish-actions.pod:3942
23280 " swapon-file file\n"
23285 #: ../fish/guestfish-actions.pod:3944
23286 msgid "This command enables swap to a file. See L</swapon-device> for other notes."
23290 #: ../fish/guestfish-actions.pod:3947
23291 msgid "swapon-label"
23295 #: ../fish/guestfish-actions.pod:3949
23298 " swapon-label label\n"
23303 #: ../fish/guestfish-actions.pod:3951
23305 "This command enables swap to a labeled swap partition. See "
23306 "L</swapon-device> for other notes."
23310 #: ../fish/guestfish-actions.pod:3954
23311 msgid "swapon-uuid"
23315 #: ../fish/guestfish-actions.pod:3956
23318 " swapon-uuid uuid\n"
23323 #: ../fish/guestfish-actions.pod:3958
23325 "This command enables swap to a swap partition with the given UUID. See "
23326 "L</swapon-device> for other notes."
23330 #: ../fish/guestfish-actions.pod:3961
23335 #: ../fish/guestfish-actions.pod:3963
23343 #: ../fish/guestfish-actions.pod:3971
23348 #: ../fish/guestfish-actions.pod:3973
23356 #: ../fish/guestfish-actions.pod:3981
23361 #: ../fish/guestfish-actions.pod:3983
23364 " tail-n nrlines path\n"
23369 #: ../fish/guestfish-actions.pod:3996
23374 #: ../fish/guestfish-actions.pod:3998
23377 " tar-in (tarfile|-) directory\n"
23382 #: ../fish/guestfish-actions.pod:4003
23383 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
23387 #: ../fish/guestfish-actions.pod:4008
23392 #: ../fish/guestfish-actions.pod:4010
23395 " tar-out directory (tarfile|-)\n"
23400 #: ../fish/guestfish-actions.pod:4015
23401 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
23405 #: ../fish/guestfish-actions.pod:4020
23410 #: ../fish/guestfish-actions.pod:4022
23413 " tgz-in (tarball|-) directory\n"
23418 #: ../fish/guestfish-actions.pod:4027
23419 msgid "To upload an uncompressed tarball, use L</tar-in>."
23423 #: ../fish/guestfish-actions.pod:4031
23428 #: ../fish/guestfish-actions.pod:4033
23431 " tgz-out directory (tarball|-)\n"
23436 #: ../fish/guestfish-actions.pod:4038
23437 msgid "To download an uncompressed tarball, use L</tar-out>."
23441 #: ../fish/guestfish-actions.pod:4042
23446 #: ../fish/guestfish-actions.pod:4044
23454 #: ../fish/guestfish-actions.pod:4053
23459 #: ../fish/guestfish-actions.pod:4055
23467 #: ../fish/guestfish-actions.pod:4060
23468 msgid "truncate-size"
23472 #: ../fish/guestfish-actions.pod:4062
23475 " truncate-size path size\n"
23480 #: ../fish/guestfish-actions.pod:4067
23482 "If the current file size is less than C<size> then the file is extended to "
23483 "the required size with zero bytes. This creates a sparse file (ie. disk "
23484 "blocks are not allocated for the file until you write to it). To create a "
23485 "non-sparse file of zeroes, use L</fallocate64> instead."
23489 #: ../fish/guestfish-actions.pod:4073
23494 #: ../fish/guestfish-actions.pod:4075
23497 " tune2fs-l device\n"
23502 #: ../fish/guestfish-actions.pod:4085
23507 #: ../fish/guestfish-actions.pod:4087
23510 " txz-in (tarball|-) directory\n"
23515 #: ../fish/guestfish-actions.pod:4094
23520 #: ../fish/guestfish-actions.pod:4096
23523 " txz-out directory (tarball|-)\n"
23528 #: ../fish/guestfish-actions.pod:4103
23533 #: ../fish/guestfish-actions.pod:4105
23541 #: ../fish/guestfish-actions.pod:4119
23542 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
23546 #: ../fish/guestfish-actions.pod:4124
23551 #: ../fish/guestfish-actions.pod:4126
23556 #: ../fish/guestfish-actions.pod:4128
23559 " umount pathordevice\n"
23564 #: ../fish/guestfish-actions.pod:4134
23569 #: ../fish/guestfish-actions.pod:4136
23570 msgid "unmount-all"
23574 #: ../fish/guestfish-actions.pod:4138
23582 #: ../fish/guestfish-actions.pod:4144
23587 #: ../fish/guestfish-actions.pod:4146
23590 " upload (filename|-) remotefilename\n"
23595 #: ../fish/guestfish-actions.pod:4153
23596 msgid "See also L</download>."
23600 #: ../fish/guestfish-actions.pod:4157
23601 msgid "upload-offset"
23605 #: ../fish/guestfish-actions.pod:4159
23608 " upload-offset (filename|-) remotefilename offset\n"
23613 #: ../fish/guestfish-actions.pod:4171
23615 "Note that there is no limit on the amount of data that can be uploaded with "
23616 "this call, unlike with L</pwrite>, and this call always writes the full "
23617 "amount unless an error occurs."
23621 #: ../fish/guestfish-actions.pod:4176
23622 msgid "See also L</upload>, L</pwrite>."
23626 #: ../fish/guestfish-actions.pod:4180
23631 #: ../fish/guestfish-actions.pod:4182
23634 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
23639 #: ../fish/guestfish-actions.pod:4201
23644 #: ../fish/guestfish-actions.pod:4203
23652 #: ../fish/guestfish-actions.pod:4230
23654 "I<Note:> Don't use this call to test for availability of features. In "
23655 "enterprise distributions we backport features from later versions into "
23656 "earlier versions, making this an unreliable way to test for features. Use "
23657 "L</available> instead."
23661 #: ../fish/guestfish-actions.pod:4236
23666 #: ../fish/guestfish-actions.pod:4238
23669 " vfs-label device\n"
23674 #: ../fish/guestfish-actions.pod:4245
23675 msgid "To find a filesystem from the label, use L</findfs-label>."
23679 #: ../fish/guestfish-actions.pod:4247
23684 #: ../fish/guestfish-actions.pod:4249
23687 " vfs-type device\n"
23692 #: ../fish/guestfish-actions.pod:4259
23697 #: ../fish/guestfish-actions.pod:4261
23700 " vfs-uuid device\n"
23705 #: ../fish/guestfish-actions.pod:4268
23706 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
23710 #: ../fish/guestfish-actions.pod:4270
23711 msgid "vg-activate"
23715 #: ../fish/guestfish-actions.pod:4272
23718 " vg-activate true|false 'volgroups ...'\n"
23723 #: ../fish/guestfish-actions.pod:4285
23724 msgid "vg-activate-all"
23728 #: ../fish/guestfish-actions.pod:4287
23731 " vg-activate-all true|false\n"
23736 #: ../fish/guestfish-actions.pod:4297
23741 #: ../fish/guestfish-actions.pod:4299
23744 " vgcreate volgroup 'physvols ...'\n"
23749 #: ../fish/guestfish-actions.pod:4304
23754 #: ../fish/guestfish-actions.pod:4306
23757 " vglvuuids vgname\n"
23762 #: ../fish/guestfish-actions.pod:4311
23764 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
23765 "logical volumes and volume groups."
23769 #: ../fish/guestfish-actions.pod:4314
23770 msgid "See also L</vgpvuuids>."
23774 #: ../fish/guestfish-actions.pod:4316
23779 #: ../fish/guestfish-actions.pod:4318
23782 " vgpvuuids vgname\n"
23787 #: ../fish/guestfish-actions.pod:4323
23789 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
23790 "physical volumes and volume groups."
23794 #: ../fish/guestfish-actions.pod:4326
23795 msgid "See also L</vglvuuids>."
23799 #: ../fish/guestfish-actions.pod:4328
23804 #: ../fish/guestfish-actions.pod:4330
23807 " vgremove vgname\n"
23812 #: ../fish/guestfish-actions.pod:4337
23817 #: ../fish/guestfish-actions.pod:4339
23820 " vgrename volgroup newvolgroup\n"
23825 #: ../fish/guestfish-actions.pod:4343
23830 #: ../fish/guestfish-actions.pod:4345
23838 #: ../fish/guestfish-actions.pod:4353
23839 msgid "See also L</vgs-full>."
23843 #: ../fish/guestfish-actions.pod:4355
23848 #: ../fish/guestfish-actions.pod:4357
23856 #: ../fish/guestfish-actions.pod:4362
23861 #: ../fish/guestfish-actions.pod:4364
23869 #: ../fish/guestfish-actions.pod:4369
23874 #: ../fish/guestfish-actions.pod:4371
23882 #: ../fish/guestfish-actions.pod:4375
23887 #: ../fish/guestfish-actions.pod:4377
23895 #: ../fish/guestfish-actions.pod:4382
23900 #: ../fish/guestfish-actions.pod:4384
23908 #: ../fish/guestfish-actions.pod:4389
23913 #: ../fish/guestfish-actions.pod:4391
23921 #: ../fish/guestfish-actions.pod:4396
23926 #: ../fish/guestfish-actions.pod:4398
23929 " write path content\n"
23934 #: ../fish/guestfish-actions.pod:4406
23939 #: ../fish/guestfish-actions.pod:4408
23942 " write-file path content size\n"
23947 #: ../fish/guestfish-actions.pod:4431
23952 #: ../fish/guestfish-actions.pod:4433
23955 " zegrep regex path\n"
23960 #: ../fish/guestfish-actions.pod:4441
23965 #: ../fish/guestfish-actions.pod:4443
23968 " zegrepi regex path\n"
23973 #: ../fish/guestfish-actions.pod:4451
23978 #: ../fish/guestfish-actions.pod:4453
23986 #: ../fish/guestfish-actions.pod:4461
23987 msgid "See also: L</zero-device>, L</scrub-device>."
23991 #: ../fish/guestfish-actions.pod:4463
23992 msgid "zero-device"
23996 #: ../fish/guestfish-actions.pod:4465
23999 " zero-device device\n"
24004 #: ../fish/guestfish-actions.pod:4467
24006 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
24007 "which just zeroes the first few blocks of a device."
24011 #: ../fish/guestfish-actions.pod:4474
24016 #: ../fish/guestfish-actions.pod:4476
24019 " zerofree device\n"
24024 #: ../fish/guestfish-actions.pod:4489
24029 #: ../fish/guestfish-actions.pod:4491
24032 " zfgrep pattern path\n"
24037 #: ../fish/guestfish-actions.pod:4499
24042 #: ../fish/guestfish-actions.pod:4501
24045 " zfgrepi pattern path\n"
24050 #: ../fish/guestfish-actions.pod:4509
24055 #: ../fish/guestfish-actions.pod:4511
24058 " zfile meth path\n"
24063 #: ../fish/guestfish-actions.pod:4518
24064 msgid "Since 1.0.63, use L</file> instead which can now process compressed files."
24068 #: ../fish/guestfish-actions.pod:4528
24073 #: ../fish/guestfish-actions.pod:4530
24076 " zgrep regex path\n"
24081 #: ../fish/guestfish-actions.pod:4538
24086 #: ../fish/guestfish-actions.pod:4540
24089 " zgrepi regex path\n"
24094 #: ../fish/guestfish-commands.pod:1
24099 #: ../fish/guestfish-commands.pod:3
24104 #: ../fish/guestfish-commands.pod:5
24107 " alloc filename size\n"
24112 #: ../fish/guestfish-commands.pod:7
24114 "This creates an empty (zeroed) file of the given size, and then adds so it "
24115 "can be further examined."
24119 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
24120 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
24124 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
24125 msgid "Size can be specified using standard suffixes, eg. C<1M>."
24129 #: ../fish/guestfish-commands.pod:14
24131 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
24132 "image, see L</PREPARED DISK IMAGES>."
24136 #: ../fish/guestfish-commands.pod:17
24141 #: ../fish/guestfish-commands.pod:19
24144 " copy-in local [local ...] /remotedir\n"
24149 #: ../fish/guestfish-commands.pod:21
24151 "C<copy-in> copies local files or directories recursively into the disk "
24152 "image, placing them in the directory called C</remotedir> (which must "
24153 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
24154 "other commands as necessary."
24158 #: ../fish/guestfish-commands.pod:26
24160 "Multiple local files and directories can be specified, but the last "
24161 "parameter must always be a remote directory. Wildcards cannot be used."
24165 #: ../fish/guestfish-commands.pod:30
24170 #: ../fish/guestfish-commands.pod:32
24173 " copy-out remote [remote ...] localdir\n"
24178 #: ../fish/guestfish-commands.pod:34
24180 "C<copy-out> copies remote files or directories recursively out of the disk "
24181 "image, placing them on the host disk in a local directory called C<localdir> "
24182 "(which must exist). This guestfish meta-command turns into a sequence of "
24183 "L</download>, L</tar-out> and other commands as necessary."
24187 #: ../fish/guestfish-commands.pod:40
24189 "Multiple remote files and directories can be specified, but the last "
24190 "parameter must always be a local directory. To download to the current "
24191 "directory, use C<.> as in:"
24195 #: ../fish/guestfish-commands.pod:44
24198 " copy-out /home .\n"
24203 #: ../fish/guestfish-commands.pod:46
24205 "Wildcards cannot be used in the ordinary command, but you can use them with "
24206 "the help of L</glob> like this:"
24210 #: ../fish/guestfish-commands.pod:49
24213 " glob copy-out /home/* .\n"
24218 #: ../fish/guestfish-commands.pod:51
24223 #: ../fish/guestfish-commands.pod:53
24226 " echo [params ...]\n"
24231 #: ../fish/guestfish-commands.pod:55
24232 msgid "This echos the parameters to the terminal."
24236 #: ../fish/guestfish-commands.pod:57
24241 #: ../fish/guestfish-commands.pod:59
24246 #: ../fish/guestfish-commands.pod:61
24251 #: ../fish/guestfish-commands.pod:63
24259 #: ../fish/guestfish-commands.pod:65
24261 "This is used to edit a file. It downloads the file, edits it locally using "
24262 "your editor, then uploads the result."
24266 #: ../fish/guestfish-commands.pod:68
24268 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
24269 "or C<emacs> you will get those corresponding editors."
24273 #: ../fish/guestfish-commands.pod:72
24278 #: ../fish/guestfish-commands.pod:74
24281 " glob command args...\n"
24286 #: ../fish/guestfish-commands.pod:76
24288 "Expand wildcards in any paths in the args list, and run C<command> "
24289 "repeatedly on each matching path."
24293 #: ../fish/guestfish-commands.pod:79
24294 msgid "See L</WILDCARDS AND GLOBBING>."
24298 #: ../fish/guestfish-commands.pod:81
24303 #: ../fish/guestfish-commands.pod:83
24306 " hexedit <filename|device>\n"
24307 " hexedit <filename|device> <max>\n"
24308 " hexedit <filename|device> <start> <max>\n"
24313 #: ../fish/guestfish-commands.pod:87
24315 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
24320 #: ../fish/guestfish-commands.pod:90
24322 "This command works by downloading potentially the whole file or device, "
24323 "editing it locally, then uploading it. If the file or device is large, you "
24324 "have to specify which part you wish to edit by using C<max> and/or C<start> "
24325 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
24326 "usual modifiers allowed such as C<1M> (1 megabyte)."
24330 #: ../fish/guestfish-commands.pod:97
24331 msgid "For example to edit the first few sectors of a disk you might do:"
24335 #: ../fish/guestfish-commands.pod:100
24338 " hexedit /dev/sda 1M\n"
24343 #: ../fish/guestfish-commands.pod:102
24345 "which would allow you to edit anywhere within the first megabyte of the "
24350 #: ../fish/guestfish-commands.pod:105
24351 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
24355 #: ../fish/guestfish-commands.pod:107
24358 " hexedit /dev/sda1 0x400 0x400\n"
24363 #: ../fish/guestfish-commands.pod:109
24364 msgid "(assuming the superblock is in the standard location)."
24368 #: ../fish/guestfish-commands.pod:111
24370 "This command requires the external L<hexedit(1)> program. You can specify "
24371 "another program to use by setting the C<HEXEDITOR> environment variable."
24375 #: ../fish/guestfish-commands.pod:115
24376 msgid "See also L</hexdump>."
24380 #: ../fish/guestfish-commands.pod:117
24385 #: ../fish/guestfish-commands.pod:119
24393 #: ../fish/guestfish-commands.pod:121
24394 msgid "Change the local directory, ie. the current directory of guestfish itself."
24398 #: ../fish/guestfish-commands.pod:124
24399 msgid "Note that C<!cd> won't do what you might expect."
24403 #: ../fish/guestfish-commands.pod:126
24408 #: ../fish/guestfish-commands.pod:128
24413 #: ../fish/guestfish-commands.pod:130
24421 #: ../fish/guestfish-commands.pod:132
24422 msgid "Opens the manual page for guestfish."
24426 #: ../fish/guestfish-commands.pod:134
24431 #: ../fish/guestfish-commands.pod:136
24436 #: ../fish/guestfish-commands.pod:138
24444 #: ../fish/guestfish-commands.pod:140
24452 #: ../fish/guestfish-commands.pod:142
24453 msgid "This is used to view a file."
24457 #: ../fish/guestfish-commands.pod:144
24459 "The default viewer is C<$PAGER>. However if you use the alternate command "
24460 "C<less> you will get the C<less> command specifically."
24464 #: ../fish/guestfish-commands.pod:147
24469 #: ../fish/guestfish-commands.pod:149
24477 #: ../fish/guestfish-commands.pod:151
24479 "Close and reopen the libguestfs handle. It is not necessary to use this "
24480 "normally, because the handle is closed properly when guestfish exits. "
24481 "However this is occasionally useful for testing."
24485 #: ../fish/guestfish-commands.pod:155
24490 #: ../fish/guestfish-commands.pod:157
24493 " sparse filename size\n"
24498 #: ../fish/guestfish-commands.pod:159
24500 "This creates an empty sparse file of the given size, and then adds so it can "
24501 "be further examined."
24505 #: ../fish/guestfish-commands.pod:162
24507 "In all respects it works the same as the L</alloc> command, except that the "
24508 "image file is allocated sparsely, which means that disk blocks are not "
24509 "assigned to the file until they are needed. Sparse disk files only use "
24510 "space when written to, but they are slower and there is a danger you could "
24511 "run out of real disk space during a write operation."
24515 #: ../fish/guestfish-commands.pod:172
24520 #: ../fish/guestfish-commands.pod:174
24528 #: ../fish/guestfish-commands.pod:176
24530 "This command returns a list of the optional groups known to the daemon, and "
24531 "indicates which ones are supported by this build of the libguestfs "
24536 #: ../fish/guestfish-commands.pod:180
24537 msgid "See also L<guestfs(3)/AVAILABILITY>."
24541 #: ../fish/guestfish-commands.pod:182
24546 #: ../fish/guestfish-commands.pod:184
24549 " time command args...\n"
24554 #: ../fish/guestfish-commands.pod:186
24556 "Run the command as usual, but print the elapsed time afterwards. This can "
24557 "be useful for benchmarking operations."
24561 #: ../test-tool/libguestfs-test-tool.pod:5
24562 msgid "libguestfs-test-tool - End user tests for libguestfs"
24566 #: ../test-tool/libguestfs-test-tool.pod:9
24569 " libguestfs-test-tool [--options]\n"
24574 #: ../test-tool/libguestfs-test-tool.pod:13
24576 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
24577 "and developers, to allow them to check basic libguestfs functionality is "
24578 "working. This is needed because libguestfs occasionally breaks for reasons "
24579 "beyond our control: usually because of changes in the underlying qemu or "
24580 "kernel packages, or the host environment."
24584 #: ../test-tool/libguestfs-test-tool.pod:20
24585 msgid "If you suspect a problem in libguestfs, then just run:"
24589 #: ../test-tool/libguestfs-test-tool.pod:22
24592 " libguestfs-test-tool\n"
24597 #: ../test-tool/libguestfs-test-tool.pod:24
24598 msgid "It will print lots of diagnostic messages."
24602 #: ../test-tool/libguestfs-test-tool.pod:26
24603 msgid "If it runs to completion successfully, you will see this near the end:"
24607 #: ../test-tool/libguestfs-test-tool.pod:28
24610 " ===== TEST FINISHED OK =====\n"
24615 #: ../test-tool/libguestfs-test-tool.pod:30
24616 msgid "and the test tool will exit with code 0."
24620 #: ../test-tool/libguestfs-test-tool.pod:32
24622 "If it fails (and/or exits with non-zero error code), please paste the "
24623 "B<complete, unedited> output of the test tool into a bug report. More "
24624 "information about reporting bugs can be found on the "
24625 "L<http://libguestfs.org/> website."
24629 #: ../test-tool/libguestfs-test-tool.pod:41
24634 #: ../test-tool/libguestfs-test-tool.pod:43
24635 msgid "Display short usage information and exit."
24639 #: ../test-tool/libguestfs-test-tool.pod:45
24640 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
24644 #: ../test-tool/libguestfs-test-tool.pod:47
24646 "Pass an alternate name for the helper program. libguestfs-test-tool will "
24647 "normally look in the C<$libexec> directory that was configured when the tool "
24652 #: ../test-tool/libguestfs-test-tool.pod:51
24653 msgid "I<--qemu qemu_binary>"
24657 #: ../test-tool/libguestfs-test-tool.pod:53
24659 "If you have downloaded another qemu binary, point this option at the full "
24660 "path of the binary to try it."
24664 #: ../test-tool/libguestfs-test-tool.pod:56
24665 msgid "I<--qemudir qemu_source_dir>"
24669 #: ../test-tool/libguestfs-test-tool.pod:58
24671 "If you have compiled qemu from source, point this option at the source "
24672 "directory to try it."
24676 #: ../test-tool/libguestfs-test-tool.pod:61
24677 msgid "I<--timeout N>"
24681 #: ../test-tool/libguestfs-test-tool.pod:63
24683 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
24684 "does not usually need to be adjusted unless your machine is very slow."
24688 #: ../test-tool/libguestfs-test-tool.pod:69
24689 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
24693 #: ../test-tool/libguestfs-test-tool.pod:71
24695 "If you have compiled another version of qemu from source and would like to "
24696 "try that, then you can use the I<--qemudir> option to point to the qemu "
24697 "source directory."
24701 #: ../test-tool/libguestfs-test-tool.pod:75
24703 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
24704 "option to point to the binary."
24708 #: ../test-tool/libguestfs-test-tool.pod:78
24710 "When using an alternate qemu with libguestfs, usually you would need to "
24711 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in "
24712 "L<guestfs(3)>). libguestfs-test-tool writes a temporary qemu wrapper script "
24713 "when you use either of the I<--qemudir> or I<--qemu> options."
24717 #: ../test-tool/libguestfs-test-tool.pod:85
24719 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
24720 "I<1> if there was an error."
24724 #: ../test-tool/libguestfs-test-tool.pod:92
24725 msgid "/usr/libexec/libguestfs-test-tool-helper"
24729 #: ../test-tool/libguestfs-test-tool.pod:94
24731 "This helper program is run inside the appliance and provides additional "
24736 #: ../test-tool/libguestfs-test-tool.pod:97
24737 msgid "/usr/bin/mkisofs"
24741 #: ../test-tool/libguestfs-test-tool.pod:99
24743 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
24744 "which is used as part of the tests."
24748 #: ../test-tool/libguestfs-test-tool.pod:106
24750 "For the full list of environment variables which may affect libguestfs, "
24751 "please see the L<guestfs(3)> manual page."
24755 #: ../test-tool/libguestfs-test-tool.pod:111
24756 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
24760 #: ../test-tool/libguestfs-test-tool.pod:121
24761 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
24765 #: ../fuse/guestmount.pod:5
24766 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
24770 #: ../fuse/guestmount.pod:9
24773 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
24778 #: ../fuse/guestmount.pod:11
24781 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
24786 #: ../fuse/guestmount.pod:13
24789 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
24794 #: ../fuse/guestmount.pod:17
24796 "You must I<not> use C<guestmount> in read-write mode on live virtual "
24797 "machines. If you do this, you risk disk corruption in the VM."
24801 #: ../fuse/guestmount.pod:22
24803 "The guestmount program can be used to mount virtual machine filesystems and "
24804 "other disk images on the host. It uses libguestfs for access to the guest "
24805 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
24806 "a mountable device."
24810 #: ../fuse/guestmount.pod:27
24812 "Along with other options, you have to give at least one device (I<-a> "
24813 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
24814 "option) or use the I<-i> inspection option. How this works is better "
24815 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
24820 #: ../fuse/guestmount.pod:33
24822 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
24823 "by you, and the filesystem will not be visible to any other users unless you "
24824 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
24825 "the filesystem, use the C<fusermount -u> command."
24829 #: ../fuse/guestmount.pod:41
24831 "For a typical Windows guest which has its main filesystem on the first "
24836 #: ../fuse/guestmount.pod:44
24839 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
24844 #: ../fuse/guestmount.pod:46
24846 "For a typical Linux guest which has a /boot filesystem on the first "
24847 "partition, and the root filesystem on a logical volume:"
24851 #: ../fuse/guestmount.pod:49
24854 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
24859 #: ../fuse/guestmount.pod:51
24860 msgid "To get libguestfs to detect guest mountpoints for you:"
24864 #: ../fuse/guestmount.pod:53
24867 " guestmount -a guest.img -i --ro /mnt\n"
24872 #: ../fuse/guestmount.pod:55
24873 msgid "For a libvirt guest called \"Guest\" you could do:"
24877 #: ../fuse/guestmount.pod:57
24880 " guestmount -d Guest -i --ro /mnt\n"
24885 #: ../fuse/guestmount.pod:59
24887 "If you don't know what filesystems are contained in a guest or disk image, "
24888 "use L<virt-list-filesystems(1)> first:"
24892 #: ../fuse/guestmount.pod:62
24895 " virt-list-filesystems MyGuest\n"
24900 #: ../fuse/guestmount.pod:64
24902 "If you want to trace the libguestfs calls but without excessive debugging "
24903 "information, we recommend:"
24907 #: ../fuse/guestmount.pod:67
24910 " guestmount [...] --trace /mnt\n"
24915 #: ../fuse/guestmount.pod:69
24916 msgid "If you want to debug the program, we recommend:"
24920 #: ../fuse/guestmount.pod:71
24923 " guestmount [...] --trace --verbose /mnt\n"
24928 #: ../fuse/guestmount.pod:79
24929 msgid "Add a block device or virtual machine image."
24933 #: ../fuse/guestmount.pod:96
24934 msgid "B<--dir-cache-timeout N>"
24938 #: ../fuse/guestmount.pod:98
24940 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
24941 "seconds. The readdir cache [actually, there are several semi-independent "
24942 "caches] is populated after a readdir(2) call with the stat and extended "
24943 "attributes of the files in the directory, in anticipation that they will be "
24944 "requested soon after."
24948 #: ../fuse/guestmount.pod:104
24950 "There is also a different attribute cache implemented by FUSE (see the FUSE "
24951 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
24952 "requests, only cache existing ones."
24956 #: ../fuse/guestmount.pod:122
24958 "If you have untrusted raw-format guest disk images, you should use this "
24959 "option to specify the disk format. This avoids a possible security problem "
24960 "with malicious guests (CVE-2010-3851). See also "
24961 "L<guestfs(3)/guestfs_add_drive_opts>."
24965 #: ../fuse/guestmount.pod:127
24966 msgid "B<--fuse-help>"
24970 #: ../fuse/guestmount.pod:129
24971 msgid "Display help on special FUSE options (see I<-o> below)."
24975 #: ../fuse/guestmount.pod:133
24976 msgid "Display brief help and exit."
24980 #: ../fuse/guestmount.pod:146
24981 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
24985 #: ../fuse/guestmount.pod:148
24987 "Mount the named partition or logical volume on the given mountpoint B<in the "
24988 "guest> (this has nothing to do with mountpoints in the host)."
24992 #: ../fuse/guestmount.pod:151
24994 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
24995 "something on C</>."
24999 #: ../fuse/guestmount.pod:156
25001 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
25002 "unmounted. If you specify this option, then we don't attempt to sync the "
25003 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
25007 #: ../fuse/guestmount.pod:161
25008 msgid "B<-o option> | B<--option option>"
25012 #: ../fuse/guestmount.pod:163
25013 msgid "Pass extra options to FUSE."
25017 #: ../fuse/guestmount.pod:165
25019 "To get a list of all the extra options supported by FUSE, use the command "
25020 "below. Note that only the FUSE I<-o> options can be passed, and only some "
25021 "of them are a good idea."
25025 #: ../fuse/guestmount.pod:169
25028 " guestmount --fuse-help\n"
25033 #: ../fuse/guestmount.pod:171
25034 msgid "Some potentially useful FUSE options:"
25038 #: ../fuse/guestmount.pod:175
25039 msgid "B<-o allow_other>"
25043 #: ../fuse/guestmount.pod:177
25044 msgid "Allow other users to see the filesystem."
25048 #: ../fuse/guestmount.pod:179
25049 msgid "B<-o attr_timeout=N>"
25053 #: ../fuse/guestmount.pod:181
25054 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
25058 #: ../fuse/guestmount.pod:183
25059 msgid "B<-o kernel_cache>"
25063 #: ../fuse/guestmount.pod:185
25065 "Allow the kernel to cache files (reduces the number of reads that have to go "
25066 "through the L<guestfs(3)> API). This is generally a good idea if you can "
25067 "afford the extra memory usage."
25071 #: ../fuse/guestmount.pod:189
25072 msgid "B<-o uid=N> B<-o gid=N>"
25076 #: ../fuse/guestmount.pod:191
25078 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
25079 "the chosen values."
25083 #: ../fuse/guestmount.pod:198
25085 "Add devices and mount everything read-only. Also disallow writes and make "
25086 "the disk appear read-only to FUSE."
25090 #: ../fuse/guestmount.pod:201
25092 "This is highly recommended if you are not going to edit the guest disk. If "
25093 "the guest is running and this option is I<not> supplied, then there is a "
25094 "strong risk of disk corruption in the guest. We try to prevent this from "
25095 "happening, but it is not always possible."
25099 #: ../fuse/guestmount.pod:206
25100 msgid "See also L<guestfish(1)/OPENING DISKS FOR READ AND WRITE>."
25104 #: ../fuse/guestmount.pod:210
25105 msgid "Enable SELinux support for the guest."
25109 #: ../fuse/guestmount.pod:214
25110 msgid "Enable verbose messages from underlying libguestfs."
25114 #: ../fuse/guestmount.pod:218
25115 msgid "Display the program version and exit."
25119 #: ../fuse/guestmount.pod:222
25121 "This option does nothing at the moment. See L<guestfish(1)/OPENING DISKS "
25122 "FOR READ AND WRITE>."
25126 #: ../fuse/guestmount.pod:225
25127 msgid "B<-x> | B<--trace>"
25131 #: ../fuse/guestmount.pod:227
25132 msgid "Trace libguestfs calls."
25136 #: ../fuse/guestmount.pod:229
25137 msgid "This also stops the daemon from forking into the background."
25141 #: ../fuse/guestmount.pod:235
25143 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
25144 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
25145 "L<http://fuse.sf.net/>."
25149 #: ../inspector/virt-inspector.pl:35
25151 "virt-inspector - Display operating system version and other information "
25152 "about a virtual machine"
25156 #: ../inspector/virt-inspector.pl:39
25159 " virt-inspector [--connect URI] domname\n"
25164 #: ../inspector/virt-inspector.pl:41
25167 " virt-inspector guest.img [guest.img ...]\n"
25172 #: ../inspector/virt-inspector.pl:45
25174 "B<virt-inspector> examines a virtual machine or disk image and tries to "
25175 "determine the version of the operating system and other information about "
25176 "the virtual machine."
25180 #: ../inspector/virt-inspector.pl:49
25181 msgid "Virt-inspector produces XML output for feeding into other programs."
25185 #: ../inspector/virt-inspector.pl:51
25187 "In the normal usage, use C<virt-inspector domname> where C<domname> is the "
25188 "libvirt domain (see: C<virsh list --all>)."
25192 #: ../inspector/virt-inspector.pl:54
25194 "You can also run virt-inspector directly on disk images from a single "
25195 "virtual machine. Use C<virt-inspector guest.img>. In rare cases a domain "
25196 "has several block devices, in which case you should list them one after "
25197 "another, with the first corresponding to the guest's C</dev/sda>, the second "
25198 "to the guest's C</dev/sdb> and so on."
25202 #: ../inspector/virt-inspector.pl:60
25204 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
25205 "inspect several virtual machines, you have to run virt-inspector several "
25206 "times (for example, from a shell script for-loop)."
25210 #: ../inspector/virt-inspector.pl:65
25212 "Because virt-inspector needs direct access to guest images, it won't "
25213 "normally work over remote libvirt connections."
25217 #: ../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
25218 msgid "Display brief help."
25222 #: ../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
25223 msgid "B<--version>"
25227 #: ../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
25228 msgid "Display version number and exit."
25232 #: ../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
25233 msgid "B<--connect URI> | B<-c URI>"
25237 #: ../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
25239 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
25240 "to the default libvirt hypervisor."
25244 #: ../inspector/virt-inspector.pl:97
25246 "Libvirt is only used if you specify a C<domname> on the command line. If "
25247 "you specify guest block devices directly, then libvirt is not used at all."
25251 #: ../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
25252 msgid "B<--format> raw"
25256 #: ../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
25258 "Specify the format of disk images given on the command line. If this is "
25259 "omitted then the format is autodetected from the content of the disk image."
25263 #: ../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
25265 "If disk images are requested from libvirt, then this program asks libvirt "
25266 "for this information. In this case, the value of the format parameter is "
25271 #: ../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
25273 "If working with untrusted raw-format guest disk images, you should ensure "
25274 "the format is always specified."
25278 #: ../inspector/virt-inspector.pl:149
25283 #: ../inspector/virt-inspector.pl:151
25285 "The virt-inspector XML is described precisely in a RELAX NG schema which is "
25286 "supplied with libguestfs. This section is just an overview."
25290 #: ../inspector/virt-inspector.pl:154
25292 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
25293 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
25294 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
25295 "which is vanishingly rare in real world VMs."
25299 #: ../inspector/virt-inspector.pl:159
25300 msgid "E<lt>operatingsystemE<gt>"
25304 #: ../inspector/virt-inspector.pl:161
25306 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
25307 "describe the operating system, its architecture, the descriptive \"product "
25308 "name\" string, the type of OS and so on, as in this example:"
25312 #: ../inspector/virt-inspector.pl:165
25315 " <operatingsystems>\n"
25316 " <operatingsystem>\n"
25317 " <root>/dev/sda2</root>\n"
25318 " <name>windows</name>\n"
25319 " <arch>i386</arch>\n"
25320 " <distro>windows</distro>\n"
25321 " <product_name>Windows 7 Enterprise</product_name>\n"
25322 " <major_version>6</major_version>\n"
25323 " <minor_version>1</minor_version>\n"
25324 " <windows_systemroot>/Windows</windows_systemroot>\n"
25329 #: ../inspector/virt-inspector.pl:176
25331 "These fields are derived from the libguestfs inspection API, and you can "
25332 "find more details in L<guestfs(3)/INSPECTION>."
25336 #: ../inspector/virt-inspector.pl:179
25338 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
25339 "of view of libguestfs (block devices may have completely different names "
25340 "inside the VM itself)."
25344 #: ../inspector/virt-inspector.pl:240
25345 msgid "E<lt>mountpointsE<gt>"
25349 #: ../inspector/virt-inspector.pl:242
25351 "Un*x-like guests typically have multiple filesystems which are mounted at "
25352 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
25353 "element which looks like this:"
25357 #: ../inspector/virt-inspector.pl:246
25360 " <operatingsystems>\n"
25361 " <operatingsystem>\n"
25364 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
25365 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
25366 " </mountpoints>\n"
25371 #: ../inspector/virt-inspector.pl:254
25373 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
25374 "and may have completely different names inside the guest. Only mountable "
25375 "filesystems appear in this list, not things like swap devices."
25379 #: ../inspector/virt-inspector.pl:276
25380 msgid "E<lt>filesystemsE<gt>"
25384 #: ../inspector/virt-inspector.pl:278
25386 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
25387 "filesystems belonging to the guest, including swap and empty partitions. "
25388 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
25389 "this OS or shared by this OS and other OSes)."
25393 #: ../inspector/virt-inspector.pl:283
25394 msgid "You might see something like this:"
25398 #: ../inspector/virt-inspector.pl:285
25401 " <operatingsystems>\n"
25402 " <operatingsystem>\n"
25405 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
25406 " <type>ext4</type>\n"
25407 " <label>Fedora-13-x86_64</label>\n"
25408 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
25414 #: ../inspector/virt-inspector.pl:295
25416 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
25417 "the label, and the UUID."
25421 #: ../inspector/virt-inspector.pl:337
25422 msgid "E<lt>applicationsE<gt>"
25426 #: ../inspector/virt-inspector.pl:339
25428 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
25429 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
25430 "machine. At the moment we are only able to list RPMs and Debian packages "
25431 "installed, but in future we will support other Linux distros and Windows."
25435 #: ../inspector/virt-inspector.pl:345
25437 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
25438 "Typical values would be C<rpm> and C<deb>."
25442 #: ../inspector/virt-inspector.pl:348
25444 "E<lt>package_managementE<gt>, if present, describes the package manager. "
25445 "Typical values include C<yum>, C<up2date> and C<apt>"
25449 #: ../inspector/virt-inspector.pl:351
25450 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
25454 #: ../inspector/virt-inspector.pl:354
25457 " <operatingsystems>\n"
25458 " <operatingsystem>\n"
25460 " <applications>\n"
25462 " <name>coreutils</name>\n"
25463 " <version>8.5</version>\n"
25464 " <release>1</release>\n"
25465 " </application>\n"
25470 #: ../inspector/virt-inspector.pl:364
25472 "(The version and release fields may not be available for some package "
25477 #: ../inspector/virt-inspector.pl:510
25478 msgid "USING XPATH"
25482 #: ../inspector/virt-inspector.pl:512
25484 "You can use the XPath query language, and/or the xpath tool, in order to "
25485 "select parts of the XML."
25489 #: ../inspector/virt-inspector.pl:517
25492 " $ virt-inspector Guest | xpath //filesystems\n"
25493 " Found 1 nodes:\n"
25496 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
25497 " <type>ext4</type>\n"
25503 #: ../inspector/virt-inspector.pl:525
25506 " $ virt-inspector Guest | \\\n"
25507 " xpath \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
25508 " Query didn't return a nodeset. Value: ext4\n"
25513 #: ../inspector/virt-inspector.pl:529 ../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
25514 msgid "SHELL QUOTING"
25518 #: ../inspector/virt-inspector.pl:531 ../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
25520 "Libvirt guest names can contain arbitrary characters, some of which have "
25521 "meaning to the shell such as C<#> and space. You may need to quote or "
25522 "escape these characters on the command line. See the shell manual page "
25523 "L<sh(1)> for details."
25527 #: ../inspector/virt-inspector.pl:538
25529 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
25530 "L<Sys::Virt(3)>, L<http://www.w3.org/TR/xpath/>, L<http://libguestfs.org/>."
25534 #: ../inspector/virt-inspector.pl:552 ../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
25535 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
25539 #: ../inspector/virt-inspector.pl:556
25540 msgid "Matthew Booth L<mbooth@redhat.com>"
25544 #: ../inspector/virt-inspector.pl:562 ../tools/virt-win-reg.pl:516 ../tools/virt-resize.pl:1514 ../tools/virt-make-fs.pl:565
25545 msgid "Copyright (C) 2010 Red Hat Inc."
25549 #: ../tools/virt-edit.pl:34
25550 msgid "virt-edit - Edit a file in a virtual machine"
25554 #: ../tools/virt-edit.pl:38
25557 " virt-edit [--options] domname file\n"
25562 #: ../tools/virt-edit.pl:40
25565 " virt-edit [--options] disk.img [disk.img ...] file\n"
25570 #: ../tools/virt-edit.pl:42
25573 " virt-edit [domname|disk.img] file -e 'expr'\n"
25578 #: ../tools/virt-edit.pl:46
25580 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
25581 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
25582 "doing this, but doesn't catch all cases."
25586 #: ../tools/virt-edit.pl:52
25588 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
25589 "the named virtual machine (or disk image)."
25593 #: ../tools/virt-edit.pl:55
25595 "If you want to just view a file, use L<virt-cat(1)>. For more complex cases "
25596 "you should look at the L<guestfish(1)> tool."
25600 #: ../tools/virt-edit.pl:60
25601 msgid "Edit the named files interactively:"
25605 #: ../tools/virt-edit.pl:62
25608 " virt-edit mydomain /boot/grub/grub.conf\n"
25613 #: ../tools/virt-edit.pl:64
25616 " virt-edit mydomain /etc/passwd\n"
25621 #: ../tools/virt-edit.pl:66
25623 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
25624 "below). To change the init default level to 5:"
25628 #: ../tools/virt-edit.pl:70
25631 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
25636 #: ../tools/virt-edit.pl:96
25637 msgid "B<--backup extension> | B<-b extension>"
25641 #: ../tools/virt-edit.pl:98
25643 "Create a backup of the original file I<in the guest disk image>. The backup "
25644 "has the original filename with C<extension> added."
25648 #: ../tools/virt-edit.pl:101
25650 "Usually the first character of C<extension> would be a dot C<.> so you would "
25655 #: ../tools/virt-edit.pl:104
25658 " virt-edit -b .orig [etc]\n"
25663 #: ../tools/virt-edit.pl:106
25664 msgid "By default, no backup file is made."
25668 #: ../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
25670 "If you specify guest block devices directly, then libvirt is not used at "
25675 #: ../tools/virt-edit.pl:141
25676 msgid "B<--expr EXPR> | B<-e EXPR>"
25680 #: ../tools/virt-edit.pl:143
25682 "Instead of launching the external editor, non-interactively apply the Perl "
25683 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
25688 #: ../tools/virt-edit.pl:147
25690 "Be careful to properly quote the expression to prevent it from being altered "
25695 #: ../tools/virt-edit.pl:268
25696 msgid "NON-INTERACTIVE EDITING"
25700 #: ../tools/virt-edit.pl:270
25702 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
25703 "administrator can interactively edit the file."
25707 #: ../tools/virt-edit.pl:273
25709 "There are two ways also to use C<virt-edit> from scripts in order to make "
25710 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
25711 "like this, it's less error-prone to write scripts directly using the "
25712 "libguestfs API and Augeas for configuration file editing.)"
25716 #: ../tools/virt-edit.pl:279
25718 "The first method is to temporarily set C<$EDITOR> to any script or program "
25719 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
25720 "update C<tmpfile> in place however it likes."
25724 #: ../tools/virt-edit.pl:283
25726 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
25727 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
25728 "instances of C<foo> with C<bar> in a file:"
25732 #: ../tools/virt-edit.pl:287
25735 " virt-edit domname filename -e 's/foo/bar/'\n"
25740 #: ../tools/virt-edit.pl:289
25742 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
25743 "For example to delete root's password you could do:"
25747 #: ../tools/virt-edit.pl:292
25750 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
25755 #: ../tools/virt-edit.pl:294
25757 "What really happens is that the snippet is evaluated as a Perl expression "
25758 "for each line of the file. The line, including the final C<\\n>, is passed "
25759 "in C<$_> and the expression should update C<$_> or leave it unchanged."
25763 #: ../tools/virt-edit.pl:299
25765 "To delete a line, set C<$_> to the empty string. For example, to delete the "
25766 "C<apache> user account from the password file you can do:"
25770 #: ../tools/virt-edit.pl:302
25773 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
25778 #: ../tools/virt-edit.pl:304
25780 "To insert a line, prepend or append it to C<$_>. However appending lines to "
25781 "the end of the file is rather difficult this way since there is no concept "
25782 "of \"last line of the file\" - your expression just doesn't get called "
25783 "again. You might want to use the first method (setting C<$EDITOR>) if you "
25788 #: ../tools/virt-edit.pl:310
25790 "The variable C<$lineno> contains the current line number. As is "
25791 "traditional, the first line in the file is number C<1>."
25795 #: ../tools/virt-edit.pl:313
25797 "The return value from the expression is ignored, but the expression may call "
25798 "C<die> in order to abort the whole program, leaving the original file "
25803 #: ../tools/virt-edit.pl:317
25805 "Remember when matching the end of a line that C<$_> may contain the final "
25806 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
25807 "newline then neither of these. Thus to match or substitute some text at the "
25808 "end of a line, use this regular expression:"
25812 #: ../tools/virt-edit.pl:322
25815 " /some text(\\r?\\n)?$/\n"
25820 #: ../tools/virt-edit.pl:324
25822 "Alternately, use the perl C<chomp> function, being careful not to chomp "
25823 "C<$_> itself (since that would remove all newlines from the file):"
25827 #: ../tools/virt-edit.pl:328
25830 " my $m = $_; chomp $m; $m =~ /some text$/\n"
25835 #: ../tools/virt-edit.pl:334
25840 #: ../tools/virt-edit.pl:336
25842 "If set, this string is used as the editor. It may contain arguments, "
25843 "eg. C<\"emacs -nw\">"
25847 #: ../tools/virt-edit.pl:339
25848 msgid "If not set, C<vi> is used."
25852 #: ../tools/virt-edit.pl:352
25854 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
25855 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>, "
25856 "L<perl(1)>, L<perlre(1)>."
25860 #: ../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
25865 #: ../tools/virt-edit.pl:368 ../tools/virt-df.pl:655 ../tools/virt-rescue.pl:283 ../tools/virt-list-partitions.pl:271
25866 msgid "Copyright (C) 2009-2010 Red Hat Inc."
25870 #: ../tools/virt-win-reg.pl:37
25872 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
25877 #: ../tools/virt-win-reg.pl:41
25880 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
25885 #: ../tools/virt-win-reg.pl:43
25888 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
25893 #: ../tools/virt-win-reg.pl:45
25896 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
25901 #: ../tools/virt-win-reg.pl:47
25904 " virt-win-reg --merge domname [input.reg ...]\n"
25909 #: ../tools/virt-win-reg.pl:49
25912 " virt-win-reg [--options] disk.img ... # instead of domname\n"
25917 #: ../tools/virt-win-reg.pl:53
25919 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
25920 "virtual machines. If you do this, you I<will> get irreversible disk "
25921 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
25922 "but doesn't catch all cases."
25926 #: ../tools/virt-win-reg.pl:58
25928 "Modifying the Windows Registry is an inherently risky operation. The format "
25929 "is deliberately obscure and undocumented, and Registry changes can leave the "
25930 "system unbootable. Therefore when using the C<--merge> option, make sure "
25931 "you have a reliable backup first."
25935 #: ../tools/virt-win-reg.pl:65
25937 "This program can export and merge Windows Registry entries from a Windows "
25942 #: ../tools/virt-win-reg.pl:68
25944 "The first parameter is the libvirt guest name or the raw disk image of a "
25949 #: ../tools/virt-win-reg.pl:71
25951 "If C<--merge> is I<not> specified, then the chosen registry key is "
25952 "displayed/exported (recursively). For example:"
25956 #: ../tools/virt-win-reg.pl:74
25959 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
25964 #: ../tools/virt-win-reg.pl:76
25965 msgid "You can also display single values from within registry keys, for example:"
25969 #: ../tools/virt-win-reg.pl:79
25972 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
25973 " $ virt-win-reg Windows7 $cvkey ProductName\n"
25974 " Windows 7 Enterprise\n"
25979 #: ../tools/virt-win-reg.pl:83
25981 "With C<--merge>, you can merge a textual regedit file into the Windows "
25986 #: ../tools/virt-win-reg.pl:86
25989 " $ virt-win-reg --merge Windows7 changes.reg\n"
25994 #: ../tools/virt-win-reg.pl:88
25995 msgid "SUPPORTED SYSTEMS"
25999 #: ../tools/virt-win-reg.pl:90
26001 "The program currently supports Windows NT-derived guests starting with "
26002 "Windows XP through to at least Windows 7."
26006 #: ../tools/virt-win-reg.pl:93
26008 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, "
26009 "C<HKEY_LOCAL_MACHINE\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, "
26010 "C<HKEY_LOCAL_MACHINE\\SYSTEM> and C<HKEY_USERS\\.DEFAULT>."
26014 #: ../tools/virt-win-reg.pl:97
26016 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
26021 #: ../tools/virt-win-reg.pl:100
26023 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
26028 #: ../tools/virt-win-reg.pl:103
26033 #: ../tools/virt-win-reg.pl:105
26035 "This program is only meant for simple access to the registry. If you want "
26036 "to do complicated things with the registry, we suggest you download the "
26037 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
26038 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
26039 "L<hivexregedit(1)>."
26043 #: ../tools/virt-win-reg.pl:111
26048 #: ../tools/virt-win-reg.pl:113
26050 "C<virt-win-reg> expects that regedit files have already been reencoded in "
26051 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
26052 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
26053 "with Windows-style line endings, you may need to reencode the whole file "
26054 "before or after processing."
26058 #: ../tools/virt-win-reg.pl:119
26060 "To reencode a file from Windows format to Linux (before processing it with "
26061 "the C<--merge> option), you would do something like this:"
26065 #: ../tools/virt-win-reg.pl:122
26068 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
26073 #: ../tools/virt-win-reg.pl:124
26075 "To go in the opposite direction, after exporting and before sending the file "
26076 "to a Windows user, do something like this:"
26080 #: ../tools/virt-win-reg.pl:127
26083 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
26088 #: ../tools/virt-win-reg.pl:129
26089 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
26093 #: ../tools/virt-win-reg.pl:131
26095 "If you are unsure about the current encoding, use the L<file(1)> command. "
26096 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
26097 "Windows-style (CRLF) line endings, like this:"
26101 #: ../tools/virt-win-reg.pl:135
26104 " $ file software.reg\n"
26105 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
26106 " with CRLF line terminators\n"
26111 #: ../tools/virt-win-reg.pl:139
26112 msgid "This file would need conversion before you could C<--merge> it."
26116 #: ../tools/virt-win-reg.pl:143
26118 "Be careful when passing parameters containing C<\\> (backslash) in the "
26119 "shell. Usually you will have to use 'single quotes' or double backslashes "
26120 "(but not both) to protect them from the shell."
26124 #: ../tools/virt-win-reg.pl:147
26125 msgid "Paths and value names are case-insensitive."
26129 #: ../tools/virt-win-reg.pl:149
26130 msgid "CurrentControlSet etc."
26134 #: ../tools/virt-win-reg.pl:151
26136 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
26137 "Registry at the level of the hive file, and therefore you cannot modify "
26142 #: ../tools/virt-win-reg.pl:155
26144 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
26145 "circumstances it might refer to another control set. The way to find out is "
26146 "to look at the C<HKLM\\SYSTEM\\Select> key:"
26150 #: ../tools/virt-win-reg.pl:159
26153 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
26154 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
26155 " \"Current\"=dword:00000001\n"
26156 " \"Default\"=dword:00000001\n"
26157 " \"Failed\"=dword:00000000\n"
26158 " \"LastKnownGood\"=dword:00000002\n"
26163 #: ../tools/virt-win-reg.pl:166
26164 msgid "\"Current\" is the one which Windows will choose when it boots."
26168 #: ../tools/virt-win-reg.pl:168
26169 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
26173 #: ../tools/virt-win-reg.pl:195 ../tools/virt-make-fs.pl:177
26178 #: ../tools/virt-win-reg.pl:197 ../tools/virt-resize.pl:501
26179 msgid "Enable debugging messages."
26183 #: ../tools/virt-win-reg.pl:232
26188 #: ../tools/virt-win-reg.pl:234
26190 "In merge mode, this merges a textual regedit file into the Windows Registry "
26191 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
26192 "displays or exports Registry entries instead."
26196 #: ../tools/virt-win-reg.pl:238
26198 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
26199 "result in disk corruption. However exporting (without this flag) is always "
26204 #: ../tools/virt-win-reg.pl:246
26205 msgid "B<--encoding> UTF-16LE|ASCII"
26209 #: ../tools/virt-win-reg.pl:248
26211 "When merging (only), you may need to specify the encoding for strings to be "
26212 "used in the hive file. This is explained in detail in "
26213 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
26217 #: ../tools/virt-win-reg.pl:252
26219 "The default is to use UTF-16LE, which should work with recent versions of "
26224 #: ../tools/virt-win-reg.pl:486
26226 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
26227 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
26228 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
26229 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
26233 #: ../tools/virt-win-reg.pl:501 ../tools/virt-make-fs.pl:550
26235 "When reporting bugs, please enable debugging and capture the I<complete> "
26240 #: ../tools/virt-win-reg.pl:504
26243 " export LIBGUESTFS_DEBUG=1\n"
26244 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
26249 #: ../tools/virt-win-reg.pl:507
26251 "Attach /tmp/virt-win-reg.log to a new bug report at "
26252 "L<https://bugzilla.redhat.com/>"
26256 #: ../tools/virt-df.pl:36
26257 msgid "virt-df - Display free space on virtual filesystems"
26261 #: ../tools/virt-df.pl:40
26264 " virt-df [--options]\n"
26269 #: ../tools/virt-df.pl:42
26272 " virt-df [--options] domname\n"
26277 #: ../tools/virt-df.pl:44
26280 " virt-df [--options] disk.img [disk.img ...]\n"
26285 #: ../tools/virt-df.pl:48
26287 "C<virt-df> is a command line tool to display free space on virtual machine "
26288 "filesystems. Unlike other tools, it doesn't just display the amount of "
26289 "space allocated to a virtual machine, but can look inside the virtual "
26290 "machine to see how much space is really being used."
26294 #: ../tools/virt-df.pl:53
26296 "It is like the L<df(1)> command, but for virtual machines, except that it "
26297 "also works for Windows virtual machines."
26301 #: ../tools/virt-df.pl:56
26303 "If used without any arguments, C<virt-df> checks with libvirt to get a list "
26304 "of all active and inactive guests, and performs a C<df>-type operation on "
26305 "each one in turn, printing out the results."
26309 #: ../tools/virt-df.pl:60
26311 "If used with any argument(s), C<virt-df> performs a C<df>-type operation on "
26312 "either the single named libvirt domain, or on the disk image(s) listed on "
26313 "the command line (which must all belong to a single VM). In this mode (with "
26314 "arguments), C<virt-df> will I<only work for a single guest>. If you want to "
26315 "run on multiple guests, then you have to invoke C<virt-df> multiple times."
26319 #: ../tools/virt-df.pl:67
26321 "Use the C<--csv> option to get a format which can be easily parsed by other "
26322 "programs. Other options are mostly similar to standard C<df> options. See "
26323 "below for the complete list."
26327 #: ../tools/virt-df.pl:107
26332 #: ../tools/virt-df.pl:109
26334 "Write out the results in CSV format (comma-separated values). This format "
26335 "can be imported easily into databases and spreadsheets, but read L</NOTE "
26336 "ABOUT CSV FORMAT> below."
26340 #: ../tools/virt-df.pl:134
26341 msgid "B<--human-readable> | B<-h>"
26345 #: ../tools/virt-df.pl:136
26346 msgid "Print sizes in human-readable format."
26350 #: ../tools/virt-df.pl:138
26351 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
26355 #: ../tools/virt-df.pl:144
26356 msgid "B<--inodes> | B<-i>"
26360 #: ../tools/virt-df.pl:146
26361 msgid "Print inodes instead of blocks."
26365 #: ../tools/virt-df.pl:152
26366 msgid "B<--one-per-guest>"
26370 #: ../tools/virt-df.pl:154
26372 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
26373 "disks from several guests to a single libguestfs appliance."
26377 #: ../tools/virt-df.pl:157
26378 msgid "You might use this option in the following circumstances:"
26382 #: ../tools/virt-df.pl:163
26384 "If you think an untrusted guest might actively try to exploit the libguestfs "
26385 "appliance kernel, then this prevents one guest from interfering with the "
26386 "stats printed for another guest."
26390 #: ../tools/virt-df.pl:169
26392 "If the kernel has a bug which stops it from accessing a filesystem in one "
26393 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
26394 "and report stats for further guests."
26398 #: ../tools/virt-df.pl:180
26403 #: ../tools/virt-df.pl:182
26405 "Print UUIDs instead of names. This is useful for following a guest even "
26406 "when the guest is migrated or renamed, or when two guests happen to have the "
26411 #: ../tools/virt-df.pl:186
26413 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
26414 "images, we still print the disk image name even when this option is "
26419 #: ../tools/virt-df.pl:609
26420 msgid "NOTE ABOUT CSV FORMAT"
26424 #: ../tools/virt-df.pl:611
26426 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
26427 "should be easy to parse, but it is definitely not easy to parse."
26431 #: ../tools/virt-df.pl:614
26433 "Myth: Just split fields at commas. Reality: This does I<not> work "
26434 "reliably. This example has two columns:"
26438 #: ../tools/virt-df.pl:617
26441 " \"foo,bar\",baz\n"
26446 #: ../tools/virt-df.pl:619
26448 "Myth: Read the file one line at a time. Reality: This does I<not> work "
26449 "reliably. This example has one row:"
26453 #: ../tools/virt-df.pl:622
26462 #: ../tools/virt-df.pl:625
26464 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
26465 "packaged in major Linux distributions)."
26469 #: ../tools/virt-df.pl:628
26471 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
26472 "or Python's built-in csv library)."
26476 #: ../tools/virt-df.pl:631
26477 msgid "Most spreadsheets and databases can import CSV directly."
26481 #: ../tools/virt-df.pl:642
26483 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
26484 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
26488 #: ../tools/virt-ls.pl:34
26489 msgid "virt-ls - List files in a virtual machine"
26493 #: ../tools/virt-ls.pl:38
26496 " virt-ls [--options] domname directory\n"
26501 #: ../tools/virt-ls.pl:40
26504 " virt-ls [--options] disk.img [disk.img ...] directory\n"
26509 #: ../tools/virt-ls.pl:44
26511 "C<virt-ls> is a command line tool to list the names of files in a directory "
26512 "inside a virtual machine or disk image."
26516 #: ../tools/virt-ls.pl:47
26518 "C<virt-ls> is just a simple wrapper around L<libguestfs(3)> functionality. "
26519 "For more complex cases you should look at the L<guestfish(1)> tool."
26523 #: ../tools/virt-ls.pl:51
26525 "C<virt-ls> can be used in one of three modes: simple, long and recursive. A "
26526 "simple listing is like the ordinary L<ls(1)> command:"
26530 #: ../tools/virt-ls.pl:54
26533 " $ virt-ls myguest /\n"
26541 #: ../tools/virt-ls.pl:59
26542 msgid "With the C<-l> (C<--long>) option, C<virt-ls> shows more detail:"
26546 #: ../tools/virt-ls.pl:61
26549 " $ virt-ls -l myguest /\n"
26551 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
26552 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
26558 #: ../tools/virt-ls.pl:67
26560 "With the C<-R> (C<--recursive>) option, C<virt-ls> lists the names of files "
26561 "and directories recursively:"
26565 #: ../tools/virt-ls.pl:70
26568 " $ virt-ls -R myguest /tmp\n"
26576 #: ../tools/virt-ls.pl:75
26578 "You I<cannot> combine these options. To do more complicated things, use "
26583 #: ../tools/virt-ls.pl:131 ../tools/virt-list-filesystems.pl:103 ../tools/virt-list-partitions.pl:112
26584 msgid "B<-l> | B<--long>"
26588 #: ../tools/virt-ls.pl:133
26589 msgid "B<-R> | B<--recursive>"
26593 #: ../tools/virt-ls.pl:135
26595 "Select the mode. With neither of these options, C<virt-ls> produces a "
26596 "simple, flat list of the files in the named directory."
26600 #: ../tools/virt-ls.pl:138
26602 "C<virt-ls -l> produces a \"long listing\", which shows more detail (just "
26603 "like the plain C<ls -l> command)."
26607 #: ../tools/virt-ls.pl:141
26609 "C<virt-ls -R> produces a recursive list of files starting at the named "
26610 "directory. See the documentation for L<guestfs(3)/guestfs_find> for precise "
26615 #: ../tools/virt-ls.pl:145
26616 msgid "You cannot combine these options."
26620 #: ../tools/virt-ls.pl:234
26622 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
26623 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
26624 "L<http://libguestfs.org/>."
26628 #: ../tools/virt-ls.pl:249 ../tools/virt-list-filesystems.pl:204 ../tools/virt-tar.pl:298
26629 msgid "Copyright (C) 2009 Red Hat Inc."
26633 #: ../tools/virt-resize.pl:42
26634 msgid "virt-resize - Resize a virtual machine disk"
26638 #: ../tools/virt-resize.pl:46
26641 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
26642 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
26643 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
26648 #: ../tools/virt-resize.pl:52
26650 "Virt-resize is a tool which can resize a virtual machine disk, making it "
26651 "larger or smaller overall, and resizing or deleting any partitions contained "
26656 #: ../tools/virt-resize.pl:56
26658 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
26659 "not> be used on live virtual machines - for consistent results, shut the "
26660 "virtual machine down before resizing it."
26664 #: ../tools/virt-resize.pl:60
26666 "If you are not familiar with the associated tools: "
26667 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)> and L<virt-df(1)>, "
26668 "we recommend you go and read those manual pages first."
26672 #: ../tools/virt-resize.pl:68
26674 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
26675 "fill the extra 5GB of space."
26679 #: ../tools/virt-resize.pl:71
26682 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
26683 " virt-list-partitions -lht olddisk\n"
26684 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
26685 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
26690 #: ../tools/virt-resize.pl:76
26692 "As above, but make the /boot partition 200MB bigger, while giving the "
26693 "remaining space to /dev/sda2:"
26697 #: ../tools/virt-resize.pl:79
26700 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
26705 #: ../tools/virt-resize.pl:81
26706 msgid "As above, but the output format will be uncompressed qcow2:"
26710 #: ../tools/virt-resize.pl:83
26713 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
26714 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
26719 #: ../tools/virt-resize.pl:86
26720 msgid "DETAILED USAGE"
26724 #: ../tools/virt-resize.pl:88
26725 msgid "EXPANDING A VIRTUAL MACHINE DISK"
26729 #: ../tools/virt-resize.pl:92
26730 msgid "1. Shut down the virtual machine"
26734 #: ../tools/virt-resize.pl:94
26735 msgid "2. Locate input disk image"
26739 #: ../tools/virt-resize.pl:96
26741 "Locate the input disk image (ie. the file or device on the host containing "
26742 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
26743 "dumpxml> like this to find the disk image name:"
26747 #: ../tools/virt-resize.pl:100
26750 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
26751 " Found 1 nodes:\n"
26753 " <source dev=\"/dev/vg/lv_guest\" />\n"
26758 #: ../tools/virt-resize.pl:105
26759 msgid "3. Look at current sizing"
26763 #: ../tools/virt-resize.pl:107
26764 msgid "Use L<virt-list-partitions(1)> to display the current partitions and sizes:"
26768 #: ../tools/virt-resize.pl:110
26771 " # virt-list-partitions -lht /dev/vg/lv_guest\n"
26772 " /dev/sda1 ext3 101.9M\n"
26773 " /dev/sda2 pv 7.9G\n"
26774 " /dev/sda device 8.0G\n"
26779 #: ../tools/virt-resize.pl:115
26781 "(This example is a virtual machine with an 8 GB disk which we would like to "
26782 "expand up to 10 GB)."
26786 #: ../tools/virt-resize.pl:118
26787 msgid "4. Create output disk"
26791 #: ../tools/virt-resize.pl:120
26793 "Virt-resize cannot do in-place disk modifications. You have to have space "
26794 "to store the resized output disk."
26798 #: ../tools/virt-resize.pl:123
26799 msgid "To store the resized disk image in a file, create a file of a suitable size:"
26803 #: ../tools/virt-resize.pl:126
26806 " # rm -f outdisk\n"
26807 " # truncate -s 10G outdisk\n"
26812 #: ../tools/virt-resize.pl:129
26813 msgid "Or use L<lvcreate(1)> to create a logical volume:"
26817 #: ../tools/virt-resize.pl:131
26820 " # lvcreate -L 10G -n lv_name vg_name\n"
26825 #: ../tools/virt-resize.pl:133
26826 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
26830 #: ../tools/virt-resize.pl:135
26833 " # virsh pool-list\n"
26834 " # virsh vol-create-as poolname newvol 10G\n"
26839 #: ../tools/virt-resize.pl:138
26844 #: ../tools/virt-resize.pl:140
26846 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
26847 "file) and the output disk. The output disk is the one created in the "
26852 #: ../tools/virt-resize.pl:144
26855 " # virt-resize indisk outdisk\n"
26860 #: ../tools/virt-resize.pl:146
26862 "This command just copies disk image C<indisk> to disk image C<outdisk> "
26863 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
26864 "larger, then an extra, empty partition is created at the end of the disk "
26865 "covering the extra space. If C<outdisk> is smaller, then it will give an "
26870 #: ../tools/virt-resize.pl:152
26872 "More realistically you'd want to expand existing partitions in the disk "
26873 "image by passing extra options (for the full list see the L</OPTIONS> "
26878 #: ../tools/virt-resize.pl:156
26880 "L</--expand> is the most useful option. It expands the named partition "
26881 "within the disk to fill any extra space:"
26885 #: ../tools/virt-resize.pl:159
26888 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
26893 #: ../tools/virt-resize.pl:161
26895 "(In this case, an extra partition is I<not> created at the end of the disk, "
26896 "because there will be no unused space)."
26900 #: ../tools/virt-resize.pl:164
26902 "L</--resize> is the other commonly used option. The following would "
26903 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
26904 "rest of the available space:"
26908 #: ../tools/virt-resize.pl:168
26911 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
26912 " indisk outdisk\n"
26917 #: ../tools/virt-resize.pl:171
26919 "If the expanded partition in the image contains a filesystem or LVM PV, then "
26920 "if virt-resize knows how, it will resize the contents, the equivalent of "
26921 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or "
26922 "L<ntfsresize(8)>. However virt-resize does not know how to resize some "
26923 "filesystems, so you would have to online resize them after booting the "
26924 "guest. And virt-resize also does not resize anything inside an LVM PV, it "
26925 "just resizes the PV itself and leaves the user to resize any LVs inside that "
26930 #: ../tools/virt-resize.pl:180
26931 msgid "Other options are covered below."
26935 #: ../tools/virt-resize.pl:182
26940 #: ../tools/virt-resize.pl:184
26941 msgid "Thoroughly test the new disk image I<before> discarding the old one."
26945 #: ../tools/virt-resize.pl:186
26946 msgid "If you are using libvirt, edit the XML to point at the new disk:"
26950 #: ../tools/virt-resize.pl:188
26953 " # virsh edit guestname\n"
26958 #: ../tools/virt-resize.pl:190
26960 "Change E<lt>source ...E<gt>, see "
26961 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
26965 #: ../tools/virt-resize.pl:193
26966 msgid "Then start up the domain with the new, resized disk:"
26970 #: ../tools/virt-resize.pl:195
26973 " # virsh start guestname\n"
26978 #: ../tools/virt-resize.pl:197
26980 "and check that it still works. See also the L</NOTES> section below for "
26981 "additional information."
26985 #: ../tools/virt-resize.pl:200
26986 msgid "7. Resize LVs etc inside the guest"
26990 #: ../tools/virt-resize.pl:202
26991 msgid "(This can also be done offline using L<guestfish(1)>)"
26995 #: ../tools/virt-resize.pl:204
26997 "Once the guest has booted you should see the new space available, at least "
26998 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
26999 "may need to resize LVs inside PVs, and also resize filesystem types that "
27000 "virt-resize does not know how to expand."
27004 #: ../tools/virt-resize.pl:211
27005 msgid "SHRINKING A VIRTUAL MACHINE DISK"
27009 #: ../tools/virt-resize.pl:213
27011 "Shrinking is somewhat more complex than expanding, and only an overview is "
27016 #: ../tools/virt-resize.pl:216
27018 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
27019 "filesystems). The user has to shrink content before passing the disk image "
27020 "to virt-resize, and virt-resize will check that the content has been shrunk "
27025 #: ../tools/virt-resize.pl:221
27026 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
27030 #: ../tools/virt-resize.pl:223
27032 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
27033 "steps 3 and 4 above to allocate a new disk image."
27037 #: ../tools/virt-resize.pl:226
27038 msgid "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
27042 #: ../tools/virt-resize.pl:229
27043 msgid "IGNORING OR DELETING PARTITIONS"
27047 #: ../tools/virt-resize.pl:231
27049 "virt-resize also gives a convenient way to ignore or delete partitions when "
27050 "copying from the input disk to the output disk. Ignoring a partition speeds "
27051 "up the copy where you don't care about the existing contents of a "
27052 "partition. Deleting a partition removes it completely, but note that it "
27053 "also renumbers any partitions after the one which is deleted, which can "
27054 "leave some guests unbootable."
27058 #: ../tools/virt-resize.pl:238
27059 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
27063 #: ../tools/virt-resize.pl:240
27065 "If the input disk is in qcow2 format, then you may prefer that the output is "
27066 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
27067 "the fly. The output format is simply determined by the format of the empty "
27068 "output container that you provide. Thus to create qcow2 output, use:"
27072 #: ../tools/virt-resize.pl:246
27075 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
27080 #: ../tools/virt-resize.pl:248
27081 msgid "instead of the truncate command (use C<-c> for a compressed disk)."
27085 #: ../tools/virt-resize.pl:250
27086 msgid "Similarly, to get non-sparse raw output use:"
27090 #: ../tools/virt-resize.pl:252
27093 " fallocate -l size outdisk\n"
27098 #: ../tools/virt-resize.pl:254
27100 "(on older systems that don't have the L<fallocate(1)> command use C<dd "
27101 "if=/dev/zero of=outdisk bs=1M count=..>)"
27105 #: ../tools/virt-resize.pl:267
27106 msgid "Display help."
27110 #: ../tools/virt-resize.pl:281
27111 msgid "B<--resize part=size>"
27115 #: ../tools/virt-resize.pl:283
27117 "Resize the named partition (expanding or shrinking it) so that it has the "
27122 #: ../tools/virt-resize.pl:286
27124 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
27125 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
27126 "Exabytes; or as a percentage of the current size; or as a relative number or "
27127 "percentage. For example:"
27131 #: ../tools/virt-resize.pl:291
27134 " --resize /dev/sda2=10G\n"
27139 #: ../tools/virt-resize.pl:293
27142 " --resize /dev/sda4=90%\n"
27147 #: ../tools/virt-resize.pl:295
27150 " --resize /dev/sda2=+1G\n"
27155 #: ../tools/virt-resize.pl:297
27158 " --resize /dev/sda2=-200M\n"
27163 #: ../tools/virt-resize.pl:299
27166 " --resize /dev/sda1=+128K\n"
27171 #: ../tools/virt-resize.pl:301
27174 " --resize /dev/sda1=+10%\n"
27179 #: ../tools/virt-resize.pl:303
27182 " --resize /dev/sda1=-10%\n"
27187 #: ../tools/virt-resize.pl:305
27189 "You can increase the size of any partition. Virt-resize will expand the "
27190 "direct content of the partition if it knows how (see C<--expand> below)."
27194 #: ../tools/virt-resize.pl:309
27196 "You can only I<decrease> the size of partitions that contain filesystems or "
27197 "PVs which have already been shrunk. Virt-resize will check this has been "
27198 "done before proceeding, or else will print an error (see also "
27199 "C<--resize-force>)."
27203 #: ../tools/virt-resize.pl:314 ../tools/virt-resize.pl:406 ../tools/virt-resize.pl:423
27204 msgid "You can give this option multiple times."
27208 #: ../tools/virt-resize.pl:320
27209 msgid "B<--resize-force part=size>"
27213 #: ../tools/virt-resize.pl:322
27215 "This is the same as C<--resize> except that it will let you decrease the "
27216 "size of any partition. Generally this means you will lose any data which "
27217 "was at the end of the partition you shrink, but you may not care about that "
27218 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
27219 "as a swap partition)."
27223 #: ../tools/virt-resize.pl:328
27224 msgid "See also the C<--ignore> option."
27228 #: ../tools/virt-resize.pl:334
27229 msgid "B<--expand part>"
27233 #: ../tools/virt-resize.pl:336
27235 "Expand the named partition so it uses up all extra space (space left over "
27236 "after any other resize changes that you request have been done)."
27240 #: ../tools/virt-resize.pl:339
27242 "If virt-resize knows how, it will expand the direct content of the "
27243 "partition. For example, if the partition is an LVM PV, it will expand the "
27244 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
27245 "content it doesn't know about alone."
27249 #: ../tools/virt-resize.pl:344
27250 msgid "Currently virt-resize can resize:"
27254 #: ../tools/virt-resize.pl:350
27256 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
27261 #: ../tools/virt-resize.pl:355
27263 "NTFS filesystems contained directly in a partition, if libguestfs was "
27264 "compiled with support for NTFS."
27268 #: ../tools/virt-resize.pl:358
27270 "The filesystem must have been shut down consistently last time it was used. "
27271 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
27272 "consistency check, so at the first boot after resizing Windows will check "
27277 #: ../tools/virt-resize.pl:365
27279 "LVM PVs (physical volumes). However virt-resize does I<not> resize anything "
27280 "inside the PV. The user will have to resize LVs as desired."
27284 #: ../tools/virt-resize.pl:371 ../tools/virt-resize.pl:393
27285 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
27289 #: ../tools/virt-resize.pl:377
27290 msgid "B<--shrink part>"
27294 #: ../tools/virt-resize.pl:379
27296 "Shrink the named partition until the overall disk image fits in the "
27297 "destination. The named partition B<must> contain a filesystem or PV which "
27298 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
27299 "online tools). Virt-resize will check this and give an error if it has not "
27304 #: ../tools/virt-resize.pl:385
27306 "The amount by which the overall disk must be shrunk (after carrying out all "
27307 "other operations requested by the user) is called the \"deficit\". For "
27308 "example, a straight copy (assume no other operations) from a 5GB disk image "
27309 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
27310 "would give an error unless the user specified a partition to shrink and that "
27311 "partition had more than a gigabyte of free space."
27315 #: ../tools/virt-resize.pl:399
27316 msgid "B<--ignore part>"
27320 #: ../tools/virt-resize.pl:401
27322 "Ignore the named partition. Effectively this means the partition is "
27323 "allocated on the destination disk, but the content is not copied across from "
27324 "the source disk. The content of the partition will be blank (all zero "
27329 #: ../tools/virt-resize.pl:412
27330 msgid "B<--delete part>"
27334 #: ../tools/virt-resize.pl:414
27336 "Delete the named partition. It would be more accurate to describe this as "
27337 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
27338 "the original disk image is left intact."
27342 #: ../tools/virt-resize.pl:418
27344 "Note that when you delete a partition, then anything contained in the "
27345 "partition is also deleted. Furthermore, this causes any partitions that "
27346 "come after to be I<renumbered>, which can easily make your guest unbootable."
27350 #: ../tools/virt-resize.pl:429
27351 msgid "B<--LV-expand logvol>"
27355 #: ../tools/virt-resize.pl:431
27357 "This takes the logical volume and, as a final step, expands it to fill all "
27358 "the space available in its volume group. A typical usage, assuming a Linux "
27359 "guest with a single PV C</dev/sda2> and a root device called "
27360 "C</dev/vg_guest/lv_root> would be:"
27364 #: ../tools/virt-resize.pl:436
27367 " virt-resize indisk outdisk \\\n"
27368 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
27373 #: ../tools/virt-resize.pl:439
27375 "This would first expand the partition (and PV), and then expand the root "
27376 "device to fill the extra space in the PV."
27380 #: ../tools/virt-resize.pl:442
27382 "The contents of the LV are also resized if virt-resize knows how to do "
27383 "that. You can stop virt-resize from trying to expand the content by using "
27384 "the option C<--no-expand-content>."
27388 #: ../tools/virt-resize.pl:446
27389 msgid "Use L<virt-list-filesystems(1)> to list the filesystems in the guest."
27393 #: ../tools/virt-resize.pl:449
27395 "You can give this option multiple times, I<but> it doesn't make sense to do "
27396 "this unless the logical volumes you specify are all in different volume "
27401 #: ../tools/virt-resize.pl:457
27402 msgid "B<--no-copy-boot-loader>"
27406 #: ../tools/virt-resize.pl:459
27408 "By default, virt-resize copies over some sectors at the start of the disk "
27409 "(up to the beginning of the first partition). Commonly these sectors "
27410 "contain the Master Boot Record (MBR) and the boot loader, and are required "
27411 "in order for the guest to boot correctly."
27415 #: ../tools/virt-resize.pl:464
27417 "If you specify this flag, then this initial copy is not done. You may need "
27418 "to reinstall the boot loader in this case."
27422 #: ../tools/virt-resize.pl:472
27423 msgid "B<--no-extra-partition>"
27427 #: ../tools/virt-resize.pl:474
27429 "By default, virt-resize creates an extra partition if there is any extra, "
27430 "unused space after all resizing has happened. Use this option to prevent "
27431 "the extra partition from being created. If you do this then the extra space "
27432 "will be inaccessible until you run fdisk, parted, or some other partitioning "
27433 "tool in the guest."
27437 #: ../tools/virt-resize.pl:480
27439 "Note that if the surplus space is smaller than 10 MB, no extra partition "
27444 #: ../tools/virt-resize.pl:487
27445 msgid "B<--no-expand-content>"
27449 #: ../tools/virt-resize.pl:489
27451 "By default, virt-resize will try to expand the direct contents of "
27452 "partitions, if it knows how (see C<--expand> option above)."
27456 #: ../tools/virt-resize.pl:492
27458 "If you give the C<--no-expand-content> option then virt-resize will not "
27463 #: ../tools/virt-resize.pl:499
27464 msgid "B<-d> | B<--debug>"
27468 #: ../tools/virt-resize.pl:507
27469 msgid "B<-n> | B<--dryrun>"
27473 #: ../tools/virt-resize.pl:509
27474 msgid "Print a summary of what would be done, but don't do anything."
27478 #: ../tools/virt-resize.pl:515
27479 msgid "B<-q> | B<--quiet>"
27483 #: ../tools/virt-resize.pl:517
27484 msgid "Don't print the summary."
27488 #: ../tools/virt-resize.pl:525
27490 "Specify the format of the input disk image. If this flag is not given then "
27491 "it is auto-detected from the image itself."
27495 #: ../tools/virt-resize.pl:531
27497 "Note that this option I<does not> affect the output format. See L</QCOW2 "
27498 "AND NON-SPARSE RAW FORMATS>."
27502 #: ../tools/virt-resize.pl:538
27503 msgid "B<--output-format> raw"
27507 #: ../tools/virt-resize.pl:540
27509 "Specify the format of the output disk image. If this flag is not given then "
27510 "it is auto-detected from the image itself."
27514 #: ../tools/virt-resize.pl:546
27516 "Note that you still need to create the output disk with the right format. "
27517 "See L</QCOW2 AND NON-SPARSE RAW FORMATS>."
27521 #: ../tools/virt-resize.pl:1422 ../tools/virt-rescue.pl:90
27526 #: ../tools/virt-resize.pl:1424
27527 msgid "\"Partition 1 does not end on cylinder boundary.\""
27531 #: ../tools/virt-resize.pl:1426
27533 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
27534 "means the partitions will not be aligned to the ancient CHS geometry. "
27535 "However CHS geometry is meaningless for disks manufactured since the early "
27536 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
27537 "cylinders is not required by any modern operating system."
27541 #: ../tools/virt-resize.pl:1433
27542 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
27546 #: ../tools/virt-resize.pl:1435
27548 "In Windows Vista and later versions, Microsoft switched to using a separate "
27549 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
27550 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
27551 "the boot partition. Doing so seems to break the guest completely. However "
27552 "expanding the second partition (ie. C: drive) should work."
27556 #: ../tools/virt-resize.pl:1442
27558 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
27559 "NTFS partitions have been expanded. This is just a safety check and (unless "
27560 "it find errors) is nothing to worry about."
27564 #: ../tools/virt-resize.pl:1446
27565 msgid "GUEST BOOT STUCK AT \"GRUB\""
27569 #: ../tools/virt-resize.pl:1448
27571 "If a Linux guest does not boot after resizing, and the boot is stuck after "
27572 "printing C<GRUB> on the console, try reinstalling grub. This sometimes "
27573 "happens on older (RHEL 5-era) guests, for reasons we don't fully understand, "
27574 "although we think is to do with partition alignment."
27578 #: ../tools/virt-resize.pl:1453
27581 " guestfish -i -a newdisk\n"
27582 " ><fs> cat /boot/grub/device.map\n"
27583 " # check the contents of this file are sensible or\n"
27584 " # edit the file if necessary\n"
27585 " ><fs> grub-install / /dev/vda\n"
27591 #: ../tools/virt-resize.pl:1460
27593 "For more flexible guest reconfiguration, including if you need to specify "
27594 "other parameters to grub-install, use L<virt-rescue(1)>."
27598 #: ../tools/virt-resize.pl:1463
27599 msgid "ALTERNATIVE TOOLS"
27603 #: ../tools/virt-resize.pl:1465
27605 "There are several proprietary tools for resizing partitions. We won't "
27606 "mention any here."
27610 #: ../tools/virt-resize.pl:1468
27612 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
27613 "operations on disk images. They can resize and move partitions, but I don't "
27614 "think they can do anything with the contents, and they certainly don't "
27619 #: ../tools/virt-resize.pl:1473
27621 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
27622 "but at a much lower level. You will probably end up hand-calculating sector "
27623 "offsets, which is something that virt-resize was designed to avoid. If you "
27624 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
27629 #: ../tools/virt-resize.pl:1488
27631 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)>, L<virt-df(1)>, "
27632 "L<guestfs(3)>, L<guestfish(1)>, L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, "
27633 "L<resize2fs(8)>, L<ntfsresize(8)>, L<virsh(1)>, L<parted(8)>, "
27634 "L<truncate(1)>, L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, "
27635 "L<virt-rescue(1)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
27639 #: ../tools/virt-list-filesystems.pl:32
27640 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
27644 #: ../tools/virt-list-filesystems.pl:36
27647 " virt-list-filesystems [--options] domname\n"
27652 #: ../tools/virt-list-filesystems.pl:38
27655 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
27660 #: ../tools/virt-list-filesystems.pl:42
27662 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
27663 "are contained in a virtual machine or disk image."
27667 #: ../tools/virt-list-filesystems.pl:46
27669 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
27670 "functionality. For more complex cases you should look at the "
27671 "L<guestfish(1)> tool."
27675 #: ../tools/virt-list-filesystems.pl:105
27677 "With this option, C<virt-list-filesystems> displays the type of each "
27678 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
27682 #: ../tools/virt-list-filesystems.pl:112
27683 msgid "B<-a> | B<--all>"
27687 #: ../tools/virt-list-filesystems.pl:114
27689 "Normally we only show mountable filesystems. If this option is given then "
27690 "swap devices are shown too."
27694 #: ../tools/virt-list-filesystems.pl:188
27696 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
27697 "L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
27698 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
27702 #: ../tools/virt-tar.pl:33
27703 msgid "virt-tar - Extract or upload files to a virtual machine"
27707 #: ../tools/virt-tar.pl:37
27710 " virt-tar [--options] -x domname directory tarball\n"
27715 #: ../tools/virt-tar.pl:39
27718 " virt-tar [--options] -u domname tarball directory\n"
27723 #: ../tools/virt-tar.pl:41
27726 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
27731 #: ../tools/virt-tar.pl:43
27734 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
27739 #: ../tools/virt-tar.pl:47
27740 msgid "Download C</home> from the VM into a local tarball:"
27744 #: ../tools/virt-tar.pl:49
27747 " virt-tar -x domname /home home.tar\n"
27752 #: ../tools/virt-tar.pl:51
27755 " virt-tar -zx domname /home home.tar.gz\n"
27760 #: ../tools/virt-tar.pl:53
27761 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
27765 #: ../tools/virt-tar.pl:55
27768 " virt-tar -u domname uploadstuff.tar /tmp\n"
27773 #: ../tools/virt-tar.pl:57
27776 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
27781 #: ../tools/virt-tar.pl:61
27783 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
27784 "virtual machines. If you do this, you risk disk corruption in the VM. "
27785 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
27789 #: ../tools/virt-tar.pl:66
27791 "You can use C<-x> (extract) on live virtual machines, but you might get "
27792 "inconsistent results or errors if there is filesystem activity inside the "
27793 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
27794 "work, but the only way to guarantee consistent results is if the virtual "
27795 "machine is shut down."
27799 #: ../tools/virt-tar.pl:74
27801 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
27802 "parts of a guest filesystem. There are many possibilities: making backups, "
27803 "uploading data files, snooping on guest activity, fixing or customizing "
27808 #: ../tools/virt-tar.pl:79
27810 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
27811 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
27812 "should look at the L<guestfish(1)> tool."
27816 #: ../tools/virt-tar.pl:83
27818 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
27819 "its contents (recursively) from the virtual machine into a local tarball. "
27820 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
27821 "virtual machine. You cannot use these two options together."
27825 #: ../tools/virt-tar.pl:89
27827 "In addition, you may need to use the C<-z> (gZip) option to enable "
27828 "compression. When uploading, you have to specify C<-z> if the upload file "
27829 "is compressed because virt-tar won't detect this on its own."
27833 #: ../tools/virt-tar.pl:93
27835 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
27836 "example it cannot do PKZip files or bzip2 compression. If you want that "
27837 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
27838 "the L<libguestfs(3)> API)."
27842 #: ../tools/virt-tar.pl:151
27843 msgid "B<-x> | B<--extract> | B<--download>"
27847 #: ../tools/virt-tar.pl:153
27848 msgid "B<-u> | B<--upload>"
27852 #: ../tools/virt-tar.pl:155
27854 "Use C<-x> to extract (download) a directory from a virtual machine to a "
27859 #: ../tools/virt-tar.pl:158
27861 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
27862 "Please read the L</WARNING> section above before using this option."
27866 #: ../tools/virt-tar.pl:162
27867 msgid "You must specify exactly one of these options."
27871 #: ../tools/virt-tar.pl:168
27872 msgid "B<-z> | B<--gzip>"
27876 #: ../tools/virt-tar.pl:170
27877 msgid "Specify that the input or output tarball is gzip-compressed."
27881 #: ../tools/virt-tar.pl:283
27883 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
27884 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
27885 "L<http://libguestfs.org/>."
27889 #: ../tools/virt-rescue.pl:33
27890 msgid "virt-rescue - Run a rescue shell on a virtual machine"
27894 #: ../tools/virt-rescue.pl:37
27897 " virt-rescue [--options] domname\n"
27902 #: ../tools/virt-rescue.pl:39
27905 " virt-rescue [--options] disk.img [disk.img ...]\n"
27910 #: ../tools/virt-rescue.pl:43
27912 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
27913 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
27914 "you from doing this, but doesn't catch all cases."
27918 #: ../tools/virt-rescue.pl:47
27920 "However if you use the I<--ro> (read only) option, then you can attach a "
27921 "shell to a live virtual machine. The results might be strange or "
27922 "inconsistent at times but you won't get disk corruption."
27926 #: ../tools/virt-rescue.pl:53
27928 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
27929 "need for a CD. virt-rescue gives you a rescue shell and some simple "
27930 "recovery tools which you can use to examine or rescue a virtual machine or "
27935 #: ../tools/virt-rescue.pl:58
27937 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
27938 "on disk image(s):"
27942 #: ../tools/virt-rescue.pl:61
27945 " virt-rescue GuestName\n"
27950 #: ../tools/virt-rescue.pl:63
27953 " virt-rescue --ro /path/to/disk.img\n"
27958 #: ../tools/virt-rescue.pl:65
27961 " virt-rescue /dev/sdc\n"
27966 #: ../tools/virt-rescue.pl:67
27967 msgid "For live VMs you I<must> use the --ro option."
27971 #: ../tools/virt-rescue.pl:69
27973 "When you run virt-rescue on a virtual machine or disk image, you are placed "
27974 "in an interactive bash shell where you can use many ordinary Linux "
27975 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
27976 "appliance. You must mount the virtual machine's filesystems by hand. There "
27977 "is an empty directory called C</sysroot> where you can mount filesystems."
27981 #: ../tools/virt-rescue.pl:76
27983 "In the example below, we list logical volumes, then choose one to mount "
27984 "under C</sysroot>:"
27988 #: ../tools/virt-rescue.pl:79
27992 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
27993 " lv_root vg_f11x64 -wi-a- 8.83G\n"
27994 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
27995 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
27996 " ><rescue> ls /sysroot\n"
28001 #: ../tools/virt-rescue.pl:86
28003 "If you don't know what filesystems are available on the virtual machine then "
28004 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
28008 #: ../tools/virt-rescue.pl:92
28010 "Virt-rescue can be used on I<any> disk image file or device, not just a "
28011 "virtual machine. For example you can use it on a blank file if you want to "
28012 "partition that file (although we would recommend using L<guestfish(1)> "
28013 "instead as it is more suitable for this purpose). You can even use "
28014 "virt-rescue on things like SD cards."
28018 #: ../tools/virt-rescue.pl:98
28020 "This tool is just designed for quick interactive hacking on a virtual "
28021 "machine. For more structured access to a virtual machine disk image, you "
28022 "should use L<guestfs(3)>. To get a structured shell that you can use to "
28023 "make scripted changes to guests, use L<guestfish(1)>."
28027 #: ../tools/virt-rescue.pl:127
28028 msgid "B<--append kernelopts>"
28032 #: ../tools/virt-rescue.pl:129
28033 msgid "Pass additional options to the rescue kernel."
28037 #: ../tools/virt-rescue.pl:164
28038 msgid "B<--memsize MB> | B<-m MB>"
28042 #: ../tools/virt-rescue.pl:166
28044 "Change the amount of memory allocated to the rescue system. The default is "
28045 "set by libguestfs and is small but adequate for running system tools. The "
28046 "occasional program might need more memory. The parameter is specified in "
28051 #: ../tools/virt-rescue.pl:175
28052 msgid "B<--network MB>"
28056 #: ../tools/virt-rescue.pl:177
28057 msgid "Enable QEMU user networking in the guest."
28061 #: ../tools/virt-rescue.pl:183
28062 msgid "B<--ro> | B<-r>"
28066 #: ../tools/virt-rescue.pl:185
28067 msgid "Open the image read-only."
28071 #: ../tools/virt-rescue.pl:197
28073 "Enable SELinux in the rescue appliance. You should read "
28074 "L<guestfs(3)/SELINUX> before using this option."
28078 #: ../tools/virt-rescue.pl:257
28080 "Several environment variables affect virt-rescue. See "
28081 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
28085 #: ../tools/virt-rescue.pl:269
28087 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
28088 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
28092 #: ../tools/virt-make-fs.pl:37
28093 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
28097 #: ../tools/virt-make-fs.pl:41
28100 " virt-make-fs [--options] input.tar output.img\n"
28105 #: ../tools/virt-make-fs.pl:43
28108 " virt-make-fs [--options] input.tar.gz output.img\n"
28113 #: ../tools/virt-make-fs.pl:45
28116 " virt-make-fs [--options] directory output.img\n"
28121 #: ../tools/virt-make-fs.pl:49
28123 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
28124 "archive or some files in a directory. It is similar to tools like "
28125 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
28126 "it can create common filesystem types like ext2/3 or NTFS, which can be "
28127 "useful if you want to attach these filesystems to existing virtual machines "
28128 "(eg. to import large amounts of read-only data to a VM)."
28132 #: ../tools/virt-make-fs.pl:57
28133 msgid "Basic usage is:"
28137 #: ../tools/virt-make-fs.pl:59
28140 " virt-make-fs input output\n"
28145 #: ../tools/virt-make-fs.pl:61
28147 "where C<input> is either a directory containing files that you want to add, "
28148 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
28149 "C<output> is a disk image. The input type is detected automatically. The "
28150 "output disk image defaults to a raw ext2 image unless you specify extra "
28151 "flags (see L</OPTIONS> below)."
28155 #: ../tools/virt-make-fs.pl:67
28156 msgid "EXTRA SPACE"
28160 #: ../tools/virt-make-fs.pl:69
28162 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
28163 "the files that it contains, but might have extra space. Depending on how "
28164 "you are going to use the output, you might think this extra space is wasted "
28165 "and want to minimize it, or you might want to leave space so that more files "
28166 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
28167 "but you can use the C<--size> flag to leave space in the filesystem if you "
28172 #: ../tools/virt-make-fs.pl:77
28174 "An alternative way to leave extra space but not make the output image any "
28175 "bigger is to use an alternative disk image format (instead of the default "
28176 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
28177 "image format (check your hypervisor supports this before using it). This "
28178 "allows you to choose a large C<--size> but the extra space won't actually be "
28179 "allocated in the image until you try to store something in it."
28183 #: ../tools/virt-make-fs.pl:85
28185 "Don't forget that you can also use local commands including L<resize2fs(8)> "
28186 "and L<virt-resize(1)> to resize existing filesystems, or rerun "
28187 "virt-make-resize to build another image from scratch."
28191 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123 ../tools/virt-make-fs.pl:142
28196 #: ../tools/virt-make-fs.pl:91
28199 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
28204 #: ../tools/virt-make-fs.pl:93
28205 msgid "FILESYSTEM TYPE"
28209 #: ../tools/virt-make-fs.pl:95
28211 "The default filesystem type is C<ext2>. Just about any filesystem type that "
28212 "libguestfs supports can be used (but I<not> read-only formats like "
28213 "ISO9660). Here are some of the more common choices:"
28217 #: ../tools/virt-make-fs.pl:101
28222 #: ../tools/virt-make-fs.pl:103
28224 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
28225 "you are not going to use the filesystem in a way that requires the journal, "
28226 "then this is just wasted overhead."
28230 #: ../tools/virt-make-fs.pl:107
28231 msgid "I<ntfs> or I<vfat>"
28235 #: ../tools/virt-make-fs.pl:109
28236 msgid "Useful if exporting data to a Windows guest."
28240 #: ../tools/virt-make-fs.pl:111
28242 "I<Note for vfat>: The tar archive or local directory must only contain files "
28243 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
28244 "program running within libguestfs is unable to change the ownership of "
28245 "non-root files, since vfat itself does not support this."
28249 #: ../tools/virt-make-fs.pl:116
28254 #: ../tools/virt-make-fs.pl:118
28256 "Lower overhead than C<ext2>, but certain limitations on filename length and "
28257 "total filesystem size."
28261 #: ../tools/virt-make-fs.pl:125
28264 " virt-make-fs --type=minix input minixfs.img\n"
28269 #: ../tools/virt-make-fs.pl:127
28270 msgid "TO PARTITION OR NOT TO PARTITION"
28274 #: ../tools/virt-make-fs.pl:129
28275 msgid "Optionally virt-make-fs can add a partition table to the output disk."
28279 #: ../tools/virt-make-fs.pl:131
28281 "Adding a partition can make the disk image more compatible with certain "
28282 "virtualized operating systems which don't expect to see a filesystem "
28283 "directly located on a block device (Linux doesn't care and will happily "
28284 "handle both types)."
28288 #: ../tools/virt-make-fs.pl:136
28290 "On the other hand, if you have a partition table then the output image is no "
28291 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
28292 "directly on a partitioned disk image. (However libguestfs tools such as "
28293 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
28297 #: ../tools/virt-make-fs.pl:144
28298 msgid "Add an MBR partition:"
28302 #: ../tools/virt-make-fs.pl:146
28305 " virt-make-fs --partition -- input disk.img\n"
28310 #: ../tools/virt-make-fs.pl:148
28312 "If the output disk image could be terabyte-sized or larger, it's better to "
28313 "use an EFI/GPT-compatible partition table:"
28317 #: ../tools/virt-make-fs.pl:151
28320 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
28325 #: ../tools/virt-make-fs.pl:179
28326 msgid "Enable debugging information."
28330 #: ../tools/virt-make-fs.pl:185
28331 msgid "B<--size=E<lt>NE<gt>>"
28335 #: ../tools/virt-make-fs.pl:187
28336 msgid "B<--size=+E<lt>NE<gt>>"
28340 #: ../tools/virt-make-fs.pl:189
28341 msgid "B<-s E<lt>NE<gt>>"
28345 #: ../tools/virt-make-fs.pl:191
28346 msgid "B<-s +E<lt>NE<gt>>"
28350 #: ../tools/virt-make-fs.pl:193
28351 msgid "Use the C<--size> (or C<-s>) option to choose the size of the output image."
28355 #: ../tools/virt-make-fs.pl:196
28357 "If this option is I<not> given, then the output image will be just large "
28358 "enough to contain all the files, with not much wasted space."
28362 #: ../tools/virt-make-fs.pl:199
28364 "To choose a fixed size output disk, specify an absolute number followed by "
28365 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
28366 "Petabytes or Exabytes. This must be large enough to contain all the input "
28367 "files, else you will get an error."
28371 #: ../tools/virt-make-fs.pl:204
28373 "To leave extra space, specify C<+> (plus sign) and a number followed by "
28374 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
28375 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
28376 "the input files, and (approximately) an extra 200 MB free space."
28380 #: ../tools/virt-make-fs.pl:210
28382 "Note that virt-make-fs estimates free space, and therefore will not produce "
28383 "filesystems containing precisely the free space requested. (It is much more "
28384 "expensive and time-consuming to produce a filesystem which has precisely the "
28385 "desired free space)."
28389 #: ../tools/virt-make-fs.pl:219
28390 msgid "B<--format=E<lt>fmtE<gt>>"
28394 #: ../tools/virt-make-fs.pl:221
28395 msgid "B<-F E<lt>fmtE<gt>>"
28399 #: ../tools/virt-make-fs.pl:223
28400 msgid "Choose the output disk image format."
28404 #: ../tools/virt-make-fs.pl:225
28405 msgid "The default is C<raw> (raw disk image)."
28409 #: ../tools/virt-make-fs.pl:227
28411 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
28412 "that would really make sense here is C<qcow2>."
28416 #: ../tools/virt-make-fs.pl:234
28417 msgid "B<--type=E<lt>fsE<gt>>"
28421 #: ../tools/virt-make-fs.pl:236
28422 msgid "B<-t E<lt>fsE<gt>>"
28426 #: ../tools/virt-make-fs.pl:238
28427 msgid "Choose the output filesystem type."
28431 #: ../tools/virt-make-fs.pl:240
28432 msgid "The default is C<ext2>."
28436 #: ../tools/virt-make-fs.pl:242
28437 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
28441 #: ../tools/virt-make-fs.pl:249
28442 msgid "B<--partition>"
28446 #: ../tools/virt-make-fs.pl:251
28447 msgid "B<--partition=E<lt>parttypeE<gt>>"
28451 #: ../tools/virt-make-fs.pl:253
28453 "If specified, this flag adds an MBR partition table to the output disk "
28458 #: ../tools/virt-make-fs.pl:256
28460 "You can change the partition table type, eg. C<--partition=gpt> for large "
28465 #: ../tools/virt-make-fs.pl:259
28467 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
28468 "might consider the next parameter to be the partition type. For example:"
28472 #: ../tools/virt-make-fs.pl:263
28475 " virt-make-fs --partition input.tar ...\n"
28480 #: ../tools/virt-make-fs.pl:265
28482 "would cause virt-make-fs to think you wanted to use a partition type of "
28483 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
28484 "dash) between options and the input file argument:"
28488 #: ../tools/virt-make-fs.pl:269
28491 " virt-make-fs --partition -- input.tar ...\n"
28496 #: ../tools/virt-make-fs.pl:536
28498 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<mkisofs(1)>, "
28499 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
28500 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
28504 #: ../tools/virt-make-fs.pl:553
28507 " export LIBGUESTFS_DEBUG=1\n"
28508 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
28513 #: ../tools/virt-make-fs.pl:556
28515 "Attach /tmp/virt-make-fs.log to a new bug report at "
28516 "L<https://bugzilla.redhat.com/>"
28520 #: ../tools/virt-list-partitions.pl:32
28521 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
28525 #: ../tools/virt-list-partitions.pl:36
28528 " virt-list-partitions [--options] domname\n"
28533 #: ../tools/virt-list-partitions.pl:38
28536 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
28541 #: ../tools/virt-list-partitions.pl:42
28543 "C<virt-list-partitions> is a command line tool to list the partitions that "
28544 "are contained in a virtual machine or disk image. It is mainly useful as a "
28545 "first step to using L<virt-resize(1)>."
28549 #: ../tools/virt-list-partitions.pl:47
28551 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
28552 "functionality. For more complex cases you should look at the "
28553 "L<guestfish(1)> tool."
28557 #: ../tools/virt-list-partitions.pl:104
28558 msgid "B<-h> | B<--human-readable>"
28562 #: ../tools/virt-list-partitions.pl:106
28563 msgid "Show sizes in human-readable form (eg. \"1G\")."
28567 #: ../tools/virt-list-partitions.pl:114
28569 "With this option, C<virt-list-partitions> displays the type and size of each "
28570 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
28574 #: ../tools/virt-list-partitions.pl:121
28575 msgid "B<-t> | B<--total>"
28579 #: ../tools/virt-list-partitions.pl:123
28580 msgid "Display the total size of each block device (as a separate row or rows)."
28584 #: ../tools/virt-list-partitions.pl:256
28586 "L<guestfs(3)>, L<guestfish(1)>, L<virt-list-filesystems(1)>, "
28587 "L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
28588 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."