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.21\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2010-10-01 21:02+0200\n"
12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=utf-8\n"
17 "Content-Transfer-Encoding: ENCODING"
20 #: ../src/guestfs.pod:1 ../fish/guestfish.pod:1 ../test-tool/libguestfs-test-tool.pod:1 ../fuse/guestmount.pod:1 ../inspector/virt-inspector.pl:36 ../tools/virt-edit.pl:31 ../tools/virt-win-reg.pl:34 ../tools/virt-df.pl:32 ../tools/virt-ls.pl:31 ../tools/virt-resize.pl:38 ../tools/virt-list-filesystems.pl:28 ../tools/virt-cat.pl:30 ../tools/virt-tar.pl:30 ../tools/virt-rescue.pl:29 ../tools/virt-make-fs.pl:33 ../tools/virt-list-partitions.pl:28
25 #: ../src/guestfs.pod:3 ../fish/guestfish.pod:3 ../test-tool/libguestfs-test-tool.pod:3 ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pl:38 ../tools/virt-edit.pl:33 ../tools/virt-win-reg.pl:36 ../tools/virt-df.pl:34 ../tools/virt-ls.pl:33 ../tools/virt-resize.pl:40 ../tools/virt-list-filesystems.pl:30 ../tools/virt-cat.pl:32 ../tools/virt-tar.pl:32 ../tools/virt-rescue.pl:31 ../tools/virt-make-fs.pl:35 ../tools/virt-list-partitions.pl:30
30 #: ../src/guestfs.pod:5
31 msgid "guestfs - Library for accessing and modifying virtual machine images"
35 #: ../src/guestfs.pod:7 ../fish/guestfish.pod:7 ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7 ../inspector/virt-inspector.pl:42 ../tools/virt-edit.pl:37 ../tools/virt-win-reg.pl:40 ../tools/virt-df.pl:38 ../tools/virt-ls.pl:37 ../tools/virt-resize.pl:44 ../tools/virt-list-filesystems.pl:34 ../tools/virt-cat.pl:36 ../tools/virt-tar.pl:36 ../tools/virt-rescue.pl:35 ../tools/virt-make-fs.pl:39 ../tools/virt-list-partitions.pl:34
40 #: ../src/guestfs.pod:9
43 " #include <guestfs.h>\n"
48 #: ../src/guestfs.pod:11
51 " guestfs_h *g = guestfs_create ();\n"
52 " guestfs_add_drive (g, \"guest.img\");\n"
53 " guestfs_launch (g);\n"
54 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
55 " guestfs_touch (g, \"/hello\");\n"
56 " guestfs_umount (g, \"/\");\n"
57 " guestfs_sync (g);\n"
58 " guestfs_close (g);\n"
63 #: ../src/guestfs.pod:20
66 " cc prog.c -o prog -lguestfs\n"
68 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
73 #: ../src/guestfs.pod:24 ../fish/guestfish.pod:30 ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:16 ../inspector/virt-inspector.pl:48 ../tools/virt-edit.pl:51 ../tools/virt-win-reg.pl:64 ../tools/virt-df.pl:46 ../tools/virt-ls.pl:43 ../tools/virt-resize.pl:50 ../tools/virt-list-filesystems.pl:40 ../tools/virt-cat.pl:42 ../tools/virt-tar.pl:73 ../tools/virt-rescue.pl:51 ../tools/virt-make-fs.pl:47 ../tools/virt-list-partitions.pl:40
78 #: ../src/guestfs.pod:26
80 "Libguestfs is a library for accessing and modifying guest disk images. "
81 "Amongst the things this is good for: making batch configuration changes to "
82 "guests, getting disk used/free statistics (see also: virt-df), migrating "
83 "between virtualization systems (see also: virt-p2v), performing partial "
84 "backups, performing partial guest clones, cloning guests and changing "
85 "registry/UUID/hostname info, and much else besides."
89 #: ../src/guestfs.pod:34
91 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
92 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
93 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
98 #: ../src/guestfs.pod:39
100 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
101 "what filesystem is in each LV, etc.). It can also run commands in the "
102 "context of the guest. Also you can access filesystems over FUSE."
106 #: ../src/guestfs.pod:44
108 "Libguestfs is a library that can be linked with C and C++ management "
109 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
110 "PHP, Haskell or C#). You can also use it from shell scripts or the command "
115 #: ../src/guestfs.pod:49
117 "You don't need to be root to use libguestfs, although obviously you do need "
118 "enough permissions to access the disk images."
122 #: ../src/guestfs.pod:52
124 "Libguestfs is a large API because it can do many things. For a gentle "
125 "introduction, please read the L</API OVERVIEW> section next."
129 #: ../src/guestfs.pod:55
134 #: ../src/guestfs.pod:57
136 "This section provides a gentler overview of the libguestfs API. We also try "
137 "to group API calls together, where that may not be obvious from reading "
138 "about the individual calls in the main section of this manual."
142 #: ../src/guestfs.pod:62
147 #: ../src/guestfs.pod:64
149 "Before you can use libguestfs calls, you have to create a handle. Then you "
150 "must add at least one disk image to the handle, followed by launching the "
151 "handle, then performing whatever operations you want, and finally closing "
152 "the handle. By convention we use the single letter C<g> for the name of the "
153 "handle variable, although of course you can use any name you want."
157 #: ../src/guestfs.pod:71
158 msgid "The general structure of all libguestfs-using programs looks like this:"
162 #: ../src/guestfs.pod:74
165 " guestfs_h *g = guestfs_create ();\n"
170 #: ../src/guestfs.pod:76
173 " /* Call guestfs_add_drive additional times if there are\n"
174 " * multiple disk images.\n"
176 " guestfs_add_drive (g, \"guest.img\");\n"
181 #: ../src/guestfs.pod:81
184 " /* Most manipulation calls won't work until you've launched\n"
185 " * the handle 'g'. You have to do this _after_ adding drives\n"
186 " * and _before_ other commands.\n"
188 " guestfs_launch (g);\n"
193 #: ../src/guestfs.pod:87
196 " /* Now you can examine what partitions, LVs etc are available.\n"
198 " char **partitions = guestfs_list_partitions (g);\n"
199 " char **logvols = guestfs_lvs (g);\n"
204 #: ../src/guestfs.pod:92
207 " /* To access a filesystem in the image, you must mount it.\n"
209 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
214 #: ../src/guestfs.pod:96
217 " /* Now you can perform filesystem actions on the guest\n"
220 " guestfs_touch (g, \"/hello\");\n"
225 #: ../src/guestfs.pod:101
228 " /* You only need to call guestfs_sync if you have made\n"
229 " * changes to the guest image. (But if you've made changes\n"
230 " * then you *must* sync). See also: guestfs_umount and\n"
231 " * guestfs_umount_all calls.\n"
233 " guestfs_sync (g);\n"
238 #: ../src/guestfs.pod:108
241 " /* Close the handle 'g'. */\n"
242 " guestfs_close (g);\n"
247 #: ../src/guestfs.pod:111
249 "The code above doesn't include any error checking. In real code you should "
250 "check return values carefully for errors. In general all functions that "
251 "return integers return C<-1> on error, and all functions that return "
252 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
253 "how to handle errors, and consult the documentation for each function call "
254 "below to see precisely how they return error indications."
258 #: ../src/guestfs.pod:119
263 #: ../src/guestfs.pod:121
265 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
266 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
267 "actual block device, or simply an empty file of zeroes that you have created "
268 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
273 #: ../src/guestfs.pod:127
275 "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:1254 ../src/guestfs.pod:1259 ../src/guestfs.pod:1263 ../src/guestfs.pod:1365 ../src/guestfs.pod:1369 ../src/guestfs.pod:1373 ../src/guestfs.pod:1378 ../src/guestfs.pod:1386 ../src/guestfs.pod:1405 ../src/guestfs.pod:1413 ../src/guestfs.pod:1643 ../src/guestfs.pod:1649 ../src/guestfs.pod:1654 ../src/guestfs.pod:1660 ../src/guestfs.pod:1767 ../src/guestfs.pod:1771 ../src/guestfs.pod:1775 ../src/guestfs.pod:1779 ../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:1285 ../src/guestfs-actions.pod:1289 ../src/guestfs-actions.pod:1293 ../src/guestfs-actions.pod:1297 ../src/guestfs-actions.pod:1305 ../src/guestfs-actions.pod:1309 ../src/guestfs-actions.pod:1313 ../src/guestfs-actions.pod:1323 ../src/guestfs-actions.pod:1327 ../src/guestfs-actions.pod:1331 ../src/guestfs-actions.pod:1454 ../src/guestfs-actions.pod:1458 ../src/guestfs-actions.pod:1463 ../src/guestfs-actions.pod:1468 ../src/guestfs-actions.pod:1520 ../src/guestfs-actions.pod:1524 ../src/guestfs-actions.pod:1529 ../fish/guestfish.pod:338 ../fish/guestfish.pod:342 ../fish/guestfish.pod:346 ../fish/guestfish.pod:350 ../fish/guestfish-actions.pod:15 ../fish/guestfish-actions.pod:22 ../fish/guestfish-actions.pod:306 ../fish/guestfish-actions.pod:314 ../fish/guestfish-actions.pod:321 ../fish/guestfish-actions.pod:328 ../fish/guestfish-actions.pod:1023 ../fish/guestfish-actions.pod:1027 ../fish/guestfish-actions.pod:1031 ../fish/guestfish-actions.pod:1035 ../fish/guestfish-actions.pod:1043 ../fish/guestfish-actions.pod:1047 ../fish/guestfish-actions.pod:1051 ../fish/guestfish-actions.pod:1061 ../fish/guestfish-actions.pod:1065 ../fish/guestfish-actions.pod:1069 ../fish/guestfish-actions.pod:1159 ../fish/guestfish-actions.pod:1163 ../fish/guestfish-actions.pod:1168 ../fish/guestfish-actions.pod:1173 ../fish/guestfish-actions.pod:1215 ../fish/guestfish-actions.pod:1219 ../fish/guestfish-actions.pod:1224 ../tools/virt-df.pl:144 ../tools/virt-df.pl:150 ../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:589
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:750
1512 msgid "Ambiguity between devices and paths"
1516 #: ../src/guestfs.pod:752
1518 "There is a subtle ambiguity in the API between a device name "
1519 "(eg. C</dev/sdb2>) and a similar pathname. A file might just happen to be "
1520 "called C<sdb2> in the directory C</dev> (consider some non-Unix VM image)."
1524 #: ../src/guestfs.pod:757
1526 "In the current API we usually resolve this ambiguity by having two separate "
1527 "calls, for example L</guestfs_checksum> and L</guestfs_checksum_device>. "
1528 "Some API calls are ambiguous and (incorrectly) resolve the problem by "
1529 "detecting if the path supplied begins with C</dev/>."
1533 #: ../src/guestfs.pod:763
1535 "To avoid both the ambiguity and the need to duplicate some calls, we could "
1536 "make paths/devices into structured names. One way to do this would be to "
1537 "use a notation like grub (C<hd(0,0)>), although nobody really likes this "
1538 "aspect of grub. Another way would be to use a structured type, equivalent "
1539 "to this OCaml type:"
1543 #: ../src/guestfs.pod:769
1546 " type path = Path of string | Device of int | Partition of int * int\n"
1551 #: ../src/guestfs.pod:771
1552 msgid "which would allow you to pass arguments like:"
1556 #: ../src/guestfs.pod:773
1559 " Path \"/foo/bar\"\n"
1560 " Device 1 (* /dev/sdb, or perhaps /dev/sda *)\n"
1561 " Partition (1, 2) (* /dev/sdb2 (or is it /dev/sda2 or /dev/sdb3?) *)\n"
1562 " Path \"/dev/sdb2\" (* not a device *)\n"
1567 #: ../src/guestfs.pod:778
1569 "As you can see there are still problems to resolve even with this "
1570 "representation. Also consider how it might work in guestfish."
1574 #: ../src/guestfs.pod:783
1575 msgid "PROTOCOL LIMITS"
1579 #: ../src/guestfs.pod:785
1581 "Internally libguestfs uses a message-based protocol to pass API calls and "
1582 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1583 "plenty more detail about this). The maximum message size used by the "
1584 "protocol is slightly less than 4 MB. For some API calls you may need to be "
1585 "aware of this limit. The API calls which may be affected are individually "
1586 "documented, with a link back to this section of the documentation."
1590 #: ../src/guestfs.pod:793
1592 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1593 "a simple string. Because this string is at some point internally encoded as "
1594 "a message, the maximum size that it can return is slightly under 4 MB. If "
1595 "the requested file is larger than this then you will get an error."
1599 #: ../src/guestfs.pod:799
1601 "In order to transfer large files into and out of the guest filesystem, you "
1602 "need to use particular calls that support this. The sections L</UPLOADING> "
1603 "and L</DOWNLOADING> document how to do this."
1607 #: ../src/guestfs.pod:803
1609 "You might also consider mounting the disk image using our FUSE filesystem "
1610 "support (L<guestmount(1)>)."
1614 #: ../src/guestfs.pod:806
1615 msgid "KEYS AND PASSPHRASES"
1619 #: ../src/guestfs.pod:808
1621 "Certain libguestfs calls take a parameter that contains sensitive key "
1622 "material, passed in as a C string."
1626 #: ../src/guestfs.pod:811
1628 "In the future we would hope to change the libguestfs implementation so that "
1629 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1630 "swap. However this is I<not> done at the moment, because of the complexity "
1631 "of such an implementation."
1635 #: ../src/guestfs.pod:816
1637 "Therefore you should be aware that any key parameter you pass to libguestfs "
1638 "might end up being written out to the swap partition. If this is a concern, "
1639 "scrub the swap partition or don't use libguestfs on encrypted devices."
1643 #: ../src/guestfs.pod:821
1644 msgid "CONNECTION MANAGEMENT"
1648 #: ../src/guestfs.pod:823
1653 #: ../src/guestfs.pod:825
1655 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
1656 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
1657 "handle and release all resources used."
1661 #: ../src/guestfs.pod:829
1663 "For information on using multiple handles and threads, see the section "
1664 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> below."
1668 #: ../src/guestfs.pod:832
1669 msgid "guestfs_create"
1673 #: ../src/guestfs.pod:834
1676 " guestfs_h *guestfs_create (void);\n"
1681 #: ../src/guestfs.pod:836
1682 msgid "Create a connection handle."
1686 #: ../src/guestfs.pod:838
1687 msgid "You have to call L</guestfs_add_drive> on the handle at least once."
1691 #: ../src/guestfs.pod:840
1693 "This function returns a non-NULL pointer to a handle on success or NULL on "
1698 #: ../src/guestfs.pod:843
1699 msgid "After configuring the handle, you have to call L</guestfs_launch>."
1703 #: ../src/guestfs.pod:845
1705 "You may also want to configure error handling for the handle. See L</ERROR "
1706 "HANDLING> section below."
1710 #: ../src/guestfs.pod:848
1711 msgid "guestfs_close"
1715 #: ../src/guestfs.pod:850
1718 " void guestfs_close (guestfs_h *g);\n"
1723 #: ../src/guestfs.pod:852
1724 msgid "This closes the connection handle and frees up all resources used."
1728 #: ../src/guestfs.pod:854
1729 msgid "ERROR HANDLING"
1733 #: ../src/guestfs.pod:856
1735 "The convention in all functions that return C<int> is that they return C<-1> "
1736 "to indicate an error. You can get additional information on errors by "
1737 "calling L</guestfs_last_error> and/or by setting up an error handler with "
1738 "L</guestfs_set_error_handler>."
1742 #: ../src/guestfs.pod:861
1743 msgid "The default error handler prints the information string to C<stderr>."
1747 #: ../src/guestfs.pod:863
1749 "Out of memory errors are handled differently. The default action is to call "
1750 "L<abort(3)>. If this is undesirable, then you can set a handler using "
1751 "L</guestfs_set_out_of_memory_handler>."
1755 #: ../src/guestfs.pod:867
1756 msgid "guestfs_last_error"
1760 #: ../src/guestfs.pod:869
1763 " const char *guestfs_last_error (guestfs_h *g);\n"
1768 #: ../src/guestfs.pod:871
1770 "This returns the last error message that happened on C<g>. If there has not "
1771 "been an error since the handle was created, then this returns C<NULL>."
1775 #: ../src/guestfs.pod:875
1777 "The lifetime of the returned string is until the next error occurs, or "
1778 "L</guestfs_close> is called."
1782 #: ../src/guestfs.pod:878
1784 "The error string is not localized (ie. is always in English), because this "
1785 "makes searching for error messages in search engines give the largest number "
1790 #: ../src/guestfs.pod:882
1791 msgid "guestfs_set_error_handler"
1795 #: ../src/guestfs.pod:884
1798 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
1800 " const char *msg);\n"
1801 " void guestfs_set_error_handler (guestfs_h *g,\n"
1802 " guestfs_error_handler_cb cb,\n"
1808 #: ../src/guestfs.pod:891
1810 "The callback C<cb> will be called if there is an error. The parameters "
1811 "passed to the callback are an opaque data pointer and the error message "
1816 #: ../src/guestfs.pod:895
1818 "Note that the message string C<msg> is freed as soon as the callback "
1819 "function returns, so if you want to stash it somewhere you must make your "
1824 #: ../src/guestfs.pod:899
1825 msgid "The default handler prints messages on C<stderr>."
1829 #: ../src/guestfs.pod:901
1830 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
1834 #: ../src/guestfs.pod:903
1835 msgid "guestfs_get_error_handler"
1839 #: ../src/guestfs.pod:905
1842 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
1843 " void **opaque_rtn);\n"
1848 #: ../src/guestfs.pod:908
1849 msgid "Returns the current error handler callback."
1853 #: ../src/guestfs.pod:910
1854 msgid "guestfs_set_out_of_memory_handler"
1858 #: ../src/guestfs.pod:912
1861 " typedef void (*guestfs_abort_cb) (void);\n"
1862 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
1863 " guestfs_abort_cb);\n"
1868 #: ../src/guestfs.pod:916
1870 "The callback C<cb> will be called if there is an out of memory situation. "
1871 "I<Note this callback must not return>."
1875 #: ../src/guestfs.pod:919
1876 msgid "The default is to call L<abort(3)>."
1880 #: ../src/guestfs.pod:921
1881 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
1885 #: ../src/guestfs.pod:924
1886 msgid "guestfs_get_out_of_memory_handler"
1890 #: ../src/guestfs.pod:926
1893 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
1898 #: ../src/guestfs.pod:928
1899 msgid "This returns the current out of memory handler."
1903 #: ../src/guestfs.pod:930
1908 #: ../src/guestfs.pod:932
1910 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
1915 #: ../src/guestfs.pod:935
1917 "By default it looks for these in the directory C<$libdir/guestfs> "
1918 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
1922 #: ../src/guestfs.pod:938
1924 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
1925 "to change the directories that libguestfs will search in. The value is a "
1926 "colon-separated list of paths. The current directory is I<not> searched "
1927 "unless the path contains an empty element or C<.>. For example "
1928 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
1929 "then C</usr/lib/guestfs>."
1933 #: ../src/guestfs.pod:945
1934 msgid "HIGH-LEVEL API ACTIONS"
1938 #: ../src/guestfs.pod:947
1939 msgid "ABI GUARANTEE"
1943 #: ../src/guestfs.pod:949
1945 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
1946 "actions as outlined in this section. Although we will deprecate some "
1947 "actions, for example if they get replaced by newer calls, we will keep the "
1948 "old actions forever. This allows you the developer to program in confidence "
1949 "against the libguestfs API."
1953 #: ../src/guestfs.pod:955 ../fish/guestfish.pod:819
1958 #: ../src/guestfs.pod:957
1963 #: ../src/guestfs.pod:959
1968 #: ../src/guestfs.pod:961
1969 msgid "AVAILABILITY"
1973 #: ../src/guestfs.pod:963
1974 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
1978 #: ../src/guestfs.pod:965
1980 "Using L</guestfs_available> you can test availability of the following "
1981 "groups of functions. This test queries the appliance to see if the "
1982 "appliance you are currently using supports the functionality."
1986 #: ../src/guestfs.pod:970
1987 msgid "@AVAILABILITY@"
1991 #: ../src/guestfs.pod:972
1992 msgid "GUESTFISH supported COMMAND"
1996 #: ../src/guestfs.pod:974
1998 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
1999 "prints out the available groups and whether they are supported by this build "
2000 "of libguestfs. Note however that you have to do C<run> first."
2004 #: ../src/guestfs.pod:979
2005 msgid "SINGLE CALLS AT COMPILE TIME"
2009 #: ../src/guestfs.pod:981
2011 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
2012 "function, such as:"
2016 #: ../src/guestfs.pod:984
2019 " #define LIBGUESTFS_HAVE_DD 1\n"
2024 #: ../src/guestfs.pod:986
2025 msgid "if L</guestfs_dd> is available."
2029 #: ../src/guestfs.pod:988
2031 "Before version 1.5.8, if you needed to test whether a single libguestfs "
2032 "function is available at compile time, we recommended using build tools such "
2033 "as autoconf or cmake. For example in autotools you could use:"
2037 #: ../src/guestfs.pod:993
2040 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
2041 " AC_CHECK_FUNCS([guestfs_dd])\n"
2046 #: ../src/guestfs.pod:996
2048 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
2053 #: ../src/guestfs.pod:999
2054 msgid "SINGLE CALLS AT RUN TIME"
2058 #: ../src/guestfs.pod:1001
2060 "Testing at compile time doesn't guarantee that a function really exists in "
2061 "the library. The reason is that you might be dynamically linked against a "
2062 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
2063 "This situation unfortunately results in a segmentation fault, which is a "
2064 "shortcoming of the C dynamic linking system itself."
2068 #: ../src/guestfs.pod:1008
2070 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2071 "in this example program (note that you still need the compile time check as "
2076 #: ../src/guestfs.pod:1012
2079 " #include <stdio.h>\n"
2080 " #include <stdlib.h>\n"
2081 " #include <unistd.h>\n"
2082 " #include <dlfcn.h>\n"
2083 " #include <guestfs.h>\n"
2088 #: ../src/guestfs.pod:1018
2093 " #ifdef LIBGUESTFS_HAVE_DD\n"
2095 " int has_function;\n"
2100 #: ../src/guestfs.pod:1024
2103 " /* Test if the function guestfs_dd is really available. */\n"
2104 " dl = dlopen (NULL, RTLD_LAZY);\n"
2106 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2107 " exit (EXIT_FAILURE);\n"
2109 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2115 #: ../src/guestfs.pod:1033
2118 " if (!has_function)\n"
2119 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2121 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2122 " /* Now it's safe to call\n"
2123 " guestfs_dd (g, \"foo\", \"bar\");\n"
2127 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2134 #: ../src/guestfs.pod:1046
2136 "You may think the above is an awful lot of hassle, and it is. There are "
2137 "other ways outside of the C linking system to ensure that this kind of "
2138 "incompatibility never arises, such as using package versioning:"
2142 #: ../src/guestfs.pod:1051
2145 " Requires: libguestfs >= 1.0.80\n"
2150 #: ../src/guestfs.pod:1053 ../src/guestfs.pod:1058
2155 #: ../src/guestfs.pod:1055
2157 "<!-- old anchor for the next section --> <a "
2158 "name=\"state_machine_and_low_level_event_api\"/>"
2162 #: ../src/guestfs.pod:1060
2163 msgid "ARCHITECTURE"
2167 #: ../src/guestfs.pod:1062
2169 "Internally, libguestfs is implemented by running an appliance (a special "
2170 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
2171 "process of the main program."
2175 #: ../src/guestfs.pod:1066
2178 " ___________________\n"
2180 " | main program |\n"
2182 " | | child process / appliance\n"
2183 " | | __________________________\n"
2185 " +-------------------+ RPC | +-----------------+ |\n"
2186 " | libguestfs <--------------------> guestfsd | |\n"
2187 " | | | +-----------------+ |\n"
2188 " \\___________________/ | | Linux kernel | |\n"
2189 " | +--^--------------+ |\n"
2190 " \\_________|________________/\n"
2196 " \\______________/\n"
2201 #: ../src/guestfs.pod:1086
2203 "The library, linked to the main program, creates the child process and hence "
2204 "the appliance in the L</guestfs_launch> function."
2208 #: ../src/guestfs.pod:1089
2210 "Inside the appliance is a Linux kernel and a complete stack of userspace "
2211 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
2212 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
2213 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
2214 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
2215 "attached to the qemu process which translates device access by the "
2216 "appliance's Linux kernel into accesses to the image."
2220 #: ../src/guestfs.pod:1098
2222 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
2223 "Although the disk image you are attached to might also be used by some "
2224 "virtual machine, libguestfs doesn't know or care about this. (But you will "
2225 "care if both libguestfs's qemu process and your virtual machine are trying "
2226 "to update the disk image at the same time, since these usually results in "
2227 "massive disk corruption)."
2231 #: ../src/guestfs.pod:1105
2232 msgid "STATE MACHINE"
2236 #: ../src/guestfs.pod:1107
2237 msgid "libguestfs uses a state machine to model the child process:"
2241 #: ../src/guestfs.pod:1109
2253 " / | \\ \\ guestfs_launch\n"
2254 " / | _\\__V______\n"
2256 " / | | LAUNCHING |\n"
2257 " / | \\___________/\n"
2259 " / | guestfs_launch\n"
2261 " ______ / __|____V\n"
2262 " / \\ ------> / \\\n"
2263 " | BUSY | | READY |\n"
2264 " \\______/ <------ \\________/\n"
2269 #: ../src/guestfs.pod:1131
2271 "The normal transitions are (1) CONFIG (when the handle is created, but there "
2272 "is no child process), (2) LAUNCHING (when the child process is booting up), "
2273 "(3) alternating between READY and BUSY as commands are issued to, and "
2274 "carried out by, the child process."
2278 #: ../src/guestfs.pod:1136
2280 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
2281 "asynchronously at any time (eg. due to some internal error), and that causes "
2282 "the state to transition back to CONFIG."
2286 #: ../src/guestfs.pod:1140
2288 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
2289 "issued when in the CONFIG state."
2293 #: ../src/guestfs.pod:1143
2295 "The API offers one call that goes from CONFIG through LAUNCHING to READY. "
2296 "L</guestfs_launch> blocks until the child process is READY to accept "
2297 "commands (or until some failure or timeout). L</guestfs_launch> internally "
2298 "moves the state from CONFIG to LAUNCHING while it is running."
2302 #: ../src/guestfs.pod:1149
2304 "API actions such as L</guestfs_mount> can only be issued when in the READY "
2305 "state. These API calls block waiting for the command to be carried out "
2306 "(ie. the state to transition to BUSY and then back to READY). There are no "
2307 "non-blocking versions, and no way to issue more than one command per handle "
2312 #: ../src/guestfs.pod:1155
2314 "Finally, the child process sends asynchronous messages back to the main "
2315 "program, such as kernel log messages. You can register a callback to "
2316 "receive these messages."
2320 #: ../src/guestfs.pod:1159
2321 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
2325 #: ../src/guestfs.pod:1161
2327 "The child process generates events in some situations. Current events "
2328 "include: receiving a log message, the child process exits."
2332 #: ../src/guestfs.pod:1164
2334 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
2339 #: ../src/guestfs.pod:1167
2341 "Only I<one callback of each type> can be registered for each handle. "
2342 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
2343 "that type. Cancel all callbacks of this type by calling this function with "
2344 "C<cb> set to C<NULL>."
2348 #: ../src/guestfs.pod:1172
2349 msgid "guestfs_set_log_message_callback"
2353 #: ../src/guestfs.pod:1174
2356 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
2357 " char *buf, int len);\n"
2358 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
2359 " guestfs_log_message_cb cb,\n"
2365 #: ../src/guestfs.pod:1180
2367 "The callback function C<cb> will be called whenever qemu or the guest writes "
2368 "anything to the console."
2372 #: ../src/guestfs.pod:1183
2373 msgid "Use this function to capture kernel messages and similar."
2377 #: ../src/guestfs.pod:1185
2379 "Normally there is no log message handler, and log messages are just "
2384 #: ../src/guestfs.pod:1188
2385 msgid "guestfs_set_subprocess_quit_callback"
2389 #: ../src/guestfs.pod:1190
2392 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
2393 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
2394 " guestfs_subprocess_quit_cb cb,\n"
2400 #: ../src/guestfs.pod:1195
2402 "The callback function C<cb> will be called when the child process quits, "
2403 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
2404 "corresponds to a transition from any state to the CONFIG state)."
2408 #: ../src/guestfs.pod:1200
2409 msgid "guestfs_set_launch_done_callback"
2413 #: ../src/guestfs.pod:1202
2416 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
2417 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
2418 " guestfs_launch_done_cb cb,\n"
2424 #: ../src/guestfs.pod:1207
2426 "The callback function C<cb> will be called when the child process becomes "
2427 "ready first time after it has been launched. (This corresponds to a "
2428 "transition from LAUNCHING to the READY state)."
2432 #: ../src/guestfs.pod:1211
2433 msgid "guestfs_set_close_callback"
2437 #: ../src/guestfs.pod:1213
2440 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
2441 " void guestfs_set_close_callback (guestfs_h *g,\n"
2442 " guestfs_close_cb cb,\n"
2448 #: ../src/guestfs.pod:1218
2450 "The callback function C<cb> will be called while the handle is being closed "
2451 "(synchronously from L</guestfs_close>)."
2455 #: ../src/guestfs.pod:1221
2457 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
2458 "handles that are open when the program exits. This means that this callback "
2459 "might be called indirectly from L<exit(3)>, which can cause unexpected "
2460 "problems in higher-level languages (eg. if your HLL interpreter has already "
2461 "been cleaned up by the time this is called, and if your callback then jumps "
2462 "into some HLL function)."
2466 #: ../src/guestfs.pod:1229
2467 msgid "guestfs_set_progress_callback"
2471 #: ../src/guestfs.pod:1231
2474 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
2475 " int proc_nr, int serial,\n"
2476 " uint64_t position, uint64_t total);\n"
2477 " void guestfs_set_progress_callback (guestfs_h *g,\n"
2478 " guestfs_progress_cb cb,\n"
2484 #: ../src/guestfs.pod:1238
2486 "Some long-running operations can generate progress messages. If this "
2487 "callback is registered, then it will be called each time a progress message "
2488 "is generated (usually two seconds after the operation started, and three "
2489 "times per second thereafter until it completes, although the frequency may "
2490 "change in future versions)."
2494 #: ../src/guestfs.pod:1244
2496 "The callback receives two numbers: C<position> and C<total>. The units of "
2497 "C<total> are not defined, although for some operations C<total> may relate "
2498 "in some way to the amount of data to be transferred (eg. in bytes or "
2499 "megabytes), and C<position> may be the portion which has been transferred."
2503 #: ../src/guestfs.pod:1250
2504 msgid "The only defined and stable parts of the API are:"
2508 #: ../src/guestfs.pod:1256
2510 "The callback can display to the user some type of progress bar or indicator "
2511 "which shows the ratio of C<position>:C<total>."
2515 #: ../src/guestfs.pod:1261
2516 msgid "0 E<lt>= C<position> E<lt>= C<total>"
2520 #: ../src/guestfs.pod:1265
2522 "If any progress notification is sent during a call, then a final progress "
2523 "notification is always sent when C<position> = C<total>."
2527 #: ../src/guestfs.pod:1268
2529 "This is to simplify caller code, so callers can easily set the progress "
2530 "indicator to \"100%\" at the end of the operation, without requiring special "
2531 "code to detect this case."
2535 #: ../src/guestfs.pod:1274
2537 "The callback also receives the procedure number and serial number of the "
2538 "call. These are only useful for debugging protocol issues, and the callback "
2539 "can normally ignore them. The callback may want to print these numbers in "
2540 "error messages or debugging messages."
2544 #: ../src/guestfs.pod:1279
2545 msgid "PRIVATE DATA AREA"
2549 #: ../src/guestfs.pod:1281
2551 "You can attach named pieces of private data to the libguestfs handle, and "
2552 "fetch them by name for the lifetime of the handle. This is called the "
2553 "private data area and is only available from the C API."
2557 #: ../src/guestfs.pod:1285
2558 msgid "To attach a named piece of data, use the following call:"
2562 #: ../src/guestfs.pod:1287
2565 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
2570 #: ../src/guestfs.pod:1289
2572 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
2573 "pointer (which can be C<NULL>). Any previous item with the same name is "
2578 #: ../src/guestfs.pod:1293
2580 "You can use any C<key> you want, but names beginning with an underscore "
2581 "character are reserved for internal libguestfs purposes (for implementing "
2582 "language bindings). It is recommended to prefix the name with some unique "
2583 "string to avoid collisions with other users."
2587 #: ../src/guestfs.pod:1298
2588 msgid "To retrieve the pointer, use:"
2592 #: ../src/guestfs.pod:1300
2595 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
2600 #: ../src/guestfs.pod:1302
2602 "This function returns C<NULL> if either no data is found associated with "
2603 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
2608 #: ../src/guestfs.pod:1306
2610 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
2611 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
2612 "all. In particular, libguestfs does I<not> try to free the data when the "
2613 "handle is closed. If the data must be freed, then the caller must either "
2614 "free it before calling L</guestfs_close> or must set up a close callback to "
2615 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
2616 "can be registered for a handle)."
2620 #: ../src/guestfs.pod:1314
2622 "The private data area is implemented using a hash table, and should be "
2623 "reasonably efficient for moderate numbers of keys."
2627 #: ../src/guestfs.pod:1317
2628 msgid "BLOCK DEVICE NAMING"
2632 #: ../src/guestfs.pod:1319
2634 "In the kernel there is now quite a profusion of schemata for naming block "
2635 "devices (in this context, by I<block device> I mean a physical or virtual "
2636 "hard drive). The original Linux IDE driver used names starting with "
2637 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
2638 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
2639 "replacement for the old IDE driver (particularly for SATA devices) those "
2640 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
2641 "machines with paravirtualized drivers. This has created several different "
2642 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
2647 #: ../src/guestfs.pod:1331
2649 "As discussed above, libguestfs uses a qemu appliance running an embedded "
2650 "Linux kernel to access block devices. We can run a variety of appliances "
2651 "based on a variety of Linux kernels."
2655 #: ../src/guestfs.pod:1335
2657 "This causes a problem for libguestfs because many API calls use device or "
2658 "partition names. Working scripts and the recipe (example) scripts that we "
2659 "make available over the internet could fail if the naming scheme changes."
2663 #: ../src/guestfs.pod:1340
2665 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2666 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2667 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2668 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2672 #: ../src/guestfs.pod:1346
2674 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2675 "L</guestfs_list_partitions> and similar calls return the true names of the "
2676 "devices and partitions as known to the appliance."
2680 #: ../src/guestfs.pod:1351
2681 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2685 #: ../src/guestfs.pod:1353
2687 "Usually this translation is transparent. However in some (very rare) cases "
2688 "you may need to know the exact algorithm. Such cases include where you use "
2689 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
2690 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
2695 #: ../src/guestfs.pod:1359
2697 "The algorithm is applied only to I<parameters> which are known to be either "
2698 "device or partition names. Return values from functions such as "
2699 "L</guestfs_list_devices> are never changed."
2703 #: ../src/guestfs.pod:1367
2704 msgid "Is the string a parameter which is a device or partition name?"
2708 #: ../src/guestfs.pod:1371
2709 msgid "Does the string begin with C</dev/sd>?"
2713 #: ../src/guestfs.pod:1375
2715 "Does the named device exist? If so, we use that device. However if I<not> "
2716 "then we continue with this algorithm."
2720 #: ../src/guestfs.pod:1380
2721 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2725 #: ../src/guestfs.pod:1382
2726 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2730 #: ../src/guestfs.pod:1384
2731 msgid "If that named device exists, use it. If not, continue."
2735 #: ../src/guestfs.pod:1388
2736 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2740 #: ../src/guestfs.pod:1390
2741 msgid "If that named device exists, use it. If not, return an error."
2745 #: ../src/guestfs.pod:1394
2746 msgid "PORTABILITY CONCERNS"
2750 #: ../src/guestfs.pod:1396
2752 "Although the standard naming scheme and automatic translation is useful for "
2753 "simple programs and guestfish scripts, for larger programs it is best not to "
2754 "rely on this mechanism."
2758 #: ../src/guestfs.pod:1400
2760 "Where possible for maximum future portability programs using libguestfs "
2761 "should use these future-proof techniques:"
2765 #: ../src/guestfs.pod:1407
2767 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2768 "device names, and then use those names directly."
2772 #: ../src/guestfs.pod:1410
2773 msgid "Since those device names exist by definition, they will never be translated."
2777 #: ../src/guestfs.pod:1415
2779 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2780 "filesystem labels."
2784 #: ../src/guestfs.pod:1420
2789 #: ../src/guestfs.pod:1422
2790 msgid "COMMUNICATION PROTOCOL"
2794 #: ../src/guestfs.pod:1424
2796 "Don't rely on using this protocol directly. This section documents how it "
2797 "currently works, but it may change at any time."
2801 #: ../src/guestfs.pod:1427
2803 "The protocol used to talk between the library and the daemon running inside "
2804 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
2805 "1014, RFC 1832, RFC 4506)."
2809 #: ../src/guestfs.pod:1431
2811 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
2812 "this file is automatically generated)."
2816 #: ../src/guestfs.pod:1434
2818 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
2819 "and C<FileOut> parameters, which are handled with very simple request/reply "
2820 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
2821 "parameters, which use the same request and reply messages, but they may also "
2822 "be followed by files sent using a chunked encoding."
2826 #: ../src/guestfs.pod:1441
2827 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
2831 #: ../src/guestfs.pod:1443
2832 msgid "For ordinary functions, the request message is:"
2836 #: ../src/guestfs.pod:1445
2839 " total length (header + arguments,\n"
2840 " but not including the length word itself)\n"
2841 " struct guestfs_message_header (encoded as XDR)\n"
2842 " struct guestfs_<foo>_args (encoded as XDR)\n"
2847 #: ../src/guestfs.pod:1450
2849 "The total length field allows the daemon to allocate a fixed size buffer "
2850 "into which it slurps the rest of the message. As a result, the total length "
2851 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
2852 "effective size of any request is limited to somewhere under this size."
2856 #: ../src/guestfs.pod:1456
2858 "Note also that many functions don't take any arguments, in which case the "
2859 "C<guestfs_I<foo>_args> is completely omitted."
2863 #: ../src/guestfs.pod:1459
2865 "The header contains the procedure number (C<guestfs_proc>) which is how the "
2866 "receiver knows what type of args structure to expect, or none at all."
2870 #: ../src/guestfs.pod:1463
2871 msgid "The reply message for ordinary functions is:"
2875 #: ../src/guestfs.pod:1465
2878 " total length (header + ret,\n"
2879 " but not including the length word itself)\n"
2880 " struct guestfs_message_header (encoded as XDR)\n"
2881 " struct guestfs_<foo>_ret (encoded as XDR)\n"
2886 #: ../src/guestfs.pod:1470
2888 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
2889 "functions that return no formal return values."
2893 #: ../src/guestfs.pod:1473
2894 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
2898 #: ../src/guestfs.pod:1476
2900 "In the case of an error, a flag is set in the header, and the reply message "
2901 "is slightly changed:"
2905 #: ../src/guestfs.pod:1479
2908 " total length (header + error,\n"
2909 " but not including the length word itself)\n"
2910 " struct guestfs_message_header (encoded as XDR)\n"
2911 " struct guestfs_message_error (encoded as XDR)\n"
2916 #: ../src/guestfs.pod:1484
2918 "The C<guestfs_message_error> structure contains the error message as a "
2923 #: ../src/guestfs.pod:1487
2924 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
2928 #: ../src/guestfs.pod:1489
2930 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
2931 "The normal request message is sent (see above). However this is followed by "
2932 "a sequence of file chunks."
2936 #: ../src/guestfs.pod:1493
2939 " total length (header + arguments,\n"
2940 " but not including the length word itself,\n"
2941 " and not including the chunks)\n"
2942 " struct guestfs_message_header (encoded as XDR)\n"
2943 " struct guestfs_<foo>_args (encoded as XDR)\n"
2944 " sequence of chunks for FileIn param #0\n"
2945 " sequence of chunks for FileIn param #1 etc.\n"
2950 #: ../src/guestfs.pod:1501
2951 msgid "The \"sequence of chunks\" is:"
2955 #: ../src/guestfs.pod:1503
2958 " length of chunk (not including length word itself)\n"
2959 " struct guestfs_chunk (encoded as XDR)\n"
2960 " length of chunk\n"
2961 " struct guestfs_chunk (encoded as XDR)\n"
2963 " length of chunk\n"
2964 " struct guestfs_chunk (with data.data_len == 0)\n"
2969 #: ../src/guestfs.pod:1511
2971 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
2972 "is set in the final chunk to indicate either successful completion or early "
2977 #: ../src/guestfs.pod:1515
2979 "At time of writing there are no functions that have more than one FileIn "
2980 "parameter. However this is (theoretically) supported, by sending the "
2981 "sequence of chunks for each FileIn parameter one after another (from left to "
2986 #: ../src/guestfs.pod:1520
2988 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
2989 "transfer. The library does this by sending a chunk with a special flag set "
2990 "to indicate cancellation. When the daemon sees this, it cancels the whole "
2991 "RPC, does I<not> send any reply, and goes back to reading the next request."
2995 #: ../src/guestfs.pod:1526
2997 "The daemon may also cancel. It does this by writing a special word "
2998 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
2999 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
3000 "cancel chunk). The special word is chosen so that even if cancellation "
3001 "happens right at the end of the transfer (after the library has finished "
3002 "writing and has started listening for the reply), the \"spurious\" cancel "
3003 "flag will not be confused with the reply message."
3007 #: ../src/guestfs.pod:1535
3009 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
3010 "limit), and also files where the size is not known in advance (eg. from "
3011 "pipes or sockets). However the chunks are rather small "
3012 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
3013 "to keep much in memory."
3017 #: ../src/guestfs.pod:1541
3018 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
3022 #: ../src/guestfs.pod:1543
3024 "The protocol for FileOut parameters is exactly the same as for FileIn "
3025 "parameters, but with the roles of daemon and library reversed."
3029 #: ../src/guestfs.pod:1546
3032 " total length (header + ret,\n"
3033 " but not including the length word itself,\n"
3034 " and not including the chunks)\n"
3035 " struct guestfs_message_header (encoded as XDR)\n"
3036 " struct guestfs_<foo>_ret (encoded as XDR)\n"
3037 " sequence of chunks for FileOut param #0\n"
3038 " sequence of chunks for FileOut param #1 etc.\n"
3043 #: ../src/guestfs.pod:1554
3044 msgid "INITIAL MESSAGE"
3048 #: ../src/guestfs.pod:1556
3050 "When the daemon launches it sends an initial word (C<GUESTFS_LAUNCH_FLAG>) "
3051 "which indicates that the guest and daemon is alive. This is what "
3052 "L</guestfs_launch> waits for."
3056 #: ../src/guestfs.pod:1560
3057 msgid "PROGRESS NOTIFICATION MESSAGES"
3061 #: ../src/guestfs.pod:1562
3063 "The daemon may send progress notification messages at any time. These are "
3064 "distinguished by the normal length word being replaced by "
3065 "C<GUESTFS_PROGRESS_FLAG>, followed by a fixed size progress message."
3069 #: ../src/guestfs.pod:1566
3071 "The library turns them into progress callbacks (see "
3072 "C<guestfs_set_progress_callback>) if there is a callback registered, or "
3073 "discards them if not."
3077 #: ../src/guestfs.pod:1570
3079 "The daemon self-limits the frequency of progress messages it sends (see "
3080 "C<daemon/proto.c:notify_progress>). Not all calls generate progress "
3085 #: ../src/guestfs.pod:1574
3086 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
3090 #: ../src/guestfs.pod:1576
3092 "All high-level libguestfs actions are synchronous. If you want to use "
3093 "libguestfs asynchronously then you must create a thread."
3097 #: ../src/guestfs.pod:1579
3099 "Only use the handle from a single thread. Either use the handle exclusively "
3100 "from one thread, or provide your own mutex so that two threads cannot issue "
3101 "calls on the same handle at the same time."
3105 #: ../src/guestfs.pod:1583
3107 "See the graphical program guestfs-browser for one possible architecture for "
3108 "multithreaded programs using libvirt and libguestfs."
3112 #: ../src/guestfs.pod:1586
3113 msgid "QEMU WRAPPERS"
3117 #: ../src/guestfs.pod:1588
3119 "If you want to compile your own qemu, run qemu from a non-standard location, "
3120 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
3125 #: ../src/guestfs.pod:1592
3127 "There is one important rule to remember: you I<must C<exec qemu>> as the "
3128 "last command in the shell script (so that qemu replaces the shell and "
3129 "becomes the direct child of the libguestfs-using program). If you don't do "
3130 "this, then the qemu process won't be cleaned up correctly."
3134 #: ../src/guestfs.pod:1597
3136 "Here is an example of a wrapper, where I have built my own copy of qemu from "
3141 #: ../src/guestfs.pod:1600
3145 " qemudir=/home/rjones/d/qemu\n"
3146 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
3152 #: ../src/guestfs.pod:1604
3154 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
3155 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
3160 #: ../src/guestfs.pod:1608
3163 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
3168 #: ../src/guestfs.pod:1610
3170 "Note that libguestfs also calls qemu with the -help and -version options in "
3171 "order to determine features."
3175 #: ../src/guestfs.pod:1613
3176 msgid "LIBGUESTFS VERSION NUMBERS"
3180 #: ../src/guestfs.pod:1615
3182 "Since April 2010, libguestfs has started to make separate development and "
3183 "stable releases, along with corresponding branches in our git repository. "
3184 "These separate releases can be identified by version number:"
3188 #: ../src/guestfs.pod:1620
3191 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3192 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3198 " | `-------- sub-version\n"
3200 " `------ always '1' because we don't change the ABI\n"
3205 #: ../src/guestfs.pod:1631
3206 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3210 #: ../src/guestfs.pod:1633
3212 "As time passes we cherry pick fixes from the development branch and backport "
3213 "those into the stable branch, the effect being that the stable branch should "
3214 "get more stable and less buggy over time. So the stable releases are ideal "
3215 "for people who don't need new features but would just like the software to "
3220 #: ../src/guestfs.pod:1639
3221 msgid "Our criteria for backporting changes are:"
3225 #: ../src/guestfs.pod:1645
3227 "Documentation changes which don't affect any code are backported unless the "
3228 "documentation refers to a future feature which is not in stable."
3232 #: ../src/guestfs.pod:1651
3234 "Bug fixes which are not controversial, fix obvious problems, and have been "
3235 "well tested are backported."
3239 #: ../src/guestfs.pod:1656
3241 "Simple rearrangements of code which shouldn't affect how it works get "
3242 "backported. This is so that the code in the two branches doesn't get too "
3243 "far out of step, allowing us to backport future fixes more easily."
3247 #: ../src/guestfs.pod:1662
3249 "We I<don't> backport new features, new APIs, new tools etc, except in one "
3250 "exceptional case: the new feature is required in order to implement an "
3251 "important bug fix."
3255 #: ../src/guestfs.pod:1668
3257 "A new stable branch starts when we think the new features in development are "
3258 "substantial and compelling enough over the current stable branch to warrant "
3259 "it. When that happens we create new stable and development versions 1.N.0 "
3260 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
3261 "stable at this point, but by backporting fixes from development, that branch "
3262 "will stabilize over time."
3266 #: ../src/guestfs.pod:1676 ../fish/guestfish.pod:826 ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:312 ../tools/virt-rescue.pl:226
3267 msgid "ENVIRONMENT VARIABLES"
3271 #: ../src/guestfs.pod:1680 ../fish/guestfish.pod:852
3272 msgid "LIBGUESTFS_APPEND"
3276 #: ../src/guestfs.pod:1682 ../fish/guestfish.pod:854
3277 msgid "Pass additional options to the guest kernel."
3281 #: ../src/guestfs.pod:1684 ../fish/guestfish.pod:856
3282 msgid "LIBGUESTFS_DEBUG"
3286 #: ../src/guestfs.pod:1686
3288 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
3289 "effect as calling C<guestfs_set_verbose (g, 1)>."
3293 #: ../src/guestfs.pod:1689 ../fish/guestfish.pod:861
3294 msgid "LIBGUESTFS_MEMSIZE"
3298 #: ../src/guestfs.pod:1691 ../fish/guestfish.pod:863
3299 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
3303 #: ../src/guestfs.pod:1694 ../fish/guestfish.pod:866
3306 " LIBGUESTFS_MEMSIZE=700\n"
3311 #: ../src/guestfs.pod:1696 ../fish/guestfish.pod:868
3312 msgid "LIBGUESTFS_PATH"
3316 #: ../src/guestfs.pod:1698
3318 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
3319 "the discussion of paths in section PATH above."
3323 #: ../src/guestfs.pod:1701 ../fish/guestfish.pod:873
3324 msgid "LIBGUESTFS_QEMU"
3328 #: ../src/guestfs.pod:1703 ../fish/guestfish.pod:875
3330 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
3331 "which was found at compile time by the configure script is used."
3335 #: ../src/guestfs.pod:1707
3336 msgid "See also L</QEMU WRAPPERS> above."
3340 #: ../src/guestfs.pod:1709 ../fish/guestfish.pod:879
3341 msgid "LIBGUESTFS_TRACE"
3345 #: ../src/guestfs.pod:1711
3347 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
3348 "effect as calling C<guestfs_set_trace (g, 1)>."
3352 #: ../src/guestfs.pod:1714 ../fish/guestfish.pod:888
3357 #: ../src/guestfs.pod:1716 ../fish/guestfish.pod:890
3358 msgid "Location of temporary directory, defaults to C</tmp>."
3362 #: ../src/guestfs.pod:1718 ../fish/guestfish.pod:892
3364 "If libguestfs was compiled to use the supermin appliance then the real "
3365 "appliance is cached in this directory, shared between all handles belonging "
3366 "to the same EUID. You can use C<$TMPDIR> to configure another directory to "
3367 "use in case C</tmp> is not large enough."
3371 #: ../src/guestfs.pod:1726 ../fish/guestfish.pod:950 ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:178 ../inspector/virt-inspector.pl:846 ../tools/virt-edit.pl:325 ../tools/virt-win-reg.pl:461 ../tools/virt-df.pl:536 ../tools/virt-ls.pl:210 ../tools/virt-resize.pl:1399 ../tools/virt-list-filesystems.pl:191 ../tools/virt-cat.pl:163 ../tools/virt-tar.pl:257 ../tools/virt-rescue.pl:231 ../tools/virt-make-fs.pl:527 ../tools/virt-list-partitions.pl:229
3376 #: ../src/guestfs.pod:1728
3378 "L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
3379 "L<virt-edit(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
3380 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
3381 "L<virt-rescue(1)>, L<virt-tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
3382 "L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
3386 #: ../src/guestfs.pod:1746
3388 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
3389 "L<lvm(8)>, L<disktype(1)>."
3393 #: ../src/guestfs.pod:1753 ../tools/virt-win-reg.pl:476 ../tools/virt-make-fs.pl:541
3398 #: ../src/guestfs.pod:1755
3399 msgid "To get a list of bugs against libguestfs use this link:"
3403 #: ../src/guestfs.pod:1757
3404 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
3408 #: ../src/guestfs.pod:1759
3409 msgid "To report a new bug against libguestfs use this link:"
3413 #: ../src/guestfs.pod:1761
3414 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
3418 #: ../src/guestfs.pod:1763
3419 msgid "When reporting a bug, please check:"
3423 #: ../src/guestfs.pod:1769
3424 msgid "That the bug hasn't been reported already."
3428 #: ../src/guestfs.pod:1773
3429 msgid "That you are testing a recent version."
3433 #: ../src/guestfs.pod:1777
3434 msgid "Describe the bug accurately, and give a way to reproduce it."
3438 #: ../src/guestfs.pod:1781
3440 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
3445 #: ../src/guestfs.pod:1786 ../fish/guestfish.pod:967 ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:189 ../inspector/virt-inspector.pl:855
3450 #: ../src/guestfs.pod:1788 ../fish/guestfish.pod:969 ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:191
3451 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
3455 #: ../src/guestfs.pod:1790 ../fish/guestfish.pod:971 ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:193 ../inspector/virt-inspector.pl:861 ../tools/virt-edit.pl:341 ../tools/virt-win-reg.pl:491 ../tools/virt-df.pl:549 ../tools/virt-ls.pl:225 ../tools/virt-resize.pl:1420 ../tools/virt-list-filesystems.pl:207 ../tools/virt-cat.pl:177 ../tools/virt-tar.pl:272 ../tools/virt-rescue.pl:245 ../tools/virt-make-fs.pl:556 ../tools/virt-list-partitions.pl:244
3460 #: ../src/guestfs.pod:1792 ../fish/guestfish.pod:973
3461 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
3465 #: ../src/guestfs.pod:1795
3467 "This library is free software; you can redistribute it and/or modify it "
3468 "under the terms of the GNU Lesser General Public License as published by the "
3469 "Free Software Foundation; either version 2 of the License, or (at your "
3470 "option) any later version."
3474 #: ../src/guestfs.pod:1800
3476 "This library is distributed in the hope that it will be useful, but WITHOUT "
3477 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
3478 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
3483 #: ../src/guestfs.pod:1805
3485 "You should have received a copy of the GNU Lesser General Public License "
3486 "along with this library; if not, write to the Free Software Foundation, "
3487 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
3491 #: ../src/guestfs-actions.pod:1
3492 msgid "guestfs_add_cdrom"
3496 #: ../src/guestfs-actions.pod:3
3499 " int guestfs_add_cdrom (guestfs_h *g,\n"
3500 "\t\tconst char *filename);\n"
3505 #: ../src/guestfs-actions.pod:6 ../fish/guestfish-actions.pod:7
3506 msgid "This function adds a virtual CD-ROM disk image to the guest."
3510 #: ../src/guestfs-actions.pod:8 ../fish/guestfish-actions.pod:9
3511 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
3515 #: ../src/guestfs-actions.pod:10 ../src/guestfs-actions.pod:1516 ../fish/guestfish-actions.pod:11 ../fish/guestfish-actions.pod:1211
3520 #: ../src/guestfs-actions.pod:16
3522 "This call checks for the existence of C<filename>. This stops you from "
3523 "specifying other types of drive which are supported by qemu such as C<nbd:> "
3524 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
3529 #: ../src/guestfs-actions.pod:23
3531 "If you just want to add an ISO file (often you use this as an efficient way "
3532 "to transfer large files into the guest), then you should probably use "
3533 "C<guestfs_add_drive_ro> instead."
3537 #: ../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:1002 ../src/guestfs-actions.pod:1024 ../src/guestfs-actions.pod:1055 ../src/guestfs-actions.pod:1143 ../src/guestfs-actions.pod:1174 ../src/guestfs-actions.pod:1374 ../src/guestfs-actions.pod:1393 ../src/guestfs-actions.pod:1474 ../src/guestfs-actions.pod:1822 ../src/guestfs-actions.pod:1945 ../src/guestfs-actions.pod:2000 ../src/guestfs-actions.pod:2030 ../src/guestfs-actions.pod:2439 ../src/guestfs-actions.pod:2451 ../src/guestfs-actions.pod:2468 ../src/guestfs-actions.pod:2576 ../src/guestfs-actions.pod:2587 ../src/guestfs-actions.pod:2597 ../src/guestfs-actions.pod:2608 ../src/guestfs-actions.pod:2620 ../src/guestfs-actions.pod:2650 ../src/guestfs-actions.pod:2714 ../src/guestfs-actions.pod:2731 ../src/guestfs-actions.pod:2745 ../src/guestfs-actions.pod:2765 ../src/guestfs-actions.pod:2785 ../src/guestfs-actions.pod:2814 ../src/guestfs-actions.pod:2830 ../src/guestfs-actions.pod:2846 ../src/guestfs-actions.pod:2858 ../src/guestfs-actions.pod:2867 ../src/guestfs-actions.pod:2900 ../src/guestfs-actions.pod:2913 ../src/guestfs-actions.pod:2923 ../src/guestfs-actions.pod:2935 ../src/guestfs-actions.pod:2949 ../src/guestfs-actions.pod:3029 ../src/guestfs-actions.pod:3046 ../src/guestfs-actions.pod:3056 ../src/guestfs-actions.pod:3101 ../src/guestfs-actions.pod:3116 ../src/guestfs-actions.pod:3131 ../src/guestfs-actions.pod:3144 ../src/guestfs-actions.pod:3155 ../src/guestfs-actions.pod:3166 ../src/guestfs-actions.pod:3180 ../src/guestfs-actions.pod:3192 ../src/guestfs-actions.pod:3209 ../src/guestfs-actions.pod:3240 ../src/guestfs-actions.pod:3268 ../src/guestfs-actions.pod:3284 ../src/guestfs-actions.pod:3300 ../src/guestfs-actions.pod:3309 ../src/guestfs-actions.pod:3323 ../src/guestfs-actions.pod:3333 ../src/guestfs-actions.pod:3345 ../src/guestfs-actions.pod:3357 ../src/guestfs-actions.pod:3389 ../src/guestfs-actions.pod:3401 ../src/guestfs-actions.pod:3418 ../src/guestfs-actions.pod:3429 ../src/guestfs-actions.pod:3443 ../src/guestfs-actions.pod:3483 ../src/guestfs-actions.pod:3514 ../src/guestfs-actions.pod:3525 ../src/guestfs-actions.pod:3550 ../src/guestfs-actions.pod:3564 ../src/guestfs-actions.pod:3579 ../src/guestfs-actions.pod:3701 ../src/guestfs-actions.pod:3753 ../src/guestfs-actions.pod:3772 ../src/guestfs-actions.pod:3787 ../src/guestfs-actions.pod:3813 ../src/guestfs-actions.pod:3870 ../src/guestfs-actions.pod:3884 ../src/guestfs-actions.pod:3894 ../src/guestfs-actions.pod:3905 ../src/guestfs-actions.pod:4160 ../src/guestfs-actions.pod:4176 ../src/guestfs-actions.pod:4187 ../src/guestfs-actions.pod:4196 ../src/guestfs-actions.pod:4207 ../src/guestfs-actions.pod:4216 ../src/guestfs-actions.pod:4227 ../src/guestfs-actions.pod:4240 ../src/guestfs-actions.pod:4258 ../src/guestfs-actions.pod:4274 ../src/guestfs-actions.pod:4290 ../src/guestfs-actions.pod:4305 ../src/guestfs-actions.pod:4325 ../src/guestfs-actions.pod:4340 ../src/guestfs-actions.pod:4356 ../src/guestfs-actions.pod:4374 ../src/guestfs-actions.pod:4390 ../src/guestfs-actions.pod:4404 ../src/guestfs-actions.pod:4429 ../src/guestfs-actions.pod:4450 ../src/guestfs-actions.pod:4466 ../src/guestfs-actions.pod:4487 ../src/guestfs-actions.pod:4499 ../src/guestfs-actions.pod:4511 ../src/guestfs-actions.pod:4527 ../src/guestfs-actions.pod:4561 ../src/guestfs-actions.pod:4581 ../src/guestfs-actions.pod:4604 ../src/guestfs-actions.pod:4694 ../src/guestfs-actions.pod:4800 ../src/guestfs-actions.pod:4809 ../src/guestfs-actions.pod:4819 ../src/guestfs-actions.pod:4829 ../src/guestfs-actions.pod:4848 ../src/guestfs-actions.pod:4858 ../src/guestfs-actions.pod:4868 ../src/guestfs-actions.pod:4878 ../src/guestfs-actions.pod:4890 ../src/guestfs-actions.pod:4940 ../src/guestfs-actions.pod:4954 ../src/guestfs-actions.pod:4967 ../src/guestfs-actions.pod:4980 ../src/guestfs-actions.pod:4994 ../src/guestfs-actions.pod:5004 ../src/guestfs-actions.pod:5021 ../src/guestfs-actions.pod:5051 ../src/guestfs-actions.pod:5062 ../src/guestfs-actions.pod:5097 ../src/guestfs-actions.pod:5107 ../src/guestfs-actions.pod:5122 ../src/guestfs-actions.pod:5148 ../src/guestfs-actions.pod:5176 ../src/guestfs-actions.pod:5280 ../src/guestfs-actions.pod:5295 ../src/guestfs-actions.pod:5306 ../src/guestfs-actions.pod:5352 ../src/guestfs-actions.pod:5362 ../src/guestfs-actions.pod:5399 ../src/guestfs-actions.pod:5426 ../src/guestfs-actions.pod:5468 ../src/guestfs-actions.pod:5491 ../src/guestfs-actions.pod:5548 ../src/guestfs-actions.pod:5564 ../src/guestfs-actions.pod:5590
3538 msgid "This function returns 0 on success or -1 on error."
3542 #: ../src/guestfs-actions.pod:31
3543 msgid "guestfs_add_drive"
3547 #: ../src/guestfs-actions.pod:33
3550 " int guestfs_add_drive (guestfs_h *g,\n"
3551 "\t\tconst char *filename);\n"
3556 #: ../src/guestfs-actions.pod:36 ../fish/guestfish-actions.pod:36
3558 "This function adds a virtual machine disk image C<filename> to the guest. "
3559 "The first time you call this function, the disk appears as IDE disk 0 "
3560 "(C</dev/sda>) in the guest, the second time as C</dev/sdb>, and so on."
3564 #: ../src/guestfs-actions.pod:41 ../fish/guestfish-actions.pod:41
3566 "You don't necessarily need to be root when using libguestfs. However you "
3567 "obviously do need sufficient permissions to access the filename for whatever "
3568 "operations you want to perform (ie. read access if you just want to read the "
3569 "image or write access if you want to modify the image)."
3573 #: ../src/guestfs-actions.pod:47 ../fish/guestfish-actions.pod:47
3575 "This is equivalent to the qemu parameter C<-drive "
3576 "file=filename,cache=off,if=...>."
3580 #: ../src/guestfs-actions.pod:50 ../fish/guestfish-actions.pod:50
3582 "C<cache=off> is omitted in cases where it is not supported by the underlying "
3587 #: ../src/guestfs-actions.pod:53 ../src/guestfs-actions.pod:82
3589 "C<if=...> is set at compile time by the configuration option C<./configure "
3590 "--with-drive-if=...>. In the rare case where you might need to change this "
3591 "at run time, use C<guestfs_add_drive_with_if> or "
3592 "C<guestfs_add_drive_ro_with_if>."
3596 #: ../src/guestfs-actions.pod:58 ../src/guestfs-actions.pod:87
3598 "Note that this call checks for the existence of C<filename>. This stops you "
3599 "from specifying other types of drive which are supported by qemu such as "
3600 "C<nbd:> and C<http:> URLs. To specify those, use the general "
3601 "C<guestfs_config> call instead."
3605 #: ../src/guestfs-actions.pod:65
3606 msgid "guestfs_add_drive_ro"
3610 #: ../src/guestfs-actions.pod:67
3613 " int guestfs_add_drive_ro (guestfs_h *g,\n"
3614 "\t\tconst char *filename);\n"
3619 #: ../src/guestfs-actions.pod:70 ../fish/guestfish-actions.pod:69
3620 msgid "This adds a drive in snapshot mode, making it effectively read-only."
3624 #: ../src/guestfs-actions.pod:73 ../fish/guestfish-actions.pod:72
3626 "Note that writes to the device are allowed, and will be seen for the "
3627 "duration of the guestfs handle, but they are written to a temporary file "
3628 "which is discarded as soon as the guestfs handle is closed. We don't "
3629 "currently have any method to enable changes to be committed, although qemu "
3634 #: ../src/guestfs-actions.pod:79 ../fish/guestfish-actions.pod:78
3636 "This is equivalent to the qemu parameter C<-drive "
3637 "file=filename,snapshot=on,if=...>."
3641 #: ../src/guestfs-actions.pod:94
3642 msgid "guestfs_add_drive_ro_with_if"
3646 #: ../src/guestfs-actions.pod:96
3649 " int guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
3650 "\t\tconst char *filename,\n"
3651 "\t\tconst char *iface);\n"
3656 #: ../src/guestfs-actions.pod:100
3658 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
3659 "QEMU interface emulation to use at run time."
3663 #: ../src/guestfs-actions.pod:105
3664 msgid "guestfs_add_drive_with_if"
3668 #: ../src/guestfs-actions.pod:107
3671 " int guestfs_add_drive_with_if (guestfs_h *g,\n"
3672 "\t\tconst char *filename,\n"
3673 "\t\tconst char *iface);\n"
3678 #: ../src/guestfs-actions.pod:111
3680 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
3681 "QEMU interface emulation to use at run time."
3685 #: ../src/guestfs-actions.pod:116
3686 msgid "guestfs_aug_clear"
3690 #: ../src/guestfs-actions.pod:118
3693 " int guestfs_aug_clear (guestfs_h *g,\n"
3694 "\t\tconst char *augpath);\n"
3699 #: ../src/guestfs-actions.pod:121 ../fish/guestfish-actions.pod:109
3701 "Set the value associated with C<path> to C<NULL>. This is the same as the "
3702 "L<augtool(1)> C<clear> command."
3706 #: ../src/guestfs-actions.pod:126
3707 msgid "guestfs_aug_close"
3711 #: ../src/guestfs-actions.pod:128
3714 " int guestfs_aug_close (guestfs_h *g);\n"
3719 #: ../src/guestfs-actions.pod:130
3721 "Close the current Augeas handle and free up any resources used by it. After "
3722 "calling this, you have to call C<guestfs_aug_init> again before you can use "
3723 "any other Augeas functions."
3727 #: ../src/guestfs-actions.pod:137
3728 msgid "guestfs_aug_defnode"
3732 #: ../src/guestfs-actions.pod:139
3735 " struct guestfs_int_bool *guestfs_aug_defnode (guestfs_h *g,\n"
3736 "\t\tconst char *name,\n"
3737 "\t\tconst char *expr,\n"
3738 "\t\tconst char *val);\n"
3743 #: ../src/guestfs-actions.pod:144 ../fish/guestfish-actions.pod:125
3744 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
3748 #: ../src/guestfs-actions.pod:147
3750 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
3751 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
3752 "containing that single node."
3756 #: ../src/guestfs-actions.pod:151 ../fish/guestfish-actions.pod:132
3758 "On success this returns a pair containing the number of nodes in the "
3759 "nodeset, and a boolean flag if a node was created."
3763 #: ../src/guestfs-actions.pod:155
3765 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
3766 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
3770 #: ../src/guestfs-actions.pod:159
3771 msgid "guestfs_aug_defvar"
3775 #: ../src/guestfs-actions.pod:161
3778 " int guestfs_aug_defvar (guestfs_h *g,\n"
3779 "\t\tconst char *name,\n"
3780 "\t\tconst char *expr);\n"
3785 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:140
3787 "Defines an Augeas variable C<name> whose value is the result of evaluating "
3788 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
3792 #: ../src/guestfs-actions.pod:169 ../fish/guestfish-actions.pod:144
3794 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
3795 "evaluates to something which is not a nodeset."
3799 #: ../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:1041 ../src/guestfs-actions.pod:1356 ../src/guestfs-actions.pod:1538 ../src/guestfs-actions.pod:1619 ../src/guestfs-actions.pod:1650 ../src/guestfs-actions.pod:1693 ../src/guestfs-actions.pod:1710 ../src/guestfs-actions.pod:1935 ../src/guestfs-actions.pod:2147 ../src/guestfs-actions.pod:2165 ../src/guestfs-actions.pod:3503 ../src/guestfs-actions.pod:3610 ../src/guestfs-actions.pod:3964 ../src/guestfs-actions.pod:3987 ../src/guestfs-actions.pod:5086 ../src/guestfs-actions.pod:5436 ../src/guestfs-actions.pod:5446 ../src/guestfs-actions.pod:5456
3800 msgid "On error this function returns -1."
3804 #: ../src/guestfs-actions.pod:174
3805 msgid "guestfs_aug_get"
3809 #: ../src/guestfs-actions.pod:176
3812 " char *guestfs_aug_get (guestfs_h *g,\n"
3813 "\t\tconst char *augpath);\n"
3818 #: ../src/guestfs-actions.pod:179 ../fish/guestfish-actions.pod:151
3820 "Look up the value associated with C<path>. If C<path> matches exactly one "
3821 "node, the C<value> is returned."
3825 #: ../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:1069 ../src/guestfs-actions.pod:1233 ../src/guestfs-actions.pod:1342 ../src/guestfs-actions.pod:1487 ../src/guestfs-actions.pod:1501 ../src/guestfs-actions.pod:1577 ../src/guestfs-actions.pod:1595 ../src/guestfs-actions.pod:1729 ../src/guestfs-actions.pod:1868 ../src/guestfs-actions.pod:2049 ../src/guestfs-actions.pod:2099 ../src/guestfs-actions.pod:2215 ../src/guestfs-actions.pod:2250 ../src/guestfs-actions.pod:2565 ../src/guestfs-actions.pod:2986 ../src/guestfs-actions.pod:3082 ../src/guestfs-actions.pod:3625 ../src/guestfs-actions.pod:3801 ../src/guestfs-actions.pod:3942 ../src/guestfs-actions.pod:4103 ../src/guestfs-actions.pod:4146 ../src/guestfs-actions.pod:4622 ../src/guestfs-actions.pod:4635 ../src/guestfs-actions.pod:4649 ../src/guestfs-actions.pod:4670 ../src/guestfs-actions.pod:5229 ../src/guestfs-actions.pod:5245 ../src/guestfs-actions.pod:5260 ../src/guestfs-actions.pod:5408 ../src/guestfs-actions.pod:5638
3827 "This function returns a string, or NULL on error. I<The caller must free "
3828 "the returned string after use>."
3832 #: ../src/guestfs-actions.pod:185
3833 msgid "guestfs_aug_init"
3837 #: ../src/guestfs-actions.pod:187
3840 " int guestfs_aug_init (guestfs_h *g,\n"
3841 "\t\tconst char *root,\n"
3847 #: ../src/guestfs-actions.pod:191 ../fish/guestfish-actions.pod:158
3849 "Create a new Augeas handle for editing configuration files. If there was "
3850 "any previous Augeas handle associated with this guestfs session, then it is "
3855 #: ../src/guestfs-actions.pod:195
3856 msgid "You must call this before using any other C<guestfs_aug_*> commands."
3860 #: ../src/guestfs-actions.pod:198 ../fish/guestfish-actions.pod:165
3861 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
3865 #: ../src/guestfs-actions.pod:201 ../fish/guestfish-actions.pod:168
3867 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
3868 "logical I<or> of the following integers:"
3872 #: ../src/guestfs-actions.pod:207 ../fish/guestfish-actions.pod:174
3873 msgid "C<AUG_SAVE_BACKUP> = 1"
3877 #: ../src/guestfs-actions.pod:209 ../fish/guestfish-actions.pod:176
3878 msgid "Keep the original file with a C<.augsave> extension."
3882 #: ../src/guestfs-actions.pod:211 ../fish/guestfish-actions.pod:178
3883 msgid "C<AUG_SAVE_NEWFILE> = 2"
3887 #: ../src/guestfs-actions.pod:213 ../fish/guestfish-actions.pod:180
3889 "Save changes into a file with extension C<.augnew>, and do not overwrite "
3890 "original. Overrides C<AUG_SAVE_BACKUP>."
3894 #: ../src/guestfs-actions.pod:216 ../fish/guestfish-actions.pod:183
3895 msgid "C<AUG_TYPE_CHECK> = 4"
3899 #: ../src/guestfs-actions.pod:218 ../fish/guestfish-actions.pod:185
3900 msgid "Typecheck lenses (can be expensive)."
3904 #: ../src/guestfs-actions.pod:220 ../fish/guestfish-actions.pod:187
3905 msgid "C<AUG_NO_STDINC> = 8"
3909 #: ../src/guestfs-actions.pod:222 ../fish/guestfish-actions.pod:189
3910 msgid "Do not use standard load path for modules."
3914 #: ../src/guestfs-actions.pod:224 ../fish/guestfish-actions.pod:191
3915 msgid "C<AUG_SAVE_NOOP> = 16"
3919 #: ../src/guestfs-actions.pod:226 ../fish/guestfish-actions.pod:193
3920 msgid "Make save a no-op, just record what would have been changed."
3924 #: ../src/guestfs-actions.pod:228 ../fish/guestfish-actions.pod:195
3925 msgid "C<AUG_NO_LOAD> = 32"
3929 #: ../src/guestfs-actions.pod:230
3930 msgid "Do not load the tree in C<guestfs_aug_init>."
3934 #: ../src/guestfs-actions.pod:234
3935 msgid "To close the handle, you can call C<guestfs_aug_close>."
3939 #: ../src/guestfs-actions.pod:236 ../fish/guestfish-actions.pod:203
3940 msgid "To find out more about Augeas, see L<http://augeas.net/>."
3944 #: ../src/guestfs-actions.pod:240
3945 msgid "guestfs_aug_insert"
3949 #: ../src/guestfs-actions.pod:242
3952 " int guestfs_aug_insert (guestfs_h *g,\n"
3953 "\t\tconst char *augpath,\n"
3954 "\t\tconst char *label,\n"
3955 "\t\tint before);\n"
3960 #: ../src/guestfs-actions.pod:247 ../fish/guestfish-actions.pod:209
3962 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
3963 "or after C<path> (depending on the boolean flag C<before>)."
3967 #: ../src/guestfs-actions.pod:251 ../fish/guestfish-actions.pod:213
3969 "C<path> must match exactly one existing node in the tree, and C<label> must "
3970 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
3974 #: ../src/guestfs-actions.pod:257
3975 msgid "guestfs_aug_load"
3979 #: ../src/guestfs-actions.pod:259
3982 " int guestfs_aug_load (guestfs_h *g);\n"
3987 #: ../src/guestfs-actions.pod:261 ../fish/guestfish-actions.pod:221
3988 msgid "Load files into the tree."
3992 #: ../src/guestfs-actions.pod:263 ../fish/guestfish-actions.pod:223
3993 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
3997 #: ../src/guestfs-actions.pod:268
3998 msgid "guestfs_aug_ls"
4002 #: ../src/guestfs-actions.pod:270
4005 " char **guestfs_aug_ls (guestfs_h *g,\n"
4006 "\t\tconst char *augpath);\n"
4011 #: ../src/guestfs-actions.pod:273
4013 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
4014 "sorting the resulting nodes into alphabetical order."
4018 #: ../src/guestfs-actions.pod:276 ../src/guestfs-actions.pod:289 ../src/guestfs-actions.pod:417 ../src/guestfs-actions.pod:802 ../src/guestfs-actions.pod:1081 ../src/guestfs-actions.pod:1097 ../src/guestfs-actions.pod:1185 ../src/guestfs-actions.pod:1201 ../src/guestfs-actions.pod:1432 ../src/guestfs-actions.pod:1766 ../src/guestfs-actions.pod:1779 ../src/guestfs-actions.pod:1795 ../src/guestfs-actions.pod:1832 ../src/guestfs-actions.pod:1853 ../src/guestfs-actions.pod:1915 ../src/guestfs-actions.pod:1955 ../src/guestfs-actions.pod:2121 ../src/guestfs-actions.pod:2289 ../src/guestfs-actions.pod:2494 ../src/guestfs-actions.pod:2550 ../src/guestfs-actions.pod:2634 ../src/guestfs-actions.pod:2963 ../src/guestfs-actions.pod:3470 ../src/guestfs-actions.pod:3919 ../src/guestfs-actions.pod:4028 ../src/guestfs-actions.pod:4134 ../src/guestfs-actions.pod:4683 ../src/guestfs-actions.pod:4732 ../src/guestfs-actions.pod:4784 ../src/guestfs-actions.pod:4900 ../src/guestfs-actions.pod:4921 ../src/guestfs-actions.pod:5321 ../src/guestfs-actions.pod:5338 ../src/guestfs-actions.pod:5376 ../src/guestfs-actions.pod:5512 ../src/guestfs-actions.pod:5528 ../src/guestfs-actions.pod:5601 ../src/guestfs-actions.pod:5617 ../src/guestfs-actions.pod:5657 ../src/guestfs-actions.pod:5673
4020 "This function returns a NULL-terminated array of strings (like "
4021 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
4022 "strings and the array after use>."
4026 #: ../src/guestfs-actions.pod:280
4027 msgid "guestfs_aug_match"
4031 #: ../src/guestfs-actions.pod:282
4034 " char **guestfs_aug_match (guestfs_h *g,\n"
4035 "\t\tconst char *augpath);\n"
4040 #: ../src/guestfs-actions.pod:285 ../fish/guestfish-actions.pod:237
4042 "Returns a list of paths which match the path expression C<path>. The "
4043 "returned paths are sufficiently qualified so that they match exactly one "
4044 "node in the current tree."
4048 #: ../src/guestfs-actions.pod:293
4049 msgid "guestfs_aug_mv"
4053 #: ../src/guestfs-actions.pod:295
4056 " int guestfs_aug_mv (guestfs_h *g,\n"
4057 "\t\tconst char *src,\n"
4058 "\t\tconst char *dest);\n"
4063 #: ../src/guestfs-actions.pod:299 ../fish/guestfish-actions.pod:245
4065 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
4066 "C<dest> is overwritten if it exists."
4070 #: ../src/guestfs-actions.pod:304
4071 msgid "guestfs_aug_rm"
4075 #: ../src/guestfs-actions.pod:306
4078 " int guestfs_aug_rm (guestfs_h *g,\n"
4079 "\t\tconst char *augpath);\n"
4084 #: ../src/guestfs-actions.pod:309 ../fish/guestfish-actions.pod:252
4085 msgid "Remove C<path> and all of its children."
4089 #: ../src/guestfs-actions.pod:311 ../fish/guestfish-actions.pod:254
4090 msgid "On success this returns the number of entries which were removed."
4094 #: ../src/guestfs-actions.pod:315
4095 msgid "guestfs_aug_save"
4099 #: ../src/guestfs-actions.pod:317
4102 " int guestfs_aug_save (guestfs_h *g);\n"
4107 #: ../src/guestfs-actions.pod:319 ../fish/guestfish-actions.pod:260
4108 msgid "This writes all pending changes to disk."
4112 #: ../src/guestfs-actions.pod:321
4114 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
4119 #: ../src/guestfs-actions.pod:326
4120 msgid "guestfs_aug_set"
4124 #: ../src/guestfs-actions.pod:328
4127 " int guestfs_aug_set (guestfs_h *g,\n"
4128 "\t\tconst char *augpath,\n"
4129 "\t\tconst char *val);\n"
4134 #: ../src/guestfs-actions.pod:332 ../fish/guestfish-actions.pod:269
4135 msgid "Set the value associated with C<path> to C<val>."
4139 #: ../src/guestfs-actions.pod:334
4141 "In the Augeas API, it is possible to clear a node by setting the value to "
4142 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
4143 "this call. Instead you must use the C<guestfs_aug_clear> call."
4147 #: ../src/guestfs-actions.pod:341
4148 msgid "guestfs_available"
4152 #: ../src/guestfs-actions.pod:343
4155 " int guestfs_available (guestfs_h *g,\n"
4156 "\t\tchar *const *groups);\n"
4161 #: ../src/guestfs-actions.pod:346 ../fish/guestfish-actions.pod:280
4163 "This command is used to check the availability of some groups of "
4164 "functionality in the appliance, which not all builds of the libguestfs "
4165 "appliance will be able to provide."
4169 #: ../src/guestfs-actions.pod:350
4171 "The libguestfs groups, and the functions that those groups correspond to, "
4172 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
4173 "runtime by calling C<guestfs_available_all_groups>."
4177 #: ../src/guestfs-actions.pod:355 ../fish/guestfish-actions.pod:289
4179 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
4180 "\"augeas\"]> would check for the availability of the Linux inotify functions "
4181 "and Augeas (configuration file editing) functions."
4185 #: ../src/guestfs-actions.pod:360 ../fish/guestfish-actions.pod:294
4186 msgid "The command returns no error if I<all> requested groups are available."
4190 #: ../src/guestfs-actions.pod:362 ../fish/guestfish-actions.pod:296
4192 "It fails with an error if one or more of the requested groups is unavailable "
4197 #: ../src/guestfs-actions.pod:365 ../fish/guestfish-actions.pod:299
4199 "If an unknown group name is included in the list of groups then an error is "
4204 #: ../src/guestfs-actions.pod:368 ../fish/guestfish-actions.pod:302
4209 #: ../src/guestfs-actions.pod:374
4210 msgid "You must call C<guestfs_launch> before calling this function."
4214 #: ../src/guestfs-actions.pod:376 ../fish/guestfish-actions.pod:310
4216 "The reason is because we don't know what groups are supported by the "
4217 "appliance/daemon until it is running and can be queried."
4221 #: ../src/guestfs-actions.pod:382 ../fish/guestfish-actions.pod:316
4223 "If a group of functions is available, this does not necessarily mean that "
4224 "they will work. You still have to check for errors when calling individual "
4225 "API functions even if they are available."
4229 #: ../src/guestfs-actions.pod:389 ../fish/guestfish-actions.pod:323
4231 "It is usually the job of distro packagers to build complete functionality "
4232 "into the libguestfs appliance. Upstream libguestfs, if built from source "
4233 "with all requirements satisfied, will support everything."
4237 #: ../src/guestfs-actions.pod:396
4239 "This call was added in version C<1.0.80>. In previous versions of "
4240 "libguestfs all you could do would be to speculatively execute a command to "
4241 "find out if the daemon implemented it. See also C<guestfs_version>."
4245 #: ../src/guestfs-actions.pod:405
4246 msgid "guestfs_available_all_groups"
4250 #: ../src/guestfs-actions.pod:407
4253 " char **guestfs_available_all_groups (guestfs_h *g);\n"
4258 #: ../src/guestfs-actions.pod:409
4260 "This command returns a list of all optional groups that this daemon knows "
4261 "about. Note this returns both supported and unsupported groups. To find "
4262 "out which ones the daemon can actually support you have to call "
4263 "C<guestfs_available> on each member of the returned list."
4267 #: ../src/guestfs-actions.pod:415
4268 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
4272 #: ../src/guestfs-actions.pod:421
4273 msgid "guestfs_base64_in"
4277 #: ../src/guestfs-actions.pod:423
4280 " int guestfs_base64_in (guestfs_h *g,\n"
4281 "\t\tconst char *base64file,\n"
4282 "\t\tconst char *filename);\n"
4287 #: ../src/guestfs-actions.pod:427 ../fish/guestfish-actions.pod:353
4288 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
4292 #: ../src/guestfs-actions.pod:432
4293 msgid "guestfs_base64_out"
4297 #: ../src/guestfs-actions.pod:434
4300 " int guestfs_base64_out (guestfs_h *g,\n"
4301 "\t\tconst char *filename,\n"
4302 "\t\tconst char *base64file);\n"
4307 #: ../src/guestfs-actions.pod:438 ../fish/guestfish-actions.pod:362
4309 "This command downloads the contents of C<filename>, writing it out to local "
4310 "file C<base64file> encoded as base64."
4314 #: ../src/guestfs-actions.pod:443
4315 msgid "guestfs_blockdev_flushbufs"
4319 #: ../src/guestfs-actions.pod:445
4322 " int guestfs_blockdev_flushbufs (guestfs_h *g,\n"
4323 "\t\tconst char *device);\n"
4328 #: ../src/guestfs-actions.pod:448 ../fish/guestfish-actions.pod:371
4329 msgid "This tells the kernel to flush internal buffers associated with C<device>."
4333 #: ../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:374 ../fish/guestfish-actions.pod:385 ../fish/guestfish-actions.pod:394 ../fish/guestfish-actions.pod:404 ../fish/guestfish-actions.pod:416 ../fish/guestfish-actions.pod:429 ../fish/guestfish-actions.pod:437 ../fish/guestfish-actions.pod:448 ../fish/guestfish-actions.pod:456 ../fish/guestfish-actions.pod:464
4334 msgid "This uses the L<blockdev(8)> command."
4338 #: ../src/guestfs-actions.pod:455
4339 msgid "guestfs_blockdev_getbsz"
4343 #: ../src/guestfs-actions.pod:457
4346 " int guestfs_blockdev_getbsz (guestfs_h *g,\n"
4347 "\t\tconst char *device);\n"
4352 #: ../src/guestfs-actions.pod:460 ../fish/guestfish-actions.pod:380
4353 msgid "This returns the block size of a device."
4357 #: ../src/guestfs-actions.pod:462 ../src/guestfs-actions.pod:544 ../fish/guestfish-actions.pod:382 ../fish/guestfish-actions.pod:445
4359 "(Note this is different from both I<size in blocks> and I<filesystem block "
4364 #: ../src/guestfs-actions.pod:469
4365 msgid "guestfs_blockdev_getro"
4369 #: ../src/guestfs-actions.pod:471
4372 " int guestfs_blockdev_getro (guestfs_h *g,\n"
4373 "\t\tconst char *device);\n"
4378 #: ../src/guestfs-actions.pod:474 ../fish/guestfish-actions.pod:391
4380 "Returns a boolean indicating if the block device is read-only (true if "
4381 "read-only, false if not)."
4385 #: ../src/guestfs-actions.pod:479 ../src/guestfs-actions.pod:1115 ../src/guestfs-actions.pod:1127 ../src/guestfs-actions.pod:1559 ../src/guestfs-actions.pod:1567 ../src/guestfs-actions.pod:1627 ../src/guestfs-actions.pod:1670 ../src/guestfs-actions.pod:1682 ../src/guestfs-actions.pod:1701 ../src/guestfs-actions.pod:1718 ../src/guestfs-actions.pod:2303 ../src/guestfs-actions.pod:2314 ../src/guestfs-actions.pod:2326 ../src/guestfs-actions.pod:2337 ../src/guestfs-actions.pod:2350 ../src/guestfs-actions.pod:2362 ../src/guestfs-actions.pod:2375 ../src/guestfs-actions.pod:2386 ../src/guestfs-actions.pod:2396 ../src/guestfs-actions.pod:2407 ../src/guestfs-actions.pod:2419 ../src/guestfs-actions.pod:2431 ../src/guestfs-actions.pod:3595
4386 msgid "This function returns a C truth value on success or -1 on error."
4390 #: ../src/guestfs-actions.pod:481
4391 msgid "guestfs_blockdev_getsize64"
4395 #: ../src/guestfs-actions.pod:483
4398 " int64_t guestfs_blockdev_getsize64 (guestfs_h *g,\n"
4399 "\t\tconst char *device);\n"
4404 #: ../src/guestfs-actions.pod:486 ../fish/guestfish-actions.pod:400
4405 msgid "This returns the size of the device in bytes."
4409 #: ../src/guestfs-actions.pod:488
4410 msgid "See also C<guestfs_blockdev_getsz>."
4414 #: ../src/guestfs-actions.pod:494
4415 msgid "guestfs_blockdev_getss"
4419 #: ../src/guestfs-actions.pod:496
4422 " int guestfs_blockdev_getss (guestfs_h *g,\n"
4423 "\t\tconst char *device);\n"
4428 #: ../src/guestfs-actions.pod:499 ../fish/guestfish-actions.pod:410
4430 "This returns the size of sectors on a block device. Usually 512, but can be "
4431 "larger for modern devices."
4435 #: ../src/guestfs-actions.pod:502
4437 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
4442 #: ../src/guestfs-actions.pod:509
4443 msgid "guestfs_blockdev_getsz"
4447 #: ../src/guestfs-actions.pod:511
4450 " int64_t guestfs_blockdev_getsz (guestfs_h *g,\n"
4451 "\t\tconst char *device);\n"
4456 #: ../src/guestfs-actions.pod:514 ../fish/guestfish-actions.pod:422
4458 "This returns the size of the device in units of 512-byte sectors (even if "
4459 "the sectorsize isn't 512 bytes ... weird)."
4463 #: ../src/guestfs-actions.pod:517
4465 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
4466 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
4470 #: ../src/guestfs-actions.pod:525
4471 msgid "guestfs_blockdev_rereadpt"
4475 #: ../src/guestfs-actions.pod:527
4478 " int guestfs_blockdev_rereadpt (guestfs_h *g,\n"
4479 "\t\tconst char *device);\n"
4484 #: ../src/guestfs-actions.pod:530 ../fish/guestfish-actions.pod:435
4485 msgid "Reread the partition table on C<device>."
4489 #: ../src/guestfs-actions.pod:536
4490 msgid "guestfs_blockdev_setbsz"
4494 #: ../src/guestfs-actions.pod:538
4497 " int guestfs_blockdev_setbsz (guestfs_h *g,\n"
4498 "\t\tconst char *device,\n"
4499 "\t\tint blocksize);\n"
4504 #: ../src/guestfs-actions.pod:542 ../fish/guestfish-actions.pod:443
4505 msgid "This sets the block size of a device."
4509 #: ../src/guestfs-actions.pod:551
4510 msgid "guestfs_blockdev_setro"
4514 #: ../src/guestfs-actions.pod:553
4517 " int guestfs_blockdev_setro (guestfs_h *g,\n"
4518 "\t\tconst char *device);\n"
4523 #: ../src/guestfs-actions.pod:556 ../fish/guestfish-actions.pod:454
4524 msgid "Sets the block device named C<device> to read-only."
4528 #: ../src/guestfs-actions.pod:562
4529 msgid "guestfs_blockdev_setrw"
4533 #: ../src/guestfs-actions.pod:564
4536 " int guestfs_blockdev_setrw (guestfs_h *g,\n"
4537 "\t\tconst char *device);\n"
4542 #: ../src/guestfs-actions.pod:567 ../fish/guestfish-actions.pod:462
4543 msgid "Sets the block device named C<device> to read-write."
4547 #: ../src/guestfs-actions.pod:573
4548 msgid "guestfs_case_sensitive_path"
4552 #: ../src/guestfs-actions.pod:575
4555 " char *guestfs_case_sensitive_path (guestfs_h *g,\n"
4556 "\t\tconst char *path);\n"
4561 #: ../src/guestfs-actions.pod:578 ../fish/guestfish-actions.pod:470
4563 "This can be used to resolve case insensitive paths on a filesystem which is "
4564 "case sensitive. The use case is to resolve paths which you have read from "
4565 "Windows configuration files or the Windows Registry, to the true path."
4569 #: ../src/guestfs-actions.pod:583 ../fish/guestfish-actions.pod:475
4571 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
4572 "(and probably others), which is that although the underlying filesystem is "
4573 "case-insensitive, the driver exports the filesystem to Linux as "
4578 #: ../src/guestfs-actions.pod:588 ../fish/guestfish-actions.pod:480
4580 "One consequence of this is that special directories such as C<c:\\windows> "
4581 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
4582 "precise details of how they were created. In Windows itself this would not "
4587 #: ../src/guestfs-actions.pod:594 ../fish/guestfish-actions.pod:486
4589 "Bug or feature? You decide: "
4590 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
4594 #: ../src/guestfs-actions.pod:597 ../fish/guestfish-actions.pod:489
4596 "This function resolves the true case of each element in the path and returns "
4597 "the case-sensitive path."
4601 #: ../src/guestfs-actions.pod:600
4603 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
4604 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
4605 "how the directories were originally created under Windows)."
4609 #: ../src/guestfs-actions.pod:605 ../fish/guestfish-actions.pod:497
4610 msgid "I<Note>: This function does not handle drive names, backslashes etc."
4614 #: ../src/guestfs-actions.pod:608
4615 msgid "See also C<guestfs_realpath>."
4619 #: ../src/guestfs-actions.pod:613
4624 #: ../src/guestfs-actions.pod:615
4627 " char *guestfs_cat (guestfs_h *g,\n"
4628 "\t\tconst char *path);\n"
4633 #: ../src/guestfs-actions.pod:618 ../src/guestfs-actions.pod:4018 ../fish/guestfish-actions.pod:506 ../fish/guestfish-actions.pod:3100
4634 msgid "Return the contents of the file named C<path>."
4638 #: ../src/guestfs-actions.pod:620
4640 "Note that this function cannot correctly handle binary files (specifically, "
4641 "files containing C<\\0> character which is treated as end of string). For "
4642 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
4643 "functions which have a more complex interface."
4647 #: ../src/guestfs-actions.pod:628 ../src/guestfs-actions.pod:789 ../src/guestfs-actions.pod:806 ../src/guestfs-actions.pod:1085 ../src/guestfs-actions.pod:1101 ../src/guestfs-actions.pod:1189 ../src/guestfs-actions.pod:1205 ../src/guestfs-actions.pod:1436 ../src/guestfs-actions.pod:1783 ../src/guestfs-actions.pod:1799 ../src/guestfs-actions.pod:1836 ../src/guestfs-actions.pod:1857 ../src/guestfs-actions.pod:1871 ../src/guestfs-actions.pod:1897 ../src/guestfs-actions.pod:3835 ../src/guestfs-actions.pod:3858 ../src/guestfs-actions.pod:3966 ../src/guestfs-actions.pod:3989 ../src/guestfs-actions.pod:4010 ../src/guestfs-actions.pod:4736 ../src/guestfs-actions.pod:4788 ../src/guestfs-actions.pod:4904 ../src/guestfs-actions.pod:4925 ../src/guestfs-actions.pod:5470 ../src/guestfs-actions.pod:5493 ../src/guestfs-actions.pod:5516 ../src/guestfs-actions.pod:5532 ../src/guestfs-actions.pod:5605 ../src/guestfs-actions.pod:5621 ../src/guestfs-actions.pod:5661 ../src/guestfs-actions.pod:5677 ../fish/guestfish-actions.pod:513 ../fish/guestfish-actions.pod:648 ../fish/guestfish-actions.pod:660 ../fish/guestfish-actions.pod:861 ../fish/guestfish-actions.pod:871 ../fish/guestfish-actions.pod:938 ../fish/guestfish-actions.pod:948 ../fish/guestfish-actions.pod:1143 ../fish/guestfish-actions.pod:1418 ../fish/guestfish-actions.pod:1428 ../fish/guestfish-actions.pod:1456 ../fish/guestfish-actions.pod:1471 ../fish/guestfish-actions.pod:1481 ../fish/guestfish-actions.pod:1500 ../fish/guestfish-actions.pod:2970 ../fish/guestfish-actions.pod:2985 ../fish/guestfish-actions.pod:3061 ../fish/guestfish-actions.pod:3078 ../fish/guestfish-actions.pod:3093 ../fish/guestfish-actions.pod:3676 ../fish/guestfish-actions.pod:3722 ../fish/guestfish-actions.pod:3807 ../fish/guestfish-actions.pod:3822 ../fish/guestfish-actions.pod:4232 ../fish/guestfish-actions.pod:4250 ../fish/guestfish-actions.pod:4267 ../fish/guestfish-actions.pod:4277 ../fish/guestfish-actions.pod:4325 ../fish/guestfish-actions.pod:4335 ../fish/guestfish-actions.pod:4364 ../fish/guestfish-actions.pod:4374
4649 "Because of the message protocol, there is a transfer limit of somewhere "
4650 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
4654 #: ../src/guestfs-actions.pod:631
4655 msgid "guestfs_checksum"
4659 #: ../src/guestfs-actions.pod:633
4662 " char *guestfs_checksum (guestfs_h *g,\n"
4663 "\t\tconst char *csumtype,\n"
4664 "\t\tconst char *path);\n"
4669 #: ../src/guestfs-actions.pod:637 ../fish/guestfish-actions.pod:520
4670 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
4674 #: ../src/guestfs-actions.pod:640 ../fish/guestfish-actions.pod:523
4676 "The type of checksum to compute is given by the C<csumtype> parameter which "
4677 "must have one of the following values:"
4681 #: ../src/guestfs-actions.pod:645 ../fish/guestfish-actions.pod:528
4686 #: ../src/guestfs-actions.pod:647 ../fish/guestfish-actions.pod:530
4688 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
4693 #: ../src/guestfs-actions.pod:650 ../fish/guestfish-actions.pod:533
4698 #: ../src/guestfs-actions.pod:652 ../fish/guestfish-actions.pod:535
4699 msgid "Compute the MD5 hash (using the C<md5sum> program)."
4703 #: ../src/guestfs-actions.pod:654 ../fish/guestfish-actions.pod:537
4708 #: ../src/guestfs-actions.pod:656 ../fish/guestfish-actions.pod:539
4709 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
4713 #: ../src/guestfs-actions.pod:658 ../fish/guestfish-actions.pod:541
4718 #: ../src/guestfs-actions.pod:660 ../fish/guestfish-actions.pod:543
4719 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
4723 #: ../src/guestfs-actions.pod:662 ../fish/guestfish-actions.pod:545
4728 #: ../src/guestfs-actions.pod:664 ../fish/guestfish-actions.pod:547
4729 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
4733 #: ../src/guestfs-actions.pod:666 ../fish/guestfish-actions.pod:549
4738 #: ../src/guestfs-actions.pod:668 ../fish/guestfish-actions.pod:551
4739 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
4743 #: ../src/guestfs-actions.pod:670 ../fish/guestfish-actions.pod:553
4748 #: ../src/guestfs-actions.pod:672 ../fish/guestfish-actions.pod:555
4749 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
4753 #: ../src/guestfs-actions.pod:676 ../fish/guestfish-actions.pod:559
4754 msgid "The checksum is returned as a printable string."
4758 #: ../src/guestfs-actions.pod:678
4759 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
4763 #: ../src/guestfs-actions.pod:680
4764 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
4768 #: ../src/guestfs-actions.pod:685
4769 msgid "guestfs_checksum_device"
4773 #: ../src/guestfs-actions.pod:687
4776 " char *guestfs_checksum_device (guestfs_h *g,\n"
4777 "\t\tconst char *csumtype,\n"
4778 "\t\tconst char *device);\n"
4783 #: ../src/guestfs-actions.pod:691
4785 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
4786 "device named C<device>. For the types of checksums supported see the "
4787 "C<guestfs_checksum> command."
4791 #: ../src/guestfs-actions.pod:698
4792 msgid "guestfs_checksums_out"
4796 #: ../src/guestfs-actions.pod:700
4799 " int guestfs_checksums_out (guestfs_h *g,\n"
4800 "\t\tconst char *csumtype,\n"
4801 "\t\tconst char *directory,\n"
4802 "\t\tconst char *sumsfile);\n"
4807 #: ../src/guestfs-actions.pod:705 ../fish/guestfish-actions.pod:577
4809 "This command computes the checksums of all regular files in C<directory> and "
4810 "then emits a list of those checksums to the local output file C<sumsfile>."
4814 #: ../src/guestfs-actions.pod:709 ../fish/guestfish-actions.pod:581
4816 "This can be used for verifying the integrity of a virtual machine. However "
4817 "to be properly secure you should pay attention to the output of the checksum "
4818 "command (it uses the ones from GNU coreutils). In particular when the "
4819 "filename is not printable, coreutils uses a special backslash syntax. For "
4820 "more information, see the GNU coreutils info file."
4824 #: ../src/guestfs-actions.pod:719
4825 msgid "guestfs_chmod"
4829 #: ../src/guestfs-actions.pod:721
4832 " int guestfs_chmod (guestfs_h *g,\n"
4834 "\t\tconst char *path);\n"
4839 #: ../src/guestfs-actions.pod:725 ../fish/guestfish-actions.pod:595
4841 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
4846 #: ../src/guestfs-actions.pod:728 ../fish/guestfish-actions.pod:598
4848 "I<Note>: When using this command from guestfish, C<mode> by default would be "
4849 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
4854 #: ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:3178 ../src/guestfs-actions.pod:3266 ../src/guestfs-actions.pod:3282 ../src/guestfs-actions.pod:3298 ../fish/guestfish-actions.pod:602 ../fish/guestfish-actions.pod:2475 ../fish/guestfish-actions.pod:2545 ../fish/guestfish-actions.pod:2555 ../fish/guestfish-actions.pod:2565
4855 msgid "The mode actually set is affected by the umask."
4859 #: ../src/guestfs-actions.pod:736
4860 msgid "guestfs_chown"
4864 #: ../src/guestfs-actions.pod:738
4867 " int guestfs_chown (guestfs_h *g,\n"
4870 "\t\tconst char *path);\n"
4875 #: ../src/guestfs-actions.pod:743 ../fish/guestfish-actions.pod:608
4876 msgid "Change the file owner to C<owner> and group to C<group>."
4880 #: ../src/guestfs-actions.pod:745 ../src/guestfs-actions.pod:2464 ../fish/guestfish-actions.pod:610 ../fish/guestfish-actions.pod:1966
4882 "Only numeric uid and gid are supported. If you want to use names, you will "
4883 "need to locate and parse the password file yourself (Augeas support makes "
4884 "this relatively easy)."
4888 #: ../src/guestfs-actions.pod:751
4889 msgid "guestfs_command"
4893 #: ../src/guestfs-actions.pod:753
4896 " char *guestfs_command (guestfs_h *g,\n"
4897 "\t\tchar *const *arguments);\n"
4902 #: ../src/guestfs-actions.pod:756 ../fish/guestfish-actions.pod:618
4904 "This call runs a command from the guest filesystem. The filesystem must be "
4905 "mounted, and must contain a compatible operating system (ie. something "
4906 "Linux, with the same or compatible processor architecture)."
4910 #: ../src/guestfs-actions.pod:761
4912 "The single parameter is an argv-style list of arguments. The first element "
4913 "is the name of the program to run. Subsequent elements are parameters. The "
4914 "list must be non-empty (ie. must contain a program name). Note that the "
4915 "command runs directly, and is I<not> invoked via the shell (see "
4920 #: ../src/guestfs-actions.pod:768 ../fish/guestfish-actions.pod:630
4921 msgid "The return value is anything printed to I<stdout> by the command."
4925 #: ../src/guestfs-actions.pod:771 ../fish/guestfish-actions.pod:633
4927 "If the command returns a non-zero exit status, then this function returns an "
4928 "error message. The error message string is the content of I<stderr> from "
4933 #: ../src/guestfs-actions.pod:775 ../fish/guestfish-actions.pod:637
4935 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
4936 "C</bin>. If you require a program from another location, you should provide "
4937 "the full path in the first parameter."
4941 #: ../src/guestfs-actions.pod:780 ../fish/guestfish-actions.pod:642
4943 "Shared libraries and data files required by the program must be available on "
4944 "filesystems which are mounted in the correct places. It is the caller's "
4945 "responsibility to ensure all filesystems that are needed are mounted at the "
4950 #: ../src/guestfs-actions.pod:792
4951 msgid "guestfs_command_lines"
4955 #: ../src/guestfs-actions.pod:794
4958 " char **guestfs_command_lines (guestfs_h *g,\n"
4959 "\t\tchar *const *arguments);\n"
4964 #: ../src/guestfs-actions.pod:797
4966 "This is the same as C<guestfs_command>, but splits the result into a list of "
4971 #: ../src/guestfs-actions.pod:800
4972 msgid "See also: C<guestfs_sh_lines>"
4976 #: ../src/guestfs-actions.pod:809
4977 msgid "guestfs_config"
4981 #: ../src/guestfs-actions.pod:811
4984 " int guestfs_config (guestfs_h *g,\n"
4985 "\t\tconst char *qemuparam,\n"
4986 "\t\tconst char *qemuvalue);\n"
4991 #: ../src/guestfs-actions.pod:815 ../fish/guestfish-actions.pod:667
4993 "This can be used to add arbitrary qemu command line parameters of the form "
4994 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
4995 "setting some parameters which would interfere with parameters that we use."
4999 #: ../src/guestfs-actions.pod:820 ../fish/guestfish-actions.pod:672
5000 msgid "The first character of C<param> string must be a C<-> (dash)."
5004 #: ../src/guestfs-actions.pod:822 ../fish/guestfish-actions.pod:674
5005 msgid "C<value> can be NULL."
5009 #: ../src/guestfs-actions.pod:826
5010 msgid "guestfs_copy_size"
5014 #: ../src/guestfs-actions.pod:828
5017 " int guestfs_copy_size (guestfs_h *g,\n"
5018 "\t\tconst char *src,\n"
5019 "\t\tconst char *dest,\n"
5020 "\t\tint64_t size);\n"
5025 #: ../src/guestfs-actions.pod:833 ../fish/guestfish-actions.pod:680
5027 "This command copies exactly C<size> bytes from one source device or file "
5028 "C<src> to another destination device or file C<dest>."
5032 #: ../src/guestfs-actions.pod:836 ../fish/guestfish-actions.pod:683
5034 "Note this will fail if the source is too short or if the destination is not "
5039 #: ../src/guestfs-actions.pod:841 ../src/guestfs-actions.pod:976 ../src/guestfs-actions.pod:1004 ../src/guestfs-actions.pod:1376 ../src/guestfs-actions.pod:1395 ../src/guestfs-actions.pod:5550 ../src/guestfs-actions.pod:5566
5041 "This long-running command can generate progress notification messages so "
5042 "that the caller can display a progress bar or indicator. To receive these "
5043 "messages, the caller must register a progress callback. See "
5044 "L<guestfs(3)/guestfs_set_progress_callback>."
5048 #: ../src/guestfs-actions.pod:846
5053 #: ../src/guestfs-actions.pod:848
5056 " int guestfs_cp (guestfs_h *g,\n"
5057 "\t\tconst char *src,\n"
5058 "\t\tconst char *dest);\n"
5063 #: ../src/guestfs-actions.pod:852 ../fish/guestfish-actions.pod:690
5065 "This copies a file from C<src> to C<dest> where C<dest> is either a "
5066 "destination filename or destination directory."
5070 #: ../src/guestfs-actions.pod:857
5071 msgid "guestfs_cp_a"
5075 #: ../src/guestfs-actions.pod:859
5078 " int guestfs_cp_a (guestfs_h *g,\n"
5079 "\t\tconst char *src,\n"
5080 "\t\tconst char *dest);\n"
5085 #: ../src/guestfs-actions.pod:863 ../fish/guestfish-actions.pod:697
5087 "This copies a file or directory from C<src> to C<dest> recursively using the "
5092 #: ../src/guestfs-actions.pod:868
5097 #: ../src/guestfs-actions.pod:870
5100 " int guestfs_dd (guestfs_h *g,\n"
5101 "\t\tconst char *src,\n"
5102 "\t\tconst char *dest);\n"
5107 #: ../src/guestfs-actions.pod:874 ../fish/guestfish-actions.pod:704
5109 "This command copies from one source device or file C<src> to another "
5110 "destination device or file C<dest>. Normally you would use this to copy to "
5111 "or from a device or partition, for example to duplicate a filesystem."
5115 #: ../src/guestfs-actions.pod:879
5117 "If the destination is a device, it must be as large or larger than the "
5118 "source file or device, otherwise the copy will fail. This command cannot do "
5119 "partial copies (see C<guestfs_copy_size>)."
5123 #: ../src/guestfs-actions.pod:885
5124 msgid "guestfs_debug"
5128 #: ../src/guestfs-actions.pod:887
5131 " char *guestfs_debug (guestfs_h *g,\n"
5132 "\t\tconst char *subcmd,\n"
5133 "\t\tchar *const *extraargs);\n"
5138 #: ../src/guestfs-actions.pod:891
5140 "The C<guestfs_debug> command exposes some internals of C<guestfsd> (the "
5141 "guestfs daemon) that runs inside the qemu subprocess."
5145 #: ../src/guestfs-actions.pod:895 ../fish/guestfish-actions.pod:721
5147 "There is no comprehensive help for this command. You have to look at the "
5148 "file C<daemon/debug.c> in the libguestfs source to find out what you can do."
5152 #: ../src/guestfs-actions.pod:902
5153 msgid "guestfs_debug_upload"
5157 #: ../src/guestfs-actions.pod:904
5160 " int guestfs_debug_upload (guestfs_h *g,\n"
5161 "\t\tconst char *filename,\n"
5162 "\t\tconst char *tmpname,\n"
5168 #: ../src/guestfs-actions.pod:909
5170 "The C<guestfs_debug_upload> command uploads a file to the libguestfs "
5175 #: ../src/guestfs-actions.pod:912 ../fish/guestfish-actions.pod:732
5177 "There is no comprehensive help for this command. You have to look at the "
5178 "file C<daemon/debug.c> in the libguestfs source to find out what it is for."
5182 #: ../src/guestfs-actions.pod:918
5187 #: ../src/guestfs-actions.pod:920
5190 " char *guestfs_df (guestfs_h *g);\n"
5195 #: ../src/guestfs-actions.pod:922 ../fish/guestfish-actions.pod:742
5196 msgid "This command runs the C<df> command to report disk space used."
5200 #: ../src/guestfs-actions.pod:924 ../src/guestfs-actions.pod:938 ../fish/guestfish-actions.pod:744 ../fish/guestfish-actions.pod:755
5202 "This command is mostly useful for interactive sessions. It is I<not> "
5203 "intended that you try to parse the output string. Use C<statvfs> from "
5208 #: ../src/guestfs-actions.pod:931
5209 msgid "guestfs_df_h"
5213 #: ../src/guestfs-actions.pod:933
5216 " char *guestfs_df_h (guestfs_h *g);\n"
5221 #: ../src/guestfs-actions.pod:935 ../fish/guestfish-actions.pod:752
5223 "This command runs the C<df -h> command to report disk space used in "
5224 "human-readable format."
5228 #: ../src/guestfs-actions.pod:945
5229 msgid "guestfs_dmesg"
5233 #: ../src/guestfs-actions.pod:947
5236 " char *guestfs_dmesg (guestfs_h *g);\n"
5241 #: ../src/guestfs-actions.pod:949 ../fish/guestfish-actions.pod:763
5243 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
5244 "This is sometimes useful for extended debugging of problems."
5248 #: ../src/guestfs-actions.pod:953
5250 "Another way to get the same information is to enable verbose messages with "
5251 "C<guestfs_set_verbose> or by setting the environment variable "
5252 "C<LIBGUESTFS_DEBUG=1> before running the program."
5256 #: ../src/guestfs-actions.pod:961
5257 msgid "guestfs_download"
5261 #: ../src/guestfs-actions.pod:963
5264 " int guestfs_download (guestfs_h *g,\n"
5265 "\t\tconst char *remotefilename,\n"
5266 "\t\tconst char *filename);\n"
5271 #: ../src/guestfs-actions.pod:967 ../src/guestfs-actions.pod:989 ../fish/guestfish-actions.pod:776 ../fish/guestfish-actions.pod:789
5273 "Download file C<remotefilename> and save it as C<filename> on the local "
5278 #: ../src/guestfs-actions.pod:970 ../src/guestfs-actions.pod:5118 ../fish/guestfish-actions.pod:779 ../fish/guestfish-actions.pod:3980
5279 msgid "C<filename> can also be a named pipe."
5283 #: ../src/guestfs-actions.pod:972
5284 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
5288 #: ../src/guestfs-actions.pod:981
5289 msgid "guestfs_download_offset"
5293 #: ../src/guestfs-actions.pod:983
5296 " int guestfs_download_offset (guestfs_h *g,\n"
5297 "\t\tconst char *remotefilename,\n"
5298 "\t\tconst char *filename,\n"
5299 "\t\tint64_t offset,\n"
5300 "\t\tint64_t size);\n"
5305 #: ../src/guestfs-actions.pod:992 ../fish/guestfish-actions.pod:792
5307 "C<remotefilename> is read for C<size> bytes starting at C<offset> (this "
5308 "region must be within the file or device)."
5312 #: ../src/guestfs-actions.pod:995
5314 "Note that there is no limit on the amount of data that can be downloaded "
5315 "with this call, unlike with C<guestfs_pread>, and this call always reads the "
5316 "full amount unless an error occurs."
5320 #: ../src/guestfs-actions.pod:1000
5321 msgid "See also C<guestfs_download>, C<guestfs_pread>."
5325 #: ../src/guestfs-actions.pod:1009
5326 msgid "guestfs_drop_caches"
5330 #: ../src/guestfs-actions.pod:1011
5333 " int guestfs_drop_caches (guestfs_h *g,\n"
5334 "\t\tint whattodrop);\n"
5339 #: ../src/guestfs-actions.pod:1014 ../fish/guestfish-actions.pod:808
5341 "This instructs the guest kernel to drop its page cache, and/or dentries and "
5342 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
5343 "to drop, see L<http://linux-mm.org/Drop_Caches>"
5347 #: ../src/guestfs-actions.pod:1019 ../fish/guestfish-actions.pod:813
5348 msgid "Setting C<whattodrop> to 3 should drop everything."
5352 #: ../src/guestfs-actions.pod:1021 ../fish/guestfish-actions.pod:815
5354 "This automatically calls L<sync(2)> before the operation, so that the "
5355 "maximum guest memory is freed."
5359 #: ../src/guestfs-actions.pod:1026
5364 #: ../src/guestfs-actions.pod:1028
5367 " int64_t guestfs_du (guestfs_h *g,\n"
5368 "\t\tconst char *path);\n"
5373 #: ../src/guestfs-actions.pod:1031 ../fish/guestfish-actions.pod:822
5375 "This command runs the C<du -s> command to estimate file space usage for "
5380 #: ../src/guestfs-actions.pod:1034 ../fish/guestfish-actions.pod:825
5382 "C<path> can be a file or a directory. If C<path> is a directory then the "
5383 "estimate includes the contents of the directory and all subdirectories "
5388 #: ../src/guestfs-actions.pod:1038 ../fish/guestfish-actions.pod:829
5389 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
5393 #: ../src/guestfs-actions.pod:1043
5394 msgid "guestfs_e2fsck_f"
5398 #: ../src/guestfs-actions.pod:1045
5401 " int guestfs_e2fsck_f (guestfs_h *g,\n"
5402 "\t\tconst char *device);\n"
5407 #: ../src/guestfs-actions.pod:1048 ../fish/guestfish-actions.pod:836
5409 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
5410 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
5415 #: ../src/guestfs-actions.pod:1052
5417 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
5418 "Normally you should use C<guestfs_fsck>."
5422 #: ../src/guestfs-actions.pod:1057
5423 msgid "guestfs_echo_daemon"
5427 #: ../src/guestfs-actions.pod:1059
5430 " char *guestfs_echo_daemon (guestfs_h *g,\n"
5431 "\t\tchar *const *words);\n"
5436 #: ../src/guestfs-actions.pod:1062 ../fish/guestfish-actions.pod:847
5438 "This command concatenates the list of C<words> passed with single spaces "
5439 "between them and returns the resulting string."
5443 #: ../src/guestfs-actions.pod:1065 ../fish/guestfish-actions.pod:850
5444 msgid "You can use this command to test the connection through to the daemon."
5448 #: ../src/guestfs-actions.pod:1067
5449 msgid "See also C<guestfs_ping_daemon>."
5453 #: ../src/guestfs-actions.pod:1072
5454 msgid "guestfs_egrep"
5458 #: ../src/guestfs-actions.pod:1074
5461 " char **guestfs_egrep (guestfs_h *g,\n"
5462 "\t\tconst char *regex,\n"
5463 "\t\tconst char *path);\n"
5468 #: ../src/guestfs-actions.pod:1078 ../fish/guestfish-actions.pod:858
5469 msgid "This calls the external C<egrep> program and returns the matching lines."
5473 #: ../src/guestfs-actions.pod:1088
5474 msgid "guestfs_egrepi"
5478 #: ../src/guestfs-actions.pod:1090
5481 " char **guestfs_egrepi (guestfs_h *g,\n"
5482 "\t\tconst char *regex,\n"
5483 "\t\tconst char *path);\n"
5488 #: ../src/guestfs-actions.pod:1094 ../fish/guestfish-actions.pod:868
5489 msgid "This calls the external C<egrep -i> program and returns the matching lines."
5493 #: ../src/guestfs-actions.pod:1104
5494 msgid "guestfs_equal"
5498 #: ../src/guestfs-actions.pod:1106
5501 " int guestfs_equal (guestfs_h *g,\n"
5502 "\t\tconst char *file1,\n"
5503 "\t\tconst char *file2);\n"
5508 #: ../src/guestfs-actions.pod:1110 ../fish/guestfish-actions.pod:878
5510 "This compares the two files C<file1> and C<file2> and returns true if their "
5511 "content is exactly equal, or false otherwise."
5515 #: ../src/guestfs-actions.pod:1113 ../fish/guestfish-actions.pod:881
5516 msgid "The external L<cmp(1)> program is used for the comparison."
5520 #: ../src/guestfs-actions.pod:1117
5521 msgid "guestfs_exists"
5525 #: ../src/guestfs-actions.pod:1119
5528 " int guestfs_exists (guestfs_h *g,\n"
5529 "\t\tconst char *path);\n"
5534 #: ../src/guestfs-actions.pod:1122 ../fish/guestfish-actions.pod:887
5536 "This returns C<true> if and only if there is a file, directory (or anything) "
5537 "with the given C<path> name."
5541 #: ../src/guestfs-actions.pod:1125
5542 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
5546 #: ../src/guestfs-actions.pod:1129
5547 msgid "guestfs_fallocate"
5551 #: ../src/guestfs-actions.pod:1131
5554 " int guestfs_fallocate (guestfs_h *g,\n"
5555 "\t\tconst char *path,\n"
5561 #: ../src/guestfs-actions.pod:1135 ../src/guestfs-actions.pod:1158 ../fish/guestfish-actions.pod:896 ../fish/guestfish-actions.pod:915
5563 "This command preallocates a file (containing zero bytes) named C<path> of "
5564 "size C<len> bytes. If the file exists already, it is overwritten."
5568 #: ../src/guestfs-actions.pod:1139 ../fish/guestfish-actions.pod:900
5570 "Do not confuse this with the guestfish-specific C<alloc> command which "
5571 "allocates a file in the host and attaches it as a device."
5575 #: ../src/guestfs-actions.pod:1145 ../fish/guestfish-actions.pod:904
5577 "This function is deprecated. In new code, use the C<fallocate64> call "
5582 #: ../src/guestfs-actions.pod:1148 ../src/guestfs-actions.pod:1583 ../src/guestfs-actions.pod:1601 ../src/guestfs-actions.pod:5499 ../src/guestfs-actions.pod:5644 ../fish/guestfish-actions.pod:907 ../fish/guestfish-actions.pod:1264 ../fish/guestfish-actions.pod:1278 ../fish/guestfish-actions.pod:4256 ../fish/guestfish-actions.pod:4353
5584 "Deprecated functions will not be removed from the API, but the fact that "
5585 "they are deprecated indicates that there are problems with correct use of "
5590 #: ../src/guestfs-actions.pod:1152
5591 msgid "guestfs_fallocate64"
5595 #: ../src/guestfs-actions.pod:1154
5598 " int guestfs_fallocate64 (guestfs_h *g,\n"
5599 "\t\tconst char *path,\n"
5600 "\t\tint64_t len);\n"
5605 #: ../src/guestfs-actions.pod:1162
5607 "Note that this call allocates disk blocks for the file. To create a sparse "
5608 "file use C<guestfs_truncate_size> instead."
5612 #: ../src/guestfs-actions.pod:1165
5614 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
5615 "oversight it only allowed 30 bit lengths to be specified, effectively "
5616 "limiting the maximum size of files created through that call to 1GB."
5620 #: ../src/guestfs-actions.pod:1170 ../fish/guestfish-actions.pod:927
5622 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
5623 "commands which create a file in the host and attach it as a device."
5627 #: ../src/guestfs-actions.pod:1176
5628 msgid "guestfs_fgrep"
5632 #: ../src/guestfs-actions.pod:1178
5635 " char **guestfs_fgrep (guestfs_h *g,\n"
5636 "\t\tconst char *pattern,\n"
5637 "\t\tconst char *path);\n"
5642 #: ../src/guestfs-actions.pod:1182 ../fish/guestfish-actions.pod:935
5643 msgid "This calls the external C<fgrep> program and returns the matching lines."
5647 #: ../src/guestfs-actions.pod:1192
5648 msgid "guestfs_fgrepi"
5652 #: ../src/guestfs-actions.pod:1194
5655 " char **guestfs_fgrepi (guestfs_h *g,\n"
5656 "\t\tconst char *pattern,\n"
5657 "\t\tconst char *path);\n"
5662 #: ../src/guestfs-actions.pod:1198 ../fish/guestfish-actions.pod:945
5663 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
5667 #: ../src/guestfs-actions.pod:1208
5668 msgid "guestfs_file"
5672 #: ../src/guestfs-actions.pod:1210
5675 " char *guestfs_file (guestfs_h *g,\n"
5676 "\t\tconst char *path);\n"
5681 #: ../src/guestfs-actions.pod:1213 ../fish/guestfish-actions.pod:955
5683 "This call uses the standard L<file(1)> command to determine the type or "
5684 "contents of the file."
5688 #: ../src/guestfs-actions.pod:1216 ../fish/guestfish-actions.pod:958
5690 "This call will also transparently look inside various types of compressed "
5695 #: ../src/guestfs-actions.pod:1219 ../fish/guestfish-actions.pod:961
5697 "The exact command which runs is C<file -zb path>. Note in particular that "
5698 "the filename is not prepended to the output (the C<-b> option)."
5702 #: ../src/guestfs-actions.pod:1223
5704 "This command can also be used on C</dev/> devices (and partitions, LV "
5705 "names). You can for example use this to determine if a device contains a "
5706 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
5710 #: ../src/guestfs-actions.pod:1228 ../fish/guestfish-actions.pod:970
5712 "If the C<path> does not begin with C</dev/> then this command only works for "
5713 "the content of regular files. For other file types (directory, symbolic "
5714 "link etc) it will just return the string C<directory> etc."
5718 #: ../src/guestfs-actions.pod:1236
5719 msgid "guestfs_file_architecture"
5723 #: ../src/guestfs-actions.pod:1238
5726 " char *guestfs_file_architecture (guestfs_h *g,\n"
5727 "\t\tconst char *filename);\n"
5732 #: ../src/guestfs-actions.pod:1241 ../fish/guestfish-actions.pod:979
5734 "This detects the architecture of the binary C<filename>, and returns it if "
5739 #: ../src/guestfs-actions.pod:1244 ../fish/guestfish-actions.pod:982
5740 msgid "Currently defined architectures are:"
5744 #: ../src/guestfs-actions.pod:1248 ../fish/guestfish-actions.pod:986
5749 #: ../src/guestfs-actions.pod:1250 ../fish/guestfish-actions.pod:988
5751 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
5752 "irrespective of the precise processor requirements of the binary."
5756 #: ../src/guestfs-actions.pod:1253 ../fish/guestfish-actions.pod:991
5761 #: ../src/guestfs-actions.pod:1255 ../fish/guestfish-actions.pod:993
5762 msgid "64 bit x86-64."
5766 #: ../src/guestfs-actions.pod:1257 ../fish/guestfish-actions.pod:995
5771 #: ../src/guestfs-actions.pod:1259 ../fish/guestfish-actions.pod:997
5772 msgid "32 bit SPARC."
5776 #: ../src/guestfs-actions.pod:1261 ../fish/guestfish-actions.pod:999
5781 #: ../src/guestfs-actions.pod:1263 ../fish/guestfish-actions.pod:1001
5782 msgid "64 bit SPARC V9 and above."
5786 #: ../src/guestfs-actions.pod:1265 ../fish/guestfish-actions.pod:1003
5791 #: ../src/guestfs-actions.pod:1267 ../fish/guestfish-actions.pod:1005
5792 msgid "Intel Itanium."
5796 #: ../src/guestfs-actions.pod:1269 ../fish/guestfish-actions.pod:1007
5801 #: ../src/guestfs-actions.pod:1271 ../fish/guestfish-actions.pod:1009
5802 msgid "32 bit Power PC."
5806 #: ../src/guestfs-actions.pod:1273 ../fish/guestfish-actions.pod:1011
5811 #: ../src/guestfs-actions.pod:1275 ../fish/guestfish-actions.pod:1013
5812 msgid "64 bit Power PC."
5816 #: ../src/guestfs-actions.pod:1279 ../fish/guestfish-actions.pod:1017
5817 msgid "Libguestfs may return other architecture strings in future."
5821 #: ../src/guestfs-actions.pod:1281 ../fish/guestfish-actions.pod:1019
5822 msgid "The function works on at least the following types of files:"
5826 #: ../src/guestfs-actions.pod:1287 ../fish/guestfish-actions.pod:1025
5827 msgid "many types of Un*x and Linux binary"
5831 #: ../src/guestfs-actions.pod:1291 ../fish/guestfish-actions.pod:1029
5832 msgid "many types of Un*x and Linux shared library"
5836 #: ../src/guestfs-actions.pod:1295 ../fish/guestfish-actions.pod:1033
5837 msgid "Windows Win32 and Win64 binaries"
5841 #: ../src/guestfs-actions.pod:1299 ../fish/guestfish-actions.pod:1037
5842 msgid "Windows Win32 and Win64 DLLs"
5846 #: ../src/guestfs-actions.pod:1301 ../fish/guestfish-actions.pod:1039
5847 msgid "Win32 binaries and DLLs return C<i386>."
5851 #: ../src/guestfs-actions.pod:1303 ../fish/guestfish-actions.pod:1041
5852 msgid "Win64 binaries and DLLs return C<x86_64>."
5856 #: ../src/guestfs-actions.pod:1307 ../fish/guestfish-actions.pod:1045
5857 msgid "Linux kernel modules"
5861 #: ../src/guestfs-actions.pod:1311 ../fish/guestfish-actions.pod:1049
5862 msgid "Linux new-style initrd images"
5866 #: ../src/guestfs-actions.pod:1315 ../fish/guestfish-actions.pod:1053
5867 msgid "some non-x86 Linux vmlinuz kernels"
5871 #: ../src/guestfs-actions.pod:1319 ../fish/guestfish-actions.pod:1057
5872 msgid "What it can't do currently:"
5876 #: ../src/guestfs-actions.pod:1325 ../fish/guestfish-actions.pod:1063
5877 msgid "static libraries (libfoo.a)"
5881 #: ../src/guestfs-actions.pod:1329 ../fish/guestfish-actions.pod:1067
5882 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
5886 #: ../src/guestfs-actions.pod:1333 ../fish/guestfish-actions.pod:1071
5887 msgid "x86 Linux vmlinuz kernels"
5891 #: ../src/guestfs-actions.pod:1335 ../fish/guestfish-actions.pod:1073
5893 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
5894 "compressed code, and are horribly hard to unpack. If you want to find the "
5895 "architecture of a kernel, use the architecture of the associated initrd or "
5896 "kernel module(s) instead."
5900 #: ../src/guestfs-actions.pod:1345
5901 msgid "guestfs_filesize"
5905 #: ../src/guestfs-actions.pod:1347
5908 " int64_t guestfs_filesize (guestfs_h *g,\n"
5909 "\t\tconst char *file);\n"
5914 #: ../src/guestfs-actions.pod:1350 ../fish/guestfish-actions.pod:1084
5915 msgid "This command returns the size of C<file> in bytes."
5919 #: ../src/guestfs-actions.pod:1352
5921 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
5922 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
5923 "devices, use C<guestfs_blockdev_getsize64>."
5927 #: ../src/guestfs-actions.pod:1358
5928 msgid "guestfs_fill"
5932 #: ../src/guestfs-actions.pod:1360
5935 " int guestfs_fill (guestfs_h *g,\n"
5938 "\t\tconst char *path);\n"
5943 #: ../src/guestfs-actions.pod:1365 ../fish/guestfish-actions.pod:1094
5945 "This command creates a new file called C<path>. The initial content of the "
5946 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
5951 #: ../src/guestfs-actions.pod:1369
5953 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
5954 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
5955 "bytes use C<guestfs_fill_pattern>."
5959 #: ../src/guestfs-actions.pod:1381
5960 msgid "guestfs_fill_pattern"
5964 #: ../src/guestfs-actions.pod:1383
5967 " int guestfs_fill_pattern (guestfs_h *g,\n"
5968 "\t\tconst char *pattern,\n"
5970 "\t\tconst char *path);\n"
5975 #: ../src/guestfs-actions.pod:1388
5977 "This function is like C<guestfs_fill> except that it creates a new file of "
5978 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
5979 "pattern is truncated if necessary to ensure the length of the file is "
5980 "exactly C<len> bytes."
5984 #: ../src/guestfs-actions.pod:1400
5985 msgid "guestfs_find"
5989 #: ../src/guestfs-actions.pod:1402
5992 " char **guestfs_find (guestfs_h *g,\n"
5993 "\t\tconst char *directory);\n"
5998 #: ../src/guestfs-actions.pod:1405 ../fish/guestfish-actions.pod:1116
6000 "This command lists out all files and directories, recursively, starting at "
6001 "C<directory>. It is essentially equivalent to running the shell command "
6002 "C<find directory -print> but some post-processing happens on the output, "
6007 #: ../src/guestfs-actions.pod:1410 ../fish/guestfish-actions.pod:1121
6009 "This returns a list of strings I<without any prefix>. Thus if the directory "
6014 #: ../src/guestfs-actions.pod:1413 ../fish/guestfish-actions.pod:1124
6024 #: ../src/guestfs-actions.pod:1417
6025 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
6029 #: ../src/guestfs-actions.pod:1420 ../fish/guestfish-actions.pod:1131
6040 #: ../src/guestfs-actions.pod:1425 ../fish/guestfish-actions.pod:1136
6041 msgid "If C<directory> is not a directory, then this command returns an error."
6045 #: ../src/guestfs-actions.pod:1428 ../fish/guestfish-actions.pod:1139
6046 msgid "The returned list is sorted."
6050 #: ../src/guestfs-actions.pod:1430
6051 msgid "See also C<guestfs_find0>."
6055 #: ../src/guestfs-actions.pod:1439
6056 msgid "guestfs_find0"
6060 #: ../src/guestfs-actions.pod:1441
6063 " int guestfs_find0 (guestfs_h *g,\n"
6064 "\t\tconst char *directory,\n"
6065 "\t\tconst char *files);\n"
6070 #: ../src/guestfs-actions.pod:1445 ../fish/guestfish-actions.pod:1150
6072 "This command lists out all files and directories, recursively, starting at "
6073 "C<directory>, placing the resulting list in the external file called "
6078 #: ../src/guestfs-actions.pod:1449
6080 "This command works the same way as C<guestfs_find> with the following "
6085 #: ../src/guestfs-actions.pod:1456 ../fish/guestfish-actions.pod:1161
6086 msgid "The resulting list is written to an external file."
6090 #: ../src/guestfs-actions.pod:1460 ../fish/guestfish-actions.pod:1165
6092 "Items (filenames) in the result are separated by C<\\0> characters. See "
6093 "L<find(1)> option I<-print0>."
6097 #: ../src/guestfs-actions.pod:1465 ../fish/guestfish-actions.pod:1170
6098 msgid "This command is not limited in the number of names that it can return."
6102 #: ../src/guestfs-actions.pod:1470 ../fish/guestfish-actions.pod:1175
6103 msgid "The result list is not sorted."
6107 #: ../src/guestfs-actions.pod:1476
6108 msgid "guestfs_findfs_label"
6112 #: ../src/guestfs-actions.pod:1478
6115 " char *guestfs_findfs_label (guestfs_h *g,\n"
6116 "\t\tconst char *label);\n"
6121 #: ../src/guestfs-actions.pod:1481 ../fish/guestfish-actions.pod:1185
6123 "This command searches the filesystems and returns the one which has the "
6124 "given label. An error is returned if no such filesystem can be found."
6128 #: ../src/guestfs-actions.pod:1485
6129 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
6133 #: ../src/guestfs-actions.pod:1490
6134 msgid "guestfs_findfs_uuid"
6138 #: ../src/guestfs-actions.pod:1492
6141 " char *guestfs_findfs_uuid (guestfs_h *g,\n"
6142 "\t\tconst char *uuid);\n"
6147 #: ../src/guestfs-actions.pod:1495 ../fish/guestfish-actions.pod:1195
6149 "This command searches the filesystems and returns the one which has the "
6150 "given UUID. An error is returned if no such filesystem can be found."
6154 #: ../src/guestfs-actions.pod:1499
6155 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
6159 #: ../src/guestfs-actions.pod:1504
6160 msgid "guestfs_fsck"
6164 #: ../src/guestfs-actions.pod:1506
6167 " int guestfs_fsck (guestfs_h *g,\n"
6168 "\t\tconst char *fstype,\n"
6169 "\t\tconst char *device);\n"
6174 #: ../src/guestfs-actions.pod:1510 ../fish/guestfish-actions.pod:1205
6176 "This runs the filesystem checker (fsck) on C<device> which should have "
6177 "filesystem type C<fstype>."
6181 #: ../src/guestfs-actions.pod:1513 ../fish/guestfish-actions.pod:1208
6183 "The returned integer is the status. See L<fsck(8)> for the list of status "
6184 "codes from C<fsck>."
6188 #: ../src/guestfs-actions.pod:1522 ../fish/guestfish-actions.pod:1217
6189 msgid "Multiple status codes can be summed together."
6193 #: ../src/guestfs-actions.pod:1526 ../fish/guestfish-actions.pod:1221
6195 "A non-zero return code can mean \"success\", for example if errors have been "
6196 "corrected on the filesystem."
6200 #: ../src/guestfs-actions.pod:1531 ../fish/guestfish-actions.pod:1226
6201 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
6205 #: ../src/guestfs-actions.pod:1536 ../fish/guestfish-actions.pod:1231
6206 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
6210 #: ../src/guestfs-actions.pod:1540
6211 msgid "guestfs_get_append"
6215 #: ../src/guestfs-actions.pod:1542
6218 " const char *guestfs_get_append (guestfs_h *g);\n"
6223 #: ../src/guestfs-actions.pod:1544 ../fish/guestfish-actions.pod:1237
6225 "Return the additional kernel options which are added to the guest kernel "
6230 #: ../src/guestfs-actions.pod:1547 ../fish/guestfish-actions.pod:1240
6231 msgid "If C<NULL> then no options are added."
6235 #: ../src/guestfs-actions.pod:1549
6237 "This function returns a string which may be NULL. There is no way to return "
6238 "an error from this function. The string is owned by the guest handle and "
6239 "must I<not> be freed."
6243 #: ../src/guestfs-actions.pod:1553
6244 msgid "guestfs_get_autosync"
6248 #: ../src/guestfs-actions.pod:1555
6251 " int guestfs_get_autosync (guestfs_h *g);\n"
6256 #: ../src/guestfs-actions.pod:1557 ../fish/guestfish-actions.pod:1246
6257 msgid "Get the autosync flag."
6261 #: ../src/guestfs-actions.pod:1561
6262 msgid "guestfs_get_direct"
6266 #: ../src/guestfs-actions.pod:1563
6269 " int guestfs_get_direct (guestfs_h *g);\n"
6274 #: ../src/guestfs-actions.pod:1565 ../fish/guestfish-actions.pod:1252
6275 msgid "Return the direct appliance mode flag."
6279 #: ../src/guestfs-actions.pod:1569
6280 msgid "guestfs_get_e2label"
6284 #: ../src/guestfs-actions.pod:1571
6287 " char *guestfs_get_e2label (guestfs_h *g,\n"
6288 "\t\tconst char *device);\n"
6293 #: ../src/guestfs-actions.pod:1574 ../fish/guestfish-actions.pod:1258
6294 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
6298 #: ../src/guestfs-actions.pod:1580 ../fish/guestfish-actions.pod:1261
6300 "This function is deprecated. In new code, use the C<vfs_label> call "
6305 #: ../src/guestfs-actions.pod:1587
6306 msgid "guestfs_get_e2uuid"
6310 #: ../src/guestfs-actions.pod:1589
6313 " char *guestfs_get_e2uuid (guestfs_h *g,\n"
6314 "\t\tconst char *device);\n"
6319 #: ../src/guestfs-actions.pod:1592 ../fish/guestfish-actions.pod:1272
6320 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
6324 #: ../src/guestfs-actions.pod:1598 ../fish/guestfish-actions.pod:1275
6325 msgid "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
6329 #: ../src/guestfs-actions.pod:1605
6330 msgid "guestfs_get_memsize"
6334 #: ../src/guestfs-actions.pod:1607
6337 " int guestfs_get_memsize (guestfs_h *g);\n"
6342 #: ../src/guestfs-actions.pod:1609 ../fish/guestfish-actions.pod:1286
6343 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
6347 #: ../src/guestfs-actions.pod:1612
6349 "If C<guestfs_set_memsize> was not called on this handle, and if "
6350 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
6351 "value for memsize."
6355 #: ../src/guestfs-actions.pod:1616 ../src/guestfs-actions.pod:1679 ../src/guestfs-actions.pod:4371 ../src/guestfs-actions.pod:4463 ../fish/guestfish-actions.pod:1293 ../fish/guestfish-actions.pod:1344 ../fish/guestfish-actions.pod:3387 ../fish/guestfish-actions.pod:3474
6356 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
6360 #: ../src/guestfs-actions.pod:1621
6361 msgid "guestfs_get_network"
6365 #: ../src/guestfs-actions.pod:1623
6368 " int guestfs_get_network (guestfs_h *g);\n"
6373 #: ../src/guestfs-actions.pod:1625 ../fish/guestfish-actions.pod:1300
6374 msgid "This returns the enable network flag."
6378 #: ../src/guestfs-actions.pod:1629
6379 msgid "guestfs_get_path"
6383 #: ../src/guestfs-actions.pod:1631
6386 " const char *guestfs_get_path (guestfs_h *g);\n"
6391 #: ../src/guestfs-actions.pod:1633 ../fish/guestfish-actions.pod:1306
6392 msgid "Return the current search path."
6396 #: ../src/guestfs-actions.pod:1635 ../fish/guestfish-actions.pod:1308
6398 "This is always non-NULL. If it wasn't set already, then this will return "
6403 #: ../src/guestfs-actions.pod:1638 ../src/guestfs-actions.pod:1661
6405 "This function returns a string, or NULL on error. The string is owned by "
6406 "the guest handle and must I<not> be freed."
6410 #: ../src/guestfs-actions.pod:1641
6411 msgid "guestfs_get_pid"
6415 #: ../src/guestfs-actions.pod:1643
6418 " int guestfs_get_pid (guestfs_h *g);\n"
6423 #: ../src/guestfs-actions.pod:1645 ../fish/guestfish-actions.pod:1317
6425 "Return the process ID of the qemu subprocess. If there is no qemu "
6426 "subprocess, then this will return an error."
6430 #: ../src/guestfs-actions.pod:1648 ../fish/guestfish-actions.pod:1320
6431 msgid "This is an internal call used for debugging and testing."
6435 #: ../src/guestfs-actions.pod:1652
6436 msgid "guestfs_get_qemu"
6440 #: ../src/guestfs-actions.pod:1654
6443 " const char *guestfs_get_qemu (guestfs_h *g);\n"
6448 #: ../src/guestfs-actions.pod:1656 ../fish/guestfish-actions.pod:1326
6449 msgid "Return the current qemu binary."
6453 #: ../src/guestfs-actions.pod:1658 ../fish/guestfish-actions.pod:1328
6455 "This is always non-NULL. If it wasn't set already, then this will return "
6456 "the default qemu binary name."
6460 #: ../src/guestfs-actions.pod:1664
6461 msgid "guestfs_get_recovery_proc"
6465 #: ../src/guestfs-actions.pod:1666
6468 " int guestfs_get_recovery_proc (guestfs_h *g);\n"
6473 #: ../src/guestfs-actions.pod:1668 ../fish/guestfish-actions.pod:1335
6474 msgid "Return the recovery process enabled flag."
6478 #: ../src/guestfs-actions.pod:1672
6479 msgid "guestfs_get_selinux"
6483 #: ../src/guestfs-actions.pod:1674
6486 " int guestfs_get_selinux (guestfs_h *g);\n"
6491 #: ../src/guestfs-actions.pod:1676
6493 "This returns the current setting of the selinux flag which is passed to the "
6494 "appliance at boot time. See C<guestfs_set_selinux>."
6498 #: ../src/guestfs-actions.pod:1684
6499 msgid "guestfs_get_state"
6503 #: ../src/guestfs-actions.pod:1686
6506 " int guestfs_get_state (guestfs_h *g);\n"
6511 #: ../src/guestfs-actions.pod:1688 ../fish/guestfish-actions.pod:1351
6513 "This returns the current state as an opaque integer. This is only useful "
6514 "for printing debug and internal error messages."
6518 #: ../src/guestfs-actions.pod:1691 ../src/guestfs-actions.pod:2312 ../src/guestfs-actions.pod:2335 ../src/guestfs-actions.pod:2384 ../src/guestfs-actions.pod:2405 ../fish/guestfish-actions.pod:1354 ../fish/guestfish-actions.pod:1848 ../fish/guestfish-actions.pod:1866 ../fish/guestfish-actions.pod:1904 ../fish/guestfish-actions.pod:1920
6519 msgid "For more information on states, see L<guestfs(3)>."
6523 #: ../src/guestfs-actions.pod:1695
6524 msgid "guestfs_get_trace"
6528 #: ../src/guestfs-actions.pod:1697
6531 " int guestfs_get_trace (guestfs_h *g);\n"
6536 #: ../src/guestfs-actions.pod:1699 ../fish/guestfish-actions.pod:1360
6537 msgid "Return the command trace flag."
6541 #: ../src/guestfs-actions.pod:1703
6542 msgid "guestfs_get_umask"
6546 #: ../src/guestfs-actions.pod:1705
6549 " int guestfs_get_umask (guestfs_h *g);\n"
6554 #: ../src/guestfs-actions.pod:1707
6556 "Return the current umask. By default the umask is C<022> unless it has been "
6557 "set by calling C<guestfs_umask>."
6561 #: ../src/guestfs-actions.pod:1712
6562 msgid "guestfs_get_verbose"
6566 #: ../src/guestfs-actions.pod:1714
6569 " int guestfs_get_verbose (guestfs_h *g);\n"
6574 #: ../src/guestfs-actions.pod:1716 ../fish/guestfish-actions.pod:1373
6575 msgid "This returns the verbose messages flag."
6579 #: ../src/guestfs-actions.pod:1720
6580 msgid "guestfs_getcon"
6584 #: ../src/guestfs-actions.pod:1722
6587 " char *guestfs_getcon (guestfs_h *g);\n"
6592 #: ../src/guestfs-actions.pod:1724 ../fish/guestfish-actions.pod:1379
6593 msgid "This gets the SELinux security context of the daemon."
6597 #: ../src/guestfs-actions.pod:1726
6598 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
6602 #: ../src/guestfs-actions.pod:1732
6603 msgid "guestfs_getxattrs"
6607 #: ../src/guestfs-actions.pod:1734
6610 " struct guestfs_xattr_list *guestfs_getxattrs (guestfs_h *g,\n"
6611 "\t\tconst char *path);\n"
6616 #: ../src/guestfs-actions.pod:1737 ../fish/guestfish-actions.pod:1388
6617 msgid "This call lists the extended attributes of the file or directory C<path>."
6621 #: ../src/guestfs-actions.pod:1740 ../fish/guestfish-actions.pod:1391
6623 "At the system call level, this is a combination of the L<listxattr(2)> and "
6624 "L<getxattr(2)> calls."
6628 #: ../src/guestfs-actions.pod:1743
6629 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
6633 #: ../src/guestfs-actions.pod:1745 ../src/guestfs-actions.pod:2479 ../src/guestfs-actions.pod:3017
6635 "This function returns a C<struct guestfs_xattr_list *> (see "
6636 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
6637 "must call C<guestfs_free_xattr_list> after use>."
6641 #: ../src/guestfs-actions.pod:1750
6642 msgid "guestfs_glob_expand"
6646 #: ../src/guestfs-actions.pod:1752
6649 " char **guestfs_glob_expand (guestfs_h *g,\n"
6650 "\t\tconst char *pattern);\n"
6655 #: ../src/guestfs-actions.pod:1755 ../fish/guestfish-actions.pod:1400
6657 "This command searches for all the pathnames matching C<pattern> according to "
6658 "the wildcard expansion rules used by the shell."
6662 #: ../src/guestfs-actions.pod:1759 ../fish/guestfish-actions.pod:1404
6663 msgid "If no paths match, then this returns an empty list (note: not an error)."
6667 #: ../src/guestfs-actions.pod:1762 ../fish/guestfish-actions.pod:1407
6669 "It is just a wrapper around the C L<glob(3)> function with flags "
6670 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
6674 #: ../src/guestfs-actions.pod:1770
6675 msgid "guestfs_grep"
6679 #: ../src/guestfs-actions.pod:1772
6682 " char **guestfs_grep (guestfs_h *g,\n"
6683 "\t\tconst char *regex,\n"
6684 "\t\tconst char *path);\n"
6689 #: ../src/guestfs-actions.pod:1776 ../fish/guestfish-actions.pod:1415
6690 msgid "This calls the external C<grep> program and returns the matching lines."
6694 #: ../src/guestfs-actions.pod:1786
6695 msgid "guestfs_grepi"
6699 #: ../src/guestfs-actions.pod:1788
6702 " char **guestfs_grepi (guestfs_h *g,\n"
6703 "\t\tconst char *regex,\n"
6704 "\t\tconst char *path);\n"
6709 #: ../src/guestfs-actions.pod:1792 ../fish/guestfish-actions.pod:1425
6710 msgid "This calls the external C<grep -i> program and returns the matching lines."
6714 #: ../src/guestfs-actions.pod:1802
6715 msgid "guestfs_grub_install"
6719 #: ../src/guestfs-actions.pod:1804
6722 " int guestfs_grub_install (guestfs_h *g,\n"
6723 "\t\tconst char *root,\n"
6724 "\t\tconst char *device);\n"
6729 #: ../src/guestfs-actions.pod:1808 ../fish/guestfish-actions.pod:1435
6731 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
6732 "the root directory being C<root>."
6736 #: ../src/guestfs-actions.pod:1811 ../fish/guestfish-actions.pod:1438
6738 "Note: If grub-install reports the error \"No suitable drive was found in the "
6739 "generated device map.\" it may be that you need to create a "
6740 "C</boot/grub/device.map> file first that contains the mapping between grub "
6741 "device names and Linux device names. It is usually sufficient to create a "
6746 #: ../src/guestfs-actions.pod:1818 ../fish/guestfish-actions.pod:1445
6754 #: ../src/guestfs-actions.pod:1820 ../fish/guestfish-actions.pod:1447
6755 msgid "replacing C</dev/vda> with the name of the installation device."
6759 #: ../src/guestfs-actions.pod:1824
6760 msgid "guestfs_head"
6764 #: ../src/guestfs-actions.pod:1826
6767 " char **guestfs_head (guestfs_h *g,\n"
6768 "\t\tconst char *path);\n"
6773 #: ../src/guestfs-actions.pod:1829 ../fish/guestfish-actions.pod:1453
6775 "This command returns up to the first 10 lines of a file as a list of "
6780 #: ../src/guestfs-actions.pod:1839
6781 msgid "guestfs_head_n"
6785 #: ../src/guestfs-actions.pod:1841
6788 " char **guestfs_head_n (guestfs_h *g,\n"
6789 "\t\tint nrlines,\n"
6790 "\t\tconst char *path);\n"
6795 #: ../src/guestfs-actions.pod:1845 ../fish/guestfish-actions.pod:1463
6797 "If the parameter C<nrlines> is a positive number, this returns the first "
6798 "C<nrlines> lines of the file C<path>."
6802 #: ../src/guestfs-actions.pod:1848 ../fish/guestfish-actions.pod:1466
6804 "If the parameter C<nrlines> is a negative number, this returns lines from "
6805 "the file C<path>, excluding the last C<nrlines> lines."
6809 #: ../src/guestfs-actions.pod:1851 ../src/guestfs-actions.pod:4919 ../fish/guestfish-actions.pod:1469 ../fish/guestfish-actions.pod:3820
6810 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
6814 #: ../src/guestfs-actions.pod:1860
6815 msgid "guestfs_hexdump"
6819 #: ../src/guestfs-actions.pod:1862
6822 " char *guestfs_hexdump (guestfs_h *g,\n"
6823 "\t\tconst char *path);\n"
6828 #: ../src/guestfs-actions.pod:1865 ../fish/guestfish-actions.pod:1478
6830 "This runs C<hexdump -C> on the given C<path>. The result is the "
6831 "human-readable, canonical hex dump of the file."
6835 #: ../src/guestfs-actions.pod:1874
6836 msgid "guestfs_initrd_cat"
6840 #: ../src/guestfs-actions.pod:1876
6843 " char *guestfs_initrd_cat (guestfs_h *g,\n"
6844 "\t\tconst char *initrdpath,\n"
6845 "\t\tconst char *filename,\n"
6846 "\t\tsize_t *size_r);\n"
6851 #: ../src/guestfs-actions.pod:1881 ../fish/guestfish-actions.pod:1488
6853 "This command unpacks the file C<filename> from the initrd file called "
6854 "C<initrdpath>. The filename must be given I<without> the initial C</> "
6859 #: ../src/guestfs-actions.pod:1885 ../fish/guestfish-actions.pod:1492
6861 "For example, in guestfish you could use the following command to examine the "
6862 "boot script (usually called C</init>) contained in a Linux initrd or "
6867 #: ../src/guestfs-actions.pod:1889 ../fish/guestfish-actions.pod:1496
6870 " initrd-cat /boot/initrd-<version>.img init\n"
6875 #: ../src/guestfs-actions.pod:1891
6876 msgid "See also C<guestfs_initrd_list>."
6880 #: ../src/guestfs-actions.pod:1893 ../src/guestfs-actions.pod:3831 ../src/guestfs-actions.pod:3854 ../src/guestfs-actions.pod:4006
6882 "This function returns a buffer, or NULL on error. The size of the returned "
6883 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
6888 #: ../src/guestfs-actions.pod:1900
6889 msgid "guestfs_initrd_list"
6893 #: ../src/guestfs-actions.pod:1902
6896 " char **guestfs_initrd_list (guestfs_h *g,\n"
6897 "\t\tconst char *path);\n"
6902 #: ../src/guestfs-actions.pod:1905 ../fish/guestfish-actions.pod:1507
6903 msgid "This command lists out files contained in an initrd."
6907 #: ../src/guestfs-actions.pod:1907 ../fish/guestfish-actions.pod:1509
6909 "The files are listed without any initial C</> character. The files are "
6910 "listed in the order they appear (not necessarily alphabetical). Directory "
6911 "names are listed as separate items."
6915 #: ../src/guestfs-actions.pod:1911 ../fish/guestfish-actions.pod:1513
6917 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
6918 "initrd. We I<only> support the newer initramfs format (compressed cpio "
6923 #: ../src/guestfs-actions.pod:1919
6924 msgid "guestfs_inotify_add_watch"
6928 #: ../src/guestfs-actions.pod:1921
6931 " int64_t guestfs_inotify_add_watch (guestfs_h *g,\n"
6932 "\t\tconst char *path,\n"
6938 #: ../src/guestfs-actions.pod:1925 ../fish/guestfish-actions.pod:1521
6939 msgid "Watch C<path> for the events listed in C<mask>."
6943 #: ../src/guestfs-actions.pod:1927 ../fish/guestfish-actions.pod:1523
6945 "Note that if C<path> is a directory then events within that directory are "
6946 "watched, but this does I<not> happen recursively (in subdirectories)."
6950 #: ../src/guestfs-actions.pod:1931 ../fish/guestfish-actions.pod:1527
6952 "Note for non-C or non-Linux callers: the inotify events are defined by the "
6953 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
6957 #: ../src/guestfs-actions.pod:1937
6958 msgid "guestfs_inotify_close"
6962 #: ../src/guestfs-actions.pod:1939
6965 " int guestfs_inotify_close (guestfs_h *g);\n"
6970 #: ../src/guestfs-actions.pod:1941 ../fish/guestfish-actions.pod:1535
6972 "This closes the inotify handle which was previously opened by inotify_init. "
6973 "It removes all watches, throws away any pending events, and deallocates all "
6978 #: ../src/guestfs-actions.pod:1947
6979 msgid "guestfs_inotify_files"
6983 #: ../src/guestfs-actions.pod:1949
6986 " char **guestfs_inotify_files (guestfs_h *g);\n"
6991 #: ../src/guestfs-actions.pod:1951
6993 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
6994 "returns a list of pathnames of objects that were touched. The returned "
6995 "pathnames are sorted and deduplicated."
6999 #: ../src/guestfs-actions.pod:1959
7000 msgid "guestfs_inotify_init"
7004 #: ../src/guestfs-actions.pod:1961
7007 " int guestfs_inotify_init (guestfs_h *g,\n"
7008 "\t\tint maxevents);\n"
7013 #: ../src/guestfs-actions.pod:1964 ../fish/guestfish-actions.pod:1551
7015 "This command creates a new inotify handle. The inotify subsystem can be "
7016 "used to notify events which happen to objects in the guest filesystem."
7020 #: ../src/guestfs-actions.pod:1968
7022 "C<maxevents> is the maximum number of events which will be queued up between "
7023 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
7024 "passed as C<0>, then the kernel (or previously set) default is used. For "
7025 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
7026 "throws away events, but records the fact that it threw them away by setting "
7027 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
7028 "C<guestfs_inotify_read>)."
7032 #: ../src/guestfs-actions.pod:1978
7034 "Before any events are generated, you have to add some watches to the "
7035 "internal watch list. See: C<guestfs_inotify_add_watch>, "
7036 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
7040 #: ../src/guestfs-actions.pod:1984
7042 "Queued up events should be read periodically by calling "
7043 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
7044 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
7045 "often enough then you risk the internal queue overflowing."
7049 #: ../src/guestfs-actions.pod:1991
7051 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
7052 "This also removes any watches automatically."
7056 #: ../src/guestfs-actions.pod:1995 ../fish/guestfish-actions.pod:1582
7058 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
7059 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
7060 "that there is one global inotify handle per libguestfs instance."
7064 #: ../src/guestfs-actions.pod:2002
7065 msgid "guestfs_inotify_read"
7069 #: ../src/guestfs-actions.pod:2004
7072 " struct guestfs_inotify_event_list *guestfs_inotify_read (guestfs_h *g);\n"
7077 #: ../src/guestfs-actions.pod:2006 ../fish/guestfish-actions.pod:1591
7079 "Return the complete queue of events that have happened since the previous "
7084 #: ../src/guestfs-actions.pod:2009 ../fish/guestfish-actions.pod:1594
7085 msgid "If no events have happened, this returns an empty list."
7089 #: ../src/guestfs-actions.pod:2011 ../fish/guestfish-actions.pod:1596
7091 "I<Note>: In order to make sure that all events have been read, you must call "
7092 "this function repeatedly until it returns an empty list. The reason is that "
7093 "the call will read events up to the maximum appliance-to-host message size "
7094 "and leave remaining events in the queue."
7098 #: ../src/guestfs-actions.pod:2017
7100 "This function returns a C<struct guestfs_inotify_event_list *> (see "
7101 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
7102 "must call C<guestfs_free_inotify_event_list> after use>."
7106 #: ../src/guestfs-actions.pod:2022
7107 msgid "guestfs_inotify_rm_watch"
7111 #: ../src/guestfs-actions.pod:2024
7114 " int guestfs_inotify_rm_watch (guestfs_h *g,\n"
7120 #: ../src/guestfs-actions.pod:2027
7122 "Remove a previously defined inotify watch. See "
7123 "C<guestfs_inotify_add_watch>."
7127 #: ../src/guestfs-actions.pod:2032
7128 msgid "guestfs_inspect_get_arch"
7132 #: ../src/guestfs-actions.pod:2034
7135 " char *guestfs_inspect_get_arch (guestfs_h *g,\n"
7136 "\t\tconst char *root);\n"
7141 #: ../src/guestfs-actions.pod:2037 ../src/guestfs-actions.pod:2057 ../src/guestfs-actions.pod:2107 ../src/guestfs-actions.pod:2130 ../src/guestfs-actions.pod:2154 ../src/guestfs-actions.pod:2172 ../src/guestfs-actions.pod:2202 ../src/guestfs-actions.pod:2223
7143 "This function should only be called with a root device string as returned by "
7144 "C<guestfs_inspect_os>."
7148 #: ../src/guestfs-actions.pod:2040
7150 "This returns the architecture of the inspected operating system. The "
7151 "possible return values are listed under C<guestfs_file_architecture>."
7155 #: ../src/guestfs-actions.pod:2044 ../fish/guestfish-actions.pod:1620
7157 "If the architecture could not be determined, then the string C<unknown> is "
7162 #: ../src/guestfs-actions.pod:2047 ../src/guestfs-actions.pod:2097 ../src/guestfs-actions.pod:2145 ../src/guestfs-actions.pod:2213 ../src/guestfs-actions.pod:2248 ../src/guestfs-actions.pod:2285 ../fish/guestfish-actions.pod:1623 ../fish/guestfish-actions.pod:1669 ../fish/guestfish-actions.pod:1708 ../fish/guestfish-actions.pod:1763 ../fish/guestfish-actions.pod:1794 ../fish/guestfish-actions.pod:1828
7163 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
7167 #: ../src/guestfs-actions.pod:2052
7168 msgid "guestfs_inspect_get_distro"
7172 #: ../src/guestfs-actions.pod:2054
7175 " char *guestfs_inspect_get_distro (guestfs_h *g,\n"
7176 "\t\tconst char *root);\n"
7181 #: ../src/guestfs-actions.pod:2060 ../fish/guestfish-actions.pod:1632
7182 msgid "This returns the distro (distribution) of the inspected operating system."
7186 #: ../src/guestfs-actions.pod:2063 ../fish/guestfish-actions.pod:1635
7187 msgid "Currently defined distros are:"
7191 #: ../src/guestfs-actions.pod:2067 ../fish/guestfish-actions.pod:1639
7196 #: ../src/guestfs-actions.pod:2069 ../fish/guestfish-actions.pod:1641
7197 msgid "Debian or a Debian-derived distro such as Ubuntu."
7201 #: ../src/guestfs-actions.pod:2071 ../fish/guestfish-actions.pod:1643
7206 #: ../src/guestfs-actions.pod:2073 ../fish/guestfish-actions.pod:1645
7211 #: ../src/guestfs-actions.pod:2075 ../fish/guestfish-actions.pod:1647
7212 msgid "\"redhat-based\""
7216 #: ../src/guestfs-actions.pod:2077 ../fish/guestfish-actions.pod:1649
7217 msgid "Some Red Hat-derived distro."
7221 #: ../src/guestfs-actions.pod:2079 ../fish/guestfish-actions.pod:1651
7226 #: ../src/guestfs-actions.pod:2081 ../fish/guestfish-actions.pod:1653
7227 msgid "Red Hat Enterprise Linux and some derivatives."
7231 #: ../src/guestfs-actions.pod:2083 ../src/guestfs-actions.pod:2235 ../fish/guestfish-actions.pod:1655 ../fish/guestfish-actions.pod:1781
7236 #: ../src/guestfs-actions.pod:2085 ../fish/guestfish-actions.pod:1657
7238 "Windows does not have distributions. This string is returned if the OS type "
7243 #: ../src/guestfs-actions.pod:2088 ../src/guestfs-actions.pod:2239 ../fish/guestfish-actions.pod:1660 ../fish/guestfish-actions.pod:1785
7248 #: ../src/guestfs-actions.pod:2090 ../fish/guestfish-actions.pod:1662
7249 msgid "The distro could not be determined."
7253 #: ../src/guestfs-actions.pod:2094 ../src/guestfs-actions.pod:2245 ../fish/guestfish-actions.pod:1666 ../fish/guestfish-actions.pod:1791
7255 "Future versions of libguestfs may return other strings here. The caller "
7256 "should be prepared to handle any string."
7260 #: ../src/guestfs-actions.pod:2102
7261 msgid "guestfs_inspect_get_filesystems"
7265 #: ../src/guestfs-actions.pod:2104
7268 " char **guestfs_inspect_get_filesystems (guestfs_h *g,\n"
7269 "\t\tconst char *root);\n"
7274 #: ../src/guestfs-actions.pod:2110 ../fish/guestfish-actions.pod:1678
7276 "This returns a list of all the filesystems that we think are associated with "
7277 "this operating system. This includes the root filesystem, other ordinary "
7278 "filesystems, and non-mounted devices like swap partitions."
7282 #: ../src/guestfs-actions.pod:2115 ../fish/guestfish-actions.pod:1683
7284 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
7285 "to be shared between operating systems."
7289 #: ../src/guestfs-actions.pod:2118
7291 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7292 "C<guestfs_inspect_get_mountpoints>."
7296 #: ../src/guestfs-actions.pod:2125
7297 msgid "guestfs_inspect_get_major_version"
7301 #: ../src/guestfs-actions.pod:2127
7304 " int guestfs_inspect_get_major_version (guestfs_h *g,\n"
7305 "\t\tconst char *root);\n"
7310 #: ../src/guestfs-actions.pod:2133 ../fish/guestfish-actions.pod:1696
7311 msgid "This returns the major version number of the inspected operating system."
7315 #: ../src/guestfs-actions.pod:2136 ../fish/guestfish-actions.pod:1699
7317 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
7318 "popular public names used by the operating system. Notably the operating "
7319 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
7320 "1). You can find out the real versions corresponding to releases of Windows "
7321 "by consulting Wikipedia or MSDN."
7325 #: ../src/guestfs-actions.pod:2143 ../src/guestfs-actions.pod:2160 ../fish/guestfish-actions.pod:1706 ../fish/guestfish-actions.pod:1720
7326 msgid "If the version could not be determined, then C<0> is returned."
7330 #: ../src/guestfs-actions.pod:2149
7331 msgid "guestfs_inspect_get_minor_version"
7335 #: ../src/guestfs-actions.pod:2151
7338 " int guestfs_inspect_get_minor_version (guestfs_h *g,\n"
7339 "\t\tconst char *root);\n"
7344 #: ../src/guestfs-actions.pod:2157 ../fish/guestfish-actions.pod:1717
7345 msgid "This returns the minor version number of the inspected operating system."
7349 #: ../src/guestfs-actions.pod:2162
7351 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7352 "C<guestfs_inspect_get_major_version>."
7356 #: ../src/guestfs-actions.pod:2167
7357 msgid "guestfs_inspect_get_mountpoints"
7361 #: ../src/guestfs-actions.pod:2169
7364 " char **guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
7365 "\t\tconst char *root);\n"
7370 #: ../src/guestfs-actions.pod:2175 ../fish/guestfish-actions.pod:1732
7372 "This returns a hash of where we think the filesystems associated with this "
7373 "operating system should be mounted. Callers should note that this is at "
7374 "best an educated guess made by reading configuration files such as "
7379 #: ../src/guestfs-actions.pod:2180 ../fish/guestfish-actions.pod:1737
7381 "Each element in the returned hashtable has a key which is the path of the "
7382 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
7383 "mounted there (eg. C</dev/sda1>)."
7387 #: ../src/guestfs-actions.pod:2185 ../fish/guestfish-actions.pod:1742
7388 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
7392 #: ../src/guestfs-actions.pod:2188
7394 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7395 "C<guestfs_inspect_get_filesystems>."
7399 #: ../src/guestfs-actions.pod:2191 ../src/guestfs-actions.pod:2531 ../src/guestfs-actions.pod:3453 ../src/guestfs-actions.pod:5036
7401 "This function returns a NULL-terminated array of strings, or NULL if there "
7402 "was an error. The array of strings will always have length C<2n+1>, where "
7403 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
7404 "caller must free the strings and the array after use>."
7408 #: ../src/guestfs-actions.pod:2197
7409 msgid "guestfs_inspect_get_product_name"
7413 #: ../src/guestfs-actions.pod:2199
7416 " char *guestfs_inspect_get_product_name (guestfs_h *g,\n"
7417 "\t\tconst char *root);\n"
7422 #: ../src/guestfs-actions.pod:2205 ../fish/guestfish-actions.pod:1755
7424 "This returns the product name of the inspected operating system. The "
7425 "product name is generally some freeform string which can be displayed to the "
7426 "user, but should not be parsed by programs."
7430 #: ../src/guestfs-actions.pod:2210 ../fish/guestfish-actions.pod:1760
7432 "If the product name could not be determined, then the string C<unknown> is "
7437 #: ../src/guestfs-actions.pod:2218
7438 msgid "guestfs_inspect_get_type"
7442 #: ../src/guestfs-actions.pod:2220
7445 " char *guestfs_inspect_get_type (guestfs_h *g,\n"
7446 "\t\tconst char *root);\n"
7451 #: ../src/guestfs-actions.pod:2226 ../fish/guestfish-actions.pod:1772
7453 "This returns the type of the inspected operating system. Currently defined "
7458 #: ../src/guestfs-actions.pod:2231 ../fish/guestfish-actions.pod:1777
7463 #: ../src/guestfs-actions.pod:2233 ../fish/guestfish-actions.pod:1779
7464 msgid "Any Linux-based operating system."
7468 #: ../src/guestfs-actions.pod:2237 ../fish/guestfish-actions.pod:1783
7469 msgid "Any Microsoft Windows operating system."
7473 #: ../src/guestfs-actions.pod:2241 ../fish/guestfish-actions.pod:1787
7474 msgid "The operating system type could not be determined."
7478 #: ../src/guestfs-actions.pod:2253
7479 msgid "guestfs_inspect_os"
7483 #: ../src/guestfs-actions.pod:2255
7486 " char **guestfs_inspect_os (guestfs_h *g);\n"
7491 #: ../src/guestfs-actions.pod:2257 ../fish/guestfish-actions.pod:1800
7493 "This function uses other libguestfs functions and certain heuristics to "
7494 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
7495 "for operating systems."
7499 #: ../src/guestfs-actions.pod:2261 ../fish/guestfish-actions.pod:1804
7500 msgid "The list returned is empty if no operating systems were found."
7504 #: ../src/guestfs-actions.pod:2263 ../fish/guestfish-actions.pod:1806
7506 "If one operating system was found, then this returns a list with a single "
7507 "element, which is the name of the root filesystem of this operating system. "
7508 "It is also possible for this function to return a list containing more than "
7509 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
7510 "element being the root filesystem of one of the operating systems."
7514 #: ../src/guestfs-actions.pod:2270
7516 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
7517 "functions in order to query further information about each operating system, "
7518 "such as the name and version."
7522 #: ../src/guestfs-actions.pod:2275
7524 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
7525 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
7526 "the contents. This should be called with no disks currently mounted. The "
7527 "function may also use Augeas, so any existing Augeas handle will be closed."
7531 #: ../src/guestfs-actions.pod:2281 ../fish/guestfish-actions.pod:1824
7533 "This function cannot decrypt encrypted disks. The caller must do that first "
7534 "(supplying the necessary keys) if the disk is encrypted."
7538 #: ../src/guestfs-actions.pod:2287 ../src/guestfs-actions.pod:2492 ../src/guestfs-actions.pod:2548
7539 msgid "See also C<guestfs_list_filesystems>."
7543 #: ../src/guestfs-actions.pod:2293
7544 msgid "guestfs_is_blockdev"
7548 #: ../src/guestfs-actions.pod:2295
7551 " int guestfs_is_blockdev (guestfs_h *g,\n"
7552 "\t\tconst char *path);\n"
7557 #: ../src/guestfs-actions.pod:2298 ../fish/guestfish-actions.pod:1836
7559 "This returns C<true> if and only if there is a block device with the given "
7564 #: ../src/guestfs-actions.pod:2301 ../src/guestfs-actions.pod:2324 ../src/guestfs-actions.pod:2348 ../src/guestfs-actions.pod:2360 ../src/guestfs-actions.pod:2373 ../src/guestfs-actions.pod:2417 ../src/guestfs-actions.pod:2429
7565 msgid "See also C<guestfs_stat>."
7569 #: ../src/guestfs-actions.pod:2305
7570 msgid "guestfs_is_busy"
7574 #: ../src/guestfs-actions.pod:2307
7577 " int guestfs_is_busy (guestfs_h *g);\n"
7582 #: ../src/guestfs-actions.pod:2309 ../fish/guestfish-actions.pod:1845
7584 "This returns true iff this handle is busy processing a command (in the "
7589 #: ../src/guestfs-actions.pod:2316
7590 msgid "guestfs_is_chardev"
7594 #: ../src/guestfs-actions.pod:2318
7597 " int guestfs_is_chardev (guestfs_h *g,\n"
7598 "\t\tconst char *path);\n"
7603 #: ../src/guestfs-actions.pod:2321 ../fish/guestfish-actions.pod:1854
7605 "This returns C<true> if and only if there is a character device with the "
7606 "given C<path> name."
7610 #: ../src/guestfs-actions.pod:2328
7611 msgid "guestfs_is_config"
7615 #: ../src/guestfs-actions.pod:2330
7618 " int guestfs_is_config (guestfs_h *g);\n"
7623 #: ../src/guestfs-actions.pod:2332 ../fish/guestfish-actions.pod:1863
7625 "This returns true iff this handle is being configured (in the C<CONFIG> "
7630 #: ../src/guestfs-actions.pod:2339
7631 msgid "guestfs_is_dir"
7635 #: ../src/guestfs-actions.pod:2341
7638 " int guestfs_is_dir (guestfs_h *g,\n"
7639 "\t\tconst char *path);\n"
7644 #: ../src/guestfs-actions.pod:2344 ../fish/guestfish-actions.pod:1872
7646 "This returns C<true> if and only if there is a directory with the given "
7647 "C<path> name. Note that it returns false for other objects like files."
7651 #: ../src/guestfs-actions.pod:2352
7652 msgid "guestfs_is_fifo"
7656 #: ../src/guestfs-actions.pod:2354
7659 " int guestfs_is_fifo (guestfs_h *g,\n"
7660 "\t\tconst char *path);\n"
7665 #: ../src/guestfs-actions.pod:2357 ../fish/guestfish-actions.pod:1882
7667 "This returns C<true> if and only if there is a FIFO (named pipe) with the "
7668 "given C<path> name."
7672 #: ../src/guestfs-actions.pod:2364
7673 msgid "guestfs_is_file"
7677 #: ../src/guestfs-actions.pod:2366
7680 " int guestfs_is_file (guestfs_h *g,\n"
7681 "\t\tconst char *path);\n"
7686 #: ../src/guestfs-actions.pod:2369 ../fish/guestfish-actions.pod:1891
7688 "This returns C<true> if and only if there is a regular file with the given "
7689 "C<path> name. Note that it returns false for other objects like "
7694 #: ../src/guestfs-actions.pod:2377
7695 msgid "guestfs_is_launching"
7699 #: ../src/guestfs-actions.pod:2379
7702 " int guestfs_is_launching (guestfs_h *g);\n"
7707 #: ../src/guestfs-actions.pod:2381 ../fish/guestfish-actions.pod:1901
7709 "This returns true iff this handle is launching the subprocess (in the "
7710 "C<LAUNCHING> state)."
7714 #: ../src/guestfs-actions.pod:2388
7715 msgid "guestfs_is_lv"
7719 #: ../src/guestfs-actions.pod:2390
7722 " int guestfs_is_lv (guestfs_h *g,\n"
7723 "\t\tconst char *device);\n"
7728 #: ../src/guestfs-actions.pod:2393 ../fish/guestfish-actions.pod:1910
7730 "This command tests whether C<device> is a logical volume, and returns true "
7731 "iff this is the case."
7735 #: ../src/guestfs-actions.pod:2398
7736 msgid "guestfs_is_ready"
7740 #: ../src/guestfs-actions.pod:2400
7743 " int guestfs_is_ready (guestfs_h *g);\n"
7748 #: ../src/guestfs-actions.pod:2402 ../fish/guestfish-actions.pod:1917
7750 "This returns true iff this handle is ready to accept commands (in the "
7755 #: ../src/guestfs-actions.pod:2409
7756 msgid "guestfs_is_socket"
7760 #: ../src/guestfs-actions.pod:2411
7763 " int guestfs_is_socket (guestfs_h *g,\n"
7764 "\t\tconst char *path);\n"
7769 #: ../src/guestfs-actions.pod:2414 ../fish/guestfish-actions.pod:1926
7771 "This returns C<true> if and only if there is a Unix domain socket with the "
7772 "given C<path> name."
7776 #: ../src/guestfs-actions.pod:2421
7777 msgid "guestfs_is_symlink"
7781 #: ../src/guestfs-actions.pod:2423
7784 " int guestfs_is_symlink (guestfs_h *g,\n"
7785 "\t\tconst char *path);\n"
7790 #: ../src/guestfs-actions.pod:2426 ../fish/guestfish-actions.pod:1935
7792 "This returns C<true> if and only if there is a symbolic link with the given "
7797 #: ../src/guestfs-actions.pod:2433
7798 msgid "guestfs_kill_subprocess"
7802 #: ../src/guestfs-actions.pod:2435
7805 " int guestfs_kill_subprocess (guestfs_h *g);\n"
7810 #: ../src/guestfs-actions.pod:2437 ../fish/guestfish-actions.pod:1944
7811 msgid "This kills the qemu subprocess. You should never need to call this."
7815 #: ../src/guestfs-actions.pod:2441
7816 msgid "guestfs_launch"
7820 #: ../src/guestfs-actions.pod:2443
7823 " int guestfs_launch (guestfs_h *g);\n"
7828 #: ../src/guestfs-actions.pod:2445 ../fish/guestfish-actions.pod:1952
7830 "Internally libguestfs is implemented by running a virtual machine using "
7835 #: ../src/guestfs-actions.pod:2448 ../fish/guestfish-actions.pod:1955
7837 "You should call this after configuring the handle (eg. adding drives) but "
7838 "before performing any actions."
7842 #: ../src/guestfs-actions.pod:2453
7843 msgid "guestfs_lchown"
7847 #: ../src/guestfs-actions.pod:2455
7850 " int guestfs_lchown (guestfs_h *g,\n"
7853 "\t\tconst char *path);\n"
7858 #: ../src/guestfs-actions.pod:2460
7860 "Change the file owner to C<owner> and group to C<group>. This is like "
7861 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
7862 "changed, not the target."
7866 #: ../src/guestfs-actions.pod:2470
7867 msgid "guestfs_lgetxattrs"
7871 #: ../src/guestfs-actions.pod:2472
7874 " struct guestfs_xattr_list *guestfs_lgetxattrs (guestfs_h *g,\n"
7875 "\t\tconst char *path);\n"
7880 #: ../src/guestfs-actions.pod:2475
7882 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
7883 "then it returns the extended attributes of the link itself."
7887 #: ../src/guestfs-actions.pod:2484
7888 msgid "guestfs_list_devices"
7892 #: ../src/guestfs-actions.pod:2486
7895 " char **guestfs_list_devices (guestfs_h *g);\n"
7900 #: ../src/guestfs-actions.pod:2488 ../fish/guestfish-actions.pod:1982
7901 msgid "List all the block devices."
7905 #: ../src/guestfs-actions.pod:2490 ../fish/guestfish-actions.pod:1984
7906 msgid "The full block device names are returned, eg. C</dev/sda>."
7910 #: ../src/guestfs-actions.pod:2498
7911 msgid "guestfs_list_filesystems"
7915 #: ../src/guestfs-actions.pod:2500
7918 " char **guestfs_list_filesystems (guestfs_h *g);\n"
7923 #: ../src/guestfs-actions.pod:2502 ../fish/guestfish-actions.pod:1992
7925 "This inspection command looks for filesystems on partitions, block devices "
7926 "and logical volumes, returning a list of devices containing filesystems and "
7931 #: ../src/guestfs-actions.pod:2506 ../fish/guestfish-actions.pod:1996
7933 "The return value is a hash, where the keys are the devices containing "
7934 "filesystems, and the values are the filesystem types. For example:"
7938 #: ../src/guestfs-actions.pod:2510 ../fish/guestfish-actions.pod:2000
7941 " \"/dev/sda1\" => \"ntfs\"\n"
7942 " \"/dev/sda2\" => \"ext2\"\n"
7943 " \"/dev/vg_guest/lv_root\" => \"ext4\"\n"
7944 " \"/dev/vg_guest/lv_swap\" => \"swap\"\n"
7949 #: ../src/guestfs-actions.pod:2515 ../fish/guestfish-actions.pod:2005
7951 "The value can have the special value \"unknown\", meaning the content of the "
7952 "device is undetermined or empty. \"swap\" means a Linux swap partition."
7956 #: ../src/guestfs-actions.pod:2519
7958 "This command runs other libguestfs commands, which might include "
7959 "C<guestfs_mount> and C<guestfs_umount>, and therefore you should use this "
7960 "soon after launch and only when nothing is mounted."
7964 #: ../src/guestfs-actions.pod:2523
7966 "Not all of the filesystems returned will be mountable. In particular, swap "
7967 "partitions are returned in the list. Also this command does not check that "
7968 "each filesystem found is valid and mountable, and some filesystems might be "
7969 "mountable but require special options. Filesystems may not all belong to a "
7970 "single logical operating system (use C<guestfs_inspect_os> to look for "
7975 #: ../src/guestfs-actions.pod:2537
7976 msgid "guestfs_list_partitions"
7980 #: ../src/guestfs-actions.pod:2539
7983 " char **guestfs_list_partitions (guestfs_h *g);\n"
7988 #: ../src/guestfs-actions.pod:2541 ../fish/guestfish-actions.pod:2025
7989 msgid "List all the partitions detected on all block devices."
7993 #: ../src/guestfs-actions.pod:2543 ../fish/guestfish-actions.pod:2027
7994 msgid "The full partition device names are returned, eg. C</dev/sda1>"
7998 #: ../src/guestfs-actions.pod:2545
8000 "This does not return logical volumes. For that you will need to call "
8005 #: ../src/guestfs-actions.pod:2554
8010 #: ../src/guestfs-actions.pod:2556
8013 " char *guestfs_ll (guestfs_h *g,\n"
8014 "\t\tconst char *directory);\n"
8019 #: ../src/guestfs-actions.pod:2559 ../fish/guestfish-actions.pod:2038
8021 "List the files in C<directory> (relative to the root directory, there is no "
8022 "cwd) in the format of 'ls -la'."
8026 #: ../src/guestfs-actions.pod:2562 ../fish/guestfish-actions.pod:2041
8028 "This command is mostly useful for interactive sessions. It is I<not> "
8029 "intended that you try to parse the output string."
8033 #: ../src/guestfs-actions.pod:2568
8038 #: ../src/guestfs-actions.pod:2570
8041 " int guestfs_ln (guestfs_h *g,\n"
8042 "\t\tconst char *target,\n"
8043 "\t\tconst char *linkname);\n"
8048 #: ../src/guestfs-actions.pod:2574 ../fish/guestfish-actions.pod:2048
8049 msgid "This command creates a hard link using the C<ln> command."
8053 #: ../src/guestfs-actions.pod:2578
8054 msgid "guestfs_ln_f"
8058 #: ../src/guestfs-actions.pod:2580
8061 " int guestfs_ln_f (guestfs_h *g,\n"
8062 "\t\tconst char *target,\n"
8063 "\t\tconst char *linkname);\n"
8068 #: ../src/guestfs-actions.pod:2584 ../fish/guestfish-actions.pod:2054
8070 "This command creates a hard link using the C<ln -f> command. The C<-f> "
8071 "option removes the link (C<linkname>) if it exists already."
8075 #: ../src/guestfs-actions.pod:2589
8076 msgid "guestfs_ln_s"
8080 #: ../src/guestfs-actions.pod:2591
8083 " int guestfs_ln_s (guestfs_h *g,\n"
8084 "\t\tconst char *target,\n"
8085 "\t\tconst char *linkname);\n"
8090 #: ../src/guestfs-actions.pod:2595 ../fish/guestfish-actions.pod:2061
8091 msgid "This command creates a symbolic link using the C<ln -s> command."
8095 #: ../src/guestfs-actions.pod:2599
8096 msgid "guestfs_ln_sf"
8100 #: ../src/guestfs-actions.pod:2601
8103 " int guestfs_ln_sf (guestfs_h *g,\n"
8104 "\t\tconst char *target,\n"
8105 "\t\tconst char *linkname);\n"
8110 #: ../src/guestfs-actions.pod:2605 ../fish/guestfish-actions.pod:2067
8112 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
8113 "option removes the link (C<linkname>) if it exists already."
8117 #: ../src/guestfs-actions.pod:2610
8118 msgid "guestfs_lremovexattr"
8122 #: ../src/guestfs-actions.pod:2612
8125 " int guestfs_lremovexattr (guestfs_h *g,\n"
8126 "\t\tconst char *xattr,\n"
8127 "\t\tconst char *path);\n"
8132 #: ../src/guestfs-actions.pod:2616
8134 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
8135 "link, then it removes an extended attribute of the link itself."
8139 #: ../src/guestfs-actions.pod:2622
8144 #: ../src/guestfs-actions.pod:2624
8147 " char **guestfs_ls (guestfs_h *g,\n"
8148 "\t\tconst char *directory);\n"
8153 #: ../src/guestfs-actions.pod:2627 ../fish/guestfish-actions.pod:2082
8155 "List the files in C<directory> (relative to the root directory, there is no "
8156 "cwd). The '.' and '..' entries are not returned, but hidden files are "
8161 #: ../src/guestfs-actions.pod:2631
8163 "This command is mostly useful for interactive sessions. Programs should "
8164 "probably use C<guestfs_readdir> instead."
8168 #: ../src/guestfs-actions.pod:2638
8169 msgid "guestfs_lsetxattr"
8173 #: ../src/guestfs-actions.pod:2640
8176 " int guestfs_lsetxattr (guestfs_h *g,\n"
8177 "\t\tconst char *xattr,\n"
8178 "\t\tconst char *val,\n"
8180 "\t\tconst char *path);\n"
8185 #: ../src/guestfs-actions.pod:2646
8187 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
8188 "then it sets an extended attribute of the link itself."
8192 #: ../src/guestfs-actions.pod:2652
8193 msgid "guestfs_lstat"
8197 #: ../src/guestfs-actions.pod:2654
8200 " struct guestfs_stat *guestfs_lstat (guestfs_h *g,\n"
8201 "\t\tconst char *path);\n"
8206 #: ../src/guestfs-actions.pod:2657 ../src/guestfs-actions.pod:4701 ../fish/guestfish-actions.pod:2101 ../fish/guestfish-actions.pod:3655
8207 msgid "Returns file information for the given C<path>."
8211 #: ../src/guestfs-actions.pod:2659
8213 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
8214 "link, then the link is stat-ed, not the file it refers to."
8218 #: ../src/guestfs-actions.pod:2663 ../fish/guestfish-actions.pod:2107
8219 msgid "This is the same as the C<lstat(2)> system call."
8223 #: ../src/guestfs-actions.pod:2665 ../src/guestfs-actions.pod:4705
8225 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
8226 "error. I<The caller must call C<guestfs_free_stat> after use>."
8230 #: ../src/guestfs-actions.pod:2669
8231 msgid "guestfs_lstatlist"
8235 #: ../src/guestfs-actions.pod:2671
8238 " struct guestfs_stat_list *guestfs_lstatlist (guestfs_h *g,\n"
8239 "\t\tconst char *path,\n"
8240 "\t\tchar *const *names);\n"
8245 #: ../src/guestfs-actions.pod:2675
8247 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
8248 "files, where all files are in the directory C<path>. C<names> is the list "
8249 "of files from this directory."
8253 #: ../src/guestfs-actions.pod:2679 ../fish/guestfish-actions.pod:2117
8255 "On return you get a list of stat structs, with a one-to-one correspondence "
8256 "to the C<names> list. If any name did not exist or could not be lstat'd, "
8257 "then the C<ino> field of that structure is set to C<-1>."
8261 #: ../src/guestfs-actions.pod:2684
8263 "This call is intended for programs that want to efficiently list a directory "
8264 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
8265 "for a similarly efficient call for getting extended attributes. Very long "
8266 "directory listings might cause the protocol message size to be exceeded, "
8267 "causing this call to fail. The caller must split up such requests into "
8268 "smaller groups of names."
8272 #: ../src/guestfs-actions.pod:2692
8274 "This function returns a C<struct guestfs_stat_list *> (see "
8275 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
8276 "must call C<guestfs_free_stat_list> after use>."
8280 #: ../src/guestfs-actions.pod:2697
8281 msgid "guestfs_luks_add_key"
8285 #: ../src/guestfs-actions.pod:2699
8288 " int guestfs_luks_add_key (guestfs_h *g,\n"
8289 "\t\tconst char *device,\n"
8290 "\t\tconst char *key,\n"
8291 "\t\tconst char *newkey,\n"
8292 "\t\tint keyslot);\n"
8297 #: ../src/guestfs-actions.pod:2705 ../fish/guestfish-actions.pod:2134
8299 "This command adds a new key on LUKS device C<device>. C<key> is any "
8300 "existing key, and is used to access the device. C<newkey> is the new key to "
8301 "add. C<keyslot> is the key slot that will be replaced."
8305 #: ../src/guestfs-actions.pod:2710
8307 "Note that if C<keyslot> already contains a key, then this command will "
8308 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
8312 #: ../src/guestfs-actions.pod:2716 ../src/guestfs-actions.pod:2750 ../src/guestfs-actions.pod:2770 ../src/guestfs-actions.pod:2787 ../src/guestfs-actions.pod:2816 ../src/guestfs-actions.pod:2832
8314 "This function takes a key or passphrase parameter which could contain "
8315 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
8320 #: ../src/guestfs-actions.pod:2720
8321 msgid "guestfs_luks_close"
8325 #: ../src/guestfs-actions.pod:2722
8328 " int guestfs_luks_close (guestfs_h *g,\n"
8329 "\t\tconst char *device);\n"
8334 #: ../src/guestfs-actions.pod:2725
8336 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
8337 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
8338 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
8339 "underlying block device."
8343 #: ../src/guestfs-actions.pod:2733
8344 msgid "guestfs_luks_format"
8348 #: ../src/guestfs-actions.pod:2735
8351 " int guestfs_luks_format (guestfs_h *g,\n"
8352 "\t\tconst char *device,\n"
8353 "\t\tconst char *key,\n"
8354 "\t\tint keyslot);\n"
8359 #: ../src/guestfs-actions.pod:2740 ../fish/guestfish-actions.pod:2160
8361 "This command erases existing data on C<device> and formats the device as a "
8362 "LUKS encrypted device. C<key> is the initial key, which is added to key "
8363 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
8367 #: ../src/guestfs-actions.pod:2747 ../src/guestfs-actions.pod:2767 ../src/guestfs-actions.pod:2869 ../src/guestfs-actions.pod:3581 ../src/guestfs-actions.pod:4242 ../src/guestfs-actions.pod:4563 ../src/guestfs-actions.pod:4583 ../src/guestfs-actions.pod:4606 ../src/guestfs-actions.pod:5571 ../fish/guestfish-actions.pod:2168 ../fish/guestfish-actions.pod:2181 ../fish/guestfish-actions.pod:2252 ../fish/guestfish-actions.pod:2767 ../fish/guestfish-actions.pod:3274 ../fish/guestfish-actions.pod:3554 ../fish/guestfish-actions.pod:3570 ../fish/guestfish-actions.pod:3585 ../fish/guestfish-actions.pod:4300
8369 "B<This command is dangerous. Without careful use you can easily destroy all "
8374 #: ../src/guestfs-actions.pod:2754
8375 msgid "guestfs_luks_format_cipher"
8379 #: ../src/guestfs-actions.pod:2756
8382 " int guestfs_luks_format_cipher (guestfs_h *g,\n"
8383 "\t\tconst char *device,\n"
8384 "\t\tconst char *key,\n"
8385 "\t\tint keyslot,\n"
8386 "\t\tconst char *cipher);\n"
8391 #: ../src/guestfs-actions.pod:2762
8393 "This command is the same as C<guestfs_luks_format> but it also allows you to "
8394 "set the C<cipher> used."
8398 #: ../src/guestfs-actions.pod:2774
8399 msgid "guestfs_luks_kill_slot"
8403 #: ../src/guestfs-actions.pod:2776
8406 " int guestfs_luks_kill_slot (guestfs_h *g,\n"
8407 "\t\tconst char *device,\n"
8408 "\t\tconst char *key,\n"
8409 "\t\tint keyslot);\n"
8414 #: ../src/guestfs-actions.pod:2781 ../fish/guestfish-actions.pod:2188
8416 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
8417 "device C<device>. C<key> must be one of the I<other> keys."
8421 #: ../src/guestfs-actions.pod:2791
8422 msgid "guestfs_luks_open"
8426 #: ../src/guestfs-actions.pod:2793
8429 " int guestfs_luks_open (guestfs_h *g,\n"
8430 "\t\tconst char *device,\n"
8431 "\t\tconst char *key,\n"
8432 "\t\tconst char *mapname);\n"
8437 #: ../src/guestfs-actions.pod:2798 ../fish/guestfish-actions.pod:2199
8439 "This command opens a block device which has been encrypted according to the "
8440 "Linux Unified Key Setup (LUKS) standard."
8444 #: ../src/guestfs-actions.pod:2801 ../fish/guestfish-actions.pod:2202
8445 msgid "C<device> is the encrypted block device or partition."
8449 #: ../src/guestfs-actions.pod:2803 ../fish/guestfish-actions.pod:2204
8451 "The caller must supply one of the keys associated with the LUKS block "
8452 "device, in the C<key> parameter."
8456 #: ../src/guestfs-actions.pod:2806 ../fish/guestfish-actions.pod:2207
8458 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
8459 "writes to this block device are decrypted from and encrypted to the "
8460 "underlying C<device> respectively."
8464 #: ../src/guestfs-actions.pod:2810
8466 "If this block device contains LVM volume groups, then calling "
8467 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
8472 #: ../src/guestfs-actions.pod:2820
8473 msgid "guestfs_luks_open_ro"
8477 #: ../src/guestfs-actions.pod:2822
8480 " int guestfs_luks_open_ro (guestfs_h *g,\n"
8481 "\t\tconst char *device,\n"
8482 "\t\tconst char *key,\n"
8483 "\t\tconst char *mapname);\n"
8488 #: ../src/guestfs-actions.pod:2827
8490 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
8495 #: ../src/guestfs-actions.pod:2836
8496 msgid "guestfs_lvcreate"
8500 #: ../src/guestfs-actions.pod:2838
8503 " int guestfs_lvcreate (guestfs_h *g,\n"
8504 "\t\tconst char *logvol,\n"
8505 "\t\tconst char *volgroup,\n"
8506 "\t\tint mbytes);\n"
8511 #: ../src/guestfs-actions.pod:2843 ../fish/guestfish-actions.pod:2232
8513 "This creates an LVM logical volume called C<logvol> on the volume group "
8514 "C<volgroup>, with C<size> megabytes."
8518 #: ../src/guestfs-actions.pod:2848
8519 msgid "guestfs_lvm_clear_filter"
8523 #: ../src/guestfs-actions.pod:2850
8526 " int guestfs_lvm_clear_filter (guestfs_h *g);\n"
8531 #: ../src/guestfs-actions.pod:2852
8533 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
8534 "see every block device."
8538 #: ../src/guestfs-actions.pod:2855 ../src/guestfs-actions.pod:2891 ../fish/guestfish-actions.pod:2242 ../fish/guestfish-actions.pod:2273
8539 msgid "This command also clears the LVM cache and performs a volume group scan."
8543 #: ../src/guestfs-actions.pod:2860
8544 msgid "guestfs_lvm_remove_all"
8548 #: ../src/guestfs-actions.pod:2862
8551 " int guestfs_lvm_remove_all (guestfs_h *g);\n"
8556 #: ../src/guestfs-actions.pod:2864 ../fish/guestfish-actions.pod:2249
8558 "This command removes all LVM logical volumes, volume groups and physical "
8563 #: ../src/guestfs-actions.pod:2872
8564 msgid "guestfs_lvm_set_filter"
8568 #: ../src/guestfs-actions.pod:2874
8571 " int guestfs_lvm_set_filter (guestfs_h *g,\n"
8572 "\t\tchar *const *devices);\n"
8577 #: ../src/guestfs-actions.pod:2877 ../fish/guestfish-actions.pod:2259
8579 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
8580 "block devices in the list C<devices>, and will ignore all other attached "
8585 #: ../src/guestfs-actions.pod:2881 ../fish/guestfish-actions.pod:2263
8587 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
8588 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
8589 "there are two types of duplication possible: either cloned PVs/VGs which "
8590 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
8591 "same name. In normal operation you cannot create this situation, but you "
8592 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
8593 "inside the LVM metadata."
8597 #: ../src/guestfs-actions.pod:2894 ../fish/guestfish-actions.pod:2276
8598 msgid "You can filter whole block devices or individual partitions."
8602 #: ../src/guestfs-actions.pod:2896 ../fish/guestfish-actions.pod:2278
8604 "You cannot use this if any VG is currently in use (eg. contains a mounted "
8605 "filesystem), even if you are not filtering out that VG."
8609 #: ../src/guestfs-actions.pod:2902
8610 msgid "guestfs_lvremove"
8614 #: ../src/guestfs-actions.pod:2904
8617 " int guestfs_lvremove (guestfs_h *g,\n"
8618 "\t\tconst char *device);\n"
8623 #: ../src/guestfs-actions.pod:2907 ../fish/guestfish-actions.pod:2286
8625 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
8626 "LV, such as C</dev/VG/LV>."
8630 #: ../src/guestfs-actions.pod:2910 ../fish/guestfish-actions.pod:2289
8632 "You can also remove all LVs in a volume group by specifying the VG name, "
8637 #: ../src/guestfs-actions.pod:2915
8638 msgid "guestfs_lvrename"
8642 #: ../src/guestfs-actions.pod:2917
8645 " int guestfs_lvrename (guestfs_h *g,\n"
8646 "\t\tconst char *logvol,\n"
8647 "\t\tconst char *newlogvol);\n"
8652 #: ../src/guestfs-actions.pod:2921 ../fish/guestfish-actions.pod:2296
8653 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
8657 #: ../src/guestfs-actions.pod:2925
8658 msgid "guestfs_lvresize"
8662 #: ../src/guestfs-actions.pod:2927
8665 " int guestfs_lvresize (guestfs_h *g,\n"
8666 "\t\tconst char *device,\n"
8667 "\t\tint mbytes);\n"
8672 #: ../src/guestfs-actions.pod:2931 ../fish/guestfish-actions.pod:2302
8674 "This resizes (expands or shrinks) an existing LVM logical volume to "
8675 "C<mbytes>. When reducing, data in the reduced part is lost."
8679 #: ../src/guestfs-actions.pod:2937
8680 msgid "guestfs_lvresize_free"
8684 #: ../src/guestfs-actions.pod:2939
8687 " int guestfs_lvresize_free (guestfs_h *g,\n"
8688 "\t\tconst char *lv,\n"
8689 "\t\tint percent);\n"
8694 #: ../src/guestfs-actions.pod:2943 ../fish/guestfish-actions.pod:2310
8696 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
8697 "remaining free space in the volume group. Commonly you would call this with "
8698 "pc = 100 which expands the logical volume as much as possible, using all "
8699 "remaining free space in the volume group."
8703 #: ../src/guestfs-actions.pod:2951
8708 #: ../src/guestfs-actions.pod:2953
8711 " char **guestfs_lvs (guestfs_h *g);\n"
8716 #: ../src/guestfs-actions.pod:2955 ../fish/guestfish-actions.pod:2320
8718 "List all the logical volumes detected. This is the equivalent of the "
8719 "L<lvs(8)> command."
8723 #: ../src/guestfs-actions.pod:2958 ../fish/guestfish-actions.pod:2323
8725 "This returns a list of the logical volume device names "
8726 "(eg. C</dev/VolGroup00/LogVol00>)."
8730 #: ../src/guestfs-actions.pod:2961
8731 msgid "See also C<guestfs_lvs_full>, C<guestfs_list_filesystems>."
8735 #: ../src/guestfs-actions.pod:2967
8736 msgid "guestfs_lvs_full"
8740 #: ../src/guestfs-actions.pod:2969
8743 " struct guestfs_lvm_lv_list *guestfs_lvs_full (guestfs_h *g);\n"
8748 #: ../src/guestfs-actions.pod:2971 ../fish/guestfish-actions.pod:2332
8750 "List all the logical volumes detected. This is the equivalent of the "
8751 "L<lvs(8)> command. The \"full\" version includes all fields."
8755 #: ../src/guestfs-actions.pod:2974
8757 "This function returns a C<struct guestfs_lvm_lv_list *> (see "
8758 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
8759 "must call C<guestfs_free_lvm_lv_list> after use>."
8763 #: ../src/guestfs-actions.pod:2979
8764 msgid "guestfs_lvuuid"
8768 #: ../src/guestfs-actions.pod:2981
8771 " char *guestfs_lvuuid (guestfs_h *g,\n"
8772 "\t\tconst char *device);\n"
8777 #: ../src/guestfs-actions.pod:2984 ../fish/guestfish-actions.pod:2339
8778 msgid "This command returns the UUID of the LVM LV C<device>."
8782 #: ../src/guestfs-actions.pod:2989
8783 msgid "guestfs_lxattrlist"
8787 #: ../src/guestfs-actions.pod:2991
8790 " struct guestfs_xattr_list *guestfs_lxattrlist (guestfs_h *g,\n"
8791 "\t\tconst char *path,\n"
8792 "\t\tchar *const *names);\n"
8797 #: ../src/guestfs-actions.pod:2995 ../fish/guestfish-actions.pod:2345
8799 "This call allows you to get the extended attributes of multiple files, where "
8800 "all files are in the directory C<path>. C<names> is the list of files from "
8805 #: ../src/guestfs-actions.pod:2999 ../fish/guestfish-actions.pod:2349
8807 "On return you get a flat list of xattr structs which must be interpreted "
8808 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
8809 "C<attrval> in this struct is zero-length to indicate there was an error "
8810 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
8811 "number (the number of following attributes for this file, which could be "
8812 "C<\"0\">). Then after the first xattr struct are the zero or more "
8813 "attributes for the first named file. This repeats for the second and "
8818 #: ../src/guestfs-actions.pod:3009
8820 "This call is intended for programs that want to efficiently list a directory "
8821 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
8822 "a similarly efficient call for getting standard stats. Very long directory "
8823 "listings might cause the protocol message size to be exceeded, causing this "
8824 "call to fail. The caller must split up such requests into smaller groups of "
8829 #: ../src/guestfs-actions.pod:3022
8830 msgid "guestfs_mkdir"
8834 #: ../src/guestfs-actions.pod:3024
8837 " int guestfs_mkdir (guestfs_h *g,\n"
8838 "\t\tconst char *path);\n"
8843 #: ../src/guestfs-actions.pod:3027 ../fish/guestfish-actions.pod:2371
8844 msgid "Create a directory named C<path>."
8848 #: ../src/guestfs-actions.pod:3031
8849 msgid "guestfs_mkdir_mode"
8853 #: ../src/guestfs-actions.pod:3033
8856 " int guestfs_mkdir_mode (guestfs_h *g,\n"
8857 "\t\tconst char *path,\n"
8863 #: ../src/guestfs-actions.pod:3037 ../fish/guestfish-actions.pod:2377
8865 "This command creates a directory, setting the initial permissions of the "
8866 "directory to C<mode>."
8870 #: ../src/guestfs-actions.pod:3040 ../fish/guestfish-actions.pod:2380
8872 "For common Linux filesystems, the actual mode which is set will be C<mode & "
8873 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
8878 #: ../src/guestfs-actions.pod:3044
8879 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
8883 #: ../src/guestfs-actions.pod:3048
8884 msgid "guestfs_mkdir_p"
8888 #: ../src/guestfs-actions.pod:3050
8891 " int guestfs_mkdir_p (guestfs_h *g,\n"
8892 "\t\tconst char *path);\n"
8897 #: ../src/guestfs-actions.pod:3053 ../fish/guestfish-actions.pod:2390
8899 "Create a directory named C<path>, creating any parent directories as "
8900 "necessary. This is like the C<mkdir -p> shell command."
8904 #: ../src/guestfs-actions.pod:3058
8905 msgid "guestfs_mkdtemp"
8909 #: ../src/guestfs-actions.pod:3060
8912 " char *guestfs_mkdtemp (guestfs_h *g,\n"
8913 "\t\tconst char *template);\n"
8918 #: ../src/guestfs-actions.pod:3063 ../fish/guestfish-actions.pod:2397
8920 "This command creates a temporary directory. The C<template> parameter "
8921 "should be a full pathname for the temporary directory name with the final "
8922 "six characters being \"XXXXXX\"."
8926 #: ../src/guestfs-actions.pod:3068 ../fish/guestfish-actions.pod:2402
8928 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
8929 "being suitable for Windows filesystems."
8933 #: ../src/guestfs-actions.pod:3071 ../fish/guestfish-actions.pod:2405
8934 msgid "The name of the temporary directory that was created is returned."
8938 #: ../src/guestfs-actions.pod:3074 ../fish/guestfish-actions.pod:2408
8939 msgid "The temporary directory is created with mode 0700 and is owned by root."
8943 #: ../src/guestfs-actions.pod:3077 ../fish/guestfish-actions.pod:2411
8945 "The caller is responsible for deleting the temporary directory and its "
8946 "contents after use."
8950 #: ../src/guestfs-actions.pod:3080 ../fish/guestfish-actions.pod:2414
8951 msgid "See also: L<mkdtemp(3)>"
8955 #: ../src/guestfs-actions.pod:3085
8956 msgid "guestfs_mke2fs_J"
8960 #: ../src/guestfs-actions.pod:3087
8963 " int guestfs_mke2fs_J (guestfs_h *g,\n"
8964 "\t\tconst char *fstype,\n"
8965 "\t\tint blocksize,\n"
8966 "\t\tconst char *device,\n"
8967 "\t\tconst char *journal);\n"
8972 #: ../src/guestfs-actions.pod:3093 ../fish/guestfish-actions.pod:2420
8974 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
8975 "C<journal>. It is equivalent to the command:"
8979 #: ../src/guestfs-actions.pod:3097 ../fish/guestfish-actions.pod:2424
8982 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
8987 #: ../src/guestfs-actions.pod:3099
8988 msgid "See also C<guestfs_mke2journal>."
8992 #: ../src/guestfs-actions.pod:3103
8993 msgid "guestfs_mke2fs_JL"
8997 #: ../src/guestfs-actions.pod:3105
9000 " int guestfs_mke2fs_JL (guestfs_h *g,\n"
9001 "\t\tconst char *fstype,\n"
9002 "\t\tint blocksize,\n"
9003 "\t\tconst char *device,\n"
9004 "\t\tconst char *label);\n"
9009 #: ../src/guestfs-actions.pod:3111 ../fish/guestfish-actions.pod:2432
9011 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
9012 "the journal labeled C<label>."
9016 #: ../src/guestfs-actions.pod:3114
9017 msgid "See also C<guestfs_mke2journal_L>."
9021 #: ../src/guestfs-actions.pod:3118
9022 msgid "guestfs_mke2fs_JU"
9026 #: ../src/guestfs-actions.pod:3120
9029 " int guestfs_mke2fs_JU (guestfs_h *g,\n"
9030 "\t\tconst char *fstype,\n"
9031 "\t\tint blocksize,\n"
9032 "\t\tconst char *device,\n"
9033 "\t\tconst char *uuid);\n"
9038 #: ../src/guestfs-actions.pod:3126 ../fish/guestfish-actions.pod:2441
9040 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
9041 "the journal with UUID C<uuid>."
9045 #: ../src/guestfs-actions.pod:3129
9046 msgid "See also C<guestfs_mke2journal_U>."
9050 #: ../src/guestfs-actions.pod:3133
9051 msgid "guestfs_mke2journal"
9055 #: ../src/guestfs-actions.pod:3135
9058 " int guestfs_mke2journal (guestfs_h *g,\n"
9059 "\t\tint blocksize,\n"
9060 "\t\tconst char *device);\n"
9065 #: ../src/guestfs-actions.pod:3139 ../fish/guestfish-actions.pod:2450
9067 "This creates an ext2 external journal on C<device>. It is equivalent to the "
9072 #: ../src/guestfs-actions.pod:3142 ../fish/guestfish-actions.pod:2453
9075 " mke2fs -O journal_dev -b blocksize device\n"
9080 #: ../src/guestfs-actions.pod:3146
9081 msgid "guestfs_mke2journal_L"
9085 #: ../src/guestfs-actions.pod:3148
9088 " int guestfs_mke2journal_L (guestfs_h *g,\n"
9089 "\t\tint blocksize,\n"
9090 "\t\tconst char *label,\n"
9091 "\t\tconst char *device);\n"
9096 #: ../src/guestfs-actions.pod:3153 ../fish/guestfish-actions.pod:2459
9097 msgid "This creates an ext2 external journal on C<device> with label C<label>."
9101 #: ../src/guestfs-actions.pod:3157
9102 msgid "guestfs_mke2journal_U"
9106 #: ../src/guestfs-actions.pod:3159
9109 " int guestfs_mke2journal_U (guestfs_h *g,\n"
9110 "\t\tint blocksize,\n"
9111 "\t\tconst char *uuid,\n"
9112 "\t\tconst char *device);\n"
9117 #: ../src/guestfs-actions.pod:3164 ../fish/guestfish-actions.pod:2465
9118 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
9122 #: ../src/guestfs-actions.pod:3168
9123 msgid "guestfs_mkfifo"
9127 #: ../src/guestfs-actions.pod:3170
9130 " int guestfs_mkfifo (guestfs_h *g,\n"
9132 "\t\tconst char *path);\n"
9137 #: ../src/guestfs-actions.pod:3174
9139 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
9140 "is just a convenient wrapper around C<guestfs_mknod>."
9144 #: ../src/guestfs-actions.pod:3182
9145 msgid "guestfs_mkfs"
9149 #: ../src/guestfs-actions.pod:3184
9152 " int guestfs_mkfs (guestfs_h *g,\n"
9153 "\t\tconst char *fstype,\n"
9154 "\t\tconst char *device);\n"
9159 #: ../src/guestfs-actions.pod:3188 ../fish/guestfish-actions.pod:2481
9161 "This creates a filesystem on C<device> (usually a partition or LVM logical "
9162 "volume). The filesystem type is C<fstype>, for example C<ext3>."
9166 #: ../src/guestfs-actions.pod:3194
9167 msgid "guestfs_mkfs_b"
9171 #: ../src/guestfs-actions.pod:3196
9174 " int guestfs_mkfs_b (guestfs_h *g,\n"
9175 "\t\tconst char *fstype,\n"
9176 "\t\tint blocksize,\n"
9177 "\t\tconst char *device);\n"
9182 #: ../src/guestfs-actions.pod:3201
9184 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
9185 "block size of the resulting filesystem. Supported block sizes depend on the "
9186 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
9190 #: ../src/guestfs-actions.pod:3206 ../fish/guestfish-actions.pod:2494
9192 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
9197 #: ../src/guestfs-actions.pod:3211
9198 msgid "guestfs_mkmountpoint"
9202 #: ../src/guestfs-actions.pod:3213
9205 " int guestfs_mkmountpoint (guestfs_h *g,\n"
9206 "\t\tconst char *exemptpath);\n"
9211 #: ../src/guestfs-actions.pod:3216
9213 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
9214 "that can be used to create extra mountpoints before mounting the first "
9219 #: ../src/guestfs-actions.pod:3220 ../fish/guestfish-actions.pod:2505
9221 "These calls are I<only> necessary in some very limited circumstances, mainly "
9222 "the case where you want to mount a mix of unrelated and/or read-only "
9223 "filesystems together."
9227 #: ../src/guestfs-actions.pod:3224 ../fish/guestfish-actions.pod:2509
9229 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
9230 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
9231 "inside that. You can unpack this as follows in guestfish:"
9235 #: ../src/guestfs-actions.pod:3229 ../fish/guestfish-actions.pod:2514
9238 " add-ro Fedora-11-i686-Live.iso\n"
9240 " mkmountpoint /cd\n"
9241 " mkmountpoint /squash\n"
9242 " mkmountpoint /ext3\n"
9243 " mount /dev/sda /cd\n"
9244 " mount-loop /cd/LiveOS/squashfs.img /squash\n"
9245 " mount-loop /squash/LiveOS/ext3fs.img /ext3\n"
9250 #: ../src/guestfs-actions.pod:3238 ../fish/guestfish-actions.pod:2523
9251 msgid "The inner filesystem is now unpacked under the /ext3 mountpoint."
9255 #: ../src/guestfs-actions.pod:3242
9256 msgid "guestfs_mknod"
9260 #: ../src/guestfs-actions.pod:3244
9263 " int guestfs_mknod (guestfs_h *g,\n"
9265 "\t\tint devmajor,\n"
9266 "\t\tint devminor,\n"
9267 "\t\tconst char *path);\n"
9272 #: ../src/guestfs-actions.pod:3250 ../fish/guestfish-actions.pod:2529
9274 "This call creates block or character special devices, or named pipes "
9279 #: ../src/guestfs-actions.pod:3253 ../fish/guestfish-actions.pod:2532
9281 "The C<mode> parameter should be the mode, using the standard constants. "
9282 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
9283 "used when creating block and character special devices."
9287 #: ../src/guestfs-actions.pod:3258
9289 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
9290 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
9291 "regular file). These constants are available in the standard Linux header "
9292 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
9293 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
9294 "the appropriate constant for you."
9298 #: ../src/guestfs-actions.pod:3270
9299 msgid "guestfs_mknod_b"
9303 #: ../src/guestfs-actions.pod:3272
9306 " int guestfs_mknod_b (guestfs_h *g,\n"
9308 "\t\tint devmajor,\n"
9309 "\t\tint devminor,\n"
9310 "\t\tconst char *path);\n"
9315 #: ../src/guestfs-actions.pod:3278
9317 "This call creates a block device node called C<path> with mode C<mode> and "
9318 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
9319 "wrapper around C<guestfs_mknod>."
9323 #: ../src/guestfs-actions.pod:3286
9324 msgid "guestfs_mknod_c"
9328 #: ../src/guestfs-actions.pod:3288
9331 " int guestfs_mknod_c (guestfs_h *g,\n"
9333 "\t\tint devmajor,\n"
9334 "\t\tint devminor,\n"
9335 "\t\tconst char *path);\n"
9340 #: ../src/guestfs-actions.pod:3294
9342 "This call creates a char device node called C<path> with mode C<mode> and "
9343 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
9344 "wrapper around C<guestfs_mknod>."
9348 #: ../src/guestfs-actions.pod:3302
9349 msgid "guestfs_mkswap"
9353 #: ../src/guestfs-actions.pod:3304
9356 " int guestfs_mkswap (guestfs_h *g,\n"
9357 "\t\tconst char *device);\n"
9362 #: ../src/guestfs-actions.pod:3307 ../fish/guestfish-actions.pod:2571
9363 msgid "Create a swap partition on C<device>."
9367 #: ../src/guestfs-actions.pod:3311
9368 msgid "guestfs_mkswap_L"
9372 #: ../src/guestfs-actions.pod:3313
9375 " int guestfs_mkswap_L (guestfs_h *g,\n"
9376 "\t\tconst char *label,\n"
9377 "\t\tconst char *device);\n"
9382 #: ../src/guestfs-actions.pod:3317 ../fish/guestfish-actions.pod:2577
9383 msgid "Create a swap partition on C<device> with label C<label>."
9387 #: ../src/guestfs-actions.pod:3319 ../fish/guestfish-actions.pod:2579
9389 "Note that you cannot attach a swap label to a block device "
9390 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
9391 "the kernel or swap tools."
9395 #: ../src/guestfs-actions.pod:3325
9396 msgid "guestfs_mkswap_U"
9400 #: ../src/guestfs-actions.pod:3327
9403 " int guestfs_mkswap_U (guestfs_h *g,\n"
9404 "\t\tconst char *uuid,\n"
9405 "\t\tconst char *device);\n"
9410 #: ../src/guestfs-actions.pod:3331 ../fish/guestfish-actions.pod:2587
9411 msgid "Create a swap partition on C<device> with UUID C<uuid>."
9415 #: ../src/guestfs-actions.pod:3335
9416 msgid "guestfs_mkswap_file"
9420 #: ../src/guestfs-actions.pod:3337
9423 " int guestfs_mkswap_file (guestfs_h *g,\n"
9424 "\t\tconst char *path);\n"
9429 #: ../src/guestfs-actions.pod:3340 ../fish/guestfish-actions.pod:2593
9430 msgid "Create a swap file."
9434 #: ../src/guestfs-actions.pod:3342
9436 "This command just writes a swap file signature to an existing file. To "
9437 "create the file itself, use something like C<guestfs_fallocate>."
9441 #: ../src/guestfs-actions.pod:3347
9442 msgid "guestfs_modprobe"
9446 #: ../src/guestfs-actions.pod:3349
9449 " int guestfs_modprobe (guestfs_h *g,\n"
9450 "\t\tconst char *modulename);\n"
9455 #: ../src/guestfs-actions.pod:3352 ../fish/guestfish-actions.pod:2602
9456 msgid "This loads a kernel module in the appliance."
9460 #: ../src/guestfs-actions.pod:3354 ../fish/guestfish-actions.pod:2604
9462 "The kernel module must have been whitelisted when libguestfs was built (see "
9463 "C<appliance/kmod.whitelist.in> in the source)."
9467 #: ../src/guestfs-actions.pod:3359
9468 msgid "guestfs_mount"
9472 #: ../src/guestfs-actions.pod:3361
9475 " int guestfs_mount (guestfs_h *g,\n"
9476 "\t\tconst char *device,\n"
9477 "\t\tconst char *mountpoint);\n"
9482 #: ../src/guestfs-actions.pod:3365 ../fish/guestfish-actions.pod:2611
9484 "Mount a guest disk at a position in the filesystem. Block devices are named "
9485 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
9486 "those block devices contain partitions, they will have the usual names "
9487 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
9491 #: ../src/guestfs-actions.pod:3371 ../fish/guestfish-actions.pod:2617
9493 "The rules are the same as for L<mount(2)>: A filesystem must first be "
9494 "mounted on C</> before others can be mounted. Other filesystems can only be "
9495 "mounted on directories which already exist."
9499 #: ../src/guestfs-actions.pod:3376 ../fish/guestfish-actions.pod:2622
9501 "The mounted filesystem is writable, if we have sufficient permissions on the "
9502 "underlying device."
9506 #: ../src/guestfs-actions.pod:3379
9508 "B<Important note:> When you use this call, the filesystem options C<sync> "
9509 "and C<noatime> are set implicitly. This was originally done because we "
9510 "thought it would improve reliability, but it turns out that I<-o sync> has a "
9511 "very large negative performance impact and negligible effect on "
9512 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
9513 "in any code that needs performance, and instead use C<guestfs_mount_options> "
9514 "(use an empty string for the first parameter if you don't want any options)."
9518 #: ../src/guestfs-actions.pod:3391
9519 msgid "guestfs_mount_loop"
9523 #: ../src/guestfs-actions.pod:3393
9526 " int guestfs_mount_loop (guestfs_h *g,\n"
9527 "\t\tconst char *file,\n"
9528 "\t\tconst char *mountpoint);\n"
9533 #: ../src/guestfs-actions.pod:3397 ../fish/guestfish-actions.pod:2639
9535 "This command lets you mount C<file> (a filesystem image in a file) on a "
9536 "mount point. It is entirely equivalent to the command C<mount -o loop file "
9541 #: ../src/guestfs-actions.pod:3403
9542 msgid "guestfs_mount_options"
9546 #: ../src/guestfs-actions.pod:3405
9549 " int guestfs_mount_options (guestfs_h *g,\n"
9550 "\t\tconst char *options,\n"
9551 "\t\tconst char *device,\n"
9552 "\t\tconst char *mountpoint);\n"
9557 #: ../src/guestfs-actions.pod:3410
9559 "This is the same as the C<guestfs_mount> command, but it allows you to set "
9560 "the mount options as for the L<mount(8)> I<-o> flag."
9564 #: ../src/guestfs-actions.pod:3414 ../fish/guestfish-actions.pod:2651
9566 "If the C<options> parameter is an empty string, then no options are passed "
9567 "(all options default to whatever the filesystem uses)."
9571 #: ../src/guestfs-actions.pod:3420
9572 msgid "guestfs_mount_ro"
9576 #: ../src/guestfs-actions.pod:3422
9579 " int guestfs_mount_ro (guestfs_h *g,\n"
9580 "\t\tconst char *device,\n"
9581 "\t\tconst char *mountpoint);\n"
9586 #: ../src/guestfs-actions.pod:3426
9588 "This is the same as the C<guestfs_mount> command, but it mounts the "
9589 "filesystem with the read-only (I<-o ro>) flag."
9593 #: ../src/guestfs-actions.pod:3431
9594 msgid "guestfs_mount_vfs"
9598 #: ../src/guestfs-actions.pod:3433
9601 " int guestfs_mount_vfs (guestfs_h *g,\n"
9602 "\t\tconst char *options,\n"
9603 "\t\tconst char *vfstype,\n"
9604 "\t\tconst char *device,\n"
9605 "\t\tconst char *mountpoint);\n"
9610 #: ../src/guestfs-actions.pod:3439
9612 "This is the same as the C<guestfs_mount> command, but it allows you to set "
9613 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
9618 #: ../src/guestfs-actions.pod:3445
9619 msgid "guestfs_mountpoints"
9623 #: ../src/guestfs-actions.pod:3447
9626 " char **guestfs_mountpoints (guestfs_h *g);\n"
9631 #: ../src/guestfs-actions.pod:3449
9633 "This call is similar to C<guestfs_mounts>. That call returns a list of "
9634 "devices. This one returns a hash table (map) of device name to directory "
9635 "where the device is mounted."
9639 #: ../src/guestfs-actions.pod:3459
9640 msgid "guestfs_mounts"
9644 #: ../src/guestfs-actions.pod:3461
9647 " char **guestfs_mounts (guestfs_h *g);\n"
9652 #: ../src/guestfs-actions.pod:3463 ../fish/guestfish-actions.pod:2682
9654 "This returns the list of currently mounted filesystems. It returns the list "
9655 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
9659 #: ../src/guestfs-actions.pod:3466 ../fish/guestfish-actions.pod:2685
9660 msgid "Some internal mounts are not shown."
9664 #: ../src/guestfs-actions.pod:3468
9665 msgid "See also: C<guestfs_mountpoints>"
9669 #: ../src/guestfs-actions.pod:3474
9674 #: ../src/guestfs-actions.pod:3476
9677 " int guestfs_mv (guestfs_h *g,\n"
9678 "\t\tconst char *src,\n"
9679 "\t\tconst char *dest);\n"
9684 #: ../src/guestfs-actions.pod:3480 ../fish/guestfish-actions.pod:2693
9686 "This moves a file from C<src> to C<dest> where C<dest> is either a "
9687 "destination filename or destination directory."
9691 #: ../src/guestfs-actions.pod:3485
9692 msgid "guestfs_ntfs_3g_probe"
9696 #: ../src/guestfs-actions.pod:3487
9699 " int guestfs_ntfs_3g_probe (guestfs_h *g,\n"
9701 "\t\tconst char *device);\n"
9706 #: ../src/guestfs-actions.pod:3491 ../fish/guestfish-actions.pod:2700
9708 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
9709 "C<device> for mountability. (Not all NTFS volumes can be mounted "
9710 "read-write, and some cannot be mounted at all)."
9714 #: ../src/guestfs-actions.pod:3495 ../fish/guestfish-actions.pod:2704
9716 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
9717 "can be mounted read-write. Set it to false if you want to test if the "
9718 "volume can be mounted read-only."
9722 #: ../src/guestfs-actions.pod:3499 ../fish/guestfish-actions.pod:2708
9724 "The return value is an integer which C<0> if the operation would succeed, or "
9725 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
9729 #: ../src/guestfs-actions.pod:3505
9730 msgid "guestfs_ntfsresize"
9734 #: ../src/guestfs-actions.pod:3507
9737 " int guestfs_ntfsresize (guestfs_h *g,\n"
9738 "\t\tconst char *device);\n"
9743 #: ../src/guestfs-actions.pod:3510 ../fish/guestfish-actions.pod:2716
9745 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
9746 "size of the underlying device. See also L<ntfsresize(8)>."
9750 #: ../src/guestfs-actions.pod:3516
9751 msgid "guestfs_ntfsresize_size"
9755 #: ../src/guestfs-actions.pod:3518
9758 " int guestfs_ntfsresize_size (guestfs_h *g,\n"
9759 "\t\tconst char *device,\n"
9760 "\t\tint64_t size);\n"
9765 #: ../src/guestfs-actions.pod:3522
9767 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
9768 "to specify the new size (in bytes) explicitly."
9772 #: ../src/guestfs-actions.pod:3527
9773 msgid "guestfs_part_add"
9777 #: ../src/guestfs-actions.pod:3529
9780 " int guestfs_part_add (guestfs_h *g,\n"
9781 "\t\tconst char *device,\n"
9782 "\t\tconst char *prlogex,\n"
9783 "\t\tint64_t startsect,\n"
9784 "\t\tint64_t endsect);\n"
9789 #: ../src/guestfs-actions.pod:3535
9791 "This command adds a partition to C<device>. If there is no partition table "
9792 "on the device, call C<guestfs_part_init> first."
9796 #: ../src/guestfs-actions.pod:3538 ../fish/guestfish-actions.pod:2734
9798 "The C<prlogex> parameter is the type of partition. Normally you should pass "
9799 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
9800 "C<logical>) and C<e> (or C<extended>) partition types."
9804 #: ../src/guestfs-actions.pod:3543 ../fish/guestfish-actions.pod:2739
9806 "C<startsect> and C<endsect> are the start and end of the partition in "
9807 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
9808 "from the end of the disk (C<-1> is the last sector)."
9812 #: ../src/guestfs-actions.pod:3547
9814 "Creating a partition which covers the whole disk is not so easy. Use "
9815 "C<guestfs_part_disk> to do that."
9819 #: ../src/guestfs-actions.pod:3552
9820 msgid "guestfs_part_del"
9824 #: ../src/guestfs-actions.pod:3554
9827 " int guestfs_part_del (guestfs_h *g,\n"
9828 "\t\tconst char *device,\n"
9829 "\t\tint partnum);\n"
9834 #: ../src/guestfs-actions.pod:3558 ../fish/guestfish-actions.pod:2750
9835 msgid "This command deletes the partition numbered C<partnum> on C<device>."
9839 #: ../src/guestfs-actions.pod:3560 ../fish/guestfish-actions.pod:2752
9841 "Note that in the case of MBR partitioning, deleting an extended partition "
9842 "also deletes any logical partitions it contains."
9846 #: ../src/guestfs-actions.pod:3566
9847 msgid "guestfs_part_disk"
9851 #: ../src/guestfs-actions.pod:3568
9854 " int guestfs_part_disk (guestfs_h *g,\n"
9855 "\t\tconst char *device,\n"
9856 "\t\tconst char *parttype);\n"
9861 #: ../src/guestfs-actions.pod:3572
9863 "This command is simply a combination of C<guestfs_part_init> followed by "
9864 "C<guestfs_part_add> to create a single primary partition covering the whole "
9869 #: ../src/guestfs-actions.pod:3576
9871 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
9872 "possible values are described in C<guestfs_part_init>."
9876 #: ../src/guestfs-actions.pod:3584
9877 msgid "guestfs_part_get_bootable"
9881 #: ../src/guestfs-actions.pod:3586
9884 " int guestfs_part_get_bootable (guestfs_h *g,\n"
9885 "\t\tconst char *device,\n"
9886 "\t\tint partnum);\n"
9891 #: ../src/guestfs-actions.pod:3590 ../fish/guestfish-actions.pod:2774
9893 "This command returns true if the partition C<partnum> on C<device> has the "
9894 "bootable flag set."
9898 #: ../src/guestfs-actions.pod:3593
9899 msgid "See also C<guestfs_part_set_bootable>."
9903 #: ../src/guestfs-actions.pod:3597
9904 msgid "guestfs_part_get_mbr_id"
9908 #: ../src/guestfs-actions.pod:3599
9911 " int guestfs_part_get_mbr_id (guestfs_h *g,\n"
9912 "\t\tconst char *device,\n"
9913 "\t\tint partnum);\n"
9918 #: ../src/guestfs-actions.pod:3603 ../fish/guestfish-actions.pod:2783
9920 "Returns the MBR type byte (also known as the ID byte) from the numbered "
9921 "partition C<partnum>."
9925 #: ../src/guestfs-actions.pod:3606 ../src/guestfs-actions.pod:3768
9927 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
9928 "undefined results for other partition table types (see "
9929 "C<guestfs_part_get_parttype>)."
9933 #: ../src/guestfs-actions.pod:3612
9934 msgid "guestfs_part_get_parttype"
9938 #: ../src/guestfs-actions.pod:3614
9941 " char *guestfs_part_get_parttype (guestfs_h *g,\n"
9942 "\t\tconst char *device);\n"
9947 #: ../src/guestfs-actions.pod:3617 ../fish/guestfish-actions.pod:2794
9949 "This command examines the partition table on C<device> and returns the "
9950 "partition table type (format) being used."
9954 #: ../src/guestfs-actions.pod:3620
9956 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
9957 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
9958 "possible, although unusual. See C<guestfs_part_init> for a full list."
9962 #: ../src/guestfs-actions.pod:3628
9963 msgid "guestfs_part_init"
9967 #: ../src/guestfs-actions.pod:3630
9970 " int guestfs_part_init (guestfs_h *g,\n"
9971 "\t\tconst char *device,\n"
9972 "\t\tconst char *parttype);\n"
9977 #: ../src/guestfs-actions.pod:3634 ../fish/guestfish-actions.pod:2806
9979 "This creates an empty partition table on C<device> of one of the partition "
9980 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
9981 "(for large disks)."
9985 #: ../src/guestfs-actions.pod:3638
9987 "Initially there are no partitions. Following this, you should call "
9988 "C<guestfs_part_add> for each partition required."
9992 #: ../src/guestfs-actions.pod:3641 ../fish/guestfish-actions.pod:2813
9993 msgid "Possible values for C<parttype> are:"
9997 #: ../src/guestfs-actions.pod:3645 ../fish/guestfish-actions.pod:2817
9998 msgid "B<efi> | B<gpt>"
10002 #: ../src/guestfs-actions.pod:3647 ../fish/guestfish-actions.pod:2819
10003 msgid "Intel EFI / GPT partition table."
10007 #: ../src/guestfs-actions.pod:3649 ../fish/guestfish-actions.pod:2821
10009 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
10010 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
10011 "the C<mbr> format."
10015 #: ../src/guestfs-actions.pod:3653 ../fish/guestfish-actions.pod:2825
10016 msgid "B<mbr> | B<msdos>"
10020 #: ../src/guestfs-actions.pod:3655 ../fish/guestfish-actions.pod:2827
10022 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
10023 "Windows. This partition type will B<only> work for device sizes up to 2 "
10024 "TB. For large disks we recommend using C<gpt>."
10028 #: ../src/guestfs-actions.pod:3662 ../fish/guestfish-actions.pod:2834
10029 msgid "Other partition table types that may work but are not supported include:"
10033 #: ../src/guestfs-actions.pod:3667 ../fish/guestfish-actions.pod:2839
10038 #: ../src/guestfs-actions.pod:3669 ../fish/guestfish-actions.pod:2841
10039 msgid "AIX disk labels."
10043 #: ../src/guestfs-actions.pod:3671 ../fish/guestfish-actions.pod:2843
10044 msgid "B<amiga> | B<rdb>"
10048 #: ../src/guestfs-actions.pod:3673 ../fish/guestfish-actions.pod:2845
10049 msgid "Amiga \"Rigid Disk Block\" format."
10053 #: ../src/guestfs-actions.pod:3675 ../fish/guestfish-actions.pod:2847
10058 #: ../src/guestfs-actions.pod:3677 ../fish/guestfish-actions.pod:2849
10059 msgid "BSD disk labels."
10063 #: ../src/guestfs-actions.pod:3679 ../fish/guestfish-actions.pod:2851
10068 #: ../src/guestfs-actions.pod:3681 ../fish/guestfish-actions.pod:2853
10069 msgid "DASD, used on IBM mainframes."
10073 #: ../src/guestfs-actions.pod:3683 ../fish/guestfish-actions.pod:2855
10078 #: ../src/guestfs-actions.pod:3685 ../fish/guestfish-actions.pod:2857
10079 msgid "MIPS/SGI volumes."
10083 #: ../src/guestfs-actions.pod:3687 ../fish/guestfish-actions.pod:2859
10088 #: ../src/guestfs-actions.pod:3689 ../fish/guestfish-actions.pod:2861
10089 msgid "Old Mac partition format. Modern Macs use C<gpt>."
10093 #: ../src/guestfs-actions.pod:3691 ../fish/guestfish-actions.pod:2863
10098 #: ../src/guestfs-actions.pod:3693 ../fish/guestfish-actions.pod:2865
10099 msgid "NEC PC-98 format, common in Japan apparently."
10103 #: ../src/guestfs-actions.pod:3695 ../fish/guestfish-actions.pod:2867
10108 #: ../src/guestfs-actions.pod:3697 ../fish/guestfish-actions.pod:2869
10109 msgid "Sun disk labels."
10113 #: ../src/guestfs-actions.pod:3703
10114 msgid "guestfs_part_list"
10118 #: ../src/guestfs-actions.pod:3705
10121 " struct guestfs_partition_list *guestfs_part_list (guestfs_h *g,\n"
10122 "\t\tconst char *device);\n"
10127 #: ../src/guestfs-actions.pod:3708 ../fish/guestfish-actions.pod:2877
10129 "This command parses the partition table on C<device> and returns the list of "
10130 "partitions found."
10134 #: ../src/guestfs-actions.pod:3711 ../fish/guestfish-actions.pod:2880
10135 msgid "The fields in the returned structure are:"
10139 #: ../src/guestfs-actions.pod:3715 ../fish/guestfish-actions.pod:2884
10140 msgid "B<part_num>"
10144 #: ../src/guestfs-actions.pod:3717 ../fish/guestfish-actions.pod:2886
10145 msgid "Partition number, counting from 1."
10149 #: ../src/guestfs-actions.pod:3719 ../fish/guestfish-actions.pod:2888
10150 msgid "B<part_start>"
10154 #: ../src/guestfs-actions.pod:3721
10156 "Start of the partition I<in bytes>. To get sectors you have to divide by "
10157 "the device's sector size, see C<guestfs_blockdev_getss>."
10161 #: ../src/guestfs-actions.pod:3724 ../fish/guestfish-actions.pod:2893
10162 msgid "B<part_end>"
10166 #: ../src/guestfs-actions.pod:3726 ../fish/guestfish-actions.pod:2895
10167 msgid "End of the partition in bytes."
10171 #: ../src/guestfs-actions.pod:3728 ../fish/guestfish-actions.pod:2897
10172 msgid "B<part_size>"
10176 #: ../src/guestfs-actions.pod:3730 ../fish/guestfish-actions.pod:2899
10177 msgid "Size of the partition in bytes."
10181 #: ../src/guestfs-actions.pod:3734
10183 "This function returns a C<struct guestfs_partition_list *> (see "
10184 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
10185 "must call C<guestfs_free_partition_list> after use>."
10189 #: ../src/guestfs-actions.pod:3739
10190 msgid "guestfs_part_set_bootable"
10194 #: ../src/guestfs-actions.pod:3741
10197 " int guestfs_part_set_bootable (guestfs_h *g,\n"
10198 "\t\tconst char *device,\n"
10199 "\t\tint partnum,\n"
10200 "\t\tint bootable);\n"
10205 #: ../src/guestfs-actions.pod:3746 ../fish/guestfish-actions.pod:2907
10207 "This sets the bootable flag on partition numbered C<partnum> on device "
10208 "C<device>. Note that partitions are numbered from 1."
10212 #: ../src/guestfs-actions.pod:3749 ../fish/guestfish-actions.pod:2910
10214 "The bootable flag is used by some operating systems (notably Windows) to "
10215 "determine which partition to boot from. It is by no means universally "
10220 #: ../src/guestfs-actions.pod:3755
10221 msgid "guestfs_part_set_mbr_id"
10225 #: ../src/guestfs-actions.pod:3757
10228 " int guestfs_part_set_mbr_id (guestfs_h *g,\n"
10229 "\t\tconst char *device,\n"
10230 "\t\tint partnum,\n"
10231 "\t\tint idbyte);\n"
10236 #: ../src/guestfs-actions.pod:3762 ../fish/guestfish-actions.pod:2918
10238 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
10239 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
10240 "documentation are in fact hexadecimal numbers, but usually documented "
10241 "without any leading \"0x\" which might be confusing."
10245 #: ../src/guestfs-actions.pod:3774
10246 msgid "guestfs_part_set_name"
10250 #: ../src/guestfs-actions.pod:3776
10253 " int guestfs_part_set_name (guestfs_h *g,\n"
10254 "\t\tconst char *device,\n"
10255 "\t\tint partnum,\n"
10256 "\t\tconst char *name);\n"
10261 #: ../src/guestfs-actions.pod:3781 ../fish/guestfish-actions.pod:2932
10263 "This sets the partition name on partition numbered C<partnum> on device "
10264 "C<device>. Note that partitions are numbered from 1."
10268 #: ../src/guestfs-actions.pod:3784 ../fish/guestfish-actions.pod:2935
10270 "The partition name can only be set on certain types of partition table. "
10271 "This works on C<gpt> but not on C<mbr> partitions."
10275 #: ../src/guestfs-actions.pod:3789
10276 msgid "guestfs_part_to_dev"
10280 #: ../src/guestfs-actions.pod:3791
10283 " char *guestfs_part_to_dev (guestfs_h *g,\n"
10284 "\t\tconst char *partition);\n"
10289 #: ../src/guestfs-actions.pod:3794 ../fish/guestfish-actions.pod:2942
10291 "This function takes a partition name (eg. \"/dev/sdb1\") and removes the "
10292 "partition number, returning the device name (eg. \"/dev/sdb\")."
10296 #: ../src/guestfs-actions.pod:3798
10298 "The named partition must exist, for example as a string returned from "
10299 "C<guestfs_list_partitions>."
10303 #: ../src/guestfs-actions.pod:3804
10304 msgid "guestfs_ping_daemon"
10308 #: ../src/guestfs-actions.pod:3806
10311 " int guestfs_ping_daemon (guestfs_h *g);\n"
10316 #: ../src/guestfs-actions.pod:3808 ../fish/guestfish-actions.pod:2953
10318 "This is a test probe into the guestfs daemon running inside the qemu "
10319 "subprocess. Calling this function checks that the daemon responds to the "
10320 "ping message, without affecting the daemon or attached block device(s) in "
10325 #: ../src/guestfs-actions.pod:3815
10326 msgid "guestfs_pread"
10330 #: ../src/guestfs-actions.pod:3817
10333 " char *guestfs_pread (guestfs_h *g,\n"
10334 "\t\tconst char *path,\n"
10336 "\t\tint64_t offset,\n"
10337 "\t\tsize_t *size_r);\n"
10342 #: ../src/guestfs-actions.pod:3823 ../fish/guestfish-actions.pod:2962
10344 "This command lets you read part of a file. It reads C<count> bytes of the "
10345 "file, starting at C<offset>, from file C<path>."
10349 #: ../src/guestfs-actions.pod:3826 ../src/guestfs-actions.pod:3849 ../fish/guestfish-actions.pod:2965 ../fish/guestfish-actions.pod:2980
10351 "This may read fewer bytes than requested. For further details see the "
10352 "L<pread(2)> system call."
10356 #: ../src/guestfs-actions.pod:3829
10357 msgid "See also C<guestfs_pwrite>, C<guestfs_pread_device>."
10361 #: ../src/guestfs-actions.pod:3838
10362 msgid "guestfs_pread_device"
10366 #: ../src/guestfs-actions.pod:3840
10369 " char *guestfs_pread_device (guestfs_h *g,\n"
10370 "\t\tconst char *device,\n"
10372 "\t\tint64_t offset,\n"
10373 "\t\tsize_t *size_r);\n"
10378 #: ../src/guestfs-actions.pod:3846 ../fish/guestfish-actions.pod:2977
10380 "This command lets you read part of a file. It reads C<count> bytes of "
10381 "C<device>, starting at C<offset>."
10385 #: ../src/guestfs-actions.pod:3852
10386 msgid "See also C<guestfs_pread>."
10390 #: ../src/guestfs-actions.pod:3861
10391 msgid "guestfs_pvcreate"
10395 #: ../src/guestfs-actions.pod:3863
10398 " int guestfs_pvcreate (guestfs_h *g,\n"
10399 "\t\tconst char *device);\n"
10404 #: ../src/guestfs-actions.pod:3866 ../fish/guestfish-actions.pod:2992
10406 "This creates an LVM physical volume on the named C<device>, where C<device> "
10407 "should usually be a partition name such as C</dev/sda1>."
10411 #: ../src/guestfs-actions.pod:3872
10412 msgid "guestfs_pvremove"
10416 #: ../src/guestfs-actions.pod:3874
10419 " int guestfs_pvremove (guestfs_h *g,\n"
10420 "\t\tconst char *device);\n"
10425 #: ../src/guestfs-actions.pod:3877 ../fish/guestfish-actions.pod:3000
10427 "This wipes a physical volume C<device> so that LVM will no longer recognise "
10432 #: ../src/guestfs-actions.pod:3880 ../fish/guestfish-actions.pod:3003
10434 "The implementation uses the C<pvremove> command which refuses to wipe "
10435 "physical volumes that contain any volume groups, so you have to remove those "
10440 #: ../src/guestfs-actions.pod:3886
10441 msgid "guestfs_pvresize"
10445 #: ../src/guestfs-actions.pod:3888
10448 " int guestfs_pvresize (guestfs_h *g,\n"
10449 "\t\tconst char *device);\n"
10454 #: ../src/guestfs-actions.pod:3891 ../fish/guestfish-actions.pod:3011
10456 "This resizes (expands or shrinks) an existing LVM physical volume to match "
10457 "the new size of the underlying device."
10461 #: ../src/guestfs-actions.pod:3896
10462 msgid "guestfs_pvresize_size"
10466 #: ../src/guestfs-actions.pod:3898
10469 " int guestfs_pvresize_size (guestfs_h *g,\n"
10470 "\t\tconst char *device,\n"
10471 "\t\tint64_t size);\n"
10476 #: ../src/guestfs-actions.pod:3902
10478 "This command is the same as C<guestfs_pvresize> except that it allows you to "
10479 "specify the new size (in bytes) explicitly."
10483 #: ../src/guestfs-actions.pod:3907
10484 msgid "guestfs_pvs"
10488 #: ../src/guestfs-actions.pod:3909
10491 " char **guestfs_pvs (guestfs_h *g);\n"
10496 #: ../src/guestfs-actions.pod:3911 ../fish/guestfish-actions.pod:3025
10498 "List all the physical volumes detected. This is the equivalent of the "
10499 "L<pvs(8)> command."
10503 #: ../src/guestfs-actions.pod:3914 ../fish/guestfish-actions.pod:3028
10505 "This returns a list of just the device names that contain PVs "
10506 "(eg. C</dev/sda2>)."
10510 #: ../src/guestfs-actions.pod:3917
10511 msgid "See also C<guestfs_pvs_full>."
10515 #: ../src/guestfs-actions.pod:3923
10516 msgid "guestfs_pvs_full"
10520 #: ../src/guestfs-actions.pod:3925
10523 " struct guestfs_lvm_pv_list *guestfs_pvs_full (guestfs_h *g);\n"
10528 #: ../src/guestfs-actions.pod:3927 ../fish/guestfish-actions.pod:3037
10530 "List all the physical volumes detected. This is the equivalent of the "
10531 "L<pvs(8)> command. The \"full\" version includes all fields."
10535 #: ../src/guestfs-actions.pod:3930
10537 "This function returns a C<struct guestfs_lvm_pv_list *> (see "
10538 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
10539 "must call C<guestfs_free_lvm_pv_list> after use>."
10543 #: ../src/guestfs-actions.pod:3935
10544 msgid "guestfs_pvuuid"
10548 #: ../src/guestfs-actions.pod:3937
10551 " char *guestfs_pvuuid (guestfs_h *g,\n"
10552 "\t\tconst char *device);\n"
10557 #: ../src/guestfs-actions.pod:3940 ../fish/guestfish-actions.pod:3044
10558 msgid "This command returns the UUID of the LVM PV C<device>."
10562 #: ../src/guestfs-actions.pod:3945
10563 msgid "guestfs_pwrite"
10567 #: ../src/guestfs-actions.pod:3947
10570 " int guestfs_pwrite (guestfs_h *g,\n"
10571 "\t\tconst char *path,\n"
10572 "\t\tconst char *content,\n"
10573 "\t\tsize_t content_size,\n"
10574 "\t\tint64_t offset);\n"
10579 #: ../src/guestfs-actions.pod:3953 ../fish/guestfish-actions.pod:3050
10581 "This command writes to part of a file. It writes the data buffer C<content> "
10582 "to the file C<path> starting at offset C<offset>."
10586 #: ../src/guestfs-actions.pod:3956 ../fish/guestfish-actions.pod:3053
10588 "This command implements the L<pwrite(2)> system call, and like that system "
10589 "call it may not write the full data requested. The return value is the "
10590 "number of bytes that were actually written to the file. This could even be "
10591 "0, although short writes are unlikely for regular files in ordinary "
10596 #: ../src/guestfs-actions.pod:3962
10597 msgid "See also C<guestfs_pread>, C<guestfs_pwrite_device>."
10601 #: ../src/guestfs-actions.pod:3969
10602 msgid "guestfs_pwrite_device"
10606 #: ../src/guestfs-actions.pod:3971
10609 " int guestfs_pwrite_device (guestfs_h *g,\n"
10610 "\t\tconst char *device,\n"
10611 "\t\tconst char *content,\n"
10612 "\t\tsize_t content_size,\n"
10613 "\t\tint64_t offset);\n"
10618 #: ../src/guestfs-actions.pod:3977 ../fish/guestfish-actions.pod:3068
10620 "This command writes to part of a device. It writes the data buffer "
10621 "C<content> to C<device> starting at offset C<offset>."
10625 #: ../src/guestfs-actions.pod:3980 ../fish/guestfish-actions.pod:3071
10627 "This command implements the L<pwrite(2)> system call, and like that system "
10628 "call it may not write the full data requested (although short writes to disk "
10629 "devices and partitions are probably impossible with standard Linux kernels)."
10633 #: ../src/guestfs-actions.pod:3985
10634 msgid "See also C<guestfs_pwrite>."
10638 #: ../src/guestfs-actions.pod:3992
10639 msgid "guestfs_read_file"
10643 #: ../src/guestfs-actions.pod:3994
10646 " char *guestfs_read_file (guestfs_h *g,\n"
10647 "\t\tconst char *path,\n"
10648 "\t\tsize_t *size_r);\n"
10653 #: ../src/guestfs-actions.pod:3998 ../fish/guestfish-actions.pod:3085
10654 msgid "This calls returns the contents of the file C<path> as a buffer."
10658 #: ../src/guestfs-actions.pod:4001
10660 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
10661 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
10662 "function is limited in the total size of file that can be handled."
10666 #: ../src/guestfs-actions.pod:4013
10667 msgid "guestfs_read_lines"
10671 #: ../src/guestfs-actions.pod:4015
10674 " char **guestfs_read_lines (guestfs_h *g,\n"
10675 "\t\tconst char *path);\n"
10680 #: ../src/guestfs-actions.pod:4020 ../fish/guestfish-actions.pod:3102
10682 "The file contents are returned as a list of lines. Trailing C<LF> and "
10683 "C<CRLF> character sequences are I<not> returned."
10687 #: ../src/guestfs-actions.pod:4023
10689 "Note that this function cannot correctly handle binary files (specifically, "
10690 "files containing C<\\0> character which is treated as end of line). For "
10691 "those you need to use the C<guestfs_read_file> function which has a more "
10692 "complex interface."
10696 #: ../src/guestfs-actions.pod:4032
10697 msgid "guestfs_readdir"
10701 #: ../src/guestfs-actions.pod:4034
10704 " struct guestfs_dirent_list *guestfs_readdir (guestfs_h *g,\n"
10705 "\t\tconst char *dir);\n"
10710 #: ../src/guestfs-actions.pod:4037 ../fish/guestfish-actions.pod:3114
10711 msgid "This returns the list of directory entries in directory C<dir>."
10715 #: ../src/guestfs-actions.pod:4039 ../fish/guestfish-actions.pod:3116
10717 "All entries in the directory are returned, including C<.> and C<..>. The "
10718 "entries are I<not> sorted, but returned in the same order as the underlying "
10723 #: ../src/guestfs-actions.pod:4043 ../fish/guestfish-actions.pod:3120
10725 "Also this call returns basic file type information about each file. The "
10726 "C<ftyp> field will contain one of the following characters:"
10730 #: ../src/guestfs-actions.pod:4048 ../fish/guestfish-actions.pod:3125
10735 #: ../src/guestfs-actions.pod:4050 ../fish/guestfish-actions.pod:3127
10736 msgid "Block special"
10740 #: ../src/guestfs-actions.pod:4052 ../fish/guestfish-actions.pod:3129
10745 #: ../src/guestfs-actions.pod:4054 ../fish/guestfish-actions.pod:3131
10746 msgid "Char special"
10750 #: ../src/guestfs-actions.pod:4056 ../fish/guestfish-actions.pod:3133
10755 #: ../src/guestfs-actions.pod:4058 ../fish/guestfish-actions.pod:3135
10760 #: ../src/guestfs-actions.pod:4060 ../fish/guestfish-actions.pod:3137
10765 #: ../src/guestfs-actions.pod:4062 ../fish/guestfish-actions.pod:3139
10766 msgid "FIFO (named pipe)"
10770 #: ../src/guestfs-actions.pod:4064 ../fish/guestfish-actions.pod:3141
10775 #: ../src/guestfs-actions.pod:4066 ../fish/guestfish-actions.pod:3143
10776 msgid "Symbolic link"
10780 #: ../src/guestfs-actions.pod:4068 ../fish/guestfish-actions.pod:3145
10785 #: ../src/guestfs-actions.pod:4070 ../fish/guestfish-actions.pod:3147
10786 msgid "Regular file"
10790 #: ../src/guestfs-actions.pod:4072 ../fish/guestfish-actions.pod:3149
10795 #: ../src/guestfs-actions.pod:4074 ../fish/guestfish-actions.pod:3151
10800 #: ../src/guestfs-actions.pod:4076 ../fish/guestfish-actions.pod:3153
10805 #: ../src/guestfs-actions.pod:4078 ../fish/guestfish-actions.pod:3155
10806 msgid "Unknown file type"
10810 #: ../src/guestfs-actions.pod:4080 ../fish/guestfish-actions.pod:3157
10815 #: ../src/guestfs-actions.pod:4082 ../fish/guestfish-actions.pod:3159
10816 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
10820 #: ../src/guestfs-actions.pod:4087
10822 "This function is primarily intended for use by programs. To get a simple "
10823 "list of names, use C<guestfs_ls>. To get a printable directory for human "
10824 "consumption, use C<guestfs_ll>."
10828 #: ../src/guestfs-actions.pod:4091
10830 "This function returns a C<struct guestfs_dirent_list *> (see "
10831 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
10832 "must call C<guestfs_free_dirent_list> after use>."
10836 #: ../src/guestfs-actions.pod:4096
10837 msgid "guestfs_readlink"
10841 #: ../src/guestfs-actions.pod:4098
10844 " char *guestfs_readlink (guestfs_h *g,\n"
10845 "\t\tconst char *path);\n"
10850 #: ../src/guestfs-actions.pod:4101 ../fish/guestfish-actions.pod:3172
10851 msgid "This command reads the target of a symbolic link."
10855 #: ../src/guestfs-actions.pod:4106
10856 msgid "guestfs_readlinklist"
10860 #: ../src/guestfs-actions.pod:4108
10863 " char **guestfs_readlinklist (guestfs_h *g,\n"
10864 "\t\tconst char *path,\n"
10865 "\t\tchar *const *names);\n"
10870 #: ../src/guestfs-actions.pod:4112 ../fish/guestfish-actions.pod:3178
10872 "This call allows you to do a C<readlink> operation on multiple files, where "
10873 "all files are in the directory C<path>. C<names> is the list of files from "
10878 #: ../src/guestfs-actions.pod:4116 ../fish/guestfish-actions.pod:3182
10880 "On return you get a list of strings, with a one-to-one correspondence to the "
10881 "C<names> list. Each string is the value of the symbolic link."
10885 #: ../src/guestfs-actions.pod:4120 ../fish/guestfish-actions.pod:3186
10887 "If the C<readlink(2)> operation fails on any name, then the corresponding "
10888 "result string is the empty string C<\"\">. However the whole operation is "
10889 "completed even if there were C<readlink(2)> errors, and so you can call this "
10890 "function with names where you don't know if they are symbolic links already "
10891 "(albeit slightly less efficient)."
10895 #: ../src/guestfs-actions.pod:4127 ../fish/guestfish-actions.pod:3193
10897 "This call is intended for programs that want to efficiently list a directory "
10898 "contents without making many round-trips. Very long directory listings "
10899 "might cause the protocol message size to be exceeded, causing this call to "
10900 "fail. The caller must split up such requests into smaller groups of names."
10904 #: ../src/guestfs-actions.pod:4138
10905 msgid "guestfs_realpath"
10909 #: ../src/guestfs-actions.pod:4140
10912 " char *guestfs_realpath (guestfs_h *g,\n"
10913 "\t\tconst char *path);\n"
10918 #: ../src/guestfs-actions.pod:4143 ../fish/guestfish-actions.pod:3204
10920 "Return the canonicalized absolute pathname of C<path>. The returned path "
10921 "has no C<.>, C<..> or symbolic link path elements."
10925 #: ../src/guestfs-actions.pod:4149
10926 msgid "guestfs_removexattr"
10930 #: ../src/guestfs-actions.pod:4151
10933 " int guestfs_removexattr (guestfs_h *g,\n"
10934 "\t\tconst char *xattr,\n"
10935 "\t\tconst char *path);\n"
10940 #: ../src/guestfs-actions.pod:4155 ../fish/guestfish-actions.pod:3211
10941 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
10945 #: ../src/guestfs-actions.pod:4158
10946 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
10950 #: ../src/guestfs-actions.pod:4162
10951 msgid "guestfs_resize2fs"
10955 #: ../src/guestfs-actions.pod:4164
10958 " int guestfs_resize2fs (guestfs_h *g,\n"
10959 "\t\tconst char *device);\n"
10964 #: ../src/guestfs-actions.pod:4167 ../fish/guestfish-actions.pod:3220
10966 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
10967 "underlying device."
10971 #: ../src/guestfs-actions.pod:4170
10973 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
10974 "C<device> before calling this command. For unknown reasons C<resize2fs> "
10975 "sometimes gives an error about this and sometimes not. In any case, it is "
10976 "always safe to call C<guestfs_e2fsck_f> before calling this function."
10980 #: ../src/guestfs-actions.pod:4178
10981 msgid "guestfs_resize2fs_size"
10985 #: ../src/guestfs-actions.pod:4180
10988 " int guestfs_resize2fs_size (guestfs_h *g,\n"
10989 "\t\tconst char *device,\n"
10990 "\t\tint64_t size);\n"
10995 #: ../src/guestfs-actions.pod:4184
10997 "This command is the same as C<guestfs_resize2fs> except that it allows you "
10998 "to specify the new size (in bytes) explicitly."
11002 #: ../src/guestfs-actions.pod:4189
11007 #: ../src/guestfs-actions.pod:4191
11010 " int guestfs_rm (guestfs_h *g,\n"
11011 "\t\tconst char *path);\n"
11016 #: ../src/guestfs-actions.pod:4194 ../fish/guestfish-actions.pod:3240
11017 msgid "Remove the single file C<path>."
11021 #: ../src/guestfs-actions.pod:4198
11022 msgid "guestfs_rm_rf"
11026 #: ../src/guestfs-actions.pod:4200
11029 " int guestfs_rm_rf (guestfs_h *g,\n"
11030 "\t\tconst char *path);\n"
11035 #: ../src/guestfs-actions.pod:4203 ../fish/guestfish-actions.pod:3246
11037 "Remove the file or directory C<path>, recursively removing the contents if "
11038 "its a directory. This is like the C<rm -rf> shell command."
11042 #: ../src/guestfs-actions.pod:4209
11043 msgid "guestfs_rmdir"
11047 #: ../src/guestfs-actions.pod:4211
11050 " int guestfs_rmdir (guestfs_h *g,\n"
11051 "\t\tconst char *path);\n"
11056 #: ../src/guestfs-actions.pod:4214 ../fish/guestfish-actions.pod:3254
11057 msgid "Remove the single directory C<path>."
11061 #: ../src/guestfs-actions.pod:4218
11062 msgid "guestfs_rmmountpoint"
11066 #: ../src/guestfs-actions.pod:4220
11069 " int guestfs_rmmountpoint (guestfs_h *g,\n"
11070 "\t\tconst char *exemptpath);\n"
11075 #: ../src/guestfs-actions.pod:4223
11077 "This calls removes a mountpoint that was previously created with "
11078 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
11082 #: ../src/guestfs-actions.pod:4229
11083 msgid "guestfs_scrub_device"
11087 #: ../src/guestfs-actions.pod:4231
11090 " int guestfs_scrub_device (guestfs_h *g,\n"
11091 "\t\tconst char *device);\n"
11096 #: ../src/guestfs-actions.pod:4234 ../fish/guestfish-actions.pod:3268
11098 "This command writes patterns over C<device> to make data retrieval more "
11103 #: ../src/guestfs-actions.pod:4237 ../src/guestfs-actions.pod:4255 ../src/guestfs-actions.pod:4271 ../fish/guestfish-actions.pod:3271 ../fish/guestfish-actions.pod:3286 ../fish/guestfish-actions.pod:3299
11105 "It is an interface to the L<scrub(1)> program. See that manual page for "
11110 #: ../src/guestfs-actions.pod:4245
11111 msgid "guestfs_scrub_file"
11115 #: ../src/guestfs-actions.pod:4247
11118 " int guestfs_scrub_file (guestfs_h *g,\n"
11119 "\t\tconst char *file);\n"
11124 #: ../src/guestfs-actions.pod:4250 ../fish/guestfish-actions.pod:3281
11126 "This command writes patterns over a file to make data retrieval more "
11131 #: ../src/guestfs-actions.pod:4253 ../fish/guestfish-actions.pod:3284
11132 msgid "The file is I<removed> after scrubbing."
11136 #: ../src/guestfs-actions.pod:4260
11137 msgid "guestfs_scrub_freespace"
11141 #: ../src/guestfs-actions.pod:4262
11144 " int guestfs_scrub_freespace (guestfs_h *g,\n"
11145 "\t\tconst char *dir);\n"
11150 #: ../src/guestfs-actions.pod:4265
11152 "This command creates the directory C<dir> and then fills it with files until "
11153 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
11154 "and deletes them. The intention is to scrub any free space on the partition "
11155 "containing C<dir>."
11159 #: ../src/guestfs-actions.pod:4276
11160 msgid "guestfs_set_append"
11164 #: ../src/guestfs-actions.pod:4278
11167 " int guestfs_set_append (guestfs_h *g,\n"
11168 "\t\tconst char *append);\n"
11173 #: ../src/guestfs-actions.pod:4281 ../fish/guestfish-actions.pod:3308
11175 "This function is used to add additional options to the guest kernel command "
11180 #: ../src/guestfs-actions.pod:4284 ../fish/guestfish-actions.pod:3311
11182 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
11183 "environment variable."
11187 #: ../src/guestfs-actions.pod:4287 ../fish/guestfish-actions.pod:3314
11189 "Setting C<append> to C<NULL> means I<no> additional options are passed "
11190 "(libguestfs always adds a few of its own)."
11194 #: ../src/guestfs-actions.pod:4292
11195 msgid "guestfs_set_autosync"
11199 #: ../src/guestfs-actions.pod:4294
11202 " int guestfs_set_autosync (guestfs_h *g,\n"
11203 "\t\tint autosync);\n"
11208 #: ../src/guestfs-actions.pod:4297
11210 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
11211 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
11212 "the handle is closed (also if the program exits without closing handles)."
11216 #: ../src/guestfs-actions.pod:4302 ../fish/guestfish-actions.pod:3328
11218 "This is disabled by default (except in guestfish where it is enabled by "
11223 #: ../src/guestfs-actions.pod:4307
11224 msgid "guestfs_set_direct"
11228 #: ../src/guestfs-actions.pod:4309
11231 " int guestfs_set_direct (guestfs_h *g,\n"
11232 "\t\tint direct);\n"
11237 #: ../src/guestfs-actions.pod:4312 ../fish/guestfish-actions.pod:3337
11239 "If the direct appliance mode flag is enabled, then stdin and stdout are "
11240 "passed directly through to the appliance once it is launched."
11244 #: ../src/guestfs-actions.pod:4316
11246 "One consequence of this is that log messages aren't caught by the library "
11247 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
11252 #: ../src/guestfs-actions.pod:4320 ../fish/guestfish-actions.pod:3345
11253 msgid "You probably don't want to use this unless you know what you are doing."
11257 #: ../src/guestfs-actions.pod:4323 ../fish/guestfish-actions.pod:3348
11258 msgid "The default is disabled."
11262 #: ../src/guestfs-actions.pod:4327
11263 msgid "guestfs_set_e2label"
11267 #: ../src/guestfs-actions.pod:4329
11270 " int guestfs_set_e2label (guestfs_h *g,\n"
11271 "\t\tconst char *device,\n"
11272 "\t\tconst char *label);\n"
11277 #: ../src/guestfs-actions.pod:4333 ../fish/guestfish-actions.pod:3354
11279 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
11280 "C<label>. Filesystem labels are limited to 16 characters."
11284 #: ../src/guestfs-actions.pod:4337
11286 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
11287 "the existing label on a filesystem."
11291 #: ../src/guestfs-actions.pod:4342
11292 msgid "guestfs_set_e2uuid"
11296 #: ../src/guestfs-actions.pod:4344
11299 " int guestfs_set_e2uuid (guestfs_h *g,\n"
11300 "\t\tconst char *device,\n"
11301 "\t\tconst char *uuid);\n"
11306 #: ../src/guestfs-actions.pod:4348 ../fish/guestfish-actions.pod:3365
11308 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
11309 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
11310 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
11314 #: ../src/guestfs-actions.pod:4353
11316 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
11317 "the existing UUID of a filesystem."
11321 #: ../src/guestfs-actions.pod:4358
11322 msgid "guestfs_set_memsize"
11326 #: ../src/guestfs-actions.pod:4360
11329 " int guestfs_set_memsize (guestfs_h *g,\n"
11330 "\t\tint memsize);\n"
11335 #: ../src/guestfs-actions.pod:4363
11337 "This sets the memory size in megabytes allocated to the qemu subprocess. "
11338 "This only has any effect if called before C<guestfs_launch>."
11342 #: ../src/guestfs-actions.pod:4367 ../fish/guestfish-actions.pod:3383
11344 "You can also change this by setting the environment variable "
11345 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
11349 #: ../src/guestfs-actions.pod:4376
11350 msgid "guestfs_set_network"
11354 #: ../src/guestfs-actions.pod:4378
11357 " int guestfs_set_network (guestfs_h *g,\n"
11358 "\t\tint network);\n"
11363 #: ../src/guestfs-actions.pod:4381 ../fish/guestfish-actions.pod:3396
11365 "If C<network> is true, then the network is enabled in the libguestfs "
11366 "appliance. The default is false."
11370 #: ../src/guestfs-actions.pod:4384 ../fish/guestfish-actions.pod:3399
11372 "This affects whether commands are able to access the network (see "
11373 "L<guestfs(3)/RUNNING COMMANDS>)."
11377 #: ../src/guestfs-actions.pod:4387
11379 "You must call this before calling C<guestfs_launch>, otherwise it has no "
11384 #: ../src/guestfs-actions.pod:4392
11385 msgid "guestfs_set_path"
11389 #: ../src/guestfs-actions.pod:4394
11392 " int guestfs_set_path (guestfs_h *g,\n"
11393 "\t\tconst char *searchpath);\n"
11398 #: ../src/guestfs-actions.pod:4397 ../fish/guestfish-actions.pod:3411
11399 msgid "Set the path that libguestfs searches for kernel and initrd.img."
11403 #: ../src/guestfs-actions.pod:4399 ../fish/guestfish-actions.pod:3413
11405 "The default is C<$libdir/guestfs> unless overridden by setting "
11406 "C<LIBGUESTFS_PATH> environment variable."
11410 #: ../src/guestfs-actions.pod:4402 ../fish/guestfish-actions.pod:3416
11411 msgid "Setting C<path> to C<NULL> restores the default path."
11415 #: ../src/guestfs-actions.pod:4406
11416 msgid "guestfs_set_qemu"
11420 #: ../src/guestfs-actions.pod:4408
11423 " int guestfs_set_qemu (guestfs_h *g,\n"
11424 "\t\tconst char *qemu);\n"
11429 #: ../src/guestfs-actions.pod:4411 ../fish/guestfish-actions.pod:3424
11430 msgid "Set the qemu binary that we will use."
11434 #: ../src/guestfs-actions.pod:4413 ../fish/guestfish-actions.pod:3426
11435 msgid "The default is chosen when the library was compiled by the configure script."
11439 #: ../src/guestfs-actions.pod:4416 ../fish/guestfish-actions.pod:3429
11441 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
11446 #: ../src/guestfs-actions.pod:4419 ../fish/guestfish-actions.pod:3432
11447 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
11451 #: ../src/guestfs-actions.pod:4421 ../fish/guestfish-actions.pod:3434
11453 "Note that you should call this function as early as possible after creating "
11454 "the handle. This is because some pre-launch operations depend on testing "
11455 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
11456 "don't retest features, and so you might see inconsistent results. Using the "
11457 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
11458 "the qemu binary at the same time as the handle is created."
11462 #: ../src/guestfs-actions.pod:4431
11463 msgid "guestfs_set_recovery_proc"
11467 #: ../src/guestfs-actions.pod:4433
11470 " int guestfs_set_recovery_proc (guestfs_h *g,\n"
11471 "\t\tint recoveryproc);\n"
11476 #: ../src/guestfs-actions.pod:4436
11478 "If this is called with the parameter C<false> then C<guestfs_launch> does "
11479 "not create a recovery process. The purpose of the recovery process is to "
11480 "stop runaway qemu processes in the case where the main program aborts "
11485 #: ../src/guestfs-actions.pod:4441
11487 "This only has any effect if called before C<guestfs_launch>, and the default "
11492 #: ../src/guestfs-actions.pod:4444 ../fish/guestfish-actions.pod:3456
11494 "About the only time when you would want to disable this is if the main "
11495 "process will fork itself into the background (\"daemonize\" itself). In "
11496 "this case the recovery process thinks that the main program has disappeared "
11497 "and so kills qemu, which is not very helpful."
11501 #: ../src/guestfs-actions.pod:4452
11502 msgid "guestfs_set_selinux"
11506 #: ../src/guestfs-actions.pod:4454
11509 " int guestfs_set_selinux (guestfs_h *g,\n"
11510 "\t\tint selinux);\n"
11515 #: ../src/guestfs-actions.pod:4457 ../fish/guestfish-actions.pod:3468
11517 "This sets the selinux flag that is passed to the appliance at boot time. "
11518 "The default is C<selinux=0> (disabled)."
11522 #: ../src/guestfs-actions.pod:4460 ../fish/guestfish-actions.pod:3471
11524 "Note that if SELinux is enabled, it is always in Permissive mode "
11525 "(C<enforcing=0>)."
11529 #: ../src/guestfs-actions.pod:4468
11530 msgid "guestfs_set_trace"
11534 #: ../src/guestfs-actions.pod:4470
11537 " int guestfs_set_trace (guestfs_h *g,\n"
11538 "\t\tint trace);\n"
11543 #: ../src/guestfs-actions.pod:4473 ../fish/guestfish-actions.pod:3483
11545 "If the command trace flag is set to 1, then commands are printed on stderr "
11546 "before they are executed in a format which is very similar to the one used "
11547 "by guestfish. In other words, you can run a program with this enabled, and "
11548 "you will get out a script which you can feed to guestfish to perform the "
11549 "same set of actions."
11553 #: ../src/guestfs-actions.pod:4480 ../fish/guestfish-actions.pod:3490
11555 "If you want to trace C API calls into libguestfs (and other libraries) then "
11556 "possibly a better way is to use the external ltrace(1) command."
11560 #: ../src/guestfs-actions.pod:4484 ../fish/guestfish-actions.pod:3494
11562 "Command traces are disabled unless the environment variable "
11563 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
11567 #: ../src/guestfs-actions.pod:4489
11568 msgid "guestfs_set_verbose"
11572 #: ../src/guestfs-actions.pod:4491
11575 " int guestfs_set_verbose (guestfs_h *g,\n"
11576 "\t\tint verbose);\n"
11581 #: ../src/guestfs-actions.pod:4494 ../fish/guestfish-actions.pod:3503
11582 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
11586 #: ../src/guestfs-actions.pod:4496 ../fish/guestfish-actions.pod:3505
11588 "Verbose messages are disabled unless the environment variable "
11589 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
11593 #: ../src/guestfs-actions.pod:4501
11594 msgid "guestfs_setcon"
11598 #: ../src/guestfs-actions.pod:4503
11601 " int guestfs_setcon (guestfs_h *g,\n"
11602 "\t\tconst char *context);\n"
11607 #: ../src/guestfs-actions.pod:4506 ../fish/guestfish-actions.pod:3512
11609 "This sets the SELinux security context of the daemon to the string "
11614 #: ../src/guestfs-actions.pod:4509 ../fish/guestfish-actions.pod:3515
11615 msgid "See the documentation about SELINUX in L<guestfs(3)>."
11619 #: ../src/guestfs-actions.pod:4513
11620 msgid "guestfs_setxattr"
11624 #: ../src/guestfs-actions.pod:4515
11627 " int guestfs_setxattr (guestfs_h *g,\n"
11628 "\t\tconst char *xattr,\n"
11629 "\t\tconst char *val,\n"
11630 "\t\tint vallen,\n"
11631 "\t\tconst char *path);\n"
11636 #: ../src/guestfs-actions.pod:4521 ../fish/guestfish-actions.pod:3521
11638 "This call sets the extended attribute named C<xattr> of the file C<path> to "
11639 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
11643 #: ../src/guestfs-actions.pod:4525
11644 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
11648 #: ../src/guestfs-actions.pod:4529
11649 msgid "guestfs_sfdisk"
11653 #: ../src/guestfs-actions.pod:4531
11656 " int guestfs_sfdisk (guestfs_h *g,\n"
11657 "\t\tconst char *device,\n"
11660 "\t\tint sectors,\n"
11661 "\t\tchar *const *lines);\n"
11666 #: ../src/guestfs-actions.pod:4538 ../fish/guestfish-actions.pod:3531
11668 "This is a direct interface to the L<sfdisk(8)> program for creating "
11669 "partitions on block devices."
11673 #: ../src/guestfs-actions.pod:4541 ../fish/guestfish-actions.pod:3534
11674 msgid "C<device> should be a block device, for example C</dev/sda>."
11678 #: ../src/guestfs-actions.pod:4543 ../fish/guestfish-actions.pod:3536
11680 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
11681 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
11682 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
11683 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
11684 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
11685 "the kernel) cannot work out the right geometry and you will need to tell it."
11689 #: ../src/guestfs-actions.pod:4551 ../fish/guestfish-actions.pod:3544
11691 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
11692 "refer to the L<sfdisk(8)> manpage."
11696 #: ../src/guestfs-actions.pod:4554 ../fish/guestfish-actions.pod:3547
11698 "To create a single partition occupying the whole disk, you would pass "
11699 "C<lines> as a single element list, when the single element being the string "
11704 #: ../src/guestfs-actions.pod:4558
11705 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
11709 #: ../src/guestfs-actions.pod:4566
11710 msgid "guestfs_sfdiskM"
11714 #: ../src/guestfs-actions.pod:4568
11717 " int guestfs_sfdiskM (guestfs_h *g,\n"
11718 "\t\tconst char *device,\n"
11719 "\t\tchar *const *lines);\n"
11724 #: ../src/guestfs-actions.pod:4572
11726 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
11727 "partition sizes are specified in megabytes only (rounded to the nearest "
11728 "cylinder) and you don't need to specify the cyls, heads and sectors "
11729 "parameters which were rarely if ever used anyway."
11733 #: ../src/guestfs-actions.pod:4578
11735 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
11736 "C<guestfs_part_disk>"
11740 #: ../src/guestfs-actions.pod:4586
11741 msgid "guestfs_sfdisk_N"
11745 #: ../src/guestfs-actions.pod:4588
11748 " int guestfs_sfdisk_N (guestfs_h *g,\n"
11749 "\t\tconst char *device,\n"
11750 "\t\tint partnum,\n"
11753 "\t\tint sectors,\n"
11754 "\t\tconst char *line);\n"
11759 #: ../src/guestfs-actions.pod:4596 ../fish/guestfish-actions.pod:3577
11761 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
11762 "(note: C<n> counts from 1)."
11766 #: ../src/guestfs-actions.pod:4599
11768 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
11769 "for the cyls/heads/sectors parameters."
11773 #: ../src/guestfs-actions.pod:4602
11774 msgid "See also: C<guestfs_part_add>"
11778 #: ../src/guestfs-actions.pod:4609
11779 msgid "guestfs_sfdisk_disk_geometry"
11783 #: ../src/guestfs-actions.pod:4611
11786 " char *guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
11787 "\t\tconst char *device);\n"
11792 #: ../src/guestfs-actions.pod:4614
11794 "This displays the disk geometry of C<device> read from the partition table. "
11795 "Especially in the case where the underlying block device has been resized, "
11796 "this can be different from the kernel's idea of the geometry (see "
11797 "C<guestfs_sfdisk_kernel_geometry>)."
11801 #: ../src/guestfs-actions.pod:4619 ../src/guestfs-actions.pod:4632 ../fish/guestfish-actions.pod:3597 ../fish/guestfish-actions.pod:3606
11802 msgid "The result is in human-readable format, and not designed to be parsed."
11806 #: ../src/guestfs-actions.pod:4625
11807 msgid "guestfs_sfdisk_kernel_geometry"
11811 #: ../src/guestfs-actions.pod:4627
11814 " char *guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
11815 "\t\tconst char *device);\n"
11820 #: ../src/guestfs-actions.pod:4630 ../fish/guestfish-actions.pod:3604
11821 msgid "This displays the kernel's idea of the geometry of C<device>."
11825 #: ../src/guestfs-actions.pod:4638
11826 msgid "guestfs_sfdisk_l"
11830 #: ../src/guestfs-actions.pod:4640
11833 " char *guestfs_sfdisk_l (guestfs_h *g,\n"
11834 "\t\tconst char *device);\n"
11839 #: ../src/guestfs-actions.pod:4643 ../fish/guestfish-actions.pod:3613
11841 "This displays the partition table on C<device>, in the human-readable output "
11842 "of the L<sfdisk(8)> command. It is not intended to be parsed."
11846 #: ../src/guestfs-actions.pod:4647
11847 msgid "See also: C<guestfs_part_list>"
11851 #: ../src/guestfs-actions.pod:4652
11856 #: ../src/guestfs-actions.pod:4654
11859 " char *guestfs_sh (guestfs_h *g,\n"
11860 "\t\tconst char *command);\n"
11865 #: ../src/guestfs-actions.pod:4657 ../fish/guestfish-actions.pod:3623
11867 "This call runs a command from the guest filesystem via the guest's "
11872 #: ../src/guestfs-actions.pod:4660
11873 msgid "This is like C<guestfs_command>, but passes the command to:"
11877 #: ../src/guestfs-actions.pod:4662 ../fish/guestfish-actions.pod:3628
11880 " /bin/sh -c \"command\"\n"
11885 #: ../src/guestfs-actions.pod:4664 ../fish/guestfish-actions.pod:3630
11887 "Depending on the guest's shell, this usually results in wildcards being "
11888 "expanded, shell expressions being interpolated and so on."
11892 #: ../src/guestfs-actions.pod:4668
11893 msgid "All the provisos about C<guestfs_command> apply to this call."
11897 #: ../src/guestfs-actions.pod:4673
11898 msgid "guestfs_sh_lines"
11902 #: ../src/guestfs-actions.pod:4675
11905 " char **guestfs_sh_lines (guestfs_h *g,\n"
11906 "\t\tconst char *command);\n"
11911 #: ../src/guestfs-actions.pod:4678
11913 "This is the same as C<guestfs_sh>, but splits the result into a list of "
11918 #: ../src/guestfs-actions.pod:4681
11919 msgid "See also: C<guestfs_command_lines>"
11923 #: ../src/guestfs-actions.pod:4687
11924 msgid "guestfs_sleep"
11928 #: ../src/guestfs-actions.pod:4689
11931 " int guestfs_sleep (guestfs_h *g,\n"
11937 #: ../src/guestfs-actions.pod:4692 ../fish/guestfish-actions.pod:3649
11938 msgid "Sleep for C<secs> seconds."
11942 #: ../src/guestfs-actions.pod:4696 ../src/guestfs-structs.pod:109
11943 msgid "guestfs_stat"
11947 #: ../src/guestfs-actions.pod:4698
11950 " struct guestfs_stat *guestfs_stat (guestfs_h *g,\n"
11951 "\t\tconst char *path);\n"
11956 #: ../src/guestfs-actions.pod:4703 ../fish/guestfish-actions.pod:3657
11957 msgid "This is the same as the C<stat(2)> system call."
11961 #: ../src/guestfs-actions.pod:4709 ../src/guestfs-structs.pod:135
11962 msgid "guestfs_statvfs"
11966 #: ../src/guestfs-actions.pod:4711
11969 " struct guestfs_statvfs *guestfs_statvfs (guestfs_h *g,\n"
11970 "\t\tconst char *path);\n"
11975 #: ../src/guestfs-actions.pod:4714 ../fish/guestfish-actions.pod:3663
11977 "Returns file system statistics for any mounted file system. C<path> should "
11978 "be a file or directory in the mounted file system (typically it is the mount "
11979 "point itself, but it doesn't need to be)."
11983 #: ../src/guestfs-actions.pod:4718 ../fish/guestfish-actions.pod:3667
11984 msgid "This is the same as the C<statvfs(2)> system call."
11988 #: ../src/guestfs-actions.pod:4720
11990 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
11991 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
11995 #: ../src/guestfs-actions.pod:4724
11996 msgid "guestfs_strings"
12000 #: ../src/guestfs-actions.pod:4726
12003 " char **guestfs_strings (guestfs_h *g,\n"
12004 "\t\tconst char *path);\n"
12009 #: ../src/guestfs-actions.pod:4729 ../fish/guestfish-actions.pod:3673
12011 "This runs the L<strings(1)> command on a file and returns the list of "
12012 "printable strings found."
12016 #: ../src/guestfs-actions.pod:4739
12017 msgid "guestfs_strings_e"
12021 #: ../src/guestfs-actions.pod:4741
12024 " char **guestfs_strings_e (guestfs_h *g,\n"
12025 "\t\tconst char *encoding,\n"
12026 "\t\tconst char *path);\n"
12031 #: ../src/guestfs-actions.pod:4745
12033 "This is like the C<guestfs_strings> command, but allows you to specify the "
12034 "encoding of strings that are looked for in the source file C<path>."
12038 #: ../src/guestfs-actions.pod:4749 ../fish/guestfish-actions.pod:3687
12039 msgid "Allowed encodings are:"
12043 #: ../src/guestfs-actions.pod:4753 ../fish/guestfish-actions.pod:3691
12048 #: ../src/guestfs-actions.pod:4755
12050 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
12051 "ISO-8859-X (this is what C<guestfs_strings> uses)."
12055 #: ../src/guestfs-actions.pod:4758 ../fish/guestfish-actions.pod:3696
12060 #: ../src/guestfs-actions.pod:4760 ../fish/guestfish-actions.pod:3698
12061 msgid "Single 8-bit-byte characters."
12065 #: ../src/guestfs-actions.pod:4762 ../fish/guestfish-actions.pod:3700
12070 #: ../src/guestfs-actions.pod:4764 ../fish/guestfish-actions.pod:3702
12071 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
12075 #: ../src/guestfs-actions.pod:4767 ../fish/guestfish-actions.pod:3705
12076 msgid "l (lower case letter L)"
12080 #: ../src/guestfs-actions.pod:4769 ../fish/guestfish-actions.pod:3707
12082 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
12083 "examining binaries in Windows guests."
12087 #: ../src/guestfs-actions.pod:4772 ../fish/guestfish-actions.pod:3710
12092 #: ../src/guestfs-actions.pod:4774 ../fish/guestfish-actions.pod:3712
12093 msgid "32-bit big endian such as UCS-4BE."
12097 #: ../src/guestfs-actions.pod:4776 ../fish/guestfish-actions.pod:3714
12102 #: ../src/guestfs-actions.pod:4778 ../fish/guestfish-actions.pod:3716
12103 msgid "32-bit little endian such as UCS-4LE."
12107 #: ../src/guestfs-actions.pod:4782 ../fish/guestfish-actions.pod:3720
12108 msgid "The returned strings are transcoded to UTF-8."
12112 #: ../src/guestfs-actions.pod:4791
12113 msgid "guestfs_swapoff_device"
12117 #: ../src/guestfs-actions.pod:4793
12120 " int guestfs_swapoff_device (guestfs_h *g,\n"
12121 "\t\tconst char *device);\n"
12126 #: ../src/guestfs-actions.pod:4796
12128 "This command disables the libguestfs appliance swap device or partition "
12129 "named C<device>. See C<guestfs_swapon_device>."
12133 #: ../src/guestfs-actions.pod:4802
12134 msgid "guestfs_swapoff_file"
12138 #: ../src/guestfs-actions.pod:4804
12141 " int guestfs_swapoff_file (guestfs_h *g,\n"
12142 "\t\tconst char *file);\n"
12147 #: ../src/guestfs-actions.pod:4807 ../fish/guestfish-actions.pod:3737
12148 msgid "This command disables the libguestfs appliance swap on file."
12152 #: ../src/guestfs-actions.pod:4811
12153 msgid "guestfs_swapoff_label"
12157 #: ../src/guestfs-actions.pod:4813
12160 " int guestfs_swapoff_label (guestfs_h *g,\n"
12161 "\t\tconst char *label);\n"
12166 #: ../src/guestfs-actions.pod:4816 ../fish/guestfish-actions.pod:3743
12168 "This command disables the libguestfs appliance swap on labeled swap "
12173 #: ../src/guestfs-actions.pod:4821
12174 msgid "guestfs_swapoff_uuid"
12178 #: ../src/guestfs-actions.pod:4823
12181 " int guestfs_swapoff_uuid (guestfs_h *g,\n"
12182 "\t\tconst char *uuid);\n"
12187 #: ../src/guestfs-actions.pod:4826 ../fish/guestfish-actions.pod:3750
12189 "This command disables the libguestfs appliance swap partition with the given "
12194 #: ../src/guestfs-actions.pod:4831
12195 msgid "guestfs_swapon_device"
12199 #: ../src/guestfs-actions.pod:4833
12202 " int guestfs_swapon_device (guestfs_h *g,\n"
12203 "\t\tconst char *device);\n"
12208 #: ../src/guestfs-actions.pod:4836
12210 "This command enables the libguestfs appliance to use the swap device or "
12211 "partition named C<device>. The increased memory is made available for all "
12212 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
12216 #: ../src/guestfs-actions.pod:4841 ../fish/guestfish-actions.pod:3762
12218 "Note that you should not swap to existing guest swap partitions unless you "
12219 "know what you are doing. They may contain hibernation information, or other "
12220 "information that the guest doesn't want you to trash. You also risk leaking "
12221 "information about the host to the guest this way. Instead, attach a new "
12222 "host device to the guest and swap on that."
12226 #: ../src/guestfs-actions.pod:4850
12227 msgid "guestfs_swapon_file"
12231 #: ../src/guestfs-actions.pod:4852
12234 " int guestfs_swapon_file (guestfs_h *g,\n"
12235 "\t\tconst char *file);\n"
12240 #: ../src/guestfs-actions.pod:4855
12242 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
12247 #: ../src/guestfs-actions.pod:4860
12248 msgid "guestfs_swapon_label"
12252 #: ../src/guestfs-actions.pod:4862
12255 " int guestfs_swapon_label (guestfs_h *g,\n"
12256 "\t\tconst char *label);\n"
12261 #: ../src/guestfs-actions.pod:4865
12263 "This command enables swap to a labeled swap partition. See "
12264 "C<guestfs_swapon_device> for other notes."
12268 #: ../src/guestfs-actions.pod:4870
12269 msgid "guestfs_swapon_uuid"
12273 #: ../src/guestfs-actions.pod:4872
12276 " int guestfs_swapon_uuid (guestfs_h *g,\n"
12277 "\t\tconst char *uuid);\n"
12282 #: ../src/guestfs-actions.pod:4875
12284 "This command enables swap to a swap partition with the given UUID. See "
12285 "C<guestfs_swapon_device> for other notes."
12289 #: ../src/guestfs-actions.pod:4880
12290 msgid "guestfs_sync"
12294 #: ../src/guestfs-actions.pod:4882
12297 " int guestfs_sync (guestfs_h *g);\n"
12302 #: ../src/guestfs-actions.pod:4884 ../fish/guestfish-actions.pod:3794
12304 "This syncs the disk, so that any writes are flushed through to the "
12305 "underlying disk image."
12309 #: ../src/guestfs-actions.pod:4887 ../fish/guestfish-actions.pod:3797
12311 "You should always call this if you have modified a disk image, before "
12312 "closing the handle."
12316 #: ../src/guestfs-actions.pod:4892
12317 msgid "guestfs_tail"
12321 #: ../src/guestfs-actions.pod:4894
12324 " char **guestfs_tail (guestfs_h *g,\n"
12325 "\t\tconst char *path);\n"
12330 #: ../src/guestfs-actions.pod:4897 ../fish/guestfish-actions.pod:3804
12331 msgid "This command returns up to the last 10 lines of a file as a list of strings."
12335 #: ../src/guestfs-actions.pod:4907
12336 msgid "guestfs_tail_n"
12340 #: ../src/guestfs-actions.pod:4909
12343 " char **guestfs_tail_n (guestfs_h *g,\n"
12344 "\t\tint nrlines,\n"
12345 "\t\tconst char *path);\n"
12350 #: ../src/guestfs-actions.pod:4913 ../fish/guestfish-actions.pod:3814
12352 "If the parameter C<nrlines> is a positive number, this returns the last "
12353 "C<nrlines> lines of the file C<path>."
12357 #: ../src/guestfs-actions.pod:4916 ../fish/guestfish-actions.pod:3817
12359 "If the parameter C<nrlines> is a negative number, this returns lines from "
12360 "the file C<path>, starting with the C<-nrlines>th line."
12364 #: ../src/guestfs-actions.pod:4928
12365 msgid "guestfs_tar_in"
12369 #: ../src/guestfs-actions.pod:4930
12372 " int guestfs_tar_in (guestfs_h *g,\n"
12373 "\t\tconst char *tarfile,\n"
12374 "\t\tconst char *directory);\n"
12379 #: ../src/guestfs-actions.pod:4934 ../fish/guestfish-actions.pod:3829
12381 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
12382 "tar file) into C<directory>."
12386 #: ../src/guestfs-actions.pod:4937
12387 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
12391 #: ../src/guestfs-actions.pod:4942
12392 msgid "guestfs_tar_out"
12396 #: ../src/guestfs-actions.pod:4944
12399 " int guestfs_tar_out (guestfs_h *g,\n"
12400 "\t\tconst char *directory,\n"
12401 "\t\tconst char *tarfile);\n"
12406 #: ../src/guestfs-actions.pod:4948 ../fish/guestfish-actions.pod:3841
12408 "This command packs the contents of C<directory> and downloads it to local "
12413 #: ../src/guestfs-actions.pod:4951
12415 "To download a compressed tarball, use C<guestfs_tgz_out> or "
12416 "C<guestfs_txz_out>."
12420 #: ../src/guestfs-actions.pod:4956
12421 msgid "guestfs_tgz_in"
12425 #: ../src/guestfs-actions.pod:4958
12428 " int guestfs_tgz_in (guestfs_h *g,\n"
12429 "\t\tconst char *tarball,\n"
12430 "\t\tconst char *directory);\n"
12435 #: ../src/guestfs-actions.pod:4962 ../fish/guestfish-actions.pod:3853
12437 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
12438 "tar file) into C<directory>."
12442 #: ../src/guestfs-actions.pod:4965
12443 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
12447 #: ../src/guestfs-actions.pod:4969
12448 msgid "guestfs_tgz_out"
12452 #: ../src/guestfs-actions.pod:4971
12455 " int guestfs_tgz_out (guestfs_h *g,\n"
12456 "\t\tconst char *directory,\n"
12457 "\t\tconst char *tarball);\n"
12462 #: ../src/guestfs-actions.pod:4975 ../fish/guestfish-actions.pod:3864
12464 "This command packs the contents of C<directory> and downloads it to local "
12469 #: ../src/guestfs-actions.pod:4978
12470 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
12474 #: ../src/guestfs-actions.pod:4982
12475 msgid "guestfs_touch"
12479 #: ../src/guestfs-actions.pod:4984
12482 " int guestfs_touch (guestfs_h *g,\n"
12483 "\t\tconst char *path);\n"
12488 #: ../src/guestfs-actions.pod:4987 ../fish/guestfish-actions.pod:3875
12490 "Touch acts like the L<touch(1)> command. It can be used to update the "
12491 "timestamps on a file, or, if the file does not exist, to create a new "
12492 "zero-length file."
12496 #: ../src/guestfs-actions.pod:4991 ../fish/guestfish-actions.pod:3879
12498 "This command only works on regular files, and will fail on other file types "
12499 "such as directories, symbolic links, block special etc."
12503 #: ../src/guestfs-actions.pod:4996
12504 msgid "guestfs_truncate"
12508 #: ../src/guestfs-actions.pod:4998
12511 " int guestfs_truncate (guestfs_h *g,\n"
12512 "\t\tconst char *path);\n"
12517 #: ../src/guestfs-actions.pod:5001 ../fish/guestfish-actions.pod:3886
12519 "This command truncates C<path> to a zero-length file. The file must exist "
12524 #: ../src/guestfs-actions.pod:5006
12525 msgid "guestfs_truncate_size"
12529 #: ../src/guestfs-actions.pod:5008
12532 " int guestfs_truncate_size (guestfs_h *g,\n"
12533 "\t\tconst char *path,\n"
12534 "\t\tint64_t size);\n"
12539 #: ../src/guestfs-actions.pod:5012 ../fish/guestfish-actions.pod:3893
12541 "This command truncates C<path> to size C<size> bytes. The file must exist "
12546 #: ../src/guestfs-actions.pod:5015
12548 "If the current file size is less than C<size> then the file is extended to "
12549 "the required size with zero bytes. This creates a sparse file (ie. disk "
12550 "blocks are not allocated for the file until you write to it). To create a "
12551 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
12555 #: ../src/guestfs-actions.pod:5023
12556 msgid "guestfs_tune2fs_l"
12560 #: ../src/guestfs-actions.pod:5025
12563 " char **guestfs_tune2fs_l (guestfs_h *g,\n"
12564 "\t\tconst char *device);\n"
12569 #: ../src/guestfs-actions.pod:5028 ../fish/guestfish-actions.pod:3906
12571 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
12576 #: ../src/guestfs-actions.pod:5031 ../fish/guestfish-actions.pod:3909
12578 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
12579 "for more details. The list of fields returned isn't clearly defined, and "
12580 "depends on both the version of C<tune2fs> that libguestfs was built against, "
12581 "and the filesystem itself."
12585 #: ../src/guestfs-actions.pod:5042
12586 msgid "guestfs_txz_in"
12590 #: ../src/guestfs-actions.pod:5044
12593 " int guestfs_txz_in (guestfs_h *g,\n"
12594 "\t\tconst char *tarball,\n"
12595 "\t\tconst char *directory);\n"
12600 #: ../src/guestfs-actions.pod:5048 ../fish/guestfish-actions.pod:3918
12602 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
12603 "tar file) into C<directory>."
12607 #: ../src/guestfs-actions.pod:5053
12608 msgid "guestfs_txz_out"
12612 #: ../src/guestfs-actions.pod:5055
12615 " int guestfs_txz_out (guestfs_h *g,\n"
12616 "\t\tconst char *directory,\n"
12617 "\t\tconst char *tarball);\n"
12622 #: ../src/guestfs-actions.pod:5059 ../fish/guestfish-actions.pod:3927
12624 "This command packs the contents of C<directory> and downloads it to local "
12625 "file C<tarball> (as an xz compressed tar archive)."
12629 #: ../src/guestfs-actions.pod:5064
12630 msgid "guestfs_umask"
12634 #: ../src/guestfs-actions.pod:5066
12637 " int guestfs_umask (guestfs_h *g,\n"
12643 #: ../src/guestfs-actions.pod:5069 ../fish/guestfish-actions.pod:3936
12645 "This function sets the mask used for creating new files and device nodes to "
12650 #: ../src/guestfs-actions.pod:5072 ../fish/guestfish-actions.pod:3939
12652 "Typical umask values would be C<022> which creates new files with "
12653 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
12654 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
12658 #: ../src/guestfs-actions.pod:5077 ../fish/guestfish-actions.pod:3944
12660 "The default umask is C<022>. This is important because it means that "
12661 "directories and device nodes will be created with C<0644> or C<0755> mode "
12662 "even if you specify C<0777>."
12666 #: ../src/guestfs-actions.pod:5081
12668 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
12669 "C<guestfs_mkdir>."
12673 #: ../src/guestfs-actions.pod:5084 ../fish/guestfish-actions.pod:3951
12674 msgid "This call returns the previous umask."
12678 #: ../src/guestfs-actions.pod:5088
12679 msgid "guestfs_umount"
12683 #: ../src/guestfs-actions.pod:5090
12686 " int guestfs_umount (guestfs_h *g,\n"
12687 "\t\tconst char *pathordevice);\n"
12692 #: ../src/guestfs-actions.pod:5093 ../fish/guestfish-actions.pod:3959
12694 "This unmounts the given filesystem. The filesystem may be specified either "
12695 "by its mountpoint (path) or the device which contains the filesystem."
12699 #: ../src/guestfs-actions.pod:5099
12700 msgid "guestfs_umount_all"
12704 #: ../src/guestfs-actions.pod:5101
12707 " int guestfs_umount_all (guestfs_h *g);\n"
12712 #: ../src/guestfs-actions.pod:5103 ../fish/guestfish-actions.pod:3969
12713 msgid "This unmounts all mounted filesystems."
12717 #: ../src/guestfs-actions.pod:5105 ../fish/guestfish-actions.pod:3971
12718 msgid "Some internal mounts are not unmounted by this call."
12722 #: ../src/guestfs-actions.pod:5109
12723 msgid "guestfs_upload"
12727 #: ../src/guestfs-actions.pod:5111
12730 " int guestfs_upload (guestfs_h *g,\n"
12731 "\t\tconst char *filename,\n"
12732 "\t\tconst char *remotefilename);\n"
12737 #: ../src/guestfs-actions.pod:5115 ../src/guestfs-actions.pod:5131 ../fish/guestfish-actions.pod:3977 ../fish/guestfish-actions.pod:3990
12738 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
12742 #: ../src/guestfs-actions.pod:5120
12743 msgid "See also C<guestfs_download>."
12747 #: ../src/guestfs-actions.pod:5124
12748 msgid "guestfs_upload_offset"
12752 #: ../src/guestfs-actions.pod:5126
12755 " int guestfs_upload_offset (guestfs_h *g,\n"
12756 "\t\tconst char *filename,\n"
12757 "\t\tconst char *remotefilename,\n"
12758 "\t\tint64_t offset);\n"
12763 #: ../src/guestfs-actions.pod:5134 ../fish/guestfish-actions.pod:3993
12765 "C<remotefilename> is overwritten starting at the byte C<offset> specified. "
12766 "The intention is to overwrite parts of existing files or devices, although "
12767 "if a non-existant file is specified then it is created with a \"hole\" "
12768 "before C<offset>. The size of the data written is implicit in the size of "
12769 "the source C<filename>."
12773 #: ../src/guestfs-actions.pod:5141
12775 "Note that there is no limit on the amount of data that can be uploaded with "
12776 "this call, unlike with C<guestfs_pwrite>, and this call always writes the "
12777 "full amount unless an error occurs."
12781 #: ../src/guestfs-actions.pod:5146
12782 msgid "See also C<guestfs_upload>, C<guestfs_pwrite>."
12786 #: ../src/guestfs-actions.pod:5150
12787 msgid "guestfs_utimens"
12791 #: ../src/guestfs-actions.pod:5152
12794 " int guestfs_utimens (guestfs_h *g,\n"
12795 "\t\tconst char *path,\n"
12796 "\t\tint64_t atsecs,\n"
12797 "\t\tint64_t atnsecs,\n"
12798 "\t\tint64_t mtsecs,\n"
12799 "\t\tint64_t mtnsecs);\n"
12804 #: ../src/guestfs-actions.pod:5159 ../fish/guestfish-actions.pod:4013
12805 msgid "This command sets the timestamps of a file with nanosecond precision."
12809 #: ../src/guestfs-actions.pod:5162 ../fish/guestfish-actions.pod:4016
12811 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
12816 #: ../src/guestfs-actions.pod:5165 ../fish/guestfish-actions.pod:4019
12818 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
12819 "nanoseconds from the epoch."
12823 #: ../src/guestfs-actions.pod:5168 ../fish/guestfish-actions.pod:4022
12825 "If the C<*nsecs> field contains the special value C<-1> then the "
12826 "corresponding timestamp is set to the current time. (The C<*secs> field is "
12827 "ignored in this case)."
12831 #: ../src/guestfs-actions.pod:5172 ../fish/guestfish-actions.pod:4026
12833 "If the C<*nsecs> field contains the special value C<-2> then the "
12834 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
12839 #: ../src/guestfs-actions.pod:5178 ../src/guestfs-structs.pod:175
12840 msgid "guestfs_version"
12844 #: ../src/guestfs-actions.pod:5180
12847 " struct guestfs_version *guestfs_version (guestfs_h *g);\n"
12852 #: ../src/guestfs-actions.pod:5182 ../fish/guestfish-actions.pod:4034
12853 msgid "Return the libguestfs version number that the program is linked against."
12857 #: ../src/guestfs-actions.pod:5185 ../fish/guestfish-actions.pod:4037
12859 "Note that because of dynamic linking this is not necessarily the version of "
12860 "libguestfs that you compiled against. You can compile the program, and then "
12861 "at runtime dynamically link against a completely different C<libguestfs.so> "
12866 #: ../src/guestfs-actions.pod:5190 ../fish/guestfish-actions.pod:4042
12868 "This call was added in version C<1.0.58>. In previous versions of "
12869 "libguestfs there was no way to get the version number. From C code you can "
12870 "use dynamic linker functions to find out if this symbol exists (if it "
12871 "doesn't, then it's an earlier version)."
12875 #: ../src/guestfs-actions.pod:5196 ../fish/guestfish-actions.pod:4048
12877 "The call returns a structure with four elements. The first three (C<major>, "
12878 "C<minor> and C<release>) are numbers and correspond to the usual version "
12879 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
12880 "but may be used for distro-specific information."
12884 #: ../src/guestfs-actions.pod:5202 ../fish/guestfish-actions.pod:4054
12885 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
12889 #: ../src/guestfs-actions.pod:5205 ../fish/guestfish-actions.pod:4057
12890 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
12894 #: ../src/guestfs-actions.pod:5207
12896 "I<Note:> Don't use this call to test for availability of features. In "
12897 "enterprise distributions we backport features from later versions into "
12898 "earlier versions, making this an unreliable way to test for features. Use "
12899 "C<guestfs_available> instead."
12903 #: ../src/guestfs-actions.pod:5213
12905 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
12906 "error. I<The caller must call C<guestfs_free_version> after use>."
12910 #: ../src/guestfs-actions.pod:5217
12911 msgid "guestfs_vfs_label"
12915 #: ../src/guestfs-actions.pod:5219
12918 " char *guestfs_vfs_label (guestfs_h *g,\n"
12919 "\t\tconst char *device);\n"
12924 #: ../src/guestfs-actions.pod:5222 ../fish/guestfish-actions.pod:4069
12925 msgid "This returns the filesystem label of the filesystem on C<device>."
12929 #: ../src/guestfs-actions.pod:5225 ../fish/guestfish-actions.pod:4072
12930 msgid "If the filesystem is unlabeled, this returns the empty string."
12934 #: ../src/guestfs-actions.pod:5227
12935 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
12939 #: ../src/guestfs-actions.pod:5232
12940 msgid "guestfs_vfs_type"
12944 #: ../src/guestfs-actions.pod:5234
12947 " char *guestfs_vfs_type (guestfs_h *g,\n"
12948 "\t\tconst char *device);\n"
12953 #: ../src/guestfs-actions.pod:5237 ../fish/guestfish-actions.pod:4080
12955 "This command gets the filesystem type corresponding to the filesystem on "
12960 #: ../src/guestfs-actions.pod:5240 ../fish/guestfish-actions.pod:4083
12962 "For most filesystems, the result is the name of the Linux VFS module which "
12963 "would be used to mount this filesystem if you mounted it without specifying "
12964 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
12968 #: ../src/guestfs-actions.pod:5248
12969 msgid "guestfs_vfs_uuid"
12973 #: ../src/guestfs-actions.pod:5250
12976 " char *guestfs_vfs_uuid (guestfs_h *g,\n"
12977 "\t\tconst char *device);\n"
12982 #: ../src/guestfs-actions.pod:5253 ../fish/guestfish-actions.pod:4092
12983 msgid "This returns the filesystem UUID of the filesystem on C<device>."
12987 #: ../src/guestfs-actions.pod:5256 ../fish/guestfish-actions.pod:4095
12988 msgid "If the filesystem does not have a UUID, this returns the empty string."
12992 #: ../src/guestfs-actions.pod:5258
12993 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
12997 #: ../src/guestfs-actions.pod:5263
12998 msgid "guestfs_vg_activate"
13002 #: ../src/guestfs-actions.pod:5265
13005 " int guestfs_vg_activate (guestfs_h *g,\n"
13006 "\t\tint activate,\n"
13007 "\t\tchar *const *volgroups);\n"
13012 #: ../src/guestfs-actions.pod:5269 ../fish/guestfish-actions.pod:4103
13014 "This command activates or (if C<activate> is false) deactivates all logical "
13015 "volumes in the listed volume groups C<volgroups>. If activated, then they "
13016 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
13017 "deactivated, then those devices disappear."
13021 #: ../src/guestfs-actions.pod:5275 ../fish/guestfish-actions.pod:4109
13022 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
13026 #: ../src/guestfs-actions.pod:5277 ../fish/guestfish-actions.pod:4111
13028 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
13029 "activated or deactivated."
13033 #: ../src/guestfs-actions.pod:5282
13034 msgid "guestfs_vg_activate_all"
13038 #: ../src/guestfs-actions.pod:5284
13041 " int guestfs_vg_activate_all (guestfs_h *g,\n"
13042 "\t\tint activate);\n"
13047 #: ../src/guestfs-actions.pod:5287 ../fish/guestfish-actions.pod:4118
13049 "This command activates or (if C<activate> is false) deactivates all logical "
13050 "volumes in all volume groups. If activated, then they are made known to the "
13051 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
13052 "those devices disappear."
13056 #: ../src/guestfs-actions.pod:5293 ../fish/guestfish-actions.pod:4124
13057 msgid "This command is the same as running C<vgchange -a y|n>"
13061 #: ../src/guestfs-actions.pod:5297
13062 msgid "guestfs_vgcreate"
13066 #: ../src/guestfs-actions.pod:5299
13069 " int guestfs_vgcreate (guestfs_h *g,\n"
13070 "\t\tconst char *volgroup,\n"
13071 "\t\tchar *const *physvols);\n"
13076 #: ../src/guestfs-actions.pod:5303 ../fish/guestfish-actions.pod:4130
13078 "This creates an LVM volume group called C<volgroup> from the non-empty list "
13079 "of physical volumes C<physvols>."
13083 #: ../src/guestfs-actions.pod:5308
13084 msgid "guestfs_vglvuuids"
13088 #: ../src/guestfs-actions.pod:5310
13091 " char **guestfs_vglvuuids (guestfs_h *g,\n"
13092 "\t\tconst char *vgname);\n"
13097 #: ../src/guestfs-actions.pod:5313 ../fish/guestfish-actions.pod:4137
13099 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
13100 "volumes created in this volume group."
13104 #: ../src/guestfs-actions.pod:5316
13106 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
13107 "associate logical volumes and volume groups."
13111 #: ../src/guestfs-actions.pod:5319
13112 msgid "See also C<guestfs_vgpvuuids>."
13116 #: ../src/guestfs-actions.pod:5325
13117 msgid "guestfs_vgpvuuids"
13121 #: ../src/guestfs-actions.pod:5327
13124 " char **guestfs_vgpvuuids (guestfs_h *g,\n"
13125 "\t\tconst char *vgname);\n"
13130 #: ../src/guestfs-actions.pod:5330 ../fish/guestfish-actions.pod:4149
13132 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
13133 "volumes that this volume group resides on."
13137 #: ../src/guestfs-actions.pod:5333
13139 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
13140 "associate physical volumes and volume groups."
13144 #: ../src/guestfs-actions.pod:5336
13145 msgid "See also C<guestfs_vglvuuids>."
13149 #: ../src/guestfs-actions.pod:5342
13150 msgid "guestfs_vgremove"
13154 #: ../src/guestfs-actions.pod:5344
13157 " int guestfs_vgremove (guestfs_h *g,\n"
13158 "\t\tconst char *vgname);\n"
13163 #: ../src/guestfs-actions.pod:5347 ../fish/guestfish-actions.pod:4161
13164 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
13168 #: ../src/guestfs-actions.pod:5349 ../fish/guestfish-actions.pod:4163
13169 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
13173 #: ../src/guestfs-actions.pod:5354
13174 msgid "guestfs_vgrename"
13178 #: ../src/guestfs-actions.pod:5356
13181 " int guestfs_vgrename (guestfs_h *g,\n"
13182 "\t\tconst char *volgroup,\n"
13183 "\t\tconst char *newvolgroup);\n"
13188 #: ../src/guestfs-actions.pod:5360 ../fish/guestfish-actions.pod:4170
13189 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
13193 #: ../src/guestfs-actions.pod:5364
13194 msgid "guestfs_vgs"
13198 #: ../src/guestfs-actions.pod:5366
13201 " char **guestfs_vgs (guestfs_h *g);\n"
13206 #: ../src/guestfs-actions.pod:5368 ../fish/guestfish-actions.pod:4176
13208 "List all the volumes groups detected. This is the equivalent of the "
13209 "L<vgs(8)> command."
13213 #: ../src/guestfs-actions.pod:5371 ../fish/guestfish-actions.pod:4179
13215 "This returns a list of just the volume group names that were detected "
13216 "(eg. C<VolGroup00>)."
13220 #: ../src/guestfs-actions.pod:5374
13221 msgid "See also C<guestfs_vgs_full>."
13225 #: ../src/guestfs-actions.pod:5380
13226 msgid "guestfs_vgs_full"
13230 #: ../src/guestfs-actions.pod:5382
13233 " struct guestfs_lvm_vg_list *guestfs_vgs_full (guestfs_h *g);\n"
13238 #: ../src/guestfs-actions.pod:5384 ../fish/guestfish-actions.pod:4188
13240 "List all the volumes groups detected. This is the equivalent of the "
13241 "L<vgs(8)> command. The \"full\" version includes all fields."
13245 #: ../src/guestfs-actions.pod:5387
13247 "This function returns a C<struct guestfs_lvm_vg_list *> (see "
13248 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
13249 "must call C<guestfs_free_lvm_vg_list> after use>."
13253 #: ../src/guestfs-actions.pod:5392
13254 msgid "guestfs_vgscan"
13258 #: ../src/guestfs-actions.pod:5394
13261 " int guestfs_vgscan (guestfs_h *g);\n"
13266 #: ../src/guestfs-actions.pod:5396 ../fish/guestfish-actions.pod:4195
13268 "This rescans all block devices and rebuilds the list of LVM physical "
13269 "volumes, volume groups and logical volumes."
13273 #: ../src/guestfs-actions.pod:5401
13274 msgid "guestfs_vguuid"
13278 #: ../src/guestfs-actions.pod:5403
13281 " char *guestfs_vguuid (guestfs_h *g,\n"
13282 "\t\tconst char *vgname);\n"
13287 #: ../src/guestfs-actions.pod:5406 ../fish/guestfish-actions.pod:4202
13288 msgid "This command returns the UUID of the LVM VG named C<vgname>."
13292 #: ../src/guestfs-actions.pod:5411
13293 msgid "guestfs_wait_ready"
13297 #: ../src/guestfs-actions.pod:5413
13300 " int guestfs_wait_ready (guestfs_h *g);\n"
13305 #: ../src/guestfs-actions.pod:5415
13306 msgid "This function is a no op."
13310 #: ../src/guestfs-actions.pod:5417
13312 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
13313 "calling C<guestfs_launch> to wait for the launch to complete. However this "
13314 "is no longer necessary because C<guestfs_launch> now does the waiting."
13318 #: ../src/guestfs-actions.pod:5422
13320 "If you see any calls to this function in code then you can just remove them, "
13321 "unless you want to retain compatibility with older versions of the API."
13325 #: ../src/guestfs-actions.pod:5428
13326 msgid "guestfs_wc_c"
13330 #: ../src/guestfs-actions.pod:5430
13333 " int guestfs_wc_c (guestfs_h *g,\n"
13334 "\t\tconst char *path);\n"
13339 #: ../src/guestfs-actions.pod:5433 ../fish/guestfish-actions.pod:4208
13341 "This command counts the characters in a file, using the C<wc -c> external "
13346 #: ../src/guestfs-actions.pod:5438
13347 msgid "guestfs_wc_l"
13351 #: ../src/guestfs-actions.pod:5440
13354 " int guestfs_wc_l (guestfs_h *g,\n"
13355 "\t\tconst char *path);\n"
13360 #: ../src/guestfs-actions.pod:5443 ../fish/guestfish-actions.pod:4215
13362 "This command counts the lines in a file, using the C<wc -l> external "
13367 #: ../src/guestfs-actions.pod:5448
13368 msgid "guestfs_wc_w"
13372 #: ../src/guestfs-actions.pod:5450
13375 " int guestfs_wc_w (guestfs_h *g,\n"
13376 "\t\tconst char *path);\n"
13381 #: ../src/guestfs-actions.pod:5453 ../fish/guestfish-actions.pod:4222
13383 "This command counts the words in a file, using the C<wc -w> external "
13388 #: ../src/guestfs-actions.pod:5458
13389 msgid "guestfs_write"
13393 #: ../src/guestfs-actions.pod:5460
13396 " int guestfs_write (guestfs_h *g,\n"
13397 "\t\tconst char *path,\n"
13398 "\t\tconst char *content,\n"
13399 "\t\tsize_t content_size);\n"
13404 #: ../src/guestfs-actions.pod:5465 ../fish/guestfish-actions.pod:4229
13406 "This call creates a file called C<path>. The content of the file is the "
13407 "string C<content> (which can contain any 8 bit data)."
13411 #: ../src/guestfs-actions.pod:5473
13412 msgid "guestfs_write_file"
13416 #: ../src/guestfs-actions.pod:5475
13419 " int guestfs_write_file (guestfs_h *g,\n"
13420 "\t\tconst char *path,\n"
13421 "\t\tconst char *content,\n"
13427 #: ../src/guestfs-actions.pod:5480 ../fish/guestfish-actions.pod:4239
13429 "This call creates a file called C<path>. The contents of the file is the "
13430 "string C<content> (which can contain any 8 bit data), with length C<size>."
13434 #: ../src/guestfs-actions.pod:5484 ../fish/guestfish-actions.pod:4243
13436 "As a special case, if C<size> is C<0> then the length is calculated using "
13437 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
13441 #: ../src/guestfs-actions.pod:5488 ../fish/guestfish-actions.pod:4247
13443 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
13444 "I<not> work, even if the length is specified."
13448 #: ../src/guestfs-actions.pod:5496 ../fish/guestfish-actions.pod:4253
13449 msgid "This function is deprecated. In new code, use the C<write> call instead."
13453 #: ../src/guestfs-actions.pod:5503
13454 msgid "guestfs_zegrep"
13458 #: ../src/guestfs-actions.pod:5505
13461 " char **guestfs_zegrep (guestfs_h *g,\n"
13462 "\t\tconst char *regex,\n"
13463 "\t\tconst char *path);\n"
13468 #: ../src/guestfs-actions.pod:5509 ../fish/guestfish-actions.pod:4264
13469 msgid "This calls the external C<zegrep> program and returns the matching lines."
13473 #: ../src/guestfs-actions.pod:5519
13474 msgid "guestfs_zegrepi"
13478 #: ../src/guestfs-actions.pod:5521
13481 " char **guestfs_zegrepi (guestfs_h *g,\n"
13482 "\t\tconst char *regex,\n"
13483 "\t\tconst char *path);\n"
13488 #: ../src/guestfs-actions.pod:5525 ../fish/guestfish-actions.pod:4274
13489 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
13493 #: ../src/guestfs-actions.pod:5535
13494 msgid "guestfs_zero"
13498 #: ../src/guestfs-actions.pod:5537
13501 " int guestfs_zero (guestfs_h *g,\n"
13502 "\t\tconst char *device);\n"
13507 #: ../src/guestfs-actions.pod:5540 ../fish/guestfish-actions.pod:4284
13508 msgid "This command writes zeroes over the first few blocks of C<device>."
13512 #: ../src/guestfs-actions.pod:5542 ../fish/guestfish-actions.pod:4286
13514 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
13515 "securely wipe the device). It should be sufficient to remove any partition "
13516 "tables, filesystem superblocks and so on."
13520 #: ../src/guestfs-actions.pod:5546
13521 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
13525 #: ../src/guestfs-actions.pod:5555
13526 msgid "guestfs_zero_device"
13530 #: ../src/guestfs-actions.pod:5557
13533 " int guestfs_zero_device (guestfs_h *g,\n"
13534 "\t\tconst char *device);\n"
13539 #: ../src/guestfs-actions.pod:5560
13541 "This command writes zeroes over the entire C<device>. Compare with "
13542 "C<guestfs_zero> which just zeroes the first few blocks of a device."
13546 #: ../src/guestfs-actions.pod:5574
13547 msgid "guestfs_zerofree"
13551 #: ../src/guestfs-actions.pod:5576
13554 " int guestfs_zerofree (guestfs_h *g,\n"
13555 "\t\tconst char *device);\n"
13560 #: ../src/guestfs-actions.pod:5579 ../fish/guestfish-actions.pod:4307
13562 "This runs the I<zerofree> program on C<device>. This program claims to zero "
13563 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
13564 "possible to compress the filesystem more effectively."
13568 #: ../src/guestfs-actions.pod:5584 ../fish/guestfish-actions.pod:4312
13569 msgid "You should B<not> run this program if the filesystem is mounted."
13573 #: ../src/guestfs-actions.pod:5587 ../fish/guestfish-actions.pod:4315
13575 "It is possible that using this program can damage the filesystem or data on "
13580 #: ../src/guestfs-actions.pod:5592
13581 msgid "guestfs_zfgrep"
13585 #: ../src/guestfs-actions.pod:5594
13588 " char **guestfs_zfgrep (guestfs_h *g,\n"
13589 "\t\tconst char *pattern,\n"
13590 "\t\tconst char *path);\n"
13595 #: ../src/guestfs-actions.pod:5598 ../fish/guestfish-actions.pod:4322
13596 msgid "This calls the external C<zfgrep> program and returns the matching lines."
13600 #: ../src/guestfs-actions.pod:5608
13601 msgid "guestfs_zfgrepi"
13605 #: ../src/guestfs-actions.pod:5610
13608 " char **guestfs_zfgrepi (guestfs_h *g,\n"
13609 "\t\tconst char *pattern,\n"
13610 "\t\tconst char *path);\n"
13615 #: ../src/guestfs-actions.pod:5614 ../fish/guestfish-actions.pod:4332
13616 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
13620 #: ../src/guestfs-actions.pod:5624
13621 msgid "guestfs_zfile"
13625 #: ../src/guestfs-actions.pod:5626
13628 " char *guestfs_zfile (guestfs_h *g,\n"
13629 "\t\tconst char *meth,\n"
13630 "\t\tconst char *path);\n"
13635 #: ../src/guestfs-actions.pod:5630 ../fish/guestfish-actions.pod:4342
13636 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
13640 #: ../src/guestfs-actions.pod:5633 ../fish/guestfish-actions.pod:4345
13641 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
13645 #: ../src/guestfs-actions.pod:5635
13647 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
13652 #: ../src/guestfs-actions.pod:5641 ../fish/guestfish-actions.pod:4350
13653 msgid "This function is deprecated. In new code, use the C<file> call instead."
13657 #: ../src/guestfs-actions.pod:5648
13658 msgid "guestfs_zgrep"
13662 #: ../src/guestfs-actions.pod:5650
13665 " char **guestfs_zgrep (guestfs_h *g,\n"
13666 "\t\tconst char *regex,\n"
13667 "\t\tconst char *path);\n"
13672 #: ../src/guestfs-actions.pod:5654 ../fish/guestfish-actions.pod:4361
13673 msgid "This calls the external C<zgrep> program and returns the matching lines."
13677 #: ../src/guestfs-actions.pod:5664
13678 msgid "guestfs_zgrepi"
13682 #: ../src/guestfs-actions.pod:5666
13685 " char **guestfs_zgrepi (guestfs_h *g,\n"
13686 "\t\tconst char *regex,\n"
13687 "\t\tconst char *path);\n"
13692 #: ../src/guestfs-actions.pod:5670 ../fish/guestfish-actions.pod:4371
13693 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
13697 #: ../src/guestfs-availability.pod:3
13702 #: ../src/guestfs-availability.pod:5
13704 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
13705 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
13706 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
13707 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
13708 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
13712 #: ../src/guestfs-availability.pod:21
13717 #: ../src/guestfs-availability.pod:23
13719 "The following functions: L</guestfs_inotify_add_watch> "
13720 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
13721 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
13725 #: ../src/guestfs-availability.pod:31
13726 msgid "B<linuxfsuuid>"
13730 #: ../src/guestfs-availability.pod:33
13732 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
13733 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
13737 #: ../src/guestfs-availability.pod:40
13738 msgid "B<linuxmodules>"
13742 #: ../src/guestfs-availability.pod:42
13743 msgid "The following functions: L</guestfs_modprobe>"
13747 #: ../src/guestfs-availability.pod:45
13748 msgid "B<linuxxattrs>"
13752 #: ../src/guestfs-availability.pod:47
13754 "The following functions: L</guestfs_getxattrs> L</guestfs_lgetxattrs> "
13755 "L</guestfs_lremovexattr> L</guestfs_lsetxattr> L</guestfs_lxattrlist> "
13756 "L</guestfs_removexattr> L</guestfs_setxattr>"
13760 #: ../src/guestfs-availability.pod:56
13765 #: ../src/guestfs-availability.pod:58
13767 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
13768 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
13769 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
13773 #: ../src/guestfs-availability.pod:67
13778 #: ../src/guestfs-availability.pod:69
13780 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
13781 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
13782 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
13783 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
13784 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
13785 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
13786 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
13787 "L</guestfs_vgs_full>"
13791 #: ../src/guestfs-availability.pod:92
13796 #: ../src/guestfs-availability.pod:94
13798 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
13799 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
13803 #: ../src/guestfs-availability.pod:100
13808 #: ../src/guestfs-availability.pod:102
13809 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
13813 #: ../src/guestfs-availability.pod:105
13814 msgid "B<ntfsprogs>"
13818 #: ../src/guestfs-availability.pod:107
13819 msgid "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
13823 #: ../src/guestfs-availability.pod:111
13824 msgid "B<realpath>"
13828 #: ../src/guestfs-availability.pod:113
13829 msgid "The following functions: L</guestfs_realpath>"
13833 #: ../src/guestfs-availability.pod:116
13838 #: ../src/guestfs-availability.pod:118
13840 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
13841 "L</guestfs_scrub_freespace>"
13845 #: ../src/guestfs-availability.pod:123
13850 #: ../src/guestfs-availability.pod:125
13851 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
13855 #: ../src/guestfs-availability.pod:129
13860 #: ../src/guestfs-availability.pod:131
13861 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
13865 #: ../src/guestfs-availability.pod:135
13866 msgid "B<zerofree>"
13870 #: ../src/guestfs-availability.pod:137
13871 msgid "The following functions: L</guestfs_zerofree>"
13875 #: ../src/guestfs-structs.pod:1
13876 msgid "guestfs_int_bool"
13880 #: ../src/guestfs-structs.pod:3
13883 " struct guestfs_int_bool {\n"
13891 #: ../src/guestfs-structs.pod:8
13894 " struct guestfs_int_bool_list {\n"
13895 " uint32_t len; /* Number of elements in list. */\n"
13896 " struct guestfs_int_bool *val; /* Elements. */\n"
13902 #: ../src/guestfs-structs.pod:13
13905 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
13906 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
13911 #: ../src/guestfs-structs.pod:16
13912 msgid "guestfs_lvm_pv"
13916 #: ../src/guestfs-structs.pod:18
13919 " struct guestfs_lvm_pv {\n"
13920 " char *pv_name;\n"
13921 " /* The next field is NOT nul-terminated, be careful when printing it: "
13923 " char pv_uuid[32];\n"
13925 " uint64_t pv_size;\n"
13926 " uint64_t dev_size;\n"
13927 " uint64_t pv_free;\n"
13928 " uint64_t pv_used;\n"
13929 " char *pv_attr;\n"
13930 " int64_t pv_pe_count;\n"
13931 " int64_t pv_pe_alloc_count;\n"
13932 " char *pv_tags;\n"
13933 " uint64_t pe_start;\n"
13934 " int64_t pv_mda_count;\n"
13935 " uint64_t pv_mda_free;\n"
13941 #: ../src/guestfs-structs.pod:36
13944 " struct guestfs_lvm_pv_list {\n"
13945 " uint32_t len; /* Number of elements in list. */\n"
13946 " struct guestfs_lvm_pv *val; /* Elements. */\n"
13952 #: ../src/guestfs-structs.pod:41
13955 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
13956 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
13961 #: ../src/guestfs-structs.pod:44
13962 msgid "guestfs_lvm_vg"
13966 #: ../src/guestfs-structs.pod:46
13969 " struct guestfs_lvm_vg {\n"
13970 " char *vg_name;\n"
13971 " /* The next field is NOT nul-terminated, be careful when printing it: "
13973 " char vg_uuid[32];\n"
13975 " char *vg_attr;\n"
13976 " uint64_t vg_size;\n"
13977 " uint64_t vg_free;\n"
13978 " char *vg_sysid;\n"
13979 " uint64_t vg_extent_size;\n"
13980 " int64_t vg_extent_count;\n"
13981 " int64_t vg_free_count;\n"
13982 " int64_t max_lv;\n"
13983 " int64_t max_pv;\n"
13984 " int64_t pv_count;\n"
13985 " int64_t lv_count;\n"
13986 " int64_t snap_count;\n"
13987 " int64_t vg_seqno;\n"
13988 " char *vg_tags;\n"
13989 " int64_t vg_mda_count;\n"
13990 " uint64_t vg_mda_free;\n"
13996 #: ../src/guestfs-structs.pod:69
13999 " struct guestfs_lvm_vg_list {\n"
14000 " uint32_t len; /* Number of elements in list. */\n"
14001 " struct guestfs_lvm_vg *val; /* Elements. */\n"
14007 #: ../src/guestfs-structs.pod:74
14010 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
14011 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
14016 #: ../src/guestfs-structs.pod:77
14017 msgid "guestfs_lvm_lv"
14021 #: ../src/guestfs-structs.pod:79
14024 " struct guestfs_lvm_lv {\n"
14025 " char *lv_name;\n"
14026 " /* The next field is NOT nul-terminated, be careful when printing it: "
14028 " char lv_uuid[32];\n"
14029 " char *lv_attr;\n"
14030 " int64_t lv_major;\n"
14031 " int64_t lv_minor;\n"
14032 " int64_t lv_kernel_major;\n"
14033 " int64_t lv_kernel_minor;\n"
14034 " uint64_t lv_size;\n"
14035 " int64_t seg_count;\n"
14037 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
14038 " float snap_percent;\n"
14039 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
14040 " float copy_percent;\n"
14041 " char *move_pv;\n"
14042 " char *lv_tags;\n"
14043 " char *mirror_log;\n"
14044 " char *modules;\n"
14050 #: ../src/guestfs-structs.pod:101
14053 " struct guestfs_lvm_lv_list {\n"
14054 " uint32_t len; /* Number of elements in list. */\n"
14055 " struct guestfs_lvm_lv *val; /* Elements. */\n"
14061 #: ../src/guestfs-structs.pod:106
14064 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
14065 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
14070 #: ../src/guestfs-structs.pod:111
14073 " struct guestfs_stat {\n"
14077 " int64_t nlink;\n"
14082 " int64_t blksize;\n"
14083 " int64_t blocks;\n"
14084 " int64_t atime;\n"
14085 " int64_t mtime;\n"
14086 " int64_t ctime;\n"
14092 #: ../src/guestfs-structs.pod:127
14095 " struct guestfs_stat_list {\n"
14096 " uint32_t len; /* Number of elements in list. */\n"
14097 " struct guestfs_stat *val; /* Elements. */\n"
14103 #: ../src/guestfs-structs.pod:132
14106 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
14107 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
14112 #: ../src/guestfs-structs.pod:137
14115 " struct guestfs_statvfs {\n"
14116 " int64_t bsize;\n"
14117 " int64_t frsize;\n"
14118 " int64_t blocks;\n"
14119 " int64_t bfree;\n"
14120 " int64_t bavail;\n"
14121 " int64_t files;\n"
14122 " int64_t ffree;\n"
14123 " int64_t favail;\n"
14126 " int64_t namemax;\n"
14132 #: ../src/guestfs-structs.pod:151
14135 " struct guestfs_statvfs_list {\n"
14136 " uint32_t len; /* Number of elements in list. */\n"
14137 " struct guestfs_statvfs *val; /* Elements. */\n"
14143 #: ../src/guestfs-structs.pod:156
14146 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
14147 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
14152 #: ../src/guestfs-structs.pod:159
14153 msgid "guestfs_dirent"
14157 #: ../src/guestfs-structs.pod:161
14160 " struct guestfs_dirent {\n"
14169 #: ../src/guestfs-structs.pod:167
14172 " struct guestfs_dirent_list {\n"
14173 " uint32_t len; /* Number of elements in list. */\n"
14174 " struct guestfs_dirent *val; /* Elements. */\n"
14180 #: ../src/guestfs-structs.pod:172
14183 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
14184 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
14189 #: ../src/guestfs-structs.pod:177
14192 " struct guestfs_version {\n"
14193 " int64_t major;\n"
14194 " int64_t minor;\n"
14195 " int64_t release;\n"
14202 #: ../src/guestfs-structs.pod:184
14205 " struct guestfs_version_list {\n"
14206 " uint32_t len; /* Number of elements in list. */\n"
14207 " struct guestfs_version *val; /* Elements. */\n"
14213 #: ../src/guestfs-structs.pod:189
14216 " void guestfs_free_version (struct guestfs_free_version *);\n"
14217 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
14222 #: ../src/guestfs-structs.pod:192
14223 msgid "guestfs_xattr"
14227 #: ../src/guestfs-structs.pod:194
14230 " struct guestfs_xattr {\n"
14231 " char *attrname;\n"
14232 " /* The next two fields describe a byte array. */\n"
14233 " uint32_t attrval_len;\n"
14234 " char *attrval;\n"
14240 #: ../src/guestfs-structs.pod:201
14243 " struct guestfs_xattr_list {\n"
14244 " uint32_t len; /* Number of elements in list. */\n"
14245 " struct guestfs_xattr *val; /* Elements. */\n"
14251 #: ../src/guestfs-structs.pod:206
14254 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
14255 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
14260 #: ../src/guestfs-structs.pod:209
14261 msgid "guestfs_inotify_event"
14265 #: ../src/guestfs-structs.pod:211
14268 " struct guestfs_inotify_event {\n"
14269 " int64_t in_wd;\n"
14270 " uint32_t in_mask;\n"
14271 " uint32_t in_cookie;\n"
14272 " char *in_name;\n"
14278 #: ../src/guestfs-structs.pod:218
14281 " struct guestfs_inotify_event_list {\n"
14282 " uint32_t len; /* Number of elements in list. */\n"
14283 " struct guestfs_inotify_event *val; /* Elements. */\n"
14289 #: ../src/guestfs-structs.pod:223
14292 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
14293 " void guestfs_free_inotify_event_list (struct "
14294 "guestfs_free_inotify_event_list *);\n"
14299 #: ../src/guestfs-structs.pod:226
14300 msgid "guestfs_partition"
14304 #: ../src/guestfs-structs.pod:228
14307 " struct guestfs_partition {\n"
14308 " int32_t part_num;\n"
14309 " uint64_t part_start;\n"
14310 " uint64_t part_end;\n"
14311 " uint64_t part_size;\n"
14317 #: ../src/guestfs-structs.pod:235
14320 " struct guestfs_partition_list {\n"
14321 " uint32_t len; /* Number of elements in list. */\n"
14322 " struct guestfs_partition *val; /* Elements. */\n"
14328 #: ../src/guestfs-structs.pod:240
14331 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
14332 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
14337 #: ../fish/guestfish.pod:5
14338 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
14342 #: ../fish/guestfish.pod:9
14345 " guestfish [--options] [commands]\n"
14350 #: ../fish/guestfish.pod:11
14358 #: ../fish/guestfish.pod:13
14361 " guestfish -a disk.img\n"
14366 #: ../fish/guestfish.pod:15
14369 " guestfish -a disk.img -m dev[:mountpoint]\n"
14374 #: ../fish/guestfish.pod:17
14377 " guestfish -d libvirt-domain\n"
14382 #: ../fish/guestfish.pod:19
14385 " guestfish -a disk.img -i\n"
14390 #: ../fish/guestfish.pod:21
14393 " guestfish -d libvirt-domain -i\n"
14398 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:11 ../tools/virt-edit.pl:45 ../tools/virt-win-reg.pl:52 ../tools/virt-tar.pl:60 ../tools/virt-rescue.pl:41
14403 #: ../fish/guestfish.pod:25
14405 "Using guestfish in read/write mode on live virtual machines can be "
14406 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
14407 "option to use guestfish safely if the disk image or virtual machine might be "
14412 #: ../fish/guestfish.pod:32
14414 "Guestfish is a shell and command-line tool for examining and modifying "
14415 "virtual machine filesystems. It uses libguestfs and exposes all of the "
14416 "functionality of the guestfs API, see L<guestfs(3)>."
14420 #: ../fish/guestfish.pod:36
14422 "Guestfish gives you structured access to the libguestfs API, from shell "
14423 "scripts or the command line or interactively. If you want to rescue a "
14424 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
14429 #: ../fish/guestfish.pod:41 ../fish/guestfish.pod:759 ../fuse/guestmount.pod:35 ../tools/virt-edit.pl:59 ../tools/virt-resize.pl:66 ../tools/virt-cat.pl:51 ../tools/virt-tar.pl:46
14434 #: ../fish/guestfish.pod:43
14435 msgid "As an interactive shell"
14439 #: ../fish/guestfish.pod:45
14447 #: ../fish/guestfish.pod:47
14450 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
14451 " editing virtual machine filesystems.\n"
14456 #: ../fish/guestfish.pod:50
14459 " Type: 'help' for a list of commands\n"
14460 " 'man' to read the manual\n"
14461 " 'quit' to quit the shell\n"
14466 #: ../fish/guestfish.pod:54
14469 " ><fs> add-ro disk.img\n"
14471 " ><fs> list-filesystems\n"
14472 " /dev/sda1: ext4\n"
14473 " /dev/vg_guest/lv_root: ext4\n"
14474 " /dev/vg_guest/lv_swap: swap\n"
14475 " ><fs> mount /dev/vg_guest/lv_root /\n"
14476 " ><fs> cat /etc/fstab\n"
14478 " # Created by anaconda\n"
14485 #: ../fish/guestfish.pod:67
14486 msgid "From shell scripts"
14490 #: ../fish/guestfish.pod:69
14491 msgid "Create a new C</etc/motd> file in a guest or disk image:"
14495 #: ../fish/guestfish.pod:71
14498 " guestfish <<_EOF_\n"
14501 " mount /dev/vg_guest/lv_root /\n"
14502 " write /etc/motd \"Welcome, new users\"\n"
14508 #: ../fish/guestfish.pod:78
14509 msgid "List the LVM logical volumes in a disk image:"
14513 #: ../fish/guestfish.pod:80
14516 " guestfish -a disk.img --ro <<_EOF_\n"
14524 #: ../fish/guestfish.pod:85
14525 msgid "List all the filesystems in a disk image:"
14529 #: ../fish/guestfish.pod:87
14532 " guestfish -a disk.img --ro <<_EOF_\n"
14534 " list-filesystems\n"
14540 #: ../fish/guestfish.pod:92
14541 msgid "On one command line"
14545 #: ../fish/guestfish.pod:94
14546 msgid "Update C</etc/resolv.conf> in a guest:"
14550 #: ../fish/guestfish.pod:96
14554 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
14555 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
14560 #: ../fish/guestfish.pod:100
14561 msgid "Edit C</boot/grub/grub.conf> interactively:"
14565 #: ../fish/guestfish.pod:102
14568 " guestfish --add disk.img \\\n"
14569 " --mount /dev/vg_guest/lv_root \\\n"
14570 " --mount /dev/sda1:/boot \\\n"
14571 " edit /boot/grub/grub.conf\n"
14576 #: ../fish/guestfish.pod:107
14577 msgid "Mount disks automatically"
14581 #: ../fish/guestfish.pod:109
14583 "Use the I<-i> option to automatically mount the disks from a virtual "
14588 #: ../fish/guestfish.pod:112
14591 " guestfish --ro -a disk.img -i cat /etc/group\n"
14596 #: ../fish/guestfish.pod:114
14599 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
14604 #: ../fish/guestfish.pod:116
14605 msgid "Another way to edit C</boot/grub/grub.conf> interactively is:"
14609 #: ../fish/guestfish.pod:118
14612 " guestfish -a disk.img -i edit /boot/grub/grub.conf\n"
14617 #: ../fish/guestfish.pod:120
14618 msgid "As a script interpreter"
14622 #: ../fish/guestfish.pod:122
14623 msgid "Create a 100MB disk containing an ext2-formatted partition:"
14627 #: ../fish/guestfish.pod:124
14630 " #!/usr/bin/guestfish -f\n"
14631 " sparse test1.img 100M\n"
14633 " part-disk /dev/sda mbr\n"
14634 " mkfs ext2 /dev/sda1\n"
14639 #: ../fish/guestfish.pod:130
14640 msgid "Start with a prepared disk"
14644 #: ../fish/guestfish.pod:132
14646 "An alternate way to create a 100MB disk called C<test1.img> containing a "
14647 "single ext2-formatted partition:"
14651 #: ../fish/guestfish.pod:135
14654 " guestfish -N fs\n"
14659 #: ../fish/guestfish.pod:137
14660 msgid "To list what is available do:"
14664 #: ../fish/guestfish.pod:139 ../fish/guestfish.pod:750
14667 " guestfish -N help | less\n"
14672 #: ../fish/guestfish.pod:141
14673 msgid "Remote control"
14677 #: ../fish/guestfish.pod:143
14680 " eval `guestfish --listen`\n"
14681 " guestfish --remote add-ro disk.img\n"
14682 " guestfish --remote run\n"
14683 " guestfish --remote lvs\n"
14688 #: ../fish/guestfish.pod:148 ../test-tool/libguestfs-test-tool.pod:37 ../fuse/guestmount.pod:70 ../inspector/virt-inspector.pl:75 ../tools/virt-edit.pl:73 ../tools/virt-win-reg.pl:172 ../tools/virt-df.pl:71 ../tools/virt-ls.pl:79 ../tools/virt-resize.pl:233 ../tools/virt-list-filesystems.pl:50 ../tools/virt-cat.pl:80 ../tools/virt-tar.pl:99 ../tools/virt-rescue.pl:103 ../tools/virt-make-fs.pl:153 ../tools/virt-list-partitions.pl:51
14693 #: ../fish/guestfish.pod:152 ../fuse/guestmount.pod:94 ../inspector/virt-inspector.pl:83 ../tools/virt-edit.pl:81 ../tools/virt-win-reg.pl:180 ../tools/virt-df.pl:79 ../tools/virt-ls.pl:87 ../tools/virt-resize.pl:241 ../tools/virt-list-filesystems.pl:58 ../tools/virt-cat.pl:88 ../tools/virt-tar.pl:107 ../tools/virt-rescue.pl:111 ../tools/virt-make-fs.pl:161 ../tools/virt-list-partitions.pl:59
14698 #: ../fish/guestfish.pod:154
14699 msgid "Displays general help on options."
14703 #: ../fish/guestfish.pod:156
14704 msgid "B<-h> | B<--cmd-help>"
14708 #: ../fish/guestfish.pod:158
14709 msgid "Lists all available guestfish commands."
14713 #: ../fish/guestfish.pod:160
14714 msgid "B<-h cmd> | B<--cmd-help cmd>"
14718 #: ../fish/guestfish.pod:162
14719 msgid "Displays detailed help on a single command C<cmd>."
14723 #: ../fish/guestfish.pod:164 ../fuse/guestmount.pod:74
14724 msgid "B<-a image> | B<--add image>"
14728 #: ../fish/guestfish.pod:166
14729 msgid "Add a block device or virtual machine image to the shell."
14733 #: ../fish/guestfish.pod:168
14734 msgid "B<-c URI> | B<--connect URI>"
14738 #: ../fish/guestfish.pod:170
14740 "When used in conjunction with the I<-d> option, this specifies the libvirt "
14741 "URI to use. The default is to use the default libvirt connection."
14745 #: ../fish/guestfish.pod:174
14746 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
14750 #: ../fish/guestfish.pod:176
14752 "Add disks from the named libvirt domain. If the I<--ro> option is also "
14753 "used, then any libvirt domain can be used. However in write mode, only "
14754 "libvirt domains which are shut down can be named here."
14758 #: ../fish/guestfish.pod:180
14759 msgid "B<-D> | B<--no-dest-paths>"
14763 #: ../fish/guestfish.pod:182
14765 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
14766 "to hit the tab key to complete paths on the guest filesystem, but this "
14767 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
14768 "allow this feature to be disabled."
14772 #: ../fish/guestfish.pod:187
14773 msgid "B<--echo-keys>"
14777 #: ../fish/guestfish.pod:189
14779 "When prompting for keys and passphrases, guestfish normally turns echoing "
14780 "off so you cannot see what you are typing. If you are not worried about "
14781 "Tempest attacks and there is no one else in the room you can specify this "
14782 "flag to see what you are typing."
14786 #: ../fish/guestfish.pod:194
14787 msgid "B<-f file> | B<--file file>"
14791 #: ../fish/guestfish.pod:196
14792 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
14796 #: ../fish/guestfish.pod:199
14799 " #!/usr/bin/guestfish -f\n"
14804 #: ../fish/guestfish.pod:201
14805 msgid "B<-i> | B<--inspector>"
14809 #: ../fish/guestfish.pod:203
14811 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
14812 "system and mount filesystems as they would be mounted on the real virtual "
14817 #: ../fish/guestfish.pod:207
14818 msgid "Typical usage is either:"
14822 #: ../fish/guestfish.pod:209
14825 " guestfish -d myguest -i\n"
14830 #: ../fish/guestfish.pod:211
14831 msgid "(for an inactive libvirt domain called I<myguest>), or:"
14835 #: ../fish/guestfish.pod:213
14838 " guestfish --ro -d myguest -i\n"
14843 #: ../fish/guestfish.pod:215
14844 msgid "(for active domains, readonly), or specify the block device directly:"
14848 #: ../fish/guestfish.pod:217
14851 " guestfish -a /dev/Guests/MyGuest -i\n"
14856 #: ../fish/guestfish.pod:219
14858 "Note that the command line syntax changed slightly over older versions of "
14859 "guestfish. You can still use the old syntax:"
14863 #: ../fish/guestfish.pod:222
14866 " guestfish [--ro] -i disk.img\n"
14871 #: ../fish/guestfish.pod:224
14874 " guestfish [--ro] -i libvirt-domain\n"
14879 #: ../fish/guestfish.pod:226
14880 msgid "B<--keys-from-stdin>"
14884 #: ../fish/guestfish.pod:228
14886 "Read key or passphrase parameters from stdin. The default is to try to read "
14887 "passphrases from the user by opening C</dev/tty>."
14891 #: ../fish/guestfish.pod:231
14892 msgid "B<--listen>"
14896 #: ../fish/guestfish.pod:233
14898 "Fork into the background and listen for remote commands. See section "
14899 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
14903 #: ../fish/guestfish.pod:236
14904 msgid "B<-m dev[:mountpoint]> | B<--mount dev[:mountpoint]>"
14908 #: ../fish/guestfish.pod:238
14909 msgid "Mount the named partition or logical volume on the given mountpoint."
14913 #: ../fish/guestfish.pod:240
14914 msgid "If the mountpoint is omitted, it defaults to C</>."
14918 #: ../fish/guestfish.pod:242
14919 msgid "You have to mount something on C</> before most commands will work."
14923 #: ../fish/guestfish.pod:244
14925 "If any I<-m> or I<--mount> options are given, the guest is automatically "
14930 #: ../fish/guestfish.pod:247
14932 "If you don't know what filesystems a disk image contains, you can either run "
14933 "guestfish without this option, then list the partitions and LVs available "
14934 "(see L</list-partitions> and L</lvs> commands), or you can use the "
14935 "L<virt-list-filesystems(1)> program."
14939 #: ../fish/guestfish.pod:252 ../fuse/guestmount.pod:106
14940 msgid "B<-n> | B<--no-sync>"
14944 #: ../fish/guestfish.pod:254
14946 "Disable autosync. This is enabled by default. See the discussion of "
14947 "autosync in the L<guestfs(3)> manpage."
14951 #: ../fish/guestfish.pod:257
14952 msgid "B<-N type> | B<--new type> | B<-N help>"
14956 #: ../fish/guestfish.pod:259
14958 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
14959 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
14960 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
14965 #: ../fish/guestfish.pod:264
14966 msgid "B<--progress-bars>"
14970 #: ../fish/guestfish.pod:266
14971 msgid "Enable progress bars, even when guestfish is used non-interactively."
14975 #: ../fish/guestfish.pod:268
14977 "Progress bars are enabled by default when guestfish is used as an "
14978 "interactive shell."
14982 #: ../fish/guestfish.pod:271
14983 msgid "B<--no-progress-bars>"
14987 #: ../fish/guestfish.pod:273
14988 msgid "Disable progress bars."
14992 #: ../fish/guestfish.pod:275
14993 msgid "B<--remote[=pid]>"
14997 #: ../fish/guestfish.pod:277
14999 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
15000 "CONTROL GUESTFISH OVER A SOCKET> below."
15004 #: ../fish/guestfish.pod:280 ../fuse/guestmount.pod:148
15005 msgid "B<-r> | B<--ro>"
15009 #: ../fish/guestfish.pod:282
15011 "This changes the I<-a> and I<-m> options so that disks are added and mounts "
15012 "are done read-only (see L<guestfs(3)/guestfs_mount_ro>)."
15016 #: ../fish/guestfish.pod:285 ../tools/virt-rescue.pl:162
15018 "The option must always be used if the disk image or virtual machine might be "
15019 "running, and is generally recommended in cases where you don't need write "
15020 "access to the disk."
15024 #: ../fish/guestfish.pod:289
15026 "Note that prepared disk images created with I<-N> are not affected by the "
15031 #: ../fish/guestfish.pod:292 ../fuse/guestmount.pod:158 ../tools/virt-rescue.pl:170
15032 msgid "B<--selinux>"
15036 #: ../fish/guestfish.pod:294
15037 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
15041 #: ../fish/guestfish.pod:296 ../fuse/guestmount.pod:168
15042 msgid "B<-v> | B<--verbose>"
15046 #: ../fish/guestfish.pod:298
15048 "Enable very verbose messages. This is particularly useful if you find a "
15053 #: ../fish/guestfish.pod:301 ../fuse/guestmount.pod:172
15054 msgid "B<-V> | B<--version>"
15058 #: ../fish/guestfish.pod:303
15059 msgid "Display the guestfish / libguestfs version number and exit."
15063 #: ../fish/guestfish.pod:305
15068 #: ../fish/guestfish.pod:307
15069 msgid "Echo each command before executing it."
15073 #: ../fish/guestfish.pod:311
15074 msgid "COMMANDS ON COMMAND LINE"
15078 #: ../fish/guestfish.pod:313
15079 msgid "Any additional (non-option) arguments are treated as commands to execute."
15083 #: ../fish/guestfish.pod:316
15085 "Commands to execute should be separated by a colon (C<:>), where the colon "
15086 "is a separate parameter. Thus:"
15090 #: ../fish/guestfish.pod:319
15093 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
15098 #: ../fish/guestfish.pod:321
15100 "If there are no additional arguments, then we enter a shell, either an "
15101 "interactive shell with a prompt (if the input is a terminal) or a "
15102 "non-interactive shell."
15106 #: ../fish/guestfish.pod:325
15108 "In either command line mode or non-interactive shell, the first command that "
15109 "gives an error causes the whole shell to exit. In interactive mode (with a "
15110 "prompt) if a command fails, you can continue to enter commands."
15114 #: ../fish/guestfish.pod:330
15115 msgid "USING launch (OR run)"
15119 #: ../fish/guestfish.pod:332
15121 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
15122 "then launch it, then mount any disks you need, and finally issue "
15123 "actions/commands. So the general order of the day is:"
15127 #: ../fish/guestfish.pod:340
15128 msgid "add or -a/--add"
15132 #: ../fish/guestfish.pod:344
15133 msgid "launch (aka run)"
15137 #: ../fish/guestfish.pod:348
15138 msgid "mount or -m/--mount"
15142 #: ../fish/guestfish.pod:352
15143 msgid "any other commands"
15147 #: ../fish/guestfish.pod:356
15149 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
15150 "guest before mounting or performing any other commands."
15154 #: ../fish/guestfish.pod:359
15156 "The only exception is that if any of the I<-i>, I<-m>, I<--mount>, I<-N> or "
15157 "I<--new> options were given then C<run> is done automatically, simply "
15158 "because guestfish can't perform the action you asked for without doing this."
15162 #: ../fish/guestfish.pod:364
15167 #: ../fish/guestfish.pod:366
15169 "You can quote ordinary parameters using either single or double quotes. For "
15174 #: ../fish/guestfish.pod:369
15177 " add \"file with a space.img\"\n"
15182 #: ../fish/guestfish.pod:371
15185 " rm '/file name'\n"
15190 #: ../fish/guestfish.pod:373
15198 #: ../fish/guestfish.pod:375
15200 "A few commands require a list of strings to be passed. For these, use a "
15201 "whitespace-separated list, enclosed in quotes. Strings containing "
15202 "whitespace to be passed through must be enclosed in single quotes. A "
15203 "literal single quote must be escaped with a backslash."
15207 #: ../fish/guestfish.pod:380
15210 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
15211 " command \"/bin/echo 'foo bar'\"\n"
15212 " command \"/bin/echo \\'foo\\'\"\n"
15217 #: ../fish/guestfish.pod:384
15222 #: ../fish/guestfish.pod:386
15223 msgid "This section applies to all commands which can take integers as parameters."
15227 #: ../fish/guestfish.pod:389
15228 msgid "SIZE SUFFIX"
15232 #: ../fish/guestfish.pod:391
15234 "When the command takes a parameter measured in bytes, you can use one of the "
15235 "following suffixes to specify kilobytes, megabytes and larger sizes:"
15239 #: ../fish/guestfish.pod:397
15240 msgid "B<k> or B<K> or B<KiB>"
15244 #: ../fish/guestfish.pod:399
15245 msgid "The size in kilobytes (multiplied by 1024)."
15249 #: ../fish/guestfish.pod:401
15254 #: ../fish/guestfish.pod:403
15255 msgid "The size in SI 1000 byte units."
15259 #: ../fish/guestfish.pod:405
15260 msgid "B<M> or B<MiB>"
15264 #: ../fish/guestfish.pod:407
15265 msgid "The size in megabytes (multiplied by 1048576)."
15269 #: ../fish/guestfish.pod:409
15274 #: ../fish/guestfish.pod:411
15275 msgid "The size in SI 1000000 byte units."
15279 #: ../fish/guestfish.pod:413
15280 msgid "B<G> or B<GiB>"
15284 #: ../fish/guestfish.pod:415
15285 msgid "The size in gigabytes (multiplied by 2**30)."
15289 #: ../fish/guestfish.pod:417
15294 #: ../fish/guestfish.pod:419
15295 msgid "The size in SI 10**9 byte units."
15299 #: ../fish/guestfish.pod:421
15300 msgid "B<T> or B<TiB>"
15304 #: ../fish/guestfish.pod:423
15305 msgid "The size in terabytes (multiplied by 2**40)."
15309 #: ../fish/guestfish.pod:425
15314 #: ../fish/guestfish.pod:427
15315 msgid "The size in SI 10**12 byte units."
15319 #: ../fish/guestfish.pod:429
15320 msgid "B<P> or B<PiB>"
15324 #: ../fish/guestfish.pod:431
15325 msgid "The size in petabytes (multiplied by 2**50)."
15329 #: ../fish/guestfish.pod:433
15334 #: ../fish/guestfish.pod:435
15335 msgid "The size in SI 10**15 byte units."
15339 #: ../fish/guestfish.pod:437
15340 msgid "B<E> or B<EiB>"
15344 #: ../fish/guestfish.pod:439
15345 msgid "The size in exabytes (multiplied by 2**60)."
15349 #: ../fish/guestfish.pod:441
15354 #: ../fish/guestfish.pod:443
15355 msgid "The size in SI 10**18 byte units."
15359 #: ../fish/guestfish.pod:445
15360 msgid "B<Z> or B<ZiB>"
15364 #: ../fish/guestfish.pod:447
15365 msgid "The size in zettabytes (multiplied by 2**70)."
15369 #: ../fish/guestfish.pod:449
15374 #: ../fish/guestfish.pod:451
15375 msgid "The size in SI 10**21 byte units."
15379 #: ../fish/guestfish.pod:453
15380 msgid "B<Y> or B<YiB>"
15384 #: ../fish/guestfish.pod:455
15385 msgid "The size in yottabytes (multiplied by 2**80)."
15389 #: ../fish/guestfish.pod:457
15394 #: ../fish/guestfish.pod:459
15395 msgid "The size in SI 10**24 byte units."
15399 #: ../fish/guestfish.pod:463
15400 msgid "For example:"
15404 #: ../fish/guestfish.pod:465
15407 " truncate-size /file 1G\n"
15412 #: ../fish/guestfish.pod:467
15413 msgid "would truncate the file to 1 gigabyte."
15417 #: ../fish/guestfish.pod:469
15419 "Be careful because a few commands take sizes in kilobytes or megabytes "
15420 "(eg. the parameter to L</memsize> is specified in megabytes already). "
15421 "Adding a suffix will probably not do what you expect."
15425 #: ../fish/guestfish.pod:473
15426 msgid "OCTAL AND HEXADECIMAL NUMBERS"
15430 #: ../fish/guestfish.pod:475
15432 "For specifying the radix (base) use the C convention: C<0> to prefix an "
15433 "octal number or C<0x> to prefix a hexadecimal number. For example:"
15437 #: ../fish/guestfish.pod:478
15440 " 1234 decimal number 1234\n"
15441 " 02322 octal number, equivalent to decimal 1234\n"
15442 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
15447 #: ../fish/guestfish.pod:482
15449 "When using the C<chmod> command, you almost always want to specify an octal "
15450 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
15451 "L<chmod(1)> program):"
15455 #: ../fish/guestfish.pod:486
15458 " chmod 0777 /public # OK\n"
15459 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
15464 #: ../fish/guestfish.pod:489
15466 "Commands that return numbers usually print them in decimal, but some "
15467 "commands print numbers in other radices (eg. C<umask> prints the mode in "
15468 "octal, preceeded by C<0>)."
15472 #: ../fish/guestfish.pod:493
15473 msgid "WILDCARDS AND GLOBBING"
15477 #: ../fish/guestfish.pod:495
15479 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
15480 "(globbing) by default. So for example the following will not do what you "
15485 #: ../fish/guestfish.pod:499
15493 #: ../fish/guestfish.pod:501
15495 "Assuming you don't have a directory called literally C</home/*> then the "
15496 "above command will return an error."
15500 #: ../fish/guestfish.pod:504
15501 msgid "To perform wildcard expansion, use the C<glob> command."
15505 #: ../fish/guestfish.pod:506
15508 " glob rm-rf /home/*\n"
15513 #: ../fish/guestfish.pod:508
15515 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
15516 "many times), equivalent to:"
15520 #: ../fish/guestfish.pod:511
15523 " rm-rf /home/jim\n"
15524 " rm-rf /home/joe\n"
15525 " rm-rf /home/mary\n"
15530 #: ../fish/guestfish.pod:515
15531 msgid "C<glob> only works on simple guest paths and not on device names."
15535 #: ../fish/guestfish.pod:517
15537 "If you have several parameters, each containing a wildcard, then glob will "
15538 "perform a Cartesian product."
15542 #: ../fish/guestfish.pod:520
15547 #: ../fish/guestfish.pod:522
15549 "Any line which starts with a I<#> character is treated as a comment and "
15550 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
15551 "a command. For example:"
15555 #: ../fish/guestfish.pod:526
15558 " # this is a comment\n"
15559 " # this is a comment\n"
15560 " foo # NOT a comment\n"
15565 #: ../fish/guestfish.pod:530
15566 msgid "Blank lines are also ignored."
15570 #: ../fish/guestfish.pod:532
15571 msgid "RUNNING COMMANDS LOCALLY"
15575 #: ../fish/guestfish.pod:534
15577 "Any line which starts with a I<!> character is treated as a command sent to "
15578 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
15582 #: ../fish/guestfish.pod:538
15586 " tgz-out /remote local/remote-data.tar.gz\n"
15591 #: ../fish/guestfish.pod:541
15593 "will create a directory C<local> on the host, and then export the contents "
15594 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
15595 "(See C<tgz-out>)."
15599 #: ../fish/guestfish.pod:545
15601 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
15602 "effect, due to the way that subprocesses work in Unix."
15606 #: ../fish/guestfish.pod:548
15611 #: ../fish/guestfish.pod:550
15613 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
15614 "command (a guestfish command) to the second command (any host command). For "
15619 #: ../fish/guestfish.pod:554
15622 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
15627 #: ../fish/guestfish.pod:556
15629 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
15630 "program). The above command would list all accounts in the guest filesystem "
15631 "which have UID 0, ie. root accounts including backdoors. Other examples:"
15635 #: ../fish/guestfish.pod:561
15638 " hexdump /bin/ls | head\n"
15639 " list-devices | tail -1\n"
15640 " tgz-out / - | tar ztf -\n"
15645 #: ../fish/guestfish.pod:565
15647 "The space before the pipe symbol is required, any space after the pipe "
15648 "symbol is optional. Everything after the pipe symbol is just passed "
15649 "straight to the host shell, so it can contain redirections, globs and "
15650 "anything else that makes sense on the host side."
15654 #: ../fish/guestfish.pod:570
15656 "To use a literal argument which begins with a pipe symbol, you have to quote "
15661 #: ../fish/guestfish.pod:573
15669 #: ../fish/guestfish.pod:575
15670 msgid "HOME DIRECTORIES"
15674 #: ../fish/guestfish.pod:577
15676 "If a parameter starts with the character C<~> then the tilde may be expanded "
15677 "as a home directory path (either C<~> for the current user's home directory, "
15678 "or C<~user> for another user)."
15682 #: ../fish/guestfish.pod:581
15684 "Note that home directory expansion happens for users known I<on the host>, "
15685 "not in the guest filesystem."
15689 #: ../fish/guestfish.pod:584
15691 "To use a literal argument which begins with a tilde, you have to quote it, "
15696 #: ../fish/guestfish.pod:587
15704 #: ../fish/guestfish.pod:591
15706 "Libguestfs has some support for Linux guests encrypted according to the "
15707 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
15708 "disk encryption systems used by modern Linux guests. Currently only "
15709 "LVM-on-LUKS is supported."
15713 #: ../fish/guestfish.pod:596
15714 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
15718 #: ../fish/guestfish.pod:598
15721 " ><fs> vfs-type /dev/sda2\n"
15727 #: ../fish/guestfish.pod:601
15729 "Then open those devices using L</luks-open>. This creates a device-mapper "
15730 "device called C</dev/mapper/luksdev>."
15734 #: ../fish/guestfish.pod:604
15737 " ><fs> luks-open /dev/sda2 luksdev\n"
15738 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
15743 #: ../fish/guestfish.pod:607
15745 "Finally you have to tell LVM to scan for volume groups on the newly created "
15750 #: ../fish/guestfish.pod:610
15754 " vg-activate-all true\n"
15759 #: ../fish/guestfish.pod:613
15760 msgid "The logical volume(s) can now be mounted in the usual way."
15764 #: ../fish/guestfish.pod:615
15766 "Before closing a LUKS device you must unmount any logical volumes on it and "
15767 "deactivate the volume groups by calling C<vg-activate false VG> on each "
15768 "one. Then you can close the mapper device:"
15772 #: ../fish/guestfish.pod:619
15775 " vg-activate false /dev/VG\n"
15776 " luks-close /dev/mapper/luksdev\n"
15781 #: ../fish/guestfish.pod:622
15782 msgid "WINDOWS PATHS"
15786 #: ../fish/guestfish.pod:624
15788 "If a path is prefixed with C<win:> then you can use Windows-style paths "
15789 "(with some limitations). The following commands are equivalent:"
15793 #: ../fish/guestfish.pod:627
15796 " file /WINDOWS/system32/config/system.LOG\n"
15801 #: ../fish/guestfish.pod:629
15804 " file win:/windows/system32/config/system.log\n"
15809 #: ../fish/guestfish.pod:631
15812 " file win:\\windows\\system32\\config\\system.log\n"
15817 #: ../fish/guestfish.pod:633
15820 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
15825 #: ../fish/guestfish.pod:635
15827 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
15828 "handles case insensitivity like Windows would. This only works in argument "
15829 "positions that expect a path."
15833 #: ../fish/guestfish.pod:639
15834 msgid "UPLOADING AND DOWNLOADING FILES"
15838 #: ../fish/guestfish.pod:641
15840 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
15841 "others which upload from or download to a local file, you can use the "
15842 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
15846 #: ../fish/guestfish.pod:645
15854 #: ../fish/guestfish.pod:647
15855 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
15859 #: ../fish/guestfish.pod:650
15862 " tar-out /etc - | tar tf -\n"
15867 #: ../fish/guestfish.pod:652
15869 "writes the tarball to stdout and then pipes that into the external \"tar\" "
15870 "command (see L</PIPES>)."
15874 #: ../fish/guestfish.pod:655
15876 "When using C<-> to read from stdin, the input is read up to the end of "
15877 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
15878 "some arbitrary end marker:"
15882 #: ../fish/guestfish.pod:659
15885 " upload -<<END /foo\n"
15894 #: ../fish/guestfish.pod:665
15896 "Any string of characters can be used instead of C<END>. The end marker must "
15897 "appear on a line of its own, without any preceeding or following characters "
15898 "(not even spaces)."
15902 #: ../fish/guestfish.pod:669
15904 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
15905 "upload local files (so-called \"FileIn\" parameters in the generator)."
15909 #: ../fish/guestfish.pod:672
15910 msgid "EXIT ON ERROR BEHAVIOUR"
15914 #: ../fish/guestfish.pod:674
15916 "By default, guestfish will ignore any errors when in interactive mode "
15917 "(ie. taking commands from a human over a tty), and will exit on the first "
15918 "error in non-interactive mode (scripts, commands given on the command line)."
15922 #: ../fish/guestfish.pod:679
15924 "If you prefix a command with a I<-> character, then that command will not "
15925 "cause guestfish to exit, even if that (one) command returns an error."
15929 #: ../fish/guestfish.pod:683
15930 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
15934 #: ../fish/guestfish.pod:685
15936 "Guestfish can be remote-controlled over a socket. This is useful "
15937 "particularly in shell scripts where you want to make several different "
15938 "changes to a filesystem, but you don't want the overhead of starting up a "
15939 "guestfish process each time."
15943 #: ../fish/guestfish.pod:690
15944 msgid "Start a guestfish server process using:"
15948 #: ../fish/guestfish.pod:692
15951 " eval `guestfish --listen`\n"
15956 #: ../fish/guestfish.pod:694
15957 msgid "and then send it commands by doing:"
15961 #: ../fish/guestfish.pod:696
15964 " guestfish --remote cmd [...]\n"
15969 #: ../fish/guestfish.pod:698
15970 msgid "To cause the server to exit, send it the exit command:"
15974 #: ../fish/guestfish.pod:700
15977 " guestfish --remote exit\n"
15982 #: ../fish/guestfish.pod:702
15984 "Note that the server will normally exit if there is an error in a command. "
15985 "You can change this in the usual way. See section L</EXIT ON ERROR "
15990 #: ../fish/guestfish.pod:706
15991 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
15995 #: ../fish/guestfish.pod:708
15997 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
15998 "is how the I<--remote> option knows where to send the commands. You can "
15999 "have several guestfish listener processes running using:"
16003 #: ../fish/guestfish.pod:712
16006 " eval `guestfish --listen`\n"
16007 " pid1=$GUESTFISH_PID\n"
16008 " eval `guestfish --listen`\n"
16009 " pid2=$GUESTFISH_PID\n"
16011 " guestfish --remote=$pid1 cmd\n"
16012 " guestfish --remote=$pid2 cmd\n"
16017 #: ../fish/guestfish.pod:720
16018 msgid "REMOTE CONTROL DETAILS"
16022 #: ../fish/guestfish.pod:722
16024 "Remote control happens over a Unix domain socket called "
16025 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
16026 "of the process, and C<$PID> is the process ID of the server."
16030 #: ../fish/guestfish.pod:726
16031 msgid "Guestfish client and server versions must match exactly."
16035 #: ../fish/guestfish.pod:728
16036 msgid "PREPARED DISK IMAGES"
16040 #: ../fish/guestfish.pod:730
16042 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
16043 "preformatted disk images that guestfish can make for you to save typing. "
16044 "This is particularly useful for testing purposes. This option is used "
16045 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
16046 "can be mixed with I<-a>)."
16050 #: ../fish/guestfish.pod:736
16052 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
16053 "the second and so on. Existing files in the current directory are "
16058 #: ../fish/guestfish.pod:740
16060 "The type briefly describes how the disk should be sized, partitioned, how "
16061 "filesystem(s) should be created, and how content should be added. "
16062 "Optionally the type can be followed by extra parameters, separated by C<:> "
16063 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
16064 "sparsely-allocated disk, containing a single partition, with the partition "
16065 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
16066 "on a 1GB disk instead."
16070 #: ../fish/guestfish.pod:748
16071 msgid "To list the available types and any extra parameters they take, run:"
16075 #: ../fish/guestfish.pod:752
16077 "Note that the prepared filesystem is not mounted. You would usually have to "
16078 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
16082 #: ../fish/guestfish.pod:756
16084 "If any I<-N> or I<--new> options are given, the guest is automatically "
16089 #: ../fish/guestfish.pod:761
16090 msgid "Create a 100MB disk with an ext4-formatted partition:"
16094 #: ../fish/guestfish.pod:763
16097 " guestfish -N fs:ext4\n"
16102 #: ../fish/guestfish.pod:765
16103 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
16107 #: ../fish/guestfish.pod:767
16110 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
16115 #: ../fish/guestfish.pod:769
16116 msgid "Create a blank 200MB disk:"
16120 #: ../fish/guestfish.pod:771
16123 " guestfish -N disk:200M\n"
16128 #: ../fish/guestfish.pod:773
16129 msgid "PROGRESS BARS"
16133 #: ../fish/guestfish.pod:775
16135 "Some (not all) long-running commands send progress notification messages as "
16136 "they are running. Guestfish turns these messages into progress bars."
16140 #: ../fish/guestfish.pod:779
16142 "When a command that supports progress bars takes longer than two seconds to "
16143 "run, and if progress bars are enabled, then you will see one appearing below "
16148 #: ../fish/guestfish.pod:783
16151 " ><fs> copy-size /large-file /another-file 2048M\n"
16152 " / 10% [#####-----------------------------------------] 00:30\n"
16157 #: ../fish/guestfish.pod:786
16159 "The spinner on the left hand side moves round once for every progress "
16160 "notification received from the backend. This is a (reasonably) golden "
16161 "assurance that the command is \"doing something\" even if the progress bar "
16162 "is not moving, because the command is able to send the progress "
16163 "notifications. When the bar reaches 100% and the command finishes, the "
16164 "spinner disappears."
16168 #: ../fish/guestfish.pod:793
16170 "Progress bars are enabled by default when guestfish is used interactively. "
16171 "You can enable them even for non-interactive modes using I<--progress-bars>, "
16172 "and you can disable them completely using I<--no-progress-bars>."
16176 #: ../fish/guestfish.pod:798
16177 msgid "GUESTFISH COMMANDS"
16181 #: ../fish/guestfish.pod:800
16183 "The commands in this section are guestfish convenience commands, in other "
16184 "words, they are not part of the L<guestfs(3)> API."
16188 #: ../fish/guestfish.pod:803
16193 #: ../fish/guestfish.pod:805
16202 #: ../fish/guestfish.pod:808
16204 "Without any parameter, this lists all commands. With a C<cmd> parameter, "
16205 "this displays detailed help for a command."
16209 #: ../fish/guestfish.pod:811
16210 msgid "quit | exit"
16214 #: ../fish/guestfish.pod:813
16215 msgid "This exits guestfish. You can also use C<^D> key."
16219 #: ../fish/guestfish.pod:815
16220 msgid "@FISH_COMMANDS@"
16224 #: ../fish/guestfish.pod:817
16229 #: ../fish/guestfish.pod:821 ../test-tool/libguestfs-test-tool.pod:83
16234 #: ../fish/guestfish.pod:823
16236 "guestfish returns 0 if the commands completed without error, or 1 if there "
16241 #: ../fish/guestfish.pod:830
16246 #: ../fish/guestfish.pod:832
16248 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
16253 #: ../fish/guestfish.pod:835
16254 msgid "GUESTFISH_PID"
16258 #: ../fish/guestfish.pod:837
16260 "Used with the I<--remote> option to specify the remote guestfish process to "
16261 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
16265 #: ../fish/guestfish.pod:841
16270 #: ../fish/guestfish.pod:843
16272 "The L</hexedit> command uses C<$HEXEDITOR> as the external hex editor. If "
16273 "not specified, the external L<hexedit(1)> program is used."
16277 #: ../fish/guestfish.pod:847
16282 #: ../fish/guestfish.pod:849
16284 "If compiled with GNU readline support, various files in the home directory "
16285 "can be used. See L</FILES>."
16289 #: ../fish/guestfish.pod:858
16291 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
16292 "effect as using the B<-v> option."
16296 #: ../fish/guestfish.pod:870
16298 "Set the path that guestfish uses to search for kernel and initrd.img. See "
16299 "the discussion of paths in L<guestfs(3)>."
16303 #: ../fish/guestfish.pod:881
16304 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
16308 #: ../fish/guestfish.pod:883
16313 #: ../fish/guestfish.pod:885
16315 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
16320 #: ../fish/guestfish.pod:900 ../test-tool/libguestfs-test-tool.pod:88
16325 #: ../fish/guestfish.pod:904
16326 msgid "$HOME/.guestfish"
16330 #: ../fish/guestfish.pod:906
16332 "If compiled with GNU readline support, then the command history is saved in "
16337 #: ../fish/guestfish.pod:909
16338 msgid "$HOME/.inputrc"
16342 #: ../fish/guestfish.pod:911
16343 msgid "/etc/inputrc"
16347 #: ../fish/guestfish.pod:913
16349 "If compiled with GNU readline support, then these files can be used to "
16350 "configure readline. For further information, please see "
16351 "L<readline(3)/INITIALIZATION FILE>."
16355 #: ../fish/guestfish.pod:917
16356 msgid "To write rules which only apply to guestfish, use:"
16360 #: ../fish/guestfish.pod:919
16370 #: ../fish/guestfish.pod:923
16372 "Variables that you can set in inputrc that change the behaviour of guestfish "
16373 "in useful ways include:"
16377 #: ../fish/guestfish.pod:928
16378 msgid "completion-ignore-case (default: on)"
16382 #: ../fish/guestfish.pod:930
16384 "By default, guestfish will ignore case when tab-completing paths on the "
16389 #: ../fish/guestfish.pod:933
16392 " set completion-ignore-case off\n"
16397 #: ../fish/guestfish.pod:935
16398 msgid "to make guestfish case sensitive."
16402 #: ../fish/guestfish.pod:939
16407 #: ../fish/guestfish.pod:941
16408 msgid "test2.img (etc)"
16412 #: ../fish/guestfish.pod:943
16414 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
16415 "will be created in the file C<test1.img> in the current directory. The "
16416 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
16417 "the same name will be overwritten."
16421 #: ../fish/guestfish.pod:952
16423 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
16424 "L<virt-edit(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, "
16425 "L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
16426 "L<virt-tar(1)>, L<virt-win-reg(1)>, L<hexedit(1)>."
16430 #: ../fish/guestfish.pod:976 ../test-tool/libguestfs-test-tool.pod:124 ../fuse/guestmount.pod:198 ../inspector/virt-inspector.pl:865 ../tools/virt-edit.pl:345 ../tools/virt-win-reg.pl:495 ../tools/virt-df.pl:553 ../tools/virt-ls.pl:229 ../tools/virt-resize.pl:1424 ../tools/virt-list-filesystems.pl:211 ../tools/virt-cat.pl:181 ../tools/virt-tar.pl:276 ../tools/virt-rescue.pl:249 ../tools/virt-make-fs.pl:560 ../tools/virt-list-partitions.pl:248
16432 "This program is free software; you can redistribute it and/or modify it "
16433 "under the terms of the GNU General Public License as published by the Free "
16434 "Software Foundation; either version 2 of the License, or (at your option) "
16435 "any later version."
16439 #: ../fish/guestfish.pod:981 ../test-tool/libguestfs-test-tool.pod:129 ../fuse/guestmount.pod:203 ../inspector/virt-inspector.pl:870 ../tools/virt-edit.pl:350 ../tools/virt-win-reg.pl:500 ../tools/virt-df.pl:558 ../tools/virt-ls.pl:234 ../tools/virt-resize.pl:1429 ../tools/virt-list-filesystems.pl:216 ../tools/virt-cat.pl:186 ../tools/virt-tar.pl:281 ../tools/virt-rescue.pl:254 ../tools/virt-make-fs.pl:565 ../tools/virt-list-partitions.pl:253
16441 "This program is distributed in the hope that it will be useful, but WITHOUT "
16442 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
16443 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
16448 #: ../fish/guestfish.pod:986 ../test-tool/libguestfs-test-tool.pod:134 ../fuse/guestmount.pod:208 ../inspector/virt-inspector.pl:875 ../tools/virt-edit.pl:355 ../tools/virt-win-reg.pl:505 ../tools/virt-df.pl:563 ../tools/virt-ls.pl:239 ../tools/virt-resize.pl:1434 ../tools/virt-list-filesystems.pl:221 ../tools/virt-cat.pl:191 ../tools/virt-tar.pl:286 ../tools/virt-rescue.pl:259 ../tools/virt-make-fs.pl:570 ../tools/virt-list-partitions.pl:258
16450 "You should have received a copy of the GNU General Public License along with "
16451 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
16452 "Ave, Cambridge, MA 02139, USA."
16456 #: ../fish/guestfish-actions.pod:1
16461 #: ../fish/guestfish-actions.pod:3
16466 #: ../fish/guestfish-actions.pod:5
16469 " add-cdrom filename\n"
16474 #: ../fish/guestfish-actions.pod:17
16476 "This call checks for the existence of C<filename>. This stops you from "
16477 "specifying other types of drive which are supported by qemu such as C<nbd:> "
16478 "and C<http:> URLs. To specify those, use the general L</config> call "
16483 #: ../fish/guestfish-actions.pod:24
16485 "If you just want to add an ISO file (often you use this as an efficient way "
16486 "to transfer large files into the guest), then you should probably use "
16487 "L</add-drive-ro> instead."
16491 #: ../fish/guestfish-actions.pod:30
16496 #: ../fish/guestfish-actions.pod:32
16501 #: ../fish/guestfish-actions.pod:34
16504 " add-drive filename\n"
16509 #: ../fish/guestfish-actions.pod:53 ../fish/guestfish-actions.pod:81
16511 "C<if=...> is set at compile time by the configuration option C<./configure "
16512 "--with-drive-if=...>. In the rare case where you might need to change this "
16513 "at run time, use L</add-drive-with-if> or L</add-drive-ro-with-if>."
16517 #: ../fish/guestfish-actions.pod:58 ../fish/guestfish-actions.pod:86
16519 "Note that this call checks for the existence of C<filename>. This stops you "
16520 "from specifying other types of drive which are supported by qemu such as "
16521 "C<nbd:> and C<http:> URLs. To specify those, use the general L</config> "
16526 #: ../fish/guestfish-actions.pod:63
16527 msgid "add-drive-ro"
16531 #: ../fish/guestfish-actions.pod:65
16536 #: ../fish/guestfish-actions.pod:67
16539 " add-drive-ro filename\n"
16544 #: ../fish/guestfish-actions.pod:91
16545 msgid "add-drive-ro-with-if"
16549 #: ../fish/guestfish-actions.pod:93
16552 " add-drive-ro-with-if filename iface\n"
16557 #: ../fish/guestfish-actions.pod:95
16559 "This is the same as L</add-drive-ro> but it allows you to specify the QEMU "
16560 "interface emulation to use at run time."
16564 #: ../fish/guestfish-actions.pod:98
16565 msgid "add-drive-with-if"
16569 #: ../fish/guestfish-actions.pod:100
16572 " add-drive-with-if filename iface\n"
16577 #: ../fish/guestfish-actions.pod:102
16579 "This is the same as L</add-drive> but it allows you to specify the QEMU "
16580 "interface emulation to use at run time."
16584 #: ../fish/guestfish-actions.pod:105
16589 #: ../fish/guestfish-actions.pod:107
16592 " aug-clear augpath\n"
16597 #: ../fish/guestfish-actions.pod:112
16602 #: ../fish/guestfish-actions.pod:114
16610 #: ../fish/guestfish-actions.pod:116
16612 "Close the current Augeas handle and free up any resources used by it. After "
16613 "calling this, you have to call L</aug-init> again before you can use any "
16614 "other Augeas functions."
16618 #: ../fish/guestfish-actions.pod:121
16619 msgid "aug-defnode"
16623 #: ../fish/guestfish-actions.pod:123
16626 " aug-defnode name expr val\n"
16631 #: ../fish/guestfish-actions.pod:128
16633 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
16634 "calling L</aug-set> C<expr>, C<value>. C<name> will be the nodeset "
16635 "containing that single node."
16639 #: ../fish/guestfish-actions.pod:136
16644 #: ../fish/guestfish-actions.pod:138
16647 " aug-defvar name expr\n"
16652 #: ../fish/guestfish-actions.pod:147
16657 #: ../fish/guestfish-actions.pod:149
16660 " aug-get augpath\n"
16665 #: ../fish/guestfish-actions.pod:154
16670 #: ../fish/guestfish-actions.pod:156
16673 " aug-init root flags\n"
16678 #: ../fish/guestfish-actions.pod:162
16679 msgid "You must call this before using any other L</aug-*> commands."
16683 #: ../fish/guestfish-actions.pod:197
16684 msgid "Do not load the tree in L</aug-init>."
16688 #: ../fish/guestfish-actions.pod:201
16689 msgid "To close the handle, you can call L</aug-close>."
16693 #: ../fish/guestfish-actions.pod:205
16698 #: ../fish/guestfish-actions.pod:207
16701 " aug-insert augpath label true|false\n"
16706 #: ../fish/guestfish-actions.pod:217
16711 #: ../fish/guestfish-actions.pod:219
16719 #: ../fish/guestfish-actions.pod:226
16724 #: ../fish/guestfish-actions.pod:228
16727 " aug-ls augpath\n"
16732 #: ../fish/guestfish-actions.pod:230
16734 "This is just a shortcut for listing L</aug-match> C<path/*> and sorting the "
16735 "resulting nodes into alphabetical order."
16739 #: ../fish/guestfish-actions.pod:233
16744 #: ../fish/guestfish-actions.pod:235
16747 " aug-match augpath\n"
16752 #: ../fish/guestfish-actions.pod:241
16757 #: ../fish/guestfish-actions.pod:243
16760 " aug-mv src dest\n"
16765 #: ../fish/guestfish-actions.pod:248
16770 #: ../fish/guestfish-actions.pod:250
16773 " aug-rm augpath\n"
16778 #: ../fish/guestfish-actions.pod:256
16783 #: ../fish/guestfish-actions.pod:258
16791 #: ../fish/guestfish-actions.pod:262
16793 "The flags which were passed to L</aug-init> affect exactly how files are "
16798 #: ../fish/guestfish-actions.pod:265
16803 #: ../fish/guestfish-actions.pod:267
16806 " aug-set augpath val\n"
16811 #: ../fish/guestfish-actions.pod:271
16813 "In the Augeas API, it is possible to clear a node by setting the value to "
16814 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
16815 "this call. Instead you must use the L</aug-clear> call."
16819 #: ../fish/guestfish-actions.pod:276
16824 #: ../fish/guestfish-actions.pod:278
16827 " available 'groups ...'\n"
16832 #: ../fish/guestfish-actions.pod:284
16834 "The libguestfs groups, and the functions that those groups correspond to, "
16835 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
16836 "runtime by calling L</available-all-groups>."
16840 #: ../fish/guestfish-actions.pod:308
16841 msgid "You must call L</launch> before calling this function."
16845 #: ../fish/guestfish-actions.pod:330
16847 "This call was added in version C<1.0.80>. In previous versions of "
16848 "libguestfs all you could do would be to speculatively execute a command to "
16849 "find out if the daemon implemented it. See also L</version>."
16853 #: ../fish/guestfish-actions.pod:337
16854 msgid "available-all-groups"
16858 #: ../fish/guestfish-actions.pod:339
16861 " available-all-groups\n"
16866 #: ../fish/guestfish-actions.pod:341
16868 "This command returns a list of all optional groups that this daemon knows "
16869 "about. Note this returns both supported and unsupported groups. To find "
16870 "out which ones the daemon can actually support you have to call "
16871 "L</available> on each member of the returned list."
16875 #: ../fish/guestfish-actions.pod:347
16876 msgid "See also L</available> and L<guestfs(3)/AVAILABILITY>."
16880 #: ../fish/guestfish-actions.pod:349
16885 #: ../fish/guestfish-actions.pod:351
16888 " base64-in (base64file|-) filename\n"
16893 #: ../fish/guestfish-actions.pod:356 ../fish/guestfish-actions.pod:365 ../fish/guestfish-actions.pod:589 ../fish/guestfish-actions.pod:736 ../fish/guestfish-actions.pod:783 ../fish/guestfish-actions.pod:802 ../fish/guestfish-actions.pod:1179 ../fish/guestfish-actions.pod:3835 ../fish/guestfish-actions.pod:3847 ../fish/guestfish-actions.pod:3858 ../fish/guestfish-actions.pod:3869 ../fish/guestfish-actions.pod:3921 ../fish/guestfish-actions.pod:3930 ../fish/guestfish-actions.pod:3984 ../fish/guestfish-actions.pod:4007
16894 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
16898 #: ../fish/guestfish-actions.pod:358
16903 #: ../fish/guestfish-actions.pod:360
16906 " base64-out filename (base64file|-)\n"
16911 #: ../fish/guestfish-actions.pod:367
16912 msgid "blockdev-flushbufs"
16916 #: ../fish/guestfish-actions.pod:369
16919 " blockdev-flushbufs device\n"
16924 #: ../fish/guestfish-actions.pod:376
16925 msgid "blockdev-getbsz"
16929 #: ../fish/guestfish-actions.pod:378
16932 " blockdev-getbsz device\n"
16937 #: ../fish/guestfish-actions.pod:387
16938 msgid "blockdev-getro"
16942 #: ../fish/guestfish-actions.pod:389
16945 " blockdev-getro device\n"
16950 #: ../fish/guestfish-actions.pod:396
16951 msgid "blockdev-getsize64"
16955 #: ../fish/guestfish-actions.pod:398
16958 " blockdev-getsize64 device\n"
16963 #: ../fish/guestfish-actions.pod:402
16964 msgid "See also L</blockdev-getsz>."
16968 #: ../fish/guestfish-actions.pod:406
16969 msgid "blockdev-getss"
16973 #: ../fish/guestfish-actions.pod:408
16976 " blockdev-getss device\n"
16981 #: ../fish/guestfish-actions.pod:413
16982 msgid "(Note, this is not the size in sectors, use L</blockdev-getsz> for that)."
16986 #: ../fish/guestfish-actions.pod:418
16987 msgid "blockdev-getsz"
16991 #: ../fish/guestfish-actions.pod:420
16994 " blockdev-getsz device\n"
16999 #: ../fish/guestfish-actions.pod:425
17001 "See also L</blockdev-getss> for the real sector size of the device, and "
17002 "L</blockdev-getsize64> for the more useful I<size in bytes>."
17006 #: ../fish/guestfish-actions.pod:431
17007 msgid "blockdev-rereadpt"
17011 #: ../fish/guestfish-actions.pod:433
17014 " blockdev-rereadpt device\n"
17019 #: ../fish/guestfish-actions.pod:439
17020 msgid "blockdev-setbsz"
17024 #: ../fish/guestfish-actions.pod:441
17027 " blockdev-setbsz device blocksize\n"
17032 #: ../fish/guestfish-actions.pod:450
17033 msgid "blockdev-setro"
17037 #: ../fish/guestfish-actions.pod:452
17040 " blockdev-setro device\n"
17045 #: ../fish/guestfish-actions.pod:458
17046 msgid "blockdev-setrw"
17050 #: ../fish/guestfish-actions.pod:460
17053 " blockdev-setrw device\n"
17058 #: ../fish/guestfish-actions.pod:466
17059 msgid "case-sensitive-path"
17063 #: ../fish/guestfish-actions.pod:468
17066 " case-sensitive-path path\n"
17071 #: ../fish/guestfish-actions.pod:492
17073 "Thus L</case-sensitive-path> (\"/Windows/System32\") might return "
17074 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
17075 "how the directories were originally created under Windows)."
17079 #: ../fish/guestfish-actions.pod:500
17080 msgid "See also L</realpath>."
17084 #: ../fish/guestfish-actions.pod:502
17089 #: ../fish/guestfish-actions.pod:504
17097 #: ../fish/guestfish-actions.pod:508
17099 "Note that this function cannot correctly handle binary files (specifically, "
17100 "files containing C<\\0> character which is treated as end of string). For "
17101 "those you need to use the L</read-file> or L</download> functions which have "
17102 "a more complex interface."
17106 #: ../fish/guestfish-actions.pod:516
17111 #: ../fish/guestfish-actions.pod:518
17114 " checksum csumtype path\n"
17119 #: ../fish/guestfish-actions.pod:561
17120 msgid "To get the checksum for a device, use L</checksum-device>."
17124 #: ../fish/guestfish-actions.pod:563
17125 msgid "To get the checksums for many files, use L</checksums-out>."
17129 #: ../fish/guestfish-actions.pod:565
17130 msgid "checksum-device"
17134 #: ../fish/guestfish-actions.pod:567
17137 " checksum-device csumtype device\n"
17142 #: ../fish/guestfish-actions.pod:569
17144 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
17145 "device named C<device>. For the types of checksums supported see the "
17146 "L</checksum> command."
17150 #: ../fish/guestfish-actions.pod:573
17151 msgid "checksums-out"
17155 #: ../fish/guestfish-actions.pod:575
17158 " checksums-out csumtype directory (sumsfile|-)\n"
17163 #: ../fish/guestfish-actions.pod:591
17168 #: ../fish/guestfish-actions.pod:593
17171 " chmod mode path\n"
17176 #: ../fish/guestfish-actions.pod:604
17181 #: ../fish/guestfish-actions.pod:606
17184 " chown owner group path\n"
17189 #: ../fish/guestfish-actions.pod:614
17194 #: ../fish/guestfish-actions.pod:616
17197 " command 'arguments ...'\n"
17202 #: ../fish/guestfish-actions.pod:623
17204 "The single parameter is an argv-style list of arguments. The first element "
17205 "is the name of the program to run. Subsequent elements are parameters. The "
17206 "list must be non-empty (ie. must contain a program name). Note that the "
17207 "command runs directly, and is I<not> invoked via the shell (see L</sh>)."
17211 #: ../fish/guestfish-actions.pod:651
17212 msgid "command-lines"
17216 #: ../fish/guestfish-actions.pod:653
17219 " command-lines 'arguments ...'\n"
17224 #: ../fish/guestfish-actions.pod:655
17225 msgid "This is the same as L</command>, but splits the result into a list of lines."
17229 #: ../fish/guestfish-actions.pod:658
17230 msgid "See also: L</sh-lines>"
17234 #: ../fish/guestfish-actions.pod:663
17239 #: ../fish/guestfish-actions.pod:665
17242 " config qemuparam qemuvalue\n"
17247 #: ../fish/guestfish-actions.pod:676
17252 #: ../fish/guestfish-actions.pod:678
17255 " copy-size src dest size\n"
17260 #: ../fish/guestfish-actions.pod:686
17265 #: ../fish/guestfish-actions.pod:688
17273 #: ../fish/guestfish-actions.pod:693
17278 #: ../fish/guestfish-actions.pod:695
17286 #: ../fish/guestfish-actions.pod:700
17291 #: ../fish/guestfish-actions.pod:702
17299 #: ../fish/guestfish-actions.pod:709
17301 "If the destination is a device, it must be as large or larger than the "
17302 "source file or device, otherwise the copy will fail. This command cannot do "
17303 "partial copies (see L</copy-size>)."
17307 #: ../fish/guestfish-actions.pod:713
17312 #: ../fish/guestfish-actions.pod:715
17315 " debug subcmd 'extraargs ...'\n"
17320 #: ../fish/guestfish-actions.pod:717
17322 "The L</debug> command exposes some internals of C<guestfsd> (the guestfs "
17323 "daemon) that runs inside the qemu subprocess."
17327 #: ../fish/guestfish-actions.pod:725
17328 msgid "debug-upload"
17332 #: ../fish/guestfish-actions.pod:727
17335 " debug-upload (filename|-) tmpname mode\n"
17340 #: ../fish/guestfish-actions.pod:729
17341 msgid "The L</debug-upload> command uploads a file to the libguestfs appliance."
17345 #: ../fish/guestfish-actions.pod:738
17350 #: ../fish/guestfish-actions.pod:740
17358 #: ../fish/guestfish-actions.pod:748
17363 #: ../fish/guestfish-actions.pod:750
17371 #: ../fish/guestfish-actions.pod:759
17376 #: ../fish/guestfish-actions.pod:761
17384 #: ../fish/guestfish-actions.pod:767
17386 "Another way to get the same information is to enable verbose messages with "
17387 "L</set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
17388 "before running the program."
17392 #: ../fish/guestfish-actions.pod:772
17397 #: ../fish/guestfish-actions.pod:774
17400 " download remotefilename (filename|-)\n"
17405 #: ../fish/guestfish-actions.pod:781
17406 msgid "See also L</upload>, L</cat>."
17410 #: ../fish/guestfish-actions.pod:785
17411 msgid "download-offset"
17415 #: ../fish/guestfish-actions.pod:787
17418 " download-offset remotefilename (filename|-) offset size\n"
17423 #: ../fish/guestfish-actions.pod:795
17425 "Note that there is no limit on the amount of data that can be downloaded "
17426 "with this call, unlike with L</pread>, and this call always reads the full "
17427 "amount unless an error occurs."
17431 #: ../fish/guestfish-actions.pod:800
17432 msgid "See also L</download>, L</pread>."
17436 #: ../fish/guestfish-actions.pod:804
17437 msgid "drop-caches"
17441 #: ../fish/guestfish-actions.pod:806
17444 " drop-caches whattodrop\n"
17449 #: ../fish/guestfish-actions.pod:818
17454 #: ../fish/guestfish-actions.pod:820
17462 #: ../fish/guestfish-actions.pod:832
17467 #: ../fish/guestfish-actions.pod:834
17470 " e2fsck-f device\n"
17475 #: ../fish/guestfish-actions.pod:840
17477 "This command is only needed because of L</resize2fs> (q.v.). Normally you "
17478 "should use L</fsck>."
17482 #: ../fish/guestfish-actions.pod:843
17483 msgid "echo-daemon"
17487 #: ../fish/guestfish-actions.pod:845
17490 " echo-daemon 'words ...'\n"
17495 #: ../fish/guestfish-actions.pod:852
17496 msgid "See also L</ping-daemon>."
17500 #: ../fish/guestfish-actions.pod:854
17505 #: ../fish/guestfish-actions.pod:856
17508 " egrep regex path\n"
17513 #: ../fish/guestfish-actions.pod:864
17518 #: ../fish/guestfish-actions.pod:866
17521 " egrepi regex path\n"
17526 #: ../fish/guestfish-actions.pod:874
17531 #: ../fish/guestfish-actions.pod:876
17534 " equal file1 file2\n"
17539 #: ../fish/guestfish-actions.pod:883
17544 #: ../fish/guestfish-actions.pod:885
17552 #: ../fish/guestfish-actions.pod:890
17553 msgid "See also L</is-file>, L</is-dir>, L</stat>."
17557 #: ../fish/guestfish-actions.pod:892
17562 #: ../fish/guestfish-actions.pod:894
17565 " fallocate path len\n"
17570 #: ../fish/guestfish-actions.pod:911
17571 msgid "fallocate64"
17575 #: ../fish/guestfish-actions.pod:913
17578 " fallocate64 path len\n"
17583 #: ../fish/guestfish-actions.pod:919
17585 "Note that this call allocates disk blocks for the file. To create a sparse "
17586 "file use L</truncate-size> instead."
17590 #: ../fish/guestfish-actions.pod:922
17592 "The deprecated call L</fallocate> does the same, but owing to an oversight "
17593 "it only allowed 30 bit lengths to be specified, effectively limiting the "
17594 "maximum size of files created through that call to 1GB."
17598 #: ../fish/guestfish-actions.pod:931
17603 #: ../fish/guestfish-actions.pod:933
17606 " fgrep pattern path\n"
17611 #: ../fish/guestfish-actions.pod:941
17616 #: ../fish/guestfish-actions.pod:943
17619 " fgrepi pattern path\n"
17624 #: ../fish/guestfish-actions.pod:951
17629 #: ../fish/guestfish-actions.pod:953
17637 #: ../fish/guestfish-actions.pod:965
17639 "This command can also be used on C</dev/> devices (and partitions, LV "
17640 "names). You can for example use this to determine if a device contains a "
17641 "filesystem, although it's usually better to use L</vfs-type>."
17645 #: ../fish/guestfish-actions.pod:975
17646 msgid "file-architecture"
17650 #: ../fish/guestfish-actions.pod:977
17653 " file-architecture filename\n"
17658 #: ../fish/guestfish-actions.pod:1080
17663 #: ../fish/guestfish-actions.pod:1082
17671 #: ../fish/guestfish-actions.pod:1086
17673 "To get other stats about a file, use L</stat>, L</lstat>, L</is-dir>, "
17674 "L</is-file> etc. To get the size of block devices, use "
17675 "L</blockdev-getsize64>."
17679 #: ../fish/guestfish-actions.pod:1090
17684 #: ../fish/guestfish-actions.pod:1092
17687 " fill c len path\n"
17692 #: ../fish/guestfish-actions.pod:1098
17694 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
17695 "L</truncate-size>. To create a file with a pattern of repeating bytes use "
17696 "L</fill-pattern>."
17700 #: ../fish/guestfish-actions.pod:1103
17701 msgid "fill-pattern"
17705 #: ../fish/guestfish-actions.pod:1105
17708 " fill-pattern pattern len path\n"
17713 #: ../fish/guestfish-actions.pod:1107
17715 "This function is like L</fill> except that it creates a new file of length "
17716 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
17717 "is truncated if necessary to ensure the length of the file is exactly C<len> "
17722 #: ../fish/guestfish-actions.pod:1112
17727 #: ../fish/guestfish-actions.pod:1114
17730 " find directory\n"
17735 #: ../fish/guestfish-actions.pod:1128
17736 msgid "then the returned list from L</find> C</tmp> would be 4 elements:"
17740 #: ../fish/guestfish-actions.pod:1141
17741 msgid "See also L</find0>."
17745 #: ../fish/guestfish-actions.pod:1146
17750 #: ../fish/guestfish-actions.pod:1148
17753 " find0 directory (files|-)\n"
17758 #: ../fish/guestfish-actions.pod:1154
17759 msgid "This command works the same way as L</find> with the following exceptions:"
17763 #: ../fish/guestfish-actions.pod:1181
17764 msgid "findfs-label"
17768 #: ../fish/guestfish-actions.pod:1183
17771 " findfs-label label\n"
17776 #: ../fish/guestfish-actions.pod:1189
17777 msgid "To find the label of a filesystem, use L</vfs-label>."
17781 #: ../fish/guestfish-actions.pod:1191
17782 msgid "findfs-uuid"
17786 #: ../fish/guestfish-actions.pod:1193
17789 " findfs-uuid uuid\n"
17794 #: ../fish/guestfish-actions.pod:1199
17795 msgid "To find the UUID of a filesystem, use L</vfs-uuid>."
17799 #: ../fish/guestfish-actions.pod:1201
17804 #: ../fish/guestfish-actions.pod:1203
17807 " fsck fstype device\n"
17812 #: ../fish/guestfish-actions.pod:1233
17817 #: ../fish/guestfish-actions.pod:1235
17825 #: ../fish/guestfish-actions.pod:1242
17826 msgid "get-autosync"
17830 #: ../fish/guestfish-actions.pod:1244
17838 #: ../fish/guestfish-actions.pod:1248
17843 #: ../fish/guestfish-actions.pod:1250
17851 #: ../fish/guestfish-actions.pod:1254
17852 msgid "get-e2label"
17856 #: ../fish/guestfish-actions.pod:1256
17859 " get-e2label device\n"
17864 #: ../fish/guestfish-actions.pod:1268
17869 #: ../fish/guestfish-actions.pod:1270
17872 " get-e2uuid device\n"
17877 #: ../fish/guestfish-actions.pod:1282
17878 msgid "get-memsize"
17882 #: ../fish/guestfish-actions.pod:1284
17890 #: ../fish/guestfish-actions.pod:1289
17892 "If L</set-memsize> was not called on this handle, and if "
17893 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
17894 "value for memsize."
17898 #: ../fish/guestfish-actions.pod:1296
17899 msgid "get-network"
17903 #: ../fish/guestfish-actions.pod:1298
17911 #: ../fish/guestfish-actions.pod:1302
17916 #: ../fish/guestfish-actions.pod:1304
17924 #: ../fish/guestfish-actions.pod:1311
17929 #: ../fish/guestfish-actions.pod:1313
17934 #: ../fish/guestfish-actions.pod:1315
17942 #: ../fish/guestfish-actions.pod:1322
17947 #: ../fish/guestfish-actions.pod:1324
17955 #: ../fish/guestfish-actions.pod:1331
17956 msgid "get-recovery-proc"
17960 #: ../fish/guestfish-actions.pod:1333
17963 " get-recovery-proc\n"
17968 #: ../fish/guestfish-actions.pod:1337
17969 msgid "get-selinux"
17973 #: ../fish/guestfish-actions.pod:1339
17981 #: ../fish/guestfish-actions.pod:1341
17983 "This returns the current setting of the selinux flag which is passed to the "
17984 "appliance at boot time. See L</set-selinux>."
17988 #: ../fish/guestfish-actions.pod:1347
17993 #: ../fish/guestfish-actions.pod:1349
18001 #: ../fish/guestfish-actions.pod:1356
18006 #: ../fish/guestfish-actions.pod:1358
18014 #: ../fish/guestfish-actions.pod:1362
18019 #: ../fish/guestfish-actions.pod:1364
18027 #: ../fish/guestfish-actions.pod:1366
18029 "Return the current umask. By default the umask is C<022> unless it has been "
18030 "set by calling L</umask>."
18034 #: ../fish/guestfish-actions.pod:1369
18035 msgid "get-verbose"
18039 #: ../fish/guestfish-actions.pod:1371
18047 #: ../fish/guestfish-actions.pod:1375
18052 #: ../fish/guestfish-actions.pod:1377
18060 #: ../fish/guestfish-actions.pod:1381
18061 msgid "See the documentation about SELINUX in L<guestfs(3)>, and L</setcon>"
18065 #: ../fish/guestfish-actions.pod:1384
18070 #: ../fish/guestfish-actions.pod:1386
18073 " getxattrs path\n"
18078 #: ../fish/guestfish-actions.pod:1394
18079 msgid "See also: L</lgetxattrs>, L<attr(5)>."
18083 #: ../fish/guestfish-actions.pod:1396
18084 msgid "glob-expand"
18088 #: ../fish/guestfish-actions.pod:1398
18091 " glob-expand pattern\n"
18096 #: ../fish/guestfish-actions.pod:1411
18101 #: ../fish/guestfish-actions.pod:1413
18104 " grep regex path\n"
18109 #: ../fish/guestfish-actions.pod:1421
18114 #: ../fish/guestfish-actions.pod:1423
18117 " grepi regex path\n"
18122 #: ../fish/guestfish-actions.pod:1431
18123 msgid "grub-install"
18127 #: ../fish/guestfish-actions.pod:1433
18130 " grub-install root device\n"
18135 #: ../fish/guestfish-actions.pod:1449
18140 #: ../fish/guestfish-actions.pod:1451
18148 #: ../fish/guestfish-actions.pod:1459
18153 #: ../fish/guestfish-actions.pod:1461
18156 " head-n nrlines path\n"
18161 #: ../fish/guestfish-actions.pod:1474
18166 #: ../fish/guestfish-actions.pod:1476
18174 #: ../fish/guestfish-actions.pod:1484
18179 #: ../fish/guestfish-actions.pod:1486
18182 " initrd-cat initrdpath filename\n"
18187 #: ../fish/guestfish-actions.pod:1498
18188 msgid "See also L</initrd-list>."
18192 #: ../fish/guestfish-actions.pod:1503
18193 msgid "initrd-list"
18197 #: ../fish/guestfish-actions.pod:1505
18200 " initrd-list path\n"
18205 #: ../fish/guestfish-actions.pod:1517
18206 msgid "inotify-add-watch"
18210 #: ../fish/guestfish-actions.pod:1519
18213 " inotify-add-watch path mask\n"
18218 #: ../fish/guestfish-actions.pod:1531
18219 msgid "inotify-close"
18223 #: ../fish/guestfish-actions.pod:1533
18231 #: ../fish/guestfish-actions.pod:1539
18232 msgid "inotify-files"
18236 #: ../fish/guestfish-actions.pod:1541
18244 #: ../fish/guestfish-actions.pod:1543
18246 "This function is a helpful wrapper around L</inotify-read> which just "
18247 "returns a list of pathnames of objects that were touched. The returned "
18248 "pathnames are sorted and deduplicated."
18252 #: ../fish/guestfish-actions.pod:1547
18253 msgid "inotify-init"
18257 #: ../fish/guestfish-actions.pod:1549
18260 " inotify-init maxevents\n"
18265 #: ../fish/guestfish-actions.pod:1555
18267 "C<maxevents> is the maximum number of events which will be queued up between "
18268 "calls to L</inotify-read> or L</inotify-files>. If this is passed as C<0>, "
18269 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
18270 "default was 16384 events. Beyond this limit, the kernel throws away events, "
18271 "but records the fact that it threw them away by setting a flag "
18272 "C<IN_Q_OVERFLOW> in the returned structure list (see L</inotify-read>)."
18276 #: ../fish/guestfish-actions.pod:1565
18278 "Before any events are generated, you have to add some watches to the "
18279 "internal watch list. See: L</inotify-add-watch>, L</inotify-rm-watch> and "
18280 "L</inotify-watch-all>."
18284 #: ../fish/guestfish-actions.pod:1571
18286 "Queued up events should be read periodically by calling L</inotify-read> (or "
18287 "L</inotify-files> which is just a helpful wrapper around L</inotify-read>). "
18288 "If you don't read the events out often enough then you risk the internal "
18289 "queue overflowing."
18293 #: ../fish/guestfish-actions.pod:1578
18295 "The handle should be closed after use by calling L</inotify-close>. This "
18296 "also removes any watches automatically."
18300 #: ../fish/guestfish-actions.pod:1587
18301 msgid "inotify-read"
18305 #: ../fish/guestfish-actions.pod:1589
18313 #: ../fish/guestfish-actions.pod:1602
18314 msgid "inotify-rm-watch"
18318 #: ../fish/guestfish-actions.pod:1604
18321 " inotify-rm-watch wd\n"
18326 #: ../fish/guestfish-actions.pod:1606
18327 msgid "Remove a previously defined inotify watch. See L</inotify-add-watch>."
18331 #: ../fish/guestfish-actions.pod:1609
18332 msgid "inspect-get-arch"
18336 #: ../fish/guestfish-actions.pod:1611
18339 " inspect-get-arch root\n"
18344 #: ../fish/guestfish-actions.pod:1613 ../fish/guestfish-actions.pod:1629 ../fish/guestfish-actions.pod:1675 ../fish/guestfish-actions.pod:1693 ../fish/guestfish-actions.pod:1714 ../fish/guestfish-actions.pod:1729 ../fish/guestfish-actions.pod:1752 ../fish/guestfish-actions.pod:1769
18346 "This function should only be called with a root device string as returned by "
18351 #: ../fish/guestfish-actions.pod:1616
18353 "This returns the architecture of the inspected operating system. The "
18354 "possible return values are listed under L</file-architecture>."
18358 #: ../fish/guestfish-actions.pod:1625
18359 msgid "inspect-get-distro"
18363 #: ../fish/guestfish-actions.pod:1627
18366 " inspect-get-distro root\n"
18371 #: ../fish/guestfish-actions.pod:1671
18372 msgid "inspect-get-filesystems"
18376 #: ../fish/guestfish-actions.pod:1673
18379 " inspect-get-filesystems root\n"
18384 #: ../fish/guestfish-actions.pod:1686
18386 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
18387 "L</inspect-get-mountpoints>."
18391 #: ../fish/guestfish-actions.pod:1689
18392 msgid "inspect-get-major-version"
18396 #: ../fish/guestfish-actions.pod:1691
18399 " inspect-get-major-version root\n"
18404 #: ../fish/guestfish-actions.pod:1710
18405 msgid "inspect-get-minor-version"
18409 #: ../fish/guestfish-actions.pod:1712
18412 " inspect-get-minor-version root\n"
18417 #: ../fish/guestfish-actions.pod:1722
18419 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
18420 "L</inspect-get-major-version>."
18424 #: ../fish/guestfish-actions.pod:1725
18425 msgid "inspect-get-mountpoints"
18429 #: ../fish/guestfish-actions.pod:1727
18432 " inspect-get-mountpoints root\n"
18437 #: ../fish/guestfish-actions.pod:1745
18439 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
18440 "L</inspect-get-filesystems>."
18444 #: ../fish/guestfish-actions.pod:1748
18445 msgid "inspect-get-product-name"
18449 #: ../fish/guestfish-actions.pod:1750
18452 " inspect-get-product-name root\n"
18457 #: ../fish/guestfish-actions.pod:1765
18458 msgid "inspect-get-type"
18462 #: ../fish/guestfish-actions.pod:1767
18465 " inspect-get-type root\n"
18470 #: ../fish/guestfish-actions.pod:1796
18475 #: ../fish/guestfish-actions.pod:1798
18483 #: ../fish/guestfish-actions.pod:1813
18485 "You can pass the root string(s) returned to other L</inspect-get-*> "
18486 "functions in order to query further information about each operating system, "
18487 "such as the name and version."
18491 #: ../fish/guestfish-actions.pod:1818
18493 "This function uses other libguestfs features such as L</mount-ro> and "
18494 "L</umount-all> in order to mount and unmount filesystems and look at the "
18495 "contents. This should be called with no disks currently mounted. The "
18496 "function may also use Augeas, so any existing Augeas handle will be closed."
18500 #: ../fish/guestfish-actions.pod:1830 ../fish/guestfish-actions.pod:1986 ../fish/guestfish-actions.pod:2032
18501 msgid "See also L</list-filesystems>."
18505 #: ../fish/guestfish-actions.pod:1832
18506 msgid "is-blockdev"
18510 #: ../fish/guestfish-actions.pod:1834
18513 " is-blockdev path\n"
18518 #: ../fish/guestfish-actions.pod:1839 ../fish/guestfish-actions.pod:1857 ../fish/guestfish-actions.pod:1876 ../fish/guestfish-actions.pod:1885 ../fish/guestfish-actions.pod:1895 ../fish/guestfish-actions.pod:1929 ../fish/guestfish-actions.pod:1938
18519 msgid "See also L</stat>."
18523 #: ../fish/guestfish-actions.pod:1841
18528 #: ../fish/guestfish-actions.pod:1843
18536 #: ../fish/guestfish-actions.pod:1850
18541 #: ../fish/guestfish-actions.pod:1852
18544 " is-chardev path\n"
18549 #: ../fish/guestfish-actions.pod:1859
18554 #: ../fish/guestfish-actions.pod:1861
18562 #: ../fish/guestfish-actions.pod:1868
18567 #: ../fish/guestfish-actions.pod:1870
18575 #: ../fish/guestfish-actions.pod:1878
18580 #: ../fish/guestfish-actions.pod:1880
18588 #: ../fish/guestfish-actions.pod:1887
18593 #: ../fish/guestfish-actions.pod:1889
18601 #: ../fish/guestfish-actions.pod:1897
18602 msgid "is-launching"
18606 #: ../fish/guestfish-actions.pod:1899
18614 #: ../fish/guestfish-actions.pod:1906
18619 #: ../fish/guestfish-actions.pod:1908
18627 #: ../fish/guestfish-actions.pod:1913
18632 #: ../fish/guestfish-actions.pod:1915
18640 #: ../fish/guestfish-actions.pod:1922
18645 #: ../fish/guestfish-actions.pod:1924
18648 " is-socket path\n"
18653 #: ../fish/guestfish-actions.pod:1931
18658 #: ../fish/guestfish-actions.pod:1933
18661 " is-symlink path\n"
18666 #: ../fish/guestfish-actions.pod:1940
18667 msgid "kill-subprocess"
18671 #: ../fish/guestfish-actions.pod:1942
18674 " kill-subprocess\n"
18679 #: ../fish/guestfish-actions.pod:1946
18684 #: ../fish/guestfish-actions.pod:1948
18689 #: ../fish/guestfish-actions.pod:1950
18697 #: ../fish/guestfish-actions.pod:1958
18702 #: ../fish/guestfish-actions.pod:1960
18705 " lchown owner group path\n"
18710 #: ../fish/guestfish-actions.pod:1962
18712 "Change the file owner to C<owner> and group to C<group>. This is like "
18713 "L</chown> but if C<path> is a symlink then the link itself is changed, not "
18718 #: ../fish/guestfish-actions.pod:1970
18723 #: ../fish/guestfish-actions.pod:1972
18726 " lgetxattrs path\n"
18731 #: ../fish/guestfish-actions.pod:1974
18733 "This is the same as L</getxattrs>, but if C<path> is a symbolic link, then "
18734 "it returns the extended attributes of the link itself."
18738 #: ../fish/guestfish-actions.pod:1978
18739 msgid "list-devices"
18743 #: ../fish/guestfish-actions.pod:1980
18751 #: ../fish/guestfish-actions.pod:1988
18752 msgid "list-filesystems"
18756 #: ../fish/guestfish-actions.pod:1990
18759 " list-filesystems\n"
18764 #: ../fish/guestfish-actions.pod:2009
18766 "This command runs other libguestfs commands, which might include L</mount> "
18767 "and L</umount>, and therefore you should use this soon after launch and only "
18768 "when nothing is mounted."
18772 #: ../fish/guestfish-actions.pod:2013
18774 "Not all of the filesystems returned will be mountable. In particular, swap "
18775 "partitions are returned in the list. Also this command does not check that "
18776 "each filesystem found is valid and mountable, and some filesystems might be "
18777 "mountable but require special options. Filesystems may not all belong to a "
18778 "single logical operating system (use L</inspect-os> to look for OSes)."
18782 #: ../fish/guestfish-actions.pod:2021
18783 msgid "list-partitions"
18787 #: ../fish/guestfish-actions.pod:2023
18790 " list-partitions\n"
18795 #: ../fish/guestfish-actions.pod:2029
18797 "This does not return logical volumes. For that you will need to call "
18802 #: ../fish/guestfish-actions.pod:2034
18807 #: ../fish/guestfish-actions.pod:2036
18815 #: ../fish/guestfish-actions.pod:2044
18820 #: ../fish/guestfish-actions.pod:2046
18823 " ln target linkname\n"
18828 #: ../fish/guestfish-actions.pod:2050
18833 #: ../fish/guestfish-actions.pod:2052
18836 " ln-f target linkname\n"
18841 #: ../fish/guestfish-actions.pod:2057
18846 #: ../fish/guestfish-actions.pod:2059
18849 " ln-s target linkname\n"
18854 #: ../fish/guestfish-actions.pod:2063
18859 #: ../fish/guestfish-actions.pod:2065
18862 " ln-sf target linkname\n"
18867 #: ../fish/guestfish-actions.pod:2070
18868 msgid "lremovexattr"
18872 #: ../fish/guestfish-actions.pod:2072
18875 " lremovexattr xattr path\n"
18880 #: ../fish/guestfish-actions.pod:2074
18882 "This is the same as L</removexattr>, but if C<path> is a symbolic link, then "
18883 "it removes an extended attribute of the link itself."
18887 #: ../fish/guestfish-actions.pod:2078
18892 #: ../fish/guestfish-actions.pod:2080
18900 #: ../fish/guestfish-actions.pod:2086
18902 "This command is mostly useful for interactive sessions. Programs should "
18903 "probably use L</readdir> instead."
18907 #: ../fish/guestfish-actions.pod:2089
18912 #: ../fish/guestfish-actions.pod:2091
18915 " lsetxattr xattr val vallen path\n"
18920 #: ../fish/guestfish-actions.pod:2093
18922 "This is the same as L</setxattr>, but if C<path> is a symbolic link, then it "
18923 "sets an extended attribute of the link itself."
18927 #: ../fish/guestfish-actions.pod:2097
18932 #: ../fish/guestfish-actions.pod:2099
18940 #: ../fish/guestfish-actions.pod:2103
18942 "This is the same as L</stat> except that if C<path> is a symbolic link, then "
18943 "the link is stat-ed, not the file it refers to."
18947 #: ../fish/guestfish-actions.pod:2109
18952 #: ../fish/guestfish-actions.pod:2111
18955 " lstatlist path 'names ...'\n"
18960 #: ../fish/guestfish-actions.pod:2113
18962 "This call allows you to perform the L</lstat> operation on multiple files, "
18963 "where all files are in the directory C<path>. C<names> is the list of files "
18964 "from this directory."
18968 #: ../fish/guestfish-actions.pod:2122
18970 "This call is intended for programs that want to efficiently list a directory "
18971 "contents without making many round-trips. See also L</lxattrlist> for a "
18972 "similarly efficient call for getting extended attributes. Very long "
18973 "directory listings might cause the protocol message size to be exceeded, "
18974 "causing this call to fail. The caller must split up such requests into "
18975 "smaller groups of names."
18979 #: ../fish/guestfish-actions.pod:2130
18980 msgid "luks-add-key"
18984 #: ../fish/guestfish-actions.pod:2132
18987 " luks-add-key device keyslot\n"
18992 #: ../fish/guestfish-actions.pod:2139
18994 "Note that if C<keyslot> already contains a key, then this command will "
18995 "fail. You have to use L</luks-kill-slot> first to remove that key."
18999 #: ../fish/guestfish-actions.pod:2143 ../fish/guestfish-actions.pod:2165 ../fish/guestfish-actions.pod:2178 ../fish/guestfish-actions.pod:2192 ../fish/guestfish-actions.pod:2215 ../fish/guestfish-actions.pod:2225
19001 "This command has one or more key or passphrase parameters. Guestfish will "
19002 "prompt for these separately."
19006 #: ../fish/guestfish-actions.pod:2146
19011 #: ../fish/guestfish-actions.pod:2148
19014 " luks-close device\n"
19019 #: ../fish/guestfish-actions.pod:2150
19021 "This closes a LUKS device that was created earlier by L</luks-open> or "
19022 "L</luks-open-ro>. The C<device> parameter must be the name of the LUKS "
19023 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
19024 "underlying block device."
19028 #: ../fish/guestfish-actions.pod:2156
19029 msgid "luks-format"
19033 #: ../fish/guestfish-actions.pod:2158
19036 " luks-format device keyslot\n"
19041 #: ../fish/guestfish-actions.pod:2171
19042 msgid "luks-format-cipher"
19046 #: ../fish/guestfish-actions.pod:2173
19049 " luks-format-cipher device keyslot cipher\n"
19054 #: ../fish/guestfish-actions.pod:2175
19056 "This command is the same as L</luks-format> but it also allows you to set "
19057 "the C<cipher> used."
19061 #: ../fish/guestfish-actions.pod:2184
19062 msgid "luks-kill-slot"
19066 #: ../fish/guestfish-actions.pod:2186
19069 " luks-kill-slot device keyslot\n"
19074 #: ../fish/guestfish-actions.pod:2195
19079 #: ../fish/guestfish-actions.pod:2197
19082 " luks-open device mapname\n"
19087 #: ../fish/guestfish-actions.pod:2211
19089 "If this block device contains LVM volume groups, then calling L</vgscan> "
19090 "followed by L</vg-activate-all> will make them visible."
19094 #: ../fish/guestfish-actions.pod:2218
19095 msgid "luks-open-ro"
19099 #: ../fish/guestfish-actions.pod:2220
19102 " luks-open-ro device mapname\n"
19107 #: ../fish/guestfish-actions.pod:2222
19109 "This is the same as L</luks-open> except that a read-only mapping is "
19114 #: ../fish/guestfish-actions.pod:2228
19119 #: ../fish/guestfish-actions.pod:2230
19122 " lvcreate logvol volgroup mbytes\n"
19127 #: ../fish/guestfish-actions.pod:2235
19128 msgid "lvm-clear-filter"
19132 #: ../fish/guestfish-actions.pod:2237
19135 " lvm-clear-filter\n"
19140 #: ../fish/guestfish-actions.pod:2239
19142 "This undoes the effect of L</lvm-set-filter>. LVM will be able to see every "
19147 #: ../fish/guestfish-actions.pod:2245
19148 msgid "lvm-remove-all"
19152 #: ../fish/guestfish-actions.pod:2247
19155 " lvm-remove-all\n"
19160 #: ../fish/guestfish-actions.pod:2255
19161 msgid "lvm-set-filter"
19165 #: ../fish/guestfish-actions.pod:2257
19168 " lvm-set-filter 'devices ...'\n"
19173 #: ../fish/guestfish-actions.pod:2282
19178 #: ../fish/guestfish-actions.pod:2284
19181 " lvremove device\n"
19186 #: ../fish/guestfish-actions.pod:2292
19191 #: ../fish/guestfish-actions.pod:2294
19194 " lvrename logvol newlogvol\n"
19199 #: ../fish/guestfish-actions.pod:2298
19204 #: ../fish/guestfish-actions.pod:2300
19207 " lvresize device mbytes\n"
19212 #: ../fish/guestfish-actions.pod:2306
19213 msgid "lvresize-free"
19217 #: ../fish/guestfish-actions.pod:2308
19220 " lvresize-free lv percent\n"
19225 #: ../fish/guestfish-actions.pod:2316
19230 #: ../fish/guestfish-actions.pod:2318
19238 #: ../fish/guestfish-actions.pod:2326
19239 msgid "See also L</lvs-full>, L</list-filesystems>."
19243 #: ../fish/guestfish-actions.pod:2328
19248 #: ../fish/guestfish-actions.pod:2330
19256 #: ../fish/guestfish-actions.pod:2335
19261 #: ../fish/guestfish-actions.pod:2337
19269 #: ../fish/guestfish-actions.pod:2341
19274 #: ../fish/guestfish-actions.pod:2343
19277 " lxattrlist path 'names ...'\n"
19282 #: ../fish/guestfish-actions.pod:2359
19284 "This call is intended for programs that want to efficiently list a directory "
19285 "contents without making many round-trips. See also L</lstatlist> for a "
19286 "similarly efficient call for getting standard stats. Very long directory "
19287 "listings might cause the protocol message size to be exceeded, causing this "
19288 "call to fail. The caller must split up such requests into smaller groups of "
19293 #: ../fish/guestfish-actions.pod:2367
19298 #: ../fish/guestfish-actions.pod:2369
19306 #: ../fish/guestfish-actions.pod:2373
19311 #: ../fish/guestfish-actions.pod:2375
19314 " mkdir-mode path mode\n"
19319 #: ../fish/guestfish-actions.pod:2384
19320 msgid "See also L</mkdir>, L</umask>"
19324 #: ../fish/guestfish-actions.pod:2386
19329 #: ../fish/guestfish-actions.pod:2388
19337 #: ../fish/guestfish-actions.pod:2393
19342 #: ../fish/guestfish-actions.pod:2395
19345 " mkdtemp template\n"
19350 #: ../fish/guestfish-actions.pod:2416
19355 #: ../fish/guestfish-actions.pod:2418
19358 " mke2fs-J fstype blocksize device journal\n"
19363 #: ../fish/guestfish-actions.pod:2426
19364 msgid "See also L</mke2journal>."
19368 #: ../fish/guestfish-actions.pod:2428
19373 #: ../fish/guestfish-actions.pod:2430
19376 " mke2fs-JL fstype blocksize device label\n"
19381 #: ../fish/guestfish-actions.pod:2435
19382 msgid "See also L</mke2journal-L>."
19386 #: ../fish/guestfish-actions.pod:2437
19391 #: ../fish/guestfish-actions.pod:2439
19394 " mke2fs-JU fstype blocksize device uuid\n"
19399 #: ../fish/guestfish-actions.pod:2444
19400 msgid "See also L</mke2journal-U>."
19404 #: ../fish/guestfish-actions.pod:2446
19405 msgid "mke2journal"
19409 #: ../fish/guestfish-actions.pod:2448
19412 " mke2journal blocksize device\n"
19417 #: ../fish/guestfish-actions.pod:2455
19418 msgid "mke2journal-L"
19422 #: ../fish/guestfish-actions.pod:2457
19425 " mke2journal-L blocksize label device\n"
19430 #: ../fish/guestfish-actions.pod:2461
19431 msgid "mke2journal-U"
19435 #: ../fish/guestfish-actions.pod:2463
19438 " mke2journal-U blocksize uuid device\n"
19443 #: ../fish/guestfish-actions.pod:2467
19448 #: ../fish/guestfish-actions.pod:2469
19451 " mkfifo mode path\n"
19456 #: ../fish/guestfish-actions.pod:2471
19458 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
19459 "is just a convenient wrapper around L</mknod>."
19463 #: ../fish/guestfish-actions.pod:2477
19468 #: ../fish/guestfish-actions.pod:2479
19471 " mkfs fstype device\n"
19476 #: ../fish/guestfish-actions.pod:2485
19481 #: ../fish/guestfish-actions.pod:2487
19484 " mkfs-b fstype blocksize device\n"
19489 #: ../fish/guestfish-actions.pod:2489
19491 "This call is similar to L</mkfs>, but it allows you to control the block "
19492 "size of the resulting filesystem. Supported block sizes depend on the "
19493 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
19497 #: ../fish/guestfish-actions.pod:2497
19498 msgid "mkmountpoint"
19502 #: ../fish/guestfish-actions.pod:2499
19505 " mkmountpoint exemptpath\n"
19510 #: ../fish/guestfish-actions.pod:2501
19512 "L</mkmountpoint> and L</rmmountpoint> are specialized calls that can be used "
19513 "to create extra mountpoints before mounting the first filesystem."
19517 #: ../fish/guestfish-actions.pod:2525
19522 #: ../fish/guestfish-actions.pod:2527
19525 " mknod mode devmajor devminor path\n"
19530 #: ../fish/guestfish-actions.pod:2537
19532 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
19533 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
19534 "regular file). These constants are available in the standard Linux header "
19535 "files, or you can use L</mknod-b>, L</mknod-c> or L</mkfifo> which are "
19536 "wrappers around this command which bitwise OR in the appropriate constant "
19541 #: ../fish/guestfish-actions.pod:2547
19546 #: ../fish/guestfish-actions.pod:2549
19549 " mknod-b mode devmajor devminor path\n"
19554 #: ../fish/guestfish-actions.pod:2551
19556 "This call creates a block device node called C<path> with mode C<mode> and "
19557 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
19558 "wrapper around L</mknod>."
19562 #: ../fish/guestfish-actions.pod:2557
19567 #: ../fish/guestfish-actions.pod:2559
19570 " mknod-c mode devmajor devminor path\n"
19575 #: ../fish/guestfish-actions.pod:2561
19577 "This call creates a char device node called C<path> with mode C<mode> and "
19578 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
19579 "wrapper around L</mknod>."
19583 #: ../fish/guestfish-actions.pod:2567
19588 #: ../fish/guestfish-actions.pod:2569
19596 #: ../fish/guestfish-actions.pod:2573
19601 #: ../fish/guestfish-actions.pod:2575
19604 " mkswap-L label device\n"
19609 #: ../fish/guestfish-actions.pod:2583
19614 #: ../fish/guestfish-actions.pod:2585
19617 " mkswap-U uuid device\n"
19622 #: ../fish/guestfish-actions.pod:2589
19623 msgid "mkswap-file"
19627 #: ../fish/guestfish-actions.pod:2591
19630 " mkswap-file path\n"
19635 #: ../fish/guestfish-actions.pod:2595
19637 "This command just writes a swap file signature to an existing file. To "
19638 "create the file itself, use something like L</fallocate>."
19642 #: ../fish/guestfish-actions.pod:2598
19647 #: ../fish/guestfish-actions.pod:2600
19650 " modprobe modulename\n"
19655 #: ../fish/guestfish-actions.pod:2607
19660 #: ../fish/guestfish-actions.pod:2609
19663 " mount device mountpoint\n"
19668 #: ../fish/guestfish-actions.pod:2625
19670 "B<Important note:> When you use this call, the filesystem options C<sync> "
19671 "and C<noatime> are set implicitly. This was originally done because we "
19672 "thought it would improve reliability, but it turns out that I<-o sync> has a "
19673 "very large negative performance impact and negligible effect on "
19674 "reliability. Therefore we recommend that you avoid using L</mount> in any "
19675 "code that needs performance, and instead use L</mount-options> (use an empty "
19676 "string for the first parameter if you don't want any options)."
19680 #: ../fish/guestfish-actions.pod:2635
19685 #: ../fish/guestfish-actions.pod:2637
19688 " mount-loop file mountpoint\n"
19693 #: ../fish/guestfish-actions.pod:2643
19694 msgid "mount-options"
19698 #: ../fish/guestfish-actions.pod:2645
19701 " mount-options options device mountpoint\n"
19706 #: ../fish/guestfish-actions.pod:2647
19708 "This is the same as the L</mount> command, but it allows you to set the "
19709 "mount options as for the L<mount(8)> I<-o> flag."
19713 #: ../fish/guestfish-actions.pod:2655
19718 #: ../fish/guestfish-actions.pod:2657
19721 " mount-ro device mountpoint\n"
19726 #: ../fish/guestfish-actions.pod:2659
19728 "This is the same as the L</mount> command, but it mounts the filesystem with "
19729 "the read-only (I<-o ro>) flag."
19733 #: ../fish/guestfish-actions.pod:2662
19738 #: ../fish/guestfish-actions.pod:2664
19741 " mount-vfs options vfstype device mountpoint\n"
19746 #: ../fish/guestfish-actions.pod:2666
19748 "This is the same as the L</mount> command, but it allows you to set both the "
19749 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
19753 #: ../fish/guestfish-actions.pod:2670
19754 msgid "mountpoints"
19758 #: ../fish/guestfish-actions.pod:2672
19766 #: ../fish/guestfish-actions.pod:2674
19768 "This call is similar to L</mounts>. That call returns a list of devices. "
19769 "This one returns a hash table (map) of device name to directory where the "
19770 "device is mounted."
19774 #: ../fish/guestfish-actions.pod:2678
19779 #: ../fish/guestfish-actions.pod:2680
19787 #: ../fish/guestfish-actions.pod:2687
19788 msgid "See also: L</mountpoints>"
19792 #: ../fish/guestfish-actions.pod:2689
19797 #: ../fish/guestfish-actions.pod:2691
19805 #: ../fish/guestfish-actions.pod:2696
19806 msgid "ntfs-3g-probe"
19810 #: ../fish/guestfish-actions.pod:2698
19813 " ntfs-3g-probe true|false device\n"
19818 #: ../fish/guestfish-actions.pod:2712
19823 #: ../fish/guestfish-actions.pod:2714
19826 " ntfsresize device\n"
19831 #: ../fish/guestfish-actions.pod:2720
19832 msgid "ntfsresize-size"
19836 #: ../fish/guestfish-actions.pod:2722
19839 " ntfsresize-size device size\n"
19844 #: ../fish/guestfish-actions.pod:2724
19846 "This command is the same as L</ntfsresize> except that it allows you to "
19847 "specify the new size (in bytes) explicitly."
19851 #: ../fish/guestfish-actions.pod:2727
19856 #: ../fish/guestfish-actions.pod:2729
19859 " part-add device prlogex startsect endsect\n"
19864 #: ../fish/guestfish-actions.pod:2731
19866 "This command adds a partition to C<device>. If there is no partition table "
19867 "on the device, call L</part-init> first."
19871 #: ../fish/guestfish-actions.pod:2743
19873 "Creating a partition which covers the whole disk is not so easy. Use "
19874 "L</part-disk> to do that."
19878 #: ../fish/guestfish-actions.pod:2746
19883 #: ../fish/guestfish-actions.pod:2748
19886 " part-del device partnum\n"
19891 #: ../fish/guestfish-actions.pod:2756
19896 #: ../fish/guestfish-actions.pod:2758
19899 " part-disk device parttype\n"
19904 #: ../fish/guestfish-actions.pod:2760
19906 "This command is simply a combination of L</part-init> followed by "
19907 "L</part-add> to create a single primary partition covering the whole disk."
19911 #: ../fish/guestfish-actions.pod:2764
19913 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
19914 "possible values are described in L</part-init>."
19918 #: ../fish/guestfish-actions.pod:2770
19919 msgid "part-get-bootable"
19923 #: ../fish/guestfish-actions.pod:2772
19926 " part-get-bootable device partnum\n"
19931 #: ../fish/guestfish-actions.pod:2777
19932 msgid "See also L</part-set-bootable>."
19936 #: ../fish/guestfish-actions.pod:2779
19937 msgid "part-get-mbr-id"
19941 #: ../fish/guestfish-actions.pod:2781
19944 " part-get-mbr-id device partnum\n"
19949 #: ../fish/guestfish-actions.pod:2786 ../fish/guestfish-actions.pod:2924
19951 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
19952 "undefined results for other partition table types (see "
19953 "L</part-get-parttype>)."
19957 #: ../fish/guestfish-actions.pod:2790
19958 msgid "part-get-parttype"
19962 #: ../fish/guestfish-actions.pod:2792
19965 " part-get-parttype device\n"
19970 #: ../fish/guestfish-actions.pod:2797
19972 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
19973 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
19974 "possible, although unusual. See L</part-init> for a full list."
19978 #: ../fish/guestfish-actions.pod:2802
19983 #: ../fish/guestfish-actions.pod:2804
19986 " part-init device parttype\n"
19991 #: ../fish/guestfish-actions.pod:2810
19993 "Initially there are no partitions. Following this, you should call "
19994 "L</part-add> for each partition required."
19998 #: ../fish/guestfish-actions.pod:2873
20003 #: ../fish/guestfish-actions.pod:2875
20006 " part-list device\n"
20011 #: ../fish/guestfish-actions.pod:2890
20013 "Start of the partition I<in bytes>. To get sectors you have to divide by "
20014 "the device's sector size, see L</blockdev-getss>."
20018 #: ../fish/guestfish-actions.pod:2903
20019 msgid "part-set-bootable"
20023 #: ../fish/guestfish-actions.pod:2905
20026 " part-set-bootable device partnum true|false\n"
20031 #: ../fish/guestfish-actions.pod:2914
20032 msgid "part-set-mbr-id"
20036 #: ../fish/guestfish-actions.pod:2916
20039 " part-set-mbr-id device partnum idbyte\n"
20044 #: ../fish/guestfish-actions.pod:2928
20045 msgid "part-set-name"
20049 #: ../fish/guestfish-actions.pod:2930
20052 " part-set-name device partnum name\n"
20057 #: ../fish/guestfish-actions.pod:2938
20058 msgid "part-to-dev"
20062 #: ../fish/guestfish-actions.pod:2940
20065 " part-to-dev partition\n"
20070 #: ../fish/guestfish-actions.pod:2946
20072 "The named partition must exist, for example as a string returned from "
20073 "L</list-partitions>."
20077 #: ../fish/guestfish-actions.pod:2949
20078 msgid "ping-daemon"
20082 #: ../fish/guestfish-actions.pod:2951
20090 #: ../fish/guestfish-actions.pod:2958
20095 #: ../fish/guestfish-actions.pod:2960
20098 " pread path count offset\n"
20103 #: ../fish/guestfish-actions.pod:2968
20104 msgid "See also L</pwrite>, L</pread-device>."
20108 #: ../fish/guestfish-actions.pod:2973
20109 msgid "pread-device"
20113 #: ../fish/guestfish-actions.pod:2975
20116 " pread-device device count offset\n"
20121 #: ../fish/guestfish-actions.pod:2983
20122 msgid "See also L</pread>."
20126 #: ../fish/guestfish-actions.pod:2988
20131 #: ../fish/guestfish-actions.pod:2990
20134 " pvcreate device\n"
20139 #: ../fish/guestfish-actions.pod:2996
20144 #: ../fish/guestfish-actions.pod:2998
20147 " pvremove device\n"
20152 #: ../fish/guestfish-actions.pod:3007
20157 #: ../fish/guestfish-actions.pod:3009
20160 " pvresize device\n"
20165 #: ../fish/guestfish-actions.pod:3014
20166 msgid "pvresize-size"
20170 #: ../fish/guestfish-actions.pod:3016
20173 " pvresize-size device size\n"
20178 #: ../fish/guestfish-actions.pod:3018
20180 "This command is the same as L</pvresize> except that it allows you to "
20181 "specify the new size (in bytes) explicitly."
20185 #: ../fish/guestfish-actions.pod:3021
20190 #: ../fish/guestfish-actions.pod:3023
20198 #: ../fish/guestfish-actions.pod:3031
20199 msgid "See also L</pvs-full>."
20203 #: ../fish/guestfish-actions.pod:3033
20208 #: ../fish/guestfish-actions.pod:3035
20216 #: ../fish/guestfish-actions.pod:3040
20221 #: ../fish/guestfish-actions.pod:3042
20229 #: ../fish/guestfish-actions.pod:3046
20234 #: ../fish/guestfish-actions.pod:3048
20237 " pwrite path content offset\n"
20242 #: ../fish/guestfish-actions.pod:3059
20243 msgid "See also L</pread>, L</pwrite-device>."
20247 #: ../fish/guestfish-actions.pod:3064
20248 msgid "pwrite-device"
20252 #: ../fish/guestfish-actions.pod:3066
20255 " pwrite-device device content offset\n"
20260 #: ../fish/guestfish-actions.pod:3076
20261 msgid "See also L</pwrite>."
20265 #: ../fish/guestfish-actions.pod:3081
20270 #: ../fish/guestfish-actions.pod:3083
20273 " read-file path\n"
20278 #: ../fish/guestfish-actions.pod:3088
20280 "Unlike L</cat>, this function can correctly handle files that contain "
20281 "embedded ASCII NUL characters. However unlike L</download>, this function "
20282 "is limited in the total size of file that can be handled."
20286 #: ../fish/guestfish-actions.pod:3096
20291 #: ../fish/guestfish-actions.pod:3098
20294 " read-lines path\n"
20299 #: ../fish/guestfish-actions.pod:3105
20301 "Note that this function cannot correctly handle binary files (specifically, "
20302 "files containing C<\\0> character which is treated as end of line). For "
20303 "those you need to use the L</read-file> function which has a more complex "
20308 #: ../fish/guestfish-actions.pod:3110
20313 #: ../fish/guestfish-actions.pod:3112
20321 #: ../fish/guestfish-actions.pod:3164
20323 "This function is primarily intended for use by programs. To get a simple "
20324 "list of names, use L</ls>. To get a printable directory for human "
20325 "consumption, use L</ll>."
20329 #: ../fish/guestfish-actions.pod:3168
20334 #: ../fish/guestfish-actions.pod:3170
20342 #: ../fish/guestfish-actions.pod:3174
20343 msgid "readlinklist"
20347 #: ../fish/guestfish-actions.pod:3176
20350 " readlinklist path 'names ...'\n"
20355 #: ../fish/guestfish-actions.pod:3200
20360 #: ../fish/guestfish-actions.pod:3202
20368 #: ../fish/guestfish-actions.pod:3207
20369 msgid "removexattr"
20373 #: ../fish/guestfish-actions.pod:3209
20376 " removexattr xattr path\n"
20381 #: ../fish/guestfish-actions.pod:3214
20382 msgid "See also: L</lremovexattr>, L<attr(5)>."
20386 #: ../fish/guestfish-actions.pod:3216
20391 #: ../fish/guestfish-actions.pod:3218
20394 " resize2fs device\n"
20399 #: ../fish/guestfish-actions.pod:3223
20401 "I<Note:> It is sometimes required that you run L</e2fsck-f> on the C<device> "
20402 "before calling this command. For unknown reasons C<resize2fs> sometimes "
20403 "gives an error about this and sometimes not. In any case, it is always safe "
20404 "to call L</e2fsck-f> before calling this function."
20408 #: ../fish/guestfish-actions.pod:3229
20409 msgid "resize2fs-size"
20413 #: ../fish/guestfish-actions.pod:3231
20416 " resize2fs-size device size\n"
20421 #: ../fish/guestfish-actions.pod:3233
20423 "This command is the same as L</resize2fs> except that it allows you to "
20424 "specify the new size (in bytes) explicitly."
20428 #: ../fish/guestfish-actions.pod:3236
20433 #: ../fish/guestfish-actions.pod:3238
20441 #: ../fish/guestfish-actions.pod:3242
20446 #: ../fish/guestfish-actions.pod:3244
20454 #: ../fish/guestfish-actions.pod:3250
20459 #: ../fish/guestfish-actions.pod:3252
20467 #: ../fish/guestfish-actions.pod:3256
20468 msgid "rmmountpoint"
20472 #: ../fish/guestfish-actions.pod:3258
20475 " rmmountpoint exemptpath\n"
20480 #: ../fish/guestfish-actions.pod:3260
20482 "This calls removes a mountpoint that was previously created with "
20483 "L</mkmountpoint>. See L</mkmountpoint> for full details."
20487 #: ../fish/guestfish-actions.pod:3264
20488 msgid "scrub-device"
20492 #: ../fish/guestfish-actions.pod:3266
20495 " scrub-device device\n"
20500 #: ../fish/guestfish-actions.pod:3277
20505 #: ../fish/guestfish-actions.pod:3279
20508 " scrub-file file\n"
20513 #: ../fish/guestfish-actions.pod:3289
20514 msgid "scrub-freespace"
20518 #: ../fish/guestfish-actions.pod:3291
20521 " scrub-freespace dir\n"
20526 #: ../fish/guestfish-actions.pod:3293
20528 "This command creates the directory C<dir> and then fills it with files until "
20529 "the filesystem is full, and scrubs the files as for L</scrub-file>, and "
20530 "deletes them. The intention is to scrub any free space on the partition "
20531 "containing C<dir>."
20535 #: ../fish/guestfish-actions.pod:3302
20540 #: ../fish/guestfish-actions.pod:3304
20545 #: ../fish/guestfish-actions.pod:3306
20548 " set-append append\n"
20553 #: ../fish/guestfish-actions.pod:3317
20554 msgid "set-autosync"
20558 #: ../fish/guestfish-actions.pod:3319
20563 #: ../fish/guestfish-actions.pod:3321
20566 " set-autosync true|false\n"
20571 #: ../fish/guestfish-actions.pod:3323
20573 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
20574 "effort attempt to run L</umount-all> followed by L</sync> when the handle is "
20575 "closed (also if the program exits without closing handles)."
20579 #: ../fish/guestfish-actions.pod:3331
20584 #: ../fish/guestfish-actions.pod:3333
20589 #: ../fish/guestfish-actions.pod:3335
20592 " set-direct true|false\n"
20597 #: ../fish/guestfish-actions.pod:3341
20599 "One consequence of this is that log messages aren't caught by the library "
20600 "and handled by L</set-log-message-callback>, but go straight to stdout."
20604 #: ../fish/guestfish-actions.pod:3350
20605 msgid "set-e2label"
20609 #: ../fish/guestfish-actions.pod:3352
20612 " set-e2label device label\n"
20617 #: ../fish/guestfish-actions.pod:3358
20619 "You can use either L</tune2fs-l> or L</get-e2label> to return the existing "
20620 "label on a filesystem."
20624 #: ../fish/guestfish-actions.pod:3361
20629 #: ../fish/guestfish-actions.pod:3363
20632 " set-e2uuid device uuid\n"
20637 #: ../fish/guestfish-actions.pod:3370
20639 "You can use either L</tune2fs-l> or L</get-e2uuid> to return the existing "
20640 "UUID of a filesystem."
20644 #: ../fish/guestfish-actions.pod:3373
20645 msgid "set-memsize"
20649 #: ../fish/guestfish-actions.pod:3375
20654 #: ../fish/guestfish-actions.pod:3377
20657 " set-memsize memsize\n"
20662 #: ../fish/guestfish-actions.pod:3379
20664 "This sets the memory size in megabytes allocated to the qemu subprocess. "
20665 "This only has any effect if called before L</launch>."
20669 #: ../fish/guestfish-actions.pod:3390
20670 msgid "set-network"
20674 #: ../fish/guestfish-actions.pod:3392
20679 #: ../fish/guestfish-actions.pod:3394
20682 " set-network true|false\n"
20687 #: ../fish/guestfish-actions.pod:3402
20688 msgid "You must call this before calling L</launch>, otherwise it has no effect."
20692 #: ../fish/guestfish-actions.pod:3405
20697 #: ../fish/guestfish-actions.pod:3407
20702 #: ../fish/guestfish-actions.pod:3409
20705 " set-path searchpath\n"
20710 #: ../fish/guestfish-actions.pod:3418
20715 #: ../fish/guestfish-actions.pod:3420
20720 #: ../fish/guestfish-actions.pod:3422
20728 #: ../fish/guestfish-actions.pod:3442
20729 msgid "set-recovery-proc"
20733 #: ../fish/guestfish-actions.pod:3444
20734 msgid "recovery-proc"
20738 #: ../fish/guestfish-actions.pod:3446
20741 " set-recovery-proc true|false\n"
20746 #: ../fish/guestfish-actions.pod:3448
20748 "If this is called with the parameter C<false> then L</launch> does not "
20749 "create a recovery process. The purpose of the recovery process is to stop "
20750 "runaway qemu processes in the case where the main program aborts abruptly."
20754 #: ../fish/guestfish-actions.pod:3453
20756 "This only has any effect if called before L</launch>, and the default is "
20761 #: ../fish/guestfish-actions.pod:3462
20762 msgid "set-selinux"
20766 #: ../fish/guestfish-actions.pod:3464
20771 #: ../fish/guestfish-actions.pod:3466
20774 " set-selinux true|false\n"
20779 #: ../fish/guestfish-actions.pod:3477
20784 #: ../fish/guestfish-actions.pod:3479
20789 #: ../fish/guestfish-actions.pod:3481
20792 " set-trace true|false\n"
20797 #: ../fish/guestfish-actions.pod:3497
20798 msgid "set-verbose"
20802 #: ../fish/guestfish-actions.pod:3499
20807 #: ../fish/guestfish-actions.pod:3501
20810 " set-verbose true|false\n"
20815 #: ../fish/guestfish-actions.pod:3508
20820 #: ../fish/guestfish-actions.pod:3510
20823 " setcon context\n"
20828 #: ../fish/guestfish-actions.pod:3517
20833 #: ../fish/guestfish-actions.pod:3519
20836 " setxattr xattr val vallen path\n"
20841 #: ../fish/guestfish-actions.pod:3525
20842 msgid "See also: L</lsetxattr>, L<attr(5)>."
20846 #: ../fish/guestfish-actions.pod:3527
20851 #: ../fish/guestfish-actions.pod:3529
20854 " sfdisk device cyls heads sectors 'lines ...'\n"
20859 #: ../fish/guestfish-actions.pod:3551
20860 msgid "See also: L</sfdisk-l>, L</sfdisk-N>, L</part-init>"
20864 #: ../fish/guestfish-actions.pod:3557
20869 #: ../fish/guestfish-actions.pod:3559
20872 " sfdiskM device 'lines ...'\n"
20877 #: ../fish/guestfish-actions.pod:3561
20879 "This is a simplified interface to the L</sfdisk> command, where partition "
20880 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
20881 "you don't need to specify the cyls, heads and sectors parameters which were "
20882 "rarely if ever used anyway."
20886 #: ../fish/guestfish-actions.pod:3567
20887 msgid "See also: L</sfdisk>, the L<sfdisk(8)> manpage and L</part-disk>"
20891 #: ../fish/guestfish-actions.pod:3573
20896 #: ../fish/guestfish-actions.pod:3575
20899 " sfdisk-N device partnum cyls heads sectors line\n"
20904 #: ../fish/guestfish-actions.pod:3580
20906 "For other parameters, see L</sfdisk>. You should usually pass C<0> for the "
20907 "cyls/heads/sectors parameters."
20911 #: ../fish/guestfish-actions.pod:3583
20912 msgid "See also: L</part-add>"
20916 #: ../fish/guestfish-actions.pod:3588
20917 msgid "sfdisk-disk-geometry"
20921 #: ../fish/guestfish-actions.pod:3590
20924 " sfdisk-disk-geometry device\n"
20929 #: ../fish/guestfish-actions.pod:3592
20931 "This displays the disk geometry of C<device> read from the partition table. "
20932 "Especially in the case where the underlying block device has been resized, "
20933 "this can be different from the kernel's idea of the geometry (see "
20934 "L</sfdisk-kernel-geometry>)."
20938 #: ../fish/guestfish-actions.pod:3600
20939 msgid "sfdisk-kernel-geometry"
20943 #: ../fish/guestfish-actions.pod:3602
20946 " sfdisk-kernel-geometry device\n"
20951 #: ../fish/guestfish-actions.pod:3609
20956 #: ../fish/guestfish-actions.pod:3611
20959 " sfdisk-l device\n"
20964 #: ../fish/guestfish-actions.pod:3617
20965 msgid "See also: L</part-list>"
20969 #: ../fish/guestfish-actions.pod:3619
20974 #: ../fish/guestfish-actions.pod:3621
20982 #: ../fish/guestfish-actions.pod:3626
20983 msgid "This is like L</command>, but passes the command to:"
20987 #: ../fish/guestfish-actions.pod:3634
20988 msgid "All the provisos about L</command> apply to this call."
20992 #: ../fish/guestfish-actions.pod:3636
20997 #: ../fish/guestfish-actions.pod:3638
21000 " sh-lines command\n"
21005 #: ../fish/guestfish-actions.pod:3640
21006 msgid "This is the same as L</sh>, but splits the result into a list of lines."
21010 #: ../fish/guestfish-actions.pod:3643
21011 msgid "See also: L</command-lines>"
21015 #: ../fish/guestfish-actions.pod:3645
21020 #: ../fish/guestfish-actions.pod:3647
21028 #: ../fish/guestfish-actions.pod:3651
21033 #: ../fish/guestfish-actions.pod:3653
21041 #: ../fish/guestfish-actions.pod:3659
21046 #: ../fish/guestfish-actions.pod:3661
21054 #: ../fish/guestfish-actions.pod:3669
21059 #: ../fish/guestfish-actions.pod:3671
21067 #: ../fish/guestfish-actions.pod:3679
21072 #: ../fish/guestfish-actions.pod:3681
21075 " strings-e encoding path\n"
21080 #: ../fish/guestfish-actions.pod:3683
21082 "This is like the L</strings> command, but allows you to specify the encoding "
21083 "of strings that are looked for in the source file C<path>."
21087 #: ../fish/guestfish-actions.pod:3693
21089 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
21090 "ISO-8859-X (this is what L</strings> uses)."
21094 #: ../fish/guestfish-actions.pod:3725
21095 msgid "swapoff-device"
21099 #: ../fish/guestfish-actions.pod:3727
21102 " swapoff-device device\n"
21107 #: ../fish/guestfish-actions.pod:3729
21109 "This command disables the libguestfs appliance swap device or partition "
21110 "named C<device>. See L</swapon-device>."
21114 #: ../fish/guestfish-actions.pod:3733
21115 msgid "swapoff-file"
21119 #: ../fish/guestfish-actions.pod:3735
21122 " swapoff-file file\n"
21127 #: ../fish/guestfish-actions.pod:3739
21128 msgid "swapoff-label"
21132 #: ../fish/guestfish-actions.pod:3741
21135 " swapoff-label label\n"
21140 #: ../fish/guestfish-actions.pod:3746
21141 msgid "swapoff-uuid"
21145 #: ../fish/guestfish-actions.pod:3748
21148 " swapoff-uuid uuid\n"
21153 #: ../fish/guestfish-actions.pod:3753
21154 msgid "swapon-device"
21158 #: ../fish/guestfish-actions.pod:3755
21161 " swapon-device device\n"
21166 #: ../fish/guestfish-actions.pod:3757
21168 "This command enables the libguestfs appliance to use the swap device or "
21169 "partition named C<device>. The increased memory is made available for all "
21170 "commands, for example those run using L</command> or L</sh>."
21174 #: ../fish/guestfish-actions.pod:3769
21175 msgid "swapon-file"
21179 #: ../fish/guestfish-actions.pod:3771
21182 " swapon-file file\n"
21187 #: ../fish/guestfish-actions.pod:3773
21188 msgid "This command enables swap to a file. See L</swapon-device> for other notes."
21192 #: ../fish/guestfish-actions.pod:3776
21193 msgid "swapon-label"
21197 #: ../fish/guestfish-actions.pod:3778
21200 " swapon-label label\n"
21205 #: ../fish/guestfish-actions.pod:3780
21207 "This command enables swap to a labeled swap partition. See "
21208 "L</swapon-device> for other notes."
21212 #: ../fish/guestfish-actions.pod:3783
21213 msgid "swapon-uuid"
21217 #: ../fish/guestfish-actions.pod:3785
21220 " swapon-uuid uuid\n"
21225 #: ../fish/guestfish-actions.pod:3787
21227 "This command enables swap to a swap partition with the given UUID. See "
21228 "L</swapon-device> for other notes."
21232 #: ../fish/guestfish-actions.pod:3790
21237 #: ../fish/guestfish-actions.pod:3792
21245 #: ../fish/guestfish-actions.pod:3800
21250 #: ../fish/guestfish-actions.pod:3802
21258 #: ../fish/guestfish-actions.pod:3810
21263 #: ../fish/guestfish-actions.pod:3812
21266 " tail-n nrlines path\n"
21271 #: ../fish/guestfish-actions.pod:3825
21276 #: ../fish/guestfish-actions.pod:3827
21279 " tar-in (tarfile|-) directory\n"
21284 #: ../fish/guestfish-actions.pod:3832
21285 msgid "To upload a compressed tarball, use L</tgz-in> or L</txz-in>."
21289 #: ../fish/guestfish-actions.pod:3837
21294 #: ../fish/guestfish-actions.pod:3839
21297 " tar-out directory (tarfile|-)\n"
21302 #: ../fish/guestfish-actions.pod:3844
21303 msgid "To download a compressed tarball, use L</tgz-out> or L</txz-out>."
21307 #: ../fish/guestfish-actions.pod:3849
21312 #: ../fish/guestfish-actions.pod:3851
21315 " tgz-in (tarball|-) directory\n"
21320 #: ../fish/guestfish-actions.pod:3856
21321 msgid "To upload an uncompressed tarball, use L</tar-in>."
21325 #: ../fish/guestfish-actions.pod:3860
21330 #: ../fish/guestfish-actions.pod:3862
21333 " tgz-out directory (tarball|-)\n"
21338 #: ../fish/guestfish-actions.pod:3867
21339 msgid "To download an uncompressed tarball, use L</tar-out>."
21343 #: ../fish/guestfish-actions.pod:3871
21348 #: ../fish/guestfish-actions.pod:3873
21356 #: ../fish/guestfish-actions.pod:3882
21361 #: ../fish/guestfish-actions.pod:3884
21369 #: ../fish/guestfish-actions.pod:3889
21370 msgid "truncate-size"
21374 #: ../fish/guestfish-actions.pod:3891
21377 " truncate-size path size\n"
21382 #: ../fish/guestfish-actions.pod:3896
21384 "If the current file size is less than C<size> then the file is extended to "
21385 "the required size with zero bytes. This creates a sparse file (ie. disk "
21386 "blocks are not allocated for the file until you write to it). To create a "
21387 "non-sparse file of zeroes, use L</fallocate64> instead."
21391 #: ../fish/guestfish-actions.pod:3902
21396 #: ../fish/guestfish-actions.pod:3904
21399 " tune2fs-l device\n"
21404 #: ../fish/guestfish-actions.pod:3914
21409 #: ../fish/guestfish-actions.pod:3916
21412 " txz-in (tarball|-) directory\n"
21417 #: ../fish/guestfish-actions.pod:3923
21422 #: ../fish/guestfish-actions.pod:3925
21425 " txz-out directory (tarball|-)\n"
21430 #: ../fish/guestfish-actions.pod:3932
21435 #: ../fish/guestfish-actions.pod:3934
21443 #: ../fish/guestfish-actions.pod:3948
21444 msgid "See also L</get-umask>, L<umask(2)>, L</mknod>, L</mkdir>."
21448 #: ../fish/guestfish-actions.pod:3953
21453 #: ../fish/guestfish-actions.pod:3955
21458 #: ../fish/guestfish-actions.pod:3957
21461 " umount pathordevice\n"
21466 #: ../fish/guestfish-actions.pod:3963
21471 #: ../fish/guestfish-actions.pod:3965
21472 msgid "unmount-all"
21476 #: ../fish/guestfish-actions.pod:3967
21484 #: ../fish/guestfish-actions.pod:3973
21489 #: ../fish/guestfish-actions.pod:3975
21492 " upload (filename|-) remotefilename\n"
21497 #: ../fish/guestfish-actions.pod:3982
21498 msgid "See also L</download>."
21502 #: ../fish/guestfish-actions.pod:3986
21503 msgid "upload-offset"
21507 #: ../fish/guestfish-actions.pod:3988
21510 " upload-offset (filename|-) remotefilename offset\n"
21515 #: ../fish/guestfish-actions.pod:4000
21517 "Note that there is no limit on the amount of data that can be uploaded with "
21518 "this call, unlike with L</pwrite>, and this call always writes the full "
21519 "amount unless an error occurs."
21523 #: ../fish/guestfish-actions.pod:4005
21524 msgid "See also L</upload>, L</pwrite>."
21528 #: ../fish/guestfish-actions.pod:4009
21533 #: ../fish/guestfish-actions.pod:4011
21536 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
21541 #: ../fish/guestfish-actions.pod:4030
21546 #: ../fish/guestfish-actions.pod:4032
21554 #: ../fish/guestfish-actions.pod:4059
21556 "I<Note:> Don't use this call to test for availability of features. In "
21557 "enterprise distributions we backport features from later versions into "
21558 "earlier versions, making this an unreliable way to test for features. Use "
21559 "L</available> instead."
21563 #: ../fish/guestfish-actions.pod:4065
21568 #: ../fish/guestfish-actions.pod:4067
21571 " vfs-label device\n"
21576 #: ../fish/guestfish-actions.pod:4074
21577 msgid "To find a filesystem from the label, use L</findfs-label>."
21581 #: ../fish/guestfish-actions.pod:4076
21586 #: ../fish/guestfish-actions.pod:4078
21589 " vfs-type device\n"
21594 #: ../fish/guestfish-actions.pod:4088
21599 #: ../fish/guestfish-actions.pod:4090
21602 " vfs-uuid device\n"
21607 #: ../fish/guestfish-actions.pod:4097
21608 msgid "To find a filesystem from the UUID, use L</findfs-uuid>."
21612 #: ../fish/guestfish-actions.pod:4099
21613 msgid "vg-activate"
21617 #: ../fish/guestfish-actions.pod:4101
21620 " vg-activate true|false 'volgroups ...'\n"
21625 #: ../fish/guestfish-actions.pod:4114
21626 msgid "vg-activate-all"
21630 #: ../fish/guestfish-actions.pod:4116
21633 " vg-activate-all true|false\n"
21638 #: ../fish/guestfish-actions.pod:4126
21643 #: ../fish/guestfish-actions.pod:4128
21646 " vgcreate volgroup 'physvols ...'\n"
21651 #: ../fish/guestfish-actions.pod:4133
21656 #: ../fish/guestfish-actions.pod:4135
21659 " vglvuuids vgname\n"
21664 #: ../fish/guestfish-actions.pod:4140
21666 "You can use this along with L</lvs> and L</lvuuid> calls to associate "
21667 "logical volumes and volume groups."
21671 #: ../fish/guestfish-actions.pod:4143
21672 msgid "See also L</vgpvuuids>."
21676 #: ../fish/guestfish-actions.pod:4145
21681 #: ../fish/guestfish-actions.pod:4147
21684 " vgpvuuids vgname\n"
21689 #: ../fish/guestfish-actions.pod:4152
21691 "You can use this along with L</pvs> and L</pvuuid> calls to associate "
21692 "physical volumes and volume groups."
21696 #: ../fish/guestfish-actions.pod:4155
21697 msgid "See also L</vglvuuids>."
21701 #: ../fish/guestfish-actions.pod:4157
21706 #: ../fish/guestfish-actions.pod:4159
21709 " vgremove vgname\n"
21714 #: ../fish/guestfish-actions.pod:4166
21719 #: ../fish/guestfish-actions.pod:4168
21722 " vgrename volgroup newvolgroup\n"
21727 #: ../fish/guestfish-actions.pod:4172
21732 #: ../fish/guestfish-actions.pod:4174
21740 #: ../fish/guestfish-actions.pod:4182
21741 msgid "See also L</vgs-full>."
21745 #: ../fish/guestfish-actions.pod:4184
21750 #: ../fish/guestfish-actions.pod:4186
21758 #: ../fish/guestfish-actions.pod:4191
21763 #: ../fish/guestfish-actions.pod:4193
21771 #: ../fish/guestfish-actions.pod:4198
21776 #: ../fish/guestfish-actions.pod:4200
21784 #: ../fish/guestfish-actions.pod:4204
21789 #: ../fish/guestfish-actions.pod:4206
21797 #: ../fish/guestfish-actions.pod:4211
21802 #: ../fish/guestfish-actions.pod:4213
21810 #: ../fish/guestfish-actions.pod:4218
21815 #: ../fish/guestfish-actions.pod:4220
21823 #: ../fish/guestfish-actions.pod:4225
21828 #: ../fish/guestfish-actions.pod:4227
21831 " write path content\n"
21836 #: ../fish/guestfish-actions.pod:4235
21841 #: ../fish/guestfish-actions.pod:4237
21844 " write-file path content size\n"
21849 #: ../fish/guestfish-actions.pod:4260
21854 #: ../fish/guestfish-actions.pod:4262
21857 " zegrep regex path\n"
21862 #: ../fish/guestfish-actions.pod:4270
21867 #: ../fish/guestfish-actions.pod:4272
21870 " zegrepi regex path\n"
21875 #: ../fish/guestfish-actions.pod:4280
21880 #: ../fish/guestfish-actions.pod:4282
21888 #: ../fish/guestfish-actions.pod:4290
21889 msgid "See also: L</zero-device>, L</scrub-device>."
21893 #: ../fish/guestfish-actions.pod:4292
21894 msgid "zero-device"
21898 #: ../fish/guestfish-actions.pod:4294
21901 " zero-device device\n"
21906 #: ../fish/guestfish-actions.pod:4296
21908 "This command writes zeroes over the entire C<device>. Compare with L</zero> "
21909 "which just zeroes the first few blocks of a device."
21913 #: ../fish/guestfish-actions.pod:4303
21918 #: ../fish/guestfish-actions.pod:4305
21921 " zerofree device\n"
21926 #: ../fish/guestfish-actions.pod:4318
21931 #: ../fish/guestfish-actions.pod:4320
21934 " zfgrep pattern path\n"
21939 #: ../fish/guestfish-actions.pod:4328
21944 #: ../fish/guestfish-actions.pod:4330
21947 " zfgrepi pattern path\n"
21952 #: ../fish/guestfish-actions.pod:4338
21957 #: ../fish/guestfish-actions.pod:4340
21960 " zfile meth path\n"
21965 #: ../fish/guestfish-actions.pod:4347
21966 msgid "Since 1.0.63, use L</file> instead which can now process compressed files."
21970 #: ../fish/guestfish-actions.pod:4357
21975 #: ../fish/guestfish-actions.pod:4359
21978 " zgrep regex path\n"
21983 #: ../fish/guestfish-actions.pod:4367
21988 #: ../fish/guestfish-actions.pod:4369
21991 " zgrepi regex path\n"
21996 #: ../fish/guestfish-commands.pod:1
22001 #: ../fish/guestfish-commands.pod:3
22006 #: ../fish/guestfish-commands.pod:5
22009 " alloc filename size\n"
22014 #: ../fish/guestfish-commands.pod:7
22016 "This creates an empty (zeroed) file of the given size, and then adds so it "
22017 "can be further examined."
22021 #: ../fish/guestfish-commands.pod:10 ../fish/guestfish-commands.pod:168
22022 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
22026 #: ../fish/guestfish-commands.pod:12 ../fish/guestfish-commands.pod:170
22027 msgid "Size can be specified using standard suffixes, eg. C<1M>."
22031 #: ../fish/guestfish-commands.pod:14
22033 "To create a sparse file, use L</sparse> instead. To create a prepared disk "
22034 "image, see L</PREPARED DISK IMAGES>."
22038 #: ../fish/guestfish-commands.pod:17
22043 #: ../fish/guestfish-commands.pod:19
22046 " copy-in local [local ...] /remotedir\n"
22051 #: ../fish/guestfish-commands.pod:21
22053 "C<copy-in> copies local files or directories recursively into the disk "
22054 "image, placing them in the directory called C</remotedir> (which must "
22055 "exist). This guestfish meta-command turns into a sequence of L</tar-in> and "
22056 "other commands as necessary."
22060 #: ../fish/guestfish-commands.pod:26
22062 "Multiple local files and directories can be specified, but the last "
22063 "parameter must always be a remote directory. Wildcards cannot be used."
22067 #: ../fish/guestfish-commands.pod:30
22072 #: ../fish/guestfish-commands.pod:32
22075 " copy-out remote [remote ...] localdir\n"
22080 #: ../fish/guestfish-commands.pod:34
22082 "C<copy-out> copies remote files or directories recursively out of the disk "
22083 "image, placing them on the host disk in a local directory called C<localdir> "
22084 "(which must exist). This guestfish meta-command turns into a sequence of "
22085 "L</download>, L</tar-out> and other commands as necessary."
22089 #: ../fish/guestfish-commands.pod:40
22091 "Multiple remote files and directories can be specified, but the last "
22092 "parameter must always be a local directory. To download to the current "
22093 "directory, use C<.> as in:"
22097 #: ../fish/guestfish-commands.pod:44
22100 " copy-out /home .\n"
22105 #: ../fish/guestfish-commands.pod:46
22107 "Wildcards cannot be used in the ordinary command, but you can use them with "
22108 "the help of L</glob> like this:"
22112 #: ../fish/guestfish-commands.pod:49
22115 " glob copy-out /home/* .\n"
22120 #: ../fish/guestfish-commands.pod:51
22125 #: ../fish/guestfish-commands.pod:53
22128 " echo [params ...]\n"
22133 #: ../fish/guestfish-commands.pod:55
22134 msgid "This echos the parameters to the terminal."
22138 #: ../fish/guestfish-commands.pod:57
22143 #: ../fish/guestfish-commands.pod:59
22148 #: ../fish/guestfish-commands.pod:61
22153 #: ../fish/guestfish-commands.pod:63
22161 #: ../fish/guestfish-commands.pod:65
22163 "This is used to edit a file. It downloads the file, edits it locally using "
22164 "your editor, then uploads the result."
22168 #: ../fish/guestfish-commands.pod:68
22170 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
22171 "or C<emacs> you will get those corresponding editors."
22175 #: ../fish/guestfish-commands.pod:72
22180 #: ../fish/guestfish-commands.pod:74
22183 " glob command args...\n"
22188 #: ../fish/guestfish-commands.pod:76
22190 "Expand wildcards in any paths in the args list, and run C<command> "
22191 "repeatedly on each matching path."
22195 #: ../fish/guestfish-commands.pod:79
22196 msgid "See L</WILDCARDS AND GLOBBING>."
22200 #: ../fish/guestfish-commands.pod:81
22205 #: ../fish/guestfish-commands.pod:83
22208 " hexedit <filename|device>\n"
22209 " hexedit <filename|device> <max>\n"
22210 " hexedit <filename|device> <start> <max>\n"
22215 #: ../fish/guestfish-commands.pod:87
22217 "Use hexedit (a hex editor) to edit all or part of a binary file or block "
22222 #: ../fish/guestfish-commands.pod:90
22224 "This command works by downloading potentially the whole file or device, "
22225 "editing it locally, then uploading it. If the file or device is large, you "
22226 "have to specify which part you wish to edit by using C<max> and/or C<start> "
22227 "C<max> parameters. C<start> and C<max> are specified in bytes, with the "
22228 "usual modifiers allowed such as C<1M> (1 megabyte)."
22232 #: ../fish/guestfish-commands.pod:97
22233 msgid "For example to edit the first few sectors of a disk you might do:"
22237 #: ../fish/guestfish-commands.pod:100
22240 " hexedit /dev/sda 1M\n"
22245 #: ../fish/guestfish-commands.pod:102
22247 "which would allow you to edit anywhere within the first megabyte of the "
22252 #: ../fish/guestfish-commands.pod:105
22253 msgid "To edit the superblock of an ext2 filesystem on C</dev/sda1>, do:"
22257 #: ../fish/guestfish-commands.pod:107
22260 " hexedit /dev/sda1 0x400 0x400\n"
22265 #: ../fish/guestfish-commands.pod:109
22266 msgid "(assuming the superblock is in the standard location)."
22270 #: ../fish/guestfish-commands.pod:111
22272 "This command requires the external L<hexedit(1)> program. You can specify "
22273 "another program to use by setting the C<HEXEDITOR> environment variable."
22277 #: ../fish/guestfish-commands.pod:115
22278 msgid "See also L</hexdump>."
22282 #: ../fish/guestfish-commands.pod:117
22287 #: ../fish/guestfish-commands.pod:119
22295 #: ../fish/guestfish-commands.pod:121
22296 msgid "Change the local directory, ie. the current directory of guestfish itself."
22300 #: ../fish/guestfish-commands.pod:124
22301 msgid "Note that C<!cd> won't do what you might expect."
22305 #: ../fish/guestfish-commands.pod:126
22310 #: ../fish/guestfish-commands.pod:128
22315 #: ../fish/guestfish-commands.pod:130
22323 #: ../fish/guestfish-commands.pod:132
22324 msgid "Opens the manual page for guestfish."
22328 #: ../fish/guestfish-commands.pod:134
22333 #: ../fish/guestfish-commands.pod:136
22338 #: ../fish/guestfish-commands.pod:138
22346 #: ../fish/guestfish-commands.pod:140
22354 #: ../fish/guestfish-commands.pod:142
22355 msgid "This is used to view a file."
22359 #: ../fish/guestfish-commands.pod:144
22361 "The default viewer is C<$PAGER>. However if you use the alternate command "
22362 "C<less> you will get the C<less> command specifically."
22366 #: ../fish/guestfish-commands.pod:147
22371 #: ../fish/guestfish-commands.pod:149
22379 #: ../fish/guestfish-commands.pod:151
22381 "Close and reopen the libguestfs handle. It is not necessary to use this "
22382 "normally, because the handle is closed properly when guestfish exits. "
22383 "However this is occasionally useful for testing."
22387 #: ../fish/guestfish-commands.pod:155
22392 #: ../fish/guestfish-commands.pod:157
22395 " sparse filename size\n"
22400 #: ../fish/guestfish-commands.pod:159
22402 "This creates an empty sparse file of the given size, and then adds so it can "
22403 "be further examined."
22407 #: ../fish/guestfish-commands.pod:162
22409 "In all respects it works the same as the L</alloc> command, except that the "
22410 "image file is allocated sparsely, which means that disk blocks are not "
22411 "assigned to the file until they are needed. Sparse disk files only use "
22412 "space when written to, but they are slower and there is a danger you could "
22413 "run out of real disk space during a write operation."
22417 #: ../fish/guestfish-commands.pod:172
22422 #: ../fish/guestfish-commands.pod:174
22430 #: ../fish/guestfish-commands.pod:176
22432 "This command returns a list of the optional groups known to the daemon, and "
22433 "indicates which ones are supported by this build of the libguestfs "
22438 #: ../fish/guestfish-commands.pod:180
22439 msgid "See also L<guestfs(3)/AVAILABILITY>."
22443 #: ../fish/guestfish-commands.pod:182
22448 #: ../fish/guestfish-commands.pod:184
22451 " time command args...\n"
22456 #: ../fish/guestfish-commands.pod:186
22458 "Run the command as usual, but print the elapsed time afterwards. This can "
22459 "be useful for benchmarking operations."
22463 #: ../test-tool/libguestfs-test-tool.pod:5
22464 msgid "libguestfs-test-tool - End user tests for libguestfs"
22468 #: ../test-tool/libguestfs-test-tool.pod:9
22471 " libguestfs-test-tool [--options]\n"
22476 #: ../test-tool/libguestfs-test-tool.pod:13
22478 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
22479 "and developers, to allow them to check basic libguestfs functionality is "
22480 "working. This is needed because libguestfs occasionally breaks for reasons "
22481 "beyond our control: usually because of changes in the underlying qemu or "
22482 "kernel packages, or the host environment."
22486 #: ../test-tool/libguestfs-test-tool.pod:20
22487 msgid "If you suspect a problem in libguestfs, then just run:"
22491 #: ../test-tool/libguestfs-test-tool.pod:22
22494 " libguestfs-test-tool\n"
22499 #: ../test-tool/libguestfs-test-tool.pod:24
22500 msgid "It will print lots of diagnostic messages."
22504 #: ../test-tool/libguestfs-test-tool.pod:26
22505 msgid "If it runs to completion successfully, you will see this near the end:"
22509 #: ../test-tool/libguestfs-test-tool.pod:28
22512 " ===== TEST FINISHED OK =====\n"
22517 #: ../test-tool/libguestfs-test-tool.pod:30
22518 msgid "and the test tool will exit with code 0."
22522 #: ../test-tool/libguestfs-test-tool.pod:32
22524 "If it fails (and/or exits with non-zero error code), please paste the "
22525 "B<complete, unedited> output of the test tool into a bug report. More "
22526 "information about reporting bugs can be found on the "
22527 "L<http://libguestfs.org/> website."
22531 #: ../test-tool/libguestfs-test-tool.pod:41
22536 #: ../test-tool/libguestfs-test-tool.pod:43
22537 msgid "Display short usage information and exit."
22541 #: ../test-tool/libguestfs-test-tool.pod:45
22542 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
22546 #: ../test-tool/libguestfs-test-tool.pod:47
22548 "Pass an alternate name for the helper program. libguestfs-test-tool will "
22549 "normally look in the C<$libexec> directory that was configured when the tool "
22554 #: ../test-tool/libguestfs-test-tool.pod:51
22555 msgid "I<--qemu qemu_binary>"
22559 #: ../test-tool/libguestfs-test-tool.pod:53
22561 "If you have downloaded another qemu binary, point this option at the full "
22562 "path of the binary to try it."
22566 #: ../test-tool/libguestfs-test-tool.pod:56
22567 msgid "I<--qemudir qemu_source_dir>"
22571 #: ../test-tool/libguestfs-test-tool.pod:58
22573 "If you have compiled qemu from source, point this option at the source "
22574 "directory to try it."
22578 #: ../test-tool/libguestfs-test-tool.pod:61
22579 msgid "I<--timeout N>"
22583 #: ../test-tool/libguestfs-test-tool.pod:63
22585 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
22586 "does not usually need to be adjusted unless your machine is very slow."
22590 #: ../test-tool/libguestfs-test-tool.pod:69
22591 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
22595 #: ../test-tool/libguestfs-test-tool.pod:71
22597 "If you have compiled another version of qemu from source and would like to "
22598 "try that, then you can use the I<--qemudir> option to point to the qemu "
22599 "source directory."
22603 #: ../test-tool/libguestfs-test-tool.pod:75
22605 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
22606 "option to point to the binary."
22610 #: ../test-tool/libguestfs-test-tool.pod:78
22612 "When using an alternate qemu with libguestfs, usually you would need to "
22613 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in "
22614 "L<guestfs(3)>). libguestfs-test-tool writes a temporary qemu wrapper script "
22615 "when you use either of the I<--qemudir> or I<--qemu> options."
22619 #: ../test-tool/libguestfs-test-tool.pod:85
22621 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
22622 "I<1> if there was an error."
22626 #: ../test-tool/libguestfs-test-tool.pod:92
22627 msgid "/usr/libexec/libguestfs-test-tool-helper"
22631 #: ../test-tool/libguestfs-test-tool.pod:94
22633 "This helper program is run inside the appliance and provides additional "
22638 #: ../test-tool/libguestfs-test-tool.pod:97
22639 msgid "/usr/bin/mkisofs"
22643 #: ../test-tool/libguestfs-test-tool.pod:99
22645 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
22646 "which is used as part of the tests."
22650 #: ../test-tool/libguestfs-test-tool.pod:106
22652 "For the full list of environment variables which may affect libguestfs, "
22653 "please see the L<guestfs(3)> manual page."
22657 #: ../test-tool/libguestfs-test-tool.pod:111
22658 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
22662 #: ../test-tool/libguestfs-test-tool.pod:121 ../fuse/guestmount.pod:195
22663 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
22667 #: ../fuse/guestmount.pod:5
22668 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
22672 #: ../fuse/guestmount.pod:9
22675 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
22680 #: ../fuse/guestmount.pod:13
22682 "You must I<not> use C<guestmount> in read-write mode on live virtual "
22683 "machines. If you do this, you risk disk corruption in the VM."
22687 #: ../fuse/guestmount.pod:18
22689 "The guestmount program can be used to mount virtual machine filesystems and "
22690 "other disk images on the host. It uses libguestfs for access to the guest "
22691 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
22692 "a mountable device."
22696 #: ../fuse/guestmount.pod:23
22698 "Along with other options, you have to give at least one device (I<-a> "
22699 "option) and at least one mountpoint (I<-m> option). How this works is "
22700 "better explained in the L<guestfish(1)> manual page, or you can use "
22701 "L<virt-inspector(1)> and/or the wrapper script C<guestmount-wrapper> to help "
22706 #: ../fuse/guestmount.pod:29
22708 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
22709 "by you, and the filesystem will not be visible to any other users unless you "
22710 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
22711 "the filesystem, use the C<fusermount -u> command."
22715 #: ../fuse/guestmount.pod:37
22717 "For a typical Windows guest which has its main filesystem on the first "
22722 #: ../fuse/guestmount.pod:40
22725 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
22730 #: ../fuse/guestmount.pod:42
22732 "For a typical Linux guest which has a /boot filesystem on the first "
22733 "partition, and the root filesystem on a logical volume:"
22737 #: ../fuse/guestmount.pod:45
22740 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
22745 #: ../fuse/guestmount.pod:47
22747 "To get L<virt-inspector(1)> to do the hard work of detecting guest "
22748 "mountpoints for you:"
22752 #: ../fuse/guestmount.pod:50
22755 " guestmount $(virt-inspector --ro-fish MyGuest) /mnt\n"
22760 #: ../fuse/guestmount.pod:52
22762 "(or use --fish if you don't want it to be a read only mount). The option is "
22763 "called I<--ro-fish> or I<--fish> because these parameters are compatible "
22764 "with L<guestfish(1)>."
22768 #: ../fuse/guestmount.pod:56
22770 "If you don't know what filesystems are contained in a guest or disk image, "
22771 "use L<virt-list-filesystems(1)> first:"
22775 #: ../fuse/guestmount.pod:59
22778 " virt-list-filesystems MyGuest\n"
22783 #: ../fuse/guestmount.pod:61
22785 "If you want to trace the libguestfs calls but without excessive debugging, "
22790 #: ../fuse/guestmount.pod:64
22793 " guestmount [-a ... -m ...] --trace /mnt\n"
22798 #: ../fuse/guestmount.pod:66
22799 msgid "If you want to debug the program, we recommend:"
22803 #: ../fuse/guestmount.pod:68
22806 " guestmount [-a ... -m ...] --trace --verbose /mnt\n"
22811 #: ../fuse/guestmount.pod:76
22812 msgid "Add a block device or virtual machine image."
22816 #: ../fuse/guestmount.pod:78
22817 msgid "B<--dir-cache-timeout N>"
22821 #: ../fuse/guestmount.pod:80
22823 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
22824 "seconds. The readdir cache [actually, there are several semi-independent "
22825 "caches] is populated after a readdir(2) call with the stat and extended "
22826 "attributes of the files in the directory, in anticipation that they will be "
22827 "requested soon after."
22831 #: ../fuse/guestmount.pod:86
22833 "There is also a different attribute cache implemented by FUSE (see the FUSE "
22834 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
22835 "requests, only cache existing ones."
22839 #: ../fuse/guestmount.pod:90
22840 msgid "B<--fuse-help>"
22844 #: ../fuse/guestmount.pod:92
22845 msgid "Display help on special FUSE options (see I<-o> below)."
22849 #: ../fuse/guestmount.pod:96
22850 msgid "Display brief help and exit."
22854 #: ../fuse/guestmount.pod:98
22855 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
22859 #: ../fuse/guestmount.pod:100
22861 "Mount the named partition or logical volume on the given mountpoint B<in the "
22862 "guest> (this has nothing to do with mountpoints in the host)."
22866 #: ../fuse/guestmount.pod:103
22868 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
22869 "something on C</>."
22873 #: ../fuse/guestmount.pod:108
22875 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
22876 "unmounted. If you specify this option, then we don't attempt to sync the "
22877 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
22881 #: ../fuse/guestmount.pod:113
22882 msgid "B<-o option> | B<--option option>"
22886 #: ../fuse/guestmount.pod:115
22887 msgid "Pass extra options to FUSE."
22891 #: ../fuse/guestmount.pod:117
22893 "To get a list of all the extra options supported by FUSE, use the command "
22894 "below. Note that only the FUSE I<-o> options can be passed, and only some "
22895 "of them are a good idea."
22899 #: ../fuse/guestmount.pod:121
22902 " guestmount --fuse-help\n"
22907 #: ../fuse/guestmount.pod:123
22908 msgid "Some potentially useful FUSE options:"
22912 #: ../fuse/guestmount.pod:127
22913 msgid "B<-o allow_other>"
22917 #: ../fuse/guestmount.pod:129
22918 msgid "Allow other users to see the filesystem."
22922 #: ../fuse/guestmount.pod:131
22923 msgid "B<-o attr_timeout=N>"
22927 #: ../fuse/guestmount.pod:133
22928 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
22932 #: ../fuse/guestmount.pod:135
22933 msgid "B<-o kernel_cache>"
22937 #: ../fuse/guestmount.pod:137
22939 "Allow the kernel to cache files (reduces the number of reads that have to go "
22940 "through the L<guestfs(3)> API). This is generally a good idea if you can "
22941 "afford the extra memory usage."
22945 #: ../fuse/guestmount.pod:141
22946 msgid "B<-o uid=N> B<-o gid=N>"
22950 #: ../fuse/guestmount.pod:143
22952 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
22953 "the chosen values."
22957 #: ../fuse/guestmount.pod:150
22959 "Add devices and mount everything read-only. Also disallow writes and make "
22960 "the disk appear read-only to FUSE."
22964 #: ../fuse/guestmount.pod:153
22966 "This is highly recommended if you are not going to edit the guest disk. If "
22967 "the guest is running and this option is I<not> supplied, then there is a "
22968 "strong risk of disk corruption in the guest. We try to prevent this from "
22969 "happening, but it is not always possible."
22973 #: ../fuse/guestmount.pod:160
22974 msgid "Enable SELinux support for the guest."
22978 #: ../fuse/guestmount.pod:162
22983 #: ../fuse/guestmount.pod:164
22984 msgid "Trace libguestfs calls (to stderr)."
22988 #: ../fuse/guestmount.pod:166
22989 msgid "This also stops the daemon from forking into the background."
22993 #: ../fuse/guestmount.pod:170
22994 msgid "Enable verbose messages from underlying libguestfs."
22998 #: ../fuse/guestmount.pod:174
22999 msgid "Display the program version and exit."
23003 #: ../fuse/guestmount.pod:180
23005 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
23006 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
23007 "L<http://fuse.sf.net/>."
23011 #: ../inspector/virt-inspector.pl:40
23013 "virt-inspector - Display OS version, kernel, drivers, mount points, "
23014 "applications, etc. in a virtual machine"
23018 #: ../inspector/virt-inspector.pl:44
23021 " virt-inspector [--connect URI] domname\n"
23026 #: ../inspector/virt-inspector.pl:46
23029 " virt-inspector guest.img [guest.img ...]\n"
23034 #: ../inspector/virt-inspector.pl:50
23036 "B<virt-inspector> examines a virtual machine and tries to determine the "
23037 "version of the OS, the kernel version, what drivers are installed, whether "
23038 "the virtual machine is fully virtualized (FV) or para-virtualized (PV), what "
23039 "applications are installed and more."
23043 #: ../inspector/virt-inspector.pl:55
23045 "Virt-inspector can produce output in several formats, including a readable "
23046 "text report, and XML for feeding into other programs."
23050 #: ../inspector/virt-inspector.pl:58
23052 "In the normal usage, use C<virt-inspector domname> where C<domname> is the "
23053 "libvirt domain (see: C<virsh list --all>)."
23057 #: ../inspector/virt-inspector.pl:61
23059 "You can also run virt-inspector directly on disk images from a single "
23060 "virtual machine. Use C<virt-inspector guest.img>. In rare cases a domain "
23061 "has several block devices, in which case you should list them one after "
23062 "another, with the first corresponding to the guest's C</dev/sda>, the second "
23063 "to the guest's C</dev/sdb> and so on."
23067 #: ../inspector/virt-inspector.pl:67
23069 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
23070 "inspect several virtual machines, you have to run virt-inspector several "
23071 "times (for example, from a shell script for-loop)."
23075 #: ../inspector/virt-inspector.pl:72
23077 "Because virt-inspector needs direct access to guest images, it won't "
23078 "normally work over remote libvirt connections."
23082 #: ../inspector/virt-inspector.pl:85 ../tools/virt-edit.pl:83 ../tools/virt-win-reg.pl:182 ../tools/virt-df.pl:81 ../tools/virt-ls.pl:89 ../tools/virt-list-filesystems.pl:60 ../tools/virt-cat.pl:90 ../tools/virt-tar.pl:109 ../tools/virt-rescue.pl:113 ../tools/virt-make-fs.pl:163 ../tools/virt-list-partitions.pl:61
23083 msgid "Display brief help."
23087 #: ../inspector/virt-inspector.pl:91 ../tools/virt-edit.pl:89 ../tools/virt-win-reg.pl:188 ../tools/virt-df.pl:87 ../tools/virt-ls.pl:95 ../tools/virt-resize.pl:249 ../tools/virt-list-filesystems.pl:66 ../tools/virt-cat.pl:96 ../tools/virt-tar.pl:115 ../tools/virt-rescue.pl:119 ../tools/virt-make-fs.pl:169 ../tools/virt-list-partitions.pl:67
23088 msgid "B<--version>"
23092 #: ../inspector/virt-inspector.pl:93 ../tools/virt-edit.pl:91 ../tools/virt-win-reg.pl:190 ../tools/virt-df.pl:89 ../tools/virt-ls.pl:97 ../tools/virt-resize.pl:251 ../tools/virt-list-filesystems.pl:68 ../tools/virt-cat.pl:98 ../tools/virt-tar.pl:117 ../tools/virt-rescue.pl:121 ../tools/virt-make-fs.pl:171 ../tools/virt-list-partitions.pl:69
23093 msgid "Display version number and exit."
23097 #: ../inspector/virt-inspector.pl:99 ../tools/virt-edit.pl:113 ../tools/virt-win-reg.pl:204 ../tools/virt-df.pl:95 ../tools/virt-ls.pl:103 ../tools/virt-list-filesystems.pl:74 ../tools/virt-cat.pl:104 ../tools/virt-tar.pl:123 ../tools/virt-rescue.pl:135 ../tools/virt-list-partitions.pl:75
23098 msgid "B<--connect URI> | B<-c URI>"
23102 #: ../inspector/virt-inspector.pl:101 ../tools/virt-edit.pl:115 ../tools/virt-win-reg.pl:206 ../tools/virt-df.pl:97 ../tools/virt-ls.pl:105 ../tools/virt-list-filesystems.pl:76 ../tools/virt-cat.pl:106 ../tools/virt-tar.pl:125 ../tools/virt-rescue.pl:137 ../tools/virt-list-partitions.pl:77
23104 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
23105 "to the default libvirt hypervisor."
23109 #: ../inspector/virt-inspector.pl:104
23111 "Libvirt is only used if you specify a C<domname> on the command line. If "
23112 "you specify guest block devices directly, then libvirt is not used at all."
23116 #: ../inspector/virt-inspector.pl:114
23118 "The following options select the output format. Use only one of them. The "
23119 "default is a readable text report."
23123 #: ../inspector/virt-inspector.pl:119
23124 msgid "B<--text> (default)"
23128 #: ../inspector/virt-inspector.pl:121
23129 msgid "Plain text report."
23133 #: ../inspector/virt-inspector.pl:123
23138 #: ../inspector/virt-inspector.pl:125
23139 msgid "Produce no output at all."
23143 #: ../inspector/virt-inspector.pl:127
23148 #: ../inspector/virt-inspector.pl:129
23150 "If you select I<--xml> then you get XML output which can be fed to other "
23155 #: ../inspector/virt-inspector.pl:132
23160 #: ../inspector/virt-inspector.pl:134
23162 "If you select I<--yaml> then you get YAML output which can be fed to other "
23167 #: ../inspector/virt-inspector.pl:137
23172 #: ../inspector/virt-inspector.pl:139
23174 "If you select I<--perl> then you get Perl structures output which can be "
23175 "used directly in another Perl program."
23179 #: ../inspector/virt-inspector.pl:142
23184 #: ../inspector/virt-inspector.pl:144
23185 msgid "B<--ro-fish>"
23189 #: ../inspector/virt-inspector.pl:146
23191 "If you select I<--fish> then we print a L<guestfish(1)> command line which "
23192 "will automatically mount up the filesystems on the correct mount points. "
23193 "Try this for example:"
23197 #: ../inspector/virt-inspector.pl:150
23200 " guestfish $(virt-inspector --fish guest.img)\n"
23205 #: ../inspector/virt-inspector.pl:152
23207 "I<--ro-fish> is the same, but the I<--ro> option is passed to guestfish so "
23208 "that the filesystems are mounted read-only."
23212 #: ../inspector/virt-inspector.pl:155
23217 #: ../inspector/virt-inspector.pl:157
23219 "In \"query mode\" we answer common questions about the guest, such as "
23220 "whether it is fullvirt or needs a Xen hypervisor to run."
23224 #: ../inspector/virt-inspector.pl:160
23225 msgid "See section I<QUERY MODE> below."
23229 #: ../inspector/virt-inspector.pl:166
23230 msgid "B<--windows-registry>"
23234 #: ../inspector/virt-inspector.pl:168
23236 "This flag is ignored for compatibility with earlier releases of the "
23241 #: ../inspector/virt-inspector.pl:171
23243 "In this version, if L<Win::Hivex(3)> is available, then we attempt to parse "
23244 "information out of the Registry for any Windows guest."
23248 #: ../inspector/virt-inspector.pl:218
23249 msgid "OUTPUT FORMAT"
23253 #: ../inspector/virt-inspector.pl:220
23256 " Operating system(s)\n"
23257 " -------------------\n"
23258 " Linux (distro + version)\n"
23259 " Windows (version)\n"
23262 " +--- Filesystems ---------- Installed apps --- Kernel & drivers\n"
23263 " ----------- -------------- ----------------\n"
23264 " mount point => device List of apps Extra information\n"
23265 " mount point => device and versions about kernel(s)\n"
23266 " ... and drivers\n"
23267 " swap => swap device\n"
23268 " (plus lots of extra information\n"
23269 " about each filesystem)\n"
23274 #: ../inspector/virt-inspector.pl:235
23275 msgid "The output of virt-inspector is a complex two-level data structure."
23279 #: ../inspector/virt-inspector.pl:237
23281 "At the top level is a list of the operating systems installed on the guest. "
23282 "(For the vast majority of guests, only a single OS is installed.) The data "
23283 "returned for the OS includes the name (Linux, Windows), the distribution and "
23288 #: ../inspector/virt-inspector.pl:242
23289 msgid "The diagram above shows what we return for each OS."
23293 #: ../inspector/virt-inspector.pl:244
23295 "With the I<--xml> option the output is mapped into an XML document. There "
23296 "is a RELAX-NG schema for this XML in the file I<virt-inspector.rng> which "
23297 "normally ships with virt-inspector, or can be found in the source."
23301 #: ../inspector/virt-inspector.pl:249
23303 "With the I<--fish> or I<--ro-fish> option the mount points are mapped to "
23304 "L<guestfish(1)> command line parameters, so that you can go in afterwards "
23305 "and inspect the guest with everything mounted in the right place. For "
23310 #: ../inspector/virt-inspector.pl:254
23313 " guestfish $(virt-inspector --ro-fish guest.img)\n"
23314 " ==> guestfish --ro -a guest.img -m /dev/VG/LV:/ -m /dev/sda1:/boot\n"
23319 #: ../inspector/virt-inspector.pl:589
23324 #: ../inspector/virt-inspector.pl:591
23326 "When you use C<virt-inspector --query>, the output is a series of lines of "
23331 #: ../inspector/virt-inspector.pl:594
23337 " xen_pv_drivers=no\n"
23342 #: ../inspector/virt-inspector.pl:599
23344 "(each answer is usually C<yes> or C<no>, or the line is completely missing "
23345 "if we could not determine the answer at all)."
23349 #: ../inspector/virt-inspector.pl:602
23351 "If the guest is multiboot, you can get apparently conflicting answers "
23352 "(eg. C<windows=yes> and C<linux=yes>, or a guest which is both fullvirt and "
23353 "has a Xen PV kernel). This is normal, and just means that the guest can do "
23354 "both things, although it might require operator intervention such as "
23355 "selecting a boot option when the guest is booting."
23359 #: ../inspector/virt-inspector.pl:609
23360 msgid "This section describes the full range of answers possible."
23364 #: ../inspector/virt-inspector.pl:630
23365 msgid "windows=(yes|no)"
23369 #: ../inspector/virt-inspector.pl:632
23370 msgid "Answer C<yes> if Microsoft Windows is installed in the guest."
23374 #: ../inspector/virt-inspector.pl:645
23375 msgid "linux=(yes|no)"
23379 #: ../inspector/virt-inspector.pl:647
23380 msgid "Answer C<yes> if a Linux kernel is installed in the guest."
23384 #: ../inspector/virt-inspector.pl:660
23385 msgid "rhel=(yes|no)"
23389 #: ../inspector/virt-inspector.pl:662
23390 msgid "Answer C<yes> if the guest contains Red Hat Enterprise Linux."
23394 #: ../inspector/virt-inspector.pl:676
23395 msgid "fedora=(yes|no)"
23399 #: ../inspector/virt-inspector.pl:678
23400 msgid "Answer C<yes> if the guest contains the Fedora Linux distribution."
23404 #: ../inspector/virt-inspector.pl:691
23405 msgid "debian=(yes|no)"
23409 #: ../inspector/virt-inspector.pl:693
23410 msgid "Answer C<yes> if the guest contains the Debian Linux distribution."
23414 #: ../inspector/virt-inspector.pl:706
23415 msgid "fullvirt=(yes|no)"
23419 #: ../inspector/virt-inspector.pl:708
23421 "Answer C<yes> if there is at least one operating system kernel installed in "
23422 "the guest which runs fully virtualized. Such a guest would require a "
23423 "hypervisor which supports full system virtualization."
23427 #: ../inspector/virt-inspector.pl:731
23428 msgid "xen_domU_kernel=(yes|no)"
23432 #: ../inspector/virt-inspector.pl:733
23434 "Answer C<yes> if there is at least one Linux kernel installed in the guest "
23435 "which is compiled as a Xen DomU (a Xen paravirtualized guest)."
23439 #: ../inspector/virt-inspector.pl:753
23440 msgid "xen_pv_drivers=(yes|no)"
23444 #: ../inspector/virt-inspector.pl:755
23446 "Answer C<yes> if the guest has Xen paravirtualized drivers installed "
23447 "(usually the kernel itself will be fully virtualized, but the PV drivers "
23448 "have been installed by the administrator for performance reasons)."
23452 #: ../inspector/virt-inspector.pl:777
23453 msgid "virtio_drivers=(yes|no)"
23457 #: ../inspector/virt-inspector.pl:779
23459 "Answer C<yes> if the guest has virtio paravirtualized drivers installed. "
23460 "Virtio drivers are commonly used to improve the performance of KVM."
23464 #: ../inspector/virt-inspector.pl:800
23465 msgid "userspace_arch=(x86_64|...)"
23469 #: ../inspector/virt-inspector.pl:802
23470 msgid "Print the architecture of userspace."
23474 #: ../inspector/virt-inspector.pl:804 ../inspector/virt-inspector.pl:825
23475 msgid "NB. For multi-boot VMs this can print several lines."
23479 #: ../inspector/virt-inspector.pl:821
23480 msgid "kernel_arch=(x86_64|...)"
23484 #: ../inspector/virt-inspector.pl:823
23485 msgid "Print the architecture of the kernel."
23489 #: ../inspector/virt-inspector.pl:848 ../tools/virt-df.pl:538
23491 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
23492 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
23496 #: ../inspector/virt-inspector.pl:857 ../tools/virt-edit.pl:339 ../tools/virt-win-reg.pl:489 ../tools/virt-df.pl:547 ../tools/virt-ls.pl:223 ../tools/virt-resize.pl:1418 ../tools/virt-list-filesystems.pl:205 ../tools/virt-cat.pl:175 ../tools/virt-tar.pl:270 ../tools/virt-rescue.pl:243 ../tools/virt-make-fs.pl:554 ../tools/virt-list-partitions.pl:242
23497 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
23501 #: ../inspector/virt-inspector.pl:859
23502 msgid "Matthew Booth L<mbooth@redhat.com>"
23506 #: ../inspector/virt-inspector.pl:863 ../tools/virt-ls.pl:227 ../tools/virt-list-filesystems.pl:209 ../tools/virt-cat.pl:179 ../tools/virt-tar.pl:274
23507 msgid "Copyright (C) 2009 Red Hat Inc."
23511 #: ../tools/virt-edit.pl:35
23512 msgid "virt-edit - Edit a file in a virtual machine"
23516 #: ../tools/virt-edit.pl:39
23519 " virt-edit [--options] domname file\n"
23524 #: ../tools/virt-edit.pl:41
23527 " virt-edit [--options] disk.img [disk.img ...] file\n"
23532 #: ../tools/virt-edit.pl:43
23535 " virt-edit [domname|disk.img] file -e 'expr'\n"
23540 #: ../tools/virt-edit.pl:47
23542 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
23543 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
23544 "doing this, but doesn't catch all cases."
23548 #: ../tools/virt-edit.pl:53
23550 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
23551 "the named virtual machine (or disk image)."
23555 #: ../tools/virt-edit.pl:56
23557 "If you want to just view a file, use L<virt-cat(1)>. For more complex cases "
23558 "you should look at the L<guestfish(1)> tool."
23562 #: ../tools/virt-edit.pl:61
23563 msgid "Edit the named files interactively:"
23567 #: ../tools/virt-edit.pl:63
23570 " virt-edit mydomain /boot/grub/grub.conf\n"
23575 #: ../tools/virt-edit.pl:65
23578 " virt-edit mydomain /etc/passwd\n"
23583 #: ../tools/virt-edit.pl:67
23585 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
23586 "below). To change the init default level to 5:"
23590 #: ../tools/virt-edit.pl:71
23593 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
23598 #: ../tools/virt-edit.pl:97
23599 msgid "B<--backup extension> | B<-b extension>"
23603 #: ../tools/virt-edit.pl:99
23605 "Create a backup of the original file I<in the guest disk image>. The backup "
23606 "has the original filename with C<extension> added."
23610 #: ../tools/virt-edit.pl:102
23612 "Usually the first character of C<extension> would be a dot C<.> so you would "
23617 #: ../tools/virt-edit.pl:105
23620 " virt-edit -b .orig [etc]\n"
23625 #: ../tools/virt-edit.pl:107
23626 msgid "By default, no backup file is made."
23630 #: ../tools/virt-edit.pl:118 ../tools/virt-win-reg.pl:209 ../tools/virt-df.pl:100 ../tools/virt-ls.pl:108 ../tools/virt-list-filesystems.pl:79 ../tools/virt-cat.pl:109 ../tools/virt-tar.pl:128 ../tools/virt-rescue.pl:140 ../tools/virt-list-partitions.pl:80
23632 "If you specify guest block devices directly, then libvirt is not used at "
23637 #: ../tools/virt-edit.pl:125
23638 msgid "B<--expr EXPR> | B<-e EXPR>"
23642 #: ../tools/virt-edit.pl:127
23644 "Instead of launching the external editor, non-interactively apply the Perl "
23645 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
23650 #: ../tools/virt-edit.pl:131
23652 "Be careful to properly quote the expression to prevent it from being altered "
23657 #: ../tools/virt-edit.pl:250
23658 msgid "NON-INTERACTIVE EDITING"
23662 #: ../tools/virt-edit.pl:252
23664 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
23665 "administrator can interactively edit the file."
23669 #: ../tools/virt-edit.pl:255
23671 "There are two ways also to use C<virt-edit> from scripts in order to make "
23672 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
23673 "like this, it's less error-prone to write scripts directly using the "
23674 "libguestfs API and Augeas for configuration file editing.)"
23678 #: ../tools/virt-edit.pl:261
23680 "The first method is to temporarily set C<$EDITOR> to any script or program "
23681 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
23682 "update C<tmpfile> in place however it likes."
23686 #: ../tools/virt-edit.pl:265
23688 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
23689 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
23690 "instances of C<foo> with C<bar> in a file:"
23694 #: ../tools/virt-edit.pl:269
23697 " virt-edit domname filename -e 's/foo/bar/'\n"
23702 #: ../tools/virt-edit.pl:271
23704 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
23705 "For example to delete root's password you could do:"
23709 #: ../tools/virt-edit.pl:274
23712 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
23717 #: ../tools/virt-edit.pl:276
23719 "What really happens is that the snippet is evaluated as a Perl expression "
23720 "for each line of the file. The line, including the final C<\\n>, is passed "
23721 "in C<$_> and the expression should update C<$_> or leave it unchanged."
23725 #: ../tools/virt-edit.pl:281
23727 "To delete a line, set C<$_> to the empty string. For example, to delete the "
23728 "C<apache> user account from the password file you can do:"
23732 #: ../tools/virt-edit.pl:284
23735 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
23740 #: ../tools/virt-edit.pl:286
23742 "To insert a line, prepend or append it to C<$_>. However appending lines to "
23743 "the end of the file is rather difficult this way since there is no concept "
23744 "of \"last line of the file\" - your expression just doesn't get called "
23745 "again. You might want to use the first method (setting C<$EDITOR>) if you "
23750 #: ../tools/virt-edit.pl:292
23752 "The variable C<$lineno> contains the current line number. As is "
23753 "traditional, the first line in the file is number C<1>."
23757 #: ../tools/virt-edit.pl:295
23759 "The return value from the expression is ignored, but the expression may call "
23760 "C<die> in order to abort the whole program, leaving the original file "
23765 #: ../tools/virt-edit.pl:299
23767 "Remember when matching the end of a line that C<$_> may contain the final "
23768 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
23769 "newline then neither of these. Thus to match or substitute some text at the "
23770 "end of a line, use this regular expression:"
23774 #: ../tools/virt-edit.pl:304
23777 " /some text(\\r?\\n)?$/\n"
23782 #: ../tools/virt-edit.pl:306
23784 "Alternately, use the perl C<chomp> function, being careful not to chomp "
23785 "C<$_> itself (since that would remove all newlines from the file):"
23789 #: ../tools/virt-edit.pl:310
23792 " my $m = $_; chomp $m; $m =~ /some text$/\n"
23797 #: ../tools/virt-edit.pl:316
23802 #: ../tools/virt-edit.pl:318
23804 "If set, this string is used as the editor. It may contain arguments, "
23805 "eg. C<\"emacs -nw\">"
23809 #: ../tools/virt-edit.pl:321
23810 msgid "If not set, C<vi> is used."
23814 #: ../tools/virt-edit.pl:327
23816 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
23817 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>, "
23818 "L<perl(1)>, L<perlre(1)>."
23822 #: ../tools/virt-edit.pl:337 ../tools/virt-win-reg.pl:487 ../tools/virt-df.pl:545 ../tools/virt-ls.pl:221 ../tools/virt-resize.pl:1416 ../tools/virt-list-filesystems.pl:203 ../tools/virt-cat.pl:173 ../tools/virt-tar.pl:268 ../tools/virt-rescue.pl:241 ../tools/virt-make-fs.pl:552 ../tools/virt-list-partitions.pl:240
23827 #: ../tools/virt-edit.pl:343 ../tools/virt-df.pl:551 ../tools/virt-rescue.pl:247 ../tools/virt-list-partitions.pl:246
23828 msgid "Copyright (C) 2009-2010 Red Hat Inc."
23832 #: ../tools/virt-win-reg.pl:38
23834 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
23839 #: ../tools/virt-win-reg.pl:42
23842 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
23847 #: ../tools/virt-win-reg.pl:44
23850 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
23855 #: ../tools/virt-win-reg.pl:46
23858 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
23863 #: ../tools/virt-win-reg.pl:48
23866 " virt-win-reg --merge domname [input.reg ...]\n"
23871 #: ../tools/virt-win-reg.pl:50
23874 " virt-win-reg [--options] disk.img ... # instead of domname\n"
23879 #: ../tools/virt-win-reg.pl:54
23881 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
23882 "virtual machines. If you do this, you I<will> get irreversible disk "
23883 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
23884 "but doesn't catch all cases."
23888 #: ../tools/virt-win-reg.pl:59
23890 "Modifying the Windows Registry is an inherently risky operation. The format "
23891 "is deliberately obscure and undocumented, and Registry changes can leave the "
23892 "system unbootable. Therefore when using the C<--merge> option, make sure "
23893 "you have a reliable backup first."
23897 #: ../tools/virt-win-reg.pl:66
23899 "This program can export and merge Windows Registry entries from a Windows "
23904 #: ../tools/virt-win-reg.pl:69
23906 "The first parameter is the libvirt guest name or the raw disk image of a "
23911 #: ../tools/virt-win-reg.pl:72
23913 "If C<--merge> is I<not> specified, then the chosen registry key is "
23914 "displayed/exported (recursively). For example:"
23918 #: ../tools/virt-win-reg.pl:75
23921 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
23926 #: ../tools/virt-win-reg.pl:77
23927 msgid "You can also display single values from within registry keys, for example:"
23931 #: ../tools/virt-win-reg.pl:80
23934 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
23935 " $ virt-win-reg Windows7 $cvkey ProductName\n"
23936 " Windows 7 Enterprise\n"
23941 #: ../tools/virt-win-reg.pl:84
23943 "With C<--merge>, you can merge a textual regedit file into the Windows "
23948 #: ../tools/virt-win-reg.pl:87
23951 " $ virt-win-reg --merge Windows7 changes.reg\n"
23956 #: ../tools/virt-win-reg.pl:89
23957 msgid "SUPPORTED SYSTEMS"
23961 #: ../tools/virt-win-reg.pl:91
23963 "The program currently supports Windows NT-derived guests starting with "
23964 "Windows XP through to at least Windows 7."
23968 #: ../tools/virt-win-reg.pl:94
23970 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, "
23971 "C<HKEY_LOCAL_MACHINE\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, "
23972 "C<HKEY_LOCAL_MACHINE\\SYSTEM> and C<HKEY_USERS\\.DEFAULT>."
23976 #: ../tools/virt-win-reg.pl:98
23978 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
23983 #: ../tools/virt-win-reg.pl:101
23985 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
23990 #: ../tools/virt-win-reg.pl:104
23995 #: ../tools/virt-win-reg.pl:106
23997 "This program is only meant for simple access to the registry. If you want "
23998 "to do complicated things with the registry, we suggest you download the "
23999 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
24000 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
24001 "L<hivexregedit(1)>."
24005 #: ../tools/virt-win-reg.pl:112
24010 #: ../tools/virt-win-reg.pl:114
24012 "C<virt-win-reg> expects that regedit files have already been reencoded in "
24013 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
24014 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
24015 "with Windows-style line endings, you may need to reencode the whole file "
24016 "before or after processing."
24020 #: ../tools/virt-win-reg.pl:120
24022 "To reencode a file from Windows format to Linux (before processing it with "
24023 "the C<--merge> option), you would do something like this:"
24027 #: ../tools/virt-win-reg.pl:123
24030 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
24035 #: ../tools/virt-win-reg.pl:125
24037 "To go in the opposite direction, after exporting and before sending the file "
24038 "to a Windows user, do something like this:"
24042 #: ../tools/virt-win-reg.pl:128
24045 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
24050 #: ../tools/virt-win-reg.pl:130
24051 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
24055 #: ../tools/virt-win-reg.pl:132
24057 "If you are unsure about the current encoding, use the L<file(1)> command. "
24058 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
24059 "Windows-style (CRLF) line endings, like this:"
24063 #: ../tools/virt-win-reg.pl:136
24066 " $ file software.reg\n"
24067 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
24068 " with CRLF line terminators\n"
24073 #: ../tools/virt-win-reg.pl:140
24074 msgid "This file would need conversion before you could C<--merge> it."
24078 #: ../tools/virt-win-reg.pl:142
24079 msgid "SHELL QUOTING"
24083 #: ../tools/virt-win-reg.pl:144
24085 "Be careful when passing parameters containing C<\\> (backslash) in the "
24086 "shell. Usually you will have to use 'single quotes' or double backslashes "
24087 "(but not both) to protect them from the shell."
24091 #: ../tools/virt-win-reg.pl:148
24092 msgid "Paths and value names are case-insensitive."
24096 #: ../tools/virt-win-reg.pl:150
24097 msgid "CurrentControlSet etc."
24101 #: ../tools/virt-win-reg.pl:152
24103 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
24104 "Registry at the level of the hive file, and therefore you cannot modify "
24109 #: ../tools/virt-win-reg.pl:156
24111 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
24112 "circumstances it might refer to another control set. The way to find out is "
24113 "to look at the C<HKLM\\SYSTEM\\Select> key:"
24117 #: ../tools/virt-win-reg.pl:160
24120 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
24121 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
24122 " \"Current\"=dword:00000001\n"
24123 " \"Default\"=dword:00000001\n"
24124 " \"Failed\"=dword:00000000\n"
24125 " \"LastKnownGood\"=dword:00000002\n"
24130 #: ../tools/virt-win-reg.pl:167
24131 msgid "\"Default\" is the one which Windows will choose when it boots."
24135 #: ../tools/virt-win-reg.pl:169
24136 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
24140 #: ../tools/virt-win-reg.pl:196 ../tools/virt-make-fs.pl:177
24145 #: ../tools/virt-win-reg.pl:198 ../tools/virt-resize.pl:477
24146 msgid "Enable debugging messages."
24150 #: ../tools/virt-win-reg.pl:216
24155 #: ../tools/virt-win-reg.pl:218
24157 "In merge mode, this merges a textual regedit file into the Windows Registry "
24158 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
24159 "displays or exports Registry entries instead."
24163 #: ../tools/virt-win-reg.pl:222
24165 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
24166 "result in disk corruption. However exporting (without this flag) is always "
24171 #: ../tools/virt-win-reg.pl:230
24172 msgid "B<--encoding> UTF-16LE|ASCII"
24176 #: ../tools/virt-win-reg.pl:232
24178 "When merging (only), you may need to specify the encoding for strings to be "
24179 "used in the hive file. This is explained in detail in "
24180 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
24184 #: ../tools/virt-win-reg.pl:236
24186 "The default is to use UTF-16LE, which should work with recent versions of "
24191 #: ../tools/virt-win-reg.pl:463
24193 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
24194 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
24195 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
24196 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
24200 #: ../tools/virt-win-reg.pl:478 ../tools/virt-make-fs.pl:543
24202 "When reporting bugs, please enable debugging and capture the I<complete> "
24207 #: ../tools/virt-win-reg.pl:481
24210 " export LIBGUESTFS_DEBUG=1\n"
24211 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
24216 #: ../tools/virt-win-reg.pl:484
24218 "Attach /tmp/virt-win-reg.log to a new bug report at "
24219 "L<https://bugzilla.redhat.com/>"
24223 #: ../tools/virt-win-reg.pl:493 ../tools/virt-resize.pl:1422 ../tools/virt-make-fs.pl:558
24224 msgid "Copyright (C) 2010 Red Hat Inc."
24228 #: ../tools/virt-df.pl:36
24229 msgid "virt-df - Display free space on virtual filesystems"
24233 #: ../tools/virt-df.pl:40
24236 " virt-df [--options]\n"
24241 #: ../tools/virt-df.pl:42
24244 " virt-df [--options] domname\n"
24249 #: ../tools/virt-df.pl:44
24252 " virt-df [--options] disk.img [disk.img ...]\n"
24257 #: ../tools/virt-df.pl:48
24259 "C<virt-df> is a command line tool to display free space on virtual machine "
24260 "filesystems. Unlike other tools, it doesn't just display the amount of "
24261 "space allocated to a virtual machine, but can look inside the virtual "
24262 "machine to see how much space is really being used."
24266 #: ../tools/virt-df.pl:53
24268 "It is like the L<df(1)> command, but for virtual machines, except that it "
24269 "also works for Windows virtual machines."
24273 #: ../tools/virt-df.pl:56
24275 "If used without any arguments, C<virt-df> checks with libvirt to get a list "
24276 "of all active and inactive guests, and performs a C<df>-type operation on "
24277 "each one in turn, printing out the results."
24281 #: ../tools/virt-df.pl:60
24283 "If used with any argument(s), C<virt-df> performs a C<df>-type operation on "
24284 "either the single named libvirt domain, or on the disk image(s) listed on "
24285 "the command line (which must all belong to a single VM). In this mode (with "
24286 "arguments), C<virt-df> will I<only work for a single guest>. If you want to "
24287 "run on multiple guests, then you have to invoke C<virt-df> multiple times."
24291 #: ../tools/virt-df.pl:67
24293 "Use the C<--csv> option to get a format which can be easily parsed by other "
24294 "programs. Other options are mostly similar to standard C<df> options. See "
24295 "below for the complete list."
24299 #: ../tools/virt-df.pl:107
24304 #: ../tools/virt-df.pl:109
24306 "Write out the results in CSV format (comma-separated values). This format "
24307 "can be imported easily into databases and spreadsheets, but read L</NOTE "
24308 "ABOUT CSV FORMAT> below."
24312 #: ../tools/virt-df.pl:117
24313 msgid "B<--human-readable> | B<-h>"
24317 #: ../tools/virt-df.pl:119
24318 msgid "Print sizes in human-readable format."
24322 #: ../tools/virt-df.pl:121
24323 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
24327 #: ../tools/virt-df.pl:127
24328 msgid "B<--inodes> | B<-i>"
24332 #: ../tools/virt-df.pl:129
24333 msgid "Print inodes instead of blocks."
24337 #: ../tools/virt-df.pl:135
24338 msgid "B<--one-per-guest>"
24342 #: ../tools/virt-df.pl:137
24344 "Run one libguestfs appliance per guest. Normally C<virt-df> will add the "
24345 "disks from several guests to a single libguestfs appliance."
24349 #: ../tools/virt-df.pl:140
24350 msgid "You might use this option in the following circumstances:"
24354 #: ../tools/virt-df.pl:146
24356 "If you think an untrusted guest might actively try to exploit the libguestfs "
24357 "appliance kernel, then this prevents one guest from interfering with the "
24358 "stats printed for another guest."
24362 #: ../tools/virt-df.pl:152
24364 "If the kernel has a bug which stops it from accessing a filesystem in one "
24365 "guest (see for example RHBZ#635373) then this allows libguestfs to continue "
24366 "and report stats for further guests."
24370 #: ../tools/virt-df.pl:512
24371 msgid "NOTE ABOUT CSV FORMAT"
24375 #: ../tools/virt-df.pl:514
24377 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
24378 "should be easy to parse, but it is definitely not easy to parse."
24382 #: ../tools/virt-df.pl:517
24384 "Myth: Just split fields at commas. Reality: This does I<not> work "
24385 "reliably. This example has two columns:"
24389 #: ../tools/virt-df.pl:520
24392 " \"foo,bar\",baz\n"
24397 #: ../tools/virt-df.pl:522
24399 "Myth: Read the file one line at a time. Reality: This does I<not> work "
24400 "reliably. This example has one row:"
24404 #: ../tools/virt-df.pl:525
24413 #: ../tools/virt-df.pl:528
24415 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
24416 "packaged in major Linux distributions)."
24420 #: ../tools/virt-df.pl:531
24422 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
24423 "or Python's built-in csv library)."
24427 #: ../tools/virt-df.pl:534
24428 msgid "Most spreadsheets and databases can import CSV directly."
24432 #: ../tools/virt-ls.pl:35
24433 msgid "virt-ls - List files in a virtual machine"
24437 #: ../tools/virt-ls.pl:39
24440 " virt-ls [--options] domname directory\n"
24445 #: ../tools/virt-ls.pl:41
24448 " virt-ls [--options] disk.img [disk.img ...] directory\n"
24453 #: ../tools/virt-ls.pl:45
24455 "C<virt-ls> is a command line tool to list the names of files in a directory "
24456 "inside a virtual machine or disk image."
24460 #: ../tools/virt-ls.pl:48
24462 "C<virt-ls> is just a simple wrapper around L<libguestfs(3)> functionality. "
24463 "For more complex cases you should look at the L<guestfish(1)> tool."
24467 #: ../tools/virt-ls.pl:52
24469 "C<virt-ls> can be used in one of three modes: simple, long and recursive. A "
24470 "simple listing is like the ordinary L<ls(1)> command:"
24474 #: ../tools/virt-ls.pl:55
24477 " $ virt-ls myguest /\n"
24485 #: ../tools/virt-ls.pl:60
24486 msgid "With the C<-l> (C<--long>) option, C<virt-ls> shows more detail:"
24490 #: ../tools/virt-ls.pl:62
24493 " $ virt-ls -l myguest /\n"
24495 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
24496 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
24502 #: ../tools/virt-ls.pl:68
24504 "With the C<-R> (C<--recursive>) option, C<virt-ls> lists the names of files "
24505 "and directories recursively:"
24509 #: ../tools/virt-ls.pl:71
24512 " $ virt-ls -R myguest /tmp\n"
24520 #: ../tools/virt-ls.pl:76
24522 "You I<cannot> combine these options. To do more complicated things, use "
24527 #: ../tools/virt-ls.pl:115 ../tools/virt-list-filesystems.pl:86 ../tools/virt-list-partitions.pl:95
24528 msgid "B<-l> | B<--long>"
24532 #: ../tools/virt-ls.pl:117
24533 msgid "B<-R> | B<--recursive>"
24537 #: ../tools/virt-ls.pl:119
24539 "Select the mode. With neither of these options, C<virt-ls> produces a "
24540 "simple, flat list of the files in the named directory."
24544 #: ../tools/virt-ls.pl:122
24546 "C<virt-ls -l> produces a \"long listing\", which shows more detail (just "
24547 "like the plain C<ls -l> command)."
24551 #: ../tools/virt-ls.pl:125
24553 "C<virt-ls -R> produces a recursive list of files starting at the named "
24554 "directory. See the documentation for the C<guestfs_find> command "
24555 "L<guestfs(3)> for precise details."
24559 #: ../tools/virt-ls.pl:129
24560 msgid "You cannot combine these options."
24564 #: ../tools/virt-ls.pl:212
24566 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
24567 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
24568 "L<http://libguestfs.org/>."
24572 #: ../tools/virt-resize.pl:42
24573 msgid "virt-resize - Resize a virtual machine disk"
24577 #: ../tools/virt-resize.pl:46
24580 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
24581 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
24582 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
24587 #: ../tools/virt-resize.pl:52
24589 "Virt-resize is a tool which can resize a virtual machine disk, making it "
24590 "larger or smaller overall, and resizing or deleting any partitions contained "
24595 #: ../tools/virt-resize.pl:56
24597 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
24598 "not> be used on live virtual machines - for consistent results, shut the "
24599 "virtual machine down before resizing it."
24603 #: ../tools/virt-resize.pl:60
24605 "If you are not familiar with the associated tools: "
24606 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)> and L<virt-df(1)>, "
24607 "we recommend you go and read those manual pages first."
24611 #: ../tools/virt-resize.pl:68
24613 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
24614 "fill the extra 5GB of space."
24618 #: ../tools/virt-resize.pl:71
24621 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
24622 " virt-list-partitions -lht olddisk\n"
24623 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
24624 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
24629 #: ../tools/virt-resize.pl:76
24631 "As above, but make the /boot partition 200MB bigger, while giving the "
24632 "remaining space to /dev/sda2:"
24636 #: ../tools/virt-resize.pl:79
24639 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
24644 #: ../tools/virt-resize.pl:81
24645 msgid "DETAILED USAGE"
24649 #: ../tools/virt-resize.pl:83
24650 msgid "EXPANDING A VIRTUAL MACHINE DISK"
24654 #: ../tools/virt-resize.pl:87
24655 msgid "1. Shut down the virtual machine"
24659 #: ../tools/virt-resize.pl:89
24660 msgid "2. Locate input disk image"
24664 #: ../tools/virt-resize.pl:91
24666 "Locate the input disk image (ie. the file or device on the host containing "
24667 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
24668 "dumpxml> like this to find the disk image name:"
24672 #: ../tools/virt-resize.pl:95
24675 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
24676 " Found 1 nodes:\n"
24678 " <source dev=\"/dev/vg/lv_guest\" />\n"
24683 #: ../tools/virt-resize.pl:100
24684 msgid "3. Look at current sizing"
24688 #: ../tools/virt-resize.pl:102
24689 msgid "Use L<virt-list-partitions(1)> to display the current partitions and sizes:"
24693 #: ../tools/virt-resize.pl:105
24696 " # virt-list-partitions -lht /dev/vg/lv_guest\n"
24697 " /dev/sda1 ext3 101.9M\n"
24698 " /dev/sda2 pv 7.9G\n"
24699 " /dev/sda device 8.0G\n"
24704 #: ../tools/virt-resize.pl:110
24706 "(This example is a virtual machine with an 8 GB disk which we would like to "
24707 "expand up to 10 GB)."
24711 #: ../tools/virt-resize.pl:113
24712 msgid "4. Create output disk"
24716 #: ../tools/virt-resize.pl:115
24718 "Virt-resize cannot do in-place disk modifications. You have to have space "
24719 "to store the resized output disk."
24723 #: ../tools/virt-resize.pl:118
24724 msgid "To store the resized disk image in a file, create a file of a suitable size:"
24728 #: ../tools/virt-resize.pl:121
24731 " # rm -f outdisk\n"
24732 " # truncate -s 10G outdisk\n"
24737 #: ../tools/virt-resize.pl:124
24738 msgid "Or use L<lvcreate(1)> to create a logical volume:"
24742 #: ../tools/virt-resize.pl:126
24745 " # lvcreate -L 10G -n lv_name vg_name\n"
24750 #: ../tools/virt-resize.pl:128
24751 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
24755 #: ../tools/virt-resize.pl:130
24758 " # virsh pool-list\n"
24759 " # virsh vol-create-as poolname newvol 10G\n"
24764 #: ../tools/virt-resize.pl:133
24769 #: ../tools/virt-resize.pl:135
24771 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
24772 "file) and the output disk. The output disk is the one created in the "
24777 #: ../tools/virt-resize.pl:139
24780 " # virt-resize indisk outdisk\n"
24785 #: ../tools/virt-resize.pl:141
24787 "This command just copies disk image C<indisk> to disk image C<outdisk> "
24788 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
24789 "larger, then an extra, empty partition is created at the end of the disk "
24790 "covering the extra space. If C<outdisk> is smaller, then it will give an "
24795 #: ../tools/virt-resize.pl:147
24797 "More realistically you'd want to expand existing partitions in the disk "
24798 "image by passing extra options (for the full list see the L</OPTIONS> "
24803 #: ../tools/virt-resize.pl:151
24805 "L</--expand> is the most useful option. It expands the named partition "
24806 "within the disk to fill any extra space:"
24810 #: ../tools/virt-resize.pl:154
24813 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
24818 #: ../tools/virt-resize.pl:156
24820 "(In this case, an extra partition is I<not> created at the end of the disk, "
24821 "because there will be no unused space)."
24825 #: ../tools/virt-resize.pl:159
24827 "L</--resize> is the other commonly used option. The following would "
24828 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
24829 "rest of the available space:"
24833 #: ../tools/virt-resize.pl:163
24836 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
24837 " indisk outdisk\n"
24842 #: ../tools/virt-resize.pl:166
24844 "If the expanded partition in the image contains a filesystem or LVM PV, then "
24845 "if virt-resize knows how, it will resize the contents, the equivalent of "
24846 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or "
24847 "L<ntfsresize(8)>. However virt-resize does not know how to resize some "
24848 "filesystems, so you would have to online resize them after booting the "
24849 "guest. And virt-resize also does not resize anything inside an LVM PV, it "
24850 "just resizes the PV itself and leaves the user to resize any LVs inside that "
24855 #: ../tools/virt-resize.pl:175
24856 msgid "Other options are covered below."
24860 #: ../tools/virt-resize.pl:177
24865 #: ../tools/virt-resize.pl:179
24866 msgid "Thoroughly test the new disk image I<before> discarding the old one."
24870 #: ../tools/virt-resize.pl:181
24871 msgid "If you are using libvirt, edit the XML to point at the new disk:"
24875 #: ../tools/virt-resize.pl:183
24878 " # virsh edit guestname\n"
24883 #: ../tools/virt-resize.pl:185
24885 "Change E<lt>source ...E<gt>, see "
24886 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
24890 #: ../tools/virt-resize.pl:188
24891 msgid "Then start up the domain with the new, resized disk:"
24895 #: ../tools/virt-resize.pl:190
24898 " # virsh start guestname\n"
24903 #: ../tools/virt-resize.pl:192
24905 "and check that it still works. See also the L</NOTES> section below for "
24906 "additional information."
24910 #: ../tools/virt-resize.pl:195
24911 msgid "7. Resize LVs etc inside the guest"
24915 #: ../tools/virt-resize.pl:197
24916 msgid "(This can also be done offline using L<guestfish(1)>)"
24920 #: ../tools/virt-resize.pl:199
24922 "Once the guest has booted you should see the new space available, at least "
24923 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
24924 "may need to resize LVs inside PVs, and also resize filesystem types that "
24925 "virt-resize does not know how to expand."
24929 #: ../tools/virt-resize.pl:206
24930 msgid "SHRINKING A VIRTUAL MACHINE DISK"
24934 #: ../tools/virt-resize.pl:208
24936 "Shrinking is somewhat more complex than expanding, and only an overview is "
24941 #: ../tools/virt-resize.pl:211
24943 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
24944 "filesystems). The user has to shrink content before passing the disk image "
24945 "to virt-resize, and virt-resize will check that the content has been shrunk "
24950 #: ../tools/virt-resize.pl:216
24951 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
24955 #: ../tools/virt-resize.pl:218
24957 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
24958 "steps 3 and 4 above to allocate a new disk image."
24962 #: ../tools/virt-resize.pl:221
24963 msgid "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
24967 #: ../tools/virt-resize.pl:224
24968 msgid "IGNORING OR DELETING PARTITIONS"
24972 #: ../tools/virt-resize.pl:226
24974 "virt-resize also gives a convenient way to ignore or delete partitions when "
24975 "copying from the input disk to the output disk. Ignoring a partition speeds "
24976 "up the copy where you don't care about the existing contents of a "
24977 "partition. Deleting a partition removes it completely, but note that it "
24978 "also renumbers any partitions after the one which is deleted, which can "
24979 "leave some guests unbootable."
24983 #: ../tools/virt-resize.pl:243
24984 msgid "Display help."
24988 #: ../tools/virt-resize.pl:257
24989 msgid "B<--resize part=size>"
24993 #: ../tools/virt-resize.pl:259
24995 "Resize the named partition (expanding or shrinking it) so that it has the "
25000 #: ../tools/virt-resize.pl:262
25002 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
25003 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
25004 "Exabytes; or as a percentage of the current size; or as a relative number or "
25005 "percentage. For example:"
25009 #: ../tools/virt-resize.pl:267
25012 " --resize /dev/sda2=10G\n"
25017 #: ../tools/virt-resize.pl:269
25020 " --resize /dev/sda4=90%\n"
25025 #: ../tools/virt-resize.pl:271
25028 " --resize /dev/sda2=+1G\n"
25033 #: ../tools/virt-resize.pl:273
25036 " --resize /dev/sda2=-200M\n"
25041 #: ../tools/virt-resize.pl:275
25044 " --resize /dev/sda1=+128K\n"
25049 #: ../tools/virt-resize.pl:277
25052 " --resize /dev/sda1=+10%\n"
25057 #: ../tools/virt-resize.pl:279
25060 " --resize /dev/sda1=-10%\n"
25065 #: ../tools/virt-resize.pl:281
25067 "You can increase the size of any partition. Virt-resize will expand the "
25068 "direct content of the partition if it knows how (see C<--expand> below)."
25072 #: ../tools/virt-resize.pl:285
25074 "You can only I<decrease> the size of partitions that contain filesystems or "
25075 "PVs which have already been shrunk. Virt-resize will check this has been "
25076 "done before proceeding, or else will print an error (see also "
25077 "C<--resize-force>)."
25081 #: ../tools/virt-resize.pl:290 ../tools/virt-resize.pl:382 ../tools/virt-resize.pl:399
25082 msgid "You can give this option multiple times."
25086 #: ../tools/virt-resize.pl:296
25087 msgid "B<--resize-force part=size>"
25091 #: ../tools/virt-resize.pl:298
25093 "This is the same as C<--resize> except that it will let you decrease the "
25094 "size of any partition. Generally this means you will lose any data which "
25095 "was at the end of the partition you shrink, but you may not care about that "
25096 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
25097 "as a swap partition)."
25101 #: ../tools/virt-resize.pl:304
25102 msgid "See also the C<--ignore> option."
25106 #: ../tools/virt-resize.pl:310
25107 msgid "B<--expand part>"
25111 #: ../tools/virt-resize.pl:312
25113 "Expand the named partition so it uses up all extra space (space left over "
25114 "after any other resize changes that you request have been done)."
25118 #: ../tools/virt-resize.pl:315
25120 "If virt-resize knows how, it will expand the direct content of the "
25121 "partition. For example, if the partition is an LVM PV, it will expand the "
25122 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
25123 "content it doesn't know about alone."
25127 #: ../tools/virt-resize.pl:320
25128 msgid "Currently virt-resize can resize:"
25132 #: ../tools/virt-resize.pl:326
25134 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
25139 #: ../tools/virt-resize.pl:331
25141 "NTFS filesystems contained directly in a partition, if libguestfs was "
25142 "compiled with support for NTFS."
25146 #: ../tools/virt-resize.pl:334
25148 "The filesystem must have been shut down consistently last time it was used. "
25149 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
25150 "consistency check, so at the first boot after resizing Windows will check "
25155 #: ../tools/virt-resize.pl:341
25157 "LVM PVs (physical volumes). However virt-resize does I<not> resize anything "
25158 "inside the PV. The user will have to resize LVs as desired."
25162 #: ../tools/virt-resize.pl:347 ../tools/virt-resize.pl:369
25163 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
25167 #: ../tools/virt-resize.pl:353
25168 msgid "B<--shrink part>"
25172 #: ../tools/virt-resize.pl:355
25174 "Shrink the named partition until the overall disk image fits in the "
25175 "destination. The named partition B<must> contain a filesystem or PV which "
25176 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
25177 "online tools). Virt-resize will check this and give an error if it has not "
25182 #: ../tools/virt-resize.pl:361
25184 "The amount by which the overall disk must be shrunk (after carrying out all "
25185 "other operations requested by the user) is called the \"deficit\". For "
25186 "example, a straight copy (assume no other operations) from a 5GB disk image "
25187 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
25188 "would give an error unless the user specified a partition to shrink and that "
25189 "partition had more than a gigabyte of free space."
25193 #: ../tools/virt-resize.pl:375
25194 msgid "B<--ignore part>"
25198 #: ../tools/virt-resize.pl:377
25200 "Ignore the named partition. Effectively this means the partition is "
25201 "allocated on the destination disk, but the content is not copied across from "
25202 "the source disk. The content of the partition will be blank (all zero "
25207 #: ../tools/virt-resize.pl:388
25208 msgid "B<--delete part>"
25212 #: ../tools/virt-resize.pl:390
25214 "Delete the named partition. It would be more accurate to describe this as "
25215 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
25216 "the original disk image is left intact."
25220 #: ../tools/virt-resize.pl:394
25222 "Note that when you delete a partition, then anything contained in the "
25223 "partition is also deleted. Furthermore, this causes any partitions that "
25224 "come after to be I<renumbered>, which can easily make your guest unbootable."
25228 #: ../tools/virt-resize.pl:405
25229 msgid "B<--LV-expand logvol>"
25233 #: ../tools/virt-resize.pl:407
25235 "This takes the logical volume and, as a final step, expands it to fill all "
25236 "the space available in its volume group. A typical usage, assuming a Linux "
25237 "guest with a single PV C</dev/sda2> and a root device called "
25238 "C</dev/vg_guest/lv_root> would be:"
25242 #: ../tools/virt-resize.pl:412
25245 " virt-resize indisk outdisk \\\n"
25246 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
25251 #: ../tools/virt-resize.pl:415
25253 "This would first expand the partition (and PV), and then expand the root "
25254 "device to fill the extra space in the PV."
25258 #: ../tools/virt-resize.pl:418
25260 "The contents of the LV are also resized if virt-resize knows how to do "
25261 "that. You can stop virt-resize from trying to expand the content by using "
25262 "the option C<--no-expand-content>."
25266 #: ../tools/virt-resize.pl:422
25267 msgid "Use L<virt-list-filesystems(1)> to list the filesystems in the guest."
25271 #: ../tools/virt-resize.pl:425
25273 "You can give this option multiple times, I<but> it doesn't make sense to do "
25274 "this unless the logical volumes you specify are all in different volume "
25279 #: ../tools/virt-resize.pl:433
25280 msgid "B<--no-copy-boot-loader>"
25284 #: ../tools/virt-resize.pl:435
25286 "By default, virt-resize copies over some sectors at the start of the disk "
25287 "(up to the beginning of the first partition). Commonly these sectors "
25288 "contain the Master Boot Record (MBR) and the boot loader, and are required "
25289 "in order for the guest to boot correctly."
25293 #: ../tools/virt-resize.pl:440
25295 "If you specify this flag, then this initial copy is not done. You may need "
25296 "to reinstall the boot loader in this case."
25300 #: ../tools/virt-resize.pl:448
25301 msgid "B<--no-extra-partition>"
25305 #: ../tools/virt-resize.pl:450
25307 "By default, virt-resize creates an extra partition if there is any extra, "
25308 "unused space after all resizing has happened. Use this option to prevent "
25309 "the extra partition from being created. If you do this then the extra space "
25310 "will be inaccessible until you run fdisk, parted, or some other partitioning "
25311 "tool in the guest."
25315 #: ../tools/virt-resize.pl:456
25317 "Note that if the surplus space is smaller than 10 MB, no extra partition "
25322 #: ../tools/virt-resize.pl:463
25323 msgid "B<--no-expand-content>"
25327 #: ../tools/virt-resize.pl:465
25329 "By default, virt-resize will try to expand the direct contents of "
25330 "partitions, if it knows how (see C<--expand> option above)."
25334 #: ../tools/virt-resize.pl:468
25336 "If you give the C<--no-expand-content> option then virt-resize will not "
25341 #: ../tools/virt-resize.pl:475
25342 msgid "B<-d> | B<--debug>"
25346 #: ../tools/virt-resize.pl:483
25347 msgid "B<-n> | B<--dryrun>"
25351 #: ../tools/virt-resize.pl:485
25352 msgid "Print a summary of what would be done, but don't do anything."
25356 #: ../tools/virt-resize.pl:491
25357 msgid "B<-q> | B<--quiet>"
25361 #: ../tools/virt-resize.pl:493
25362 msgid "Don't print the summary."
25366 #: ../tools/virt-resize.pl:1359 ../tools/virt-rescue.pl:90
25371 #: ../tools/virt-resize.pl:1361
25372 msgid "\"Partition 1 does not end on cylinder boundary.\""
25376 #: ../tools/virt-resize.pl:1363
25378 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
25379 "means the partitions will not be aligned to the ancient CHS geometry. "
25380 "However CHS geometry is meaningless for disks manufactured since the early "
25381 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
25382 "cylinders is not required by any modern operating system."
25386 #: ../tools/virt-resize.pl:1370
25387 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
25391 #: ../tools/virt-resize.pl:1372
25393 "In Windows Vista and later versions, Microsoft switched to using a separate "
25394 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
25395 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
25396 "the boot partition. Doing so seems to break the guest completely. However "
25397 "expanding the second partition (ie. C: drive) should work."
25401 #: ../tools/virt-resize.pl:1379
25403 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
25404 "NTFS partitions have been expanded. This is just a safety check and (unless "
25405 "it find errors) is nothing to worry about."
25409 #: ../tools/virt-resize.pl:1383
25410 msgid "ALTERNATIVE TOOLS"
25414 #: ../tools/virt-resize.pl:1385
25416 "There are several proprietary tools for resizing partitions. We won't "
25417 "mention any here."
25421 #: ../tools/virt-resize.pl:1388
25423 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
25424 "operations on disk images. They can resize and move partitions, but I don't "
25425 "think they can do anything with the contents, and they certainly don't "
25430 #: ../tools/virt-resize.pl:1393
25432 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
25433 "but at a much lower level. You will probably end up hand-calculating sector "
25434 "offsets, which is something that virt-resize was designed to avoid. If you "
25435 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
25440 #: ../tools/virt-resize.pl:1401
25442 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)>, L<virt-df(1)>, "
25443 "L<guestfs(3)>, L<guestfish(1)>, L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, "
25444 "L<resize2fs(8)>, L<ntfsresize(8)>, L<virsh(1)>, L<parted(8)>, "
25445 "L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
25449 #: ../tools/virt-list-filesystems.pl:32
25450 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
25454 #: ../tools/virt-list-filesystems.pl:36
25457 " virt-list-filesystems [--options] domname\n"
25462 #: ../tools/virt-list-filesystems.pl:38
25465 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
25470 #: ../tools/virt-list-filesystems.pl:42
25472 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
25473 "are contained in a virtual machine or disk image."
25477 #: ../tools/virt-list-filesystems.pl:46
25479 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
25480 "functionality. For more complex cases you should look at the "
25481 "L<guestfish(1)> tool."
25485 #: ../tools/virt-list-filesystems.pl:88
25487 "With this option, C<virt-list-filesystems> displays the type of each "
25488 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
25492 #: ../tools/virt-list-filesystems.pl:95
25493 msgid "B<-a> | B<--all>"
25497 #: ../tools/virt-list-filesystems.pl:97
25499 "Normally we only show mountable filesystems. If this option is given then "
25500 "swap devices are shown too."
25504 #: ../tools/virt-list-filesystems.pl:193
25506 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
25507 "L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
25508 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
25512 #: ../tools/virt-cat.pl:34
25513 msgid "virt-cat - Display a file in a virtual machine"
25517 #: ../tools/virt-cat.pl:38
25520 " virt-cat [--options] domname file\n"
25525 #: ../tools/virt-cat.pl:40
25528 " virt-cat [--options] disk.img [disk.img ...] file\n"
25533 #: ../tools/virt-cat.pl:44
25535 "C<virt-cat> is a command line tool to display the contents of C<file> where "
25536 "C<file> exists in the named virtual machine (or disk image)."
25540 #: ../tools/virt-cat.pl:47
25542 "C<virt-cat> can be used to quickly view a single file. To edit a file, use "
25543 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
25548 #: ../tools/virt-cat.pl:53
25549 msgid "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
25553 #: ../tools/virt-cat.pl:56
25556 " virt-cat mydomain /etc/fstab\n"
25561 #: ../tools/virt-cat.pl:58
25562 msgid "List syslog messages from a VM:"
25566 #: ../tools/virt-cat.pl:60
25569 " virt-cat mydomain /var/log/messages | tail\n"
25574 #: ../tools/virt-cat.pl:62
25575 msgid "Find out what DHCP IP address a VM acquired:"
25579 #: ../tools/virt-cat.pl:64
25582 " virt-cat mydomain /var/log/messages | grep 'dhclient: bound to' | tail\n"
25587 #: ../tools/virt-cat.pl:66
25588 msgid "Find out what packages were recently installed:"
25592 #: ../tools/virt-cat.pl:68
25595 " virt-cat mydomain /var/log/yum.log | tail\n"
25600 #: ../tools/virt-cat.pl:70
25601 msgid "Find out who is logged on inside a virtual machine:"
25605 #: ../tools/virt-cat.pl:72
25608 " virt-cat mydomain /var/run/utmp > /tmp/utmp\n"
25614 #: ../tools/virt-cat.pl:75
25615 msgid "or who was logged on:"
25619 #: ../tools/virt-cat.pl:77
25622 " virt-cat mydomain /var/log/wtmp > /tmp/wtmp\n"
25623 " last -f /tmp/wtmp\n"
25628 #: ../tools/virt-cat.pl:165
25630 "L<guestfs(3)>, L<guestfish(1)>, L<virt-edit(1)>, L<Sys::Guestfs(3)>, "
25631 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
25635 #: ../tools/virt-tar.pl:34
25636 msgid "virt-tar - Extract or upload files to a virtual machine"
25640 #: ../tools/virt-tar.pl:38
25643 " virt-tar [--options] -x domname directory tarball\n"
25648 #: ../tools/virt-tar.pl:40
25651 " virt-tar [--options] -u domname tarball directory\n"
25656 #: ../tools/virt-tar.pl:42
25659 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
25664 #: ../tools/virt-tar.pl:44
25667 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
25672 #: ../tools/virt-tar.pl:48
25673 msgid "Download C</home> from the VM into a local tarball:"
25677 #: ../tools/virt-tar.pl:50
25680 " virt-tar -x domname /home home.tar\n"
25685 #: ../tools/virt-tar.pl:52
25688 " virt-tar -zx domname /home home.tar.gz\n"
25693 #: ../tools/virt-tar.pl:54
25694 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
25698 #: ../tools/virt-tar.pl:56
25701 " virt-tar -u domname uploadstuff.tar /tmp\n"
25706 #: ../tools/virt-tar.pl:58
25709 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
25714 #: ../tools/virt-tar.pl:62
25716 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
25717 "virtual machines. If you do this, you risk disk corruption in the VM. "
25718 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
25722 #: ../tools/virt-tar.pl:67
25724 "You can use C<-x> (extract) on live virtual machines, but you might get "
25725 "inconsistent results or errors if there is filesystem activity inside the "
25726 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
25727 "work, but the only way to guarantee consistent results is if the virtual "
25728 "machine is shut down."
25732 #: ../tools/virt-tar.pl:75
25734 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
25735 "parts of a guest filesystem. There are many possibilities: making backups, "
25736 "uploading data files, snooping on guest activity, fixing or customizing "
25741 #: ../tools/virt-tar.pl:80
25743 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
25744 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
25745 "should look at the L<guestfish(1)> tool."
25749 #: ../tools/virt-tar.pl:84
25751 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
25752 "its contents (recursively) from the virtual machine into a local tarball. "
25753 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
25754 "virtual machine. You cannot use these two options together."
25758 #: ../tools/virt-tar.pl:90
25760 "In addition, you may need to use the C<-z> (gZip) option to enable "
25761 "compression. When uploading, you have to specify C<-z> if the upload file "
25762 "is compressed because virt-tar won't detect this on its own."
25766 #: ../tools/virt-tar.pl:94
25768 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
25769 "example it cannot do PKZip files or bzip2 compression. If you want that "
25770 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
25771 "the L<libguestfs(3)> API)."
25775 #: ../tools/virt-tar.pl:135
25776 msgid "B<-x> | B<--extract> | B<--download>"
25780 #: ../tools/virt-tar.pl:137
25781 msgid "B<-u> | B<--upload>"
25785 #: ../tools/virt-tar.pl:139
25787 "Use C<-x> to extract (download) a directory from a virtual machine to a "
25792 #: ../tools/virt-tar.pl:142
25794 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
25795 "Please read the L</WARNING> section above before using this option."
25799 #: ../tools/virt-tar.pl:146
25800 msgid "You must specify exactly one of these options."
25804 #: ../tools/virt-tar.pl:152
25805 msgid "B<-z> | B<--gzip>"
25809 #: ../tools/virt-tar.pl:154
25810 msgid "Specify that the input or output tarball is gzip-compressed."
25814 #: ../tools/virt-tar.pl:259
25816 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
25817 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
25818 "L<http://libguestfs.org/>."
25822 #: ../tools/virt-rescue.pl:33
25823 msgid "virt-rescue - Run a rescue shell on a virtual machine"
25827 #: ../tools/virt-rescue.pl:37
25830 " virt-rescue [--options] domname\n"
25835 #: ../tools/virt-rescue.pl:39
25838 " virt-rescue [--options] disk.img [disk.img ...]\n"
25843 #: ../tools/virt-rescue.pl:43
25845 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
25846 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
25847 "you from doing this, but doesn't catch all cases."
25851 #: ../tools/virt-rescue.pl:47
25853 "However if you use the I<--ro> (read only) option, then you can attach a "
25854 "shell to a live virtual machine. The results might be strange or "
25855 "inconsistent at times but you won't get disk corruption."
25859 #: ../tools/virt-rescue.pl:53
25861 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
25862 "need for a CD. virt-rescue gives you a rescue shell and some simple "
25863 "recovery tools which you can use to examine or rescue a virtual machine or "
25868 #: ../tools/virt-rescue.pl:58
25870 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
25871 "on disk image(s):"
25875 #: ../tools/virt-rescue.pl:61
25878 " virt-rescue GuestName\n"
25883 #: ../tools/virt-rescue.pl:63
25886 " virt-rescue --ro /path/to/disk.img\n"
25891 #: ../tools/virt-rescue.pl:65
25894 " virt-rescue /dev/sdc\n"
25899 #: ../tools/virt-rescue.pl:67
25900 msgid "For live VMs you I<must> use the --ro option."
25904 #: ../tools/virt-rescue.pl:69
25906 "When you run virt-rescue on a virtual machine or disk image, you are placed "
25907 "in an interactive bash shell where you can use many ordinary Linux "
25908 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
25909 "appliance. You must mount the virtual machine's filesystems by hand. There "
25910 "is an empty directory called C</sysroot> where you can mount filesystems."
25914 #: ../tools/virt-rescue.pl:76
25916 "In the example below, we list logical volumes, then choose one to mount "
25917 "under C</sysroot>:"
25921 #: ../tools/virt-rescue.pl:79
25925 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
25926 " lv_root vg_f11x64 -wi-a- 8.83G\n"
25927 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
25928 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
25929 " ><rescue> ls /sysroot\n"
25934 #: ../tools/virt-rescue.pl:86
25936 "If you don't know what filesystems are available on the virtual machine then "
25937 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
25941 #: ../tools/virt-rescue.pl:92
25943 "Virt-rescue can be used on I<any> disk image file or device, not just a "
25944 "virtual machine. For example you can use it on a blank file if you want to "
25945 "partition that file (although we would recommend using L<guestfish(1)> "
25946 "instead as it is more suitable for this purpose). You can even use "
25947 "virt-rescue on things like SD cards."
25951 #: ../tools/virt-rescue.pl:98
25953 "This tool is just designed for quick interactive hacking on a virtual "
25954 "machine. For more structured access to a virtual machine disk image, you "
25955 "should use L<guestfs(3)>. To get a structured shell that you can use to "
25956 "make scripted changes to guests, use L<guestfish(1)>."
25960 #: ../tools/virt-rescue.pl:127
25961 msgid "B<--append kernelopts>"
25965 #: ../tools/virt-rescue.pl:129
25966 msgid "Pass additional options to the rescue kernel."
25970 #: ../tools/virt-rescue.pl:147
25971 msgid "B<--memsize MB> | B<-m MB>"
25975 #: ../tools/virt-rescue.pl:149
25977 "Change the amount of memory allocated to the rescue system. The default is "
25978 "set by libguestfs and is small but adequate for running system tools. The "
25979 "occasional program might need more memory. The parameter is specified in "
25984 #: ../tools/virt-rescue.pl:158
25985 msgid "B<--ro> | B<-r>"
25989 #: ../tools/virt-rescue.pl:160
25990 msgid "Open the image read-only."
25994 #: ../tools/virt-rescue.pl:172
25996 "Enable SELinux in the rescue appliance. You should read "
25997 "L<guestfs(3)/SELINUX> before using this option."
26001 #: ../tools/virt-rescue.pl:228
26003 "Several environment variables affect virt-rescue. See "
26004 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
26008 #: ../tools/virt-rescue.pl:233
26010 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
26011 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
26015 #: ../tools/virt-make-fs.pl:37
26016 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
26020 #: ../tools/virt-make-fs.pl:41
26023 " virt-make-fs [--options] input.tar output.img\n"
26028 #: ../tools/virt-make-fs.pl:43
26031 " virt-make-fs [--options] input.tar.gz output.img\n"
26036 #: ../tools/virt-make-fs.pl:45
26039 " virt-make-fs [--options] directory output.img\n"
26044 #: ../tools/virt-make-fs.pl:49
26046 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
26047 "archive or some files in a directory. It is similar to tools like "
26048 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
26049 "it can create common filesystem types like ext2/3 or NTFS, which can be "
26050 "useful if you want to attach these filesystems to existing virtual machines "
26051 "(eg. to import large amounts of read-only data to a VM)."
26055 #: ../tools/virt-make-fs.pl:57
26056 msgid "Basic usage is:"
26060 #: ../tools/virt-make-fs.pl:59
26063 " virt-make-fs input output\n"
26068 #: ../tools/virt-make-fs.pl:61
26070 "where C<input> is either a directory containing files that you want to add, "
26071 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
26072 "C<output> is a disk image. The input type is detected automatically. The "
26073 "output disk image defaults to a raw ext2 image unless you specify extra "
26074 "flags (see L</OPTIONS> below)."
26078 #: ../tools/virt-make-fs.pl:67
26079 msgid "EXTRA SPACE"
26083 #: ../tools/virt-make-fs.pl:69
26085 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
26086 "the files that it contains, but might have extra space. Depending on how "
26087 "you are going to use the output, you might think this extra space is wasted "
26088 "and want to minimize it, or you might want to leave space so that more files "
26089 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
26090 "but you can use the C<--size> flag to leave space in the filesystem if you "
26095 #: ../tools/virt-make-fs.pl:77
26097 "An alternative way to leave extra space but not make the output image any "
26098 "bigger is to use an alternative disk image format (instead of the default "
26099 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
26100 "image format (check your hypervisor supports this before using it). This "
26101 "allows you to choose a large C<--size> but the extra space won't actually be "
26102 "allocated in the image until you try to store something in it."
26106 #: ../tools/virt-make-fs.pl:85
26108 "Don't forget that you can also use local commands including L<resize2fs(8)> "
26109 "and L<virt-resize(1)> to resize existing filesystems, or rerun "
26110 "virt-make-resize to build another image from scratch."
26114 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123 ../tools/virt-make-fs.pl:142
26119 #: ../tools/virt-make-fs.pl:91
26122 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
26127 #: ../tools/virt-make-fs.pl:93
26128 msgid "FILESYSTEM TYPE"
26132 #: ../tools/virt-make-fs.pl:95
26134 "The default filesystem type is C<ext2>. Just about any filesystem type that "
26135 "libguestfs supports can be used (but I<not> read-only formats like "
26136 "ISO9660). Here are some of the more common choices:"
26140 #: ../tools/virt-make-fs.pl:101
26145 #: ../tools/virt-make-fs.pl:103
26147 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
26148 "you are not going to use the filesystem in a way that requires the journal, "
26149 "then this is just wasted overhead."
26153 #: ../tools/virt-make-fs.pl:107
26154 msgid "I<ntfs> or I<vfat>"
26158 #: ../tools/virt-make-fs.pl:109
26159 msgid "Useful if exporting data to a Windows guest."
26163 #: ../tools/virt-make-fs.pl:111
26165 "I<Note for vfat>: The tar archive or local directory must only contain files "
26166 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
26167 "program running within libguestfs is unable to change the ownership of "
26168 "non-root files, since vfat itself does not support this."
26172 #: ../tools/virt-make-fs.pl:116
26177 #: ../tools/virt-make-fs.pl:118
26179 "Lower overhead than C<ext2>, but certain limitations on filename length and "
26180 "total filesystem size."
26184 #: ../tools/virt-make-fs.pl:125
26187 " virt-make-fs --type=minix input minixfs.img\n"
26192 #: ../tools/virt-make-fs.pl:127
26193 msgid "TO PARTITION OR NOT TO PARTITION"
26197 #: ../tools/virt-make-fs.pl:129
26198 msgid "Optionally virt-make-fs can add a partition table to the output disk."
26202 #: ../tools/virt-make-fs.pl:131
26204 "Adding a partition can make the disk image more compatible with certain "
26205 "virtualized operating systems which don't expect to see a filesystem "
26206 "directly located on a block device (Linux doesn't care and will happily "
26207 "handle both types)."
26211 #: ../tools/virt-make-fs.pl:136
26213 "On the other hand, if you have a partition table then the output image is no "
26214 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
26215 "directly on a partitioned disk image. (However libguestfs tools such as "
26216 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
26220 #: ../tools/virt-make-fs.pl:144
26221 msgid "Add an MBR partition:"
26225 #: ../tools/virt-make-fs.pl:146
26228 " virt-make-fs --partition -- input disk.img\n"
26233 #: ../tools/virt-make-fs.pl:148
26235 "If the output disk image could be terabyte-sized or larger, it's better to "
26236 "use an EFI/GPT-compatible partition table:"
26240 #: ../tools/virt-make-fs.pl:151
26243 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
26248 #: ../tools/virt-make-fs.pl:179
26249 msgid "Enable debugging information."
26253 #: ../tools/virt-make-fs.pl:185
26254 msgid "B<--size=E<lt>NE<gt>>"
26258 #: ../tools/virt-make-fs.pl:187
26259 msgid "B<--size=+E<lt>NE<gt>>"
26263 #: ../tools/virt-make-fs.pl:189
26264 msgid "B<-s E<lt>NE<gt>>"
26268 #: ../tools/virt-make-fs.pl:191
26269 msgid "B<-s +E<lt>NE<gt>>"
26273 #: ../tools/virt-make-fs.pl:193
26274 msgid "Use the C<--size> (or C<-s>) option to choose the size of the output image."
26278 #: ../tools/virt-make-fs.pl:196
26280 "If this option is I<not> given, then the output image will be just large "
26281 "enough to contain all the files, with not much wasted space."
26285 #: ../tools/virt-make-fs.pl:199
26287 "To choose a fixed size output disk, specify an absolute number followed by "
26288 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
26289 "Petabytes or Exabytes. This must be large enough to contain all the input "
26290 "files, else you will get an error."
26294 #: ../tools/virt-make-fs.pl:204
26296 "To leave extra space, specify C<+> (plus sign) and a number followed by "
26297 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
26298 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
26299 "the input files, and (approximately) an extra 200 MB free space."
26303 #: ../tools/virt-make-fs.pl:210
26305 "Note that virt-make-fs estimates free space, and therefore will not produce "
26306 "filesystems containing precisely the free space requested. (It is much more "
26307 "expensive and time-consuming to produce a filesystem which has precisely the "
26308 "desired free space)."
26312 #: ../tools/virt-make-fs.pl:219
26313 msgid "B<--format=E<lt>fmtE<gt>>"
26317 #: ../tools/virt-make-fs.pl:221
26318 msgid "B<-F E<lt>fmtE<gt>>"
26322 #: ../tools/virt-make-fs.pl:223
26323 msgid "Choose the output disk image format."
26327 #: ../tools/virt-make-fs.pl:225
26328 msgid "The default is C<raw> (raw disk image)."
26332 #: ../tools/virt-make-fs.pl:227
26334 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
26335 "that would really make sense here is C<qcow2>."
26339 #: ../tools/virt-make-fs.pl:234
26340 msgid "B<--type=E<lt>fsE<gt>>"
26344 #: ../tools/virt-make-fs.pl:236
26345 msgid "B<-t E<lt>fsE<gt>>"
26349 #: ../tools/virt-make-fs.pl:238
26350 msgid "Choose the output filesystem type."
26354 #: ../tools/virt-make-fs.pl:240
26355 msgid "The default is C<ext2>."
26359 #: ../tools/virt-make-fs.pl:242
26360 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
26364 #: ../tools/virt-make-fs.pl:249
26365 msgid "B<--partition>"
26369 #: ../tools/virt-make-fs.pl:251
26370 msgid "B<--partition=E<lt>parttypeE<gt>>"
26374 #: ../tools/virt-make-fs.pl:253
26376 "If specified, this flag adds an MBR partition table to the output disk "
26381 #: ../tools/virt-make-fs.pl:256
26383 "You can change the partition table type, eg. C<--partition=gpt> for large "
26388 #: ../tools/virt-make-fs.pl:259
26390 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
26391 "might consider the next parameter to be the partition type. For example:"
26395 #: ../tools/virt-make-fs.pl:263
26398 " virt-make-fs --partition input.tar ...\n"
26403 #: ../tools/virt-make-fs.pl:265
26405 "would cause virt-make-fs to think you wanted to use a partition type of "
26406 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
26407 "dash) between options and the input file argument:"
26411 #: ../tools/virt-make-fs.pl:269
26414 " virt-make-fs --partition -- input.tar ...\n"
26419 #: ../tools/virt-make-fs.pl:529
26421 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<mkisofs(1)>, "
26422 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
26423 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
26427 #: ../tools/virt-make-fs.pl:546
26430 " export LIBGUESTFS_DEBUG=1\n"
26431 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
26436 #: ../tools/virt-make-fs.pl:549
26438 "Attach /tmp/virt-make-fs.log to a new bug report at "
26439 "L<https://bugzilla.redhat.com/>"
26443 #: ../tools/virt-list-partitions.pl:32
26444 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
26448 #: ../tools/virt-list-partitions.pl:36
26451 " virt-list-partitions [--options] domname\n"
26456 #: ../tools/virt-list-partitions.pl:38
26459 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
26464 #: ../tools/virt-list-partitions.pl:42
26466 "C<virt-list-partitions> is a command line tool to list the partitions that "
26467 "are contained in a virtual machine or disk image. It is mainly useful as a "
26468 "first step to using L<virt-resize(1)>."
26472 #: ../tools/virt-list-partitions.pl:47
26474 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
26475 "functionality. For more complex cases you should look at the "
26476 "L<guestfish(1)> tool."
26480 #: ../tools/virt-list-partitions.pl:87
26481 msgid "B<-h> | B<--human-readable>"
26485 #: ../tools/virt-list-partitions.pl:89
26486 msgid "Show sizes in human-readable form (eg. \"1G\")."
26490 #: ../tools/virt-list-partitions.pl:97
26492 "With this option, C<virt-list-partitions> displays the type and size of each "
26493 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
26497 #: ../tools/virt-list-partitions.pl:104
26498 msgid "B<-t> | B<--total>"
26502 #: ../tools/virt-list-partitions.pl:106
26503 msgid "Display the total size of each block device (as a separate row or rows)."
26507 #: ../tools/virt-list-partitions.pl:231
26509 "L<guestfs(3)>, L<guestfish(1)>, L<virt-list-filesystems(1)>, "
26510 "L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
26511 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."