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.5.24\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2010-10-27 12:50+0200\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:36 ../tools/virt-edit.pl:31 ../tools/virt-win-reg.pl:34 ../tools/virt-df.pl:32 ../tools/virt-ls.pl:31 ../tools/virt-resize.pl:38 ../tools/virt-list-filesystems.pl:28 ../tools/virt-cat.pl:30 ../tools/virt-tar.pl:30 ../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:38 ../tools/virt-edit.pl:33 ../tools/virt-win-reg.pl:36 ../tools/virt-df.pl:34 ../tools/virt-ls.pl:33 ../tools/virt-resize.pl:40 ../tools/virt-list-filesystems.pl:30 ../tools/virt-cat.pl:32 ../tools/virt-tar.pl:32 ../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:42 ../tools/virt-edit.pl:37 ../tools/virt-win-reg.pl:40 ../tools/virt-df.pl:38 ../tools/virt-ls.pl:37 ../tools/virt-resize.pl:44 ../tools/virt-list-filesystems.pl:34 ../tools/virt-cat.pl:36 ../tools/virt-tar.pl:36 ../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:48 ../tools/virt-edit.pl:51 ../tools/virt-win-reg.pl:64 ../tools/virt-df.pl:46 ../tools/virt-ls.pl:43 ../tools/virt-resize.pl:50 ../tools/virt-list-filesystems.pl:40 ../tools/virt-cat.pl:42 ../tools/virt-tar.pl:73 ../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:1143 ../src/guestfs.pod:1148 ../src/guestfs.pod:1152 ../src/guestfs.pod:1368 ../src/guestfs.pod:1373 ../src/guestfs.pod:1377 ../src/guestfs.pod:1479 ../src/guestfs.pod:1483 ../src/guestfs.pod:1487 ../src/guestfs.pod:1492 ../src/guestfs.pod:1500 ../src/guestfs.pod:1519 ../src/guestfs.pod:1527 ../src/guestfs.pod:1757 ../src/guestfs.pod:1763 ../src/guestfs.pod:1768 ../src/guestfs.pod:1774 ../src/guestfs.pod:1881 ../src/guestfs.pod:1885 ../src/guestfs.pod:1889 ../src/guestfs.pod:1893 ../src/guestfs-actions.pod:14 ../src/guestfs-actions.pod:21 ../src/guestfs-actions.pod:438 ../src/guestfs-actions.pod:446 ../src/guestfs-actions.pod:453 ../src/guestfs-actions.pod:460 ../src/guestfs-actions.pod:1351 ../src/guestfs-actions.pod:1355 ../src/guestfs-actions.pod:1359 ../src/guestfs-actions.pod:1363 ../src/guestfs-actions.pod:1371 ../src/guestfs-actions.pod:1375 ../src/guestfs-actions.pod:1379 ../src/guestfs-actions.pod:1389 ../src/guestfs-actions.pod:1393 ../src/guestfs-actions.pod:1397 ../src/guestfs-actions.pod:1520 ../src/guestfs-actions.pod:1524 ../src/guestfs-actions.pod:1529 ../src/guestfs-actions.pod:1534 ../src/guestfs-actions.pod:1586 ../src/guestfs-actions.pod:1590 ../src/guestfs-actions.pod:1595 ../fish/guestfish.pod:364 ../fish/guestfish.pod:368 ../fish/guestfish.pod:372 ../fish/guestfish.pod:376 ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:339 ../fish/guestfish-actions.pod:347 ../fish/guestfish-actions.pod:354 ../fish/guestfish-actions.pod:361 ../fish/guestfish-actions.pod:1056 ../fish/guestfish-actions.pod:1060 ../fish/guestfish-actions.pod:1064 ../fish/guestfish-actions.pod:1068 ../fish/guestfish-actions.pod:1076 ../fish/guestfish-actions.pod:1080 ../fish/guestfish-actions.pod:1084 ../fish/guestfish-actions.pod:1094 ../fish/guestfish-actions.pod:1098 ../fish/guestfish-actions.pod:1102 ../fish/guestfish-actions.pod:1192 ../fish/guestfish-actions.pod:1196 ../fish/guestfish-actions.pod:1201 ../fish/guestfish-actions.pod:1206 ../fish/guestfish-actions.pod:1248 ../fish/guestfish-actions.pod:1252 ../fish/guestfish-actions.pod:1257 ../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 "The two main API calls to run commands are L</guestfs_command> and "
807 "L</guestfs_sh> (there are also variations)."
811 #: ../src/guestfs.pod:398
813 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
814 "shell globs, redirections, etc will work."
818 #: ../src/guestfs.pod:401
819 msgid "CONFIGURATION FILES"
823 #: ../src/guestfs.pod:403
825 "To read and write configuration files in Linux guest filesystems, we "
826 "strongly recommend using Augeas. For example, Augeas understands how to "
827 "read and write, say, a Linux shadow password file or X.org configuration "
828 "file, and so avoids you having to write that code."
832 #: ../src/guestfs.pod:408
834 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
835 "document Augeas itself here because there is excellent documentation on the "
836 "L<http://augeas.net/> website."
840 #: ../src/guestfs.pod:412
842 "If you don't want to use Augeas (you fool!) then try calling "
843 "L</guestfs_read_lines> to get the file as a list of lines which you can "
848 #: ../src/guestfs.pod:416
853 #: ../src/guestfs.pod:418
855 "We support SELinux guests. To ensure that labeling happens correctly in "
856 "SELinux guests, you need to enable SELinux and load the guest's policy:"
860 #: ../src/guestfs.pod:424
865 #: ../src/guestfs.pod:426
866 msgid "Before launching, do:"
870 #: ../src/guestfs.pod:428
873 " guestfs_set_selinux (g, 1);\n"
878 #: ../src/guestfs.pod:430
883 #: ../src/guestfs.pod:432
885 "After mounting the guest's filesystem(s), load the policy. This is best "
886 "done by running the L<load_policy(8)> command in the guest itself:"
890 #: ../src/guestfs.pod:436
893 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
898 #: ../src/guestfs.pod:438
900 "(Older versions of C<load_policy> require you to specify the name of the "
905 #: ../src/guestfs.pod:441
910 #: ../src/guestfs.pod:443
912 "Optionally, set the security context for the API. The correct security "
913 "context to use can only be known by inspecting the guest. As an example:"
917 #: ../src/guestfs.pod:447
920 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
925 #: ../src/guestfs.pod:451
926 msgid "This will work for running commands and editing existing files."
930 #: ../src/guestfs.pod:453
932 "When new files are created, you may need to label them explicitly, for "
933 "example by running the external command C<restorecon pathname>."
937 #: ../src/guestfs.pod:457
942 #: ../src/guestfs.pod:459
944 "Certain calls are affected by the current file mode creation mask (the "
945 "\"umask\"). In particular ones which create files or directories, such as "
946 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
947 "either the default mode that the file is created with or modifies the mode "
952 #: ../src/guestfs.pod:465
954 "The default umask is C<022>, so files are created with modes such as C<0644> "
955 "and directories with C<0755>."
959 #: ../src/guestfs.pod:468
961 "There are two ways to avoid being affected by umask. Either set umask to 0 "
962 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
963 "L</guestfs_chmod> after creating each file or directory."
967 #: ../src/guestfs.pod:472
968 msgid "For more information about umask, see L<umask(2)>."
972 #: ../src/guestfs.pod:474 ../fish/guestfish.pod:630
973 msgid "ENCRYPTED DISKS"
977 #: ../src/guestfs.pod:476
979 "Libguestfs allows you to access Linux guests which have been encrypted using "
980 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
981 "standard. This includes nearly all whole disk encryption systems used by "
982 "modern Linux guests."
986 #: ../src/guestfs.pod:482
988 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
989 "returns the string C<crypto_LUKS>)."
993 #: ../src/guestfs.pod:485
995 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
996 "will require the passphrase!"
1000 #: ../src/guestfs.pod:488
1002 "Opening a LUKS device creates a new device mapper device called "
1003 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
1004 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
1005 "decrypted from and encrypted to the underlying block device respectively."
1009 #: ../src/guestfs.pod:494
1011 "LVM volume groups on the device can be made visible by calling "
1012 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
1013 "volume(s) can now be mounted in the usual way."
1017 #: ../src/guestfs.pod:498
1019 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1020 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1021 "[\"/dev/VG\"])>. Then close the mapper device by calling "
1022 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1023 "underlying encrypted block device)."
1027 #: ../src/guestfs.pod:505
1032 #: ../src/guestfs.pod:507
1034 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1035 "contains operating systems. (These APIs used to be in a separate Perl-only "
1036 "library called L<Sys::Guestfs::Lib(3)> but since version 1.5.3 the most "
1037 "frequently used part of this library has been rewritten in C and moved into "
1042 #: ../src/guestfs.pod:513
1044 "Add all disks belonging to the unknown virtual machine and call "
1045 "L</guestfs_launch> in the usual way."
1049 #: ../src/guestfs.pod:516
1051 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1052 "and certain heuristics, and returns a list of operating systems that were "
1053 "found. An empty list means none were found. A single element is the root "
1054 "filesystem of the operating system. For dual- or multi-boot guests, "
1055 "multiple roots can be returned, each one corresponding to a separate "
1056 "operating system. (Multi-boot virtual machines are extremely rare in the "
1057 "world of virtualization, but since this scenario can happen, we have built "
1058 "libguestfs to deal with it.)"
1062 #: ../src/guestfs.pod:525
1064 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1065 "to get additional details about that operating system. For example, call "
1066 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1067 "Windows and Linux-based operating systems respectively."
1071 #: ../src/guestfs.pod:531
1073 "Un*x-like and Linux-based operating systems usually consist of several "
1074 "filesystems which are mounted at boot time (for example, a separate boot "
1075 "partition mounted on C</boot>). The inspection rules are able to detect how "
1076 "filesystems correspond to mount points. Call "
1077 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1078 "hash table like this example:"
1082 #: ../src/guestfs.pod:538
1085 " /boot => /dev/sda1\n"
1086 " / => /dev/vg_guest/lv_root\n"
1087 " /usr => /dev/vg_guest/lv_usr\n"
1092 #: ../src/guestfs.pod:542
1094 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1095 "filesystems as suggested."
1099 #: ../src/guestfs.pod:545
1101 "Be careful to mount filesystems in the right order (eg. C</> before "
1102 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
1107 #: ../src/guestfs.pod:549
1109 "Inspection currently only works for some common operating systems. "
1110 "Contributors are welcome to send patches for other operating systems that we "
1111 "currently cannot detect."
1115 #: ../src/guestfs.pod:553
1117 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1118 "for more details. The L</guestfs_inspect_os> function just ignores any "
1119 "encrypted devices."
1123 #: ../src/guestfs.pod:557
1125 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1126 "inspection and caches the results in the guest handle. Subsequent calls to "
1127 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
1128 "re-read the disks. If you change the content of the guest disks, you can "
1129 "redo inspection by calling L</guestfs_inspect_os> again."
1133 #: ../src/guestfs.pod:564
1134 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1138 #: ../src/guestfs.pod:566
1140 "Libguestfs can mount NTFS partitions. It does this using the "
1141 "L<http://www.ntfs-3g.org/> driver."
1145 #: ../src/guestfs.pod:569
1147 "DOS and Windows still use drive letters, and the filesystems are always "
1148 "treated as case insensitive by Windows itself, and therefore you might find "
1149 "a Windows configuration file referring to a path like "
1150 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
1151 "that directory might be referred to as C</WINDOWS/System32>."
1155 #: ../src/guestfs.pod:575
1157 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1158 "libguestfs to read the appropriate Windows Registry and configuration files, "
1159 "to determine yourself how drives are mapped (see also L<hivex(3)> and "
1160 "L<virt-inspector(1)>)."
1164 #: ../src/guestfs.pod:580
1166 "Replacing backslash characters with forward slash characters is also outside "
1167 "the scope of libguestfs, but something that you can easily do."
1171 #: ../src/guestfs.pod:583
1173 "Where we can help is in resolving the case insensitivity of paths. For "
1174 "this, call L</guestfs_case_sensitive_path>."
1178 #: ../src/guestfs.pod:586
1180 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1181 "files, through the library C<hivex> which is part of the libguestfs project "
1182 "although ships as a separate tarball. You have to locate and download the "
1183 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1184 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
1185 "L<virt-win-reg(1)> for more help on this issue."
1189 #: ../src/guestfs.pod:594
1190 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1194 #: ../src/guestfs.pod:596
1196 "Although we don't want to discourage you from using the C API, we will "
1197 "mention here that the same API is also available in other languages."
1201 #: ../src/guestfs.pod:599
1203 "The API is broadly identical in all supported languages. This means that "
1204 "the C call C<guestfs_mount(g,path)> is C<$g-E<gt>mount($path)> in Perl, "
1205 "C<g.mount(path)> in Python, and C<Guestfs.mount g path> in OCaml. In other "
1206 "words, a straightforward, predictable isomorphism between each language."
1210 #: ../src/guestfs.pod:605
1212 "Error messages are automatically transformed into exceptions if the language "
1217 #: ../src/guestfs.pod:608
1219 "We don't try to \"object orientify\" parts of the API in OO languages, "
1220 "although contributors are welcome to write higher level APIs above what we "
1221 "provide in their favourite languages if they wish."
1225 #: ../src/guestfs.pod:614
1230 #: ../src/guestfs.pod:616
1232 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1233 "identical to the C API. C++ classes and exceptions are not used."
1237 #: ../src/guestfs.pod:620
1242 #: ../src/guestfs.pod:622
1244 "The C# bindings are highly experimental. Please read the warnings at the "
1245 "top of C<csharp/Libguestfs.cs>."
1249 #: ../src/guestfs.pod:625
1254 #: ../src/guestfs.pod:627
1256 "This is the only language binding that is working but incomplete. Only "
1257 "calls which return simple integers have been bound in Haskell, and we are "
1258 "looking for help to complete this binding."
1262 #: ../src/guestfs.pod:631
1267 #: ../src/guestfs.pod:633
1269 "Full documentation is contained in the Javadoc which is distributed with "
1274 #: ../src/guestfs.pod:636
1279 #: ../src/guestfs.pod:638
1280 msgid "For documentation see the file C<guestfs.mli>."
1284 #: ../src/guestfs.pod:640
1289 #: ../src/guestfs.pod:642
1290 msgid "For documentation see L<Sys::Guestfs(3)>."
1294 #: ../src/guestfs.pod:644
1299 #: ../src/guestfs.pod:646
1301 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1302 "the php-libguestfs package for your distribution."
1306 #: ../src/guestfs.pod:649
1307 msgid "The PHP binding only works correctly on 64 bit machines."
1311 #: ../src/guestfs.pod:651
1316 #: ../src/guestfs.pod:653
1317 msgid "For documentation do:"
1321 #: ../src/guestfs.pod:655
1325 " >>> import guestfs\n"
1326 " >>> help (guestfs)\n"
1331 #: ../src/guestfs.pod:659
1336 #: ../src/guestfs.pod:661
1338 "Use the Guestfs module. There is no Ruby-specific documentation, but you "
1339 "can find examples written in Ruby in the libguestfs source."
1343 #: ../src/guestfs.pod:664
1344 msgid "B<shell scripts>"
1348 #: ../src/guestfs.pod:666
1349 msgid "For documentation see L<guestfish(1)>."
1353 #: ../src/guestfs.pod:670
1354 msgid "LIBGUESTFS GOTCHAS"
1358 #: ../src/guestfs.pod:672
1360 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1361 "system [...] that works in the way it is documented but is counterintuitive "
1362 "and almost invites mistakes.\""
1366 #: ../src/guestfs.pod:676
1368 "Since we developed libguestfs and the associated tools, there are several "
1369 "things we would have designed differently, but are now stuck with for "
1370 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1371 "release, you can expect these to change. Beware of them."
1375 #: ../src/guestfs.pod:684
1376 msgid "Autosync / forgetting to sync."
1380 #: ../src/guestfs.pod:686
1382 "When modifying a filesystem from C or another language, you B<must> unmount "
1383 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1384 "libguestfs handle. You can also call:"
1388 #: ../src/guestfs.pod:690
1391 " guestfs_set_autosync (g, 1);\n"
1396 #: ../src/guestfs.pod:692
1398 "to have the unmount/sync done automatically for you when the handle 'g' is "
1399 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
1404 #: ../src/guestfs.pod:696
1406 "If you forget to do this, then it is entirely possible that your changes "
1407 "won't be written out, or will be partially written, or (very rarely) that "
1408 "you'll get disk corruption."
1412 #: ../src/guestfs.pod:700
1414 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1415 "guestfish scripts that forget to sync will work just fine, which can make "
1416 "this very puzzling if you are trying to debug a problem."
1420 #: ../src/guestfs.pod:704
1422 "Update: Autosync is enabled by default for all API users starting from "
1423 "libguestfs 1.5.24."
1427 #: ../src/guestfs.pod:707
1428 msgid "Mount option C<-o sync> should not be the default."
1432 #: ../src/guestfs.pod:709
1434 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1435 "However C<-o sync> does not add any reliability benefit, but does have a "
1436 "very large performance impact."
1440 #: ../src/guestfs.pod:713
1442 "The work around is to use L</guestfs_mount_options> and set the mount "
1443 "options that you actually want to use."
1447 #: ../src/guestfs.pod:716
1448 msgid "Read-only should be the default."
1452 #: ../src/guestfs.pod:718
1454 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1455 "specify I<--rw> if you want to make changes to the image."
1459 #: ../src/guestfs.pod:721
1460 msgid "This would reduce the potential to corrupt live VM images."
1464 #: ../src/guestfs.pod:723
1466 "Note that many filesystems change the disk when you just mount and unmount, "
1467 "even if you didn't perform any writes. You need to use "
1468 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
1472 #: ../src/guestfs.pod:727
1473 msgid "guestfish command line is hard to use."
1477 #: ../src/guestfs.pod:729
1479 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1480 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1481 "exist, so it fails. In earlier versions of guestfish the error message was "
1482 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1483 "we should have used C<guestfish -c command> to run commands."
1487 #: ../src/guestfs.pod:736
1488 msgid "guestfish megabyte modifiers don't work right on all commands"
1492 #: ../src/guestfs.pod:738
1494 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1495 "other modifiers). What guestfish actually does is to multiply the number "
1496 "part by the modifier part and pass the result to the C API. However this "
1497 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1498 "expecting some other unit (eg. megabytes)."
1502 #: ../src/guestfs.pod:745
1503 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1507 #: ../src/guestfs.pod:747
1510 " lvcreate LV VG 100M\n"
1515 #: ../src/guestfs.pod:749
1517 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1518 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1519 "megabytes * megabytes) logical volume. The error message you get from this "
1520 "is also a little obscure."
1524 #: ../src/guestfs.pod:754
1526 "This could be fixed in the generator by specially marking parameters and "
1527 "return values which take bytes or other units."
1531 #: ../src/guestfs.pod:757
1532 msgid "Library should return errno with error messages."
1536 #: ../src/guestfs.pod:759
1538 "It would be a nice-to-have to be able to get the original value of 'errno' "
1539 "from inside the appliance along error paths (where set). Currently "
1540 "L<guestmount(1)> goes through hoops to try to reverse the error message "
1541 "string into an errno, see the function error() in fuse/guestmount.c."
1545 #: ../src/guestfs.pod:765
1547 "In libguestfs 1.5.4, the protocol was changed so that the Linux errno is "
1548 "sent back from the daemon."
1552 #: ../src/guestfs.pod:768
1553 msgid "Ambiguity between devices and paths"
1557 #: ../src/guestfs.pod:770
1559 "There is a subtle ambiguity in the API between a device name "
1560 "(eg. C</dev/sdb2>) and a similar pathname. A file might just happen to be "
1561 "called C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1565 #: ../src/guestfs.pod:775
1567 "In the current API we usually resolve this ambiguity by having two separate "
1568 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1569 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1570 "detecting if the path supplied begins with C</dev/>."
1574 #: ../src/guestfs.pod:781
1576 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1577 "make paths/devices into structured names. One way to do this would be to "
1578 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1579 "aspect of grub. Another way would be to use a structured type, equivalent "
1580 "to this OCaml type:"
1584 #: ../src/guestfs.pod:787
1587 " type path = Path of string | Device of int | Partition of int * int\n"
1592 #: ../src/guestfs.pod:789
1593 msgid "which would allow you to pass arguments like:"
1597 #: ../src/guestfs.pod:791
1600 " Path \"/foo/bar\"\n"
1601 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
1602 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
1603 " Path \"/dev/sdb2\" (* not a device *)\n"
1608 #: ../src/guestfs.pod:796
1610 "As you can see there are still problems to resolve even with this "
1611 "representation. Also consider how it might work in guestfish."
1615 #: ../src/guestfs.pod:801
1616 msgid "PROTOCOL LIMITS"
1620 #: ../src/guestfs.pod:803
1622 "Internally libguestfs uses a message-based protocol to pass API calls and "
1623 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1624 "plenty more detail about this). The maximum message size used by the "
1625 "protocol is slightly less than 4 MB. For some API calls you may need to be "
1626 "aware of this limit. The API calls which may be affected are individually "
1627 "documented, with a link back to this section of the documentation."
1631 #: ../src/guestfs.pod:811
1633 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1634 "a simple string. Because this string is at some point internally encoded as "
1635 "a message, the maximum size that it can return is slightly under 4 MB. If "
1636 "the requested file is larger than this then you will get an error."
1640 #: ../src/guestfs.pod:817
1642 "In order to transfer large files into and out of the guest filesystem, you "
1643 "need to use particular calls that support this. The sections L</UPLOADING> "
1644 "and L</DOWNLOADING> document how to do this."
1648 #: ../src/guestfs.pod:821
1650 "You might also consider mounting the disk image using our FUSE filesystem "
1651 "support (L<guestmount(1)>)."
1655 #: ../src/guestfs.pod:824
1656 msgid "KEYS AND PASSPHRASES"
1660 #: ../src/guestfs.pod:826
1662 "Certain libguestfs calls take a parameter that contains sensitive key "
1663 "material, passed in as a C string."
1667 #: ../src/guestfs.pod:829
1669 "In the future we would hope to change the libguestfs implementation so that "
1670 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1671 "swap. However this is I<not> done at the moment, because of the complexity "
1672 "of such an implementation."
1676 #: ../src/guestfs.pod:834
1678 "Therefore you should be aware that any key parameter you pass to libguestfs "
1679 "might end up being written out to the swap partition. If this is a concern, "
1680 "scrub the swap partition or don't use libguestfs on encrypted devices."
1684 #: ../src/guestfs.pod:839
1685 msgid "CONNECTION MANAGEMENT"
1689 #: ../src/guestfs.pod:841
1694 #: ../src/guestfs.pod:843
1696 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
1697 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
1698 "handle and release all resources used."
1702 #: ../src/guestfs.pod:847
1704 "For information on using multiple handles and threads, see the section "
1705 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> below."
1709 #: ../src/guestfs.pod:850
1710 msgid "guestfs_create"
1714 #: ../src/guestfs.pod:852
1717 " guestfs_h *guestfs_create (void);\n"
1722 #: ../src/guestfs.pod:854
1723 msgid "Create a connection handle."
1727 #: ../src/guestfs.pod:856
1729 "You have to call L</guestfs_add_drive_opts> (or one of the equivalent calls) "
1730 "on the handle at least once."
1734 #: ../src/guestfs.pod:859
1736 "This function returns a non-NULL pointer to a handle on success or NULL on "
1741 #: ../src/guestfs.pod:862
1742 msgid "After configuring the handle, you have to call L</guestfs_launch>."
1746 #: ../src/guestfs.pod:864
1748 "You may also want to configure error handling for the handle. See L</ERROR "
1749 "HANDLING> section below."
1753 #: ../src/guestfs.pod:867
1754 msgid "guestfs_close"
1758 #: ../src/guestfs.pod:869
1761 " void guestfs_close (guestfs_h *g);\n"
1766 #: ../src/guestfs.pod:871
1767 msgid "This closes the connection handle and frees up all resources used."
1771 #: ../src/guestfs.pod:873
1772 msgid "ERROR HANDLING"
1776 #: ../src/guestfs.pod:875
1778 "The convention in all functions that return C<int> is that they return C<-1> "
1779 "to indicate an error. You can get additional information on errors by "
1780 "calling L</guestfs_last_error> and/or by setting up an error handler with "
1781 "L</guestfs_set_error_handler>."
1785 #: ../src/guestfs.pod:880
1786 msgid "The default error handler prints the information string to C<stderr>."
1790 #: ../src/guestfs.pod:882
1792 "Out of memory errors are handled differently. The default action is to call "
1793 "L<abort(3)>. If this is undesirable, then you can set a handler using "
1794 "L</guestfs_set_out_of_memory_handler>."
1798 #: ../src/guestfs.pod:886
1799 msgid "guestfs_last_error"
1803 #: ../src/guestfs.pod:888
1806 " const char *guestfs_last_error (guestfs_h *g);\n"
1811 #: ../src/guestfs.pod:890
1813 "This returns the last error message that happened on C<g>. If there has not "
1814 "been an error since the handle was created, then this returns C<NULL>."
1818 #: ../src/guestfs.pod:894
1820 "The lifetime of the returned string is until the next error occurs, or "
1821 "L</guestfs_close> is called."
1825 #: ../src/guestfs.pod:897
1827 "The error string is not localized (ie. is always in English), because this "
1828 "makes searching for error messages in search engines give the largest number "
1833 #: ../src/guestfs.pod:901
1834 msgid "guestfs_set_error_handler"
1838 #: ../src/guestfs.pod:903
1841 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
1843 " const char *msg);\n"
1844 " void guestfs_set_error_handler (guestfs_h *g,\n"
1845 " guestfs_error_handler_cb cb,\n"
1851 #: ../src/guestfs.pod:910
1853 "The callback C<cb> will be called if there is an error. The parameters "
1854 "passed to the callback are an opaque data pointer and the error message "
1859 #: ../src/guestfs.pod:914
1861 "Note that the message string C<msg> is freed as soon as the callback "
1862 "function returns, so if you want to stash it somewhere you must make your "
1867 #: ../src/guestfs.pod:918
1868 msgid "The default handler prints messages on C<stderr>."
1872 #: ../src/guestfs.pod:920
1873 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
1877 #: ../src/guestfs.pod:922
1878 msgid "guestfs_get_error_handler"
1882 #: ../src/guestfs.pod:924
1885 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
1886 " void **opaque_rtn);\n"
1891 #: ../src/guestfs.pod:927
1892 msgid "Returns the current error handler callback."
1896 #: ../src/guestfs.pod:929
1897 msgid "guestfs_set_out_of_memory_handler"
1901 #: ../src/guestfs.pod:931
1904 " typedef void (*guestfs_abort_cb) (void);\n"
1905 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
1906 " guestfs_abort_cb);\n"
1911 #: ../src/guestfs.pod:935
1913 "The callback C<cb> will be called if there is an out of memory situation. "
1914 "I<Note this callback must not return>."
1918 #: ../src/guestfs.pod:938
1919 msgid "The default is to call L<abort(3)>."
1923 #: ../src/guestfs.pod:940
1924 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
1928 #: ../src/guestfs.pod:943
1929 msgid "guestfs_get_out_of_memory_handler"
1933 #: ../src/guestfs.pod:945
1936 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
1941 #: ../src/guestfs.pod:947
1942 msgid "This returns the current out of memory handler."
1946 #: ../src/guestfs.pod:949
1951 #: ../src/guestfs.pod:951
1953 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
1958 #: ../src/guestfs.pod:954
1960 "By default it looks for these in the directory C<$libdir/guestfs> "
1961 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
1965 #: ../src/guestfs.pod:957
1967 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
1968 "to change the directories that libguestfs will search in. The value is a "
1969 "colon-separated list of paths. The current directory is I<not> searched "
1970 "unless the path contains an empty element or C<.>. For example "
1971 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
1972 "then C</usr/lib/guestfs>."
1976 #: ../src/guestfs.pod:964
1977 msgid "HIGH-LEVEL API ACTIONS"
1981 #: ../src/guestfs.pod:966
1982 msgid "ABI GUARANTEE"
1986 #: ../src/guestfs.pod:968
1988 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
1989 "actions as outlined in this section. Although we will deprecate some "
1990 "actions, for example if they get replaced by newer calls, we will keep the "
1991 "old actions forever. This allows you the developer to program in confidence "
1992 "against the libguestfs API."
1996 #: ../src/guestfs.pod:974 ../fish/guestfish.pod:860
2001 #: ../src/guestfs.pod:976
2006 #: ../src/guestfs.pod:978
2011 #: ../src/guestfs.pod:980
2012 msgid "AVAILABILITY"
2016 #: ../src/guestfs.pod:982
2017 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
2021 #: ../src/guestfs.pod:984
2023 "Using L</guestfs_available> you can test availability of the following "
2024 "groups of functions. This test queries the appliance to see if the "
2025 "appliance you are currently using supports the functionality."
2029 #: ../src/guestfs.pod:989
2030 msgid "@AVAILABILITY@"
2034 #: ../src/guestfs.pod:991
2035 msgid "GUESTFISH supported COMMAND"
2039 #: ../src/guestfs.pod:993
2041 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
2042 "prints out the available groups and whether they are supported by this build "
2043 "of libguestfs. Note however that you have to do C<run> first."
2047 #: ../src/guestfs.pod:998
2048 msgid "SINGLE CALLS AT COMPILE TIME"
2052 #: ../src/guestfs.pod:1000
2054 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
2055 "function, such as:"
2059 #: ../src/guestfs.pod:1003
2062 " #define LIBGUESTFS_HAVE_DD 1\n"
2067 #: ../src/guestfs.pod:1005
2068 msgid "if L</guestfs_dd> is available."
2072 #: ../src/guestfs.pod:1007
2074 "Before version 1.5.8, if you needed to test whether a single libguestfs "
2075 "function is available at compile time, we recommended using build tools such "
2076 "as autoconf or cmake. For example in autotools you could use:"
2080 #: ../src/guestfs.pod:1012
2083 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
2084 " AC_CHECK_FUNCS([guestfs_dd])\n"
2089 #: ../src/guestfs.pod:1015
2091 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
2096 #: ../src/guestfs.pod:1018
2097 msgid "SINGLE CALLS AT RUN TIME"
2101 #: ../src/guestfs.pod:1020
2103 "Testing at compile time doesn't guarantee that a function really exists in "
2104 "the library. The reason is that you might be dynamically linked against a "
2105 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
2106 "This situation unfortunately results in a segmentation fault, which is a "
2107 "shortcoming of the C dynamic linking system itself."
2111 #: ../src/guestfs.pod:1027
2113 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2114 "in this example program (note that you still need the compile time check as "
2119 #: ../src/guestfs.pod:1031
2122 " #include <stdio.h>\n"
2123 " #include <stdlib.h>\n"
2124 " #include <unistd.h>\n"
2125 " #include <dlfcn.h>\n"
2126 " #include <guestfs.h>\n"
2131 #: ../src/guestfs.pod:1037
2136 " #ifdef LIBGUESTFS_HAVE_DD\n"
2138 " int has_function;\n"
2143 #: ../src/guestfs.pod:1043
2146 " /* Test if the function guestfs_dd is really available. */\n"
2147 " dl = dlopen (NULL, RTLD_LAZY);\n"
2149 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2150 " exit (EXIT_FAILURE);\n"
2152 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2158 #: ../src/guestfs.pod:1052
2161 " if (!has_function)\n"
2162 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2164 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2165 " /* Now it's safe to call\n"
2166 " guestfs_dd (g, \"foo\", \"bar\");\n"
2170 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2177 #: ../src/guestfs.pod:1065
2179 "You may think the above is an awful lot of hassle, and it is. There are "
2180 "other ways outside of the C linking system to ensure that this kind of "
2181 "incompatibility never arises, such as using package versioning:"
2185 #: ../src/guestfs.pod:1070
2188 " Requires: libguestfs >= 1.0.80\n"
2193 #: ../src/guestfs.pod:1072
2194 msgid "CALLS WITH OPTIONAL ARGUMENTS"
2198 #: ../src/guestfs.pod:1074
2200 "A recent feature of the API is the introduction of calls which take optional "
2201 "arguments. In C these are declared 3 ways. The main way is as a call which "
2202 "takes variable arguments (ie. C<...>), as in this example:"
2206 #: ../src/guestfs.pod:1079
2209 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
2214 #: ../src/guestfs.pod:1081
2216 "Call this with a list of optional arguments, terminated by C<-1>. So to "
2217 "call with no optional arguments specified:"
2221 #: ../src/guestfs.pod:1084
2224 " guestfs_add_drive_opts (g, filename, -1);\n"
2229 #: ../src/guestfs.pod:1086
2230 msgid "With a single optional argument:"
2234 #: ../src/guestfs.pod:1088
2237 " guestfs_add_drive_opts (g, filename,\n"
2238 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2244 #: ../src/guestfs.pod:1092
2249 #: ../src/guestfs.pod:1094
2252 " guestfs_add_drive_opts (g, filename,\n"
2253 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2254 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
2260 #: ../src/guestfs.pod:1099
2262 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
2267 #: ../src/guestfs.pod:1102
2268 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
2272 #: ../src/guestfs.pod:1104
2274 "The second variant has the same name with the suffix C<_va>, which works the "
2275 "same way but takes a C<va_list>. See the C manual for details. For the "
2276 "example function, this is declared:"
2280 #: ../src/guestfs.pod:1108
2283 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
2289 #: ../src/guestfs.pod:1111
2290 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
2294 #: ../src/guestfs.pod:1113
2296 "The third variant is useful where you need to construct these calls. You "
2297 "pass in a structure where you fill in the optional fields. The structure "
2298 "has a bitmask as the first element which you must set to indicate which "
2299 "fields you have filled in. For our example function the structure and call "
2304 #: ../src/guestfs.pod:1119
2307 " struct guestfs_add_drive_opts_argv {\n"
2308 " uint64_t bitmask;\n"
2310 " const char *format;\n"
2313 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
2314 " const struct guestfs_add_drive_opts_argv *optargs);\n"
2319 #: ../src/guestfs.pod:1128
2320 msgid "You could call it like this:"
2324 #: ../src/guestfs.pod:1130
2327 " struct guestfs_add_drive_opts_argv optargs = {\n"
2328 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
2329 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
2331 " .format = \"qcow2\"\n"
2337 #: ../src/guestfs.pod:1137
2340 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
2345 #: ../src/guestfs.pod:1139 ../src/guestfs-actions.pod:10 ../src/guestfs-actions.pod:1582 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1244
2350 #: ../src/guestfs.pod:1145
2351 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
2355 #: ../src/guestfs.pod:1150
2356 msgid "You do not need to fill in all fields of the structure."
2360 #: ../src/guestfs.pod:1154
2362 "There must be a one-to-one correspondence between fields of the structure "
2363 "that are filled in, and bits set in the bitmask."
2367 #: ../src/guestfs.pod:1159
2368 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
2372 #: ../src/guestfs.pod:1161
2374 "In other languages, optional arguments are expressed in the way that is "
2375 "natural for that language. We refer you to the language-specific "
2376 "documentation for more details on that."
2380 #: ../src/guestfs.pod:1165
2381 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
2385 #: ../src/guestfs.pod:1167 ../src/guestfs.pod:1172
2390 #: ../src/guestfs.pod:1169
2392 "<!-- old anchor for the next section --> <a "
2393 "name=\"state_machine_and_low_level_event_api\"/>"
2397 #: ../src/guestfs.pod:1174
2398 msgid "ARCHITECTURE"
2402 #: ../src/guestfs.pod:1176
2404 "Internally, libguestfs is implemented by running an appliance (a special "
2405 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
2406 "process of the main program."
2410 #: ../src/guestfs.pod:1180
2413 " ___________________\n"
2415 " | main program |\n"
2417 " | | child process / appliance\n"
2418 " | | __________________________\n"
2420 " +-------------------+ RPC | +-----------------+ |\n"
2421 " | libguestfs <--------------------> guestfsd | |\n"
2422 " | | | +-----------------+ |\n"
2423 " \\___________________/ | | Linux kernel | |\n"
2424 " | +--^--------------+ |\n"
2425 " \\_________|________________/\n"
2431 " \\______________/\n"
2436 #: ../src/guestfs.pod:1200
2438 "The library, linked to the main program, creates the child process and hence "
2439 "the appliance in the L</guestfs_launch> function."
2443 #: ../src/guestfs.pod:1203
2445 "Inside the appliance is a Linux kernel and a complete stack of userspace "
2446 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
2447 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
2448 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
2449 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
2450 "attached to the qemu process which translates device access by the "
2451 "appliance's Linux kernel into accesses to the image."
2455 #: ../src/guestfs.pod:1212
2457 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
2458 "Although the disk image you are attached to might also be used by some "
2459 "virtual machine, libguestfs doesn't know or care about this. (But you will "
2460 "care if both libguestfs's qemu process and your virtual machine are trying "
2461 "to update the disk image at the same time, since these usually results in "
2462 "massive disk corruption)."
2466 #: ../src/guestfs.pod:1219
2467 msgid "STATE MACHINE"
2471 #: ../src/guestfs.pod:1221
2472 msgid "libguestfs uses a state machine to model the child process:"
2476 #: ../src/guestfs.pod:1223
2488 " / | \\ \\ guestfs_launch\n"
2489 " / | _\\__V______\n"
2491 " / | | LAUNCHING |\n"
2492 " / | \\___________/\n"
2494 " / | guestfs_launch\n"
2496 " ______ / __|____V\n"
2497 " / \\ ------> / \\\n"
2498 " | BUSY | | READY |\n"
2499 " \\______/ <------ \\________/\n"
2504 #: ../src/guestfs.pod:1245
2506 "The normal transitions are (1) CONFIG (when the handle is created, but there "
2507 "is no child process), (2) LAUNCHING (when the child process is booting up), "
2508 "(3) alternating between READY and BUSY as commands are issued to, and "
2509 "carried out by, the child process."
2513 #: ../src/guestfs.pod:1250
2515 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
2516 "asynchronously at any time (eg. due to some internal error), and that causes "
2517 "the state to transition back to CONFIG."
2521 #: ../src/guestfs.pod:1254
2523 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
2524 "issued when in the CONFIG state."
2528 #: ../src/guestfs.pod:1257
2530 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
2531 "L</guestfs_launch> blocks until the child process is READY to accept "
2532 "commands (or until some failure or timeout). L</guestfs_launch> internally "
2533 "moves the state from CONFIG to LAUNCHING while it is running."
2537 #: ../src/guestfs.pod:1263
2539 "API actions such as L</guestfs_mount> can only be issued when in the READY "
2540 "state. These API calls block waiting for the command to be carried out "
2541 "(ie. the state to transition to BUSY and then back to READY). There are no "
2542 "non-blocking versions, and no way to issue more than one command per handle "
2547 #: ../src/guestfs.pod:1269
2549 "Finally, the child process sends asynchronous messages back to the main "
2550 "program, such as kernel log messages. You can register a callback to "
2551 "receive these messages."
2555 #: ../src/guestfs.pod:1273
2556 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
2560 #: ../src/guestfs.pod:1275
2562 "The child process generates events in some situations. Current events "
2563 "include: receiving a log message, the child process exits."
2567 #: ../src/guestfs.pod:1278
2569 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
2574 #: ../src/guestfs.pod:1281
2576 "Only I<one callback of each type> can be registered for each handle. "
2577 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
2578 "that type. Cancel all callbacks of this type by calling this function with "
2579 "C<cb> set to C<NULL>."
2583 #: ../src/guestfs.pod:1286
2584 msgid "guestfs_set_log_message_callback"
2588 #: ../src/guestfs.pod:1288
2591 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
2592 " char *buf, int len);\n"
2593 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
2594 " guestfs_log_message_cb cb,\n"
2600 #: ../src/guestfs.pod:1294
2602 "The callback function C<cb> will be called whenever qemu or the guest writes "
2603 "anything to the console."
2607 #: ../src/guestfs.pod:1297
2608 msgid "Use this function to capture kernel messages and similar."
2612 #: ../src/guestfs.pod:1299
2614 "Normally there is no log message handler, and log messages are just "
2619 #: ../src/guestfs.pod:1302
2620 msgid "guestfs_set_subprocess_quit_callback"
2624 #: ../src/guestfs.pod:1304
2627 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
2628 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
2629 " guestfs_subprocess_quit_cb cb,\n"
2635 #: ../src/guestfs.pod:1309
2637 "The callback function C<cb> will be called when the child process quits, "
2638 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
2639 "corresponds to a transition from any state to the CONFIG state)."
2643 #: ../src/guestfs.pod:1314
2644 msgid "guestfs_set_launch_done_callback"
2648 #: ../src/guestfs.pod:1316
2651 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
2652 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
2653 " guestfs_launch_done_cb cb,\n"
2659 #: ../src/guestfs.pod:1321
2661 "The callback function C<cb> will be called when the child process becomes "
2662 "ready first time after it has been launched. (This corresponds to a "
2663 "transition from LAUNCHING to the READY state)."
2667 #: ../src/guestfs.pod:1325
2668 msgid "guestfs_set_close_callback"
2672 #: ../src/guestfs.pod:1327
2675 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
2676 " void guestfs_set_close_callback (guestfs_h *g,\n"
2677 " guestfs_close_cb cb,\n"
2683 #: ../src/guestfs.pod:1332
2685 "The callback function C<cb> will be called while the handle is being closed "
2686 "(synchronously from L</guestfs_close>)."
2690 #: ../src/guestfs.pod:1335
2692 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
2693 "handles that are open when the program exits. This means that this callback "
2694 "might be called indirectly from L<exit(3)>, which can cause unexpected "
2695 "problems in higher-level languages (eg. if your HLL interpreter has already "
2696 "been cleaned up by the time this is called, and if your callback then jumps "
2697 "into some HLL function)."
2701 #: ../src/guestfs.pod:1343
2702 msgid "guestfs_set_progress_callback"
2706 #: ../src/guestfs.pod:1345
2709 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
2710 " int proc_nr, int serial,\n"
2711 " uint64_t position, uint64_t total);\n"
2712 " void guestfs_set_progress_callback (guestfs_h *g,\n"
2713 " guestfs_progress_cb cb,\n"
2719 #: ../src/guestfs.pod:1352
2721 "Some long-running operations can generate progress messages. If this "
2722 "callback is registered, then it will be called each time a progress message "
2723 "is generated (usually two seconds after the operation started, and three "
2724 "times per second thereafter until it completes, although the frequency may "
2725 "change in future versions)."
2729 #: ../src/guestfs.pod:1358
2731 "The callback receives two numbers: C<position> and C<total>. The units of "
2732 "C<total> are not defined, although for some operations C<total> may relate "
2733 "in some way to the amount of data to be transferred (eg. in bytes or "
2734 "megabytes), and C<position> may be the portion which has been transferred."
2738 #: ../src/guestfs.pod:1364
2739 msgid "The only defined and stable parts of the API are:"
2743 #: ../src/guestfs.pod:1370
2745 "The callback can display to the user some type of progress bar or indicator "
2746 "which shows the ratio of C<position>:C<total>."
2750 #: ../src/guestfs.pod:1375
2751 msgid "0 E<lt>= C<position> E<lt>= C<total>"
2755 #: ../src/guestfs.pod:1379
2757 "If any progress notification is sent during a call, then a final progress "
2758 "notification is always sent when C<position> = C<total>."
2762 #: ../src/guestfs.pod:1382
2764 "This is to simplify caller code, so callers can easily set the progress "
2765 "indicator to \"100%\" at the end of the operation, without requiring special "
2766 "code to detect this case."
2770 #: ../src/guestfs.pod:1388
2772 "The callback also receives the procedure number and serial number of the "
2773 "call. These are only useful for debugging protocol issues, and the callback "
2774 "can normally ignore them. The callback may want to print these numbers in "
2775 "error messages or debugging messages."
2779 #: ../src/guestfs.pod:1393
2780 msgid "PRIVATE DATA AREA"
2784 #: ../src/guestfs.pod:1395
2786 "You can attach named pieces of private data to the libguestfs handle, and "
2787 "fetch them by name for the lifetime of the handle. This is called the "
2788 "private data area and is only available from the C API."
2792 #: ../src/guestfs.pod:1399
2793 msgid "To attach a named piece of data, use the following call:"
2797 #: ../src/guestfs.pod:1401
2800 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
2805 #: ../src/guestfs.pod:1403
2807 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
2808 "pointer (which can be C<NULL>). Any previous item with the same name is "
2813 #: ../src/guestfs.pod:1407
2815 "You can use any C<key> you want, but names beginning with an underscore "
2816 "character are reserved for internal libguestfs purposes (for implementing "
2817 "language bindings). It is recommended to prefix the name with some unique "
2818 "string to avoid collisions with other users."
2822 #: ../src/guestfs.pod:1412
2823 msgid "To retrieve the pointer, use:"
2827 #: ../src/guestfs.pod:1414
2830 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
2835 #: ../src/guestfs.pod:1416
2837 "This function returns C<NULL> if either no data is found associated with "
2838 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
2843 #: ../src/guestfs.pod:1420
2845 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
2846 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
2847 "all. In particular, libguestfs does I<not> try to free the data when the "
2848 "handle is closed. If the data must be freed, then the caller must either "
2849 "free it before calling L</guestfs_close> or must set up a close callback to "
2850 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
2851 "can be registered for a handle)."
2855 #: ../src/guestfs.pod:1428
2857 "The private data area is implemented using a hash table, and should be "
2858 "reasonably efficient for moderate numbers of keys."
2862 #: ../src/guestfs.pod:1431
2863 msgid "BLOCK DEVICE NAMING"
2867 #: ../src/guestfs.pod:1433
2869 "In the kernel there is now quite a profusion of schemata for naming block "
2870 "devices (in this context, by I<block device> I mean a physical or virtual "
2871 "hard drive). The original Linux IDE driver used names starting with "
2872 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
2873 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
2874 "replacement for the old IDE driver (particularly for SATA devices) those "
2875 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
2876 "machines with paravirtualized drivers. This has created several different "
2877 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
2882 #: ../src/guestfs.pod:1445
2884 "As discussed above, libguestfs uses a qemu appliance running an embedded "
2885 "Linux kernel to access block devices. We can run a variety of appliances "
2886 "based on a variety of Linux kernels."
2890 #: ../src/guestfs.pod:1449
2892 "This causes a problem for libguestfs because many API calls use device or "
2893 "partition names. Working scripts and the recipe (example) scripts that we "
2894 "make available over the internet could fail if the naming scheme changes."
2898 #: ../src/guestfs.pod:1454
2900 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2901 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2902 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2903 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2907 #: ../src/guestfs.pod:1460
2909 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2910 "L</guestfs_list_partitions> and similar calls return the true names of the "
2911 "devices and partitions as known to the appliance."
2915 #: ../src/guestfs.pod:1465
2916 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2920 #: ../src/guestfs.pod:1467
2922 "Usually this translation is transparent. However in some (very rare) cases "
2923 "you may need to know the exact algorithm. Such cases include where you use "
2924 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
2925 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
2930 #: ../src/guestfs.pod:1473
2932 "The algorithm is applied only to I<parameters> which are known to be either "
2933 "device or partition names. Return values from functions such as "
2934 "L</guestfs_list_devices> are never changed."
2938 #: ../src/guestfs.pod:1481
2939 msgid "Is the string a parameter which is a device or partition name?"
2943 #: ../src/guestfs.pod:1485
2944 msgid "Does the string begin with C</dev/sd>?"
2948 #: ../src/guestfs.pod:1489
2950 "Does the named device exist? If so, we use that device. However if I<not> "
2951 "then we continue with this algorithm."
2955 #: ../src/guestfs.pod:1494
2956 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2960 #: ../src/guestfs.pod:1496
2961 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2965 #: ../src/guestfs.pod:1498
2966 msgid "If that named device exists, use it. If not, continue."
2970 #: ../src/guestfs.pod:1502
2971 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2975 #: ../src/guestfs.pod:1504
2976 msgid "If that named device exists, use it. If not, return an error."
2980 #: ../src/guestfs.pod:1508
2981 msgid "PORTABILITY CONCERNS"
2985 #: ../src/guestfs.pod:1510
2987 "Although the standard naming scheme and automatic translation is useful for "
2988 "simple programs and guestfish scripts, for larger programs it is best not to "
2989 "rely on this mechanism."
2993 #: ../src/guestfs.pod:1514
2995 "Where possible for maximum future portability programs using libguestfs "
2996 "should use these future-proof techniques:"
3000 #: ../src/guestfs.pod:1521
3002 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
3003 "device names, and then use those names directly."
3007 #: ../src/guestfs.pod:1524
3008 msgid "Since those device names exist by definition, they will never be translated."
3012 #: ../src/guestfs.pod:1529
3014 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
3015 "filesystem labels."
3019 #: ../src/guestfs.pod:1534
3024 #: ../src/guestfs.pod:1536
3025 msgid "COMMUNICATION PROTOCOL"
3029 #: ../src/guestfs.pod:1538
3031 "Don't rely on using this protocol directly. This section documents how it "
3032 "currently works, but it may change at any time."
3036 #: ../src/guestfs.pod:1541
3038 "The protocol used to talk between the library and the daemon running inside "
3039 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
3040 "1014, RFC 1832, RFC 4506)."
3044 #: ../src/guestfs.pod:1545
3046 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
3047 "this file is automatically generated)."
3051 #: ../src/guestfs.pod:1548
3053 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
3054 "and C<FileOut> parameters, which are handled with very simple request/reply "
3055 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
3056 "parameters, which use the same request and reply messages, but they may also "
3057 "be followed by files sent using a chunked encoding."
3061 #: ../src/guestfs.pod:1555
3062 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
3066 #: ../src/guestfs.pod:1557
3067 msgid "For ordinary functions, the request message is:"
3071 #: ../src/guestfs.pod:1559
3074 " total length (header + arguments,\n"
3075 " but not including the length word itself)\n"
3076 " struct guestfs_message_header (encoded as XDR)\n"
3077 " struct guestfs_<foo>_args (encoded as XDR)\n"
3082 #: ../src/guestfs.pod:1564
3084 "The total length field allows the daemon to allocate a fixed size buffer "
3085 "into which it slurps the rest of the message. As a result, the total length "
3086 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
3087 "effective size of any request is limited to somewhere under this size."
3091 #: ../src/guestfs.pod:1570
3093 "Note also that many functions don't take any arguments, in which case the "
3094 "C<guestfs_I<foo>_args> is completely omitted."
3098 #: ../src/guestfs.pod:1573
3100 "The header contains the procedure number (C<guestfs_proc>) which is how the "
3101 "receiver knows what type of args structure to expect, or none at all."
3105 #: ../src/guestfs.pod:1577
3106 msgid "The reply message for ordinary functions is:"
3110 #: ../src/guestfs.pod:1579
3113 " total length (header + ret,\n"
3114 " but not including the length word itself)\n"
3115 " struct guestfs_message_header (encoded as XDR)\n"
3116 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3121 #: ../src/guestfs.pod:1584
3123 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
3124 "functions that return no formal return values."
3128 #: ../src/guestfs.pod:1587
3129 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
3133 #: ../src/guestfs.pod:1590
3135 "In the case of an error, a flag is set in the header, and the reply message "
3136 "is slightly changed:"
3140 #: ../src/guestfs.pod:1593
3143 " total length (header + error,\n"
3144 " but not including the length word itself)\n"
3145 " struct guestfs_message_header (encoded as XDR)\n"
3146 " struct guestfs_message_error (encoded as XDR)\n"
3151 #: ../src/guestfs.pod:1598
3153 "The C<guestfs_message_error> structure contains the error message as a "
3158 #: ../src/guestfs.pod:1601
3159 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
3163 #: ../src/guestfs.pod:1603
3165 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
3166 "The normal request message is sent (see above). However this is followed by "
3167 "a sequence of file chunks."
3171 #: ../src/guestfs.pod:1607
3174 " total length (header + arguments,\n"
3175 " but not including the length word itself,\n"
3176 " and not including the chunks)\n"
3177 " struct guestfs_message_header (encoded as XDR)\n"
3178 " struct guestfs_<foo>_args (encoded as XDR)\n"
3179 " sequence of chunks for FileIn param #0\n"
3180 " sequence of chunks for FileIn param #1 etc.\n"
3185 #: ../src/guestfs.pod:1615
3186 msgid "The \"sequence of chunks\" is:"
3190 #: ../src/guestfs.pod:1617
3193 " length of chunk (not including length word itself)\n"
3194 " struct guestfs_chunk (encoded as XDR)\n"
3195 " length of chunk\n"
3196 " struct guestfs_chunk (encoded as XDR)\n"
3198 " length of chunk\n"
3199 " struct guestfs_chunk (with data.data_len == 0)\n"
3204 #: ../src/guestfs.pod:1625
3206 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
3207 "is set in the final chunk to indicate either successful completion or early "
3212 #: ../src/guestfs.pod:1629
3214 "At time of writing there are no functions that have more than one FileIn "
3215 "parameter. However this is (theoretically) supported, by sending the "
3216 "sequence of chunks for each FileIn parameter one after another (from left to "
3221 #: ../src/guestfs.pod:1634
3223 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
3224 "transfer. The library does this by sending a chunk with a special flag set "
3225 "to indicate cancellation. When the daemon sees this, it cancels the whole "
3226 "RPC, does I<not> send any reply, and goes back to reading the next request."
3230 #: ../src/guestfs.pod:1640
3232 "The daemon may also cancel. It does this by writing a special word "
3233 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
3234 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
3235 "cancel chunk). The special word is chosen so that even if cancellation "
3236 "happens right at the end of the transfer (after the library has finished "
3237 "writing and has started listening for the reply), the \"spurious\" cancel "
3238 "flag will not be confused with the reply message."
3242 #: ../src/guestfs.pod:1649
3244 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
3245 "limit), and also files where the size is not known in advance (eg. from "
3246 "pipes or sockets). However the chunks are rather small "
3247 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
3248 "to keep much in memory."
3252 #: ../src/guestfs.pod:1655
3253 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
3257 #: ../src/guestfs.pod:1657
3259 "The protocol for FileOut parameters is exactly the same as for FileIn "
3260 "parameters, but with the roles of daemon and library reversed."
3264 #: ../src/guestfs.pod:1660
3267 " total length (header + ret,\n"
3268 " but not including the length word itself,\n"
3269 " and not including the chunks)\n"
3270 " struct guestfs_message_header (encoded as XDR)\n"
3271 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3272 " sequence of chunks for FileOut param #0\n"
3273 " sequence of chunks for FileOut param #1 etc.\n"
3278 #: ../src/guestfs.pod:1668
3279 msgid "INITIAL MESSAGE"
3283 #: ../src/guestfs.pod:1670
3285 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
3286 "which indicates that the guest and daemon is alive. This is what "
3287 "L</guestfs_launch> waits for."
3291 #: ../src/guestfs.pod:1674
3292 msgid "PROGRESS NOTIFICATION MESSAGES"
3296 #: ../src/guestfs.pod:1676
3298 "The daemon may send progress notification messages at any time. These are "
3299 "distinguished by the normal length word being replaced by "
3300 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
3304 #: ../src/guestfs.pod:1680
3306 "The library turns them into progress callbacks (see "
3307 "C<guestfs_set_progress_callback>) if there is a callback registered, or "
3308 "discards them if not."
3312 #: ../src/guestfs.pod:1684
3314 "The daemon self-limits the frequency of progress messages it sends (see "
3315 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
3320 #: ../src/guestfs.pod:1688
3321 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
3325 #: ../src/guestfs.pod:1690
3327 "All high-level libguestfs actions are synchronous. If you want to use "
3328 "libguestfs asynchronously then you must create a thread."
3332 #: ../src/guestfs.pod:1693
3334 "Only use the handle from a single thread. Either use the handle exclusively "
3335 "from one thread, or provide your own mutex so that two threads cannot issue "
3336 "calls on the same handle at the same time."
3340 #: ../src/guestfs.pod:1697
3342 "See the graphical program guestfs-browser for one possible architecture for "
3343 "multithreaded programs using libvirt and libguestfs."
3347 #: ../src/guestfs.pod:1700
3348 msgid "QEMU WRAPPERS"
3352 #: ../src/guestfs.pod:1702
3354 "If you want to compile your own qemu, run qemu from a non-standard location, "
3355 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
3360 #: ../src/guestfs.pod:1706
3362 "There is one important rule to remember: you I<must C<exec qemu>> as the "
3363 "last command in the shell script (so that qemu replaces the shell and "
3364 "becomes the direct child of the libguestfs-using program). If you don't do "
3365 "this, then the qemu process won't be cleaned up correctly."
3369 #: ../src/guestfs.pod:1711
3371 "Here is an example of a wrapper, where I have built my own copy of qemu from "
3376 #: ../src/guestfs.pod:1714
3380 " qemudir=/home/rjones/d/qemu\n"
3381 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
3387 #: ../src/guestfs.pod:1718
3389 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
3390 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
3395 #: ../src/guestfs.pod:1722
3398 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
3403 #: ../src/guestfs.pod:1724
3405 "Note that libguestfs also calls qemu with the -help and -version options in "
3406 "order to determine features."
3410 #: ../src/guestfs.pod:1727
3411 msgid "LIBGUESTFS VERSION NUMBERS"
3415 #: ../src/guestfs.pod:1729
3417 "Since April 2010, libguestfs has started to make separate development and "
3418 "stable releases, along with corresponding branches in our git repository. "
3419 "These separate releases can be identified by version number:"
3423 #: ../src/guestfs.pod:1734
3426 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3427 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3433 " | `-------- sub-version\n"
3435 " `------ always '1' because we don't change the ABI\n"
3440 #: ../src/guestfs.pod:1745
3441 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3445 #: ../src/guestfs.pod:1747
3447 "As time passes we cherry pick fixes from the development branch and backport "
3448 "those into the stable branch, the effect being that the stable branch should "
3449 "get more stable and less buggy over time. So the stable releases are ideal "
3450 "for people who don't need new features but would just like the software to "
3455 #: ../src/guestfs.pod:1753
3456 msgid "Our criteria for backporting changes are:"
3460 #: ../src/guestfs.pod:1759
3462 "Documentation changes which don't affect any code are backported unless the "
3463 "documentation refers to a future feature which is not in stable."
3467 #: ../src/guestfs.pod:1765
3469 "Bug fixes which are not controversial, fix obvious problems, and have been "
3470 "well tested are backported."
3474 #: ../src/guestfs.pod:1770
3476 "Simple rearrangements of code which shouldn't affect how it works get "
3477 "backported. This is so that the code in the two branches doesn't get too "
3478 "far out of step, allowing us to backport future fixes more easily."
3482 #: ../src/guestfs.pod:1776
3484 "We I<don't> backport new features, new APIs, new tools etc, except in one "
3485 "exceptional case: the new feature is required in order to implement an "
3486 "important bug fix."
3490 #: ../src/guestfs.pod:1782
3492 "A new stable branch starts when we think the new features in development are "
3493 "substantial and compelling enough over the current stable branch to warrant "
3494 "it. When that happens we create new stable and development versions 1.N.0 "
3495 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
3496 "stable at this point, but by backporting fixes from development, that branch "
3497 "will stabilize over time."
3501 #: ../src/guestfs.pod:1790 ../fish/guestfish.pod:867 ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:330 ../tools/virt-rescue.pl:255
3502 msgid "ENVIRONMENT VARIABLES"
3506 #: ../src/guestfs.pod:1794 ../fish/guestfish.pod:893
3507 msgid "LIBGUESTFS_APPEND"
3511 #: ../src/guestfs.pod:1796 ../fish/guestfish.pod:895
3512 msgid "Pass additional options to the guest kernel."
3516 #: ../src/guestfs.pod:1798 ../fish/guestfish.pod:897
3517 msgid "LIBGUESTFS_DEBUG"
3521 #: ../src/guestfs.pod:1800
3523 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
3524 "effect as calling C<guestfs_set_verbose (g, 1)>."
3528 #: ../src/guestfs.pod:1803 ../fish/guestfish.pod:902
3529 msgid "LIBGUESTFS_MEMSIZE"
3533 #: ../src/guestfs.pod:1805 ../fish/guestfish.pod:904
3534 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
3538 #: ../src/guestfs.pod:1808 ../fish/guestfish.pod:907
3541 " LIBGUESTFS_MEMSIZE=700\n"
3546 #: ../src/guestfs.pod:1810 ../fish/guestfish.pod:909
3547 msgid "LIBGUESTFS_PATH"
3551 #: ../src/guestfs.pod:1812
3553 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
3554 "the discussion of paths in section PATH above."
3558 #: ../src/guestfs.pod:1815 ../fish/guestfish.pod:914
3559 msgid "LIBGUESTFS_QEMU"
3563 #: ../src/guestfs.pod:1817 ../fish/guestfish.pod:916
3565 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
3566 "which was found at compile time by the configure script is used."
3570 #: ../src/guestfs.pod:1821
3571 msgid "See also L</QEMU WRAPPERS> above."
3575 #: ../src/guestfs.pod:1823 ../fish/guestfish.pod:920
3576 msgid "LIBGUESTFS_TRACE"
3580 #: ../src/guestfs.pod:1825
3582 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
3583 "effect as calling C<guestfs_set_trace (g, 1)>."
3587 #: ../src/guestfs.pod:1828 ../fish/guestfish.pod:929
3592 #: ../src/guestfs.pod:1830 ../fish/guestfish.pod:931
3593 msgid "Location of temporary directory, defaults to C</tmp>."
3597 #: ../src/guestfs.pod:1832 ../fish/guestfish.pod:933
3599 "If libguestfs was compiled to use the supermin appliance then the real "
3600 "appliance is cached in this directory, shared between all handles belonging "
3601 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
3602 "use in case C</tmp> is not large enough."
3606 #: ../src/guestfs.pod:1840 ../fish/guestfish.pod:991 ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:214 ../inspector/virt-inspector.pl:884 ../tools/virt-edit.pl:350 ../tools/virt-win-reg.pl:487 ../tools/virt-df.pl:640 ../tools/virt-ls.pl:235 ../tools/virt-resize.pl:1486 ../tools/virt-list-filesystems.pl:216 ../tools/virt-cat.pl:188 ../tools/virt-tar.pl:283 ../tools/virt-rescue.pl:267 ../tools/virt-make-fs.pl:534 ../tools/virt-list-partitions.pl:254
3611 #: ../src/guestfs.pod:1842
3613 "L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
3614 "L<virt-edit(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
3615 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
3616 "L<virt-rescue(1)>, L<virt-tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
3617 "L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
3621 #: ../src/guestfs.pod:1860
3623 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
3624 "L<lvm(8)>, L<disktype(1)>."
3628 #: ../src/guestfs.pod:1867 ../tools/virt-win-reg.pl:502 ../tools/virt-make-fs.pl:548
3633 #: ../src/guestfs.pod:1869
3634 msgid "To get a list of bugs against libguestfs use this link:"
3638 #: ../src/guestfs.pod:1871
3639 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
3643 #: ../src/guestfs.pod:1873
3644 msgid "To report a new bug against libguestfs use this link:"
3648 #: ../src/guestfs.pod:1875
3649 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
3653 #: ../src/guestfs.pod:1877
3654 msgid "When reporting a bug, please check:"
3658 #: ../src/guestfs.pod:1883
3659 msgid "That the bug hasn't been reported already."
3663 #: ../src/guestfs.pod:1887
3664 msgid "That you are testing a recent version."
3668 #: ../src/guestfs.pod:1891
3669 msgid "Describe the bug accurately, and give a way to reproduce it."
3673 #: ../src/guestfs.pod:1895
3675 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
3680 #: ../src/guestfs.pod:1900 ../fish/guestfish.pod:1008 ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:225 ../inspector/virt-inspector.pl:893
3685 #: ../src/guestfs.pod:1902 ../fish/guestfish.pod:1010 ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:227
3686 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
3690 #: ../src/guestfs.pod:1904 ../fish/guestfish.pod:1012 ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:229 ../inspector/virt-inspector.pl:899 ../tools/virt-edit.pl:366 ../tools/virt-win-reg.pl:517 ../tools/virt-df.pl:653 ../tools/virt-ls.pl:250 ../tools/virt-resize.pl:1512 ../tools/virt-list-filesystems.pl:232 ../tools/virt-cat.pl:202 ../tools/virt-tar.pl:298 ../tools/virt-rescue.pl:281 ../tools/virt-make-fs.pl:563 ../tools/virt-list-partitions.pl:269
3695 #: ../src/guestfs.pod:1906 ../fish/guestfish.pod:1014 ../fuse/guestmount.pod:231
3696 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
3700 #: ../src/guestfs.pod:1909
3702 "This library is free software; you can redistribute it and/or modify it "
3703 "under the terms of the GNU Lesser General Public License as published by the "
3704 "Free Software Foundation; either version 2 of the License, or (at your "
3705 "option) any later version."
3709 #: ../src/guestfs.pod:1914
3711 "This library is distributed in the hope that it will be useful, but WITHOUT "
3712 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
3713 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
3718 #: ../src/guestfs.pod:1919
3720 "You should have received a copy of the GNU Lesser General Public License "
3721 "along with this library; if not, write to the Free Software Foundation, "
3722 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
3726 #: ../src/guestfs-actions.pod:1
3727 msgid "guestfs_add_cdrom"
3731 #: ../src/guestfs-actions.pod:3
3734 " int guestfs_add_cdrom (guestfs_h *g,\n"
3735 "\t\tconst char *filename);\n"
3740 #: ../src/guestfs-actions.pod:6 ../fish/guestfish-actions.pod:5
3741 msgid "This function adds a virtual CD-ROM disk image to the guest."
3745 #: ../src/guestfs-actions.pod:8 ../fish/guestfish-actions.pod:7
3746 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
3750 #: ../src/guestfs-actions.pod:16
3752 "This call checks for the existence of C<filename>. This stops you from "
3753 "specifying other types of drive which are supported by qemu such as C<nbd:> "
3754 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
3759 #: ../src/guestfs-actions.pod:23
3761 "If you just want to add an ISO file (often you use this as an efficient way "
3762 "to transfer large files into the guest), then you should probably use "
3763 "C<guestfs_add_drive_ro> instead."
3767 #: ../src/guestfs-actions.pod:29 ../src/guestfs-actions.pod:54 ../src/guestfs-actions.pod:112 ../src/guestfs-actions.pod:144 ../src/guestfs-actions.pod:155 ../src/guestfs-actions.pod:173 ../src/guestfs-actions.pod:190 ../src/guestfs-actions.pod:201 ../src/guestfs-actions.pod:304 ../src/guestfs-actions.pod:321 ../src/guestfs-actions.pod:332 ../src/guestfs-actions.pod:368 ../src/guestfs-actions.pod:390 ../src/guestfs-actions.pod:405 ../src/guestfs-actions.pod:469 ../src/guestfs-actions.pod:496 ../src/guestfs-actions.pod:507 ../src/guestfs-actions.pod:519 ../src/guestfs-actions.pod:600 ../src/guestfs-actions.pod:615 ../src/guestfs-actions.pod:626 ../src/guestfs-actions.pod:637 ../src/guestfs-actions.pod:783 ../src/guestfs-actions.pod:800 ../src/guestfs-actions.pod:815 ../src/guestfs-actions.pod:890 ../src/guestfs-actions.pod:905 ../src/guestfs-actions.pod:921 ../src/guestfs-actions.pod:932 ../src/guestfs-actions.pod:949 ../src/guestfs-actions.pod:982 ../src/guestfs-actions.pod:1040 ../src/guestfs-actions.pod:1068 ../src/guestfs-actions.pod:1090 ../src/guestfs-actions.pod:1121 ../src/guestfs-actions.pod:1209 ../src/guestfs-actions.pod:1240 ../src/guestfs-actions.pod:1440 ../src/guestfs-actions.pod:1459 ../src/guestfs-actions.pod:1540 ../src/guestfs-actions.pod:1888 ../src/guestfs-actions.pod:2011 ../src/guestfs-actions.pod:2066 ../src/guestfs-actions.pod:2096 ../src/guestfs-actions.pod:2505 ../src/guestfs-actions.pod:2517 ../src/guestfs-actions.pod:2534 ../src/guestfs-actions.pod:2642 ../src/guestfs-actions.pod:2653 ../src/guestfs-actions.pod:2663 ../src/guestfs-actions.pod:2674 ../src/guestfs-actions.pod:2686 ../src/guestfs-actions.pod:2716 ../src/guestfs-actions.pod:2780 ../src/guestfs-actions.pod:2797 ../src/guestfs-actions.pod:2811 ../src/guestfs-actions.pod:2831 ../src/guestfs-actions.pod:2851 ../src/guestfs-actions.pod:2880 ../src/guestfs-actions.pod:2896 ../src/guestfs-actions.pod:2912 ../src/guestfs-actions.pod:2941 ../src/guestfs-actions.pod:2950 ../src/guestfs-actions.pod:2983 ../src/guestfs-actions.pod:2996 ../src/guestfs-actions.pod:3006 ../src/guestfs-actions.pod:3018 ../src/guestfs-actions.pod:3032 ../src/guestfs-actions.pod:3112 ../src/guestfs-actions.pod:3129 ../src/guestfs-actions.pod:3139 ../src/guestfs-actions.pod:3184 ../src/guestfs-actions.pod:3199 ../src/guestfs-actions.pod:3214 ../src/guestfs-actions.pod:3227 ../src/guestfs-actions.pod:3238 ../src/guestfs-actions.pod:3249 ../src/guestfs-actions.pod:3263 ../src/guestfs-actions.pod:3275 ../src/guestfs-actions.pod:3292 ../src/guestfs-actions.pod:3338 ../src/guestfs-actions.pod:3366 ../src/guestfs-actions.pod:3382 ../src/guestfs-actions.pod:3398 ../src/guestfs-actions.pod:3407 ../src/guestfs-actions.pod:3421 ../src/guestfs-actions.pod:3431 ../src/guestfs-actions.pod:3443 ../src/guestfs-actions.pod:3455 ../src/guestfs-actions.pod:3487 ../src/guestfs-actions.pod:3499 ../src/guestfs-actions.pod:3516 ../src/guestfs-actions.pod:3527 ../src/guestfs-actions.pod:3541 ../src/guestfs-actions.pod:3581 ../src/guestfs-actions.pod:3612 ../src/guestfs-actions.pod:3623 ../src/guestfs-actions.pod:3648 ../src/guestfs-actions.pod:3662 ../src/guestfs-actions.pod:3677 ../src/guestfs-actions.pod:3799 ../src/guestfs-actions.pod:3851 ../src/guestfs-actions.pod:3870 ../src/guestfs-actions.pod:3885 ../src/guestfs-actions.pod:3911 ../src/guestfs-actions.pod:3968 ../src/guestfs-actions.pod:3982 ../src/guestfs-actions.pod:3992 ../src/guestfs-actions.pod:4003 ../src/guestfs-actions.pod:4258 ../src/guestfs-actions.pod:4274 ../src/guestfs-actions.pod:4285 ../src/guestfs-actions.pod:4294 ../src/guestfs-actions.pod:4305 ../src/guestfs-actions.pod:4314 ../src/guestfs-actions.pod:4325 ../src/guestfs-actions.pod:4338 ../src/guestfs-actions.pod:4356 ../src/guestfs-actions.pod:4372 ../src/guestfs-actions.pod:4388 ../src/guestfs-actions.pod:4403 ../src/guestfs-actions.pod:4423 ../src/guestfs-actions.pod:4438 ../src/guestfs-actions.pod:4454 ../src/guestfs-actions.pod:4472 ../src/guestfs-actions.pod:4488 ../src/guestfs-actions.pod:4502 ../src/guestfs-actions.pod:4527 ../src/guestfs-actions.pod:4548 ../src/guestfs-actions.pod:4564 ../src/guestfs-actions.pod:4585 ../src/guestfs-actions.pod:4597 ../src/guestfs-actions.pod:4609 ../src/guestfs-actions.pod:4625 ../src/guestfs-actions.pod:4659 ../src/guestfs-actions.pod:4679 ../src/guestfs-actions.pod:4702 ../src/guestfs-actions.pod:4792 ../src/guestfs-actions.pod:4898 ../src/guestfs-actions.pod:4907 ../src/guestfs-actions.pod:4917 ../src/guestfs-actions.pod:4927 ../src/guestfs-actions.pod:4946 ../src/guestfs-actions.pod:4956 ../src/guestfs-actions.pod:4966 ../src/guestfs-actions.pod:4976 ../src/guestfs-actions.pod:4988 ../src/guestfs-actions.pod:5038 ../src/guestfs-actions.pod:5052 ../src/guestfs-actions.pod:5065 ../src/guestfs-actions.pod:5078 ../src/guestfs-actions.pod:5092 ../src/guestfs-actions.pod:5102 ../src/guestfs-actions.pod:5119 ../src/guestfs-actions.pod:5149 ../src/guestfs-actions.pod:5160 ../src/guestfs-actions.pod:5195 ../src/guestfs-actions.pod:5205 ../src/guestfs-actions.pod:5220 ../src/guestfs-actions.pod:5246 ../src/guestfs-actions.pod:5274 ../src/guestfs-actions.pod:5378 ../src/guestfs-actions.pod:5393 ../src/guestfs-actions.pod:5404 ../src/guestfs-actions.pod:5450 ../src/guestfs-actions.pod:5460 ../src/guestfs-actions.pod:5497 ../src/guestfs-actions.pod:5524 ../src/guestfs-actions.pod:5566 ../src/guestfs-actions.pod:5589 ../src/guestfs-actions.pod:5646 ../src/guestfs-actions.pod:5662 ../src/guestfs-actions.pod:5688
3768 msgid "This function returns 0 on success or -1 on error."
3772 #: ../src/guestfs-actions.pod:31 ../src/guestfs-actions.pod:157 ../src/guestfs-actions.pod:175 ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:117 ../fish/guestfish-actions.pod:131
3774 "This function is deprecated. In new code, use the C<add_drive_opts> call "
3779 #: ../src/guestfs-actions.pod:34 ../src/guestfs-actions.pod:160 ../src/guestfs-actions.pod:178 ../src/guestfs-actions.pod:1214 ../src/guestfs-actions.pod:1649 ../src/guestfs-actions.pod:1667 ../src/guestfs-actions.pod:5597 ../src/guestfs-actions.pod:5742 ../fish/guestfish-actions.pod:31 ../fish/guestfish-actions.pod:120 ../fish/guestfish-actions.pod:134 ../fish/guestfish-actions.pod:940 ../fish/guestfish-actions.pod:1297 ../fish/guestfish-actions.pod:1311 ../fish/guestfish-actions.pod:4317 ../fish/guestfish-actions.pod:4414
3781 "Deprecated functions will not be removed from the API, but the fact that "
3782 "they are deprecated indicates that there are problems with correct use of "
3787 #: ../src/guestfs-actions.pod:38
3788 msgid "guestfs_add_drive"
3792 #: ../src/guestfs-actions.pod:40
3795 " int guestfs_add_drive (guestfs_h *g,\n"
3796 "\t\tconst char *filename);\n"
3801 #: ../src/guestfs-actions.pod:43
3803 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
3804 "optional parameters, so the disk is added writable, with the format being "
3805 "detected automatically."
3809 #: ../src/guestfs-actions.pod:47
3811 "Automatic detection of the format opens you up to a potential security hole "
3812 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
3813 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
3814 "you should think about replacing calls to this function with calls to "
3815 "C<guestfs_add_drive_opts>, and specifying the format."
3819 #: ../src/guestfs-actions.pod:56
3820 msgid "guestfs_add_drive_opts"
3824 #: ../src/guestfs-actions.pod:58
3827 " int guestfs_add_drive_opts (guestfs_h *g,\n"
3828 "\t\tconst char *filename,\n"
3834 #: ../src/guestfs-actions.pod:62
3836 "You may supply a list of optional arguments to this call. Use zero or more "
3837 "of the following pairs of parameters, and terminate the list with C<-1> on "
3838 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
3842 #: ../src/guestfs-actions.pod:67
3845 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
3846 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
3847 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
3852 #: ../src/guestfs-actions.pod:71 ../fish/guestfish-actions.pod:56
3854 "This function adds a virtual machine disk image C<filename> to libguestfs. "
3855 "The first time you call this function, the disk appears as C</dev/sda>, the "
3856 "second time as C</dev/sdb>, and so on."
3860 #: ../src/guestfs-actions.pod:76 ../fish/guestfish-actions.pod:61
3862 "You don't necessarily need to be root when using libguestfs. However you "
3863 "obviously do need sufficient permissions to access the filename for whatever "
3864 "operations you want to perform (ie. read access if you just want to read the "
3865 "image or write access if you want to modify the image)."
3869 #: ../src/guestfs-actions.pod:82 ../fish/guestfish-actions.pod:67
3870 msgid "This call checks that C<filename> exists."
3874 #: ../src/guestfs-actions.pod:84 ../fish/guestfish-actions.pod:69
3875 msgid "The optional arguments are:"
3879 #: ../src/guestfs-actions.pod:88 ../fish/guestfish-actions.pod:73
3884 #: ../src/guestfs-actions.pod:90 ../fish/guestfish-actions.pod:75
3886 "If true then the image is treated as read-only. Writes are still allowed, "
3887 "but they are stored in a temporary snapshot overlay which is discarded at "
3888 "the end. The disk that you add is not modified."
3892 #: ../src/guestfs-actions.pod:94 ../fish/guestfish-actions.pod:79
3897 #: ../src/guestfs-actions.pod:96
3899 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
3900 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
3901 "Possible formats include C<raw> and C<qcow2>."
3905 #: ../src/guestfs-actions.pod:100 ../fish/guestfish-actions.pod:85
3907 "Automatic detection of the format opens you up to a potential security hole "
3908 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
3909 "RHBZ#642934. Specifying the format closes this security hole."
3913 #: ../src/guestfs-actions.pod:105 ../fish/guestfish-actions.pod:90
3918 #: ../src/guestfs-actions.pod:107
3920 "This rarely-used option lets you emulate the behaviour of the deprecated "
3921 "C<guestfs_add_drive_with_if> call (q.v.)"
3925 #: ../src/guestfs-actions.pod:114
3926 msgid "guestfs_add_drive_opts_va"
3930 #: ../src/guestfs-actions.pod:116
3933 " int guestfs_add_drive_opts_va (guestfs_h *g,\n"
3934 "\t\tconst char *filename,\n"
3935 "\t\tva_list args);\n"
3940 #: ../src/guestfs-actions.pod:120
3941 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
3945 #: ../src/guestfs-actions.pod:122 ../src/guestfs-actions.pod:132
3946 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
3950 #: ../src/guestfs-actions.pod:124
3951 msgid "guestfs_add_drive_opts_argv"
3955 #: ../src/guestfs-actions.pod:126
3958 " int guestfs_add_drive_opts_argv (guestfs_h *g,\n"
3959 "\t\tconst char *filename,\n"
3960 "\t\tconst struct guestfs_add_drive_opts_argv *optargs);\n"
3965 #: ../src/guestfs-actions.pod:130
3966 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
3970 #: ../src/guestfs-actions.pod:134
3971 msgid "guestfs_add_drive_ro"
3975 #: ../src/guestfs-actions.pod:136
3978 " int guestfs_add_drive_ro (guestfs_h *g,\n"
3979 "\t\tconst char *filename);\n"
3984 #: ../src/guestfs-actions.pod:139
3986 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
3987 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
3988 "disk is added read-only, with the format being detected automatically."
3992 #: ../src/guestfs-actions.pod:146
3993 msgid "guestfs_add_drive_ro_with_if"
3997 #: ../src/guestfs-actions.pod:148
4000 " int guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
4001 "\t\tconst char *filename,\n"
4002 "\t\tconst char *iface);\n"
4007 #: ../src/guestfs-actions.pod:152
4009 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
4010 "QEMU interface emulation to use at run time."
4014 #: ../src/guestfs-actions.pod:164
4015 msgid "guestfs_add_drive_with_if"
4019 #: ../src/guestfs-actions.pod:166
4022 " int guestfs_add_drive_with_if (guestfs_h *g,\n"
4023 "\t\tconst char *filename,\n"
4024 "\t\tconst char *iface);\n"
4029 #: ../src/guestfs-actions.pod:170
4031 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
4032 "QEMU interface emulation to use at run time."
4036 #: ../src/guestfs-actions.pod:182
4037 msgid "guestfs_aug_clear"
4041 #: ../src/guestfs-actions.pod:184
4044 " int guestfs_aug_clear (guestfs_h *g,\n"
4045 "\t\tconst char *augpath);\n"
4050 #: ../src/guestfs-actions.pod:187 ../fish/guestfish-actions.pod:142
4052 "Set the value associated with C<path> to C<NULL>. This is the same as the "
4053 "L<augtool(1)> C<clear> command."
4057 #: ../src/guestfs-actions.pod:192
4058 msgid "guestfs_aug_close"
4062 #: ../src/guestfs-actions.pod:194
4065 " int guestfs_aug_close (guestfs_h *g);\n"
4070 #: ../src/guestfs-actions.pod:196
4072 "Close the current Augeas handle and free up any resources used by it. After "
4073 "calling this, you have to call C<guestfs_aug_init> again before you can use "
4074 "any other Augeas functions."
4078 #: ../src/guestfs-actions.pod:203
4079 msgid "guestfs_aug_defnode"
4083 #: ../src/guestfs-actions.pod:205
4086 " struct guestfs_int_bool *guestfs_aug_defnode (guestfs_h *g,\n"
4087 "\t\tconst char *name,\n"
4088 "\t\tconst char *expr,\n"
4089 "\t\tconst char *val);\n"
4094 #: ../src/guestfs-actions.pod:210 ../fish/guestfish-actions.pod:158
4095 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
4099 #: ../src/guestfs-actions.pod:213
4101 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
4102 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
4103 "containing that single node."
4107 #: ../src/guestfs-actions.pod:217 ../fish/guestfish-actions.pod:165
4109 "On success this returns a pair containing the number of nodes in the "
4110 "nodeset, and a boolean flag if a node was created."
4114 #: ../src/guestfs-actions.pod:221
4116 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
4117 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
4121 #: ../src/guestfs-actions.pod:225
4122 msgid "guestfs_aug_defvar"
4126 #: ../src/guestfs-actions.pod:227
4129 " int guestfs_aug_defvar (guestfs_h *g,\n"
4130 "\t\tconst char *name,\n"
4131 "\t\tconst char *expr);\n"
4136 #: ../src/guestfs-actions.pod:231 ../fish/guestfish-actions.pod:173
4138 "Defines an Augeas variable C<name> whose value is the result of evaluating "
4139 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
4143 #: ../src/guestfs-actions.pod:235 ../fish/guestfish-actions.pod:177
4145 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
4146 "evaluates to something which is not a nodeset."
4150 #: ../src/guestfs-actions.pod:238 ../src/guestfs-actions.pod:379 ../src/guestfs-actions.pod:533 ../src/guestfs-actions.pod:558 ../src/guestfs-actions.pod:573 ../src/guestfs-actions.pod:589 ../src/guestfs-actions.pod:1107 ../src/guestfs-actions.pod:1422 ../src/guestfs-actions.pod:1604 ../src/guestfs-actions.pod:1685 ../src/guestfs-actions.pod:1716 ../src/guestfs-actions.pod:1759 ../src/guestfs-actions.pod:1776 ../src/guestfs-actions.pod:2001 ../src/guestfs-actions.pod:2213 ../src/guestfs-actions.pod:2231 ../src/guestfs-actions.pod:3601 ../src/guestfs-actions.pod:3708 ../src/guestfs-actions.pod:4062 ../src/guestfs-actions.pod:4085 ../src/guestfs-actions.pod:5184 ../src/guestfs-actions.pod:5534 ../src/guestfs-actions.pod:5544 ../src/guestfs-actions.pod:5554
4151 msgid "On error this function returns -1."
4155 #: ../src/guestfs-actions.pod:240
4156 msgid "guestfs_aug_get"
4160 #: ../src/guestfs-actions.pod:242
4163 " char *guestfs_aug_get (guestfs_h *g,\n"
4164 "\t\tconst char *augpath);\n"
4169 #: ../src/guestfs-actions.pod:245 ../fish/guestfish-actions.pod:184
4171 "Look up the value associated with C<path>. If C<path> matches exactly one "
4172 "node, the C<value> is returned."
4176 #: ../src/guestfs-actions.pod:248 ../src/guestfs-actions.pod:676 ../src/guestfs-actions.pod:691 ../src/guestfs-actions.pod:748 ../src/guestfs-actions.pod:761 ../src/guestfs-actions.pod:852 ../src/guestfs-actions.pod:965 ../src/guestfs-actions.pod:994 ../src/guestfs-actions.pod:1008 ../src/guestfs-actions.pod:1024 ../src/guestfs-actions.pod:1135 ../src/guestfs-actions.pod:1299 ../src/guestfs-actions.pod:1408 ../src/guestfs-actions.pod:1553 ../src/guestfs-actions.pod:1567 ../src/guestfs-actions.pod:1643 ../src/guestfs-actions.pod:1661 ../src/guestfs-actions.pod:1795 ../src/guestfs-actions.pod:1934 ../src/guestfs-actions.pod:2115 ../src/guestfs-actions.pod:2165 ../src/guestfs-actions.pod:2281 ../src/guestfs-actions.pod:2316 ../src/guestfs-actions.pod:2631 ../src/guestfs-actions.pod:2928 ../src/guestfs-actions.pod:3069 ../src/guestfs-actions.pod:3165 ../src/guestfs-actions.pod:3723 ../src/guestfs-actions.pod:3899 ../src/guestfs-actions.pod:4040 ../src/guestfs-actions.pod:4201 ../src/guestfs-actions.pod:4244 ../src/guestfs-actions.pod:4720 ../src/guestfs-actions.pod:4733 ../src/guestfs-actions.pod:4747 ../src/guestfs-actions.pod:4768 ../src/guestfs-actions.pod:5327 ../src/guestfs-actions.pod:5343 ../src/guestfs-actions.pod:5358 ../src/guestfs-actions.pod:5506 ../src/guestfs-actions.pod:5736
4178 "This function returns a string, or NULL on error. I<The caller must free "
4179 "the returned string after use>."
4183 #: ../src/guestfs-actions.pod:251
4184 msgid "guestfs_aug_init"
4188 #: ../src/guestfs-actions.pod:253
4191 " int guestfs_aug_init (guestfs_h *g,\n"
4192 "\t\tconst char *root,\n"
4198 #: ../src/guestfs-actions.pod:257 ../fish/guestfish-actions.pod:191
4200 "Create a new Augeas handle for editing configuration files. If there was "
4201 "any previous Augeas handle associated with this guestfs session, then it is "
4206 #: ../src/guestfs-actions.pod:261
4207 msgid "You must call this before using any other C<guestfs_aug_*> commands."
4211 #: ../src/guestfs-actions.pod:264 ../fish/guestfish-actions.pod:198
4212 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
4216 #: ../src/guestfs-actions.pod:267 ../fish/guestfish-actions.pod:201
4218 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
4219 "logical I<or> of the following integers:"
4223 #: ../src/guestfs-actions.pod:273 ../fish/guestfish-actions.pod:207
4224 msgid "C<AUG_SAVE_BACKUP> = 1"
4228 #: ../src/guestfs-actions.pod:275 ../fish/guestfish-actions.pod:209
4229 msgid "Keep the original file with a C<.augsave> extension."
4233 #: ../src/guestfs-actions.pod:277 ../fish/guestfish-actions.pod:211
4234 msgid "C<AUG_SAVE_NEWFILE> = 2"
4238 #: ../src/guestfs-actions.pod:279 ../fish/guestfish-actions.pod:213
4240 "Save changes into a file with extension C<.augnew>, and do not overwrite "
4241 "original. Overrides C<AUG_SAVE_BACKUP>."
4245 #: ../src/guestfs-actions.pod:282 ../fish/guestfish-actions.pod:216
4246 msgid "C<AUG_TYPE_CHECK> = 4"
4250 #: ../src/guestfs-actions.pod:284 ../fish/guestfish-actions.pod:218
4251 msgid "Typecheck lenses (can be expensive)."
4255 #: ../src/guestfs-actions.pod:286 ../fish/guestfish-actions.pod:220
4256 msgid "C<AUG_NO_STDINC> = 8"
4260 #: ../src/guestfs-actions.pod:288 ../fish/guestfish-actions.pod:222
4261 msgid "Do not use standard load path for modules."
4265 #: ../src/guestfs-actions.pod:290 ../fish/guestfish-actions.pod:224
4266 msgid "C<AUG_SAVE_NOOP> = 16"
4270 #: ../src/guestfs-actions.pod:292 ../fish/guestfish-actions.pod:226
4271 msgid "Make save a no-op, just record what would have been changed."
4275 #: ../src/guestfs-actions.pod:294 ../fish/guestfish-actions.pod:228
4276 msgid "C<AUG_NO_LOAD> = 32"
4280 #: ../src/guestfs-actions.pod:296
4281 msgid "Do not load the tree in C<guestfs_aug_init>."
4285 #: ../src/guestfs-actions.pod:300
4286 msgid "To close the handle, you can call C<guestfs_aug_close>."
4290 #: ../src/guestfs-actions.pod:302 ../fish/guestfish-actions.pod:236
4291 msgid "To find out more about Augeas, see L<http://augeas.net/>."
4295 #: ../src/guestfs-actions.pod:306
4296 msgid "guestfs_aug_insert"
4300 #: ../src/guestfs-actions.pod:308
4303 " int guestfs_aug_insert (guestfs_h *g,\n"
4304 "\t\tconst char *augpath,\n"
4305 "\t\tconst char *label,\n"
4306 "\t\tint before);\n"
4311 #: ../src/guestfs-actions.pod:313 ../fish/guestfish-actions.pod:242
4313 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
4314 "or after C<path> (depending on the boolean flag C<before>)."
4318 #: ../src/guestfs-actions.pod:317 ../fish/guestfish-actions.pod:246
4320 "C<path> must match exactly one existing node in the tree, and C<label> must "
4321 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
4325 #: ../src/guestfs-actions.pod:323
4326 msgid "guestfs_aug_load"
4330 #: ../src/guestfs-actions.pod:325
4333 " int guestfs_aug_load (guestfs_h *g);\n"
4338 #: ../src/guestfs-actions.pod:327 ../fish/guestfish-actions.pod:254
4339 msgid "Load files into the tree."
4343 #: ../src/guestfs-actions.pod:329 ../fish/guestfish-actions.pod:256
4344 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
4348 #: ../src/guestfs-actions.pod:334
4349 msgid "guestfs_aug_ls"
4353 #: ../src/guestfs-actions.pod:336
4356 " char **guestfs_aug_ls (guestfs_h *g,\n"
4357 "\t\tconst char *augpath);\n"
4362 #: ../src/guestfs-actions.pod:339
4364 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
4365 "sorting the resulting nodes into alphabetical order."
4369 #: ../src/guestfs-actions.pod:342 ../src/guestfs-actions.pod:355 ../src/guestfs-actions.pod:483 ../src/guestfs-actions.pod:868 ../src/guestfs-actions.pod:1147 ../src/guestfs-actions.pod:1163 ../src/guestfs-actions.pod:1251 ../src/guestfs-actions.pod:1267 ../src/guestfs-actions.pod:1498 ../src/guestfs-actions.pod:1832 ../src/guestfs-actions.pod:1845 ../src/guestfs-actions.pod:1861 ../src/guestfs-actions.pod:1898 ../src/guestfs-actions.pod:1919 ../src/guestfs-actions.pod:1981 ../src/guestfs-actions.pod:2021 ../src/guestfs-actions.pod:2187 ../src/guestfs-actions.pod:2355 ../src/guestfs-actions.pod:2560 ../src/guestfs-actions.pod:2616 ../src/guestfs-actions.pod:2700 ../src/guestfs-actions.pod:3046 ../src/guestfs-actions.pod:3568 ../src/guestfs-actions.pod:4017 ../src/guestfs-actions.pod:4126 ../src/guestfs-actions.pod:4232 ../src/guestfs-actions.pod:4781 ../src/guestfs-actions.pod:4830 ../src/guestfs-actions.pod:4882 ../src/guestfs-actions.pod:4998 ../src/guestfs-actions.pod:5019 ../src/guestfs-actions.pod:5419 ../src/guestfs-actions.pod:5436 ../src/guestfs-actions.pod:5474 ../src/guestfs-actions.pod:5610 ../src/guestfs-actions.pod:5626 ../src/guestfs-actions.pod:5699 ../src/guestfs-actions.pod:5715 ../src/guestfs-actions.pod:5755 ../src/guestfs-actions.pod:5771
4371 "This function returns a NULL-terminated array of strings (like "
4372 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
4373 "strings and the array after use>."
4377 #: ../src/guestfs-actions.pod:346
4378 msgid "guestfs_aug_match"
4382 #: ../src/guestfs-actions.pod:348
4385 " char **guestfs_aug_match (guestfs_h *g,\n"
4386 "\t\tconst char *augpath);\n"
4391 #: ../src/guestfs-actions.pod:351 ../fish/guestfish-actions.pod:270
4393 "Returns a list of paths which match the path expression C<path>. The "
4394 "returned paths are sufficiently qualified so that they match exactly one "
4395 "node in the current tree."
4399 #: ../src/guestfs-actions.pod:359
4400 msgid "guestfs_aug_mv"
4404 #: ../src/guestfs-actions.pod:361
4407 " int guestfs_aug_mv (guestfs_h *g,\n"
4408 "\t\tconst char *src,\n"
4409 "\t\tconst char *dest);\n"
4414 #: ../src/guestfs-actions.pod:365 ../fish/guestfish-actions.pod:278
4416 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
4417 "C<dest> is overwritten if it exists."
4421 #: ../src/guestfs-actions.pod:370
4422 msgid "guestfs_aug_rm"
4426 #: ../src/guestfs-actions.pod:372
4429 " int guestfs_aug_rm (guestfs_h *g,\n"
4430 "\t\tconst char *augpath);\n"
4435 #: ../src/guestfs-actions.pod:375 ../fish/guestfish-actions.pod:285
4436 msgid "Remove C<path> and all of its children."
4440 #: ../src/guestfs-actions.pod:377 ../fish/guestfish-actions.pod:287
4441 msgid "On success this returns the number of entries which were removed."
4445 #: ../src/guestfs-actions.pod:381
4446 msgid "guestfs_aug_save"
4450 #: ../src/guestfs-actions.pod:383
4453 " int guestfs_aug_save (guestfs_h *g);\n"
4458 #: ../src/guestfs-actions.pod:385 ../fish/guestfish-actions.pod:293
4459 msgid "This writes all pending changes to disk."
4463 #: ../src/guestfs-actions.pod:387
4465 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
4470 #: ../src/guestfs-actions.pod:392
4471 msgid "guestfs_aug_set"
4475 #: ../src/guestfs-actions.pod:394
4478 " int guestfs_aug_set (guestfs_h *g,\n"
4479 "\t\tconst char *augpath,\n"
4480 "\t\tconst char *val);\n"
4485 #: ../src/guestfs-actions.pod:398 ../fish/guestfish-actions.pod:302
4486 msgid "Set the value associated with C<path> to C<val>."
4490 #: ../src/guestfs-actions.pod:400
4492 "In the Augeas API, it is possible to clear a node by setting the value to "
4493 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
4494 "this call. Instead you must use the C<guestfs_aug_clear> call."
4498 #: ../src/guestfs-actions.pod:407
4499 msgid "guestfs_available"
4503 #: ../src/guestfs-actions.pod:409
4506 " int guestfs_available (guestfs_h *g,\n"
4507 "\t\tchar *const *groups);\n"
4512 #: ../src/guestfs-actions.pod:412 ../fish/guestfish-actions.pod:313
4514 "This command is used to check the availability of some groups of "
4515 "functionality in the appliance, which not all builds of the libguestfs "
4516 "appliance will be able to provide."
4520 #: ../src/guestfs-actions.pod:416
4522 "The libguestfs groups, and the functions that those groups correspond to, "
4523 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
4524 "runtime by calling C<guestfs_available_all_groups>."
4528 #: ../src/guestfs-actions.pod:421 ../fish/guestfish-actions.pod:322
4530 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
4531 "\"augeas\"]> would check for the availability of the Linux inotify functions "
4532 "and Augeas (configuration file editing) functions."
4536 #: ../src/guestfs-actions.pod:426 ../fish/guestfish-actions.pod:327
4537 msgid "The command returns no error if I<all> requested groups are available."
4541 #: ../src/guestfs-actions.pod:428 ../fish/guestfish-actions.pod:329
4543 "It fails with an error if one or more of the requested groups is unavailable "
4548 #: ../src/guestfs-actions.pod:431 ../fish/guestfish-actions.pod:332
4550 "If an unknown group name is included in the list of groups then an error is "
4555 #: ../src/guestfs-actions.pod:434 ../fish/guestfish-actions.pod:335
4560 #: ../src/guestfs-actions.pod:440
4561 msgid "You must call C<guestfs_launch> before calling this function."
4565 #: ../src/guestfs-actions.pod:442 ../fish/guestfish-actions.pod:343
4567 "The reason is because we don't know what groups are supported by the "
4568 "appliance/daemon until it is running and can be queried."
4572 #: ../src/guestfs-actions.pod:448 ../fish/guestfish-actions.pod:349
4574 "If a group of functions is available, this does not necessarily mean that "
4575 "they will work. You still have to check for errors when calling individual "
4576 "API functions even if they are available."
4580 #: ../src/guestfs-actions.pod:455 ../fish/guestfish-actions.pod:356
4582 "It is usually the job of distro packagers to build complete functionality "
4583 "into the libguestfs appliance. Upstream libguestfs, if built from source "
4584 "with all requirements satisfied, will support everything."
4588 #: ../src/guestfs-actions.pod:462
4590 "This call was added in version C<1.0.80>. In previous versions of "
4591 "libguestfs all you could do would be to speculatively execute a command to "
4592 "find out if the daemon implemented it. See also C<guestfs_version>."
4596 #: ../src/guestfs-actions.pod:471
4597 msgid "guestfs_available_all_groups"
4601 #: ../src/guestfs-actions.pod:473
4604 " char **guestfs_available_all_groups (guestfs_h *g);\n"
4609 #: ../src/guestfs-actions.pod:475
4611 "This command returns a list of all optional groups that this daemon knows "
4612 "about. Note this returns both supported and unsupported groups. To find "
4613 "out which ones the daemon can actually support you have to call "
4614 "C<guestfs_available> on each member of the returned list."
4618 #: ../src/guestfs-actions.pod:481
4619 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
4623 #: ../src/guestfs-actions.pod:487
4624 msgid "guestfs_base64_in"
4628 #: ../src/guestfs-actions.pod:489
4631 " int guestfs_base64_in (guestfs_h *g,\n"
4632 "\t\tconst char *base64file,\n"
4633 "\t\tconst char *filename);\n"
4638 #: ../src/guestfs-actions.pod:493 ../fish/guestfish-actions.pod:386
4639 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
4643 #: ../src/guestfs-actions.pod:498
4644 msgid "guestfs_base64_out"
4648 #: ../src/guestfs-actions.pod:500
4651 " int guestfs_base64_out (guestfs_h *g,\n"
4652 "\t\tconst char *filename,\n"
4653 "\t\tconst char *base64file);\n"
4658 #: ../src/guestfs-actions.pod:504 ../fish/guestfish-actions.pod:395
4660 "This command downloads the contents of C<filename>, writing it out to local "
4661 "file C<base64file> encoded as base64."
4665 #: ../src/guestfs-actions.pod:509
4666 msgid "guestfs_blockdev_flushbufs"
4670 #: ../src/guestfs-actions.pod:511
4673 " int guestfs_blockdev_flushbufs (guestfs_h *g,\n"
4674 "\t\tconst char *device);\n"
4679 #: ../src/guestfs-actions.pod:514 ../fish/guestfish-actions.pod:404
4680 msgid "This tells the kernel to flush internal buffers associated with C<device>."
4684 #: ../src/guestfs-actions.pod:517 ../src/guestfs-actions.pod:531 ../src/guestfs-actions.pod:543 ../src/guestfs-actions.pod:556 ../src/guestfs-actions.pod:571 ../src/guestfs-actions.pod:587 ../src/guestfs-actions.pod:598 ../src/guestfs-actions.pod:613 ../src/guestfs-actions.pod:624 ../src/guestfs-actions.pod:635 ../fish/guestfish-actions.pod:407 ../fish/guestfish-actions.pod:418 ../fish/guestfish-actions.pod:427 ../fish/guestfish-actions.pod:437 ../fish/guestfish-actions.pod:449 ../fish/guestfish-actions.pod:462 ../fish/guestfish-actions.pod:470 ../fish/guestfish-actions.pod:481 ../fish/guestfish-actions.pod:489 ../fish/guestfish-actions.pod:497
4685 msgid "This uses the L<blockdev(8)> command."
4689 #: ../src/guestfs-actions.pod:521
4690 msgid "guestfs_blockdev_getbsz"
4694 #: ../src/guestfs-actions.pod:523
4697 " int guestfs_blockdev_getbsz (guestfs_h *g,\n"
4698 "\t\tconst char *device);\n"
4703 #: ../src/guestfs-actions.pod:526 ../fish/guestfish-actions.pod:413
4704 msgid "This returns the block size of a device."
4708 #: ../src/guestfs-actions.pod:528 ../src/guestfs-actions.pod:610 ../fish/guestfish-actions.pod:415 ../fish/guestfish-actions.pod:478
4710 "(Note this is different from both I<size in blocks> and I<filesystem block "
4715 #: ../src/guestfs-actions.pod:535
4716 msgid "guestfs_blockdev_getro"
4720 #: ../src/guestfs-actions.pod:537
4723 " int guestfs_blockdev_getro (guestfs_h *g,\n"
4724 "\t\tconst char *device);\n"
4729 #: ../src/guestfs-actions.pod:540 ../fish/guestfish-actions.pod:424
4731 "Returns a boolean indicating if the block device is read-only (true if "
4732 "read-only, false if not)."
4736 #: ../src/guestfs-actions.pod:545 ../src/guestfs-actions.pod:1181 ../src/guestfs-actions.pod:1193 ../src/guestfs-actions.pod:1625 ../src/guestfs-actions.pod:1633 ../src/guestfs-actions.pod:1693 ../src/guestfs-actions.pod:1736 ../src/guestfs-actions.pod:1748 ../src/guestfs-actions.pod:1767 ../src/guestfs-actions.pod:1784 ../src/guestfs-actions.pod:2369 ../src/guestfs-actions.pod:2380 ../src/guestfs-actions.pod:2392 ../src/guestfs-actions.pod:2403 ../src/guestfs-actions.pod:2416 ../src/guestfs-actions.pod:2428 ../src/guestfs-actions.pod:2441 ../src/guestfs-actions.pod:2452 ../src/guestfs-actions.pod:2462 ../src/guestfs-actions.pod:2473 ../src/guestfs-actions.pod:2485 ../src/guestfs-actions.pod:2497 ../src/guestfs-actions.pod:3693
4737 msgid "This function returns a C truth value on success or -1 on error."
4741 #: ../src/guestfs-actions.pod:547
4742 msgid "guestfs_blockdev_getsize64"
4746 #: ../src/guestfs-actions.pod:549
4749 " int64_t guestfs_blockdev_getsize64 (guestfs_h *g,\n"
4750 "\t\tconst char *device);\n"
4755 #: ../src/guestfs-actions.pod:552 ../fish/guestfish-actions.pod:433
4756 msgid "This returns the size of the device in bytes."
4760 #: ../src/guestfs-actions.pod:554
4761 msgid "See also C<guestfs_blockdev_getsz>."
4765 #: ../src/guestfs-actions.pod:560
4766 msgid "guestfs_blockdev_getss"
4770 #: ../src/guestfs-actions.pod:562
4773 " int guestfs_blockdev_getss (guestfs_h *g,\n"
4774 "\t\tconst char *device);\n"
4779 #: ../src/guestfs-actions.pod:565 ../fish/guestfish-actions.pod:443
4781 "This returns the size of sectors on a block device. Usually 512, but can be "
4782 "larger for modern devices."
4786 #: ../src/guestfs-actions.pod:568
4788 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
4793 #: ../src/guestfs-actions.pod:575
4794 msgid "guestfs_blockdev_getsz"
4798 #: ../src/guestfs-actions.pod:577
4801 " int64_t guestfs_blockdev_getsz (guestfs_h *g,\n"
4802 "\t\tconst char *device);\n"
4807 #: ../src/guestfs-actions.pod:580 ../fish/guestfish-actions.pod:455
4809 "This returns the size of the device in units of 512-byte sectors (even if "
4810 "the sectorsize isn't 512 bytes ... weird)."
4814 #: ../src/guestfs-actions.pod:583
4816 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
4817 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
4821 #: ../src/guestfs-actions.pod:591
4822 msgid "guestfs_blockdev_rereadpt"
4826 #: ../src/guestfs-actions.pod:593
4829 " int guestfs_blockdev_rereadpt (guestfs_h *g,\n"
4830 "\t\tconst char *device);\n"
4835 #: ../src/guestfs-actions.pod:596 ../fish/guestfish-actions.pod:468
4836 msgid "Reread the partition table on C<device>."
4840 #: ../src/guestfs-actions.pod:602
4841 msgid "guestfs_blockdev_setbsz"
4845 #: ../src/guestfs-actions.pod:604
4848 " int guestfs_blockdev_setbsz (guestfs_h *g,\n"
4849 "\t\tconst char *device,\n"
4850 "\t\tint blocksize);\n"
4855 #: ../src/guestfs-actions.pod:608 ../fish/guestfish-actions.pod:476
4856 msgid "This sets the block size of a device."
4860 #: ../src/guestfs-actions.pod:617
4861 msgid "guestfs_blockdev_setro"
4865 #: ../src/guestfs-actions.pod:619
4868 " int guestfs_blockdev_setro (guestfs_h *g,\n"
4869 "\t\tconst char *device);\n"
4874 #: ../src/guestfs-actions.pod:622 ../fish/guestfish-actions.pod:487
4875 msgid "Sets the block device named C<device> to read-only."
4879 #: ../src/guestfs-actions.pod:628
4880 msgid "guestfs_blockdev_setrw"
4884 #: ../src/guestfs-actions.pod:630
4887 " int guestfs_blockdev_setrw (guestfs_h *g,\n"
4888 "\t\tconst char *device);\n"
4893 #: ../src/guestfs-actions.pod:633 ../fish/guestfish-actions.pod:495
4894 msgid "Sets the block device named C<device> to read-write."
4898 #: ../src/guestfs-actions.pod:639
4899 msgid "guestfs_case_sensitive_path"
4903 #: ../src/guestfs-actions.pod:641
4906 " char *guestfs_case_sensitive_path (guestfs_h *g,\n"
4907 "\t\tconst char *path);\n"
4912 #: ../src/guestfs-actions.pod:644 ../fish/guestfish-actions.pod:503
4914 "This can be used to resolve case insensitive paths on a filesystem which is "
4915 "case sensitive. The use case is to resolve paths which you have read from "
4916 "Windows configuration files or the Windows Registry, to the true path."
4920 #: ../src/guestfs-actions.pod:649 ../fish/guestfish-actions.pod:508
4922 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
4923 "(and probably others), which is that although the underlying filesystem is "
4924 "case-insensitive, the driver exports the filesystem to Linux as "
4929 #: ../src/guestfs-actions.pod:654 ../fish/guestfish-actions.pod:513
4931 "One consequence of this is that special directories such as C<c:\\windows> "
4932 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
4933 "precise details of how they were created. In Windows itself this would not "
4938 #: ../src/guestfs-actions.pod:660 ../fish/guestfish-actions.pod:519
4940 "Bug or feature? You decide: "
4941 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
4945 #: ../src/guestfs-actions.pod:663 ../fish/guestfish-actions.pod:522
4947 "This function resolves the true case of each element in the path and returns "
4948 "the case-sensitive path."
4952 #: ../src/guestfs-actions.pod:666
4954 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
4955 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
4956 "how the directories were originally created under Windows)."
4960 #: ../src/guestfs-actions.pod:671 ../fish/guestfish-actions.pod:530
4961 msgid "I<Note>: This function does not handle drive names, backslashes etc."
4965 #: ../src/guestfs-actions.pod:674
4966 msgid "See also C<guestfs_realpath>."
4970 #: ../src/guestfs-actions.pod:679
4975 #: ../src/guestfs-actions.pod:681
4978 " char *guestfs_cat (guestfs_h *g,\n"
4979 "\t\tconst char *path);\n"
4984 #: ../src/guestfs-actions.pod:684 ../src/guestfs-actions.pod:4116 ../fish/guestfish-actions.pod:539 ../fish/guestfish-actions.pod:3161
4985 msgid "Return the contents of the file named C<path>."
4989 #: ../src/guestfs-actions.pod:686
4991 "Note that this function cannot correctly handle binary files (specifically, "
4992 "files containing C<\\0> character which is treated as end of string). For "
4993 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
4994 "functions which have a more complex interface."
4998 #: ../src/guestfs-actions.pod:694 ../src/guestfs-actions.pod:855 ../src/guestfs-actions.pod:872 ../src/guestfs-actions.pod:1151 ../src/guestfs-actions.pod:1167 ../src/guestfs-actions.pod:1255 ../src/guestfs-actions.pod:1271 ../src/guestfs-actions.pod:1502 ../src/guestfs-actions.pod:1849 ../src/guestfs-actions.pod:1865 ../src/guestfs-actions.pod:1902 ../src/guestfs-actions.pod:1923 ../src/guestfs-actions.pod:1937 ../src/guestfs-actions.pod:1963 ../src/guestfs-actions.pod:3933 ../src/guestfs-actions.pod:3956 ../src/guestfs-actions.pod:4064 ../src/guestfs-actions.pod:4087 ../src/guestfs-actions.pod:4108 ../src/guestfs-actions.pod:4834 ../src/guestfs-actions.pod:4886 ../src/guestfs-actions.pod:5002 ../src/guestfs-actions.pod:5023 ../src/guestfs-actions.pod:5568 ../src/guestfs-actions.pod:5591 ../src/guestfs-actions.pod:5614 ../src/guestfs-actions.pod:5630 ../src/guestfs-actions.pod:5703 ../src/guestfs-actions.pod:5719 ../src/guestfs-actions.pod:5759 ../src/guestfs-actions.pod:5775 ../fish/guestfish-actions.pod:546 ../fish/guestfish-actions.pod:681 ../fish/guestfish-actions.pod:693 ../fish/guestfish-actions.pod:894 ../fish/guestfish-actions.pod:904 ../fish/guestfish-actions.pod:971 ../fish/guestfish-actions.pod:981 ../fish/guestfish-actions.pod:1176 ../fish/guestfish-actions.pod:1451 ../fish/guestfish-actions.pod:1461 ../fish/guestfish-actions.pod:1489 ../fish/guestfish-actions.pod:1504 ../fish/guestfish-actions.pod:1514 ../fish/guestfish-actions.pod:1533 ../fish/guestfish-actions.pod:3031 ../fish/guestfish-actions.pod:3046 ../fish/guestfish-actions.pod:3122 ../fish/guestfish-actions.pod:3139 ../fish/guestfish-actions.pod:3154 ../fish/guestfish-actions.pod:3737 ../fish/guestfish-actions.pod:3783 ../fish/guestfish-actions.pod:3868 ../fish/guestfish-actions.pod:3883 ../fish/guestfish-actions.pod:4293 ../fish/guestfish-actions.pod:4311 ../fish/guestfish-actions.pod:4328 ../fish/guestfish-actions.pod:4338 ../fish/guestfish-actions.pod:4386 ../fish/guestfish-actions.pod:4396 ../fish/guestfish-actions.pod:4425 ../fish/guestfish-actions.pod:4435
5000 "Because of the message protocol, there is a transfer limit of somewhere "
5001 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
5005 #: ../src/guestfs-actions.pod:697
5006 msgid "guestfs_checksum"
5010 #: ../src/guestfs-actions.pod:699
5013 " char *guestfs_checksum (guestfs_h *g,\n"
5014 "\t\tconst char *csumtype,\n"
5015 "\t\tconst char *path);\n"
5020 #: ../src/guestfs-actions.pod:703 ../fish/guestfish-actions.pod:553
5021 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
5025 #: ../src/guestfs-actions.pod:706 ../fish/guestfish-actions.pod:556
5027 "The type of checksum to compute is given by the C<csumtype> parameter which "
5028 "must have one of the following values:"
5032 #: ../src/guestfs-actions.pod:711 ../fish/guestfish-actions.pod:561
5037 #: ../src/guestfs-actions.pod:713 ../fish/guestfish-actions.pod:563
5039 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
5044 #: ../src/guestfs-actions.pod:716 ../fish/guestfish-actions.pod:566
5049 #: ../src/guestfs-actions.pod:718 ../fish/guestfish-actions.pod:568
5050 msgid "Compute the MD5 hash (using the C<md5sum> program)."
5054 #: ../src/guestfs-actions.pod:720 ../fish/guestfish-actions.pod:570
5059 #: ../src/guestfs-actions.pod:722 ../fish/guestfish-actions.pod:572
5060 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
5064 #: ../src/guestfs-actions.pod:724 ../fish/guestfish-actions.pod:574
5069 #: ../src/guestfs-actions.pod:726 ../fish/guestfish-actions.pod:576
5070 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
5074 #: ../src/guestfs-actions.pod:728 ../fish/guestfish-actions.pod:578
5079 #: ../src/guestfs-actions.pod:730 ../fish/guestfish-actions.pod:580
5080 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
5084 #: ../src/guestfs-actions.pod:732 ../fish/guestfish-actions.pod:582
5089 #: ../src/guestfs-actions.pod:734 ../fish/guestfish-actions.pod:584
5090 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
5094 #: ../src/guestfs-actions.pod:736 ../fish/guestfish-actions.pod:586
5099 #: ../src/guestfs-actions.pod:738 ../fish/guestfish-actions.pod:588
5100 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
5104 #: ../src/guestfs-actions.pod:742 ../fish/guestfish-actions.pod:592
5105 msgid "The checksum is returned as a printable string."
5109 #: ../src/guestfs-actions.pod:744
5110 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
5114 #: ../src/guestfs-actions.pod:746
5115 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
5119 #: ../src/guestfs-actions.pod:751
5120 msgid "guestfs_checksum_device"
5124 #: ../src/guestfs-actions.pod:753
5127 " char *guestfs_checksum_device (guestfs_h *g,\n"
5128 "\t\tconst char *csumtype,\n"
5129 "\t\tconst char *device);\n"
5134 #: ../src/guestfs-actions.pod:757
5136 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
5137 "device named C<device>. For the types of checksums supported see the "
5138 "C<guestfs_checksum> command."
5142 #: ../src/guestfs-actions.pod:764
5143 msgid "guestfs_checksums_out"
5147 #: ../src/guestfs-actions.pod:766
5150 " int guestfs_checksums_out (guestfs_h *g,\n"
5151 "\t\tconst char *csumtype,\n"
5152 "\t\tconst char *directory,\n"
5153 "\t\tconst char *sumsfile);\n"
5158 #: ../src/guestfs-actions.pod:771 ../fish/guestfish-actions.pod:610
5160 "This command computes the checksums of all regular files in C<directory> and "
5161 "then emits a list of those checksums to the local output file C<sumsfile>."
5165 #: ../src/guestfs-actions.pod:775 ../fish/guestfish-actions.pod:614
5167 "This can be used for verifying the integrity of a virtual machine. However "
5168 "to be properly secure you should pay attention to the output of the checksum "
5169 "command (it uses the ones from GNU coreutils). In particular when the "
5170 "filename is not printable, coreutils uses a special backslash syntax. For "
5171 "more information, see the GNU coreutils info file."
5175 #: ../src/guestfs-actions.pod:785
5176 msgid "guestfs_chmod"
5180 #: ../src/guestfs-actions.pod:787
5183 " int guestfs_chmod (guestfs_h *g,\n"
5185 "\t\tconst char *path);\n"
5190 #: ../src/guestfs-actions.pod:791 ../fish/guestfish-actions.pod:628
5192 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
5197 #: ../src/guestfs-actions.pod:794 ../fish/guestfish-actions.pod:631
5199 "I<Note>: When using this command from guestfish, C<mode> by default would be "
5200 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
5205 #: ../src/guestfs-actions.pod:798 ../src/guestfs-actions.pod:3261 ../src/guestfs-actions.pod:3364 ../src/guestfs-actions.pod:3380 ../src/guestfs-actions.pod:3396 ../fish/guestfish-actions.pod:635 ../fish/guestfish-actions.pod:2521 ../fish/guestfish-actions.pod:2606 ../fish/guestfish-actions.pod:2616 ../fish/guestfish-actions.pod:2626
5206 msgid "The mode actually set is affected by the umask."
5210 #: ../src/guestfs-actions.pod:802
5211 msgid "guestfs_chown"
5215 #: ../src/guestfs-actions.pod:804
5218 " int guestfs_chown (guestfs_h *g,\n"
5221 "\t\tconst char *path);\n"
5226 #: ../src/guestfs-actions.pod:809 ../fish/guestfish-actions.pod:641
5227 msgid "Change the file owner to C<owner> and group to C<group>."
5231 #: ../src/guestfs-actions.pod:811 ../src/guestfs-actions.pod:2530 ../fish/guestfish-actions.pod:643 ../fish/guestfish-actions.pod:1999
5233 "Only numeric uid and gid are supported. If you want to use names, you will "
5234 "need to locate and parse the password file yourself (Augeas support makes "
5235 "this relatively easy)."
5239 #: ../src/guestfs-actions.pod:817
5240 msgid "guestfs_command"
5244 #: ../src/guestfs-actions.pod:819
5247 " char *guestfs_command (guestfs_h *g,\n"
5248 "\t\tchar *const *arguments);\n"
5253 #: ../src/guestfs-actions.pod:822 ../fish/guestfish-actions.pod:651
5255 "This call runs a command from the guest filesystem. The filesystem must be "
5256 "mounted, and must contain a compatible operating system (ie. something "
5257 "Linux, with the same or compatible processor architecture)."
5261 #: ../src/guestfs-actions.pod:827
5263 "The single parameter is an argv-style list of arguments. The first element "
5264 "is the name of the program to run. Subsequent elements are parameters. The "
5265 "list must be non-empty (ie. must contain a program name). Note that the "
5266 "command runs directly, and is I<not> invoked via the shell (see "
5271 #: ../src/guestfs-actions.pod:834 ../fish/guestfish-actions.pod:663
5272 msgid "The return value is anything printed to I<stdout> by the command."
5276 #: ../src/guestfs-actions.pod:837 ../fish/guestfish-actions.pod:666
5278 "If the command returns a non-zero exit status, then this function returns an "
5279 "error message. The error message string is the content of I<stderr> from "
5284 #: ../src/guestfs-actions.pod:841 ../fish/guestfish-actions.pod:670
5286 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
5287 "C</bin>. If you require a program from another location, you should provide "
5288 "the full path in the first parameter."
5292 #: ../src/guestfs-actions.pod:846 ../fish/guestfish-actions.pod:675
5294 "Shared libraries and data files required by the program must be available on "
5295 "filesystems which are mounted in the correct places. It is the caller's "
5296 "responsibility to ensure all filesystems that are needed are mounted at the "
5301 #: ../src/guestfs-actions.pod:858
5302 msgid "guestfs_command_lines"
5306 #: ../src/guestfs-actions.pod:860
5309 " char **guestfs_command_lines (guestfs_h *g,\n"
5310 "\t\tchar *const *arguments);\n"
5315 #: ../src/guestfs-actions.pod:863
5317 "This is the same as C<guestfs_command>, but splits the result into a list of "
5322 #: ../src/guestfs-actions.pod:866
5323 msgid "See also: C<guestfs_sh_lines>"
5327 #: ../src/guestfs-actions.pod:875
5328 msgid "guestfs_config"
5332 #: ../src/guestfs-actions.pod:877
5335 " int guestfs_config (guestfs_h *g,\n"
5336 "\t\tconst char *qemuparam,\n"
5337 "\t\tconst char *qemuvalue);\n"
5342 #: ../src/guestfs-actions.pod:881 ../fish/guestfish-actions.pod:700
5344 "This can be used to add arbitrary qemu command line parameters of the form "
5345 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
5346 "setting some parameters which would interfere with parameters that we use."
5350 #: ../src/guestfs-actions.pod:886 ../fish/guestfish-actions.pod:705
5351 msgid "The first character of C<param> string must be a C<-> (dash)."
5355 #: ../src/guestfs-actions.pod:888 ../fish/guestfish-actions.pod:707
5356 msgid "C<value> can be NULL."
5360 #: ../src/guestfs-actions.pod:892
5361 msgid "guestfs_copy_size"
5365 #: ../src/guestfs-actions.pod:894
5368 " int guestfs_copy_size (guestfs_h *g,\n"
5369 "\t\tconst char *src,\n"
5370 "\t\tconst char *dest,\n"
5371 "\t\tint64_t size);\n"
5376 #: ../src/guestfs-actions.pod:899 ../fish/guestfish-actions.pod:713
5378 "This command copies exactly C<size> bytes from one source device or file "
5379 "C<src> to another destination device or file C<dest>."
5383 #: ../src/guestfs-actions.pod:902 ../fish/guestfish-actions.pod:716
5385 "Note this will fail if the source is too short or if the destination is not "
5390 #: ../src/guestfs-actions.pod:907 ../src/guestfs-actions.pod:1042 ../src/guestfs-actions.pod:1070 ../src/guestfs-actions.pod:1442 ../src/guestfs-actions.pod:1461 ../src/guestfs-actions.pod:5648 ../src/guestfs-actions.pod:5664
5392 "This long-running command can generate progress notification messages so "
5393 "that the caller can display a progress bar or indicator. To receive these "
5394 "messages, the caller must register a progress callback. See "
5395 "L<guestfs(3)/guestfs_set_progress_callback>."
5399 #: ../src/guestfs-actions.pod:912
5404 #: ../src/guestfs-actions.pod:914
5407 " int guestfs_cp (guestfs_h *g,\n"
5408 "\t\tconst char *src,\n"
5409 "\t\tconst char *dest);\n"
5414 #: ../src/guestfs-actions.pod:918 ../fish/guestfish-actions.pod:723
5416 "This copies a file from C<src> to C<dest> where C<dest> is either a "
5417 "destination filename or destination directory."
5421 #: ../src/guestfs-actions.pod:923
5422 msgid "guestfs_cp_a"
5426 #: ../src/guestfs-actions.pod:925
5429 " int guestfs_cp_a (guestfs_h *g,\n"
5430 "\t\tconst char *src,\n"
5431 "\t\tconst char *dest);\n"
5436 #: ../src/guestfs-actions.pod:929 ../fish/guestfish-actions.pod:730
5438 "This copies a file or directory from C<src> to C<dest> recursively using the "
5443 #: ../src/guestfs-actions.pod:934
5448 #: ../src/guestfs-actions.pod:936
5451 " int guestfs_dd (guestfs_h *g,\n"
5452 "\t\tconst char *src,\n"
5453 "\t\tconst char *dest);\n"
5458 #: ../src/guestfs-actions.pod:940 ../fish/guestfish-actions.pod:737
5460 "This command copies from one source device or file C<src> to another "
5461 "destination device or file C<dest>. Normally you would use this to copy to "
5462 "or from a device or partition, for example to duplicate a filesystem."
5466 #: ../src/guestfs-actions.pod:945
5468 "If the destination is a device, it must be as large or larger than the "
5469 "source file or device, otherwise the copy will fail. This command cannot do "
5470 "partial copies (see C<guestfs_copy_size>)."
5474 #: ../src/guestfs-actions.pod:951
5475 msgid "guestfs_debug"
5479 #: ../src/guestfs-actions.pod:953
5482 " char *guestfs_debug (guestfs_h *g,\n"
5483 "\t\tconst char *subcmd,\n"
5484 "\t\tchar *const *extraargs);\n"
5489 #: ../src/guestfs-actions.pod:957
5491 "The C<guestfs_debug> command exposes some internals of C<guestfsd> (the "
5492 "guestfs daemon) that runs inside the qemu subprocess."
5496 #: ../src/guestfs-actions.pod:961 ../fish/guestfish-actions.pod:754
5498 "There is no comprehensive help for this command. You have to look at the "
5499 "file C<daemon/debug.c> in the libguestfs source to find out what you can do."
5503 #: ../src/guestfs-actions.pod:968
5504 msgid "guestfs_debug_upload"
5508 #: ../src/guestfs-actions.pod:970
5511 " int guestfs_debug_upload (guestfs_h *g,\n"
5512 "\t\tconst char *filename,\n"
5513 "\t\tconst char *tmpname,\n"
5519 #: ../src/guestfs-actions.pod:975
5521 "The C<guestfs_debug_upload> command uploads a file to the libguestfs "
5526 #: ../src/guestfs-actions.pod:978 ../fish/guestfish-actions.pod:765
5528 "There is no comprehensive help for this command. You have to look at the "
5529 "file C<daemon/debug.c> in the libguestfs source to find out what it is for."
5533 #: ../src/guestfs-actions.pod:984
5538 #: ../src/guestfs-actions.pod:986
5541 " char *guestfs_df (guestfs_h *g);\n"
5546 #: ../src/guestfs-actions.pod:988 ../fish/guestfish-actions.pod:775
5547 msgid "This command runs the C<df> command to report disk space used."
5551 #: ../src/guestfs-actions.pod:990 ../src/guestfs-actions.pod:1004 ../fish/guestfish-actions.pod:777 ../fish/guestfish-actions.pod:788
5553 "This command is mostly useful for interactive sessions. It is I<not> "
5554 "intended that you try to parse the output string. Use C<statvfs> from "
5559 #: ../src/guestfs-actions.pod:997
5560 msgid "guestfs_df_h"
5564 #: ../src/guestfs-actions.pod:999
5567 " char *guestfs_df_h (guestfs_h *g);\n"
5572 #: ../src/guestfs-actions.pod:1001 ../fish/guestfish-actions.pod:785
5574 "This command runs the C<df -h> command to report disk space used in "
5575 "human-readable format."
5579 #: ../src/guestfs-actions.pod:1011
5580 msgid "guestfs_dmesg"
5584 #: ../src/guestfs-actions.pod:1013
5587 " char *guestfs_dmesg (guestfs_h *g);\n"
5592 #: ../src/guestfs-actions.pod:1015 ../fish/guestfish-actions.pod:796
5594 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
5595 "This is sometimes useful for extended debugging of problems."
5599 #: ../src/guestfs-actions.pod:1019
5601 "Another way to get the same information is to enable verbose messages with "
5602 "C<guestfs_set_verbose> or by setting the environment variable "
5603 "C<LIBGUESTFS_DEBUG=1> before running the program."
5607 #: ../src/guestfs-actions.pod:1027
5608 msgid "guestfs_download"
5612 #: ../src/guestfs-actions.pod:1029
5615 " int guestfs_download (guestfs_h *g,\n"
5616 "\t\tconst char *remotefilename,\n"
5617 "\t\tconst char *filename);\n"
5622 #: ../src/guestfs-actions.pod:1033 ../src/guestfs-actions.pod:1055 ../fish/guestfish-actions.pod:809 ../fish/guestfish-actions.pod:822
5624 "Download file C<remotefilename> and save it as C<filename> on the local "
5629 #: ../src/guestfs-actions.pod:1036 ../src/guestfs-actions.pod:5216 ../fish/guestfish-actions.pod:812 ../fish/guestfish-actions.pod:4041
5630 msgid "C<filename> can also be a named pipe."
5634 #: ../src/guestfs-actions.pod:1038
5635 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
5639 #: ../src/guestfs-actions.pod:1047
5640 msgid "guestfs_download_offset"
5644 #: ../src/guestfs-actions.pod:1049
5647 " int guestfs_download_offset (guestfs_h *g,\n"
5648 "\t\tconst char *remotefilename,\n"
5649 "\t\tconst char *filename,\n"
5650 "\t\tint64_t offset,\n"
5651 "\t\tint64_t size);\n"
5656 #: ../src/guestfs-actions.pod:1058 ../fish/guestfish-actions.pod:825
5658 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
5659 "region must be within the file or device)."
5663 #: ../src/guestfs-actions.pod:1061
5665 "Note that there is no limit on the amount of data that can be downloaded "
5666 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
5667 "full amount unless an error occurs."
5671 #: ../src/guestfs-actions.pod:1066
5672 msgid "See also C<guestfs_download>, C<guestfs_pread>."
5676 #: ../src/guestfs-actions.pod:1075
5677 msgid "guestfs_drop_caches"
5681 #: ../src/guestfs-actions.pod:1077
5684 " int guestfs_drop_caches (guestfs_h *g,\n"
5685 "\t\tint whattodrop);\n"
5690 #: ../src/guestfs-actions.pod:1080 ../fish/guestfish-actions.pod:841
5692 "This instructs the guest kernel to drop its page cache, and/or dentries and "
5693 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
5694 "to drop, see L<http://linux-mm.org/Drop_Caches>"
5698 #: ../src/guestfs-actions.pod:1085 ../fish/guestfish-actions.pod:846
5699 msgid "Setting C<whattodrop> to 3 should drop everything."
5703 #: ../src/guestfs-actions.pod:1087 ../fish/guestfish-actions.pod:848
5705 "This automatically calls L<sync(2)> before the operation, so that the "
5706 "maximum guest memory is freed."
5710 #: ../src/guestfs-actions.pod:1092
5715 #: ../src/guestfs-actions.pod:1094
5718 " int64_t guestfs_du (guestfs_h *g,\n"
5719 "\t\tconst char *path);\n"
5724 #: ../src/guestfs-actions.pod:1097 ../fish/guestfish-actions.pod:855
5726 "This command runs the C<du -s> command to estimate file space usage for "
5731 #: ../src/guestfs-actions.pod:1100 ../fish/guestfish-actions.pod:858
5733 "C<path> can be a file or a directory. If C<path> is a directory then the "
5734 "estimate includes the contents of the directory and all subdirectories "
5739 #: ../src/guestfs-actions.pod:1104 ../fish/guestfish-actions.pod:862
5740 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
5744 #: ../src/guestfs-actions.pod:1109
5745 msgid "guestfs_e2fsck_f"
5749 #: ../src/guestfs-actions.pod:1111
5752 " int guestfs_e2fsck_f (guestfs_h *g,\n"
5753 "\t\tconst char *device);\n"
5758 #: ../src/guestfs-actions.pod:1114 ../fish/guestfish-actions.pod:869
5760 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
5761 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
5766 #: ../src/guestfs-actions.pod:1118
5768 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
5769 "Normally you should use C<guestfs_fsck>."
5773 #: ../src/guestfs-actions.pod:1123
5774 msgid "guestfs_echo_daemon"
5778 #: ../src/guestfs-actions.pod:1125
5781 " char *guestfs_echo_daemon (guestfs_h *g,\n"
5782 "\t\tchar *const *words);\n"
5787 #: ../src/guestfs-actions.pod:1128 ../fish/guestfish-actions.pod:880
5789 "This command concatenates the list of C<words> passed with single spaces "
5790 "between them and returns the resulting string."
5794 #: ../src/guestfs-actions.pod:1131 ../fish/guestfish-actions.pod:883
5795 msgid "You can use this command to test the connection through to the daemon."
5799 #: ../src/guestfs-actions.pod:1133
5800 msgid "See also C<guestfs_ping_daemon>."
5804 #: ../src/guestfs-actions.pod:1138
5805 msgid "guestfs_egrep"
5809 #: ../src/guestfs-actions.pod:1140
5812 " char **guestfs_egrep (guestfs_h *g,\n"
5813 "\t\tconst char *regex,\n"
5814 "\t\tconst char *path);\n"
5819 #: ../src/guestfs-actions.pod:1144 ../fish/guestfish-actions.pod:891
5820 msgid "This calls the external C<egrep> program and returns the matching lines."
5824 #: ../src/guestfs-actions.pod:1154
5825 msgid "guestfs_egrepi"
5829 #: ../src/guestfs-actions.pod:1156
5832 " char **guestfs_egrepi (guestfs_h *g,\n"
5833 "\t\tconst char *regex,\n"
5834 "\t\tconst char *path);\n"
5839 #: ../src/guestfs-actions.pod:1160 ../fish/guestfish-actions.pod:901
5840 msgid "This calls the external C<egrep -i> program and returns the matching lines."
5844 #: ../src/guestfs-actions.pod:1170
5845 msgid "guestfs_equal"
5849 #: ../src/guestfs-actions.pod:1172
5852 " int guestfs_equal (guestfs_h *g,\n"
5853 "\t\tconst char *file1,\n"
5854 "\t\tconst char *file2);\n"
5859 #: ../src/guestfs-actions.pod:1176 ../fish/guestfish-actions.pod:911
5861 "This compares the two files C<file1> and C<file2> and returns true if their "
5862 "content is exactly equal, or false otherwise."
5866 #: ../src/guestfs-actions.pod:1179 ../fish/guestfish-actions.pod:914
5867 msgid "The external L<cmp(1)> program is used for the comparison."
5871 #: ../src/guestfs-actions.pod:1183
5872 msgid "guestfs_exists"
5876 #: ../src/guestfs-actions.pod:1185
5879 " int guestfs_exists (guestfs_h *g,\n"
5880 "\t\tconst char *path);\n"
5885 #: ../src/guestfs-actions.pod:1188 ../fish/guestfish-actions.pod:920
5887 "This returns C<true> if and only if there is a file, directory (or anything) "
5888 "with the given C<path> name."
5892 #: ../src/guestfs-actions.pod:1191
5893 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
5897 #: ../src/guestfs-actions.pod:1195
5898 msgid "guestfs_fallocate"
5902 #: ../src/guestfs-actions.pod:1197
5905 " int guestfs_fallocate (guestfs_h *g,\n"
5906 "\t\tconst char *path,\n"
5912 #: ../src/guestfs-actions.pod:1201 ../src/guestfs-actions.pod:1224 ../fish/guestfish-actions.pod:929 ../fish/guestfish-actions.pod:948
5914 "This command preallocates a file (containing zero bytes) named C<path> of "
5915 "size C<len> bytes. If the file exists already, it is overwritten."
5919 #: ../src/guestfs-actions.pod:1205 ../fish/guestfish-actions.pod:933
5921 "Do not confuse this with the guestfish-specific C<alloc> command which "
5922 "allocates a file in the host and attaches it as a device."
5926 #: ../src/guestfs-actions.pod:1211 ../fish/guestfish-actions.pod:937
5928 "This function is deprecated. In new code, use the C<fallocate64> call "
5933 #: ../src/guestfs-actions.pod:1218
5934 msgid "guestfs_fallocate64"
5938 #: ../src/guestfs-actions.pod:1220
5941 " int guestfs_fallocate64 (guestfs_h *g,\n"
5942 "\t\tconst char *path,\n"
5943 "\t\tint64_t len);\n"
5948 #: ../src/guestfs-actions.pod:1228
5950 "Note that this call allocates disk blocks for the file. To create a sparse "
5951 "file use C<guestfs_truncate_size> instead."
5955 #: ../src/guestfs-actions.pod:1231
5957 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
5958 "oversight it only allowed 30 bit lengths to be specified, effectively "
5959 "limiting the maximum size of files created through that call to 1GB."
5963 #: ../src/guestfs-actions.pod:1236 ../fish/guestfish-actions.pod:960
5965 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
5966 "commands which create a file in the host and attach it as a device."
5970 #: ../src/guestfs-actions.pod:1242
5971 msgid "guestfs_fgrep"
5975 #: ../src/guestfs-actions.pod:1244
5978 " char **guestfs_fgrep (guestfs_h *g,\n"
5979 "\t\tconst char *pattern,\n"
5980 "\t\tconst char *path);\n"
5985 #: ../src/guestfs-actions.pod:1248 ../fish/guestfish-actions.pod:968
5986 msgid "This calls the external C<fgrep> program and returns the matching lines."
5990 #: ../src/guestfs-actions.pod:1258
5991 msgid "guestfs_fgrepi"
5995 #: ../src/guestfs-actions.pod:1260
5998 " char **guestfs_fgrepi (guestfs_h *g,\n"
5999 "\t\tconst char *pattern,\n"
6000 "\t\tconst char *path);\n"
6005 #: ../src/guestfs-actions.pod:1264 ../fish/guestfish-actions.pod:978
6006 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
6010 #: ../src/guestfs-actions.pod:1274
6011 msgid "guestfs_file"
6015 #: ../src/guestfs-actions.pod:1276
6018 " char *guestfs_file (guestfs_h *g,\n"
6019 "\t\tconst char *path);\n"
6024 #: ../src/guestfs-actions.pod:1279 ../fish/guestfish-actions.pod:988
6026 "This call uses the standard L<file(1)> command to determine the type or "
6027 "contents of the file."
6031 #: ../src/guestfs-actions.pod:1282 ../fish/guestfish-actions.pod:991
6033 "This call will also transparently look inside various types of compressed "
6038 #: ../src/guestfs-actions.pod:1285 ../fish/guestfish-actions.pod:994
6040 "The exact command which runs is C<file -zb path>. Note in particular that "
6041 "the filename is not prepended to the output (the C<-b> option)."
6045 #: ../src/guestfs-actions.pod:1289
6047 "This command can also be used on C</dev/> devices (and partitions, LV "
6048 "names). You can for example use this to determine if a device contains a "
6049 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
6053 #: ../src/guestfs-actions.pod:1294 ../fish/guestfish-actions.pod:1003
6055 "If the C<path> does not begin with C</dev/> then this command only works for "
6056 "the content of regular files. For other file types (directory, symbolic "
6057 "link etc) it will just return the string C<directory> etc."
6061 #: ../src/guestfs-actions.pod:1302
6062 msgid "guestfs_file_architecture"
6066 #: ../src/guestfs-actions.pod:1304
6069 " char *guestfs_file_architecture (guestfs_h *g,\n"
6070 "\t\tconst char *filename);\n"
6075 #: ../src/guestfs-actions.pod:1307 ../fish/guestfish-actions.pod:1012
6077 "This detects the architecture of the binary C<filename>, and returns it if "
6082 #: ../src/guestfs-actions.pod:1310 ../fish/guestfish-actions.pod:1015
6083 msgid "Currently defined architectures are:"
6087 #: ../src/guestfs-actions.pod:1314 ../fish/guestfish-actions.pod:1019
6092 #: ../src/guestfs-actions.pod:1316 ../fish/guestfish-actions.pod:1021
6094 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
6095 "irrespective of the precise processor requirements of the binary."
6099 #: ../src/guestfs-actions.pod:1319 ../fish/guestfish-actions.pod:1024
6104 #: ../src/guestfs-actions.pod:1321 ../fish/guestfish-actions.pod:1026
6105 msgid "64 bit x86-64."
6109 #: ../src/guestfs-actions.pod:1323 ../fish/guestfish-actions.pod:1028
6114 #: ../src/guestfs-actions.pod:1325 ../fish/guestfish-actions.pod:1030
6115 msgid "32 bit SPARC."
6119 #: ../src/guestfs-actions.pod:1327 ../fish/guestfish-actions.pod:1032
6124 #: ../src/guestfs-actions.pod:1329 ../fish/guestfish-actions.pod:1034
6125 msgid "64 bit SPARC V9 and above."
6129 #: ../src/guestfs-actions.pod:1331 ../fish/guestfish-actions.pod:1036
6134 #: ../src/guestfs-actions.pod:1333 ../fish/guestfish-actions.pod:1038
6135 msgid "Intel Itanium."
6139 #: ../src/guestfs-actions.pod:1335 ../fish/guestfish-actions.pod:1040
6144 #: ../src/guestfs-actions.pod:1337 ../fish/guestfish-actions.pod:1042
6145 msgid "32 bit Power PC."
6149 #: ../src/guestfs-actions.pod:1339 ../fish/guestfish-actions.pod:1044
6154 #: ../src/guestfs-actions.pod:1341 ../fish/guestfish-actions.pod:1046
6155 msgid "64 bit Power PC."
6159 #: ../src/guestfs-actions.pod:1345 ../fish/guestfish-actions.pod:1050
6160 msgid "Libguestfs may return other architecture strings in future."
6164 #: ../src/guestfs-actions.pod:1347 ../fish/guestfish-actions.pod:1052
6165 msgid "The function works on at least the following types of files:"
6169 #: ../src/guestfs-actions.pod:1353 ../fish/guestfish-actions.pod:1058
6170 msgid "many types of Un*x and Linux binary"
6174 #: ../src/guestfs-actions.pod:1357 ../fish/guestfish-actions.pod:1062
6175 msgid "many types of Un*x and Linux shared library"
6179 #: ../src/guestfs-actions.pod:1361 ../fish/guestfish-actions.pod:1066
6180 msgid "Windows Win32 and Win64 binaries"
6184 #: ../src/guestfs-actions.pod:1365 ../fish/guestfish-actions.pod:1070
6185 msgid "Windows Win32 and Win64 DLLs"
6189 #: ../src/guestfs-actions.pod:1367 ../fish/guestfish-actions.pod:1072
6190 msgid "Win32 binaries and DLLs return C<i386>."
6194 #: ../src/guestfs-actions.pod:1369 ../fish/guestfish-actions.pod:1074
6195 msgid "Win64 binaries and DLLs return C<x86_64>."
6199 #: ../src/guestfs-actions.pod:1373 ../fish/guestfish-actions.pod:1078
6200 msgid "Linux kernel modules"
6204 #: ../src/guestfs-actions.pod:1377 ../fish/guestfish-actions.pod:1082
6205 msgid "Linux new-style initrd images"
6209 #: ../src/guestfs-actions.pod:1381 ../fish/guestfish-actions.pod:1086
6210 msgid "some non-x86 Linux vmlinuz kernels"
6214 #: ../src/guestfs-actions.pod:1385 ../fish/guestfish-actions.pod:1090
6215 msgid "What it can't do currently:"
6219 #: ../src/guestfs-actions.pod:1391 ../fish/guestfish-actions.pod:1096
6220 msgid "static libraries (libfoo.a)"
6224 #: ../src/guestfs-actions.pod:1395 ../fish/guestfish-actions.pod:1100
6225 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
6229 #: ../src/guestfs-actions.pod:1399 ../fish/guestfish-actions.pod:1104
6230 msgid "x86 Linux vmlinuz kernels"
6234 #: ../src/guestfs-actions.pod:1401 ../fish/guestfish-actions.pod:1106
6236 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
6237 "compressed code, and are horribly hard to unpack. If you want to find the "
6238 "architecture of a kernel, use the architecture of the associated initrd or "
6239 "kernel module(s) instead."
6243 #: ../src/guestfs-actions.pod:1411
6244 msgid "guestfs_filesize"
6248 #: ../src/guestfs-actions.pod:1413
6251 " int64_t guestfs_filesize (guestfs_h *g,\n"
6252 "\t\tconst char *file);\n"
6257 #: ../src/guestfs-actions.pod:1416 ../fish/guestfish-actions.pod:1117
6258 msgid "This command returns the size of C<file> in bytes."
6262 #: ../src/guestfs-actions.pod:1418
6264 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
6265 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
6266 "devices, use C<guestfs_blockdev_getsize64>."
6270 #: ../src/guestfs-actions.pod:1424
6271 msgid "guestfs_fill"
6275 #: ../src/guestfs-actions.pod:1426
6278 " int guestfs_fill (guestfs_h *g,\n"
6281 "\t\tconst char *path);\n"
6286 #: ../src/guestfs-actions.pod:1431 ../fish/guestfish-actions.pod:1127
6288 "This command creates a new file called C<path>. The initial content of the "
6289 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
6294 #: ../src/guestfs-actions.pod:1435
6296 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
6297 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
6298 "bytes use C<guestfs_fill_pattern>."
6302 #: ../src/guestfs-actions.pod:1447
6303 msgid "guestfs_fill_pattern"
6307 #: ../src/guestfs-actions.pod:1449
6310 " int guestfs_fill_pattern (guestfs_h *g,\n"
6311 "\t\tconst char *pattern,\n"
6313 "\t\tconst char *path);\n"
6318 #: ../src/guestfs-actions.pod:1454
6320 "This function is like C<guestfs_fill> except that it creates a new file of "
6321 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
6322 "pattern is truncated if necessary to ensure the length of the file is "
6323 "exactly C<len> bytes."
6327 #: ../src/guestfs-actions.pod:1466
6328 msgid "guestfs_find"
6332 #: ../src/guestfs-actions.pod:1468
6335 " char **guestfs_find (guestfs_h *g,\n"
6336 "\t\tconst char *directory);\n"
6341 #: ../src/guestfs-actions.pod:1471 ../fish/guestfish-actions.pod:1149
6343 "This command lists out all files and directories, recursively, starting at "
6344 "C<directory>. It is essentially equivalent to running the shell command "
6345 "C<find directory -print> but some post-processing happens on the output, "
6350 #: ../src/guestfs-actions.pod:1476 ../fish/guestfish-actions.pod:1154
6352 "This returns a list of strings I<without any prefix>. Thus if the directory "
6357 #: ../src/guestfs-actions.pod:1479 ../fish/guestfish-actions.pod:1157
6367 #: ../src/guestfs-actions.pod:1483
6368 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
6372 #: ../src/guestfs-actions.pod:1486 ../fish/guestfish-actions.pod:1164
6383 #: ../src/guestfs-actions.pod:1491 ../fish/guestfish-actions.pod:1169
6384 msgid "If C<directory> is not a directory, then this command returns an error."
6388 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:1172
6389 msgid "The returned list is sorted."
6393 #: ../src/guestfs-actions.pod:1496
6394 msgid "See also C<guestfs_find0>."
6398 #: ../src/guestfs-actions.pod:1505
6399 msgid "guestfs_find0"
6403 #: ../src/guestfs-actions.pod:1507
6406 " int guestfs_find0 (guestfs_h *g,\n"
6407 "\t\tconst char *directory,\n"
6408 "\t\tconst char *files);\n"
6413 #: ../src/guestfs-actions.pod:1511 ../fish/guestfish-actions.pod:1183
6415 "This command lists out all files and directories, recursively, starting at "
6416 "C<directory>, placing the resulting list in the external file called "
6421 #: ../src/guestfs-actions.pod:1515
6423 "This command works the same way as C<guestfs_find> with the following "
6428 #: ../src/guestfs-actions.pod:1522 ../fish/guestfish-actions.pod:1194
6429 msgid "The resulting list is written to an external file."
6433 #: ../src/guestfs-actions.pod:1526 ../fish/guestfish-actions.pod:1198
6435 "Items (filenames) in the result are separated by C<\\0> characters. See "
6436 "L<find(1)> option I<-print0>."
6440 #: ../src/guestfs-actions.pod:1531 ../fish/guestfish-actions.pod:1203
6441 msgid "This command is not limited in the number of names that it can return."
6445 #: ../src/guestfs-actions.pod:1536 ../fish/guestfish-actions.pod:1208
6446 msgid "The result list is not sorted."
6450 #: ../src/guestfs-actions.pod:1542
6451 msgid "guestfs_findfs_label"
6455 #: ../src/guestfs-actions.pod:1544
6458 " char *guestfs_findfs_label (guestfs_h *g,\n"
6459 "\t\tconst char *label);\n"
6464 #: ../src/guestfs-actions.pod:1547 ../fish/guestfish-actions.pod:1218
6466 "This command searches the filesystems and returns the one which has the "
6467 "given label. An error is returned if no such filesystem can be found."
6471 #: ../src/guestfs-actions.pod:1551
6472 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
6476 #: ../src/guestfs-actions.pod:1556
6477 msgid "guestfs_findfs_uuid"
6481 #: ../src/guestfs-actions.pod:1558
6484 " char *guestfs_findfs_uuid (guestfs_h *g,\n"
6485 "\t\tconst char *uuid);\n"
6490 #: ../src/guestfs-actions.pod:1561 ../fish/guestfish-actions.pod:1228
6492 "This command searches the filesystems and returns the one which has the "
6493 "given UUID. An error is returned if no such filesystem can be found."
6497 #: ../src/guestfs-actions.pod:1565
6498 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
6502 #: ../src/guestfs-actions.pod:1570
6503 msgid "guestfs_fsck"
6507 #: ../src/guestfs-actions.pod:1572
6510 " int guestfs_fsck (guestfs_h *g,\n"
6511 "\t\tconst char *fstype,\n"
6512 "\t\tconst char *device);\n"
6517 #: ../src/guestfs-actions.pod:1576 ../fish/guestfish-actions.pod:1238
6519 "This runs the filesystem checker (fsck) on C<device> which should have "
6520 "filesystem type C<fstype>."
6524 #: ../src/guestfs-actions.pod:1579 ../fish/guestfish-actions.pod:1241
6526 "The returned integer is the status. See L<fsck(8)> for the list of status "
6527 "codes from C<fsck>."
6531 #: ../src/guestfs-actions.pod:1588 ../fish/guestfish-actions.pod:1250
6532 msgid "Multiple status codes can be summed together."
6536 #: ../src/guestfs-actions.pod:1592 ../fish/guestfish-actions.pod:1254
6538 "A non-zero return code can mean \"success\", for example if errors have been "
6539 "corrected on the filesystem."
6543 #: ../src/guestfs-actions.pod:1597 ../fish/guestfish-actions.pod:1259
6544 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
6548 #: ../src/guestfs-actions.pod:1602 ../fish/guestfish-actions.pod:1264
6549 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
6553 #: ../src/guestfs-actions.pod:1606
6554 msgid "guestfs_get_append"
6558 #: ../src/guestfs-actions.pod:1608
6561 " const char *guestfs_get_append (guestfs_h *g);\n"
6566 #: ../src/guestfs-actions.pod:1610 ../fish/guestfish-actions.pod:1270
6568 "Return the additional kernel options which are added to the guest kernel "
6573 #: ../src/guestfs-actions.pod:1613 ../fish/guestfish-actions.pod:1273
6574 msgid "If C<NULL> then no options are added."
6578 #: ../src/guestfs-actions.pod:1615
6580 "This function returns a string which may be NULL. There is no way to return "
6581 "an error from this function. The string is owned by the guest handle and "
6582 "must I<not> be freed."
6586 #: ../src/guestfs-actions.pod:1619
6587 msgid "guestfs_get_autosync"
6591 #: ../src/guestfs-actions.pod:1621
6594 " int guestfs_get_autosync (guestfs_h *g);\n"
6599 #: ../src/guestfs-actions.pod:1623 ../fish/guestfish-actions.pod:1279
6600 msgid "Get the autosync flag."
6604 #: ../src/guestfs-actions.pod:1627
6605 msgid "guestfs_get_direct"
6609 #: ../src/guestfs-actions.pod:1629
6612 " int guestfs_get_direct (guestfs_h *g);\n"
6617 #: ../src/guestfs-actions.pod:1631 ../fish/guestfish-actions.pod:1285
6618 msgid "Return the direct appliance mode flag."
6622 #: ../src/guestfs-actions.pod:1635
6623 msgid "guestfs_get_e2label"
6627 #: ../src/guestfs-actions.pod:1637
6630 " char *guestfs_get_e2label (guestfs_h *g,\n"
6631 "\t\tconst char *device);\n"
6636 #: ../src/guestfs-actions.pod:1640 ../fish/guestfish-actions.pod:1291
6637 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
6641 #: ../src/guestfs-actions.pod:1646 ../fish/guestfish-actions.pod:1294
6643 "This function is deprecated. In new code, use the C<vfs_label> call "
6648 #: ../src/guestfs-actions.pod:1653
6649 msgid "guestfs_get_e2uuid"
6653 #: ../src/guestfs-actions.pod:1655
6656 " char *guestfs_get_e2uuid (guestfs_h *g,\n"
6657 "\t\tconst char *device);\n"
6662 #: ../src/guestfs-actions.pod:1658 ../fish/guestfish-actions.pod:1305
6663 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
6667 #: ../src/guestfs-actions.pod:1664 ../fish/guestfish-actions.pod:1308
6668 msgid "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
6672 #: ../src/guestfs-actions.pod:1671
6673 msgid "guestfs_get_memsize"
6677 #: ../src/guestfs-actions.pod:1673
6680 " int guestfs_get_memsize (guestfs_h *g);\n"
6685 #: ../src/guestfs-actions.pod:1675 ../fish/guestfish-actions.pod:1319
6686 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
6690 #: ../src/guestfs-actions.pod:1678
6692 "If C<guestfs_set_memsize> was not called on this handle, and if "
6693 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
6694 "value for memsize."
6698 #: ../src/guestfs-actions.pod:1682 ../src/guestfs-actions.pod:1745 ../src/guestfs-actions.pod:4469 ../src/guestfs-actions.pod:4561 ../fish/guestfish-actions.pod:1326 ../fish/guestfish-actions.pod:1377 ../fish/guestfish-actions.pod:3448 ../fish/guestfish-actions.pod:3535
6699 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
6703 #: ../src/guestfs-actions.pod:1687
6704 msgid "guestfs_get_network"
6708 #: ../src/guestfs-actions.pod:1689
6711 " int guestfs_get_network (guestfs_h *g);\n"
6716 #: ../src/guestfs-actions.pod:1691 ../fish/guestfish-actions.pod:1333
6717 msgid "This returns the enable network flag."
6721 #: ../src/guestfs-actions.pod:1695
6722 msgid "guestfs_get_path"
6726 #: ../src/guestfs-actions.pod:1697
6729 " const char *guestfs_get_path (guestfs_h *g);\n"
6734 #: ../src/guestfs-actions.pod:1699 ../fish/guestfish-actions.pod:1339
6735 msgid "Return the current search path."
6739 #: ../src/guestfs-actions.pod:1701 ../fish/guestfish-actions.pod:1341
6741 "This is always non-NULL. If it wasn't set already, then this will return "
6746 #: ../src/guestfs-actions.pod:1704 ../src/guestfs-actions.pod:1727
6748 "This function returns a string, or NULL on error. The string is owned by "
6749 "the guest handle and must I<not> be freed."
6753 #: ../src/guestfs-actions.pod:1707
6754 msgid "guestfs_get_pid"
6758 #: ../src/guestfs-actions.pod:1709
6761 " int guestfs_get_pid (guestfs_h *g);\n"
6766 #: ../src/guestfs-actions.pod:1711 ../fish/guestfish-actions.pod:1350
6768 "Return the process ID of the qemu subprocess. If there is no qemu "
6769 "subprocess, then this will return an error."
6773 #: ../src/guestfs-actions.pod:1714 ../fish/guestfish-actions.pod:1353
6774 msgid "This is an internal call used for debugging and testing."
6778 #: ../src/guestfs-actions.pod:1718
6779 msgid "guestfs_get_qemu"
6783 #: ../src/guestfs-actions.pod:1720
6786 " const char *guestfs_get_qemu (guestfs_h *g);\n"
6791 #: ../src/guestfs-actions.pod:1722 ../fish/guestfish-actions.pod:1359
6792 msgid "Return the current qemu binary."
6796 #: ../src/guestfs-actions.pod:1724 ../fish/guestfish-actions.pod:1361
6798 "This is always non-NULL. If it wasn't set already, then this will return "
6799 "the default qemu binary name."
6803 #: ../src/guestfs-actions.pod:1730
6804 msgid "guestfs_get_recovery_proc"
6808 #: ../src/guestfs-actions.pod:1732
6811 " int guestfs_get_recovery_proc (guestfs_h *g);\n"
6816 #: ../src/guestfs-actions.pod:1734 ../fish/guestfish-actions.pod:1368
6817 msgid "Return the recovery process enabled flag."
6821 #: ../src/guestfs-actions.pod:1738
6822 msgid "guestfs_get_selinux"
6826 #: ../src/guestfs-actions.pod:1740
6829 " int guestfs_get_selinux (guestfs_h *g);\n"
6834 #: ../src/guestfs-actions.pod:1742
6836 "This returns the current setting of the selinux flag which is passed to the "
6837 "appliance at boot time. See C<guestfs_set_selinux>."
6841 #: ../src/guestfs-actions.pod:1750
6842 msgid "guestfs_get_state"
6846 #: ../src/guestfs-actions.pod:1752
6849 " int guestfs_get_state (guestfs_h *g);\n"
6854 #: ../src/guestfs-actions.pod:1754 ../fish/guestfish-actions.pod:1384
6856 "This returns the current state as an opaque integer. This is only useful "
6857 "for printing debug and internal error messages."
6861 #: ../src/guestfs-actions.pod:1757 ../src/guestfs-actions.pod:2378 ../src/guestfs-actions.pod:2401 ../src/guestfs-actions.pod:2450 ../src/guestfs-actions.pod:2471 ../fish/guestfish-actions.pod:1387 ../fish/guestfish-actions.pod:1881 ../fish/guestfish-actions.pod:1899 ../fish/guestfish-actions.pod:1937 ../fish/guestfish-actions.pod:1953
6862 msgid "For more information on states, see L<guestfs(3)>."
6866 #: ../src/guestfs-actions.pod:1761
6867 msgid "guestfs_get_trace"
6871 #: ../src/guestfs-actions.pod:1763
6874 " int guestfs_get_trace (guestfs_h *g);\n"
6879 #: ../src/guestfs-actions.pod:1765 ../fish/guestfish-actions.pod:1393
6880 msgid "Return the command trace flag."
6884 #: ../src/guestfs-actions.pod:1769
6885 msgid "guestfs_get_umask"
6889 #: ../src/guestfs-actions.pod:1771
6892 " int guestfs_get_umask (guestfs_h *g);\n"
6897 #: ../src/guestfs-actions.pod:1773
6899 "Return the current umask. By default the umask is C<022> unless it has been "
6900 "set by calling C<guestfs_umask>."
6904 #: ../src/guestfs-actions.pod:1778
6905 msgid "guestfs_get_verbose"
6909 #: ../src/guestfs-actions.pod:1780
6912 " int guestfs_get_verbose (guestfs_h *g);\n"
6917 #: ../src/guestfs-actions.pod:1782 ../fish/guestfish-actions.pod:1406
6918 msgid "This returns the verbose messages flag."
6922 #: ../src/guestfs-actions.pod:1786
6923 msgid "guestfs_getcon"
6927 #: ../src/guestfs-actions.pod:1788
6930 " char *guestfs_getcon (guestfs_h *g);\n"
6935 #: ../src/guestfs-actions.pod:1790 ../fish/guestfish-actions.pod:1412
6936 msgid "This gets the SELinux security context of the daemon."
6940 #: ../src/guestfs-actions.pod:1792
6941 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
6945 #: ../src/guestfs-actions.pod:1798
6946 msgid "guestfs_getxattrs"
6950 #: ../src/guestfs-actions.pod:1800
6953 " struct guestfs_xattr_list *guestfs_getxattrs (guestfs_h *g,\n"
6954 "\t\tconst char *path);\n"
6959 #: ../src/guestfs-actions.pod:1803 ../fish/guestfish-actions.pod:1421
6960 msgid "This call lists the extended attributes of the file or directory C<path>."
6964 #: ../src/guestfs-actions.pod:1806 ../fish/guestfish-actions.pod:1424
6966 "At the system call level, this is a combination of the L<listxattr(2)> and "
6967 "L<getxattr(2)> calls."
6971 #: ../src/guestfs-actions.pod:1809
6972 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
6976 #: ../src/guestfs-actions.pod:1811 ../src/guestfs-actions.pod:2545 ../src/guestfs-actions.pod:3100
6978 "This function returns a C<struct guestfs_xattr_list *> (see "
6979 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
6980 "must call C<guestfs_free_xattr_list> after use>."
6984 #: ../src/guestfs-actions.pod:1816
6985 msgid "guestfs_glob_expand"
6989 #: ../src/guestfs-actions.pod:1818
6992 " char **guestfs_glob_expand (guestfs_h *g,\n"
6993 "\t\tconst char *pattern);\n"
6998 #: ../src/guestfs-actions.pod:1821 ../fish/guestfish-actions.pod:1433
7000 "This command searches for all the pathnames matching C<pattern> according to "
7001 "the wildcard expansion rules used by the shell."
7005 #: ../src/guestfs-actions.pod:1825 ../fish/guestfish-actions.pod:1437
7006 msgid "If no paths match, then this returns an empty list (note: not an error)."
7010 #: ../src/guestfs-actions.pod:1828 ../fish/guestfish-actions.pod:1440
7012 "It is just a wrapper around the C L<glob(3)> function with flags "
7013 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
7017 #: ../src/guestfs-actions.pod:1836
7018 msgid "guestfs_grep"
7022 #: ../src/guestfs-actions.pod:1838
7025 " char **guestfs_grep (guestfs_h *g,\n"
7026 "\t\tconst char *regex,\n"
7027 "\t\tconst char *path);\n"
7032 #: ../src/guestfs-actions.pod:1842 ../fish/guestfish-actions.pod:1448
7033 msgid "This calls the external C<grep> program and returns the matching lines."
7037 #: ../src/guestfs-actions.pod:1852
7038 msgid "guestfs_grepi"
7042 #: ../src/guestfs-actions.pod:1854
7045 " char **guestfs_grepi (guestfs_h *g,\n"
7046 "\t\tconst char *regex,\n"
7047 "\t\tconst char *path);\n"
7052 #: ../src/guestfs-actions.pod:1858 ../fish/guestfish-actions.pod:1458
7053 msgid "This calls the external C<grep -i> program and returns the matching lines."
7057 #: ../src/guestfs-actions.pod:1868
7058 msgid "guestfs_grub_install"
7062 #: ../src/guestfs-actions.pod:1870
7065 " int guestfs_grub_install (guestfs_h *g,\n"
7066 "\t\tconst char *root,\n"
7067 "\t\tconst char *device);\n"
7072 #: ../src/guestfs-actions.pod:1874 ../fish/guestfish-actions.pod:1468
7074 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
7075 "the root directory being C<root>."
7079 #: ../src/guestfs-actions.pod:1877 ../fish/guestfish-actions.pod:1471
7081 "Note: If grub-install reports the error \"No suitable drive was found in the "
7082 "generated device map.\" it may be that you need to create a "
7083 "C</boot/grub/device.map> file first that contains the mapping between grub "
7084 "device names and Linux device names. It is usually sufficient to create a "
7089 #: ../src/guestfs-actions.pod:1884 ../fish/guestfish-actions.pod:1478
7097 #: ../src/guestfs-actions.pod:1886 ../fish/guestfish-actions.pod:1480
7098 msgid "replacing C</dev/vda> with the name of the installation device."
7102 #: ../src/guestfs-actions.pod:1890
7103 msgid "guestfs_head"
7107 #: ../src/guestfs-actions.pod:1892
7110 " char **guestfs_head (guestfs_h *g,\n"
7111 "\t\tconst char *path);\n"
7116 #: ../src/guestfs-actions.pod:1895 ../fish/guestfish-actions.pod:1486
7118 "This command returns up to the first 10 lines of a file as a list of "
7123 #: ../src/guestfs-actions.pod:1905
7124 msgid "guestfs_head_n"
7128 #: ../src/guestfs-actions.pod:1907
7131 " char **guestfs_head_n (guestfs_h *g,\n"
7132 "\t\tint nrlines,\n"
7133 "\t\tconst char *path);\n"
7138 #: ../src/guestfs-actions.pod:1911 ../fish/guestfish-actions.pod:1496
7140 "If the parameter C<nrlines> is a positive number, this returns the first "
7141 "C<nrlines> lines of the file C<path>."
7145 #: ../src/guestfs-actions.pod:1914 ../fish/guestfish-actions.pod:1499
7147 "If the parameter C<nrlines> is a negative number, this returns lines from "
7148 "the file C<path>, excluding the last C<nrlines> lines."
7152 #: ../src/guestfs-actions.pod:1917 ../src/guestfs-actions.pod:5017 ../fish/guestfish-actions.pod:1502 ../fish/guestfish-actions.pod:3881
7153 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
7157 #: ../src/guestfs-actions.pod:1926
7158 msgid "guestfs_hexdump"
7162 #: ../src/guestfs-actions.pod:1928
7165 " char *guestfs_hexdump (guestfs_h *g,\n"
7166 "\t\tconst char *path);\n"
7171 #: ../src/guestfs-actions.pod:1931 ../fish/guestfish-actions.pod:1511
7173 "This runs C<hexdump -C> on the given C<path>. The result is the "
7174 "human-readable, canonical hex dump of the file."
7178 #: ../src/guestfs-actions.pod:1940
7179 msgid "guestfs_initrd_cat"
7183 #: ../src/guestfs-actions.pod:1942
7186 " char *guestfs_initrd_cat (guestfs_h *g,\n"
7187 "\t\tconst char *initrdpath,\n"
7188 "\t\tconst char *filename,\n"
7189 "\t\tsize_t *size_r);\n"
7194 #: ../src/guestfs-actions.pod:1947 ../fish/guestfish-actions.pod:1521
7196 "This command unpacks the file C<filename> from the initrd file called "
7197 "C<initrdpath>. The filename must be given I<without> the initial C</> "
7202 #: ../src/guestfs-actions.pod:1951 ../fish/guestfish-actions.pod:1525
7204 "For example, in guestfish you could use the following command to examine the "
7205 "boot script (usually called C</init>) contained in a Linux initrd or "
7210 #: ../src/guestfs-actions.pod:1955 ../fish/guestfish-actions.pod:1529
7213 " initrd-cat /boot/initrd-<version>.img init\n"
7218 #: ../src/guestfs-actions.pod:1957
7219 msgid "See also C<guestfs_initrd_list>."
7223 #: ../src/guestfs-actions.pod:1959 ../src/guestfs-actions.pod:3929 ../src/guestfs-actions.pod:3952 ../src/guestfs-actions.pod:4104
7225 "This function returns a buffer, or NULL on error. The size of the returned "
7226 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
7231 #: ../src/guestfs-actions.pod:1966
7232 msgid "guestfs_initrd_list"
7236 #: ../src/guestfs-actions.pod:1968
7239 " char **guestfs_initrd_list (guestfs_h *g,\n"
7240 "\t\tconst char *path);\n"
7245 #: ../src/guestfs-actions.pod:1971 ../fish/guestfish-actions.pod:1540
7246 msgid "This command lists out files contained in an initrd."
7250 #: ../src/guestfs-actions.pod:1973 ../fish/guestfish-actions.pod:1542
7252 "The files are listed without any initial C</> character. The files are "
7253 "listed in the order they appear (not necessarily alphabetical). Directory "
7254 "names are listed as separate items."
7258 #: ../src/guestfs-actions.pod:1977 ../fish/guestfish-actions.pod:1546
7260 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
7261 "initrd. We I<only> support the newer initramfs format (compressed cpio "
7266 #: ../src/guestfs-actions.pod:1985
7267 msgid "guestfs_inotify_add_watch"
7271 #: ../src/guestfs-actions.pod:1987
7274 " int64_t guestfs_inotify_add_watch (guestfs_h *g,\n"
7275 "\t\tconst char *path,\n"
7281 #: ../src/guestfs-actions.pod:1991 ../fish/guestfish-actions.pod:1554
7282 msgid "Watch C<path> for the events listed in C<mask>."
7286 #: ../src/guestfs-actions.pod:1993 ../fish/guestfish-actions.pod:1556
7288 "Note that if C<path> is a directory then events within that directory are "
7289 "watched, but this does I<not> happen recursively (in subdirectories)."
7293 #: ../src/guestfs-actions.pod:1997 ../fish/guestfish-actions.pod:1560
7295 "Note for non-C or non-Linux callers: the inotify events are defined by the "
7296 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
7300 #: ../src/guestfs-actions.pod:2003
7301 msgid "guestfs_inotify_close"
7305 #: ../src/guestfs-actions.pod:2005
7308 " int guestfs_inotify_close (guestfs_h *g);\n"
7313 #: ../src/guestfs-actions.pod:2007 ../fish/guestfish-actions.pod:1568
7315 "This closes the inotify handle which was previously opened by inotify_init. "
7316 "It removes all watches, throws away any pending events, and deallocates all "
7321 #: ../src/guestfs-actions.pod:2013
7322 msgid "guestfs_inotify_files"
7326 #: ../src/guestfs-actions.pod:2015
7329 " char **guestfs_inotify_files (guestfs_h *g);\n"
7334 #: ../src/guestfs-actions.pod:2017
7336 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
7337 "returns a list of pathnames of objects that were touched. The returned "
7338 "pathnames are sorted and deduplicated."
7342 #: ../src/guestfs-actions.pod:2025
7343 msgid "guestfs_inotify_init"
7347 #: ../src/guestfs-actions.pod:2027
7350 " int guestfs_inotify_init (guestfs_h *g,\n"
7351 "\t\tint maxevents);\n"
7356 #: ../src/guestfs-actions.pod:2030 ../fish/guestfish-actions.pod:1584
7358 "This command creates a new inotify handle. The inotify subsystem can be "
7359 "used to notify events which happen to objects in the guest filesystem."
7363 #: ../src/guestfs-actions.pod:2034
7365 "C<maxevents> is the maximum number of events which will be queued up between "
7366 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
7367 "passed as C<0>, then the kernel (or previously set) default is used. For "
7368 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
7369 "throws away events, but records the fact that it threw them away by setting "
7370 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
7371 "C<guestfs_inotify_read>)."
7375 #: ../src/guestfs-actions.pod:2044
7377 "Before any events are generated, you have to add some watches to the "
7378 "internal watch list. See: C<guestfs_inotify_add_watch>, "
7379 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
7383 #: ../src/guestfs-actions.pod:2050
7385 "Queued up events should be read periodically by calling "
7386 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
7387 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
7388 "often enough then you risk the internal queue overflowing."
7392 #: ../src/guestfs-actions.pod:2057
7394 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
7395 "This also removes any watches automatically."
7399 #: ../src/guestfs-actions.pod:2061 ../fish/guestfish-actions.pod:1615
7401 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
7402 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
7403 "that there is one global inotify handle per libguestfs instance."
7407 #: ../src/guestfs-actions.pod:2068
7408 msgid "guestfs_inotify_read"
7412 #: ../src/guestfs-actions.pod:2070
7415 " struct guestfs_inotify_event_list *guestfs_inotify_read (guestfs_h *g);\n"
7420 #: ../src/guestfs-actions.pod:2072 ../fish/guestfish-actions.pod:1624
7422 "Return the complete queue of events that have happened since the previous "
7427 #: ../src/guestfs-actions.pod:2075 ../fish/guestfish-actions.pod:1627
7428 msgid "If no events have happened, this returns an empty list."
7432 #: ../src/guestfs-actions.pod:2077 ../fish/guestfish-actions.pod:1629
7434 "I<Note>: In order to make sure that all events have been read, you must call "
7435 "this function repeatedly until it returns an empty list. The reason is that "
7436 "the call will read events up to the maximum appliance-to-host message size "
7437 "and leave remaining events in the queue."
7441 #: ../src/guestfs-actions.pod:2083
7443 "This function returns a C<struct guestfs_inotify_event_list *> (see "
7444 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
7445 "must call C<guestfs_free_inotify_event_list> after use>."
7449 #: ../src/guestfs-actions.pod:2088
7450 msgid "guestfs_inotify_rm_watch"
7454 #: ../src/guestfs-actions.pod:2090
7457 " int guestfs_inotify_rm_watch (guestfs_h *g,\n"
7463 #: ../src/guestfs-actions.pod:2093
7465 "Remove a previously defined inotify watch. See "
7466 "C<guestfs_inotify_add_watch>."
7470 #: ../src/guestfs-actions.pod:2098
7471 msgid "guestfs_inspect_get_arch"
7475 #: ../src/guestfs-actions.pod:2100
7478 " char *guestfs_inspect_get_arch (guestfs_h *g,\n"
7479 "\t\tconst char *root);\n"
7484 #: ../src/guestfs-actions.pod:2103 ../src/guestfs-actions.pod:2123 ../src/guestfs-actions.pod:2173 ../src/guestfs-actions.pod:2196 ../src/guestfs-actions.pod:2220 ../src/guestfs-actions.pod:2238 ../src/guestfs-actions.pod:2268 ../src/guestfs-actions.pod:2289
7486 "This function should only be called with a root device string as returned by "
7487 "C<guestfs_inspect_os>."
7491 #: ../src/guestfs-actions.pod:2106
7493 "This returns the architecture of the inspected operating system. The "
7494 "possible return values are listed under C<guestfs_file_architecture>."
7498 #: ../src/guestfs-actions.pod:2110 ../fish/guestfish-actions.pod:1653
7500 "If the architecture could not be determined, then the string C<unknown> is "
7505 #: ../src/guestfs-actions.pod:2113 ../src/guestfs-actions.pod:2163 ../src/guestfs-actions.pod:2211 ../src/guestfs-actions.pod:2279 ../src/guestfs-actions.pod:2314 ../src/guestfs-actions.pod:2351 ../fish/guestfish-actions.pod:1656 ../fish/guestfish-actions.pod:1702 ../fish/guestfish-actions.pod:1741 ../fish/guestfish-actions.pod:1796 ../fish/guestfish-actions.pod:1827 ../fish/guestfish-actions.pod:1861
7506 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
7510 #: ../src/guestfs-actions.pod:2118
7511 msgid "guestfs_inspect_get_distro"
7515 #: ../src/guestfs-actions.pod:2120
7518 " char *guestfs_inspect_get_distro (guestfs_h *g,\n"
7519 "\t\tconst char *root);\n"
7524 #: ../src/guestfs-actions.pod:2126 ../fish/guestfish-actions.pod:1665
7525 msgid "This returns the distro (distribution) of the inspected operating system."
7529 #: ../src/guestfs-actions.pod:2129 ../fish/guestfish-actions.pod:1668
7530 msgid "Currently defined distros are:"
7534 #: ../src/guestfs-actions.pod:2133 ../fish/guestfish-actions.pod:1672
7539 #: ../src/guestfs-actions.pod:2135 ../fish/guestfish-actions.pod:1674
7540 msgid "Debian or a Debian-derived distro such as Ubuntu."
7544 #: ../src/guestfs-actions.pod:2137 ../fish/guestfish-actions.pod:1676
7549 #: ../src/guestfs-actions.pod:2139 ../fish/guestfish-actions.pod:1678
7554 #: ../src/guestfs-actions.pod:2141 ../fish/guestfish-actions.pod:1680
7555 msgid "\"redhat-based\""
7559 #: ../src/guestfs-actions.pod:2143 ../fish/guestfish-actions.pod:1682
7560 msgid "Some Red Hat-derived distro."
7564 #: ../src/guestfs-actions.pod:2145 ../fish/guestfish-actions.pod:1684
7569 #: ../src/guestfs-actions.pod:2147 ../fish/guestfish-actions.pod:1686
7570 msgid "Red Hat Enterprise Linux and some derivatives."
7574 #: ../src/guestfs-actions.pod:2149 ../src/guestfs-actions.pod:2301 ../fish/guestfish-actions.pod:1688 ../fish/guestfish-actions.pod:1814
7579 #: ../src/guestfs-actions.pod:2151 ../fish/guestfish-actions.pod:1690
7581 "Windows does not have distributions. This string is returned if the OS type "
7586 #: ../src/guestfs-actions.pod:2154 ../src/guestfs-actions.pod:2305 ../fish/guestfish-actions.pod:1693 ../fish/guestfish-actions.pod:1818
7591 #: ../src/guestfs-actions.pod:2156 ../fish/guestfish-actions.pod:1695
7592 msgid "The distro could not be determined."
7596 #: ../src/guestfs-actions.pod:2160 ../src/guestfs-actions.pod:2311 ../fish/guestfish-actions.pod:1699 ../fish/guestfish-actions.pod:1824
7598 "Future versions of libguestfs may return other strings here. The caller "
7599 "should be prepared to handle any string."
7603 #: ../src/guestfs-actions.pod:2168
7604 msgid "guestfs_inspect_get_filesystems"
7608 #: ../src/guestfs-actions.pod:2170
7611 " char **guestfs_inspect_get_filesystems (guestfs_h *g,\n"
7612 "\t\tconst char *root);\n"
7617 #: ../src/guestfs-actions.pod:2176 ../fish/guestfish-actions.pod:1711
7619 "This returns a list of all the filesystems that we think are associated with "
7620 "this operating system. This includes the root filesystem, other ordinary "
7621 "filesystems, and non-mounted devices like swap partitions."
7625 #: ../src/guestfs-actions.pod:2181 ../fish/guestfish-actions.pod:1716
7627 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
7628 "to be shared between operating systems."
7632 #: ../src/guestfs-actions.pod:2184
7634 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7635 "C<guestfs_inspect_get_mountpoints>."
7639 #: ../src/guestfs-actions.pod:2191
7640 msgid "guestfs_inspect_get_major_version"
7644 #: ../src/guestfs-actions.pod:2193
7647 " int guestfs_inspect_get_major_version (guestfs_h *g,\n"
7648 "\t\tconst char *root);\n"
7653 #: ../src/guestfs-actions.pod:2199 ../fish/guestfish-actions.pod:1729
7654 msgid "This returns the major version number of the inspected operating system."
7658 #: ../src/guestfs-actions.pod:2202 ../fish/guestfish-actions.pod:1732
7660 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
7661 "popular public names used by the operating system. Notably the operating "
7662 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
7663 "1). You can find out the real versions corresponding to releases of Windows "
7664 "by consulting Wikipedia or MSDN."
7668 #: ../src/guestfs-actions.pod:2209 ../src/guestfs-actions.pod:2226 ../fish/guestfish-actions.pod:1739 ../fish/guestfish-actions.pod:1753
7669 msgid "If the version could not be determined, then C<0> is returned."
7673 #: ../src/guestfs-actions.pod:2215
7674 msgid "guestfs_inspect_get_minor_version"
7678 #: ../src/guestfs-actions.pod:2217
7681 " int guestfs_inspect_get_minor_version (guestfs_h *g,\n"
7682 "\t\tconst char *root);\n"
7687 #: ../src/guestfs-actions.pod:2223 ../fish/guestfish-actions.pod:1750
7688 msgid "This returns the minor version number of the inspected operating system."
7692 #: ../src/guestfs-actions.pod:2228
7694 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7695 "C<guestfs_inspect_get_major_version>."
7699 #: ../src/guestfs-actions.pod:2233
7700 msgid "guestfs_inspect_get_mountpoints"
7704 #: ../src/guestfs-actions.pod:2235
7707 " char **guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
7708 "\t\tconst char *root);\n"
7713 #: ../src/guestfs-actions.pod:2241 ../fish/guestfish-actions.pod:1765
7715 "This returns a hash of where we think the filesystems associated with this "
7716 "operating system should be mounted. Callers should note that this is at "
7717 "best an educated guess made by reading configuration files such as "
7722 #: ../src/guestfs-actions.pod:2246 ../fish/guestfish-actions.pod:1770
7724 "Each element in the returned hashtable has a key which is the path of the "
7725 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
7726 "mounted there (eg. C</dev/sda1>)."
7730 #: ../src/guestfs-actions.pod:2251 ../fish/guestfish-actions.pod:1775
7731 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
7735 #: ../src/guestfs-actions.pod:2254
7737 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7738 "C<guestfs_inspect_get_filesystems>."
7742 #: ../src/guestfs-actions.pod:2257 ../src/guestfs-actions.pod:2597 ../src/guestfs-actions.pod:3551 ../src/guestfs-actions.pod:5134
7744 "This function returns a NULL-terminated array of strings, or NULL if there "
7745 "was an error. The array of strings will always have length C<2n+1>, where "
7746 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
7747 "caller must free the strings and the array after use>."
7751 #: ../src/guestfs-actions.pod:2263
7752 msgid "guestfs_inspect_get_product_name"
7756 #: ../src/guestfs-actions.pod:2265
7759 " char *guestfs_inspect_get_product_name (guestfs_h *g,\n"
7760 "\t\tconst char *root);\n"
7765 #: ../src/guestfs-actions.pod:2271 ../fish/guestfish-actions.pod:1788
7767 "This returns the product name of the inspected operating system. The "
7768 "product name is generally some freeform string which can be displayed to the "
7769 "user, but should not be parsed by programs."
7773 #: ../src/guestfs-actions.pod:2276 ../fish/guestfish-actions.pod:1793
7775 "If the product name could not be determined, then the string C<unknown> is "
7780 #: ../src/guestfs-actions.pod:2284
7781 msgid "guestfs_inspect_get_type"
7785 #: ../src/guestfs-actions.pod:2286
7788 " char *guestfs_inspect_get_type (guestfs_h *g,\n"
7789 "\t\tconst char *root);\n"
7794 #: ../src/guestfs-actions.pod:2292 ../fish/guestfish-actions.pod:1805
7796 "This returns the type of the inspected operating system. Currently defined "
7801 #: ../src/guestfs-actions.pod:2297 ../fish/guestfish-actions.pod:1810
7806 #: ../src/guestfs-actions.pod:2299 ../fish/guestfish-actions.pod:1812
7807 msgid "Any Linux-based operating system."
7811 #: ../src/guestfs-actions.pod:2303 ../fish/guestfish-actions.pod:1816
7812 msgid "Any Microsoft Windows operating system."
7816 #: ../src/guestfs-actions.pod:2307 ../fish/guestfish-actions.pod:1820
7817 msgid "The operating system type could not be determined."
7821 #: ../src/guestfs-actions.pod:2319
7822 msgid "guestfs_inspect_os"
7826 #: ../src/guestfs-actions.pod:2321
7829 " char **guestfs_inspect_os (guestfs_h *g);\n"
7834 #: ../src/guestfs-actions.pod:2323 ../fish/guestfish-actions.pod:1833
7836 "This function uses other libguestfs functions and certain heuristics to "
7837 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
7838 "for operating systems."
7842 #: ../src/guestfs-actions.pod:2327 ../fish/guestfish-actions.pod:1837
7843 msgid "The list returned is empty if no operating systems were found."
7847 #: ../src/guestfs-actions.pod:2329 ../fish/guestfish-actions.pod:1839
7849 "If one operating system was found, then this returns a list with a single "
7850 "element, which is the name of the root filesystem of this operating system. "
7851 "It is also possible for this function to return a list containing more than "
7852 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
7853 "element being the root filesystem of one of the operating systems."
7857 #: ../src/guestfs-actions.pod:2336
7859 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
7860 "functions in order to query further information about each operating system, "
7861 "such as the name and version."
7865 #: ../src/guestfs-actions.pod:2341
7867 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
7868 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
7869 "the contents. This should be called with no disks currently mounted. The "
7870 "function may also use Augeas, so any existing Augeas handle will be closed."
7874 #: ../src/guestfs-actions.pod:2347 ../fish/guestfish-actions.pod:1857
7876 "This function cannot decrypt encrypted disks. The caller must do that first "
7877 "(supplying the necessary keys) if the disk is encrypted."
7881 #: ../src/guestfs-actions.pod:2353 ../src/guestfs-actions.pod:2558 ../src/guestfs-actions.pod:2614
7882 msgid "See also C<guestfs_list_filesystems>."
7886 #: ../src/guestfs-actions.pod:2359
7887 msgid "guestfs_is_blockdev"
7891 #: ../src/guestfs-actions.pod:2361
7894 " int guestfs_is_blockdev (guestfs_h *g,\n"
7895 "\t\tconst char *path);\n"
7900 #: ../src/guestfs-actions.pod:2364 ../fish/guestfish-actions.pod:1869
7902 "This returns C<true> if and only if there is a block device with the given "
7907 #: ../src/guestfs-actions.pod:2367 ../src/guestfs-actions.pod:2390 ../src/guestfs-actions.pod:2414 ../src/guestfs-actions.pod:2426 ../src/guestfs-actions.pod:2439 ../src/guestfs-actions.pod:2483 ../src/guestfs-actions.pod:2495
7908 msgid "See also C<guestfs_stat>."
7912 #: ../src/guestfs-actions.pod:2371
7913 msgid "guestfs_is_busy"
7917 #: ../src/guestfs-actions.pod:2373
7920 " int guestfs_is_busy (guestfs_h *g);\n"
7925 #: ../src/guestfs-actions.pod:2375 ../fish/guestfish-actions.pod:1878
7927 "This returns true iff this handle is busy processing a command (in the "
7932 #: ../src/guestfs-actions.pod:2382
7933 msgid "guestfs_is_chardev"
7937 #: ../src/guestfs-actions.pod:2384
7940 " int guestfs_is_chardev (guestfs_h *g,\n"
7941 "\t\tconst char *path);\n"
7946 #: ../src/guestfs-actions.pod:2387 ../fish/guestfish-actions.pod:1887
7948 "This returns C<true> if and only if there is a character device with the "
7949 "given C<path> name."
7953 #: ../src/guestfs-actions.pod:2394
7954 msgid "guestfs_is_config"
7958 #: ../src/guestfs-actions.pod:2396
7961 " int guestfs_is_config (guestfs_h *g);\n"
7966 #: ../src/guestfs-actions.pod:2398 ../fish/guestfish-actions.pod:1896
7968 "This returns true iff this handle is being configured (in the C<CONFIG> "
7973 #: ../src/guestfs-actions.pod:2405
7974 msgid "guestfs_is_dir"
7978 #: ../src/guestfs-actions.pod:2407
7981 " int guestfs_is_dir (guestfs_h *g,\n"
7982 "\t\tconst char *path);\n"
7987 #: ../src/guestfs-actions.pod:2410 ../fish/guestfish-actions.pod:1905
7989 "This returns C<true> if and only if there is a directory with the given "
7990 "C<path> name. Note that it returns false for other objects like files."
7994 #: ../src/guestfs-actions.pod:2418
7995 msgid "guestfs_is_fifo"
7999 #: ../src/guestfs-actions.pod:2420
8002 " int guestfs_is_fifo (guestfs_h *g,\n"
8003 "\t\tconst char *path);\n"
8008 #: ../src/guestfs-actions.pod:2423 ../fish/guestfish-actions.pod:1915
8010 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
8011 "given C<path> name."
8015 #: ../src/guestfs-actions.pod:2430
8016 msgid "guestfs_is_file"
8020 #: ../src/guestfs-actions.pod:2432
8023 " int guestfs_is_file (guestfs_h *g,\n"
8024 "\t\tconst char *path);\n"
8029 #: ../src/guestfs-actions.pod:2435 ../fish/guestfish-actions.pod:1924
8031 "This returns C<true> if and only if there is a regular file with the given "
8032 "C<path> name. Note that it returns false for other objects like "
8037 #: ../src/guestfs-actions.pod:2443
8038 msgid "guestfs_is_launching"
8042 #: ../src/guestfs-actions.pod:2445
8045 " int guestfs_is_launching (guestfs_h *g);\n"
8050 #: ../src/guestfs-actions.pod:2447 ../fish/guestfish-actions.pod:1934
8052 "This returns true iff this handle is launching the subprocess (in the "
8053 "C<LAUNCHING> state)."
8057 #: ../src/guestfs-actions.pod:2454
8058 msgid "guestfs_is_lv"
8062 #: ../src/guestfs-actions.pod:2456
8065 " int guestfs_is_lv (guestfs_h *g,\n"
8066 "\t\tconst char *device);\n"
8071 #: ../src/guestfs-actions.pod:2459 ../fish/guestfish-actions.pod:1943
8073 "This command tests whether C<device> is a logical volume, and returns true "
8074 "iff this is the case."
8078 #: ../src/guestfs-actions.pod:2464
8079 msgid "guestfs_is_ready"
8083 #: ../src/guestfs-actions.pod:2466
8086 " int guestfs_is_ready (guestfs_h *g);\n"
8091 #: ../src/guestfs-actions.pod:2468 ../fish/guestfish-actions.pod:1950
8093 "This returns true iff this handle is ready to accept commands (in the "
8098 #: ../src/guestfs-actions.pod:2475
8099 msgid "guestfs_is_socket"
8103 #: ../src/guestfs-actions.pod:2477
8106 " int guestfs_is_socket (guestfs_h *g,\n"
8107 "\t\tconst char *path);\n"
8112 #: ../src/guestfs-actions.pod:2480 ../fish/guestfish-actions.pod:1959
8114 "This returns C<true> if and only if there is a Unix domain socket with the "
8115 "given C<path> name."
8119 #: ../src/guestfs-actions.pod:2487
8120 msgid "guestfs_is_symlink"
8124 #: ../src/guestfs-actions.pod:2489
8127 " int guestfs_is_symlink (guestfs_h *g,\n"
8128 "\t\tconst char *path);\n"
8133 #: ../src/guestfs-actions.pod:2492 ../fish/guestfish-actions.pod:1968
8135 "This returns C<true> if and only if there is a symbolic link with the given "
8140 #: ../src/guestfs-actions.pod:2499
8141 msgid "guestfs_kill_subprocess"
8145 #: ../src/guestfs-actions.pod:2501
8148 " int guestfs_kill_subprocess (guestfs_h *g);\n"
8153 #: ../src/guestfs-actions.pod:2503 ../fish/guestfish-actions.pod:1977
8154 msgid "This kills the qemu subprocess. You should never need to call this."
8158 #: ../src/guestfs-actions.pod:2507
8159 msgid "guestfs_launch"
8163 #: ../src/guestfs-actions.pod:2509
8166 " int guestfs_launch (guestfs_h *g);\n"
8171 #: ../src/guestfs-actions.pod:2511 ../fish/guestfish-actions.pod:1985
8173 "Internally libguestfs is implemented by running a virtual machine using "
8178 #: ../src/guestfs-actions.pod:2514 ../fish/guestfish-actions.pod:1988
8180 "You should call this after configuring the handle (eg. adding drives) but "
8181 "before performing any actions."
8185 #: ../src/guestfs-actions.pod:2519
8186 msgid "guestfs_lchown"
8190 #: ../src/guestfs-actions.pod:2521
8193 " int guestfs_lchown (guestfs_h *g,\n"
8196 "\t\tconst char *path);\n"
8201 #: ../src/guestfs-actions.pod:2526
8203 "Change the file owner to C<owner> and group to C<group>. This is like "
8204 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
8205 "changed, not the target."
8209 #: ../src/guestfs-actions.pod:2536
8210 msgid "guestfs_lgetxattrs"
8214 #: ../src/guestfs-actions.pod:2538
8217 " struct guestfs_xattr_list *guestfs_lgetxattrs (guestfs_h *g,\n"
8218 "\t\tconst char *path);\n"
8223 #: ../src/guestfs-actions.pod:2541
8225 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
8226 "then it returns the extended attributes of the link itself."
8230 #: ../src/guestfs-actions.pod:2550
8231 msgid "guestfs_list_devices"
8235 #: ../src/guestfs-actions.pod:2552
8238 " char **guestfs_list_devices (guestfs_h *g);\n"
8243 #: ../src/guestfs-actions.pod:2554 ../fish/guestfish-actions.pod:2015
8244 msgid "List all the block devices."
8248 #: ../src/guestfs-actions.pod:2556 ../fish/guestfish-actions.pod:2017
8249 msgid "The full block device names are returned, eg. C</dev/sda>."
8253 #: ../src/guestfs-actions.pod:2564
8254 msgid "guestfs_list_filesystems"
8258 #: ../src/guestfs-actions.pod:2566
8261 " char **guestfs_list_filesystems (guestfs_h *g);\n"
8266 #: ../src/guestfs-actions.pod:2568 ../fish/guestfish-actions.pod:2025
8268 "This inspection command looks for filesystems on partitions, block devices "
8269 "and logical volumes, returning a list of devices containing filesystems and "
8274 #: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:2029
8276 "The return value is a hash, where the keys are the devices containing "
8277 "filesystems, and the values are the filesystem types. For example:"
8281 #: ../src/guestfs-actions.pod:2576 ../fish/guestfish-actions.pod:2033
8284 " \"/dev/sda1\" => \"ntfs\"\n"
8285 " \"/dev/sda2\" => \"ext2\"\n"
8286 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
8287 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
8292 #: ../src/guestfs-actions.pod:2581 ../fish/guestfish-actions.pod:2038
8294 "The value can have the special value \"unknown\", meaning the content of the "
8295 "device is undetermined or empty. \"swap\" means a Linux swap partition."
8299 #: ../src/guestfs-actions.pod:2585
8301 "This command runs other libguestfs commands, which might include "
8302 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
8303 "soon after launch and only when nothing is mounted."
8307 #: ../src/guestfs-actions.pod:2589
8309 "Not all of the filesystems returned will be mountable. In particular, swap "
8310 "partitions are returned in the list. Also this command does not check that "
8311 "each filesystem found is valid and mountable, and some filesystems might be "
8312 "mountable but require special options. Filesystems may not all belong to a "
8313 "single logical operating system (use C<guestfs_inspect_os> to look for "
8318 #: ../src/guestfs-actions.pod:2603
8319 msgid "guestfs_list_partitions"
8323 #: ../src/guestfs-actions.pod:2605
8326 " char **guestfs_list_partitions (guestfs_h *g);\n"
8331 #: ../src/guestfs-actions.pod:2607 ../fish/guestfish-actions.pod:2058
8332 msgid "List all the partitions detected on all block devices."
8336 #: ../src/guestfs-actions.pod:2609 ../fish/guestfish-actions.pod:2060
8337 msgid "The full partition device names are returned, eg. C</dev/sda1>"
8341 #: ../src/guestfs-actions.pod:2611
8343 "This does not return logical volumes. For that you will need to call "
8348 #: ../src/guestfs-actions.pod:2620
8353 #: ../src/guestfs-actions.pod:2622
8356 " char *guestfs_ll (guestfs_h *g,\n"
8357 "\t\tconst char *directory);\n"
8362 #: ../src/guestfs-actions.pod:2625 ../fish/guestfish-actions.pod:2071
8364 "List the files in C<directory> (relative to the root directory, there is no "
8365 "cwd) in the format of 'ls -la'."
8369 #: ../src/guestfs-actions.pod:2628 ../fish/guestfish-actions.pod:2074
8371 "This command is mostly useful for interactive sessions. It is I<not> "
8372 "intended that you try to parse the output string."
8376 #: ../src/guestfs-actions.pod:2634
8381 #: ../src/guestfs-actions.pod:2636
8384 " int guestfs_ln (guestfs_h *g,\n"
8385 "\t\tconst char *target,\n"
8386 "\t\tconst char *linkname);\n"
8391 #: ../src/guestfs-actions.pod:2640 ../fish/guestfish-actions.pod:2081
8392 msgid "This command creates a hard link using the C<ln> command."
8396 #: ../src/guestfs-actions.pod:2644
8397 msgid "guestfs_ln_f"
8401 #: ../src/guestfs-actions.pod:2646
8404 " int guestfs_ln_f (guestfs_h *g,\n"
8405 "\t\tconst char *target,\n"
8406 "\t\tconst char *linkname);\n"
8411 #: ../src/guestfs-actions.pod:2650 ../fish/guestfish-actions.pod:2087
8413 "This command creates a hard link using the C<ln -f> command. The C<-f> "
8414 "option removes the link (C<linkname>) if it exists already."
8418 #: ../src/guestfs-actions.pod:2655
8419 msgid "guestfs_ln_s"
8423 #: ../src/guestfs-actions.pod:2657
8426 " int guestfs_ln_s (guestfs_h *g,\n"
8427 "\t\tconst char *target,\n"
8428 "\t\tconst char *linkname);\n"
8433 #: ../src/guestfs-actions.pod:2661 ../fish/guestfish-actions.pod:2094
8434 msgid "This command creates a symbolic link using the C<ln -s> command."
8438 #: ../src/guestfs-actions.pod:2665
8439 msgid "guestfs_ln_sf"
8443 #: ../src/guestfs-actions.pod:2667
8446 " int guestfs_ln_sf (guestfs_h *g,\n"
8447 "\t\tconst char *target,\n"
8448 "\t\tconst char *linkname);\n"
8453 #: ../src/guestfs-actions.pod:2671 ../fish/guestfish-actions.pod:2100
8455 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
8456 "option removes the link (C<linkname>) if it exists already."
8460 #: ../src/guestfs-actions.pod:2676
8461 msgid "guestfs_lremovexattr"
8465 #: ../src/guestfs-actions.pod:2678
8468 " int guestfs_lremovexattr (guestfs_h *g,\n"
8469 "\t\tconst char *xattr,\n"
8470 "\t\tconst char *path);\n"
8475 #: ../src/guestfs-actions.pod:2682
8477 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
8478 "link, then it removes an extended attribute of the link itself."
8482 #: ../src/guestfs-actions.pod:2688
8487 #: ../src/guestfs-actions.pod:2690
8490 " char **guestfs_ls (guestfs_h *g,\n"
8491 "\t\tconst char *directory);\n"
8496 #: ../src/guestfs-actions.pod:2693 ../fish/guestfish-actions.pod:2115
8498 "List the files in C<directory> (relative to the root directory, there is no "
8499 "cwd). The '.' and '..' entries are not returned, but hidden files are "
8504 #: ../src/guestfs-actions.pod:2697
8506 "This command is mostly useful for interactive sessions. Programs should "
8507 "probably use C<guestfs_readdir> instead."
8511 #: ../src/guestfs-actions.pod:2704
8512 msgid "guestfs_lsetxattr"
8516 #: ../src/guestfs-actions.pod:2706
8519 " int guestfs_lsetxattr (guestfs_h *g,\n"
8520 "\t\tconst char *xattr,\n"
8521 "\t\tconst char *val,\n"
8523 "\t\tconst char *path);\n"
8528 #: ../src/guestfs-actions.pod:2712
8530 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
8531 "then it sets an extended attribute of the link itself."
8535 #: ../src/guestfs-actions.pod:2718
8536 msgid "guestfs_lstat"
8540 #: ../src/guestfs-actions.pod:2720
8543 " struct guestfs_stat *guestfs_lstat (guestfs_h *g,\n"
8544 "\t\tconst char *path);\n"
8549 #: ../src/guestfs-actions.pod:2723 ../src/guestfs-actions.pod:4799 ../fish/guestfish-actions.pod:2134 ../fish/guestfish-actions.pod:3716
8550 msgid "Returns file information for the given C<path>."
8554 #: ../src/guestfs-actions.pod:2725
8556 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
8557 "link, then the link is stat-ed, not the file it refers to."
8561 #: ../src/guestfs-actions.pod:2729 ../fish/guestfish-actions.pod:2140
8562 msgid "This is the same as the C<lstat(2)> system call."
8566 #: ../src/guestfs-actions.pod:2731 ../src/guestfs-actions.pod:4803
8568 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
8569 "error. I<The caller must call C<guestfs_free_stat> after use>."
8573 #: ../src/guestfs-actions.pod:2735
8574 msgid "guestfs_lstatlist"
8578 #: ../src/guestfs-actions.pod:2737
8581 " struct guestfs_stat_list *guestfs_lstatlist (guestfs_h *g,\n"
8582 "\t\tconst char *path,\n"
8583 "\t\tchar *const *names);\n"
8588 #: ../src/guestfs-actions.pod:2741
8590 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
8591 "files, where all files are in the directory C<path>. C<names> is the list "
8592 "of files from this directory."
8596 #: ../src/guestfs-actions.pod:2745 ../fish/guestfish-actions.pod:2150
8598 "On return you get a list of stat structs, with a one-to-one correspondence "
8599 "to the C<names> list. If any name did not exist or could not be lstat'd, "
8600 "then the C<ino> field of that structure is set to C<-1>."
8604 #: ../src/guestfs-actions.pod:2750
8606 "This call is intended for programs that want to efficiently list a directory "
8607 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
8608 "for a similarly efficient call for getting extended attributes. Very long "
8609 "directory listings might cause the protocol message size to be exceeded, "
8610 "causing this call to fail. The caller must split up such requests into "
8611 "smaller groups of names."
8615 #: ../src/guestfs-actions.pod:2758
8617 "This function returns a C<struct guestfs_stat_list *> (see "
8618 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
8619 "must call C<guestfs_free_stat_list> after use>."
8623 #: ../src/guestfs-actions.pod:2763
8624 msgid "guestfs_luks_add_key"
8628 #: ../src/guestfs-actions.pod:2765
8631 " int guestfs_luks_add_key (guestfs_h *g,\n"
8632 "\t\tconst char *device,\n"
8633 "\t\tconst char *key,\n"
8634 "\t\tconst char *newkey,\n"
8635 "\t\tint keyslot);\n"
8640 #: ../src/guestfs-actions.pod:2771 ../fish/guestfish-actions.pod:2167
8642 "This command adds a new key on LUKS device C<device>. C<key> is any "
8643 "existing key, and is used to access the device. C<newkey> is the new key to "
8644 "add. C<keyslot> is the key slot that will be replaced."
8648 #: ../src/guestfs-actions.pod:2776
8650 "Note that if C<keyslot> already contains a key, then this command will "
8651 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
8655 #: ../src/guestfs-actions.pod:2782 ../src/guestfs-actions.pod:2816 ../src/guestfs-actions.pod:2836 ../src/guestfs-actions.pod:2853 ../src/guestfs-actions.pod:2882 ../src/guestfs-actions.pod:2898
8657 "This function takes a key or passphrase parameter which could contain "
8658 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
8663 #: ../src/guestfs-actions.pod:2786
8664 msgid "guestfs_luks_close"
8668 #: ../src/guestfs-actions.pod:2788
8671 " int guestfs_luks_close (guestfs_h *g,\n"
8672 "\t\tconst char *device);\n"
8677 #: ../src/guestfs-actions.pod:2791
8679 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
8680 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
8681 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
8682 "underlying block device."
8686 #: ../src/guestfs-actions.pod:2799
8687 msgid "guestfs_luks_format"
8691 #: ../src/guestfs-actions.pod:2801
8694 " int guestfs_luks_format (guestfs_h *g,\n"
8695 "\t\tconst char *device,\n"
8696 "\t\tconst char *key,\n"
8697 "\t\tint keyslot);\n"
8702 #: ../src/guestfs-actions.pod:2806 ../fish/guestfish-actions.pod:2193
8704 "This command erases existing data on C<device> and formats the device as a "
8705 "LUKS encrypted device. C<key> is the initial key, which is added to key "
8706 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
8710 #: ../src/guestfs-actions.pod:2813 ../src/guestfs-actions.pod:2833 ../src/guestfs-actions.pod:2952 ../src/guestfs-actions.pod:3679 ../src/guestfs-actions.pod:4340 ../src/guestfs-actions.pod:4661 ../src/guestfs-actions.pod:4681 ../src/guestfs-actions.pod:4704 ../src/guestfs-actions.pod:5669 ../fish/guestfish-actions.pod:2201 ../fish/guestfish-actions.pod:2214 ../fish/guestfish-actions.pod:2298 ../fish/guestfish-actions.pod:2828 ../fish/guestfish-actions.pod:3335 ../fish/guestfish-actions.pod:3615 ../fish/guestfish-actions.pod:3631 ../fish/guestfish-actions.pod:3646 ../fish/guestfish-actions.pod:4361
8712 "B<This command is dangerous. Without careful use you can easily destroy all "
8717 #: ../src/guestfs-actions.pod:2820
8718 msgid "guestfs_luks_format_cipher"
8722 #: ../src/guestfs-actions.pod:2822
8725 " int guestfs_luks_format_cipher (guestfs_h *g,\n"
8726 "\t\tconst char *device,\n"
8727 "\t\tconst char *key,\n"
8728 "\t\tint keyslot,\n"
8729 "\t\tconst char *cipher);\n"
8734 #: ../src/guestfs-actions.pod:2828
8736 "This command is the same as C<guestfs_luks_format> but it also allows you to "
8737 "set the C<cipher> used."
8741 #: ../src/guestfs-actions.pod:2840
8742 msgid "guestfs_luks_kill_slot"
8746 #: ../src/guestfs-actions.pod:2842
8749 " int guestfs_luks_kill_slot (guestfs_h *g,\n"
8750 "\t\tconst char *device,\n"
8751 "\t\tconst char *key,\n"
8752 "\t\tint keyslot);\n"
8757 #: ../src/guestfs-actions.pod:2847 ../fish/guestfish-actions.pod:2221
8759 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
8760 "device C<device>. C<key> must be one of the I<other> keys."
8764 #: ../src/guestfs-actions.pod:2857
8765 msgid "guestfs_luks_open"
8769 #: ../src/guestfs-actions.pod:2859
8772 " int guestfs_luks_open (guestfs_h *g,\n"
8773 "\t\tconst char *device,\n"
8774 "\t\tconst char *key,\n"
8775 "\t\tconst char *mapname);\n"
8780 #: ../src/guestfs-actions.pod:2864 ../fish/guestfish-actions.pod:2232
8782 "This command opens a block device which has been encrypted according to the "
8783 "Linux Unified Key Setup (LUKS) standard."
8787 #: ../src/guestfs-actions.pod:2867 ../fish/guestfish-actions.pod:2235
8788 msgid "C<device> is the encrypted block device or partition."
8792 #: ../src/guestfs-actions.pod:2869 ../fish/guestfish-actions.pod:2237
8794 "The caller must supply one of the keys associated with the LUKS block "
8795 "device, in the C<key> parameter."
8799 #: ../src/guestfs-actions.pod:2872 ../fish/guestfish-actions.pod:2240
8801 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
8802 "writes to this block device are decrypted from and encrypted to the "
8803 "underlying C<device> respectively."
8807 #: ../src/guestfs-actions.pod:2876
8809 "If this block device contains LVM volume groups, then calling "
8810 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
8815 #: ../src/guestfs-actions.pod:2886
8816 msgid "guestfs_luks_open_ro"
8820 #: ../src/guestfs-actions.pod:2888
8823 " int guestfs_luks_open_ro (guestfs_h *g,\n"
8824 "\t\tconst char *device,\n"
8825 "\t\tconst char *key,\n"
8826 "\t\tconst char *mapname);\n"
8831 #: ../src/guestfs-actions.pod:2893
8833 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
8838 #: ../src/guestfs-actions.pod:2902
8839 msgid "guestfs_lvcreate"
8843 #: ../src/guestfs-actions.pod:2904
8846 " int guestfs_lvcreate (guestfs_h *g,\n"
8847 "\t\tconst char *logvol,\n"
8848 "\t\tconst char *volgroup,\n"
8849 "\t\tint mbytes);\n"
8854 #: ../src/guestfs-actions.pod:2909 ../fish/guestfish-actions.pod:2265
8856 "This creates an LVM logical volume called C<logvol> on the volume group "
8857 "C<volgroup>, with C<size> megabytes."
8861 #: ../src/guestfs-actions.pod:2914
8862 msgid "guestfs_lvm_canonical_lv_name"
8866 #: ../src/guestfs-actions.pod:2916
8869 " char *guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
8870 "\t\tconst char *lvname);\n"
8875 #: ../src/guestfs-actions.pod:2919 ../fish/guestfish-actions.pod:2272
8877 "This converts alternative naming schemes for LVs that you might find to the "
8878 "canonical name. For example, C</dev/mapper/VG-LV> is converted to "
8883 #: ../src/guestfs-actions.pod:2923 ../fish/guestfish-actions.pod:2276
8885 "This command returns an error if the C<lvname> parameter does not refer to a "
8890 #: ../src/guestfs-actions.pod:2926
8891 msgid "See also C<guestfs_is_lv>."
8895 #: ../src/guestfs-actions.pod:2931
8896 msgid "guestfs_lvm_clear_filter"
8900 #: ../src/guestfs-actions.pod:2933
8903 " int guestfs_lvm_clear_filter (guestfs_h *g);\n"
8908 #: ../src/guestfs-actions.pod:2935
8910 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
8911 "see every block device."
8915 #: ../src/guestfs-actions.pod:2938 ../src/guestfs-actions.pod:2974 ../fish/guestfish-actions.pod:2288 ../fish/guestfish-actions.pod:2319
8916 msgid "This command also clears the LVM cache and performs a volume group scan."
8920 #: ../src/guestfs-actions.pod:2943
8921 msgid "guestfs_lvm_remove_all"
8925 #: ../src/guestfs-actions.pod:2945
8928 " int guestfs_lvm_remove_all (guestfs_h *g);\n"
8933 #: ../src/guestfs-actions.pod:2947 ../fish/guestfish-actions.pod:2295
8935 "This command removes all LVM logical volumes, volume groups and physical "
8940 #: ../src/guestfs-actions.pod:2955
8941 msgid "guestfs_lvm_set_filter"
8945 #: ../src/guestfs-actions.pod:2957
8948 " int guestfs_lvm_set_filter (guestfs_h *g,\n"
8949 "\t\tchar *const *devices);\n"
8954 #: ../src/guestfs-actions.pod:2960 ../fish/guestfish-actions.pod:2305
8956 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
8957 "block devices in the list C<devices>, and will ignore all other attached "
8962 #: ../src/guestfs-actions.pod:2964 ../fish/guestfish-actions.pod:2309
8964 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
8965 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
8966 "there are two types of duplication possible: either cloned PVs/VGs which "
8967 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
8968 "same name. In normal operation you cannot create this situation, but you "
8969 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
8970 "inside the LVM metadata."
8974 #: ../src/guestfs-actions.pod:2977 ../fish/guestfish-actions.pod:2322
8975 msgid "You can filter whole block devices or individual partitions."
8979 #: ../src/guestfs-actions.pod:2979 ../fish/guestfish-actions.pod:2324
8981 "You cannot use this if any VG is currently in use (eg. contains a mounted "
8982 "filesystem), even if you are not filtering out that VG."
8986 #: ../src/guestfs-actions.pod:2985
8987 msgid "guestfs_lvremove"
8991 #: ../src/guestfs-actions.pod:2987
8994 " int guestfs_lvremove (guestfs_h *g,\n"
8995 "\t\tconst char *device);\n"
9000 #: ../src/guestfs-actions.pod:2990 ../fish/guestfish-actions.pod:2332
9002 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
9003 "LV, such as C</dev/VG/LV>."
9007 #: ../src/guestfs-actions.pod:2993 ../fish/guestfish-actions.pod:2335
9009 "You can also remove all LVs in a volume group by specifying the VG name, "
9014 #: ../src/guestfs-actions.pod:2998
9015 msgid "guestfs_lvrename"
9019 #: ../src/guestfs-actions.pod:3000
9022 " int guestfs_lvrename (guestfs_h *g,\n"
9023 "\t\tconst char *logvol,\n"
9024 "\t\tconst char *newlogvol);\n"
9029 #: ../src/guestfs-actions.pod:3004 ../fish/guestfish-actions.pod:2342
9030 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
9034 #: ../src/guestfs-actions.pod:3008
9035 msgid "guestfs_lvresize"
9039 #: ../src/guestfs-actions.pod:3010
9042 " int guestfs_lvresize (guestfs_h *g,\n"
9043 "\t\tconst char *device,\n"
9044 "\t\tint mbytes);\n"
9049 #: ../src/guestfs-actions.pod:3014 ../fish/guestfish-actions.pod:2348
9051 "This resizes (expands or shrinks) an existing LVM logical volume to "
9052 "C<mbytes>. When reducing, data in the reduced part is lost."
9056 #: ../src/guestfs-actions.pod:3020
9057 msgid "guestfs_lvresize_free"
9061 #: ../src/guestfs-actions.pod:3022
9064 " int guestfs_lvresize_free (guestfs_h *g,\n"
9065 "\t\tconst char *lv,\n"
9066 "\t\tint percent);\n"
9071 #: ../src/guestfs-actions.pod:3026 ../fish/guestfish-actions.pod:2356
9073 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
9074 "remaining free space in the volume group. Commonly you would call this with "
9075 "pc = 100 which expands the logical volume as much as possible, using all "
9076 "remaining free space in the volume group."
9080 #: ../src/guestfs-actions.pod:3034
9085 #: ../src/guestfs-actions.pod:3036
9088 " char **guestfs_lvs (guestfs_h *g);\n"
9093 #: ../src/guestfs-actions.pod:3038 ../fish/guestfish-actions.pod:2366
9095 "List all the logical volumes detected. This is the equivalent of the "
9096 "L<lvs(8)> command."
9100 #: ../src/guestfs-actions.pod:3041 ../fish/guestfish-actions.pod:2369
9102 "This returns a list of the logical volume device names "
9103 "(eg. C</dev/VolGroup00/LogVol00>)."
9107 #: ../src/guestfs-actions.pod:3044
9108 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
9112 #: ../src/guestfs-actions.pod:3050
9113 msgid "guestfs_lvs_full"
9117 #: ../src/guestfs-actions.pod:3052
9120 " struct guestfs_lvm_lv_list *guestfs_lvs_full (guestfs_h *g);\n"
9125 #: ../src/guestfs-actions.pod:3054 ../fish/guestfish-actions.pod:2378
9127 "List all the logical volumes detected. This is the equivalent of the "
9128 "L<lvs(8)> command. The \"full\" version includes all fields."
9132 #: ../src/guestfs-actions.pod:3057
9134 "This function returns a C<struct guestfs_lvm_lv_list *> (see "
9135 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
9136 "must call C<guestfs_free_lvm_lv_list> after use>."
9140 #: ../src/guestfs-actions.pod:3062
9141 msgid "guestfs_lvuuid"
9145 #: ../src/guestfs-actions.pod:3064
9148 " char *guestfs_lvuuid (guestfs_h *g,\n"
9149 "\t\tconst char *device);\n"
9154 #: ../src/guestfs-actions.pod:3067 ../fish/guestfish-actions.pod:2385
9155 msgid "This command returns the UUID of the LVM LV C<device>."
9159 #: ../src/guestfs-actions.pod:3072
9160 msgid "guestfs_lxattrlist"
9164 #: ../src/guestfs-actions.pod:3074
9167 " struct guestfs_xattr_list *guestfs_lxattrlist (guestfs_h *g,\n"
9168 "\t\tconst char *path,\n"
9169 "\t\tchar *const *names);\n"
9174 #: ../src/guestfs-actions.pod:3078 ../fish/guestfish-actions.pod:2391
9176 "This call allows you to get the extended attributes of multiple files, where "
9177 "all files are in the directory C<path>. C<names> is the list of files from "
9182 #: ../src/guestfs-actions.pod:3082 ../fish/guestfish-actions.pod:2395
9184 "On return you get a flat list of xattr structs which must be interpreted "
9185 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
9186 "C<attrval> in this struct is zero-length to indicate there was an error "
9187 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
9188 "number (the number of following attributes for this file, which could be "
9189 "C<\"0\">). Then after the first xattr struct are the zero or more "
9190 "attributes for the first named file. This repeats for the second and "
9195 #: ../src/guestfs-actions.pod:3092
9197 "This call is intended for programs that want to efficiently list a directory "
9198 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
9199 "a similarly efficient call for getting standard stats. Very long directory "
9200 "listings might cause the protocol message size to be exceeded, causing this "
9201 "call to fail. The caller must split up such requests into smaller groups of "
9206 #: ../src/guestfs-actions.pod:3105
9207 msgid "guestfs_mkdir"
9211 #: ../src/guestfs-actions.pod:3107
9214 " int guestfs_mkdir (guestfs_h *g,\n"
9215 "\t\tconst char *path);\n"
9220 #: ../src/guestfs-actions.pod:3110 ../fish/guestfish-actions.pod:2417
9221 msgid "Create a directory named C<path>."
9225 #: ../src/guestfs-actions.pod:3114
9226 msgid "guestfs_mkdir_mode"
9230 #: ../src/guestfs-actions.pod:3116
9233 " int guestfs_mkdir_mode (guestfs_h *g,\n"
9234 "\t\tconst char *path,\n"
9240 #: ../src/guestfs-actions.pod:3120 ../fish/guestfish-actions.pod:2423
9242 "This command creates a directory, setting the initial permissions of the "
9243 "directory to C<mode>."
9247 #: ../src/guestfs-actions.pod:3123 ../fish/guestfish-actions.pod:2426
9249 "For common Linux filesystems, the actual mode which is set will be C<mode & "
9250 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
9255 #: ../src/guestfs-actions.pod:3127
9256 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
9260 #: ../src/guestfs-actions.pod:3131
9261 msgid "guestfs_mkdir_p"
9265 #: ../src/guestfs-actions.pod:3133
9268 " int guestfs_mkdir_p (guestfs_h *g,\n"
9269 "\t\tconst char *path);\n"
9274 #: ../src/guestfs-actions.pod:3136 ../fish/guestfish-actions.pod:2436
9276 "Create a directory named C<path>, creating any parent directories as "
9277 "necessary. This is like the C<mkdir -p> shell command."
9281 #: ../src/guestfs-actions.pod:3141
9282 msgid "guestfs_mkdtemp"
9286 #: ../src/guestfs-actions.pod:3143
9289 " char *guestfs_mkdtemp (guestfs_h *g,\n"
9290 "\t\tconst char *template);\n"
9295 #: ../src/guestfs-actions.pod:3146 ../fish/guestfish-actions.pod:2443
9297 "This command creates a temporary directory. The C<template> parameter "
9298 "should be a full pathname for the temporary directory name with the final "
9299 "six characters being \"XXXXXX\"."
9303 #: ../src/guestfs-actions.pod:3151 ../fish/guestfish-actions.pod:2448
9305 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
9306 "being suitable for Windows filesystems."
9310 #: ../src/guestfs-actions.pod:3154 ../fish/guestfish-actions.pod:2451
9311 msgid "The name of the temporary directory that was created is returned."
9315 #: ../src/guestfs-actions.pod:3157 ../fish/guestfish-actions.pod:2454
9316 msgid "The temporary directory is created with mode 0700 and is owned by root."
9320 #: ../src/guestfs-actions.pod:3160 ../fish/guestfish-actions.pod:2457
9322 "The caller is responsible for deleting the temporary directory and its "
9323 "contents after use."
9327 #: ../src/guestfs-actions.pod:3163 ../fish/guestfish-actions.pod:2460
9328 msgid "See also: L<mkdtemp(3)>"
9332 #: ../src/guestfs-actions.pod:3168
9333 msgid "guestfs_mke2fs_J"
9337 #: ../src/guestfs-actions.pod:3170
9340 " int guestfs_mke2fs_J (guestfs_h *g,\n"
9341 "\t\tconst char *fstype,\n"
9342 "\t\tint blocksize,\n"
9343 "\t\tconst char *device,\n"
9344 "\t\tconst char *journal);\n"
9349 #: ../src/guestfs-actions.pod:3176 ../fish/guestfish-actions.pod:2466
9351 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
9352 "C<journal>. It is equivalent to the command:"
9356 #: ../src/guestfs-actions.pod:3180 ../fish/guestfish-actions.pod:2470
9359 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
9364 #: ../src/guestfs-actions.pod:3182
9365 msgid "See also C<guestfs_mke2journal>."
9369 #: ../src/guestfs-actions.pod:3186
9370 msgid "guestfs_mke2fs_JL"
9374 #: ../src/guestfs-actions.pod:3188
9377 " int guestfs_mke2fs_JL (guestfs_h *g,\n"
9378 "\t\tconst char *fstype,\n"
9379 "\t\tint blocksize,\n"
9380 "\t\tconst char *device,\n"
9381 "\t\tconst char *label);\n"
9386 #: ../src/guestfs-actions.pod:3194 ../fish/guestfish-actions.pod:2478
9388 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
9389 "the journal labeled C<label>."
9393 #: ../src/guestfs-actions.pod:3197
9394 msgid "See also C<guestfs_mke2journal_L>."
9398 #: ../src/guestfs-actions.pod:3201
9399 msgid "guestfs_mke2fs_JU"
9403 #: ../src/guestfs-actions.pod:3203
9406 " int guestfs_mke2fs_JU (guestfs_h *g,\n"
9407 "\t\tconst char *fstype,\n"
9408 "\t\tint blocksize,\n"
9409 "\t\tconst char *device,\n"
9410 "\t\tconst char *uuid);\n"
9415 #: ../src/guestfs-actions.pod:3209 ../fish/guestfish-actions.pod:2487
9417 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
9418 "the journal with UUID C<uuid>."
9422 #: ../src/guestfs-actions.pod:3212
9423 msgid "See also C<guestfs_mke2journal_U>."
9427 #: ../src/guestfs-actions.pod:3216
9428 msgid "guestfs_mke2journal"
9432 #: ../src/guestfs-actions.pod:3218
9435 " int guestfs_mke2journal (guestfs_h *g,\n"
9436 "\t\tint blocksize,\n"
9437 "\t\tconst char *device);\n"
9442 #: ../src/guestfs-actions.pod:3222 ../fish/guestfish-actions.pod:2496
9444 "This creates an ext2 external journal on C<device>. It is equivalent to the "
9449 #: ../src/guestfs-actions.pod:3225 ../fish/guestfish-actions.pod:2499
9452 " mke2fs -O journal_dev -b blocksize device\n"
9457 #: ../src/guestfs-actions.pod:3229
9458 msgid "guestfs_mke2journal_L"
9462 #: ../src/guestfs-actions.pod:3231
9465 " int guestfs_mke2journal_L (guestfs_h *g,\n"
9466 "\t\tint blocksize,\n"
9467 "\t\tconst char *label,\n"
9468 "\t\tconst char *device);\n"
9473 #: ../src/guestfs-actions.pod:3236 ../fish/guestfish-actions.pod:2505
9474 msgid "This creates an ext2 external journal on C<device> with label C<label>."
9478 #: ../src/guestfs-actions.pod:3240
9479 msgid "guestfs_mke2journal_U"
9483 #: ../src/guestfs-actions.pod:3242
9486 " int guestfs_mke2journal_U (guestfs_h *g,\n"
9487 "\t\tint blocksize,\n"
9488 "\t\tconst char *uuid,\n"
9489 "\t\tconst char *device);\n"
9494 #: ../src/guestfs-actions.pod:3247 ../fish/guestfish-actions.pod:2511
9495 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
9499 #: ../src/guestfs-actions.pod:3251
9500 msgid "guestfs_mkfifo"
9504 #: ../src/guestfs-actions.pod:3253
9507 " int guestfs_mkfifo (guestfs_h *g,\n"
9509 "\t\tconst char *path);\n"
9514 #: ../src/guestfs-actions.pod:3257
9516 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
9517 "is just a convenient wrapper around C<guestfs_mknod>."
9521 #: ../src/guestfs-actions.pod:3265
9522 msgid "guestfs_mkfs"
9526 #: ../src/guestfs-actions.pod:3267
9529 " int guestfs_mkfs (guestfs_h *g,\n"
9530 "\t\tconst char *fstype,\n"
9531 "\t\tconst char *device);\n"
9536 #: ../src/guestfs-actions.pod:3271 ../fish/guestfish-actions.pod:2527
9538 "This creates a filesystem on C<device> (usually a partition or LVM logical "
9539 "volume). The filesystem type is C<fstype>, for example C<ext3>."
9543 #: ../src/guestfs-actions.pod:3277
9544 msgid "guestfs_mkfs_b"
9548 #: ../src/guestfs-actions.pod:3279
9551 " int guestfs_mkfs_b (guestfs_h *g,\n"
9552 "\t\tconst char *fstype,\n"
9553 "\t\tint blocksize,\n"
9554 "\t\tconst char *device);\n"
9559 #: ../src/guestfs-actions.pod:3284
9561 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
9562 "block size of the resulting filesystem. Supported block sizes depend on the "
9563 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
9567 #: ../src/guestfs-actions.pod:3289 ../fish/guestfish-actions.pod:2540
9569 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
9574 #: ../src/guestfs-actions.pod:3294
9575 msgid "guestfs_mkmountpoint"
9579 #: ../src/guestfs-actions.pod:3296
9582 " int guestfs_mkmountpoint (guestfs_h *g,\n"
9583 "\t\tconst char *exemptpath);\n"
9588 #: ../src/guestfs-actions.pod:3299
9590 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
9591 "that can be used to create extra mountpoints before mounting the first "
9596 #: ../src/guestfs-actions.pod:3303 ../fish/guestfish-actions.pod:2551
9598 "These calls are I<only> necessary in some very limited circumstances, mainly "
9599 "the case where you want to mount a mix of unrelated and/or read-only "
9600 "filesystems together."
9604 #: ../src/guestfs-actions.pod:3307 ../fish/guestfish-actions.pod:2555
9606 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
9607 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
9608 "inside that. You can unpack this as follows in guestfish:"
9612 #: ../src/guestfs-actions.pod:3312 ../fish/guestfish-actions.pod:2560
9615 " add-ro Fedora-11-i686-Live.iso\n"
9617 " mkmountpoint /cd\n"
9618 " mkmountpoint /sqsh\n"
9619 " mkmountpoint /ext3fs\n"
9620 " mount /dev/sda /cd\n"
9621 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
9622 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
9627 #: ../src/guestfs-actions.pod:3321 ../fish/guestfish-actions.pod:2569
9628 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
9632 #: ../src/guestfs-actions.pod:3323
9634 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
9635 "may get unexpected errors if you try to mix these calls. It is safest to "
9636 "manually unmount filesystems and remove mountpoints after use."
9640 #: ../src/guestfs-actions.pod:3327
9642 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
9643 "first, so for this to work for manual mountpoints, you must ensure that the "
9644 "innermost mountpoints have the longest pathnames, as in the example code "
9649 #: ../src/guestfs-actions.pod:3332 ../fish/guestfish-actions.pod:2580
9650 msgid "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
9654 #: ../src/guestfs-actions.pod:3334
9656 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
9657 "means that C<guestfs_umount_all> is called when the handle is closed which "
9658 "can also trigger these issues."
9662 #: ../src/guestfs-actions.pod:3340
9663 msgid "guestfs_mknod"
9667 #: ../src/guestfs-actions.pod:3342
9670 " int guestfs_mknod (guestfs_h *g,\n"
9672 "\t\tint devmajor,\n"
9673 "\t\tint devminor,\n"
9674 "\t\tconst char *path);\n"
9679 #: ../src/guestfs-actions.pod:3348 ../fish/guestfish-actions.pod:2590
9681 "This call creates block or character special devices, or named pipes "
9686 #: ../src/guestfs-actions.pod:3351 ../fish/guestfish-actions.pod:2593
9688 "The C<mode> parameter should be the mode, using the standard constants. "
9689 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
9690 "used when creating block and character special devices."
9694 #: ../src/guestfs-actions.pod:3356
9696 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
9697 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
9698 "regular file). These constants are available in the standard Linux header "
9699 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
9700 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
9701 "the appropriate constant for you."
9705 #: ../src/guestfs-actions.pod:3368
9706 msgid "guestfs_mknod_b"
9710 #: ../src/guestfs-actions.pod:3370
9713 " int guestfs_mknod_b (guestfs_h *g,\n"
9715 "\t\tint devmajor,\n"
9716 "\t\tint devminor,\n"
9717 "\t\tconst char *path);\n"
9722 #: ../src/guestfs-actions.pod:3376
9724 "This call creates a block device node called C<path> with mode C<mode> and "
9725 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
9726 "wrapper around C<guestfs_mknod>."
9730 #: ../src/guestfs-actions.pod:3384
9731 msgid "guestfs_mknod_c"
9735 #: ../src/guestfs-actions.pod:3386
9738 " int guestfs_mknod_c (guestfs_h *g,\n"
9740 "\t\tint devmajor,\n"
9741 "\t\tint devminor,\n"
9742 "\t\tconst char *path);\n"
9747 #: ../src/guestfs-actions.pod:3392
9749 "This call creates a char device node called C<path> with mode C<mode> and "
9750 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
9751 "wrapper around C<guestfs_mknod>."
9755 #: ../src/guestfs-actions.pod:3400
9756 msgid "guestfs_mkswap"
9760 #: ../src/guestfs-actions.pod:3402
9763 " int guestfs_mkswap (guestfs_h *g,\n"
9764 "\t\tconst char *device);\n"
9769 #: ../src/guestfs-actions.pod:3405 ../fish/guestfish-actions.pod:2632
9770 msgid "Create a swap partition on C<device>."
9774 #: ../src/guestfs-actions.pod:3409
9775 msgid "guestfs_mkswap_L"
9779 #: ../src/guestfs-actions.pod:3411
9782 " int guestfs_mkswap_L (guestfs_h *g,\n"
9783 "\t\tconst char *label,\n"
9784 "\t\tconst char *device);\n"
9789 #: ../src/guestfs-actions.pod:3415 ../fish/guestfish-actions.pod:2638
9790 msgid "Create a swap partition on C<device> with label C<label>."
9794 #: ../src/guestfs-actions.pod:3417 ../fish/guestfish-actions.pod:2640
9796 "Note that you cannot attach a swap label to a block device "
9797 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
9798 "the kernel or swap tools."
9802 #: ../src/guestfs-actions.pod:3423
9803 msgid "guestfs_mkswap_U"
9807 #: ../src/guestfs-actions.pod:3425
9810 " int guestfs_mkswap_U (guestfs_h *g,\n"
9811 "\t\tconst char *uuid,\n"
9812 "\t\tconst char *device);\n"
9817 #: ../src/guestfs-actions.pod:3429 ../fish/guestfish-actions.pod:2648
9818 msgid "Create a swap partition on C<device> with UUID C<uuid>."
9822 #: ../src/guestfs-actions.pod:3433
9823 msgid "guestfs_mkswap_file"
9827 #: ../src/guestfs-actions.pod:3435
9830 " int guestfs_mkswap_file (guestfs_h *g,\n"
9831 "\t\tconst char *path);\n"
9836 #: ../src/guestfs-actions.pod:3438 ../fish/guestfish-actions.pod:2654
9837 msgid "Create a swap file."
9841 #: ../src/guestfs-actions.pod:3440
9843 "This command just writes a swap file signature to an existing file. To "
9844 "create the file itself, use something like C<guestfs_fallocate>."
9848 #: ../src/guestfs-actions.pod:3445
9849 msgid "guestfs_modprobe"
9853 #: ../src/guestfs-actions.pod:3447
9856 " int guestfs_modprobe (guestfs_h *g,\n"
9857 "\t\tconst char *modulename);\n"
9862 #: ../src/guestfs-actions.pod:3450 ../fish/guestfish-actions.pod:2663
9863 msgid "This loads a kernel module in the appliance."
9867 #: ../src/guestfs-actions.pod:3452 ../fish/guestfish-actions.pod:2665
9869 "The kernel module must have been whitelisted when libguestfs was built (see "
9870 "C<appliance/kmod.whitelist.in> in the source)."
9874 #: ../src/guestfs-actions.pod:3457
9875 msgid "guestfs_mount"
9879 #: ../src/guestfs-actions.pod:3459
9882 " int guestfs_mount (guestfs_h *g,\n"
9883 "\t\tconst char *device,\n"
9884 "\t\tconst char *mountpoint);\n"
9889 #: ../src/guestfs-actions.pod:3463 ../fish/guestfish-actions.pod:2672
9891 "Mount a guest disk at a position in the filesystem. Block devices are named "
9892 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
9893 "those block devices contain partitions, they will have the usual names "
9894 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
9898 #: ../src/guestfs-actions.pod:3469 ../fish/guestfish-actions.pod:2678
9900 "The rules are the same as for L<mount(2)>: A filesystem must first be "
9901 "mounted on C</> before others can be mounted. Other filesystems can only be "
9902 "mounted on directories which already exist."
9906 #: ../src/guestfs-actions.pod:3474 ../fish/guestfish-actions.pod:2683
9908 "The mounted filesystem is writable, if we have sufficient permissions on the "
9909 "underlying device."
9913 #: ../src/guestfs-actions.pod:3477
9915 "B<Important note:> When you use this call, the filesystem options C<sync> "
9916 "and C<noatime> are set implicitly. This was originally done because we "
9917 "thought it would improve reliability, but it turns out that I<-o sync> has a "
9918 "very large negative performance impact and negligible effect on "
9919 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
9920 "in any code that needs performance, and instead use C<guestfs_mount_options> "
9921 "(use an empty string for the first parameter if you don't want any options)."
9925 #: ../src/guestfs-actions.pod:3489
9926 msgid "guestfs_mount_loop"
9930 #: ../src/guestfs-actions.pod:3491
9933 " int guestfs_mount_loop (guestfs_h *g,\n"
9934 "\t\tconst char *file,\n"
9935 "\t\tconst char *mountpoint);\n"
9940 #: ../src/guestfs-actions.pod:3495 ../fish/guestfish-actions.pod:2700
9942 "This command lets you mount C<file> (a filesystem image in a file) on a "
9943 "mount point. It is entirely equivalent to the command C<mount -o loop file "
9948 #: ../src/guestfs-actions.pod:3501
9949 msgid "guestfs_mount_options"
9953 #: ../src/guestfs-actions.pod:3503
9956 " int guestfs_mount_options (guestfs_h *g,\n"
9957 "\t\tconst char *options,\n"
9958 "\t\tconst char *device,\n"
9959 "\t\tconst char *mountpoint);\n"
9964 #: ../src/guestfs-actions.pod:3508
9966 "This is the same as the C<guestfs_mount> command, but it allows you to set "
9967 "the mount options as for the L<mount(8)> I<-o> flag."
9971 #: ../src/guestfs-actions.pod:3512 ../fish/guestfish-actions.pod:2712
9973 "If the C<options> parameter is an empty string, then no options are passed "
9974 "(all options default to whatever the filesystem uses)."
9978 #: ../src/guestfs-actions.pod:3518
9979 msgid "guestfs_mount_ro"
9983 #: ../src/guestfs-actions.pod:3520
9986 " int guestfs_mount_ro (guestfs_h *g,\n"
9987 "\t\tconst char *device,\n"
9988 "\t\tconst char *mountpoint);\n"
9993 #: ../src/guestfs-actions.pod:3524
9995 "This is the same as the C<guestfs_mount> command, but it mounts the "
9996 "filesystem with the read-only (I<-o ro>) flag."
10000 #: ../src/guestfs-actions.pod:3529
10001 msgid "guestfs_mount_vfs"
10005 #: ../src/guestfs-actions.pod:3531
10008 " int guestfs_mount_vfs (guestfs_h *g,\n"
10009 "\t\tconst char *options,\n"
10010 "\t\tconst char *vfstype,\n"
10011 "\t\tconst char *device,\n"
10012 "\t\tconst char *mountpoint);\n"
10017 #: ../src/guestfs-actions.pod:3537
10019 "This is the same as the C<guestfs_mount> command, but it allows you to set "
10020 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
10025 #: ../src/guestfs-actions.pod:3543
10026 msgid "guestfs_mountpoints"
10030 #: ../src/guestfs-actions.pod:3545
10033 " char **guestfs_mountpoints (guestfs_h *g);\n"
10038 #: ../src/guestfs-actions.pod:3547
10040 "This call is similar to C<guestfs_mounts>. That call returns a list of "
10041 "devices. This one returns a hash table (map) of device name to directory "
10042 "where the device is mounted."
10046 #: ../src/guestfs-actions.pod:3557
10047 msgid "guestfs_mounts"
10051 #: ../src/guestfs-actions.pod:3559
10054 " char **guestfs_mounts (guestfs_h *g);\n"
10059 #: ../src/guestfs-actions.pod:3561 ../fish/guestfish-actions.pod:2743
10061 "This returns the list of currently mounted filesystems. It returns the list "
10062 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
10066 #: ../src/guestfs-actions.pod:3564 ../fish/guestfish-actions.pod:2746
10067 msgid "Some internal mounts are not shown."
10071 #: ../src/guestfs-actions.pod:3566
10072 msgid "See also: C<guestfs_mountpoints>"
10076 #: ../src/guestfs-actions.pod:3572
10081 #: ../src/guestfs-actions.pod:3574
10084 " int guestfs_mv (guestfs_h *g,\n"
10085 "\t\tconst char *src,\n"
10086 "\t\tconst char *dest);\n"
10091 #: ../src/guestfs-actions.pod:3578 ../fish/guestfish-actions.pod:2754
10093 "This moves a file from C<src> to C<dest> where C<dest> is either a "
10094 "destination filename or destination directory."
10098 #: ../src/guestfs-actions.pod:3583
10099 msgid "guestfs_ntfs_3g_probe"
10103 #: ../src/guestfs-actions.pod:3585
10106 " int guestfs_ntfs_3g_probe (guestfs_h *g,\n"
10108 "\t\tconst char *device);\n"
10113 #: ../src/guestfs-actions.pod:3589 ../fish/guestfish-actions.pod:2761
10115 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
10116 "C<device> for mountability. (Not all NTFS volumes can be mounted "
10117 "read-write, and some cannot be mounted at all)."
10121 #: ../src/guestfs-actions.pod:3593 ../fish/guestfish-actions.pod:2765
10123 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
10124 "can be mounted read-write. Set it to false if you want to test if the "
10125 "volume can be mounted read-only."
10129 #: ../src/guestfs-actions.pod:3597 ../fish/guestfish-actions.pod:2769
10131 "The return value is an integer which C<0> if the operation would succeed, or "
10132 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
10136 #: ../src/guestfs-actions.pod:3603
10137 msgid "guestfs_ntfsresize"
10141 #: ../src/guestfs-actions.pod:3605
10144 " int guestfs_ntfsresize (guestfs_h *g,\n"
10145 "\t\tconst char *device);\n"
10150 #: ../src/guestfs-actions.pod:3608 ../fish/guestfish-actions.pod:2777
10152 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
10153 "size of the underlying device. See also L<ntfsresize(8)>."
10157 #: ../src/guestfs-actions.pod:3614
10158 msgid "guestfs_ntfsresize_size"
10162 #: ../src/guestfs-actions.pod:3616
10165 " int guestfs_ntfsresize_size (guestfs_h *g,\n"
10166 "\t\tconst char *device,\n"
10167 "\t\tint64_t size);\n"
10172 #: ../src/guestfs-actions.pod:3620
10174 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
10175 "to specify the new size (in bytes) explicitly."
10179 #: ../src/guestfs-actions.pod:3625
10180 msgid "guestfs_part_add"
10184 #: ../src/guestfs-actions.pod:3627
10187 " int guestfs_part_add (guestfs_h *g,\n"
10188 "\t\tconst char *device,\n"
10189 "\t\tconst char *prlogex,\n"
10190 "\t\tint64_t startsect,\n"
10191 "\t\tint64_t endsect);\n"
10196 #: ../src/guestfs-actions.pod:3633
10198 "This command adds a partition to C<device>. If there is no partition table "
10199 "on the device, call C<guestfs_part_init> first."
10203 #: ../src/guestfs-actions.pod:3636 ../fish/guestfish-actions.pod:2795
10205 "The C<prlogex> parameter is the type of partition. Normally you should pass "
10206 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
10207 "C<logical>) and C<e> (or C<extended>) partition types."
10211 #: ../src/guestfs-actions.pod:3641 ../fish/guestfish-actions.pod:2800
10213 "C<startsect> and C<endsect> are the start and end of the partition in "
10214 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
10215 "from the end of the disk (C<-1> is the last sector)."
10219 #: ../src/guestfs-actions.pod:3645
10221 "Creating a partition which covers the whole disk is not so easy. Use "
10222 "C<guestfs_part_disk> to do that."
10226 #: ../src/guestfs-actions.pod:3650
10227 msgid "guestfs_part_del"
10231 #: ../src/guestfs-actions.pod:3652
10234 " int guestfs_part_del (guestfs_h *g,\n"
10235 "\t\tconst char *device,\n"
10236 "\t\tint partnum);\n"
10241 #: ../src/guestfs-actions.pod:3656 ../fish/guestfish-actions.pod:2811
10242 msgid "This command deletes the partition numbered C<partnum> on C<device>."
10246 #: ../src/guestfs-actions.pod:3658 ../fish/guestfish-actions.pod:2813
10248 "Note that in the case of MBR partitioning, deleting an extended partition "
10249 "also deletes any logical partitions it contains."
10253 #: ../src/guestfs-actions.pod:3664
10254 msgid "guestfs_part_disk"
10258 #: ../src/guestfs-actions.pod:3666
10261 " int guestfs_part_disk (guestfs_h *g,\n"
10262 "\t\tconst char *device,\n"
10263 "\t\tconst char *parttype);\n"
10268 #: ../src/guestfs-actions.pod:3670
10270 "This command is simply a combination of C<guestfs_part_init> followed by "
10271 "C<guestfs_part_add> to create a single primary partition covering the whole "
10276 #: ../src/guestfs-actions.pod:3674
10278 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
10279 "possible values are described in C<guestfs_part_init>."
10283 #: ../src/guestfs-actions.pod:3682
10284 msgid "guestfs_part_get_bootable"
10288 #: ../src/guestfs-actions.pod:3684
10291 " int guestfs_part_get_bootable (guestfs_h *g,\n"
10292 "\t\tconst char *device,\n"
10293 "\t\tint partnum);\n"
10298 #: ../src/guestfs-actions.pod:3688 ../fish/guestfish-actions.pod:2835
10300 "This command returns true if the partition C<partnum> on C<device> has the "
10301 "bootable flag set."
10305 #: ../src/guestfs-actions.pod:3691
10306 msgid "See also C<guestfs_part_set_bootable>."
10310 #: ../src/guestfs-actions.pod:3695
10311 msgid "guestfs_part_get_mbr_id"
10315 #: ../src/guestfs-actions.pod:3697
10318 " int guestfs_part_get_mbr_id (guestfs_h *g,\n"
10319 "\t\tconst char *device,\n"
10320 "\t\tint partnum);\n"
10325 #: ../src/guestfs-actions.pod:3701 ../fish/guestfish-actions.pod:2844
10327 "Returns the MBR type byte (also known as the ID byte) from the numbered "
10328 "partition C<partnum>."
10332 #: ../src/guestfs-actions.pod:3704 ../src/guestfs-actions.pod:3866
10334 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
10335 "undefined results for other partition table types (see "
10336 "C<guestfs_part_get_parttype>)."
10340 #: ../src/guestfs-actions.pod:3710
10341 msgid "guestfs_part_get_parttype"
10345 #: ../src/guestfs-actions.pod:3712
10348 " char *guestfs_part_get_parttype (guestfs_h *g,\n"
10349 "\t\tconst char *device);\n"
10354 #: ../src/guestfs-actions.pod:3715 ../fish/guestfish-actions.pod:2855
10356 "This command examines the partition table on C<device> and returns the "
10357 "partition table type (format) being used."
10361 #: ../src/guestfs-actions.pod:3718
10363 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
10364 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
10365 "possible, although unusual. See C<guestfs_part_init> for a full list."
10369 #: ../src/guestfs-actions.pod:3726
10370 msgid "guestfs_part_init"
10374 #: ../src/guestfs-actions.pod:3728
10377 " int guestfs_part_init (guestfs_h *g,\n"
10378 "\t\tconst char *device,\n"
10379 "\t\tconst char *parttype);\n"
10384 #: ../src/guestfs-actions.pod:3732 ../fish/guestfish-actions.pod:2867
10386 "This creates an empty partition table on C<device> of one of the partition "
10387 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
10388 "(for large disks)."
10392 #: ../src/guestfs-actions.pod:3736
10394 "Initially there are no partitions. Following this, you should call "
10395 "C<guestfs_part_add> for each partition required."
10399 #: ../src/guestfs-actions.pod:3739 ../fish/guestfish-actions.pod:2874
10400 msgid "Possible values for C<parttype> are:"
10404 #: ../src/guestfs-actions.pod:3743 ../fish/guestfish-actions.pod:2878
10405 msgid "B<efi> | B<gpt>"
10409 #: ../src/guestfs-actions.pod:3745 ../fish/guestfish-actions.pod:2880
10410 msgid "Intel EFI / GPT partition table."
10414 #: ../src/guestfs-actions.pod:3747 ../fish/guestfish-actions.pod:2882
10416 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
10417 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
10418 "the C<mbr> format."
10422 #: ../src/guestfs-actions.pod:3751 ../fish/guestfish-actions.pod:2886
10423 msgid "B<mbr> | B<msdos>"
10427 #: ../src/guestfs-actions.pod:3753 ../fish/guestfish-actions.pod:2888
10429 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
10430 "Windows. This partition type will B<only> work for device sizes up to 2 "
10431 "TB. For large disks we recommend using C<gpt>."
10435 #: ../src/guestfs-actions.pod:3760 ../fish/guestfish-actions.pod:2895
10436 msgid "Other partition table types that may work but are not supported include:"
10440 #: ../src/guestfs-actions.pod:3765 ../fish/guestfish-actions.pod:2900
10445 #: ../src/guestfs-actions.pod:3767 ../fish/guestfish-actions.pod:2902
10446 msgid "AIX disk labels."
10450 #: ../src/guestfs-actions.pod:3769 ../fish/guestfish-actions.pod:2904
10451 msgid "B<amiga> | B<rdb>"
10455 #: ../src/guestfs-actions.pod:3771 ../fish/guestfish-actions.pod:2906
10456 msgid "Amiga \"Rigid Disk Block\" format."
10460 #: ../src/guestfs-actions.pod:3773 ../fish/guestfish-actions.pod:2908
10465 #: ../src/guestfs-actions.pod:3775 ../fish/guestfish-actions.pod:2910
10466 msgid "BSD disk labels."
10470 #: ../src/guestfs-actions.pod:3777 ../fish/guestfish-actions.pod:2912
10475 #: ../src/guestfs-actions.pod:3779 ../fish/guestfish-actions.pod:2914
10476 msgid "DASD, used on IBM mainframes."
10480 #: ../src/guestfs-actions.pod:3781 ../fish/guestfish-actions.pod:2916
10485 #: ../src/guestfs-actions.pod:3783 ../fish/guestfish-actions.pod:2918
10486 msgid "MIPS/SGI volumes."
10490 #: ../src/guestfs-actions.pod:3785 ../fish/guestfish-actions.pod:2920
10495 #: ../src/guestfs-actions.pod:3787 ../fish/guestfish-actions.pod:2922
10496 msgid "Old Mac partition format. Modern Macs use C<gpt>."
10500 #: ../src/guestfs-actions.pod:3789 ../fish/guestfish-actions.pod:2924
10505 #: ../src/guestfs-actions.pod:3791 ../fish/guestfish-actions.pod:2926
10506 msgid "NEC PC-98 format, common in Japan apparently."
10510 #: ../src/guestfs-actions.pod:3793 ../fish/guestfish-actions.pod:2928
10515 #: ../src/guestfs-actions.pod:3795 ../fish/guestfish-actions.pod:2930
10516 msgid "Sun disk labels."
10520 #: ../src/guestfs-actions.pod:3801
10521 msgid "guestfs_part_list"
10525 #: ../src/guestfs-actions.pod:3803
10528 " struct guestfs_partition_list *guestfs_part_list (guestfs_h *g,\n"
10529 "\t\tconst char *device);\n"
10534 #: ../src/guestfs-actions.pod:3806 ../fish/guestfish-actions.pod:2938
10536 "This command parses the partition table on C<device> and returns the list of "
10537 "partitions found."
10541 #: ../src/guestfs-actions.pod:3809 ../fish/guestfish-actions.pod:2941
10542 msgid "The fields in the returned structure are:"
10546 #: ../src/guestfs-actions.pod:3813 ../fish/guestfish-actions.pod:2945
10547 msgid "B<part_num>"
10551 #: ../src/guestfs-actions.pod:3815 ../fish/guestfish-actions.pod:2947
10552 msgid "Partition number, counting from 1."
10556 #: ../src/guestfs-actions.pod:3817 ../fish/guestfish-actions.pod:2949
10557 msgid "B<part_start>"
10561 #: ../src/guestfs-actions.pod:3819
10563 "Start of the partition I<in bytes>. To get sectors you have to divide by "
10564 "the device's sector size, see C<guestfs_blockdev_getss>."
10568 #: ../src/guestfs-actions.pod:3822 ../fish/guestfish-actions.pod:2954
10569 msgid "B<part_end>"
10573 #: ../src/guestfs-actions.pod:3824 ../fish/guestfish-actions.pod:2956
10574 msgid "End of the partition in bytes."
10578 #: ../src/guestfs-actions.pod:3826 ../fish/guestfish-actions.pod:2958
10579 msgid "B<part_size>"
10583 #: ../src/guestfs-actions.pod:3828 ../fish/guestfish-actions.pod:2960
10584 msgid "Size of the partition in bytes."
10588 #: ../src/guestfs-actions.pod:3832
10590 "This function returns a C<struct guestfs_partition_list *> (see "
10591 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
10592 "must call C<guestfs_free_partition_list> after use>."
10596 #: ../src/guestfs-actions.pod:3837
10597 msgid "guestfs_part_set_bootable"
10601 #: ../src/guestfs-actions.pod:3839
10604 " int guestfs_part_set_bootable (guestfs_h *g,\n"
10605 "\t\tconst char *device,\n"
10606 "\t\tint partnum,\n"
10607 "\t\tint bootable);\n"
10612 #: ../src/guestfs-actions.pod:3844 ../fish/guestfish-actions.pod:2968
10614 "This sets the bootable flag on partition numbered C<partnum> on device "
10615 "C<device>. Note that partitions are numbered from 1."
10619 #: ../src/guestfs-actions.pod:3847 ../fish/guestfish-actions.pod:2971
10621 "The bootable flag is used by some operating systems (notably Windows) to "
10622 "determine which partition to boot from. It is by no means universally "
10627 #: ../src/guestfs-actions.pod:3853
10628 msgid "guestfs_part_set_mbr_id"
10632 #: ../src/guestfs-actions.pod:3855
10635 " int guestfs_part_set_mbr_id (guestfs_h *g,\n"
10636 "\t\tconst char *device,\n"
10637 "\t\tint partnum,\n"
10638 "\t\tint idbyte);\n"
10643 #: ../src/guestfs-actions.pod:3860 ../fish/guestfish-actions.pod:2979
10645 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
10646 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
10647 "documentation are in fact hexadecimal numbers, but usually documented "
10648 "without any leading \"0x\" which might be confusing."
10652 #: ../src/guestfs-actions.pod:3872
10653 msgid "guestfs_part_set_name"
10657 #: ../src/guestfs-actions.pod:3874
10660 " int guestfs_part_set_name (guestfs_h *g,\n"
10661 "\t\tconst char *device,\n"
10662 "\t\tint partnum,\n"
10663 "\t\tconst char *name);\n"
10668 #: ../src/guestfs-actions.pod:3879 ../fish/guestfish-actions.pod:2993
10670 "This sets the partition name on partition numbered C<partnum> on device "
10671 "C<device>. Note that partitions are numbered from 1."
10675 #: ../src/guestfs-actions.pod:3882 ../fish/guestfish-actions.pod:2996
10677 "The partition name can only be set on certain types of partition table. "
10678 "This works on C<gpt> but not on C<mbr> partitions."
10682 #: ../src/guestfs-actions.pod:3887
10683 msgid "guestfs_part_to_dev"
10687 #: ../src/guestfs-actions.pod:3889
10690 " char *guestfs_part_to_dev (guestfs_h *g,\n"
10691 "\t\tconst char *partition);\n"
10696 #: ../src/guestfs-actions.pod:3892 ../fish/guestfish-actions.pod:3003
10698 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
10699 "partition number, returning the device name (eg. \"/dev/sdb\")."
10703 #: ../src/guestfs-actions.pod:3896
10705 "The named partition must exist, for example as a string returned from "
10706 "C<guestfs_list_partitions>."
10710 #: ../src/guestfs-actions.pod:3902
10711 msgid "guestfs_ping_daemon"
10715 #: ../src/guestfs-actions.pod:3904
10718 " int guestfs_ping_daemon (guestfs_h *g);\n"
10723 #: ../src/guestfs-actions.pod:3906 ../fish/guestfish-actions.pod:3014
10725 "This is a test probe into the guestfs daemon running inside the qemu "
10726 "subprocess. Calling this function checks that the daemon responds to the "
10727 "ping message, without affecting the daemon or attached block device(s) in "
10732 #: ../src/guestfs-actions.pod:3913
10733 msgid "guestfs_pread"
10737 #: ../src/guestfs-actions.pod:3915
10740 " char *guestfs_pread (guestfs_h *g,\n"
10741 "\t\tconst char *path,\n"
10743 "\t\tint64_t offset,\n"
10744 "\t\tsize_t *size_r);\n"
10749 #: ../src/guestfs-actions.pod:3921 ../fish/guestfish-actions.pod:3023
10751 "This command lets you read part of a file. It reads C<count> bytes of the "
10752 "file, starting at C<offset>, from file C<path>."
10756 #: ../src/guestfs-actions.pod:3924 ../src/guestfs-actions.pod:3947 ../fish/guestfish-actions.pod:3026 ../fish/guestfish-actions.pod:3041
10758 "This may read fewer bytes than requested. For further details see the "
10759 "L<pread(2)> system call."
10763 #: ../src/guestfs-actions.pod:3927
10764 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
10768 #: ../src/guestfs-actions.pod:3936
10769 msgid "guestfs_pread_device"
10773 #: ../src/guestfs-actions.pod:3938
10776 " char *guestfs_pread_device (guestfs_h *g,\n"
10777 "\t\tconst char *device,\n"
10779 "\t\tint64_t offset,\n"
10780 "\t\tsize_t *size_r);\n"
10785 #: ../src/guestfs-actions.pod:3944 ../fish/guestfish-actions.pod:3038
10787 "This command lets you read part of a file. It reads C<count> bytes of "
10788 "C<device>, starting at C<offset>."
10792 #: ../src/guestfs-actions.pod:3950
10793 msgid "See also C<guestfs_pread>."
10797 #: ../src/guestfs-actions.pod:3959
10798 msgid "guestfs_pvcreate"
10802 #: ../src/guestfs-actions.pod:3961
10805 " int guestfs_pvcreate (guestfs_h *g,\n"
10806 "\t\tconst char *device);\n"
10811 #: ../src/guestfs-actions.pod:3964 ../fish/guestfish-actions.pod:3053
10813 "This creates an LVM physical volume on the named C<device>, where C<device> "
10814 "should usually be a partition name such as C</dev/sda1>."
10818 #: ../src/guestfs-actions.pod:3970
10819 msgid "guestfs_pvremove"
10823 #: ../src/guestfs-actions.pod:3972
10826 " int guestfs_pvremove (guestfs_h *g,\n"
10827 "\t\tconst char *device);\n"
10832 #: ../src/guestfs-actions.pod:3975 ../fish/guestfish-actions.pod:3061
10834 "This wipes a physical volume C<device> so that LVM will no longer recognise "
10839 #: ../src/guestfs-actions.pod:3978 ../fish/guestfish-actions.pod:3064
10841 "The implementation uses the C<pvremove> command which refuses to wipe "
10842 "physical volumes that contain any volume groups, so you have to remove those "
10847 #: ../src/guestfs-actions.pod:3984
10848 msgid "guestfs_pvresize"
10852 #: ../src/guestfs-actions.pod:3986
10855 " int guestfs_pvresize (guestfs_h *g,\n"
10856 "\t\tconst char *device);\n"
10861 #: ../src/guestfs-actions.pod:3989 ../fish/guestfish-actions.pod:3072
10863 "This resizes (expands or shrinks) an existing LVM physical volume to match "
10864 "the new size of the underlying device."
10868 #: ../src/guestfs-actions.pod:3994
10869 msgid "guestfs_pvresize_size"
10873 #: ../src/guestfs-actions.pod:3996
10876 " int guestfs_pvresize_size (guestfs_h *g,\n"
10877 "\t\tconst char *device,\n"
10878 "\t\tint64_t size);\n"
10883 #: ../src/guestfs-actions.pod:4000
10885 "This command is the same as C<guestfs_pvresize> except that it allows you to "
10886 "specify the new size (in bytes) explicitly."
10890 #: ../src/guestfs-actions.pod:4005
10891 msgid "guestfs_pvs"
10895 #: ../src/guestfs-actions.pod:4007
10898 " char **guestfs_pvs (guestfs_h *g);\n"
10903 #: ../src/guestfs-actions.pod:4009 ../fish/guestfish-actions.pod:3086
10905 "List all the physical volumes detected. This is the equivalent of the "
10906 "L<pvs(8)> command."
10910 #: ../src/guestfs-actions.pod:4012 ../fish/guestfish-actions.pod:3089
10912 "This returns a list of just the device names that contain PVs "
10913 "(eg. C</dev/sda2>)."
10917 #: ../src/guestfs-actions.pod:4015
10918 msgid "See also C<guestfs_pvs_full>."
10922 #: ../src/guestfs-actions.pod:4021
10923 msgid "guestfs_pvs_full"
10927 #: ../src/guestfs-actions.pod:4023
10930 " struct guestfs_lvm_pv_list *guestfs_pvs_full (guestfs_h *g);\n"
10935 #: ../src/guestfs-actions.pod:4025 ../fish/guestfish-actions.pod:3098
10937 "List all the physical volumes detected. This is the equivalent of the "
10938 "L<pvs(8)> command. The \"full\" version includes all fields."
10942 #: ../src/guestfs-actions.pod:4028
10944 "This function returns a C<struct guestfs_lvm_pv_list *> (see "
10945 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
10946 "must call C<guestfs_free_lvm_pv_list> after use>."
10950 #: ../src/guestfs-actions.pod:4033
10951 msgid "guestfs_pvuuid"
10955 #: ../src/guestfs-actions.pod:4035
10958 " char *guestfs_pvuuid (guestfs_h *g,\n"
10959 "\t\tconst char *device);\n"
10964 #: ../src/guestfs-actions.pod:4038 ../fish/guestfish-actions.pod:3105
10965 msgid "This command returns the UUID of the LVM PV C<device>."
10969 #: ../src/guestfs-actions.pod:4043
10970 msgid "guestfs_pwrite"
10974 #: ../src/guestfs-actions.pod:4045
10977 " int guestfs_pwrite (guestfs_h *g,\n"
10978 "\t\tconst char *path,\n"
10979 "\t\tconst char *content,\n"
10980 "\t\tsize_t content_size,\n"
10981 "\t\tint64_t offset);\n"
10986 #: ../src/guestfs-actions.pod:4051 ../fish/guestfish-actions.pod:3111
10988 "This command writes to part of a file. It writes the data buffer C<content> "
10989 "to the file C<path> starting at offset C<offset>."
10993 #: ../src/guestfs-actions.pod:4054 ../fish/guestfish-actions.pod:3114
10995 "This command implements the L<pwrite(2)> system call, and like that system "
10996 "call it may not write the full data requested. The return value is the "
10997 "number of bytes that were actually written to the file. This could even be "
10998 "0, although short writes are unlikely for regular files in ordinary "
11003 #: ../src/guestfs-actions.pod:4060
11004 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
11008 #: ../src/guestfs-actions.pod:4067
11009 msgid "guestfs_pwrite_device"
11013 #: ../src/guestfs-actions.pod:4069
11016 " int guestfs_pwrite_device (guestfs_h *g,\n"
11017 "\t\tconst char *device,\n"
11018 "\t\tconst char *content,\n"
11019 "\t\tsize_t content_size,\n"
11020 "\t\tint64_t offset);\n"
11025 #: ../src/guestfs-actions.pod:4075 ../fish/guestfish-actions.pod:3129
11027 "This command writes to part of a device. It writes the data buffer "
11028 "C<content> to C<device> starting at offset C<offset>."
11032 #: ../src/guestfs-actions.pod:4078 ../fish/guestfish-actions.pod:3132
11034 "This command implements the L<pwrite(2)> system call, and like that system "
11035 "call it may not write the full data requested (although short writes to disk "
11036 "devices and partitions are probably impossible with standard Linux kernels)."
11040 #: ../src/guestfs-actions.pod:4083
11041 msgid "See also C<guestfs_pwrite>."
11045 #: ../src/guestfs-actions.pod:4090
11046 msgid "guestfs_read_file"
11050 #: ../src/guestfs-actions.pod:4092
11053 " char *guestfs_read_file (guestfs_h *g,\n"
11054 "\t\tconst char *path,\n"
11055 "\t\tsize_t *size_r);\n"
11060 #: ../src/guestfs-actions.pod:4096 ../fish/guestfish-actions.pod:3146
11061 msgid "This calls returns the contents of the file C<path> as a buffer."
11065 #: ../src/guestfs-actions.pod:4099
11067 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
11068 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
11069 "function is limited in the total size of file that can be handled."
11073 #: ../src/guestfs-actions.pod:4111
11074 msgid "guestfs_read_lines"
11078 #: ../src/guestfs-actions.pod:4113
11081 " char **guestfs_read_lines (guestfs_h *g,\n"
11082 "\t\tconst char *path);\n"
11087 #: ../src/guestfs-actions.pod:4118 ../fish/guestfish-actions.pod:3163
11089 "The file contents are returned as a list of lines. Trailing C<LF> and "
11090 "C<CRLF> character sequences are I<not> returned."
11094 #: ../src/guestfs-actions.pod:4121
11096 "Note that this function cannot correctly handle binary files (specifically, "
11097 "files containing C<\\0> character which is treated as end of line). For "
11098 "those you need to use the C<guestfs_read_file> function which has a more "
11099 "complex interface."
11103 #: ../src/guestfs-actions.pod:4130
11104 msgid "guestfs_readdir"
11108 #: ../src/guestfs-actions.pod:4132
11111 " struct guestfs_dirent_list *guestfs_readdir (guestfs_h *g,\n"
11112 "\t\tconst char *dir);\n"
11117 #: ../src/guestfs-actions.pod:4135 ../fish/guestfish-actions.pod:3175
11118 msgid "This returns the list of directory entries in directory C<dir>."
11122 #: ../src/guestfs-actions.pod:4137 ../fish/guestfish-actions.pod:3177
11124 "All entries in the directory are returned, including C<.> and C<..>. The "
11125 "entries are I<not> sorted, but returned in the same order as the underlying "
11130 #: ../src/guestfs-actions.pod:4141 ../fish/guestfish-actions.pod:3181
11132 "Also this call returns basic file type information about each file. The "
11133 "C<ftyp> field will contain one of the following characters:"
11137 #: ../src/guestfs-actions.pod:4146 ../fish/guestfish-actions.pod:3186
11142 #: ../src/guestfs-actions.pod:4148 ../fish/guestfish-actions.pod:3188
11143 msgid "Block special"
11147 #: ../src/guestfs-actions.pod:4150 ../fish/guestfish-actions.pod:3190
11152 #: ../src/guestfs-actions.pod:4152 ../fish/guestfish-actions.pod:3192
11153 msgid "Char special"
11157 #: ../src/guestfs-actions.pod:4154 ../fish/guestfish-actions.pod:3194
11162 #: ../src/guestfs-actions.pod:4156 ../fish/guestfish-actions.pod:3196
11167 #: ../src/guestfs-actions.pod:4158 ../fish/guestfish-actions.pod:3198
11172 #: ../src/guestfs-actions.pod:4160 ../fish/guestfish-actions.pod:3200
11173 msgid "FIFO (named pipe)"
11177 #: ../src/guestfs-actions.pod:4162 ../fish/guestfish-actions.pod:3202
11182 #: ../src/guestfs-actions.pod:4164 ../fish/guestfish-actions.pod:3204
11183 msgid "Symbolic link"
11187 #: ../src/guestfs-actions.pod:4166 ../fish/guestfish-actions.pod:3206
11192 #: ../src/guestfs-actions.pod:4168 ../fish/guestfish-actions.pod:3208
11193 msgid "Regular file"
11197 #: ../src/guestfs-actions.pod:4170 ../fish/guestfish-actions.pod:3210
11202 #: ../src/guestfs-actions.pod:4172 ../fish/guestfish-actions.pod:3212
11207 #: ../src/guestfs-actions.pod:4174 ../fish/guestfish-actions.pod:3214
11212 #: ../src/guestfs-actions.pod:4176 ../fish/guestfish-actions.pod:3216
11213 msgid "Unknown file type"
11217 #: ../src/guestfs-actions.pod:4178 ../fish/guestfish-actions.pod:3218
11222 #: ../src/guestfs-actions.pod:4180 ../fish/guestfish-actions.pod:3220
11223 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
11227 #: ../src/guestfs-actions.pod:4185
11229 "This function is primarily intended for use by programs. To get a simple "
11230 "list of names, use C<guestfs_ls>. To get a printable directory for human "
11231 "consumption, use C<guestfs_ll>."
11235 #: ../src/guestfs-actions.pod:4189
11237 "This function returns a C<struct guestfs_dirent_list *> (see "
11238 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
11239 "must call C<guestfs_free_dirent_list> after use>."
11243 #: ../src/guestfs-actions.pod:4194
11244 msgid "guestfs_readlink"
11248 #: ../src/guestfs-actions.pod:4196
11251 " char *guestfs_readlink (guestfs_h *g,\n"
11252 "\t\tconst char *path);\n"
11257 #: ../src/guestfs-actions.pod:4199 ../fish/guestfish-actions.pod:3233
11258 msgid "This command reads the target of a symbolic link."
11262 #: ../src/guestfs-actions.pod:4204
11263 msgid "guestfs_readlinklist"
11267 #: ../src/guestfs-actions.pod:4206
11270 " char **guestfs_readlinklist (guestfs_h *g,\n"
11271 "\t\tconst char *path,\n"
11272 "\t\tchar *const *names);\n"
11277 #: ../src/guestfs-actions.pod:4210 ../fish/guestfish-actions.pod:3239
11279 "This call allows you to do a C<readlink> operation on multiple files, where "
11280 "all files are in the directory C<path>. C<names> is the list of files from "
11285 #: ../src/guestfs-actions.pod:4214 ../fish/guestfish-actions.pod:3243
11287 "On return you get a list of strings, with a one-to-one correspondence to the "
11288 "C<names> list. Each string is the value of the symbolic link."
11292 #: ../src/guestfs-actions.pod:4218 ../fish/guestfish-actions.pod:3247
11294 "If the C<readlink(2)> operation fails on any name, then the corresponding "
11295 "result string is the empty string C<\"\">. However the whole operation is "
11296 "completed even if there were C<readlink(2)> errors, and so you can call this "
11297 "function with names where you don't know if they are symbolic links already "
11298 "(albeit slightly less efficient)."
11302 #: ../src/guestfs-actions.pod:4225 ../fish/guestfish-actions.pod:3254
11304 "This call is intended for programs that want to efficiently list a directory "
11305 "contents without making many round-trips. Very long directory listings "
11306 "might cause the protocol message size to be exceeded, causing this call to "
11307 "fail. The caller must split up such requests into smaller groups of names."
11311 #: ../src/guestfs-actions.pod:4236
11312 msgid "guestfs_realpath"
11316 #: ../src/guestfs-actions.pod:4238
11319 " char *guestfs_realpath (guestfs_h *g,\n"
11320 "\t\tconst char *path);\n"
11325 #: ../src/guestfs-actions.pod:4241 ../fish/guestfish-actions.pod:3265
11327 "Return the canonicalized absolute pathname of C<path>. The returned path "
11328 "has no C<.>, C<..> or symbolic link path elements."
11332 #: ../src/guestfs-actions.pod:4247
11333 msgid "guestfs_removexattr"
11337 #: ../src/guestfs-actions.pod:4249
11340 " int guestfs_removexattr (guestfs_h *g,\n"
11341 "\t\tconst char *xattr,\n"
11342 "\t\tconst char *path);\n"
11347 #: ../src/guestfs-actions.pod:4253 ../fish/guestfish-actions.pod:3272
11348 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
11352 #: ../src/guestfs-actions.pod:4256
11353 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
11357 #: ../src/guestfs-actions.pod:4260
11358 msgid "guestfs_resize2fs"
11362 #: ../src/guestfs-actions.pod:4262
11365 " int guestfs_resize2fs (guestfs_h *g,\n"
11366 "\t\tconst char *device);\n"
11371 #: ../src/guestfs-actions.pod:4265 ../fish/guestfish-actions.pod:3281
11373 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
11374 "underlying device."
11378 #: ../src/guestfs-actions.pod:4268
11380 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
11381 "C<device> before calling this command. For unknown reasons C<resize2fs> "
11382 "sometimes gives an error about this and sometimes not. In any case, it is "
11383 "always safe to call C<guestfs_e2fsck_f> before calling this function."
11387 #: ../src/guestfs-actions.pod:4276
11388 msgid "guestfs_resize2fs_size"
11392 #: ../src/guestfs-actions.pod:4278
11395 " int guestfs_resize2fs_size (guestfs_h *g,\n"
11396 "\t\tconst char *device,\n"
11397 "\t\tint64_t size);\n"
11402 #: ../src/guestfs-actions.pod:4282
11404 "This command is the same as C<guestfs_resize2fs> except that it allows you "
11405 "to specify the new size (in bytes) explicitly."
11409 #: ../src/guestfs-actions.pod:4287
11414 #: ../src/guestfs-actions.pod:4289
11417 " int guestfs_rm (guestfs_h *g,\n"
11418 "\t\tconst char *path);\n"
11423 #: ../src/guestfs-actions.pod:4292 ../fish/guestfish-actions.pod:3301
11424 msgid "Remove the single file C<path>."
11428 #: ../src/guestfs-actions.pod:4296
11429 msgid "guestfs_rm_rf"
11433 #: ../src/guestfs-actions.pod:4298
11436 " int guestfs_rm_rf (guestfs_h *g,\n"
11437 "\t\tconst char *path);\n"
11442 #: ../src/guestfs-actions.pod:4301 ../fish/guestfish-actions.pod:3307
11444 "Remove the file or directory C<path>, recursively removing the contents if "
11445 "its a directory. This is like the C<rm -rf> shell command."
11449 #: ../src/guestfs-actions.pod:4307
11450 msgid "guestfs_rmdir"
11454 #: ../src/guestfs-actions.pod:4309
11457 " int guestfs_rmdir (guestfs_h *g,\n"
11458 "\t\tconst char *path);\n"
11463 #: ../src/guestfs-actions.pod:4312 ../fish/guestfish-actions.pod:3315
11464 msgid "Remove the single directory C<path>."
11468 #: ../src/guestfs-actions.pod:4316
11469 msgid "guestfs_rmmountpoint"
11473 #: ../src/guestfs-actions.pod:4318
11476 " int guestfs_rmmountpoint (guestfs_h *g,\n"
11477 "\t\tconst char *exemptpath);\n"
11482 #: ../src/guestfs-actions.pod:4321
11484 "This calls removes a mountpoint that was previously created with "
11485 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
11489 #: ../src/guestfs-actions.pod:4327
11490 msgid "guestfs_scrub_device"
11494 #: ../src/guestfs-actions.pod:4329
11497 " int guestfs_scrub_device (guestfs_h *g,\n"
11498 "\t\tconst char *device);\n"
11503 #: ../src/guestfs-actions.pod:4332 ../fish/guestfish-actions.pod:3329
11505 "This command writes patterns over C<device> to make data retrieval more "
11510 #: ../src/guestfs-actions.pod:4335 ../src/guestfs-actions.pod:4353 ../src/guestfs-actions.pod:4369 ../fish/guestfish-actions.pod:3332 ../fish/guestfish-actions.pod:3347 ../fish/guestfish-actions.pod:3360
11512 "It is an interface to the L<scrub(1)> program. See that manual page for "
11517 #: ../src/guestfs-actions.pod:4343
11518 msgid "guestfs_scrub_file"
11522 #: ../src/guestfs-actions.pod:4345
11525 " int guestfs_scrub_file (guestfs_h *g,\n"
11526 "\t\tconst char *file);\n"
11531 #: ../src/guestfs-actions.pod:4348 ../fish/guestfish-actions.pod:3342
11533 "This command writes patterns over a file to make data retrieval more "
11538 #: ../src/guestfs-actions.pod:4351 ../fish/guestfish-actions.pod:3345
11539 msgid "The file is I<removed> after scrubbing."
11543 #: ../src/guestfs-actions.pod:4358
11544 msgid "guestfs_scrub_freespace"
11548 #: ../src/guestfs-actions.pod:4360
11551 " int guestfs_scrub_freespace (guestfs_h *g,\n"
11552 "\t\tconst char *dir);\n"
11557 #: ../src/guestfs-actions.pod:4363
11559 "This command creates the directory C<dir> and then fills it with files until "
11560 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
11561 "and deletes them. The intention is to scrub any free space on the partition "
11562 "containing C<dir>."
11566 #: ../src/guestfs-actions.pod:4374
11567 msgid "guestfs_set_append"
11571 #: ../src/guestfs-actions.pod:4376
11574 " int guestfs_set_append (guestfs_h *g,\n"
11575 "\t\tconst char *append);\n"
11580 #: ../src/guestfs-actions.pod:4379 ../fish/guestfish-actions.pod:3369
11582 "This function is used to add additional options to the guest kernel command "
11587 #: ../src/guestfs-actions.pod:4382 ../fish/guestfish-actions.pod:3372
11589 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
11590 "environment variable."
11594 #: ../src/guestfs-actions.pod:4385 ../fish/guestfish-actions.pod:3375
11596 "Setting C<append> to C<NULL> means I<no> additional options are passed "
11597 "(libguestfs always adds a few of its own)."
11601 #: ../src/guestfs-actions.pod:4390
11602 msgid "guestfs_set_autosync"
11606 #: ../src/guestfs-actions.pod:4392
11609 " int guestfs_set_autosync (guestfs_h *g,\n"
11610 "\t\tint autosync);\n"
11615 #: ../src/guestfs-actions.pod:4395
11617 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
11618 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
11619 "the handle is closed (also if the program exits without closing handles)."
11623 #: ../src/guestfs-actions.pod:4400 ../fish/guestfish-actions.pod:3389
11625 "This is enabled by default (since libguestfs 1.5.24, previously it was "
11626 "disabled by default)."
11630 #: ../src/guestfs-actions.pod:4405
11631 msgid "guestfs_set_direct"
11635 #: ../src/guestfs-actions.pod:4407
11638 " int guestfs_set_direct (guestfs_h *g,\n"
11639 "\t\tint direct);\n"
11644 #: ../src/guestfs-actions.pod:4410 ../fish/guestfish-actions.pod:3398
11646 "If the direct appliance mode flag is enabled, then stdin and stdout are "
11647 "passed directly through to the appliance once it is launched."
11651 #: ../src/guestfs-actions.pod:4414
11653 "One consequence of this is that log messages aren't caught by the library "
11654 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
11659 #: ../src/guestfs-actions.pod:4418 ../fish/guestfish-actions.pod:3406
11660 msgid "You probably don't want to use this unless you know what you are doing."
11664 #: ../src/guestfs-actions.pod:4421 ../fish/guestfish-actions.pod:3409
11665 msgid "The default is disabled."
11669 #: ../src/guestfs-actions.pod:4425
11670 msgid "guestfs_set_e2label"
11674 #: ../src/guestfs-actions.pod:4427
11677 " int guestfs_set_e2label (guestfs_h *g,\n"
11678 "\t\tconst char *device,\n"
11679 "\t\tconst char *label);\n"
11684 #: ../src/guestfs-actions.pod:4431 ../fish/guestfish-actions.pod:3415
11686 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
11687 "C<label>. Filesystem labels are limited to 16 characters."
11691 #: ../src/guestfs-actions.pod:4435
11693 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
11694 "the existing label on a filesystem."
11698 #: ../src/guestfs-actions.pod:4440
11699 msgid "guestfs_set_e2uuid"
11703 #: ../src/guestfs-actions.pod:4442
11706 " int guestfs_set_e2uuid (guestfs_h *g,\n"
11707 "\t\tconst char *device,\n"
11708 "\t\tconst char *uuid);\n"
11713 #: ../src/guestfs-actions.pod:4446 ../fish/guestfish-actions.pod:3426
11715 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
11716 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
11717 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
11721 #: ../src/guestfs-actions.pod:4451
11723 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
11724 "the existing UUID of a filesystem."
11728 #: ../src/guestfs-actions.pod:4456
11729 msgid "guestfs_set_memsize"
11733 #: ../src/guestfs-actions.pod:4458
11736 " int guestfs_set_memsize (guestfs_h *g,\n"
11737 "\t\tint memsize);\n"
11742 #: ../src/guestfs-actions.pod:4461
11744 "This sets the memory size in megabytes allocated to the qemu subprocess. "
11745 "This only has any effect if called before C<guestfs_launch>."
11749 #: ../src/guestfs-actions.pod:4465 ../fish/guestfish-actions.pod:3444
11751 "You can also change this by setting the environment variable "
11752 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
11756 #: ../src/guestfs-actions.pod:4474
11757 msgid "guestfs_set_network"
11761 #: ../src/guestfs-actions.pod:4476
11764 " int guestfs_set_network (guestfs_h *g,\n"
11765 "\t\tint network);\n"
11770 #: ../src/guestfs-actions.pod:4479 ../fish/guestfish-actions.pod:3457
11772 "If C<network> is true, then the network is enabled in the libguestfs "
11773 "appliance. The default is false."
11777 #: ../src/guestfs-actions.pod:4482 ../fish/guestfish-actions.pod:3460
11779 "This affects whether commands are able to access the network (see "
11780 "L<guestfs(3)/RUNNING COMMANDS>)."
11784 #: ../src/guestfs-actions.pod:4485
11786 "You must call this before calling C<guestfs_launch>, otherwise it has no "
11791 #: ../src/guestfs-actions.pod:4490
11792 msgid "guestfs_set_path"
11796 #: ../src/guestfs-actions.pod:4492
11799 " int guestfs_set_path (guestfs_h *g,\n"
11800 "\t\tconst char *searchpath);\n"
11805 #: ../src/guestfs-actions.pod:4495 ../fish/guestfish-actions.pod:3472
11806 msgid "Set the path that libguestfs searches for kernel and initrd.img."
11810 #: ../src/guestfs-actions.pod:4497 ../fish/guestfish-actions.pod:3474
11812 "The default is C<$libdir/guestfs> unless overridden by setting "
11813 "C<LIBGUESTFS_PATH> environment variable."
11817 #: ../src/guestfs-actions.pod:4500 ../fish/guestfish-actions.pod:3477
11818 msgid "Setting C<path> to C<NULL> restores the default path."
11822 #: ../src/guestfs-actions.pod:4504
11823 msgid "guestfs_set_qemu"
11827 #: ../src/guestfs-actions.pod:4506
11830 " int guestfs_set_qemu (guestfs_h *g,\n"
11831 "\t\tconst char *qemu);\n"
11836 #: ../src/guestfs-actions.pod:4509 ../fish/guestfish-actions.pod:3485
11837 msgid "Set the qemu binary that we will use."
11841 #: ../src/guestfs-actions.pod:4511 ../fish/guestfish-actions.pod:3487
11842 msgid "The default is chosen when the library was compiled by the configure script."
11846 #: ../src/guestfs-actions.pod:4514 ../fish/guestfish-actions.pod:3490
11848 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
11853 #: ../src/guestfs-actions.pod:4517 ../fish/guestfish-actions.pod:3493
11854 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
11858 #: ../src/guestfs-actions.pod:4519 ../fish/guestfish-actions.pod:3495
11860 "Note that you should call this function as early as possible after creating "
11861 "the handle. This is because some pre-launch operations depend on testing "
11862 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
11863 "don't retest features, and so you might see inconsistent results. Using the "
11864 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
11865 "the qemu binary at the same time as the handle is created."
11869 #: ../src/guestfs-actions.pod:4529
11870 msgid "guestfs_set_recovery_proc"
11874 #: ../src/guestfs-actions.pod:4531
11877 " int guestfs_set_recovery_proc (guestfs_h *g,\n"
11878 "\t\tint recoveryproc);\n"
11883 #: ../src/guestfs-actions.pod:4534
11885 "If this is called with the parameter C<false> then C<guestfs_launch> does "
11886 "not create a recovery process. The purpose of the recovery process is to "
11887 "stop runaway qemu processes in the case where the main program aborts "
11892 #: ../src/guestfs-actions.pod:4539
11894 "This only has any effect if called before C<guestfs_launch>, and the default "
11899 #: ../src/guestfs-actions.pod:4542 ../fish/guestfish-actions.pod:3517
11901 "About the only time when you would want to disable this is if the main "
11902 "process will fork itself into the background (\"daemonize\" itself). In "
11903 "this case the recovery process thinks that the main program has disappeared "
11904 "and so kills qemu, which is not very helpful."
11908 #: ../src/guestfs-actions.pod:4550
11909 msgid "guestfs_set_selinux"
11913 #: ../src/guestfs-actions.pod:4552
11916 " int guestfs_set_selinux (guestfs_h *g,\n"
11917 "\t\tint selinux);\n"
11922 #: ../src/guestfs-actions.pod:4555 ../fish/guestfish-actions.pod:3529
11924 "This sets the selinux flag that is passed to the appliance at boot time. "
11925 "The default is C<selinux=0> (disabled)."
11929 #: ../src/guestfs-actions.pod:4558 ../fish/guestfish-actions.pod:3532
11931 "Note that if SELinux is enabled, it is always in Permissive mode "
11932 "(C<enforcing=0>)."
11936 #: ../src/guestfs-actions.pod:4566
11937 msgid "guestfs_set_trace"
11941 #: ../src/guestfs-actions.pod:4568
11944 " int guestfs_set_trace (guestfs_h *g,\n"
11945 "\t\tint trace);\n"
11950 #: ../src/guestfs-actions.pod:4571 ../fish/guestfish-actions.pod:3544
11952 "If the command trace flag is set to 1, then commands are printed on stderr "
11953 "before they are executed in a format which is very similar to the one used "
11954 "by guestfish. In other words, you can run a program with this enabled, and "
11955 "you will get out a script which you can feed to guestfish to perform the "
11956 "same set of actions."
11960 #: ../src/guestfs-actions.pod:4578 ../fish/guestfish-actions.pod:3551
11962 "If you want to trace C API calls into libguestfs (and other libraries) then "
11963 "possibly a better way is to use the external ltrace(1) command."
11967 #: ../src/guestfs-actions.pod:4582 ../fish/guestfish-actions.pod:3555
11969 "Command traces are disabled unless the environment variable "
11970 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
11974 #: ../src/guestfs-actions.pod:4587
11975 msgid "guestfs_set_verbose"
11979 #: ../src/guestfs-actions.pod:4589
11982 " int guestfs_set_verbose (guestfs_h *g,\n"
11983 "\t\tint verbose);\n"
11988 #: ../src/guestfs-actions.pod:4592 ../fish/guestfish-actions.pod:3564
11989 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
11993 #: ../src/guestfs-actions.pod:4594 ../fish/guestfish-actions.pod:3566
11995 "Verbose messages are disabled unless the environment variable "
11996 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
12000 #: ../src/guestfs-actions.pod:4599
12001 msgid "guestfs_setcon"
12005 #: ../src/guestfs-actions.pod:4601
12008 " int guestfs_setcon (guestfs_h *g,\n"
12009 "\t\tconst char *context);\n"
12014 #: ../src/guestfs-actions.pod:4604 ../fish/guestfish-actions.pod:3573
12016 "This sets the SELinux security context of the daemon to the string "
12021 #: ../src/guestfs-actions.pod:4607 ../fish/guestfish-actions.pod:3576
12022 msgid "See the documentation about SELINUX in L<guestfs(3)>."
12026 #: ../src/guestfs-actions.pod:4611
12027 msgid "guestfs_setxattr"
12031 #: ../src/guestfs-actions.pod:4613
12034 " int guestfs_setxattr (guestfs_h *g,\n"
12035 "\t\tconst char *xattr,\n"
12036 "\t\tconst char *val,\n"
12037 "\t\tint vallen,\n"
12038 "\t\tconst char *path);\n"
12043 #: ../src/guestfs-actions.pod:4619 ../fish/guestfish-actions.pod:3582
12045 "This call sets the extended attribute named C<xattr> of the file C<path> to "
12046 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
12050 #: ../src/guestfs-actions.pod:4623
12051 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
12055 #: ../src/guestfs-actions.pod:4627
12056 msgid "guestfs_sfdisk"
12060 #: ../src/guestfs-actions.pod:4629
12063 " int guestfs_sfdisk (guestfs_h *g,\n"
12064 "\t\tconst char *device,\n"
12067 "\t\tint sectors,\n"
12068 "\t\tchar *const *lines);\n"
12073 #: ../src/guestfs-actions.pod:4636 ../fish/guestfish-actions.pod:3592
12075 "This is a direct interface to the L<sfdisk(8)> program for creating "
12076 "partitions on block devices."
12080 #: ../src/guestfs-actions.pod:4639 ../fish/guestfish-actions.pod:3595
12081 msgid "C<device> should be a block device, for example C</dev/sda>."
12085 #: ../src/guestfs-actions.pod:4641 ../fish/guestfish-actions.pod:3597
12087 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
12088 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
12089 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
12090 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
12091 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
12092 "the kernel) cannot work out the right geometry and you will need to tell it."
12096 #: ../src/guestfs-actions.pod:4649 ../fish/guestfish-actions.pod:3605
12098 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
12099 "refer to the L<sfdisk(8)> manpage."
12103 #: ../src/guestfs-actions.pod:4652 ../fish/guestfish-actions.pod:3608
12105 "To create a single partition occupying the whole disk, you would pass "
12106 "C<lines> as a single element list, when the single element being the string "
12111 #: ../src/guestfs-actions.pod:4656
12112 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
12116 #: ../src/guestfs-actions.pod:4664
12117 msgid "guestfs_sfdiskM"
12121 #: ../src/guestfs-actions.pod:4666
12124 " int guestfs_sfdiskM (guestfs_h *g,\n"
12125 "\t\tconst char *device,\n"
12126 "\t\tchar *const *lines);\n"
12131 #: ../src/guestfs-actions.pod:4670
12133 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
12134 "partition sizes are specified in megabytes only (rounded to the nearest "
12135 "cylinder) and you don't need to specify the cyls, heads and sectors "
12136 "parameters which were rarely if ever used anyway."
12140 #: ../src/guestfs-actions.pod:4676
12142 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
12143 "C<guestfs_part_disk>"
12147 #: ../src/guestfs-actions.pod:4684
12148 msgid "guestfs_sfdisk_N"
12152 #: ../src/guestfs-actions.pod:4686
12155 " int guestfs_sfdisk_N (guestfs_h *g,\n"
12156 "\t\tconst char *device,\n"
12157 "\t\tint partnum,\n"
12160 "\t\tint sectors,\n"
12161 "\t\tconst char *line);\n"
12166 #: ../src/guestfs-actions.pod:4694 ../fish/guestfish-actions.pod:3638
12168 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
12169 "(note: C<n> counts from 1)."
12173 #: ../src/guestfs-actions.pod:4697
12175 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
12176 "for the cyls/heads/sectors parameters."
12180 #: ../src/guestfs-actions.pod:4700
12181 msgid "See also: C<guestfs_part_add>"
12185 #: ../src/guestfs-actions.pod:4707
12186 msgid "guestfs_sfdisk_disk_geometry"
12190 #: ../src/guestfs-actions.pod:4709
12193 " char *guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
12194 "\t\tconst char *device);\n"
12199 #: ../src/guestfs-actions.pod:4712
12201 "This displays the disk geometry of C<device> read from the partition table. "
12202 "Especially in the case where the underlying block device has been resized, "
12203 "this can be different from the kernel's idea of the geometry (see "
12204 "C<guestfs_sfdisk_kernel_geometry>)."
12208 #: ../src/guestfs-actions.pod:4717 ../src/guestfs-actions.pod:4730 ../fish/guestfish-actions.pod:3658 ../fish/guestfish-actions.pod:3667
12209 msgid "The result is in human-readable format, and not designed to be parsed."
12213 #: ../src/guestfs-actions.pod:4723
12214 msgid "guestfs_sfdisk_kernel_geometry"
12218 #: ../src/guestfs-actions.pod:4725
12221 " char *guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
12222 "\t\tconst char *device);\n"
12227 #: ../src/guestfs-actions.pod:4728 ../fish/guestfish-actions.pod:3665
12228 msgid "This displays the kernel's idea of the geometry of C<device>."
12232 #: ../src/guestfs-actions.pod:4736
12233 msgid "guestfs_sfdisk_l"
12237 #: ../src/guestfs-actions.pod:4738
12240 " char *guestfs_sfdisk_l (guestfs_h *g,\n"
12241 "\t\tconst char *device);\n"
12246 #: ../src/guestfs-actions.pod:4741 ../fish/guestfish-actions.pod:3674
12248 "This displays the partition table on C<device>, in the human-readable output "
12249 "of the L<sfdisk(8)> command. It is not intended to be parsed."
12253 #: ../src/guestfs-actions.pod:4745
12254 msgid "See also: C<guestfs_part_list>"
12258 #: ../src/guestfs-actions.pod:4750
12263 #: ../src/guestfs-actions.pod:4752
12266 " char *guestfs_sh (guestfs_h *g,\n"
12267 "\t\tconst char *command);\n"
12272 #: ../src/guestfs-actions.pod:4755 ../fish/guestfish-actions.pod:3684
12274 "This call runs a command from the guest filesystem via the guest's "
12279 #: ../src/guestfs-actions.pod:4758
12280 msgid "This is like C<guestfs_command>, but passes the command to:"
12284 #: ../src/guestfs-actions.pod:4760 ../fish/guestfish-actions.pod:3689
12287 " /bin/sh -c \"command\"\n"
12292 #: ../src/guestfs-actions.pod:4762 ../fish/guestfish-actions.pod:3691
12294 "Depending on the guest's shell, this usually results in wildcards being "
12295 "expanded, shell expressions being interpolated and so on."
12299 #: ../src/guestfs-actions.pod:4766
12300 msgid "All the provisos about C<guestfs_command> apply to this call."
12304 #: ../src/guestfs-actions.pod:4771
12305 msgid "guestfs_sh_lines"
12309 #: ../src/guestfs-actions.pod:4773
12312 " char **guestfs_sh_lines (guestfs_h *g,\n"
12313 "\t\tconst char *command);\n"
12318 #: ../src/guestfs-actions.pod:4776
12320 "This is the same as C<guestfs_sh>, but splits the result into a list of "
12325 #: ../src/guestfs-actions.pod:4779
12326 msgid "See also: C<guestfs_command_lines>"
12330 #: ../src/guestfs-actions.pod:4785
12331 msgid "guestfs_sleep"
12335 #: ../src/guestfs-actions.pod:4787
12338 " int guestfs_sleep (guestfs_h *g,\n"
12344 #: ../src/guestfs-actions.pod:4790 ../fish/guestfish-actions.pod:3710
12345 msgid "Sleep for C<secs> seconds."
12349 #: ../src/guestfs-actions.pod:4794 ../src/guestfs-structs.pod:109
12350 msgid "guestfs_stat"
12354 #: ../src/guestfs-actions.pod:4796
12357 " struct guestfs_stat *guestfs_stat (guestfs_h *g,\n"
12358 "\t\tconst char *path);\n"
12363 #: ../src/guestfs-actions.pod:4801 ../fish/guestfish-actions.pod:3718
12364 msgid "This is the same as the C<stat(2)> system call."
12368 #: ../src/guestfs-actions.pod:4807 ../src/guestfs-structs.pod:135
12369 msgid "guestfs_statvfs"
12373 #: ../src/guestfs-actions.pod:4809
12376 " struct guestfs_statvfs *guestfs_statvfs (guestfs_h *g,\n"
12377 "\t\tconst char *path);\n"
12382 #: ../src/guestfs-actions.pod:4812 ../fish/guestfish-actions.pod:3724
12384 "Returns file system statistics for any mounted file system. C<path> should "
12385 "be a file or directory in the mounted file system (typically it is the mount "
12386 "point itself, but it doesn't need to be)."
12390 #: ../src/guestfs-actions.pod:4816 ../fish/guestfish-actions.pod:3728
12391 msgid "This is the same as the C<statvfs(2)> system call."
12395 #: ../src/guestfs-actions.pod:4818
12397 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
12398 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
12402 #: ../src/guestfs-actions.pod:4822
12403 msgid "guestfs_strings"
12407 #: ../src/guestfs-actions.pod:4824
12410 " char **guestfs_strings (guestfs_h *g,\n"
12411 "\t\tconst char *path);\n"
12416 #: ../src/guestfs-actions.pod:4827 ../fish/guestfish-actions.pod:3734
12418 "This runs the L<strings(1)> command on a file and returns the list of "
12419 "printable strings found."
12423 #: ../src/guestfs-actions.pod:4837
12424 msgid "guestfs_strings_e"
12428 #: ../src/guestfs-actions.pod:4839
12431 " char **guestfs_strings_e (guestfs_h *g,\n"
12432 "\t\tconst char *encoding,\n"
12433 "\t\tconst char *path);\n"
12438 #: ../src/guestfs-actions.pod:4843
12440 "This is like the C<guestfs_strings> command, but allows you to specify the "
12441 "encoding of strings that are looked for in the source file C<path>."
12445 #: ../src/guestfs-actions.pod:4847 ../fish/guestfish-actions.pod:3748
12446 msgid "Allowed encodings are:"
12450 #: ../src/guestfs-actions.pod:4851 ../fish/guestfish-actions.pod:3752
12455 #: ../src/guestfs-actions.pod:4853
12457 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
12458 "ISO-8859-X (this is what C<guestfs_strings> uses)."
12462 #: ../src/guestfs-actions.pod:4856 ../fish/guestfish-actions.pod:3757
12467 #: ../src/guestfs-actions.pod:4858 ../fish/guestfish-actions.pod:3759
12468 msgid "Single 8-bit-byte characters."
12472 #: ../src/guestfs-actions.pod:4860 ../fish/guestfish-actions.pod:3761
12477 #: ../src/guestfs-actions.pod:4862 ../fish/guestfish-actions.pod:3763
12478 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
12482 #: ../src/guestfs-actions.pod:4865 ../fish/guestfish-actions.pod:3766
12483 msgid "l (lower case letter L)"
12487 #: ../src/guestfs-actions.pod:4867 ../fish/guestfish-actions.pod:3768
12489 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
12490 "examining binaries in Windows guests."
12494 #: ../src/guestfs-actions.pod:4870 ../fish/guestfish-actions.pod:3771
12499 #: ../src/guestfs-actions.pod:4872 ../fish/guestfish-actions.pod:3773
12500 msgid "32-bit big endian such as UCS-4BE."
12504 #: ../src/guestfs-actions.pod:4874 ../fish/guestfish-actions.pod:3775
12509 #: ../src/guestfs-actions.pod:4876 ../fish/guestfish-actions.pod:3777
12510 msgid "32-bit little endian such as UCS-4LE."
12514 #: ../src/guestfs-actions.pod:4880 ../fish/guestfish-actions.pod:3781
12515 msgid "The returned strings are transcoded to UTF-8."
12519 #: ../src/guestfs-actions.pod:4889
12520 msgid "guestfs_swapoff_device"
12524 #: ../src/guestfs-actions.pod:4891
12527 " int guestfs_swapoff_device (guestfs_h *g,\n"
12528 "\t\tconst char *device);\n"
12533 #: ../src/guestfs-actions.pod:4894
12535 "This command disables the libguestfs appliance swap device or partition "
12536 "named C<device>. See C<guestfs_swapon_device>."
12540 #: ../src/guestfs-actions.pod:4900
12541 msgid "guestfs_swapoff_file"
12545 #: ../src/guestfs-actions.pod:4902
12548 " int guestfs_swapoff_file (guestfs_h *g,\n"
12549 "\t\tconst char *file);\n"
12554 #: ../src/guestfs-actions.pod:4905 ../fish/guestfish-actions.pod:3798
12555 msgid "This command disables the libguestfs appliance swap on file."
12559 #: ../src/guestfs-actions.pod:4909
12560 msgid "guestfs_swapoff_label"
12564 #: ../src/guestfs-actions.pod:4911
12567 " int guestfs_swapoff_label (guestfs_h *g,\n"
12568 "\t\tconst char *label);\n"
12573 #: ../src/guestfs-actions.pod:4914 ../fish/guestfish-actions.pod:3804
12575 "This command disables the libguestfs appliance swap on labeled swap "
12580 #: ../src/guestfs-actions.pod:4919
12581 msgid "guestfs_swapoff_uuid"
12585 #: ../src/guestfs-actions.pod:4921
12588 " int guestfs_swapoff_uuid (guestfs_h *g,\n"
12589 "\t\tconst char *uuid);\n"
12594 #: ../src/guestfs-actions.pod:4924 ../fish/guestfish-actions.pod:3811
12596 "This command disables the libguestfs appliance swap partition with the given "
12601 #: ../src/guestfs-actions.pod:4929
12602 msgid "guestfs_swapon_device"
12606 #: ../src/guestfs-actions.pod:4931
12609 " int guestfs_swapon_device (guestfs_h *g,\n"
12610 "\t\tconst char *device);\n"
12615 #: ../src/guestfs-actions.pod:4934
12617 "This command enables the libguestfs appliance to use the swap device or "
12618 "partition named C<device>. The increased memory is made available for all "
12619 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
12623 #: ../src/guestfs-actions.pod:4939 ../fish/guestfish-actions.pod:3823
12625 "Note that you should not swap to existing guest swap partitions unless you "
12626 "know what you are doing. They may contain hibernation information, or other "
12627 "information that the guest doesn't want you to trash. You also risk leaking "
12628 "information about the host to the guest this way. Instead, attach a new "
12629 "host device to the guest and swap on that."
12633 #: ../src/guestfs-actions.pod:4948
12634 msgid "guestfs_swapon_file"
12638 #: ../src/guestfs-actions.pod:4950
12641 " int guestfs_swapon_file (guestfs_h *g,\n"
12642 "\t\tconst char *file);\n"
12647 #: ../src/guestfs-actions.pod:4953
12649 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
12654 #: ../src/guestfs-actions.pod:4958
12655 msgid "guestfs_swapon_label"
12659 #: ../src/guestfs-actions.pod:4960
12662 " int guestfs_swapon_label (guestfs_h *g,\n"
12663 "\t\tconst char *label);\n"
12668 #: ../src/guestfs-actions.pod:4963
12670 "This command enables swap to a labeled swap partition. See "
12671 "C<guestfs_swapon_device> for other notes."
12675 #: ../src/guestfs-actions.pod:4968
12676 msgid "guestfs_swapon_uuid"
12680 #: ../src/guestfs-actions.pod:4970
12683 " int guestfs_swapon_uuid (guestfs_h *g,\n"
12684 "\t\tconst char *uuid);\n"
12689 #: ../src/guestfs-actions.pod:4973
12691 "This command enables swap to a swap partition with the given UUID. See "
12692 "C<guestfs_swapon_device> for other notes."
12696 #: ../src/guestfs-actions.pod:4978
12697 msgid "guestfs_sync"
12701 #: ../src/guestfs-actions.pod:4980
12704 " int guestfs_sync (guestfs_h *g);\n"
12709 #: ../src/guestfs-actions.pod:4982 ../fish/guestfish-actions.pod:3855
12711 "This syncs the disk, so that any writes are flushed through to the "
12712 "underlying disk image."
12716 #: ../src/guestfs-actions.pod:4985 ../fish/guestfish-actions.pod:3858
12718 "You should always call this if you have modified a disk image, before "
12719 "closing the handle."
12723 #: ../src/guestfs-actions.pod:4990
12724 msgid "guestfs_tail"
12728 #: ../src/guestfs-actions.pod:4992
12731 " char **guestfs_tail (guestfs_h *g,\n"
12732 "\t\tconst char *path);\n"
12737 #: ../src/guestfs-actions.pod:4995 ../fish/guestfish-actions.pod:3865
12738 msgid "This command returns up to the last 10 lines of a file as a list of strings."
12742 #: ../src/guestfs-actions.pod:5005
12743 msgid "guestfs_tail_n"
12747 #: ../src/guestfs-actions.pod:5007
12750 " char **guestfs_tail_n (guestfs_h *g,\n"
12751 "\t\tint nrlines,\n"
12752 "\t\tconst char *path);\n"
12757 #: ../src/guestfs-actions.pod:5011 ../fish/guestfish-actions.pod:3875
12759 "If the parameter C<nrlines> is a positive number, this returns the last "
12760 "C<nrlines> lines of the file C<path>."
12764 #: ../src/guestfs-actions.pod:5014 ../fish/guestfish-actions.pod:3878
12766 "If the parameter C<nrlines> is a negative number, this returns lines from "
12767 "the file C<path>, starting with the C<-nrlines>th line."
12771 #: ../src/guestfs-actions.pod:5026
12772 msgid "guestfs_tar_in"
12776 #: ../src/guestfs-actions.pod:5028
12779 " int guestfs_tar_in (guestfs_h *g,\n"
12780 "\t\tconst char *tarfile,\n"
12781 "\t\tconst char *directory);\n"
12786 #: ../src/guestfs-actions.pod:5032 ../fish/guestfish-actions.pod:3890
12788 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
12789 "tar file) into C<directory>."
12793 #: ../src/guestfs-actions.pod:5035
12794 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
12798 #: ../src/guestfs-actions.pod:5040
12799 msgid "guestfs_tar_out"
12803 #: ../src/guestfs-actions.pod:5042
12806 " int guestfs_tar_out (guestfs_h *g,\n"
12807 "\t\tconst char *directory,\n"
12808 "\t\tconst char *tarfile);\n"
12813 #: ../src/guestfs-actions.pod:5046 ../fish/guestfish-actions.pod:3902
12815 "This command packs the contents of C<directory> and downloads it to local "
12820 #: ../src/guestfs-actions.pod:5049
12822 "To download a compressed tarball, use C<guestfs_tgz_out> or "
12823 "C<guestfs_txz_out>."
12827 #: ../src/guestfs-actions.pod:5054
12828 msgid "guestfs_tgz_in"
12832 #: ../src/guestfs-actions.pod:5056
12835 " int guestfs_tgz_in (guestfs_h *g,\n"
12836 "\t\tconst char *tarball,\n"
12837 "\t\tconst char *directory);\n"
12842 #: ../src/guestfs-actions.pod:5060 ../fish/guestfish-actions.pod:3914
12844 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
12845 "tar file) into C<directory>."
12849 #: ../src/guestfs-actions.pod:5063
12850 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
12854 #: ../src/guestfs-actions.pod:5067
12855 msgid "guestfs_tgz_out"
12859 #: ../src/guestfs-actions.pod:5069
12862 " int guestfs_tgz_out (guestfs_h *g,\n"
12863 "\t\tconst char *directory,\n"
12864 "\t\tconst char *tarball);\n"
12869 #: ../src/guestfs-actions.pod:5073 ../fish/guestfish-actions.pod:3925
12871 "This command packs the contents of C<directory> and downloads it to local "
12876 #: ../src/guestfs-actions.pod:5076
12877 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
12881 #: ../src/guestfs-actions.pod:5080
12882 msgid "guestfs_touch"
12886 #: ../src/guestfs-actions.pod:5082
12889 " int guestfs_touch (guestfs_h *g,\n"
12890 "\t\tconst char *path);\n"
12895 #: ../src/guestfs-actions.pod:5085 ../fish/guestfish-actions.pod:3936
12897 "Touch acts like the L<touch(1)> command. It can be used to update the "
12898 "timestamps on a file, or, if the file does not exist, to create a new "
12899 "zero-length file."
12903 #: ../src/guestfs-actions.pod:5089 ../fish/guestfish-actions.pod:3940
12905 "This command only works on regular files, and will fail on other file types "
12906 "such as directories, symbolic links, block special etc."
12910 #: ../src/guestfs-actions.pod:5094
12911 msgid "guestfs_truncate"
12915 #: ../src/guestfs-actions.pod:5096
12918 " int guestfs_truncate (guestfs_h *g,\n"
12919 "\t\tconst char *path);\n"
12924 #: ../src/guestfs-actions.pod:5099 ../fish/guestfish-actions.pod:3947
12926 "This command truncates C<path> to a zero-length file. The file must exist "
12931 #: ../src/guestfs-actions.pod:5104
12932 msgid "guestfs_truncate_size"
12936 #: ../src/guestfs-actions.pod:5106
12939 " int guestfs_truncate_size (guestfs_h *g,\n"
12940 "\t\tconst char *path,\n"
12941 "\t\tint64_t size);\n"
12946 #: ../src/guestfs-actions.pod:5110 ../fish/guestfish-actions.pod:3954
12948 "This command truncates C<path> to size C<size> bytes. The file must exist "
12953 #: ../src/guestfs-actions.pod:5113
12955 "If the current file size is less than C<size> then the file is extended to "
12956 "the required size with zero bytes. This creates a sparse file (ie. disk "
12957 "blocks are not allocated for the file until you write to it). To create a "
12958 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
12962 #: ../src/guestfs-actions.pod:5121
12963 msgid "guestfs_tune2fs_l"
12967 #: ../src/guestfs-actions.pod:5123
12970 " char **guestfs_tune2fs_l (guestfs_h *g,\n"
12971 "\t\tconst char *device);\n"
12976 #: ../src/guestfs-actions.pod:5126 ../fish/guestfish-actions.pod:3967
12978 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
12983 #: ../src/guestfs-actions.pod:5129 ../fish/guestfish-actions.pod:3970
12985 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
12986 "for more details. The list of fields returned isn't clearly defined, and "
12987 "depends on both the version of C<tune2fs> that libguestfs was built against, "
12988 "and the filesystem itself."
12992 #: ../src/guestfs-actions.pod:5140
12993 msgid "guestfs_txz_in"
12997 #: ../src/guestfs-actions.pod:5142
13000 " int guestfs_txz_in (guestfs_h *g,\n"
13001 "\t\tconst char *tarball,\n"
13002 "\t\tconst char *directory);\n"
13007 #: ../src/guestfs-actions.pod:5146 ../fish/guestfish-actions.pod:3979
13009 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
13010 "tar file) into C<directory>."
13014 #: ../src/guestfs-actions.pod:5151
13015 msgid "guestfs_txz_out"
13019 #: ../src/guestfs-actions.pod:5153
13022 " int guestfs_txz_out (guestfs_h *g,\n"
13023 "\t\tconst char *directory,\n"
13024 "\t\tconst char *tarball);\n"
13029 #: ../src/guestfs-actions.pod:5157 ../fish/guestfish-actions.pod:3988
13031 "This command packs the contents of C<directory> and downloads it to local "
13032 "file C<tarball> (as an xz compressed tar archive)."
13036 #: ../src/guestfs-actions.pod:5162
13037 msgid "guestfs_umask"
13041 #: ../src/guestfs-actions.pod:5164
13044 " int guestfs_umask (guestfs_h *g,\n"
13050 #: ../src/guestfs-actions.pod:5167 ../fish/guestfish-actions.pod:3997
13052 "This function sets the mask used for creating new files and device nodes to "
13057 #: ../src/guestfs-actions.pod:5170 ../fish/guestfish-actions.pod:4000
13059 "Typical umask values would be C<022> which creates new files with "
13060 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
13061 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
13065 #: ../src/guestfs-actions.pod:5175 ../fish/guestfish-actions.pod:4005
13067 "The default umask is C<022>. This is important because it means that "
13068 "directories and device nodes will be created with C<0644> or C<0755> mode "
13069 "even if you specify C<0777>."
13073 #: ../src/guestfs-actions.pod:5179
13075 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
13076 "C<guestfs_mkdir>."
13080 #: ../src/guestfs-actions.pod:5182 ../fish/guestfish-actions.pod:4012
13081 msgid "This call returns the previous umask."
13085 #: ../src/guestfs-actions.pod:5186
13086 msgid "guestfs_umount"
13090 #: ../src/guestfs-actions.pod:5188
13093 " int guestfs_umount (guestfs_h *g,\n"
13094 "\t\tconst char *pathordevice);\n"
13099 #: ../src/guestfs-actions.pod:5191 ../fish/guestfish-actions.pod:4020
13101 "This unmounts the given filesystem. The filesystem may be specified either "
13102 "by its mountpoint (path) or the device which contains the filesystem."
13106 #: ../src/guestfs-actions.pod:5197
13107 msgid "guestfs_umount_all"
13111 #: ../src/guestfs-actions.pod:5199
13114 " int guestfs_umount_all (guestfs_h *g);\n"
13119 #: ../src/guestfs-actions.pod:5201 ../fish/guestfish-actions.pod:4030
13120 msgid "This unmounts all mounted filesystems."
13124 #: ../src/guestfs-actions.pod:5203 ../fish/guestfish-actions.pod:4032
13125 msgid "Some internal mounts are not unmounted by this call."
13129 #: ../src/guestfs-actions.pod:5207
13130 msgid "guestfs_upload"
13134 #: ../src/guestfs-actions.pod:5209
13137 " int guestfs_upload (guestfs_h *g,\n"
13138 "\t\tconst char *filename,\n"
13139 "\t\tconst char *remotefilename);\n"
13144 #: ../src/guestfs-actions.pod:5213 ../src/guestfs-actions.pod:5229 ../fish/guestfish-actions.pod:4038 ../fish/guestfish-actions.pod:4051
13145 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
13149 #: ../src/guestfs-actions.pod:5218
13150 msgid "See also C<guestfs_download>."
13154 #: ../src/guestfs-actions.pod:5222
13155 msgid "guestfs_upload_offset"
13159 #: ../src/guestfs-actions.pod:5224
13162 " int guestfs_upload_offset (guestfs_h *g,\n"
13163 "\t\tconst char *filename,\n"
13164 "\t\tconst char *remotefilename,\n"
13165 "\t\tint64_t offset);\n"
13170 #: ../src/guestfs-actions.pod:5232 ../fish/guestfish-actions.pod:4054
13172 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
13173 "The intention is to overwrite parts of existing files or devices, although "
13174 "if a non-existant file is specified then it is created with a \"hole\" "
13175 "before C<offset>. The size of the data written is implicit in the size of "
13176 "the source C<filename>."
13180 #: ../src/guestfs-actions.pod:5239
13182 "Note that there is no limit on the amount of data that can be uploaded with "
13183 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
13184 "full amount unless an error occurs."
13188 #: ../src/guestfs-actions.pod:5244
13189 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
13193 #: ../src/guestfs-actions.pod:5248
13194 msgid "guestfs_utimens"
13198 #: ../src/guestfs-actions.pod:5250
13201 " int guestfs_utimens (guestfs_h *g,\n"
13202 "\t\tconst char *path,\n"
13203 "\t\tint64_t atsecs,\n"
13204 "\t\tint64_t atnsecs,\n"
13205 "\t\tint64_t mtsecs,\n"
13206 "\t\tint64_t mtnsecs);\n"
13211 #: ../src/guestfs-actions.pod:5257 ../fish/guestfish-actions.pod:4074
13212 msgid "This command sets the timestamps of a file with nanosecond precision."
13216 #: ../src/guestfs-actions.pod:5260 ../fish/guestfish-actions.pod:4077
13218 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
13223 #: ../src/guestfs-actions.pod:5263 ../fish/guestfish-actions.pod:4080
13225 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
13226 "nanoseconds from the epoch."
13230 #: ../src/guestfs-actions.pod:5266 ../fish/guestfish-actions.pod:4083
13232 "If the C<*nsecs> field contains the special value C<-1> then the "
13233 "corresponding timestamp is set to the current time. (The C<*secs> field is "
13234 "ignored in this case)."
13238 #: ../src/guestfs-actions.pod:5270 ../fish/guestfish-actions.pod:4087
13240 "If the C<*nsecs> field contains the special value C<-2> then the "
13241 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
13246 #: ../src/guestfs-actions.pod:5276 ../src/guestfs-structs.pod:175
13247 msgid "guestfs_version"
13251 #: ../src/guestfs-actions.pod:5278
13254 " struct guestfs_version *guestfs_version (guestfs_h *g);\n"
13259 #: ../src/guestfs-actions.pod:5280 ../fish/guestfish-actions.pod:4095
13260 msgid "Return the libguestfs version number that the program is linked against."
13264 #: ../src/guestfs-actions.pod:5283 ../fish/guestfish-actions.pod:4098
13266 "Note that because of dynamic linking this is not necessarily the version of "
13267 "libguestfs that you compiled against. You can compile the program, and then "
13268 "at runtime dynamically link against a completely different C<libguestfs.so> "
13273 #: ../src/guestfs-actions.pod:5288 ../fish/guestfish-actions.pod:4103
13275 "This call was added in version C<1.0.58>. In previous versions of "
13276 "libguestfs there was no way to get the version number. From C code you can "
13277 "use dynamic linker functions to find out if this symbol exists (if it "
13278 "doesn't, then it's an earlier version)."
13282 #: ../src/guestfs-actions.pod:5294 ../fish/guestfish-actions.pod:4109
13284 "The call returns a structure with four elements. The first three (C<major>, "
13285 "C<minor> and C<release>) are numbers and correspond to the usual version "
13286 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
13287 "but may be used for distro-specific information."
13291 #: ../src/guestfs-actions.pod:5300 ../fish/guestfish-actions.pod:4115
13292 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
13296 #: ../src/guestfs-actions.pod:5303 ../fish/guestfish-actions.pod:4118
13297 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
13301 #: ../src/guestfs-actions.pod:5305
13303 "I<Note:> Don't use this call to test for availability of features. In "
13304 "enterprise distributions we backport features from later versions into "
13305 "earlier versions, making this an unreliable way to test for features. Use "
13306 "C<guestfs_available> instead."
13310 #: ../src/guestfs-actions.pod:5311
13312 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
13313 "error. I<The caller must call C<guestfs_free_version> after use>."
13317 #: ../src/guestfs-actions.pod:5315
13318 msgid "guestfs_vfs_label"
13322 #: ../src/guestfs-actions.pod:5317
13325 " char *guestfs_vfs_label (guestfs_h *g,\n"
13326 "\t\tconst char *device);\n"
13331 #: ../src/guestfs-actions.pod:5320 ../fish/guestfish-actions.pod:4130
13332 msgid "This returns the filesystem label of the filesystem on C<device>."
13336 #: ../src/guestfs-actions.pod:5323 ../fish/guestfish-actions.pod:4133
13337 msgid "If the filesystem is unlabeled, this returns the empty string."
13341 #: ../src/guestfs-actions.pod:5325
13342 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
13346 #: ../src/guestfs-actions.pod:5330
13347 msgid "guestfs_vfs_type"
13351 #: ../src/guestfs-actions.pod:5332
13354 " char *guestfs_vfs_type (guestfs_h *g,\n"
13355 "\t\tconst char *device);\n"
13360 #: ../src/guestfs-actions.pod:5335 ../fish/guestfish-actions.pod:4141
13362 "This command gets the filesystem type corresponding to the filesystem on "
13367 #: ../src/guestfs-actions.pod:5338 ../fish/guestfish-actions.pod:4144
13369 "For most filesystems, the result is the name of the Linux VFS module which "
13370 "would be used to mount this filesystem if you mounted it without specifying "
13371 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
13375 #: ../src/guestfs-actions.pod:5346
13376 msgid "guestfs_vfs_uuid"
13380 #: ../src/guestfs-actions.pod:5348
13383 " char *guestfs_vfs_uuid (guestfs_h *g,\n"
13384 "\t\tconst char *device);\n"
13389 #: ../src/guestfs-actions.pod:5351 ../fish/guestfish-actions.pod:4153
13390 msgid "This returns the filesystem UUID of the filesystem on C<device>."
13394 #: ../src/guestfs-actions.pod:5354 ../fish/guestfish-actions.pod:4156
13395 msgid "If the filesystem does not have a UUID, this returns the empty string."
13399 #: ../src/guestfs-actions.pod:5356
13400 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
13404 #: ../src/guestfs-actions.pod:5361
13405 msgid "guestfs_vg_activate"
13409 #: ../src/guestfs-actions.pod:5363
13412 " int guestfs_vg_activate (guestfs_h *g,\n"
13413 "\t\tint activate,\n"
13414 "\t\tchar *const *volgroups);\n"
13419 #: ../src/guestfs-actions.pod:5367 ../fish/guestfish-actions.pod:4164
13421 "This command activates or (if C<activate> is false) deactivates all logical "
13422 "volumes in the listed volume groups C<volgroups>. If activated, then they "
13423 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
13424 "deactivated, then those devices disappear."
13428 #: ../src/guestfs-actions.pod:5373 ../fish/guestfish-actions.pod:4170
13429 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
13433 #: ../src/guestfs-actions.pod:5375 ../fish/guestfish-actions.pod:4172
13435 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
13436 "activated or deactivated."
13440 #: ../src/guestfs-actions.pod:5380
13441 msgid "guestfs_vg_activate_all"
13445 #: ../src/guestfs-actions.pod:5382
13448 " int guestfs_vg_activate_all (guestfs_h *g,\n"
13449 "\t\tint activate);\n"
13454 #: ../src/guestfs-actions.pod:5385 ../fish/guestfish-actions.pod:4179
13456 "This command activates or (if C<activate> is false) deactivates all logical "
13457 "volumes in all volume groups. If activated, then they are made known to the "
13458 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
13459 "those devices disappear."
13463 #: ../src/guestfs-actions.pod:5391 ../fish/guestfish-actions.pod:4185
13464 msgid "This command is the same as running C<vgchange -a y|n>"
13468 #: ../src/guestfs-actions.pod:5395
13469 msgid "guestfs_vgcreate"
13473 #: ../src/guestfs-actions.pod:5397
13476 " int guestfs_vgcreate (guestfs_h *g,\n"
13477 "\t\tconst char *volgroup,\n"
13478 "\t\tchar *const *physvols);\n"
13483 #: ../src/guestfs-actions.pod:5401 ../fish/guestfish-actions.pod:4191
13485 "This creates an LVM volume group called C<volgroup> from the non-empty list "
13486 "of physical volumes C<physvols>."
13490 #: ../src/guestfs-actions.pod:5406
13491 msgid "guestfs_vglvuuids"
13495 #: ../src/guestfs-actions.pod:5408
13498 " char **guestfs_vglvuuids (guestfs_h *g,\n"
13499 "\t\tconst char *vgname);\n"
13504 #: ../src/guestfs-actions.pod:5411 ../fish/guestfish-actions.pod:4198
13506 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
13507 "volumes created in this volume group."
13511 #: ../src/guestfs-actions.pod:5414
13513 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
13514 "associate logical volumes and volume groups."
13518 #: ../src/guestfs-actions.pod:5417
13519 msgid "See also C<guestfs_vgpvuuids>."
13523 #: ../src/guestfs-actions.pod:5423
13524 msgid "guestfs_vgpvuuids"
13528 #: ../src/guestfs-actions.pod:5425
13531 " char **guestfs_vgpvuuids (guestfs_h *g,\n"
13532 "\t\tconst char *vgname);\n"
13537 #: ../src/guestfs-actions.pod:5428 ../fish/guestfish-actions.pod:4210
13539 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
13540 "volumes that this volume group resides on."
13544 #: ../src/guestfs-actions.pod:5431
13546 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
13547 "associate physical volumes and volume groups."
13551 #: ../src/guestfs-actions.pod:5434
13552 msgid "See also C<guestfs_vglvuuids>."
13556 #: ../src/guestfs-actions.pod:5440
13557 msgid "guestfs_vgremove"
13561 #: ../src/guestfs-actions.pod:5442
13564 " int guestfs_vgremove (guestfs_h *g,\n"
13565 "\t\tconst char *vgname);\n"
13570 #: ../src/guestfs-actions.pod:5445 ../fish/guestfish-actions.pod:4222
13571 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
13575 #: ../src/guestfs-actions.pod:5447 ../fish/guestfish-actions.pod:4224
13576 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
13580 #: ../src/guestfs-actions.pod:5452
13581 msgid "guestfs_vgrename"
13585 #: ../src/guestfs-actions.pod:5454
13588 " int guestfs_vgrename (guestfs_h *g,\n"
13589 "\t\tconst char *volgroup,\n"
13590 "\t\tconst char *newvolgroup);\n"
13595 #: ../src/guestfs-actions.pod:5458 ../fish/guestfish-actions.pod:4231
13596 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
13600 #: ../src/guestfs-actions.pod:5462
13601 msgid "guestfs_vgs"
13605 #: ../src/guestfs-actions.pod:5464
13608 " char **guestfs_vgs (guestfs_h *g);\n"
13613 #: ../src/guestfs-actions.pod:5466 ../fish/guestfish-actions.pod:4237
13615 "List all the volumes groups detected. This is the equivalent of the "
13616 "L<vgs(8)> command."
13620 #: ../src/guestfs-actions.pod:5469 ../fish/guestfish-actions.pod:4240
13622 "This returns a list of just the volume group names that were detected "
13623 "(eg. C<VolGroup00>)."
13627 #: ../src/guestfs-actions.pod:5472
13628 msgid "See also C<guestfs_vgs_full>."
13632 #: ../src/guestfs-actions.pod:5478
13633 msgid "guestfs_vgs_full"
13637 #: ../src/guestfs-actions.pod:5480
13640 " struct guestfs_lvm_vg_list *guestfs_vgs_full (guestfs_h *g);\n"
13645 #: ../src/guestfs-actions.pod:5482 ../fish/guestfish-actions.pod:4249
13647 "List all the volumes groups detected. This is the equivalent of the "
13648 "L<vgs(8)> command. The \"full\" version includes all fields."
13652 #: ../src/guestfs-actions.pod:5485
13654 "This function returns a C<struct guestfs_lvm_vg_list *> (see "
13655 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
13656 "must call C<guestfs_free_lvm_vg_list> after use>."
13660 #: ../src/guestfs-actions.pod:5490
13661 msgid "guestfs_vgscan"
13665 #: ../src/guestfs-actions.pod:5492
13668 " int guestfs_vgscan (guestfs_h *g);\n"
13673 #: ../src/guestfs-actions.pod:5494 ../fish/guestfish-actions.pod:4256
13675 "This rescans all block devices and rebuilds the list of LVM physical "
13676 "volumes, volume groups and logical volumes."
13680 #: ../src/guestfs-actions.pod:5499
13681 msgid "guestfs_vguuid"
13685 #: ../src/guestfs-actions.pod:5501
13688 " char *guestfs_vguuid (guestfs_h *g,\n"
13689 "\t\tconst char *vgname);\n"
13694 #: ../src/guestfs-actions.pod:5504 ../fish/guestfish-actions.pod:4263
13695 msgid "This command returns the UUID of the LVM VG named C<vgname>."
13699 #: ../src/guestfs-actions.pod:5509
13700 msgid "guestfs_wait_ready"
13704 #: ../src/guestfs-actions.pod:5511
13707 " int guestfs_wait_ready (guestfs_h *g);\n"
13712 #: ../src/guestfs-actions.pod:5513
13713 msgid "This function is a no op."
13717 #: ../src/guestfs-actions.pod:5515
13719 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
13720 "calling C<guestfs_launch> to wait for the launch to complete. However this "
13721 "is no longer necessary because C<guestfs_launch> now does the waiting."
13725 #: ../src/guestfs-actions.pod:5520
13727 "If you see any calls to this function in code then you can just remove them, "
13728 "unless you want to retain compatibility with older versions of the API."
13732 #: ../src/guestfs-actions.pod:5526
13733 msgid "guestfs_wc_c"
13737 #: ../src/guestfs-actions.pod:5528
13740 " int guestfs_wc_c (guestfs_h *g,\n"
13741 "\t\tconst char *path);\n"
13746 #: ../src/guestfs-actions.pod:5531 ../fish/guestfish-actions.pod:4269
13748 "This command counts the characters in a file, using the C<wc -c> external "
13753 #: ../src/guestfs-actions.pod:5536
13754 msgid "guestfs_wc_l"
13758 #: ../src/guestfs-actions.pod:5538
13761 " int guestfs_wc_l (guestfs_h *g,\n"
13762 "\t\tconst char *path);\n"
13767 #: ../src/guestfs-actions.pod:5541 ../fish/guestfish-actions.pod:4276
13769 "This command counts the lines in a file, using the C<wc -l> external "
13774 #: ../src/guestfs-actions.pod:5546
13775 msgid "guestfs_wc_w"
13779 #: ../src/guestfs-actions.pod:5548
13782 " int guestfs_wc_w (guestfs_h *g,\n"
13783 "\t\tconst char *path);\n"
13788 #: ../src/guestfs-actions.pod:5551 ../fish/guestfish-actions.pod:4283
13790 "This command counts the words in a file, using the C<wc -w> external "
13795 #: ../src/guestfs-actions.pod:5556
13796 msgid "guestfs_write"
13800 #: ../src/guestfs-actions.pod:5558
13803 " int guestfs_write (guestfs_h *g,\n"
13804 "\t\tconst char *path,\n"
13805 "\t\tconst char *content,\n"
13806 "\t\tsize_t content_size);\n"
13811 #: ../src/guestfs-actions.pod:5563 ../fish/guestfish-actions.pod:4290
13813 "This call creates a file called C<path>. The content of the file is the "
13814 "string C<content> (which can contain any 8 bit data)."
13818 #: ../src/guestfs-actions.pod:5571
13819 msgid "guestfs_write_file"
13823 #: ../src/guestfs-actions.pod:5573
13826 " int guestfs_write_file (guestfs_h *g,\n"
13827 "\t\tconst char *path,\n"
13828 "\t\tconst char *content,\n"
13834 #: ../src/guestfs-actions.pod:5578 ../fish/guestfish-actions.pod:4300
13836 "This call creates a file called C<path>. The contents of the file is the "
13837 "string C<content> (which can contain any 8 bit data), with length C<size>."
13841 #: ../src/guestfs-actions.pod:5582 ../fish/guestfish-actions.pod:4304
13843 "As a special case, if C<size> is C<0> then the length is calculated using "
13844 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
13848 #: ../src/guestfs-actions.pod:5586 ../fish/guestfish-actions.pod:4308
13850 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
13851 "I<not> work, even if the length is specified."
13855 #: ../src/guestfs-actions.pod:5594 ../fish/guestfish-actions.pod:4314
13856 msgid "This function is deprecated. In new code, use the C<write> call instead."
13860 #: ../src/guestfs-actions.pod:5601
13861 msgid "guestfs_zegrep"
13865 #: ../src/guestfs-actions.pod:5603
13868 " char **guestfs_zegrep (guestfs_h *g,\n"
13869 "\t\tconst char *regex,\n"
13870 "\t\tconst char *path);\n"
13875 #: ../src/guestfs-actions.pod:5607 ../fish/guestfish-actions.pod:4325
13876 msgid "This calls the external C<zegrep> program and returns the matching lines."
13880 #: ../src/guestfs-actions.pod:5617
13881 msgid "guestfs_zegrepi"
13885 #: ../src/guestfs-actions.pod:5619
13888 " char **guestfs_zegrepi (guestfs_h *g,\n"
13889 "\t\tconst char *regex,\n"
13890 "\t\tconst char *path);\n"
13895 #: ../src/guestfs-actions.pod:5623 ../fish/guestfish-actions.pod:4335
13896 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
13900 #: ../src/guestfs-actions.pod:5633
13901 msgid "guestfs_zero"
13905 #: ../src/guestfs-actions.pod:5635
13908 " int guestfs_zero (guestfs_h *g,\n"
13909 "\t\tconst char *device);\n"
13914 #: ../src/guestfs-actions.pod:5638 ../fish/guestfish-actions.pod:4345
13915 msgid "This command writes zeroes over the first few blocks of C<device>."
13919 #: ../src/guestfs-actions.pod:5640 ../fish/guestfish-actions.pod:4347
13921 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
13922 "securely wipe the device). It should be sufficient to remove any partition "
13923 "tables, filesystem superblocks and so on."
13927 #: ../src/guestfs-actions.pod:5644
13928 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
13932 #: ../src/guestfs-actions.pod:5653
13933 msgid "guestfs_zero_device"
13937 #: ../src/guestfs-actions.pod:5655
13940 " int guestfs_zero_device (guestfs_h *g,\n"
13941 "\t\tconst char *device);\n"
13946 #: ../src/guestfs-actions.pod:5658
13948 "This command writes zeroes over the entire C<device>. Compare with "
13949 "C<guestfs_zero> which just zeroes the first few blocks of a device."
13953 #: ../src/guestfs-actions.pod:5672
13954 msgid "guestfs_zerofree"
13958 #: ../src/guestfs-actions.pod:5674
13961 " int guestfs_zerofree (guestfs_h *g,\n"
13962 "\t\tconst char *device);\n"
13967 #: ../src/guestfs-actions.pod:5677 ../fish/guestfish-actions.pod:4368
13969 "This runs the I<zerofree> program on C<device>. This program claims to zero "
13970 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
13971 "possible to compress the filesystem more effectively."
13975 #: ../src/guestfs-actions.pod:5682 ../fish/guestfish-actions.pod:4373
13976 msgid "You should B<not> run this program if the filesystem is mounted."
13980 #: ../src/guestfs-actions.pod:5685 ../fish/guestfish-actions.pod:4376
13982 "It is possible that using this program can damage the filesystem or data on "
13987 #: ../src/guestfs-actions.pod:5690
13988 msgid "guestfs_zfgrep"
13992 #: ../src/guestfs-actions.pod:5692
13995 " char **guestfs_zfgrep (guestfs_h *g,\n"
13996 "\t\tconst char *pattern,\n"
13997 "\t\tconst char *path);\n"
14002 #: ../src/guestfs-actions.pod:5696 ../fish/guestfish-actions.pod:4383
14003 msgid "This calls the external C<zfgrep> program and returns the matching lines."
14007 #: ../src/guestfs-actions.pod:5706
14008 msgid "guestfs_zfgrepi"
14012 #: ../src/guestfs-actions.pod:5708
14015 " char **guestfs_zfgrepi (guestfs_h *g,\n"
14016 "\t\tconst char *pattern,\n"
14017 "\t\tconst char *path);\n"
14022 #: ../src/guestfs-actions.pod:5712 ../fish/guestfish-actions.pod:4393
14023 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
14027 #: ../src/guestfs-actions.pod:5722
14028 msgid "guestfs_zfile"
14032 #: ../src/guestfs-actions.pod:5724
14035 " char *guestfs_zfile (guestfs_h *g,\n"
14036 "\t\tconst char *meth,\n"
14037 "\t\tconst char *path);\n"
14042 #: ../src/guestfs-actions.pod:5728 ../fish/guestfish-actions.pod:4403
14043 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
14047 #: ../src/guestfs-actions.pod:5731 ../fish/guestfish-actions.pod:4406
14048 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
14052 #: ../src/guestfs-actions.pod:5733
14054 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
14059 #: ../src/guestfs-actions.pod:5739 ../fish/guestfish-actions.pod:4411
14060 msgid "This function is deprecated. In new code, use the C<file> call instead."
14064 #: ../src/guestfs-actions.pod:5746
14065 msgid "guestfs_zgrep"
14069 #: ../src/guestfs-actions.pod:5748
14072 " char **guestfs_zgrep (guestfs_h *g,\n"
14073 "\t\tconst char *regex,\n"
14074 "\t\tconst char *path);\n"
14079 #: ../src/guestfs-actions.pod:5752 ../fish/guestfish-actions.pod:4422
14080 msgid "This calls the external C<zgrep> program and returns the matching lines."
14084 #: ../src/guestfs-actions.pod:5762
14085 msgid "guestfs_zgrepi"
14089 #: ../src/guestfs-actions.pod:5764
14092 " char **guestfs_zgrepi (guestfs_h *g,\n"
14093 "\t\tconst char *regex,\n"
14094 "\t\tconst char *path);\n"
14099 #: ../src/guestfs-actions.pod:5768 ../fish/guestfish-actions.pod:4432
14100 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
14104 #: ../src/guestfs-availability.pod:3
14109 #: ../src/guestfs-availability.pod:5
14111 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
14112 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
14113 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
14114 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
14115 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
14119 #: ../src/guestfs-availability.pod:21
14124 #: ../src/guestfs-availability.pod:23
14126 "The following functions: L</guestfs_inotify_add_watch> "
14127 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
14128 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
14132 #: ../src/guestfs-availability.pod:31
14133 msgid "B<linuxfsuuid>"
14137 #: ../src/guestfs-availability.pod:33
14139 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
14140 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
14144 #: ../src/guestfs-availability.pod:40
14145 msgid "B<linuxmodules>"
14149 #: ../src/guestfs-availability.pod:42
14150 msgid "The following functions: L</guestfs_modprobe>"
14154 #: ../src/guestfs-availability.pod:45
14155 msgid "B<linuxxattrs>"
14159 #: ../src/guestfs-availability.pod:47
14161 "The following functions: L</guestfs_getxattrs> L</guestfs_lgetxattrs> "
14162 "L</guestfs_lremovexattr> L</guestfs_lsetxattr> L</guestfs_lxattrlist> "
14163 "L</guestfs_removexattr> L</guestfs_setxattr>"
14167 #: ../src/guestfs-availability.pod:56
14172 #: ../src/guestfs-availability.pod:58
14174 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
14175 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
14176 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
14180 #: ../src/guestfs-availability.pod:67
14185 #: ../src/guestfs-availability.pod:69
14187 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
14188 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
14189 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
14190 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
14191 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
14192 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
14193 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
14194 "L</guestfs_vgs_full>"
14198 #: ../src/guestfs-availability.pod:92
14203 #: ../src/guestfs-availability.pod:94
14205 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
14206 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
14210 #: ../src/guestfs-availability.pod:100
14215 #: ../src/guestfs-availability.pod:102
14216 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
14220 #: ../src/guestfs-availability.pod:105
14221 msgid "B<ntfsprogs>"
14225 #: ../src/guestfs-availability.pod:107
14226 msgid "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
14230 #: ../src/guestfs-availability.pod:111
14231 msgid "B<realpath>"
14235 #: ../src/guestfs-availability.pod:113
14236 msgid "The following functions: L</guestfs_realpath>"
14240 #: ../src/guestfs-availability.pod:116
14245 #: ../src/guestfs-availability.pod:118
14247 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
14248 "L</guestfs_scrub_freespace>"
14252 #: ../src/guestfs-availability.pod:123
14257 #: ../src/guestfs-availability.pod:125
14258 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
14262 #: ../src/guestfs-availability.pod:129
14267 #: ../src/guestfs-availability.pod:131
14268 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
14272 #: ../src/guestfs-availability.pod:135
14273 msgid "B<zerofree>"
14277 #: ../src/guestfs-availability.pod:137
14278 msgid "The following functions: L</guestfs_zerofree>"
14282 #: ../src/guestfs-structs.pod:1
14283 msgid "guestfs_int_bool"
14287 #: ../src/guestfs-structs.pod:3
14290 " struct guestfs_int_bool {\n"
14298 #: ../src/guestfs-structs.pod:8
14301 " struct guestfs_int_bool_list {\n"
14302 " uint32_t len; /* Number of elements in list. */\n"
14303 " struct guestfs_int_bool *val; /* Elements. */\n"
14309 #: ../src/guestfs-structs.pod:13
14312 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
14313 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
14318 #: ../src/guestfs-structs.pod:16
14319 msgid "guestfs_lvm_pv"
14323 #: ../src/guestfs-structs.pod:18
14326 " struct guestfs_lvm_pv {\n"
14327 " char *pv_name;\n"
14328 " /* The next field is NOT nul-terminated, be careful when printing it: "
14330 " char pv_uuid[32];\n"
14332 " uint64_t pv_size;\n"
14333 " uint64_t dev_size;\n"
14334 " uint64_t pv_free;\n"
14335 " uint64_t pv_used;\n"
14336 " char *pv_attr;\n"
14337 " int64_t pv_pe_count;\n"
14338 " int64_t pv_pe_alloc_count;\n"
14339 " char *pv_tags;\n"
14340 " uint64_t pe_start;\n"
14341 " int64_t pv_mda_count;\n"
14342 " uint64_t pv_mda_free;\n"
14348 #: ../src/guestfs-structs.pod:36
14351 " struct guestfs_lvm_pv_list {\n"
14352 " uint32_t len; /* Number of elements in list. */\n"
14353 " struct guestfs_lvm_pv *val; /* Elements. */\n"
14359 #: ../src/guestfs-structs.pod:41
14362 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
14363 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
14368 #: ../src/guestfs-structs.pod:44
14369 msgid "guestfs_lvm_vg"
14373 #: ../src/guestfs-structs.pod:46
14376 " struct guestfs_lvm_vg {\n"
14377 " char *vg_name;\n"
14378 " /* The next field is NOT nul-terminated, be careful when printing it: "
14380 " char vg_uuid[32];\n"
14382 " char *vg_attr;\n"
14383 " uint64_t vg_size;\n"
14384 " uint64_t vg_free;\n"
14385 " char *vg_sysid;\n"
14386 " uint64_t vg_extent_size;\n"
14387 " int64_t vg_extent_count;\n"
14388 " int64_t vg_free_count;\n"
14389 " int64_t max_lv;\n"
14390 " int64_t max_pv;\n"
14391 " int64_t pv_count;\n"
14392 " int64_t lv_count;\n"
14393 " int64_t snap_count;\n"
14394 " int64_t vg_seqno;\n"
14395 " char *vg_tags;\n"
14396 " int64_t vg_mda_count;\n"
14397 " uint64_t vg_mda_free;\n"
14403 #: ../src/guestfs-structs.pod:69
14406 " struct guestfs_lvm_vg_list {\n"
14407 " uint32_t len; /* Number of elements in list. */\n"
14408 " struct guestfs_lvm_vg *val; /* Elements. */\n"
14414 #: ../src/guestfs-structs.pod:74
14417 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
14418 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
14423 #: ../src/guestfs-structs.pod:77
14424 msgid "guestfs_lvm_lv"
14428 #: ../src/guestfs-structs.pod:79
14431 " struct guestfs_lvm_lv {\n"
14432 " char *lv_name;\n"
14433 " /* The next field is NOT nul-terminated, be careful when printing it: "
14435 " char lv_uuid[32];\n"
14436 " char *lv_attr;\n"
14437 " int64_t lv_major;\n"
14438 " int64_t lv_minor;\n"
14439 " int64_t lv_kernel_major;\n"
14440 " int64_t lv_kernel_minor;\n"
14441 " uint64_t lv_size;\n"
14442 " int64_t seg_count;\n"
14444 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
14445 " float snap_percent;\n"
14446 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
14447 " float copy_percent;\n"
14448 " char *move_pv;\n"
14449 " char *lv_tags;\n"
14450 " char *mirror_log;\n"
14451 " char *modules;\n"
14457 #: ../src/guestfs-structs.pod:101
14460 " struct guestfs_lvm_lv_list {\n"
14461 " uint32_t len; /* Number of elements in list. */\n"
14462 " struct guestfs_lvm_lv *val; /* Elements. */\n"
14468 #: ../src/guestfs-structs.pod:106
14471 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
14472 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
14477 #: ../src/guestfs-structs.pod:111
14480 " struct guestfs_stat {\n"
14484 " int64_t nlink;\n"
14489 " int64_t blksize;\n"
14490 " int64_t blocks;\n"
14491 " int64_t atime;\n"
14492 " int64_t mtime;\n"
14493 " int64_t ctime;\n"
14499 #: ../src/guestfs-structs.pod:127
14502 " struct guestfs_stat_list {\n"
14503 " uint32_t len; /* Number of elements in list. */\n"
14504 " struct guestfs_stat *val; /* Elements. */\n"
14510 #: ../src/guestfs-structs.pod:132
14513 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
14514 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
14519 #: ../src/guestfs-structs.pod:137
14522 " struct guestfs_statvfs {\n"
14523 " int64_t bsize;\n"
14524 " int64_t frsize;\n"
14525 " int64_t blocks;\n"
14526 " int64_t bfree;\n"
14527 " int64_t bavail;\n"
14528 " int64_t files;\n"
14529 " int64_t ffree;\n"
14530 " int64_t favail;\n"
14533 " int64_t namemax;\n"
14539 #: ../src/guestfs-structs.pod:151
14542 " struct guestfs_statvfs_list {\n"
14543 " uint32_t len; /* Number of elements in list. */\n"
14544 " struct guestfs_statvfs *val; /* Elements. */\n"
14550 #: ../src/guestfs-structs.pod:156
14553 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
14554 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
14559 #: ../src/guestfs-structs.pod:159
14560 msgid "guestfs_dirent"
14564 #: ../src/guestfs-structs.pod:161
14567 " struct guestfs_dirent {\n"
14576 #: ../src/guestfs-structs.pod:167
14579 " struct guestfs_dirent_list {\n"
14580 " uint32_t len; /* Number of elements in list. */\n"
14581 " struct guestfs_dirent *val; /* Elements. */\n"
14587 #: ../src/guestfs-structs.pod:172
14590 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
14591 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
14596 #: ../src/guestfs-structs.pod:177
14599 " struct guestfs_version {\n"
14600 " int64_t major;\n"
14601 " int64_t minor;\n"
14602 " int64_t release;\n"
14609 #: ../src/guestfs-structs.pod:184
14612 " struct guestfs_version_list {\n"
14613 " uint32_t len; /* Number of elements in list. */\n"
14614 " struct guestfs_version *val; /* Elements. */\n"
14620 #: ../src/guestfs-structs.pod:189
14623 " void guestfs_free_version (struct guestfs_free_version *);\n"
14624 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
14629 #: ../src/guestfs-structs.pod:192
14630 msgid "guestfs_xattr"
14634 #: ../src/guestfs-structs.pod:194
14637 " struct guestfs_xattr {\n"
14638 " char *attrname;\n"
14639 " /* The next two fields describe a byte array. */\n"
14640 " uint32_t attrval_len;\n"
14641 " char *attrval;\n"
14647 #: ../src/guestfs-structs.pod:201
14650 " struct guestfs_xattr_list {\n"
14651 " uint32_t len; /* Number of elements in list. */\n"
14652 " struct guestfs_xattr *val; /* Elements. */\n"
14658 #: ../src/guestfs-structs.pod:206
14661 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
14662 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
14667 #: ../src/guestfs-structs.pod:209
14668 msgid "guestfs_inotify_event"
14672 #: ../src/guestfs-structs.pod:211
14675 " struct guestfs_inotify_event {\n"
14676 " int64_t in_wd;\n"
14677 " uint32_t in_mask;\n"
14678 " uint32_t in_cookie;\n"
14679 " char *in_name;\n"
14685 #: ../src/guestfs-structs.pod:218
14688 " struct guestfs_inotify_event_list {\n"
14689 " uint32_t len; /* Number of elements in list. */\n"
14690 " struct guestfs_inotify_event *val; /* Elements. */\n"
14696 #: ../src/guestfs-structs.pod:223
14699 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
14700 " void guestfs_free_inotify_event_list (struct "
14701 "guestfs_free_inotify_event_list *);\n"
14706 #: ../src/guestfs-structs.pod:226
14707 msgid "guestfs_partition"
14711 #: ../src/guestfs-structs.pod:228
14714 " struct guestfs_partition {\n"
14715 " int32_t part_num;\n"
14716 " uint64_t part_start;\n"
14717 " uint64_t part_end;\n"
14718 " uint64_t part_size;\n"
14724 #: ../src/guestfs-structs.pod:235
14727 " struct guestfs_partition_list {\n"
14728 " uint32_t len; /* Number of elements in list. */\n"
14729 " struct guestfs_partition *val; /* Elements. */\n"
14735 #: ../src/guestfs-structs.pod:240
14738 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
14739 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
14744 #: ../fish/guestfish.pod:5
14745 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
14749 #: ../fish/guestfish.pod:9
14752 " guestfish [--options] [commands]\n"
14757 #: ../fish/guestfish.pod:11
14765 #: ../fish/guestfish.pod:13
14768 " guestfish -a disk.img\n"
14773 #: ../fish/guestfish.pod:15
14776 " guestfish -a disk.img -m dev[:mountpoint]\n"
14781 #: ../fish/guestfish.pod:17
14784 " guestfish -d libvirt-domain\n"
14789 #: ../fish/guestfish.pod:19
14792 " guestfish -a disk.img -i\n"
14797 #: ../fish/guestfish.pod:21
14800 " guestfish -d libvirt-domain -i\n"
14805 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15 ../tools/virt-edit.pl:45 ../tools/virt-win-reg.pl:52 ../tools/virt-tar.pl:60 ../tools/virt-rescue.pl:41
14810 #: ../fish/guestfish.pod:25
14812 "Using guestfish in read/write mode on live virtual machines can be "
14813 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
14814 "option to use guestfish safely if the disk image or virtual machine might be "
14819 #: ../fish/guestfish.pod:32
14821 "Guestfish is a shell and command-line tool for examining and modifying "
14822 "virtual machine filesystems. It uses libguestfs and exposes all of the "
14823 "functionality of the guestfs API, see L<guestfs(3)>."
14827 #: ../fish/guestfish.pod:36
14829 "Guestfish gives you structured access to the libguestfs API, from shell "
14830 "scripts or the command line or interactively. If you want to rescue a "
14831 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
14836 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:800 ../fuse/guestmount.pod:39 ../tools/virt-edit.pl:59 ../tools/virt-resize.pl:66 ../tools/virt-cat.pl:51 ../tools/virt-tar.pl:46
14841 #: ../fish/guestfish.pod:43
14842 msgid "As an interactive shell"
14846 #: ../fish/guestfish.pod:45
14854 #: ../fish/guestfish.pod:47
14857 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
14858 " editing virtual machine filesystems.\n"
14863 #: ../fish/guestfish.pod:50
14866 " Type: 'help' for a list of commands\n"
14867 " 'man' to read the manual\n"
14868 " 'quit' to quit the shell\n"
14873 #: ../fish/guestfish.pod:54
14876 " ><fs> add-ro disk.img\n"
14878 " ><fs> list-filesystems\n"
14879 " /dev/sda1: ext4\n"
14880 " /dev/vg_guest/lv_root: ext4\n"
14881 " /dev/vg_guest/lv_swap: swap\n"
14882 " ><fs> mount /dev/vg_guest/lv_root /\n"
14883 " ><fs> cat /etc/fstab\n"
14885 " # Created by anaconda\n"
14892 #: ../fish/guestfish.pod:67
14893 msgid "From shell scripts"
14897 #: ../fish/guestfish.pod:69
14898 msgid "Create a new C</etc/motd> file in a guest or disk image:"
14902 #: ../fish/guestfish.pod:71
14905 " guestfish <<_EOF_\n"
14908 " mount /dev/vg_guest/lv_root /\n"
14909 " write /etc/motd \"Welcome, new users\"\n"
14915 #: ../fish/guestfish.pod:78
14916 msgid "List the LVM logical volumes in a disk image:"
14920 #: ../fish/guestfish.pod:80
14923 " guestfish -a disk.img --ro <<_EOF_\n"
14931 #: ../fish/guestfish.pod:85
14932 msgid "List all the filesystems in a disk image:"
14936 #: ../fish/guestfish.pod:87
14939 " guestfish -a disk.img --ro <<_EOF_\n"
14941 " list-filesystems\n"
14947 #: ../fish/guestfish.pod:92
14948 msgid "On one command line"
14952 #: ../fish/guestfish.pod:94
14953 msgid "Update C</etc/resolv.conf> in a guest:"
14957 #: ../fish/guestfish.pod:96
14961 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
14962 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
14967 #: ../fish/guestfish.pod:100
14968 msgid "Edit C</boot/grub/grub.conf> interactively:"
14972 #: ../fish/guestfish.pod:102
14975 " guestfish --add disk.img \\\n"
14976 " --mount /dev/vg_guest/lv_root \\\n"
14977 " --mount /dev/sda1:/boot \\\n"
14978 " edit /boot/grub/grub.conf\n"
14983 #: ../fish/guestfish.pod:107
14984 msgid "Mount disks automatically"
14988 #: ../fish/guestfish.pod:109
14990 "Use the I<-i> option to automatically mount the disks from a virtual "
14995 #: ../fish/guestfish.pod:112
14998 " guestfish --ro -a disk.img -i cat /etc/group\n"
15003 #: ../fish/guestfish.pod:114
15006 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
15011 #: ../fish/guestfish.pod:116
15012 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
15016 #: ../fish/guestfish.pod:118
15019 " guestfish -a disk.img -i edit /boot/grub/grub.conf\n"
15024 #: ../fish/guestfish.pod:120
15025 msgid "As a script interpreter"
15029 #: ../fish/guestfish.pod:122
15030 msgid "Create a 100MB disk containing an ext2-formatted partition:"
15034 #: ../fish/guestfish.pod:124
15037 " #!/usr/bin/guestfish -f\n"
15038 " sparse test1.img 100M\n"
15040 " part-disk /dev/sda mbr\n"
15041 " mkfs ext2 /dev/sda1\n"
15046 #: ../fish/guestfish.pod:130
15047 msgid "Start with a prepared disk"
15051 #: ../fish/guestfish.pod:132
15053 "An alternate way to create a 100MB disk called C<test1.img> containing a "
15054 "single ext2-formatted partition:"
15058 #: ../fish/guestfish.pod:135
15061 " guestfish -N fs\n"
15066 #: ../fish/guestfish.pod:137
15067 msgid "To list what is available do:"
15071 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:791
15074 " guestfish -N help | less\n"
15079 #: ../fish/guestfish.pod:141
15080 msgid "Remote control"
15084 #: ../fish/guestfish.pod:143
15087 " eval `guestfish --listen`\n"
15088 " guestfish --remote add-ro disk.img\n"
15089 " guestfish --remote run\n"
15090 " guestfish --remote lvs\n"
15095 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37 ../fuse/guestmount.pod:73 ../inspector/virt-inspector.pl:75 ../tools/virt-edit.pl:73 ../tools/virt-win-reg.pl:172 ../tools/virt-df.pl:71 ../tools/virt-ls.pl:79 ../tools/virt-resize.pl:257 ../tools/virt-list-filesystems.pl:50 ../tools/virt-cat.pl:80 ../tools/virt-tar.pl:99 ../tools/virt-rescue.pl:103 ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:51
15100 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:124 ../inspector/virt-inspector.pl:83 ../tools/virt-edit.pl:81 ../tools/virt-win-reg.pl:180 ../tools/virt-df.pl:79 ../tools/virt-ls.pl:87 ../tools/virt-resize.pl:265 ../tools/virt-list-filesystems.pl:58 ../tools/virt-cat.pl:88 ../tools/virt-tar.pl:107 ../tools/virt-rescue.pl:111 ../tools/virt-make-fs.pl:161 ../tools/virt-list-partitions.pl:59
15105 #: ../fish/guestfish.pod:154
15106 msgid "Displays general help on options."
15110 #: ../fish/guestfish.pod:156
15111 msgid "B<-h> | B<--cmd-help>"
15115 #: ../fish/guestfish.pod:158
15116 msgid "Lists all available guestfish commands."
15120 #: ../fish/guestfish.pod:160
15121 msgid "B<-h cmd> | B<--cmd-help cmd>"
15125 #: ../fish/guestfish.pod:162
15126 msgid "Displays detailed help on a single command C<cmd>."
15130 #: ../fish/guestfish.pod:164 ../fuse/guestmount.pod:77
15131 msgid "B<-a image> | B<--add image>"
15135 #: ../fish/guestfish.pod:166
15136 msgid "Add a block device or virtual machine image to the shell."
15140 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:81
15142 "The format of the disk image is auto-detected. To override this and force a "
15143 "particular format use the I<--format=..> option."
15147 #: ../fish/guestfish.pod:171 ../fuse/guestmount.pod:84
15148 msgid "B<-c URI> | B<--connect URI>"
15152 #: ../fish/guestfish.pod:173 ../fuse/guestmount.pod:86
15154 "When used in conjunction with the I<-d> option, this specifies the libvirt "
15155 "URI to use. The default is to use the default libvirt connection."
15159 #: ../fish/guestfish.pod:177 ../fuse/guestmount.pod:90
15160 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
15164 #: ../fish/guestfish.pod:179 ../fuse/guestmount.pod:92
15166 "Add disks from the named libvirt domain. If the I<--ro> option is also "
15167 "used, then any libvirt domain can be used. However in write mode, only "
15168 "libvirt domains which are shut down can be named here."
15172 #: ../fish/guestfish.pod:183
15173 msgid "B<-D> | B<--no-dest-paths>"
15177 #: ../fish/guestfish.pod:185
15179 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
15180 "to hit the tab key to complete paths on the guest filesystem, but this "
15181 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
15182 "allow this feature to be disabled."
15186 #: ../fish/guestfish.pod:190
15187 msgid "B<--echo-keys>"
15191 #: ../fish/guestfish.pod:192
15193 "When prompting for keys and passphrases, guestfish normally turns echoing "
15194 "off so you cannot see what you are typing. If you are not worried about "
15195 "Tempest attacks and there is no one else in the room you can specify this "
15196 "flag to see what you are typing."
15200 #: ../fish/guestfish.pod:197
15201 msgid "B<-f file> | B<--file file>"
15205 #: ../fish/guestfish.pod:199
15206 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
15210 #: ../fish/guestfish.pod:202
15213 " #!/usr/bin/guestfish -f\n"
15218 #: ../fish/guestfish.pod:204 ../fuse/guestmount.pod:108
15219 msgid "B<--format=raw|qcow2|..> | B<--format>"
15223 #: ../fish/guestfish.pod:206 ../fuse/guestmount.pod:110
15225 "The default for the I<-a> option is to auto-detect the format of the disk "
15226 "image. Using this forces the disk format for I<-a> options which follow on "
15227 "the command line. Using I<--format> with no argument switches back to "
15228 "auto-detection for subsequent I<-a> options."
15232 #: ../fish/guestfish.pod:211 ../fish/guestfish.pod:504
15233 msgid "For example:"
15237 #: ../fish/guestfish.pod:213
15240 " guestfish --format=raw -a disk.img\n"
15245 #: ../fish/guestfish.pod:215
15246 msgid "forces raw format (no auto-detection) for C<disk.img>."
15250 #: ../fish/guestfish.pod:217
15253 " guestfish --format=raw -a disk.img --format -a another.img\n"
15258 #: ../fish/guestfish.pod:219
15260 "forces raw format (no auto-detection) for C<disk.img> and reverts to "
15261 "auto-detection for C<another.img>."
15265 #: ../fish/guestfish.pod:222
15267 "If you have untrusted raw-format guest disk images, you should use this "
15268 "option to specify the disk format. This avoids a possible security problem "
15269 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
15273 #: ../fish/guestfish.pod:227 ../fuse/guestmount.pod:128
15274 msgid "B<-i> | B<--inspector>"
15278 #: ../fish/guestfish.pod:229 ../fuse/guestmount.pod:130
15280 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
15281 "system and mount filesystems as they would be mounted on the real virtual "
15286 #: ../fish/guestfish.pod:233
15287 msgid "Typical usage is either:"
15291 #: ../fish/guestfish.pod:235
15294 " guestfish -d myguest -i\n"
15299 #: ../fish/guestfish.pod:237
15300 msgid "(for an inactive libvirt domain called I<myguest>), or:"
15304 #: ../fish/guestfish.pod:239
15307 " guestfish --ro -d myguest -i\n"
15312 #: ../fish/guestfish.pod:241
15313 msgid "(for active domains, readonly), or specify the block device directly:"
15317 #: ../fish/guestfish.pod:243
15320 " guestfish -a /dev/Guests/MyGuest -i\n"
15325 #: ../fish/guestfish.pod:245
15327 "Note that the command line syntax changed slightly over older versions of "
15328 "guestfish. You can still use the old syntax:"
15332 #: ../fish/guestfish.pod:248
15335 " guestfish [--ro] -i disk.img\n"
15340 #: ../fish/guestfish.pod:250
15343 " guestfish [--ro] -i libvirt-domain\n"
15348 #: ../fish/guestfish.pod:252
15349 msgid "B<--keys-from-stdin>"
15353 #: ../fish/guestfish.pod:254
15355 "Read key or passphrase parameters from stdin. The default is to try to read "
15356 "passphrases from the user by opening C</dev/tty>."
15360 #: ../fish/guestfish.pod:257
15361 msgid "B<--listen>"
15365 #: ../fish/guestfish.pod:259
15367 "Fork into the background and listen for remote commands. See section "
15368 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
15372 #: ../fish/guestfish.pod:262
15373 msgid "B<-m dev[:mountpoint]> | B<--mount dev[:mountpoint]>"
15377 #: ../fish/guestfish.pod:264
15378 msgid "Mount the named partition or logical volume on the given mountpoint."
15382 #: ../fish/guestfish.pod:266
15383 msgid "If the mountpoint is omitted, it defaults to C</>."
15387 #: ../fish/guestfish.pod:268
15388 msgid "You have to mount something on C</> before most commands will work."
15392 #: ../fish/guestfish.pod:270
15394 "If any I<-m> or I<--mount> options are given, the guest is automatically "
15399 #: ../fish/guestfish.pod:273
15401 "If you don't know what filesystems a disk image contains, you can either run "
15402 "guestfish without this option, then list the partitions and LVs available "
15403 "(see L</list-partitions> and L</lvs> commands), or you can use the "
15404 "L<virt-list-filesystems(1)> program."
15408 #: ../fish/guestfish.pod:278 ../fuse/guestmount.pod:142
15409 msgid "B<-n> | B<--no-sync>"
15413 #: ../fish/guestfish.pod:280
15415 "Disable autosync. This is enabled by default. See the discussion of "
15416 "autosync in the L<guestfs(3)> manpage."
15420 #: ../fish/guestfish.pod:283
15421 msgid "B<-N type> | B<--new type> | B<-N help>"
15425 #: ../fish/guestfish.pod:285
15427 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
15428 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
15429 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
15434 #: ../fish/guestfish.pod:290
15435 msgid "B<--progress-bars>"
15439 #: ../fish/guestfish.pod:292
15440 msgid "Enable progress bars, even when guestfish is used non-interactively."
15444 #: ../fish/guestfish.pod:294
15446 "Progress bars are enabled by default when guestfish is used as an "
15447 "interactive shell."
15451 #: ../fish/guestfish.pod:297
15452 msgid "B<--no-progress-bars>"
15456 #: ../fish/guestfish.pod:299
15457 msgid "Disable progress bars."
15461 #: ../fish/guestfish.pod:301
15462 msgid "B<--remote[=pid]>"
15466 #: ../fish/guestfish.pod:303
15468 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
15469 "CONTROL GUESTFISH OVER A SOCKET> below."
15473 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:184
15474 msgid "B<-r> | B<--ro>"
15478 #: ../fish/guestfish.pod:308
15480 "This changes the I<-a> and I<-m> options so that disks are added and mounts "
15481 "are done read-only (see L<guestfs(3)/guestfs_mount_ro>)."
15485 #: ../fish/guestfish.pod:311 ../tools/virt-rescue.pl:187
15487 "The option must always be used if the disk image or virtual machine might be "
15488 "running, and is generally recommended in cases where you don't need write "
15489 "access to the disk."
15493 #: ../fish/guestfish.pod:315
15495 "Note that prepared disk images created with I<-N> are not affected by the "
15500 #: ../fish/guestfish.pod:318 ../fuse/guestmount.pod:194 ../tools/virt-rescue.pl:195
15501 msgid "B<--selinux>"
15505 #: ../fish/guestfish.pod:320
15506 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
15510 #: ../fish/guestfish.pod:322 ../fuse/guestmount.pod:198
15511 msgid "B<-v> | B<--verbose>"
15515 #: ../fish/guestfish.pod:324
15517 "Enable very verbose messages. This is particularly useful if you find a "
15522 #: ../fish/guestfish.pod:327 ../fuse/guestmount.pod:202
15523 msgid "B<-V> | B<--version>"
15527 #: ../fish/guestfish.pod:329
15528 msgid "Display the guestfish / libguestfs version number and exit."
15532 #: ../fish/guestfish.pod:331
15537 #: ../fish/guestfish.pod:333
15538 msgid "Echo each command before executing it."
15542 #: ../fish/guestfish.pod:337
15543 msgid "COMMANDS ON COMMAND LINE"
15547 #: ../fish/guestfish.pod:339
15548 msgid "Any additional (non-option) arguments are treated as commands to execute."
15552 #: ../fish/guestfish.pod:342
15554 "Commands to execute should be separated by a colon (C<:>), where the colon "
15555 "is a separate parameter. Thus:"
15559 #: ../fish/guestfish.pod:345
15562 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
15567 #: ../fish/guestfish.pod:347
15569 "If there are no additional arguments, then we enter a shell, either an "
15570 "interactive shell with a prompt (if the input is a terminal) or a "
15571 "non-interactive shell."
15575 #: ../fish/guestfish.pod:351
15577 "In either command line mode or non-interactive shell, the first command that "
15578 "gives an error causes the whole shell to exit. In interactive mode (with a "
15579 "prompt) if a command fails, you can continue to enter commands."
15583 #: ../fish/guestfish.pod:356
15584 msgid "USING launch (OR run)"
15588 #: ../fish/guestfish.pod:358
15590 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
15591 "then launch it, then mount any disks you need, and finally issue "
15592 "actions/commands. So the general order of the day is:"
15596 #: ../fish/guestfish.pod:366
15597 msgid "add or -a/--add"
15601 #: ../fish/guestfish.pod:370
15602 msgid "launch (aka run)"
15606 #: ../fish/guestfish.pod:374
15607 msgid "mount or -m/--mount"
15611 #: ../fish/guestfish.pod:378
15612 msgid "any other commands"
15616 #: ../fish/guestfish.pod:382
15618 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
15619 "guest before mounting or performing any other commands."
15623 #: ../fish/guestfish.pod:385
15625 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
15626 "I<--new> options were given then C<run> is done automatically, simply "
15627 "because guestfish can't perform the action you asked for without doing this."
15631 #: ../fish/guestfish.pod:390
15636 #: ../fish/guestfish.pod:392
15638 "You can quote ordinary parameters using either single or double quotes. For "
15643 #: ../fish/guestfish.pod:395
15646 " add \"file with a space.img\"\n"
15651 #: ../fish/guestfish.pod:397
15654 " rm '/file name'\n"
15659 #: ../fish/guestfish.pod:399
15667 #: ../fish/guestfish.pod:401
15669 "A few commands require a list of strings to be passed. For these, use a "
15670 "whitespace-separated list, enclosed in quotes. Strings containing "
15671 "whitespace to be passed through must be enclosed in single quotes. A "
15672 "literal single quote must be escaped with a backslash."
15676 #: ../fish/guestfish.pod:406
15679 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
15680 " command \"/bin/echo 'foo bar'\"\n"
15681 " command \"/bin/echo \\'foo\\'\"\n"
15686 #: ../fish/guestfish.pod:410
15687 msgid "OPTIONAL ARGUMENTS"
15691 #: ../fish/guestfish.pod:412
15693 "Some commands take optional arguments. These arguments appear in this "
15694 "documentation as C<[argname:..]>. You can use them as in these examples:"
15698 #: ../fish/guestfish.pod:416
15701 " add-drive-opts filename\n"
15706 #: ../fish/guestfish.pod:418
15709 " add-drive-opts filename readonly:true\n"
15714 #: ../fish/guestfish.pod:420
15717 " add-drive-opts filename format:qcow2 readonly:false\n"
15722 #: ../fish/guestfish.pod:422
15724 "Each optional argument can appear at most once. All optional arguments must "
15725 "appear after the required ones."
15729 #: ../fish/guestfish.pod:425
15734 #: ../fish/guestfish.pod:427
15735 msgid "This section applies to all commands which can take integers as parameters."
15739 #: ../fish/guestfish.pod:430
15740 msgid "SIZE SUFFIX"
15744 #: ../fish/guestfish.pod:432
15746 "When the command takes a parameter measured in bytes, you can use one of the "
15747 "following suffixes to specify kilobytes, megabytes and larger sizes:"
15751 #: ../fish/guestfish.pod:438
15752 msgid "B<k> or B<K> or B<KiB>"
15756 #: ../fish/guestfish.pod:440
15757 msgid "The size in kilobytes (multiplied by 1024)."
15761 #: ../fish/guestfish.pod:442
15766 #: ../fish/guestfish.pod:444
15767 msgid "The size in SI 1000 byte units."
15771 #: ../fish/guestfish.pod:446
15772 msgid "B<M> or B<MiB>"
15776 #: ../fish/guestfish.pod:448
15777 msgid "The size in megabytes (multiplied by 1048576)."
15781 #: ../fish/guestfish.pod:450
15786 #: ../fish/guestfish.pod:452
15787 msgid "The size in SI 1000000 byte units."
15791 #: ../fish/guestfish.pod:454
15792 msgid "B<G> or B<GiB>"
15796 #: ../fish/guestfish.pod:456
15797 msgid "The size in gigabytes (multiplied by 2**30)."
15801 #: ../fish/guestfish.pod:458
15806 #: ../fish/guestfish.pod:460
15807 msgid "The size in SI 10**9 byte units."
15811 #: ../fish/guestfish.pod:462
15812 msgid "B<T> or B<TiB>"
15816 #: ../fish/guestfish.pod:464
15817 msgid "The size in terabytes (multiplied by 2**40)."
15821 #: ../fish/guestfish.pod:466
15826 #: ../fish/guestfish.pod:468
15827 msgid "The size in SI 10**12 byte units."
15831 #: ../fish/guestfish.pod:470
15832 msgid "B<P> or B<PiB>"
15836 #: ../fish/guestfish.pod:472
15837 msgid "The size in petabytes (multiplied by 2**50)."
15841 #: ../fish/guestfish.pod:474
15846 #: ../fish/guestfish.pod:476
15847 msgid "The size in SI 10**15 byte units."
15851 #: ../fish/guestfish.pod:478
15852 msgid "B<E> or B<EiB>"
15856 #: ../fish/guestfish.pod:480
15857 msgid "The size in exabytes (multiplied by 2**60)."
15861 #: ../fish/guestfish.pod:482
15866 #: ../fish/guestfish.pod:484
15867 msgid "The size in SI 10**18 byte units."
15871 #: ../fish/guestfish.pod:486
15872 msgid "B<Z> or B<ZiB>"
15876 #: ../fish/guestfish.pod:488
15877 msgid "The size in zettabytes (multiplied by 2**70)."
15881 #: ../fish/guestfish.pod:490
15886 #: ../fish/guestfish.pod:492
15887 msgid "The size in SI 10**21 byte units."
15891 #: ../fish/guestfish.pod:494
15892 msgid "B<Y> or B<YiB>"
15896 #: ../fish/guestfish.pod:496
15897 msgid "The size in yottabytes (multiplied by 2**80)."
15901 #: ../fish/guestfish.pod:498
15906 #: ../fish/guestfish.pod:500
15907 msgid "The size in SI 10**24 byte units."
15911 #: ../fish/guestfish.pod:506
15914 " truncate-size /file 1G\n"
15919 #: ../fish/guestfish.pod:508
15920 msgid "would truncate the file to 1 gigabyte."
15924 #: ../fish/guestfish.pod:510
15926 "Be careful because a few commands take sizes in kilobytes or megabytes "
15927 "(eg. the parameter to L</memsize> is specified in megabytes already). "
15928 "Adding a suffix will probably not do what you expect."
15932 #: ../fish/guestfish.pod:514
15933 msgid "OCTAL AND HEXADECIMAL NUMBERS"
15937 #: ../fish/guestfish.pod:516
15939 "For specifying the radix (base) use the C convention: C<0> to prefix an "
15940 "octal number or C<0x> to prefix a hexadecimal number. For example:"
15944 #: ../fish/guestfish.pod:519
15947 " 1234 decimal number 1234\n"
15948 " 02322 octal number, equivalent to decimal 1234\n"
15949 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
15954 #: ../fish/guestfish.pod:523
15956 "When using the C<chmod> command, you almost always want to specify an octal "
15957 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
15958 "L<chmod(1)> program):"
15962 #: ../fish/guestfish.pod:527
15965 " chmod 0777 /public # OK\n"
15966 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
15971 #: ../fish/guestfish.pod:530
15973 "Commands that return numbers usually print them in decimal, but some "
15974 "commands print numbers in other radices (eg. C<umask> prints the mode in "
15975 "octal, preceeded by C<0>)."
15979 #: ../fish/guestfish.pod:534
15980 msgid "WILDCARDS AND GLOBBING"
15984 #: ../fish/guestfish.pod:536
15986 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
15987 "(globbing) by default. So for example the following will not do what you "
15992 #: ../fish/guestfish.pod:540
16000 #: ../fish/guestfish.pod:542
16002 "Assuming you don't have a directory called literally C</home/*> then the "
16003 "above command will return an error."
16007 #: ../fish/guestfish.pod:545
16008 msgid "To perform wildcard expansion, use the C<glob> command."
16012 #: ../fish/guestfish.pod:547
16015 " glob rm-rf /home/*\n"
16020 #: ../fish/guestfish.pod:549
16022 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
16023 "many times), equivalent to:"
16027 #: ../fish/guestfish.pod:552
16030 " rm-rf /home/jim\n"
16031 " rm-rf /home/joe\n"
16032 " rm-rf /home/mary\n"
16037 #: ../fish/guestfish.pod:556
16038 msgid "C<glob> only works on simple guest paths and not on device names."
16042 #: ../fish/guestfish.pod:558
16044 "If you have several parameters, each containing a wildcard, then glob will "
16045 "perform a Cartesian product."
16049 #: ../fish/guestfish.pod:561
16054 #: ../fish/guestfish.pod:563
16056 "Any line which starts with a I<#> character is treated as a comment and "
16057 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
16058 "a command. For example:"
16062 #: ../fish/guestfish.pod:567
16065 " # this is a comment\n"
16066 " # this is a comment\n"
16067 " foo # NOT a comment\n"
16072 #: ../fish/guestfish.pod:571
16073 msgid "Blank lines are also ignored."
16077 #: ../fish/guestfish.pod:573
16078 msgid "RUNNING COMMANDS LOCALLY"
16082 #: ../fish/guestfish.pod:575
16084 "Any line which starts with a I<!> character is treated as a command sent to "
16085 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
16089 #: ../fish/guestfish.pod:579
16093 " tgz-out /remote local/remote-data.tar.gz\n"
16098 #: ../fish/guestfish.pod:582
16100 "will create a directory C<local> on the host, and then export the contents "
16101 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
16102 "(See C<tgz-out>)."
16106 #: ../fish/guestfish.pod:586
16108 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
16109 "effect, due to the way that subprocesses work in Unix."
16113 #: ../fish/guestfish.pod:589
16118 #: ../fish/guestfish.pod:591
16120 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
16121 "command (a guestfish command) to the second command (any host command). For "
16126 #: ../fish/guestfish.pod:595
16129 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
16134 #: ../fish/guestfish.pod:597
16136 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
16137 "program). The above command would list all accounts in the guest filesystem "
16138 "which have UID 0, ie. root accounts including backdoors. Other examples:"
16142 #: ../fish/guestfish.pod:602
16145 " hexdump /bin/ls | head\n"
16146 " list-devices | tail -1\n"
16147 " tgz-out / - | tar ztf -\n"
16152 #: ../fish/guestfish.pod:606
16154 "The space before the pipe symbol is required, any space after the pipe "
16155 "symbol is optional. Everything after the pipe symbol is just passed "
16156 "straight to the host shell, so it can contain redirections, globs and "
16157 "anything else that makes sense on the host side."
16161 #: ../fish/guestfish.pod:611
16163 "To use a literal argument which begins with a pipe symbol, you have to quote "
16168 #: ../fish/guestfish.pod:614
16176 #: ../fish/guestfish.pod:616
16177 msgid "HOME DIRECTORIES"
16181 #: ../fish/guestfish.pod:618
16183 "If a parameter starts with the character C<~> then the tilde may be expanded "
16184 "as a home directory path (either C<~> for the current user's home directory, "
16185 "or C<~user> for another user)."
16189 #: ../fish/guestfish.pod:622
16191 "Note that home directory expansion happens for users known I<on the host>, "
16192 "not in the guest filesystem."
16196 #: ../fish/guestfish.pod:625
16198 "To use a literal argument which begins with a tilde, you have to quote it, "
16203 #: ../fish/guestfish.pod:628
16211 #: ../fish/guestfish.pod:632
16213 "Libguestfs has some support for Linux guests encrypted according to the "
16214 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
16215 "disk encryption systems used by modern Linux guests. Currently only "
16216 "LVM-on-LUKS is supported."
16220 #: ../fish/guestfish.pod:637
16221 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
16225 #: ../fish/guestfish.pod:639
16228 " ><fs> vfs-type /dev/sda2\n"
16234 #: ../fish/guestfish.pod:642
16236 "Then open those devices using L</luks-open>. This creates a device-mapper "
16237 "device called C</dev/mapper/luksdev>."
16241 #: ../fish/guestfish.pod:645
16244 " ><fs> luks-open /dev/sda2 luksdev\n"
16245 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
16250 #: ../fish/guestfish.pod:648
16252 "Finally you have to tell LVM to scan for volume groups on the newly created "
16257 #: ../fish/guestfish.pod:651
16261 " vg-activate-all true\n"
16266 #: ../fish/guestfish.pod:654
16267 msgid "The logical volume(s) can now be mounted in the usual way."
16271 #: ../fish/guestfish.pod:656
16273 "Before closing a LUKS device you must unmount any logical volumes on it and "
16274 "deactivate the volume groups by calling C<vg-activate false VG> on each "
16275 "one. Then you can close the mapper device:"
16279 #: ../fish/guestfish.pod:660
16282 " vg-activate false /dev/VG\n"
16283 " luks-close /dev/mapper/luksdev\n"
16288 #: ../fish/guestfish.pod:663
16289 msgid "WINDOWS PATHS"
16293 #: ../fish/guestfish.pod:665
16295 "If a path is prefixed with C<win:> then you can use Windows-style paths "
16296 "(with some limitations). The following commands are equivalent:"
16300 #: ../fish/guestfish.pod:668
16303 " file /WINDOWS/system32/config/system.LOG\n"
16308 #: ../fish/guestfish.pod:670
16311 " file win:/windows/system32/config/system.log\n"
16316 #: ../fish/guestfish.pod:672
16319 " file win:\\windows\\system32\\config\\system.log\n"
16324 #: ../fish/guestfish.pod:674
16327 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
16332 #: ../fish/guestfish.pod:676
16334 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
16335 "handles case insensitivity like Windows would. This only works in argument "
16336 "positions that expect a path."
16340 #: ../fish/guestfish.pod:680
16341 msgid "UPLOADING AND DOWNLOADING FILES"
16345 #: ../fish/guestfish.pod:682
16347 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
16348 "others which upload from or download to a local file, you can use the "
16349 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
16353 #: ../fish/guestfish.pod:686
16361 #: ../fish/guestfish.pod:688
16362 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
16366 #: ../fish/guestfish.pod:691
16369 " tar-out /etc - | tar tf -\n"
16374 #: ../fish/guestfish.pod:693
16376 "writes the tarball to stdout and then pipes that into the external \"tar\" "
16377 "command (see L</PIPES>)."
16381 #: ../fish/guestfish.pod:696
16383 "When using C<-> to read from stdin, the input is read up to the end of "
16384 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
16385 "some arbitrary end marker:"
16389 #: ../fish/guestfish.pod:700
16392 " upload -<<END /foo\n"
16401 #: ../fish/guestfish.pod:706
16403 "Any string of characters can be used instead of C<END>. The end marker must "
16404 "appear on a line of its own, without any preceeding or following characters "
16405 "(not even spaces)."
16409 #: ../fish/guestfish.pod:710
16411 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
16412 "upload local files (so-called \"FileIn\" parameters in the generator)."
16416 #: ../fish/guestfish.pod:713
16417 msgid "EXIT ON ERROR BEHAVIOUR"
16421 #: ../fish/guestfish.pod:715
16423 "By default, guestfish will ignore any errors when in interactive mode "
16424 "(ie. taking commands from a human over a tty), and will exit on the first "
16425 "error in non-interactive mode (scripts, commands given on the command line)."
16429 #: ../fish/guestfish.pod:720
16431 "If you prefix a command with a I<-> character, then that command will not "
16432 "cause guestfish to exit, even if that (one) command returns an error."
16436 #: ../fish/guestfish.pod:724
16437 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
16441 #: ../fish/guestfish.pod:726
16443 "Guestfish can be remote-controlled over a socket. This is useful "
16444 "particularly in shell scripts where you want to make several different "
16445 "changes to a filesystem, but you don't want the overhead of starting up a "
16446 "guestfish process each time."
16450 #: ../fish/guestfish.pod:731
16451 msgid "Start a guestfish server process using:"
16455 #: ../fish/guestfish.pod:733
16458 " eval `guestfish --listen`\n"
16463 #: ../fish/guestfish.pod:735
16464 msgid "and then send it commands by doing:"
16468 #: ../fish/guestfish.pod:737
16471 " guestfish --remote cmd [...]\n"
16476 #: ../fish/guestfish.pod:739
16477 msgid "To cause the server to exit, send it the exit command:"
16481 #: ../fish/guestfish.pod:741
16484 " guestfish --remote exit\n"
16489 #: ../fish/guestfish.pod:743
16491 "Note that the server will normally exit if there is an error in a command. "
16492 "You can change this in the usual way. See section L</EXIT ON ERROR "
16497 #: ../fish/guestfish.pod:747
16498 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
16502 #: ../fish/guestfish.pod:749
16504 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
16505 "is how the I<--remote> option knows where to send the commands. You can "
16506 "have several guestfish listener processes running using:"
16510 #: ../fish/guestfish.pod:753
16513 " eval `guestfish --listen`\n"
16514 " pid1=$GUESTFISH_PID\n"
16515 " eval `guestfish --listen`\n"
16516 " pid2=$GUESTFISH_PID\n"
16518 " guestfish --remote=$pid1 cmd\n"
16519 " guestfish --remote=$pid2 cmd\n"
16524 #: ../fish/guestfish.pod:761
16525 msgid "REMOTE CONTROL DETAILS"
16529 #: ../fish/guestfish.pod:763
16531 "Remote control happens over a Unix domain socket called "
16532 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
16533 "of the process, and C<$PID> is the process ID of the server."
16537 #: ../fish/guestfish.pod:767
16538 msgid "Guestfish client and server versions must match exactly."
16542 #: ../fish/guestfish.pod:769
16543 msgid "PREPARED DISK IMAGES"
16547 #: ../fish/guestfish.pod:771
16549 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
16550 "preformatted disk images that guestfish can make for you to save typing. "
16551 "This is particularly useful for testing purposes. This option is used "
16552 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
16553 "can be mixed with I<-a>)."
16557 #: ../fish/guestfish.pod:777
16559 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
16560 "the second and so on. Existing files in the current directory are "
16565 #: ../fish/guestfish.pod:781
16567 "The type briefly describes how the disk should be sized, partitioned, how "
16568 "filesystem(s) should be created, and how content should be added. "
16569 "Optionally the type can be followed by extra parameters, separated by C<:> "
16570 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
16571 "sparsely-allocated disk, containing a single partition, with the partition "
16572 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
16573 "on a 1GB disk instead."
16577 #: ../fish/guestfish.pod:789
16578 msgid "To list the available types and any extra parameters they take, run:"
16582 #: ../fish/guestfish.pod:793
16584 "Note that the prepared filesystem is not mounted. You would usually have to "
16585 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
16589 #: ../fish/guestfish.pod:797
16591 "If any I<-N> or I<--new> options are given, the guest is automatically "
16596 #: ../fish/guestfish.pod:802
16597 msgid "Create a 100MB disk with an ext4-formatted partition:"
16601 #: ../fish/guestfish.pod:804
16604 " guestfish -N fs:ext4\n"
16609 #: ../fish/guestfish.pod:806
16610 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
16614 #: ../fish/guestfish.pod:808
16617 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
16622 #: ../fish/guestfish.pod:810
16623 msgid "Create a blank 200MB disk:"
16627 #: ../fish/guestfish.pod:812
16630 " guestfish -N disk:200M\n"
16635 #: ../fish/guestfish.pod:814
16636 msgid "PROGRESS BARS"
16640 #: ../fish/guestfish.pod:816
16642 "Some (not all) long-running commands send progress notification messages as "
16643 "they are running. Guestfish turns these messages into progress bars."
16647 #: ../fish/guestfish.pod:820
16649 "When a command that supports progress bars takes longer than two seconds to "
16650 "run, and if progress bars are enabled, then you will see one appearing below "
16655 #: ../fish/guestfish.pod:824
16658 " ><fs> copy-size /large-file /another-file 2048M\n"
16659 " / 10% [#####-----------------------------------------] 00:30\n"
16664 #: ../fish/guestfish.pod:827
16666 "The spinner on the left hand side moves round once for every progress "
16667 "notification received from the backend. This is a (reasonably) golden "
16668 "assurance that the command is \"doing something\" even if the progress bar "
16669 "is not moving, because the command is able to send the progress "
16670 "notifications. When the bar reaches 100% and the command finishes, the "
16671 "spinner disappears."
16675 #: ../fish/guestfish.pod:834
16677 "Progress bars are enabled by default when guestfish is used interactively. "
16678 "You can enable them even for non-interactive modes using I<--progress-bars>, "
16679 "and you can disable them completely using I<--no-progress-bars>."
16683 #: ../fish/guestfish.pod:839
16684 msgid "GUESTFISH COMMANDS"
16688 #: ../fish/guestfish.pod:841
16690 "The commands in this section are guestfish convenience commands, in other "
16691 "words, they are not part of the L<guestfs(3)> API."
16695 #: ../fish/guestfish.pod:844
16700 #: ../fish/guestfish.pod:846
16709 #: ../fish/guestfish.pod:849
16711 "Without any parameter, this lists all commands. With a C<cmd> parameter, "
16712 "this displays detailed help for a command."
16716 #: ../fish/guestfish.pod:852
16717 msgid "quit | exit"
16721 #: ../fish/guestfish.pod:854
16722 msgid "This exits guestfish. You can also use C<^D> key."
16726 #: ../fish/guestfish.pod:856
16727 msgid "@FISH_COMMANDS@"
16731 #: ../fish/guestfish.pod:858
16736 #: ../fish/guestfish.pod:862 ../test-tool/libguestfs-test-tool.pod:83
16741 #: ../fish/guestfish.pod:864
16743 "guestfish returns 0 if the commands completed without error, or 1 if there "
16748 #: ../fish/guestfish.pod:871
16753 #: ../fish/guestfish.pod:873
16755 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
16760 #: ../fish/guestfish.pod:876
16761 msgid "GUESTFISH_PID"
16765 #: ../fish/guestfish.pod:878
16767 "Used with the I<--remote> option to specify the remote guestfish process to "
16768 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
16772 #: ../fish/guestfish.pod:882
16777 #: ../fish/guestfish.pod:884
16779 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
16780 "not specified, the external L<hexedit(1)> program is used."
16784 #: ../fish/guestfish.pod:888
16789 #: ../fish/guestfish.pod:890
16791 "If compiled with GNU readline support, various files in the home directory "
16792 "can be used. See L</FILES>."
16796 #: ../fish/guestfish.pod:899
16798 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
16799 "effect as using the B<-v> option."
16803 #: ../fish/guestfish.pod:911
16805 "Set the path that guestfish uses to search for kernel and initrd.img. See "
16806 "the discussion of paths in L<guestfs(3)>."
16810 #: ../fish/guestfish.pod:922
16811 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
16815 #: ../fish/guestfish.pod:924
16820 #: ../fish/guestfish.pod:926
16822 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
16827 #: ../fish/guestfish.pod:941 ../test-tool/libguestfs-test-tool.pod:88
16832 #: ../fish/guestfish.pod:945
16833 msgid "$HOME/.guestfish"
16837 #: ../fish/guestfish.pod:947
16839 "If compiled with GNU readline support, then the command history is saved in "
16844 #: ../fish/guestfish.pod:950
16845 msgid "$HOME/.inputrc"
16849 #: ../fish/guestfish.pod:952
16850 msgid "/etc/inputrc"
16854 #: ../fish/guestfish.pod:954
16856 "If compiled with GNU readline support, then these files can be used to "
16857 "configure readline. For further information, please see "
16858 "L<readline(3)/INITIALIZATION FILE>."
16862 #: ../fish/guestfish.pod:958
16863 msgid "To write rules which only apply to guestfish, use:"
16867 #: ../fish/guestfish.pod:960
16877 #: ../fish/guestfish.pod:964
16879 "Variables that you can set in inputrc that change the behaviour of guestfish "
16880 "in useful ways include:"
16884 #: ../fish/guestfish.pod:969
16885 msgid "completion-ignore-case (default: on)"
16889 #: ../fish/guestfish.pod:971
16891 "By default, guestfish will ignore case when tab-completing paths on the "
16896 #: ../fish/guestfish.pod:974
16899 " set completion-ignore-case off\n"
16904 #: ../fish/guestfish.pod:976
16905 msgid "to make guestfish case sensitive."
16909 #: ../fish/guestfish.pod:980
16914 #: ../fish/guestfish.pod:982
16915 msgid "test2.img (etc)"
16919 #: ../fish/guestfish.pod:984
16921 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
16922 "will be created in the file C<test1.img> in the current directory. The "
16923 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
16924 "the same name will be overwritten."
16928 #: ../fish/guestfish.pod:993
16930 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
16931 "L<virt-edit(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, "
16932 "L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
16933 "L<virt-tar(1)>, L<virt-win-reg(1)>, L<hexedit(1)>."
16937 #: ../fish/guestfish.pod:1017 ../test-tool/libguestfs-test-tool.pod:124 ../fuse/guestmount.pod:234 ../inspector/virt-inspector.pl:903 ../tools/virt-edit.pl:370 ../tools/virt-win-reg.pl:521 ../tools/virt-df.pl:657 ../tools/virt-ls.pl:254 ../tools/virt-resize.pl:1516 ../tools/virt-list-filesystems.pl:236 ../tools/virt-cat.pl:206 ../tools/virt-tar.pl:302 ../tools/virt-rescue.pl:285 ../tools/virt-make-fs.pl:567 ../tools/virt-list-partitions.pl:273
16939 "This program is free software; you can redistribute it and/or modify it "
16940 "under the terms of the GNU General Public License as published by the Free "
16941 "Software Foundation; either version 2 of the License, or (at your option) "
16942 "any later version."
16946 #: ../fish/guestfish.pod:1022 ../test-tool/libguestfs-test-tool.pod:129 ../fuse/guestmount.pod:239 ../inspector/virt-inspector.pl:908 ../tools/virt-edit.pl:375 ../tools/virt-win-reg.pl:526 ../tools/virt-df.pl:662 ../tools/virt-ls.pl:259 ../tools/virt-resize.pl:1521 ../tools/virt-list-filesystems.pl:241 ../tools/virt-cat.pl:211 ../tools/virt-tar.pl:307 ../tools/virt-rescue.pl:290 ../tools/virt-make-fs.pl:572 ../tools/virt-list-partitions.pl:278
16948 "This program is distributed in the hope that it will be useful, but WITHOUT "
16949 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
16950 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
16955 #: ../fish/guestfish.pod:1027 ../test-tool/libguestfs-test-tool.pod:134 ../fuse/guestmount.pod:244 ../inspector/virt-inspector.pl:913 ../tools/virt-edit.pl:380 ../tools/virt-win-reg.pl:531 ../tools/virt-df.pl:667 ../tools/virt-ls.pl:264 ../tools/virt-resize.pl:1526 ../tools/virt-list-filesystems.pl:246 ../tools/virt-cat.pl:216 ../tools/virt-tar.pl:312 ../tools/virt-rescue.pl:295 ../tools/virt-make-fs.pl:577 ../tools/virt-list-partitions.pl:283
16957 "You should have received a copy of the GNU General Public License along with "
16958 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
16959 "Ave, Cambridge, MA 02139, USA."
16963 #: ../fish/guestfish-actions.pod:1
16968 #: ../fish/guestfish-actions.pod:3
16971 " add-cdrom filename\n"
16976 #: ../fish/guestfish-actions.pod:15
16978 "This call checks for the existence of C<filename>. This stops you from "
16979 "specifying other types of drive which are supported by qemu such as C<nbd:> "
16980 "and C<http:> URLs. To specify those, use the general L</config> call "
16985 #: ../fish/guestfish-actions.pod:22
16987 "If you just want to add an ISO file (often you use this as an efficient way "
16988 "to transfer large files into the guest), then you should probably use "
16989 "L</add-drive-ro> instead."
16993 #: ../fish/guestfish-actions.pod:35
16998 #: ../fish/guestfish-actions.pod:37
17001 " add-drive filename\n"
17006 #: ../fish/guestfish-actions.pod:39
17008 "This function is the equivalent of calling L</add-drive-opts> with no "
17009 "optional parameters, so the disk is added writable, with the format being "
17010 "detected automatically."
17014 #: ../fish/guestfish-actions.pod:43
17016 "Automatic detection of the format opens you up to a potential security hole "
17017 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
17018 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
17019 "you should think about replacing calls to this function with calls to "
17020 "L</add-drive-opts>, and specifying the format."
17024 #: ../fish/guestfish-actions.pod:50
17025 msgid "add-drive-opts"
17029 #: ../fish/guestfish-actions.pod:52
17034 #: ../fish/guestfish-actions.pod:54
17037 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
17042 #: ../fish/guestfish-actions.pod:81
17044 "This forces the image format. If you omit this (or use L</add-drive> or "
17045 "L</add-drive-ro>) then the format is automatically detected. Possible "
17046 "formats include C<raw> and C<qcow2>."
17050 #: ../fish/guestfish-actions.pod:92
17052 "This rarely-used option lets you emulate the behaviour of the deprecated "
17053 "L</add-drive-with-if> call (q.v.)"
17057 #: ../fish/guestfish-actions.pod:97
17059 "This command has one or more optional arguments. See L</OPTIONAL "
17064 #: ../fish/guestfish-actions.pod:99
17065 msgid "add-drive-ro"
17069 #: ../fish/guestfish-actions.pod:101
17074 #: ../fish/guestfish-actions.pod:103
17077 " add-drive-ro filename\n"
17082 #: ../fish/guestfish-actions.pod:105
17084 "This function is the equivalent of calling L</add-drive-opts> with the "
17085 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
17086 "is added read-only, with the format being detected automatically."
17090 #: ../fish/guestfish-actions.pod:110
17091 msgid "add-drive-ro-with-if"
17095 #: ../fish/guestfish-actions.pod:112
17098 " add-drive-ro-with-if filename iface\n"
17103 #: ../fish/guestfish-actions.pod:114
17105 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
17106 "interface emulation to use at run time."
17110 #: ../fish/guestfish-actions.pod:124
17111 msgid "add-drive-with-if"
17115 #: ../fish/guestfish-actions.pod:126
17118 " add-drive-with-if filename iface\n"
17123 #: ../fish/guestfish-actions.pod:128
17125 "This is the same as L</add-drive> but it allows you to specify the QEMU "
17126 "interface emulation to use at run time."
17130 #: ../fish/guestfish-actions.pod:138
17135 #: ../fish/guestfish-actions.pod:140
17138 " aug-clear augpath\n"
17143 #: ../fish/guestfish-actions.pod:145
17148 #: ../fish/guestfish-actions.pod:147
17156 #: ../fish/guestfish-actions.pod:149
17158 "Close the current Augeas handle and free up any resources used by it. After "
17159 "calling this, you have to call L</aug-init> again before you can use any "
17160 "other Augeas functions."
17164 #: ../fish/guestfish-actions.pod:154
17165 msgid "aug-defnode"
17169 #: ../fish/guestfish-actions.pod:156
17172 " aug-defnode name expr val\n"
17177 #: ../fish/guestfish-actions.pod:161
17179 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
17180 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
17181 "containing that single node."
17185 #: ../fish/guestfish-actions.pod:169
17190 #: ../fish/guestfish-actions.pod:171
17193 " aug-defvar name expr\n"
17198 #: ../fish/guestfish-actions.pod:180
17203 #: ../fish/guestfish-actions.pod:182
17206 " aug-get augpath\n"
17211 #: ../fish/guestfish-actions.pod:187
17216 #: ../fish/guestfish-actions.pod:189
17219 " aug-init root flags\n"
17224 #: ../fish/guestfish-actions.pod:195
17225 msgid "You must call this before using any other L</aug-*> commands."
17229 #: ../fish/guestfish-actions.pod:230
17230 msgid "Do not load the tree in L</aug-init>."
17234 #: ../fish/guestfish-actions.pod:234
17235 msgid "To close the handle, you can call L</aug-close>."
17239 #: ../fish/guestfish-actions.pod:238
17244 #: ../fish/guestfish-actions.pod:240
17247 " aug-insert augpath label true|false\n"
17252 #: ../fish/guestfish-actions.pod:250
17257 #: ../fish/guestfish-actions.pod:252
17265 #: ../fish/guestfish-actions.pod:259
17270 #: ../fish/guestfish-actions.pod:261
17273 " aug-ls augpath\n"
17278 #: ../fish/guestfish-actions.pod:263
17280 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
17281 "resulting nodes into alphabetical order."
17285 #: ../fish/guestfish-actions.pod:266
17290 #: ../fish/guestfish-actions.pod:268
17293 " aug-match augpath\n"
17298 #: ../fish/guestfish-actions.pod:274
17303 #: ../fish/guestfish-actions.pod:276
17306 " aug-mv src dest\n"
17311 #: ../fish/guestfish-actions.pod:281
17316 #: ../fish/guestfish-actions.pod:283
17319 " aug-rm augpath\n"
17324 #: ../fish/guestfish-actions.pod:289
17329 #: ../fish/guestfish-actions.pod:291
17337 #: ../fish/guestfish-actions.pod:295
17339 "The flags which were passed to L</aug-init> affect exactly how files are "
17344 #: ../fish/guestfish-actions.pod:298
17349 #: ../fish/guestfish-actions.pod:300
17352 " aug-set augpath val\n"
17357 #: ../fish/guestfish-actions.pod:304
17359 "In the Augeas API, it is possible to clear a node by setting the value to "
17360 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
17361 "this call. Instead you must use the L</aug-clear> call."
17365 #: ../fish/guestfish-actions.pod:309
17370 #: ../fish/guestfish-actions.pod:311
17373 " available 'groups ...'\n"
17378 #: ../fish/guestfish-actions.pod:317
17380 "The libguestfs groups, and the functions that those groups correspond to, "
17381 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
17382 "runtime by calling L</available-all-groups>."
17386 #: ../fish/guestfish-actions.pod:341
17387 msgid "You must call L</launch> before calling this function."
17391 #: ../fish/guestfish-actions.pod:363
17393 "This call was added in version C<1.0.80>. In previous versions of "
17394 "libguestfs all you could do would be to speculatively execute a command to "
17395 "find out if the daemon implemented it. See also L</version>."
17399 #: ../fish/guestfish-actions.pod:370
17400 msgid "available-all-groups"
17404 #: ../fish/guestfish-actions.pod:372
17407 " available-all-groups\n"
17412 #: ../fish/guestfish-actions.pod:374
17414 "This command returns a list of all optional groups that this daemon knows "
17415 "about. Note this returns both supported and unsupported groups. To find "
17416 "out which ones the daemon can actually support you have to call "
17417 "L</available> on each member of the returned list."
17421 #: ../fish/guestfish-actions.pod:380
17422 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
17426 #: ../fish/guestfish-actions.pod:382
17431 #: ../fish/guestfish-actions.pod:384
17434 " base64-in (base64file|-) filename\n"
17439 #: ../fish/guestfish-actions.pod:389 ../fish/guestfish-actions.pod:398 ../fish/guestfish-actions.pod:622 ../fish/guestfish-actions.pod:769 ../fish/guestfish-actions.pod:816 ../fish/guestfish-actions.pod:835 ../fish/guestfish-actions.pod:1212 ../fish/guestfish-actions.pod:3896 ../fish/guestfish-actions.pod:3908 ../fish/guestfish-actions.pod:3919 ../fish/guestfish-actions.pod:3930 ../fish/guestfish-actions.pod:3982 ../fish/guestfish-actions.pod:3991 ../fish/guestfish-actions.pod:4045 ../fish/guestfish-actions.pod:4068
17440 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
17444 #: ../fish/guestfish-actions.pod:391
17449 #: ../fish/guestfish-actions.pod:393
17452 " base64-out filename (base64file|-)\n"
17457 #: ../fish/guestfish-actions.pod:400
17458 msgid "blockdev-flushbufs"
17462 #: ../fish/guestfish-actions.pod:402
17465 " blockdev-flushbufs device\n"
17470 #: ../fish/guestfish-actions.pod:409
17471 msgid "blockdev-getbsz"
17475 #: ../fish/guestfish-actions.pod:411
17478 " blockdev-getbsz device\n"
17483 #: ../fish/guestfish-actions.pod:420
17484 msgid "blockdev-getro"
17488 #: ../fish/guestfish-actions.pod:422
17491 " blockdev-getro device\n"
17496 #: ../fish/guestfish-actions.pod:429
17497 msgid "blockdev-getsize64"
17501 #: ../fish/guestfish-actions.pod:431
17504 " blockdev-getsize64 device\n"
17509 #: ../fish/guestfish-actions.pod:435
17510 msgid "See also L</blockdev-getsz>."
17514 #: ../fish/guestfish-actions.pod:439
17515 msgid "blockdev-getss"
17519 #: ../fish/guestfish-actions.pod:441
17522 " blockdev-getss device\n"
17527 #: ../fish/guestfish-actions.pod:446
17528 msgid "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
17532 #: ../fish/guestfish-actions.pod:451
17533 msgid "blockdev-getsz"
17537 #: ../fish/guestfish-actions.pod:453
17540 " blockdev-getsz device\n"
17545 #: ../fish/guestfish-actions.pod:458
17547 "See also L</blockdev-getss> for the real sector size of the device, and "
17548 "L</blockdev-getsize64> for the more useful I<size in bytes>."
17552 #: ../fish/guestfish-actions.pod:464
17553 msgid "blockdev-rereadpt"
17557 #: ../fish/guestfish-actions.pod:466
17560 " blockdev-rereadpt device\n"
17565 #: ../fish/guestfish-actions.pod:472
17566 msgid "blockdev-setbsz"
17570 #: ../fish/guestfish-actions.pod:474
17573 " blockdev-setbsz device blocksize\n"
17578 #: ../fish/guestfish-actions.pod:483
17579 msgid "blockdev-setro"
17583 #: ../fish/guestfish-actions.pod:485
17586 " blockdev-setro device\n"
17591 #: ../fish/guestfish-actions.pod:491
17592 msgid "blockdev-setrw"
17596 #: ../fish/guestfish-actions.pod:493
17599 " blockdev-setrw device\n"
17604 #: ../fish/guestfish-actions.pod:499
17605 msgid "case-sensitive-path"
17609 #: ../fish/guestfish-actions.pod:501
17612 " case-sensitive-path path\n"
17617 #: ../fish/guestfish-actions.pod:525
17619 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return "
17620 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
17621 "how the directories were originally created under Windows)."
17625 #: ../fish/guestfish-actions.pod:533
17626 msgid "See also L</realpath>."
17630 #: ../fish/guestfish-actions.pod:535
17635 #: ../fish/guestfish-actions.pod:537
17643 #: ../fish/guestfish-actions.pod:541
17645 "Note that this function cannot correctly handle binary files (specifically, "
17646 "files containing C<\\0> character which is treated as end of string). For "
17647 "those you need to use the L</read-file> or L</download> functions which have "
17648 "a more complex interface."
17652 #: ../fish/guestfish-actions.pod:549
17657 #: ../fish/guestfish-actions.pod:551
17660 " checksum csumtype path\n"
17665 #: ../fish/guestfish-actions.pod:594
17666 msgid "To get the checksum for a device, use L</checksum-device>."
17670 #: ../fish/guestfish-actions.pod:596
17671 msgid "To get the checksums for many files, use L</checksums-out>."
17675 #: ../fish/guestfish-actions.pod:598
17676 msgid "checksum-device"
17680 #: ../fish/guestfish-actions.pod:600
17683 " checksum-device csumtype device\n"
17688 #: ../fish/guestfish-actions.pod:602
17690 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
17691 "device named C<device>. For the types of checksums supported see the "
17692 "L</checksum> command."
17696 #: ../fish/guestfish-actions.pod:606
17697 msgid "checksums-out"
17701 #: ../fish/guestfish-actions.pod:608
17704 " checksums-out csumtype directory (sumsfile|-)\n"
17709 #: ../fish/guestfish-actions.pod:624
17714 #: ../fish/guestfish-actions.pod:626
17717 " chmod mode path\n"
17722 #: ../fish/guestfish-actions.pod:637
17727 #: ../fish/guestfish-actions.pod:639
17730 " chown owner group path\n"
17735 #: ../fish/guestfish-actions.pod:647
17740 #: ../fish/guestfish-actions.pod:649
17743 " command 'arguments ...'\n"
17748 #: ../fish/guestfish-actions.pod:656
17750 "The single parameter is an argv-style list of arguments. The first element "
17751 "is the name of the program to run. Subsequent elements are parameters. The "
17752 "list must be non-empty (ie. must contain a program name). Note that the "
17753 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
17757 #: ../fish/guestfish-actions.pod:684
17758 msgid "command-lines"
17762 #: ../fish/guestfish-actions.pod:686
17765 " command-lines 'arguments ...'\n"
17770 #: ../fish/guestfish-actions.pod:688
17771 msgid "This is the same as L</command>, but splits the result into a list of lines."
17775 #: ../fish/guestfish-actions.pod:691
17776 msgid "See also: L</sh-lines>"
17780 #: ../fish/guestfish-actions.pod:696
17785 #: ../fish/guestfish-actions.pod:698
17788 " config qemuparam qemuvalue\n"
17793 #: ../fish/guestfish-actions.pod:709
17798 #: ../fish/guestfish-actions.pod:711
17801 " copy-size src dest size\n"
17806 #: ../fish/guestfish-actions.pod:719
17811 #: ../fish/guestfish-actions.pod:721
17819 #: ../fish/guestfish-actions.pod:726
17824 #: ../fish/guestfish-actions.pod:728
17832 #: ../fish/guestfish-actions.pod:733
17837 #: ../fish/guestfish-actions.pod:735
17845 #: ../fish/guestfish-actions.pod:742
17847 "If the destination is a device, it must be as large or larger than the "
17848 "source file or device, otherwise the copy will fail. This command cannot do "
17849 "partial copies (see L</copy-size>)."
17853 #: ../fish/guestfish-actions.pod:746
17858 #: ../fish/guestfish-actions.pod:748
17861 " debug subcmd 'extraargs ...'\n"
17866 #: ../fish/guestfish-actions.pod:750
17868 "The L</debug> command exposes some internals of C<guestfsd> (the guestfs "
17869 "daemon) that runs inside the qemu subprocess."
17873 #: ../fish/guestfish-actions.pod:758
17874 msgid "debug-upload"
17878 #: ../fish/guestfish-actions.pod:760
17881 " debug-upload (filename|-) tmpname mode\n"
17886 #: ../fish/guestfish-actions.pod:762
17887 msgid "The L</debug-upload> command uploads a file to the libguestfs appliance."
17891 #: ../fish/guestfish-actions.pod:771
17896 #: ../fish/guestfish-actions.pod:773
17904 #: ../fish/guestfish-actions.pod:781
17909 #: ../fish/guestfish-actions.pod:783
17917 #: ../fish/guestfish-actions.pod:792
17922 #: ../fish/guestfish-actions.pod:794
17930 #: ../fish/guestfish-actions.pod:800
17932 "Another way to get the same information is to enable verbose messages with "
17933 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
17934 "before running the program."
17938 #: ../fish/guestfish-actions.pod:805
17943 #: ../fish/guestfish-actions.pod:807
17946 " download remotefilename (filename|-)\n"
17951 #: ../fish/guestfish-actions.pod:814
17952 msgid "See also L</upload>, L</cat>."
17956 #: ../fish/guestfish-actions.pod:818
17957 msgid "download-offset"
17961 #: ../fish/guestfish-actions.pod:820
17964 " download-offset remotefilename (filename|-) offset size\n"
17969 #: ../fish/guestfish-actions.pod:828
17971 "Note that there is no limit on the amount of data that can be downloaded "
17972 "with this call, unlike with L</pread>, and this call always reads the full "
17973 "amount unless an error occurs."
17977 #: ../fish/guestfish-actions.pod:833
17978 msgid "See also L</download>, L</pread>."
17982 #: ../fish/guestfish-actions.pod:837
17983 msgid "drop-caches"
17987 #: ../fish/guestfish-actions.pod:839
17990 " drop-caches whattodrop\n"
17995 #: ../fish/guestfish-actions.pod:851
18000 #: ../fish/guestfish-actions.pod:853
18008 #: ../fish/guestfish-actions.pod:865
18013 #: ../fish/guestfish-actions.pod:867
18016 " e2fsck-f device\n"
18021 #: ../fish/guestfish-actions.pod:873
18023 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
18024 "should use L</fsck>."
18028 #: ../fish/guestfish-actions.pod:876
18029 msgid "echo-daemon"
18033 #: ../fish/guestfish-actions.pod:878
18036 " echo-daemon 'words ...'\n"
18041 #: ../fish/guestfish-actions.pod:885
18042 msgid "See also L</ping-daemon>."
18046 #: ../fish/guestfish-actions.pod:887
18051 #: ../fish/guestfish-actions.pod:889
18054 " egrep regex path\n"
18059 #: ../fish/guestfish-actions.pod:897
18064 #: ../fish/guestfish-actions.pod:899
18067 " egrepi regex path\n"
18072 #: ../fish/guestfish-actions.pod:907
18077 #: ../fish/guestfish-actions.pod:909
18080 " equal file1 file2\n"
18085 #: ../fish/guestfish-actions.pod:916
18090 #: ../fish/guestfish-actions.pod:918
18098 #: ../fish/guestfish-actions.pod:923
18099 msgid "See also L</is-file>, L</is-dir>, L</stat>."
18103 #: ../fish/guestfish-actions.pod:925
18108 #: ../fish/guestfish-actions.pod:927
18111 " fallocate path len\n"
18116 #: ../fish/guestfish-actions.pod:944
18117 msgid "fallocate64"
18121 #: ../fish/guestfish-actions.pod:946
18124 " fallocate64 path len\n"
18129 #: ../fish/guestfish-actions.pod:952
18131 "Note that this call allocates disk blocks for the file. To create a sparse "
18132 "file use L</truncate-size> instead."
18136 #: ../fish/guestfish-actions.pod:955
18138 "The deprecated call L</fallocate> does the same, but owing to an oversight "
18139 "it only allowed 30 bit lengths to be specified, effectively limiting the "
18140 "maximum size of files created through that call to 1GB."
18144 #: ../fish/guestfish-actions.pod:964
18149 #: ../fish/guestfish-actions.pod:966
18152 " fgrep pattern path\n"
18157 #: ../fish/guestfish-actions.pod:974
18162 #: ../fish/guestfish-actions.pod:976
18165 " fgrepi pattern path\n"
18170 #: ../fish/guestfish-actions.pod:984
18175 #: ../fish/guestfish-actions.pod:986
18183 #: ../fish/guestfish-actions.pod:998
18185 "This command can also be used on C</dev/> devices (and partitions, LV "
18186 "names). You can for example use this to determine if a device contains a "
18187 "filesystem, although it's usually better to use L</vfs-type>."
18191 #: ../fish/guestfish-actions.pod:1008
18192 msgid "file-architecture"
18196 #: ../fish/guestfish-actions.pod:1010
18199 " file-architecture filename\n"
18204 #: ../fish/guestfish-actions.pod:1113
18209 #: ../fish/guestfish-actions.pod:1115
18217 #: ../fish/guestfish-actions.pod:1119
18219 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, "
18220 "L</is-file> etc. To get the size of block devices, use "
18221 "L</blockdev-getsize64>."
18225 #: ../fish/guestfish-actions.pod:1123
18230 #: ../fish/guestfish-actions.pod:1125
18233 " fill c len path\n"
18238 #: ../fish/guestfish-actions.pod:1131
18240 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
18241 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
18242 "L</fill-pattern>."
18246 #: ../fish/guestfish-actions.pod:1136
18247 msgid "fill-pattern"
18251 #: ../fish/guestfish-actions.pod:1138
18254 " fill-pattern pattern len path\n"
18259 #: ../fish/guestfish-actions.pod:1140
18261 "This function is like L</fill> except that it creates a new file of length "
18262 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
18263 "is truncated if necessary to ensure the length of the file is exactly C<len> "
18268 #: ../fish/guestfish-actions.pod:1145
18273 #: ../fish/guestfish-actions.pod:1147
18276 " find directory\n"
18281 #: ../fish/guestfish-actions.pod:1161
18282 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
18286 #: ../fish/guestfish-actions.pod:1174
18287 msgid "See also L</find0>."
18291 #: ../fish/guestfish-actions.pod:1179
18296 #: ../fish/guestfish-actions.pod:1181
18299 " find0 directory (files|-)\n"
18304 #: ../fish/guestfish-actions.pod:1187
18305 msgid "This command works the same way as L</find> with the following exceptions:"
18309 #: ../fish/guestfish-actions.pod:1214
18310 msgid "findfs-label"
18314 #: ../fish/guestfish-actions.pod:1216
18317 " findfs-label label\n"
18322 #: ../fish/guestfish-actions.pod:1222
18323 msgid "To find the label of a filesystem, use L</vfs-label>."
18327 #: ../fish/guestfish-actions.pod:1224
18328 msgid "findfs-uuid"
18332 #: ../fish/guestfish-actions.pod:1226
18335 " findfs-uuid uuid\n"
18340 #: ../fish/guestfish-actions.pod:1232
18341 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
18345 #: ../fish/guestfish-actions.pod:1234
18350 #: ../fish/guestfish-actions.pod:1236
18353 " fsck fstype device\n"
18358 #: ../fish/guestfish-actions.pod:1266
18363 #: ../fish/guestfish-actions.pod:1268
18371 #: ../fish/guestfish-actions.pod:1275
18372 msgid "get-autosync"
18376 #: ../fish/guestfish-actions.pod:1277
18384 #: ../fish/guestfish-actions.pod:1281
18389 #: ../fish/guestfish-actions.pod:1283
18397 #: ../fish/guestfish-actions.pod:1287
18398 msgid "get-e2label"
18402 #: ../fish/guestfish-actions.pod:1289
18405 " get-e2label device\n"
18410 #: ../fish/guestfish-actions.pod:1301
18415 #: ../fish/guestfish-actions.pod:1303
18418 " get-e2uuid device\n"
18423 #: ../fish/guestfish-actions.pod:1315
18424 msgid "get-memsize"
18428 #: ../fish/guestfish-actions.pod:1317
18436 #: ../fish/guestfish-actions.pod:1322
18438 "If L</set-memsize> was not called on this handle, and if "
18439 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
18440 "value for memsize."
18444 #: ../fish/guestfish-actions.pod:1329
18445 msgid "get-network"
18449 #: ../fish/guestfish-actions.pod:1331
18457 #: ../fish/guestfish-actions.pod:1335
18462 #: ../fish/guestfish-actions.pod:1337
18470 #: ../fish/guestfish-actions.pod:1344
18475 #: ../fish/guestfish-actions.pod:1346
18480 #: ../fish/guestfish-actions.pod:1348
18488 #: ../fish/guestfish-actions.pod:1355
18493 #: ../fish/guestfish-actions.pod:1357
18501 #: ../fish/guestfish-actions.pod:1364
18502 msgid "get-recovery-proc"
18506 #: ../fish/guestfish-actions.pod:1366
18509 " get-recovery-proc\n"
18514 #: ../fish/guestfish-actions.pod:1370
18515 msgid "get-selinux"
18519 #: ../fish/guestfish-actions.pod:1372
18527 #: ../fish/guestfish-actions.pod:1374
18529 "This returns the current setting of the selinux flag which is passed to the "
18530 "appliance at boot time. See L</set-selinux>."
18534 #: ../fish/guestfish-actions.pod:1380
18539 #: ../fish/guestfish-actions.pod:1382
18547 #: ../fish/guestfish-actions.pod:1389
18552 #: ../fish/guestfish-actions.pod:1391
18560 #: ../fish/guestfish-actions.pod:1395
18565 #: ../fish/guestfish-actions.pod:1397
18573 #: ../fish/guestfish-actions.pod:1399
18575 "Return the current umask. By default the umask is C<022> unless it has been "
18576 "set by calling L</umask>."
18580 #: ../fish/guestfish-actions.pod:1402
18581 msgid "get-verbose"
18585 #: ../fish/guestfish-actions.pod:1404
18593 #: ../fish/guestfish-actions.pod:1408
18598 #: ../fish/guestfish-actions.pod:1410
18606 #: ../fish/guestfish-actions.pod:1414
18607 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
18611 #: ../fish/guestfish-actions.pod:1417
18616 #: ../fish/guestfish-actions.pod:1419
18619 " getxattrs path\n"
18624 #: ../fish/guestfish-actions.pod:1427
18625 msgid "See also: L</lgetxattrs>, L<attr(5)>."
18629 #: ../fish/guestfish-actions.pod:1429
18630 msgid "glob-expand"
18634 #: ../fish/guestfish-actions.pod:1431
18637 " glob-expand pattern\n"
18642 #: ../fish/guestfish-actions.pod:1444
18647 #: ../fish/guestfish-actions.pod:1446
18650 " grep regex path\n"
18655 #: ../fish/guestfish-actions.pod:1454
18660 #: ../fish/guestfish-actions.pod:1456
18663 " grepi regex path\n"
18668 #: ../fish/guestfish-actions.pod:1464
18669 msgid "grub-install"
18673 #: ../fish/guestfish-actions.pod:1466
18676 " grub-install root device\n"
18681 #: ../fish/guestfish-actions.pod:1482
18686 #: ../fish/guestfish-actions.pod:1484
18694 #: ../fish/guestfish-actions.pod:1492
18699 #: ../fish/guestfish-actions.pod:1494
18702 " head-n nrlines path\n"
18707 #: ../fish/guestfish-actions.pod:1507
18712 #: ../fish/guestfish-actions.pod:1509
18720 #: ../fish/guestfish-actions.pod:1517
18725 #: ../fish/guestfish-actions.pod:1519
18728 " initrd-cat initrdpath filename\n"
18733 #: ../fish/guestfish-actions.pod:1531
18734 msgid "See also L</initrd-list>."
18738 #: ../fish/guestfish-actions.pod:1536
18739 msgid "initrd-list"
18743 #: ../fish/guestfish-actions.pod:1538
18746 " initrd-list path\n"
18751 #: ../fish/guestfish-actions.pod:1550
18752 msgid "inotify-add-watch"
18756 #: ../fish/guestfish-actions.pod:1552
18759 " inotify-add-watch path mask\n"
18764 #: ../fish/guestfish-actions.pod:1564
18765 msgid "inotify-close"
18769 #: ../fish/guestfish-actions.pod:1566
18777 #: ../fish/guestfish-actions.pod:1572
18778 msgid "inotify-files"
18782 #: ../fish/guestfish-actions.pod:1574
18790 #: ../fish/guestfish-actions.pod:1576
18792 "This function is a helpful wrapper around L</inotify-read> which just "
18793 "returns a list of pathnames of objects that were touched. The returned "
18794 "pathnames are sorted and deduplicated."
18798 #: ../fish/guestfish-actions.pod:1580
18799 msgid "inotify-init"
18803 #: ../fish/guestfish-actions.pod:1582
18806 " inotify-init maxevents\n"
18811 #: ../fish/guestfish-actions.pod:1588
18813 "C<maxevents> is the maximum number of events which will be queued up between "
18814 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
18815 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
18816 "default was 16384 events. Beyond this limit, the kernel throws away events, "
18817 "but records the fact that it threw them away by setting a flag "
18818 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
18822 #: ../fish/guestfish-actions.pod:1598
18824 "Before any events are generated, you have to add some watches to the "
18825 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
18826 "L</inotify-watch-all>."
18830 #: ../fish/guestfish-actions.pod:1604
18832 "Queued up events should be read periodically by calling L</inotify-read> (or "
18833 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
18834 "If you don't read the events out often enough then you risk the internal "
18835 "queue overflowing."
18839 #: ../fish/guestfish-actions.pod:1611
18841 "The handle should be closed after use by calling L</inotify-close>. This "
18842 "also removes any watches automatically."
18846 #: ../fish/guestfish-actions.pod:1620
18847 msgid "inotify-read"
18851 #: ../fish/guestfish-actions.pod:1622
18859 #: ../fish/guestfish-actions.pod:1635
18860 msgid "inotify-rm-watch"
18864 #: ../fish/guestfish-actions.pod:1637
18867 " inotify-rm-watch wd\n"
18872 #: ../fish/guestfish-actions.pod:1639
18873 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
18877 #: ../fish/guestfish-actions.pod:1642
18878 msgid "inspect-get-arch"
18882 #: ../fish/guestfish-actions.pod:1644
18885 " inspect-get-arch root\n"
18890 #: ../fish/guestfish-actions.pod:1646 ../fish/guestfish-actions.pod:1662 ../fish/guestfish-actions.pod:1708 ../fish/guestfish-actions.pod:1726 ../fish/guestfish-actions.pod:1747 ../fish/guestfish-actions.pod:1762 ../fish/guestfish-actions.pod:1785 ../fish/guestfish-actions.pod:1802
18892 "This function should only be called with a root device string as returned by "
18897 #: ../fish/guestfish-actions.pod:1649
18899 "This returns the architecture of the inspected operating system. The "
18900 "possible return values are listed under L</file-architecture>."
18904 #: ../fish/guestfish-actions.pod:1658
18905 msgid "inspect-get-distro"
18909 #: ../fish/guestfish-actions.pod:1660
18912 " inspect-get-distro root\n"
18917 #: ../fish/guestfish-actions.pod:1704
18918 msgid "inspect-get-filesystems"
18922 #: ../fish/guestfish-actions.pod:1706
18925 " inspect-get-filesystems root\n"
18930 #: ../fish/guestfish-actions.pod:1719
18932 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
18933 "L</inspect-get-mountpoints>."
18937 #: ../fish/guestfish-actions.pod:1722
18938 msgid "inspect-get-major-version"
18942 #: ../fish/guestfish-actions.pod:1724
18945 " inspect-get-major-version root\n"
18950 #: ../fish/guestfish-actions.pod:1743
18951 msgid "inspect-get-minor-version"
18955 #: ../fish/guestfish-actions.pod:1745
18958 " inspect-get-minor-version root\n"
18963 #: ../fish/guestfish-actions.pod:1755
18965 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
18966 "L</inspect-get-major-version>."
18970 #: ../fish/guestfish-actions.pod:1758
18971 msgid "inspect-get-mountpoints"
18975 #: ../fish/guestfish-actions.pod:1760
18978 " inspect-get-mountpoints root\n"
18983 #: ../fish/guestfish-actions.pod:1778
18985 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
18986 "L</inspect-get-filesystems>."
18990 #: ../fish/guestfish-actions.pod:1781
18991 msgid "inspect-get-product-name"
18995 #: ../fish/guestfish-actions.pod:1783
18998 " inspect-get-product-name root\n"
19003 #: ../fish/guestfish-actions.pod:1798
19004 msgid "inspect-get-type"
19008 #: ../fish/guestfish-actions.pod:1800
19011 " inspect-get-type root\n"
19016 #: ../fish/guestfish-actions.pod:1829
19021 #: ../fish/guestfish-actions.pod:1831
19029 #: ../fish/guestfish-actions.pod:1846
19031 "You can pass the root string(s) returned to other L</inspect-get-*> "
19032 "functions in order to query further information about each operating system, "
19033 "such as the name and version."
19037 #: ../fish/guestfish-actions.pod:1851
19039 "This function uses other libguestfs features such as L</mount-ro> and "
19040 "L</umount-all> in order to mount and unmount filesystems and look at the "
19041 "contents. This should be called with no disks currently mounted. The "
19042 "function may also use Augeas, so any existing Augeas handle will be closed."
19046 #: ../fish/guestfish-actions.pod:1863 ../fish/guestfish-actions.pod:2019 ../fish/guestfish-actions.pod:2065
19047 msgid "See also L</list-filesystems>."
19051 #: ../fish/guestfish-actions.pod:1865
19052 msgid "is-blockdev"
19056 #: ../fish/guestfish-actions.pod:1867
19059 " is-blockdev path\n"
19064 #: ../fish/guestfish-actions.pod:1872 ../fish/guestfish-actions.pod:1890 ../fish/guestfish-actions.pod:1909 ../fish/guestfish-actions.pod:1918 ../fish/guestfish-actions.pod:1928 ../fish/guestfish-actions.pod:1962 ../fish/guestfish-actions.pod:1971
19065 msgid "See also L</stat>."
19069 #: ../fish/guestfish-actions.pod:1874
19074 #: ../fish/guestfish-actions.pod:1876
19082 #: ../fish/guestfish-actions.pod:1883
19087 #: ../fish/guestfish-actions.pod:1885
19090 " is-chardev path\n"
19095 #: ../fish/guestfish-actions.pod:1892
19100 #: ../fish/guestfish-actions.pod:1894
19108 #: ../fish/guestfish-actions.pod:1901
19113 #: ../fish/guestfish-actions.pod:1903
19121 #: ../fish/guestfish-actions.pod:1911
19126 #: ../fish/guestfish-actions.pod:1913
19134 #: ../fish/guestfish-actions.pod:1920
19139 #: ../fish/guestfish-actions.pod:1922
19147 #: ../fish/guestfish-actions.pod:1930
19148 msgid "is-launching"
19152 #: ../fish/guestfish-actions.pod:1932
19160 #: ../fish/guestfish-actions.pod:1939
19165 #: ../fish/guestfish-actions.pod:1941
19173 #: ../fish/guestfish-actions.pod:1946
19178 #: ../fish/guestfish-actions.pod:1948
19186 #: ../fish/guestfish-actions.pod:1955
19191 #: ../fish/guestfish-actions.pod:1957
19194 " is-socket path\n"
19199 #: ../fish/guestfish-actions.pod:1964
19204 #: ../fish/guestfish-actions.pod:1966
19207 " is-symlink path\n"
19212 #: ../fish/guestfish-actions.pod:1973
19213 msgid "kill-subprocess"
19217 #: ../fish/guestfish-actions.pod:1975
19220 " kill-subprocess\n"
19225 #: ../fish/guestfish-actions.pod:1979
19230 #: ../fish/guestfish-actions.pod:1981
19235 #: ../fish/guestfish-actions.pod:1983
19243 #: ../fish/guestfish-actions.pod:1991
19248 #: ../fish/guestfish-actions.pod:1993
19251 " lchown owner group path\n"
19256 #: ../fish/guestfish-actions.pod:1995
19258 "Change the file owner to C<owner> and group to C<group>. This is like "
19259 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
19264 #: ../fish/guestfish-actions.pod:2003
19269 #: ../fish/guestfish-actions.pod:2005
19272 " lgetxattrs path\n"
19277 #: ../fish/guestfish-actions.pod:2007
19279 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
19280 "it returns the extended attributes of the link itself."
19284 #: ../fish/guestfish-actions.pod:2011
19285 msgid "list-devices"
19289 #: ../fish/guestfish-actions.pod:2013
19297 #: ../fish/guestfish-actions.pod:2021
19298 msgid "list-filesystems"
19302 #: ../fish/guestfish-actions.pod:2023
19305 " list-filesystems\n"
19310 #: ../fish/guestfish-actions.pod:2042
19312 "This command runs other libguestfs commands, which might include L</mount> "
19313 "and L</umount>, and therefore you should use this soon after launch and only "
19314 "when nothing is mounted."
19318 #: ../fish/guestfish-actions.pod:2046
19320 "Not all of the filesystems returned will be mountable. In particular, swap "
19321 "partitions are returned in the list. Also this command does not check that "
19322 "each filesystem found is valid and mountable, and some filesystems might be "
19323 "mountable but require special options. Filesystems may not all belong to a "
19324 "single logical operating system (use L</inspect-os> to look for OSes)."
19328 #: ../fish/guestfish-actions.pod:2054
19329 msgid "list-partitions"
19333 #: ../fish/guestfish-actions.pod:2056
19336 " list-partitions\n"
19341 #: ../fish/guestfish-actions.pod:2062
19343 "This does not return logical volumes. For that you will need to call "
19348 #: ../fish/guestfish-actions.pod:2067
19353 #: ../fish/guestfish-actions.pod:2069
19361 #: ../fish/guestfish-actions.pod:2077
19366 #: ../fish/guestfish-actions.pod:2079
19369 " ln target linkname\n"
19374 #: ../fish/guestfish-actions.pod:2083
19379 #: ../fish/guestfish-actions.pod:2085
19382 " ln-f target linkname\n"
19387 #: ../fish/guestfish-actions.pod:2090
19392 #: ../fish/guestfish-actions.pod:2092
19395 " ln-s target linkname\n"
19400 #: ../fish/guestfish-actions.pod:2096
19405 #: ../fish/guestfish-actions.pod:2098
19408 " ln-sf target linkname\n"
19413 #: ../fish/guestfish-actions.pod:2103
19414 msgid "lremovexattr"
19418 #: ../fish/guestfish-actions.pod:2105
19421 " lremovexattr xattr path\n"
19426 #: ../fish/guestfish-actions.pod:2107
19428 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
19429 "it removes an extended attribute of the link itself."
19433 #: ../fish/guestfish-actions.pod:2111
19438 #: ../fish/guestfish-actions.pod:2113
19446 #: ../fish/guestfish-actions.pod:2119
19448 "This command is mostly useful for interactive sessions. Programs should "
19449 "probably use L</readdir> instead."
19453 #: ../fish/guestfish-actions.pod:2122
19458 #: ../fish/guestfish-actions.pod:2124
19461 " lsetxattr xattr val vallen path\n"
19466 #: ../fish/guestfish-actions.pod:2126
19468 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
19469 "sets an extended attribute of the link itself."
19473 #: ../fish/guestfish-actions.pod:2130
19478 #: ../fish/guestfish-actions.pod:2132
19486 #: ../fish/guestfish-actions.pod:2136
19488 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
19489 "the link is stat-ed, not the file it refers to."
19493 #: ../fish/guestfish-actions.pod:2142
19498 #: ../fish/guestfish-actions.pod:2144
19501 " lstatlist path 'names ...'\n"
19506 #: ../fish/guestfish-actions.pod:2146
19508 "This call allows you to perform the L</lstat> operation on multiple files, "
19509 "where all files are in the directory C<path>. C<names> is the list of files "
19510 "from this directory."
19514 #: ../fish/guestfish-actions.pod:2155
19516 "This call is intended for programs that want to efficiently list a directory "
19517 "contents without making many round-trips. See also L</lxattrlist> for a "
19518 "similarly efficient call for getting extended attributes. Very long "
19519 "directory listings might cause the protocol message size to be exceeded, "
19520 "causing this call to fail. The caller must split up such requests into "
19521 "smaller groups of names."
19525 #: ../fish/guestfish-actions.pod:2163
19526 msgid "luks-add-key"
19530 #: ../fish/guestfish-actions.pod:2165
19533 " luks-add-key device keyslot\n"
19538 #: ../fish/guestfish-actions.pod:2172
19540 "Note that if C<keyslot> already contains a key, then this command will "
19541 "fail. You have to use L</luks-kill-slot> first to remove that key."
19545 #: ../fish/guestfish-actions.pod:2176 ../fish/guestfish-actions.pod:2198 ../fish/guestfish-actions.pod:2211 ../fish/guestfish-actions.pod:2225 ../fish/guestfish-actions.pod:2248 ../fish/guestfish-actions.pod:2258
19547 "This command has one or more key or passphrase parameters. Guestfish will "
19548 "prompt for these separately."
19552 #: ../fish/guestfish-actions.pod:2179
19557 #: ../fish/guestfish-actions.pod:2181
19560 " luks-close device\n"
19565 #: ../fish/guestfish-actions.pod:2183
19567 "This closes a LUKS device that was created earlier by L</luks-open> or "
19568 "L</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
19569 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
19570 "underlying block device."
19574 #: ../fish/guestfish-actions.pod:2189
19575 msgid "luks-format"
19579 #: ../fish/guestfish-actions.pod:2191
19582 " luks-format device keyslot\n"
19587 #: ../fish/guestfish-actions.pod:2204
19588 msgid "luks-format-cipher"
19592 #: ../fish/guestfish-actions.pod:2206
19595 " luks-format-cipher device keyslot cipher\n"
19600 #: ../fish/guestfish-actions.pod:2208
19602 "This command is the same as L</luks-format> but it also allows you to set "
19603 "the C<cipher> used."
19607 #: ../fish/guestfish-actions.pod:2217
19608 msgid "luks-kill-slot"
19612 #: ../fish/guestfish-actions.pod:2219
19615 " luks-kill-slot device keyslot\n"
19620 #: ../fish/guestfish-actions.pod:2228
19625 #: ../fish/guestfish-actions.pod:2230
19628 " luks-open device mapname\n"
19633 #: ../fish/guestfish-actions.pod:2244
19635 "If this block device contains LVM volume groups, then calling L</vgscan> "
19636 "followed by L</vg-activate-all> will make them visible."
19640 #: ../fish/guestfish-actions.pod:2251
19641 msgid "luks-open-ro"
19645 #: ../fish/guestfish-actions.pod:2253
19648 " luks-open-ro device mapname\n"
19653 #: ../fish/guestfish-actions.pod:2255
19655 "This is the same as L</luks-open> except that a read-only mapping is "
19660 #: ../fish/guestfish-actions.pod:2261
19665 #: ../fish/guestfish-actions.pod:2263
19668 " lvcreate logvol volgroup mbytes\n"
19673 #: ../fish/guestfish-actions.pod:2268
19674 msgid "lvm-canonical-lv-name"
19678 #: ../fish/guestfish-actions.pod:2270
19681 " lvm-canonical-lv-name lvname\n"
19686 #: ../fish/guestfish-actions.pod:2279
19687 msgid "See also L</is-lv>."
19691 #: ../fish/guestfish-actions.pod:2281
19692 msgid "lvm-clear-filter"
19696 #: ../fish/guestfish-actions.pod:2283
19699 " lvm-clear-filter\n"
19704 #: ../fish/guestfish-actions.pod:2285
19706 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
19711 #: ../fish/guestfish-actions.pod:2291
19712 msgid "lvm-remove-all"
19716 #: ../fish/guestfish-actions.pod:2293
19719 " lvm-remove-all\n"
19724 #: ../fish/guestfish-actions.pod:2301
19725 msgid "lvm-set-filter"
19729 #: ../fish/guestfish-actions.pod:2303
19732 " lvm-set-filter 'devices ...'\n"
19737 #: ../fish/guestfish-actions.pod:2328
19742 #: ../fish/guestfish-actions.pod:2330
19745 " lvremove device\n"
19750 #: ../fish/guestfish-actions.pod:2338
19755 #: ../fish/guestfish-actions.pod:2340
19758 " lvrename logvol newlogvol\n"
19763 #: ../fish/guestfish-actions.pod:2344
19768 #: ../fish/guestfish-actions.pod:2346
19771 " lvresize device mbytes\n"
19776 #: ../fish/guestfish-actions.pod:2352
19777 msgid "lvresize-free"
19781 #: ../fish/guestfish-actions.pod:2354
19784 " lvresize-free lv percent\n"
19789 #: ../fish/guestfish-actions.pod:2362
19794 #: ../fish/guestfish-actions.pod:2364
19802 #: ../fish/guestfish-actions.pod:2372
19803 msgid "See also L</lvs-full>, L</list-filesystems>."
19807 #: ../fish/guestfish-actions.pod:2374
19812 #: ../fish/guestfish-actions.pod:2376
19820 #: ../fish/guestfish-actions.pod:2381
19825 #: ../fish/guestfish-actions.pod:2383
19833 #: ../fish/guestfish-actions.pod:2387
19838 #: ../fish/guestfish-actions.pod:2389
19841 " lxattrlist path 'names ...'\n"
19846 #: ../fish/guestfish-actions.pod:2405
19848 "This call is intended for programs that want to efficiently list a directory "
19849 "contents without making many round-trips. See also L</lstatlist> for a "
19850 "similarly efficient call for getting standard stats. Very long directory "
19851 "listings might cause the protocol message size to be exceeded, causing this "
19852 "call to fail. The caller must split up such requests into smaller groups of "
19857 #: ../fish/guestfish-actions.pod:2413
19862 #: ../fish/guestfish-actions.pod:2415
19870 #: ../fish/guestfish-actions.pod:2419
19875 #: ../fish/guestfish-actions.pod:2421
19878 " mkdir-mode path mode\n"
19883 #: ../fish/guestfish-actions.pod:2430
19884 msgid "See also L</mkdir>, L</umask>"
19888 #: ../fish/guestfish-actions.pod:2432
19893 #: ../fish/guestfish-actions.pod:2434
19901 #: ../fish/guestfish-actions.pod:2439
19906 #: ../fish/guestfish-actions.pod:2441
19909 " mkdtemp template\n"
19914 #: ../fish/guestfish-actions.pod:2462
19919 #: ../fish/guestfish-actions.pod:2464
19922 " mke2fs-J fstype blocksize device journal\n"
19927 #: ../fish/guestfish-actions.pod:2472
19928 msgid "See also L</mke2journal>."
19932 #: ../fish/guestfish-actions.pod:2474
19937 #: ../fish/guestfish-actions.pod:2476
19940 " mke2fs-JL fstype blocksize device label\n"
19945 #: ../fish/guestfish-actions.pod:2481
19946 msgid "See also L</mke2journal-L>."
19950 #: ../fish/guestfish-actions.pod:2483
19955 #: ../fish/guestfish-actions.pod:2485
19958 " mke2fs-JU fstype blocksize device uuid\n"
19963 #: ../fish/guestfish-actions.pod:2490
19964 msgid "See also L</mke2journal-U>."
19968 #: ../fish/guestfish-actions.pod:2492
19969 msgid "mke2journal"
19973 #: ../fish/guestfish-actions.pod:2494
19976 " mke2journal blocksize device\n"
19981 #: ../fish/guestfish-actions.pod:2501
19982 msgid "mke2journal-L"
19986 #: ../fish/guestfish-actions.pod:2503
19989 " mke2journal-L blocksize label device\n"
19994 #: ../fish/guestfish-actions.pod:2507
19995 msgid "mke2journal-U"
19999 #: ../fish/guestfish-actions.pod:2509
20002 " mke2journal-U blocksize uuid device\n"
20007 #: ../fish/guestfish-actions.pod:2513
20012 #: ../fish/guestfish-actions.pod:2515
20015 " mkfifo mode path\n"
20020 #: ../fish/guestfish-actions.pod:2517
20022 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
20023 "is just a convenient wrapper around L</mknod>."
20027 #: ../fish/guestfish-actions.pod:2523
20032 #: ../fish/guestfish-actions.pod:2525
20035 " mkfs fstype device\n"
20040 #: ../fish/guestfish-actions.pod:2531
20045 #: ../fish/guestfish-actions.pod:2533
20048 " mkfs-b fstype blocksize device\n"
20053 #: ../fish/guestfish-actions.pod:2535
20055 "This call is similar to L</mkfs>, but it allows you to control the block "
20056 "size of the resulting filesystem. Supported block sizes depend on the "
20057 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
20061 #: ../fish/guestfish-actions.pod:2543
20062 msgid "mkmountpoint"
20066 #: ../fish/guestfish-actions.pod:2545
20069 " mkmountpoint exemptpath\n"
20074 #: ../fish/guestfish-actions.pod:2547
20076 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
20077 "to create extra mountpoints before mounting the first filesystem."
20081 #: ../fish/guestfish-actions.pod:2571
20083 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
20084 "unexpected errors if you try to mix these calls. It is safest to manually "
20085 "unmount filesystems and remove mountpoints after use."
20089 #: ../fish/guestfish-actions.pod:2575
20091 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
20092 "for this to work for manual mountpoints, you must ensure that the innermost "
20093 "mountpoints have the longest pathnames, as in the example code above."
20097 #: ../fish/guestfish-actions.pod:2582
20099 "Autosync [see L</set-autosync>, this is set by default on handles] means "
20100 "that L</umount-all> is called when the handle is closed which can also "
20101 "trigger these issues."
20105 #: ../fish/guestfish-actions.pod:2586
20110 #: ../fish/guestfish-actions.pod:2588
20113 " mknod mode devmajor devminor path\n"
20118 #: ../fish/guestfish-actions.pod:2598
20120 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
20121 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
20122 "regular file). These constants are available in the standard Linux header "
20123 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
20124 "wrappers around this command which bitwise OR in the appropriate constant "
20129 #: ../fish/guestfish-actions.pod:2608
20134 #: ../fish/guestfish-actions.pod:2610
20137 " mknod-b mode devmajor devminor path\n"
20142 #: ../fish/guestfish-actions.pod:2612
20144 "This call creates a block device node called C<path> with mode C<mode> and "
20145 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
20146 "wrapper around L</mknod>."
20150 #: ../fish/guestfish-actions.pod:2618
20155 #: ../fish/guestfish-actions.pod:2620
20158 " mknod-c mode devmajor devminor path\n"
20163 #: ../fish/guestfish-actions.pod:2622
20165 "This call creates a char device node called C<path> with mode C<mode> and "
20166 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
20167 "wrapper around L</mknod>."
20171 #: ../fish/guestfish-actions.pod:2628
20176 #: ../fish/guestfish-actions.pod:2630
20184 #: ../fish/guestfish-actions.pod:2634
20189 #: ../fish/guestfish-actions.pod:2636
20192 " mkswap-L label device\n"
20197 #: ../fish/guestfish-actions.pod:2644
20202 #: ../fish/guestfish-actions.pod:2646
20205 " mkswap-U uuid device\n"
20210 #: ../fish/guestfish-actions.pod:2650
20211 msgid "mkswap-file"
20215 #: ../fish/guestfish-actions.pod:2652
20218 " mkswap-file path\n"
20223 #: ../fish/guestfish-actions.pod:2656
20225 "This command just writes a swap file signature to an existing file. To "
20226 "create the file itself, use something like L</fallocate>."
20230 #: ../fish/guestfish-actions.pod:2659
20235 #: ../fish/guestfish-actions.pod:2661
20238 " modprobe modulename\n"
20243 #: ../fish/guestfish-actions.pod:2668
20248 #: ../fish/guestfish-actions.pod:2670
20251 " mount device mountpoint\n"
20256 #: ../fish/guestfish-actions.pod:2686
20258 "B<Important note:> When you use this call, the filesystem options C<sync> "
20259 "and C<noatime> are set implicitly. This was originally done because we "
20260 "thought it would improve reliability, but it turns out that I<-o sync> has a "
20261 "very large negative performance impact and negligible effect on "
20262 "reliability. Therefore we recommend that you avoid using L</mount> in any "
20263 "code that needs performance, and instead use L</mount-options> (use an empty "
20264 "string for the first parameter if you don't want any options)."
20268 #: ../fish/guestfish-actions.pod:2696
20273 #: ../fish/guestfish-actions.pod:2698
20276 " mount-loop file mountpoint\n"
20281 #: ../fish/guestfish-actions.pod:2704
20282 msgid "mount-options"
20286 #: ../fish/guestfish-actions.pod:2706
20289 " mount-options options device mountpoint\n"
20294 #: ../fish/guestfish-actions.pod:2708
20296 "This is the same as the L</mount> command, but it allows you to set the "
20297 "mount options as for the L<mount(8)> I<-o> flag."
20301 #: ../fish/guestfish-actions.pod:2716
20306 #: ../fish/guestfish-actions.pod:2718
20309 " mount-ro device mountpoint\n"
20314 #: ../fish/guestfish-actions.pod:2720
20316 "This is the same as the L</mount> command, but it mounts the filesystem with "
20317 "the read-only (I<-o ro>) flag."
20321 #: ../fish/guestfish-actions.pod:2723
20326 #: ../fish/guestfish-actions.pod:2725
20329 " mount-vfs options vfstype device mountpoint\n"
20334 #: ../fish/guestfish-actions.pod:2727
20336 "This is the same as the L</mount> command, but it allows you to set both the "
20337 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
20341 #: ../fish/guestfish-actions.pod:2731
20342 msgid "mountpoints"
20346 #: ../fish/guestfish-actions.pod:2733
20354 #: ../fish/guestfish-actions.pod:2735
20356 "This call is similar to L</mounts>. That call returns a list of devices. "
20357 "This one returns a hash table (map) of device name to directory where the "
20358 "device is mounted."
20362 #: ../fish/guestfish-actions.pod:2739
20367 #: ../fish/guestfish-actions.pod:2741
20375 #: ../fish/guestfish-actions.pod:2748
20376 msgid "See also: L</mountpoints>"
20380 #: ../fish/guestfish-actions.pod:2750
20385 #: ../fish/guestfish-actions.pod:2752
20393 #: ../fish/guestfish-actions.pod:2757
20394 msgid "ntfs-3g-probe"
20398 #: ../fish/guestfish-actions.pod:2759
20401 " ntfs-3g-probe true|false device\n"
20406 #: ../fish/guestfish-actions.pod:2773
20411 #: ../fish/guestfish-actions.pod:2775
20414 " ntfsresize device\n"
20419 #: ../fish/guestfish-actions.pod:2781
20420 msgid "ntfsresize-size"
20424 #: ../fish/guestfish-actions.pod:2783
20427 " ntfsresize-size device size\n"
20432 #: ../fish/guestfish-actions.pod:2785
20434 "This command is the same as L</ntfsresize> except that it allows you to "
20435 "specify the new size (in bytes) explicitly."
20439 #: ../fish/guestfish-actions.pod:2788
20444 #: ../fish/guestfish-actions.pod:2790
20447 " part-add device prlogex startsect endsect\n"
20452 #: ../fish/guestfish-actions.pod:2792
20454 "This command adds a partition to C<device>. If there is no partition table "
20455 "on the device, call L</part-init> first."
20459 #: ../fish/guestfish-actions.pod:2804
20461 "Creating a partition which covers the whole disk is not so easy. Use "
20462 "L</part-disk> to do that."
20466 #: ../fish/guestfish-actions.pod:2807
20471 #: ../fish/guestfish-actions.pod:2809
20474 " part-del device partnum\n"
20479 #: ../fish/guestfish-actions.pod:2817
20484 #: ../fish/guestfish-actions.pod:2819
20487 " part-disk device parttype\n"
20492 #: ../fish/guestfish-actions.pod:2821
20494 "This command is simply a combination of L</part-init> followed by "
20495 "L</part-add> to create a single primary partition covering the whole disk."
20499 #: ../fish/guestfish-actions.pod:2825
20501 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
20502 "possible values are described in L</part-init>."
20506 #: ../fish/guestfish-actions.pod:2831
20507 msgid "part-get-bootable"
20511 #: ../fish/guestfish-actions.pod:2833
20514 " part-get-bootable device partnum\n"
20519 #: ../fish/guestfish-actions.pod:2838
20520 msgid "See also L</part-set-bootable>."
20524 #: ../fish/guestfish-actions.pod:2840
20525 msgid "part-get-mbr-id"
20529 #: ../fish/guestfish-actions.pod:2842
20532 " part-get-mbr-id device partnum\n"
20537 #: ../fish/guestfish-actions.pod:2847 ../fish/guestfish-actions.pod:2985
20539 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
20540 "undefined results for other partition table types (see "
20541 "L</part-get-parttype>)."
20545 #: ../fish/guestfish-actions.pod:2851
20546 msgid "part-get-parttype"
20550 #: ../fish/guestfish-actions.pod:2853
20553 " part-get-parttype device\n"
20558 #: ../fish/guestfish-actions.pod:2858
20560 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
20561 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
20562 "possible, although unusual. See L</part-init> for a full list."
20566 #: ../fish/guestfish-actions.pod:2863
20571 #: ../fish/guestfish-actions.pod:2865
20574 " part-init device parttype\n"
20579 #: ../fish/guestfish-actions.pod:2871
20581 "Initially there are no partitions. Following this, you should call "
20582 "L</part-add> for each partition required."
20586 #: ../fish/guestfish-actions.pod:2934
20591 #: ../fish/guestfish-actions.pod:2936
20594 " part-list device\n"
20599 #: ../fish/guestfish-actions.pod:2951
20601 "Start of the partition I<in bytes>. To get sectors you have to divide by "
20602 "the device's sector size, see L</blockdev-getss>."
20606 #: ../fish/guestfish-actions.pod:2964
20607 msgid "part-set-bootable"
20611 #: ../fish/guestfish-actions.pod:2966
20614 " part-set-bootable device partnum true|false\n"
20619 #: ../fish/guestfish-actions.pod:2975
20620 msgid "part-set-mbr-id"
20624 #: ../fish/guestfish-actions.pod:2977
20627 " part-set-mbr-id device partnum idbyte\n"
20632 #: ../fish/guestfish-actions.pod:2989
20633 msgid "part-set-name"
20637 #: ../fish/guestfish-actions.pod:2991
20640 " part-set-name device partnum name\n"
20645 #: ../fish/guestfish-actions.pod:2999
20646 msgid "part-to-dev"
20650 #: ../fish/guestfish-actions.pod:3001
20653 " part-to-dev partition\n"
20658 #: ../fish/guestfish-actions.pod:3007
20660 "The named partition must exist, for example as a string returned from "
20661 "L</list-partitions>."
20665 #: ../fish/guestfish-actions.pod:3010
20666 msgid "ping-daemon"
20670 #: ../fish/guestfish-actions.pod:3012
20678 #: ../fish/guestfish-actions.pod:3019
20683 #: ../fish/guestfish-actions.pod:3021
20686 " pread path count offset\n"
20691 #: ../fish/guestfish-actions.pod:3029
20692 msgid "See also L</pwrite>, L</pread-device>."
20696 #: ../fish/guestfish-actions.pod:3034
20697 msgid "pread-device"
20701 #: ../fish/guestfish-actions.pod:3036
20704 " pread-device device count offset\n"
20709 #: ../fish/guestfish-actions.pod:3044
20710 msgid "See also L</pread>."
20714 #: ../fish/guestfish-actions.pod:3049
20719 #: ../fish/guestfish-actions.pod:3051
20722 " pvcreate device\n"
20727 #: ../fish/guestfish-actions.pod:3057
20732 #: ../fish/guestfish-actions.pod:3059
20735 " pvremove device\n"
20740 #: ../fish/guestfish-actions.pod:3068
20745 #: ../fish/guestfish-actions.pod:3070
20748 " pvresize device\n"
20753 #: ../fish/guestfish-actions.pod:3075
20754 msgid "pvresize-size"
20758 #: ../fish/guestfish-actions.pod:3077
20761 " pvresize-size device size\n"
20766 #: ../fish/guestfish-actions.pod:3079
20768 "This command is the same as L</pvresize> except that it allows you to "
20769 "specify the new size (in bytes) explicitly."
20773 #: ../fish/guestfish-actions.pod:3082
20778 #: ../fish/guestfish-actions.pod:3084
20786 #: ../fish/guestfish-actions.pod:3092
20787 msgid "See also L</pvs-full>."
20791 #: ../fish/guestfish-actions.pod:3094
20796 #: ../fish/guestfish-actions.pod:3096
20804 #: ../fish/guestfish-actions.pod:3101
20809 #: ../fish/guestfish-actions.pod:3103
20817 #: ../fish/guestfish-actions.pod:3107
20822 #: ../fish/guestfish-actions.pod:3109
20825 " pwrite path content offset\n"
20830 #: ../fish/guestfish-actions.pod:3120
20831 msgid "See also L</pread>, L</pwrite-device>."
20835 #: ../fish/guestfish-actions.pod:3125
20836 msgid "pwrite-device"
20840 #: ../fish/guestfish-actions.pod:3127
20843 " pwrite-device device content offset\n"
20848 #: ../fish/guestfish-actions.pod:3137
20849 msgid "See also L</pwrite>."
20853 #: ../fish/guestfish-actions.pod:3142
20858 #: ../fish/guestfish-actions.pod:3144
20861 " read-file path\n"
20866 #: ../fish/guestfish-actions.pod:3149
20868 "Unlike L</cat>, this function can correctly handle files that contain "
20869 "embedded ASCII NUL characters. However unlike L</download>, this function "
20870 "is limited in the total size of file that can be handled."
20874 #: ../fish/guestfish-actions.pod:3157
20879 #: ../fish/guestfish-actions.pod:3159
20882 " read-lines path\n"
20887 #: ../fish/guestfish-actions.pod:3166
20889 "Note that this function cannot correctly handle binary files (specifically, "
20890 "files containing C<\\0> character which is treated as end of line). For "
20891 "those you need to use the L</read-file> function which has a more complex "
20896 #: ../fish/guestfish-actions.pod:3171
20901 #: ../fish/guestfish-actions.pod:3173
20909 #: ../fish/guestfish-actions.pod:3225
20911 "This function is primarily intended for use by programs. To get a simple "
20912 "list of names, use L</ls>. To get a printable directory for human "
20913 "consumption, use L</ll>."
20917 #: ../fish/guestfish-actions.pod:3229
20922 #: ../fish/guestfish-actions.pod:3231
20930 #: ../fish/guestfish-actions.pod:3235
20931 msgid "readlinklist"
20935 #: ../fish/guestfish-actions.pod:3237
20938 " readlinklist path 'names ...'\n"
20943 #: ../fish/guestfish-actions.pod:3261
20948 #: ../fish/guestfish-actions.pod:3263
20956 #: ../fish/guestfish-actions.pod:3268
20957 msgid "removexattr"
20961 #: ../fish/guestfish-actions.pod:3270
20964 " removexattr xattr path\n"
20969 #: ../fish/guestfish-actions.pod:3275
20970 msgid "See also: L</lremovexattr>, L<attr(5)>."
20974 #: ../fish/guestfish-actions.pod:3277
20979 #: ../fish/guestfish-actions.pod:3279
20982 " resize2fs device\n"
20987 #: ../fish/guestfish-actions.pod:3284
20989 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
20990 "before calling this command. For unknown reasons C<resize2fs> sometimes "
20991 "gives an error about this and sometimes not. In any case, it is always safe "
20992 "to call L</e2fsck-f> before calling this function."
20996 #: ../fish/guestfish-actions.pod:3290
20997 msgid "resize2fs-size"
21001 #: ../fish/guestfish-actions.pod:3292
21004 " resize2fs-size device size\n"
21009 #: ../fish/guestfish-actions.pod:3294
21011 "This command is the same as L</resize2fs> except that it allows you to "
21012 "specify the new size (in bytes) explicitly."
21016 #: ../fish/guestfish-actions.pod:3297
21021 #: ../fish/guestfish-actions.pod:3299
21029 #: ../fish/guestfish-actions.pod:3303
21034 #: ../fish/guestfish-actions.pod:3305
21042 #: ../fish/guestfish-actions.pod:3311
21047 #: ../fish/guestfish-actions.pod:3313
21055 #: ../fish/guestfish-actions.pod:3317
21056 msgid "rmmountpoint"
21060 #: ../fish/guestfish-actions.pod:3319
21063 " rmmountpoint exemptpath\n"
21068 #: ../fish/guestfish-actions.pod:3321
21070 "This calls removes a mountpoint that was previously created with "
21071 "L</mkmountpoint>. See L</mkmountpoint> for full details."
21075 #: ../fish/guestfish-actions.pod:3325
21076 msgid "scrub-device"
21080 #: ../fish/guestfish-actions.pod:3327
21083 " scrub-device device\n"
21088 #: ../fish/guestfish-actions.pod:3338
21093 #: ../fish/guestfish-actions.pod:3340
21096 " scrub-file file\n"
21101 #: ../fish/guestfish-actions.pod:3350
21102 msgid "scrub-freespace"
21106 #: ../fish/guestfish-actions.pod:3352
21109 " scrub-freespace dir\n"
21114 #: ../fish/guestfish-actions.pod:3354
21116 "This command creates the directory C<dir> and then fills it with files until "
21117 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
21118 "deletes them. The intention is to scrub any free space on the partition "
21119 "containing C<dir>."
21123 #: ../fish/guestfish-actions.pod:3363
21128 #: ../fish/guestfish-actions.pod:3365
21133 #: ../fish/guestfish-actions.pod:3367
21136 " set-append append\n"
21141 #: ../fish/guestfish-actions.pod:3378
21142 msgid "set-autosync"
21146 #: ../fish/guestfish-actions.pod:3380
21151 #: ../fish/guestfish-actions.pod:3382
21154 " set-autosync true|false\n"
21159 #: ../fish/guestfish-actions.pod:3384
21161 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
21162 "effort attempt to run L</umount-all> followed by L</sync> when the handle is "
21163 "closed (also if the program exits without closing handles)."
21167 #: ../fish/guestfish-actions.pod:3392
21172 #: ../fish/guestfish-actions.pod:3394
21177 #: ../fish/guestfish-actions.pod:3396
21180 " set-direct true|false\n"
21185 #: ../fish/guestfish-actions.pod:3402
21187 "One consequence of this is that log messages aren't caught by the library "
21188 "and handled by L</set-log-message-callback>, but go straight to stdout."
21192 #: ../fish/guestfish-actions.pod:3411
21193 msgid "set-e2label"
21197 #: ../fish/guestfish-actions.pod:3413
21200 " set-e2label device label\n"
21205 #: ../fish/guestfish-actions.pod:3419
21207 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
21208 "label on a filesystem."
21212 #: ../fish/guestfish-actions.pod:3422
21217 #: ../fish/guestfish-actions.pod:3424
21220 " set-e2uuid device uuid\n"
21225 #: ../fish/guestfish-actions.pod:3431
21227 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
21228 "UUID of a filesystem."
21232 #: ../fish/guestfish-actions.pod:3434
21233 msgid "set-memsize"
21237 #: ../fish/guestfish-actions.pod:3436
21242 #: ../fish/guestfish-actions.pod:3438
21245 " set-memsize memsize\n"
21250 #: ../fish/guestfish-actions.pod:3440
21252 "This sets the memory size in megabytes allocated to the qemu subprocess. "
21253 "This only has any effect if called before L</launch>."
21257 #: ../fish/guestfish-actions.pod:3451
21258 msgid "set-network"
21262 #: ../fish/guestfish-actions.pod:3453
21267 #: ../fish/guestfish-actions.pod:3455
21270 " set-network true|false\n"
21275 #: ../fish/guestfish-actions.pod:3463
21276 msgid "You must call this before calling L</launch>, otherwise it has no effect."
21280 #: ../fish/guestfish-actions.pod:3466
21285 #: ../fish/guestfish-actions.pod:3468
21290 #: ../fish/guestfish-actions.pod:3470
21293 " set-path searchpath\n"
21298 #: ../fish/guestfish-actions.pod:3479
21303 #: ../fish/guestfish-actions.pod:3481
21308 #: ../fish/guestfish-actions.pod:3483
21316 #: ../fish/guestfish-actions.pod:3503
21317 msgid "set-recovery-proc"
21321 #: ../fish/guestfish-actions.pod:3505
21322 msgid "recovery-proc"
21326 #: ../fish/guestfish-actions.pod:3507
21329 " set-recovery-proc true|false\n"
21334 #: ../fish/guestfish-actions.pod:3509
21336 "If this is called with the parameter C<false> then L</launch> does not "
21337 "create a recovery process. The purpose of the recovery process is to stop "
21338 "runaway qemu processes in the case where the main program aborts abruptly."
21342 #: ../fish/guestfish-actions.pod:3514
21344 "This only has any effect if called before L</launch>, and the default is "
21349 #: ../fish/guestfish-actions.pod:3523
21350 msgid "set-selinux"
21354 #: ../fish/guestfish-actions.pod:3525
21359 #: ../fish/guestfish-actions.pod:3527
21362 " set-selinux true|false\n"
21367 #: ../fish/guestfish-actions.pod:3538
21372 #: ../fish/guestfish-actions.pod:3540
21377 #: ../fish/guestfish-actions.pod:3542
21380 " set-trace true|false\n"
21385 #: ../fish/guestfish-actions.pod:3558
21386 msgid "set-verbose"
21390 #: ../fish/guestfish-actions.pod:3560
21395 #: ../fish/guestfish-actions.pod:3562
21398 " set-verbose true|false\n"
21403 #: ../fish/guestfish-actions.pod:3569
21408 #: ../fish/guestfish-actions.pod:3571
21411 " setcon context\n"
21416 #: ../fish/guestfish-actions.pod:3578
21421 #: ../fish/guestfish-actions.pod:3580
21424 " setxattr xattr val vallen path\n"
21429 #: ../fish/guestfish-actions.pod:3586
21430 msgid "See also: L</lsetxattr>, L<attr(5)>."
21434 #: ../fish/guestfish-actions.pod:3588
21439 #: ../fish/guestfish-actions.pod:3590
21442 " sfdisk device cyls heads sectors 'lines ...'\n"
21447 #: ../fish/guestfish-actions.pod:3612
21448 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
21452 #: ../fish/guestfish-actions.pod:3618
21457 #: ../fish/guestfish-actions.pod:3620
21460 " sfdiskM device 'lines ...'\n"
21465 #: ../fish/guestfish-actions.pod:3622
21467 "This is a simplified interface to the L</sfdisk> command, where partition "
21468 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
21469 "you don't need to specify the cyls, heads and sectors parameters which were "
21470 "rarely if ever used anyway."
21474 #: ../fish/guestfish-actions.pod:3628
21475 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
21479 #: ../fish/guestfish-actions.pod:3634
21484 #: ../fish/guestfish-actions.pod:3636
21487 " sfdisk-N device partnum cyls heads sectors line\n"
21492 #: ../fish/guestfish-actions.pod:3641
21494 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
21495 "cyls/heads/sectors parameters."
21499 #: ../fish/guestfish-actions.pod:3644
21500 msgid "See also: L</part-add>"
21504 #: ../fish/guestfish-actions.pod:3649
21505 msgid "sfdisk-disk-geometry"
21509 #: ../fish/guestfish-actions.pod:3651
21512 " sfdisk-disk-geometry device\n"
21517 #: ../fish/guestfish-actions.pod:3653
21519 "This displays the disk geometry of C<device> read from the partition table. "
21520 "Especially in the case where the underlying block device has been resized, "
21521 "this can be different from the kernel's idea of the geometry (see "
21522 "L</sfdisk-kernel-geometry>)."
21526 #: ../fish/guestfish-actions.pod:3661
21527 msgid "sfdisk-kernel-geometry"
21531 #: ../fish/guestfish-actions.pod:3663
21534 " sfdisk-kernel-geometry device\n"
21539 #: ../fish/guestfish-actions.pod:3670
21544 #: ../fish/guestfish-actions.pod:3672
21547 " sfdisk-l device\n"
21552 #: ../fish/guestfish-actions.pod:3678
21553 msgid "See also: L</part-list>"
21557 #: ../fish/guestfish-actions.pod:3680
21562 #: ../fish/guestfish-actions.pod:3682
21570 #: ../fish/guestfish-actions.pod:3687
21571 msgid "This is like L</command>, but passes the command to:"
21575 #: ../fish/guestfish-actions.pod:3695
21576 msgid "All the provisos about L</command> apply to this call."
21580 #: ../fish/guestfish-actions.pod:3697
21585 #: ../fish/guestfish-actions.pod:3699
21588 " sh-lines command\n"
21593 #: ../fish/guestfish-actions.pod:3701
21594 msgid "This is the same as L</sh>, but splits the result into a list of lines."
21598 #: ../fish/guestfish-actions.pod:3704
21599 msgid "See also: L</command-lines>"
21603 #: ../fish/guestfish-actions.pod:3706
21608 #: ../fish/guestfish-actions.pod:3708
21616 #: ../fish/guestfish-actions.pod:3712
21621 #: ../fish/guestfish-actions.pod:3714
21629 #: ../fish/guestfish-actions.pod:3720
21634 #: ../fish/guestfish-actions.pod:3722
21642 #: ../fish/guestfish-actions.pod:3730
21647 #: ../fish/guestfish-actions.pod:3732
21655 #: ../fish/guestfish-actions.pod:3740
21660 #: ../fish/guestfish-actions.pod:3742
21663 " strings-e encoding path\n"
21668 #: ../fish/guestfish-actions.pod:3744
21670 "This is like the L</strings> command, but allows you to specify the encoding "
21671 "of strings that are looked for in the source file C<path>."
21675 #: ../fish/guestfish-actions.pod:3754
21677 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
21678 "ISO-8859-X (this is what L</strings> uses)."
21682 #: ../fish/guestfish-actions.pod:3786
21683 msgid "swapoff-device"
21687 #: ../fish/guestfish-actions.pod:3788
21690 " swapoff-device device\n"
21695 #: ../fish/guestfish-actions.pod:3790
21697 "This command disables the libguestfs appliance swap device or partition "
21698 "named C<device>. See L</swapon-device>."
21702 #: ../fish/guestfish-actions.pod:3794
21703 msgid "swapoff-file"
21707 #: ../fish/guestfish-actions.pod:3796
21710 " swapoff-file file\n"
21715 #: ../fish/guestfish-actions.pod:3800
21716 msgid "swapoff-label"
21720 #: ../fish/guestfish-actions.pod:3802
21723 " swapoff-label label\n"
21728 #: ../fish/guestfish-actions.pod:3807
21729 msgid "swapoff-uuid"
21733 #: ../fish/guestfish-actions.pod:3809
21736 " swapoff-uuid uuid\n"
21741 #: ../fish/guestfish-actions.pod:3814
21742 msgid "swapon-device"
21746 #: ../fish/guestfish-actions.pod:3816
21749 " swapon-device device\n"
21754 #: ../fish/guestfish-actions.pod:3818
21756 "This command enables the libguestfs appliance to use the swap device or "
21757 "partition named C<device>. The increased memory is made available for all "
21758 "commands, for example those run using L</command> or L</sh>."
21762 #: ../fish/guestfish-actions.pod:3830
21763 msgid "swapon-file"
21767 #: ../fish/guestfish-actions.pod:3832
21770 " swapon-file file\n"
21775 #: ../fish/guestfish-actions.pod:3834
21776 msgid "This command enables swap to a file. See L</swapon-device> for other notes."
21780 #: ../fish/guestfish-actions.pod:3837
21781 msgid "swapon-label"
21785 #: ../fish/guestfish-actions.pod:3839
21788 " swapon-label label\n"
21793 #: ../fish/guestfish-actions.pod:3841
21795 "This command enables swap to a labeled swap partition. See "
21796 "L</swapon-device> for other notes."
21800 #: ../fish/guestfish-actions.pod:3844
21801 msgid "swapon-uuid"
21805 #: ../fish/guestfish-actions.pod:3846
21808 " swapon-uuid uuid\n"
21813 #: ../fish/guestfish-actions.pod:3848
21815 "This command enables swap to a swap partition with the given UUID. See "
21816 "L</swapon-device> for other notes."
21820 #: ../fish/guestfish-actions.pod:3851
21825 #: ../fish/guestfish-actions.pod:3853
21833 #: ../fish/guestfish-actions.pod:3861
21838 #: ../fish/guestfish-actions.pod:3863
21846 #: ../fish/guestfish-actions.pod:3871
21851 #: ../fish/guestfish-actions.pod:3873
21854 " tail-n nrlines path\n"
21859 #: ../fish/guestfish-actions.pod:3886
21864 #: ../fish/guestfish-actions.pod:3888
21867 " tar-in (tarfile|-) directory\n"
21872 #: ../fish/guestfish-actions.pod:3893
21873 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
21877 #: ../fish/guestfish-actions.pod:3898
21882 #: ../fish/guestfish-actions.pod:3900
21885 " tar-out directory (tarfile|-)\n"
21890 #: ../fish/guestfish-actions.pod:3905
21891 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
21895 #: ../fish/guestfish-actions.pod:3910
21900 #: ../fish/guestfish-actions.pod:3912
21903 " tgz-in (tarball|-) directory\n"
21908 #: ../fish/guestfish-actions.pod:3917
21909 msgid "To upload an uncompressed tarball, use L</tar-in>."
21913 #: ../fish/guestfish-actions.pod:3921
21918 #: ../fish/guestfish-actions.pod:3923
21921 " tgz-out directory (tarball|-)\n"
21926 #: ../fish/guestfish-actions.pod:3928
21927 msgid "To download an uncompressed tarball, use L</tar-out>."
21931 #: ../fish/guestfish-actions.pod:3932
21936 #: ../fish/guestfish-actions.pod:3934
21944 #: ../fish/guestfish-actions.pod:3943
21949 #: ../fish/guestfish-actions.pod:3945
21957 #: ../fish/guestfish-actions.pod:3950
21958 msgid "truncate-size"
21962 #: ../fish/guestfish-actions.pod:3952
21965 " truncate-size path size\n"
21970 #: ../fish/guestfish-actions.pod:3957
21972 "If the current file size is less than C<size> then the file is extended to "
21973 "the required size with zero bytes. This creates a sparse file (ie. disk "
21974 "blocks are not allocated for the file until you write to it). To create a "
21975 "non-sparse file of zeroes, use L</fallocate64> instead."
21979 #: ../fish/guestfish-actions.pod:3963
21984 #: ../fish/guestfish-actions.pod:3965
21987 " tune2fs-l device\n"
21992 #: ../fish/guestfish-actions.pod:3975
21997 #: ../fish/guestfish-actions.pod:3977
22000 " txz-in (tarball|-) directory\n"
22005 #: ../fish/guestfish-actions.pod:3984
22010 #: ../fish/guestfish-actions.pod:3986
22013 " txz-out directory (tarball|-)\n"
22018 #: ../fish/guestfish-actions.pod:3993
22023 #: ../fish/guestfish-actions.pod:3995
22031 #: ../fish/guestfish-actions.pod:4009
22032 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
22036 #: ../fish/guestfish-actions.pod:4014
22041 #: ../fish/guestfish-actions.pod:4016
22046 #: ../fish/guestfish-actions.pod:4018
22049 " umount pathordevice\n"
22054 #: ../fish/guestfish-actions.pod:4024
22059 #: ../fish/guestfish-actions.pod:4026
22060 msgid "unmount-all"
22064 #: ../fish/guestfish-actions.pod:4028
22072 #: ../fish/guestfish-actions.pod:4034
22077 #: ../fish/guestfish-actions.pod:4036
22080 " upload (filename|-) remotefilename\n"
22085 #: ../fish/guestfish-actions.pod:4043
22086 msgid "See also L</download>."
22090 #: ../fish/guestfish-actions.pod:4047
22091 msgid "upload-offset"
22095 #: ../fish/guestfish-actions.pod:4049
22098 " upload-offset (filename|-) remotefilename offset\n"
22103 #: ../fish/guestfish-actions.pod:4061
22105 "Note that there is no limit on the amount of data that can be uploaded with "
22106 "this call, unlike with L</pwrite>, and this call always writes the full "
22107 "amount unless an error occurs."
22111 #: ../fish/guestfish-actions.pod:4066
22112 msgid "See also L</upload>, L</pwrite>."
22116 #: ../fish/guestfish-actions.pod:4070
22121 #: ../fish/guestfish-actions.pod:4072
22124 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
22129 #: ../fish/guestfish-actions.pod:4091
22134 #: ../fish/guestfish-actions.pod:4093
22142 #: ../fish/guestfish-actions.pod:4120
22144 "I<Note:> Don't use this call to test for availability of features. In "
22145 "enterprise distributions we backport features from later versions into "
22146 "earlier versions, making this an unreliable way to test for features. Use "
22147 "L</available> instead."
22151 #: ../fish/guestfish-actions.pod:4126
22156 #: ../fish/guestfish-actions.pod:4128
22159 " vfs-label device\n"
22164 #: ../fish/guestfish-actions.pod:4135
22165 msgid "To find a filesystem from the label, use L</findfs-label>."
22169 #: ../fish/guestfish-actions.pod:4137
22174 #: ../fish/guestfish-actions.pod:4139
22177 " vfs-type device\n"
22182 #: ../fish/guestfish-actions.pod:4149
22187 #: ../fish/guestfish-actions.pod:4151
22190 " vfs-uuid device\n"
22195 #: ../fish/guestfish-actions.pod:4158
22196 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
22200 #: ../fish/guestfish-actions.pod:4160
22201 msgid "vg-activate"
22205 #: ../fish/guestfish-actions.pod:4162
22208 " vg-activate true|false 'volgroups ...'\n"
22213 #: ../fish/guestfish-actions.pod:4175
22214 msgid "vg-activate-all"
22218 #: ../fish/guestfish-actions.pod:4177
22221 " vg-activate-all true|false\n"
22226 #: ../fish/guestfish-actions.pod:4187
22231 #: ../fish/guestfish-actions.pod:4189
22234 " vgcreate volgroup 'physvols ...'\n"
22239 #: ../fish/guestfish-actions.pod:4194
22244 #: ../fish/guestfish-actions.pod:4196
22247 " vglvuuids vgname\n"
22252 #: ../fish/guestfish-actions.pod:4201
22254 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
22255 "logical volumes and volume groups."
22259 #: ../fish/guestfish-actions.pod:4204
22260 msgid "See also L</vgpvuuids>."
22264 #: ../fish/guestfish-actions.pod:4206
22269 #: ../fish/guestfish-actions.pod:4208
22272 " vgpvuuids vgname\n"
22277 #: ../fish/guestfish-actions.pod:4213
22279 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
22280 "physical volumes and volume groups."
22284 #: ../fish/guestfish-actions.pod:4216
22285 msgid "See also L</vglvuuids>."
22289 #: ../fish/guestfish-actions.pod:4218
22294 #: ../fish/guestfish-actions.pod:4220
22297 " vgremove vgname\n"
22302 #: ../fish/guestfish-actions.pod:4227
22307 #: ../fish/guestfish-actions.pod:4229
22310 " vgrename volgroup newvolgroup\n"
22315 #: ../fish/guestfish-actions.pod:4233
22320 #: ../fish/guestfish-actions.pod:4235
22328 #: ../fish/guestfish-actions.pod:4243
22329 msgid "See also L</vgs-full>."
22333 #: ../fish/guestfish-actions.pod:4245
22338 #: ../fish/guestfish-actions.pod:4247
22346 #: ../fish/guestfish-actions.pod:4252
22351 #: ../fish/guestfish-actions.pod:4254
22359 #: ../fish/guestfish-actions.pod:4259
22364 #: ../fish/guestfish-actions.pod:4261
22372 #: ../fish/guestfish-actions.pod:4265
22377 #: ../fish/guestfish-actions.pod:4267
22385 #: ../fish/guestfish-actions.pod:4272
22390 #: ../fish/guestfish-actions.pod:4274
22398 #: ../fish/guestfish-actions.pod:4279
22403 #: ../fish/guestfish-actions.pod:4281
22411 #: ../fish/guestfish-actions.pod:4286
22416 #: ../fish/guestfish-actions.pod:4288
22419 " write path content\n"
22424 #: ../fish/guestfish-actions.pod:4296
22429 #: ../fish/guestfish-actions.pod:4298
22432 " write-file path content size\n"
22437 #: ../fish/guestfish-actions.pod:4321
22442 #: ../fish/guestfish-actions.pod:4323
22445 " zegrep regex path\n"
22450 #: ../fish/guestfish-actions.pod:4331
22455 #: ../fish/guestfish-actions.pod:4333
22458 " zegrepi regex path\n"
22463 #: ../fish/guestfish-actions.pod:4341
22468 #: ../fish/guestfish-actions.pod:4343
22476 #: ../fish/guestfish-actions.pod:4351
22477 msgid "See also: L</zero-device>, L</scrub-device>."
22481 #: ../fish/guestfish-actions.pod:4353
22482 msgid "zero-device"
22486 #: ../fish/guestfish-actions.pod:4355
22489 " zero-device device\n"
22494 #: ../fish/guestfish-actions.pod:4357
22496 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
22497 "which just zeroes the first few blocks of a device."
22501 #: ../fish/guestfish-actions.pod:4364
22506 #: ../fish/guestfish-actions.pod:4366
22509 " zerofree device\n"
22514 #: ../fish/guestfish-actions.pod:4379
22519 #: ../fish/guestfish-actions.pod:4381
22522 " zfgrep pattern path\n"
22527 #: ../fish/guestfish-actions.pod:4389
22532 #: ../fish/guestfish-actions.pod:4391
22535 " zfgrepi pattern path\n"
22540 #: ../fish/guestfish-actions.pod:4399
22545 #: ../fish/guestfish-actions.pod:4401
22548 " zfile meth path\n"
22553 #: ../fish/guestfish-actions.pod:4408
22554 msgid "Since 1.0.63, use L</file> instead which can now process compressed files."
22558 #: ../fish/guestfish-actions.pod:4418
22563 #: ../fish/guestfish-actions.pod:4420
22566 " zgrep regex path\n"
22571 #: ../fish/guestfish-actions.pod:4428
22576 #: ../fish/guestfish-actions.pod:4430
22579 " zgrepi regex path\n"
22584 #: ../fish/guestfish-commands.pod:1
22589 #: ../fish/guestfish-commands.pod:3
22594 #: ../fish/guestfish-commands.pod:5
22597 " alloc filename size\n"
22602 #: ../fish/guestfish-commands.pod:7
22604 "This creates an empty (zeroed) file of the given size, and then adds so it "
22605 "can be further examined."
22609 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
22610 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
22614 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
22615 msgid "Size can be specified using standard suffixes, eg. C<1M>."
22619 #: ../fish/guestfish-commands.pod:14
22621 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
22622 "image, see L</PREPARED DISK IMAGES>."
22626 #: ../fish/guestfish-commands.pod:17
22631 #: ../fish/guestfish-commands.pod:19
22634 " copy-in local [local ...] /remotedir\n"
22639 #: ../fish/guestfish-commands.pod:21
22641 "C<copy-in> copies local files or directories recursively into the disk "
22642 "image, placing them in the directory called C</remotedir> (which must "
22643 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
22644 "other commands as necessary."
22648 #: ../fish/guestfish-commands.pod:26
22650 "Multiple local files and directories can be specified, but the last "
22651 "parameter must always be a remote directory. Wildcards cannot be used."
22655 #: ../fish/guestfish-commands.pod:30
22660 #: ../fish/guestfish-commands.pod:32
22663 " copy-out remote [remote ...] localdir\n"
22668 #: ../fish/guestfish-commands.pod:34
22670 "C<copy-out> copies remote files or directories recursively out of the disk "
22671 "image, placing them on the host disk in a local directory called C<localdir> "
22672 "(which must exist). This guestfish meta-command turns into a sequence of "
22673 "L</download>, L</tar-out> and other commands as necessary."
22677 #: ../fish/guestfish-commands.pod:40
22679 "Multiple remote files and directories can be specified, but the last "
22680 "parameter must always be a local directory. To download to the current "
22681 "directory, use C<.> as in:"
22685 #: ../fish/guestfish-commands.pod:44
22688 " copy-out /home .\n"
22693 #: ../fish/guestfish-commands.pod:46
22695 "Wildcards cannot be used in the ordinary command, but you can use them with "
22696 "the help of L</glob> like this:"
22700 #: ../fish/guestfish-commands.pod:49
22703 " glob copy-out /home/* .\n"
22708 #: ../fish/guestfish-commands.pod:51
22713 #: ../fish/guestfish-commands.pod:53
22716 " echo [params ...]\n"
22721 #: ../fish/guestfish-commands.pod:55
22722 msgid "This echos the parameters to the terminal."
22726 #: ../fish/guestfish-commands.pod:57
22731 #: ../fish/guestfish-commands.pod:59
22736 #: ../fish/guestfish-commands.pod:61
22741 #: ../fish/guestfish-commands.pod:63
22749 #: ../fish/guestfish-commands.pod:65
22751 "This is used to edit a file. It downloads the file, edits it locally using "
22752 "your editor, then uploads the result."
22756 #: ../fish/guestfish-commands.pod:68
22758 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
22759 "or C<emacs> you will get those corresponding editors."
22763 #: ../fish/guestfish-commands.pod:72
22768 #: ../fish/guestfish-commands.pod:74
22771 " glob command args...\n"
22776 #: ../fish/guestfish-commands.pod:76
22778 "Expand wildcards in any paths in the args list, and run C<command> "
22779 "repeatedly on each matching path."
22783 #: ../fish/guestfish-commands.pod:79
22784 msgid "See L</WILDCARDS AND GLOBBING>."
22788 #: ../fish/guestfish-commands.pod:81
22793 #: ../fish/guestfish-commands.pod:83
22796 " hexedit <filename|device>\n"
22797 " hexedit <filename|device> <max>\n"
22798 " hexedit <filename|device> <start> <max>\n"
22803 #: ../fish/guestfish-commands.pod:87
22805 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
22810 #: ../fish/guestfish-commands.pod:90
22812 "This command works by downloading potentially the whole file or device, "
22813 "editing it locally, then uploading it. If the file or device is large, you "
22814 "have to specify which part you wish to edit by using C<max> and/or C<start> "
22815 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
22816 "usual modifiers allowed such as C<1M> (1 megabyte)."
22820 #: ../fish/guestfish-commands.pod:97
22821 msgid "For example to edit the first few sectors of a disk you might do:"
22825 #: ../fish/guestfish-commands.pod:100
22828 " hexedit /dev/sda 1M\n"
22833 #: ../fish/guestfish-commands.pod:102
22835 "which would allow you to edit anywhere within the first megabyte of the "
22840 #: ../fish/guestfish-commands.pod:105
22841 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
22845 #: ../fish/guestfish-commands.pod:107
22848 " hexedit /dev/sda1 0x400 0x400\n"
22853 #: ../fish/guestfish-commands.pod:109
22854 msgid "(assuming the superblock is in the standard location)."
22858 #: ../fish/guestfish-commands.pod:111
22860 "This command requires the external L<hexedit(1)> program. You can specify "
22861 "another program to use by setting the C<HEXEDITOR> environment variable."
22865 #: ../fish/guestfish-commands.pod:115
22866 msgid "See also L</hexdump>."
22870 #: ../fish/guestfish-commands.pod:117
22875 #: ../fish/guestfish-commands.pod:119
22883 #: ../fish/guestfish-commands.pod:121
22884 msgid "Change the local directory, ie. the current directory of guestfish itself."
22888 #: ../fish/guestfish-commands.pod:124
22889 msgid "Note that C<!cd> won't do what you might expect."
22893 #: ../fish/guestfish-commands.pod:126
22898 #: ../fish/guestfish-commands.pod:128
22903 #: ../fish/guestfish-commands.pod:130
22911 #: ../fish/guestfish-commands.pod:132
22912 msgid "Opens the manual page for guestfish."
22916 #: ../fish/guestfish-commands.pod:134
22921 #: ../fish/guestfish-commands.pod:136
22926 #: ../fish/guestfish-commands.pod:138
22934 #: ../fish/guestfish-commands.pod:140
22942 #: ../fish/guestfish-commands.pod:142
22943 msgid "This is used to view a file."
22947 #: ../fish/guestfish-commands.pod:144
22949 "The default viewer is C<$PAGER>. However if you use the alternate command "
22950 "C<less> you will get the C<less> command specifically."
22954 #: ../fish/guestfish-commands.pod:147
22959 #: ../fish/guestfish-commands.pod:149
22967 #: ../fish/guestfish-commands.pod:151
22969 "Close and reopen the libguestfs handle. It is not necessary to use this "
22970 "normally, because the handle is closed properly when guestfish exits. "
22971 "However this is occasionally useful for testing."
22975 #: ../fish/guestfish-commands.pod:155
22980 #: ../fish/guestfish-commands.pod:157
22983 " sparse filename size\n"
22988 #: ../fish/guestfish-commands.pod:159
22990 "This creates an empty sparse file of the given size, and then adds so it can "
22991 "be further examined."
22995 #: ../fish/guestfish-commands.pod:162
22997 "In all respects it works the same as the L</alloc> command, except that the "
22998 "image file is allocated sparsely, which means that disk blocks are not "
22999 "assigned to the file until they are needed. Sparse disk files only use "
23000 "space when written to, but they are slower and there is a danger you could "
23001 "run out of real disk space during a write operation."
23005 #: ../fish/guestfish-commands.pod:172
23010 #: ../fish/guestfish-commands.pod:174
23018 #: ../fish/guestfish-commands.pod:176
23020 "This command returns a list of the optional groups known to the daemon, and "
23021 "indicates which ones are supported by this build of the libguestfs "
23026 #: ../fish/guestfish-commands.pod:180
23027 msgid "See also L<guestfs(3)/AVAILABILITY>."
23031 #: ../fish/guestfish-commands.pod:182
23036 #: ../fish/guestfish-commands.pod:184
23039 " time command args...\n"
23044 #: ../fish/guestfish-commands.pod:186
23046 "Run the command as usual, but print the elapsed time afterwards. This can "
23047 "be useful for benchmarking operations."
23051 #: ../test-tool/libguestfs-test-tool.pod:5
23052 msgid "libguestfs-test-tool - End user tests for libguestfs"
23056 #: ../test-tool/libguestfs-test-tool.pod:9
23059 " libguestfs-test-tool [--options]\n"
23064 #: ../test-tool/libguestfs-test-tool.pod:13
23066 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
23067 "and developers, to allow them to check basic libguestfs functionality is "
23068 "working. This is needed because libguestfs occasionally breaks for reasons "
23069 "beyond our control: usually because of changes in the underlying qemu or "
23070 "kernel packages, or the host environment."
23074 #: ../test-tool/libguestfs-test-tool.pod:20
23075 msgid "If you suspect a problem in libguestfs, then just run:"
23079 #: ../test-tool/libguestfs-test-tool.pod:22
23082 " libguestfs-test-tool\n"
23087 #: ../test-tool/libguestfs-test-tool.pod:24
23088 msgid "It will print lots of diagnostic messages."
23092 #: ../test-tool/libguestfs-test-tool.pod:26
23093 msgid "If it runs to completion successfully, you will see this near the end:"
23097 #: ../test-tool/libguestfs-test-tool.pod:28
23100 " ===== TEST FINISHED OK =====\n"
23105 #: ../test-tool/libguestfs-test-tool.pod:30
23106 msgid "and the test tool will exit with code 0."
23110 #: ../test-tool/libguestfs-test-tool.pod:32
23112 "If it fails (and/or exits with non-zero error code), please paste the "
23113 "B<complete, unedited> output of the test tool into a bug report. More "
23114 "information about reporting bugs can be found on the "
23115 "L<http://libguestfs.org/> website."
23119 #: ../test-tool/libguestfs-test-tool.pod:41
23124 #: ../test-tool/libguestfs-test-tool.pod:43
23125 msgid "Display short usage information and exit."
23129 #: ../test-tool/libguestfs-test-tool.pod:45
23130 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
23134 #: ../test-tool/libguestfs-test-tool.pod:47
23136 "Pass an alternate name for the helper program. libguestfs-test-tool will "
23137 "normally look in the C<$libexec> directory that was configured when the tool "
23142 #: ../test-tool/libguestfs-test-tool.pod:51
23143 msgid "I<--qemu qemu_binary>"
23147 #: ../test-tool/libguestfs-test-tool.pod:53
23149 "If you have downloaded another qemu binary, point this option at the full "
23150 "path of the binary to try it."
23154 #: ../test-tool/libguestfs-test-tool.pod:56
23155 msgid "I<--qemudir qemu_source_dir>"
23159 #: ../test-tool/libguestfs-test-tool.pod:58
23161 "If you have compiled qemu from source, point this option at the source "
23162 "directory to try it."
23166 #: ../test-tool/libguestfs-test-tool.pod:61
23167 msgid "I<--timeout N>"
23171 #: ../test-tool/libguestfs-test-tool.pod:63
23173 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
23174 "does not usually need to be adjusted unless your machine is very slow."
23178 #: ../test-tool/libguestfs-test-tool.pod:69
23179 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
23183 #: ../test-tool/libguestfs-test-tool.pod:71
23185 "If you have compiled another version of qemu from source and would like to "
23186 "try that, then you can use the I<--qemudir> option to point to the qemu "
23187 "source directory."
23191 #: ../test-tool/libguestfs-test-tool.pod:75
23193 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
23194 "option to point to the binary."
23198 #: ../test-tool/libguestfs-test-tool.pod:78
23200 "When using an alternate qemu with libguestfs, usually you would need to "
23201 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in "
23202 "L<guestfs(3)>). libguestfs-test-tool writes a temporary qemu wrapper script "
23203 "when you use either of the I<--qemudir> or I<--qemu> options."
23207 #: ../test-tool/libguestfs-test-tool.pod:85
23209 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
23210 "I<1> if there was an error."
23214 #: ../test-tool/libguestfs-test-tool.pod:92
23215 msgid "/usr/libexec/libguestfs-test-tool-helper"
23219 #: ../test-tool/libguestfs-test-tool.pod:94
23221 "This helper program is run inside the appliance and provides additional "
23226 #: ../test-tool/libguestfs-test-tool.pod:97
23227 msgid "/usr/bin/mkisofs"
23231 #: ../test-tool/libguestfs-test-tool.pod:99
23233 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
23234 "which is used as part of the tests."
23238 #: ../test-tool/libguestfs-test-tool.pod:106
23240 "For the full list of environment variables which may affect libguestfs, "
23241 "please see the L<guestfs(3)> manual page."
23245 #: ../test-tool/libguestfs-test-tool.pod:111
23246 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
23250 #: ../test-tool/libguestfs-test-tool.pod:121
23251 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
23255 #: ../fuse/guestmount.pod:5
23256 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
23260 #: ../fuse/guestmount.pod:9
23263 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
23268 #: ../fuse/guestmount.pod:11
23271 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
23276 #: ../fuse/guestmount.pod:13
23279 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
23284 #: ../fuse/guestmount.pod:17
23286 "You must I<not> use C<guestmount> in read-write mode on live virtual "
23287 "machines. If you do this, you risk disk corruption in the VM."
23291 #: ../fuse/guestmount.pod:22
23293 "The guestmount program can be used to mount virtual machine filesystems and "
23294 "other disk images on the host. It uses libguestfs for access to the guest "
23295 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
23296 "a mountable device."
23300 #: ../fuse/guestmount.pod:27
23302 "Along with other options, you have to give at least one device (I<-a> "
23303 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
23304 "option) or use the I<-i> inspection option. How this works is better "
23305 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
23310 #: ../fuse/guestmount.pod:33
23312 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
23313 "by you, and the filesystem will not be visible to any other users unless you "
23314 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
23315 "the filesystem, use the C<fusermount -u> command."
23319 #: ../fuse/guestmount.pod:41
23321 "For a typical Windows guest which has its main filesystem on the first "
23326 #: ../fuse/guestmount.pod:44
23329 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
23334 #: ../fuse/guestmount.pod:46
23336 "For a typical Linux guest which has a /boot filesystem on the first "
23337 "partition, and the root filesystem on a logical volume:"
23341 #: ../fuse/guestmount.pod:49
23344 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
23349 #: ../fuse/guestmount.pod:51
23350 msgid "To get libguestfs to detect guest mountpoints for you:"
23354 #: ../fuse/guestmount.pod:53
23357 " guestmount -a guest.img -i --ro /mnt\n"
23362 #: ../fuse/guestmount.pod:55
23363 msgid "For a libvirt guest called \"Guest\" you could do:"
23367 #: ../fuse/guestmount.pod:57
23370 " guestmount -d Guest -i --ro /mnt\n"
23375 #: ../fuse/guestmount.pod:59
23377 "If you don't know what filesystems are contained in a guest or disk image, "
23378 "use L<virt-list-filesystems(1)> first:"
23382 #: ../fuse/guestmount.pod:62
23385 " virt-list-filesystems MyGuest\n"
23390 #: ../fuse/guestmount.pod:64
23392 "If you want to trace the libguestfs calls but without excessive debugging "
23393 "information, we recommend:"
23397 #: ../fuse/guestmount.pod:67
23400 " guestmount [...] --trace /mnt\n"
23405 #: ../fuse/guestmount.pod:69
23406 msgid "If you want to debug the program, we recommend:"
23410 #: ../fuse/guestmount.pod:71
23413 " guestmount [...] --trace --verbose /mnt\n"
23418 #: ../fuse/guestmount.pod:79
23419 msgid "Add a block device or virtual machine image."
23423 #: ../fuse/guestmount.pod:96
23424 msgid "B<--dir-cache-timeout N>"
23428 #: ../fuse/guestmount.pod:98
23430 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
23431 "seconds. The readdir cache [actually, there are several semi-independent "
23432 "caches] is populated after a readdir(2) call with the stat and extended "
23433 "attributes of the files in the directory, in anticipation that they will be "
23434 "requested soon after."
23438 #: ../fuse/guestmount.pod:104
23440 "There is also a different attribute cache implemented by FUSE (see the FUSE "
23441 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
23442 "requests, only cache existing ones."
23446 #: ../fuse/guestmount.pod:115
23448 "If you have untrusted raw-format guest disk images, you should use this "
23449 "option to specify the disk format. This avoids a possible security problem "
23450 "with malicious guests (CVE-2010-3851). See also "
23451 "L<guestfs(3)/guestfs_add_drive_opts>."
23455 #: ../fuse/guestmount.pod:120
23456 msgid "B<--fuse-help>"
23460 #: ../fuse/guestmount.pod:122
23461 msgid "Display help on special FUSE options (see I<-o> below)."
23465 #: ../fuse/guestmount.pod:126
23466 msgid "Display brief help and exit."
23470 #: ../fuse/guestmount.pod:134
23471 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
23475 #: ../fuse/guestmount.pod:136
23477 "Mount the named partition or logical volume on the given mountpoint B<in the "
23478 "guest> (this has nothing to do with mountpoints in the host)."
23482 #: ../fuse/guestmount.pod:139
23484 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
23485 "something on C</>."
23489 #: ../fuse/guestmount.pod:144
23491 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
23492 "unmounted. If you specify this option, then we don't attempt to sync the "
23493 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
23497 #: ../fuse/guestmount.pod:149
23498 msgid "B<-o option> | B<--option option>"
23502 #: ../fuse/guestmount.pod:151
23503 msgid "Pass extra options to FUSE."
23507 #: ../fuse/guestmount.pod:153
23509 "To get a list of all the extra options supported by FUSE, use the command "
23510 "below. Note that only the FUSE I<-o> options can be passed, and only some "
23511 "of them are a good idea."
23515 #: ../fuse/guestmount.pod:157
23518 " guestmount --fuse-help\n"
23523 #: ../fuse/guestmount.pod:159
23524 msgid "Some potentially useful FUSE options:"
23528 #: ../fuse/guestmount.pod:163
23529 msgid "B<-o allow_other>"
23533 #: ../fuse/guestmount.pod:165
23534 msgid "Allow other users to see the filesystem."
23538 #: ../fuse/guestmount.pod:167
23539 msgid "B<-o attr_timeout=N>"
23543 #: ../fuse/guestmount.pod:169
23544 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
23548 #: ../fuse/guestmount.pod:171
23549 msgid "B<-o kernel_cache>"
23553 #: ../fuse/guestmount.pod:173
23555 "Allow the kernel to cache files (reduces the number of reads that have to go "
23556 "through the L<guestfs(3)> API). This is generally a good idea if you can "
23557 "afford the extra memory usage."
23561 #: ../fuse/guestmount.pod:177
23562 msgid "B<-o uid=N> B<-o gid=N>"
23566 #: ../fuse/guestmount.pod:179
23568 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
23569 "the chosen values."
23573 #: ../fuse/guestmount.pod:186
23575 "Add devices and mount everything read-only. Also disallow writes and make "
23576 "the disk appear read-only to FUSE."
23580 #: ../fuse/guestmount.pod:189
23582 "This is highly recommended if you are not going to edit the guest disk. If "
23583 "the guest is running and this option is I<not> supplied, then there is a "
23584 "strong risk of disk corruption in the guest. We try to prevent this from "
23585 "happening, but it is not always possible."
23589 #: ../fuse/guestmount.pod:196
23590 msgid "Enable SELinux support for the guest."
23594 #: ../fuse/guestmount.pod:200
23595 msgid "Enable verbose messages from underlying libguestfs."
23599 #: ../fuse/guestmount.pod:204
23600 msgid "Display the program version and exit."
23604 #: ../fuse/guestmount.pod:206
23605 msgid "B<-x> | B<--trace>"
23609 #: ../fuse/guestmount.pod:208
23610 msgid "Trace libguestfs calls."
23614 #: ../fuse/guestmount.pod:210
23615 msgid "This also stops the daemon from forking into the background."
23619 #: ../fuse/guestmount.pod:216
23621 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
23622 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
23623 "L<http://fuse.sf.net/>."
23627 #: ../inspector/virt-inspector.pl:40
23629 "virt-inspector - Display OS version, kernel, drivers, mount points, "
23630 "applications, etc. in a virtual machine"
23634 #: ../inspector/virt-inspector.pl:44
23637 " virt-inspector [--connect URI] domname\n"
23642 #: ../inspector/virt-inspector.pl:46
23645 " virt-inspector guest.img [guest.img ...]\n"
23650 #: ../inspector/virt-inspector.pl:50
23652 "B<virt-inspector> examines a virtual machine and tries to determine the "
23653 "version of the OS, the kernel version, what drivers are installed, whether "
23654 "the virtual machine is fully virtualized (FV) or para-virtualized (PV), what "
23655 "applications are installed and more."
23659 #: ../inspector/virt-inspector.pl:55
23661 "Virt-inspector can produce output in several formats, including a readable "
23662 "text report, and XML for feeding into other programs."
23666 #: ../inspector/virt-inspector.pl:58
23668 "In the normal usage, use C<virt-inspector domname> where C<domname> is the "
23669 "libvirt domain (see: C<virsh list --all>)."
23673 #: ../inspector/virt-inspector.pl:61
23675 "You can also run virt-inspector directly on disk images from a single "
23676 "virtual machine. Use C<virt-inspector guest.img>. In rare cases a domain "
23677 "has several block devices, in which case you should list them one after "
23678 "another, with the first corresponding to the guest's C</dev/sda>, the second "
23679 "to the guest's C</dev/sdb> and so on."
23683 #: ../inspector/virt-inspector.pl:67
23685 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
23686 "inspect several virtual machines, you have to run virt-inspector several "
23687 "times (for example, from a shell script for-loop)."
23691 #: ../inspector/virt-inspector.pl:72
23693 "Because virt-inspector needs direct access to guest images, it won't "
23694 "normally work over remote libvirt connections."
23698 #: ../inspector/virt-inspector.pl:85 ../tools/virt-edit.pl:83 ../tools/virt-win-reg.pl:182 ../tools/virt-df.pl:81 ../tools/virt-ls.pl:89 ../tools/virt-list-filesystems.pl:60 ../tools/virt-cat.pl:90 ../tools/virt-tar.pl:109 ../tools/virt-rescue.pl:113 ../tools/virt-make-fs.pl:163 ../tools/virt-list-partitions.pl:61
23699 msgid "Display brief help."
23703 #: ../inspector/virt-inspector.pl:91 ../tools/virt-edit.pl:89 ../tools/virt-win-reg.pl:188 ../tools/virt-df.pl:87 ../tools/virt-ls.pl:95 ../tools/virt-resize.pl:273 ../tools/virt-list-filesystems.pl:66 ../tools/virt-cat.pl:96 ../tools/virt-tar.pl:115 ../tools/virt-rescue.pl:119 ../tools/virt-make-fs.pl:169 ../tools/virt-list-partitions.pl:67
23704 msgid "B<--version>"
23708 #: ../inspector/virt-inspector.pl:93 ../tools/virt-edit.pl:91 ../tools/virt-win-reg.pl:190 ../tools/virt-df.pl:89 ../tools/virt-ls.pl:97 ../tools/virt-resize.pl:275 ../tools/virt-list-filesystems.pl:68 ../tools/virt-cat.pl:98 ../tools/virt-tar.pl:117 ../tools/virt-rescue.pl:121 ../tools/virt-make-fs.pl:171 ../tools/virt-list-partitions.pl:69
23709 msgid "Display version number and exit."
23713 #: ../inspector/virt-inspector.pl:99 ../tools/virt-edit.pl:113 ../tools/virt-win-reg.pl:204 ../tools/virt-df.pl:95 ../tools/virt-ls.pl:103 ../tools/virt-list-filesystems.pl:74 ../tools/virt-cat.pl:104 ../tools/virt-tar.pl:123 ../tools/virt-rescue.pl:135 ../tools/virt-list-partitions.pl:75
23714 msgid "B<--connect URI> | B<-c URI>"
23718 #: ../inspector/virt-inspector.pl:101 ../tools/virt-edit.pl:115 ../tools/virt-win-reg.pl:206 ../tools/virt-df.pl:97 ../tools/virt-ls.pl:105 ../tools/virt-list-filesystems.pl:76 ../tools/virt-cat.pl:106 ../tools/virt-tar.pl:125 ../tools/virt-rescue.pl:137 ../tools/virt-list-partitions.pl:77
23720 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
23721 "to the default libvirt hypervisor."
23725 #: ../inspector/virt-inspector.pl:104
23727 "Libvirt is only used if you specify a C<domname> on the command line. If "
23728 "you specify guest block devices directly, then libvirt is not used at all."
23732 #: ../inspector/virt-inspector.pl:112 ../tools/virt-edit.pl:125 ../tools/virt-win-reg.pl:216 ../tools/virt-df.pl:117 ../tools/virt-ls.pl:115 ../tools/virt-resize.pl:523 ../tools/virt-list-filesystems.pl:86 ../tools/virt-cat.pl:116 ../tools/virt-tar.pl:135 ../tools/virt-rescue.pl:147 ../tools/virt-list-partitions.pl:87
23733 msgid "B<--format> raw"
23737 #: ../inspector/virt-inspector.pl:114 ../tools/virt-edit.pl:127 ../tools/virt-win-reg.pl:218 ../tools/virt-df.pl:119 ../tools/virt-ls.pl:117 ../tools/virt-list-filesystems.pl:88 ../tools/virt-cat.pl:118 ../tools/virt-tar.pl:137 ../tools/virt-rescue.pl:149 ../tools/virt-list-partitions.pl:89
23739 "Specify the format of disk images given on the command line. If this is "
23740 "omitted then the format is autodetected from the content of the disk image."
23744 #: ../inspector/virt-inspector.pl:118 ../tools/virt-edit.pl:131 ../tools/virt-win-reg.pl:222 ../tools/virt-df.pl:123 ../tools/virt-ls.pl:121 ../tools/virt-list-filesystems.pl:92 ../tools/virt-cat.pl:122 ../tools/virt-tar.pl:141 ../tools/virt-rescue.pl:153 ../tools/virt-list-partitions.pl:93
23746 "If disk images are requested from libvirt, then this program asks libvirt "
23747 "for this information. In this case, the value of the format parameter is "
23752 #: ../inspector/virt-inspector.pl:122 ../tools/virt-edit.pl:135 ../tools/virt-win-reg.pl:226 ../tools/virt-df.pl:127 ../tools/virt-ls.pl:125 ../tools/virt-resize.pl:528 ../tools/virt-resize.pl:543 ../tools/virt-list-filesystems.pl:96 ../tools/virt-cat.pl:126 ../tools/virt-tar.pl:145 ../tools/virt-rescue.pl:157 ../tools/virt-list-partitions.pl:97
23754 "If working with untrusted raw-format guest disk images, you should ensure "
23755 "the format is always specified."
23759 #: ../inspector/virt-inspector.pl:131
23761 "The following options select the output format. Use only one of them. The "
23762 "default is a readable text report."
23766 #: ../inspector/virt-inspector.pl:136
23767 msgid "B<--text> (default)"
23771 #: ../inspector/virt-inspector.pl:138
23772 msgid "Plain text report."
23776 #: ../inspector/virt-inspector.pl:140
23781 #: ../inspector/virt-inspector.pl:142
23782 msgid "Produce no output at all."
23786 #: ../inspector/virt-inspector.pl:144
23791 #: ../inspector/virt-inspector.pl:146
23793 "If you select I<--xml> then you get XML output which can be fed to other "
23798 #: ../inspector/virt-inspector.pl:149
23803 #: ../inspector/virt-inspector.pl:151
23805 "If you select I<--yaml> then you get YAML output which can be fed to other "
23810 #: ../inspector/virt-inspector.pl:154
23815 #: ../inspector/virt-inspector.pl:156
23817 "If you select I<--perl> then you get Perl structures output which can be "
23818 "used directly in another Perl program."
23822 #: ../inspector/virt-inspector.pl:159
23827 #: ../inspector/virt-inspector.pl:161
23828 msgid "B<--ro-fish>"
23832 #: ../inspector/virt-inspector.pl:163
23834 "If you select I<--fish> then we print a L<guestfish(1)> command line which "
23835 "will automatically mount up the filesystems on the correct mount points. "
23836 "Try this for example:"
23840 #: ../inspector/virt-inspector.pl:167
23843 " guestfish $(virt-inspector --fish guest.img)\n"
23848 #: ../inspector/virt-inspector.pl:169
23850 "I<--ro-fish> is the same, but the I<--ro> option is passed to guestfish so "
23851 "that the filesystems are mounted read-only."
23855 #: ../inspector/virt-inspector.pl:172
23860 #: ../inspector/virt-inspector.pl:174
23862 "In \"query mode\" we answer common questions about the guest, such as "
23863 "whether it is fullvirt or needs a Xen hypervisor to run."
23867 #: ../inspector/virt-inspector.pl:177
23868 msgid "See section I<QUERY MODE> below."
23872 #: ../inspector/virt-inspector.pl:183
23873 msgid "B<--windows-registry>"
23877 #: ../inspector/virt-inspector.pl:185
23879 "This flag is ignored for compatibility with earlier releases of the "
23884 #: ../inspector/virt-inspector.pl:188
23886 "In this version, if L<Win::Hivex(3)> is available, then we attempt to parse "
23887 "information out of the Registry for any Windows guest."
23891 #: ../inspector/virt-inspector.pl:244
23892 msgid "OUTPUT FORMAT"
23896 #: ../inspector/virt-inspector.pl:246
23899 " Operating system(s)\n"
23900 " -------------------\n"
23901 " Linux (distro + version)\n"
23902 " Windows (version)\n"
23905 " +--- Filesystems ---------- Installed apps --- Kernel & drivers\n"
23906 " ----------- -------------- ----------------\n"
23907 " mount point => device List of apps Extra information\n"
23908 " mount point => device and versions about kernel(s)\n"
23909 " ... and drivers\n"
23910 " swap => swap device\n"
23911 " (plus lots of extra information\n"
23912 " about each filesystem)\n"
23917 #: ../inspector/virt-inspector.pl:261
23918 msgid "The output of virt-inspector is a complex two-level data structure."
23922 #: ../inspector/virt-inspector.pl:263
23924 "At the top level is a list of the operating systems installed on the guest. "
23925 "(For the vast majority of guests, only a single OS is installed.) The data "
23926 "returned for the OS includes the name (Linux, Windows), the distribution and "
23931 #: ../inspector/virt-inspector.pl:268
23932 msgid "The diagram above shows what we return for each OS."
23936 #: ../inspector/virt-inspector.pl:270
23938 "With the I<--xml> option the output is mapped into an XML document. There "
23939 "is a RELAX-NG schema for this XML in the file I<virt-inspector.rng> which "
23940 "normally ships with virt-inspector, or can be found in the source."
23944 #: ../inspector/virt-inspector.pl:275
23946 "With the I<--fish> or I<--ro-fish> option the mount points are mapped to "
23947 "L<guestfish(1)> command line parameters, so that you can go in afterwards "
23948 "and inspect the guest with everything mounted in the right place. For "
23953 #: ../inspector/virt-inspector.pl:280
23956 " guestfish $(virt-inspector --ro-fish guest.img)\n"
23957 " ==> guestfish --ro -a guest.img -m /dev/VG/LV:/ -m /dev/sda1:/boot\n"
23962 #: ../inspector/virt-inspector.pl:620
23967 #: ../inspector/virt-inspector.pl:622
23969 "When you use C<virt-inspector --query>, the output is a series of lines of "
23974 #: ../inspector/virt-inspector.pl:625
23980 " xen_pv_drivers=no\n"
23985 #: ../inspector/virt-inspector.pl:630
23987 "(each answer is usually C<yes> or C<no>, or the line is completely missing "
23988 "if we could not determine the answer at all)."
23992 #: ../inspector/virt-inspector.pl:633
23994 "If the guest is multiboot, you can get apparently conflicting answers "
23995 "(eg. C<windows=yes> and C<linux=yes>, or a guest which is both fullvirt and "
23996 "has a Xen PV kernel). This is normal, and just means that the guest can do "
23997 "both things, although it might require operator intervention such as "
23998 "selecting a boot option when the guest is booting."
24002 #: ../inspector/virt-inspector.pl:640
24003 msgid "This section describes the full range of answers possible."
24007 #: ../inspector/virt-inspector.pl:661
24008 msgid "windows=(yes|no)"
24012 #: ../inspector/virt-inspector.pl:663
24013 msgid "Answer C<yes> if Microsoft Windows is installed in the guest."
24017 #: ../inspector/virt-inspector.pl:676
24018 msgid "linux=(yes|no)"
24022 #: ../inspector/virt-inspector.pl:678
24023 msgid "Answer C<yes> if a Linux kernel is installed in the guest."
24027 #: ../inspector/virt-inspector.pl:691
24028 msgid "rhel=(yes|no)"
24032 #: ../inspector/virt-inspector.pl:693
24033 msgid "Answer C<yes> if the guest contains Red Hat Enterprise Linux."
24037 #: ../inspector/virt-inspector.pl:707
24038 msgid "fedora=(yes|no)"
24042 #: ../inspector/virt-inspector.pl:709
24043 msgid "Answer C<yes> if the guest contains the Fedora Linux distribution."
24047 #: ../inspector/virt-inspector.pl:722
24048 msgid "debian=(yes|no)"
24052 #: ../inspector/virt-inspector.pl:724
24053 msgid "Answer C<yes> if the guest contains the Debian Linux distribution."
24057 #: ../inspector/virt-inspector.pl:737
24058 msgid "fullvirt=(yes|no)"
24062 #: ../inspector/virt-inspector.pl:739
24064 "Answer C<yes> if there is at least one operating system kernel installed in "
24065 "the guest which runs fully virtualized. Such a guest would require a "
24066 "hypervisor which supports full system virtualization."
24070 #: ../inspector/virt-inspector.pl:762
24071 msgid "xen_domU_kernel=(yes|no)"
24075 #: ../inspector/virt-inspector.pl:764
24077 "Answer C<yes> if there is at least one Linux kernel installed in the guest "
24078 "which is compiled as a Xen DomU (a Xen paravirtualized guest)."
24082 #: ../inspector/virt-inspector.pl:784
24083 msgid "xen_pv_drivers=(yes|no)"
24087 #: ../inspector/virt-inspector.pl:786
24089 "Answer C<yes> if the guest has Xen paravirtualized drivers installed "
24090 "(usually the kernel itself will be fully virtualized, but the PV drivers "
24091 "have been installed by the administrator for performance reasons)."
24095 #: ../inspector/virt-inspector.pl:808
24096 msgid "virtio_drivers=(yes|no)"
24100 #: ../inspector/virt-inspector.pl:810
24102 "Answer C<yes> if the guest has virtio paravirtualized drivers installed. "
24103 "Virtio drivers are commonly used to improve the performance of KVM."
24107 #: ../inspector/virt-inspector.pl:831
24108 msgid "userspace_arch=(x86_64|...)"
24112 #: ../inspector/virt-inspector.pl:833
24113 msgid "Print the architecture of userspace."
24117 #: ../inspector/virt-inspector.pl:835 ../inspector/virt-inspector.pl:856
24118 msgid "NB. For multi-boot VMs this can print several lines."
24122 #: ../inspector/virt-inspector.pl:852
24123 msgid "kernel_arch=(x86_64|...)"
24127 #: ../inspector/virt-inspector.pl:854
24128 msgid "Print the architecture of the kernel."
24132 #: ../inspector/virt-inspector.pl:877 ../tools/virt-edit.pl:343 ../tools/virt-win-reg.pl:142 ../tools/virt-win-reg.pl:480 ../tools/virt-df.pl:633 ../tools/virt-ls.pl:228 ../tools/virt-resize.pl:1479 ../tools/virt-list-filesystems.pl:209 ../tools/virt-cat.pl:181 ../tools/virt-tar.pl:276 ../tools/virt-rescue.pl:260 ../tools/virt-make-fs.pl:527 ../tools/virt-list-partitions.pl:247
24133 msgid "SHELL QUOTING"
24137 #: ../inspector/virt-inspector.pl:879 ../tools/virt-edit.pl:345 ../tools/virt-win-reg.pl:482 ../tools/virt-df.pl:635 ../tools/virt-ls.pl:230 ../tools/virt-resize.pl:1481 ../tools/virt-list-filesystems.pl:211 ../tools/virt-cat.pl:183 ../tools/virt-tar.pl:278 ../tools/virt-rescue.pl:262 ../tools/virt-make-fs.pl:529 ../tools/virt-list-partitions.pl:249
24139 "Libvirt guest names can contain arbitrary characters, some of which have "
24140 "meaning to the shell such as C<#> and space. You may need to quote or "
24141 "escape these characters on the command line. See the shell manual page "
24142 "L<sh(1)> for details."
24146 #: ../inspector/virt-inspector.pl:886 ../tools/virt-df.pl:642
24148 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
24149 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
24153 #: ../inspector/virt-inspector.pl:895 ../tools/virt-edit.pl:364 ../tools/virt-win-reg.pl:515 ../tools/virt-df.pl:651 ../tools/virt-ls.pl:248 ../tools/virt-resize.pl:1510 ../tools/virt-list-filesystems.pl:230 ../tools/virt-cat.pl:200 ../tools/virt-tar.pl:296 ../tools/virt-rescue.pl:279 ../tools/virt-make-fs.pl:561 ../tools/virt-list-partitions.pl:267
24154 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
24158 #: ../inspector/virt-inspector.pl:897
24159 msgid "Matthew Booth L<mbooth@redhat.com>"
24163 #: ../inspector/virt-inspector.pl:901 ../tools/virt-ls.pl:252 ../tools/virt-list-filesystems.pl:234 ../tools/virt-cat.pl:204 ../tools/virt-tar.pl:300
24164 msgid "Copyright (C) 2009 Red Hat Inc."
24168 #: ../tools/virt-edit.pl:35
24169 msgid "virt-edit - Edit a file in a virtual machine"
24173 #: ../tools/virt-edit.pl:39
24176 " virt-edit [--options] domname file\n"
24181 #: ../tools/virt-edit.pl:41
24184 " virt-edit [--options] disk.img [disk.img ...] file\n"
24189 #: ../tools/virt-edit.pl:43
24192 " virt-edit [domname|disk.img] file -e 'expr'\n"
24197 #: ../tools/virt-edit.pl:47
24199 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
24200 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
24201 "doing this, but doesn't catch all cases."
24205 #: ../tools/virt-edit.pl:53
24207 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
24208 "the named virtual machine (or disk image)."
24212 #: ../tools/virt-edit.pl:56
24214 "If you want to just view a file, use L<virt-cat(1)>. For more complex cases "
24215 "you should look at the L<guestfish(1)> tool."
24219 #: ../tools/virt-edit.pl:61
24220 msgid "Edit the named files interactively:"
24224 #: ../tools/virt-edit.pl:63
24227 " virt-edit mydomain /boot/grub/grub.conf\n"
24232 #: ../tools/virt-edit.pl:65
24235 " virt-edit mydomain /etc/passwd\n"
24240 #: ../tools/virt-edit.pl:67
24242 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
24243 "below). To change the init default level to 5:"
24247 #: ../tools/virt-edit.pl:71
24250 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
24255 #: ../tools/virt-edit.pl:97
24256 msgid "B<--backup extension> | B<-b extension>"
24260 #: ../tools/virt-edit.pl:99
24262 "Create a backup of the original file I<in the guest disk image>. The backup "
24263 "has the original filename with C<extension> added."
24267 #: ../tools/virt-edit.pl:102
24269 "Usually the first character of C<extension> would be a dot C<.> so you would "
24274 #: ../tools/virt-edit.pl:105
24277 " virt-edit -b .orig [etc]\n"
24282 #: ../tools/virt-edit.pl:107
24283 msgid "By default, no backup file is made."
24287 #: ../tools/virt-edit.pl:118 ../tools/virt-win-reg.pl:209 ../tools/virt-df.pl:100 ../tools/virt-ls.pl:108 ../tools/virt-list-filesystems.pl:79 ../tools/virt-cat.pl:109 ../tools/virt-tar.pl:128 ../tools/virt-rescue.pl:140 ../tools/virt-list-partitions.pl:80
24289 "If you specify guest block devices directly, then libvirt is not used at "
24294 #: ../tools/virt-edit.pl:142
24295 msgid "B<--expr EXPR> | B<-e EXPR>"
24299 #: ../tools/virt-edit.pl:144
24301 "Instead of launching the external editor, non-interactively apply the Perl "
24302 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
24307 #: ../tools/virt-edit.pl:148
24309 "Be careful to properly quote the expression to prevent it from being altered "
24314 #: ../tools/virt-edit.pl:268
24315 msgid "NON-INTERACTIVE EDITING"
24319 #: ../tools/virt-edit.pl:270
24321 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
24322 "administrator can interactively edit the file."
24326 #: ../tools/virt-edit.pl:273
24328 "There are two ways also to use C<virt-edit> from scripts in order to make "
24329 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
24330 "like this, it's less error-prone to write scripts directly using the "
24331 "libguestfs API and Augeas for configuration file editing.)"
24335 #: ../tools/virt-edit.pl:279
24337 "The first method is to temporarily set C<$EDITOR> to any script or program "
24338 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
24339 "update C<tmpfile> in place however it likes."
24343 #: ../tools/virt-edit.pl:283
24345 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
24346 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
24347 "instances of C<foo> with C<bar> in a file:"
24351 #: ../tools/virt-edit.pl:287
24354 " virt-edit domname filename -e 's/foo/bar/'\n"
24359 #: ../tools/virt-edit.pl:289
24361 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
24362 "For example to delete root's password you could do:"
24366 #: ../tools/virt-edit.pl:292
24369 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
24374 #: ../tools/virt-edit.pl:294
24376 "What really happens is that the snippet is evaluated as a Perl expression "
24377 "for each line of the file. The line, including the final C<\\n>, is passed "
24378 "in C<$_> and the expression should update C<$_> or leave it unchanged."
24382 #: ../tools/virt-edit.pl:299
24384 "To delete a line, set C<$_> to the empty string. For example, to delete the "
24385 "C<apache> user account from the password file you can do:"
24389 #: ../tools/virt-edit.pl:302
24392 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
24397 #: ../tools/virt-edit.pl:304
24399 "To insert a line, prepend or append it to C<$_>. However appending lines to "
24400 "the end of the file is rather difficult this way since there is no concept "
24401 "of \"last line of the file\" - your expression just doesn't get called "
24402 "again. You might want to use the first method (setting C<$EDITOR>) if you "
24407 #: ../tools/virt-edit.pl:310
24409 "The variable C<$lineno> contains the current line number. As is "
24410 "traditional, the first line in the file is number C<1>."
24414 #: ../tools/virt-edit.pl:313
24416 "The return value from the expression is ignored, but the expression may call "
24417 "C<die> in order to abort the whole program, leaving the original file "
24422 #: ../tools/virt-edit.pl:317
24424 "Remember when matching the end of a line that C<$_> may contain the final "
24425 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
24426 "newline then neither of these. Thus to match or substitute some text at the "
24427 "end of a line, use this regular expression:"
24431 #: ../tools/virt-edit.pl:322
24434 " /some text(\\r?\\n)?$/\n"
24439 #: ../tools/virt-edit.pl:324
24441 "Alternately, use the perl C<chomp> function, being careful not to chomp "
24442 "C<$_> itself (since that would remove all newlines from the file):"
24446 #: ../tools/virt-edit.pl:328
24449 " my $m = $_; chomp $m; $m =~ /some text$/\n"
24454 #: ../tools/virt-edit.pl:334
24459 #: ../tools/virt-edit.pl:336
24461 "If set, this string is used as the editor. It may contain arguments, "
24462 "eg. C<\"emacs -nw\">"
24466 #: ../tools/virt-edit.pl:339
24467 msgid "If not set, C<vi> is used."
24471 #: ../tools/virt-edit.pl:352
24473 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
24474 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>, "
24475 "L<perl(1)>, L<perlre(1)>."
24479 #: ../tools/virt-edit.pl:362 ../tools/virt-win-reg.pl:513 ../tools/virt-df.pl:649 ../tools/virt-ls.pl:246 ../tools/virt-resize.pl:1508 ../tools/virt-list-filesystems.pl:228 ../tools/virt-cat.pl:198 ../tools/virt-tar.pl:294 ../tools/virt-rescue.pl:277 ../tools/virt-make-fs.pl:559 ../tools/virt-list-partitions.pl:265
24484 #: ../tools/virt-edit.pl:368 ../tools/virt-df.pl:655 ../tools/virt-rescue.pl:283 ../tools/virt-list-partitions.pl:271
24485 msgid "Copyright (C) 2009-2010 Red Hat Inc."
24489 #: ../tools/virt-win-reg.pl:38
24491 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
24496 #: ../tools/virt-win-reg.pl:42
24499 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
24504 #: ../tools/virt-win-reg.pl:44
24507 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
24512 #: ../tools/virt-win-reg.pl:46
24515 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
24520 #: ../tools/virt-win-reg.pl:48
24523 " virt-win-reg --merge domname [input.reg ...]\n"
24528 #: ../tools/virt-win-reg.pl:50
24531 " virt-win-reg [--options] disk.img ... # instead of domname\n"
24536 #: ../tools/virt-win-reg.pl:54
24538 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
24539 "virtual machines. If you do this, you I<will> get irreversible disk "
24540 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
24541 "but doesn't catch all cases."
24545 #: ../tools/virt-win-reg.pl:59
24547 "Modifying the Windows Registry is an inherently risky operation. The format "
24548 "is deliberately obscure and undocumented, and Registry changes can leave the "
24549 "system unbootable. Therefore when using the C<--merge> option, make sure "
24550 "you have a reliable backup first."
24554 #: ../tools/virt-win-reg.pl:66
24556 "This program can export and merge Windows Registry entries from a Windows "
24561 #: ../tools/virt-win-reg.pl:69
24563 "The first parameter is the libvirt guest name or the raw disk image of a "
24568 #: ../tools/virt-win-reg.pl:72
24570 "If C<--merge> is I<not> specified, then the chosen registry key is "
24571 "displayed/exported (recursively). For example:"
24575 #: ../tools/virt-win-reg.pl:75
24578 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
24583 #: ../tools/virt-win-reg.pl:77
24584 msgid "You can also display single values from within registry keys, for example:"
24588 #: ../tools/virt-win-reg.pl:80
24591 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
24592 " $ virt-win-reg Windows7 $cvkey ProductName\n"
24593 " Windows 7 Enterprise\n"
24598 #: ../tools/virt-win-reg.pl:84
24600 "With C<--merge>, you can merge a textual regedit file into the Windows "
24605 #: ../tools/virt-win-reg.pl:87
24608 " $ virt-win-reg --merge Windows7 changes.reg\n"
24613 #: ../tools/virt-win-reg.pl:89
24614 msgid "SUPPORTED SYSTEMS"
24618 #: ../tools/virt-win-reg.pl:91
24620 "The program currently supports Windows NT-derived guests starting with "
24621 "Windows XP through to at least Windows 7."
24625 #: ../tools/virt-win-reg.pl:94
24627 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, "
24628 "C<HKEY_LOCAL_MACHINE\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, "
24629 "C<HKEY_LOCAL_MACHINE\\SYSTEM> and C<HKEY_USERS\\.DEFAULT>."
24633 #: ../tools/virt-win-reg.pl:98
24635 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
24640 #: ../tools/virt-win-reg.pl:101
24642 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
24647 #: ../tools/virt-win-reg.pl:104
24652 #: ../tools/virt-win-reg.pl:106
24654 "This program is only meant for simple access to the registry. If you want "
24655 "to do complicated things with the registry, we suggest you download the "
24656 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
24657 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
24658 "L<hivexregedit(1)>."
24662 #: ../tools/virt-win-reg.pl:112
24667 #: ../tools/virt-win-reg.pl:114
24669 "C<virt-win-reg> expects that regedit files have already been reencoded in "
24670 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
24671 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
24672 "with Windows-style line endings, you may need to reencode the whole file "
24673 "before or after processing."
24677 #: ../tools/virt-win-reg.pl:120
24679 "To reencode a file from Windows format to Linux (before processing it with "
24680 "the C<--merge> option), you would do something like this:"
24684 #: ../tools/virt-win-reg.pl:123
24687 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
24692 #: ../tools/virt-win-reg.pl:125
24694 "To go in the opposite direction, after exporting and before sending the file "
24695 "to a Windows user, do something like this:"
24699 #: ../tools/virt-win-reg.pl:128
24702 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
24707 #: ../tools/virt-win-reg.pl:130
24708 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
24712 #: ../tools/virt-win-reg.pl:132
24714 "If you are unsure about the current encoding, use the L<file(1)> command. "
24715 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
24716 "Windows-style (CRLF) line endings, like this:"
24720 #: ../tools/virt-win-reg.pl:136
24723 " $ file software.reg\n"
24724 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
24725 " with CRLF line terminators\n"
24730 #: ../tools/virt-win-reg.pl:140
24731 msgid "This file would need conversion before you could C<--merge> it."
24735 #: ../tools/virt-win-reg.pl:144
24737 "Be careful when passing parameters containing C<\\> (backslash) in the "
24738 "shell. Usually you will have to use 'single quotes' or double backslashes "
24739 "(but not both) to protect them from the shell."
24743 #: ../tools/virt-win-reg.pl:148
24744 msgid "Paths and value names are case-insensitive."
24748 #: ../tools/virt-win-reg.pl:150
24749 msgid "CurrentControlSet etc."
24753 #: ../tools/virt-win-reg.pl:152
24755 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
24756 "Registry at the level of the hive file, and therefore you cannot modify "
24761 #: ../tools/virt-win-reg.pl:156
24763 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
24764 "circumstances it might refer to another control set. The way to find out is "
24765 "to look at the C<HKLM\\SYSTEM\\Select> key:"
24769 #: ../tools/virt-win-reg.pl:160
24772 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
24773 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
24774 " \"Current\"=dword:00000001\n"
24775 " \"Default\"=dword:00000001\n"
24776 " \"Failed\"=dword:00000000\n"
24777 " \"LastKnownGood\"=dword:00000002\n"
24782 #: ../tools/virt-win-reg.pl:167
24783 msgid "\"Default\" is the one which Windows will choose when it boots."
24787 #: ../tools/virt-win-reg.pl:169
24788 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
24792 #: ../tools/virt-win-reg.pl:196 ../tools/virt-make-fs.pl:177
24797 #: ../tools/virt-win-reg.pl:198 ../tools/virt-resize.pl:501
24798 msgid "Enable debugging messages."
24802 #: ../tools/virt-win-reg.pl:233
24807 #: ../tools/virt-win-reg.pl:235
24809 "In merge mode, this merges a textual regedit file into the Windows Registry "
24810 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
24811 "displays or exports Registry entries instead."
24815 #: ../tools/virt-win-reg.pl:239
24817 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
24818 "result in disk corruption. However exporting (without this flag) is always "
24823 #: ../tools/virt-win-reg.pl:247
24824 msgid "B<--encoding> UTF-16LE|ASCII"
24828 #: ../tools/virt-win-reg.pl:249
24830 "When merging (only), you may need to specify the encoding for strings to be "
24831 "used in the hive file. This is explained in detail in "
24832 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
24836 #: ../tools/virt-win-reg.pl:253
24838 "The default is to use UTF-16LE, which should work with recent versions of "
24843 #: ../tools/virt-win-reg.pl:489
24845 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
24846 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
24847 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
24848 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
24852 #: ../tools/virt-win-reg.pl:504 ../tools/virt-make-fs.pl:550
24854 "When reporting bugs, please enable debugging and capture the I<complete> "
24859 #: ../tools/virt-win-reg.pl:507
24862 " export LIBGUESTFS_DEBUG=1\n"
24863 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
24868 #: ../tools/virt-win-reg.pl:510
24870 "Attach /tmp/virt-win-reg.log to a new bug report at "
24871 "L<https://bugzilla.redhat.com/>"
24875 #: ../tools/virt-win-reg.pl:519 ../tools/virt-resize.pl:1514 ../tools/virt-make-fs.pl:565
24876 msgid "Copyright (C) 2010 Red Hat Inc."
24880 #: ../tools/virt-df.pl:36
24881 msgid "virt-df - Display free space on virtual filesystems"
24885 #: ../tools/virt-df.pl:40
24888 " virt-df [--options]\n"
24893 #: ../tools/virt-df.pl:42
24896 " virt-df [--options] domname\n"
24901 #: ../tools/virt-df.pl:44
24904 " virt-df [--options] disk.img [disk.img ...]\n"
24909 #: ../tools/virt-df.pl:48
24911 "C<virt-df> is a command line tool to display free space on virtual machine "
24912 "filesystems. Unlike other tools, it doesn't just display the amount of "
24913 "space allocated to a virtual machine, but can look inside the virtual "
24914 "machine to see how much space is really being used."
24918 #: ../tools/virt-df.pl:53
24920 "It is like the L<df(1)> command, but for virtual machines, except that it "
24921 "also works for Windows virtual machines."
24925 #: ../tools/virt-df.pl:56
24927 "If used without any arguments, C<virt-df> checks with libvirt to get a list "
24928 "of all active and inactive guests, and performs a C<df>-type operation on "
24929 "each one in turn, printing out the results."
24933 #: ../tools/virt-df.pl:60
24935 "If used with any argument(s), C<virt-df> performs a C<df>-type operation on "
24936 "either the single named libvirt domain, or on the disk image(s) listed on "
24937 "the command line (which must all belong to a single VM). In this mode (with "
24938 "arguments), C<virt-df> will I<only work for a single guest>. If you want to "
24939 "run on multiple guests, then you have to invoke C<virt-df> multiple times."
24943 #: ../tools/virt-df.pl:67
24945 "Use the C<--csv> option to get a format which can be easily parsed by other "
24946 "programs. Other options are mostly similar to standard C<df> options. See "
24947 "below for the complete list."
24951 #: ../tools/virt-df.pl:107
24956 #: ../tools/virt-df.pl:109
24958 "Write out the results in CSV format (comma-separated values). This format "
24959 "can be imported easily into databases and spreadsheets, but read L</NOTE "
24960 "ABOUT CSV FORMAT> below."
24964 #: ../tools/virt-df.pl:134
24965 msgid "B<--human-readable> | B<-h>"
24969 #: ../tools/virt-df.pl:136
24970 msgid "Print sizes in human-readable format."
24974 #: ../tools/virt-df.pl:138
24975 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
24979 #: ../tools/virt-df.pl:144
24980 msgid "B<--inodes> | B<-i>"
24984 #: ../tools/virt-df.pl:146
24985 msgid "Print inodes instead of blocks."
24989 #: ../tools/virt-df.pl:152
24990 msgid "B<--one-per-guest>"
24994 #: ../tools/virt-df.pl:154
24996 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
24997 "disks from several guests to a single libguestfs appliance."
25001 #: ../tools/virt-df.pl:157
25002 msgid "You might use this option in the following circumstances:"
25006 #: ../tools/virt-df.pl:163
25008 "If you think an untrusted guest might actively try to exploit the libguestfs "
25009 "appliance kernel, then this prevents one guest from interfering with the "
25010 "stats printed for another guest."
25014 #: ../tools/virt-df.pl:169
25016 "If the kernel has a bug which stops it from accessing a filesystem in one "
25017 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
25018 "and report stats for further guests."
25022 #: ../tools/virt-df.pl:180
25027 #: ../tools/virt-df.pl:182
25029 "Print UUIDs instead of names. This is useful for following a guest even "
25030 "when the guest is migrated or renamed, or when two guests happen to have the "
25035 #: ../tools/virt-df.pl:186
25037 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
25038 "images, we still print the disk image name even when this option is "
25043 #: ../tools/virt-df.pl:609
25044 msgid "NOTE ABOUT CSV FORMAT"
25048 #: ../tools/virt-df.pl:611
25050 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
25051 "should be easy to parse, but it is definitely not easy to parse."
25055 #: ../tools/virt-df.pl:614
25057 "Myth: Just split fields at commas. Reality: This does I<not> work "
25058 "reliably. This example has two columns:"
25062 #: ../tools/virt-df.pl:617
25065 " \"foo,bar\",baz\n"
25070 #: ../tools/virt-df.pl:619
25072 "Myth: Read the file one line at a time. Reality: This does I<not> work "
25073 "reliably. This example has one row:"
25077 #: ../tools/virt-df.pl:622
25086 #: ../tools/virt-df.pl:625
25088 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
25089 "packaged in major Linux distributions)."
25093 #: ../tools/virt-df.pl:628
25095 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
25096 "or Python's built-in csv library)."
25100 #: ../tools/virt-df.pl:631
25101 msgid "Most spreadsheets and databases can import CSV directly."
25105 #: ../tools/virt-ls.pl:35
25106 msgid "virt-ls - List files in a virtual machine"
25110 #: ../tools/virt-ls.pl:39
25113 " virt-ls [--options] domname directory\n"
25118 #: ../tools/virt-ls.pl:41
25121 " virt-ls [--options] disk.img [disk.img ...] directory\n"
25126 #: ../tools/virt-ls.pl:45
25128 "C<virt-ls> is a command line tool to list the names of files in a directory "
25129 "inside a virtual machine or disk image."
25133 #: ../tools/virt-ls.pl:48
25135 "C<virt-ls> is just a simple wrapper around L<libguestfs(3)> functionality. "
25136 "For more complex cases you should look at the L<guestfish(1)> tool."
25140 #: ../tools/virt-ls.pl:52
25142 "C<virt-ls> can be used in one of three modes: simple, long and recursive. A "
25143 "simple listing is like the ordinary L<ls(1)> command:"
25147 #: ../tools/virt-ls.pl:55
25150 " $ virt-ls myguest /\n"
25158 #: ../tools/virt-ls.pl:60
25159 msgid "With the C<-l> (C<--long>) option, C<virt-ls> shows more detail:"
25163 #: ../tools/virt-ls.pl:62
25166 " $ virt-ls -l myguest /\n"
25168 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
25169 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
25175 #: ../tools/virt-ls.pl:68
25177 "With the C<-R> (C<--recursive>) option, C<virt-ls> lists the names of files "
25178 "and directories recursively:"
25182 #: ../tools/virt-ls.pl:71
25185 " $ virt-ls -R myguest /tmp\n"
25193 #: ../tools/virt-ls.pl:76
25195 "You I<cannot> combine these options. To do more complicated things, use "
25200 #: ../tools/virt-ls.pl:132 ../tools/virt-list-filesystems.pl:103 ../tools/virt-list-partitions.pl:112
25201 msgid "B<-l> | B<--long>"
25205 #: ../tools/virt-ls.pl:134
25206 msgid "B<-R> | B<--recursive>"
25210 #: ../tools/virt-ls.pl:136
25212 "Select the mode. With neither of these options, C<virt-ls> produces a "
25213 "simple, flat list of the files in the named directory."
25217 #: ../tools/virt-ls.pl:139
25219 "C<virt-ls -l> produces a \"long listing\", which shows more detail (just "
25220 "like the plain C<ls -l> command)."
25224 #: ../tools/virt-ls.pl:142
25226 "C<virt-ls -R> produces a recursive list of files starting at the named "
25227 "directory. See the documentation for the C<guestfs_find> command "
25228 "L<guestfs(3)> for precise details."
25232 #: ../tools/virt-ls.pl:146
25233 msgid "You cannot combine these options."
25237 #: ../tools/virt-ls.pl:237
25239 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
25240 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
25241 "L<http://libguestfs.org/>."
25245 #: ../tools/virt-resize.pl:42
25246 msgid "virt-resize - Resize a virtual machine disk"
25250 #: ../tools/virt-resize.pl:46
25253 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
25254 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
25255 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
25260 #: ../tools/virt-resize.pl:52
25262 "Virt-resize is a tool which can resize a virtual machine disk, making it "
25263 "larger or smaller overall, and resizing or deleting any partitions contained "
25268 #: ../tools/virt-resize.pl:56
25270 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
25271 "not> be used on live virtual machines - for consistent results, shut the "
25272 "virtual machine down before resizing it."
25276 #: ../tools/virt-resize.pl:60
25278 "If you are not familiar with the associated tools: "
25279 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)> and L<virt-df(1)>, "
25280 "we recommend you go and read those manual pages first."
25284 #: ../tools/virt-resize.pl:68
25286 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
25287 "fill the extra 5GB of space."
25291 #: ../tools/virt-resize.pl:71
25294 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
25295 " virt-list-partitions -lht olddisk\n"
25296 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
25297 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
25302 #: ../tools/virt-resize.pl:76
25304 "As above, but make the /boot partition 200MB bigger, while giving the "
25305 "remaining space to /dev/sda2:"
25309 #: ../tools/virt-resize.pl:79
25312 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
25317 #: ../tools/virt-resize.pl:81
25318 msgid "As above, but the output format will be uncompressed qcow2:"
25322 #: ../tools/virt-resize.pl:83
25325 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
25326 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
25331 #: ../tools/virt-resize.pl:86
25332 msgid "DETAILED USAGE"
25336 #: ../tools/virt-resize.pl:88
25337 msgid "EXPANDING A VIRTUAL MACHINE DISK"
25341 #: ../tools/virt-resize.pl:92
25342 msgid "1. Shut down the virtual machine"
25346 #: ../tools/virt-resize.pl:94
25347 msgid "2. Locate input disk image"
25351 #: ../tools/virt-resize.pl:96
25353 "Locate the input disk image (ie. the file or device on the host containing "
25354 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
25355 "dumpxml> like this to find the disk image name:"
25359 #: ../tools/virt-resize.pl:100
25362 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
25363 " Found 1 nodes:\n"
25365 " <source dev=\"/dev/vg/lv_guest\" />\n"
25370 #: ../tools/virt-resize.pl:105
25371 msgid "3. Look at current sizing"
25375 #: ../tools/virt-resize.pl:107
25376 msgid "Use L<virt-list-partitions(1)> to display the current partitions and sizes:"
25380 #: ../tools/virt-resize.pl:110
25383 " # virt-list-partitions -lht /dev/vg/lv_guest\n"
25384 " /dev/sda1 ext3 101.9M\n"
25385 " /dev/sda2 pv 7.9G\n"
25386 " /dev/sda device 8.0G\n"
25391 #: ../tools/virt-resize.pl:115
25393 "(This example is a virtual machine with an 8 GB disk which we would like to "
25394 "expand up to 10 GB)."
25398 #: ../tools/virt-resize.pl:118
25399 msgid "4. Create output disk"
25403 #: ../tools/virt-resize.pl:120
25405 "Virt-resize cannot do in-place disk modifications. You have to have space "
25406 "to store the resized output disk."
25410 #: ../tools/virt-resize.pl:123
25411 msgid "To store the resized disk image in a file, create a file of a suitable size:"
25415 #: ../tools/virt-resize.pl:126
25418 " # rm -f outdisk\n"
25419 " # truncate -s 10G outdisk\n"
25424 #: ../tools/virt-resize.pl:129
25425 msgid "Or use L<lvcreate(1)> to create a logical volume:"
25429 #: ../tools/virt-resize.pl:131
25432 " # lvcreate -L 10G -n lv_name vg_name\n"
25437 #: ../tools/virt-resize.pl:133
25438 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
25442 #: ../tools/virt-resize.pl:135
25445 " # virsh pool-list\n"
25446 " # virsh vol-create-as poolname newvol 10G\n"
25451 #: ../tools/virt-resize.pl:138
25456 #: ../tools/virt-resize.pl:140
25458 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
25459 "file) and the output disk. The output disk is the one created in the "
25464 #: ../tools/virt-resize.pl:144
25467 " # virt-resize indisk outdisk\n"
25472 #: ../tools/virt-resize.pl:146
25474 "This command just copies disk image C<indisk> to disk image C<outdisk> "
25475 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
25476 "larger, then an extra, empty partition is created at the end of the disk "
25477 "covering the extra space. If C<outdisk> is smaller, then it will give an "
25482 #: ../tools/virt-resize.pl:152
25484 "More realistically you'd want to expand existing partitions in the disk "
25485 "image by passing extra options (for the full list see the L</OPTIONS> "
25490 #: ../tools/virt-resize.pl:156
25492 "L</--expand> is the most useful option. It expands the named partition "
25493 "within the disk to fill any extra space:"
25497 #: ../tools/virt-resize.pl:159
25500 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
25505 #: ../tools/virt-resize.pl:161
25507 "(In this case, an extra partition is I<not> created at the end of the disk, "
25508 "because there will be no unused space)."
25512 #: ../tools/virt-resize.pl:164
25514 "L</--resize> is the other commonly used option. The following would "
25515 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
25516 "rest of the available space:"
25520 #: ../tools/virt-resize.pl:168
25523 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
25524 " indisk outdisk\n"
25529 #: ../tools/virt-resize.pl:171
25531 "If the expanded partition in the image contains a filesystem or LVM PV, then "
25532 "if virt-resize knows how, it will resize the contents, the equivalent of "
25533 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or "
25534 "L<ntfsresize(8)>. However virt-resize does not know how to resize some "
25535 "filesystems, so you would have to online resize them after booting the "
25536 "guest. And virt-resize also does not resize anything inside an LVM PV, it "
25537 "just resizes the PV itself and leaves the user to resize any LVs inside that "
25542 #: ../tools/virt-resize.pl:180
25543 msgid "Other options are covered below."
25547 #: ../tools/virt-resize.pl:182
25552 #: ../tools/virt-resize.pl:184
25553 msgid "Thoroughly test the new disk image I<before> discarding the old one."
25557 #: ../tools/virt-resize.pl:186
25558 msgid "If you are using libvirt, edit the XML to point at the new disk:"
25562 #: ../tools/virt-resize.pl:188
25565 " # virsh edit guestname\n"
25570 #: ../tools/virt-resize.pl:190
25572 "Change E<lt>source ...E<gt>, see "
25573 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
25577 #: ../tools/virt-resize.pl:193
25578 msgid "Then start up the domain with the new, resized disk:"
25582 #: ../tools/virt-resize.pl:195
25585 " # virsh start guestname\n"
25590 #: ../tools/virt-resize.pl:197
25592 "and check that it still works. See also the L</NOTES> section below for "
25593 "additional information."
25597 #: ../tools/virt-resize.pl:200
25598 msgid "7. Resize LVs etc inside the guest"
25602 #: ../tools/virt-resize.pl:202
25603 msgid "(This can also be done offline using L<guestfish(1)>)"
25607 #: ../tools/virt-resize.pl:204
25609 "Once the guest has booted you should see the new space available, at least "
25610 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
25611 "may need to resize LVs inside PVs, and also resize filesystem types that "
25612 "virt-resize does not know how to expand."
25616 #: ../tools/virt-resize.pl:211
25617 msgid "SHRINKING A VIRTUAL MACHINE DISK"
25621 #: ../tools/virt-resize.pl:213
25623 "Shrinking is somewhat more complex than expanding, and only an overview is "
25628 #: ../tools/virt-resize.pl:216
25630 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
25631 "filesystems). The user has to shrink content before passing the disk image "
25632 "to virt-resize, and virt-resize will check that the content has been shrunk "
25637 #: ../tools/virt-resize.pl:221
25638 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
25642 #: ../tools/virt-resize.pl:223
25644 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
25645 "steps 3 and 4 above to allocate a new disk image."
25649 #: ../tools/virt-resize.pl:226
25650 msgid "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
25654 #: ../tools/virt-resize.pl:229
25655 msgid "IGNORING OR DELETING PARTITIONS"
25659 #: ../tools/virt-resize.pl:231
25661 "virt-resize also gives a convenient way to ignore or delete partitions when "
25662 "copying from the input disk to the output disk. Ignoring a partition speeds "
25663 "up the copy where you don't care about the existing contents of a "
25664 "partition. Deleting a partition removes it completely, but note that it "
25665 "also renumbers any partitions after the one which is deleted, which can "
25666 "leave some guests unbootable."
25670 #: ../tools/virt-resize.pl:238
25671 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
25675 #: ../tools/virt-resize.pl:240
25677 "If the input disk is in qcow2 format, then you may prefer that the output is "
25678 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
25679 "the fly. The output format is simply determined by the format of the empty "
25680 "output container that you provide. Thus to create qcow2 output, use:"
25684 #: ../tools/virt-resize.pl:246
25687 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
25692 #: ../tools/virt-resize.pl:248
25693 msgid "instead of the truncate command (use C<-c> for a compressed disk)."
25697 #: ../tools/virt-resize.pl:250
25698 msgid "Similarly, to get non-sparse raw output use:"
25702 #: ../tools/virt-resize.pl:252
25705 " fallocate -l size outdisk\n"
25710 #: ../tools/virt-resize.pl:254
25712 "(on older systems that don't have the L<fallocate(1)> command use C<dd "
25713 "if=/dev/zero of=outdisk bs=1M count=..>)"
25717 #: ../tools/virt-resize.pl:267
25718 msgid "Display help."
25722 #: ../tools/virt-resize.pl:281
25723 msgid "B<--resize part=size>"
25727 #: ../tools/virt-resize.pl:283
25729 "Resize the named partition (expanding or shrinking it) so that it has the "
25734 #: ../tools/virt-resize.pl:286
25736 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
25737 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
25738 "Exabytes; or as a percentage of the current size; or as a relative number or "
25739 "percentage. For example:"
25743 #: ../tools/virt-resize.pl:291
25746 " --resize /dev/sda2=10G\n"
25751 #: ../tools/virt-resize.pl:293
25754 " --resize /dev/sda4=90%\n"
25759 #: ../tools/virt-resize.pl:295
25762 " --resize /dev/sda2=+1G\n"
25767 #: ../tools/virt-resize.pl:297
25770 " --resize /dev/sda2=-200M\n"
25775 #: ../tools/virt-resize.pl:299
25778 " --resize /dev/sda1=+128K\n"
25783 #: ../tools/virt-resize.pl:301
25786 " --resize /dev/sda1=+10%\n"
25791 #: ../tools/virt-resize.pl:303
25794 " --resize /dev/sda1=-10%\n"
25799 #: ../tools/virt-resize.pl:305
25801 "You can increase the size of any partition. Virt-resize will expand the "
25802 "direct content of the partition if it knows how (see C<--expand> below)."
25806 #: ../tools/virt-resize.pl:309
25808 "You can only I<decrease> the size of partitions that contain filesystems or "
25809 "PVs which have already been shrunk. Virt-resize will check this has been "
25810 "done before proceeding, or else will print an error (see also "
25811 "C<--resize-force>)."
25815 #: ../tools/virt-resize.pl:314 ../tools/virt-resize.pl:406 ../tools/virt-resize.pl:423
25816 msgid "You can give this option multiple times."
25820 #: ../tools/virt-resize.pl:320
25821 msgid "B<--resize-force part=size>"
25825 #: ../tools/virt-resize.pl:322
25827 "This is the same as C<--resize> except that it will let you decrease the "
25828 "size of any partition. Generally this means you will lose any data which "
25829 "was at the end of the partition you shrink, but you may not care about that "
25830 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
25831 "as a swap partition)."
25835 #: ../tools/virt-resize.pl:328
25836 msgid "See also the C<--ignore> option."
25840 #: ../tools/virt-resize.pl:334
25841 msgid "B<--expand part>"
25845 #: ../tools/virt-resize.pl:336
25847 "Expand the named partition so it uses up all extra space (space left over "
25848 "after any other resize changes that you request have been done)."
25852 #: ../tools/virt-resize.pl:339
25854 "If virt-resize knows how, it will expand the direct content of the "
25855 "partition. For example, if the partition is an LVM PV, it will expand the "
25856 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
25857 "content it doesn't know about alone."
25861 #: ../tools/virt-resize.pl:344
25862 msgid "Currently virt-resize can resize:"
25866 #: ../tools/virt-resize.pl:350
25868 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
25873 #: ../tools/virt-resize.pl:355
25875 "NTFS filesystems contained directly in a partition, if libguestfs was "
25876 "compiled with support for NTFS."
25880 #: ../tools/virt-resize.pl:358
25882 "The filesystem must have been shut down consistently last time it was used. "
25883 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
25884 "consistency check, so at the first boot after resizing Windows will check "
25889 #: ../tools/virt-resize.pl:365
25891 "LVM PVs (physical volumes). However virt-resize does I<not> resize anything "
25892 "inside the PV. The user will have to resize LVs as desired."
25896 #: ../tools/virt-resize.pl:371 ../tools/virt-resize.pl:393
25897 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
25901 #: ../tools/virt-resize.pl:377
25902 msgid "B<--shrink part>"
25906 #: ../tools/virt-resize.pl:379
25908 "Shrink the named partition until the overall disk image fits in the "
25909 "destination. The named partition B<must> contain a filesystem or PV which "
25910 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
25911 "online tools). Virt-resize will check this and give an error if it has not "
25916 #: ../tools/virt-resize.pl:385
25918 "The amount by which the overall disk must be shrunk (after carrying out all "
25919 "other operations requested by the user) is called the \"deficit\". For "
25920 "example, a straight copy (assume no other operations) from a 5GB disk image "
25921 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
25922 "would give an error unless the user specified a partition to shrink and that "
25923 "partition had more than a gigabyte of free space."
25927 #: ../tools/virt-resize.pl:399
25928 msgid "B<--ignore part>"
25932 #: ../tools/virt-resize.pl:401
25934 "Ignore the named partition. Effectively this means the partition is "
25935 "allocated on the destination disk, but the content is not copied across from "
25936 "the source disk. The content of the partition will be blank (all zero "
25941 #: ../tools/virt-resize.pl:412
25942 msgid "B<--delete part>"
25946 #: ../tools/virt-resize.pl:414
25948 "Delete the named partition. It would be more accurate to describe this as "
25949 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
25950 "the original disk image is left intact."
25954 #: ../tools/virt-resize.pl:418
25956 "Note that when you delete a partition, then anything contained in the "
25957 "partition is also deleted. Furthermore, this causes any partitions that "
25958 "come after to be I<renumbered>, which can easily make your guest unbootable."
25962 #: ../tools/virt-resize.pl:429
25963 msgid "B<--LV-expand logvol>"
25967 #: ../tools/virt-resize.pl:431
25969 "This takes the logical volume and, as a final step, expands it to fill all "
25970 "the space available in its volume group. A typical usage, assuming a Linux "
25971 "guest with a single PV C</dev/sda2> and a root device called "
25972 "C</dev/vg_guest/lv_root> would be:"
25976 #: ../tools/virt-resize.pl:436
25979 " virt-resize indisk outdisk \\\n"
25980 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
25985 #: ../tools/virt-resize.pl:439
25987 "This would first expand the partition (and PV), and then expand the root "
25988 "device to fill the extra space in the PV."
25992 #: ../tools/virt-resize.pl:442
25994 "The contents of the LV are also resized if virt-resize knows how to do "
25995 "that. You can stop virt-resize from trying to expand the content by using "
25996 "the option C<--no-expand-content>."
26000 #: ../tools/virt-resize.pl:446
26001 msgid "Use L<virt-list-filesystems(1)> to list the filesystems in the guest."
26005 #: ../tools/virt-resize.pl:449
26007 "You can give this option multiple times, I<but> it doesn't make sense to do "
26008 "this unless the logical volumes you specify are all in different volume "
26013 #: ../tools/virt-resize.pl:457
26014 msgid "B<--no-copy-boot-loader>"
26018 #: ../tools/virt-resize.pl:459
26020 "By default, virt-resize copies over some sectors at the start of the disk "
26021 "(up to the beginning of the first partition). Commonly these sectors "
26022 "contain the Master Boot Record (MBR) and the boot loader, and are required "
26023 "in order for the guest to boot correctly."
26027 #: ../tools/virt-resize.pl:464
26029 "If you specify this flag, then this initial copy is not done. You may need "
26030 "to reinstall the boot loader in this case."
26034 #: ../tools/virt-resize.pl:472
26035 msgid "B<--no-extra-partition>"
26039 #: ../tools/virt-resize.pl:474
26041 "By default, virt-resize creates an extra partition if there is any extra, "
26042 "unused space after all resizing has happened. Use this option to prevent "
26043 "the extra partition from being created. If you do this then the extra space "
26044 "will be inaccessible until you run fdisk, parted, or some other partitioning "
26045 "tool in the guest."
26049 #: ../tools/virt-resize.pl:480
26051 "Note that if the surplus space is smaller than 10 MB, no extra partition "
26056 #: ../tools/virt-resize.pl:487
26057 msgid "B<--no-expand-content>"
26061 #: ../tools/virt-resize.pl:489
26063 "By default, virt-resize will try to expand the direct contents of "
26064 "partitions, if it knows how (see C<--expand> option above)."
26068 #: ../tools/virt-resize.pl:492
26070 "If you give the C<--no-expand-content> option then virt-resize will not "
26075 #: ../tools/virt-resize.pl:499
26076 msgid "B<-d> | B<--debug>"
26080 #: ../tools/virt-resize.pl:507
26081 msgid "B<-n> | B<--dryrun>"
26085 #: ../tools/virt-resize.pl:509
26086 msgid "Print a summary of what would be done, but don't do anything."
26090 #: ../tools/virt-resize.pl:515
26091 msgid "B<-q> | B<--quiet>"
26095 #: ../tools/virt-resize.pl:517
26096 msgid "Don't print the summary."
26100 #: ../tools/virt-resize.pl:525
26102 "Specify the format of the input disk image. If this flag is not given then "
26103 "it is auto-detected from the image itself."
26107 #: ../tools/virt-resize.pl:531
26109 "Note that this option I<does not> affect the output format. See L</QCOW2 "
26110 "AND NON-SPARSE RAW FORMATS>."
26114 #: ../tools/virt-resize.pl:538
26115 msgid "B<--output-format> raw"
26119 #: ../tools/virt-resize.pl:540
26121 "Specify the format of the output disk image. If this flag is not given then "
26122 "it is auto-detected from the image itself."
26126 #: ../tools/virt-resize.pl:546
26128 "Note that you still need to create the output disk with the right format. "
26129 "See L</QCOW2 AND NON-SPARSE RAW FORMATS>."
26133 #: ../tools/virt-resize.pl:1422 ../tools/virt-rescue.pl:90
26138 #: ../tools/virt-resize.pl:1424
26139 msgid "\"Partition 1 does not end on cylinder boundary.\""
26143 #: ../tools/virt-resize.pl:1426
26145 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
26146 "means the partitions will not be aligned to the ancient CHS geometry. "
26147 "However CHS geometry is meaningless for disks manufactured since the early "
26148 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
26149 "cylinders is not required by any modern operating system."
26153 #: ../tools/virt-resize.pl:1433
26154 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
26158 #: ../tools/virt-resize.pl:1435
26160 "In Windows Vista and later versions, Microsoft switched to using a separate "
26161 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
26162 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
26163 "the boot partition. Doing so seems to break the guest completely. However "
26164 "expanding the second partition (ie. C: drive) should work."
26168 #: ../tools/virt-resize.pl:1442
26170 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
26171 "NTFS partitions have been expanded. This is just a safety check and (unless "
26172 "it find errors) is nothing to worry about."
26176 #: ../tools/virt-resize.pl:1446
26177 msgid "GUEST BOOT STUCK AT \"GRUB\""
26181 #: ../tools/virt-resize.pl:1448
26183 "If a Linux guest does not boot after resizing, and the boot is stuck after "
26184 "printing C<GRUB> on the console, try reinstalling grub. This sometimes "
26185 "happens on older (RHEL 5-era) guests, for reasons we don't fully understand, "
26186 "although we think is to do with partition alignment."
26190 #: ../tools/virt-resize.pl:1453
26193 " guestfish -i -a newdisk\n"
26194 " ><fs> cat /boot/grub/device.map\n"
26195 " # check the contents of this file are sensible or\n"
26196 " # edit the file if necessary\n"
26197 " ><fs> grub-install / /dev/vda\n"
26203 #: ../tools/virt-resize.pl:1460
26205 "For more flexible guest reconfiguration, including if you need to specify "
26206 "other parameters to grub-install, use L<virt-rescue(1)>."
26210 #: ../tools/virt-resize.pl:1463
26211 msgid "ALTERNATIVE TOOLS"
26215 #: ../tools/virt-resize.pl:1465
26217 "There are several proprietary tools for resizing partitions. We won't "
26218 "mention any here."
26222 #: ../tools/virt-resize.pl:1468
26224 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
26225 "operations on disk images. They can resize and move partitions, but I don't "
26226 "think they can do anything with the contents, and they certainly don't "
26231 #: ../tools/virt-resize.pl:1473
26233 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
26234 "but at a much lower level. You will probably end up hand-calculating sector "
26235 "offsets, which is something that virt-resize was designed to avoid. If you "
26236 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
26241 #: ../tools/virt-resize.pl:1488
26243 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)>, L<virt-df(1)>, "
26244 "L<guestfs(3)>, L<guestfish(1)>, L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, "
26245 "L<resize2fs(8)>, L<ntfsresize(8)>, L<virsh(1)>, L<parted(8)>, "
26246 "L<truncate(1)>, L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, "
26247 "L<virt-rescue(1)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
26251 #: ../tools/virt-list-filesystems.pl:32
26252 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
26256 #: ../tools/virt-list-filesystems.pl:36
26259 " virt-list-filesystems [--options] domname\n"
26264 #: ../tools/virt-list-filesystems.pl:38
26267 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
26272 #: ../tools/virt-list-filesystems.pl:42
26274 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
26275 "are contained in a virtual machine or disk image."
26279 #: ../tools/virt-list-filesystems.pl:46
26281 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
26282 "functionality. For more complex cases you should look at the "
26283 "L<guestfish(1)> tool."
26287 #: ../tools/virt-list-filesystems.pl:105
26289 "With this option, C<virt-list-filesystems> displays the type of each "
26290 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
26294 #: ../tools/virt-list-filesystems.pl:112
26295 msgid "B<-a> | B<--all>"
26299 #: ../tools/virt-list-filesystems.pl:114
26301 "Normally we only show mountable filesystems. If this option is given then "
26302 "swap devices are shown too."
26306 #: ../tools/virt-list-filesystems.pl:218
26308 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
26309 "L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
26310 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
26314 #: ../tools/virt-cat.pl:34
26315 msgid "virt-cat - Display a file in a virtual machine"
26319 #: ../tools/virt-cat.pl:38
26322 " virt-cat [--options] domname file\n"
26327 #: ../tools/virt-cat.pl:40
26330 " virt-cat [--options] disk.img [disk.img ...] file\n"
26335 #: ../tools/virt-cat.pl:44
26337 "C<virt-cat> is a command line tool to display the contents of C<file> where "
26338 "C<file> exists in the named virtual machine (or disk image)."
26342 #: ../tools/virt-cat.pl:47
26344 "C<virt-cat> can be used to quickly view a single file. To edit a file, use "
26345 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
26350 #: ../tools/virt-cat.pl:53
26351 msgid "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
26355 #: ../tools/virt-cat.pl:56
26358 " virt-cat mydomain /etc/fstab\n"
26363 #: ../tools/virt-cat.pl:58
26364 msgid "List syslog messages from a VM:"
26368 #: ../tools/virt-cat.pl:60
26371 " virt-cat mydomain /var/log/messages | tail\n"
26376 #: ../tools/virt-cat.pl:62
26377 msgid "Find out what DHCP IP address a VM acquired:"
26381 #: ../tools/virt-cat.pl:64
26384 " virt-cat mydomain /var/log/messages | grep 'dhclient: bound to' | tail\n"
26389 #: ../tools/virt-cat.pl:66
26390 msgid "Find out what packages were recently installed:"
26394 #: ../tools/virt-cat.pl:68
26397 " virt-cat mydomain /var/log/yum.log | tail\n"
26402 #: ../tools/virt-cat.pl:70
26403 msgid "Find out who is logged on inside a virtual machine:"
26407 #: ../tools/virt-cat.pl:72
26410 " virt-cat mydomain /var/run/utmp > /tmp/utmp\n"
26416 #: ../tools/virt-cat.pl:75
26417 msgid "or who was logged on:"
26421 #: ../tools/virt-cat.pl:77
26424 " virt-cat mydomain /var/log/wtmp > /tmp/wtmp\n"
26425 " last -f /tmp/wtmp\n"
26430 #: ../tools/virt-cat.pl:190
26432 "L<guestfs(3)>, L<guestfish(1)>, L<virt-edit(1)>, L<Sys::Guestfs(3)>, "
26433 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
26437 #: ../tools/virt-tar.pl:34
26438 msgid "virt-tar - Extract or upload files to a virtual machine"
26442 #: ../tools/virt-tar.pl:38
26445 " virt-tar [--options] -x domname directory tarball\n"
26450 #: ../tools/virt-tar.pl:40
26453 " virt-tar [--options] -u domname tarball directory\n"
26458 #: ../tools/virt-tar.pl:42
26461 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
26466 #: ../tools/virt-tar.pl:44
26469 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
26474 #: ../tools/virt-tar.pl:48
26475 msgid "Download C</home> from the VM into a local tarball:"
26479 #: ../tools/virt-tar.pl:50
26482 " virt-tar -x domname /home home.tar\n"
26487 #: ../tools/virt-tar.pl:52
26490 " virt-tar -zx domname /home home.tar.gz\n"
26495 #: ../tools/virt-tar.pl:54
26496 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
26500 #: ../tools/virt-tar.pl:56
26503 " virt-tar -u domname uploadstuff.tar /tmp\n"
26508 #: ../tools/virt-tar.pl:58
26511 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
26516 #: ../tools/virt-tar.pl:62
26518 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
26519 "virtual machines. If you do this, you risk disk corruption in the VM. "
26520 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
26524 #: ../tools/virt-tar.pl:67
26526 "You can use C<-x> (extract) on live virtual machines, but you might get "
26527 "inconsistent results or errors if there is filesystem activity inside the "
26528 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
26529 "work, but the only way to guarantee consistent results is if the virtual "
26530 "machine is shut down."
26534 #: ../tools/virt-tar.pl:75
26536 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
26537 "parts of a guest filesystem. There are many possibilities: making backups, "
26538 "uploading data files, snooping on guest activity, fixing or customizing "
26543 #: ../tools/virt-tar.pl:80
26545 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
26546 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
26547 "should look at the L<guestfish(1)> tool."
26551 #: ../tools/virt-tar.pl:84
26553 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
26554 "its contents (recursively) from the virtual machine into a local tarball. "
26555 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
26556 "virtual machine. You cannot use these two options together."
26560 #: ../tools/virt-tar.pl:90
26562 "In addition, you may need to use the C<-z> (gZip) option to enable "
26563 "compression. When uploading, you have to specify C<-z> if the upload file "
26564 "is compressed because virt-tar won't detect this on its own."
26568 #: ../tools/virt-tar.pl:94
26570 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
26571 "example it cannot do PKZip files or bzip2 compression. If you want that "
26572 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
26573 "the L<libguestfs(3)> API)."
26577 #: ../tools/virt-tar.pl:152
26578 msgid "B<-x> | B<--extract> | B<--download>"
26582 #: ../tools/virt-tar.pl:154
26583 msgid "B<-u> | B<--upload>"
26587 #: ../tools/virt-tar.pl:156
26589 "Use C<-x> to extract (download) a directory from a virtual machine to a "
26594 #: ../tools/virt-tar.pl:159
26596 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
26597 "Please read the L</WARNING> section above before using this option."
26601 #: ../tools/virt-tar.pl:163
26602 msgid "You must specify exactly one of these options."
26606 #: ../tools/virt-tar.pl:169
26607 msgid "B<-z> | B<--gzip>"
26611 #: ../tools/virt-tar.pl:171
26612 msgid "Specify that the input or output tarball is gzip-compressed."
26616 #: ../tools/virt-tar.pl:285
26618 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
26619 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
26620 "L<http://libguestfs.org/>."
26624 #: ../tools/virt-rescue.pl:33
26625 msgid "virt-rescue - Run a rescue shell on a virtual machine"
26629 #: ../tools/virt-rescue.pl:37
26632 " virt-rescue [--options] domname\n"
26637 #: ../tools/virt-rescue.pl:39
26640 " virt-rescue [--options] disk.img [disk.img ...]\n"
26645 #: ../tools/virt-rescue.pl:43
26647 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
26648 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
26649 "you from doing this, but doesn't catch all cases."
26653 #: ../tools/virt-rescue.pl:47
26655 "However if you use the I<--ro> (read only) option, then you can attach a "
26656 "shell to a live virtual machine. The results might be strange or "
26657 "inconsistent at times but you won't get disk corruption."
26661 #: ../tools/virt-rescue.pl:53
26663 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
26664 "need for a CD. virt-rescue gives you a rescue shell and some simple "
26665 "recovery tools which you can use to examine or rescue a virtual machine or "
26670 #: ../tools/virt-rescue.pl:58
26672 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
26673 "on disk image(s):"
26677 #: ../tools/virt-rescue.pl:61
26680 " virt-rescue GuestName\n"
26685 #: ../tools/virt-rescue.pl:63
26688 " virt-rescue --ro /path/to/disk.img\n"
26693 #: ../tools/virt-rescue.pl:65
26696 " virt-rescue /dev/sdc\n"
26701 #: ../tools/virt-rescue.pl:67
26702 msgid "For live VMs you I<must> use the --ro option."
26706 #: ../tools/virt-rescue.pl:69
26708 "When you run virt-rescue on a virtual machine or disk image, you are placed "
26709 "in an interactive bash shell where you can use many ordinary Linux "
26710 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
26711 "appliance. You must mount the virtual machine's filesystems by hand. There "
26712 "is an empty directory called C</sysroot> where you can mount filesystems."
26716 #: ../tools/virt-rescue.pl:76
26718 "In the example below, we list logical volumes, then choose one to mount "
26719 "under C</sysroot>:"
26723 #: ../tools/virt-rescue.pl:79
26727 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
26728 " lv_root vg_f11x64 -wi-a- 8.83G\n"
26729 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
26730 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
26731 " ><rescue> ls /sysroot\n"
26736 #: ../tools/virt-rescue.pl:86
26738 "If you don't know what filesystems are available on the virtual machine then "
26739 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
26743 #: ../tools/virt-rescue.pl:92
26745 "Virt-rescue can be used on I<any> disk image file or device, not just a "
26746 "virtual machine. For example you can use it on a blank file if you want to "
26747 "partition that file (although we would recommend using L<guestfish(1)> "
26748 "instead as it is more suitable for this purpose). You can even use "
26749 "virt-rescue on things like SD cards."
26753 #: ../tools/virt-rescue.pl:98
26755 "This tool is just designed for quick interactive hacking on a virtual "
26756 "machine. For more structured access to a virtual machine disk image, you "
26757 "should use L<guestfs(3)>. To get a structured shell that you can use to "
26758 "make scripted changes to guests, use L<guestfish(1)>."
26762 #: ../tools/virt-rescue.pl:127
26763 msgid "B<--append kernelopts>"
26767 #: ../tools/virt-rescue.pl:129
26768 msgid "Pass additional options to the rescue kernel."
26772 #: ../tools/virt-rescue.pl:164
26773 msgid "B<--memsize MB> | B<-m MB>"
26777 #: ../tools/virt-rescue.pl:166
26779 "Change the amount of memory allocated to the rescue system. The default is "
26780 "set by libguestfs and is small but adequate for running system tools. The "
26781 "occasional program might need more memory. The parameter is specified in "
26786 #: ../tools/virt-rescue.pl:175
26787 msgid "B<--network MB>"
26791 #: ../tools/virt-rescue.pl:177
26792 msgid "Enable QEMU user networking in the guest."
26796 #: ../tools/virt-rescue.pl:183
26797 msgid "B<--ro> | B<-r>"
26801 #: ../tools/virt-rescue.pl:185
26802 msgid "Open the image read-only."
26806 #: ../tools/virt-rescue.pl:197
26808 "Enable SELinux in the rescue appliance. You should read "
26809 "L<guestfs(3)/SELINUX> before using this option."
26813 #: ../tools/virt-rescue.pl:257
26815 "Several environment variables affect virt-rescue. See "
26816 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
26820 #: ../tools/virt-rescue.pl:269
26822 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
26823 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
26827 #: ../tools/virt-make-fs.pl:37
26828 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
26832 #: ../tools/virt-make-fs.pl:41
26835 " virt-make-fs [--options] input.tar output.img\n"
26840 #: ../tools/virt-make-fs.pl:43
26843 " virt-make-fs [--options] input.tar.gz output.img\n"
26848 #: ../tools/virt-make-fs.pl:45
26851 " virt-make-fs [--options] directory output.img\n"
26856 #: ../tools/virt-make-fs.pl:49
26858 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
26859 "archive or some files in a directory. It is similar to tools like "
26860 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
26861 "it can create common filesystem types like ext2/3 or NTFS, which can be "
26862 "useful if you want to attach these filesystems to existing virtual machines "
26863 "(eg. to import large amounts of read-only data to a VM)."
26867 #: ../tools/virt-make-fs.pl:57
26868 msgid "Basic usage is:"
26872 #: ../tools/virt-make-fs.pl:59
26875 " virt-make-fs input output\n"
26880 #: ../tools/virt-make-fs.pl:61
26882 "where C<input> is either a directory containing files that you want to add, "
26883 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
26884 "C<output> is a disk image. The input type is detected automatically. The "
26885 "output disk image defaults to a raw ext2 image unless you specify extra "
26886 "flags (see L</OPTIONS> below)."
26890 #: ../tools/virt-make-fs.pl:67
26891 msgid "EXTRA SPACE"
26895 #: ../tools/virt-make-fs.pl:69
26897 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
26898 "the files that it contains, but might have extra space. Depending on how "
26899 "you are going to use the output, you might think this extra space is wasted "
26900 "and want to minimize it, or you might want to leave space so that more files "
26901 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
26902 "but you can use the C<--size> flag to leave space in the filesystem if you "
26907 #: ../tools/virt-make-fs.pl:77
26909 "An alternative way to leave extra space but not make the output image any "
26910 "bigger is to use an alternative disk image format (instead of the default "
26911 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
26912 "image format (check your hypervisor supports this before using it). This "
26913 "allows you to choose a large C<--size> but the extra space won't actually be "
26914 "allocated in the image until you try to store something in it."
26918 #: ../tools/virt-make-fs.pl:85
26920 "Don't forget that you can also use local commands including L<resize2fs(8)> "
26921 "and L<virt-resize(1)> to resize existing filesystems, or rerun "
26922 "virt-make-resize to build another image from scratch."
26926 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123 ../tools/virt-make-fs.pl:142
26931 #: ../tools/virt-make-fs.pl:91
26934 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
26939 #: ../tools/virt-make-fs.pl:93
26940 msgid "FILESYSTEM TYPE"
26944 #: ../tools/virt-make-fs.pl:95
26946 "The default filesystem type is C<ext2>. Just about any filesystem type that "
26947 "libguestfs supports can be used (but I<not> read-only formats like "
26948 "ISO9660). Here are some of the more common choices:"
26952 #: ../tools/virt-make-fs.pl:101
26957 #: ../tools/virt-make-fs.pl:103
26959 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
26960 "you are not going to use the filesystem in a way that requires the journal, "
26961 "then this is just wasted overhead."
26965 #: ../tools/virt-make-fs.pl:107
26966 msgid "I<ntfs> or I<vfat>"
26970 #: ../tools/virt-make-fs.pl:109
26971 msgid "Useful if exporting data to a Windows guest."
26975 #: ../tools/virt-make-fs.pl:111
26977 "I<Note for vfat>: The tar archive or local directory must only contain files "
26978 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
26979 "program running within libguestfs is unable to change the ownership of "
26980 "non-root files, since vfat itself does not support this."
26984 #: ../tools/virt-make-fs.pl:116
26989 #: ../tools/virt-make-fs.pl:118
26991 "Lower overhead than C<ext2>, but certain limitations on filename length and "
26992 "total filesystem size."
26996 #: ../tools/virt-make-fs.pl:125
26999 " virt-make-fs --type=minix input minixfs.img\n"
27004 #: ../tools/virt-make-fs.pl:127
27005 msgid "TO PARTITION OR NOT TO PARTITION"
27009 #: ../tools/virt-make-fs.pl:129
27010 msgid "Optionally virt-make-fs can add a partition table to the output disk."
27014 #: ../tools/virt-make-fs.pl:131
27016 "Adding a partition can make the disk image more compatible with certain "
27017 "virtualized operating systems which don't expect to see a filesystem "
27018 "directly located on a block device (Linux doesn't care and will happily "
27019 "handle both types)."
27023 #: ../tools/virt-make-fs.pl:136
27025 "On the other hand, if you have a partition table then the output image is no "
27026 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
27027 "directly on a partitioned disk image. (However libguestfs tools such as "
27028 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
27032 #: ../tools/virt-make-fs.pl:144
27033 msgid "Add an MBR partition:"
27037 #: ../tools/virt-make-fs.pl:146
27040 " virt-make-fs --partition -- input disk.img\n"
27045 #: ../tools/virt-make-fs.pl:148
27047 "If the output disk image could be terabyte-sized or larger, it's better to "
27048 "use an EFI/GPT-compatible partition table:"
27052 #: ../tools/virt-make-fs.pl:151
27055 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
27060 #: ../tools/virt-make-fs.pl:179
27061 msgid "Enable debugging information."
27065 #: ../tools/virt-make-fs.pl:185
27066 msgid "B<--size=E<lt>NE<gt>>"
27070 #: ../tools/virt-make-fs.pl:187
27071 msgid "B<--size=+E<lt>NE<gt>>"
27075 #: ../tools/virt-make-fs.pl:189
27076 msgid "B<-s E<lt>NE<gt>>"
27080 #: ../tools/virt-make-fs.pl:191
27081 msgid "B<-s +E<lt>NE<gt>>"
27085 #: ../tools/virt-make-fs.pl:193
27086 msgid "Use the C<--size> (or C<-s>) option to choose the size of the output image."
27090 #: ../tools/virt-make-fs.pl:196
27092 "If this option is I<not> given, then the output image will be just large "
27093 "enough to contain all the files, with not much wasted space."
27097 #: ../tools/virt-make-fs.pl:199
27099 "To choose a fixed size output disk, specify an absolute number followed by "
27100 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
27101 "Petabytes or Exabytes. This must be large enough to contain all the input "
27102 "files, else you will get an error."
27106 #: ../tools/virt-make-fs.pl:204
27108 "To leave extra space, specify C<+> (plus sign) and a number followed by "
27109 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
27110 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
27111 "the input files, and (approximately) an extra 200 MB free space."
27115 #: ../tools/virt-make-fs.pl:210
27117 "Note that virt-make-fs estimates free space, and therefore will not produce "
27118 "filesystems containing precisely the free space requested. (It is much more "
27119 "expensive and time-consuming to produce a filesystem which has precisely the "
27120 "desired free space)."
27124 #: ../tools/virt-make-fs.pl:219
27125 msgid "B<--format=E<lt>fmtE<gt>>"
27129 #: ../tools/virt-make-fs.pl:221
27130 msgid "B<-F E<lt>fmtE<gt>>"
27134 #: ../tools/virt-make-fs.pl:223
27135 msgid "Choose the output disk image format."
27139 #: ../tools/virt-make-fs.pl:225
27140 msgid "The default is C<raw> (raw disk image)."
27144 #: ../tools/virt-make-fs.pl:227
27146 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
27147 "that would really make sense here is C<qcow2>."
27151 #: ../tools/virt-make-fs.pl:234
27152 msgid "B<--type=E<lt>fsE<gt>>"
27156 #: ../tools/virt-make-fs.pl:236
27157 msgid "B<-t E<lt>fsE<gt>>"
27161 #: ../tools/virt-make-fs.pl:238
27162 msgid "Choose the output filesystem type."
27166 #: ../tools/virt-make-fs.pl:240
27167 msgid "The default is C<ext2>."
27171 #: ../tools/virt-make-fs.pl:242
27172 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
27176 #: ../tools/virt-make-fs.pl:249
27177 msgid "B<--partition>"
27181 #: ../tools/virt-make-fs.pl:251
27182 msgid "B<--partition=E<lt>parttypeE<gt>>"
27186 #: ../tools/virt-make-fs.pl:253
27188 "If specified, this flag adds an MBR partition table to the output disk "
27193 #: ../tools/virt-make-fs.pl:256
27195 "You can change the partition table type, eg. C<--partition=gpt> for large "
27200 #: ../tools/virt-make-fs.pl:259
27202 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
27203 "might consider the next parameter to be the partition type. For example:"
27207 #: ../tools/virt-make-fs.pl:263
27210 " virt-make-fs --partition input.tar ...\n"
27215 #: ../tools/virt-make-fs.pl:265
27217 "would cause virt-make-fs to think you wanted to use a partition type of "
27218 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
27219 "dash) between options and the input file argument:"
27223 #: ../tools/virt-make-fs.pl:269
27226 " virt-make-fs --partition -- input.tar ...\n"
27231 #: ../tools/virt-make-fs.pl:536
27233 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<mkisofs(1)>, "
27234 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
27235 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
27239 #: ../tools/virt-make-fs.pl:553
27242 " export LIBGUESTFS_DEBUG=1\n"
27243 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
27248 #: ../tools/virt-make-fs.pl:556
27250 "Attach /tmp/virt-make-fs.log to a new bug report at "
27251 "L<https://bugzilla.redhat.com/>"
27255 #: ../tools/virt-list-partitions.pl:32
27256 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
27260 #: ../tools/virt-list-partitions.pl:36
27263 " virt-list-partitions [--options] domname\n"
27268 #: ../tools/virt-list-partitions.pl:38
27271 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
27276 #: ../tools/virt-list-partitions.pl:42
27278 "C<virt-list-partitions> is a command line tool to list the partitions that "
27279 "are contained in a virtual machine or disk image. It is mainly useful as a "
27280 "first step to using L<virt-resize(1)>."
27284 #: ../tools/virt-list-partitions.pl:47
27286 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
27287 "functionality. For more complex cases you should look at the "
27288 "L<guestfish(1)> tool."
27292 #: ../tools/virt-list-partitions.pl:104
27293 msgid "B<-h> | B<--human-readable>"
27297 #: ../tools/virt-list-partitions.pl:106
27298 msgid "Show sizes in human-readable form (eg. \"1G\")."
27302 #: ../tools/virt-list-partitions.pl:114
27304 "With this option, C<virt-list-partitions> displays the type and size of each "
27305 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
27309 #: ../tools/virt-list-partitions.pl:121
27310 msgid "B<-t> | B<--total>"
27314 #: ../tools/virt-list-partitions.pl:123
27315 msgid "Display the total size of each block device (as a separate row or rows)."
27319 #: ../tools/virt-list-partitions.pl:256
27321 "L<guestfs(3)>, L<guestfish(1)>, L<virt-list-filesystems(1)>, "
27322 "L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
27323 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."