1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Red Hat Inc.
3 # This file is distributed under the same license as the libguestfs package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
9 "Project-Id-Version: libguestfs 1.5.14\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2010-09-14 13:27+0200\n"
12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=utf-8\n"
17 "Content-Transfer-Encoding: ENCODING"
20 #: ../src/guestfs.pod:1 ../fish/guestfish.pod:1 ../test-tool/libguestfs-test-tool.pod:1 ../fuse/guestmount.pod:1 ../inspector/virt-inspector.pl:36 ../tools/virt-cat.pl:30 ../tools/virt-df.pl:32 ../tools/virt-edit.pl:31 ../tools/virt-list-filesystems.pl:28 ../tools/virt-list-partitions.pl:28 ../tools/virt-ls.pl:31 ../tools/virt-make-fs.pl:33 ../tools/virt-rescue.pl:29 ../tools/virt-resize.pl:38 ../tools/virt-tar.pl:30 ../tools/virt-win-reg.pl:34
25 #: ../src/guestfs.pod:3 ../fish/guestfish.pod:3 ../test-tool/libguestfs-test-tool.pod:3 ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pl:38 ../tools/virt-cat.pl:32 ../tools/virt-df.pl:34 ../tools/virt-edit.pl:33 ../tools/virt-list-filesystems.pl:30 ../tools/virt-list-partitions.pl:30 ../tools/virt-ls.pl:33 ../tools/virt-make-fs.pl:35 ../tools/virt-rescue.pl:31 ../tools/virt-resize.pl:40 ../tools/virt-tar.pl:32 ../tools/virt-win-reg.pl:36
30 #: ../src/guestfs.pod:5
31 msgid "guestfs - Library for accessing and modifying virtual machine images"
35 #: ../src/guestfs.pod:7 ../fish/guestfish.pod:7 ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7 ../inspector/virt-inspector.pl:42 ../tools/virt-cat.pl:36 ../tools/virt-df.pl:38 ../tools/virt-edit.pl:37 ../tools/virt-list-filesystems.pl:34 ../tools/virt-list-partitions.pl:34 ../tools/virt-ls.pl:37 ../tools/virt-make-fs.pl:39 ../tools/virt-rescue.pl:35 ../tools/virt-resize.pl:44 ../tools/virt-tar.pl:36 ../tools/virt-win-reg.pl:40
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:115 ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:16 ../inspector/virt-inspector.pl:48 ../tools/virt-cat.pl:42 ../tools/virt-df.pl:46 ../tools/virt-edit.pl:51 ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40 ../tools/virt-ls.pl:43 ../tools/virt-make-fs.pl:47 ../tools/virt-rescue.pl:51 ../tools/virt-resize.pl:50 ../tools/virt-tar.pl:73 ../tools/virt-win-reg.pl:64
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 "You can add a disk read-only using L</guestfs_add_drive_ro>, in which case "
276 "libguestfs won't modify the file."
280 #: ../src/guestfs.pod:130
282 "Be extremely cautious if the disk image is in use, eg. if it is being used "
283 "by a virtual machine. Adding it read-write will almost certainly cause disk "
284 "corruption, but adding it read-only is safe."
288 #: ../src/guestfs.pod:134
290 "You must add at least one disk image, and you may add multiple disk images. "
291 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
292 "first one you added), C</dev/sdb> (for the second one you added), etc."
296 #: ../src/guestfs.pod:139
298 "Once L</guestfs_launch> has been called you cannot add any more images. You "
299 "can call L</guestfs_list_devices> to get a list of the device names, in the "
300 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
304 #: ../src/guestfs.pod:144
309 #: ../src/guestfs.pod:146
311 "Before you can read or write files, create directories and so on in a disk "
312 "image that contains filesystems, you have to mount those filesystems using "
313 "L</guestfs_mount>. If you already know that a disk image contains (for "
314 "example) one partition with a filesystem on that partition, then you can "
319 #: ../src/guestfs.pod:152
322 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
327 #: ../src/guestfs.pod:154
329 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
330 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
331 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>)."
335 #: ../src/guestfs.pod:158
337 "If you are given a disk image and you don't know what it contains then you "
338 "have to find out. Libguestfs can do that too: use "
339 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
340 "and LVs, and either try mounting each to see what is mountable, or else "
341 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. Libguestfs also "
342 "has a set of APIs for inspection of disk images (see L</INSPECTION> below). "
343 "But you might find it easier to look at higher level programs built on top "
344 "of libguestfs, in particular L<virt-inspector(1)>."
348 #: ../src/guestfs.pod:168
350 "To mount a disk image read-only, use L</guestfs_mount_ro>. There are "
351 "several other variations of the C<guestfs_mount_*> call."
355 #: ../src/guestfs.pod:171
356 msgid "FILESYSTEM ACCESS AND MODIFICATION"
360 #: ../src/guestfs.pod:173
362 "The majority of the libguestfs API consists of fairly low-level calls for "
363 "accessing and modifying the files, directories, symlinks etc on mounted "
364 "filesystems. There are over a hundred such calls which you can find listed "
365 "in detail below in this man page, and we don't even pretend to cover them "
366 "all in this overview."
370 #: ../src/guestfs.pod:179
372 "Specify filenames as full paths, starting with C<\"/\"> and including the "
377 #: ../src/guestfs.pod:182
379 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
380 "the file called C<\"etc/passwd\"> then you could do:"
384 #: ../src/guestfs.pod:185
387 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
392 #: ../src/guestfs.pod:187
394 "This would return C<data> as a newly allocated buffer containing the full "
395 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
396 "or C<NULL> if there was an error."
400 #: ../src/guestfs.pod:191
402 "As another example, to create a top-level directory on that filesystem "
403 "called C<\"var\"> you would do:"
407 #: ../src/guestfs.pod:194
410 " guestfs_mkdir (g, \"/var\");\n"
415 #: ../src/guestfs.pod:196
416 msgid "To create a symlink you could do:"
420 #: ../src/guestfs.pod:198
423 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
424 " \"/etc/rc3.d/S30portmap\");\n"
429 #: ../src/guestfs.pod:201
431 "Libguestfs will reject attempts to use relative paths and there is no "
432 "concept of a current working directory."
436 #: ../src/guestfs.pod:204
438 "Libguestfs can return errors in many situations: for example if the "
439 "filesystem isn't writable, or if a file or directory that you requested "
440 "doesn't exist. If you are using the C API (documented here) you have to "
441 "check for those error conditions after each call. (Other language bindings "
442 "turn these errors into exceptions)."
446 #: ../src/guestfs.pod:210
448 "File writes are affected by the per-handle umask, set by calling "
449 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
453 #: ../src/guestfs.pod:213
458 #: ../src/guestfs.pod:215
460 "Libguestfs contains API calls to read, create and modify partition tables on "
465 #: ../src/guestfs.pod:218
467 "In the common case where you want to create a single partition covering the "
468 "whole disk, you should use the L</guestfs_part_disk> call:"
472 #: ../src/guestfs.pod:222
475 " const char *parttype = \"mbr\";\n"
476 " if (disk_is_larger_than_2TB)\n"
477 " parttype = \"gpt\";\n"
478 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
483 #: ../src/guestfs.pod:227
485 "Obviously this effectively wipes anything that was on that disk image "
490 #: ../src/guestfs.pod:230
495 #: ../src/guestfs.pod:232
497 "Libguestfs provides access to a large part of the LVM2 API, such as "
498 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
499 "unless you familiarize yourself with the concepts of physical volumes, "
500 "volume groups and logical volumes."
504 #: ../src/guestfs.pod:237
506 "This author strongly recommends reading the LVM HOWTO, online at "
507 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
511 #: ../src/guestfs.pod:240
516 #: ../src/guestfs.pod:242
518 "Use L</guestfs_cat> to download small, text only files. This call is "
519 "limited to files which are less than 2 MB and which cannot contain any ASCII "
520 "NUL (C<\\0>) characters. However it has a very simple to use API."
524 #: ../src/guestfs.pod:247
526 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
527 "bit data, since it returns a (pointer, size) pair. However it is still "
528 "limited to \"small\" files, less than 2 MB."
532 #: ../src/guestfs.pod:251
534 "L</guestfs_download> can be used to download any file, with no limits on "
535 "content or size (even files larger than 4 GB)."
539 #: ../src/guestfs.pod:254
540 msgid "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
544 #: ../src/guestfs.pod:257
549 #: ../src/guestfs.pod:259
551 "It's often the case that you want to write a file or files to the disk "
556 #: ../src/guestfs.pod:262
558 "To write a small file with fixed content, use L</guestfs_write>. To create "
559 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
560 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
561 "variety of other functions for creating test files, for example "
562 "L</guestfs_fill> and L</guestfs_fill_pattern>."
566 #: ../src/guestfs.pod:268
568 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
569 "file content or size (even files larger than 4 GB)."
573 #: ../src/guestfs.pod:271
574 msgid "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
578 #: ../src/guestfs.pod:273
580 "However the fastest way to upload I<large numbers of arbitrary files> is to "
581 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
582 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add "
583 "the drive in a predictable way (eg. adding it last after all other drives) "
584 "then you can get the device name from L</guestfs_list_devices> and mount it "
585 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
586 "sometimes non-portable between kernel versions, and they don't support "
587 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
588 "using a label or UUID, use an ISO image instead."
592 #: ../src/guestfs.pod:284
597 #: ../src/guestfs.pod:286
599 "There are various different commands for copying between files and devices "
600 "and in and out of the guest filesystem. These are summarised in the table "
605 #: ../src/guestfs.pod:292
606 msgid "B<file> to B<file>"
610 #: ../src/guestfs.pod:294
612 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
613 "directories recursively."
617 #: ../src/guestfs.pod:297
618 msgid "B<file or device> to B<file or device>"
622 #: ../src/guestfs.pod:299
624 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
625 "devices in the guest."
629 #: ../src/guestfs.pod:302
630 msgid "Example: duplicate the contents of an LV:"
634 #: ../src/guestfs.pod:304
637 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
642 #: ../src/guestfs.pod:306
644 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
645 "(C</dev/VG/Original>). To copy less than the whole source device, use "
646 "L</guestfs_copy_size>."
650 #: ../src/guestfs.pod:310
651 msgid "B<file on the host> to B<file or device>"
655 #: ../src/guestfs.pod:312
656 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
660 #: ../src/guestfs.pod:314
661 msgid "B<file or device> to B<file on the host>"
665 #: ../src/guestfs.pod:316
666 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
670 #: ../src/guestfs.pod:320
671 msgid "LISTING FILES"
675 #: ../src/guestfs.pod:322
677 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
678 "L<guestfish(1)>-equivalent command C<ll>)."
682 #: ../src/guestfs.pod:325
684 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
685 "programs, as a flat list of strings."
689 #: ../src/guestfs.pod:328
691 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
692 "directory, plus additional information about each one. It is more "
693 "equivalent to using the L<readdir(3)> call on a local filesystem."
697 #: ../src/guestfs.pod:332
699 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
704 #: ../src/guestfs.pod:335
705 msgid "RUNNING COMMANDS"
709 #: ../src/guestfs.pod:337
711 "Although libguestfs is primarily an API for manipulating files inside guest "
712 "images, we also provide some limited facilities for running commands inside "
717 #: ../src/guestfs.pod:341
718 msgid "There are many limitations to this:"
722 #: ../src/guestfs.pod:345 ../src/guestfs.pod:350 ../src/guestfs.pod:355 ../src/guestfs.pod:359 ../src/guestfs.pod:364 ../src/guestfs.pod:368 ../src/guestfs.pod:373 ../src/guestfs.pod:1223 ../src/guestfs.pod:1228 ../src/guestfs.pod:1232 ../src/guestfs.pod:1334 ../src/guestfs.pod:1338 ../src/guestfs.pod:1342 ../src/guestfs.pod:1347 ../src/guestfs.pod:1355 ../src/guestfs.pod:1374 ../src/guestfs.pod:1382 ../src/guestfs.pod:1612 ../src/guestfs.pod:1618 ../src/guestfs.pod:1623 ../src/guestfs.pod:1629 ../src/guestfs.pod:1736 ../src/guestfs.pod:1740 ../src/guestfs.pod:1744 ../src/guestfs.pod:1748 ../src/guestfs-actions.pod:14 ../src/guestfs-actions.pod:21 ../src/guestfs-actions.pod:372 ../src/guestfs-actions.pod:380 ../src/guestfs-actions.pod:387 ../src/guestfs-actions.pod:394 ../src/guestfs-actions.pod:1257 ../src/guestfs-actions.pod:1261 ../src/guestfs-actions.pod:1265 ../src/guestfs-actions.pod:1269 ../src/guestfs-actions.pod:1277 ../src/guestfs-actions.pod:1281 ../src/guestfs-actions.pod:1285 ../src/guestfs-actions.pod:1295 ../src/guestfs-actions.pod:1299 ../src/guestfs-actions.pod:1303 ../src/guestfs-actions.pod:1426 ../src/guestfs-actions.pod:1430 ../src/guestfs-actions.pod:1435 ../src/guestfs-actions.pod:1440 ../src/guestfs-actions.pod:1492 ../src/guestfs-actions.pod:1496 ../src/guestfs-actions.pod:1501 ../fish/guestfish.pod:309 ../fish/guestfish.pod:313 ../fish/guestfish.pod:317 ../fish/guestfish.pod:321 ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:300 ../fish/guestfish-actions.pod:308 ../fish/guestfish-actions.pod:315 ../fish/guestfish-actions.pod:322 ../fish/guestfish-actions.pod:998 ../fish/guestfish-actions.pod:1002 ../fish/guestfish-actions.pod:1006 ../fish/guestfish-actions.pod:1010 ../fish/guestfish-actions.pod:1018 ../fish/guestfish-actions.pod:1022 ../fish/guestfish-actions.pod:1026 ../fish/guestfish-actions.pod:1036 ../fish/guestfish-actions.pod:1040 ../fish/guestfish-actions.pod:1044 ../fish/guestfish-actions.pod:1134 ../fish/guestfish-actions.pod:1138 ../fish/guestfish-actions.pod:1143 ../fish/guestfish-actions.pod:1148 ../fish/guestfish-actions.pod:1190 ../fish/guestfish-actions.pod:1194 ../fish/guestfish-actions.pod:1199 ../tools/virt-resize.pl:324 ../tools/virt-resize.pl:329 ../tools/virt-resize.pl:339
727 #: ../src/guestfs.pod:347
729 "The kernel version that the command runs under will be different from what "
734 #: ../src/guestfs.pod:352
736 "If the command needs to communicate with daemons, then most likely they "
741 #: ../src/guestfs.pod:357
742 msgid "The command will be running in limited memory."
746 #: ../src/guestfs.pod:361
748 "The network may not be available unless you enable it (see "
749 "L</guestfs_set_network>)."
753 #: ../src/guestfs.pod:366
754 msgid "Only supports Linux guests (not Windows, BSD, etc)."
758 #: ../src/guestfs.pod:370
759 msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
763 #: ../src/guestfs.pod:375
765 "For SELinux guests, you may need to enable SELinux and load policy first. "
766 "See L</SELINUX> in this manpage."
770 #: ../src/guestfs.pod:380
772 "The two main API calls to run commands are L</guestfs_command> and "
773 "L</guestfs_sh> (there are also variations)."
777 #: ../src/guestfs.pod:383
779 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
780 "shell globs, redirections, etc will work."
784 #: ../src/guestfs.pod:386
785 msgid "CONFIGURATION FILES"
789 #: ../src/guestfs.pod:388
791 "To read and write configuration files in Linux guest filesystems, we "
792 "strongly recommend using Augeas. For example, Augeas understands how to "
793 "read and write, say, a Linux shadow password file or X.org configuration "
794 "file, and so avoids you having to write that code."
798 #: ../src/guestfs.pod:393
800 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
801 "document Augeas itself here because there is excellent documentation on the "
802 "L<http://augeas.net/> website."
806 #: ../src/guestfs.pod:397
808 "If you don't want to use Augeas (you fool!) then try calling "
809 "L</guestfs_read_lines> to get the file as a list of lines which you can "
814 #: ../src/guestfs.pod:401
819 #: ../src/guestfs.pod:403
821 "We support SELinux guests. To ensure that labeling happens correctly in "
822 "SELinux guests, you need to enable SELinux and load the guest's policy:"
826 #: ../src/guestfs.pod:409
831 #: ../src/guestfs.pod:411
832 msgid "Before launching, do:"
836 #: ../src/guestfs.pod:413
839 " guestfs_set_selinux (g, 1);\n"
844 #: ../src/guestfs.pod:415
849 #: ../src/guestfs.pod:417
851 "After mounting the guest's filesystem(s), load the policy. This is best "
852 "done by running the L<load_policy(8)> command in the guest itself:"
856 #: ../src/guestfs.pod:421
859 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
864 #: ../src/guestfs.pod:423
866 "(Older versions of C<load_policy> require you to specify the name of the "
871 #: ../src/guestfs.pod:426
876 #: ../src/guestfs.pod:428
878 "Optionally, set the security context for the API. The correct security "
879 "context to use can only be known by inspecting the guest. As an example:"
883 #: ../src/guestfs.pod:432
886 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
891 #: ../src/guestfs.pod:436
892 msgid "This will work for running commands and editing existing files."
896 #: ../src/guestfs.pod:438
898 "When new files are created, you may need to label them explicitly, for "
899 "example by running the external command C<restorecon pathname>."
903 #: ../src/guestfs.pod:442
908 #: ../src/guestfs.pod:444
910 "Certain calls are affected by the current file mode creation mask (the "
911 "\"umask\"). In particular ones which create files or directories, such as "
912 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
913 "either the default mode that the file is created with or modifies the mode "
918 #: ../src/guestfs.pod:450
920 "The default umask is C<022>, so files are created with modes such as C<0644> "
921 "and directories with C<0755>."
925 #: ../src/guestfs.pod:453
927 "There are two ways to avoid being affected by umask. Either set umask to 0 "
928 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
929 "L</guestfs_chmod> after creating each file or directory."
933 #: ../src/guestfs.pod:457
934 msgid "For more information about umask, see L<umask(2)>."
938 #: ../src/guestfs.pod:459 ../fish/guestfish.pod:559
939 msgid "ENCRYPTED DISKS"
943 #: ../src/guestfs.pod:461
945 "Libguestfs allows you to access Linux guests which have been encrypted using "
946 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
947 "standard. This includes nearly all whole disk encryption systems used by "
948 "modern Linux guests."
952 #: ../src/guestfs.pod:467
954 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
955 "returns the string C<crypto_LUKS>)."
959 #: ../src/guestfs.pod:470
961 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
962 "will require the passphrase!"
966 #: ../src/guestfs.pod:473
968 "Opening a LUKS device creates a new device mapper device called "
969 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
970 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
971 "decrypted from and encrypted to the underlying block device respectively."
975 #: ../src/guestfs.pod:479
977 "LVM volume groups on the device can be made visible by calling "
978 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
979 "volume(s) can now be mounted in the usual way."
983 #: ../src/guestfs.pod:483
985 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
986 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
987 "[\"/dev/VG\"])>. Then close the mapper device by calling "
988 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
989 "underlying encrypted block device)."
993 #: ../src/guestfs.pod:490
998 #: ../src/guestfs.pod:492
1000 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1001 "contains operating systems. (These APIs used to be in a separate Perl-only "
1002 "library called L<Sys::Guestfs::Lib(3)> but since version 1.5.3 the most "
1003 "frequently used part of this library has been rewritten in C and moved into "
1008 #: ../src/guestfs.pod:498
1010 "Add all disks belonging to the unknown virtual machine and call "
1011 "L</guestfs_launch> in the usual way."
1015 #: ../src/guestfs.pod:501
1017 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1018 "and certain heuristics, and returns a list of operating systems that were "
1019 "found. An empty list means none were found. A single element is the root "
1020 "filesystem of the operating system. For dual- or multi-boot guests, "
1021 "multiple roots can be returned, each one corresponding to a separate "
1022 "operating system. (Multi-boot virtual machines are extremely rare in the "
1023 "world of virtualization, but since this scenario can happen, we have built "
1024 "libguestfs to deal with it.)"
1028 #: ../src/guestfs.pod:510
1030 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1031 "to get additional details about that operating system. For example, call "
1032 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1033 "Windows and Linux-based operating systems respectively."
1037 #: ../src/guestfs.pod:516
1039 "Un*x-like and Linux-based operating systems usually consist of several "
1040 "filesystems which are mounted at boot time (for example, a separate boot "
1041 "partition mounted on C</boot>). The inspection rules are able to detect how "
1042 "filesystems correspond to mount points. Call "
1043 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1044 "hash table like this example:"
1048 #: ../src/guestfs.pod:523
1051 " /boot => /dev/sda1\n"
1052 " / => /dev/vg_guest/lv_root\n"
1053 " /usr => /dev/vg_guest/lv_usr\n"
1058 #: ../src/guestfs.pod:527
1060 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1061 "filesystems as suggested."
1065 #: ../src/guestfs.pod:530
1067 "Be careful to mount filesystems in the right order (eg. C</> before "
1068 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
1073 #: ../src/guestfs.pod:534
1075 "Inspection currently only works for some common operating systems. "
1076 "Contributors are welcome to send patches for other operating systems that we "
1077 "currently cannot detect."
1081 #: ../src/guestfs.pod:538
1083 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1084 "for more details. The L</guestfs_inspect_os> function just ignores any "
1085 "encrypted devices."
1089 #: ../src/guestfs.pod:542
1091 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1092 "inspection and caches the results in the guest handle. Subsequent calls to "
1093 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
1094 "re-read the disks. If you change the content of the guest disks, you can "
1095 "redo inspection by calling L</guestfs_inspect_os> again."
1099 #: ../src/guestfs.pod:549
1100 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1104 #: ../src/guestfs.pod:551
1106 "Libguestfs can mount NTFS partitions. It does this using the "
1107 "L<http://www.ntfs-3g.org/> driver."
1111 #: ../src/guestfs.pod:554
1113 "DOS and Windows still use drive letters, and the filesystems are always "
1114 "treated as case insensitive by Windows itself, and therefore you might find "
1115 "a Windows configuration file referring to a path like "
1116 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
1117 "that directory might be referred to as C</WINDOWS/System32>."
1121 #: ../src/guestfs.pod:560
1123 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1124 "libguestfs to read the appropriate Windows Registry and configuration files, "
1125 "to determine yourself how drives are mapped (see also L<hivex(3)> and "
1126 "L<virt-inspector(1)>)."
1130 #: ../src/guestfs.pod:565
1132 "Replacing backslash characters with forward slash characters is also outside "
1133 "the scope of libguestfs, but something that you can easily do."
1137 #: ../src/guestfs.pod:568
1139 "Where we can help is in resolving the case insensitivity of paths. For "
1140 "this, call L</guestfs_case_sensitive_path>."
1144 #: ../src/guestfs.pod:571
1146 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1147 "files, through the library C<hivex> which is part of the libguestfs project "
1148 "although ships as a separate tarball. You have to locate and download the "
1149 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1150 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
1151 "L<virt-win-reg(1)> for more help on this issue."
1155 #: ../src/guestfs.pod:579
1156 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1160 #: ../src/guestfs.pod:581
1162 "Although we don't want to discourage you from using the C API, we will "
1163 "mention here that the same API is also available in other languages."
1167 #: ../src/guestfs.pod:584
1169 "The API is broadly identical in all supported languages. This means that "
1170 "the C call C<guestfs_mount(g,path)> is C<$g-E<gt>mount($path)> in Perl, "
1171 "C<g.mount(path)> in Python, and C<Guestfs.mount g path> in OCaml. In other "
1172 "words, a straightforward, predictable isomorphism between each language."
1176 #: ../src/guestfs.pod:590
1178 "Error messages are automatically transformed into exceptions if the language "
1183 #: ../src/guestfs.pod:593
1185 "We don't try to \"object orientify\" parts of the API in OO languages, "
1186 "although contributors are welcome to write higher level APIs above what we "
1187 "provide in their favourite languages if they wish."
1191 #: ../src/guestfs.pod:599
1196 #: ../src/guestfs.pod:601
1198 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1199 "identical to the C API. C++ classes and exceptions are not used."
1203 #: ../src/guestfs.pod:605
1208 #: ../src/guestfs.pod:607
1210 "The C# bindings are highly experimental. Please read the warnings at the "
1211 "top of C<csharp/Libguestfs.cs>."
1215 #: ../src/guestfs.pod:610
1220 #: ../src/guestfs.pod:612
1222 "This is the only language binding that is working but incomplete. Only "
1223 "calls which return simple integers have been bound in Haskell, and we are "
1224 "looking for help to complete this binding."
1228 #: ../src/guestfs.pod:616
1233 #: ../src/guestfs.pod:618
1235 "Full documentation is contained in the Javadoc which is distributed with "
1240 #: ../src/guestfs.pod:621
1245 #: ../src/guestfs.pod:623
1246 msgid "For documentation see the file C<guestfs.mli>."
1250 #: ../src/guestfs.pod:625
1255 #: ../src/guestfs.pod:627
1256 msgid "For documentation see L<Sys::Guestfs(3)>."
1260 #: ../src/guestfs.pod:629
1265 #: ../src/guestfs.pod:631
1267 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1268 "the php-libguestfs package for your distribution."
1272 #: ../src/guestfs.pod:634
1273 msgid "The PHP binding only works correctly on 64 bit machines."
1277 #: ../src/guestfs.pod:636
1282 #: ../src/guestfs.pod:638
1283 msgid "For documentation do:"
1287 #: ../src/guestfs.pod:640
1291 " >>> import guestfs\n"
1292 " >>> help (guestfs)\n"
1297 #: ../src/guestfs.pod:644
1302 #: ../src/guestfs.pod:646
1304 "Use the Guestfs module. There is no Ruby-specific documentation, but you "
1305 "can find examples written in Ruby in the libguestfs source."
1309 #: ../src/guestfs.pod:649
1310 msgid "B<shell scripts>"
1314 #: ../src/guestfs.pod:651
1315 msgid "For documentation see L<guestfish(1)>."
1319 #: ../src/guestfs.pod:655
1320 msgid "LIBGUESTFS GOTCHAS"
1324 #: ../src/guestfs.pod:657
1326 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1327 "system [...] that works in the way it is documented but is counterintuitive "
1328 "and almost invites mistakes.\""
1332 #: ../src/guestfs.pod:661
1334 "Since we developed libguestfs and the associated tools, there are several "
1335 "things we would have designed differently, but are now stuck with for "
1336 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1337 "release, you can expect these to change. Beware of them."
1341 #: ../src/guestfs.pod:669
1342 msgid "Autosync / forgetting to sync."
1346 #: ../src/guestfs.pod:671
1348 "When modifying a filesystem from C or another language, you B<must> unmount "
1349 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1350 "libguestfs handle. You can also call:"
1354 #: ../src/guestfs.pod:675
1357 " guestfs_set_autosync (g, 1);\n"
1362 #: ../src/guestfs.pod:677
1364 "to have the unmount/sync done automatically for you when the handle 'g' is "
1365 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
1370 #: ../src/guestfs.pod:681
1372 "If you forget to do this, then it is entirely possible that your changes "
1373 "won't be written out, or will be partially written, or (very rarely) that "
1374 "you'll get disk corruption."
1378 #: ../src/guestfs.pod:685
1380 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1381 "guestfish scripts that forget to sync will work just fine, which can make "
1382 "this very puzzling if you are trying to debug a problem."
1386 #: ../src/guestfs.pod:689
1387 msgid "Mount option C<-o sync> should not be the default."
1391 #: ../src/guestfs.pod:691
1393 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1394 "However C<-o sync> does not add any reliability benefit, but does have a "
1395 "very large performance impact."
1399 #: ../src/guestfs.pod:695
1401 "The work around is to use L</guestfs_mount_options> and set the mount "
1402 "options that you actually want to use."
1406 #: ../src/guestfs.pod:698
1407 msgid "Read-only should be the default."
1411 #: ../src/guestfs.pod:700
1413 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1414 "specify I<--rw> if you want to make changes to the image."
1418 #: ../src/guestfs.pod:703
1419 msgid "This would reduce the potential to corrupt live VM images."
1423 #: ../src/guestfs.pod:705
1425 "Note that many filesystems change the disk when you just mount and unmount, "
1426 "even if you didn't perform any writes. You need to use "
1427 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
1431 #: ../src/guestfs.pod:709
1432 msgid "guestfish command line is hard to use."
1436 #: ../src/guestfs.pod:711
1438 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1439 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1440 "exist, so it fails. In earlier versions of guestfish the error message was "
1441 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1442 "we should have used C<guestfish -c command> to run commands."
1446 #: ../src/guestfs.pod:718
1447 msgid "guestfish megabyte modifiers don't work right on all commands"
1451 #: ../src/guestfs.pod:720
1453 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1454 "other modifiers). What guestfish actually does is to multiply the number "
1455 "part by the modifier part and pass the result to the C API. However this "
1456 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1457 "expecting some other unit (eg. megabytes)."
1461 #: ../src/guestfs.pod:727
1462 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1466 #: ../src/guestfs.pod:729
1469 " lvcreate LV VG 100M\n"
1474 #: ../src/guestfs.pod:731
1476 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1477 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1478 "megabytes * megabytes) logical volume. The error message you get from this "
1479 "is also a little obscure."
1483 #: ../src/guestfs.pod:736
1485 "This could be fixed in the generator by specially marking parameters and "
1486 "return values which take bytes or other units."
1490 #: ../src/guestfs.pod:739
1491 msgid "Library should return errno with error messages."
1495 #: ../src/guestfs.pod:741
1497 "It would be a nice-to-have to be able to get the original value of 'errno' "
1498 "from inside the appliance along error paths (where set). Currently "
1499 "L<guestmount(1)> goes through hoops to try to reverse the error message "
1500 "string into an errno, see the function error() in fuse/guestmount.c."
1504 #: ../src/guestfs.pod:747
1506 "In libguestfs 1.5.4, the protocol was changed so that the Linux errno is "
1507 "sent back from the daemon."
1511 #: ../src/guestfs.pod:752
1512 msgid "PROTOCOL LIMITS"
1516 #: ../src/guestfs.pod:754
1518 "Internally libguestfs uses a message-based protocol to pass API calls and "
1519 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1520 "plenty more detail about this). The maximum message size used by the "
1521 "protocol is slightly less than 4 MB. For some API calls you may need to be "
1522 "aware of this limit. The API calls which may be affected are individually "
1523 "documented, with a link back to this section of the documentation."
1527 #: ../src/guestfs.pod:762
1529 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1530 "a simple string. Because this string is at some point internally encoded as "
1531 "a message, the maximum size that it can return is slightly under 4 MB. If "
1532 "the requested file is larger than this then you will get an error."
1536 #: ../src/guestfs.pod:768
1538 "In order to transfer large files into and out of the guest filesystem, you "
1539 "need to use particular calls that support this. The sections L</UPLOADING> "
1540 "and L</DOWNLOADING> document how to do this."
1544 #: ../src/guestfs.pod:772
1546 "You might also consider mounting the disk image using our FUSE filesystem "
1547 "support (L<guestmount(1)>)."
1551 #: ../src/guestfs.pod:775
1552 msgid "KEYS AND PASSPHRASES"
1556 #: ../src/guestfs.pod:777
1558 "Certain libguestfs calls take a parameter that contains sensitive key "
1559 "material, passed in as a C string."
1563 #: ../src/guestfs.pod:780
1565 "In the future we would hope to change the libguestfs implementation so that "
1566 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1567 "swap. However this is I<not> done at the moment, because of the complexity "
1568 "of such an implementation."
1572 #: ../src/guestfs.pod:785
1574 "Therefore you should be aware that any key parameter you pass to libguestfs "
1575 "might end up being written out to the swap partition. If this is a concern, "
1576 "scrub the swap partition or don't use libguestfs on encrypted devices."
1580 #: ../src/guestfs.pod:790
1581 msgid "CONNECTION MANAGEMENT"
1585 #: ../src/guestfs.pod:792
1590 #: ../src/guestfs.pod:794
1592 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
1593 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
1594 "handle and release all resources used."
1598 #: ../src/guestfs.pod:798
1600 "For information on using multiple handles and threads, see the section "
1601 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> below."
1605 #: ../src/guestfs.pod:801
1606 msgid "guestfs_create"
1610 #: ../src/guestfs.pod:803
1613 " guestfs_h *guestfs_create (void);\n"
1618 #: ../src/guestfs.pod:805
1619 msgid "Create a connection handle."
1623 #: ../src/guestfs.pod:807
1624 msgid "You have to call L</guestfs_add_drive> on the handle at least once."
1628 #: ../src/guestfs.pod:809
1630 "This function returns a non-NULL pointer to a handle on success or NULL on "
1635 #: ../src/guestfs.pod:812
1636 msgid "After configuring the handle, you have to call L</guestfs_launch>."
1640 #: ../src/guestfs.pod:814
1642 "You may also want to configure error handling for the handle. See L</ERROR "
1643 "HANDLING> section below."
1647 #: ../src/guestfs.pod:817
1648 msgid "guestfs_close"
1652 #: ../src/guestfs.pod:819
1655 " void guestfs_close (guestfs_h *g);\n"
1660 #: ../src/guestfs.pod:821
1661 msgid "This closes the connection handle and frees up all resources used."
1665 #: ../src/guestfs.pod:823
1666 msgid "ERROR HANDLING"
1670 #: ../src/guestfs.pod:825
1672 "The convention in all functions that return C<int> is that they return C<-1> "
1673 "to indicate an error. You can get additional information on errors by "
1674 "calling L</guestfs_last_error> and/or by setting up an error handler with "
1675 "L</guestfs_set_error_handler>."
1679 #: ../src/guestfs.pod:830
1680 msgid "The default error handler prints the information string to C<stderr>."
1684 #: ../src/guestfs.pod:832
1686 "Out of memory errors are handled differently. The default action is to call "
1687 "L<abort(3)>. If this is undesirable, then you can set a handler using "
1688 "L</guestfs_set_out_of_memory_handler>."
1692 #: ../src/guestfs.pod:836
1693 msgid "guestfs_last_error"
1697 #: ../src/guestfs.pod:838
1700 " const char *guestfs_last_error (guestfs_h *g);\n"
1705 #: ../src/guestfs.pod:840
1707 "This returns the last error message that happened on C<g>. If there has not "
1708 "been an error since the handle was created, then this returns C<NULL>."
1712 #: ../src/guestfs.pod:844
1714 "The lifetime of the returned string is until the next error occurs, or "
1715 "L</guestfs_close> is called."
1719 #: ../src/guestfs.pod:847
1721 "The error string is not localized (ie. is always in English), because this "
1722 "makes searching for error messages in search engines give the largest number "
1727 #: ../src/guestfs.pod:851
1728 msgid "guestfs_set_error_handler"
1732 #: ../src/guestfs.pod:853
1735 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
1737 " const char *msg);\n"
1738 " void guestfs_set_error_handler (guestfs_h *g,\n"
1739 " guestfs_error_handler_cb cb,\n"
1745 #: ../src/guestfs.pod:860
1747 "The callback C<cb> will be called if there is an error. The parameters "
1748 "passed to the callback are an opaque data pointer and the error message "
1753 #: ../src/guestfs.pod:864
1755 "Note that the message string C<msg> is freed as soon as the callback "
1756 "function returns, so if you want to stash it somewhere you must make your "
1761 #: ../src/guestfs.pod:868
1762 msgid "The default handler prints messages on C<stderr>."
1766 #: ../src/guestfs.pod:870
1767 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
1771 #: ../src/guestfs.pod:872
1772 msgid "guestfs_get_error_handler"
1776 #: ../src/guestfs.pod:874
1779 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
1780 " void **opaque_rtn);\n"
1785 #: ../src/guestfs.pod:877
1786 msgid "Returns the current error handler callback."
1790 #: ../src/guestfs.pod:879
1791 msgid "guestfs_set_out_of_memory_handler"
1795 #: ../src/guestfs.pod:881
1798 " typedef void (*guestfs_abort_cb) (void);\n"
1799 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
1800 " guestfs_abort_cb);\n"
1805 #: ../src/guestfs.pod:885
1807 "The callback C<cb> will be called if there is an out of memory situation. "
1808 "I<Note this callback must not return>."
1812 #: ../src/guestfs.pod:888
1813 msgid "The default is to call L<abort(3)>."
1817 #: ../src/guestfs.pod:890
1818 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
1822 #: ../src/guestfs.pod:893
1823 msgid "guestfs_get_out_of_memory_handler"
1827 #: ../src/guestfs.pod:895
1830 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
1835 #: ../src/guestfs.pod:897
1836 msgid "This returns the current out of memory handler."
1840 #: ../src/guestfs.pod:899
1845 #: ../src/guestfs.pod:901
1847 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
1852 #: ../src/guestfs.pod:904
1854 "By default it looks for these in the directory C<$libdir/guestfs> "
1855 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
1859 #: ../src/guestfs.pod:907
1861 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
1862 "to change the directories that libguestfs will search in. The value is a "
1863 "colon-separated list of paths. The current directory is I<not> searched "
1864 "unless the path contains an empty element or C<.>. For example "
1865 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
1866 "then C</usr/lib/guestfs>."
1870 #: ../src/guestfs.pod:914
1871 msgid "HIGH-LEVEL API ACTIONS"
1875 #: ../src/guestfs.pod:916
1876 msgid "ABI GUARANTEE"
1880 #: ../src/guestfs.pod:918
1882 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
1883 "actions as outlined in this section. Although we will deprecate some "
1884 "actions, for example if they get replaced by newer calls, we will keep the "
1885 "old actions forever. This allows you the developer to program in confidence "
1886 "against the libguestfs API."
1890 #: ../src/guestfs.pod:924 ../fish/guestfish.pod:926
1895 #: ../src/guestfs.pod:926
1900 #: ../src/guestfs.pod:928
1905 #: ../src/guestfs.pod:930
1906 msgid "AVAILABILITY"
1910 #: ../src/guestfs.pod:932
1911 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
1915 #: ../src/guestfs.pod:934
1917 "Using L</guestfs_available> you can test availability of the following "
1918 "groups of functions. This test queries the appliance to see if the "
1919 "appliance you are currently using supports the functionality."
1923 #: ../src/guestfs.pod:939
1924 msgid "@AVAILABILITY@"
1928 #: ../src/guestfs.pod:941
1929 msgid "GUESTFISH supported COMMAND"
1933 #: ../src/guestfs.pod:943
1935 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
1936 "prints out the available groups and whether they are supported by this build "
1937 "of libguestfs. Note however that you have to do C<run> first."
1941 #: ../src/guestfs.pod:948
1942 msgid "SINGLE CALLS AT COMPILE TIME"
1946 #: ../src/guestfs.pod:950
1948 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
1949 "function, such as:"
1953 #: ../src/guestfs.pod:953
1956 " #define LIBGUESTFS_HAVE_DD 1\n"
1961 #: ../src/guestfs.pod:955
1962 msgid "if L</guestfs_dd> is available."
1966 #: ../src/guestfs.pod:957
1968 "Before version 1.5.8, if you needed to test whether a single libguestfs "
1969 "function is available at compile time, we recommended using build tools such "
1970 "as autoconf or cmake. For example in autotools you could use:"
1974 #: ../src/guestfs.pod:962
1977 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
1978 " AC_CHECK_FUNCS([guestfs_dd])\n"
1983 #: ../src/guestfs.pod:965
1985 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
1990 #: ../src/guestfs.pod:968
1991 msgid "SINGLE CALLS AT RUN TIME"
1995 #: ../src/guestfs.pod:970
1997 "Testing at compile time doesn't guarantee that a function really exists in "
1998 "the library. The reason is that you might be dynamically linked against a "
1999 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
2000 "This situation unfortunately results in a segmentation fault, which is a "
2001 "shortcoming of the C dynamic linking system itself."
2005 #: ../src/guestfs.pod:977
2007 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2008 "in this example program (note that you still need the compile time check as "
2013 #: ../src/guestfs.pod:981
2016 " #include <stdio.h>\n"
2017 " #include <stdlib.h>\n"
2018 " #include <unistd.h>\n"
2019 " #include <dlfcn.h>\n"
2020 " #include <guestfs.h>\n"
2025 #: ../src/guestfs.pod:987
2030 " #ifdef LIBGUESTFS_HAVE_DD\n"
2032 " int has_function;\n"
2037 #: ../src/guestfs.pod:993
2040 " /* Test if the function guestfs_dd is really available. */\n"
2041 " dl = dlopen (NULL, RTLD_LAZY);\n"
2043 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2044 " exit (EXIT_FAILURE);\n"
2046 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2052 #: ../src/guestfs.pod:1002
2055 " if (!has_function)\n"
2056 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2058 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2059 " /* Now it's safe to call\n"
2060 " guestfs_dd (g, \"foo\", \"bar\");\n"
2064 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2071 #: ../src/guestfs.pod:1015
2073 "You may think the above is an awful lot of hassle, and it is. There are "
2074 "other ways outside of the C linking system to ensure that this kind of "
2075 "incompatibility never arises, such as using package versioning:"
2079 #: ../src/guestfs.pod:1020
2082 " Requires: libguestfs >= 1.0.80\n"
2087 #: ../src/guestfs.pod:1022 ../src/guestfs.pod:1027
2092 #: ../src/guestfs.pod:1024
2094 "<!-- old anchor for the next section --> <a "
2095 "name=\"state_machine_and_low_level_event_api\"/>"
2099 #: ../src/guestfs.pod:1029
2100 msgid "ARCHITECTURE"
2104 #: ../src/guestfs.pod:1031
2106 "Internally, libguestfs is implemented by running an appliance (a special "
2107 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
2108 "process of the main program."
2112 #: ../src/guestfs.pod:1035
2115 " ___________________\n"
2117 " | main program |\n"
2119 " | | child process / appliance\n"
2120 " | | __________________________\n"
2122 " +-------------------+ RPC | +-----------------+ |\n"
2123 " | libguestfs <--------------------> guestfsd | |\n"
2124 " | | | +-----------------+ |\n"
2125 " \\___________________/ | | Linux kernel | |\n"
2126 " | +--^--------------+ |\n"
2127 " \\_________|________________/\n"
2133 " \\______________/\n"
2138 #: ../src/guestfs.pod:1055
2140 "The library, linked to the main program, creates the child process and hence "
2141 "the appliance in the L</guestfs_launch> function."
2145 #: ../src/guestfs.pod:1058
2147 "Inside the appliance is a Linux kernel and a complete stack of userspace "
2148 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
2149 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
2150 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
2151 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
2152 "attached to the qemu process which translates device access by the "
2153 "appliance's Linux kernel into accesses to the image."
2157 #: ../src/guestfs.pod:1067
2159 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
2160 "Although the disk image you are attached to might also be used by some "
2161 "virtual machine, libguestfs doesn't know or care about this. (But you will "
2162 "care if both libguestfs's qemu process and your virtual machine are trying "
2163 "to update the disk image at the same time, since these usually results in "
2164 "massive disk corruption)."
2168 #: ../src/guestfs.pod:1074
2169 msgid "STATE MACHINE"
2173 #: ../src/guestfs.pod:1076
2174 msgid "libguestfs uses a state machine to model the child process:"
2178 #: ../src/guestfs.pod:1078
2190 " / | \\ \\ guestfs_launch\n"
2191 " / | _\\__V______\n"
2193 " / | | LAUNCHING |\n"
2194 " / | \\___________/\n"
2196 " / | guestfs_launch\n"
2198 " ______ / __|____V\n"
2199 " / \\ ------> / \\\n"
2200 " | BUSY | | READY |\n"
2201 " \\______/ <------ \\________/\n"
2206 #: ../src/guestfs.pod:1100
2208 "The normal transitions are (1) CONFIG (when the handle is created, but there "
2209 "is no child process), (2) LAUNCHING (when the child process is booting up), "
2210 "(3) alternating between READY and BUSY as commands are issued to, and "
2211 "carried out by, the child process."
2215 #: ../src/guestfs.pod:1105
2217 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
2218 "asynchronously at any time (eg. due to some internal error), and that causes "
2219 "the state to transition back to CONFIG."
2223 #: ../src/guestfs.pod:1109
2225 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
2226 "issued when in the CONFIG state."
2230 #: ../src/guestfs.pod:1112
2232 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
2233 "L</guestfs_launch> blocks until the child process is READY to accept "
2234 "commands (or until some failure or timeout). L</guestfs_launch> internally "
2235 "moves the state from CONFIG to LAUNCHING while it is running."
2239 #: ../src/guestfs.pod:1118
2241 "API actions such as L</guestfs_mount> can only be issued when in the READY "
2242 "state. These API calls block waiting for the command to be carried out "
2243 "(ie. the state to transition to BUSY and then back to READY). There are no "
2244 "non-blocking versions, and no way to issue more than one command per handle "
2249 #: ../src/guestfs.pod:1124
2251 "Finally, the child process sends asynchronous messages back to the main "
2252 "program, such as kernel log messages. You can register a callback to "
2253 "receive these messages."
2257 #: ../src/guestfs.pod:1128
2258 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
2262 #: ../src/guestfs.pod:1130
2264 "The child process generates events in some situations. Current events "
2265 "include: receiving a log message, the child process exits."
2269 #: ../src/guestfs.pod:1133
2271 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
2276 #: ../src/guestfs.pod:1136
2278 "Only I<one callback of each type> can be registered for each handle. "
2279 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
2280 "that type. Cancel all callbacks of this type by calling this function with "
2281 "C<cb> set to C<NULL>."
2285 #: ../src/guestfs.pod:1141
2286 msgid "guestfs_set_log_message_callback"
2290 #: ../src/guestfs.pod:1143
2293 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
2294 " char *buf, int len);\n"
2295 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
2296 " guestfs_log_message_cb cb,\n"
2302 #: ../src/guestfs.pod:1149
2304 "The callback function C<cb> will be called whenever qemu or the guest writes "
2305 "anything to the console."
2309 #: ../src/guestfs.pod:1152
2310 msgid "Use this function to capture kernel messages and similar."
2314 #: ../src/guestfs.pod:1154
2316 "Normally there is no log message handler, and log messages are just "
2321 #: ../src/guestfs.pod:1157
2322 msgid "guestfs_set_subprocess_quit_callback"
2326 #: ../src/guestfs.pod:1159
2329 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
2330 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
2331 " guestfs_subprocess_quit_cb cb,\n"
2337 #: ../src/guestfs.pod:1164
2339 "The callback function C<cb> will be called when the child process quits, "
2340 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
2341 "corresponds to a transition from any state to the CONFIG state)."
2345 #: ../src/guestfs.pod:1169
2346 msgid "guestfs_set_launch_done_callback"
2350 #: ../src/guestfs.pod:1171
2353 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
2354 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
2355 " guestfs_launch_done_cb cb,\n"
2361 #: ../src/guestfs.pod:1176
2363 "The callback function C<cb> will be called when the child process becomes "
2364 "ready first time after it has been launched. (This corresponds to a "
2365 "transition from LAUNCHING to the READY state)."
2369 #: ../src/guestfs.pod:1180
2370 msgid "guestfs_set_close_callback"
2374 #: ../src/guestfs.pod:1182
2377 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
2378 " void guestfs_set_close_callback (guestfs_h *g,\n"
2379 " guestfs_close_cb cb,\n"
2385 #: ../src/guestfs.pod:1187
2387 "The callback function C<cb> will be called while the handle is being closed "
2388 "(synchronously from L</guestfs_close>)."
2392 #: ../src/guestfs.pod:1190
2394 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
2395 "handles that are open when the program exits. This means that this callback "
2396 "might be called indirectly from L<exit(3)>, which can cause unexpected "
2397 "problems in higher-level languages (eg. if your HLL interpreter has already "
2398 "been cleaned up by the time this is called, and if your callback then jumps "
2399 "into some HLL function)."
2403 #: ../src/guestfs.pod:1198
2404 msgid "guestfs_set_progress_callback"
2408 #: ../src/guestfs.pod:1200
2411 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
2412 " int proc_nr, int serial,\n"
2413 " uint64_t position, uint64_t total);\n"
2414 " void guestfs_set_progress_callback (guestfs_h *g,\n"
2415 " guestfs_progress_cb cb,\n"
2421 #: ../src/guestfs.pod:1207
2423 "Some long-running operations can generate progress messages. If this "
2424 "callback is registered, then it will be called each time a progress message "
2425 "is generated (usually two seconds after the operation started, and three "
2426 "times per second thereafter until it completes, although the frequency may "
2427 "change in future versions)."
2431 #: ../src/guestfs.pod:1213
2433 "The callback receives two numbers: C<position> and C<total>. The units of "
2434 "C<total> are not defined, although for some operations C<total> may relate "
2435 "in some way to the amount of data to be transferred (eg. in bytes or "
2436 "megabytes), and C<position> may be the portion which has been transferred."
2440 #: ../src/guestfs.pod:1219
2441 msgid "The only defined and stable parts of the API are:"
2445 #: ../src/guestfs.pod:1225
2447 "The callback can display to the user some type of progress bar or indicator "
2448 "which shows the ratio of C<position>:C<total>."
2452 #: ../src/guestfs.pod:1230
2453 msgid "0 E<lt>= C<position> E<lt>= C<total>"
2457 #: ../src/guestfs.pod:1234
2459 "If any progress notification is sent during a call, then a final progress "
2460 "notification is always sent when C<position> = C<total>."
2464 #: ../src/guestfs.pod:1237
2466 "This is to simplify caller code, so callers can easily set the progress "
2467 "indicator to \"100%\" at the end of the operation, without requiring special "
2468 "code to detect this case."
2472 #: ../src/guestfs.pod:1243
2474 "The callback also receives the procedure number and serial number of the "
2475 "call. These are only useful for debugging protocol issues, and the callback "
2476 "can normally ignore them. The callback may want to print these numbers in "
2477 "error messages or debugging messages."
2481 #: ../src/guestfs.pod:1248
2482 msgid "PRIVATE DATA AREA"
2486 #: ../src/guestfs.pod:1250
2488 "You can attach named pieces of private data to the libguestfs handle, and "
2489 "fetch them by name for the lifetime of the handle. This is called the "
2490 "private data area and is only available from the C API."
2494 #: ../src/guestfs.pod:1254
2495 msgid "To attach a named piece of data, use the following call:"
2499 #: ../src/guestfs.pod:1256
2502 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
2507 #: ../src/guestfs.pod:1258
2509 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
2510 "pointer (which can be C<NULL>). Any previous item with the same name is "
2515 #: ../src/guestfs.pod:1262
2517 "You can use any C<key> you want, but names beginning with an underscore "
2518 "character are reserved for internal libguestfs purposes (for implementing "
2519 "language bindings). It is recommended to prefix the name with some unique "
2520 "string to avoid collisions with other users."
2524 #: ../src/guestfs.pod:1267
2525 msgid "To retrieve the pointer, use:"
2529 #: ../src/guestfs.pod:1269
2532 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
2537 #: ../src/guestfs.pod:1271
2539 "This function returns C<NULL> if either no data is found associated with "
2540 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
2545 #: ../src/guestfs.pod:1275
2547 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
2548 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
2549 "all. In particular, libguestfs does I<not> try to free the data when the "
2550 "handle is closed. If the data must be freed, then the caller must either "
2551 "free it before calling L</guestfs_close> or must set up a close callback to "
2552 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
2553 "can be registered for a handle)."
2557 #: ../src/guestfs.pod:1283
2559 "The private data area is implemented using a hash table, and should be "
2560 "reasonably efficient for moderate numbers of keys."
2564 #: ../src/guestfs.pod:1286
2565 msgid "BLOCK DEVICE NAMING"
2569 #: ../src/guestfs.pod:1288
2571 "In the kernel there is now quite a profusion of schemata for naming block "
2572 "devices (in this context, by I<block device> I mean a physical or virtual "
2573 "hard drive). The original Linux IDE driver used names starting with "
2574 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
2575 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
2576 "replacement for the old IDE driver (particularly for SATA devices) those "
2577 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
2578 "machines with paravirtualized drivers. This has created several different "
2579 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
2584 #: ../src/guestfs.pod:1300
2586 "As discussed above, libguestfs uses a qemu appliance running an embedded "
2587 "Linux kernel to access block devices. We can run a variety of appliances "
2588 "based on a variety of Linux kernels."
2592 #: ../src/guestfs.pod:1304
2594 "This causes a problem for libguestfs because many API calls use device or "
2595 "partition names. Working scripts and the recipe (example) scripts that we "
2596 "make available over the internet could fail if the naming scheme changes."
2600 #: ../src/guestfs.pod:1309
2602 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2603 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2604 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2605 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2609 #: ../src/guestfs.pod:1315
2611 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2612 "L</guestfs_list_partitions> and similar calls return the true names of the "
2613 "devices and partitions as known to the appliance."
2617 #: ../src/guestfs.pod:1320
2618 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2622 #: ../src/guestfs.pod:1322
2624 "Usually this translation is transparent. However in some (very rare) cases "
2625 "you may need to know the exact algorithm. Such cases include where you use "
2626 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
2627 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
2632 #: ../src/guestfs.pod:1328
2634 "The algorithm is applied only to I<parameters> which are known to be either "
2635 "device or partition names. Return values from functions such as "
2636 "L</guestfs_list_devices> are never changed."
2640 #: ../src/guestfs.pod:1336
2641 msgid "Is the string a parameter which is a device or partition name?"
2645 #: ../src/guestfs.pod:1340
2646 msgid "Does the string begin with C</dev/sd>?"
2650 #: ../src/guestfs.pod:1344
2652 "Does the named device exist? If so, we use that device. However if I<not> "
2653 "then we continue with this algorithm."
2657 #: ../src/guestfs.pod:1349
2658 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2662 #: ../src/guestfs.pod:1351
2663 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2667 #: ../src/guestfs.pod:1353
2668 msgid "If that named device exists, use it. If not, continue."
2672 #: ../src/guestfs.pod:1357
2673 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2677 #: ../src/guestfs.pod:1359
2678 msgid "If that named device exists, use it. If not, return an error."
2682 #: ../src/guestfs.pod:1363
2683 msgid "PORTABILITY CONCERNS"
2687 #: ../src/guestfs.pod:1365
2689 "Although the standard naming scheme and automatic translation is useful for "
2690 "simple programs and guestfish scripts, for larger programs it is best not to "
2691 "rely on this mechanism."
2695 #: ../src/guestfs.pod:1369
2697 "Where possible for maximum future portability programs using libguestfs "
2698 "should use these future-proof techniques:"
2702 #: ../src/guestfs.pod:1376
2704 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2705 "device names, and then use those names directly."
2709 #: ../src/guestfs.pod:1379
2710 msgid "Since those device names exist by definition, they will never be translated."
2714 #: ../src/guestfs.pod:1384
2716 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2717 "filesystem labels."
2721 #: ../src/guestfs.pod:1389
2726 #: ../src/guestfs.pod:1391
2727 msgid "COMMUNICATION PROTOCOL"
2731 #: ../src/guestfs.pod:1393
2733 "Don't rely on using this protocol directly. This section documents how it "
2734 "currently works, but it may change at any time."
2738 #: ../src/guestfs.pod:1396
2740 "The protocol used to talk between the library and the daemon running inside "
2741 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
2742 "1014, RFC 1832, RFC 4506)."
2746 #: ../src/guestfs.pod:1400
2748 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
2749 "this file is automatically generated)."
2753 #: ../src/guestfs.pod:1403
2755 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
2756 "and C<FileOut> parameters, which are handled with very simple request/reply "
2757 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
2758 "parameters, which use the same request and reply messages, but they may also "
2759 "be followed by files sent using a chunked encoding."
2763 #: ../src/guestfs.pod:1410
2764 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
2768 #: ../src/guestfs.pod:1412
2769 msgid "For ordinary functions, the request message is:"
2773 #: ../src/guestfs.pod:1414
2776 " total length (header + arguments,\n"
2777 " but not including the length word itself)\n"
2778 " struct guestfs_message_header (encoded as XDR)\n"
2779 " struct guestfs_<foo>_args (encoded as XDR)\n"
2784 #: ../src/guestfs.pod:1419
2786 "The total length field allows the daemon to allocate a fixed size buffer "
2787 "into which it slurps the rest of the message. As a result, the total length "
2788 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
2789 "effective size of any request is limited to somewhere under this size."
2793 #: ../src/guestfs.pod:1425
2795 "Note also that many functions don't take any arguments, in which case the "
2796 "C<guestfs_I<foo>_args> is completely omitted."
2800 #: ../src/guestfs.pod:1428
2802 "The header contains the procedure number (C<guestfs_proc>) which is how the "
2803 "receiver knows what type of args structure to expect, or none at all."
2807 #: ../src/guestfs.pod:1432
2808 msgid "The reply message for ordinary functions is:"
2812 #: ../src/guestfs.pod:1434
2815 " total length (header + ret,\n"
2816 " but not including the length word itself)\n"
2817 " struct guestfs_message_header (encoded as XDR)\n"
2818 " struct guestfs_<foo>_ret (encoded as XDR)\n"
2823 #: ../src/guestfs.pod:1439
2825 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
2826 "functions that return no formal return values."
2830 #: ../src/guestfs.pod:1442
2831 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
2835 #: ../src/guestfs.pod:1445
2837 "In the case of an error, a flag is set in the header, and the reply message "
2838 "is slightly changed:"
2842 #: ../src/guestfs.pod:1448
2845 " total length (header + error,\n"
2846 " but not including the length word itself)\n"
2847 " struct guestfs_message_header (encoded as XDR)\n"
2848 " struct guestfs_message_error (encoded as XDR)\n"
2853 #: ../src/guestfs.pod:1453
2855 "The C<guestfs_message_error> structure contains the error message as a "
2860 #: ../src/guestfs.pod:1456
2861 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
2865 #: ../src/guestfs.pod:1458
2867 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
2868 "The normal request message is sent (see above). However this is followed by "
2869 "a sequence of file chunks."
2873 #: ../src/guestfs.pod:1462
2876 " total length (header + arguments,\n"
2877 " but not including the length word itself,\n"
2878 " and not including the chunks)\n"
2879 " struct guestfs_message_header (encoded as XDR)\n"
2880 " struct guestfs_<foo>_args (encoded as XDR)\n"
2881 " sequence of chunks for FileIn param #0\n"
2882 " sequence of chunks for FileIn param #1 etc.\n"
2887 #: ../src/guestfs.pod:1470
2888 msgid "The \"sequence of chunks\" is:"
2892 #: ../src/guestfs.pod:1472
2895 " length of chunk (not including length word itself)\n"
2896 " struct guestfs_chunk (encoded as XDR)\n"
2897 " length of chunk\n"
2898 " struct guestfs_chunk (encoded as XDR)\n"
2900 " length of chunk\n"
2901 " struct guestfs_chunk (with data.data_len == 0)\n"
2906 #: ../src/guestfs.pod:1480
2908 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
2909 "is set in the final chunk to indicate either successful completion or early "
2914 #: ../src/guestfs.pod:1484
2916 "At time of writing there are no functions that have more than one FileIn "
2917 "parameter. However this is (theoretically) supported, by sending the "
2918 "sequence of chunks for each FileIn parameter one after another (from left to "
2923 #: ../src/guestfs.pod:1489
2925 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
2926 "transfer. The library does this by sending a chunk with a special flag set "
2927 "to indicate cancellation. When the daemon sees this, it cancels the whole "
2928 "RPC, does I<not> send any reply, and goes back to reading the next request."
2932 #: ../src/guestfs.pod:1495
2934 "The daemon may also cancel. It does this by writing a special word "
2935 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
2936 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
2937 "cancel chunk). The special word is chosen so that even if cancellation "
2938 "happens right at the end of the transfer (after the library has finished "
2939 "writing and has started listening for the reply), the \"spurious\" cancel "
2940 "flag will not be confused with the reply message."
2944 #: ../src/guestfs.pod:1504
2946 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
2947 "limit), and also files where the size is not known in advance (eg. from "
2948 "pipes or sockets). However the chunks are rather small "
2949 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
2950 "to keep much in memory."
2954 #: ../src/guestfs.pod:1510
2955 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
2959 #: ../src/guestfs.pod:1512
2961 "The protocol for FileOut parameters is exactly the same as for FileIn "
2962 "parameters, but with the roles of daemon and library reversed."
2966 #: ../src/guestfs.pod:1515
2969 " total length (header + ret,\n"
2970 " but not including the length word itself,\n"
2971 " and not including the chunks)\n"
2972 " struct guestfs_message_header (encoded as XDR)\n"
2973 " struct guestfs_<foo>_ret (encoded as XDR)\n"
2974 " sequence of chunks for FileOut param #0\n"
2975 " sequence of chunks for FileOut param #1 etc.\n"
2980 #: ../src/guestfs.pod:1523
2981 msgid "INITIAL MESSAGE"
2985 #: ../src/guestfs.pod:1525
2987 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
2988 "which indicates that the guest and daemon is alive. This is what "
2989 "L</guestfs_launch> waits for."
2993 #: ../src/guestfs.pod:1529
2994 msgid "PROGRESS NOTIFICATION MESSAGES"
2998 #: ../src/guestfs.pod:1531
3000 "The daemon may send progress notification messages at any time. These are "
3001 "distinguished by the normal length word being replaced by "
3002 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
3006 #: ../src/guestfs.pod:1535
3008 "The library turns them into progress callbacks (see "
3009 "C<guestfs_set_progress_callback>) if there is a callback registered, or "
3010 "discards them if not."
3014 #: ../src/guestfs.pod:1539
3016 "The daemon self-limits the frequency of progress messages it sends (see "
3017 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
3022 #: ../src/guestfs.pod:1543
3023 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
3027 #: ../src/guestfs.pod:1545
3029 "All high-level libguestfs actions are synchronous. If you want to use "
3030 "libguestfs asynchronously then you must create a thread."
3034 #: ../src/guestfs.pod:1548
3036 "Only use the handle from a single thread. Either use the handle exclusively "
3037 "from one thread, or provide your own mutex so that two threads cannot issue "
3038 "calls on the same handle at the same time."
3042 #: ../src/guestfs.pod:1552
3044 "See the graphical program guestfs-browser for one possible architecture for "
3045 "multithreaded programs using libvirt and libguestfs."
3049 #: ../src/guestfs.pod:1555
3050 msgid "QEMU WRAPPERS"
3054 #: ../src/guestfs.pod:1557
3056 "If you want to compile your own qemu, run qemu from a non-standard location, "
3057 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
3062 #: ../src/guestfs.pod:1561
3064 "There is one important rule to remember: you I<must C<exec qemu>> as the "
3065 "last command in the shell script (so that qemu replaces the shell and "
3066 "becomes the direct child of the libguestfs-using program). If you don't do "
3067 "this, then the qemu process won't be cleaned up correctly."
3071 #: ../src/guestfs.pod:1566
3073 "Here is an example of a wrapper, where I have built my own copy of qemu from "
3078 #: ../src/guestfs.pod:1569
3082 " qemudir=/home/rjones/d/qemu\n"
3083 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
3089 #: ../src/guestfs.pod:1573
3091 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
3092 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
3097 #: ../src/guestfs.pod:1577
3100 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
3105 #: ../src/guestfs.pod:1579
3107 "Note that libguestfs also calls qemu with the -help and -version options in "
3108 "order to determine features."
3112 #: ../src/guestfs.pod:1582
3113 msgid "LIBGUESTFS VERSION NUMBERS"
3117 #: ../src/guestfs.pod:1584
3119 "Since April 2010, libguestfs has started to make separate development and "
3120 "stable releases, along with corresponding branches in our git repository. "
3121 "These separate releases can be identified by version number:"
3125 #: ../src/guestfs.pod:1589
3128 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3129 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3135 " | `-------- sub-version\n"
3137 " `------ always '1' because we don't change the ABI\n"
3142 #: ../src/guestfs.pod:1600
3143 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3147 #: ../src/guestfs.pod:1602
3149 "As time passes we cherry pick fixes from the development branch and backport "
3150 "those into the stable branch, the effect being that the stable branch should "
3151 "get more stable and less buggy over time. So the stable releases are ideal "
3152 "for people who don't need new features but would just like the software to "
3157 #: ../src/guestfs.pod:1608
3158 msgid "Our criteria for backporting changes are:"
3162 #: ../src/guestfs.pod:1614
3164 "Documentation changes which don't affect any code are backported unless the "
3165 "documentation refers to a future feature which is not in stable."
3169 #: ../src/guestfs.pod:1620
3171 "Bug fixes which are not controversial, fix obvious problems, and have been "
3172 "well tested are backported."
3176 #: ../src/guestfs.pod:1625
3178 "Simple rearrangements of code which shouldn't affect how it works get "
3179 "backported. This is so that the code in the two branches doesn't get too "
3180 "far out of step, allowing us to backport future fixes more easily."
3184 #: ../src/guestfs.pod:1631
3186 "We I<don't> backport new features, new APIs, new tools etc, except in one "
3187 "exceptional case: the new feature is required in order to implement an "
3188 "important bug fix."
3192 #: ../src/guestfs.pod:1637
3194 "A new stable branch starts when we think the new features in development are "
3195 "substantial and compelling enough over the current stable branch to warrant "
3196 "it. When that happens we create new stable and development versions 1.N.0 "
3197 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
3198 "stable at this point, but by backporting fixes from development, that branch "
3199 "will stabilize over time."
3203 #: ../src/guestfs.pod:1645 ../fish/guestfish.pod:933 ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:312 ../tools/virt-rescue.pl:226
3204 msgid "ENVIRONMENT VARIABLES"
3208 #: ../src/guestfs.pod:1649 ../fish/guestfish.pod:953
3209 msgid "LIBGUESTFS_APPEND"
3213 #: ../src/guestfs.pod:1651 ../fish/guestfish.pod:955
3214 msgid "Pass additional options to the guest kernel."
3218 #: ../src/guestfs.pod:1653 ../fish/guestfish.pod:957
3219 msgid "LIBGUESTFS_DEBUG"
3223 #: ../src/guestfs.pod:1655
3225 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
3226 "effect as calling C<guestfs_set_verbose (g, 1)>."
3230 #: ../src/guestfs.pod:1658 ../fish/guestfish.pod:962
3231 msgid "LIBGUESTFS_MEMSIZE"
3235 #: ../src/guestfs.pod:1660 ../fish/guestfish.pod:964
3236 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
3240 #: ../src/guestfs.pod:1663 ../fish/guestfish.pod:967
3243 " LIBGUESTFS_MEMSIZE=700\n"
3248 #: ../src/guestfs.pod:1665 ../fish/guestfish.pod:969
3249 msgid "LIBGUESTFS_PATH"
3253 #: ../src/guestfs.pod:1667
3255 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
3256 "the discussion of paths in section PATH above."
3260 #: ../src/guestfs.pod:1670 ../fish/guestfish.pod:974
3261 msgid "LIBGUESTFS_QEMU"
3265 #: ../src/guestfs.pod:1672 ../fish/guestfish.pod:976
3267 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
3268 "which was found at compile time by the configure script is used."
3272 #: ../src/guestfs.pod:1676
3273 msgid "See also L</QEMU WRAPPERS> above."
3277 #: ../src/guestfs.pod:1678 ../fish/guestfish.pod:980
3278 msgid "LIBGUESTFS_TRACE"
3282 #: ../src/guestfs.pod:1680
3284 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
3285 "effect as calling C<guestfs_set_trace (g, 1)>."
3289 #: ../src/guestfs.pod:1683 ../fish/guestfish.pod:989
3294 #: ../src/guestfs.pod:1685 ../fish/guestfish.pod:991
3295 msgid "Location of temporary directory, defaults to C</tmp>."
3299 #: ../src/guestfs.pod:1687 ../fish/guestfish.pod:993
3301 "If libguestfs was compiled to use the supermin appliance then each handle "
3302 "will require rather a large amount of space in this directory for short "
3303 "periods of time (~ 80 MB). You can use C<$TMPDIR> to configure another "
3304 "directory to use in case C</tmp> is not large enough."
3308 #: ../src/guestfs.pod:1695 ../fish/guestfish.pod:1051 ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:178 ../inspector/virt-inspector.pl:846 ../tools/virt-cat.pl:163 ../tools/virt-df.pl:482 ../tools/virt-edit.pl:325 ../tools/virt-list-filesystems.pl:191 ../tools/virt-list-partitions.pl:229 ../tools/virt-ls.pl:210 ../tools/virt-make-fs.pl:527 ../tools/virt-rescue.pl:231 ../tools/virt-resize.pl:1390 ../tools/virt-tar.pl:257 ../tools/virt-win-reg.pl:461
3313 #: ../src/guestfs.pod:1697
3315 "L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
3316 "L<virt-edit(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
3317 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
3318 "L<virt-rescue(1)>, L<virt-tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
3319 "L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
3323 #: ../src/guestfs.pod:1715
3325 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
3326 "L<lvm(8)>, L<disktype(1)>."
3330 #: ../src/guestfs.pod:1722 ../tools/virt-make-fs.pl:541 ../tools/virt-win-reg.pl:476
3335 #: ../src/guestfs.pod:1724
3336 msgid "To get a list of bugs against libguestfs use this link:"
3340 #: ../src/guestfs.pod:1726
3341 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
3345 #: ../src/guestfs.pod:1728
3346 msgid "To report a new bug against libguestfs use this link:"
3350 #: ../src/guestfs.pod:1730
3351 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
3355 #: ../src/guestfs.pod:1732
3356 msgid "When reporting a bug, please check:"
3360 #: ../src/guestfs.pod:1738
3361 msgid "That the bug hasn't been reported already."
3365 #: ../src/guestfs.pod:1742
3366 msgid "That you are testing a recent version."
3370 #: ../src/guestfs.pod:1746
3371 msgid "Describe the bug accurately, and give a way to reproduce it."
3375 #: ../src/guestfs.pod:1750
3377 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
3382 #: ../src/guestfs.pod:1755 ../fish/guestfish.pod:1067 ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:189 ../inspector/virt-inspector.pl:855
3387 #: ../src/guestfs.pod:1757 ../fish/guestfish.pod:1069 ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:191
3388 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
3392 #: ../src/guestfs.pod:1759 ../fish/guestfish.pod:1071 ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:193 ../inspector/virt-inspector.pl:861 ../tools/virt-cat.pl:177 ../tools/virt-df.pl:495 ../tools/virt-edit.pl:341 ../tools/virt-list-filesystems.pl:207 ../tools/virt-list-partitions.pl:244 ../tools/virt-ls.pl:225 ../tools/virt-make-fs.pl:556 ../tools/virt-rescue.pl:245 ../tools/virt-resize.pl:1411 ../tools/virt-tar.pl:272 ../tools/virt-win-reg.pl:491
3397 #: ../src/guestfs.pod:1761 ../fish/guestfish.pod:1073
3398 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
3402 #: ../src/guestfs.pod:1764
3404 "This library is free software; you can redistribute it and/or modify it "
3405 "under the terms of the GNU Lesser General Public License as published by the "
3406 "Free Software Foundation; either version 2 of the License, or (at your "
3407 "option) any later version."
3411 #: ../src/guestfs.pod:1769
3413 "This library is distributed in the hope that it will be useful, but WITHOUT "
3414 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
3415 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
3420 #: ../src/guestfs.pod:1774
3422 "You should have received a copy of the GNU Lesser General Public License "
3423 "along with this library; if not, write to the Free Software Foundation, "
3424 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
3428 #: ../src/guestfs-actions.pod:1
3429 msgid "guestfs_add_cdrom"
3433 #: ../src/guestfs-actions.pod:3
3436 " int guestfs_add_cdrom (guestfs_h *g,\n"
3437 "\t\tconst char *filename);\n"
3442 #: ../src/guestfs-actions.pod:6 ../fish/guestfish-actions.pod:5
3443 msgid "This function adds a virtual CD-ROM disk image to the guest."
3447 #: ../src/guestfs-actions.pod:8 ../fish/guestfish-actions.pod:7
3448 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
3452 #: ../src/guestfs-actions.pod:10 ../src/guestfs-actions.pod:1488 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1186
3457 #: ../src/guestfs-actions.pod:16
3459 "This call checks for the existence of C<filename>. This stops you from "
3460 "specifying other types of drive which are supported by qemu such as C<nbd:> "
3461 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
3466 #: ../src/guestfs-actions.pod:23
3468 "If you just want to add an ISO file (often you use this as an efficient way "
3469 "to transfer large files into the guest), then you should probably use "
3470 "C<guestfs_add_drive_ro> instead."
3474 #: ../src/guestfs-actions.pod:29 ../src/guestfs-actions.pod:63 ../src/guestfs-actions.pod:92 ../src/guestfs-actions.pod:103 ../src/guestfs-actions.pod:114 ../src/guestfs-actions.pod:124 ../src/guestfs-actions.pod:135 ../src/guestfs-actions.pod:238 ../src/guestfs-actions.pod:255 ../src/guestfs-actions.pod:266 ../src/guestfs-actions.pod:302 ../src/guestfs-actions.pod:324 ../src/guestfs-actions.pod:339 ../src/guestfs-actions.pod:403 ../src/guestfs-actions.pod:430 ../src/guestfs-actions.pod:441 ../src/guestfs-actions.pod:453 ../src/guestfs-actions.pod:534 ../src/guestfs-actions.pod:549 ../src/guestfs-actions.pod:560 ../src/guestfs-actions.pod:571 ../src/guestfs-actions.pod:717 ../src/guestfs-actions.pod:734 ../src/guestfs-actions.pod:749 ../src/guestfs-actions.pod:824 ../src/guestfs-actions.pod:839 ../src/guestfs-actions.pod:855 ../src/guestfs-actions.pod:866 ../src/guestfs-actions.pod:883 ../src/guestfs-actions.pod:916 ../src/guestfs-actions.pod:974 ../src/guestfs-actions.pod:996 ../src/guestfs-actions.pod:1027 ../src/guestfs-actions.pod:1115 ../src/guestfs-actions.pod:1146 ../src/guestfs-actions.pod:1346 ../src/guestfs-actions.pod:1365 ../src/guestfs-actions.pod:1446 ../src/guestfs-actions.pod:1794 ../src/guestfs-actions.pod:1917 ../src/guestfs-actions.pod:1972 ../src/guestfs-actions.pod:2002 ../src/guestfs-actions.pod:2409 ../src/guestfs-actions.pod:2421 ../src/guestfs-actions.pod:2438 ../src/guestfs-actions.pod:2503 ../src/guestfs-actions.pod:2514 ../src/guestfs-actions.pod:2524 ../src/guestfs-actions.pod:2535 ../src/guestfs-actions.pod:2547 ../src/guestfs-actions.pod:2577 ../src/guestfs-actions.pod:2641 ../src/guestfs-actions.pod:2658 ../src/guestfs-actions.pod:2672 ../src/guestfs-actions.pod:2692 ../src/guestfs-actions.pod:2712 ../src/guestfs-actions.pod:2741 ../src/guestfs-actions.pod:2757 ../src/guestfs-actions.pod:2773 ../src/guestfs-actions.pod:2785 ../src/guestfs-actions.pod:2794 ../src/guestfs-actions.pod:2827 ../src/guestfs-actions.pod:2840 ../src/guestfs-actions.pod:2850 ../src/guestfs-actions.pod:2862 ../src/guestfs-actions.pod:2876 ../src/guestfs-actions.pod:2956 ../src/guestfs-actions.pod:2973 ../src/guestfs-actions.pod:2983 ../src/guestfs-actions.pod:3028 ../src/guestfs-actions.pod:3043 ../src/guestfs-actions.pod:3058 ../src/guestfs-actions.pod:3071 ../src/guestfs-actions.pod:3082 ../src/guestfs-actions.pod:3093 ../src/guestfs-actions.pod:3107 ../src/guestfs-actions.pod:3119 ../src/guestfs-actions.pod:3136 ../src/guestfs-actions.pod:3167 ../src/guestfs-actions.pod:3195 ../src/guestfs-actions.pod:3211 ../src/guestfs-actions.pod:3227 ../src/guestfs-actions.pod:3236 ../src/guestfs-actions.pod:3250 ../src/guestfs-actions.pod:3260 ../src/guestfs-actions.pod:3272 ../src/guestfs-actions.pod:3284 ../src/guestfs-actions.pod:3316 ../src/guestfs-actions.pod:3328 ../src/guestfs-actions.pod:3345 ../src/guestfs-actions.pod:3356 ../src/guestfs-actions.pod:3370 ../src/guestfs-actions.pod:3410 ../src/guestfs-actions.pod:3441 ../src/guestfs-actions.pod:3452 ../src/guestfs-actions.pod:3477 ../src/guestfs-actions.pod:3491 ../src/guestfs-actions.pod:3506 ../src/guestfs-actions.pod:3628 ../src/guestfs-actions.pod:3680 ../src/guestfs-actions.pod:3699 ../src/guestfs-actions.pod:3714 ../src/guestfs-actions.pod:3725 ../src/guestfs-actions.pod:3759 ../src/guestfs-actions.pod:3773 ../src/guestfs-actions.pod:3783 ../src/guestfs-actions.pod:3794 ../src/guestfs-actions.pod:4026 ../src/guestfs-actions.pod:4042 ../src/guestfs-actions.pod:4053 ../src/guestfs-actions.pod:4062 ../src/guestfs-actions.pod:4073 ../src/guestfs-actions.pod:4082 ../src/guestfs-actions.pod:4093 ../src/guestfs-actions.pod:4106 ../src/guestfs-actions.pod:4124 ../src/guestfs-actions.pod:4140 ../src/guestfs-actions.pod:4156 ../src/guestfs-actions.pod:4171 ../src/guestfs-actions.pod:4191 ../src/guestfs-actions.pod:4206 ../src/guestfs-actions.pod:4222 ../src/guestfs-actions.pod:4240 ../src/guestfs-actions.pod:4256 ../src/guestfs-actions.pod:4270 ../src/guestfs-actions.pod:4295 ../src/guestfs-actions.pod:4316 ../src/guestfs-actions.pod:4332 ../src/guestfs-actions.pod:4353 ../src/guestfs-actions.pod:4365 ../src/guestfs-actions.pod:4377 ../src/guestfs-actions.pod:4393 ../src/guestfs-actions.pod:4427 ../src/guestfs-actions.pod:4447 ../src/guestfs-actions.pod:4470 ../src/guestfs-actions.pod:4560 ../src/guestfs-actions.pod:4666 ../src/guestfs-actions.pod:4675 ../src/guestfs-actions.pod:4685 ../src/guestfs-actions.pod:4695 ../src/guestfs-actions.pod:4714 ../src/guestfs-actions.pod:4724 ../src/guestfs-actions.pod:4734 ../src/guestfs-actions.pod:4744 ../src/guestfs-actions.pod:4756 ../src/guestfs-actions.pod:4806 ../src/guestfs-actions.pod:4820 ../src/guestfs-actions.pod:4833 ../src/guestfs-actions.pod:4846 ../src/guestfs-actions.pod:4860 ../src/guestfs-actions.pod:4870 ../src/guestfs-actions.pod:4887 ../src/guestfs-actions.pod:4917 ../src/guestfs-actions.pod:4928 ../src/guestfs-actions.pod:4963 ../src/guestfs-actions.pod:4973 ../src/guestfs-actions.pod:4988 ../src/guestfs-actions.pod:5016 ../src/guestfs-actions.pod:5120 ../src/guestfs-actions.pod:5135 ../src/guestfs-actions.pod:5146 ../src/guestfs-actions.pod:5192 ../src/guestfs-actions.pod:5202 ../src/guestfs-actions.pod:5239 ../src/guestfs-actions.pod:5266 ../src/guestfs-actions.pod:5308 ../src/guestfs-actions.pod:5331 ../src/guestfs-actions.pod:5388 ../src/guestfs-actions.pod:5404 ../src/guestfs-actions.pod:5430
3475 msgid "This function returns 0 on success or -1 on error."
3479 #: ../src/guestfs-actions.pod:31
3480 msgid "guestfs_add_drive"
3484 #: ../src/guestfs-actions.pod:33
3487 " int guestfs_add_drive (guestfs_h *g,\n"
3488 "\t\tconst char *filename);\n"
3493 #: ../src/guestfs-actions.pod:36 ../fish/guestfish-actions.pod:32
3495 "This function adds a virtual machine disk image C<filename> to the guest. "
3496 "The first time you call this function, the disk appears as IDE disk 0 "
3497 "(C</dev/sda>) in the guest, the second time as C</dev/sdb>, and so on."
3501 #: ../src/guestfs-actions.pod:41 ../fish/guestfish-actions.pod:37
3503 "You don't necessarily need to be root when using libguestfs. However you "
3504 "obviously do need sufficient permissions to access the filename for whatever "
3505 "operations you want to perform (ie. read access if you just want to read the "
3506 "image or write access if you want to modify the image)."
3510 #: ../src/guestfs-actions.pod:47 ../fish/guestfish-actions.pod:43
3512 "This is equivalent to the qemu parameter C<-drive "
3513 "file=filename,cache=off,if=...>."
3517 #: ../src/guestfs-actions.pod:50 ../fish/guestfish-actions.pod:46
3519 "C<cache=off> is omitted in cases where it is not supported by the underlying "
3524 #: ../src/guestfs-actions.pod:53 ../src/guestfs-actions.pod:82
3526 "C<if=...> is set at compile time by the configuration option C<./configure "
3527 "--with-drive-if=...>. In the rare case where you might need to change this "
3528 "at run time, use C<guestfs_add_drive_with_if> or "
3529 "C<guestfs_add_drive_ro_with_if>."
3533 #: ../src/guestfs-actions.pod:58 ../src/guestfs-actions.pod:87
3535 "Note that this call checks for the existence of C<filename>. This stops you "
3536 "from specifying other types of drive which are supported by qemu such as "
3537 "C<nbd:> and C<http:> URLs. To specify those, use the general "
3538 "C<guestfs_config> call instead."
3542 #: ../src/guestfs-actions.pod:65
3543 msgid "guestfs_add_drive_ro"
3547 #: ../src/guestfs-actions.pod:67
3550 " int guestfs_add_drive_ro (guestfs_h *g,\n"
3551 "\t\tconst char *filename);\n"
3556 #: ../src/guestfs-actions.pod:70 ../fish/guestfish-actions.pod:63
3557 msgid "This adds a drive in snapshot mode, making it effectively read-only."
3561 #: ../src/guestfs-actions.pod:73 ../fish/guestfish-actions.pod:66
3563 "Note that writes to the device are allowed, and will be seen for the "
3564 "duration of the guestfs handle, but they are written to a temporary file "
3565 "which is discarded as soon as the guestfs handle is closed. We don't "
3566 "currently have any method to enable changes to be committed, although qemu "
3571 #: ../src/guestfs-actions.pod:79 ../fish/guestfish-actions.pod:72
3573 "This is equivalent to the qemu parameter C<-drive "
3574 "file=filename,snapshot=on,if=...>."
3578 #: ../src/guestfs-actions.pod:94
3579 msgid "guestfs_add_drive_ro_with_if"
3583 #: ../src/guestfs-actions.pod:96
3586 " int guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
3587 "\t\tconst char *filename,\n"
3588 "\t\tconst char *iface);\n"
3593 #: ../src/guestfs-actions.pod:100
3595 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
3596 "QEMU interface emulation to use at run time."
3600 #: ../src/guestfs-actions.pod:105
3601 msgid "guestfs_add_drive_with_if"
3605 #: ../src/guestfs-actions.pod:107
3608 " int guestfs_add_drive_with_if (guestfs_h *g,\n"
3609 "\t\tconst char *filename,\n"
3610 "\t\tconst char *iface);\n"
3615 #: ../src/guestfs-actions.pod:111
3617 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
3618 "QEMU interface emulation to use at run time."
3622 #: ../src/guestfs-actions.pod:116
3623 msgid "guestfs_aug_clear"
3627 #: ../src/guestfs-actions.pod:118
3630 " int guestfs_aug_clear (guestfs_h *g,\n"
3631 "\t\tconst char *augpath);\n"
3636 #: ../src/guestfs-actions.pod:121 ../fish/guestfish-actions.pod:103
3638 "Set the value associated with C<path> to C<NULL>. This is the same as the "
3639 "L<augtool(1)> C<clear> command."
3643 #: ../src/guestfs-actions.pod:126
3644 msgid "guestfs_aug_close"
3648 #: ../src/guestfs-actions.pod:128
3651 " int guestfs_aug_close (guestfs_h *g);\n"
3656 #: ../src/guestfs-actions.pod:130
3658 "Close the current Augeas handle and free up any resources used by it. After "
3659 "calling this, you have to call C<guestfs_aug_init> again before you can use "
3660 "any other Augeas functions."
3664 #: ../src/guestfs-actions.pod:137
3665 msgid "guestfs_aug_defnode"
3669 #: ../src/guestfs-actions.pod:139
3672 " struct guestfs_int_bool *guestfs_aug_defnode (guestfs_h *g,\n"
3673 "\t\tconst char *name,\n"
3674 "\t\tconst char *expr,\n"
3675 "\t\tconst char *val);\n"
3680 #: ../src/guestfs-actions.pod:144 ../fish/guestfish-actions.pod:119
3681 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
3685 #: ../src/guestfs-actions.pod:147
3687 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
3688 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
3689 "containing that single node."
3693 #: ../src/guestfs-actions.pod:151 ../fish/guestfish-actions.pod:126
3695 "On success this returns a pair containing the number of nodes in the "
3696 "nodeset, and a boolean flag if a node was created."
3700 #: ../src/guestfs-actions.pod:155
3702 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
3703 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
3707 #: ../src/guestfs-actions.pod:159
3708 msgid "guestfs_aug_defvar"
3712 #: ../src/guestfs-actions.pod:161
3715 " int guestfs_aug_defvar (guestfs_h *g,\n"
3716 "\t\tconst char *name,\n"
3717 "\t\tconst char *expr);\n"
3722 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:134
3724 "Defines an Augeas variable C<name> whose value is the result of evaluating "
3725 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
3729 #: ../src/guestfs-actions.pod:169 ../fish/guestfish-actions.pod:138
3731 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
3732 "evaluates to something which is not a nodeset."
3736 #: ../src/guestfs-actions.pod:172 ../src/guestfs-actions.pod:313 ../src/guestfs-actions.pod:467 ../src/guestfs-actions.pod:492 ../src/guestfs-actions.pod:507 ../src/guestfs-actions.pod:523 ../src/guestfs-actions.pod:1013 ../src/guestfs-actions.pod:1328 ../src/guestfs-actions.pod:1510 ../src/guestfs-actions.pod:1591 ../src/guestfs-actions.pod:1622 ../src/guestfs-actions.pod:1665 ../src/guestfs-actions.pod:1682 ../src/guestfs-actions.pod:1907 ../src/guestfs-actions.pod:2119 ../src/guestfs-actions.pod:2137 ../src/guestfs-actions.pod:3430 ../src/guestfs-actions.pod:3537 ../src/guestfs-actions.pod:3853 ../src/guestfs-actions.pod:4952 ../src/guestfs-actions.pod:5276 ../src/guestfs-actions.pod:5286 ../src/guestfs-actions.pod:5296
3737 msgid "On error this function returns -1."
3741 #: ../src/guestfs-actions.pod:174
3742 msgid "guestfs_aug_get"
3746 #: ../src/guestfs-actions.pod:176
3749 " char *guestfs_aug_get (guestfs_h *g,\n"
3750 "\t\tconst char *augpath);\n"
3755 #: ../src/guestfs-actions.pod:179 ../fish/guestfish-actions.pod:145
3757 "Look up the value associated with C<path>. If C<path> matches exactly one "
3758 "node, the C<value> is returned."
3762 #: ../src/guestfs-actions.pod:182 ../src/guestfs-actions.pod:610 ../src/guestfs-actions.pod:625 ../src/guestfs-actions.pod:682 ../src/guestfs-actions.pod:695 ../src/guestfs-actions.pod:786 ../src/guestfs-actions.pod:899 ../src/guestfs-actions.pod:928 ../src/guestfs-actions.pod:942 ../src/guestfs-actions.pod:958 ../src/guestfs-actions.pod:1041 ../src/guestfs-actions.pod:1205 ../src/guestfs-actions.pod:1314 ../src/guestfs-actions.pod:1459 ../src/guestfs-actions.pod:1473 ../src/guestfs-actions.pod:1549 ../src/guestfs-actions.pod:1567 ../src/guestfs-actions.pod:1701 ../src/guestfs-actions.pod:1840 ../src/guestfs-actions.pod:2021 ../src/guestfs-actions.pod:2071 ../src/guestfs-actions.pod:2187 ../src/guestfs-actions.pod:2222 ../src/guestfs-actions.pod:2492 ../src/guestfs-actions.pod:2913 ../src/guestfs-actions.pod:3009 ../src/guestfs-actions.pod:3552 ../src/guestfs-actions.pod:3831 ../src/guestfs-actions.pod:3969 ../src/guestfs-actions.pod:4012 ../src/guestfs-actions.pod:4488 ../src/guestfs-actions.pod:4501 ../src/guestfs-actions.pod:4515 ../src/guestfs-actions.pod:4536 ../src/guestfs-actions.pod:5069 ../src/guestfs-actions.pod:5085 ../src/guestfs-actions.pod:5100 ../src/guestfs-actions.pod:5248 ../src/guestfs-actions.pod:5478
3764 "This function returns a string, or NULL on error. I<The caller must free "
3765 "the returned string after use>."
3769 #: ../src/guestfs-actions.pod:185
3770 msgid "guestfs_aug_init"
3774 #: ../src/guestfs-actions.pod:187
3777 " int guestfs_aug_init (guestfs_h *g,\n"
3778 "\t\tconst char *root,\n"
3784 #: ../src/guestfs-actions.pod:191 ../fish/guestfish-actions.pod:152
3786 "Create a new Augeas handle for editing configuration files. If there was "
3787 "any previous Augeas handle associated with this guestfs session, then it is "
3792 #: ../src/guestfs-actions.pod:195
3793 msgid "You must call this before using any other C<guestfs_aug_*> commands."
3797 #: ../src/guestfs-actions.pod:198 ../fish/guestfish-actions.pod:159
3798 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
3802 #: ../src/guestfs-actions.pod:201 ../fish/guestfish-actions.pod:162
3804 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
3805 "logical I<or> of the following integers:"
3809 #: ../src/guestfs-actions.pod:207 ../fish/guestfish-actions.pod:168
3810 msgid "C<AUG_SAVE_BACKUP> = 1"
3814 #: ../src/guestfs-actions.pod:209 ../fish/guestfish-actions.pod:170
3815 msgid "Keep the original file with a C<.augsave> extension."
3819 #: ../src/guestfs-actions.pod:211 ../fish/guestfish-actions.pod:172
3820 msgid "C<AUG_SAVE_NEWFILE> = 2"
3824 #: ../src/guestfs-actions.pod:213 ../fish/guestfish-actions.pod:174
3826 "Save changes into a file with extension C<.augnew>, and do not overwrite "
3827 "original. Overrides C<AUG_SAVE_BACKUP>."
3831 #: ../src/guestfs-actions.pod:216 ../fish/guestfish-actions.pod:177
3832 msgid "C<AUG_TYPE_CHECK> = 4"
3836 #: ../src/guestfs-actions.pod:218 ../fish/guestfish-actions.pod:179
3837 msgid "Typecheck lenses (can be expensive)."
3841 #: ../src/guestfs-actions.pod:220 ../fish/guestfish-actions.pod:181
3842 msgid "C<AUG_NO_STDINC> = 8"
3846 #: ../src/guestfs-actions.pod:222 ../fish/guestfish-actions.pod:183
3847 msgid "Do not use standard load path for modules."
3851 #: ../src/guestfs-actions.pod:224 ../fish/guestfish-actions.pod:185
3852 msgid "C<AUG_SAVE_NOOP> = 16"
3856 #: ../src/guestfs-actions.pod:226 ../fish/guestfish-actions.pod:187
3857 msgid "Make save a no-op, just record what would have been changed."
3861 #: ../src/guestfs-actions.pod:228 ../fish/guestfish-actions.pod:189
3862 msgid "C<AUG_NO_LOAD> = 32"
3866 #: ../src/guestfs-actions.pod:230
3867 msgid "Do not load the tree in C<guestfs_aug_init>."
3871 #: ../src/guestfs-actions.pod:234
3872 msgid "To close the handle, you can call C<guestfs_aug_close>."
3876 #: ../src/guestfs-actions.pod:236 ../fish/guestfish-actions.pod:197
3877 msgid "To find out more about Augeas, see L<http://augeas.net/>."
3881 #: ../src/guestfs-actions.pod:240
3882 msgid "guestfs_aug_insert"
3886 #: ../src/guestfs-actions.pod:242
3889 " int guestfs_aug_insert (guestfs_h *g,\n"
3890 "\t\tconst char *augpath,\n"
3891 "\t\tconst char *label,\n"
3892 "\t\tint before);\n"
3897 #: ../src/guestfs-actions.pod:247 ../fish/guestfish-actions.pod:203
3899 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
3900 "or after C<path> (depending on the boolean flag C<before>)."
3904 #: ../src/guestfs-actions.pod:251 ../fish/guestfish-actions.pod:207
3906 "C<path> must match exactly one existing node in the tree, and C<label> must "
3907 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
3911 #: ../src/guestfs-actions.pod:257
3912 msgid "guestfs_aug_load"
3916 #: ../src/guestfs-actions.pod:259
3919 " int guestfs_aug_load (guestfs_h *g);\n"
3924 #: ../src/guestfs-actions.pod:261 ../fish/guestfish-actions.pod:215
3925 msgid "Load files into the tree."
3929 #: ../src/guestfs-actions.pod:263 ../fish/guestfish-actions.pod:217
3930 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
3934 #: ../src/guestfs-actions.pod:268
3935 msgid "guestfs_aug_ls"
3939 #: ../src/guestfs-actions.pod:270
3942 " char **guestfs_aug_ls (guestfs_h *g,\n"
3943 "\t\tconst char *augpath);\n"
3948 #: ../src/guestfs-actions.pod:273
3950 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
3951 "sorting the resulting nodes into alphabetical order."
3955 #: ../src/guestfs-actions.pod:276 ../src/guestfs-actions.pod:289 ../src/guestfs-actions.pod:417 ../src/guestfs-actions.pod:802 ../src/guestfs-actions.pod:1053 ../src/guestfs-actions.pod:1069 ../src/guestfs-actions.pod:1157 ../src/guestfs-actions.pod:1173 ../src/guestfs-actions.pod:1404 ../src/guestfs-actions.pod:1738 ../src/guestfs-actions.pod:1751 ../src/guestfs-actions.pod:1767 ../src/guestfs-actions.pod:1804 ../src/guestfs-actions.pod:1825 ../src/guestfs-actions.pod:1887 ../src/guestfs-actions.pod:1927 ../src/guestfs-actions.pod:2093 ../src/guestfs-actions.pod:2259 ../src/guestfs-actions.pod:2462 ../src/guestfs-actions.pod:2477 ../src/guestfs-actions.pod:2561 ../src/guestfs-actions.pod:2890 ../src/guestfs-actions.pod:3397 ../src/guestfs-actions.pod:3808 ../src/guestfs-actions.pod:3894 ../src/guestfs-actions.pod:4000 ../src/guestfs-actions.pod:4549 ../src/guestfs-actions.pod:4598 ../src/guestfs-actions.pod:4650 ../src/guestfs-actions.pod:4766 ../src/guestfs-actions.pod:4787 ../src/guestfs-actions.pod:5161 ../src/guestfs-actions.pod:5178 ../src/guestfs-actions.pod:5216 ../src/guestfs-actions.pod:5352 ../src/guestfs-actions.pod:5368 ../src/guestfs-actions.pod:5441 ../src/guestfs-actions.pod:5457 ../src/guestfs-actions.pod:5497 ../src/guestfs-actions.pod:5513
3957 "This function returns a NULL-terminated array of strings (like "
3958 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
3959 "strings and the array after use>."
3963 #: ../src/guestfs-actions.pod:280
3964 msgid "guestfs_aug_match"
3968 #: ../src/guestfs-actions.pod:282
3971 " char **guestfs_aug_match (guestfs_h *g,\n"
3972 "\t\tconst char *augpath);\n"
3977 #: ../src/guestfs-actions.pod:285 ../fish/guestfish-actions.pod:231
3979 "Returns a list of paths which match the path expression C<path>. The "
3980 "returned paths are sufficiently qualified so that they match exactly one "
3981 "node in the current tree."
3985 #: ../src/guestfs-actions.pod:293
3986 msgid "guestfs_aug_mv"
3990 #: ../src/guestfs-actions.pod:295
3993 " int guestfs_aug_mv (guestfs_h *g,\n"
3994 "\t\tconst char *src,\n"
3995 "\t\tconst char *dest);\n"
4000 #: ../src/guestfs-actions.pod:299 ../fish/guestfish-actions.pod:239
4002 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
4003 "C<dest> is overwritten if it exists."
4007 #: ../src/guestfs-actions.pod:304
4008 msgid "guestfs_aug_rm"
4012 #: ../src/guestfs-actions.pod:306
4015 " int guestfs_aug_rm (guestfs_h *g,\n"
4016 "\t\tconst char *augpath);\n"
4021 #: ../src/guestfs-actions.pod:309 ../fish/guestfish-actions.pod:246
4022 msgid "Remove C<path> and all of its children."
4026 #: ../src/guestfs-actions.pod:311 ../fish/guestfish-actions.pod:248
4027 msgid "On success this returns the number of entries which were removed."
4031 #: ../src/guestfs-actions.pod:315
4032 msgid "guestfs_aug_save"
4036 #: ../src/guestfs-actions.pod:317
4039 " int guestfs_aug_save (guestfs_h *g);\n"
4044 #: ../src/guestfs-actions.pod:319 ../fish/guestfish-actions.pod:254
4045 msgid "This writes all pending changes to disk."
4049 #: ../src/guestfs-actions.pod:321
4051 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
4056 #: ../src/guestfs-actions.pod:326
4057 msgid "guestfs_aug_set"
4061 #: ../src/guestfs-actions.pod:328
4064 " int guestfs_aug_set (guestfs_h *g,\n"
4065 "\t\tconst char *augpath,\n"
4066 "\t\tconst char *val);\n"
4071 #: ../src/guestfs-actions.pod:332 ../fish/guestfish-actions.pod:263
4072 msgid "Set the value associated with C<path> to C<val>."
4076 #: ../src/guestfs-actions.pod:334
4078 "In the Augeas API, it is possible to clear a node by setting the value to "
4079 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
4080 "this call. Instead you must use the C<guestfs_aug_clear> call."
4084 #: ../src/guestfs-actions.pod:341
4085 msgid "guestfs_available"
4089 #: ../src/guestfs-actions.pod:343
4092 " int guestfs_available (guestfs_h *g,\n"
4093 "\t\tchar *const *groups);\n"
4098 #: ../src/guestfs-actions.pod:346 ../fish/guestfish-actions.pod:274
4100 "This command is used to check the availability of some groups of "
4101 "functionality in the appliance, which not all builds of the libguestfs "
4102 "appliance will be able to provide."
4106 #: ../src/guestfs-actions.pod:350
4108 "The libguestfs groups, and the functions that those groups correspond to, "
4109 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
4110 "runtime by calling C<guestfs_available_all_groups>."
4114 #: ../src/guestfs-actions.pod:355 ../fish/guestfish-actions.pod:283
4116 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
4117 "\"augeas\"]> would check for the availability of the Linux inotify functions "
4118 "and Augeas (configuration file editing) functions."
4122 #: ../src/guestfs-actions.pod:360 ../fish/guestfish-actions.pod:288
4123 msgid "The command returns no error if I<all> requested groups are available."
4127 #: ../src/guestfs-actions.pod:362 ../fish/guestfish-actions.pod:290
4129 "It fails with an error if one or more of the requested groups is unavailable "
4134 #: ../src/guestfs-actions.pod:365 ../fish/guestfish-actions.pod:293
4136 "If an unknown group name is included in the list of groups then an error is "
4141 #: ../src/guestfs-actions.pod:368 ../fish/guestfish-actions.pod:296
4146 #: ../src/guestfs-actions.pod:374
4147 msgid "You must call C<guestfs_launch> before calling this function."
4151 #: ../src/guestfs-actions.pod:376 ../fish/guestfish-actions.pod:304
4153 "The reason is because we don't know what groups are supported by the "
4154 "appliance/daemon until it is running and can be queried."
4158 #: ../src/guestfs-actions.pod:382 ../fish/guestfish-actions.pod:310
4160 "If a group of functions is available, this does not necessarily mean that "
4161 "they will work. You still have to check for errors when calling individual "
4162 "API functions even if they are available."
4166 #: ../src/guestfs-actions.pod:389 ../fish/guestfish-actions.pod:317
4168 "It is usually the job of distro packagers to build complete functionality "
4169 "into the libguestfs appliance. Upstream libguestfs, if built from source "
4170 "with all requirements satisfied, will support everything."
4174 #: ../src/guestfs-actions.pod:396
4176 "This call was added in version C<1.0.80>. In previous versions of "
4177 "libguestfs all you could do would be to speculatively execute a command to "
4178 "find out if the daemon implemented it. See also C<guestfs_version>."
4182 #: ../src/guestfs-actions.pod:405
4183 msgid "guestfs_available_all_groups"
4187 #: ../src/guestfs-actions.pod:407
4190 " char **guestfs_available_all_groups (guestfs_h *g);\n"
4195 #: ../src/guestfs-actions.pod:409
4197 "This command returns a list of all optional groups that this daemon knows "
4198 "about. Note this returns both supported and unsupported groups. To find "
4199 "out which ones the daemon can actually support you have to call "
4200 "C<guestfs_available> on each member of the returned list."
4204 #: ../src/guestfs-actions.pod:415
4205 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
4209 #: ../src/guestfs-actions.pod:421
4210 msgid "guestfs_base64_in"
4214 #: ../src/guestfs-actions.pod:423
4217 " int guestfs_base64_in (guestfs_h *g,\n"
4218 "\t\tconst char *base64file,\n"
4219 "\t\tconst char *filename);\n"
4224 #: ../src/guestfs-actions.pod:427 ../fish/guestfish-actions.pod:347
4225 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
4229 #: ../src/guestfs-actions.pod:432
4230 msgid "guestfs_base64_out"
4234 #: ../src/guestfs-actions.pod:434
4237 " int guestfs_base64_out (guestfs_h *g,\n"
4238 "\t\tconst char *filename,\n"
4239 "\t\tconst char *base64file);\n"
4244 #: ../src/guestfs-actions.pod:438 ../fish/guestfish-actions.pod:356
4246 "This command downloads the contents of C<filename>, writing it out to local "
4247 "file C<base64file> encoded as base64."
4251 #: ../src/guestfs-actions.pod:443
4252 msgid "guestfs_blockdev_flushbufs"
4256 #: ../src/guestfs-actions.pod:445
4259 " int guestfs_blockdev_flushbufs (guestfs_h *g,\n"
4260 "\t\tconst char *device);\n"
4265 #: ../src/guestfs-actions.pod:448 ../fish/guestfish-actions.pod:365
4266 msgid "This tells the kernel to flush internal buffers associated with C<device>."
4270 #: ../src/guestfs-actions.pod:451 ../src/guestfs-actions.pod:465 ../src/guestfs-actions.pod:477 ../src/guestfs-actions.pod:490 ../src/guestfs-actions.pod:505 ../src/guestfs-actions.pod:521 ../src/guestfs-actions.pod:532 ../src/guestfs-actions.pod:547 ../src/guestfs-actions.pod:558 ../src/guestfs-actions.pod:569 ../fish/guestfish-actions.pod:368 ../fish/guestfish-actions.pod:379 ../fish/guestfish-actions.pod:388 ../fish/guestfish-actions.pod:398 ../fish/guestfish-actions.pod:410 ../fish/guestfish-actions.pod:423 ../fish/guestfish-actions.pod:431 ../fish/guestfish-actions.pod:442 ../fish/guestfish-actions.pod:450 ../fish/guestfish-actions.pod:458
4271 msgid "This uses the L<blockdev(8)> command."
4275 #: ../src/guestfs-actions.pod:455
4276 msgid "guestfs_blockdev_getbsz"
4280 #: ../src/guestfs-actions.pod:457
4283 " int guestfs_blockdev_getbsz (guestfs_h *g,\n"
4284 "\t\tconst char *device);\n"
4289 #: ../src/guestfs-actions.pod:460 ../fish/guestfish-actions.pod:374
4290 msgid "This returns the block size of a device."
4294 #: ../src/guestfs-actions.pod:462 ../src/guestfs-actions.pod:544 ../fish/guestfish-actions.pod:376 ../fish/guestfish-actions.pod:439
4296 "(Note this is different from both I<size in blocks> and I<filesystem block "
4301 #: ../src/guestfs-actions.pod:469
4302 msgid "guestfs_blockdev_getro"
4306 #: ../src/guestfs-actions.pod:471
4309 " int guestfs_blockdev_getro (guestfs_h *g,\n"
4310 "\t\tconst char *device);\n"
4315 #: ../src/guestfs-actions.pod:474 ../fish/guestfish-actions.pod:385
4317 "Returns a boolean indicating if the block device is read-only (true if "
4318 "read-only, false if not)."
4322 #: ../src/guestfs-actions.pod:479 ../src/guestfs-actions.pod:1087 ../src/guestfs-actions.pod:1099 ../src/guestfs-actions.pod:1531 ../src/guestfs-actions.pod:1539 ../src/guestfs-actions.pod:1599 ../src/guestfs-actions.pod:1642 ../src/guestfs-actions.pod:1654 ../src/guestfs-actions.pod:1673 ../src/guestfs-actions.pod:1690 ../src/guestfs-actions.pod:2273 ../src/guestfs-actions.pod:2284 ../src/guestfs-actions.pod:2296 ../src/guestfs-actions.pod:2307 ../src/guestfs-actions.pod:2320 ../src/guestfs-actions.pod:2332 ../src/guestfs-actions.pod:2345 ../src/guestfs-actions.pod:2356 ../src/guestfs-actions.pod:2366 ../src/guestfs-actions.pod:2377 ../src/guestfs-actions.pod:2389 ../src/guestfs-actions.pod:2401 ../src/guestfs-actions.pod:3522
4323 msgid "This function returns a C truth value on success or -1 on error."
4327 #: ../src/guestfs-actions.pod:481
4328 msgid "guestfs_blockdev_getsize64"
4332 #: ../src/guestfs-actions.pod:483
4335 " int64_t guestfs_blockdev_getsize64 (guestfs_h *g,\n"
4336 "\t\tconst char *device);\n"
4341 #: ../src/guestfs-actions.pod:486 ../fish/guestfish-actions.pod:394
4342 msgid "This returns the size of the device in bytes."
4346 #: ../src/guestfs-actions.pod:488
4347 msgid "See also C<guestfs_blockdev_getsz>."
4351 #: ../src/guestfs-actions.pod:494
4352 msgid "guestfs_blockdev_getss"
4356 #: ../src/guestfs-actions.pod:496
4359 " int guestfs_blockdev_getss (guestfs_h *g,\n"
4360 "\t\tconst char *device);\n"
4365 #: ../src/guestfs-actions.pod:499 ../fish/guestfish-actions.pod:404
4367 "This returns the size of sectors on a block device. Usually 512, but can be "
4368 "larger for modern devices."
4372 #: ../src/guestfs-actions.pod:502
4374 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
4379 #: ../src/guestfs-actions.pod:509
4380 msgid "guestfs_blockdev_getsz"
4384 #: ../src/guestfs-actions.pod:511
4387 " int64_t guestfs_blockdev_getsz (guestfs_h *g,\n"
4388 "\t\tconst char *device);\n"
4393 #: ../src/guestfs-actions.pod:514 ../fish/guestfish-actions.pod:416
4395 "This returns the size of the device in units of 512-byte sectors (even if "
4396 "the sectorsize isn't 512 bytes ... weird)."
4400 #: ../src/guestfs-actions.pod:517
4402 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
4403 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
4407 #: ../src/guestfs-actions.pod:525
4408 msgid "guestfs_blockdev_rereadpt"
4412 #: ../src/guestfs-actions.pod:527
4415 " int guestfs_blockdev_rereadpt (guestfs_h *g,\n"
4416 "\t\tconst char *device);\n"
4421 #: ../src/guestfs-actions.pod:530 ../fish/guestfish-actions.pod:429
4422 msgid "Reread the partition table on C<device>."
4426 #: ../src/guestfs-actions.pod:536
4427 msgid "guestfs_blockdev_setbsz"
4431 #: ../src/guestfs-actions.pod:538
4434 " int guestfs_blockdev_setbsz (guestfs_h *g,\n"
4435 "\t\tconst char *device,\n"
4436 "\t\tint blocksize);\n"
4441 #: ../src/guestfs-actions.pod:542 ../fish/guestfish-actions.pod:437
4442 msgid "This sets the block size of a device."
4446 #: ../src/guestfs-actions.pod:551
4447 msgid "guestfs_blockdev_setro"
4451 #: ../src/guestfs-actions.pod:553
4454 " int guestfs_blockdev_setro (guestfs_h *g,\n"
4455 "\t\tconst char *device);\n"
4460 #: ../src/guestfs-actions.pod:556 ../fish/guestfish-actions.pod:448
4461 msgid "Sets the block device named C<device> to read-only."
4465 #: ../src/guestfs-actions.pod:562
4466 msgid "guestfs_blockdev_setrw"
4470 #: ../src/guestfs-actions.pod:564
4473 " int guestfs_blockdev_setrw (guestfs_h *g,\n"
4474 "\t\tconst char *device);\n"
4479 #: ../src/guestfs-actions.pod:567 ../fish/guestfish-actions.pod:456
4480 msgid "Sets the block device named C<device> to read-write."
4484 #: ../src/guestfs-actions.pod:573
4485 msgid "guestfs_case_sensitive_path"
4489 #: ../src/guestfs-actions.pod:575
4492 " char *guestfs_case_sensitive_path (guestfs_h *g,\n"
4493 "\t\tconst char *path);\n"
4498 #: ../src/guestfs-actions.pod:578 ../fish/guestfish-actions.pod:464
4500 "This can be used to resolve case insensitive paths on a filesystem which is "
4501 "case sensitive. The use case is to resolve paths which you have read from "
4502 "Windows configuration files or the Windows Registry, to the true path."
4506 #: ../src/guestfs-actions.pod:583 ../fish/guestfish-actions.pod:469
4508 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
4509 "(and probably others), which is that although the underlying filesystem is "
4510 "case-insensitive, the driver exports the filesystem to Linux as "
4515 #: ../src/guestfs-actions.pod:588 ../fish/guestfish-actions.pod:474
4517 "One consequence of this is that special directories such as C<c:\\windows> "
4518 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
4519 "precise details of how they were created. In Windows itself this would not "
4524 #: ../src/guestfs-actions.pod:594 ../fish/guestfish-actions.pod:480
4526 "Bug or feature? You decide: "
4527 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
4531 #: ../src/guestfs-actions.pod:597 ../fish/guestfish-actions.pod:483
4533 "This function resolves the true case of each element in the path and returns "
4534 "the case-sensitive path."
4538 #: ../src/guestfs-actions.pod:600
4540 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
4541 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
4542 "how the directories were originally created under Windows)."
4546 #: ../src/guestfs-actions.pod:605 ../fish/guestfish-actions.pod:491
4547 msgid "I<Note>: This function does not handle drive names, backslashes etc."
4551 #: ../src/guestfs-actions.pod:608
4552 msgid "See also C<guestfs_realpath>."
4556 #: ../src/guestfs-actions.pod:613
4561 #: ../src/guestfs-actions.pod:615
4564 " char *guestfs_cat (guestfs_h *g,\n"
4565 "\t\tconst char *path);\n"
4570 #: ../src/guestfs-actions.pod:618 ../src/guestfs-actions.pod:3884 ../fish/guestfish-actions.pod:500 ../fish/guestfish-actions.pod:2989
4571 msgid "Return the contents of the file named C<path>."
4575 #: ../src/guestfs-actions.pod:620
4577 "Note that this function cannot correctly handle binary files (specifically, "
4578 "files containing C<\\0> character which is treated as end of string). For "
4579 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
4580 "functions which have a more complex interface."
4584 #: ../src/guestfs-actions.pod:628 ../src/guestfs-actions.pod:789 ../src/guestfs-actions.pod:806 ../src/guestfs-actions.pod:1057 ../src/guestfs-actions.pod:1073 ../src/guestfs-actions.pod:1161 ../src/guestfs-actions.pod:1177 ../src/guestfs-actions.pod:1408 ../src/guestfs-actions.pod:1755 ../src/guestfs-actions.pod:1771 ../src/guestfs-actions.pod:1808 ../src/guestfs-actions.pod:1829 ../src/guestfs-actions.pod:1843 ../src/guestfs-actions.pod:1869 ../src/guestfs-actions.pod:3747 ../src/guestfs-actions.pod:3855 ../src/guestfs-actions.pod:3876 ../src/guestfs-actions.pod:4602 ../src/guestfs-actions.pod:4654 ../src/guestfs-actions.pod:4770 ../src/guestfs-actions.pod:4791 ../src/guestfs-actions.pod:5310 ../src/guestfs-actions.pod:5333 ../src/guestfs-actions.pod:5356 ../src/guestfs-actions.pod:5372 ../src/guestfs-actions.pod:5445 ../src/guestfs-actions.pod:5461 ../src/guestfs-actions.pod:5501 ../src/guestfs-actions.pod:5517 ../fish/guestfish-actions.pod:507 ../fish/guestfish-actions.pod:642 ../fish/guestfish-actions.pod:654 ../fish/guestfish-actions.pod:836 ../fish/guestfish-actions.pod:846 ../fish/guestfish-actions.pod:913 ../fish/guestfish-actions.pod:923 ../fish/guestfish-actions.pod:1118 ../fish/guestfish-actions.pod:1391 ../fish/guestfish-actions.pod:1401 ../fish/guestfish-actions.pod:1429 ../fish/guestfish-actions.pod:1444 ../fish/guestfish-actions.pod:1454 ../fish/guestfish-actions.pod:1473 ../fish/guestfish-actions.pod:2891 ../fish/guestfish-actions.pod:2967 ../fish/guestfish-actions.pod:2982 ../fish/guestfish-actions.pod:3543 ../fish/guestfish-actions.pod:3589 ../fish/guestfish-actions.pod:3674 ../fish/guestfish-actions.pod:3689 ../fish/guestfish-actions.pod:4072 ../fish/guestfish-actions.pod:4090 ../fish/guestfish-actions.pod:4107 ../fish/guestfish-actions.pod:4117 ../fish/guestfish-actions.pod:4165 ../fish/guestfish-actions.pod:4175 ../fish/guestfish-actions.pod:4204 ../fish/guestfish-actions.pod:4214
4586 "Because of the message protocol, there is a transfer limit of somewhere "
4587 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
4591 #: ../src/guestfs-actions.pod:631
4592 msgid "guestfs_checksum"
4596 #: ../src/guestfs-actions.pod:633
4599 " char *guestfs_checksum (guestfs_h *g,\n"
4600 "\t\tconst char *csumtype,\n"
4601 "\t\tconst char *path);\n"
4606 #: ../src/guestfs-actions.pod:637 ../fish/guestfish-actions.pod:514
4607 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
4611 #: ../src/guestfs-actions.pod:640 ../fish/guestfish-actions.pod:517
4613 "The type of checksum to compute is given by the C<csumtype> parameter which "
4614 "must have one of the following values:"
4618 #: ../src/guestfs-actions.pod:645 ../fish/guestfish-actions.pod:522
4623 #: ../src/guestfs-actions.pod:647 ../fish/guestfish-actions.pod:524
4625 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
4630 #: ../src/guestfs-actions.pod:650 ../fish/guestfish-actions.pod:527
4635 #: ../src/guestfs-actions.pod:652 ../fish/guestfish-actions.pod:529
4636 msgid "Compute the MD5 hash (using the C<md5sum> program)."
4640 #: ../src/guestfs-actions.pod:654 ../fish/guestfish-actions.pod:531
4645 #: ../src/guestfs-actions.pod:656 ../fish/guestfish-actions.pod:533
4646 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
4650 #: ../src/guestfs-actions.pod:658 ../fish/guestfish-actions.pod:535
4655 #: ../src/guestfs-actions.pod:660 ../fish/guestfish-actions.pod:537
4656 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
4660 #: ../src/guestfs-actions.pod:662 ../fish/guestfish-actions.pod:539
4665 #: ../src/guestfs-actions.pod:664 ../fish/guestfish-actions.pod:541
4666 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
4670 #: ../src/guestfs-actions.pod:666 ../fish/guestfish-actions.pod:543
4675 #: ../src/guestfs-actions.pod:668 ../fish/guestfish-actions.pod:545
4676 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
4680 #: ../src/guestfs-actions.pod:670 ../fish/guestfish-actions.pod:547
4685 #: ../src/guestfs-actions.pod:672 ../fish/guestfish-actions.pod:549
4686 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
4690 #: ../src/guestfs-actions.pod:676 ../fish/guestfish-actions.pod:553
4691 msgid "The checksum is returned as a printable string."
4695 #: ../src/guestfs-actions.pod:678
4696 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
4700 #: ../src/guestfs-actions.pod:680
4701 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
4705 #: ../src/guestfs-actions.pod:685
4706 msgid "guestfs_checksum_device"
4710 #: ../src/guestfs-actions.pod:687
4713 " char *guestfs_checksum_device (guestfs_h *g,\n"
4714 "\t\tconst char *csumtype,\n"
4715 "\t\tconst char *device);\n"
4720 #: ../src/guestfs-actions.pod:691
4722 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
4723 "device named C<device>. For the types of checksums supported see the "
4724 "C<guestfs_checksum> command."
4728 #: ../src/guestfs-actions.pod:698
4729 msgid "guestfs_checksums_out"
4733 #: ../src/guestfs-actions.pod:700
4736 " int guestfs_checksums_out (guestfs_h *g,\n"
4737 "\t\tconst char *csumtype,\n"
4738 "\t\tconst char *directory,\n"
4739 "\t\tconst char *sumsfile);\n"
4744 #: ../src/guestfs-actions.pod:705 ../fish/guestfish-actions.pod:571
4746 "This command computes the checksums of all regular files in C<directory> and "
4747 "then emits a list of those checksums to the local output file C<sumsfile>."
4751 #: ../src/guestfs-actions.pod:709 ../fish/guestfish-actions.pod:575
4753 "This can be used for verifying the integrity of a virtual machine. However "
4754 "to be properly secure you should pay attention to the output of the checksum "
4755 "command (it uses the ones from GNU coreutils). In particular when the "
4756 "filename is not printable, coreutils uses a special backslash syntax. For "
4757 "more information, see the GNU coreutils info file."
4761 #: ../src/guestfs-actions.pod:719
4762 msgid "guestfs_chmod"
4766 #: ../src/guestfs-actions.pod:721
4769 " int guestfs_chmod (guestfs_h *g,\n"
4771 "\t\tconst char *path);\n"
4776 #: ../src/guestfs-actions.pod:725 ../fish/guestfish-actions.pod:589
4778 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
4783 #: ../src/guestfs-actions.pod:728 ../fish/guestfish-actions.pod:592
4785 "I<Note>: When using this command from guestfish, C<mode> by default would be "
4786 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
4791 #: ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:3105 ../src/guestfs-actions.pod:3193 ../src/guestfs-actions.pod:3209 ../src/guestfs-actions.pod:3225 ../fish/guestfish-actions.pod:596 ../fish/guestfish-actions.pod:2407 ../fish/guestfish-actions.pod:2477 ../fish/guestfish-actions.pod:2487 ../fish/guestfish-actions.pod:2497
4792 msgid "The mode actually set is affected by the umask."
4796 #: ../src/guestfs-actions.pod:736
4797 msgid "guestfs_chown"
4801 #: ../src/guestfs-actions.pod:738
4804 " int guestfs_chown (guestfs_h *g,\n"
4807 "\t\tconst char *path);\n"
4812 #: ../src/guestfs-actions.pod:743 ../fish/guestfish-actions.pod:602
4813 msgid "Change the file owner to C<owner> and group to C<group>."
4817 #: ../src/guestfs-actions.pod:745 ../src/guestfs-actions.pod:2434 ../fish/guestfish-actions.pod:604 ../fish/guestfish-actions.pod:1935
4819 "Only numeric uid and gid are supported. If you want to use names, you will "
4820 "need to locate and parse the password file yourself (Augeas support makes "
4821 "this relatively easy)."
4825 #: ../src/guestfs-actions.pod:751
4826 msgid "guestfs_command"
4830 #: ../src/guestfs-actions.pod:753
4833 " char *guestfs_command (guestfs_h *g,\n"
4834 "\t\tchar *const *arguments);\n"
4839 #: ../src/guestfs-actions.pod:756 ../fish/guestfish-actions.pod:612
4841 "This call runs a command from the guest filesystem. The filesystem must be "
4842 "mounted, and must contain a compatible operating system (ie. something "
4843 "Linux, with the same or compatible processor architecture)."
4847 #: ../src/guestfs-actions.pod:761
4849 "The single parameter is an argv-style list of arguments. The first element "
4850 "is the name of the program to run. Subsequent elements are parameters. The "
4851 "list must be non-empty (ie. must contain a program name). Note that the "
4852 "command runs directly, and is I<not> invoked via the shell (see "
4857 #: ../src/guestfs-actions.pod:768 ../fish/guestfish-actions.pod:624
4858 msgid "The return value is anything printed to I<stdout> by the command."
4862 #: ../src/guestfs-actions.pod:771 ../fish/guestfish-actions.pod:627
4864 "If the command returns a non-zero exit status, then this function returns an "
4865 "error message. The error message string is the content of I<stderr> from "
4870 #: ../src/guestfs-actions.pod:775 ../fish/guestfish-actions.pod:631
4872 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
4873 "C</bin>. If you require a program from another location, you should provide "
4874 "the full path in the first parameter."
4878 #: ../src/guestfs-actions.pod:780 ../fish/guestfish-actions.pod:636
4880 "Shared libraries and data files required by the program must be available on "
4881 "filesystems which are mounted in the correct places. It is the caller's "
4882 "responsibility to ensure all filesystems that are needed are mounted at the "
4887 #: ../src/guestfs-actions.pod:792
4888 msgid "guestfs_command_lines"
4892 #: ../src/guestfs-actions.pod:794
4895 " char **guestfs_command_lines (guestfs_h *g,\n"
4896 "\t\tchar *const *arguments);\n"
4901 #: ../src/guestfs-actions.pod:797
4903 "This is the same as C<guestfs_command>, but splits the result into a list of "
4908 #: ../src/guestfs-actions.pod:800
4909 msgid "See also: C<guestfs_sh_lines>"
4913 #: ../src/guestfs-actions.pod:809
4914 msgid "guestfs_config"
4918 #: ../src/guestfs-actions.pod:811
4921 " int guestfs_config (guestfs_h *g,\n"
4922 "\t\tconst char *qemuparam,\n"
4923 "\t\tconst char *qemuvalue);\n"
4928 #: ../src/guestfs-actions.pod:815 ../fish/guestfish-actions.pod:661
4930 "This can be used to add arbitrary qemu command line parameters of the form "
4931 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
4932 "setting some parameters which would interfere with parameters that we use."
4936 #: ../src/guestfs-actions.pod:820 ../fish/guestfish-actions.pod:666
4937 msgid "The first character of C<param> string must be a C<-> (dash)."
4941 #: ../src/guestfs-actions.pod:822 ../fish/guestfish-actions.pod:668
4942 msgid "C<value> can be NULL."
4946 #: ../src/guestfs-actions.pod:826
4947 msgid "guestfs_copy_size"
4951 #: ../src/guestfs-actions.pod:828
4954 " int guestfs_copy_size (guestfs_h *g,\n"
4955 "\t\tconst char *src,\n"
4956 "\t\tconst char *dest,\n"
4957 "\t\tint64_t size);\n"
4962 #: ../src/guestfs-actions.pod:833 ../fish/guestfish-actions.pod:674
4964 "This command copies exactly C<size> bytes from one source device or file "
4965 "C<src> to another destination device or file C<dest>."
4969 #: ../src/guestfs-actions.pod:836 ../fish/guestfish-actions.pod:677
4971 "Note this will fail if the source is too short or if the destination is not "
4976 #: ../src/guestfs-actions.pod:841 ../src/guestfs-actions.pod:976 ../src/guestfs-actions.pod:1348 ../src/guestfs-actions.pod:1367 ../src/guestfs-actions.pod:5390 ../src/guestfs-actions.pod:5406
4978 "This long-running command can generate progress notification messages so "
4979 "that the caller can display a progress bar or indicator. To receive these "
4980 "messages, the caller must register a progress callback. See "
4981 "L<guestfs(3)/guestfs_set_progress_callback>."
4985 #: ../src/guestfs-actions.pod:846
4990 #: ../src/guestfs-actions.pod:848
4993 " int guestfs_cp (guestfs_h *g,\n"
4994 "\t\tconst char *src,\n"
4995 "\t\tconst char *dest);\n"
5000 #: ../src/guestfs-actions.pod:852 ../fish/guestfish-actions.pod:684
5002 "This copies a file from C<src> to C<dest> where C<dest> is either a "
5003 "destination filename or destination directory."
5007 #: ../src/guestfs-actions.pod:857
5008 msgid "guestfs_cp_a"
5012 #: ../src/guestfs-actions.pod:859
5015 " int guestfs_cp_a (guestfs_h *g,\n"
5016 "\t\tconst char *src,\n"
5017 "\t\tconst char *dest);\n"
5022 #: ../src/guestfs-actions.pod:863 ../fish/guestfish-actions.pod:691
5024 "This copies a file or directory from C<src> to C<dest> recursively using the "
5029 #: ../src/guestfs-actions.pod:868
5034 #: ../src/guestfs-actions.pod:870
5037 " int guestfs_dd (guestfs_h *g,\n"
5038 "\t\tconst char *src,\n"
5039 "\t\tconst char *dest);\n"
5044 #: ../src/guestfs-actions.pod:874 ../fish/guestfish-actions.pod:698
5046 "This command copies from one source device or file C<src> to another "
5047 "destination device or file C<dest>. Normally you would use this to copy to "
5048 "or from a device or partition, for example to duplicate a filesystem."
5052 #: ../src/guestfs-actions.pod:879
5054 "If the destination is a device, it must be as large or larger than the "
5055 "source file or device, otherwise the copy will fail. This command cannot do "
5056 "partial copies (see C<guestfs_copy_size>)."
5060 #: ../src/guestfs-actions.pod:885
5061 msgid "guestfs_debug"
5065 #: ../src/guestfs-actions.pod:887
5068 " char *guestfs_debug (guestfs_h *g,\n"
5069 "\t\tconst char *subcmd,\n"
5070 "\t\tchar *const *extraargs);\n"
5075 #: ../src/guestfs-actions.pod:891
5077 "The C<guestfs_debug> command exposes some internals of C<guestfsd> (the "
5078 "guestfs daemon) that runs inside the qemu subprocess."
5082 #: ../src/guestfs-actions.pod:895 ../fish/guestfish-actions.pod:715
5084 "There is no comprehensive help for this command. You have to look at the "
5085 "file C<daemon/debug.c> in the libguestfs source to find out what you can do."
5089 #: ../src/guestfs-actions.pod:902
5090 msgid "guestfs_debug_upload"
5094 #: ../src/guestfs-actions.pod:904
5097 " int guestfs_debug_upload (guestfs_h *g,\n"
5098 "\t\tconst char *filename,\n"
5099 "\t\tconst char *tmpname,\n"
5105 #: ../src/guestfs-actions.pod:909
5107 "The C<guestfs_debug_upload> command uploads a file to the libguestfs "
5112 #: ../src/guestfs-actions.pod:912 ../fish/guestfish-actions.pod:726
5114 "There is no comprehensive help for this command. You have to look at the "
5115 "file C<daemon/debug.c> in the libguestfs source to find out what it is for."
5119 #: ../src/guestfs-actions.pod:918
5124 #: ../src/guestfs-actions.pod:920
5127 " char *guestfs_df (guestfs_h *g);\n"
5132 #: ../src/guestfs-actions.pod:922 ../fish/guestfish-actions.pod:736
5133 msgid "This command runs the C<df> command to report disk space used."
5137 #: ../src/guestfs-actions.pod:924 ../src/guestfs-actions.pod:938 ../fish/guestfish-actions.pod:738 ../fish/guestfish-actions.pod:749
5139 "This command is mostly useful for interactive sessions. It is I<not> "
5140 "intended that you try to parse the output string. Use C<statvfs> from "
5145 #: ../src/guestfs-actions.pod:931
5146 msgid "guestfs_df_h"
5150 #: ../src/guestfs-actions.pod:933
5153 " char *guestfs_df_h (guestfs_h *g);\n"
5158 #: ../src/guestfs-actions.pod:935 ../fish/guestfish-actions.pod:746
5160 "This command runs the C<df -h> command to report disk space used in "
5161 "human-readable format."
5165 #: ../src/guestfs-actions.pod:945
5166 msgid "guestfs_dmesg"
5170 #: ../src/guestfs-actions.pod:947
5173 " char *guestfs_dmesg (guestfs_h *g);\n"
5178 #: ../src/guestfs-actions.pod:949 ../fish/guestfish-actions.pod:757
5180 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
5181 "This is sometimes useful for extended debugging of problems."
5185 #: ../src/guestfs-actions.pod:953
5187 "Another way to get the same information is to enable verbose messages with "
5188 "C<guestfs_set_verbose> or by setting the environment variable "
5189 "C<LIBGUESTFS_DEBUG=1> before running the program."
5193 #: ../src/guestfs-actions.pod:961
5194 msgid "guestfs_download"
5198 #: ../src/guestfs-actions.pod:963
5201 " int guestfs_download (guestfs_h *g,\n"
5202 "\t\tconst char *remotefilename,\n"
5203 "\t\tconst char *filename);\n"
5208 #: ../src/guestfs-actions.pod:967 ../fish/guestfish-actions.pod:770
5210 "Download file C<remotefilename> and save it as C<filename> on the local "
5215 #: ../src/guestfs-actions.pod:970 ../src/guestfs-actions.pod:4984 ../fish/guestfish-actions.pod:773 ../fish/guestfish-actions.pod:3843
5216 msgid "C<filename> can also be a named pipe."
5220 #: ../src/guestfs-actions.pod:972
5221 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
5225 #: ../src/guestfs-actions.pod:981
5226 msgid "guestfs_drop_caches"
5230 #: ../src/guestfs-actions.pod:983
5233 " int guestfs_drop_caches (guestfs_h *g,\n"
5234 "\t\tint whattodrop);\n"
5239 #: ../src/guestfs-actions.pod:986 ../fish/guestfish-actions.pod:783
5241 "This instructs the guest kernel to drop its page cache, and/or dentries and "
5242 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
5243 "to drop, see L<http://linux-mm.org/Drop_Caches>"
5247 #: ../src/guestfs-actions.pod:991 ../fish/guestfish-actions.pod:788
5248 msgid "Setting C<whattodrop> to 3 should drop everything."
5252 #: ../src/guestfs-actions.pod:993 ../fish/guestfish-actions.pod:790
5254 "This automatically calls L<sync(2)> before the operation, so that the "
5255 "maximum guest memory is freed."
5259 #: ../src/guestfs-actions.pod:998
5264 #: ../src/guestfs-actions.pod:1000
5267 " int64_t guestfs_du (guestfs_h *g,\n"
5268 "\t\tconst char *path);\n"
5273 #: ../src/guestfs-actions.pod:1003 ../fish/guestfish-actions.pod:797
5275 "This command runs the C<du -s> command to estimate file space usage for "
5280 #: ../src/guestfs-actions.pod:1006 ../fish/guestfish-actions.pod:800
5282 "C<path> can be a file or a directory. If C<path> is a directory then the "
5283 "estimate includes the contents of the directory and all subdirectories "
5288 #: ../src/guestfs-actions.pod:1010 ../fish/guestfish-actions.pod:804
5289 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
5293 #: ../src/guestfs-actions.pod:1015
5294 msgid "guestfs_e2fsck_f"
5298 #: ../src/guestfs-actions.pod:1017
5301 " int guestfs_e2fsck_f (guestfs_h *g,\n"
5302 "\t\tconst char *device);\n"
5307 #: ../src/guestfs-actions.pod:1020 ../fish/guestfish-actions.pod:811
5309 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
5310 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
5315 #: ../src/guestfs-actions.pod:1024
5317 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
5318 "Normally you should use C<guestfs_fsck>."
5322 #: ../src/guestfs-actions.pod:1029
5323 msgid "guestfs_echo_daemon"
5327 #: ../src/guestfs-actions.pod:1031
5330 " char *guestfs_echo_daemon (guestfs_h *g,\n"
5331 "\t\tchar *const *words);\n"
5336 #: ../src/guestfs-actions.pod:1034 ../fish/guestfish-actions.pod:822
5338 "This command concatenates the list of C<words> passed with single spaces "
5339 "between them and returns the resulting string."
5343 #: ../src/guestfs-actions.pod:1037 ../fish/guestfish-actions.pod:825
5344 msgid "You can use this command to test the connection through to the daemon."
5348 #: ../src/guestfs-actions.pod:1039
5349 msgid "See also C<guestfs_ping_daemon>."
5353 #: ../src/guestfs-actions.pod:1044
5354 msgid "guestfs_egrep"
5358 #: ../src/guestfs-actions.pod:1046
5361 " char **guestfs_egrep (guestfs_h *g,\n"
5362 "\t\tconst char *regex,\n"
5363 "\t\tconst char *path);\n"
5368 #: ../src/guestfs-actions.pod:1050 ../fish/guestfish-actions.pod:833
5369 msgid "This calls the external C<egrep> program and returns the matching lines."
5373 #: ../src/guestfs-actions.pod:1060
5374 msgid "guestfs_egrepi"
5378 #: ../src/guestfs-actions.pod:1062
5381 " char **guestfs_egrepi (guestfs_h *g,\n"
5382 "\t\tconst char *regex,\n"
5383 "\t\tconst char *path);\n"
5388 #: ../src/guestfs-actions.pod:1066 ../fish/guestfish-actions.pod:843
5389 msgid "This calls the external C<egrep -i> program and returns the matching lines."
5393 #: ../src/guestfs-actions.pod:1076
5394 msgid "guestfs_equal"
5398 #: ../src/guestfs-actions.pod:1078
5401 " int guestfs_equal (guestfs_h *g,\n"
5402 "\t\tconst char *file1,\n"
5403 "\t\tconst char *file2);\n"
5408 #: ../src/guestfs-actions.pod:1082 ../fish/guestfish-actions.pod:853
5410 "This compares the two files C<file1> and C<file2> and returns true if their "
5411 "content is exactly equal, or false otherwise."
5415 #: ../src/guestfs-actions.pod:1085 ../fish/guestfish-actions.pod:856
5416 msgid "The external L<cmp(1)> program is used for the comparison."
5420 #: ../src/guestfs-actions.pod:1089
5421 msgid "guestfs_exists"
5425 #: ../src/guestfs-actions.pod:1091
5428 " int guestfs_exists (guestfs_h *g,\n"
5429 "\t\tconst char *path);\n"
5434 #: ../src/guestfs-actions.pod:1094 ../fish/guestfish-actions.pod:862
5436 "This returns C<true> if and only if there is a file, directory (or anything) "
5437 "with the given C<path> name."
5441 #: ../src/guestfs-actions.pod:1097
5442 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
5446 #: ../src/guestfs-actions.pod:1101
5447 msgid "guestfs_fallocate"
5451 #: ../src/guestfs-actions.pod:1103
5454 " int guestfs_fallocate (guestfs_h *g,\n"
5455 "\t\tconst char *path,\n"
5461 #: ../src/guestfs-actions.pod:1107 ../src/guestfs-actions.pod:1130 ../fish/guestfish-actions.pod:871 ../fish/guestfish-actions.pod:890
5463 "This command preallocates a file (containing zero bytes) named C<path> of "
5464 "size C<len> bytes. If the file exists already, it is overwritten."
5468 #: ../src/guestfs-actions.pod:1111 ../fish/guestfish-actions.pod:875
5470 "Do not confuse this with the guestfish-specific C<alloc> command which "
5471 "allocates a file in the host and attaches it as a device."
5475 #: ../src/guestfs-actions.pod:1117 ../fish/guestfish-actions.pod:879
5477 "This function is deprecated. In new code, use the C<fallocate64> call "
5482 #: ../src/guestfs-actions.pod:1120 ../src/guestfs-actions.pod:1555 ../src/guestfs-actions.pod:1573 ../src/guestfs-actions.pod:5339 ../src/guestfs-actions.pod:5484 ../fish/guestfish-actions.pod:882 ../fish/guestfish-actions.pod:1239 ../fish/guestfish-actions.pod:1253 ../fish/guestfish-actions.pod:4096 ../fish/guestfish-actions.pod:4193
5484 "Deprecated functions will not be removed from the API, but the fact that "
5485 "they are deprecated indicates that there are problems with correct use of "
5490 #: ../src/guestfs-actions.pod:1124
5491 msgid "guestfs_fallocate64"
5495 #: ../src/guestfs-actions.pod:1126
5498 " int guestfs_fallocate64 (guestfs_h *g,\n"
5499 "\t\tconst char *path,\n"
5500 "\t\tint64_t len);\n"
5505 #: ../src/guestfs-actions.pod:1134
5507 "Note that this call allocates disk blocks for the file. To create a sparse "
5508 "file use C<guestfs_truncate_size> instead."
5512 #: ../src/guestfs-actions.pod:1137
5514 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
5515 "oversight it only allowed 30 bit lengths to be specified, effectively "
5516 "limiting the maximum size of files created through that call to 1GB."
5520 #: ../src/guestfs-actions.pod:1142 ../fish/guestfish-actions.pod:902
5522 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
5523 "commands which create a file in the host and attach it as a device."
5527 #: ../src/guestfs-actions.pod:1148
5528 msgid "guestfs_fgrep"
5532 #: ../src/guestfs-actions.pod:1150
5535 " char **guestfs_fgrep (guestfs_h *g,\n"
5536 "\t\tconst char *pattern,\n"
5537 "\t\tconst char *path);\n"
5542 #: ../src/guestfs-actions.pod:1154 ../fish/guestfish-actions.pod:910
5543 msgid "This calls the external C<fgrep> program and returns the matching lines."
5547 #: ../src/guestfs-actions.pod:1164
5548 msgid "guestfs_fgrepi"
5552 #: ../src/guestfs-actions.pod:1166
5555 " char **guestfs_fgrepi (guestfs_h *g,\n"
5556 "\t\tconst char *pattern,\n"
5557 "\t\tconst char *path);\n"
5562 #: ../src/guestfs-actions.pod:1170 ../fish/guestfish-actions.pod:920
5563 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
5567 #: ../src/guestfs-actions.pod:1180
5568 msgid "guestfs_file"
5572 #: ../src/guestfs-actions.pod:1182
5575 " char *guestfs_file (guestfs_h *g,\n"
5576 "\t\tconst char *path);\n"
5581 #: ../src/guestfs-actions.pod:1185 ../fish/guestfish-actions.pod:930
5583 "This call uses the standard L<file(1)> command to determine the type or "
5584 "contents of the file."
5588 #: ../src/guestfs-actions.pod:1188 ../fish/guestfish-actions.pod:933
5590 "This call will also transparently look inside various types of compressed "
5595 #: ../src/guestfs-actions.pod:1191 ../fish/guestfish-actions.pod:936
5597 "The exact command which runs is C<file -zb path>. Note in particular that "
5598 "the filename is not prepended to the output (the C<-b> option)."
5602 #: ../src/guestfs-actions.pod:1195
5604 "This command can also be used on C</dev/> devices (and partitions, LV "
5605 "names). You can for example use this to determine if a device contains a "
5606 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
5610 #: ../src/guestfs-actions.pod:1200 ../fish/guestfish-actions.pod:945
5612 "If the C<path> does not begin with C</dev/> then this command only works for "
5613 "the content of regular files. For other file types (directory, symbolic "
5614 "link etc) it will just return the string C<directory> etc."
5618 #: ../src/guestfs-actions.pod:1208
5619 msgid "guestfs_file_architecture"
5623 #: ../src/guestfs-actions.pod:1210
5626 " char *guestfs_file_architecture (guestfs_h *g,\n"
5627 "\t\tconst char *filename);\n"
5632 #: ../src/guestfs-actions.pod:1213 ../fish/guestfish-actions.pod:954
5634 "This detects the architecture of the binary C<filename>, and returns it if "
5639 #: ../src/guestfs-actions.pod:1216 ../fish/guestfish-actions.pod:957
5640 msgid "Currently defined architectures are:"
5644 #: ../src/guestfs-actions.pod:1220 ../fish/guestfish-actions.pod:961
5649 #: ../src/guestfs-actions.pod:1222 ../fish/guestfish-actions.pod:963
5651 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
5652 "irrespective of the precise processor requirements of the binary."
5656 #: ../src/guestfs-actions.pod:1225 ../fish/guestfish-actions.pod:966
5661 #: ../src/guestfs-actions.pod:1227 ../fish/guestfish-actions.pod:968
5662 msgid "64 bit x86-64."
5666 #: ../src/guestfs-actions.pod:1229 ../fish/guestfish-actions.pod:970
5671 #: ../src/guestfs-actions.pod:1231 ../fish/guestfish-actions.pod:972
5672 msgid "32 bit SPARC."
5676 #: ../src/guestfs-actions.pod:1233 ../fish/guestfish-actions.pod:974
5681 #: ../src/guestfs-actions.pod:1235 ../fish/guestfish-actions.pod:976
5682 msgid "64 bit SPARC V9 and above."
5686 #: ../src/guestfs-actions.pod:1237 ../fish/guestfish-actions.pod:978
5691 #: ../src/guestfs-actions.pod:1239 ../fish/guestfish-actions.pod:980
5692 msgid "Intel Itanium."
5696 #: ../src/guestfs-actions.pod:1241 ../fish/guestfish-actions.pod:982
5701 #: ../src/guestfs-actions.pod:1243 ../fish/guestfish-actions.pod:984
5702 msgid "32 bit Power PC."
5706 #: ../src/guestfs-actions.pod:1245 ../fish/guestfish-actions.pod:986
5711 #: ../src/guestfs-actions.pod:1247 ../fish/guestfish-actions.pod:988
5712 msgid "64 bit Power PC."
5716 #: ../src/guestfs-actions.pod:1251 ../fish/guestfish-actions.pod:992
5717 msgid "Libguestfs may return other architecture strings in future."
5721 #: ../src/guestfs-actions.pod:1253 ../fish/guestfish-actions.pod:994
5722 msgid "The function works on at least the following types of files:"
5726 #: ../src/guestfs-actions.pod:1259 ../fish/guestfish-actions.pod:1000
5727 msgid "many types of Un*x and Linux binary"
5731 #: ../src/guestfs-actions.pod:1263 ../fish/guestfish-actions.pod:1004
5732 msgid "many types of Un*x and Linux shared library"
5736 #: ../src/guestfs-actions.pod:1267 ../fish/guestfish-actions.pod:1008
5737 msgid "Windows Win32 and Win64 binaries"
5741 #: ../src/guestfs-actions.pod:1271 ../fish/guestfish-actions.pod:1012
5742 msgid "Windows Win32 and Win64 DLLs"
5746 #: ../src/guestfs-actions.pod:1273 ../fish/guestfish-actions.pod:1014
5747 msgid "Win32 binaries and DLLs return C<i386>."
5751 #: ../src/guestfs-actions.pod:1275 ../fish/guestfish-actions.pod:1016
5752 msgid "Win64 binaries and DLLs return C<x86_64>."
5756 #: ../src/guestfs-actions.pod:1279 ../fish/guestfish-actions.pod:1020
5757 msgid "Linux kernel modules"
5761 #: ../src/guestfs-actions.pod:1283 ../fish/guestfish-actions.pod:1024
5762 msgid "Linux new-style initrd images"
5766 #: ../src/guestfs-actions.pod:1287 ../fish/guestfish-actions.pod:1028
5767 msgid "some non-x86 Linux vmlinuz kernels"
5771 #: ../src/guestfs-actions.pod:1291 ../fish/guestfish-actions.pod:1032
5772 msgid "What it can't do currently:"
5776 #: ../src/guestfs-actions.pod:1297 ../fish/guestfish-actions.pod:1038
5777 msgid "static libraries (libfoo.a)"
5781 #: ../src/guestfs-actions.pod:1301 ../fish/guestfish-actions.pod:1042
5782 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
5786 #: ../src/guestfs-actions.pod:1305 ../fish/guestfish-actions.pod:1046
5787 msgid "x86 Linux vmlinuz kernels"
5791 #: ../src/guestfs-actions.pod:1307 ../fish/guestfish-actions.pod:1048
5793 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
5794 "compressed code, and are horribly hard to unpack. If you want to find the "
5795 "architecture of a kernel, use the architecture of the associated initrd or "
5796 "kernel module(s) instead."
5800 #: ../src/guestfs-actions.pod:1317
5801 msgid "guestfs_filesize"
5805 #: ../src/guestfs-actions.pod:1319
5808 " int64_t guestfs_filesize (guestfs_h *g,\n"
5809 "\t\tconst char *file);\n"
5814 #: ../src/guestfs-actions.pod:1322 ../fish/guestfish-actions.pod:1059
5815 msgid "This command returns the size of C<file> in bytes."
5819 #: ../src/guestfs-actions.pod:1324
5821 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
5822 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
5823 "devices, use C<guestfs_blockdev_getsize64>."
5827 #: ../src/guestfs-actions.pod:1330
5828 msgid "guestfs_fill"
5832 #: ../src/guestfs-actions.pod:1332
5835 " int guestfs_fill (guestfs_h *g,\n"
5838 "\t\tconst char *path);\n"
5843 #: ../src/guestfs-actions.pod:1337 ../fish/guestfish-actions.pod:1069
5845 "This command creates a new file called C<path>. The initial content of the "
5846 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
5851 #: ../src/guestfs-actions.pod:1341
5853 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
5854 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
5855 "bytes use C<guestfs_fill_pattern>."
5859 #: ../src/guestfs-actions.pod:1353
5860 msgid "guestfs_fill_pattern"
5864 #: ../src/guestfs-actions.pod:1355
5867 " int guestfs_fill_pattern (guestfs_h *g,\n"
5868 "\t\tconst char *pattern,\n"
5870 "\t\tconst char *path);\n"
5875 #: ../src/guestfs-actions.pod:1360
5877 "This function is like C<guestfs_fill> except that it creates a new file of "
5878 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
5879 "pattern is truncated if necessary to ensure the length of the file is "
5880 "exactly C<len> bytes."
5884 #: ../src/guestfs-actions.pod:1372
5885 msgid "guestfs_find"
5889 #: ../src/guestfs-actions.pod:1374
5892 " char **guestfs_find (guestfs_h *g,\n"
5893 "\t\tconst char *directory);\n"
5898 #: ../src/guestfs-actions.pod:1377 ../fish/guestfish-actions.pod:1091
5900 "This command lists out all files and directories, recursively, starting at "
5901 "C<directory>. It is essentially equivalent to running the shell command "
5902 "C<find directory -print> but some post-processing happens on the output, "
5907 #: ../src/guestfs-actions.pod:1382 ../fish/guestfish-actions.pod:1096
5909 "This returns a list of strings I<without any prefix>. Thus if the directory "
5914 #: ../src/guestfs-actions.pod:1385 ../fish/guestfish-actions.pod:1099
5924 #: ../src/guestfs-actions.pod:1389
5925 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
5929 #: ../src/guestfs-actions.pod:1392 ../fish/guestfish-actions.pod:1106
5940 #: ../src/guestfs-actions.pod:1397 ../fish/guestfish-actions.pod:1111
5941 msgid "If C<directory> is not a directory, then this command returns an error."
5945 #: ../src/guestfs-actions.pod:1400 ../fish/guestfish-actions.pod:1114
5946 msgid "The returned list is sorted."
5950 #: ../src/guestfs-actions.pod:1402
5951 msgid "See also C<guestfs_find0>."
5955 #: ../src/guestfs-actions.pod:1411
5956 msgid "guestfs_find0"
5960 #: ../src/guestfs-actions.pod:1413
5963 " int guestfs_find0 (guestfs_h *g,\n"
5964 "\t\tconst char *directory,\n"
5965 "\t\tconst char *files);\n"
5970 #: ../src/guestfs-actions.pod:1417 ../fish/guestfish-actions.pod:1125
5972 "This command lists out all files and directories, recursively, starting at "
5973 "C<directory>, placing the resulting list in the external file called "
5978 #: ../src/guestfs-actions.pod:1421
5980 "This command works the same way as C<guestfs_find> with the following "
5985 #: ../src/guestfs-actions.pod:1428 ../fish/guestfish-actions.pod:1136
5986 msgid "The resulting list is written to an external file."
5990 #: ../src/guestfs-actions.pod:1432 ../fish/guestfish-actions.pod:1140
5992 "Items (filenames) in the result are separated by C<\\0> characters. See "
5993 "L<find(1)> option I<-print0>."
5997 #: ../src/guestfs-actions.pod:1437 ../fish/guestfish-actions.pod:1145
5998 msgid "This command is not limited in the number of names that it can return."
6002 #: ../src/guestfs-actions.pod:1442 ../fish/guestfish-actions.pod:1150
6003 msgid "The result list is not sorted."
6007 #: ../src/guestfs-actions.pod:1448
6008 msgid "guestfs_findfs_label"
6012 #: ../src/guestfs-actions.pod:1450
6015 " char *guestfs_findfs_label (guestfs_h *g,\n"
6016 "\t\tconst char *label);\n"
6021 #: ../src/guestfs-actions.pod:1453 ../fish/guestfish-actions.pod:1160
6023 "This command searches the filesystems and returns the one which has the "
6024 "given label. An error is returned if no such filesystem can be found."
6028 #: ../src/guestfs-actions.pod:1457
6029 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
6033 #: ../src/guestfs-actions.pod:1462
6034 msgid "guestfs_findfs_uuid"
6038 #: ../src/guestfs-actions.pod:1464
6041 " char *guestfs_findfs_uuid (guestfs_h *g,\n"
6042 "\t\tconst char *uuid);\n"
6047 #: ../src/guestfs-actions.pod:1467 ../fish/guestfish-actions.pod:1170
6049 "This command searches the filesystems and returns the one which has the "
6050 "given UUID. An error is returned if no such filesystem can be found."
6054 #: ../src/guestfs-actions.pod:1471
6055 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
6059 #: ../src/guestfs-actions.pod:1476
6060 msgid "guestfs_fsck"
6064 #: ../src/guestfs-actions.pod:1478
6067 " int guestfs_fsck (guestfs_h *g,\n"
6068 "\t\tconst char *fstype,\n"
6069 "\t\tconst char *device);\n"
6074 #: ../src/guestfs-actions.pod:1482 ../fish/guestfish-actions.pod:1180
6076 "This runs the filesystem checker (fsck) on C<device> which should have "
6077 "filesystem type C<fstype>."
6081 #: ../src/guestfs-actions.pod:1485 ../fish/guestfish-actions.pod:1183
6083 "The returned integer is the status. See L<fsck(8)> for the list of status "
6084 "codes from C<fsck>."
6088 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:1192
6089 msgid "Multiple status codes can be summed together."
6093 #: ../src/guestfs-actions.pod:1498 ../fish/guestfish-actions.pod:1196
6095 "A non-zero return code can mean \"success\", for example if errors have been "
6096 "corrected on the filesystem."
6100 #: ../src/guestfs-actions.pod:1503 ../fish/guestfish-actions.pod:1201
6101 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
6105 #: ../src/guestfs-actions.pod:1508 ../fish/guestfish-actions.pod:1206
6106 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
6110 #: ../src/guestfs-actions.pod:1512
6111 msgid "guestfs_get_append"
6115 #: ../src/guestfs-actions.pod:1514
6118 " const char *guestfs_get_append (guestfs_h *g);\n"
6123 #: ../src/guestfs-actions.pod:1516 ../fish/guestfish-actions.pod:1212
6125 "Return the additional kernel options which are added to the guest kernel "
6130 #: ../src/guestfs-actions.pod:1519 ../fish/guestfish-actions.pod:1215
6131 msgid "If C<NULL> then no options are added."
6135 #: ../src/guestfs-actions.pod:1521
6137 "This function returns a string which may be NULL. There is no way to return "
6138 "an error from this function. The string is owned by the guest handle and "
6139 "must I<not> be freed."
6143 #: ../src/guestfs-actions.pod:1525
6144 msgid "guestfs_get_autosync"
6148 #: ../src/guestfs-actions.pod:1527
6151 " int guestfs_get_autosync (guestfs_h *g);\n"
6156 #: ../src/guestfs-actions.pod:1529 ../fish/guestfish-actions.pod:1221
6157 msgid "Get the autosync flag."
6161 #: ../src/guestfs-actions.pod:1533
6162 msgid "guestfs_get_direct"
6166 #: ../src/guestfs-actions.pod:1535
6169 " int guestfs_get_direct (guestfs_h *g);\n"
6174 #: ../src/guestfs-actions.pod:1537 ../fish/guestfish-actions.pod:1227
6175 msgid "Return the direct appliance mode flag."
6179 #: ../src/guestfs-actions.pod:1541
6180 msgid "guestfs_get_e2label"
6184 #: ../src/guestfs-actions.pod:1543
6187 " char *guestfs_get_e2label (guestfs_h *g,\n"
6188 "\t\tconst char *device);\n"
6193 #: ../src/guestfs-actions.pod:1546 ../fish/guestfish-actions.pod:1233
6194 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
6198 #: ../src/guestfs-actions.pod:1552 ../fish/guestfish-actions.pod:1236
6200 "This function is deprecated. In new code, use the C<vfs_label> call "
6205 #: ../src/guestfs-actions.pod:1559
6206 msgid "guestfs_get_e2uuid"
6210 #: ../src/guestfs-actions.pod:1561
6213 " char *guestfs_get_e2uuid (guestfs_h *g,\n"
6214 "\t\tconst char *device);\n"
6219 #: ../src/guestfs-actions.pod:1564 ../fish/guestfish-actions.pod:1247
6220 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
6224 #: ../src/guestfs-actions.pod:1570 ../fish/guestfish-actions.pod:1250
6225 msgid "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
6229 #: ../src/guestfs-actions.pod:1577
6230 msgid "guestfs_get_memsize"
6234 #: ../src/guestfs-actions.pod:1579
6237 " int guestfs_get_memsize (guestfs_h *g);\n"
6242 #: ../src/guestfs-actions.pod:1581 ../fish/guestfish-actions.pod:1261
6243 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
6247 #: ../src/guestfs-actions.pod:1584
6249 "If C<guestfs_set_memsize> was not called on this handle, and if "
6250 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
6251 "value for memsize."
6255 #: ../src/guestfs-actions.pod:1588 ../src/guestfs-actions.pod:1651 ../src/guestfs-actions.pod:4237 ../src/guestfs-actions.pod:4329 ../fish/guestfish-actions.pod:1268 ../fish/guestfish-actions.pod:1317 ../fish/guestfish-actions.pod:3268 ../fish/guestfish-actions.pod:3345
6256 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
6260 #: ../src/guestfs-actions.pod:1593
6261 msgid "guestfs_get_network"
6265 #: ../src/guestfs-actions.pod:1595
6268 " int guestfs_get_network (guestfs_h *g);\n"
6273 #: ../src/guestfs-actions.pod:1597 ../fish/guestfish-actions.pod:1275
6274 msgid "This returns the enable network flag."
6278 #: ../src/guestfs-actions.pod:1601
6279 msgid "guestfs_get_path"
6283 #: ../src/guestfs-actions.pod:1603
6286 " const char *guestfs_get_path (guestfs_h *g);\n"
6291 #: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1281
6292 msgid "Return the current search path."
6296 #: ../src/guestfs-actions.pod:1607 ../fish/guestfish-actions.pod:1283
6298 "This is always non-NULL. If it wasn't set already, then this will return "
6303 #: ../src/guestfs-actions.pod:1610 ../src/guestfs-actions.pod:1633
6305 "This function returns a string, or NULL on error. The string is owned by "
6306 "the guest handle and must I<not> be freed."
6310 #: ../src/guestfs-actions.pod:1613
6311 msgid "guestfs_get_pid"
6315 #: ../src/guestfs-actions.pod:1615
6318 " int guestfs_get_pid (guestfs_h *g);\n"
6323 #: ../src/guestfs-actions.pod:1617 ../fish/guestfish-actions.pod:1290
6325 "Return the process ID of the qemu subprocess. If there is no qemu "
6326 "subprocess, then this will return an error."
6330 #: ../src/guestfs-actions.pod:1620 ../fish/guestfish-actions.pod:1293
6331 msgid "This is an internal call used for debugging and testing."
6335 #: ../src/guestfs-actions.pod:1624
6336 msgid "guestfs_get_qemu"
6340 #: ../src/guestfs-actions.pod:1626
6343 " const char *guestfs_get_qemu (guestfs_h *g);\n"
6348 #: ../src/guestfs-actions.pod:1628 ../fish/guestfish-actions.pod:1299
6349 msgid "Return the current qemu binary."
6353 #: ../src/guestfs-actions.pod:1630 ../fish/guestfish-actions.pod:1301
6355 "This is always non-NULL. If it wasn't set already, then this will return "
6356 "the default qemu binary name."
6360 #: ../src/guestfs-actions.pod:1636
6361 msgid "guestfs_get_recovery_proc"
6365 #: ../src/guestfs-actions.pod:1638
6368 " int guestfs_get_recovery_proc (guestfs_h *g);\n"
6373 #: ../src/guestfs-actions.pod:1640 ../fish/guestfish-actions.pod:1308
6374 msgid "Return the recovery process enabled flag."
6378 #: ../src/guestfs-actions.pod:1644
6379 msgid "guestfs_get_selinux"
6383 #: ../src/guestfs-actions.pod:1646
6386 " int guestfs_get_selinux (guestfs_h *g);\n"
6391 #: ../src/guestfs-actions.pod:1648
6393 "This returns the current setting of the selinux flag which is passed to the "
6394 "appliance at boot time. See C<guestfs_set_selinux>."
6398 #: ../src/guestfs-actions.pod:1656
6399 msgid "guestfs_get_state"
6403 #: ../src/guestfs-actions.pod:1658
6406 " int guestfs_get_state (guestfs_h *g);\n"
6411 #: ../src/guestfs-actions.pod:1660 ../fish/guestfish-actions.pod:1324
6413 "This returns the current state as an opaque integer. This is only useful "
6414 "for printing debug and internal error messages."
6418 #: ../src/guestfs-actions.pod:1663 ../src/guestfs-actions.pod:2282 ../src/guestfs-actions.pod:2305 ../src/guestfs-actions.pod:2354 ../src/guestfs-actions.pod:2375 ../fish/guestfish-actions.pod:1327 ../fish/guestfish-actions.pod:1819 ../fish/guestfish-actions.pod:1837 ../fish/guestfish-actions.pod:1875 ../fish/guestfish-actions.pod:1891
6419 msgid "For more information on states, see L<guestfs(3)>."
6423 #: ../src/guestfs-actions.pod:1667
6424 msgid "guestfs_get_trace"
6428 #: ../src/guestfs-actions.pod:1669
6431 " int guestfs_get_trace (guestfs_h *g);\n"
6436 #: ../src/guestfs-actions.pod:1671 ../fish/guestfish-actions.pod:1333
6437 msgid "Return the command trace flag."
6441 #: ../src/guestfs-actions.pod:1675
6442 msgid "guestfs_get_umask"
6446 #: ../src/guestfs-actions.pod:1677
6449 " int guestfs_get_umask (guestfs_h *g);\n"
6454 #: ../src/guestfs-actions.pod:1679
6456 "Return the current umask. By default the umask is C<022> unless it has been "
6457 "set by calling C<guestfs_umask>."
6461 #: ../src/guestfs-actions.pod:1684
6462 msgid "guestfs_get_verbose"
6466 #: ../src/guestfs-actions.pod:1686
6469 " int guestfs_get_verbose (guestfs_h *g);\n"
6474 #: ../src/guestfs-actions.pod:1688 ../fish/guestfish-actions.pod:1346
6475 msgid "This returns the verbose messages flag."
6479 #: ../src/guestfs-actions.pod:1692
6480 msgid "guestfs_getcon"
6484 #: ../src/guestfs-actions.pod:1694
6487 " char *guestfs_getcon (guestfs_h *g);\n"
6492 #: ../src/guestfs-actions.pod:1696 ../fish/guestfish-actions.pod:1352
6493 msgid "This gets the SELinux security context of the daemon."
6497 #: ../src/guestfs-actions.pod:1698
6498 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
6502 #: ../src/guestfs-actions.pod:1704
6503 msgid "guestfs_getxattrs"
6507 #: ../src/guestfs-actions.pod:1706
6510 " struct guestfs_xattr_list *guestfs_getxattrs (guestfs_h *g,\n"
6511 "\t\tconst char *path);\n"
6516 #: ../src/guestfs-actions.pod:1709 ../fish/guestfish-actions.pod:1361
6517 msgid "This call lists the extended attributes of the file or directory C<path>."
6521 #: ../src/guestfs-actions.pod:1712 ../fish/guestfish-actions.pod:1364
6523 "At the system call level, this is a combination of the L<listxattr(2)> and "
6524 "L<getxattr(2)> calls."
6528 #: ../src/guestfs-actions.pod:1715
6529 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
6533 #: ../src/guestfs-actions.pod:1717 ../src/guestfs-actions.pod:2449 ../src/guestfs-actions.pod:2944
6535 "This function returns a C<struct guestfs_xattr_list *> (see "
6536 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
6537 "must call C<guestfs_free_xattr_list> after use>."
6541 #: ../src/guestfs-actions.pod:1722
6542 msgid "guestfs_glob_expand"
6546 #: ../src/guestfs-actions.pod:1724
6549 " char **guestfs_glob_expand (guestfs_h *g,\n"
6550 "\t\tconst char *pattern);\n"
6555 #: ../src/guestfs-actions.pod:1727 ../fish/guestfish-actions.pod:1373
6557 "This command searches for all the pathnames matching C<pattern> according to "
6558 "the wildcard expansion rules used by the shell."
6562 #: ../src/guestfs-actions.pod:1731 ../fish/guestfish-actions.pod:1377
6563 msgid "If no paths match, then this returns an empty list (note: not an error)."
6567 #: ../src/guestfs-actions.pod:1734 ../fish/guestfish-actions.pod:1380
6569 "It is just a wrapper around the C L<glob(3)> function with flags "
6570 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
6574 #: ../src/guestfs-actions.pod:1742
6575 msgid "guestfs_grep"
6579 #: ../src/guestfs-actions.pod:1744
6582 " char **guestfs_grep (guestfs_h *g,\n"
6583 "\t\tconst char *regex,\n"
6584 "\t\tconst char *path);\n"
6589 #: ../src/guestfs-actions.pod:1748 ../fish/guestfish-actions.pod:1388
6590 msgid "This calls the external C<grep> program and returns the matching lines."
6594 #: ../src/guestfs-actions.pod:1758
6595 msgid "guestfs_grepi"
6599 #: ../src/guestfs-actions.pod:1760
6602 " char **guestfs_grepi (guestfs_h *g,\n"
6603 "\t\tconst char *regex,\n"
6604 "\t\tconst char *path);\n"
6609 #: ../src/guestfs-actions.pod:1764 ../fish/guestfish-actions.pod:1398
6610 msgid "This calls the external C<grep -i> program and returns the matching lines."
6614 #: ../src/guestfs-actions.pod:1774
6615 msgid "guestfs_grub_install"
6619 #: ../src/guestfs-actions.pod:1776
6622 " int guestfs_grub_install (guestfs_h *g,\n"
6623 "\t\tconst char *root,\n"
6624 "\t\tconst char *device);\n"
6629 #: ../src/guestfs-actions.pod:1780 ../fish/guestfish-actions.pod:1408
6631 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
6632 "the root directory being C<root>."
6636 #: ../src/guestfs-actions.pod:1783 ../fish/guestfish-actions.pod:1411
6638 "Note: If grub-install reports the error \"No suitable drive was found in the "
6639 "generated device map.\" it may be that you need to create a "
6640 "C</boot/grub/device.map> file first that contains the mapping between grub "
6641 "device names and Linux device names. It is usually sufficient to create a "
6646 #: ../src/guestfs-actions.pod:1790 ../fish/guestfish-actions.pod:1418
6654 #: ../src/guestfs-actions.pod:1792 ../fish/guestfish-actions.pod:1420
6655 msgid "replacing C</dev/vda> with the name of the installation device."
6659 #: ../src/guestfs-actions.pod:1796
6660 msgid "guestfs_head"
6664 #: ../src/guestfs-actions.pod:1798
6667 " char **guestfs_head (guestfs_h *g,\n"
6668 "\t\tconst char *path);\n"
6673 #: ../src/guestfs-actions.pod:1801 ../fish/guestfish-actions.pod:1426
6675 "This command returns up to the first 10 lines of a file as a list of "
6680 #: ../src/guestfs-actions.pod:1811
6681 msgid "guestfs_head_n"
6685 #: ../src/guestfs-actions.pod:1813
6688 " char **guestfs_head_n (guestfs_h *g,\n"
6689 "\t\tint nrlines,\n"
6690 "\t\tconst char *path);\n"
6695 #: ../src/guestfs-actions.pod:1817 ../fish/guestfish-actions.pod:1436
6697 "If the parameter C<nrlines> is a positive number, this returns the first "
6698 "C<nrlines> lines of the file C<path>."
6702 #: ../src/guestfs-actions.pod:1820 ../fish/guestfish-actions.pod:1439
6704 "If the parameter C<nrlines> is a negative number, this returns lines from "
6705 "the file C<path>, excluding the last C<nrlines> lines."
6709 #: ../src/guestfs-actions.pod:1823 ../src/guestfs-actions.pod:4785 ../fish/guestfish-actions.pod:1442 ../fish/guestfish-actions.pod:3687
6710 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
6714 #: ../src/guestfs-actions.pod:1832
6715 msgid "guestfs_hexdump"
6719 #: ../src/guestfs-actions.pod:1834
6722 " char *guestfs_hexdump (guestfs_h *g,\n"
6723 "\t\tconst char *path);\n"
6728 #: ../src/guestfs-actions.pod:1837 ../fish/guestfish-actions.pod:1451
6730 "This runs C<hexdump -C> on the given C<path>. The result is the "
6731 "human-readable, canonical hex dump of the file."
6735 #: ../src/guestfs-actions.pod:1846
6736 msgid "guestfs_initrd_cat"
6740 #: ../src/guestfs-actions.pod:1848
6743 " char *guestfs_initrd_cat (guestfs_h *g,\n"
6744 "\t\tconst char *initrdpath,\n"
6745 "\t\tconst char *filename,\n"
6746 "\t\tsize_t *size_r);\n"
6751 #: ../src/guestfs-actions.pod:1853 ../fish/guestfish-actions.pod:1461
6753 "This command unpacks the file C<filename> from the initrd file called "
6754 "C<initrdpath>. The filename must be given I<without> the initial C</> "
6759 #: ../src/guestfs-actions.pod:1857 ../fish/guestfish-actions.pod:1465
6761 "For example, in guestfish you could use the following command to examine the "
6762 "boot script (usually called C</init>) contained in a Linux initrd or "
6767 #: ../src/guestfs-actions.pod:1861 ../fish/guestfish-actions.pod:1469
6770 " initrd-cat /boot/initrd-<version>.img init\n"
6775 #: ../src/guestfs-actions.pod:1863
6776 msgid "See also C<guestfs_initrd_list>."
6780 #: ../src/guestfs-actions.pod:1865 ../src/guestfs-actions.pod:3743 ../src/guestfs-actions.pod:3872
6782 "This function returns a buffer, or NULL on error. The size of the returned "
6783 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
6788 #: ../src/guestfs-actions.pod:1872
6789 msgid "guestfs_initrd_list"
6793 #: ../src/guestfs-actions.pod:1874
6796 " char **guestfs_initrd_list (guestfs_h *g,\n"
6797 "\t\tconst char *path);\n"
6802 #: ../src/guestfs-actions.pod:1877 ../fish/guestfish-actions.pod:1480
6803 msgid "This command lists out files contained in an initrd."
6807 #: ../src/guestfs-actions.pod:1879 ../fish/guestfish-actions.pod:1482
6809 "The files are listed without any initial C</> character. The files are "
6810 "listed in the order they appear (not necessarily alphabetical). Directory "
6811 "names are listed as separate items."
6815 #: ../src/guestfs-actions.pod:1883 ../fish/guestfish-actions.pod:1486
6817 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
6818 "initrd. We I<only> support the newer initramfs format (compressed cpio "
6823 #: ../src/guestfs-actions.pod:1891
6824 msgid "guestfs_inotify_add_watch"
6828 #: ../src/guestfs-actions.pod:1893
6831 " int64_t guestfs_inotify_add_watch (guestfs_h *g,\n"
6832 "\t\tconst char *path,\n"
6838 #: ../src/guestfs-actions.pod:1897 ../fish/guestfish-actions.pod:1494
6839 msgid "Watch C<path> for the events listed in C<mask>."
6843 #: ../src/guestfs-actions.pod:1899 ../fish/guestfish-actions.pod:1496
6845 "Note that if C<path> is a directory then events within that directory are "
6846 "watched, but this does I<not> happen recursively (in subdirectories)."
6850 #: ../src/guestfs-actions.pod:1903 ../fish/guestfish-actions.pod:1500
6852 "Note for non-C or non-Linux callers: the inotify events are defined by the "
6853 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
6857 #: ../src/guestfs-actions.pod:1909
6858 msgid "guestfs_inotify_close"
6862 #: ../src/guestfs-actions.pod:1911
6865 " int guestfs_inotify_close (guestfs_h *g);\n"
6870 #: ../src/guestfs-actions.pod:1913 ../fish/guestfish-actions.pod:1508
6872 "This closes the inotify handle which was previously opened by inotify_init. "
6873 "It removes all watches, throws away any pending events, and deallocates all "
6878 #: ../src/guestfs-actions.pod:1919
6879 msgid "guestfs_inotify_files"
6883 #: ../src/guestfs-actions.pod:1921
6886 " char **guestfs_inotify_files (guestfs_h *g);\n"
6891 #: ../src/guestfs-actions.pod:1923
6893 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
6894 "returns a list of pathnames of objects that were touched. The returned "
6895 "pathnames are sorted and deduplicated."
6899 #: ../src/guestfs-actions.pod:1931
6900 msgid "guestfs_inotify_init"
6904 #: ../src/guestfs-actions.pod:1933
6907 " int guestfs_inotify_init (guestfs_h *g,\n"
6908 "\t\tint maxevents);\n"
6913 #: ../src/guestfs-actions.pod:1936 ../fish/guestfish-actions.pod:1524
6915 "This command creates a new inotify handle. The inotify subsystem can be "
6916 "used to notify events which happen to objects in the guest filesystem."
6920 #: ../src/guestfs-actions.pod:1940
6922 "C<maxevents> is the maximum number of events which will be queued up between "
6923 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
6924 "passed as C<0>, then the kernel (or previously set) default is used. For "
6925 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
6926 "throws away events, but records the fact that it threw them away by setting "
6927 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
6928 "C<guestfs_inotify_read>)."
6932 #: ../src/guestfs-actions.pod:1950
6934 "Before any events are generated, you have to add some watches to the "
6935 "internal watch list. See: C<guestfs_inotify_add_watch>, "
6936 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
6940 #: ../src/guestfs-actions.pod:1956
6942 "Queued up events should be read periodically by calling "
6943 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
6944 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
6945 "often enough then you risk the internal queue overflowing."
6949 #: ../src/guestfs-actions.pod:1963
6951 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
6952 "This also removes any watches automatically."
6956 #: ../src/guestfs-actions.pod:1967 ../fish/guestfish-actions.pod:1555
6958 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
6959 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
6960 "that there is one global inotify handle per libguestfs instance."
6964 #: ../src/guestfs-actions.pod:1974
6965 msgid "guestfs_inotify_read"
6969 #: ../src/guestfs-actions.pod:1976
6972 " struct guestfs_inotify_event_list *guestfs_inotify_read (guestfs_h *g);\n"
6977 #: ../src/guestfs-actions.pod:1978 ../fish/guestfish-actions.pod:1564
6979 "Return the complete queue of events that have happened since the previous "
6984 #: ../src/guestfs-actions.pod:1981 ../fish/guestfish-actions.pod:1567
6985 msgid "If no events have happened, this returns an empty list."
6989 #: ../src/guestfs-actions.pod:1983 ../fish/guestfish-actions.pod:1569
6991 "I<Note>: In order to make sure that all events have been read, you must call "
6992 "this function repeatedly until it returns an empty list. The reason is that "
6993 "the call will read events up to the maximum appliance-to-host message size "
6994 "and leave remaining events in the queue."
6998 #: ../src/guestfs-actions.pod:1989
7000 "This function returns a C<struct guestfs_inotify_event_list *> (see "
7001 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
7002 "must call C<guestfs_free_inotify_event_list> after use>."
7006 #: ../src/guestfs-actions.pod:1994
7007 msgid "guestfs_inotify_rm_watch"
7011 #: ../src/guestfs-actions.pod:1996
7014 " int guestfs_inotify_rm_watch (guestfs_h *g,\n"
7020 #: ../src/guestfs-actions.pod:1999
7022 "Remove a previously defined inotify watch. See "
7023 "C<guestfs_inotify_add_watch>."
7027 #: ../src/guestfs-actions.pod:2004
7028 msgid "guestfs_inspect_get_arch"
7032 #: ../src/guestfs-actions.pod:2006
7035 " char *guestfs_inspect_get_arch (guestfs_h *g,\n"
7036 "\t\tconst char *root);\n"
7041 #: ../src/guestfs-actions.pod:2009 ../src/guestfs-actions.pod:2029 ../src/guestfs-actions.pod:2079 ../src/guestfs-actions.pod:2102 ../src/guestfs-actions.pod:2126 ../src/guestfs-actions.pod:2144 ../src/guestfs-actions.pod:2174 ../src/guestfs-actions.pod:2195
7043 "This function should only be called with a root device string as returned by "
7044 "C<guestfs_inspect_os>."
7048 #: ../src/guestfs-actions.pod:2012
7050 "This returns the architecture of the inspected operating system. The "
7051 "possible return values are listed under C<guestfs_file_architecture>."
7055 #: ../src/guestfs-actions.pod:2016 ../fish/guestfish-actions.pod:1593
7057 "If the architecture could not be determined, then the string C<unknown> is "
7062 #: ../src/guestfs-actions.pod:2019 ../src/guestfs-actions.pod:2069 ../src/guestfs-actions.pod:2117 ../src/guestfs-actions.pod:2185 ../src/guestfs-actions.pod:2220 ../src/guestfs-actions.pod:2257 ../fish/guestfish-actions.pod:1596 ../fish/guestfish-actions.pod:1642 ../fish/guestfish-actions.pod:1681 ../fish/guestfish-actions.pod:1736 ../fish/guestfish-actions.pod:1767 ../fish/guestfish-actions.pod:1801
7063 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
7067 #: ../src/guestfs-actions.pod:2024
7068 msgid "guestfs_inspect_get_distro"
7072 #: ../src/guestfs-actions.pod:2026
7075 " char *guestfs_inspect_get_distro (guestfs_h *g,\n"
7076 "\t\tconst char *root);\n"
7081 #: ../src/guestfs-actions.pod:2032 ../fish/guestfish-actions.pod:1605
7082 msgid "This returns the distro (distribution) of the inspected operating system."
7086 #: ../src/guestfs-actions.pod:2035 ../fish/guestfish-actions.pod:1608
7087 msgid "Currently defined distros are:"
7091 #: ../src/guestfs-actions.pod:2039 ../fish/guestfish-actions.pod:1612
7096 #: ../src/guestfs-actions.pod:2041 ../fish/guestfish-actions.pod:1614
7097 msgid "Debian or a Debian-derived distro such as Ubuntu."
7101 #: ../src/guestfs-actions.pod:2043 ../fish/guestfish-actions.pod:1616
7106 #: ../src/guestfs-actions.pod:2045 ../fish/guestfish-actions.pod:1618
7111 #: ../src/guestfs-actions.pod:2047 ../fish/guestfish-actions.pod:1620
7112 msgid "\"redhat-based\""
7116 #: ../src/guestfs-actions.pod:2049 ../fish/guestfish-actions.pod:1622
7117 msgid "Some Red Hat-derived distro."
7121 #: ../src/guestfs-actions.pod:2051 ../fish/guestfish-actions.pod:1624
7126 #: ../src/guestfs-actions.pod:2053 ../fish/guestfish-actions.pod:1626
7127 msgid "Red Hat Enterprise Linux and some derivatives."
7131 #: ../src/guestfs-actions.pod:2055 ../src/guestfs-actions.pod:2207 ../fish/guestfish-actions.pod:1628 ../fish/guestfish-actions.pod:1754
7136 #: ../src/guestfs-actions.pod:2057 ../fish/guestfish-actions.pod:1630
7138 "Windows does not have distributions. This string is returned if the OS type "
7143 #: ../src/guestfs-actions.pod:2060 ../src/guestfs-actions.pod:2211 ../fish/guestfish-actions.pod:1633 ../fish/guestfish-actions.pod:1758
7148 #: ../src/guestfs-actions.pod:2062 ../fish/guestfish-actions.pod:1635
7149 msgid "The distro could not be determined."
7153 #: ../src/guestfs-actions.pod:2066 ../src/guestfs-actions.pod:2217 ../fish/guestfish-actions.pod:1639 ../fish/guestfish-actions.pod:1764
7155 "Future versions of libguestfs may return other strings here. The caller "
7156 "should be prepared to handle any string."
7160 #: ../src/guestfs-actions.pod:2074
7161 msgid "guestfs_inspect_get_filesystems"
7165 #: ../src/guestfs-actions.pod:2076
7168 " char **guestfs_inspect_get_filesystems (guestfs_h *g,\n"
7169 "\t\tconst char *root);\n"
7174 #: ../src/guestfs-actions.pod:2082 ../fish/guestfish-actions.pod:1651
7176 "This returns a list of all the filesystems that we think are associated with "
7177 "this operating system. This includes the root filesystem, other ordinary "
7178 "filesystems, and non-mounted devices like swap partitions."
7182 #: ../src/guestfs-actions.pod:2087 ../fish/guestfish-actions.pod:1656
7184 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
7185 "to be shared between operating systems."
7189 #: ../src/guestfs-actions.pod:2090
7191 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7192 "C<guestfs_inspect_get_mountpoints>."
7196 #: ../src/guestfs-actions.pod:2097
7197 msgid "guestfs_inspect_get_major_version"
7201 #: ../src/guestfs-actions.pod:2099
7204 " int guestfs_inspect_get_major_version (guestfs_h *g,\n"
7205 "\t\tconst char *root);\n"
7210 #: ../src/guestfs-actions.pod:2105 ../fish/guestfish-actions.pod:1669
7211 msgid "This returns the major version number of the inspected operating system."
7215 #: ../src/guestfs-actions.pod:2108 ../fish/guestfish-actions.pod:1672
7217 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
7218 "popular public names used by the operating system. Notably the operating "
7219 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
7220 "1). You can find out the real versions corresponding to releases of Windows "
7221 "by consulting Wikipedia or MSDN."
7225 #: ../src/guestfs-actions.pod:2115 ../src/guestfs-actions.pod:2132 ../fish/guestfish-actions.pod:1679 ../fish/guestfish-actions.pod:1693
7226 msgid "If the version could not be determined, then C<0> is returned."
7230 #: ../src/guestfs-actions.pod:2121
7231 msgid "guestfs_inspect_get_minor_version"
7235 #: ../src/guestfs-actions.pod:2123
7238 " int guestfs_inspect_get_minor_version (guestfs_h *g,\n"
7239 "\t\tconst char *root);\n"
7244 #: ../src/guestfs-actions.pod:2129 ../fish/guestfish-actions.pod:1690
7245 msgid "This returns the minor version number of the inspected operating system."
7249 #: ../src/guestfs-actions.pod:2134
7251 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7252 "C<guestfs_inspect_get_major_version>."
7256 #: ../src/guestfs-actions.pod:2139
7257 msgid "guestfs_inspect_get_mountpoints"
7261 #: ../src/guestfs-actions.pod:2141
7264 " char **guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
7265 "\t\tconst char *root);\n"
7270 #: ../src/guestfs-actions.pod:2147 ../fish/guestfish-actions.pod:1705
7272 "This returns a hash of where we think the filesystems associated with this "
7273 "operating system should be mounted. Callers should note that this is at "
7274 "best an educated guess made by reading configuration files such as "
7279 #: ../src/guestfs-actions.pod:2152 ../fish/guestfish-actions.pod:1710
7281 "Each element in the returned hashtable has a key which is the path of the "
7282 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
7283 "mounted there (eg. C</dev/sda1>)."
7287 #: ../src/guestfs-actions.pod:2157 ../fish/guestfish-actions.pod:1715
7288 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
7292 #: ../src/guestfs-actions.pod:2160
7294 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7295 "C<guestfs_inspect_get_filesystems>."
7299 #: ../src/guestfs-actions.pod:2163 ../src/guestfs-actions.pod:3380 ../src/guestfs-actions.pod:4902
7301 "This function returns a NULL-terminated array of strings, or NULL if there "
7302 "was an error. The array of strings will always have length C<2n+1>, where "
7303 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
7304 "caller must free the strings and the array after use>."
7308 #: ../src/guestfs-actions.pod:2169
7309 msgid "guestfs_inspect_get_product_name"
7313 #: ../src/guestfs-actions.pod:2171
7316 " char *guestfs_inspect_get_product_name (guestfs_h *g,\n"
7317 "\t\tconst char *root);\n"
7322 #: ../src/guestfs-actions.pod:2177 ../fish/guestfish-actions.pod:1728
7324 "This returns the product name of the inspected operating system. The "
7325 "product name is generally some freeform string which can be displayed to the "
7326 "user, but should not be parsed by programs."
7330 #: ../src/guestfs-actions.pod:2182 ../fish/guestfish-actions.pod:1733
7332 "If the product name could not be determined, then the string C<unknown> is "
7337 #: ../src/guestfs-actions.pod:2190
7338 msgid "guestfs_inspect_get_type"
7342 #: ../src/guestfs-actions.pod:2192
7345 " char *guestfs_inspect_get_type (guestfs_h *g,\n"
7346 "\t\tconst char *root);\n"
7351 #: ../src/guestfs-actions.pod:2198 ../fish/guestfish-actions.pod:1745
7353 "This returns the type of the inspected operating system. Currently defined "
7358 #: ../src/guestfs-actions.pod:2203 ../fish/guestfish-actions.pod:1750
7363 #: ../src/guestfs-actions.pod:2205 ../fish/guestfish-actions.pod:1752
7364 msgid "Any Linux-based operating system."
7368 #: ../src/guestfs-actions.pod:2209 ../fish/guestfish-actions.pod:1756
7369 msgid "Any Microsoft Windows operating system."
7373 #: ../src/guestfs-actions.pod:2213 ../fish/guestfish-actions.pod:1760
7374 msgid "The operating system type could not be determined."
7378 #: ../src/guestfs-actions.pod:2225
7379 msgid "guestfs_inspect_os"
7383 #: ../src/guestfs-actions.pod:2227
7386 " char **guestfs_inspect_os (guestfs_h *g);\n"
7391 #: ../src/guestfs-actions.pod:2229 ../fish/guestfish-actions.pod:1773
7393 "This function uses other libguestfs functions and certain heuristics to "
7394 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
7395 "for operating systems."
7399 #: ../src/guestfs-actions.pod:2233 ../fish/guestfish-actions.pod:1777
7400 msgid "The list returned is empty if no operating systems were found."
7404 #: ../src/guestfs-actions.pod:2235 ../fish/guestfish-actions.pod:1779
7406 "If one operating system was found, then this returns a list with a single "
7407 "element, which is the name of the root filesystem of this operating system. "
7408 "It is also possible for this function to return a list containing more than "
7409 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
7410 "element being the root filesystem of one of the operating systems."
7414 #: ../src/guestfs-actions.pod:2242
7416 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
7417 "functions in order to query further information about each operating system, "
7418 "such as the name and version."
7422 #: ../src/guestfs-actions.pod:2247
7424 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
7425 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
7426 "the contents. This should be called with no disks currently mounted. The "
7427 "function may also use Augeas, so any existing Augeas handle will be closed."
7431 #: ../src/guestfs-actions.pod:2253 ../fish/guestfish-actions.pod:1797
7433 "This function cannot decrypt encrypted disks. The caller must do that first "
7434 "(supplying the necessary keys) if the disk is encrypted."
7438 #: ../src/guestfs-actions.pod:2263
7439 msgid "guestfs_is_blockdev"
7443 #: ../src/guestfs-actions.pod:2265
7446 " int guestfs_is_blockdev (guestfs_h *g,\n"
7447 "\t\tconst char *path);\n"
7452 #: ../src/guestfs-actions.pod:2268 ../fish/guestfish-actions.pod:1807
7454 "This returns C<true> if and only if there is a block device with the given "
7459 #: ../src/guestfs-actions.pod:2271 ../src/guestfs-actions.pod:2294 ../src/guestfs-actions.pod:2318 ../src/guestfs-actions.pod:2330 ../src/guestfs-actions.pod:2343 ../src/guestfs-actions.pod:2387 ../src/guestfs-actions.pod:2399
7460 msgid "See also C<guestfs_stat>."
7464 #: ../src/guestfs-actions.pod:2275
7465 msgid "guestfs_is_busy"
7469 #: ../src/guestfs-actions.pod:2277
7472 " int guestfs_is_busy (guestfs_h *g);\n"
7477 #: ../src/guestfs-actions.pod:2279 ../fish/guestfish-actions.pod:1816
7479 "This returns true iff this handle is busy processing a command (in the "
7484 #: ../src/guestfs-actions.pod:2286
7485 msgid "guestfs_is_chardev"
7489 #: ../src/guestfs-actions.pod:2288
7492 " int guestfs_is_chardev (guestfs_h *g,\n"
7493 "\t\tconst char *path);\n"
7498 #: ../src/guestfs-actions.pod:2291 ../fish/guestfish-actions.pod:1825
7500 "This returns C<true> if and only if there is a character device with the "
7501 "given C<path> name."
7505 #: ../src/guestfs-actions.pod:2298
7506 msgid "guestfs_is_config"
7510 #: ../src/guestfs-actions.pod:2300
7513 " int guestfs_is_config (guestfs_h *g);\n"
7518 #: ../src/guestfs-actions.pod:2302 ../fish/guestfish-actions.pod:1834
7520 "This returns true iff this handle is being configured (in the C<CONFIG> "
7525 #: ../src/guestfs-actions.pod:2309
7526 msgid "guestfs_is_dir"
7530 #: ../src/guestfs-actions.pod:2311
7533 " int guestfs_is_dir (guestfs_h *g,\n"
7534 "\t\tconst char *path);\n"
7539 #: ../src/guestfs-actions.pod:2314 ../fish/guestfish-actions.pod:1843
7541 "This returns C<true> if and only if there is a directory with the given "
7542 "C<path> name. Note that it returns false for other objects like files."
7546 #: ../src/guestfs-actions.pod:2322
7547 msgid "guestfs_is_fifo"
7551 #: ../src/guestfs-actions.pod:2324
7554 " int guestfs_is_fifo (guestfs_h *g,\n"
7555 "\t\tconst char *path);\n"
7560 #: ../src/guestfs-actions.pod:2327 ../fish/guestfish-actions.pod:1853
7562 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
7563 "given C<path> name."
7567 #: ../src/guestfs-actions.pod:2334
7568 msgid "guestfs_is_file"
7572 #: ../src/guestfs-actions.pod:2336
7575 " int guestfs_is_file (guestfs_h *g,\n"
7576 "\t\tconst char *path);\n"
7581 #: ../src/guestfs-actions.pod:2339 ../fish/guestfish-actions.pod:1862
7583 "This returns C<true> if and only if there is a regular file with the given "
7584 "C<path> name. Note that it returns false for other objects like "
7589 #: ../src/guestfs-actions.pod:2347
7590 msgid "guestfs_is_launching"
7594 #: ../src/guestfs-actions.pod:2349
7597 " int guestfs_is_launching (guestfs_h *g);\n"
7602 #: ../src/guestfs-actions.pod:2351 ../fish/guestfish-actions.pod:1872
7604 "This returns true iff this handle is launching the subprocess (in the "
7605 "C<LAUNCHING> state)."
7609 #: ../src/guestfs-actions.pod:2358
7610 msgid "guestfs_is_lv"
7614 #: ../src/guestfs-actions.pod:2360
7617 " int guestfs_is_lv (guestfs_h *g,\n"
7618 "\t\tconst char *device);\n"
7623 #: ../src/guestfs-actions.pod:2363 ../fish/guestfish-actions.pod:1881
7625 "This command tests whether C<device> is a logical volume, and returns true "
7626 "iff this is the case."
7630 #: ../src/guestfs-actions.pod:2368
7631 msgid "guestfs_is_ready"
7635 #: ../src/guestfs-actions.pod:2370
7638 " int guestfs_is_ready (guestfs_h *g);\n"
7643 #: ../src/guestfs-actions.pod:2372 ../fish/guestfish-actions.pod:1888
7645 "This returns true iff this handle is ready to accept commands (in the "
7650 #: ../src/guestfs-actions.pod:2379
7651 msgid "guestfs_is_socket"
7655 #: ../src/guestfs-actions.pod:2381
7658 " int guestfs_is_socket (guestfs_h *g,\n"
7659 "\t\tconst char *path);\n"
7664 #: ../src/guestfs-actions.pod:2384 ../fish/guestfish-actions.pod:1897
7666 "This returns C<true> if and only if there is a Unix domain socket with the "
7667 "given C<path> name."
7671 #: ../src/guestfs-actions.pod:2391
7672 msgid "guestfs_is_symlink"
7676 #: ../src/guestfs-actions.pod:2393
7679 " int guestfs_is_symlink (guestfs_h *g,\n"
7680 "\t\tconst char *path);\n"
7685 #: ../src/guestfs-actions.pod:2396 ../fish/guestfish-actions.pod:1906
7687 "This returns C<true> if and only if there is a symbolic link with the given "
7692 #: ../src/guestfs-actions.pod:2403
7693 msgid "guestfs_kill_subprocess"
7697 #: ../src/guestfs-actions.pod:2405
7700 " int guestfs_kill_subprocess (guestfs_h *g);\n"
7705 #: ../src/guestfs-actions.pod:2407 ../fish/guestfish-actions.pod:1915
7706 msgid "This kills the qemu subprocess. You should never need to call this."
7710 #: ../src/guestfs-actions.pod:2411
7711 msgid "guestfs_launch"
7715 #: ../src/guestfs-actions.pod:2413
7718 " int guestfs_launch (guestfs_h *g);\n"
7723 #: ../src/guestfs-actions.pod:2415 ../fish/guestfish-actions.pod:1921
7725 "Internally libguestfs is implemented by running a virtual machine using "
7730 #: ../src/guestfs-actions.pod:2418 ../fish/guestfish-actions.pod:1924
7732 "You should call this after configuring the handle (eg. adding drives) but "
7733 "before performing any actions."
7737 #: ../src/guestfs-actions.pod:2423
7738 msgid "guestfs_lchown"
7742 #: ../src/guestfs-actions.pod:2425
7745 " int guestfs_lchown (guestfs_h *g,\n"
7748 "\t\tconst char *path);\n"
7753 #: ../src/guestfs-actions.pod:2430
7755 "Change the file owner to C<owner> and group to C<group>. This is like "
7756 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
7757 "changed, not the target."
7761 #: ../src/guestfs-actions.pod:2440
7762 msgid "guestfs_lgetxattrs"
7766 #: ../src/guestfs-actions.pod:2442
7769 " struct guestfs_xattr_list *guestfs_lgetxattrs (guestfs_h *g,\n"
7770 "\t\tconst char *path);\n"
7775 #: ../src/guestfs-actions.pod:2445
7777 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
7778 "then it returns the extended attributes of the link itself."
7782 #: ../src/guestfs-actions.pod:2454
7783 msgid "guestfs_list_devices"
7787 #: ../src/guestfs-actions.pod:2456
7790 " char **guestfs_list_devices (guestfs_h *g);\n"
7795 #: ../src/guestfs-actions.pod:2458 ../fish/guestfish-actions.pod:1951
7796 msgid "List all the block devices."
7800 #: ../src/guestfs-actions.pod:2460 ../fish/guestfish-actions.pod:1953
7801 msgid "The full block device names are returned, eg. C</dev/sda>"
7805 #: ../src/guestfs-actions.pod:2466
7806 msgid "guestfs_list_partitions"
7810 #: ../src/guestfs-actions.pod:2468
7813 " char **guestfs_list_partitions (guestfs_h *g);\n"
7818 #: ../src/guestfs-actions.pod:2470 ../fish/guestfish-actions.pod:1959
7819 msgid "List all the partitions detected on all block devices."
7823 #: ../src/guestfs-actions.pod:2472 ../fish/guestfish-actions.pod:1961
7824 msgid "The full partition device names are returned, eg. C</dev/sda1>"
7828 #: ../src/guestfs-actions.pod:2474
7830 "This does not return logical volumes. For that you will need to call "
7835 #: ../src/guestfs-actions.pod:2481
7840 #: ../src/guestfs-actions.pod:2483
7843 " char *guestfs_ll (guestfs_h *g,\n"
7844 "\t\tconst char *directory);\n"
7849 #: ../src/guestfs-actions.pod:2486 ../fish/guestfish-actions.pod:1970
7851 "List the files in C<directory> (relative to the root directory, there is no "
7852 "cwd) in the format of 'ls -la'."
7856 #: ../src/guestfs-actions.pod:2489 ../fish/guestfish-actions.pod:1973
7858 "This command is mostly useful for interactive sessions. It is I<not> "
7859 "intended that you try to parse the output string."
7863 #: ../src/guestfs-actions.pod:2495
7868 #: ../src/guestfs-actions.pod:2497
7871 " int guestfs_ln (guestfs_h *g,\n"
7872 "\t\tconst char *target,\n"
7873 "\t\tconst char *linkname);\n"
7878 #: ../src/guestfs-actions.pod:2501 ../fish/guestfish-actions.pod:1980
7879 msgid "This command creates a hard link using the C<ln> command."
7883 #: ../src/guestfs-actions.pod:2505
7884 msgid "guestfs_ln_f"
7888 #: ../src/guestfs-actions.pod:2507
7891 " int guestfs_ln_f (guestfs_h *g,\n"
7892 "\t\tconst char *target,\n"
7893 "\t\tconst char *linkname);\n"
7898 #: ../src/guestfs-actions.pod:2511 ../fish/guestfish-actions.pod:1986
7900 "This command creates a hard link using the C<ln -f> command. The C<-f> "
7901 "option removes the link (C<linkname>) if it exists already."
7905 #: ../src/guestfs-actions.pod:2516
7906 msgid "guestfs_ln_s"
7910 #: ../src/guestfs-actions.pod:2518
7913 " int guestfs_ln_s (guestfs_h *g,\n"
7914 "\t\tconst char *target,\n"
7915 "\t\tconst char *linkname);\n"
7920 #: ../src/guestfs-actions.pod:2522 ../fish/guestfish-actions.pod:1993
7921 msgid "This command creates a symbolic link using the C<ln -s> command."
7925 #: ../src/guestfs-actions.pod:2526
7926 msgid "guestfs_ln_sf"
7930 #: ../src/guestfs-actions.pod:2528
7933 " int guestfs_ln_sf (guestfs_h *g,\n"
7934 "\t\tconst char *target,\n"
7935 "\t\tconst char *linkname);\n"
7940 #: ../src/guestfs-actions.pod:2532 ../fish/guestfish-actions.pod:1999
7942 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
7943 "option removes the link (C<linkname>) if it exists already."
7947 #: ../src/guestfs-actions.pod:2537
7948 msgid "guestfs_lremovexattr"
7952 #: ../src/guestfs-actions.pod:2539
7955 " int guestfs_lremovexattr (guestfs_h *g,\n"
7956 "\t\tconst char *xattr,\n"
7957 "\t\tconst char *path);\n"
7962 #: ../src/guestfs-actions.pod:2543
7964 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
7965 "link, then it removes an extended attribute of the link itself."
7969 #: ../src/guestfs-actions.pod:2549
7974 #: ../src/guestfs-actions.pod:2551
7977 " char **guestfs_ls (guestfs_h *g,\n"
7978 "\t\tconst char *directory);\n"
7983 #: ../src/guestfs-actions.pod:2554 ../fish/guestfish-actions.pod:2014
7985 "List the files in C<directory> (relative to the root directory, there is no "
7986 "cwd). The '.' and '..' entries are not returned, but hidden files are "
7991 #: ../src/guestfs-actions.pod:2558
7993 "This command is mostly useful for interactive sessions. Programs should "
7994 "probably use C<guestfs_readdir> instead."
7998 #: ../src/guestfs-actions.pod:2565
7999 msgid "guestfs_lsetxattr"
8003 #: ../src/guestfs-actions.pod:2567
8006 " int guestfs_lsetxattr (guestfs_h *g,\n"
8007 "\t\tconst char *xattr,\n"
8008 "\t\tconst char *val,\n"
8010 "\t\tconst char *path);\n"
8015 #: ../src/guestfs-actions.pod:2573
8017 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
8018 "then it sets an extended attribute of the link itself."
8022 #: ../src/guestfs-actions.pod:2579
8023 msgid "guestfs_lstat"
8027 #: ../src/guestfs-actions.pod:2581
8030 " struct guestfs_stat *guestfs_lstat (guestfs_h *g,\n"
8031 "\t\tconst char *path);\n"
8036 #: ../src/guestfs-actions.pod:2584 ../src/guestfs-actions.pod:4567 ../fish/guestfish-actions.pod:2033 ../fish/guestfish-actions.pod:3522
8037 msgid "Returns file information for the given C<path>."
8041 #: ../src/guestfs-actions.pod:2586
8043 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
8044 "link, then the link is stat-ed, not the file it refers to."
8048 #: ../src/guestfs-actions.pod:2590 ../fish/guestfish-actions.pod:2039
8049 msgid "This is the same as the C<lstat(2)> system call."
8053 #: ../src/guestfs-actions.pod:2592 ../src/guestfs-actions.pod:4571
8055 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
8056 "error. I<The caller must call C<guestfs_free_stat> after use>."
8060 #: ../src/guestfs-actions.pod:2596
8061 msgid "guestfs_lstatlist"
8065 #: ../src/guestfs-actions.pod:2598
8068 " struct guestfs_stat_list *guestfs_lstatlist (guestfs_h *g,\n"
8069 "\t\tconst char *path,\n"
8070 "\t\tchar *const *names);\n"
8075 #: ../src/guestfs-actions.pod:2602
8077 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
8078 "files, where all files are in the directory C<path>. C<names> is the list "
8079 "of files from this directory."
8083 #: ../src/guestfs-actions.pod:2606 ../fish/guestfish-actions.pod:2049
8085 "On return you get a list of stat structs, with a one-to-one correspondence "
8086 "to the C<names> list. If any name did not exist or could not be lstat'd, "
8087 "then the C<ino> field of that structure is set to C<-1>."
8091 #: ../src/guestfs-actions.pod:2611
8093 "This call is intended for programs that want to efficiently list a directory "
8094 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
8095 "for a similarly efficient call for getting extended attributes. Very long "
8096 "directory listings might cause the protocol message size to be exceeded, "
8097 "causing this call to fail. The caller must split up such requests into "
8098 "smaller groups of names."
8102 #: ../src/guestfs-actions.pod:2619
8104 "This function returns a C<struct guestfs_stat_list *> (see "
8105 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
8106 "must call C<guestfs_free_stat_list> after use>."
8110 #: ../src/guestfs-actions.pod:2624
8111 msgid "guestfs_luks_add_key"
8115 #: ../src/guestfs-actions.pod:2626
8118 " int guestfs_luks_add_key (guestfs_h *g,\n"
8119 "\t\tconst char *device,\n"
8120 "\t\tconst char *key,\n"
8121 "\t\tconst char *newkey,\n"
8122 "\t\tint keyslot);\n"
8127 #: ../src/guestfs-actions.pod:2632 ../fish/guestfish-actions.pod:2066
8129 "This command adds a new key on LUKS device C<device>. C<key> is any "
8130 "existing key, and is used to access the device. C<newkey> is the new key to "
8131 "add. C<keyslot> is the key slot that will be replaced."
8135 #: ../src/guestfs-actions.pod:2637
8137 "Note that if C<keyslot> already contains a key, then this command will "
8138 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
8142 #: ../src/guestfs-actions.pod:2643 ../src/guestfs-actions.pod:2677 ../src/guestfs-actions.pod:2697 ../src/guestfs-actions.pod:2714 ../src/guestfs-actions.pod:2743 ../src/guestfs-actions.pod:2759
8144 "This function takes a key or passphrase parameter which could contain "
8145 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
8150 #: ../src/guestfs-actions.pod:2647
8151 msgid "guestfs_luks_close"
8155 #: ../src/guestfs-actions.pod:2649
8158 " int guestfs_luks_close (guestfs_h *g,\n"
8159 "\t\tconst char *device);\n"
8164 #: ../src/guestfs-actions.pod:2652
8166 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
8167 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
8168 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
8169 "underlying block device."
8173 #: ../src/guestfs-actions.pod:2660
8174 msgid "guestfs_luks_format"
8178 #: ../src/guestfs-actions.pod:2662
8181 " int guestfs_luks_format (guestfs_h *g,\n"
8182 "\t\tconst char *device,\n"
8183 "\t\tconst char *key,\n"
8184 "\t\tint keyslot);\n"
8189 #: ../src/guestfs-actions.pod:2667 ../fish/guestfish-actions.pod:2092
8191 "This command erases existing data on C<device> and formats the device as a "
8192 "LUKS encrypted device. C<key> is the initial key, which is added to key "
8193 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
8197 #: ../src/guestfs-actions.pod:2674 ../src/guestfs-actions.pod:2694 ../src/guestfs-actions.pod:2796 ../src/guestfs-actions.pod:3508 ../src/guestfs-actions.pod:4108 ../src/guestfs-actions.pod:4429 ../src/guestfs-actions.pod:4449 ../src/guestfs-actions.pod:4472 ../src/guestfs-actions.pod:5411 ../fish/guestfish-actions.pod:2100 ../fish/guestfish-actions.pod:2113 ../fish/guestfish-actions.pod:2184 ../fish/guestfish-actions.pod:2699 ../fish/guestfish-actions.pod:3163 ../fish/guestfish-actions.pod:3421 ../fish/guestfish-actions.pod:3437 ../fish/guestfish-actions.pod:3452 ../fish/guestfish-actions.pod:4140
8199 "B<This command is dangerous. Without careful use you can easily destroy all "
8204 #: ../src/guestfs-actions.pod:2681
8205 msgid "guestfs_luks_format_cipher"
8209 #: ../src/guestfs-actions.pod:2683
8212 " int guestfs_luks_format_cipher (guestfs_h *g,\n"
8213 "\t\tconst char *device,\n"
8214 "\t\tconst char *key,\n"
8215 "\t\tint keyslot,\n"
8216 "\t\tconst char *cipher);\n"
8221 #: ../src/guestfs-actions.pod:2689
8223 "This command is the same as C<guestfs_luks_format> but it also allows you to "
8224 "set the C<cipher> used."
8228 #: ../src/guestfs-actions.pod:2701
8229 msgid "guestfs_luks_kill_slot"
8233 #: ../src/guestfs-actions.pod:2703
8236 " int guestfs_luks_kill_slot (guestfs_h *g,\n"
8237 "\t\tconst char *device,\n"
8238 "\t\tconst char *key,\n"
8239 "\t\tint keyslot);\n"
8244 #: ../src/guestfs-actions.pod:2708 ../fish/guestfish-actions.pod:2120
8246 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
8247 "device C<device>. C<key> must be one of the I<other> keys."
8251 #: ../src/guestfs-actions.pod:2718
8252 msgid "guestfs_luks_open"
8256 #: ../src/guestfs-actions.pod:2720
8259 " int guestfs_luks_open (guestfs_h *g,\n"
8260 "\t\tconst char *device,\n"
8261 "\t\tconst char *key,\n"
8262 "\t\tconst char *mapname);\n"
8267 #: ../src/guestfs-actions.pod:2725 ../fish/guestfish-actions.pod:2131
8269 "This command opens a block device which has been encrypted according to the "
8270 "Linux Unified Key Setup (LUKS) standard."
8274 #: ../src/guestfs-actions.pod:2728 ../fish/guestfish-actions.pod:2134
8275 msgid "C<device> is the encrypted block device or partition."
8279 #: ../src/guestfs-actions.pod:2730 ../fish/guestfish-actions.pod:2136
8281 "The caller must supply one of the keys associated with the LUKS block "
8282 "device, in the C<key> parameter."
8286 #: ../src/guestfs-actions.pod:2733 ../fish/guestfish-actions.pod:2139
8288 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
8289 "writes to this block device are decrypted from and encrypted to the "
8290 "underlying C<device> respectively."
8294 #: ../src/guestfs-actions.pod:2737
8296 "If this block device contains LVM volume groups, then calling "
8297 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
8302 #: ../src/guestfs-actions.pod:2747
8303 msgid "guestfs_luks_open_ro"
8307 #: ../src/guestfs-actions.pod:2749
8310 " int guestfs_luks_open_ro (guestfs_h *g,\n"
8311 "\t\tconst char *device,\n"
8312 "\t\tconst char *key,\n"
8313 "\t\tconst char *mapname);\n"
8318 #: ../src/guestfs-actions.pod:2754
8320 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
8325 #: ../src/guestfs-actions.pod:2763
8326 msgid "guestfs_lvcreate"
8330 #: ../src/guestfs-actions.pod:2765
8333 " int guestfs_lvcreate (guestfs_h *g,\n"
8334 "\t\tconst char *logvol,\n"
8335 "\t\tconst char *volgroup,\n"
8336 "\t\tint mbytes);\n"
8341 #: ../src/guestfs-actions.pod:2770 ../fish/guestfish-actions.pod:2164
8343 "This creates an LVM logical volume called C<logvol> on the volume group "
8344 "C<volgroup>, with C<size> megabytes."
8348 #: ../src/guestfs-actions.pod:2775
8349 msgid "guestfs_lvm_clear_filter"
8353 #: ../src/guestfs-actions.pod:2777
8356 " int guestfs_lvm_clear_filter (guestfs_h *g);\n"
8361 #: ../src/guestfs-actions.pod:2779
8363 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
8364 "see every block device."
8368 #: ../src/guestfs-actions.pod:2782 ../src/guestfs-actions.pod:2818 ../fish/guestfish-actions.pod:2174 ../fish/guestfish-actions.pod:2205
8369 msgid "This command also clears the LVM cache and performs a volume group scan."
8373 #: ../src/guestfs-actions.pod:2787
8374 msgid "guestfs_lvm_remove_all"
8378 #: ../src/guestfs-actions.pod:2789
8381 " int guestfs_lvm_remove_all (guestfs_h *g);\n"
8386 #: ../src/guestfs-actions.pod:2791 ../fish/guestfish-actions.pod:2181
8388 "This command removes all LVM logical volumes, volume groups and physical "
8393 #: ../src/guestfs-actions.pod:2799
8394 msgid "guestfs_lvm_set_filter"
8398 #: ../src/guestfs-actions.pod:2801
8401 " int guestfs_lvm_set_filter (guestfs_h *g,\n"
8402 "\t\tchar *const *devices);\n"
8407 #: ../src/guestfs-actions.pod:2804 ../fish/guestfish-actions.pod:2191
8409 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
8410 "block devices in the list C<devices>, and will ignore all other attached "
8415 #: ../src/guestfs-actions.pod:2808 ../fish/guestfish-actions.pod:2195
8417 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
8418 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
8419 "there are two types of duplication possible: either cloned PVs/VGs which "
8420 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
8421 "same name. In normal operation you cannot create this situation, but you "
8422 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
8423 "inside the LVM metadata."
8427 #: ../src/guestfs-actions.pod:2821 ../fish/guestfish-actions.pod:2208
8428 msgid "You can filter whole block devices or individual partitions."
8432 #: ../src/guestfs-actions.pod:2823 ../fish/guestfish-actions.pod:2210
8434 "You cannot use this if any VG is currently in use (eg. contains a mounted "
8435 "filesystem), even if you are not filtering out that VG."
8439 #: ../src/guestfs-actions.pod:2829
8440 msgid "guestfs_lvremove"
8444 #: ../src/guestfs-actions.pod:2831
8447 " int guestfs_lvremove (guestfs_h *g,\n"
8448 "\t\tconst char *device);\n"
8453 #: ../src/guestfs-actions.pod:2834 ../fish/guestfish-actions.pod:2218
8455 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
8456 "LV, such as C</dev/VG/LV>."
8460 #: ../src/guestfs-actions.pod:2837 ../fish/guestfish-actions.pod:2221
8462 "You can also remove all LVs in a volume group by specifying the VG name, "
8467 #: ../src/guestfs-actions.pod:2842
8468 msgid "guestfs_lvrename"
8472 #: ../src/guestfs-actions.pod:2844
8475 " int guestfs_lvrename (guestfs_h *g,\n"
8476 "\t\tconst char *logvol,\n"
8477 "\t\tconst char *newlogvol);\n"
8482 #: ../src/guestfs-actions.pod:2848 ../fish/guestfish-actions.pod:2228
8483 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
8487 #: ../src/guestfs-actions.pod:2852
8488 msgid "guestfs_lvresize"
8492 #: ../src/guestfs-actions.pod:2854
8495 " int guestfs_lvresize (guestfs_h *g,\n"
8496 "\t\tconst char *device,\n"
8497 "\t\tint mbytes);\n"
8502 #: ../src/guestfs-actions.pod:2858 ../fish/guestfish-actions.pod:2234
8504 "This resizes (expands or shrinks) an existing LVM logical volume to "
8505 "C<mbytes>. When reducing, data in the reduced part is lost."
8509 #: ../src/guestfs-actions.pod:2864
8510 msgid "guestfs_lvresize_free"
8514 #: ../src/guestfs-actions.pod:2866
8517 " int guestfs_lvresize_free (guestfs_h *g,\n"
8518 "\t\tconst char *lv,\n"
8519 "\t\tint percent);\n"
8524 #: ../src/guestfs-actions.pod:2870 ../fish/guestfish-actions.pod:2242
8526 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
8527 "remaining free space in the volume group. Commonly you would call this with "
8528 "pc = 100 which expands the logical volume as much as possible, using all "
8529 "remaining free space in the volume group."
8533 #: ../src/guestfs-actions.pod:2878
8538 #: ../src/guestfs-actions.pod:2880
8541 " char **guestfs_lvs (guestfs_h *g);\n"
8546 #: ../src/guestfs-actions.pod:2882 ../fish/guestfish-actions.pod:2252
8548 "List all the logical volumes detected. This is the equivalent of the "
8549 "L<lvs(8)> command."
8553 #: ../src/guestfs-actions.pod:2885 ../fish/guestfish-actions.pod:2255
8555 "This returns a list of the logical volume device names "
8556 "(eg. C</dev/VolGroup00/LogVol00>)."
8560 #: ../src/guestfs-actions.pod:2888
8561 msgid "See also C<guestfs_lvs_full>."
8565 #: ../src/guestfs-actions.pod:2894
8566 msgid "guestfs_lvs_full"
8570 #: ../src/guestfs-actions.pod:2896
8573 " struct guestfs_lvm_lv_list *guestfs_lvs_full (guestfs_h *g);\n"
8578 #: ../src/guestfs-actions.pod:2898 ../fish/guestfish-actions.pod:2264
8580 "List all the logical volumes detected. This is the equivalent of the "
8581 "L<lvs(8)> command. The \"full\" version includes all fields."
8585 #: ../src/guestfs-actions.pod:2901
8587 "This function returns a C<struct guestfs_lvm_lv_list *> (see "
8588 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
8589 "must call C<guestfs_free_lvm_lv_list> after use>."
8593 #: ../src/guestfs-actions.pod:2906
8594 msgid "guestfs_lvuuid"
8598 #: ../src/guestfs-actions.pod:2908
8601 " char *guestfs_lvuuid (guestfs_h *g,\n"
8602 "\t\tconst char *device);\n"
8607 #: ../src/guestfs-actions.pod:2911 ../fish/guestfish-actions.pod:2271
8608 msgid "This command returns the UUID of the LVM LV C<device>."
8612 #: ../src/guestfs-actions.pod:2916
8613 msgid "guestfs_lxattrlist"
8617 #: ../src/guestfs-actions.pod:2918
8620 " struct guestfs_xattr_list *guestfs_lxattrlist (guestfs_h *g,\n"
8621 "\t\tconst char *path,\n"
8622 "\t\tchar *const *names);\n"
8627 #: ../src/guestfs-actions.pod:2922 ../fish/guestfish-actions.pod:2277
8629 "This call allows you to get the extended attributes of multiple files, where "
8630 "all files are in the directory C<path>. C<names> is the list of files from "
8635 #: ../src/guestfs-actions.pod:2926 ../fish/guestfish-actions.pod:2281
8637 "On return you get a flat list of xattr structs which must be interpreted "
8638 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
8639 "C<attrval> in this struct is zero-length to indicate there was an error "
8640 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
8641 "number (the number of following attributes for this file, which could be "
8642 "C<\"0\">). Then after the first xattr struct are the zero or more "
8643 "attributes for the first named file. This repeats for the second and "
8648 #: ../src/guestfs-actions.pod:2936
8650 "This call is intended for programs that want to efficiently list a directory "
8651 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
8652 "a similarly efficient call for getting standard stats. Very long directory "
8653 "listings might cause the protocol message size to be exceeded, causing this "
8654 "call to fail. The caller must split up such requests into smaller groups of "
8659 #: ../src/guestfs-actions.pod:2949
8660 msgid "guestfs_mkdir"
8664 #: ../src/guestfs-actions.pod:2951
8667 " int guestfs_mkdir (guestfs_h *g,\n"
8668 "\t\tconst char *path);\n"
8673 #: ../src/guestfs-actions.pod:2954 ../fish/guestfish-actions.pod:2303
8674 msgid "Create a directory named C<path>."
8678 #: ../src/guestfs-actions.pod:2958
8679 msgid "guestfs_mkdir_mode"
8683 #: ../src/guestfs-actions.pod:2960
8686 " int guestfs_mkdir_mode (guestfs_h *g,\n"
8687 "\t\tconst char *path,\n"
8693 #: ../src/guestfs-actions.pod:2964 ../fish/guestfish-actions.pod:2309
8695 "This command creates a directory, setting the initial permissions of the "
8696 "directory to C<mode>."
8700 #: ../src/guestfs-actions.pod:2967 ../fish/guestfish-actions.pod:2312
8702 "For common Linux filesystems, the actual mode which is set will be C<mode & "
8703 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
8708 #: ../src/guestfs-actions.pod:2971
8709 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
8713 #: ../src/guestfs-actions.pod:2975
8714 msgid "guestfs_mkdir_p"
8718 #: ../src/guestfs-actions.pod:2977
8721 " int guestfs_mkdir_p (guestfs_h *g,\n"
8722 "\t\tconst char *path);\n"
8727 #: ../src/guestfs-actions.pod:2980 ../fish/guestfish-actions.pod:2322
8729 "Create a directory named C<path>, creating any parent directories as "
8730 "necessary. This is like the C<mkdir -p> shell command."
8734 #: ../src/guestfs-actions.pod:2985
8735 msgid "guestfs_mkdtemp"
8739 #: ../src/guestfs-actions.pod:2987
8742 " char *guestfs_mkdtemp (guestfs_h *g,\n"
8743 "\t\tconst char *template);\n"
8748 #: ../src/guestfs-actions.pod:2990 ../fish/guestfish-actions.pod:2329
8750 "This command creates a temporary directory. The C<template> parameter "
8751 "should be a full pathname for the temporary directory name with the final "
8752 "six characters being \"XXXXXX\"."
8756 #: ../src/guestfs-actions.pod:2995 ../fish/guestfish-actions.pod:2334
8758 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
8759 "being suitable for Windows filesystems."
8763 #: ../src/guestfs-actions.pod:2998 ../fish/guestfish-actions.pod:2337
8764 msgid "The name of the temporary directory that was created is returned."
8768 #: ../src/guestfs-actions.pod:3001 ../fish/guestfish-actions.pod:2340
8769 msgid "The temporary directory is created with mode 0700 and is owned by root."
8773 #: ../src/guestfs-actions.pod:3004 ../fish/guestfish-actions.pod:2343
8775 "The caller is responsible for deleting the temporary directory and its "
8776 "contents after use."
8780 #: ../src/guestfs-actions.pod:3007 ../fish/guestfish-actions.pod:2346
8781 msgid "See also: L<mkdtemp(3)>"
8785 #: ../src/guestfs-actions.pod:3012
8786 msgid "guestfs_mke2fs_J"
8790 #: ../src/guestfs-actions.pod:3014
8793 " int guestfs_mke2fs_J (guestfs_h *g,\n"
8794 "\t\tconst char *fstype,\n"
8795 "\t\tint blocksize,\n"
8796 "\t\tconst char *device,\n"
8797 "\t\tconst char *journal);\n"
8802 #: ../src/guestfs-actions.pod:3020 ../fish/guestfish-actions.pod:2352
8804 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
8805 "C<journal>. It is equivalent to the command:"
8809 #: ../src/guestfs-actions.pod:3024 ../fish/guestfish-actions.pod:2356
8812 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
8817 #: ../src/guestfs-actions.pod:3026
8818 msgid "See also C<guestfs_mke2journal>."
8822 #: ../src/guestfs-actions.pod:3030
8823 msgid "guestfs_mke2fs_JL"
8827 #: ../src/guestfs-actions.pod:3032
8830 " int guestfs_mke2fs_JL (guestfs_h *g,\n"
8831 "\t\tconst char *fstype,\n"
8832 "\t\tint blocksize,\n"
8833 "\t\tconst char *device,\n"
8834 "\t\tconst char *label);\n"
8839 #: ../src/guestfs-actions.pod:3038 ../fish/guestfish-actions.pod:2364
8841 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
8842 "the journal labeled C<label>."
8846 #: ../src/guestfs-actions.pod:3041
8847 msgid "See also C<guestfs_mke2journal_L>."
8851 #: ../src/guestfs-actions.pod:3045
8852 msgid "guestfs_mke2fs_JU"
8856 #: ../src/guestfs-actions.pod:3047
8859 " int guestfs_mke2fs_JU (guestfs_h *g,\n"
8860 "\t\tconst char *fstype,\n"
8861 "\t\tint blocksize,\n"
8862 "\t\tconst char *device,\n"
8863 "\t\tconst char *uuid);\n"
8868 #: ../src/guestfs-actions.pod:3053 ../fish/guestfish-actions.pod:2373
8870 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
8871 "the journal with UUID C<uuid>."
8875 #: ../src/guestfs-actions.pod:3056
8876 msgid "See also C<guestfs_mke2journal_U>."
8880 #: ../src/guestfs-actions.pod:3060
8881 msgid "guestfs_mke2journal"
8885 #: ../src/guestfs-actions.pod:3062
8888 " int guestfs_mke2journal (guestfs_h *g,\n"
8889 "\t\tint blocksize,\n"
8890 "\t\tconst char *device);\n"
8895 #: ../src/guestfs-actions.pod:3066 ../fish/guestfish-actions.pod:2382
8897 "This creates an ext2 external journal on C<device>. It is equivalent to the "
8902 #: ../src/guestfs-actions.pod:3069 ../fish/guestfish-actions.pod:2385
8905 " mke2fs -O journal_dev -b blocksize device\n"
8910 #: ../src/guestfs-actions.pod:3073
8911 msgid "guestfs_mke2journal_L"
8915 #: ../src/guestfs-actions.pod:3075
8918 " int guestfs_mke2journal_L (guestfs_h *g,\n"
8919 "\t\tint blocksize,\n"
8920 "\t\tconst char *label,\n"
8921 "\t\tconst char *device);\n"
8926 #: ../src/guestfs-actions.pod:3080 ../fish/guestfish-actions.pod:2391
8927 msgid "This creates an ext2 external journal on C<device> with label C<label>."
8931 #: ../src/guestfs-actions.pod:3084
8932 msgid "guestfs_mke2journal_U"
8936 #: ../src/guestfs-actions.pod:3086
8939 " int guestfs_mke2journal_U (guestfs_h *g,\n"
8940 "\t\tint blocksize,\n"
8941 "\t\tconst char *uuid,\n"
8942 "\t\tconst char *device);\n"
8947 #: ../src/guestfs-actions.pod:3091 ../fish/guestfish-actions.pod:2397
8948 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
8952 #: ../src/guestfs-actions.pod:3095
8953 msgid "guestfs_mkfifo"
8957 #: ../src/guestfs-actions.pod:3097
8960 " int guestfs_mkfifo (guestfs_h *g,\n"
8962 "\t\tconst char *path);\n"
8967 #: ../src/guestfs-actions.pod:3101
8969 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
8970 "is just a convenient wrapper around C<guestfs_mknod>."
8974 #: ../src/guestfs-actions.pod:3109
8975 msgid "guestfs_mkfs"
8979 #: ../src/guestfs-actions.pod:3111
8982 " int guestfs_mkfs (guestfs_h *g,\n"
8983 "\t\tconst char *fstype,\n"
8984 "\t\tconst char *device);\n"
8989 #: ../src/guestfs-actions.pod:3115 ../fish/guestfish-actions.pod:2413
8991 "This creates a filesystem on C<device> (usually a partition or LVM logical "
8992 "volume). The filesystem type is C<fstype>, for example C<ext3>."
8996 #: ../src/guestfs-actions.pod:3121
8997 msgid "guestfs_mkfs_b"
9001 #: ../src/guestfs-actions.pod:3123
9004 " int guestfs_mkfs_b (guestfs_h *g,\n"
9005 "\t\tconst char *fstype,\n"
9006 "\t\tint blocksize,\n"
9007 "\t\tconst char *device);\n"
9012 #: ../src/guestfs-actions.pod:3128
9014 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
9015 "block size of the resulting filesystem. Supported block sizes depend on the "
9016 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
9020 #: ../src/guestfs-actions.pod:3133 ../fish/guestfish-actions.pod:2426
9022 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
9027 #: ../src/guestfs-actions.pod:3138
9028 msgid "guestfs_mkmountpoint"
9032 #: ../src/guestfs-actions.pod:3140
9035 " int guestfs_mkmountpoint (guestfs_h *g,\n"
9036 "\t\tconst char *exemptpath);\n"
9041 #: ../src/guestfs-actions.pod:3143
9043 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
9044 "that can be used to create extra mountpoints before mounting the first "
9049 #: ../src/guestfs-actions.pod:3147 ../fish/guestfish-actions.pod:2437
9051 "These calls are I<only> necessary in some very limited circumstances, mainly "
9052 "the case where you want to mount a mix of unrelated and/or read-only "
9053 "filesystems together."
9057 #: ../src/guestfs-actions.pod:3151 ../fish/guestfish-actions.pod:2441
9059 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
9060 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
9061 "inside that. You can unpack this as follows in guestfish:"
9065 #: ../src/guestfs-actions.pod:3156 ../fish/guestfish-actions.pod:2446
9068 " add-ro Fedora-11-i686-Live.iso\n"
9070 " mkmountpoint /cd\n"
9071 " mkmountpoint /squash\n"
9072 " mkmountpoint /ext3\n"
9073 " mount /dev/sda /cd\n"
9074 " mount-loop /cd/LiveOS/squashfs.img /squash\n"
9075 " mount-loop /squash/LiveOS/ext3fs.img /ext3\n"
9080 #: ../src/guestfs-actions.pod:3165 ../fish/guestfish-actions.pod:2455
9081 msgid "The inner filesystem is now unpacked under the /ext3 mountpoint."
9085 #: ../src/guestfs-actions.pod:3169
9086 msgid "guestfs_mknod"
9090 #: ../src/guestfs-actions.pod:3171
9093 " int guestfs_mknod (guestfs_h *g,\n"
9095 "\t\tint devmajor,\n"
9096 "\t\tint devminor,\n"
9097 "\t\tconst char *path);\n"
9102 #: ../src/guestfs-actions.pod:3177 ../fish/guestfish-actions.pod:2461
9104 "This call creates block or character special devices, or named pipes "
9109 #: ../src/guestfs-actions.pod:3180 ../fish/guestfish-actions.pod:2464
9111 "The C<mode> parameter should be the mode, using the standard constants. "
9112 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
9113 "used when creating block and character special devices."
9117 #: ../src/guestfs-actions.pod:3185
9119 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
9120 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
9121 "regular file). These constants are available in the standard Linux header "
9122 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
9123 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
9124 "the appropriate constant for you."
9128 #: ../src/guestfs-actions.pod:3197
9129 msgid "guestfs_mknod_b"
9133 #: ../src/guestfs-actions.pod:3199
9136 " int guestfs_mknod_b (guestfs_h *g,\n"
9138 "\t\tint devmajor,\n"
9139 "\t\tint devminor,\n"
9140 "\t\tconst char *path);\n"
9145 #: ../src/guestfs-actions.pod:3205
9147 "This call creates a block device node called C<path> with mode C<mode> and "
9148 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
9149 "wrapper around C<guestfs_mknod>."
9153 #: ../src/guestfs-actions.pod:3213
9154 msgid "guestfs_mknod_c"
9158 #: ../src/guestfs-actions.pod:3215
9161 " int guestfs_mknod_c (guestfs_h *g,\n"
9163 "\t\tint devmajor,\n"
9164 "\t\tint devminor,\n"
9165 "\t\tconst char *path);\n"
9170 #: ../src/guestfs-actions.pod:3221
9172 "This call creates a char device node called C<path> with mode C<mode> and "
9173 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
9174 "wrapper around C<guestfs_mknod>."
9178 #: ../src/guestfs-actions.pod:3229
9179 msgid "guestfs_mkswap"
9183 #: ../src/guestfs-actions.pod:3231
9186 " int guestfs_mkswap (guestfs_h *g,\n"
9187 "\t\tconst char *device);\n"
9192 #: ../src/guestfs-actions.pod:3234 ../fish/guestfish-actions.pod:2503
9193 msgid "Create a swap partition on C<device>."
9197 #: ../src/guestfs-actions.pod:3238
9198 msgid "guestfs_mkswap_L"
9202 #: ../src/guestfs-actions.pod:3240
9205 " int guestfs_mkswap_L (guestfs_h *g,\n"
9206 "\t\tconst char *label,\n"
9207 "\t\tconst char *device);\n"
9212 #: ../src/guestfs-actions.pod:3244 ../fish/guestfish-actions.pod:2509
9213 msgid "Create a swap partition on C<device> with label C<label>."
9217 #: ../src/guestfs-actions.pod:3246 ../fish/guestfish-actions.pod:2511
9219 "Note that you cannot attach a swap label to a block device "
9220 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
9221 "the kernel or swap tools."
9225 #: ../src/guestfs-actions.pod:3252
9226 msgid "guestfs_mkswap_U"
9230 #: ../src/guestfs-actions.pod:3254
9233 " int guestfs_mkswap_U (guestfs_h *g,\n"
9234 "\t\tconst char *uuid,\n"
9235 "\t\tconst char *device);\n"
9240 #: ../src/guestfs-actions.pod:3258 ../fish/guestfish-actions.pod:2519
9241 msgid "Create a swap partition on C<device> with UUID C<uuid>."
9245 #: ../src/guestfs-actions.pod:3262
9246 msgid "guestfs_mkswap_file"
9250 #: ../src/guestfs-actions.pod:3264
9253 " int guestfs_mkswap_file (guestfs_h *g,\n"
9254 "\t\tconst char *path);\n"
9259 #: ../src/guestfs-actions.pod:3267 ../fish/guestfish-actions.pod:2525
9260 msgid "Create a swap file."
9264 #: ../src/guestfs-actions.pod:3269
9266 "This command just writes a swap file signature to an existing file. To "
9267 "create the file itself, use something like C<guestfs_fallocate>."
9271 #: ../src/guestfs-actions.pod:3274
9272 msgid "guestfs_modprobe"
9276 #: ../src/guestfs-actions.pod:3276
9279 " int guestfs_modprobe (guestfs_h *g,\n"
9280 "\t\tconst char *modulename);\n"
9285 #: ../src/guestfs-actions.pod:3279 ../fish/guestfish-actions.pod:2534
9286 msgid "This loads a kernel module in the appliance."
9290 #: ../src/guestfs-actions.pod:3281 ../fish/guestfish-actions.pod:2536
9292 "The kernel module must have been whitelisted when libguestfs was built (see "
9293 "C<appliance/kmod.whitelist.in> in the source)."
9297 #: ../src/guestfs-actions.pod:3286
9298 msgid "guestfs_mount"
9302 #: ../src/guestfs-actions.pod:3288
9305 " int guestfs_mount (guestfs_h *g,\n"
9306 "\t\tconst char *device,\n"
9307 "\t\tconst char *mountpoint);\n"
9312 #: ../src/guestfs-actions.pod:3292 ../fish/guestfish-actions.pod:2543
9314 "Mount a guest disk at a position in the filesystem. Block devices are named "
9315 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
9316 "those block devices contain partitions, they will have the usual names "
9317 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
9321 #: ../src/guestfs-actions.pod:3298 ../fish/guestfish-actions.pod:2549
9323 "The rules are the same as for L<mount(2)>: A filesystem must first be "
9324 "mounted on C</> before others can be mounted. Other filesystems can only be "
9325 "mounted on directories which already exist."
9329 #: ../src/guestfs-actions.pod:3303 ../fish/guestfish-actions.pod:2554
9331 "The mounted filesystem is writable, if we have sufficient permissions on the "
9332 "underlying device."
9336 #: ../src/guestfs-actions.pod:3306
9338 "B<Important note:> When you use this call, the filesystem options C<sync> "
9339 "and C<noatime> are set implicitly. This was originally done because we "
9340 "thought it would improve reliability, but it turns out that I<-o sync> has a "
9341 "very large negative performance impact and negligible effect on "
9342 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
9343 "in any code that needs performance, and instead use C<guestfs_mount_options> "
9344 "(use an empty string for the first parameter if you don't want any options)."
9348 #: ../src/guestfs-actions.pod:3318
9349 msgid "guestfs_mount_loop"
9353 #: ../src/guestfs-actions.pod:3320
9356 " int guestfs_mount_loop (guestfs_h *g,\n"
9357 "\t\tconst char *file,\n"
9358 "\t\tconst char *mountpoint);\n"
9363 #: ../src/guestfs-actions.pod:3324 ../fish/guestfish-actions.pod:2571
9365 "This command lets you mount C<file> (a filesystem image in a file) on a "
9366 "mount point. It is entirely equivalent to the command C<mount -o loop file "
9371 #: ../src/guestfs-actions.pod:3330
9372 msgid "guestfs_mount_options"
9376 #: ../src/guestfs-actions.pod:3332
9379 " int guestfs_mount_options (guestfs_h *g,\n"
9380 "\t\tconst char *options,\n"
9381 "\t\tconst char *device,\n"
9382 "\t\tconst char *mountpoint);\n"
9387 #: ../src/guestfs-actions.pod:3337
9389 "This is the same as the C<guestfs_mount> command, but it allows you to set "
9390 "the mount options as for the L<mount(8)> I<-o> flag."
9394 #: ../src/guestfs-actions.pod:3341 ../fish/guestfish-actions.pod:2583
9396 "If the C<options> parameter is an empty string, then no options are passed "
9397 "(all options default to whatever the filesystem uses)."
9401 #: ../src/guestfs-actions.pod:3347
9402 msgid "guestfs_mount_ro"
9406 #: ../src/guestfs-actions.pod:3349
9409 " int guestfs_mount_ro (guestfs_h *g,\n"
9410 "\t\tconst char *device,\n"
9411 "\t\tconst char *mountpoint);\n"
9416 #: ../src/guestfs-actions.pod:3353
9418 "This is the same as the C<guestfs_mount> command, but it mounts the "
9419 "filesystem with the read-only (I<-o ro>) flag."
9423 #: ../src/guestfs-actions.pod:3358
9424 msgid "guestfs_mount_vfs"
9428 #: ../src/guestfs-actions.pod:3360
9431 " int guestfs_mount_vfs (guestfs_h *g,\n"
9432 "\t\tconst char *options,\n"
9433 "\t\tconst char *vfstype,\n"
9434 "\t\tconst char *device,\n"
9435 "\t\tconst char *mountpoint);\n"
9440 #: ../src/guestfs-actions.pod:3366
9442 "This is the same as the C<guestfs_mount> command, but it allows you to set "
9443 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
9448 #: ../src/guestfs-actions.pod:3372
9449 msgid "guestfs_mountpoints"
9453 #: ../src/guestfs-actions.pod:3374
9456 " char **guestfs_mountpoints (guestfs_h *g);\n"
9461 #: ../src/guestfs-actions.pod:3376
9463 "This call is similar to C<guestfs_mounts>. That call returns a list of "
9464 "devices. This one returns a hash table (map) of device name to directory "
9465 "where the device is mounted."
9469 #: ../src/guestfs-actions.pod:3386
9470 msgid "guestfs_mounts"
9474 #: ../src/guestfs-actions.pod:3388
9477 " char **guestfs_mounts (guestfs_h *g);\n"
9482 #: ../src/guestfs-actions.pod:3390 ../fish/guestfish-actions.pod:2614
9484 "This returns the list of currently mounted filesystems. It returns the list "
9485 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
9489 #: ../src/guestfs-actions.pod:3393 ../fish/guestfish-actions.pod:2617
9490 msgid "Some internal mounts are not shown."
9494 #: ../src/guestfs-actions.pod:3395
9495 msgid "See also: C<guestfs_mountpoints>"
9499 #: ../src/guestfs-actions.pod:3401
9504 #: ../src/guestfs-actions.pod:3403
9507 " int guestfs_mv (guestfs_h *g,\n"
9508 "\t\tconst char *src,\n"
9509 "\t\tconst char *dest);\n"
9514 #: ../src/guestfs-actions.pod:3407 ../fish/guestfish-actions.pod:2625
9516 "This moves a file from C<src> to C<dest> where C<dest> is either a "
9517 "destination filename or destination directory."
9521 #: ../src/guestfs-actions.pod:3412
9522 msgid "guestfs_ntfs_3g_probe"
9526 #: ../src/guestfs-actions.pod:3414
9529 " int guestfs_ntfs_3g_probe (guestfs_h *g,\n"
9531 "\t\tconst char *device);\n"
9536 #: ../src/guestfs-actions.pod:3418 ../fish/guestfish-actions.pod:2632
9538 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
9539 "C<device> for mountability. (Not all NTFS volumes can be mounted "
9540 "read-write, and some cannot be mounted at all)."
9544 #: ../src/guestfs-actions.pod:3422 ../fish/guestfish-actions.pod:2636
9546 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
9547 "can be mounted read-write. Set it to false if you want to test if the "
9548 "volume can be mounted read-only."
9552 #: ../src/guestfs-actions.pod:3426 ../fish/guestfish-actions.pod:2640
9554 "The return value is an integer which C<0> if the operation would succeed, or "
9555 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
9559 #: ../src/guestfs-actions.pod:3432
9560 msgid "guestfs_ntfsresize"
9564 #: ../src/guestfs-actions.pod:3434
9567 " int guestfs_ntfsresize (guestfs_h *g,\n"
9568 "\t\tconst char *device);\n"
9573 #: ../src/guestfs-actions.pod:3437 ../fish/guestfish-actions.pod:2648
9575 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
9576 "size of the underlying device. See also L<ntfsresize(8)>."
9580 #: ../src/guestfs-actions.pod:3443
9581 msgid "guestfs_ntfsresize_size"
9585 #: ../src/guestfs-actions.pod:3445
9588 " int guestfs_ntfsresize_size (guestfs_h *g,\n"
9589 "\t\tconst char *device,\n"
9590 "\t\tint64_t size);\n"
9595 #: ../src/guestfs-actions.pod:3449
9597 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
9598 "to specify the new size (in bytes) explicitly."
9602 #: ../src/guestfs-actions.pod:3454
9603 msgid "guestfs_part_add"
9607 #: ../src/guestfs-actions.pod:3456
9610 " int guestfs_part_add (guestfs_h *g,\n"
9611 "\t\tconst char *device,\n"
9612 "\t\tconst char *prlogex,\n"
9613 "\t\tint64_t startsect,\n"
9614 "\t\tint64_t endsect);\n"
9619 #: ../src/guestfs-actions.pod:3462
9621 "This command adds a partition to C<device>. If there is no partition table "
9622 "on the device, call C<guestfs_part_init> first."
9626 #: ../src/guestfs-actions.pod:3465 ../fish/guestfish-actions.pod:2666
9628 "The C<prlogex> parameter is the type of partition. Normally you should pass "
9629 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
9630 "C<logical>) and C<e> (or C<extended>) partition types."
9634 #: ../src/guestfs-actions.pod:3470 ../fish/guestfish-actions.pod:2671
9636 "C<startsect> and C<endsect> are the start and end of the partition in "
9637 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
9638 "from the end of the disk (C<-1> is the last sector)."
9642 #: ../src/guestfs-actions.pod:3474
9644 "Creating a partition which covers the whole disk is not so easy. Use "
9645 "C<guestfs_part_disk> to do that."
9649 #: ../src/guestfs-actions.pod:3479
9650 msgid "guestfs_part_del"
9654 #: ../src/guestfs-actions.pod:3481
9657 " int guestfs_part_del (guestfs_h *g,\n"
9658 "\t\tconst char *device,\n"
9659 "\t\tint partnum);\n"
9664 #: ../src/guestfs-actions.pod:3485 ../fish/guestfish-actions.pod:2682
9665 msgid "This command deletes the partition numbered C<partnum> on C<device>."
9669 #: ../src/guestfs-actions.pod:3487 ../fish/guestfish-actions.pod:2684
9671 "Note that in the case of MBR partitioning, deleting an extended partition "
9672 "also deletes any logical partitions it contains."
9676 #: ../src/guestfs-actions.pod:3493
9677 msgid "guestfs_part_disk"
9681 #: ../src/guestfs-actions.pod:3495
9684 " int guestfs_part_disk (guestfs_h *g,\n"
9685 "\t\tconst char *device,\n"
9686 "\t\tconst char *parttype);\n"
9691 #: ../src/guestfs-actions.pod:3499
9693 "This command is simply a combination of C<guestfs_part_init> followed by "
9694 "C<guestfs_part_add> to create a single primary partition covering the whole "
9699 #: ../src/guestfs-actions.pod:3503
9701 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
9702 "possible values are described in C<guestfs_part_init>."
9706 #: ../src/guestfs-actions.pod:3511
9707 msgid "guestfs_part_get_bootable"
9711 #: ../src/guestfs-actions.pod:3513
9714 " int guestfs_part_get_bootable (guestfs_h *g,\n"
9715 "\t\tconst char *device,\n"
9716 "\t\tint partnum);\n"
9721 #: ../src/guestfs-actions.pod:3517 ../fish/guestfish-actions.pod:2706
9723 "This command returns true if the partition C<partnum> on C<device> has the "
9724 "bootable flag set."
9728 #: ../src/guestfs-actions.pod:3520
9729 msgid "See also C<guestfs_part_set_bootable>."
9733 #: ../src/guestfs-actions.pod:3524
9734 msgid "guestfs_part_get_mbr_id"
9738 #: ../src/guestfs-actions.pod:3526
9741 " int guestfs_part_get_mbr_id (guestfs_h *g,\n"
9742 "\t\tconst char *device,\n"
9743 "\t\tint partnum);\n"
9748 #: ../src/guestfs-actions.pod:3530 ../fish/guestfish-actions.pod:2715
9750 "Returns the MBR type byte (also known as the ID byte) from the numbered "
9751 "partition C<partnum>."
9755 #: ../src/guestfs-actions.pod:3533 ../src/guestfs-actions.pod:3695
9757 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
9758 "undefined results for other partition table types (see "
9759 "C<guestfs_part_get_parttype>)."
9763 #: ../src/guestfs-actions.pod:3539
9764 msgid "guestfs_part_get_parttype"
9768 #: ../src/guestfs-actions.pod:3541
9771 " char *guestfs_part_get_parttype (guestfs_h *g,\n"
9772 "\t\tconst char *device);\n"
9777 #: ../src/guestfs-actions.pod:3544 ../fish/guestfish-actions.pod:2726
9779 "This command examines the partition table on C<device> and returns the "
9780 "partition table type (format) being used."
9784 #: ../src/guestfs-actions.pod:3547
9786 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
9787 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
9788 "possible, although unusual. See C<guestfs_part_init> for a full list."
9792 #: ../src/guestfs-actions.pod:3555
9793 msgid "guestfs_part_init"
9797 #: ../src/guestfs-actions.pod:3557
9800 " int guestfs_part_init (guestfs_h *g,\n"
9801 "\t\tconst char *device,\n"
9802 "\t\tconst char *parttype);\n"
9807 #: ../src/guestfs-actions.pod:3561 ../fish/guestfish-actions.pod:2738
9809 "This creates an empty partition table on C<device> of one of the partition "
9810 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
9811 "(for large disks)."
9815 #: ../src/guestfs-actions.pod:3565
9817 "Initially there are no partitions. Following this, you should call "
9818 "C<guestfs_part_add> for each partition required."
9822 #: ../src/guestfs-actions.pod:3568 ../fish/guestfish-actions.pod:2745
9823 msgid "Possible values for C<parttype> are:"
9827 #: ../src/guestfs-actions.pod:3572 ../fish/guestfish-actions.pod:2749
9828 msgid "B<efi> | B<gpt>"
9832 #: ../src/guestfs-actions.pod:3574 ../fish/guestfish-actions.pod:2751
9833 msgid "Intel EFI / GPT partition table."
9837 #: ../src/guestfs-actions.pod:3576 ../fish/guestfish-actions.pod:2753
9839 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
9840 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
9841 "the C<mbr> format."
9845 #: ../src/guestfs-actions.pod:3580 ../fish/guestfish-actions.pod:2757
9846 msgid "B<mbr> | B<msdos>"
9850 #: ../src/guestfs-actions.pod:3582 ../fish/guestfish-actions.pod:2759
9852 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
9853 "Windows. This partition type will B<only> work for device sizes up to 2 "
9854 "TB. For large disks we recommend using C<gpt>."
9858 #: ../src/guestfs-actions.pod:3589 ../fish/guestfish-actions.pod:2766
9859 msgid "Other partition table types that may work but are not supported include:"
9863 #: ../src/guestfs-actions.pod:3594 ../fish/guestfish-actions.pod:2771
9868 #: ../src/guestfs-actions.pod:3596 ../fish/guestfish-actions.pod:2773
9869 msgid "AIX disk labels."
9873 #: ../src/guestfs-actions.pod:3598 ../fish/guestfish-actions.pod:2775
9874 msgid "B<amiga> | B<rdb>"
9878 #: ../src/guestfs-actions.pod:3600 ../fish/guestfish-actions.pod:2777
9879 msgid "Amiga \"Rigid Disk Block\" format."
9883 #: ../src/guestfs-actions.pod:3602 ../fish/guestfish-actions.pod:2779
9888 #: ../src/guestfs-actions.pod:3604 ../fish/guestfish-actions.pod:2781
9889 msgid "BSD disk labels."
9893 #: ../src/guestfs-actions.pod:3606 ../fish/guestfish-actions.pod:2783
9898 #: ../src/guestfs-actions.pod:3608 ../fish/guestfish-actions.pod:2785
9899 msgid "DASD, used on IBM mainframes."
9903 #: ../src/guestfs-actions.pod:3610 ../fish/guestfish-actions.pod:2787
9908 #: ../src/guestfs-actions.pod:3612 ../fish/guestfish-actions.pod:2789
9909 msgid "MIPS/SGI volumes."
9913 #: ../src/guestfs-actions.pod:3614 ../fish/guestfish-actions.pod:2791
9918 #: ../src/guestfs-actions.pod:3616 ../fish/guestfish-actions.pod:2793
9919 msgid "Old Mac partition format. Modern Macs use C<gpt>."
9923 #: ../src/guestfs-actions.pod:3618 ../fish/guestfish-actions.pod:2795
9928 #: ../src/guestfs-actions.pod:3620 ../fish/guestfish-actions.pod:2797
9929 msgid "NEC PC-98 format, common in Japan apparently."
9933 #: ../src/guestfs-actions.pod:3622 ../fish/guestfish-actions.pod:2799
9938 #: ../src/guestfs-actions.pod:3624 ../fish/guestfish-actions.pod:2801
9939 msgid "Sun disk labels."
9943 #: ../src/guestfs-actions.pod:3630
9944 msgid "guestfs_part_list"
9948 #: ../src/guestfs-actions.pod:3632
9951 " struct guestfs_partition_list *guestfs_part_list (guestfs_h *g,\n"
9952 "\t\tconst char *device);\n"
9957 #: ../src/guestfs-actions.pod:3635 ../fish/guestfish-actions.pod:2809
9959 "This command parses the partition table on C<device> and returns the list of "
9964 #: ../src/guestfs-actions.pod:3638 ../fish/guestfish-actions.pod:2812
9965 msgid "The fields in the returned structure are:"
9969 #: ../src/guestfs-actions.pod:3642 ../fish/guestfish-actions.pod:2816
9974 #: ../src/guestfs-actions.pod:3644 ../fish/guestfish-actions.pod:2818
9975 msgid "Partition number, counting from 1."
9979 #: ../src/guestfs-actions.pod:3646 ../fish/guestfish-actions.pod:2820
9980 msgid "B<part_start>"
9984 #: ../src/guestfs-actions.pod:3648
9986 "Start of the partition I<in bytes>. To get sectors you have to divide by "
9987 "the device's sector size, see C<guestfs_blockdev_getss>."
9991 #: ../src/guestfs-actions.pod:3651 ../fish/guestfish-actions.pod:2825
9996 #: ../src/guestfs-actions.pod:3653 ../fish/guestfish-actions.pod:2827
9997 msgid "End of the partition in bytes."
10001 #: ../src/guestfs-actions.pod:3655 ../fish/guestfish-actions.pod:2829
10002 msgid "B<part_size>"
10006 #: ../src/guestfs-actions.pod:3657 ../fish/guestfish-actions.pod:2831
10007 msgid "Size of the partition in bytes."
10011 #: ../src/guestfs-actions.pod:3661
10013 "This function returns a C<struct guestfs_partition_list *> (see "
10014 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
10015 "must call C<guestfs_free_partition_list> after use>."
10019 #: ../src/guestfs-actions.pod:3666
10020 msgid "guestfs_part_set_bootable"
10024 #: ../src/guestfs-actions.pod:3668
10027 " int guestfs_part_set_bootable (guestfs_h *g,\n"
10028 "\t\tconst char *device,\n"
10029 "\t\tint partnum,\n"
10030 "\t\tint bootable);\n"
10035 #: ../src/guestfs-actions.pod:3673 ../fish/guestfish-actions.pod:2839
10037 "This sets the bootable flag on partition numbered C<partnum> on device "
10038 "C<device>. Note that partitions are numbered from 1."
10042 #: ../src/guestfs-actions.pod:3676 ../fish/guestfish-actions.pod:2842
10044 "The bootable flag is used by some operating systems (notably Windows) to "
10045 "determine which partition to boot from. It is by no means universally "
10050 #: ../src/guestfs-actions.pod:3682
10051 msgid "guestfs_part_set_mbr_id"
10055 #: ../src/guestfs-actions.pod:3684
10058 " int guestfs_part_set_mbr_id (guestfs_h *g,\n"
10059 "\t\tconst char *device,\n"
10060 "\t\tint partnum,\n"
10061 "\t\tint idbyte);\n"
10066 #: ../src/guestfs-actions.pod:3689 ../fish/guestfish-actions.pod:2850
10068 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
10069 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
10070 "documentation are in fact hexadecimal numbers, but usually documented "
10071 "without any leading \"0x\" which might be confusing."
10075 #: ../src/guestfs-actions.pod:3701
10076 msgid "guestfs_part_set_name"
10080 #: ../src/guestfs-actions.pod:3703
10083 " int guestfs_part_set_name (guestfs_h *g,\n"
10084 "\t\tconst char *device,\n"
10085 "\t\tint partnum,\n"
10086 "\t\tconst char *name);\n"
10091 #: ../src/guestfs-actions.pod:3708 ../fish/guestfish-actions.pod:2864
10093 "This sets the partition name on partition numbered C<partnum> on device "
10094 "C<device>. Note that partitions are numbered from 1."
10098 #: ../src/guestfs-actions.pod:3711 ../fish/guestfish-actions.pod:2867
10100 "The partition name can only be set on certain types of partition table. "
10101 "This works on C<gpt> but not on C<mbr> partitions."
10105 #: ../src/guestfs-actions.pod:3716
10106 msgid "guestfs_ping_daemon"
10110 #: ../src/guestfs-actions.pod:3718
10113 " int guestfs_ping_daemon (guestfs_h *g);\n"
10118 #: ../src/guestfs-actions.pod:3720 ../fish/guestfish-actions.pod:2874
10120 "This is a test probe into the guestfs daemon running inside the qemu "
10121 "subprocess. Calling this function checks that the daemon responds to the "
10122 "ping message, without affecting the daemon or attached block device(s) in "
10127 #: ../src/guestfs-actions.pod:3727
10128 msgid "guestfs_pread"
10132 #: ../src/guestfs-actions.pod:3729
10135 " char *guestfs_pread (guestfs_h *g,\n"
10136 "\t\tconst char *path,\n"
10138 "\t\tint64_t offset,\n"
10139 "\t\tsize_t *size_r);\n"
10144 #: ../src/guestfs-actions.pod:3735 ../fish/guestfish-actions.pod:2883
10146 "This command lets you read part of a file. It reads C<count> bytes of the "
10147 "file, starting at C<offset>, from file C<path>."
10151 #: ../src/guestfs-actions.pod:3738 ../fish/guestfish-actions.pod:2886
10153 "This may read fewer bytes than requested. For further details see the "
10154 "L<pread(2)> system call."
10158 #: ../src/guestfs-actions.pod:3741
10159 msgid "See also C<guestfs_pwrite>."
10163 #: ../src/guestfs-actions.pod:3750
10164 msgid "guestfs_pvcreate"
10168 #: ../src/guestfs-actions.pod:3752
10171 " int guestfs_pvcreate (guestfs_h *g,\n"
10172 "\t\tconst char *device);\n"
10177 #: ../src/guestfs-actions.pod:3755 ../fish/guestfish-actions.pod:2898
10179 "This creates an LVM physical volume on the named C<device>, where C<device> "
10180 "should usually be a partition name such as C</dev/sda1>."
10184 #: ../src/guestfs-actions.pod:3761
10185 msgid "guestfs_pvremove"
10189 #: ../src/guestfs-actions.pod:3763
10192 " int guestfs_pvremove (guestfs_h *g,\n"
10193 "\t\tconst char *device);\n"
10198 #: ../src/guestfs-actions.pod:3766 ../fish/guestfish-actions.pod:2906
10200 "This wipes a physical volume C<device> so that LVM will no longer recognise "
10205 #: ../src/guestfs-actions.pod:3769 ../fish/guestfish-actions.pod:2909
10207 "The implementation uses the C<pvremove> command which refuses to wipe "
10208 "physical volumes that contain any volume groups, so you have to remove those "
10213 #: ../src/guestfs-actions.pod:3775
10214 msgid "guestfs_pvresize"
10218 #: ../src/guestfs-actions.pod:3777
10221 " int guestfs_pvresize (guestfs_h *g,\n"
10222 "\t\tconst char *device);\n"
10227 #: ../src/guestfs-actions.pod:3780 ../fish/guestfish-actions.pod:2917
10229 "This resizes (expands or shrinks) an existing LVM physical volume to match "
10230 "the new size of the underlying device."
10234 #: ../src/guestfs-actions.pod:3785
10235 msgid "guestfs_pvresize_size"
10239 #: ../src/guestfs-actions.pod:3787
10242 " int guestfs_pvresize_size (guestfs_h *g,\n"
10243 "\t\tconst char *device,\n"
10244 "\t\tint64_t size);\n"
10249 #: ../src/guestfs-actions.pod:3791
10251 "This command is the same as C<guestfs_pvresize> except that it allows you to "
10252 "specify the new size (in bytes) explicitly."
10256 #: ../src/guestfs-actions.pod:3796
10257 msgid "guestfs_pvs"
10261 #: ../src/guestfs-actions.pod:3798
10264 " char **guestfs_pvs (guestfs_h *g);\n"
10269 #: ../src/guestfs-actions.pod:3800 ../fish/guestfish-actions.pod:2931
10271 "List all the physical volumes detected. This is the equivalent of the "
10272 "L<pvs(8)> command."
10276 #: ../src/guestfs-actions.pod:3803 ../fish/guestfish-actions.pod:2934
10278 "This returns a list of just the device names that contain PVs "
10279 "(eg. C</dev/sda2>)."
10283 #: ../src/guestfs-actions.pod:3806
10284 msgid "See also C<guestfs_pvs_full>."
10288 #: ../src/guestfs-actions.pod:3812
10289 msgid "guestfs_pvs_full"
10293 #: ../src/guestfs-actions.pod:3814
10296 " struct guestfs_lvm_pv_list *guestfs_pvs_full (guestfs_h *g);\n"
10301 #: ../src/guestfs-actions.pod:3816 ../fish/guestfish-actions.pod:2943
10303 "List all the physical volumes detected. This is the equivalent of the "
10304 "L<pvs(8)> command. The \"full\" version includes all fields."
10308 #: ../src/guestfs-actions.pod:3819
10310 "This function returns a C<struct guestfs_lvm_pv_list *> (see "
10311 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
10312 "must call C<guestfs_free_lvm_pv_list> after use>."
10316 #: ../src/guestfs-actions.pod:3824
10317 msgid "guestfs_pvuuid"
10321 #: ../src/guestfs-actions.pod:3826
10324 " char *guestfs_pvuuid (guestfs_h *g,\n"
10325 "\t\tconst char *device);\n"
10330 #: ../src/guestfs-actions.pod:3829 ../fish/guestfish-actions.pod:2950
10331 msgid "This command returns the UUID of the LVM PV C<device>."
10335 #: ../src/guestfs-actions.pod:3834
10336 msgid "guestfs_pwrite"
10340 #: ../src/guestfs-actions.pod:3836
10343 " int guestfs_pwrite (guestfs_h *g,\n"
10344 "\t\tconst char *path,\n"
10345 "\t\tconst char *content,\n"
10346 "\t\tsize_t content_size,\n"
10347 "\t\tint64_t offset);\n"
10352 #: ../src/guestfs-actions.pod:3842 ../fish/guestfish-actions.pod:2956
10354 "This command writes to part of a file. It writes the data buffer C<content> "
10355 "to the file C<path> starting at offset C<offset>."
10359 #: ../src/guestfs-actions.pod:3845 ../fish/guestfish-actions.pod:2959
10361 "This command implements the L<pwrite(2)> system call, and like that system "
10362 "call it may not write the full data requested. The return value is the "
10363 "number of bytes that were actually written to the file. This could even be "
10364 "0, although short writes are unlikely for regular files in ordinary "
10369 #: ../src/guestfs-actions.pod:3851
10370 msgid "See also C<guestfs_pread>."
10374 #: ../src/guestfs-actions.pod:3858
10375 msgid "guestfs_read_file"
10379 #: ../src/guestfs-actions.pod:3860
10382 " char *guestfs_read_file (guestfs_h *g,\n"
10383 "\t\tconst char *path,\n"
10384 "\t\tsize_t *size_r);\n"
10389 #: ../src/guestfs-actions.pod:3864 ../fish/guestfish-actions.pod:2974
10390 msgid "This calls returns the contents of the file C<path> as a buffer."
10394 #: ../src/guestfs-actions.pod:3867
10396 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
10397 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
10398 "function is limited in the total size of file that can be handled."
10402 #: ../src/guestfs-actions.pod:3879
10403 msgid "guestfs_read_lines"
10407 #: ../src/guestfs-actions.pod:3881
10410 " char **guestfs_read_lines (guestfs_h *g,\n"
10411 "\t\tconst char *path);\n"
10416 #: ../src/guestfs-actions.pod:3886 ../fish/guestfish-actions.pod:2991
10418 "The file contents are returned as a list of lines. Trailing C<LF> and "
10419 "C<CRLF> character sequences are I<not> returned."
10423 #: ../src/guestfs-actions.pod:3889
10425 "Note that this function cannot correctly handle binary files (specifically, "
10426 "files containing C<\\0> character which is treated as end of line). For "
10427 "those you need to use the C<guestfs_read_file> function which has a more "
10428 "complex interface."
10432 #: ../src/guestfs-actions.pod:3898
10433 msgid "guestfs_readdir"
10437 #: ../src/guestfs-actions.pod:3900
10440 " struct guestfs_dirent_list *guestfs_readdir (guestfs_h *g,\n"
10441 "\t\tconst char *dir);\n"
10446 #: ../src/guestfs-actions.pod:3903 ../fish/guestfish-actions.pod:3003
10447 msgid "This returns the list of directory entries in directory C<dir>."
10451 #: ../src/guestfs-actions.pod:3905 ../fish/guestfish-actions.pod:3005
10453 "All entries in the directory are returned, including C<.> and C<..>. The "
10454 "entries are I<not> sorted, but returned in the same order as the underlying "
10459 #: ../src/guestfs-actions.pod:3909 ../fish/guestfish-actions.pod:3009
10461 "Also this call returns basic file type information about each file. The "
10462 "C<ftyp> field will contain one of the following characters:"
10466 #: ../src/guestfs-actions.pod:3914 ../fish/guestfish-actions.pod:3014
10471 #: ../src/guestfs-actions.pod:3916 ../fish/guestfish-actions.pod:3016
10472 msgid "Block special"
10476 #: ../src/guestfs-actions.pod:3918 ../fish/guestfish-actions.pod:3018
10481 #: ../src/guestfs-actions.pod:3920 ../fish/guestfish-actions.pod:3020
10482 msgid "Char special"
10486 #: ../src/guestfs-actions.pod:3922 ../fish/guestfish-actions.pod:3022
10491 #: ../src/guestfs-actions.pod:3924 ../fish/guestfish-actions.pod:3024
10496 #: ../src/guestfs-actions.pod:3926 ../fish/guestfish-actions.pod:3026
10501 #: ../src/guestfs-actions.pod:3928 ../fish/guestfish-actions.pod:3028
10502 msgid "FIFO (named pipe)"
10506 #: ../src/guestfs-actions.pod:3930 ../fish/guestfish-actions.pod:3030
10511 #: ../src/guestfs-actions.pod:3932 ../fish/guestfish-actions.pod:3032
10512 msgid "Symbolic link"
10516 #: ../src/guestfs-actions.pod:3934 ../fish/guestfish-actions.pod:3034
10521 #: ../src/guestfs-actions.pod:3936 ../fish/guestfish-actions.pod:3036
10522 msgid "Regular file"
10526 #: ../src/guestfs-actions.pod:3938 ../fish/guestfish-actions.pod:3038
10531 #: ../src/guestfs-actions.pod:3940 ../fish/guestfish-actions.pod:3040
10536 #: ../src/guestfs-actions.pod:3942 ../fish/guestfish-actions.pod:3042
10541 #: ../src/guestfs-actions.pod:3944 ../fish/guestfish-actions.pod:3044
10542 msgid "Unknown file type"
10546 #: ../src/guestfs-actions.pod:3946 ../fish/guestfish-actions.pod:3046
10551 #: ../src/guestfs-actions.pod:3948 ../fish/guestfish-actions.pod:3048
10552 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
10556 #: ../src/guestfs-actions.pod:3953
10558 "This function is primarily intended for use by programs. To get a simple "
10559 "list of names, use C<guestfs_ls>. To get a printable directory for human "
10560 "consumption, use C<guestfs_ll>."
10564 #: ../src/guestfs-actions.pod:3957
10566 "This function returns a C<struct guestfs_dirent_list *> (see "
10567 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
10568 "must call C<guestfs_free_dirent_list> after use>."
10572 #: ../src/guestfs-actions.pod:3962
10573 msgid "guestfs_readlink"
10577 #: ../src/guestfs-actions.pod:3964
10580 " char *guestfs_readlink (guestfs_h *g,\n"
10581 "\t\tconst char *path);\n"
10586 #: ../src/guestfs-actions.pod:3967 ../fish/guestfish-actions.pod:3061
10587 msgid "This command reads the target of a symbolic link."
10591 #: ../src/guestfs-actions.pod:3972
10592 msgid "guestfs_readlinklist"
10596 #: ../src/guestfs-actions.pod:3974
10599 " char **guestfs_readlinklist (guestfs_h *g,\n"
10600 "\t\tconst char *path,\n"
10601 "\t\tchar *const *names);\n"
10606 #: ../src/guestfs-actions.pod:3978 ../fish/guestfish-actions.pod:3067
10608 "This call allows you to do a C<readlink> operation on multiple files, where "
10609 "all files are in the directory C<path>. C<names> is the list of files from "
10614 #: ../src/guestfs-actions.pod:3982 ../fish/guestfish-actions.pod:3071
10616 "On return you get a list of strings, with a one-to-one correspondence to the "
10617 "C<names> list. Each string is the value of the symbolic link."
10621 #: ../src/guestfs-actions.pod:3986 ../fish/guestfish-actions.pod:3075
10623 "If the C<readlink(2)> operation fails on any name, then the corresponding "
10624 "result string is the empty string C<\"\">. However the whole operation is "
10625 "completed even if there were C<readlink(2)> errors, and so you can call this "
10626 "function with names where you don't know if they are symbolic links already "
10627 "(albeit slightly less efficient)."
10631 #: ../src/guestfs-actions.pod:3993 ../fish/guestfish-actions.pod:3082
10633 "This call is intended for programs that want to efficiently list a directory "
10634 "contents without making many round-trips. Very long directory listings "
10635 "might cause the protocol message size to be exceeded, causing this call to "
10636 "fail. The caller must split up such requests into smaller groups of names."
10640 #: ../src/guestfs-actions.pod:4004
10641 msgid "guestfs_realpath"
10645 #: ../src/guestfs-actions.pod:4006
10648 " char *guestfs_realpath (guestfs_h *g,\n"
10649 "\t\tconst char *path);\n"
10654 #: ../src/guestfs-actions.pod:4009 ../fish/guestfish-actions.pod:3093
10656 "Return the canonicalized absolute pathname of C<path>. The returned path "
10657 "has no C<.>, C<..> or symbolic link path elements."
10661 #: ../src/guestfs-actions.pod:4015
10662 msgid "guestfs_removexattr"
10666 #: ../src/guestfs-actions.pod:4017
10669 " int guestfs_removexattr (guestfs_h *g,\n"
10670 "\t\tconst char *xattr,\n"
10671 "\t\tconst char *path);\n"
10676 #: ../src/guestfs-actions.pod:4021 ../fish/guestfish-actions.pod:3100
10677 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
10681 #: ../src/guestfs-actions.pod:4024
10682 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
10686 #: ../src/guestfs-actions.pod:4028
10687 msgid "guestfs_resize2fs"
10691 #: ../src/guestfs-actions.pod:4030
10694 " int guestfs_resize2fs (guestfs_h *g,\n"
10695 "\t\tconst char *device);\n"
10700 #: ../src/guestfs-actions.pod:4033 ../fish/guestfish-actions.pod:3109
10702 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
10703 "underlying device."
10707 #: ../src/guestfs-actions.pod:4036
10709 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
10710 "C<device> before calling this command. For unknown reasons C<resize2fs> "
10711 "sometimes gives an error about this and sometimes not. In any case, it is "
10712 "always safe to call C<guestfs_e2fsck_f> before calling this function."
10716 #: ../src/guestfs-actions.pod:4044
10717 msgid "guestfs_resize2fs_size"
10721 #: ../src/guestfs-actions.pod:4046
10724 " int guestfs_resize2fs_size (guestfs_h *g,\n"
10725 "\t\tconst char *device,\n"
10726 "\t\tint64_t size);\n"
10731 #: ../src/guestfs-actions.pod:4050
10733 "This command is the same as C<guestfs_resize2fs> except that it allows you "
10734 "to specify the new size (in bytes) explicitly."
10738 #: ../src/guestfs-actions.pod:4055
10743 #: ../src/guestfs-actions.pod:4057
10746 " int guestfs_rm (guestfs_h *g,\n"
10747 "\t\tconst char *path);\n"
10752 #: ../src/guestfs-actions.pod:4060 ../fish/guestfish-actions.pod:3129
10753 msgid "Remove the single file C<path>."
10757 #: ../src/guestfs-actions.pod:4064
10758 msgid "guestfs_rm_rf"
10762 #: ../src/guestfs-actions.pod:4066
10765 " int guestfs_rm_rf (guestfs_h *g,\n"
10766 "\t\tconst char *path);\n"
10771 #: ../src/guestfs-actions.pod:4069 ../fish/guestfish-actions.pod:3135
10773 "Remove the file or directory C<path>, recursively removing the contents if "
10774 "its a directory. This is like the C<rm -rf> shell command."
10778 #: ../src/guestfs-actions.pod:4075
10779 msgid "guestfs_rmdir"
10783 #: ../src/guestfs-actions.pod:4077
10786 " int guestfs_rmdir (guestfs_h *g,\n"
10787 "\t\tconst char *path);\n"
10792 #: ../src/guestfs-actions.pod:4080 ../fish/guestfish-actions.pod:3143
10793 msgid "Remove the single directory C<path>."
10797 #: ../src/guestfs-actions.pod:4084
10798 msgid "guestfs_rmmountpoint"
10802 #: ../src/guestfs-actions.pod:4086
10805 " int guestfs_rmmountpoint (guestfs_h *g,\n"
10806 "\t\tconst char *exemptpath);\n"
10811 #: ../src/guestfs-actions.pod:4089
10813 "This calls removes a mountpoint that was previously created with "
10814 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
10818 #: ../src/guestfs-actions.pod:4095
10819 msgid "guestfs_scrub_device"
10823 #: ../src/guestfs-actions.pod:4097
10826 " int guestfs_scrub_device (guestfs_h *g,\n"
10827 "\t\tconst char *device);\n"
10832 #: ../src/guestfs-actions.pod:4100 ../fish/guestfish-actions.pod:3157
10834 "This command writes patterns over C<device> to make data retrieval more "
10839 #: ../src/guestfs-actions.pod:4103 ../src/guestfs-actions.pod:4121 ../src/guestfs-actions.pod:4137 ../fish/guestfish-actions.pod:3160 ../fish/guestfish-actions.pod:3175 ../fish/guestfish-actions.pod:3188
10841 "It is an interface to the L<scrub(1)> program. See that manual page for "
10846 #: ../src/guestfs-actions.pod:4111
10847 msgid "guestfs_scrub_file"
10851 #: ../src/guestfs-actions.pod:4113
10854 " int guestfs_scrub_file (guestfs_h *g,\n"
10855 "\t\tconst char *file);\n"
10860 #: ../src/guestfs-actions.pod:4116 ../fish/guestfish-actions.pod:3170
10862 "This command writes patterns over a file to make data retrieval more "
10867 #: ../src/guestfs-actions.pod:4119 ../fish/guestfish-actions.pod:3173
10868 msgid "The file is I<removed> after scrubbing."
10872 #: ../src/guestfs-actions.pod:4126
10873 msgid "guestfs_scrub_freespace"
10877 #: ../src/guestfs-actions.pod:4128
10880 " int guestfs_scrub_freespace (guestfs_h *g,\n"
10881 "\t\tconst char *dir);\n"
10886 #: ../src/guestfs-actions.pod:4131
10888 "This command creates the directory C<dir> and then fills it with files until "
10889 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
10890 "and deletes them. The intention is to scrub any free space on the partition "
10891 "containing C<dir>."
10895 #: ../src/guestfs-actions.pod:4142
10896 msgid "guestfs_set_append"
10900 #: ../src/guestfs-actions.pod:4144
10903 " int guestfs_set_append (guestfs_h *g,\n"
10904 "\t\tconst char *append);\n"
10909 #: ../src/guestfs-actions.pod:4147 ../fish/guestfish-actions.pod:3195
10911 "This function is used to add additional options to the guest kernel command "
10916 #: ../src/guestfs-actions.pod:4150 ../fish/guestfish-actions.pod:3198
10918 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
10919 "environment variable."
10923 #: ../src/guestfs-actions.pod:4153 ../fish/guestfish-actions.pod:3201
10925 "Setting C<append> to C<NULL> means I<no> additional options are passed "
10926 "(libguestfs always adds a few of its own)."
10930 #: ../src/guestfs-actions.pod:4158
10931 msgid "guestfs_set_autosync"
10935 #: ../src/guestfs-actions.pod:4160
10938 " int guestfs_set_autosync (guestfs_h *g,\n"
10939 "\t\tint autosync);\n"
10944 #: ../src/guestfs-actions.pod:4163
10946 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
10947 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
10948 "the handle is closed (also if the program exits without closing handles)."
10952 #: ../src/guestfs-actions.pod:4168 ../fish/guestfish-actions.pod:3213
10954 "This is disabled by default (except in guestfish where it is enabled by "
10959 #: ../src/guestfs-actions.pod:4173
10960 msgid "guestfs_set_direct"
10964 #: ../src/guestfs-actions.pod:4175
10967 " int guestfs_set_direct (guestfs_h *g,\n"
10968 "\t\tint direct);\n"
10973 #: ../src/guestfs-actions.pod:4178 ../fish/guestfish-actions.pod:3220
10975 "If the direct appliance mode flag is enabled, then stdin and stdout are "
10976 "passed directly through to the appliance once it is launched."
10980 #: ../src/guestfs-actions.pod:4182
10982 "One consequence of this is that log messages aren't caught by the library "
10983 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
10988 #: ../src/guestfs-actions.pod:4186 ../fish/guestfish-actions.pod:3228
10989 msgid "You probably don't want to use this unless you know what you are doing."
10993 #: ../src/guestfs-actions.pod:4189 ../fish/guestfish-actions.pod:3231
10994 msgid "The default is disabled."
10998 #: ../src/guestfs-actions.pod:4193
10999 msgid "guestfs_set_e2label"
11003 #: ../src/guestfs-actions.pod:4195
11006 " int guestfs_set_e2label (guestfs_h *g,\n"
11007 "\t\tconst char *device,\n"
11008 "\t\tconst char *label);\n"
11013 #: ../src/guestfs-actions.pod:4199 ../fish/guestfish-actions.pod:3237
11015 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
11016 "C<label>. Filesystem labels are limited to 16 characters."
11020 #: ../src/guestfs-actions.pod:4203
11022 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
11023 "the existing label on a filesystem."
11027 #: ../src/guestfs-actions.pod:4208
11028 msgid "guestfs_set_e2uuid"
11032 #: ../src/guestfs-actions.pod:4210
11035 " int guestfs_set_e2uuid (guestfs_h *g,\n"
11036 "\t\tconst char *device,\n"
11037 "\t\tconst char *uuid);\n"
11042 #: ../src/guestfs-actions.pod:4214 ../fish/guestfish-actions.pod:3248
11044 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
11045 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
11046 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
11050 #: ../src/guestfs-actions.pod:4219
11052 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
11053 "the existing UUID of a filesystem."
11057 #: ../src/guestfs-actions.pod:4224
11058 msgid "guestfs_set_memsize"
11062 #: ../src/guestfs-actions.pod:4226
11065 " int guestfs_set_memsize (guestfs_h *g,\n"
11066 "\t\tint memsize);\n"
11071 #: ../src/guestfs-actions.pod:4229
11073 "This sets the memory size in megabytes allocated to the qemu subprocess. "
11074 "This only has any effect if called before C<guestfs_launch>."
11078 #: ../src/guestfs-actions.pod:4233 ../fish/guestfish-actions.pod:3264
11080 "You can also change this by setting the environment variable "
11081 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
11085 #: ../src/guestfs-actions.pod:4242
11086 msgid "guestfs_set_network"
11090 #: ../src/guestfs-actions.pod:4244
11093 " int guestfs_set_network (guestfs_h *g,\n"
11094 "\t\tint network);\n"
11099 #: ../src/guestfs-actions.pod:4247 ../fish/guestfish-actions.pod:3275
11101 "If C<network> is true, then the network is enabled in the libguestfs "
11102 "appliance. The default is false."
11106 #: ../src/guestfs-actions.pod:4250 ../fish/guestfish-actions.pod:3278
11108 "This affects whether commands are able to access the network (see "
11109 "L<guestfs(3)/RUNNING COMMANDS>)."
11113 #: ../src/guestfs-actions.pod:4253
11115 "You must call this before calling C<guestfs_launch>, otherwise it has no "
11120 #: ../src/guestfs-actions.pod:4258
11121 msgid "guestfs_set_path"
11125 #: ../src/guestfs-actions.pod:4260
11128 " int guestfs_set_path (guestfs_h *g,\n"
11129 "\t\tconst char *searchpath);\n"
11134 #: ../src/guestfs-actions.pod:4263 ../fish/guestfish-actions.pod:3288
11135 msgid "Set the path that libguestfs searches for kernel and initrd.img."
11139 #: ../src/guestfs-actions.pod:4265 ../fish/guestfish-actions.pod:3290
11141 "The default is C<$libdir/guestfs> unless overridden by setting "
11142 "C<LIBGUESTFS_PATH> environment variable."
11146 #: ../src/guestfs-actions.pod:4268 ../fish/guestfish-actions.pod:3293
11147 msgid "Setting C<path> to C<NULL> restores the default path."
11151 #: ../src/guestfs-actions.pod:4272
11152 msgid "guestfs_set_qemu"
11156 #: ../src/guestfs-actions.pod:4274
11159 " int guestfs_set_qemu (guestfs_h *g,\n"
11160 "\t\tconst char *qemu);\n"
11165 #: ../src/guestfs-actions.pod:4277 ../fish/guestfish-actions.pod:3299
11166 msgid "Set the qemu binary that we will use."
11170 #: ../src/guestfs-actions.pod:4279 ../fish/guestfish-actions.pod:3301
11171 msgid "The default is chosen when the library was compiled by the configure script."
11175 #: ../src/guestfs-actions.pod:4282 ../fish/guestfish-actions.pod:3304
11177 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
11182 #: ../src/guestfs-actions.pod:4285 ../fish/guestfish-actions.pod:3307
11183 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
11187 #: ../src/guestfs-actions.pod:4287 ../fish/guestfish-actions.pod:3309
11189 "Note that you should call this function as early as possible after creating "
11190 "the handle. This is because some pre-launch operations depend on testing "
11191 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
11192 "don't retest features, and so you might see inconsistent results. Using the "
11193 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
11194 "the qemu binary at the same time as the handle is created."
11198 #: ../src/guestfs-actions.pod:4297
11199 msgid "guestfs_set_recovery_proc"
11203 #: ../src/guestfs-actions.pod:4299
11206 " int guestfs_set_recovery_proc (guestfs_h *g,\n"
11207 "\t\tint recoveryproc);\n"
11212 #: ../src/guestfs-actions.pod:4302
11214 "If this is called with the parameter C<false> then C<guestfs_launch> does "
11215 "not create a recovery process. The purpose of the recovery process is to "
11216 "stop runaway qemu processes in the case where the main program aborts "
11221 #: ../src/guestfs-actions.pod:4307
11223 "This only has any effect if called before C<guestfs_launch>, and the default "
11228 #: ../src/guestfs-actions.pod:4310 ../fish/guestfish-actions.pod:3329
11230 "About the only time when you would want to disable this is if the main "
11231 "process will fork itself into the background (\"daemonize\" itself). In "
11232 "this case the recovery process thinks that the main program has disappeared "
11233 "and so kills qemu, which is not very helpful."
11237 #: ../src/guestfs-actions.pod:4318
11238 msgid "guestfs_set_selinux"
11242 #: ../src/guestfs-actions.pod:4320
11245 " int guestfs_set_selinux (guestfs_h *g,\n"
11246 "\t\tint selinux);\n"
11251 #: ../src/guestfs-actions.pod:4323 ../fish/guestfish-actions.pod:3339
11253 "This sets the selinux flag that is passed to the appliance at boot time. "
11254 "The default is C<selinux=0> (disabled)."
11258 #: ../src/guestfs-actions.pod:4326 ../fish/guestfish-actions.pod:3342
11260 "Note that if SELinux is enabled, it is always in Permissive mode "
11261 "(C<enforcing=0>)."
11265 #: ../src/guestfs-actions.pod:4334
11266 msgid "guestfs_set_trace"
11270 #: ../src/guestfs-actions.pod:4336
11273 " int guestfs_set_trace (guestfs_h *g,\n"
11274 "\t\tint trace);\n"
11279 #: ../src/guestfs-actions.pod:4339 ../fish/guestfish-actions.pod:3352
11281 "If the command trace flag is set to 1, then commands are printed on stderr "
11282 "before they are executed in a format which is very similar to the one used "
11283 "by guestfish. In other words, you can run a program with this enabled, and "
11284 "you will get out a script which you can feed to guestfish to perform the "
11285 "same set of actions."
11289 #: ../src/guestfs-actions.pod:4346 ../fish/guestfish-actions.pod:3359
11291 "If you want to trace C API calls into libguestfs (and other libraries) then "
11292 "possibly a better way is to use the external ltrace(1) command."
11296 #: ../src/guestfs-actions.pod:4350 ../fish/guestfish-actions.pod:3363
11298 "Command traces are disabled unless the environment variable "
11299 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
11303 #: ../src/guestfs-actions.pod:4355
11304 msgid "guestfs_set_verbose"
11308 #: ../src/guestfs-actions.pod:4357
11311 " int guestfs_set_verbose (guestfs_h *g,\n"
11312 "\t\tint verbose);\n"
11317 #: ../src/guestfs-actions.pod:4360 ../fish/guestfish-actions.pod:3370
11318 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
11322 #: ../src/guestfs-actions.pod:4362 ../fish/guestfish-actions.pod:3372
11324 "Verbose messages are disabled unless the environment variable "
11325 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
11329 #: ../src/guestfs-actions.pod:4367
11330 msgid "guestfs_setcon"
11334 #: ../src/guestfs-actions.pod:4369
11337 " int guestfs_setcon (guestfs_h *g,\n"
11338 "\t\tconst char *context);\n"
11343 #: ../src/guestfs-actions.pod:4372 ../fish/guestfish-actions.pod:3379
11345 "This sets the SELinux security context of the daemon to the string "
11350 #: ../src/guestfs-actions.pod:4375 ../fish/guestfish-actions.pod:3382
11351 msgid "See the documentation about SELINUX in L<guestfs(3)>."
11355 #: ../src/guestfs-actions.pod:4379
11356 msgid "guestfs_setxattr"
11360 #: ../src/guestfs-actions.pod:4381
11363 " int guestfs_setxattr (guestfs_h *g,\n"
11364 "\t\tconst char *xattr,\n"
11365 "\t\tconst char *val,\n"
11366 "\t\tint vallen,\n"
11367 "\t\tconst char *path);\n"
11372 #: ../src/guestfs-actions.pod:4387 ../fish/guestfish-actions.pod:3388
11374 "This call sets the extended attribute named C<xattr> of the file C<path> to "
11375 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
11379 #: ../src/guestfs-actions.pod:4391
11380 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
11384 #: ../src/guestfs-actions.pod:4395
11385 msgid "guestfs_sfdisk"
11389 #: ../src/guestfs-actions.pod:4397
11392 " int guestfs_sfdisk (guestfs_h *g,\n"
11393 "\t\tconst char *device,\n"
11396 "\t\tint sectors,\n"
11397 "\t\tchar *const *lines);\n"
11402 #: ../src/guestfs-actions.pod:4404 ../fish/guestfish-actions.pod:3398
11404 "This is a direct interface to the L<sfdisk(8)> program for creating "
11405 "partitions on block devices."
11409 #: ../src/guestfs-actions.pod:4407 ../fish/guestfish-actions.pod:3401
11410 msgid "C<device> should be a block device, for example C</dev/sda>."
11414 #: ../src/guestfs-actions.pod:4409 ../fish/guestfish-actions.pod:3403
11416 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
11417 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
11418 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
11419 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
11420 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
11421 "the kernel) cannot work out the right geometry and you will need to tell it."
11425 #: ../src/guestfs-actions.pod:4417 ../fish/guestfish-actions.pod:3411
11427 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
11428 "refer to the L<sfdisk(8)> manpage."
11432 #: ../src/guestfs-actions.pod:4420 ../fish/guestfish-actions.pod:3414
11434 "To create a single partition occupying the whole disk, you would pass "
11435 "C<lines> as a single element list, when the single element being the string "
11440 #: ../src/guestfs-actions.pod:4424
11441 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
11445 #: ../src/guestfs-actions.pod:4432
11446 msgid "guestfs_sfdiskM"
11450 #: ../src/guestfs-actions.pod:4434
11453 " int guestfs_sfdiskM (guestfs_h *g,\n"
11454 "\t\tconst char *device,\n"
11455 "\t\tchar *const *lines);\n"
11460 #: ../src/guestfs-actions.pod:4438
11462 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
11463 "partition sizes are specified in megabytes only (rounded to the nearest "
11464 "cylinder) and you don't need to specify the cyls, heads and sectors "
11465 "parameters which were rarely if ever used anyway."
11469 #: ../src/guestfs-actions.pod:4444
11471 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
11472 "C<guestfs_part_disk>"
11476 #: ../src/guestfs-actions.pod:4452
11477 msgid "guestfs_sfdisk_N"
11481 #: ../src/guestfs-actions.pod:4454
11484 " int guestfs_sfdisk_N (guestfs_h *g,\n"
11485 "\t\tconst char *device,\n"
11486 "\t\tint partnum,\n"
11489 "\t\tint sectors,\n"
11490 "\t\tconst char *line);\n"
11495 #: ../src/guestfs-actions.pod:4462 ../fish/guestfish-actions.pod:3444
11497 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
11498 "(note: C<n> counts from 1)."
11502 #: ../src/guestfs-actions.pod:4465
11504 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
11505 "for the cyls/heads/sectors parameters."
11509 #: ../src/guestfs-actions.pod:4468
11510 msgid "See also: C<guestfs_part_add>"
11514 #: ../src/guestfs-actions.pod:4475
11515 msgid "guestfs_sfdisk_disk_geometry"
11519 #: ../src/guestfs-actions.pod:4477
11522 " char *guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
11523 "\t\tconst char *device);\n"
11528 #: ../src/guestfs-actions.pod:4480
11530 "This displays the disk geometry of C<device> read from the partition table. "
11531 "Especially in the case where the underlying block device has been resized, "
11532 "this can be different from the kernel's idea of the geometry (see "
11533 "C<guestfs_sfdisk_kernel_geometry>)."
11537 #: ../src/guestfs-actions.pod:4485 ../src/guestfs-actions.pod:4498 ../fish/guestfish-actions.pod:3464 ../fish/guestfish-actions.pod:3473
11538 msgid "The result is in human-readable format, and not designed to be parsed."
11542 #: ../src/guestfs-actions.pod:4491
11543 msgid "guestfs_sfdisk_kernel_geometry"
11547 #: ../src/guestfs-actions.pod:4493
11550 " char *guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
11551 "\t\tconst char *device);\n"
11556 #: ../src/guestfs-actions.pod:4496 ../fish/guestfish-actions.pod:3471
11557 msgid "This displays the kernel's idea of the geometry of C<device>."
11561 #: ../src/guestfs-actions.pod:4504
11562 msgid "guestfs_sfdisk_l"
11566 #: ../src/guestfs-actions.pod:4506
11569 " char *guestfs_sfdisk_l (guestfs_h *g,\n"
11570 "\t\tconst char *device);\n"
11575 #: ../src/guestfs-actions.pod:4509 ../fish/guestfish-actions.pod:3480
11577 "This displays the partition table on C<device>, in the human-readable output "
11578 "of the L<sfdisk(8)> command. It is not intended to be parsed."
11582 #: ../src/guestfs-actions.pod:4513
11583 msgid "See also: C<guestfs_part_list>"
11587 #: ../src/guestfs-actions.pod:4518
11592 #: ../src/guestfs-actions.pod:4520
11595 " char *guestfs_sh (guestfs_h *g,\n"
11596 "\t\tconst char *command);\n"
11601 #: ../src/guestfs-actions.pod:4523 ../fish/guestfish-actions.pod:3490
11603 "This call runs a command from the guest filesystem via the guest's "
11608 #: ../src/guestfs-actions.pod:4526
11609 msgid "This is like C<guestfs_command>, but passes the command to:"
11613 #: ../src/guestfs-actions.pod:4528 ../fish/guestfish-actions.pod:3495
11616 " /bin/sh -c \"command\"\n"
11621 #: ../src/guestfs-actions.pod:4530 ../fish/guestfish-actions.pod:3497
11623 "Depending on the guest's shell, this usually results in wildcards being "
11624 "expanded, shell expressions being interpolated and so on."
11628 #: ../src/guestfs-actions.pod:4534
11629 msgid "All the provisos about C<guestfs_command> apply to this call."
11633 #: ../src/guestfs-actions.pod:4539
11634 msgid "guestfs_sh_lines"
11638 #: ../src/guestfs-actions.pod:4541
11641 " char **guestfs_sh_lines (guestfs_h *g,\n"
11642 "\t\tconst char *command);\n"
11647 #: ../src/guestfs-actions.pod:4544
11649 "This is the same as C<guestfs_sh>, but splits the result into a list of "
11654 #: ../src/guestfs-actions.pod:4547
11655 msgid "See also: C<guestfs_command_lines>"
11659 #: ../src/guestfs-actions.pod:4553
11660 msgid "guestfs_sleep"
11664 #: ../src/guestfs-actions.pod:4555
11667 " int guestfs_sleep (guestfs_h *g,\n"
11673 #: ../src/guestfs-actions.pod:4558 ../fish/guestfish-actions.pod:3516
11674 msgid "Sleep for C<secs> seconds."
11678 #: ../src/guestfs-actions.pod:4562 ../src/guestfs-structs.pod:109
11679 msgid "guestfs_stat"
11683 #: ../src/guestfs-actions.pod:4564
11686 " struct guestfs_stat *guestfs_stat (guestfs_h *g,\n"
11687 "\t\tconst char *path);\n"
11692 #: ../src/guestfs-actions.pod:4569 ../fish/guestfish-actions.pod:3524
11693 msgid "This is the same as the C<stat(2)> system call."
11697 #: ../src/guestfs-actions.pod:4575 ../src/guestfs-structs.pod:135
11698 msgid "guestfs_statvfs"
11702 #: ../src/guestfs-actions.pod:4577
11705 " struct guestfs_statvfs *guestfs_statvfs (guestfs_h *g,\n"
11706 "\t\tconst char *path);\n"
11711 #: ../src/guestfs-actions.pod:4580 ../fish/guestfish-actions.pod:3530
11713 "Returns file system statistics for any mounted file system. C<path> should "
11714 "be a file or directory in the mounted file system (typically it is the mount "
11715 "point itself, but it doesn't need to be)."
11719 #: ../src/guestfs-actions.pod:4584 ../fish/guestfish-actions.pod:3534
11720 msgid "This is the same as the C<statvfs(2)> system call."
11724 #: ../src/guestfs-actions.pod:4586
11726 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
11727 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
11731 #: ../src/guestfs-actions.pod:4590
11732 msgid "guestfs_strings"
11736 #: ../src/guestfs-actions.pod:4592
11739 " char **guestfs_strings (guestfs_h *g,\n"
11740 "\t\tconst char *path);\n"
11745 #: ../src/guestfs-actions.pod:4595 ../fish/guestfish-actions.pod:3540
11747 "This runs the L<strings(1)> command on a file and returns the list of "
11748 "printable strings found."
11752 #: ../src/guestfs-actions.pod:4605
11753 msgid "guestfs_strings_e"
11757 #: ../src/guestfs-actions.pod:4607
11760 " char **guestfs_strings_e (guestfs_h *g,\n"
11761 "\t\tconst char *encoding,\n"
11762 "\t\tconst char *path);\n"
11767 #: ../src/guestfs-actions.pod:4611
11769 "This is like the C<guestfs_strings> command, but allows you to specify the "
11770 "encoding of strings that are looked for in the source file C<path>."
11774 #: ../src/guestfs-actions.pod:4615 ../fish/guestfish-actions.pod:3554
11775 msgid "Allowed encodings are:"
11779 #: ../src/guestfs-actions.pod:4619 ../fish/guestfish-actions.pod:3558
11784 #: ../src/guestfs-actions.pod:4621
11786 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
11787 "ISO-8859-X (this is what C<guestfs_strings> uses)."
11791 #: ../src/guestfs-actions.pod:4624 ../fish/guestfish-actions.pod:3563
11796 #: ../src/guestfs-actions.pod:4626 ../fish/guestfish-actions.pod:3565
11797 msgid "Single 8-bit-byte characters."
11801 #: ../src/guestfs-actions.pod:4628 ../fish/guestfish-actions.pod:3567
11806 #: ../src/guestfs-actions.pod:4630 ../fish/guestfish-actions.pod:3569
11807 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
11811 #: ../src/guestfs-actions.pod:4633 ../fish/guestfish-actions.pod:3572
11812 msgid "l (lower case letter L)"
11816 #: ../src/guestfs-actions.pod:4635 ../fish/guestfish-actions.pod:3574
11818 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
11819 "examining binaries in Windows guests."
11823 #: ../src/guestfs-actions.pod:4638 ../fish/guestfish-actions.pod:3577
11828 #: ../src/guestfs-actions.pod:4640 ../fish/guestfish-actions.pod:3579
11829 msgid "32-bit big endian such as UCS-4BE."
11833 #: ../src/guestfs-actions.pod:4642 ../fish/guestfish-actions.pod:3581
11838 #: ../src/guestfs-actions.pod:4644 ../fish/guestfish-actions.pod:3583
11839 msgid "32-bit little endian such as UCS-4LE."
11843 #: ../src/guestfs-actions.pod:4648 ../fish/guestfish-actions.pod:3587
11844 msgid "The returned strings are transcoded to UTF-8."
11848 #: ../src/guestfs-actions.pod:4657
11849 msgid "guestfs_swapoff_device"
11853 #: ../src/guestfs-actions.pod:4659
11856 " int guestfs_swapoff_device (guestfs_h *g,\n"
11857 "\t\tconst char *device);\n"
11862 #: ../src/guestfs-actions.pod:4662
11864 "This command disables the libguestfs appliance swap device or partition "
11865 "named C<device>. See C<guestfs_swapon_device>."
11869 #: ../src/guestfs-actions.pod:4668
11870 msgid "guestfs_swapoff_file"
11874 #: ../src/guestfs-actions.pod:4670
11877 " int guestfs_swapoff_file (guestfs_h *g,\n"
11878 "\t\tconst char *file);\n"
11883 #: ../src/guestfs-actions.pod:4673 ../fish/guestfish-actions.pod:3604
11884 msgid "This command disables the libguestfs appliance swap on file."
11888 #: ../src/guestfs-actions.pod:4677
11889 msgid "guestfs_swapoff_label"
11893 #: ../src/guestfs-actions.pod:4679
11896 " int guestfs_swapoff_label (guestfs_h *g,\n"
11897 "\t\tconst char *label);\n"
11902 #: ../src/guestfs-actions.pod:4682 ../fish/guestfish-actions.pod:3610
11904 "This command disables the libguestfs appliance swap on labeled swap "
11909 #: ../src/guestfs-actions.pod:4687
11910 msgid "guestfs_swapoff_uuid"
11914 #: ../src/guestfs-actions.pod:4689
11917 " int guestfs_swapoff_uuid (guestfs_h *g,\n"
11918 "\t\tconst char *uuid);\n"
11923 #: ../src/guestfs-actions.pod:4692 ../fish/guestfish-actions.pod:3617
11925 "This command disables the libguestfs appliance swap partition with the given "
11930 #: ../src/guestfs-actions.pod:4697
11931 msgid "guestfs_swapon_device"
11935 #: ../src/guestfs-actions.pod:4699
11938 " int guestfs_swapon_device (guestfs_h *g,\n"
11939 "\t\tconst char *device);\n"
11944 #: ../src/guestfs-actions.pod:4702
11946 "This command enables the libguestfs appliance to use the swap device or "
11947 "partition named C<device>. The increased memory is made available for all "
11948 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
11952 #: ../src/guestfs-actions.pod:4707 ../fish/guestfish-actions.pod:3629
11954 "Note that you should not swap to existing guest swap partitions unless you "
11955 "know what you are doing. They may contain hibernation information, or other "
11956 "information that the guest doesn't want you to trash. You also risk leaking "
11957 "information about the host to the guest this way. Instead, attach a new "
11958 "host device to the guest and swap on that."
11962 #: ../src/guestfs-actions.pod:4716
11963 msgid "guestfs_swapon_file"
11967 #: ../src/guestfs-actions.pod:4718
11970 " int guestfs_swapon_file (guestfs_h *g,\n"
11971 "\t\tconst char *file);\n"
11976 #: ../src/guestfs-actions.pod:4721
11978 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
11983 #: ../src/guestfs-actions.pod:4726
11984 msgid "guestfs_swapon_label"
11988 #: ../src/guestfs-actions.pod:4728
11991 " int guestfs_swapon_label (guestfs_h *g,\n"
11992 "\t\tconst char *label);\n"
11997 #: ../src/guestfs-actions.pod:4731
11999 "This command enables swap to a labeled swap partition. See "
12000 "C<guestfs_swapon_device> for other notes."
12004 #: ../src/guestfs-actions.pod:4736
12005 msgid "guestfs_swapon_uuid"
12009 #: ../src/guestfs-actions.pod:4738
12012 " int guestfs_swapon_uuid (guestfs_h *g,\n"
12013 "\t\tconst char *uuid);\n"
12018 #: ../src/guestfs-actions.pod:4741
12020 "This command enables swap to a swap partition with the given UUID. See "
12021 "C<guestfs_swapon_device> for other notes."
12025 #: ../src/guestfs-actions.pod:4746
12026 msgid "guestfs_sync"
12030 #: ../src/guestfs-actions.pod:4748
12033 " int guestfs_sync (guestfs_h *g);\n"
12038 #: ../src/guestfs-actions.pod:4750 ../fish/guestfish-actions.pod:3661
12040 "This syncs the disk, so that any writes are flushed through to the "
12041 "underlying disk image."
12045 #: ../src/guestfs-actions.pod:4753 ../fish/guestfish-actions.pod:3664
12047 "You should always call this if you have modified a disk image, before "
12048 "closing the handle."
12052 #: ../src/guestfs-actions.pod:4758
12053 msgid "guestfs_tail"
12057 #: ../src/guestfs-actions.pod:4760
12060 " char **guestfs_tail (guestfs_h *g,\n"
12061 "\t\tconst char *path);\n"
12066 #: ../src/guestfs-actions.pod:4763 ../fish/guestfish-actions.pod:3671
12067 msgid "This command returns up to the last 10 lines of a file as a list of strings."
12071 #: ../src/guestfs-actions.pod:4773
12072 msgid "guestfs_tail_n"
12076 #: ../src/guestfs-actions.pod:4775
12079 " char **guestfs_tail_n (guestfs_h *g,\n"
12080 "\t\tint nrlines,\n"
12081 "\t\tconst char *path);\n"
12086 #: ../src/guestfs-actions.pod:4779 ../fish/guestfish-actions.pod:3681
12088 "If the parameter C<nrlines> is a positive number, this returns the last "
12089 "C<nrlines> lines of the file C<path>."
12093 #: ../src/guestfs-actions.pod:4782 ../fish/guestfish-actions.pod:3684
12095 "If the parameter C<nrlines> is a negative number, this returns lines from "
12096 "the file C<path>, starting with the C<-nrlines>th line."
12100 #: ../src/guestfs-actions.pod:4794
12101 msgid "guestfs_tar_in"
12105 #: ../src/guestfs-actions.pod:4796
12108 " int guestfs_tar_in (guestfs_h *g,\n"
12109 "\t\tconst char *tarfile,\n"
12110 "\t\tconst char *directory);\n"
12115 #: ../src/guestfs-actions.pod:4800 ../fish/guestfish-actions.pod:3696
12117 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
12118 "tar file) into C<directory>."
12122 #: ../src/guestfs-actions.pod:4803
12123 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
12127 #: ../src/guestfs-actions.pod:4808
12128 msgid "guestfs_tar_out"
12132 #: ../src/guestfs-actions.pod:4810
12135 " int guestfs_tar_out (guestfs_h *g,\n"
12136 "\t\tconst char *directory,\n"
12137 "\t\tconst char *tarfile);\n"
12142 #: ../src/guestfs-actions.pod:4814 ../fish/guestfish-actions.pod:3708
12144 "This command packs the contents of C<directory> and downloads it to local "
12149 #: ../src/guestfs-actions.pod:4817
12151 "To download a compressed tarball, use C<guestfs_tgz_out> or "
12152 "C<guestfs_txz_out>."
12156 #: ../src/guestfs-actions.pod:4822
12157 msgid "guestfs_tgz_in"
12161 #: ../src/guestfs-actions.pod:4824
12164 " int guestfs_tgz_in (guestfs_h *g,\n"
12165 "\t\tconst char *tarball,\n"
12166 "\t\tconst char *directory);\n"
12171 #: ../src/guestfs-actions.pod:4828 ../fish/guestfish-actions.pod:3720
12173 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
12174 "tar file) into C<directory>."
12178 #: ../src/guestfs-actions.pod:4831
12179 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
12183 #: ../src/guestfs-actions.pod:4835
12184 msgid "guestfs_tgz_out"
12188 #: ../src/guestfs-actions.pod:4837
12191 " int guestfs_tgz_out (guestfs_h *g,\n"
12192 "\t\tconst char *directory,\n"
12193 "\t\tconst char *tarball);\n"
12198 #: ../src/guestfs-actions.pod:4841 ../fish/guestfish-actions.pod:3731
12200 "This command packs the contents of C<directory> and downloads it to local "
12205 #: ../src/guestfs-actions.pod:4844
12206 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
12210 #: ../src/guestfs-actions.pod:4848
12211 msgid "guestfs_touch"
12215 #: ../src/guestfs-actions.pod:4850
12218 " int guestfs_touch (guestfs_h *g,\n"
12219 "\t\tconst char *path);\n"
12224 #: ../src/guestfs-actions.pod:4853 ../fish/guestfish-actions.pod:3742
12226 "Touch acts like the L<touch(1)> command. It can be used to update the "
12227 "timestamps on a file, or, if the file does not exist, to create a new "
12228 "zero-length file."
12232 #: ../src/guestfs-actions.pod:4857 ../fish/guestfish-actions.pod:3746
12234 "This command only works on regular files, and will fail on other file types "
12235 "such as directories, symbolic links, block special etc."
12239 #: ../src/guestfs-actions.pod:4862
12240 msgid "guestfs_truncate"
12244 #: ../src/guestfs-actions.pod:4864
12247 " int guestfs_truncate (guestfs_h *g,\n"
12248 "\t\tconst char *path);\n"
12253 #: ../src/guestfs-actions.pod:4867 ../fish/guestfish-actions.pod:3753
12255 "This command truncates C<path> to a zero-length file. The file must exist "
12260 #: ../src/guestfs-actions.pod:4872
12261 msgid "guestfs_truncate_size"
12265 #: ../src/guestfs-actions.pod:4874
12268 " int guestfs_truncate_size (guestfs_h *g,\n"
12269 "\t\tconst char *path,\n"
12270 "\t\tint64_t size);\n"
12275 #: ../src/guestfs-actions.pod:4878 ../fish/guestfish-actions.pod:3760
12277 "This command truncates C<path> to size C<size> bytes. The file must exist "
12282 #: ../src/guestfs-actions.pod:4881
12284 "If the current file size is less than C<size> then the file is extended to "
12285 "the required size with zero bytes. This creates a sparse file (ie. disk "
12286 "blocks are not allocated for the file until you write to it). To create a "
12287 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
12291 #: ../src/guestfs-actions.pod:4889
12292 msgid "guestfs_tune2fs_l"
12296 #: ../src/guestfs-actions.pod:4891
12299 " char **guestfs_tune2fs_l (guestfs_h *g,\n"
12300 "\t\tconst char *device);\n"
12305 #: ../src/guestfs-actions.pod:4894 ../fish/guestfish-actions.pod:3773
12307 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
12312 #: ../src/guestfs-actions.pod:4897 ../fish/guestfish-actions.pod:3776
12314 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
12315 "for more details. The list of fields returned isn't clearly defined, and "
12316 "depends on both the version of C<tune2fs> that libguestfs was built against, "
12317 "and the filesystem itself."
12321 #: ../src/guestfs-actions.pod:4908
12322 msgid "guestfs_txz_in"
12326 #: ../src/guestfs-actions.pod:4910
12329 " int guestfs_txz_in (guestfs_h *g,\n"
12330 "\t\tconst char *tarball,\n"
12331 "\t\tconst char *directory);\n"
12336 #: ../src/guestfs-actions.pod:4914 ../fish/guestfish-actions.pod:3785
12338 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
12339 "tar file) into C<directory>."
12343 #: ../src/guestfs-actions.pod:4919
12344 msgid "guestfs_txz_out"
12348 #: ../src/guestfs-actions.pod:4921
12351 " int guestfs_txz_out (guestfs_h *g,\n"
12352 "\t\tconst char *directory,\n"
12353 "\t\tconst char *tarball);\n"
12358 #: ../src/guestfs-actions.pod:4925 ../fish/guestfish-actions.pod:3794
12360 "This command packs the contents of C<directory> and downloads it to local "
12361 "file C<tarball> (as an xz compressed tar archive)."
12365 #: ../src/guestfs-actions.pod:4930
12366 msgid "guestfs_umask"
12370 #: ../src/guestfs-actions.pod:4932
12373 " int guestfs_umask (guestfs_h *g,\n"
12379 #: ../src/guestfs-actions.pod:4935 ../fish/guestfish-actions.pod:3803
12381 "This function sets the mask used for creating new files and device nodes to "
12386 #: ../src/guestfs-actions.pod:4938 ../fish/guestfish-actions.pod:3806
12388 "Typical umask values would be C<022> which creates new files with "
12389 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
12390 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
12394 #: ../src/guestfs-actions.pod:4943 ../fish/guestfish-actions.pod:3811
12396 "The default umask is C<022>. This is important because it means that "
12397 "directories and device nodes will be created with C<0644> or C<0755> mode "
12398 "even if you specify C<0777>."
12402 #: ../src/guestfs-actions.pod:4947
12404 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
12405 "C<guestfs_mkdir>."
12409 #: ../src/guestfs-actions.pod:4950 ../fish/guestfish-actions.pod:3818
12410 msgid "This call returns the previous umask."
12414 #: ../src/guestfs-actions.pod:4954
12415 msgid "guestfs_umount"
12419 #: ../src/guestfs-actions.pod:4956
12422 " int guestfs_umount (guestfs_h *g,\n"
12423 "\t\tconst char *pathordevice);\n"
12428 #: ../src/guestfs-actions.pod:4959 ../fish/guestfish-actions.pod:3824
12430 "This unmounts the given filesystem. The filesystem may be specified either "
12431 "by its mountpoint (path) or the device which contains the filesystem."
12435 #: ../src/guestfs-actions.pod:4965
12436 msgid "guestfs_umount_all"
12440 #: ../src/guestfs-actions.pod:4967
12443 " int guestfs_umount_all (guestfs_h *g);\n"
12448 #: ../src/guestfs-actions.pod:4969 ../fish/guestfish-actions.pod:3832
12449 msgid "This unmounts all mounted filesystems."
12453 #: ../src/guestfs-actions.pod:4971 ../fish/guestfish-actions.pod:3834
12454 msgid "Some internal mounts are not unmounted by this call."
12458 #: ../src/guestfs-actions.pod:4975
12459 msgid "guestfs_upload"
12463 #: ../src/guestfs-actions.pod:4977
12466 " int guestfs_upload (guestfs_h *g,\n"
12467 "\t\tconst char *filename,\n"
12468 "\t\tconst char *remotefilename);\n"
12473 #: ../src/guestfs-actions.pod:4981 ../fish/guestfish-actions.pod:3840
12474 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
12478 #: ../src/guestfs-actions.pod:4986
12479 msgid "See also C<guestfs_download>."
12483 #: ../src/guestfs-actions.pod:4990
12484 msgid "guestfs_utimens"
12488 #: ../src/guestfs-actions.pod:4992
12491 " int guestfs_utimens (guestfs_h *g,\n"
12492 "\t\tconst char *path,\n"
12493 "\t\tint64_t atsecs,\n"
12494 "\t\tint64_t atnsecs,\n"
12495 "\t\tint64_t mtsecs,\n"
12496 "\t\tint64_t mtnsecs);\n"
12501 #: ../src/guestfs-actions.pod:4999 ../fish/guestfish-actions.pod:3853
12502 msgid "This command sets the timestamps of a file with nanosecond precision."
12506 #: ../src/guestfs-actions.pod:5002 ../fish/guestfish-actions.pod:3856
12508 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
12513 #: ../src/guestfs-actions.pod:5005 ../fish/guestfish-actions.pod:3859
12515 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
12516 "nanoseconds from the epoch."
12520 #: ../src/guestfs-actions.pod:5008 ../fish/guestfish-actions.pod:3862
12522 "If the C<*nsecs> field contains the special value C<-1> then the "
12523 "corresponding timestamp is set to the current time. (The C<*secs> field is "
12524 "ignored in this case)."
12528 #: ../src/guestfs-actions.pod:5012 ../fish/guestfish-actions.pod:3866
12530 "If the C<*nsecs> field contains the special value C<-2> then the "
12531 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
12536 #: ../src/guestfs-actions.pod:5018 ../src/guestfs-structs.pod:175
12537 msgid "guestfs_version"
12541 #: ../src/guestfs-actions.pod:5020
12544 " struct guestfs_version *guestfs_version (guestfs_h *g);\n"
12549 #: ../src/guestfs-actions.pod:5022 ../fish/guestfish-actions.pod:3874
12550 msgid "Return the libguestfs version number that the program is linked against."
12554 #: ../src/guestfs-actions.pod:5025 ../fish/guestfish-actions.pod:3877
12556 "Note that because of dynamic linking this is not necessarily the version of "
12557 "libguestfs that you compiled against. You can compile the program, and then "
12558 "at runtime dynamically link against a completely different C<libguestfs.so> "
12563 #: ../src/guestfs-actions.pod:5030 ../fish/guestfish-actions.pod:3882
12565 "This call was added in version C<1.0.58>. In previous versions of "
12566 "libguestfs there was no way to get the version number. From C code you can "
12567 "use dynamic linker functions to find out if this symbol exists (if it "
12568 "doesn't, then it's an earlier version)."
12572 #: ../src/guestfs-actions.pod:5036 ../fish/guestfish-actions.pod:3888
12574 "The call returns a structure with four elements. The first three (C<major>, "
12575 "C<minor> and C<release>) are numbers and correspond to the usual version "
12576 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
12577 "but may be used for distro-specific information."
12581 #: ../src/guestfs-actions.pod:5042 ../fish/guestfish-actions.pod:3894
12582 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
12586 #: ../src/guestfs-actions.pod:5045 ../fish/guestfish-actions.pod:3897
12587 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
12591 #: ../src/guestfs-actions.pod:5047
12593 "I<Note:> Don't use this call to test for availability of features. In "
12594 "enterprise distributions we backport features from later versions into "
12595 "earlier versions, making this an unreliable way to test for features. Use "
12596 "C<guestfs_available> instead."
12600 #: ../src/guestfs-actions.pod:5053
12602 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
12603 "error. I<The caller must call C<guestfs_free_version> after use>."
12607 #: ../src/guestfs-actions.pod:5057
12608 msgid "guestfs_vfs_label"
12612 #: ../src/guestfs-actions.pod:5059
12615 " char *guestfs_vfs_label (guestfs_h *g,\n"
12616 "\t\tconst char *device);\n"
12621 #: ../src/guestfs-actions.pod:5062 ../fish/guestfish-actions.pod:3909
12622 msgid "This returns the filesystem label of the filesystem on C<device>."
12626 #: ../src/guestfs-actions.pod:5065 ../fish/guestfish-actions.pod:3912
12627 msgid "If the filesystem is unlabeled, this returns the empty string."
12631 #: ../src/guestfs-actions.pod:5067
12632 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
12636 #: ../src/guestfs-actions.pod:5072
12637 msgid "guestfs_vfs_type"
12641 #: ../src/guestfs-actions.pod:5074
12644 " char *guestfs_vfs_type (guestfs_h *g,\n"
12645 "\t\tconst char *device);\n"
12650 #: ../src/guestfs-actions.pod:5077 ../fish/guestfish-actions.pod:3920
12652 "This command gets the filesystem type corresponding to the filesystem on "
12657 #: ../src/guestfs-actions.pod:5080 ../fish/guestfish-actions.pod:3923
12659 "For most filesystems, the result is the name of the Linux VFS module which "
12660 "would be used to mount this filesystem if you mounted it without specifying "
12661 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
12665 #: ../src/guestfs-actions.pod:5088
12666 msgid "guestfs_vfs_uuid"
12670 #: ../src/guestfs-actions.pod:5090
12673 " char *guestfs_vfs_uuid (guestfs_h *g,\n"
12674 "\t\tconst char *device);\n"
12679 #: ../src/guestfs-actions.pod:5093 ../fish/guestfish-actions.pod:3932
12680 msgid "This returns the filesystem UUID of the filesystem on C<device>."
12684 #: ../src/guestfs-actions.pod:5096 ../fish/guestfish-actions.pod:3935
12685 msgid "If the filesystem does not have a UUID, this returns the empty string."
12689 #: ../src/guestfs-actions.pod:5098
12690 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
12694 #: ../src/guestfs-actions.pod:5103
12695 msgid "guestfs_vg_activate"
12699 #: ../src/guestfs-actions.pod:5105
12702 " int guestfs_vg_activate (guestfs_h *g,\n"
12703 "\t\tint activate,\n"
12704 "\t\tchar *const *volgroups);\n"
12709 #: ../src/guestfs-actions.pod:5109 ../fish/guestfish-actions.pod:3943
12711 "This command activates or (if C<activate> is false) deactivates all logical "
12712 "volumes in the listed volume groups C<volgroups>. If activated, then they "
12713 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
12714 "deactivated, then those devices disappear."
12718 #: ../src/guestfs-actions.pod:5115 ../fish/guestfish-actions.pod:3949
12719 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
12723 #: ../src/guestfs-actions.pod:5117 ../fish/guestfish-actions.pod:3951
12725 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
12726 "activated or deactivated."
12730 #: ../src/guestfs-actions.pod:5122
12731 msgid "guestfs_vg_activate_all"
12735 #: ../src/guestfs-actions.pod:5124
12738 " int guestfs_vg_activate_all (guestfs_h *g,\n"
12739 "\t\tint activate);\n"
12744 #: ../src/guestfs-actions.pod:5127 ../fish/guestfish-actions.pod:3958
12746 "This command activates or (if C<activate> is false) deactivates all logical "
12747 "volumes in all volume groups. If activated, then they are made known to the "
12748 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
12749 "those devices disappear."
12753 #: ../src/guestfs-actions.pod:5133 ../fish/guestfish-actions.pod:3964
12754 msgid "This command is the same as running C<vgchange -a y|n>"
12758 #: ../src/guestfs-actions.pod:5137
12759 msgid "guestfs_vgcreate"
12763 #: ../src/guestfs-actions.pod:5139
12766 " int guestfs_vgcreate (guestfs_h *g,\n"
12767 "\t\tconst char *volgroup,\n"
12768 "\t\tchar *const *physvols);\n"
12773 #: ../src/guestfs-actions.pod:5143 ../fish/guestfish-actions.pod:3970
12775 "This creates an LVM volume group called C<volgroup> from the non-empty list "
12776 "of physical volumes C<physvols>."
12780 #: ../src/guestfs-actions.pod:5148
12781 msgid "guestfs_vglvuuids"
12785 #: ../src/guestfs-actions.pod:5150
12788 " char **guestfs_vglvuuids (guestfs_h *g,\n"
12789 "\t\tconst char *vgname);\n"
12794 #: ../src/guestfs-actions.pod:5153 ../fish/guestfish-actions.pod:3977
12796 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
12797 "volumes created in this volume group."
12801 #: ../src/guestfs-actions.pod:5156
12803 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
12804 "associate logical volumes and volume groups."
12808 #: ../src/guestfs-actions.pod:5159
12809 msgid "See also C<guestfs_vgpvuuids>."
12813 #: ../src/guestfs-actions.pod:5165
12814 msgid "guestfs_vgpvuuids"
12818 #: ../src/guestfs-actions.pod:5167
12821 " char **guestfs_vgpvuuids (guestfs_h *g,\n"
12822 "\t\tconst char *vgname);\n"
12827 #: ../src/guestfs-actions.pod:5170 ../fish/guestfish-actions.pod:3989
12829 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
12830 "volumes that this volume group resides on."
12834 #: ../src/guestfs-actions.pod:5173
12836 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
12837 "associate physical volumes and volume groups."
12841 #: ../src/guestfs-actions.pod:5176
12842 msgid "See also C<guestfs_vglvuuids>."
12846 #: ../src/guestfs-actions.pod:5182
12847 msgid "guestfs_vgremove"
12851 #: ../src/guestfs-actions.pod:5184
12854 " int guestfs_vgremove (guestfs_h *g,\n"
12855 "\t\tconst char *vgname);\n"
12860 #: ../src/guestfs-actions.pod:5187 ../fish/guestfish-actions.pod:4001
12861 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
12865 #: ../src/guestfs-actions.pod:5189 ../fish/guestfish-actions.pod:4003
12866 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
12870 #: ../src/guestfs-actions.pod:5194
12871 msgid "guestfs_vgrename"
12875 #: ../src/guestfs-actions.pod:5196
12878 " int guestfs_vgrename (guestfs_h *g,\n"
12879 "\t\tconst char *volgroup,\n"
12880 "\t\tconst char *newvolgroup);\n"
12885 #: ../src/guestfs-actions.pod:5200 ../fish/guestfish-actions.pod:4010
12886 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
12890 #: ../src/guestfs-actions.pod:5204
12891 msgid "guestfs_vgs"
12895 #: ../src/guestfs-actions.pod:5206
12898 " char **guestfs_vgs (guestfs_h *g);\n"
12903 #: ../src/guestfs-actions.pod:5208 ../fish/guestfish-actions.pod:4016
12905 "List all the volumes groups detected. This is the equivalent of the "
12906 "L<vgs(8)> command."
12910 #: ../src/guestfs-actions.pod:5211 ../fish/guestfish-actions.pod:4019
12912 "This returns a list of just the volume group names that were detected "
12913 "(eg. C<VolGroup00>)."
12917 #: ../src/guestfs-actions.pod:5214
12918 msgid "See also C<guestfs_vgs_full>."
12922 #: ../src/guestfs-actions.pod:5220
12923 msgid "guestfs_vgs_full"
12927 #: ../src/guestfs-actions.pod:5222
12930 " struct guestfs_lvm_vg_list *guestfs_vgs_full (guestfs_h *g);\n"
12935 #: ../src/guestfs-actions.pod:5224 ../fish/guestfish-actions.pod:4028
12937 "List all the volumes groups detected. This is the equivalent of the "
12938 "L<vgs(8)> command. The \"full\" version includes all fields."
12942 #: ../src/guestfs-actions.pod:5227
12944 "This function returns a C<struct guestfs_lvm_vg_list *> (see "
12945 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
12946 "must call C<guestfs_free_lvm_vg_list> after use>."
12950 #: ../src/guestfs-actions.pod:5232
12951 msgid "guestfs_vgscan"
12955 #: ../src/guestfs-actions.pod:5234
12958 " int guestfs_vgscan (guestfs_h *g);\n"
12963 #: ../src/guestfs-actions.pod:5236 ../fish/guestfish-actions.pod:4035
12965 "This rescans all block devices and rebuilds the list of LVM physical "
12966 "volumes, volume groups and logical volumes."
12970 #: ../src/guestfs-actions.pod:5241
12971 msgid "guestfs_vguuid"
12975 #: ../src/guestfs-actions.pod:5243
12978 " char *guestfs_vguuid (guestfs_h *g,\n"
12979 "\t\tconst char *vgname);\n"
12984 #: ../src/guestfs-actions.pod:5246 ../fish/guestfish-actions.pod:4042
12985 msgid "This command returns the UUID of the LVM VG named C<vgname>."
12989 #: ../src/guestfs-actions.pod:5251
12990 msgid "guestfs_wait_ready"
12994 #: ../src/guestfs-actions.pod:5253
12997 " int guestfs_wait_ready (guestfs_h *g);\n"
13002 #: ../src/guestfs-actions.pod:5255
13003 msgid "This function is a no op."
13007 #: ../src/guestfs-actions.pod:5257
13009 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
13010 "calling C<guestfs_launch> to wait for the launch to complete. However this "
13011 "is no longer necessary because C<guestfs_launch> now does the waiting."
13015 #: ../src/guestfs-actions.pod:5262
13017 "If you see any calls to this function in code then you can just remove them, "
13018 "unless you want to retain compatibility with older versions of the API."
13022 #: ../src/guestfs-actions.pod:5268
13023 msgid "guestfs_wc_c"
13027 #: ../src/guestfs-actions.pod:5270
13030 " int guestfs_wc_c (guestfs_h *g,\n"
13031 "\t\tconst char *path);\n"
13036 #: ../src/guestfs-actions.pod:5273 ../fish/guestfish-actions.pod:4048
13038 "This command counts the characters in a file, using the C<wc -c> external "
13043 #: ../src/guestfs-actions.pod:5278
13044 msgid "guestfs_wc_l"
13048 #: ../src/guestfs-actions.pod:5280
13051 " int guestfs_wc_l (guestfs_h *g,\n"
13052 "\t\tconst char *path);\n"
13057 #: ../src/guestfs-actions.pod:5283 ../fish/guestfish-actions.pod:4055
13059 "This command counts the lines in a file, using the C<wc -l> external "
13064 #: ../src/guestfs-actions.pod:5288
13065 msgid "guestfs_wc_w"
13069 #: ../src/guestfs-actions.pod:5290
13072 " int guestfs_wc_w (guestfs_h *g,\n"
13073 "\t\tconst char *path);\n"
13078 #: ../src/guestfs-actions.pod:5293 ../fish/guestfish-actions.pod:4062
13080 "This command counts the words in a file, using the C<wc -w> external "
13085 #: ../src/guestfs-actions.pod:5298
13086 msgid "guestfs_write"
13090 #: ../src/guestfs-actions.pod:5300
13093 " int guestfs_write (guestfs_h *g,\n"
13094 "\t\tconst char *path,\n"
13095 "\t\tconst char *content,\n"
13096 "\t\tsize_t content_size);\n"
13101 #: ../src/guestfs-actions.pod:5305 ../fish/guestfish-actions.pod:4069
13103 "This call creates a file called C<path>. The content of the file is the "
13104 "string C<content> (which can contain any 8 bit data)."
13108 #: ../src/guestfs-actions.pod:5313
13109 msgid "guestfs_write_file"
13113 #: ../src/guestfs-actions.pod:5315
13116 " int guestfs_write_file (guestfs_h *g,\n"
13117 "\t\tconst char *path,\n"
13118 "\t\tconst char *content,\n"
13124 #: ../src/guestfs-actions.pod:5320 ../fish/guestfish-actions.pod:4079
13126 "This call creates a file called C<path>. The contents of the file is the "
13127 "string C<content> (which can contain any 8 bit data), with length C<size>."
13131 #: ../src/guestfs-actions.pod:5324 ../fish/guestfish-actions.pod:4083
13133 "As a special case, if C<size> is C<0> then the length is calculated using "
13134 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
13138 #: ../src/guestfs-actions.pod:5328 ../fish/guestfish-actions.pod:4087
13140 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
13141 "I<not> work, even if the length is specified."
13145 #: ../src/guestfs-actions.pod:5336 ../fish/guestfish-actions.pod:4093
13146 msgid "This function is deprecated. In new code, use the C<write> call instead."
13150 #: ../src/guestfs-actions.pod:5343
13151 msgid "guestfs_zegrep"
13155 #: ../src/guestfs-actions.pod:5345
13158 " char **guestfs_zegrep (guestfs_h *g,\n"
13159 "\t\tconst char *regex,\n"
13160 "\t\tconst char *path);\n"
13165 #: ../src/guestfs-actions.pod:5349 ../fish/guestfish-actions.pod:4104
13166 msgid "This calls the external C<zegrep> program and returns the matching lines."
13170 #: ../src/guestfs-actions.pod:5359
13171 msgid "guestfs_zegrepi"
13175 #: ../src/guestfs-actions.pod:5361
13178 " char **guestfs_zegrepi (guestfs_h *g,\n"
13179 "\t\tconst char *regex,\n"
13180 "\t\tconst char *path);\n"
13185 #: ../src/guestfs-actions.pod:5365 ../fish/guestfish-actions.pod:4114
13186 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
13190 #: ../src/guestfs-actions.pod:5375
13191 msgid "guestfs_zero"
13195 #: ../src/guestfs-actions.pod:5377
13198 " int guestfs_zero (guestfs_h *g,\n"
13199 "\t\tconst char *device);\n"
13204 #: ../src/guestfs-actions.pod:5380 ../fish/guestfish-actions.pod:4124
13205 msgid "This command writes zeroes over the first few blocks of C<device>."
13209 #: ../src/guestfs-actions.pod:5382 ../fish/guestfish-actions.pod:4126
13211 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
13212 "securely wipe the device). It should be sufficient to remove any partition "
13213 "tables, filesystem superblocks and so on."
13217 #: ../src/guestfs-actions.pod:5386
13218 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
13222 #: ../src/guestfs-actions.pod:5395
13223 msgid "guestfs_zero_device"
13227 #: ../src/guestfs-actions.pod:5397
13230 " int guestfs_zero_device (guestfs_h *g,\n"
13231 "\t\tconst char *device);\n"
13236 #: ../src/guestfs-actions.pod:5400
13238 "This command writes zeroes over the entire C<device>. Compare with "
13239 "C<guestfs_zero> which just zeroes the first few blocks of a device."
13243 #: ../src/guestfs-actions.pod:5414
13244 msgid "guestfs_zerofree"
13248 #: ../src/guestfs-actions.pod:5416
13251 " int guestfs_zerofree (guestfs_h *g,\n"
13252 "\t\tconst char *device);\n"
13257 #: ../src/guestfs-actions.pod:5419 ../fish/guestfish-actions.pod:4147
13259 "This runs the I<zerofree> program on C<device>. This program claims to zero "
13260 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
13261 "possible to compress the filesystem more effectively."
13265 #: ../src/guestfs-actions.pod:5424 ../fish/guestfish-actions.pod:4152
13266 msgid "You should B<not> run this program if the filesystem is mounted."
13270 #: ../src/guestfs-actions.pod:5427 ../fish/guestfish-actions.pod:4155
13272 "It is possible that using this program can damage the filesystem or data on "
13277 #: ../src/guestfs-actions.pod:5432
13278 msgid "guestfs_zfgrep"
13282 #: ../src/guestfs-actions.pod:5434
13285 " char **guestfs_zfgrep (guestfs_h *g,\n"
13286 "\t\tconst char *pattern,\n"
13287 "\t\tconst char *path);\n"
13292 #: ../src/guestfs-actions.pod:5438 ../fish/guestfish-actions.pod:4162
13293 msgid "This calls the external C<zfgrep> program and returns the matching lines."
13297 #: ../src/guestfs-actions.pod:5448
13298 msgid "guestfs_zfgrepi"
13302 #: ../src/guestfs-actions.pod:5450
13305 " char **guestfs_zfgrepi (guestfs_h *g,\n"
13306 "\t\tconst char *pattern,\n"
13307 "\t\tconst char *path);\n"
13312 #: ../src/guestfs-actions.pod:5454 ../fish/guestfish-actions.pod:4172
13313 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
13317 #: ../src/guestfs-actions.pod:5464
13318 msgid "guestfs_zfile"
13322 #: ../src/guestfs-actions.pod:5466
13325 " char *guestfs_zfile (guestfs_h *g,\n"
13326 "\t\tconst char *meth,\n"
13327 "\t\tconst char *path);\n"
13332 #: ../src/guestfs-actions.pod:5470 ../fish/guestfish-actions.pod:4182
13333 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
13337 #: ../src/guestfs-actions.pod:5473 ../fish/guestfish-actions.pod:4185
13338 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
13342 #: ../src/guestfs-actions.pod:5475
13344 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
13349 #: ../src/guestfs-actions.pod:5481 ../fish/guestfish-actions.pod:4190
13350 msgid "This function is deprecated. In new code, use the C<file> call instead."
13354 #: ../src/guestfs-actions.pod:5488
13355 msgid "guestfs_zgrep"
13359 #: ../src/guestfs-actions.pod:5490
13362 " char **guestfs_zgrep (guestfs_h *g,\n"
13363 "\t\tconst char *regex,\n"
13364 "\t\tconst char *path);\n"
13369 #: ../src/guestfs-actions.pod:5494 ../fish/guestfish-actions.pod:4201
13370 msgid "This calls the external C<zgrep> program and returns the matching lines."
13374 #: ../src/guestfs-actions.pod:5504
13375 msgid "guestfs_zgrepi"
13379 #: ../src/guestfs-actions.pod:5506
13382 " char **guestfs_zgrepi (guestfs_h *g,\n"
13383 "\t\tconst char *regex,\n"
13384 "\t\tconst char *path);\n"
13389 #: ../src/guestfs-actions.pod:5510 ../fish/guestfish-actions.pod:4211
13390 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
13394 #: ../src/guestfs-availability.pod:3
13399 #: ../src/guestfs-availability.pod:5
13401 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
13402 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
13403 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
13404 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
13405 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
13409 #: ../src/guestfs-availability.pod:21
13414 #: ../src/guestfs-availability.pod:23
13416 "The following functions: L</guestfs_inotify_add_watch> "
13417 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
13418 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
13422 #: ../src/guestfs-availability.pod:31
13423 msgid "B<linuxfsuuid>"
13427 #: ../src/guestfs-availability.pod:33
13429 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
13430 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
13434 #: ../src/guestfs-availability.pod:40
13435 msgid "B<linuxmodules>"
13439 #: ../src/guestfs-availability.pod:42
13440 msgid "The following functions: L</guestfs_modprobe>"
13444 #: ../src/guestfs-availability.pod:45
13445 msgid "B<linuxxattrs>"
13449 #: ../src/guestfs-availability.pod:47
13451 "The following functions: L</guestfs_getxattrs> L</guestfs_lgetxattrs> "
13452 "L</guestfs_lremovexattr> L</guestfs_lsetxattr> L</guestfs_lxattrlist> "
13453 "L</guestfs_removexattr> L</guestfs_setxattr>"
13457 #: ../src/guestfs-availability.pod:56
13462 #: ../src/guestfs-availability.pod:58
13464 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
13465 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
13466 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
13470 #: ../src/guestfs-availability.pod:67
13475 #: ../src/guestfs-availability.pod:69
13477 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
13478 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
13479 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
13480 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
13481 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
13482 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
13483 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
13484 "L</guestfs_vgs_full>"
13488 #: ../src/guestfs-availability.pod:92
13493 #: ../src/guestfs-availability.pod:94
13495 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
13496 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
13500 #: ../src/guestfs-availability.pod:100
13505 #: ../src/guestfs-availability.pod:102
13506 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
13510 #: ../src/guestfs-availability.pod:105
13511 msgid "B<ntfsprogs>"
13515 #: ../src/guestfs-availability.pod:107
13516 msgid "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
13520 #: ../src/guestfs-availability.pod:111
13521 msgid "B<realpath>"
13525 #: ../src/guestfs-availability.pod:113
13526 msgid "The following functions: L</guestfs_realpath>"
13530 #: ../src/guestfs-availability.pod:116
13535 #: ../src/guestfs-availability.pod:118
13537 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
13538 "L</guestfs_scrub_freespace>"
13542 #: ../src/guestfs-availability.pod:123
13547 #: ../src/guestfs-availability.pod:125
13548 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
13552 #: ../src/guestfs-availability.pod:129
13557 #: ../src/guestfs-availability.pod:131
13558 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
13562 #: ../src/guestfs-availability.pod:135
13563 msgid "B<zerofree>"
13567 #: ../src/guestfs-availability.pod:137
13568 msgid "The following functions: L</guestfs_zerofree>"
13572 #: ../src/guestfs-structs.pod:1
13573 msgid "guestfs_int_bool"
13577 #: ../src/guestfs-structs.pod:3
13580 " struct guestfs_int_bool {\n"
13588 #: ../src/guestfs-structs.pod:8
13591 " struct guestfs_int_bool_list {\n"
13592 " uint32_t len; /* Number of elements in list. */\n"
13593 " struct guestfs_int_bool *val; /* Elements. */\n"
13599 #: ../src/guestfs-structs.pod:13
13602 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
13603 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
13608 #: ../src/guestfs-structs.pod:16
13609 msgid "guestfs_lvm_pv"
13613 #: ../src/guestfs-structs.pod:18
13616 " struct guestfs_lvm_pv {\n"
13617 " char *pv_name;\n"
13618 " /* The next field is NOT nul-terminated, be careful when printing it: "
13620 " char pv_uuid[32];\n"
13622 " uint64_t pv_size;\n"
13623 " uint64_t dev_size;\n"
13624 " uint64_t pv_free;\n"
13625 " uint64_t pv_used;\n"
13626 " char *pv_attr;\n"
13627 " int64_t pv_pe_count;\n"
13628 " int64_t pv_pe_alloc_count;\n"
13629 " char *pv_tags;\n"
13630 " uint64_t pe_start;\n"
13631 " int64_t pv_mda_count;\n"
13632 " uint64_t pv_mda_free;\n"
13638 #: ../src/guestfs-structs.pod:36
13641 " struct guestfs_lvm_pv_list {\n"
13642 " uint32_t len; /* Number of elements in list. */\n"
13643 " struct guestfs_lvm_pv *val; /* Elements. */\n"
13649 #: ../src/guestfs-structs.pod:41
13652 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
13653 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
13658 #: ../src/guestfs-structs.pod:44
13659 msgid "guestfs_lvm_vg"
13663 #: ../src/guestfs-structs.pod:46
13666 " struct guestfs_lvm_vg {\n"
13667 " char *vg_name;\n"
13668 " /* The next field is NOT nul-terminated, be careful when printing it: "
13670 " char vg_uuid[32];\n"
13672 " char *vg_attr;\n"
13673 " uint64_t vg_size;\n"
13674 " uint64_t vg_free;\n"
13675 " char *vg_sysid;\n"
13676 " uint64_t vg_extent_size;\n"
13677 " int64_t vg_extent_count;\n"
13678 " int64_t vg_free_count;\n"
13679 " int64_t max_lv;\n"
13680 " int64_t max_pv;\n"
13681 " int64_t pv_count;\n"
13682 " int64_t lv_count;\n"
13683 " int64_t snap_count;\n"
13684 " int64_t vg_seqno;\n"
13685 " char *vg_tags;\n"
13686 " int64_t vg_mda_count;\n"
13687 " uint64_t vg_mda_free;\n"
13693 #: ../src/guestfs-structs.pod:69
13696 " struct guestfs_lvm_vg_list {\n"
13697 " uint32_t len; /* Number of elements in list. */\n"
13698 " struct guestfs_lvm_vg *val; /* Elements. */\n"
13704 #: ../src/guestfs-structs.pod:74
13707 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
13708 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
13713 #: ../src/guestfs-structs.pod:77
13714 msgid "guestfs_lvm_lv"
13718 #: ../src/guestfs-structs.pod:79
13721 " struct guestfs_lvm_lv {\n"
13722 " char *lv_name;\n"
13723 " /* The next field is NOT nul-terminated, be careful when printing it: "
13725 " char lv_uuid[32];\n"
13726 " char *lv_attr;\n"
13727 " int64_t lv_major;\n"
13728 " int64_t lv_minor;\n"
13729 " int64_t lv_kernel_major;\n"
13730 " int64_t lv_kernel_minor;\n"
13731 " uint64_t lv_size;\n"
13732 " int64_t seg_count;\n"
13734 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
13735 " float snap_percent;\n"
13736 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
13737 " float copy_percent;\n"
13738 " char *move_pv;\n"
13739 " char *lv_tags;\n"
13740 " char *mirror_log;\n"
13741 " char *modules;\n"
13747 #: ../src/guestfs-structs.pod:101
13750 " struct guestfs_lvm_lv_list {\n"
13751 " uint32_t len; /* Number of elements in list. */\n"
13752 " struct guestfs_lvm_lv *val; /* Elements. */\n"
13758 #: ../src/guestfs-structs.pod:106
13761 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
13762 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
13767 #: ../src/guestfs-structs.pod:111
13770 " struct guestfs_stat {\n"
13774 " int64_t nlink;\n"
13779 " int64_t blksize;\n"
13780 " int64_t blocks;\n"
13781 " int64_t atime;\n"
13782 " int64_t mtime;\n"
13783 " int64_t ctime;\n"
13789 #: ../src/guestfs-structs.pod:127
13792 " struct guestfs_stat_list {\n"
13793 " uint32_t len; /* Number of elements in list. */\n"
13794 " struct guestfs_stat *val; /* Elements. */\n"
13800 #: ../src/guestfs-structs.pod:132
13803 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
13804 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
13809 #: ../src/guestfs-structs.pod:137
13812 " struct guestfs_statvfs {\n"
13813 " int64_t bsize;\n"
13814 " int64_t frsize;\n"
13815 " int64_t blocks;\n"
13816 " int64_t bfree;\n"
13817 " int64_t bavail;\n"
13818 " int64_t files;\n"
13819 " int64_t ffree;\n"
13820 " int64_t favail;\n"
13823 " int64_t namemax;\n"
13829 #: ../src/guestfs-structs.pod:151
13832 " struct guestfs_statvfs_list {\n"
13833 " uint32_t len; /* Number of elements in list. */\n"
13834 " struct guestfs_statvfs *val; /* Elements. */\n"
13840 #: ../src/guestfs-structs.pod:156
13843 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
13844 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
13849 #: ../src/guestfs-structs.pod:159
13850 msgid "guestfs_dirent"
13854 #: ../src/guestfs-structs.pod:161
13857 " struct guestfs_dirent {\n"
13866 #: ../src/guestfs-structs.pod:167
13869 " struct guestfs_dirent_list {\n"
13870 " uint32_t len; /* Number of elements in list. */\n"
13871 " struct guestfs_dirent *val; /* Elements. */\n"
13877 #: ../src/guestfs-structs.pod:172
13880 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
13881 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
13886 #: ../src/guestfs-structs.pod:177
13889 " struct guestfs_version {\n"
13890 " int64_t major;\n"
13891 " int64_t minor;\n"
13892 " int64_t release;\n"
13899 #: ../src/guestfs-structs.pod:184
13902 " struct guestfs_version_list {\n"
13903 " uint32_t len; /* Number of elements in list. */\n"
13904 " struct guestfs_version *val; /* Elements. */\n"
13910 #: ../src/guestfs-structs.pod:189
13913 " void guestfs_free_version (struct guestfs_free_version *);\n"
13914 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
13919 #: ../src/guestfs-structs.pod:192
13920 msgid "guestfs_xattr"
13924 #: ../src/guestfs-structs.pod:194
13927 " struct guestfs_xattr {\n"
13928 " char *attrname;\n"
13929 " /* The next two fields describe a byte array. */\n"
13930 " uint32_t attrval_len;\n"
13931 " char *attrval;\n"
13937 #: ../src/guestfs-structs.pod:201
13940 " struct guestfs_xattr_list {\n"
13941 " uint32_t len; /* Number of elements in list. */\n"
13942 " struct guestfs_xattr *val; /* Elements. */\n"
13948 #: ../src/guestfs-structs.pod:206
13951 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
13952 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
13957 #: ../src/guestfs-structs.pod:209
13958 msgid "guestfs_inotify_event"
13962 #: ../src/guestfs-structs.pod:211
13965 " struct guestfs_inotify_event {\n"
13966 " int64_t in_wd;\n"
13967 " uint32_t in_mask;\n"
13968 " uint32_t in_cookie;\n"
13969 " char *in_name;\n"
13975 #: ../src/guestfs-structs.pod:218
13978 " struct guestfs_inotify_event_list {\n"
13979 " uint32_t len; /* Number of elements in list. */\n"
13980 " struct guestfs_inotify_event *val; /* Elements. */\n"
13986 #: ../src/guestfs-structs.pod:223
13989 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
13990 " void guestfs_free_inotify_event_list (struct "
13991 "guestfs_free_inotify_event_list *);\n"
13996 #: ../src/guestfs-structs.pod:226
13997 msgid "guestfs_partition"
14001 #: ../src/guestfs-structs.pod:228
14004 " struct guestfs_partition {\n"
14005 " int32_t part_num;\n"
14006 " uint64_t part_start;\n"
14007 " uint64_t part_end;\n"
14008 " uint64_t part_size;\n"
14014 #: ../src/guestfs-structs.pod:235
14017 " struct guestfs_partition_list {\n"
14018 " uint32_t len; /* Number of elements in list. */\n"
14019 " struct guestfs_partition *val; /* Elements. */\n"
14025 #: ../src/guestfs-structs.pod:240
14028 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
14029 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
14034 #: ../fish/guestfish.pod:5
14035 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
14039 #: ../fish/guestfish.pod:9
14042 " guestfish [--options] [commands]\n"
14047 #: ../fish/guestfish.pod:11
14055 #: ../fish/guestfish.pod:13
14058 " guestfish -a disk.img\n"
14063 #: ../fish/guestfish.pod:15
14066 " guestfish -a disk.img -m dev[:mountpoint]\n"
14071 #: ../fish/guestfish.pod:17
14074 " guestfish -d libvirt-domain\n"
14079 #: ../fish/guestfish.pod:19
14082 " guestfish -a disk.img -i\n"
14087 #: ../fish/guestfish.pod:21
14090 " guestfish -d libvirt-domain -i\n"
14095 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:11 ../tools/virt-edit.pl:45 ../tools/virt-rescue.pl:41 ../tools/virt-tar.pl:60 ../tools/virt-win-reg.pl:52
14100 #: ../fish/guestfish.pod:25
14102 "Using guestfish in read/write mode on live virtual machines can be "
14103 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
14104 "option to use guestfish safely if the disk image or virtual machine might be "
14109 #: ../fish/guestfish.pod:30 ../fish/guestfish.pod:729 ../fuse/guestmount.pod:35 ../tools/virt-cat.pl:51 ../tools/virt-edit.pl:59 ../tools/virt-resize.pl:66 ../tools/virt-tar.pl:46
14114 #: ../fish/guestfish.pod:32
14115 msgid "As an interactive shell"
14119 #: ../fish/guestfish.pod:34
14127 #: ../fish/guestfish.pod:36
14130 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
14131 " editing virtual machine filesystems.\n"
14136 #: ../fish/guestfish.pod:39
14139 " Type: 'help' for a list of commands\n"
14140 " 'man' to read the manual\n"
14141 " 'quit' to quit the shell\n"
14146 #: ../fish/guestfish.pod:43
14154 #: ../fish/guestfish.pod:45
14155 msgid "From shell scripts"
14159 #: ../fish/guestfish.pod:47
14160 msgid "Create a new C</etc/motd> file in a guest:"
14164 #: ../fish/guestfish.pod:49
14167 " guestfish <<_EOF_\n"
14170 " mount /dev/vg_guest/lv_root /\n"
14171 " write /etc/motd \"Welcome, new users\"\n"
14177 #: ../fish/guestfish.pod:56
14178 msgid "List the LVM logical volumes in a guest:"
14182 #: ../fish/guestfish.pod:58
14185 " guestfish -a disk.img --ro <<_EOF_\n"
14193 #: ../fish/guestfish.pod:63
14194 msgid "On one command line"
14198 #: ../fish/guestfish.pod:65
14199 msgid "Update C</etc/resolv.conf> in a guest:"
14203 #: ../fish/guestfish.pod:67
14207 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
14208 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
14213 #: ../fish/guestfish.pod:71
14214 msgid "Edit C</boot/grub/grub.conf> interactively:"
14218 #: ../fish/guestfish.pod:73
14221 " guestfish --add disk.img \\\n"
14222 " --mount /dev/vg_guest/lv_root \\\n"
14223 " --mount /dev/sda1:/boot \\\n"
14224 " edit /boot/grub/grub.conf\n"
14229 #: ../fish/guestfish.pod:78
14230 msgid "Mount disks automatically"
14234 #: ../fish/guestfish.pod:80
14236 "Use the I<-i> option to automatically mount the disks from a virtual "
14241 #: ../fish/guestfish.pod:83
14244 " guestfish --ro -a disk.img -i cat /etc/group\n"
14249 #: ../fish/guestfish.pod:85
14252 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
14257 #: ../fish/guestfish.pod:87
14258 msgid "As a script interpreter"
14262 #: ../fish/guestfish.pod:89
14263 msgid "Create a 100MB disk containing an ext2-formatted partition:"
14267 #: ../fish/guestfish.pod:91
14270 " #!/usr/bin/guestfish -f\n"
14271 " sparse test1.img 100M\n"
14273 " part-disk /dev/sda mbr\n"
14274 " mkfs ext2 /dev/sda1\n"
14279 #: ../fish/guestfish.pod:97
14280 msgid "Start with a prepared disk"
14284 #: ../fish/guestfish.pod:99
14286 "An alternate way to create a 100MB disk called C<test1.img> containing a "
14287 "single ext2-formatted partition:"
14291 #: ../fish/guestfish.pod:102
14294 " guestfish -N fs\n"
14299 #: ../fish/guestfish.pod:104
14300 msgid "To list what is available do:"
14304 #: ../fish/guestfish.pod:106 ../fish/guestfish.pod:720
14307 " guestfish -N help | less\n"
14312 #: ../fish/guestfish.pod:108
14313 msgid "Remote control"
14317 #: ../fish/guestfish.pod:110
14320 " eval `guestfish --listen --ro`\n"
14321 " guestfish --remote add disk.img\n"
14322 " guestfish --remote run\n"
14323 " guestfish --remote lvs\n"
14328 #: ../fish/guestfish.pod:117
14330 "Guestfish is a shell and command-line tool for examining and modifying "
14331 "virtual machine filesystems. It uses libguestfs and exposes all of the "
14332 "functionality of the guestfs API, see L<guestfs(3)>."
14336 #: ../fish/guestfish.pod:121
14338 "Guestfish gives you structured access to the libguestfs API, from shell "
14339 "scripts or the command line or interactively. If you want to rescue a "
14340 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
14345 #: ../fish/guestfish.pod:126 ../test-tool/libguestfs-test-tool.pod:37 ../fuse/guestmount.pod:70 ../inspector/virt-inspector.pl:75 ../tools/virt-cat.pl:80 ../tools/virt-df.pl:71 ../tools/virt-edit.pl:73 ../tools/virt-list-filesystems.pl:50 ../tools/virt-list-partitions.pl:51 ../tools/virt-ls.pl:79 ../tools/virt-make-fs.pl:153 ../tools/virt-rescue.pl:103 ../tools/virt-resize.pl:233 ../tools/virt-tar.pl:99 ../tools/virt-win-reg.pl:172
14350 #: ../fish/guestfish.pod:130 ../fuse/guestmount.pod:94 ../inspector/virt-inspector.pl:83 ../tools/virt-cat.pl:88 ../tools/virt-df.pl:79 ../tools/virt-edit.pl:81 ../tools/virt-list-filesystems.pl:58 ../tools/virt-list-partitions.pl:59 ../tools/virt-ls.pl:87 ../tools/virt-make-fs.pl:161 ../tools/virt-rescue.pl:111 ../tools/virt-resize.pl:241 ../tools/virt-tar.pl:107 ../tools/virt-win-reg.pl:180
14355 #: ../fish/guestfish.pod:132
14356 msgid "Displays general help on options."
14360 #: ../fish/guestfish.pod:134
14361 msgid "B<-h> | B<--cmd-help>"
14365 #: ../fish/guestfish.pod:136
14366 msgid "Lists all available guestfish commands."
14370 #: ../fish/guestfish.pod:138
14371 msgid "B<-h cmd> | B<--cmd-help cmd>"
14375 #: ../fish/guestfish.pod:140
14376 msgid "Displays detailed help on a single command C<cmd>."
14380 #: ../fish/guestfish.pod:142 ../fuse/guestmount.pod:74
14381 msgid "B<-a image> | B<--add image>"
14385 #: ../fish/guestfish.pod:144
14386 msgid "Add a block device or virtual machine image to the shell."
14390 #: ../fish/guestfish.pod:146
14391 msgid "B<-c URI> | B<--connect URI>"
14395 #: ../fish/guestfish.pod:148
14397 "When used in conjunction with the I<-d> option, this specifies the libvirt "
14398 "URI to use. The default is to use the default libvirt connection."
14402 #: ../fish/guestfish.pod:152
14403 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
14407 #: ../fish/guestfish.pod:154
14409 "Add disks from the named libvirt domain. If the I<--ro> option is also "
14410 "used, then any libvirt domain can be used. However in write mode, only "
14411 "libvirt domains which are shut down can be named here."
14415 #: ../fish/guestfish.pod:158
14416 msgid "B<-D> | B<--no-dest-paths>"
14420 #: ../fish/guestfish.pod:160
14422 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
14423 "to hit the tab key to complete paths on the guest filesystem, but this "
14424 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
14425 "allow this feature to be disabled."
14429 #: ../fish/guestfish.pod:165
14430 msgid "B<-f file> | B<--file file>"
14434 #: ../fish/guestfish.pod:167
14435 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
14439 #: ../fish/guestfish.pod:170
14442 " #!/usr/bin/guestfish -f\n"
14447 #: ../fish/guestfish.pod:172
14448 msgid "B<-i> | B<--inspector>"
14452 #: ../fish/guestfish.pod:174
14454 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
14455 "system and mount filesystems as they would be mounted on the real virtual "
14460 #: ../fish/guestfish.pod:178
14461 msgid "Typical usage is either:"
14465 #: ../fish/guestfish.pod:180
14468 " guestfish -d myguest -i\n"
14473 #: ../fish/guestfish.pod:182
14474 msgid "(for an inactive libvirt domain called I<myguest>), or:"
14478 #: ../fish/guestfish.pod:184
14481 " guestfish --ro -d myguest -i\n"
14486 #: ../fish/guestfish.pod:186
14487 msgid "(for active domains, readonly), or specify the block device directly:"
14491 #: ../fish/guestfish.pod:188
14494 " guestfish -a /dev/Guests/MyGuest -i\n"
14499 #: ../fish/guestfish.pod:190
14501 "Note that the command line syntax changed slightly over older versions of "
14502 "guestfish. You can still use the old syntax:"
14506 #: ../fish/guestfish.pod:193
14509 " guestfish [--ro] -i disk.img\n"
14514 #: ../fish/guestfish.pod:195
14517 " guestfish [--ro] -i libvirt-domain\n"
14522 #: ../fish/guestfish.pod:197
14523 msgid "B<--keys-from-stdin>"
14527 #: ../fish/guestfish.pod:199
14529 "Read key or passphrase parameters from stdin. The default is to try to read "
14530 "passphrases from the user by opening C</dev/tty>."
14534 #: ../fish/guestfish.pod:202
14535 msgid "B<--listen>"
14539 #: ../fish/guestfish.pod:204
14541 "Fork into the background and listen for remote commands. See section "
14542 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
14546 #: ../fish/guestfish.pod:207
14547 msgid "B<-m dev[:mountpoint]> | B<--mount dev[:mountpoint]>"
14551 #: ../fish/guestfish.pod:209
14552 msgid "Mount the named partition or logical volume on the given mountpoint."
14556 #: ../fish/guestfish.pod:211
14557 msgid "If the mountpoint is omitted, it defaults to C</>."
14561 #: ../fish/guestfish.pod:213
14562 msgid "You have to mount something on C</> before most commands will work."
14566 #: ../fish/guestfish.pod:215
14568 "If any I<-m> or I<--mount> options are given, the guest is automatically "
14573 #: ../fish/guestfish.pod:218
14575 "If you don't know what filesystems a disk image contains, you can either run "
14576 "guestfish without this option, then list the partitions and LVs available "
14577 "(see L</list-partitions> and L</lvs> commands), or you can use the "
14578 "L<virt-list-filesystems(1)> program."
14582 #: ../fish/guestfish.pod:223 ../fuse/guestmount.pod:106
14583 msgid "B<-n> | B<--no-sync>"
14587 #: ../fish/guestfish.pod:225
14589 "Disable autosync. This is enabled by default. See the discussion of "
14590 "autosync in the L<guestfs(3)> manpage."
14594 #: ../fish/guestfish.pod:228
14595 msgid "B<-N type> | B<--new type> | B<-N help>"
14599 #: ../fish/guestfish.pod:230
14601 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
14602 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
14603 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
14608 #: ../fish/guestfish.pod:235
14609 msgid "B<--progress-bars>"
14613 #: ../fish/guestfish.pod:237
14614 msgid "Enable progress bars, even when guestfish is used non-interactively."
14618 #: ../fish/guestfish.pod:239
14620 "Progress bars are enabled by default when guestfish is used as an "
14621 "interactive shell."
14625 #: ../fish/guestfish.pod:242
14626 msgid "B<--no-progress-bars>"
14630 #: ../fish/guestfish.pod:244
14631 msgid "Disable progress bars."
14635 #: ../fish/guestfish.pod:246
14636 msgid "B<--remote[=pid]>"
14640 #: ../fish/guestfish.pod:248
14642 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
14643 "CONTROL GUESTFISH OVER A SOCKET> below."
14647 #: ../fish/guestfish.pod:251 ../fuse/guestmount.pod:148
14648 msgid "B<-r> | B<--ro>"
14652 #: ../fish/guestfish.pod:253
14654 "This changes the I<-a> and I<-m> options so that disks are added and mounts "
14655 "are done read-only (see L<guestfs(3)/guestfs_mount_ro>)."
14659 #: ../fish/guestfish.pod:256 ../tools/virt-rescue.pl:162
14661 "The option must always be used if the disk image or virtual machine might be "
14662 "running, and is generally recommended in cases where you don't need write "
14663 "access to the disk."
14667 #: ../fish/guestfish.pod:260
14669 "Note that prepared disk images created with I<-N> are not affected by the "
14674 #: ../fish/guestfish.pod:263 ../fuse/guestmount.pod:158 ../tools/virt-rescue.pl:170
14675 msgid "B<--selinux>"
14679 #: ../fish/guestfish.pod:265
14680 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
14684 #: ../fish/guestfish.pod:267 ../fuse/guestmount.pod:168
14685 msgid "B<-v> | B<--verbose>"
14689 #: ../fish/guestfish.pod:269
14691 "Enable very verbose messages. This is particularly useful if you find a "
14696 #: ../fish/guestfish.pod:272 ../fuse/guestmount.pod:172
14697 msgid "B<-V> | B<--version>"
14701 #: ../fish/guestfish.pod:274
14702 msgid "Display the guestfish / libguestfs version number and exit."
14706 #: ../fish/guestfish.pod:276
14711 #: ../fish/guestfish.pod:278
14712 msgid "Echo each command before executing it."
14716 #: ../fish/guestfish.pod:282
14717 msgid "COMMANDS ON COMMAND LINE"
14721 #: ../fish/guestfish.pod:284
14722 msgid "Any additional (non-option) arguments are treated as commands to execute."
14726 #: ../fish/guestfish.pod:287
14728 "Commands to execute should be separated by a colon (C<:>), where the colon "
14729 "is a separate parameter. Thus:"
14733 #: ../fish/guestfish.pod:290
14736 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
14741 #: ../fish/guestfish.pod:292
14743 "If there are no additional arguments, then we enter a shell, either an "
14744 "interactive shell with a prompt (if the input is a terminal) or a "
14745 "non-interactive shell."
14749 #: ../fish/guestfish.pod:296
14751 "In either command line mode or non-interactive shell, the first command that "
14752 "gives an error causes the whole shell to exit. In interactive mode (with a "
14753 "prompt) if a command fails, you can continue to enter commands."
14757 #: ../fish/guestfish.pod:301
14758 msgid "USING launch (OR run)"
14762 #: ../fish/guestfish.pod:303
14764 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
14765 "then launch it, then mount any disks you need, and finally issue "
14766 "actions/commands. So the general order of the day is:"
14770 #: ../fish/guestfish.pod:311
14771 msgid "add or -a/--add"
14775 #: ../fish/guestfish.pod:315
14776 msgid "launch (aka run)"
14780 #: ../fish/guestfish.pod:319
14781 msgid "mount or -m/--mount"
14785 #: ../fish/guestfish.pod:323
14786 msgid "any other commands"
14790 #: ../fish/guestfish.pod:327
14792 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
14793 "guest before mounting or performing any other commands."
14797 #: ../fish/guestfish.pod:330
14799 "The only exception is that if the I<-m> or I<--mount> option was given, the "
14800 "guest is automatically run for you (simply because guestfish can't mount the "
14801 "disks you asked for without doing this)."
14805 #: ../fish/guestfish.pod:334
14810 #: ../fish/guestfish.pod:336
14812 "You can quote ordinary parameters using either single or double quotes. For "
14817 #: ../fish/guestfish.pod:339
14820 " add \"file with a space.img\"\n"
14825 #: ../fish/guestfish.pod:341
14828 " rm '/file name'\n"
14833 #: ../fish/guestfish.pod:343
14841 #: ../fish/guestfish.pod:345
14843 "A few commands require a list of strings to be passed. For these, use a "
14844 "whitespace-separated list, enclosed in quotes. Strings containing "
14845 "whitespace to be passed through must be enclosed in single quotes. A "
14846 "literal single quote must be escaped with a backslash."
14850 #: ../fish/guestfish.pod:350
14853 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
14854 " command \"/bin/echo 'foo bar'\"\n"
14855 " command \"/bin/echo \\'foo\\'\"\n"
14860 #: ../fish/guestfish.pod:354
14865 #: ../fish/guestfish.pod:356
14866 msgid "This section applies to all commands which can take integers as parameters."
14870 #: ../fish/guestfish.pod:359
14871 msgid "SIZE SUFFIX"
14875 #: ../fish/guestfish.pod:361
14877 "When the command takes a parameter measured in bytes, you can use one of the "
14878 "following suffixes to specify kilobytes, megabytes and larger sizes:"
14882 #: ../fish/guestfish.pod:367
14883 msgid "B<k> or B<K> or B<KiB>"
14887 #: ../fish/guestfish.pod:369
14888 msgid "The size in kilobytes (multiplied by 1024)."
14892 #: ../fish/guestfish.pod:371
14897 #: ../fish/guestfish.pod:373
14898 msgid "The size in SI 1000 byte units."
14902 #: ../fish/guestfish.pod:375
14903 msgid "B<M> or B<MiB>"
14907 #: ../fish/guestfish.pod:377
14908 msgid "The size in megabytes (multiplied by 1048576)."
14912 #: ../fish/guestfish.pod:379
14917 #: ../fish/guestfish.pod:381
14918 msgid "The size in SI 1000000 byte units."
14922 #: ../fish/guestfish.pod:383
14923 msgid "B<G> or B<GiB>"
14927 #: ../fish/guestfish.pod:385
14928 msgid "The size in gigabytes (multiplied by 2**30)."
14932 #: ../fish/guestfish.pod:387
14937 #: ../fish/guestfish.pod:389
14938 msgid "The size in SI 10**9 byte units."
14942 #: ../fish/guestfish.pod:391
14943 msgid "B<T> or B<TiB>"
14947 #: ../fish/guestfish.pod:393
14948 msgid "The size in terabytes (multiplied by 2**40)."
14952 #: ../fish/guestfish.pod:395
14957 #: ../fish/guestfish.pod:397
14958 msgid "The size in SI 10**12 byte units."
14962 #: ../fish/guestfish.pod:399
14963 msgid "B<P> or B<PiB>"
14967 #: ../fish/guestfish.pod:401
14968 msgid "The size in petabytes (multiplied by 2**50)."
14972 #: ../fish/guestfish.pod:403
14977 #: ../fish/guestfish.pod:405
14978 msgid "The size in SI 10**15 byte units."
14982 #: ../fish/guestfish.pod:407
14983 msgid "B<E> or B<EiB>"
14987 #: ../fish/guestfish.pod:409
14988 msgid "The size in exabytes (multiplied by 2**60)."
14992 #: ../fish/guestfish.pod:411
14997 #: ../fish/guestfish.pod:413
14998 msgid "The size in SI 10**18 byte units."
15002 #: ../fish/guestfish.pod:415
15003 msgid "B<Z> or B<ZiB>"
15007 #: ../fish/guestfish.pod:417
15008 msgid "The size in zettabytes (multiplied by 2**70)."
15012 #: ../fish/guestfish.pod:419
15017 #: ../fish/guestfish.pod:421
15018 msgid "The size in SI 10**21 byte units."
15022 #: ../fish/guestfish.pod:423
15023 msgid "B<Y> or B<YiB>"
15027 #: ../fish/guestfish.pod:425
15028 msgid "The size in yottabytes (multiplied by 2**80)."
15032 #: ../fish/guestfish.pod:427
15037 #: ../fish/guestfish.pod:429
15038 msgid "The size in SI 10**24 byte units."
15042 #: ../fish/guestfish.pod:433
15043 msgid "For example:"
15047 #: ../fish/guestfish.pod:435
15050 " truncate-size /file 1G\n"
15055 #: ../fish/guestfish.pod:437
15056 msgid "would truncate the file to 1 gigabyte."
15060 #: ../fish/guestfish.pod:439
15062 "Be careful because a few commands take sizes in kilobytes or megabytes "
15063 "(eg. the parameter to L</memsize> is specified in megabytes already). "
15064 "Adding a suffix will probably not do what you expect."
15068 #: ../fish/guestfish.pod:443
15069 msgid "OCTAL AND HEXADECIMAL NUMBERS"
15073 #: ../fish/guestfish.pod:445
15075 "For specifying the radix (base) use the C convention: C<0> to prefix an "
15076 "octal number or C<0x> to prefix a hexadecimal number. For example:"
15080 #: ../fish/guestfish.pod:448
15083 " 1234 decimal number 1234\n"
15084 " 02322 octal number, equivalent to decimal 1234\n"
15085 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
15090 #: ../fish/guestfish.pod:452
15092 "When using the C<chmod> command, you almost always want to specify an octal "
15093 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
15094 "L<chmod(1)> program):"
15098 #: ../fish/guestfish.pod:456
15101 " chmod 0777 /public # OK\n"
15102 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
15107 #: ../fish/guestfish.pod:459
15109 "Commands that return numbers usually print them in decimal, but some "
15110 "commands print numbers in other radices (eg. C<umask> prints the mode in "
15111 "octal, preceeded by C<0>)."
15115 #: ../fish/guestfish.pod:463
15116 msgid "WILDCARDS AND GLOBBING"
15120 #: ../fish/guestfish.pod:465
15122 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
15123 "(globbing) by default. So for example the following will not do what you "
15128 #: ../fish/guestfish.pod:469
15136 #: ../fish/guestfish.pod:471
15138 "Assuming you don't have a directory literally called C</home/*> then the "
15139 "above command will return an error."
15143 #: ../fish/guestfish.pod:474
15144 msgid "To perform wildcard expansion, use the C<glob> command."
15148 #: ../fish/guestfish.pod:476
15151 " glob rm-rf /home/*\n"
15156 #: ../fish/guestfish.pod:478
15158 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
15159 "many times), equivalent to:"
15163 #: ../fish/guestfish.pod:481
15166 " rm-rf /home/jim\n"
15167 " rm-rf /home/joe\n"
15168 " rm-rf /home/mary\n"
15173 #: ../fish/guestfish.pod:485
15174 msgid "C<glob> only works on simple guest paths and not on device names."
15178 #: ../fish/guestfish.pod:487
15180 "If you have several parameters, each containing a wildcard, then glob will "
15181 "perform a cartesian product."
15185 #: ../fish/guestfish.pod:490
15190 #: ../fish/guestfish.pod:492
15192 "Any line which starts with a I<#> character is treated as a comment and "
15193 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
15194 "a command. For example:"
15198 #: ../fish/guestfish.pod:496
15201 " # this is a comment\n"
15202 " # this is a comment\n"
15203 " foo # NOT a comment\n"
15208 #: ../fish/guestfish.pod:500
15209 msgid "Blank lines are also ignored."
15213 #: ../fish/guestfish.pod:502
15214 msgid "RUNNING COMMANDS LOCALLY"
15218 #: ../fish/guestfish.pod:504
15220 "Any line which starts with a I<!> character is treated as a command sent to "
15221 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
15225 #: ../fish/guestfish.pod:508
15229 " tgz-out /remote local/remote-data.tar.gz\n"
15234 #: ../fish/guestfish.pod:511
15236 "will create a directory C<local> on the host, and then export the contents "
15237 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
15238 "(See C<tgz-out>)."
15242 #: ../fish/guestfish.pod:515
15244 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
15245 "effect, due to the way that subprocesses work in Unix."
15249 #: ../fish/guestfish.pod:518
15254 #: ../fish/guestfish.pod:520
15256 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
15257 "command (a guestfish command) to the second command (any host command). For "
15262 #: ../fish/guestfish.pod:524
15265 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
15270 #: ../fish/guestfish.pod:526
15272 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
15273 "program). The above command would list all accounts in the guest filesystem "
15274 "which have UID 0, ie. root accounts including backdoors. Other examples:"
15278 #: ../fish/guestfish.pod:531
15281 " hexdump /bin/ls | head\n"
15282 " list-devices | tail -1\n"
15283 " tgz-out / - | tar ztf -\n"
15288 #: ../fish/guestfish.pod:535
15290 "The space before the pipe symbol is required, any space after the pipe "
15291 "symbol is optional. Everything after the pipe symbol is just passed "
15292 "straight to the host shell, so it can contain redirections, globs and "
15293 "anything else that makes sense on the host side."
15297 #: ../fish/guestfish.pod:540
15299 "To use a literal argument which begins with a pipe symbol, you have to quote "
15304 #: ../fish/guestfish.pod:543
15312 #: ../fish/guestfish.pod:545
15313 msgid "HOME DIRECTORIES"
15317 #: ../fish/guestfish.pod:547
15319 "If a parameter starts with the character C<~> then the tilde may be expanded "
15320 "as a home directory path (either C<~> for the current user's home directory, "
15321 "or C<~user> for another user)."
15325 #: ../fish/guestfish.pod:551
15327 "Note that home directory expansion happens for users known I<on the host>, "
15328 "not in the guest filesystem."
15332 #: ../fish/guestfish.pod:554
15334 "To use a literal argument which begins with a tilde, you have to quote it, "
15339 #: ../fish/guestfish.pod:557
15347 #: ../fish/guestfish.pod:561
15349 "Libguestfs has some support for Linux guests encrypted according to the "
15350 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
15351 "disk encryption systems used by modern Linux guests. Currently only "
15352 "LVM-on-LUKS is supported."
15356 #: ../fish/guestfish.pod:566
15357 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
15361 #: ../fish/guestfish.pod:568
15364 " ><fs> vfs-type /dev/sda2\n"
15370 #: ../fish/guestfish.pod:571
15372 "Then open those devices using L</luks-open>. This creates a device-mapper "
15373 "device called C</dev/mapper/luksdev>."
15377 #: ../fish/guestfish.pod:574
15380 " ><fs> luks-open /dev/sda2 luksdev\n"
15381 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
15386 #: ../fish/guestfish.pod:577
15388 "Finally you have to tell LVM to scan for volume groups on the newly created "
15393 #: ../fish/guestfish.pod:580
15397 " ><fs> vg-activate-all true\n"
15402 #: ../fish/guestfish.pod:583
15403 msgid "The logical volume(s) can now be mounted in the usual way."
15407 #: ../fish/guestfish.pod:585
15409 "Before closing a LUKS device you must unmount any logical volumes on it and "
15410 "deactivate the volume groups by calling C<vg-activate false VG> on each "
15411 "one. Then you can close the mapper device:"
15415 #: ../fish/guestfish.pod:589
15418 " ><fs> vg-activate false /dev/VG\n"
15419 " ><fs> luks-close /dev/mapper/luksdev\n"
15424 #: ../fish/guestfish.pod:592
15425 msgid "WINDOWS PATHS"
15429 #: ../fish/guestfish.pod:594
15431 "If a path is prefixed with C<win:> then you can use Windows-style paths "
15432 "(with some limitations). The following commands are equivalent:"
15436 #: ../fish/guestfish.pod:597
15439 " file /WINDOWS/system32/config/system.LOG\n"
15444 #: ../fish/guestfish.pod:599
15447 " file win:/windows/system32/config/system.log\n"
15452 #: ../fish/guestfish.pod:601
15455 " file win:\\windows\\system32\\config\\system.log\n"
15460 #: ../fish/guestfish.pod:603
15463 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
15468 #: ../fish/guestfish.pod:605
15470 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
15471 "handles case insensitivity like Windows would. This only works in argument "
15472 "positions that expect a path."
15476 #: ../fish/guestfish.pod:609
15477 msgid "UPLOADING AND DOWNLOADING FILES"
15481 #: ../fish/guestfish.pod:611
15483 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
15484 "others which upload from or download to a local file, you can use the "
15485 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
15489 #: ../fish/guestfish.pod:615
15497 #: ../fish/guestfish.pod:617
15498 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
15502 #: ../fish/guestfish.pod:620
15505 " tar-out /etc - | tar tf -\n"
15510 #: ../fish/guestfish.pod:622
15512 "writes the tarball to stdout and then pipes that into the external \"tar\" "
15513 "command (see L</PIPES>)."
15517 #: ../fish/guestfish.pod:625
15519 "When using C<-> to read from stdin, the input is read up to the end of "
15520 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
15521 "some arbitrary end marker:"
15525 #: ../fish/guestfish.pod:629
15528 " upload -<<END /foo\n"
15537 #: ../fish/guestfish.pod:635
15539 "Any string of characters can be used instead of C<END>. The end marker must "
15540 "appear on a line of its own, without any preceeding or following characters "
15541 "(not even spaces)."
15545 #: ../fish/guestfish.pod:639
15547 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
15548 "upload local files (so-called \"FileIn\" parameters in the generator)."
15552 #: ../fish/guestfish.pod:642
15553 msgid "EXIT ON ERROR BEHAVIOUR"
15557 #: ../fish/guestfish.pod:644
15559 "By default, guestfish will ignore any errors when in interactive mode "
15560 "(ie. taking commands from a human over a tty), and will exit on the first "
15561 "error in non-interactive mode (scripts, commands given on the command line)."
15565 #: ../fish/guestfish.pod:649
15567 "If you prefix a command with a I<-> character, then that command will not "
15568 "cause guestfish to exit, even if that (one) command returns an error."
15572 #: ../fish/guestfish.pod:653
15573 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
15577 #: ../fish/guestfish.pod:655
15579 "Guestfish can be remote-controlled over a socket. This is useful "
15580 "particularly in shell scripts where you want to make several different "
15581 "changes to a filesystem, but you don't want the overhead of starting up a "
15582 "guestfish process each time."
15586 #: ../fish/guestfish.pod:660
15587 msgid "Start a guestfish server process using:"
15591 #: ../fish/guestfish.pod:662
15594 " eval `guestfish --listen`\n"
15599 #: ../fish/guestfish.pod:664
15600 msgid "and then send it commands by doing:"
15604 #: ../fish/guestfish.pod:666
15607 " guestfish --remote cmd [...]\n"
15612 #: ../fish/guestfish.pod:668
15613 msgid "To cause the server to exit, send it the exit command:"
15617 #: ../fish/guestfish.pod:670
15620 " guestfish --remote exit\n"
15625 #: ../fish/guestfish.pod:672
15627 "Note that the server will normally exit if there is an error in a command. "
15628 "You can change this in the usual way. See section L</EXIT ON ERROR "
15633 #: ../fish/guestfish.pod:676
15634 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
15638 #: ../fish/guestfish.pod:678
15640 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
15641 "is how the I<--remote> option knows where to send the commands. You can "
15642 "have several guestfish listener processes running using:"
15646 #: ../fish/guestfish.pod:682
15649 " eval `guestfish --listen`\n"
15650 " pid1=$GUESTFISH_PID\n"
15651 " eval `guestfish --listen`\n"
15652 " pid2=$GUESTFISH_PID\n"
15654 " guestfish --remote=$pid1 cmd\n"
15655 " guestfish --remote=$pid2 cmd\n"
15660 #: ../fish/guestfish.pod:690
15661 msgid "REMOTE CONTROL DETAILS"
15665 #: ../fish/guestfish.pod:692
15667 "Remote control happens over a Unix domain socket called "
15668 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
15669 "of the process, and C<$PID> is the process ID of the server."
15673 #: ../fish/guestfish.pod:696
15674 msgid "Guestfish client and server versions must match exactly."
15678 #: ../fish/guestfish.pod:698
15679 msgid "PREPARED DISK IMAGES"
15683 #: ../fish/guestfish.pod:700
15685 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
15686 "preformatted disk images that guestfish can make for you to save typing. "
15687 "This is particularly useful for testing purposes. This option is used "
15688 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
15689 "can be mixed with I<-a>)."
15693 #: ../fish/guestfish.pod:706
15695 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
15696 "the second and so on. Existing files in the current directory are "
15701 #: ../fish/guestfish.pod:710
15703 "The type briefly describes how the disk should be sized, partitioned, how "
15704 "filesystem(s) should be created, and how content should be added. "
15705 "Optionally the type can be followed by extra parameters, separated by C<:> "
15706 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
15707 "sparsely-allocated disk, containing a single partition, with the partition "
15708 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
15709 "on a 1GB disk instead."
15713 #: ../fish/guestfish.pod:718
15714 msgid "To list the available types and any extra parameters they take, run:"
15718 #: ../fish/guestfish.pod:722
15720 "Note that the prepared filesystem is not mounted. You would usually have to "
15721 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
15725 #: ../fish/guestfish.pod:726
15727 "If any I<-N> or I<--new> options are given, the guest is automatically "
15732 #: ../fish/guestfish.pod:731
15733 msgid "Create a 100MB disk with an ext4-formatted partition:"
15737 #: ../fish/guestfish.pod:733
15740 " guestfish -N fs:ext4\n"
15745 #: ../fish/guestfish.pod:735
15746 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
15750 #: ../fish/guestfish.pod:737
15753 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
15758 #: ../fish/guestfish.pod:739
15759 msgid "Create a blank 200MB disk:"
15763 #: ../fish/guestfish.pod:741
15766 " guestfish -N disk:200M\n"
15771 #: ../fish/guestfish.pod:743
15772 msgid "PROGRESS BARS"
15776 #: ../fish/guestfish.pod:745
15778 "Some (not all) long-running commands send progress notification messages as "
15779 "they are running. Guestfish turns these messages into progress bars."
15783 #: ../fish/guestfish.pod:749
15785 "When a command that supports progress bars takes longer than two seconds to "
15786 "run, and if progress bars are enabled, then you will see one appearing below "
15791 #: ../fish/guestfish.pod:753
15794 " ><fs> copy-size /large-file /another-file 2048M\n"
15795 " / 10% [#####-----------------------------------------] 00:30\n"
15800 #: ../fish/guestfish.pod:756
15802 "The spinner on the left hand side moves round once for every progress "
15803 "notification received from the backend. This is a (reasonably) golden "
15804 "assurance that the command is \"doing something\" even if the progress bar "
15805 "is not moving, because the command is able to send the progress "
15806 "notifications. When the bar reaches 100% and the command finishes, the "
15807 "spinner disappears."
15811 #: ../fish/guestfish.pod:763
15813 "Progress bars are enabled by default when guestfish is used interactively. "
15814 "You can enable them even for non-interactive modes using I<--progress-bars>, "
15815 "and you can disable them completely using I<--no-progress-bars>."
15819 #: ../fish/guestfish.pod:768
15820 msgid "GUESTFISH COMMANDS"
15824 #: ../fish/guestfish.pod:770
15826 "The commands in this section are guestfish convenience commands, in other "
15827 "words, they are not part of the L<guestfs(3)> API."
15831 #: ../fish/guestfish.pod:773
15832 msgid "alloc | allocate"
15836 #: ../fish/guestfish.pod:775
15839 " alloc filename size\n"
15844 #: ../fish/guestfish.pod:777
15846 "This creates an empty (zeroed) file of the given size, and then adds so it "
15847 "can be further examined."
15851 #: ../fish/guestfish.pod:780 ../fish/guestfish.pod:903
15852 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
15856 #: ../fish/guestfish.pod:782 ../fish/guestfish.pod:905
15857 msgid "Size can be specified using standard suffixes, eg. C<1M>."
15861 #: ../fish/guestfish.pod:784
15866 #: ../fish/guestfish.pod:786
15869 " copy-in local [local ...] /remotedir\n"
15874 #: ../fish/guestfish.pod:788
15876 "C<copy-in> copies local files or directories recursively into the disk "
15877 "image, placing them in the directory called C</remotedir> (which must "
15878 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
15879 "other commands as necessary."
15883 #: ../fish/guestfish.pod:793
15885 "Multiple local files and directories can be specified, but the last "
15886 "parameter must always be a remote directory. Wildcards cannot be used."
15890 #: ../fish/guestfish.pod:797
15895 #: ../fish/guestfish.pod:799
15898 " copy-out remote [remote ...] localdir\n"
15903 #: ../fish/guestfish.pod:801
15905 "C<copy-out> copies remote files or directories recursively out of the disk "
15906 "image, placing them on the host disk in a local directory called C<localdir> "
15907 "(which must exist). This guestfish meta-command turns into a sequence of "
15908 "L</download>, L</tar-out> and other commands as necessary."
15912 #: ../fish/guestfish.pod:807
15914 "Multiple remote files and directories can be specified, but the last "
15915 "parameter must always be a local directory. To download to the current "
15916 "directory, use C<.> as in:"
15920 #: ../fish/guestfish.pod:811
15923 " copy-out /home .\n"
15928 #: ../fish/guestfish.pod:813
15930 "Wildcards cannot be used in the ordinary command, but you can use them with "
15931 "the help of L</glob> like this:"
15935 #: ../fish/guestfish.pod:816
15938 " glob copy-out /home/* .\n"
15943 #: ../fish/guestfish.pod:818
15948 #: ../fish/guestfish.pod:820
15951 " echo [params ...]\n"
15956 #: ../fish/guestfish.pod:822
15957 msgid "This echos the parameters to the terminal."
15961 #: ../fish/guestfish.pod:824
15962 msgid "edit | vi | emacs"
15966 #: ../fish/guestfish.pod:826
15974 #: ../fish/guestfish.pod:828
15976 "This is used to edit a file. It downloads the file, edits it locally using "
15977 "your editor, then uploads the result."
15981 #: ../fish/guestfish.pod:831
15983 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
15984 "or C<emacs> you will get those corresponding editors."
15988 #: ../fish/guestfish.pod:835
15993 #: ../fish/guestfish.pod:837
15996 " glob command args...\n"
16001 #: ../fish/guestfish.pod:839
16003 "Expand wildcards in any paths in the args list, and run C<command> "
16004 "repeatedly on each matching path."
16008 #: ../fish/guestfish.pod:842
16009 msgid "See section WILDCARDS AND GLOBBING."
16013 #: ../fish/guestfish.pod:844
16018 #: ../fish/guestfish.pod:846
16027 #: ../fish/guestfish.pod:849
16029 "Without any parameter, this lists all commands. With a C<cmd> parameter, "
16030 "this displays detailed help for a command."
16034 #: ../fish/guestfish.pod:852
16039 #: ../fish/guestfish.pod:854
16047 #: ../fish/guestfish.pod:856
16048 msgid "Change the local directory, ie. the current directory of guestfish itself."
16052 #: ../fish/guestfish.pod:859
16053 msgid "Note that C<!cd> won't do what you might expect."
16057 #: ../fish/guestfish.pod:861
16058 msgid "man | manual"
16062 #: ../fish/guestfish.pod:863
16070 #: ../fish/guestfish.pod:865
16071 msgid "Opens the manual page for guestfish."
16075 #: ../fish/guestfish.pod:867
16076 msgid "more | less"
16080 #: ../fish/guestfish.pod:869
16088 #: ../fish/guestfish.pod:871
16096 #: ../fish/guestfish.pod:873
16097 msgid "This is used to view a file."
16101 #: ../fish/guestfish.pod:875
16103 "The default viewer is C<$PAGER>. However if you use the alternate command "
16104 "C<less> you will get the C<less> command specifically."
16108 #: ../fish/guestfish.pod:878
16109 msgid "quit | exit"
16113 #: ../fish/guestfish.pod:880
16114 msgid "This exits guestfish. You can also use C<^D> key."
16118 #: ../fish/guestfish.pod:882
16123 #: ../fish/guestfish.pod:884
16131 #: ../fish/guestfish.pod:886
16133 "Close and reopen the libguestfs handle. It is not necessary to use this "
16134 "normally, because the handle is closed properly when guestfish exits. "
16135 "However this is occasionally useful for testing."
16139 #: ../fish/guestfish.pod:890
16144 #: ../fish/guestfish.pod:892
16147 " sparse filename size\n"
16152 #: ../fish/guestfish.pod:894
16154 "This creates an empty sparse file of the given size, and then adds so it can "
16155 "be further examined."
16159 #: ../fish/guestfish.pod:897
16161 "In all respects it works the same as the C<alloc> command, except that the "
16162 "image file is allocated sparsely, which means that disk blocks are not "
16163 "assigned to the file until they are needed. Sparse disk files only use "
16164 "space when written to, but they are slower and there is a danger you could "
16165 "run out of real disk space during a write operation."
16169 #: ../fish/guestfish.pod:907
16174 #: ../fish/guestfish.pod:909
16182 #: ../fish/guestfish.pod:911
16184 "This command returns a list of the optional groups known to the daemon, and "
16185 "indicates which ones are supported by this build of the libguestfs "
16190 #: ../fish/guestfish.pod:915
16191 msgid "See also L<guestfs(3)/AVAILABILITY>."
16195 #: ../fish/guestfish.pod:917
16200 #: ../fish/guestfish.pod:919
16203 " time command args...\n"
16208 #: ../fish/guestfish.pod:921
16210 "Run the command as usual, but print the elapsed time afterwards. This can "
16211 "be useful for benchmarking operations."
16215 #: ../fish/guestfish.pod:924
16220 #: ../fish/guestfish.pod:928 ../test-tool/libguestfs-test-tool.pod:83
16225 #: ../fish/guestfish.pod:930
16227 "guestfish returns 0 if the commands completed without error, or 1 if there "
16232 #: ../fish/guestfish.pod:937
16237 #: ../fish/guestfish.pod:939
16239 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
16244 #: ../fish/guestfish.pod:942
16245 msgid "GUESTFISH_PID"
16249 #: ../fish/guestfish.pod:944
16251 "Used with the I<--remote> option to specify the remote guestfish process to "
16252 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
16256 #: ../fish/guestfish.pod:948
16261 #: ../fish/guestfish.pod:950
16263 "If compiled with GNU readline support, various files in the home directory "
16264 "can be used. See L</FILES>."
16268 #: ../fish/guestfish.pod:959
16270 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
16271 "effect as using the B<-v> option."
16275 #: ../fish/guestfish.pod:971
16277 "Set the path that guestfish uses to search for kernel and initrd.img. See "
16278 "the discussion of paths in L<guestfs(3)>."
16282 #: ../fish/guestfish.pod:982
16283 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
16287 #: ../fish/guestfish.pod:984
16292 #: ../fish/guestfish.pod:986
16294 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
16299 #: ../fish/guestfish.pod:1001 ../test-tool/libguestfs-test-tool.pod:88
16304 #: ../fish/guestfish.pod:1005
16305 msgid "$HOME/.guestfish"
16309 #: ../fish/guestfish.pod:1007
16311 "If compiled with GNU readline support, then the command history is saved in "
16316 #: ../fish/guestfish.pod:1010
16317 msgid "$HOME/.inputrc"
16321 #: ../fish/guestfish.pod:1012
16322 msgid "/etc/inputrc"
16326 #: ../fish/guestfish.pod:1014
16328 "If compiled with GNU readline support, then these files can be used to "
16329 "configure readline. For further information, please see "
16330 "L<readline(3)/INITIALIZATION FILE>."
16334 #: ../fish/guestfish.pod:1018
16335 msgid "To write rules which only apply to guestfish, use:"
16339 #: ../fish/guestfish.pod:1020
16349 #: ../fish/guestfish.pod:1024
16351 "Variables that you can set in inputrc that change the behaviour of guestfish "
16352 "in useful ways include:"
16356 #: ../fish/guestfish.pod:1029
16357 msgid "completion-ignore-case (default: on)"
16361 #: ../fish/guestfish.pod:1031
16363 "By default, guestfish will ignore case when tab-completing paths on the "
16368 #: ../fish/guestfish.pod:1034
16371 " set completion-ignore-case off\n"
16376 #: ../fish/guestfish.pod:1036
16377 msgid "to make guestfish case sensitive."
16381 #: ../fish/guestfish.pod:1040
16386 #: ../fish/guestfish.pod:1042
16387 msgid "test2.img (etc)"
16391 #: ../fish/guestfish.pod:1044
16393 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
16394 "will be created in the file C<test1.img> in the current directory. The "
16395 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
16396 "the same name will be overwritten."
16400 #: ../fish/guestfish.pod:1053
16402 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
16403 "L<virt-edit(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, "
16404 "L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
16405 "L<virt-tar(1)>, L<virt-win-reg(1)>."
16409 #: ../fish/guestfish.pod:1076 ../test-tool/libguestfs-test-tool.pod:124 ../fuse/guestmount.pod:198 ../inspector/virt-inspector.pl:865 ../tools/virt-cat.pl:181 ../tools/virt-df.pl:499 ../tools/virt-edit.pl:345 ../tools/virt-list-filesystems.pl:211 ../tools/virt-list-partitions.pl:248 ../tools/virt-ls.pl:229 ../tools/virt-make-fs.pl:560 ../tools/virt-rescue.pl:249 ../tools/virt-resize.pl:1415 ../tools/virt-tar.pl:276 ../tools/virt-win-reg.pl:495
16411 "This program is free software; you can redistribute it and/or modify it "
16412 "under the terms of the GNU General Public License as published by the Free "
16413 "Software Foundation; either version 2 of the License, or (at your option) "
16414 "any later version."
16418 #: ../fish/guestfish.pod:1081 ../test-tool/libguestfs-test-tool.pod:129 ../fuse/guestmount.pod:203 ../inspector/virt-inspector.pl:870 ../tools/virt-cat.pl:186 ../tools/virt-df.pl:504 ../tools/virt-edit.pl:350 ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:253 ../tools/virt-ls.pl:234 ../tools/virt-make-fs.pl:565 ../tools/virt-rescue.pl:254 ../tools/virt-resize.pl:1420 ../tools/virt-tar.pl:281 ../tools/virt-win-reg.pl:500
16420 "This program is distributed in the hope that it will be useful, but WITHOUT "
16421 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
16422 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
16427 #: ../fish/guestfish.pod:1086 ../test-tool/libguestfs-test-tool.pod:134 ../fuse/guestmount.pod:208 ../inspector/virt-inspector.pl:875 ../tools/virt-cat.pl:191 ../tools/virt-df.pl:509 ../tools/virt-edit.pl:355 ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:258 ../tools/virt-ls.pl:239 ../tools/virt-make-fs.pl:570 ../tools/virt-rescue.pl:259 ../tools/virt-resize.pl:1425 ../tools/virt-tar.pl:286 ../tools/virt-win-reg.pl:505
16429 "You should have received a copy of the GNU General Public License along with "
16430 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
16431 "Ave, Cambridge, MA 02139, USA."
16435 #: ../fish/guestfish-actions.pod:1
16436 msgid "add-cdrom | cdrom"
16440 #: ../fish/guestfish-actions.pod:3
16443 " add-cdrom filename\n"
16448 #: ../fish/guestfish-actions.pod:15
16450 "This call checks for the existence of C<filename>. This stops you from "
16451 "specifying other types of drive which are supported by qemu such as C<nbd:> "
16452 "and C<http:> URLs. To specify those, use the general C<config> call "
16457 #: ../fish/guestfish-actions.pod:22
16459 "If you just want to add an ISO file (often you use this as an efficient way "
16460 "to transfer large files into the guest), then you should probably use "
16461 "C<add-drive-ro> instead."
16465 #: ../fish/guestfish-actions.pod:28
16466 msgid "add-drive | add"
16470 #: ../fish/guestfish-actions.pod:30
16473 " add-drive filename\n"
16478 #: ../fish/guestfish-actions.pod:49 ../fish/guestfish-actions.pod:75
16480 "C<if=...> is set at compile time by the configuration option C<./configure "
16481 "--with-drive-if=...>. In the rare case where you might need to change this "
16482 "at run time, use C<add-drive-with-if> or C<add-drive-ro-with-if>."
16486 #: ../fish/guestfish-actions.pod:54 ../fish/guestfish-actions.pod:80
16488 "Note that this call checks for the existence of C<filename>. This stops you "
16489 "from specifying other types of drive which are supported by qemu such as "
16490 "C<nbd:> and C<http:> URLs. To specify those, use the general C<config> call "
16495 #: ../fish/guestfish-actions.pod:59
16496 msgid "add-drive-ro | add-ro"
16500 #: ../fish/guestfish-actions.pod:61
16503 " add-drive-ro filename\n"
16508 #: ../fish/guestfish-actions.pod:85
16509 msgid "add-drive-ro-with-if"
16513 #: ../fish/guestfish-actions.pod:87
16516 " add-drive-ro-with-if filename iface\n"
16521 #: ../fish/guestfish-actions.pod:89
16523 "This is the same as C<add-drive-ro> but it allows you to specify the QEMU "
16524 "interface emulation to use at run time."
16528 #: ../fish/guestfish-actions.pod:92
16529 msgid "add-drive-with-if"
16533 #: ../fish/guestfish-actions.pod:94
16536 " add-drive-with-if filename iface\n"
16541 #: ../fish/guestfish-actions.pod:96
16543 "This is the same as C<add-drive> but it allows you to specify the QEMU "
16544 "interface emulation to use at run time."
16548 #: ../fish/guestfish-actions.pod:99
16553 #: ../fish/guestfish-actions.pod:101
16556 " aug-clear augpath\n"
16561 #: ../fish/guestfish-actions.pod:106
16566 #: ../fish/guestfish-actions.pod:108
16574 #: ../fish/guestfish-actions.pod:110
16576 "Close the current Augeas handle and free up any resources used by it. After "
16577 "calling this, you have to call C<aug-init> again before you can use any "
16578 "other Augeas functions."
16582 #: ../fish/guestfish-actions.pod:115
16583 msgid "aug-defnode"
16587 #: ../fish/guestfish-actions.pod:117
16590 " aug-defnode name expr val\n"
16595 #: ../fish/guestfish-actions.pod:122
16597 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
16598 "calling C<aug-set> C<expr>, C<value>. C<name> will be the nodeset "
16599 "containing that single node."
16603 #: ../fish/guestfish-actions.pod:130
16608 #: ../fish/guestfish-actions.pod:132
16611 " aug-defvar name expr\n"
16616 #: ../fish/guestfish-actions.pod:141
16621 #: ../fish/guestfish-actions.pod:143
16624 " aug-get augpath\n"
16629 #: ../fish/guestfish-actions.pod:148
16634 #: ../fish/guestfish-actions.pod:150
16637 " aug-init root flags\n"
16642 #: ../fish/guestfish-actions.pod:156
16643 msgid "You must call this before using any other C<aug-*> commands."
16647 #: ../fish/guestfish-actions.pod:191
16648 msgid "Do not load the tree in C<aug-init>."
16652 #: ../fish/guestfish-actions.pod:195
16653 msgid "To close the handle, you can call C<aug-close>."
16657 #: ../fish/guestfish-actions.pod:199
16662 #: ../fish/guestfish-actions.pod:201
16665 " aug-insert augpath label true|false\n"
16670 #: ../fish/guestfish-actions.pod:211
16675 #: ../fish/guestfish-actions.pod:213
16683 #: ../fish/guestfish-actions.pod:220
16688 #: ../fish/guestfish-actions.pod:222
16691 " aug-ls augpath\n"
16696 #: ../fish/guestfish-actions.pod:224
16698 "This is just a shortcut for listing C<aug-match> C<path/*> and sorting the "
16699 "resulting nodes into alphabetical order."
16703 #: ../fish/guestfish-actions.pod:227
16708 #: ../fish/guestfish-actions.pod:229
16711 " aug-match augpath\n"
16716 #: ../fish/guestfish-actions.pod:235
16721 #: ../fish/guestfish-actions.pod:237
16724 " aug-mv src dest\n"
16729 #: ../fish/guestfish-actions.pod:242
16734 #: ../fish/guestfish-actions.pod:244
16737 " aug-rm augpath\n"
16742 #: ../fish/guestfish-actions.pod:250
16747 #: ../fish/guestfish-actions.pod:252
16755 #: ../fish/guestfish-actions.pod:256
16757 "The flags which were passed to C<aug-init> affect exactly how files are "
16762 #: ../fish/guestfish-actions.pod:259
16767 #: ../fish/guestfish-actions.pod:261
16770 " aug-set augpath val\n"
16775 #: ../fish/guestfish-actions.pod:265
16777 "In the Augeas API, it is possible to clear a node by setting the value to "
16778 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
16779 "this call. Instead you must use the C<aug-clear> call."
16783 #: ../fish/guestfish-actions.pod:270
16788 #: ../fish/guestfish-actions.pod:272
16791 " available 'groups ...'\n"
16796 #: ../fish/guestfish-actions.pod:278
16798 "The libguestfs groups, and the functions that those groups correspond to, "
16799 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
16800 "runtime by calling C<available-all-groups>."
16804 #: ../fish/guestfish-actions.pod:302
16805 msgid "You must call C<launch> before calling this function."
16809 #: ../fish/guestfish-actions.pod:324
16811 "This call was added in version C<1.0.80>. In previous versions of "
16812 "libguestfs all you could do would be to speculatively execute a command to "
16813 "find out if the daemon implemented it. See also C<version>."
16817 #: ../fish/guestfish-actions.pod:331
16818 msgid "available-all-groups"
16822 #: ../fish/guestfish-actions.pod:333
16825 " available-all-groups\n"
16830 #: ../fish/guestfish-actions.pod:335
16832 "This command returns a list of all optional groups that this daemon knows "
16833 "about. Note this returns both supported and unsupported groups. To find "
16834 "out which ones the daemon can actually support you have to call C<available> "
16835 "on each member of the returned list."
16839 #: ../fish/guestfish-actions.pod:341
16840 msgid "See also C<available> and L<guestfs(3)/AVAILABILITY>."
16844 #: ../fish/guestfish-actions.pod:343
16849 #: ../fish/guestfish-actions.pod:345
16852 " base64-in (base64file|-) filename\n"
16857 #: ../fish/guestfish-actions.pod:350 ../fish/guestfish-actions.pod:359 ../fish/guestfish-actions.pod:583 ../fish/guestfish-actions.pod:730 ../fish/guestfish-actions.pod:777 ../fish/guestfish-actions.pod:1154 ../fish/guestfish-actions.pod:3702 ../fish/guestfish-actions.pod:3714 ../fish/guestfish-actions.pod:3725 ../fish/guestfish-actions.pod:3736 ../fish/guestfish-actions.pod:3788 ../fish/guestfish-actions.pod:3797 ../fish/guestfish-actions.pod:3847
16858 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
16862 #: ../fish/guestfish-actions.pod:352
16867 #: ../fish/guestfish-actions.pod:354
16870 " base64-out filename (base64file|-)\n"
16875 #: ../fish/guestfish-actions.pod:361
16876 msgid "blockdev-flushbufs"
16880 #: ../fish/guestfish-actions.pod:363
16883 " blockdev-flushbufs device\n"
16888 #: ../fish/guestfish-actions.pod:370
16889 msgid "blockdev-getbsz"
16893 #: ../fish/guestfish-actions.pod:372
16896 " blockdev-getbsz device\n"
16901 #: ../fish/guestfish-actions.pod:381
16902 msgid "blockdev-getro"
16906 #: ../fish/guestfish-actions.pod:383
16909 " blockdev-getro device\n"
16914 #: ../fish/guestfish-actions.pod:390
16915 msgid "blockdev-getsize64"
16919 #: ../fish/guestfish-actions.pod:392
16922 " blockdev-getsize64 device\n"
16927 #: ../fish/guestfish-actions.pod:396
16928 msgid "See also C<blockdev-getsz>."
16932 #: ../fish/guestfish-actions.pod:400
16933 msgid "blockdev-getss"
16937 #: ../fish/guestfish-actions.pod:402
16940 " blockdev-getss device\n"
16945 #: ../fish/guestfish-actions.pod:407
16946 msgid "(Note, this is not the size in sectors, use C<blockdev-getsz> for that)."
16950 #: ../fish/guestfish-actions.pod:412
16951 msgid "blockdev-getsz"
16955 #: ../fish/guestfish-actions.pod:414
16958 " blockdev-getsz device\n"
16963 #: ../fish/guestfish-actions.pod:419
16965 "See also C<blockdev-getss> for the real sector size of the device, and "
16966 "C<blockdev-getsize64> for the more useful I<size in bytes>."
16970 #: ../fish/guestfish-actions.pod:425
16971 msgid "blockdev-rereadpt"
16975 #: ../fish/guestfish-actions.pod:427
16978 " blockdev-rereadpt device\n"
16983 #: ../fish/guestfish-actions.pod:433
16984 msgid "blockdev-setbsz"
16988 #: ../fish/guestfish-actions.pod:435
16991 " blockdev-setbsz device blocksize\n"
16996 #: ../fish/guestfish-actions.pod:444
16997 msgid "blockdev-setro"
17001 #: ../fish/guestfish-actions.pod:446
17004 " blockdev-setro device\n"
17009 #: ../fish/guestfish-actions.pod:452
17010 msgid "blockdev-setrw"
17014 #: ../fish/guestfish-actions.pod:454
17017 " blockdev-setrw device\n"
17022 #: ../fish/guestfish-actions.pod:460
17023 msgid "case-sensitive-path"
17027 #: ../fish/guestfish-actions.pod:462
17030 " case-sensitive-path path\n"
17035 #: ../fish/guestfish-actions.pod:486
17037 "Thus C<case-sensitive-path> (\"/Windows/System32\") might return "
17038 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
17039 "how the directories were originally created under Windows)."
17043 #: ../fish/guestfish-actions.pod:494
17044 msgid "See also C<realpath>."
17048 #: ../fish/guestfish-actions.pod:496
17053 #: ../fish/guestfish-actions.pod:498
17061 #: ../fish/guestfish-actions.pod:502
17063 "Note that this function cannot correctly handle binary files (specifically, "
17064 "files containing C<\\0> character which is treated as end of string). For "
17065 "those you need to use the C<read-file> or C<download> functions which have a "
17066 "more complex interface."
17070 #: ../fish/guestfish-actions.pod:510
17075 #: ../fish/guestfish-actions.pod:512
17078 " checksum csumtype path\n"
17083 #: ../fish/guestfish-actions.pod:555
17084 msgid "To get the checksum for a device, use C<checksum-device>."
17088 #: ../fish/guestfish-actions.pod:557
17089 msgid "To get the checksums for many files, use C<checksums-out>."
17093 #: ../fish/guestfish-actions.pod:559
17094 msgid "checksum-device"
17098 #: ../fish/guestfish-actions.pod:561
17101 " checksum-device csumtype device\n"
17106 #: ../fish/guestfish-actions.pod:563
17108 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
17109 "device named C<device>. For the types of checksums supported see the "
17110 "C<checksum> command."
17114 #: ../fish/guestfish-actions.pod:567
17115 msgid "checksums-out"
17119 #: ../fish/guestfish-actions.pod:569
17122 " checksums-out csumtype directory (sumsfile|-)\n"
17127 #: ../fish/guestfish-actions.pod:585
17132 #: ../fish/guestfish-actions.pod:587
17135 " chmod mode path\n"
17140 #: ../fish/guestfish-actions.pod:598
17145 #: ../fish/guestfish-actions.pod:600
17148 " chown owner group path\n"
17153 #: ../fish/guestfish-actions.pod:608
17158 #: ../fish/guestfish-actions.pod:610
17161 " command 'arguments ...'\n"
17166 #: ../fish/guestfish-actions.pod:617
17168 "The single parameter is an argv-style list of arguments. The first element "
17169 "is the name of the program to run. Subsequent elements are parameters. The "
17170 "list must be non-empty (ie. must contain a program name). Note that the "
17171 "command runs directly, and is I<not> invoked via the shell (see C<sh>)."
17175 #: ../fish/guestfish-actions.pod:645
17176 msgid "command-lines"
17180 #: ../fish/guestfish-actions.pod:647
17183 " command-lines 'arguments ...'\n"
17188 #: ../fish/guestfish-actions.pod:649
17189 msgid "This is the same as C<command>, but splits the result into a list of lines."
17193 #: ../fish/guestfish-actions.pod:652
17194 msgid "See also: C<sh-lines>"
17198 #: ../fish/guestfish-actions.pod:657
17203 #: ../fish/guestfish-actions.pod:659
17206 " config qemuparam qemuvalue\n"
17211 #: ../fish/guestfish-actions.pod:670
17216 #: ../fish/guestfish-actions.pod:672
17219 " copy-size src dest size\n"
17224 #: ../fish/guestfish-actions.pod:680
17229 #: ../fish/guestfish-actions.pod:682
17237 #: ../fish/guestfish-actions.pod:687
17242 #: ../fish/guestfish-actions.pod:689
17250 #: ../fish/guestfish-actions.pod:694
17255 #: ../fish/guestfish-actions.pod:696
17263 #: ../fish/guestfish-actions.pod:703
17265 "If the destination is a device, it must be as large or larger than the "
17266 "source file or device, otherwise the copy will fail. This command cannot do "
17267 "partial copies (see C<copy-size>)."
17271 #: ../fish/guestfish-actions.pod:707
17276 #: ../fish/guestfish-actions.pod:709
17279 " debug subcmd 'extraargs ...'\n"
17284 #: ../fish/guestfish-actions.pod:711
17286 "The C<debug> command exposes some internals of C<guestfsd> (the guestfs "
17287 "daemon) that runs inside the qemu subprocess."
17291 #: ../fish/guestfish-actions.pod:719
17292 msgid "debug-upload"
17296 #: ../fish/guestfish-actions.pod:721
17299 " debug-upload (filename|-) tmpname mode\n"
17304 #: ../fish/guestfish-actions.pod:723
17305 msgid "The C<debug-upload> command uploads a file to the libguestfs appliance."
17309 #: ../fish/guestfish-actions.pod:732
17314 #: ../fish/guestfish-actions.pod:734
17322 #: ../fish/guestfish-actions.pod:742
17327 #: ../fish/guestfish-actions.pod:744
17335 #: ../fish/guestfish-actions.pod:753
17340 #: ../fish/guestfish-actions.pod:755
17348 #: ../fish/guestfish-actions.pod:761
17350 "Another way to get the same information is to enable verbose messages with "
17351 "C<set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
17352 "before running the program."
17356 #: ../fish/guestfish-actions.pod:766
17361 #: ../fish/guestfish-actions.pod:768
17364 " download remotefilename (filename|-)\n"
17369 #: ../fish/guestfish-actions.pod:775
17370 msgid "See also C<upload>, C<cat>."
17374 #: ../fish/guestfish-actions.pod:779
17375 msgid "drop-caches"
17379 #: ../fish/guestfish-actions.pod:781
17382 " drop-caches whattodrop\n"
17387 #: ../fish/guestfish-actions.pod:793
17392 #: ../fish/guestfish-actions.pod:795
17400 #: ../fish/guestfish-actions.pod:807
17405 #: ../fish/guestfish-actions.pod:809
17408 " e2fsck-f device\n"
17413 #: ../fish/guestfish-actions.pod:815
17415 "This command is only needed because of C<resize2fs> (q.v.). Normally you "
17416 "should use C<fsck>."
17420 #: ../fish/guestfish-actions.pod:818
17421 msgid "echo-daemon"
17425 #: ../fish/guestfish-actions.pod:820
17428 " echo-daemon 'words ...'\n"
17433 #: ../fish/guestfish-actions.pod:827
17434 msgid "See also C<ping-daemon>."
17438 #: ../fish/guestfish-actions.pod:829
17443 #: ../fish/guestfish-actions.pod:831
17446 " egrep regex path\n"
17451 #: ../fish/guestfish-actions.pod:839
17456 #: ../fish/guestfish-actions.pod:841
17459 " egrepi regex path\n"
17464 #: ../fish/guestfish-actions.pod:849
17469 #: ../fish/guestfish-actions.pod:851
17472 " equal file1 file2\n"
17477 #: ../fish/guestfish-actions.pod:858
17482 #: ../fish/guestfish-actions.pod:860
17490 #: ../fish/guestfish-actions.pod:865
17491 msgid "See also C<is-file>, C<is-dir>, C<stat>."
17495 #: ../fish/guestfish-actions.pod:867
17500 #: ../fish/guestfish-actions.pod:869
17503 " fallocate path len\n"
17508 #: ../fish/guestfish-actions.pod:886
17509 msgid "fallocate64"
17513 #: ../fish/guestfish-actions.pod:888
17516 " fallocate64 path len\n"
17521 #: ../fish/guestfish-actions.pod:894
17523 "Note that this call allocates disk blocks for the file. To create a sparse "
17524 "file use C<truncate-size> instead."
17528 #: ../fish/guestfish-actions.pod:897
17530 "The deprecated call C<fallocate> does the same, but owing to an oversight it "
17531 "only allowed 30 bit lengths to be specified, effectively limiting the "
17532 "maximum size of files created through that call to 1GB."
17536 #: ../fish/guestfish-actions.pod:906
17541 #: ../fish/guestfish-actions.pod:908
17544 " fgrep pattern path\n"
17549 #: ../fish/guestfish-actions.pod:916
17554 #: ../fish/guestfish-actions.pod:918
17557 " fgrepi pattern path\n"
17562 #: ../fish/guestfish-actions.pod:926
17567 #: ../fish/guestfish-actions.pod:928
17575 #: ../fish/guestfish-actions.pod:940
17577 "This command can also be used on C</dev/> devices (and partitions, LV "
17578 "names). You can for example use this to determine if a device contains a "
17579 "filesystem, although it's usually better to use C<vfs-type>."
17583 #: ../fish/guestfish-actions.pod:950
17584 msgid "file-architecture"
17588 #: ../fish/guestfish-actions.pod:952
17591 " file-architecture filename\n"
17596 #: ../fish/guestfish-actions.pod:1055
17601 #: ../fish/guestfish-actions.pod:1057
17609 #: ../fish/guestfish-actions.pod:1061
17611 "To get other stats about a file, use C<stat>, C<lstat>, C<is-dir>, "
17612 "C<is-file> etc. To get the size of block devices, use "
17613 "C<blockdev-getsize64>."
17617 #: ../fish/guestfish-actions.pod:1065
17622 #: ../fish/guestfish-actions.pod:1067
17625 " fill c len path\n"
17630 #: ../fish/guestfish-actions.pod:1073
17632 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
17633 "C<truncate-size>. To create a file with a pattern of repeating bytes use "
17638 #: ../fish/guestfish-actions.pod:1078
17639 msgid "fill-pattern"
17643 #: ../fish/guestfish-actions.pod:1080
17646 " fill-pattern pattern len path\n"
17651 #: ../fish/guestfish-actions.pod:1082
17653 "This function is like C<fill> except that it creates a new file of length "
17654 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
17655 "is truncated if necessary to ensure the length of the file is exactly C<len> "
17660 #: ../fish/guestfish-actions.pod:1087
17665 #: ../fish/guestfish-actions.pod:1089
17668 " find directory\n"
17673 #: ../fish/guestfish-actions.pod:1103
17674 msgid "then the returned list from C<find> C</tmp> would be 4 elements:"
17678 #: ../fish/guestfish-actions.pod:1116
17679 msgid "See also C<find0>."
17683 #: ../fish/guestfish-actions.pod:1121
17688 #: ../fish/guestfish-actions.pod:1123
17691 " find0 directory (files|-)\n"
17696 #: ../fish/guestfish-actions.pod:1129
17697 msgid "This command works the same way as C<find> with the following exceptions:"
17701 #: ../fish/guestfish-actions.pod:1156
17702 msgid "findfs-label"
17706 #: ../fish/guestfish-actions.pod:1158
17709 " findfs-label label\n"
17714 #: ../fish/guestfish-actions.pod:1164
17715 msgid "To find the label of a filesystem, use C<vfs-label>."
17719 #: ../fish/guestfish-actions.pod:1166
17720 msgid "findfs-uuid"
17724 #: ../fish/guestfish-actions.pod:1168
17727 " findfs-uuid uuid\n"
17732 #: ../fish/guestfish-actions.pod:1174
17733 msgid "To find the UUID of a filesystem, use C<vfs-uuid>."
17737 #: ../fish/guestfish-actions.pod:1176
17742 #: ../fish/guestfish-actions.pod:1178
17745 " fsck fstype device\n"
17750 #: ../fish/guestfish-actions.pod:1208
17755 #: ../fish/guestfish-actions.pod:1210
17763 #: ../fish/guestfish-actions.pod:1217
17764 msgid "get-autosync"
17768 #: ../fish/guestfish-actions.pod:1219
17776 #: ../fish/guestfish-actions.pod:1223
17781 #: ../fish/guestfish-actions.pod:1225
17789 #: ../fish/guestfish-actions.pod:1229
17790 msgid "get-e2label"
17794 #: ../fish/guestfish-actions.pod:1231
17797 " get-e2label device\n"
17802 #: ../fish/guestfish-actions.pod:1243
17807 #: ../fish/guestfish-actions.pod:1245
17810 " get-e2uuid device\n"
17815 #: ../fish/guestfish-actions.pod:1257
17816 msgid "get-memsize"
17820 #: ../fish/guestfish-actions.pod:1259
17828 #: ../fish/guestfish-actions.pod:1264
17830 "If C<set-memsize> was not called on this handle, and if "
17831 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
17832 "value for memsize."
17836 #: ../fish/guestfish-actions.pod:1271
17837 msgid "get-network"
17841 #: ../fish/guestfish-actions.pod:1273
17849 #: ../fish/guestfish-actions.pod:1277
17854 #: ../fish/guestfish-actions.pod:1279
17862 #: ../fish/guestfish-actions.pod:1286
17863 msgid "get-pid | pid"
17867 #: ../fish/guestfish-actions.pod:1288
17875 #: ../fish/guestfish-actions.pod:1295
17880 #: ../fish/guestfish-actions.pod:1297
17888 #: ../fish/guestfish-actions.pod:1304
17889 msgid "get-recovery-proc"
17893 #: ../fish/guestfish-actions.pod:1306
17896 " get-recovery-proc\n"
17901 #: ../fish/guestfish-actions.pod:1310
17902 msgid "get-selinux"
17906 #: ../fish/guestfish-actions.pod:1312
17914 #: ../fish/guestfish-actions.pod:1314
17916 "This returns the current setting of the selinux flag which is passed to the "
17917 "appliance at boot time. See C<set-selinux>."
17921 #: ../fish/guestfish-actions.pod:1320
17926 #: ../fish/guestfish-actions.pod:1322
17934 #: ../fish/guestfish-actions.pod:1329
17939 #: ../fish/guestfish-actions.pod:1331
17947 #: ../fish/guestfish-actions.pod:1335
17952 #: ../fish/guestfish-actions.pod:1337
17960 #: ../fish/guestfish-actions.pod:1339
17962 "Return the current umask. By default the umask is C<022> unless it has been "
17963 "set by calling C<umask>."
17967 #: ../fish/guestfish-actions.pod:1342
17968 msgid "get-verbose"
17972 #: ../fish/guestfish-actions.pod:1344
17980 #: ../fish/guestfish-actions.pod:1348
17985 #: ../fish/guestfish-actions.pod:1350
17993 #: ../fish/guestfish-actions.pod:1354
17994 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<setcon>"
17998 #: ../fish/guestfish-actions.pod:1357
18003 #: ../fish/guestfish-actions.pod:1359
18006 " getxattrs path\n"
18011 #: ../fish/guestfish-actions.pod:1367
18012 msgid "See also: C<lgetxattrs>, L<attr(5)>."
18016 #: ../fish/guestfish-actions.pod:1369
18017 msgid "glob-expand"
18021 #: ../fish/guestfish-actions.pod:1371
18024 " glob-expand pattern\n"
18029 #: ../fish/guestfish-actions.pod:1384
18034 #: ../fish/guestfish-actions.pod:1386
18037 " grep regex path\n"
18042 #: ../fish/guestfish-actions.pod:1394
18047 #: ../fish/guestfish-actions.pod:1396
18050 " grepi regex path\n"
18055 #: ../fish/guestfish-actions.pod:1404
18056 msgid "grub-install"
18060 #: ../fish/guestfish-actions.pod:1406
18063 " grub-install root device\n"
18068 #: ../fish/guestfish-actions.pod:1422
18073 #: ../fish/guestfish-actions.pod:1424
18081 #: ../fish/guestfish-actions.pod:1432
18086 #: ../fish/guestfish-actions.pod:1434
18089 " head-n nrlines path\n"
18094 #: ../fish/guestfish-actions.pod:1447
18099 #: ../fish/guestfish-actions.pod:1449
18107 #: ../fish/guestfish-actions.pod:1457
18112 #: ../fish/guestfish-actions.pod:1459
18115 " initrd-cat initrdpath filename\n"
18120 #: ../fish/guestfish-actions.pod:1471
18121 msgid "See also C<initrd-list>."
18125 #: ../fish/guestfish-actions.pod:1476
18126 msgid "initrd-list"
18130 #: ../fish/guestfish-actions.pod:1478
18133 " initrd-list path\n"
18138 #: ../fish/guestfish-actions.pod:1490
18139 msgid "inotify-add-watch"
18143 #: ../fish/guestfish-actions.pod:1492
18146 " inotify-add-watch path mask\n"
18151 #: ../fish/guestfish-actions.pod:1504
18152 msgid "inotify-close"
18156 #: ../fish/guestfish-actions.pod:1506
18164 #: ../fish/guestfish-actions.pod:1512
18165 msgid "inotify-files"
18169 #: ../fish/guestfish-actions.pod:1514
18177 #: ../fish/guestfish-actions.pod:1516
18179 "This function is a helpful wrapper around C<inotify-read> which just returns "
18180 "a list of pathnames of objects that were touched. The returned pathnames "
18181 "are sorted and deduplicated."
18185 #: ../fish/guestfish-actions.pod:1520
18186 msgid "inotify-init"
18190 #: ../fish/guestfish-actions.pod:1522
18193 " inotify-init maxevents\n"
18198 #: ../fish/guestfish-actions.pod:1528
18200 "C<maxevents> is the maximum number of events which will be queued up between "
18201 "calls to C<inotify-read> or C<inotify-files>. If this is passed as C<0>, "
18202 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
18203 "default was 16384 events. Beyond this limit, the kernel throws away events, "
18204 "but records the fact that it threw them away by setting a flag "
18205 "C<IN_Q_OVERFLOW> in the returned structure list (see C<inotify-read>)."
18209 #: ../fish/guestfish-actions.pod:1538
18211 "Before any events are generated, you have to add some watches to the "
18212 "internal watch list. See: C<inotify-add-watch>, C<inotify-rm-watch> and "
18213 "C<inotify-watch-all>."
18217 #: ../fish/guestfish-actions.pod:1544
18219 "Queued up events should be read periodically by calling C<inotify-read> (or "
18220 "C<inotify-files> which is just a helpful wrapper around C<inotify-read>). "
18221 "If you don't read the events out often enough then you risk the internal "
18222 "queue overflowing."
18226 #: ../fish/guestfish-actions.pod:1551
18228 "The handle should be closed after use by calling C<inotify-close>. This "
18229 "also removes any watches automatically."
18233 #: ../fish/guestfish-actions.pod:1560
18234 msgid "inotify-read"
18238 #: ../fish/guestfish-actions.pod:1562
18246 #: ../fish/guestfish-actions.pod:1575
18247 msgid "inotify-rm-watch"
18251 #: ../fish/guestfish-actions.pod:1577
18254 " inotify-rm-watch wd\n"
18259 #: ../fish/guestfish-actions.pod:1579
18260 msgid "Remove a previously defined inotify watch. See C<inotify-add-watch>."
18264 #: ../fish/guestfish-actions.pod:1582
18265 msgid "inspect-get-arch"
18269 #: ../fish/guestfish-actions.pod:1584
18272 " inspect-get-arch root\n"
18277 #: ../fish/guestfish-actions.pod:1586 ../fish/guestfish-actions.pod:1602 ../fish/guestfish-actions.pod:1648 ../fish/guestfish-actions.pod:1666 ../fish/guestfish-actions.pod:1687 ../fish/guestfish-actions.pod:1702 ../fish/guestfish-actions.pod:1725 ../fish/guestfish-actions.pod:1742
18279 "This function should only be called with a root device string as returned by "
18284 #: ../fish/guestfish-actions.pod:1589
18286 "This returns the architecture of the inspected operating system. The "
18287 "possible return values are listed under C<file-architecture>."
18291 #: ../fish/guestfish-actions.pod:1598
18292 msgid "inspect-get-distro"
18296 #: ../fish/guestfish-actions.pod:1600
18299 " inspect-get-distro root\n"
18304 #: ../fish/guestfish-actions.pod:1644
18305 msgid "inspect-get-filesystems"
18309 #: ../fish/guestfish-actions.pod:1646
18312 " inspect-get-filesystems root\n"
18317 #: ../fish/guestfish-actions.pod:1659
18319 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
18320 "C<inspect-get-mountpoints>."
18324 #: ../fish/guestfish-actions.pod:1662
18325 msgid "inspect-get-major-version"
18329 #: ../fish/guestfish-actions.pod:1664
18332 " inspect-get-major-version root\n"
18337 #: ../fish/guestfish-actions.pod:1683
18338 msgid "inspect-get-minor-version"
18342 #: ../fish/guestfish-actions.pod:1685
18345 " inspect-get-minor-version root\n"
18350 #: ../fish/guestfish-actions.pod:1695
18352 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
18353 "C<inspect-get-major-version>."
18357 #: ../fish/guestfish-actions.pod:1698
18358 msgid "inspect-get-mountpoints"
18362 #: ../fish/guestfish-actions.pod:1700
18365 " inspect-get-mountpoints root\n"
18370 #: ../fish/guestfish-actions.pod:1718
18372 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
18373 "C<inspect-get-filesystems>."
18377 #: ../fish/guestfish-actions.pod:1721
18378 msgid "inspect-get-product-name"
18382 #: ../fish/guestfish-actions.pod:1723
18385 " inspect-get-product-name root\n"
18390 #: ../fish/guestfish-actions.pod:1738
18391 msgid "inspect-get-type"
18395 #: ../fish/guestfish-actions.pod:1740
18398 " inspect-get-type root\n"
18403 #: ../fish/guestfish-actions.pod:1769
18408 #: ../fish/guestfish-actions.pod:1771
18416 #: ../fish/guestfish-actions.pod:1786
18418 "You can pass the root string(s) returned to other C<inspect-get-*> functions "
18419 "in order to query further information about each operating system, such as "
18420 "the name and version."
18424 #: ../fish/guestfish-actions.pod:1791
18426 "This function uses other libguestfs features such as C<mount-ro> and "
18427 "C<umount-all> in order to mount and unmount filesystems and look at the "
18428 "contents. This should be called with no disks currently mounted. The "
18429 "function may also use Augeas, so any existing Augeas handle will be closed."
18433 #: ../fish/guestfish-actions.pod:1803
18434 msgid "is-blockdev"
18438 #: ../fish/guestfish-actions.pod:1805
18441 " is-blockdev path\n"
18446 #: ../fish/guestfish-actions.pod:1810 ../fish/guestfish-actions.pod:1828 ../fish/guestfish-actions.pod:1847 ../fish/guestfish-actions.pod:1856 ../fish/guestfish-actions.pod:1866 ../fish/guestfish-actions.pod:1900 ../fish/guestfish-actions.pod:1909
18447 msgid "See also C<stat>."
18451 #: ../fish/guestfish-actions.pod:1812
18456 #: ../fish/guestfish-actions.pod:1814
18464 #: ../fish/guestfish-actions.pod:1821
18469 #: ../fish/guestfish-actions.pod:1823
18472 " is-chardev path\n"
18477 #: ../fish/guestfish-actions.pod:1830
18482 #: ../fish/guestfish-actions.pod:1832
18490 #: ../fish/guestfish-actions.pod:1839
18495 #: ../fish/guestfish-actions.pod:1841
18503 #: ../fish/guestfish-actions.pod:1849
18508 #: ../fish/guestfish-actions.pod:1851
18516 #: ../fish/guestfish-actions.pod:1858
18521 #: ../fish/guestfish-actions.pod:1860
18529 #: ../fish/guestfish-actions.pod:1868
18530 msgid "is-launching"
18534 #: ../fish/guestfish-actions.pod:1870
18542 #: ../fish/guestfish-actions.pod:1877
18547 #: ../fish/guestfish-actions.pod:1879
18555 #: ../fish/guestfish-actions.pod:1884
18560 #: ../fish/guestfish-actions.pod:1886
18568 #: ../fish/guestfish-actions.pod:1893
18573 #: ../fish/guestfish-actions.pod:1895
18576 " is-socket path\n"
18581 #: ../fish/guestfish-actions.pod:1902
18586 #: ../fish/guestfish-actions.pod:1904
18589 " is-symlink path\n"
18594 #: ../fish/guestfish-actions.pod:1911
18595 msgid "kill-subprocess"
18599 #: ../fish/guestfish-actions.pod:1913
18602 " kill-subprocess\n"
18607 #: ../fish/guestfish-actions.pod:1917
18608 msgid "launch | run"
18612 #: ../fish/guestfish-actions.pod:1919
18620 #: ../fish/guestfish-actions.pod:1927
18625 #: ../fish/guestfish-actions.pod:1929
18628 " lchown owner group path\n"
18633 #: ../fish/guestfish-actions.pod:1931
18635 "Change the file owner to C<owner> and group to C<group>. This is like "
18636 "C<chown> but if C<path> is a symlink then the link itself is changed, not "
18641 #: ../fish/guestfish-actions.pod:1939
18646 #: ../fish/guestfish-actions.pod:1941
18649 " lgetxattrs path\n"
18654 #: ../fish/guestfish-actions.pod:1943
18656 "This is the same as C<getxattrs>, but if C<path> is a symbolic link, then it "
18657 "returns the extended attributes of the link itself."
18661 #: ../fish/guestfish-actions.pod:1947
18662 msgid "list-devices"
18666 #: ../fish/guestfish-actions.pod:1949
18674 #: ../fish/guestfish-actions.pod:1955
18675 msgid "list-partitions"
18679 #: ../fish/guestfish-actions.pod:1957
18682 " list-partitions\n"
18687 #: ../fish/guestfish-actions.pod:1963
18689 "This does not return logical volumes. For that you will need to call "
18694 #: ../fish/guestfish-actions.pod:1966
18699 #: ../fish/guestfish-actions.pod:1968
18707 #: ../fish/guestfish-actions.pod:1976
18712 #: ../fish/guestfish-actions.pod:1978
18715 " ln target linkname\n"
18720 #: ../fish/guestfish-actions.pod:1982
18725 #: ../fish/guestfish-actions.pod:1984
18728 " ln-f target linkname\n"
18733 #: ../fish/guestfish-actions.pod:1989
18738 #: ../fish/guestfish-actions.pod:1991
18741 " ln-s target linkname\n"
18746 #: ../fish/guestfish-actions.pod:1995
18751 #: ../fish/guestfish-actions.pod:1997
18754 " ln-sf target linkname\n"
18759 #: ../fish/guestfish-actions.pod:2002
18760 msgid "lremovexattr"
18764 #: ../fish/guestfish-actions.pod:2004
18767 " lremovexattr xattr path\n"
18772 #: ../fish/guestfish-actions.pod:2006
18774 "This is the same as C<removexattr>, but if C<path> is a symbolic link, then "
18775 "it removes an extended attribute of the link itself."
18779 #: ../fish/guestfish-actions.pod:2010
18784 #: ../fish/guestfish-actions.pod:2012
18792 #: ../fish/guestfish-actions.pod:2018
18794 "This command is mostly useful for interactive sessions. Programs should "
18795 "probably use C<readdir> instead."
18799 #: ../fish/guestfish-actions.pod:2021
18804 #: ../fish/guestfish-actions.pod:2023
18807 " lsetxattr xattr val vallen path\n"
18812 #: ../fish/guestfish-actions.pod:2025
18814 "This is the same as C<setxattr>, but if C<path> is a symbolic link, then it "
18815 "sets an extended attribute of the link itself."
18819 #: ../fish/guestfish-actions.pod:2029
18824 #: ../fish/guestfish-actions.pod:2031
18832 #: ../fish/guestfish-actions.pod:2035
18834 "This is the same as C<stat> except that if C<path> is a symbolic link, then "
18835 "the link is stat-ed, not the file it refers to."
18839 #: ../fish/guestfish-actions.pod:2041
18844 #: ../fish/guestfish-actions.pod:2043
18847 " lstatlist path 'names ...'\n"
18852 #: ../fish/guestfish-actions.pod:2045
18854 "This call allows you to perform the C<lstat> operation on multiple files, "
18855 "where all files are in the directory C<path>. C<names> is the list of files "
18856 "from this directory."
18860 #: ../fish/guestfish-actions.pod:2054
18862 "This call is intended for programs that want to efficiently list a directory "
18863 "contents without making many round-trips. See also C<lxattrlist> for a "
18864 "similarly efficient call for getting extended attributes. Very long "
18865 "directory listings might cause the protocol message size to be exceeded, "
18866 "causing this call to fail. The caller must split up such requests into "
18867 "smaller groups of names."
18871 #: ../fish/guestfish-actions.pod:2062
18872 msgid "luks-add-key"
18876 #: ../fish/guestfish-actions.pod:2064
18879 " luks-add-key device keyslot\n"
18884 #: ../fish/guestfish-actions.pod:2071
18886 "Note that if C<keyslot> already contains a key, then this command will "
18887 "fail. You have to use C<luks-kill-slot> first to remove that key."
18891 #: ../fish/guestfish-actions.pod:2075 ../fish/guestfish-actions.pod:2097 ../fish/guestfish-actions.pod:2110 ../fish/guestfish-actions.pod:2124 ../fish/guestfish-actions.pod:2147 ../fish/guestfish-actions.pod:2157
18893 "This command has one or more key or passphrase parameters. Guestfish will "
18894 "prompt for these separately."
18898 #: ../fish/guestfish-actions.pod:2078
18903 #: ../fish/guestfish-actions.pod:2080
18906 " luks-close device\n"
18911 #: ../fish/guestfish-actions.pod:2082
18913 "This closes a LUKS device that was created earlier by C<luks-open> or "
18914 "C<luks-open-ro>. The C<device> parameter must be the name of the LUKS "
18915 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
18916 "underlying block device."
18920 #: ../fish/guestfish-actions.pod:2088
18921 msgid "luks-format"
18925 #: ../fish/guestfish-actions.pod:2090
18928 " luks-format device keyslot\n"
18933 #: ../fish/guestfish-actions.pod:2103
18934 msgid "luks-format-cipher"
18938 #: ../fish/guestfish-actions.pod:2105
18941 " luks-format-cipher device keyslot cipher\n"
18946 #: ../fish/guestfish-actions.pod:2107
18948 "This command is the same as C<luks-format> but it also allows you to set the "
18953 #: ../fish/guestfish-actions.pod:2116
18954 msgid "luks-kill-slot"
18958 #: ../fish/guestfish-actions.pod:2118
18961 " luks-kill-slot device keyslot\n"
18966 #: ../fish/guestfish-actions.pod:2127
18971 #: ../fish/guestfish-actions.pod:2129
18974 " luks-open device mapname\n"
18979 #: ../fish/guestfish-actions.pod:2143
18981 "If this block device contains LVM volume groups, then calling C<vgscan> "
18982 "followed by C<vg-activate-all> will make them visible."
18986 #: ../fish/guestfish-actions.pod:2150
18987 msgid "luks-open-ro"
18991 #: ../fish/guestfish-actions.pod:2152
18994 " luks-open-ro device mapname\n"
18999 #: ../fish/guestfish-actions.pod:2154
19000 msgid "This is the same as C<luks-open> except that a read-only mapping is created."
19004 #: ../fish/guestfish-actions.pod:2160
19009 #: ../fish/guestfish-actions.pod:2162
19012 " lvcreate logvol volgroup mbytes\n"
19017 #: ../fish/guestfish-actions.pod:2167
19018 msgid "lvm-clear-filter"
19022 #: ../fish/guestfish-actions.pod:2169
19025 " lvm-clear-filter\n"
19030 #: ../fish/guestfish-actions.pod:2171
19032 "This undoes the effect of C<lvm-set-filter>. LVM will be able to see every "
19037 #: ../fish/guestfish-actions.pod:2177
19038 msgid "lvm-remove-all"
19042 #: ../fish/guestfish-actions.pod:2179
19045 " lvm-remove-all\n"
19050 #: ../fish/guestfish-actions.pod:2187
19051 msgid "lvm-set-filter"
19055 #: ../fish/guestfish-actions.pod:2189
19058 " lvm-set-filter 'devices ...'\n"
19063 #: ../fish/guestfish-actions.pod:2214
19068 #: ../fish/guestfish-actions.pod:2216
19071 " lvremove device\n"
19076 #: ../fish/guestfish-actions.pod:2224
19081 #: ../fish/guestfish-actions.pod:2226
19084 " lvrename logvol newlogvol\n"
19089 #: ../fish/guestfish-actions.pod:2230
19094 #: ../fish/guestfish-actions.pod:2232
19097 " lvresize device mbytes\n"
19102 #: ../fish/guestfish-actions.pod:2238
19103 msgid "lvresize-free"
19107 #: ../fish/guestfish-actions.pod:2240
19110 " lvresize-free lv percent\n"
19115 #: ../fish/guestfish-actions.pod:2248
19120 #: ../fish/guestfish-actions.pod:2250
19128 #: ../fish/guestfish-actions.pod:2258
19129 msgid "See also C<lvs-full>."
19133 #: ../fish/guestfish-actions.pod:2260
19138 #: ../fish/guestfish-actions.pod:2262
19146 #: ../fish/guestfish-actions.pod:2267
19151 #: ../fish/guestfish-actions.pod:2269
19159 #: ../fish/guestfish-actions.pod:2273
19164 #: ../fish/guestfish-actions.pod:2275
19167 " lxattrlist path 'names ...'\n"
19172 #: ../fish/guestfish-actions.pod:2291
19174 "This call is intended for programs that want to efficiently list a directory "
19175 "contents without making many round-trips. See also C<lstatlist> for a "
19176 "similarly efficient call for getting standard stats. Very long directory "
19177 "listings might cause the protocol message size to be exceeded, causing this "
19178 "call to fail. The caller must split up such requests into smaller groups of "
19183 #: ../fish/guestfish-actions.pod:2299
19188 #: ../fish/guestfish-actions.pod:2301
19196 #: ../fish/guestfish-actions.pod:2305
19201 #: ../fish/guestfish-actions.pod:2307
19204 " mkdir-mode path mode\n"
19209 #: ../fish/guestfish-actions.pod:2316
19210 msgid "See also C<mkdir>, C<umask>"
19214 #: ../fish/guestfish-actions.pod:2318
19219 #: ../fish/guestfish-actions.pod:2320
19227 #: ../fish/guestfish-actions.pod:2325
19232 #: ../fish/guestfish-actions.pod:2327
19235 " mkdtemp template\n"
19240 #: ../fish/guestfish-actions.pod:2348
19245 #: ../fish/guestfish-actions.pod:2350
19248 " mke2fs-J fstype blocksize device journal\n"
19253 #: ../fish/guestfish-actions.pod:2358
19254 msgid "See also C<mke2journal>."
19258 #: ../fish/guestfish-actions.pod:2360
19263 #: ../fish/guestfish-actions.pod:2362
19266 " mke2fs-JL fstype blocksize device label\n"
19271 #: ../fish/guestfish-actions.pod:2367
19272 msgid "See also C<mke2journal-L>."
19276 #: ../fish/guestfish-actions.pod:2369
19281 #: ../fish/guestfish-actions.pod:2371
19284 " mke2fs-JU fstype blocksize device uuid\n"
19289 #: ../fish/guestfish-actions.pod:2376
19290 msgid "See also C<mke2journal-U>."
19294 #: ../fish/guestfish-actions.pod:2378
19295 msgid "mke2journal"
19299 #: ../fish/guestfish-actions.pod:2380
19302 " mke2journal blocksize device\n"
19307 #: ../fish/guestfish-actions.pod:2387
19308 msgid "mke2journal-L"
19312 #: ../fish/guestfish-actions.pod:2389
19315 " mke2journal-L blocksize label device\n"
19320 #: ../fish/guestfish-actions.pod:2393
19321 msgid "mke2journal-U"
19325 #: ../fish/guestfish-actions.pod:2395
19328 " mke2journal-U blocksize uuid device\n"
19333 #: ../fish/guestfish-actions.pod:2399
19338 #: ../fish/guestfish-actions.pod:2401
19341 " mkfifo mode path\n"
19346 #: ../fish/guestfish-actions.pod:2403
19348 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
19349 "is just a convenient wrapper around C<mknod>."
19353 #: ../fish/guestfish-actions.pod:2409
19358 #: ../fish/guestfish-actions.pod:2411
19361 " mkfs fstype device\n"
19366 #: ../fish/guestfish-actions.pod:2417
19371 #: ../fish/guestfish-actions.pod:2419
19374 " mkfs-b fstype blocksize device\n"
19379 #: ../fish/guestfish-actions.pod:2421
19381 "This call is similar to C<mkfs>, but it allows you to control the block size "
19382 "of the resulting filesystem. Supported block sizes depend on the filesystem "
19383 "type, but typically they are C<1024>, C<2048> or C<4096> only."
19387 #: ../fish/guestfish-actions.pod:2429
19388 msgid "mkmountpoint"
19392 #: ../fish/guestfish-actions.pod:2431
19395 " mkmountpoint exemptpath\n"
19400 #: ../fish/guestfish-actions.pod:2433
19402 "C<mkmountpoint> and C<rmmountpoint> are specialized calls that can be used "
19403 "to create extra mountpoints before mounting the first filesystem."
19407 #: ../fish/guestfish-actions.pod:2457
19412 #: ../fish/guestfish-actions.pod:2459
19415 " mknod mode devmajor devminor path\n"
19420 #: ../fish/guestfish-actions.pod:2469
19422 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
19423 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
19424 "regular file). These constants are available in the standard Linux header "
19425 "files, or you can use C<mknod-b>, C<mknod-c> or C<mkfifo> which are wrappers "
19426 "around this command which bitwise OR in the appropriate constant for you."
19430 #: ../fish/guestfish-actions.pod:2479
19435 #: ../fish/guestfish-actions.pod:2481
19438 " mknod-b mode devmajor devminor path\n"
19443 #: ../fish/guestfish-actions.pod:2483
19445 "This call creates a block device node called C<path> with mode C<mode> and "
19446 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
19447 "wrapper around C<mknod>."
19451 #: ../fish/guestfish-actions.pod:2489
19456 #: ../fish/guestfish-actions.pod:2491
19459 " mknod-c mode devmajor devminor path\n"
19464 #: ../fish/guestfish-actions.pod:2493
19466 "This call creates a char device node called C<path> with mode C<mode> and "
19467 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
19468 "wrapper around C<mknod>."
19472 #: ../fish/guestfish-actions.pod:2499
19477 #: ../fish/guestfish-actions.pod:2501
19485 #: ../fish/guestfish-actions.pod:2505
19490 #: ../fish/guestfish-actions.pod:2507
19493 " mkswap-L label device\n"
19498 #: ../fish/guestfish-actions.pod:2515
19503 #: ../fish/guestfish-actions.pod:2517
19506 " mkswap-U uuid device\n"
19511 #: ../fish/guestfish-actions.pod:2521
19512 msgid "mkswap-file"
19516 #: ../fish/guestfish-actions.pod:2523
19519 " mkswap-file path\n"
19524 #: ../fish/guestfish-actions.pod:2527
19526 "This command just writes a swap file signature to an existing file. To "
19527 "create the file itself, use something like C<fallocate>."
19531 #: ../fish/guestfish-actions.pod:2530
19536 #: ../fish/guestfish-actions.pod:2532
19539 " modprobe modulename\n"
19544 #: ../fish/guestfish-actions.pod:2539
19549 #: ../fish/guestfish-actions.pod:2541
19552 " mount device mountpoint\n"
19557 #: ../fish/guestfish-actions.pod:2557
19559 "B<Important note:> When you use this call, the filesystem options C<sync> "
19560 "and C<noatime> are set implicitly. This was originally done because we "
19561 "thought it would improve reliability, but it turns out that I<-o sync> has a "
19562 "very large negative performance impact and negligible effect on "
19563 "reliability. Therefore we recommend that you avoid using C<mount> in any "
19564 "code that needs performance, and instead use C<mount-options> (use an empty "
19565 "string for the first parameter if you don't want any options)."
19569 #: ../fish/guestfish-actions.pod:2567
19574 #: ../fish/guestfish-actions.pod:2569
19577 " mount-loop file mountpoint\n"
19582 #: ../fish/guestfish-actions.pod:2575
19583 msgid "mount-options"
19587 #: ../fish/guestfish-actions.pod:2577
19590 " mount-options options device mountpoint\n"
19595 #: ../fish/guestfish-actions.pod:2579
19597 "This is the same as the C<mount> command, but it allows you to set the mount "
19598 "options as for the L<mount(8)> I<-o> flag."
19602 #: ../fish/guestfish-actions.pod:2587
19607 #: ../fish/guestfish-actions.pod:2589
19610 " mount-ro device mountpoint\n"
19615 #: ../fish/guestfish-actions.pod:2591
19617 "This is the same as the C<mount> command, but it mounts the filesystem with "
19618 "the read-only (I<-o ro>) flag."
19622 #: ../fish/guestfish-actions.pod:2594
19627 #: ../fish/guestfish-actions.pod:2596
19630 " mount-vfs options vfstype device mountpoint\n"
19635 #: ../fish/guestfish-actions.pod:2598
19637 "This is the same as the C<mount> command, but it allows you to set both the "
19638 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
19642 #: ../fish/guestfish-actions.pod:2602
19643 msgid "mountpoints"
19647 #: ../fish/guestfish-actions.pod:2604
19655 #: ../fish/guestfish-actions.pod:2606
19657 "This call is similar to C<mounts>. That call returns a list of devices. "
19658 "This one returns a hash table (map) of device name to directory where the "
19659 "device is mounted."
19663 #: ../fish/guestfish-actions.pod:2610
19668 #: ../fish/guestfish-actions.pod:2612
19676 #: ../fish/guestfish-actions.pod:2619
19677 msgid "See also: C<mountpoints>"
19681 #: ../fish/guestfish-actions.pod:2621
19686 #: ../fish/guestfish-actions.pod:2623
19694 #: ../fish/guestfish-actions.pod:2628
19695 msgid "ntfs-3g-probe"
19699 #: ../fish/guestfish-actions.pod:2630
19702 " ntfs-3g-probe true|false device\n"
19707 #: ../fish/guestfish-actions.pod:2644
19712 #: ../fish/guestfish-actions.pod:2646
19715 " ntfsresize device\n"
19720 #: ../fish/guestfish-actions.pod:2652
19721 msgid "ntfsresize-size"
19725 #: ../fish/guestfish-actions.pod:2654
19728 " ntfsresize-size device size\n"
19733 #: ../fish/guestfish-actions.pod:2656
19735 "This command is the same as C<ntfsresize> except that it allows you to "
19736 "specify the new size (in bytes) explicitly."
19740 #: ../fish/guestfish-actions.pod:2659
19745 #: ../fish/guestfish-actions.pod:2661
19748 " part-add device prlogex startsect endsect\n"
19753 #: ../fish/guestfish-actions.pod:2663
19755 "This command adds a partition to C<device>. If there is no partition table "
19756 "on the device, call C<part-init> first."
19760 #: ../fish/guestfish-actions.pod:2675
19762 "Creating a partition which covers the whole disk is not so easy. Use "
19763 "C<part-disk> to do that."
19767 #: ../fish/guestfish-actions.pod:2678
19772 #: ../fish/guestfish-actions.pod:2680
19775 " part-del device partnum\n"
19780 #: ../fish/guestfish-actions.pod:2688
19785 #: ../fish/guestfish-actions.pod:2690
19788 " part-disk device parttype\n"
19793 #: ../fish/guestfish-actions.pod:2692
19795 "This command is simply a combination of C<part-init> followed by C<part-add> "
19796 "to create a single primary partition covering the whole disk."
19800 #: ../fish/guestfish-actions.pod:2696
19802 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
19803 "possible values are described in C<part-init>."
19807 #: ../fish/guestfish-actions.pod:2702
19808 msgid "part-get-bootable"
19812 #: ../fish/guestfish-actions.pod:2704
19815 " part-get-bootable device partnum\n"
19820 #: ../fish/guestfish-actions.pod:2709
19821 msgid "See also C<part-set-bootable>."
19825 #: ../fish/guestfish-actions.pod:2711
19826 msgid "part-get-mbr-id"
19830 #: ../fish/guestfish-actions.pod:2713
19833 " part-get-mbr-id device partnum\n"
19838 #: ../fish/guestfish-actions.pod:2718 ../fish/guestfish-actions.pod:2856
19840 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
19841 "undefined results for other partition table types (see "
19842 "C<part-get-parttype>)."
19846 #: ../fish/guestfish-actions.pod:2722
19847 msgid "part-get-parttype"
19851 #: ../fish/guestfish-actions.pod:2724
19854 " part-get-parttype device\n"
19859 #: ../fish/guestfish-actions.pod:2729
19861 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
19862 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
19863 "possible, although unusual. See C<part-init> for a full list."
19867 #: ../fish/guestfish-actions.pod:2734
19872 #: ../fish/guestfish-actions.pod:2736
19875 " part-init device parttype\n"
19880 #: ../fish/guestfish-actions.pod:2742
19882 "Initially there are no partitions. Following this, you should call "
19883 "C<part-add> for each partition required."
19887 #: ../fish/guestfish-actions.pod:2805
19892 #: ../fish/guestfish-actions.pod:2807
19895 " part-list device\n"
19900 #: ../fish/guestfish-actions.pod:2822
19902 "Start of the partition I<in bytes>. To get sectors you have to divide by "
19903 "the device's sector size, see C<blockdev-getss>."
19907 #: ../fish/guestfish-actions.pod:2835
19908 msgid "part-set-bootable"
19912 #: ../fish/guestfish-actions.pod:2837
19915 " part-set-bootable device partnum true|false\n"
19920 #: ../fish/guestfish-actions.pod:2846
19921 msgid "part-set-mbr-id"
19925 #: ../fish/guestfish-actions.pod:2848
19928 " part-set-mbr-id device partnum idbyte\n"
19933 #: ../fish/guestfish-actions.pod:2860
19934 msgid "part-set-name"
19938 #: ../fish/guestfish-actions.pod:2862
19941 " part-set-name device partnum name\n"
19946 #: ../fish/guestfish-actions.pod:2870
19947 msgid "ping-daemon"
19951 #: ../fish/guestfish-actions.pod:2872
19959 #: ../fish/guestfish-actions.pod:2879
19964 #: ../fish/guestfish-actions.pod:2881
19967 " pread path count offset\n"
19972 #: ../fish/guestfish-actions.pod:2889
19973 msgid "See also C<pwrite>."
19977 #: ../fish/guestfish-actions.pod:2894
19982 #: ../fish/guestfish-actions.pod:2896
19985 " pvcreate device\n"
19990 #: ../fish/guestfish-actions.pod:2902
19995 #: ../fish/guestfish-actions.pod:2904
19998 " pvremove device\n"
20003 #: ../fish/guestfish-actions.pod:2913
20008 #: ../fish/guestfish-actions.pod:2915
20011 " pvresize device\n"
20016 #: ../fish/guestfish-actions.pod:2920
20017 msgid "pvresize-size"
20021 #: ../fish/guestfish-actions.pod:2922
20024 " pvresize-size device size\n"
20029 #: ../fish/guestfish-actions.pod:2924
20031 "This command is the same as C<pvresize> except that it allows you to specify "
20032 "the new size (in bytes) explicitly."
20036 #: ../fish/guestfish-actions.pod:2927
20041 #: ../fish/guestfish-actions.pod:2929
20049 #: ../fish/guestfish-actions.pod:2937
20050 msgid "See also C<pvs-full>."
20054 #: ../fish/guestfish-actions.pod:2939
20059 #: ../fish/guestfish-actions.pod:2941
20067 #: ../fish/guestfish-actions.pod:2946
20072 #: ../fish/guestfish-actions.pod:2948
20080 #: ../fish/guestfish-actions.pod:2952
20085 #: ../fish/guestfish-actions.pod:2954
20088 " pwrite path content offset\n"
20093 #: ../fish/guestfish-actions.pod:2965
20094 msgid "See also C<pread>."
20098 #: ../fish/guestfish-actions.pod:2970
20103 #: ../fish/guestfish-actions.pod:2972
20106 " read-file path\n"
20111 #: ../fish/guestfish-actions.pod:2977
20113 "Unlike C<cat>, this function can correctly handle files that contain "
20114 "embedded ASCII NUL characters. However unlike C<download>, this function is "
20115 "limited in the total size of file that can be handled."
20119 #: ../fish/guestfish-actions.pod:2985
20124 #: ../fish/guestfish-actions.pod:2987
20127 " read-lines path\n"
20132 #: ../fish/guestfish-actions.pod:2994
20134 "Note that this function cannot correctly handle binary files (specifically, "
20135 "files containing C<\\0> character which is treated as end of line). For "
20136 "those you need to use the C<read-file> function which has a more complex "
20141 #: ../fish/guestfish-actions.pod:2999
20146 #: ../fish/guestfish-actions.pod:3001
20154 #: ../fish/guestfish-actions.pod:3053
20156 "This function is primarily intended for use by programs. To get a simple "
20157 "list of names, use C<ls>. To get a printable directory for human "
20158 "consumption, use C<ll>."
20162 #: ../fish/guestfish-actions.pod:3057
20167 #: ../fish/guestfish-actions.pod:3059
20175 #: ../fish/guestfish-actions.pod:3063
20176 msgid "readlinklist"
20180 #: ../fish/guestfish-actions.pod:3065
20183 " readlinklist path 'names ...'\n"
20188 #: ../fish/guestfish-actions.pod:3089
20193 #: ../fish/guestfish-actions.pod:3091
20201 #: ../fish/guestfish-actions.pod:3096
20202 msgid "removexattr"
20206 #: ../fish/guestfish-actions.pod:3098
20209 " removexattr xattr path\n"
20214 #: ../fish/guestfish-actions.pod:3103
20215 msgid "See also: C<lremovexattr>, L<attr(5)>."
20219 #: ../fish/guestfish-actions.pod:3105
20224 #: ../fish/guestfish-actions.pod:3107
20227 " resize2fs device\n"
20232 #: ../fish/guestfish-actions.pod:3112
20234 "I<Note:> It is sometimes required that you run C<e2fsck-f> on the C<device> "
20235 "before calling this command. For unknown reasons C<resize2fs> sometimes "
20236 "gives an error about this and sometimes not. In any case, it is always safe "
20237 "to call C<e2fsck-f> before calling this function."
20241 #: ../fish/guestfish-actions.pod:3118
20242 msgid "resize2fs-size"
20246 #: ../fish/guestfish-actions.pod:3120
20249 " resize2fs-size device size\n"
20254 #: ../fish/guestfish-actions.pod:3122
20256 "This command is the same as C<resize2fs> except that it allows you to "
20257 "specify the new size (in bytes) explicitly."
20261 #: ../fish/guestfish-actions.pod:3125
20266 #: ../fish/guestfish-actions.pod:3127
20274 #: ../fish/guestfish-actions.pod:3131
20279 #: ../fish/guestfish-actions.pod:3133
20287 #: ../fish/guestfish-actions.pod:3139
20292 #: ../fish/guestfish-actions.pod:3141
20300 #: ../fish/guestfish-actions.pod:3145
20301 msgid "rmmountpoint"
20305 #: ../fish/guestfish-actions.pod:3147
20308 " rmmountpoint exemptpath\n"
20313 #: ../fish/guestfish-actions.pod:3149
20315 "This calls removes a mountpoint that was previously created with "
20316 "C<mkmountpoint>. See C<mkmountpoint> for full details."
20320 #: ../fish/guestfish-actions.pod:3153
20321 msgid "scrub-device"
20325 #: ../fish/guestfish-actions.pod:3155
20328 " scrub-device device\n"
20333 #: ../fish/guestfish-actions.pod:3166
20338 #: ../fish/guestfish-actions.pod:3168
20341 " scrub-file file\n"
20346 #: ../fish/guestfish-actions.pod:3178
20347 msgid "scrub-freespace"
20351 #: ../fish/guestfish-actions.pod:3180
20354 " scrub-freespace dir\n"
20359 #: ../fish/guestfish-actions.pod:3182
20361 "This command creates the directory C<dir> and then fills it with files until "
20362 "the filesystem is full, and scrubs the files as for C<scrub-file>, and "
20363 "deletes them. The intention is to scrub any free space on the partition "
20364 "containing C<dir>."
20368 #: ../fish/guestfish-actions.pod:3191
20369 msgid "set-append | append"
20373 #: ../fish/guestfish-actions.pod:3193
20376 " set-append append\n"
20381 #: ../fish/guestfish-actions.pod:3204
20382 msgid "set-autosync | autosync"
20386 #: ../fish/guestfish-actions.pod:3206
20389 " set-autosync true|false\n"
20394 #: ../fish/guestfish-actions.pod:3208
20396 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
20397 "effort attempt to run C<umount-all> followed by C<sync> when the handle is "
20398 "closed (also if the program exits without closing handles)."
20402 #: ../fish/guestfish-actions.pod:3216
20403 msgid "set-direct | direct"
20407 #: ../fish/guestfish-actions.pod:3218
20410 " set-direct true|false\n"
20415 #: ../fish/guestfish-actions.pod:3224
20417 "One consequence of this is that log messages aren't caught by the library "
20418 "and handled by C<set-log-message-callback>, but go straight to stdout."
20422 #: ../fish/guestfish-actions.pod:3233
20423 msgid "set-e2label"
20427 #: ../fish/guestfish-actions.pod:3235
20430 " set-e2label device label\n"
20435 #: ../fish/guestfish-actions.pod:3241
20437 "You can use either C<tune2fs-l> or C<get-e2label> to return the existing "
20438 "label on a filesystem."
20442 #: ../fish/guestfish-actions.pod:3244
20447 #: ../fish/guestfish-actions.pod:3246
20450 " set-e2uuid device uuid\n"
20455 #: ../fish/guestfish-actions.pod:3253
20457 "You can use either C<tune2fs-l> or C<get-e2uuid> to return the existing UUID "
20462 #: ../fish/guestfish-actions.pod:3256
20463 msgid "set-memsize | memsize"
20467 #: ../fish/guestfish-actions.pod:3258
20470 " set-memsize memsize\n"
20475 #: ../fish/guestfish-actions.pod:3260
20477 "This sets the memory size in megabytes allocated to the qemu subprocess. "
20478 "This only has any effect if called before C<launch>."
20482 #: ../fish/guestfish-actions.pod:3271
20483 msgid "set-network | network"
20487 #: ../fish/guestfish-actions.pod:3273
20490 " set-network true|false\n"
20495 #: ../fish/guestfish-actions.pod:3281
20496 msgid "You must call this before calling C<launch>, otherwise it has no effect."
20500 #: ../fish/guestfish-actions.pod:3284
20501 msgid "set-path | path"
20505 #: ../fish/guestfish-actions.pod:3286
20508 " set-path searchpath\n"
20513 #: ../fish/guestfish-actions.pod:3295
20514 msgid "set-qemu | qemu"
20518 #: ../fish/guestfish-actions.pod:3297
20526 #: ../fish/guestfish-actions.pod:3317
20527 msgid "set-recovery-proc | recovery-proc"
20531 #: ../fish/guestfish-actions.pod:3319
20534 " set-recovery-proc true|false\n"
20539 #: ../fish/guestfish-actions.pod:3321
20541 "If this is called with the parameter C<false> then C<launch> does not create "
20542 "a recovery process. The purpose of the recovery process is to stop runaway "
20543 "qemu processes in the case where the main program aborts abruptly."
20547 #: ../fish/guestfish-actions.pod:3326
20549 "This only has any effect if called before C<launch>, and the default is "
20554 #: ../fish/guestfish-actions.pod:3335
20555 msgid "set-selinux | selinux"
20559 #: ../fish/guestfish-actions.pod:3337
20562 " set-selinux true|false\n"
20567 #: ../fish/guestfish-actions.pod:3348
20568 msgid "set-trace | trace"
20572 #: ../fish/guestfish-actions.pod:3350
20575 " set-trace true|false\n"
20580 #: ../fish/guestfish-actions.pod:3366
20581 msgid "set-verbose | verbose"
20585 #: ../fish/guestfish-actions.pod:3368
20588 " set-verbose true|false\n"
20593 #: ../fish/guestfish-actions.pod:3375
20598 #: ../fish/guestfish-actions.pod:3377
20601 " setcon context\n"
20606 #: ../fish/guestfish-actions.pod:3384
20611 #: ../fish/guestfish-actions.pod:3386
20614 " setxattr xattr val vallen path\n"
20619 #: ../fish/guestfish-actions.pod:3392
20620 msgid "See also: C<lsetxattr>, L<attr(5)>."
20624 #: ../fish/guestfish-actions.pod:3394
20629 #: ../fish/guestfish-actions.pod:3396
20632 " sfdisk device cyls heads sectors 'lines ...'\n"
20637 #: ../fish/guestfish-actions.pod:3418
20638 msgid "See also: C<sfdisk-l>, C<sfdisk-N>, C<part-init>"
20642 #: ../fish/guestfish-actions.pod:3424
20647 #: ../fish/guestfish-actions.pod:3426
20650 " sfdiskM device 'lines ...'\n"
20655 #: ../fish/guestfish-actions.pod:3428
20657 "This is a simplified interface to the C<sfdisk> command, where partition "
20658 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
20659 "you don't need to specify the cyls, heads and sectors parameters which were "
20660 "rarely if ever used anyway."
20664 #: ../fish/guestfish-actions.pod:3434
20665 msgid "See also: C<sfdisk>, the L<sfdisk(8)> manpage and C<part-disk>"
20669 #: ../fish/guestfish-actions.pod:3440
20674 #: ../fish/guestfish-actions.pod:3442
20677 " sfdisk-N device partnum cyls heads sectors line\n"
20682 #: ../fish/guestfish-actions.pod:3447
20684 "For other parameters, see C<sfdisk>. You should usually pass C<0> for the "
20685 "cyls/heads/sectors parameters."
20689 #: ../fish/guestfish-actions.pod:3450
20690 msgid "See also: C<part-add>"
20694 #: ../fish/guestfish-actions.pod:3455
20695 msgid "sfdisk-disk-geometry"
20699 #: ../fish/guestfish-actions.pod:3457
20702 " sfdisk-disk-geometry device\n"
20707 #: ../fish/guestfish-actions.pod:3459
20709 "This displays the disk geometry of C<device> read from the partition table. "
20710 "Especially in the case where the underlying block device has been resized, "
20711 "this can be different from the kernel's idea of the geometry (see "
20712 "C<sfdisk-kernel-geometry>)."
20716 #: ../fish/guestfish-actions.pod:3467
20717 msgid "sfdisk-kernel-geometry"
20721 #: ../fish/guestfish-actions.pod:3469
20724 " sfdisk-kernel-geometry device\n"
20729 #: ../fish/guestfish-actions.pod:3476
20734 #: ../fish/guestfish-actions.pod:3478
20737 " sfdisk-l device\n"
20742 #: ../fish/guestfish-actions.pod:3484
20743 msgid "See also: C<part-list>"
20747 #: ../fish/guestfish-actions.pod:3486
20752 #: ../fish/guestfish-actions.pod:3488
20760 #: ../fish/guestfish-actions.pod:3493
20761 msgid "This is like C<command>, but passes the command to:"
20765 #: ../fish/guestfish-actions.pod:3501
20766 msgid "All the provisos about C<command> apply to this call."
20770 #: ../fish/guestfish-actions.pod:3503
20775 #: ../fish/guestfish-actions.pod:3505
20778 " sh-lines command\n"
20783 #: ../fish/guestfish-actions.pod:3507
20784 msgid "This is the same as C<sh>, but splits the result into a list of lines."
20788 #: ../fish/guestfish-actions.pod:3510
20789 msgid "See also: C<command-lines>"
20793 #: ../fish/guestfish-actions.pod:3512
20798 #: ../fish/guestfish-actions.pod:3514
20806 #: ../fish/guestfish-actions.pod:3518
20811 #: ../fish/guestfish-actions.pod:3520
20819 #: ../fish/guestfish-actions.pod:3526
20824 #: ../fish/guestfish-actions.pod:3528
20832 #: ../fish/guestfish-actions.pod:3536
20837 #: ../fish/guestfish-actions.pod:3538
20845 #: ../fish/guestfish-actions.pod:3546
20850 #: ../fish/guestfish-actions.pod:3548
20853 " strings-e encoding path\n"
20858 #: ../fish/guestfish-actions.pod:3550
20860 "This is like the C<strings> command, but allows you to specify the encoding "
20861 "of strings that are looked for in the source file C<path>."
20865 #: ../fish/guestfish-actions.pod:3560
20867 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
20868 "ISO-8859-X (this is what C<strings> uses)."
20872 #: ../fish/guestfish-actions.pod:3592
20873 msgid "swapoff-device"
20877 #: ../fish/guestfish-actions.pod:3594
20880 " swapoff-device device\n"
20885 #: ../fish/guestfish-actions.pod:3596
20887 "This command disables the libguestfs appliance swap device or partition "
20888 "named C<device>. See C<swapon-device>."
20892 #: ../fish/guestfish-actions.pod:3600
20893 msgid "swapoff-file"
20897 #: ../fish/guestfish-actions.pod:3602
20900 " swapoff-file file\n"
20905 #: ../fish/guestfish-actions.pod:3606
20906 msgid "swapoff-label"
20910 #: ../fish/guestfish-actions.pod:3608
20913 " swapoff-label label\n"
20918 #: ../fish/guestfish-actions.pod:3613
20919 msgid "swapoff-uuid"
20923 #: ../fish/guestfish-actions.pod:3615
20926 " swapoff-uuid uuid\n"
20931 #: ../fish/guestfish-actions.pod:3620
20932 msgid "swapon-device"
20936 #: ../fish/guestfish-actions.pod:3622
20939 " swapon-device device\n"
20944 #: ../fish/guestfish-actions.pod:3624
20946 "This command enables the libguestfs appliance to use the swap device or "
20947 "partition named C<device>. The increased memory is made available for all "
20948 "commands, for example those run using C<command> or C<sh>."
20952 #: ../fish/guestfish-actions.pod:3636
20953 msgid "swapon-file"
20957 #: ../fish/guestfish-actions.pod:3638
20960 " swapon-file file\n"
20965 #: ../fish/guestfish-actions.pod:3640
20966 msgid "This command enables swap to a file. See C<swapon-device> for other notes."
20970 #: ../fish/guestfish-actions.pod:3643
20971 msgid "swapon-label"
20975 #: ../fish/guestfish-actions.pod:3645
20978 " swapon-label label\n"
20983 #: ../fish/guestfish-actions.pod:3647
20985 "This command enables swap to a labeled swap partition. See C<swapon-device> "
20990 #: ../fish/guestfish-actions.pod:3650
20991 msgid "swapon-uuid"
20995 #: ../fish/guestfish-actions.pod:3652
20998 " swapon-uuid uuid\n"
21003 #: ../fish/guestfish-actions.pod:3654
21005 "This command enables swap to a swap partition with the given UUID. See "
21006 "C<swapon-device> for other notes."
21010 #: ../fish/guestfish-actions.pod:3657
21015 #: ../fish/guestfish-actions.pod:3659
21023 #: ../fish/guestfish-actions.pod:3667
21028 #: ../fish/guestfish-actions.pod:3669
21036 #: ../fish/guestfish-actions.pod:3677
21041 #: ../fish/guestfish-actions.pod:3679
21044 " tail-n nrlines path\n"
21049 #: ../fish/guestfish-actions.pod:3692
21054 #: ../fish/guestfish-actions.pod:3694
21057 " tar-in (tarfile|-) directory\n"
21062 #: ../fish/guestfish-actions.pod:3699
21063 msgid "To upload a compressed tarball, use C<tgz-in> or C<txz-in>."
21067 #: ../fish/guestfish-actions.pod:3704
21072 #: ../fish/guestfish-actions.pod:3706
21075 " tar-out directory (tarfile|-)\n"
21080 #: ../fish/guestfish-actions.pod:3711
21081 msgid "To download a compressed tarball, use C<tgz-out> or C<txz-out>."
21085 #: ../fish/guestfish-actions.pod:3716
21090 #: ../fish/guestfish-actions.pod:3718
21093 " tgz-in (tarball|-) directory\n"
21098 #: ../fish/guestfish-actions.pod:3723
21099 msgid "To upload an uncompressed tarball, use C<tar-in>."
21103 #: ../fish/guestfish-actions.pod:3727
21108 #: ../fish/guestfish-actions.pod:3729
21111 " tgz-out directory (tarball|-)\n"
21116 #: ../fish/guestfish-actions.pod:3734
21117 msgid "To download an uncompressed tarball, use C<tar-out>."
21121 #: ../fish/guestfish-actions.pod:3738
21126 #: ../fish/guestfish-actions.pod:3740
21134 #: ../fish/guestfish-actions.pod:3749
21139 #: ../fish/guestfish-actions.pod:3751
21147 #: ../fish/guestfish-actions.pod:3756
21148 msgid "truncate-size"
21152 #: ../fish/guestfish-actions.pod:3758
21155 " truncate-size path size\n"
21160 #: ../fish/guestfish-actions.pod:3763
21162 "If the current file size is less than C<size> then the file is extended to "
21163 "the required size with zero bytes. This creates a sparse file (ie. disk "
21164 "blocks are not allocated for the file until you write to it). To create a "
21165 "non-sparse file of zeroes, use C<fallocate64> instead."
21169 #: ../fish/guestfish-actions.pod:3769
21174 #: ../fish/guestfish-actions.pod:3771
21177 " tune2fs-l device\n"
21182 #: ../fish/guestfish-actions.pod:3781
21187 #: ../fish/guestfish-actions.pod:3783
21190 " txz-in (tarball|-) directory\n"
21195 #: ../fish/guestfish-actions.pod:3790
21200 #: ../fish/guestfish-actions.pod:3792
21203 " txz-out directory (tarball|-)\n"
21208 #: ../fish/guestfish-actions.pod:3799
21213 #: ../fish/guestfish-actions.pod:3801
21221 #: ../fish/guestfish-actions.pod:3815
21222 msgid "See also C<get-umask>, L<umask(2)>, C<mknod>, C<mkdir>."
21226 #: ../fish/guestfish-actions.pod:3820
21227 msgid "umount | unmount"
21231 #: ../fish/guestfish-actions.pod:3822
21234 " umount pathordevice\n"
21239 #: ../fish/guestfish-actions.pod:3828
21240 msgid "umount-all | unmount-all"
21244 #: ../fish/guestfish-actions.pod:3830
21252 #: ../fish/guestfish-actions.pod:3836
21257 #: ../fish/guestfish-actions.pod:3838
21260 " upload (filename|-) remotefilename\n"
21265 #: ../fish/guestfish-actions.pod:3845
21266 msgid "See also C<download>."
21270 #: ../fish/guestfish-actions.pod:3849
21275 #: ../fish/guestfish-actions.pod:3851
21278 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
21283 #: ../fish/guestfish-actions.pod:3870
21288 #: ../fish/guestfish-actions.pod:3872
21296 #: ../fish/guestfish-actions.pod:3899
21298 "I<Note:> Don't use this call to test for availability of features. In "
21299 "enterprise distributions we backport features from later versions into "
21300 "earlier versions, making this an unreliable way to test for features. Use "
21301 "C<available> instead."
21305 #: ../fish/guestfish-actions.pod:3905
21310 #: ../fish/guestfish-actions.pod:3907
21313 " vfs-label device\n"
21318 #: ../fish/guestfish-actions.pod:3914
21319 msgid "To find a filesystem from the label, use C<findfs-label>."
21323 #: ../fish/guestfish-actions.pod:3916
21328 #: ../fish/guestfish-actions.pod:3918
21331 " vfs-type device\n"
21336 #: ../fish/guestfish-actions.pod:3928
21341 #: ../fish/guestfish-actions.pod:3930
21344 " vfs-uuid device\n"
21349 #: ../fish/guestfish-actions.pod:3937
21350 msgid "To find a filesystem from the UUID, use C<findfs-uuid>."
21354 #: ../fish/guestfish-actions.pod:3939
21355 msgid "vg-activate"
21359 #: ../fish/guestfish-actions.pod:3941
21362 " vg-activate true|false 'volgroups ...'\n"
21367 #: ../fish/guestfish-actions.pod:3954
21368 msgid "vg-activate-all"
21372 #: ../fish/guestfish-actions.pod:3956
21375 " vg-activate-all true|false\n"
21380 #: ../fish/guestfish-actions.pod:3966
21385 #: ../fish/guestfish-actions.pod:3968
21388 " vgcreate volgroup 'physvols ...'\n"
21393 #: ../fish/guestfish-actions.pod:3973
21398 #: ../fish/guestfish-actions.pod:3975
21401 " vglvuuids vgname\n"
21406 #: ../fish/guestfish-actions.pod:3980
21408 "You can use this along with C<lvs> and C<lvuuid> calls to associate logical "
21409 "volumes and volume groups."
21413 #: ../fish/guestfish-actions.pod:3983
21414 msgid "See also C<vgpvuuids>."
21418 #: ../fish/guestfish-actions.pod:3985
21423 #: ../fish/guestfish-actions.pod:3987
21426 " vgpvuuids vgname\n"
21431 #: ../fish/guestfish-actions.pod:3992
21433 "You can use this along with C<pvs> and C<pvuuid> calls to associate physical "
21434 "volumes and volume groups."
21438 #: ../fish/guestfish-actions.pod:3995
21439 msgid "See also C<vglvuuids>."
21443 #: ../fish/guestfish-actions.pod:3997
21448 #: ../fish/guestfish-actions.pod:3999
21451 " vgremove vgname\n"
21456 #: ../fish/guestfish-actions.pod:4006
21461 #: ../fish/guestfish-actions.pod:4008
21464 " vgrename volgroup newvolgroup\n"
21469 #: ../fish/guestfish-actions.pod:4012
21474 #: ../fish/guestfish-actions.pod:4014
21482 #: ../fish/guestfish-actions.pod:4022
21483 msgid "See also C<vgs-full>."
21487 #: ../fish/guestfish-actions.pod:4024
21492 #: ../fish/guestfish-actions.pod:4026
21500 #: ../fish/guestfish-actions.pod:4031
21505 #: ../fish/guestfish-actions.pod:4033
21513 #: ../fish/guestfish-actions.pod:4038
21518 #: ../fish/guestfish-actions.pod:4040
21526 #: ../fish/guestfish-actions.pod:4044
21531 #: ../fish/guestfish-actions.pod:4046
21539 #: ../fish/guestfish-actions.pod:4051
21544 #: ../fish/guestfish-actions.pod:4053
21552 #: ../fish/guestfish-actions.pod:4058
21557 #: ../fish/guestfish-actions.pod:4060
21565 #: ../fish/guestfish-actions.pod:4065
21570 #: ../fish/guestfish-actions.pod:4067
21573 " write path content\n"
21578 #: ../fish/guestfish-actions.pod:4075
21583 #: ../fish/guestfish-actions.pod:4077
21586 " write-file path content size\n"
21591 #: ../fish/guestfish-actions.pod:4100
21596 #: ../fish/guestfish-actions.pod:4102
21599 " zegrep regex path\n"
21604 #: ../fish/guestfish-actions.pod:4110
21609 #: ../fish/guestfish-actions.pod:4112
21612 " zegrepi regex path\n"
21617 #: ../fish/guestfish-actions.pod:4120
21622 #: ../fish/guestfish-actions.pod:4122
21630 #: ../fish/guestfish-actions.pod:4130
21631 msgid "See also: C<zero-device>, C<scrub-device>."
21635 #: ../fish/guestfish-actions.pod:4132
21636 msgid "zero-device"
21640 #: ../fish/guestfish-actions.pod:4134
21643 " zero-device device\n"
21648 #: ../fish/guestfish-actions.pod:4136
21650 "This command writes zeroes over the entire C<device>. Compare with C<zero> "
21651 "which just zeroes the first few blocks of a device."
21655 #: ../fish/guestfish-actions.pod:4143
21660 #: ../fish/guestfish-actions.pod:4145
21663 " zerofree device\n"
21668 #: ../fish/guestfish-actions.pod:4158
21673 #: ../fish/guestfish-actions.pod:4160
21676 " zfgrep pattern path\n"
21681 #: ../fish/guestfish-actions.pod:4168
21686 #: ../fish/guestfish-actions.pod:4170
21689 " zfgrepi pattern path\n"
21694 #: ../fish/guestfish-actions.pod:4178
21699 #: ../fish/guestfish-actions.pod:4180
21702 " zfile meth path\n"
21707 #: ../fish/guestfish-actions.pod:4187
21708 msgid "Since 1.0.63, use C<file> instead which can now process compressed files."
21712 #: ../fish/guestfish-actions.pod:4197
21717 #: ../fish/guestfish-actions.pod:4199
21720 " zgrep regex path\n"
21725 #: ../fish/guestfish-actions.pod:4207
21730 #: ../fish/guestfish-actions.pod:4209
21733 " zgrepi regex path\n"
21738 #: ../test-tool/libguestfs-test-tool.pod:5
21739 msgid "libguestfs-test-tool - End user tests for libguestfs"
21743 #: ../test-tool/libguestfs-test-tool.pod:9
21746 " libguestfs-test-tool [--options]\n"
21751 #: ../test-tool/libguestfs-test-tool.pod:13
21753 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
21754 "and developers, to allow them to check basic libguestfs functionality is "
21755 "working. This is needed because libguestfs occasionally breaks for reasons "
21756 "beyond our control: usually because of changes in the underlying qemu or "
21757 "kernel packages, or the host environment."
21761 #: ../test-tool/libguestfs-test-tool.pod:20
21762 msgid "If you suspect a problem in libguestfs, then just run:"
21766 #: ../test-tool/libguestfs-test-tool.pod:22
21769 " libguestfs-test-tool\n"
21774 #: ../test-tool/libguestfs-test-tool.pod:24
21775 msgid "It will print lots of diagnostic messages."
21779 #: ../test-tool/libguestfs-test-tool.pod:26
21780 msgid "If it runs to completion successfully, you will see this near the end:"
21784 #: ../test-tool/libguestfs-test-tool.pod:28
21787 " ===== TEST FINISHED OK =====\n"
21792 #: ../test-tool/libguestfs-test-tool.pod:30
21793 msgid "and the test tool will exit with code 0."
21797 #: ../test-tool/libguestfs-test-tool.pod:32
21799 "If it fails (and/or exits with non-zero error code), please paste the "
21800 "B<complete, unedited> output of the test tool into a bug report. More "
21801 "information about reporting bugs can be found on the "
21802 "L<http://libguestfs.org/> website."
21806 #: ../test-tool/libguestfs-test-tool.pod:41
21811 #: ../test-tool/libguestfs-test-tool.pod:43
21812 msgid "Display short usage information and exit."
21816 #: ../test-tool/libguestfs-test-tool.pod:45
21817 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
21821 #: ../test-tool/libguestfs-test-tool.pod:47
21823 "Pass an alternate name for the helper program. libguestfs-test-tool will "
21824 "normally look in the C<$libexec> directory that was configured when the tool "
21829 #: ../test-tool/libguestfs-test-tool.pod:51
21830 msgid "I<--qemu qemu_binary>"
21834 #: ../test-tool/libguestfs-test-tool.pod:53
21836 "If you have downloaded another qemu binary, point this option at the full "
21837 "path of the binary to try it."
21841 #: ../test-tool/libguestfs-test-tool.pod:56
21842 msgid "I<--qemudir qemu_source_dir>"
21846 #: ../test-tool/libguestfs-test-tool.pod:58
21848 "If you have compiled qemu from source, point this option at the source "
21849 "directory to try it."
21853 #: ../test-tool/libguestfs-test-tool.pod:61
21854 msgid "I<--timeout N>"
21858 #: ../test-tool/libguestfs-test-tool.pod:63
21860 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
21861 "does not usually need to be adjusted unless your machine is very slow."
21865 #: ../test-tool/libguestfs-test-tool.pod:69
21866 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
21870 #: ../test-tool/libguestfs-test-tool.pod:71
21872 "If you have compiled another version of qemu from source and would like to "
21873 "try that, then you can use the I<--qemudir> option to point to the qemu "
21874 "source directory."
21878 #: ../test-tool/libguestfs-test-tool.pod:75
21880 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
21881 "option to point to the binary."
21885 #: ../test-tool/libguestfs-test-tool.pod:78
21887 "When using an alternate qemu with libguestfs, usually you would need to "
21888 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in "
21889 "L<guestfs(3)>). libguestfs-test-tool writes a temporary qemu wrapper script "
21890 "when you use either of the I<--qemudir> or I<--qemu> options."
21894 #: ../test-tool/libguestfs-test-tool.pod:85
21896 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
21897 "I<1> if there was an error."
21901 #: ../test-tool/libguestfs-test-tool.pod:92
21902 msgid "/usr/libexec/libguestfs-test-tool-helper"
21906 #: ../test-tool/libguestfs-test-tool.pod:94
21908 "This helper program is run inside the appliance and provides additional "
21913 #: ../test-tool/libguestfs-test-tool.pod:97
21914 msgid "/usr/bin/mkisofs"
21918 #: ../test-tool/libguestfs-test-tool.pod:99
21920 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
21921 "which is used as part of the tests."
21925 #: ../test-tool/libguestfs-test-tool.pod:106
21927 "For the full list of environment variables which may affect libguestfs, "
21928 "please see the L<guestfs(3)> manual page."
21932 #: ../test-tool/libguestfs-test-tool.pod:111
21933 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
21937 #: ../test-tool/libguestfs-test-tool.pod:121 ../fuse/guestmount.pod:195
21938 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
21942 #: ../fuse/guestmount.pod:5
21943 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
21947 #: ../fuse/guestmount.pod:9
21950 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
21955 #: ../fuse/guestmount.pod:13
21957 "You must I<not> use C<guestmount> in read-write mode on live virtual "
21958 "machines. If you do this, you risk disk corruption in the VM."
21962 #: ../fuse/guestmount.pod:18
21964 "The guestmount program can be used to mount virtual machine filesystems and "
21965 "other disk images on the host. It uses libguestfs for access to the guest "
21966 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
21967 "a mountable device."
21971 #: ../fuse/guestmount.pod:23
21973 "Along with other options, you have to give at least one device (I<-a> "
21974 "option) and at least one mountpoint (I<-m> option). How this works is "
21975 "better explained in the L<guestfish(1)> manual page, or you can use "
21976 "L<virt-inspector(1)> and/or the wrapper script C<guestmount-wrapper> to help "
21981 #: ../fuse/guestmount.pod:29
21983 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
21984 "by you, and the filesystem will not be visible to any other users unless you "
21985 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
21986 "the filesystem, use the C<fusermount -u> command."
21990 #: ../fuse/guestmount.pod:37
21992 "For a typical Windows guest which has its main filesystem on the first "
21997 #: ../fuse/guestmount.pod:40
22000 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
22005 #: ../fuse/guestmount.pod:42
22007 "For a typical Linux guest which has a /boot filesystem on the first "
22008 "partition, and the root filesystem on a logical volume:"
22012 #: ../fuse/guestmount.pod:45
22015 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
22020 #: ../fuse/guestmount.pod:47
22022 "To get L<virt-inspector(1)> to do the hard work of detecting guest "
22023 "mountpoints for you:"
22027 #: ../fuse/guestmount.pod:50
22030 " guestmount $(virt-inspector --ro-fish MyGuest) /mnt\n"
22035 #: ../fuse/guestmount.pod:52
22037 "(or use --fish if you don't want it to be a read only mount). The option is "
22038 "called I<--ro-fish> or I<--fish> because these parameters are compatible "
22039 "with L<guestfish(1)>."
22043 #: ../fuse/guestmount.pod:56
22045 "If you don't know what filesystems are contained in a guest or disk image, "
22046 "use L<virt-list-filesystems(1)> first:"
22050 #: ../fuse/guestmount.pod:59
22053 " virt-list-filesystems MyGuest\n"
22058 #: ../fuse/guestmount.pod:61
22060 "If you want to trace the libguestfs calls but without excessive debugging, "
22065 #: ../fuse/guestmount.pod:64
22068 " guestmount [-a ... -m ...] --trace /mnt\n"
22073 #: ../fuse/guestmount.pod:66
22074 msgid "If you want to debug the program, we recommend:"
22078 #: ../fuse/guestmount.pod:68
22081 " guestmount [-a ... -m ...] --trace --verbose /mnt\n"
22086 #: ../fuse/guestmount.pod:76
22087 msgid "Add a block device or virtual machine image."
22091 #: ../fuse/guestmount.pod:78
22092 msgid "B<--dir-cache-timeout N>"
22096 #: ../fuse/guestmount.pod:80
22098 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
22099 "seconds. The readdir cache [actually, there are several semi-independent "
22100 "caches] is populated after a readdir(2) call with the stat and extended "
22101 "attributes of the files in the directory, in anticipation that they will be "
22102 "requested soon after."
22106 #: ../fuse/guestmount.pod:86
22108 "There is also a different attribute cache implemented by FUSE (see the FUSE "
22109 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
22110 "requests, only cache existing ones."
22114 #: ../fuse/guestmount.pod:90
22115 msgid "B<--fuse-help>"
22119 #: ../fuse/guestmount.pod:92
22120 msgid "Display help on special FUSE options (see I<-o> below)."
22124 #: ../fuse/guestmount.pod:96
22125 msgid "Display brief help and exit."
22129 #: ../fuse/guestmount.pod:98
22130 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
22134 #: ../fuse/guestmount.pod:100
22136 "Mount the named partition or logical volume on the given mountpoint B<in the "
22137 "guest> (this has nothing to do with mountpoints in the host)."
22141 #: ../fuse/guestmount.pod:103
22143 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
22144 "something on C</>."
22148 #: ../fuse/guestmount.pod:108
22150 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
22151 "unmounted. If you specify this option, then we don't attempt to sync the "
22152 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
22156 #: ../fuse/guestmount.pod:113
22157 msgid "B<-o option> | B<--option option>"
22161 #: ../fuse/guestmount.pod:115
22162 msgid "Pass extra options to FUSE."
22166 #: ../fuse/guestmount.pod:117
22168 "To get a list of all the extra options supported by FUSE, use the command "
22169 "below. Note that only the FUSE I<-o> options can be passed, and only some "
22170 "of them are a good idea."
22174 #: ../fuse/guestmount.pod:121
22177 " guestmount --fuse-help\n"
22182 #: ../fuse/guestmount.pod:123
22183 msgid "Some potentially useful FUSE options:"
22187 #: ../fuse/guestmount.pod:127
22188 msgid "B<-o allow_other>"
22192 #: ../fuse/guestmount.pod:129
22193 msgid "Allow other users to see the filesystem."
22197 #: ../fuse/guestmount.pod:131
22198 msgid "B<-o attr_timeout=N>"
22202 #: ../fuse/guestmount.pod:133
22203 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
22207 #: ../fuse/guestmount.pod:135
22208 msgid "B<-o kernel_cache>"
22212 #: ../fuse/guestmount.pod:137
22214 "Allow the kernel to cache files (reduces the number of reads that have to go "
22215 "through the L<guestfs(3)> API). This is generally a good idea if you can "
22216 "afford the extra memory usage."
22220 #: ../fuse/guestmount.pod:141
22221 msgid "B<-o uid=N> B<-o gid=N>"
22225 #: ../fuse/guestmount.pod:143
22227 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
22228 "the chosen values."
22232 #: ../fuse/guestmount.pod:150
22234 "Add devices and mount everything read-only. Also disallow writes and make "
22235 "the disk appear read-only to FUSE."
22239 #: ../fuse/guestmount.pod:153
22241 "This is highly recommended if you are not going to edit the guest disk. If "
22242 "the guest is running and this option is I<not> supplied, then there is a "
22243 "strong risk of disk corruption in the guest. We try to prevent this from "
22244 "happening, but it is not always possible."
22248 #: ../fuse/guestmount.pod:160
22249 msgid "Enable SELinux support for the guest."
22253 #: ../fuse/guestmount.pod:162
22258 #: ../fuse/guestmount.pod:164
22259 msgid "Trace libguestfs calls (to stderr)."
22263 #: ../fuse/guestmount.pod:166
22264 msgid "This also stops the daemon from forking into the background."
22268 #: ../fuse/guestmount.pod:170
22269 msgid "Enable verbose messages from underlying libguestfs."
22273 #: ../fuse/guestmount.pod:174
22274 msgid "Display the program version and exit."
22278 #: ../fuse/guestmount.pod:180
22280 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
22281 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
22282 "L<http://fuse.sf.net/>."
22286 #: ../inspector/virt-inspector.pl:40
22288 "virt-inspector - Display OS version, kernel, drivers, mount points, "
22289 "applications, etc. in a virtual machine"
22293 #: ../inspector/virt-inspector.pl:44
22296 " virt-inspector [--connect URI] domname\n"
22301 #: ../inspector/virt-inspector.pl:46
22304 " virt-inspector guest.img [guest.img ...]\n"
22309 #: ../inspector/virt-inspector.pl:50
22311 "B<virt-inspector> examines a virtual machine and tries to determine the "
22312 "version of the OS, the kernel version, what drivers are installed, whether "
22313 "the virtual machine is fully virtualized (FV) or para-virtualized (PV), what "
22314 "applications are installed and more."
22318 #: ../inspector/virt-inspector.pl:55
22320 "Virt-inspector can produce output in several formats, including a readable "
22321 "text report, and XML for feeding into other programs."
22325 #: ../inspector/virt-inspector.pl:58
22327 "In the normal usage, use C<virt-inspector domname> where C<domname> is the "
22328 "libvirt domain (see: C<virsh list --all>)."
22332 #: ../inspector/virt-inspector.pl:61
22334 "You can also run virt-inspector directly on disk images from a single "
22335 "virtual machine. Use C<virt-inspector guest.img>. In rare cases a domain "
22336 "has several block devices, in which case you should list them one after "
22337 "another, with the first corresponding to the guest's C</dev/sda>, the second "
22338 "to the guest's C</dev/sdb> and so on."
22342 #: ../inspector/virt-inspector.pl:67
22344 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
22345 "inspect several virtual machines, you have to run virt-inspector several "
22346 "times (for example, from a shell script for-loop)."
22350 #: ../inspector/virt-inspector.pl:72
22352 "Because virt-inspector needs direct access to guest images, it won't "
22353 "normally work over remote libvirt connections."
22357 #: ../inspector/virt-inspector.pl:85 ../tools/virt-cat.pl:90 ../tools/virt-df.pl:81 ../tools/virt-edit.pl:83 ../tools/virt-list-filesystems.pl:60 ../tools/virt-list-partitions.pl:61 ../tools/virt-ls.pl:89 ../tools/virt-make-fs.pl:163 ../tools/virt-rescue.pl:113 ../tools/virt-tar.pl:109 ../tools/virt-win-reg.pl:182
22358 msgid "Display brief help."
22362 #: ../inspector/virt-inspector.pl:91 ../tools/virt-cat.pl:96 ../tools/virt-df.pl:87 ../tools/virt-edit.pl:89 ../tools/virt-list-filesystems.pl:66 ../tools/virt-list-partitions.pl:67 ../tools/virt-ls.pl:95 ../tools/virt-make-fs.pl:169 ../tools/virt-rescue.pl:119 ../tools/virt-resize.pl:249 ../tools/virt-tar.pl:115 ../tools/virt-win-reg.pl:188
22363 msgid "B<--version>"
22367 #: ../inspector/virt-inspector.pl:93 ../tools/virt-cat.pl:98 ../tools/virt-df.pl:89 ../tools/virt-edit.pl:91 ../tools/virt-list-filesystems.pl:68 ../tools/virt-list-partitions.pl:69 ../tools/virt-ls.pl:97 ../tools/virt-make-fs.pl:171 ../tools/virt-rescue.pl:121 ../tools/virt-resize.pl:251 ../tools/virt-tar.pl:117 ../tools/virt-win-reg.pl:190
22368 msgid "Display version number and exit."
22372 #: ../inspector/virt-inspector.pl:99 ../tools/virt-cat.pl:104 ../tools/virt-df.pl:95 ../tools/virt-edit.pl:113 ../tools/virt-list-filesystems.pl:74 ../tools/virt-list-partitions.pl:75 ../tools/virt-ls.pl:103 ../tools/virt-rescue.pl:135 ../tools/virt-tar.pl:123 ../tools/virt-win-reg.pl:204
22373 msgid "B<--connect URI> | B<-c URI>"
22377 #: ../inspector/virt-inspector.pl:101 ../tools/virt-cat.pl:106 ../tools/virt-df.pl:97 ../tools/virt-edit.pl:115 ../tools/virt-list-filesystems.pl:76 ../tools/virt-list-partitions.pl:77 ../tools/virt-ls.pl:105 ../tools/virt-rescue.pl:137 ../tools/virt-tar.pl:125 ../tools/virt-win-reg.pl:206
22379 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
22380 "to the default libvirt hypervisor."
22384 #: ../inspector/virt-inspector.pl:104
22386 "Libvirt is only used if you specify a C<domname> on the command line. If "
22387 "you specify guest block devices directly, then libvirt is not used at all."
22391 #: ../inspector/virt-inspector.pl:114
22393 "The following options select the output format. Use only one of them. The "
22394 "default is a readable text report."
22398 #: ../inspector/virt-inspector.pl:119
22399 msgid "B<--text> (default)"
22403 #: ../inspector/virt-inspector.pl:121
22404 msgid "Plain text report."
22408 #: ../inspector/virt-inspector.pl:123
22413 #: ../inspector/virt-inspector.pl:125
22414 msgid "Produce no output at all."
22418 #: ../inspector/virt-inspector.pl:127
22423 #: ../inspector/virt-inspector.pl:129
22425 "If you select I<--xml> then you get XML output which can be fed to other "
22430 #: ../inspector/virt-inspector.pl:132
22435 #: ../inspector/virt-inspector.pl:134
22437 "If you select I<--yaml> then you get YAML output which can be fed to other "
22442 #: ../inspector/virt-inspector.pl:137
22447 #: ../inspector/virt-inspector.pl:139
22449 "If you select I<--perl> then you get Perl structures output which can be "
22450 "used directly in another Perl program."
22454 #: ../inspector/virt-inspector.pl:142
22459 #: ../inspector/virt-inspector.pl:144
22460 msgid "B<--ro-fish>"
22464 #: ../inspector/virt-inspector.pl:146
22466 "If you select I<--fish> then we print a L<guestfish(1)> command line which "
22467 "will automatically mount up the filesystems on the correct mount points. "
22468 "Try this for example:"
22472 #: ../inspector/virt-inspector.pl:150
22475 " guestfish $(virt-inspector --fish guest.img)\n"
22480 #: ../inspector/virt-inspector.pl:152
22482 "I<--ro-fish> is the same, but the I<--ro> option is passed to guestfish so "
22483 "that the filesystems are mounted read-only."
22487 #: ../inspector/virt-inspector.pl:155
22492 #: ../inspector/virt-inspector.pl:157
22494 "In \"query mode\" we answer common questions about the guest, such as "
22495 "whether it is fullvirt or needs a Xen hypervisor to run."
22499 #: ../inspector/virt-inspector.pl:160
22500 msgid "See section I<QUERY MODE> below."
22504 #: ../inspector/virt-inspector.pl:166
22505 msgid "B<--windows-registry>"
22509 #: ../inspector/virt-inspector.pl:168
22511 "This flag is ignored for compatibility with earlier releases of the "
22516 #: ../inspector/virt-inspector.pl:171
22518 "In this version, if L<Win::Hivex(3)> is available, then we attempt to parse "
22519 "information out of the Registry for any Windows guest."
22523 #: ../inspector/virt-inspector.pl:218
22524 msgid "OUTPUT FORMAT"
22528 #: ../inspector/virt-inspector.pl:220
22531 " Operating system(s)\n"
22532 " -------------------\n"
22533 " Linux (distro + version)\n"
22534 " Windows (version)\n"
22537 " +--- Filesystems ---------- Installed apps --- Kernel & drivers\n"
22538 " ----------- -------------- ----------------\n"
22539 " mount point => device List of apps Extra information\n"
22540 " mount point => device and versions about kernel(s)\n"
22541 " ... and drivers\n"
22542 " swap => swap device\n"
22543 " (plus lots of extra information\n"
22544 " about each filesystem)\n"
22549 #: ../inspector/virt-inspector.pl:235
22550 msgid "The output of virt-inspector is a complex two-level data structure."
22554 #: ../inspector/virt-inspector.pl:237
22556 "At the top level is a list of the operating systems installed on the guest. "
22557 "(For the vast majority of guests, only a single OS is installed.) The data "
22558 "returned for the OS includes the name (Linux, Windows), the distribution and "
22563 #: ../inspector/virt-inspector.pl:242
22564 msgid "The diagram above shows what we return for each OS."
22568 #: ../inspector/virt-inspector.pl:244
22570 "With the I<--xml> option the output is mapped into an XML document. There "
22571 "is a RELAX-NG schema for this XML in the file I<virt-inspector.rng> which "
22572 "normally ships with virt-inspector, or can be found in the source."
22576 #: ../inspector/virt-inspector.pl:249
22578 "With the I<--fish> or I<--ro-fish> option the mount points are mapped to "
22579 "L<guestfish(1)> command line parameters, so that you can go in afterwards "
22580 "and inspect the guest with everything mounted in the right place. For "
22585 #: ../inspector/virt-inspector.pl:254
22588 " guestfish $(virt-inspector --ro-fish guest.img)\n"
22589 " ==> guestfish --ro -a guest.img -m /dev/VG/LV:/ -m /dev/sda1:/boot\n"
22594 #: ../inspector/virt-inspector.pl:589
22599 #: ../inspector/virt-inspector.pl:591
22601 "When you use C<virt-inspector --query>, the output is a series of lines of "
22606 #: ../inspector/virt-inspector.pl:594
22612 " xen_pv_drivers=no\n"
22617 #: ../inspector/virt-inspector.pl:599
22619 "(each answer is usually C<yes> or C<no>, or the line is completely missing "
22620 "if we could not determine the answer at all)."
22624 #: ../inspector/virt-inspector.pl:602
22626 "If the guest is multiboot, you can get apparently conflicting answers "
22627 "(eg. C<windows=yes> and C<linux=yes>, or a guest which is both fullvirt and "
22628 "has a Xen PV kernel). This is normal, and just means that the guest can do "
22629 "both things, although it might require operator intervention such as "
22630 "selecting a boot option when the guest is booting."
22634 #: ../inspector/virt-inspector.pl:609
22635 msgid "This section describes the full range of answers possible."
22639 #: ../inspector/virt-inspector.pl:630
22640 msgid "windows=(yes|no)"
22644 #: ../inspector/virt-inspector.pl:632
22645 msgid "Answer C<yes> if Microsoft Windows is installed in the guest."
22649 #: ../inspector/virt-inspector.pl:645
22650 msgid "linux=(yes|no)"
22654 #: ../inspector/virt-inspector.pl:647
22655 msgid "Answer C<yes> if a Linux kernel is installed in the guest."
22659 #: ../inspector/virt-inspector.pl:660
22660 msgid "rhel=(yes|no)"
22664 #: ../inspector/virt-inspector.pl:662
22665 msgid "Answer C<yes> if the guest contains Red Hat Enterprise Linux."
22669 #: ../inspector/virt-inspector.pl:676
22670 msgid "fedora=(yes|no)"
22674 #: ../inspector/virt-inspector.pl:678
22675 msgid "Answer C<yes> if the guest contains the Fedora Linux distribution."
22679 #: ../inspector/virt-inspector.pl:691
22680 msgid "debian=(yes|no)"
22684 #: ../inspector/virt-inspector.pl:693
22685 msgid "Answer C<yes> if the guest contains the Debian Linux distribution."
22689 #: ../inspector/virt-inspector.pl:706
22690 msgid "fullvirt=(yes|no)"
22694 #: ../inspector/virt-inspector.pl:708
22696 "Answer C<yes> if there is at least one operating system kernel installed in "
22697 "the guest which runs fully virtualized. Such a guest would require a "
22698 "hypervisor which supports full system virtualization."
22702 #: ../inspector/virt-inspector.pl:731
22703 msgid "xen_domU_kernel=(yes|no)"
22707 #: ../inspector/virt-inspector.pl:733
22709 "Answer C<yes> if there is at least one Linux kernel installed in the guest "
22710 "which is compiled as a Xen DomU (a Xen paravirtualized guest)."
22714 #: ../inspector/virt-inspector.pl:753
22715 msgid "xen_pv_drivers=(yes|no)"
22719 #: ../inspector/virt-inspector.pl:755
22721 "Answer C<yes> if the guest has Xen paravirtualized drivers installed "
22722 "(usually the kernel itself will be fully virtualized, but the PV drivers "
22723 "have been installed by the administrator for performance reasons)."
22727 #: ../inspector/virt-inspector.pl:777
22728 msgid "virtio_drivers=(yes|no)"
22732 #: ../inspector/virt-inspector.pl:779
22734 "Answer C<yes> if the guest has virtio paravirtualized drivers installed. "
22735 "Virtio drivers are commonly used to improve the performance of KVM."
22739 #: ../inspector/virt-inspector.pl:800
22740 msgid "userspace_arch=(x86_64|...)"
22744 #: ../inspector/virt-inspector.pl:802
22745 msgid "Print the architecture of userspace."
22749 #: ../inspector/virt-inspector.pl:804 ../inspector/virt-inspector.pl:825
22750 msgid "NB. For multi-boot VMs this can print several lines."
22754 #: ../inspector/virt-inspector.pl:821
22755 msgid "kernel_arch=(x86_64|...)"
22759 #: ../inspector/virt-inspector.pl:823
22760 msgid "Print the architecture of the kernel."
22764 #: ../inspector/virt-inspector.pl:848 ../tools/virt-df.pl:484
22766 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
22767 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
22771 #: ../inspector/virt-inspector.pl:857 ../tools/virt-cat.pl:175 ../tools/virt-df.pl:493 ../tools/virt-edit.pl:339 ../tools/virt-list-filesystems.pl:205 ../tools/virt-list-partitions.pl:242 ../tools/virt-ls.pl:223 ../tools/virt-make-fs.pl:554 ../tools/virt-rescue.pl:243 ../tools/virt-resize.pl:1409 ../tools/virt-tar.pl:270 ../tools/virt-win-reg.pl:489
22772 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
22776 #: ../inspector/virt-inspector.pl:859
22777 msgid "Matthew Booth L<mbooth@redhat.com>"
22781 #: ../inspector/virt-inspector.pl:863 ../tools/virt-cat.pl:179 ../tools/virt-list-filesystems.pl:209 ../tools/virt-ls.pl:227 ../tools/virt-tar.pl:274
22782 msgid "Copyright (C) 2009 Red Hat Inc."
22786 #: ../tools/virt-cat.pl:34
22787 msgid "virt-cat - Display a file in a virtual machine"
22791 #: ../tools/virt-cat.pl:38
22794 " virt-cat [--options] domname file\n"
22799 #: ../tools/virt-cat.pl:40
22802 " virt-cat [--options] disk.img [disk.img ...] file\n"
22807 #: ../tools/virt-cat.pl:44
22809 "C<virt-cat> is a command line tool to display the contents of C<file> where "
22810 "C<file> exists in the named virtual machine (or disk image)."
22814 #: ../tools/virt-cat.pl:47
22816 "C<virt-cat> can be used to quickly view a single file. To edit a file, use "
22817 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
22822 #: ../tools/virt-cat.pl:53
22823 msgid "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
22827 #: ../tools/virt-cat.pl:56
22830 " virt-cat mydomain /etc/fstab\n"
22835 #: ../tools/virt-cat.pl:58
22836 msgid "List syslog messages from a VM:"
22840 #: ../tools/virt-cat.pl:60
22843 " virt-cat mydomain /var/log/messages | tail\n"
22848 #: ../tools/virt-cat.pl:62
22849 msgid "Find out what DHCP IP address a VM acquired:"
22853 #: ../tools/virt-cat.pl:64
22856 " virt-cat mydomain /var/log/messages | grep 'dhclient: bound to' | tail\n"
22861 #: ../tools/virt-cat.pl:66
22862 msgid "Find out what packages were recently installed:"
22866 #: ../tools/virt-cat.pl:68
22869 " virt-cat mydomain /var/log/yum.log | tail\n"
22874 #: ../tools/virt-cat.pl:70
22875 msgid "Find out who is logged on inside a virtual machine:"
22879 #: ../tools/virt-cat.pl:72
22882 " virt-cat mydomain /var/run/utmp > /tmp/utmp\n"
22888 #: ../tools/virt-cat.pl:75
22889 msgid "or who was logged on:"
22893 #: ../tools/virt-cat.pl:77
22896 " virt-cat mydomain /var/log/wtmp > /tmp/wtmp\n"
22897 " last -f /tmp/wtmp\n"
22902 #: ../tools/virt-cat.pl:109 ../tools/virt-df.pl:100 ../tools/virt-edit.pl:118 ../tools/virt-list-filesystems.pl:79 ../tools/virt-list-partitions.pl:80 ../tools/virt-ls.pl:108 ../tools/virt-rescue.pl:140 ../tools/virt-tar.pl:128 ../tools/virt-win-reg.pl:209
22904 "If you specify guest block devices directly, then libvirt is not used at "
22909 #: ../tools/virt-cat.pl:165
22911 "L<guestfs(3)>, L<guestfish(1)>, L<virt-edit(1)>, L<Sys::Guestfs(3)>, "
22912 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
22916 #: ../tools/virt-cat.pl:173 ../tools/virt-df.pl:491 ../tools/virt-edit.pl:337 ../tools/virt-list-filesystems.pl:203 ../tools/virt-list-partitions.pl:240 ../tools/virt-ls.pl:221 ../tools/virt-make-fs.pl:552 ../tools/virt-rescue.pl:241 ../tools/virt-resize.pl:1407 ../tools/virt-tar.pl:268 ../tools/virt-win-reg.pl:487
22921 #: ../tools/virt-df.pl:36
22922 msgid "virt-df - Display free space on virtual filesystems"
22926 #: ../tools/virt-df.pl:40
22929 " virt-df [--options]\n"
22934 #: ../tools/virt-df.pl:42
22937 " virt-df [--options] domname\n"
22942 #: ../tools/virt-df.pl:44
22945 " virt-df [--options] disk.img [disk.img ...]\n"
22950 #: ../tools/virt-df.pl:48
22952 "C<virt-df> is a command line tool to display free space on virtual machine "
22953 "filesystems. Unlike other tools, it doesn't just display the amount of "
22954 "space allocated to a virtual machine, but can look inside the virtual "
22955 "machine to see how much space is really being used."
22959 #: ../tools/virt-df.pl:53
22961 "It is like the L<df(1)> command, but for virtual machines, except that it "
22962 "also works for Windows virtual machines."
22966 #: ../tools/virt-df.pl:56
22968 "If used without any arguments, C<virt-df> checks with libvirt to get a list "
22969 "of all active and inactive guests, and performs a C<df>-type operation on "
22970 "each one in turn, printing out the results."
22974 #: ../tools/virt-df.pl:60
22976 "If used with any argument(s), C<virt-df> performs a C<df>-type operation on "
22977 "either the single named libvirt domain, or on the disk image(s) listed on "
22978 "the command line (which must all belong to a single VM). In this mode (with "
22979 "arguments), C<virt-df> will I<only work for a single guest>. If you want to "
22980 "run on multiple guests, then you have to invoke C<virt-df> multiple times."
22984 #: ../tools/virt-df.pl:67
22986 "Use the C<--csv> option to get a format which can be easily parsed by other "
22987 "programs. Other options are mostly similar to standard C<df> options. See "
22988 "below for the complete list."
22992 #: ../tools/virt-df.pl:107
22997 #: ../tools/virt-df.pl:109
22999 "Write out the results in CSV format (comma-separated values). This format "
23000 "can be imported easily into databases and spreadsheets, but read L</NOTE "
23001 "ABOUT CSV FORMAT> below."
23005 #: ../tools/virt-df.pl:117
23006 msgid "B<--human-readable> | B<-h>"
23010 #: ../tools/virt-df.pl:119
23011 msgid "Print sizes in human-readable format."
23015 #: ../tools/virt-df.pl:121
23016 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
23020 #: ../tools/virt-df.pl:127
23021 msgid "B<--inodes> | B<-i>"
23025 #: ../tools/virt-df.pl:129
23026 msgid "Print inodes instead of blocks."
23030 #: ../tools/virt-df.pl:458
23031 msgid "NOTE ABOUT CSV FORMAT"
23035 #: ../tools/virt-df.pl:460
23037 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
23038 "should be easy to parse, but it is definitely not easy to parse."
23042 #: ../tools/virt-df.pl:463
23044 "Myth: Just split fields at commas. Reality: This does I<not> work "
23045 "reliably. This example has two columns:"
23049 #: ../tools/virt-df.pl:466
23052 " \"foo,bar\",baz\n"
23057 #: ../tools/virt-df.pl:468
23059 "Myth: Read the file one line at a time. Reality: This does I<not> work "
23060 "reliably. This example has one row:"
23064 #: ../tools/virt-df.pl:471
23073 #: ../tools/virt-df.pl:474
23075 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
23076 "packaged in major Linux distributions)."
23080 #: ../tools/virt-df.pl:477
23082 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
23083 "or Python's built-in csv library)."
23087 #: ../tools/virt-df.pl:480
23088 msgid "Most spreadsheets and databases can import CSV directly."
23092 #: ../tools/virt-df.pl:497 ../tools/virt-edit.pl:343 ../tools/virt-list-partitions.pl:246 ../tools/virt-rescue.pl:247
23093 msgid "Copyright (C) 2009-2010 Red Hat Inc."
23097 #: ../tools/virt-edit.pl:35
23098 msgid "virt-edit - Edit a file in a virtual machine"
23102 #: ../tools/virt-edit.pl:39
23105 " virt-edit [--options] domname file\n"
23110 #: ../tools/virt-edit.pl:41
23113 " virt-edit [--options] disk.img [disk.img ...] file\n"
23118 #: ../tools/virt-edit.pl:43
23121 " virt-edit [domname|disk.img] file -e 'expr'\n"
23126 #: ../tools/virt-edit.pl:47
23128 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
23129 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
23130 "doing this, but doesn't catch all cases."
23134 #: ../tools/virt-edit.pl:53
23136 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
23137 "the named virtual machine (or disk image)."
23141 #: ../tools/virt-edit.pl:56
23143 "If you want to just view a file, use L<virt-cat(1)>. For more complex cases "
23144 "you should look at the L<guestfish(1)> tool."
23148 #: ../tools/virt-edit.pl:61
23149 msgid "Edit the named files interactively:"
23153 #: ../tools/virt-edit.pl:63
23156 " virt-edit mydomain /boot/grub/grub.conf\n"
23161 #: ../tools/virt-edit.pl:65
23164 " virt-edit mydomain /etc/passwd\n"
23169 #: ../tools/virt-edit.pl:67
23171 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
23172 "below). To change the init default level to 5:"
23176 #: ../tools/virt-edit.pl:71
23179 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
23184 #: ../tools/virt-edit.pl:97
23185 msgid "B<--backup extension> | B<-b extension>"
23189 #: ../tools/virt-edit.pl:99
23191 "Create a backup of the original file I<in the guest disk image>. The backup "
23192 "has the original filename with C<extension> added."
23196 #: ../tools/virt-edit.pl:102
23198 "Usually the first character of C<extension> would be a dot C<.> so you would "
23203 #: ../tools/virt-edit.pl:105
23206 " virt-edit -b .orig [etc]\n"
23211 #: ../tools/virt-edit.pl:107
23212 msgid "By default, no backup file is made."
23216 #: ../tools/virt-edit.pl:125
23217 msgid "B<--expr EXPR> | B<-e EXPR>"
23221 #: ../tools/virt-edit.pl:127
23223 "Instead of launching the external editor, non-interactively apply the Perl "
23224 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
23229 #: ../tools/virt-edit.pl:131
23231 "Be careful to properly quote the expression to prevent it from being altered "
23236 #: ../tools/virt-edit.pl:250
23237 msgid "NON-INTERACTIVE EDITING"
23241 #: ../tools/virt-edit.pl:252
23243 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
23244 "administrator can interactively edit the file."
23248 #: ../tools/virt-edit.pl:255
23250 "There are two ways also to use C<virt-edit> from scripts in order to make "
23251 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
23252 "like this, it's less error-prone to write scripts directly using the "
23253 "libguestfs API and Augeas for configuration file editing.)"
23257 #: ../tools/virt-edit.pl:261
23259 "The first method is to temporarily set C<$EDITOR> to any script or program "
23260 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
23261 "update C<tmpfile> in place however it likes."
23265 #: ../tools/virt-edit.pl:265
23267 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
23268 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
23269 "instances of C<foo> with C<bar> in a file:"
23273 #: ../tools/virt-edit.pl:269
23276 " virt-edit domname filename -e 's/foo/bar/'\n"
23281 #: ../tools/virt-edit.pl:271
23283 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
23284 "For example to delete root's password you could do:"
23288 #: ../tools/virt-edit.pl:274
23291 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
23296 #: ../tools/virt-edit.pl:276
23298 "What really happens is that the snippet is evaluated as a Perl expression "
23299 "for each line of the file. The line, including the final C<\\n>, is passed "
23300 "in C<$_> and the expression should update C<$_> or leave it unchanged."
23304 #: ../tools/virt-edit.pl:281
23306 "To delete a line, set C<$_> to the empty string. For example, to delete the "
23307 "C<apache> user account from the password file you can do:"
23311 #: ../tools/virt-edit.pl:284
23314 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
23319 #: ../tools/virt-edit.pl:286
23321 "To insert a line, prepend or append it to C<$_>. However appending lines to "
23322 "the end of the file is rather difficult this way since there is no concept "
23323 "of \"last line of the file\" - your expression just doesn't get called "
23324 "again. You might want to use the first method (setting C<$EDITOR>) if you "
23329 #: ../tools/virt-edit.pl:292
23331 "The variable C<$lineno> contains the current line number. As is "
23332 "traditional, the first line in the file is number C<1>."
23336 #: ../tools/virt-edit.pl:295
23338 "The return value from the expression is ignored, but the expression may call "
23339 "C<die> in order to abort the whole program, leaving the original file "
23344 #: ../tools/virt-edit.pl:299
23346 "Remember when matching the end of a line that C<$_> may contain the final "
23347 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
23348 "newline then neither of these. Thus to match or substitute some text at the "
23349 "end of a line, use this regular expression:"
23353 #: ../tools/virt-edit.pl:304
23356 " /some text(\\r?\\n)?$/\n"
23361 #: ../tools/virt-edit.pl:306
23363 "Alternately, use the perl C<chomp> function, being careful not to chomp "
23364 "C<$_> itself (since that would remove all newlines from the file):"
23368 #: ../tools/virt-edit.pl:310
23371 " my $m = $_; chomp $m; $m =~ /some text$/\n"
23376 #: ../tools/virt-edit.pl:316
23381 #: ../tools/virt-edit.pl:318
23383 "If set, this string is used as the editor. It may contain arguments, "
23384 "eg. C<\"emacs -nw\">"
23388 #: ../tools/virt-edit.pl:321
23389 msgid "If not set, C<vi> is used."
23393 #: ../tools/virt-edit.pl:327
23395 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
23396 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>, "
23397 "L<perl(1)>, L<perlre(1)>."
23401 #: ../tools/virt-list-filesystems.pl:32
23402 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
23406 #: ../tools/virt-list-filesystems.pl:36
23409 " virt-list-filesystems [--options] domname\n"
23414 #: ../tools/virt-list-filesystems.pl:38
23417 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
23422 #: ../tools/virt-list-filesystems.pl:42
23424 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
23425 "are contained in a virtual machine or disk image."
23429 #: ../tools/virt-list-filesystems.pl:46
23431 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
23432 "functionality. For more complex cases you should look at the "
23433 "L<guestfish(1)> tool."
23437 #: ../tools/virt-list-filesystems.pl:86 ../tools/virt-list-partitions.pl:95 ../tools/virt-ls.pl:115
23438 msgid "B<-l> | B<--long>"
23442 #: ../tools/virt-list-filesystems.pl:88
23444 "With this option, C<virt-list-filesystems> displays the type of each "
23445 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
23449 #: ../tools/virt-list-filesystems.pl:95
23450 msgid "B<-a> | B<--all>"
23454 #: ../tools/virt-list-filesystems.pl:97
23456 "Normally we only show mountable filesystems. If this option is given then "
23457 "swap devices are shown too."
23461 #: ../tools/virt-list-filesystems.pl:193
23463 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
23464 "L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
23465 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
23469 #: ../tools/virt-list-partitions.pl:32
23470 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
23474 #: ../tools/virt-list-partitions.pl:36
23477 " virt-list-partitions [--options] domname\n"
23482 #: ../tools/virt-list-partitions.pl:38
23485 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
23490 #: ../tools/virt-list-partitions.pl:42
23492 "C<virt-list-partitions> is a command line tool to list the partitions that "
23493 "are contained in a virtual machine or disk image. It is mainly useful as a "
23494 "first step to using L<virt-resize(1)>."
23498 #: ../tools/virt-list-partitions.pl:47
23500 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
23501 "functionality. For more complex cases you should look at the "
23502 "L<guestfish(1)> tool."
23506 #: ../tools/virt-list-partitions.pl:87
23507 msgid "B<-h> | B<--human-readable>"
23511 #: ../tools/virt-list-partitions.pl:89
23512 msgid "Show sizes in human-readable form (eg. \"1G\")."
23516 #: ../tools/virt-list-partitions.pl:97
23518 "With this option, C<virt-list-partitions> displays the type and size of each "
23519 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
23523 #: ../tools/virt-list-partitions.pl:104
23524 msgid "B<-t> | B<--total>"
23528 #: ../tools/virt-list-partitions.pl:106
23529 msgid "Display the total size of each block device (as a separate row or rows)."
23533 #: ../tools/virt-list-partitions.pl:231
23535 "L<guestfs(3)>, L<guestfish(1)>, L<virt-list-filesystems(1)>, "
23536 "L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
23537 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
23541 #: ../tools/virt-ls.pl:35
23542 msgid "virt-ls - List files in a virtual machine"
23546 #: ../tools/virt-ls.pl:39
23549 " virt-ls [--options] domname directory\n"
23554 #: ../tools/virt-ls.pl:41
23557 " virt-ls [--options] disk.img [disk.img ...] directory\n"
23562 #: ../tools/virt-ls.pl:45
23564 "C<virt-ls> is a command line tool to list the names of files in a directory "
23565 "inside a virtual machine or disk image."
23569 #: ../tools/virt-ls.pl:48
23571 "C<virt-ls> is just a simple wrapper around L<libguestfs(3)> functionality. "
23572 "For more complex cases you should look at the L<guestfish(1)> tool."
23576 #: ../tools/virt-ls.pl:52
23578 "C<virt-ls> can be used in one of three modes: simple, long and recursive. A "
23579 "simple listing is like the ordinary L<ls(1)> command:"
23583 #: ../tools/virt-ls.pl:55
23586 " $ virt-ls myguest /\n"
23594 #: ../tools/virt-ls.pl:60
23595 msgid "With the C<-l> (C<--long>) option, C<virt-ls> shows more detail:"
23599 #: ../tools/virt-ls.pl:62
23602 " $ virt-ls -l myguest /\n"
23604 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
23605 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
23611 #: ../tools/virt-ls.pl:68
23613 "With the C<-R> (C<--recursive>) option, C<virt-ls> lists the names of files "
23614 "and directories recursively:"
23618 #: ../tools/virt-ls.pl:71
23621 " $ virt-ls -R myguest /tmp\n"
23629 #: ../tools/virt-ls.pl:76
23631 "You I<cannot> combine these options. To do more complicated things, use "
23636 #: ../tools/virt-ls.pl:117
23637 msgid "B<-R> | B<--recursive>"
23641 #: ../tools/virt-ls.pl:119
23643 "Select the mode. With neither of these options, C<virt-ls> produces a "
23644 "simple, flat list of the files in the named directory."
23648 #: ../tools/virt-ls.pl:122
23650 "C<virt-ls -l> produces a \"long listing\", which shows more detail (just "
23651 "like the plain C<ls -l> command)."
23655 #: ../tools/virt-ls.pl:125
23657 "C<virt-ls -R> produces a recursive list of files starting at the named "
23658 "directory. See the documentation for the C<guestfs_find> command "
23659 "L<guestfs(3)> for precise details."
23663 #: ../tools/virt-ls.pl:129
23664 msgid "You cannot combine these options."
23668 #: ../tools/virt-ls.pl:212
23670 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
23671 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
23672 "L<http://libguestfs.org/>."
23676 #: ../tools/virt-make-fs.pl:37
23677 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
23681 #: ../tools/virt-make-fs.pl:41
23684 " virt-make-fs [--options] input.tar output.img\n"
23689 #: ../tools/virt-make-fs.pl:43
23692 " virt-make-fs [--options] input.tar.gz output.img\n"
23697 #: ../tools/virt-make-fs.pl:45
23700 " virt-make-fs [--options] directory output.img\n"
23705 #: ../tools/virt-make-fs.pl:49
23707 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
23708 "archive or some files in a directory. It is similar to tools like "
23709 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
23710 "it can create common filesystem types like ext2/3 or NTFS, which can be "
23711 "useful if you want to attach these filesystems to existing virtual machines "
23712 "(eg. to import large amounts of read-only data to a VM)."
23716 #: ../tools/virt-make-fs.pl:57
23717 msgid "Basic usage is:"
23721 #: ../tools/virt-make-fs.pl:59
23724 " virt-make-fs input output\n"
23729 #: ../tools/virt-make-fs.pl:61
23731 "where C<input> is either a directory containing files that you want to add, "
23732 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
23733 "C<output> is a disk image. The input type is detected automatically. The "
23734 "output disk image defaults to a raw ext2 image unless you specify extra "
23735 "flags (see L</OPTIONS> below)."
23739 #: ../tools/virt-make-fs.pl:67
23740 msgid "EXTRA SPACE"
23744 #: ../tools/virt-make-fs.pl:69
23746 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
23747 "the files that it contains, but might have extra space. Depending on how "
23748 "you are going to use the output, you might think this extra space is wasted "
23749 "and want to minimize it, or you might want to leave space so that more files "
23750 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
23751 "but you can use the C<--size> flag to leave space in the filesystem if you "
23756 #: ../tools/virt-make-fs.pl:77
23758 "An alternative way to leave extra space but not make the output image any "
23759 "bigger is to use an alternative disk image format (instead of the default "
23760 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
23761 "image format (check your hypervisor supports this before using it). This "
23762 "allows you to choose a large C<--size> but the extra space won't actually be "
23763 "allocated in the image until you try to store something in it."
23767 #: ../tools/virt-make-fs.pl:85
23769 "Don't forget that you can also use local commands including L<resize2fs(8)> "
23770 "and L<virt-resize(1)> to resize existing filesystems, or rerun "
23771 "virt-make-resize to build another image from scratch."
23775 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123 ../tools/virt-make-fs.pl:142
23780 #: ../tools/virt-make-fs.pl:91
23783 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
23788 #: ../tools/virt-make-fs.pl:93
23789 msgid "FILESYSTEM TYPE"
23793 #: ../tools/virt-make-fs.pl:95
23795 "The default filesystem type is C<ext2>. Just about any filesystem type that "
23796 "libguestfs supports can be used (but I<not> read-only formats like "
23797 "ISO9660). Here are some of the more common choices:"
23801 #: ../tools/virt-make-fs.pl:101
23806 #: ../tools/virt-make-fs.pl:103
23808 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
23809 "you are not going to use the filesystem in a way that requires the journal, "
23810 "then this is just wasted overhead."
23814 #: ../tools/virt-make-fs.pl:107
23815 msgid "I<ntfs> or I<vfat>"
23819 #: ../tools/virt-make-fs.pl:109
23820 msgid "Useful if exporting data to a Windows guest."
23824 #: ../tools/virt-make-fs.pl:111
23826 "I<Note for vfat>: The tar archive or local directory must only contain files "
23827 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
23828 "program running within libguestfs is unable to change the ownership of "
23829 "non-root files, since vfat itself does not support this."
23833 #: ../tools/virt-make-fs.pl:116
23838 #: ../tools/virt-make-fs.pl:118
23840 "Lower overhead than C<ext2>, but certain limitations on filename length and "
23841 "total filesystem size."
23845 #: ../tools/virt-make-fs.pl:125
23848 " virt-make-fs --type=minix input minixfs.img\n"
23853 #: ../tools/virt-make-fs.pl:127
23854 msgid "TO PARTITION OR NOT TO PARTITION"
23858 #: ../tools/virt-make-fs.pl:129
23859 msgid "Optionally virt-make-fs can add a partition table to the output disk."
23863 #: ../tools/virt-make-fs.pl:131
23865 "Adding a partition can make the disk image more compatible with certain "
23866 "virtualized operating systems which don't expect to see a filesystem "
23867 "directly located on a block device (Linux doesn't care and will happily "
23868 "handle both types)."
23872 #: ../tools/virt-make-fs.pl:136
23874 "On the other hand, if you have a partition table then the output image is no "
23875 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
23876 "directly on a partitioned disk image. (However libguestfs tools such as "
23877 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
23881 #: ../tools/virt-make-fs.pl:144
23882 msgid "Add an MBR partition:"
23886 #: ../tools/virt-make-fs.pl:146
23889 " virt-make-fs --partition -- input disk.img\n"
23894 #: ../tools/virt-make-fs.pl:148
23896 "If the output disk image could be terabyte-sized or larger, it's better to "
23897 "use an EFI/GPT-compatible partition table:"
23901 #: ../tools/virt-make-fs.pl:151
23904 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
23909 #: ../tools/virt-make-fs.pl:177 ../tools/virt-win-reg.pl:196
23914 #: ../tools/virt-make-fs.pl:179
23915 msgid "Enable debugging information."
23919 #: ../tools/virt-make-fs.pl:185
23920 msgid "B<--size=E<lt>NE<gt>>"
23924 #: ../tools/virt-make-fs.pl:187
23925 msgid "B<--size=+E<lt>NE<gt>>"
23929 #: ../tools/virt-make-fs.pl:189
23930 msgid "B<-s E<lt>NE<gt>>"
23934 #: ../tools/virt-make-fs.pl:191
23935 msgid "B<-s +E<lt>NE<gt>>"
23939 #: ../tools/virt-make-fs.pl:193
23940 msgid "Use the C<--size> (or C<-s>) option to choose the size of the output image."
23944 #: ../tools/virt-make-fs.pl:196
23946 "If this option is I<not> given, then the output image will be just large "
23947 "enough to contain all the files, with not much wasted space."
23951 #: ../tools/virt-make-fs.pl:199
23953 "To choose a fixed size output disk, specify an absolute number followed by "
23954 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
23955 "Petabytes or Exabytes. This must be large enough to contain all the input "
23956 "files, else you will get an error."
23960 #: ../tools/virt-make-fs.pl:204
23962 "To leave extra space, specify C<+> (plus sign) and a number followed by "
23963 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
23964 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
23965 "the input files, and (approximately) an extra 200 MB free space."
23969 #: ../tools/virt-make-fs.pl:210
23971 "Note that virt-make-fs estimates free space, and therefore will not produce "
23972 "filesystems containing precisely the free space requested. (It is much more "
23973 "expensive and time-consuming to produce a filesystem which has precisely the "
23974 "desired free space)."
23978 #: ../tools/virt-make-fs.pl:219
23979 msgid "B<--format=E<lt>fmtE<gt>>"
23983 #: ../tools/virt-make-fs.pl:221
23984 msgid "B<-F E<lt>fmtE<gt>>"
23988 #: ../tools/virt-make-fs.pl:223
23989 msgid "Choose the output disk image format."
23993 #: ../tools/virt-make-fs.pl:225
23994 msgid "The default is C<raw> (raw disk image)."
23998 #: ../tools/virt-make-fs.pl:227
24000 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
24001 "that would really make sense here is C<qcow2>."
24005 #: ../tools/virt-make-fs.pl:234
24006 msgid "B<--type=E<lt>fsE<gt>>"
24010 #: ../tools/virt-make-fs.pl:236
24011 msgid "B<-t E<lt>fsE<gt>>"
24015 #: ../tools/virt-make-fs.pl:238
24016 msgid "Choose the output filesystem type."
24020 #: ../tools/virt-make-fs.pl:240
24021 msgid "The default is C<ext2>."
24025 #: ../tools/virt-make-fs.pl:242
24026 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
24030 #: ../tools/virt-make-fs.pl:249
24031 msgid "B<--partition>"
24035 #: ../tools/virt-make-fs.pl:251
24036 msgid "B<--partition=E<lt>parttypeE<gt>>"
24040 #: ../tools/virt-make-fs.pl:253
24042 "If specified, this flag adds an MBR partition table to the output disk "
24047 #: ../tools/virt-make-fs.pl:256
24049 "You can change the partition table type, eg. C<--partition=gpt> for large "
24054 #: ../tools/virt-make-fs.pl:259
24056 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
24057 "might consider the next parameter to be the partition type. For example:"
24061 #: ../tools/virt-make-fs.pl:263
24064 " virt-make-fs --partition input.tar ...\n"
24069 #: ../tools/virt-make-fs.pl:265
24071 "would cause virt-make-fs to think you wanted to use a partition type of "
24072 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
24073 "dash) between options and the input file argument:"
24077 #: ../tools/virt-make-fs.pl:269
24080 " virt-make-fs --partition -- input.tar ...\n"
24085 #: ../tools/virt-make-fs.pl:529
24087 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<mkisofs(1)>, "
24088 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
24089 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
24093 #: ../tools/virt-make-fs.pl:543 ../tools/virt-win-reg.pl:478
24095 "When reporting bugs, please enable debugging and capture the I<complete> "
24100 #: ../tools/virt-make-fs.pl:546
24103 " export LIBGUESTFS_DEBUG=1\n"
24104 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
24109 #: ../tools/virt-make-fs.pl:549
24111 "Attach /tmp/virt-make-fs.log to a new bug report at "
24112 "L<https://bugzilla.redhat.com/>"
24116 #: ../tools/virt-make-fs.pl:558 ../tools/virt-resize.pl:1413 ../tools/virt-win-reg.pl:493
24117 msgid "Copyright (C) 2010 Red Hat Inc."
24121 #: ../tools/virt-rescue.pl:33
24122 msgid "virt-rescue - Run a rescue shell on a virtual machine"
24126 #: ../tools/virt-rescue.pl:37
24129 " virt-rescue [--options] domname\n"
24134 #: ../tools/virt-rescue.pl:39
24137 " virt-rescue [--options] disk.img [disk.img ...]\n"
24142 #: ../tools/virt-rescue.pl:43
24144 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
24145 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
24146 "you from doing this, but doesn't catch all cases."
24150 #: ../tools/virt-rescue.pl:47
24152 "However if you use the I<--ro> (read only) option, then you can attach a "
24153 "shell to a live virtual machine. The results might be strange or "
24154 "inconsistent at times but you won't get disk corruption."
24158 #: ../tools/virt-rescue.pl:53
24160 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
24161 "need for a CD. virt-rescue gives you a rescue shell and some simple "
24162 "recovery tools which you can use to examine or rescue a virtual machine or "
24167 #: ../tools/virt-rescue.pl:58
24169 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
24170 "on disk image(s):"
24174 #: ../tools/virt-rescue.pl:61
24177 " virt-rescue GuestName\n"
24182 #: ../tools/virt-rescue.pl:63
24185 " virt-rescue --ro /path/to/disk.img\n"
24190 #: ../tools/virt-rescue.pl:65
24193 " virt-rescue /dev/sdc\n"
24198 #: ../tools/virt-rescue.pl:67
24199 msgid "For live VMs you I<must> use the --ro option."
24203 #: ../tools/virt-rescue.pl:69
24205 "When you run virt-rescue on a virtual machine or disk image, you are placed "
24206 "in an interactive bash shell where you can use many ordinary Linux "
24207 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
24208 "appliance. You must mount the virtual machine's filesystems by hand. There "
24209 "is an empty directory called C</sysroot> where you can mount filesystems."
24213 #: ../tools/virt-rescue.pl:76
24215 "In the example below, we list logical volumes, then choose one to mount "
24216 "under C</sysroot>:"
24220 #: ../tools/virt-rescue.pl:79
24224 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
24225 " lv_root vg_f11x64 -wi-a- 8.83G\n"
24226 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
24227 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
24228 " ><rescue> ls /sysroot\n"
24233 #: ../tools/virt-rescue.pl:86
24235 "If you don't know what filesystems are available on the virtual machine then "
24236 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
24240 #: ../tools/virt-rescue.pl:90 ../tools/virt-resize.pl:1350
24245 #: ../tools/virt-rescue.pl:92
24247 "Virt-rescue can be used on I<any> disk image file or device, not just a "
24248 "virtual machine. For example you can use it on a blank file if you want to "
24249 "partition that file (although we would recommend using L<guestfish(1)> "
24250 "instead as it is more suitable for this purpose). You can even use "
24251 "virt-rescue on things like SD cards."
24255 #: ../tools/virt-rescue.pl:98
24257 "This tool is just designed for quick interactive hacking on a virtual "
24258 "machine. For more structured access to a virtual machine disk image, you "
24259 "should use L<guestfs(3)>. To get a structured shell that you can use to "
24260 "make scripted changes to guests, use L<guestfish(1)>."
24264 #: ../tools/virt-rescue.pl:127
24265 msgid "B<--append kernelopts>"
24269 #: ../tools/virt-rescue.pl:129
24270 msgid "Pass additional options to the rescue kernel."
24274 #: ../tools/virt-rescue.pl:147
24275 msgid "B<--memsize MB> | B<-m MB>"
24279 #: ../tools/virt-rescue.pl:149
24281 "Change the amount of memory allocated to the rescue system. The default is "
24282 "set by libguestfs and is small but adequate for running system tools. The "
24283 "occasional program might need more memory. The parameter is specified in "
24288 #: ../tools/virt-rescue.pl:158
24289 msgid "B<--ro> | B<-r>"
24293 #: ../tools/virt-rescue.pl:160
24294 msgid "Open the image read-only."
24298 #: ../tools/virt-rescue.pl:172
24300 "Enable SELinux in the rescue appliance. You should read "
24301 "L<guestfs(3)/SELINUX> before using this option."
24305 #: ../tools/virt-rescue.pl:228
24307 "Several environment variables affect virt-rescue. See "
24308 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
24312 #: ../tools/virt-rescue.pl:233
24314 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
24315 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
24319 #: ../tools/virt-resize.pl:42
24320 msgid "virt-resize - Resize a virtual machine disk"
24324 #: ../tools/virt-resize.pl:46
24327 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
24328 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
24329 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
24334 #: ../tools/virt-resize.pl:52
24336 "Virt-resize is a tool which can resize a virtual machine disk, making it "
24337 "larger or smaller overall, and resizing or deleting any partitions contained "
24342 #: ../tools/virt-resize.pl:56
24344 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
24345 "not> be used on live virtual machines - for consistent results, shut the "
24346 "virtual machine down before resizing it."
24350 #: ../tools/virt-resize.pl:60
24352 "If you are not familiar with the associated tools: "
24353 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)> and L<virt-df(1)>, "
24354 "we recommend you go and read those manual pages first."
24358 #: ../tools/virt-resize.pl:68
24360 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
24361 "fill the extra 5GB of space."
24365 #: ../tools/virt-resize.pl:71
24368 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
24369 " virt-list-partitions -lht olddisk\n"
24370 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
24371 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
24376 #: ../tools/virt-resize.pl:76
24378 "As above, but make the /boot partition 200MB bigger, while giving the "
24379 "remaining space to /dev/sda2:"
24383 #: ../tools/virt-resize.pl:79
24386 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
24391 #: ../tools/virt-resize.pl:81
24392 msgid "DETAILED USAGE"
24396 #: ../tools/virt-resize.pl:83
24397 msgid "EXPANDING A VIRTUAL MACHINE DISK"
24401 #: ../tools/virt-resize.pl:87
24402 msgid "1. Shut down the virtual machine"
24406 #: ../tools/virt-resize.pl:89
24407 msgid "2. Locate input disk image"
24411 #: ../tools/virt-resize.pl:91
24413 "Locate the input disk image (ie. the file or device on the host containing "
24414 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
24415 "dumpxml> like this to find the disk image name:"
24419 #: ../tools/virt-resize.pl:95
24422 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
24423 " Found 1 nodes:\n"
24425 " <source dev=\"/dev/vg/lv_guest\" />\n"
24430 #: ../tools/virt-resize.pl:100
24431 msgid "3. Look at current sizing"
24435 #: ../tools/virt-resize.pl:102
24436 msgid "Use L<virt-list-partitions(1)> to display the current partitions and sizes:"
24440 #: ../tools/virt-resize.pl:105
24443 " # virt-list-partitions -lht /dev/vg/lv_guest\n"
24444 " /dev/sda1 ext3 101.9M\n"
24445 " /dev/sda2 pv 7.9G\n"
24446 " /dev/sda device 8.0G\n"
24451 #: ../tools/virt-resize.pl:110
24453 "(This example is a virtual machine with an 8 GB disk which we would like to "
24454 "expand up to 10 GB)."
24458 #: ../tools/virt-resize.pl:113
24459 msgid "4. Create output disk"
24463 #: ../tools/virt-resize.pl:115
24465 "Virt-resize cannot do in-place disk modifications. You have to have space "
24466 "to store the resized output disk."
24470 #: ../tools/virt-resize.pl:118
24471 msgid "To store the resized disk image in a file, create a file of a suitable size:"
24475 #: ../tools/virt-resize.pl:121
24478 " # rm -f outdisk\n"
24479 " # truncate -s 10G outdisk\n"
24484 #: ../tools/virt-resize.pl:124
24485 msgid "Or use L<lvcreate(1)> to create a logical volume:"
24489 #: ../tools/virt-resize.pl:126
24492 " # lvcreate -L 10G -n lv_name vg_name\n"
24497 #: ../tools/virt-resize.pl:128
24498 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
24502 #: ../tools/virt-resize.pl:130
24505 " # virsh pool-list\n"
24506 " # virsh vol-create-as poolname newvol 10G\n"
24511 #: ../tools/virt-resize.pl:133
24516 #: ../tools/virt-resize.pl:135
24518 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
24519 "file) and the output disk. The output disk is the one created in the "
24524 #: ../tools/virt-resize.pl:139
24527 " # virt-resize indisk outdisk\n"
24532 #: ../tools/virt-resize.pl:141
24534 "This command just copies disk image C<indisk> to disk image C<outdisk> "
24535 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
24536 "larger, then an extra, empty partition is created at the end of the disk "
24537 "covering the extra space. If C<outdisk> is smaller, then it will give an "
24542 #: ../tools/virt-resize.pl:147
24544 "More realistically you'd want to expand existing partitions in the disk "
24545 "image by passing extra options (for the full list see the L</OPTIONS> "
24550 #: ../tools/virt-resize.pl:151
24552 "L</--expand> is the most useful option. It expands the named partition "
24553 "within the disk to fill any extra space:"
24557 #: ../tools/virt-resize.pl:154
24560 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
24565 #: ../tools/virt-resize.pl:156
24567 "(In this case, an extra partition is I<not> created at the end of the disk, "
24568 "because there will be no unused space)."
24572 #: ../tools/virt-resize.pl:159
24574 "L</--resize> is the other commonly used option. The following would "
24575 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
24576 "rest of the available space:"
24580 #: ../tools/virt-resize.pl:163
24583 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
24584 " indisk outdisk\n"
24589 #: ../tools/virt-resize.pl:166
24591 "If the expanded partition in the image contains a filesystem or LVM PV, then "
24592 "if virt-resize knows how, it will resize the contents, the equivalent of "
24593 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or "
24594 "L<ntfsresize(8)>. However virt-resize does not know how to resize some "
24595 "filesystems, so you would have to online resize them after booting the "
24596 "guest. And virt-resize also does not resize anything inside an LVM PV, it "
24597 "just resizes the PV itself and leaves the user to resize any LVs inside that "
24602 #: ../tools/virt-resize.pl:175
24603 msgid "Other options are covered below."
24607 #: ../tools/virt-resize.pl:177
24612 #: ../tools/virt-resize.pl:179
24613 msgid "Thoroughly test the new disk image I<before> discarding the old one."
24617 #: ../tools/virt-resize.pl:181
24618 msgid "If you are using libvirt, edit the XML to point at the new disk:"
24622 #: ../tools/virt-resize.pl:183
24625 " # virsh edit guestname\n"
24630 #: ../tools/virt-resize.pl:185
24632 "Change E<lt>source ...E<gt>, see "
24633 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
24637 #: ../tools/virt-resize.pl:188
24638 msgid "Then start up the domain with the new, resized disk:"
24642 #: ../tools/virt-resize.pl:190
24645 " # virsh start guestname\n"
24650 #: ../tools/virt-resize.pl:192
24652 "and check that it still works. See also the L</NOTES> section below for "
24653 "additional information."
24657 #: ../tools/virt-resize.pl:195
24658 msgid "7. Resize LVs etc inside the guest"
24662 #: ../tools/virt-resize.pl:197
24663 msgid "(This can also be done offline using L<guestfish(1)>)"
24667 #: ../tools/virt-resize.pl:199
24669 "Once the guest has booted you should see the new space available, at least "
24670 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
24671 "may need to resize LVs inside PVs, and also resize filesystem types that "
24672 "virt-resize does not know how to expand."
24676 #: ../tools/virt-resize.pl:206
24677 msgid "SHRINKING A VIRTUAL MACHINE DISK"
24681 #: ../tools/virt-resize.pl:208
24683 "Shrinking is somewhat more complex than expanding, and only an overview is "
24688 #: ../tools/virt-resize.pl:211
24690 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
24691 "filesystems). The user has to shrink content before passing the disk image "
24692 "to virt-resize, and virt-resize will check that the content has been shrunk "
24697 #: ../tools/virt-resize.pl:216
24698 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
24702 #: ../tools/virt-resize.pl:218
24704 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
24705 "steps 3 and 4 above to allocate a new disk image."
24709 #: ../tools/virt-resize.pl:221
24710 msgid "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
24714 #: ../tools/virt-resize.pl:224
24715 msgid "IGNORING OR DELETING PARTITIONS"
24719 #: ../tools/virt-resize.pl:226
24721 "virt-resize also gives a convenient way to ignore or delete partitions when "
24722 "copying from the input disk to the output disk. Ignoring a partition speeds "
24723 "up the copy where you don't care about the existing contents of a "
24724 "partition. Deleting a partition removes it completely, but note that it "
24725 "also renumbers any partitions after the one which is deleted, which can "
24726 "leave some guests unbootable."
24730 #: ../tools/virt-resize.pl:243
24731 msgid "Display help."
24735 #: ../tools/virt-resize.pl:257
24736 msgid "B<--resize part=size>"
24740 #: ../tools/virt-resize.pl:259
24742 "Resize the named partition (expanding or shrinking it) so that it has the "
24747 #: ../tools/virt-resize.pl:262
24749 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
24750 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
24751 "Exabytes; or as a percentage of the current size; or as a relative number or "
24752 "percentage. For example:"
24756 #: ../tools/virt-resize.pl:267
24759 " --resize /dev/sda2=10G\n"
24764 #: ../tools/virt-resize.pl:269
24767 " --resize /dev/sda4=90%\n"
24772 #: ../tools/virt-resize.pl:271
24775 " --resize /dev/sda2=+1G\n"
24780 #: ../tools/virt-resize.pl:273
24783 " --resize /dev/sda2=-200M\n"
24788 #: ../tools/virt-resize.pl:275
24791 " --resize /dev/sda1=+128K\n"
24796 #: ../tools/virt-resize.pl:277
24799 " --resize /dev/sda1=+10%\n"
24804 #: ../tools/virt-resize.pl:279
24807 " --resize /dev/sda1=-10%\n"
24812 #: ../tools/virt-resize.pl:281
24814 "You can increase the size of any partition. Virt-resize will expand the "
24815 "direct content of the partition if it knows how (see C<--expand> below)."
24819 #: ../tools/virt-resize.pl:285
24821 "You can only I<decrease> the size of partitions that contain filesystems or "
24822 "PVs which have already been shrunk. Virt-resize will check this has been "
24823 "done before proceeding, or else will print an error (see also "
24824 "C<--resize-force>)."
24828 #: ../tools/virt-resize.pl:290 ../tools/virt-resize.pl:382 ../tools/virt-resize.pl:399
24829 msgid "You can give this option multiple times."
24833 #: ../tools/virt-resize.pl:296
24834 msgid "B<--resize-force part=size>"
24838 #: ../tools/virt-resize.pl:298
24840 "This is the same as C<--resize> except that it will let you decrease the "
24841 "size of any partition. Generally this means you will lose any data which "
24842 "was at the end of the partition you shrink, but you may not care about that "
24843 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
24844 "as a swap partition)."
24848 #: ../tools/virt-resize.pl:304
24849 msgid "See also the C<--ignore> option."
24853 #: ../tools/virt-resize.pl:310
24854 msgid "B<--expand part>"
24858 #: ../tools/virt-resize.pl:312
24860 "Expand the named partition so it uses up all extra space (space left over "
24861 "after any other resize changes that you request have been done)."
24865 #: ../tools/virt-resize.pl:315
24867 "If virt-resize knows how, it will expand the direct content of the "
24868 "partition. For example, if the partition is an LVM PV, it will expand the "
24869 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
24870 "content it doesn't know about alone."
24874 #: ../tools/virt-resize.pl:320
24875 msgid "Currently virt-resize can resize:"
24879 #: ../tools/virt-resize.pl:326
24881 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
24886 #: ../tools/virt-resize.pl:331
24888 "NTFS filesystems contained directly in a partition, if libguestfs was "
24889 "compiled with support for NTFS."
24893 #: ../tools/virt-resize.pl:334
24895 "The filesystem must have been shut down consistently last time it was used. "
24896 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
24897 "consistency check, so at the first boot after resizing Windows will check "
24902 #: ../tools/virt-resize.pl:341
24904 "LVM PVs (physical volumes). However virt-resize does I<not> resize anything "
24905 "inside the PV. The user will have to resize LVs as desired."
24909 #: ../tools/virt-resize.pl:347 ../tools/virt-resize.pl:369
24910 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
24914 #: ../tools/virt-resize.pl:353
24915 msgid "B<--shrink part>"
24919 #: ../tools/virt-resize.pl:355
24921 "Shrink the named partition until the overall disk image fits in the "
24922 "destination. The named partition B<must> contain a filesystem or PV which "
24923 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
24924 "online tools). Virt-resize will check this and give an error if it has not "
24929 #: ../tools/virt-resize.pl:361
24931 "The amount by which the overall disk must be shrunk (after carrying out all "
24932 "other operations requested by the user) is called the \"deficit\". For "
24933 "example, a straight copy (assume no other operations) from a 5GB disk image "
24934 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
24935 "would give an error unless the user specified a partition to shrink and that "
24936 "partition had more than a gigabyte of free space."
24940 #: ../tools/virt-resize.pl:375
24941 msgid "B<--ignore part>"
24945 #: ../tools/virt-resize.pl:377
24947 "Ignore the named partition. Effectively this means the partition is "
24948 "allocated on the destination disk, but the content is not copied across from "
24949 "the source disk. The content of the partition will be blank (all zero "
24954 #: ../tools/virt-resize.pl:388
24955 msgid "B<--delete part>"
24959 #: ../tools/virt-resize.pl:390
24961 "Delete the named partition. It would be more accurate to describe this as "
24962 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
24963 "the original disk image is left intact."
24967 #: ../tools/virt-resize.pl:394
24969 "Note that when you delete a partition, then anything contained in the "
24970 "partition is also deleted. Furthermore, this causes any partitions that "
24971 "come after to be I<renumbered>, which can easily make your guest unbootable."
24975 #: ../tools/virt-resize.pl:405
24976 msgid "B<--LV-expand logvol>"
24980 #: ../tools/virt-resize.pl:407
24982 "This takes the logical volume and, as a final step, expands it to fill all "
24983 "the space available in its volume group. A typical usage, assuming a Linux "
24984 "guest with a single PV C</dev/sda2> and a root device called "
24985 "C</dev/vg_guest/lv_root> would be:"
24989 #: ../tools/virt-resize.pl:412
24992 " virt-resize indisk outdisk \\\n"
24993 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
24998 #: ../tools/virt-resize.pl:415
25000 "This would first expand the partition (and PV), and then expand the root "
25001 "device to fill the extra space in the PV."
25005 #: ../tools/virt-resize.pl:418
25007 "The contents of the LV are also resized if virt-resize knows how to do "
25008 "that. You can stop virt-resize from trying to expand the content by using "
25009 "the option C<--no-expand-content>."
25013 #: ../tools/virt-resize.pl:422
25014 msgid "Use L<virt-list-filesystems(1)> to list the filesystems in the guest."
25018 #: ../tools/virt-resize.pl:425
25020 "You can give this option multiple times, I<but> it doesn't make sense to do "
25021 "this unless the logical volumes you specify are all in different volume "
25026 #: ../tools/virt-resize.pl:433
25027 msgid "B<--no-copy-boot-loader>"
25031 #: ../tools/virt-resize.pl:435
25033 "By default, virt-resize copies over some sectors at the start of the disk "
25034 "(up to the beginning of the first partition). Commonly these sectors "
25035 "contain the Master Boot Record (MBR) and the boot loader, and are required "
25036 "in order for the guest to boot correctly."
25040 #: ../tools/virt-resize.pl:440
25042 "If you specify this flag, then this initial copy is not done. You may need "
25043 "to reinstall the boot loader in this case."
25047 #: ../tools/virt-resize.pl:448
25048 msgid "B<--no-extra-partition>"
25052 #: ../tools/virt-resize.pl:450
25054 "By default, virt-resize creates an extra partition if there is any extra, "
25055 "unused space after all resizing has happened. Use this option to prevent "
25056 "the extra partition from being created. If you do this then the extra space "
25057 "will be inaccessible until you run fdisk, parted, or some other partitioning "
25058 "tool in the guest."
25062 #: ../tools/virt-resize.pl:456
25064 "Note that if the surplus space is smaller than 10 MB, no extra partition "
25069 #: ../tools/virt-resize.pl:463
25070 msgid "B<--no-expand-content>"
25074 #: ../tools/virt-resize.pl:465
25076 "By default, virt-resize will try to expand the direct contents of "
25077 "partitions, if it knows how (see C<--expand> option above)."
25081 #: ../tools/virt-resize.pl:468
25083 "If you give the C<--no-expand-content> option then virt-resize will not "
25088 #: ../tools/virt-resize.pl:475
25089 msgid "B<-d> | B<--debug>"
25093 #: ../tools/virt-resize.pl:477 ../tools/virt-win-reg.pl:198
25094 msgid "Enable debugging messages."
25098 #: ../tools/virt-resize.pl:483
25099 msgid "B<-n> | B<--dryrun>"
25103 #: ../tools/virt-resize.pl:485
25104 msgid "Print a summary of what would be done, but don't do anything."
25108 #: ../tools/virt-resize.pl:491
25109 msgid "B<-q> | B<--quiet>"
25113 #: ../tools/virt-resize.pl:493
25114 msgid "Don't print the summary."
25118 #: ../tools/virt-resize.pl:1352
25119 msgid "\"Partition 1 does not end on cylinder boundary.\""
25123 #: ../tools/virt-resize.pl:1354
25125 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
25126 "means the partitions will not be aligned to the ancient CHS geometry. "
25127 "However CHS geometry is meaningless for disks manufactured since the early "
25128 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
25129 "cylinders is not required by any modern operating system."
25133 #: ../tools/virt-resize.pl:1361
25134 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
25138 #: ../tools/virt-resize.pl:1363
25140 "In Windows Vista and later versions, Microsoft switched to using a separate "
25141 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
25142 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
25143 "the boot partition. Doing so seems to break the guest completely. However "
25144 "expanding the second partition (ie. C: drive) should work."
25148 #: ../tools/virt-resize.pl:1370
25150 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
25151 "NTFS partitions have been expanded. This is just a safety check and (unless "
25152 "it find errors) is nothing to worry about."
25156 #: ../tools/virt-resize.pl:1374
25157 msgid "ALTERNATIVE TOOLS"
25161 #: ../tools/virt-resize.pl:1376
25163 "There are several proprietary tools for resizing partitions. We won't "
25164 "mention any here."
25168 #: ../tools/virt-resize.pl:1379
25170 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
25171 "operations on disk images. They can resize and move partitions, but I don't "
25172 "think they can do anything with the contents, and they certainly don't "
25177 #: ../tools/virt-resize.pl:1384
25179 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
25180 "but at a much lower level. You will probably end up hand-calculating sector "
25181 "offsets, which is something that virt-resize was designed to avoid. If you "
25182 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
25187 #: ../tools/virt-resize.pl:1392
25189 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)>, L<virt-df(1)>, "
25190 "L<guestfs(3)>, L<guestfish(1)>, L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, "
25191 "L<resize2fs(8)>, L<ntfsresize(8)>, L<virsh(1)>, L<parted(8)>, "
25192 "L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
25196 #: ../tools/virt-tar.pl:34
25197 msgid "virt-tar - Extract or upload files to a virtual machine"
25201 #: ../tools/virt-tar.pl:38
25204 " virt-tar [--options] -x domname directory tarball\n"
25209 #: ../tools/virt-tar.pl:40
25212 " virt-tar [--options] -u domname tarball directory\n"
25217 #: ../tools/virt-tar.pl:42
25220 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
25225 #: ../tools/virt-tar.pl:44
25228 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
25233 #: ../tools/virt-tar.pl:48
25234 msgid "Download C</home> from the VM into a local tarball:"
25238 #: ../tools/virt-tar.pl:50
25241 " virt-tar -x domname /home home.tar\n"
25246 #: ../tools/virt-tar.pl:52
25249 " virt-tar -zx domname /home home.tar.gz\n"
25254 #: ../tools/virt-tar.pl:54
25255 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
25259 #: ../tools/virt-tar.pl:56
25262 " virt-tar -u domname uploadstuff.tar /tmp\n"
25267 #: ../tools/virt-tar.pl:58
25270 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
25275 #: ../tools/virt-tar.pl:62
25277 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
25278 "virtual machines. If you do this, you risk disk corruption in the VM. "
25279 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
25283 #: ../tools/virt-tar.pl:67
25285 "You can use C<-x> (extract) on live virtual machines, but you might get "
25286 "inconsistent results or errors if there is filesystem activity inside the "
25287 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
25288 "work, but the only way to guarantee consistent results is if the virtual "
25289 "machine is shut down."
25293 #: ../tools/virt-tar.pl:75
25295 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
25296 "parts of a guest filesystem. There are many possibilities: making backups, "
25297 "uploading data files, snooping on guest activity, fixing or customizing "
25302 #: ../tools/virt-tar.pl:80
25304 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
25305 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
25306 "should look at the L<guestfish(1)> tool."
25310 #: ../tools/virt-tar.pl:84
25312 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
25313 "its contents (recursively) from the virtual machine into a local tarball. "
25314 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
25315 "virtual machine. You cannot use these two options together."
25319 #: ../tools/virt-tar.pl:90
25321 "In addition, you may need to use the C<-z> (gZip) option to enable "
25322 "compression. When uploading, you have to specify C<-z> if the upload file "
25323 "is compressed because virt-tar won't detect this on its own."
25327 #: ../tools/virt-tar.pl:94
25329 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
25330 "example it cannot do PKZip files or bzip2 compression. If you want that "
25331 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
25332 "the L<libguestfs(3)> API)."
25336 #: ../tools/virt-tar.pl:135
25337 msgid "B<-x> | B<--extract> | B<--download>"
25341 #: ../tools/virt-tar.pl:137
25342 msgid "B<-u> | B<--upload>"
25346 #: ../tools/virt-tar.pl:139
25348 "Use C<-x> to extract (download) a directory from a virtual machine to a "
25353 #: ../tools/virt-tar.pl:142
25355 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
25356 "Please read the L</WARNING> section above before using this option."
25360 #: ../tools/virt-tar.pl:146
25361 msgid "You must specify exactly one of these options."
25365 #: ../tools/virt-tar.pl:152
25366 msgid "B<-z> | B<--gzip>"
25370 #: ../tools/virt-tar.pl:154
25371 msgid "Specify that the input or output tarball is gzip-compressed."
25375 #: ../tools/virt-tar.pl:259
25377 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
25378 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
25379 "L<http://libguestfs.org/>."
25383 #: ../tools/virt-win-reg.pl:38
25385 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
25390 #: ../tools/virt-win-reg.pl:42
25393 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
25398 #: ../tools/virt-win-reg.pl:44
25401 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
25406 #: ../tools/virt-win-reg.pl:46
25409 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
25414 #: ../tools/virt-win-reg.pl:48
25417 " virt-win-reg --merge domname [input.reg ...]\n"
25422 #: ../tools/virt-win-reg.pl:50
25425 " virt-win-reg [--options] disk.img ... # instead of domname\n"
25430 #: ../tools/virt-win-reg.pl:54
25432 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
25433 "virtual machines. If you do this, you I<will> get irreversible disk "
25434 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
25435 "but doesn't catch all cases."
25439 #: ../tools/virt-win-reg.pl:59
25441 "Modifying the Windows Registry is an inherently risky operation. The format "
25442 "is deliberately obscure and undocumented, and Registry changes can leave the "
25443 "system unbootable. Therefore when using the C<--merge> option, make sure "
25444 "you have a reliable backup first."
25448 #: ../tools/virt-win-reg.pl:66
25450 "This program can export and merge Windows Registry entries from a Windows "
25455 #: ../tools/virt-win-reg.pl:69
25457 "The first parameter is the libvirt guest name or the raw disk image of a "
25462 #: ../tools/virt-win-reg.pl:72
25464 "If C<--merge> is I<not> specified, then the chosen registry key is "
25465 "displayed/exported (recursively). For example:"
25469 #: ../tools/virt-win-reg.pl:75
25472 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
25477 #: ../tools/virt-win-reg.pl:77
25478 msgid "You can also display single values from within registry keys, for example:"
25482 #: ../tools/virt-win-reg.pl:80
25485 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
25486 " $ virt-win-reg Windows7 $cvkey ProductName\n"
25487 " Windows 7 Enterprise\n"
25492 #: ../tools/virt-win-reg.pl:84
25494 "With C<--merge>, you can merge a textual regedit file into the Windows "
25499 #: ../tools/virt-win-reg.pl:87
25502 " $ virt-win-reg --merge Windows7 changes.reg\n"
25507 #: ../tools/virt-win-reg.pl:89
25508 msgid "SUPPORTED SYSTEMS"
25512 #: ../tools/virt-win-reg.pl:91
25514 "The program currently supports Windows NT-derived guests starting with "
25515 "Windows XP through to at least Windows 7."
25519 #: ../tools/virt-win-reg.pl:94
25521 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, "
25522 "C<HKEY_LOCAL_MACHINE\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, "
25523 "C<HKEY_LOCAL_MACHINE\\SYSTEM> and C<HKEY_USERS\\.DEFAULT>."
25527 #: ../tools/virt-win-reg.pl:98
25529 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
25534 #: ../tools/virt-win-reg.pl:101
25536 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
25541 #: ../tools/virt-win-reg.pl:104
25546 #: ../tools/virt-win-reg.pl:106
25548 "This program is only meant for simple access to the registry. If you want "
25549 "to do complicated things with the registry, we suggest you download the "
25550 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
25551 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
25552 "L<hivexregedit(1)>."
25556 #: ../tools/virt-win-reg.pl:112
25561 #: ../tools/virt-win-reg.pl:114
25563 "C<virt-win-reg> expects that regedit files have already been reencoded in "
25564 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
25565 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
25566 "with Windows-style line endings, you may need to reencode the whole file "
25567 "before or after processing."
25571 #: ../tools/virt-win-reg.pl:120
25573 "To reencode a file from Windows format to Linux (before processing it with "
25574 "the C<--merge> option), you would do something like this:"
25578 #: ../tools/virt-win-reg.pl:123
25581 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
25586 #: ../tools/virt-win-reg.pl:125
25588 "To go in the opposite direction, after exporting and before sending the file "
25589 "to a Windows user, do something like this:"
25593 #: ../tools/virt-win-reg.pl:128
25596 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
25601 #: ../tools/virt-win-reg.pl:130
25602 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
25606 #: ../tools/virt-win-reg.pl:132
25608 "If you are unsure about the current encoding, use the L<file(1)> command. "
25609 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
25610 "Windows-style (CRLF) line endings, like this:"
25614 #: ../tools/virt-win-reg.pl:136
25617 " $ file software.reg\n"
25618 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
25619 " with CRLF line terminators\n"
25624 #: ../tools/virt-win-reg.pl:140
25625 msgid "This file would need conversion before you could C<--merge> it."
25629 #: ../tools/virt-win-reg.pl:142
25630 msgid "SHELL QUOTING"
25634 #: ../tools/virt-win-reg.pl:144
25636 "Be careful when passing parameters containing C<\\> (backslash) in the "
25637 "shell. Usually you will have to use 'single quotes' or double backslashes "
25638 "(but not both) to protect them from the shell."
25642 #: ../tools/virt-win-reg.pl:148
25643 msgid "Paths and value names are case-insensitive."
25647 #: ../tools/virt-win-reg.pl:150
25648 msgid "CurrentControlSet etc."
25652 #: ../tools/virt-win-reg.pl:152
25654 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
25655 "Registry at the level of the hive file, and therefore you cannot modify "
25660 #: ../tools/virt-win-reg.pl:156
25662 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
25663 "circumstances it might refer to another control set. The way to find out is "
25664 "to look at the C<HKLM\\SYSTEM\\Select> key:"
25668 #: ../tools/virt-win-reg.pl:160
25671 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
25672 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
25673 " \"Current\"=dword:00000001\n"
25674 " \"Default\"=dword:00000001\n"
25675 " \"Failed\"=dword:00000000\n"
25676 " \"LastKnownGood\"=dword:00000002\n"
25681 #: ../tools/virt-win-reg.pl:167
25682 msgid "\"Default\" is the one which Windows will choose when it boots."
25686 #: ../tools/virt-win-reg.pl:169
25687 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
25691 #: ../tools/virt-win-reg.pl:216
25696 #: ../tools/virt-win-reg.pl:218
25698 "In merge mode, this merges a textual regedit file into the Windows Registry "
25699 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
25700 "displays or exports Registry entries instead."
25704 #: ../tools/virt-win-reg.pl:222
25706 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
25707 "result in disk corruption. However exporting (without this flag) is always "
25712 #: ../tools/virt-win-reg.pl:230
25713 msgid "B<--encoding> UTF-16LE|ASCII"
25717 #: ../tools/virt-win-reg.pl:232
25719 "When merging (only), you may need to specify the encoding for strings to be "
25720 "used in the hive file. This is explained in detail in "
25721 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
25725 #: ../tools/virt-win-reg.pl:236
25727 "The default is to use UTF-16LE, which should work with recent versions of "
25732 #: ../tools/virt-win-reg.pl:463
25734 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
25735 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
25736 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
25737 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
25741 #: ../tools/virt-win-reg.pl:481
25744 " export LIBGUESTFS_DEBUG=1\n"
25745 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
25750 #: ../tools/virt-win-reg.pl:484
25752 "Attach /tmp/virt-win-reg.log to a new bug report at "
25753 "L<https://bugzilla.redhat.com/>"