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.8\n"
10 "Report-Msgid-Bugs-To: libguestfs@redhat.com\n"
11 "POT-Creation-Date: 2010-09-04 10:26+0200\n"
12 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14 "Language-Team: LANGUAGE <LL@li.org>\n"
16 "Content-Type: text/plain; charset=utf-8\n"
17 "Content-Transfer-Encoding: ENCODING"
20 #: ../src/guestfs.pod:1 ../fish/guestfish.pod:1 ../test-tool/libguestfs-test-tool.pod:1 ../fuse/guestmount.pod:1 ../inspector/virt-inspector.pl:36 ../tools/virt-cat.pl:30 ../tools/virt-df.pl:32 ../tools/virt-edit.pl:31 ../tools/virt-list-filesystems.pl:28 ../tools/virt-list-partitions.pl:28 ../tools/virt-ls.pl:31 ../tools/virt-make-fs.pl:33 ../tools/virt-rescue.pl:29 ../tools/virt-resize.pl:38 ../tools/virt-tar.pl:30 ../tools/virt-win-reg.pl:34
25 #: ../src/guestfs.pod:3 ../fish/guestfish.pod:3 ../test-tool/libguestfs-test-tool.pod:3 ../fuse/guestmount.pod:3 ../inspector/virt-inspector.pl:38 ../tools/virt-cat.pl:32 ../tools/virt-df.pl:34 ../tools/virt-edit.pl:33 ../tools/virt-list-filesystems.pl:30 ../tools/virt-list-partitions.pl:30 ../tools/virt-ls.pl:33 ../tools/virt-make-fs.pl:35 ../tools/virt-rescue.pl:31 ../tools/virt-resize.pl:40 ../tools/virt-tar.pl:32 ../tools/virt-win-reg.pl:36
30 #: ../src/guestfs.pod:5
31 msgid "guestfs - Library for accessing and modifying virtual machine images"
35 #: ../src/guestfs.pod:7 ../fish/guestfish.pod:7 ../test-tool/libguestfs-test-tool.pod:7 ../fuse/guestmount.pod:7 ../inspector/virt-inspector.pl:42 ../tools/virt-cat.pl:36 ../tools/virt-df.pl:38 ../tools/virt-edit.pl:37 ../tools/virt-list-filesystems.pl:34 ../tools/virt-list-partitions.pl:34 ../tools/virt-ls.pl:37 ../tools/virt-make-fs.pl:39 ../tools/virt-rescue.pl:35 ../tools/virt-resize.pl:44 ../tools/virt-tar.pl:36 ../tools/virt-win-reg.pl:40
40 #: ../src/guestfs.pod:9
43 " #include <guestfs.h>\n"
48 #: ../src/guestfs.pod:11
51 " guestfs_h *g = guestfs_create ();\n"
52 " guestfs_add_drive (g, \"guest.img\");\n"
53 " guestfs_launch (g);\n"
54 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
55 " guestfs_touch (g, \"/hello\");\n"
56 " guestfs_umount (g, \"/\");\n"
57 " guestfs_sync (g);\n"
58 " guestfs_close (g);\n"
63 #: ../src/guestfs.pod:20
66 " cc prog.c -o prog -lguestfs\n"
68 " cc prog.c -o prog `pkg-config libguestfs --cflags --libs`\n"
73 #: ../src/guestfs.pod:24 ../fish/guestfish.pod:115 ../test-tool/libguestfs-test-tool.pod:11 ../fuse/guestmount.pod:16 ../inspector/virt-inspector.pl:48 ../tools/virt-cat.pl:42 ../tools/virt-df.pl:46 ../tools/virt-edit.pl:51 ../tools/virt-list-filesystems.pl:40 ../tools/virt-list-partitions.pl:40 ../tools/virt-ls.pl:43 ../tools/virt-make-fs.pl:47 ../tools/virt-rescue.pl:51 ../tools/virt-resize.pl:50 ../tools/virt-tar.pl:73 ../tools/virt-win-reg.pl:64
78 #: ../src/guestfs.pod:26
80 "Libguestfs is a library for accessing and modifying guest disk images. "
81 "Amongst the things this is good for: making batch configuration changes to "
82 "guests, getting disk used/free statistics (see also: virt-df), migrating "
83 "between virtualization systems (see also: virt-p2v), performing partial "
84 "backups, performing partial guest clones, cloning guests and changing "
85 "registry/UUID/hostname info, and much else besides."
89 #: ../src/guestfs.pod:34
91 "Libguestfs uses Linux kernel and qemu code, and can access any type of guest "
92 "filesystem that Linux and qemu can, including but not limited to: ext2/3/4, "
93 "btrfs, FAT and NTFS, LVM, many different disk partition schemes, qcow, "
98 #: ../src/guestfs.pod:39
100 "Libguestfs provides ways to enumerate guest storage (eg. partitions, LVs, "
101 "what filesystem is in each LV, etc.). It can also run commands in the "
102 "context of the guest. Also you can access filesystems over FUSE."
106 #: ../src/guestfs.pod:44
108 "Libguestfs is a library that can be linked with C and C++ management "
109 "programs (or management programs written in OCaml, Perl, Python, Ruby, Java, "
110 "PHP, Haskell or C#). You can also use it from shell scripts or the command "
115 #: ../src/guestfs.pod:49
117 "You don't need to be root to use libguestfs, although obviously you do need "
118 "enough permissions to access the disk images."
122 #: ../src/guestfs.pod:52
124 "Libguestfs is a large API because it can do many things. For a gentle "
125 "introduction, please read the L</API OVERVIEW> section next."
129 #: ../src/guestfs.pod:55
134 #: ../src/guestfs.pod:57
136 "This section provides a gentler overview of the libguestfs API. We also try "
137 "to group API calls together, where that may not be obvious from reading "
138 "about the individual calls in the main section of this manual."
142 #: ../src/guestfs.pod:62
147 #: ../src/guestfs.pod:64
149 "Before you can use libguestfs calls, you have to create a handle. Then you "
150 "must add at least one disk image to the handle, followed by launching the "
151 "handle, then performing whatever operations you want, and finally closing "
152 "the handle. By convention we use the single letter C<g> for the name of the "
153 "handle variable, although of course you can use any name you want."
157 #: ../src/guestfs.pod:71
158 msgid "The general structure of all libguestfs-using programs looks like this:"
162 #: ../src/guestfs.pod:74
165 " guestfs_h *g = guestfs_create ();\n"
170 #: ../src/guestfs.pod:76
173 " /* Call guestfs_add_drive additional times if there are\n"
174 " * multiple disk images.\n"
176 " guestfs_add_drive (g, \"guest.img\");\n"
181 #: ../src/guestfs.pod:81
184 " /* Most manipulation calls won't work until you've launched\n"
185 " * the handle 'g'. You have to do this _after_ adding drives\n"
186 " * and _before_ other commands.\n"
188 " guestfs_launch (g);\n"
193 #: ../src/guestfs.pod:87
196 " /* Now you can examine what partitions, LVs etc are available.\n"
198 " char **partitions = guestfs_list_partitions (g);\n"
199 " char **logvols = guestfs_lvs (g);\n"
204 #: ../src/guestfs.pod:92
207 " /* To access a filesystem in the image, you must mount it.\n"
209 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
214 #: ../src/guestfs.pod:96
217 " /* Now you can perform filesystem actions on the guest\n"
220 " guestfs_touch (g, \"/hello\");\n"
225 #: ../src/guestfs.pod:101
228 " /* You only need to call guestfs_sync if you have made\n"
229 " * changes to the guest image. (But if you've made changes\n"
230 " * then you *must* sync). See also: guestfs_umount and\n"
231 " * guestfs_umount_all calls.\n"
233 " guestfs_sync (g);\n"
238 #: ../src/guestfs.pod:108
241 " /* Close the handle 'g'. */\n"
242 " guestfs_close (g);\n"
247 #: ../src/guestfs.pod:111
249 "The code above doesn't include any error checking. In real code you should "
250 "check return values carefully for errors. In general all functions that "
251 "return integers return C<-1> on error, and all functions that return "
252 "pointers return C<NULL> on error. See section L</ERROR HANDLING> below for "
253 "how to handle errors, and consult the documentation for each function call "
254 "below to see precisely how they return error indications."
258 #: ../src/guestfs.pod:119
263 #: ../src/guestfs.pod:121
265 "The image filename (C<\"guest.img\"> in the example above) could be a disk "
266 "image from a virtual machine, a L<dd(1)> copy of a physical hard disk, an "
267 "actual block device, or simply an empty file of zeroes that you have created "
268 "through L<posix_fallocate(3)>. Libguestfs lets you do useful things to all "
273 #: ../src/guestfs.pod:127
275 "You can add a disk read-only using L</guestfs_add_drive_ro>, in which case "
276 "libguestfs won't modify the file."
280 #: ../src/guestfs.pod:130
282 "Be extremely cautious if the disk image is in use, eg. if it is being used "
283 "by a virtual machine. Adding it read-write will almost certainly cause disk "
284 "corruption, but adding it read-only is safe."
288 #: ../src/guestfs.pod:134
290 "You must add at least one disk image, and you may add multiple disk images. "
291 "In the API, the disk images are usually referred to as C</dev/sda> (for the "
292 "first one you added), C</dev/sdb> (for the second one you added), etc."
296 #: ../src/guestfs.pod:139
298 "Once L</guestfs_launch> has been called you cannot add any more images. You "
299 "can call L</guestfs_list_devices> to get a list of the device names, in the "
300 "order that you added them. See also L</BLOCK DEVICE NAMING> below."
304 #: ../src/guestfs.pod:144
309 #: ../src/guestfs.pod:146
311 "Before you can read or write files, create directories and so on in a disk "
312 "image that contains filesystems, you have to mount those filesystems using "
313 "L</guestfs_mount>. If you already know that a disk image contains (for "
314 "example) one partition with a filesystem on that partition, then you can "
319 #: ../src/guestfs.pod:152
322 " guestfs_mount (g, \"/dev/sda1\", \"/\");\n"
327 #: ../src/guestfs.pod:154
329 "where C</dev/sda1> means literally the first partition (C<1>) of the first "
330 "disk image that we added (C</dev/sda>). If the disk contains Linux LVM2 "
331 "logical volumes you could refer to those instead (eg. C</dev/VG/LV>)."
335 #: ../src/guestfs.pod:158
337 "If you are given a disk image and you don't know what it contains then you "
338 "have to find out. Libguestfs can do that too: use "
339 "L</guestfs_list_partitions> and L</guestfs_lvs> to list possible partitions "
340 "and LVs, and either try mounting each to see what is mountable, or else "
341 "examine them with L</guestfs_vfs_type> or L</guestfs_file>. Libguestfs also "
342 "has a set of APIs for inspection of disk images (see L</INSPECTION> below). "
343 "But you might find it easier to look at higher level programs built on top "
344 "of libguestfs, in particular L<virt-inspector(1)>."
348 #: ../src/guestfs.pod:168
350 "To mount a disk image read-only, use L</guestfs_mount_ro>. There are "
351 "several other variations of the C<guestfs_mount_*> call."
355 #: ../src/guestfs.pod:171
356 msgid "FILESYSTEM ACCESS AND MODIFICATION"
360 #: ../src/guestfs.pod:173
362 "The majority of the libguestfs API consists of fairly low-level calls for "
363 "accessing and modifying the files, directories, symlinks etc on mounted "
364 "filesystems. There are over a hundred such calls which you can find listed "
365 "in detail below in this man page, and we don't even pretend to cover them "
366 "all in this overview."
370 #: ../src/guestfs.pod:179
372 "Specify filenames as full paths, starting with C<\"/\"> and including the "
377 #: ../src/guestfs.pod:182
379 "For example, if you mounted a filesystem at C<\"/\"> and you want to read "
380 "the file called C<\"etc/passwd\"> then you could do:"
384 #: ../src/guestfs.pod:185
387 " char *data = guestfs_cat (g, \"/etc/passwd\");\n"
392 #: ../src/guestfs.pod:187
394 "This would return C<data> as a newly allocated buffer containing the full "
395 "content of that file (with some conditions: see also L</DOWNLOADING> below), "
396 "or C<NULL> if there was an error."
400 #: ../src/guestfs.pod:191
402 "As another example, to create a top-level directory on that filesystem "
403 "called C<\"var\"> you would do:"
407 #: ../src/guestfs.pod:194
410 " guestfs_mkdir (g, \"/var\");\n"
415 #: ../src/guestfs.pod:196
416 msgid "To create a symlink you could do:"
420 #: ../src/guestfs.pod:198
423 " guestfs_ln_s (g, \"/etc/init.d/portmap\",\n"
424 " \"/etc/rc3.d/S30portmap\");\n"
429 #: ../src/guestfs.pod:201
431 "Libguestfs will reject attempts to use relative paths and there is no "
432 "concept of a current working directory."
436 #: ../src/guestfs.pod:204
438 "Libguestfs can return errors in many situations: for example if the "
439 "filesystem isn't writable, or if a file or directory that you requested "
440 "doesn't exist. If you are using the C API (documented here) you have to "
441 "check for those error conditions after each call. (Other language bindings "
442 "turn these errors into exceptions)."
446 #: ../src/guestfs.pod:210
448 "File writes are affected by the per-handle umask, set by calling "
449 "L</guestfs_umask> and defaulting to 022. See L</UMASK>."
453 #: ../src/guestfs.pod:213
458 #: ../src/guestfs.pod:215
460 "Libguestfs contains API calls to read, create and modify partition tables on "
465 #: ../src/guestfs.pod:218
467 "In the common case where you want to create a single partition covering the "
468 "whole disk, you should use the L</guestfs_part_disk> call:"
472 #: ../src/guestfs.pod:222
475 " const char *parttype = \"mbr\";\n"
476 " if (disk_is_larger_than_2TB)\n"
477 " parttype = \"gpt\";\n"
478 " guestfs_part_disk (g, \"/dev/sda\", parttype);\n"
483 #: ../src/guestfs.pod:227
485 "Obviously this effectively wipes anything that was on that disk image "
490 #: ../src/guestfs.pod:230
495 #: ../src/guestfs.pod:232
497 "Libguestfs provides access to a large part of the LVM2 API, such as "
498 "L</guestfs_lvcreate> and L</guestfs_vgremove>. It won't make much sense "
499 "unless you familiarize yourself with the concepts of physical volumes, "
500 "volume groups and logical volumes."
504 #: ../src/guestfs.pod:237
506 "This author strongly recommends reading the LVM HOWTO, online at "
507 "L<http://tldp.org/HOWTO/LVM-HOWTO/>."
511 #: ../src/guestfs.pod:240
516 #: ../src/guestfs.pod:242
518 "Use L</guestfs_cat> to download small, text only files. This call is "
519 "limited to files which are less than 2 MB and which cannot contain any ASCII "
520 "NUL (C<\\0>) characters. However it has a very simple to use API."
524 #: ../src/guestfs.pod:247
526 "L</guestfs_read_file> can be used to read files which contain arbitrary 8 "
527 "bit data, since it returns a (pointer, size) pair. However it is still "
528 "limited to \"small\" files, less than 2 MB."
532 #: ../src/guestfs.pod:251
534 "L</guestfs_download> can be used to download any file, with no limits on "
535 "content or size (even files larger than 4 GB)."
539 #: ../src/guestfs.pod:254
540 msgid "To download multiple files, see L</guestfs_tar_out> and L</guestfs_tgz_out>."
544 #: ../src/guestfs.pod:257
549 #: ../src/guestfs.pod:259
551 "It's often the case that you want to write a file or files to the disk "
556 #: ../src/guestfs.pod:262
558 "To write a small file with fixed content, use L</guestfs_write>. To create "
559 "a file of all zeroes, use L</guestfs_truncate_size> (sparse) or "
560 "L</guestfs_fallocate64> (with all disk blocks allocated). There are a "
561 "variety of other functions for creating test files, for example "
562 "L</guestfs_fill> and L</guestfs_fill_pattern>."
566 #: ../src/guestfs.pod:268
568 "To upload a single file, use L</guestfs_upload>. This call has no limits on "
569 "file content or size (even files larger than 4 GB)."
573 #: ../src/guestfs.pod:271
574 msgid "To upload multiple files, see L</guestfs_tar_in> and L</guestfs_tgz_in>."
578 #: ../src/guestfs.pod:273
580 "However the fastest way to upload I<large numbers of arbitrary files> is to "
581 "turn them into a squashfs or CD ISO (see L<mksquashfs(8)> and "
582 "L<mkisofs(8)>), then attach this using L</guestfs_add_drive_ro>. If you add "
583 "the drive in a predictable way (eg. adding it last after all other drives) "
584 "then you can get the device name from L</guestfs_list_devices> and mount it "
585 "directly using L</guestfs_mount_ro>. Note that squashfs images are "
586 "sometimes non-portable between kernel versions, and they don't support "
587 "labels or UUIDs. If you want to pre-build an image or you need to mount it "
588 "using a label or UUID, use an ISO image instead."
592 #: ../src/guestfs.pod:284
597 #: ../src/guestfs.pod:286
599 "There are various different commands for copying between files and devices "
600 "and in and out of the guest filesystem. These are summarised in the table "
605 #: ../src/guestfs.pod:292
606 msgid "B<file> to B<file>"
610 #: ../src/guestfs.pod:294
612 "Use L</guestfs_cp> to copy a single file, or L</guestfs_cp_a> to copy "
613 "directories recursively."
617 #: ../src/guestfs.pod:297
618 msgid "B<file or device> to B<file or device>"
622 #: ../src/guestfs.pod:299
624 "Use L</guestfs_dd> which efficiently uses L<dd(1)> to copy between files and "
625 "devices in the guest."
629 #: ../src/guestfs.pod:302
630 msgid "Example: duplicate the contents of an LV:"
634 #: ../src/guestfs.pod:304
637 " guestfs_dd (g, \"/dev/VG/Original\", \"/dev/VG/Copy\");\n"
642 #: ../src/guestfs.pod:306
644 "The destination (C</dev/VG/Copy>) must be at least as large as the source "
645 "(C</dev/VG/Original>). To copy less than the whole source device, use "
646 "L</guestfs_copy_size>."
650 #: ../src/guestfs.pod:310
651 msgid "B<file on the host> to B<file or device>"
655 #: ../src/guestfs.pod:312
656 msgid "Use L</guestfs_upload>. See L</UPLOADING> above."
660 #: ../src/guestfs.pod:314
661 msgid "B<file or device> to B<file on the host>"
665 #: ../src/guestfs.pod:316
666 msgid "Use L</guestfs_download>. See L</DOWNLOADING> above."
670 #: ../src/guestfs.pod:320
671 msgid "LISTING FILES"
675 #: ../src/guestfs.pod:322
677 "L</guestfs_ll> is just designed for humans to read (mainly when using the "
678 "L<guestfish(1)>-equivalent command C<ll>)."
682 #: ../src/guestfs.pod:325
684 "L</guestfs_ls> is a quick way to get a list of files in a directory from "
685 "programs, as a flat list of strings."
689 #: ../src/guestfs.pod:328
691 "L</guestfs_readdir> is a programmatic way to get a list of files in a "
692 "directory, plus additional information about each one. It is more "
693 "equivalent to using the L<readdir(3)> call on a local filesystem."
697 #: ../src/guestfs.pod:332
699 "L</guestfs_find> and L</guestfs_find0> can be used to recursively list "
704 #: ../src/guestfs.pod:335
705 msgid "RUNNING COMMANDS"
709 #: ../src/guestfs.pod:337
711 "Although libguestfs is a primarily an API for manipulating files inside "
712 "guest images, we also provide some limited facilities for running commands "
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:1226 ../src/guestfs.pod:1231 ../src/guestfs.pod:1235 ../src/guestfs.pod:1337 ../src/guestfs.pod:1341 ../src/guestfs.pod:1345 ../src/guestfs.pod:1350 ../src/guestfs.pod:1358 ../src/guestfs.pod:1377 ../src/guestfs.pod:1385 ../src/guestfs.pod:1599 ../src/guestfs.pod:1605 ../src/guestfs.pod:1610 ../src/guestfs.pod:1616 ../src/guestfs.pod:1723 ../src/guestfs.pod:1727 ../src/guestfs.pod:1731 ../src/guestfs.pod:1735 ../src/guestfs-actions.pod:14 ../src/guestfs-actions.pod:21 ../src/guestfs-actions.pod:372 ../src/guestfs-actions.pod:380 ../src/guestfs-actions.pod:387 ../src/guestfs-actions.pod:394 ../src/guestfs-actions.pod:1257 ../src/guestfs-actions.pod:1261 ../src/guestfs-actions.pod:1265 ../src/guestfs-actions.pod:1269 ../src/guestfs-actions.pod:1277 ../src/guestfs-actions.pod:1281 ../src/guestfs-actions.pod:1285 ../src/guestfs-actions.pod:1295 ../src/guestfs-actions.pod:1299 ../src/guestfs-actions.pod:1303 ../src/guestfs-actions.pod:1426 ../src/guestfs-actions.pod:1430 ../src/guestfs-actions.pod:1435 ../src/guestfs-actions.pod:1440 ../src/guestfs-actions.pod:1492 ../src/guestfs-actions.pod:1496 ../src/guestfs-actions.pod:1501 ../fish/guestfish.pod:309 ../fish/guestfish.pod:313 ../fish/guestfish.pod:317 ../fish/guestfish.pod:321 ../fish/guestfish-actions.pod:13 ../fish/guestfish-actions.pod:20 ../fish/guestfish-actions.pod:300 ../fish/guestfish-actions.pod:308 ../fish/guestfish-actions.pod:315 ../fish/guestfish-actions.pod:322 ../fish/guestfish-actions.pod:998 ../fish/guestfish-actions.pod:1002 ../fish/guestfish-actions.pod:1006 ../fish/guestfish-actions.pod:1010 ../fish/guestfish-actions.pod:1018 ../fish/guestfish-actions.pod:1022 ../fish/guestfish-actions.pod:1026 ../fish/guestfish-actions.pod:1036 ../fish/guestfish-actions.pod:1040 ../fish/guestfish-actions.pod:1044 ../fish/guestfish-actions.pod:1134 ../fish/guestfish-actions.pod:1138 ../fish/guestfish-actions.pod:1143 ../fish/guestfish-actions.pod:1148 ../fish/guestfish-actions.pod:1190 ../fish/guestfish-actions.pod:1194 ../fish/guestfish-actions.pod:1199 ../tools/virt-resize.pl:324 ../tools/virt-resize.pl:329 ../tools/virt-resize.pl:339
727 #: ../src/guestfs.pod:347
729 "The kernel version that the command runs under will be different from what "
734 #: ../src/guestfs.pod:352
736 "If the command needs to communicate with daemons, then most likely they "
741 #: ../src/guestfs.pod:357
742 msgid "The command will be running in limited memory."
746 #: ../src/guestfs.pod:361
748 "The network may not be available unless you enable it (see "
749 "L</guestfs_set_network>)."
753 #: ../src/guestfs.pod:366
754 msgid "Only supports Linux guests (not Windows, BSD, etc)."
758 #: ../src/guestfs.pod:370
759 msgid "Architecture limitations (eg. won't work for a PPC guest on an X86 host)."
763 #: ../src/guestfs.pod:375
765 "For SELinux guests, you may need to enable SELinux and load policy first. "
766 "See L</SELINUX> in this manpage."
770 #: ../src/guestfs.pod:380
772 "The two main API calls to run commands are L</guestfs_command> and "
773 "L</guestfs_sh> (there are also variations)."
777 #: ../src/guestfs.pod:383
779 "The difference is that L</guestfs_sh> runs commands using the shell, so any "
780 "shell globs, redirections, etc will work."
784 #: ../src/guestfs.pod:386
785 msgid "CONFIGURATION FILES"
789 #: ../src/guestfs.pod:388
791 "To read and write configuration files in Linux guest filesystems, we "
792 "strongly recommend using Augeas. For example, Augeas understands how to "
793 "read and write, say, a Linux shadow password file or X.org configuration "
794 "file, and so avoids you having to write that code."
798 #: ../src/guestfs.pod:393
800 "The main Augeas calls are bound through the C<guestfs_aug_*> APIs. We don't "
801 "document Augeas itself here because there is excellent documentation on the "
802 "L<http://augeas.net/> website."
806 #: ../src/guestfs.pod:397
808 "If you don't want to use Augeas (you fool!) then try calling "
809 "L</guestfs_read_lines> to get the file as a list of lines which you can "
814 #: ../src/guestfs.pod:401
819 #: ../src/guestfs.pod:403
821 "We support SELinux guests. To ensure that labeling happens correctly in "
822 "SELinux guests, you need to enable SELinux and load the guest's policy:"
826 #: ../src/guestfs.pod:409
831 #: ../src/guestfs.pod:411
832 msgid "Before launching, do:"
836 #: ../src/guestfs.pod:413
839 " guestfs_set_selinux (g, 1);\n"
844 #: ../src/guestfs.pod:415
849 #: ../src/guestfs.pod:417
851 "After mounting the guest's filesystem(s), load the policy. This is best "
852 "done by running the L<load_policy(8)> command in the guest itself:"
856 #: ../src/guestfs.pod:421
859 " guestfs_sh (g, \"/usr/sbin/load_policy\");\n"
864 #: ../src/guestfs.pod:423
866 "(Older versions of C<load_policy> require you to specify the name of the "
871 #: ../src/guestfs.pod:426
876 #: ../src/guestfs.pod:428
878 "Optionally, set the security context for the API. The correct security "
879 "context to use can only be known by inspecting the guest. As an example:"
883 #: ../src/guestfs.pod:432
886 " guestfs_setcon (g, \"unconfined_u:unconfined_r:unconfined_t:s0\");\n"
891 #: ../src/guestfs.pod:436
892 msgid "This will work for running commands and editing existing files."
896 #: ../src/guestfs.pod:438
898 "When new files are created, you may need to label them explicitly, for "
899 "example by running the external command C<restorecon pathname>."
903 #: ../src/guestfs.pod:442
908 #: ../src/guestfs.pod:444
910 "Certain calls are affected by the current file mode creation mask (the "
911 "\"umask\"). In particular ones which create files or directories, such as "
912 "L</guestfs_touch>, L</guestfs_mknod> or L</guestfs_mkdir>. This affects "
913 "either the default mode that the file is created with or modifies the mode "
918 #: ../src/guestfs.pod:450
920 "The default umask is C<022>, so files are created with modes such as C<0644> "
921 "and directories with C<0755>."
925 #: ../src/guestfs.pod:453
927 "There are two ways to avoid being affected by umask. Either set umask to 0 "
928 "(call C<guestfs_umask (g, 0)> early after launching). Or call "
929 "L</guestfs_chmod> after creating each file or directory."
933 #: ../src/guestfs.pod:457
934 msgid "For more information about umask, see L<umask(2)>."
938 #: ../src/guestfs.pod:459 ../fish/guestfish.pod:559
939 msgid "ENCRYPTED DISKS"
943 #: ../src/guestfs.pod:461
945 "Libguestfs allows you to access Linux guests which have been encrypted using "
946 "whole disk encryption that conforms to the Linux Unified Key Setup (LUKS) "
947 "standard. This includes nearly all whole disk encryption systems used by "
948 "modern Linux guests."
952 #: ../src/guestfs.pod:467
954 "Use L</guestfs_vfs_type> to identify LUKS-encrypted block devices (it "
955 "returns the string C<crypto_LUKS>)."
959 #: ../src/guestfs.pod:470
961 "Then open these devices by calling L</guestfs_luks_open>. Obviously you "
962 "will require the passphrase!"
966 #: ../src/guestfs.pod:473
968 "Opening a LUKS device creates a new device mapper device called "
969 "C</dev/mapper/mapname> (where C<mapname> is the string you supply to "
970 "L</guestfs_luks_open>). Reads and writes to this mapper device are "
971 "decrypted from and encrypted to the underlying block device respectively."
975 #: ../src/guestfs.pod:479
977 "LVM volume groups on the device can be made visible by calling "
978 "L</guestfs_vgscan> followed by L</guestfs_vg_activate_all>. The logical "
979 "volume(s) can now be mounted in the usual way."
983 #: ../src/guestfs.pod:483
985 "Use the reverse process to close a LUKS device. Unmount any logical volumes "
986 "on it, deactivate the volume groups by caling C<guestfs_vg_activate (g, 0, "
987 "[\"/dev/VG\"])>. Then close the mapper device by calling "
988 "L</guestfs_luks_close> on the C</dev/mapper/mapname> device (I<not> the "
989 "underlying encrypted block device)."
993 #: ../src/guestfs.pod:490
998 #: ../src/guestfs.pod:492
1000 "Libguestfs has APIs for inspecting an unknown disk image to find out if it "
1001 "contains operating systems. (These APIs used to be in a separate Perl-only "
1002 "library called L<Sys::Guestfs::Lib(3)> but since version 1.5.3 the most "
1003 "frequently used part of this library has been rewritten in C and moved into "
1008 #: ../src/guestfs.pod:498
1010 "Add all disks belonging to the unknown virtual machine and call "
1011 "L</guestfs_launch> in the usual way."
1015 #: ../src/guestfs.pod:501
1017 "Then call L</guestfs_inspect_os>. This function uses other libguestfs calls "
1018 "and certain heuristics, and returns a list of operating systems that were "
1019 "found. An empty list means none were found. A single element is the root "
1020 "filesystem of the operating system. For dual- or multi-boot guests, "
1021 "multiple roots can be returned, each one corresponding to a separate "
1022 "operating system. (Multi-boot virtual machines are extremely rare in the "
1023 "world of virtualization, but since this scenario can happen, we have built "
1024 "libguestfs to deal with it.)"
1028 #: ../src/guestfs.pod:510
1030 "For each root, you can then call various C<guestfs_inspect_get_*> functions "
1031 "to get additional details about that operating system. For example, call "
1032 "L</guestfs_inspect_get_type> to return the string C<windows> or C<linux> for "
1033 "Windows and Linux-based operating systems respectively."
1037 #: ../src/guestfs.pod:516
1039 "Un*x-like and Linux-based operating systems usually consist of several "
1040 "filesystems which are mounted at boot time (for example, a separate boot "
1041 "partition mounted on C</boot>). The inspection rules are able to detect how "
1042 "filesystems correspond to mount points. Call "
1043 "C<guestfs_inspect_get_mountpoints> to get this mapping. It might return a "
1044 "hash table like this example:"
1048 #: ../src/guestfs.pod:523
1051 " /boot => /dev/sda1\n"
1052 " / => /dev/vg_guest/lv_root\n"
1053 " /usr => /dev/vg_guest/lv_usr\n"
1058 #: ../src/guestfs.pod:527
1060 "The caller can then make calls to L</guestfs_mount_options> to mount the "
1061 "filesystems as suggested."
1065 #: ../src/guestfs.pod:530
1067 "Be careful to mount filesystems in the right order (eg. C</> before "
1068 "C</usr>). Sorting the keys of the hash by length, shortest first, should "
1073 #: ../src/guestfs.pod:534
1075 "Inspection currently only works for some common operating systems. "
1076 "Contributors are welcome to send patches for other operating systems that we "
1077 "currently cannot detect."
1081 #: ../src/guestfs.pod:538
1083 "Encrypted disks must be opened before inspection. See L</ENCRYPTED DISKS> "
1084 "for more details. The L</guestfs_inspect_os> function just ignores any "
1085 "encrypted devices."
1089 #: ../src/guestfs.pod:542
1091 "A note on the implementation: The call L</guestfs_inspect_os> performs "
1092 "inspection and caches the results in the guest handle. Subsequent calls to "
1093 "C<guestfs_inspect_get_*> return this cached information, but I<do not> "
1094 "re-read the disks. If you change the content of the guest disks, you can "
1095 "redo inspection by calling L</guestfs_inspect_os> again."
1099 #: ../src/guestfs.pod:549
1100 msgid "SPECIAL CONSIDERATIONS FOR WINDOWS GUESTS"
1104 #: ../src/guestfs.pod:551
1106 "Libguestfs can mount NTFS partitions. It does this using the "
1107 "L<http://www.ntfs-3g.org/> driver."
1111 #: ../src/guestfs.pod:554
1113 "DOS and Windows still use drive letters, and the filesystems are always "
1114 "treated as case insensitive by Windows itself, and therefore you might find "
1115 "a Windows configuration file referring to a path like "
1116 "C<c:\\windows\\system32>. When the filesystem is mounted in libguestfs, "
1117 "that directory might be referred to as C</WINDOWS/System32>."
1121 #: ../src/guestfs.pod:560
1123 "Drive letter mappings are outside the scope of libguestfs. You have to use "
1124 "libguestfs to read the appropriate Windows Registry and configuration files, "
1125 "to determine yourself how drives are mapped (see also L<hivex(3)> and "
1126 "L<virt-inspector(1)>)."
1130 #: ../src/guestfs.pod:565
1132 "Replacing backslash characters with forward slash characters is also outside "
1133 "the scope of libguestfs, but something that you can easily do."
1137 #: ../src/guestfs.pod:568
1139 "Where we can help is in resolving the case insensitivity of paths. For "
1140 "this, call L</guestfs_case_sensitive_path>."
1144 #: ../src/guestfs.pod:571
1146 "Libguestfs also provides some help for decoding Windows Registry \"hive\" "
1147 "files, through the library C<hivex> which is part of the libguestfs project "
1148 "although ships as a separate tarball. You have to locate and download the "
1149 "hive file(s) yourself, and then pass them to C<hivex> functions. See also "
1150 "the programs L<hivexml(1)>, L<hivexsh(1)>, L<hivexregedit(1)> and "
1151 "L<virt-win-reg(1)> for more help on this issue."
1155 #: ../src/guestfs.pod:579
1156 msgid "USING LIBGUESTFS WITH OTHER PROGRAMMING LANGUAGES"
1160 #: ../src/guestfs.pod:581
1162 "Although we don't want to discourage you from using the C API, we will "
1163 "mention here that the same API is also available in other languages."
1167 #: ../src/guestfs.pod:584
1169 "The API is broadly identical in all supported languages. This means that "
1170 "the C call C<guestfs_mount(g,path)> is C<$g-E<gt>mount($path)> in Perl, "
1171 "C<g.mount(path)> in Python, and C<Guestfs.mount g path> in OCaml. In other "
1172 "words, a straightforward, predictable isomorphism between each language."
1176 #: ../src/guestfs.pod:590
1178 "Error messages are automatically transformed into exceptions if the language "
1183 #: ../src/guestfs.pod:593
1185 "We don't try to \"object orientify\" parts of the API in OO languages, "
1186 "although contributors are welcome to write higher level APIs above what we "
1187 "provide in their favourite languages if they wish."
1191 #: ../src/guestfs.pod:599
1196 #: ../src/guestfs.pod:601
1198 "You can use the I<guestfs.h> header file from C++ programs. The C++ API is "
1199 "identical to the C API. C++ classes and exceptions are not used."
1203 #: ../src/guestfs.pod:605
1208 #: ../src/guestfs.pod:607
1210 "The C# bindings are highly experimental. Please read the warnings at the "
1211 "top of C<csharp/Libguestfs.cs>."
1215 #: ../src/guestfs.pod:610
1220 #: ../src/guestfs.pod:612
1222 "This is the only language binding that is working but incomplete. Only "
1223 "calls which return simple integers have been bound in Haskell, and we are "
1224 "looking for help to complete this binding."
1228 #: ../src/guestfs.pod:616
1233 #: ../src/guestfs.pod:618
1235 "Full documentation is contained in the Javadoc which is distributed with "
1240 #: ../src/guestfs.pod:621
1245 #: ../src/guestfs.pod:623
1246 msgid "For documentation see the file C<guestfs.mli>."
1250 #: ../src/guestfs.pod:625
1255 #: ../src/guestfs.pod:627
1256 msgid "For documentation see L<Sys::Guestfs(3)>."
1260 #: ../src/guestfs.pod:629
1265 #: ../src/guestfs.pod:631
1267 "For documentation see C<README-PHP> supplied with libguestfs sources or in "
1268 "the php-libguestfs package for your distribution."
1272 #: ../src/guestfs.pod:634
1273 msgid "The PHP binding only works correctly on 64 bit machines."
1277 #: ../src/guestfs.pod:636
1282 #: ../src/guestfs.pod:638
1283 msgid "For documentation do:"
1287 #: ../src/guestfs.pod:640
1291 " >>> import guestfs\n"
1292 " >>> help (guestfs)\n"
1297 #: ../src/guestfs.pod:644
1302 #: ../src/guestfs.pod:646
1304 "Use the Guestfs module. There is no Ruby-specific documentation, but you "
1305 "can find examples written in Ruby in the libguestfs source."
1309 #: ../src/guestfs.pod:649
1310 msgid "B<shell scripts>"
1314 #: ../src/guestfs.pod:651
1315 msgid "For documentation see L<guestfish(1)>."
1319 #: ../src/guestfs.pod:655
1320 msgid "LIBGUESTFS GOTCHAS"
1324 #: ../src/guestfs.pod:657
1326 "L<http://en.wikipedia.org/wiki/Gotcha_(programming)>: \"A feature of a "
1327 "system [...] that works in the way it is documented but is counterintuitive "
1328 "and almost invites mistakes.\""
1332 #: ../src/guestfs.pod:661
1334 "Since we developed libguestfs and the associated tools, there are several "
1335 "things we would have designed differently, but are now stuck with for "
1336 "backwards compatibility or other reasons. If there is ever a libguestfs 2.0 "
1337 "release, you can expect these to change. Beware of them."
1341 #: ../src/guestfs.pod:669
1342 msgid "Autosync / forgetting to sync."
1346 #: ../src/guestfs.pod:671
1348 "When modifying a filesystem from C or another language, you B<must> unmount "
1349 "all filesystems and call L</guestfs_sync> explicitly before you close the "
1350 "libguestfs handle. You can also call:"
1354 #: ../src/guestfs.pod:675
1357 " guestfs_set_autosync (g, 1);\n"
1362 #: ../src/guestfs.pod:677
1364 "to have the unmount/sync done automatically for you when the handle 'g' is "
1365 "closed. (This feature is called \"autosync\", L</guestfs_set_autosync> "
1370 #: ../src/guestfs.pod:681
1372 "If you forget to do this, then it is entirely possible that your changes "
1373 "won't be written out, or will be partially written, or (very rarely) that "
1374 "you'll get disk corruption."
1378 #: ../src/guestfs.pod:685
1380 "Note that in L<guestfish(3)> autosync is the default. So quick and dirty "
1381 "guestfish scripts that forget to sync will work just fine, which can make "
1382 "this very puzzling if you are trying to debug a problem."
1386 #: ../src/guestfs.pod:689
1387 msgid "Mount option C<-o sync> should not be the default."
1391 #: ../src/guestfs.pod:691
1393 "If you use L</guestfs_mount>, then C<-o sync,noatime> are added implicitly. "
1394 "However C<-o sync> does not add any reliability benefit, but does have a "
1395 "very large performance impact."
1399 #: ../src/guestfs.pod:695
1401 "The work around is to use L</guestfs_mount_options> and set the mount "
1402 "options that you actually want to use."
1406 #: ../src/guestfs.pod:698
1407 msgid "Read-only should be the default."
1411 #: ../src/guestfs.pod:700
1413 "In L<guestfish(3)>, I<--ro> should be the default, and you should have to "
1414 "specify I<--rw> if you want to make changes to the image."
1418 #: ../src/guestfs.pod:703
1419 msgid "This would reduce the potential to corrupt live VM images."
1423 #: ../src/guestfs.pod:705
1425 "Note that many filesystems change the disk when you just mount and unmount, "
1426 "even if you didn't perform any writes. You need to use "
1427 "L</guestfs_add_drive_ro> to guarantee that the disk is not changed."
1431 #: ../src/guestfs.pod:709
1432 msgid "guestfish command line is hard to use."
1436 #: ../src/guestfs.pod:711
1438 "C<guestfish disk.img> doesn't do what people expect (open C<disk.img> for "
1439 "examination). It tries to run a guestfish command C<disk.img> which doesn't "
1440 "exist, so it fails. In earlier versions of guestfish the error message was "
1441 "also unintuitive, but we have corrected this since. Like the Bourne shell, "
1442 "we should have used C<guestfish -c command> to run commands."
1446 #: ../src/guestfs.pod:718
1447 msgid "guestfish megabyte modifiers don't work right on all commands"
1451 #: ../src/guestfs.pod:720
1453 "In recent guestfish you can use C<1M> to mean 1 megabyte (and similarly for "
1454 "other modifiers). What guestfish actually does is to multiply the number "
1455 "part by the modifier part and pass the result to the C API. However this "
1456 "doesn't work for a few APIs which aren't expecting bytes, but are already "
1457 "expecting some other unit (eg. megabytes)."
1461 #: ../src/guestfs.pod:727
1462 msgid "The most common is L</guestfs_lvcreate>. The guestfish command:"
1466 #: ../src/guestfs.pod:729
1469 " lvcreate LV VG 100M\n"
1474 #: ../src/guestfs.pod:731
1476 "does not do what you might expect. Instead because L</guestfs_lvcreate> is "
1477 "already expecting megabytes, this tries to create a 100 I<terabyte> (100 "
1478 "megabytes * megabytes) logical volume. The error message you get from this "
1479 "is also a little obscure."
1483 #: ../src/guestfs.pod:736
1485 "This could be fixed in the generator by specially marking parameters and "
1486 "return values which take bytes or other units."
1490 #: ../src/guestfs.pod:739
1491 msgid "Library should return errno with error messages."
1495 #: ../src/guestfs.pod:741
1497 "It would be a nice-to-have to be able to get the original value of 'errno' "
1498 "from inside the appliance along error paths (where set). Currently "
1499 "L<guestmount(1)> goes through hoops to try to reverse the error message "
1500 "string into an errno, see the function error() in fuse/guestmount.c."
1504 #: ../src/guestfs.pod:747
1506 "In libguestfs 1.5.4, the protocol was changed so that the Linux errno is "
1507 "sent back from the daemon."
1511 #: ../src/guestfs.pod:752
1512 msgid "PROTOCOL LIMITS"
1516 #: ../src/guestfs.pod:754
1518 "Internally libguestfs uses a message-based protocol to pass API calls and "
1519 "their responses to and from a small \"appliance\" (see L</INTERNALS> for "
1520 "plenty more detail about this). The maximum message size used by the "
1521 "protocol is slightly less than 4 MB. For some API calls you may need to be "
1522 "aware of this limit. The API calls which may be affected are individually "
1523 "documented, with a link back to this section of the documentation."
1527 #: ../src/guestfs.pod:762
1529 "A simple call such as L</guestfs_cat> returns its result (the file data) in "
1530 "a simple string. Because this string is at some point internally encoded as "
1531 "a message, the maximum size that it can return is slightly under 4 MB. If "
1532 "the requested file is larger than this then you will get an error."
1536 #: ../src/guestfs.pod:768
1538 "In order to transfer large files into and out of the guest filesystem, you "
1539 "need to use particular calls that support this. The sections L</UPLOADING> "
1540 "and L</DOWNLOADING> document how to do this."
1544 #: ../src/guestfs.pod:772
1546 "You might also consider mounting the disk image using our FUSE filesystem "
1547 "support (L<guestmount(1)>)."
1551 #: ../src/guestfs.pod:775
1552 msgid "KEYS AND PASSPHRASES"
1556 #: ../src/guestfs.pod:777
1558 "Certain libguestfs calls take a parameter that contains sensitive key "
1559 "material, passed in as a C string."
1563 #: ../src/guestfs.pod:780
1565 "In the future we would hope to change the libguestfs implementation so that "
1566 "keys are L<mlock(2)>-ed into physical RAM, and thus can never end up in "
1567 "swap. However this is I<not> done at the moment, because of the complexity "
1568 "of such an implementation."
1572 #: ../src/guestfs.pod:785
1574 "Therefore you should be aware that any key parameter you pass to libguestfs "
1575 "might end up being written out to the swap partition. If this is a concern, "
1576 "scrub the swap partition or don't use libguestfs on encrypted devices."
1580 #: ../src/guestfs.pod:790
1581 msgid "CONNECTION MANAGEMENT"
1585 #: ../src/guestfs.pod:792
1590 #: ../src/guestfs.pod:794
1592 "C<guestfs_h> is the opaque type representing a connection handle. Create a "
1593 "handle by calling L</guestfs_create>. Call L</guestfs_close> to free the "
1594 "handle and release all resources used."
1598 #: ../src/guestfs.pod:798
1600 "For information on using multiple handles and threads, see the section "
1601 "L</MULTIPLE HANDLES AND MULTIPLE THREADS> below."
1605 #: ../src/guestfs.pod:801
1606 msgid "guestfs_create"
1610 #: ../src/guestfs.pod:803
1613 " guestfs_h *guestfs_create (void);\n"
1618 #: ../src/guestfs.pod:805
1619 msgid "Create a connection handle."
1623 #: ../src/guestfs.pod:807
1624 msgid "You have to call L</guestfs_add_drive> on the handle at least once."
1628 #: ../src/guestfs.pod:809
1630 "This function returns a non-NULL pointer to a handle on success or NULL on "
1635 #: ../src/guestfs.pod:812
1636 msgid "After configuring the handle, you have to call L</guestfs_launch>."
1640 #: ../src/guestfs.pod:814
1642 "You may also want to configure error handling for the handle. See L</ERROR "
1643 "HANDLING> section below."
1647 #: ../src/guestfs.pod:817
1648 msgid "guestfs_close"
1652 #: ../src/guestfs.pod:819
1655 " void guestfs_close (guestfs_h *g);\n"
1660 #: ../src/guestfs.pod:821
1661 msgid "This closes the connection handle and frees up all resources used."
1665 #: ../src/guestfs.pod:823
1666 msgid "ERROR HANDLING"
1670 #: ../src/guestfs.pod:825
1672 "The convention in all functions that return C<int> is that they return C<-1> "
1673 "to indicate an error. You can get additional information on errors by "
1674 "calling L</guestfs_last_error> and/or by setting up an error handler with "
1675 "L</guestfs_set_error_handler>."
1679 #: ../src/guestfs.pod:830
1680 msgid "The default error handler prints the information string to C<stderr>."
1684 #: ../src/guestfs.pod:832
1686 "Out of memory errors are handled differently. The default action is to call "
1687 "L<abort(3)>. If this is undesirable, then you can set a handler using "
1688 "L</guestfs_set_out_of_memory_handler>."
1692 #: ../src/guestfs.pod:836
1693 msgid "guestfs_last_error"
1697 #: ../src/guestfs.pod:838
1700 " const char *guestfs_last_error (guestfs_h *g);\n"
1705 #: ../src/guestfs.pod:840
1707 "This returns the last error message that happened on C<g>. If there has not "
1708 "been an error since the handle was created, then this returns C<NULL>."
1712 #: ../src/guestfs.pod:844
1714 "The lifetime of the returned string is until the next error occurs, or "
1715 "L</guestfs_close> is called."
1719 #: ../src/guestfs.pod:847
1721 "The error string is not localized (ie. is always in English), because this "
1722 "makes searching for error messages in search engines give the largest number "
1727 #: ../src/guestfs.pod:851
1728 msgid "guestfs_set_error_handler"
1732 #: ../src/guestfs.pod:853
1735 " typedef void (*guestfs_error_handler_cb) (guestfs_h *g,\n"
1737 " const char *msg);\n"
1738 " void guestfs_set_error_handler (guestfs_h *g,\n"
1739 " guestfs_error_handler_cb cb,\n"
1745 #: ../src/guestfs.pod:860
1747 "The callback C<cb> will be called if there is an error. The parameters "
1748 "passed to the callback are an opaque data pointer and the error message "
1753 #: ../src/guestfs.pod:864
1755 "Note that the message string C<msg> is freed as soon as the callback "
1756 "function returns, so if you want to stash it somewhere you must make your "
1761 #: ../src/guestfs.pod:868
1762 msgid "The default handler prints messages on C<stderr>."
1766 #: ../src/guestfs.pod:870
1767 msgid "If you set C<cb> to C<NULL> then I<no> handler is called."
1771 #: ../src/guestfs.pod:872
1772 msgid "guestfs_get_error_handler"
1776 #: ../src/guestfs.pod:874
1779 " guestfs_error_handler_cb guestfs_get_error_handler (guestfs_h *g,\n"
1780 " void **opaque_rtn);\n"
1785 #: ../src/guestfs.pod:877
1786 msgid "Returns the current error handler callback."
1790 #: ../src/guestfs.pod:879
1791 msgid "guestfs_set_out_of_memory_handler"
1795 #: ../src/guestfs.pod:881
1798 " typedef void (*guestfs_abort_cb) (void);\n"
1799 " int guestfs_set_out_of_memory_handler (guestfs_h *g,\n"
1800 " guestfs_abort_cb);\n"
1805 #: ../src/guestfs.pod:885
1807 "The callback C<cb> will be called if there is an out of memory situation. "
1808 "I<Note this callback must not return>."
1812 #: ../src/guestfs.pod:888
1813 msgid "The default is to call L<abort(3)>."
1817 #: ../src/guestfs.pod:890
1818 msgid "You cannot set C<cb> to C<NULL>. You can't ignore out of memory situations."
1822 #: ../src/guestfs.pod:893
1823 msgid "guestfs_get_out_of_memory_handler"
1827 #: ../src/guestfs.pod:895
1830 " guestfs_abort_fn guestfs_get_out_of_memory_handler (guestfs_h *g);\n"
1835 #: ../src/guestfs.pod:897
1836 msgid "This returns the current out of memory handler."
1840 #: ../src/guestfs.pod:899
1845 #: ../src/guestfs.pod:901
1847 "Libguestfs needs a kernel and initrd.img, which it finds by looking along an "
1852 #: ../src/guestfs.pod:904
1854 "By default it looks for these in the directory C<$libdir/guestfs> "
1855 "(eg. C</usr/local/lib/guestfs> or C</usr/lib64/guestfs>)."
1859 #: ../src/guestfs.pod:907
1861 "Use L</guestfs_set_path> or set the environment variable L</LIBGUESTFS_PATH> "
1862 "to change the directories that libguestfs will search in. The value is a "
1863 "colon-separated list of paths. The current directory is I<not> searched "
1864 "unless the path contains an empty element or C<.>. For example "
1865 "C<LIBGUESTFS_PATH=:/usr/lib/guestfs> would search the current directory and "
1866 "then C</usr/lib/guestfs>."
1870 #: ../src/guestfs.pod:914
1871 msgid "HIGH-LEVEL API ACTIONS"
1875 #: ../src/guestfs.pod:916
1876 msgid "ABI GUARANTEE"
1880 #: ../src/guestfs.pod:918
1882 "We guarantee the libguestfs ABI (binary interface), for public, high-level "
1883 "actions as outlined in this section. Although we will deprecate some "
1884 "actions, for example if they get replaced by newer calls, we will keep the "
1885 "old actions forever. This allows you the developer to program in confidence "
1886 "against the libguestfs API."
1890 #: ../src/guestfs.pod:924 ../fish/guestfish.pod:898
1895 #: ../src/guestfs.pod:926
1900 #: ../src/guestfs.pod:928
1905 #: ../src/guestfs.pod:930
1906 msgid "AVAILABILITY"
1910 #: ../src/guestfs.pod:932
1911 msgid "GROUPS OF FUNCTIONALITY IN THE APPLIANCE"
1915 #: ../src/guestfs.pod:934
1917 "Using L</guestfs_available> you can test availability of the following "
1918 "groups of functions. This test queries the appliance to see if the "
1919 "appliance you are currently using supports the functionality."
1923 #: ../src/guestfs.pod:939
1924 msgid "@AVAILABILITY@"
1928 #: ../src/guestfs.pod:941
1929 msgid "GUESTFISH supported COMMAND"
1933 #: ../src/guestfs.pod:943
1935 "In L<guestfish(3)> there is a handy interactive command C<supported> which "
1936 "prints out the available groups and whether they are supported by this build "
1937 "of libguestfs. Note however that you have to do C<run> first."
1941 #: ../src/guestfs.pod:948
1942 msgid "SINGLE CALLS AT COMPILE TIME"
1946 #: ../src/guestfs.pod:950
1948 "Since version 1.5.8, C<E<lt>guestfs.hE<gt>> defines symbols for each C API "
1949 "function, such as:"
1953 #: ../src/guestfs.pod:953
1956 " #define LIBGUESTFS_HAVE_DD 1\n"
1961 #: ../src/guestfs.pod:955
1962 msgid "if L</guestfs_dd> is available."
1966 #: ../src/guestfs.pod:957
1968 "Before version 1.5.8, if you needed to test whether a single libguestfs "
1969 "function is available at compile time, we recommended using build tools such "
1970 "as autoconf or cmake. For example in autotools you could use:"
1974 #: ../src/guestfs.pod:962
1977 " AC_CHECK_LIB([guestfs],[guestfs_create])\n"
1978 " AC_CHECK_FUNCS([guestfs_dd])\n"
1983 #: ../src/guestfs.pod:965
1985 "which would result in C<HAVE_GUESTFS_DD> being either defined or not defined "
1990 #: ../src/guestfs.pod:968
1991 msgid "SINGLE CALLS AT RUN TIME"
1995 #: ../src/guestfs.pod:970
1997 "Testing at compile time doesn't guarantee that a function really exists in "
1998 "the library. The reason is that you might be dynamically linked against a "
1999 "previous I<libguestfs.so> (dynamic library) which doesn't have the call. "
2000 "This situation unfortunately results in a segmentation fault, which is a "
2001 "shortcoming of the C dynamic linking system itself."
2005 #: ../src/guestfs.pod:977
2007 "You can use L<dlopen(3)> to test if a function is available at run time, as "
2008 "in this example program (note that you still need the compile time check as "
2013 #: ../src/guestfs.pod:981
2016 " #include <stdio.h>\n"
2017 " #include <stdlib.h>\n"
2018 " #include <unistd.h>\n"
2019 " #include <dlfcn.h>\n"
2020 " #include <guestfs.h>\n"
2025 #: ../src/guestfs.pod:987
2030 " #ifdef LIBGUESTFS_HAVE_DD\n"
2032 " int has_function;\n"
2037 #: ../src/guestfs.pod:993
2040 " /* Test if the function guestfs_dd is really available. */\n"
2041 " dl = dlopen (NULL, RTLD_LAZY);\n"
2043 " fprintf (stderr, \"dlopen: %s\\n\", dlerror ());\n"
2044 " exit (EXIT_FAILURE);\n"
2046 " has_function = dlsym (dl, \"guestfs_dd\") != NULL;\n"
2052 #: ../src/guestfs.pod:1002
2055 " if (!has_function)\n"
2056 " printf (\"this libguestfs.so does NOT have guestfs_dd function\\n\");\n"
2058 " printf (\"this libguestfs.so has guestfs_dd function\\n\");\n"
2059 " /* Now it's safe to call\n"
2060 " guestfs_dd (g, \"foo\", \"bar\");\n"
2064 " printf (\"guestfs_dd function was not found at compile time\\n\");\n"
2071 #: ../src/guestfs.pod:1015
2073 "You may think the above is an awful lot of hassle, and it is. There are "
2074 "other ways outside of the C linking system to ensure that this kind of "
2075 "incompatibility never arises, such as using package versioning:"
2079 #: ../src/guestfs.pod:1020
2082 " Requires: libguestfs >= 1.0.80\n"
2087 #: ../src/guestfs.pod:1022 ../src/guestfs.pod:1027
2092 #: ../src/guestfs.pod:1024
2094 "<!-- old anchor for the next section --> <a "
2095 "name=\"state_machine_and_low_level_event_api\"/>"
2099 #: ../src/guestfs.pod:1029
2100 msgid "ARCHITECTURE"
2104 #: ../src/guestfs.pod:1031
2106 "Internally, libguestfs is implemented by running an appliance (a special "
2107 "type of small virtual machine) using L<qemu(1)>. Qemu runs as a child "
2108 "process of the main program."
2112 #: ../src/guestfs.pod:1035
2115 " ___________________\n"
2117 " | main program |\n"
2119 " | | child process / appliance\n"
2120 " | | __________________________\n"
2122 " +-------------------+ RPC | +-----------------+ |\n"
2123 " | libguestfs <--------------------> guestfsd | |\n"
2124 " | | | +-----------------+ |\n"
2125 " \\___________________/ | | Linux kernel | |\n"
2126 " | +--^--------------+ |\n"
2127 " \\_________|________________/\n"
2133 " \\______________/\n"
2138 #: ../src/guestfs.pod:1055
2140 "The library, linked to the main program, creates the child process and hence "
2141 "the appliance in the L</guestfs_launch> function."
2145 #: ../src/guestfs.pod:1058
2147 "Inside the appliance is a Linux kernel and a complete stack of userspace "
2148 "tools (such as LVM and ext2 programs) and a small controlling daemon called "
2149 "L</guestfsd>. The library talks to L</guestfsd> using remote procedure "
2150 "calls (RPC). There is a mostly one-to-one correspondence between libguestfs "
2151 "API calls and RPC calls to the daemon. Lastly the disk image(s) are "
2152 "attached to the qemu process which translates device access by the "
2153 "appliance's Linux kernel into accesses to the image."
2157 #: ../src/guestfs.pod:1067
2159 "A common misunderstanding is that the appliance \"is\" the virtual machine. "
2160 "Although the disk image you are attached to might also be used by some "
2161 "virtual machine, libguestfs doesn't know or care about this. (But you will "
2162 "care if both libguestfs's qemu process and your virtual machine are trying "
2163 "to update the disk image at the same time, since these usually results in "
2164 "massive disk corruption)."
2168 #: ../src/guestfs.pod:1074
2169 msgid "STATE MACHINE"
2173 #: ../src/guestfs.pod:1076
2174 msgid "libguestfs uses a state machine to model the child process:"
2178 #: ../src/guestfs.pod:1078
2190 " / | \\ \\ guestfs_launch\n"
2191 " / | _\\__V______\n"
2193 " / | | LAUNCHING |\n"
2194 " / | \\___________/\n"
2196 " / | guestfs_launch\n"
2198 " ______ / __|____V\n"
2199 " / \\ ------> / \\\n"
2200 " | BUSY | | READY |\n"
2201 " \\______/ <------ \\________/\n"
2206 #: ../src/guestfs.pod:1100
2208 "The normal transitions are (1) CONFIG (when the handle is created, but there "
2209 "is no child process), (2) LAUNCHING (when the child process is booting up), "
2210 "(3) alternating between READY and BUSY as commands are issued to, and "
2211 "carried out by, the child process."
2215 #: ../src/guestfs.pod:1105
2217 "The guest may be killed by L</guestfs_kill_subprocess>, or may die "
2218 "asynchronously at any time (eg. due to some internal error), and that causes "
2219 "the state to transition back to CONFIG."
2223 #: ../src/guestfs.pod:1109
2225 "Configuration commands for qemu such as L</guestfs_add_drive> can only be "
2226 "issued when in the CONFIG state."
2230 #: ../src/guestfs.pod:1112
2232 "The high-level API offers two calls that go from CONFIG through LAUNCHING to "
2233 "READY. L</guestfs_launch> blocks until the child process is READY to accept "
2234 "commands (or until some failure or timeout). L</guestfs_launch> internally "
2235 "moves the state from CONFIG to LAUNCHING while it is running."
2239 #: ../src/guestfs.pod:1118
2241 "High-level API actions such as L</guestfs_mount> can only be issued when in "
2242 "the READY state. These high-level API calls block waiting for the command "
2243 "to be carried out (ie. the state to transition to BUSY and then back to "
2244 "READY). But using the low-level event API, you get non-blocking versions. "
2245 "(But you can still only carry out one operation per handle at a time - that "
2246 "is a limitation of the communications protocol we use)."
2250 #: ../src/guestfs.pod:1126
2252 "Finally, the child process sends asynchronous messages back to the main "
2253 "program, such as kernel log messages. Mostly these are ignored by the "
2254 "high-level API, but using the low-level event API you can register to "
2255 "receive these messages."
2259 #: ../src/guestfs.pod:1131
2260 msgid "SETTING CALLBACKS TO HANDLE EVENTS"
2264 #: ../src/guestfs.pod:1133
2266 "The child process generates events in some situations. Current events "
2267 "include: receiving a log message, the child process exits."
2271 #: ../src/guestfs.pod:1136
2273 "Use the C<guestfs_set_*_callback> functions to set a callback for different "
2278 #: ../src/guestfs.pod:1139
2280 "Only I<one callback of each type> can be registered for each handle. "
2281 "Calling C<guestfs_set_*_callback> again overwrites the previous callback of "
2282 "that type. Cancel all callbacks of this type by calling this function with "
2283 "C<cb> set to C<NULL>."
2287 #: ../src/guestfs.pod:1144
2288 msgid "guestfs_set_log_message_callback"
2292 #: ../src/guestfs.pod:1146
2295 " typedef void (*guestfs_log_message_cb) (guestfs_h *g, void *opaque,\n"
2296 " char *buf, int len);\n"
2297 " void guestfs_set_log_message_callback (guestfs_h *g,\n"
2298 " guestfs_log_message_cb cb,\n"
2304 #: ../src/guestfs.pod:1152
2306 "The callback function C<cb> will be called whenever qemu or the guest writes "
2307 "anything to the console."
2311 #: ../src/guestfs.pod:1155
2312 msgid "Use this function to capture kernel messages and similar."
2316 #: ../src/guestfs.pod:1157
2318 "Normally there is no log message handler, and log messages are just "
2323 #: ../src/guestfs.pod:1160
2324 msgid "guestfs_set_subprocess_quit_callback"
2328 #: ../src/guestfs.pod:1162
2331 " typedef void (*guestfs_subprocess_quit_cb) (guestfs_h *g, void *opaque);\n"
2332 " void guestfs_set_subprocess_quit_callback (guestfs_h *g,\n"
2333 " guestfs_subprocess_quit_cb cb,\n"
2339 #: ../src/guestfs.pod:1167
2341 "The callback function C<cb> will be called when the child process quits, "
2342 "either asynchronously or if killed by L</guestfs_kill_subprocess>. (This "
2343 "corresponds to a transition from any state to the CONFIG state)."
2347 #: ../src/guestfs.pod:1172
2348 msgid "guestfs_set_launch_done_callback"
2352 #: ../src/guestfs.pod:1174
2355 " typedef void (*guestfs_launch_done_cb) (guestfs_h *g, void *opaque);\n"
2356 " void guestfs_set_launch_done_callback (guestfs_h *g,\n"
2357 " guestfs_launch_done_cb cb,\n"
2363 #: ../src/guestfs.pod:1179
2365 "The callback function C<cb> will be called when the child process becomes "
2366 "ready first time after it has been launched. (This corresponds to a "
2367 "transition from LAUNCHING to the READY state)."
2371 #: ../src/guestfs.pod:1183
2372 msgid "guestfs_set_close_callback"
2376 #: ../src/guestfs.pod:1185
2379 " typedef void (*guestfs_close_cb) (guestfs_h *g, void *opaque);\n"
2380 " void guestfs_set_close_callback (guestfs_h *g,\n"
2381 " guestfs_close_cb cb,\n"
2387 #: ../src/guestfs.pod:1190
2389 "The callback function C<cb> will be called while the handle is being closed "
2390 "(synchronously from L</guestfs_close>)."
2394 #: ../src/guestfs.pod:1193
2396 "Note that libguestfs installs an L<atexit(3)> handler to try to clean up "
2397 "handles that are open when the program exits. This means that this callback "
2398 "might be called indirectly from L<exit(3)>, which can cause unexpected "
2399 "problems in higher-level languages (eg. if your HLL interpreter has already "
2400 "been cleaned up by the time this is called, and if your callback then jumps "
2401 "into some HLL function)."
2405 #: ../src/guestfs.pod:1201
2406 msgid "guestfs_set_progress_callback"
2410 #: ../src/guestfs.pod:1203
2413 " typedef void (*guestfs_progress_cb) (guestfs_h *g, void *opaque,\n"
2414 " int proc_nr, int serial,\n"
2415 " uint64_t position, uint64_t total);\n"
2416 " void guestfs_set_progress_callback (guestfs_h *g,\n"
2417 " guestfs_progress_cb cb,\n"
2423 #: ../src/guestfs.pod:1210
2425 "Some long-running operations can generate progress messages. If this "
2426 "callback is registered, then it will be called each time a progress message "
2427 "is generated (usually two seconds after the operation started, and three "
2428 "times per second thereafter until it completes, although the frequency may "
2429 "change in future versions)."
2433 #: ../src/guestfs.pod:1216
2435 "The callback receives two numbers: C<position> and C<total>. The units of "
2436 "C<total> are not defined, although for some operations C<total> may relate "
2437 "in some way to the amount of data to be transferred (eg. in bytes or "
2438 "megabytes), and C<position> may be the portion which has been transferred."
2442 #: ../src/guestfs.pod:1222
2443 msgid "The only defined and stable parts of the API are:"
2447 #: ../src/guestfs.pod:1228
2449 "The callback can display to the user some type of progress bar or indicator "
2450 "which shows the ratio of C<position>:C<total>."
2454 #: ../src/guestfs.pod:1233
2455 msgid "0 E<lt>= C<position> E<lt>= C<total>"
2459 #: ../src/guestfs.pod:1237
2461 "If any progress notification is sent during a call, then a final progress "
2462 "notification is always sent when C<position> = C<total>."
2466 #: ../src/guestfs.pod:1240
2468 "This is to simplify caller code, so callers can easily set the progress "
2469 "indicator to \"100%\" at the end of the operation, without requiring special "
2470 "code to detect this case."
2474 #: ../src/guestfs.pod:1246
2476 "The callback also receives the procedure number and serial number of the "
2477 "call. These are only useful for debugging protocol issues, and the callback "
2478 "can normally ignore them. The callback may want to print these numbers in "
2479 "error messages or debugging messages."
2483 #: ../src/guestfs.pod:1251
2484 msgid "PRIVATE DATA AREA"
2488 #: ../src/guestfs.pod:1253
2490 "You can attach named pieces of private data to the libguestfs handle, and "
2491 "fetch them by name for the lifetime of the handle. This is called the "
2492 "private data area and is only available from the C API."
2496 #: ../src/guestfs.pod:1257
2497 msgid "To attach a named piece of data, use the following call:"
2501 #: ../src/guestfs.pod:1259
2504 " void guestfs_set_private (guestfs_h *g, const char *key, void *data);\n"
2509 #: ../src/guestfs.pod:1261
2511 "C<key> is the name to associate with this data, and C<data> is an arbitrary "
2512 "pointer (which can be C<NULL>). Any previous item with the same name is "
2517 #: ../src/guestfs.pod:1265
2519 "You can use any C<key> you want, but names beginning with an underscore "
2520 "character are reserved for internal libguestfs purposes (for implementing "
2521 "language bindings). It is recommended to prefix the name with some unique "
2522 "string to avoid collisions with other users."
2526 #: ../src/guestfs.pod:1270
2527 msgid "To retrieve the pointer, use:"
2531 #: ../src/guestfs.pod:1272
2534 " void *guestfs_get_private (guestfs_h *g, const char *key);\n"
2539 #: ../src/guestfs.pod:1274
2541 "This function returns C<NULL> if either no data is found associated with "
2542 "C<key>, or if the user previously set the C<key>'s C<data> pointer to "
2547 #: ../src/guestfs.pod:1278
2549 "Libguestfs does not try to look at or interpret the C<data> pointer in any "
2550 "way. As far as libguestfs is concerned, it need not be a valid pointer at "
2551 "all. In particular, libguestfs does I<not> try to free the data when the "
2552 "handle is closed. If the data must be freed, then the caller must either "
2553 "free it before calling L</guestfs_close> or must set up a close callback to "
2554 "do it (see L</guestfs_set_close_callback>, and note that only one callback "
2555 "can be registered for a handle)."
2559 #: ../src/guestfs.pod:1286
2561 "The private data area is implemented using a hash table, and should be "
2562 "reasonably efficient for moderate numbers of keys."
2566 #: ../src/guestfs.pod:1289
2567 msgid "BLOCK DEVICE NAMING"
2571 #: ../src/guestfs.pod:1291
2573 "In the kernel there is now quite a profusion of schemata for naming block "
2574 "devices (in this context, by I<block device> I mean a physical or virtual "
2575 "hard drive). The original Linux IDE driver used names starting with "
2576 "C</dev/hd*>. SCSI devices have historically used a different naming scheme, "
2577 "C</dev/sd*>. When the Linux kernel I<libata> driver became a popular "
2578 "replacement for the old IDE driver (particularly for SATA devices) those "
2579 "devices also used the C</dev/sd*> scheme. Additionally we now have virtual "
2580 "machines with paravirtualized drivers. This has created several different "
2581 "naming systems, such as C</dev/vd*> for virtio disks and C</dev/xvd*> for "
2586 #: ../src/guestfs.pod:1303
2588 "As discussed above, libguestfs uses a qemu appliance running an embedded "
2589 "Linux kernel to access block devices. We can run a variety of appliances "
2590 "based on a variety of Linux kernels."
2594 #: ../src/guestfs.pod:1307
2596 "This causes a problem for libguestfs because many API calls use device or "
2597 "partition names. Working scripts and the recipe (example) scripts that we "
2598 "make available over the internet could fail if the naming scheme changes."
2602 #: ../src/guestfs.pod:1312
2604 "Therefore libguestfs defines C</dev/sd*> as the I<standard naming scheme>. "
2605 "Internally C</dev/sd*> names are translated, if necessary, to other names as "
2606 "required. For example, under RHEL 5 which uses the C</dev/hd*> scheme, any "
2607 "device parameter C</dev/sda2> is translated to C</dev/hda2> transparently."
2611 #: ../src/guestfs.pod:1318
2613 "Note that this I<only> applies to parameters. The L</guestfs_list_devices>, "
2614 "L</guestfs_list_partitions> and similar calls return the true names of the "
2615 "devices and partitions as known to the appliance."
2619 #: ../src/guestfs.pod:1323
2620 msgid "ALGORITHM FOR BLOCK DEVICE NAME TRANSLATION"
2624 #: ../src/guestfs.pod:1325
2626 "Usually this translation is transparent. However in some (very rare) cases "
2627 "you may need to know the exact algorithm. Such cases include where you use "
2628 "L</guestfs_config> to add a mixture of virtio and IDE devices to the "
2629 "qemu-based appliance, so have a mixture of C</dev/sd*> and C</dev/vd*> "
2634 #: ../src/guestfs.pod:1331
2636 "The algorithm is applied only to I<parameters> which are known to be either "
2637 "device or partition names. Return values from functions such as "
2638 "L</guestfs_list_devices> are never changed."
2642 #: ../src/guestfs.pod:1339
2643 msgid "Is the string a parameter which is a device or partition name?"
2647 #: ../src/guestfs.pod:1343
2648 msgid "Does the string begin with C</dev/sd>?"
2652 #: ../src/guestfs.pod:1347
2654 "Does the named device exist? If so, we use that device. However if I<not> "
2655 "then we continue with this algorithm."
2659 #: ../src/guestfs.pod:1352
2660 msgid "Replace initial C</dev/sd> string with C</dev/hd>."
2664 #: ../src/guestfs.pod:1354
2665 msgid "For example, change C</dev/sda2> to C</dev/hda2>."
2669 #: ../src/guestfs.pod:1356
2670 msgid "If that named device exists, use it. If not, continue."
2674 #: ../src/guestfs.pod:1360
2675 msgid "Replace initial C</dev/sd> string with C</dev/vd>."
2679 #: ../src/guestfs.pod:1362
2680 msgid "If that named device exists, use it. If not, return an error."
2684 #: ../src/guestfs.pod:1366
2685 msgid "PORTABILITY CONCERNS"
2689 #: ../src/guestfs.pod:1368
2691 "Although the standard naming scheme and automatic translation is useful for "
2692 "simple programs and guestfish scripts, for larger programs it is best not to "
2693 "rely on this mechanism."
2697 #: ../src/guestfs.pod:1372
2699 "Where possible for maximum future portability programs using libguestfs "
2700 "should use these future-proof techniques:"
2704 #: ../src/guestfs.pod:1379
2706 "Use L</guestfs_list_devices> or L</guestfs_list_partitions> to list actual "
2707 "device names, and then use those names directly."
2711 #: ../src/guestfs.pod:1382
2712 msgid "Since those device names exist by definition, they will never be translated."
2716 #: ../src/guestfs.pod:1387
2718 "Use higher level ways to identify filesystems, such as LVM names, UUIDs and "
2719 "filesystem labels."
2723 #: ../src/guestfs.pod:1392
2728 #: ../src/guestfs.pod:1394
2729 msgid "COMMUNICATION PROTOCOL"
2733 #: ../src/guestfs.pod:1396
2735 "Don't rely on using this protocol directly. This section documents how it "
2736 "currently works, but it may change at any time."
2740 #: ../src/guestfs.pod:1399
2742 "The protocol used to talk between the library and the daemon running inside "
2743 "the qemu virtual machine is a simple RPC mechanism built on top of XDR (RFC "
2744 "1014, RFC 1832, RFC 4506)."
2748 #: ../src/guestfs.pod:1403
2750 "The detailed format of structures is in C<src/guestfs_protocol.x> (note: "
2751 "this file is automatically generated)."
2755 #: ../src/guestfs.pod:1406
2757 "There are two broad cases, ordinary functions that don't have any C<FileIn> "
2758 "and C<FileOut> parameters, which are handled with very simple request/reply "
2759 "messages. Then there are functions that have any C<FileIn> or C<FileOut> "
2760 "parameters, which use the same request and reply messages, but they may also "
2761 "be followed by files sent using a chunked encoding."
2765 #: ../src/guestfs.pod:1413
2766 msgid "ORDINARY FUNCTIONS (NO FILEIN/FILEOUT PARAMS)"
2770 #: ../src/guestfs.pod:1415
2771 msgid "For ordinary functions, the request message is:"
2775 #: ../src/guestfs.pod:1417
2778 " total length (header + arguments,\n"
2779 " but not including the length word itself)\n"
2780 " struct guestfs_message_header (encoded as XDR)\n"
2781 " struct guestfs_<foo>_args (encoded as XDR)\n"
2786 #: ../src/guestfs.pod:1422
2788 "The total length field allows the daemon to allocate a fixed size buffer "
2789 "into which it slurps the rest of the message. As a result, the total length "
2790 "is limited to C<GUESTFS_MESSAGE_MAX> bytes (currently 4MB), which means the "
2791 "effective size of any request is limited to somewhere under this size."
2795 #: ../src/guestfs.pod:1428
2797 "Note also that many functions don't take any arguments, in which case the "
2798 "C<guestfs_I<foo>_args> is completely omitted."
2802 #: ../src/guestfs.pod:1431
2804 "The header contains the procedure number (C<guestfs_proc>) which is how the "
2805 "receiver knows what type of args structure to expect, or none at all."
2809 #: ../src/guestfs.pod:1435
2810 msgid "The reply message for ordinary functions is:"
2814 #: ../src/guestfs.pod:1437
2817 " total length (header + ret,\n"
2818 " but not including the length word itself)\n"
2819 " struct guestfs_message_header (encoded as XDR)\n"
2820 " struct guestfs_<foo>_ret (encoded as XDR)\n"
2825 #: ../src/guestfs.pod:1442
2827 "As above the C<guestfs_I<foo>_ret> structure may be completely omitted for "
2828 "functions that return no formal return values."
2832 #: ../src/guestfs.pod:1445
2833 msgid "As above the total length of the reply is limited to C<GUESTFS_MESSAGE_MAX>."
2837 #: ../src/guestfs.pod:1448
2839 "In the case of an error, a flag is set in the header, and the reply message "
2840 "is slightly changed:"
2844 #: ../src/guestfs.pod:1451
2847 " total length (header + error,\n"
2848 " but not including the length word itself)\n"
2849 " struct guestfs_message_header (encoded as XDR)\n"
2850 " struct guestfs_message_error (encoded as XDR)\n"
2855 #: ../src/guestfs.pod:1456
2857 "The C<guestfs_message_error> structure contains the error message as a "
2862 #: ../src/guestfs.pod:1459
2863 msgid "FUNCTIONS THAT HAVE FILEIN PARAMETERS"
2867 #: ../src/guestfs.pod:1461
2869 "A C<FileIn> parameter indicates that we transfer a file I<into> the guest. "
2870 "The normal request message is sent (see above). However this is followed by "
2871 "a sequence of file chunks."
2875 #: ../src/guestfs.pod:1465
2878 " total length (header + arguments,\n"
2879 " but not including the length word itself,\n"
2880 " and not including the chunks)\n"
2881 " struct guestfs_message_header (encoded as XDR)\n"
2882 " struct guestfs_<foo>_args (encoded as XDR)\n"
2883 " sequence of chunks for FileIn param #0\n"
2884 " sequence of chunks for FileIn param #1 etc.\n"
2889 #: ../src/guestfs.pod:1473
2890 msgid "The \"sequence of chunks\" is:"
2894 #: ../src/guestfs.pod:1475
2897 " length of chunk (not including length word itself)\n"
2898 " struct guestfs_chunk (encoded as XDR)\n"
2899 " length of chunk\n"
2900 " struct guestfs_chunk (encoded as XDR)\n"
2902 " length of chunk\n"
2903 " struct guestfs_chunk (with data.data_len == 0)\n"
2908 #: ../src/guestfs.pod:1483
2910 "The final chunk has the C<data_len> field set to zero. Additionally a flag "
2911 "is set in the final chunk to indicate either successful completion or early "
2916 #: ../src/guestfs.pod:1487
2918 "At time of writing there are no functions that have more than one FileIn "
2919 "parameter. However this is (theoretically) supported, by sending the "
2920 "sequence of chunks for each FileIn parameter one after another (from left to "
2925 #: ../src/guestfs.pod:1492
2927 "Both the library (sender) I<and> the daemon (receiver) may cancel the "
2928 "transfer. The library does this by sending a chunk with a special flag set "
2929 "to indicate cancellation. When the daemon sees this, it cancels the whole "
2930 "RPC, does I<not> send any reply, and goes back to reading the next request."
2934 #: ../src/guestfs.pod:1498
2936 "The daemon may also cancel. It does this by writing a special word "
2937 "C<GUESTFS_CANCEL_FLAG> to the socket. The library listens for this during "
2938 "the transfer, and if it gets it, it will cancel the transfer (it sends a "
2939 "cancel chunk). The special word is chosen so that even if cancellation "
2940 "happens right at the end of the transfer (after the library has finished "
2941 "writing and has started listening for the reply), the \"spurious\" cancel "
2942 "flag will not be confused with the reply message."
2946 #: ../src/guestfs.pod:1507
2948 "This protocol allows the transfer of arbitrary sized files (no 32 bit "
2949 "limit), and also files where the size is not known in advance (eg. from "
2950 "pipes or sockets). However the chunks are rather small "
2951 "(C<GUESTFS_MAX_CHUNK_SIZE>), so that neither the library nor the daemon need "
2952 "to keep much in memory."
2956 #: ../src/guestfs.pod:1513
2957 msgid "FUNCTIONS THAT HAVE FILEOUT PARAMETERS"
2961 #: ../src/guestfs.pod:1515
2963 "The protocol for FileOut parameters is exactly the same as for FileIn "
2964 "parameters, but with the roles of daemon and library reversed."
2968 #: ../src/guestfs.pod:1518
2971 " total length (header + ret,\n"
2972 " but not including the length word itself,\n"
2973 " and not including the chunks)\n"
2974 " struct guestfs_message_header (encoded as XDR)\n"
2975 " struct guestfs_<foo>_ret (encoded as XDR)\n"
2976 " sequence of chunks for FileOut param #0\n"
2977 " sequence of chunks for FileOut param #1 etc.\n"
2982 #: ../src/guestfs.pod:1526
2983 msgid "INITIAL MESSAGE"
2987 #: ../src/guestfs.pod:1528
2989 "Because the underlying channel (QEmu -net channel) doesn't have any sort of "
2990 "connection control, when the daemon launches it sends an initial word "
2991 "(C<GUESTFS_LAUNCH_FLAG>) which indicates that the guest and daemon is "
2992 "alive. This is what L</guestfs_launch> waits for."
2996 #: ../src/guestfs.pod:1533
2997 msgid "MULTIPLE HANDLES AND MULTIPLE THREADS"
3001 #: ../src/guestfs.pod:1535
3003 "All high-level libguestfs actions are synchronous. If you want to use "
3004 "libguestfs asynchronously then you must create a thread."
3008 #: ../src/guestfs.pod:1538
3010 "Only use the handle from a single thread. Either use the handle exclusively "
3011 "from one thread, or provide your own mutex so that two threads cannot issue "
3012 "calls on the same handle at the same time."
3016 #: ../src/guestfs.pod:1542
3017 msgid "QEMU WRAPPERS"
3021 #: ../src/guestfs.pod:1544
3023 "If you want to compile your own qemu, run qemu from a non-standard location, "
3024 "or pass extra arguments to qemu, then you can write a shell-script wrapper "
3029 #: ../src/guestfs.pod:1548
3031 "There is one important rule to remember: you I<must C<exec qemu>> as the "
3032 "last command in the shell script (so that qemu replaces the shell and "
3033 "becomes the direct child of the libguestfs-using program). If you don't do "
3034 "this, then the qemu process won't be cleaned up correctly."
3038 #: ../src/guestfs.pod:1553
3040 "Here is an example of a wrapper, where I have built my own copy of qemu from "
3045 #: ../src/guestfs.pod:1556
3049 " qemudir=/home/rjones/d/qemu\n"
3050 " exec $qemudir/x86_64-softmmu/qemu-system-x86_64 -L $qemudir/pc-bios "
3056 #: ../src/guestfs.pod:1560
3058 "Save this script as C</tmp/qemu.wrapper> (or wherever), C<chmod +x>, and "
3059 "then use it by setting the LIBGUESTFS_QEMU environment variable. For "
3064 #: ../src/guestfs.pod:1564
3067 " LIBGUESTFS_QEMU=/tmp/qemu.wrapper guestfish\n"
3072 #: ../src/guestfs.pod:1566
3074 "Note that libguestfs also calls qemu with the -help and -version options in "
3075 "order to determine features."
3079 #: ../src/guestfs.pod:1569
3080 msgid "LIBGUESTFS VERSION NUMBERS"
3084 #: ../src/guestfs.pod:1571
3086 "Since April 2010, libguestfs has started to make separate development and "
3087 "stable releases, along with corresponding branches in our git repository. "
3088 "These separate releases can be identified by version number:"
3092 #: ../src/guestfs.pod:1576
3095 " even numbers for stable: 1.2.x, 1.4.x, ...\n"
3096 " .-------- odd numbers for development: 1.3.x, 1.5.x, ...\n"
3102 " | `-------- sub-version\n"
3104 " `------ always '1' because we don't change the ABI\n"
3109 #: ../src/guestfs.pod:1587
3110 msgid "Thus \"1.3.5\" is the 5th update to the development branch \"1.3\"."
3114 #: ../src/guestfs.pod:1589
3116 "As time passes we cherry pick fixes from the development branch and backport "
3117 "those into the stable branch, the effect being that the stable branch should "
3118 "get more stable and less buggy over time. So the stable releases are ideal "
3119 "for people who don't need new features but would just like the software to "
3124 #: ../src/guestfs.pod:1595
3125 msgid "Our criteria for backporting changes are:"
3129 #: ../src/guestfs.pod:1601
3131 "Documentation changes which don't affect any code are backported unless the "
3132 "documentation refers to a future feature which is not in stable."
3136 #: ../src/guestfs.pod:1607
3138 "Bug fixes which are not controversial, fix obvious problems, and have been "
3139 "well tested are backported."
3143 #: ../src/guestfs.pod:1612
3145 "Simple rearrangements of code which shouldn't affect how it works get "
3146 "backported. This is so that the code in the two branches doesn't get too "
3147 "far out of step, allowing us to backport future fixes more easily."
3151 #: ../src/guestfs.pod:1618
3153 "We I<don't> backport new features, new APIs, new tools etc, except in one "
3154 "exceptional case: the new feature is required in order to implement an "
3155 "important bug fix."
3159 #: ../src/guestfs.pod:1624
3161 "A new stable branch starts when we think the new features in development are "
3162 "substantial and compelling enough over the current stable branch to warrant "
3163 "it. When that happens we create new stable and development versions 1.N.0 "
3164 "and 1.(N+1).0 [N is even]. The new dot-oh release won't necessarily be so "
3165 "stable at this point, but by backporting fixes from development, that branch "
3166 "will stabilize over time."
3170 #: ../src/guestfs.pod:1632 ../fish/guestfish.pod:905 ../test-tool/libguestfs-test-tool.pod:104 ../tools/virt-edit.pl:312 ../tools/virt-rescue.pl:226
3171 msgid "ENVIRONMENT VARIABLES"
3175 #: ../src/guestfs.pod:1636 ../fish/guestfish.pod:925
3176 msgid "LIBGUESTFS_APPEND"
3180 #: ../src/guestfs.pod:1638 ../fish/guestfish.pod:927
3181 msgid "Pass additional options to the guest kernel."
3185 #: ../src/guestfs.pod:1640 ../fish/guestfish.pod:929
3186 msgid "LIBGUESTFS_DEBUG"
3190 #: ../src/guestfs.pod:1642
3192 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
3193 "effect as calling C<guestfs_set_verbose (g, 1)>."
3197 #: ../src/guestfs.pod:1645 ../fish/guestfish.pod:934
3198 msgid "LIBGUESTFS_MEMSIZE"
3202 #: ../src/guestfs.pod:1647 ../fish/guestfish.pod:936
3203 msgid "Set the memory allocated to the qemu process, in megabytes. For example:"
3207 #: ../src/guestfs.pod:1650 ../fish/guestfish.pod:939
3210 " LIBGUESTFS_MEMSIZE=700\n"
3215 #: ../src/guestfs.pod:1652 ../fish/guestfish.pod:941
3216 msgid "LIBGUESTFS_PATH"
3220 #: ../src/guestfs.pod:1654
3222 "Set the path that libguestfs uses to search for kernel and initrd.img. See "
3223 "the discussion of paths in section PATH above."
3227 #: ../src/guestfs.pod:1657 ../fish/guestfish.pod:946
3228 msgid "LIBGUESTFS_QEMU"
3232 #: ../src/guestfs.pod:1659 ../fish/guestfish.pod:948
3234 "Set the default qemu binary that libguestfs uses. If not set, then the qemu "
3235 "which was found at compile time by the configure script is used."
3239 #: ../src/guestfs.pod:1663
3240 msgid "See also L</QEMU WRAPPERS> above."
3244 #: ../src/guestfs.pod:1665 ../fish/guestfish.pod:952
3245 msgid "LIBGUESTFS_TRACE"
3249 #: ../src/guestfs.pod:1667
3251 "Set C<LIBGUESTFS_TRACE=1> to enable command traces. This has the same "
3252 "effect as calling C<guestfs_set_trace (g, 1)>."
3256 #: ../src/guestfs.pod:1670 ../fish/guestfish.pod:961
3261 #: ../src/guestfs.pod:1672 ../fish/guestfish.pod:963
3262 msgid "Location of temporary directory, defaults to C</tmp>."
3266 #: ../src/guestfs.pod:1674 ../fish/guestfish.pod:965
3268 "If libguestfs was compiled to use the supermin appliance then each handle "
3269 "will require rather a large amount of space in this directory for short "
3270 "periods of time (~ 80 MB). You can use C<$TMPDIR> to configure another "
3271 "directory to use in case C</tmp> is not large enough."
3275 #: ../src/guestfs.pod:1682 ../fish/guestfish.pod:1023 ../test-tool/libguestfs-test-tool.pod:109 ../fuse/guestmount.pod:178 ../inspector/virt-inspector.pl:846 ../tools/virt-cat.pl:163 ../tools/virt-df.pl:482 ../tools/virt-edit.pl:325 ../tools/virt-list-filesystems.pl:191 ../tools/virt-list-partitions.pl:229 ../tools/virt-ls.pl:210 ../tools/virt-make-fs.pl:527 ../tools/virt-rescue.pl:231 ../tools/virt-resize.pl:1390 ../tools/virt-tar.pl:257 ../tools/virt-win-reg.pl:461
3280 #: ../src/guestfs.pod:1684
3282 "L<guestfish(1)>, L<guestmount(1)>, L<virt-cat(1)>, L<virt-df(1)>, "
3283 "L<virt-edit(1)>, L<virt-inspector(1)>, L<virt-list-filesystems(1)>, "
3284 "L<virt-list-partitions(1)>, L<virt-ls(1)>, L<virt-make-fs(1)>, "
3285 "L<virt-rescue(1)>, L<virt-tar(1)>, L<virt-win-reg(1)>, L<qemu(1)>, "
3286 "L<febootstrap(1)>, L<hivex(3)>, L<http://libguestfs.org/>."
3290 #: ../src/guestfs.pod:1702
3292 "Tools with a similar purpose: L<fdisk(8)>, L<parted(8)>, L<kpartx(8)>, "
3293 "L<lvm(8)>, L<disktype(1)>."
3297 #: ../src/guestfs.pod:1709 ../tools/virt-make-fs.pl:541 ../tools/virt-win-reg.pl:476
3302 #: ../src/guestfs.pod:1711
3303 msgid "To get a list of bugs against libguestfs use this link:"
3307 #: ../src/guestfs.pod:1713
3308 msgid "L<https://bugzilla.redhat.com/buglist.cgi?component=libguestfs&product=Virtualization+Tools>"
3312 #: ../src/guestfs.pod:1715
3313 msgid "To report a new bug against libguestfs use this link:"
3317 #: ../src/guestfs.pod:1717
3318 msgid "L<https://bugzilla.redhat.com/enter_bug.cgi?component=libguestfs&product=Virtualization+Tools>"
3322 #: ../src/guestfs.pod:1719
3323 msgid "When reporting a bug, please check:"
3327 #: ../src/guestfs.pod:1725
3328 msgid "That the bug hasn't been reported already."
3332 #: ../src/guestfs.pod:1729
3333 msgid "That you are testing a recent version."
3337 #: ../src/guestfs.pod:1733
3338 msgid "Describe the bug accurately, and give a way to reproduce it."
3342 #: ../src/guestfs.pod:1737
3344 "Run libguestfs-test-tool and paste the B<complete, unedited> output into the "
3349 #: ../src/guestfs.pod:1742 ../fish/guestfish.pod:1039 ../test-tool/libguestfs-test-tool.pod:115 ../fuse/guestmount.pod:189 ../inspector/virt-inspector.pl:855
3354 #: ../src/guestfs.pod:1744 ../fish/guestfish.pod:1041 ../test-tool/libguestfs-test-tool.pod:117 ../fuse/guestmount.pod:191
3355 msgid "Richard W.M. Jones (C<rjones at redhat dot com>)"
3359 #: ../src/guestfs.pod:1746 ../fish/guestfish.pod:1043 ../test-tool/libguestfs-test-tool.pod:119 ../fuse/guestmount.pod:193 ../inspector/virt-inspector.pl:861 ../tools/virt-cat.pl:177 ../tools/virt-df.pl:495 ../tools/virt-edit.pl:341 ../tools/virt-list-filesystems.pl:207 ../tools/virt-list-partitions.pl:244 ../tools/virt-ls.pl:225 ../tools/virt-make-fs.pl:556 ../tools/virt-rescue.pl:245 ../tools/virt-resize.pl:1411 ../tools/virt-tar.pl:272 ../tools/virt-win-reg.pl:491
3364 #: ../src/guestfs.pod:1748 ../fish/guestfish.pod:1045
3365 msgid "Copyright (C) 2009-2010 Red Hat Inc. L<http://libguestfs.org/>"
3369 #: ../src/guestfs.pod:1751
3371 "This library is free software; you can redistribute it and/or modify it "
3372 "under the terms of the GNU Lesser General Public License as published by the "
3373 "Free Software Foundation; either version 2 of the License, or (at your "
3374 "option) any later version."
3378 #: ../src/guestfs.pod:1756
3380 "This library is distributed in the hope that it will be useful, but WITHOUT "
3381 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
3382 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License "
3387 #: ../src/guestfs.pod:1761
3389 "You should have received a copy of the GNU Lesser General Public License "
3390 "along with this library; if not, write to the Free Software Foundation, "
3391 "Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA"
3395 #: ../src/guestfs-actions.pod:1
3396 msgid "guestfs_add_cdrom"
3400 #: ../src/guestfs-actions.pod:3
3403 " int guestfs_add_cdrom (guestfs_h *g,\n"
3404 "\t\tconst char *filename);\n"
3409 #: ../src/guestfs-actions.pod:6 ../fish/guestfish-actions.pod:5
3410 msgid "This function adds a virtual CD-ROM disk image to the guest."
3414 #: ../src/guestfs-actions.pod:8 ../fish/guestfish-actions.pod:7
3415 msgid "This is equivalent to the qemu parameter C<-cdrom filename>."
3419 #: ../src/guestfs-actions.pod:10 ../src/guestfs-actions.pod:1488 ../fish/guestfish-actions.pod:9 ../fish/guestfish-actions.pod:1186
3424 #: ../src/guestfs-actions.pod:16
3426 "This call checks for the existence of C<filename>. This stops you from "
3427 "specifying other types of drive which are supported by qemu such as C<nbd:> "
3428 "and C<http:> URLs. To specify those, use the general C<guestfs_config> call "
3433 #: ../src/guestfs-actions.pod:23
3435 "If you just want to add an ISO file (often you use this as an efficient way "
3436 "to transfer large files into the guest), then you should probably use "
3437 "C<guestfs_add_drive_ro> instead."
3441 #: ../src/guestfs-actions.pod:29 ../src/guestfs-actions.pod:63 ../src/guestfs-actions.pod:92 ../src/guestfs-actions.pod:103 ../src/guestfs-actions.pod:114 ../src/guestfs-actions.pod:124 ../src/guestfs-actions.pod:135 ../src/guestfs-actions.pod:238 ../src/guestfs-actions.pod:255 ../src/guestfs-actions.pod:266 ../src/guestfs-actions.pod:302 ../src/guestfs-actions.pod:324 ../src/guestfs-actions.pod:339 ../src/guestfs-actions.pod:403 ../src/guestfs-actions.pod:430 ../src/guestfs-actions.pod:441 ../src/guestfs-actions.pod:453 ../src/guestfs-actions.pod:534 ../src/guestfs-actions.pod:549 ../src/guestfs-actions.pod:560 ../src/guestfs-actions.pod:571 ../src/guestfs-actions.pod:717 ../src/guestfs-actions.pod:734 ../src/guestfs-actions.pod:749 ../src/guestfs-actions.pod:824 ../src/guestfs-actions.pod:839 ../src/guestfs-actions.pod:855 ../src/guestfs-actions.pod:866 ../src/guestfs-actions.pod:883 ../src/guestfs-actions.pod:916 ../src/guestfs-actions.pod:974 ../src/guestfs-actions.pod:996 ../src/guestfs-actions.pod:1027 ../src/guestfs-actions.pod:1115 ../src/guestfs-actions.pod:1146 ../src/guestfs-actions.pod:1346 ../src/guestfs-actions.pod:1365 ../src/guestfs-actions.pod:1446 ../src/guestfs-actions.pod:1794 ../src/guestfs-actions.pod:1917 ../src/guestfs-actions.pod:1972 ../src/guestfs-actions.pod:2002 ../src/guestfs-actions.pod:2349 ../src/guestfs-actions.pod:2361 ../src/guestfs-actions.pod:2378 ../src/guestfs-actions.pod:2443 ../src/guestfs-actions.pod:2454 ../src/guestfs-actions.pod:2464 ../src/guestfs-actions.pod:2475 ../src/guestfs-actions.pod:2487 ../src/guestfs-actions.pod:2517 ../src/guestfs-actions.pod:2581 ../src/guestfs-actions.pod:2598 ../src/guestfs-actions.pod:2612 ../src/guestfs-actions.pod:2632 ../src/guestfs-actions.pod:2652 ../src/guestfs-actions.pod:2681 ../src/guestfs-actions.pod:2697 ../src/guestfs-actions.pod:2713 ../src/guestfs-actions.pod:2725 ../src/guestfs-actions.pod:2734 ../src/guestfs-actions.pod:2767 ../src/guestfs-actions.pod:2780 ../src/guestfs-actions.pod:2790 ../src/guestfs-actions.pod:2802 ../src/guestfs-actions.pod:2816 ../src/guestfs-actions.pod:2896 ../src/guestfs-actions.pod:2913 ../src/guestfs-actions.pod:2923 ../src/guestfs-actions.pod:2968 ../src/guestfs-actions.pod:2983 ../src/guestfs-actions.pod:2998 ../src/guestfs-actions.pod:3011 ../src/guestfs-actions.pod:3022 ../src/guestfs-actions.pod:3033 ../src/guestfs-actions.pod:3047 ../src/guestfs-actions.pod:3059 ../src/guestfs-actions.pod:3076 ../src/guestfs-actions.pod:3107 ../src/guestfs-actions.pod:3135 ../src/guestfs-actions.pod:3151 ../src/guestfs-actions.pod:3167 ../src/guestfs-actions.pod:3176 ../src/guestfs-actions.pod:3190 ../src/guestfs-actions.pod:3200 ../src/guestfs-actions.pod:3212 ../src/guestfs-actions.pod:3224 ../src/guestfs-actions.pod:3256 ../src/guestfs-actions.pod:3268 ../src/guestfs-actions.pod:3285 ../src/guestfs-actions.pod:3296 ../src/guestfs-actions.pod:3310 ../src/guestfs-actions.pod:3350 ../src/guestfs-actions.pod:3381 ../src/guestfs-actions.pod:3392 ../src/guestfs-actions.pod:3417 ../src/guestfs-actions.pod:3431 ../src/guestfs-actions.pod:3446 ../src/guestfs-actions.pod:3568 ../src/guestfs-actions.pod:3620 ../src/guestfs-actions.pod:3639 ../src/guestfs-actions.pod:3654 ../src/guestfs-actions.pod:3665 ../src/guestfs-actions.pod:3699 ../src/guestfs-actions.pod:3713 ../src/guestfs-actions.pod:3723 ../src/guestfs-actions.pod:3734 ../src/guestfs-actions.pod:3966 ../src/guestfs-actions.pod:3982 ../src/guestfs-actions.pod:3993 ../src/guestfs-actions.pod:4002 ../src/guestfs-actions.pod:4013 ../src/guestfs-actions.pod:4022 ../src/guestfs-actions.pod:4033 ../src/guestfs-actions.pod:4046 ../src/guestfs-actions.pod:4064 ../src/guestfs-actions.pod:4080 ../src/guestfs-actions.pod:4096 ../src/guestfs-actions.pod:4111 ../src/guestfs-actions.pod:4131 ../src/guestfs-actions.pod:4146 ../src/guestfs-actions.pod:4162 ../src/guestfs-actions.pod:4180 ../src/guestfs-actions.pod:4196 ../src/guestfs-actions.pod:4210 ../src/guestfs-actions.pod:4235 ../src/guestfs-actions.pod:4256 ../src/guestfs-actions.pod:4272 ../src/guestfs-actions.pod:4293 ../src/guestfs-actions.pod:4305 ../src/guestfs-actions.pod:4317 ../src/guestfs-actions.pod:4333 ../src/guestfs-actions.pod:4367 ../src/guestfs-actions.pod:4387 ../src/guestfs-actions.pod:4410 ../src/guestfs-actions.pod:4500 ../src/guestfs-actions.pod:4606 ../src/guestfs-actions.pod:4615 ../src/guestfs-actions.pod:4625 ../src/guestfs-actions.pod:4635 ../src/guestfs-actions.pod:4654 ../src/guestfs-actions.pod:4664 ../src/guestfs-actions.pod:4674 ../src/guestfs-actions.pod:4684 ../src/guestfs-actions.pod:4696 ../src/guestfs-actions.pod:4746 ../src/guestfs-actions.pod:4760 ../src/guestfs-actions.pod:4773 ../src/guestfs-actions.pod:4786 ../src/guestfs-actions.pod:4800 ../src/guestfs-actions.pod:4810 ../src/guestfs-actions.pod:4827 ../src/guestfs-actions.pod:4857 ../src/guestfs-actions.pod:4868 ../src/guestfs-actions.pod:4903 ../src/guestfs-actions.pod:4913 ../src/guestfs-actions.pod:4928 ../src/guestfs-actions.pod:4956 ../src/guestfs-actions.pod:5060 ../src/guestfs-actions.pod:5075 ../src/guestfs-actions.pod:5086 ../src/guestfs-actions.pod:5132 ../src/guestfs-actions.pod:5142 ../src/guestfs-actions.pod:5179 ../src/guestfs-actions.pod:5206 ../src/guestfs-actions.pod:5248 ../src/guestfs-actions.pod:5271 ../src/guestfs-actions.pod:5328 ../src/guestfs-actions.pod:5344 ../src/guestfs-actions.pod:5370
3442 msgid "This function returns 0 on success or -1 on error."
3446 #: ../src/guestfs-actions.pod:31
3447 msgid "guestfs_add_drive"
3451 #: ../src/guestfs-actions.pod:33
3454 " int guestfs_add_drive (guestfs_h *g,\n"
3455 "\t\tconst char *filename);\n"
3460 #: ../src/guestfs-actions.pod:36 ../fish/guestfish-actions.pod:32
3462 "This function adds a virtual machine disk image C<filename> to the guest. "
3463 "The first time you call this function, the disk appears as IDE disk 0 "
3464 "(C</dev/sda>) in the guest, the second time as C</dev/sdb>, and so on."
3468 #: ../src/guestfs-actions.pod:41 ../fish/guestfish-actions.pod:37
3470 "You don't necessarily need to be root when using libguestfs. However you "
3471 "obviously do need sufficient permissions to access the filename for whatever "
3472 "operations you want to perform (ie. read access if you just want to read the "
3473 "image or write access if you want to modify the image)."
3477 #: ../src/guestfs-actions.pod:47 ../fish/guestfish-actions.pod:43
3479 "This is equivalent to the qemu parameter C<-drive "
3480 "file=filename,cache=off,if=...>."
3484 #: ../src/guestfs-actions.pod:50 ../fish/guestfish-actions.pod:46
3486 "C<cache=off> is omitted in cases where it is not supported by the underlying "
3491 #: ../src/guestfs-actions.pod:53 ../src/guestfs-actions.pod:82
3493 "C<if=...> is set at compile time by the configuration option C<./configure "
3494 "--with-drive-if=...>. In the rare case where you might need to change this "
3495 "at run time, use C<guestfs_add_drive_with_if> or "
3496 "C<guestfs_add_drive_ro_with_if>."
3500 #: ../src/guestfs-actions.pod:58 ../src/guestfs-actions.pod:87
3502 "Note that this call checks for the existence of C<filename>. This stops you "
3503 "from specifying other types of drive which are supported by qemu such as "
3504 "C<nbd:> and C<http:> URLs. To specify those, use the general "
3505 "C<guestfs_config> call instead."
3509 #: ../src/guestfs-actions.pod:65
3510 msgid "guestfs_add_drive_ro"
3514 #: ../src/guestfs-actions.pod:67
3517 " int guestfs_add_drive_ro (guestfs_h *g,\n"
3518 "\t\tconst char *filename);\n"
3523 #: ../src/guestfs-actions.pod:70 ../fish/guestfish-actions.pod:63
3524 msgid "This adds a drive in snapshot mode, making it effectively read-only."
3528 #: ../src/guestfs-actions.pod:73 ../fish/guestfish-actions.pod:66
3530 "Note that writes to the device are allowed, and will be seen for the "
3531 "duration of the guestfs handle, but they are written to a temporary file "
3532 "which is discarded as soon as the guestfs handle is closed. We don't "
3533 "currently have any method to enable changes to be committed, although qemu "
3538 #: ../src/guestfs-actions.pod:79 ../fish/guestfish-actions.pod:72
3540 "This is equivalent to the qemu parameter C<-drive "
3541 "file=filename,snapshot=on,if=...>."
3545 #: ../src/guestfs-actions.pod:94
3546 msgid "guestfs_add_drive_ro_with_if"
3550 #: ../src/guestfs-actions.pod:96
3553 " int guestfs_add_drive_ro_with_if (guestfs_h *g,\n"
3554 "\t\tconst char *filename,\n"
3555 "\t\tconst char *iface);\n"
3560 #: ../src/guestfs-actions.pod:100
3562 "This is the same as C<guestfs_add_drive_ro> but it allows you to specify the "
3563 "QEMU interface emulation to use at run time."
3567 #: ../src/guestfs-actions.pod:105
3568 msgid "guestfs_add_drive_with_if"
3572 #: ../src/guestfs-actions.pod:107
3575 " int guestfs_add_drive_with_if (guestfs_h *g,\n"
3576 "\t\tconst char *filename,\n"
3577 "\t\tconst char *iface);\n"
3582 #: ../src/guestfs-actions.pod:111
3584 "This is the same as C<guestfs_add_drive> but it allows you to specify the "
3585 "QEMU interface emulation to use at run time."
3589 #: ../src/guestfs-actions.pod:116
3590 msgid "guestfs_aug_clear"
3594 #: ../src/guestfs-actions.pod:118
3597 " int guestfs_aug_clear (guestfs_h *g,\n"
3598 "\t\tconst char *augpath);\n"
3603 #: ../src/guestfs-actions.pod:121 ../fish/guestfish-actions.pod:103
3605 "Set the value associated with C<path> to C<NULL>. This is the same as the "
3606 "L<augtool(1)> C<clear> command."
3610 #: ../src/guestfs-actions.pod:126
3611 msgid "guestfs_aug_close"
3615 #: ../src/guestfs-actions.pod:128
3618 " int guestfs_aug_close (guestfs_h *g);\n"
3623 #: ../src/guestfs-actions.pod:130
3625 "Close the current Augeas handle and free up any resources used by it. After "
3626 "calling this, you have to call C<guestfs_aug_init> again before you can use "
3627 "any other Augeas functions."
3631 #: ../src/guestfs-actions.pod:137
3632 msgid "guestfs_aug_defnode"
3636 #: ../src/guestfs-actions.pod:139
3639 " struct guestfs_int_bool *guestfs_aug_defnode (guestfs_h *g,\n"
3640 "\t\tconst char *name,\n"
3641 "\t\tconst char *expr,\n"
3642 "\t\tconst char *val);\n"
3647 #: ../src/guestfs-actions.pod:144 ../fish/guestfish-actions.pod:119
3648 msgid "Defines a variable C<name> whose value is the result of evaluating C<expr>."
3652 #: ../src/guestfs-actions.pod:147
3654 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
3655 "calling C<guestfs_aug_set> C<expr>, C<value>. C<name> will be the nodeset "
3656 "containing that single node."
3660 #: ../src/guestfs-actions.pod:151 ../fish/guestfish-actions.pod:126
3662 "On success this returns a pair containing the number of nodes in the "
3663 "nodeset, and a boolean flag if a node was created."
3667 #: ../src/guestfs-actions.pod:155
3669 "This function returns a C<struct guestfs_int_bool *>, or NULL if there was "
3670 "an error. I<The caller must call C<guestfs_free_int_bool> after use>."
3674 #: ../src/guestfs-actions.pod:159
3675 msgid "guestfs_aug_defvar"
3679 #: ../src/guestfs-actions.pod:161
3682 " int guestfs_aug_defvar (guestfs_h *g,\n"
3683 "\t\tconst char *name,\n"
3684 "\t\tconst char *expr);\n"
3689 #: ../src/guestfs-actions.pod:165 ../fish/guestfish-actions.pod:134
3691 "Defines an Augeas variable C<name> whose value is the result of evaluating "
3692 "C<expr>. If C<expr> is NULL, then C<name> is undefined."
3696 #: ../src/guestfs-actions.pod:169 ../fish/guestfish-actions.pod:138
3698 "On success this returns the number of nodes in C<expr>, or C<0> if C<expr> "
3699 "evaluates to something which is not a nodeset."
3703 #: ../src/guestfs-actions.pod:172 ../src/guestfs-actions.pod:313 ../src/guestfs-actions.pod:467 ../src/guestfs-actions.pod:492 ../src/guestfs-actions.pod:507 ../src/guestfs-actions.pod:523 ../src/guestfs-actions.pod:1013 ../src/guestfs-actions.pod:1328 ../src/guestfs-actions.pod:1510 ../src/guestfs-actions.pod:1591 ../src/guestfs-actions.pod:1622 ../src/guestfs-actions.pod:1665 ../src/guestfs-actions.pod:1682 ../src/guestfs-actions.pod:1907 ../src/guestfs-actions.pod:2119 ../src/guestfs-actions.pod:2137 ../src/guestfs-actions.pod:3370 ../src/guestfs-actions.pod:3477 ../src/guestfs-actions.pod:3793 ../src/guestfs-actions.pod:4892 ../src/guestfs-actions.pod:5216 ../src/guestfs-actions.pod:5226 ../src/guestfs-actions.pod:5236
3704 msgid "On error this function returns -1."
3708 #: ../src/guestfs-actions.pod:174
3709 msgid "guestfs_aug_get"
3713 #: ../src/guestfs-actions.pod:176
3716 " char *guestfs_aug_get (guestfs_h *g,\n"
3717 "\t\tconst char *augpath);\n"
3722 #: ../src/guestfs-actions.pod:179 ../fish/guestfish-actions.pod:145
3724 "Look up the value associated with C<path>. If C<path> matches exactly one "
3725 "node, the C<value> is returned."
3729 #: ../src/guestfs-actions.pod:182 ../src/guestfs-actions.pod:610 ../src/guestfs-actions.pod:625 ../src/guestfs-actions.pod:682 ../src/guestfs-actions.pod:695 ../src/guestfs-actions.pod:786 ../src/guestfs-actions.pod:899 ../src/guestfs-actions.pod:928 ../src/guestfs-actions.pod:942 ../src/guestfs-actions.pod:958 ../src/guestfs-actions.pod:1041 ../src/guestfs-actions.pod:1205 ../src/guestfs-actions.pod:1314 ../src/guestfs-actions.pod:1459 ../src/guestfs-actions.pod:1473 ../src/guestfs-actions.pod:1549 ../src/guestfs-actions.pod:1567 ../src/guestfs-actions.pod:1701 ../src/guestfs-actions.pod:1840 ../src/guestfs-actions.pod:2021 ../src/guestfs-actions.pod:2071 ../src/guestfs-actions.pod:2187 ../src/guestfs-actions.pod:2222 ../src/guestfs-actions.pod:2432 ../src/guestfs-actions.pod:2853 ../src/guestfs-actions.pod:2949 ../src/guestfs-actions.pod:3492 ../src/guestfs-actions.pod:3771 ../src/guestfs-actions.pod:3909 ../src/guestfs-actions.pod:3952 ../src/guestfs-actions.pod:4428 ../src/guestfs-actions.pod:4441 ../src/guestfs-actions.pod:4455 ../src/guestfs-actions.pod:4476 ../src/guestfs-actions.pod:5009 ../src/guestfs-actions.pod:5025 ../src/guestfs-actions.pod:5040 ../src/guestfs-actions.pod:5188 ../src/guestfs-actions.pod:5418
3731 "This function returns a string, or NULL on error. I<The caller must free "
3732 "the returned string after use>."
3736 #: ../src/guestfs-actions.pod:185
3737 msgid "guestfs_aug_init"
3741 #: ../src/guestfs-actions.pod:187
3744 " int guestfs_aug_init (guestfs_h *g,\n"
3745 "\t\tconst char *root,\n"
3751 #: ../src/guestfs-actions.pod:191 ../fish/guestfish-actions.pod:152
3753 "Create a new Augeas handle for editing configuration files. If there was "
3754 "any previous Augeas handle associated with this guestfs session, then it is "
3759 #: ../src/guestfs-actions.pod:195
3760 msgid "You must call this before using any other C<guestfs_aug_*> commands."
3764 #: ../src/guestfs-actions.pod:198 ../fish/guestfish-actions.pod:159
3765 msgid "C<root> is the filesystem root. C<root> must not be NULL, use C</> instead."
3769 #: ../src/guestfs-actions.pod:201 ../fish/guestfish-actions.pod:162
3771 "The flags are the same as the flags defined in E<lt>augeas.hE<gt>, the "
3772 "logical I<or> of the following integers:"
3776 #: ../src/guestfs-actions.pod:207 ../fish/guestfish-actions.pod:168
3777 msgid "C<AUG_SAVE_BACKUP> = 1"
3781 #: ../src/guestfs-actions.pod:209 ../fish/guestfish-actions.pod:170
3782 msgid "Keep the original file with a C<.augsave> extension."
3786 #: ../src/guestfs-actions.pod:211 ../fish/guestfish-actions.pod:172
3787 msgid "C<AUG_SAVE_NEWFILE> = 2"
3791 #: ../src/guestfs-actions.pod:213 ../fish/guestfish-actions.pod:174
3793 "Save changes into a file with extension C<.augnew>, and do not overwrite "
3794 "original. Overrides C<AUG_SAVE_BACKUP>."
3798 #: ../src/guestfs-actions.pod:216 ../fish/guestfish-actions.pod:177
3799 msgid "C<AUG_TYPE_CHECK> = 4"
3803 #: ../src/guestfs-actions.pod:218 ../fish/guestfish-actions.pod:179
3804 msgid "Typecheck lenses (can be expensive)."
3808 #: ../src/guestfs-actions.pod:220 ../fish/guestfish-actions.pod:181
3809 msgid "C<AUG_NO_STDINC> = 8"
3813 #: ../src/guestfs-actions.pod:222 ../fish/guestfish-actions.pod:183
3814 msgid "Do not use standard load path for modules."
3818 #: ../src/guestfs-actions.pod:224 ../fish/guestfish-actions.pod:185
3819 msgid "C<AUG_SAVE_NOOP> = 16"
3823 #: ../src/guestfs-actions.pod:226 ../fish/guestfish-actions.pod:187
3824 msgid "Make save a no-op, just record what would have been changed."
3828 #: ../src/guestfs-actions.pod:228 ../fish/guestfish-actions.pod:189
3829 msgid "C<AUG_NO_LOAD> = 32"
3833 #: ../src/guestfs-actions.pod:230
3834 msgid "Do not load the tree in C<guestfs_aug_init>."
3838 #: ../src/guestfs-actions.pod:234
3839 msgid "To close the handle, you can call C<guestfs_aug_close>."
3843 #: ../src/guestfs-actions.pod:236 ../fish/guestfish-actions.pod:197
3844 msgid "To find out more about Augeas, see L<http://augeas.net/>."
3848 #: ../src/guestfs-actions.pod:240
3849 msgid "guestfs_aug_insert"
3853 #: ../src/guestfs-actions.pod:242
3856 " int guestfs_aug_insert (guestfs_h *g,\n"
3857 "\t\tconst char *augpath,\n"
3858 "\t\tconst char *label,\n"
3859 "\t\tint before);\n"
3864 #: ../src/guestfs-actions.pod:247 ../fish/guestfish-actions.pod:203
3866 "Create a new sibling C<label> for C<path>, inserting it into the tree before "
3867 "or after C<path> (depending on the boolean flag C<before>)."
3871 #: ../src/guestfs-actions.pod:251 ../fish/guestfish-actions.pod:207
3873 "C<path> must match exactly one existing node in the tree, and C<label> must "
3874 "be a label, ie. not contain C</>, C<*> or end with a bracketed index C<[N]>."
3878 #: ../src/guestfs-actions.pod:257
3879 msgid "guestfs_aug_load"
3883 #: ../src/guestfs-actions.pod:259
3886 " int guestfs_aug_load (guestfs_h *g);\n"
3891 #: ../src/guestfs-actions.pod:261 ../fish/guestfish-actions.pod:215
3892 msgid "Load files into the tree."
3896 #: ../src/guestfs-actions.pod:263 ../fish/guestfish-actions.pod:217
3897 msgid "See C<aug_load> in the Augeas documentation for the full gory details."
3901 #: ../src/guestfs-actions.pod:268
3902 msgid "guestfs_aug_ls"
3906 #: ../src/guestfs-actions.pod:270
3909 " char **guestfs_aug_ls (guestfs_h *g,\n"
3910 "\t\tconst char *augpath);\n"
3915 #: ../src/guestfs-actions.pod:273
3917 "This is just a shortcut for listing C<guestfs_aug_match> C<path/*> and "
3918 "sorting the resulting nodes into alphabetical order."
3922 #: ../src/guestfs-actions.pod:276 ../src/guestfs-actions.pod:289 ../src/guestfs-actions.pod:417 ../src/guestfs-actions.pod:802 ../src/guestfs-actions.pod:1053 ../src/guestfs-actions.pod:1069 ../src/guestfs-actions.pod:1157 ../src/guestfs-actions.pod:1173 ../src/guestfs-actions.pod:1404 ../src/guestfs-actions.pod:1738 ../src/guestfs-actions.pod:1751 ../src/guestfs-actions.pod:1767 ../src/guestfs-actions.pod:1804 ../src/guestfs-actions.pod:1825 ../src/guestfs-actions.pod:1887 ../src/guestfs-actions.pod:1927 ../src/guestfs-actions.pod:2093 ../src/guestfs-actions.pod:2259 ../src/guestfs-actions.pod:2402 ../src/guestfs-actions.pod:2417 ../src/guestfs-actions.pod:2501 ../src/guestfs-actions.pod:2830 ../src/guestfs-actions.pod:3337 ../src/guestfs-actions.pod:3748 ../src/guestfs-actions.pod:3834 ../src/guestfs-actions.pod:3940 ../src/guestfs-actions.pod:4489 ../src/guestfs-actions.pod:4538 ../src/guestfs-actions.pod:4590 ../src/guestfs-actions.pod:4706 ../src/guestfs-actions.pod:4727 ../src/guestfs-actions.pod:5101 ../src/guestfs-actions.pod:5118 ../src/guestfs-actions.pod:5156 ../src/guestfs-actions.pod:5292 ../src/guestfs-actions.pod:5308 ../src/guestfs-actions.pod:5381 ../src/guestfs-actions.pod:5397 ../src/guestfs-actions.pod:5437 ../src/guestfs-actions.pod:5453
3924 "This function returns a NULL-terminated array of strings (like "
3925 "L<environ(3)>), or NULL if there was an error. I<The caller must free the "
3926 "strings and the array after use>."
3930 #: ../src/guestfs-actions.pod:280
3931 msgid "guestfs_aug_match"
3935 #: ../src/guestfs-actions.pod:282
3938 " char **guestfs_aug_match (guestfs_h *g,\n"
3939 "\t\tconst char *augpath);\n"
3944 #: ../src/guestfs-actions.pod:285 ../fish/guestfish-actions.pod:231
3946 "Returns a list of paths which match the path expression C<path>. The "
3947 "returned paths are sufficiently qualified so that they match exactly one "
3948 "node in the current tree."
3952 #: ../src/guestfs-actions.pod:293
3953 msgid "guestfs_aug_mv"
3957 #: ../src/guestfs-actions.pod:295
3960 " int guestfs_aug_mv (guestfs_h *g,\n"
3961 "\t\tconst char *src,\n"
3962 "\t\tconst char *dest);\n"
3967 #: ../src/guestfs-actions.pod:299 ../fish/guestfish-actions.pod:239
3969 "Move the node C<src> to C<dest>. C<src> must match exactly one node. "
3970 "C<dest> is overwritten if it exists."
3974 #: ../src/guestfs-actions.pod:304
3975 msgid "guestfs_aug_rm"
3979 #: ../src/guestfs-actions.pod:306
3982 " int guestfs_aug_rm (guestfs_h *g,\n"
3983 "\t\tconst char *augpath);\n"
3988 #: ../src/guestfs-actions.pod:309 ../fish/guestfish-actions.pod:246
3989 msgid "Remove C<path> and all of its children."
3993 #: ../src/guestfs-actions.pod:311 ../fish/guestfish-actions.pod:248
3994 msgid "On success this returns the number of entries which were removed."
3998 #: ../src/guestfs-actions.pod:315
3999 msgid "guestfs_aug_save"
4003 #: ../src/guestfs-actions.pod:317
4006 " int guestfs_aug_save (guestfs_h *g);\n"
4011 #: ../src/guestfs-actions.pod:319 ../fish/guestfish-actions.pod:254
4012 msgid "This writes all pending changes to disk."
4016 #: ../src/guestfs-actions.pod:321
4018 "The flags which were passed to C<guestfs_aug_init> affect exactly how files "
4023 #: ../src/guestfs-actions.pod:326
4024 msgid "guestfs_aug_set"
4028 #: ../src/guestfs-actions.pod:328
4031 " int guestfs_aug_set (guestfs_h *g,\n"
4032 "\t\tconst char *augpath,\n"
4033 "\t\tconst char *val);\n"
4038 #: ../src/guestfs-actions.pod:332 ../fish/guestfish-actions.pod:263
4039 msgid "Set the value associated with C<path> to C<val>."
4043 #: ../src/guestfs-actions.pod:334
4045 "In the Augeas API, it is possible to clear a node by setting the value to "
4046 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
4047 "this call. Instead you must use the C<guestfs_aug_clear> call."
4051 #: ../src/guestfs-actions.pod:341
4052 msgid "guestfs_available"
4056 #: ../src/guestfs-actions.pod:343
4059 " int guestfs_available (guestfs_h *g,\n"
4060 "\t\tchar *const *groups);\n"
4065 #: ../src/guestfs-actions.pod:346 ../fish/guestfish-actions.pod:274
4067 "This command is used to check the availability of some groups of "
4068 "functionality in the appliance, which not all builds of the libguestfs "
4069 "appliance will be able to provide."
4073 #: ../src/guestfs-actions.pod:350
4075 "The libguestfs groups, and the functions that those groups correspond to, "
4076 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
4077 "runtime by calling C<guestfs_available_all_groups>."
4081 #: ../src/guestfs-actions.pod:355 ../fish/guestfish-actions.pod:283
4083 "The argument C<groups> is a list of group names, eg: C<[\"inotify\", "
4084 "\"augeas\"]> would check for the availability of the Linux inotify functions "
4085 "and Augeas (configuration file editing) functions."
4089 #: ../src/guestfs-actions.pod:360 ../fish/guestfish-actions.pod:288
4090 msgid "The command returns no error if I<all> requested groups are available."
4094 #: ../src/guestfs-actions.pod:362 ../fish/guestfish-actions.pod:290
4096 "It fails with an error if one or more of the requested groups is unavailable "
4101 #: ../src/guestfs-actions.pod:365 ../fish/guestfish-actions.pod:293
4103 "If an unknown group name is included in the list of groups then an error is "
4108 #: ../src/guestfs-actions.pod:368 ../fish/guestfish-actions.pod:296
4113 #: ../src/guestfs-actions.pod:374
4114 msgid "You must call C<guestfs_launch> before calling this function."
4118 #: ../src/guestfs-actions.pod:376 ../fish/guestfish-actions.pod:304
4120 "The reason is because we don't know what groups are supported by the "
4121 "appliance/daemon until it is running and can be queried."
4125 #: ../src/guestfs-actions.pod:382 ../fish/guestfish-actions.pod:310
4127 "If a group of functions is available, this does not necessarily mean that "
4128 "they will work. You still have to check for errors when calling individual "
4129 "API functions even if they are available."
4133 #: ../src/guestfs-actions.pod:389 ../fish/guestfish-actions.pod:317
4135 "It is usually the job of distro packagers to build complete functionality "
4136 "into the libguestfs appliance. Upstream libguestfs, if built from source "
4137 "with all requirements satisfied, will support everything."
4141 #: ../src/guestfs-actions.pod:396
4143 "This call was added in version C<1.0.80>. In previous versions of "
4144 "libguestfs all you could do would be to speculatively execute a command to "
4145 "find out if the daemon implemented it. See also C<guestfs_version>."
4149 #: ../src/guestfs-actions.pod:405
4150 msgid "guestfs_available_all_groups"
4154 #: ../src/guestfs-actions.pod:407
4157 " char **guestfs_available_all_groups (guestfs_h *g);\n"
4162 #: ../src/guestfs-actions.pod:409
4164 "This command returns a list of all optional groups that this daemon knows "
4165 "about. Note this returns both supported and unsupported groups. To find "
4166 "out which ones the daemon can actually support you have to call "
4167 "C<guestfs_available> on each member of the returned list."
4171 #: ../src/guestfs-actions.pod:415
4172 msgid "See also C<guestfs_available> and L<guestfs(3)/AVAILABILITY>."
4176 #: ../src/guestfs-actions.pod:421
4177 msgid "guestfs_base64_in"
4181 #: ../src/guestfs-actions.pod:423
4184 " int guestfs_base64_in (guestfs_h *g,\n"
4185 "\t\tconst char *base64file,\n"
4186 "\t\tconst char *filename);\n"
4191 #: ../src/guestfs-actions.pod:427 ../fish/guestfish-actions.pod:347
4192 msgid "This command uploads base64-encoded data from C<base64file> to C<filename>."
4196 #: ../src/guestfs-actions.pod:432
4197 msgid "guestfs_base64_out"
4201 #: ../src/guestfs-actions.pod:434
4204 " int guestfs_base64_out (guestfs_h *g,\n"
4205 "\t\tconst char *filename,\n"
4206 "\t\tconst char *base64file);\n"
4211 #: ../src/guestfs-actions.pod:438 ../fish/guestfish-actions.pod:356
4213 "This command downloads the contents of C<filename>, writing it out to local "
4214 "file C<base64file> encoded as base64."
4218 #: ../src/guestfs-actions.pod:443
4219 msgid "guestfs_blockdev_flushbufs"
4223 #: ../src/guestfs-actions.pod:445
4226 " int guestfs_blockdev_flushbufs (guestfs_h *g,\n"
4227 "\t\tconst char *device);\n"
4232 #: ../src/guestfs-actions.pod:448 ../fish/guestfish-actions.pod:365
4233 msgid "This tells the kernel to flush internal buffers associated with C<device>."
4237 #: ../src/guestfs-actions.pod:451 ../src/guestfs-actions.pod:465 ../src/guestfs-actions.pod:477 ../src/guestfs-actions.pod:490 ../src/guestfs-actions.pod:505 ../src/guestfs-actions.pod:521 ../src/guestfs-actions.pod:532 ../src/guestfs-actions.pod:547 ../src/guestfs-actions.pod:558 ../src/guestfs-actions.pod:569 ../fish/guestfish-actions.pod:368 ../fish/guestfish-actions.pod:379 ../fish/guestfish-actions.pod:388 ../fish/guestfish-actions.pod:398 ../fish/guestfish-actions.pod:410 ../fish/guestfish-actions.pod:423 ../fish/guestfish-actions.pod:431 ../fish/guestfish-actions.pod:442 ../fish/guestfish-actions.pod:450 ../fish/guestfish-actions.pod:458
4238 msgid "This uses the L<blockdev(8)> command."
4242 #: ../src/guestfs-actions.pod:455
4243 msgid "guestfs_blockdev_getbsz"
4247 #: ../src/guestfs-actions.pod:457
4250 " int guestfs_blockdev_getbsz (guestfs_h *g,\n"
4251 "\t\tconst char *device);\n"
4256 #: ../src/guestfs-actions.pod:460 ../fish/guestfish-actions.pod:374
4257 msgid "This returns the block size of a device."
4261 #: ../src/guestfs-actions.pod:462 ../src/guestfs-actions.pod:544 ../fish/guestfish-actions.pod:376 ../fish/guestfish-actions.pod:439
4263 "(Note this is different from both I<size in blocks> and I<filesystem block "
4268 #: ../src/guestfs-actions.pod:469
4269 msgid "guestfs_blockdev_getro"
4273 #: ../src/guestfs-actions.pod:471
4276 " int guestfs_blockdev_getro (guestfs_h *g,\n"
4277 "\t\tconst char *device);\n"
4282 #: ../src/guestfs-actions.pod:474 ../fish/guestfish-actions.pod:385
4284 "Returns a boolean indicating if the block device is read-only (true if "
4285 "read-only, false if not)."
4289 #: ../src/guestfs-actions.pod:479 ../src/guestfs-actions.pod:1087 ../src/guestfs-actions.pod:1099 ../src/guestfs-actions.pod:1531 ../src/guestfs-actions.pod:1539 ../src/guestfs-actions.pod:1599 ../src/guestfs-actions.pod:1642 ../src/guestfs-actions.pod:1654 ../src/guestfs-actions.pod:1673 ../src/guestfs-actions.pod:1690 ../src/guestfs-actions.pod:2272 ../src/guestfs-actions.pod:2283 ../src/guestfs-actions.pod:2296 ../src/guestfs-actions.pod:2309 ../src/guestfs-actions.pod:2320 ../src/guestfs-actions.pod:2330 ../src/guestfs-actions.pod:2341 ../src/guestfs-actions.pod:3462
4290 msgid "This function returns a C truth value on success or -1 on error."
4294 #: ../src/guestfs-actions.pod:481
4295 msgid "guestfs_blockdev_getsize64"
4299 #: ../src/guestfs-actions.pod:483
4302 " int64_t guestfs_blockdev_getsize64 (guestfs_h *g,\n"
4303 "\t\tconst char *device);\n"
4308 #: ../src/guestfs-actions.pod:486 ../fish/guestfish-actions.pod:394
4309 msgid "This returns the size of the device in bytes."
4313 #: ../src/guestfs-actions.pod:488
4314 msgid "See also C<guestfs_blockdev_getsz>."
4318 #: ../src/guestfs-actions.pod:494
4319 msgid "guestfs_blockdev_getss"
4323 #: ../src/guestfs-actions.pod:496
4326 " int guestfs_blockdev_getss (guestfs_h *g,\n"
4327 "\t\tconst char *device);\n"
4332 #: ../src/guestfs-actions.pod:499 ../fish/guestfish-actions.pod:404
4334 "This returns the size of sectors on a block device. Usually 512, but can be "
4335 "larger for modern devices."
4339 #: ../src/guestfs-actions.pod:502
4341 "(Note, this is not the size in sectors, use C<guestfs_blockdev_getsz> for "
4346 #: ../src/guestfs-actions.pod:509
4347 msgid "guestfs_blockdev_getsz"
4351 #: ../src/guestfs-actions.pod:511
4354 " int64_t guestfs_blockdev_getsz (guestfs_h *g,\n"
4355 "\t\tconst char *device);\n"
4360 #: ../src/guestfs-actions.pod:514 ../fish/guestfish-actions.pod:416
4362 "This returns the size of the device in units of 512-byte sectors (even if "
4363 "the sectorsize isn't 512 bytes ... weird)."
4367 #: ../src/guestfs-actions.pod:517
4369 "See also C<guestfs_blockdev_getss> for the real sector size of the device, "
4370 "and C<guestfs_blockdev_getsize64> for the more useful I<size in bytes>."
4374 #: ../src/guestfs-actions.pod:525
4375 msgid "guestfs_blockdev_rereadpt"
4379 #: ../src/guestfs-actions.pod:527
4382 " int guestfs_blockdev_rereadpt (guestfs_h *g,\n"
4383 "\t\tconst char *device);\n"
4388 #: ../src/guestfs-actions.pod:530 ../fish/guestfish-actions.pod:429
4389 msgid "Reread the partition table on C<device>."
4393 #: ../src/guestfs-actions.pod:536
4394 msgid "guestfs_blockdev_setbsz"
4398 #: ../src/guestfs-actions.pod:538
4401 " int guestfs_blockdev_setbsz (guestfs_h *g,\n"
4402 "\t\tconst char *device,\n"
4403 "\t\tint blocksize);\n"
4408 #: ../src/guestfs-actions.pod:542 ../fish/guestfish-actions.pod:437
4409 msgid "This sets the block size of a device."
4413 #: ../src/guestfs-actions.pod:551
4414 msgid "guestfs_blockdev_setro"
4418 #: ../src/guestfs-actions.pod:553
4421 " int guestfs_blockdev_setro (guestfs_h *g,\n"
4422 "\t\tconst char *device);\n"
4427 #: ../src/guestfs-actions.pod:556 ../fish/guestfish-actions.pod:448
4428 msgid "Sets the block device named C<device> to read-only."
4432 #: ../src/guestfs-actions.pod:562
4433 msgid "guestfs_blockdev_setrw"
4437 #: ../src/guestfs-actions.pod:564
4440 " int guestfs_blockdev_setrw (guestfs_h *g,\n"
4441 "\t\tconst char *device);\n"
4446 #: ../src/guestfs-actions.pod:567 ../fish/guestfish-actions.pod:456
4447 msgid "Sets the block device named C<device> to read-write."
4451 #: ../src/guestfs-actions.pod:573
4452 msgid "guestfs_case_sensitive_path"
4456 #: ../src/guestfs-actions.pod:575
4459 " char *guestfs_case_sensitive_path (guestfs_h *g,\n"
4460 "\t\tconst char *path);\n"
4465 #: ../src/guestfs-actions.pod:578 ../fish/guestfish-actions.pod:464
4467 "This can be used to resolve case insensitive paths on a filesystem which is "
4468 "case sensitive. The use case is to resolve paths which you have read from "
4469 "Windows configuration files or the Windows Registry, to the true path."
4473 #: ../src/guestfs-actions.pod:583 ../fish/guestfish-actions.pod:469
4475 "The command handles a peculiarity of the Linux ntfs-3g filesystem driver "
4476 "(and probably others), which is that although the underlying filesystem is "
4477 "case-insensitive, the driver exports the filesystem to Linux as "
4482 #: ../src/guestfs-actions.pod:588 ../fish/guestfish-actions.pod:474
4484 "One consequence of this is that special directories such as C<c:\\windows> "
4485 "may appear as C</WINDOWS> or C</windows> (or other things) depending on the "
4486 "precise details of how they were created. In Windows itself this would not "
4491 #: ../src/guestfs-actions.pod:594 ../fish/guestfish-actions.pod:480
4493 "Bug or feature? You decide: "
4494 "L<http://www.tuxera.com/community/ntfs-3g-faq/#posixfilenames1>"
4498 #: ../src/guestfs-actions.pod:597 ../fish/guestfish-actions.pod:483
4500 "This function resolves the true case of each element in the path and returns "
4501 "the case-sensitive path."
4505 #: ../src/guestfs-actions.pod:600
4507 "Thus C<guestfs_case_sensitive_path> (\"/Windows/System32\") might return "
4508 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
4509 "how the directories were originally created under Windows)."
4513 #: ../src/guestfs-actions.pod:605 ../fish/guestfish-actions.pod:491
4514 msgid "I<Note>: This function does not handle drive names, backslashes etc."
4518 #: ../src/guestfs-actions.pod:608
4519 msgid "See also C<guestfs_realpath>."
4523 #: ../src/guestfs-actions.pod:613
4528 #: ../src/guestfs-actions.pod:615
4531 " char *guestfs_cat (guestfs_h *g,\n"
4532 "\t\tconst char *path);\n"
4537 #: ../src/guestfs-actions.pod:618 ../src/guestfs-actions.pod:3824 ../fish/guestfish-actions.pod:500 ../fish/guestfish-actions.pod:2944
4538 msgid "Return the contents of the file named C<path>."
4542 #: ../src/guestfs-actions.pod:620
4544 "Note that this function cannot correctly handle binary files (specifically, "
4545 "files containing C<\\0> character which is treated as end of string). For "
4546 "those you need to use the C<guestfs_read_file> or C<guestfs_download> "
4547 "functions which have a more complex interface."
4551 #: ../src/guestfs-actions.pod:628 ../src/guestfs-actions.pod:789 ../src/guestfs-actions.pod:806 ../src/guestfs-actions.pod:1057 ../src/guestfs-actions.pod:1073 ../src/guestfs-actions.pod:1161 ../src/guestfs-actions.pod:1177 ../src/guestfs-actions.pod:1408 ../src/guestfs-actions.pod:1755 ../src/guestfs-actions.pod:1771 ../src/guestfs-actions.pod:1808 ../src/guestfs-actions.pod:1829 ../src/guestfs-actions.pod:1843 ../src/guestfs-actions.pod:1869 ../src/guestfs-actions.pod:3687 ../src/guestfs-actions.pod:3795 ../src/guestfs-actions.pod:3816 ../src/guestfs-actions.pod:4542 ../src/guestfs-actions.pod:4594 ../src/guestfs-actions.pod:4710 ../src/guestfs-actions.pod:4731 ../src/guestfs-actions.pod:5250 ../src/guestfs-actions.pod:5273 ../src/guestfs-actions.pod:5296 ../src/guestfs-actions.pod:5312 ../src/guestfs-actions.pod:5385 ../src/guestfs-actions.pod:5401 ../src/guestfs-actions.pod:5441 ../src/guestfs-actions.pod:5457 ../fish/guestfish-actions.pod:507 ../fish/guestfish-actions.pod:642 ../fish/guestfish-actions.pod:654 ../fish/guestfish-actions.pod:836 ../fish/guestfish-actions.pod:846 ../fish/guestfish-actions.pod:913 ../fish/guestfish-actions.pod:923 ../fish/guestfish-actions.pod:1118 ../fish/guestfish-actions.pod:1391 ../fish/guestfish-actions.pod:1401 ../fish/guestfish-actions.pod:1429 ../fish/guestfish-actions.pod:1444 ../fish/guestfish-actions.pod:1454 ../fish/guestfish-actions.pod:1473 ../fish/guestfish-actions.pod:2846 ../fish/guestfish-actions.pod:2922 ../fish/guestfish-actions.pod:2937 ../fish/guestfish-actions.pod:3498 ../fish/guestfish-actions.pod:3544 ../fish/guestfish-actions.pod:3629 ../fish/guestfish-actions.pod:3644 ../fish/guestfish-actions.pod:4027 ../fish/guestfish-actions.pod:4045 ../fish/guestfish-actions.pod:4062 ../fish/guestfish-actions.pod:4072 ../fish/guestfish-actions.pod:4120 ../fish/guestfish-actions.pod:4130 ../fish/guestfish-actions.pod:4159 ../fish/guestfish-actions.pod:4169
4553 "Because of the message protocol, there is a transfer limit of somewhere "
4554 "between 2MB and 4MB. See L<guestfs(3)/PROTOCOL LIMITS>."
4558 #: ../src/guestfs-actions.pod:631
4559 msgid "guestfs_checksum"
4563 #: ../src/guestfs-actions.pod:633
4566 " char *guestfs_checksum (guestfs_h *g,\n"
4567 "\t\tconst char *csumtype,\n"
4568 "\t\tconst char *path);\n"
4573 #: ../src/guestfs-actions.pod:637 ../fish/guestfish-actions.pod:514
4574 msgid "This call computes the MD5, SHAx or CRC checksum of the file named C<path>."
4578 #: ../src/guestfs-actions.pod:640 ../fish/guestfish-actions.pod:517
4580 "The type of checksum to compute is given by the C<csumtype> parameter which "
4581 "must have one of the following values:"
4585 #: ../src/guestfs-actions.pod:645 ../fish/guestfish-actions.pod:522
4590 #: ../src/guestfs-actions.pod:647 ../fish/guestfish-actions.pod:524
4592 "Compute the cyclic redundancy check (CRC) specified by POSIX for the "
4597 #: ../src/guestfs-actions.pod:650 ../fish/guestfish-actions.pod:527
4602 #: ../src/guestfs-actions.pod:652 ../fish/guestfish-actions.pod:529
4603 msgid "Compute the MD5 hash (using the C<md5sum> program)."
4607 #: ../src/guestfs-actions.pod:654 ../fish/guestfish-actions.pod:531
4612 #: ../src/guestfs-actions.pod:656 ../fish/guestfish-actions.pod:533
4613 msgid "Compute the SHA1 hash (using the C<sha1sum> program)."
4617 #: ../src/guestfs-actions.pod:658 ../fish/guestfish-actions.pod:535
4622 #: ../src/guestfs-actions.pod:660 ../fish/guestfish-actions.pod:537
4623 msgid "Compute the SHA224 hash (using the C<sha224sum> program)."
4627 #: ../src/guestfs-actions.pod:662 ../fish/guestfish-actions.pod:539
4632 #: ../src/guestfs-actions.pod:664 ../fish/guestfish-actions.pod:541
4633 msgid "Compute the SHA256 hash (using the C<sha256sum> program)."
4637 #: ../src/guestfs-actions.pod:666 ../fish/guestfish-actions.pod:543
4642 #: ../src/guestfs-actions.pod:668 ../fish/guestfish-actions.pod:545
4643 msgid "Compute the SHA384 hash (using the C<sha384sum> program)."
4647 #: ../src/guestfs-actions.pod:670 ../fish/guestfish-actions.pod:547
4652 #: ../src/guestfs-actions.pod:672 ../fish/guestfish-actions.pod:549
4653 msgid "Compute the SHA512 hash (using the C<sha512sum> program)."
4657 #: ../src/guestfs-actions.pod:676 ../fish/guestfish-actions.pod:553
4658 msgid "The checksum is returned as a printable string."
4662 #: ../src/guestfs-actions.pod:678
4663 msgid "To get the checksum for a device, use C<guestfs_checksum_device>."
4667 #: ../src/guestfs-actions.pod:680
4668 msgid "To get the checksums for many files, use C<guestfs_checksums_out>."
4672 #: ../src/guestfs-actions.pod:685
4673 msgid "guestfs_checksum_device"
4677 #: ../src/guestfs-actions.pod:687
4680 " char *guestfs_checksum_device (guestfs_h *g,\n"
4681 "\t\tconst char *csumtype,\n"
4682 "\t\tconst char *device);\n"
4687 #: ../src/guestfs-actions.pod:691
4689 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
4690 "device named C<device>. For the types of checksums supported see the "
4691 "C<guestfs_checksum> command."
4695 #: ../src/guestfs-actions.pod:698
4696 msgid "guestfs_checksums_out"
4700 #: ../src/guestfs-actions.pod:700
4703 " int guestfs_checksums_out (guestfs_h *g,\n"
4704 "\t\tconst char *csumtype,\n"
4705 "\t\tconst char *directory,\n"
4706 "\t\tconst char *sumsfile);\n"
4711 #: ../src/guestfs-actions.pod:705 ../fish/guestfish-actions.pod:571
4713 "This command computes the checksums of all regular files in C<directory> and "
4714 "then emits a list of those checksums to the local output file C<sumsfile>."
4718 #: ../src/guestfs-actions.pod:709 ../fish/guestfish-actions.pod:575
4720 "This can be used for verifying the integrity of a virtual machine. However "
4721 "to be properly secure you should pay attention to the output of the checksum "
4722 "command (it uses the ones from GNU coreutils). In particular when the "
4723 "filename is not printable, coreutils uses a special backslash syntax. For "
4724 "more information, see the GNU coreutils info file."
4728 #: ../src/guestfs-actions.pod:719
4729 msgid "guestfs_chmod"
4733 #: ../src/guestfs-actions.pod:721
4736 " int guestfs_chmod (guestfs_h *g,\n"
4738 "\t\tconst char *path);\n"
4743 #: ../src/guestfs-actions.pod:725 ../fish/guestfish-actions.pod:589
4745 "Change the mode (permissions) of C<path> to C<mode>. Only numeric modes are "
4750 #: ../src/guestfs-actions.pod:728 ../fish/guestfish-actions.pod:592
4752 "I<Note>: When using this command from guestfish, C<mode> by default would be "
4753 "decimal, unless you prefix it with C<0> to get octal, ie. use C<0700> not "
4758 #: ../src/guestfs-actions.pod:732 ../src/guestfs-actions.pod:3045 ../src/guestfs-actions.pod:3133 ../src/guestfs-actions.pod:3149 ../src/guestfs-actions.pod:3165 ../fish/guestfish-actions.pod:596 ../fish/guestfish-actions.pod:2362 ../fish/guestfish-actions.pod:2432 ../fish/guestfish-actions.pod:2442 ../fish/guestfish-actions.pod:2452
4759 msgid "The mode actually set is affected by the umask."
4763 #: ../src/guestfs-actions.pod:736
4764 msgid "guestfs_chown"
4768 #: ../src/guestfs-actions.pod:738
4771 " int guestfs_chown (guestfs_h *g,\n"
4774 "\t\tconst char *path);\n"
4779 #: ../src/guestfs-actions.pod:743 ../fish/guestfish-actions.pod:602
4780 msgid "Change the file owner to C<owner> and group to C<group>."
4784 #: ../src/guestfs-actions.pod:745 ../src/guestfs-actions.pod:2374 ../fish/guestfish-actions.pod:604 ../fish/guestfish-actions.pod:1890
4786 "Only numeric uid and gid are supported. If you want to use names, you will "
4787 "need to locate and parse the password file yourself (Augeas support makes "
4788 "this relatively easy)."
4792 #: ../src/guestfs-actions.pod:751
4793 msgid "guestfs_command"
4797 #: ../src/guestfs-actions.pod:753
4800 " char *guestfs_command (guestfs_h *g,\n"
4801 "\t\tchar *const *arguments);\n"
4806 #: ../src/guestfs-actions.pod:756 ../fish/guestfish-actions.pod:612
4808 "This call runs a command from the guest filesystem. The filesystem must be "
4809 "mounted, and must contain a compatible operating system (ie. something "
4810 "Linux, with the same or compatible processor architecture)."
4814 #: ../src/guestfs-actions.pod:761
4816 "The single parameter is an argv-style list of arguments. The first element "
4817 "is the name of the program to run. Subsequent elements are parameters. The "
4818 "list must be non-empty (ie. must contain a program name). Note that the "
4819 "command runs directly, and is I<not> invoked via the shell (see "
4824 #: ../src/guestfs-actions.pod:768 ../fish/guestfish-actions.pod:624
4825 msgid "The return value is anything printed to I<stdout> by the command."
4829 #: ../src/guestfs-actions.pod:771 ../fish/guestfish-actions.pod:627
4831 "If the command returns a non-zero exit status, then this function returns an "
4832 "error message. The error message string is the content of I<stderr> from "
4837 #: ../src/guestfs-actions.pod:775 ../fish/guestfish-actions.pod:631
4839 "The C<$PATH> environment variable will contain at least C</usr/bin> and "
4840 "C</bin>. If you require a program from another location, you should provide "
4841 "the full path in the first parameter."
4845 #: ../src/guestfs-actions.pod:780 ../fish/guestfish-actions.pod:636
4847 "Shared libraries and data files required by the program must be available on "
4848 "filesystems which are mounted in the correct places. It is the caller's "
4849 "responsibility to ensure all filesystems that are needed are mounted at the "
4854 #: ../src/guestfs-actions.pod:792
4855 msgid "guestfs_command_lines"
4859 #: ../src/guestfs-actions.pod:794
4862 " char **guestfs_command_lines (guestfs_h *g,\n"
4863 "\t\tchar *const *arguments);\n"
4868 #: ../src/guestfs-actions.pod:797
4870 "This is the same as C<guestfs_command>, but splits the result into a list of "
4875 #: ../src/guestfs-actions.pod:800
4876 msgid "See also: C<guestfs_sh_lines>"
4880 #: ../src/guestfs-actions.pod:809
4881 msgid "guestfs_config"
4885 #: ../src/guestfs-actions.pod:811
4888 " int guestfs_config (guestfs_h *g,\n"
4889 "\t\tconst char *qemuparam,\n"
4890 "\t\tconst char *qemuvalue);\n"
4895 #: ../src/guestfs-actions.pod:815 ../fish/guestfish-actions.pod:661
4897 "This can be used to add arbitrary qemu command line parameters of the form "
4898 "C<-param value>. Actually it's not quite arbitrary - we prevent you from "
4899 "setting some parameters which would interfere with parameters that we use."
4903 #: ../src/guestfs-actions.pod:820 ../fish/guestfish-actions.pod:666
4904 msgid "The first character of C<param> string must be a C<-> (dash)."
4908 #: ../src/guestfs-actions.pod:822 ../fish/guestfish-actions.pod:668
4909 msgid "C<value> can be NULL."
4913 #: ../src/guestfs-actions.pod:826
4914 msgid "guestfs_copy_size"
4918 #: ../src/guestfs-actions.pod:828
4921 " int guestfs_copy_size (guestfs_h *g,\n"
4922 "\t\tconst char *src,\n"
4923 "\t\tconst char *dest,\n"
4924 "\t\tint64_t size);\n"
4929 #: ../src/guestfs-actions.pod:833 ../fish/guestfish-actions.pod:674
4931 "This command copies exactly C<size> bytes from one source device or file "
4932 "C<src> to another destination device or file C<dest>."
4936 #: ../src/guestfs-actions.pod:836 ../fish/guestfish-actions.pod:677
4938 "Note this will fail if the source is too short or if the destination is not "
4943 #: ../src/guestfs-actions.pod:841 ../src/guestfs-actions.pod:976 ../src/guestfs-actions.pod:1348 ../src/guestfs-actions.pod:1367 ../src/guestfs-actions.pod:5330 ../src/guestfs-actions.pod:5346
4945 "This long-running command can generate progress notification messages so "
4946 "that the caller can display a progress bar or indicator. To receive these "
4947 "messages, the caller must register a progress callback. See "
4948 "L<guestfs(3)/guestfs_set_progress_callback>."
4952 #: ../src/guestfs-actions.pod:846
4957 #: ../src/guestfs-actions.pod:848
4960 " int guestfs_cp (guestfs_h *g,\n"
4961 "\t\tconst char *src,\n"
4962 "\t\tconst char *dest);\n"
4967 #: ../src/guestfs-actions.pod:852 ../fish/guestfish-actions.pod:684
4969 "This copies a file from C<src> to C<dest> where C<dest> is either a "
4970 "destination filename or destination directory."
4974 #: ../src/guestfs-actions.pod:857
4975 msgid "guestfs_cp_a"
4979 #: ../src/guestfs-actions.pod:859
4982 " int guestfs_cp_a (guestfs_h *g,\n"
4983 "\t\tconst char *src,\n"
4984 "\t\tconst char *dest);\n"
4989 #: ../src/guestfs-actions.pod:863 ../fish/guestfish-actions.pod:691
4991 "This copies a file or directory from C<src> to C<dest> recursively using the "
4996 #: ../src/guestfs-actions.pod:868
5001 #: ../src/guestfs-actions.pod:870
5004 " int guestfs_dd (guestfs_h *g,\n"
5005 "\t\tconst char *src,\n"
5006 "\t\tconst char *dest);\n"
5011 #: ../src/guestfs-actions.pod:874 ../fish/guestfish-actions.pod:698
5013 "This command copies from one source device or file C<src> to another "
5014 "destination device or file C<dest>. Normally you would use this to copy to "
5015 "or from a device or partition, for example to duplicate a filesystem."
5019 #: ../src/guestfs-actions.pod:879
5021 "If the destination is a device, it must be as large or larger than the "
5022 "source file or device, otherwise the copy will fail. This command cannot do "
5023 "partial copies (see C<guestfs_copy_size>)."
5027 #: ../src/guestfs-actions.pod:885
5028 msgid "guestfs_debug"
5032 #: ../src/guestfs-actions.pod:887
5035 " char *guestfs_debug (guestfs_h *g,\n"
5036 "\t\tconst char *subcmd,\n"
5037 "\t\tchar *const *extraargs);\n"
5042 #: ../src/guestfs-actions.pod:891
5044 "The C<guestfs_debug> command exposes some internals of C<guestfsd> (the "
5045 "guestfs daemon) that runs inside the qemu subprocess."
5049 #: ../src/guestfs-actions.pod:895 ../fish/guestfish-actions.pod:715
5051 "There is no comprehensive help for this command. You have to look at the "
5052 "file C<daemon/debug.c> in the libguestfs source to find out what you can do."
5056 #: ../src/guestfs-actions.pod:902
5057 msgid "guestfs_debug_upload"
5061 #: ../src/guestfs-actions.pod:904
5064 " int guestfs_debug_upload (guestfs_h *g,\n"
5065 "\t\tconst char *filename,\n"
5066 "\t\tconst char *tmpname,\n"
5072 #: ../src/guestfs-actions.pod:909
5074 "The C<guestfs_debug_upload> command uploads a file to the libguestfs "
5079 #: ../src/guestfs-actions.pod:912 ../fish/guestfish-actions.pod:726
5081 "There is no comprehensive help for this command. You have to look at the "
5082 "file C<daemon/debug.c> in the libguestfs source to find out what it is for."
5086 #: ../src/guestfs-actions.pod:918
5091 #: ../src/guestfs-actions.pod:920
5094 " char *guestfs_df (guestfs_h *g);\n"
5099 #: ../src/guestfs-actions.pod:922 ../fish/guestfish-actions.pod:736
5100 msgid "This command runs the C<df> command to report disk space used."
5104 #: ../src/guestfs-actions.pod:924 ../src/guestfs-actions.pod:938 ../fish/guestfish-actions.pod:738 ../fish/guestfish-actions.pod:749
5106 "This command is mostly useful for interactive sessions. It is I<not> "
5107 "intended that you try to parse the output string. Use C<statvfs> from "
5112 #: ../src/guestfs-actions.pod:931
5113 msgid "guestfs_df_h"
5117 #: ../src/guestfs-actions.pod:933
5120 " char *guestfs_df_h (guestfs_h *g);\n"
5125 #: ../src/guestfs-actions.pod:935 ../fish/guestfish-actions.pod:746
5127 "This command runs the C<df -h> command to report disk space used in "
5128 "human-readable format."
5132 #: ../src/guestfs-actions.pod:945
5133 msgid "guestfs_dmesg"
5137 #: ../src/guestfs-actions.pod:947
5140 " char *guestfs_dmesg (guestfs_h *g);\n"
5145 #: ../src/guestfs-actions.pod:949 ../fish/guestfish-actions.pod:757
5147 "This returns the kernel messages (C<dmesg> output) from the guest kernel. "
5148 "This is sometimes useful for extended debugging of problems."
5152 #: ../src/guestfs-actions.pod:953
5154 "Another way to get the same information is to enable verbose messages with "
5155 "C<guestfs_set_verbose> or by setting the environment variable "
5156 "C<LIBGUESTFS_DEBUG=1> before running the program."
5160 #: ../src/guestfs-actions.pod:961
5161 msgid "guestfs_download"
5165 #: ../src/guestfs-actions.pod:963
5168 " int guestfs_download (guestfs_h *g,\n"
5169 "\t\tconst char *remotefilename,\n"
5170 "\t\tconst char *filename);\n"
5175 #: ../src/guestfs-actions.pod:967 ../fish/guestfish-actions.pod:770
5177 "Download file C<remotefilename> and save it as C<filename> on the local "
5182 #: ../src/guestfs-actions.pod:970 ../src/guestfs-actions.pod:4924 ../fish/guestfish-actions.pod:773 ../fish/guestfish-actions.pod:3798
5183 msgid "C<filename> can also be a named pipe."
5187 #: ../src/guestfs-actions.pod:972
5188 msgid "See also C<guestfs_upload>, C<guestfs_cat>."
5192 #: ../src/guestfs-actions.pod:981
5193 msgid "guestfs_drop_caches"
5197 #: ../src/guestfs-actions.pod:983
5200 " int guestfs_drop_caches (guestfs_h *g,\n"
5201 "\t\tint whattodrop);\n"
5206 #: ../src/guestfs-actions.pod:986 ../fish/guestfish-actions.pod:783
5208 "This instructs the guest kernel to drop its page cache, and/or dentries and "
5209 "inode caches. The parameter C<whattodrop> tells the kernel what precisely "
5210 "to drop, see L<http://linux-mm.org/Drop_Caches>"
5214 #: ../src/guestfs-actions.pod:991 ../fish/guestfish-actions.pod:788
5215 msgid "Setting C<whattodrop> to 3 should drop everything."
5219 #: ../src/guestfs-actions.pod:993 ../fish/guestfish-actions.pod:790
5221 "This automatically calls L<sync(2)> before the operation, so that the "
5222 "maximum guest memory is freed."
5226 #: ../src/guestfs-actions.pod:998
5231 #: ../src/guestfs-actions.pod:1000
5234 " int64_t guestfs_du (guestfs_h *g,\n"
5235 "\t\tconst char *path);\n"
5240 #: ../src/guestfs-actions.pod:1003 ../fish/guestfish-actions.pod:797
5242 "This command runs the C<du -s> command to estimate file space usage for "
5247 #: ../src/guestfs-actions.pod:1006 ../fish/guestfish-actions.pod:800
5249 "C<path> can be a file or a directory. If C<path> is a directory then the "
5250 "estimate includes the contents of the directory and all subdirectories "
5255 #: ../src/guestfs-actions.pod:1010 ../fish/guestfish-actions.pod:804
5256 msgid "The result is the estimated size in I<kilobytes> (ie. units of 1024 bytes)."
5260 #: ../src/guestfs-actions.pod:1015
5261 msgid "guestfs_e2fsck_f"
5265 #: ../src/guestfs-actions.pod:1017
5268 " int guestfs_e2fsck_f (guestfs_h *g,\n"
5269 "\t\tconst char *device);\n"
5274 #: ../src/guestfs-actions.pod:1020 ../fish/guestfish-actions.pod:811
5276 "This runs C<e2fsck -p -f device>, ie. runs the ext2/ext3 filesystem checker "
5277 "on C<device>, noninteractively (C<-p>), even if the filesystem appears to be "
5282 #: ../src/guestfs-actions.pod:1024
5284 "This command is only needed because of C<guestfs_resize2fs> (q.v.). "
5285 "Normally you should use C<guestfs_fsck>."
5289 #: ../src/guestfs-actions.pod:1029
5290 msgid "guestfs_echo_daemon"
5294 #: ../src/guestfs-actions.pod:1031
5297 " char *guestfs_echo_daemon (guestfs_h *g,\n"
5298 "\t\tchar *const *words);\n"
5303 #: ../src/guestfs-actions.pod:1034 ../fish/guestfish-actions.pod:822
5305 "This command concatenates the list of C<words> passed with single spaces "
5306 "between them and returns the resulting string."
5310 #: ../src/guestfs-actions.pod:1037 ../fish/guestfish-actions.pod:825
5311 msgid "You can use this command to test the connection through to the daemon."
5315 #: ../src/guestfs-actions.pod:1039
5316 msgid "See also C<guestfs_ping_daemon>."
5320 #: ../src/guestfs-actions.pod:1044
5321 msgid "guestfs_egrep"
5325 #: ../src/guestfs-actions.pod:1046
5328 " char **guestfs_egrep (guestfs_h *g,\n"
5329 "\t\tconst char *regex,\n"
5330 "\t\tconst char *path);\n"
5335 #: ../src/guestfs-actions.pod:1050 ../fish/guestfish-actions.pod:833
5336 msgid "This calls the external C<egrep> program and returns the matching lines."
5340 #: ../src/guestfs-actions.pod:1060
5341 msgid "guestfs_egrepi"
5345 #: ../src/guestfs-actions.pod:1062
5348 " char **guestfs_egrepi (guestfs_h *g,\n"
5349 "\t\tconst char *regex,\n"
5350 "\t\tconst char *path);\n"
5355 #: ../src/guestfs-actions.pod:1066 ../fish/guestfish-actions.pod:843
5356 msgid "This calls the external C<egrep -i> program and returns the matching lines."
5360 #: ../src/guestfs-actions.pod:1076
5361 msgid "guestfs_equal"
5365 #: ../src/guestfs-actions.pod:1078
5368 " int guestfs_equal (guestfs_h *g,\n"
5369 "\t\tconst char *file1,\n"
5370 "\t\tconst char *file2);\n"
5375 #: ../src/guestfs-actions.pod:1082 ../fish/guestfish-actions.pod:853
5377 "This compares the two files C<file1> and C<file2> and returns true if their "
5378 "content is exactly equal, or false otherwise."
5382 #: ../src/guestfs-actions.pod:1085 ../fish/guestfish-actions.pod:856
5383 msgid "The external L<cmp(1)> program is used for the comparison."
5387 #: ../src/guestfs-actions.pod:1089
5388 msgid "guestfs_exists"
5392 #: ../src/guestfs-actions.pod:1091
5395 " int guestfs_exists (guestfs_h *g,\n"
5396 "\t\tconst char *path);\n"
5401 #: ../src/guestfs-actions.pod:1094 ../fish/guestfish-actions.pod:862
5403 "This returns C<true> if and only if there is a file, directory (or anything) "
5404 "with the given C<path> name."
5408 #: ../src/guestfs-actions.pod:1097
5409 msgid "See also C<guestfs_is_file>, C<guestfs_is_dir>, C<guestfs_stat>."
5413 #: ../src/guestfs-actions.pod:1101
5414 msgid "guestfs_fallocate"
5418 #: ../src/guestfs-actions.pod:1103
5421 " int guestfs_fallocate (guestfs_h *g,\n"
5422 "\t\tconst char *path,\n"
5428 #: ../src/guestfs-actions.pod:1107 ../src/guestfs-actions.pod:1130 ../fish/guestfish-actions.pod:871 ../fish/guestfish-actions.pod:890
5430 "This command preallocates a file (containing zero bytes) named C<path> of "
5431 "size C<len> bytes. If the file exists already, it is overwritten."
5435 #: ../src/guestfs-actions.pod:1111 ../fish/guestfish-actions.pod:875
5437 "Do not confuse this with the guestfish-specific C<alloc> command which "
5438 "allocates a file in the host and attaches it as a device."
5442 #: ../src/guestfs-actions.pod:1117 ../fish/guestfish-actions.pod:879
5444 "This function is deprecated. In new code, use the C<fallocate64> call "
5449 #: ../src/guestfs-actions.pod:1120 ../src/guestfs-actions.pod:1555 ../src/guestfs-actions.pod:1573 ../src/guestfs-actions.pod:5279 ../src/guestfs-actions.pod:5424 ../fish/guestfish-actions.pod:882 ../fish/guestfish-actions.pod:1239 ../fish/guestfish-actions.pod:1253 ../fish/guestfish-actions.pod:4051 ../fish/guestfish-actions.pod:4148
5451 "Deprecated functions will not be removed from the API, but the fact that "
5452 "they are deprecated indicates that there are problems with correct use of "
5457 #: ../src/guestfs-actions.pod:1124
5458 msgid "guestfs_fallocate64"
5462 #: ../src/guestfs-actions.pod:1126
5465 " int guestfs_fallocate64 (guestfs_h *g,\n"
5466 "\t\tconst char *path,\n"
5467 "\t\tint64_t len);\n"
5472 #: ../src/guestfs-actions.pod:1134
5474 "Note that this call allocates disk blocks for the file. To create a sparse "
5475 "file use C<guestfs_truncate_size> instead."
5479 #: ../src/guestfs-actions.pod:1137
5481 "The deprecated call C<guestfs_fallocate> does the same, but owing to an "
5482 "oversight it only allowed 30 bit lengths to be specified, effectively "
5483 "limiting the maximum size of files created through that call to 1GB."
5487 #: ../src/guestfs-actions.pod:1142 ../fish/guestfish-actions.pod:902
5489 "Do not confuse this with the guestfish-specific C<alloc> and C<sparse> "
5490 "commands which create a file in the host and attach it as a device."
5494 #: ../src/guestfs-actions.pod:1148
5495 msgid "guestfs_fgrep"
5499 #: ../src/guestfs-actions.pod:1150
5502 " char **guestfs_fgrep (guestfs_h *g,\n"
5503 "\t\tconst char *pattern,\n"
5504 "\t\tconst char *path);\n"
5509 #: ../src/guestfs-actions.pod:1154 ../fish/guestfish-actions.pod:910
5510 msgid "This calls the external C<fgrep> program and returns the matching lines."
5514 #: ../src/guestfs-actions.pod:1164
5515 msgid "guestfs_fgrepi"
5519 #: ../src/guestfs-actions.pod:1166
5522 " char **guestfs_fgrepi (guestfs_h *g,\n"
5523 "\t\tconst char *pattern,\n"
5524 "\t\tconst char *path);\n"
5529 #: ../src/guestfs-actions.pod:1170 ../fish/guestfish-actions.pod:920
5530 msgid "This calls the external C<fgrep -i> program and returns the matching lines."
5534 #: ../src/guestfs-actions.pod:1180
5535 msgid "guestfs_file"
5539 #: ../src/guestfs-actions.pod:1182
5542 " char *guestfs_file (guestfs_h *g,\n"
5543 "\t\tconst char *path);\n"
5548 #: ../src/guestfs-actions.pod:1185 ../fish/guestfish-actions.pod:930
5550 "This call uses the standard L<file(1)> command to determine the type or "
5551 "contents of the file."
5555 #: ../src/guestfs-actions.pod:1188 ../fish/guestfish-actions.pod:933
5557 "This call will also transparently look inside various types of compressed "
5562 #: ../src/guestfs-actions.pod:1191 ../fish/guestfish-actions.pod:936
5564 "The exact command which runs is C<file -zb path>. Note in particular that "
5565 "the filename is not prepended to the output (the C<-b> option)."
5569 #: ../src/guestfs-actions.pod:1195
5571 "This command can also be used on C</dev/> devices (and partitions, LV "
5572 "names). You can for example use this to determine if a device contains a "
5573 "filesystem, although it's usually better to use C<guestfs_vfs_type>."
5577 #: ../src/guestfs-actions.pod:1200 ../fish/guestfish-actions.pod:945
5579 "If the C<path> does not begin with C</dev/> then this command only works for "
5580 "the content of regular files. For other file types (directory, symbolic "
5581 "link etc) it will just return the string C<directory> etc."
5585 #: ../src/guestfs-actions.pod:1208
5586 msgid "guestfs_file_architecture"
5590 #: ../src/guestfs-actions.pod:1210
5593 " char *guestfs_file_architecture (guestfs_h *g,\n"
5594 "\t\tconst char *filename);\n"
5599 #: ../src/guestfs-actions.pod:1213 ../fish/guestfish-actions.pod:954
5601 "This detects the architecture of the binary C<filename>, and returns it if "
5606 #: ../src/guestfs-actions.pod:1216 ../fish/guestfish-actions.pod:957
5607 msgid "Currently defined architectures are:"
5611 #: ../src/guestfs-actions.pod:1220 ../fish/guestfish-actions.pod:961
5616 #: ../src/guestfs-actions.pod:1222 ../fish/guestfish-actions.pod:963
5618 "This string is returned for all 32 bit i386, i486, i586, i686 binaries "
5619 "irrespective of the precise processor requirements of the binary."
5623 #: ../src/guestfs-actions.pod:1225 ../fish/guestfish-actions.pod:966
5628 #: ../src/guestfs-actions.pod:1227 ../fish/guestfish-actions.pod:968
5629 msgid "64 bit x86-64."
5633 #: ../src/guestfs-actions.pod:1229 ../fish/guestfish-actions.pod:970
5638 #: ../src/guestfs-actions.pod:1231 ../fish/guestfish-actions.pod:972
5639 msgid "32 bit SPARC."
5643 #: ../src/guestfs-actions.pod:1233 ../fish/guestfish-actions.pod:974
5648 #: ../src/guestfs-actions.pod:1235 ../fish/guestfish-actions.pod:976
5649 msgid "64 bit SPARC V9 and above."
5653 #: ../src/guestfs-actions.pod:1237 ../fish/guestfish-actions.pod:978
5658 #: ../src/guestfs-actions.pod:1239 ../fish/guestfish-actions.pod:980
5659 msgid "Intel Itanium."
5663 #: ../src/guestfs-actions.pod:1241 ../fish/guestfish-actions.pod:982
5668 #: ../src/guestfs-actions.pod:1243 ../fish/guestfish-actions.pod:984
5669 msgid "32 bit Power PC."
5673 #: ../src/guestfs-actions.pod:1245 ../fish/guestfish-actions.pod:986
5678 #: ../src/guestfs-actions.pod:1247 ../fish/guestfish-actions.pod:988
5679 msgid "64 bit Power PC."
5683 #: ../src/guestfs-actions.pod:1251 ../fish/guestfish-actions.pod:992
5684 msgid "Libguestfs may return other architecture strings in future."
5688 #: ../src/guestfs-actions.pod:1253 ../fish/guestfish-actions.pod:994
5689 msgid "The function works on at least the following types of files:"
5693 #: ../src/guestfs-actions.pod:1259 ../fish/guestfish-actions.pod:1000
5694 msgid "many types of Un*x and Linux binary"
5698 #: ../src/guestfs-actions.pod:1263 ../fish/guestfish-actions.pod:1004
5699 msgid "many types of Un*x and Linux shared library"
5703 #: ../src/guestfs-actions.pod:1267 ../fish/guestfish-actions.pod:1008
5704 msgid "Windows Win32 and Win64 binaries"
5708 #: ../src/guestfs-actions.pod:1271 ../fish/guestfish-actions.pod:1012
5709 msgid "Windows Win32 and Win64 DLLs"
5713 #: ../src/guestfs-actions.pod:1273 ../fish/guestfish-actions.pod:1014
5714 msgid "Win32 binaries and DLLs return C<i386>."
5718 #: ../src/guestfs-actions.pod:1275 ../fish/guestfish-actions.pod:1016
5719 msgid "Win64 binaries and DLLs return C<x86_64>."
5723 #: ../src/guestfs-actions.pod:1279 ../fish/guestfish-actions.pod:1020
5724 msgid "Linux kernel modules"
5728 #: ../src/guestfs-actions.pod:1283 ../fish/guestfish-actions.pod:1024
5729 msgid "Linux new-style initrd images"
5733 #: ../src/guestfs-actions.pod:1287 ../fish/guestfish-actions.pod:1028
5734 msgid "some non-x86 Linux vmlinuz kernels"
5738 #: ../src/guestfs-actions.pod:1291 ../fish/guestfish-actions.pod:1032
5739 msgid "What it can't do currently:"
5743 #: ../src/guestfs-actions.pod:1297 ../fish/guestfish-actions.pod:1038
5744 msgid "static libraries (libfoo.a)"
5748 #: ../src/guestfs-actions.pod:1301 ../fish/guestfish-actions.pod:1042
5749 msgid "Linux old-style initrd as compressed ext2 filesystem (RHEL 3)"
5753 #: ../src/guestfs-actions.pod:1305 ../fish/guestfish-actions.pod:1046
5754 msgid "x86 Linux vmlinuz kernels"
5758 #: ../src/guestfs-actions.pod:1307 ../fish/guestfish-actions.pod:1048
5760 "x86 vmlinuz images (bzImage format) consist of a mix of 16-, 32- and "
5761 "compressed code, and are horribly hard to unpack. If you want to find the "
5762 "architecture of a kernel, use the architecture of the associated initrd or "
5763 "kernel module(s) instead."
5767 #: ../src/guestfs-actions.pod:1317
5768 msgid "guestfs_filesize"
5772 #: ../src/guestfs-actions.pod:1319
5775 " int64_t guestfs_filesize (guestfs_h *g,\n"
5776 "\t\tconst char *file);\n"
5781 #: ../src/guestfs-actions.pod:1322 ../fish/guestfish-actions.pod:1059
5782 msgid "This command returns the size of C<file> in bytes."
5786 #: ../src/guestfs-actions.pod:1324
5788 "To get other stats about a file, use C<guestfs_stat>, C<guestfs_lstat>, "
5789 "C<guestfs_is_dir>, C<guestfs_is_file> etc. To get the size of block "
5790 "devices, use C<guestfs_blockdev_getsize64>."
5794 #: ../src/guestfs-actions.pod:1330
5795 msgid "guestfs_fill"
5799 #: ../src/guestfs-actions.pod:1332
5802 " int guestfs_fill (guestfs_h *g,\n"
5805 "\t\tconst char *path);\n"
5810 #: ../src/guestfs-actions.pod:1337 ../fish/guestfish-actions.pod:1069
5812 "This command creates a new file called C<path>. The initial content of the "
5813 "file is C<len> octets of C<c>, where C<c> must be a number in the range "
5818 #: ../src/guestfs-actions.pod:1341
5820 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
5821 "C<guestfs_truncate_size>. To create a file with a pattern of repeating "
5822 "bytes use C<guestfs_fill_pattern>."
5826 #: ../src/guestfs-actions.pod:1353
5827 msgid "guestfs_fill_pattern"
5831 #: ../src/guestfs-actions.pod:1355
5834 " int guestfs_fill_pattern (guestfs_h *g,\n"
5835 "\t\tconst char *pattern,\n"
5837 "\t\tconst char *path);\n"
5842 #: ../src/guestfs-actions.pod:1360
5844 "This function is like C<guestfs_fill> except that it creates a new file of "
5845 "length C<len> containing the repeating pattern of bytes in C<pattern>. The "
5846 "pattern is truncated if necessary to ensure the length of the file is "
5847 "exactly C<len> bytes."
5851 #: ../src/guestfs-actions.pod:1372
5852 msgid "guestfs_find"
5856 #: ../src/guestfs-actions.pod:1374
5859 " char **guestfs_find (guestfs_h *g,\n"
5860 "\t\tconst char *directory);\n"
5865 #: ../src/guestfs-actions.pod:1377 ../fish/guestfish-actions.pod:1091
5867 "This command lists out all files and directories, recursively, starting at "
5868 "C<directory>. It is essentially equivalent to running the shell command "
5869 "C<find directory -print> but some post-processing happens on the output, "
5874 #: ../src/guestfs-actions.pod:1382 ../fish/guestfish-actions.pod:1096
5876 "This returns a list of strings I<without any prefix>. Thus if the directory "
5881 #: ../src/guestfs-actions.pod:1385 ../fish/guestfish-actions.pod:1099
5891 #: ../src/guestfs-actions.pod:1389
5892 msgid "then the returned list from C<guestfs_find> C</tmp> would be 4 elements:"
5896 #: ../src/guestfs-actions.pod:1392 ../fish/guestfish-actions.pod:1106
5907 #: ../src/guestfs-actions.pod:1397 ../fish/guestfish-actions.pod:1111
5908 msgid "If C<directory> is not a directory, then this command returns an error."
5912 #: ../src/guestfs-actions.pod:1400 ../fish/guestfish-actions.pod:1114
5913 msgid "The returned list is sorted."
5917 #: ../src/guestfs-actions.pod:1402
5918 msgid "See also C<guestfs_find0>."
5922 #: ../src/guestfs-actions.pod:1411
5923 msgid "guestfs_find0"
5927 #: ../src/guestfs-actions.pod:1413
5930 " int guestfs_find0 (guestfs_h *g,\n"
5931 "\t\tconst char *directory,\n"
5932 "\t\tconst char *files);\n"
5937 #: ../src/guestfs-actions.pod:1417 ../fish/guestfish-actions.pod:1125
5939 "This command lists out all files and directories, recursively, starting at "
5940 "C<directory>, placing the resulting list in the external file called "
5945 #: ../src/guestfs-actions.pod:1421
5947 "This command works the same way as C<guestfs_find> with the following "
5952 #: ../src/guestfs-actions.pod:1428 ../fish/guestfish-actions.pod:1136
5953 msgid "The resulting list is written to an external file."
5957 #: ../src/guestfs-actions.pod:1432 ../fish/guestfish-actions.pod:1140
5959 "Items (filenames) in the result are separated by C<\\0> characters. See "
5960 "L<find(1)> option I<-print0>."
5964 #: ../src/guestfs-actions.pod:1437 ../fish/guestfish-actions.pod:1145
5965 msgid "This command is not limited in the number of names that it can return."
5969 #: ../src/guestfs-actions.pod:1442 ../fish/guestfish-actions.pod:1150
5970 msgid "The result list is not sorted."
5974 #: ../src/guestfs-actions.pod:1448
5975 msgid "guestfs_findfs_label"
5979 #: ../src/guestfs-actions.pod:1450
5982 " char *guestfs_findfs_label (guestfs_h *g,\n"
5983 "\t\tconst char *label);\n"
5988 #: ../src/guestfs-actions.pod:1453 ../fish/guestfish-actions.pod:1160
5990 "This command searches the filesystems and returns the one which has the "
5991 "given label. An error is returned if no such filesystem can be found."
5995 #: ../src/guestfs-actions.pod:1457
5996 msgid "To find the label of a filesystem, use C<guestfs_vfs_label>."
6000 #: ../src/guestfs-actions.pod:1462
6001 msgid "guestfs_findfs_uuid"
6005 #: ../src/guestfs-actions.pod:1464
6008 " char *guestfs_findfs_uuid (guestfs_h *g,\n"
6009 "\t\tconst char *uuid);\n"
6014 #: ../src/guestfs-actions.pod:1467 ../fish/guestfish-actions.pod:1170
6016 "This command searches the filesystems and returns the one which has the "
6017 "given UUID. An error is returned if no such filesystem can be found."
6021 #: ../src/guestfs-actions.pod:1471
6022 msgid "To find the UUID of a filesystem, use C<guestfs_vfs_uuid>."
6026 #: ../src/guestfs-actions.pod:1476
6027 msgid "guestfs_fsck"
6031 #: ../src/guestfs-actions.pod:1478
6034 " int guestfs_fsck (guestfs_h *g,\n"
6035 "\t\tconst char *fstype,\n"
6036 "\t\tconst char *device);\n"
6041 #: ../src/guestfs-actions.pod:1482 ../fish/guestfish-actions.pod:1180
6043 "This runs the filesystem checker (fsck) on C<device> which should have "
6044 "filesystem type C<fstype>."
6048 #: ../src/guestfs-actions.pod:1485 ../fish/guestfish-actions.pod:1183
6050 "The returned integer is the status. See L<fsck(8)> for the list of status "
6051 "codes from C<fsck>."
6055 #: ../src/guestfs-actions.pod:1494 ../fish/guestfish-actions.pod:1192
6056 msgid "Multiple status codes can be summed together."
6060 #: ../src/guestfs-actions.pod:1498 ../fish/guestfish-actions.pod:1196
6062 "A non-zero return code can mean \"success\", for example if errors have been "
6063 "corrected on the filesystem."
6067 #: ../src/guestfs-actions.pod:1503 ../fish/guestfish-actions.pod:1201
6068 msgid "Checking or repairing NTFS volumes is not supported (by linux-ntfs)."
6072 #: ../src/guestfs-actions.pod:1508 ../fish/guestfish-actions.pod:1206
6073 msgid "This command is entirely equivalent to running C<fsck -a -t fstype device>."
6077 #: ../src/guestfs-actions.pod:1512
6078 msgid "guestfs_get_append"
6082 #: ../src/guestfs-actions.pod:1514
6085 " const char *guestfs_get_append (guestfs_h *g);\n"
6090 #: ../src/guestfs-actions.pod:1516 ../fish/guestfish-actions.pod:1212
6092 "Return the additional kernel options which are added to the guest kernel "
6097 #: ../src/guestfs-actions.pod:1519 ../fish/guestfish-actions.pod:1215
6098 msgid "If C<NULL> then no options are added."
6102 #: ../src/guestfs-actions.pod:1521
6104 "This function returns a string which may be NULL. There is no way to return "
6105 "an error from this function. The string is owned by the guest handle and "
6106 "must I<not> be freed."
6110 #: ../src/guestfs-actions.pod:1525
6111 msgid "guestfs_get_autosync"
6115 #: ../src/guestfs-actions.pod:1527
6118 " int guestfs_get_autosync (guestfs_h *g);\n"
6123 #: ../src/guestfs-actions.pod:1529 ../fish/guestfish-actions.pod:1221
6124 msgid "Get the autosync flag."
6128 #: ../src/guestfs-actions.pod:1533
6129 msgid "guestfs_get_direct"
6133 #: ../src/guestfs-actions.pod:1535
6136 " int guestfs_get_direct (guestfs_h *g);\n"
6141 #: ../src/guestfs-actions.pod:1537 ../fish/guestfish-actions.pod:1227
6142 msgid "Return the direct appliance mode flag."
6146 #: ../src/guestfs-actions.pod:1541
6147 msgid "guestfs_get_e2label"
6151 #: ../src/guestfs-actions.pod:1543
6154 " char *guestfs_get_e2label (guestfs_h *g,\n"
6155 "\t\tconst char *device);\n"
6160 #: ../src/guestfs-actions.pod:1546 ../fish/guestfish-actions.pod:1233
6161 msgid "This returns the ext2/3/4 filesystem label of the filesystem on C<device>."
6165 #: ../src/guestfs-actions.pod:1552 ../fish/guestfish-actions.pod:1236
6167 "This function is deprecated. In new code, use the C<vfs_label> call "
6172 #: ../src/guestfs-actions.pod:1559
6173 msgid "guestfs_get_e2uuid"
6177 #: ../src/guestfs-actions.pod:1561
6180 " char *guestfs_get_e2uuid (guestfs_h *g,\n"
6181 "\t\tconst char *device);\n"
6186 #: ../src/guestfs-actions.pod:1564 ../fish/guestfish-actions.pod:1247
6187 msgid "This returns the ext2/3/4 filesystem UUID of the filesystem on C<device>."
6191 #: ../src/guestfs-actions.pod:1570 ../fish/guestfish-actions.pod:1250
6192 msgid "This function is deprecated. In new code, use the C<vfs_uuid> call instead."
6196 #: ../src/guestfs-actions.pod:1577
6197 msgid "guestfs_get_memsize"
6201 #: ../src/guestfs-actions.pod:1579
6204 " int guestfs_get_memsize (guestfs_h *g);\n"
6209 #: ../src/guestfs-actions.pod:1581 ../fish/guestfish-actions.pod:1261
6210 msgid "This gets the memory size in megabytes allocated to the qemu subprocess."
6214 #: ../src/guestfs-actions.pod:1584
6216 "If C<guestfs_set_memsize> was not called on this handle, and if "
6217 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
6218 "value for memsize."
6222 #: ../src/guestfs-actions.pod:1588 ../src/guestfs-actions.pod:1651 ../src/guestfs-actions.pod:4177 ../src/guestfs-actions.pod:4269 ../fish/guestfish-actions.pod:1268 ../fish/guestfish-actions.pod:1317 ../fish/guestfish-actions.pod:3223 ../fish/guestfish-actions.pod:3300
6223 msgid "For more information on the architecture of libguestfs, see L<guestfs(3)>."
6227 #: ../src/guestfs-actions.pod:1593
6228 msgid "guestfs_get_network"
6232 #: ../src/guestfs-actions.pod:1595
6235 " int guestfs_get_network (guestfs_h *g);\n"
6240 #: ../src/guestfs-actions.pod:1597 ../fish/guestfish-actions.pod:1275
6241 msgid "This returns the enable network flag."
6245 #: ../src/guestfs-actions.pod:1601
6246 msgid "guestfs_get_path"
6250 #: ../src/guestfs-actions.pod:1603
6253 " const char *guestfs_get_path (guestfs_h *g);\n"
6258 #: ../src/guestfs-actions.pod:1605 ../fish/guestfish-actions.pod:1281
6259 msgid "Return the current search path."
6263 #: ../src/guestfs-actions.pod:1607 ../fish/guestfish-actions.pod:1283
6265 "This is always non-NULL. If it wasn't set already, then this will return "
6270 #: ../src/guestfs-actions.pod:1610 ../src/guestfs-actions.pod:1633
6272 "This function returns a string, or NULL on error. The string is owned by "
6273 "the guest handle and must I<not> be freed."
6277 #: ../src/guestfs-actions.pod:1613
6278 msgid "guestfs_get_pid"
6282 #: ../src/guestfs-actions.pod:1615
6285 " int guestfs_get_pid (guestfs_h *g);\n"
6290 #: ../src/guestfs-actions.pod:1617 ../fish/guestfish-actions.pod:1290
6292 "Return the process ID of the qemu subprocess. If there is no qemu "
6293 "subprocess, then this will return an error."
6297 #: ../src/guestfs-actions.pod:1620 ../fish/guestfish-actions.pod:1293
6298 msgid "This is an internal call used for debugging and testing."
6302 #: ../src/guestfs-actions.pod:1624
6303 msgid "guestfs_get_qemu"
6307 #: ../src/guestfs-actions.pod:1626
6310 " const char *guestfs_get_qemu (guestfs_h *g);\n"
6315 #: ../src/guestfs-actions.pod:1628 ../fish/guestfish-actions.pod:1299
6316 msgid "Return the current qemu binary."
6320 #: ../src/guestfs-actions.pod:1630 ../fish/guestfish-actions.pod:1301
6322 "This is always non-NULL. If it wasn't set already, then this will return "
6323 "the default qemu binary name."
6327 #: ../src/guestfs-actions.pod:1636
6328 msgid "guestfs_get_recovery_proc"
6332 #: ../src/guestfs-actions.pod:1638
6335 " int guestfs_get_recovery_proc (guestfs_h *g);\n"
6340 #: ../src/guestfs-actions.pod:1640 ../fish/guestfish-actions.pod:1308
6341 msgid "Return the recovery process enabled flag."
6345 #: ../src/guestfs-actions.pod:1644
6346 msgid "guestfs_get_selinux"
6350 #: ../src/guestfs-actions.pod:1646
6353 " int guestfs_get_selinux (guestfs_h *g);\n"
6358 #: ../src/guestfs-actions.pod:1648
6360 "This returns the current setting of the selinux flag which is passed to the "
6361 "appliance at boot time. See C<guestfs_set_selinux>."
6365 #: ../src/guestfs-actions.pod:1656
6366 msgid "guestfs_get_state"
6370 #: ../src/guestfs-actions.pod:1658
6373 " int guestfs_get_state (guestfs_h *g);\n"
6378 #: ../src/guestfs-actions.pod:1660 ../fish/guestfish-actions.pod:1324
6380 "This returns the current state as an opaque integer. This is only useful "
6381 "for printing debug and internal error messages."
6385 #: ../src/guestfs-actions.pod:1663 ../src/guestfs-actions.pod:2270 ../src/guestfs-actions.pod:2281 ../src/guestfs-actions.pod:2318 ../src/guestfs-actions.pod:2339 ../fish/guestfish-actions.pod:1327 ../fish/guestfish-actions.pod:1810 ../fish/guestfish-actions.pod:1819 ../fish/guestfish-actions.pod:1848 ../fish/guestfish-actions.pod:1864
6386 msgid "For more information on states, see L<guestfs(3)>."
6390 #: ../src/guestfs-actions.pod:1667
6391 msgid "guestfs_get_trace"
6395 #: ../src/guestfs-actions.pod:1669
6398 " int guestfs_get_trace (guestfs_h *g);\n"
6403 #: ../src/guestfs-actions.pod:1671 ../fish/guestfish-actions.pod:1333
6404 msgid "Return the command trace flag."
6408 #: ../src/guestfs-actions.pod:1675
6409 msgid "guestfs_get_umask"
6413 #: ../src/guestfs-actions.pod:1677
6416 " int guestfs_get_umask (guestfs_h *g);\n"
6421 #: ../src/guestfs-actions.pod:1679
6423 "Return the current umask. By default the umask is C<022> unless it has been "
6424 "set by calling C<guestfs_umask>."
6428 #: ../src/guestfs-actions.pod:1684
6429 msgid "guestfs_get_verbose"
6433 #: ../src/guestfs-actions.pod:1686
6436 " int guestfs_get_verbose (guestfs_h *g);\n"
6441 #: ../src/guestfs-actions.pod:1688 ../fish/guestfish-actions.pod:1346
6442 msgid "This returns the verbose messages flag."
6446 #: ../src/guestfs-actions.pod:1692
6447 msgid "guestfs_getcon"
6451 #: ../src/guestfs-actions.pod:1694
6454 " char *guestfs_getcon (guestfs_h *g);\n"
6459 #: ../src/guestfs-actions.pod:1696 ../fish/guestfish-actions.pod:1352
6460 msgid "This gets the SELinux security context of the daemon."
6464 #: ../src/guestfs-actions.pod:1698
6465 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<guestfs_setcon>"
6469 #: ../src/guestfs-actions.pod:1704
6470 msgid "guestfs_getxattrs"
6474 #: ../src/guestfs-actions.pod:1706
6477 " struct guestfs_xattr_list *guestfs_getxattrs (guestfs_h *g,\n"
6478 "\t\tconst char *path);\n"
6483 #: ../src/guestfs-actions.pod:1709 ../fish/guestfish-actions.pod:1361
6484 msgid "This call lists the extended attributes of the file or directory C<path>."
6488 #: ../src/guestfs-actions.pod:1712 ../fish/guestfish-actions.pod:1364
6490 "At the system call level, this is a combination of the L<listxattr(2)> and "
6491 "L<getxattr(2)> calls."
6495 #: ../src/guestfs-actions.pod:1715
6496 msgid "See also: C<guestfs_lgetxattrs>, L<attr(5)>."
6500 #: ../src/guestfs-actions.pod:1717 ../src/guestfs-actions.pod:2389 ../src/guestfs-actions.pod:2884
6502 "This function returns a C<struct guestfs_xattr_list *> (see "
6503 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
6504 "must call C<guestfs_free_xattr_list> after use>."
6508 #: ../src/guestfs-actions.pod:1722
6509 msgid "guestfs_glob_expand"
6513 #: ../src/guestfs-actions.pod:1724
6516 " char **guestfs_glob_expand (guestfs_h *g,\n"
6517 "\t\tconst char *pattern);\n"
6522 #: ../src/guestfs-actions.pod:1727 ../fish/guestfish-actions.pod:1373
6524 "This command searches for all the pathnames matching C<pattern> according to "
6525 "the wildcard expansion rules used by the shell."
6529 #: ../src/guestfs-actions.pod:1731 ../fish/guestfish-actions.pod:1377
6530 msgid "If no paths match, then this returns an empty list (note: not an error)."
6534 #: ../src/guestfs-actions.pod:1734 ../fish/guestfish-actions.pod:1380
6536 "It is just a wrapper around the C L<glob(3)> function with flags "
6537 "C<GLOB_MARK|GLOB_BRACE>. See that manual page for more details."
6541 #: ../src/guestfs-actions.pod:1742
6542 msgid "guestfs_grep"
6546 #: ../src/guestfs-actions.pod:1744
6549 " char **guestfs_grep (guestfs_h *g,\n"
6550 "\t\tconst char *regex,\n"
6551 "\t\tconst char *path);\n"
6556 #: ../src/guestfs-actions.pod:1748 ../fish/guestfish-actions.pod:1388
6557 msgid "This calls the external C<grep> program and returns the matching lines."
6561 #: ../src/guestfs-actions.pod:1758
6562 msgid "guestfs_grepi"
6566 #: ../src/guestfs-actions.pod:1760
6569 " char **guestfs_grepi (guestfs_h *g,\n"
6570 "\t\tconst char *regex,\n"
6571 "\t\tconst char *path);\n"
6576 #: ../src/guestfs-actions.pod:1764 ../fish/guestfish-actions.pod:1398
6577 msgid "This calls the external C<grep -i> program and returns the matching lines."
6581 #: ../src/guestfs-actions.pod:1774
6582 msgid "guestfs_grub_install"
6586 #: ../src/guestfs-actions.pod:1776
6589 " int guestfs_grub_install (guestfs_h *g,\n"
6590 "\t\tconst char *root,\n"
6591 "\t\tconst char *device);\n"
6596 #: ../src/guestfs-actions.pod:1780 ../fish/guestfish-actions.pod:1408
6598 "This command installs GRUB (the Grand Unified Bootloader) on C<device>, with "
6599 "the root directory being C<root>."
6603 #: ../src/guestfs-actions.pod:1783 ../fish/guestfish-actions.pod:1411
6605 "Note: If grub-install reports the error \"No suitable drive was found in the "
6606 "generated device map.\" it may be that you need to create a "
6607 "C</boot/grub/device.map> file first that contains the mapping between grub "
6608 "device names and Linux device names. It is usually sufficient to create a "
6613 #: ../src/guestfs-actions.pod:1790 ../fish/guestfish-actions.pod:1418
6621 #: ../src/guestfs-actions.pod:1792 ../fish/guestfish-actions.pod:1420
6622 msgid "replacing C</dev/vda> with the name of the installation device."
6626 #: ../src/guestfs-actions.pod:1796
6627 msgid "guestfs_head"
6631 #: ../src/guestfs-actions.pod:1798
6634 " char **guestfs_head (guestfs_h *g,\n"
6635 "\t\tconst char *path);\n"
6640 #: ../src/guestfs-actions.pod:1801 ../fish/guestfish-actions.pod:1426
6642 "This command returns up to the first 10 lines of a file as a list of "
6647 #: ../src/guestfs-actions.pod:1811
6648 msgid "guestfs_head_n"
6652 #: ../src/guestfs-actions.pod:1813
6655 " char **guestfs_head_n (guestfs_h *g,\n"
6656 "\t\tint nrlines,\n"
6657 "\t\tconst char *path);\n"
6662 #: ../src/guestfs-actions.pod:1817 ../fish/guestfish-actions.pod:1436
6664 "If the parameter C<nrlines> is a positive number, this returns the first "
6665 "C<nrlines> lines of the file C<path>."
6669 #: ../src/guestfs-actions.pod:1820 ../fish/guestfish-actions.pod:1439
6671 "If the parameter C<nrlines> is a negative number, this returns lines from "
6672 "the file C<path>, excluding the last C<nrlines> lines."
6676 #: ../src/guestfs-actions.pod:1823 ../src/guestfs-actions.pod:4725 ../fish/guestfish-actions.pod:1442 ../fish/guestfish-actions.pod:3642
6677 msgid "If the parameter C<nrlines> is zero, this returns an empty list."
6681 #: ../src/guestfs-actions.pod:1832
6682 msgid "guestfs_hexdump"
6686 #: ../src/guestfs-actions.pod:1834
6689 " char *guestfs_hexdump (guestfs_h *g,\n"
6690 "\t\tconst char *path);\n"
6695 #: ../src/guestfs-actions.pod:1837 ../fish/guestfish-actions.pod:1451
6697 "This runs C<hexdump -C> on the given C<path>. The result is the "
6698 "human-readable, canonical hex dump of the file."
6702 #: ../src/guestfs-actions.pod:1846
6703 msgid "guestfs_initrd_cat"
6707 #: ../src/guestfs-actions.pod:1848
6710 " char *guestfs_initrd_cat (guestfs_h *g,\n"
6711 "\t\tconst char *initrdpath,\n"
6712 "\t\tconst char *filename,\n"
6713 "\t\tsize_t *size_r);\n"
6718 #: ../src/guestfs-actions.pod:1853 ../fish/guestfish-actions.pod:1461
6720 "This command unpacks the file C<filename> from the initrd file called "
6721 "C<initrdpath>. The filename must be given I<without> the initial C</> "
6726 #: ../src/guestfs-actions.pod:1857 ../fish/guestfish-actions.pod:1465
6728 "For example, in guestfish you could use the following command to examine the "
6729 "boot script (usually called C</init>) contained in a Linux initrd or "
6734 #: ../src/guestfs-actions.pod:1861 ../fish/guestfish-actions.pod:1469
6737 " initrd-cat /boot/initrd-<version>.img init\n"
6742 #: ../src/guestfs-actions.pod:1863
6743 msgid "See also C<guestfs_initrd_list>."
6747 #: ../src/guestfs-actions.pod:1865 ../src/guestfs-actions.pod:3683 ../src/guestfs-actions.pod:3812
6749 "This function returns a buffer, or NULL on error. The size of the returned "
6750 "buffer is written to C<*size_r>. I<The caller must free the returned buffer "
6755 #: ../src/guestfs-actions.pod:1872
6756 msgid "guestfs_initrd_list"
6760 #: ../src/guestfs-actions.pod:1874
6763 " char **guestfs_initrd_list (guestfs_h *g,\n"
6764 "\t\tconst char *path);\n"
6769 #: ../src/guestfs-actions.pod:1877 ../fish/guestfish-actions.pod:1480
6770 msgid "This command lists out files contained in an initrd."
6774 #: ../src/guestfs-actions.pod:1879 ../fish/guestfish-actions.pod:1482
6776 "The files are listed without any initial C</> character. The files are "
6777 "listed in the order they appear (not necessarily alphabetical). Directory "
6778 "names are listed as separate items."
6782 #: ../src/guestfs-actions.pod:1883 ../fish/guestfish-actions.pod:1486
6784 "Old Linux kernels (2.4 and earlier) used a compressed ext2 filesystem as "
6785 "initrd. We I<only> support the newer initramfs format (compressed cpio "
6790 #: ../src/guestfs-actions.pod:1891
6791 msgid "guestfs_inotify_add_watch"
6795 #: ../src/guestfs-actions.pod:1893
6798 " int64_t guestfs_inotify_add_watch (guestfs_h *g,\n"
6799 "\t\tconst char *path,\n"
6805 #: ../src/guestfs-actions.pod:1897 ../fish/guestfish-actions.pod:1494
6806 msgid "Watch C<path> for the events listed in C<mask>."
6810 #: ../src/guestfs-actions.pod:1899 ../fish/guestfish-actions.pod:1496
6812 "Note that if C<path> is a directory then events within that directory are "
6813 "watched, but this does I<not> happen recursively (in subdirectories)."
6817 #: ../src/guestfs-actions.pod:1903 ../fish/guestfish-actions.pod:1500
6819 "Note for non-C or non-Linux callers: the inotify events are defined by the "
6820 "Linux kernel ABI and are listed in C</usr/include/sys/inotify.h>."
6824 #: ../src/guestfs-actions.pod:1909
6825 msgid "guestfs_inotify_close"
6829 #: ../src/guestfs-actions.pod:1911
6832 " int guestfs_inotify_close (guestfs_h *g);\n"
6837 #: ../src/guestfs-actions.pod:1913 ../fish/guestfish-actions.pod:1508
6839 "This closes the inotify handle which was previously opened by inotify_init. "
6840 "It removes all watches, throws away any pending events, and deallocates all "
6845 #: ../src/guestfs-actions.pod:1919
6846 msgid "guestfs_inotify_files"
6850 #: ../src/guestfs-actions.pod:1921
6853 " char **guestfs_inotify_files (guestfs_h *g);\n"
6858 #: ../src/guestfs-actions.pod:1923
6860 "This function is a helpful wrapper around C<guestfs_inotify_read> which just "
6861 "returns a list of pathnames of objects that were touched. The returned "
6862 "pathnames are sorted and deduplicated."
6866 #: ../src/guestfs-actions.pod:1931
6867 msgid "guestfs_inotify_init"
6871 #: ../src/guestfs-actions.pod:1933
6874 " int guestfs_inotify_init (guestfs_h *g,\n"
6875 "\t\tint maxevents);\n"
6880 #: ../src/guestfs-actions.pod:1936 ../fish/guestfish-actions.pod:1524
6882 "This command creates a new inotify handle. The inotify subsystem can be "
6883 "used to notify events which happen to objects in the guest filesystem."
6887 #: ../src/guestfs-actions.pod:1940
6889 "C<maxevents> is the maximum number of events which will be queued up between "
6890 "calls to C<guestfs_inotify_read> or C<guestfs_inotify_files>. If this is "
6891 "passed as C<0>, then the kernel (or previously set) default is used. For "
6892 "Linux 2.6.29 the default was 16384 events. Beyond this limit, the kernel "
6893 "throws away events, but records the fact that it threw them away by setting "
6894 "a flag C<IN_Q_OVERFLOW> in the returned structure list (see "
6895 "C<guestfs_inotify_read>)."
6899 #: ../src/guestfs-actions.pod:1950
6901 "Before any events are generated, you have to add some watches to the "
6902 "internal watch list. See: C<guestfs_inotify_add_watch>, "
6903 "C<guestfs_inotify_rm_watch> and C<guestfs_inotify_watch_all>."
6907 #: ../src/guestfs-actions.pod:1956
6909 "Queued up events should be read periodically by calling "
6910 "C<guestfs_inotify_read> (or C<guestfs_inotify_files> which is just a helpful "
6911 "wrapper around C<guestfs_inotify_read>). If you don't read the events out "
6912 "often enough then you risk the internal queue overflowing."
6916 #: ../src/guestfs-actions.pod:1963
6918 "The handle should be closed after use by calling C<guestfs_inotify_close>. "
6919 "This also removes any watches automatically."
6923 #: ../src/guestfs-actions.pod:1967 ../fish/guestfish-actions.pod:1555
6925 "See also L<inotify(7)> for an overview of the inotify interface as exposed "
6926 "by the Linux kernel, which is roughly what we expose via libguestfs. Note "
6927 "that there is one global inotify handle per libguestfs instance."
6931 #: ../src/guestfs-actions.pod:1974
6932 msgid "guestfs_inotify_read"
6936 #: ../src/guestfs-actions.pod:1976
6939 " struct guestfs_inotify_event_list *guestfs_inotify_read (guestfs_h *g);\n"
6944 #: ../src/guestfs-actions.pod:1978 ../fish/guestfish-actions.pod:1564
6946 "Return the complete queue of events that have happened since the previous "
6951 #: ../src/guestfs-actions.pod:1981 ../fish/guestfish-actions.pod:1567
6952 msgid "If no events have happened, this returns an empty list."
6956 #: ../src/guestfs-actions.pod:1983 ../fish/guestfish-actions.pod:1569
6958 "I<Note>: In order to make sure that all events have been read, you must call "
6959 "this function repeatedly until it returns an empty list. The reason is that "
6960 "the call will read events up to the maximum appliance-to-host message size "
6961 "and leave remaining events in the queue."
6965 #: ../src/guestfs-actions.pod:1989
6967 "This function returns a C<struct guestfs_inotify_event_list *> (see "
6968 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
6969 "must call C<guestfs_free_inotify_event_list> after use>."
6973 #: ../src/guestfs-actions.pod:1994
6974 msgid "guestfs_inotify_rm_watch"
6978 #: ../src/guestfs-actions.pod:1996
6981 " int guestfs_inotify_rm_watch (guestfs_h *g,\n"
6987 #: ../src/guestfs-actions.pod:1999
6989 "Remove a previously defined inotify watch. See "
6990 "C<guestfs_inotify_add_watch>."
6994 #: ../src/guestfs-actions.pod:2004
6995 msgid "guestfs_inspect_get_arch"
6999 #: ../src/guestfs-actions.pod:2006
7002 " char *guestfs_inspect_get_arch (guestfs_h *g,\n"
7003 "\t\tconst char *root);\n"
7008 #: ../src/guestfs-actions.pod:2009 ../src/guestfs-actions.pod:2029 ../src/guestfs-actions.pod:2079 ../src/guestfs-actions.pod:2102 ../src/guestfs-actions.pod:2126 ../src/guestfs-actions.pod:2144 ../src/guestfs-actions.pod:2174 ../src/guestfs-actions.pod:2195
7010 "This function should only be called with a root device string as returned by "
7011 "C<guestfs_inspect_os>."
7015 #: ../src/guestfs-actions.pod:2012
7017 "This returns the architecture of the inspected operating system. The "
7018 "possible return values are listed under C<guestfs_file_architecture>."
7022 #: ../src/guestfs-actions.pod:2016 ../fish/guestfish-actions.pod:1593
7024 "If the architecture could not be determined, then the string C<unknown> is "
7029 #: ../src/guestfs-actions.pod:2019 ../src/guestfs-actions.pod:2069 ../src/guestfs-actions.pod:2117 ../src/guestfs-actions.pod:2185 ../src/guestfs-actions.pod:2220 ../src/guestfs-actions.pod:2257 ../fish/guestfish-actions.pod:1596 ../fish/guestfish-actions.pod:1642 ../fish/guestfish-actions.pod:1681 ../fish/guestfish-actions.pod:1736 ../fish/guestfish-actions.pod:1767 ../fish/guestfish-actions.pod:1801
7030 msgid "Please read L<guestfs(3)/INSPECTION> for more details."
7034 #: ../src/guestfs-actions.pod:2024
7035 msgid "guestfs_inspect_get_distro"
7039 #: ../src/guestfs-actions.pod:2026
7042 " char *guestfs_inspect_get_distro (guestfs_h *g,\n"
7043 "\t\tconst char *root);\n"
7048 #: ../src/guestfs-actions.pod:2032 ../fish/guestfish-actions.pod:1605
7049 msgid "This returns the distro (distribution) of the inspected operating system."
7053 #: ../src/guestfs-actions.pod:2035 ../fish/guestfish-actions.pod:1608
7054 msgid "Currently defined distros are:"
7058 #: ../src/guestfs-actions.pod:2039 ../fish/guestfish-actions.pod:1612
7063 #: ../src/guestfs-actions.pod:2041 ../fish/guestfish-actions.pod:1614
7064 msgid "Debian or a Debian-derived distro such as Ubuntu."
7068 #: ../src/guestfs-actions.pod:2043 ../fish/guestfish-actions.pod:1616
7073 #: ../src/guestfs-actions.pod:2045 ../fish/guestfish-actions.pod:1618
7078 #: ../src/guestfs-actions.pod:2047 ../fish/guestfish-actions.pod:1620
7079 msgid "\"redhat-based\""
7083 #: ../src/guestfs-actions.pod:2049 ../fish/guestfish-actions.pod:1622
7084 msgid "Some Red Hat-derived distro."
7088 #: ../src/guestfs-actions.pod:2051 ../fish/guestfish-actions.pod:1624
7093 #: ../src/guestfs-actions.pod:2053 ../fish/guestfish-actions.pod:1626
7094 msgid "Red Hat Enterprise Linux and some derivatives."
7098 #: ../src/guestfs-actions.pod:2055 ../src/guestfs-actions.pod:2207 ../fish/guestfish-actions.pod:1628 ../fish/guestfish-actions.pod:1754
7103 #: ../src/guestfs-actions.pod:2057 ../fish/guestfish-actions.pod:1630
7105 "Windows does not have distributions. This string is returned if the OS type "
7110 #: ../src/guestfs-actions.pod:2060 ../src/guestfs-actions.pod:2211 ../fish/guestfish-actions.pod:1633 ../fish/guestfish-actions.pod:1758
7115 #: ../src/guestfs-actions.pod:2062 ../fish/guestfish-actions.pod:1635
7116 msgid "The distro could not be determined."
7120 #: ../src/guestfs-actions.pod:2066 ../src/guestfs-actions.pod:2217 ../fish/guestfish-actions.pod:1639 ../fish/guestfish-actions.pod:1764
7122 "Future versions of libguestfs may return other strings here. The caller "
7123 "should be prepared to handle any string."
7127 #: ../src/guestfs-actions.pod:2074
7128 msgid "guestfs_inspect_get_filesystems"
7132 #: ../src/guestfs-actions.pod:2076
7135 " char **guestfs_inspect_get_filesystems (guestfs_h *g,\n"
7136 "\t\tconst char *root);\n"
7141 #: ../src/guestfs-actions.pod:2082 ../fish/guestfish-actions.pod:1651
7143 "This returns a list of all the filesystems that we think are associated with "
7144 "this operating system. This includes the root filesystem, other ordinary "
7145 "filesystems, and non-mounted devices like swap partitions."
7149 #: ../src/guestfs-actions.pod:2087 ../fish/guestfish-actions.pod:1656
7151 "In the case of a multi-boot virtual machine, it is possible for a filesystem "
7152 "to be shared between operating systems."
7156 #: ../src/guestfs-actions.pod:2090
7158 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7159 "C<guestfs_inspect_get_mountpoints>."
7163 #: ../src/guestfs-actions.pod:2097
7164 msgid "guestfs_inspect_get_major_version"
7168 #: ../src/guestfs-actions.pod:2099
7171 " int guestfs_inspect_get_major_version (guestfs_h *g,\n"
7172 "\t\tconst char *root);\n"
7177 #: ../src/guestfs-actions.pod:2105 ../fish/guestfish-actions.pod:1669
7178 msgid "This returns the major version number of the inspected operating system."
7182 #: ../src/guestfs-actions.pod:2108 ../fish/guestfish-actions.pod:1672
7184 "Windows uses a consistent versioning scheme which is I<not> reflected in the "
7185 "popular public names used by the operating system. Notably the operating "
7186 "system known as \"Windows 7\" is really version 6.1 (ie. major = 6, minor = "
7187 "1). You can find out the real versions corresponding to releases of Windows "
7188 "by consulting Wikipedia or MSDN."
7192 #: ../src/guestfs-actions.pod:2115 ../src/guestfs-actions.pod:2132 ../fish/guestfish-actions.pod:1679 ../fish/guestfish-actions.pod:1693
7193 msgid "If the version could not be determined, then C<0> is returned."
7197 #: ../src/guestfs-actions.pod:2121
7198 msgid "guestfs_inspect_get_minor_version"
7202 #: ../src/guestfs-actions.pod:2123
7205 " int guestfs_inspect_get_minor_version (guestfs_h *g,\n"
7206 "\t\tconst char *root);\n"
7211 #: ../src/guestfs-actions.pod:2129 ../fish/guestfish-actions.pod:1690
7212 msgid "This returns the minor version number of the inspected operating system."
7216 #: ../src/guestfs-actions.pod:2134
7218 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7219 "C<guestfs_inspect_get_major_version>."
7223 #: ../src/guestfs-actions.pod:2139
7224 msgid "guestfs_inspect_get_mountpoints"
7228 #: ../src/guestfs-actions.pod:2141
7231 " char **guestfs_inspect_get_mountpoints (guestfs_h *g,\n"
7232 "\t\tconst char *root);\n"
7237 #: ../src/guestfs-actions.pod:2147 ../fish/guestfish-actions.pod:1705
7239 "This returns a hash of where we think the filesystems associated with this "
7240 "operating system should be mounted. Callers should note that this is at "
7241 "best an educated guess made by reading configuration files such as "
7246 #: ../src/guestfs-actions.pod:2152 ../fish/guestfish-actions.pod:1710
7248 "Each element in the returned hashtable has a key which is the path of the "
7249 "mountpoint (eg. C</boot>) and a value which is the filesystem that would be "
7250 "mounted there (eg. C</dev/sda1>)."
7254 #: ../src/guestfs-actions.pod:2157 ../fish/guestfish-actions.pod:1715
7255 msgid "Non-mounted devices such as swap devices are I<not> returned in this list."
7259 #: ../src/guestfs-actions.pod:2160
7261 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
7262 "C<guestfs_inspect_get_filesystems>."
7266 #: ../src/guestfs-actions.pod:2163 ../src/guestfs-actions.pod:3320 ../src/guestfs-actions.pod:4842
7268 "This function returns a NULL-terminated array of strings, or NULL if there "
7269 "was an error. The array of strings will always have length C<2n+1>, where "
7270 "C<n> keys and values alternate, followed by the trailing NULL entry. I<The "
7271 "caller must free the strings and the array after use>."
7275 #: ../src/guestfs-actions.pod:2169
7276 msgid "guestfs_inspect_get_product_name"
7280 #: ../src/guestfs-actions.pod:2171
7283 " char *guestfs_inspect_get_product_name (guestfs_h *g,\n"
7284 "\t\tconst char *root);\n"
7289 #: ../src/guestfs-actions.pod:2177 ../fish/guestfish-actions.pod:1728
7291 "This returns the product name of the inspected operating system. The "
7292 "product name is generally some freeform string which can be displayed to the "
7293 "user, but should not be parsed by programs."
7297 #: ../src/guestfs-actions.pod:2182 ../fish/guestfish-actions.pod:1733
7299 "If the product name could not be determined, then the string C<unknown> is "
7304 #: ../src/guestfs-actions.pod:2190
7305 msgid "guestfs_inspect_get_type"
7309 #: ../src/guestfs-actions.pod:2192
7312 " char *guestfs_inspect_get_type (guestfs_h *g,\n"
7313 "\t\tconst char *root);\n"
7318 #: ../src/guestfs-actions.pod:2198 ../fish/guestfish-actions.pod:1745
7320 "This returns the type of the inspected operating system. Currently defined "
7325 #: ../src/guestfs-actions.pod:2203 ../fish/guestfish-actions.pod:1750
7330 #: ../src/guestfs-actions.pod:2205 ../fish/guestfish-actions.pod:1752
7331 msgid "Any Linux-based operating system."
7335 #: ../src/guestfs-actions.pod:2209 ../fish/guestfish-actions.pod:1756
7336 msgid "Any Microsoft Windows operating system."
7340 #: ../src/guestfs-actions.pod:2213 ../fish/guestfish-actions.pod:1760
7341 msgid "The operating system type could not be determined."
7345 #: ../src/guestfs-actions.pod:2225
7346 msgid "guestfs_inspect_os"
7350 #: ../src/guestfs-actions.pod:2227
7353 " char **guestfs_inspect_os (guestfs_h *g);\n"
7358 #: ../src/guestfs-actions.pod:2229 ../fish/guestfish-actions.pod:1773
7360 "This function uses other libguestfs functions and certain heuristics to "
7361 "inspect the disk(s) (usually disks belonging to a virtual machine), looking "
7362 "for operating systems."
7366 #: ../src/guestfs-actions.pod:2233 ../fish/guestfish-actions.pod:1777
7367 msgid "The list returned is empty if no operating systems were found."
7371 #: ../src/guestfs-actions.pod:2235 ../fish/guestfish-actions.pod:1779
7373 "If one operating system was found, then this returns a list with a single "
7374 "element, which is the name of the root filesystem of this operating system. "
7375 "It is also possible for this function to return a list containing more than "
7376 "one element, indicating a dual-boot or multi-boot virtual machine, with each "
7377 "element being the root filesystem of one of the operating systems."
7381 #: ../src/guestfs-actions.pod:2242
7383 "You can pass the root string(s) returned to other C<guestfs_inspect_get_*> "
7384 "functions in order to query further information about each operating system, "
7385 "such as the name and version."
7389 #: ../src/guestfs-actions.pod:2247
7391 "This function uses other libguestfs features such as C<guestfs_mount_ro> and "
7392 "C<guestfs_umount_all> in order to mount and unmount filesystems and look at "
7393 "the contents. This should be called with no disks currently mounted. The "
7394 "function may also use Augeas, so any existing Augeas handle will be closed."
7398 #: ../src/guestfs-actions.pod:2253 ../fish/guestfish-actions.pod:1797
7400 "This function cannot decrypt encrypted disks. The caller must do that first "
7401 "(supplying the necessary keys) if the disk is encrypted."
7405 #: ../src/guestfs-actions.pod:2263
7406 msgid "guestfs_is_busy"
7410 #: ../src/guestfs-actions.pod:2265
7413 " int guestfs_is_busy (guestfs_h *g);\n"
7418 #: ../src/guestfs-actions.pod:2267 ../fish/guestfish-actions.pod:1807
7420 "This returns true iff this handle is busy processing a command (in the "
7425 #: ../src/guestfs-actions.pod:2274
7426 msgid "guestfs_is_config"
7430 #: ../src/guestfs-actions.pod:2276
7433 " int guestfs_is_config (guestfs_h *g);\n"
7438 #: ../src/guestfs-actions.pod:2278 ../fish/guestfish-actions.pod:1816
7440 "This returns true iff this handle is being configured (in the C<CONFIG> "
7445 #: ../src/guestfs-actions.pod:2285
7446 msgid "guestfs_is_dir"
7450 #: ../src/guestfs-actions.pod:2287
7453 " int guestfs_is_dir (guestfs_h *g,\n"
7454 "\t\tconst char *path);\n"
7459 #: ../src/guestfs-actions.pod:2290 ../fish/guestfish-actions.pod:1825
7461 "This returns C<true> if and only if there is a directory with the given "
7462 "C<path> name. Note that it returns false for other objects like files."
7466 #: ../src/guestfs-actions.pod:2294 ../src/guestfs-actions.pod:2307
7467 msgid "See also C<guestfs_stat>."
7471 #: ../src/guestfs-actions.pod:2298
7472 msgid "guestfs_is_file"
7476 #: ../src/guestfs-actions.pod:2300
7479 " int guestfs_is_file (guestfs_h *g,\n"
7480 "\t\tconst char *path);\n"
7485 #: ../src/guestfs-actions.pod:2303 ../fish/guestfish-actions.pod:1835
7487 "This returns C<true> if and only if there is a file with the given C<path> "
7488 "name. Note that it returns false for other objects like directories."
7492 #: ../src/guestfs-actions.pod:2311
7493 msgid "guestfs_is_launching"
7497 #: ../src/guestfs-actions.pod:2313
7500 " int guestfs_is_launching (guestfs_h *g);\n"
7505 #: ../src/guestfs-actions.pod:2315 ../fish/guestfish-actions.pod:1845
7507 "This returns true iff this handle is launching the subprocess (in the "
7508 "C<LAUNCHING> state)."
7512 #: ../src/guestfs-actions.pod:2322
7513 msgid "guestfs_is_lv"
7517 #: ../src/guestfs-actions.pod:2324
7520 " int guestfs_is_lv (guestfs_h *g,\n"
7521 "\t\tconst char *device);\n"
7526 #: ../src/guestfs-actions.pod:2327 ../fish/guestfish-actions.pod:1854
7528 "This command tests whether C<device> is a logical volume, and returns true "
7529 "iff this is the case."
7533 #: ../src/guestfs-actions.pod:2332
7534 msgid "guestfs_is_ready"
7538 #: ../src/guestfs-actions.pod:2334
7541 " int guestfs_is_ready (guestfs_h *g);\n"
7546 #: ../src/guestfs-actions.pod:2336 ../fish/guestfish-actions.pod:1861
7548 "This returns true iff this handle is ready to accept commands (in the "
7553 #: ../src/guestfs-actions.pod:2343
7554 msgid "guestfs_kill_subprocess"
7558 #: ../src/guestfs-actions.pod:2345
7561 " int guestfs_kill_subprocess (guestfs_h *g);\n"
7566 #: ../src/guestfs-actions.pod:2347 ../fish/guestfish-actions.pod:1870
7567 msgid "This kills the qemu subprocess. You should never need to call this."
7571 #: ../src/guestfs-actions.pod:2351
7572 msgid "guestfs_launch"
7576 #: ../src/guestfs-actions.pod:2353
7579 " int guestfs_launch (guestfs_h *g);\n"
7584 #: ../src/guestfs-actions.pod:2355 ../fish/guestfish-actions.pod:1876
7586 "Internally libguestfs is implemented by running a virtual machine using "
7591 #: ../src/guestfs-actions.pod:2358 ../fish/guestfish-actions.pod:1879
7593 "You should call this after configuring the handle (eg. adding drives) but "
7594 "before performing any actions."
7598 #: ../src/guestfs-actions.pod:2363
7599 msgid "guestfs_lchown"
7603 #: ../src/guestfs-actions.pod:2365
7606 " int guestfs_lchown (guestfs_h *g,\n"
7609 "\t\tconst char *path);\n"
7614 #: ../src/guestfs-actions.pod:2370
7616 "Change the file owner to C<owner> and group to C<group>. This is like "
7617 "C<guestfs_chown> but if C<path> is a symlink then the link itself is "
7618 "changed, not the target."
7622 #: ../src/guestfs-actions.pod:2380
7623 msgid "guestfs_lgetxattrs"
7627 #: ../src/guestfs-actions.pod:2382
7630 " struct guestfs_xattr_list *guestfs_lgetxattrs (guestfs_h *g,\n"
7631 "\t\tconst char *path);\n"
7636 #: ../src/guestfs-actions.pod:2385
7638 "This is the same as C<guestfs_getxattrs>, but if C<path> is a symbolic link, "
7639 "then it returns the extended attributes of the link itself."
7643 #: ../src/guestfs-actions.pod:2394
7644 msgid "guestfs_list_devices"
7648 #: ../src/guestfs-actions.pod:2396
7651 " char **guestfs_list_devices (guestfs_h *g);\n"
7656 #: ../src/guestfs-actions.pod:2398 ../fish/guestfish-actions.pod:1906
7657 msgid "List all the block devices."
7661 #: ../src/guestfs-actions.pod:2400 ../fish/guestfish-actions.pod:1908
7662 msgid "The full block device names are returned, eg. C</dev/sda>"
7666 #: ../src/guestfs-actions.pod:2406
7667 msgid "guestfs_list_partitions"
7671 #: ../src/guestfs-actions.pod:2408
7674 " char **guestfs_list_partitions (guestfs_h *g);\n"
7679 #: ../src/guestfs-actions.pod:2410 ../fish/guestfish-actions.pod:1914
7680 msgid "List all the partitions detected on all block devices."
7684 #: ../src/guestfs-actions.pod:2412 ../fish/guestfish-actions.pod:1916
7685 msgid "The full partition device names are returned, eg. C</dev/sda1>"
7689 #: ../src/guestfs-actions.pod:2414
7691 "This does not return logical volumes. For that you will need to call "
7696 #: ../src/guestfs-actions.pod:2421
7701 #: ../src/guestfs-actions.pod:2423
7704 " char *guestfs_ll (guestfs_h *g,\n"
7705 "\t\tconst char *directory);\n"
7710 #: ../src/guestfs-actions.pod:2426 ../fish/guestfish-actions.pod:1925
7712 "List the files in C<directory> (relative to the root directory, there is no "
7713 "cwd) in the format of 'ls -la'."
7717 #: ../src/guestfs-actions.pod:2429 ../fish/guestfish-actions.pod:1928
7719 "This command is mostly useful for interactive sessions. It is I<not> "
7720 "intended that you try to parse the output string."
7724 #: ../src/guestfs-actions.pod:2435
7729 #: ../src/guestfs-actions.pod:2437
7732 " int guestfs_ln (guestfs_h *g,\n"
7733 "\t\tconst char *target,\n"
7734 "\t\tconst char *linkname);\n"
7739 #: ../src/guestfs-actions.pod:2441 ../fish/guestfish-actions.pod:1935
7740 msgid "This command creates a hard link using the C<ln> command."
7744 #: ../src/guestfs-actions.pod:2445
7745 msgid "guestfs_ln_f"
7749 #: ../src/guestfs-actions.pod:2447
7752 " int guestfs_ln_f (guestfs_h *g,\n"
7753 "\t\tconst char *target,\n"
7754 "\t\tconst char *linkname);\n"
7759 #: ../src/guestfs-actions.pod:2451 ../fish/guestfish-actions.pod:1941
7761 "This command creates a hard link using the C<ln -f> command. The C<-f> "
7762 "option removes the link (C<linkname>) if it exists already."
7766 #: ../src/guestfs-actions.pod:2456
7767 msgid "guestfs_ln_s"
7771 #: ../src/guestfs-actions.pod:2458
7774 " int guestfs_ln_s (guestfs_h *g,\n"
7775 "\t\tconst char *target,\n"
7776 "\t\tconst char *linkname);\n"
7781 #: ../src/guestfs-actions.pod:2462 ../fish/guestfish-actions.pod:1948
7782 msgid "This command creates a symbolic link using the C<ln -s> command."
7786 #: ../src/guestfs-actions.pod:2466
7787 msgid "guestfs_ln_sf"
7791 #: ../src/guestfs-actions.pod:2468
7794 " int guestfs_ln_sf (guestfs_h *g,\n"
7795 "\t\tconst char *target,\n"
7796 "\t\tconst char *linkname);\n"
7801 #: ../src/guestfs-actions.pod:2472 ../fish/guestfish-actions.pod:1954
7803 "This command creates a symbolic link using the C<ln -sf> command, The C<-f> "
7804 "option removes the link (C<linkname>) if it exists already."
7808 #: ../src/guestfs-actions.pod:2477
7809 msgid "guestfs_lremovexattr"
7813 #: ../src/guestfs-actions.pod:2479
7816 " int guestfs_lremovexattr (guestfs_h *g,\n"
7817 "\t\tconst char *xattr,\n"
7818 "\t\tconst char *path);\n"
7823 #: ../src/guestfs-actions.pod:2483
7825 "This is the same as C<guestfs_removexattr>, but if C<path> is a symbolic "
7826 "link, then it removes an extended attribute of the link itself."
7830 #: ../src/guestfs-actions.pod:2489
7835 #: ../src/guestfs-actions.pod:2491
7838 " char **guestfs_ls (guestfs_h *g,\n"
7839 "\t\tconst char *directory);\n"
7844 #: ../src/guestfs-actions.pod:2494 ../fish/guestfish-actions.pod:1969
7846 "List the files in C<directory> (relative to the root directory, there is no "
7847 "cwd). The '.' and '..' entries are not returned, but hidden files are "
7852 #: ../src/guestfs-actions.pod:2498
7854 "This command is mostly useful for interactive sessions. Programs should "
7855 "probably use C<guestfs_readdir> instead."
7859 #: ../src/guestfs-actions.pod:2505
7860 msgid "guestfs_lsetxattr"
7864 #: ../src/guestfs-actions.pod:2507
7867 " int guestfs_lsetxattr (guestfs_h *g,\n"
7868 "\t\tconst char *xattr,\n"
7869 "\t\tconst char *val,\n"
7871 "\t\tconst char *path);\n"
7876 #: ../src/guestfs-actions.pod:2513
7878 "This is the same as C<guestfs_setxattr>, but if C<path> is a symbolic link, "
7879 "then it sets an extended attribute of the link itself."
7883 #: ../src/guestfs-actions.pod:2519
7884 msgid "guestfs_lstat"
7888 #: ../src/guestfs-actions.pod:2521
7891 " struct guestfs_stat *guestfs_lstat (guestfs_h *g,\n"
7892 "\t\tconst char *path);\n"
7897 #: ../src/guestfs-actions.pod:2524 ../src/guestfs-actions.pod:4507 ../fish/guestfish-actions.pod:1988 ../fish/guestfish-actions.pod:3477
7898 msgid "Returns file information for the given C<path>."
7902 #: ../src/guestfs-actions.pod:2526
7904 "This is the same as C<guestfs_stat> except that if C<path> is a symbolic "
7905 "link, then the link is stat-ed, not the file it refers to."
7909 #: ../src/guestfs-actions.pod:2530 ../fish/guestfish-actions.pod:1994
7910 msgid "This is the same as the C<lstat(2)> system call."
7914 #: ../src/guestfs-actions.pod:2532 ../src/guestfs-actions.pod:4511
7916 "This function returns a C<struct guestfs_stat *>, or NULL if there was an "
7917 "error. I<The caller must call C<guestfs_free_stat> after use>."
7921 #: ../src/guestfs-actions.pod:2536
7922 msgid "guestfs_lstatlist"
7926 #: ../src/guestfs-actions.pod:2538
7929 " struct guestfs_stat_list *guestfs_lstatlist (guestfs_h *g,\n"
7930 "\t\tconst char *path,\n"
7931 "\t\tchar *const *names);\n"
7936 #: ../src/guestfs-actions.pod:2542
7938 "This call allows you to perform the C<guestfs_lstat> operation on multiple "
7939 "files, where all files are in the directory C<path>. C<names> is the list "
7940 "of files from this directory."
7944 #: ../src/guestfs-actions.pod:2546 ../fish/guestfish-actions.pod:2004
7946 "On return you get a list of stat structs, with a one-to-one correspondence "
7947 "to the C<names> list. If any name did not exist or could not be lstat'd, "
7948 "then the C<ino> field of that structure is set to C<-1>."
7952 #: ../src/guestfs-actions.pod:2551
7954 "This call is intended for programs that want to efficiently list a directory "
7955 "contents without making many round-trips. See also C<guestfs_lxattrlist> "
7956 "for a similarly efficient call for getting extended attributes. Very long "
7957 "directory listings might cause the protocol message size to be exceeded, "
7958 "causing this call to fail. The caller must split up such requests into "
7959 "smaller groups of names."
7963 #: ../src/guestfs-actions.pod:2559
7965 "This function returns a C<struct guestfs_stat_list *> (see "
7966 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
7967 "must call C<guestfs_free_stat_list> after use>."
7971 #: ../src/guestfs-actions.pod:2564
7972 msgid "guestfs_luks_add_key"
7976 #: ../src/guestfs-actions.pod:2566
7979 " int guestfs_luks_add_key (guestfs_h *g,\n"
7980 "\t\tconst char *device,\n"
7981 "\t\tconst char *key,\n"
7982 "\t\tconst char *newkey,\n"
7983 "\t\tint keyslot);\n"
7988 #: ../src/guestfs-actions.pod:2572 ../fish/guestfish-actions.pod:2021
7990 "This command adds a new key on LUKS device C<device>. C<key> is any "
7991 "existing key, and is used to access the device. C<newkey> is the new key to "
7992 "add. C<keyslot> is the key slot that will be replaced."
7996 #: ../src/guestfs-actions.pod:2577
7998 "Note that if C<keyslot> already contains a key, then this command will "
7999 "fail. You have to use C<guestfs_luks_kill_slot> first to remove that key."
8003 #: ../src/guestfs-actions.pod:2583 ../src/guestfs-actions.pod:2617 ../src/guestfs-actions.pod:2637 ../src/guestfs-actions.pod:2654 ../src/guestfs-actions.pod:2683 ../src/guestfs-actions.pod:2699
8005 "This function takes a key or passphrase parameter which could contain "
8006 "sensitive material. Read the section L</KEYS AND PASSPHRASES> for more "
8011 #: ../src/guestfs-actions.pod:2587
8012 msgid "guestfs_luks_close"
8016 #: ../src/guestfs-actions.pod:2589
8019 " int guestfs_luks_close (guestfs_h *g,\n"
8020 "\t\tconst char *device);\n"
8025 #: ../src/guestfs-actions.pod:2592
8027 "This closes a LUKS device that was created earlier by C<guestfs_luks_open> "
8028 "or C<guestfs_luks_open_ro>. The C<device> parameter must be the name of the "
8029 "LUKS mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
8030 "underlying block device."
8034 #: ../src/guestfs-actions.pod:2600
8035 msgid "guestfs_luks_format"
8039 #: ../src/guestfs-actions.pod:2602
8042 " int guestfs_luks_format (guestfs_h *g,\n"
8043 "\t\tconst char *device,\n"
8044 "\t\tconst char *key,\n"
8045 "\t\tint keyslot);\n"
8050 #: ../src/guestfs-actions.pod:2607 ../fish/guestfish-actions.pod:2047
8052 "This command erases existing data on C<device> and formats the device as a "
8053 "LUKS encrypted device. C<key> is the initial key, which is added to key "
8054 "slot C<slot>. (LUKS supports 8 key slots, numbered 0-7)."
8058 #: ../src/guestfs-actions.pod:2614 ../src/guestfs-actions.pod:2634 ../src/guestfs-actions.pod:2736 ../src/guestfs-actions.pod:3448 ../src/guestfs-actions.pod:4048 ../src/guestfs-actions.pod:4369 ../src/guestfs-actions.pod:4389 ../src/guestfs-actions.pod:4412 ../src/guestfs-actions.pod:5351 ../fish/guestfish-actions.pod:2055 ../fish/guestfish-actions.pod:2068 ../fish/guestfish-actions.pod:2139 ../fish/guestfish-actions.pod:2654 ../fish/guestfish-actions.pod:3118 ../fish/guestfish-actions.pod:3376 ../fish/guestfish-actions.pod:3392 ../fish/guestfish-actions.pod:3407 ../fish/guestfish-actions.pod:4095
8060 "B<This command is dangerous. Without careful use you can easily destroy all "
8065 #: ../src/guestfs-actions.pod:2621
8066 msgid "guestfs_luks_format_cipher"
8070 #: ../src/guestfs-actions.pod:2623
8073 " int guestfs_luks_format_cipher (guestfs_h *g,\n"
8074 "\t\tconst char *device,\n"
8075 "\t\tconst char *key,\n"
8076 "\t\tint keyslot,\n"
8077 "\t\tconst char *cipher);\n"
8082 #: ../src/guestfs-actions.pod:2629
8084 "This command is the same as C<guestfs_luks_format> but it also allows you to "
8085 "set the C<cipher> used."
8089 #: ../src/guestfs-actions.pod:2641
8090 msgid "guestfs_luks_kill_slot"
8094 #: ../src/guestfs-actions.pod:2643
8097 " int guestfs_luks_kill_slot (guestfs_h *g,\n"
8098 "\t\tconst char *device,\n"
8099 "\t\tconst char *key,\n"
8100 "\t\tint keyslot);\n"
8105 #: ../src/guestfs-actions.pod:2648 ../fish/guestfish-actions.pod:2075
8107 "This command deletes the key in key slot C<keyslot> from the encrypted LUKS "
8108 "device C<device>. C<key> must be one of the I<other> keys."
8112 #: ../src/guestfs-actions.pod:2658
8113 msgid "guestfs_luks_open"
8117 #: ../src/guestfs-actions.pod:2660
8120 " int guestfs_luks_open (guestfs_h *g,\n"
8121 "\t\tconst char *device,\n"
8122 "\t\tconst char *key,\n"
8123 "\t\tconst char *mapname);\n"
8128 #: ../src/guestfs-actions.pod:2665 ../fish/guestfish-actions.pod:2086
8130 "This command opens a block device which has been encrypted according to the "
8131 "Linux Unified Key Setup (LUKS) standard."
8135 #: ../src/guestfs-actions.pod:2668 ../fish/guestfish-actions.pod:2089
8136 msgid "C<device> is the encrypted block device or partition."
8140 #: ../src/guestfs-actions.pod:2670 ../fish/guestfish-actions.pod:2091
8142 "The caller must supply one of the keys associated with the LUKS block "
8143 "device, in the C<key> parameter."
8147 #: ../src/guestfs-actions.pod:2673 ../fish/guestfish-actions.pod:2094
8149 "This creates a new block device called C</dev/mapper/mapname>. Reads and "
8150 "writes to this block device are decrypted from and encrypted to the "
8151 "underlying C<device> respectively."
8155 #: ../src/guestfs-actions.pod:2677
8157 "If this block device contains LVM volume groups, then calling "
8158 "C<guestfs_vgscan> followed by C<guestfs_vg_activate_all> will make them "
8163 #: ../src/guestfs-actions.pod:2687
8164 msgid "guestfs_luks_open_ro"
8168 #: ../src/guestfs-actions.pod:2689
8171 " int guestfs_luks_open_ro (guestfs_h *g,\n"
8172 "\t\tconst char *device,\n"
8173 "\t\tconst char *key,\n"
8174 "\t\tconst char *mapname);\n"
8179 #: ../src/guestfs-actions.pod:2694
8181 "This is the same as C<guestfs_luks_open> except that a read-only mapping is "
8186 #: ../src/guestfs-actions.pod:2703
8187 msgid "guestfs_lvcreate"
8191 #: ../src/guestfs-actions.pod:2705
8194 " int guestfs_lvcreate (guestfs_h *g,\n"
8195 "\t\tconst char *logvol,\n"
8196 "\t\tconst char *volgroup,\n"
8197 "\t\tint mbytes);\n"
8202 #: ../src/guestfs-actions.pod:2710 ../fish/guestfish-actions.pod:2119
8204 "This creates an LVM logical volume called C<logvol> on the volume group "
8205 "C<volgroup>, with C<size> megabytes."
8209 #: ../src/guestfs-actions.pod:2715
8210 msgid "guestfs_lvm_clear_filter"
8214 #: ../src/guestfs-actions.pod:2717
8217 " int guestfs_lvm_clear_filter (guestfs_h *g);\n"
8222 #: ../src/guestfs-actions.pod:2719
8224 "This undoes the effect of C<guestfs_lvm_set_filter>. LVM will be able to "
8225 "see every block device."
8229 #: ../src/guestfs-actions.pod:2722 ../src/guestfs-actions.pod:2758 ../fish/guestfish-actions.pod:2129 ../fish/guestfish-actions.pod:2160
8230 msgid "This command also clears the LVM cache and performs a volume group scan."
8234 #: ../src/guestfs-actions.pod:2727
8235 msgid "guestfs_lvm_remove_all"
8239 #: ../src/guestfs-actions.pod:2729
8242 " int guestfs_lvm_remove_all (guestfs_h *g);\n"
8247 #: ../src/guestfs-actions.pod:2731 ../fish/guestfish-actions.pod:2136
8249 "This command removes all LVM logical volumes, volume groups and physical "
8254 #: ../src/guestfs-actions.pod:2739
8255 msgid "guestfs_lvm_set_filter"
8259 #: ../src/guestfs-actions.pod:2741
8262 " int guestfs_lvm_set_filter (guestfs_h *g,\n"
8263 "\t\tchar *const *devices);\n"
8268 #: ../src/guestfs-actions.pod:2744 ../fish/guestfish-actions.pod:2146
8270 "This sets the LVM device filter so that LVM will only be able to \"see\" the "
8271 "block devices in the list C<devices>, and will ignore all other attached "
8276 #: ../src/guestfs-actions.pod:2748 ../fish/guestfish-actions.pod:2150
8278 "Where disk image(s) contain duplicate PVs or VGs, this command is useful to "
8279 "get LVM to ignore the duplicates, otherwise LVM can get confused. Note also "
8280 "there are two types of duplication possible: either cloned PVs/VGs which "
8281 "have identical UUIDs; or VGs that are not cloned but just happen to have the "
8282 "same name. In normal operation you cannot create this situation, but you "
8283 "can do it outside LVM, eg. by cloning disk images or by bit twiddling "
8284 "inside the LVM metadata."
8288 #: ../src/guestfs-actions.pod:2761 ../fish/guestfish-actions.pod:2163
8289 msgid "You can filter whole block devices or individual partitions."
8293 #: ../src/guestfs-actions.pod:2763 ../fish/guestfish-actions.pod:2165
8295 "You cannot use this if any VG is currently in use (eg. contains a mounted "
8296 "filesystem), even if you are not filtering out that VG."
8300 #: ../src/guestfs-actions.pod:2769
8301 msgid "guestfs_lvremove"
8305 #: ../src/guestfs-actions.pod:2771
8308 " int guestfs_lvremove (guestfs_h *g,\n"
8309 "\t\tconst char *device);\n"
8314 #: ../src/guestfs-actions.pod:2774 ../fish/guestfish-actions.pod:2173
8316 "Remove an LVM logical volume C<device>, where C<device> is the path to the "
8317 "LV, such as C</dev/VG/LV>."
8321 #: ../src/guestfs-actions.pod:2777 ../fish/guestfish-actions.pod:2176
8323 "You can also remove all LVs in a volume group by specifying the VG name, "
8328 #: ../src/guestfs-actions.pod:2782
8329 msgid "guestfs_lvrename"
8333 #: ../src/guestfs-actions.pod:2784
8336 " int guestfs_lvrename (guestfs_h *g,\n"
8337 "\t\tconst char *logvol,\n"
8338 "\t\tconst char *newlogvol);\n"
8343 #: ../src/guestfs-actions.pod:2788 ../fish/guestfish-actions.pod:2183
8344 msgid "Rename a logical volume C<logvol> with the new name C<newlogvol>."
8348 #: ../src/guestfs-actions.pod:2792
8349 msgid "guestfs_lvresize"
8353 #: ../src/guestfs-actions.pod:2794
8356 " int guestfs_lvresize (guestfs_h *g,\n"
8357 "\t\tconst char *device,\n"
8358 "\t\tint mbytes);\n"
8363 #: ../src/guestfs-actions.pod:2798 ../fish/guestfish-actions.pod:2189
8365 "This resizes (expands or shrinks) an existing LVM logical volume to "
8366 "C<mbytes>. When reducing, data in the reduced part is lost."
8370 #: ../src/guestfs-actions.pod:2804
8371 msgid "guestfs_lvresize_free"
8375 #: ../src/guestfs-actions.pod:2806
8378 " int guestfs_lvresize_free (guestfs_h *g,\n"
8379 "\t\tconst char *lv,\n"
8380 "\t\tint percent);\n"
8385 #: ../src/guestfs-actions.pod:2810 ../fish/guestfish-actions.pod:2197
8387 "This expands an existing logical volume C<lv> so that it fills C<pc>% of the "
8388 "remaining free space in the volume group. Commonly you would call this with "
8389 "pc = 100 which expands the logical volume as much as possible, using all "
8390 "remaining free space in the volume group."
8394 #: ../src/guestfs-actions.pod:2818
8399 #: ../src/guestfs-actions.pod:2820
8402 " char **guestfs_lvs (guestfs_h *g);\n"
8407 #: ../src/guestfs-actions.pod:2822 ../fish/guestfish-actions.pod:2207
8409 "List all the logical volumes detected. This is the equivalent of the "
8410 "L<lvs(8)> command."
8414 #: ../src/guestfs-actions.pod:2825 ../fish/guestfish-actions.pod:2210
8416 "This returns a list of the logical volume device names "
8417 "(eg. C</dev/VolGroup00/LogVol00>)."
8421 #: ../src/guestfs-actions.pod:2828
8422 msgid "See also C<guestfs_lvs_full>."
8426 #: ../src/guestfs-actions.pod:2834
8427 msgid "guestfs_lvs_full"
8431 #: ../src/guestfs-actions.pod:2836
8434 " struct guestfs_lvm_lv_list *guestfs_lvs_full (guestfs_h *g);\n"
8439 #: ../src/guestfs-actions.pod:2838 ../fish/guestfish-actions.pod:2219
8441 "List all the logical volumes detected. This is the equivalent of the "
8442 "L<lvs(8)> command. The \"full\" version includes all fields."
8446 #: ../src/guestfs-actions.pod:2841
8448 "This function returns a C<struct guestfs_lvm_lv_list *> (see "
8449 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
8450 "must call C<guestfs_free_lvm_lv_list> after use>."
8454 #: ../src/guestfs-actions.pod:2846
8455 msgid "guestfs_lvuuid"
8459 #: ../src/guestfs-actions.pod:2848
8462 " char *guestfs_lvuuid (guestfs_h *g,\n"
8463 "\t\tconst char *device);\n"
8468 #: ../src/guestfs-actions.pod:2851 ../fish/guestfish-actions.pod:2226
8469 msgid "This command returns the UUID of the LVM LV C<device>."
8473 #: ../src/guestfs-actions.pod:2856
8474 msgid "guestfs_lxattrlist"
8478 #: ../src/guestfs-actions.pod:2858
8481 " struct guestfs_xattr_list *guestfs_lxattrlist (guestfs_h *g,\n"
8482 "\t\tconst char *path,\n"
8483 "\t\tchar *const *names);\n"
8488 #: ../src/guestfs-actions.pod:2862 ../fish/guestfish-actions.pod:2232
8490 "This call allows you to get the extended attributes of multiple files, where "
8491 "all files are in the directory C<path>. C<names> is the list of files from "
8496 #: ../src/guestfs-actions.pod:2866 ../fish/guestfish-actions.pod:2236
8498 "On return you get a flat list of xattr structs which must be interpreted "
8499 "sequentially. The first xattr struct always has a zero-length C<attrname>. "
8500 "C<attrval> in this struct is zero-length to indicate there was an error "
8501 "doing C<lgetxattr> for this file, I<or> is a C string which is a decimal "
8502 "number (the number of following attributes for this file, which could be "
8503 "C<\"0\">). Then after the first xattr struct are the zero or more "
8504 "attributes for the first named file. This repeats for the second and "
8509 #: ../src/guestfs-actions.pod:2876
8511 "This call is intended for programs that want to efficiently list a directory "
8512 "contents without making many round-trips. See also C<guestfs_lstatlist> for "
8513 "a similarly efficient call for getting standard stats. Very long directory "
8514 "listings might cause the protocol message size to be exceeded, causing this "
8515 "call to fail. The caller must split up such requests into smaller groups of "
8520 #: ../src/guestfs-actions.pod:2889
8521 msgid "guestfs_mkdir"
8525 #: ../src/guestfs-actions.pod:2891
8528 " int guestfs_mkdir (guestfs_h *g,\n"
8529 "\t\tconst char *path);\n"
8534 #: ../src/guestfs-actions.pod:2894 ../fish/guestfish-actions.pod:2258
8535 msgid "Create a directory named C<path>."
8539 #: ../src/guestfs-actions.pod:2898
8540 msgid "guestfs_mkdir_mode"
8544 #: ../src/guestfs-actions.pod:2900
8547 " int guestfs_mkdir_mode (guestfs_h *g,\n"
8548 "\t\tconst char *path,\n"
8554 #: ../src/guestfs-actions.pod:2904 ../fish/guestfish-actions.pod:2264
8556 "This command creates a directory, setting the initial permissions of the "
8557 "directory to C<mode>."
8561 #: ../src/guestfs-actions.pod:2907 ../fish/guestfish-actions.pod:2267
8563 "For common Linux filesystems, the actual mode which is set will be C<mode & "
8564 "~umask & 01777>. Non-native-Linux filesystems may interpret the mode in "
8569 #: ../src/guestfs-actions.pod:2911
8570 msgid "See also C<guestfs_mkdir>, C<guestfs_umask>"
8574 #: ../src/guestfs-actions.pod:2915
8575 msgid "guestfs_mkdir_p"
8579 #: ../src/guestfs-actions.pod:2917
8582 " int guestfs_mkdir_p (guestfs_h *g,\n"
8583 "\t\tconst char *path);\n"
8588 #: ../src/guestfs-actions.pod:2920 ../fish/guestfish-actions.pod:2277
8590 "Create a directory named C<path>, creating any parent directories as "
8591 "necessary. This is like the C<mkdir -p> shell command."
8595 #: ../src/guestfs-actions.pod:2925
8596 msgid "guestfs_mkdtemp"
8600 #: ../src/guestfs-actions.pod:2927
8603 " char *guestfs_mkdtemp (guestfs_h *g,\n"
8604 "\t\tconst char *template);\n"
8609 #: ../src/guestfs-actions.pod:2930 ../fish/guestfish-actions.pod:2284
8611 "This command creates a temporary directory. The C<template> parameter "
8612 "should be a full pathname for the temporary directory name with the final "
8613 "six characters being \"XXXXXX\"."
8617 #: ../src/guestfs-actions.pod:2935 ../fish/guestfish-actions.pod:2289
8619 "For example: \"/tmp/myprogXXXXXX\" or \"/Temp/myprogXXXXXX\", the second one "
8620 "being suitable for Windows filesystems."
8624 #: ../src/guestfs-actions.pod:2938 ../fish/guestfish-actions.pod:2292
8625 msgid "The name of the temporary directory that was created is returned."
8629 #: ../src/guestfs-actions.pod:2941 ../fish/guestfish-actions.pod:2295
8630 msgid "The temporary directory is created with mode 0700 and is owned by root."
8634 #: ../src/guestfs-actions.pod:2944 ../fish/guestfish-actions.pod:2298
8636 "The caller is responsible for deleting the temporary directory and its "
8637 "contents after use."
8641 #: ../src/guestfs-actions.pod:2947 ../fish/guestfish-actions.pod:2301
8642 msgid "See also: L<mkdtemp(3)>"
8646 #: ../src/guestfs-actions.pod:2952
8647 msgid "guestfs_mke2fs_J"
8651 #: ../src/guestfs-actions.pod:2954
8654 " int guestfs_mke2fs_J (guestfs_h *g,\n"
8655 "\t\tconst char *fstype,\n"
8656 "\t\tint blocksize,\n"
8657 "\t\tconst char *device,\n"
8658 "\t\tconst char *journal);\n"
8663 #: ../src/guestfs-actions.pod:2960 ../fish/guestfish-actions.pod:2307
8665 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
8666 "C<journal>. It is equivalent to the command:"
8670 #: ../src/guestfs-actions.pod:2964 ../fish/guestfish-actions.pod:2311
8673 " mke2fs -t fstype -b blocksize -J device=<journal> <device>\n"
8678 #: ../src/guestfs-actions.pod:2966
8679 msgid "See also C<guestfs_mke2journal>."
8683 #: ../src/guestfs-actions.pod:2970
8684 msgid "guestfs_mke2fs_JL"
8688 #: ../src/guestfs-actions.pod:2972
8691 " int guestfs_mke2fs_JL (guestfs_h *g,\n"
8692 "\t\tconst char *fstype,\n"
8693 "\t\tint blocksize,\n"
8694 "\t\tconst char *device,\n"
8695 "\t\tconst char *label);\n"
8700 #: ../src/guestfs-actions.pod:2978 ../fish/guestfish-actions.pod:2319
8702 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
8703 "the journal labeled C<label>."
8707 #: ../src/guestfs-actions.pod:2981
8708 msgid "See also C<guestfs_mke2journal_L>."
8712 #: ../src/guestfs-actions.pod:2985
8713 msgid "guestfs_mke2fs_JU"
8717 #: ../src/guestfs-actions.pod:2987
8720 " int guestfs_mke2fs_JU (guestfs_h *g,\n"
8721 "\t\tconst char *fstype,\n"
8722 "\t\tint blocksize,\n"
8723 "\t\tconst char *device,\n"
8724 "\t\tconst char *uuid);\n"
8729 #: ../src/guestfs-actions.pod:2993 ../fish/guestfish-actions.pod:2328
8731 "This creates an ext2/3/4 filesystem on C<device> with an external journal on "
8732 "the journal with UUID C<uuid>."
8736 #: ../src/guestfs-actions.pod:2996
8737 msgid "See also C<guestfs_mke2journal_U>."
8741 #: ../src/guestfs-actions.pod:3000
8742 msgid "guestfs_mke2journal"
8746 #: ../src/guestfs-actions.pod:3002
8749 " int guestfs_mke2journal (guestfs_h *g,\n"
8750 "\t\tint blocksize,\n"
8751 "\t\tconst char *device);\n"
8756 #: ../src/guestfs-actions.pod:3006 ../fish/guestfish-actions.pod:2337
8758 "This creates an ext2 external journal on C<device>. It is equivalent to the "
8763 #: ../src/guestfs-actions.pod:3009 ../fish/guestfish-actions.pod:2340
8766 " mke2fs -O journal_dev -b blocksize device\n"
8771 #: ../src/guestfs-actions.pod:3013
8772 msgid "guestfs_mke2journal_L"
8776 #: ../src/guestfs-actions.pod:3015
8779 " int guestfs_mke2journal_L (guestfs_h *g,\n"
8780 "\t\tint blocksize,\n"
8781 "\t\tconst char *label,\n"
8782 "\t\tconst char *device);\n"
8787 #: ../src/guestfs-actions.pod:3020 ../fish/guestfish-actions.pod:2346
8788 msgid "This creates an ext2 external journal on C<device> with label C<label>."
8792 #: ../src/guestfs-actions.pod:3024
8793 msgid "guestfs_mke2journal_U"
8797 #: ../src/guestfs-actions.pod:3026
8800 " int guestfs_mke2journal_U (guestfs_h *g,\n"
8801 "\t\tint blocksize,\n"
8802 "\t\tconst char *uuid,\n"
8803 "\t\tconst char *device);\n"
8808 #: ../src/guestfs-actions.pod:3031 ../fish/guestfish-actions.pod:2352
8809 msgid "This creates an ext2 external journal on C<device> with UUID C<uuid>."
8813 #: ../src/guestfs-actions.pod:3035
8814 msgid "guestfs_mkfifo"
8818 #: ../src/guestfs-actions.pod:3037
8821 " int guestfs_mkfifo (guestfs_h *g,\n"
8823 "\t\tconst char *path);\n"
8828 #: ../src/guestfs-actions.pod:3041
8830 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
8831 "is just a convenient wrapper around C<guestfs_mknod>."
8835 #: ../src/guestfs-actions.pod:3049
8836 msgid "guestfs_mkfs"
8840 #: ../src/guestfs-actions.pod:3051
8843 " int guestfs_mkfs (guestfs_h *g,\n"
8844 "\t\tconst char *fstype,\n"
8845 "\t\tconst char *device);\n"
8850 #: ../src/guestfs-actions.pod:3055 ../fish/guestfish-actions.pod:2368
8852 "This creates a filesystem on C<device> (usually a partition or LVM logical "
8853 "volume). The filesystem type is C<fstype>, for example C<ext3>."
8857 #: ../src/guestfs-actions.pod:3061
8858 msgid "guestfs_mkfs_b"
8862 #: ../src/guestfs-actions.pod:3063
8865 " int guestfs_mkfs_b (guestfs_h *g,\n"
8866 "\t\tconst char *fstype,\n"
8867 "\t\tint blocksize,\n"
8868 "\t\tconst char *device);\n"
8873 #: ../src/guestfs-actions.pod:3068
8875 "This call is similar to C<guestfs_mkfs>, but it allows you to control the "
8876 "block size of the resulting filesystem. Supported block sizes depend on the "
8877 "filesystem type, but typically they are C<1024>, C<2048> or C<4096> only."
8881 #: ../src/guestfs-actions.pod:3073 ../fish/guestfish-actions.pod:2381
8883 "For VFAT and NTFS the C<blocksize> parameter is treated as the requested "
8888 #: ../src/guestfs-actions.pod:3078
8889 msgid "guestfs_mkmountpoint"
8893 #: ../src/guestfs-actions.pod:3080
8896 " int guestfs_mkmountpoint (guestfs_h *g,\n"
8897 "\t\tconst char *exemptpath);\n"
8902 #: ../src/guestfs-actions.pod:3083
8904 "C<guestfs_mkmountpoint> and C<guestfs_rmmountpoint> are specialized calls "
8905 "that can be used to create extra mountpoints before mounting the first "
8910 #: ../src/guestfs-actions.pod:3087 ../fish/guestfish-actions.pod:2392
8912 "These calls are I<only> necessary in some very limited circumstances, mainly "
8913 "the case where you want to mount a mix of unrelated and/or read-only "
8914 "filesystems together."
8918 #: ../src/guestfs-actions.pod:3091 ../fish/guestfish-actions.pod:2396
8920 "For example, live CDs often contain a \"Russian doll\" nest of filesystems, "
8921 "an ISO outer layer, with a squashfs image inside, with an ext2/3 image "
8922 "inside that. You can unpack this as follows in guestfish:"
8926 #: ../src/guestfs-actions.pod:3096 ../fish/guestfish-actions.pod:2401
8929 " add-ro Fedora-11-i686-Live.iso\n"
8931 " mkmountpoint /cd\n"
8932 " mkmountpoint /squash\n"
8933 " mkmountpoint /ext3\n"
8934 " mount /dev/sda /cd\n"
8935 " mount-loop /cd/LiveOS/squashfs.img /squash\n"
8936 " mount-loop /squash/LiveOS/ext3fs.img /ext3\n"
8941 #: ../src/guestfs-actions.pod:3105 ../fish/guestfish-actions.pod:2410
8942 msgid "The inner filesystem is now unpacked under the /ext3 mountpoint."
8946 #: ../src/guestfs-actions.pod:3109
8947 msgid "guestfs_mknod"
8951 #: ../src/guestfs-actions.pod:3111
8954 " int guestfs_mknod (guestfs_h *g,\n"
8956 "\t\tint devmajor,\n"
8957 "\t\tint devminor,\n"
8958 "\t\tconst char *path);\n"
8963 #: ../src/guestfs-actions.pod:3117 ../fish/guestfish-actions.pod:2416
8965 "This call creates block or character special devices, or named pipes "
8970 #: ../src/guestfs-actions.pod:3120 ../fish/guestfish-actions.pod:2419
8972 "The C<mode> parameter should be the mode, using the standard constants. "
8973 "C<devmajor> and C<devminor> are the device major and minor numbers, only "
8974 "used when creating block and character special devices."
8978 #: ../src/guestfs-actions.pod:3125
8980 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
8981 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
8982 "regular file). These constants are available in the standard Linux header "
8983 "files, or you can use C<guestfs_mknod_b>, C<guestfs_mknod_c> or "
8984 "C<guestfs_mkfifo> which are wrappers around this command which bitwise OR in "
8985 "the appropriate constant for you."
8989 #: ../src/guestfs-actions.pod:3137
8990 msgid "guestfs_mknod_b"
8994 #: ../src/guestfs-actions.pod:3139
8997 " int guestfs_mknod_b (guestfs_h *g,\n"
8999 "\t\tint devmajor,\n"
9000 "\t\tint devminor,\n"
9001 "\t\tconst char *path);\n"
9006 #: ../src/guestfs-actions.pod:3145
9008 "This call creates a block device node called C<path> with mode C<mode> and "
9009 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
9010 "wrapper around C<guestfs_mknod>."
9014 #: ../src/guestfs-actions.pod:3153
9015 msgid "guestfs_mknod_c"
9019 #: ../src/guestfs-actions.pod:3155
9022 " int guestfs_mknod_c (guestfs_h *g,\n"
9024 "\t\tint devmajor,\n"
9025 "\t\tint devminor,\n"
9026 "\t\tconst char *path);\n"
9031 #: ../src/guestfs-actions.pod:3161
9033 "This call creates a char device node called C<path> with mode C<mode> and "
9034 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
9035 "wrapper around C<guestfs_mknod>."
9039 #: ../src/guestfs-actions.pod:3169
9040 msgid "guestfs_mkswap"
9044 #: ../src/guestfs-actions.pod:3171
9047 " int guestfs_mkswap (guestfs_h *g,\n"
9048 "\t\tconst char *device);\n"
9053 #: ../src/guestfs-actions.pod:3174 ../fish/guestfish-actions.pod:2458
9054 msgid "Create a swap partition on C<device>."
9058 #: ../src/guestfs-actions.pod:3178
9059 msgid "guestfs_mkswap_L"
9063 #: ../src/guestfs-actions.pod:3180
9066 " int guestfs_mkswap_L (guestfs_h *g,\n"
9067 "\t\tconst char *label,\n"
9068 "\t\tconst char *device);\n"
9073 #: ../src/guestfs-actions.pod:3184 ../fish/guestfish-actions.pod:2464
9074 msgid "Create a swap partition on C<device> with label C<label>."
9078 #: ../src/guestfs-actions.pod:3186 ../fish/guestfish-actions.pod:2466
9080 "Note that you cannot attach a swap label to a block device "
9081 "(eg. C</dev/sda>), just to a partition. This appears to be a limitation of "
9082 "the kernel or swap tools."
9086 #: ../src/guestfs-actions.pod:3192
9087 msgid "guestfs_mkswap_U"
9091 #: ../src/guestfs-actions.pod:3194
9094 " int guestfs_mkswap_U (guestfs_h *g,\n"
9095 "\t\tconst char *uuid,\n"
9096 "\t\tconst char *device);\n"
9101 #: ../src/guestfs-actions.pod:3198 ../fish/guestfish-actions.pod:2474
9102 msgid "Create a swap partition on C<device> with UUID C<uuid>."
9106 #: ../src/guestfs-actions.pod:3202
9107 msgid "guestfs_mkswap_file"
9111 #: ../src/guestfs-actions.pod:3204
9114 " int guestfs_mkswap_file (guestfs_h *g,\n"
9115 "\t\tconst char *path);\n"
9120 #: ../src/guestfs-actions.pod:3207 ../fish/guestfish-actions.pod:2480
9121 msgid "Create a swap file."
9125 #: ../src/guestfs-actions.pod:3209
9127 "This command just writes a swap file signature to an existing file. To "
9128 "create the file itself, use something like C<guestfs_fallocate>."
9132 #: ../src/guestfs-actions.pod:3214
9133 msgid "guestfs_modprobe"
9137 #: ../src/guestfs-actions.pod:3216
9140 " int guestfs_modprobe (guestfs_h *g,\n"
9141 "\t\tconst char *modulename);\n"
9146 #: ../src/guestfs-actions.pod:3219 ../fish/guestfish-actions.pod:2489
9147 msgid "This loads a kernel module in the appliance."
9151 #: ../src/guestfs-actions.pod:3221 ../fish/guestfish-actions.pod:2491
9153 "The kernel module must have been whitelisted when libguestfs was built (see "
9154 "C<appliance/kmod.whitelist.in> in the source)."
9158 #: ../src/guestfs-actions.pod:3226
9159 msgid "guestfs_mount"
9163 #: ../src/guestfs-actions.pod:3228
9166 " int guestfs_mount (guestfs_h *g,\n"
9167 "\t\tconst char *device,\n"
9168 "\t\tconst char *mountpoint);\n"
9173 #: ../src/guestfs-actions.pod:3232 ../fish/guestfish-actions.pod:2498
9175 "Mount a guest disk at a position in the filesystem. Block devices are named "
9176 "C</dev/sda>, C</dev/sdb> and so on, as they were added to the guest. If "
9177 "those block devices contain partitions, they will have the usual names "
9178 "(eg. C</dev/sda1>). Also LVM C</dev/VG/LV>-style names can be used."
9182 #: ../src/guestfs-actions.pod:3238 ../fish/guestfish-actions.pod:2504
9184 "The rules are the same as for L<mount(2)>: A filesystem must first be "
9185 "mounted on C</> before others can be mounted. Other filesystems can only be "
9186 "mounted on directories which already exist."
9190 #: ../src/guestfs-actions.pod:3243 ../fish/guestfish-actions.pod:2509
9192 "The mounted filesystem is writable, if we have sufficient permissions on the "
9193 "underlying device."
9197 #: ../src/guestfs-actions.pod:3246
9199 "B<Important note:> When you use this call, the filesystem options C<sync> "
9200 "and C<noatime> are set implicitly. This was originally done because we "
9201 "thought it would improve reliability, but it turns out that I<-o sync> has a "
9202 "very large negative performance impact and negligible effect on "
9203 "reliability. Therefore we recommend that you avoid using C<guestfs_mount> "
9204 "in any code that needs performance, and instead use C<guestfs_mount_options> "
9205 "(use an empty string for the first parameter if you don't want any options)."
9209 #: ../src/guestfs-actions.pod:3258
9210 msgid "guestfs_mount_loop"
9214 #: ../src/guestfs-actions.pod:3260
9217 " int guestfs_mount_loop (guestfs_h *g,\n"
9218 "\t\tconst char *file,\n"
9219 "\t\tconst char *mountpoint);\n"
9224 #: ../src/guestfs-actions.pod:3264 ../fish/guestfish-actions.pod:2526
9226 "This command lets you mount C<file> (a filesystem image in a file) on a "
9227 "mount point. It is entirely equivalent to the command C<mount -o loop file "
9232 #: ../src/guestfs-actions.pod:3270
9233 msgid "guestfs_mount_options"
9237 #: ../src/guestfs-actions.pod:3272
9240 " int guestfs_mount_options (guestfs_h *g,\n"
9241 "\t\tconst char *options,\n"
9242 "\t\tconst char *device,\n"
9243 "\t\tconst char *mountpoint);\n"
9248 #: ../src/guestfs-actions.pod:3277
9250 "This is the same as the C<guestfs_mount> command, but it allows you to set "
9251 "the mount options as for the L<mount(8)> I<-o> flag."
9255 #: ../src/guestfs-actions.pod:3281 ../fish/guestfish-actions.pod:2538
9257 "If the C<options> parameter is an empty string, then no options are passed "
9258 "(all options default to whatever the filesystem uses)."
9262 #: ../src/guestfs-actions.pod:3287
9263 msgid "guestfs_mount_ro"
9267 #: ../src/guestfs-actions.pod:3289
9270 " int guestfs_mount_ro (guestfs_h *g,\n"
9271 "\t\tconst char *device,\n"
9272 "\t\tconst char *mountpoint);\n"
9277 #: ../src/guestfs-actions.pod:3293
9279 "This is the same as the C<guestfs_mount> command, but it mounts the "
9280 "filesystem with the read-only (I<-o ro>) flag."
9284 #: ../src/guestfs-actions.pod:3298
9285 msgid "guestfs_mount_vfs"
9289 #: ../src/guestfs-actions.pod:3300
9292 " int guestfs_mount_vfs (guestfs_h *g,\n"
9293 "\t\tconst char *options,\n"
9294 "\t\tconst char *vfstype,\n"
9295 "\t\tconst char *device,\n"
9296 "\t\tconst char *mountpoint);\n"
9301 #: ../src/guestfs-actions.pod:3306
9303 "This is the same as the C<guestfs_mount> command, but it allows you to set "
9304 "both the mount options and the vfstype as for the L<mount(8)> I<-o> and "
9309 #: ../src/guestfs-actions.pod:3312
9310 msgid "guestfs_mountpoints"
9314 #: ../src/guestfs-actions.pod:3314
9317 " char **guestfs_mountpoints (guestfs_h *g);\n"
9322 #: ../src/guestfs-actions.pod:3316
9324 "This call is similar to C<guestfs_mounts>. That call returns a list of "
9325 "devices. This one returns a hash table (map) of device name to directory "
9326 "where the device is mounted."
9330 #: ../src/guestfs-actions.pod:3326
9331 msgid "guestfs_mounts"
9335 #: ../src/guestfs-actions.pod:3328
9338 " char **guestfs_mounts (guestfs_h *g);\n"
9343 #: ../src/guestfs-actions.pod:3330 ../fish/guestfish-actions.pod:2569
9345 "This returns the list of currently mounted filesystems. It returns the list "
9346 "of devices (eg. C</dev/sda1>, C</dev/VG/LV>)."
9350 #: ../src/guestfs-actions.pod:3333 ../fish/guestfish-actions.pod:2572
9351 msgid "Some internal mounts are not shown."
9355 #: ../src/guestfs-actions.pod:3335
9356 msgid "See also: C<guestfs_mountpoints>"
9360 #: ../src/guestfs-actions.pod:3341
9365 #: ../src/guestfs-actions.pod:3343
9368 " int guestfs_mv (guestfs_h *g,\n"
9369 "\t\tconst char *src,\n"
9370 "\t\tconst char *dest);\n"
9375 #: ../src/guestfs-actions.pod:3347 ../fish/guestfish-actions.pod:2580
9377 "This moves a file from C<src> to C<dest> where C<dest> is either a "
9378 "destination filename or destination directory."
9382 #: ../src/guestfs-actions.pod:3352
9383 msgid "guestfs_ntfs_3g_probe"
9387 #: ../src/guestfs-actions.pod:3354
9390 " int guestfs_ntfs_3g_probe (guestfs_h *g,\n"
9392 "\t\tconst char *device);\n"
9397 #: ../src/guestfs-actions.pod:3358 ../fish/guestfish-actions.pod:2587
9399 "This command runs the L<ntfs-3g.probe(8)> command which probes an NTFS "
9400 "C<device> for mountability. (Not all NTFS volumes can be mounted "
9401 "read-write, and some cannot be mounted at all)."
9405 #: ../src/guestfs-actions.pod:3362 ../fish/guestfish-actions.pod:2591
9407 "C<rw> is a boolean flag. Set it to true if you want to test if the volume "
9408 "can be mounted read-write. Set it to false if you want to test if the "
9409 "volume can be mounted read-only."
9413 #: ../src/guestfs-actions.pod:3366 ../fish/guestfish-actions.pod:2595
9415 "The return value is an integer which C<0> if the operation would succeed, or "
9416 "some non-zero value documented in the L<ntfs-3g.probe(8)> manual page."
9420 #: ../src/guestfs-actions.pod:3372
9421 msgid "guestfs_ntfsresize"
9425 #: ../src/guestfs-actions.pod:3374
9428 " int guestfs_ntfsresize (guestfs_h *g,\n"
9429 "\t\tconst char *device);\n"
9434 #: ../src/guestfs-actions.pod:3377 ../fish/guestfish-actions.pod:2603
9436 "This command resizes an NTFS filesystem, expanding or shrinking it to the "
9437 "size of the underlying device. See also L<ntfsresize(8)>."
9441 #: ../src/guestfs-actions.pod:3383
9442 msgid "guestfs_ntfsresize_size"
9446 #: ../src/guestfs-actions.pod:3385
9449 " int guestfs_ntfsresize_size (guestfs_h *g,\n"
9450 "\t\tconst char *device,\n"
9451 "\t\tint64_t size);\n"
9456 #: ../src/guestfs-actions.pod:3389
9458 "This command is the same as C<guestfs_ntfsresize> except that it allows you "
9459 "to specify the new size (in bytes) explicitly."
9463 #: ../src/guestfs-actions.pod:3394
9464 msgid "guestfs_part_add"
9468 #: ../src/guestfs-actions.pod:3396
9471 " int guestfs_part_add (guestfs_h *g,\n"
9472 "\t\tconst char *device,\n"
9473 "\t\tconst char *prlogex,\n"
9474 "\t\tint64_t startsect,\n"
9475 "\t\tint64_t endsect);\n"
9480 #: ../src/guestfs-actions.pod:3402
9482 "This command adds a partition to C<device>. If there is no partition table "
9483 "on the device, call C<guestfs_part_init> first."
9487 #: ../src/guestfs-actions.pod:3405 ../fish/guestfish-actions.pod:2621
9489 "The C<prlogex> parameter is the type of partition. Normally you should pass "
9490 "C<p> or C<primary> here, but MBR partition tables also support C<l> (or "
9491 "C<logical>) and C<e> (or C<extended>) partition types."
9495 #: ../src/guestfs-actions.pod:3410 ../fish/guestfish-actions.pod:2626
9497 "C<startsect> and C<endsect> are the start and end of the partition in "
9498 "I<sectors>. C<endsect> may be negative, which means it counts backwards "
9499 "from the end of the disk (C<-1> is the last sector)."
9503 #: ../src/guestfs-actions.pod:3414
9505 "Creating a partition which covers the whole disk is not so easy. Use "
9506 "C<guestfs_part_disk> to do that."
9510 #: ../src/guestfs-actions.pod:3419
9511 msgid "guestfs_part_del"
9515 #: ../src/guestfs-actions.pod:3421
9518 " int guestfs_part_del (guestfs_h *g,\n"
9519 "\t\tconst char *device,\n"
9520 "\t\tint partnum);\n"
9525 #: ../src/guestfs-actions.pod:3425 ../fish/guestfish-actions.pod:2637
9526 msgid "This command deletes the partition numbered C<partnum> on C<device>."
9530 #: ../src/guestfs-actions.pod:3427 ../fish/guestfish-actions.pod:2639
9532 "Note that in the case of MBR partitioning, deleting an extended partition "
9533 "also deletes any logical partitions it contains."
9537 #: ../src/guestfs-actions.pod:3433
9538 msgid "guestfs_part_disk"
9542 #: ../src/guestfs-actions.pod:3435
9545 " int guestfs_part_disk (guestfs_h *g,\n"
9546 "\t\tconst char *device,\n"
9547 "\t\tconst char *parttype);\n"
9552 #: ../src/guestfs-actions.pod:3439
9554 "This command is simply a combination of C<guestfs_part_init> followed by "
9555 "C<guestfs_part_add> to create a single primary partition covering the whole "
9560 #: ../src/guestfs-actions.pod:3443
9562 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
9563 "possible values are described in C<guestfs_part_init>."
9567 #: ../src/guestfs-actions.pod:3451
9568 msgid "guestfs_part_get_bootable"
9572 #: ../src/guestfs-actions.pod:3453
9575 " int guestfs_part_get_bootable (guestfs_h *g,\n"
9576 "\t\tconst char *device,\n"
9577 "\t\tint partnum);\n"
9582 #: ../src/guestfs-actions.pod:3457 ../fish/guestfish-actions.pod:2661
9584 "This command returns true if the partition C<partnum> on C<device> has the "
9585 "bootable flag set."
9589 #: ../src/guestfs-actions.pod:3460
9590 msgid "See also C<guestfs_part_set_bootable>."
9594 #: ../src/guestfs-actions.pod:3464
9595 msgid "guestfs_part_get_mbr_id"
9599 #: ../src/guestfs-actions.pod:3466
9602 " int guestfs_part_get_mbr_id (guestfs_h *g,\n"
9603 "\t\tconst char *device,\n"
9604 "\t\tint partnum);\n"
9609 #: ../src/guestfs-actions.pod:3470 ../fish/guestfish-actions.pod:2670
9611 "Returns the MBR type byte (also known as the ID byte) from the numbered "
9612 "partition C<partnum>."
9616 #: ../src/guestfs-actions.pod:3473 ../src/guestfs-actions.pod:3635
9618 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
9619 "undefined results for other partition table types (see "
9620 "C<guestfs_part_get_parttype>)."
9624 #: ../src/guestfs-actions.pod:3479
9625 msgid "guestfs_part_get_parttype"
9629 #: ../src/guestfs-actions.pod:3481
9632 " char *guestfs_part_get_parttype (guestfs_h *g,\n"
9633 "\t\tconst char *device);\n"
9638 #: ../src/guestfs-actions.pod:3484 ../fish/guestfish-actions.pod:2681
9640 "This command examines the partition table on C<device> and returns the "
9641 "partition table type (format) being used."
9645 #: ../src/guestfs-actions.pod:3487
9647 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
9648 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
9649 "possible, although unusual. See C<guestfs_part_init> for a full list."
9653 #: ../src/guestfs-actions.pod:3495
9654 msgid "guestfs_part_init"
9658 #: ../src/guestfs-actions.pod:3497
9661 " int guestfs_part_init (guestfs_h *g,\n"
9662 "\t\tconst char *device,\n"
9663 "\t\tconst char *parttype);\n"
9668 #: ../src/guestfs-actions.pod:3501 ../fish/guestfish-actions.pod:2693
9670 "This creates an empty partition table on C<device> of one of the partition "
9671 "types listed below. Usually C<parttype> should be either C<msdos> or C<gpt> "
9672 "(for large disks)."
9676 #: ../src/guestfs-actions.pod:3505
9678 "Initially there are no partitions. Following this, you should call "
9679 "C<guestfs_part_add> for each partition required."
9683 #: ../src/guestfs-actions.pod:3508 ../fish/guestfish-actions.pod:2700
9684 msgid "Possible values for C<parttype> are:"
9688 #: ../src/guestfs-actions.pod:3512 ../fish/guestfish-actions.pod:2704
9689 msgid "B<efi> | B<gpt>"
9693 #: ../src/guestfs-actions.pod:3514 ../fish/guestfish-actions.pod:2706
9694 msgid "Intel EFI / GPT partition table."
9698 #: ../src/guestfs-actions.pod:3516 ../fish/guestfish-actions.pod:2708
9700 "This is recommended for >= 2 TB partitions that will be accessed from Linux "
9701 "and Intel-based Mac OS X. It also has limited backwards compatibility with "
9702 "the C<mbr> format."
9706 #: ../src/guestfs-actions.pod:3520 ../fish/guestfish-actions.pod:2712
9707 msgid "B<mbr> | B<msdos>"
9711 #: ../src/guestfs-actions.pod:3522 ../fish/guestfish-actions.pod:2714
9713 "The standard PC \"Master Boot Record\" (MBR) format used by MS-DOS and "
9714 "Windows. This partition type will B<only> work for device sizes up to 2 "
9715 "TB. For large disks we recommend using C<gpt>."
9719 #: ../src/guestfs-actions.pod:3529 ../fish/guestfish-actions.pod:2721
9720 msgid "Other partition table types that may work but are not supported include:"
9724 #: ../src/guestfs-actions.pod:3534 ../fish/guestfish-actions.pod:2726
9729 #: ../src/guestfs-actions.pod:3536 ../fish/guestfish-actions.pod:2728
9730 msgid "AIX disk labels."
9734 #: ../src/guestfs-actions.pod:3538 ../fish/guestfish-actions.pod:2730
9735 msgid "B<amiga> | B<rdb>"
9739 #: ../src/guestfs-actions.pod:3540 ../fish/guestfish-actions.pod:2732
9740 msgid "Amiga \"Rigid Disk Block\" format."
9744 #: ../src/guestfs-actions.pod:3542 ../fish/guestfish-actions.pod:2734
9749 #: ../src/guestfs-actions.pod:3544 ../fish/guestfish-actions.pod:2736
9750 msgid "BSD disk labels."
9754 #: ../src/guestfs-actions.pod:3546 ../fish/guestfish-actions.pod:2738
9759 #: ../src/guestfs-actions.pod:3548 ../fish/guestfish-actions.pod:2740
9760 msgid "DASD, used on IBM mainframes."
9764 #: ../src/guestfs-actions.pod:3550 ../fish/guestfish-actions.pod:2742
9769 #: ../src/guestfs-actions.pod:3552 ../fish/guestfish-actions.pod:2744
9770 msgid "MIPS/SGI volumes."
9774 #: ../src/guestfs-actions.pod:3554 ../fish/guestfish-actions.pod:2746
9779 #: ../src/guestfs-actions.pod:3556 ../fish/guestfish-actions.pod:2748
9780 msgid "Old Mac partition format. Modern Macs use C<gpt>."
9784 #: ../src/guestfs-actions.pod:3558 ../fish/guestfish-actions.pod:2750
9789 #: ../src/guestfs-actions.pod:3560 ../fish/guestfish-actions.pod:2752
9790 msgid "NEC PC-98 format, common in Japan apparently."
9794 #: ../src/guestfs-actions.pod:3562 ../fish/guestfish-actions.pod:2754
9799 #: ../src/guestfs-actions.pod:3564 ../fish/guestfish-actions.pod:2756
9800 msgid "Sun disk labels."
9804 #: ../src/guestfs-actions.pod:3570
9805 msgid "guestfs_part_list"
9809 #: ../src/guestfs-actions.pod:3572
9812 " struct guestfs_partition_list *guestfs_part_list (guestfs_h *g,\n"
9813 "\t\tconst char *device);\n"
9818 #: ../src/guestfs-actions.pod:3575 ../fish/guestfish-actions.pod:2764
9820 "This command parses the partition table on C<device> and returns the list of "
9825 #: ../src/guestfs-actions.pod:3578 ../fish/guestfish-actions.pod:2767
9826 msgid "The fields in the returned structure are:"
9830 #: ../src/guestfs-actions.pod:3582 ../fish/guestfish-actions.pod:2771
9835 #: ../src/guestfs-actions.pod:3584 ../fish/guestfish-actions.pod:2773
9836 msgid "Partition number, counting from 1."
9840 #: ../src/guestfs-actions.pod:3586 ../fish/guestfish-actions.pod:2775
9841 msgid "B<part_start>"
9845 #: ../src/guestfs-actions.pod:3588
9847 "Start of the partition I<in bytes>. To get sectors you have to divide by "
9848 "the device's sector size, see C<guestfs_blockdev_getss>."
9852 #: ../src/guestfs-actions.pod:3591 ../fish/guestfish-actions.pod:2780
9857 #: ../src/guestfs-actions.pod:3593 ../fish/guestfish-actions.pod:2782
9858 msgid "End of the partition in bytes."
9862 #: ../src/guestfs-actions.pod:3595 ../fish/guestfish-actions.pod:2784
9863 msgid "B<part_size>"
9867 #: ../src/guestfs-actions.pod:3597 ../fish/guestfish-actions.pod:2786
9868 msgid "Size of the partition in bytes."
9872 #: ../src/guestfs-actions.pod:3601
9874 "This function returns a C<struct guestfs_partition_list *> (see "
9875 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
9876 "must call C<guestfs_free_partition_list> after use>."
9880 #: ../src/guestfs-actions.pod:3606
9881 msgid "guestfs_part_set_bootable"
9885 #: ../src/guestfs-actions.pod:3608
9888 " int guestfs_part_set_bootable (guestfs_h *g,\n"
9889 "\t\tconst char *device,\n"
9890 "\t\tint partnum,\n"
9891 "\t\tint bootable);\n"
9896 #: ../src/guestfs-actions.pod:3613 ../fish/guestfish-actions.pod:2794
9898 "This sets the bootable flag on partition numbered C<partnum> on device "
9899 "C<device>. Note that partitions are numbered from 1."
9903 #: ../src/guestfs-actions.pod:3616 ../fish/guestfish-actions.pod:2797
9905 "The bootable flag is used by some operating systems (notably Windows) to "
9906 "determine which partition to boot from. It is by no means universally "
9911 #: ../src/guestfs-actions.pod:3622
9912 msgid "guestfs_part_set_mbr_id"
9916 #: ../src/guestfs-actions.pod:3624
9919 " int guestfs_part_set_mbr_id (guestfs_h *g,\n"
9920 "\t\tconst char *device,\n"
9921 "\t\tint partnum,\n"
9922 "\t\tint idbyte);\n"
9927 #: ../src/guestfs-actions.pod:3629 ../fish/guestfish-actions.pod:2805
9929 "Sets the MBR type byte (also known as the ID byte) of the numbered partition "
9930 "C<partnum> to C<idbyte>. Note that the type bytes quoted in most "
9931 "documentation are in fact hexadecimal numbers, but usually documented "
9932 "without any leading \"0x\" which might be confusing."
9936 #: ../src/guestfs-actions.pod:3641
9937 msgid "guestfs_part_set_name"
9941 #: ../src/guestfs-actions.pod:3643
9944 " int guestfs_part_set_name (guestfs_h *g,\n"
9945 "\t\tconst char *device,\n"
9946 "\t\tint partnum,\n"
9947 "\t\tconst char *name);\n"
9952 #: ../src/guestfs-actions.pod:3648 ../fish/guestfish-actions.pod:2819
9954 "This sets the partition name on partition numbered C<partnum> on device "
9955 "C<device>. Note that partitions are numbered from 1."
9959 #: ../src/guestfs-actions.pod:3651 ../fish/guestfish-actions.pod:2822
9961 "The partition name can only be set on certain types of partition table. "
9962 "This works on C<gpt> but not on C<mbr> partitions."
9966 #: ../src/guestfs-actions.pod:3656
9967 msgid "guestfs_ping_daemon"
9971 #: ../src/guestfs-actions.pod:3658
9974 " int guestfs_ping_daemon (guestfs_h *g);\n"
9979 #: ../src/guestfs-actions.pod:3660 ../fish/guestfish-actions.pod:2829
9981 "This is a test probe into the guestfs daemon running inside the qemu "
9982 "subprocess. Calling this function checks that the daemon responds to the "
9983 "ping message, without affecting the daemon or attached block device(s) in "
9988 #: ../src/guestfs-actions.pod:3667
9989 msgid "guestfs_pread"
9993 #: ../src/guestfs-actions.pod:3669
9996 " char *guestfs_pread (guestfs_h *g,\n"
9997 "\t\tconst char *path,\n"
9999 "\t\tint64_t offset,\n"
10000 "\t\tsize_t *size_r);\n"
10005 #: ../src/guestfs-actions.pod:3675 ../fish/guestfish-actions.pod:2838
10007 "This command lets you read part of a file. It reads C<count> bytes of the "
10008 "file, starting at C<offset>, from file C<path>."
10012 #: ../src/guestfs-actions.pod:3678 ../fish/guestfish-actions.pod:2841
10014 "This may read fewer bytes than requested. For further details see the "
10015 "L<pread(2)> system call."
10019 #: ../src/guestfs-actions.pod:3681
10020 msgid "See also C<guestfs_pwrite>."
10024 #: ../src/guestfs-actions.pod:3690
10025 msgid "guestfs_pvcreate"
10029 #: ../src/guestfs-actions.pod:3692
10032 " int guestfs_pvcreate (guestfs_h *g,\n"
10033 "\t\tconst char *device);\n"
10038 #: ../src/guestfs-actions.pod:3695 ../fish/guestfish-actions.pod:2853
10040 "This creates an LVM physical volume on the named C<device>, where C<device> "
10041 "should usually be a partition name such as C</dev/sda1>."
10045 #: ../src/guestfs-actions.pod:3701
10046 msgid "guestfs_pvremove"
10050 #: ../src/guestfs-actions.pod:3703
10053 " int guestfs_pvremove (guestfs_h *g,\n"
10054 "\t\tconst char *device);\n"
10059 #: ../src/guestfs-actions.pod:3706 ../fish/guestfish-actions.pod:2861
10061 "This wipes a physical volume C<device> so that LVM will no longer recognise "
10066 #: ../src/guestfs-actions.pod:3709 ../fish/guestfish-actions.pod:2864
10068 "The implementation uses the C<pvremove> command which refuses to wipe "
10069 "physical volumes that contain any volume groups, so you have to remove those "
10074 #: ../src/guestfs-actions.pod:3715
10075 msgid "guestfs_pvresize"
10079 #: ../src/guestfs-actions.pod:3717
10082 " int guestfs_pvresize (guestfs_h *g,\n"
10083 "\t\tconst char *device);\n"
10088 #: ../src/guestfs-actions.pod:3720 ../fish/guestfish-actions.pod:2872
10090 "This resizes (expands or shrinks) an existing LVM physical volume to match "
10091 "the new size of the underlying device."
10095 #: ../src/guestfs-actions.pod:3725
10096 msgid "guestfs_pvresize_size"
10100 #: ../src/guestfs-actions.pod:3727
10103 " int guestfs_pvresize_size (guestfs_h *g,\n"
10104 "\t\tconst char *device,\n"
10105 "\t\tint64_t size);\n"
10110 #: ../src/guestfs-actions.pod:3731
10112 "This command is the same as C<guestfs_pvresize> except that it allows you to "
10113 "specify the new size (in bytes) explicitly."
10117 #: ../src/guestfs-actions.pod:3736
10118 msgid "guestfs_pvs"
10122 #: ../src/guestfs-actions.pod:3738
10125 " char **guestfs_pvs (guestfs_h *g);\n"
10130 #: ../src/guestfs-actions.pod:3740 ../fish/guestfish-actions.pod:2886
10132 "List all the physical volumes detected. This is the equivalent of the "
10133 "L<pvs(8)> command."
10137 #: ../src/guestfs-actions.pod:3743 ../fish/guestfish-actions.pod:2889
10139 "This returns a list of just the device names that contain PVs "
10140 "(eg. C</dev/sda2>)."
10144 #: ../src/guestfs-actions.pod:3746
10145 msgid "See also C<guestfs_pvs_full>."
10149 #: ../src/guestfs-actions.pod:3752
10150 msgid "guestfs_pvs_full"
10154 #: ../src/guestfs-actions.pod:3754
10157 " struct guestfs_lvm_pv_list *guestfs_pvs_full (guestfs_h *g);\n"
10162 #: ../src/guestfs-actions.pod:3756 ../fish/guestfish-actions.pod:2898
10164 "List all the physical volumes detected. This is the equivalent of the "
10165 "L<pvs(8)> command. The \"full\" version includes all fields."
10169 #: ../src/guestfs-actions.pod:3759
10171 "This function returns a C<struct guestfs_lvm_pv_list *> (see "
10172 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
10173 "must call C<guestfs_free_lvm_pv_list> after use>."
10177 #: ../src/guestfs-actions.pod:3764
10178 msgid "guestfs_pvuuid"
10182 #: ../src/guestfs-actions.pod:3766
10185 " char *guestfs_pvuuid (guestfs_h *g,\n"
10186 "\t\tconst char *device);\n"
10191 #: ../src/guestfs-actions.pod:3769 ../fish/guestfish-actions.pod:2905
10192 msgid "This command returns the UUID of the LVM PV C<device>."
10196 #: ../src/guestfs-actions.pod:3774
10197 msgid "guestfs_pwrite"
10201 #: ../src/guestfs-actions.pod:3776
10204 " int guestfs_pwrite (guestfs_h *g,\n"
10205 "\t\tconst char *path,\n"
10206 "\t\tconst char *content,\n"
10207 "\t\tsize_t content_size,\n"
10208 "\t\tint64_t offset);\n"
10213 #: ../src/guestfs-actions.pod:3782 ../fish/guestfish-actions.pod:2911
10215 "This command writes to part of a file. It writes the data buffer C<content> "
10216 "to the file C<path> starting at offset C<offset>."
10220 #: ../src/guestfs-actions.pod:3785 ../fish/guestfish-actions.pod:2914
10222 "This command implements the L<pwrite(2)> system call, and like that system "
10223 "call it may not write the full data requested. The return value is the "
10224 "number of bytes that were actually written to the file. This could even be "
10225 "0, although short writes are unlikely for regular files in ordinary "
10230 #: ../src/guestfs-actions.pod:3791
10231 msgid "See also C<guestfs_pread>."
10235 #: ../src/guestfs-actions.pod:3798
10236 msgid "guestfs_read_file"
10240 #: ../src/guestfs-actions.pod:3800
10243 " char *guestfs_read_file (guestfs_h *g,\n"
10244 "\t\tconst char *path,\n"
10245 "\t\tsize_t *size_r);\n"
10250 #: ../src/guestfs-actions.pod:3804 ../fish/guestfish-actions.pod:2929
10251 msgid "This calls returns the contents of the file C<path> as a buffer."
10255 #: ../src/guestfs-actions.pod:3807
10257 "Unlike C<guestfs_cat>, this function can correctly handle files that contain "
10258 "embedded ASCII NUL characters. However unlike C<guestfs_download>, this "
10259 "function is limited in the total size of file that can be handled."
10263 #: ../src/guestfs-actions.pod:3819
10264 msgid "guestfs_read_lines"
10268 #: ../src/guestfs-actions.pod:3821
10271 " char **guestfs_read_lines (guestfs_h *g,\n"
10272 "\t\tconst char *path);\n"
10277 #: ../src/guestfs-actions.pod:3826 ../fish/guestfish-actions.pod:2946
10279 "The file contents are returned as a list of lines. Trailing C<LF> and "
10280 "C<CRLF> character sequences are I<not> returned."
10284 #: ../src/guestfs-actions.pod:3829
10286 "Note that this function cannot correctly handle binary files (specifically, "
10287 "files containing C<\\0> character which is treated as end of line). For "
10288 "those you need to use the C<guestfs_read_file> function which has a more "
10289 "complex interface."
10293 #: ../src/guestfs-actions.pod:3838
10294 msgid "guestfs_readdir"
10298 #: ../src/guestfs-actions.pod:3840
10301 " struct guestfs_dirent_list *guestfs_readdir (guestfs_h *g,\n"
10302 "\t\tconst char *dir);\n"
10307 #: ../src/guestfs-actions.pod:3843 ../fish/guestfish-actions.pod:2958
10308 msgid "This returns the list of directory entries in directory C<dir>."
10312 #: ../src/guestfs-actions.pod:3845 ../fish/guestfish-actions.pod:2960
10314 "All entries in the directory are returned, including C<.> and C<..>. The "
10315 "entries are I<not> sorted, but returned in the same order as the underlying "
10320 #: ../src/guestfs-actions.pod:3849 ../fish/guestfish-actions.pod:2964
10322 "Also this call returns basic file type information about each file. The "
10323 "C<ftyp> field will contain one of the following characters:"
10327 #: ../src/guestfs-actions.pod:3854 ../fish/guestfish-actions.pod:2969
10332 #: ../src/guestfs-actions.pod:3856 ../fish/guestfish-actions.pod:2971
10333 msgid "Block special"
10337 #: ../src/guestfs-actions.pod:3858 ../fish/guestfish-actions.pod:2973
10342 #: ../src/guestfs-actions.pod:3860 ../fish/guestfish-actions.pod:2975
10343 msgid "Char special"
10347 #: ../src/guestfs-actions.pod:3862 ../fish/guestfish-actions.pod:2977
10352 #: ../src/guestfs-actions.pod:3864 ../fish/guestfish-actions.pod:2979
10357 #: ../src/guestfs-actions.pod:3866 ../fish/guestfish-actions.pod:2981
10362 #: ../src/guestfs-actions.pod:3868 ../fish/guestfish-actions.pod:2983
10363 msgid "FIFO (named pipe)"
10367 #: ../src/guestfs-actions.pod:3870 ../fish/guestfish-actions.pod:2985
10372 #: ../src/guestfs-actions.pod:3872 ../fish/guestfish-actions.pod:2987
10373 msgid "Symbolic link"
10377 #: ../src/guestfs-actions.pod:3874 ../fish/guestfish-actions.pod:2989
10382 #: ../src/guestfs-actions.pod:3876 ../fish/guestfish-actions.pod:2991
10383 msgid "Regular file"
10387 #: ../src/guestfs-actions.pod:3878 ../fish/guestfish-actions.pod:2993
10392 #: ../src/guestfs-actions.pod:3880 ../fish/guestfish-actions.pod:2995
10397 #: ../src/guestfs-actions.pod:3882 ../fish/guestfish-actions.pod:2997
10402 #: ../src/guestfs-actions.pod:3884 ../fish/guestfish-actions.pod:2999
10403 msgid "Unknown file type"
10407 #: ../src/guestfs-actions.pod:3886 ../fish/guestfish-actions.pod:3001
10412 #: ../src/guestfs-actions.pod:3888 ../fish/guestfish-actions.pod:3003
10413 msgid "The L<readdir(3)> call returned a C<d_type> field with an unexpected value"
10417 #: ../src/guestfs-actions.pod:3893
10419 "This function is primarily intended for use by programs. To get a simple "
10420 "list of names, use C<guestfs_ls>. To get a printable directory for human "
10421 "consumption, use C<guestfs_ll>."
10425 #: ../src/guestfs-actions.pod:3897
10427 "This function returns a C<struct guestfs_dirent_list *> (see "
10428 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
10429 "must call C<guestfs_free_dirent_list> after use>."
10433 #: ../src/guestfs-actions.pod:3902
10434 msgid "guestfs_readlink"
10438 #: ../src/guestfs-actions.pod:3904
10441 " char *guestfs_readlink (guestfs_h *g,\n"
10442 "\t\tconst char *path);\n"
10447 #: ../src/guestfs-actions.pod:3907 ../fish/guestfish-actions.pod:3016
10448 msgid "This command reads the target of a symbolic link."
10452 #: ../src/guestfs-actions.pod:3912
10453 msgid "guestfs_readlinklist"
10457 #: ../src/guestfs-actions.pod:3914
10460 " char **guestfs_readlinklist (guestfs_h *g,\n"
10461 "\t\tconst char *path,\n"
10462 "\t\tchar *const *names);\n"
10467 #: ../src/guestfs-actions.pod:3918 ../fish/guestfish-actions.pod:3022
10469 "This call allows you to do a C<readlink> operation on multiple files, where "
10470 "all files are in the directory C<path>. C<names> is the list of files from "
10475 #: ../src/guestfs-actions.pod:3922 ../fish/guestfish-actions.pod:3026
10477 "On return you get a list of strings, with a one-to-one correspondence to the "
10478 "C<names> list. Each string is the value of the symbolic link."
10482 #: ../src/guestfs-actions.pod:3926 ../fish/guestfish-actions.pod:3030
10484 "If the C<readlink(2)> operation fails on any name, then the corresponding "
10485 "result string is the empty string C<\"\">. However the whole operation is "
10486 "completed even if there were C<readlink(2)> errors, and so you can call this "
10487 "function with names where you don't know if they are symbolic links already "
10488 "(albeit slightly less efficient)."
10492 #: ../src/guestfs-actions.pod:3933 ../fish/guestfish-actions.pod:3037
10494 "This call is intended for programs that want to efficiently list a directory "
10495 "contents without making many round-trips. Very long directory listings "
10496 "might cause the protocol message size to be exceeded, causing this call to "
10497 "fail. The caller must split up such requests into smaller groups of names."
10501 #: ../src/guestfs-actions.pod:3944
10502 msgid "guestfs_realpath"
10506 #: ../src/guestfs-actions.pod:3946
10509 " char *guestfs_realpath (guestfs_h *g,\n"
10510 "\t\tconst char *path);\n"
10515 #: ../src/guestfs-actions.pod:3949 ../fish/guestfish-actions.pod:3048
10517 "Return the canonicalized absolute pathname of C<path>. The returned path "
10518 "has no C<.>, C<..> or symbolic link path elements."
10522 #: ../src/guestfs-actions.pod:3955
10523 msgid "guestfs_removexattr"
10527 #: ../src/guestfs-actions.pod:3957
10530 " int guestfs_removexattr (guestfs_h *g,\n"
10531 "\t\tconst char *xattr,\n"
10532 "\t\tconst char *path);\n"
10537 #: ../src/guestfs-actions.pod:3961 ../fish/guestfish-actions.pod:3055
10538 msgid "This call removes the extended attribute named C<xattr> of the file C<path>."
10542 #: ../src/guestfs-actions.pod:3964
10543 msgid "See also: C<guestfs_lremovexattr>, L<attr(5)>."
10547 #: ../src/guestfs-actions.pod:3968
10548 msgid "guestfs_resize2fs"
10552 #: ../src/guestfs-actions.pod:3970
10555 " int guestfs_resize2fs (guestfs_h *g,\n"
10556 "\t\tconst char *device);\n"
10561 #: ../src/guestfs-actions.pod:3973 ../fish/guestfish-actions.pod:3064
10563 "This resizes an ext2, ext3 or ext4 filesystem to match the size of the "
10564 "underlying device."
10568 #: ../src/guestfs-actions.pod:3976
10570 "I<Note:> It is sometimes required that you run C<guestfs_e2fsck_f> on the "
10571 "C<device> before calling this command. For unknown reasons C<resize2fs> "
10572 "sometimes gives an error about this and sometimes not. In any case, it is "
10573 "always safe to call C<guestfs_e2fsck_f> before calling this function."
10577 #: ../src/guestfs-actions.pod:3984
10578 msgid "guestfs_resize2fs_size"
10582 #: ../src/guestfs-actions.pod:3986
10585 " int guestfs_resize2fs_size (guestfs_h *g,\n"
10586 "\t\tconst char *device,\n"
10587 "\t\tint64_t size);\n"
10592 #: ../src/guestfs-actions.pod:3990
10594 "This command is the same as C<guestfs_resize2fs> except that it allows you "
10595 "to specify the new size (in bytes) explicitly."
10599 #: ../src/guestfs-actions.pod:3995
10604 #: ../src/guestfs-actions.pod:3997
10607 " int guestfs_rm (guestfs_h *g,\n"
10608 "\t\tconst char *path);\n"
10613 #: ../src/guestfs-actions.pod:4000 ../fish/guestfish-actions.pod:3084
10614 msgid "Remove the single file C<path>."
10618 #: ../src/guestfs-actions.pod:4004
10619 msgid "guestfs_rm_rf"
10623 #: ../src/guestfs-actions.pod:4006
10626 " int guestfs_rm_rf (guestfs_h *g,\n"
10627 "\t\tconst char *path);\n"
10632 #: ../src/guestfs-actions.pod:4009 ../fish/guestfish-actions.pod:3090
10634 "Remove the file or directory C<path>, recursively removing the contents if "
10635 "its a directory. This is like the C<rm -rf> shell command."
10639 #: ../src/guestfs-actions.pod:4015
10640 msgid "guestfs_rmdir"
10644 #: ../src/guestfs-actions.pod:4017
10647 " int guestfs_rmdir (guestfs_h *g,\n"
10648 "\t\tconst char *path);\n"
10653 #: ../src/guestfs-actions.pod:4020 ../fish/guestfish-actions.pod:3098
10654 msgid "Remove the single directory C<path>."
10658 #: ../src/guestfs-actions.pod:4024
10659 msgid "guestfs_rmmountpoint"
10663 #: ../src/guestfs-actions.pod:4026
10666 " int guestfs_rmmountpoint (guestfs_h *g,\n"
10667 "\t\tconst char *exemptpath);\n"
10672 #: ../src/guestfs-actions.pod:4029
10674 "This calls removes a mountpoint that was previously created with "
10675 "C<guestfs_mkmountpoint>. See C<guestfs_mkmountpoint> for full details."
10679 #: ../src/guestfs-actions.pod:4035
10680 msgid "guestfs_scrub_device"
10684 #: ../src/guestfs-actions.pod:4037
10687 " int guestfs_scrub_device (guestfs_h *g,\n"
10688 "\t\tconst char *device);\n"
10693 #: ../src/guestfs-actions.pod:4040 ../fish/guestfish-actions.pod:3112
10695 "This command writes patterns over C<device> to make data retrieval more "
10700 #: ../src/guestfs-actions.pod:4043 ../src/guestfs-actions.pod:4061 ../src/guestfs-actions.pod:4077 ../fish/guestfish-actions.pod:3115 ../fish/guestfish-actions.pod:3130 ../fish/guestfish-actions.pod:3143
10702 "It is an interface to the L<scrub(1)> program. See that manual page for "
10707 #: ../src/guestfs-actions.pod:4051
10708 msgid "guestfs_scrub_file"
10712 #: ../src/guestfs-actions.pod:4053
10715 " int guestfs_scrub_file (guestfs_h *g,\n"
10716 "\t\tconst char *file);\n"
10721 #: ../src/guestfs-actions.pod:4056 ../fish/guestfish-actions.pod:3125
10723 "This command writes patterns over a file to make data retrieval more "
10728 #: ../src/guestfs-actions.pod:4059 ../fish/guestfish-actions.pod:3128
10729 msgid "The file is I<removed> after scrubbing."
10733 #: ../src/guestfs-actions.pod:4066
10734 msgid "guestfs_scrub_freespace"
10738 #: ../src/guestfs-actions.pod:4068
10741 " int guestfs_scrub_freespace (guestfs_h *g,\n"
10742 "\t\tconst char *dir);\n"
10747 #: ../src/guestfs-actions.pod:4071
10749 "This command creates the directory C<dir> and then fills it with files until "
10750 "the filesystem is full, and scrubs the files as for C<guestfs_scrub_file>, "
10751 "and deletes them. The intention is to scrub any free space on the partition "
10752 "containing C<dir>."
10756 #: ../src/guestfs-actions.pod:4082
10757 msgid "guestfs_set_append"
10761 #: ../src/guestfs-actions.pod:4084
10764 " int guestfs_set_append (guestfs_h *g,\n"
10765 "\t\tconst char *append);\n"
10770 #: ../src/guestfs-actions.pod:4087 ../fish/guestfish-actions.pod:3150
10772 "This function is used to add additional options to the guest kernel command "
10777 #: ../src/guestfs-actions.pod:4090 ../fish/guestfish-actions.pod:3153
10779 "The default is C<NULL> unless overridden by setting C<LIBGUESTFS_APPEND> "
10780 "environment variable."
10784 #: ../src/guestfs-actions.pod:4093 ../fish/guestfish-actions.pod:3156
10786 "Setting C<append> to C<NULL> means I<no> additional options are passed "
10787 "(libguestfs always adds a few of its own)."
10791 #: ../src/guestfs-actions.pod:4098
10792 msgid "guestfs_set_autosync"
10796 #: ../src/guestfs-actions.pod:4100
10799 " int guestfs_set_autosync (guestfs_h *g,\n"
10800 "\t\tint autosync);\n"
10805 #: ../src/guestfs-actions.pod:4103
10807 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
10808 "effort attempt to run C<guestfs_umount_all> followed by C<guestfs_sync> when "
10809 "the handle is closed (also if the program exits without closing handles)."
10813 #: ../src/guestfs-actions.pod:4108 ../fish/guestfish-actions.pod:3168
10815 "This is disabled by default (except in guestfish where it is enabled by "
10820 #: ../src/guestfs-actions.pod:4113
10821 msgid "guestfs_set_direct"
10825 #: ../src/guestfs-actions.pod:4115
10828 " int guestfs_set_direct (guestfs_h *g,\n"
10829 "\t\tint direct);\n"
10834 #: ../src/guestfs-actions.pod:4118 ../fish/guestfish-actions.pod:3175
10836 "If the direct appliance mode flag is enabled, then stdin and stdout are "
10837 "passed directly through to the appliance once it is launched."
10841 #: ../src/guestfs-actions.pod:4122
10843 "One consequence of this is that log messages aren't caught by the library "
10844 "and handled by C<guestfs_set_log_message_callback>, but go straight to "
10849 #: ../src/guestfs-actions.pod:4126 ../fish/guestfish-actions.pod:3183
10850 msgid "You probably don't want to use this unless you know what you are doing."
10854 #: ../src/guestfs-actions.pod:4129 ../fish/guestfish-actions.pod:3186
10855 msgid "The default is disabled."
10859 #: ../src/guestfs-actions.pod:4133
10860 msgid "guestfs_set_e2label"
10864 #: ../src/guestfs-actions.pod:4135
10867 " int guestfs_set_e2label (guestfs_h *g,\n"
10868 "\t\tconst char *device,\n"
10869 "\t\tconst char *label);\n"
10874 #: ../src/guestfs-actions.pod:4139 ../fish/guestfish-actions.pod:3192
10876 "This sets the ext2/3/4 filesystem label of the filesystem on C<device> to "
10877 "C<label>. Filesystem labels are limited to 16 characters."
10881 #: ../src/guestfs-actions.pod:4143
10883 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2label> to return "
10884 "the existing label on a filesystem."
10888 #: ../src/guestfs-actions.pod:4148
10889 msgid "guestfs_set_e2uuid"
10893 #: ../src/guestfs-actions.pod:4150
10896 " int guestfs_set_e2uuid (guestfs_h *g,\n"
10897 "\t\tconst char *device,\n"
10898 "\t\tconst char *uuid);\n"
10903 #: ../src/guestfs-actions.pod:4154 ../fish/guestfish-actions.pod:3203
10905 "This sets the ext2/3/4 filesystem UUID of the filesystem on C<device> to "
10906 "C<uuid>. The format of the UUID and alternatives such as C<clear>, "
10907 "C<random> and C<time> are described in the L<tune2fs(8)> manpage."
10911 #: ../src/guestfs-actions.pod:4159
10913 "You can use either C<guestfs_tune2fs_l> or C<guestfs_get_e2uuid> to return "
10914 "the existing UUID of a filesystem."
10918 #: ../src/guestfs-actions.pod:4164
10919 msgid "guestfs_set_memsize"
10923 #: ../src/guestfs-actions.pod:4166
10926 " int guestfs_set_memsize (guestfs_h *g,\n"
10927 "\t\tint memsize);\n"
10932 #: ../src/guestfs-actions.pod:4169
10934 "This sets the memory size in megabytes allocated to the qemu subprocess. "
10935 "This only has any effect if called before C<guestfs_launch>."
10939 #: ../src/guestfs-actions.pod:4173 ../fish/guestfish-actions.pod:3219
10941 "You can also change this by setting the environment variable "
10942 "C<LIBGUESTFS_MEMSIZE> before the handle is created."
10946 #: ../src/guestfs-actions.pod:4182
10947 msgid "guestfs_set_network"
10951 #: ../src/guestfs-actions.pod:4184
10954 " int guestfs_set_network (guestfs_h *g,\n"
10955 "\t\tint network);\n"
10960 #: ../src/guestfs-actions.pod:4187 ../fish/guestfish-actions.pod:3230
10962 "If C<network> is true, then the network is enabled in the libguestfs "
10963 "appliance. The default is false."
10967 #: ../src/guestfs-actions.pod:4190 ../fish/guestfish-actions.pod:3233
10969 "This affects whether commands are able to access the network (see "
10970 "L<guestfs(3)/RUNNING COMMANDS>)."
10974 #: ../src/guestfs-actions.pod:4193
10976 "You must call this before calling C<guestfs_launch>, otherwise it has no "
10981 #: ../src/guestfs-actions.pod:4198
10982 msgid "guestfs_set_path"
10986 #: ../src/guestfs-actions.pod:4200
10989 " int guestfs_set_path (guestfs_h *g,\n"
10990 "\t\tconst char *searchpath);\n"
10995 #: ../src/guestfs-actions.pod:4203 ../fish/guestfish-actions.pod:3243
10996 msgid "Set the path that libguestfs searches for kernel and initrd.img."
11000 #: ../src/guestfs-actions.pod:4205 ../fish/guestfish-actions.pod:3245
11002 "The default is C<$libdir/guestfs> unless overridden by setting "
11003 "C<LIBGUESTFS_PATH> environment variable."
11007 #: ../src/guestfs-actions.pod:4208 ../fish/guestfish-actions.pod:3248
11008 msgid "Setting C<path> to C<NULL> restores the default path."
11012 #: ../src/guestfs-actions.pod:4212
11013 msgid "guestfs_set_qemu"
11017 #: ../src/guestfs-actions.pod:4214
11020 " int guestfs_set_qemu (guestfs_h *g,\n"
11021 "\t\tconst char *qemu);\n"
11026 #: ../src/guestfs-actions.pod:4217 ../fish/guestfish-actions.pod:3254
11027 msgid "Set the qemu binary that we will use."
11031 #: ../src/guestfs-actions.pod:4219 ../fish/guestfish-actions.pod:3256
11032 msgid "The default is chosen when the library was compiled by the configure script."
11036 #: ../src/guestfs-actions.pod:4222 ../fish/guestfish-actions.pod:3259
11038 "You can also override this by setting the C<LIBGUESTFS_QEMU> environment "
11043 #: ../src/guestfs-actions.pod:4225 ../fish/guestfish-actions.pod:3262
11044 msgid "Setting C<qemu> to C<NULL> restores the default qemu binary."
11048 #: ../src/guestfs-actions.pod:4227 ../fish/guestfish-actions.pod:3264
11050 "Note that you should call this function as early as possible after creating "
11051 "the handle. This is because some pre-launch operations depend on testing "
11052 "qemu features (by running C<qemu -help>). If the qemu binary changes, we "
11053 "don't retest features, and so you might see inconsistent results. Using the "
11054 "environment variable C<LIBGUESTFS_QEMU> is safest of all since that picks "
11055 "the qemu binary at the same time as the handle is created."
11059 #: ../src/guestfs-actions.pod:4237
11060 msgid "guestfs_set_recovery_proc"
11064 #: ../src/guestfs-actions.pod:4239
11067 " int guestfs_set_recovery_proc (guestfs_h *g,\n"
11068 "\t\tint recoveryproc);\n"
11073 #: ../src/guestfs-actions.pod:4242
11075 "If this is called with the parameter C<false> then C<guestfs_launch> does "
11076 "not create a recovery process. The purpose of the recovery process is to "
11077 "stop runaway qemu processes in the case where the main program aborts "
11082 #: ../src/guestfs-actions.pod:4247
11084 "This only has any effect if called before C<guestfs_launch>, and the default "
11089 #: ../src/guestfs-actions.pod:4250 ../fish/guestfish-actions.pod:3284
11091 "About the only time when you would want to disable this is if the main "
11092 "process will fork itself into the background (\"daemonize\" itself). In "
11093 "this case the recovery process thinks that the main program has disappeared "
11094 "and so kills qemu, which is not very helpful."
11098 #: ../src/guestfs-actions.pod:4258
11099 msgid "guestfs_set_selinux"
11103 #: ../src/guestfs-actions.pod:4260
11106 " int guestfs_set_selinux (guestfs_h *g,\n"
11107 "\t\tint selinux);\n"
11112 #: ../src/guestfs-actions.pod:4263 ../fish/guestfish-actions.pod:3294
11114 "This sets the selinux flag that is passed to the appliance at boot time. "
11115 "The default is C<selinux=0> (disabled)."
11119 #: ../src/guestfs-actions.pod:4266 ../fish/guestfish-actions.pod:3297
11121 "Note that if SELinux is enabled, it is always in Permissive mode "
11122 "(C<enforcing=0>)."
11126 #: ../src/guestfs-actions.pod:4274
11127 msgid "guestfs_set_trace"
11131 #: ../src/guestfs-actions.pod:4276
11134 " int guestfs_set_trace (guestfs_h *g,\n"
11135 "\t\tint trace);\n"
11140 #: ../src/guestfs-actions.pod:4279 ../fish/guestfish-actions.pod:3307
11142 "If the command trace flag is set to 1, then commands are printed on stderr "
11143 "before they are executed in a format which is very similar to the one used "
11144 "by guestfish. In other words, you can run a program with this enabled, and "
11145 "you will get out a script which you can feed to guestfish to perform the "
11146 "same set of actions."
11150 #: ../src/guestfs-actions.pod:4286 ../fish/guestfish-actions.pod:3314
11152 "If you want to trace C API calls into libguestfs (and other libraries) then "
11153 "possibly a better way is to use the external ltrace(1) command."
11157 #: ../src/guestfs-actions.pod:4290 ../fish/guestfish-actions.pod:3318
11159 "Command traces are disabled unless the environment variable "
11160 "C<LIBGUESTFS_TRACE> is defined and set to C<1>."
11164 #: ../src/guestfs-actions.pod:4295
11165 msgid "guestfs_set_verbose"
11169 #: ../src/guestfs-actions.pod:4297
11172 " int guestfs_set_verbose (guestfs_h *g,\n"
11173 "\t\tint verbose);\n"
11178 #: ../src/guestfs-actions.pod:4300 ../fish/guestfish-actions.pod:3325
11179 msgid "If C<verbose> is true, this turns on verbose messages (to C<stderr>)."
11183 #: ../src/guestfs-actions.pod:4302 ../fish/guestfish-actions.pod:3327
11185 "Verbose messages are disabled unless the environment variable "
11186 "C<LIBGUESTFS_DEBUG> is defined and set to C<1>."
11190 #: ../src/guestfs-actions.pod:4307
11191 msgid "guestfs_setcon"
11195 #: ../src/guestfs-actions.pod:4309
11198 " int guestfs_setcon (guestfs_h *g,\n"
11199 "\t\tconst char *context);\n"
11204 #: ../src/guestfs-actions.pod:4312 ../fish/guestfish-actions.pod:3334
11206 "This sets the SELinux security context of the daemon to the string "
11211 #: ../src/guestfs-actions.pod:4315 ../fish/guestfish-actions.pod:3337
11212 msgid "See the documentation about SELINUX in L<guestfs(3)>."
11216 #: ../src/guestfs-actions.pod:4319
11217 msgid "guestfs_setxattr"
11221 #: ../src/guestfs-actions.pod:4321
11224 " int guestfs_setxattr (guestfs_h *g,\n"
11225 "\t\tconst char *xattr,\n"
11226 "\t\tconst char *val,\n"
11227 "\t\tint vallen,\n"
11228 "\t\tconst char *path);\n"
11233 #: ../src/guestfs-actions.pod:4327 ../fish/guestfish-actions.pod:3343
11235 "This call sets the extended attribute named C<xattr> of the file C<path> to "
11236 "the value C<val> (of length C<vallen>). The value is arbitrary 8 bit data."
11240 #: ../src/guestfs-actions.pod:4331
11241 msgid "See also: C<guestfs_lsetxattr>, L<attr(5)>."
11245 #: ../src/guestfs-actions.pod:4335
11246 msgid "guestfs_sfdisk"
11250 #: ../src/guestfs-actions.pod:4337
11253 " int guestfs_sfdisk (guestfs_h *g,\n"
11254 "\t\tconst char *device,\n"
11257 "\t\tint sectors,\n"
11258 "\t\tchar *const *lines);\n"
11263 #: ../src/guestfs-actions.pod:4344 ../fish/guestfish-actions.pod:3353
11265 "This is a direct interface to the L<sfdisk(8)> program for creating "
11266 "partitions on block devices."
11270 #: ../src/guestfs-actions.pod:4347 ../fish/guestfish-actions.pod:3356
11271 msgid "C<device> should be a block device, for example C</dev/sda>."
11275 #: ../src/guestfs-actions.pod:4349 ../fish/guestfish-actions.pod:3358
11277 "C<cyls>, C<heads> and C<sectors> are the number of cylinders, heads and "
11278 "sectors on the device, which are passed directly to sfdisk as the I<-C>, "
11279 "I<-H> and I<-S> parameters. If you pass C<0> for any of these, then the "
11280 "corresponding parameter is omitted. Usually for 'large' disks, you can just "
11281 "pass C<0> for these, but for small (floppy-sized) disks, sfdisk (or rather, "
11282 "the kernel) cannot work out the right geometry and you will need to tell it."
11286 #: ../src/guestfs-actions.pod:4357 ../fish/guestfish-actions.pod:3366
11288 "C<lines> is a list of lines that we feed to C<sfdisk>. For more information "
11289 "refer to the L<sfdisk(8)> manpage."
11293 #: ../src/guestfs-actions.pod:4360 ../fish/guestfish-actions.pod:3369
11295 "To create a single partition occupying the whole disk, you would pass "
11296 "C<lines> as a single element list, when the single element being the string "
11301 #: ../src/guestfs-actions.pod:4364
11302 msgid "See also: C<guestfs_sfdisk_l>, C<guestfs_sfdisk_N>, C<guestfs_part_init>"
11306 #: ../src/guestfs-actions.pod:4372
11307 msgid "guestfs_sfdiskM"
11311 #: ../src/guestfs-actions.pod:4374
11314 " int guestfs_sfdiskM (guestfs_h *g,\n"
11315 "\t\tconst char *device,\n"
11316 "\t\tchar *const *lines);\n"
11321 #: ../src/guestfs-actions.pod:4378
11323 "This is a simplified interface to the C<guestfs_sfdisk> command, where "
11324 "partition sizes are specified in megabytes only (rounded to the nearest "
11325 "cylinder) and you don't need to specify the cyls, heads and sectors "
11326 "parameters which were rarely if ever used anyway."
11330 #: ../src/guestfs-actions.pod:4384
11332 "See also: C<guestfs_sfdisk>, the L<sfdisk(8)> manpage and "
11333 "C<guestfs_part_disk>"
11337 #: ../src/guestfs-actions.pod:4392
11338 msgid "guestfs_sfdisk_N"
11342 #: ../src/guestfs-actions.pod:4394
11345 " int guestfs_sfdisk_N (guestfs_h *g,\n"
11346 "\t\tconst char *device,\n"
11347 "\t\tint partnum,\n"
11350 "\t\tint sectors,\n"
11351 "\t\tconst char *line);\n"
11356 #: ../src/guestfs-actions.pod:4402 ../fish/guestfish-actions.pod:3399
11358 "This runs L<sfdisk(8)> option to modify just the single partition C<n> "
11359 "(note: C<n> counts from 1)."
11363 #: ../src/guestfs-actions.pod:4405
11365 "For other parameters, see C<guestfs_sfdisk>. You should usually pass C<0> "
11366 "for the cyls/heads/sectors parameters."
11370 #: ../src/guestfs-actions.pod:4408
11371 msgid "See also: C<guestfs_part_add>"
11375 #: ../src/guestfs-actions.pod:4415
11376 msgid "guestfs_sfdisk_disk_geometry"
11380 #: ../src/guestfs-actions.pod:4417
11383 " char *guestfs_sfdisk_disk_geometry (guestfs_h *g,\n"
11384 "\t\tconst char *device);\n"
11389 #: ../src/guestfs-actions.pod:4420
11391 "This displays the disk geometry of C<device> read from the partition table. "
11392 "Especially in the case where the underlying block device has been resized, "
11393 "this can be different from the kernel's idea of the geometry (see "
11394 "C<guestfs_sfdisk_kernel_geometry>)."
11398 #: ../src/guestfs-actions.pod:4425 ../src/guestfs-actions.pod:4438 ../fish/guestfish-actions.pod:3419 ../fish/guestfish-actions.pod:3428
11399 msgid "The result is in human-readable format, and not designed to be parsed."
11403 #: ../src/guestfs-actions.pod:4431
11404 msgid "guestfs_sfdisk_kernel_geometry"
11408 #: ../src/guestfs-actions.pod:4433
11411 " char *guestfs_sfdisk_kernel_geometry (guestfs_h *g,\n"
11412 "\t\tconst char *device);\n"
11417 #: ../src/guestfs-actions.pod:4436 ../fish/guestfish-actions.pod:3426
11418 msgid "This displays the kernel's idea of the geometry of C<device>."
11422 #: ../src/guestfs-actions.pod:4444
11423 msgid "guestfs_sfdisk_l"
11427 #: ../src/guestfs-actions.pod:4446
11430 " char *guestfs_sfdisk_l (guestfs_h *g,\n"
11431 "\t\tconst char *device);\n"
11436 #: ../src/guestfs-actions.pod:4449 ../fish/guestfish-actions.pod:3435
11438 "This displays the partition table on C<device>, in the human-readable output "
11439 "of the L<sfdisk(8)> command. It is not intended to be parsed."
11443 #: ../src/guestfs-actions.pod:4453
11444 msgid "See also: C<guestfs_part_list>"
11448 #: ../src/guestfs-actions.pod:4458
11453 #: ../src/guestfs-actions.pod:4460
11456 " char *guestfs_sh (guestfs_h *g,\n"
11457 "\t\tconst char *command);\n"
11462 #: ../src/guestfs-actions.pod:4463 ../fish/guestfish-actions.pod:3445
11464 "This call runs a command from the guest filesystem via the guest's "
11469 #: ../src/guestfs-actions.pod:4466
11470 msgid "This is like C<guestfs_command>, but passes the command to:"
11474 #: ../src/guestfs-actions.pod:4468 ../fish/guestfish-actions.pod:3450
11477 " /bin/sh -c \"command\"\n"
11482 #: ../src/guestfs-actions.pod:4470 ../fish/guestfish-actions.pod:3452
11484 "Depending on the guest's shell, this usually results in wildcards being "
11485 "expanded, shell expressions being interpolated and so on."
11489 #: ../src/guestfs-actions.pod:4474
11490 msgid "All the provisos about C<guestfs_command> apply to this call."
11494 #: ../src/guestfs-actions.pod:4479
11495 msgid "guestfs_sh_lines"
11499 #: ../src/guestfs-actions.pod:4481
11502 " char **guestfs_sh_lines (guestfs_h *g,\n"
11503 "\t\tconst char *command);\n"
11508 #: ../src/guestfs-actions.pod:4484
11510 "This is the same as C<guestfs_sh>, but splits the result into a list of "
11515 #: ../src/guestfs-actions.pod:4487
11516 msgid "See also: C<guestfs_command_lines>"
11520 #: ../src/guestfs-actions.pod:4493
11521 msgid "guestfs_sleep"
11525 #: ../src/guestfs-actions.pod:4495
11528 " int guestfs_sleep (guestfs_h *g,\n"
11534 #: ../src/guestfs-actions.pod:4498 ../fish/guestfish-actions.pod:3471
11535 msgid "Sleep for C<secs> seconds."
11539 #: ../src/guestfs-actions.pod:4502 ../src/guestfs-structs.pod:109
11540 msgid "guestfs_stat"
11544 #: ../src/guestfs-actions.pod:4504
11547 " struct guestfs_stat *guestfs_stat (guestfs_h *g,\n"
11548 "\t\tconst char *path);\n"
11553 #: ../src/guestfs-actions.pod:4509 ../fish/guestfish-actions.pod:3479
11554 msgid "This is the same as the C<stat(2)> system call."
11558 #: ../src/guestfs-actions.pod:4515 ../src/guestfs-structs.pod:135
11559 msgid "guestfs_statvfs"
11563 #: ../src/guestfs-actions.pod:4517
11566 " struct guestfs_statvfs *guestfs_statvfs (guestfs_h *g,\n"
11567 "\t\tconst char *path);\n"
11572 #: ../src/guestfs-actions.pod:4520 ../fish/guestfish-actions.pod:3485
11574 "Returns file system statistics for any mounted file system. C<path> should "
11575 "be a file or directory in the mounted file system (typically it is the mount "
11576 "point itself, but it doesn't need to be)."
11580 #: ../src/guestfs-actions.pod:4524 ../fish/guestfish-actions.pod:3489
11581 msgid "This is the same as the C<statvfs(2)> system call."
11585 #: ../src/guestfs-actions.pod:4526
11587 "This function returns a C<struct guestfs_statvfs *>, or NULL if there was an "
11588 "error. I<The caller must call C<guestfs_free_statvfs> after use>."
11592 #: ../src/guestfs-actions.pod:4530
11593 msgid "guestfs_strings"
11597 #: ../src/guestfs-actions.pod:4532
11600 " char **guestfs_strings (guestfs_h *g,\n"
11601 "\t\tconst char *path);\n"
11606 #: ../src/guestfs-actions.pod:4535 ../fish/guestfish-actions.pod:3495
11608 "This runs the L<strings(1)> command on a file and returns the list of "
11609 "printable strings found."
11613 #: ../src/guestfs-actions.pod:4545
11614 msgid "guestfs_strings_e"
11618 #: ../src/guestfs-actions.pod:4547
11621 " char **guestfs_strings_e (guestfs_h *g,\n"
11622 "\t\tconst char *encoding,\n"
11623 "\t\tconst char *path);\n"
11628 #: ../src/guestfs-actions.pod:4551
11630 "This is like the C<guestfs_strings> command, but allows you to specify the "
11631 "encoding of strings that are looked for in the source file C<path>."
11635 #: ../src/guestfs-actions.pod:4555 ../fish/guestfish-actions.pod:3509
11636 msgid "Allowed encodings are:"
11640 #: ../src/guestfs-actions.pod:4559 ../fish/guestfish-actions.pod:3513
11645 #: ../src/guestfs-actions.pod:4561
11647 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
11648 "ISO-8859-X (this is what C<guestfs_strings> uses)."
11652 #: ../src/guestfs-actions.pod:4564 ../fish/guestfish-actions.pod:3518
11657 #: ../src/guestfs-actions.pod:4566 ../fish/guestfish-actions.pod:3520
11658 msgid "Single 8-bit-byte characters."
11662 #: ../src/guestfs-actions.pod:4568 ../fish/guestfish-actions.pod:3522
11667 #: ../src/guestfs-actions.pod:4570 ../fish/guestfish-actions.pod:3524
11668 msgid "16-bit big endian strings such as those encoded in UTF-16BE or UCS-2BE."
11672 #: ../src/guestfs-actions.pod:4573 ../fish/guestfish-actions.pod:3527
11673 msgid "l (lower case letter L)"
11677 #: ../src/guestfs-actions.pod:4575 ../fish/guestfish-actions.pod:3529
11679 "16-bit little endian such as UTF-16LE and UCS-2LE. This is useful for "
11680 "examining binaries in Windows guests."
11684 #: ../src/guestfs-actions.pod:4578 ../fish/guestfish-actions.pod:3532
11689 #: ../src/guestfs-actions.pod:4580 ../fish/guestfish-actions.pod:3534
11690 msgid "32-bit big endian such as UCS-4BE."
11694 #: ../src/guestfs-actions.pod:4582 ../fish/guestfish-actions.pod:3536
11699 #: ../src/guestfs-actions.pod:4584 ../fish/guestfish-actions.pod:3538
11700 msgid "32-bit little endian such as UCS-4LE."
11704 #: ../src/guestfs-actions.pod:4588 ../fish/guestfish-actions.pod:3542
11705 msgid "The returned strings are transcoded to UTF-8."
11709 #: ../src/guestfs-actions.pod:4597
11710 msgid "guestfs_swapoff_device"
11714 #: ../src/guestfs-actions.pod:4599
11717 " int guestfs_swapoff_device (guestfs_h *g,\n"
11718 "\t\tconst char *device);\n"
11723 #: ../src/guestfs-actions.pod:4602
11725 "This command disables the libguestfs appliance swap device or partition "
11726 "named C<device>. See C<guestfs_swapon_device>."
11730 #: ../src/guestfs-actions.pod:4608
11731 msgid "guestfs_swapoff_file"
11735 #: ../src/guestfs-actions.pod:4610
11738 " int guestfs_swapoff_file (guestfs_h *g,\n"
11739 "\t\tconst char *file);\n"
11744 #: ../src/guestfs-actions.pod:4613 ../fish/guestfish-actions.pod:3559
11745 msgid "This command disables the libguestfs appliance swap on file."
11749 #: ../src/guestfs-actions.pod:4617
11750 msgid "guestfs_swapoff_label"
11754 #: ../src/guestfs-actions.pod:4619
11757 " int guestfs_swapoff_label (guestfs_h *g,\n"
11758 "\t\tconst char *label);\n"
11763 #: ../src/guestfs-actions.pod:4622 ../fish/guestfish-actions.pod:3565
11765 "This command disables the libguestfs appliance swap on labeled swap "
11770 #: ../src/guestfs-actions.pod:4627
11771 msgid "guestfs_swapoff_uuid"
11775 #: ../src/guestfs-actions.pod:4629
11778 " int guestfs_swapoff_uuid (guestfs_h *g,\n"
11779 "\t\tconst char *uuid);\n"
11784 #: ../src/guestfs-actions.pod:4632 ../fish/guestfish-actions.pod:3572
11786 "This command disables the libguestfs appliance swap partition with the given "
11791 #: ../src/guestfs-actions.pod:4637
11792 msgid "guestfs_swapon_device"
11796 #: ../src/guestfs-actions.pod:4639
11799 " int guestfs_swapon_device (guestfs_h *g,\n"
11800 "\t\tconst char *device);\n"
11805 #: ../src/guestfs-actions.pod:4642
11807 "This command enables the libguestfs appliance to use the swap device or "
11808 "partition named C<device>. The increased memory is made available for all "
11809 "commands, for example those run using C<guestfs_command> or C<guestfs_sh>."
11813 #: ../src/guestfs-actions.pod:4647 ../fish/guestfish-actions.pod:3584
11815 "Note that you should not swap to existing guest swap partitions unless you "
11816 "know what you are doing. They may contain hibernation information, or other "
11817 "information that the guest doesn't want you to trash. You also risk leaking "
11818 "information about the host to the guest this way. Instead, attach a new "
11819 "host device to the guest and swap on that."
11823 #: ../src/guestfs-actions.pod:4656
11824 msgid "guestfs_swapon_file"
11828 #: ../src/guestfs-actions.pod:4658
11831 " int guestfs_swapon_file (guestfs_h *g,\n"
11832 "\t\tconst char *file);\n"
11837 #: ../src/guestfs-actions.pod:4661
11839 "This command enables swap to a file. See C<guestfs_swapon_device> for other "
11844 #: ../src/guestfs-actions.pod:4666
11845 msgid "guestfs_swapon_label"
11849 #: ../src/guestfs-actions.pod:4668
11852 " int guestfs_swapon_label (guestfs_h *g,\n"
11853 "\t\tconst char *label);\n"
11858 #: ../src/guestfs-actions.pod:4671
11860 "This command enables swap to a labeled swap partition. See "
11861 "C<guestfs_swapon_device> for other notes."
11865 #: ../src/guestfs-actions.pod:4676
11866 msgid "guestfs_swapon_uuid"
11870 #: ../src/guestfs-actions.pod:4678
11873 " int guestfs_swapon_uuid (guestfs_h *g,\n"
11874 "\t\tconst char *uuid);\n"
11879 #: ../src/guestfs-actions.pod:4681
11881 "This command enables swap to a swap partition with the given UUID. See "
11882 "C<guestfs_swapon_device> for other notes."
11886 #: ../src/guestfs-actions.pod:4686
11887 msgid "guestfs_sync"
11891 #: ../src/guestfs-actions.pod:4688
11894 " int guestfs_sync (guestfs_h *g);\n"
11899 #: ../src/guestfs-actions.pod:4690 ../fish/guestfish-actions.pod:3616
11901 "This syncs the disk, so that any writes are flushed through to the "
11902 "underlying disk image."
11906 #: ../src/guestfs-actions.pod:4693 ../fish/guestfish-actions.pod:3619
11908 "You should always call this if you have modified a disk image, before "
11909 "closing the handle."
11913 #: ../src/guestfs-actions.pod:4698
11914 msgid "guestfs_tail"
11918 #: ../src/guestfs-actions.pod:4700
11921 " char **guestfs_tail (guestfs_h *g,\n"
11922 "\t\tconst char *path);\n"
11927 #: ../src/guestfs-actions.pod:4703 ../fish/guestfish-actions.pod:3626
11928 msgid "This command returns up to the last 10 lines of a file as a list of strings."
11932 #: ../src/guestfs-actions.pod:4713
11933 msgid "guestfs_tail_n"
11937 #: ../src/guestfs-actions.pod:4715
11940 " char **guestfs_tail_n (guestfs_h *g,\n"
11941 "\t\tint nrlines,\n"
11942 "\t\tconst char *path);\n"
11947 #: ../src/guestfs-actions.pod:4719 ../fish/guestfish-actions.pod:3636
11949 "If the parameter C<nrlines> is a positive number, this returns the last "
11950 "C<nrlines> lines of the file C<path>."
11954 #: ../src/guestfs-actions.pod:4722 ../fish/guestfish-actions.pod:3639
11956 "If the parameter C<nrlines> is a negative number, this returns lines from "
11957 "the file C<path>, starting with the C<-nrlines>th line."
11961 #: ../src/guestfs-actions.pod:4734
11962 msgid "guestfs_tar_in"
11966 #: ../src/guestfs-actions.pod:4736
11969 " int guestfs_tar_in (guestfs_h *g,\n"
11970 "\t\tconst char *tarfile,\n"
11971 "\t\tconst char *directory);\n"
11976 #: ../src/guestfs-actions.pod:4740 ../fish/guestfish-actions.pod:3651
11978 "This command uploads and unpacks local file C<tarfile> (an I<uncompressed> "
11979 "tar file) into C<directory>."
11983 #: ../src/guestfs-actions.pod:4743
11984 msgid "To upload a compressed tarball, use C<guestfs_tgz_in> or C<guestfs_txz_in>."
11988 #: ../src/guestfs-actions.pod:4748
11989 msgid "guestfs_tar_out"
11993 #: ../src/guestfs-actions.pod:4750
11996 " int guestfs_tar_out (guestfs_h *g,\n"
11997 "\t\tconst char *directory,\n"
11998 "\t\tconst char *tarfile);\n"
12003 #: ../src/guestfs-actions.pod:4754 ../fish/guestfish-actions.pod:3663
12005 "This command packs the contents of C<directory> and downloads it to local "
12010 #: ../src/guestfs-actions.pod:4757
12012 "To download a compressed tarball, use C<guestfs_tgz_out> or "
12013 "C<guestfs_txz_out>."
12017 #: ../src/guestfs-actions.pod:4762
12018 msgid "guestfs_tgz_in"
12022 #: ../src/guestfs-actions.pod:4764
12025 " int guestfs_tgz_in (guestfs_h *g,\n"
12026 "\t\tconst char *tarball,\n"
12027 "\t\tconst char *directory);\n"
12032 #: ../src/guestfs-actions.pod:4768 ../fish/guestfish-actions.pod:3675
12034 "This command uploads and unpacks local file C<tarball> (a I<gzip compressed> "
12035 "tar file) into C<directory>."
12039 #: ../src/guestfs-actions.pod:4771
12040 msgid "To upload an uncompressed tarball, use C<guestfs_tar_in>."
12044 #: ../src/guestfs-actions.pod:4775
12045 msgid "guestfs_tgz_out"
12049 #: ../src/guestfs-actions.pod:4777
12052 " int guestfs_tgz_out (guestfs_h *g,\n"
12053 "\t\tconst char *directory,\n"
12054 "\t\tconst char *tarball);\n"
12059 #: ../src/guestfs-actions.pod:4781 ../fish/guestfish-actions.pod:3686
12061 "This command packs the contents of C<directory> and downloads it to local "
12066 #: ../src/guestfs-actions.pod:4784
12067 msgid "To download an uncompressed tarball, use C<guestfs_tar_out>."
12071 #: ../src/guestfs-actions.pod:4788
12072 msgid "guestfs_touch"
12076 #: ../src/guestfs-actions.pod:4790
12079 " int guestfs_touch (guestfs_h *g,\n"
12080 "\t\tconst char *path);\n"
12085 #: ../src/guestfs-actions.pod:4793 ../fish/guestfish-actions.pod:3697
12087 "Touch acts like the L<touch(1)> command. It can be used to update the "
12088 "timestamps on a file, or, if the file does not exist, to create a new "
12089 "zero-length file."
12093 #: ../src/guestfs-actions.pod:4797 ../fish/guestfish-actions.pod:3701
12095 "This command only works on regular files, and will fail on other file types "
12096 "such as directories, symbolic links, block special etc."
12100 #: ../src/guestfs-actions.pod:4802
12101 msgid "guestfs_truncate"
12105 #: ../src/guestfs-actions.pod:4804
12108 " int guestfs_truncate (guestfs_h *g,\n"
12109 "\t\tconst char *path);\n"
12114 #: ../src/guestfs-actions.pod:4807 ../fish/guestfish-actions.pod:3708
12116 "This command truncates C<path> to a zero-length file. The file must exist "
12121 #: ../src/guestfs-actions.pod:4812
12122 msgid "guestfs_truncate_size"
12126 #: ../src/guestfs-actions.pod:4814
12129 " int guestfs_truncate_size (guestfs_h *g,\n"
12130 "\t\tconst char *path,\n"
12131 "\t\tint64_t size);\n"
12136 #: ../src/guestfs-actions.pod:4818 ../fish/guestfish-actions.pod:3715
12138 "This command truncates C<path> to size C<size> bytes. The file must exist "
12143 #: ../src/guestfs-actions.pod:4821
12145 "If the current file size is less than C<size> then the file is extended to "
12146 "the required size with zero bytes. This creates a sparse file (ie. disk "
12147 "blocks are not allocated for the file until you write to it). To create a "
12148 "non-sparse file of zeroes, use C<guestfs_fallocate64> instead."
12152 #: ../src/guestfs-actions.pod:4829
12153 msgid "guestfs_tune2fs_l"
12157 #: ../src/guestfs-actions.pod:4831
12160 " char **guestfs_tune2fs_l (guestfs_h *g,\n"
12161 "\t\tconst char *device);\n"
12166 #: ../src/guestfs-actions.pod:4834 ../fish/guestfish-actions.pod:3728
12168 "This returns the contents of the ext2, ext3 or ext4 filesystem superblock on "
12173 #: ../src/guestfs-actions.pod:4837 ../fish/guestfish-actions.pod:3731
12175 "It is the same as running C<tune2fs -l device>. See L<tune2fs(8)> manpage "
12176 "for more details. The list of fields returned isn't clearly defined, and "
12177 "depends on both the version of C<tune2fs> that libguestfs was built against, "
12178 "and the filesystem itself."
12182 #: ../src/guestfs-actions.pod:4848
12183 msgid "guestfs_txz_in"
12187 #: ../src/guestfs-actions.pod:4850
12190 " int guestfs_txz_in (guestfs_h *g,\n"
12191 "\t\tconst char *tarball,\n"
12192 "\t\tconst char *directory);\n"
12197 #: ../src/guestfs-actions.pod:4854 ../fish/guestfish-actions.pod:3740
12199 "This command uploads and unpacks local file C<tarball> (an I<xz compressed> "
12200 "tar file) into C<directory>."
12204 #: ../src/guestfs-actions.pod:4859
12205 msgid "guestfs_txz_out"
12209 #: ../src/guestfs-actions.pod:4861
12212 " int guestfs_txz_out (guestfs_h *g,\n"
12213 "\t\tconst char *directory,\n"
12214 "\t\tconst char *tarball);\n"
12219 #: ../src/guestfs-actions.pod:4865 ../fish/guestfish-actions.pod:3749
12221 "This command packs the contents of C<directory> and downloads it to local "
12222 "file C<tarball> (as an xz compressed tar archive)."
12226 #: ../src/guestfs-actions.pod:4870
12227 msgid "guestfs_umask"
12231 #: ../src/guestfs-actions.pod:4872
12234 " int guestfs_umask (guestfs_h *g,\n"
12240 #: ../src/guestfs-actions.pod:4875 ../fish/guestfish-actions.pod:3758
12242 "This function sets the mask used for creating new files and device nodes to "
12247 #: ../src/guestfs-actions.pod:4878 ../fish/guestfish-actions.pod:3761
12249 "Typical umask values would be C<022> which creates new files with "
12250 "permissions like \"-rw-r--r--\" or \"-rwxr-xr-x\", and C<002> which creates "
12251 "new files with permissions like \"-rw-rw-r--\" or \"-rwxrwxr-x\"."
12255 #: ../src/guestfs-actions.pod:4883 ../fish/guestfish-actions.pod:3766
12257 "The default umask is C<022>. This is important because it means that "
12258 "directories and device nodes will be created with C<0644> or C<0755> mode "
12259 "even if you specify C<0777>."
12263 #: ../src/guestfs-actions.pod:4887
12265 "See also C<guestfs_get_umask>, L<umask(2)>, C<guestfs_mknod>, "
12266 "C<guestfs_mkdir>."
12270 #: ../src/guestfs-actions.pod:4890 ../fish/guestfish-actions.pod:3773
12271 msgid "This call returns the previous umask."
12275 #: ../src/guestfs-actions.pod:4894
12276 msgid "guestfs_umount"
12280 #: ../src/guestfs-actions.pod:4896
12283 " int guestfs_umount (guestfs_h *g,\n"
12284 "\t\tconst char *pathordevice);\n"
12289 #: ../src/guestfs-actions.pod:4899 ../fish/guestfish-actions.pod:3779
12291 "This unmounts the given filesystem. The filesystem may be specified either "
12292 "by its mountpoint (path) or the device which contains the filesystem."
12296 #: ../src/guestfs-actions.pod:4905
12297 msgid "guestfs_umount_all"
12301 #: ../src/guestfs-actions.pod:4907
12304 " int guestfs_umount_all (guestfs_h *g);\n"
12309 #: ../src/guestfs-actions.pod:4909 ../fish/guestfish-actions.pod:3787
12310 msgid "This unmounts all mounted filesystems."
12314 #: ../src/guestfs-actions.pod:4911 ../fish/guestfish-actions.pod:3789
12315 msgid "Some internal mounts are not unmounted by this call."
12319 #: ../src/guestfs-actions.pod:4915
12320 msgid "guestfs_upload"
12324 #: ../src/guestfs-actions.pod:4917
12327 " int guestfs_upload (guestfs_h *g,\n"
12328 "\t\tconst char *filename,\n"
12329 "\t\tconst char *remotefilename);\n"
12334 #: ../src/guestfs-actions.pod:4921 ../fish/guestfish-actions.pod:3795
12335 msgid "Upload local file C<filename> to C<remotefilename> on the filesystem."
12339 #: ../src/guestfs-actions.pod:4926
12340 msgid "See also C<guestfs_download>."
12344 #: ../src/guestfs-actions.pod:4930
12345 msgid "guestfs_utimens"
12349 #: ../src/guestfs-actions.pod:4932
12352 " int guestfs_utimens (guestfs_h *g,\n"
12353 "\t\tconst char *path,\n"
12354 "\t\tint64_t atsecs,\n"
12355 "\t\tint64_t atnsecs,\n"
12356 "\t\tint64_t mtsecs,\n"
12357 "\t\tint64_t mtnsecs);\n"
12362 #: ../src/guestfs-actions.pod:4939 ../fish/guestfish-actions.pod:3808
12363 msgid "This command sets the timestamps of a file with nanosecond precision."
12367 #: ../src/guestfs-actions.pod:4942 ../fish/guestfish-actions.pod:3811
12369 "C<atsecs, atnsecs> are the last access time (atime) in secs and nanoseconds "
12374 #: ../src/guestfs-actions.pod:4945 ../fish/guestfish-actions.pod:3814
12376 "C<mtsecs, mtnsecs> are the last modification time (mtime) in secs and "
12377 "nanoseconds from the epoch."
12381 #: ../src/guestfs-actions.pod:4948 ../fish/guestfish-actions.pod:3817
12383 "If the C<*nsecs> field contains the special value C<-1> then the "
12384 "corresponding timestamp is set to the current time. (The C<*secs> field is "
12385 "ignored in this case)."
12389 #: ../src/guestfs-actions.pod:4952 ../fish/guestfish-actions.pod:3821
12391 "If the C<*nsecs> field contains the special value C<-2> then the "
12392 "corresponding timestamp is left unchanged. (The C<*secs> field is ignored "
12397 #: ../src/guestfs-actions.pod:4958 ../src/guestfs-structs.pod:175
12398 msgid "guestfs_version"
12402 #: ../src/guestfs-actions.pod:4960
12405 " struct guestfs_version *guestfs_version (guestfs_h *g);\n"
12410 #: ../src/guestfs-actions.pod:4962 ../fish/guestfish-actions.pod:3829
12411 msgid "Return the libguestfs version number that the program is linked against."
12415 #: ../src/guestfs-actions.pod:4965 ../fish/guestfish-actions.pod:3832
12417 "Note that because of dynamic linking this is not necessarily the version of "
12418 "libguestfs that you compiled against. You can compile the program, and then "
12419 "at runtime dynamically link against a completely different C<libguestfs.so> "
12424 #: ../src/guestfs-actions.pod:4970 ../fish/guestfish-actions.pod:3837
12426 "This call was added in version C<1.0.58>. In previous versions of "
12427 "libguestfs there was no way to get the version number. From C code you can "
12428 "use dynamic linker functions to find out if this symbol exists (if it "
12429 "doesn't, then it's an earlier version)."
12433 #: ../src/guestfs-actions.pod:4976 ../fish/guestfish-actions.pod:3843
12435 "The call returns a structure with four elements. The first three (C<major>, "
12436 "C<minor> and C<release>) are numbers and correspond to the usual version "
12437 "triplet. The fourth element (C<extra>) is a string and is normally empty, "
12438 "but may be used for distro-specific information."
12442 #: ../src/guestfs-actions.pod:4982 ../fish/guestfish-actions.pod:3849
12443 msgid "To construct the original version string: C<$major.$minor.$release$extra>"
12447 #: ../src/guestfs-actions.pod:4985 ../fish/guestfish-actions.pod:3852
12448 msgid "See also: L<guestfs(3)/LIBGUESTFS VERSION NUMBERS>."
12452 #: ../src/guestfs-actions.pod:4987
12454 "I<Note:> Don't use this call to test for availability of features. In "
12455 "enterprise distributions we backport features from later versions into "
12456 "earlier versions, making this an unreliable way to test for features. Use "
12457 "C<guestfs_available> instead."
12461 #: ../src/guestfs-actions.pod:4993
12463 "This function returns a C<struct guestfs_version *>, or NULL if there was an "
12464 "error. I<The caller must call C<guestfs_free_version> after use>."
12468 #: ../src/guestfs-actions.pod:4997
12469 msgid "guestfs_vfs_label"
12473 #: ../src/guestfs-actions.pod:4999
12476 " char *guestfs_vfs_label (guestfs_h *g,\n"
12477 "\t\tconst char *device);\n"
12482 #: ../src/guestfs-actions.pod:5002 ../fish/guestfish-actions.pod:3864
12483 msgid "This returns the filesystem label of the filesystem on C<device>."
12487 #: ../src/guestfs-actions.pod:5005 ../fish/guestfish-actions.pod:3867
12488 msgid "If the filesystem is unlabeled, this returns the empty string."
12492 #: ../src/guestfs-actions.pod:5007
12493 msgid "To find a filesystem from the label, use C<guestfs_findfs_label>."
12497 #: ../src/guestfs-actions.pod:5012
12498 msgid "guestfs_vfs_type"
12502 #: ../src/guestfs-actions.pod:5014
12505 " char *guestfs_vfs_type (guestfs_h *g,\n"
12506 "\t\tconst char *device);\n"
12511 #: ../src/guestfs-actions.pod:5017 ../fish/guestfish-actions.pod:3875
12513 "This command gets the filesystem type corresponding to the filesystem on "
12518 #: ../src/guestfs-actions.pod:5020 ../fish/guestfish-actions.pod:3878
12520 "For most filesystems, the result is the name of the Linux VFS module which "
12521 "would be used to mount this filesystem if you mounted it without specifying "
12522 "the filesystem type. For example a string such as C<ext3> or C<ntfs>."
12526 #: ../src/guestfs-actions.pod:5028
12527 msgid "guestfs_vfs_uuid"
12531 #: ../src/guestfs-actions.pod:5030
12534 " char *guestfs_vfs_uuid (guestfs_h *g,\n"
12535 "\t\tconst char *device);\n"
12540 #: ../src/guestfs-actions.pod:5033 ../fish/guestfish-actions.pod:3887
12541 msgid "This returns the filesystem UUID of the filesystem on C<device>."
12545 #: ../src/guestfs-actions.pod:5036 ../fish/guestfish-actions.pod:3890
12546 msgid "If the filesystem does not have a UUID, this returns the empty string."
12550 #: ../src/guestfs-actions.pod:5038
12551 msgid "To find a filesystem from the UUID, use C<guestfs_findfs_uuid>."
12555 #: ../src/guestfs-actions.pod:5043
12556 msgid "guestfs_vg_activate"
12560 #: ../src/guestfs-actions.pod:5045
12563 " int guestfs_vg_activate (guestfs_h *g,\n"
12564 "\t\tint activate,\n"
12565 "\t\tchar *const *volgroups);\n"
12570 #: ../src/guestfs-actions.pod:5049 ../fish/guestfish-actions.pod:3898
12572 "This command activates or (if C<activate> is false) deactivates all logical "
12573 "volumes in the listed volume groups C<volgroups>. If activated, then they "
12574 "are made known to the kernel, ie. they appear as C</dev/mapper> devices. If "
12575 "deactivated, then those devices disappear."
12579 #: ../src/guestfs-actions.pod:5055 ../fish/guestfish-actions.pod:3904
12580 msgid "This command is the same as running C<vgchange -a y|n volgroups...>"
12584 #: ../src/guestfs-actions.pod:5057 ../fish/guestfish-actions.pod:3906
12586 "Note that if C<volgroups> is an empty list then B<all> volume groups are "
12587 "activated or deactivated."
12591 #: ../src/guestfs-actions.pod:5062
12592 msgid "guestfs_vg_activate_all"
12596 #: ../src/guestfs-actions.pod:5064
12599 " int guestfs_vg_activate_all (guestfs_h *g,\n"
12600 "\t\tint activate);\n"
12605 #: ../src/guestfs-actions.pod:5067 ../fish/guestfish-actions.pod:3913
12607 "This command activates or (if C<activate> is false) deactivates all logical "
12608 "volumes in all volume groups. If activated, then they are made known to the "
12609 "kernel, ie. they appear as C</dev/mapper> devices. If deactivated, then "
12610 "those devices disappear."
12614 #: ../src/guestfs-actions.pod:5073 ../fish/guestfish-actions.pod:3919
12615 msgid "This command is the same as running C<vgchange -a y|n>"
12619 #: ../src/guestfs-actions.pod:5077
12620 msgid "guestfs_vgcreate"
12624 #: ../src/guestfs-actions.pod:5079
12627 " int guestfs_vgcreate (guestfs_h *g,\n"
12628 "\t\tconst char *volgroup,\n"
12629 "\t\tchar *const *physvols);\n"
12634 #: ../src/guestfs-actions.pod:5083 ../fish/guestfish-actions.pod:3925
12636 "This creates an LVM volume group called C<volgroup> from the non-empty list "
12637 "of physical volumes C<physvols>."
12641 #: ../src/guestfs-actions.pod:5088
12642 msgid "guestfs_vglvuuids"
12646 #: ../src/guestfs-actions.pod:5090
12649 " char **guestfs_vglvuuids (guestfs_h *g,\n"
12650 "\t\tconst char *vgname);\n"
12655 #: ../src/guestfs-actions.pod:5093 ../fish/guestfish-actions.pod:3932
12657 "Given a VG called C<vgname>, this returns the UUIDs of all the logical "
12658 "volumes created in this volume group."
12662 #: ../src/guestfs-actions.pod:5096
12664 "You can use this along with C<guestfs_lvs> and C<guestfs_lvuuid> calls to "
12665 "associate logical volumes and volume groups."
12669 #: ../src/guestfs-actions.pod:5099
12670 msgid "See also C<guestfs_vgpvuuids>."
12674 #: ../src/guestfs-actions.pod:5105
12675 msgid "guestfs_vgpvuuids"
12679 #: ../src/guestfs-actions.pod:5107
12682 " char **guestfs_vgpvuuids (guestfs_h *g,\n"
12683 "\t\tconst char *vgname);\n"
12688 #: ../src/guestfs-actions.pod:5110 ../fish/guestfish-actions.pod:3944
12690 "Given a VG called C<vgname>, this returns the UUIDs of all the physical "
12691 "volumes that this volume group resides on."
12695 #: ../src/guestfs-actions.pod:5113
12697 "You can use this along with C<guestfs_pvs> and C<guestfs_pvuuid> calls to "
12698 "associate physical volumes and volume groups."
12702 #: ../src/guestfs-actions.pod:5116
12703 msgid "See also C<guestfs_vglvuuids>."
12707 #: ../src/guestfs-actions.pod:5122
12708 msgid "guestfs_vgremove"
12712 #: ../src/guestfs-actions.pod:5124
12715 " int guestfs_vgremove (guestfs_h *g,\n"
12716 "\t\tconst char *vgname);\n"
12721 #: ../src/guestfs-actions.pod:5127 ../fish/guestfish-actions.pod:3956
12722 msgid "Remove an LVM volume group C<vgname>, (for example C<VG>)."
12726 #: ../src/guestfs-actions.pod:5129 ../fish/guestfish-actions.pod:3958
12727 msgid "This also forcibly removes all logical volumes in the volume group (if any)."
12731 #: ../src/guestfs-actions.pod:5134
12732 msgid "guestfs_vgrename"
12736 #: ../src/guestfs-actions.pod:5136
12739 " int guestfs_vgrename (guestfs_h *g,\n"
12740 "\t\tconst char *volgroup,\n"
12741 "\t\tconst char *newvolgroup);\n"
12746 #: ../src/guestfs-actions.pod:5140 ../fish/guestfish-actions.pod:3965
12747 msgid "Rename a volume group C<volgroup> with the new name C<newvolgroup>."
12751 #: ../src/guestfs-actions.pod:5144
12752 msgid "guestfs_vgs"
12756 #: ../src/guestfs-actions.pod:5146
12759 " char **guestfs_vgs (guestfs_h *g);\n"
12764 #: ../src/guestfs-actions.pod:5148 ../fish/guestfish-actions.pod:3971
12766 "List all the volumes groups detected. This is the equivalent of the "
12767 "L<vgs(8)> command."
12771 #: ../src/guestfs-actions.pod:5151 ../fish/guestfish-actions.pod:3974
12773 "This returns a list of just the volume group names that were detected "
12774 "(eg. C<VolGroup00>)."
12778 #: ../src/guestfs-actions.pod:5154
12779 msgid "See also C<guestfs_vgs_full>."
12783 #: ../src/guestfs-actions.pod:5160
12784 msgid "guestfs_vgs_full"
12788 #: ../src/guestfs-actions.pod:5162
12791 " struct guestfs_lvm_vg_list *guestfs_vgs_full (guestfs_h *g);\n"
12796 #: ../src/guestfs-actions.pod:5164 ../fish/guestfish-actions.pod:3983
12798 "List all the volumes groups detected. This is the equivalent of the "
12799 "L<vgs(8)> command. The \"full\" version includes all fields."
12803 #: ../src/guestfs-actions.pod:5167
12805 "This function returns a C<struct guestfs_lvm_vg_list *> (see "
12806 "E<lt>guestfs-structs.hE<gt>), or NULL if there was an error. I<The caller "
12807 "must call C<guestfs_free_lvm_vg_list> after use>."
12811 #: ../src/guestfs-actions.pod:5172
12812 msgid "guestfs_vgscan"
12816 #: ../src/guestfs-actions.pod:5174
12819 " int guestfs_vgscan (guestfs_h *g);\n"
12824 #: ../src/guestfs-actions.pod:5176 ../fish/guestfish-actions.pod:3990
12826 "This rescans all block devices and rebuilds the list of LVM physical "
12827 "volumes, volume groups and logical volumes."
12831 #: ../src/guestfs-actions.pod:5181
12832 msgid "guestfs_vguuid"
12836 #: ../src/guestfs-actions.pod:5183
12839 " char *guestfs_vguuid (guestfs_h *g,\n"
12840 "\t\tconst char *vgname);\n"
12845 #: ../src/guestfs-actions.pod:5186 ../fish/guestfish-actions.pod:3997
12846 msgid "This command returns the UUID of the LVM VG named C<vgname>."
12850 #: ../src/guestfs-actions.pod:5191
12851 msgid "guestfs_wait_ready"
12855 #: ../src/guestfs-actions.pod:5193
12858 " int guestfs_wait_ready (guestfs_h *g);\n"
12863 #: ../src/guestfs-actions.pod:5195
12864 msgid "This function is a no op."
12868 #: ../src/guestfs-actions.pod:5197
12870 "In versions of the API E<lt> 1.0.71 you had to call this function just after "
12871 "calling C<guestfs_launch> to wait for the launch to complete. However this "
12872 "is no longer necessary because C<guestfs_launch> now does the waiting."
12876 #: ../src/guestfs-actions.pod:5202
12878 "If you see any calls to this function in code then you can just remove them, "
12879 "unless you want to retain compatibility with older versions of the API."
12883 #: ../src/guestfs-actions.pod:5208
12884 msgid "guestfs_wc_c"
12888 #: ../src/guestfs-actions.pod:5210
12891 " int guestfs_wc_c (guestfs_h *g,\n"
12892 "\t\tconst char *path);\n"
12897 #: ../src/guestfs-actions.pod:5213 ../fish/guestfish-actions.pod:4003
12899 "This command counts the characters in a file, using the C<wc -c> external "
12904 #: ../src/guestfs-actions.pod:5218
12905 msgid "guestfs_wc_l"
12909 #: ../src/guestfs-actions.pod:5220
12912 " int guestfs_wc_l (guestfs_h *g,\n"
12913 "\t\tconst char *path);\n"
12918 #: ../src/guestfs-actions.pod:5223 ../fish/guestfish-actions.pod:4010
12920 "This command counts the lines in a file, using the C<wc -l> external "
12925 #: ../src/guestfs-actions.pod:5228
12926 msgid "guestfs_wc_w"
12930 #: ../src/guestfs-actions.pod:5230
12933 " int guestfs_wc_w (guestfs_h *g,\n"
12934 "\t\tconst char *path);\n"
12939 #: ../src/guestfs-actions.pod:5233 ../fish/guestfish-actions.pod:4017
12941 "This command counts the words in a file, using the C<wc -w> external "
12946 #: ../src/guestfs-actions.pod:5238
12947 msgid "guestfs_write"
12951 #: ../src/guestfs-actions.pod:5240
12954 " int guestfs_write (guestfs_h *g,\n"
12955 "\t\tconst char *path,\n"
12956 "\t\tconst char *content,\n"
12957 "\t\tsize_t content_size);\n"
12962 #: ../src/guestfs-actions.pod:5245 ../fish/guestfish-actions.pod:4024
12964 "This call creates a file called C<path>. The content of the file is the "
12965 "string C<content> (which can contain any 8 bit data)."
12969 #: ../src/guestfs-actions.pod:5253
12970 msgid "guestfs_write_file"
12974 #: ../src/guestfs-actions.pod:5255
12977 " int guestfs_write_file (guestfs_h *g,\n"
12978 "\t\tconst char *path,\n"
12979 "\t\tconst char *content,\n"
12985 #: ../src/guestfs-actions.pod:5260 ../fish/guestfish-actions.pod:4034
12987 "This call creates a file called C<path>. The contents of the file is the "
12988 "string C<content> (which can contain any 8 bit data), with length C<size>."
12992 #: ../src/guestfs-actions.pod:5264 ../fish/guestfish-actions.pod:4038
12994 "As a special case, if C<size> is C<0> then the length is calculated using "
12995 "C<strlen> (so in this case the content cannot contain embedded ASCII NULs)."
12999 #: ../src/guestfs-actions.pod:5268 ../fish/guestfish-actions.pod:4042
13001 "I<NB.> Owing to a bug, writing content containing ASCII NUL characters does "
13002 "I<not> work, even if the length is specified."
13006 #: ../src/guestfs-actions.pod:5276 ../fish/guestfish-actions.pod:4048
13007 msgid "This function is deprecated. In new code, use the C<write> call instead."
13011 #: ../src/guestfs-actions.pod:5283
13012 msgid "guestfs_zegrep"
13016 #: ../src/guestfs-actions.pod:5285
13019 " char **guestfs_zegrep (guestfs_h *g,\n"
13020 "\t\tconst char *regex,\n"
13021 "\t\tconst char *path);\n"
13026 #: ../src/guestfs-actions.pod:5289 ../fish/guestfish-actions.pod:4059
13027 msgid "This calls the external C<zegrep> program and returns the matching lines."
13031 #: ../src/guestfs-actions.pod:5299
13032 msgid "guestfs_zegrepi"
13036 #: ../src/guestfs-actions.pod:5301
13039 " char **guestfs_zegrepi (guestfs_h *g,\n"
13040 "\t\tconst char *regex,\n"
13041 "\t\tconst char *path);\n"
13046 #: ../src/guestfs-actions.pod:5305 ../fish/guestfish-actions.pod:4069
13047 msgid "This calls the external C<zegrep -i> program and returns the matching lines."
13051 #: ../src/guestfs-actions.pod:5315
13052 msgid "guestfs_zero"
13056 #: ../src/guestfs-actions.pod:5317
13059 " int guestfs_zero (guestfs_h *g,\n"
13060 "\t\tconst char *device);\n"
13065 #: ../src/guestfs-actions.pod:5320 ../fish/guestfish-actions.pod:4079
13066 msgid "This command writes zeroes over the first few blocks of C<device>."
13070 #: ../src/guestfs-actions.pod:5322 ../fish/guestfish-actions.pod:4081
13072 "How many blocks are zeroed isn't specified (but it's I<not> enough to "
13073 "securely wipe the device). It should be sufficient to remove any partition "
13074 "tables, filesystem superblocks and so on."
13078 #: ../src/guestfs-actions.pod:5326
13079 msgid "See also: C<guestfs_zero_device>, C<guestfs_scrub_device>."
13083 #: ../src/guestfs-actions.pod:5335
13084 msgid "guestfs_zero_device"
13088 #: ../src/guestfs-actions.pod:5337
13091 " int guestfs_zero_device (guestfs_h *g,\n"
13092 "\t\tconst char *device);\n"
13097 #: ../src/guestfs-actions.pod:5340
13099 "This command writes zeroes over the entire C<device>. Compare with "
13100 "C<guestfs_zero> which just zeroes the first few blocks of a device."
13104 #: ../src/guestfs-actions.pod:5354
13105 msgid "guestfs_zerofree"
13109 #: ../src/guestfs-actions.pod:5356
13112 " int guestfs_zerofree (guestfs_h *g,\n"
13113 "\t\tconst char *device);\n"
13118 #: ../src/guestfs-actions.pod:5359 ../fish/guestfish-actions.pod:4102
13120 "This runs the I<zerofree> program on C<device>. This program claims to zero "
13121 "unused inodes and disk blocks on an ext2/3 filesystem, thus making it "
13122 "possible to compress the filesystem more effectively."
13126 #: ../src/guestfs-actions.pod:5364 ../fish/guestfish-actions.pod:4107
13127 msgid "You should B<not> run this program if the filesystem is mounted."
13131 #: ../src/guestfs-actions.pod:5367 ../fish/guestfish-actions.pod:4110
13133 "It is possible that using this program can damage the filesystem or data on "
13138 #: ../src/guestfs-actions.pod:5372
13139 msgid "guestfs_zfgrep"
13143 #: ../src/guestfs-actions.pod:5374
13146 " char **guestfs_zfgrep (guestfs_h *g,\n"
13147 "\t\tconst char *pattern,\n"
13148 "\t\tconst char *path);\n"
13153 #: ../src/guestfs-actions.pod:5378 ../fish/guestfish-actions.pod:4117
13154 msgid "This calls the external C<zfgrep> program and returns the matching lines."
13158 #: ../src/guestfs-actions.pod:5388
13159 msgid "guestfs_zfgrepi"
13163 #: ../src/guestfs-actions.pod:5390
13166 " char **guestfs_zfgrepi (guestfs_h *g,\n"
13167 "\t\tconst char *pattern,\n"
13168 "\t\tconst char *path);\n"
13173 #: ../src/guestfs-actions.pod:5394 ../fish/guestfish-actions.pod:4127
13174 msgid "This calls the external C<zfgrep -i> program and returns the matching lines."
13178 #: ../src/guestfs-actions.pod:5404
13179 msgid "guestfs_zfile"
13183 #: ../src/guestfs-actions.pod:5406
13186 " char *guestfs_zfile (guestfs_h *g,\n"
13187 "\t\tconst char *meth,\n"
13188 "\t\tconst char *path);\n"
13193 #: ../src/guestfs-actions.pod:5410 ../fish/guestfish-actions.pod:4137
13194 msgid "This command runs C<file> after first decompressing C<path> using C<method>."
13198 #: ../src/guestfs-actions.pod:5413 ../fish/guestfish-actions.pod:4140
13199 msgid "C<method> must be one of C<gzip>, C<compress> or C<bzip2>."
13203 #: ../src/guestfs-actions.pod:5415
13205 "Since 1.0.63, use C<guestfs_file> instead which can now process compressed "
13210 #: ../src/guestfs-actions.pod:5421 ../fish/guestfish-actions.pod:4145
13211 msgid "This function is deprecated. In new code, use the C<file> call instead."
13215 #: ../src/guestfs-actions.pod:5428
13216 msgid "guestfs_zgrep"
13220 #: ../src/guestfs-actions.pod:5430
13223 " char **guestfs_zgrep (guestfs_h *g,\n"
13224 "\t\tconst char *regex,\n"
13225 "\t\tconst char *path);\n"
13230 #: ../src/guestfs-actions.pod:5434 ../fish/guestfish-actions.pod:4156
13231 msgid "This calls the external C<zgrep> program and returns the matching lines."
13235 #: ../src/guestfs-actions.pod:5444
13236 msgid "guestfs_zgrepi"
13240 #: ../src/guestfs-actions.pod:5446
13243 " char **guestfs_zgrepi (guestfs_h *g,\n"
13244 "\t\tconst char *regex,\n"
13245 "\t\tconst char *path);\n"
13250 #: ../src/guestfs-actions.pod:5450 ../fish/guestfish-actions.pod:4166
13251 msgid "This calls the external C<zgrep -i> program and returns the matching lines."
13255 #: ../src/guestfs-availability.pod:3
13260 #: ../src/guestfs-availability.pod:5
13262 "The following functions: L</guestfs_aug_clear> L</guestfs_aug_close> "
13263 "L</guestfs_aug_defnode> L</guestfs_aug_defvar> L</guestfs_aug_get> "
13264 "L</guestfs_aug_init> L</guestfs_aug_insert> L</guestfs_aug_load> "
13265 "L</guestfs_aug_ls> L</guestfs_aug_match> L</guestfs_aug_mv> "
13266 "L</guestfs_aug_rm> L</guestfs_aug_save> L</guestfs_aug_set>"
13270 #: ../src/guestfs-availability.pod:21
13275 #: ../src/guestfs-availability.pod:23
13277 "The following functions: L</guestfs_inotify_add_watch> "
13278 "L</guestfs_inotify_close> L</guestfs_inotify_files> L</guestfs_inotify_init> "
13279 "L</guestfs_inotify_read> L</guestfs_inotify_rm_watch>"
13283 #: ../src/guestfs-availability.pod:31
13284 msgid "B<linuxfsuuid>"
13288 #: ../src/guestfs-availability.pod:33
13290 "The following functions: L</guestfs_mke2fs_JU> L</guestfs_mke2journal_U> "
13291 "L</guestfs_mkswap_U> L</guestfs_swapoff_uuid> L</guestfs_swapon_uuid>"
13295 #: ../src/guestfs-availability.pod:40
13296 msgid "B<linuxmodules>"
13300 #: ../src/guestfs-availability.pod:42
13301 msgid "The following functions: L</guestfs_modprobe>"
13305 #: ../src/guestfs-availability.pod:45
13306 msgid "B<linuxxattrs>"
13310 #: ../src/guestfs-availability.pod:47
13312 "The following functions: L</guestfs_getxattrs> L</guestfs_lgetxattrs> "
13313 "L</guestfs_lremovexattr> L</guestfs_lsetxattr> L</guestfs_lxattrlist> "
13314 "L</guestfs_removexattr> L</guestfs_setxattr>"
13318 #: ../src/guestfs-availability.pod:56
13323 #: ../src/guestfs-availability.pod:58
13325 "The following functions: L</guestfs_luks_add_key> L</guestfs_luks_close> "
13326 "L</guestfs_luks_format> L</guestfs_luks_format_cipher> "
13327 "L</guestfs_luks_kill_slot> L</guestfs_luks_open> L</guestfs_luks_open_ro>"
13331 #: ../src/guestfs-availability.pod:67
13336 #: ../src/guestfs-availability.pod:69
13338 "The following functions: L</guestfs_is_lv> L</guestfs_lvcreate> "
13339 "L</guestfs_lvm_remove_all> L</guestfs_lvm_set_filter> L</guestfs_lvremove> "
13340 "L</guestfs_lvresize> L</guestfs_lvresize_free> L</guestfs_lvs> "
13341 "L</guestfs_lvs_full> L</guestfs_pvcreate> L</guestfs_pvremove> "
13342 "L</guestfs_pvresize> L</guestfs_pvresize_size> L</guestfs_pvs> "
13343 "L</guestfs_pvs_full> L</guestfs_vg_activate> L</guestfs_vg_activate_all> "
13344 "L</guestfs_vgcreate> L</guestfs_vgremove> L</guestfs_vgs> "
13345 "L</guestfs_vgs_full>"
13349 #: ../src/guestfs-availability.pod:92
13354 #: ../src/guestfs-availability.pod:94
13356 "The following functions: L</guestfs_mkfifo> L</guestfs_mknod> "
13357 "L</guestfs_mknod_b> L</guestfs_mknod_c>"
13361 #: ../src/guestfs-availability.pod:100
13366 #: ../src/guestfs-availability.pod:102
13367 msgid "The following functions: L</guestfs_ntfs_3g_probe>"
13371 #: ../src/guestfs-availability.pod:105
13372 msgid "B<ntfsprogs>"
13376 #: ../src/guestfs-availability.pod:107
13377 msgid "The following functions: L</guestfs_ntfsresize> L</guestfs_ntfsresize_size>"
13381 #: ../src/guestfs-availability.pod:111
13382 msgid "B<realpath>"
13386 #: ../src/guestfs-availability.pod:113
13387 msgid "The following functions: L</guestfs_realpath>"
13391 #: ../src/guestfs-availability.pod:116
13396 #: ../src/guestfs-availability.pod:118
13398 "The following functions: L</guestfs_scrub_device> L</guestfs_scrub_file> "
13399 "L</guestfs_scrub_freespace>"
13403 #: ../src/guestfs-availability.pod:123
13408 #: ../src/guestfs-availability.pod:125
13409 msgid "The following functions: L</guestfs_getcon> L</guestfs_setcon>"
13413 #: ../src/guestfs-availability.pod:129
13418 #: ../src/guestfs-availability.pod:131
13419 msgid "The following functions: L</guestfs_txz_in> L</guestfs_txz_out>"
13423 #: ../src/guestfs-availability.pod:135
13424 msgid "B<zerofree>"
13428 #: ../src/guestfs-availability.pod:137
13429 msgid "The following functions: L</guestfs_zerofree>"
13433 #: ../src/guestfs-structs.pod:1
13434 msgid "guestfs_int_bool"
13438 #: ../src/guestfs-structs.pod:3
13441 " struct guestfs_int_bool {\n"
13449 #: ../src/guestfs-structs.pod:8
13452 " struct guestfs_int_bool_list {\n"
13453 " uint32_t len; /* Number of elements in list. */\n"
13454 " struct guestfs_int_bool *val; /* Elements. */\n"
13460 #: ../src/guestfs-structs.pod:13
13463 " void guestfs_free_int_bool (struct guestfs_free_int_bool *);\n"
13464 " void guestfs_free_int_bool_list (struct guestfs_free_int_bool_list *);\n"
13469 #: ../src/guestfs-structs.pod:16
13470 msgid "guestfs_lvm_pv"
13474 #: ../src/guestfs-structs.pod:18
13477 " struct guestfs_lvm_pv {\n"
13478 " char *pv_name;\n"
13479 " /* The next field is NOT nul-terminated, be careful when printing it: "
13481 " char pv_uuid[32];\n"
13483 " uint64_t pv_size;\n"
13484 " uint64_t dev_size;\n"
13485 " uint64_t pv_free;\n"
13486 " uint64_t pv_used;\n"
13487 " char *pv_attr;\n"
13488 " int64_t pv_pe_count;\n"
13489 " int64_t pv_pe_alloc_count;\n"
13490 " char *pv_tags;\n"
13491 " uint64_t pe_start;\n"
13492 " int64_t pv_mda_count;\n"
13493 " uint64_t pv_mda_free;\n"
13499 #: ../src/guestfs-structs.pod:36
13502 " struct guestfs_lvm_pv_list {\n"
13503 " uint32_t len; /* Number of elements in list. */\n"
13504 " struct guestfs_lvm_pv *val; /* Elements. */\n"
13510 #: ../src/guestfs-structs.pod:41
13513 " void guestfs_free_lvm_pv (struct guestfs_free_lvm_pv *);\n"
13514 " void guestfs_free_lvm_pv_list (struct guestfs_free_lvm_pv_list *);\n"
13519 #: ../src/guestfs-structs.pod:44
13520 msgid "guestfs_lvm_vg"
13524 #: ../src/guestfs-structs.pod:46
13527 " struct guestfs_lvm_vg {\n"
13528 " char *vg_name;\n"
13529 " /* The next field is NOT nul-terminated, be careful when printing it: "
13531 " char vg_uuid[32];\n"
13533 " char *vg_attr;\n"
13534 " uint64_t vg_size;\n"
13535 " uint64_t vg_free;\n"
13536 " char *vg_sysid;\n"
13537 " uint64_t vg_extent_size;\n"
13538 " int64_t vg_extent_count;\n"
13539 " int64_t vg_free_count;\n"
13540 " int64_t max_lv;\n"
13541 " int64_t max_pv;\n"
13542 " int64_t pv_count;\n"
13543 " int64_t lv_count;\n"
13544 " int64_t snap_count;\n"
13545 " int64_t vg_seqno;\n"
13546 " char *vg_tags;\n"
13547 " int64_t vg_mda_count;\n"
13548 " uint64_t vg_mda_free;\n"
13554 #: ../src/guestfs-structs.pod:69
13557 " struct guestfs_lvm_vg_list {\n"
13558 " uint32_t len; /* Number of elements in list. */\n"
13559 " struct guestfs_lvm_vg *val; /* Elements. */\n"
13565 #: ../src/guestfs-structs.pod:74
13568 " void guestfs_free_lvm_vg (struct guestfs_free_lvm_vg *);\n"
13569 " void guestfs_free_lvm_vg_list (struct guestfs_free_lvm_vg_list *);\n"
13574 #: ../src/guestfs-structs.pod:77
13575 msgid "guestfs_lvm_lv"
13579 #: ../src/guestfs-structs.pod:79
13582 " struct guestfs_lvm_lv {\n"
13583 " char *lv_name;\n"
13584 " /* The next field is NOT nul-terminated, be careful when printing it: "
13586 " char lv_uuid[32];\n"
13587 " char *lv_attr;\n"
13588 " int64_t lv_major;\n"
13589 " int64_t lv_minor;\n"
13590 " int64_t lv_kernel_major;\n"
13591 " int64_t lv_kernel_minor;\n"
13592 " uint64_t lv_size;\n"
13593 " int64_t seg_count;\n"
13595 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
13596 " float snap_percent;\n"
13597 " /* The next field is [0..100] or -1 meaning 'not present': */\n"
13598 " float copy_percent;\n"
13599 " char *move_pv;\n"
13600 " char *lv_tags;\n"
13601 " char *mirror_log;\n"
13602 " char *modules;\n"
13608 #: ../src/guestfs-structs.pod:101
13611 " struct guestfs_lvm_lv_list {\n"
13612 " uint32_t len; /* Number of elements in list. */\n"
13613 " struct guestfs_lvm_lv *val; /* Elements. */\n"
13619 #: ../src/guestfs-structs.pod:106
13622 " void guestfs_free_lvm_lv (struct guestfs_free_lvm_lv *);\n"
13623 " void guestfs_free_lvm_lv_list (struct guestfs_free_lvm_lv_list *);\n"
13628 #: ../src/guestfs-structs.pod:111
13631 " struct guestfs_stat {\n"
13635 " int64_t nlink;\n"
13640 " int64_t blksize;\n"
13641 " int64_t blocks;\n"
13642 " int64_t atime;\n"
13643 " int64_t mtime;\n"
13644 " int64_t ctime;\n"
13650 #: ../src/guestfs-structs.pod:127
13653 " struct guestfs_stat_list {\n"
13654 " uint32_t len; /* Number of elements in list. */\n"
13655 " struct guestfs_stat *val; /* Elements. */\n"
13661 #: ../src/guestfs-structs.pod:132
13664 " void guestfs_free_stat (struct guestfs_free_stat *);\n"
13665 " void guestfs_free_stat_list (struct guestfs_free_stat_list *);\n"
13670 #: ../src/guestfs-structs.pod:137
13673 " struct guestfs_statvfs {\n"
13674 " int64_t bsize;\n"
13675 " int64_t frsize;\n"
13676 " int64_t blocks;\n"
13677 " int64_t bfree;\n"
13678 " int64_t bavail;\n"
13679 " int64_t files;\n"
13680 " int64_t ffree;\n"
13681 " int64_t favail;\n"
13684 " int64_t namemax;\n"
13690 #: ../src/guestfs-structs.pod:151
13693 " struct guestfs_statvfs_list {\n"
13694 " uint32_t len; /* Number of elements in list. */\n"
13695 " struct guestfs_statvfs *val; /* Elements. */\n"
13701 #: ../src/guestfs-structs.pod:156
13704 " void guestfs_free_statvfs (struct guestfs_free_statvfs *);\n"
13705 " void guestfs_free_statvfs_list (struct guestfs_free_statvfs_list *);\n"
13710 #: ../src/guestfs-structs.pod:159
13711 msgid "guestfs_dirent"
13715 #: ../src/guestfs-structs.pod:161
13718 " struct guestfs_dirent {\n"
13727 #: ../src/guestfs-structs.pod:167
13730 " struct guestfs_dirent_list {\n"
13731 " uint32_t len; /* Number of elements in list. */\n"
13732 " struct guestfs_dirent *val; /* Elements. */\n"
13738 #: ../src/guestfs-structs.pod:172
13741 " void guestfs_free_dirent (struct guestfs_free_dirent *);\n"
13742 " void guestfs_free_dirent_list (struct guestfs_free_dirent_list *);\n"
13747 #: ../src/guestfs-structs.pod:177
13750 " struct guestfs_version {\n"
13751 " int64_t major;\n"
13752 " int64_t minor;\n"
13753 " int64_t release;\n"
13760 #: ../src/guestfs-structs.pod:184
13763 " struct guestfs_version_list {\n"
13764 " uint32_t len; /* Number of elements in list. */\n"
13765 " struct guestfs_version *val; /* Elements. */\n"
13771 #: ../src/guestfs-structs.pod:189
13774 " void guestfs_free_version (struct guestfs_free_version *);\n"
13775 " void guestfs_free_version_list (struct guestfs_free_version_list *);\n"
13780 #: ../src/guestfs-structs.pod:192
13781 msgid "guestfs_xattr"
13785 #: ../src/guestfs-structs.pod:194
13788 " struct guestfs_xattr {\n"
13789 " char *attrname;\n"
13790 " /* The next two fields describe a byte array. */\n"
13791 " uint32_t attrval_len;\n"
13792 " char *attrval;\n"
13798 #: ../src/guestfs-structs.pod:201
13801 " struct guestfs_xattr_list {\n"
13802 " uint32_t len; /* Number of elements in list. */\n"
13803 " struct guestfs_xattr *val; /* Elements. */\n"
13809 #: ../src/guestfs-structs.pod:206
13812 " void guestfs_free_xattr (struct guestfs_free_xattr *);\n"
13813 " void guestfs_free_xattr_list (struct guestfs_free_xattr_list *);\n"
13818 #: ../src/guestfs-structs.pod:209
13819 msgid "guestfs_inotify_event"
13823 #: ../src/guestfs-structs.pod:211
13826 " struct guestfs_inotify_event {\n"
13827 " int64_t in_wd;\n"
13828 " uint32_t in_mask;\n"
13829 " uint32_t in_cookie;\n"
13830 " char *in_name;\n"
13836 #: ../src/guestfs-structs.pod:218
13839 " struct guestfs_inotify_event_list {\n"
13840 " uint32_t len; /* Number of elements in list. */\n"
13841 " struct guestfs_inotify_event *val; /* Elements. */\n"
13847 #: ../src/guestfs-structs.pod:223
13850 " void guestfs_free_inotify_event (struct guestfs_free_inotify_event *);\n"
13851 " void guestfs_free_inotify_event_list (struct "
13852 "guestfs_free_inotify_event_list *);\n"
13857 #: ../src/guestfs-structs.pod:226
13858 msgid "guestfs_partition"
13862 #: ../src/guestfs-structs.pod:228
13865 " struct guestfs_partition {\n"
13866 " int32_t part_num;\n"
13867 " uint64_t part_start;\n"
13868 " uint64_t part_end;\n"
13869 " uint64_t part_size;\n"
13875 #: ../src/guestfs-structs.pod:235
13878 " struct guestfs_partition_list {\n"
13879 " uint32_t len; /* Number of elements in list. */\n"
13880 " struct guestfs_partition *val; /* Elements. */\n"
13886 #: ../src/guestfs-structs.pod:240
13889 " void guestfs_free_partition (struct guestfs_free_partition *);\n"
13890 " void guestfs_free_partition_list (struct guestfs_free_partition_list *);\n"
13895 #: ../fish/guestfish.pod:5
13896 msgid "guestfish - the libguestfs Filesystem Interactive SHell"
13900 #: ../fish/guestfish.pod:9
13903 " guestfish [--options] [commands]\n"
13908 #: ../fish/guestfish.pod:11
13916 #: ../fish/guestfish.pod:13
13919 " guestfish -a disk.img\n"
13924 #: ../fish/guestfish.pod:15
13927 " guestfish -a disk.img -m dev[:mountpoint]\n"
13932 #: ../fish/guestfish.pod:17
13935 " guestfish -d libvirt-domain\n"
13940 #: ../fish/guestfish.pod:19
13943 " guestfish -a disk.img -i\n"
13948 #: ../fish/guestfish.pod:21
13951 " guestfish -d libvirt-domain -i\n"
13956 #: ../fish/guestfish.pod:23 ../fuse/guestmount.pod:11 ../tools/virt-edit.pl:45 ../tools/virt-rescue.pl:41 ../tools/virt-tar.pl:60 ../tools/virt-win-reg.pl:52
13961 #: ../fish/guestfish.pod:25
13963 "Using guestfish in read/write mode on live virtual machines can be "
13964 "dangerous, potentially causing disk corruption. Use the I<--ro> (read-only) "
13965 "option to use guestfish safely if the disk image or virtual machine might be "
13970 #: ../fish/guestfish.pod:30 ../fish/guestfish.pod:729 ../fuse/guestmount.pod:35 ../tools/virt-cat.pl:51 ../tools/virt-edit.pl:59 ../tools/virt-resize.pl:66 ../tools/virt-tar.pl:46
13975 #: ../fish/guestfish.pod:32
13976 msgid "As an interactive shell"
13980 #: ../fish/guestfish.pod:34
13988 #: ../fish/guestfish.pod:36
13991 " Welcome to guestfish, the libguestfs filesystem interactive shell for\n"
13992 " editing virtual machine filesystems.\n"
13997 #: ../fish/guestfish.pod:39
14000 " Type: 'help' for a list of commands\n"
14001 " 'man' to read the manual\n"
14002 " 'quit' to quit the shell\n"
14007 #: ../fish/guestfish.pod:43
14015 #: ../fish/guestfish.pod:45
14016 msgid "From shell scripts"
14020 #: ../fish/guestfish.pod:47
14021 msgid "Create a new C</etc/motd> file in a guest:"
14025 #: ../fish/guestfish.pod:49
14028 " guestfish <<_EOF_\n"
14031 " mount /dev/vg_guest/lv_root /\n"
14032 " write /etc/motd \"Welcome, new users\"\n"
14038 #: ../fish/guestfish.pod:56
14039 msgid "List the LVM logical volumes in a guest:"
14043 #: ../fish/guestfish.pod:58
14046 " guestfish -a disk.img --ro <<_EOF_\n"
14054 #: ../fish/guestfish.pod:63
14055 msgid "On one command line"
14059 #: ../fish/guestfish.pod:65
14060 msgid "Update C</etc/resolv.conf> in a guest:"
14064 #: ../fish/guestfish.pod:67
14068 " add disk.img : run : mount /dev/vg_guest/lv_root / : \\\n"
14069 " write /etc/resolv.conf \"nameserver 1.2.3.4\"\n"
14074 #: ../fish/guestfish.pod:71
14075 msgid "Edit C</boot/grub/grub.conf> interactively:"
14079 #: ../fish/guestfish.pod:73
14082 " guestfish --add disk.img \\\n"
14083 " --mount /dev/vg_guest/lv_root \\\n"
14084 " --mount /dev/sda1:/boot \\\n"
14085 " edit /boot/grub/grub.conf\n"
14090 #: ../fish/guestfish.pod:78
14091 msgid "Mount disks automatically"
14095 #: ../fish/guestfish.pod:80
14097 "Use the I<-i> option to automatically mount the disks from a virtual "
14102 #: ../fish/guestfish.pod:83
14105 " guestfish --ro -a disk.img -i cat /etc/group\n"
14110 #: ../fish/guestfish.pod:85
14113 " guestfish --ro -d libvirt-domain -i cat /etc/group\n"
14118 #: ../fish/guestfish.pod:87
14119 msgid "As a script interpreter"
14123 #: ../fish/guestfish.pod:89
14124 msgid "Create a 100MB disk containing an ext2-formatted partition:"
14128 #: ../fish/guestfish.pod:91
14131 " #!/usr/bin/guestfish -f\n"
14132 " sparse test1.img 100M\n"
14134 " part-disk /dev/sda mbr\n"
14135 " mkfs ext2 /dev/sda1\n"
14140 #: ../fish/guestfish.pod:97
14141 msgid "Start with a prepared disk"
14145 #: ../fish/guestfish.pod:99
14147 "An alternate way to create a 100MB disk called C<test1.img> containing a "
14148 "single ext2-formatted partition:"
14152 #: ../fish/guestfish.pod:102
14155 " guestfish -N fs\n"
14160 #: ../fish/guestfish.pod:104
14161 msgid "To list what is available do:"
14165 #: ../fish/guestfish.pod:106 ../fish/guestfish.pod:720
14168 " guestfish -N list | less\n"
14173 #: ../fish/guestfish.pod:108
14174 msgid "Remote control"
14178 #: ../fish/guestfish.pod:110
14181 " eval `guestfish --listen --ro`\n"
14182 " guestfish --remote add disk.img\n"
14183 " guestfish --remote run\n"
14184 " guestfish --remote lvs\n"
14189 #: ../fish/guestfish.pod:117
14191 "Guestfish is a shell and command-line tool for examining and modifying "
14192 "virtual machine filesystems. It uses libguestfs and exposes all of the "
14193 "functionality of the guestfs API, see L<guestfs(3)>."
14197 #: ../fish/guestfish.pod:121
14199 "Guestfish gives you structured access to the libguestfs API, from shell "
14200 "scripts or the command line or interactively. If you want to rescue a "
14201 "broken virtual machine image, you should look at the L<virt-rescue(1)> "
14206 #: ../fish/guestfish.pod:126 ../test-tool/libguestfs-test-tool.pod:37 ../fuse/guestmount.pod:70 ../inspector/virt-inspector.pl:75 ../tools/virt-cat.pl:80 ../tools/virt-df.pl:71 ../tools/virt-edit.pl:73 ../tools/virt-list-filesystems.pl:50 ../tools/virt-list-partitions.pl:51 ../tools/virt-ls.pl:79 ../tools/virt-make-fs.pl:153 ../tools/virt-rescue.pl:103 ../tools/virt-resize.pl:233 ../tools/virt-tar.pl:99 ../tools/virt-win-reg.pl:172
14211 #: ../fish/guestfish.pod:130 ../fuse/guestmount.pod:94 ../inspector/virt-inspector.pl:83 ../tools/virt-cat.pl:88 ../tools/virt-df.pl:79 ../tools/virt-edit.pl:81 ../tools/virt-list-filesystems.pl:58 ../tools/virt-list-partitions.pl:59 ../tools/virt-ls.pl:87 ../tools/virt-make-fs.pl:161 ../tools/virt-rescue.pl:111 ../tools/virt-resize.pl:241 ../tools/virt-tar.pl:107 ../tools/virt-win-reg.pl:180
14216 #: ../fish/guestfish.pod:132
14217 msgid "Displays general help on options."
14221 #: ../fish/guestfish.pod:134
14222 msgid "B<-h> | B<--cmd-help>"
14226 #: ../fish/guestfish.pod:136
14227 msgid "Lists all available guestfish commands."
14231 #: ../fish/guestfish.pod:138
14232 msgid "B<-h cmd> | B<--cmd-help cmd>"
14236 #: ../fish/guestfish.pod:140
14237 msgid "Displays detailed help on a single command C<cmd>."
14241 #: ../fish/guestfish.pod:142 ../fuse/guestmount.pod:74
14242 msgid "B<-a image> | B<--add image>"
14246 #: ../fish/guestfish.pod:144
14247 msgid "Add a block device or virtual machine image to the shell."
14251 #: ../fish/guestfish.pod:146
14252 msgid "B<-c URI> | B<--connect URI>"
14256 #: ../fish/guestfish.pod:148
14258 "When used in conjunction with the I<-d> option, this specifies the libvirt "
14259 "URI to use. The default is to use the default libvirt connection."
14263 #: ../fish/guestfish.pod:152
14264 msgid "B<-d libvirt-domain> | B<--domain libvirt-domain>"
14268 #: ../fish/guestfish.pod:154
14270 "Add disks from the named libvirt domain. If the I<--ro> option is also "
14271 "used, then any libvirt domain can be used. However in write mode, only "
14272 "libvirt domains which are shut down can be named here."
14276 #: ../fish/guestfish.pod:158
14277 msgid "B<-D> | B<--no-dest-paths>"
14281 #: ../fish/guestfish.pod:160
14283 "Don't tab-complete paths on the guest filesystem. It is useful to be able "
14284 "to hit the tab key to complete paths on the guest filesystem, but this "
14285 "causes extra \"hidden\" guestfs calls to be made, so this option is here to "
14286 "allow this feature to be disabled."
14290 #: ../fish/guestfish.pod:165
14291 msgid "B<-f file> | B<--file file>"
14295 #: ../fish/guestfish.pod:167
14296 msgid "Read commands from C<file>. To write pure guestfish scripts, use:"
14300 #: ../fish/guestfish.pod:170
14303 " #!/usr/bin/guestfish -f\n"
14308 #: ../fish/guestfish.pod:172
14309 msgid "B<-i> | B<--inspector>"
14313 #: ../fish/guestfish.pod:174
14315 "Using L<virt-inspector(1)> code, inspect the disks looking for an operating "
14316 "system and mount filesystems as they would be mounted on the real virtual "
14321 #: ../fish/guestfish.pod:178
14322 msgid "Typical usage is either:"
14326 #: ../fish/guestfish.pod:180
14329 " guestfish -d myguest -i\n"
14334 #: ../fish/guestfish.pod:182
14335 msgid "(for an inactive libvirt domain called I<myguest>), or:"
14339 #: ../fish/guestfish.pod:184
14342 " guestfish --ro -d myguest -i\n"
14347 #: ../fish/guestfish.pod:186
14348 msgid "(for active domains, readonly), or specify the block device directly:"
14352 #: ../fish/guestfish.pod:188
14355 " guestfish -a /dev/Guests/MyGuest -i\n"
14360 #: ../fish/guestfish.pod:190
14362 "Note that the command line syntax changed slightly over older versions of "
14363 "guestfish. You can still use the old syntax:"
14367 #: ../fish/guestfish.pod:193
14370 " guestfish [--ro] -i disk.img\n"
14375 #: ../fish/guestfish.pod:195
14378 " guestfish [--ro] -i libvirt-domain\n"
14383 #: ../fish/guestfish.pod:197
14384 msgid "B<--keys-from-stdin>"
14388 #: ../fish/guestfish.pod:199
14390 "Read key or passphrase parameters from stdin. The default is to try to read "
14391 "passphrases from the user by opening C</dev/tty>."
14395 #: ../fish/guestfish.pod:202
14396 msgid "B<--listen>"
14400 #: ../fish/guestfish.pod:204
14402 "Fork into the background and listen for remote commands. See section "
14403 "L</REMOTE CONTROL GUESTFISH OVER A SOCKET> below."
14407 #: ../fish/guestfish.pod:207
14408 msgid "B<-m dev[:mountpoint]> | B<--mount dev[:mountpoint]>"
14412 #: ../fish/guestfish.pod:209
14413 msgid "Mount the named partition or logical volume on the given mountpoint."
14417 #: ../fish/guestfish.pod:211
14418 msgid "If the mountpoint is omitted, it defaults to C</>."
14422 #: ../fish/guestfish.pod:213
14423 msgid "You have to mount something on C</> before most commands will work."
14427 #: ../fish/guestfish.pod:215
14429 "If any I<-m> or I<--mount> options are given, the guest is automatically "
14434 #: ../fish/guestfish.pod:218
14436 "If you don't know what filesystems a disk image contains, you can either run "
14437 "guestfish without this option, then list the partitions and LVs available "
14438 "(see L</list-partitions> and L</lvs> commands), or you can use the "
14439 "L<virt-list-filesystems(1)> program."
14443 #: ../fish/guestfish.pod:223 ../fuse/guestmount.pod:106
14444 msgid "B<-n> | B<--no-sync>"
14448 #: ../fish/guestfish.pod:225
14450 "Disable autosync. This is enabled by default. See the discussion of "
14451 "autosync in the L<guestfs(3)> manpage."
14455 #: ../fish/guestfish.pod:228
14456 msgid "B<-N type> | B<--new type> | B<-N list>"
14460 #: ../fish/guestfish.pod:230
14462 "Prepare a fresh disk image formatted as \"type\". This is an alternative to "
14463 "the I<-a> option: whereas I<-a> adds an existing disk, I<-N> creates a "
14464 "preformatted disk with a filesystem and adds it. See L</PREPARED DISK "
14469 #: ../fish/guestfish.pod:235
14470 msgid "B<--progress-bars>"
14474 #: ../fish/guestfish.pod:237
14475 msgid "Enable progress bars, even when guestfish is used non-interactively."
14479 #: ../fish/guestfish.pod:239
14481 "Progress bars are enabled by default when guestfish is used as an "
14482 "interactive shell."
14486 #: ../fish/guestfish.pod:242
14487 msgid "B<--no-progress-bars>"
14491 #: ../fish/guestfish.pod:244
14492 msgid "Disable progress bars."
14496 #: ../fish/guestfish.pod:246
14497 msgid "B<--remote[=pid]>"
14501 #: ../fish/guestfish.pod:248
14503 "Send remote commands to C<$GUESTFISH_PID> or C<pid>. See section L</REMOTE "
14504 "CONTROL GUESTFISH OVER A SOCKET> below."
14508 #: ../fish/guestfish.pod:251 ../fuse/guestmount.pod:148
14509 msgid "B<-r> | B<--ro>"
14513 #: ../fish/guestfish.pod:253
14515 "This changes the I<-a> and I<-m> options so that disks are added and mounts "
14516 "are done read-only (see L<guestfs(3)/guestfs_mount_ro>)."
14520 #: ../fish/guestfish.pod:256 ../tools/virt-rescue.pl:162
14522 "The option must always be used if the disk image or virtual machine might be "
14523 "running, and is generally recommended in cases where you don't need write "
14524 "access to the disk."
14528 #: ../fish/guestfish.pod:260
14530 "Note that prepared disk images created with I<-N> are not affected by the "
14535 #: ../fish/guestfish.pod:263 ../fuse/guestmount.pod:158 ../tools/virt-rescue.pl:170
14536 msgid "B<--selinux>"
14540 #: ../fish/guestfish.pod:265
14541 msgid "Enable SELinux support for the guest. See L<guestfs(3)/SELINUX>."
14545 #: ../fish/guestfish.pod:267 ../fuse/guestmount.pod:168
14546 msgid "B<-v> | B<--verbose>"
14550 #: ../fish/guestfish.pod:269
14552 "Enable very verbose messages. This is particularly useful if you find a "
14557 #: ../fish/guestfish.pod:272 ../fuse/guestmount.pod:172
14558 msgid "B<-V> | B<--version>"
14562 #: ../fish/guestfish.pod:274
14563 msgid "Display the guestfish / libguestfs version number and exit."
14567 #: ../fish/guestfish.pod:276
14572 #: ../fish/guestfish.pod:278
14573 msgid "Echo each command before executing it."
14577 #: ../fish/guestfish.pod:282
14578 msgid "COMMANDS ON COMMAND LINE"
14582 #: ../fish/guestfish.pod:284
14583 msgid "Any additional (non-option) arguments are treated as commands to execute."
14587 #: ../fish/guestfish.pod:287
14589 "Commands to execute should be separated by a colon (C<:>), where the colon "
14590 "is a separate parameter. Thus:"
14594 #: ../fish/guestfish.pod:290
14597 " guestfish cmd [args...] : cmd [args...] : cmd [args...] ...\n"
14602 #: ../fish/guestfish.pod:292
14604 "If there are no additional arguments, then we enter a shell, either an "
14605 "interactive shell with a prompt (if the input is a terminal) or a "
14606 "non-interactive shell."
14610 #: ../fish/guestfish.pod:296
14612 "In either command line mode or non-interactive shell, the first command that "
14613 "gives an error causes the whole shell to exit. In interactive mode (with a "
14614 "prompt) if a command fails, you can continue to enter commands."
14618 #: ../fish/guestfish.pod:301
14619 msgid "USING launch (OR run)"
14623 #: ../fish/guestfish.pod:303
14625 "As with L<guestfs(3)>, you must first configure your guest by adding disks, "
14626 "then launch it, then mount any disks you need, and finally issue "
14627 "actions/commands. So the general order of the day is:"
14631 #: ../fish/guestfish.pod:311
14632 msgid "add or -a/--add"
14636 #: ../fish/guestfish.pod:315
14637 msgid "launch (aka run)"
14641 #: ../fish/guestfish.pod:319
14642 msgid "mount or -m/--mount"
14646 #: ../fish/guestfish.pod:323
14647 msgid "any other commands"
14651 #: ../fish/guestfish.pod:327
14653 "C<run> is a synonym for C<launch>. You must C<launch> (or C<run>) your "
14654 "guest before mounting or performing any other commands."
14658 #: ../fish/guestfish.pod:330
14660 "The only exception is that if the I<-m> or I<--mount> option was given, the "
14661 "guest is automatically run for you (simply because guestfish can't mount the "
14662 "disks you asked for without doing this)."
14666 #: ../fish/guestfish.pod:334
14671 #: ../fish/guestfish.pod:336
14673 "You can quote ordinary parameters using either single or double quotes. For "
14678 #: ../fish/guestfish.pod:339
14681 " add \"file with a space.img\"\n"
14686 #: ../fish/guestfish.pod:341
14689 " rm '/file name'\n"
14694 #: ../fish/guestfish.pod:343
14702 #: ../fish/guestfish.pod:345
14704 "A few commands require a list of strings to be passed. For these, use a "
14705 "whitespace-separated list, enclosed in quotes. Strings containing "
14706 "whitespace to be passed through must be enclosed in single quotes. A "
14707 "literal single quote must be escaped with a backslash."
14711 #: ../fish/guestfish.pod:350
14714 " vgcreate VG \"/dev/sda1 /dev/sdb1\"\n"
14715 " command \"/bin/echo 'foo bar'\"\n"
14716 " command \"/bin/echo \\'foo\\'\"\n"
14721 #: ../fish/guestfish.pod:354
14726 #: ../fish/guestfish.pod:356
14727 msgid "This section applies to all commands which can take integers as parameters."
14731 #: ../fish/guestfish.pod:359
14732 msgid "SIZE SUFFIX"
14736 #: ../fish/guestfish.pod:361
14738 "When the command takes a parameter measured in bytes, you can use one of the "
14739 "following suffixes to specify kilobytes, megabytes and larger sizes:"
14743 #: ../fish/guestfish.pod:367
14744 msgid "B<k> or B<K> or B<KiB>"
14748 #: ../fish/guestfish.pod:369
14749 msgid "The size in kilobytes (multiplied by 1024)."
14753 #: ../fish/guestfish.pod:371
14758 #: ../fish/guestfish.pod:373
14759 msgid "The size in SI 1000 byte units."
14763 #: ../fish/guestfish.pod:375
14764 msgid "B<M> or B<MiB>"
14768 #: ../fish/guestfish.pod:377
14769 msgid "The size in megabytes (multiplied by 1048576)."
14773 #: ../fish/guestfish.pod:379
14778 #: ../fish/guestfish.pod:381
14779 msgid "The size in SI 1000000 byte units."
14783 #: ../fish/guestfish.pod:383
14784 msgid "B<G> or B<GiB>"
14788 #: ../fish/guestfish.pod:385
14789 msgid "The size in gigabytes (multiplied by 2**30)."
14793 #: ../fish/guestfish.pod:387
14798 #: ../fish/guestfish.pod:389
14799 msgid "The size in SI 10**9 byte units."
14803 #: ../fish/guestfish.pod:391
14804 msgid "B<T> or B<TiB>"
14808 #: ../fish/guestfish.pod:393
14809 msgid "The size in terabytes (multiplied by 2**40)."
14813 #: ../fish/guestfish.pod:395
14818 #: ../fish/guestfish.pod:397
14819 msgid "The size in SI 10**12 byte units."
14823 #: ../fish/guestfish.pod:399
14824 msgid "B<P> or B<PiB>"
14828 #: ../fish/guestfish.pod:401
14829 msgid "The size in petabytes (multiplied by 2**50)."
14833 #: ../fish/guestfish.pod:403
14838 #: ../fish/guestfish.pod:405
14839 msgid "The size in SI 10**15 byte units."
14843 #: ../fish/guestfish.pod:407
14844 msgid "B<E> or B<EiB>"
14848 #: ../fish/guestfish.pod:409
14849 msgid "The size in exabytes (multiplied by 2**60)."
14853 #: ../fish/guestfish.pod:411
14858 #: ../fish/guestfish.pod:413
14859 msgid "The size in SI 10**18 byte units."
14863 #: ../fish/guestfish.pod:415
14864 msgid "B<Z> or B<ZiB>"
14868 #: ../fish/guestfish.pod:417
14869 msgid "The size in zettabytes (multiplied by 2**70)."
14873 #: ../fish/guestfish.pod:419
14878 #: ../fish/guestfish.pod:421
14879 msgid "The size in SI 10**21 byte units."
14883 #: ../fish/guestfish.pod:423
14884 msgid "B<Y> or B<YiB>"
14888 #: ../fish/guestfish.pod:425
14889 msgid "The size in yottabytes (multiplied by 2**80)."
14893 #: ../fish/guestfish.pod:427
14898 #: ../fish/guestfish.pod:429
14899 msgid "The size in SI 10**24 byte units."
14903 #: ../fish/guestfish.pod:433
14904 msgid "For example:"
14908 #: ../fish/guestfish.pod:435
14911 " truncate-size /file 1G\n"
14916 #: ../fish/guestfish.pod:437
14917 msgid "would truncate the file to 1 gigabyte."
14921 #: ../fish/guestfish.pod:439
14923 "Be careful because a few commands take sizes in kilobytes or megabytes "
14924 "(eg. the parameter to L</memsize> is specified in megabytes already). "
14925 "Adding a suffix will probably not do what you expect."
14929 #: ../fish/guestfish.pod:443
14930 msgid "OCTAL AND HEXADECIMAL NUMBERS"
14934 #: ../fish/guestfish.pod:445
14936 "For specifying the radix (base) use the C convention: C<0> to prefix an "
14937 "octal number or C<0x> to prefix a hexadecimal number. For example:"
14941 #: ../fish/guestfish.pod:448
14944 " 1234 decimal number 1234\n"
14945 " 02322 octal number, equivalent to decimal 1234\n"
14946 " 0x4d2 hexadecimal number, equivalent to decimal 1234\n"
14951 #: ../fish/guestfish.pod:452
14953 "When using the C<chmod> command, you almost always want to specify an octal "
14954 "number for the mode, and you must prefix it with C<0> (unlike the Unix "
14955 "L<chmod(1)> program):"
14959 #: ../fish/guestfish.pod:456
14962 " chmod 0777 /public # OK\n"
14963 " chmod 777 /public # WRONG! This is mode 777 decimal = 01411 octal.\n"
14968 #: ../fish/guestfish.pod:459
14970 "Commands that return numbers usually print them in decimal, but some "
14971 "commands print numbers in other radices (eg. C<umask> prints the mode in "
14972 "octal, preceeded by C<0>)."
14976 #: ../fish/guestfish.pod:463
14977 msgid "WILDCARDS AND GLOBBING"
14981 #: ../fish/guestfish.pod:465
14983 "Neither guestfish nor the underlying guestfs API performs wildcard expansion "
14984 "(globbing) by default. So for example the following will not do what you "
14989 #: ../fish/guestfish.pod:469
14997 #: ../fish/guestfish.pod:471
14999 "Assuming you don't have a directory literally called C</home/*> then the "
15000 "above command will return an error."
15004 #: ../fish/guestfish.pod:474
15005 msgid "To perform wildcard expansion, use the C<glob> command."
15009 #: ../fish/guestfish.pod:476
15012 " glob rm-rf /home/*\n"
15017 #: ../fish/guestfish.pod:478
15019 "runs C<rm-rf> on each path that matches (ie. potentially running the command "
15020 "many times), equivalent to:"
15024 #: ../fish/guestfish.pod:481
15027 " rm-rf /home/jim\n"
15028 " rm-rf /home/joe\n"
15029 " rm-rf /home/mary\n"
15034 #: ../fish/guestfish.pod:485
15035 msgid "C<glob> only works on simple guest paths and not on device names."
15039 #: ../fish/guestfish.pod:487
15041 "If you have several parameters, each containing a wildcard, then glob will "
15042 "perform a cartesian product."
15046 #: ../fish/guestfish.pod:490
15051 #: ../fish/guestfish.pod:492
15053 "Any line which starts with a I<#> character is treated as a comment and "
15054 "ignored. The I<#> can optionally be preceeded by whitespace, but B<not> by "
15055 "a command. For example:"
15059 #: ../fish/guestfish.pod:496
15062 " # this is a comment\n"
15063 " # this is a comment\n"
15064 " foo # NOT a comment\n"
15069 #: ../fish/guestfish.pod:500
15070 msgid "Blank lines are also ignored."
15074 #: ../fish/guestfish.pod:502
15075 msgid "RUNNING COMMANDS LOCALLY"
15079 #: ../fish/guestfish.pod:504
15081 "Any line which starts with a I<!> character is treated as a command sent to "
15082 "the local shell (C</bin/sh> or whatever L<system(3)> uses). For example:"
15086 #: ../fish/guestfish.pod:508
15090 " tgz-out /remote local/remote-data.tar.gz\n"
15095 #: ../fish/guestfish.pod:511
15097 "will create a directory C<local> on the host, and then export the contents "
15098 "of C</remote> on the mounted filesystem to C<local/remote-data.tar.gz>. "
15099 "(See C<tgz-out>)."
15103 #: ../fish/guestfish.pod:515
15105 "To change the local directory, use the C<lcd> command. C<!cd> will have no "
15106 "effect, due to the way that subprocesses work in Unix."
15110 #: ../fish/guestfish.pod:518
15115 #: ../fish/guestfish.pod:520
15117 "Use C<command E<lt>spaceE<gt> | command> to pipe the output of the first "
15118 "command (a guestfish command) to the second command (any host command). For "
15123 #: ../fish/guestfish.pod:524
15126 " cat /etc/passwd | awk -F: '$3 == 0 { print }'\n"
15131 #: ../fish/guestfish.pod:526
15133 "(where C<cat> is the guestfish cat command, but C<awk> is the host awk "
15134 "program). The above command would list all accounts in the guest filesystem "
15135 "which have UID 0, ie. root accounts including backdoors. Other examples:"
15139 #: ../fish/guestfish.pod:531
15142 " hexdump /bin/ls | head\n"
15143 " list-devices | tail -1\n"
15144 " tgz-out / - | tar ztf -\n"
15149 #: ../fish/guestfish.pod:535
15151 "The space before the pipe symbol is required, any space after the pipe "
15152 "symbol is optional. Everything after the pipe symbol is just passed "
15153 "straight to the host shell, so it can contain redirections, globs and "
15154 "anything else that makes sense on the host side."
15158 #: ../fish/guestfish.pod:540
15160 "To use a literal argument which begins with a pipe symbol, you have to quote "
15165 #: ../fish/guestfish.pod:543
15173 #: ../fish/guestfish.pod:545
15174 msgid "HOME DIRECTORIES"
15178 #: ../fish/guestfish.pod:547
15180 "If a parameter starts with the character C<~> then the tilde may be expanded "
15181 "as a home directory path (either C<~> for the current user's home directory, "
15182 "or C<~user> for another user)."
15186 #: ../fish/guestfish.pod:551
15188 "Note that home directory expansion happens for users known I<on the host>, "
15189 "not in the guest filesystem."
15193 #: ../fish/guestfish.pod:554
15195 "To use a literal argument which begins with a tilde, you have to quote it, "
15200 #: ../fish/guestfish.pod:557
15208 #: ../fish/guestfish.pod:561
15210 "Libguestfs has some support for Linux guests encrypted according to the "
15211 "Linux Unified Key Setup (LUKS) standard, which includes nearly all whole "
15212 "disk encryption systems used by modern Linux guests. Currently only "
15213 "LVM-on-LUKS is supported."
15217 #: ../fish/guestfish.pod:566
15218 msgid "Identify encrypted block devices and partitions using L</vfs-type>:"
15222 #: ../fish/guestfish.pod:568
15225 " ><fs> vfs-type /dev/sda2\n"
15231 #: ../fish/guestfish.pod:571
15233 "Then open those devices using L</luks-open>. This creates a device-mapper "
15234 "device called C</dev/mapper/luksdev>."
15238 #: ../fish/guestfish.pod:574
15241 " ><fs> luks-open /dev/sda2 luksdev\n"
15242 " Enter key or passphrase (\"key\"): <enter the passphrase>\n"
15247 #: ../fish/guestfish.pod:577
15249 "Finally you have to tell LVM to scan for volume groups on the newly created "
15254 #: ../fish/guestfish.pod:580
15258 " ><fs> vg-activate-all true\n"
15263 #: ../fish/guestfish.pod:583
15264 msgid "The logical volume(s) can now be mounted in the usual way."
15268 #: ../fish/guestfish.pod:585
15270 "Before closing a LUKS device you must unmount any logical volumes on it and "
15271 "deactivate the volume groups by calling C<vg-activate false VG> on each "
15272 "one. Then you can close the mapper device:"
15276 #: ../fish/guestfish.pod:589
15279 " ><fs> vg-activate false /dev/VG\n"
15280 " ><fs> luks-close /dev/mapper/luksdev\n"
15285 #: ../fish/guestfish.pod:592
15286 msgid "WINDOWS PATHS"
15290 #: ../fish/guestfish.pod:594
15292 "If a path is prefixed with C<win:> then you can use Windows-style paths "
15293 "(with some limitations). The following commands are equivalent:"
15297 #: ../fish/guestfish.pod:597
15300 " file /WINDOWS/system32/config/system.LOG\n"
15305 #: ../fish/guestfish.pod:599
15308 " file win:/windows/system32/config/system.log\n"
15313 #: ../fish/guestfish.pod:601
15316 " file win:\\windows\\system32\\config\\system.log\n"
15321 #: ../fish/guestfish.pod:603
15324 " file WIN:C:\\Windows\\SYSTEM32\\conFIG\\SYSTEM.LOG\n"
15329 #: ../fish/guestfish.pod:605
15331 "This syntax implicitly calls C<case-sensitive-path> (q.v.) so it also "
15332 "handles case insensitivity like Windows would. This only works in argument "
15333 "positions that expect a path."
15337 #: ../fish/guestfish.pod:609
15338 msgid "UPLOADING AND DOWNLOADING FILES"
15342 #: ../fish/guestfish.pod:611
15344 "For commands such as C<upload>, C<download>, C<tar-in>, C<tar-out> and "
15345 "others which upload from or download to a local file, you can use the "
15346 "special filename C<-> to mean \"from stdin\" or \"to stdout\". For example:"
15350 #: ../fish/guestfish.pod:615
15358 #: ../fish/guestfish.pod:617
15359 msgid "reads stdin and creates from that a file C</foo> in the disk image, and:"
15363 #: ../fish/guestfish.pod:620
15366 " tar-out /etc - | tar tf -\n"
15371 #: ../fish/guestfish.pod:622
15373 "writes the tarball to stdout and then pipes that into the external \"tar\" "
15374 "command (see L</PIPES>)."
15378 #: ../fish/guestfish.pod:625
15380 "When using C<-> to read from stdin, the input is read up to the end of "
15381 "stdin. You can also use a special \"heredoc\"-like syntax to read up to "
15382 "some arbitrary end marker:"
15386 #: ../fish/guestfish.pod:629
15389 " upload -<<END /foo\n"
15398 #: ../fish/guestfish.pod:635
15400 "Any string of characters can be used instead of C<END>. The end marker must "
15401 "appear on a line of its own, without any preceeding or following characters "
15402 "(not even spaces)."
15406 #: ../fish/guestfish.pod:639
15408 "Note that the C<-E<lt>E<lt>> syntax only applies to parameters used to "
15409 "upload local files (so-called \"FileIn\" parameters in the generator)."
15413 #: ../fish/guestfish.pod:642
15414 msgid "EXIT ON ERROR BEHAVIOUR"
15418 #: ../fish/guestfish.pod:644
15420 "By default, guestfish will ignore any errors when in interactive mode "
15421 "(ie. taking commands from a human over a tty), and will exit on the first "
15422 "error in non-interactive mode (scripts, commands given on the command line)."
15426 #: ../fish/guestfish.pod:649
15428 "If you prefix a command with a I<-> character, then that command will not "
15429 "cause guestfish to exit, even if that (one) command returns an error."
15433 #: ../fish/guestfish.pod:653
15434 msgid "REMOTE CONTROL GUESTFISH OVER A SOCKET"
15438 #: ../fish/guestfish.pod:655
15440 "Guestfish can be remote-controlled over a socket. This is useful "
15441 "particularly in shell scripts where you want to make several different "
15442 "changes to a filesystem, but you don't want the overhead of starting up a "
15443 "guestfish process each time."
15447 #: ../fish/guestfish.pod:660
15448 msgid "Start a guestfish server process using:"
15452 #: ../fish/guestfish.pod:662
15455 " eval `guestfish --listen`\n"
15460 #: ../fish/guestfish.pod:664
15461 msgid "and then send it commands by doing:"
15465 #: ../fish/guestfish.pod:666
15468 " guestfish --remote cmd [...]\n"
15473 #: ../fish/guestfish.pod:668
15474 msgid "To cause the server to exit, send it the exit command:"
15478 #: ../fish/guestfish.pod:670
15481 " guestfish --remote exit\n"
15486 #: ../fish/guestfish.pod:672
15488 "Note that the server will normally exit if there is an error in a command. "
15489 "You can change this in the usual way. See section L</EXIT ON ERROR "
15494 #: ../fish/guestfish.pod:676
15495 msgid "CONTROLLING MULTIPLE GUESTFISH PROCESSES"
15499 #: ../fish/guestfish.pod:678
15501 "The C<eval> statement sets the environment variable C<$GUESTFISH_PID>, which "
15502 "is how the I<--remote> option knows where to send the commands. You can "
15503 "have several guestfish listener processes running using:"
15507 #: ../fish/guestfish.pod:682
15510 " eval `guestfish --listen`\n"
15511 " pid1=$GUESTFISH_PID\n"
15512 " eval `guestfish --listen`\n"
15513 " pid2=$GUESTFISH_PID\n"
15515 " guestfish --remote=$pid1 cmd\n"
15516 " guestfish --remote=$pid2 cmd\n"
15521 #: ../fish/guestfish.pod:690
15522 msgid "REMOTE CONTROL DETAILS"
15526 #: ../fish/guestfish.pod:692
15528 "Remote control happens over a Unix domain socket called "
15529 "C</tmp/.guestfish-$UID/socket-$PID>, where C<$UID> is the effective user ID "
15530 "of the process, and C<$PID> is the process ID of the server."
15534 #: ../fish/guestfish.pod:696
15535 msgid "Guestfish client and server versions must match exactly."
15539 #: ../fish/guestfish.pod:698
15540 msgid "PREPARED DISK IMAGES"
15544 #: ../fish/guestfish.pod:700
15546 "Use the I<-N type> or I<--new type> parameter to select one of a set of "
15547 "preformatted disk images that guestfish can make for you to save typing. "
15548 "This is particularly useful for testing purposes. This option is used "
15549 "instead of the I<-a> option, and like I<-a> can appear multiple times (and "
15550 "can be mixed with I<-a>)."
15554 #: ../fish/guestfish.pod:706
15556 "The new disk is called C<test1.img> for the first I<-N>, C<test2.img> for "
15557 "the second and so on. Existing files in the current directory are "
15562 #: ../fish/guestfish.pod:710
15564 "The type briefly describes how the disk should be sized, partitioned, how "
15565 "filesystem(s) should be created, and how content should be added. "
15566 "Optionally the type can be followed by extra parameters, separated by C<:> "
15567 "(colon) characters. For example, I<-N fs> creates a default 100MB, "
15568 "sparsely-allocated disk, containing a single partition, with the partition "
15569 "formatted as ext2. I<-N fs:ext4:1G> is the same, but for an ext4 filesystem "
15570 "on a 1GB disk instead."
15574 #: ../fish/guestfish.pod:718
15575 msgid "To list the available types and any extra parameters they take, run:"
15579 #: ../fish/guestfish.pod:722
15581 "Note that the prepared filesystem is not mounted. You would usually have to "
15582 "use the C<mount /dev/sda1 /> command or add the I<-m /dev/sda1> option."
15586 #: ../fish/guestfish.pod:726
15588 "If any I<-N> or I<--new> options are given, the guest is automatically "
15593 #: ../fish/guestfish.pod:731
15594 msgid "Create a 100MB disk with an ext4-formatted partition:"
15598 #: ../fish/guestfish.pod:733
15601 " guestfish -N fs:ext4\n"
15606 #: ../fish/guestfish.pod:735
15607 msgid "Create a 32MB disk with a VFAT-formatted partition, and mount it:"
15611 #: ../fish/guestfish.pod:737
15614 " guestfish -N fs:vfat:32M -m /dev/sda1\n"
15619 #: ../fish/guestfish.pod:739
15620 msgid "Create a blank 200MB disk:"
15624 #: ../fish/guestfish.pod:741
15627 " guestfish -N disk:200M\n"
15632 #: ../fish/guestfish.pod:743
15633 msgid "PROGRESS BARS"
15637 #: ../fish/guestfish.pod:745
15639 "Some (not all) long-running commands send progress notification messages as "
15640 "they are running. Guestfish turns these messages into progress bars."
15644 #: ../fish/guestfish.pod:749
15646 "When a command that supports progress bars takes longer than two seconds to "
15647 "run, and if progress bars are enabled, then you will see one appearing below "
15652 #: ../fish/guestfish.pod:753
15655 " ><fs> copy-size /large-file /another-file 2048M\n"
15656 " / 10% [#####-----------------------------------------] 00:30\n"
15661 #: ../fish/guestfish.pod:756
15663 "The spinner on the left hand side moves round once for every progress "
15664 "notification received from the backend. This is a (reasonably) golden "
15665 "assurance that the command is \"doing something\" even if the progress bar "
15666 "is not moving, because the command is able to send the progress "
15667 "notifications. When the bar reaches 100% and the command finishes, the "
15668 "spinner disappears."
15672 #: ../fish/guestfish.pod:763
15674 "Progress bars are enabled by default when guestfish is used interactively. "
15675 "You can enable them even for non-interactive modes using I<--progress-bars>, "
15676 "and you can disable them completely using I<--no-progress-bars>."
15680 #: ../fish/guestfish.pod:768
15681 msgid "GUESTFISH COMMANDS"
15685 #: ../fish/guestfish.pod:770
15687 "The commands in this section are guestfish convenience commands, in other "
15688 "words, they are not part of the L<guestfs(3)> API."
15692 #: ../fish/guestfish.pod:773
15693 msgid "alloc | allocate"
15697 #: ../fish/guestfish.pod:775
15700 " alloc filename size\n"
15705 #: ../fish/guestfish.pod:777
15707 "This creates an empty (zeroed) file of the given size, and then adds so it "
15708 "can be further examined."
15712 #: ../fish/guestfish.pod:780 ../fish/guestfish.pod:875
15713 msgid "For more advanced image creation, see L<qemu-img(1)> utility."
15717 #: ../fish/guestfish.pod:782 ../fish/guestfish.pod:877
15718 msgid "Size can be specified using standard suffixes, eg. C<1M>."
15722 #: ../fish/guestfish.pod:784
15727 #: ../fish/guestfish.pod:786
15730 " echo [params ...]\n"
15735 #: ../fish/guestfish.pod:788
15736 msgid "This echos the parameters to the terminal."
15740 #: ../fish/guestfish.pod:790
15741 msgid "edit | vi | emacs"
15745 #: ../fish/guestfish.pod:792
15753 #: ../fish/guestfish.pod:794
15755 "This is used to edit a file. It downloads the file, edits it locally using "
15756 "your editor, then uploads the result."
15760 #: ../fish/guestfish.pod:797
15762 "The editor is C<$EDITOR>. However if you use the alternate commands C<vi> "
15763 "or C<emacs> you will get those corresponding editors."
15767 #: ../fish/guestfish.pod:801 ../fish/guestfish.pod:847
15769 "NOTE: This will not work reliably for large files (> 2 MB) or binary files "
15770 "containing \\0 bytes."
15774 #: ../fish/guestfish.pod:804
15779 #: ../fish/guestfish.pod:806
15782 " glob command args...\n"
15787 #: ../fish/guestfish.pod:808
15789 "Expand wildcards in any paths in the args list, and run C<command> "
15790 "repeatedly on each matching path."
15794 #: ../fish/guestfish.pod:811
15795 msgid "See section WILDCARDS AND GLOBBING."
15799 #: ../fish/guestfish.pod:813
15804 #: ../fish/guestfish.pod:815
15813 #: ../fish/guestfish.pod:818
15815 "Without any parameter, this lists all commands. With a C<cmd> parameter, "
15816 "this displays detailed help for a command."
15820 #: ../fish/guestfish.pod:821
15825 #: ../fish/guestfish.pod:823
15833 #: ../fish/guestfish.pod:825
15834 msgid "Change the local directory, ie. the current directory of guestfish itself."
15838 #: ../fish/guestfish.pod:828
15839 msgid "Note that C<!cd> won't do what you might expect."
15843 #: ../fish/guestfish.pod:830
15844 msgid "man | manual"
15848 #: ../fish/guestfish.pod:832
15856 #: ../fish/guestfish.pod:834
15857 msgid "Opens the manual page for guestfish."
15861 #: ../fish/guestfish.pod:836
15862 msgid "more | less"
15866 #: ../fish/guestfish.pod:838
15874 #: ../fish/guestfish.pod:840
15882 #: ../fish/guestfish.pod:842
15883 msgid "This is used to view a file."
15887 #: ../fish/guestfish.pod:844
15889 "The default viewer is C<$PAGER>. However if you use the alternate command "
15890 "C<less> you will get the C<less> command specifically."
15894 #: ../fish/guestfish.pod:850
15895 msgid "quit | exit"
15899 #: ../fish/guestfish.pod:852
15900 msgid "This exits guestfish. You can also use C<^D> key."
15904 #: ../fish/guestfish.pod:854
15909 #: ../fish/guestfish.pod:856
15917 #: ../fish/guestfish.pod:858
15919 "Close and reopen the libguestfs handle. It is not necessary to use this "
15920 "normally, because the handle is closed properly when guestfish exits. "
15921 "However this is occasionally useful for testing."
15925 #: ../fish/guestfish.pod:862
15930 #: ../fish/guestfish.pod:864
15933 " sparse filename size\n"
15938 #: ../fish/guestfish.pod:866
15940 "This creates an empty sparse file of the given size, and then adds so it can "
15941 "be further examined."
15945 #: ../fish/guestfish.pod:869
15947 "In all respects it works the same as the C<alloc> command, except that the "
15948 "image file is allocated sparsely, which means that disk blocks are not "
15949 "assigned to the file until they are needed. Sparse disk files only use "
15950 "space when written to, but they are slower and there is a danger you could "
15951 "run out of real disk space during a write operation."
15955 #: ../fish/guestfish.pod:879
15960 #: ../fish/guestfish.pod:881
15968 #: ../fish/guestfish.pod:883
15970 "This command returns a list of the optional groups known to the daemon, and "
15971 "indicates which ones are supported by this build of the libguestfs "
15976 #: ../fish/guestfish.pod:887
15977 msgid "See also L<guestfs(3)/AVAILABILITY>."
15981 #: ../fish/guestfish.pod:889
15986 #: ../fish/guestfish.pod:891
15989 " time command args...\n"
15994 #: ../fish/guestfish.pod:893
15996 "Run the command as usual, but print the elapsed time afterwards. This can "
15997 "be useful for benchmarking operations."
16001 #: ../fish/guestfish.pod:896
16006 #: ../fish/guestfish.pod:900 ../test-tool/libguestfs-test-tool.pod:83
16011 #: ../fish/guestfish.pod:902
16013 "guestfish returns 0 if the commands completed without error, or 1 if there "
16018 #: ../fish/guestfish.pod:909
16023 #: ../fish/guestfish.pod:911
16025 "The C<edit> command uses C<$EDITOR> as the editor. If not set, it uses "
16030 #: ../fish/guestfish.pod:914
16031 msgid "GUESTFISH_PID"
16035 #: ../fish/guestfish.pod:916
16037 "Used with the I<--remote> option to specify the remote guestfish process to "
16038 "control. See section L</REMOTE CONTROL GUESTFISH OVER A SOCKET>."
16042 #: ../fish/guestfish.pod:920
16047 #: ../fish/guestfish.pod:922
16049 "If compiled with GNU readline support, various files in the home directory "
16050 "can be used. See L</FILES>."
16054 #: ../fish/guestfish.pod:931
16056 "Set C<LIBGUESTFS_DEBUG=1> to enable verbose messages. This has the same "
16057 "effect as using the B<-v> option."
16061 #: ../fish/guestfish.pod:943
16063 "Set the path that guestfish uses to search for kernel and initrd.img. See "
16064 "the discussion of paths in L<guestfs(3)>."
16068 #: ../fish/guestfish.pod:954
16069 msgid "Set C<LIBGUESTFS_TRACE=1> to enable command traces."
16073 #: ../fish/guestfish.pod:956
16078 #: ../fish/guestfish.pod:958
16080 "The C<more> command uses C<$PAGER> as the pager. If not set, it uses "
16085 #: ../fish/guestfish.pod:973 ../test-tool/libguestfs-test-tool.pod:88
16090 #: ../fish/guestfish.pod:977
16091 msgid "$HOME/.guestfish"
16095 #: ../fish/guestfish.pod:979
16097 "If compiled with GNU readline support, then the command history is saved in "
16102 #: ../fish/guestfish.pod:982
16103 msgid "$HOME/.inputrc"
16107 #: ../fish/guestfish.pod:984
16108 msgid "/etc/inputrc"
16112 #: ../fish/guestfish.pod:986
16114 "If compiled with GNU readline support, then these files can be used to "
16115 "configure readline. For further information, please see "
16116 "L<readline(3)/INITIALIZATION FILE>."
16120 #: ../fish/guestfish.pod:990
16121 msgid "To write rules which only apply to guestfish, use:"
16125 #: ../fish/guestfish.pod:992
16135 #: ../fish/guestfish.pod:996
16137 "Variables that you can set in inputrc that change the behaviour of guestfish "
16138 "in useful ways include:"
16142 #: ../fish/guestfish.pod:1001
16143 msgid "completion-ignore-case (default: on)"
16147 #: ../fish/guestfish.pod:1003
16149 "By default, guestfish will ignore case when tab-completing paths on the "
16154 #: ../fish/guestfish.pod:1006
16157 " set completion-ignore-case off\n"
16162 #: ../fish/guestfish.pod:1008
16163 msgid "to make guestfish case sensitive."
16167 #: ../fish/guestfish.pod:1012
16172 #: ../fish/guestfish.pod:1014
16173 msgid "test2.img (etc)"
16177 #: ../fish/guestfish.pod:1016
16179 "When using the C<-N> or C<--new> option, the prepared disk or filesystem "
16180 "will be created in the file C<test1.img> in the current directory. The "
16181 "second use of C<-N> will use C<test2.img> and so on. Any existing file with "
16182 "the same name will be overwritten."
16186 #: ../fish/guestfish.pod:1025
16188 "L<guestfs(3)>, L<http://libguestfs.org/>, L<virt-cat(1)>, L<virt-df(1)>, "
16189 "L<virt-edit(1)>, L<virt-list-filesystems(1)>, L<virt-list-partitions(1)>, "
16190 "L<virt-ls(1)>, L<virt-make-fs(1)>, L<virt-rescue(1)>, L<virt-resize(1)>, "
16191 "L<virt-tar(1)>, L<virt-win-reg(1)>."
16195 #: ../fish/guestfish.pod:1048 ../test-tool/libguestfs-test-tool.pod:124 ../fuse/guestmount.pod:198 ../inspector/virt-inspector.pl:865 ../tools/virt-cat.pl:181 ../tools/virt-df.pl:499 ../tools/virt-edit.pl:345 ../tools/virt-list-filesystems.pl:211 ../tools/virt-list-partitions.pl:248 ../tools/virt-ls.pl:229 ../tools/virt-make-fs.pl:560 ../tools/virt-rescue.pl:249 ../tools/virt-resize.pl:1415 ../tools/virt-tar.pl:276 ../tools/virt-win-reg.pl:495
16197 "This program is free software; you can redistribute it and/or modify it "
16198 "under the terms of the GNU General Public License as published by the Free "
16199 "Software Foundation; either version 2 of the License, or (at your option) "
16200 "any later version."
16204 #: ../fish/guestfish.pod:1053 ../test-tool/libguestfs-test-tool.pod:129 ../fuse/guestmount.pod:203 ../inspector/virt-inspector.pl:870 ../tools/virt-cat.pl:186 ../tools/virt-df.pl:504 ../tools/virt-edit.pl:350 ../tools/virt-list-filesystems.pl:216 ../tools/virt-list-partitions.pl:253 ../tools/virt-ls.pl:234 ../tools/virt-make-fs.pl:565 ../tools/virt-rescue.pl:254 ../tools/virt-resize.pl:1420 ../tools/virt-tar.pl:281 ../tools/virt-win-reg.pl:500
16206 "This program is distributed in the hope that it will be useful, but WITHOUT "
16207 "ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or "
16208 "FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for "
16213 #: ../fish/guestfish.pod:1058 ../test-tool/libguestfs-test-tool.pod:134 ../fuse/guestmount.pod:208 ../inspector/virt-inspector.pl:875 ../tools/virt-cat.pl:191 ../tools/virt-df.pl:509 ../tools/virt-edit.pl:355 ../tools/virt-list-filesystems.pl:221 ../tools/virt-list-partitions.pl:258 ../tools/virt-ls.pl:239 ../tools/virt-make-fs.pl:570 ../tools/virt-rescue.pl:259 ../tools/virt-resize.pl:1425 ../tools/virt-tar.pl:286 ../tools/virt-win-reg.pl:505
16215 "You should have received a copy of the GNU General Public License along with "
16216 "this program; if not, write to the Free Software Foundation, Inc., 675 Mass "
16217 "Ave, Cambridge, MA 02139, USA."
16221 #: ../fish/guestfish-actions.pod:1
16222 msgid "add-cdrom | cdrom"
16226 #: ../fish/guestfish-actions.pod:3
16229 " add-cdrom filename\n"
16234 #: ../fish/guestfish-actions.pod:15
16236 "This call checks for the existence of C<filename>. This stops you from "
16237 "specifying other types of drive which are supported by qemu such as C<nbd:> "
16238 "and C<http:> URLs. To specify those, use the general C<config> call "
16243 #: ../fish/guestfish-actions.pod:22
16245 "If you just want to add an ISO file (often you use this as an efficient way "
16246 "to transfer large files into the guest), then you should probably use "
16247 "C<add-drive-ro> instead."
16251 #: ../fish/guestfish-actions.pod:28
16252 msgid "add-drive | add"
16256 #: ../fish/guestfish-actions.pod:30
16259 " add-drive filename\n"
16264 #: ../fish/guestfish-actions.pod:49 ../fish/guestfish-actions.pod:75
16266 "C<if=...> is set at compile time by the configuration option C<./configure "
16267 "--with-drive-if=...>. In the rare case where you might need to change this "
16268 "at run time, use C<add-drive-with-if> or C<add-drive-ro-with-if>."
16272 #: ../fish/guestfish-actions.pod:54 ../fish/guestfish-actions.pod:80
16274 "Note that this call checks for the existence of C<filename>. This stops you "
16275 "from specifying other types of drive which are supported by qemu such as "
16276 "C<nbd:> and C<http:> URLs. To specify those, use the general C<config> call "
16281 #: ../fish/guestfish-actions.pod:59
16282 msgid "add-drive-ro | add-ro"
16286 #: ../fish/guestfish-actions.pod:61
16289 " add-drive-ro filename\n"
16294 #: ../fish/guestfish-actions.pod:85
16295 msgid "add-drive-ro-with-if"
16299 #: ../fish/guestfish-actions.pod:87
16302 " add-drive-ro-with-if filename iface\n"
16307 #: ../fish/guestfish-actions.pod:89
16309 "This is the same as C<add-drive-ro> but it allows you to specify the QEMU "
16310 "interface emulation to use at run time."
16314 #: ../fish/guestfish-actions.pod:92
16315 msgid "add-drive-with-if"
16319 #: ../fish/guestfish-actions.pod:94
16322 " add-drive-with-if filename iface\n"
16327 #: ../fish/guestfish-actions.pod:96
16329 "This is the same as C<add-drive> but it allows you to specify the QEMU "
16330 "interface emulation to use at run time."
16334 #: ../fish/guestfish-actions.pod:99
16339 #: ../fish/guestfish-actions.pod:101
16342 " aug-clear augpath\n"
16347 #: ../fish/guestfish-actions.pod:106
16352 #: ../fish/guestfish-actions.pod:108
16360 #: ../fish/guestfish-actions.pod:110
16362 "Close the current Augeas handle and free up any resources used by it. After "
16363 "calling this, you have to call C<aug-init> again before you can use any "
16364 "other Augeas functions."
16368 #: ../fish/guestfish-actions.pod:115
16369 msgid "aug-defnode"
16373 #: ../fish/guestfish-actions.pod:117
16376 " aug-defnode name expr val\n"
16381 #: ../fish/guestfish-actions.pod:122
16383 "If C<expr> evaluates to an empty nodeset, a node is created, equivalent to "
16384 "calling C<aug-set> C<expr>, C<value>. C<name> will be the nodeset "
16385 "containing that single node."
16389 #: ../fish/guestfish-actions.pod:130
16394 #: ../fish/guestfish-actions.pod:132
16397 " aug-defvar name expr\n"
16402 #: ../fish/guestfish-actions.pod:141
16407 #: ../fish/guestfish-actions.pod:143
16410 " aug-get augpath\n"
16415 #: ../fish/guestfish-actions.pod:148
16420 #: ../fish/guestfish-actions.pod:150
16423 " aug-init root flags\n"
16428 #: ../fish/guestfish-actions.pod:156
16429 msgid "You must call this before using any other C<aug-*> commands."
16433 #: ../fish/guestfish-actions.pod:191
16434 msgid "Do not load the tree in C<aug-init>."
16438 #: ../fish/guestfish-actions.pod:195
16439 msgid "To close the handle, you can call C<aug-close>."
16443 #: ../fish/guestfish-actions.pod:199
16448 #: ../fish/guestfish-actions.pod:201
16451 " aug-insert augpath label true|false\n"
16456 #: ../fish/guestfish-actions.pod:211
16461 #: ../fish/guestfish-actions.pod:213
16469 #: ../fish/guestfish-actions.pod:220
16474 #: ../fish/guestfish-actions.pod:222
16477 " aug-ls augpath\n"
16482 #: ../fish/guestfish-actions.pod:224
16484 "This is just a shortcut for listing C<aug-match> C<path/*> and sorting the "
16485 "resulting nodes into alphabetical order."
16489 #: ../fish/guestfish-actions.pod:227
16494 #: ../fish/guestfish-actions.pod:229
16497 " aug-match augpath\n"
16502 #: ../fish/guestfish-actions.pod:235
16507 #: ../fish/guestfish-actions.pod:237
16510 " aug-mv src dest\n"
16515 #: ../fish/guestfish-actions.pod:242
16520 #: ../fish/guestfish-actions.pod:244
16523 " aug-rm augpath\n"
16528 #: ../fish/guestfish-actions.pod:250
16533 #: ../fish/guestfish-actions.pod:252
16541 #: ../fish/guestfish-actions.pod:256
16543 "The flags which were passed to C<aug-init> affect exactly how files are "
16548 #: ../fish/guestfish-actions.pod:259
16553 #: ../fish/guestfish-actions.pod:261
16556 " aug-set augpath val\n"
16561 #: ../fish/guestfish-actions.pod:265
16563 "In the Augeas API, it is possible to clear a node by setting the value to "
16564 "NULL. Due to an oversight in the libguestfs API you cannot do that with "
16565 "this call. Instead you must use the C<aug-clear> call."
16569 #: ../fish/guestfish-actions.pod:270
16574 #: ../fish/guestfish-actions.pod:272
16577 " available 'groups ...'\n"
16582 #: ../fish/guestfish-actions.pod:278
16584 "The libguestfs groups, and the functions that those groups correspond to, "
16585 "are listed in L<guestfs(3)/AVAILABILITY>. You can also fetch this list at "
16586 "runtime by calling C<available-all-groups>."
16590 #: ../fish/guestfish-actions.pod:302
16591 msgid "You must call C<launch> before calling this function."
16595 #: ../fish/guestfish-actions.pod:324
16597 "This call was added in version C<1.0.80>. In previous versions of "
16598 "libguestfs all you could do would be to speculatively execute a command to "
16599 "find out if the daemon implemented it. See also C<version>."
16603 #: ../fish/guestfish-actions.pod:331
16604 msgid "available-all-groups"
16608 #: ../fish/guestfish-actions.pod:333
16611 " available-all-groups\n"
16616 #: ../fish/guestfish-actions.pod:335
16618 "This command returns a list of all optional groups that this daemon knows "
16619 "about. Note this returns both supported and unsupported groups. To find "
16620 "out which ones the daemon can actually support you have to call C<available> "
16621 "on each member of the returned list."
16625 #: ../fish/guestfish-actions.pod:341
16626 msgid "See also C<available> and L<guestfs(3)/AVAILABILITY>."
16630 #: ../fish/guestfish-actions.pod:343
16635 #: ../fish/guestfish-actions.pod:345
16638 " base64-in (base64file|-) filename\n"
16643 #: ../fish/guestfish-actions.pod:350 ../fish/guestfish-actions.pod:359 ../fish/guestfish-actions.pod:583 ../fish/guestfish-actions.pod:730 ../fish/guestfish-actions.pod:777 ../fish/guestfish-actions.pod:1154 ../fish/guestfish-actions.pod:3657 ../fish/guestfish-actions.pod:3669 ../fish/guestfish-actions.pod:3680 ../fish/guestfish-actions.pod:3691 ../fish/guestfish-actions.pod:3743 ../fish/guestfish-actions.pod:3752 ../fish/guestfish-actions.pod:3802
16644 msgid "Use C<-> instead of a filename to read/write from stdin/stdout."
16648 #: ../fish/guestfish-actions.pod:352
16653 #: ../fish/guestfish-actions.pod:354
16656 " base64-out filename (base64file|-)\n"
16661 #: ../fish/guestfish-actions.pod:361
16662 msgid "blockdev-flushbufs"
16666 #: ../fish/guestfish-actions.pod:363
16669 " blockdev-flushbufs device\n"
16674 #: ../fish/guestfish-actions.pod:370
16675 msgid "blockdev-getbsz"
16679 #: ../fish/guestfish-actions.pod:372
16682 " blockdev-getbsz device\n"
16687 #: ../fish/guestfish-actions.pod:381
16688 msgid "blockdev-getro"
16692 #: ../fish/guestfish-actions.pod:383
16695 " blockdev-getro device\n"
16700 #: ../fish/guestfish-actions.pod:390
16701 msgid "blockdev-getsize64"
16705 #: ../fish/guestfish-actions.pod:392
16708 " blockdev-getsize64 device\n"
16713 #: ../fish/guestfish-actions.pod:396
16714 msgid "See also C<blockdev-getsz>."
16718 #: ../fish/guestfish-actions.pod:400
16719 msgid "blockdev-getss"
16723 #: ../fish/guestfish-actions.pod:402
16726 " blockdev-getss device\n"
16731 #: ../fish/guestfish-actions.pod:407
16732 msgid "(Note, this is not the size in sectors, use C<blockdev-getsz> for that)."
16736 #: ../fish/guestfish-actions.pod:412
16737 msgid "blockdev-getsz"
16741 #: ../fish/guestfish-actions.pod:414
16744 " blockdev-getsz device\n"
16749 #: ../fish/guestfish-actions.pod:419
16751 "See also C<blockdev-getss> for the real sector size of the device, and "
16752 "C<blockdev-getsize64> for the more useful I<size in bytes>."
16756 #: ../fish/guestfish-actions.pod:425
16757 msgid "blockdev-rereadpt"
16761 #: ../fish/guestfish-actions.pod:427
16764 " blockdev-rereadpt device\n"
16769 #: ../fish/guestfish-actions.pod:433
16770 msgid "blockdev-setbsz"
16774 #: ../fish/guestfish-actions.pod:435
16777 " blockdev-setbsz device blocksize\n"
16782 #: ../fish/guestfish-actions.pod:444
16783 msgid "blockdev-setro"
16787 #: ../fish/guestfish-actions.pod:446
16790 " blockdev-setro device\n"
16795 #: ../fish/guestfish-actions.pod:452
16796 msgid "blockdev-setrw"
16800 #: ../fish/guestfish-actions.pod:454
16803 " blockdev-setrw device\n"
16808 #: ../fish/guestfish-actions.pod:460
16809 msgid "case-sensitive-path"
16813 #: ../fish/guestfish-actions.pod:462
16816 " case-sensitive-path path\n"
16821 #: ../fish/guestfish-actions.pod:486
16823 "Thus C<case-sensitive-path> (\"/Windows/System32\") might return "
16824 "C<\"/WINDOWS/system32\"> (the exact return value would depend on details of "
16825 "how the directories were originally created under Windows)."
16829 #: ../fish/guestfish-actions.pod:494
16830 msgid "See also C<realpath>."
16834 #: ../fish/guestfish-actions.pod:496
16839 #: ../fish/guestfish-actions.pod:498
16847 #: ../fish/guestfish-actions.pod:502
16849 "Note that this function cannot correctly handle binary files (specifically, "
16850 "files containing C<\\0> character which is treated as end of string). For "
16851 "those you need to use the C<read-file> or C<download> functions which have a "
16852 "more complex interface."
16856 #: ../fish/guestfish-actions.pod:510
16861 #: ../fish/guestfish-actions.pod:512
16864 " checksum csumtype path\n"
16869 #: ../fish/guestfish-actions.pod:555
16870 msgid "To get the checksum for a device, use C<checksum-device>."
16874 #: ../fish/guestfish-actions.pod:557
16875 msgid "To get the checksums for many files, use C<checksums-out>."
16879 #: ../fish/guestfish-actions.pod:559
16880 msgid "checksum-device"
16884 #: ../fish/guestfish-actions.pod:561
16887 " checksum-device csumtype device\n"
16892 #: ../fish/guestfish-actions.pod:563
16894 "This call computes the MD5, SHAx or CRC checksum of the contents of the "
16895 "device named C<device>. For the types of checksums supported see the "
16896 "C<checksum> command."
16900 #: ../fish/guestfish-actions.pod:567
16901 msgid "checksums-out"
16905 #: ../fish/guestfish-actions.pod:569
16908 " checksums-out csumtype directory (sumsfile|-)\n"
16913 #: ../fish/guestfish-actions.pod:585
16918 #: ../fish/guestfish-actions.pod:587
16921 " chmod mode path\n"
16926 #: ../fish/guestfish-actions.pod:598
16931 #: ../fish/guestfish-actions.pod:600
16934 " chown owner group path\n"
16939 #: ../fish/guestfish-actions.pod:608
16944 #: ../fish/guestfish-actions.pod:610
16947 " command 'arguments ...'\n"
16952 #: ../fish/guestfish-actions.pod:617
16954 "The single parameter is an argv-style list of arguments. The first element "
16955 "is the name of the program to run. Subsequent elements are parameters. The "
16956 "list must be non-empty (ie. must contain a program name). Note that the "
16957 "command runs directly, and is I<not> invoked via the shell (see C<sh>)."
16961 #: ../fish/guestfish-actions.pod:645
16962 msgid "command-lines"
16966 #: ../fish/guestfish-actions.pod:647
16969 " command-lines 'arguments ...'\n"
16974 #: ../fish/guestfish-actions.pod:649
16975 msgid "This is the same as C<command>, but splits the result into a list of lines."
16979 #: ../fish/guestfish-actions.pod:652
16980 msgid "See also: C<sh-lines>"
16984 #: ../fish/guestfish-actions.pod:657
16989 #: ../fish/guestfish-actions.pod:659
16992 " config qemuparam qemuvalue\n"
16997 #: ../fish/guestfish-actions.pod:670
17002 #: ../fish/guestfish-actions.pod:672
17005 " copy-size src dest size\n"
17010 #: ../fish/guestfish-actions.pod:680
17015 #: ../fish/guestfish-actions.pod:682
17023 #: ../fish/guestfish-actions.pod:687
17028 #: ../fish/guestfish-actions.pod:689
17036 #: ../fish/guestfish-actions.pod:694
17041 #: ../fish/guestfish-actions.pod:696
17049 #: ../fish/guestfish-actions.pod:703
17051 "If the destination is a device, it must be as large or larger than the "
17052 "source file or device, otherwise the copy will fail. This command cannot do "
17053 "partial copies (see C<copy-size>)."
17057 #: ../fish/guestfish-actions.pod:707
17062 #: ../fish/guestfish-actions.pod:709
17065 " debug subcmd 'extraargs ...'\n"
17070 #: ../fish/guestfish-actions.pod:711
17072 "The C<debug> command exposes some internals of C<guestfsd> (the guestfs "
17073 "daemon) that runs inside the qemu subprocess."
17077 #: ../fish/guestfish-actions.pod:719
17078 msgid "debug-upload"
17082 #: ../fish/guestfish-actions.pod:721
17085 " debug-upload (filename|-) tmpname mode\n"
17090 #: ../fish/guestfish-actions.pod:723
17091 msgid "The C<debug-upload> command uploads a file to the libguestfs appliance."
17095 #: ../fish/guestfish-actions.pod:732
17100 #: ../fish/guestfish-actions.pod:734
17108 #: ../fish/guestfish-actions.pod:742
17113 #: ../fish/guestfish-actions.pod:744
17121 #: ../fish/guestfish-actions.pod:753
17126 #: ../fish/guestfish-actions.pod:755
17134 #: ../fish/guestfish-actions.pod:761
17136 "Another way to get the same information is to enable verbose messages with "
17137 "C<set-verbose> or by setting the environment variable C<LIBGUESTFS_DEBUG=1> "
17138 "before running the program."
17142 #: ../fish/guestfish-actions.pod:766
17147 #: ../fish/guestfish-actions.pod:768
17150 " download remotefilename (filename|-)\n"
17155 #: ../fish/guestfish-actions.pod:775
17156 msgid "See also C<upload>, C<cat>."
17160 #: ../fish/guestfish-actions.pod:779
17161 msgid "drop-caches"
17165 #: ../fish/guestfish-actions.pod:781
17168 " drop-caches whattodrop\n"
17173 #: ../fish/guestfish-actions.pod:793
17178 #: ../fish/guestfish-actions.pod:795
17186 #: ../fish/guestfish-actions.pod:807
17191 #: ../fish/guestfish-actions.pod:809
17194 " e2fsck-f device\n"
17199 #: ../fish/guestfish-actions.pod:815
17201 "This command is only needed because of C<resize2fs> (q.v.). Normally you "
17202 "should use C<fsck>."
17206 #: ../fish/guestfish-actions.pod:818
17207 msgid "echo-daemon"
17211 #: ../fish/guestfish-actions.pod:820
17214 " echo-daemon 'words ...'\n"
17219 #: ../fish/guestfish-actions.pod:827
17220 msgid "See also C<ping-daemon>."
17224 #: ../fish/guestfish-actions.pod:829
17229 #: ../fish/guestfish-actions.pod:831
17232 " egrep regex path\n"
17237 #: ../fish/guestfish-actions.pod:839
17242 #: ../fish/guestfish-actions.pod:841
17245 " egrepi regex path\n"
17250 #: ../fish/guestfish-actions.pod:849
17255 #: ../fish/guestfish-actions.pod:851
17258 " equal file1 file2\n"
17263 #: ../fish/guestfish-actions.pod:858
17268 #: ../fish/guestfish-actions.pod:860
17276 #: ../fish/guestfish-actions.pod:865
17277 msgid "See also C<is-file>, C<is-dir>, C<stat>."
17281 #: ../fish/guestfish-actions.pod:867
17286 #: ../fish/guestfish-actions.pod:869
17289 " fallocate path len\n"
17294 #: ../fish/guestfish-actions.pod:886
17295 msgid "fallocate64"
17299 #: ../fish/guestfish-actions.pod:888
17302 " fallocate64 path len\n"
17307 #: ../fish/guestfish-actions.pod:894
17309 "Note that this call allocates disk blocks for the file. To create a sparse "
17310 "file use C<truncate-size> instead."
17314 #: ../fish/guestfish-actions.pod:897
17316 "The deprecated call C<fallocate> does the same, but owing to an oversight it "
17317 "only allowed 30 bit lengths to be specified, effectively limiting the "
17318 "maximum size of files created through that call to 1GB."
17322 #: ../fish/guestfish-actions.pod:906
17327 #: ../fish/guestfish-actions.pod:908
17330 " fgrep pattern path\n"
17335 #: ../fish/guestfish-actions.pod:916
17340 #: ../fish/guestfish-actions.pod:918
17343 " fgrepi pattern path\n"
17348 #: ../fish/guestfish-actions.pod:926
17353 #: ../fish/guestfish-actions.pod:928
17361 #: ../fish/guestfish-actions.pod:940
17363 "This command can also be used on C</dev/> devices (and partitions, LV "
17364 "names). You can for example use this to determine if a device contains a "
17365 "filesystem, although it's usually better to use C<vfs-type>."
17369 #: ../fish/guestfish-actions.pod:950
17370 msgid "file-architecture"
17374 #: ../fish/guestfish-actions.pod:952
17377 " file-architecture filename\n"
17382 #: ../fish/guestfish-actions.pod:1055
17387 #: ../fish/guestfish-actions.pod:1057
17395 #: ../fish/guestfish-actions.pod:1061
17397 "To get other stats about a file, use C<stat>, C<lstat>, C<is-dir>, "
17398 "C<is-file> etc. To get the size of block devices, use "
17399 "C<blockdev-getsize64>."
17403 #: ../fish/guestfish-actions.pod:1065
17408 #: ../fish/guestfish-actions.pod:1067
17411 " fill c len path\n"
17416 #: ../fish/guestfish-actions.pod:1073
17418 "To fill a file with zero bytes (sparsely), it is much more efficient to use "
17419 "C<truncate-size>. To create a file with a pattern of repeating bytes use "
17424 #: ../fish/guestfish-actions.pod:1078
17425 msgid "fill-pattern"
17429 #: ../fish/guestfish-actions.pod:1080
17432 " fill-pattern pattern len path\n"
17437 #: ../fish/guestfish-actions.pod:1082
17439 "This function is like C<fill> except that it creates a new file of length "
17440 "C<len> containing the repeating pattern of bytes in C<pattern>. The pattern "
17441 "is truncated if necessary to ensure the length of the file is exactly C<len> "
17446 #: ../fish/guestfish-actions.pod:1087
17451 #: ../fish/guestfish-actions.pod:1089
17454 " find directory\n"
17459 #: ../fish/guestfish-actions.pod:1103
17460 msgid "then the returned list from C<find> C</tmp> would be 4 elements:"
17464 #: ../fish/guestfish-actions.pod:1116
17465 msgid "See also C<find0>."
17469 #: ../fish/guestfish-actions.pod:1121
17474 #: ../fish/guestfish-actions.pod:1123
17477 " find0 directory (files|-)\n"
17482 #: ../fish/guestfish-actions.pod:1129
17483 msgid "This command works the same way as C<find> with the following exceptions:"
17487 #: ../fish/guestfish-actions.pod:1156
17488 msgid "findfs-label"
17492 #: ../fish/guestfish-actions.pod:1158
17495 " findfs-label label\n"
17500 #: ../fish/guestfish-actions.pod:1164
17501 msgid "To find the label of a filesystem, use C<vfs-label>."
17505 #: ../fish/guestfish-actions.pod:1166
17506 msgid "findfs-uuid"
17510 #: ../fish/guestfish-actions.pod:1168
17513 " findfs-uuid uuid\n"
17518 #: ../fish/guestfish-actions.pod:1174
17519 msgid "To find the UUID of a filesystem, use C<vfs-uuid>."
17523 #: ../fish/guestfish-actions.pod:1176
17528 #: ../fish/guestfish-actions.pod:1178
17531 " fsck fstype device\n"
17536 #: ../fish/guestfish-actions.pod:1208
17541 #: ../fish/guestfish-actions.pod:1210
17549 #: ../fish/guestfish-actions.pod:1217
17550 msgid "get-autosync"
17554 #: ../fish/guestfish-actions.pod:1219
17562 #: ../fish/guestfish-actions.pod:1223
17567 #: ../fish/guestfish-actions.pod:1225
17575 #: ../fish/guestfish-actions.pod:1229
17576 msgid "get-e2label"
17580 #: ../fish/guestfish-actions.pod:1231
17583 " get-e2label device\n"
17588 #: ../fish/guestfish-actions.pod:1243
17593 #: ../fish/guestfish-actions.pod:1245
17596 " get-e2uuid device\n"
17601 #: ../fish/guestfish-actions.pod:1257
17602 msgid "get-memsize"
17606 #: ../fish/guestfish-actions.pod:1259
17614 #: ../fish/guestfish-actions.pod:1264
17616 "If C<set-memsize> was not called on this handle, and if "
17617 "C<LIBGUESTFS_MEMSIZE> was not set, then this returns the compiled-in default "
17618 "value for memsize."
17622 #: ../fish/guestfish-actions.pod:1271
17623 msgid "get-network"
17627 #: ../fish/guestfish-actions.pod:1273
17635 #: ../fish/guestfish-actions.pod:1277
17640 #: ../fish/guestfish-actions.pod:1279
17648 #: ../fish/guestfish-actions.pod:1286
17649 msgid "get-pid | pid"
17653 #: ../fish/guestfish-actions.pod:1288
17661 #: ../fish/guestfish-actions.pod:1295
17666 #: ../fish/guestfish-actions.pod:1297
17674 #: ../fish/guestfish-actions.pod:1304
17675 msgid "get-recovery-proc"
17679 #: ../fish/guestfish-actions.pod:1306
17682 " get-recovery-proc\n"
17687 #: ../fish/guestfish-actions.pod:1310
17688 msgid "get-selinux"
17692 #: ../fish/guestfish-actions.pod:1312
17700 #: ../fish/guestfish-actions.pod:1314
17702 "This returns the current setting of the selinux flag which is passed to the "
17703 "appliance at boot time. See C<set-selinux>."
17707 #: ../fish/guestfish-actions.pod:1320
17712 #: ../fish/guestfish-actions.pod:1322
17720 #: ../fish/guestfish-actions.pod:1329
17725 #: ../fish/guestfish-actions.pod:1331
17733 #: ../fish/guestfish-actions.pod:1335
17738 #: ../fish/guestfish-actions.pod:1337
17746 #: ../fish/guestfish-actions.pod:1339
17748 "Return the current umask. By default the umask is C<022> unless it has been "
17749 "set by calling C<umask>."
17753 #: ../fish/guestfish-actions.pod:1342
17754 msgid "get-verbose"
17758 #: ../fish/guestfish-actions.pod:1344
17766 #: ../fish/guestfish-actions.pod:1348
17771 #: ../fish/guestfish-actions.pod:1350
17779 #: ../fish/guestfish-actions.pod:1354
17780 msgid "See the documentation about SELINUX in L<guestfs(3)>, and C<setcon>"
17784 #: ../fish/guestfish-actions.pod:1357
17789 #: ../fish/guestfish-actions.pod:1359
17792 " getxattrs path\n"
17797 #: ../fish/guestfish-actions.pod:1367
17798 msgid "See also: C<lgetxattrs>, L<attr(5)>."
17802 #: ../fish/guestfish-actions.pod:1369
17803 msgid "glob-expand"
17807 #: ../fish/guestfish-actions.pod:1371
17810 " glob-expand pattern\n"
17815 #: ../fish/guestfish-actions.pod:1384
17820 #: ../fish/guestfish-actions.pod:1386
17823 " grep regex path\n"
17828 #: ../fish/guestfish-actions.pod:1394
17833 #: ../fish/guestfish-actions.pod:1396
17836 " grepi regex path\n"
17841 #: ../fish/guestfish-actions.pod:1404
17842 msgid "grub-install"
17846 #: ../fish/guestfish-actions.pod:1406
17849 " grub-install root device\n"
17854 #: ../fish/guestfish-actions.pod:1422
17859 #: ../fish/guestfish-actions.pod:1424
17867 #: ../fish/guestfish-actions.pod:1432
17872 #: ../fish/guestfish-actions.pod:1434
17875 " head-n nrlines path\n"
17880 #: ../fish/guestfish-actions.pod:1447
17885 #: ../fish/guestfish-actions.pod:1449
17893 #: ../fish/guestfish-actions.pod:1457
17898 #: ../fish/guestfish-actions.pod:1459
17901 " initrd-cat initrdpath filename\n"
17906 #: ../fish/guestfish-actions.pod:1471
17907 msgid "See also C<initrd-list>."
17911 #: ../fish/guestfish-actions.pod:1476
17912 msgid "initrd-list"
17916 #: ../fish/guestfish-actions.pod:1478
17919 " initrd-list path\n"
17924 #: ../fish/guestfish-actions.pod:1490
17925 msgid "inotify-add-watch"
17929 #: ../fish/guestfish-actions.pod:1492
17932 " inotify-add-watch path mask\n"
17937 #: ../fish/guestfish-actions.pod:1504
17938 msgid "inotify-close"
17942 #: ../fish/guestfish-actions.pod:1506
17950 #: ../fish/guestfish-actions.pod:1512
17951 msgid "inotify-files"
17955 #: ../fish/guestfish-actions.pod:1514
17963 #: ../fish/guestfish-actions.pod:1516
17965 "This function is a helpful wrapper around C<inotify-read> which just returns "
17966 "a list of pathnames of objects that were touched. The returned pathnames "
17967 "are sorted and deduplicated."
17971 #: ../fish/guestfish-actions.pod:1520
17972 msgid "inotify-init"
17976 #: ../fish/guestfish-actions.pod:1522
17979 " inotify-init maxevents\n"
17984 #: ../fish/guestfish-actions.pod:1528
17986 "C<maxevents> is the maximum number of events which will be queued up between "
17987 "calls to C<inotify-read> or C<inotify-files>. If this is passed as C<0>, "
17988 "then the kernel (or previously set) default is used. For Linux 2.6.29 the "
17989 "default was 16384 events. Beyond this limit, the kernel throws away events, "
17990 "but records the fact that it threw them away by setting a flag "
17991 "C<IN_Q_OVERFLOW> in the returned structure list (see C<inotify-read>)."
17995 #: ../fish/guestfish-actions.pod:1538
17997 "Before any events are generated, you have to add some watches to the "
17998 "internal watch list. See: C<inotify-add-watch>, C<inotify-rm-watch> and "
17999 "C<inotify-watch-all>."
18003 #: ../fish/guestfish-actions.pod:1544
18005 "Queued up events should be read periodically by calling C<inotify-read> (or "
18006 "C<inotify-files> which is just a helpful wrapper around C<inotify-read>). "
18007 "If you don't read the events out often enough then you risk the internal "
18008 "queue overflowing."
18012 #: ../fish/guestfish-actions.pod:1551
18014 "The handle should be closed after use by calling C<inotify-close>. This "
18015 "also removes any watches automatically."
18019 #: ../fish/guestfish-actions.pod:1560
18020 msgid "inotify-read"
18024 #: ../fish/guestfish-actions.pod:1562
18032 #: ../fish/guestfish-actions.pod:1575
18033 msgid "inotify-rm-watch"
18037 #: ../fish/guestfish-actions.pod:1577
18040 " inotify-rm-watch wd\n"
18045 #: ../fish/guestfish-actions.pod:1579
18046 msgid "Remove a previously defined inotify watch. See C<inotify-add-watch>."
18050 #: ../fish/guestfish-actions.pod:1582
18051 msgid "inspect-get-arch"
18055 #: ../fish/guestfish-actions.pod:1584
18058 " inspect-get-arch root\n"
18063 #: ../fish/guestfish-actions.pod:1586 ../fish/guestfish-actions.pod:1602 ../fish/guestfish-actions.pod:1648 ../fish/guestfish-actions.pod:1666 ../fish/guestfish-actions.pod:1687 ../fish/guestfish-actions.pod:1702 ../fish/guestfish-actions.pod:1725 ../fish/guestfish-actions.pod:1742
18065 "This function should only be called with a root device string as returned by "
18070 #: ../fish/guestfish-actions.pod:1589
18072 "This returns the architecture of the inspected operating system. The "
18073 "possible return values are listed under C<file-architecture>."
18077 #: ../fish/guestfish-actions.pod:1598
18078 msgid "inspect-get-distro"
18082 #: ../fish/guestfish-actions.pod:1600
18085 " inspect-get-distro root\n"
18090 #: ../fish/guestfish-actions.pod:1644
18091 msgid "inspect-get-filesystems"
18095 #: ../fish/guestfish-actions.pod:1646
18098 " inspect-get-filesystems root\n"
18103 #: ../fish/guestfish-actions.pod:1659
18105 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
18106 "C<inspect-get-mountpoints>."
18110 #: ../fish/guestfish-actions.pod:1662
18111 msgid "inspect-get-major-version"
18115 #: ../fish/guestfish-actions.pod:1664
18118 " inspect-get-major-version root\n"
18123 #: ../fish/guestfish-actions.pod:1683
18124 msgid "inspect-get-minor-version"
18128 #: ../fish/guestfish-actions.pod:1685
18131 " inspect-get-minor-version root\n"
18136 #: ../fish/guestfish-actions.pod:1695
18138 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
18139 "C<inspect-get-major-version>."
18143 #: ../fish/guestfish-actions.pod:1698
18144 msgid "inspect-get-mountpoints"
18148 #: ../fish/guestfish-actions.pod:1700
18151 " inspect-get-mountpoints root\n"
18156 #: ../fish/guestfish-actions.pod:1718
18158 "Please read L<guestfs(3)/INSPECTION> for more details. See also "
18159 "C<inspect-get-filesystems>."
18163 #: ../fish/guestfish-actions.pod:1721
18164 msgid "inspect-get-product-name"
18168 #: ../fish/guestfish-actions.pod:1723
18171 " inspect-get-product-name root\n"
18176 #: ../fish/guestfish-actions.pod:1738
18177 msgid "inspect-get-type"
18181 #: ../fish/guestfish-actions.pod:1740
18184 " inspect-get-type root\n"
18189 #: ../fish/guestfish-actions.pod:1769
18194 #: ../fish/guestfish-actions.pod:1771
18202 #: ../fish/guestfish-actions.pod:1786
18204 "You can pass the root string(s) returned to other C<inspect-get-*> functions "
18205 "in order to query further information about each operating system, such as "
18206 "the name and version."
18210 #: ../fish/guestfish-actions.pod:1791
18212 "This function uses other libguestfs features such as C<mount-ro> and "
18213 "C<umount-all> in order to mount and unmount filesystems and look at the "
18214 "contents. This should be called with no disks currently mounted. The "
18215 "function may also use Augeas, so any existing Augeas handle will be closed."
18219 #: ../fish/guestfish-actions.pod:1803
18224 #: ../fish/guestfish-actions.pod:1805
18232 #: ../fish/guestfish-actions.pod:1812
18237 #: ../fish/guestfish-actions.pod:1814
18245 #: ../fish/guestfish-actions.pod:1821
18250 #: ../fish/guestfish-actions.pod:1823
18258 #: ../fish/guestfish-actions.pod:1829 ../fish/guestfish-actions.pod:1839
18259 msgid "See also C<stat>."
18263 #: ../fish/guestfish-actions.pod:1831
18268 #: ../fish/guestfish-actions.pod:1833
18276 #: ../fish/guestfish-actions.pod:1841
18277 msgid "is-launching"
18281 #: ../fish/guestfish-actions.pod:1843
18289 #: ../fish/guestfish-actions.pod:1850
18294 #: ../fish/guestfish-actions.pod:1852
18302 #: ../fish/guestfish-actions.pod:1857
18307 #: ../fish/guestfish-actions.pod:1859
18315 #: ../fish/guestfish-actions.pod:1866
18316 msgid "kill-subprocess"
18320 #: ../fish/guestfish-actions.pod:1868
18323 " kill-subprocess\n"
18328 #: ../fish/guestfish-actions.pod:1872
18329 msgid "launch | run"
18333 #: ../fish/guestfish-actions.pod:1874
18341 #: ../fish/guestfish-actions.pod:1882
18346 #: ../fish/guestfish-actions.pod:1884
18349 " lchown owner group path\n"
18354 #: ../fish/guestfish-actions.pod:1886
18356 "Change the file owner to C<owner> and group to C<group>. This is like "
18357 "C<chown> but if C<path> is a symlink then the link itself is changed, not "
18362 #: ../fish/guestfish-actions.pod:1894
18367 #: ../fish/guestfish-actions.pod:1896
18370 " lgetxattrs path\n"
18375 #: ../fish/guestfish-actions.pod:1898
18377 "This is the same as C<getxattrs>, but if C<path> is a symbolic link, then it "
18378 "returns the extended attributes of the link itself."
18382 #: ../fish/guestfish-actions.pod:1902
18383 msgid "list-devices"
18387 #: ../fish/guestfish-actions.pod:1904
18395 #: ../fish/guestfish-actions.pod:1910
18396 msgid "list-partitions"
18400 #: ../fish/guestfish-actions.pod:1912
18403 " list-partitions\n"
18408 #: ../fish/guestfish-actions.pod:1918
18410 "This does not return logical volumes. For that you will need to call "
18415 #: ../fish/guestfish-actions.pod:1921
18420 #: ../fish/guestfish-actions.pod:1923
18428 #: ../fish/guestfish-actions.pod:1931
18433 #: ../fish/guestfish-actions.pod:1933
18436 " ln target linkname\n"
18441 #: ../fish/guestfish-actions.pod:1937
18446 #: ../fish/guestfish-actions.pod:1939
18449 " ln-f target linkname\n"
18454 #: ../fish/guestfish-actions.pod:1944
18459 #: ../fish/guestfish-actions.pod:1946
18462 " ln-s target linkname\n"
18467 #: ../fish/guestfish-actions.pod:1950
18472 #: ../fish/guestfish-actions.pod:1952
18475 " ln-sf target linkname\n"
18480 #: ../fish/guestfish-actions.pod:1957
18481 msgid "lremovexattr"
18485 #: ../fish/guestfish-actions.pod:1959
18488 " lremovexattr xattr path\n"
18493 #: ../fish/guestfish-actions.pod:1961
18495 "This is the same as C<removexattr>, but if C<path> is a symbolic link, then "
18496 "it removes an extended attribute of the link itself."
18500 #: ../fish/guestfish-actions.pod:1965
18505 #: ../fish/guestfish-actions.pod:1967
18513 #: ../fish/guestfish-actions.pod:1973
18515 "This command is mostly useful for interactive sessions. Programs should "
18516 "probably use C<readdir> instead."
18520 #: ../fish/guestfish-actions.pod:1976
18525 #: ../fish/guestfish-actions.pod:1978
18528 " lsetxattr xattr val vallen path\n"
18533 #: ../fish/guestfish-actions.pod:1980
18535 "This is the same as C<setxattr>, but if C<path> is a symbolic link, then it "
18536 "sets an extended attribute of the link itself."
18540 #: ../fish/guestfish-actions.pod:1984
18545 #: ../fish/guestfish-actions.pod:1986
18553 #: ../fish/guestfish-actions.pod:1990
18555 "This is the same as C<stat> except that if C<path> is a symbolic link, then "
18556 "the link is stat-ed, not the file it refers to."
18560 #: ../fish/guestfish-actions.pod:1996
18565 #: ../fish/guestfish-actions.pod:1998
18568 " lstatlist path 'names ...'\n"
18573 #: ../fish/guestfish-actions.pod:2000
18575 "This call allows you to perform the C<lstat> operation on multiple files, "
18576 "where all files are in the directory C<path>. C<names> is the list of files "
18577 "from this directory."
18581 #: ../fish/guestfish-actions.pod:2009
18583 "This call is intended for programs that want to efficiently list a directory "
18584 "contents without making many round-trips. See also C<lxattrlist> for a "
18585 "similarly efficient call for getting extended attributes. Very long "
18586 "directory listings might cause the protocol message size to be exceeded, "
18587 "causing this call to fail. The caller must split up such requests into "
18588 "smaller groups of names."
18592 #: ../fish/guestfish-actions.pod:2017
18593 msgid "luks-add-key"
18597 #: ../fish/guestfish-actions.pod:2019
18600 " luks-add-key device keyslot\n"
18605 #: ../fish/guestfish-actions.pod:2026
18607 "Note that if C<keyslot> already contains a key, then this command will "
18608 "fail. You have to use C<luks-kill-slot> first to remove that key."
18612 #: ../fish/guestfish-actions.pod:2030 ../fish/guestfish-actions.pod:2052 ../fish/guestfish-actions.pod:2065 ../fish/guestfish-actions.pod:2079 ../fish/guestfish-actions.pod:2102 ../fish/guestfish-actions.pod:2112
18614 "This command has one or more key or passphrase parameters. Guestfish will "
18615 "prompt for these separately."
18619 #: ../fish/guestfish-actions.pod:2033
18624 #: ../fish/guestfish-actions.pod:2035
18627 " luks-close device\n"
18632 #: ../fish/guestfish-actions.pod:2037
18634 "This closes a LUKS device that was created earlier by C<luks-open> or "
18635 "C<luks-open-ro>. The C<device> parameter must be the name of the LUKS "
18636 "mapping device (ie. C</dev/mapper/mapname>) and I<not> the name of the "
18637 "underlying block device."
18641 #: ../fish/guestfish-actions.pod:2043
18642 msgid "luks-format"
18646 #: ../fish/guestfish-actions.pod:2045
18649 " luks-format device keyslot\n"
18654 #: ../fish/guestfish-actions.pod:2058
18655 msgid "luks-format-cipher"
18659 #: ../fish/guestfish-actions.pod:2060
18662 " luks-format-cipher device keyslot cipher\n"
18667 #: ../fish/guestfish-actions.pod:2062
18669 "This command is the same as C<luks-format> but it also allows you to set the "
18674 #: ../fish/guestfish-actions.pod:2071
18675 msgid "luks-kill-slot"
18679 #: ../fish/guestfish-actions.pod:2073
18682 " luks-kill-slot device keyslot\n"
18687 #: ../fish/guestfish-actions.pod:2082
18692 #: ../fish/guestfish-actions.pod:2084
18695 " luks-open device mapname\n"
18700 #: ../fish/guestfish-actions.pod:2098
18702 "If this block device contains LVM volume groups, then calling C<vgscan> "
18703 "followed by C<vg-activate-all> will make them visible."
18707 #: ../fish/guestfish-actions.pod:2105
18708 msgid "luks-open-ro"
18712 #: ../fish/guestfish-actions.pod:2107
18715 " luks-open-ro device mapname\n"
18720 #: ../fish/guestfish-actions.pod:2109
18721 msgid "This is the same as C<luks-open> except that a read-only mapping is created."
18725 #: ../fish/guestfish-actions.pod:2115
18730 #: ../fish/guestfish-actions.pod:2117
18733 " lvcreate logvol volgroup mbytes\n"
18738 #: ../fish/guestfish-actions.pod:2122
18739 msgid "lvm-clear-filter"
18743 #: ../fish/guestfish-actions.pod:2124
18746 " lvm-clear-filter\n"
18751 #: ../fish/guestfish-actions.pod:2126
18753 "This undoes the effect of C<lvm-set-filter>. LVM will be able to see every "
18758 #: ../fish/guestfish-actions.pod:2132
18759 msgid "lvm-remove-all"
18763 #: ../fish/guestfish-actions.pod:2134
18766 " lvm-remove-all\n"
18771 #: ../fish/guestfish-actions.pod:2142
18772 msgid "lvm-set-filter"
18776 #: ../fish/guestfish-actions.pod:2144
18779 " lvm-set-filter 'devices ...'\n"
18784 #: ../fish/guestfish-actions.pod:2169
18789 #: ../fish/guestfish-actions.pod:2171
18792 " lvremove device\n"
18797 #: ../fish/guestfish-actions.pod:2179
18802 #: ../fish/guestfish-actions.pod:2181
18805 " lvrename logvol newlogvol\n"
18810 #: ../fish/guestfish-actions.pod:2185
18815 #: ../fish/guestfish-actions.pod:2187
18818 " lvresize device mbytes\n"
18823 #: ../fish/guestfish-actions.pod:2193
18824 msgid "lvresize-free"
18828 #: ../fish/guestfish-actions.pod:2195
18831 " lvresize-free lv percent\n"
18836 #: ../fish/guestfish-actions.pod:2203
18841 #: ../fish/guestfish-actions.pod:2205
18849 #: ../fish/guestfish-actions.pod:2213
18850 msgid "See also C<lvs-full>."
18854 #: ../fish/guestfish-actions.pod:2215
18859 #: ../fish/guestfish-actions.pod:2217
18867 #: ../fish/guestfish-actions.pod:2222
18872 #: ../fish/guestfish-actions.pod:2224
18880 #: ../fish/guestfish-actions.pod:2228
18885 #: ../fish/guestfish-actions.pod:2230
18888 " lxattrlist path 'names ...'\n"
18893 #: ../fish/guestfish-actions.pod:2246
18895 "This call is intended for programs that want to efficiently list a directory "
18896 "contents without making many round-trips. See also C<lstatlist> for a "
18897 "similarly efficient call for getting standard stats. Very long directory "
18898 "listings might cause the protocol message size to be exceeded, causing this "
18899 "call to fail. The caller must split up such requests into smaller groups of "
18904 #: ../fish/guestfish-actions.pod:2254
18909 #: ../fish/guestfish-actions.pod:2256
18917 #: ../fish/guestfish-actions.pod:2260
18922 #: ../fish/guestfish-actions.pod:2262
18925 " mkdir-mode path mode\n"
18930 #: ../fish/guestfish-actions.pod:2271
18931 msgid "See also C<mkdir>, C<umask>"
18935 #: ../fish/guestfish-actions.pod:2273
18940 #: ../fish/guestfish-actions.pod:2275
18948 #: ../fish/guestfish-actions.pod:2280
18953 #: ../fish/guestfish-actions.pod:2282
18956 " mkdtemp template\n"
18961 #: ../fish/guestfish-actions.pod:2303
18966 #: ../fish/guestfish-actions.pod:2305
18969 " mke2fs-J fstype blocksize device journal\n"
18974 #: ../fish/guestfish-actions.pod:2313
18975 msgid "See also C<mke2journal>."
18979 #: ../fish/guestfish-actions.pod:2315
18984 #: ../fish/guestfish-actions.pod:2317
18987 " mke2fs-JL fstype blocksize device label\n"
18992 #: ../fish/guestfish-actions.pod:2322
18993 msgid "See also C<mke2journal-L>."
18997 #: ../fish/guestfish-actions.pod:2324
19002 #: ../fish/guestfish-actions.pod:2326
19005 " mke2fs-JU fstype blocksize device uuid\n"
19010 #: ../fish/guestfish-actions.pod:2331
19011 msgid "See also C<mke2journal-U>."
19015 #: ../fish/guestfish-actions.pod:2333
19016 msgid "mke2journal"
19020 #: ../fish/guestfish-actions.pod:2335
19023 " mke2journal blocksize device\n"
19028 #: ../fish/guestfish-actions.pod:2342
19029 msgid "mke2journal-L"
19033 #: ../fish/guestfish-actions.pod:2344
19036 " mke2journal-L blocksize label device\n"
19041 #: ../fish/guestfish-actions.pod:2348
19042 msgid "mke2journal-U"
19046 #: ../fish/guestfish-actions.pod:2350
19049 " mke2journal-U blocksize uuid device\n"
19054 #: ../fish/guestfish-actions.pod:2354
19059 #: ../fish/guestfish-actions.pod:2356
19062 " mkfifo mode path\n"
19067 #: ../fish/guestfish-actions.pod:2358
19069 "This call creates a FIFO (named pipe) called C<path> with mode C<mode>. It "
19070 "is just a convenient wrapper around C<mknod>."
19074 #: ../fish/guestfish-actions.pod:2364
19079 #: ../fish/guestfish-actions.pod:2366
19082 " mkfs fstype device\n"
19087 #: ../fish/guestfish-actions.pod:2372
19092 #: ../fish/guestfish-actions.pod:2374
19095 " mkfs-b fstype blocksize device\n"
19100 #: ../fish/guestfish-actions.pod:2376
19102 "This call is similar to C<mkfs>, but it allows you to control the block size "
19103 "of the resulting filesystem. Supported block sizes depend on the filesystem "
19104 "type, but typically they are C<1024>, C<2048> or C<4096> only."
19108 #: ../fish/guestfish-actions.pod:2384
19109 msgid "mkmountpoint"
19113 #: ../fish/guestfish-actions.pod:2386
19116 " mkmountpoint exemptpath\n"
19121 #: ../fish/guestfish-actions.pod:2388
19123 "C<mkmountpoint> and C<rmmountpoint> are specialized calls that can be used "
19124 "to create extra mountpoints before mounting the first filesystem."
19128 #: ../fish/guestfish-actions.pod:2412
19133 #: ../fish/guestfish-actions.pod:2414
19136 " mknod mode devmajor devminor path\n"
19141 #: ../fish/guestfish-actions.pod:2424
19143 "Note that, just like L<mknod(2)>, the mode must be bitwise OR'd with "
19144 "S_IFBLK, S_IFCHR, S_IFIFO or S_IFSOCK (otherwise this call just creates a "
19145 "regular file). These constants are available in the standard Linux header "
19146 "files, or you can use C<mknod-b>, C<mknod-c> or C<mkfifo> which are wrappers "
19147 "around this command which bitwise OR in the appropriate constant for you."
19151 #: ../fish/guestfish-actions.pod:2434
19156 #: ../fish/guestfish-actions.pod:2436
19159 " mknod-b mode devmajor devminor path\n"
19164 #: ../fish/guestfish-actions.pod:2438
19166 "This call creates a block device node called C<path> with mode C<mode> and "
19167 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
19168 "wrapper around C<mknod>."
19172 #: ../fish/guestfish-actions.pod:2444
19177 #: ../fish/guestfish-actions.pod:2446
19180 " mknod-c mode devmajor devminor path\n"
19185 #: ../fish/guestfish-actions.pod:2448
19187 "This call creates a char device node called C<path> with mode C<mode> and "
19188 "device major/minor C<devmajor> and C<devminor>. It is just a convenient "
19189 "wrapper around C<mknod>."
19193 #: ../fish/guestfish-actions.pod:2454
19198 #: ../fish/guestfish-actions.pod:2456
19206 #: ../fish/guestfish-actions.pod:2460
19211 #: ../fish/guestfish-actions.pod:2462
19214 " mkswap-L label device\n"
19219 #: ../fish/guestfish-actions.pod:2470
19224 #: ../fish/guestfish-actions.pod:2472
19227 " mkswap-U uuid device\n"
19232 #: ../fish/guestfish-actions.pod:2476
19233 msgid "mkswap-file"
19237 #: ../fish/guestfish-actions.pod:2478
19240 " mkswap-file path\n"
19245 #: ../fish/guestfish-actions.pod:2482
19247 "This command just writes a swap file signature to an existing file. To "
19248 "create the file itself, use something like C<fallocate>."
19252 #: ../fish/guestfish-actions.pod:2485
19257 #: ../fish/guestfish-actions.pod:2487
19260 " modprobe modulename\n"
19265 #: ../fish/guestfish-actions.pod:2494
19270 #: ../fish/guestfish-actions.pod:2496
19273 " mount device mountpoint\n"
19278 #: ../fish/guestfish-actions.pod:2512
19280 "B<Important note:> When you use this call, the filesystem options C<sync> "
19281 "and C<noatime> are set implicitly. This was originally done because we "
19282 "thought it would improve reliability, but it turns out that I<-o sync> has a "
19283 "very large negative performance impact and negligible effect on "
19284 "reliability. Therefore we recommend that you avoid using C<mount> in any "
19285 "code that needs performance, and instead use C<mount-options> (use an empty "
19286 "string for the first parameter if you don't want any options)."
19290 #: ../fish/guestfish-actions.pod:2522
19295 #: ../fish/guestfish-actions.pod:2524
19298 " mount-loop file mountpoint\n"
19303 #: ../fish/guestfish-actions.pod:2530
19304 msgid "mount-options"
19308 #: ../fish/guestfish-actions.pod:2532
19311 " mount-options options device mountpoint\n"
19316 #: ../fish/guestfish-actions.pod:2534
19318 "This is the same as the C<mount> command, but it allows you to set the mount "
19319 "options as for the L<mount(8)> I<-o> flag."
19323 #: ../fish/guestfish-actions.pod:2542
19328 #: ../fish/guestfish-actions.pod:2544
19331 " mount-ro device mountpoint\n"
19336 #: ../fish/guestfish-actions.pod:2546
19338 "This is the same as the C<mount> command, but it mounts the filesystem with "
19339 "the read-only (I<-o ro>) flag."
19343 #: ../fish/guestfish-actions.pod:2549
19348 #: ../fish/guestfish-actions.pod:2551
19351 " mount-vfs options vfstype device mountpoint\n"
19356 #: ../fish/guestfish-actions.pod:2553
19358 "This is the same as the C<mount> command, but it allows you to set both the "
19359 "mount options and the vfstype as for the L<mount(8)> I<-o> and I<-t> flags."
19363 #: ../fish/guestfish-actions.pod:2557
19364 msgid "mountpoints"
19368 #: ../fish/guestfish-actions.pod:2559
19376 #: ../fish/guestfish-actions.pod:2561
19378 "This call is similar to C<mounts>. That call returns a list of devices. "
19379 "This one returns a hash table (map) of device name to directory where the "
19380 "device is mounted."
19384 #: ../fish/guestfish-actions.pod:2565
19389 #: ../fish/guestfish-actions.pod:2567
19397 #: ../fish/guestfish-actions.pod:2574
19398 msgid "See also: C<mountpoints>"
19402 #: ../fish/guestfish-actions.pod:2576
19407 #: ../fish/guestfish-actions.pod:2578
19415 #: ../fish/guestfish-actions.pod:2583
19416 msgid "ntfs-3g-probe"
19420 #: ../fish/guestfish-actions.pod:2585
19423 " ntfs-3g-probe true|false device\n"
19428 #: ../fish/guestfish-actions.pod:2599
19433 #: ../fish/guestfish-actions.pod:2601
19436 " ntfsresize device\n"
19441 #: ../fish/guestfish-actions.pod:2607
19442 msgid "ntfsresize-size"
19446 #: ../fish/guestfish-actions.pod:2609
19449 " ntfsresize-size device size\n"
19454 #: ../fish/guestfish-actions.pod:2611
19456 "This command is the same as C<ntfsresize> except that it allows you to "
19457 "specify the new size (in bytes) explicitly."
19461 #: ../fish/guestfish-actions.pod:2614
19466 #: ../fish/guestfish-actions.pod:2616
19469 " part-add device prlogex startsect endsect\n"
19474 #: ../fish/guestfish-actions.pod:2618
19476 "This command adds a partition to C<device>. If there is no partition table "
19477 "on the device, call C<part-init> first."
19481 #: ../fish/guestfish-actions.pod:2630
19483 "Creating a partition which covers the whole disk is not so easy. Use "
19484 "C<part-disk> to do that."
19488 #: ../fish/guestfish-actions.pod:2633
19493 #: ../fish/guestfish-actions.pod:2635
19496 " part-del device partnum\n"
19501 #: ../fish/guestfish-actions.pod:2643
19506 #: ../fish/guestfish-actions.pod:2645
19509 " part-disk device parttype\n"
19514 #: ../fish/guestfish-actions.pod:2647
19516 "This command is simply a combination of C<part-init> followed by C<part-add> "
19517 "to create a single primary partition covering the whole disk."
19521 #: ../fish/guestfish-actions.pod:2651
19523 "C<parttype> is the partition table type, usually C<mbr> or C<gpt>, but other "
19524 "possible values are described in C<part-init>."
19528 #: ../fish/guestfish-actions.pod:2657
19529 msgid "part-get-bootable"
19533 #: ../fish/guestfish-actions.pod:2659
19536 " part-get-bootable device partnum\n"
19541 #: ../fish/guestfish-actions.pod:2664
19542 msgid "See also C<part-set-bootable>."
19546 #: ../fish/guestfish-actions.pod:2666
19547 msgid "part-get-mbr-id"
19551 #: ../fish/guestfish-actions.pod:2668
19554 " part-get-mbr-id device partnum\n"
19559 #: ../fish/guestfish-actions.pod:2673 ../fish/guestfish-actions.pod:2811
19561 "Note that only MBR (old DOS-style) partitions have type bytes. You will get "
19562 "undefined results for other partition table types (see "
19563 "C<part-get-parttype>)."
19567 #: ../fish/guestfish-actions.pod:2677
19568 msgid "part-get-parttype"
19572 #: ../fish/guestfish-actions.pod:2679
19575 " part-get-parttype device\n"
19580 #: ../fish/guestfish-actions.pod:2684
19582 "Common return values include: C<msdos> (a DOS/Windows style MBR partition "
19583 "table), C<gpt> (a GPT/EFI-style partition table). Other values are "
19584 "possible, although unusual. See C<part-init> for a full list."
19588 #: ../fish/guestfish-actions.pod:2689
19593 #: ../fish/guestfish-actions.pod:2691
19596 " part-init device parttype\n"
19601 #: ../fish/guestfish-actions.pod:2697
19603 "Initially there are no partitions. Following this, you should call "
19604 "C<part-add> for each partition required."
19608 #: ../fish/guestfish-actions.pod:2760
19613 #: ../fish/guestfish-actions.pod:2762
19616 " part-list device\n"
19621 #: ../fish/guestfish-actions.pod:2777
19623 "Start of the partition I<in bytes>. To get sectors you have to divide by "
19624 "the device's sector size, see C<blockdev-getss>."
19628 #: ../fish/guestfish-actions.pod:2790
19629 msgid "part-set-bootable"
19633 #: ../fish/guestfish-actions.pod:2792
19636 " part-set-bootable device partnum true|false\n"
19641 #: ../fish/guestfish-actions.pod:2801
19642 msgid "part-set-mbr-id"
19646 #: ../fish/guestfish-actions.pod:2803
19649 " part-set-mbr-id device partnum idbyte\n"
19654 #: ../fish/guestfish-actions.pod:2815
19655 msgid "part-set-name"
19659 #: ../fish/guestfish-actions.pod:2817
19662 " part-set-name device partnum name\n"
19667 #: ../fish/guestfish-actions.pod:2825
19668 msgid "ping-daemon"
19672 #: ../fish/guestfish-actions.pod:2827
19680 #: ../fish/guestfish-actions.pod:2834
19685 #: ../fish/guestfish-actions.pod:2836
19688 " pread path count offset\n"
19693 #: ../fish/guestfish-actions.pod:2844
19694 msgid "See also C<pwrite>."
19698 #: ../fish/guestfish-actions.pod:2849
19703 #: ../fish/guestfish-actions.pod:2851
19706 " pvcreate device\n"
19711 #: ../fish/guestfish-actions.pod:2857
19716 #: ../fish/guestfish-actions.pod:2859
19719 " pvremove device\n"
19724 #: ../fish/guestfish-actions.pod:2868
19729 #: ../fish/guestfish-actions.pod:2870
19732 " pvresize device\n"
19737 #: ../fish/guestfish-actions.pod:2875
19738 msgid "pvresize-size"
19742 #: ../fish/guestfish-actions.pod:2877
19745 " pvresize-size device size\n"
19750 #: ../fish/guestfish-actions.pod:2879
19752 "This command is the same as C<pvresize> except that it allows you to specify "
19753 "the new size (in bytes) explicitly."
19757 #: ../fish/guestfish-actions.pod:2882
19762 #: ../fish/guestfish-actions.pod:2884
19770 #: ../fish/guestfish-actions.pod:2892
19771 msgid "See also C<pvs-full>."
19775 #: ../fish/guestfish-actions.pod:2894
19780 #: ../fish/guestfish-actions.pod:2896
19788 #: ../fish/guestfish-actions.pod:2901
19793 #: ../fish/guestfish-actions.pod:2903
19801 #: ../fish/guestfish-actions.pod:2907
19806 #: ../fish/guestfish-actions.pod:2909
19809 " pwrite path content offset\n"
19814 #: ../fish/guestfish-actions.pod:2920
19815 msgid "See also C<pread>."
19819 #: ../fish/guestfish-actions.pod:2925
19824 #: ../fish/guestfish-actions.pod:2927
19827 " read-file path\n"
19832 #: ../fish/guestfish-actions.pod:2932
19834 "Unlike C<cat>, this function can correctly handle files that contain "
19835 "embedded ASCII NUL characters. However unlike C<download>, this function is "
19836 "limited in the total size of file that can be handled."
19840 #: ../fish/guestfish-actions.pod:2940
19845 #: ../fish/guestfish-actions.pod:2942
19848 " read-lines path\n"
19853 #: ../fish/guestfish-actions.pod:2949
19855 "Note that this function cannot correctly handle binary files (specifically, "
19856 "files containing C<\\0> character which is treated as end of line). For "
19857 "those you need to use the C<read-file> function which has a more complex "
19862 #: ../fish/guestfish-actions.pod:2954
19867 #: ../fish/guestfish-actions.pod:2956
19875 #: ../fish/guestfish-actions.pod:3008
19877 "This function is primarily intended for use by programs. To get a simple "
19878 "list of names, use C<ls>. To get a printable directory for human "
19879 "consumption, use C<ll>."
19883 #: ../fish/guestfish-actions.pod:3012
19888 #: ../fish/guestfish-actions.pod:3014
19896 #: ../fish/guestfish-actions.pod:3018
19897 msgid "readlinklist"
19901 #: ../fish/guestfish-actions.pod:3020
19904 " readlinklist path 'names ...'\n"
19909 #: ../fish/guestfish-actions.pod:3044
19914 #: ../fish/guestfish-actions.pod:3046
19922 #: ../fish/guestfish-actions.pod:3051
19923 msgid "removexattr"
19927 #: ../fish/guestfish-actions.pod:3053
19930 " removexattr xattr path\n"
19935 #: ../fish/guestfish-actions.pod:3058
19936 msgid "See also: C<lremovexattr>, L<attr(5)>."
19940 #: ../fish/guestfish-actions.pod:3060
19945 #: ../fish/guestfish-actions.pod:3062
19948 " resize2fs device\n"
19953 #: ../fish/guestfish-actions.pod:3067
19955 "I<Note:> It is sometimes required that you run C<e2fsck-f> on the C<device> "
19956 "before calling this command. For unknown reasons C<resize2fs> sometimes "
19957 "gives an error about this and sometimes not. In any case, it is always safe "
19958 "to call C<e2fsck-f> before calling this function."
19962 #: ../fish/guestfish-actions.pod:3073
19963 msgid "resize2fs-size"
19967 #: ../fish/guestfish-actions.pod:3075
19970 " resize2fs-size device size\n"
19975 #: ../fish/guestfish-actions.pod:3077
19977 "This command is the same as C<resize2fs> except that it allows you to "
19978 "specify the new size (in bytes) explicitly."
19982 #: ../fish/guestfish-actions.pod:3080
19987 #: ../fish/guestfish-actions.pod:3082
19995 #: ../fish/guestfish-actions.pod:3086
20000 #: ../fish/guestfish-actions.pod:3088
20008 #: ../fish/guestfish-actions.pod:3094
20013 #: ../fish/guestfish-actions.pod:3096
20021 #: ../fish/guestfish-actions.pod:3100
20022 msgid "rmmountpoint"
20026 #: ../fish/guestfish-actions.pod:3102
20029 " rmmountpoint exemptpath\n"
20034 #: ../fish/guestfish-actions.pod:3104
20036 "This calls removes a mountpoint that was previously created with "
20037 "C<mkmountpoint>. See C<mkmountpoint> for full details."
20041 #: ../fish/guestfish-actions.pod:3108
20042 msgid "scrub-device"
20046 #: ../fish/guestfish-actions.pod:3110
20049 " scrub-device device\n"
20054 #: ../fish/guestfish-actions.pod:3121
20059 #: ../fish/guestfish-actions.pod:3123
20062 " scrub-file file\n"
20067 #: ../fish/guestfish-actions.pod:3133
20068 msgid "scrub-freespace"
20072 #: ../fish/guestfish-actions.pod:3135
20075 " scrub-freespace dir\n"
20080 #: ../fish/guestfish-actions.pod:3137
20082 "This command creates the directory C<dir> and then fills it with files until "
20083 "the filesystem is full, and scrubs the files as for C<scrub-file>, and "
20084 "deletes them. The intention is to scrub any free space on the partition "
20085 "containing C<dir>."
20089 #: ../fish/guestfish-actions.pod:3146
20090 msgid "set-append | append"
20094 #: ../fish/guestfish-actions.pod:3148
20097 " set-append append\n"
20102 #: ../fish/guestfish-actions.pod:3159
20103 msgid "set-autosync | autosync"
20107 #: ../fish/guestfish-actions.pod:3161
20110 " set-autosync true|false\n"
20115 #: ../fish/guestfish-actions.pod:3163
20117 "If C<autosync> is true, this enables autosync. Libguestfs will make a best "
20118 "effort attempt to run C<umount-all> followed by C<sync> when the handle is "
20119 "closed (also if the program exits without closing handles)."
20123 #: ../fish/guestfish-actions.pod:3171
20124 msgid "set-direct | direct"
20128 #: ../fish/guestfish-actions.pod:3173
20131 " set-direct true|false\n"
20136 #: ../fish/guestfish-actions.pod:3179
20138 "One consequence of this is that log messages aren't caught by the library "
20139 "and handled by C<set-log-message-callback>, but go straight to stdout."
20143 #: ../fish/guestfish-actions.pod:3188
20144 msgid "set-e2label"
20148 #: ../fish/guestfish-actions.pod:3190
20151 " set-e2label device label\n"
20156 #: ../fish/guestfish-actions.pod:3196
20158 "You can use either C<tune2fs-l> or C<get-e2label> to return the existing "
20159 "label on a filesystem."
20163 #: ../fish/guestfish-actions.pod:3199
20168 #: ../fish/guestfish-actions.pod:3201
20171 " set-e2uuid device uuid\n"
20176 #: ../fish/guestfish-actions.pod:3208
20178 "You can use either C<tune2fs-l> or C<get-e2uuid> to return the existing UUID "
20183 #: ../fish/guestfish-actions.pod:3211
20184 msgid "set-memsize | memsize"
20188 #: ../fish/guestfish-actions.pod:3213
20191 " set-memsize memsize\n"
20196 #: ../fish/guestfish-actions.pod:3215
20198 "This sets the memory size in megabytes allocated to the qemu subprocess. "
20199 "This only has any effect if called before C<launch>."
20203 #: ../fish/guestfish-actions.pod:3226
20204 msgid "set-network | network"
20208 #: ../fish/guestfish-actions.pod:3228
20211 " set-network true|false\n"
20216 #: ../fish/guestfish-actions.pod:3236
20217 msgid "You must call this before calling C<launch>, otherwise it has no effect."
20221 #: ../fish/guestfish-actions.pod:3239
20222 msgid "set-path | path"
20226 #: ../fish/guestfish-actions.pod:3241
20229 " set-path searchpath\n"
20234 #: ../fish/guestfish-actions.pod:3250
20235 msgid "set-qemu | qemu"
20239 #: ../fish/guestfish-actions.pod:3252
20247 #: ../fish/guestfish-actions.pod:3272
20248 msgid "set-recovery-proc | recovery-proc"
20252 #: ../fish/guestfish-actions.pod:3274
20255 " set-recovery-proc true|false\n"
20260 #: ../fish/guestfish-actions.pod:3276
20262 "If this is called with the parameter C<false> then C<launch> does not create "
20263 "a recovery process. The purpose of the recovery process is to stop runaway "
20264 "qemu processes in the case where the main program aborts abruptly."
20268 #: ../fish/guestfish-actions.pod:3281
20270 "This only has any effect if called before C<launch>, and the default is "
20275 #: ../fish/guestfish-actions.pod:3290
20276 msgid "set-selinux | selinux"
20280 #: ../fish/guestfish-actions.pod:3292
20283 " set-selinux true|false\n"
20288 #: ../fish/guestfish-actions.pod:3303
20289 msgid "set-trace | trace"
20293 #: ../fish/guestfish-actions.pod:3305
20296 " set-trace true|false\n"
20301 #: ../fish/guestfish-actions.pod:3321
20302 msgid "set-verbose | verbose"
20306 #: ../fish/guestfish-actions.pod:3323
20309 " set-verbose true|false\n"
20314 #: ../fish/guestfish-actions.pod:3330
20319 #: ../fish/guestfish-actions.pod:3332
20322 " setcon context\n"
20327 #: ../fish/guestfish-actions.pod:3339
20332 #: ../fish/guestfish-actions.pod:3341
20335 " setxattr xattr val vallen path\n"
20340 #: ../fish/guestfish-actions.pod:3347
20341 msgid "See also: C<lsetxattr>, L<attr(5)>."
20345 #: ../fish/guestfish-actions.pod:3349
20350 #: ../fish/guestfish-actions.pod:3351
20353 " sfdisk device cyls heads sectors 'lines ...'\n"
20358 #: ../fish/guestfish-actions.pod:3373
20359 msgid "See also: C<sfdisk-l>, C<sfdisk-N>, C<part-init>"
20363 #: ../fish/guestfish-actions.pod:3379
20368 #: ../fish/guestfish-actions.pod:3381
20371 " sfdiskM device 'lines ...'\n"
20376 #: ../fish/guestfish-actions.pod:3383
20378 "This is a simplified interface to the C<sfdisk> command, where partition "
20379 "sizes are specified in megabytes only (rounded to the nearest cylinder) and "
20380 "you don't need to specify the cyls, heads and sectors parameters which were "
20381 "rarely if ever used anyway."
20385 #: ../fish/guestfish-actions.pod:3389
20386 msgid "See also: C<sfdisk>, the L<sfdisk(8)> manpage and C<part-disk>"
20390 #: ../fish/guestfish-actions.pod:3395
20395 #: ../fish/guestfish-actions.pod:3397
20398 " sfdisk-N device partnum cyls heads sectors line\n"
20403 #: ../fish/guestfish-actions.pod:3402
20405 "For other parameters, see C<sfdisk>. You should usually pass C<0> for the "
20406 "cyls/heads/sectors parameters."
20410 #: ../fish/guestfish-actions.pod:3405
20411 msgid "See also: C<part-add>"
20415 #: ../fish/guestfish-actions.pod:3410
20416 msgid "sfdisk-disk-geometry"
20420 #: ../fish/guestfish-actions.pod:3412
20423 " sfdisk-disk-geometry device\n"
20428 #: ../fish/guestfish-actions.pod:3414
20430 "This displays the disk geometry of C<device> read from the partition table. "
20431 "Especially in the case where the underlying block device has been resized, "
20432 "this can be different from the kernel's idea of the geometry (see "
20433 "C<sfdisk-kernel-geometry>)."
20437 #: ../fish/guestfish-actions.pod:3422
20438 msgid "sfdisk-kernel-geometry"
20442 #: ../fish/guestfish-actions.pod:3424
20445 " sfdisk-kernel-geometry device\n"
20450 #: ../fish/guestfish-actions.pod:3431
20455 #: ../fish/guestfish-actions.pod:3433
20458 " sfdisk-l device\n"
20463 #: ../fish/guestfish-actions.pod:3439
20464 msgid "See also: C<part-list>"
20468 #: ../fish/guestfish-actions.pod:3441
20473 #: ../fish/guestfish-actions.pod:3443
20481 #: ../fish/guestfish-actions.pod:3448
20482 msgid "This is like C<command>, but passes the command to:"
20486 #: ../fish/guestfish-actions.pod:3456
20487 msgid "All the provisos about C<command> apply to this call."
20491 #: ../fish/guestfish-actions.pod:3458
20496 #: ../fish/guestfish-actions.pod:3460
20499 " sh-lines command\n"
20504 #: ../fish/guestfish-actions.pod:3462
20505 msgid "This is the same as C<sh>, but splits the result into a list of lines."
20509 #: ../fish/guestfish-actions.pod:3465
20510 msgid "See also: C<command-lines>"
20514 #: ../fish/guestfish-actions.pod:3467
20519 #: ../fish/guestfish-actions.pod:3469
20527 #: ../fish/guestfish-actions.pod:3473
20532 #: ../fish/guestfish-actions.pod:3475
20540 #: ../fish/guestfish-actions.pod:3481
20545 #: ../fish/guestfish-actions.pod:3483
20553 #: ../fish/guestfish-actions.pod:3491
20558 #: ../fish/guestfish-actions.pod:3493
20566 #: ../fish/guestfish-actions.pod:3501
20571 #: ../fish/guestfish-actions.pod:3503
20574 " strings-e encoding path\n"
20579 #: ../fish/guestfish-actions.pod:3505
20581 "This is like the C<strings> command, but allows you to specify the encoding "
20582 "of strings that are looked for in the source file C<path>."
20586 #: ../fish/guestfish-actions.pod:3515
20588 "Single 7-bit-byte characters like ASCII and the ASCII-compatible parts of "
20589 "ISO-8859-X (this is what C<strings> uses)."
20593 #: ../fish/guestfish-actions.pod:3547
20594 msgid "swapoff-device"
20598 #: ../fish/guestfish-actions.pod:3549
20601 " swapoff-device device\n"
20606 #: ../fish/guestfish-actions.pod:3551
20608 "This command disables the libguestfs appliance swap device or partition "
20609 "named C<device>. See C<swapon-device>."
20613 #: ../fish/guestfish-actions.pod:3555
20614 msgid "swapoff-file"
20618 #: ../fish/guestfish-actions.pod:3557
20621 " swapoff-file file\n"
20626 #: ../fish/guestfish-actions.pod:3561
20627 msgid "swapoff-label"
20631 #: ../fish/guestfish-actions.pod:3563
20634 " swapoff-label label\n"
20639 #: ../fish/guestfish-actions.pod:3568
20640 msgid "swapoff-uuid"
20644 #: ../fish/guestfish-actions.pod:3570
20647 " swapoff-uuid uuid\n"
20652 #: ../fish/guestfish-actions.pod:3575
20653 msgid "swapon-device"
20657 #: ../fish/guestfish-actions.pod:3577
20660 " swapon-device device\n"
20665 #: ../fish/guestfish-actions.pod:3579
20667 "This command enables the libguestfs appliance to use the swap device or "
20668 "partition named C<device>. The increased memory is made available for all "
20669 "commands, for example those run using C<command> or C<sh>."
20673 #: ../fish/guestfish-actions.pod:3591
20674 msgid "swapon-file"
20678 #: ../fish/guestfish-actions.pod:3593
20681 " swapon-file file\n"
20686 #: ../fish/guestfish-actions.pod:3595
20687 msgid "This command enables swap to a file. See C<swapon-device> for other notes."
20691 #: ../fish/guestfish-actions.pod:3598
20692 msgid "swapon-label"
20696 #: ../fish/guestfish-actions.pod:3600
20699 " swapon-label label\n"
20704 #: ../fish/guestfish-actions.pod:3602
20706 "This command enables swap to a labeled swap partition. See C<swapon-device> "
20711 #: ../fish/guestfish-actions.pod:3605
20712 msgid "swapon-uuid"
20716 #: ../fish/guestfish-actions.pod:3607
20719 " swapon-uuid uuid\n"
20724 #: ../fish/guestfish-actions.pod:3609
20726 "This command enables swap to a swap partition with the given UUID. See "
20727 "C<swapon-device> for other notes."
20731 #: ../fish/guestfish-actions.pod:3612
20736 #: ../fish/guestfish-actions.pod:3614
20744 #: ../fish/guestfish-actions.pod:3622
20749 #: ../fish/guestfish-actions.pod:3624
20757 #: ../fish/guestfish-actions.pod:3632
20762 #: ../fish/guestfish-actions.pod:3634
20765 " tail-n nrlines path\n"
20770 #: ../fish/guestfish-actions.pod:3647
20775 #: ../fish/guestfish-actions.pod:3649
20778 " tar-in (tarfile|-) directory\n"
20783 #: ../fish/guestfish-actions.pod:3654
20784 msgid "To upload a compressed tarball, use C<tgz-in> or C<txz-in>."
20788 #: ../fish/guestfish-actions.pod:3659
20793 #: ../fish/guestfish-actions.pod:3661
20796 " tar-out directory (tarfile|-)\n"
20801 #: ../fish/guestfish-actions.pod:3666
20802 msgid "To download a compressed tarball, use C<tgz-out> or C<txz-out>."
20806 #: ../fish/guestfish-actions.pod:3671
20811 #: ../fish/guestfish-actions.pod:3673
20814 " tgz-in (tarball|-) directory\n"
20819 #: ../fish/guestfish-actions.pod:3678
20820 msgid "To upload an uncompressed tarball, use C<tar-in>."
20824 #: ../fish/guestfish-actions.pod:3682
20829 #: ../fish/guestfish-actions.pod:3684
20832 " tgz-out directory (tarball|-)\n"
20837 #: ../fish/guestfish-actions.pod:3689
20838 msgid "To download an uncompressed tarball, use C<tar-out>."
20842 #: ../fish/guestfish-actions.pod:3693
20847 #: ../fish/guestfish-actions.pod:3695
20855 #: ../fish/guestfish-actions.pod:3704
20860 #: ../fish/guestfish-actions.pod:3706
20868 #: ../fish/guestfish-actions.pod:3711
20869 msgid "truncate-size"
20873 #: ../fish/guestfish-actions.pod:3713
20876 " truncate-size path size\n"
20881 #: ../fish/guestfish-actions.pod:3718
20883 "If the current file size is less than C<size> then the file is extended to "
20884 "the required size with zero bytes. This creates a sparse file (ie. disk "
20885 "blocks are not allocated for the file until you write to it). To create a "
20886 "non-sparse file of zeroes, use C<fallocate64> instead."
20890 #: ../fish/guestfish-actions.pod:3724
20895 #: ../fish/guestfish-actions.pod:3726
20898 " tune2fs-l device\n"
20903 #: ../fish/guestfish-actions.pod:3736
20908 #: ../fish/guestfish-actions.pod:3738
20911 " txz-in (tarball|-) directory\n"
20916 #: ../fish/guestfish-actions.pod:3745
20921 #: ../fish/guestfish-actions.pod:3747
20924 " txz-out directory (tarball|-)\n"
20929 #: ../fish/guestfish-actions.pod:3754
20934 #: ../fish/guestfish-actions.pod:3756
20942 #: ../fish/guestfish-actions.pod:3770
20943 msgid "See also C<get-umask>, L<umask(2)>, C<mknod>, C<mkdir>."
20947 #: ../fish/guestfish-actions.pod:3775
20948 msgid "umount | unmount"
20952 #: ../fish/guestfish-actions.pod:3777
20955 " umount pathordevice\n"
20960 #: ../fish/guestfish-actions.pod:3783
20961 msgid "umount-all | unmount-all"
20965 #: ../fish/guestfish-actions.pod:3785
20973 #: ../fish/guestfish-actions.pod:3791
20978 #: ../fish/guestfish-actions.pod:3793
20981 " upload (filename|-) remotefilename\n"
20986 #: ../fish/guestfish-actions.pod:3800
20987 msgid "See also C<download>."
20991 #: ../fish/guestfish-actions.pod:3804
20996 #: ../fish/guestfish-actions.pod:3806
20999 " utimens path atsecs atnsecs mtsecs mtnsecs\n"
21004 #: ../fish/guestfish-actions.pod:3825
21009 #: ../fish/guestfish-actions.pod:3827
21017 #: ../fish/guestfish-actions.pod:3854
21019 "I<Note:> Don't use this call to test for availability of features. In "
21020 "enterprise distributions we backport features from later versions into "
21021 "earlier versions, making this an unreliable way to test for features. Use "
21022 "C<available> instead."
21026 #: ../fish/guestfish-actions.pod:3860
21031 #: ../fish/guestfish-actions.pod:3862
21034 " vfs-label device\n"
21039 #: ../fish/guestfish-actions.pod:3869
21040 msgid "To find a filesystem from the label, use C<findfs-label>."
21044 #: ../fish/guestfish-actions.pod:3871
21049 #: ../fish/guestfish-actions.pod:3873
21052 " vfs-type device\n"
21057 #: ../fish/guestfish-actions.pod:3883
21062 #: ../fish/guestfish-actions.pod:3885
21065 " vfs-uuid device\n"
21070 #: ../fish/guestfish-actions.pod:3892
21071 msgid "To find a filesystem from the UUID, use C<findfs-uuid>."
21075 #: ../fish/guestfish-actions.pod:3894
21076 msgid "vg-activate"
21080 #: ../fish/guestfish-actions.pod:3896
21083 " vg-activate true|false 'volgroups ...'\n"
21088 #: ../fish/guestfish-actions.pod:3909
21089 msgid "vg-activate-all"
21093 #: ../fish/guestfish-actions.pod:3911
21096 " vg-activate-all true|false\n"
21101 #: ../fish/guestfish-actions.pod:3921
21106 #: ../fish/guestfish-actions.pod:3923
21109 " vgcreate volgroup 'physvols ...'\n"
21114 #: ../fish/guestfish-actions.pod:3928
21119 #: ../fish/guestfish-actions.pod:3930
21122 " vglvuuids vgname\n"
21127 #: ../fish/guestfish-actions.pod:3935
21129 "You can use this along with C<lvs> and C<lvuuid> calls to associate logical "
21130 "volumes and volume groups."
21134 #: ../fish/guestfish-actions.pod:3938
21135 msgid "See also C<vgpvuuids>."
21139 #: ../fish/guestfish-actions.pod:3940
21144 #: ../fish/guestfish-actions.pod:3942
21147 " vgpvuuids vgname\n"
21152 #: ../fish/guestfish-actions.pod:3947
21154 "You can use this along with C<pvs> and C<pvuuid> calls to associate physical "
21155 "volumes and volume groups."
21159 #: ../fish/guestfish-actions.pod:3950
21160 msgid "See also C<vglvuuids>."
21164 #: ../fish/guestfish-actions.pod:3952
21169 #: ../fish/guestfish-actions.pod:3954
21172 " vgremove vgname\n"
21177 #: ../fish/guestfish-actions.pod:3961
21182 #: ../fish/guestfish-actions.pod:3963
21185 " vgrename volgroup newvolgroup\n"
21190 #: ../fish/guestfish-actions.pod:3967
21195 #: ../fish/guestfish-actions.pod:3969
21203 #: ../fish/guestfish-actions.pod:3977
21204 msgid "See also C<vgs-full>."
21208 #: ../fish/guestfish-actions.pod:3979
21213 #: ../fish/guestfish-actions.pod:3981
21221 #: ../fish/guestfish-actions.pod:3986
21226 #: ../fish/guestfish-actions.pod:3988
21234 #: ../fish/guestfish-actions.pod:3993
21239 #: ../fish/guestfish-actions.pod:3995
21247 #: ../fish/guestfish-actions.pod:3999
21252 #: ../fish/guestfish-actions.pod:4001
21260 #: ../fish/guestfish-actions.pod:4006
21265 #: ../fish/guestfish-actions.pod:4008
21273 #: ../fish/guestfish-actions.pod:4013
21278 #: ../fish/guestfish-actions.pod:4015
21286 #: ../fish/guestfish-actions.pod:4020
21291 #: ../fish/guestfish-actions.pod:4022
21294 " write path content\n"
21299 #: ../fish/guestfish-actions.pod:4030
21304 #: ../fish/guestfish-actions.pod:4032
21307 " write-file path content size\n"
21312 #: ../fish/guestfish-actions.pod:4055
21317 #: ../fish/guestfish-actions.pod:4057
21320 " zegrep regex path\n"
21325 #: ../fish/guestfish-actions.pod:4065
21330 #: ../fish/guestfish-actions.pod:4067
21333 " zegrepi regex path\n"
21338 #: ../fish/guestfish-actions.pod:4075
21343 #: ../fish/guestfish-actions.pod:4077
21351 #: ../fish/guestfish-actions.pod:4085
21352 msgid "See also: C<zero-device>, C<scrub-device>."
21356 #: ../fish/guestfish-actions.pod:4087
21357 msgid "zero-device"
21361 #: ../fish/guestfish-actions.pod:4089
21364 " zero-device device\n"
21369 #: ../fish/guestfish-actions.pod:4091
21371 "This command writes zeroes over the entire C<device>. Compare with C<zero> "
21372 "which just zeroes the first few blocks of a device."
21376 #: ../fish/guestfish-actions.pod:4098
21381 #: ../fish/guestfish-actions.pod:4100
21384 " zerofree device\n"
21389 #: ../fish/guestfish-actions.pod:4113
21394 #: ../fish/guestfish-actions.pod:4115
21397 " zfgrep pattern path\n"
21402 #: ../fish/guestfish-actions.pod:4123
21407 #: ../fish/guestfish-actions.pod:4125
21410 " zfgrepi pattern path\n"
21415 #: ../fish/guestfish-actions.pod:4133
21420 #: ../fish/guestfish-actions.pod:4135
21423 " zfile meth path\n"
21428 #: ../fish/guestfish-actions.pod:4142
21429 msgid "Since 1.0.63, use C<file> instead which can now process compressed files."
21433 #: ../fish/guestfish-actions.pod:4152
21438 #: ../fish/guestfish-actions.pod:4154
21441 " zgrep regex path\n"
21446 #: ../fish/guestfish-actions.pod:4162
21451 #: ../fish/guestfish-actions.pod:4164
21454 " zgrepi regex path\n"
21459 #: ../test-tool/libguestfs-test-tool.pod:5
21460 msgid "libguestfs-test-tool - End user tests for libguestfs"
21464 #: ../test-tool/libguestfs-test-tool.pod:9
21467 " libguestfs-test-tool [--options]\n"
21472 #: ../test-tool/libguestfs-test-tool.pod:13
21474 "libguestfs-test-tool is a test program shipped with libguestfs to end users "
21475 "and developers, to allow them to check basic libguestfs functionality is "
21476 "working. This is needed because libguestfs occasionally breaks for reasons "
21477 "beyond our control: usually because of changes in the underlying qemu or "
21478 "kernel packages, or the host environment."
21482 #: ../test-tool/libguestfs-test-tool.pod:20
21483 msgid "If you suspect a problem in libguestfs, then just run:"
21487 #: ../test-tool/libguestfs-test-tool.pod:22
21490 " libguestfs-test-tool\n"
21495 #: ../test-tool/libguestfs-test-tool.pod:24
21496 msgid "It will print lots of diagnostic messages."
21500 #: ../test-tool/libguestfs-test-tool.pod:26
21501 msgid "If it runs to completion successfully, you will see this near the end:"
21505 #: ../test-tool/libguestfs-test-tool.pod:28
21508 " ===== TEST FINISHED OK =====\n"
21513 #: ../test-tool/libguestfs-test-tool.pod:30
21514 msgid "and the test tool will exit with code 0."
21518 #: ../test-tool/libguestfs-test-tool.pod:32
21520 "If it fails (and/or exits with non-zero error code), please paste the "
21521 "B<complete, unedited> output of the test tool into a bug report. More "
21522 "information about reporting bugs can be found on the "
21523 "L<http://libguestfs.org/> website."
21527 #: ../test-tool/libguestfs-test-tool.pod:41
21532 #: ../test-tool/libguestfs-test-tool.pod:43
21533 msgid "Display short usage information and exit."
21537 #: ../test-tool/libguestfs-test-tool.pod:45
21538 msgid "I<--helper /path/to/libguestfs-test-tool-helper>"
21542 #: ../test-tool/libguestfs-test-tool.pod:47
21544 "Pass an alternate name for the helper program. libguestfs-test-tool will "
21545 "normally look in the C<$libexec> directory that was configured when the tool "
21550 #: ../test-tool/libguestfs-test-tool.pod:51
21551 msgid "I<--qemu qemu_binary>"
21555 #: ../test-tool/libguestfs-test-tool.pod:53
21557 "If you have downloaded another qemu binary, point this option at the full "
21558 "path of the binary to try it."
21562 #: ../test-tool/libguestfs-test-tool.pod:56
21563 msgid "I<--qemudir qemu_source_dir>"
21567 #: ../test-tool/libguestfs-test-tool.pod:58
21569 "If you have compiled qemu from source, point this option at the source "
21570 "directory to try it."
21574 #: ../test-tool/libguestfs-test-tool.pod:61
21575 msgid "I<--timeout N>"
21579 #: ../test-tool/libguestfs-test-tool.pod:63
21581 "Set the launch timeout to C<N> seconds. The default is 120 seconds which "
21582 "does not usually need to be adjusted unless your machine is very slow."
21586 #: ../test-tool/libguestfs-test-tool.pod:69
21587 msgid "TRYING OUT A DIFFERENT VERSION OF QEMU"
21591 #: ../test-tool/libguestfs-test-tool.pod:71
21593 "If you have compiled another version of qemu from source and would like to "
21594 "try that, then you can use the I<--qemudir> option to point to the qemu "
21595 "source directory."
21599 #: ../test-tool/libguestfs-test-tool.pod:75
21601 "If you have downloaded a qemu binary from somewhere, use the I<--qemu> "
21602 "option to point to the binary."
21606 #: ../test-tool/libguestfs-test-tool.pod:78
21608 "When using an alternate qemu with libguestfs, usually you would need to "
21609 "write a qemu wrapper script (see section I<QEMU WRAPPERS> in "
21610 "L<guestfs(3)>). libguestfs-test-tool writes a temporary qemu wrapper script "
21611 "when you use either of the I<--qemudir> or I<--qemu> options."
21615 #: ../test-tool/libguestfs-test-tool.pod:85
21617 "libguestfs-test-tool returns I<0> if the tests completed without error, or "
21618 "I<1> if there was an error."
21622 #: ../test-tool/libguestfs-test-tool.pod:92
21623 msgid "/usr/libexec/libguestfs-test-tool-helper"
21627 #: ../test-tool/libguestfs-test-tool.pod:94
21629 "This helper program is run inside the appliance and provides additional "
21634 #: ../test-tool/libguestfs-test-tool.pod:97
21635 msgid "/usr/bin/mkisofs"
21639 #: ../test-tool/libguestfs-test-tool.pod:99
21641 "The C<mkisofs> command is required in order to construct a CD-ROM ISO file "
21642 "which is used as part of the tests."
21646 #: ../test-tool/libguestfs-test-tool.pod:106
21648 "For the full list of environment variables which may affect libguestfs, "
21649 "please see the L<guestfs(3)> manual page."
21653 #: ../test-tool/libguestfs-test-tool.pod:111
21654 msgid "L<guestfs(3)>, L<http://libguestfs.org/>, L<http://qemu.org/>."
21658 #: ../test-tool/libguestfs-test-tool.pod:121 ../fuse/guestmount.pod:195
21659 msgid "Copyright (C) 2009 Red Hat Inc. L<http://libguestfs.org/>"
21663 #: ../fuse/guestmount.pod:5
21664 msgid "guestmount - Mount a guest filesystem on the host using FUSE and libguestfs"
21668 #: ../fuse/guestmount.pod:9
21671 " guestmount [--options] -a disk.img -m device [--ro] mountpoint\n"
21676 #: ../fuse/guestmount.pod:13
21678 "You must I<not> use C<guestmount> in read-write mode on live virtual "
21679 "machines. If you do this, you risk disk corruption in the VM."
21683 #: ../fuse/guestmount.pod:18
21685 "The guestmount program can be used to mount virtual machine filesystems and "
21686 "other disk images on the host. It uses libguestfs for access to the guest "
21687 "filesystem, and FUSE (the \"filesystem in userspace\") to make it appear as "
21688 "a mountable device."
21692 #: ../fuse/guestmount.pod:23
21694 "Along with other options, you have to give at least one device (I<-a> "
21695 "option) and at least one mountpoint (I<-m> option). How this works is "
21696 "better explained in the L<guestfish(1)> manual page, or you can use "
21697 "L<virt-inspector(1)> and/or the wrapper script C<guestmount-wrapper> to help "
21702 #: ../fuse/guestmount.pod:29
21704 "FUSE lets you mount filesystems as non-root. The mountpoint must be owned "
21705 "by you, and the filesystem will not be visible to any other users unless you "
21706 "make certain global configuration changes to C</etc/fuse.conf>. To unmount "
21707 "the filesystem, use the C<fusermount -u> command."
21711 #: ../fuse/guestmount.pod:37
21713 "For a typical Windows guest which has its main filesystem on the first "
21718 #: ../fuse/guestmount.pod:40
21721 " guestmount -a windows.img -m /dev/sda1 --ro /mnt\n"
21726 #: ../fuse/guestmount.pod:42
21728 "For a typical Linux guest which has a /boot filesystem on the first "
21729 "partition, and the root filesystem on a logical volume:"
21733 #: ../fuse/guestmount.pod:45
21736 " guestmount -a linux.img -m /dev/VG/LV -m /dev/sda1:/boot --ro /mnt\n"
21741 #: ../fuse/guestmount.pod:47
21743 "To get L<virt-inspector(1)> to do the hard work of detecting guest "
21744 "mountpoints for you:"
21748 #: ../fuse/guestmount.pod:50
21751 " guestmount $(virt-inspector --ro-fish MyGuest) /mnt\n"
21756 #: ../fuse/guestmount.pod:52
21758 "(or use --fish if you don't want it to be a read only mount). The option is "
21759 "called I<--ro-fish> or I<--fish> because these parameters are compatible "
21760 "with L<guestfish(1)>."
21764 #: ../fuse/guestmount.pod:56
21766 "If you don't know what filesystems are contained in a guest or disk image, "
21767 "use L<virt-list-filesystems(1)> first:"
21771 #: ../fuse/guestmount.pod:59
21774 " virt-list-filesystems MyGuest\n"
21779 #: ../fuse/guestmount.pod:61
21781 "If you want to trace the libguestfs calls but without excessive debugging, "
21786 #: ../fuse/guestmount.pod:64
21789 " guestmount [-a ... -m ...] --trace /mnt\n"
21794 #: ../fuse/guestmount.pod:66
21795 msgid "If you want to debug the program, we recommend:"
21799 #: ../fuse/guestmount.pod:68
21802 " guestmount [-a ... -m ...] --trace --verbose /mnt\n"
21807 #: ../fuse/guestmount.pod:76
21808 msgid "Add a block device or virtual machine image."
21812 #: ../fuse/guestmount.pod:78
21813 msgid "B<--dir-cache-timeout N>"
21817 #: ../fuse/guestmount.pod:80
21819 "Set the readdir cache timeout to I<N> seconds, the default being 60 "
21820 "seconds. The readdir cache [actually, there are several semi-independent "
21821 "caches] is populated after a readdir(2) call with the stat and extended "
21822 "attributes of the files in the directory, in anticipation that they will be "
21823 "requested soon after."
21827 #: ../fuse/guestmount.pod:86
21829 "There is also a different attribute cache implemented by FUSE (see the FUSE "
21830 "option I<-o attr_timeout>), but the FUSE cache does not anticipate future "
21831 "requests, only cache existing ones."
21835 #: ../fuse/guestmount.pod:90
21836 msgid "B<--fuse-help>"
21840 #: ../fuse/guestmount.pod:92
21841 msgid "Display help on special FUSE options (see I<-o> below)."
21845 #: ../fuse/guestmount.pod:96
21846 msgid "Display brief help and exit."
21850 #: ../fuse/guestmount.pod:98
21851 msgid "B<-m dev[:mnt]> | B<--mount dev[:mnt]>"
21855 #: ../fuse/guestmount.pod:100
21857 "Mount the named partition or logical volume on the given mountpoint B<in the "
21858 "guest> (this has nothing to do with mountpoints in the host)."
21862 #: ../fuse/guestmount.pod:103
21864 "If the mountpoint is omitted, it defaults to C</>. You have to mount "
21865 "something on C</>."
21869 #: ../fuse/guestmount.pod:108
21871 "By default, we attempt to sync the guest disk when the FUSE mountpoint is "
21872 "unmounted. If you specify this option, then we don't attempt to sync the "
21873 "disk. See the discussion of autosync in the L<guestfs(3)> manpage."
21877 #: ../fuse/guestmount.pod:113
21878 msgid "B<-o option> | B<--option option>"
21882 #: ../fuse/guestmount.pod:115
21883 msgid "Pass extra options to FUSE."
21887 #: ../fuse/guestmount.pod:117
21889 "To get a list of all the extra options supported by FUSE, use the command "
21890 "below. Note that only the FUSE I<-o> options can be passed, and only some "
21891 "of them are a good idea."
21895 #: ../fuse/guestmount.pod:121
21898 " guestmount --fuse-help\n"
21903 #: ../fuse/guestmount.pod:123
21904 msgid "Some potentially useful FUSE options:"
21908 #: ../fuse/guestmount.pod:127
21909 msgid "B<-o allow_other>"
21913 #: ../fuse/guestmount.pod:129
21914 msgid "Allow other users to see the filesystem."
21918 #: ../fuse/guestmount.pod:131
21919 msgid "B<-o attr_timeout=N>"
21923 #: ../fuse/guestmount.pod:133
21924 msgid "Enable attribute caching by FUSE, and set the timeout to I<N> seconds."
21928 #: ../fuse/guestmount.pod:135
21929 msgid "B<-o kernel_cache>"
21933 #: ../fuse/guestmount.pod:137
21935 "Allow the kernel to cache files (reduces the number of reads that have to go "
21936 "through the L<guestfs(3)> API). This is generally a good idea if you can "
21937 "afford the extra memory usage."
21941 #: ../fuse/guestmount.pod:141
21942 msgid "B<-o uid=N> B<-o gid=N>"
21946 #: ../fuse/guestmount.pod:143
21948 "Use these options to map all UIDs and GIDs inside the guest filesystem to "
21949 "the chosen values."
21953 #: ../fuse/guestmount.pod:150
21955 "Add devices and mount everything read-only. Also disallow writes and make "
21956 "the disk appear read-only to FUSE."
21960 #: ../fuse/guestmount.pod:153
21962 "This is highly recommended if you are not going to edit the guest disk. If "
21963 "the guest is running and this option is I<not> supplied, then there is a "
21964 "strong risk of disk corruption in the guest. We try to prevent this from "
21965 "happening, but it is not always possible."
21969 #: ../fuse/guestmount.pod:160
21970 msgid "Enable SELinux support for the guest."
21974 #: ../fuse/guestmount.pod:162
21979 #: ../fuse/guestmount.pod:164
21980 msgid "Trace libguestfs calls (to stderr)."
21984 #: ../fuse/guestmount.pod:166
21985 msgid "This also stops the daemon from forking into the background."
21989 #: ../fuse/guestmount.pod:170
21990 msgid "Enable verbose messages from underlying libguestfs."
21994 #: ../fuse/guestmount.pod:174
21995 msgid "Display the program version and exit."
21999 #: ../fuse/guestmount.pod:180
22001 "L<guestfish(1)>, L<virt-inspector(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
22002 "L<virt-tar(1)>, L<guestfs(3)>, L<http://libguestfs.org/>, "
22003 "L<http://fuse.sf.net/>."
22007 #: ../inspector/virt-inspector.pl:40
22009 "virt-inspector - Display OS version, kernel, drivers, mount points, "
22010 "applications, etc. in a virtual machine"
22014 #: ../inspector/virt-inspector.pl:44
22017 " virt-inspector [--connect URI] domname\n"
22022 #: ../inspector/virt-inspector.pl:46
22025 " virt-inspector guest.img [guest.img ...]\n"
22030 #: ../inspector/virt-inspector.pl:50
22032 "B<virt-inspector> examines a virtual machine and tries to determine the "
22033 "version of the OS, the kernel version, what drivers are installed, whether "
22034 "the virtual machine is fully virtualized (FV) or para-virtualized (PV), what "
22035 "applications are installed and more."
22039 #: ../inspector/virt-inspector.pl:55
22041 "Virt-inspector can produce output in several formats, including a readable "
22042 "text report, and XML for feeding into other programs."
22046 #: ../inspector/virt-inspector.pl:58
22048 "In the normal usage, use C<virt-inspector domname> where C<domname> is the "
22049 "libvirt domain (see: C<virsh list --all>)."
22053 #: ../inspector/virt-inspector.pl:61
22055 "You can also run virt-inspector directly on disk images from a single "
22056 "virtual machine. Use C<virt-inspector guest.img>. In rare cases a domain "
22057 "has several block devices, in which case you should list them one after "
22058 "another, with the first corresponding to the guest's C</dev/sda>, the second "
22059 "to the guest's C</dev/sdb> and so on."
22063 #: ../inspector/virt-inspector.pl:67
22065 "Virt-inspector can only inspect and report upon I<one domain at a time>. To "
22066 "inspect several virtual machines, you have to run virt-inspector several "
22067 "times (for example, from a shell script for-loop)."
22071 #: ../inspector/virt-inspector.pl:72
22073 "Because virt-inspector needs direct access to guest images, it won't "
22074 "normally work over remote libvirt connections."
22078 #: ../inspector/virt-inspector.pl:85 ../tools/virt-cat.pl:90 ../tools/virt-df.pl:81 ../tools/virt-edit.pl:83 ../tools/virt-list-filesystems.pl:60 ../tools/virt-list-partitions.pl:61 ../tools/virt-ls.pl:89 ../tools/virt-make-fs.pl:163 ../tools/virt-rescue.pl:113 ../tools/virt-tar.pl:109 ../tools/virt-win-reg.pl:182
22079 msgid "Display brief help."
22083 #: ../inspector/virt-inspector.pl:91 ../tools/virt-cat.pl:96 ../tools/virt-df.pl:87 ../tools/virt-edit.pl:89 ../tools/virt-list-filesystems.pl:66 ../tools/virt-list-partitions.pl:67 ../tools/virt-ls.pl:95 ../tools/virt-make-fs.pl:169 ../tools/virt-rescue.pl:119 ../tools/virt-resize.pl:249 ../tools/virt-tar.pl:115 ../tools/virt-win-reg.pl:188
22084 msgid "B<--version>"
22088 #: ../inspector/virt-inspector.pl:93 ../tools/virt-cat.pl:98 ../tools/virt-df.pl:89 ../tools/virt-edit.pl:91 ../tools/virt-list-filesystems.pl:68 ../tools/virt-list-partitions.pl:69 ../tools/virt-ls.pl:97 ../tools/virt-make-fs.pl:171 ../tools/virt-rescue.pl:121 ../tools/virt-resize.pl:251 ../tools/virt-tar.pl:117 ../tools/virt-win-reg.pl:190
22089 msgid "Display version number and exit."
22093 #: ../inspector/virt-inspector.pl:99 ../tools/virt-cat.pl:104 ../tools/virt-df.pl:95 ../tools/virt-edit.pl:113 ../tools/virt-list-filesystems.pl:74 ../tools/virt-list-partitions.pl:75 ../tools/virt-ls.pl:103 ../tools/virt-rescue.pl:135 ../tools/virt-tar.pl:123 ../tools/virt-win-reg.pl:204
22094 msgid "B<--connect URI> | B<-c URI>"
22098 #: ../inspector/virt-inspector.pl:101 ../tools/virt-cat.pl:106 ../tools/virt-df.pl:97 ../tools/virt-edit.pl:115 ../tools/virt-list-filesystems.pl:76 ../tools/virt-list-partitions.pl:77 ../tools/virt-ls.pl:105 ../tools/virt-rescue.pl:137 ../tools/virt-tar.pl:125 ../tools/virt-win-reg.pl:206
22100 "If using libvirt, connect to the given I<URI>. If omitted, then we connect "
22101 "to the default libvirt hypervisor."
22105 #: ../inspector/virt-inspector.pl:104
22107 "Libvirt is only used if you specify a C<domname> on the command line. If "
22108 "you specify guest block devices directly, then libvirt is not used at all."
22112 #: ../inspector/virt-inspector.pl:114
22114 "The following options select the output format. Use only one of them. The "
22115 "default is a readable text report."
22119 #: ../inspector/virt-inspector.pl:119
22120 msgid "B<--text> (default)"
22124 #: ../inspector/virt-inspector.pl:121
22125 msgid "Plain text report."
22129 #: ../inspector/virt-inspector.pl:123
22134 #: ../inspector/virt-inspector.pl:125
22135 msgid "Produce no output at all."
22139 #: ../inspector/virt-inspector.pl:127
22144 #: ../inspector/virt-inspector.pl:129
22146 "If you select I<--xml> then you get XML output which can be fed to other "
22151 #: ../inspector/virt-inspector.pl:132
22156 #: ../inspector/virt-inspector.pl:134
22158 "If you select I<--yaml> then you get YAML output which can be fed to other "
22163 #: ../inspector/virt-inspector.pl:137
22168 #: ../inspector/virt-inspector.pl:139
22170 "If you select I<--perl> then you get Perl structures output which can be "
22171 "used directly in another Perl program."
22175 #: ../inspector/virt-inspector.pl:142
22180 #: ../inspector/virt-inspector.pl:144
22181 msgid "B<--ro-fish>"
22185 #: ../inspector/virt-inspector.pl:146
22187 "If you select I<--fish> then we print a L<guestfish(1)> command line which "
22188 "will automatically mount up the filesystems on the correct mount points. "
22189 "Try this for example:"
22193 #: ../inspector/virt-inspector.pl:150
22196 " guestfish $(virt-inspector --fish guest.img)\n"
22201 #: ../inspector/virt-inspector.pl:152
22203 "I<--ro-fish> is the same, but the I<--ro> option is passed to guestfish so "
22204 "that the filesystems are mounted read-only."
22208 #: ../inspector/virt-inspector.pl:155
22213 #: ../inspector/virt-inspector.pl:157
22215 "In \"query mode\" we answer common questions about the guest, such as "
22216 "whether it is fullvirt or needs a Xen hypervisor to run."
22220 #: ../inspector/virt-inspector.pl:160
22221 msgid "See section I<QUERY MODE> below."
22225 #: ../inspector/virt-inspector.pl:166
22226 msgid "B<--windows-registry>"
22230 #: ../inspector/virt-inspector.pl:168
22232 "This flag is ignored for compatibility with earlier releases of the "
22237 #: ../inspector/virt-inspector.pl:171
22239 "In this version, if L<Win::Hivex(3)> is available, then we attempt to parse "
22240 "information out of the Registry for any Windows guest."
22244 #: ../inspector/virt-inspector.pl:218
22245 msgid "OUTPUT FORMAT"
22249 #: ../inspector/virt-inspector.pl:220
22252 " Operating system(s)\n"
22253 " -------------------\n"
22254 " Linux (distro + version)\n"
22255 " Windows (version)\n"
22258 " +--- Filesystems ---------- Installed apps --- Kernel & drivers\n"
22259 " ----------- -------------- ----------------\n"
22260 " mount point => device List of apps Extra information\n"
22261 " mount point => device and versions about kernel(s)\n"
22262 " ... and drivers\n"
22263 " swap => swap device\n"
22264 " (plus lots of extra information\n"
22265 " about each filesystem)\n"
22270 #: ../inspector/virt-inspector.pl:235
22271 msgid "The output of virt-inspector is a complex two-level data structure."
22275 #: ../inspector/virt-inspector.pl:237
22277 "At the top level is a list of the operating systems installed on the guest. "
22278 "(For the vast majority of guests, only a single OS is installed.) The data "
22279 "returned for the OS includes the name (Linux, Windows), the distribution and "
22284 #: ../inspector/virt-inspector.pl:242
22285 msgid "The diagram above shows what we return for each OS."
22289 #: ../inspector/virt-inspector.pl:244
22291 "With the I<--xml> option the output is mapped into an XML document. There "
22292 "is a RELAX-NG schema for this XML in the file I<virt-inspector.rng> which "
22293 "normally ships with virt-inspector, or can be found in the source."
22297 #: ../inspector/virt-inspector.pl:249
22299 "With the I<--fish> or I<--ro-fish> option the mount points are mapped to "
22300 "L<guestfish(1)> command line parameters, so that you can go in afterwards "
22301 "and inspect the guest with everything mounted in the right place. For "
22306 #: ../inspector/virt-inspector.pl:254
22309 " guestfish $(virt-inspector --ro-fish guest.img)\n"
22310 " ==> guestfish --ro -a guest.img -m /dev/VG/LV:/ -m /dev/sda1:/boot\n"
22315 #: ../inspector/virt-inspector.pl:589
22320 #: ../inspector/virt-inspector.pl:591
22322 "When you use C<virt-inspector --query>, the output is a series of lines of "
22327 #: ../inspector/virt-inspector.pl:594
22333 " xen_pv_drivers=no\n"
22338 #: ../inspector/virt-inspector.pl:599
22340 "(each answer is usually C<yes> or C<no>, or the line is completely missing "
22341 "if we could not determine the answer at all)."
22345 #: ../inspector/virt-inspector.pl:602
22347 "If the guest is multiboot, you can get apparently conflicting answers "
22348 "(eg. C<windows=yes> and C<linux=yes>, or a guest which is both fullvirt and "
22349 "has a Xen PV kernel). This is normal, and just means that the guest can do "
22350 "both things, although it might require operator intervention such as "
22351 "selecting a boot option when the guest is booting."
22355 #: ../inspector/virt-inspector.pl:609
22356 msgid "This section describes the full range of answers possible."
22360 #: ../inspector/virt-inspector.pl:630
22361 msgid "windows=(yes|no)"
22365 #: ../inspector/virt-inspector.pl:632
22366 msgid "Answer C<yes> if Microsoft Windows is installed in the guest."
22370 #: ../inspector/virt-inspector.pl:645
22371 msgid "linux=(yes|no)"
22375 #: ../inspector/virt-inspector.pl:647
22376 msgid "Answer C<yes> if a Linux kernel is installed in the guest."
22380 #: ../inspector/virt-inspector.pl:660
22381 msgid "rhel=(yes|no)"
22385 #: ../inspector/virt-inspector.pl:662
22386 msgid "Answer C<yes> if the guest contains Red Hat Enterprise Linux."
22390 #: ../inspector/virt-inspector.pl:676
22391 msgid "fedora=(yes|no)"
22395 #: ../inspector/virt-inspector.pl:678
22396 msgid "Answer C<yes> if the guest contains the Fedora Linux distribution."
22400 #: ../inspector/virt-inspector.pl:691
22401 msgid "debian=(yes|no)"
22405 #: ../inspector/virt-inspector.pl:693
22406 msgid "Answer C<yes> if the guest contains the Debian Linux distribution."
22410 #: ../inspector/virt-inspector.pl:706
22411 msgid "fullvirt=(yes|no)"
22415 #: ../inspector/virt-inspector.pl:708
22417 "Answer C<yes> if there is at least one operating system kernel installed in "
22418 "the guest which runs fully virtualized. Such a guest would require a "
22419 "hypervisor which supports full system virtualization."
22423 #: ../inspector/virt-inspector.pl:731
22424 msgid "xen_domU_kernel=(yes|no)"
22428 #: ../inspector/virt-inspector.pl:733
22430 "Answer C<yes> if there is at least one Linux kernel installed in the guest "
22431 "which is compiled as a Xen DomU (a Xen paravirtualized guest)."
22435 #: ../inspector/virt-inspector.pl:753
22436 msgid "xen_pv_drivers=(yes|no)"
22440 #: ../inspector/virt-inspector.pl:755
22442 "Answer C<yes> if the guest has Xen paravirtualized drivers installed "
22443 "(usually the kernel itself will be fully virtualized, but the PV drivers "
22444 "have been installed by the administrator for performance reasons)."
22448 #: ../inspector/virt-inspector.pl:777
22449 msgid "virtio_drivers=(yes|no)"
22453 #: ../inspector/virt-inspector.pl:779
22455 "Answer C<yes> if the guest has virtio paravirtualized drivers installed. "
22456 "Virtio drivers are commonly used to improve the performance of KVM."
22460 #: ../inspector/virt-inspector.pl:800
22461 msgid "userspace_arch=(x86_64|...)"
22465 #: ../inspector/virt-inspector.pl:802
22466 msgid "Print the architecture of userspace."
22470 #: ../inspector/virt-inspector.pl:804 ../inspector/virt-inspector.pl:825
22471 msgid "NB. For multi-boot VMs this can print several lines."
22475 #: ../inspector/virt-inspector.pl:821
22476 msgid "kernel_arch=(x86_64|...)"
22480 #: ../inspector/virt-inspector.pl:823
22481 msgid "Print the architecture of the kernel."
22485 #: ../inspector/virt-inspector.pl:848 ../tools/virt-df.pl:484
22487 "L<guestfs(3)>, L<guestfish(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
22488 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
22492 #: ../inspector/virt-inspector.pl:857 ../tools/virt-cat.pl:175 ../tools/virt-df.pl:493 ../tools/virt-edit.pl:339 ../tools/virt-list-filesystems.pl:205 ../tools/virt-list-partitions.pl:242 ../tools/virt-ls.pl:223 ../tools/virt-make-fs.pl:554 ../tools/virt-rescue.pl:243 ../tools/virt-resize.pl:1409 ../tools/virt-tar.pl:270 ../tools/virt-win-reg.pl:489
22493 msgid "Richard W.M. Jones L<http://people.redhat.com/~rjones/>"
22497 #: ../inspector/virt-inspector.pl:859
22498 msgid "Matthew Booth L<mbooth@redhat.com>"
22502 #: ../inspector/virt-inspector.pl:863 ../tools/virt-cat.pl:179 ../tools/virt-list-filesystems.pl:209 ../tools/virt-ls.pl:227 ../tools/virt-tar.pl:274
22503 msgid "Copyright (C) 2009 Red Hat Inc."
22507 #: ../tools/virt-cat.pl:34
22508 msgid "virt-cat - Display a file in a virtual machine"
22512 #: ../tools/virt-cat.pl:38
22515 " virt-cat [--options] domname file\n"
22520 #: ../tools/virt-cat.pl:40
22523 " virt-cat [--options] disk.img [disk.img ...] file\n"
22528 #: ../tools/virt-cat.pl:44
22530 "C<virt-cat> is a command line tool to display the contents of C<file> where "
22531 "C<file> exists in the named virtual machine (or disk image)."
22535 #: ../tools/virt-cat.pl:47
22537 "C<virt-cat> can be used to quickly view a single file. To edit a file, use "
22538 "C<virt-edit>. For more complex cases you should look at the L<guestfish(1)> "
22543 #: ../tools/virt-cat.pl:53
22544 msgid "Display C</etc/fstab> file from inside the libvirt VM called C<mydomain>:"
22548 #: ../tools/virt-cat.pl:56
22551 " virt-cat mydomain /etc/fstab\n"
22556 #: ../tools/virt-cat.pl:58
22557 msgid "List syslog messages from a VM:"
22561 #: ../tools/virt-cat.pl:60
22564 " virt-cat mydomain /var/log/messages | tail\n"
22569 #: ../tools/virt-cat.pl:62
22570 msgid "Find out what DHCP IP address a VM acquired:"
22574 #: ../tools/virt-cat.pl:64
22577 " virt-cat mydomain /var/log/messages | grep 'dhclient: bound to' | tail\n"
22582 #: ../tools/virt-cat.pl:66
22583 msgid "Find out what packages were recently installed:"
22587 #: ../tools/virt-cat.pl:68
22590 " virt-cat mydomain /var/log/yum.log | tail\n"
22595 #: ../tools/virt-cat.pl:70
22596 msgid "Find out who is logged on inside a virtual machine:"
22600 #: ../tools/virt-cat.pl:72
22603 " virt-cat mydomain /var/run/utmp > /tmp/utmp\n"
22609 #: ../tools/virt-cat.pl:75
22610 msgid "or who was logged on:"
22614 #: ../tools/virt-cat.pl:77
22617 " virt-cat mydomain /var/log/wtmp > /tmp/wtmp\n"
22618 " last -f /tmp/wtmp\n"
22623 #: ../tools/virt-cat.pl:109 ../tools/virt-df.pl:100 ../tools/virt-edit.pl:118 ../tools/virt-list-filesystems.pl:79 ../tools/virt-list-partitions.pl:80 ../tools/virt-ls.pl:108 ../tools/virt-rescue.pl:140 ../tools/virt-tar.pl:128 ../tools/virt-win-reg.pl:209
22625 "If you specify guest block devices directly, then libvirt is not used at "
22630 #: ../tools/virt-cat.pl:165
22632 "L<guestfs(3)>, L<guestfish(1)>, L<virt-edit(1)>, L<Sys::Guestfs(3)>, "
22633 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
22637 #: ../tools/virt-cat.pl:173 ../tools/virt-df.pl:491 ../tools/virt-edit.pl:337 ../tools/virt-list-filesystems.pl:203 ../tools/virt-list-partitions.pl:240 ../tools/virt-ls.pl:221 ../tools/virt-make-fs.pl:552 ../tools/virt-rescue.pl:241 ../tools/virt-resize.pl:1407 ../tools/virt-tar.pl:268 ../tools/virt-win-reg.pl:487
22642 #: ../tools/virt-df.pl:36
22643 msgid "virt-df - Display free space on virtual filesystems"
22647 #: ../tools/virt-df.pl:40
22650 " virt-df [--options]\n"
22655 #: ../tools/virt-df.pl:42
22658 " virt-df [--options] domname\n"
22663 #: ../tools/virt-df.pl:44
22666 " virt-df [--options] disk.img [disk.img ...]\n"
22671 #: ../tools/virt-df.pl:48
22673 "C<virt-df> is a command line tool to display free space on virtual machine "
22674 "filesystems. Unlike other tools, it doesn't just display the amount of "
22675 "space allocated to a virtual machine, but can look inside the virtual "
22676 "machine to see how much space is really being used."
22680 #: ../tools/virt-df.pl:53
22682 "It is like the L<df(1)> command, but for virtual machines, except that it "
22683 "also works for Windows virtual machines."
22687 #: ../tools/virt-df.pl:56
22689 "If used without any arguments, C<virt-df> checks with libvirt to get a list "
22690 "of all active and inactive guests, and performs a C<df>-type operation on "
22691 "each one in turn, printing out the results."
22695 #: ../tools/virt-df.pl:60
22697 "If used with any argument(s), C<virt-df> performs a C<df>-type operation on "
22698 "either the single named libvirt domain, or on the disk image(s) listed on "
22699 "the command line (which must all belong to a single VM). In this mode (with "
22700 "arguments), C<virt-df> will I<only work for a single guest>. If you want to "
22701 "run on multiple guests, then you have to invoke C<virt-df> multiple times."
22705 #: ../tools/virt-df.pl:67
22707 "Use the C<--csv> option to get a format which can be easily parsed by other "
22708 "programs. Other options are mostly similar to standard C<df> options. See "
22709 "below for the complete list."
22713 #: ../tools/virt-df.pl:107
22718 #: ../tools/virt-df.pl:109
22720 "Write out the results in CSV format (comma-separated values). This format "
22721 "can be imported easily into databases and spreadsheets, but read L</NOTE "
22722 "ABOUT CSV FORMAT> below."
22726 #: ../tools/virt-df.pl:117
22727 msgid "B<--human-readable> | B<-h>"
22731 #: ../tools/virt-df.pl:119
22732 msgid "Print sizes in human-readable format."
22736 #: ../tools/virt-df.pl:121
22737 msgid "You are not allowed to use I<-h> and I<--csv> at the same time."
22741 #: ../tools/virt-df.pl:127
22742 msgid "B<--inodes> | B<-i>"
22746 #: ../tools/virt-df.pl:129
22747 msgid "Print inodes instead of blocks."
22751 #: ../tools/virt-df.pl:458
22752 msgid "NOTE ABOUT CSV FORMAT"
22756 #: ../tools/virt-df.pl:460
22758 "Comma-separated values (CSV) is a deceptive format. It I<seems> like it "
22759 "should be easy to parse, but it is definitely not easy to parse."
22763 #: ../tools/virt-df.pl:463
22765 "Myth: Just split fields at commas. Reality: This does I<not> work "
22766 "reliably. This example has two columns:"
22770 #: ../tools/virt-df.pl:466
22773 " \"foo,bar\",baz\n"
22778 #: ../tools/virt-df.pl:468
22780 "Myth: Read the file one line at a time. Reality: This does I<not> work "
22781 "reliably. This example has one row:"
22785 #: ../tools/virt-df.pl:471
22794 #: ../tools/virt-df.pl:474
22796 "For shell scripts, use C<csvtool> (L<http://merjis.com/developers/csv> also "
22797 "packaged in major Linux distributions)."
22801 #: ../tools/virt-df.pl:477
22803 "For other languages, use a CSV processing library (eg. C<Text::CSV> for Perl "
22804 "or Python's built-in csv library)."
22808 #: ../tools/virt-df.pl:480
22809 msgid "Most spreadsheets and databases can import CSV directly."
22813 #: ../tools/virt-df.pl:497 ../tools/virt-edit.pl:343 ../tools/virt-list-partitions.pl:246 ../tools/virt-rescue.pl:247
22814 msgid "Copyright (C) 2009-2010 Red Hat Inc."
22818 #: ../tools/virt-edit.pl:35
22819 msgid "virt-edit - Edit a file in a virtual machine"
22823 #: ../tools/virt-edit.pl:39
22826 " virt-edit [--options] domname file\n"
22831 #: ../tools/virt-edit.pl:41
22834 " virt-edit [--options] disk.img [disk.img ...] file\n"
22839 #: ../tools/virt-edit.pl:43
22842 " virt-edit [domname|disk.img] file -e 'expr'\n"
22847 #: ../tools/virt-edit.pl:47
22849 "You must I<not> use C<virt-edit> on live virtual machines. If you do this, "
22850 "you risk disk corruption in the VM. C<virt-edit> tries to stop you from "
22851 "doing this, but doesn't catch all cases."
22855 #: ../tools/virt-edit.pl:53
22857 "C<virt-edit> is a command line tool to edit C<file> where C<file> exists in "
22858 "the named virtual machine (or disk image)."
22862 #: ../tools/virt-edit.pl:56
22864 "If you want to just view a file, use L<virt-cat(1)>. For more complex cases "
22865 "you should look at the L<guestfish(1)> tool."
22869 #: ../tools/virt-edit.pl:61
22870 msgid "Edit the named files interactively:"
22874 #: ../tools/virt-edit.pl:63
22877 " virt-edit mydomain /boot/grub/grub.conf\n"
22882 #: ../tools/virt-edit.pl:65
22885 " virt-edit mydomain /etc/passwd\n"
22890 #: ../tools/virt-edit.pl:67
22892 "You can also edit files non-interactively (see L</NON-INTERACTIVE EDITING> "
22893 "below). To change the init default level to 5:"
22897 #: ../tools/virt-edit.pl:71
22900 " virt-edit mydomain /etc/inittab -e 's/^id:.*/id:5:initdefault:/'\n"
22905 #: ../tools/virt-edit.pl:97
22906 msgid "B<--backup extension> | B<-b extension>"
22910 #: ../tools/virt-edit.pl:99
22912 "Create a backup of the original file I<in the guest disk image>. The backup "
22913 "has the original filename with C<extension> added."
22917 #: ../tools/virt-edit.pl:102
22919 "Usually the first character of C<extension> would be a dot C<.> so you would "
22924 #: ../tools/virt-edit.pl:105
22927 " virt-edit -b .orig [etc]\n"
22932 #: ../tools/virt-edit.pl:107
22933 msgid "By default, no backup file is made."
22937 #: ../tools/virt-edit.pl:125
22938 msgid "B<--expr EXPR> | B<-e EXPR>"
22942 #: ../tools/virt-edit.pl:127
22944 "Instead of launching the external editor, non-interactively apply the Perl "
22945 "expression C<EXPR> to each line in the file. See L</NON-INTERACTIVE "
22950 #: ../tools/virt-edit.pl:131
22952 "Be careful to properly quote the expression to prevent it from being altered "
22957 #: ../tools/virt-edit.pl:250
22958 msgid "NON-INTERACTIVE EDITING"
22962 #: ../tools/virt-edit.pl:252
22964 "C<virt-edit> normally calls out to C<$EDITOR> (or vi) so the system "
22965 "administrator can interactively edit the file."
22969 #: ../tools/virt-edit.pl:255
22971 "There are two ways also to use C<virt-edit> from scripts in order to make "
22972 "automated edits to files. (Note that although you I<can> use C<virt-edit> "
22973 "like this, it's less error-prone to write scripts directly using the "
22974 "libguestfs API and Augeas for configuration file editing.)"
22978 #: ../tools/virt-edit.pl:261
22980 "The first method is to temporarily set C<$EDITOR> to any script or program "
22981 "you want to run. The script is invoked as C<$EDITOR tmpfile> and it should "
22982 "update C<tmpfile> in place however it likes."
22986 #: ../tools/virt-edit.pl:265
22988 "The second method is to use the C<-e> parameter of C<virt-edit> to run a "
22989 "short Perl snippet in the style of L<sed(1)>. For example to replace all "
22990 "instances of C<foo> with C<bar> in a file:"
22994 #: ../tools/virt-edit.pl:269
22997 " virt-edit domname filename -e 's/foo/bar/'\n"
23002 #: ../tools/virt-edit.pl:271
23004 "The full power of Perl regular expressions can be used (see L<perlre(1)>). "
23005 "For example to delete root's password you could do:"
23009 #: ../tools/virt-edit.pl:274
23012 " virt-edit domname /etc/passwd -e 's/^root:.*?:/root::/'\n"
23017 #: ../tools/virt-edit.pl:276
23019 "What really happens is that the snippet is evaluated as a Perl expression "
23020 "for each line of the file. The line, including the final C<\\n>, is passed "
23021 "in C<$_> and the expression should update C<$_> or leave it unchanged."
23025 #: ../tools/virt-edit.pl:281
23027 "To delete a line, set C<$_> to the empty string. For example, to delete the "
23028 "C<apache> user account from the password file you can do:"
23032 #: ../tools/virt-edit.pl:284
23035 " virt-edit mydomain /etc/passwd -e '$_ = \"\" if /^apache:/'\n"
23040 #: ../tools/virt-edit.pl:286
23042 "To insert a line, prepend or append it to C<$_>. However appending lines to "
23043 "the end of the file is rather difficult this way since there is no concept "
23044 "of \"last line of the file\" - your expression just doesn't get called "
23045 "again. You might want to use the first method (setting C<$EDITOR>) if you "
23050 #: ../tools/virt-edit.pl:292
23052 "The variable C<$lineno> contains the current line number. As is "
23053 "traditional, the first line in the file is number C<1>."
23057 #: ../tools/virt-edit.pl:295
23059 "The return value from the expression is ignored, but the expression may call "
23060 "C<die> in order to abort the whole program, leaving the original file "
23065 #: ../tools/virt-edit.pl:299
23067 "Remember when matching the end of a line that C<$_> may contain the final "
23068 "C<\\n>, or (for DOS files) C<\\r\\n>, or if the file does not end with a "
23069 "newline then neither of these. Thus to match or substitute some text at the "
23070 "end of a line, use this regular expression:"
23074 #: ../tools/virt-edit.pl:304
23077 " /some text(\\r?\\n)?$/\n"
23082 #: ../tools/virt-edit.pl:306
23084 "Alternately, use the perl C<chomp> function, being careful not to chomp "
23085 "C<$_> itself (since that would remove all newlines from the file):"
23089 #: ../tools/virt-edit.pl:310
23092 " my $m = $_; chomp $m; $m =~ /some text$/\n"
23097 #: ../tools/virt-edit.pl:316
23102 #: ../tools/virt-edit.pl:318
23104 "If set, this string is used as the editor. It may contain arguments, "
23105 "eg. C<\"emacs -nw\">"
23109 #: ../tools/virt-edit.pl:321
23110 msgid "If not set, C<vi> is used."
23114 #: ../tools/virt-edit.pl:327
23116 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
23117 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>, "
23118 "L<perl(1)>, L<perlre(1)>."
23122 #: ../tools/virt-list-filesystems.pl:32
23123 msgid "virt-list-filesystems - List filesystems in a virtual machine or disk image"
23127 #: ../tools/virt-list-filesystems.pl:36
23130 " virt-list-filesystems [--options] domname\n"
23135 #: ../tools/virt-list-filesystems.pl:38
23138 " virt-list-filesystems [--options] disk.img [disk.img ...]\n"
23143 #: ../tools/virt-list-filesystems.pl:42
23145 "C<virt-list-filesystems> is a command line tool to list the filesystems that "
23146 "are contained in a virtual machine or disk image."
23150 #: ../tools/virt-list-filesystems.pl:46
23152 "C<virt-list-filesystems> is just a simple wrapper around L<libguestfs(3)> "
23153 "functionality. For more complex cases you should look at the "
23154 "L<guestfish(1)> tool."
23158 #: ../tools/virt-list-filesystems.pl:86 ../tools/virt-list-partitions.pl:95 ../tools/virt-ls.pl:115
23159 msgid "B<-l> | B<--long>"
23163 #: ../tools/virt-list-filesystems.pl:88
23165 "With this option, C<virt-list-filesystems> displays the type of each "
23166 "filesystem too (where \"type\" means C<ext3>, C<xfs> etc.)"
23170 #: ../tools/virt-list-filesystems.pl:95
23171 msgid "B<-a> | B<--all>"
23175 #: ../tools/virt-list-filesystems.pl:97
23177 "Normally we only show mountable filesystems. If this option is given then "
23178 "swap devices are shown too."
23182 #: ../tools/virt-list-filesystems.pl:193
23184 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
23185 "L<virt-list-partitions(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
23186 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
23190 #: ../tools/virt-list-partitions.pl:32
23191 msgid "virt-list-partitions - List partitions in a virtual machine or disk image"
23195 #: ../tools/virt-list-partitions.pl:36
23198 " virt-list-partitions [--options] domname\n"
23203 #: ../tools/virt-list-partitions.pl:38
23206 " virt-list-partitions [--options] disk.img [disk.img ...]\n"
23211 #: ../tools/virt-list-partitions.pl:42
23213 "C<virt-list-partitions> is a command line tool to list the partitions that "
23214 "are contained in a virtual machine or disk image. It is mainly useful as a "
23215 "first step to using L<virt-resize(1)>."
23219 #: ../tools/virt-list-partitions.pl:47
23221 "C<virt-list-partitions> is just a simple wrapper around L<libguestfs(3)> "
23222 "functionality. For more complex cases you should look at the "
23223 "L<guestfish(1)> tool."
23227 #: ../tools/virt-list-partitions.pl:87
23228 msgid "B<-h> | B<--human-readable>"
23232 #: ../tools/virt-list-partitions.pl:89
23233 msgid "Show sizes in human-readable form (eg. \"1G\")."
23237 #: ../tools/virt-list-partitions.pl:97
23239 "With this option, C<virt-list-partitions> displays the type and size of each "
23240 "partition too (where \"type\" means C<ext3>, C<pv> etc.)"
23244 #: ../tools/virt-list-partitions.pl:104
23245 msgid "B<-t> | B<--total>"
23249 #: ../tools/virt-list-partitions.pl:106
23250 msgid "Display the total size of each block device (as a separate row or rows)."
23254 #: ../tools/virt-list-partitions.pl:231
23256 "L<guestfs(3)>, L<guestfish(1)>, L<virt-list-filesystems(1)>, "
23257 "L<virt-resize(1)>, L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, "
23258 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
23262 #: ../tools/virt-ls.pl:35
23263 msgid "virt-ls - List files in a virtual machine"
23267 #: ../tools/virt-ls.pl:39
23270 " virt-ls [--options] domname directory\n"
23275 #: ../tools/virt-ls.pl:41
23278 " virt-ls [--options] disk.img [disk.img ...] directory\n"
23283 #: ../tools/virt-ls.pl:45
23285 "C<virt-ls> is a command line tool to list the names of files in a directory "
23286 "inside a virtual machine or disk image."
23290 #: ../tools/virt-ls.pl:48
23292 "C<virt-ls> is just a simple wrapper around L<libguestfs(3)> functionality. "
23293 "For more complex cases you should look at the L<guestfish(1)> tool."
23297 #: ../tools/virt-ls.pl:52
23299 "C<virt-ls> can be used in one of three modes: simple, long and recursive. A "
23300 "simple listing is like the ordinary L<ls(1)> command:"
23304 #: ../tools/virt-ls.pl:55
23307 " $ virt-ls myguest /\n"
23315 #: ../tools/virt-ls.pl:60
23316 msgid "With the C<-l> (C<--long>) option, C<virt-ls> shows more detail:"
23320 #: ../tools/virt-ls.pl:62
23323 " $ virt-ls -l myguest /\n"
23325 " dr-xr-xr-x. 2 root root 4096 2009-08-25 19:06 bin\n"
23326 " dr-xr-xr-x. 5 root root 3072 2009-08-25 19:06 boot\n"
23332 #: ../tools/virt-ls.pl:68
23334 "With the C<-R> (C<--recursive>) option, C<virt-ls> lists the names of files "
23335 "and directories recursively:"
23339 #: ../tools/virt-ls.pl:71
23342 " $ virt-ls -R myguest /tmp\n"
23350 #: ../tools/virt-ls.pl:76
23352 "You I<cannot> combine these options. To do more complicated things, use "
23357 #: ../tools/virt-ls.pl:117
23358 msgid "B<-R> | B<--recursive>"
23362 #: ../tools/virt-ls.pl:119
23364 "Select the mode. With neither of these options, C<virt-ls> produces a "
23365 "simple, flat list of the files in the named directory."
23369 #: ../tools/virt-ls.pl:122
23371 "C<virt-ls -l> produces a \"long listing\", which shows more detail (just "
23372 "like the plain C<ls -l> command)."
23376 #: ../tools/virt-ls.pl:125
23378 "C<virt-ls -R> produces a recursive list of files starting at the named "
23379 "directory. See the documentation for the C<guestfs_find> command "
23380 "L<guestfs(3)> for precise details."
23384 #: ../tools/virt-ls.pl:129
23385 msgid "You cannot combine these options."
23389 #: ../tools/virt-ls.pl:212
23391 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-tar(1)>, "
23392 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
23393 "L<http://libguestfs.org/>."
23397 #: ../tools/virt-make-fs.pl:37
23398 msgid "virt-make-fs - Make a filesystem from a tar archive or files"
23402 #: ../tools/virt-make-fs.pl:41
23405 " virt-make-fs [--options] input.tar output.img\n"
23410 #: ../tools/virt-make-fs.pl:43
23413 " virt-make-fs [--options] input.tar.gz output.img\n"
23418 #: ../tools/virt-make-fs.pl:45
23421 " virt-make-fs [--options] directory output.img\n"
23426 #: ../tools/virt-make-fs.pl:49
23428 "Virt-make-fs is a command line tool for creating a filesystem from a tar "
23429 "archive or some files in a directory. It is similar to tools like "
23430 "L<mkisofs(1)>, L<genisoimage(1)> and L<mksquashfs(1)>. Unlike those tools, "
23431 "it can create common filesystem types like ext2/3 or NTFS, which can be "
23432 "useful if you want to attach these filesystems to existing virtual machines "
23433 "(eg. to import large amounts of read-only data to a VM)."
23437 #: ../tools/virt-make-fs.pl:57
23438 msgid "Basic usage is:"
23442 #: ../tools/virt-make-fs.pl:59
23445 " virt-make-fs input output\n"
23450 #: ../tools/virt-make-fs.pl:61
23452 "where C<input> is either a directory containing files that you want to add, "
23453 "or a tar archive (either uncompressed tar or gzip-compressed tar); and "
23454 "C<output> is a disk image. The input type is detected automatically. The "
23455 "output disk image defaults to a raw ext2 image unless you specify extra "
23456 "flags (see L</OPTIONS> below)."
23460 #: ../tools/virt-make-fs.pl:67
23461 msgid "EXTRA SPACE"
23465 #: ../tools/virt-make-fs.pl:69
23467 "Unlike formats such as tar and squashfs, a filesystem does not \"just fit\" "
23468 "the files that it contains, but might have extra space. Depending on how "
23469 "you are going to use the output, you might think this extra space is wasted "
23470 "and want to minimize it, or you might want to leave space so that more files "
23471 "can be added later. Virt-make-fs defaults to minimizing the extra space, "
23472 "but you can use the C<--size> flag to leave space in the filesystem if you "
23477 #: ../tools/virt-make-fs.pl:77
23479 "An alternative way to leave extra space but not make the output image any "
23480 "bigger is to use an alternative disk image format (instead of the default "
23481 "\"raw\" format). Using C<--format=qcow2> will use the native QEmu/KVM qcow2 "
23482 "image format (check your hypervisor supports this before using it). This "
23483 "allows you to choose a large C<--size> but the extra space won't actually be "
23484 "allocated in the image until you try to store something in it."
23488 #: ../tools/virt-make-fs.pl:85
23490 "Don't forget that you can also use local commands including L<resize2fs(8)> "
23491 "and L<virt-resize(1)> to resize existing filesystems, or rerun "
23492 "virt-make-resize to build another image from scratch."
23496 #: ../tools/virt-make-fs.pl:89 ../tools/virt-make-fs.pl:123 ../tools/virt-make-fs.pl:142
23501 #: ../tools/virt-make-fs.pl:91
23504 " virt-make-fs --format=qcow2 --size=+200M input output.img\n"
23509 #: ../tools/virt-make-fs.pl:93
23510 msgid "FILESYSTEM TYPE"
23514 #: ../tools/virt-make-fs.pl:95
23516 "The default filesystem type is C<ext2>. Just about any filesystem type that "
23517 "libguestfs supports can be used (but I<not> read-only formats like "
23518 "ISO9660). Here are some of the more common choices:"
23522 #: ../tools/virt-make-fs.pl:101
23527 #: ../tools/virt-make-fs.pl:103
23529 "Note that ext3 filesystems contain a journal, typically 1-32 MB in size. If "
23530 "you are not going to use the filesystem in a way that requires the journal, "
23531 "then this is just wasted overhead."
23535 #: ../tools/virt-make-fs.pl:107
23536 msgid "I<ntfs> or I<vfat>"
23540 #: ../tools/virt-make-fs.pl:109
23541 msgid "Useful if exporting data to a Windows guest."
23545 #: ../tools/virt-make-fs.pl:111
23547 "I<Note for vfat>: The tar archive or local directory must only contain files "
23548 "which are owned by root (ie. UID:GID = 0:0). The reason is that the tar "
23549 "program running within libguestfs is unable to change the ownership of "
23550 "non-root files, since vfat itself does not support this."
23554 #: ../tools/virt-make-fs.pl:116
23559 #: ../tools/virt-make-fs.pl:118
23561 "Lower overhead than C<ext2>, but certain limitations on filename length and "
23562 "total filesystem size."
23566 #: ../tools/virt-make-fs.pl:125
23569 " virt-make-fs --type=minix input minixfs.img\n"
23574 #: ../tools/virt-make-fs.pl:127
23575 msgid "TO PARTITION OR NOT TO PARTITION"
23579 #: ../tools/virt-make-fs.pl:129
23580 msgid "Optionally virt-make-fs can add a partition table to the output disk."
23584 #: ../tools/virt-make-fs.pl:131
23586 "Adding a partition can make the disk image more compatible with certain "
23587 "virtualized operating systems which don't expect to see a filesystem "
23588 "directly located on a block device (Linux doesn't care and will happily "
23589 "handle both types)."
23593 #: ../tools/virt-make-fs.pl:136
23595 "On the other hand, if you have a partition table then the output image is no "
23596 "longer a straight filesystem. For example you cannot run L<fsck(8)> "
23597 "directly on a partitioned disk image. (However libguestfs tools such as "
23598 "L<guestfish(1)> and L<virt-resize(1)> can still be used)."
23602 #: ../tools/virt-make-fs.pl:144
23603 msgid "Add an MBR partition:"
23607 #: ../tools/virt-make-fs.pl:146
23610 " virt-make-fs --partition -- input disk.img\n"
23615 #: ../tools/virt-make-fs.pl:148
23617 "If the output disk image could be terabyte-sized or larger, it's better to "
23618 "use an EFI/GPT-compatible partition table:"
23622 #: ../tools/virt-make-fs.pl:151
23625 " virt-make-fs --partition=gpt --size=+4T --format=qcow2 input disk.img\n"
23630 #: ../tools/virt-make-fs.pl:177 ../tools/virt-win-reg.pl:196
23635 #: ../tools/virt-make-fs.pl:179
23636 msgid "Enable debugging information."
23640 #: ../tools/virt-make-fs.pl:185
23641 msgid "B<--size=E<lt>NE<gt>>"
23645 #: ../tools/virt-make-fs.pl:187
23646 msgid "B<--size=+E<lt>NE<gt>>"
23650 #: ../tools/virt-make-fs.pl:189
23651 msgid "B<-s E<lt>NE<gt>>"
23655 #: ../tools/virt-make-fs.pl:191
23656 msgid "B<-s +E<lt>NE<gt>>"
23660 #: ../tools/virt-make-fs.pl:193
23661 msgid "Use the C<--size> (or C<-s>) option to choose the size of the output image."
23665 #: ../tools/virt-make-fs.pl:196
23667 "If this option is I<not> given, then the output image will be just large "
23668 "enough to contain all the files, with not much wasted space."
23672 #: ../tools/virt-make-fs.pl:199
23674 "To choose a fixed size output disk, specify an absolute number followed by "
23675 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
23676 "Petabytes or Exabytes. This must be large enough to contain all the input "
23677 "files, else you will get an error."
23681 #: ../tools/virt-make-fs.pl:204
23683 "To leave extra space, specify C<+> (plus sign) and a number followed by "
23684 "b/K/M/G/T/P/E to mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, "
23685 "Petabytes or Exabytes. For example: C<--size=+200M> means enough space for "
23686 "the input files, and (approximately) an extra 200 MB free space."
23690 #: ../tools/virt-make-fs.pl:210
23692 "Note that virt-make-fs estimates free space, and therefore will not produce "
23693 "filesystems containing precisely the free space requested. (It is much more "
23694 "expensive and time-consuming to produce a filesystem which has precisely the "
23695 "desired free space)."
23699 #: ../tools/virt-make-fs.pl:219
23700 msgid "B<--format=E<lt>fmtE<gt>>"
23704 #: ../tools/virt-make-fs.pl:221
23705 msgid "B<-F E<lt>fmtE<gt>>"
23709 #: ../tools/virt-make-fs.pl:223
23710 msgid "Choose the output disk image format."
23714 #: ../tools/virt-make-fs.pl:225
23715 msgid "The default is C<raw> (raw disk image)."
23719 #: ../tools/virt-make-fs.pl:227
23721 "For other choices, see the L<qemu-img(1)> manpage. The only other choice "
23722 "that would really make sense here is C<qcow2>."
23726 #: ../tools/virt-make-fs.pl:234
23727 msgid "B<--type=E<lt>fsE<gt>>"
23731 #: ../tools/virt-make-fs.pl:236
23732 msgid "B<-t E<lt>fsE<gt>>"
23736 #: ../tools/virt-make-fs.pl:238
23737 msgid "Choose the output filesystem type."
23741 #: ../tools/virt-make-fs.pl:240
23742 msgid "The default is C<ext2>."
23746 #: ../tools/virt-make-fs.pl:242
23747 msgid "Any filesystem which is supported read-write by libguestfs can be used here."
23751 #: ../tools/virt-make-fs.pl:249
23752 msgid "B<--partition>"
23756 #: ../tools/virt-make-fs.pl:251
23757 msgid "B<--partition=E<lt>parttypeE<gt>>"
23761 #: ../tools/virt-make-fs.pl:253
23763 "If specified, this flag adds an MBR partition table to the output disk "
23768 #: ../tools/virt-make-fs.pl:256
23770 "You can change the partition table type, eg. C<--partition=gpt> for large "
23775 #: ../tools/virt-make-fs.pl:259
23777 "Note that if you just use a lonesome C<--partition>, the Perl option parser "
23778 "might consider the next parameter to be the partition type. For example:"
23782 #: ../tools/virt-make-fs.pl:263
23785 " virt-make-fs --partition input.tar ...\n"
23790 #: ../tools/virt-make-fs.pl:265
23792 "would cause virt-make-fs to think you wanted to use a partition type of "
23793 "C<input.tar> which is completely wrong. To avoid this, use C<--> (a double "
23794 "dash) between options and the input file argument:"
23798 #: ../tools/virt-make-fs.pl:269
23801 " virt-make-fs --partition -- input.tar ...\n"
23806 #: ../tools/virt-make-fs.pl:529
23808 "L<guestfish(1)>, L<virt-resize(1)>, L<virt-tar(1)>, L<mkisofs(1)>, "
23809 "L<genisoimage(1)>, L<mksquashfs(1)>, L<mke2fs(8)>, L<resize2fs(8)>, "
23810 "L<guestfs(3)>, L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
23814 #: ../tools/virt-make-fs.pl:543 ../tools/virt-win-reg.pl:478
23816 "When reporting bugs, please enable debugging and capture the I<complete> "
23821 #: ../tools/virt-make-fs.pl:546
23824 " export LIBGUESTFS_DEBUG=1\n"
23825 " virt-make-fs --debug [...] > /tmp/virt-make-fs.log 2>&1\n"
23830 #: ../tools/virt-make-fs.pl:549
23832 "Attach /tmp/virt-make-fs.log to a new bug report at "
23833 "L<https://bugzilla.redhat.com/>"
23837 #: ../tools/virt-make-fs.pl:558 ../tools/virt-resize.pl:1413 ../tools/virt-win-reg.pl:493
23838 msgid "Copyright (C) 2010 Red Hat Inc."
23842 #: ../tools/virt-rescue.pl:33
23843 msgid "virt-rescue - Run a rescue shell on a virtual machine"
23847 #: ../tools/virt-rescue.pl:37
23850 " virt-rescue [--options] domname\n"
23855 #: ../tools/virt-rescue.pl:39
23858 " virt-rescue [--options] disk.img [disk.img ...]\n"
23863 #: ../tools/virt-rescue.pl:43
23865 "You must I<not> use C<virt-rescue> on live virtual machines. Doing so will "
23866 "probably result in disk corruption in the VM. C<virt-rescue> tries to stop "
23867 "you from doing this, but doesn't catch all cases."
23871 #: ../tools/virt-rescue.pl:47
23873 "However if you use the I<--ro> (read only) option, then you can attach a "
23874 "shell to a live virtual machine. The results might be strange or "
23875 "inconsistent at times but you won't get disk corruption."
23879 #: ../tools/virt-rescue.pl:53
23881 "virt-rescue is like a Rescue CD, but for virtual machines, and without the "
23882 "need for a CD. virt-rescue gives you a rescue shell and some simple "
23883 "recovery tools which you can use to examine or rescue a virtual machine or "
23888 #: ../tools/virt-rescue.pl:58
23890 "You can run virt-rescue on any virtual machine known to libvirt, or directly "
23891 "on disk image(s):"
23895 #: ../tools/virt-rescue.pl:61
23898 " virt-rescue GuestName\n"
23903 #: ../tools/virt-rescue.pl:63
23906 " virt-rescue --ro /path/to/disk.img\n"
23911 #: ../tools/virt-rescue.pl:65
23914 " virt-rescue /dev/sdc\n"
23919 #: ../tools/virt-rescue.pl:67
23920 msgid "For live VMs you I<must> use the --ro option."
23924 #: ../tools/virt-rescue.pl:69
23926 "When you run virt-rescue on a virtual machine or disk image, you are placed "
23927 "in an interactive bash shell where you can use many ordinary Linux "
23928 "commands. What you see in C</> (C</bin>, C</lib> etc) is the rescue "
23929 "appliance. You must mount the virtual machine's filesystems by hand. There "
23930 "is an empty directory called C</sysroot> where you can mount filesystems."
23934 #: ../tools/virt-rescue.pl:76
23936 "In the example below, we list logical volumes, then choose one to mount "
23937 "under C</sysroot>:"
23941 #: ../tools/virt-rescue.pl:79
23945 " LV VG Attr LSize Origin Snap% Move Log Copy% Convert\n"
23946 " lv_root vg_f11x64 -wi-a- 8.83G\n"
23947 " lv_swap vg_f11x64 -wi-a- 992.00M\n"
23948 " ><rescue> mount /dev/vg_f11x64/lv_root /sysroot\n"
23949 " ><rescue> ls /sysroot\n"
23954 #: ../tools/virt-rescue.pl:86
23956 "If you don't know what filesystems are available on the virtual machine then "
23957 "you can use commands such as L<parted(8)> and L<lvs(8)> to find out."
23961 #: ../tools/virt-rescue.pl:90 ../tools/virt-resize.pl:1350
23966 #: ../tools/virt-rescue.pl:92
23968 "Virt-rescue can be used on I<any> disk image file or device, not just a "
23969 "virtual machine. For example you can use it on a blank file if you want to "
23970 "partition that file (although we would recommend using L<guestfish(1)> "
23971 "instead as it is more suitable for this purpose). You can even use "
23972 "virt-rescue on things like SD cards."
23976 #: ../tools/virt-rescue.pl:98
23978 "This tool is just designed for quick interactive hacking on a virtual "
23979 "machine. For more structured access to a virtual machine disk image, you "
23980 "should use L<guestfs(3)>. To get a structured shell that you can use to "
23981 "make scripted changes to guests, use L<guestfish(1)>."
23985 #: ../tools/virt-rescue.pl:127
23986 msgid "B<--append kernelopts>"
23990 #: ../tools/virt-rescue.pl:129
23991 msgid "Pass additional options to the rescue kernel."
23995 #: ../tools/virt-rescue.pl:147
23996 msgid "B<--memsize MB> | B<-m MB>"
24000 #: ../tools/virt-rescue.pl:149
24002 "Change the amount of memory allocated to the rescue system. The default is "
24003 "set by libguestfs and is small but adequate for running system tools. The "
24004 "occasional program might need more memory. The parameter is specified in "
24009 #: ../tools/virt-rescue.pl:158
24010 msgid "B<--ro> | B<-r>"
24014 #: ../tools/virt-rescue.pl:160
24015 msgid "Open the image read-only."
24019 #: ../tools/virt-rescue.pl:172
24021 "Enable SELinux in the rescue appliance. You should read "
24022 "L<guestfs(3)/SELINUX> before using this option."
24026 #: ../tools/virt-rescue.pl:228
24028 "Several environment variables affect virt-rescue. See "
24029 "L<guestfs(3)/ENVIRONMENT VARIABLES> for the complete list."
24033 #: ../tools/virt-rescue.pl:233
24035 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
24036 "L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, L<http://libguestfs.org/>."
24040 #: ../tools/virt-resize.pl:42
24041 msgid "virt-resize - Resize a virtual machine disk"
24045 #: ../tools/virt-resize.pl:46
24048 " virt-resize [--resize /dev/sdaN=[+/-]<size>[%]]\n"
24049 " [--expand /dev/sdaN] [--shrink /dev/sdaN]\n"
24050 " [--ignore /dev/sdaN] [--delete /dev/sdaN] [...] indisk outdisk\n"
24055 #: ../tools/virt-resize.pl:52
24057 "Virt-resize is a tool which can resize a virtual machine disk, making it "
24058 "larger or smaller overall, and resizing or deleting any partitions contained "
24063 #: ../tools/virt-resize.pl:56
24065 "Virt-resize B<cannot> resize disk images in-place. Virt-resize B<should "
24066 "not> be used on live virtual machines - for consistent results, shut the "
24067 "virtual machine down before resizing it."
24071 #: ../tools/virt-resize.pl:60
24073 "If you are not familiar with the associated tools: "
24074 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)> and L<virt-df(1)>, "
24075 "we recommend you go and read those manual pages first."
24079 #: ../tools/virt-resize.pl:68
24081 "Copy C<olddisk> to C<newdisk>, extending one of the guest's partitions to "
24082 "fill the extra 5GB of space."
24086 #: ../tools/virt-resize.pl:71
24089 " truncate -r olddisk newdisk; truncate -s +5G newdisk\n"
24090 " virt-list-partitions -lht olddisk\n"
24091 " # Note \"/dev/sda2\" is a partition inside the \"olddisk\" file.\n"
24092 " virt-resize --expand /dev/sda2 olddisk newdisk\n"
24097 #: ../tools/virt-resize.pl:76
24099 "As above, but make the /boot partition 200MB bigger, while giving the "
24100 "remaining space to /dev/sda2:"
24104 #: ../tools/virt-resize.pl:79
24107 " virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 olddisk newdisk\n"
24112 #: ../tools/virt-resize.pl:81
24113 msgid "DETAILED USAGE"
24117 #: ../tools/virt-resize.pl:83
24118 msgid "EXPANDING A VIRTUAL MACHINE DISK"
24122 #: ../tools/virt-resize.pl:87
24123 msgid "1. Shut down the virtual machine"
24127 #: ../tools/virt-resize.pl:89
24128 msgid "2. Locate input disk image"
24132 #: ../tools/virt-resize.pl:91
24134 "Locate the input disk image (ie. the file or device on the host containing "
24135 "the guest's disk). If the guest is managed by libvirt, you can use C<virsh "
24136 "dumpxml> like this to find the disk image name:"
24140 #: ../tools/virt-resize.pl:95
24143 " # virsh dumpxml guestname | xpath /domain/devices/disk/source\n"
24144 " Found 1 nodes:\n"
24146 " <source dev=\"/dev/vg/lv_guest\" />\n"
24151 #: ../tools/virt-resize.pl:100
24152 msgid "3. Look at current sizing"
24156 #: ../tools/virt-resize.pl:102
24157 msgid "Use L<virt-list-partitions(1)> to display the current partitions and sizes:"
24161 #: ../tools/virt-resize.pl:105
24164 " # virt-list-partitions -lht /dev/vg/lv_guest\n"
24165 " /dev/sda1 ext3 101.9M\n"
24166 " /dev/sda2 pv 7.9G\n"
24167 " /dev/sda device 8.0G\n"
24172 #: ../tools/virt-resize.pl:110
24174 "(This example is a virtual machine with an 8 GB disk which we would like to "
24175 "expand up to 10 GB)."
24179 #: ../tools/virt-resize.pl:113
24180 msgid "4. Create output disk"
24184 #: ../tools/virt-resize.pl:115
24186 "Virt-resize cannot do in-place disk modifications. You have to have space "
24187 "to store the resized output disk."
24191 #: ../tools/virt-resize.pl:118
24192 msgid "To store the resized disk image in a file, create a file of a suitable size:"
24196 #: ../tools/virt-resize.pl:121
24199 " # rm -f outdisk\n"
24200 " # truncate -s 10G outdisk\n"
24205 #: ../tools/virt-resize.pl:124
24206 msgid "Or use L<lvcreate(1)> to create a logical volume:"
24210 #: ../tools/virt-resize.pl:126
24213 " # lvcreate -L 10G -n lv_name vg_name\n"
24218 #: ../tools/virt-resize.pl:128
24219 msgid "Or use L<virsh(1)> vol-create-as to create a libvirt storage volume:"
24223 #: ../tools/virt-resize.pl:130
24226 " # virsh pool-list\n"
24227 " # virsh vol-create-as poolname newvol 10G\n"
24232 #: ../tools/virt-resize.pl:133
24237 #: ../tools/virt-resize.pl:135
24239 "virt-resize takes two mandatory parameters, the input disk (eg. device or "
24240 "file) and the output disk. The output disk is the one created in the "
24245 #: ../tools/virt-resize.pl:139
24248 " # virt-resize indisk outdisk\n"
24253 #: ../tools/virt-resize.pl:141
24255 "This command just copies disk image C<indisk> to disk image C<outdisk> "
24256 "I<without> resizing or changing any existing partitions. If C<outdisk> is "
24257 "larger, then an extra, empty partition is created at the end of the disk "
24258 "covering the extra space. If C<outdisk> is smaller, then it will give an "
24263 #: ../tools/virt-resize.pl:147
24265 "More realistically you'd want to expand existing partitions in the disk "
24266 "image by passing extra options (for the full list see the L</OPTIONS> "
24271 #: ../tools/virt-resize.pl:151
24273 "L</--expand> is the most useful option. It expands the named partition "
24274 "within the disk to fill any extra space:"
24278 #: ../tools/virt-resize.pl:154
24281 " # virt-resize --expand /dev/sda2 indisk outdisk\n"
24286 #: ../tools/virt-resize.pl:156
24288 "(In this case, an extra partition is I<not> created at the end of the disk, "
24289 "because there will be no unused space)."
24293 #: ../tools/virt-resize.pl:159
24295 "L</--resize> is the other commonly used option. The following would "
24296 "increase the size of /dev/sda1 by 200M, and expand /dev/sda2 to fill the "
24297 "rest of the available space:"
24301 #: ../tools/virt-resize.pl:163
24304 " # virt-resize --resize /dev/sda1=+200M --expand /dev/sda2 \\\n"
24305 " indisk outdisk\n"
24310 #: ../tools/virt-resize.pl:166
24312 "If the expanded partition in the image contains a filesystem or LVM PV, then "
24313 "if virt-resize knows how, it will resize the contents, the equivalent of "
24314 "calling a command such as L<pvresize(8)>, L<resize2fs(8)> or "
24315 "L<ntfsresize(8)>. However virt-resize does not know how to resize some "
24316 "filesystems, so you would have to online resize them after booting the "
24317 "guest. And virt-resize also does not resize anything inside an LVM PV, it "
24318 "just resizes the PV itself and leaves the user to resize any LVs inside that "
24323 #: ../tools/virt-resize.pl:175
24324 msgid "Other options are covered below."
24328 #: ../tools/virt-resize.pl:177
24333 #: ../tools/virt-resize.pl:179
24334 msgid "Thoroughly test the new disk image I<before> discarding the old one."
24338 #: ../tools/virt-resize.pl:181
24339 msgid "If you are using libvirt, edit the XML to point at the new disk:"
24343 #: ../tools/virt-resize.pl:183
24346 " # virsh edit guestname\n"
24351 #: ../tools/virt-resize.pl:185
24353 "Change E<lt>source ...E<gt>, see "
24354 "L<http://libvirt.org/formatdomain.html#elementsDisks>"
24358 #: ../tools/virt-resize.pl:188
24359 msgid "Then start up the domain with the new, resized disk:"
24363 #: ../tools/virt-resize.pl:190
24366 " # virsh start guestname\n"
24371 #: ../tools/virt-resize.pl:192
24373 "and check that it still works. See also the L</NOTES> section below for "
24374 "additional information."
24378 #: ../tools/virt-resize.pl:195
24379 msgid "7. Resize LVs etc inside the guest"
24383 #: ../tools/virt-resize.pl:197
24384 msgid "(This can also be done offline using L<guestfish(1)>)"
24388 #: ../tools/virt-resize.pl:199
24390 "Once the guest has booted you should see the new space available, at least "
24391 "for filesystems that virt-resize knows how to resize, and for PVs. The user "
24392 "may need to resize LVs inside PVs, and also resize filesystem types that "
24393 "virt-resize does not know how to expand."
24397 #: ../tools/virt-resize.pl:206
24398 msgid "SHRINKING A VIRTUAL MACHINE DISK"
24402 #: ../tools/virt-resize.pl:208
24404 "Shrinking is somewhat more complex than expanding, and only an overview is "
24409 #: ../tools/virt-resize.pl:211
24411 "Firstly virt-resize will not attempt to shrink any partition content (PVs, "
24412 "filesystems). The user has to shrink content before passing the disk image "
24413 "to virt-resize, and virt-resize will check that the content has been shrunk "
24418 #: ../tools/virt-resize.pl:216
24419 msgid "(Shrinking can also be done offline using L<guestfish(1)>)"
24423 #: ../tools/virt-resize.pl:218
24425 "After shrinking PVs and filesystems, shut down the guest, and proceed with "
24426 "steps 3 and 4 above to allocate a new disk image."
24430 #: ../tools/virt-resize.pl:221
24431 msgid "Then run virt-resize with any of the C<--shrink> and/or C<--resize> options."
24435 #: ../tools/virt-resize.pl:224
24436 msgid "IGNORING OR DELETING PARTITIONS"
24440 #: ../tools/virt-resize.pl:226
24442 "virt-resize also gives a convenient way to ignore or delete partitions when "
24443 "copying from the input disk to the output disk. Ignoring a partition speeds "
24444 "up the copy where you don't care about the existing contents of a "
24445 "partition. Deleting a partition removes it completely, but note that it "
24446 "also renumbers any partitions after the one which is deleted, which can "
24447 "leave some guests unbootable."
24451 #: ../tools/virt-resize.pl:243
24452 msgid "Display help."
24456 #: ../tools/virt-resize.pl:257
24457 msgid "B<--resize part=size>"
24461 #: ../tools/virt-resize.pl:259
24463 "Resize the named partition (expanding or shrinking it) so that it has the "
24468 #: ../tools/virt-resize.pl:262
24470 "C<size> can be expressed as an absolute number followed by b/K/M/G/T/P/E to "
24471 "mean bytes, Kilobytes, Megabytes, Gigabytes, Terabytes, Petabytes or "
24472 "Exabytes; or as a percentage of the current size; or as a relative number or "
24473 "percentage. For example:"
24477 #: ../tools/virt-resize.pl:267
24480 " --resize /dev/sda2=10G\n"
24485 #: ../tools/virt-resize.pl:269
24488 " --resize /dev/sda4=90%\n"
24493 #: ../tools/virt-resize.pl:271
24496 " --resize /dev/sda2=+1G\n"
24501 #: ../tools/virt-resize.pl:273
24504 " --resize /dev/sda2=-200M\n"
24509 #: ../tools/virt-resize.pl:275
24512 " --resize /dev/sda1=+128K\n"
24517 #: ../tools/virt-resize.pl:277
24520 " --resize /dev/sda1=+10%\n"
24525 #: ../tools/virt-resize.pl:279
24528 " --resize /dev/sda1=-10%\n"
24533 #: ../tools/virt-resize.pl:281
24535 "You can increase the size of any partition. Virt-resize will expand the "
24536 "direct content of the partition if it knows how (see C<--expand> below)."
24540 #: ../tools/virt-resize.pl:285
24542 "You can only I<decrease> the size of partitions that contain filesystems or "
24543 "PVs which have already been shrunk. Virt-resize will check this has been "
24544 "done before proceeding, or else will print an error (see also "
24545 "C<--resize-force>)."
24549 #: ../tools/virt-resize.pl:290 ../tools/virt-resize.pl:382 ../tools/virt-resize.pl:399
24550 msgid "You can give this option multiple times."
24554 #: ../tools/virt-resize.pl:296
24555 msgid "B<--resize-force part=size>"
24559 #: ../tools/virt-resize.pl:298
24561 "This is the same as C<--resize> except that it will let you decrease the "
24562 "size of any partition. Generally this means you will lose any data which "
24563 "was at the end of the partition you shrink, but you may not care about that "
24564 "(eg. if shrinking an unused partition, or if you can easily recreate it such "
24565 "as a swap partition)."
24569 #: ../tools/virt-resize.pl:304
24570 msgid "See also the C<--ignore> option."
24574 #: ../tools/virt-resize.pl:310
24575 msgid "B<--expand part>"
24579 #: ../tools/virt-resize.pl:312
24581 "Expand the named partition so it uses up all extra space (space left over "
24582 "after any other resize changes that you request have been done)."
24586 #: ../tools/virt-resize.pl:315
24588 "If virt-resize knows how, it will expand the direct content of the "
24589 "partition. For example, if the partition is an LVM PV, it will expand the "
24590 "PV to fit (like calling L<pvresize(8)>). Virt-resize leaves any other "
24591 "content it doesn't know about alone."
24595 #: ../tools/virt-resize.pl:320
24596 msgid "Currently virt-resize can resize:"
24600 #: ../tools/virt-resize.pl:326
24602 "ext2, ext3 and ext4 filesystems when they are contained directly inside a "
24607 #: ../tools/virt-resize.pl:331
24609 "NTFS filesystems contained directly in a partition, if libguestfs was "
24610 "compiled with support for NTFS."
24614 #: ../tools/virt-resize.pl:334
24616 "The filesystem must have been shut down consistently last time it was used. "
24617 "Additionally, L<ntfsresize(8)> marks the resized filesystem as requiring a "
24618 "consistency check, so at the first boot after resizing Windows will check "
24623 #: ../tools/virt-resize.pl:341
24625 "LVM PVs (physical volumes). However virt-resize does I<not> resize anything "
24626 "inside the PV. The user will have to resize LVs as desired."
24630 #: ../tools/virt-resize.pl:347 ../tools/virt-resize.pl:369
24631 msgid "Note that you cannot use C<--expand> and C<--shrink> together."
24635 #: ../tools/virt-resize.pl:353
24636 msgid "B<--shrink part>"
24640 #: ../tools/virt-resize.pl:355
24642 "Shrink the named partition until the overall disk image fits in the "
24643 "destination. The named partition B<must> contain a filesystem or PV which "
24644 "has already been shrunk using another tool (eg. L<guestfish(1)> or other "
24645 "online tools). Virt-resize will check this and give an error if it has not "
24650 #: ../tools/virt-resize.pl:361
24652 "The amount by which the overall disk must be shrunk (after carrying out all "
24653 "other operations requested by the user) is called the \"deficit\". For "
24654 "example, a straight copy (assume no other operations) from a 5GB disk image "
24655 "to a 4GB disk image results in a 1GB deficit. In this case, virt-resize "
24656 "would give an error unless the user specified a partition to shrink and that "
24657 "partition had more than a gigabyte of free space."
24661 #: ../tools/virt-resize.pl:375
24662 msgid "B<--ignore part>"
24666 #: ../tools/virt-resize.pl:377
24668 "Ignore the named partition. Effectively this means the partition is "
24669 "allocated on the destination disk, but the content is not copied across from "
24670 "the source disk. The content of the partition will be blank (all zero "
24675 #: ../tools/virt-resize.pl:388
24676 msgid "B<--delete part>"
24680 #: ../tools/virt-resize.pl:390
24682 "Delete the named partition. It would be more accurate to describe this as "
24683 "\"don't copy it over\", since virt-resize doesn't do in-place changes and "
24684 "the original disk image is left intact."
24688 #: ../tools/virt-resize.pl:394
24690 "Note that when you delete a partition, then anything contained in the "
24691 "partition is also deleted. Furthermore, this causes any partitions that "
24692 "come after to be I<renumbered>, which can easily make your guest unbootable."
24696 #: ../tools/virt-resize.pl:405
24697 msgid "B<--LV-expand logvol>"
24701 #: ../tools/virt-resize.pl:407
24703 "This takes the logical volume and, as a final step, expands it to fill all "
24704 "the space available in its volume group. A typical usage, assuming a Linux "
24705 "guest with a single PV C</dev/sda2> and a root device called "
24706 "C</dev/vg_guest/lv_root> would be:"
24710 #: ../tools/virt-resize.pl:412
24713 " virt-resize indisk outdisk \\\n"
24714 " --expand /dev/sda2 --LV-expand /dev/vg_guest/lv_root\n"
24719 #: ../tools/virt-resize.pl:415
24721 "This would first expand the partition (and PV), and then expand the root "
24722 "device to fill the extra space in the PV."
24726 #: ../tools/virt-resize.pl:418
24728 "The contents of the LV are also resized if virt-resize knows how to do "
24729 "that. You can stop virt-resize from trying to expand the content by using "
24730 "the option C<--no-expand-content>."
24734 #: ../tools/virt-resize.pl:422
24735 msgid "Use L<virt-list-filesystems(1)> to list the filesystems in the guest."
24739 #: ../tools/virt-resize.pl:425
24741 "You can give this option multiple times, I<but> it doesn't make sense to do "
24742 "this unless the logical volumes you specify are all in different volume "
24747 #: ../tools/virt-resize.pl:433
24748 msgid "B<--no-copy-boot-loader>"
24752 #: ../tools/virt-resize.pl:435
24754 "By default, virt-resize copies over some sectors at the start of the disk "
24755 "(up to the beginning of the first partition). Commonly these sectors "
24756 "contain the Master Boot Record (MBR) and the boot loader, and are required "
24757 "in order for the guest to boot correctly."
24761 #: ../tools/virt-resize.pl:440
24763 "If you specify this flag, then this initial copy is not done. You may need "
24764 "to reinstall the boot loader in this case."
24768 #: ../tools/virt-resize.pl:448
24769 msgid "B<--no-extra-partition>"
24773 #: ../tools/virt-resize.pl:450
24775 "By default, virt-resize creates an extra partition if there is any extra, "
24776 "unused space after all resizing has happened. Use this option to prevent "
24777 "the extra partition from being created. If you do this then the extra space "
24778 "will be inaccessible until you run fdisk, parted, or some other partitioning "
24779 "tool in the guest."
24783 #: ../tools/virt-resize.pl:456
24785 "Note that if the surplus space is smaller than 10 MB, no extra partition "
24790 #: ../tools/virt-resize.pl:463
24791 msgid "B<--no-expand-content>"
24795 #: ../tools/virt-resize.pl:465
24797 "By default, virt-resize will try to expand the direct contents of "
24798 "partitions, if it knows how (see C<--expand> option above)."
24802 #: ../tools/virt-resize.pl:468
24804 "If you give the C<--no-expand-content> option then virt-resize will not "
24809 #: ../tools/virt-resize.pl:475
24810 msgid "B<-d> | B<--debug>"
24814 #: ../tools/virt-resize.pl:477 ../tools/virt-win-reg.pl:198
24815 msgid "Enable debugging messages."
24819 #: ../tools/virt-resize.pl:483
24820 msgid "B<-n> | B<--dryrun>"
24824 #: ../tools/virt-resize.pl:485
24825 msgid "Print a summary of what would be done, but don't do anything."
24829 #: ../tools/virt-resize.pl:491
24830 msgid "B<-q> | B<--quiet>"
24834 #: ../tools/virt-resize.pl:493
24835 msgid "Don't print the summary."
24839 #: ../tools/virt-resize.pl:1352
24840 msgid "\"Partition 1 does not end on cylinder boundary.\""
24844 #: ../tools/virt-resize.pl:1354
24846 "Virt-resize aligns partitions to multiples of 64 sectors. Usually this "
24847 "means the partitions will not be aligned to the ancient CHS geometry. "
24848 "However CHS geometry is meaningless for disks manufactured since the early "
24849 "1990s, and doubly so for virtual hard drives. Alignment of partitions to "
24850 "cylinders is not required by any modern operating system."
24854 #: ../tools/virt-resize.pl:1361
24855 msgid "RESIZING WINDOWS VIRTUAL MACHINES"
24859 #: ../tools/virt-resize.pl:1363
24861 "In Windows Vista and later versions, Microsoft switched to using a separate "
24862 "boot partition. In these VMs, typically C</dev/sda1> is the boot partition "
24863 "and C</dev/sda2> is the main (C:) drive. We have not had any luck resizing "
24864 "the boot partition. Doing so seems to break the guest completely. However "
24865 "expanding the second partition (ie. C: drive) should work."
24869 #: ../tools/virt-resize.pl:1370
24871 "Windows may initiate a lengthy \"chkdsk\" on first boot after a resize, if "
24872 "NTFS partitions have been expanded. This is just a safety check and (unless "
24873 "it find errors) is nothing to worry about."
24877 #: ../tools/virt-resize.pl:1374
24878 msgid "ALTERNATIVE TOOLS"
24882 #: ../tools/virt-resize.pl:1376
24884 "There are several proprietary tools for resizing partitions. We won't "
24885 "mention any here."
24889 #: ../tools/virt-resize.pl:1379
24891 "L<parted(8)> and its graphical shell gparted can do some types of resizing "
24892 "operations on disk images. They can resize and move partitions, but I don't "
24893 "think they can do anything with the contents, and they certainly don't "
24898 #: ../tools/virt-resize.pl:1384
24900 "L<guestfish(1)> can do everything that virt-resize can do and a lot more, "
24901 "but at a much lower level. You will probably end up hand-calculating sector "
24902 "offsets, which is something that virt-resize was designed to avoid. If you "
24903 "want to see the guestfish-equivalent commands that virt-resize runs, use the "
24908 #: ../tools/virt-resize.pl:1392
24910 "L<virt-list-partitions(1)>, L<virt-list-filesystems(1)>, L<virt-df(1)>, "
24911 "L<guestfs(3)>, L<guestfish(1)>, L<lvm(8)>, L<pvresize(8)>, L<lvresize(8)>, "
24912 "L<resize2fs(8)>, L<ntfsresize(8)>, L<virsh(1)>, L<parted(8)>, "
24913 "L<Sys::Guestfs(3)>, L<http://libguestfs.org/>."
24917 #: ../tools/virt-tar.pl:34
24918 msgid "virt-tar - Extract or upload files to a virtual machine"
24922 #: ../tools/virt-tar.pl:38
24925 " virt-tar [--options] -x domname directory tarball\n"
24930 #: ../tools/virt-tar.pl:40
24933 " virt-tar [--options] -u domname tarball directory\n"
24938 #: ../tools/virt-tar.pl:42
24941 " virt-tar [--options] disk.img [disk.img ...] -x directory tarball\n"
24946 #: ../tools/virt-tar.pl:44
24949 " virt-tar [--options] disk.img [disk.img ...] -u tarball directory\n"
24954 #: ../tools/virt-tar.pl:48
24955 msgid "Download C</home> from the VM into a local tarball:"
24959 #: ../tools/virt-tar.pl:50
24962 " virt-tar -x domname /home home.tar\n"
24967 #: ../tools/virt-tar.pl:52
24970 " virt-tar -zx domname /home home.tar.gz\n"
24975 #: ../tools/virt-tar.pl:54
24976 msgid "Upload a local tarball and unpack it inside C</tmp> in the VM:"
24980 #: ../tools/virt-tar.pl:56
24983 " virt-tar -u domname uploadstuff.tar /tmp\n"
24988 #: ../tools/virt-tar.pl:58
24991 " virt-tar -zu domname uploadstuff.tar.gz /tmp\n"
24996 #: ../tools/virt-tar.pl:62
24998 "You must I<not> use C<virt-tar> with the C<-u> option (upload) on live "
24999 "virtual machines. If you do this, you risk disk corruption in the VM. "
25000 "C<virt-tar> tries to stop you from doing this, but doesn't catch all cases."
25004 #: ../tools/virt-tar.pl:67
25006 "You can use C<-x> (extract) on live virtual machines, but you might get "
25007 "inconsistent results or errors if there is filesystem activity inside the "
25008 "VM. If the live VM is synched and quiescent, then C<virt-tar> will usually "
25009 "work, but the only way to guarantee consistent results is if the virtual "
25010 "machine is shut down."
25014 #: ../tools/virt-tar.pl:75
25016 "C<virt-tar> is a general purpose archive tool for downloading and uploading "
25017 "parts of a guest filesystem. There are many possibilities: making backups, "
25018 "uploading data files, snooping on guest activity, fixing or customizing "
25023 #: ../tools/virt-tar.pl:80
25025 "If you want to just view a single file, use L<virt-cat(1)>. If you just "
25026 "want to edit a single file, use L<virt-edit(1)>. For more complex cases you "
25027 "should look at the L<guestfish(1)> tool."
25031 #: ../tools/virt-tar.pl:84
25033 "There are two modes of operation: C<-x> (eXtract) downloads a directory and "
25034 "its contents (recursively) from the virtual machine into a local tarball. "
25035 "C<-u> uploads from a local tarball, unpacking it into a directory inside the "
25036 "virtual machine. You cannot use these two options together."
25040 #: ../tools/virt-tar.pl:90
25042 "In addition, you may need to use the C<-z> (gZip) option to enable "
25043 "compression. When uploading, you have to specify C<-z> if the upload file "
25044 "is compressed because virt-tar won't detect this on its own."
25048 #: ../tools/virt-tar.pl:94
25050 "C<virt-tar> can only handle tar (optionally gzipped) format tarballs. For "
25051 "example it cannot do PKZip files or bzip2 compression. If you want that "
25052 "then you'll have to rebuild the tarballs yourself. (This is a limitation of "
25053 "the L<libguestfs(3)> API)."
25057 #: ../tools/virt-tar.pl:135
25058 msgid "B<-x> | B<--extract> | B<--download>"
25062 #: ../tools/virt-tar.pl:137
25063 msgid "B<-u> | B<--upload>"
25067 #: ../tools/virt-tar.pl:139
25069 "Use C<-x> to extract (download) a directory from a virtual machine to a "
25074 #: ../tools/virt-tar.pl:142
25076 "Use C<-u> to upload and unpack from a local tarball into a virtual machine. "
25077 "Please read the L</WARNING> section above before using this option."
25081 #: ../tools/virt-tar.pl:146
25082 msgid "You must specify exactly one of these options."
25086 #: ../tools/virt-tar.pl:152
25087 msgid "B<-z> | B<--gzip>"
25091 #: ../tools/virt-tar.pl:154
25092 msgid "Specify that the input or output tarball is gzip-compressed."
25096 #: ../tools/virt-tar.pl:259
25098 "L<guestfs(3)>, L<guestfish(1)>, L<virt-cat(1)>, L<virt-edit(1)>, "
25099 "L<Sys::Guestfs(3)>, L<Sys::Guestfs::Lib(3)>, L<Sys::Virt(3)>, "
25100 "L<http://libguestfs.org/>."
25104 #: ../tools/virt-win-reg.pl:38
25106 "virt-win-reg - Export and merge Windows Registry entries from a Windows "
25111 #: ../tools/virt-win-reg.pl:42
25114 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey'\n"
25119 #: ../tools/virt-win-reg.pl:44
25122 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' name\n"
25127 #: ../tools/virt-win-reg.pl:46
25130 " virt-win-reg domname 'HKLM\\Path\\To\\Subkey' @\n"
25135 #: ../tools/virt-win-reg.pl:48
25138 " virt-win-reg --merge domname [input.reg ...]\n"
25143 #: ../tools/virt-win-reg.pl:50
25146 " virt-win-reg [--options] disk.img ... # instead of domname\n"
25151 #: ../tools/virt-win-reg.pl:54
25153 "You must I<not> use C<virt-win-reg> with the C<--merge> option on live "
25154 "virtual machines. If you do this, you I<will> get irreversible disk "
25155 "corruption in the VM. C<virt-win-reg> tries to stop you from doing this, "
25156 "but doesn't catch all cases."
25160 #: ../tools/virt-win-reg.pl:59
25162 "Modifying the Windows Registry is an inherently risky operation. The format "
25163 "is deliberately obscure and undocumented, and Registry changes can leave the "
25164 "system unbootable. Therefore when using the C<--merge> option, make sure "
25165 "you have a reliable backup first."
25169 #: ../tools/virt-win-reg.pl:66
25171 "This program can export and merge Windows Registry entries from a Windows "
25176 #: ../tools/virt-win-reg.pl:69
25178 "The first parameter is the libvirt guest name or the raw disk image of a "
25183 #: ../tools/virt-win-reg.pl:72
25185 "If C<--merge> is I<not> specified, then the chosen registry key is "
25186 "displayed/exported (recursively). For example:"
25190 #: ../tools/virt-win-reg.pl:75
25193 " $ virt-win-reg Windows7 'HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft'\n"
25198 #: ../tools/virt-win-reg.pl:77
25199 msgid "You can also display single values from within registry keys, for example:"
25203 #: ../tools/virt-win-reg.pl:80
25206 " $ cvkey='HKLM\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion'\n"
25207 " $ virt-win-reg Windows7 $cvkey ProductName\n"
25208 " Windows 7 Enterprise\n"
25213 #: ../tools/virt-win-reg.pl:84
25215 "With C<--merge>, you can merge a textual regedit file into the Windows "
25220 #: ../tools/virt-win-reg.pl:87
25223 " $ virt-win-reg --merge Windows7 changes.reg\n"
25228 #: ../tools/virt-win-reg.pl:89
25229 msgid "SUPPORTED SYSTEMS"
25233 #: ../tools/virt-win-reg.pl:91
25235 "The program currently supports Windows NT-derived guests starting with "
25236 "Windows XP through to at least Windows 7."
25240 #: ../tools/virt-win-reg.pl:94
25242 "Registry support is done for C<HKEY_LOCAL_MACHINE\\SAM>, "
25243 "C<HKEY_LOCAL_MACHINE\\SECURITY>, C<HKEY_LOCAL_MACHINE\\SOFTWARE>, "
25244 "C<HKEY_LOCAL_MACHINE\\SYSTEM> and C<HKEY_USERS\\.DEFAULT>."
25248 #: ../tools/virt-win-reg.pl:98
25250 "You can use C<HKLM> as a shorthand for C<HKEY_LOCAL_MACHINE>, and C<HKU> for "
25255 #: ../tools/virt-win-reg.pl:101
25257 "C<HKEY_USERS\\$SID> and C<HKEY_CURRENT_USER> are B<not> supported at this "
25262 #: ../tools/virt-win-reg.pl:104
25267 #: ../tools/virt-win-reg.pl:106
25269 "This program is only meant for simple access to the registry. If you want "
25270 "to do complicated things with the registry, we suggest you download the "
25271 "Registry hive files from the guest using L<libguestfs(3)> or L<guestfish(1)> "
25272 "and access them locally, eg. using L<hivex(3)>, L<hivexsh(1)> or "
25273 "L<hivexregedit(1)>."
25277 #: ../tools/virt-win-reg.pl:112
25282 #: ../tools/virt-win-reg.pl:114
25284 "C<virt-win-reg> expects that regedit files have already been reencoded in "
25285 "the local encoding. Usually on Linux hosts, this means UTF-8 with "
25286 "Unix-style line endings. Since Windows regedit files are often in UTF-16LE "
25287 "with Windows-style line endings, you may need to reencode the whole file "
25288 "before or after processing."
25292 #: ../tools/virt-win-reg.pl:120
25294 "To reencode a file from Windows format to Linux (before processing it with "
25295 "the C<--merge> option), you would do something like this:"
25299 #: ../tools/virt-win-reg.pl:123
25302 " iconv -f utf-16le -t utf-8 < win.reg | dos2unix > linux.reg\n"
25307 #: ../tools/virt-win-reg.pl:125
25309 "To go in the opposite direction, after exporting and before sending the file "
25310 "to a Windows user, do something like this:"
25314 #: ../tools/virt-win-reg.pl:128
25317 " unix2dos linux.reg | iconv -f utf-8 -t utf-16le > win.reg\n"
25322 #: ../tools/virt-win-reg.pl:130
25323 msgid "For more information about encoding, see L<Win::Hivex::Regedit(3)>."
25327 #: ../tools/virt-win-reg.pl:132
25329 "If you are unsure about the current encoding, use the L<file(1)> command. "
25330 "Recent versions of Windows regedit.exe produce a UTF-16LE file with "
25331 "Windows-style (CRLF) line endings, like this:"
25335 #: ../tools/virt-win-reg.pl:136
25338 " $ file software.reg\n"
25339 " software.reg: Little-endian UTF-16 Unicode text, with very long lines,\n"
25340 " with CRLF line terminators\n"
25345 #: ../tools/virt-win-reg.pl:140
25346 msgid "This file would need conversion before you could C<--merge> it."
25350 #: ../tools/virt-win-reg.pl:142
25351 msgid "SHELL QUOTING"
25355 #: ../tools/virt-win-reg.pl:144
25357 "Be careful when passing parameters containing C<\\> (backslash) in the "
25358 "shell. Usually you will have to use 'single quotes' or double backslashes "
25359 "(but not both) to protect them from the shell."
25363 #: ../tools/virt-win-reg.pl:148
25364 msgid "Paths and value names are case-insensitive."
25368 #: ../tools/virt-win-reg.pl:150
25369 msgid "CurrentControlSet etc."
25373 #: ../tools/virt-win-reg.pl:152
25375 "Registry keys like C<CurrentControlSet> don't really exist in the Windows "
25376 "Registry at the level of the hive file, and therefore you cannot modify "
25381 #: ../tools/virt-win-reg.pl:156
25383 "C<CurrentControlSet> is usually an alias for C<ControlSet001>. In some "
25384 "circumstances it might refer to another control set. The way to find out is "
25385 "to look at the C<HKLM\\SYSTEM\\Select> key:"
25389 #: ../tools/virt-win-reg.pl:160
25392 " # virt-win-reg WindowsGuest 'HKLM\\SYSTEM\\Select'\n"
25393 " [HKEY_LOCAL_MACHINE\\SYSTEM\\Select]\n"
25394 " \"Current\"=dword:00000001\n"
25395 " \"Default\"=dword:00000001\n"
25396 " \"Failed\"=dword:00000000\n"
25397 " \"LastKnownGood\"=dword:00000002\n"
25402 #: ../tools/virt-win-reg.pl:167
25403 msgid "\"Default\" is the one which Windows will choose when it boots."
25407 #: ../tools/virt-win-reg.pl:169
25408 msgid "Similarly, other C<Current...> keys in the path may need to be replaced."
25412 #: ../tools/virt-win-reg.pl:216
25417 #: ../tools/virt-win-reg.pl:218
25419 "In merge mode, this merges a textual regedit file into the Windows Registry "
25420 "of the virtual machine. If this flag is I<not> given then virt-win-reg "
25421 "displays or exports Registry entries instead."
25425 #: ../tools/virt-win-reg.pl:222
25427 "Note that C<--merge> is I<unsafe> to use on live virtual machines, and will "
25428 "result in disk corruption. However exporting (without this flag) is always "
25433 #: ../tools/virt-win-reg.pl:230
25434 msgid "B<--encoding> UTF-16LE|ASCII"
25438 #: ../tools/virt-win-reg.pl:232
25440 "When merging (only), you may need to specify the encoding for strings to be "
25441 "used in the hive file. This is explained in detail in "
25442 "L<Win::Hivex::Regedit(3)/ENCODING STRINGS>."
25446 #: ../tools/virt-win-reg.pl:236
25448 "The default is to use UTF-16LE, which should work with recent versions of "
25453 #: ../tools/virt-win-reg.pl:463
25455 "L<hivex(3)>, L<hivexsh(1)>, L<hivexregedit(1)>, L<guestfs(3)>, "
25456 "L<guestfish(1)>, L<virt-cat(1)>, L<Sys::Guestfs(3)>, "
25457 "L<Sys::Guestfs::Lib(3)>, L<Win::Hivex(3)>, L<Win::Hivex::Regedit(3)>, "
25458 "L<Sys::Virt(3)>, L<http://libguestfs.org/>."
25462 #: ../tools/virt-win-reg.pl:481
25465 " export LIBGUESTFS_DEBUG=1\n"
25466 " virt-win-reg --debug [... rest ...] > /tmp/virt-win-reg.log 2>&1\n"
25471 #: ../tools/virt-win-reg.pl:484
25473 "Attach /tmp/virt-win-reg.log to a new bug report at "
25474 "L<https://bugzilla.redhat.com/>"