1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Red Hat Inc.
3 # This file is distributed under the same license as the libguestfs package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: libguestfs 1.7.2\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2010-11-05 12:18+0000\n"
12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=utf-8\n"
17 "Content-Transfer-Encoding: ENCODING"
20 #: ../src/guestfs.pod:1 ../fish/guestfish.pod:1 ../test-tool/libguestfs-test-tool.pod:1 ../fuse/guestmount.pod:1 ../inspector/virt-inspector.pl:31 ../tools/virt-edit.pl:30 ../tools/virt-win-reg.pl:33 ../tools/virt-df.pl:32 ../tools/virt-ls.pl:30 ../tools/virt-resize.pl:38 ../tools/virt-list-filesystems.pl:28 ../tools/virt-cat.pl:29 ../tools/virt-tar.pl:29 ../tools/virt-rescue.pl:29 ../tools/virt-make-fs.pl:33 ../tools/virt-list-partitions.pl:28
25 #: ../src/guestfs.pod:3 ../fish/guestfish.pod:3 ../test-tool/libguestfs-test-tool.pod:3 ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pl:33 ../tools/virt-edit.pl:32 ../tools/virt-win-reg.pl:35 ../tools/virt-df.pl:34 ../tools/virt-ls.pl:32 ../tools/virt-resize.pl:40 ../tools/virt-list-filesystems.pl:30 ../tools/virt-cat.pl:31 ../tools/virt-tar.pl:31 ../tools/virt-rescue.pl:31 ../tools/virt-make-fs.pl:35 ../tools/virt-list-partitions.pl:30
30 #: ../src/guestfs.pod:5
31 msgid "guestfs - Library for accessing and modifying virtual machine images"
35 #: ../src/guestfs.pod:7 ../fish/guestfish.pod:7 ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7 ../inspector/virt-inspector.pl:37 ../tools/virt-edit.pl:36 ../tools/virt-win-reg.pl:39 ../tools/virt-df.pl:38 ../tools/virt-ls.pl:36 ../tools/virt-resize.pl:44 ../tools/virt-list-filesystems.pl:34 ../tools/virt-cat.pl:35 ../tools/virt-tar.pl:35 ../tools/virt-rescue.pl:35 ../tools/virt-make-fs.pl:39 ../tools/virt-list-partitions.pl:34
40 #: ../src/guestfs.pod:9
43 " #include <guestfs.h>\n"
48 #: ../src/guestfs.pod:11
51 " guestfs_h *g = guestfs_create ();\n"
52 " guestfs_add_drive (g, \"guest.img\");\n"
53 " guestfs_launch (g);\n"
54 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
55 " guestfs_touch (g, \"/hello\");\n"
56 " guestfs_umount (g, \"/\");\n"
57 " guestfs_sync (g);\n"
58 " guestfs_close (g);\n"
63 #: ../src/guestfs.pod:20
66 " cc prog.c -o prog -lguestfs\n"
68 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
73 #: ../src/guestfs.pod:24 ../fish/guestfish.pod:30 ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:20 ../inspector/virt-inspector.pl:43 ../tools/virt-edit.pl:50 ../tools/virt-win-reg.pl:63 ../tools/virt-df.pl:46 ../tools/virt-ls.pl:42 ../tools/virt-resize.pl:50 ../tools/virt-list-filesystems.pl:40 ../tools/virt-cat.pl:41 ../tools/virt-tar.pl:72 ../tools/virt-rescue.pl:51 ../tools/virt-make-fs.pl:47 ../tools/virt-list-partitions.pl:40
78 #: ../src/guestfs.pod:26
80 "Libguestfs is a library for accessing and modifying guest disk images. "
81 "Amongst the things this is good for: making batch configuration changes to "
82 "guests, getting disk used/free statistics (see also: virt-df), migrating "
83 "between virtualization systems (see also: virt-p2v), performing partial "
84 "backups, performing partial guest clones, cloning guests and changing "
85 "registry/UUID/hostname info, and much else besides."
89 #: ../src/guestfs.pod:34
91 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
92 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
93 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
98 #: ../src/guestfs.pod:39
100 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
101 "what filesystem is in each LV, etc.). It can also run commands in the "
102 "context of the guest. Also you can access filesystems over FUSE."
106 #: ../src/guestfs.pod:44
108 "Libguestfs is a library that can be linked with C and C++ management "
109 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
110 "PHP, Haskell or C#). You can also use it from shell scripts or the command "
115 #: ../src/guestfs.pod:49
117 "You don't need to be root to use libguestfs, although obviously you do need "
118 "enough permissions to access the disk images."
122 #: ../src/guestfs.pod:52
124 "Libguestfs is a large API because it can do many things. For a gentle "
125 "introduction, please read the L</API OVERVIEW> section next."
129 #: ../src/guestfs.pod:55
134 #: ../src/guestfs.pod:57
136 "This section provides a gentler overview of the libguestfs API. We also try "
137 "to group API calls together, where that may not be obvious from reading "
138 "about the individual calls in the main section of this manual."
142 #: ../src/guestfs.pod:62
147 #: ../src/guestfs.pod:64
149 "Before you can use libguestfs calls, you have to create a handle. Then you "
150 "must add at least one disk image to the handle, followed by launching the "
151 "handle, then performing whatever operations you want, and finally closing "
152 "the handle. By convention we use the single letter C<g> for the name of the "
153 "handle variable, although of course you can use any name you want."
157 #: ../src/guestfs.pod:71
158 msgid "The general structure of all libguestfs-using programs looks like this:"
162 #: ../src/guestfs.pod:74
165 " guestfs_h *g = guestfs_create ();\n"
170 #: ../src/guestfs.pod:76
173 " /* Call guestfs_add_drive additional times if there are\n"
174 " * multiple disk images.\n"
176 " guestfs_add_drive (g, \"guest.img\");\n"
181 #: ../src/guestfs.pod:81
184 " /* Most manipulation calls won't work until you've launched\n"
185 " * the handle 'g'. You have to do this _after_ adding drives\n"
186 " * and _before_ other commands.\n"
188 " guestfs_launch (g);\n"
193 #: ../src/guestfs.pod:87
196 " /* Now you can examine what partitions, LVs etc are available.\n"
198 " char **partitions = guestfs_list_partitions (g);\n"
199 " char **logvols = guestfs_lvs (g);\n"
204 #: ../src/guestfs.pod:92
207 " /* To access a filesystem in the image, you must mount it.\n"
209 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
214 #: ../src/guestfs.pod:96
217 " /* Now you can perform filesystem actions on the guest\n"
220 " guestfs_touch (g, \"/hello\");\n"
225 #: ../src/guestfs.pod:101
228 " /* You only need to call guestfs_sync if you have made\n"
229 " * changes to the guest image. (But if you've made changes\n"
230 " * then you *must* sync). See also: guestfs_umount and\n"
231 " * guestfs_umount_all calls.\n"
233 " guestfs_sync (g);\n"
238 #: ../src/guestfs.pod:108
241 " /* Close the handle 'g'. */\n"
242 " guestfs_close (g);\n"
247 #: ../src/guestfs.pod:111
249 "The code above doesn't include any error checking. In real code you should "
250 "check return values carefully for errors. In general all functions that "
251 "return integers return C<-1> on error, and all functions that return "
252 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
253 "how to handle errors, and consult the documentation for each function call "
254 "below to see precisely how they return error indications."
258 #: ../src/guestfs.pod:119
263 #: ../src/guestfs.pod:121
265 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
266 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
267 "actual block device, or simply an empty file of zeroes that you have created "
268 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
273 #: ../src/guestfs.pod:127
275 "The call you should use in modern code for adding drives is "
276 "L</guestfs_add_drive_opts>. To add a disk image, allowing writes, and "
277 "specifying that the format is raw, do:"
281 #: ../src/guestfs.pod:131
284 " guestfs_add_drive_opts (g, filename,\n"
285 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
291 #: ../src/guestfs.pod:135
292 msgid "You can add a disk read-only using:"
296 #: ../src/guestfs.pod:137
299 " guestfs_add_drive_opts (g, filename,\n"
300 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"raw\",\n"
301 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
307 #: ../src/guestfs.pod:142
309 "or by calling the older function L</guestfs_add_drive_ro>. In either case "
310 "libguestfs won't modify the file."
314 #: ../src/guestfs.pod:145
316 "Be extremely cautious if the disk image is in use, eg. if it is being used "
317 "by a virtual machine. Adding it read-write will almost certainly cause disk "
318 "corruption, but adding it read-only is safe."
322 #: ../src/guestfs.pod:149
324 "You must add at least one disk image, and you may add multiple disk images. "
325 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
326 "first one you added), C</dev/sdb> (for the second one you added), etc."
330 #: ../src/guestfs.pod:154
332 "Once L</guestfs_launch> has been called you cannot add any more images. You "
333 "can call L</guestfs_list_devices> to get a list of the device names, in the "
334 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
338 #: ../src/guestfs.pod:159
343 #: ../src/guestfs.pod:161
345 "Before you can read or write files, create directories and so on in a disk "
346 "image that contains filesystems, you have to mount those filesystems using "
347 "L</guestfs_mount>. If you already know that a disk image contains (for "
348 "example) one partition with a filesystem on that partition, then you can "
353 #: ../src/guestfs.pod:167
356 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
361 #: ../src/guestfs.pod:169
363 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
364 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
365 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>)."
369 #: ../src/guestfs.pod:173
371 "If you are given a disk image and you don't know what it contains then you "
372 "have to find out. Libguestfs can do that too: use "
373 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
374 "and LVs, and either try mounting each to see what is mountable, or else "
375 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. Libguestfs also "
376 "has a set of APIs for inspection of disk images (see L</INSPECTION> below). "
377 "But you might find it easier to look at higher level programs built on top "
378 "of libguestfs, in particular L<virt-inspector(1)>."
382 #: ../src/guestfs.pod:183
384 "To mount a disk image read-only, use L</guestfs_mount_ro>. There are "
385 "several other variations of the C<guestfs_mount_*> call."
389 #: ../src/guestfs.pod:186
390 msgid "FILESYSTEM ACCESS AND MODIFICATION"
394 #: ../src/guestfs.pod:188
396 "The majority of the libguestfs API consists of fairly low-level calls for "
397 "accessing and modifying the files, directories, symlinks etc on mounted "
398 "filesystems. There are over a hundred such calls which you can find listed "
399 "in detail below in this man page, and we don't even pretend to cover them "
400 "all in this overview."
404 #: ../src/guestfs.pod:194
406 "Specify filenames as full paths, starting with C<\"/\"> and including the "
411 #: ../src/guestfs.pod:197
413 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
414 "the file called C<\"etc/passwd\"> then you could do:"
418 #: ../src/guestfs.pod:200
421 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
426 #: ../src/guestfs.pod:202
428 "This would return C<data> as a newly allocated buffer containing the full "
429 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
430 "or C<NULL> if there was an error."
434 #: ../src/guestfs.pod:206
436 "As another example, to create a top-level directory on that filesystem "
437 "called C<\"var\"> you would do:"
441 #: ../src/guestfs.pod:209
444 " guestfs_mkdir (g, \"/var\");\n"
449 #: ../src/guestfs.pod:211
450 msgid "To create a symlink you could do:"
454 #: ../src/guestfs.pod:213
457 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
458 " \"/etc/rc3.d/S30portmap\");\n"
463 #: ../src/guestfs.pod:216
465 "Libguestfs will reject attempts to use relative paths and there is no "
466 "concept of a current working directory."
470 #: ../src/guestfs.pod:219
472 "Libguestfs can return errors in many situations: for example if the "
473 "filesystem isn't writable, or if a file or directory that you requested "
474 "doesn't exist. If you are using the C API (documented here) you have to "
475 "check for those error conditions after each call. (Other language bindings "
476 "turn these errors into exceptions)."
480 #: ../src/guestfs.pod:225
482 "File writes are affected by the per-handle umask, set by calling "
483 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
487 #: ../src/guestfs.pod:228
492 #: ../src/guestfs.pod:230
494 "Libguestfs contains API calls to read, create and modify partition tables on "
499 #: ../src/guestfs.pod:233
501 "In the common case where you want to create a single partition covering the "
502 "whole disk, you should use the L</guestfs_part_disk> call:"
506 #: ../src/guestfs.pod:237
509 " const char *parttype = \"mbr\";\n"
510 " if (disk_is_larger_than_2TB)\n"
511 " parttype = \"gpt\";\n"
512 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
517 #: ../src/guestfs.pod:242
519 "Obviously this effectively wipes anything that was on that disk image "
524 #: ../src/guestfs.pod:245
529 #: ../src/guestfs.pod:247
531 "Libguestfs provides access to a large part of the LVM2 API, such as "
532 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
533 "unless you familiarize yourself with the concepts of physical volumes, "
534 "volume groups and logical volumes."
538 #: ../src/guestfs.pod:252
540 "This author strongly recommends reading the LVM HOWTO, online at "
541 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
545 #: ../src/guestfs.pod:255
550 #: ../src/guestfs.pod:257
552 "Use L</guestfs_cat> to download small, text only files. This call is "
553 "limited to files which are less than 2 MB and which cannot contain any ASCII "
554 "NUL (C<\\0>) characters. However it has a very simple to use API."
558 #: ../src/guestfs.pod:262
560 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
561 "bit data, since it returns a (pointer, size) pair. However it is still "
562 "limited to \"small\" files, less than 2 MB."
566 #: ../src/guestfs.pod:266
568 "L</guestfs_download> can be used to download any file, with no limits on "
569 "content or size (even files larger than 4 GB)."
573 #: ../src/guestfs.pod:269
574 msgid "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
578 #: ../src/guestfs.pod:272
583 #: ../src/guestfs.pod:274
585 "It's often the case that you want to write a file or files to the disk "
590 #: ../src/guestfs.pod:277
592 "To write a small file with fixed content, use L</guestfs_write>. To create "
593 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
594 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
595 "variety of other functions for creating test files, for example "
596 "L</guestfs_fill> and L</guestfs_fill_pattern>."
600 #: ../src/guestfs.pod:283
602 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
603 "file content or size (even files larger than 4 GB)."
607 #: ../src/guestfs.pod:286
608 msgid "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
612 #: ../src/guestfs.pod:288
614 "However the fastest way to upload I<large numbers of arbitrary files> is to "
615 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
616 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add "
617 "the drive in a predictable way (eg. adding it last after all other drives) "
618 "then you can get the device name from L</guestfs_list_devices> and mount it "
619 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
620 "sometimes non-portable between kernel versions, and they don't support "
621 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
622 "using a label or UUID, use an ISO image instead."
626 #: ../src/guestfs.pod:299
631 #: ../src/guestfs.pod:301
633 "There are various different commands for copying between files and devices "
634 "and in and out of the guest filesystem. These are summarised in the table "
639 #: ../src/guestfs.pod:307
640 msgid "B<file> to B<file>"
644 #: ../src/guestfs.pod:309
646 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
647 "directories recursively."
651 #: ../src/guestfs.pod:312
652 msgid "B<file or device> to B<file or device>"
656 #: ../src/guestfs.pod:314
658 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
659 "devices in the guest."
663 #: ../src/guestfs.pod:317
664 msgid "Example: duplicate the contents of an LV:"
668 #: ../src/guestfs.pod:319
671 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
676 #: ../src/guestfs.pod:321
678 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
679 "(C</dev/VG/Original>). To copy less than the whole source device, use "
680 "L</guestfs_copy_size>."
684 #: ../src/guestfs.pod:325
685 msgid "B<file on the host> to B<file or device>"
689 #: ../src/guestfs.pod:327
690 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
694 #: ../src/guestfs.pod:329
695 msgid "B<file or device> to B<file on the host>"
699 #: ../src/guestfs.pod:331
700 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
704 #: ../src/guestfs.pod:335
705 msgid "LISTING FILES"
709 #: ../src/guestfs.pod:337
711 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
712 "L<guestfish(1)>-equivalent command C<ll>)."
716 #: ../src/guestfs.pod:340
718 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
719 "programs, as a flat list of strings."
723 #: ../src/guestfs.pod:343
725 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
726 "directory, plus additional information about each one. It is more "
727 "equivalent to using the L<readdir(3)> call on a local filesystem."
731 #: ../src/guestfs.pod:347
733 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
738 #: ../src/guestfs.pod:350
739 msgid "RUNNING COMMANDS"
743 #: ../src/guestfs.pod:352
745 "Although libguestfs is primarily an API for manipulating files inside guest "
746 "images, we also provide some limited facilities for running commands inside "
751 #: ../src/guestfs.pod:356
752 msgid "There are many limitations to this:"
756 #: ../src/guestfs.pod:360 ../src/guestfs.pod:365 ../src/guestfs.pod:370 ../src/guestfs.pod:374 ../src/guestfs.pod:379 ../src/guestfs.pod:383 ../src/guestfs.pod:388 ../src/guestfs.pod:393 ../src/guestfs.pod:1224 ../src/guestfs.pod:1229 ../src/guestfs.pod:1233 ../src/guestfs.pod:1449 ../src/guestfs.pod:1454 ../src/guestfs.pod:1458 ../src/guestfs.pod:1560 ../src/guestfs.pod:1564 ../src/guestfs.pod:1568 ../src/guestfs.pod:1573 ../src/guestfs.pod:1581 ../src/guestfs.pod:1600 ../src/guestfs.pod:1608 ../src/guestfs.pod:1838 ../src/guestfs.pod:1844 ../src/guestfs.pod:1849 ../src/guestfs.pod:1855 ../src/guestfs.pod:1962 ../src/guestfs.pod:1966 ../src/guestfs.pod:1970 ../src/guestfs.pod:1974 ../src/guestfs-actions.pod:15 ../src/guestfs-actions.pod:22 ../src/guestfs-actions.pod:501 ../src/guestfs-actions.pod:509 ../src/guestfs-actions.pod:516 ../src/guestfs-actions.pod:523 ../src/guestfs-actions.pod:1558 ../src/guestfs-actions.pod:1562 ../src/guestfs-actions.pod:1566 ../src/guestfs-actions.pod:1570 ../src/guestfs-actions.pod:1578 ../src/guestfs-actions.pod:1582 ../src/guestfs-actions.pod:1586 ../src/guestfs-actions.pod:1596 ../src/guestfs-actions.pod:1600 ../src/guestfs-actions.pod:1604 ../src/guestfs-actions.pod:1742 ../src/guestfs-actions.pod:1746 ../src/guestfs-actions.pod:1751 ../src/guestfs-actions.pod:1756 ../src/guestfs-actions.pod:1817 ../src/guestfs-actions.pod:1821 ../src/guestfs-actions.pod:1826 ../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 ../inspector/virt-inspector.pl:584 ../inspector/virt-inspector.pl:588 ../tools/virt-df.pl:161 ../tools/virt-df.pl:167 ../tools/virt-resize.pl:348 ../tools/virt-resize.pl:353 ../tools/virt-resize.pl:363
761 #: ../src/guestfs.pod:362
763 "The kernel version that the command runs under will be different from what "
768 #: ../src/guestfs.pod:367
770 "If the command needs to communicate with daemons, then most likely they "
775 #: ../src/guestfs.pod:372
776 msgid "The command will be running in limited memory."
780 #: ../src/guestfs.pod:376
782 "The network may not be available unless you enable it (see "
783 "L</guestfs_set_network>)."
787 #: ../src/guestfs.pod:381
788 msgid "Only supports Linux guests (not Windows, BSD, etc)."
792 #: ../src/guestfs.pod:385
793 msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
797 #: ../src/guestfs.pod:390
799 "For SELinux guests, you may need to enable SELinux and load policy first. "
800 "See L</SELINUX> in this manpage."
804 #: ../src/guestfs.pod:395
806 "I<Security:> It is not safe to run commands from untrusted, possibly "
807 "malicious guests. These commands may attempt to exploit your program by "
808 "sending unexpected output. They could also try to exploit the Linux kernel "
809 "or qemu provided by the libguestfs appliance. They could use the network "
810 "provided by the libguestfs appliance to bypass ordinary network partitions "
811 "and firewalls. They could use the elevated privileges or different SELinux "
812 "context of your program to their advantage."
816 #: ../src/guestfs.pod:404
818 "A secure alternative is to use libguestfs to install a \"firstboot\" script "
819 "(a script which runs when the guest next boots normally), and to have this "
820 "script run the commands you want in the normal context of the running guest, "
821 "network security and so on."
825 #: ../src/guestfs.pod:411
827 "The two main API calls to run commands are L</guestfs_command> and "
828 "L</guestfs_sh> (there are also variations)."
832 #: ../src/guestfs.pod:414
834 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
835 "shell globs, redirections, etc will work."
839 #: ../src/guestfs.pod:417
840 msgid "CONFIGURATION FILES"
844 #: ../src/guestfs.pod:419
846 "To read and write configuration files in Linux guest filesystems, we "
847 "strongly recommend using Augeas. For example, Augeas understands how to "
848 "read and write, say, a Linux shadow password file or X.org configuration "
849 "file, and so avoids you having to write that code."
853 #: ../src/guestfs.pod:424
855 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
856 "document Augeas itself here because there is excellent documentation on the "
857 "L<http://augeas.net/> website."
861 #: ../src/guestfs.pod:428
863 "If you don't want to use Augeas (you fool!) then try calling "
864 "L</guestfs_read_lines> to get the file as a list of lines which you can "
869 #: ../src/guestfs.pod:432
874 #: ../src/guestfs.pod:434
876 "We support SELinux guests. To ensure that labeling happens correctly in "
877 "SELinux guests, you need to enable SELinux and load the guest's policy:"
881 #: ../src/guestfs.pod:440 ../src/guestfs.pod:953
886 #: ../src/guestfs.pod:442
887 msgid "Before launching, do:"
891 #: ../src/guestfs.pod:444
894 " guestfs_set_selinux (g, 1);\n"
899 #: ../src/guestfs.pod:446 ../src/guestfs.pod:957
904 #: ../src/guestfs.pod:448
906 "After mounting the guest's filesystem(s), load the policy. This is best "
907 "done by running the L<load_policy(8)> command in the guest itself:"
911 #: ../src/guestfs.pod:452
914 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
919 #: ../src/guestfs.pod:454
921 "(Older versions of C<load_policy> require you to specify the name of the "
926 #: ../src/guestfs.pod:457 ../src/guestfs.pod:963
931 #: ../src/guestfs.pod:459
933 "Optionally, set the security context for the API. The correct security "
934 "context to use can only be known by inspecting the guest. As an example:"
938 #: ../src/guestfs.pod:463
941 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
946 #: ../src/guestfs.pod:467
947 msgid "This will work for running commands and editing existing files."
951 #: ../src/guestfs.pod:469
953 "When new files are created, you may need to label them explicitly, for "
954 "example by running the external command C<restorecon pathname>."
958 #: ../src/guestfs.pod:473
963 #: ../src/guestfs.pod:475
965 "Certain calls are affected by the current file mode creation mask (the "
966 "\"umask\"). In particular ones which create files or directories, such as "
967 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
968 "either the default mode that the file is created with or modifies the mode "
973 #: ../src/guestfs.pod:481
975 "The default umask is C<022>, so files are created with modes such as C<0644> "
976 "and directories with C<0755>."
980 #: ../src/guestfs.pod:484
982 "There are two ways to avoid being affected by umask. Either set umask to 0 "
983 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
984 "L</guestfs_chmod> after creating each file or directory."
988 #: ../src/guestfs.pod:488
989 msgid "For more information about umask, see L<umask(2)>."
993 #: ../src/guestfs.pod:490 ../fish/guestfish.pod:630
994 msgid "ENCRYPTED DISKS"
998 #: ../src/guestfs.pod:492
1000 "Libguestfs allows you to access Linux guests which have been encrypted using "
1001 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
1002 "standard. This includes nearly all whole disk encryption systems used by "
1003 "modern Linux guests."
1007 #: ../src/guestfs.pod:498
1009 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
1010 "returns the string C<crypto_LUKS>)."
1014 #: ../src/guestfs.pod:501
1016 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
1017 "will require the passphrase!"
1021 #: ../src/guestfs.pod:504
1023 "Opening a LUKS device creates a new device mapper device called "
1024 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
1025 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
1026 "decrypted from and encrypted to the underlying block device respectively."
1030 #: ../src/guestfs.pod:510
1032 "LVM volume groups on the device can be made visible by calling "
1033 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
1034 "volume(s) can now be mounted in the usual way."
1038 #: ../src/guestfs.pod:514
1040 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
1041 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
1042 "[\"/dev/VG\"])>. Then close the mapper device by calling "
1043 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
1044 "underlying encrypted block device)."
1048 #: ../src/guestfs.pod:521
1053 #: ../src/guestfs.pod:523
1055 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1056 "contains operating systems. (These APIs used to be in a separate Perl-only "
1057 "library called L<Sys::Guestfs::Lib(3)> but since version 1.5.3 the most "
1058 "frequently used part of this library has been rewritten in C and moved into "
1063 #: ../src/guestfs.pod:529
1065 "Add all disks belonging to the unknown virtual machine and call "
1066 "L</guestfs_launch> in the usual way."
1070 #: ../src/guestfs.pod:532
1072 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1073 "and certain heuristics, and returns a list of operating systems that were "
1074 "found. An empty list means none were found. A single element is the root "
1075 "filesystem of the operating system. For dual- or multi-boot guests, "
1076 "multiple roots can be returned, each one corresponding to a separate "
1077 "operating system. (Multi-boot virtual machines are extremely rare in the "
1078 "world of virtualization, but since this scenario can happen, we have built "
1079 "libguestfs to deal with it.)"
1083 #: ../src/guestfs.pod:541
1085 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1086 "to get additional details about that operating system. For example, call "
1087 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1088 "Windows and Linux-based operating systems respectively."
1092 #: ../src/guestfs.pod:547
1094 "Un*x-like and Linux-based operating systems usually consist of several "
1095 "filesystems which are mounted at boot time (for example, a separate boot "
1096 "partition mounted on C</boot>). The inspection rules are able to detect how "
1097 "filesystems correspond to mount points. Call "
1098 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1099 "hash table like this example:"
1103 #: ../src/guestfs.pod:554
1106 " /boot => /dev/sda1\n"
1107 " / => /dev/vg_guest/lv_root\n"
1108 " /usr => /dev/vg_guest/lv_usr\n"
1113 #: ../src/guestfs.pod:558
1115 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1116 "filesystems as suggested."
1120 #: ../src/guestfs.pod:561
1122 "Be careful to mount filesystems in the right order (eg. C</> before "
1123 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
1128 #: ../src/guestfs.pod:565
1130 "Inspection currently only works for some common operating systems. "
1131 "Contributors are welcome to send patches for other operating systems that we "
1132 "currently cannot detect."
1136 #: ../src/guestfs.pod:569
1138 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1139 "for more details. The L</guestfs_inspect_os> function just ignores any "
1140 "encrypted devices."
1144 #: ../src/guestfs.pod:573
1146 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1147 "inspection and caches the results in the guest handle. Subsequent calls to "
1148 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
1149 "re-read the disks. If you change the content of the guest disks, you can "
1150 "redo inspection by calling L</guestfs_inspect_os> again."
1154 #: ../src/guestfs.pod:580
1155 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1159 #: ../src/guestfs.pod:582
1161 "Libguestfs can mount NTFS partitions. It does this using the "
1162 "L<http://www.ntfs-3g.org/> driver."
1166 #: ../src/guestfs.pod:585
1168 "DOS and Windows still use drive letters, and the filesystems are always "
1169 "treated as case insensitive by Windows itself, and therefore you might find "
1170 "a Windows configuration file referring to a path like "
1171 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
1172 "that directory might be referred to as C</WINDOWS/System32>."
1176 #: ../src/guestfs.pod:591
1178 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1179 "libguestfs to read the appropriate Windows Registry and configuration files, "
1180 "to determine yourself how drives are mapped (see also L<hivex(3)> and "
1181 "L<virt-inspector(1)>)."
1185 #: ../src/guestfs.pod:596
1187 "Replacing backslash characters with forward slash characters is also outside "
1188 "the scope of libguestfs, but something that you can easily do."
1192 #: ../src/guestfs.pod:599
1194 "Where we can help is in resolving the case insensitivity of paths. For "
1195 "this, call L</guestfs_case_sensitive_path>."
1199 #: ../src/guestfs.pod:602
1201 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1202 "files, through the library C<hivex> which is part of the libguestfs project "
1203 "although ships as a separate tarball. You have to locate and download the "
1204 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1205 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
1206 "L<virt-win-reg(1)> for more help on this issue."
1210 #: ../src/guestfs.pod:610
1211 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1215 #: ../src/guestfs.pod:612
1217 "Although we don't want to discourage you from using the C API, we will "
1218 "mention here that the same API is also available in other languages."
1222 #: ../src/guestfs.pod:615
1224 "The API is broadly identical in all supported languages. This means that "
1225 "the C call C<guestfs_mount(g,path)> is C<$g-E<gt>mount($path)> in Perl, "
1226 "C<g.mount(path)> in Python, and C<Guestfs.mount g path> in OCaml. In other "
1227 "words, a straightforward, predictable isomorphism between each language."
1231 #: ../src/guestfs.pod:621
1233 "Error messages are automatically transformed into exceptions if the language "
1238 #: ../src/guestfs.pod:624
1240 "We don't try to \"object orientify\" parts of the API in OO languages, "
1241 "although contributors are welcome to write higher level APIs above what we "
1242 "provide in their favourite languages if they wish."
1246 #: ../src/guestfs.pod:630
1251 #: ../src/guestfs.pod:632
1253 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1254 "identical to the C API. C++ classes and exceptions are not used."
1258 #: ../src/guestfs.pod:636
1263 #: ../src/guestfs.pod:638
1265 "The C# bindings are highly experimental. Please read the warnings at the "
1266 "top of C<csharp/Libguestfs.cs>."
1270 #: ../src/guestfs.pod:641
1275 #: ../src/guestfs.pod:643
1277 "This is the only language binding that is working but incomplete. Only "
1278 "calls which return simple integers have been bound in Haskell, and we are "
1279 "looking for help to complete this binding."
1283 #: ../src/guestfs.pod:647
1288 #: ../src/guestfs.pod:649
1290 "Full documentation is contained in the Javadoc which is distributed with "
1295 #: ../src/guestfs.pod:652
1300 #: ../src/guestfs.pod:654
1301 msgid "For documentation see the file C<guestfs.mli>."
1305 #: ../src/guestfs.pod:656
1310 #: ../src/guestfs.pod:658
1311 msgid "For documentation see L<Sys::Guestfs(3)>."
1315 #: ../src/guestfs.pod:660
1320 #: ../src/guestfs.pod:662
1322 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1323 "the php-libguestfs package for your distribution."
1327 #: ../src/guestfs.pod:665
1328 msgid "The PHP binding only works correctly on 64 bit machines."
1332 #: ../src/guestfs.pod:667
1337 #: ../src/guestfs.pod:669
1338 msgid "For documentation do:"
1342 #: ../src/guestfs.pod:671
1346 " >>> import guestfs\n"
1347 " >>> help (guestfs)\n"
1352 #: ../src/guestfs.pod:675
1357 #: ../src/guestfs.pod:677
1359 "Use the Guestfs module. There is no Ruby-specific documentation, but you "
1360 "can find examples written in Ruby in the libguestfs source."
1364 #: ../src/guestfs.pod:680
1365 msgid "B<shell scripts>"
1369 #: ../src/guestfs.pod:682
1370 msgid "For documentation see L<guestfish(1)>."
1374 #: ../src/guestfs.pod:686
1375 msgid "LIBGUESTFS GOTCHAS"
1379 #: ../src/guestfs.pod:688
1381 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1382 "system [...] that works in the way it is documented but is counterintuitive "
1383 "and almost invites mistakes.\""
1387 #: ../src/guestfs.pod:692
1389 "Since we developed libguestfs and the associated tools, there are several "
1390 "things we would have designed differently, but are now stuck with for "
1391 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1392 "release, you can expect these to change. Beware of them."
1396 #: ../src/guestfs.pod:700
1397 msgid "Autosync / forgetting to sync."
1401 #: ../src/guestfs.pod:702
1403 "When modifying a filesystem from C or another language, you B<must> unmount "
1404 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1405 "libguestfs handle. You can also call:"
1409 #: ../src/guestfs.pod:706
1412 " guestfs_set_autosync (g, 1);\n"
1417 #: ../src/guestfs.pod:708
1419 "to have the unmount/sync done automatically for you when the handle 'g' is "
1420 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
1425 #: ../src/guestfs.pod:712
1427 "If you forget to do this, then it is entirely possible that your changes "
1428 "won't be written out, or will be partially written, or (very rarely) that "
1429 "you'll get disk corruption."
1433 #: ../src/guestfs.pod:716
1435 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1436 "guestfish scripts that forget to sync will work just fine, which can make "
1437 "this very puzzling if you are trying to debug a problem."
1441 #: ../src/guestfs.pod:720
1443 "Update: Autosync is enabled by default for all API users starting from "
1444 "libguestfs 1.5.24."
1448 #: ../src/guestfs.pod:723
1449 msgid "Mount option C<-o sync> should not be the default."
1453 #: ../src/guestfs.pod:725
1455 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1456 "However C<-o sync> does not add any reliability benefit, but does have a "
1457 "very large performance impact."
1461 #: ../src/guestfs.pod:729
1463 "The work around is to use L</guestfs_mount_options> and set the mount "
1464 "options that you actually want to use."
1468 #: ../src/guestfs.pod:732
1469 msgid "Read-only should be the default."
1473 #: ../src/guestfs.pod:734
1475 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1476 "specify I<--rw> if you want to make changes to the image."
1480 #: ../src/guestfs.pod:737
1481 msgid "This would reduce the potential to corrupt live VM images."
1485 #: ../src/guestfs.pod:739
1487 "Note that many filesystems change the disk when you just mount and unmount, "
1488 "even if you didn't perform any writes. You need to use "
1489 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
1493 #: ../src/guestfs.pod:743
1494 msgid "guestfish command line is hard to use."
1498 #: ../src/guestfs.pod:745
1500 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1501 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1502 "exist, so it fails. In earlier versions of guestfish the error message was "
1503 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1504 "we should have used C<guestfish -c command> to run commands."
1508 #: ../src/guestfs.pod:752
1509 msgid "guestfish megabyte modifiers don't work right on all commands"
1513 #: ../src/guestfs.pod:754
1515 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1516 "other modifiers). What guestfish actually does is to multiply the number "
1517 "part by the modifier part and pass the result to the C API. However this "
1518 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1519 "expecting some other unit (eg. megabytes)."
1523 #: ../src/guestfs.pod:761
1524 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1528 #: ../src/guestfs.pod:763
1531 " lvcreate LV VG 100M\n"
1536 #: ../src/guestfs.pod:765
1538 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1539 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1540 "megabytes * megabytes) logical volume. The error message you get from this "
1541 "is also a little obscure."
1545 #: ../src/guestfs.pod:770
1547 "This could be fixed in the generator by specially marking parameters and "
1548 "return values which take bytes or other units."
1552 #: ../src/guestfs.pod:773
1553 msgid "Ambiguity between devices and paths"
1557 #: ../src/guestfs.pod:775
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:780
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:786
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:792
1587 " type path = Path of string | Device of int | Partition of int * int\n"
1592 #: ../src/guestfs.pod:794
1593 msgid "which would allow you to pass arguments like:"
1597 #: ../src/guestfs.pod:796
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:801
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:806
1616 msgid "PROTOCOL LIMITS"
1620 #: ../src/guestfs.pod:808
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:816
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:822
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:826
1650 "You might also consider mounting the disk image using our FUSE filesystem "
1651 "support (L<guestmount(1)>)."
1655 #: ../src/guestfs.pod:829
1656 msgid "KEYS AND PASSPHRASES"
1660 #: ../src/guestfs.pod:831
1662 "Certain libguestfs calls take a parameter that contains sensitive key "
1663 "material, passed in as a C string."
1667 #: ../src/guestfs.pod:834
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:839
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:844
1685 msgid "CONNECTION MANAGEMENT"
1689 #: ../src/guestfs.pod:846
1694 #: ../src/guestfs.pod:848
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:852
1704 "For information on using multiple handles and threads, see the section "
1705 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> below."
1709 #: ../src/guestfs.pod:855
1710 msgid "guestfs_create"
1714 #: ../src/guestfs.pod:857
1717 " guestfs_h *guestfs_create (void);\n"
1722 #: ../src/guestfs.pod:859
1723 msgid "Create a connection handle."
1727 #: ../src/guestfs.pod:861
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:864
1736 "This function returns a non-NULL pointer to a handle on success or NULL on "
1741 #: ../src/guestfs.pod:867
1742 msgid "After configuring the handle, you have to call L</guestfs_launch>."
1746 #: ../src/guestfs.pod:869
1748 "You may also want to configure error handling for the handle. See L</ERROR "
1749 "HANDLING> section below."
1753 #: ../src/guestfs.pod:872
1754 msgid "guestfs_close"
1758 #: ../src/guestfs.pod:874
1761 " void guestfs_close (guestfs_h *g);\n"
1766 #: ../src/guestfs.pod:876
1767 msgid "This closes the connection handle and frees up all resources used."
1771 #: ../src/guestfs.pod:878
1772 msgid "ERROR HANDLING"
1776 #: ../src/guestfs.pod:880
1778 "API functions can return errors. For example, almost all functions that "
1779 "return C<int> will return C<-1> to indicate an error."
1783 #: ../src/guestfs.pod:883
1785 "Additional information is available for errors: an error message string and "
1786 "optionally an error number (errno) if the thing that failed was a system "
1791 #: ../src/guestfs.pod:887
1793 "You can get at the additional information about the last error on the handle "
1794 "by calling L</guestfs_last_error>, L</guestfs_last_errno>, and/or by setting "
1795 "up an error handler with L</guestfs_set_error_handler>."
1799 #: ../src/guestfs.pod:892
1801 "When the handle is created, a default error handler is installed which "
1802 "prints the error message string to C<stderr>. For small short-running "
1803 "command line programs it is sufficient to do:"
1807 #: ../src/guestfs.pod:896
1810 " if (guestfs_launch (g) == -1)\n"
1811 " exit (EXIT_FAILURE);\n"
1816 #: ../src/guestfs.pod:899
1818 "since the default error handler will ensure that an error message has been "
1819 "printed to C<stderr> before the program exits."
1823 #: ../src/guestfs.pod:902
1825 "For other programs the caller will almost certainly want to install an "
1826 "alternate error handler or do error handling in-line like this:"
1830 #: ../src/guestfs.pod:905
1833 " g = guestfs_create ();\n"
1838 #: ../src/guestfs.pod:907
1841 " /* This disables the default behaviour of printing errors\n"
1843 " guestfs_set_error_handler (g, NULL, NULL);\n"
1848 #: ../src/guestfs.pod:911
1851 " if (guestfs_launch (g) == -1) {\n"
1852 " /* Examine the error message and print it etc. */\n"
1853 " char *msg = guestfs_last_error (g);\n"
1854 " int errnum = guestfs_last_errno (g);\n"
1855 " fprintf (stderr, \"%s\\n\", msg);\n"
1862 #: ../src/guestfs.pod:919
1864 "Out of memory errors are handled differently. The default action is to call "
1865 "L<abort(3)>. If this is undesirable, then you can set a handler using "
1866 "L</guestfs_set_out_of_memory_handler>."
1870 #: ../src/guestfs.pod:923
1872 "L</guestfs_create> returns C<NULL> if the handle cannot be created, and "
1873 "because there is no handle if this happens there is no way to get additional "
1874 "error information. However L</guestfs_create> is supposed to be a "
1875 "lightweight operation which can only fail because of insufficient memory (it "
1876 "returns NULL in this case)."
1880 #: ../src/guestfs.pod:929
1881 msgid "guestfs_last_error"
1885 #: ../src/guestfs.pod:931
1888 " const char *guestfs_last_error (guestfs_h *g);\n"
1893 #: ../src/guestfs.pod:933
1895 "This returns the last error message that happened on C<g>. If there has not "
1896 "been an error since the handle was created, then this returns C<NULL>."
1900 #: ../src/guestfs.pod:937
1902 "The lifetime of the returned string is until the next error occurs, or "
1903 "L</guestfs_close> is called."
1907 #: ../src/guestfs.pod:940
1908 msgid "guestfs_last_errno"
1912 #: ../src/guestfs.pod:942
1915 " int guestfs_last_errno (guestfs_h *g);\n"
1920 #: ../src/guestfs.pod:944
1921 msgid "This returns the last error number (errno) that happened on C<g>."
1925 #: ../src/guestfs.pod:946
1926 msgid "If successful, an errno integer not equal to zero is returned."
1930 #: ../src/guestfs.pod:948
1931 msgid "If no error, this returns 0. This call can return 0 in three situations:"
1935 #: ../src/guestfs.pod:955
1936 msgid "There has not been any error on the handle."
1940 #: ../src/guestfs.pod:959
1942 "There has been an error but the errno was meaningless. This corresponds to "
1943 "the case where the error did not come from a failed system call, but for "
1944 "some other reason."
1948 #: ../src/guestfs.pod:965
1950 "There was an error from a failed system call, but for some reason the errno "
1951 "was not captured and returned. This usually indicates a bug in libguestfs."
1955 #: ../src/guestfs.pod:971
1957 "Libguestfs tries to convert the errno from inside the applicance into a "
1958 "corresponding errno for the caller (not entirely trivial: the appliance "
1959 "might be running a completely different operating system from the library "
1960 "and error numbers are not standardized across Un*xen). If this could not be "
1961 "done, then the error is translated to C<EINVAL>. In practice this should "
1962 "only happen in very rare circumstances."
1966 #: ../src/guestfs.pod:979
1967 msgid "guestfs_set_error_handler"
1971 #: ../src/guestfs.pod:981
1974 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
1976 " const char *msg);\n"
1977 " void guestfs_set_error_handler (guestfs_h *g,\n"
1978 " guestfs_error_handler_cb cb,\n"
1984 #: ../src/guestfs.pod:988
1986 "The callback C<cb> will be called if there is an error. The parameters "
1987 "passed to the callback are an opaque data pointer and the error message "
1992 #: ../src/guestfs.pod:992
1994 "C<errno> is not passed to the callback. To get that the callback must call "
1995 "L</guestfs_last_errno>."
1999 #: ../src/guestfs.pod:995
2001 "Note that the message string C<msg> is freed as soon as the callback "
2002 "function returns, so if you want to stash it somewhere you must make your "
2007 #: ../src/guestfs.pod:999
2008 msgid "The default handler prints messages on C<stderr>."
2012 #: ../src/guestfs.pod:1001
2013 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
2017 #: ../src/guestfs.pod:1003
2018 msgid "guestfs_get_error_handler"
2022 #: ../src/guestfs.pod:1005
2025 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
2026 " void **opaque_rtn);\n"
2031 #: ../src/guestfs.pod:1008
2032 msgid "Returns the current error handler callback."
2036 #: ../src/guestfs.pod:1010
2037 msgid "guestfs_set_out_of_memory_handler"
2041 #: ../src/guestfs.pod:1012
2044 " typedef void (*guestfs_abort_cb) (void);\n"
2045 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
2046 " guestfs_abort_cb);\n"
2051 #: ../src/guestfs.pod:1016
2053 "The callback C<cb> will be called if there is an out of memory situation. "
2054 "I<Note this callback must not return>."
2058 #: ../src/guestfs.pod:1019
2059 msgid "The default is to call L<abort(3)>."
2063 #: ../src/guestfs.pod:1021
2064 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
2068 #: ../src/guestfs.pod:1024
2069 msgid "guestfs_get_out_of_memory_handler"
2073 #: ../src/guestfs.pod:1026
2076 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
2081 #: ../src/guestfs.pod:1028
2082 msgid "This returns the current out of memory handler."
2086 #: ../src/guestfs.pod:1030
2091 #: ../src/guestfs.pod:1032
2093 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
2098 #: ../src/guestfs.pod:1035
2100 "By default it looks for these in the directory C<$libdir/guestfs> "
2101 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
2105 #: ../src/guestfs.pod:1038
2107 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
2108 "to change the directories that libguestfs will search in. The value is a "
2109 "colon-separated list of paths. The current directory is I<not> searched "
2110 "unless the path contains an empty element or C<.>. For example "
2111 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
2112 "then C</usr/lib/guestfs>."
2116 #: ../src/guestfs.pod:1045
2117 msgid "HIGH-LEVEL API ACTIONS"
2121 #: ../src/guestfs.pod:1047
2122 msgid "ABI GUARANTEE"
2126 #: ../src/guestfs.pod:1049
2128 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
2129 "actions as outlined in this section. Although we will deprecate some "
2130 "actions, for example if they get replaced by newer calls, we will keep the "
2131 "old actions forever. This allows you the developer to program in confidence "
2132 "against the libguestfs API."
2136 #: ../src/guestfs.pod:1055 ../fish/guestfish.pod:861
2141 #: ../src/guestfs.pod:1057
2146 #: ../src/guestfs.pod:1059
2151 #: ../src/guestfs.pod:1061
2152 msgid "AVAILABILITY"
2156 #: ../src/guestfs.pod:1063
2157 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
2161 #: ../src/guestfs.pod:1065
2163 "Using L</guestfs_available> you can test availability of the following "
2164 "groups of functions. This test queries the appliance to see if the "
2165 "appliance you are currently using supports the functionality."
2169 #: ../src/guestfs.pod:1070
2170 msgid "@AVAILABILITY@"
2174 #: ../src/guestfs.pod:1072
2175 msgid "GUESTFISH supported COMMAND"
2179 #: ../src/guestfs.pod:1074
2181 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
2182 "prints out the available groups and whether they are supported by this build "
2183 "of libguestfs. Note however that you have to do C<run> first."
2187 #: ../src/guestfs.pod:1079
2188 msgid "SINGLE CALLS AT COMPILE TIME"
2192 #: ../src/guestfs.pod:1081
2194 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
2195 "function, such as:"
2199 #: ../src/guestfs.pod:1084
2202 " #define LIBGUESTFS_HAVE_DD 1\n"
2207 #: ../src/guestfs.pod:1086
2208 msgid "if L</guestfs_dd> is available."
2212 #: ../src/guestfs.pod:1088
2214 "Before version 1.5.8, if you needed to test whether a single libguestfs "
2215 "function is available at compile time, we recommended using build tools such "
2216 "as autoconf or cmake. For example in autotools you could use:"
2220 #: ../src/guestfs.pod:1093
2223 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
2224 " AC_CHECK_FUNCS([guestfs_dd])\n"
2229 #: ../src/guestfs.pod:1096
2231 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
2236 #: ../src/guestfs.pod:1099
2237 msgid "SINGLE CALLS AT RUN TIME"
2241 #: ../src/guestfs.pod:1101
2243 "Testing at compile time doesn't guarantee that a function really exists in "
2244 "the library. The reason is that you might be dynamically linked against a "
2245 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
2246 "This situation unfortunately results in a segmentation fault, which is a "
2247 "shortcoming of the C dynamic linking system itself."
2251 #: ../src/guestfs.pod:1108
2253 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2254 "in this example program (note that you still need the compile time check as "
2259 #: ../src/guestfs.pod:1112
2262 " #include <stdio.h>\n"
2263 " #include <stdlib.h>\n"
2264 " #include <unistd.h>\n"
2265 " #include <dlfcn.h>\n"
2266 " #include <guestfs.h>\n"
2271 #: ../src/guestfs.pod:1118
2276 " #ifdef LIBGUESTFS_HAVE_DD\n"
2278 " int has_function;\n"
2283 #: ../src/guestfs.pod:1124
2286 " /* Test if the function guestfs_dd is really available. */\n"
2287 " dl = dlopen (NULL, RTLD_LAZY);\n"
2289 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2290 " exit (EXIT_FAILURE);\n"
2292 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2298 #: ../src/guestfs.pod:1133
2301 " if (!has_function)\n"
2302 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2304 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2305 " /* Now it's safe to call\n"
2306 " guestfs_dd (g, \"foo\", \"bar\");\n"
2310 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2317 #: ../src/guestfs.pod:1146
2319 "You may think the above is an awful lot of hassle, and it is. There are "
2320 "other ways outside of the C linking system to ensure that this kind of "
2321 "incompatibility never arises, such as using package versioning:"
2325 #: ../src/guestfs.pod:1151
2328 " Requires: libguestfs >= 1.0.80\n"
2333 #: ../src/guestfs.pod:1153
2334 msgid "CALLS WITH OPTIONAL ARGUMENTS"
2338 #: ../src/guestfs.pod:1155
2340 "A recent feature of the API is the introduction of calls which take optional "
2341 "arguments. In C these are declared 3 ways. The main way is as a call which "
2342 "takes variable arguments (ie. C<...>), as in this example:"
2346 #: ../src/guestfs.pod:1160
2349 " int guestfs_add_drive_opts (guestfs_h *g, const char *filename, ...);\n"
2354 #: ../src/guestfs.pod:1162
2356 "Call this with a list of optional arguments, terminated by C<-1>. So to "
2357 "call with no optional arguments specified:"
2361 #: ../src/guestfs.pod:1165
2364 " guestfs_add_drive_opts (g, filename, -1);\n"
2369 #: ../src/guestfs.pod:1167
2370 msgid "With a single optional argument:"
2374 #: ../src/guestfs.pod:1169
2377 " guestfs_add_drive_opts (g, filename,\n"
2378 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2384 #: ../src/guestfs.pod:1173
2389 #: ../src/guestfs.pod:1175
2392 " guestfs_add_drive_opts (g, filename,\n"
2393 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, \"qcow2\",\n"
2394 " GUESTFS_ADD_DRIVE_OPTS_READONLY, 1,\n"
2400 #: ../src/guestfs.pod:1180
2402 "and so forth. Don't forget the terminating C<-1> otherwise Bad Things will "
2407 #: ../src/guestfs.pod:1183
2408 msgid "USING va_list FOR OPTIONAL ARGUMENTS"
2412 #: ../src/guestfs.pod:1185
2414 "The second variant has the same name with the suffix C<_va>, which works the "
2415 "same way but takes a C<va_list>. See the C manual for details. For the "
2416 "example function, this is declared:"
2420 #: ../src/guestfs.pod:1189
2423 " int guestfs_add_drive_opts_va (guestfs_h *g, const char *filename,\n"
2429 #: ../src/guestfs.pod:1192
2430 msgid "CONSTRUCTING OPTIONAL ARGUMENTS"
2434 #: ../src/guestfs.pod:1194
2436 "The third variant is useful where you need to construct these calls. You "
2437 "pass in a structure where you fill in the optional fields. The structure "
2438 "has a bitmask as the first element which you must set to indicate which "
2439 "fields you have filled in. For our example function the structure and call "
2444 #: ../src/guestfs.pod:1200
2447 " struct guestfs_add_drive_opts_argv {\n"
2448 " uint64_t bitmask;\n"
2450 " const char *format;\n"
2453 " int guestfs_add_drive_opts_argv (guestfs_h *g, const char *filename,\n"
2454 " const struct guestfs_add_drive_opts_argv *optargs);\n"
2459 #: ../src/guestfs.pod:1209
2460 msgid "You could call it like this:"
2464 #: ../src/guestfs.pod:1211
2467 " struct guestfs_add_drive_opts_argv optargs = {\n"
2468 " .bitmask = GUESTFS_ADD_DRIVE_OPTS_READONLY_BITMASK |\n"
2469 " GUESTFS_ADD_DRIVE_OPTS_FORMAT_BITMASK,\n"
2471 " .format = \"qcow2\"\n"
2477 #: ../src/guestfs.pod:1218
2480 " guestfs_add_drive_opts_argv (g, filename, &optargs);\n"
2485 #: ../src/guestfs.pod:1220 ../src/guestfs-actions.pod:11 ../src/guestfs-actions.pod:1813 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1244
2490 #: ../src/guestfs.pod:1226
2491 msgid "The C<_BITMASK> suffix on each option name when specifying the bitmask."
2495 #: ../src/guestfs.pod:1231
2496 msgid "You do not need to fill in all fields of the structure."
2500 #: ../src/guestfs.pod:1235
2502 "There must be a one-to-one correspondence between fields of the structure "
2503 "that are filled in, and bits set in the bitmask."
2507 #: ../src/guestfs.pod:1240
2508 msgid "OPTIONAL ARGUMENTS IN OTHER LANGUAGES"
2512 #: ../src/guestfs.pod:1242
2514 "In other languages, optional arguments are expressed in the way that is "
2515 "natural for that language. We refer you to the language-specific "
2516 "documentation for more details on that."
2520 #: ../src/guestfs.pod:1246
2521 msgid "For guestfish, see L<guestfish(1)/OPTIONAL ARGUMENTS>."
2525 #: ../src/guestfs.pod:1248 ../src/guestfs.pod:1253
2530 #: ../src/guestfs.pod:1250
2532 "<!-- old anchor for the next section --> <a "
2533 "name=\"state_machine_and_low_level_event_api\"/>"
2537 #: ../src/guestfs.pod:1255
2538 msgid "ARCHITECTURE"
2542 #: ../src/guestfs.pod:1257
2544 "Internally, libguestfs is implemented by running an appliance (a special "
2545 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
2546 "process of the main program."
2550 #: ../src/guestfs.pod:1261
2553 " ___________________\n"
2555 " | main program |\n"
2557 " | | child process / appliance\n"
2558 " | | __________________________\n"
2560 " +-------------------+ RPC | +-----------------+ |\n"
2561 " | libguestfs <--------------------> guestfsd | |\n"
2562 " | | | +-----------------+ |\n"
2563 " \\___________________/ | | Linux kernel | |\n"
2564 " | +--^--------------+ |\n"
2565 " \\_________|________________/\n"
2571 " \\______________/\n"
2576 #: ../src/guestfs.pod:1281
2578 "The library, linked to the main program, creates the child process and hence "
2579 "the appliance in the L</guestfs_launch> function."
2583 #: ../src/guestfs.pod:1284
2585 "Inside the appliance is a Linux kernel and a complete stack of userspace "
2586 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
2587 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
2588 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
2589 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
2590 "attached to the qemu process which translates device access by the "
2591 "appliance's Linux kernel into accesses to the image."
2595 #: ../src/guestfs.pod:1293
2597 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
2598 "Although the disk image you are attached to might also be used by some "
2599 "virtual machine, libguestfs doesn't know or care about this. (But you will "
2600 "care if both libguestfs's qemu process and your virtual machine are trying "
2601 "to update the disk image at the same time, since these usually results in "
2602 "massive disk corruption)."
2606 #: ../src/guestfs.pod:1300
2607 msgid "STATE MACHINE"
2611 #: ../src/guestfs.pod:1302
2612 msgid "libguestfs uses a state machine to model the child process:"
2616 #: ../src/guestfs.pod:1304
2628 " / | \\ \\ guestfs_launch\n"
2629 " / | _\\__V______\n"
2631 " / | | LAUNCHING |\n"
2632 " / | \\___________/\n"
2634 " / | guestfs_launch\n"
2636 " ______ / __|____V\n"
2637 " / \\ ------> / \\\n"
2638 " | BUSY | | READY |\n"
2639 " \\______/ <------ \\________/\n"
2644 #: ../src/guestfs.pod:1326
2646 "The normal transitions are (1) CONFIG (when the handle is created, but there "
2647 "is no child process), (2) LAUNCHING (when the child process is booting up), "
2648 "(3) alternating between READY and BUSY as commands are issued to, and "
2649 "carried out by, the child process."
2653 #: ../src/guestfs.pod:1331
2655 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
2656 "asynchronously at any time (eg. due to some internal error), and that causes "
2657 "the state to transition back to CONFIG."
2661 #: ../src/guestfs.pod:1335
2663 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
2664 "issued when in the CONFIG state."
2668 #: ../src/guestfs.pod:1338
2670 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
2671 "L</guestfs_launch> blocks until the child process is READY to accept "
2672 "commands (or until some failure or timeout). L</guestfs_launch> internally "
2673 "moves the state from CONFIG to LAUNCHING while it is running."
2677 #: ../src/guestfs.pod:1344
2679 "API actions such as L</guestfs_mount> can only be issued when in the READY "
2680 "state. These API calls block waiting for the command to be carried out "
2681 "(ie. the state to transition to BUSY and then back to READY). There are no "
2682 "non-blocking versions, and no way to issue more than one command per handle "
2687 #: ../src/guestfs.pod:1350
2689 "Finally, the child process sends asynchronous messages back to the main "
2690 "program, such as kernel log messages. You can register a callback to "
2691 "receive these messages."
2695 #: ../src/guestfs.pod:1354
2696 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
2700 #: ../src/guestfs.pod:1356
2702 "The child process generates events in some situations. Current events "
2703 "include: receiving a log message, the child process exits."
2707 #: ../src/guestfs.pod:1359
2709 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
2714 #: ../src/guestfs.pod:1362
2716 "Only I<one callback of each type> can be registered for each handle. "
2717 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
2718 "that type. Cancel all callbacks of this type by calling this function with "
2719 "C<cb> set to C<NULL>."
2723 #: ../src/guestfs.pod:1367
2724 msgid "guestfs_set_log_message_callback"
2728 #: ../src/guestfs.pod:1369
2731 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
2732 " char *buf, int len);\n"
2733 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
2734 " guestfs_log_message_cb cb,\n"
2740 #: ../src/guestfs.pod:1375
2742 "The callback function C<cb> will be called whenever qemu or the guest writes "
2743 "anything to the console."
2747 #: ../src/guestfs.pod:1378
2748 msgid "Use this function to capture kernel messages and similar."
2752 #: ../src/guestfs.pod:1380
2754 "Normally there is no log message handler, and log messages are just "
2759 #: ../src/guestfs.pod:1383
2760 msgid "guestfs_set_subprocess_quit_callback"
2764 #: ../src/guestfs.pod:1385
2767 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
2768 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
2769 " guestfs_subprocess_quit_cb cb,\n"
2775 #: ../src/guestfs.pod:1390
2777 "The callback function C<cb> will be called when the child process quits, "
2778 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
2779 "corresponds to a transition from any state to the CONFIG state)."
2783 #: ../src/guestfs.pod:1395
2784 msgid "guestfs_set_launch_done_callback"
2788 #: ../src/guestfs.pod:1397
2791 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
2792 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
2793 " guestfs_launch_done_cb cb,\n"
2799 #: ../src/guestfs.pod:1402
2801 "The callback function C<cb> will be called when the child process becomes "
2802 "ready first time after it has been launched. (This corresponds to a "
2803 "transition from LAUNCHING to the READY state)."
2807 #: ../src/guestfs.pod:1406
2808 msgid "guestfs_set_close_callback"
2812 #: ../src/guestfs.pod:1408
2815 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
2816 " void guestfs_set_close_callback (guestfs_h *g,\n"
2817 " guestfs_close_cb cb,\n"
2823 #: ../src/guestfs.pod:1413
2825 "The callback function C<cb> will be called while the handle is being closed "
2826 "(synchronously from L</guestfs_close>)."
2830 #: ../src/guestfs.pod:1416
2832 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
2833 "handles that are open when the program exits. This means that this callback "
2834 "might be called indirectly from L<exit(3)>, which can cause unexpected "
2835 "problems in higher-level languages (eg. if your HLL interpreter has already "
2836 "been cleaned up by the time this is called, and if your callback then jumps "
2837 "into some HLL function)."
2841 #: ../src/guestfs.pod:1424
2842 msgid "guestfs_set_progress_callback"
2846 #: ../src/guestfs.pod:1426
2849 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
2850 " int proc_nr, int serial,\n"
2851 " uint64_t position, uint64_t total);\n"
2852 " void guestfs_set_progress_callback (guestfs_h *g,\n"
2853 " guestfs_progress_cb cb,\n"
2859 #: ../src/guestfs.pod:1433
2861 "Some long-running operations can generate progress messages. If this "
2862 "callback is registered, then it will be called each time a progress message "
2863 "is generated (usually two seconds after the operation started, and three "
2864 "times per second thereafter until it completes, although the frequency may "
2865 "change in future versions)."
2869 #: ../src/guestfs.pod:1439
2871 "The callback receives two numbers: C<position> and C<total>. The units of "
2872 "C<total> are not defined, although for some operations C<total> may relate "
2873 "in some way to the amount of data to be transferred (eg. in bytes or "
2874 "megabytes), and C<position> may be the portion which has been transferred."
2878 #: ../src/guestfs.pod:1445
2879 msgid "The only defined and stable parts of the API are:"
2883 #: ../src/guestfs.pod:1451
2885 "The callback can display to the user some type of progress bar or indicator "
2886 "which shows the ratio of C<position>:C<total>."
2890 #: ../src/guestfs.pod:1456
2891 msgid "0 E<lt>= C<position> E<lt>= C<total>"
2895 #: ../src/guestfs.pod:1460
2897 "If any progress notification is sent during a call, then a final progress "
2898 "notification is always sent when C<position> = C<total>."
2902 #: ../src/guestfs.pod:1463
2904 "This is to simplify caller code, so callers can easily set the progress "
2905 "indicator to \"100%\" at the end of the operation, without requiring special "
2906 "code to detect this case."
2910 #: ../src/guestfs.pod:1469
2912 "The callback also receives the procedure number and serial number of the "
2913 "call. These are only useful for debugging protocol issues, and the callback "
2914 "can normally ignore them. The callback may want to print these numbers in "
2915 "error messages or debugging messages."
2919 #: ../src/guestfs.pod:1474
2920 msgid "PRIVATE DATA AREA"
2924 #: ../src/guestfs.pod:1476
2926 "You can attach named pieces of private data to the libguestfs handle, and "
2927 "fetch them by name for the lifetime of the handle. This is called the "
2928 "private data area and is only available from the C API."
2932 #: ../src/guestfs.pod:1480
2933 msgid "To attach a named piece of data, use the following call:"
2937 #: ../src/guestfs.pod:1482
2940 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
2945 #: ../src/guestfs.pod:1484
2947 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
2948 "pointer (which can be C<NULL>). Any previous item with the same name is "
2953 #: ../src/guestfs.pod:1488
2955 "You can use any C<key> you want, but names beginning with an underscore "
2956 "character are reserved for internal libguestfs purposes (for implementing "
2957 "language bindings). It is recommended to prefix the name with some unique "
2958 "string to avoid collisions with other users."
2962 #: ../src/guestfs.pod:1493
2963 msgid "To retrieve the pointer, use:"
2967 #: ../src/guestfs.pod:1495
2970 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
2975 #: ../src/guestfs.pod:1497
2977 "This function returns C<NULL> if either no data is found associated with "
2978 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
2983 #: ../src/guestfs.pod:1501
2985 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
2986 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
2987 "all. In particular, libguestfs does I<not> try to free the data when the "
2988 "handle is closed. If the data must be freed, then the caller must either "
2989 "free it before calling L</guestfs_close> or must set up a close callback to "
2990 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
2991 "can be registered for a handle)."
2995 #: ../src/guestfs.pod:1509
2997 "The private data area is implemented using a hash table, and should be "
2998 "reasonably efficient for moderate numbers of keys."
3002 #: ../src/guestfs.pod:1512
3003 msgid "BLOCK DEVICE NAMING"
3007 #: ../src/guestfs.pod:1514
3009 "In the kernel there is now quite a profusion of schemata for naming block "
3010 "devices (in this context, by I<block device> I mean a physical or virtual "
3011 "hard drive). The original Linux IDE driver used names starting with "
3012 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
3013 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
3014 "replacement for the old IDE driver (particularly for SATA devices) those "
3015 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
3016 "machines with paravirtualized drivers. This has created several different "
3017 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
3022 #: ../src/guestfs.pod:1526
3024 "As discussed above, libguestfs uses a qemu appliance running an embedded "
3025 "Linux kernel to access block devices. We can run a variety of appliances "
3026 "based on a variety of Linux kernels."
3030 #: ../src/guestfs.pod:1530
3032 "This causes a problem for libguestfs because many API calls use device or "
3033 "partition names. Working scripts and the recipe (example) scripts that we "
3034 "make available over the internet could fail if the naming scheme changes."
3038 #: ../src/guestfs.pod:1535
3040 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
3041 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
3042 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
3043 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
3047 #: ../src/guestfs.pod:1541
3049 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
3050 "L</guestfs_list_partitions> and similar calls return the true names of the "
3051 "devices and partitions as known to the appliance."
3055 #: ../src/guestfs.pod:1546
3056 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
3060 #: ../src/guestfs.pod:1548
3062 "Usually this translation is transparent. However in some (very rare) cases "
3063 "you may need to know the exact algorithm. Such cases include where you use "
3064 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
3065 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
3070 #: ../src/guestfs.pod:1554
3072 "The algorithm is applied only to I<parameters> which are known to be either "
3073 "device or partition names. Return values from functions such as "
3074 "L</guestfs_list_devices> are never changed."
3078 #: ../src/guestfs.pod:1562
3079 msgid "Is the string a parameter which is a device or partition name?"
3083 #: ../src/guestfs.pod:1566
3084 msgid "Does the string begin with C</dev/sd>?"
3088 #: ../src/guestfs.pod:1570
3090 "Does the named device exist? If so, we use that device. However if I<not> "
3091 "then we continue with this algorithm."
3095 #: ../src/guestfs.pod:1575
3096 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
3100 #: ../src/guestfs.pod:1577
3101 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
3105 #: ../src/guestfs.pod:1579
3106 msgid "If that named device exists, use it. If not, continue."
3110 #: ../src/guestfs.pod:1583
3111 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
3115 #: ../src/guestfs.pod:1585
3116 msgid "If that named device exists, use it. If not, return an error."
3120 #: ../src/guestfs.pod:1589
3121 msgid "PORTABILITY CONCERNS"
3125 #: ../src/guestfs.pod:1591
3127 "Although the standard naming scheme and automatic translation is useful for "
3128 "simple programs and guestfish scripts, for larger programs it is best not to "
3129 "rely on this mechanism."
3133 #: ../src/guestfs.pod:1595
3135 "Where possible for maximum future portability programs using libguestfs "
3136 "should use these future-proof techniques:"
3140 #: ../src/guestfs.pod:1602
3142 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
3143 "device names, and then use those names directly."
3147 #: ../src/guestfs.pod:1605
3148 msgid "Since those device names exist by definition, they will never be translated."
3152 #: ../src/guestfs.pod:1610
3154 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
3155 "filesystem labels."
3159 #: ../src/guestfs.pod:1615
3164 #: ../src/guestfs.pod:1617
3165 msgid "COMMUNICATION PROTOCOL"
3169 #: ../src/guestfs.pod:1619
3171 "Don't rely on using this protocol directly. This section documents how it "
3172 "currently works, but it may change at any time."
3176 #: ../src/guestfs.pod:1622
3178 "The protocol used to talk between the library and the daemon running inside "
3179 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
3180 "1014, RFC 1832, RFC 4506)."
3184 #: ../src/guestfs.pod:1626
3186 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
3187 "this file is automatically generated)."
3191 #: ../src/guestfs.pod:1629
3193 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
3194 "and C<FileOut> parameters, which are handled with very simple request/reply "
3195 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
3196 "parameters, which use the same request and reply messages, but they may also "
3197 "be followed by files sent using a chunked encoding."
3201 #: ../src/guestfs.pod:1636
3202 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
3206 #: ../src/guestfs.pod:1638
3207 msgid "For ordinary functions, the request message is:"
3211 #: ../src/guestfs.pod:1640
3214 " total length (header + arguments,\n"
3215 " but not including the length word itself)\n"
3216 " struct guestfs_message_header (encoded as XDR)\n"
3217 " struct guestfs_<foo>_args (encoded as XDR)\n"
3222 #: ../src/guestfs.pod:1645
3224 "The total length field allows the daemon to allocate a fixed size buffer "
3225 "into which it slurps the rest of the message. As a result, the total length "
3226 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
3227 "effective size of any request is limited to somewhere under this size."
3231 #: ../src/guestfs.pod:1651
3233 "Note also that many functions don't take any arguments, in which case the "
3234 "C<guestfs_I<foo>_args> is completely omitted."
3238 #: ../src/guestfs.pod:1654
3240 "The header contains the procedure number (C<guestfs_proc>) which is how the "
3241 "receiver knows what type of args structure to expect, or none at all."
3245 #: ../src/guestfs.pod:1658
3246 msgid "The reply message for ordinary functions is:"
3250 #: ../src/guestfs.pod:1660
3253 " total length (header + ret,\n"
3254 " but not including the length word itself)\n"
3255 " struct guestfs_message_header (encoded as XDR)\n"
3256 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3261 #: ../src/guestfs.pod:1665
3263 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
3264 "functions that return no formal return values."
3268 #: ../src/guestfs.pod:1668
3269 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
3273 #: ../src/guestfs.pod:1671
3275 "In the case of an error, a flag is set in the header, and the reply message "
3276 "is slightly changed:"
3280 #: ../src/guestfs.pod:1674
3283 " total length (header + error,\n"
3284 " but not including the length word itself)\n"
3285 " struct guestfs_message_header (encoded as XDR)\n"
3286 " struct guestfs_message_error (encoded as XDR)\n"
3291 #: ../src/guestfs.pod:1679
3293 "The C<guestfs_message_error> structure contains the error message as a "
3298 #: ../src/guestfs.pod:1682
3299 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
3303 #: ../src/guestfs.pod:1684
3305 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
3306 "The normal request message is sent (see above). However this is followed by "
3307 "a sequence of file chunks."
3311 #: ../src/guestfs.pod:1688
3314 " total length (header + arguments,\n"
3315 " but not including the length word itself,\n"
3316 " and not including the chunks)\n"
3317 " struct guestfs_message_header (encoded as XDR)\n"
3318 " struct guestfs_<foo>_args (encoded as XDR)\n"
3319 " sequence of chunks for FileIn param #0\n"
3320 " sequence of chunks for FileIn param #1 etc.\n"
3325 #: ../src/guestfs.pod:1696
3326 msgid "The \"sequence of chunks\" is:"
3330 #: ../src/guestfs.pod:1698
3333 " length of chunk (not including length word itself)\n"
3334 " struct guestfs_chunk (encoded as XDR)\n"
3335 " length of chunk\n"
3336 " struct guestfs_chunk (encoded as XDR)\n"
3338 " length of chunk\n"
3339 " struct guestfs_chunk (with data.data_len == 0)\n"
3344 #: ../src/guestfs.pod:1706
3346 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
3347 "is set in the final chunk to indicate either successful completion or early "
3352 #: ../src/guestfs.pod:1710
3354 "At time of writing there are no functions that have more than one FileIn "
3355 "parameter. However this is (theoretically) supported, by sending the "
3356 "sequence of chunks for each FileIn parameter one after another (from left to "
3361 #: ../src/guestfs.pod:1715
3363 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
3364 "transfer. The library does this by sending a chunk with a special flag set "
3365 "to indicate cancellation. When the daemon sees this, it cancels the whole "
3366 "RPC, does I<not> send any reply, and goes back to reading the next request."
3370 #: ../src/guestfs.pod:1721
3372 "The daemon may also cancel. It does this by writing a special word "
3373 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
3374 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
3375 "cancel chunk). The special word is chosen so that even if cancellation "
3376 "happens right at the end of the transfer (after the library has finished "
3377 "writing and has started listening for the reply), the \"spurious\" cancel "
3378 "flag will not be confused with the reply message."
3382 #: ../src/guestfs.pod:1730
3384 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
3385 "limit), and also files where the size is not known in advance (eg. from "
3386 "pipes or sockets). However the chunks are rather small "
3387 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
3388 "to keep much in memory."
3392 #: ../src/guestfs.pod:1736
3393 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
3397 #: ../src/guestfs.pod:1738
3399 "The protocol for FileOut parameters is exactly the same as for FileIn "
3400 "parameters, but with the roles of daemon and library reversed."
3404 #: ../src/guestfs.pod:1741
3407 " total length (header + ret,\n"
3408 " but not including the length word itself,\n"
3409 " and not including the chunks)\n"
3410 " struct guestfs_message_header (encoded as XDR)\n"
3411 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3412 " sequence of chunks for FileOut param #0\n"
3413 " sequence of chunks for FileOut param #1 etc.\n"
3418 #: ../src/guestfs.pod:1749
3419 msgid "INITIAL MESSAGE"
3423 #: ../src/guestfs.pod:1751
3425 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
3426 "which indicates that the guest and daemon is alive. This is what "
3427 "L</guestfs_launch> waits for."
3431 #: ../src/guestfs.pod:1755
3432 msgid "PROGRESS NOTIFICATION MESSAGES"
3436 #: ../src/guestfs.pod:1757
3438 "The daemon may send progress notification messages at any time. These are "
3439 "distinguished by the normal length word being replaced by "
3440 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
3444 #: ../src/guestfs.pod:1761
3446 "The library turns them into progress callbacks (see "
3447 "C<guestfs_set_progress_callback>) if there is a callback registered, or "
3448 "discards them if not."
3452 #: ../src/guestfs.pod:1765
3454 "The daemon self-limits the frequency of progress messages it sends (see "
3455 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
3460 #: ../src/guestfs.pod:1769
3461 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
3465 #: ../src/guestfs.pod:1771
3467 "All high-level libguestfs actions are synchronous. If you want to use "
3468 "libguestfs asynchronously then you must create a thread."
3472 #: ../src/guestfs.pod:1774
3474 "Only use the handle from a single thread. Either use the handle exclusively "
3475 "from one thread, or provide your own mutex so that two threads cannot issue "
3476 "calls on the same handle at the same time."
3480 #: ../src/guestfs.pod:1778
3482 "See the graphical program guestfs-browser for one possible architecture for "
3483 "multithreaded programs using libvirt and libguestfs."
3487 #: ../src/guestfs.pod:1781
3488 msgid "QEMU WRAPPERS"
3492 #: ../src/guestfs.pod:1783
3494 "If you want to compile your own qemu, run qemu from a non-standard location, "
3495 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
3500 #: ../src/guestfs.pod:1787
3502 "There is one important rule to remember: you I<must C<exec qemu>> as the "
3503 "last command in the shell script (so that qemu replaces the shell and "
3504 "becomes the direct child of the libguestfs-using program). If you don't do "
3505 "this, then the qemu process won't be cleaned up correctly."
3509 #: ../src/guestfs.pod:1792
3511 "Here is an example of a wrapper, where I have built my own copy of qemu from "
3516 #: ../src/guestfs.pod:1795
3520 " qemudir=/home/rjones/d/qemu\n"
3521 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
3527 #: ../src/guestfs.pod:1799
3529 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
3530 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
3535 #: ../src/guestfs.pod:1803
3538 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
3543 #: ../src/guestfs.pod:1805
3545 "Note that libguestfs also calls qemu with the -help and -version options in "
3546 "order to determine features."
3550 #: ../src/guestfs.pod:1808
3551 msgid "LIBGUESTFS VERSION NUMBERS"
3555 #: ../src/guestfs.pod:1810
3557 "Since April 2010, libguestfs has started to make separate development and "
3558 "stable releases, along with corresponding branches in our git repository. "
3559 "These separate releases can be identified by version number:"
3563 #: ../src/guestfs.pod:1815
3566 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3567 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3573 " | `-------- sub-version\n"
3575 " `------ always '1' because we don't change the ABI\n"
3580 #: ../src/guestfs.pod:1826
3581 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3585 #: ../src/guestfs.pod:1828
3587 "As time passes we cherry pick fixes from the development branch and backport "
3588 "those into the stable branch, the effect being that the stable branch should "
3589 "get more stable and less buggy over time. So the stable releases are ideal "
3590 "for people who don't need new features but would just like the software to "
3595 #: ../src/guestfs.pod:1834
3596 msgid "Our criteria for backporting changes are:"
3600 #: ../src/guestfs.pod:1840
3602 "Documentation changes which don't affect any code are backported unless the "
3603 "documentation refers to a future feature which is not in stable."
3607 #: ../src/guestfs.pod:1846
3609 "Bug fixes which are not controversial, fix obvious problems, and have been "
3610 "well tested are backported."
3614 #: ../src/guestfs.pod:1851
3616 "Simple rearrangements of code which shouldn't affect how it works get "
3617 "backported. This is so that the code in the two branches doesn't get too "
3618 "far out of step, allowing us to backport future fixes more easily."
3622 #: ../src/guestfs.pod:1857
3624 "We I<don't> backport new features, new APIs, new tools etc, except in one "
3625 "exceptional case: the new feature is required in order to implement an "
3626 "important bug fix."
3630 #: ../src/guestfs.pod:1863
3632 "A new stable branch starts when we think the new features in development are "
3633 "substantial and compelling enough over the current stable branch to warrant "
3634 "it. When that happens we create new stable and development versions 1.N.0 "
3635 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
3636 "stable at this point, but by backporting fixes from development, that branch "
3637 "will stabilize over time."
3641 #: ../src/guestfs.pod:1871 ../fish/guestfish.pod:868 ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:330 ../tools/virt-rescue.pl:255
3642 msgid "ENVIRONMENT VARIABLES"
3646 #: ../src/guestfs.pod:1875 ../fish/guestfish.pod:894
3647 msgid "LIBGUESTFS_APPEND"
3651 #: ../src/guestfs.pod:1877 ../fish/guestfish.pod:896
3652 msgid "Pass additional options to the guest kernel."
3656 #: ../src/guestfs.pod:1879 ../fish/guestfish.pod:898
3657 msgid "LIBGUESTFS_DEBUG"
3661 #: ../src/guestfs.pod:1881
3663 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
3664 "effect as calling C<guestfs_set_verbose (g, 1)>."
3668 #: ../src/guestfs.pod:1884 ../fish/guestfish.pod:903
3669 msgid "LIBGUESTFS_MEMSIZE"
3673 #: ../src/guestfs.pod:1886 ../fish/guestfish.pod:905
3674 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
3678 #: ../src/guestfs.pod:1889 ../fish/guestfish.pod:908
3681 " LIBGUESTFS_MEMSIZE=700\n"
3686 #: ../src/guestfs.pod:1891 ../fish/guestfish.pod:910
3687 msgid "LIBGUESTFS_PATH"
3691 #: ../src/guestfs.pod:1893
3693 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
3694 "the discussion of paths in section PATH above."
3698 #: ../src/guestfs.pod:1896 ../fish/guestfish.pod:915
3699 msgid "LIBGUESTFS_QEMU"
3703 #: ../src/guestfs.pod:1898 ../fish/guestfish.pod:917
3705 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
3706 "which was found at compile time by the configure script is used."
3710 #: ../src/guestfs.pod:1902
3711 msgid "See also L</QEMU WRAPPERS> above."
3715 #: ../src/guestfs.pod:1904 ../fish/guestfish.pod:921
3716 msgid "LIBGUESTFS_TRACE"
3720 #: ../src/guestfs.pod:1906
3722 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
3723 "effect as calling C<guestfs_set_trace (g, 1)>."
3727 #: ../src/guestfs.pod:1909 ../fish/guestfish.pod:930
3732 #: ../src/guestfs.pod:1911 ../fish/guestfish.pod:932
3733 msgid "Location of temporary directory, defaults to C</tmp>."
3737 #: ../src/guestfs.pod:1913 ../fish/guestfish.pod:934
3739 "If libguestfs was compiled to use the supermin appliance then the real "
3740 "appliance is cached in this directory, shared between all handles belonging "
3741 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
3742 "use in case C</tmp> is not large enough."
3746 #: ../src/guestfs.pod:1921 ../fish/guestfish.pod:992 ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:226 ../inspector/virt-inspector.pl:570 ../tools/virt-edit.pl:350 ../tools/virt-win-reg.pl:484 ../tools/virt-df.pl:640 ../tools/virt-ls.pl:232 ../tools/virt-resize.pl:1486 ../tools/virt-list-filesystems.pl:186 ../tools/virt-cat.pl:185 ../tools/virt-tar.pl:281 ../tools/virt-rescue.pl:267 ../tools/virt-make-fs.pl:534 ../tools/virt-list-partitions.pl:254
3751 #: ../src/guestfs.pod:1923
3753 "L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
3754 "L<virt-edit(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
3755 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
3756 "L<virt-rescue(1)>, L<virt-tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
3757 "L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
3761 #: ../src/guestfs.pod:1941
3763 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
3764 "L<lvm(8)>, L<disktype(1)>."
3768 #: ../src/guestfs.pod:1948 ../tools/virt-win-reg.pl:499 ../tools/virt-make-fs.pl:548
3773 #: ../src/guestfs.pod:1950
3774 msgid "To get a list of bugs against libguestfs use this link:"
3778 #: ../src/guestfs.pod:1952
3779 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
3783 #: ../src/guestfs.pod:1954
3784 msgid "To report a new bug against libguestfs use this link:"
3788 #: ../src/guestfs.pod:1956
3789 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
3793 #: ../src/guestfs.pod:1958
3794 msgid "When reporting a bug, please check:"
3798 #: ../src/guestfs.pod:1964
3799 msgid "That the bug hasn't been reported already."
3803 #: ../src/guestfs.pod:1968
3804 msgid "That you are testing a recent version."
3808 #: ../src/guestfs.pod:1972
3809 msgid "Describe the bug accurately, and give a way to reproduce it."
3813 #: ../src/guestfs.pod:1976
3815 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
3820 #: ../src/guestfs.pod:1981 ../fish/guestfish.pod:1009 ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:237 ../inspector/virt-inspector.pl:580
3825 #: ../src/guestfs.pod:1983 ../fish/guestfish.pod:1011 ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:239
3826 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
3830 #: ../src/guestfs.pod:1985 ../fish/guestfish.pod:1013 ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:241 ../inspector/virt-inspector.pl:594 ../tools/virt-edit.pl:366 ../tools/virt-win-reg.pl:514 ../tools/virt-df.pl:653 ../tools/virt-ls.pl:247 ../tools/virt-resize.pl:1512 ../tools/virt-list-filesystems.pl:202 ../tools/virt-cat.pl:199 ../tools/virt-tar.pl:296 ../tools/virt-rescue.pl:281 ../tools/virt-make-fs.pl:563 ../tools/virt-list-partitions.pl:269
3835 #: ../src/guestfs.pod:1987 ../fish/guestfish.pod:1015 ../fuse/guestmount.pod:243
3836 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
3840 #: ../src/guestfs.pod:1990
3842 "This library is free software; you can redistribute it and/or modify it "
3843 "under the terms of the GNU Lesser General Public License as published by the "
3844 "Free Software Foundation; either version 2 of the License, or (at your "
3845 "option) any later version."
3849 #: ../src/guestfs.pod:1995
3851 "This library is distributed in the hope that it will be useful, but WITHOUT "
3852 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
3853 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
3858 #: ../src/guestfs.pod:2000
3860 "You should have received a copy of the GNU Lesser General Public License "
3861 "along with this library; if not, write to the Free Software Foundation, "
3862 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
3866 #: ../src/guestfs-actions.pod:1
3867 msgid "guestfs_add_cdrom"
3871 #: ../src/guestfs-actions.pod:3
3875 " guestfs_add_cdrom (guestfs_h *g,\n"
3876 " const char *filename);\n"
3881 #: ../src/guestfs-actions.pod:7 ../fish/guestfish-actions.pod:5
3882 msgid "This function adds a virtual CD-ROM disk image to the guest."
3886 #: ../src/guestfs-actions.pod:9 ../fish/guestfish-actions.pod:7
3887 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
3891 #: ../src/guestfs-actions.pod:17
3893 "This call checks for the existence of C<filename>. This stops you from "
3894 "specifying other types of drive which are supported by qemu such as C<nbd:> "
3895 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
3900 #: ../src/guestfs-actions.pod:24
3902 "If you just want to add an ISO file (often you use this as an efficient way "
3903 "to transfer large files into the guest), then you should probably use "
3904 "C<guestfs_add_drive_ro> instead."
3908 #: ../src/guestfs-actions.pod:30 ../src/guestfs-actions.pod:58 ../src/guestfs-actions.pod:119 ../src/guestfs-actions.pod:156 ../src/guestfs-actions.pod:170 ../src/guestfs-actions.pod:191 ../src/guestfs-actions.pod:211 ../src/guestfs-actions.pod:225 ../src/guestfs-actions.pod:340 ../src/guestfs-actions.pod:360 ../src/guestfs-actions.pod:374 ../src/guestfs-actions.pod:419 ../src/guestfs-actions.pod:447 ../src/guestfs-actions.pod:465 ../src/guestfs-actions.pod:532 ../src/guestfs-actions.pod:565 ../src/guestfs-actions.pod:579 ../src/guestfs-actions.pod:594 ../src/guestfs-actions.pod:693 ../src/guestfs-actions.pod:711 ../src/guestfs-actions.pod:725 ../src/guestfs-actions.pod:739 ../src/guestfs-actions.pod:900 ../src/guestfs-actions.pod:920 ../src/guestfs-actions.pod:938 ../src/guestfs-actions.pod:1022 ../src/guestfs-actions.pod:1040 ../src/guestfs-actions.pod:1059 ../src/guestfs-actions.pod:1073 ../src/guestfs-actions.pod:1093 ../src/guestfs-actions.pod:1132 ../src/guestfs-actions.pod:1202 ../src/guestfs-actions.pod:1233 ../src/guestfs-actions.pod:1258 ../src/guestfs-actions.pod:1295 ../src/guestfs-actions.pod:1401 ../src/guestfs-actions.pod:1435 ../src/guestfs-actions.pod:1653 ../src/guestfs-actions.pod:1675 ../src/guestfs-actions.pod:1762 ../src/guestfs-actions.pod:2185 ../src/guestfs-actions.pod:2329 ../src/guestfs-actions.pod:2390 ../src/guestfs-actions.pod:2426 ../src/guestfs-actions.pod:2944 ../src/guestfs-actions.pod:2959 ../src/guestfs-actions.pod:2979 ../src/guestfs-actions.pod:3105 ../src/guestfs-actions.pod:3119 ../src/guestfs-actions.pod:3132 ../src/guestfs-actions.pod:3146 ../src/guestfs-actions.pod:3161 ../src/guestfs-actions.pod:3197 ../src/guestfs-actions.pod:3270 ../src/guestfs-actions.pod:3290 ../src/guestfs-actions.pod:3307 ../src/guestfs-actions.pod:3330 ../src/guestfs-actions.pod:3353 ../src/guestfs-actions.pod:3385 ../src/guestfs-actions.pod:3404 ../src/guestfs-actions.pod:3423 ../src/guestfs-actions.pod:3458 ../src/guestfs-actions.pod:3470 ../src/guestfs-actions.pod:3506 ../src/guestfs-actions.pod:3522 ../src/guestfs-actions.pod:3535 ../src/guestfs-actions.pod:3550 ../src/guestfs-actions.pod:3567 ../src/guestfs-actions.pod:3662 ../src/guestfs-actions.pod:3682 ../src/guestfs-actions.pod:3695 ../src/guestfs-actions.pod:3746 ../src/guestfs-actions.pod:3764 ../src/guestfs-actions.pod:3782 ../src/guestfs-actions.pod:3798 ../src/guestfs-actions.pod:3812 ../src/guestfs-actions.pod:3826 ../src/guestfs-actions.pod:3843 ../src/guestfs-actions.pod:3858 ../src/guestfs-actions.pod:3878 ../src/guestfs-actions.pod:3927 ../src/guestfs-actions.pod:3958 ../src/guestfs-actions.pod:3977 ../src/guestfs-actions.pod:3996 ../src/guestfs-actions.pod:4008 ../src/guestfs-actions.pod:4025 ../src/guestfs-actions.pod:4038 ../src/guestfs-actions.pod:4053 ../src/guestfs-actions.pod:4068 ../src/guestfs-actions.pod:4103 ../src/guestfs-actions.pod:4118 ../src/guestfs-actions.pod:4138 ../src/guestfs-actions.pod:4152 ../src/guestfs-actions.pod:4169 ../src/guestfs-actions.pod:4218 ../src/guestfs-actions.pod:4255 ../src/guestfs-actions.pod:4269 ../src/guestfs-actions.pod:4297 ../src/guestfs-actions.pod:4314 ../src/guestfs-actions.pod:4332 ../src/guestfs-actions.pod:4466 ../src/guestfs-actions.pod:4524 ../src/guestfs-actions.pod:4546 ../src/guestfs-actions.pod:4564 ../src/guestfs-actions.pod:4596 ../src/guestfs-actions.pod:4662 ../src/guestfs-actions.pod:4679 ../src/guestfs-actions.pod:4692 ../src/guestfs-actions.pod:4706 ../src/guestfs-actions.pod:4997 ../src/guestfs-actions.pod:5016 ../src/guestfs-actions.pod:5030 ../src/guestfs-actions.pod:5042 ../src/guestfs-actions.pod:5056 ../src/guestfs-actions.pod:5068 ../src/guestfs-actions.pod:5082 ../src/guestfs-actions.pod:5098 ../src/guestfs-actions.pod:5119 ../src/guestfs-actions.pod:5138 ../src/guestfs-actions.pod:5157 ../src/guestfs-actions.pod:5175 ../src/guestfs-actions.pod:5198 ../src/guestfs-actions.pod:5216 ../src/guestfs-actions.pod:5235 ../src/guestfs-actions.pod:5256 ../src/guestfs-actions.pod:5275 ../src/guestfs-actions.pod:5292 ../src/guestfs-actions.pod:5320 ../src/guestfs-actions.pod:5344 ../src/guestfs-actions.pod:5363 ../src/guestfs-actions.pod:5387 ../src/guestfs-actions.pod:5402 ../src/guestfs-actions.pod:5417 ../src/guestfs-actions.pod:5436 ../src/guestfs-actions.pod:5473 ../src/guestfs-actions.pod:5496 ../src/guestfs-actions.pod:5522 ../src/guestfs-actions.pod:5630 ../src/guestfs-actions.pod:5751 ../src/guestfs-actions.pod:5763 ../src/guestfs-actions.pod:5776 ../src/guestfs-actions.pod:5789 ../src/guestfs-actions.pod:5811 ../src/guestfs-actions.pod:5824 ../src/guestfs-actions.pod:5837 ../src/guestfs-actions.pod:5850 ../src/guestfs-actions.pod:5865 ../src/guestfs-actions.pod:5924 ../src/guestfs-actions.pod:5941 ../src/guestfs-actions.pod:5957 ../src/guestfs-actions.pod:5973 ../src/guestfs-actions.pod:5990 ../src/guestfs-actions.pod:6003 ../src/guestfs-actions.pod:6023 ../src/guestfs-actions.pod:6059 ../src/guestfs-actions.pod:6073 ../src/guestfs-actions.pod:6114 ../src/guestfs-actions.pod:6127 ../src/guestfs-actions.pod:6145 ../src/guestfs-actions.pod:6174 ../src/guestfs-actions.pod:6205 ../src/guestfs-actions.pod:6324 ../src/guestfs-actions.pod:6342 ../src/guestfs-actions.pod:6356 ../src/guestfs-actions.pod:6411 ../src/guestfs-actions.pod:6424 ../src/guestfs-actions.pod:6470 ../src/guestfs-actions.pod:6503 ../src/guestfs-actions.pod:6557 ../src/guestfs-actions.pod:6583 ../src/guestfs-actions.pod:6649 ../src/guestfs-actions.pod:6668 ../src/guestfs-actions.pod:6697
3909 msgid "This function returns 0 on success or -1 on error."
3913 #: ../src/guestfs-actions.pod:32 ../src/guestfs-actions.pod:172 ../src/guestfs-actions.pod:193 ../fish/guestfish-actions.pod:28 ../fish/guestfish-actions.pod:117 ../fish/guestfish-actions.pod:131
3915 "This function is deprecated. In new code, use the C<add_drive_opts> call "
3920 #: ../src/guestfs-actions.pod:35 ../src/guestfs-actions.pod:175 ../src/guestfs-actions.pod:196 ../src/guestfs-actions.pod:1406 ../src/guestfs-actions.pod:1892 ../src/guestfs-actions.pod:1913 ../src/guestfs-actions.pod:6591 ../src/guestfs-actions.pod:6760 ../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:4353 ../fish/guestfish-actions.pod:4450
3922 "Deprecated functions will not be removed from the API, but the fact that "
3923 "they are deprecated indicates that there are problems with correct use of "
3928 #: ../src/guestfs-actions.pod:39 ../src/guestfs-actions.pod:60 ../src/guestfs-actions.pod:1024 ../src/guestfs-actions.pod:1864 ../src/guestfs-actions.pod:1962 ../src/guestfs-actions.pod:2065 ../src/guestfs-actions.pod:2946 ../src/guestfs-actions.pod:2961 ../src/guestfs-actions.pod:4105 ../src/guestfs-actions.pod:5177 ../src/guestfs-actions.pod:5294 ../src/guestfs-actions.pod:5404 ../src/guestfs-actions.pod:5867 ../src/guestfs-actions.pod:5992 ../src/guestfs-actions.pod:6505
3929 msgid "(Added in 0.3)"
3933 #: ../src/guestfs-actions.pod:41
3934 msgid "guestfs_add_drive"
3938 #: ../src/guestfs-actions.pod:43
3942 " guestfs_add_drive (guestfs_h *g,\n"
3943 " const char *filename);\n"
3948 #: ../src/guestfs-actions.pod:47
3950 "This function is the equivalent of calling C<guestfs_add_drive_opts> with no "
3951 "optional parameters, so the disk is added writable, with the format being "
3952 "detected automatically."
3956 #: ../src/guestfs-actions.pod:51
3958 "Automatic detection of the format opens you up to a potential security hole "
3959 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
3960 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
3961 "you should think about replacing calls to this function with calls to "
3962 "C<guestfs_add_drive_opts>, and specifying the format."
3966 #: ../src/guestfs-actions.pod:62
3967 msgid "guestfs_add_drive_opts"
3971 #: ../src/guestfs-actions.pod:64
3975 " guestfs_add_drive_opts (guestfs_h *g,\n"
3976 " const char *filename,\n"
3982 #: ../src/guestfs-actions.pod:69
3984 "You may supply a list of optional arguments to this call. Use zero or more "
3985 "of the following pairs of parameters, and terminate the list with C<-1> on "
3986 "its own. See L</CALLS WITH OPTIONAL ARGUMENTS>."
3990 #: ../src/guestfs-actions.pod:74
3993 " GUESTFS_ADD_DRIVE_OPTS_READONLY, int readonly,\n"
3994 " GUESTFS_ADD_DRIVE_OPTS_FORMAT, const char *format,\n"
3995 " GUESTFS_ADD_DRIVE_OPTS_IFACE, const char *iface,\n"
4000 #: ../src/guestfs-actions.pod:78 ../fish/guestfish-actions.pod:56
4002 "This function adds a virtual machine disk image C<filename> to libguestfs. "
4003 "The first time you call this function, the disk appears as C</dev/sda>, the "
4004 "second time as C</dev/sdb>, and so on."
4008 #: ../src/guestfs-actions.pod:83 ../fish/guestfish-actions.pod:61
4010 "You don't necessarily need to be root when using libguestfs. However you "
4011 "obviously do need sufficient permissions to access the filename for whatever "
4012 "operations you want to perform (ie. read access if you just want to read the "
4013 "image or write access if you want to modify the image)."
4017 #: ../src/guestfs-actions.pod:89 ../fish/guestfish-actions.pod:67
4018 msgid "This call checks that C<filename> exists."
4022 #: ../src/guestfs-actions.pod:91 ../fish/guestfish-actions.pod:69
4023 msgid "The optional arguments are:"
4027 #: ../src/guestfs-actions.pod:95 ../fish/guestfish-actions.pod:73
4032 #: ../src/guestfs-actions.pod:97 ../fish/guestfish-actions.pod:75
4034 "If true then the image is treated as read-only. Writes are still allowed, "
4035 "but they are stored in a temporary snapshot overlay which is discarded at "
4036 "the end. The disk that you add is not modified."
4040 #: ../src/guestfs-actions.pod:101 ../fish/guestfish-actions.pod:79
4045 #: ../src/guestfs-actions.pod:103
4047 "This forces the image format. If you omit this (or use C<guestfs_add_drive> "
4048 "or C<guestfs_add_drive_ro>) then the format is automatically detected. "
4049 "Possible formats include C<raw> and C<qcow2>."
4053 #: ../src/guestfs-actions.pod:107 ../fish/guestfish-actions.pod:85
4055 "Automatic detection of the format opens you up to a potential security hole "
4056 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
4057 "RHBZ#642934. Specifying the format closes this security hole."
4061 #: ../src/guestfs-actions.pod:112 ../fish/guestfish-actions.pod:90
4066 #: ../src/guestfs-actions.pod:114
4068 "This rarely-used option lets you emulate the behaviour of the deprecated "
4069 "C<guestfs_add_drive_with_if> call (q.v.)"
4073 #: ../src/guestfs-actions.pod:121
4074 msgid "(Added in 1.5.23)"
4078 #: ../src/guestfs-actions.pod:123
4079 msgid "guestfs_add_drive_opts_va"
4083 #: ../src/guestfs-actions.pod:125
4087 " guestfs_add_drive_opts_va (guestfs_h *g,\n"
4088 " const char *filename,\n"
4094 #: ../src/guestfs-actions.pod:130
4095 msgid "This is the \"va_list variant\" of L</guestfs_add_drive_opts>."
4099 #: ../src/guestfs-actions.pod:132 ../src/guestfs-actions.pod:143
4100 msgid "See L</CALLS WITH OPTIONAL ARGUMENTS>."
4104 #: ../src/guestfs-actions.pod:134
4105 msgid "guestfs_add_drive_opts_argv"
4109 #: ../src/guestfs-actions.pod:136
4113 " guestfs_add_drive_opts_argv (guestfs_h *g,\n"
4114 " const char *filename,\n"
4115 " const struct guestfs_add_drive_opts_argv "
4121 #: ../src/guestfs-actions.pod:141
4122 msgid "This is the \"argv variant\" of L</guestfs_add_drive_opts>."
4126 #: ../src/guestfs-actions.pod:145
4127 msgid "guestfs_add_drive_ro"
4131 #: ../src/guestfs-actions.pod:147
4135 " guestfs_add_drive_ro (guestfs_h *g,\n"
4136 " const char *filename);\n"
4141 #: ../src/guestfs-actions.pod:151
4143 "This function is the equivalent of calling C<guestfs_add_drive_opts> with "
4144 "the optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the "
4145 "disk is added read-only, with the format being detected automatically."
4149 #: ../src/guestfs-actions.pod:158
4150 msgid "(Added in 1.0.38)"
4154 #: ../src/guestfs-actions.pod:160
4155 msgid "guestfs_add_drive_ro_with_if"
4159 #: ../src/guestfs-actions.pod:162
4163 " guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
4164 " const char *filename,\n"
4165 " const char *iface);\n"
4170 #: ../src/guestfs-actions.pod:167
4172 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
4173 "QEMU interface emulation to use at run time."
4177 #: ../src/guestfs-actions.pod:179 ../src/guestfs-actions.pod:200 ../src/guestfs-actions.pod:2275
4178 msgid "(Added in 1.0.84)"
4182 #: ../src/guestfs-actions.pod:181
4183 msgid "guestfs_add_drive_with_if"
4187 #: ../src/guestfs-actions.pod:183
4191 " guestfs_add_drive_with_if (guestfs_h *g,\n"
4192 " const char *filename,\n"
4193 " const char *iface);\n"
4198 #: ../src/guestfs-actions.pod:188
4200 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
4201 "QEMU interface emulation to use at run time."
4205 #: ../src/guestfs-actions.pod:202
4206 msgid "guestfs_aug_clear"
4210 #: ../src/guestfs-actions.pod:204
4214 " guestfs_aug_clear (guestfs_h *g,\n"
4215 " const char *augpath);\n"
4220 #: ../src/guestfs-actions.pod:208 ../fish/guestfish-actions.pod:142
4222 "Set the value associated with C<path> to C<NULL>. This is the same as the "
4223 "L<augtool(1)> C<clear> command."
4227 #: ../src/guestfs-actions.pod:213 ../src/guestfs-actions.pod:2054
4228 msgid "(Added in 1.3.4)"
4232 #: ../src/guestfs-actions.pod:215
4233 msgid "guestfs_aug_close"
4237 #: ../src/guestfs-actions.pod:217
4241 " guestfs_aug_close (guestfs_h *g);\n"
4246 #: ../src/guestfs-actions.pod:220
4248 "Close the current Augeas handle and free up any resources used by it. After "
4249 "calling this, you have to call C<guestfs_aug_init> again before you can use "
4250 "any other Augeas functions."
4254 #: ../src/guestfs-actions.pod:227 ../src/guestfs-actions.pod:252 ../src/guestfs-actions.pod:270 ../src/guestfs-actions.pod:284 ../src/guestfs-actions.pod:342 ../src/guestfs-actions.pod:362 ../src/guestfs-actions.pod:376 ../src/guestfs-actions.pod:407 ../src/guestfs-actions.pod:421 ../src/guestfs-actions.pod:435 ../src/guestfs-actions.pod:449 ../src/guestfs-actions.pod:467 ../src/guestfs-actions.pod:4854
4255 msgid "(Added in 0.7)"
4259 #: ../src/guestfs-actions.pod:229
4260 msgid "guestfs_aug_defnode"
4264 #: ../src/guestfs-actions.pod:231
4267 " struct guestfs_int_bool *\n"
4268 " guestfs_aug_defnode (guestfs_h *g,\n"
4269 " const char *name,\n"
4270 " const char *expr,\n"
4271 " const char *val);\n"
4276 #: ../src/guestfs-actions.pod:237 ../fish/guestfish-actions.pod:158
4277 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
4281 #: ../src/guestfs-actions.pod:240
4283 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
4284 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
4285 "containing that single node."
4289 #: ../src/guestfs-actions.pod:244 ../fish/guestfish-actions.pod:165
4291 "On success this returns a pair containing the number of nodes in the "
4292 "nodeset, and a boolean flag if a node was created."
4296 #: ../src/guestfs-actions.pod:248
4298 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
4299 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
4303 #: ../src/guestfs-actions.pod:254
4304 msgid "guestfs_aug_defvar"
4308 #: ../src/guestfs-actions.pod:256
4312 " guestfs_aug_defvar (guestfs_h *g,\n"
4313 " const char *name,\n"
4314 " const char *expr);\n"
4319 #: ../src/guestfs-actions.pod:261 ../fish/guestfish-actions.pod:173
4321 "Defines an Augeas variable C<name> whose value is the result of evaluating "
4322 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
4326 #: ../src/guestfs-actions.pod:265 ../fish/guestfish-actions.pod:177
4328 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
4329 "evaluates to something which is not a nodeset."
4333 #: ../src/guestfs-actions.pod:268 ../src/guestfs-actions.pod:433 ../src/guestfs-actions.pod:611 ../src/guestfs-actions.pod:642 ../src/guestfs-actions.pod:660 ../src/guestfs-actions.pod:679 ../src/guestfs-actions.pod:1278 ../src/guestfs-actions.pod:1632 ../src/guestfs-actions.pod:1835 ../src/guestfs-actions.pod:1934 ../src/guestfs-actions.pod:1974 ../src/guestfs-actions.pod:2029 ../src/guestfs-actions.pod:2052 ../src/guestfs-actions.pod:2316 ../src/guestfs-actions.pod:2575 ../src/guestfs-actions.pod:2596 ../src/guestfs-actions.pod:4241 ../src/guestfs-actions.pod:4369 ../src/guestfs-actions.pod:4777 ../src/guestfs-actions.pod:4803 ../src/guestfs-actions.pod:6100 ../src/guestfs-actions.pod:6516 ../src/guestfs-actions.pod:6529 ../src/guestfs-actions.pod:6542
4334 msgid "On error this function returns -1."
4338 #: ../src/guestfs-actions.pod:272
4339 msgid "guestfs_aug_get"
4343 #: ../src/guestfs-actions.pod:274
4347 " guestfs_aug_get (guestfs_h *g,\n"
4348 " const char *augpath);\n"
4353 #: ../src/guestfs-actions.pod:278 ../fish/guestfish-actions.pod:184
4355 "Look up the value associated with C<path>. If C<path> matches exactly one "
4356 "node, the C<value> is returned."
4360 #: ../src/guestfs-actions.pod:281 ../src/guestfs-actions.pod:781 ../src/guestfs-actions.pod:799 ../src/guestfs-actions.pod:859 ../src/guestfs-actions.pod:875 ../src/guestfs-actions.pod:978 ../src/guestfs-actions.pod:1112 ../src/guestfs-actions.pod:1147 ../src/guestfs-actions.pod:1164 ../src/guestfs-actions.pod:1183 ../src/guestfs-actions.pod:1312 ../src/guestfs-actions.pod:1503 ../src/guestfs-actions.pod:1615 ../src/guestfs-actions.pod:1778 ../src/guestfs-actions.pod:1795 ../src/guestfs-actions.pod:1886 ../src/guestfs-actions.pod:1907 ../src/guestfs-actions.pod:2077 ../src/guestfs-actions.pod:2240 ../src/guestfs-actions.pod:2448 ../src/guestfs-actions.pod:2521 ../src/guestfs-actions.pod:2652 ../src/guestfs-actions.pod:2690 ../src/guestfs-actions.pod:2713 ../src/guestfs-actions.pod:3091 ../src/guestfs-actions.pod:3442 ../src/guestfs-actions.pod:3613 ../src/guestfs-actions.pod:3724 ../src/guestfs-actions.pod:4387 ../src/guestfs-actions.pod:4581 ../src/guestfs-actions.pod:4752 ../src/guestfs-actions.pod:4931 ../src/guestfs-actions.pod:4980 ../src/guestfs-actions.pod:5543 ../src/guestfs-actions.pod:5559 ../src/guestfs-actions.pod:5576 ../src/guestfs-actions.pod:5600 ../src/guestfs-actions.pod:6264 ../src/guestfs-actions.pod:6283 ../src/guestfs-actions.pod:6301 ../src/guestfs-actions.pod:6482 ../src/guestfs-actions.pod:6754
4362 "This function returns a string, or NULL on error. I<The caller must free "
4363 "the returned string after use>."
4367 #: ../src/guestfs-actions.pod:286
4368 msgid "guestfs_aug_init"
4372 #: ../src/guestfs-actions.pod:288
4376 " guestfs_aug_init (guestfs_h *g,\n"
4377 " const char *root,\n"
4383 #: ../src/guestfs-actions.pod:293 ../fish/guestfish-actions.pod:191
4385 "Create a new Augeas handle for editing configuration files. If there was "
4386 "any previous Augeas handle associated with this guestfs session, then it is "
4391 #: ../src/guestfs-actions.pod:297
4392 msgid "You must call this before using any other C<guestfs_aug_*> commands."
4396 #: ../src/guestfs-actions.pod:300 ../fish/guestfish-actions.pod:198
4397 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
4401 #: ../src/guestfs-actions.pod:303 ../fish/guestfish-actions.pod:201
4403 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
4404 "logical I<or> of the following integers:"
4408 #: ../src/guestfs-actions.pod:309 ../fish/guestfish-actions.pod:207
4409 msgid "C<AUG_SAVE_BACKUP> = 1"
4413 #: ../src/guestfs-actions.pod:311 ../fish/guestfish-actions.pod:209
4414 msgid "Keep the original file with a C<.augsave> extension."
4418 #: ../src/guestfs-actions.pod:313 ../fish/guestfish-actions.pod:211
4419 msgid "C<AUG_SAVE_NEWFILE> = 2"
4423 #: ../src/guestfs-actions.pod:315 ../fish/guestfish-actions.pod:213
4425 "Save changes into a file with extension C<.augnew>, and do not overwrite "
4426 "original. Overrides C<AUG_SAVE_BACKUP>."
4430 #: ../src/guestfs-actions.pod:318 ../fish/guestfish-actions.pod:216
4431 msgid "C<AUG_TYPE_CHECK> = 4"
4435 #: ../src/guestfs-actions.pod:320 ../fish/guestfish-actions.pod:218
4436 msgid "Typecheck lenses (can be expensive)."
4440 #: ../src/guestfs-actions.pod:322 ../fish/guestfish-actions.pod:220
4441 msgid "C<AUG_NO_STDINC> = 8"
4445 #: ../src/guestfs-actions.pod:324 ../fish/guestfish-actions.pod:222
4446 msgid "Do not use standard load path for modules."
4450 #: ../src/guestfs-actions.pod:326 ../fish/guestfish-actions.pod:224
4451 msgid "C<AUG_SAVE_NOOP> = 16"
4455 #: ../src/guestfs-actions.pod:328 ../fish/guestfish-actions.pod:226
4456 msgid "Make save a no-op, just record what would have been changed."
4460 #: ../src/guestfs-actions.pod:330 ../fish/guestfish-actions.pod:228
4461 msgid "C<AUG_NO_LOAD> = 32"
4465 #: ../src/guestfs-actions.pod:332
4466 msgid "Do not load the tree in C<guestfs_aug_init>."
4470 #: ../src/guestfs-actions.pod:336
4471 msgid "To close the handle, you can call C<guestfs_aug_close>."
4475 #: ../src/guestfs-actions.pod:338 ../fish/guestfish-actions.pod:236
4476 msgid "To find out more about Augeas, see L<http://augeas.net/>."
4480 #: ../src/guestfs-actions.pod:344
4481 msgid "guestfs_aug_insert"
4485 #: ../src/guestfs-actions.pod:346
4489 " guestfs_aug_insert (guestfs_h *g,\n"
4490 " const char *augpath,\n"
4491 " const char *label,\n"
4497 #: ../src/guestfs-actions.pod:352 ../fish/guestfish-actions.pod:242
4499 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
4500 "or after C<path> (depending on the boolean flag C<before>)."
4504 #: ../src/guestfs-actions.pod:356 ../fish/guestfish-actions.pod:246
4506 "C<path> must match exactly one existing node in the tree, and C<label> must "
4507 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
4511 #: ../src/guestfs-actions.pod:364
4512 msgid "guestfs_aug_load"
4516 #: ../src/guestfs-actions.pod:366
4520 " guestfs_aug_load (guestfs_h *g);\n"
4525 #: ../src/guestfs-actions.pod:369 ../fish/guestfish-actions.pod:254
4526 msgid "Load files into the tree."
4530 #: ../src/guestfs-actions.pod:371 ../fish/guestfish-actions.pod:256
4531 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
4535 #: ../src/guestfs-actions.pod:378
4536 msgid "guestfs_aug_ls"
4540 #: ../src/guestfs-actions.pod:380
4544 " guestfs_aug_ls (guestfs_h *g,\n"
4545 " const char *augpath);\n"
4550 #: ../src/guestfs-actions.pod:384
4552 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
4553 "sorting the resulting nodes into alphabetical order."
4557 #: ../src/guestfs-actions.pod:387 ../src/guestfs-actions.pod:403 ../src/guestfs-actions.pod:549 ../src/guestfs-actions.pod:997 ../src/guestfs-actions.pod:1327 ../src/guestfs-actions.pod:1346 ../src/guestfs-actions.pod:1449 ../src/guestfs-actions.pod:1468 ../src/guestfs-actions.pod:1717 ../src/guestfs-actions.pod:2120 ../src/guestfs-actions.pod:2136 ../src/guestfs-actions.pod:2155 ../src/guestfs-actions.pod:2198 ../src/guestfs-actions.pod:2222 ../src/guestfs-actions.pod:2293 ../src/guestfs-actions.pod:2342 ../src/guestfs-actions.pod:2546 ../src/guestfs-actions.pod:2755 ../src/guestfs-actions.pod:3011 ../src/guestfs-actions.pod:3073 ../src/guestfs-actions.pod:3178 ../src/guestfs-actions.pod:3584 ../src/guestfs-actions.pod:4202 ../src/guestfs-actions.pod:4723 ../src/guestfs-actions.pod:4850 ../src/guestfs-actions.pod:4965 ../src/guestfs-actions.pod:5616 ../src/guestfs-actions.pod:5677 ../src/guestfs-actions.pod:5732 ../src/guestfs-actions.pod:5878 ../src/guestfs-actions.pod:5902 ../src/guestfs-actions.pod:6374 ../src/guestfs-actions.pod:6394 ../src/guestfs-actions.pod:6441 ../src/guestfs-actions.pod:6607 ../src/guestfs-actions.pod:6626 ../src/guestfs-actions.pod:6711 ../src/guestfs-actions.pod:6730 ../src/guestfs-actions.pod:6776 ../src/guestfs-actions.pod:6795
4559 "This function returns a NULL-terminated array of strings (like "
4560 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
4561 "strings and the array after use>."
4565 #: ../src/guestfs-actions.pod:391 ../src/guestfs-actions.pod:922 ../src/guestfs-actions.pod:940 ../src/guestfs-actions.pod:1384 ../src/guestfs-actions.pod:2833 ../src/guestfs-actions.pod:2864 ../src/guestfs-actions.pod:3425 ../src/guestfs-actions.pod:3475 ../src/guestfs-actions.pod:3664 ../src/guestfs-actions.pod:3697 ../src/guestfs-actions.pod:3860 ../src/guestfs-actions.pod:4206 ../src/guestfs-actions.pod:4664 ../src/guestfs-actions.pod:5044 ../src/guestfs-actions.pod:5058 ../src/guestfs-actions.pod:5070 ../src/guestfs-actions.pod:5478 ../src/guestfs-actions.pod:6116 ../src/guestfs-actions.pod:6129 ../src/guestfs-actions.pod:6358 ../src/guestfs-actions.pod:6562 ../src/guestfs-actions.pod:6595
4566 msgid "(Added in 0.8)"
4570 #: ../src/guestfs-actions.pod:393
4571 msgid "guestfs_aug_match"
4575 #: ../src/guestfs-actions.pod:395
4579 " guestfs_aug_match (guestfs_h *g,\n"
4580 " const char *augpath);\n"
4585 #: ../src/guestfs-actions.pod:399 ../fish/guestfish-actions.pod:270
4587 "Returns a list of paths which match the path expression C<path>. The "
4588 "returned paths are sufficiently qualified so that they match exactly one "
4589 "node in the current tree."
4593 #: ../src/guestfs-actions.pod:409
4594 msgid "guestfs_aug_mv"
4598 #: ../src/guestfs-actions.pod:411
4602 " guestfs_aug_mv (guestfs_h *g,\n"
4603 " const char *src,\n"
4604 " const char *dest);\n"
4609 #: ../src/guestfs-actions.pod:416 ../fish/guestfish-actions.pod:278
4611 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
4612 "C<dest> is overwritten if it exists."
4616 #: ../src/guestfs-actions.pod:423
4617 msgid "guestfs_aug_rm"
4621 #: ../src/guestfs-actions.pod:425
4625 " guestfs_aug_rm (guestfs_h *g,\n"
4626 " const char *augpath);\n"
4631 #: ../src/guestfs-actions.pod:429 ../fish/guestfish-actions.pod:285
4632 msgid "Remove C<path> and all of its children."
4636 #: ../src/guestfs-actions.pod:431 ../fish/guestfish-actions.pod:287
4637 msgid "On success this returns the number of entries which were removed."
4641 #: ../src/guestfs-actions.pod:437
4642 msgid "guestfs_aug_save"
4646 #: ../src/guestfs-actions.pod:439
4650 " guestfs_aug_save (guestfs_h *g);\n"
4655 #: ../src/guestfs-actions.pod:442 ../fish/guestfish-actions.pod:293
4656 msgid "This writes all pending changes to disk."
4660 #: ../src/guestfs-actions.pod:444
4662 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
4667 #: ../src/guestfs-actions.pod:451
4668 msgid "guestfs_aug_set"
4672 #: ../src/guestfs-actions.pod:453
4676 " guestfs_aug_set (guestfs_h *g,\n"
4677 " const char *augpath,\n"
4678 " const char *val);\n"
4683 #: ../src/guestfs-actions.pod:458 ../fish/guestfish-actions.pod:302
4684 msgid "Set the value associated with C<path> to C<val>."
4688 #: ../src/guestfs-actions.pod:460
4690 "In the Augeas API, it is possible to clear a node by setting the value to "
4691 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
4692 "this call. Instead you must use the C<guestfs_aug_clear> call."
4696 #: ../src/guestfs-actions.pod:469
4697 msgid "guestfs_available"
4701 #: ../src/guestfs-actions.pod:471
4705 " guestfs_available (guestfs_h *g,\n"
4706 " char *const *groups);\n"
4711 #: ../src/guestfs-actions.pod:475 ../fish/guestfish-actions.pod:313
4713 "This command is used to check the availability of some groups of "
4714 "functionality in the appliance, which not all builds of the libguestfs "
4715 "appliance will be able to provide."
4719 #: ../src/guestfs-actions.pod:479
4721 "The libguestfs groups, and the functions that those groups correspond to, "
4722 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
4723 "runtime by calling C<guestfs_available_all_groups>."
4727 #: ../src/guestfs-actions.pod:484 ../fish/guestfish-actions.pod:322
4729 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
4730 "\"augeas\"]> would check for the availability of the Linux inotify functions "
4731 "and Augeas (configuration file editing) functions."
4735 #: ../src/guestfs-actions.pod:489 ../fish/guestfish-actions.pod:327
4736 msgid "The command returns no error if I<all> requested groups are available."
4740 #: ../src/guestfs-actions.pod:491 ../fish/guestfish-actions.pod:329
4742 "It fails with an error if one or more of the requested groups is unavailable "
4747 #: ../src/guestfs-actions.pod:494 ../fish/guestfish-actions.pod:332
4749 "If an unknown group name is included in the list of groups then an error is "
4754 #: ../src/guestfs-actions.pod:497 ../fish/guestfish-actions.pod:335
4759 #: ../src/guestfs-actions.pod:503
4760 msgid "You must call C<guestfs_launch> before calling this function."
4764 #: ../src/guestfs-actions.pod:505 ../fish/guestfish-actions.pod:343
4766 "The reason is because we don't know what groups are supported by the "
4767 "appliance/daemon until it is running and can be queried."
4771 #: ../src/guestfs-actions.pod:511 ../fish/guestfish-actions.pod:349
4773 "If a group of functions is available, this does not necessarily mean that "
4774 "they will work. You still have to check for errors when calling individual "
4775 "API functions even if they are available."
4779 #: ../src/guestfs-actions.pod:518 ../fish/guestfish-actions.pod:356
4781 "It is usually the job of distro packagers to build complete functionality "
4782 "into the libguestfs appliance. Upstream libguestfs, if built from source "
4783 "with all requirements satisfied, will support everything."
4787 #: ../src/guestfs-actions.pod:525
4789 "This call was added in version C<1.0.80>. In previous versions of "
4790 "libguestfs all you could do would be to speculatively execute a command to "
4791 "find out if the daemon implemented it. See also C<guestfs_version>."
4795 #: ../src/guestfs-actions.pod:534 ../src/guestfs-actions.pod:1095
4796 msgid "(Added in 1.0.80)"
4800 #: ../src/guestfs-actions.pod:536
4801 msgid "guestfs_available_all_groups"
4805 #: ../src/guestfs-actions.pod:538
4809 " guestfs_available_all_groups (guestfs_h *g);\n"
4814 #: ../src/guestfs-actions.pod:541
4816 "This command returns a list of all optional groups that this daemon knows "
4817 "about. Note this returns both supported and unsupported groups. To find "
4818 "out which ones the daemon can actually support you have to call "
4819 "C<guestfs_available> on each member of the returned list."
4823 #: ../src/guestfs-actions.pod:547
4824 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
4828 #: ../src/guestfs-actions.pod:553
4829 msgid "(Added in 1.3.15)"
4833 #: ../src/guestfs-actions.pod:555
4834 msgid "guestfs_base64_in"
4838 #: ../src/guestfs-actions.pod:557
4842 " guestfs_base64_in (guestfs_h *g,\n"
4843 " const char *base64file,\n"
4844 " const char *filename);\n"
4849 #: ../src/guestfs-actions.pod:562 ../fish/guestfish-actions.pod:386
4850 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
4854 #: ../src/guestfs-actions.pod:567 ../src/guestfs-actions.pod:581 ../src/guestfs-actions.pod:1134
4855 msgid "(Added in 1.3.5)"
4859 #: ../src/guestfs-actions.pod:569
4860 msgid "guestfs_base64_out"
4864 #: ../src/guestfs-actions.pod:571
4868 " guestfs_base64_out (guestfs_h *g,\n"
4869 " const char *filename,\n"
4870 " const char *base64file);\n"
4875 #: ../src/guestfs-actions.pod:576 ../fish/guestfish-actions.pod:395
4877 "This command downloads the contents of C<filename>, writing it out to local "
4878 "file C<base64file> encoded as base64."
4882 #: ../src/guestfs-actions.pod:583
4883 msgid "guestfs_blockdev_flushbufs"
4887 #: ../src/guestfs-actions.pod:585
4891 " guestfs_blockdev_flushbufs (guestfs_h *g,\n"
4892 " const char *device);\n"
4897 #: ../src/guestfs-actions.pod:589 ../fish/guestfish-actions.pod:404
4898 msgid "This tells the kernel to flush internal buffers associated with C<device>."
4902 #: ../src/guestfs-actions.pod:592 ../src/guestfs-actions.pod:609 ../src/guestfs-actions.pod:624 ../src/guestfs-actions.pod:640 ../src/guestfs-actions.pod:658 ../src/guestfs-actions.pod:677 ../src/guestfs-actions.pod:691 ../src/guestfs-actions.pod:709 ../src/guestfs-actions.pod:723 ../src/guestfs-actions.pod:737 ../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
4903 msgid "This uses the L<blockdev(8)> command."
4907 #: ../src/guestfs-actions.pod:596 ../src/guestfs-actions.pod:613 ../src/guestfs-actions.pod:628 ../src/guestfs-actions.pod:644 ../src/guestfs-actions.pod:662 ../src/guestfs-actions.pod:681 ../src/guestfs-actions.pod:695 ../src/guestfs-actions.pod:713 ../src/guestfs-actions.pod:727 ../src/guestfs-actions.pod:741
4908 msgid "(Added in 0.9.3)"
4912 #: ../src/guestfs-actions.pod:598
4913 msgid "guestfs_blockdev_getbsz"
4917 #: ../src/guestfs-actions.pod:600
4921 " guestfs_blockdev_getbsz (guestfs_h *g,\n"
4922 " const char *device);\n"
4927 #: ../src/guestfs-actions.pod:604 ../fish/guestfish-actions.pod:413
4928 msgid "This returns the block size of a device."
4932 #: ../src/guestfs-actions.pod:606 ../src/guestfs-actions.pod:706 ../fish/guestfish-actions.pod:415 ../fish/guestfish-actions.pod:478
4934 "(Note this is different from both I<size in blocks> and I<filesystem block "
4939 #: ../src/guestfs-actions.pod:615
4940 msgid "guestfs_blockdev_getro"
4944 #: ../src/guestfs-actions.pod:617
4948 " guestfs_blockdev_getro (guestfs_h *g,\n"
4949 " const char *device);\n"
4954 #: ../src/guestfs-actions.pod:621 ../fish/guestfish-actions.pod:424
4956 "Returns a boolean indicating if the block device is read-only (true if "
4957 "read-only, false if not)."
4961 #: ../src/guestfs-actions.pod:626 ../src/guestfs-actions.pod:1367 ../src/guestfs-actions.pod:1382 ../src/guestfs-actions.pod:1862 ../src/guestfs-actions.pod:1873 ../src/guestfs-actions.pod:1945 ../src/guestfs-actions.pod:2000 ../src/guestfs-actions.pod:2015 ../src/guestfs-actions.pod:2040 ../src/guestfs-actions.pod:2063 ../src/guestfs-actions.pod:2772 ../src/guestfs-actions.pod:2786 ../src/guestfs-actions.pod:2801 ../src/guestfs-actions.pod:2815 ../src/guestfs-actions.pod:2831 ../src/guestfs-actions.pod:2846 ../src/guestfs-actions.pod:2862 ../src/guestfs-actions.pod:2876 ../src/guestfs-actions.pod:2889 ../src/guestfs-actions.pod:2903 ../src/guestfs-actions.pod:2918 ../src/guestfs-actions.pod:2933 ../src/guestfs-actions.pod:4351
4962 msgid "This function returns a C truth value on success or -1 on error."
4966 #: ../src/guestfs-actions.pod:630
4967 msgid "guestfs_blockdev_getsize64"
4971 #: ../src/guestfs-actions.pod:632
4975 " guestfs_blockdev_getsize64 (guestfs_h *g,\n"
4976 " const char *device);\n"
4981 #: ../src/guestfs-actions.pod:636 ../fish/guestfish-actions.pod:433
4982 msgid "This returns the size of the device in bytes."
4986 #: ../src/guestfs-actions.pod:638
4987 msgid "See also C<guestfs_blockdev_getsz>."
4991 #: ../src/guestfs-actions.pod:646
4992 msgid "guestfs_blockdev_getss"
4996 #: ../src/guestfs-actions.pod:648
5000 " guestfs_blockdev_getss (guestfs_h *g,\n"
5001 " const char *device);\n"
5006 #: ../src/guestfs-actions.pod:652 ../fish/guestfish-actions.pod:443
5008 "This returns the size of sectors on a block device. Usually 512, but can be "
5009 "larger for modern devices."
5013 #: ../src/guestfs-actions.pod:655
5015 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
5020 #: ../src/guestfs-actions.pod:664
5021 msgid "guestfs_blockdev_getsz"
5025 #: ../src/guestfs-actions.pod:666
5029 " guestfs_blockdev_getsz (guestfs_h *g,\n"
5030 " const char *device);\n"
5035 #: ../src/guestfs-actions.pod:670 ../fish/guestfish-actions.pod:455
5037 "This returns the size of the device in units of 512-byte sectors (even if "
5038 "the sectorsize isn't 512 bytes ... weird)."
5042 #: ../src/guestfs-actions.pod:673
5044 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
5045 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
5049 #: ../src/guestfs-actions.pod:683
5050 msgid "guestfs_blockdev_rereadpt"
5054 #: ../src/guestfs-actions.pod:685
5058 " guestfs_blockdev_rereadpt (guestfs_h *g,\n"
5059 " const char *device);\n"
5064 #: ../src/guestfs-actions.pod:689 ../fish/guestfish-actions.pod:468
5065 msgid "Reread the partition table on C<device>."
5069 #: ../src/guestfs-actions.pod:697
5070 msgid "guestfs_blockdev_setbsz"
5074 #: ../src/guestfs-actions.pod:699
5078 " guestfs_blockdev_setbsz (guestfs_h *g,\n"
5079 " const char *device,\n"
5080 " int blocksize);\n"
5085 #: ../src/guestfs-actions.pod:704 ../fish/guestfish-actions.pod:476
5086 msgid "This sets the block size of a device."
5090 #: ../src/guestfs-actions.pod:715
5091 msgid "guestfs_blockdev_setro"
5095 #: ../src/guestfs-actions.pod:717
5099 " guestfs_blockdev_setro (guestfs_h *g,\n"
5100 " const char *device);\n"
5105 #: ../src/guestfs-actions.pod:721 ../fish/guestfish-actions.pod:487
5106 msgid "Sets the block device named C<device> to read-only."
5110 #: ../src/guestfs-actions.pod:729
5111 msgid "guestfs_blockdev_setrw"
5115 #: ../src/guestfs-actions.pod:731
5119 " guestfs_blockdev_setrw (guestfs_h *g,\n"
5120 " const char *device);\n"
5125 #: ../src/guestfs-actions.pod:735 ../fish/guestfish-actions.pod:495
5126 msgid "Sets the block device named C<device> to read-write."
5130 #: ../src/guestfs-actions.pod:743
5131 msgid "guestfs_case_sensitive_path"
5135 #: ../src/guestfs-actions.pod:745
5139 " guestfs_case_sensitive_path (guestfs_h *g,\n"
5140 " const char *path);\n"
5145 #: ../src/guestfs-actions.pod:749 ../fish/guestfish-actions.pod:503
5147 "This can be used to resolve case insensitive paths on a filesystem which is "
5148 "case sensitive. The use case is to resolve paths which you have read from "
5149 "Windows configuration files or the Windows Registry, to the true path."
5153 #: ../src/guestfs-actions.pod:754 ../fish/guestfish-actions.pod:508
5155 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
5156 "(and probably others), which is that although the underlying filesystem is "
5157 "case-insensitive, the driver exports the filesystem to Linux as "
5162 #: ../src/guestfs-actions.pod:759 ../fish/guestfish-actions.pod:513
5164 "One consequence of this is that special directories such as C<c:\\windows> "
5165 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
5166 "precise details of how they were created. In Windows itself this would not "
5171 #: ../src/guestfs-actions.pod:765 ../fish/guestfish-actions.pod:519
5173 "Bug or feature? You decide: "
5174 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
5178 #: ../src/guestfs-actions.pod:768 ../fish/guestfish-actions.pod:522
5180 "This function resolves the true case of each element in the path and returns "
5181 "the case-sensitive path."
5185 #: ../src/guestfs-actions.pod:771
5187 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
5188 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
5189 "how the directories were originally created under Windows)."
5193 #: ../src/guestfs-actions.pod:776 ../fish/guestfish-actions.pod:530
5194 msgid "I<Note>: This function does not handle drive names, backslashes etc."
5198 #: ../src/guestfs-actions.pod:779
5199 msgid "See also C<guestfs_realpath>."
5203 #: ../src/guestfs-actions.pod:784 ../src/guestfs-actions.pod:6286
5204 msgid "(Added in 1.0.75)"
5208 #: ../src/guestfs-actions.pod:786
5213 #: ../src/guestfs-actions.pod:788
5217 " guestfs_cat (guestfs_h *g,\n"
5218 " const char *path);\n"
5223 #: ../src/guestfs-actions.pod:792 ../src/guestfs-actions.pod:4840 ../fish/guestfish-actions.pod:539 ../fish/guestfish-actions.pod:3197
5224 msgid "Return the contents of the file named C<path>."
5228 #: ../src/guestfs-actions.pod:794
5230 "Note that this function cannot correctly handle binary files (specifically, "
5231 "files containing C<\\0> character which is treated as end of string). For "
5232 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
5233 "functions which have a more complex interface."
5237 #: ../src/guestfs-actions.pod:802 ../src/guestfs-actions.pod:981 ../src/guestfs-actions.pod:1001 ../src/guestfs-actions.pod:1331 ../src/guestfs-actions.pod:1350 ../src/guestfs-actions.pod:1453 ../src/guestfs-actions.pod:1472 ../src/guestfs-actions.pod:1721 ../src/guestfs-actions.pod:2140 ../src/guestfs-actions.pod:2159 ../src/guestfs-actions.pod:2202 ../src/guestfs-actions.pod:2226 ../src/guestfs-actions.pod:2243 ../src/guestfs-actions.pod:2272 ../src/guestfs-actions.pod:4621 ../src/guestfs-actions.pod:4647 ../src/guestfs-actions.pod:4779 ../src/guestfs-actions.pod:4805 ../src/guestfs-actions.pod:4829 ../src/guestfs-actions.pod:5681 ../src/guestfs-actions.pod:5736 ../src/guestfs-actions.pod:5882 ../src/guestfs-actions.pod:5906 ../src/guestfs-actions.pod:6559 ../src/guestfs-actions.pod:6585 ../src/guestfs-actions.pod:6611 ../src/guestfs-actions.pod:6630 ../src/guestfs-actions.pod:6715 ../src/guestfs-actions.pod:6734 ../src/guestfs-actions.pod:6780 ../src/guestfs-actions.pod:6799 ../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:3067 ../fish/guestfish-actions.pod:3082 ../fish/guestfish-actions.pod:3158 ../fish/guestfish-actions.pod:3175 ../fish/guestfish-actions.pod:3190 ../fish/guestfish-actions.pod:3773 ../fish/guestfish-actions.pod:3819 ../fish/guestfish-actions.pod:3904 ../fish/guestfish-actions.pod:3919 ../fish/guestfish-actions.pod:4329 ../fish/guestfish-actions.pod:4347 ../fish/guestfish-actions.pod:4364 ../fish/guestfish-actions.pod:4374 ../fish/guestfish-actions.pod:4422 ../fish/guestfish-actions.pod:4432 ../fish/guestfish-actions.pod:4461 ../fish/guestfish-actions.pod:4471
5239 "Because of the message protocol, there is a transfer limit of somewhere "
5240 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
5244 #: ../src/guestfs-actions.pod:805 ../src/guestfs-actions.pod:3015 ../src/guestfs-actions.pod:3077 ../src/guestfs-actions.pod:3094 ../src/guestfs-actions.pod:3182 ../src/guestfs-actions.pod:3588 ../src/guestfs-actions.pod:3603 ../src/guestfs-actions.pod:4727 ../src/guestfs-actions.pod:4742 ../src/guestfs-actions.pod:6445 ../src/guestfs-actions.pod:6460
5245 msgid "(Added in 0.4)"
5249 #: ../src/guestfs-actions.pod:807
5250 msgid "guestfs_checksum"
5254 #: ../src/guestfs-actions.pod:809
5258 " guestfs_checksum (guestfs_h *g,\n"
5259 " const char *csumtype,\n"
5260 " const char *path);\n"
5265 #: ../src/guestfs-actions.pod:814 ../fish/guestfish-actions.pod:553
5266 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
5270 #: ../src/guestfs-actions.pod:817 ../fish/guestfish-actions.pod:556
5272 "The type of checksum to compute is given by the C<csumtype> parameter which "
5273 "must have one of the following values:"
5277 #: ../src/guestfs-actions.pod:822 ../fish/guestfish-actions.pod:561
5282 #: ../src/guestfs-actions.pod:824 ../fish/guestfish-actions.pod:563
5284 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
5289 #: ../src/guestfs-actions.pod:827 ../fish/guestfish-actions.pod:566
5294 #: ../src/guestfs-actions.pod:829 ../fish/guestfish-actions.pod:568
5295 msgid "Compute the MD5 hash (using the C<md5sum> program)."
5299 #: ../src/guestfs-actions.pod:831 ../fish/guestfish-actions.pod:570
5304 #: ../src/guestfs-actions.pod:833 ../fish/guestfish-actions.pod:572
5305 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
5309 #: ../src/guestfs-actions.pod:835 ../fish/guestfish-actions.pod:574
5314 #: ../src/guestfs-actions.pod:837 ../fish/guestfish-actions.pod:576
5315 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
5319 #: ../src/guestfs-actions.pod:839 ../fish/guestfish-actions.pod:578
5324 #: ../src/guestfs-actions.pod:841 ../fish/guestfish-actions.pod:580
5325 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
5329 #: ../src/guestfs-actions.pod:843 ../fish/guestfish-actions.pod:582
5334 #: ../src/guestfs-actions.pod:845 ../fish/guestfish-actions.pod:584
5335 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
5339 #: ../src/guestfs-actions.pod:847 ../fish/guestfish-actions.pod:586
5344 #: ../src/guestfs-actions.pod:849 ../fish/guestfish-actions.pod:588
5345 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
5349 #: ../src/guestfs-actions.pod:853 ../fish/guestfish-actions.pod:592
5350 msgid "The checksum is returned as a printable string."
5354 #: ../src/guestfs-actions.pod:855
5355 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
5359 #: ../src/guestfs-actions.pod:857
5360 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
5364 #: ../src/guestfs-actions.pod:862 ../src/guestfs-actions.pod:1209 ../src/guestfs-actions.pod:2031 ../src/guestfs-actions.pod:2788 ../src/guestfs-actions.pod:2817 ../src/guestfs-actions.pod:2878 ../src/guestfs-actions.pod:2905 ../src/guestfs-actions.pod:6147
5365 msgid "(Added in 1.0.2)"
5369 #: ../src/guestfs-actions.pod:864
5370 msgid "guestfs_checksum_device"
5374 #: ../src/guestfs-actions.pod:866
5378 " guestfs_checksum_device (guestfs_h *g,\n"
5379 " const char *csumtype,\n"
5380 " const char *device);\n"
5385 #: ../src/guestfs-actions.pod:871
5387 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
5388 "device named C<device>. For the types of checksums supported see the "
5389 "C<guestfs_checksum> command."
5393 #: ../src/guestfs-actions.pod:878 ../src/guestfs-actions.pod:4257 ../src/guestfs-actions.pod:4316 ../src/guestfs-actions.pod:4353 ../src/guestfs-actions.pod:4371 ../src/guestfs-actions.pod:4548 ../src/guestfs-actions.pod:6061 ../src/guestfs-actions.pod:6075 ../src/guestfs-actions.pod:6472
5394 msgid "(Added in 1.3.2)"
5398 #: ../src/guestfs-actions.pod:880
5399 msgid "guestfs_checksums_out"
5403 #: ../src/guestfs-actions.pod:882
5407 " guestfs_checksums_out (guestfs_h *g,\n"
5408 " const char *csumtype,\n"
5409 " const char *directory,\n"
5410 " const char *sumsfile);\n"
5415 #: ../src/guestfs-actions.pod:888 ../fish/guestfish-actions.pod:610
5417 "This command computes the checksums of all regular files in C<directory> and "
5418 "then emits a list of those checksums to the local output file C<sumsfile>."
5422 #: ../src/guestfs-actions.pod:892 ../fish/guestfish-actions.pod:614
5424 "This can be used for verifying the integrity of a virtual machine. However "
5425 "to be properly secure you should pay attention to the output of the checksum "
5426 "command (it uses the ones from GNU coreutils). In particular when the "
5427 "filename is not printable, coreutils uses a special backslash syntax. For "
5428 "more information, see the GNU coreutils info file."
5432 #: ../src/guestfs-actions.pod:902
5433 msgid "(Added in 1.3.7)"
5437 #: ../src/guestfs-actions.pod:904
5438 msgid "guestfs_chmod"
5442 #: ../src/guestfs-actions.pod:906
5446 " guestfs_chmod (guestfs_h *g,\n"
5448 " const char *path);\n"
5453 #: ../src/guestfs-actions.pod:911 ../fish/guestfish-actions.pod:628
5455 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
5460 #: ../src/guestfs-actions.pod:914 ../fish/guestfish-actions.pod:631
5462 "I<Note>: When using this command from guestfish, C<mode> by default would be "
5463 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
5468 #: ../src/guestfs-actions.pod:918 ../src/guestfs-actions.pod:3841 ../src/guestfs-actions.pod:3956 ../src/guestfs-actions.pod:3975 ../src/guestfs-actions.pod:3994 ../fish/guestfish-actions.pod:635 ../fish/guestfish-actions.pod:2557 ../fish/guestfish-actions.pod:2642 ../fish/guestfish-actions.pod:2652 ../fish/guestfish-actions.pod:2662
5469 msgid "The mode actually set is affected by the umask."
5473 #: ../src/guestfs-actions.pod:924
5474 msgid "guestfs_chown"
5478 #: ../src/guestfs-actions.pod:926
5482 " guestfs_chown (guestfs_h *g,\n"
5485 " const char *path);\n"
5490 #: ../src/guestfs-actions.pod:932 ../fish/guestfish-actions.pod:641
5491 msgid "Change the file owner to C<owner> and group to C<group>."
5495 #: ../src/guestfs-actions.pod:934 ../src/guestfs-actions.pod:2975 ../fish/guestfish-actions.pod:643 ../fish/guestfish-actions.pod:2035
5497 "Only numeric uid and gid are supported. If you want to use names, you will "
5498 "need to locate and parse the password file yourself (Augeas support makes "
5499 "this relatively easy)."
5503 #: ../src/guestfs-actions.pod:942
5504 msgid "guestfs_command"
5508 #: ../src/guestfs-actions.pod:944
5512 " guestfs_command (guestfs_h *g,\n"
5513 " char *const *arguments);\n"
5518 #: ../src/guestfs-actions.pod:948 ../fish/guestfish-actions.pod:651
5520 "This call runs a command from the guest filesystem. The filesystem must be "
5521 "mounted, and must contain a compatible operating system (ie. something "
5522 "Linux, with the same or compatible processor architecture)."
5526 #: ../src/guestfs-actions.pod:953
5528 "The single parameter is an argv-style list of arguments. The first element "
5529 "is the name of the program to run. Subsequent elements are parameters. The "
5530 "list must be non-empty (ie. must contain a program name). Note that the "
5531 "command runs directly, and is I<not> invoked via the shell (see "
5536 #: ../src/guestfs-actions.pod:960 ../fish/guestfish-actions.pod:663
5537 msgid "The return value is anything printed to I<stdout> by the command."
5541 #: ../src/guestfs-actions.pod:963 ../fish/guestfish-actions.pod:666
5543 "If the command returns a non-zero exit status, then this function returns an "
5544 "error message. The error message string is the content of I<stderr> from "
5549 #: ../src/guestfs-actions.pod:967 ../fish/guestfish-actions.pod:670
5551 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
5552 "C</bin>. If you require a program from another location, you should provide "
5553 "the full path in the first parameter."
5557 #: ../src/guestfs-actions.pod:972 ../fish/guestfish-actions.pod:675
5559 "Shared libraries and data files required by the program must be available on "
5560 "filesystems which are mounted in the correct places. It is the caller's "
5561 "responsibility to ensure all filesystems that are needed are mounted at the "
5566 #: ../src/guestfs-actions.pod:984 ../src/guestfs-actions.pod:1004 ../src/guestfs-actions.pod:1506
5567 msgid "(Added in 0.9.1)"
5571 #: ../src/guestfs-actions.pod:986
5572 msgid "guestfs_command_lines"
5576 #: ../src/guestfs-actions.pod:988
5580 " guestfs_command_lines (guestfs_h *g,\n"
5581 " char *const *arguments);\n"
5586 #: ../src/guestfs-actions.pod:992
5588 "This is the same as C<guestfs_command>, but splits the result into a list of "
5593 #: ../src/guestfs-actions.pod:995
5594 msgid "See also: C<guestfs_sh_lines>"
5598 #: ../src/guestfs-actions.pod:1006
5599 msgid "guestfs_config"
5603 #: ../src/guestfs-actions.pod:1008
5607 " guestfs_config (guestfs_h *g,\n"
5608 " const char *qemuparam,\n"
5609 " const char *qemuvalue);\n"
5614 #: ../src/guestfs-actions.pod:1013 ../fish/guestfish-actions.pod:700
5616 "This can be used to add arbitrary qemu command line parameters of the form "
5617 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
5618 "setting some parameters which would interfere with parameters that we use."
5622 #: ../src/guestfs-actions.pod:1018 ../fish/guestfish-actions.pod:705
5623 msgid "The first character of C<param> string must be a C<-> (dash)."
5627 #: ../src/guestfs-actions.pod:1020 ../fish/guestfish-actions.pod:707
5628 msgid "C<value> can be NULL."
5632 #: ../src/guestfs-actions.pod:1026
5633 msgid "guestfs_copy_size"
5637 #: ../src/guestfs-actions.pod:1028
5641 " guestfs_copy_size (guestfs_h *g,\n"
5642 " const char *src,\n"
5643 " const char *dest,\n"
5649 #: ../src/guestfs-actions.pod:1034 ../fish/guestfish-actions.pod:713
5651 "This command copies exactly C<size> bytes from one source device or file "
5652 "C<src> to another destination device or file C<dest>."
5656 #: ../src/guestfs-actions.pod:1037 ../fish/guestfish-actions.pod:716
5658 "Note this will fail if the source is too short or if the destination is not "
5663 #: ../src/guestfs-actions.pod:1042 ../src/guestfs-actions.pod:1204 ../src/guestfs-actions.pod:1235 ../src/guestfs-actions.pod:1655 ../src/guestfs-actions.pod:1677 ../src/guestfs-actions.pod:6651 ../src/guestfs-actions.pod:6670
5665 "This long-running command can generate progress notification messages so "
5666 "that the caller can display a progress bar or indicator. To receive these "
5667 "messages, the caller must register a progress callback. See "
5668 "L<guestfs(3)/guestfs_set_progress_callback>."
5672 #: ../src/guestfs-actions.pod:1047 ../src/guestfs-actions.pod:3616 ../src/guestfs-actions.pod:4755 ../src/guestfs-actions.pod:6378 ../src/guestfs-actions.pod:6398 ../src/guestfs-actions.pod:6485
5673 msgid "(Added in 1.0.87)"
5677 #: ../src/guestfs-actions.pod:1049
5682 #: ../src/guestfs-actions.pod:1051
5686 " guestfs_cp (guestfs_h *g,\n"
5687 " const char *src,\n"
5688 " const char *dest);\n"
5693 #: ../src/guestfs-actions.pod:1056 ../fish/guestfish-actions.pod:723
5695 "This copies a file from C<src> to C<dest> where C<dest> is either a "
5696 "destination filename or destination directory."
5700 #: ../src/guestfs-actions.pod:1061 ../src/guestfs-actions.pod:1075 ../src/guestfs-actions.pod:1186 ../src/guestfs-actions.pod:1260 ../src/guestfs-actions.pod:1369 ../src/guestfs-actions.pod:4220 ../src/guestfs-actions.pod:4598
5701 msgid "(Added in 1.0.18)"
5705 #: ../src/guestfs-actions.pod:1063
5706 msgid "guestfs_cp_a"
5710 #: ../src/guestfs-actions.pod:1065
5714 " guestfs_cp_a (guestfs_h *g,\n"
5715 " const char *src,\n"
5716 " const char *dest);\n"
5721 #: ../src/guestfs-actions.pod:1070 ../fish/guestfish-actions.pod:730
5723 "This copies a file or directory from C<src> to C<dest> recursively using the "
5728 #: ../src/guestfs-actions.pod:1077
5733 #: ../src/guestfs-actions.pod:1079
5737 " guestfs_dd (guestfs_h *g,\n"
5738 " const char *src,\n"
5739 " const char *dest);\n"
5744 #: ../src/guestfs-actions.pod:1084 ../fish/guestfish-actions.pod:737
5746 "This command copies from one source device or file C<src> to another "
5747 "destination device or file C<dest>. Normally you would use this to copy to "
5748 "or from a device or partition, for example to duplicate a filesystem."
5752 #: ../src/guestfs-actions.pod:1089
5754 "If the destination is a device, it must be as large or larger than the "
5755 "source file or device, otherwise the copy will fail. This command cannot do "
5756 "partial copies (see C<guestfs_copy_size>)."
5760 #: ../src/guestfs-actions.pod:1097
5761 msgid "guestfs_debug"
5765 #: ../src/guestfs-actions.pod:1099
5769 " guestfs_debug (guestfs_h *g,\n"
5770 " const char *subcmd,\n"
5771 " char *const *extraargs);\n"
5776 #: ../src/guestfs-actions.pod:1104
5778 "The C<guestfs_debug> command exposes some internals of C<guestfsd> (the "
5779 "guestfs daemon) that runs inside the qemu subprocess."
5783 #: ../src/guestfs-actions.pod:1108 ../fish/guestfish-actions.pod:754
5785 "There is no comprehensive help for this command. You have to look at the "
5786 "file C<daemon/debug.c> in the libguestfs source to find out what you can do."
5790 #: ../src/guestfs-actions.pod:1115
5791 msgid "(Added in 1.0.11)"
5795 #: ../src/guestfs-actions.pod:1117
5796 msgid "guestfs_debug_upload"
5800 #: ../src/guestfs-actions.pod:1119
5804 " guestfs_debug_upload (guestfs_h *g,\n"
5805 " const char *filename,\n"
5806 " const char *tmpname,\n"
5812 #: ../src/guestfs-actions.pod:1125
5814 "The C<guestfs_debug_upload> command uploads a file to the libguestfs "
5819 #: ../src/guestfs-actions.pod:1128 ../fish/guestfish-actions.pod:765
5821 "There is no comprehensive help for this command. You have to look at the "
5822 "file C<daemon/debug.c> in the libguestfs source to find out what it is for."
5826 #: ../src/guestfs-actions.pod:1136
5831 #: ../src/guestfs-actions.pod:1138
5835 " guestfs_df (guestfs_h *g);\n"
5840 #: ../src/guestfs-actions.pod:1141 ../fish/guestfish-actions.pod:775
5841 msgid "This command runs the C<df> command to report disk space used."
5845 #: ../src/guestfs-actions.pod:1143 ../src/guestfs-actions.pod:1160 ../fish/guestfish-actions.pod:777 ../fish/guestfish-actions.pod:788
5847 "This command is mostly useful for interactive sessions. It is I<not> "
5848 "intended that you try to parse the output string. Use C<statvfs> from "
5853 #: ../src/guestfs-actions.pod:1150 ../src/guestfs-actions.pod:1167 ../src/guestfs-actions.pod:1280 ../src/guestfs-actions.pod:2205 ../src/guestfs-actions.pod:2229 ../src/guestfs-actions.pod:2297 ../src/guestfs-actions.pod:3727 ../src/guestfs-actions.pod:4120 ../src/guestfs-actions.pod:5885 ../src/guestfs-actions.pod:5909 ../src/guestfs-actions.pod:6518 ../src/guestfs-actions.pod:6531 ../src/guestfs-actions.pod:6544
5854 msgid "(Added in 1.0.54)"
5858 #: ../src/guestfs-actions.pod:1152
5859 msgid "guestfs_df_h"
5863 #: ../src/guestfs-actions.pod:1154
5867 " guestfs_df_h (guestfs_h *g);\n"
5872 #: ../src/guestfs-actions.pod:1157 ../fish/guestfish-actions.pod:785
5874 "This command runs the C<df -h> command to report disk space used in "
5875 "human-readable format."
5879 #: ../src/guestfs-actions.pod:1169
5880 msgid "guestfs_dmesg"
5884 #: ../src/guestfs-actions.pod:1171
5888 " guestfs_dmesg (guestfs_h *g);\n"
5893 #: ../src/guestfs-actions.pod:1174 ../fish/guestfish-actions.pod:796
5895 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
5896 "This is sometimes useful for extended debugging of problems."
5900 #: ../src/guestfs-actions.pod:1178
5902 "Another way to get the same information is to enable verbose messages with "
5903 "C<guestfs_set_verbose> or by setting the environment variable "
5904 "C<LIBGUESTFS_DEBUG=1> before running the program."
5908 #: ../src/guestfs-actions.pod:1188
5909 msgid "guestfs_download"
5913 #: ../src/guestfs-actions.pod:1190
5917 " guestfs_download (guestfs_h *g,\n"
5918 " const char *remotefilename,\n"
5919 " const char *filename);\n"
5924 #: ../src/guestfs-actions.pod:1195 ../src/guestfs-actions.pod:1220 ../fish/guestfish-actions.pod:809 ../fish/guestfish-actions.pod:822
5926 "Download file C<remotefilename> and save it as C<filename> on the local "
5931 #: ../src/guestfs-actions.pod:1198 ../src/guestfs-actions.pod:6141 ../fish/guestfish-actions.pod:812 ../fish/guestfish-actions.pod:4077
5932 msgid "C<filename> can also be a named pipe."
5936 #: ../src/guestfs-actions.pod:1200
5937 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
5941 #: ../src/guestfs-actions.pod:1211
5942 msgid "guestfs_download_offset"
5946 #: ../src/guestfs-actions.pod:1213
5950 " guestfs_download_offset (guestfs_h *g,\n"
5951 " const char *remotefilename,\n"
5952 " const char *filename,\n"
5953 " int64_t offset,\n"
5959 #: ../src/guestfs-actions.pod:1223 ../fish/guestfish-actions.pod:825
5961 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
5962 "region must be within the file or device)."
5966 #: ../src/guestfs-actions.pod:1226
5968 "Note that there is no limit on the amount of data that can be downloaded "
5969 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
5970 "full amount unless an error occurs."
5974 #: ../src/guestfs-actions.pod:1231
5975 msgid "See also C<guestfs_download>, C<guestfs_pread>."
5979 #: ../src/guestfs-actions.pod:1240 ../src/guestfs-actions.pod:6176
5980 msgid "(Added in 1.5.17)"
5984 #: ../src/guestfs-actions.pod:1242
5985 msgid "guestfs_drop_caches"
5989 #: ../src/guestfs-actions.pod:1244
5993 " guestfs_drop_caches (guestfs_h *g,\n"
5994 " int whattodrop);\n"
5999 #: ../src/guestfs-actions.pod:1248 ../fish/guestfish-actions.pod:841
6001 "This instructs the guest kernel to drop its page cache, and/or dentries and "
6002 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
6003 "to drop, see L<http://linux-mm.org/Drop_Caches>"
6007 #: ../src/guestfs-actions.pod:1253 ../fish/guestfish-actions.pod:846
6008 msgid "Setting C<whattodrop> to 3 should drop everything."
6012 #: ../src/guestfs-actions.pod:1255 ../fish/guestfish-actions.pod:848
6014 "This automatically calls L<sync(2)> before the operation, so that the "
6015 "maximum guest memory is freed."
6019 #: ../src/guestfs-actions.pod:1262
6024 #: ../src/guestfs-actions.pod:1264
6028 " guestfs_du (guestfs_h *g,\n"
6029 " const char *path);\n"
6034 #: ../src/guestfs-actions.pod:1268 ../fish/guestfish-actions.pod:855
6036 "This command runs the C<du -s> command to estimate file space usage for "
6041 #: ../src/guestfs-actions.pod:1271 ../fish/guestfish-actions.pod:858
6043 "C<path> can be a file or a directory. If C<path> is a directory then the "
6044 "estimate includes the contents of the directory and all subdirectories "
6049 #: ../src/guestfs-actions.pod:1275 ../fish/guestfish-actions.pod:862
6050 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
6054 #: ../src/guestfs-actions.pod:1282
6055 msgid "guestfs_e2fsck_f"
6059 #: ../src/guestfs-actions.pod:1284
6063 " guestfs_e2fsck_f (guestfs_h *g,\n"
6064 " const char *device);\n"
6069 #: ../src/guestfs-actions.pod:1288 ../fish/guestfish-actions.pod:869
6071 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
6072 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
6077 #: ../src/guestfs-actions.pod:1292
6079 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
6080 "Normally you should use C<guestfs_fsck>."
6084 #: ../src/guestfs-actions.pod:1297
6085 msgid "(Added in 1.0.29)"
6089 #: ../src/guestfs-actions.pod:1299
6090 msgid "guestfs_echo_daemon"
6094 #: ../src/guestfs-actions.pod:1301
6098 " guestfs_echo_daemon (guestfs_h *g,\n"
6099 " char *const *words);\n"
6104 #: ../src/guestfs-actions.pod:1305 ../fish/guestfish-actions.pod:880
6106 "This command concatenates the list of C<words> passed with single spaces "
6107 "between them and returns the resulting string."
6111 #: ../src/guestfs-actions.pod:1308 ../fish/guestfish-actions.pod:883
6112 msgid "You can use this command to test the connection through to the daemon."
6116 #: ../src/guestfs-actions.pod:1310
6117 msgid "See also C<guestfs_ping_daemon>."
6121 #: ../src/guestfs-actions.pod:1315 ../src/guestfs-actions.pod:2042 ../src/guestfs-actions.pod:5389
6122 msgid "(Added in 1.0.69)"
6126 #: ../src/guestfs-actions.pod:1317
6127 msgid "guestfs_egrep"
6131 #: ../src/guestfs-actions.pod:1319
6135 " guestfs_egrep (guestfs_h *g,\n"
6136 " const char *regex,\n"
6137 " const char *path);\n"
6142 #: ../src/guestfs-actions.pod:1324 ../fish/guestfish-actions.pod:891
6143 msgid "This calls the external C<egrep> program and returns the matching lines."
6147 #: ../src/guestfs-actions.pod:1334 ../src/guestfs-actions.pod:1353 ../src/guestfs-actions.pod:1410 ../src/guestfs-actions.pod:1456 ../src/guestfs-actions.pod:1475 ../src/guestfs-actions.pod:2143 ../src/guestfs-actions.pod:2162 ../src/guestfs-actions.pod:2318 ../src/guestfs-actions.pod:2331 ../src/guestfs-actions.pod:2346 ../src/guestfs-actions.pod:2392 ../src/guestfs-actions.pod:2415 ../src/guestfs-actions.pod:2428 ../src/guestfs-actions.pod:3107 ../src/guestfs-actions.pod:3121 ../src/guestfs-actions.pod:3134 ../src/guestfs-actions.pod:3148 ../src/guestfs-actions.pod:4055 ../src/guestfs-actions.pod:4934 ../src/guestfs-actions.pod:4983 ../src/guestfs-actions.pod:5753 ../src/guestfs-actions.pod:5765 ../src/guestfs-actions.pod:5778 ../src/guestfs-actions.pod:5791 ../src/guestfs-actions.pod:5813 ../src/guestfs-actions.pod:5826 ../src/guestfs-actions.pod:5839 ../src/guestfs-actions.pod:5852 ../src/guestfs-actions.pod:6614 ../src/guestfs-actions.pod:6633 ../src/guestfs-actions.pod:6718 ../src/guestfs-actions.pod:6737 ../src/guestfs-actions.pod:6783 ../src/guestfs-actions.pod:6802
6148 msgid "(Added in 1.0.66)"
6152 #: ../src/guestfs-actions.pod:1336
6153 msgid "guestfs_egrepi"
6157 #: ../src/guestfs-actions.pod:1338
6161 " guestfs_egrepi (guestfs_h *g,\n"
6162 " const char *regex,\n"
6163 " const char *path);\n"
6168 #: ../src/guestfs-actions.pod:1343 ../fish/guestfish-actions.pod:901
6169 msgid "This calls the external C<egrep -i> program and returns the matching lines."
6173 #: ../src/guestfs-actions.pod:1355
6174 msgid "guestfs_equal"
6178 #: ../src/guestfs-actions.pod:1357
6182 " guestfs_equal (guestfs_h *g,\n"
6183 " const char *file1,\n"
6184 " const char *file2);\n"
6189 #: ../src/guestfs-actions.pod:1362 ../fish/guestfish-actions.pod:911
6191 "This compares the two files C<file1> and C<file2> and returns true if their "
6192 "content is exactly equal, or false otherwise."
6196 #: ../src/guestfs-actions.pod:1365 ../fish/guestfish-actions.pod:914
6197 msgid "The external L<cmp(1)> program is used for the comparison."
6201 #: ../src/guestfs-actions.pod:1371
6202 msgid "guestfs_exists"
6206 #: ../src/guestfs-actions.pod:1373
6210 " guestfs_exists (guestfs_h *g,\n"
6211 " const char *path);\n"
6216 #: ../src/guestfs-actions.pod:1377 ../fish/guestfish-actions.pod:920
6218 "This returns C<true> if and only if there is a file, directory (or anything) "
6219 "with the given C<path> name."
6223 #: ../src/guestfs-actions.pod:1380
6224 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
6228 #: ../src/guestfs-actions.pod:1386
6229 msgid "guestfs_fallocate"
6233 #: ../src/guestfs-actions.pod:1388
6237 " guestfs_fallocate (guestfs_h *g,\n"
6238 " const char *path,\n"
6244 #: ../src/guestfs-actions.pod:1393 ../src/guestfs-actions.pod:1419 ../fish/guestfish-actions.pod:929 ../fish/guestfish-actions.pod:948
6246 "This command preallocates a file (containing zero bytes) named C<path> of "
6247 "size C<len> bytes. If the file exists already, it is overwritten."
6251 #: ../src/guestfs-actions.pod:1397 ../fish/guestfish-actions.pod:933
6253 "Do not confuse this with the guestfish-specific C<alloc> command which "
6254 "allocates a file in the host and attaches it as a device."
6258 #: ../src/guestfs-actions.pod:1403 ../fish/guestfish-actions.pod:937
6260 "This function is deprecated. In new code, use the C<fallocate64> call "
6265 #: ../src/guestfs-actions.pod:1412
6266 msgid "guestfs_fallocate64"
6270 #: ../src/guestfs-actions.pod:1414
6274 " guestfs_fallocate64 (guestfs_h *g,\n"
6275 " const char *path,\n"
6281 #: ../src/guestfs-actions.pod:1423
6283 "Note that this call allocates disk blocks for the file. To create a sparse "
6284 "file use C<guestfs_truncate_size> instead."
6288 #: ../src/guestfs-actions.pod:1426
6290 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
6291 "oversight it only allowed 30 bit lengths to be specified, effectively "
6292 "limiting the maximum size of files created through that call to 1GB."
6296 #: ../src/guestfs-actions.pod:1431 ../fish/guestfish-actions.pod:960
6298 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
6299 "commands which create a file in the host and attach it as a device."
6303 #: ../src/guestfs-actions.pod:1437
6304 msgid "(Added in 1.3.17)"
6308 #: ../src/guestfs-actions.pod:1439
6309 msgid "guestfs_fgrep"
6313 #: ../src/guestfs-actions.pod:1441
6317 " guestfs_fgrep (guestfs_h *g,\n"
6318 " const char *pattern,\n"
6319 " const char *path);\n"
6324 #: ../src/guestfs-actions.pod:1446 ../fish/guestfish-actions.pod:968
6325 msgid "This calls the external C<fgrep> program and returns the matching lines."
6329 #: ../src/guestfs-actions.pod:1458
6330 msgid "guestfs_fgrepi"
6334 #: ../src/guestfs-actions.pod:1460
6338 " guestfs_fgrepi (guestfs_h *g,\n"
6339 " const char *pattern,\n"
6340 " const char *path);\n"
6345 #: ../src/guestfs-actions.pod:1465 ../fish/guestfish-actions.pod:978
6346 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
6350 #: ../src/guestfs-actions.pod:1477
6351 msgid "guestfs_file"
6355 #: ../src/guestfs-actions.pod:1479
6359 " guestfs_file (guestfs_h *g,\n"
6360 " const char *path);\n"
6365 #: ../src/guestfs-actions.pod:1483 ../fish/guestfish-actions.pod:988
6367 "This call uses the standard L<file(1)> command to determine the type or "
6368 "contents of the file."
6372 #: ../src/guestfs-actions.pod:1486 ../fish/guestfish-actions.pod:991
6374 "This call will also transparently look inside various types of compressed "
6379 #: ../src/guestfs-actions.pod:1489 ../fish/guestfish-actions.pod:994
6381 "The exact command which runs is C<file -zb path>. Note in particular that "
6382 "the filename is not prepended to the output (the C<-b> option)."
6386 #: ../src/guestfs-actions.pod:1493
6388 "This command can also be used on C</dev/> devices (and partitions, LV "
6389 "names). You can for example use this to determine if a device contains a "
6390 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
6394 #: ../src/guestfs-actions.pod:1498 ../fish/guestfish-actions.pod:1003
6396 "If the C<path> does not begin with C</dev/> then this command only works for "
6397 "the content of regular files. For other file types (directory, symbolic "
6398 "link etc) it will just return the string C<directory> etc."
6402 #: ../src/guestfs-actions.pod:1508
6403 msgid "guestfs_file_architecture"
6407 #: ../src/guestfs-actions.pod:1510
6411 " guestfs_file_architecture (guestfs_h *g,\n"
6412 " const char *filename);\n"
6417 #: ../src/guestfs-actions.pod:1514 ../fish/guestfish-actions.pod:1012
6419 "This detects the architecture of the binary C<filename>, and returns it if "
6424 #: ../src/guestfs-actions.pod:1517 ../fish/guestfish-actions.pod:1015
6425 msgid "Currently defined architectures are:"
6429 #: ../src/guestfs-actions.pod:1521 ../fish/guestfish-actions.pod:1019
6434 #: ../src/guestfs-actions.pod:1523 ../fish/guestfish-actions.pod:1021
6436 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
6437 "irrespective of the precise processor requirements of the binary."
6441 #: ../src/guestfs-actions.pod:1526 ../fish/guestfish-actions.pod:1024
6446 #: ../src/guestfs-actions.pod:1528 ../fish/guestfish-actions.pod:1026
6447 msgid "64 bit x86-64."
6451 #: ../src/guestfs-actions.pod:1530 ../fish/guestfish-actions.pod:1028
6456 #: ../src/guestfs-actions.pod:1532 ../fish/guestfish-actions.pod:1030
6457 msgid "32 bit SPARC."
6461 #: ../src/guestfs-actions.pod:1534 ../fish/guestfish-actions.pod:1032
6466 #: ../src/guestfs-actions.pod:1536 ../fish/guestfish-actions.pod:1034
6467 msgid "64 bit SPARC V9 and above."
6471 #: ../src/guestfs-actions.pod:1538 ../fish/guestfish-actions.pod:1036
6476 #: ../src/guestfs-actions.pod:1540 ../fish/guestfish-actions.pod:1038
6477 msgid "Intel Itanium."
6481 #: ../src/guestfs-actions.pod:1542 ../fish/guestfish-actions.pod:1040
6486 #: ../src/guestfs-actions.pod:1544 ../fish/guestfish-actions.pod:1042
6487 msgid "32 bit Power PC."
6491 #: ../src/guestfs-actions.pod:1546 ../fish/guestfish-actions.pod:1044
6496 #: ../src/guestfs-actions.pod:1548 ../fish/guestfish-actions.pod:1046
6497 msgid "64 bit Power PC."
6501 #: ../src/guestfs-actions.pod:1552 ../fish/guestfish-actions.pod:1050
6502 msgid "Libguestfs may return other architecture strings in future."
6506 #: ../src/guestfs-actions.pod:1554 ../fish/guestfish-actions.pod:1052
6507 msgid "The function works on at least the following types of files:"
6511 #: ../src/guestfs-actions.pod:1560 ../fish/guestfish-actions.pod:1058
6512 msgid "many types of Un*x and Linux binary"
6516 #: ../src/guestfs-actions.pod:1564 ../fish/guestfish-actions.pod:1062
6517 msgid "many types of Un*x and Linux shared library"
6521 #: ../src/guestfs-actions.pod:1568 ../fish/guestfish-actions.pod:1066
6522 msgid "Windows Win32 and Win64 binaries"
6526 #: ../src/guestfs-actions.pod:1572 ../fish/guestfish-actions.pod:1070
6527 msgid "Windows Win32 and Win64 DLLs"
6531 #: ../src/guestfs-actions.pod:1574 ../fish/guestfish-actions.pod:1072
6532 msgid "Win32 binaries and DLLs return C<i386>."
6536 #: ../src/guestfs-actions.pod:1576 ../fish/guestfish-actions.pod:1074
6537 msgid "Win64 binaries and DLLs return C<x86_64>."
6541 #: ../src/guestfs-actions.pod:1580 ../fish/guestfish-actions.pod:1078
6542 msgid "Linux kernel modules"
6546 #: ../src/guestfs-actions.pod:1584 ../fish/guestfish-actions.pod:1082
6547 msgid "Linux new-style initrd images"
6551 #: ../src/guestfs-actions.pod:1588 ../fish/guestfish-actions.pod:1086
6552 msgid "some non-x86 Linux vmlinuz kernels"
6556 #: ../src/guestfs-actions.pod:1592 ../fish/guestfish-actions.pod:1090
6557 msgid "What it can't do currently:"
6561 #: ../src/guestfs-actions.pod:1598 ../fish/guestfish-actions.pod:1096
6562 msgid "static libraries (libfoo.a)"
6566 #: ../src/guestfs-actions.pod:1602 ../fish/guestfish-actions.pod:1100
6567 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
6571 #: ../src/guestfs-actions.pod:1606 ../fish/guestfish-actions.pod:1104
6572 msgid "x86 Linux vmlinuz kernels"
6576 #: ../src/guestfs-actions.pod:1608 ../fish/guestfish-actions.pod:1106
6578 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
6579 "compressed code, and are horribly hard to unpack. If you want to find the "
6580 "architecture of a kernel, use the architecture of the associated initrd or "
6581 "kernel module(s) instead."
6585 #: ../src/guestfs-actions.pod:1618 ../src/guestfs-actions.pod:1781 ../src/guestfs-actions.pod:1798 ../src/guestfs-actions.pod:2451 ../src/guestfs-actions.pod:2524 ../src/guestfs-actions.pod:2550 ../src/guestfs-actions.pod:2577 ../src/guestfs-actions.pod:2598 ../src/guestfs-actions.pod:2631 ../src/guestfs-actions.pod:2655 ../src/guestfs-actions.pod:2693 ../src/guestfs-actions.pod:2759 ../src/guestfs-actions.pod:2891
6586 msgid "(Added in 1.5.3)"
6590 #: ../src/guestfs-actions.pod:1620
6591 msgid "guestfs_filesize"
6595 #: ../src/guestfs-actions.pod:1622
6599 " guestfs_filesize (guestfs_h *g,\n"
6600 " const char *file);\n"
6605 #: ../src/guestfs-actions.pod:1626 ../fish/guestfish-actions.pod:1117
6606 msgid "This command returns the size of C<file> in bytes."
6610 #: ../src/guestfs-actions.pod:1628
6612 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
6613 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
6614 "devices, use C<guestfs_blockdev_getsize64>."
6618 #: ../src/guestfs-actions.pod:1634
6619 msgid "(Added in 1.0.82)"
6623 #: ../src/guestfs-actions.pod:1636
6624 msgid "guestfs_fill"
6628 #: ../src/guestfs-actions.pod:1638
6632 " guestfs_fill (guestfs_h *g,\n"
6635 " const char *path);\n"
6640 #: ../src/guestfs-actions.pod:1644 ../fish/guestfish-actions.pod:1127
6642 "This command creates a new file called C<path>. The initial content of the "
6643 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
6648 #: ../src/guestfs-actions.pod:1648
6650 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
6651 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
6652 "bytes use C<guestfs_fill_pattern>."
6656 #: ../src/guestfs-actions.pod:1660
6657 msgid "(Added in 1.0.79)"
6661 #: ../src/guestfs-actions.pod:1662
6662 msgid "guestfs_fill_pattern"
6666 #: ../src/guestfs-actions.pod:1664
6670 " guestfs_fill_pattern (guestfs_h *g,\n"
6671 " const char *pattern,\n"
6673 " const char *path);\n"
6678 #: ../src/guestfs-actions.pod:1670
6680 "This function is like C<guestfs_fill> except that it creates a new file of "
6681 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
6682 "pattern is truncated if necessary to ensure the length of the file is "
6683 "exactly C<len> bytes."
6687 #: ../src/guestfs-actions.pod:1682
6688 msgid "(Added in 1.3.12)"
6692 #: ../src/guestfs-actions.pod:1684
6693 msgid "guestfs_find"
6697 #: ../src/guestfs-actions.pod:1686
6701 " guestfs_find (guestfs_h *g,\n"
6702 " const char *directory);\n"
6707 #: ../src/guestfs-actions.pod:1690 ../fish/guestfish-actions.pod:1149
6709 "This command lists out all files and directories, recursively, starting at "
6710 "C<directory>. It is essentially equivalent to running the shell command "
6711 "C<find directory -print> but some post-processing happens on the output, "
6716 #: ../src/guestfs-actions.pod:1695 ../fish/guestfish-actions.pod:1154
6718 "This returns a list of strings I<without any prefix>. Thus if the directory "
6723 #: ../src/guestfs-actions.pod:1698 ../fish/guestfish-actions.pod:1157
6733 #: ../src/guestfs-actions.pod:1702
6734 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
6738 #: ../src/guestfs-actions.pod:1705 ../fish/guestfish-actions.pod:1164
6749 #: ../src/guestfs-actions.pod:1710 ../fish/guestfish-actions.pod:1169
6750 msgid "If C<directory> is not a directory, then this command returns an error."
6754 #: ../src/guestfs-actions.pod:1713 ../fish/guestfish-actions.pod:1172
6755 msgid "The returned list is sorted."
6759 #: ../src/guestfs-actions.pod:1715
6760 msgid "See also C<guestfs_find0>."
6764 #: ../src/guestfs-actions.pod:1724 ../src/guestfs-actions.pod:3552 ../src/guestfs-actions.pod:5018
6765 msgid "(Added in 1.0.27)"
6769 #: ../src/guestfs-actions.pod:1726
6770 msgid "guestfs_find0"
6774 #: ../src/guestfs-actions.pod:1728
6778 " guestfs_find0 (guestfs_h *g,\n"
6779 " const char *directory,\n"
6780 " const char *files);\n"
6785 #: ../src/guestfs-actions.pod:1733 ../fish/guestfish-actions.pod:1183
6787 "This command lists out all files and directories, recursively, starting at "
6788 "C<directory>, placing the resulting list in the external file called "
6793 #: ../src/guestfs-actions.pod:1737
6795 "This command works the same way as C<guestfs_find> with the following "
6800 #: ../src/guestfs-actions.pod:1744 ../fish/guestfish-actions.pod:1194
6801 msgid "The resulting list is written to an external file."
6805 #: ../src/guestfs-actions.pod:1748 ../fish/guestfish-actions.pod:1198
6807 "Items (filenames) in the result are separated by C<\\0> characters. See "
6808 "L<find(1)> option I<-print0>."
6812 #: ../src/guestfs-actions.pod:1753 ../fish/guestfish-actions.pod:1203
6813 msgid "This command is not limited in the number of names that it can return."
6817 #: ../src/guestfs-actions.pod:1758 ../fish/guestfish-actions.pod:1208
6818 msgid "The result list is not sorted."
6822 #: ../src/guestfs-actions.pod:1764
6823 msgid "(Added in 1.0.74)"
6827 #: ../src/guestfs-actions.pod:1766
6828 msgid "guestfs_findfs_label"
6832 #: ../src/guestfs-actions.pod:1768
6836 " guestfs_findfs_label (guestfs_h *g,\n"
6837 " const char *label);\n"
6842 #: ../src/guestfs-actions.pod:1772 ../fish/guestfish-actions.pod:1218
6844 "This command searches the filesystems and returns the one which has the "
6845 "given label. An error is returned if no such filesystem can be found."
6849 #: ../src/guestfs-actions.pod:1776
6850 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
6854 #: ../src/guestfs-actions.pod:1783
6855 msgid "guestfs_findfs_uuid"
6859 #: ../src/guestfs-actions.pod:1785
6863 " guestfs_findfs_uuid (guestfs_h *g,\n"
6864 " const char *uuid);\n"
6869 #: ../src/guestfs-actions.pod:1789 ../fish/guestfish-actions.pod:1228
6871 "This command searches the filesystems and returns the one which has the "
6872 "given UUID. An error is returned if no such filesystem can be found."
6876 #: ../src/guestfs-actions.pod:1793
6877 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
6881 #: ../src/guestfs-actions.pod:1800
6882 msgid "guestfs_fsck"
6886 #: ../src/guestfs-actions.pod:1802
6890 " guestfs_fsck (guestfs_h *g,\n"
6891 " const char *fstype,\n"
6892 " const char *device);\n"
6897 #: ../src/guestfs-actions.pod:1807 ../fish/guestfish-actions.pod:1238
6899 "This runs the filesystem checker (fsck) on C<device> which should have "
6900 "filesystem type C<fstype>."
6904 #: ../src/guestfs-actions.pod:1810 ../fish/guestfish-actions.pod:1241
6906 "The returned integer is the status. See L<fsck(8)> for the list of status "
6907 "codes from C<fsck>."
6911 #: ../src/guestfs-actions.pod:1819 ../fish/guestfish-actions.pod:1250
6912 msgid "Multiple status codes can be summed together."
6916 #: ../src/guestfs-actions.pod:1823 ../fish/guestfish-actions.pod:1254
6918 "A non-zero return code can mean \"success\", for example if errors have been "
6919 "corrected on the filesystem."
6923 #: ../src/guestfs-actions.pod:1828 ../fish/guestfish-actions.pod:1259
6924 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
6928 #: ../src/guestfs-actions.pod:1833 ../fish/guestfish-actions.pod:1264
6929 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
6933 #: ../src/guestfs-actions.pod:1837 ../src/guestfs-actions.pod:6656
6934 msgid "(Added in 1.0.16)"
6938 #: ../src/guestfs-actions.pod:1839
6939 msgid "guestfs_get_append"
6943 #: ../src/guestfs-actions.pod:1841
6947 " guestfs_get_append (guestfs_h *g);\n"
6952 #: ../src/guestfs-actions.pod:1844 ../fish/guestfish-actions.pod:1270
6954 "Return the additional kernel options which are added to the guest kernel "
6959 #: ../src/guestfs-actions.pod:1847 ../fish/guestfish-actions.pod:1273
6960 msgid "If C<NULL> then no options are added."
6964 #: ../src/guestfs-actions.pod:1849
6966 "This function returns a string which may be NULL. There is no way to return "
6967 "an error from this function. The string is owned by the guest handle and "
6968 "must I<not> be freed."
6972 #: ../src/guestfs-actions.pod:1853 ../src/guestfs-actions.pod:4694 ../src/guestfs-actions.pod:5159 ../src/guestfs-actions.pod:5527 ../src/guestfs-actions.pod:5546 ../src/guestfs-actions.pod:5562 ../src/guestfs-actions.pod:5579 ../src/guestfs-actions.pod:6326 ../src/guestfs-actions.pod:6344 ../src/guestfs-actions.pod:6699
6973 msgid "(Added in 1.0.26)"
6977 #: ../src/guestfs-actions.pod:1855
6978 msgid "guestfs_get_autosync"
6982 #: ../src/guestfs-actions.pod:1857
6986 " guestfs_get_autosync (guestfs_h *g);\n"
6991 #: ../src/guestfs-actions.pod:1860 ../fish/guestfish-actions.pod:1279
6992 msgid "Get the autosync flag."
6996 #: ../src/guestfs-actions.pod:1866
6997 msgid "guestfs_get_direct"
7001 #: ../src/guestfs-actions.pod:1868
7005 " guestfs_get_direct (guestfs_h *g);\n"
7010 #: ../src/guestfs-actions.pod:1871 ../fish/guestfish-actions.pod:1285
7011 msgid "Return the direct appliance mode flag."
7015 #: ../src/guestfs-actions.pod:1875 ../src/guestfs-actions.pod:5200
7016 msgid "(Added in 1.0.72)"
7020 #: ../src/guestfs-actions.pod:1877
7021 msgid "guestfs_get_e2label"
7025 #: ../src/guestfs-actions.pod:1879
7029 " guestfs_get_e2label (guestfs_h *g,\n"
7030 " const char *device);\n"
7035 #: ../src/guestfs-actions.pod:1883 ../fish/guestfish-actions.pod:1291
7036 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
7040 #: ../src/guestfs-actions.pod:1889 ../fish/guestfish-actions.pod:1294
7042 "This function is deprecated. In new code, use the C<vfs_label> call "
7047 #: ../src/guestfs-actions.pod:1896 ../src/guestfs-actions.pod:1917 ../src/guestfs-actions.pod:5218 ../src/guestfs-actions.pod:5237
7048 msgid "(Added in 1.0.15)"
7052 #: ../src/guestfs-actions.pod:1898
7053 msgid "guestfs_get_e2uuid"
7057 #: ../src/guestfs-actions.pod:1900
7061 " guestfs_get_e2uuid (guestfs_h *g,\n"
7062 " const char *device);\n"
7067 #: ../src/guestfs-actions.pod:1904 ../fish/guestfish-actions.pod:1305
7068 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
7072 #: ../src/guestfs-actions.pod:1910 ../fish/guestfish-actions.pod:1308
7073 msgid "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
7077 #: ../src/guestfs-actions.pod:1919
7078 msgid "guestfs_get_memsize"
7082 #: ../src/guestfs-actions.pod:1921
7086 " guestfs_get_memsize (guestfs_h *g);\n"
7091 #: ../src/guestfs-actions.pod:1924 ../fish/guestfish-actions.pod:1319
7092 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
7096 #: ../src/guestfs-actions.pod:1927
7098 "If C<guestfs_set_memsize> was not called on this handle, and if "
7099 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
7100 "value for memsize."
7104 #: ../src/guestfs-actions.pod:1931 ../src/guestfs-actions.pod:2012 ../src/guestfs-actions.pod:5253 ../src/guestfs-actions.pod:5360 ../fish/guestfish-actions.pod:1326 ../fish/guestfish-actions.pod:1377 ../fish/guestfish-actions.pod:3484 ../fish/guestfish-actions.pod:3571
7105 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
7109 #: ../src/guestfs-actions.pod:1936 ../src/guestfs-actions.pod:3845 ../src/guestfs-actions.pod:3960 ../src/guestfs-actions.pod:3979 ../src/guestfs-actions.pod:3998 ../src/guestfs-actions.pod:4010 ../src/guestfs-actions.pod:4027 ../src/guestfs-actions.pod:4040 ../src/guestfs-actions.pod:4921 ../src/guestfs-actions.pod:5258 ../src/guestfs-actions.pod:5501 ../src/guestfs-actions.pod:6102
7110 msgid "(Added in 1.0.55)"
7114 #: ../src/guestfs-actions.pod:1938
7115 msgid "guestfs_get_network"
7119 #: ../src/guestfs-actions.pod:1940
7123 " guestfs_get_network (guestfs_h *g);\n"
7128 #: ../src/guestfs-actions.pod:1943 ../fish/guestfish-actions.pod:1333
7129 msgid "This returns the enable network flag."
7133 #: ../src/guestfs-actions.pod:1947 ../src/guestfs-actions.pod:5277
7134 msgid "(Added in 1.5.4)"
7138 #: ../src/guestfs-actions.pod:1949
7139 msgid "guestfs_get_path"
7143 #: ../src/guestfs-actions.pod:1951
7147 " guestfs_get_path (guestfs_h *g);\n"
7152 #: ../src/guestfs-actions.pod:1954 ../fish/guestfish-actions.pod:1339
7153 msgid "Return the current search path."
7157 #: ../src/guestfs-actions.pod:1956 ../fish/guestfish-actions.pod:1341
7159 "This is always non-NULL. If it wasn't set already, then this will return "
7164 #: ../src/guestfs-actions.pod:1959 ../src/guestfs-actions.pod:1988
7166 "This function returns a string, or NULL on error. The string is owned by "
7167 "the guest handle and must I<not> be freed."
7171 #: ../src/guestfs-actions.pod:1964
7172 msgid "guestfs_get_pid"
7176 #: ../src/guestfs-actions.pod:1966
7180 " guestfs_get_pid (guestfs_h *g);\n"
7185 #: ../src/guestfs-actions.pod:1969 ../fish/guestfish-actions.pod:1350
7187 "Return the process ID of the qemu subprocess. If there is no qemu "
7188 "subprocess, then this will return an error."
7192 #: ../src/guestfs-actions.pod:1972 ../fish/guestfish-actions.pod:1353
7193 msgid "This is an internal call used for debugging and testing."
7197 #: ../src/guestfs-actions.pod:1976
7198 msgid "(Added in 1.0.56)"
7202 #: ../src/guestfs-actions.pod:1978
7203 msgid "guestfs_get_qemu"
7207 #: ../src/guestfs-actions.pod:1980
7211 " guestfs_get_qemu (guestfs_h *g);\n"
7216 #: ../src/guestfs-actions.pod:1983 ../fish/guestfish-actions.pod:1359
7217 msgid "Return the current qemu binary."
7221 #: ../src/guestfs-actions.pod:1985 ../fish/guestfish-actions.pod:1361
7223 "This is always non-NULL. If it wasn't set already, then this will return "
7224 "the default qemu binary name."
7228 #: ../src/guestfs-actions.pod:1991 ../src/guestfs-actions.pod:5322
7229 msgid "(Added in 1.0.6)"
7233 #: ../src/guestfs-actions.pod:1993
7234 msgid "guestfs_get_recovery_proc"
7238 #: ../src/guestfs-actions.pod:1995
7242 " guestfs_get_recovery_proc (guestfs_h *g);\n"
7247 #: ../src/guestfs-actions.pod:1998 ../fish/guestfish-actions.pod:1368
7248 msgid "Return the recovery process enabled flag."
7252 #: ../src/guestfs-actions.pod:2002 ../src/guestfs-actions.pod:2981 ../src/guestfs-actions.pod:3250 ../src/guestfs-actions.pod:3652 ../src/guestfs-actions.pod:3684 ../src/guestfs-actions.pod:4624 ../src/guestfs-actions.pod:4969 ../src/guestfs-actions.pod:5346 ../src/guestfs-actions.pod:6005 ../src/guestfs-actions.pod:6025 ../src/guestfs-actions.pod:6207
7253 msgid "(Added in 1.0.77)"
7257 #: ../src/guestfs-actions.pod:2004
7258 msgid "guestfs_get_selinux"
7262 #: ../src/guestfs-actions.pod:2006
7266 " guestfs_get_selinux (guestfs_h *g);\n"
7271 #: ../src/guestfs-actions.pod:2009
7273 "This returns the current setting of the selinux flag which is passed to the "
7274 "appliance at boot time. See C<guestfs_set_selinux>."
7278 #: ../src/guestfs-actions.pod:2017 ../src/guestfs-actions.pod:2080 ../src/guestfs-actions.pod:5365 ../src/guestfs-actions.pod:5419
7279 msgid "(Added in 1.0.67)"
7283 #: ../src/guestfs-actions.pod:2019
7284 msgid "guestfs_get_state"
7288 #: ../src/guestfs-actions.pod:2021
7292 " guestfs_get_state (guestfs_h *g);\n"
7297 #: ../src/guestfs-actions.pod:2024 ../fish/guestfish-actions.pod:1384
7299 "This returns the current state as an opaque integer. This is only useful "
7300 "for printing debug and internal error messages."
7304 #: ../src/guestfs-actions.pod:2027 ../src/guestfs-actions.pod:2784 ../src/guestfs-actions.pod:2813 ../src/guestfs-actions.pod:2874 ../src/guestfs-actions.pod:2901 ../fish/guestfish-actions.pod:1387 ../fish/guestfish-actions.pod:1917 ../fish/guestfish-actions.pod:1935 ../fish/guestfish-actions.pod:1973 ../fish/guestfish-actions.pod:1989
7305 msgid "For more information on states, see L<guestfs(3)>."
7309 #: ../src/guestfs-actions.pod:2033
7310 msgid "guestfs_get_trace"
7314 #: ../src/guestfs-actions.pod:2035
7318 " guestfs_get_trace (guestfs_h *g);\n"
7323 #: ../src/guestfs-actions.pod:2038 ../fish/guestfish-actions.pod:1393
7324 msgid "Return the command trace flag."
7328 #: ../src/guestfs-actions.pod:2044
7329 msgid "guestfs_get_umask"
7333 #: ../src/guestfs-actions.pod:2046
7337 " guestfs_get_umask (guestfs_h *g);\n"
7342 #: ../src/guestfs-actions.pod:2049
7344 "Return the current umask. By default the umask is C<022> unless it has been "
7345 "set by calling C<guestfs_umask>."
7349 #: ../src/guestfs-actions.pod:2056
7350 msgid "guestfs_get_verbose"
7354 #: ../src/guestfs-actions.pod:2058
7358 " guestfs_get_verbose (guestfs_h *g);\n"
7363 #: ../src/guestfs-actions.pod:2061 ../fish/guestfish-actions.pod:1406
7364 msgid "This returns the verbose messages flag."
7368 #: ../src/guestfs-actions.pod:2067
7369 msgid "guestfs_getcon"
7373 #: ../src/guestfs-actions.pod:2069
7377 " guestfs_getcon (guestfs_h *g);\n"
7382 #: ../src/guestfs-actions.pod:2072 ../fish/guestfish-actions.pod:1412
7383 msgid "This gets the SELinux security context of the daemon."
7387 #: ../src/guestfs-actions.pod:2074
7388 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
7392 #: ../src/guestfs-actions.pod:2082
7393 msgid "guestfs_getxattrs"
7397 #: ../src/guestfs-actions.pod:2084
7400 " struct guestfs_xattr_list *\n"
7401 " guestfs_getxattrs (guestfs_h *g,\n"
7402 " const char *path);\n"
7407 #: ../src/guestfs-actions.pod:2088 ../fish/guestfish-actions.pod:1421
7408 msgid "This call lists the extended attributes of the file or directory C<path>."
7412 #: ../src/guestfs-actions.pod:2091 ../fish/guestfish-actions.pod:1424
7414 "At the system call level, this is a combination of the L<listxattr(2)> and "
7415 "L<getxattr(2)> calls."
7419 #: ../src/guestfs-actions.pod:2094
7420 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
7424 #: ../src/guestfs-actions.pod:2096 ../src/guestfs-actions.pod:2993 ../src/guestfs-actions.pod:3647
7426 "This function returns a C<struct guestfs_xattr_list *> (see "
7427 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
7428 "must call C<guestfs_free_xattr_list> after use>."
7432 #: ../src/guestfs-actions.pod:2101 ../src/guestfs-actions.pod:2998 ../src/guestfs-actions.pod:3163 ../src/guestfs-actions.pod:3199 ../src/guestfs-actions.pod:4999 ../src/guestfs-actions.pod:5438 ../src/guestfs-actions.pod:6764
7433 msgid "(Added in 1.0.59)"
7437 #: ../src/guestfs-actions.pod:2103
7438 msgid "guestfs_glob_expand"
7442 #: ../src/guestfs-actions.pod:2105
7446 " guestfs_glob_expand (guestfs_h *g,\n"
7447 " const char *pattern);\n"
7452 #: ../src/guestfs-actions.pod:2109 ../fish/guestfish-actions.pod:1433
7454 "This command searches for all the pathnames matching C<pattern> according to "
7455 "the wildcard expansion rules used by the shell."
7459 #: ../src/guestfs-actions.pod:2113 ../fish/guestfish-actions.pod:1437
7460 msgid "If no paths match, then this returns an empty list (note: not an error)."
7464 #: ../src/guestfs-actions.pod:2116 ../fish/guestfish-actions.pod:1440
7466 "It is just a wrapper around the C L<glob(3)> function with flags "
7467 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
7471 #: ../src/guestfs-actions.pod:2124 ../src/guestfs-actions.pod:5603 ../src/guestfs-actions.pod:5620
7472 msgid "(Added in 1.0.50)"
7476 #: ../src/guestfs-actions.pod:2126
7477 msgid "guestfs_grep"
7481 #: ../src/guestfs-actions.pod:2128
7485 " guestfs_grep (guestfs_h *g,\n"
7486 " const char *regex,\n"
7487 " const char *path);\n"
7492 #: ../src/guestfs-actions.pod:2133 ../fish/guestfish-actions.pod:1448
7493 msgid "This calls the external C<grep> program and returns the matching lines."
7497 #: ../src/guestfs-actions.pod:2145
7498 msgid "guestfs_grepi"
7502 #: ../src/guestfs-actions.pod:2147
7506 " guestfs_grepi (guestfs_h *g,\n"
7507 " const char *regex,\n"
7508 " const char *path);\n"
7513 #: ../src/guestfs-actions.pod:2152 ../fish/guestfish-actions.pod:1458
7514 msgid "This calls the external C<grep -i> program and returns the matching lines."
7518 #: ../src/guestfs-actions.pod:2164
7519 msgid "guestfs_grub_install"
7523 #: ../src/guestfs-actions.pod:2166
7527 " guestfs_grub_install (guestfs_h *g,\n"
7528 " const char *root,\n"
7529 " const char *device);\n"
7534 #: ../src/guestfs-actions.pod:2171 ../fish/guestfish-actions.pod:1468
7536 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
7537 "the root directory being C<root>."
7541 #: ../src/guestfs-actions.pod:2174 ../fish/guestfish-actions.pod:1471
7543 "Note: If grub-install reports the error \"No suitable drive was found in the "
7544 "generated device map.\" it may be that you need to create a "
7545 "C</boot/grub/device.map> file first that contains the mapping between grub "
7546 "device names and Linux device names. It is usually sufficient to create a "
7551 #: ../src/guestfs-actions.pod:2181 ../fish/guestfish-actions.pod:1478
7559 #: ../src/guestfs-actions.pod:2183 ../fish/guestfish-actions.pod:1480
7560 msgid "replacing C</dev/vda> with the name of the installation device."
7564 #: ../src/guestfs-actions.pod:2187
7565 msgid "(Added in 1.0.17)"
7569 #: ../src/guestfs-actions.pod:2189
7570 msgid "guestfs_head"
7574 #: ../src/guestfs-actions.pod:2191
7578 " guestfs_head (guestfs_h *g,\n"
7579 " const char *path);\n"
7584 #: ../src/guestfs-actions.pod:2195 ../fish/guestfish-actions.pod:1486
7586 "This command returns up to the first 10 lines of a file as a list of "
7591 #: ../src/guestfs-actions.pod:2207
7592 msgid "guestfs_head_n"
7596 #: ../src/guestfs-actions.pod:2209
7600 " guestfs_head_n (guestfs_h *g,\n"
7602 " const char *path);\n"
7607 #: ../src/guestfs-actions.pod:2214 ../fish/guestfish-actions.pod:1496
7609 "If the parameter C<nrlines> is a positive number, this returns the first "
7610 "C<nrlines> lines of the file C<path>."
7614 #: ../src/guestfs-actions.pod:2217 ../fish/guestfish-actions.pod:1499
7616 "If the parameter C<nrlines> is a negative number, this returns lines from "
7617 "the file C<path>, excluding the last C<nrlines> lines."
7621 #: ../src/guestfs-actions.pod:2220 ../src/guestfs-actions.pod:5900 ../fish/guestfish-actions.pod:1502 ../fish/guestfish-actions.pod:3917
7622 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
7626 #: ../src/guestfs-actions.pod:2231
7627 msgid "guestfs_hexdump"
7631 #: ../src/guestfs-actions.pod:2233
7635 " guestfs_hexdump (guestfs_h *g,\n"
7636 " const char *path);\n"
7641 #: ../src/guestfs-actions.pod:2237 ../fish/guestfish-actions.pod:1511
7643 "This runs C<hexdump -C> on the given C<path>. The result is the "
7644 "human-readable, canonical hex dump of the file."
7648 #: ../src/guestfs-actions.pod:2246 ../src/guestfs-actions.pod:5684 ../src/guestfs-actions.pod:5739
7649 msgid "(Added in 1.0.22)"
7653 #: ../src/guestfs-actions.pod:2248
7654 msgid "guestfs_initrd_cat"
7658 #: ../src/guestfs-actions.pod:2250
7662 " guestfs_initrd_cat (guestfs_h *g,\n"
7663 " const char *initrdpath,\n"
7664 " const char *filename,\n"
7665 " size_t *size_r);\n"
7670 #: ../src/guestfs-actions.pod:2256 ../fish/guestfish-actions.pod:1521
7672 "This command unpacks the file C<filename> from the initrd file called "
7673 "C<initrdpath>. The filename must be given I<without> the initial C</> "
7678 #: ../src/guestfs-actions.pod:2260 ../fish/guestfish-actions.pod:1525
7680 "For example, in guestfish you could use the following command to examine the "
7681 "boot script (usually called C</init>) contained in a Linux initrd or "
7686 #: ../src/guestfs-actions.pod:2264 ../fish/guestfish-actions.pod:1529
7689 " initrd-cat /boot/initrd-<version>.img init\n"
7694 #: ../src/guestfs-actions.pod:2266
7695 msgid "See also C<guestfs_initrd_list>."
7699 #: ../src/guestfs-actions.pod:2268 ../src/guestfs-actions.pod:4617 ../src/guestfs-actions.pod:4643 ../src/guestfs-actions.pod:4825
7701 "This function returns a buffer, or NULL on error. The size of the returned "
7702 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
7707 #: ../src/guestfs-actions.pod:2277
7708 msgid "guestfs_initrd_list"
7712 #: ../src/guestfs-actions.pod:2279
7716 " guestfs_initrd_list (guestfs_h *g,\n"
7717 " const char *path);\n"
7722 #: ../src/guestfs-actions.pod:2283 ../fish/guestfish-actions.pod:1540
7723 msgid "This command lists out files contained in an initrd."
7727 #: ../src/guestfs-actions.pod:2285 ../fish/guestfish-actions.pod:1542
7729 "The files are listed without any initial C</> character. The files are "
7730 "listed in the order they appear (not necessarily alphabetical). Directory "
7731 "names are listed as separate items."
7735 #: ../src/guestfs-actions.pod:2289 ../fish/guestfish-actions.pod:1546
7737 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
7738 "initrd. We I<only> support the newer initramfs format (compressed cpio "
7743 #: ../src/guestfs-actions.pod:2299
7744 msgid "guestfs_inotify_add_watch"
7748 #: ../src/guestfs-actions.pod:2301
7752 " guestfs_inotify_add_watch (guestfs_h *g,\n"
7753 " const char *path,\n"
7759 #: ../src/guestfs-actions.pod:2306 ../fish/guestfish-actions.pod:1554
7760 msgid "Watch C<path> for the events listed in C<mask>."
7764 #: ../src/guestfs-actions.pod:2308 ../fish/guestfish-actions.pod:1556
7766 "Note that if C<path> is a directory then events within that directory are "
7767 "watched, but this does I<not> happen recursively (in subdirectories)."
7771 #: ../src/guestfs-actions.pod:2312 ../fish/guestfish-actions.pod:1560
7773 "Note for non-C or non-Linux callers: the inotify events are defined by the "
7774 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
7778 #: ../src/guestfs-actions.pod:2320
7779 msgid "guestfs_inotify_close"
7783 #: ../src/guestfs-actions.pod:2322
7787 " guestfs_inotify_close (guestfs_h *g);\n"
7792 #: ../src/guestfs-actions.pod:2325 ../fish/guestfish-actions.pod:1568
7794 "This closes the inotify handle which was previously opened by inotify_init. "
7795 "It removes all watches, throws away any pending events, and deallocates all "
7800 #: ../src/guestfs-actions.pod:2333
7801 msgid "guestfs_inotify_files"
7805 #: ../src/guestfs-actions.pod:2335
7809 " guestfs_inotify_files (guestfs_h *g);\n"
7814 #: ../src/guestfs-actions.pod:2338
7816 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
7817 "returns a list of pathnames of objects that were touched. The returned "
7818 "pathnames are sorted and deduplicated."
7822 #: ../src/guestfs-actions.pod:2348
7823 msgid "guestfs_inotify_init"
7827 #: ../src/guestfs-actions.pod:2350
7831 " guestfs_inotify_init (guestfs_h *g,\n"
7832 " int maxevents);\n"
7837 #: ../src/guestfs-actions.pod:2354 ../fish/guestfish-actions.pod:1584
7839 "This command creates a new inotify handle. The inotify subsystem can be "
7840 "used to notify events which happen to objects in the guest filesystem."
7844 #: ../src/guestfs-actions.pod:2358
7846 "C<maxevents> is the maximum number of events which will be queued up between "
7847 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
7848 "passed as C<0>, then the kernel (or previously set) default is used. For "
7849 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
7850 "throws away events, but records the fact that it threw them away by setting "
7851 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
7852 "C<guestfs_inotify_read>)."
7856 #: ../src/guestfs-actions.pod:2368
7858 "Before any events are generated, you have to add some watches to the "
7859 "internal watch list. See: C<guestfs_inotify_add_watch>, "
7860 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
7864 #: ../src/guestfs-actions.pod:2374
7866 "Queued up events should be read periodically by calling "
7867 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
7868 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
7869 "often enough then you risk the internal queue overflowing."
7873 #: ../src/guestfs-actions.pod:2381
7875 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
7876 "This also removes any watches automatically."
7880 #: ../src/guestfs-actions.pod:2385 ../fish/guestfish-actions.pod:1615
7882 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
7883 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
7884 "that there is one global inotify handle per libguestfs instance."
7888 #: ../src/guestfs-actions.pod:2394
7889 msgid "guestfs_inotify_read"
7893 #: ../src/guestfs-actions.pod:2396
7896 " struct guestfs_inotify_event_list *\n"
7897 " guestfs_inotify_read (guestfs_h *g);\n"
7902 #: ../src/guestfs-actions.pod:2399 ../fish/guestfish-actions.pod:1624
7904 "Return the complete queue of events that have happened since the previous "
7909 #: ../src/guestfs-actions.pod:2402 ../fish/guestfish-actions.pod:1627
7910 msgid "If no events have happened, this returns an empty list."
7914 #: ../src/guestfs-actions.pod:2404 ../fish/guestfish-actions.pod:1629
7916 "I<Note>: In order to make sure that all events have been read, you must call "
7917 "this function repeatedly until it returns an empty list. The reason is that "
7918 "the call will read events up to the maximum appliance-to-host message size "
7919 "and leave remaining events in the queue."
7923 #: ../src/guestfs-actions.pod:2410
7925 "This function returns a C<struct guestfs_inotify_event_list *> (see "
7926 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
7927 "must call C<guestfs_free_inotify_event_list> after use>."
7931 #: ../src/guestfs-actions.pod:2417
7932 msgid "guestfs_inotify_rm_watch"
7936 #: ../src/guestfs-actions.pod:2419
7940 " guestfs_inotify_rm_watch (guestfs_h *g,\n"
7946 #: ../src/guestfs-actions.pod:2423
7948 "Remove a previously defined inotify watch. See "
7949 "C<guestfs_inotify_add_watch>."
7953 #: ../src/guestfs-actions.pod:2430
7954 msgid "guestfs_inspect_get_arch"
7958 #: ../src/guestfs-actions.pod:2432
7962 " guestfs_inspect_get_arch (guestfs_h *g,\n"
7963 " const char *root);\n"
7968 #: ../src/guestfs-actions.pod:2436 ../src/guestfs-actions.pod:2459 ../src/guestfs-actions.pod:2532 ../src/guestfs-actions.pod:2558 ../src/guestfs-actions.pod:2585 ../src/guestfs-actions.pod:2606 ../src/guestfs-actions.pod:2639 ../src/guestfs-actions.pod:2663 ../src/guestfs-actions.pod:2701
7970 "This function should only be called with a root device string as returned by "
7971 "C<guestfs_inspect_os>."
7975 #: ../src/guestfs-actions.pod:2439
7977 "This returns the architecture of the inspected operating system. The "
7978 "possible return values are listed under C<guestfs_file_architecture>."
7982 #: ../src/guestfs-actions.pod:2443 ../fish/guestfish-actions.pod:1653
7984 "If the architecture could not be determined, then the string C<unknown> is "
7989 #: ../src/guestfs-actions.pod:2446 ../src/guestfs-actions.pod:2519 ../src/guestfs-actions.pod:2573 ../src/guestfs-actions.pod:2650 ../src/guestfs-actions.pod:2688 ../src/guestfs-actions.pod:2711 ../src/guestfs-actions.pod:2751 ../fish/guestfish-actions.pod:1656 ../fish/guestfish-actions.pod:1722 ../fish/guestfish-actions.pod:1761 ../fish/guestfish-actions.pod:1816 ../fish/guestfish-actions.pod:1847 ../fish/guestfish-actions.pod:1863 ../fish/guestfish-actions.pod:1897
7990 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
7994 #: ../src/guestfs-actions.pod:2453
7995 msgid "guestfs_inspect_get_distro"
7999 #: ../src/guestfs-actions.pod:2455
8003 " guestfs_inspect_get_distro (guestfs_h *g,\n"
8004 " const char *root);\n"
8009 #: ../src/guestfs-actions.pod:2462 ../fish/guestfish-actions.pod:1665
8010 msgid "This returns the distro (distribution) of the inspected operating system."
8014 #: ../src/guestfs-actions.pod:2465 ../fish/guestfish-actions.pod:1668
8015 msgid "Currently defined distros are:"
8019 #: ../src/guestfs-actions.pod:2469 ../fish/guestfish-actions.pod:1672
8020 msgid "\"archlinux\""
8024 #: ../src/guestfs-actions.pod:2471 ../fish/guestfish-actions.pod:1674
8029 #: ../src/guestfs-actions.pod:2473 ../fish/guestfish-actions.pod:1676
8034 #: ../src/guestfs-actions.pod:2475 ../fish/guestfish-actions.pod:1678
8035 msgid "Debian or a Debian-derived distro such as Ubuntu."
8039 #: ../src/guestfs-actions.pod:2477 ../fish/guestfish-actions.pod:1680
8044 #: ../src/guestfs-actions.pod:2479 ../fish/guestfish-actions.pod:1682
8049 #: ../src/guestfs-actions.pod:2481 ../fish/guestfish-actions.pod:1684
8054 #: ../src/guestfs-actions.pod:2483 ../fish/guestfish-actions.pod:1686
8059 #: ../src/guestfs-actions.pod:2485 ../fish/guestfish-actions.pod:1688
8064 #: ../src/guestfs-actions.pod:2487 ../fish/guestfish-actions.pod:1690
8069 #: ../src/guestfs-actions.pod:2489 ../fish/guestfish-actions.pod:1692
8074 #: ../src/guestfs-actions.pod:2491 ../fish/guestfish-actions.pod:1694
8079 #: ../src/guestfs-actions.pod:2493 ../fish/guestfish-actions.pod:1696
8080 msgid "\"redhat-based\""
8084 #: ../src/guestfs-actions.pod:2495 ../fish/guestfish-actions.pod:1698
8085 msgid "Some Red Hat-derived distro."
8089 #: ../src/guestfs-actions.pod:2497 ../fish/guestfish-actions.pod:1700
8094 #: ../src/guestfs-actions.pod:2499 ../fish/guestfish-actions.pod:1702
8095 msgid "Red Hat Enterprise Linux and some derivatives."
8099 #: ../src/guestfs-actions.pod:2501 ../src/guestfs-actions.pod:2675 ../fish/guestfish-actions.pod:1704 ../fish/guestfish-actions.pod:1834
8104 #: ../src/guestfs-actions.pod:2503 ../fish/guestfish-actions.pod:1706
8106 "Windows does not have distributions. This string is returned if the OS type "
8111 #: ../src/guestfs-actions.pod:2506 ../fish/guestfish-actions.pod:1709
8116 #: ../src/guestfs-actions.pod:2508 ../fish/guestfish-actions.pod:1711
8121 #: ../src/guestfs-actions.pod:2510 ../src/guestfs-actions.pod:2679 ../fish/guestfish-actions.pod:1713 ../fish/guestfish-actions.pod:1838
8126 #: ../src/guestfs-actions.pod:2512 ../fish/guestfish-actions.pod:1715
8127 msgid "The distro could not be determined."
8131 #: ../src/guestfs-actions.pod:2516 ../src/guestfs-actions.pod:2685 ../fish/guestfish-actions.pod:1719 ../fish/guestfish-actions.pod:1844
8133 "Future versions of libguestfs may return other strings here. The caller "
8134 "should be prepared to handle any string."
8138 #: ../src/guestfs-actions.pod:2526
8139 msgid "guestfs_inspect_get_filesystems"
8143 #: ../src/guestfs-actions.pod:2528
8147 " guestfs_inspect_get_filesystems (guestfs_h *g,\n"
8148 " const char *root);\n"
8153 #: ../src/guestfs-actions.pod:2535 ../fish/guestfish-actions.pod:1731
8155 "This returns a list of all the filesystems that we think are associated with "
8156 "this operating system. This includes the root filesystem, other ordinary "
8157 "filesystems, and non-mounted devices like swap partitions."
8161 #: ../src/guestfs-actions.pod:2540 ../fish/guestfish-actions.pod:1736
8163 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
8164 "to be shared between operating systems."
8168 #: ../src/guestfs-actions.pod:2543
8170 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8171 "C<guestfs_inspect_get_mountpoints>."
8175 #: ../src/guestfs-actions.pod:2552
8176 msgid "guestfs_inspect_get_major_version"
8180 #: ../src/guestfs-actions.pod:2554
8184 " guestfs_inspect_get_major_version (guestfs_h *g,\n"
8185 " const char *root);\n"
8190 #: ../src/guestfs-actions.pod:2561 ../fish/guestfish-actions.pod:1749
8191 msgid "This returns the major version number of the inspected operating system."
8195 #: ../src/guestfs-actions.pod:2564 ../fish/guestfish-actions.pod:1752
8197 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
8198 "popular public names used by the operating system. Notably the operating "
8199 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
8200 "1). You can find out the real versions corresponding to releases of Windows "
8201 "by consulting Wikipedia or MSDN."
8205 #: ../src/guestfs-actions.pod:2571 ../src/guestfs-actions.pod:2591 ../fish/guestfish-actions.pod:1759 ../fish/guestfish-actions.pod:1773
8206 msgid "If the version could not be determined, then C<0> is returned."
8210 #: ../src/guestfs-actions.pod:2579
8211 msgid "guestfs_inspect_get_minor_version"
8215 #: ../src/guestfs-actions.pod:2581
8219 " guestfs_inspect_get_minor_version (guestfs_h *g,\n"
8220 " const char *root);\n"
8225 #: ../src/guestfs-actions.pod:2588 ../fish/guestfish-actions.pod:1770
8226 msgid "This returns the minor version number of the inspected operating system."
8230 #: ../src/guestfs-actions.pod:2593
8232 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8233 "C<guestfs_inspect_get_major_version>."
8237 #: ../src/guestfs-actions.pod:2600
8238 msgid "guestfs_inspect_get_mountpoints"
8242 #: ../src/guestfs-actions.pod:2602
8246 " guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
8247 " const char *root);\n"
8252 #: ../src/guestfs-actions.pod:2609 ../fish/guestfish-actions.pod:1785
8254 "This returns a hash of where we think the filesystems associated with this "
8255 "operating system should be mounted. Callers should note that this is at "
8256 "best an educated guess made by reading configuration files such as "
8261 #: ../src/guestfs-actions.pod:2614 ../fish/guestfish-actions.pod:1790
8263 "Each element in the returned hashtable has a key which is the path of the "
8264 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
8265 "mounted there (eg. C</dev/sda1>)."
8269 #: ../src/guestfs-actions.pod:2619 ../fish/guestfish-actions.pod:1795
8270 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
8274 #: ../src/guestfs-actions.pod:2622
8276 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
8277 "C<guestfs_inspect_get_filesystems>."
8281 #: ../src/guestfs-actions.pod:2625 ../src/guestfs-actions.pod:3051 ../src/guestfs-actions.pod:4182 ../src/guestfs-actions.pod:6041
8283 "This function returns a NULL-terminated array of strings, or NULL if there "
8284 "was an error. The array of strings will always have length C<2n+1>, where "
8285 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
8286 "caller must free the strings and the array after use>."
8290 #: ../src/guestfs-actions.pod:2633
8291 msgid "guestfs_inspect_get_product_name"
8295 #: ../src/guestfs-actions.pod:2635
8299 " guestfs_inspect_get_product_name (guestfs_h *g,\n"
8300 " const char *root);\n"
8305 #: ../src/guestfs-actions.pod:2642 ../fish/guestfish-actions.pod:1808
8307 "This returns the product name of the inspected operating system. The "
8308 "product name is generally some freeform string which can be displayed to the "
8309 "user, but should not be parsed by programs."
8313 #: ../src/guestfs-actions.pod:2647 ../fish/guestfish-actions.pod:1813
8315 "If the product name could not be determined, then the string C<unknown> is "
8320 #: ../src/guestfs-actions.pod:2657
8321 msgid "guestfs_inspect_get_type"
8325 #: ../src/guestfs-actions.pod:2659
8329 " guestfs_inspect_get_type (guestfs_h *g,\n"
8330 " const char *root);\n"
8335 #: ../src/guestfs-actions.pod:2666 ../fish/guestfish-actions.pod:1825
8337 "This returns the type of the inspected operating system. Currently defined "
8342 #: ../src/guestfs-actions.pod:2671 ../fish/guestfish-actions.pod:1830
8347 #: ../src/guestfs-actions.pod:2673 ../fish/guestfish-actions.pod:1832
8348 msgid "Any Linux-based operating system."
8352 #: ../src/guestfs-actions.pod:2677 ../fish/guestfish-actions.pod:1836
8353 msgid "Any Microsoft Windows operating system."
8357 #: ../src/guestfs-actions.pod:2681 ../fish/guestfish-actions.pod:1840
8358 msgid "The operating system type could not be determined."
8362 #: ../src/guestfs-actions.pod:2695
8363 msgid "guestfs_inspect_get_windows_systemroot"
8367 #: ../src/guestfs-actions.pod:2697
8371 " guestfs_inspect_get_windows_systemroot (guestfs_h *g,\n"
8372 " const char *root);\n"
8377 #: ../src/guestfs-actions.pod:2704 ../fish/guestfish-actions.pod:1856
8379 "This returns the Windows systemroot of the inspected guest. The systemroot "
8380 "is a directory path such as C</WINDOWS>."
8384 #: ../src/guestfs-actions.pod:2707 ../fish/guestfish-actions.pod:1859
8386 "This call assumes that the guest is Windows and that the systemroot could be "
8387 "determined by inspection. If this is not the case then an error is "
8392 #: ../src/guestfs-actions.pod:2716
8393 msgid "(Added in 1.5.25)"
8397 #: ../src/guestfs-actions.pod:2718
8398 msgid "guestfs_inspect_os"
8402 #: ../src/guestfs-actions.pod:2720
8406 " guestfs_inspect_os (guestfs_h *g);\n"
8411 #: ../src/guestfs-actions.pod:2723 ../fish/guestfish-actions.pod:1869
8413 "This function uses other libguestfs functions and certain heuristics to "
8414 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
8415 "for operating systems."
8419 #: ../src/guestfs-actions.pod:2727 ../fish/guestfish-actions.pod:1873
8420 msgid "The list returned is empty if no operating systems were found."
8424 #: ../src/guestfs-actions.pod:2729 ../fish/guestfish-actions.pod:1875
8426 "If one operating system was found, then this returns a list with a single "
8427 "element, which is the name of the root filesystem of this operating system. "
8428 "It is also possible for this function to return a list containing more than "
8429 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
8430 "element being the root filesystem of one of the operating systems."
8434 #: ../src/guestfs-actions.pod:2736
8436 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
8437 "functions in order to query further information about each operating system, "
8438 "such as the name and version."
8442 #: ../src/guestfs-actions.pod:2741
8444 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
8445 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
8446 "the contents. This should be called with no disks currently mounted. The "
8447 "function may also use Augeas, so any existing Augeas handle will be closed."
8451 #: ../src/guestfs-actions.pod:2747 ../fish/guestfish-actions.pod:1893
8453 "This function cannot decrypt encrypted disks. The caller must do that first "
8454 "(supplying the necessary keys) if the disk is encrypted."
8458 #: ../src/guestfs-actions.pod:2753 ../src/guestfs-actions.pod:3009 ../src/guestfs-actions.pod:3071
8459 msgid "See also C<guestfs_list_filesystems>."
8463 #: ../src/guestfs-actions.pod:2761
8464 msgid "guestfs_is_blockdev"
8468 #: ../src/guestfs-actions.pod:2763
8472 " guestfs_is_blockdev (guestfs_h *g,\n"
8473 " const char *path);\n"
8478 #: ../src/guestfs-actions.pod:2767 ../fish/guestfish-actions.pod:1905
8480 "This returns C<true> if and only if there is a block device with the given "
8485 #: ../src/guestfs-actions.pod:2770 ../src/guestfs-actions.pod:2799 ../src/guestfs-actions.pod:2829 ../src/guestfs-actions.pod:2844 ../src/guestfs-actions.pod:2860 ../src/guestfs-actions.pod:2916 ../src/guestfs-actions.pod:2931
8486 msgid "See also C<guestfs_stat>."
8490 #: ../src/guestfs-actions.pod:2774 ../src/guestfs-actions.pod:2803 ../src/guestfs-actions.pod:2848 ../src/guestfs-actions.pod:2920 ../src/guestfs-actions.pod:2935
8491 msgid "(Added in 1.5.10)"
8495 #: ../src/guestfs-actions.pod:2776
8496 msgid "guestfs_is_busy"
8500 #: ../src/guestfs-actions.pod:2778
8504 " guestfs_is_busy (guestfs_h *g);\n"
8509 #: ../src/guestfs-actions.pod:2781 ../fish/guestfish-actions.pod:1914
8511 "This returns true iff this handle is busy processing a command (in the "
8516 #: ../src/guestfs-actions.pod:2790
8517 msgid "guestfs_is_chardev"
8521 #: ../src/guestfs-actions.pod:2792
8525 " guestfs_is_chardev (guestfs_h *g,\n"
8526 " const char *path);\n"
8531 #: ../src/guestfs-actions.pod:2796 ../fish/guestfish-actions.pod:1923
8533 "This returns C<true> if and only if there is a character device with the "
8534 "given C<path> name."
8538 #: ../src/guestfs-actions.pod:2805
8539 msgid "guestfs_is_config"
8543 #: ../src/guestfs-actions.pod:2807
8547 " guestfs_is_config (guestfs_h *g);\n"
8552 #: ../src/guestfs-actions.pod:2810 ../fish/guestfish-actions.pod:1932
8554 "This returns true iff this handle is being configured (in the C<CONFIG> "
8559 #: ../src/guestfs-actions.pod:2819
8560 msgid "guestfs_is_dir"
8564 #: ../src/guestfs-actions.pod:2821
8568 " guestfs_is_dir (guestfs_h *g,\n"
8569 " const char *path);\n"
8574 #: ../src/guestfs-actions.pod:2825 ../fish/guestfish-actions.pod:1941
8576 "This returns C<true> if and only if there is a directory with the given "
8577 "C<path> name. Note that it returns false for other objects like files."
8581 #: ../src/guestfs-actions.pod:2835
8582 msgid "guestfs_is_fifo"
8586 #: ../src/guestfs-actions.pod:2837
8590 " guestfs_is_fifo (guestfs_h *g,\n"
8591 " const char *path);\n"
8596 #: ../src/guestfs-actions.pod:2841 ../fish/guestfish-actions.pod:1951
8598 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
8599 "given C<path> name."
8603 #: ../src/guestfs-actions.pod:2850
8604 msgid "guestfs_is_file"
8608 #: ../src/guestfs-actions.pod:2852
8612 " guestfs_is_file (guestfs_h *g,\n"
8613 " const char *path);\n"
8618 #: ../src/guestfs-actions.pod:2856 ../fish/guestfish-actions.pod:1960
8620 "This returns C<true> if and only if there is a regular file with the given "
8621 "C<path> name. Note that it returns false for other objects like "
8626 #: ../src/guestfs-actions.pod:2866
8627 msgid "guestfs_is_launching"
8631 #: ../src/guestfs-actions.pod:2868
8635 " guestfs_is_launching (guestfs_h *g);\n"
8640 #: ../src/guestfs-actions.pod:2871 ../fish/guestfish-actions.pod:1970
8642 "This returns true iff this handle is launching the subprocess (in the "
8643 "C<LAUNCHING> state)."
8647 #: ../src/guestfs-actions.pod:2880
8648 msgid "guestfs_is_lv"
8652 #: ../src/guestfs-actions.pod:2882
8656 " guestfs_is_lv (guestfs_h *g,\n"
8657 " const char *device);\n"
8662 #: ../src/guestfs-actions.pod:2886 ../fish/guestfish-actions.pod:1979
8664 "This command tests whether C<device> is a logical volume, and returns true "
8665 "iff this is the case."
8669 #: ../src/guestfs-actions.pod:2893
8670 msgid "guestfs_is_ready"
8674 #: ../src/guestfs-actions.pod:2895
8678 " guestfs_is_ready (guestfs_h *g);\n"
8683 #: ../src/guestfs-actions.pod:2898 ../fish/guestfish-actions.pod:1986
8685 "This returns true iff this handle is ready to accept commands (in the "
8690 #: ../src/guestfs-actions.pod:2907
8691 msgid "guestfs_is_socket"
8695 #: ../src/guestfs-actions.pod:2909
8699 " guestfs_is_socket (guestfs_h *g,\n"
8700 " const char *path);\n"
8705 #: ../src/guestfs-actions.pod:2913 ../fish/guestfish-actions.pod:1995
8707 "This returns C<true> if and only if there is a Unix domain socket with the "
8708 "given C<path> name."
8712 #: ../src/guestfs-actions.pod:2922
8713 msgid "guestfs_is_symlink"
8717 #: ../src/guestfs-actions.pod:2924
8721 " guestfs_is_symlink (guestfs_h *g,\n"
8722 " const char *path);\n"
8727 #: ../src/guestfs-actions.pod:2928 ../fish/guestfish-actions.pod:2004
8729 "This returns C<true> if and only if there is a symbolic link with the given "
8734 #: ../src/guestfs-actions.pod:2937
8735 msgid "guestfs_kill_subprocess"
8739 #: ../src/guestfs-actions.pod:2939
8743 " guestfs_kill_subprocess (guestfs_h *g);\n"
8748 #: ../src/guestfs-actions.pod:2942 ../fish/guestfish-actions.pod:2013
8749 msgid "This kills the qemu subprocess. You should never need to call this."
8753 #: ../src/guestfs-actions.pod:2948
8754 msgid "guestfs_launch"
8758 #: ../src/guestfs-actions.pod:2950
8762 " guestfs_launch (guestfs_h *g);\n"
8767 #: ../src/guestfs-actions.pod:2953 ../fish/guestfish-actions.pod:2021
8769 "Internally libguestfs is implemented by running a virtual machine using "
8774 #: ../src/guestfs-actions.pod:2956 ../fish/guestfish-actions.pod:2024
8776 "You should call this after configuring the handle (eg. adding drives) but "
8777 "before performing any actions."
8781 #: ../src/guestfs-actions.pod:2963
8782 msgid "guestfs_lchown"
8786 #: ../src/guestfs-actions.pod:2965
8790 " guestfs_lchown (guestfs_h *g,\n"
8793 " const char *path);\n"
8798 #: ../src/guestfs-actions.pod:2971
8800 "Change the file owner to C<owner> and group to C<group>. This is like "
8801 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
8802 "changed, not the target."
8806 #: ../src/guestfs-actions.pod:2983
8807 msgid "guestfs_lgetxattrs"
8811 #: ../src/guestfs-actions.pod:2985
8814 " struct guestfs_xattr_list *\n"
8815 " guestfs_lgetxattrs (guestfs_h *g,\n"
8816 " const char *path);\n"
8821 #: ../src/guestfs-actions.pod:2989
8823 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
8824 "then it returns the extended attributes of the link itself."
8828 #: ../src/guestfs-actions.pod:3000
8829 msgid "guestfs_list_devices"
8833 #: ../src/guestfs-actions.pod:3002
8837 " guestfs_list_devices (guestfs_h *g);\n"
8842 #: ../src/guestfs-actions.pod:3005 ../fish/guestfish-actions.pod:2051
8843 msgid "List all the block devices."
8847 #: ../src/guestfs-actions.pod:3007 ../fish/guestfish-actions.pod:2053
8848 msgid "The full block device names are returned, eg. C</dev/sda>."
8852 #: ../src/guestfs-actions.pod:3017
8853 msgid "guestfs_list_filesystems"
8857 #: ../src/guestfs-actions.pod:3019
8861 " guestfs_list_filesystems (guestfs_h *g);\n"
8866 #: ../src/guestfs-actions.pod:3022 ../fish/guestfish-actions.pod:2061
8868 "This inspection command looks for filesystems on partitions, block devices "
8869 "and logical volumes, returning a list of devices containing filesystems and "
8874 #: ../src/guestfs-actions.pod:3026 ../fish/guestfish-actions.pod:2065
8876 "The return value is a hash, where the keys are the devices containing "
8877 "filesystems, and the values are the filesystem types. For example:"
8881 #: ../src/guestfs-actions.pod:3030 ../fish/guestfish-actions.pod:2069
8884 " \"/dev/sda1\" => \"ntfs\"\n"
8885 " \"/dev/sda2\" => \"ext2\"\n"
8886 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
8887 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
8892 #: ../src/guestfs-actions.pod:3035 ../fish/guestfish-actions.pod:2074
8894 "The value can have the special value \"unknown\", meaning the content of the "
8895 "device is undetermined or empty. \"swap\" means a Linux swap partition."
8899 #: ../src/guestfs-actions.pod:3039
8901 "This command runs other libguestfs commands, which might include "
8902 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
8903 "soon after launch and only when nothing is mounted."
8907 #: ../src/guestfs-actions.pod:3043
8909 "Not all of the filesystems returned will be mountable. In particular, swap "
8910 "partitions are returned in the list. Also this command does not check that "
8911 "each filesystem found is valid and mountable, and some filesystems might be "
8912 "mountable but require special options. Filesystems may not all belong to a "
8913 "single logical operating system (use C<guestfs_inspect_os> to look for "
8918 #: ../src/guestfs-actions.pod:3057 ../src/guestfs-actions.pod:4584
8919 msgid "(Added in 1.5.15)"
8923 #: ../src/guestfs-actions.pod:3059
8924 msgid "guestfs_list_partitions"
8928 #: ../src/guestfs-actions.pod:3061
8932 " guestfs_list_partitions (guestfs_h *g);\n"
8937 #: ../src/guestfs-actions.pod:3064 ../fish/guestfish-actions.pod:2094
8938 msgid "List all the partitions detected on all block devices."
8942 #: ../src/guestfs-actions.pod:3066 ../fish/guestfish-actions.pod:2096
8943 msgid "The full partition device names are returned, eg. C</dev/sda1>"
8947 #: ../src/guestfs-actions.pod:3068
8949 "This does not return logical volumes. For that you will need to call "
8954 #: ../src/guestfs-actions.pod:3079
8959 #: ../src/guestfs-actions.pod:3081
8963 " guestfs_ll (guestfs_h *g,\n"
8964 " const char *directory);\n"
8969 #: ../src/guestfs-actions.pod:3085 ../fish/guestfish-actions.pod:2107
8971 "List the files in C<directory> (relative to the root directory, there is no "
8972 "cwd) in the format of 'ls -la'."
8976 #: ../src/guestfs-actions.pod:3088 ../fish/guestfish-actions.pod:2110
8978 "This command is mostly useful for interactive sessions. It is I<not> "
8979 "intended that you try to parse the output string."
8983 #: ../src/guestfs-actions.pod:3096
8988 #: ../src/guestfs-actions.pod:3098
8992 " guestfs_ln (guestfs_h *g,\n"
8993 " const char *target,\n"
8994 " const char *linkname);\n"
8999 #: ../src/guestfs-actions.pod:3103 ../fish/guestfish-actions.pod:2117
9000 msgid "This command creates a hard link using the C<ln> command."
9004 #: ../src/guestfs-actions.pod:3109
9005 msgid "guestfs_ln_f"
9009 #: ../src/guestfs-actions.pod:3111
9013 " guestfs_ln_f (guestfs_h *g,\n"
9014 " const char *target,\n"
9015 " const char *linkname);\n"
9020 #: ../src/guestfs-actions.pod:3116 ../fish/guestfish-actions.pod:2123
9022 "This command creates a hard link using the C<ln -f> command. The C<-f> "
9023 "option removes the link (C<linkname>) if it exists already."
9027 #: ../src/guestfs-actions.pod:3123
9028 msgid "guestfs_ln_s"
9032 #: ../src/guestfs-actions.pod:3125
9036 " guestfs_ln_s (guestfs_h *g,\n"
9037 " const char *target,\n"
9038 " const char *linkname);\n"
9043 #: ../src/guestfs-actions.pod:3130 ../fish/guestfish-actions.pod:2130
9044 msgid "This command creates a symbolic link using the C<ln -s> command."
9048 #: ../src/guestfs-actions.pod:3136
9049 msgid "guestfs_ln_sf"
9053 #: ../src/guestfs-actions.pod:3138
9057 " guestfs_ln_sf (guestfs_h *g,\n"
9058 " const char *target,\n"
9059 " const char *linkname);\n"
9064 #: ../src/guestfs-actions.pod:3143 ../fish/guestfish-actions.pod:2136
9066 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
9067 "option removes the link (C<linkname>) if it exists already."
9071 #: ../src/guestfs-actions.pod:3150
9072 msgid "guestfs_lremovexattr"
9076 #: ../src/guestfs-actions.pod:3152
9080 " guestfs_lremovexattr (guestfs_h *g,\n"
9081 " const char *xattr,\n"
9082 " const char *path);\n"
9087 #: ../src/guestfs-actions.pod:3157
9089 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
9090 "link, then it removes an extended attribute of the link itself."
9094 #: ../src/guestfs-actions.pod:3165
9099 #: ../src/guestfs-actions.pod:3167
9103 " guestfs_ls (guestfs_h *g,\n"
9104 " const char *directory);\n"
9109 #: ../src/guestfs-actions.pod:3171 ../fish/guestfish-actions.pod:2151
9111 "List the files in C<directory> (relative to the root directory, there is no "
9112 "cwd). The '.' and '..' entries are not returned, but hidden files are "
9117 #: ../src/guestfs-actions.pod:3175
9119 "This command is mostly useful for interactive sessions. Programs should "
9120 "probably use C<guestfs_readdir> instead."
9124 #: ../src/guestfs-actions.pod:3184
9125 msgid "guestfs_lsetxattr"
9129 #: ../src/guestfs-actions.pod:3186
9133 " guestfs_lsetxattr (guestfs_h *g,\n"
9134 " const char *xattr,\n"
9135 " const char *val,\n"
9137 " const char *path);\n"
9142 #: ../src/guestfs-actions.pod:3193
9144 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
9145 "then it sets an extended attribute of the link itself."
9149 #: ../src/guestfs-actions.pod:3201
9150 msgid "guestfs_lstat"
9154 #: ../src/guestfs-actions.pod:3203
9157 " struct guestfs_stat *\n"
9158 " guestfs_lstat (guestfs_h *g,\n"
9159 " const char *path);\n"
9164 #: ../src/guestfs-actions.pod:3207 ../src/guestfs-actions.pod:5640 ../fish/guestfish-actions.pod:2170 ../fish/guestfish-actions.pod:3752
9165 msgid "Returns file information for the given C<path>."
9169 #: ../src/guestfs-actions.pod:3209
9171 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
9172 "link, then the link is stat-ed, not the file it refers to."
9176 #: ../src/guestfs-actions.pod:3213 ../fish/guestfish-actions.pod:2176
9177 msgid "This is the same as the C<lstat(2)> system call."
9181 #: ../src/guestfs-actions.pod:3215 ../src/guestfs-actions.pod:5644
9183 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
9184 "error. I<The caller must call C<guestfs_free_stat> after use>."
9188 #: ../src/guestfs-actions.pod:3219 ../src/guestfs-actions.pod:5648 ../src/guestfs-actions.pod:5666 ../src/guestfs-actions.pod:6047
9189 msgid "(Added in 0.9.2)"
9193 #: ../src/guestfs-actions.pod:3221
9194 msgid "guestfs_lstatlist"
9198 #: ../src/guestfs-actions.pod:3223
9201 " struct guestfs_stat_list *\n"
9202 " guestfs_lstatlist (guestfs_h *g,\n"
9203 " const char *path,\n"
9204 " char *const *names);\n"
9209 #: ../src/guestfs-actions.pod:3228
9211 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
9212 "files, where all files are in the directory C<path>. C<names> is the list "
9213 "of files from this directory."
9217 #: ../src/guestfs-actions.pod:3232 ../fish/guestfish-actions.pod:2186
9219 "On return you get a list of stat structs, with a one-to-one correspondence "
9220 "to the C<names> list. If any name did not exist or could not be lstat'd, "
9221 "then the C<ino> field of that structure is set to C<-1>."
9225 #: ../src/guestfs-actions.pod:3237
9227 "This call is intended for programs that want to efficiently list a directory "
9228 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
9229 "for a similarly efficient call for getting extended attributes. Very long "
9230 "directory listings might cause the protocol message size to be exceeded, "
9231 "causing this call to fail. The caller must split up such requests into "
9232 "smaller groups of names."
9236 #: ../src/guestfs-actions.pod:3245
9238 "This function returns a C<struct guestfs_stat_list *> (see "
9239 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
9240 "must call C<guestfs_free_stat_list> after use>."
9244 #: ../src/guestfs-actions.pod:3252
9245 msgid "guestfs_luks_add_key"
9249 #: ../src/guestfs-actions.pod:3254
9253 " guestfs_luks_add_key (guestfs_h *g,\n"
9254 " const char *device,\n"
9255 " const char *key,\n"
9256 " const char *newkey,\n"
9262 #: ../src/guestfs-actions.pod:3261 ../fish/guestfish-actions.pod:2203
9264 "This command adds a new key on LUKS device C<device>. C<key> is any "
9265 "existing key, and is used to access the device. C<newkey> is the new key to "
9266 "add. C<keyslot> is the key slot that will be replaced."
9270 #: ../src/guestfs-actions.pod:3266
9272 "Note that if C<keyslot> already contains a key, then this command will "
9273 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
9277 #: ../src/guestfs-actions.pod:3272 ../src/guestfs-actions.pod:3312 ../src/guestfs-actions.pod:3335 ../src/guestfs-actions.pod:3355 ../src/guestfs-actions.pod:3387 ../src/guestfs-actions.pod:3406
9279 "This function takes a key or passphrase parameter which could contain "
9280 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
9285 #: ../src/guestfs-actions.pod:3276 ../src/guestfs-actions.pod:3316 ../src/guestfs-actions.pod:3339 ../src/guestfs-actions.pod:3359
9286 msgid "(Added in 1.5.2)"
9290 #: ../src/guestfs-actions.pod:3278
9291 msgid "guestfs_luks_close"
9295 #: ../src/guestfs-actions.pod:3280
9299 " guestfs_luks_close (guestfs_h *g,\n"
9300 " const char *device);\n"
9305 #: ../src/guestfs-actions.pod:3284
9307 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
9308 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
9309 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
9310 "underlying block device."
9314 #: ../src/guestfs-actions.pod:3292 ../src/guestfs-actions.pod:3391 ../src/guestfs-actions.pod:3410 ../src/guestfs-actions.pod:3460 ../src/guestfs-actions.pod:3508
9315 msgid "(Added in 1.5.1)"
9319 #: ../src/guestfs-actions.pod:3294
9320 msgid "guestfs_luks_format"
9324 #: ../src/guestfs-actions.pod:3296
9328 " guestfs_luks_format (guestfs_h *g,\n"
9329 " const char *device,\n"
9330 " const char *key,\n"
9336 #: ../src/guestfs-actions.pod:3302 ../fish/guestfish-actions.pod:2229
9338 "This command erases existing data on C<device> and formats the device as a "
9339 "LUKS encrypted device. C<key> is the initial key, which is added to key "
9340 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
9344 #: ../src/guestfs-actions.pod:3309 ../src/guestfs-actions.pod:3332 ../src/guestfs-actions.pod:3472 ../src/guestfs-actions.pod:4334 ../src/guestfs-actions.pod:5100 ../src/guestfs-actions.pod:5475 ../src/guestfs-actions.pod:5498 ../src/guestfs-actions.pod:5524 ../src/guestfs-actions.pod:6675 ../fish/guestfish-actions.pod:2237 ../fish/guestfish-actions.pod:2250 ../fish/guestfish-actions.pod:2334 ../fish/guestfish-actions.pod:2864 ../fish/guestfish-actions.pod:3371 ../fish/guestfish-actions.pod:3651 ../fish/guestfish-actions.pod:3667 ../fish/guestfish-actions.pod:3682 ../fish/guestfish-actions.pod:4397
9346 "B<This command is dangerous. Without careful use you can easily destroy all "
9351 #: ../src/guestfs-actions.pod:3318
9352 msgid "guestfs_luks_format_cipher"
9356 #: ../src/guestfs-actions.pod:3320
9360 " guestfs_luks_format_cipher (guestfs_h *g,\n"
9361 " const char *device,\n"
9362 " const char *key,\n"
9364 " const char *cipher);\n"
9369 #: ../src/guestfs-actions.pod:3327
9371 "This command is the same as C<guestfs_luks_format> but it also allows you to "
9372 "set the C<cipher> used."
9376 #: ../src/guestfs-actions.pod:3341
9377 msgid "guestfs_luks_kill_slot"
9381 #: ../src/guestfs-actions.pod:3343
9385 " guestfs_luks_kill_slot (guestfs_h *g,\n"
9386 " const char *device,\n"
9387 " const char *key,\n"
9393 #: ../src/guestfs-actions.pod:3349 ../fish/guestfish-actions.pod:2257
9395 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
9396 "device C<device>. C<key> must be one of the I<other> keys."
9400 #: ../src/guestfs-actions.pod:3361
9401 msgid "guestfs_luks_open"
9405 #: ../src/guestfs-actions.pod:3363
9409 " guestfs_luks_open (guestfs_h *g,\n"
9410 " const char *device,\n"
9411 " const char *key,\n"
9412 " const char *mapname);\n"
9417 #: ../src/guestfs-actions.pod:3369 ../fish/guestfish-actions.pod:2268
9419 "This command opens a block device which has been encrypted according to the "
9420 "Linux Unified Key Setup (LUKS) standard."
9424 #: ../src/guestfs-actions.pod:3372 ../fish/guestfish-actions.pod:2271
9425 msgid "C<device> is the encrypted block device or partition."
9429 #: ../src/guestfs-actions.pod:3374 ../fish/guestfish-actions.pod:2273
9431 "The caller must supply one of the keys associated with the LUKS block "
9432 "device, in the C<key> parameter."
9436 #: ../src/guestfs-actions.pod:3377 ../fish/guestfish-actions.pod:2276
9438 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
9439 "writes to this block device are decrypted from and encrypted to the "
9440 "underlying C<device> respectively."
9444 #: ../src/guestfs-actions.pod:3381
9446 "If this block device contains LVM volume groups, then calling "
9447 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
9452 #: ../src/guestfs-actions.pod:3393
9453 msgid "guestfs_luks_open_ro"
9457 #: ../src/guestfs-actions.pod:3395
9461 " guestfs_luks_open_ro (guestfs_h *g,\n"
9462 " const char *device,\n"
9463 " const char *key,\n"
9464 " const char *mapname);\n"
9469 #: ../src/guestfs-actions.pod:3401
9471 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
9476 #: ../src/guestfs-actions.pod:3412
9477 msgid "guestfs_lvcreate"
9481 #: ../src/guestfs-actions.pod:3414
9485 " guestfs_lvcreate (guestfs_h *g,\n"
9486 " const char *logvol,\n"
9487 " const char *volgroup,\n"
9493 #: ../src/guestfs-actions.pod:3420 ../fish/guestfish-actions.pod:2301
9495 "This creates an LVM logical volume called C<logvol> on the volume group "
9496 "C<volgroup>, with C<size> megabytes."
9500 #: ../src/guestfs-actions.pod:3427
9501 msgid "guestfs_lvm_canonical_lv_name"
9505 #: ../src/guestfs-actions.pod:3429
9509 " guestfs_lvm_canonical_lv_name (guestfs_h *g,\n"
9510 " const char *lvname);\n"
9515 #: ../src/guestfs-actions.pod:3433 ../fish/guestfish-actions.pod:2308
9517 "This converts alternative naming schemes for LVs that you might find to the "
9518 "canonical name. For example, C</dev/mapper/VG-LV> is converted to "
9523 #: ../src/guestfs-actions.pod:3437 ../fish/guestfish-actions.pod:2312
9525 "This command returns an error if the C<lvname> parameter does not refer to a "
9530 #: ../src/guestfs-actions.pod:3440
9531 msgid "See also C<guestfs_is_lv>."
9535 #: ../src/guestfs-actions.pod:3445
9536 msgid "(Added in 1.5.24)"
9540 #: ../src/guestfs-actions.pod:3447
9541 msgid "guestfs_lvm_clear_filter"
9545 #: ../src/guestfs-actions.pod:3449
9549 " guestfs_lvm_clear_filter (guestfs_h *g);\n"
9554 #: ../src/guestfs-actions.pod:3452
9556 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
9557 "see every block device."
9561 #: ../src/guestfs-actions.pod:3455 ../src/guestfs-actions.pod:3497 ../fish/guestfish-actions.pod:2324 ../fish/guestfish-actions.pod:2355
9562 msgid "This command also clears the LVM cache and performs a volume group scan."
9566 #: ../src/guestfs-actions.pod:3462
9567 msgid "guestfs_lvm_remove_all"
9571 #: ../src/guestfs-actions.pod:3464
9575 " guestfs_lvm_remove_all (guestfs_h *g);\n"
9580 #: ../src/guestfs-actions.pod:3467 ../fish/guestfish-actions.pod:2331
9582 "This command removes all LVM logical volumes, volume groups and physical "
9587 #: ../src/guestfs-actions.pod:3477
9588 msgid "guestfs_lvm_set_filter"
9592 #: ../src/guestfs-actions.pod:3479
9596 " guestfs_lvm_set_filter (guestfs_h *g,\n"
9597 " char *const *devices);\n"
9602 #: ../src/guestfs-actions.pod:3483 ../fish/guestfish-actions.pod:2341
9604 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
9605 "block devices in the list C<devices>, and will ignore all other attached "
9610 #: ../src/guestfs-actions.pod:3487 ../fish/guestfish-actions.pod:2345
9612 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
9613 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
9614 "there are two types of duplication possible: either cloned PVs/VGs which "
9615 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
9616 "same name. In normal operation you cannot create this situation, but you "
9617 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
9618 "inside the LVM metadata."
9622 #: ../src/guestfs-actions.pod:3500 ../fish/guestfish-actions.pod:2358
9623 msgid "You can filter whole block devices or individual partitions."
9627 #: ../src/guestfs-actions.pod:3502 ../fish/guestfish-actions.pod:2360
9629 "You cannot use this if any VG is currently in use (eg. contains a mounted "
9630 "filesystem), even if you are not filtering out that VG."
9634 #: ../src/guestfs-actions.pod:3510
9635 msgid "guestfs_lvremove"
9639 #: ../src/guestfs-actions.pod:3512
9643 " guestfs_lvremove (guestfs_h *g,\n"
9644 " const char *device);\n"
9649 #: ../src/guestfs-actions.pod:3516 ../fish/guestfish-actions.pod:2368
9651 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
9652 "LV, such as C</dev/VG/LV>."
9656 #: ../src/guestfs-actions.pod:3519 ../fish/guestfish-actions.pod:2371
9658 "You can also remove all LVs in a volume group by specifying the VG name, "
9663 #: ../src/guestfs-actions.pod:3524 ../src/guestfs-actions.pod:4681 ../src/guestfs-actions.pod:6413
9664 msgid "(Added in 1.0.13)"
9668 #: ../src/guestfs-actions.pod:3526
9669 msgid "guestfs_lvrename"
9673 #: ../src/guestfs-actions.pod:3528
9677 " guestfs_lvrename (guestfs_h *g,\n"
9678 " const char *logvol,\n"
9679 " const char *newlogvol);\n"
9684 #: ../src/guestfs-actions.pod:3533 ../fish/guestfish-actions.pod:2378
9685 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
9689 #: ../src/guestfs-actions.pod:3537 ../src/guestfs-actions.pod:6426
9690 msgid "(Added in 1.0.83)"
9694 #: ../src/guestfs-actions.pod:3539
9695 msgid "guestfs_lvresize"
9699 #: ../src/guestfs-actions.pod:3541
9703 " guestfs_lvresize (guestfs_h *g,\n"
9704 " const char *device,\n"
9710 #: ../src/guestfs-actions.pod:3546 ../fish/guestfish-actions.pod:2384
9712 "This resizes (expands or shrinks) an existing LVM logical volume to "
9713 "C<mbytes>. When reducing, data in the reduced part is lost."
9717 #: ../src/guestfs-actions.pod:3554
9718 msgid "guestfs_lvresize_free"
9722 #: ../src/guestfs-actions.pod:3556
9726 " guestfs_lvresize_free (guestfs_h *g,\n"
9727 " const char *lv,\n"
9733 #: ../src/guestfs-actions.pod:3561 ../fish/guestfish-actions.pod:2392
9735 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
9736 "remaining free space in the volume group. Commonly you would call this with "
9737 "pc = 100 which expands the logical volume as much as possible, using all "
9738 "remaining free space in the volume group."
9742 #: ../src/guestfs-actions.pod:3569
9743 msgid "(Added in 1.3.3)"
9747 #: ../src/guestfs-actions.pod:3571
9752 #: ../src/guestfs-actions.pod:3573
9756 " guestfs_lvs (guestfs_h *g);\n"
9761 #: ../src/guestfs-actions.pod:3576 ../fish/guestfish-actions.pod:2402
9763 "List all the logical volumes detected. This is the equivalent of the "
9764 "L<lvs(8)> command."
9768 #: ../src/guestfs-actions.pod:3579 ../fish/guestfish-actions.pod:2405
9770 "This returns a list of the logical volume device names "
9771 "(eg. C</dev/VolGroup00/LogVol00>)."
9775 #: ../src/guestfs-actions.pod:3582
9776 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
9780 #: ../src/guestfs-actions.pod:3590
9781 msgid "guestfs_lvs_full"
9785 #: ../src/guestfs-actions.pod:3592
9788 " struct guestfs_lvm_lv_list *\n"
9789 " guestfs_lvs_full (guestfs_h *g);\n"
9794 #: ../src/guestfs-actions.pod:3595 ../fish/guestfish-actions.pod:2414
9796 "List all the logical volumes detected. This is the equivalent of the "
9797 "L<lvs(8)> command. The \"full\" version includes all fields."
9801 #: ../src/guestfs-actions.pod:3598
9803 "This function returns a C<struct guestfs_lvm_lv_list *> (see "
9804 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
9805 "must call C<guestfs_free_lvm_lv_list> after use>."
9809 #: ../src/guestfs-actions.pod:3605
9810 msgid "guestfs_lvuuid"
9814 #: ../src/guestfs-actions.pod:3607
9818 " guestfs_lvuuid (guestfs_h *g,\n"
9819 " const char *device);\n"
9824 #: ../src/guestfs-actions.pod:3611 ../fish/guestfish-actions.pod:2421
9825 msgid "This command returns the UUID of the LVM LV C<device>."
9829 #: ../src/guestfs-actions.pod:3618
9830 msgid "guestfs_lxattrlist"
9834 #: ../src/guestfs-actions.pod:3620
9837 " struct guestfs_xattr_list *\n"
9838 " guestfs_lxattrlist (guestfs_h *g,\n"
9839 " const char *path,\n"
9840 " char *const *names);\n"
9845 #: ../src/guestfs-actions.pod:3625 ../fish/guestfish-actions.pod:2427
9847 "This call allows you to get the extended attributes of multiple files, where "
9848 "all files are in the directory C<path>. C<names> is the list of files from "
9853 #: ../src/guestfs-actions.pod:3629 ../fish/guestfish-actions.pod:2431
9855 "On return you get a flat list of xattr structs which must be interpreted "
9856 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
9857 "C<attrval> in this struct is zero-length to indicate there was an error "
9858 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
9859 "number (the number of following attributes for this file, which could be "
9860 "C<\"0\">). Then after the first xattr struct are the zero or more "
9861 "attributes for the first named file. This repeats for the second and "
9866 #: ../src/guestfs-actions.pod:3639
9868 "This call is intended for programs that want to efficiently list a directory "
9869 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
9870 "a similarly efficient call for getting standard stats. Very long directory "
9871 "listings might cause the protocol message size to be exceeded, causing this "
9872 "call to fail. The caller must split up such requests into smaller groups of "
9877 #: ../src/guestfs-actions.pod:3654
9878 msgid "guestfs_mkdir"
9882 #: ../src/guestfs-actions.pod:3656
9886 " guestfs_mkdir (guestfs_h *g,\n"
9887 " const char *path);\n"
9892 #: ../src/guestfs-actions.pod:3660 ../fish/guestfish-actions.pod:2453
9893 msgid "Create a directory named C<path>."
9897 #: ../src/guestfs-actions.pod:3666
9898 msgid "guestfs_mkdir_mode"
9902 #: ../src/guestfs-actions.pod:3668
9906 " guestfs_mkdir_mode (guestfs_h *g,\n"
9907 " const char *path,\n"
9913 #: ../src/guestfs-actions.pod:3673 ../fish/guestfish-actions.pod:2459
9915 "This command creates a directory, setting the initial permissions of the "
9916 "directory to C<mode>."
9920 #: ../src/guestfs-actions.pod:3676 ../fish/guestfish-actions.pod:2462
9922 "For common Linux filesystems, the actual mode which is set will be C<mode & "
9923 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
9928 #: ../src/guestfs-actions.pod:3680
9929 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
9933 #: ../src/guestfs-actions.pod:3686
9934 msgid "guestfs_mkdir_p"
9938 #: ../src/guestfs-actions.pod:3688
9942 " guestfs_mkdir_p (guestfs_h *g,\n"
9943 " const char *path);\n"
9948 #: ../src/guestfs-actions.pod:3692 ../fish/guestfish-actions.pod:2472
9950 "Create a directory named C<path>, creating any parent directories as "
9951 "necessary. This is like the C<mkdir -p> shell command."
9955 #: ../src/guestfs-actions.pod:3699
9956 msgid "guestfs_mkdtemp"
9960 #: ../src/guestfs-actions.pod:3701
9964 " guestfs_mkdtemp (guestfs_h *g,\n"
9965 " const char *template);\n"
9970 #: ../src/guestfs-actions.pod:3705 ../fish/guestfish-actions.pod:2479
9972 "This command creates a temporary directory. The C<template> parameter "
9973 "should be a full pathname for the temporary directory name with the final "
9974 "six characters being \"XXXXXX\"."
9978 #: ../src/guestfs-actions.pod:3710 ../fish/guestfish-actions.pod:2484
9980 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
9981 "being suitable for Windows filesystems."
9985 #: ../src/guestfs-actions.pod:3713 ../fish/guestfish-actions.pod:2487
9986 msgid "The name of the temporary directory that was created is returned."
9990 #: ../src/guestfs-actions.pod:3716 ../fish/guestfish-actions.pod:2490
9991 msgid "The temporary directory is created with mode 0700 and is owned by root."
9995 #: ../src/guestfs-actions.pod:3719 ../fish/guestfish-actions.pod:2493
9997 "The caller is responsible for deleting the temporary directory and its "
9998 "contents after use."
10002 #: ../src/guestfs-actions.pod:3722 ../fish/guestfish-actions.pod:2496
10003 msgid "See also: L<mkdtemp(3)>"
10007 #: ../src/guestfs-actions.pod:3729
10008 msgid "guestfs_mke2fs_J"
10012 #: ../src/guestfs-actions.pod:3731
10016 " guestfs_mke2fs_J (guestfs_h *g,\n"
10017 " const char *fstype,\n"
10018 " int blocksize,\n"
10019 " const char *device,\n"
10020 " const char *journal);\n"
10025 #: ../src/guestfs-actions.pod:3738 ../fish/guestfish-actions.pod:2502
10027 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10028 "C<journal>. It is equivalent to the command:"
10032 #: ../src/guestfs-actions.pod:3742 ../fish/guestfish-actions.pod:2506
10035 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
10040 #: ../src/guestfs-actions.pod:3744
10041 msgid "See also C<guestfs_mke2journal>."
10045 #: ../src/guestfs-actions.pod:3748 ../src/guestfs-actions.pod:3766 ../src/guestfs-actions.pod:3784 ../src/guestfs-actions.pod:3800 ../src/guestfs-actions.pod:3814 ../src/guestfs-actions.pod:3828 ../src/guestfs-actions.pod:3880 ../src/guestfs-actions.pod:4070
10046 msgid "(Added in 1.0.68)"
10050 #: ../src/guestfs-actions.pod:3750
10051 msgid "guestfs_mke2fs_JL"
10055 #: ../src/guestfs-actions.pod:3752
10059 " guestfs_mke2fs_JL (guestfs_h *g,\n"
10060 " const char *fstype,\n"
10061 " int blocksize,\n"
10062 " const char *device,\n"
10063 " const char *label);\n"
10068 #: ../src/guestfs-actions.pod:3759 ../fish/guestfish-actions.pod:2514
10070 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10071 "the journal labeled C<label>."
10075 #: ../src/guestfs-actions.pod:3762
10076 msgid "See also C<guestfs_mke2journal_L>."
10080 #: ../src/guestfs-actions.pod:3768
10081 msgid "guestfs_mke2fs_JU"
10085 #: ../src/guestfs-actions.pod:3770
10089 " guestfs_mke2fs_JU (guestfs_h *g,\n"
10090 " const char *fstype,\n"
10091 " int blocksize,\n"
10092 " const char *device,\n"
10093 " const char *uuid);\n"
10098 #: ../src/guestfs-actions.pod:3777 ../fish/guestfish-actions.pod:2523
10100 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
10101 "the journal with UUID C<uuid>."
10105 #: ../src/guestfs-actions.pod:3780
10106 msgid "See also C<guestfs_mke2journal_U>."
10110 #: ../src/guestfs-actions.pod:3786
10111 msgid "guestfs_mke2journal"
10115 #: ../src/guestfs-actions.pod:3788
10119 " guestfs_mke2journal (guestfs_h *g,\n"
10120 " int blocksize,\n"
10121 " const char *device);\n"
10126 #: ../src/guestfs-actions.pod:3793 ../fish/guestfish-actions.pod:2532
10128 "This creates an ext2 external journal on C<device>. It is equivalent to the "
10133 #: ../src/guestfs-actions.pod:3796 ../fish/guestfish-actions.pod:2535
10136 " mke2fs -O journal_dev -b blocksize device\n"
10141 #: ../src/guestfs-actions.pod:3802
10142 msgid "guestfs_mke2journal_L"
10146 #: ../src/guestfs-actions.pod:3804
10150 " guestfs_mke2journal_L (guestfs_h *g,\n"
10151 " int blocksize,\n"
10152 " const char *label,\n"
10153 " const char *device);\n"
10158 #: ../src/guestfs-actions.pod:3810 ../fish/guestfish-actions.pod:2541
10159 msgid "This creates an ext2 external journal on C<device> with label C<label>."
10163 #: ../src/guestfs-actions.pod:3816
10164 msgid "guestfs_mke2journal_U"
10168 #: ../src/guestfs-actions.pod:3818
10172 " guestfs_mke2journal_U (guestfs_h *g,\n"
10173 " int blocksize,\n"
10174 " const char *uuid,\n"
10175 " const char *device);\n"
10180 #: ../src/guestfs-actions.pod:3824 ../fish/guestfish-actions.pod:2547
10181 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
10185 #: ../src/guestfs-actions.pod:3830
10186 msgid "guestfs_mkfifo"
10190 #: ../src/guestfs-actions.pod:3832
10194 " guestfs_mkfifo (guestfs_h *g,\n"
10196 " const char *path);\n"
10201 #: ../src/guestfs-actions.pod:3837
10203 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
10204 "is just a convenient wrapper around C<guestfs_mknod>."
10208 #: ../src/guestfs-actions.pod:3847
10209 msgid "guestfs_mkfs"
10213 #: ../src/guestfs-actions.pod:3849
10217 " guestfs_mkfs (guestfs_h *g,\n"
10218 " const char *fstype,\n"
10219 " const char *device);\n"
10224 #: ../src/guestfs-actions.pod:3854 ../fish/guestfish-actions.pod:2563
10226 "This creates a filesystem on C<device> (usually a partition or LVM logical "
10227 "volume). The filesystem type is C<fstype>, for example C<ext3>."
10231 #: ../src/guestfs-actions.pod:3862
10232 msgid "guestfs_mkfs_b"
10236 #: ../src/guestfs-actions.pod:3864
10240 " guestfs_mkfs_b (guestfs_h *g,\n"
10241 " const char *fstype,\n"
10242 " int blocksize,\n"
10243 " const char *device);\n"
10248 #: ../src/guestfs-actions.pod:3870
10250 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
10251 "block size of the resulting filesystem. Supported block sizes depend on the "
10252 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
10256 #: ../src/guestfs-actions.pod:3875 ../fish/guestfish-actions.pod:2576
10258 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
10263 #: ../src/guestfs-actions.pod:3882
10264 msgid "guestfs_mkmountpoint"
10268 #: ../src/guestfs-actions.pod:3884
10272 " guestfs_mkmountpoint (guestfs_h *g,\n"
10273 " const char *exemptpath);\n"
10278 #: ../src/guestfs-actions.pod:3888
10280 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
10281 "that can be used to create extra mountpoints before mounting the first "
10286 #: ../src/guestfs-actions.pod:3892 ../fish/guestfish-actions.pod:2587
10288 "These calls are I<only> necessary in some very limited circumstances, mainly "
10289 "the case where you want to mount a mix of unrelated and/or read-only "
10290 "filesystems together."
10294 #: ../src/guestfs-actions.pod:3896 ../fish/guestfish-actions.pod:2591
10296 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
10297 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
10298 "inside that. You can unpack this as follows in guestfish:"
10302 #: ../src/guestfs-actions.pod:3901 ../fish/guestfish-actions.pod:2596
10305 " add-ro Fedora-11-i686-Live.iso\n"
10307 " mkmountpoint /cd\n"
10308 " mkmountpoint /sqsh\n"
10309 " mkmountpoint /ext3fs\n"
10310 " mount /dev/sda /cd\n"
10311 " mount-loop /cd/LiveOS/squashfs.img /sqsh\n"
10312 " mount-loop /sqsh/LiveOS/ext3fs.img /ext3fs\n"
10317 #: ../src/guestfs-actions.pod:3910 ../fish/guestfish-actions.pod:2605
10318 msgid "The inner filesystem is now unpacked under the /ext3fs mountpoint."
10322 #: ../src/guestfs-actions.pod:3912
10324 "C<guestfs_mkmountpoint> is not compatible with C<guestfs_umount_all>. You "
10325 "may get unexpected errors if you try to mix these calls. It is safest to "
10326 "manually unmount filesystems and remove mountpoints after use."
10330 #: ../src/guestfs-actions.pod:3916
10332 "C<guestfs_umount_all> unmounts filesystems by sorting the paths longest "
10333 "first, so for this to work for manual mountpoints, you must ensure that the "
10334 "innermost mountpoints have the longest pathnames, as in the example code "
10339 #: ../src/guestfs-actions.pod:3921 ../fish/guestfish-actions.pod:2616
10340 msgid "For more details see L<https://bugzilla.redhat.com/show_bug.cgi?id=599503>"
10344 #: ../src/guestfs-actions.pod:3923
10346 "Autosync [see C<guestfs_set_autosync>, this is set by default on handles] "
10347 "means that C<guestfs_umount_all> is called when the handle is closed which "
10348 "can also trigger these issues."
10352 #: ../src/guestfs-actions.pod:3929 ../src/guestfs-actions.pod:4188 ../src/guestfs-actions.pod:5084
10353 msgid "(Added in 1.0.62)"
10357 #: ../src/guestfs-actions.pod:3931
10358 msgid "guestfs_mknod"
10362 #: ../src/guestfs-actions.pod:3933
10366 " guestfs_mknod (guestfs_h *g,\n"
10370 " const char *path);\n"
10375 #: ../src/guestfs-actions.pod:3940 ../fish/guestfish-actions.pod:2626
10377 "This call creates block or character special devices, or named pipes "
10382 #: ../src/guestfs-actions.pod:3943 ../fish/guestfish-actions.pod:2629
10384 "The C<mode> parameter should be the mode, using the standard constants. "
10385 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
10386 "used when creating block and character special devices."
10390 #: ../src/guestfs-actions.pod:3948
10392 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
10393 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
10394 "regular file). These constants are available in the standard Linux header "
10395 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
10396 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
10397 "the appropriate constant for you."
10401 #: ../src/guestfs-actions.pod:3962
10402 msgid "guestfs_mknod_b"
10406 #: ../src/guestfs-actions.pod:3964
10410 " guestfs_mknod_b (guestfs_h *g,\n"
10414 " const char *path);\n"
10419 #: ../src/guestfs-actions.pod:3971
10421 "This call creates a block device node called C<path> with mode C<mode> and "
10422 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
10423 "wrapper around C<guestfs_mknod>."
10427 #: ../src/guestfs-actions.pod:3981
10428 msgid "guestfs_mknod_c"
10432 #: ../src/guestfs-actions.pod:3983
10436 " guestfs_mknod_c (guestfs_h *g,\n"
10440 " const char *path);\n"
10445 #: ../src/guestfs-actions.pod:3990
10447 "This call creates a char device node called C<path> with mode C<mode> and "
10448 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
10449 "wrapper around C<guestfs_mknod>."
10453 #: ../src/guestfs-actions.pod:4000
10454 msgid "guestfs_mkswap"
10458 #: ../src/guestfs-actions.pod:4002
10462 " guestfs_mkswap (guestfs_h *g,\n"
10463 " const char *device);\n"
10468 #: ../src/guestfs-actions.pod:4006 ../fish/guestfish-actions.pod:2668
10469 msgid "Create a swap partition on C<device>."
10473 #: ../src/guestfs-actions.pod:4012
10474 msgid "guestfs_mkswap_L"
10478 #: ../src/guestfs-actions.pod:4014
10482 " guestfs_mkswap_L (guestfs_h *g,\n"
10483 " const char *label,\n"
10484 " const char *device);\n"
10489 #: ../src/guestfs-actions.pod:4019 ../fish/guestfish-actions.pod:2674
10490 msgid "Create a swap partition on C<device> with label C<label>."
10494 #: ../src/guestfs-actions.pod:4021 ../fish/guestfish-actions.pod:2676
10496 "Note that you cannot attach a swap label to a block device "
10497 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
10498 "the kernel or swap tools."
10502 #: ../src/guestfs-actions.pod:4029
10503 msgid "guestfs_mkswap_U"
10507 #: ../src/guestfs-actions.pod:4031
10511 " guestfs_mkswap_U (guestfs_h *g,\n"
10512 " const char *uuid,\n"
10513 " const char *device);\n"
10518 #: ../src/guestfs-actions.pod:4036 ../fish/guestfish-actions.pod:2684
10519 msgid "Create a swap partition on C<device> with UUID C<uuid>."
10523 #: ../src/guestfs-actions.pod:4042
10524 msgid "guestfs_mkswap_file"
10528 #: ../src/guestfs-actions.pod:4044
10532 " guestfs_mkswap_file (guestfs_h *g,\n"
10533 " const char *path);\n"
10538 #: ../src/guestfs-actions.pod:4048 ../fish/guestfish-actions.pod:2690
10539 msgid "Create a swap file."
10543 #: ../src/guestfs-actions.pod:4050
10545 "This command just writes a swap file signature to an existing file. To "
10546 "create the file itself, use something like C<guestfs_fallocate>."
10550 #: ../src/guestfs-actions.pod:4057
10551 msgid "guestfs_modprobe"
10555 #: ../src/guestfs-actions.pod:4059
10559 " guestfs_modprobe (guestfs_h *g,\n"
10560 " const char *modulename);\n"
10565 #: ../src/guestfs-actions.pod:4063 ../fish/guestfish-actions.pod:2699
10566 msgid "This loads a kernel module in the appliance."
10570 #: ../src/guestfs-actions.pod:4065 ../fish/guestfish-actions.pod:2701
10572 "The kernel module must have been whitelisted when libguestfs was built (see "
10573 "C<appliance/kmod.whitelist.in> in the source)."
10577 #: ../src/guestfs-actions.pod:4072
10578 msgid "guestfs_mount"
10582 #: ../src/guestfs-actions.pod:4074
10586 " guestfs_mount (guestfs_h *g,\n"
10587 " const char *device,\n"
10588 " const char *mountpoint);\n"
10593 #: ../src/guestfs-actions.pod:4079 ../fish/guestfish-actions.pod:2708
10595 "Mount a guest disk at a position in the filesystem. Block devices are named "
10596 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
10597 "those block devices contain partitions, they will have the usual names "
10598 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
10602 #: ../src/guestfs-actions.pod:4085 ../fish/guestfish-actions.pod:2714
10604 "The rules are the same as for L<mount(2)>: A filesystem must first be "
10605 "mounted on C</> before others can be mounted. Other filesystems can only be "
10606 "mounted on directories which already exist."
10610 #: ../src/guestfs-actions.pod:4090 ../fish/guestfish-actions.pod:2719
10612 "The mounted filesystem is writable, if we have sufficient permissions on the "
10613 "underlying device."
10617 #: ../src/guestfs-actions.pod:4093
10619 "B<Important note:> When you use this call, the filesystem options C<sync> "
10620 "and C<noatime> are set implicitly. This was originally done because we "
10621 "thought it would improve reliability, but it turns out that I<-o sync> has a "
10622 "very large negative performance impact and negligible effect on "
10623 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
10624 "in any code that needs performance, and instead use C<guestfs_mount_options> "
10625 "(use an empty string for the first parameter if you don't want any options)."
10629 #: ../src/guestfs-actions.pod:4107
10630 msgid "guestfs_mount_loop"
10634 #: ../src/guestfs-actions.pod:4109
10638 " guestfs_mount_loop (guestfs_h *g,\n"
10639 " const char *file,\n"
10640 " const char *mountpoint);\n"
10645 #: ../src/guestfs-actions.pod:4114 ../fish/guestfish-actions.pod:2736
10647 "This command lets you mount C<file> (a filesystem image in a file) on a "
10648 "mount point. It is entirely equivalent to the command C<mount -o loop file "
10653 #: ../src/guestfs-actions.pod:4122
10654 msgid "guestfs_mount_options"
10658 #: ../src/guestfs-actions.pod:4124
10662 " guestfs_mount_options (guestfs_h *g,\n"
10663 " const char *options,\n"
10664 " const char *device,\n"
10665 " const char *mountpoint);\n"
10670 #: ../src/guestfs-actions.pod:4130
10672 "This is the same as the C<guestfs_mount> command, but it allows you to set "
10673 "the mount options as for the L<mount(8)> I<-o> flag."
10677 #: ../src/guestfs-actions.pod:4134 ../fish/guestfish-actions.pod:2748
10679 "If the C<options> parameter is an empty string, then no options are passed "
10680 "(all options default to whatever the filesystem uses)."
10684 #: ../src/guestfs-actions.pod:4140 ../src/guestfs-actions.pod:4154 ../src/guestfs-actions.pod:4171
10685 msgid "(Added in 1.0.10)"
10689 #: ../src/guestfs-actions.pod:4142
10690 msgid "guestfs_mount_ro"
10694 #: ../src/guestfs-actions.pod:4144
10698 " guestfs_mount_ro (guestfs_h *g,\n"
10699 " const char *device,\n"
10700 " const char *mountpoint);\n"
10705 #: ../src/guestfs-actions.pod:4149
10707 "This is the same as the C<guestfs_mount> command, but it mounts the "
10708 "filesystem with the read-only (I<-o ro>) flag."
10712 #: ../src/guestfs-actions.pod:4156
10713 msgid "guestfs_mount_vfs"
10717 #: ../src/guestfs-actions.pod:4158
10721 " guestfs_mount_vfs (guestfs_h *g,\n"
10722 " const char *options,\n"
10723 " const char *vfstype,\n"
10724 " const char *device,\n"
10725 " const char *mountpoint);\n"
10730 #: ../src/guestfs-actions.pod:4165
10732 "This is the same as the C<guestfs_mount> command, but it allows you to set "
10733 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
10738 #: ../src/guestfs-actions.pod:4173
10739 msgid "guestfs_mountpoints"
10743 #: ../src/guestfs-actions.pod:4175
10747 " guestfs_mountpoints (guestfs_h *g);\n"
10752 #: ../src/guestfs-actions.pod:4178
10754 "This call is similar to C<guestfs_mounts>. That call returns a list of "
10755 "devices. This one returns a hash table (map) of device name to directory "
10756 "where the device is mounted."
10760 #: ../src/guestfs-actions.pod:4190
10761 msgid "guestfs_mounts"
10765 #: ../src/guestfs-actions.pod:4192
10769 " guestfs_mounts (guestfs_h *g);\n"
10774 #: ../src/guestfs-actions.pod:4195 ../fish/guestfish-actions.pod:2779
10776 "This returns the list of currently mounted filesystems. It returns the list "
10777 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
10781 #: ../src/guestfs-actions.pod:4198 ../fish/guestfish-actions.pod:2782
10782 msgid "Some internal mounts are not shown."
10786 #: ../src/guestfs-actions.pod:4200
10787 msgid "See also: C<guestfs_mountpoints>"
10791 #: ../src/guestfs-actions.pod:4208
10796 #: ../src/guestfs-actions.pod:4210
10800 " guestfs_mv (guestfs_h *g,\n"
10801 " const char *src,\n"
10802 " const char *dest);\n"
10807 #: ../src/guestfs-actions.pod:4215 ../fish/guestfish-actions.pod:2790
10809 "This moves a file from C<src> to C<dest> where C<dest> is either a "
10810 "destination filename or destination directory."
10814 #: ../src/guestfs-actions.pod:4222
10815 msgid "guestfs_ntfs_3g_probe"
10819 #: ../src/guestfs-actions.pod:4224
10823 " guestfs_ntfs_3g_probe (guestfs_h *g,\n"
10825 " const char *device);\n"
10830 #: ../src/guestfs-actions.pod:4229 ../fish/guestfish-actions.pod:2797
10832 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
10833 "C<device> for mountability. (Not all NTFS volumes can be mounted "
10834 "read-write, and some cannot be mounted at all)."
10838 #: ../src/guestfs-actions.pod:4233 ../fish/guestfish-actions.pod:2801
10840 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
10841 "can be mounted read-write. Set it to false if you want to test if the "
10842 "volume can be mounted read-only."
10846 #: ../src/guestfs-actions.pod:4237 ../fish/guestfish-actions.pod:2805
10848 "The return value is an integer which C<0> if the operation would succeed, or "
10849 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
10853 #: ../src/guestfs-actions.pod:4243
10854 msgid "(Added in 1.0.43)"
10858 #: ../src/guestfs-actions.pod:4245
10859 msgid "guestfs_ntfsresize"
10863 #: ../src/guestfs-actions.pod:4247
10867 " guestfs_ntfsresize (guestfs_h *g,\n"
10868 " const char *device);\n"
10873 #: ../src/guestfs-actions.pod:4251 ../fish/guestfish-actions.pod:2813
10875 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
10876 "size of the underlying device. See also L<ntfsresize(8)>."
10880 #: ../src/guestfs-actions.pod:4259
10881 msgid "guestfs_ntfsresize_size"
10885 #: ../src/guestfs-actions.pod:4261
10889 " guestfs_ntfsresize_size (guestfs_h *g,\n"
10890 " const char *device,\n"
10891 " int64_t size);\n"
10896 #: ../src/guestfs-actions.pod:4266
10898 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
10899 "to specify the new size (in bytes) explicitly."
10903 #: ../src/guestfs-actions.pod:4271 ../src/guestfs-actions.pod:4708 ../src/guestfs-actions.pod:4782 ../src/guestfs-actions.pod:5032
10904 msgid "(Added in 1.3.14)"
10908 #: ../src/guestfs-actions.pod:4273
10909 msgid "guestfs_part_add"
10913 #: ../src/guestfs-actions.pod:4275
10917 " guestfs_part_add (guestfs_h *g,\n"
10918 " const char *device,\n"
10919 " const char *prlogex,\n"
10920 " int64_t startsect,\n"
10921 " int64_t endsect);\n"
10926 #: ../src/guestfs-actions.pod:4282
10928 "This command adds a partition to C<device>. If there is no partition table "
10929 "on the device, call C<guestfs_part_init> first."
10933 #: ../src/guestfs-actions.pod:4285 ../fish/guestfish-actions.pod:2831
10935 "The C<prlogex> parameter is the type of partition. Normally you should pass "
10936 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
10937 "C<logical>) and C<e> (or C<extended>) partition types."
10941 #: ../src/guestfs-actions.pod:4290 ../fish/guestfish-actions.pod:2836
10943 "C<startsect> and C<endsect> are the start and end of the partition in "
10944 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
10945 "from the end of the disk (C<-1> is the last sector)."
10949 #: ../src/guestfs-actions.pod:4294
10951 "Creating a partition which covers the whole disk is not so easy. Use "
10952 "C<guestfs_part_disk> to do that."
10956 #: ../src/guestfs-actions.pod:4299 ../src/guestfs-actions.pod:4337 ../src/guestfs-actions.pod:4390 ../src/guestfs-actions.pod:4468 ../src/guestfs-actions.pod:4507 ../src/guestfs-actions.pod:4526 ../src/guestfs-actions.pod:4566
10957 msgid "(Added in 1.0.78)"
10961 #: ../src/guestfs-actions.pod:4301
10962 msgid "guestfs_part_del"
10966 #: ../src/guestfs-actions.pod:4303
10970 " guestfs_part_del (guestfs_h *g,\n"
10971 " const char *device,\n"
10977 #: ../src/guestfs-actions.pod:4308 ../fish/guestfish-actions.pod:2847
10978 msgid "This command deletes the partition numbered C<partnum> on C<device>."
10982 #: ../src/guestfs-actions.pod:4310 ../fish/guestfish-actions.pod:2849
10984 "Note that in the case of MBR partitioning, deleting an extended partition "
10985 "also deletes any logical partitions it contains."
10989 #: ../src/guestfs-actions.pod:4318
10990 msgid "guestfs_part_disk"
10994 #: ../src/guestfs-actions.pod:4320
10998 " guestfs_part_disk (guestfs_h *g,\n"
10999 " const char *device,\n"
11000 " const char *parttype);\n"
11005 #: ../src/guestfs-actions.pod:4325
11007 "This command is simply a combination of C<guestfs_part_init> followed by "
11008 "C<guestfs_part_add> to create a single primary partition covering the whole "
11013 #: ../src/guestfs-actions.pod:4329
11015 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
11016 "possible values are described in C<guestfs_part_init>."
11020 #: ../src/guestfs-actions.pod:4339
11021 msgid "guestfs_part_get_bootable"
11025 #: ../src/guestfs-actions.pod:4341
11029 " guestfs_part_get_bootable (guestfs_h *g,\n"
11030 " const char *device,\n"
11036 #: ../src/guestfs-actions.pod:4346 ../fish/guestfish-actions.pod:2871
11038 "This command returns true if the partition C<partnum> on C<device> has the "
11039 "bootable flag set."
11043 #: ../src/guestfs-actions.pod:4349
11044 msgid "See also C<guestfs_part_set_bootable>."
11048 #: ../src/guestfs-actions.pod:4355
11049 msgid "guestfs_part_get_mbr_id"
11053 #: ../src/guestfs-actions.pod:4357
11057 " guestfs_part_get_mbr_id (guestfs_h *g,\n"
11058 " const char *device,\n"
11064 #: ../src/guestfs-actions.pod:4362 ../fish/guestfish-actions.pod:2880
11066 "Returns the MBR type byte (also known as the ID byte) from the numbered "
11067 "partition C<partnum>."
11071 #: ../src/guestfs-actions.pod:4365 ../src/guestfs-actions.pod:4542
11073 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
11074 "undefined results for other partition table types (see "
11075 "C<guestfs_part_get_parttype>)."
11079 #: ../src/guestfs-actions.pod:4373
11080 msgid "guestfs_part_get_parttype"
11084 #: ../src/guestfs-actions.pod:4375
11088 " guestfs_part_get_parttype (guestfs_h *g,\n"
11089 " const char *device);\n"
11094 #: ../src/guestfs-actions.pod:4379 ../fish/guestfish-actions.pod:2891
11096 "This command examines the partition table on C<device> and returns the "
11097 "partition table type (format) being used."
11101 #: ../src/guestfs-actions.pod:4382
11103 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
11104 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
11105 "possible, although unusual. See C<guestfs_part_init> for a full list."
11109 #: ../src/guestfs-actions.pod:4392
11110 msgid "guestfs_part_init"
11114 #: ../src/guestfs-actions.pod:4394
11118 " guestfs_part_init (guestfs_h *g,\n"
11119 " const char *device,\n"
11120 " const char *parttype);\n"
11125 #: ../src/guestfs-actions.pod:4399 ../fish/guestfish-actions.pod:2903
11127 "This creates an empty partition table on C<device> of one of the partition "
11128 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
11129 "(for large disks)."
11133 #: ../src/guestfs-actions.pod:4403
11135 "Initially there are no partitions. Following this, you should call "
11136 "C<guestfs_part_add> for each partition required."
11140 #: ../src/guestfs-actions.pod:4406 ../fish/guestfish-actions.pod:2910
11141 msgid "Possible values for C<parttype> are:"
11145 #: ../src/guestfs-actions.pod:4410 ../fish/guestfish-actions.pod:2914
11146 msgid "B<efi> | B<gpt>"
11150 #: ../src/guestfs-actions.pod:4412 ../fish/guestfish-actions.pod:2916
11151 msgid "Intel EFI / GPT partition table."
11155 #: ../src/guestfs-actions.pod:4414 ../fish/guestfish-actions.pod:2918
11157 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
11158 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
11159 "the C<mbr> format."
11163 #: ../src/guestfs-actions.pod:4418 ../fish/guestfish-actions.pod:2922
11164 msgid "B<mbr> | B<msdos>"
11168 #: ../src/guestfs-actions.pod:4420 ../fish/guestfish-actions.pod:2924
11170 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
11171 "Windows. This partition type will B<only> work for device sizes up to 2 "
11172 "TB. For large disks we recommend using C<gpt>."
11176 #: ../src/guestfs-actions.pod:4427 ../fish/guestfish-actions.pod:2931
11177 msgid "Other partition table types that may work but are not supported include:"
11181 #: ../src/guestfs-actions.pod:4432 ../fish/guestfish-actions.pod:2936
11186 #: ../src/guestfs-actions.pod:4434 ../fish/guestfish-actions.pod:2938
11187 msgid "AIX disk labels."
11191 #: ../src/guestfs-actions.pod:4436 ../fish/guestfish-actions.pod:2940
11192 msgid "B<amiga> | B<rdb>"
11196 #: ../src/guestfs-actions.pod:4438 ../fish/guestfish-actions.pod:2942
11197 msgid "Amiga \"Rigid Disk Block\" format."
11201 #: ../src/guestfs-actions.pod:4440 ../fish/guestfish-actions.pod:2944
11206 #: ../src/guestfs-actions.pod:4442 ../fish/guestfish-actions.pod:2946
11207 msgid "BSD disk labels."
11211 #: ../src/guestfs-actions.pod:4444 ../fish/guestfish-actions.pod:2948
11216 #: ../src/guestfs-actions.pod:4446 ../fish/guestfish-actions.pod:2950
11217 msgid "DASD, used on IBM mainframes."
11221 #: ../src/guestfs-actions.pod:4448 ../fish/guestfish-actions.pod:2952
11226 #: ../src/guestfs-actions.pod:4450 ../fish/guestfish-actions.pod:2954
11227 msgid "MIPS/SGI volumes."
11231 #: ../src/guestfs-actions.pod:4452 ../fish/guestfish-actions.pod:2956
11236 #: ../src/guestfs-actions.pod:4454 ../fish/guestfish-actions.pod:2958
11237 msgid "Old Mac partition format. Modern Macs use C<gpt>."
11241 #: ../src/guestfs-actions.pod:4456 ../fish/guestfish-actions.pod:2960
11246 #: ../src/guestfs-actions.pod:4458 ../fish/guestfish-actions.pod:2962
11247 msgid "NEC PC-98 format, common in Japan apparently."
11251 #: ../src/guestfs-actions.pod:4460 ../fish/guestfish-actions.pod:2964
11256 #: ../src/guestfs-actions.pod:4462 ../fish/guestfish-actions.pod:2966
11257 msgid "Sun disk labels."
11261 #: ../src/guestfs-actions.pod:4470
11262 msgid "guestfs_part_list"
11266 #: ../src/guestfs-actions.pod:4472
11269 " struct guestfs_partition_list *\n"
11270 " guestfs_part_list (guestfs_h *g,\n"
11271 " const char *device);\n"
11276 #: ../src/guestfs-actions.pod:4476 ../fish/guestfish-actions.pod:2974
11278 "This command parses the partition table on C<device> and returns the list of "
11279 "partitions found."
11283 #: ../src/guestfs-actions.pod:4479 ../fish/guestfish-actions.pod:2977
11284 msgid "The fields in the returned structure are:"
11288 #: ../src/guestfs-actions.pod:4483 ../fish/guestfish-actions.pod:2981
11289 msgid "B<part_num>"
11293 #: ../src/guestfs-actions.pod:4485 ../fish/guestfish-actions.pod:2983
11294 msgid "Partition number, counting from 1."
11298 #: ../src/guestfs-actions.pod:4487 ../fish/guestfish-actions.pod:2985
11299 msgid "B<part_start>"
11303 #: ../src/guestfs-actions.pod:4489
11305 "Start of the partition I<in bytes>. To get sectors you have to divide by "
11306 "the device's sector size, see C<guestfs_blockdev_getss>."
11310 #: ../src/guestfs-actions.pod:4492 ../fish/guestfish-actions.pod:2990
11311 msgid "B<part_end>"
11315 #: ../src/guestfs-actions.pod:4494 ../fish/guestfish-actions.pod:2992
11316 msgid "End of the partition in bytes."
11320 #: ../src/guestfs-actions.pod:4496 ../fish/guestfish-actions.pod:2994
11321 msgid "B<part_size>"
11325 #: ../src/guestfs-actions.pod:4498 ../fish/guestfish-actions.pod:2996
11326 msgid "Size of the partition in bytes."
11330 #: ../src/guestfs-actions.pod:4502
11332 "This function returns a C<struct guestfs_partition_list *> (see "
11333 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
11334 "must call C<guestfs_free_partition_list> after use>."
11338 #: ../src/guestfs-actions.pod:4509
11339 msgid "guestfs_part_set_bootable"
11343 #: ../src/guestfs-actions.pod:4511
11347 " guestfs_part_set_bootable (guestfs_h *g,\n"
11348 " const char *device,\n"
11350 " int bootable);\n"
11355 #: ../src/guestfs-actions.pod:4517 ../fish/guestfish-actions.pod:3004
11357 "This sets the bootable flag on partition numbered C<partnum> on device "
11358 "C<device>. Note that partitions are numbered from 1."
11362 #: ../src/guestfs-actions.pod:4520 ../fish/guestfish-actions.pod:3007
11364 "The bootable flag is used by some operating systems (notably Windows) to "
11365 "determine which partition to boot from. It is by no means universally "
11370 #: ../src/guestfs-actions.pod:4528
11371 msgid "guestfs_part_set_mbr_id"
11375 #: ../src/guestfs-actions.pod:4530
11379 " guestfs_part_set_mbr_id (guestfs_h *g,\n"
11380 " const char *device,\n"
11387 #: ../src/guestfs-actions.pod:4536 ../fish/guestfish-actions.pod:3015
11389 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
11390 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
11391 "documentation are in fact hexadecimal numbers, but usually documented "
11392 "without any leading \"0x\" which might be confusing."
11396 #: ../src/guestfs-actions.pod:4550
11397 msgid "guestfs_part_set_name"
11401 #: ../src/guestfs-actions.pod:4552
11405 " guestfs_part_set_name (guestfs_h *g,\n"
11406 " const char *device,\n"
11408 " const char *name);\n"
11413 #: ../src/guestfs-actions.pod:4558 ../fish/guestfish-actions.pod:3029
11415 "This sets the partition name on partition numbered C<partnum> on device "
11416 "C<device>. Note that partitions are numbered from 1."
11420 #: ../src/guestfs-actions.pod:4561 ../fish/guestfish-actions.pod:3032
11422 "The partition name can only be set on certain types of partition table. "
11423 "This works on C<gpt> but not on C<mbr> partitions."
11427 #: ../src/guestfs-actions.pod:4568
11428 msgid "guestfs_part_to_dev"
11432 #: ../src/guestfs-actions.pod:4570
11436 " guestfs_part_to_dev (guestfs_h *g,\n"
11437 " const char *partition);\n"
11442 #: ../src/guestfs-actions.pod:4574 ../fish/guestfish-actions.pod:3039
11444 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
11445 "partition number, returning the device name (eg. \"/dev/sdb\")."
11449 #: ../src/guestfs-actions.pod:4578
11451 "The named partition must exist, for example as a string returned from "
11452 "C<guestfs_list_partitions>."
11456 #: ../src/guestfs-actions.pod:4586
11457 msgid "guestfs_ping_daemon"
11461 #: ../src/guestfs-actions.pod:4588
11465 " guestfs_ping_daemon (guestfs_h *g);\n"
11470 #: ../src/guestfs-actions.pod:4591 ../fish/guestfish-actions.pod:3050
11472 "This is a test probe into the guestfs daemon running inside the qemu "
11473 "subprocess. Calling this function checks that the daemon responds to the "
11474 "ping message, without affecting the daemon or attached block device(s) in "
11479 #: ../src/guestfs-actions.pod:4600
11480 msgid "guestfs_pread"
11484 #: ../src/guestfs-actions.pod:4602
11488 " guestfs_pread (guestfs_h *g,\n"
11489 " const char *path,\n"
11491 " int64_t offset,\n"
11492 " size_t *size_r);\n"
11497 #: ../src/guestfs-actions.pod:4609 ../fish/guestfish-actions.pod:3059
11499 "This command lets you read part of a file. It reads C<count> bytes of the "
11500 "file, starting at C<offset>, from file C<path>."
11504 #: ../src/guestfs-actions.pod:4612 ../src/guestfs-actions.pod:4638 ../fish/guestfish-actions.pod:3062 ../fish/guestfish-actions.pod:3077
11506 "This may read fewer bytes than requested. For further details see the "
11507 "L<pread(2)> system call."
11511 #: ../src/guestfs-actions.pod:4615
11512 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
11516 #: ../src/guestfs-actions.pod:4626
11517 msgid "guestfs_pread_device"
11521 #: ../src/guestfs-actions.pod:4628
11525 " guestfs_pread_device (guestfs_h *g,\n"
11526 " const char *device,\n"
11528 " int64_t offset,\n"
11529 " size_t *size_r);\n"
11534 #: ../src/guestfs-actions.pod:4635 ../fish/guestfish-actions.pod:3074
11536 "This command lets you read part of a file. It reads C<count> bytes of "
11537 "C<device>, starting at C<offset>."
11541 #: ../src/guestfs-actions.pod:4641
11542 msgid "See also C<guestfs_pread>."
11546 #: ../src/guestfs-actions.pod:4650
11547 msgid "(Added in 1.5.21)"
11551 #: ../src/guestfs-actions.pod:4652
11552 msgid "guestfs_pvcreate"
11556 #: ../src/guestfs-actions.pod:4654
11560 " guestfs_pvcreate (guestfs_h *g,\n"
11561 " const char *device);\n"
11566 #: ../src/guestfs-actions.pod:4658 ../fish/guestfish-actions.pod:3089
11568 "This creates an LVM physical volume on the named C<device>, where C<device> "
11569 "should usually be a partition name such as C</dev/sda1>."
11573 #: ../src/guestfs-actions.pod:4666
11574 msgid "guestfs_pvremove"
11578 #: ../src/guestfs-actions.pod:4668
11582 " guestfs_pvremove (guestfs_h *g,\n"
11583 " const char *device);\n"
11588 #: ../src/guestfs-actions.pod:4672 ../fish/guestfish-actions.pod:3097
11590 "This wipes a physical volume C<device> so that LVM will no longer recognise "
11595 #: ../src/guestfs-actions.pod:4675 ../fish/guestfish-actions.pod:3100
11597 "The implementation uses the C<pvremove> command which refuses to wipe "
11598 "physical volumes that contain any volume groups, so you have to remove those "
11603 #: ../src/guestfs-actions.pod:4683
11604 msgid "guestfs_pvresize"
11608 #: ../src/guestfs-actions.pod:4685
11612 " guestfs_pvresize (guestfs_h *g,\n"
11613 " const char *device);\n"
11618 #: ../src/guestfs-actions.pod:4689 ../fish/guestfish-actions.pod:3108
11620 "This resizes (expands or shrinks) an existing LVM physical volume to match "
11621 "the new size of the underlying device."
11625 #: ../src/guestfs-actions.pod:4696
11626 msgid "guestfs_pvresize_size"
11630 #: ../src/guestfs-actions.pod:4698
11634 " guestfs_pvresize_size (guestfs_h *g,\n"
11635 " const char *device,\n"
11636 " int64_t size);\n"
11641 #: ../src/guestfs-actions.pod:4703
11643 "This command is the same as C<guestfs_pvresize> except that it allows you to "
11644 "specify the new size (in bytes) explicitly."
11648 #: ../src/guestfs-actions.pod:4710
11649 msgid "guestfs_pvs"
11653 #: ../src/guestfs-actions.pod:4712
11657 " guestfs_pvs (guestfs_h *g);\n"
11662 #: ../src/guestfs-actions.pod:4715 ../fish/guestfish-actions.pod:3122
11664 "List all the physical volumes detected. This is the equivalent of the "
11665 "L<pvs(8)> command."
11669 #: ../src/guestfs-actions.pod:4718 ../fish/guestfish-actions.pod:3125
11671 "This returns a list of just the device names that contain PVs "
11672 "(eg. C</dev/sda2>)."
11676 #: ../src/guestfs-actions.pod:4721
11677 msgid "See also C<guestfs_pvs_full>."
11681 #: ../src/guestfs-actions.pod:4729
11682 msgid "guestfs_pvs_full"
11686 #: ../src/guestfs-actions.pod:4731
11689 " struct guestfs_lvm_pv_list *\n"
11690 " guestfs_pvs_full (guestfs_h *g);\n"
11695 #: ../src/guestfs-actions.pod:4734 ../fish/guestfish-actions.pod:3134
11697 "List all the physical volumes detected. This is the equivalent of the "
11698 "L<pvs(8)> command. The \"full\" version includes all fields."
11702 #: ../src/guestfs-actions.pod:4737
11704 "This function returns a C<struct guestfs_lvm_pv_list *> (see "
11705 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
11706 "must call C<guestfs_free_lvm_pv_list> after use>."
11710 #: ../src/guestfs-actions.pod:4744
11711 msgid "guestfs_pvuuid"
11715 #: ../src/guestfs-actions.pod:4746
11719 " guestfs_pvuuid (guestfs_h *g,\n"
11720 " const char *device);\n"
11725 #: ../src/guestfs-actions.pod:4750 ../fish/guestfish-actions.pod:3141
11726 msgid "This command returns the UUID of the LVM PV C<device>."
11730 #: ../src/guestfs-actions.pod:4757
11731 msgid "guestfs_pwrite"
11735 #: ../src/guestfs-actions.pod:4759
11739 " guestfs_pwrite (guestfs_h *g,\n"
11740 " const char *path,\n"
11741 " const char *content,\n"
11742 " size_t content_size,\n"
11743 " int64_t offset);\n"
11748 #: ../src/guestfs-actions.pod:4766 ../fish/guestfish-actions.pod:3147
11750 "This command writes to part of a file. It writes the data buffer C<content> "
11751 "to the file C<path> starting at offset C<offset>."
11755 #: ../src/guestfs-actions.pod:4769 ../fish/guestfish-actions.pod:3150
11757 "This command implements the L<pwrite(2)> system call, and like that system "
11758 "call it may not write the full data requested. The return value is the "
11759 "number of bytes that were actually written to the file. This could even be "
11760 "0, although short writes are unlikely for regular files in ordinary "
11765 #: ../src/guestfs-actions.pod:4775
11766 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
11770 #: ../src/guestfs-actions.pod:4784
11771 msgid "guestfs_pwrite_device"
11775 #: ../src/guestfs-actions.pod:4786
11779 " guestfs_pwrite_device (guestfs_h *g,\n"
11780 " const char *device,\n"
11781 " const char *content,\n"
11782 " size_t content_size,\n"
11783 " int64_t offset);\n"
11788 #: ../src/guestfs-actions.pod:4793 ../fish/guestfish-actions.pod:3165
11790 "This command writes to part of a device. It writes the data buffer "
11791 "C<content> to C<device> starting at offset C<offset>."
11795 #: ../src/guestfs-actions.pod:4796 ../fish/guestfish-actions.pod:3168
11797 "This command implements the L<pwrite(2)> system call, and like that system "
11798 "call it may not write the full data requested (although short writes to disk "
11799 "devices and partitions are probably impossible with standard Linux kernels)."
11803 #: ../src/guestfs-actions.pod:4801
11804 msgid "See also C<guestfs_pwrite>."
11808 #: ../src/guestfs-actions.pod:4808
11809 msgid "(Added in 1.5.20)"
11813 #: ../src/guestfs-actions.pod:4810
11814 msgid "guestfs_read_file"
11818 #: ../src/guestfs-actions.pod:4812
11822 " guestfs_read_file (guestfs_h *g,\n"
11823 " const char *path,\n"
11824 " size_t *size_r);\n"
11829 #: ../src/guestfs-actions.pod:4817 ../fish/guestfish-actions.pod:3182
11830 msgid "This calls returns the contents of the file C<path> as a buffer."
11834 #: ../src/guestfs-actions.pod:4820
11836 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
11837 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
11838 "function is limited in the total size of file that can be handled."
11842 #: ../src/guestfs-actions.pod:4832
11843 msgid "(Added in 1.0.63)"
11847 #: ../src/guestfs-actions.pod:4834
11848 msgid "guestfs_read_lines"
11852 #: ../src/guestfs-actions.pod:4836
11856 " guestfs_read_lines (guestfs_h *g,\n"
11857 " const char *path);\n"
11862 #: ../src/guestfs-actions.pod:4842 ../fish/guestfish-actions.pod:3199
11864 "The file contents are returned as a list of lines. Trailing C<LF> and "
11865 "C<CRLF> character sequences are I<not> returned."
11869 #: ../src/guestfs-actions.pod:4845
11871 "Note that this function cannot correctly handle binary files (specifically, "
11872 "files containing C<\\0> character which is treated as end of line). For "
11873 "those you need to use the C<guestfs_read_file> function which has a more "
11874 "complex interface."
11878 #: ../src/guestfs-actions.pod:4856
11879 msgid "guestfs_readdir"
11883 #: ../src/guestfs-actions.pod:4858
11886 " struct guestfs_dirent_list *\n"
11887 " guestfs_readdir (guestfs_h *g,\n"
11888 " const char *dir);\n"
11893 #: ../src/guestfs-actions.pod:4862 ../fish/guestfish-actions.pod:3211
11894 msgid "This returns the list of directory entries in directory C<dir>."
11898 #: ../src/guestfs-actions.pod:4864 ../fish/guestfish-actions.pod:3213
11900 "All entries in the directory are returned, including C<.> and C<..>. The "
11901 "entries are I<not> sorted, but returned in the same order as the underlying "
11906 #: ../src/guestfs-actions.pod:4868 ../fish/guestfish-actions.pod:3217
11908 "Also this call returns basic file type information about each file. The "
11909 "C<ftyp> field will contain one of the following characters:"
11913 #: ../src/guestfs-actions.pod:4873 ../fish/guestfish-actions.pod:3222
11918 #: ../src/guestfs-actions.pod:4875 ../fish/guestfish-actions.pod:3224
11919 msgid "Block special"
11923 #: ../src/guestfs-actions.pod:4877 ../fish/guestfish-actions.pod:3226
11928 #: ../src/guestfs-actions.pod:4879 ../fish/guestfish-actions.pod:3228
11929 msgid "Char special"
11933 #: ../src/guestfs-actions.pod:4881 ../fish/guestfish-actions.pod:3230
11938 #: ../src/guestfs-actions.pod:4883 ../fish/guestfish-actions.pod:3232
11943 #: ../src/guestfs-actions.pod:4885 ../fish/guestfish-actions.pod:3234
11948 #: ../src/guestfs-actions.pod:4887 ../fish/guestfish-actions.pod:3236
11949 msgid "FIFO (named pipe)"
11953 #: ../src/guestfs-actions.pod:4889 ../fish/guestfish-actions.pod:3238
11958 #: ../src/guestfs-actions.pod:4891 ../fish/guestfish-actions.pod:3240
11959 msgid "Symbolic link"
11963 #: ../src/guestfs-actions.pod:4893 ../fish/guestfish-actions.pod:3242
11968 #: ../src/guestfs-actions.pod:4895 ../fish/guestfish-actions.pod:3244
11969 msgid "Regular file"
11973 #: ../src/guestfs-actions.pod:4897 ../fish/guestfish-actions.pod:3246
11978 #: ../src/guestfs-actions.pod:4899 ../fish/guestfish-actions.pod:3248
11983 #: ../src/guestfs-actions.pod:4901 ../fish/guestfish-actions.pod:3250
11988 #: ../src/guestfs-actions.pod:4903 ../fish/guestfish-actions.pod:3252
11989 msgid "Unknown file type"
11993 #: ../src/guestfs-actions.pod:4905 ../fish/guestfish-actions.pod:3254
11998 #: ../src/guestfs-actions.pod:4907 ../fish/guestfish-actions.pod:3256
11999 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
12003 #: ../src/guestfs-actions.pod:4912
12005 "This function is primarily intended for use by programs. To get a simple "
12006 "list of names, use C<guestfs_ls>. To get a printable directory for human "
12007 "consumption, use C<guestfs_ll>."
12011 #: ../src/guestfs-actions.pod:4916
12013 "This function returns a C<struct guestfs_dirent_list *> (see "
12014 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
12015 "must call C<guestfs_free_dirent_list> after use>."
12019 #: ../src/guestfs-actions.pod:4923
12020 msgid "guestfs_readlink"
12024 #: ../src/guestfs-actions.pod:4925
12028 " guestfs_readlink (guestfs_h *g,\n"
12029 " const char *path);\n"
12034 #: ../src/guestfs-actions.pod:4929 ../fish/guestfish-actions.pod:3269
12035 msgid "This command reads the target of a symbolic link."
12039 #: ../src/guestfs-actions.pod:4936
12040 msgid "guestfs_readlinklist"
12044 #: ../src/guestfs-actions.pod:4938
12048 " guestfs_readlinklist (guestfs_h *g,\n"
12049 " const char *path,\n"
12050 " char *const *names);\n"
12055 #: ../src/guestfs-actions.pod:4943 ../fish/guestfish-actions.pod:3275
12057 "This call allows you to do a C<readlink> operation on multiple files, where "
12058 "all files are in the directory C<path>. C<names> is the list of files from "
12063 #: ../src/guestfs-actions.pod:4947 ../fish/guestfish-actions.pod:3279
12065 "On return you get a list of strings, with a one-to-one correspondence to the "
12066 "C<names> list. Each string is the value of the symbolic link."
12070 #: ../src/guestfs-actions.pod:4951 ../fish/guestfish-actions.pod:3283
12072 "If the C<readlink(2)> operation fails on any name, then the corresponding "
12073 "result string is the empty string C<\"\">. However the whole operation is "
12074 "completed even if there were C<readlink(2)> errors, and so you can call this "
12075 "function with names where you don't know if they are symbolic links already "
12076 "(albeit slightly less efficient)."
12080 #: ../src/guestfs-actions.pod:4958 ../fish/guestfish-actions.pod:3290
12082 "This call is intended for programs that want to efficiently list a directory "
12083 "contents without making many round-trips. Very long directory listings "
12084 "might cause the protocol message size to be exceeded, causing this call to "
12085 "fail. The caller must split up such requests into smaller groups of names."
12089 #: ../src/guestfs-actions.pod:4971
12090 msgid "guestfs_realpath"
12094 #: ../src/guestfs-actions.pod:4973
12098 " guestfs_realpath (guestfs_h *g,\n"
12099 " const char *path);\n"
12104 #: ../src/guestfs-actions.pod:4977 ../fish/guestfish-actions.pod:3301
12106 "Return the canonicalized absolute pathname of C<path>. The returned path "
12107 "has no C<.>, C<..> or symbolic link path elements."
12111 #: ../src/guestfs-actions.pod:4985
12112 msgid "guestfs_removexattr"
12116 #: ../src/guestfs-actions.pod:4987
12120 " guestfs_removexattr (guestfs_h *g,\n"
12121 " const char *xattr,\n"
12122 " const char *path);\n"
12127 #: ../src/guestfs-actions.pod:4992 ../fish/guestfish-actions.pod:3308
12128 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
12132 #: ../src/guestfs-actions.pod:4995
12133 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
12137 #: ../src/guestfs-actions.pod:5001
12138 msgid "guestfs_resize2fs"
12142 #: ../src/guestfs-actions.pod:5003
12146 " guestfs_resize2fs (guestfs_h *g,\n"
12147 " const char *device);\n"
12152 #: ../src/guestfs-actions.pod:5007 ../fish/guestfish-actions.pod:3317
12154 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
12155 "underlying device."
12159 #: ../src/guestfs-actions.pod:5010
12161 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
12162 "C<device> before calling this command. For unknown reasons C<resize2fs> "
12163 "sometimes gives an error about this and sometimes not. In any case, it is "
12164 "always safe to call C<guestfs_e2fsck_f> before calling this function."
12168 #: ../src/guestfs-actions.pod:5020
12169 msgid "guestfs_resize2fs_size"
12173 #: ../src/guestfs-actions.pod:5022
12177 " guestfs_resize2fs_size (guestfs_h *g,\n"
12178 " const char *device,\n"
12179 " int64_t size);\n"
12184 #: ../src/guestfs-actions.pod:5027
12186 "This command is the same as C<guestfs_resize2fs> except that it allows you "
12187 "to specify the new size (in bytes) explicitly."
12191 #: ../src/guestfs-actions.pod:5034
12196 #: ../src/guestfs-actions.pod:5036
12200 " guestfs_rm (guestfs_h *g,\n"
12201 " const char *path);\n"
12206 #: ../src/guestfs-actions.pod:5040 ../fish/guestfish-actions.pod:3337
12207 msgid "Remove the single file C<path>."
12211 #: ../src/guestfs-actions.pod:5046
12212 msgid "guestfs_rm_rf"
12216 #: ../src/guestfs-actions.pod:5048
12220 " guestfs_rm_rf (guestfs_h *g,\n"
12221 " const char *path);\n"
12226 #: ../src/guestfs-actions.pod:5052 ../fish/guestfish-actions.pod:3343
12228 "Remove the file or directory C<path>, recursively removing the contents if "
12229 "its a directory. This is like the C<rm -rf> shell command."
12233 #: ../src/guestfs-actions.pod:5060
12234 msgid "guestfs_rmdir"
12238 #: ../src/guestfs-actions.pod:5062
12242 " guestfs_rmdir (guestfs_h *g,\n"
12243 " const char *path);\n"
12248 #: ../src/guestfs-actions.pod:5066 ../fish/guestfish-actions.pod:3351
12249 msgid "Remove the single directory C<path>."
12253 #: ../src/guestfs-actions.pod:5072
12254 msgid "guestfs_rmmountpoint"
12258 #: ../src/guestfs-actions.pod:5074
12262 " guestfs_rmmountpoint (guestfs_h *g,\n"
12263 " const char *exemptpath);\n"
12268 #: ../src/guestfs-actions.pod:5078
12270 "This calls removes a mountpoint that was previously created with "
12271 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
12275 #: ../src/guestfs-actions.pod:5086
12276 msgid "guestfs_scrub_device"
12280 #: ../src/guestfs-actions.pod:5088
12284 " guestfs_scrub_device (guestfs_h *g,\n"
12285 " const char *device);\n"
12290 #: ../src/guestfs-actions.pod:5092 ../fish/guestfish-actions.pod:3365
12292 "This command writes patterns over C<device> to make data retrieval more "
12297 #: ../src/guestfs-actions.pod:5095 ../src/guestfs-actions.pod:5116 ../src/guestfs-actions.pod:5135 ../fish/guestfish-actions.pod:3368 ../fish/guestfish-actions.pod:3383 ../fish/guestfish-actions.pod:3396
12299 "It is an interface to the L<scrub(1)> program. See that manual page for "
12304 #: ../src/guestfs-actions.pod:5103 ../src/guestfs-actions.pod:5121 ../src/guestfs-actions.pod:5140
12305 msgid "(Added in 1.0.52)"
12309 #: ../src/guestfs-actions.pod:5105
12310 msgid "guestfs_scrub_file"
12314 #: ../src/guestfs-actions.pod:5107
12318 " guestfs_scrub_file (guestfs_h *g,\n"
12319 " const char *file);\n"
12324 #: ../src/guestfs-actions.pod:5111 ../fish/guestfish-actions.pod:3378
12326 "This command writes patterns over a file to make data retrieval more "
12331 #: ../src/guestfs-actions.pod:5114 ../fish/guestfish-actions.pod:3381
12332 msgid "The file is I<removed> after scrubbing."
12336 #: ../src/guestfs-actions.pod:5123
12337 msgid "guestfs_scrub_freespace"
12341 #: ../src/guestfs-actions.pod:5125
12345 " guestfs_scrub_freespace (guestfs_h *g,\n"
12346 " const char *dir);\n"
12351 #: ../src/guestfs-actions.pod:5129
12353 "This command creates the directory C<dir> and then fills it with files until "
12354 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
12355 "and deletes them. The intention is to scrub any free space on the partition "
12356 "containing C<dir>."
12360 #: ../src/guestfs-actions.pod:5142
12361 msgid "guestfs_set_append"
12365 #: ../src/guestfs-actions.pod:5144
12369 " guestfs_set_append (guestfs_h *g,\n"
12370 " const char *append);\n"
12375 #: ../src/guestfs-actions.pod:5148 ../fish/guestfish-actions.pod:3405
12377 "This function is used to add additional options to the guest kernel command "
12382 #: ../src/guestfs-actions.pod:5151 ../fish/guestfish-actions.pod:3408
12384 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
12385 "environment variable."
12389 #: ../src/guestfs-actions.pod:5154 ../fish/guestfish-actions.pod:3411
12391 "Setting C<append> to C<NULL> means I<no> additional options are passed "
12392 "(libguestfs always adds a few of its own)."
12396 #: ../src/guestfs-actions.pod:5161
12397 msgid "guestfs_set_autosync"
12401 #: ../src/guestfs-actions.pod:5163
12405 " guestfs_set_autosync (guestfs_h *g,\n"
12406 " int autosync);\n"
12411 #: ../src/guestfs-actions.pod:5167
12413 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
12414 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
12415 "the handle is closed (also if the program exits without closing handles)."
12419 #: ../src/guestfs-actions.pod:5172 ../fish/guestfish-actions.pod:3425
12421 "This is enabled by default (since libguestfs 1.5.24, previously it was "
12422 "disabled by default)."
12426 #: ../src/guestfs-actions.pod:5179
12427 msgid "guestfs_set_direct"
12431 #: ../src/guestfs-actions.pod:5181
12435 " guestfs_set_direct (guestfs_h *g,\n"
12441 #: ../src/guestfs-actions.pod:5185 ../fish/guestfish-actions.pod:3434
12443 "If the direct appliance mode flag is enabled, then stdin and stdout are "
12444 "passed directly through to the appliance once it is launched."
12448 #: ../src/guestfs-actions.pod:5189
12450 "One consequence of this is that log messages aren't caught by the library "
12451 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
12456 #: ../src/guestfs-actions.pod:5193 ../fish/guestfish-actions.pod:3442
12457 msgid "You probably don't want to use this unless you know what you are doing."
12461 #: ../src/guestfs-actions.pod:5196 ../fish/guestfish-actions.pod:3445
12462 msgid "The default is disabled."
12466 #: ../src/guestfs-actions.pod:5202
12467 msgid "guestfs_set_e2label"
12471 #: ../src/guestfs-actions.pod:5204
12475 " guestfs_set_e2label (guestfs_h *g,\n"
12476 " const char *device,\n"
12477 " const char *label);\n"
12482 #: ../src/guestfs-actions.pod:5209 ../fish/guestfish-actions.pod:3451
12484 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
12485 "C<label>. Filesystem labels are limited to 16 characters."
12489 #: ../src/guestfs-actions.pod:5213
12491 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
12492 "the existing label on a filesystem."
12496 #: ../src/guestfs-actions.pod:5220
12497 msgid "guestfs_set_e2uuid"
12501 #: ../src/guestfs-actions.pod:5222
12505 " guestfs_set_e2uuid (guestfs_h *g,\n"
12506 " const char *device,\n"
12507 " const char *uuid);\n"
12512 #: ../src/guestfs-actions.pod:5227 ../fish/guestfish-actions.pod:3462
12514 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
12515 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
12516 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
12520 #: ../src/guestfs-actions.pod:5232
12522 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
12523 "the existing UUID of a filesystem."
12527 #: ../src/guestfs-actions.pod:5239
12528 msgid "guestfs_set_memsize"
12532 #: ../src/guestfs-actions.pod:5241
12536 " guestfs_set_memsize (guestfs_h *g,\n"
12542 #: ../src/guestfs-actions.pod:5245
12544 "This sets the memory size in megabytes allocated to the qemu subprocess. "
12545 "This only has any effect if called before C<guestfs_launch>."
12549 #: ../src/guestfs-actions.pod:5249 ../fish/guestfish-actions.pod:3480
12551 "You can also change this by setting the environment variable "
12552 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
12556 #: ../src/guestfs-actions.pod:5260
12557 msgid "guestfs_set_network"
12561 #: ../src/guestfs-actions.pod:5262
12565 " guestfs_set_network (guestfs_h *g,\n"
12571 #: ../src/guestfs-actions.pod:5266 ../fish/guestfish-actions.pod:3493
12573 "If C<network> is true, then the network is enabled in the libguestfs "
12574 "appliance. The default is false."
12578 #: ../src/guestfs-actions.pod:5269 ../fish/guestfish-actions.pod:3496
12580 "This affects whether commands are able to access the network (see "
12581 "L<guestfs(3)/RUNNING COMMANDS>)."
12585 #: ../src/guestfs-actions.pod:5272
12587 "You must call this before calling C<guestfs_launch>, otherwise it has no "
12592 #: ../src/guestfs-actions.pod:5279
12593 msgid "guestfs_set_path"
12597 #: ../src/guestfs-actions.pod:5281
12601 " guestfs_set_path (guestfs_h *g,\n"
12602 " const char *searchpath);\n"
12607 #: ../src/guestfs-actions.pod:5285 ../fish/guestfish-actions.pod:3508
12608 msgid "Set the path that libguestfs searches for kernel and initrd.img."
12612 #: ../src/guestfs-actions.pod:5287 ../fish/guestfish-actions.pod:3510
12614 "The default is C<$libdir/guestfs> unless overridden by setting "
12615 "C<LIBGUESTFS_PATH> environment variable."
12619 #: ../src/guestfs-actions.pod:5290 ../fish/guestfish-actions.pod:3513
12620 msgid "Setting C<path> to C<NULL> restores the default path."
12624 #: ../src/guestfs-actions.pod:5296
12625 msgid "guestfs_set_qemu"
12629 #: ../src/guestfs-actions.pod:5298
12633 " guestfs_set_qemu (guestfs_h *g,\n"
12634 " const char *qemu);\n"
12639 #: ../src/guestfs-actions.pod:5302 ../fish/guestfish-actions.pod:3521
12640 msgid "Set the qemu binary that we will use."
12644 #: ../src/guestfs-actions.pod:5304 ../fish/guestfish-actions.pod:3523
12645 msgid "The default is chosen when the library was compiled by the configure script."
12649 #: ../src/guestfs-actions.pod:5307 ../fish/guestfish-actions.pod:3526
12651 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
12656 #: ../src/guestfs-actions.pod:5310 ../fish/guestfish-actions.pod:3529
12657 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
12661 #: ../src/guestfs-actions.pod:5312 ../fish/guestfish-actions.pod:3531
12663 "Note that you should call this function as early as possible after creating "
12664 "the handle. This is because some pre-launch operations depend on testing "
12665 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
12666 "don't retest features, and so you might see inconsistent results. Using the "
12667 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
12668 "the qemu binary at the same time as the handle is created."
12672 #: ../src/guestfs-actions.pod:5324
12673 msgid "guestfs_set_recovery_proc"
12677 #: ../src/guestfs-actions.pod:5326
12681 " guestfs_set_recovery_proc (guestfs_h *g,\n"
12682 " int recoveryproc);\n"
12687 #: ../src/guestfs-actions.pod:5330
12689 "If this is called with the parameter C<false> then C<guestfs_launch> does "
12690 "not create a recovery process. The purpose of the recovery process is to "
12691 "stop runaway qemu processes in the case where the main program aborts "
12696 #: ../src/guestfs-actions.pod:5335
12698 "This only has any effect if called before C<guestfs_launch>, and the default "
12703 #: ../src/guestfs-actions.pod:5338 ../fish/guestfish-actions.pod:3553
12705 "About the only time when you would want to disable this is if the main "
12706 "process will fork itself into the background (\"daemonize\" itself). In "
12707 "this case the recovery process thinks that the main program has disappeared "
12708 "and so kills qemu, which is not very helpful."
12712 #: ../src/guestfs-actions.pod:5348
12713 msgid "guestfs_set_selinux"
12717 #: ../src/guestfs-actions.pod:5350
12721 " guestfs_set_selinux (guestfs_h *g,\n"
12727 #: ../src/guestfs-actions.pod:5354 ../fish/guestfish-actions.pod:3565
12729 "This sets the selinux flag that is passed to the appliance at boot time. "
12730 "The default is C<selinux=0> (disabled)."
12734 #: ../src/guestfs-actions.pod:5357 ../fish/guestfish-actions.pod:3568
12736 "Note that if SELinux is enabled, it is always in Permissive mode "
12737 "(C<enforcing=0>)."
12741 #: ../src/guestfs-actions.pod:5367
12742 msgid "guestfs_set_trace"
12746 #: ../src/guestfs-actions.pod:5369
12750 " guestfs_set_trace (guestfs_h *g,\n"
12756 #: ../src/guestfs-actions.pod:5373 ../fish/guestfish-actions.pod:3580
12758 "If the command trace flag is set to 1, then commands are printed on stderr "
12759 "before they are executed in a format which is very similar to the one used "
12760 "by guestfish. In other words, you can run a program with this enabled, and "
12761 "you will get out a script which you can feed to guestfish to perform the "
12762 "same set of actions."
12766 #: ../src/guestfs-actions.pod:5380 ../fish/guestfish-actions.pod:3587
12768 "If you want to trace C API calls into libguestfs (and other libraries) then "
12769 "possibly a better way is to use the external ltrace(1) command."
12773 #: ../src/guestfs-actions.pod:5384 ../fish/guestfish-actions.pod:3591
12775 "Command traces are disabled unless the environment variable "
12776 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
12780 #: ../src/guestfs-actions.pod:5391
12781 msgid "guestfs_set_verbose"
12785 #: ../src/guestfs-actions.pod:5393
12789 " guestfs_set_verbose (guestfs_h *g,\n"
12795 #: ../src/guestfs-actions.pod:5397 ../fish/guestfish-actions.pod:3600
12796 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
12800 #: ../src/guestfs-actions.pod:5399 ../fish/guestfish-actions.pod:3602
12802 "Verbose messages are disabled unless the environment variable "
12803 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
12807 #: ../src/guestfs-actions.pod:5406
12808 msgid "guestfs_setcon"
12812 #: ../src/guestfs-actions.pod:5408
12816 " guestfs_setcon (guestfs_h *g,\n"
12817 " const char *context);\n"
12822 #: ../src/guestfs-actions.pod:5412 ../fish/guestfish-actions.pod:3609
12824 "This sets the SELinux security context of the daemon to the string "
12829 #: ../src/guestfs-actions.pod:5415 ../fish/guestfish-actions.pod:3612
12830 msgid "See the documentation about SELINUX in L<guestfs(3)>."
12834 #: ../src/guestfs-actions.pod:5421
12835 msgid "guestfs_setxattr"
12839 #: ../src/guestfs-actions.pod:5423
12843 " guestfs_setxattr (guestfs_h *g,\n"
12844 " const char *xattr,\n"
12845 " const char *val,\n"
12847 " const char *path);\n"
12852 #: ../src/guestfs-actions.pod:5430 ../fish/guestfish-actions.pod:3618
12854 "This call sets the extended attribute named C<xattr> of the file C<path> to "
12855 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
12859 #: ../src/guestfs-actions.pod:5434
12860 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
12864 #: ../src/guestfs-actions.pod:5440
12865 msgid "guestfs_sfdisk"
12869 #: ../src/guestfs-actions.pod:5442
12873 " guestfs_sfdisk (guestfs_h *g,\n"
12874 " const char *device,\n"
12878 " char *const *lines);\n"
12883 #: ../src/guestfs-actions.pod:5450 ../fish/guestfish-actions.pod:3628
12885 "This is a direct interface to the L<sfdisk(8)> program for creating "
12886 "partitions on block devices."
12890 #: ../src/guestfs-actions.pod:5453 ../fish/guestfish-actions.pod:3631
12891 msgid "C<device> should be a block device, for example C</dev/sda>."
12895 #: ../src/guestfs-actions.pod:5455 ../fish/guestfish-actions.pod:3633
12897 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
12898 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
12899 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
12900 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
12901 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
12902 "the kernel) cannot work out the right geometry and you will need to tell it."
12906 #: ../src/guestfs-actions.pod:5463 ../fish/guestfish-actions.pod:3641
12908 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
12909 "refer to the L<sfdisk(8)> manpage."
12913 #: ../src/guestfs-actions.pod:5466 ../fish/guestfish-actions.pod:3644
12915 "To create a single partition occupying the whole disk, you would pass "
12916 "C<lines> as a single element list, when the single element being the string "
12921 #: ../src/guestfs-actions.pod:5470
12922 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
12926 #: ../src/guestfs-actions.pod:5480
12927 msgid "guestfs_sfdiskM"
12931 #: ../src/guestfs-actions.pod:5482
12935 " guestfs_sfdiskM (guestfs_h *g,\n"
12936 " const char *device,\n"
12937 " char *const *lines);\n"
12942 #: ../src/guestfs-actions.pod:5487
12944 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
12945 "partition sizes are specified in megabytes only (rounded to the nearest "
12946 "cylinder) and you don't need to specify the cyls, heads and sectors "
12947 "parameters which were rarely if ever used anyway."
12951 #: ../src/guestfs-actions.pod:5493
12953 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
12954 "C<guestfs_part_disk>"
12958 #: ../src/guestfs-actions.pod:5503
12959 msgid "guestfs_sfdisk_N"
12963 #: ../src/guestfs-actions.pod:5505
12967 " guestfs_sfdisk_N (guestfs_h *g,\n"
12968 " const char *device,\n"
12973 " const char *line);\n"
12978 #: ../src/guestfs-actions.pod:5514 ../fish/guestfish-actions.pod:3674
12980 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
12981 "(note: C<n> counts from 1)."
12985 #: ../src/guestfs-actions.pod:5517
12987 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
12988 "for the cyls/heads/sectors parameters."
12992 #: ../src/guestfs-actions.pod:5520
12993 msgid "See also: C<guestfs_part_add>"
12997 #: ../src/guestfs-actions.pod:5529
12998 msgid "guestfs_sfdisk_disk_geometry"
13002 #: ../src/guestfs-actions.pod:5531
13006 " guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
13007 " const char *device);\n"
13012 #: ../src/guestfs-actions.pod:5535
13014 "This displays the disk geometry of C<device> read from the partition table. "
13015 "Especially in the case where the underlying block device has been resized, "
13016 "this can be different from the kernel's idea of the geometry (see "
13017 "C<guestfs_sfdisk_kernel_geometry>)."
13021 #: ../src/guestfs-actions.pod:5540 ../src/guestfs-actions.pod:5556 ../fish/guestfish-actions.pod:3694 ../fish/guestfish-actions.pod:3703
13022 msgid "The result is in human-readable format, and not designed to be parsed."
13026 #: ../src/guestfs-actions.pod:5548
13027 msgid "guestfs_sfdisk_kernel_geometry"
13031 #: ../src/guestfs-actions.pod:5550
13035 " guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
13036 " const char *device);\n"
13041 #: ../src/guestfs-actions.pod:5554 ../fish/guestfish-actions.pod:3701
13042 msgid "This displays the kernel's idea of the geometry of C<device>."
13046 #: ../src/guestfs-actions.pod:5564
13047 msgid "guestfs_sfdisk_l"
13051 #: ../src/guestfs-actions.pod:5566
13055 " guestfs_sfdisk_l (guestfs_h *g,\n"
13056 " const char *device);\n"
13061 #: ../src/guestfs-actions.pod:5570 ../fish/guestfish-actions.pod:3710
13063 "This displays the partition table on C<device>, in the human-readable output "
13064 "of the L<sfdisk(8)> command. It is not intended to be parsed."
13068 #: ../src/guestfs-actions.pod:5574
13069 msgid "See also: C<guestfs_part_list>"
13073 #: ../src/guestfs-actions.pod:5581
13078 #: ../src/guestfs-actions.pod:5583
13082 " guestfs_sh (guestfs_h *g,\n"
13083 " const char *command);\n"
13088 #: ../src/guestfs-actions.pod:5587 ../fish/guestfish-actions.pod:3720
13090 "This call runs a command from the guest filesystem via the guest's "
13095 #: ../src/guestfs-actions.pod:5590
13096 msgid "This is like C<guestfs_command>, but passes the command to:"
13100 #: ../src/guestfs-actions.pod:5592 ../fish/guestfish-actions.pod:3725
13103 " /bin/sh -c \"command\"\n"
13108 #: ../src/guestfs-actions.pod:5594 ../fish/guestfish-actions.pod:3727
13110 "Depending on the guest's shell, this usually results in wildcards being "
13111 "expanded, shell expressions being interpolated and so on."
13115 #: ../src/guestfs-actions.pod:5598
13116 msgid "All the provisos about C<guestfs_command> apply to this call."
13120 #: ../src/guestfs-actions.pod:5605
13121 msgid "guestfs_sh_lines"
13125 #: ../src/guestfs-actions.pod:5607
13129 " guestfs_sh_lines (guestfs_h *g,\n"
13130 " const char *command);\n"
13135 #: ../src/guestfs-actions.pod:5611
13137 "This is the same as C<guestfs_sh>, but splits the result into a list of "
13142 #: ../src/guestfs-actions.pod:5614
13143 msgid "See also: C<guestfs_command_lines>"
13147 #: ../src/guestfs-actions.pod:5622
13148 msgid "guestfs_sleep"
13152 #: ../src/guestfs-actions.pod:5624
13156 " guestfs_sleep (guestfs_h *g,\n"
13162 #: ../src/guestfs-actions.pod:5628 ../fish/guestfish-actions.pod:3746
13163 msgid "Sleep for C<secs> seconds."
13167 #: ../src/guestfs-actions.pod:5632
13168 msgid "(Added in 1.0.41)"
13172 #: ../src/guestfs-actions.pod:5634 ../src/guestfs-structs.pod:109
13173 msgid "guestfs_stat"
13177 #: ../src/guestfs-actions.pod:5636
13180 " struct guestfs_stat *\n"
13181 " guestfs_stat (guestfs_h *g,\n"
13182 " const char *path);\n"
13187 #: ../src/guestfs-actions.pod:5642 ../fish/guestfish-actions.pod:3754
13188 msgid "This is the same as the C<stat(2)> system call."
13192 #: ../src/guestfs-actions.pod:5650 ../src/guestfs-structs.pod:135
13193 msgid "guestfs_statvfs"
13197 #: ../src/guestfs-actions.pod:5652
13200 " struct guestfs_statvfs *\n"
13201 " guestfs_statvfs (guestfs_h *g,\n"
13202 " const char *path);\n"
13207 #: ../src/guestfs-actions.pod:5656 ../fish/guestfish-actions.pod:3760
13209 "Returns file system statistics for any mounted file system. C<path> should "
13210 "be a file or directory in the mounted file system (typically it is the mount "
13211 "point itself, but it doesn't need to be)."
13215 #: ../src/guestfs-actions.pod:5660 ../fish/guestfish-actions.pod:3764
13216 msgid "This is the same as the C<statvfs(2)> system call."
13220 #: ../src/guestfs-actions.pod:5662
13222 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
13223 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
13227 #: ../src/guestfs-actions.pod:5668
13228 msgid "guestfs_strings"
13232 #: ../src/guestfs-actions.pod:5670
13236 " guestfs_strings (guestfs_h *g,\n"
13237 " const char *path);\n"
13242 #: ../src/guestfs-actions.pod:5674 ../fish/guestfish-actions.pod:3770
13244 "This runs the L<strings(1)> command on a file and returns the list of "
13245 "printable strings found."
13249 #: ../src/guestfs-actions.pod:5686
13250 msgid "guestfs_strings_e"
13254 #: ../src/guestfs-actions.pod:5688
13258 " guestfs_strings_e (guestfs_h *g,\n"
13259 " const char *encoding,\n"
13260 " const char *path);\n"
13265 #: ../src/guestfs-actions.pod:5693
13267 "This is like the C<guestfs_strings> command, but allows you to specify the "
13268 "encoding of strings that are looked for in the source file C<path>."
13272 #: ../src/guestfs-actions.pod:5697 ../fish/guestfish-actions.pod:3784
13273 msgid "Allowed encodings are:"
13277 #: ../src/guestfs-actions.pod:5701 ../fish/guestfish-actions.pod:3788
13282 #: ../src/guestfs-actions.pod:5703
13284 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
13285 "ISO-8859-X (this is what C<guestfs_strings> uses)."
13289 #: ../src/guestfs-actions.pod:5706 ../fish/guestfish-actions.pod:3793
13294 #: ../src/guestfs-actions.pod:5708 ../fish/guestfish-actions.pod:3795
13295 msgid "Single 8-bit-byte characters."
13299 #: ../src/guestfs-actions.pod:5710 ../fish/guestfish-actions.pod:3797
13304 #: ../src/guestfs-actions.pod:5712 ../fish/guestfish-actions.pod:3799
13305 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
13309 #: ../src/guestfs-actions.pod:5715 ../fish/guestfish-actions.pod:3802
13310 msgid "l (lower case letter L)"
13314 #: ../src/guestfs-actions.pod:5717 ../fish/guestfish-actions.pod:3804
13316 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
13317 "examining binaries in Windows guests."
13321 #: ../src/guestfs-actions.pod:5720 ../fish/guestfish-actions.pod:3807
13326 #: ../src/guestfs-actions.pod:5722 ../fish/guestfish-actions.pod:3809
13327 msgid "32-bit big endian such as UCS-4BE."
13331 #: ../src/guestfs-actions.pod:5724 ../fish/guestfish-actions.pod:3811
13336 #: ../src/guestfs-actions.pod:5726 ../fish/guestfish-actions.pod:3813
13337 msgid "32-bit little endian such as UCS-4LE."
13341 #: ../src/guestfs-actions.pod:5730 ../fish/guestfish-actions.pod:3817
13342 msgid "The returned strings are transcoded to UTF-8."
13346 #: ../src/guestfs-actions.pod:5741
13347 msgid "guestfs_swapoff_device"
13351 #: ../src/guestfs-actions.pod:5743
13355 " guestfs_swapoff_device (guestfs_h *g,\n"
13356 " const char *device);\n"
13361 #: ../src/guestfs-actions.pod:5747
13363 "This command disables the libguestfs appliance swap device or partition "
13364 "named C<device>. See C<guestfs_swapon_device>."
13368 #: ../src/guestfs-actions.pod:5755
13369 msgid "guestfs_swapoff_file"
13373 #: ../src/guestfs-actions.pod:5757
13377 " guestfs_swapoff_file (guestfs_h *g,\n"
13378 " const char *file);\n"
13383 #: ../src/guestfs-actions.pod:5761 ../fish/guestfish-actions.pod:3834
13384 msgid "This command disables the libguestfs appliance swap on file."
13388 #: ../src/guestfs-actions.pod:5767
13389 msgid "guestfs_swapoff_label"
13393 #: ../src/guestfs-actions.pod:5769
13397 " guestfs_swapoff_label (guestfs_h *g,\n"
13398 " const char *label);\n"
13403 #: ../src/guestfs-actions.pod:5773 ../fish/guestfish-actions.pod:3840
13405 "This command disables the libguestfs appliance swap on labeled swap "
13410 #: ../src/guestfs-actions.pod:5780
13411 msgid "guestfs_swapoff_uuid"
13415 #: ../src/guestfs-actions.pod:5782
13419 " guestfs_swapoff_uuid (guestfs_h *g,\n"
13420 " const char *uuid);\n"
13425 #: ../src/guestfs-actions.pod:5786 ../fish/guestfish-actions.pod:3847
13427 "This command disables the libguestfs appliance swap partition with the given "
13432 #: ../src/guestfs-actions.pod:5793
13433 msgid "guestfs_swapon_device"
13437 #: ../src/guestfs-actions.pod:5795
13441 " guestfs_swapon_device (guestfs_h *g,\n"
13442 " const char *device);\n"
13447 #: ../src/guestfs-actions.pod:5799
13449 "This command enables the libguestfs appliance to use the swap device or "
13450 "partition named C<device>. The increased memory is made available for all "
13451 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
13455 #: ../src/guestfs-actions.pod:5804 ../fish/guestfish-actions.pod:3859
13457 "Note that you should not swap to existing guest swap partitions unless you "
13458 "know what you are doing. They may contain hibernation information, or other "
13459 "information that the guest doesn't want you to trash. You also risk leaking "
13460 "information about the host to the guest this way. Instead, attach a new "
13461 "host device to the guest and swap on that."
13465 #: ../src/guestfs-actions.pod:5815
13466 msgid "guestfs_swapon_file"
13470 #: ../src/guestfs-actions.pod:5817
13474 " guestfs_swapon_file (guestfs_h *g,\n"
13475 " const char *file);\n"
13480 #: ../src/guestfs-actions.pod:5821
13482 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
13487 #: ../src/guestfs-actions.pod:5828
13488 msgid "guestfs_swapon_label"
13492 #: ../src/guestfs-actions.pod:5830
13496 " guestfs_swapon_label (guestfs_h *g,\n"
13497 " const char *label);\n"
13502 #: ../src/guestfs-actions.pod:5834
13504 "This command enables swap to a labeled swap partition. See "
13505 "C<guestfs_swapon_device> for other notes."
13509 #: ../src/guestfs-actions.pod:5841
13510 msgid "guestfs_swapon_uuid"
13514 #: ../src/guestfs-actions.pod:5843
13518 " guestfs_swapon_uuid (guestfs_h *g,\n"
13519 " const char *uuid);\n"
13524 #: ../src/guestfs-actions.pod:5847
13526 "This command enables swap to a swap partition with the given UUID. See "
13527 "C<guestfs_swapon_device> for other notes."
13531 #: ../src/guestfs-actions.pod:5854
13532 msgid "guestfs_sync"
13536 #: ../src/guestfs-actions.pod:5856
13540 " guestfs_sync (guestfs_h *g);\n"
13545 #: ../src/guestfs-actions.pod:5859 ../fish/guestfish-actions.pod:3891
13547 "This syncs the disk, so that any writes are flushed through to the "
13548 "underlying disk image."
13552 #: ../src/guestfs-actions.pod:5862 ../fish/guestfish-actions.pod:3894
13554 "You should always call this if you have modified a disk image, before "
13555 "closing the handle."
13559 #: ../src/guestfs-actions.pod:5869
13560 msgid "guestfs_tail"
13564 #: ../src/guestfs-actions.pod:5871
13568 " guestfs_tail (guestfs_h *g,\n"
13569 " const char *path);\n"
13574 #: ../src/guestfs-actions.pod:5875 ../fish/guestfish-actions.pod:3901
13575 msgid "This command returns up to the last 10 lines of a file as a list of strings."
13579 #: ../src/guestfs-actions.pod:5887
13580 msgid "guestfs_tail_n"
13584 #: ../src/guestfs-actions.pod:5889
13588 " guestfs_tail_n (guestfs_h *g,\n"
13590 " const char *path);\n"
13595 #: ../src/guestfs-actions.pod:5894 ../fish/guestfish-actions.pod:3911
13597 "If the parameter C<nrlines> is a positive number, this returns the last "
13598 "C<nrlines> lines of the file C<path>."
13602 #: ../src/guestfs-actions.pod:5897 ../fish/guestfish-actions.pod:3914
13604 "If the parameter C<nrlines> is a negative number, this returns lines from "
13605 "the file C<path>, starting with the C<-nrlines>th line."
13609 #: ../src/guestfs-actions.pod:5911
13610 msgid "guestfs_tar_in"
13614 #: ../src/guestfs-actions.pod:5913
13618 " guestfs_tar_in (guestfs_h *g,\n"
13619 " const char *tarfile,\n"
13620 " const char *directory);\n"
13625 #: ../src/guestfs-actions.pod:5918 ../fish/guestfish-actions.pod:3926
13627 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
13628 "tar file) into C<directory>."
13632 #: ../src/guestfs-actions.pod:5921
13633 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
13637 #: ../src/guestfs-actions.pod:5926 ../src/guestfs-actions.pod:5943 ../src/guestfs-actions.pod:5959 ../src/guestfs-actions.pod:5975
13638 msgid "(Added in 1.0.3)"
13642 #: ../src/guestfs-actions.pod:5928
13643 msgid "guestfs_tar_out"
13647 #: ../src/guestfs-actions.pod:5930
13651 " guestfs_tar_out (guestfs_h *g,\n"
13652 " const char *directory,\n"
13653 " const char *tarfile);\n"
13658 #: ../src/guestfs-actions.pod:5935 ../fish/guestfish-actions.pod:3938
13660 "This command packs the contents of C<directory> and downloads it to local "
13665 #: ../src/guestfs-actions.pod:5938
13667 "To download a compressed tarball, use C<guestfs_tgz_out> or "
13668 "C<guestfs_txz_out>."
13672 #: ../src/guestfs-actions.pod:5945
13673 msgid "guestfs_tgz_in"
13677 #: ../src/guestfs-actions.pod:5947
13681 " guestfs_tgz_in (guestfs_h *g,\n"
13682 " const char *tarball,\n"
13683 " const char *directory);\n"
13688 #: ../src/guestfs-actions.pod:5952 ../fish/guestfish-actions.pod:3950
13690 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
13691 "tar file) into C<directory>."
13695 #: ../src/guestfs-actions.pod:5955
13696 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
13700 #: ../src/guestfs-actions.pod:5961
13701 msgid "guestfs_tgz_out"
13705 #: ../src/guestfs-actions.pod:5963
13709 " guestfs_tgz_out (guestfs_h *g,\n"
13710 " const char *directory,\n"
13711 " const char *tarball);\n"
13716 #: ../src/guestfs-actions.pod:5968 ../fish/guestfish-actions.pod:3961
13718 "This command packs the contents of C<directory> and downloads it to local "
13723 #: ../src/guestfs-actions.pod:5971
13724 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
13728 #: ../src/guestfs-actions.pod:5977
13729 msgid "guestfs_touch"
13733 #: ../src/guestfs-actions.pod:5979
13737 " guestfs_touch (guestfs_h *g,\n"
13738 " const char *path);\n"
13743 #: ../src/guestfs-actions.pod:5983 ../fish/guestfish-actions.pod:3972
13745 "Touch acts like the L<touch(1)> command. It can be used to update the "
13746 "timestamps on a file, or, if the file does not exist, to create a new "
13747 "zero-length file."
13751 #: ../src/guestfs-actions.pod:5987 ../fish/guestfish-actions.pod:3976
13753 "This command only works on regular files, and will fail on other file types "
13754 "such as directories, symbolic links, block special etc."
13758 #: ../src/guestfs-actions.pod:5994
13759 msgid "guestfs_truncate"
13763 #: ../src/guestfs-actions.pod:5996
13767 " guestfs_truncate (guestfs_h *g,\n"
13768 " const char *path);\n"
13773 #: ../src/guestfs-actions.pod:6000 ../fish/guestfish-actions.pod:3983
13775 "This command truncates C<path> to a zero-length file. The file must exist "
13780 #: ../src/guestfs-actions.pod:6007
13781 msgid "guestfs_truncate_size"
13785 #: ../src/guestfs-actions.pod:6009
13789 " guestfs_truncate_size (guestfs_h *g,\n"
13790 " const char *path,\n"
13791 " int64_t size);\n"
13796 #: ../src/guestfs-actions.pod:6014 ../fish/guestfish-actions.pod:3990
13798 "This command truncates C<path> to size C<size> bytes. The file must exist "
13803 #: ../src/guestfs-actions.pod:6017
13805 "If the current file size is less than C<size> then the file is extended to "
13806 "the required size with zero bytes. This creates a sparse file (ie. disk "
13807 "blocks are not allocated for the file until you write to it). To create a "
13808 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
13812 #: ../src/guestfs-actions.pod:6027
13813 msgid "guestfs_tune2fs_l"
13817 #: ../src/guestfs-actions.pod:6029
13821 " guestfs_tune2fs_l (guestfs_h *g,\n"
13822 " const char *device);\n"
13827 #: ../src/guestfs-actions.pod:6033 ../fish/guestfish-actions.pod:4003
13829 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
13834 #: ../src/guestfs-actions.pod:6036 ../fish/guestfish-actions.pod:4006
13836 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
13837 "for more details. The list of fields returned isn't clearly defined, and "
13838 "depends on both the version of C<tune2fs> that libguestfs was built against, "
13839 "and the filesystem itself."
13843 #: ../src/guestfs-actions.pod:6049
13844 msgid "guestfs_txz_in"
13848 #: ../src/guestfs-actions.pod:6051
13852 " guestfs_txz_in (guestfs_h *g,\n"
13853 " const char *tarball,\n"
13854 " const char *directory);\n"
13859 #: ../src/guestfs-actions.pod:6056 ../fish/guestfish-actions.pod:4015
13861 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
13862 "tar file) into C<directory>."
13866 #: ../src/guestfs-actions.pod:6063
13867 msgid "guestfs_txz_out"
13871 #: ../src/guestfs-actions.pod:6065
13875 " guestfs_txz_out (guestfs_h *g,\n"
13876 " const char *directory,\n"
13877 " const char *tarball);\n"
13882 #: ../src/guestfs-actions.pod:6070 ../fish/guestfish-actions.pod:4024
13884 "This command packs the contents of C<directory> and downloads it to local "
13885 "file C<tarball> (as an xz compressed tar archive)."
13889 #: ../src/guestfs-actions.pod:6077
13890 msgid "guestfs_umask"
13894 #: ../src/guestfs-actions.pod:6079
13898 " guestfs_umask (guestfs_h *g,\n"
13904 #: ../src/guestfs-actions.pod:6083 ../fish/guestfish-actions.pod:4033
13906 "This function sets the mask used for creating new files and device nodes to "
13911 #: ../src/guestfs-actions.pod:6086 ../fish/guestfish-actions.pod:4036
13913 "Typical umask values would be C<022> which creates new files with "
13914 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
13915 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
13919 #: ../src/guestfs-actions.pod:6091 ../fish/guestfish-actions.pod:4041
13921 "The default umask is C<022>. This is important because it means that "
13922 "directories and device nodes will be created with C<0644> or C<0755> mode "
13923 "even if you specify C<0777>."
13927 #: ../src/guestfs-actions.pod:6095
13929 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
13930 "C<guestfs_mkdir>."
13934 #: ../src/guestfs-actions.pod:6098 ../fish/guestfish-actions.pod:4048
13935 msgid "This call returns the previous umask."
13939 #: ../src/guestfs-actions.pod:6104
13940 msgid "guestfs_umount"
13944 #: ../src/guestfs-actions.pod:6106
13948 " guestfs_umount (guestfs_h *g,\n"
13949 " const char *pathordevice);\n"
13954 #: ../src/guestfs-actions.pod:6110 ../fish/guestfish-actions.pod:4056
13956 "This unmounts the given filesystem. The filesystem may be specified either "
13957 "by its mountpoint (path) or the device which contains the filesystem."
13961 #: ../src/guestfs-actions.pod:6118
13962 msgid "guestfs_umount_all"
13966 #: ../src/guestfs-actions.pod:6120
13970 " guestfs_umount_all (guestfs_h *g);\n"
13975 #: ../src/guestfs-actions.pod:6123 ../fish/guestfish-actions.pod:4066
13976 msgid "This unmounts all mounted filesystems."
13980 #: ../src/guestfs-actions.pod:6125 ../fish/guestfish-actions.pod:4068
13981 msgid "Some internal mounts are not unmounted by this call."
13985 #: ../src/guestfs-actions.pod:6131
13986 msgid "guestfs_upload"
13990 #: ../src/guestfs-actions.pod:6133
13994 " guestfs_upload (guestfs_h *g,\n"
13995 " const char *filename,\n"
13996 " const char *remotefilename);\n"
14001 #: ../src/guestfs-actions.pod:6138 ../src/guestfs-actions.pod:6157 ../fish/guestfish-actions.pod:4074 ../fish/guestfish-actions.pod:4087
14002 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
14006 #: ../src/guestfs-actions.pod:6143
14007 msgid "See also C<guestfs_download>."
14011 #: ../src/guestfs-actions.pod:6149
14012 msgid "guestfs_upload_offset"
14016 #: ../src/guestfs-actions.pod:6151
14020 " guestfs_upload_offset (guestfs_h *g,\n"
14021 " const char *filename,\n"
14022 " const char *remotefilename,\n"
14023 " int64_t offset);\n"
14028 #: ../src/guestfs-actions.pod:6160 ../fish/guestfish-actions.pod:4090
14030 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
14031 "The intention is to overwrite parts of existing files or devices, although "
14032 "if a non-existant file is specified then it is created with a \"hole\" "
14033 "before C<offset>. The size of the data written is implicit in the size of "
14034 "the source C<filename>."
14038 #: ../src/guestfs-actions.pod:6167
14040 "Note that there is no limit on the amount of data that can be uploaded with "
14041 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
14042 "full amount unless an error occurs."
14046 #: ../src/guestfs-actions.pod:6172
14047 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
14051 #: ../src/guestfs-actions.pod:6178
14052 msgid "guestfs_utimens"
14056 #: ../src/guestfs-actions.pod:6180
14060 " guestfs_utimens (guestfs_h *g,\n"
14061 " const char *path,\n"
14062 " int64_t atsecs,\n"
14063 " int64_t atnsecs,\n"
14064 " int64_t mtsecs,\n"
14065 " int64_t mtnsecs);\n"
14070 #: ../src/guestfs-actions.pod:6188 ../fish/guestfish-actions.pod:4110
14071 msgid "This command sets the timestamps of a file with nanosecond precision."
14075 #: ../src/guestfs-actions.pod:6191 ../fish/guestfish-actions.pod:4113
14077 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
14082 #: ../src/guestfs-actions.pod:6194 ../fish/guestfish-actions.pod:4116
14084 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
14085 "nanoseconds from the epoch."
14089 #: ../src/guestfs-actions.pod:6197 ../fish/guestfish-actions.pod:4119
14091 "If the C<*nsecs> field contains the special value C<-1> then the "
14092 "corresponding timestamp is set to the current time. (The C<*secs> field is "
14093 "ignored in this case)."
14097 #: ../src/guestfs-actions.pod:6201 ../fish/guestfish-actions.pod:4123
14099 "If the C<*nsecs> field contains the special value C<-2> then the "
14100 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
14105 #: ../src/guestfs-actions.pod:6209 ../src/guestfs-structs.pod:175
14106 msgid "guestfs_version"
14110 #: ../src/guestfs-actions.pod:6211
14113 " struct guestfs_version *\n"
14114 " guestfs_version (guestfs_h *g);\n"
14119 #: ../src/guestfs-actions.pod:6214 ../fish/guestfish-actions.pod:4131
14120 msgid "Return the libguestfs version number that the program is linked against."
14124 #: ../src/guestfs-actions.pod:6217 ../fish/guestfish-actions.pod:4134
14126 "Note that because of dynamic linking this is not necessarily the version of "
14127 "libguestfs that you compiled against. You can compile the program, and then "
14128 "at runtime dynamically link against a completely different C<libguestfs.so> "
14133 #: ../src/guestfs-actions.pod:6222 ../fish/guestfish-actions.pod:4139
14135 "This call was added in version C<1.0.58>. In previous versions of "
14136 "libguestfs there was no way to get the version number. From C code you can "
14137 "use dynamic linker functions to find out if this symbol exists (if it "
14138 "doesn't, then it's an earlier version)."
14142 #: ../src/guestfs-actions.pod:6228 ../fish/guestfish-actions.pod:4145
14144 "The call returns a structure with four elements. The first three (C<major>, "
14145 "C<minor> and C<release>) are numbers and correspond to the usual version "
14146 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
14147 "but may be used for distro-specific information."
14151 #: ../src/guestfs-actions.pod:6234 ../fish/guestfish-actions.pod:4151
14152 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
14156 #: ../src/guestfs-actions.pod:6237 ../fish/guestfish-actions.pod:4154
14157 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
14161 #: ../src/guestfs-actions.pod:6239
14163 "I<Note:> Don't use this call to test for availability of features. In "
14164 "enterprise distributions we backport features from later versions into "
14165 "earlier versions, making this an unreliable way to test for features. Use "
14166 "C<guestfs_available> instead."
14170 #: ../src/guestfs-actions.pod:6245
14172 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
14173 "error. I<The caller must call C<guestfs_free_version> after use>."
14177 #: ../src/guestfs-actions.pod:6249
14178 msgid "(Added in 1.0.58)"
14182 #: ../src/guestfs-actions.pod:6251
14183 msgid "guestfs_vfs_label"
14187 #: ../src/guestfs-actions.pod:6253
14191 " guestfs_vfs_label (guestfs_h *g,\n"
14192 " const char *device);\n"
14197 #: ../src/guestfs-actions.pod:6257 ../fish/guestfish-actions.pod:4166
14198 msgid "This returns the filesystem label of the filesystem on C<device>."
14202 #: ../src/guestfs-actions.pod:6260 ../fish/guestfish-actions.pod:4169
14203 msgid "If the filesystem is unlabeled, this returns the empty string."
14207 #: ../src/guestfs-actions.pod:6262
14208 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
14212 #: ../src/guestfs-actions.pod:6267 ../src/guestfs-actions.pod:6304
14213 msgid "(Added in 1.3.18)"
14217 #: ../src/guestfs-actions.pod:6269
14218 msgid "guestfs_vfs_type"
14222 #: ../src/guestfs-actions.pod:6271
14226 " guestfs_vfs_type (guestfs_h *g,\n"
14227 " const char *device);\n"
14232 #: ../src/guestfs-actions.pod:6275 ../fish/guestfish-actions.pod:4177
14234 "This command gets the filesystem type corresponding to the filesystem on "
14239 #: ../src/guestfs-actions.pod:6278 ../fish/guestfish-actions.pod:4180
14241 "For most filesystems, the result is the name of the Linux VFS module which "
14242 "would be used to mount this filesystem if you mounted it without specifying "
14243 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
14247 #: ../src/guestfs-actions.pod:6288
14248 msgid "guestfs_vfs_uuid"
14252 #: ../src/guestfs-actions.pod:6290
14256 " guestfs_vfs_uuid (guestfs_h *g,\n"
14257 " const char *device);\n"
14262 #: ../src/guestfs-actions.pod:6294 ../fish/guestfish-actions.pod:4189
14263 msgid "This returns the filesystem UUID of the filesystem on C<device>."
14267 #: ../src/guestfs-actions.pod:6297 ../fish/guestfish-actions.pod:4192
14268 msgid "If the filesystem does not have a UUID, this returns the empty string."
14272 #: ../src/guestfs-actions.pod:6299
14273 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
14277 #: ../src/guestfs-actions.pod:6306
14278 msgid "guestfs_vg_activate"
14282 #: ../src/guestfs-actions.pod:6308
14286 " guestfs_vg_activate (guestfs_h *g,\n"
14288 " char *const *volgroups);\n"
14293 #: ../src/guestfs-actions.pod:6313 ../fish/guestfish-actions.pod:4200
14295 "This command activates or (if C<activate> is false) deactivates all logical "
14296 "volumes in the listed volume groups C<volgroups>. If activated, then they "
14297 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
14298 "deactivated, then those devices disappear."
14302 #: ../src/guestfs-actions.pod:6319 ../fish/guestfish-actions.pod:4206
14303 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
14307 #: ../src/guestfs-actions.pod:6321 ../fish/guestfish-actions.pod:4208
14309 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
14310 "activated or deactivated."
14314 #: ../src/guestfs-actions.pod:6328
14315 msgid "guestfs_vg_activate_all"
14319 #: ../src/guestfs-actions.pod:6330
14323 " guestfs_vg_activate_all (guestfs_h *g,\n"
14324 " int activate);\n"
14329 #: ../src/guestfs-actions.pod:6334 ../fish/guestfish-actions.pod:4215
14331 "This command activates or (if C<activate> is false) deactivates all logical "
14332 "volumes in all volume groups. If activated, then they are made known to the "
14333 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
14334 "those devices disappear."
14338 #: ../src/guestfs-actions.pod:6340 ../fish/guestfish-actions.pod:4221
14339 msgid "This command is the same as running C<vgchange -a y|n>"
14343 #: ../src/guestfs-actions.pod:6346
14344 msgid "guestfs_vgcreate"
14348 #: ../src/guestfs-actions.pod:6348
14352 " guestfs_vgcreate (guestfs_h *g,\n"
14353 " const char *volgroup,\n"
14354 " char *const *physvols);\n"
14359 #: ../src/guestfs-actions.pod:6353 ../fish/guestfish-actions.pod:4227
14361 "This creates an LVM volume group called C<volgroup> from the non-empty list "
14362 "of physical volumes C<physvols>."
14366 #: ../src/guestfs-actions.pod:6360
14367 msgid "guestfs_vglvuuids"
14371 #: ../src/guestfs-actions.pod:6362
14375 " guestfs_vglvuuids (guestfs_h *g,\n"
14376 " const char *vgname);\n"
14381 #: ../src/guestfs-actions.pod:6366 ../fish/guestfish-actions.pod:4234
14383 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
14384 "volumes created in this volume group."
14388 #: ../src/guestfs-actions.pod:6369
14390 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
14391 "associate logical volumes and volume groups."
14395 #: ../src/guestfs-actions.pod:6372
14396 msgid "See also C<guestfs_vgpvuuids>."
14400 #: ../src/guestfs-actions.pod:6380
14401 msgid "guestfs_vgpvuuids"
14405 #: ../src/guestfs-actions.pod:6382
14409 " guestfs_vgpvuuids (guestfs_h *g,\n"
14410 " const char *vgname);\n"
14415 #: ../src/guestfs-actions.pod:6386 ../fish/guestfish-actions.pod:4246
14417 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
14418 "volumes that this volume group resides on."
14422 #: ../src/guestfs-actions.pod:6389
14424 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
14425 "associate physical volumes and volume groups."
14429 #: ../src/guestfs-actions.pod:6392
14430 msgid "See also C<guestfs_vglvuuids>."
14434 #: ../src/guestfs-actions.pod:6400
14435 msgid "guestfs_vgremove"
14439 #: ../src/guestfs-actions.pod:6402
14443 " guestfs_vgremove (guestfs_h *g,\n"
14444 " const char *vgname);\n"
14449 #: ../src/guestfs-actions.pod:6406 ../fish/guestfish-actions.pod:4258
14450 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
14454 #: ../src/guestfs-actions.pod:6408 ../fish/guestfish-actions.pod:4260
14455 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
14459 #: ../src/guestfs-actions.pod:6415
14460 msgid "guestfs_vgrename"
14464 #: ../src/guestfs-actions.pod:6417
14468 " guestfs_vgrename (guestfs_h *g,\n"
14469 " const char *volgroup,\n"
14470 " const char *newvolgroup);\n"
14475 #: ../src/guestfs-actions.pod:6422 ../fish/guestfish-actions.pod:4267
14476 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
14480 #: ../src/guestfs-actions.pod:6428
14481 msgid "guestfs_vgs"
14485 #: ../src/guestfs-actions.pod:6430
14489 " guestfs_vgs (guestfs_h *g);\n"
14494 #: ../src/guestfs-actions.pod:6433 ../fish/guestfish-actions.pod:4273
14496 "List all the volumes groups detected. This is the equivalent of the "
14497 "L<vgs(8)> command."
14501 #: ../src/guestfs-actions.pod:6436 ../fish/guestfish-actions.pod:4276
14503 "This returns a list of just the volume group names that were detected "
14504 "(eg. C<VolGroup00>)."
14508 #: ../src/guestfs-actions.pod:6439
14509 msgid "See also C<guestfs_vgs_full>."
14513 #: ../src/guestfs-actions.pod:6447
14514 msgid "guestfs_vgs_full"
14518 #: ../src/guestfs-actions.pod:6449
14521 " struct guestfs_lvm_vg_list *\n"
14522 " guestfs_vgs_full (guestfs_h *g);\n"
14527 #: ../src/guestfs-actions.pod:6452 ../fish/guestfish-actions.pod:4285
14529 "List all the volumes groups detected. This is the equivalent of the "
14530 "L<vgs(8)> command. The \"full\" version includes all fields."
14534 #: ../src/guestfs-actions.pod:6455
14536 "This function returns a C<struct guestfs_lvm_vg_list *> (see "
14537 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
14538 "must call C<guestfs_free_lvm_vg_list> after use>."
14542 #: ../src/guestfs-actions.pod:6462
14543 msgid "guestfs_vgscan"
14547 #: ../src/guestfs-actions.pod:6464
14551 " guestfs_vgscan (guestfs_h *g);\n"
14556 #: ../src/guestfs-actions.pod:6467 ../fish/guestfish-actions.pod:4292
14558 "This rescans all block devices and rebuilds the list of LVM physical "
14559 "volumes, volume groups and logical volumes."
14563 #: ../src/guestfs-actions.pod:6474
14564 msgid "guestfs_vguuid"
14568 #: ../src/guestfs-actions.pod:6476
14572 " guestfs_vguuid (guestfs_h *g,\n"
14573 " const char *vgname);\n"
14578 #: ../src/guestfs-actions.pod:6480 ../fish/guestfish-actions.pod:4299
14579 msgid "This command returns the UUID of the LVM VG named C<vgname>."
14583 #: ../src/guestfs-actions.pod:6487
14584 msgid "guestfs_wait_ready"
14588 #: ../src/guestfs-actions.pod:6489
14592 " guestfs_wait_ready (guestfs_h *g);\n"
14597 #: ../src/guestfs-actions.pod:6492
14598 msgid "This function is a no op."
14602 #: ../src/guestfs-actions.pod:6494
14604 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
14605 "calling C<guestfs_launch> to wait for the launch to complete. However this "
14606 "is no longer necessary because C<guestfs_launch> now does the waiting."
14610 #: ../src/guestfs-actions.pod:6499
14612 "If you see any calls to this function in code then you can just remove them, "
14613 "unless you want to retain compatibility with older versions of the API."
14617 #: ../src/guestfs-actions.pod:6507
14618 msgid "guestfs_wc_c"
14622 #: ../src/guestfs-actions.pod:6509
14626 " guestfs_wc_c (guestfs_h *g,\n"
14627 " const char *path);\n"
14632 #: ../src/guestfs-actions.pod:6513 ../fish/guestfish-actions.pod:4305
14634 "This command counts the characters in a file, using the C<wc -c> external "
14639 #: ../src/guestfs-actions.pod:6520
14640 msgid "guestfs_wc_l"
14644 #: ../src/guestfs-actions.pod:6522
14648 " guestfs_wc_l (guestfs_h *g,\n"
14649 " const char *path);\n"
14654 #: ../src/guestfs-actions.pod:6526 ../fish/guestfish-actions.pod:4312
14656 "This command counts the lines in a file, using the C<wc -l> external "
14661 #: ../src/guestfs-actions.pod:6533
14662 msgid "guestfs_wc_w"
14666 #: ../src/guestfs-actions.pod:6535
14670 " guestfs_wc_w (guestfs_h *g,\n"
14671 " const char *path);\n"
14676 #: ../src/guestfs-actions.pod:6539 ../fish/guestfish-actions.pod:4319
14678 "This command counts the words in a file, using the C<wc -w> external "
14683 #: ../src/guestfs-actions.pod:6546
14684 msgid "guestfs_write"
14688 #: ../src/guestfs-actions.pod:6548
14692 " guestfs_write (guestfs_h *g,\n"
14693 " const char *path,\n"
14694 " const char *content,\n"
14695 " size_t content_size);\n"
14700 #: ../src/guestfs-actions.pod:6554 ../fish/guestfish-actions.pod:4326
14702 "This call creates a file called C<path>. The content of the file is the "
14703 "string C<content> (which can contain any 8 bit data)."
14707 #: ../src/guestfs-actions.pod:6564
14708 msgid "guestfs_write_file"
14712 #: ../src/guestfs-actions.pod:6566
14716 " guestfs_write_file (guestfs_h *g,\n"
14717 " const char *path,\n"
14718 " const char *content,\n"
14724 #: ../src/guestfs-actions.pod:6572 ../fish/guestfish-actions.pod:4336
14726 "This call creates a file called C<path>. The contents of the file is the "
14727 "string C<content> (which can contain any 8 bit data), with length C<size>."
14731 #: ../src/guestfs-actions.pod:6576 ../fish/guestfish-actions.pod:4340
14733 "As a special case, if C<size> is C<0> then the length is calculated using "
14734 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
14738 #: ../src/guestfs-actions.pod:6580 ../fish/guestfish-actions.pod:4344
14740 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
14741 "I<not> work, even if the length is specified."
14745 #: ../src/guestfs-actions.pod:6588 ../fish/guestfish-actions.pod:4350
14746 msgid "This function is deprecated. In new code, use the C<write> call instead."
14750 #: ../src/guestfs-actions.pod:6597
14751 msgid "guestfs_zegrep"
14755 #: ../src/guestfs-actions.pod:6599
14759 " guestfs_zegrep (guestfs_h *g,\n"
14760 " const char *regex,\n"
14761 " const char *path);\n"
14766 #: ../src/guestfs-actions.pod:6604 ../fish/guestfish-actions.pod:4361
14767 msgid "This calls the external C<zegrep> program and returns the matching lines."
14771 #: ../src/guestfs-actions.pod:6616
14772 msgid "guestfs_zegrepi"
14776 #: ../src/guestfs-actions.pod:6618
14780 " guestfs_zegrepi (guestfs_h *g,\n"
14781 " const char *regex,\n"
14782 " const char *path);\n"
14787 #: ../src/guestfs-actions.pod:6623 ../fish/guestfish-actions.pod:4371
14788 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
14792 #: ../src/guestfs-actions.pod:6635
14793 msgid "guestfs_zero"
14797 #: ../src/guestfs-actions.pod:6637
14801 " guestfs_zero (guestfs_h *g,\n"
14802 " const char *device);\n"
14807 #: ../src/guestfs-actions.pod:6641 ../fish/guestfish-actions.pod:4381
14808 msgid "This command writes zeroes over the first few blocks of C<device>."
14812 #: ../src/guestfs-actions.pod:6643 ../fish/guestfish-actions.pod:4383
14814 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
14815 "securely wipe the device). It should be sufficient to remove any partition "
14816 "tables, filesystem superblocks and so on."
14820 #: ../src/guestfs-actions.pod:6647
14821 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
14825 #: ../src/guestfs-actions.pod:6658
14826 msgid "guestfs_zero_device"
14830 #: ../src/guestfs-actions.pod:6660
14834 " guestfs_zero_device (guestfs_h *g,\n"
14835 " const char *device);\n"
14840 #: ../src/guestfs-actions.pod:6664
14842 "This command writes zeroes over the entire C<device>. Compare with "
14843 "C<guestfs_zero> which just zeroes the first few blocks of a device."
14847 #: ../src/guestfs-actions.pod:6678
14848 msgid "(Added in 1.3.1)"
14852 #: ../src/guestfs-actions.pod:6680
14853 msgid "guestfs_zerofree"
14857 #: ../src/guestfs-actions.pod:6682
14861 " guestfs_zerofree (guestfs_h *g,\n"
14862 " const char *device);\n"
14867 #: ../src/guestfs-actions.pod:6686 ../fish/guestfish-actions.pod:4404
14869 "This runs the I<zerofree> program on C<device>. This program claims to zero "
14870 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
14871 "possible to compress the filesystem more effectively."
14875 #: ../src/guestfs-actions.pod:6691 ../fish/guestfish-actions.pod:4409
14876 msgid "You should B<not> run this program if the filesystem is mounted."
14880 #: ../src/guestfs-actions.pod:6694 ../fish/guestfish-actions.pod:4412
14882 "It is possible that using this program can damage the filesystem or data on "
14887 #: ../src/guestfs-actions.pod:6701
14888 msgid "guestfs_zfgrep"
14892 #: ../src/guestfs-actions.pod:6703
14896 " guestfs_zfgrep (guestfs_h *g,\n"
14897 " const char *pattern,\n"
14898 " const char *path);\n"
14903 #: ../src/guestfs-actions.pod:6708 ../fish/guestfish-actions.pod:4419
14904 msgid "This calls the external C<zfgrep> program and returns the matching lines."
14908 #: ../src/guestfs-actions.pod:6720
14909 msgid "guestfs_zfgrepi"
14913 #: ../src/guestfs-actions.pod:6722
14917 " guestfs_zfgrepi (guestfs_h *g,\n"
14918 " const char *pattern,\n"
14919 " const char *path);\n"
14924 #: ../src/guestfs-actions.pod:6727 ../fish/guestfish-actions.pod:4429
14925 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
14929 #: ../src/guestfs-actions.pod:6739
14930 msgid "guestfs_zfile"
14934 #: ../src/guestfs-actions.pod:6741
14938 " guestfs_zfile (guestfs_h *g,\n"
14939 " const char *meth,\n"
14940 " const char *path);\n"
14945 #: ../src/guestfs-actions.pod:6746 ../fish/guestfish-actions.pod:4439
14946 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
14950 #: ../src/guestfs-actions.pod:6749 ../fish/guestfish-actions.pod:4442
14951 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
14955 #: ../src/guestfs-actions.pod:6751
14957 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
14962 #: ../src/guestfs-actions.pod:6757 ../fish/guestfish-actions.pod:4447
14963 msgid "This function is deprecated. In new code, use the C<file> call instead."
14967 #: ../src/guestfs-actions.pod:6766
14968 msgid "guestfs_zgrep"
14972 #: ../src/guestfs-actions.pod:6768
14976 " guestfs_zgrep (guestfs_h *g,\n"
14977 " const char *regex,\n"
14978 " const char *path);\n"
14983 #: ../src/guestfs-actions.pod:6773 ../fish/guestfish-actions.pod:4458
14984 msgid "This calls the external C<zgrep> program and returns the matching lines."
14988 #: ../src/guestfs-actions.pod:6785
14989 msgid "guestfs_zgrepi"
14993 #: ../src/guestfs-actions.pod:6787
14997 " guestfs_zgrepi (guestfs_h *g,\n"
14998 " const char *regex,\n"
14999 " const char *path);\n"
15004 #: ../src/guestfs-actions.pod:6792 ../fish/guestfish-actions.pod:4468
15005 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
15009 #: ../src/guestfs-availability.pod:3
15014 #: ../src/guestfs-availability.pod:5
15016 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
15017 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
15018 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
15019 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
15020 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
15024 #: ../src/guestfs-availability.pod:21
15029 #: ../src/guestfs-availability.pod:23
15031 "The following functions: L</guestfs_inotify_add_watch> "
15032 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
15033 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
15037 #: ../src/guestfs-availability.pod:31
15038 msgid "B<linuxfsuuid>"
15042 #: ../src/guestfs-availability.pod:33
15044 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
15045 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
15049 #: ../src/guestfs-availability.pod:40
15050 msgid "B<linuxmodules>"
15054 #: ../src/guestfs-availability.pod:42
15055 msgid "The following functions: L</guestfs_modprobe>"
15059 #: ../src/guestfs-availability.pod:45
15060 msgid "B<linuxxattrs>"
15064 #: ../src/guestfs-availability.pod:47
15066 "The following functions: L</guestfs_getxattrs> L</guestfs_lgetxattrs> "
15067 "L</guestfs_lremovexattr> L</guestfs_lsetxattr> L</guestfs_lxattrlist> "
15068 "L</guestfs_removexattr> L</guestfs_setxattr>"
15072 #: ../src/guestfs-availability.pod:56
15077 #: ../src/guestfs-availability.pod:58
15079 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
15080 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
15081 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
15085 #: ../src/guestfs-availability.pod:67
15090 #: ../src/guestfs-availability.pod:69
15092 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
15093 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
15094 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
15095 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
15096 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
15097 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
15098 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
15099 "L</guestfs_vgs_full>"
15103 #: ../src/guestfs-availability.pod:92
15108 #: ../src/guestfs-availability.pod:94
15110 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
15111 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
15115 #: ../src/guestfs-availability.pod:100
15120 #: ../src/guestfs-availability.pod:102
15121 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
15125 #: ../src/guestfs-availability.pod:105
15126 msgid "B<ntfsprogs>"
15130 #: ../src/guestfs-availability.pod:107
15131 msgid "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
15135 #: ../src/guestfs-availability.pod:111
15136 msgid "B<realpath>"
15140 #: ../src/guestfs-availability.pod:113
15141 msgid "The following functions: L</guestfs_realpath>"
15145 #: ../src/guestfs-availability.pod:116
15150 #: ../src/guestfs-availability.pod:118
15152 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
15153 "L</guestfs_scrub_freespace>"
15157 #: ../src/guestfs-availability.pod:123
15162 #: ../src/guestfs-availability.pod:125
15163 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
15167 #: ../src/guestfs-availability.pod:129
15172 #: ../src/guestfs-availability.pod:131
15173 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
15177 #: ../src/guestfs-availability.pod:135
15178 msgid "B<zerofree>"
15182 #: ../src/guestfs-availability.pod:137
15183 msgid "The following functions: L</guestfs_zerofree>"
15187 #: ../src/guestfs-structs.pod:1
15188 msgid "guestfs_int_bool"
15192 #: ../src/guestfs-structs.pod:3
15195 " struct guestfs_int_bool {\n"
15203 #: ../src/guestfs-structs.pod:8
15206 " struct guestfs_int_bool_list {\n"
15207 " uint32_t len; /* Number of elements in list. */\n"
15208 " struct guestfs_int_bool *val; /* Elements. */\n"
15214 #: ../src/guestfs-structs.pod:13
15217 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
15218 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
15223 #: ../src/guestfs-structs.pod:16
15224 msgid "guestfs_lvm_pv"
15228 #: ../src/guestfs-structs.pod:18
15231 " struct guestfs_lvm_pv {\n"
15232 " char *pv_name;\n"
15233 " /* The next field is NOT nul-terminated, be careful when printing it: "
15235 " char pv_uuid[32];\n"
15237 " uint64_t pv_size;\n"
15238 " uint64_t dev_size;\n"
15239 " uint64_t pv_free;\n"
15240 " uint64_t pv_used;\n"
15241 " char *pv_attr;\n"
15242 " int64_t pv_pe_count;\n"
15243 " int64_t pv_pe_alloc_count;\n"
15244 " char *pv_tags;\n"
15245 " uint64_t pe_start;\n"
15246 " int64_t pv_mda_count;\n"
15247 " uint64_t pv_mda_free;\n"
15253 #: ../src/guestfs-structs.pod:36
15256 " struct guestfs_lvm_pv_list {\n"
15257 " uint32_t len; /* Number of elements in list. */\n"
15258 " struct guestfs_lvm_pv *val; /* Elements. */\n"
15264 #: ../src/guestfs-structs.pod:41
15267 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
15268 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
15273 #: ../src/guestfs-structs.pod:44
15274 msgid "guestfs_lvm_vg"
15278 #: ../src/guestfs-structs.pod:46
15281 " struct guestfs_lvm_vg {\n"
15282 " char *vg_name;\n"
15283 " /* The next field is NOT nul-terminated, be careful when printing it: "
15285 " char vg_uuid[32];\n"
15287 " char *vg_attr;\n"
15288 " uint64_t vg_size;\n"
15289 " uint64_t vg_free;\n"
15290 " char *vg_sysid;\n"
15291 " uint64_t vg_extent_size;\n"
15292 " int64_t vg_extent_count;\n"
15293 " int64_t vg_free_count;\n"
15294 " int64_t max_lv;\n"
15295 " int64_t max_pv;\n"
15296 " int64_t pv_count;\n"
15297 " int64_t lv_count;\n"
15298 " int64_t snap_count;\n"
15299 " int64_t vg_seqno;\n"
15300 " char *vg_tags;\n"
15301 " int64_t vg_mda_count;\n"
15302 " uint64_t vg_mda_free;\n"
15308 #: ../src/guestfs-structs.pod:69
15311 " struct guestfs_lvm_vg_list {\n"
15312 " uint32_t len; /* Number of elements in list. */\n"
15313 " struct guestfs_lvm_vg *val; /* Elements. */\n"
15319 #: ../src/guestfs-structs.pod:74
15322 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
15323 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
15328 #: ../src/guestfs-structs.pod:77
15329 msgid "guestfs_lvm_lv"
15333 #: ../src/guestfs-structs.pod:79
15336 " struct guestfs_lvm_lv {\n"
15337 " char *lv_name;\n"
15338 " /* The next field is NOT nul-terminated, be careful when printing it: "
15340 " char lv_uuid[32];\n"
15341 " char *lv_attr;\n"
15342 " int64_t lv_major;\n"
15343 " int64_t lv_minor;\n"
15344 " int64_t lv_kernel_major;\n"
15345 " int64_t lv_kernel_minor;\n"
15346 " uint64_t lv_size;\n"
15347 " int64_t seg_count;\n"
15349 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
15350 " float snap_percent;\n"
15351 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
15352 " float copy_percent;\n"
15353 " char *move_pv;\n"
15354 " char *lv_tags;\n"
15355 " char *mirror_log;\n"
15356 " char *modules;\n"
15362 #: ../src/guestfs-structs.pod:101
15365 " struct guestfs_lvm_lv_list {\n"
15366 " uint32_t len; /* Number of elements in list. */\n"
15367 " struct guestfs_lvm_lv *val; /* Elements. */\n"
15373 #: ../src/guestfs-structs.pod:106
15376 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
15377 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
15382 #: ../src/guestfs-structs.pod:111
15385 " struct guestfs_stat {\n"
15389 " int64_t nlink;\n"
15394 " int64_t blksize;\n"
15395 " int64_t blocks;\n"
15396 " int64_t atime;\n"
15397 " int64_t mtime;\n"
15398 " int64_t ctime;\n"
15404 #: ../src/guestfs-structs.pod:127
15407 " struct guestfs_stat_list {\n"
15408 " uint32_t len; /* Number of elements in list. */\n"
15409 " struct guestfs_stat *val; /* Elements. */\n"
15415 #: ../src/guestfs-structs.pod:132
15418 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
15419 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
15424 #: ../src/guestfs-structs.pod:137
15427 " struct guestfs_statvfs {\n"
15428 " int64_t bsize;\n"
15429 " int64_t frsize;\n"
15430 " int64_t blocks;\n"
15431 " int64_t bfree;\n"
15432 " int64_t bavail;\n"
15433 " int64_t files;\n"
15434 " int64_t ffree;\n"
15435 " int64_t favail;\n"
15438 " int64_t namemax;\n"
15444 #: ../src/guestfs-structs.pod:151
15447 " struct guestfs_statvfs_list {\n"
15448 " uint32_t len; /* Number of elements in list. */\n"
15449 " struct guestfs_statvfs *val; /* Elements. */\n"
15455 #: ../src/guestfs-structs.pod:156
15458 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
15459 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
15464 #: ../src/guestfs-structs.pod:159
15465 msgid "guestfs_dirent"
15469 #: ../src/guestfs-structs.pod:161
15472 " struct guestfs_dirent {\n"
15481 #: ../src/guestfs-structs.pod:167
15484 " struct guestfs_dirent_list {\n"
15485 " uint32_t len; /* Number of elements in list. */\n"
15486 " struct guestfs_dirent *val; /* Elements. */\n"
15492 #: ../src/guestfs-structs.pod:172
15495 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
15496 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
15501 #: ../src/guestfs-structs.pod:177
15504 " struct guestfs_version {\n"
15505 " int64_t major;\n"
15506 " int64_t minor;\n"
15507 " int64_t release;\n"
15514 #: ../src/guestfs-structs.pod:184
15517 " struct guestfs_version_list {\n"
15518 " uint32_t len; /* Number of elements in list. */\n"
15519 " struct guestfs_version *val; /* Elements. */\n"
15525 #: ../src/guestfs-structs.pod:189
15528 " void guestfs_free_version (struct guestfs_free_version *);\n"
15529 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
15534 #: ../src/guestfs-structs.pod:192
15535 msgid "guestfs_xattr"
15539 #: ../src/guestfs-structs.pod:194
15542 " struct guestfs_xattr {\n"
15543 " char *attrname;\n"
15544 " /* The next two fields describe a byte array. */\n"
15545 " uint32_t attrval_len;\n"
15546 " char *attrval;\n"
15552 #: ../src/guestfs-structs.pod:201
15555 " struct guestfs_xattr_list {\n"
15556 " uint32_t len; /* Number of elements in list. */\n"
15557 " struct guestfs_xattr *val; /* Elements. */\n"
15563 #: ../src/guestfs-structs.pod:206
15566 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
15567 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
15572 #: ../src/guestfs-structs.pod:209
15573 msgid "guestfs_inotify_event"
15577 #: ../src/guestfs-structs.pod:211
15580 " struct guestfs_inotify_event {\n"
15581 " int64_t in_wd;\n"
15582 " uint32_t in_mask;\n"
15583 " uint32_t in_cookie;\n"
15584 " char *in_name;\n"
15590 #: ../src/guestfs-structs.pod:218
15593 " struct guestfs_inotify_event_list {\n"
15594 " uint32_t len; /* Number of elements in list. */\n"
15595 " struct guestfs_inotify_event *val; /* Elements. */\n"
15601 #: ../src/guestfs-structs.pod:223
15604 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
15605 " void guestfs_free_inotify_event_list (struct "
15606 "guestfs_free_inotify_event_list *);\n"
15611 #: ../src/guestfs-structs.pod:226
15612 msgid "guestfs_partition"
15616 #: ../src/guestfs-structs.pod:228
15619 " struct guestfs_partition {\n"
15620 " int32_t part_num;\n"
15621 " uint64_t part_start;\n"
15622 " uint64_t part_end;\n"
15623 " uint64_t part_size;\n"
15629 #: ../src/guestfs-structs.pod:235
15632 " struct guestfs_partition_list {\n"
15633 " uint32_t len; /* Number of elements in list. */\n"
15634 " struct guestfs_partition *val; /* Elements. */\n"
15640 #: ../src/guestfs-structs.pod:240
15643 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
15644 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
15649 #: ../fish/guestfish.pod:5
15650 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
15654 #: ../fish/guestfish.pod:9
15657 " guestfish [--options] [commands]\n"
15662 #: ../fish/guestfish.pod:11
15670 #: ../fish/guestfish.pod:13
15673 " guestfish -a disk.img\n"
15678 #: ../fish/guestfish.pod:15
15681 " guestfish -a disk.img -m dev[:mountpoint]\n"
15686 #: ../fish/guestfish.pod:17
15689 " guestfish -d libvirt-domain\n"
15694 #: ../fish/guestfish.pod:19
15697 " guestfish -a disk.img -i\n"
15702 #: ../fish/guestfish.pod:21
15705 " guestfish -d libvirt-domain -i\n"
15710 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:15 ../tools/virt-edit.pl:44 ../tools/virt-win-reg.pl:51 ../tools/virt-tar.pl:59 ../tools/virt-rescue.pl:41
15715 #: ../fish/guestfish.pod:25
15717 "Using guestfish in read/write mode on live virtual machines can be "
15718 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
15719 "option to use guestfish safely if the disk image or virtual machine might be "
15724 #: ../fish/guestfish.pod:32
15726 "Guestfish is a shell and command-line tool for examining and modifying "
15727 "virtual machine filesystems. It uses libguestfs and exposes all of the "
15728 "functionality of the guestfs API, see L<guestfs(3)>."
15732 #: ../fish/guestfish.pod:36
15734 "Guestfish gives you structured access to the libguestfs API, from shell "
15735 "scripts or the command line or interactively. If you want to rescue a "
15736 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
15741 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:800 ../fuse/guestmount.pod:39 ../tools/virt-edit.pl:58 ../tools/virt-resize.pl:66 ../tools/virt-cat.pl:50 ../tools/virt-tar.pl:45
15746 #: ../fish/guestfish.pod:43
15747 msgid "As an interactive shell"
15751 #: ../fish/guestfish.pod:45
15759 #: ../fish/guestfish.pod:47
15762 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
15763 " editing virtual machine filesystems.\n"
15768 #: ../fish/guestfish.pod:50
15771 " Type: 'help' for a list of commands\n"
15772 " 'man' to read the manual\n"
15773 " 'quit' to quit the shell\n"
15778 #: ../fish/guestfish.pod:54
15781 " ><fs> add-ro disk.img\n"
15783 " ><fs> list-filesystems\n"
15784 " /dev/sda1: ext4\n"
15785 " /dev/vg_guest/lv_root: ext4\n"
15786 " /dev/vg_guest/lv_swap: swap\n"
15787 " ><fs> mount /dev/vg_guest/lv_root /\n"
15788 " ><fs> cat /etc/fstab\n"
15790 " # Created by anaconda\n"
15797 #: ../fish/guestfish.pod:67
15798 msgid "From shell scripts"
15802 #: ../fish/guestfish.pod:69
15803 msgid "Create a new C</etc/motd> file in a guest or disk image:"
15807 #: ../fish/guestfish.pod:71
15810 " guestfish <<_EOF_\n"
15813 " mount /dev/vg_guest/lv_root /\n"
15814 " write /etc/motd \"Welcome, new users\"\n"
15820 #: ../fish/guestfish.pod:78
15821 msgid "List the LVM logical volumes in a disk image:"
15825 #: ../fish/guestfish.pod:80
15828 " guestfish -a disk.img --ro <<_EOF_\n"
15836 #: ../fish/guestfish.pod:85
15837 msgid "List all the filesystems in a disk image:"
15841 #: ../fish/guestfish.pod:87
15844 " guestfish -a disk.img --ro <<_EOF_\n"
15846 " list-filesystems\n"
15852 #: ../fish/guestfish.pod:92
15853 msgid "On one command line"
15857 #: ../fish/guestfish.pod:94
15858 msgid "Update C</etc/resolv.conf> in a guest:"
15862 #: ../fish/guestfish.pod:96
15866 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
15867 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
15872 #: ../fish/guestfish.pod:100
15873 msgid "Edit C</boot/grub/grub.conf> interactively:"
15877 #: ../fish/guestfish.pod:102
15880 " guestfish --add disk.img \\\n"
15881 " --mount /dev/vg_guest/lv_root \\\n"
15882 " --mount /dev/sda1:/boot \\\n"
15883 " edit /boot/grub/grub.conf\n"
15888 #: ../fish/guestfish.pod:107
15889 msgid "Mount disks automatically"
15893 #: ../fish/guestfish.pod:109
15895 "Use the I<-i> option to automatically mount the disks from a virtual "
15900 #: ../fish/guestfish.pod:112
15903 " guestfish --ro -a disk.img -i cat /etc/group\n"
15908 #: ../fish/guestfish.pod:114
15911 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
15916 #: ../fish/guestfish.pod:116
15917 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
15921 #: ../fish/guestfish.pod:118
15924 " guestfish -a disk.img -i edit /boot/grub/grub.conf\n"
15929 #: ../fish/guestfish.pod:120
15930 msgid "As a script interpreter"
15934 #: ../fish/guestfish.pod:122
15935 msgid "Create a 100MB disk containing an ext2-formatted partition:"
15939 #: ../fish/guestfish.pod:124
15942 " #!/usr/bin/guestfish -f\n"
15943 " sparse test1.img 100M\n"
15945 " part-disk /dev/sda mbr\n"
15946 " mkfs ext2 /dev/sda1\n"
15951 #: ../fish/guestfish.pod:130
15952 msgid "Start with a prepared disk"
15956 #: ../fish/guestfish.pod:132
15958 "An alternate way to create a 100MB disk called C<test1.img> containing a "
15959 "single ext2-formatted partition:"
15963 #: ../fish/guestfish.pod:135
15966 " guestfish -N fs\n"
15971 #: ../fish/guestfish.pod:137
15972 msgid "To list what is available do:"
15976 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:791
15979 " guestfish -N help | less\n"
15984 #: ../fish/guestfish.pod:141
15985 msgid "Remote control"
15989 #: ../fish/guestfish.pod:143
15992 " eval `guestfish --listen`\n"
15993 " guestfish --remote add-ro disk.img\n"
15994 " guestfish --remote run\n"
15995 " guestfish --remote lvs\n"
16000 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37 ../fuse/guestmount.pod:73 ../inspector/virt-inspector.pl:68 ../tools/virt-edit.pl:72 ../tools/virt-win-reg.pl:171 ../tools/virt-df.pl:71 ../tools/virt-ls.pl:78 ../tools/virt-resize.pl:257 ../tools/virt-list-filesystems.pl:50 ../tools/virt-cat.pl:79 ../tools/virt-tar.pl:98 ../tools/virt-rescue.pl:103 ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:51
16005 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:131 ../inspector/virt-inspector.pl:76 ../tools/virt-edit.pl:80 ../tools/virt-win-reg.pl:179 ../tools/virt-df.pl:79 ../tools/virt-ls.pl:86 ../tools/virt-resize.pl:265 ../tools/virt-list-filesystems.pl:58 ../tools/virt-cat.pl:87 ../tools/virt-tar.pl:106 ../tools/virt-rescue.pl:111 ../tools/virt-make-fs.pl:161 ../tools/virt-list-partitions.pl:59
16010 #: ../fish/guestfish.pod:154
16011 msgid "Displays general help on options."
16015 #: ../fish/guestfish.pod:156
16016 msgid "B<-h> | B<--cmd-help>"
16020 #: ../fish/guestfish.pod:158
16021 msgid "Lists all available guestfish commands."
16025 #: ../fish/guestfish.pod:160
16026 msgid "B<-h cmd> | B<--cmd-help cmd>"
16030 #: ../fish/guestfish.pod:162
16031 msgid "Displays detailed help on a single command C<cmd>."
16035 #: ../fish/guestfish.pod:164 ../fuse/guestmount.pod:77
16036 msgid "B<-a image> | B<--add image>"
16040 #: ../fish/guestfish.pod:166
16041 msgid "Add a block device or virtual machine image to the shell."
16045 #: ../fish/guestfish.pod:168 ../fuse/guestmount.pod:81
16047 "The format of the disk image is auto-detected. To override this and force a "
16048 "particular format use the I<--format=..> option."
16052 #: ../fish/guestfish.pod:171 ../fuse/guestmount.pod:84
16053 msgid "B<-c URI> | B<--connect URI>"
16057 #: ../fish/guestfish.pod:173 ../fuse/guestmount.pod:86
16059 "When used in conjunction with the I<-d> option, this specifies the libvirt "
16060 "URI to use. The default is to use the default libvirt connection."
16064 #: ../fish/guestfish.pod:177 ../fuse/guestmount.pod:90
16065 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
16069 #: ../fish/guestfish.pod:179 ../fuse/guestmount.pod:92
16071 "Add disks from the named libvirt domain. If the I<--ro> option is also "
16072 "used, then any libvirt domain can be used. However in write mode, only "
16073 "libvirt domains which are shut down can be named here."
16077 #: ../fish/guestfish.pod:183
16078 msgid "B<-D> | B<--no-dest-paths>"
16082 #: ../fish/guestfish.pod:185
16084 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
16085 "to hit the tab key to complete paths on the guest filesystem, but this "
16086 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
16087 "allow this feature to be disabled."
16091 #: ../fish/guestfish.pod:190 ../fuse/guestmount.pod:108
16092 msgid "B<--echo-keys>"
16096 #: ../fish/guestfish.pod:192 ../fuse/guestmount.pod:110
16098 "When prompting for keys and passphrases, guestfish normally turns echoing "
16099 "off so you cannot see what you are typing. If you are not worried about "
16100 "Tempest attacks and there is no one else in the room you can specify this "
16101 "flag to see what you are typing."
16105 #: ../fish/guestfish.pod:197
16106 msgid "B<-f file> | B<--file file>"
16110 #: ../fish/guestfish.pod:199
16111 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
16115 #: ../fish/guestfish.pod:202
16118 " #!/usr/bin/guestfish -f\n"
16123 #: ../fish/guestfish.pod:204 ../fuse/guestmount.pod:115
16124 msgid "B<--format=raw|qcow2|..> | B<--format>"
16128 #: ../fish/guestfish.pod:206 ../fuse/guestmount.pod:117
16130 "The default for the I<-a> option is to auto-detect the format of the disk "
16131 "image. Using this forces the disk format for I<-a> options which follow on "
16132 "the command line. Using I<--format> with no argument switches back to "
16133 "auto-detection for subsequent I<-a> options."
16137 #: ../fish/guestfish.pod:211 ../fish/guestfish.pod:504 ../inspector/virt-inspector.pl:549
16138 msgid "For example:"
16142 #: ../fish/guestfish.pod:213
16145 " guestfish --format=raw -a disk.img\n"
16150 #: ../fish/guestfish.pod:215
16151 msgid "forces raw format (no auto-detection) for C<disk.img>."
16155 #: ../fish/guestfish.pod:217
16158 " guestfish --format=raw -a disk.img --format -a another.img\n"
16163 #: ../fish/guestfish.pod:219
16165 "forces raw format (no auto-detection) for C<disk.img> and reverts to "
16166 "auto-detection for C<another.img>."
16170 #: ../fish/guestfish.pod:222
16172 "If you have untrusted raw-format guest disk images, you should use this "
16173 "option to specify the disk format. This avoids a possible security problem "
16174 "with malicious guests (CVE-2010-3851). See also L</add-drive-opts>."
16178 #: ../fish/guestfish.pod:227 ../fuse/guestmount.pod:135
16179 msgid "B<-i> | B<--inspector>"
16183 #: ../fish/guestfish.pod:229 ../fuse/guestmount.pod:137
16185 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
16186 "system and mount filesystems as they would be mounted on the real virtual "
16191 #: ../fish/guestfish.pod:233
16192 msgid "Typical usage is either:"
16196 #: ../fish/guestfish.pod:235
16199 " guestfish -d myguest -i\n"
16204 #: ../fish/guestfish.pod:237
16205 msgid "(for an inactive libvirt domain called I<myguest>), or:"
16209 #: ../fish/guestfish.pod:239
16212 " guestfish --ro -d myguest -i\n"
16217 #: ../fish/guestfish.pod:241
16218 msgid "(for active domains, readonly), or specify the block device directly:"
16222 #: ../fish/guestfish.pod:243
16225 " guestfish -a /dev/Guests/MyGuest -i\n"
16230 #: ../fish/guestfish.pod:245
16232 "Note that the command line syntax changed slightly over older versions of "
16233 "guestfish. You can still use the old syntax:"
16237 #: ../fish/guestfish.pod:248
16240 " guestfish [--ro] -i disk.img\n"
16245 #: ../fish/guestfish.pod:250
16248 " guestfish [--ro] -i libvirt-domain\n"
16253 #: ../fish/guestfish.pod:252 ../fuse/guestmount.pod:141
16254 msgid "B<--keys-from-stdin>"
16258 #: ../fish/guestfish.pod:254 ../fuse/guestmount.pod:143
16260 "Read key or passphrase parameters from stdin. The default is to try to read "
16261 "passphrases from the user by opening C</dev/tty>."
16265 #: ../fish/guestfish.pod:257
16266 msgid "B<--listen>"
16270 #: ../fish/guestfish.pod:259
16272 "Fork into the background and listen for remote commands. See section "
16273 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
16277 #: ../fish/guestfish.pod:262
16278 msgid "B<-m dev[:mountpoint]> | B<--mount dev[:mountpoint]>"
16282 #: ../fish/guestfish.pod:264
16283 msgid "Mount the named partition or logical volume on the given mountpoint."
16287 #: ../fish/guestfish.pod:266
16288 msgid "If the mountpoint is omitted, it defaults to C</>."
16292 #: ../fish/guestfish.pod:268
16293 msgid "You have to mount something on C</> before most commands will work."
16297 #: ../fish/guestfish.pod:270
16299 "If any I<-m> or I<--mount> options are given, the guest is automatically "
16304 #: ../fish/guestfish.pod:273
16306 "If you don't know what filesystems a disk image contains, you can either run "
16307 "guestfish without this option, then list the partitions and LVs available "
16308 "(see L</list-partitions> and L</lvs> commands), or you can use the "
16309 "L<virt-list-filesystems(1)> program."
16313 #: ../fish/guestfish.pod:278 ../fuse/guestmount.pod:154
16314 msgid "B<-n> | B<--no-sync>"
16318 #: ../fish/guestfish.pod:280
16320 "Disable autosync. This is enabled by default. See the discussion of "
16321 "autosync in the L<guestfs(3)> manpage."
16325 #: ../fish/guestfish.pod:283
16326 msgid "B<-N type> | B<--new type> | B<-N help>"
16330 #: ../fish/guestfish.pod:285
16332 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
16333 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
16334 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
16339 #: ../fish/guestfish.pod:290
16340 msgid "B<--progress-bars>"
16344 #: ../fish/guestfish.pod:292
16345 msgid "Enable progress bars, even when guestfish is used non-interactively."
16349 #: ../fish/guestfish.pod:294
16351 "Progress bars are enabled by default when guestfish is used as an "
16352 "interactive shell."
16356 #: ../fish/guestfish.pod:297
16357 msgid "B<--no-progress-bars>"
16361 #: ../fish/guestfish.pod:299
16362 msgid "Disable progress bars."
16366 #: ../fish/guestfish.pod:301
16367 msgid "B<--remote[=pid]>"
16371 #: ../fish/guestfish.pod:303
16373 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
16374 "CONTROL GUESTFISH OVER A SOCKET> below."
16378 #: ../fish/guestfish.pod:306 ../fuse/guestmount.pod:196
16379 msgid "B<-r> | B<--ro>"
16383 #: ../fish/guestfish.pod:308
16385 "This changes the I<-a> and I<-m> options so that disks are added and mounts "
16386 "are done read-only (see L<guestfs(3)/guestfs_mount_ro>)."
16390 #: ../fish/guestfish.pod:311 ../tools/virt-rescue.pl:187
16392 "The option must always be used if the disk image or virtual machine might be "
16393 "running, and is generally recommended in cases where you don't need write "
16394 "access to the disk."
16398 #: ../fish/guestfish.pod:315
16400 "Note that prepared disk images created with I<-N> are not affected by the "
16405 #: ../fish/guestfish.pod:318 ../fuse/guestmount.pod:206 ../tools/virt-rescue.pl:195
16406 msgid "B<--selinux>"
16410 #: ../fish/guestfish.pod:320
16411 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
16415 #: ../fish/guestfish.pod:322 ../fuse/guestmount.pod:210
16416 msgid "B<-v> | B<--verbose>"
16420 #: ../fish/guestfish.pod:324
16422 "Enable very verbose messages. This is particularly useful if you find a "
16427 #: ../fish/guestfish.pod:327 ../fuse/guestmount.pod:214
16428 msgid "B<-V> | B<--version>"
16432 #: ../fish/guestfish.pod:329
16433 msgid "Display the guestfish / libguestfs version number and exit."
16437 #: ../fish/guestfish.pod:331
16442 #: ../fish/guestfish.pod:333
16443 msgid "Echo each command before executing it."
16447 #: ../fish/guestfish.pod:337
16448 msgid "COMMANDS ON COMMAND LINE"
16452 #: ../fish/guestfish.pod:339
16453 msgid "Any additional (non-option) arguments are treated as commands to execute."
16457 #: ../fish/guestfish.pod:342
16459 "Commands to execute should be separated by a colon (C<:>), where the colon "
16460 "is a separate parameter. Thus:"
16464 #: ../fish/guestfish.pod:345
16467 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
16472 #: ../fish/guestfish.pod:347
16474 "If there are no additional arguments, then we enter a shell, either an "
16475 "interactive shell with a prompt (if the input is a terminal) or a "
16476 "non-interactive shell."
16480 #: ../fish/guestfish.pod:351
16482 "In either command line mode or non-interactive shell, the first command that "
16483 "gives an error causes the whole shell to exit. In interactive mode (with a "
16484 "prompt) if a command fails, you can continue to enter commands."
16488 #: ../fish/guestfish.pod:356
16489 msgid "USING launch (OR run)"
16493 #: ../fish/guestfish.pod:358
16495 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
16496 "then launch it, then mount any disks you need, and finally issue "
16497 "actions/commands. So the general order of the day is:"
16501 #: ../fish/guestfish.pod:366
16502 msgid "add or -a/--add"
16506 #: ../fish/guestfish.pod:370
16507 msgid "launch (aka run)"
16511 #: ../fish/guestfish.pod:374
16512 msgid "mount or -m/--mount"
16516 #: ../fish/guestfish.pod:378
16517 msgid "any other commands"
16521 #: ../fish/guestfish.pod:382
16523 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
16524 "guest before mounting or performing any other commands."
16528 #: ../fish/guestfish.pod:385
16530 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
16531 "I<--new> options were given then C<run> is done automatically, simply "
16532 "because guestfish can't perform the action you asked for without doing this."
16536 #: ../fish/guestfish.pod:390
16541 #: ../fish/guestfish.pod:392
16543 "You can quote ordinary parameters using either single or double quotes. For "
16548 #: ../fish/guestfish.pod:395
16551 " add \"file with a space.img\"\n"
16556 #: ../fish/guestfish.pod:397
16559 " rm '/file name'\n"
16564 #: ../fish/guestfish.pod:399
16572 #: ../fish/guestfish.pod:401
16574 "A few commands require a list of strings to be passed. For these, use a "
16575 "whitespace-separated list, enclosed in quotes. Strings containing "
16576 "whitespace to be passed through must be enclosed in single quotes. A "
16577 "literal single quote must be escaped with a backslash."
16581 #: ../fish/guestfish.pod:406
16584 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
16585 " command \"/bin/echo 'foo bar'\"\n"
16586 " command \"/bin/echo \\'foo\\'\"\n"
16591 #: ../fish/guestfish.pod:410
16592 msgid "OPTIONAL ARGUMENTS"
16596 #: ../fish/guestfish.pod:412
16598 "Some commands take optional arguments. These arguments appear in this "
16599 "documentation as C<[argname:..]>. You can use them as in these examples:"
16603 #: ../fish/guestfish.pod:416
16606 " add-drive-opts filename\n"
16611 #: ../fish/guestfish.pod:418
16614 " add-drive-opts filename readonly:true\n"
16619 #: ../fish/guestfish.pod:420
16622 " add-drive-opts filename format:qcow2 readonly:false\n"
16627 #: ../fish/guestfish.pod:422
16629 "Each optional argument can appear at most once. All optional arguments must "
16630 "appear after the required ones."
16634 #: ../fish/guestfish.pod:425
16639 #: ../fish/guestfish.pod:427
16640 msgid "This section applies to all commands which can take integers as parameters."
16644 #: ../fish/guestfish.pod:430
16645 msgid "SIZE SUFFIX"
16649 #: ../fish/guestfish.pod:432
16651 "When the command takes a parameter measured in bytes, you can use one of the "
16652 "following suffixes to specify kilobytes, megabytes and larger sizes:"
16656 #: ../fish/guestfish.pod:438
16657 msgid "B<k> or B<K> or B<KiB>"
16661 #: ../fish/guestfish.pod:440
16662 msgid "The size in kilobytes (multiplied by 1024)."
16666 #: ../fish/guestfish.pod:442
16671 #: ../fish/guestfish.pod:444
16672 msgid "The size in SI 1000 byte units."
16676 #: ../fish/guestfish.pod:446
16677 msgid "B<M> or B<MiB>"
16681 #: ../fish/guestfish.pod:448
16682 msgid "The size in megabytes (multiplied by 1048576)."
16686 #: ../fish/guestfish.pod:450
16691 #: ../fish/guestfish.pod:452
16692 msgid "The size in SI 1000000 byte units."
16696 #: ../fish/guestfish.pod:454
16697 msgid "B<G> or B<GiB>"
16701 #: ../fish/guestfish.pod:456
16702 msgid "The size in gigabytes (multiplied by 2**30)."
16706 #: ../fish/guestfish.pod:458
16711 #: ../fish/guestfish.pod:460
16712 msgid "The size in SI 10**9 byte units."
16716 #: ../fish/guestfish.pod:462
16717 msgid "B<T> or B<TiB>"
16721 #: ../fish/guestfish.pod:464
16722 msgid "The size in terabytes (multiplied by 2**40)."
16726 #: ../fish/guestfish.pod:466
16731 #: ../fish/guestfish.pod:468
16732 msgid "The size in SI 10**12 byte units."
16736 #: ../fish/guestfish.pod:470
16737 msgid "B<P> or B<PiB>"
16741 #: ../fish/guestfish.pod:472
16742 msgid "The size in petabytes (multiplied by 2**50)."
16746 #: ../fish/guestfish.pod:474
16751 #: ../fish/guestfish.pod:476
16752 msgid "The size in SI 10**15 byte units."
16756 #: ../fish/guestfish.pod:478
16757 msgid "B<E> or B<EiB>"
16761 #: ../fish/guestfish.pod:480
16762 msgid "The size in exabytes (multiplied by 2**60)."
16766 #: ../fish/guestfish.pod:482
16771 #: ../fish/guestfish.pod:484
16772 msgid "The size in SI 10**18 byte units."
16776 #: ../fish/guestfish.pod:486
16777 msgid "B<Z> or B<ZiB>"
16781 #: ../fish/guestfish.pod:488
16782 msgid "The size in zettabytes (multiplied by 2**70)."
16786 #: ../fish/guestfish.pod:490
16791 #: ../fish/guestfish.pod:492
16792 msgid "The size in SI 10**21 byte units."
16796 #: ../fish/guestfish.pod:494
16797 msgid "B<Y> or B<YiB>"
16801 #: ../fish/guestfish.pod:496
16802 msgid "The size in yottabytes (multiplied by 2**80)."
16806 #: ../fish/guestfish.pod:498
16811 #: ../fish/guestfish.pod:500
16812 msgid "The size in SI 10**24 byte units."
16816 #: ../fish/guestfish.pod:506
16819 " truncate-size /file 1G\n"
16824 #: ../fish/guestfish.pod:508
16825 msgid "would truncate the file to 1 gigabyte."
16829 #: ../fish/guestfish.pod:510
16831 "Be careful because a few commands take sizes in kilobytes or megabytes "
16832 "(eg. the parameter to L</memsize> is specified in megabytes already). "
16833 "Adding a suffix will probably not do what you expect."
16837 #: ../fish/guestfish.pod:514
16838 msgid "OCTAL AND HEXADECIMAL NUMBERS"
16842 #: ../fish/guestfish.pod:516
16844 "For specifying the radix (base) use the C convention: C<0> to prefix an "
16845 "octal number or C<0x> to prefix a hexadecimal number. For example:"
16849 #: ../fish/guestfish.pod:519
16852 " 1234 decimal number 1234\n"
16853 " 02322 octal number, equivalent to decimal 1234\n"
16854 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
16859 #: ../fish/guestfish.pod:523
16861 "When using the C<chmod> command, you almost always want to specify an octal "
16862 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
16863 "L<chmod(1)> program):"
16867 #: ../fish/guestfish.pod:527
16870 " chmod 0777 /public # OK\n"
16871 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
16876 #: ../fish/guestfish.pod:530
16878 "Commands that return numbers usually print them in decimal, but some "
16879 "commands print numbers in other radices (eg. C<umask> prints the mode in "
16880 "octal, preceeded by C<0>)."
16884 #: ../fish/guestfish.pod:534
16885 msgid "WILDCARDS AND GLOBBING"
16889 #: ../fish/guestfish.pod:536
16891 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
16892 "(globbing) by default. So for example the following will not do what you "
16897 #: ../fish/guestfish.pod:540
16905 #: ../fish/guestfish.pod:542
16907 "Assuming you don't have a directory called literally C</home/*> then the "
16908 "above command will return an error."
16912 #: ../fish/guestfish.pod:545
16913 msgid "To perform wildcard expansion, use the C<glob> command."
16917 #: ../fish/guestfish.pod:547
16920 " glob rm-rf /home/*\n"
16925 #: ../fish/guestfish.pod:549
16927 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
16928 "many times), equivalent to:"
16932 #: ../fish/guestfish.pod:552
16935 " rm-rf /home/jim\n"
16936 " rm-rf /home/joe\n"
16937 " rm-rf /home/mary\n"
16942 #: ../fish/guestfish.pod:556
16943 msgid "C<glob> only works on simple guest paths and not on device names."
16947 #: ../fish/guestfish.pod:558
16949 "If you have several parameters, each containing a wildcard, then glob will "
16950 "perform a Cartesian product."
16954 #: ../fish/guestfish.pod:561
16959 #: ../fish/guestfish.pod:563
16961 "Any line which starts with a I<#> character is treated as a comment and "
16962 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
16963 "a command. For example:"
16967 #: ../fish/guestfish.pod:567
16970 " # this is a comment\n"
16971 " # this is a comment\n"
16972 " foo # NOT a comment\n"
16977 #: ../fish/guestfish.pod:571
16978 msgid "Blank lines are also ignored."
16982 #: ../fish/guestfish.pod:573
16983 msgid "RUNNING COMMANDS LOCALLY"
16987 #: ../fish/guestfish.pod:575
16989 "Any line which starts with a I<!> character is treated as a command sent to "
16990 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
16994 #: ../fish/guestfish.pod:579
16998 " tgz-out /remote local/remote-data.tar.gz\n"
17003 #: ../fish/guestfish.pod:582
17005 "will create a directory C<local> on the host, and then export the contents "
17006 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
17007 "(See C<tgz-out>)."
17011 #: ../fish/guestfish.pod:586
17013 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
17014 "effect, due to the way that subprocesses work in Unix."
17018 #: ../fish/guestfish.pod:589
17023 #: ../fish/guestfish.pod:591
17025 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
17026 "command (a guestfish command) to the second command (any host command). For "
17031 #: ../fish/guestfish.pod:595
17034 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
17039 #: ../fish/guestfish.pod:597
17041 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
17042 "program). The above command would list all accounts in the guest filesystem "
17043 "which have UID 0, ie. root accounts including backdoors. Other examples:"
17047 #: ../fish/guestfish.pod:602
17050 " hexdump /bin/ls | head\n"
17051 " list-devices | tail -1\n"
17052 " tgz-out / - | tar ztf -\n"
17057 #: ../fish/guestfish.pod:606
17059 "The space before the pipe symbol is required, any space after the pipe "
17060 "symbol is optional. Everything after the pipe symbol is just passed "
17061 "straight to the host shell, so it can contain redirections, globs and "
17062 "anything else that makes sense on the host side."
17066 #: ../fish/guestfish.pod:611
17068 "To use a literal argument which begins with a pipe symbol, you have to quote "
17073 #: ../fish/guestfish.pod:614
17081 #: ../fish/guestfish.pod:616
17082 msgid "HOME DIRECTORIES"
17086 #: ../fish/guestfish.pod:618
17088 "If a parameter starts with the character C<~> then the tilde may be expanded "
17089 "as a home directory path (either C<~> for the current user's home directory, "
17090 "or C<~user> for another user)."
17094 #: ../fish/guestfish.pod:622
17096 "Note that home directory expansion happens for users known I<on the host>, "
17097 "not in the guest filesystem."
17101 #: ../fish/guestfish.pod:625
17103 "To use a literal argument which begins with a tilde, you have to quote it, "
17108 #: ../fish/guestfish.pod:628
17116 #: ../fish/guestfish.pod:632
17118 "Libguestfs has some support for Linux guests encrypted according to the "
17119 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
17120 "disk encryption systems used by modern Linux guests. Currently only "
17121 "LVM-on-LUKS is supported."
17125 #: ../fish/guestfish.pod:637
17126 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
17130 #: ../fish/guestfish.pod:639
17133 " ><fs> vfs-type /dev/sda2\n"
17139 #: ../fish/guestfish.pod:642
17141 "Then open those devices using L</luks-open>. This creates a device-mapper "
17142 "device called C</dev/mapper/luksdev>."
17146 #: ../fish/guestfish.pod:645
17149 " ><fs> luks-open /dev/sda2 luksdev\n"
17150 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
17155 #: ../fish/guestfish.pod:648
17157 "Finally you have to tell LVM to scan for volume groups on the newly created "
17162 #: ../fish/guestfish.pod:651
17166 " vg-activate-all true\n"
17171 #: ../fish/guestfish.pod:654
17172 msgid "The logical volume(s) can now be mounted in the usual way."
17176 #: ../fish/guestfish.pod:656
17178 "Before closing a LUKS device you must unmount any logical volumes on it and "
17179 "deactivate the volume groups by calling C<vg-activate false VG> on each "
17180 "one. Then you can close the mapper device:"
17184 #: ../fish/guestfish.pod:660
17187 " vg-activate false /dev/VG\n"
17188 " luks-close /dev/mapper/luksdev\n"
17193 #: ../fish/guestfish.pod:663
17194 msgid "WINDOWS PATHS"
17198 #: ../fish/guestfish.pod:665
17200 "If a path is prefixed with C<win:> then you can use Windows-style paths "
17201 "(with some limitations). The following commands are equivalent:"
17205 #: ../fish/guestfish.pod:668
17208 " file /WINDOWS/system32/config/system.LOG\n"
17213 #: ../fish/guestfish.pod:670
17216 " file win:/windows/system32/config/system.log\n"
17221 #: ../fish/guestfish.pod:672
17224 " file win:\\windows\\system32\\config\\system.log\n"
17229 #: ../fish/guestfish.pod:674
17232 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
17237 #: ../fish/guestfish.pod:676
17239 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
17240 "handles case insensitivity like Windows would. This only works in argument "
17241 "positions that expect a path."
17245 #: ../fish/guestfish.pod:680
17246 msgid "UPLOADING AND DOWNLOADING FILES"
17250 #: ../fish/guestfish.pod:682
17252 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
17253 "others which upload from or download to a local file, you can use the "
17254 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
17258 #: ../fish/guestfish.pod:686
17266 #: ../fish/guestfish.pod:688
17267 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
17271 #: ../fish/guestfish.pod:691
17274 " tar-out /etc - | tar tf -\n"
17279 #: ../fish/guestfish.pod:693
17281 "writes the tarball to stdout and then pipes that into the external \"tar\" "
17282 "command (see L</PIPES>)."
17286 #: ../fish/guestfish.pod:696
17288 "When using C<-> to read from stdin, the input is read up to the end of "
17289 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
17290 "some arbitrary end marker:"
17294 #: ../fish/guestfish.pod:700
17297 " upload -<<END /foo\n"
17306 #: ../fish/guestfish.pod:706
17308 "Any string of characters can be used instead of C<END>. The end marker must "
17309 "appear on a line of its own, without any preceeding or following characters "
17310 "(not even spaces)."
17314 #: ../fish/guestfish.pod:710
17316 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
17317 "upload local files (so-called \"FileIn\" parameters in the generator)."
17321 #: ../fish/guestfish.pod:713
17322 msgid "EXIT ON ERROR BEHAVIOUR"
17326 #: ../fish/guestfish.pod:715
17328 "By default, guestfish will ignore any errors when in interactive mode "
17329 "(ie. taking commands from a human over a tty), and will exit on the first "
17330 "error in non-interactive mode (scripts, commands given on the command line)."
17334 #: ../fish/guestfish.pod:720
17336 "If you prefix a command with a I<-> character, then that command will not "
17337 "cause guestfish to exit, even if that (one) command returns an error."
17341 #: ../fish/guestfish.pod:724
17342 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
17346 #: ../fish/guestfish.pod:726
17348 "Guestfish can be remote-controlled over a socket. This is useful "
17349 "particularly in shell scripts where you want to make several different "
17350 "changes to a filesystem, but you don't want the overhead of starting up a "
17351 "guestfish process each time."
17355 #: ../fish/guestfish.pod:731
17356 msgid "Start a guestfish server process using:"
17360 #: ../fish/guestfish.pod:733
17363 " eval `guestfish --listen`\n"
17368 #: ../fish/guestfish.pod:735
17369 msgid "and then send it commands by doing:"
17373 #: ../fish/guestfish.pod:737
17376 " guestfish --remote cmd [...]\n"
17381 #: ../fish/guestfish.pod:739
17382 msgid "To cause the server to exit, send it the exit command:"
17386 #: ../fish/guestfish.pod:741
17389 " guestfish --remote exit\n"
17394 #: ../fish/guestfish.pod:743
17396 "Note that the server will normally exit if there is an error in a command. "
17397 "You can change this in the usual way. See section L</EXIT ON ERROR "
17402 #: ../fish/guestfish.pod:747
17403 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
17407 #: ../fish/guestfish.pod:749
17409 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
17410 "is how the I<--remote> option knows where to send the commands. You can "
17411 "have several guestfish listener processes running using:"
17415 #: ../fish/guestfish.pod:753
17418 " eval `guestfish --listen`\n"
17419 " pid1=$GUESTFISH_PID\n"
17420 " eval `guestfish --listen`\n"
17421 " pid2=$GUESTFISH_PID\n"
17423 " guestfish --remote=$pid1 cmd\n"
17424 " guestfish --remote=$pid2 cmd\n"
17429 #: ../fish/guestfish.pod:761
17430 msgid "REMOTE CONTROL DETAILS"
17434 #: ../fish/guestfish.pod:763
17436 "Remote control happens over a Unix domain socket called "
17437 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
17438 "of the process, and C<$PID> is the process ID of the server."
17442 #: ../fish/guestfish.pod:767
17443 msgid "Guestfish client and server versions must match exactly."
17447 #: ../fish/guestfish.pod:769
17448 msgid "PREPARED DISK IMAGES"
17452 #: ../fish/guestfish.pod:771
17454 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
17455 "preformatted disk images that guestfish can make for you to save typing. "
17456 "This is particularly useful for testing purposes. This option is used "
17457 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
17458 "can be mixed with I<-a>)."
17462 #: ../fish/guestfish.pod:777
17464 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
17465 "the second and so on. Existing files in the current directory are "
17470 #: ../fish/guestfish.pod:781
17472 "The type briefly describes how the disk should be sized, partitioned, how "
17473 "filesystem(s) should be created, and how content should be added. "
17474 "Optionally the type can be followed by extra parameters, separated by C<:> "
17475 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
17476 "sparsely-allocated disk, containing a single partition, with the partition "
17477 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
17478 "on a 1GB disk instead."
17482 #: ../fish/guestfish.pod:789
17483 msgid "To list the available types and any extra parameters they take, run:"
17487 #: ../fish/guestfish.pod:793
17489 "Note that the prepared filesystem is not mounted. You would usually have to "
17490 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
17494 #: ../fish/guestfish.pod:797
17496 "If any I<-N> or I<--new> options are given, the guest is automatically "
17501 #: ../fish/guestfish.pod:802
17502 msgid "Create a 100MB disk with an ext4-formatted partition:"
17506 #: ../fish/guestfish.pod:804
17509 " guestfish -N fs:ext4\n"
17514 #: ../fish/guestfish.pod:806
17515 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
17519 #: ../fish/guestfish.pod:808
17522 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
17527 #: ../fish/guestfish.pod:810
17528 msgid "Create a blank 200MB disk:"
17532 #: ../fish/guestfish.pod:812
17535 " guestfish -N disk:200M\n"
17540 #: ../fish/guestfish.pod:814
17541 msgid "PROGRESS BARS"
17545 #: ../fish/guestfish.pod:816
17547 "Some (not all) long-running commands send progress notification messages as "
17548 "they are running. Guestfish turns these messages into progress bars."
17552 #: ../fish/guestfish.pod:820
17554 "When a command that supports progress bars takes longer than two seconds to "
17555 "run, and if progress bars are enabled, then you will see one appearing below "
17560 #: ../fish/guestfish.pod:824
17563 " ><fs> copy-size /large-file /another-file 2048M\n"
17564 " / 10% [#####-----------------------------------------] 00:30\n"
17569 #: ../fish/guestfish.pod:827
17571 "The spinner on the left hand side moves round once for every progress "
17572 "notification received from the backend. This is a (reasonably) golden "
17573 "assurance that the command is \"doing something\" even if the progress bar "
17574 "is not moving, because the command is able to send the progress "
17575 "notifications. When the bar reaches 100% and the command finishes, the "
17576 "spinner disappears."
17580 #: ../fish/guestfish.pod:834
17582 "Progress bars are enabled by default when guestfish is used interactively. "
17583 "You can enable them even for non-interactive modes using I<--progress-bars>, "
17584 "and you can disable them completely using I<--no-progress-bars>."
17588 #: ../fish/guestfish.pod:839
17589 msgid "GUESTFISH COMMANDS"
17593 #: ../fish/guestfish.pod:841
17595 "The commands in this section are guestfish convenience commands, in other "
17596 "words, they are not part of the L<guestfs(3)> API."
17600 #: ../fish/guestfish.pod:844
17605 #: ../fish/guestfish.pod:846
17614 #: ../fish/guestfish.pod:849
17615 msgid "Without any parameter, this provides general help."
17619 #: ../fish/guestfish.pod:851
17620 msgid "With a C<cmd> parameter, this displays detailed help for that command."
17624 #: ../fish/guestfish.pod:853
17625 msgid "quit | exit"
17629 #: ../fish/guestfish.pod:855
17630 msgid "This exits guestfish. You can also use C<^D> key."
17634 #: ../fish/guestfish.pod:857
17635 msgid "@FISH_COMMANDS@"
17639 #: ../fish/guestfish.pod:859
17644 #: ../fish/guestfish.pod:863 ../test-tool/libguestfs-test-tool.pod:83
17649 #: ../fish/guestfish.pod:865
17651 "guestfish returns 0 if the commands completed without error, or 1 if there "
17656 #: ../fish/guestfish.pod:872
17661 #: ../fish/guestfish.pod:874
17663 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
17668 #: ../fish/guestfish.pod:877
17669 msgid "GUESTFISH_PID"
17673 #: ../fish/guestfish.pod:879
17675 "Used with the I<--remote> option to specify the remote guestfish process to "
17676 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
17680 #: ../fish/guestfish.pod:883
17685 #: ../fish/guestfish.pod:885
17687 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
17688 "not specified, the external L<hexedit(1)> program is used."
17692 #: ../fish/guestfish.pod:889
17697 #: ../fish/guestfish.pod:891
17699 "If compiled with GNU readline support, various files in the home directory "
17700 "can be used. See L</FILES>."
17704 #: ../fish/guestfish.pod:900
17706 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
17707 "effect as using the B<-v> option."
17711 #: ../fish/guestfish.pod:912
17713 "Set the path that guestfish uses to search for kernel and initrd.img. See "
17714 "the discussion of paths in L<guestfs(3)>."
17718 #: ../fish/guestfish.pod:923
17719 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
17723 #: ../fish/guestfish.pod:925
17728 #: ../fish/guestfish.pod:927
17730 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
17735 #: ../fish/guestfish.pod:942 ../test-tool/libguestfs-test-tool.pod:88
17740 #: ../fish/guestfish.pod:946
17741 msgid "$HOME/.guestfish"
17745 #: ../fish/guestfish.pod:948
17747 "If compiled with GNU readline support, then the command history is saved in "
17752 #: ../fish/guestfish.pod:951
17753 msgid "$HOME/.inputrc"
17757 #: ../fish/guestfish.pod:953
17758 msgid "/etc/inputrc"
17762 #: ../fish/guestfish.pod:955
17764 "If compiled with GNU readline support, then these files can be used to "
17765 "configure readline. For further information, please see "
17766 "L<readline(3)/INITIALIZATION FILE>."
17770 #: ../fish/guestfish.pod:959
17771 msgid "To write rules which only apply to guestfish, use:"
17775 #: ../fish/guestfish.pod:961
17785 #: ../fish/guestfish.pod:965
17787 "Variables that you can set in inputrc that change the behaviour of guestfish "
17788 "in useful ways include:"
17792 #: ../fish/guestfish.pod:970
17793 msgid "completion-ignore-case (default: on)"
17797 #: ../fish/guestfish.pod:972
17799 "By default, guestfish will ignore case when tab-completing paths on the "
17804 #: ../fish/guestfish.pod:975
17807 " set completion-ignore-case off\n"
17812 #: ../fish/guestfish.pod:977
17813 msgid "to make guestfish case sensitive."
17817 #: ../fish/guestfish.pod:981
17822 #: ../fish/guestfish.pod:983
17823 msgid "test2.img (etc)"
17827 #: ../fish/guestfish.pod:985
17829 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
17830 "will be created in the file C<test1.img> in the current directory. The "
17831 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
17832 "the same name will be overwritten."
17836 #: ../fish/guestfish.pod:994
17838 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
17839 "L<virt-edit(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, "
17840 "L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
17841 "L<virt-tar(1)>, L<virt-win-reg(1)>, L<hexedit(1)>."
17845 #: ../fish/guestfish.pod:1018 ../test-tool/libguestfs-test-tool.pod:124 ../fuse/guestmount.pod:246 ../inspector/virt-inspector.pl:598 ../tools/virt-edit.pl:370 ../tools/virt-win-reg.pl:518 ../tools/virt-df.pl:657 ../tools/virt-ls.pl:251 ../tools/virt-resize.pl:1516 ../tools/virt-list-filesystems.pl:206 ../tools/virt-cat.pl:203 ../tools/virt-tar.pl:300 ../tools/virt-rescue.pl:285 ../tools/virt-make-fs.pl:567 ../tools/virt-list-partitions.pl:273
17847 "This program is free software; you can redistribute it and/or modify it "
17848 "under the terms of the GNU General Public License as published by the Free "
17849 "Software Foundation; either version 2 of the License, or (at your option) "
17850 "any later version."
17854 #: ../fish/guestfish.pod:1023 ../test-tool/libguestfs-test-tool.pod:129 ../fuse/guestmount.pod:251 ../inspector/virt-inspector.pl:603 ../tools/virt-edit.pl:375 ../tools/virt-win-reg.pl:523 ../tools/virt-df.pl:662 ../tools/virt-ls.pl:256 ../tools/virt-resize.pl:1521 ../tools/virt-list-filesystems.pl:211 ../tools/virt-cat.pl:208 ../tools/virt-tar.pl:305 ../tools/virt-rescue.pl:290 ../tools/virt-make-fs.pl:572 ../tools/virt-list-partitions.pl:278
17856 "This program is distributed in the hope that it will be useful, but WITHOUT "
17857 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
17858 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
17863 #: ../fish/guestfish.pod:1028 ../test-tool/libguestfs-test-tool.pod:134 ../fuse/guestmount.pod:256 ../inspector/virt-inspector.pl:608 ../tools/virt-edit.pl:380 ../tools/virt-win-reg.pl:528 ../tools/virt-df.pl:667 ../tools/virt-ls.pl:261 ../tools/virt-resize.pl:1526 ../tools/virt-list-filesystems.pl:216 ../tools/virt-cat.pl:213 ../tools/virt-tar.pl:310 ../tools/virt-rescue.pl:295 ../tools/virt-make-fs.pl:577 ../tools/virt-list-partitions.pl:283
17865 "You should have received a copy of the GNU General Public License along with "
17866 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
17867 "Ave, Cambridge, MA 02139, USA."
17871 #: ../fish/guestfish-actions.pod:1
17876 #: ../fish/guestfish-actions.pod:3
17879 " add-cdrom filename\n"
17884 #: ../fish/guestfish-actions.pod:15
17886 "This call checks for the existence of C<filename>. This stops you from "
17887 "specifying other types of drive which are supported by qemu such as C<nbd:> "
17888 "and C<http:> URLs. To specify those, use the general L</config> call "
17893 #: ../fish/guestfish-actions.pod:22
17895 "If you just want to add an ISO file (often you use this as an efficient way "
17896 "to transfer large files into the guest), then you should probably use "
17897 "L</add-drive-ro> instead."
17901 #: ../fish/guestfish-actions.pod:35
17906 #: ../fish/guestfish-actions.pod:37
17909 " add-drive filename\n"
17914 #: ../fish/guestfish-actions.pod:39
17916 "This function is the equivalent of calling L</add-drive-opts> with no "
17917 "optional parameters, so the disk is added writable, with the format being "
17918 "detected automatically."
17922 #: ../fish/guestfish-actions.pod:43
17924 "Automatic detection of the format opens you up to a potential security hole "
17925 "when dealing with untrusted raw-format images. See CVE-2010-3851 and "
17926 "RHBZ#642934. Specifying the format closes this security hole. Therefore "
17927 "you should think about replacing calls to this function with calls to "
17928 "L</add-drive-opts>, and specifying the format."
17932 #: ../fish/guestfish-actions.pod:50
17933 msgid "add-drive-opts"
17937 #: ../fish/guestfish-actions.pod:52
17942 #: ../fish/guestfish-actions.pod:54
17945 " add-drive-opts filename [readonly:..] [format:..] [iface:..]\n"
17950 #: ../fish/guestfish-actions.pod:81
17952 "This forces the image format. If you omit this (or use L</add-drive> or "
17953 "L</add-drive-ro>) then the format is automatically detected. Possible "
17954 "formats include C<raw> and C<qcow2>."
17958 #: ../fish/guestfish-actions.pod:92
17960 "This rarely-used option lets you emulate the behaviour of the deprecated "
17961 "L</add-drive-with-if> call (q.v.)"
17965 #: ../fish/guestfish-actions.pod:97
17967 "This command has one or more optional arguments. See L</OPTIONAL "
17972 #: ../fish/guestfish-actions.pod:99
17973 msgid "add-drive-ro"
17977 #: ../fish/guestfish-actions.pod:101
17982 #: ../fish/guestfish-actions.pod:103
17985 " add-drive-ro filename\n"
17990 #: ../fish/guestfish-actions.pod:105
17992 "This function is the equivalent of calling L</add-drive-opts> with the "
17993 "optional parameter C<GUESTFS_ADD_DRIVE_OPTS_READONLY> set to 1, so the disk "
17994 "is added read-only, with the format being detected automatically."
17998 #: ../fish/guestfish-actions.pod:110
17999 msgid "add-drive-ro-with-if"
18003 #: ../fish/guestfish-actions.pod:112
18006 " add-drive-ro-with-if filename iface\n"
18011 #: ../fish/guestfish-actions.pod:114
18013 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
18014 "interface emulation to use at run time."
18018 #: ../fish/guestfish-actions.pod:124
18019 msgid "add-drive-with-if"
18023 #: ../fish/guestfish-actions.pod:126
18026 " add-drive-with-if filename iface\n"
18031 #: ../fish/guestfish-actions.pod:128
18033 "This is the same as L</add-drive> but it allows you to specify the QEMU "
18034 "interface emulation to use at run time."
18038 #: ../fish/guestfish-actions.pod:138
18043 #: ../fish/guestfish-actions.pod:140
18046 " aug-clear augpath\n"
18051 #: ../fish/guestfish-actions.pod:145
18056 #: ../fish/guestfish-actions.pod:147
18064 #: ../fish/guestfish-actions.pod:149
18066 "Close the current Augeas handle and free up any resources used by it. After "
18067 "calling this, you have to call L</aug-init> again before you can use any "
18068 "other Augeas functions."
18072 #: ../fish/guestfish-actions.pod:154
18073 msgid "aug-defnode"
18077 #: ../fish/guestfish-actions.pod:156
18080 " aug-defnode name expr val\n"
18085 #: ../fish/guestfish-actions.pod:161
18087 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
18088 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
18089 "containing that single node."
18093 #: ../fish/guestfish-actions.pod:169
18098 #: ../fish/guestfish-actions.pod:171
18101 " aug-defvar name expr\n"
18106 #: ../fish/guestfish-actions.pod:180
18111 #: ../fish/guestfish-actions.pod:182
18114 " aug-get augpath\n"
18119 #: ../fish/guestfish-actions.pod:187
18124 #: ../fish/guestfish-actions.pod:189
18127 " aug-init root flags\n"
18132 #: ../fish/guestfish-actions.pod:195
18133 msgid "You must call this before using any other L</aug-*> commands."
18137 #: ../fish/guestfish-actions.pod:230
18138 msgid "Do not load the tree in L</aug-init>."
18142 #: ../fish/guestfish-actions.pod:234
18143 msgid "To close the handle, you can call L</aug-close>."
18147 #: ../fish/guestfish-actions.pod:238
18152 #: ../fish/guestfish-actions.pod:240
18155 " aug-insert augpath label true|false\n"
18160 #: ../fish/guestfish-actions.pod:250
18165 #: ../fish/guestfish-actions.pod:252
18173 #: ../fish/guestfish-actions.pod:259
18178 #: ../fish/guestfish-actions.pod:261
18181 " aug-ls augpath\n"
18186 #: ../fish/guestfish-actions.pod:263
18188 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
18189 "resulting nodes into alphabetical order."
18193 #: ../fish/guestfish-actions.pod:266
18198 #: ../fish/guestfish-actions.pod:268
18201 " aug-match augpath\n"
18206 #: ../fish/guestfish-actions.pod:274
18211 #: ../fish/guestfish-actions.pod:276
18214 " aug-mv src dest\n"
18219 #: ../fish/guestfish-actions.pod:281
18224 #: ../fish/guestfish-actions.pod:283
18227 " aug-rm augpath\n"
18232 #: ../fish/guestfish-actions.pod:289
18237 #: ../fish/guestfish-actions.pod:291
18245 #: ../fish/guestfish-actions.pod:295
18247 "The flags which were passed to L</aug-init> affect exactly how files are "
18252 #: ../fish/guestfish-actions.pod:298
18257 #: ../fish/guestfish-actions.pod:300
18260 " aug-set augpath val\n"
18265 #: ../fish/guestfish-actions.pod:304
18267 "In the Augeas API, it is possible to clear a node by setting the value to "
18268 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
18269 "this call. Instead you must use the L</aug-clear> call."
18273 #: ../fish/guestfish-actions.pod:309
18278 #: ../fish/guestfish-actions.pod:311
18281 " available 'groups ...'\n"
18286 #: ../fish/guestfish-actions.pod:317
18288 "The libguestfs groups, and the functions that those groups correspond to, "
18289 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
18290 "runtime by calling L</available-all-groups>."
18294 #: ../fish/guestfish-actions.pod:341
18295 msgid "You must call L</launch> before calling this function."
18299 #: ../fish/guestfish-actions.pod:363
18301 "This call was added in version C<1.0.80>. In previous versions of "
18302 "libguestfs all you could do would be to speculatively execute a command to "
18303 "find out if the daemon implemented it. See also L</version>."
18307 #: ../fish/guestfish-actions.pod:370
18308 msgid "available-all-groups"
18312 #: ../fish/guestfish-actions.pod:372
18315 " available-all-groups\n"
18320 #: ../fish/guestfish-actions.pod:374
18322 "This command returns a list of all optional groups that this daemon knows "
18323 "about. Note this returns both supported and unsupported groups. To find "
18324 "out which ones the daemon can actually support you have to call "
18325 "L</available> on each member of the returned list."
18329 #: ../fish/guestfish-actions.pod:380
18330 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
18334 #: ../fish/guestfish-actions.pod:382
18339 #: ../fish/guestfish-actions.pod:384
18342 " base64-in (base64file|-) filename\n"
18347 #: ../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:3932 ../fish/guestfish-actions.pod:3944 ../fish/guestfish-actions.pod:3955 ../fish/guestfish-actions.pod:3966 ../fish/guestfish-actions.pod:4018 ../fish/guestfish-actions.pod:4027 ../fish/guestfish-actions.pod:4081 ../fish/guestfish-actions.pod:4104
18348 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
18352 #: ../fish/guestfish-actions.pod:391
18357 #: ../fish/guestfish-actions.pod:393
18360 " base64-out filename (base64file|-)\n"
18365 #: ../fish/guestfish-actions.pod:400
18366 msgid "blockdev-flushbufs"
18370 #: ../fish/guestfish-actions.pod:402
18373 " blockdev-flushbufs device\n"
18378 #: ../fish/guestfish-actions.pod:409
18379 msgid "blockdev-getbsz"
18383 #: ../fish/guestfish-actions.pod:411
18386 " blockdev-getbsz device\n"
18391 #: ../fish/guestfish-actions.pod:420
18392 msgid "blockdev-getro"
18396 #: ../fish/guestfish-actions.pod:422
18399 " blockdev-getro device\n"
18404 #: ../fish/guestfish-actions.pod:429
18405 msgid "blockdev-getsize64"
18409 #: ../fish/guestfish-actions.pod:431
18412 " blockdev-getsize64 device\n"
18417 #: ../fish/guestfish-actions.pod:435
18418 msgid "See also L</blockdev-getsz>."
18422 #: ../fish/guestfish-actions.pod:439
18423 msgid "blockdev-getss"
18427 #: ../fish/guestfish-actions.pod:441
18430 " blockdev-getss device\n"
18435 #: ../fish/guestfish-actions.pod:446
18436 msgid "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
18440 #: ../fish/guestfish-actions.pod:451
18441 msgid "blockdev-getsz"
18445 #: ../fish/guestfish-actions.pod:453
18448 " blockdev-getsz device\n"
18453 #: ../fish/guestfish-actions.pod:458
18455 "See also L</blockdev-getss> for the real sector size of the device, and "
18456 "L</blockdev-getsize64> for the more useful I<size in bytes>."
18460 #: ../fish/guestfish-actions.pod:464
18461 msgid "blockdev-rereadpt"
18465 #: ../fish/guestfish-actions.pod:466
18468 " blockdev-rereadpt device\n"
18473 #: ../fish/guestfish-actions.pod:472
18474 msgid "blockdev-setbsz"
18478 #: ../fish/guestfish-actions.pod:474
18481 " blockdev-setbsz device blocksize\n"
18486 #: ../fish/guestfish-actions.pod:483
18487 msgid "blockdev-setro"
18491 #: ../fish/guestfish-actions.pod:485
18494 " blockdev-setro device\n"
18499 #: ../fish/guestfish-actions.pod:491
18500 msgid "blockdev-setrw"
18504 #: ../fish/guestfish-actions.pod:493
18507 " blockdev-setrw device\n"
18512 #: ../fish/guestfish-actions.pod:499
18513 msgid "case-sensitive-path"
18517 #: ../fish/guestfish-actions.pod:501
18520 " case-sensitive-path path\n"
18525 #: ../fish/guestfish-actions.pod:525
18527 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return "
18528 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
18529 "how the directories were originally created under Windows)."
18533 #: ../fish/guestfish-actions.pod:533
18534 msgid "See also L</realpath>."
18538 #: ../fish/guestfish-actions.pod:535
18543 #: ../fish/guestfish-actions.pod:537
18551 #: ../fish/guestfish-actions.pod:541
18553 "Note that this function cannot correctly handle binary files (specifically, "
18554 "files containing C<\\0> character which is treated as end of string). For "
18555 "those you need to use the L</read-file> or L</download> functions which have "
18556 "a more complex interface."
18560 #: ../fish/guestfish-actions.pod:549
18565 #: ../fish/guestfish-actions.pod:551
18568 " checksum csumtype path\n"
18573 #: ../fish/guestfish-actions.pod:594
18574 msgid "To get the checksum for a device, use L</checksum-device>."
18578 #: ../fish/guestfish-actions.pod:596
18579 msgid "To get the checksums for many files, use L</checksums-out>."
18583 #: ../fish/guestfish-actions.pod:598
18584 msgid "checksum-device"
18588 #: ../fish/guestfish-actions.pod:600
18591 " checksum-device csumtype device\n"
18596 #: ../fish/guestfish-actions.pod:602
18598 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
18599 "device named C<device>. For the types of checksums supported see the "
18600 "L</checksum> command."
18604 #: ../fish/guestfish-actions.pod:606
18605 msgid "checksums-out"
18609 #: ../fish/guestfish-actions.pod:608
18612 " checksums-out csumtype directory (sumsfile|-)\n"
18617 #: ../fish/guestfish-actions.pod:624
18622 #: ../fish/guestfish-actions.pod:626
18625 " chmod mode path\n"
18630 #: ../fish/guestfish-actions.pod:637
18635 #: ../fish/guestfish-actions.pod:639
18638 " chown owner group path\n"
18643 #: ../fish/guestfish-actions.pod:647
18648 #: ../fish/guestfish-actions.pod:649
18651 " command 'arguments ...'\n"
18656 #: ../fish/guestfish-actions.pod:656
18658 "The single parameter is an argv-style list of arguments. The first element "
18659 "is the name of the program to run. Subsequent elements are parameters. The "
18660 "list must be non-empty (ie. must contain a program name). Note that the "
18661 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
18665 #: ../fish/guestfish-actions.pod:684
18666 msgid "command-lines"
18670 #: ../fish/guestfish-actions.pod:686
18673 " command-lines 'arguments ...'\n"
18678 #: ../fish/guestfish-actions.pod:688
18679 msgid "This is the same as L</command>, but splits the result into a list of lines."
18683 #: ../fish/guestfish-actions.pod:691
18684 msgid "See also: L</sh-lines>"
18688 #: ../fish/guestfish-actions.pod:696
18693 #: ../fish/guestfish-actions.pod:698
18696 " config qemuparam qemuvalue\n"
18701 #: ../fish/guestfish-actions.pod:709
18706 #: ../fish/guestfish-actions.pod:711
18709 " copy-size src dest size\n"
18714 #: ../fish/guestfish-actions.pod:719
18719 #: ../fish/guestfish-actions.pod:721
18727 #: ../fish/guestfish-actions.pod:726
18732 #: ../fish/guestfish-actions.pod:728
18740 #: ../fish/guestfish-actions.pod:733
18745 #: ../fish/guestfish-actions.pod:735
18753 #: ../fish/guestfish-actions.pod:742
18755 "If the destination is a device, it must be as large or larger than the "
18756 "source file or device, otherwise the copy will fail. This command cannot do "
18757 "partial copies (see L</copy-size>)."
18761 #: ../fish/guestfish-actions.pod:746
18766 #: ../fish/guestfish-actions.pod:748
18769 " debug subcmd 'extraargs ...'\n"
18774 #: ../fish/guestfish-actions.pod:750
18776 "The L</debug> command exposes some internals of C<guestfsd> (the guestfs "
18777 "daemon) that runs inside the qemu subprocess."
18781 #: ../fish/guestfish-actions.pod:758
18782 msgid "debug-upload"
18786 #: ../fish/guestfish-actions.pod:760
18789 " debug-upload (filename|-) tmpname mode\n"
18794 #: ../fish/guestfish-actions.pod:762
18795 msgid "The L</debug-upload> command uploads a file to the libguestfs appliance."
18799 #: ../fish/guestfish-actions.pod:771
18804 #: ../fish/guestfish-actions.pod:773
18812 #: ../fish/guestfish-actions.pod:781
18817 #: ../fish/guestfish-actions.pod:783
18825 #: ../fish/guestfish-actions.pod:792
18830 #: ../fish/guestfish-actions.pod:794
18838 #: ../fish/guestfish-actions.pod:800
18840 "Another way to get the same information is to enable verbose messages with "
18841 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
18842 "before running the program."
18846 #: ../fish/guestfish-actions.pod:805
18851 #: ../fish/guestfish-actions.pod:807
18854 " download remotefilename (filename|-)\n"
18859 #: ../fish/guestfish-actions.pod:814
18860 msgid "See also L</upload>, L</cat>."
18864 #: ../fish/guestfish-actions.pod:818
18865 msgid "download-offset"
18869 #: ../fish/guestfish-actions.pod:820
18872 " download-offset remotefilename (filename|-) offset size\n"
18877 #: ../fish/guestfish-actions.pod:828
18879 "Note that there is no limit on the amount of data that can be downloaded "
18880 "with this call, unlike with L</pread>, and this call always reads the full "
18881 "amount unless an error occurs."
18885 #: ../fish/guestfish-actions.pod:833
18886 msgid "See also L</download>, L</pread>."
18890 #: ../fish/guestfish-actions.pod:837
18891 msgid "drop-caches"
18895 #: ../fish/guestfish-actions.pod:839
18898 " drop-caches whattodrop\n"
18903 #: ../fish/guestfish-actions.pod:851
18908 #: ../fish/guestfish-actions.pod:853
18916 #: ../fish/guestfish-actions.pod:865
18921 #: ../fish/guestfish-actions.pod:867
18924 " e2fsck-f device\n"
18929 #: ../fish/guestfish-actions.pod:873
18931 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
18932 "should use L</fsck>."
18936 #: ../fish/guestfish-actions.pod:876
18937 msgid "echo-daemon"
18941 #: ../fish/guestfish-actions.pod:878
18944 " echo-daemon 'words ...'\n"
18949 #: ../fish/guestfish-actions.pod:885
18950 msgid "See also L</ping-daemon>."
18954 #: ../fish/guestfish-actions.pod:887
18959 #: ../fish/guestfish-actions.pod:889
18962 " egrep regex path\n"
18967 #: ../fish/guestfish-actions.pod:897
18972 #: ../fish/guestfish-actions.pod:899
18975 " egrepi regex path\n"
18980 #: ../fish/guestfish-actions.pod:907
18985 #: ../fish/guestfish-actions.pod:909
18988 " equal file1 file2\n"
18993 #: ../fish/guestfish-actions.pod:916
18998 #: ../fish/guestfish-actions.pod:918
19006 #: ../fish/guestfish-actions.pod:923
19007 msgid "See also L</is-file>, L</is-dir>, L</stat>."
19011 #: ../fish/guestfish-actions.pod:925
19016 #: ../fish/guestfish-actions.pod:927
19019 " fallocate path len\n"
19024 #: ../fish/guestfish-actions.pod:944
19025 msgid "fallocate64"
19029 #: ../fish/guestfish-actions.pod:946
19032 " fallocate64 path len\n"
19037 #: ../fish/guestfish-actions.pod:952
19039 "Note that this call allocates disk blocks for the file. To create a sparse "
19040 "file use L</truncate-size> instead."
19044 #: ../fish/guestfish-actions.pod:955
19046 "The deprecated call L</fallocate> does the same, but owing to an oversight "
19047 "it only allowed 30 bit lengths to be specified, effectively limiting the "
19048 "maximum size of files created through that call to 1GB."
19052 #: ../fish/guestfish-actions.pod:964
19057 #: ../fish/guestfish-actions.pod:966
19060 " fgrep pattern path\n"
19065 #: ../fish/guestfish-actions.pod:974
19070 #: ../fish/guestfish-actions.pod:976
19073 " fgrepi pattern path\n"
19078 #: ../fish/guestfish-actions.pod:984
19083 #: ../fish/guestfish-actions.pod:986
19091 #: ../fish/guestfish-actions.pod:998
19093 "This command can also be used on C</dev/> devices (and partitions, LV "
19094 "names). You can for example use this to determine if a device contains a "
19095 "filesystem, although it's usually better to use L</vfs-type>."
19099 #: ../fish/guestfish-actions.pod:1008
19100 msgid "file-architecture"
19104 #: ../fish/guestfish-actions.pod:1010
19107 " file-architecture filename\n"
19112 #: ../fish/guestfish-actions.pod:1113
19117 #: ../fish/guestfish-actions.pod:1115
19125 #: ../fish/guestfish-actions.pod:1119
19127 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, "
19128 "L</is-file> etc. To get the size of block devices, use "
19129 "L</blockdev-getsize64>."
19133 #: ../fish/guestfish-actions.pod:1123
19138 #: ../fish/guestfish-actions.pod:1125
19141 " fill c len path\n"
19146 #: ../fish/guestfish-actions.pod:1131
19148 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
19149 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
19150 "L</fill-pattern>."
19154 #: ../fish/guestfish-actions.pod:1136
19155 msgid "fill-pattern"
19159 #: ../fish/guestfish-actions.pod:1138
19162 " fill-pattern pattern len path\n"
19167 #: ../fish/guestfish-actions.pod:1140
19169 "This function is like L</fill> except that it creates a new file of length "
19170 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
19171 "is truncated if necessary to ensure the length of the file is exactly C<len> "
19176 #: ../fish/guestfish-actions.pod:1145
19181 #: ../fish/guestfish-actions.pod:1147
19184 " find directory\n"
19189 #: ../fish/guestfish-actions.pod:1161
19190 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
19194 #: ../fish/guestfish-actions.pod:1174
19195 msgid "See also L</find0>."
19199 #: ../fish/guestfish-actions.pod:1179
19204 #: ../fish/guestfish-actions.pod:1181
19207 " find0 directory (files|-)\n"
19212 #: ../fish/guestfish-actions.pod:1187
19213 msgid "This command works the same way as L</find> with the following exceptions:"
19217 #: ../fish/guestfish-actions.pod:1214
19218 msgid "findfs-label"
19222 #: ../fish/guestfish-actions.pod:1216
19225 " findfs-label label\n"
19230 #: ../fish/guestfish-actions.pod:1222
19231 msgid "To find the label of a filesystem, use L</vfs-label>."
19235 #: ../fish/guestfish-actions.pod:1224
19236 msgid "findfs-uuid"
19240 #: ../fish/guestfish-actions.pod:1226
19243 " findfs-uuid uuid\n"
19248 #: ../fish/guestfish-actions.pod:1232
19249 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
19253 #: ../fish/guestfish-actions.pod:1234
19258 #: ../fish/guestfish-actions.pod:1236
19261 " fsck fstype device\n"
19266 #: ../fish/guestfish-actions.pod:1266
19271 #: ../fish/guestfish-actions.pod:1268
19279 #: ../fish/guestfish-actions.pod:1275
19280 msgid "get-autosync"
19284 #: ../fish/guestfish-actions.pod:1277
19292 #: ../fish/guestfish-actions.pod:1281
19297 #: ../fish/guestfish-actions.pod:1283
19305 #: ../fish/guestfish-actions.pod:1287
19306 msgid "get-e2label"
19310 #: ../fish/guestfish-actions.pod:1289
19313 " get-e2label device\n"
19318 #: ../fish/guestfish-actions.pod:1301
19323 #: ../fish/guestfish-actions.pod:1303
19326 " get-e2uuid device\n"
19331 #: ../fish/guestfish-actions.pod:1315
19332 msgid "get-memsize"
19336 #: ../fish/guestfish-actions.pod:1317
19344 #: ../fish/guestfish-actions.pod:1322
19346 "If L</set-memsize> was not called on this handle, and if "
19347 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
19348 "value for memsize."
19352 #: ../fish/guestfish-actions.pod:1329
19353 msgid "get-network"
19357 #: ../fish/guestfish-actions.pod:1331
19365 #: ../fish/guestfish-actions.pod:1335
19370 #: ../fish/guestfish-actions.pod:1337
19378 #: ../fish/guestfish-actions.pod:1344
19383 #: ../fish/guestfish-actions.pod:1346
19388 #: ../fish/guestfish-actions.pod:1348
19396 #: ../fish/guestfish-actions.pod:1355
19401 #: ../fish/guestfish-actions.pod:1357
19409 #: ../fish/guestfish-actions.pod:1364
19410 msgid "get-recovery-proc"
19414 #: ../fish/guestfish-actions.pod:1366
19417 " get-recovery-proc\n"
19422 #: ../fish/guestfish-actions.pod:1370
19423 msgid "get-selinux"
19427 #: ../fish/guestfish-actions.pod:1372
19435 #: ../fish/guestfish-actions.pod:1374
19437 "This returns the current setting of the selinux flag which is passed to the "
19438 "appliance at boot time. See L</set-selinux>."
19442 #: ../fish/guestfish-actions.pod:1380
19447 #: ../fish/guestfish-actions.pod:1382
19455 #: ../fish/guestfish-actions.pod:1389
19460 #: ../fish/guestfish-actions.pod:1391
19468 #: ../fish/guestfish-actions.pod:1395
19473 #: ../fish/guestfish-actions.pod:1397
19481 #: ../fish/guestfish-actions.pod:1399
19483 "Return the current umask. By default the umask is C<022> unless it has been "
19484 "set by calling L</umask>."
19488 #: ../fish/guestfish-actions.pod:1402
19489 msgid "get-verbose"
19493 #: ../fish/guestfish-actions.pod:1404
19501 #: ../fish/guestfish-actions.pod:1408
19506 #: ../fish/guestfish-actions.pod:1410
19514 #: ../fish/guestfish-actions.pod:1414
19515 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
19519 #: ../fish/guestfish-actions.pod:1417
19524 #: ../fish/guestfish-actions.pod:1419
19527 " getxattrs path\n"
19532 #: ../fish/guestfish-actions.pod:1427
19533 msgid "See also: L</lgetxattrs>, L<attr(5)>."
19537 #: ../fish/guestfish-actions.pod:1429
19538 msgid "glob-expand"
19542 #: ../fish/guestfish-actions.pod:1431
19545 " glob-expand pattern\n"
19550 #: ../fish/guestfish-actions.pod:1444
19555 #: ../fish/guestfish-actions.pod:1446
19558 " grep regex path\n"
19563 #: ../fish/guestfish-actions.pod:1454
19568 #: ../fish/guestfish-actions.pod:1456
19571 " grepi regex path\n"
19576 #: ../fish/guestfish-actions.pod:1464
19577 msgid "grub-install"
19581 #: ../fish/guestfish-actions.pod:1466
19584 " grub-install root device\n"
19589 #: ../fish/guestfish-actions.pod:1482
19594 #: ../fish/guestfish-actions.pod:1484
19602 #: ../fish/guestfish-actions.pod:1492
19607 #: ../fish/guestfish-actions.pod:1494
19610 " head-n nrlines path\n"
19615 #: ../fish/guestfish-actions.pod:1507
19620 #: ../fish/guestfish-actions.pod:1509
19628 #: ../fish/guestfish-actions.pod:1517
19633 #: ../fish/guestfish-actions.pod:1519
19636 " initrd-cat initrdpath filename\n"
19641 #: ../fish/guestfish-actions.pod:1531
19642 msgid "See also L</initrd-list>."
19646 #: ../fish/guestfish-actions.pod:1536
19647 msgid "initrd-list"
19651 #: ../fish/guestfish-actions.pod:1538
19654 " initrd-list path\n"
19659 #: ../fish/guestfish-actions.pod:1550
19660 msgid "inotify-add-watch"
19664 #: ../fish/guestfish-actions.pod:1552
19667 " inotify-add-watch path mask\n"
19672 #: ../fish/guestfish-actions.pod:1564
19673 msgid "inotify-close"
19677 #: ../fish/guestfish-actions.pod:1566
19685 #: ../fish/guestfish-actions.pod:1572
19686 msgid "inotify-files"
19690 #: ../fish/guestfish-actions.pod:1574
19698 #: ../fish/guestfish-actions.pod:1576
19700 "This function is a helpful wrapper around L</inotify-read> which just "
19701 "returns a list of pathnames of objects that were touched. The returned "
19702 "pathnames are sorted and deduplicated."
19706 #: ../fish/guestfish-actions.pod:1580
19707 msgid "inotify-init"
19711 #: ../fish/guestfish-actions.pod:1582
19714 " inotify-init maxevents\n"
19719 #: ../fish/guestfish-actions.pod:1588
19721 "C<maxevents> is the maximum number of events which will be queued up between "
19722 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
19723 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
19724 "default was 16384 events. Beyond this limit, the kernel throws away events, "
19725 "but records the fact that it threw them away by setting a flag "
19726 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
19730 #: ../fish/guestfish-actions.pod:1598
19732 "Before any events are generated, you have to add some watches to the "
19733 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
19734 "L</inotify-watch-all>."
19738 #: ../fish/guestfish-actions.pod:1604
19740 "Queued up events should be read periodically by calling L</inotify-read> (or "
19741 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
19742 "If you don't read the events out often enough then you risk the internal "
19743 "queue overflowing."
19747 #: ../fish/guestfish-actions.pod:1611
19749 "The handle should be closed after use by calling L</inotify-close>. This "
19750 "also removes any watches automatically."
19754 #: ../fish/guestfish-actions.pod:1620
19755 msgid "inotify-read"
19759 #: ../fish/guestfish-actions.pod:1622
19767 #: ../fish/guestfish-actions.pod:1635
19768 msgid "inotify-rm-watch"
19772 #: ../fish/guestfish-actions.pod:1637
19775 " inotify-rm-watch wd\n"
19780 #: ../fish/guestfish-actions.pod:1639
19781 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
19785 #: ../fish/guestfish-actions.pod:1642
19786 msgid "inspect-get-arch"
19790 #: ../fish/guestfish-actions.pod:1644
19793 " inspect-get-arch root\n"
19798 #: ../fish/guestfish-actions.pod:1646 ../fish/guestfish-actions.pod:1662 ../fish/guestfish-actions.pod:1728 ../fish/guestfish-actions.pod:1746 ../fish/guestfish-actions.pod:1767 ../fish/guestfish-actions.pod:1782 ../fish/guestfish-actions.pod:1805 ../fish/guestfish-actions.pod:1822 ../fish/guestfish-actions.pod:1853
19800 "This function should only be called with a root device string as returned by "
19805 #: ../fish/guestfish-actions.pod:1649
19807 "This returns the architecture of the inspected operating system. The "
19808 "possible return values are listed under L</file-architecture>."
19812 #: ../fish/guestfish-actions.pod:1658
19813 msgid "inspect-get-distro"
19817 #: ../fish/guestfish-actions.pod:1660
19820 " inspect-get-distro root\n"
19825 #: ../fish/guestfish-actions.pod:1724
19826 msgid "inspect-get-filesystems"
19830 #: ../fish/guestfish-actions.pod:1726
19833 " inspect-get-filesystems root\n"
19838 #: ../fish/guestfish-actions.pod:1739
19840 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
19841 "L</inspect-get-mountpoints>."
19845 #: ../fish/guestfish-actions.pod:1742
19846 msgid "inspect-get-major-version"
19850 #: ../fish/guestfish-actions.pod:1744
19853 " inspect-get-major-version root\n"
19858 #: ../fish/guestfish-actions.pod:1763
19859 msgid "inspect-get-minor-version"
19863 #: ../fish/guestfish-actions.pod:1765
19866 " inspect-get-minor-version root\n"
19871 #: ../fish/guestfish-actions.pod:1775
19873 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
19874 "L</inspect-get-major-version>."
19878 #: ../fish/guestfish-actions.pod:1778
19879 msgid "inspect-get-mountpoints"
19883 #: ../fish/guestfish-actions.pod:1780
19886 " inspect-get-mountpoints root\n"
19891 #: ../fish/guestfish-actions.pod:1798
19893 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
19894 "L</inspect-get-filesystems>."
19898 #: ../fish/guestfish-actions.pod:1801
19899 msgid "inspect-get-product-name"
19903 #: ../fish/guestfish-actions.pod:1803
19906 " inspect-get-product-name root\n"
19911 #: ../fish/guestfish-actions.pod:1818
19912 msgid "inspect-get-type"
19916 #: ../fish/guestfish-actions.pod:1820
19919 " inspect-get-type root\n"
19924 #: ../fish/guestfish-actions.pod:1849
19925 msgid "inspect-get-windows-systemroot"
19929 #: ../fish/guestfish-actions.pod:1851
19932 " inspect-get-windows-systemroot root\n"
19937 #: ../fish/guestfish-actions.pod:1865
19942 #: ../fish/guestfish-actions.pod:1867
19950 #: ../fish/guestfish-actions.pod:1882
19952 "You can pass the root string(s) returned to other L</inspect-get-*> "
19953 "functions in order to query further information about each operating system, "
19954 "such as the name and version."
19958 #: ../fish/guestfish-actions.pod:1887
19960 "This function uses other libguestfs features such as L</mount-ro> and "
19961 "L</umount-all> in order to mount and unmount filesystems and look at the "
19962 "contents. This should be called with no disks currently mounted. The "
19963 "function may also use Augeas, so any existing Augeas handle will be closed."
19967 #: ../fish/guestfish-actions.pod:1899 ../fish/guestfish-actions.pod:2055 ../fish/guestfish-actions.pod:2101
19968 msgid "See also L</list-filesystems>."
19972 #: ../fish/guestfish-actions.pod:1901
19973 msgid "is-blockdev"
19977 #: ../fish/guestfish-actions.pod:1903
19980 " is-blockdev path\n"
19985 #: ../fish/guestfish-actions.pod:1908 ../fish/guestfish-actions.pod:1926 ../fish/guestfish-actions.pod:1945 ../fish/guestfish-actions.pod:1954 ../fish/guestfish-actions.pod:1964 ../fish/guestfish-actions.pod:1998 ../fish/guestfish-actions.pod:2007
19986 msgid "See also L</stat>."
19990 #: ../fish/guestfish-actions.pod:1910
19995 #: ../fish/guestfish-actions.pod:1912
20003 #: ../fish/guestfish-actions.pod:1919
20008 #: ../fish/guestfish-actions.pod:1921
20011 " is-chardev path\n"
20016 #: ../fish/guestfish-actions.pod:1928
20021 #: ../fish/guestfish-actions.pod:1930
20029 #: ../fish/guestfish-actions.pod:1937
20034 #: ../fish/guestfish-actions.pod:1939
20042 #: ../fish/guestfish-actions.pod:1947
20047 #: ../fish/guestfish-actions.pod:1949
20055 #: ../fish/guestfish-actions.pod:1956
20060 #: ../fish/guestfish-actions.pod:1958
20068 #: ../fish/guestfish-actions.pod:1966
20069 msgid "is-launching"
20073 #: ../fish/guestfish-actions.pod:1968
20081 #: ../fish/guestfish-actions.pod:1975
20086 #: ../fish/guestfish-actions.pod:1977
20094 #: ../fish/guestfish-actions.pod:1982
20099 #: ../fish/guestfish-actions.pod:1984
20107 #: ../fish/guestfish-actions.pod:1991
20112 #: ../fish/guestfish-actions.pod:1993
20115 " is-socket path\n"
20120 #: ../fish/guestfish-actions.pod:2000
20125 #: ../fish/guestfish-actions.pod:2002
20128 " is-symlink path\n"
20133 #: ../fish/guestfish-actions.pod:2009
20134 msgid "kill-subprocess"
20138 #: ../fish/guestfish-actions.pod:2011
20141 " kill-subprocess\n"
20146 #: ../fish/guestfish-actions.pod:2015
20151 #: ../fish/guestfish-actions.pod:2017
20156 #: ../fish/guestfish-actions.pod:2019
20164 #: ../fish/guestfish-actions.pod:2027
20169 #: ../fish/guestfish-actions.pod:2029
20172 " lchown owner group path\n"
20177 #: ../fish/guestfish-actions.pod:2031
20179 "Change the file owner to C<owner> and group to C<group>. This is like "
20180 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
20185 #: ../fish/guestfish-actions.pod:2039
20190 #: ../fish/guestfish-actions.pod:2041
20193 " lgetxattrs path\n"
20198 #: ../fish/guestfish-actions.pod:2043
20200 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
20201 "it returns the extended attributes of the link itself."
20205 #: ../fish/guestfish-actions.pod:2047
20206 msgid "list-devices"
20210 #: ../fish/guestfish-actions.pod:2049
20218 #: ../fish/guestfish-actions.pod:2057
20219 msgid "list-filesystems"
20223 #: ../fish/guestfish-actions.pod:2059
20226 " list-filesystems\n"
20231 #: ../fish/guestfish-actions.pod:2078
20233 "This command runs other libguestfs commands, which might include L</mount> "
20234 "and L</umount>, and therefore you should use this soon after launch and only "
20235 "when nothing is mounted."
20239 #: ../fish/guestfish-actions.pod:2082
20241 "Not all of the filesystems returned will be mountable. In particular, swap "
20242 "partitions are returned in the list. Also this command does not check that "
20243 "each filesystem found is valid and mountable, and some filesystems might be "
20244 "mountable but require special options. Filesystems may not all belong to a "
20245 "single logical operating system (use L</inspect-os> to look for OSes)."
20249 #: ../fish/guestfish-actions.pod:2090
20250 msgid "list-partitions"
20254 #: ../fish/guestfish-actions.pod:2092
20257 " list-partitions\n"
20262 #: ../fish/guestfish-actions.pod:2098
20264 "This does not return logical volumes. For that you will need to call "
20269 #: ../fish/guestfish-actions.pod:2103
20274 #: ../fish/guestfish-actions.pod:2105
20282 #: ../fish/guestfish-actions.pod:2113
20287 #: ../fish/guestfish-actions.pod:2115
20290 " ln target linkname\n"
20295 #: ../fish/guestfish-actions.pod:2119
20300 #: ../fish/guestfish-actions.pod:2121
20303 " ln-f target linkname\n"
20308 #: ../fish/guestfish-actions.pod:2126
20313 #: ../fish/guestfish-actions.pod:2128
20316 " ln-s target linkname\n"
20321 #: ../fish/guestfish-actions.pod:2132
20326 #: ../fish/guestfish-actions.pod:2134
20329 " ln-sf target linkname\n"
20334 #: ../fish/guestfish-actions.pod:2139
20335 msgid "lremovexattr"
20339 #: ../fish/guestfish-actions.pod:2141
20342 " lremovexattr xattr path\n"
20347 #: ../fish/guestfish-actions.pod:2143
20349 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
20350 "it removes an extended attribute of the link itself."
20354 #: ../fish/guestfish-actions.pod:2147
20359 #: ../fish/guestfish-actions.pod:2149
20367 #: ../fish/guestfish-actions.pod:2155
20369 "This command is mostly useful for interactive sessions. Programs should "
20370 "probably use L</readdir> instead."
20374 #: ../fish/guestfish-actions.pod:2158
20379 #: ../fish/guestfish-actions.pod:2160
20382 " lsetxattr xattr val vallen path\n"
20387 #: ../fish/guestfish-actions.pod:2162
20389 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
20390 "sets an extended attribute of the link itself."
20394 #: ../fish/guestfish-actions.pod:2166
20399 #: ../fish/guestfish-actions.pod:2168
20407 #: ../fish/guestfish-actions.pod:2172
20409 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
20410 "the link is stat-ed, not the file it refers to."
20414 #: ../fish/guestfish-actions.pod:2178
20419 #: ../fish/guestfish-actions.pod:2180
20422 " lstatlist path 'names ...'\n"
20427 #: ../fish/guestfish-actions.pod:2182
20429 "This call allows you to perform the L</lstat> operation on multiple files, "
20430 "where all files are in the directory C<path>. C<names> is the list of files "
20431 "from this directory."
20435 #: ../fish/guestfish-actions.pod:2191
20437 "This call is intended for programs that want to efficiently list a directory "
20438 "contents without making many round-trips. See also L</lxattrlist> for a "
20439 "similarly efficient call for getting extended attributes. Very long "
20440 "directory listings might cause the protocol message size to be exceeded, "
20441 "causing this call to fail. The caller must split up such requests into "
20442 "smaller groups of names."
20446 #: ../fish/guestfish-actions.pod:2199
20447 msgid "luks-add-key"
20451 #: ../fish/guestfish-actions.pod:2201
20454 " luks-add-key device keyslot\n"
20459 #: ../fish/guestfish-actions.pod:2208
20461 "Note that if C<keyslot> already contains a key, then this command will "
20462 "fail. You have to use L</luks-kill-slot> first to remove that key."
20466 #: ../fish/guestfish-actions.pod:2212 ../fish/guestfish-actions.pod:2234 ../fish/guestfish-actions.pod:2247 ../fish/guestfish-actions.pod:2261 ../fish/guestfish-actions.pod:2284 ../fish/guestfish-actions.pod:2294
20468 "This command has one or more key or passphrase parameters. Guestfish will "
20469 "prompt for these separately."
20473 #: ../fish/guestfish-actions.pod:2215
20478 #: ../fish/guestfish-actions.pod:2217
20481 " luks-close device\n"
20486 #: ../fish/guestfish-actions.pod:2219
20488 "This closes a LUKS device that was created earlier by L</luks-open> or "
20489 "L</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
20490 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
20491 "underlying block device."
20495 #: ../fish/guestfish-actions.pod:2225
20496 msgid "luks-format"
20500 #: ../fish/guestfish-actions.pod:2227
20503 " luks-format device keyslot\n"
20508 #: ../fish/guestfish-actions.pod:2240
20509 msgid "luks-format-cipher"
20513 #: ../fish/guestfish-actions.pod:2242
20516 " luks-format-cipher device keyslot cipher\n"
20521 #: ../fish/guestfish-actions.pod:2244
20523 "This command is the same as L</luks-format> but it also allows you to set "
20524 "the C<cipher> used."
20528 #: ../fish/guestfish-actions.pod:2253
20529 msgid "luks-kill-slot"
20533 #: ../fish/guestfish-actions.pod:2255
20536 " luks-kill-slot device keyslot\n"
20541 #: ../fish/guestfish-actions.pod:2264
20546 #: ../fish/guestfish-actions.pod:2266
20549 " luks-open device mapname\n"
20554 #: ../fish/guestfish-actions.pod:2280
20556 "If this block device contains LVM volume groups, then calling L</vgscan> "
20557 "followed by L</vg-activate-all> will make them visible."
20561 #: ../fish/guestfish-actions.pod:2287
20562 msgid "luks-open-ro"
20566 #: ../fish/guestfish-actions.pod:2289
20569 " luks-open-ro device mapname\n"
20574 #: ../fish/guestfish-actions.pod:2291
20576 "This is the same as L</luks-open> except that a read-only mapping is "
20581 #: ../fish/guestfish-actions.pod:2297
20586 #: ../fish/guestfish-actions.pod:2299
20589 " lvcreate logvol volgroup mbytes\n"
20594 #: ../fish/guestfish-actions.pod:2304
20595 msgid "lvm-canonical-lv-name"
20599 #: ../fish/guestfish-actions.pod:2306
20602 " lvm-canonical-lv-name lvname\n"
20607 #: ../fish/guestfish-actions.pod:2315
20608 msgid "See also L</is-lv>."
20612 #: ../fish/guestfish-actions.pod:2317
20613 msgid "lvm-clear-filter"
20617 #: ../fish/guestfish-actions.pod:2319
20620 " lvm-clear-filter\n"
20625 #: ../fish/guestfish-actions.pod:2321
20627 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
20632 #: ../fish/guestfish-actions.pod:2327
20633 msgid "lvm-remove-all"
20637 #: ../fish/guestfish-actions.pod:2329
20640 " lvm-remove-all\n"
20645 #: ../fish/guestfish-actions.pod:2337
20646 msgid "lvm-set-filter"
20650 #: ../fish/guestfish-actions.pod:2339
20653 " lvm-set-filter 'devices ...'\n"
20658 #: ../fish/guestfish-actions.pod:2364
20663 #: ../fish/guestfish-actions.pod:2366
20666 " lvremove device\n"
20671 #: ../fish/guestfish-actions.pod:2374
20676 #: ../fish/guestfish-actions.pod:2376
20679 " lvrename logvol newlogvol\n"
20684 #: ../fish/guestfish-actions.pod:2380
20689 #: ../fish/guestfish-actions.pod:2382
20692 " lvresize device mbytes\n"
20697 #: ../fish/guestfish-actions.pod:2388
20698 msgid "lvresize-free"
20702 #: ../fish/guestfish-actions.pod:2390
20705 " lvresize-free lv percent\n"
20710 #: ../fish/guestfish-actions.pod:2398
20715 #: ../fish/guestfish-actions.pod:2400
20723 #: ../fish/guestfish-actions.pod:2408
20724 msgid "See also L</lvs-full>, L</list-filesystems>."
20728 #: ../fish/guestfish-actions.pod:2410
20733 #: ../fish/guestfish-actions.pod:2412
20741 #: ../fish/guestfish-actions.pod:2417
20746 #: ../fish/guestfish-actions.pod:2419
20754 #: ../fish/guestfish-actions.pod:2423
20759 #: ../fish/guestfish-actions.pod:2425
20762 " lxattrlist path 'names ...'\n"
20767 #: ../fish/guestfish-actions.pod:2441
20769 "This call is intended for programs that want to efficiently list a directory "
20770 "contents without making many round-trips. See also L</lstatlist> for a "
20771 "similarly efficient call for getting standard stats. Very long directory "
20772 "listings might cause the protocol message size to be exceeded, causing this "
20773 "call to fail. The caller must split up such requests into smaller groups of "
20778 #: ../fish/guestfish-actions.pod:2449
20783 #: ../fish/guestfish-actions.pod:2451
20791 #: ../fish/guestfish-actions.pod:2455
20796 #: ../fish/guestfish-actions.pod:2457
20799 " mkdir-mode path mode\n"
20804 #: ../fish/guestfish-actions.pod:2466
20805 msgid "See also L</mkdir>, L</umask>"
20809 #: ../fish/guestfish-actions.pod:2468
20814 #: ../fish/guestfish-actions.pod:2470
20822 #: ../fish/guestfish-actions.pod:2475
20827 #: ../fish/guestfish-actions.pod:2477
20830 " mkdtemp template\n"
20835 #: ../fish/guestfish-actions.pod:2498
20840 #: ../fish/guestfish-actions.pod:2500
20843 " mke2fs-J fstype blocksize device journal\n"
20848 #: ../fish/guestfish-actions.pod:2508
20849 msgid "See also L</mke2journal>."
20853 #: ../fish/guestfish-actions.pod:2510
20858 #: ../fish/guestfish-actions.pod:2512
20861 " mke2fs-JL fstype blocksize device label\n"
20866 #: ../fish/guestfish-actions.pod:2517
20867 msgid "See also L</mke2journal-L>."
20871 #: ../fish/guestfish-actions.pod:2519
20876 #: ../fish/guestfish-actions.pod:2521
20879 " mke2fs-JU fstype blocksize device uuid\n"
20884 #: ../fish/guestfish-actions.pod:2526
20885 msgid "See also L</mke2journal-U>."
20889 #: ../fish/guestfish-actions.pod:2528
20890 msgid "mke2journal"
20894 #: ../fish/guestfish-actions.pod:2530
20897 " mke2journal blocksize device\n"
20902 #: ../fish/guestfish-actions.pod:2537
20903 msgid "mke2journal-L"
20907 #: ../fish/guestfish-actions.pod:2539
20910 " mke2journal-L blocksize label device\n"
20915 #: ../fish/guestfish-actions.pod:2543
20916 msgid "mke2journal-U"
20920 #: ../fish/guestfish-actions.pod:2545
20923 " mke2journal-U blocksize uuid device\n"
20928 #: ../fish/guestfish-actions.pod:2549
20933 #: ../fish/guestfish-actions.pod:2551
20936 " mkfifo mode path\n"
20941 #: ../fish/guestfish-actions.pod:2553
20943 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
20944 "is just a convenient wrapper around L</mknod>."
20948 #: ../fish/guestfish-actions.pod:2559
20953 #: ../fish/guestfish-actions.pod:2561
20956 " mkfs fstype device\n"
20961 #: ../fish/guestfish-actions.pod:2567
20966 #: ../fish/guestfish-actions.pod:2569
20969 " mkfs-b fstype blocksize device\n"
20974 #: ../fish/guestfish-actions.pod:2571
20976 "This call is similar to L</mkfs>, but it allows you to control the block "
20977 "size of the resulting filesystem. Supported block sizes depend on the "
20978 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
20982 #: ../fish/guestfish-actions.pod:2579
20983 msgid "mkmountpoint"
20987 #: ../fish/guestfish-actions.pod:2581
20990 " mkmountpoint exemptpath\n"
20995 #: ../fish/guestfish-actions.pod:2583
20997 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
20998 "to create extra mountpoints before mounting the first filesystem."
21002 #: ../fish/guestfish-actions.pod:2607
21004 "L</mkmountpoint> is not compatible with L</umount-all>. You may get "
21005 "unexpected errors if you try to mix these calls. It is safest to manually "
21006 "unmount filesystems and remove mountpoints after use."
21010 #: ../fish/guestfish-actions.pod:2611
21012 "L</umount-all> unmounts filesystems by sorting the paths longest first, so "
21013 "for this to work for manual mountpoints, you must ensure that the innermost "
21014 "mountpoints have the longest pathnames, as in the example code above."
21018 #: ../fish/guestfish-actions.pod:2618
21020 "Autosync [see L</set-autosync>, this is set by default on handles] means "
21021 "that L</umount-all> is called when the handle is closed which can also "
21022 "trigger these issues."
21026 #: ../fish/guestfish-actions.pod:2622
21031 #: ../fish/guestfish-actions.pod:2624
21034 " mknod mode devmajor devminor path\n"
21039 #: ../fish/guestfish-actions.pod:2634
21041 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
21042 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
21043 "regular file). These constants are available in the standard Linux header "
21044 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
21045 "wrappers around this command which bitwise OR in the appropriate constant "
21050 #: ../fish/guestfish-actions.pod:2644
21055 #: ../fish/guestfish-actions.pod:2646
21058 " mknod-b mode devmajor devminor path\n"
21063 #: ../fish/guestfish-actions.pod:2648
21065 "This call creates a block device node called C<path> with mode C<mode> and "
21066 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
21067 "wrapper around L</mknod>."
21071 #: ../fish/guestfish-actions.pod:2654
21076 #: ../fish/guestfish-actions.pod:2656
21079 " mknod-c mode devmajor devminor path\n"
21084 #: ../fish/guestfish-actions.pod:2658
21086 "This call creates a char device node called C<path> with mode C<mode> and "
21087 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
21088 "wrapper around L</mknod>."
21092 #: ../fish/guestfish-actions.pod:2664
21097 #: ../fish/guestfish-actions.pod:2666
21105 #: ../fish/guestfish-actions.pod:2670
21110 #: ../fish/guestfish-actions.pod:2672
21113 " mkswap-L label device\n"
21118 #: ../fish/guestfish-actions.pod:2680
21123 #: ../fish/guestfish-actions.pod:2682
21126 " mkswap-U uuid device\n"
21131 #: ../fish/guestfish-actions.pod:2686
21132 msgid "mkswap-file"
21136 #: ../fish/guestfish-actions.pod:2688
21139 " mkswap-file path\n"
21144 #: ../fish/guestfish-actions.pod:2692
21146 "This command just writes a swap file signature to an existing file. To "
21147 "create the file itself, use something like L</fallocate>."
21151 #: ../fish/guestfish-actions.pod:2695
21156 #: ../fish/guestfish-actions.pod:2697
21159 " modprobe modulename\n"
21164 #: ../fish/guestfish-actions.pod:2704
21169 #: ../fish/guestfish-actions.pod:2706
21172 " mount device mountpoint\n"
21177 #: ../fish/guestfish-actions.pod:2722
21179 "B<Important note:> When you use this call, the filesystem options C<sync> "
21180 "and C<noatime> are set implicitly. This was originally done because we "
21181 "thought it would improve reliability, but it turns out that I<-o sync> has a "
21182 "very large negative performance impact and negligible effect on "
21183 "reliability. Therefore we recommend that you avoid using L</mount> in any "
21184 "code that needs performance, and instead use L</mount-options> (use an empty "
21185 "string for the first parameter if you don't want any options)."
21189 #: ../fish/guestfish-actions.pod:2732
21194 #: ../fish/guestfish-actions.pod:2734
21197 " mount-loop file mountpoint\n"
21202 #: ../fish/guestfish-actions.pod:2740
21203 msgid "mount-options"
21207 #: ../fish/guestfish-actions.pod:2742
21210 " mount-options options device mountpoint\n"
21215 #: ../fish/guestfish-actions.pod:2744
21217 "This is the same as the L</mount> command, but it allows you to set the "
21218 "mount options as for the L<mount(8)> I<-o> flag."
21222 #: ../fish/guestfish-actions.pod:2752
21227 #: ../fish/guestfish-actions.pod:2754
21230 " mount-ro device mountpoint\n"
21235 #: ../fish/guestfish-actions.pod:2756
21237 "This is the same as the L</mount> command, but it mounts the filesystem with "
21238 "the read-only (I<-o ro>) flag."
21242 #: ../fish/guestfish-actions.pod:2759
21247 #: ../fish/guestfish-actions.pod:2761
21250 " mount-vfs options vfstype device mountpoint\n"
21255 #: ../fish/guestfish-actions.pod:2763
21257 "This is the same as the L</mount> command, but it allows you to set both the "
21258 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
21262 #: ../fish/guestfish-actions.pod:2767
21263 msgid "mountpoints"
21267 #: ../fish/guestfish-actions.pod:2769
21275 #: ../fish/guestfish-actions.pod:2771
21277 "This call is similar to L</mounts>. That call returns a list of devices. "
21278 "This one returns a hash table (map) of device name to directory where the "
21279 "device is mounted."
21283 #: ../fish/guestfish-actions.pod:2775
21288 #: ../fish/guestfish-actions.pod:2777
21296 #: ../fish/guestfish-actions.pod:2784
21297 msgid "See also: L</mountpoints>"
21301 #: ../fish/guestfish-actions.pod:2786
21306 #: ../fish/guestfish-actions.pod:2788
21314 #: ../fish/guestfish-actions.pod:2793
21315 msgid "ntfs-3g-probe"
21319 #: ../fish/guestfish-actions.pod:2795
21322 " ntfs-3g-probe true|false device\n"
21327 #: ../fish/guestfish-actions.pod:2809
21332 #: ../fish/guestfish-actions.pod:2811
21335 " ntfsresize device\n"
21340 #: ../fish/guestfish-actions.pod:2817
21341 msgid "ntfsresize-size"
21345 #: ../fish/guestfish-actions.pod:2819
21348 " ntfsresize-size device size\n"
21353 #: ../fish/guestfish-actions.pod:2821
21355 "This command is the same as L</ntfsresize> except that it allows you to "
21356 "specify the new size (in bytes) explicitly."
21360 #: ../fish/guestfish-actions.pod:2824
21365 #: ../fish/guestfish-actions.pod:2826
21368 " part-add device prlogex startsect endsect\n"
21373 #: ../fish/guestfish-actions.pod:2828
21375 "This command adds a partition to C<device>. If there is no partition table "
21376 "on the device, call L</part-init> first."
21380 #: ../fish/guestfish-actions.pod:2840
21382 "Creating a partition which covers the whole disk is not so easy. Use "
21383 "L</part-disk> to do that."
21387 #: ../fish/guestfish-actions.pod:2843
21392 #: ../fish/guestfish-actions.pod:2845
21395 " part-del device partnum\n"
21400 #: ../fish/guestfish-actions.pod:2853
21405 #: ../fish/guestfish-actions.pod:2855
21408 " part-disk device parttype\n"
21413 #: ../fish/guestfish-actions.pod:2857
21415 "This command is simply a combination of L</part-init> followed by "
21416 "L</part-add> to create a single primary partition covering the whole disk."
21420 #: ../fish/guestfish-actions.pod:2861
21422 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
21423 "possible values are described in L</part-init>."
21427 #: ../fish/guestfish-actions.pod:2867
21428 msgid "part-get-bootable"
21432 #: ../fish/guestfish-actions.pod:2869
21435 " part-get-bootable device partnum\n"
21440 #: ../fish/guestfish-actions.pod:2874
21441 msgid "See also L</part-set-bootable>."
21445 #: ../fish/guestfish-actions.pod:2876
21446 msgid "part-get-mbr-id"
21450 #: ../fish/guestfish-actions.pod:2878
21453 " part-get-mbr-id device partnum\n"
21458 #: ../fish/guestfish-actions.pod:2883 ../fish/guestfish-actions.pod:3021
21460 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
21461 "undefined results for other partition table types (see "
21462 "L</part-get-parttype>)."
21466 #: ../fish/guestfish-actions.pod:2887
21467 msgid "part-get-parttype"
21471 #: ../fish/guestfish-actions.pod:2889
21474 " part-get-parttype device\n"
21479 #: ../fish/guestfish-actions.pod:2894
21481 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
21482 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
21483 "possible, although unusual. See L</part-init> for a full list."
21487 #: ../fish/guestfish-actions.pod:2899
21492 #: ../fish/guestfish-actions.pod:2901
21495 " part-init device parttype\n"
21500 #: ../fish/guestfish-actions.pod:2907
21502 "Initially there are no partitions. Following this, you should call "
21503 "L</part-add> for each partition required."
21507 #: ../fish/guestfish-actions.pod:2970
21512 #: ../fish/guestfish-actions.pod:2972
21515 " part-list device\n"
21520 #: ../fish/guestfish-actions.pod:2987
21522 "Start of the partition I<in bytes>. To get sectors you have to divide by "
21523 "the device's sector size, see L</blockdev-getss>."
21527 #: ../fish/guestfish-actions.pod:3000
21528 msgid "part-set-bootable"
21532 #: ../fish/guestfish-actions.pod:3002
21535 " part-set-bootable device partnum true|false\n"
21540 #: ../fish/guestfish-actions.pod:3011
21541 msgid "part-set-mbr-id"
21545 #: ../fish/guestfish-actions.pod:3013
21548 " part-set-mbr-id device partnum idbyte\n"
21553 #: ../fish/guestfish-actions.pod:3025
21554 msgid "part-set-name"
21558 #: ../fish/guestfish-actions.pod:3027
21561 " part-set-name device partnum name\n"
21566 #: ../fish/guestfish-actions.pod:3035
21567 msgid "part-to-dev"
21571 #: ../fish/guestfish-actions.pod:3037
21574 " part-to-dev partition\n"
21579 #: ../fish/guestfish-actions.pod:3043
21581 "The named partition must exist, for example as a string returned from "
21582 "L</list-partitions>."
21586 #: ../fish/guestfish-actions.pod:3046
21587 msgid "ping-daemon"
21591 #: ../fish/guestfish-actions.pod:3048
21599 #: ../fish/guestfish-actions.pod:3055
21604 #: ../fish/guestfish-actions.pod:3057
21607 " pread path count offset\n"
21612 #: ../fish/guestfish-actions.pod:3065
21613 msgid "See also L</pwrite>, L</pread-device>."
21617 #: ../fish/guestfish-actions.pod:3070
21618 msgid "pread-device"
21622 #: ../fish/guestfish-actions.pod:3072
21625 " pread-device device count offset\n"
21630 #: ../fish/guestfish-actions.pod:3080
21631 msgid "See also L</pread>."
21635 #: ../fish/guestfish-actions.pod:3085
21640 #: ../fish/guestfish-actions.pod:3087
21643 " pvcreate device\n"
21648 #: ../fish/guestfish-actions.pod:3093
21653 #: ../fish/guestfish-actions.pod:3095
21656 " pvremove device\n"
21661 #: ../fish/guestfish-actions.pod:3104
21666 #: ../fish/guestfish-actions.pod:3106
21669 " pvresize device\n"
21674 #: ../fish/guestfish-actions.pod:3111
21675 msgid "pvresize-size"
21679 #: ../fish/guestfish-actions.pod:3113
21682 " pvresize-size device size\n"
21687 #: ../fish/guestfish-actions.pod:3115
21689 "This command is the same as L</pvresize> except that it allows you to "
21690 "specify the new size (in bytes) explicitly."
21694 #: ../fish/guestfish-actions.pod:3118
21699 #: ../fish/guestfish-actions.pod:3120
21707 #: ../fish/guestfish-actions.pod:3128
21708 msgid "See also L</pvs-full>."
21712 #: ../fish/guestfish-actions.pod:3130
21717 #: ../fish/guestfish-actions.pod:3132
21725 #: ../fish/guestfish-actions.pod:3137
21730 #: ../fish/guestfish-actions.pod:3139
21738 #: ../fish/guestfish-actions.pod:3143
21743 #: ../fish/guestfish-actions.pod:3145
21746 " pwrite path content offset\n"
21751 #: ../fish/guestfish-actions.pod:3156
21752 msgid "See also L</pread>, L</pwrite-device>."
21756 #: ../fish/guestfish-actions.pod:3161
21757 msgid "pwrite-device"
21761 #: ../fish/guestfish-actions.pod:3163
21764 " pwrite-device device content offset\n"
21769 #: ../fish/guestfish-actions.pod:3173
21770 msgid "See also L</pwrite>."
21774 #: ../fish/guestfish-actions.pod:3178
21779 #: ../fish/guestfish-actions.pod:3180
21782 " read-file path\n"
21787 #: ../fish/guestfish-actions.pod:3185
21789 "Unlike L</cat>, this function can correctly handle files that contain "
21790 "embedded ASCII NUL characters. However unlike L</download>, this function "
21791 "is limited in the total size of file that can be handled."
21795 #: ../fish/guestfish-actions.pod:3193
21800 #: ../fish/guestfish-actions.pod:3195
21803 " read-lines path\n"
21808 #: ../fish/guestfish-actions.pod:3202
21810 "Note that this function cannot correctly handle binary files (specifically, "
21811 "files containing C<\\0> character which is treated as end of line). For "
21812 "those you need to use the L</read-file> function which has a more complex "
21817 #: ../fish/guestfish-actions.pod:3207
21822 #: ../fish/guestfish-actions.pod:3209
21830 #: ../fish/guestfish-actions.pod:3261
21832 "This function is primarily intended for use by programs. To get a simple "
21833 "list of names, use L</ls>. To get a printable directory for human "
21834 "consumption, use L</ll>."
21838 #: ../fish/guestfish-actions.pod:3265
21843 #: ../fish/guestfish-actions.pod:3267
21851 #: ../fish/guestfish-actions.pod:3271
21852 msgid "readlinklist"
21856 #: ../fish/guestfish-actions.pod:3273
21859 " readlinklist path 'names ...'\n"
21864 #: ../fish/guestfish-actions.pod:3297
21869 #: ../fish/guestfish-actions.pod:3299
21877 #: ../fish/guestfish-actions.pod:3304
21878 msgid "removexattr"
21882 #: ../fish/guestfish-actions.pod:3306
21885 " removexattr xattr path\n"
21890 #: ../fish/guestfish-actions.pod:3311
21891 msgid "See also: L</lremovexattr>, L<attr(5)>."
21895 #: ../fish/guestfish-actions.pod:3313
21900 #: ../fish/guestfish-actions.pod:3315
21903 " resize2fs device\n"
21908 #: ../fish/guestfish-actions.pod:3320
21910 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
21911 "before calling this command. For unknown reasons C<resize2fs> sometimes "
21912 "gives an error about this and sometimes not. In any case, it is always safe "
21913 "to call L</e2fsck-f> before calling this function."
21917 #: ../fish/guestfish-actions.pod:3326
21918 msgid "resize2fs-size"
21922 #: ../fish/guestfish-actions.pod:3328
21925 " resize2fs-size device size\n"
21930 #: ../fish/guestfish-actions.pod:3330
21932 "This command is the same as L</resize2fs> except that it allows you to "
21933 "specify the new size (in bytes) explicitly."
21937 #: ../fish/guestfish-actions.pod:3333
21942 #: ../fish/guestfish-actions.pod:3335
21950 #: ../fish/guestfish-actions.pod:3339
21955 #: ../fish/guestfish-actions.pod:3341
21963 #: ../fish/guestfish-actions.pod:3347
21968 #: ../fish/guestfish-actions.pod:3349
21976 #: ../fish/guestfish-actions.pod:3353
21977 msgid "rmmountpoint"
21981 #: ../fish/guestfish-actions.pod:3355
21984 " rmmountpoint exemptpath\n"
21989 #: ../fish/guestfish-actions.pod:3357
21991 "This calls removes a mountpoint that was previously created with "
21992 "L</mkmountpoint>. See L</mkmountpoint> for full details."
21996 #: ../fish/guestfish-actions.pod:3361
21997 msgid "scrub-device"
22001 #: ../fish/guestfish-actions.pod:3363
22004 " scrub-device device\n"
22009 #: ../fish/guestfish-actions.pod:3374
22014 #: ../fish/guestfish-actions.pod:3376
22017 " scrub-file file\n"
22022 #: ../fish/guestfish-actions.pod:3386
22023 msgid "scrub-freespace"
22027 #: ../fish/guestfish-actions.pod:3388
22030 " scrub-freespace dir\n"
22035 #: ../fish/guestfish-actions.pod:3390
22037 "This command creates the directory C<dir> and then fills it with files until "
22038 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
22039 "deletes them. The intention is to scrub any free space on the partition "
22040 "containing C<dir>."
22044 #: ../fish/guestfish-actions.pod:3399
22049 #: ../fish/guestfish-actions.pod:3401
22054 #: ../fish/guestfish-actions.pod:3403
22057 " set-append append\n"
22062 #: ../fish/guestfish-actions.pod:3414
22063 msgid "set-autosync"
22067 #: ../fish/guestfish-actions.pod:3416
22072 #: ../fish/guestfish-actions.pod:3418
22075 " set-autosync true|false\n"
22080 #: ../fish/guestfish-actions.pod:3420
22082 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
22083 "effort attempt to run L</umount-all> followed by L</sync> when the handle is "
22084 "closed (also if the program exits without closing handles)."
22088 #: ../fish/guestfish-actions.pod:3428
22093 #: ../fish/guestfish-actions.pod:3430
22098 #: ../fish/guestfish-actions.pod:3432
22101 " set-direct true|false\n"
22106 #: ../fish/guestfish-actions.pod:3438
22108 "One consequence of this is that log messages aren't caught by the library "
22109 "and handled by L</set-log-message-callback>, but go straight to stdout."
22113 #: ../fish/guestfish-actions.pod:3447
22114 msgid "set-e2label"
22118 #: ../fish/guestfish-actions.pod:3449
22121 " set-e2label device label\n"
22126 #: ../fish/guestfish-actions.pod:3455
22128 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
22129 "label on a filesystem."
22133 #: ../fish/guestfish-actions.pod:3458
22138 #: ../fish/guestfish-actions.pod:3460
22141 " set-e2uuid device uuid\n"
22146 #: ../fish/guestfish-actions.pod:3467
22148 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
22149 "UUID of a filesystem."
22153 #: ../fish/guestfish-actions.pod:3470
22154 msgid "set-memsize"
22158 #: ../fish/guestfish-actions.pod:3472
22163 #: ../fish/guestfish-actions.pod:3474
22166 " set-memsize memsize\n"
22171 #: ../fish/guestfish-actions.pod:3476
22173 "This sets the memory size in megabytes allocated to the qemu subprocess. "
22174 "This only has any effect if called before L</launch>."
22178 #: ../fish/guestfish-actions.pod:3487
22179 msgid "set-network"
22183 #: ../fish/guestfish-actions.pod:3489
22188 #: ../fish/guestfish-actions.pod:3491
22191 " set-network true|false\n"
22196 #: ../fish/guestfish-actions.pod:3499
22197 msgid "You must call this before calling L</launch>, otherwise it has no effect."
22201 #: ../fish/guestfish-actions.pod:3502
22206 #: ../fish/guestfish-actions.pod:3504
22211 #: ../fish/guestfish-actions.pod:3506
22214 " set-path searchpath\n"
22219 #: ../fish/guestfish-actions.pod:3515
22224 #: ../fish/guestfish-actions.pod:3517
22229 #: ../fish/guestfish-actions.pod:3519
22237 #: ../fish/guestfish-actions.pod:3539
22238 msgid "set-recovery-proc"
22242 #: ../fish/guestfish-actions.pod:3541
22243 msgid "recovery-proc"
22247 #: ../fish/guestfish-actions.pod:3543
22250 " set-recovery-proc true|false\n"
22255 #: ../fish/guestfish-actions.pod:3545
22257 "If this is called with the parameter C<false> then L</launch> does not "
22258 "create a recovery process. The purpose of the recovery process is to stop "
22259 "runaway qemu processes in the case where the main program aborts abruptly."
22263 #: ../fish/guestfish-actions.pod:3550
22265 "This only has any effect if called before L</launch>, and the default is "
22270 #: ../fish/guestfish-actions.pod:3559
22271 msgid "set-selinux"
22275 #: ../fish/guestfish-actions.pod:3561
22280 #: ../fish/guestfish-actions.pod:3563
22283 " set-selinux true|false\n"
22288 #: ../fish/guestfish-actions.pod:3574
22293 #: ../fish/guestfish-actions.pod:3576
22298 #: ../fish/guestfish-actions.pod:3578
22301 " set-trace true|false\n"
22306 #: ../fish/guestfish-actions.pod:3594
22307 msgid "set-verbose"
22311 #: ../fish/guestfish-actions.pod:3596
22316 #: ../fish/guestfish-actions.pod:3598
22319 " set-verbose true|false\n"
22324 #: ../fish/guestfish-actions.pod:3605
22329 #: ../fish/guestfish-actions.pod:3607
22332 " setcon context\n"
22337 #: ../fish/guestfish-actions.pod:3614
22342 #: ../fish/guestfish-actions.pod:3616
22345 " setxattr xattr val vallen path\n"
22350 #: ../fish/guestfish-actions.pod:3622
22351 msgid "See also: L</lsetxattr>, L<attr(5)>."
22355 #: ../fish/guestfish-actions.pod:3624
22360 #: ../fish/guestfish-actions.pod:3626
22363 " sfdisk device cyls heads sectors 'lines ...'\n"
22368 #: ../fish/guestfish-actions.pod:3648
22369 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
22373 #: ../fish/guestfish-actions.pod:3654
22378 #: ../fish/guestfish-actions.pod:3656
22381 " sfdiskM device 'lines ...'\n"
22386 #: ../fish/guestfish-actions.pod:3658
22388 "This is a simplified interface to the L</sfdisk> command, where partition "
22389 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
22390 "you don't need to specify the cyls, heads and sectors parameters which were "
22391 "rarely if ever used anyway."
22395 #: ../fish/guestfish-actions.pod:3664
22396 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
22400 #: ../fish/guestfish-actions.pod:3670
22405 #: ../fish/guestfish-actions.pod:3672
22408 " sfdisk-N device partnum cyls heads sectors line\n"
22413 #: ../fish/guestfish-actions.pod:3677
22415 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
22416 "cyls/heads/sectors parameters."
22420 #: ../fish/guestfish-actions.pod:3680
22421 msgid "See also: L</part-add>"
22425 #: ../fish/guestfish-actions.pod:3685
22426 msgid "sfdisk-disk-geometry"
22430 #: ../fish/guestfish-actions.pod:3687
22433 " sfdisk-disk-geometry device\n"
22438 #: ../fish/guestfish-actions.pod:3689
22440 "This displays the disk geometry of C<device> read from the partition table. "
22441 "Especially in the case where the underlying block device has been resized, "
22442 "this can be different from the kernel's idea of the geometry (see "
22443 "L</sfdisk-kernel-geometry>)."
22447 #: ../fish/guestfish-actions.pod:3697
22448 msgid "sfdisk-kernel-geometry"
22452 #: ../fish/guestfish-actions.pod:3699
22455 " sfdisk-kernel-geometry device\n"
22460 #: ../fish/guestfish-actions.pod:3706
22465 #: ../fish/guestfish-actions.pod:3708
22468 " sfdisk-l device\n"
22473 #: ../fish/guestfish-actions.pod:3714
22474 msgid "See also: L</part-list>"
22478 #: ../fish/guestfish-actions.pod:3716
22483 #: ../fish/guestfish-actions.pod:3718
22491 #: ../fish/guestfish-actions.pod:3723
22492 msgid "This is like L</command>, but passes the command to:"
22496 #: ../fish/guestfish-actions.pod:3731
22497 msgid "All the provisos about L</command> apply to this call."
22501 #: ../fish/guestfish-actions.pod:3733
22506 #: ../fish/guestfish-actions.pod:3735
22509 " sh-lines command\n"
22514 #: ../fish/guestfish-actions.pod:3737
22515 msgid "This is the same as L</sh>, but splits the result into a list of lines."
22519 #: ../fish/guestfish-actions.pod:3740
22520 msgid "See also: L</command-lines>"
22524 #: ../fish/guestfish-actions.pod:3742
22529 #: ../fish/guestfish-actions.pod:3744
22537 #: ../fish/guestfish-actions.pod:3748
22542 #: ../fish/guestfish-actions.pod:3750
22550 #: ../fish/guestfish-actions.pod:3756
22555 #: ../fish/guestfish-actions.pod:3758
22563 #: ../fish/guestfish-actions.pod:3766
22568 #: ../fish/guestfish-actions.pod:3768
22576 #: ../fish/guestfish-actions.pod:3776
22581 #: ../fish/guestfish-actions.pod:3778
22584 " strings-e encoding path\n"
22589 #: ../fish/guestfish-actions.pod:3780
22591 "This is like the L</strings> command, but allows you to specify the encoding "
22592 "of strings that are looked for in the source file C<path>."
22596 #: ../fish/guestfish-actions.pod:3790
22598 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
22599 "ISO-8859-X (this is what L</strings> uses)."
22603 #: ../fish/guestfish-actions.pod:3822
22604 msgid "swapoff-device"
22608 #: ../fish/guestfish-actions.pod:3824
22611 " swapoff-device device\n"
22616 #: ../fish/guestfish-actions.pod:3826
22618 "This command disables the libguestfs appliance swap device or partition "
22619 "named C<device>. See L</swapon-device>."
22623 #: ../fish/guestfish-actions.pod:3830
22624 msgid "swapoff-file"
22628 #: ../fish/guestfish-actions.pod:3832
22631 " swapoff-file file\n"
22636 #: ../fish/guestfish-actions.pod:3836
22637 msgid "swapoff-label"
22641 #: ../fish/guestfish-actions.pod:3838
22644 " swapoff-label label\n"
22649 #: ../fish/guestfish-actions.pod:3843
22650 msgid "swapoff-uuid"
22654 #: ../fish/guestfish-actions.pod:3845
22657 " swapoff-uuid uuid\n"
22662 #: ../fish/guestfish-actions.pod:3850
22663 msgid "swapon-device"
22667 #: ../fish/guestfish-actions.pod:3852
22670 " swapon-device device\n"
22675 #: ../fish/guestfish-actions.pod:3854
22677 "This command enables the libguestfs appliance to use the swap device or "
22678 "partition named C<device>. The increased memory is made available for all "
22679 "commands, for example those run using L</command> or L</sh>."
22683 #: ../fish/guestfish-actions.pod:3866
22684 msgid "swapon-file"
22688 #: ../fish/guestfish-actions.pod:3868
22691 " swapon-file file\n"
22696 #: ../fish/guestfish-actions.pod:3870
22697 msgid "This command enables swap to a file. See L</swapon-device> for other notes."
22701 #: ../fish/guestfish-actions.pod:3873
22702 msgid "swapon-label"
22706 #: ../fish/guestfish-actions.pod:3875
22709 " swapon-label label\n"
22714 #: ../fish/guestfish-actions.pod:3877
22716 "This command enables swap to a labeled swap partition. See "
22717 "L</swapon-device> for other notes."
22721 #: ../fish/guestfish-actions.pod:3880
22722 msgid "swapon-uuid"
22726 #: ../fish/guestfish-actions.pod:3882
22729 " swapon-uuid uuid\n"
22734 #: ../fish/guestfish-actions.pod:3884
22736 "This command enables swap to a swap partition with the given UUID. See "
22737 "L</swapon-device> for other notes."
22741 #: ../fish/guestfish-actions.pod:3887
22746 #: ../fish/guestfish-actions.pod:3889
22754 #: ../fish/guestfish-actions.pod:3897
22759 #: ../fish/guestfish-actions.pod:3899
22767 #: ../fish/guestfish-actions.pod:3907
22772 #: ../fish/guestfish-actions.pod:3909
22775 " tail-n nrlines path\n"
22780 #: ../fish/guestfish-actions.pod:3922
22785 #: ../fish/guestfish-actions.pod:3924
22788 " tar-in (tarfile|-) directory\n"
22793 #: ../fish/guestfish-actions.pod:3929
22794 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
22798 #: ../fish/guestfish-actions.pod:3934
22803 #: ../fish/guestfish-actions.pod:3936
22806 " tar-out directory (tarfile|-)\n"
22811 #: ../fish/guestfish-actions.pod:3941
22812 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
22816 #: ../fish/guestfish-actions.pod:3946
22821 #: ../fish/guestfish-actions.pod:3948
22824 " tgz-in (tarball|-) directory\n"
22829 #: ../fish/guestfish-actions.pod:3953
22830 msgid "To upload an uncompressed tarball, use L</tar-in>."
22834 #: ../fish/guestfish-actions.pod:3957
22839 #: ../fish/guestfish-actions.pod:3959
22842 " tgz-out directory (tarball|-)\n"
22847 #: ../fish/guestfish-actions.pod:3964
22848 msgid "To download an uncompressed tarball, use L</tar-out>."
22852 #: ../fish/guestfish-actions.pod:3968
22857 #: ../fish/guestfish-actions.pod:3970
22865 #: ../fish/guestfish-actions.pod:3979
22870 #: ../fish/guestfish-actions.pod:3981
22878 #: ../fish/guestfish-actions.pod:3986
22879 msgid "truncate-size"
22883 #: ../fish/guestfish-actions.pod:3988
22886 " truncate-size path size\n"
22891 #: ../fish/guestfish-actions.pod:3993
22893 "If the current file size is less than C<size> then the file is extended to "
22894 "the required size with zero bytes. This creates a sparse file (ie. disk "
22895 "blocks are not allocated for the file until you write to it). To create a "
22896 "non-sparse file of zeroes, use L</fallocate64> instead."
22900 #: ../fish/guestfish-actions.pod:3999
22905 #: ../fish/guestfish-actions.pod:4001
22908 " tune2fs-l device\n"
22913 #: ../fish/guestfish-actions.pod:4011
22918 #: ../fish/guestfish-actions.pod:4013
22921 " txz-in (tarball|-) directory\n"
22926 #: ../fish/guestfish-actions.pod:4020
22931 #: ../fish/guestfish-actions.pod:4022
22934 " txz-out directory (tarball|-)\n"
22939 #: ../fish/guestfish-actions.pod:4029
22944 #: ../fish/guestfish-actions.pod:4031
22952 #: ../fish/guestfish-actions.pod:4045
22953 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
22957 #: ../fish/guestfish-actions.pod:4050
22962 #: ../fish/guestfish-actions.pod:4052
22967 #: ../fish/guestfish-actions.pod:4054
22970 " umount pathordevice\n"
22975 #: ../fish/guestfish-actions.pod:4060
22980 #: ../fish/guestfish-actions.pod:4062
22981 msgid "unmount-all"
22985 #: ../fish/guestfish-actions.pod:4064
22993 #: ../fish/guestfish-actions.pod:4070
22998 #: ../fish/guestfish-actions.pod:4072
23001 " upload (filename|-) remotefilename\n"
23006 #: ../fish/guestfish-actions.pod:4079
23007 msgid "See also L</download>."
23011 #: ../fish/guestfish-actions.pod:4083
23012 msgid "upload-offset"
23016 #: ../fish/guestfish-actions.pod:4085
23019 " upload-offset (filename|-) remotefilename offset\n"
23024 #: ../fish/guestfish-actions.pod:4097
23026 "Note that there is no limit on the amount of data that can be uploaded with "
23027 "this call, unlike with L</pwrite>, and this call always writes the full "
23028 "amount unless an error occurs."
23032 #: ../fish/guestfish-actions.pod:4102
23033 msgid "See also L</upload>, L</pwrite>."
23037 #: ../fish/guestfish-actions.pod:4106
23042 #: ../fish/guestfish-actions.pod:4108
23045 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
23050 #: ../fish/guestfish-actions.pod:4127
23055 #: ../fish/guestfish-actions.pod:4129
23063 #: ../fish/guestfish-actions.pod:4156
23065 "I<Note:> Don't use this call to test for availability of features. In "
23066 "enterprise distributions we backport features from later versions into "
23067 "earlier versions, making this an unreliable way to test for features. Use "
23068 "L</available> instead."
23072 #: ../fish/guestfish-actions.pod:4162
23077 #: ../fish/guestfish-actions.pod:4164
23080 " vfs-label device\n"
23085 #: ../fish/guestfish-actions.pod:4171
23086 msgid "To find a filesystem from the label, use L</findfs-label>."
23090 #: ../fish/guestfish-actions.pod:4173
23095 #: ../fish/guestfish-actions.pod:4175
23098 " vfs-type device\n"
23103 #: ../fish/guestfish-actions.pod:4185
23108 #: ../fish/guestfish-actions.pod:4187
23111 " vfs-uuid device\n"
23116 #: ../fish/guestfish-actions.pod:4194
23117 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
23121 #: ../fish/guestfish-actions.pod:4196
23122 msgid "vg-activate"
23126 #: ../fish/guestfish-actions.pod:4198
23129 " vg-activate true|false 'volgroups ...'\n"
23134 #: ../fish/guestfish-actions.pod:4211
23135 msgid "vg-activate-all"
23139 #: ../fish/guestfish-actions.pod:4213
23142 " vg-activate-all true|false\n"
23147 #: ../fish/guestfish-actions.pod:4223
23152 #: ../fish/guestfish-actions.pod:4225
23155 " vgcreate volgroup 'physvols ...'\n"
23160 #: ../fish/guestfish-actions.pod:4230
23165 #: ../fish/guestfish-actions.pod:4232
23168 " vglvuuids vgname\n"
23173 #: ../fish/guestfish-actions.pod:4237
23175 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
23176 "logical volumes and volume groups."
23180 #: ../fish/guestfish-actions.pod:4240
23181 msgid "See also L</vgpvuuids>."
23185 #: ../fish/guestfish-actions.pod:4242
23190 #: ../fish/guestfish-actions.pod:4244
23193 " vgpvuuids vgname\n"
23198 #: ../fish/guestfish-actions.pod:4249
23200 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
23201 "physical volumes and volume groups."
23205 #: ../fish/guestfish-actions.pod:4252
23206 msgid "See also L</vglvuuids>."
23210 #: ../fish/guestfish-actions.pod:4254
23215 #: ../fish/guestfish-actions.pod:4256
23218 " vgremove vgname\n"
23223 #: ../fish/guestfish-actions.pod:4263
23228 #: ../fish/guestfish-actions.pod:4265
23231 " vgrename volgroup newvolgroup\n"
23236 #: ../fish/guestfish-actions.pod:4269
23241 #: ../fish/guestfish-actions.pod:4271
23249 #: ../fish/guestfish-actions.pod:4279
23250 msgid "See also L</vgs-full>."
23254 #: ../fish/guestfish-actions.pod:4281
23259 #: ../fish/guestfish-actions.pod:4283
23267 #: ../fish/guestfish-actions.pod:4288
23272 #: ../fish/guestfish-actions.pod:4290
23280 #: ../fish/guestfish-actions.pod:4295
23285 #: ../fish/guestfish-actions.pod:4297
23293 #: ../fish/guestfish-actions.pod:4301
23298 #: ../fish/guestfish-actions.pod:4303
23306 #: ../fish/guestfish-actions.pod:4308
23311 #: ../fish/guestfish-actions.pod:4310
23319 #: ../fish/guestfish-actions.pod:4315
23324 #: ../fish/guestfish-actions.pod:4317
23332 #: ../fish/guestfish-actions.pod:4322
23337 #: ../fish/guestfish-actions.pod:4324
23340 " write path content\n"
23345 #: ../fish/guestfish-actions.pod:4332
23350 #: ../fish/guestfish-actions.pod:4334
23353 " write-file path content size\n"
23358 #: ../fish/guestfish-actions.pod:4357
23363 #: ../fish/guestfish-actions.pod:4359
23366 " zegrep regex path\n"
23371 #: ../fish/guestfish-actions.pod:4367
23376 #: ../fish/guestfish-actions.pod:4369
23379 " zegrepi regex path\n"
23384 #: ../fish/guestfish-actions.pod:4377
23389 #: ../fish/guestfish-actions.pod:4379
23397 #: ../fish/guestfish-actions.pod:4387
23398 msgid "See also: L</zero-device>, L</scrub-device>."
23402 #: ../fish/guestfish-actions.pod:4389
23403 msgid "zero-device"
23407 #: ../fish/guestfish-actions.pod:4391
23410 " zero-device device\n"
23415 #: ../fish/guestfish-actions.pod:4393
23417 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
23418 "which just zeroes the first few blocks of a device."
23422 #: ../fish/guestfish-actions.pod:4400
23427 #: ../fish/guestfish-actions.pod:4402
23430 " zerofree device\n"
23435 #: ../fish/guestfish-actions.pod:4415
23440 #: ../fish/guestfish-actions.pod:4417
23443 " zfgrep pattern path\n"
23448 #: ../fish/guestfish-actions.pod:4425
23453 #: ../fish/guestfish-actions.pod:4427
23456 " zfgrepi pattern path\n"
23461 #: ../fish/guestfish-actions.pod:4435
23466 #: ../fish/guestfish-actions.pod:4437
23469 " zfile meth path\n"
23474 #: ../fish/guestfish-actions.pod:4444
23475 msgid "Since 1.0.63, use L</file> instead which can now process compressed files."
23479 #: ../fish/guestfish-actions.pod:4454
23484 #: ../fish/guestfish-actions.pod:4456
23487 " zgrep regex path\n"
23492 #: ../fish/guestfish-actions.pod:4464
23497 #: ../fish/guestfish-actions.pod:4466
23500 " zgrepi regex path\n"
23505 #: ../fish/guestfish-commands.pod:1
23510 #: ../fish/guestfish-commands.pod:3
23515 #: ../fish/guestfish-commands.pod:5
23518 " alloc filename size\n"
23523 #: ../fish/guestfish-commands.pod:7
23525 "This creates an empty (zeroed) file of the given size, and then adds so it "
23526 "can be further examined."
23530 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
23531 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
23535 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
23536 msgid "Size can be specified using standard suffixes, eg. C<1M>."
23540 #: ../fish/guestfish-commands.pod:14
23542 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
23543 "image, see L</PREPARED DISK IMAGES>."
23547 #: ../fish/guestfish-commands.pod:17
23552 #: ../fish/guestfish-commands.pod:19
23555 " copy-in local [local ...] /remotedir\n"
23560 #: ../fish/guestfish-commands.pod:21
23562 "C<copy-in> copies local files or directories recursively into the disk "
23563 "image, placing them in the directory called C</remotedir> (which must "
23564 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
23565 "other commands as necessary."
23569 #: ../fish/guestfish-commands.pod:26
23571 "Multiple local files and directories can be specified, but the last "
23572 "parameter must always be a remote directory. Wildcards cannot be used."
23576 #: ../fish/guestfish-commands.pod:30
23581 #: ../fish/guestfish-commands.pod:32
23584 " copy-out remote [remote ...] localdir\n"
23589 #: ../fish/guestfish-commands.pod:34
23591 "C<copy-out> copies remote files or directories recursively out of the disk "
23592 "image, placing them on the host disk in a local directory called C<localdir> "
23593 "(which must exist). This guestfish meta-command turns into a sequence of "
23594 "L</download>, L</tar-out> and other commands as necessary."
23598 #: ../fish/guestfish-commands.pod:40
23600 "Multiple remote files and directories can be specified, but the last "
23601 "parameter must always be a local directory. To download to the current "
23602 "directory, use C<.> as in:"
23606 #: ../fish/guestfish-commands.pod:44
23609 " copy-out /home .\n"
23614 #: ../fish/guestfish-commands.pod:46
23616 "Wildcards cannot be used in the ordinary command, but you can use them with "
23617 "the help of L</glob> like this:"
23621 #: ../fish/guestfish-commands.pod:49
23624 " glob copy-out /home/* .\n"
23629 #: ../fish/guestfish-commands.pod:51
23634 #: ../fish/guestfish-commands.pod:53
23637 " echo [params ...]\n"
23642 #: ../fish/guestfish-commands.pod:55
23643 msgid "This echos the parameters to the terminal."
23647 #: ../fish/guestfish-commands.pod:57
23652 #: ../fish/guestfish-commands.pod:59
23657 #: ../fish/guestfish-commands.pod:61
23662 #: ../fish/guestfish-commands.pod:63
23670 #: ../fish/guestfish-commands.pod:65
23672 "This is used to edit a file. It downloads the file, edits it locally using "
23673 "your editor, then uploads the result."
23677 #: ../fish/guestfish-commands.pod:68
23679 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
23680 "or C<emacs> you will get those corresponding editors."
23684 #: ../fish/guestfish-commands.pod:72
23689 #: ../fish/guestfish-commands.pod:74
23692 " glob command args...\n"
23697 #: ../fish/guestfish-commands.pod:76
23699 "Expand wildcards in any paths in the args list, and run C<command> "
23700 "repeatedly on each matching path."
23704 #: ../fish/guestfish-commands.pod:79
23705 msgid "See L</WILDCARDS AND GLOBBING>."
23709 #: ../fish/guestfish-commands.pod:81
23714 #: ../fish/guestfish-commands.pod:83
23717 " hexedit <filename|device>\n"
23718 " hexedit <filename|device> <max>\n"
23719 " hexedit <filename|device> <start> <max>\n"
23724 #: ../fish/guestfish-commands.pod:87
23726 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
23731 #: ../fish/guestfish-commands.pod:90
23733 "This command works by downloading potentially the whole file or device, "
23734 "editing it locally, then uploading it. If the file or device is large, you "
23735 "have to specify which part you wish to edit by using C<max> and/or C<start> "
23736 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
23737 "usual modifiers allowed such as C<1M> (1 megabyte)."
23741 #: ../fish/guestfish-commands.pod:97
23742 msgid "For example to edit the first few sectors of a disk you might do:"
23746 #: ../fish/guestfish-commands.pod:100
23749 " hexedit /dev/sda 1M\n"
23754 #: ../fish/guestfish-commands.pod:102
23756 "which would allow you to edit anywhere within the first megabyte of the "
23761 #: ../fish/guestfish-commands.pod:105
23762 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
23766 #: ../fish/guestfish-commands.pod:107
23769 " hexedit /dev/sda1 0x400 0x400\n"
23774 #: ../fish/guestfish-commands.pod:109
23775 msgid "(assuming the superblock is in the standard location)."
23779 #: ../fish/guestfish-commands.pod:111
23781 "This command requires the external L<hexedit(1)> program. You can specify "
23782 "another program to use by setting the C<HEXEDITOR> environment variable."
23786 #: ../fish/guestfish-commands.pod:115
23787 msgid "See also L</hexdump>."
23791 #: ../fish/guestfish-commands.pod:117
23796 #: ../fish/guestfish-commands.pod:119
23804 #: ../fish/guestfish-commands.pod:121
23805 msgid "Change the local directory, ie. the current directory of guestfish itself."
23809 #: ../fish/guestfish-commands.pod:124
23810 msgid "Note that C<!cd> won't do what you might expect."
23814 #: ../fish/guestfish-commands.pod:126
23819 #: ../fish/guestfish-commands.pod:128
23824 #: ../fish/guestfish-commands.pod:130
23832 #: ../fish/guestfish-commands.pod:132
23833 msgid "Opens the manual page for guestfish."
23837 #: ../fish/guestfish-commands.pod:134
23842 #: ../fish/guestfish-commands.pod:136
23847 #: ../fish/guestfish-commands.pod:138
23855 #: ../fish/guestfish-commands.pod:140
23863 #: ../fish/guestfish-commands.pod:142
23864 msgid "This is used to view a file."
23868 #: ../fish/guestfish-commands.pod:144
23870 "The default viewer is C<$PAGER>. However if you use the alternate command "
23871 "C<less> you will get the C<less> command specifically."
23875 #: ../fish/guestfish-commands.pod:147
23880 #: ../fish/guestfish-commands.pod:149
23888 #: ../fish/guestfish-commands.pod:151
23890 "Close and reopen the libguestfs handle. It is not necessary to use this "
23891 "normally, because the handle is closed properly when guestfish exits. "
23892 "However this is occasionally useful for testing."
23896 #: ../fish/guestfish-commands.pod:155
23901 #: ../fish/guestfish-commands.pod:157
23904 " sparse filename size\n"
23909 #: ../fish/guestfish-commands.pod:159
23911 "This creates an empty sparse file of the given size, and then adds so it can "
23912 "be further examined."
23916 #: ../fish/guestfish-commands.pod:162
23918 "In all respects it works the same as the L</alloc> command, except that the "
23919 "image file is allocated sparsely, which means that disk blocks are not "
23920 "assigned to the file until they are needed. Sparse disk files only use "
23921 "space when written to, but they are slower and there is a danger you could "
23922 "run out of real disk space during a write operation."
23926 #: ../fish/guestfish-commands.pod:172
23931 #: ../fish/guestfish-commands.pod:174
23939 #: ../fish/guestfish-commands.pod:176
23941 "This command returns a list of the optional groups known to the daemon, and "
23942 "indicates which ones are supported by this build of the libguestfs "
23947 #: ../fish/guestfish-commands.pod:180
23948 msgid "See also L<guestfs(3)/AVAILABILITY>."
23952 #: ../fish/guestfish-commands.pod:182
23957 #: ../fish/guestfish-commands.pod:184
23960 " time command args...\n"
23965 #: ../fish/guestfish-commands.pod:186
23967 "Run the command as usual, but print the elapsed time afterwards. This can "
23968 "be useful for benchmarking operations."
23972 #: ../test-tool/libguestfs-test-tool.pod:5
23973 msgid "libguestfs-test-tool - End user tests for libguestfs"
23977 #: ../test-tool/libguestfs-test-tool.pod:9
23980 " libguestfs-test-tool [--options]\n"
23985 #: ../test-tool/libguestfs-test-tool.pod:13
23987 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
23988 "and developers, to allow them to check basic libguestfs functionality is "
23989 "working. This is needed because libguestfs occasionally breaks for reasons "
23990 "beyond our control: usually because of changes in the underlying qemu or "
23991 "kernel packages, or the host environment."
23995 #: ../test-tool/libguestfs-test-tool.pod:20
23996 msgid "If you suspect a problem in libguestfs, then just run:"
24000 #: ../test-tool/libguestfs-test-tool.pod:22
24003 " libguestfs-test-tool\n"
24008 #: ../test-tool/libguestfs-test-tool.pod:24
24009 msgid "It will print lots of diagnostic messages."
24013 #: ../test-tool/libguestfs-test-tool.pod:26
24014 msgid "If it runs to completion successfully, you will see this near the end:"
24018 #: ../test-tool/libguestfs-test-tool.pod:28
24021 " ===== TEST FINISHED OK =====\n"
24026 #: ../test-tool/libguestfs-test-tool.pod:30
24027 msgid "and the test tool will exit with code 0."
24031 #: ../test-tool/libguestfs-test-tool.pod:32
24033 "If it fails (and/or exits with non-zero error code), please paste the "
24034 "B<complete, unedited> output of the test tool into a bug report. More "
24035 "information about reporting bugs can be found on the "
24036 "L<http://libguestfs.org/> website."
24040 #: ../test-tool/libguestfs-test-tool.pod:41
24045 #: ../test-tool/libguestfs-test-tool.pod:43
24046 msgid "Display short usage information and exit."
24050 #: ../test-tool/libguestfs-test-tool.pod:45
24051 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
24055 #: ../test-tool/libguestfs-test-tool.pod:47
24057 "Pass an alternate name for the helper program. libguestfs-test-tool will "
24058 "normally look in the C<$libexec> directory that was configured when the tool "
24063 #: ../test-tool/libguestfs-test-tool.pod:51
24064 msgid "I<--qemu qemu_binary>"
24068 #: ../test-tool/libguestfs-test-tool.pod:53
24070 "If you have downloaded another qemu binary, point this option at the full "
24071 "path of the binary to try it."
24075 #: ../test-tool/libguestfs-test-tool.pod:56
24076 msgid "I<--qemudir qemu_source_dir>"
24080 #: ../test-tool/libguestfs-test-tool.pod:58
24082 "If you have compiled qemu from source, point this option at the source "
24083 "directory to try it."
24087 #: ../test-tool/libguestfs-test-tool.pod:61
24088 msgid "I<--timeout N>"
24092 #: ../test-tool/libguestfs-test-tool.pod:63
24094 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
24095 "does not usually need to be adjusted unless your machine is very slow."
24099 #: ../test-tool/libguestfs-test-tool.pod:69
24100 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
24104 #: ../test-tool/libguestfs-test-tool.pod:71
24106 "If you have compiled another version of qemu from source and would like to "
24107 "try that, then you can use the I<--qemudir> option to point to the qemu "
24108 "source directory."
24112 #: ../test-tool/libguestfs-test-tool.pod:75
24114 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
24115 "option to point to the binary."
24119 #: ../test-tool/libguestfs-test-tool.pod:78
24121 "When using an alternate qemu with libguestfs, usually you would need to "
24122 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in "
24123 "L<guestfs(3)>). libguestfs-test-tool writes a temporary qemu wrapper script "
24124 "when you use either of the I<--qemudir> or I<--qemu> options."
24128 #: ../test-tool/libguestfs-test-tool.pod:85
24130 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
24131 "I<1> if there was an error."
24135 #: ../test-tool/libguestfs-test-tool.pod:92
24136 msgid "/usr/libexec/libguestfs-test-tool-helper"
24140 #: ../test-tool/libguestfs-test-tool.pod:94
24142 "This helper program is run inside the appliance and provides additional "
24147 #: ../test-tool/libguestfs-test-tool.pod:97
24148 msgid "/usr/bin/mkisofs"
24152 #: ../test-tool/libguestfs-test-tool.pod:99
24154 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
24155 "which is used as part of the tests."
24159 #: ../test-tool/libguestfs-test-tool.pod:106
24161 "For the full list of environment variables which may affect libguestfs, "
24162 "please see the L<guestfs(3)> manual page."
24166 #: ../test-tool/libguestfs-test-tool.pod:111
24167 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
24171 #: ../test-tool/libguestfs-test-tool.pod:121
24172 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
24176 #: ../fuse/guestmount.pod:5
24177 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
24181 #: ../fuse/guestmount.pod:9
24184 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
24189 #: ../fuse/guestmount.pod:11
24192 " guestmount [--options] -a disk.img -i [--ro] mountpoint\n"
24197 #: ../fuse/guestmount.pod:13
24200 " guestmount [--options] -d Guest -i [--ro] mountpoint\n"
24205 #: ../fuse/guestmount.pod:17
24207 "You must I<not> use C<guestmount> in read-write mode on live virtual "
24208 "machines. If you do this, you risk disk corruption in the VM."
24212 #: ../fuse/guestmount.pod:22
24214 "The guestmount program can be used to mount virtual machine filesystems and "
24215 "other disk images on the host. It uses libguestfs for access to the guest "
24216 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
24217 "a mountable device."
24221 #: ../fuse/guestmount.pod:27
24223 "Along with other options, you have to give at least one device (I<-a> "
24224 "option) or libvirt domain (I<-d> option), and at least one mountpoint (I<-m> "
24225 "option) or use the I<-i> inspection option. How this works is better "
24226 "explained in the L<guestfish(1)> manual page, or by looking at the examples "
24231 #: ../fuse/guestmount.pod:33
24233 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
24234 "by you, and the filesystem will not be visible to any other users unless you "
24235 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
24236 "the filesystem, use the C<fusermount -u> command."
24240 #: ../fuse/guestmount.pod:41
24242 "For a typical Windows guest which has its main filesystem on the first "
24247 #: ../fuse/guestmount.pod:44
24250 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
24255 #: ../fuse/guestmount.pod:46
24257 "For a typical Linux guest which has a /boot filesystem on the first "
24258 "partition, and the root filesystem on a logical volume:"
24262 #: ../fuse/guestmount.pod:49
24265 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
24270 #: ../fuse/guestmount.pod:51
24271 msgid "To get libguestfs to detect guest mountpoints for you:"
24275 #: ../fuse/guestmount.pod:53
24278 " guestmount -a guest.img -i --ro /mnt\n"
24283 #: ../fuse/guestmount.pod:55
24284 msgid "For a libvirt guest called \"Guest\" you could do:"
24288 #: ../fuse/guestmount.pod:57
24291 " guestmount -d Guest -i --ro /mnt\n"
24296 #: ../fuse/guestmount.pod:59
24298 "If you don't know what filesystems are contained in a guest or disk image, "
24299 "use L<virt-list-filesystems(1)> first:"
24303 #: ../fuse/guestmount.pod:62
24306 " virt-list-filesystems MyGuest\n"
24311 #: ../fuse/guestmount.pod:64
24313 "If you want to trace the libguestfs calls but without excessive debugging "
24314 "information, we recommend:"
24318 #: ../fuse/guestmount.pod:67
24321 " guestmount [...] --trace /mnt\n"
24326 #: ../fuse/guestmount.pod:69
24327 msgid "If you want to debug the program, we recommend:"
24331 #: ../fuse/guestmount.pod:71
24334 " guestmount [...] --trace --verbose /mnt\n"
24339 #: ../fuse/guestmount.pod:79
24340 msgid "Add a block device or virtual machine image."
24344 #: ../fuse/guestmount.pod:96
24345 msgid "B<--dir-cache-timeout N>"
24349 #: ../fuse/guestmount.pod:98
24351 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
24352 "seconds. The readdir cache [actually, there are several semi-independent "
24353 "caches] is populated after a readdir(2) call with the stat and extended "
24354 "attributes of the files in the directory, in anticipation that they will be "
24355 "requested soon after."
24359 #: ../fuse/guestmount.pod:104
24361 "There is also a different attribute cache implemented by FUSE (see the FUSE "
24362 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
24363 "requests, only cache existing ones."
24367 #: ../fuse/guestmount.pod:122
24369 "If you have untrusted raw-format guest disk images, you should use this "
24370 "option to specify the disk format. This avoids a possible security problem "
24371 "with malicious guests (CVE-2010-3851). See also "
24372 "L<guestfs(3)/guestfs_add_drive_opts>."
24376 #: ../fuse/guestmount.pod:127
24377 msgid "B<--fuse-help>"
24381 #: ../fuse/guestmount.pod:129
24382 msgid "Display help on special FUSE options (see I<-o> below)."
24386 #: ../fuse/guestmount.pod:133
24387 msgid "Display brief help and exit."
24391 #: ../fuse/guestmount.pod:146
24392 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
24396 #: ../fuse/guestmount.pod:148
24398 "Mount the named partition or logical volume on the given mountpoint B<in the "
24399 "guest> (this has nothing to do with mountpoints in the host)."
24403 #: ../fuse/guestmount.pod:151
24405 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
24406 "something on C</>."
24410 #: ../fuse/guestmount.pod:156
24412 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
24413 "unmounted. If you specify this option, then we don't attempt to sync the "
24414 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
24418 #: ../fuse/guestmount.pod:161
24419 msgid "B<-o option> | B<--option option>"
24423 #: ../fuse/guestmount.pod:163
24424 msgid "Pass extra options to FUSE."
24428 #: ../fuse/guestmount.pod:165
24430 "To get a list of all the extra options supported by FUSE, use the command "
24431 "below. Note that only the FUSE I<-o> options can be passed, and only some "
24432 "of them are a good idea."
24436 #: ../fuse/guestmount.pod:169
24439 " guestmount --fuse-help\n"
24444 #: ../fuse/guestmount.pod:171
24445 msgid "Some potentially useful FUSE options:"
24449 #: ../fuse/guestmount.pod:175
24450 msgid "B<-o allow_other>"
24454 #: ../fuse/guestmount.pod:177
24455 msgid "Allow other users to see the filesystem."
24459 #: ../fuse/guestmount.pod:179
24460 msgid "B<-o attr_timeout=N>"
24464 #: ../fuse/guestmount.pod:181
24465 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
24469 #: ../fuse/guestmount.pod:183
24470 msgid "B<-o kernel_cache>"
24474 #: ../fuse/guestmount.pod:185
24476 "Allow the kernel to cache files (reduces the number of reads that have to go "
24477 "through the L<guestfs(3)> API). This is generally a good idea if you can "
24478 "afford the extra memory usage."
24482 #: ../fuse/guestmount.pod:189
24483 msgid "B<-o uid=N> B<-o gid=N>"
24487 #: ../fuse/guestmount.pod:191
24489 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
24490 "the chosen values."
24494 #: ../fuse/guestmount.pod:198
24496 "Add devices and mount everything read-only. Also disallow writes and make "
24497 "the disk appear read-only to FUSE."
24501 #: ../fuse/guestmount.pod:201
24503 "This is highly recommended if you are not going to edit the guest disk. If "
24504 "the guest is running and this option is I<not> supplied, then there is a "
24505 "strong risk of disk corruption in the guest. We try to prevent this from "
24506 "happening, but it is not always possible."
24510 #: ../fuse/guestmount.pod:208
24511 msgid "Enable SELinux support for the guest."
24515 #: ../fuse/guestmount.pod:212
24516 msgid "Enable verbose messages from underlying libguestfs."
24520 #: ../fuse/guestmount.pod:216
24521 msgid "Display the program version and exit."
24525 #: ../fuse/guestmount.pod:218
24526 msgid "B<-x> | B<--trace>"
24530 #: ../fuse/guestmount.pod:220
24531 msgid "Trace libguestfs calls."
24535 #: ../fuse/guestmount.pod:222
24536 msgid "This also stops the daemon from forking into the background."
24540 #: ../fuse/guestmount.pod:228
24542 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
24543 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
24544 "L<http://fuse.sf.net/>."
24548 #: ../inspector/virt-inspector.pl:35
24550 "virt-inspector - Display operating system version and other information "
24551 "about a virtual machine"
24555 #: ../inspector/virt-inspector.pl:39
24558 " virt-inspector [--connect URI] domname\n"
24563 #: ../inspector/virt-inspector.pl:41
24566 " virt-inspector guest.img [guest.img ...]\n"
24571 #: ../inspector/virt-inspector.pl:45
24573 "B<virt-inspector> examines a virtual machine or disk image and tries to "
24574 "determine the version of the operating system and other information about "
24575 "the virtual machine."
24579 #: ../inspector/virt-inspector.pl:49
24580 msgid "Virt-inspector produces XML output for feeding into other programs."
24584 #: ../inspector/virt-inspector.pl:51
24586 "In the normal usage, use C<virt-inspector domname> where C<domname> is the "
24587 "libvirt domain (see: C<virsh list --all>)."
24591 #: ../inspector/virt-inspector.pl:54
24593 "You can also run virt-inspector directly on disk images from a single "
24594 "virtual machine. Use C<virt-inspector guest.img>. In rare cases a domain "
24595 "has several block devices, in which case you should list them one after "
24596 "another, with the first corresponding to the guest's C</dev/sda>, the second "
24597 "to the guest's C</dev/sdb> and so on."
24601 #: ../inspector/virt-inspector.pl:60
24603 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
24604 "inspect several virtual machines, you have to run virt-inspector several "
24605 "times (for example, from a shell script for-loop)."
24609 #: ../inspector/virt-inspector.pl:65
24611 "Because virt-inspector needs direct access to guest images, it won't "
24612 "normally work over remote libvirt connections."
24616 #: ../inspector/virt-inspector.pl:78 ../tools/virt-edit.pl:82 ../tools/virt-win-reg.pl:181 ../tools/virt-df.pl:81 ../tools/virt-ls.pl:88 ../tools/virt-list-filesystems.pl:60 ../tools/virt-cat.pl:89 ../tools/virt-tar.pl:108 ../tools/virt-rescue.pl:113 ../tools/virt-make-fs.pl:163 ../tools/virt-list-partitions.pl:61
24617 msgid "Display brief help."
24621 #: ../inspector/virt-inspector.pl:84 ../tools/virt-edit.pl:88 ../tools/virt-win-reg.pl:187 ../tools/virt-df.pl:87 ../tools/virt-ls.pl:94 ../tools/virt-resize.pl:273 ../tools/virt-list-filesystems.pl:66 ../tools/virt-cat.pl:95 ../tools/virt-tar.pl:114 ../tools/virt-rescue.pl:119 ../tools/virt-make-fs.pl:169 ../tools/virt-list-partitions.pl:67
24622 msgid "B<--version>"
24626 #: ../inspector/virt-inspector.pl:86 ../tools/virt-edit.pl:90 ../tools/virt-win-reg.pl:189 ../tools/virt-df.pl:89 ../tools/virt-ls.pl:96 ../tools/virt-resize.pl:275 ../tools/virt-list-filesystems.pl:68 ../tools/virt-cat.pl:97 ../tools/virt-tar.pl:116 ../tools/virt-rescue.pl:121 ../tools/virt-make-fs.pl:171 ../tools/virt-list-partitions.pl:69
24627 msgid "Display version number and exit."
24631 #: ../inspector/virt-inspector.pl:92 ../tools/virt-edit.pl:112 ../tools/virt-win-reg.pl:203 ../tools/virt-df.pl:95 ../tools/virt-ls.pl:102 ../tools/virt-list-filesystems.pl:74 ../tools/virt-cat.pl:103 ../tools/virt-tar.pl:122 ../tools/virt-rescue.pl:135 ../tools/virt-list-partitions.pl:75
24632 msgid "B<--connect URI> | B<-c URI>"
24636 #: ../inspector/virt-inspector.pl:94 ../tools/virt-edit.pl:114 ../tools/virt-win-reg.pl:205 ../tools/virt-df.pl:97 ../tools/virt-ls.pl:104 ../tools/virt-list-filesystems.pl:76 ../tools/virt-cat.pl:105 ../tools/virt-tar.pl:124 ../tools/virt-rescue.pl:137 ../tools/virt-list-partitions.pl:77
24638 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
24639 "to the default libvirt hypervisor."
24643 #: ../inspector/virt-inspector.pl:97
24645 "Libvirt is only used if you specify a C<domname> on the command line. If "
24646 "you specify guest block devices directly, then libvirt is not used at all."
24650 #: ../inspector/virt-inspector.pl:105 ../tools/virt-edit.pl:124 ../tools/virt-win-reg.pl:215 ../tools/virt-df.pl:117 ../tools/virt-ls.pl:114 ../tools/virt-resize.pl:523 ../tools/virt-list-filesystems.pl:86 ../tools/virt-cat.pl:115 ../tools/virt-tar.pl:134 ../tools/virt-rescue.pl:147 ../tools/virt-list-partitions.pl:87
24651 msgid "B<--format> raw"
24655 #: ../inspector/virt-inspector.pl:107 ../tools/virt-edit.pl:126 ../tools/virt-win-reg.pl:217 ../tools/virt-df.pl:119 ../tools/virt-ls.pl:116 ../tools/virt-list-filesystems.pl:88 ../tools/virt-cat.pl:117 ../tools/virt-tar.pl:136 ../tools/virt-rescue.pl:149 ../tools/virt-list-partitions.pl:89
24657 "Specify the format of disk images given on the command line. If this is "
24658 "omitted then the format is autodetected from the content of the disk image."
24662 #: ../inspector/virt-inspector.pl:111 ../tools/virt-edit.pl:130 ../tools/virt-win-reg.pl:221 ../tools/virt-df.pl:123 ../tools/virt-ls.pl:120 ../tools/virt-list-filesystems.pl:92 ../tools/virt-cat.pl:121 ../tools/virt-tar.pl:140 ../tools/virt-rescue.pl:153 ../tools/virt-list-partitions.pl:93
24664 "If disk images are requested from libvirt, then this program asks libvirt "
24665 "for this information. In this case, the value of the format parameter is "
24670 #: ../inspector/virt-inspector.pl:115 ../tools/virt-edit.pl:134 ../tools/virt-win-reg.pl:225 ../tools/virt-df.pl:127 ../tools/virt-ls.pl:124 ../tools/virt-resize.pl:528 ../tools/virt-resize.pl:543 ../tools/virt-list-filesystems.pl:96 ../tools/virt-cat.pl:125 ../tools/virt-tar.pl:144 ../tools/virt-rescue.pl:157 ../tools/virt-list-partitions.pl:97
24672 "If working with untrusted raw-format guest disk images, you should ensure "
24673 "the format is always specified."
24677 #: ../inspector/virt-inspector.pl:149
24682 #: ../inspector/virt-inspector.pl:151
24684 "The virt-inspector XML is described precisely in a RELAX NG schema which is "
24685 "supplied with libguestfs. This section is just an overview."
24689 #: ../inspector/virt-inspector.pl:154
24691 "The top-level element is E<lt>operatingsystemsE<gt>, and it contains one or "
24692 "more E<lt>operatingsystemE<gt> elements. You would only see more than one "
24693 "E<lt>operatingsystemE<gt> element if the virtual machine is multi-boot, "
24694 "which is vanishingly rare in real world VMs."
24698 #: ../inspector/virt-inspector.pl:159
24699 msgid "E<lt>operatingsystemE<gt>"
24703 #: ../inspector/virt-inspector.pl:161
24705 "In the E<lt>operatingsystemE<gt> tag are various optional fields that "
24706 "describe the operating system, its architecture, the descriptive \"product "
24707 "name\" string, the type of OS and so on, as in this example:"
24711 #: ../inspector/virt-inspector.pl:165
24714 " <operatingsystems>\n"
24715 " <operatingsystem>\n"
24716 " <root>/dev/sda2</root>\n"
24717 " <name>windows</name>\n"
24718 " <arch>i386</arch>\n"
24719 " <distro>windows</distro>\n"
24720 " <product_name>Windows 7 Enterprise</product_name>\n"
24721 " <major_version>6</major_version>\n"
24722 " <minor_version>1</minor_version>\n"
24723 " <windows_systemroot>/Windows</windows_systemroot>\n"
24728 #: ../inspector/virt-inspector.pl:176
24730 "These fields are derived from the libguestfs inspection API, and you can "
24731 "find more details in L<guestfs(3)/INSPECTION>."
24735 #: ../inspector/virt-inspector.pl:179
24737 "The E<lt>rootE<gt> element is the root filesystem device, but from the point "
24738 "of view of libguestfs (block devices may have completely different names "
24739 "inside the VM itself)."
24743 #: ../inspector/virt-inspector.pl:240
24744 msgid "E<lt>mountpointsE<gt>"
24748 #: ../inspector/virt-inspector.pl:242
24750 "Un*x-like guests typically have multiple filesystems which are mounted at "
24751 "various mountpoints, and these are described in the E<lt>mountpointsE<gt> "
24752 "element which looks like this:"
24756 #: ../inspector/virt-inspector.pl:246
24759 " <operatingsystems>\n"
24760 " <operatingsystem>\n"
24763 " <mountpoint dev=\"/dev/vg_f13x64/lv_root\">/</mountpoint>\n"
24764 " <mountpoint dev=\"/dev/sda1\">/boot</mountpoint>\n"
24765 " </mountpoints>\n"
24770 #: ../inspector/virt-inspector.pl:254
24772 "As with E<lt>rootE<gt>, devices are from the point of view of libguestfs, "
24773 "and may have completely different names inside the guest. Only mountable "
24774 "filesystems appear in this list, not things like swap devices."
24778 #: ../inspector/virt-inspector.pl:276
24779 msgid "E<lt>filesystemsE<gt>"
24783 #: ../inspector/virt-inspector.pl:278
24785 "E<lt>filesystemsE<gt> is like E<lt>mountpointsE<gt> but covers I<all> "
24786 "filesystems belonging to the guest, including swap and empty partitions. "
24787 "(In the rare case of a multi-boot guest, it covers filesystems belonging to "
24788 "this OS or shared by this OS and other OSes)."
24792 #: ../inspector/virt-inspector.pl:283
24793 msgid "You might see something like this:"
24797 #: ../inspector/virt-inspector.pl:285
24800 " <operatingsystems>\n"
24801 " <operatingsystem>\n"
24804 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
24805 " <type>ext4</type>\n"
24806 " <label>Fedora-13-x86_64</label>\n"
24807 " <uuid>e6a4db1e-15c2-477b-ac2a-699181c396aa</uuid>\n"
24813 #: ../inspector/virt-inspector.pl:295
24815 "The optional elements within E<lt>filesystemE<gt> are the filesystem type, "
24816 "the label, and the UUID."
24820 #: ../inspector/virt-inspector.pl:337
24821 msgid "E<lt>applicationsE<gt>"
24825 #: ../inspector/virt-inspector.pl:339
24827 "The related elements E<lt>package_formatE<gt>, E<lt>package_managementE<gt> "
24828 "and E<lt>applicationsE<gt> describe applications installed in the virtual "
24829 "machine. At the moment we are only able to list RPMs and Debian packages "
24830 "installed, but in future we will support other Linux distros and Windows."
24834 #: ../inspector/virt-inspector.pl:345
24836 "E<lt>package_formatE<gt>, if present, describes the packaging system used. "
24837 "Typical values would be C<rpm> and C<deb>."
24841 #: ../inspector/virt-inspector.pl:348
24843 "E<lt>package_managementE<gt>, if present, describes the package manager. "
24844 "Typical values include C<yum>, C<up2date> and C<apt>"
24848 #: ../inspector/virt-inspector.pl:351
24849 msgid "E<lt>applicationsE<gt> lists the packages or applications installed."
24853 #: ../inspector/virt-inspector.pl:354
24856 " <operatingsystems>\n"
24857 " <operatingsystem>\n"
24859 " <applications>\n"
24861 " <name>coreutils</name>\n"
24862 " <version>8.5</version>\n"
24863 " <release>1</release>\n"
24864 " </application>\n"
24869 #: ../inspector/virt-inspector.pl:364
24871 "(The version and release fields may not be available for some package "
24876 #: ../inspector/virt-inspector.pl:544
24877 msgid "USING XPATH"
24881 #: ../inspector/virt-inspector.pl:546
24883 "You can use the XPath query language, and/or the xpath tool, in order to "
24884 "select parts of the XML."
24888 #: ../inspector/virt-inspector.pl:551
24891 " $ virt-inspector Guest | xpath //filesystems\n"
24892 " Found 1 nodes:\n"
24895 " <filesystem dev=\"/dev/vg_f13x64/lv_root\">\n"
24896 " <type>ext4</type>\n"
24902 #: ../inspector/virt-inspector.pl:559
24905 " $ virt-inspector Guest | \\\n"
24906 " xpath \"string(//filesystem[@dev='/dev/sda1']/type)\"\n"
24907 " Query didn't return a nodeset. Value: ext4\n"
24912 #: ../inspector/virt-inspector.pl:563 ../tools/virt-edit.pl:343 ../tools/virt-win-reg.pl:141 ../tools/virt-win-reg.pl:477 ../tools/virt-df.pl:633 ../tools/virt-ls.pl:225 ../tools/virt-resize.pl:1479 ../tools/virt-list-filesystems.pl:179 ../tools/virt-cat.pl:178 ../tools/virt-tar.pl:274 ../tools/virt-rescue.pl:260 ../tools/virt-make-fs.pl:527 ../tools/virt-list-partitions.pl:247
24913 msgid "SHELL QUOTING"
24917 #: ../inspector/virt-inspector.pl:565 ../tools/virt-edit.pl:345 ../tools/virt-win-reg.pl:479 ../tools/virt-df.pl:635 ../tools/virt-ls.pl:227 ../tools/virt-resize.pl:1481 ../tools/virt-list-filesystems.pl:181 ../tools/virt-cat.pl:180 ../tools/virt-tar.pl:276 ../tools/virt-rescue.pl:262 ../tools/virt-make-fs.pl:529 ../tools/virt-list-partitions.pl:249
24919 "Libvirt guest names can contain arbitrary characters, some of which have "
24920 "meaning to the shell such as C<#> and space. You may need to quote or "
24921 "escape these characters on the command line. See the shell manual page "
24922 "L<sh(1)> for details."
24926 #: ../inspector/virt-inspector.pl:572
24928 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
24929 "L<Sys::Virt(3)>, L<http://www.w3.org/TR/xpath/>, L<http://libguestfs.org/>."
24933 #: ../inspector/virt-inspector.pl:586 ../tools/virt-edit.pl:364 ../tools/virt-win-reg.pl:512 ../tools/virt-df.pl:651 ../tools/virt-ls.pl:245 ../tools/virt-resize.pl:1510 ../tools/virt-list-filesystems.pl:200 ../tools/virt-cat.pl:197 ../tools/virt-tar.pl:294 ../tools/virt-rescue.pl:279 ../tools/virt-make-fs.pl:561 ../tools/virt-list-partitions.pl:267
24934 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
24938 #: ../inspector/virt-inspector.pl:590
24939 msgid "Matthew Booth L<mbooth@redhat.com>"
24943 #: ../inspector/virt-inspector.pl:596 ../tools/virt-win-reg.pl:516 ../tools/virt-resize.pl:1514 ../tools/virt-make-fs.pl:565
24944 msgid "Copyright (C) 2010 Red Hat Inc."
24948 #: ../tools/virt-edit.pl:34
24949 msgid "virt-edit - Edit a file in a virtual machine"
24953 #: ../tools/virt-edit.pl:38
24956 " virt-edit [--options] domname file\n"
24961 #: ../tools/virt-edit.pl:40
24964 " virt-edit [--options] disk.img [disk.img ...] file\n"
24969 #: ../tools/virt-edit.pl:42
24972 " virt-edit [domname|disk.img] file -e 'expr'\n"
24977 #: ../tools/virt-edit.pl:46
24979 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
24980 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
24981 "doing this, but doesn't catch all cases."
24985 #: ../tools/virt-edit.pl:52
24987 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
24988 "the named virtual machine (or disk image)."
24992 #: ../tools/virt-edit.pl:55
24994 "If you want to just view a file, use L<virt-cat(1)>. For more complex cases "
24995 "you should look at the L<guestfish(1)> tool."
24999 #: ../tools/virt-edit.pl:60
25000 msgid "Edit the named files interactively:"
25004 #: ../tools/virt-edit.pl:62
25007 " virt-edit mydomain /boot/grub/grub.conf\n"
25012 #: ../tools/virt-edit.pl:64
25015 " virt-edit mydomain /etc/passwd\n"
25020 #: ../tools/virt-edit.pl:66
25022 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
25023 "below). To change the init default level to 5:"
25027 #: ../tools/virt-edit.pl:70
25030 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
25035 #: ../tools/virt-edit.pl:96
25036 msgid "B<--backup extension> | B<-b extension>"
25040 #: ../tools/virt-edit.pl:98
25042 "Create a backup of the original file I<in the guest disk image>. The backup "
25043 "has the original filename with C<extension> added."
25047 #: ../tools/virt-edit.pl:101
25049 "Usually the first character of C<extension> would be a dot C<.> so you would "
25054 #: ../tools/virt-edit.pl:104
25057 " virt-edit -b .orig [etc]\n"
25062 #: ../tools/virt-edit.pl:106
25063 msgid "By default, no backup file is made."
25067 #: ../tools/virt-edit.pl:117 ../tools/virt-win-reg.pl:208 ../tools/virt-df.pl:100 ../tools/virt-ls.pl:107 ../tools/virt-list-filesystems.pl:79 ../tools/virt-cat.pl:108 ../tools/virt-tar.pl:127 ../tools/virt-rescue.pl:140 ../tools/virt-list-partitions.pl:80
25069 "If you specify guest block devices directly, then libvirt is not used at "
25074 #: ../tools/virt-edit.pl:141
25075 msgid "B<--expr EXPR> | B<-e EXPR>"
25079 #: ../tools/virt-edit.pl:143
25081 "Instead of launching the external editor, non-interactively apply the Perl "
25082 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
25087 #: ../tools/virt-edit.pl:147
25089 "Be careful to properly quote the expression to prevent it from being altered "
25094 #: ../tools/virt-edit.pl:268
25095 msgid "NON-INTERACTIVE EDITING"
25099 #: ../tools/virt-edit.pl:270
25101 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
25102 "administrator can interactively edit the file."
25106 #: ../tools/virt-edit.pl:273
25108 "There are two ways also to use C<virt-edit> from scripts in order to make "
25109 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
25110 "like this, it's less error-prone to write scripts directly using the "
25111 "libguestfs API and Augeas for configuration file editing.)"
25115 #: ../tools/virt-edit.pl:279
25117 "The first method is to temporarily set C<$EDITOR> to any script or program "
25118 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
25119 "update C<tmpfile> in place however it likes."
25123 #: ../tools/virt-edit.pl:283
25125 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
25126 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
25127 "instances of C<foo> with C<bar> in a file:"
25131 #: ../tools/virt-edit.pl:287
25134 " virt-edit domname filename -e 's/foo/bar/'\n"
25139 #: ../tools/virt-edit.pl:289
25141 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
25142 "For example to delete root's password you could do:"
25146 #: ../tools/virt-edit.pl:292
25149 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
25154 #: ../tools/virt-edit.pl:294
25156 "What really happens is that the snippet is evaluated as a Perl expression "
25157 "for each line of the file. The line, including the final C<\\n>, is passed "
25158 "in C<$_> and the expression should update C<$_> or leave it unchanged."
25162 #: ../tools/virt-edit.pl:299
25164 "To delete a line, set C<$_> to the empty string. For example, to delete the "
25165 "C<apache> user account from the password file you can do:"
25169 #: ../tools/virt-edit.pl:302
25172 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
25177 #: ../tools/virt-edit.pl:304
25179 "To insert a line, prepend or append it to C<$_>. However appending lines to "
25180 "the end of the file is rather difficult this way since there is no concept "
25181 "of \"last line of the file\" - your expression just doesn't get called "
25182 "again. You might want to use the first method (setting C<$EDITOR>) if you "
25187 #: ../tools/virt-edit.pl:310
25189 "The variable C<$lineno> contains the current line number. As is "
25190 "traditional, the first line in the file is number C<1>."
25194 #: ../tools/virt-edit.pl:313
25196 "The return value from the expression is ignored, but the expression may call "
25197 "C<die> in order to abort the whole program, leaving the original file "
25202 #: ../tools/virt-edit.pl:317
25204 "Remember when matching the end of a line that C<$_> may contain the final "
25205 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
25206 "newline then neither of these. Thus to match or substitute some text at the "
25207 "end of a line, use this regular expression:"
25211 #: ../tools/virt-edit.pl:322
25214 " /some text(\\r?\\n)?$/\n"
25219 #: ../tools/virt-edit.pl:324
25221 "Alternately, use the perl C<chomp> function, being careful not to chomp "
25222 "C<$_> itself (since that would remove all newlines from the file):"
25226 #: ../tools/virt-edit.pl:328
25229 " my $m = $_; chomp $m; $m =~ /some text$/\n"
25234 #: ../tools/virt-edit.pl:334
25239 #: ../tools/virt-edit.pl:336
25241 "If set, this string is used as the editor. It may contain arguments, "
25242 "eg. C<\"emacs -nw\">"
25246 #: ../tools/virt-edit.pl:339
25247 msgid "If not set, C<vi> is used."
25251 #: ../tools/virt-edit.pl:352
25253 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
25254 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>, "
25255 "L<perl(1)>, L<perlre(1)>."
25259 #: ../tools/virt-edit.pl:362 ../tools/virt-win-reg.pl:510 ../tools/virt-df.pl:649 ../tools/virt-ls.pl:243 ../tools/virt-resize.pl:1508 ../tools/virt-list-filesystems.pl:198 ../tools/virt-cat.pl:195 ../tools/virt-tar.pl:292 ../tools/virt-rescue.pl:277 ../tools/virt-make-fs.pl:559 ../tools/virt-list-partitions.pl:265
25264 #: ../tools/virt-edit.pl:368 ../tools/virt-df.pl:655 ../tools/virt-rescue.pl:283 ../tools/virt-list-partitions.pl:271
25265 msgid "Copyright (C) 2009-2010 Red Hat Inc."
25269 #: ../tools/virt-win-reg.pl:37
25271 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
25276 #: ../tools/virt-win-reg.pl:41
25279 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
25284 #: ../tools/virt-win-reg.pl:43
25287 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
25292 #: ../tools/virt-win-reg.pl:45
25295 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
25300 #: ../tools/virt-win-reg.pl:47
25303 " virt-win-reg --merge domname [input.reg ...]\n"
25308 #: ../tools/virt-win-reg.pl:49
25311 " virt-win-reg [--options] disk.img ... # instead of domname\n"
25316 #: ../tools/virt-win-reg.pl:53
25318 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
25319 "virtual machines. If you do this, you I<will> get irreversible disk "
25320 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
25321 "but doesn't catch all cases."
25325 #: ../tools/virt-win-reg.pl:58
25327 "Modifying the Windows Registry is an inherently risky operation. The format "
25328 "is deliberately obscure and undocumented, and Registry changes can leave the "
25329 "system unbootable. Therefore when using the C<--merge> option, make sure "
25330 "you have a reliable backup first."
25334 #: ../tools/virt-win-reg.pl:65
25336 "This program can export and merge Windows Registry entries from a Windows "
25341 #: ../tools/virt-win-reg.pl:68
25343 "The first parameter is the libvirt guest name or the raw disk image of a "
25348 #: ../tools/virt-win-reg.pl:71
25350 "If C<--merge> is I<not> specified, then the chosen registry key is "
25351 "displayed/exported (recursively). For example:"
25355 #: ../tools/virt-win-reg.pl:74
25358 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
25363 #: ../tools/virt-win-reg.pl:76
25364 msgid "You can also display single values from within registry keys, for example:"
25368 #: ../tools/virt-win-reg.pl:79
25371 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
25372 " $ virt-win-reg Windows7 $cvkey ProductName\n"
25373 " Windows 7 Enterprise\n"
25378 #: ../tools/virt-win-reg.pl:83
25380 "With C<--merge>, you can merge a textual regedit file into the Windows "
25385 #: ../tools/virt-win-reg.pl:86
25388 " $ virt-win-reg --merge Windows7 changes.reg\n"
25393 #: ../tools/virt-win-reg.pl:88
25394 msgid "SUPPORTED SYSTEMS"
25398 #: ../tools/virt-win-reg.pl:90
25400 "The program currently supports Windows NT-derived guests starting with "
25401 "Windows XP through to at least Windows 7."
25405 #: ../tools/virt-win-reg.pl:93
25407 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, "
25408 "C<HKEY_LOCAL_MACHINE\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, "
25409 "C<HKEY_LOCAL_MACHINE\\SYSTEM> and C<HKEY_USERS\\.DEFAULT>."
25413 #: ../tools/virt-win-reg.pl:97
25415 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
25420 #: ../tools/virt-win-reg.pl:100
25422 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
25427 #: ../tools/virt-win-reg.pl:103
25432 #: ../tools/virt-win-reg.pl:105
25434 "This program is only meant for simple access to the registry. If you want "
25435 "to do complicated things with the registry, we suggest you download the "
25436 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
25437 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
25438 "L<hivexregedit(1)>."
25442 #: ../tools/virt-win-reg.pl:111
25447 #: ../tools/virt-win-reg.pl:113
25449 "C<virt-win-reg> expects that regedit files have already been reencoded in "
25450 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
25451 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
25452 "with Windows-style line endings, you may need to reencode the whole file "
25453 "before or after processing."
25457 #: ../tools/virt-win-reg.pl:119
25459 "To reencode a file from Windows format to Linux (before processing it with "
25460 "the C<--merge> option), you would do something like this:"
25464 #: ../tools/virt-win-reg.pl:122
25467 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
25472 #: ../tools/virt-win-reg.pl:124
25474 "To go in the opposite direction, after exporting and before sending the file "
25475 "to a Windows user, do something like this:"
25479 #: ../tools/virt-win-reg.pl:127
25482 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
25487 #: ../tools/virt-win-reg.pl:129
25488 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
25492 #: ../tools/virt-win-reg.pl:131
25494 "If you are unsure about the current encoding, use the L<file(1)> command. "
25495 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
25496 "Windows-style (CRLF) line endings, like this:"
25500 #: ../tools/virt-win-reg.pl:135
25503 " $ file software.reg\n"
25504 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
25505 " with CRLF line terminators\n"
25510 #: ../tools/virt-win-reg.pl:139
25511 msgid "This file would need conversion before you could C<--merge> it."
25515 #: ../tools/virt-win-reg.pl:143
25517 "Be careful when passing parameters containing C<\\> (backslash) in the "
25518 "shell. Usually you will have to use 'single quotes' or double backslashes "
25519 "(but not both) to protect them from the shell."
25523 #: ../tools/virt-win-reg.pl:147
25524 msgid "Paths and value names are case-insensitive."
25528 #: ../tools/virt-win-reg.pl:149
25529 msgid "CurrentControlSet etc."
25533 #: ../tools/virt-win-reg.pl:151
25535 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
25536 "Registry at the level of the hive file, and therefore you cannot modify "
25541 #: ../tools/virt-win-reg.pl:155
25543 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
25544 "circumstances it might refer to another control set. The way to find out is "
25545 "to look at the C<HKLM\\SYSTEM\\Select> key:"
25549 #: ../tools/virt-win-reg.pl:159
25552 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
25553 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
25554 " \"Current\"=dword:00000001\n"
25555 " \"Default\"=dword:00000001\n"
25556 " \"Failed\"=dword:00000000\n"
25557 " \"LastKnownGood\"=dword:00000002\n"
25562 #: ../tools/virt-win-reg.pl:166
25563 msgid "\"Current\" is the one which Windows will choose when it boots."
25567 #: ../tools/virt-win-reg.pl:168
25568 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
25572 #: ../tools/virt-win-reg.pl:195 ../tools/virt-make-fs.pl:177
25577 #: ../tools/virt-win-reg.pl:197 ../tools/virt-resize.pl:501
25578 msgid "Enable debugging messages."
25582 #: ../tools/virt-win-reg.pl:232
25587 #: ../tools/virt-win-reg.pl:234
25589 "In merge mode, this merges a textual regedit file into the Windows Registry "
25590 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
25591 "displays or exports Registry entries instead."
25595 #: ../tools/virt-win-reg.pl:238
25597 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
25598 "result in disk corruption. However exporting (without this flag) is always "
25603 #: ../tools/virt-win-reg.pl:246
25604 msgid "B<--encoding> UTF-16LE|ASCII"
25608 #: ../tools/virt-win-reg.pl:248
25610 "When merging (only), you may need to specify the encoding for strings to be "
25611 "used in the hive file. This is explained in detail in "
25612 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
25616 #: ../tools/virt-win-reg.pl:252
25618 "The default is to use UTF-16LE, which should work with recent versions of "
25623 #: ../tools/virt-win-reg.pl:486
25625 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
25626 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
25627 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
25628 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
25632 #: ../tools/virt-win-reg.pl:501 ../tools/virt-make-fs.pl:550
25634 "When reporting bugs, please enable debugging and capture the I<complete> "
25639 #: ../tools/virt-win-reg.pl:504
25642 " export LIBGUESTFS_DEBUG=1\n"
25643 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
25648 #: ../tools/virt-win-reg.pl:507
25650 "Attach /tmp/virt-win-reg.log to a new bug report at "
25651 "L<https://bugzilla.redhat.com/>"
25655 #: ../tools/virt-df.pl:36
25656 msgid "virt-df - Display free space on virtual filesystems"
25660 #: ../tools/virt-df.pl:40
25663 " virt-df [--options]\n"
25668 #: ../tools/virt-df.pl:42
25671 " virt-df [--options] domname\n"
25676 #: ../tools/virt-df.pl:44
25679 " virt-df [--options] disk.img [disk.img ...]\n"
25684 #: ../tools/virt-df.pl:48
25686 "C<virt-df> is a command line tool to display free space on virtual machine "
25687 "filesystems. Unlike other tools, it doesn't just display the amount of "
25688 "space allocated to a virtual machine, but can look inside the virtual "
25689 "machine to see how much space is really being used."
25693 #: ../tools/virt-df.pl:53
25695 "It is like the L<df(1)> command, but for virtual machines, except that it "
25696 "also works for Windows virtual machines."
25700 #: ../tools/virt-df.pl:56
25702 "If used without any arguments, C<virt-df> checks with libvirt to get a list "
25703 "of all active and inactive guests, and performs a C<df>-type operation on "
25704 "each one in turn, printing out the results."
25708 #: ../tools/virt-df.pl:60
25710 "If used with any argument(s), C<virt-df> performs a C<df>-type operation on "
25711 "either the single named libvirt domain, or on the disk image(s) listed on "
25712 "the command line (which must all belong to a single VM). In this mode (with "
25713 "arguments), C<virt-df> will I<only work for a single guest>. If you want to "
25714 "run on multiple guests, then you have to invoke C<virt-df> multiple times."
25718 #: ../tools/virt-df.pl:67
25720 "Use the C<--csv> option to get a format which can be easily parsed by other "
25721 "programs. Other options are mostly similar to standard C<df> options. See "
25722 "below for the complete list."
25726 #: ../tools/virt-df.pl:107
25731 #: ../tools/virt-df.pl:109
25733 "Write out the results in CSV format (comma-separated values). This format "
25734 "can be imported easily into databases and spreadsheets, but read L</NOTE "
25735 "ABOUT CSV FORMAT> below."
25739 #: ../tools/virt-df.pl:134
25740 msgid "B<--human-readable> | B<-h>"
25744 #: ../tools/virt-df.pl:136
25745 msgid "Print sizes in human-readable format."
25749 #: ../tools/virt-df.pl:138
25750 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
25754 #: ../tools/virt-df.pl:144
25755 msgid "B<--inodes> | B<-i>"
25759 #: ../tools/virt-df.pl:146
25760 msgid "Print inodes instead of blocks."
25764 #: ../tools/virt-df.pl:152
25765 msgid "B<--one-per-guest>"
25769 #: ../tools/virt-df.pl:154
25771 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
25772 "disks from several guests to a single libguestfs appliance."
25776 #: ../tools/virt-df.pl:157
25777 msgid "You might use this option in the following circumstances:"
25781 #: ../tools/virt-df.pl:163
25783 "If you think an untrusted guest might actively try to exploit the libguestfs "
25784 "appliance kernel, then this prevents one guest from interfering with the "
25785 "stats printed for another guest."
25789 #: ../tools/virt-df.pl:169
25791 "If the kernel has a bug which stops it from accessing a filesystem in one "
25792 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
25793 "and report stats for further guests."
25797 #: ../tools/virt-df.pl:180
25802 #: ../tools/virt-df.pl:182
25804 "Print UUIDs instead of names. This is useful for following a guest even "
25805 "when the guest is migrated or renamed, or when two guests happen to have the "
25810 #: ../tools/virt-df.pl:186
25812 "Note that only domains that we fetch from libvirt come with UUIDs. For disk "
25813 "images, we still print the disk image name even when this option is "
25818 #: ../tools/virt-df.pl:609
25819 msgid "NOTE ABOUT CSV FORMAT"
25823 #: ../tools/virt-df.pl:611
25825 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
25826 "should be easy to parse, but it is definitely not easy to parse."
25830 #: ../tools/virt-df.pl:614
25832 "Myth: Just split fields at commas. Reality: This does I<not> work "
25833 "reliably. This example has two columns:"
25837 #: ../tools/virt-df.pl:617
25840 " \"foo,bar\",baz\n"
25845 #: ../tools/virt-df.pl:619
25847 "Myth: Read the file one line at a time. Reality: This does I<not> work "
25848 "reliably. This example has one row:"
25852 #: ../tools/virt-df.pl:622
25861 #: ../tools/virt-df.pl:625
25863 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
25864 "packaged in major Linux distributions)."
25868 #: ../tools/virt-df.pl:628
25870 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
25871 "or Python's built-in csv library)."
25875 #: ../tools/virt-df.pl:631
25876 msgid "Most spreadsheets and databases can import CSV directly."
25880 #: ../tools/virt-df.pl:642
25882 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
25883 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
25887 #: ../tools/virt-ls.pl:34
25888 msgid "virt-ls - List files in a virtual machine"
25892 #: ../tools/virt-ls.pl:38
25895 " virt-ls [--options] domname directory\n"
25900 #: ../tools/virt-ls.pl:40
25903 " virt-ls [--options] disk.img [disk.img ...] directory\n"
25908 #: ../tools/virt-ls.pl:44
25910 "C<virt-ls> is a command line tool to list the names of files in a directory "
25911 "inside a virtual machine or disk image."
25915 #: ../tools/virt-ls.pl:47
25917 "C<virt-ls> is just a simple wrapper around L<libguestfs(3)> functionality. "
25918 "For more complex cases you should look at the L<guestfish(1)> tool."
25922 #: ../tools/virt-ls.pl:51
25924 "C<virt-ls> can be used in one of three modes: simple, long and recursive. A "
25925 "simple listing is like the ordinary L<ls(1)> command:"
25929 #: ../tools/virt-ls.pl:54
25932 " $ virt-ls myguest /\n"
25940 #: ../tools/virt-ls.pl:59
25941 msgid "With the C<-l> (C<--long>) option, C<virt-ls> shows more detail:"
25945 #: ../tools/virt-ls.pl:61
25948 " $ virt-ls -l myguest /\n"
25950 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
25951 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
25957 #: ../tools/virt-ls.pl:67
25959 "With the C<-R> (C<--recursive>) option, C<virt-ls> lists the names of files "
25960 "and directories recursively:"
25964 #: ../tools/virt-ls.pl:70
25967 " $ virt-ls -R myguest /tmp\n"
25975 #: ../tools/virt-ls.pl:75
25977 "You I<cannot> combine these options. To do more complicated things, use "
25982 #: ../tools/virt-ls.pl:131 ../tools/virt-list-filesystems.pl:103 ../tools/virt-list-partitions.pl:112
25983 msgid "B<-l> | B<--long>"
25987 #: ../tools/virt-ls.pl:133
25988 msgid "B<-R> | B<--recursive>"
25992 #: ../tools/virt-ls.pl:135
25994 "Select the mode. With neither of these options, C<virt-ls> produces a "
25995 "simple, flat list of the files in the named directory."
25999 #: ../tools/virt-ls.pl:138
26001 "C<virt-ls -l> produces a \"long listing\", which shows more detail (just "
26002 "like the plain C<ls -l> command)."
26006 #: ../tools/virt-ls.pl:141
26008 "C<virt-ls -R> produces a recursive list of files starting at the named "
26009 "directory. See the documentation for L<guestfs(3)/guestfs_find> for precise "
26014 #: ../tools/virt-ls.pl:145
26015 msgid "You cannot combine these options."
26019 #: ../tools/virt-ls.pl:234
26021 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
26022 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
26023 "L<http://libguestfs.org/>."
26027 #: ../tools/virt-ls.pl:249 ../tools/virt-list-filesystems.pl:204 ../tools/virt-cat.pl:201 ../tools/virt-tar.pl:298
26028 msgid "Copyright (C) 2009 Red Hat Inc."
26032 #: ../tools/virt-resize.pl:42
26033 msgid "virt-resize - Resize a virtual machine disk"
26037 #: ../tools/virt-resize.pl:46
26040 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
26041 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
26042 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
26047 #: ../tools/virt-resize.pl:52
26049 "Virt-resize is a tool which can resize a virtual machine disk, making it "
26050 "larger or smaller overall, and resizing or deleting any partitions contained "
26055 #: ../tools/virt-resize.pl:56
26057 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
26058 "not> be used on live virtual machines - for consistent results, shut the "
26059 "virtual machine down before resizing it."
26063 #: ../tools/virt-resize.pl:60
26065 "If you are not familiar with the associated tools: "
26066 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)> and L<virt-df(1)>, "
26067 "we recommend you go and read those manual pages first."
26071 #: ../tools/virt-resize.pl:68
26073 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
26074 "fill the extra 5GB of space."
26078 #: ../tools/virt-resize.pl:71
26081 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
26082 " virt-list-partitions -lht olddisk\n"
26083 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
26084 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
26089 #: ../tools/virt-resize.pl:76
26091 "As above, but make the /boot partition 200MB bigger, while giving the "
26092 "remaining space to /dev/sda2:"
26096 #: ../tools/virt-resize.pl:79
26099 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
26104 #: ../tools/virt-resize.pl:81
26105 msgid "As above, but the output format will be uncompressed qcow2:"
26109 #: ../tools/virt-resize.pl:83
26112 " qemu-img create -f qcow2 newdisk.qcow2 15G\n"
26113 " virt-resize --expand /dev/sda2 olddisk newdisk.qcow2\n"
26118 #: ../tools/virt-resize.pl:86
26119 msgid "DETAILED USAGE"
26123 #: ../tools/virt-resize.pl:88
26124 msgid "EXPANDING A VIRTUAL MACHINE DISK"
26128 #: ../tools/virt-resize.pl:92
26129 msgid "1. Shut down the virtual machine"
26133 #: ../tools/virt-resize.pl:94
26134 msgid "2. Locate input disk image"
26138 #: ../tools/virt-resize.pl:96
26140 "Locate the input disk image (ie. the file or device on the host containing "
26141 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
26142 "dumpxml> like this to find the disk image name:"
26146 #: ../tools/virt-resize.pl:100
26149 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
26150 " Found 1 nodes:\n"
26152 " <source dev=\"/dev/vg/lv_guest\" />\n"
26157 #: ../tools/virt-resize.pl:105
26158 msgid "3. Look at current sizing"
26162 #: ../tools/virt-resize.pl:107
26163 msgid "Use L<virt-list-partitions(1)> to display the current partitions and sizes:"
26167 #: ../tools/virt-resize.pl:110
26170 " # virt-list-partitions -lht /dev/vg/lv_guest\n"
26171 " /dev/sda1 ext3 101.9M\n"
26172 " /dev/sda2 pv 7.9G\n"
26173 " /dev/sda device 8.0G\n"
26178 #: ../tools/virt-resize.pl:115
26180 "(This example is a virtual machine with an 8 GB disk which we would like to "
26181 "expand up to 10 GB)."
26185 #: ../tools/virt-resize.pl:118
26186 msgid "4. Create output disk"
26190 #: ../tools/virt-resize.pl:120
26192 "Virt-resize cannot do in-place disk modifications. You have to have space "
26193 "to store the resized output disk."
26197 #: ../tools/virt-resize.pl:123
26198 msgid "To store the resized disk image in a file, create a file of a suitable size:"
26202 #: ../tools/virt-resize.pl:126
26205 " # rm -f outdisk\n"
26206 " # truncate -s 10G outdisk\n"
26211 #: ../tools/virt-resize.pl:129
26212 msgid "Or use L<lvcreate(1)> to create a logical volume:"
26216 #: ../tools/virt-resize.pl:131
26219 " # lvcreate -L 10G -n lv_name vg_name\n"
26224 #: ../tools/virt-resize.pl:133
26225 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
26229 #: ../tools/virt-resize.pl:135
26232 " # virsh pool-list\n"
26233 " # virsh vol-create-as poolname newvol 10G\n"
26238 #: ../tools/virt-resize.pl:138
26243 #: ../tools/virt-resize.pl:140
26245 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
26246 "file) and the output disk. The output disk is the one created in the "
26251 #: ../tools/virt-resize.pl:144
26254 " # virt-resize indisk outdisk\n"
26259 #: ../tools/virt-resize.pl:146
26261 "This command just copies disk image C<indisk> to disk image C<outdisk> "
26262 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
26263 "larger, then an extra, empty partition is created at the end of the disk "
26264 "covering the extra space. If C<outdisk> is smaller, then it will give an "
26269 #: ../tools/virt-resize.pl:152
26271 "More realistically you'd want to expand existing partitions in the disk "
26272 "image by passing extra options (for the full list see the L</OPTIONS> "
26277 #: ../tools/virt-resize.pl:156
26279 "L</--expand> is the most useful option. It expands the named partition "
26280 "within the disk to fill any extra space:"
26284 #: ../tools/virt-resize.pl:159
26287 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
26292 #: ../tools/virt-resize.pl:161
26294 "(In this case, an extra partition is I<not> created at the end of the disk, "
26295 "because there will be no unused space)."
26299 #: ../tools/virt-resize.pl:164
26301 "L</--resize> is the other commonly used option. The following would "
26302 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
26303 "rest of the available space:"
26307 #: ../tools/virt-resize.pl:168
26310 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
26311 " indisk outdisk\n"
26316 #: ../tools/virt-resize.pl:171
26318 "If the expanded partition in the image contains a filesystem or LVM PV, then "
26319 "if virt-resize knows how, it will resize the contents, the equivalent of "
26320 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or "
26321 "L<ntfsresize(8)>. However virt-resize does not know how to resize some "
26322 "filesystems, so you would have to online resize them after booting the "
26323 "guest. And virt-resize also does not resize anything inside an LVM PV, it "
26324 "just resizes the PV itself and leaves the user to resize any LVs inside that "
26329 #: ../tools/virt-resize.pl:180
26330 msgid "Other options are covered below."
26334 #: ../tools/virt-resize.pl:182
26339 #: ../tools/virt-resize.pl:184
26340 msgid "Thoroughly test the new disk image I<before> discarding the old one."
26344 #: ../tools/virt-resize.pl:186
26345 msgid "If you are using libvirt, edit the XML to point at the new disk:"
26349 #: ../tools/virt-resize.pl:188
26352 " # virsh edit guestname\n"
26357 #: ../tools/virt-resize.pl:190
26359 "Change E<lt>source ...E<gt>, see "
26360 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
26364 #: ../tools/virt-resize.pl:193
26365 msgid "Then start up the domain with the new, resized disk:"
26369 #: ../tools/virt-resize.pl:195
26372 " # virsh start guestname\n"
26377 #: ../tools/virt-resize.pl:197
26379 "and check that it still works. See also the L</NOTES> section below for "
26380 "additional information."
26384 #: ../tools/virt-resize.pl:200
26385 msgid "7. Resize LVs etc inside the guest"
26389 #: ../tools/virt-resize.pl:202
26390 msgid "(This can also be done offline using L<guestfish(1)>)"
26394 #: ../tools/virt-resize.pl:204
26396 "Once the guest has booted you should see the new space available, at least "
26397 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
26398 "may need to resize LVs inside PVs, and also resize filesystem types that "
26399 "virt-resize does not know how to expand."
26403 #: ../tools/virt-resize.pl:211
26404 msgid "SHRINKING A VIRTUAL MACHINE DISK"
26408 #: ../tools/virt-resize.pl:213
26410 "Shrinking is somewhat more complex than expanding, and only an overview is "
26415 #: ../tools/virt-resize.pl:216
26417 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
26418 "filesystems). The user has to shrink content before passing the disk image "
26419 "to virt-resize, and virt-resize will check that the content has been shrunk "
26424 #: ../tools/virt-resize.pl:221
26425 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
26429 #: ../tools/virt-resize.pl:223
26431 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
26432 "steps 3 and 4 above to allocate a new disk image."
26436 #: ../tools/virt-resize.pl:226
26437 msgid "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
26441 #: ../tools/virt-resize.pl:229
26442 msgid "IGNORING OR DELETING PARTITIONS"
26446 #: ../tools/virt-resize.pl:231
26448 "virt-resize also gives a convenient way to ignore or delete partitions when "
26449 "copying from the input disk to the output disk. Ignoring a partition speeds "
26450 "up the copy where you don't care about the existing contents of a "
26451 "partition. Deleting a partition removes it completely, but note that it "
26452 "also renumbers any partitions after the one which is deleted, which can "
26453 "leave some guests unbootable."
26457 #: ../tools/virt-resize.pl:238
26458 msgid "QCOW2 AND NON-SPARSE RAW FORMATS"
26462 #: ../tools/virt-resize.pl:240
26464 "If the input disk is in qcow2 format, then you may prefer that the output is "
26465 "in qcow2 format as well. Alternately, virt-resize can convert the format on "
26466 "the fly. The output format is simply determined by the format of the empty "
26467 "output container that you provide. Thus to create qcow2 output, use:"
26471 #: ../tools/virt-resize.pl:246
26474 " qemu-img create [-c] -f qcow2 outdisk [size]\n"
26479 #: ../tools/virt-resize.pl:248
26480 msgid "instead of the truncate command (use C<-c> for a compressed disk)."
26484 #: ../tools/virt-resize.pl:250
26485 msgid "Similarly, to get non-sparse raw output use:"
26489 #: ../tools/virt-resize.pl:252
26492 " fallocate -l size outdisk\n"
26497 #: ../tools/virt-resize.pl:254
26499 "(on older systems that don't have the L<fallocate(1)> command use C<dd "
26500 "if=/dev/zero of=outdisk bs=1M count=..>)"
26504 #: ../tools/virt-resize.pl:267
26505 msgid "Display help."
26509 #: ../tools/virt-resize.pl:281
26510 msgid "B<--resize part=size>"
26514 #: ../tools/virt-resize.pl:283
26516 "Resize the named partition (expanding or shrinking it) so that it has the "
26521 #: ../tools/virt-resize.pl:286
26523 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
26524 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
26525 "Exabytes; or as a percentage of the current size; or as a relative number or "
26526 "percentage. For example:"
26530 #: ../tools/virt-resize.pl:291
26533 " --resize /dev/sda2=10G\n"
26538 #: ../tools/virt-resize.pl:293
26541 " --resize /dev/sda4=90%\n"
26546 #: ../tools/virt-resize.pl:295
26549 " --resize /dev/sda2=+1G\n"
26554 #: ../tools/virt-resize.pl:297
26557 " --resize /dev/sda2=-200M\n"
26562 #: ../tools/virt-resize.pl:299
26565 " --resize /dev/sda1=+128K\n"
26570 #: ../tools/virt-resize.pl:301
26573 " --resize /dev/sda1=+10%\n"
26578 #: ../tools/virt-resize.pl:303
26581 " --resize /dev/sda1=-10%\n"
26586 #: ../tools/virt-resize.pl:305
26588 "You can increase the size of any partition. Virt-resize will expand the "
26589 "direct content of the partition if it knows how (see C<--expand> below)."
26593 #: ../tools/virt-resize.pl:309
26595 "You can only I<decrease> the size of partitions that contain filesystems or "
26596 "PVs which have already been shrunk. Virt-resize will check this has been "
26597 "done before proceeding, or else will print an error (see also "
26598 "C<--resize-force>)."
26602 #: ../tools/virt-resize.pl:314 ../tools/virt-resize.pl:406 ../tools/virt-resize.pl:423
26603 msgid "You can give this option multiple times."
26607 #: ../tools/virt-resize.pl:320
26608 msgid "B<--resize-force part=size>"
26612 #: ../tools/virt-resize.pl:322
26614 "This is the same as C<--resize> except that it will let you decrease the "
26615 "size of any partition. Generally this means you will lose any data which "
26616 "was at the end of the partition you shrink, but you may not care about that "
26617 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
26618 "as a swap partition)."
26622 #: ../tools/virt-resize.pl:328
26623 msgid "See also the C<--ignore> option."
26627 #: ../tools/virt-resize.pl:334
26628 msgid "B<--expand part>"
26632 #: ../tools/virt-resize.pl:336
26634 "Expand the named partition so it uses up all extra space (space left over "
26635 "after any other resize changes that you request have been done)."
26639 #: ../tools/virt-resize.pl:339
26641 "If virt-resize knows how, it will expand the direct content of the "
26642 "partition. For example, if the partition is an LVM PV, it will expand the "
26643 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
26644 "content it doesn't know about alone."
26648 #: ../tools/virt-resize.pl:344
26649 msgid "Currently virt-resize can resize:"
26653 #: ../tools/virt-resize.pl:350
26655 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
26660 #: ../tools/virt-resize.pl:355
26662 "NTFS filesystems contained directly in a partition, if libguestfs was "
26663 "compiled with support for NTFS."
26667 #: ../tools/virt-resize.pl:358
26669 "The filesystem must have been shut down consistently last time it was used. "
26670 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
26671 "consistency check, so at the first boot after resizing Windows will check "
26676 #: ../tools/virt-resize.pl:365
26678 "LVM PVs (physical volumes). However virt-resize does I<not> resize anything "
26679 "inside the PV. The user will have to resize LVs as desired."
26683 #: ../tools/virt-resize.pl:371 ../tools/virt-resize.pl:393
26684 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
26688 #: ../tools/virt-resize.pl:377
26689 msgid "B<--shrink part>"
26693 #: ../tools/virt-resize.pl:379
26695 "Shrink the named partition until the overall disk image fits in the "
26696 "destination. The named partition B<must> contain a filesystem or PV which "
26697 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
26698 "online tools). Virt-resize will check this and give an error if it has not "
26703 #: ../tools/virt-resize.pl:385
26705 "The amount by which the overall disk must be shrunk (after carrying out all "
26706 "other operations requested by the user) is called the \"deficit\". For "
26707 "example, a straight copy (assume no other operations) from a 5GB disk image "
26708 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
26709 "would give an error unless the user specified a partition to shrink and that "
26710 "partition had more than a gigabyte of free space."
26714 #: ../tools/virt-resize.pl:399
26715 msgid "B<--ignore part>"
26719 #: ../tools/virt-resize.pl:401
26721 "Ignore the named partition. Effectively this means the partition is "
26722 "allocated on the destination disk, but the content is not copied across from "
26723 "the source disk. The content of the partition will be blank (all zero "
26728 #: ../tools/virt-resize.pl:412
26729 msgid "B<--delete part>"
26733 #: ../tools/virt-resize.pl:414
26735 "Delete the named partition. It would be more accurate to describe this as "
26736 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
26737 "the original disk image is left intact."
26741 #: ../tools/virt-resize.pl:418
26743 "Note that when you delete a partition, then anything contained in the "
26744 "partition is also deleted. Furthermore, this causes any partitions that "
26745 "come after to be I<renumbered>, which can easily make your guest unbootable."
26749 #: ../tools/virt-resize.pl:429
26750 msgid "B<--LV-expand logvol>"
26754 #: ../tools/virt-resize.pl:431
26756 "This takes the logical volume and, as a final step, expands it to fill all "
26757 "the space available in its volume group. A typical usage, assuming a Linux "
26758 "guest with a single PV C</dev/sda2> and a root device called "
26759 "C</dev/vg_guest/lv_root> would be:"
26763 #: ../tools/virt-resize.pl:436
26766 " virt-resize indisk outdisk \\\n"
26767 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
26772 #: ../tools/virt-resize.pl:439
26774 "This would first expand the partition (and PV), and then expand the root "
26775 "device to fill the extra space in the PV."
26779 #: ../tools/virt-resize.pl:442
26781 "The contents of the LV are also resized if virt-resize knows how to do "
26782 "that. You can stop virt-resize from trying to expand the content by using "
26783 "the option C<--no-expand-content>."
26787 #: ../tools/virt-resize.pl:446
26788 msgid "Use L<virt-list-filesystems(1)> to list the filesystems in the guest."
26792 #: ../tools/virt-resize.pl:449
26794 "You can give this option multiple times, I<but> it doesn't make sense to do "
26795 "this unless the logical volumes you specify are all in different volume "
26800 #: ../tools/virt-resize.pl:457
26801 msgid "B<--no-copy-boot-loader>"
26805 #: ../tools/virt-resize.pl:459
26807 "By default, virt-resize copies over some sectors at the start of the disk "
26808 "(up to the beginning of the first partition). Commonly these sectors "
26809 "contain the Master Boot Record (MBR) and the boot loader, and are required "
26810 "in order for the guest to boot correctly."
26814 #: ../tools/virt-resize.pl:464
26816 "If you specify this flag, then this initial copy is not done. You may need "
26817 "to reinstall the boot loader in this case."
26821 #: ../tools/virt-resize.pl:472
26822 msgid "B<--no-extra-partition>"
26826 #: ../tools/virt-resize.pl:474
26828 "By default, virt-resize creates an extra partition if there is any extra, "
26829 "unused space after all resizing has happened. Use this option to prevent "
26830 "the extra partition from being created. If you do this then the extra space "
26831 "will be inaccessible until you run fdisk, parted, or some other partitioning "
26832 "tool in the guest."
26836 #: ../tools/virt-resize.pl:480
26838 "Note that if the surplus space is smaller than 10 MB, no extra partition "
26843 #: ../tools/virt-resize.pl:487
26844 msgid "B<--no-expand-content>"
26848 #: ../tools/virt-resize.pl:489
26850 "By default, virt-resize will try to expand the direct contents of "
26851 "partitions, if it knows how (see C<--expand> option above)."
26855 #: ../tools/virt-resize.pl:492
26857 "If you give the C<--no-expand-content> option then virt-resize will not "
26862 #: ../tools/virt-resize.pl:499
26863 msgid "B<-d> | B<--debug>"
26867 #: ../tools/virt-resize.pl:507
26868 msgid "B<-n> | B<--dryrun>"
26872 #: ../tools/virt-resize.pl:509
26873 msgid "Print a summary of what would be done, but don't do anything."
26877 #: ../tools/virt-resize.pl:515
26878 msgid "B<-q> | B<--quiet>"
26882 #: ../tools/virt-resize.pl:517
26883 msgid "Don't print the summary."
26887 #: ../tools/virt-resize.pl:525
26889 "Specify the format of the input disk image. If this flag is not given then "
26890 "it is auto-detected from the image itself."
26894 #: ../tools/virt-resize.pl:531
26896 "Note that this option I<does not> affect the output format. See L</QCOW2 "
26897 "AND NON-SPARSE RAW FORMATS>."
26901 #: ../tools/virt-resize.pl:538
26902 msgid "B<--output-format> raw"
26906 #: ../tools/virt-resize.pl:540
26908 "Specify the format of the output disk image. If this flag is not given then "
26909 "it is auto-detected from the image itself."
26913 #: ../tools/virt-resize.pl:546
26915 "Note that you still need to create the output disk with the right format. "
26916 "See L</QCOW2 AND NON-SPARSE RAW FORMATS>."
26920 #: ../tools/virt-resize.pl:1422 ../tools/virt-rescue.pl:90
26925 #: ../tools/virt-resize.pl:1424
26926 msgid "\"Partition 1 does not end on cylinder boundary.\""
26930 #: ../tools/virt-resize.pl:1426
26932 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
26933 "means the partitions will not be aligned to the ancient CHS geometry. "
26934 "However CHS geometry is meaningless for disks manufactured since the early "
26935 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
26936 "cylinders is not required by any modern operating system."
26940 #: ../tools/virt-resize.pl:1433
26941 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
26945 #: ../tools/virt-resize.pl:1435
26947 "In Windows Vista and later versions, Microsoft switched to using a separate "
26948 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
26949 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
26950 "the boot partition. Doing so seems to break the guest completely. However "
26951 "expanding the second partition (ie. C: drive) should work."
26955 #: ../tools/virt-resize.pl:1442
26957 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
26958 "NTFS partitions have been expanded. This is just a safety check and (unless "
26959 "it find errors) is nothing to worry about."
26963 #: ../tools/virt-resize.pl:1446
26964 msgid "GUEST BOOT STUCK AT \"GRUB\""
26968 #: ../tools/virt-resize.pl:1448
26970 "If a Linux guest does not boot after resizing, and the boot is stuck after "
26971 "printing C<GRUB> on the console, try reinstalling grub. This sometimes "
26972 "happens on older (RHEL 5-era) guests, for reasons we don't fully understand, "
26973 "although we think is to do with partition alignment."
26977 #: ../tools/virt-resize.pl:1453
26980 " guestfish -i -a newdisk\n"
26981 " ><fs> cat /boot/grub/device.map\n"
26982 " # check the contents of this file are sensible or\n"
26983 " # edit the file if necessary\n"
26984 " ><fs> grub-install / /dev/vda\n"
26990 #: ../tools/virt-resize.pl:1460
26992 "For more flexible guest reconfiguration, including if you need to specify "
26993 "other parameters to grub-install, use L<virt-rescue(1)>."
26997 #: ../tools/virt-resize.pl:1463
26998 msgid "ALTERNATIVE TOOLS"
27002 #: ../tools/virt-resize.pl:1465
27004 "There are several proprietary tools for resizing partitions. We won't "
27005 "mention any here."
27009 #: ../tools/virt-resize.pl:1468
27011 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
27012 "operations on disk images. They can resize and move partitions, but I don't "
27013 "think they can do anything with the contents, and they certainly don't "
27018 #: ../tools/virt-resize.pl:1473
27020 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
27021 "but at a much lower level. You will probably end up hand-calculating sector "
27022 "offsets, which is something that virt-resize was designed to avoid. If you "
27023 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
27028 #: ../tools/virt-resize.pl:1488
27030 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)>, L<virt-df(1)>, "
27031 "L<guestfs(3)>, L<guestfish(1)>, L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, "
27032 "L<resize2fs(8)>, L<ntfsresize(8)>, L<virsh(1)>, L<parted(8)>, "
27033 "L<truncate(1)>, L<fallocate(1)>, L<grub(8)>, L<grub-install(8)>, "
27034 "L<virt-rescue(1)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
27038 #: ../tools/virt-list-filesystems.pl:32
27039 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
27043 #: ../tools/virt-list-filesystems.pl:36
27046 " virt-list-filesystems [--options] domname\n"
27051 #: ../tools/virt-list-filesystems.pl:38
27054 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
27059 #: ../tools/virt-list-filesystems.pl:42
27061 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
27062 "are contained in a virtual machine or disk image."
27066 #: ../tools/virt-list-filesystems.pl:46
27068 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
27069 "functionality. For more complex cases you should look at the "
27070 "L<guestfish(1)> tool."
27074 #: ../tools/virt-list-filesystems.pl:105
27076 "With this option, C<virt-list-filesystems> displays the type of each "
27077 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
27081 #: ../tools/virt-list-filesystems.pl:112
27082 msgid "B<-a> | B<--all>"
27086 #: ../tools/virt-list-filesystems.pl:114
27088 "Normally we only show mountable filesystems. If this option is given then "
27089 "swap devices are shown too."
27093 #: ../tools/virt-list-filesystems.pl:188
27095 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
27096 "L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
27097 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
27101 #: ../tools/virt-cat.pl:33
27102 msgid "virt-cat - Display a file in a virtual machine"
27106 #: ../tools/virt-cat.pl:37
27109 " virt-cat [--options] domname file\n"
27114 #: ../tools/virt-cat.pl:39
27117 " virt-cat [--options] disk.img [disk.img ...] file\n"
27122 #: ../tools/virt-cat.pl:43
27124 "C<virt-cat> is a command line tool to display the contents of C<file> where "
27125 "C<file> exists in the named virtual machine (or disk image)."
27129 #: ../tools/virt-cat.pl:46
27131 "C<virt-cat> can be used to quickly view a single file. To edit a file, use "
27132 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
27137 #: ../tools/virt-cat.pl:52
27138 msgid "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
27142 #: ../tools/virt-cat.pl:55
27145 " virt-cat mydomain /etc/fstab\n"
27150 #: ../tools/virt-cat.pl:57
27151 msgid "List syslog messages from a VM:"
27155 #: ../tools/virt-cat.pl:59
27158 " virt-cat mydomain /var/log/messages | tail\n"
27163 #: ../tools/virt-cat.pl:61
27164 msgid "Find out what DHCP IP address a VM acquired:"
27168 #: ../tools/virt-cat.pl:63
27171 " virt-cat mydomain /var/log/messages | grep 'dhclient: bound to' | tail\n"
27176 #: ../tools/virt-cat.pl:65
27177 msgid "Find out what packages were recently installed:"
27181 #: ../tools/virt-cat.pl:67
27184 " virt-cat mydomain /var/log/yum.log | tail\n"
27189 #: ../tools/virt-cat.pl:69
27190 msgid "Find out who is logged on inside a virtual machine:"
27194 #: ../tools/virt-cat.pl:71
27197 " virt-cat mydomain /var/run/utmp > /tmp/utmp\n"
27203 #: ../tools/virt-cat.pl:74
27204 msgid "or who was logged on:"
27208 #: ../tools/virt-cat.pl:76
27211 " virt-cat mydomain /var/log/wtmp > /tmp/wtmp\n"
27212 " last -f /tmp/wtmp\n"
27217 #: ../tools/virt-cat.pl:187
27219 "L<guestfs(3)>, L<guestfish(1)>, L<virt-edit(1)>, L<Sys::Guestfs(3)>, "
27220 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
27224 #: ../tools/virt-tar.pl:33
27225 msgid "virt-tar - Extract or upload files to a virtual machine"
27229 #: ../tools/virt-tar.pl:37
27232 " virt-tar [--options] -x domname directory tarball\n"
27237 #: ../tools/virt-tar.pl:39
27240 " virt-tar [--options] -u domname tarball directory\n"
27245 #: ../tools/virt-tar.pl:41
27248 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
27253 #: ../tools/virt-tar.pl:43
27256 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
27261 #: ../tools/virt-tar.pl:47
27262 msgid "Download C</home> from the VM into a local tarball:"
27266 #: ../tools/virt-tar.pl:49
27269 " virt-tar -x domname /home home.tar\n"
27274 #: ../tools/virt-tar.pl:51
27277 " virt-tar -zx domname /home home.tar.gz\n"
27282 #: ../tools/virt-tar.pl:53
27283 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
27287 #: ../tools/virt-tar.pl:55
27290 " virt-tar -u domname uploadstuff.tar /tmp\n"
27295 #: ../tools/virt-tar.pl:57
27298 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
27303 #: ../tools/virt-tar.pl:61
27305 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
27306 "virtual machines. If you do this, you risk disk corruption in the VM. "
27307 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
27311 #: ../tools/virt-tar.pl:66
27313 "You can use C<-x> (extract) on live virtual machines, but you might get "
27314 "inconsistent results or errors if there is filesystem activity inside the "
27315 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
27316 "work, but the only way to guarantee consistent results is if the virtual "
27317 "machine is shut down."
27321 #: ../tools/virt-tar.pl:74
27323 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
27324 "parts of a guest filesystem. There are many possibilities: making backups, "
27325 "uploading data files, snooping on guest activity, fixing or customizing "
27330 #: ../tools/virt-tar.pl:79
27332 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
27333 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
27334 "should look at the L<guestfish(1)> tool."
27338 #: ../tools/virt-tar.pl:83
27340 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
27341 "its contents (recursively) from the virtual machine into a local tarball. "
27342 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
27343 "virtual machine. You cannot use these two options together."
27347 #: ../tools/virt-tar.pl:89
27349 "In addition, you may need to use the C<-z> (gZip) option to enable "
27350 "compression. When uploading, you have to specify C<-z> if the upload file "
27351 "is compressed because virt-tar won't detect this on its own."
27355 #: ../tools/virt-tar.pl:93
27357 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
27358 "example it cannot do PKZip files or bzip2 compression. If you want that "
27359 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
27360 "the L<libguestfs(3)> API)."
27364 #: ../tools/virt-tar.pl:151
27365 msgid "B<-x> | B<--extract> | B<--download>"
27369 #: ../tools/virt-tar.pl:153
27370 msgid "B<-u> | B<--upload>"
27374 #: ../tools/virt-tar.pl:155
27376 "Use C<-x> to extract (download) a directory from a virtual machine to a "
27381 #: ../tools/virt-tar.pl:158
27383 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
27384 "Please read the L</WARNING> section above before using this option."
27388 #: ../tools/virt-tar.pl:162
27389 msgid "You must specify exactly one of these options."
27393 #: ../tools/virt-tar.pl:168
27394 msgid "B<-z> | B<--gzip>"
27398 #: ../tools/virt-tar.pl:170
27399 msgid "Specify that the input or output tarball is gzip-compressed."
27403 #: ../tools/virt-tar.pl:283
27405 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
27406 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
27407 "L<http://libguestfs.org/>."
27411 #: ../tools/virt-rescue.pl:33
27412 msgid "virt-rescue - Run a rescue shell on a virtual machine"
27416 #: ../tools/virt-rescue.pl:37
27419 " virt-rescue [--options] domname\n"
27424 #: ../tools/virt-rescue.pl:39
27427 " virt-rescue [--options] disk.img [disk.img ...]\n"
27432 #: ../tools/virt-rescue.pl:43
27434 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
27435 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
27436 "you from doing this, but doesn't catch all cases."
27440 #: ../tools/virt-rescue.pl:47
27442 "However if you use the I<--ro> (read only) option, then you can attach a "
27443 "shell to a live virtual machine. The results might be strange or "
27444 "inconsistent at times but you won't get disk corruption."
27448 #: ../tools/virt-rescue.pl:53
27450 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
27451 "need for a CD. virt-rescue gives you a rescue shell and some simple "
27452 "recovery tools which you can use to examine or rescue a virtual machine or "
27457 #: ../tools/virt-rescue.pl:58
27459 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
27460 "on disk image(s):"
27464 #: ../tools/virt-rescue.pl:61
27467 " virt-rescue GuestName\n"
27472 #: ../tools/virt-rescue.pl:63
27475 " virt-rescue --ro /path/to/disk.img\n"
27480 #: ../tools/virt-rescue.pl:65
27483 " virt-rescue /dev/sdc\n"
27488 #: ../tools/virt-rescue.pl:67
27489 msgid "For live VMs you I<must> use the --ro option."
27493 #: ../tools/virt-rescue.pl:69
27495 "When you run virt-rescue on a virtual machine or disk image, you are placed "
27496 "in an interactive bash shell where you can use many ordinary Linux "
27497 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
27498 "appliance. You must mount the virtual machine's filesystems by hand. There "
27499 "is an empty directory called C</sysroot> where you can mount filesystems."
27503 #: ../tools/virt-rescue.pl:76
27505 "In the example below, we list logical volumes, then choose one to mount "
27506 "under C</sysroot>:"
27510 #: ../tools/virt-rescue.pl:79
27514 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
27515 " lv_root vg_f11x64 -wi-a- 8.83G\n"
27516 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
27517 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
27518 " ><rescue> ls /sysroot\n"
27523 #: ../tools/virt-rescue.pl:86
27525 "If you don't know what filesystems are available on the virtual machine then "
27526 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
27530 #: ../tools/virt-rescue.pl:92
27532 "Virt-rescue can be used on I<any> disk image file or device, not just a "
27533 "virtual machine. For example you can use it on a blank file if you want to "
27534 "partition that file (although we would recommend using L<guestfish(1)> "
27535 "instead as it is more suitable for this purpose). You can even use "
27536 "virt-rescue on things like SD cards."
27540 #: ../tools/virt-rescue.pl:98
27542 "This tool is just designed for quick interactive hacking on a virtual "
27543 "machine. For more structured access to a virtual machine disk image, you "
27544 "should use L<guestfs(3)>. To get a structured shell that you can use to "
27545 "make scripted changes to guests, use L<guestfish(1)>."
27549 #: ../tools/virt-rescue.pl:127
27550 msgid "B<--append kernelopts>"
27554 #: ../tools/virt-rescue.pl:129
27555 msgid "Pass additional options to the rescue kernel."
27559 #: ../tools/virt-rescue.pl:164
27560 msgid "B<--memsize MB> | B<-m MB>"
27564 #: ../tools/virt-rescue.pl:166
27566 "Change the amount of memory allocated to the rescue system. The default is "
27567 "set by libguestfs and is small but adequate for running system tools. The "
27568 "occasional program might need more memory. The parameter is specified in "
27573 #: ../tools/virt-rescue.pl:175
27574 msgid "B<--network MB>"
27578 #: ../tools/virt-rescue.pl:177
27579 msgid "Enable QEMU user networking in the guest."
27583 #: ../tools/virt-rescue.pl:183
27584 msgid "B<--ro> | B<-r>"
27588 #: ../tools/virt-rescue.pl:185
27589 msgid "Open the image read-only."
27593 #: ../tools/virt-rescue.pl:197
27595 "Enable SELinux in the rescue appliance. You should read "
27596 "L<guestfs(3)/SELINUX> before using this option."
27600 #: ../tools/virt-rescue.pl:257
27602 "Several environment variables affect virt-rescue. See "
27603 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
27607 #: ../tools/virt-rescue.pl:269
27609 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
27610 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
27614 #: ../tools/virt-make-fs.pl:37
27615 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
27619 #: ../tools/virt-make-fs.pl:41
27622 " virt-make-fs [--options] input.tar output.img\n"
27627 #: ../tools/virt-make-fs.pl:43
27630 " virt-make-fs [--options] input.tar.gz output.img\n"
27635 #: ../tools/virt-make-fs.pl:45
27638 " virt-make-fs [--options] directory output.img\n"
27643 #: ../tools/virt-make-fs.pl:49
27645 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
27646 "archive or some files in a directory. It is similar to tools like "
27647 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
27648 "it can create common filesystem types like ext2/3 or NTFS, which can be "
27649 "useful if you want to attach these filesystems to existing virtual machines "
27650 "(eg. to import large amounts of read-only data to a VM)."
27654 #: ../tools/virt-make-fs.pl:57
27655 msgid "Basic usage is:"
27659 #: ../tools/virt-make-fs.pl:59
27662 " virt-make-fs input output\n"
27667 #: ../tools/virt-make-fs.pl:61
27669 "where C<input> is either a directory containing files that you want to add, "
27670 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
27671 "C<output> is a disk image. The input type is detected automatically. The "
27672 "output disk image defaults to a raw ext2 image unless you specify extra "
27673 "flags (see L</OPTIONS> below)."
27677 #: ../tools/virt-make-fs.pl:67
27678 msgid "EXTRA SPACE"
27682 #: ../tools/virt-make-fs.pl:69
27684 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
27685 "the files that it contains, but might have extra space. Depending on how "
27686 "you are going to use the output, you might think this extra space is wasted "
27687 "and want to minimize it, or you might want to leave space so that more files "
27688 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
27689 "but you can use the C<--size> flag to leave space in the filesystem if you "
27694 #: ../tools/virt-make-fs.pl:77
27696 "An alternative way to leave extra space but not make the output image any "
27697 "bigger is to use an alternative disk image format (instead of the default "
27698 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
27699 "image format (check your hypervisor supports this before using it). This "
27700 "allows you to choose a large C<--size> but the extra space won't actually be "
27701 "allocated in the image until you try to store something in it."
27705 #: ../tools/virt-make-fs.pl:85
27707 "Don't forget that you can also use local commands including L<resize2fs(8)> "
27708 "and L<virt-resize(1)> to resize existing filesystems, or rerun "
27709 "virt-make-resize to build another image from scratch."
27713 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123 ../tools/virt-make-fs.pl:142
27718 #: ../tools/virt-make-fs.pl:91
27721 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
27726 #: ../tools/virt-make-fs.pl:93
27727 msgid "FILESYSTEM TYPE"
27731 #: ../tools/virt-make-fs.pl:95
27733 "The default filesystem type is C<ext2>. Just about any filesystem type that "
27734 "libguestfs supports can be used (but I<not> read-only formats like "
27735 "ISO9660). Here are some of the more common choices:"
27739 #: ../tools/virt-make-fs.pl:101
27744 #: ../tools/virt-make-fs.pl:103
27746 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
27747 "you are not going to use the filesystem in a way that requires the journal, "
27748 "then this is just wasted overhead."
27752 #: ../tools/virt-make-fs.pl:107
27753 msgid "I<ntfs> or I<vfat>"
27757 #: ../tools/virt-make-fs.pl:109
27758 msgid "Useful if exporting data to a Windows guest."
27762 #: ../tools/virt-make-fs.pl:111
27764 "I<Note for vfat>: The tar archive or local directory must only contain files "
27765 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
27766 "program running within libguestfs is unable to change the ownership of "
27767 "non-root files, since vfat itself does not support this."
27771 #: ../tools/virt-make-fs.pl:116
27776 #: ../tools/virt-make-fs.pl:118
27778 "Lower overhead than C<ext2>, but certain limitations on filename length and "
27779 "total filesystem size."
27783 #: ../tools/virt-make-fs.pl:125
27786 " virt-make-fs --type=minix input minixfs.img\n"
27791 #: ../tools/virt-make-fs.pl:127
27792 msgid "TO PARTITION OR NOT TO PARTITION"
27796 #: ../tools/virt-make-fs.pl:129
27797 msgid "Optionally virt-make-fs can add a partition table to the output disk."
27801 #: ../tools/virt-make-fs.pl:131
27803 "Adding a partition can make the disk image more compatible with certain "
27804 "virtualized operating systems which don't expect to see a filesystem "
27805 "directly located on a block device (Linux doesn't care and will happily "
27806 "handle both types)."
27810 #: ../tools/virt-make-fs.pl:136
27812 "On the other hand, if you have a partition table then the output image is no "
27813 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
27814 "directly on a partitioned disk image. (However libguestfs tools such as "
27815 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
27819 #: ../tools/virt-make-fs.pl:144
27820 msgid "Add an MBR partition:"
27824 #: ../tools/virt-make-fs.pl:146
27827 " virt-make-fs --partition -- input disk.img\n"
27832 #: ../tools/virt-make-fs.pl:148
27834 "If the output disk image could be terabyte-sized or larger, it's better to "
27835 "use an EFI/GPT-compatible partition table:"
27839 #: ../tools/virt-make-fs.pl:151
27842 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
27847 #: ../tools/virt-make-fs.pl:179
27848 msgid "Enable debugging information."
27852 #: ../tools/virt-make-fs.pl:185
27853 msgid "B<--size=E<lt>NE<gt>>"
27857 #: ../tools/virt-make-fs.pl:187
27858 msgid "B<--size=+E<lt>NE<gt>>"
27862 #: ../tools/virt-make-fs.pl:189
27863 msgid "B<-s E<lt>NE<gt>>"
27867 #: ../tools/virt-make-fs.pl:191
27868 msgid "B<-s +E<lt>NE<gt>>"
27872 #: ../tools/virt-make-fs.pl:193
27873 msgid "Use the C<--size> (or C<-s>) option to choose the size of the output image."
27877 #: ../tools/virt-make-fs.pl:196
27879 "If this option is I<not> given, then the output image will be just large "
27880 "enough to contain all the files, with not much wasted space."
27884 #: ../tools/virt-make-fs.pl:199
27886 "To choose a fixed size output disk, specify an absolute number followed by "
27887 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
27888 "Petabytes or Exabytes. This must be large enough to contain all the input "
27889 "files, else you will get an error."
27893 #: ../tools/virt-make-fs.pl:204
27895 "To leave extra space, specify C<+> (plus sign) and a number followed by "
27896 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
27897 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
27898 "the input files, and (approximately) an extra 200 MB free space."
27902 #: ../tools/virt-make-fs.pl:210
27904 "Note that virt-make-fs estimates free space, and therefore will not produce "
27905 "filesystems containing precisely the free space requested. (It is much more "
27906 "expensive and time-consuming to produce a filesystem which has precisely the "
27907 "desired free space)."
27911 #: ../tools/virt-make-fs.pl:219
27912 msgid "B<--format=E<lt>fmtE<gt>>"
27916 #: ../tools/virt-make-fs.pl:221
27917 msgid "B<-F E<lt>fmtE<gt>>"
27921 #: ../tools/virt-make-fs.pl:223
27922 msgid "Choose the output disk image format."
27926 #: ../tools/virt-make-fs.pl:225
27927 msgid "The default is C<raw> (raw disk image)."
27931 #: ../tools/virt-make-fs.pl:227
27933 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
27934 "that would really make sense here is C<qcow2>."
27938 #: ../tools/virt-make-fs.pl:234
27939 msgid "B<--type=E<lt>fsE<gt>>"
27943 #: ../tools/virt-make-fs.pl:236
27944 msgid "B<-t E<lt>fsE<gt>>"
27948 #: ../tools/virt-make-fs.pl:238
27949 msgid "Choose the output filesystem type."
27953 #: ../tools/virt-make-fs.pl:240
27954 msgid "The default is C<ext2>."
27958 #: ../tools/virt-make-fs.pl:242
27959 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
27963 #: ../tools/virt-make-fs.pl:249
27964 msgid "B<--partition>"
27968 #: ../tools/virt-make-fs.pl:251
27969 msgid "B<--partition=E<lt>parttypeE<gt>>"
27973 #: ../tools/virt-make-fs.pl:253
27975 "If specified, this flag adds an MBR partition table to the output disk "
27980 #: ../tools/virt-make-fs.pl:256
27982 "You can change the partition table type, eg. C<--partition=gpt> for large "
27987 #: ../tools/virt-make-fs.pl:259
27989 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
27990 "might consider the next parameter to be the partition type. For example:"
27994 #: ../tools/virt-make-fs.pl:263
27997 " virt-make-fs --partition input.tar ...\n"
28002 #: ../tools/virt-make-fs.pl:265
28004 "would cause virt-make-fs to think you wanted to use a partition type of "
28005 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
28006 "dash) between options and the input file argument:"
28010 #: ../tools/virt-make-fs.pl:269
28013 " virt-make-fs --partition -- input.tar ...\n"
28018 #: ../tools/virt-make-fs.pl:536
28020 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<mkisofs(1)>, "
28021 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
28022 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
28026 #: ../tools/virt-make-fs.pl:553
28029 " export LIBGUESTFS_DEBUG=1\n"
28030 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
28035 #: ../tools/virt-make-fs.pl:556
28037 "Attach /tmp/virt-make-fs.log to a new bug report at "
28038 "L<https://bugzilla.redhat.com/>"
28042 #: ../tools/virt-list-partitions.pl:32
28043 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
28047 #: ../tools/virt-list-partitions.pl:36
28050 " virt-list-partitions [--options] domname\n"
28055 #: ../tools/virt-list-partitions.pl:38
28058 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
28063 #: ../tools/virt-list-partitions.pl:42
28065 "C<virt-list-partitions> is a command line tool to list the partitions that "
28066 "are contained in a virtual machine or disk image. It is mainly useful as a "
28067 "first step to using L<virt-resize(1)>."
28071 #: ../tools/virt-list-partitions.pl:47
28073 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
28074 "functionality. For more complex cases you should look at the "
28075 "L<guestfish(1)> tool."
28079 #: ../tools/virt-list-partitions.pl:104
28080 msgid "B<-h> | B<--human-readable>"
28084 #: ../tools/virt-list-partitions.pl:106
28085 msgid "Show sizes in human-readable form (eg. \"1G\")."
28089 #: ../tools/virt-list-partitions.pl:114
28091 "With this option, C<virt-list-partitions> displays the type and size of each "
28092 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
28096 #: ../tools/virt-list-partitions.pl:121
28097 msgid "B<-t> | B<--total>"
28101 #: ../tools/virt-list-partitions.pl:123
28102 msgid "Display the total size of each block device (as a separate row or rows)."
28106 #: ../tools/virt-list-partitions.pl:256
28108 "L<guestfs(3)>, L<guestfish(1)>, L<virt-list-filesystems(1)>, "
28109 "L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
28110 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."